@esri/calcite-components 5.0.0-next.41 → 5.0.0-next.43

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 (362) hide show
  1. package/dist/cdn/{V6OVMX6A.js → 26NNRW3V.js} +2 -2
  2. package/dist/cdn/{YF47UDKG.js → 2A3IUCFS.js} +2 -2
  3. package/dist/cdn/{XLUQ6LWA.js → 2EQPFMNP.js} +2 -2
  4. package/dist/cdn/{PWNPG5JH.js → 2JEAFSS5.js} +2 -2
  5. package/dist/cdn/{Q23PLMQX.js → 2KRFZJGH.js} +2 -2
  6. package/dist/cdn/{X47XIAXA.js → 2O4VBVTX.js} +2 -2
  7. package/dist/cdn/{3ATK4TMF.js → 2VOXVRRE.js} +2 -2
  8. package/dist/cdn/{TVBZ5FRT.js → 3A5K3YC3.js} +2 -2
  9. package/dist/cdn/3E3QGMJB.js +4 -0
  10. package/dist/cdn/{FVEXGCGW.js → 3GITZ4DI.js} +1 -1
  11. package/dist/cdn/{NZHAUVU5.js → 3L7VHXSZ.js} +1 -1
  12. package/dist/cdn/{VZXTLQUU.js → 3NVBBGVC.js} +2 -2
  13. package/dist/cdn/{RBT53333.js → 3UXKG6EQ.js} +2 -2
  14. package/dist/cdn/{PYZXE6BS.js → 43BO6A5M.js} +2 -2
  15. package/dist/cdn/{UUM7YLQN.js → 4474PI3Y.js} +2 -2
  16. package/dist/cdn/{IUNQYQMA.js → 4H37TAG6.js} +2 -2
  17. package/dist/cdn/{EFJPJNEZ.js → 4NYQXDXF.js} +2 -2
  18. package/dist/cdn/{4AHLJHLA.js → 4UTJG4M4.js} +2 -2
  19. package/dist/cdn/{OVZSYDCD.js → 4YBYL3JK.js} +2 -2
  20. package/dist/cdn/{TZVDHYFV.js → 4ZOEF6YP.js} +2 -2
  21. package/dist/cdn/{7JIES3GU.js → 5AOUEWYU.js} +2 -2
  22. package/dist/cdn/{E6JDBIYS.js → 5BM3NCGQ.js} +2 -2
  23. package/dist/cdn/{S23EEZYE.js → 5BTVHCKT.js} +1 -1
  24. package/dist/cdn/{S7Y3UBBW.js → 5JQP6IVR.js} +2 -2
  25. package/dist/cdn/{2CES2KCJ.js → 5QYXEPPN.js} +1 -1
  26. package/dist/cdn/{ZOIND5U6.js → 6DXGIYAV.js} +2 -2
  27. package/dist/cdn/{SSZFTAS3.js → 6HUGADED.js} +2 -2
  28. package/dist/cdn/{3PVOPEAU.js → 6ZYANAPL.js} +2 -2
  29. package/dist/cdn/{UWYIKI3J.js → 76WMDWV2.js} +2 -2
  30. package/dist/cdn/{M4WE375R.js → 7DSKJJ7N.js} +1 -1
  31. package/dist/cdn/{SFJECAV4.js → 7KC34WAB.js} +2 -2
  32. package/dist/cdn/{K4BVKGTJ.js → 7KHLNLFX.js} +2 -2
  33. package/dist/cdn/{WLLMLWCJ.js → 7KVPLK2R.js} +2 -2
  34. package/dist/cdn/{BZ4A65YS.js → 7L4KTY56.js} +1 -1
  35. package/dist/cdn/{KOL2RUNY.js → 7NBM4EOH.js} +2 -2
  36. package/dist/cdn/{UFWMXGBP.js → 7RIJVHG3.js} +2 -2
  37. package/dist/cdn/{P3X5RZMI.js → ACL2BNIB.js} +2 -2
  38. package/dist/cdn/{PY5ULW46.js → AHJTDAFD.js} +2 -2
  39. package/dist/cdn/{2L43XP72.js → AHQ7ABYO.js} +2 -2
  40. package/dist/cdn/{EA7TNUHU.js → ALSGILER.js} +2 -2
  41. package/dist/cdn/{6YRROLK4.js → ASSIEUGN.js} +2 -2
  42. package/dist/cdn/{RCFEU7VD.js → B27OF4CC.js} +2 -2
  43. package/dist/cdn/{P2SKGBW3.js → B2AEQOCB.js} +2 -2
  44. package/dist/cdn/{XVILEFVJ.js → BFOY6AMY.js} +2 -2
  45. package/dist/cdn/{3HCU4ZCN.js → BGNYQQPT.js} +2 -2
  46. package/dist/cdn/{GMQ2OAZH.js → BORFY5W6.js} +2 -2
  47. package/dist/cdn/{6F6YAUEI.js → BP6KBRIJ.js} +2 -2
  48. package/dist/cdn/{NQTVUYLY.js → BWOVRJXT.js} +2 -2
  49. package/dist/cdn/{DCM7ROWM.js → BYGZE4FP.js} +2 -2
  50. package/dist/cdn/{BCXFLQDQ.js → CDEAYKHA.js} +2 -2
  51. package/dist/cdn/{H3HDJ3L5.js → CF3PBS3G.js} +1 -1
  52. package/dist/cdn/{KOQGCDLR.js → CJZBTVWA.js} +2 -2
  53. package/dist/cdn/{F5YXINZP.js → CX673EPC.js} +1 -1
  54. package/dist/cdn/{5SFJ5DGQ.js → D4O2EBNZ.js} +1 -1
  55. package/dist/cdn/{VAVJN6BG.js → DKAI2RAB.js} +2 -2
  56. package/dist/cdn/DQANNUON.js +4 -0
  57. package/dist/cdn/{AQF2HY6Q.js → E3MMARCY.js} +2 -2
  58. package/dist/cdn/{LJPUGXUL.js → EOFCE62V.js} +2 -2
  59. package/dist/cdn/{67BJBQGX.js → ESMNXH64.js} +2 -2
  60. package/dist/cdn/{FDV5YBQH.js → FKTXLE6U.js} +2 -2
  61. package/dist/cdn/{A2G7MUU7.js → FQKUJ55K.js} +2 -2
  62. package/dist/cdn/{QMXHXODL.js → FQQ27TOQ.js} +2 -2
  63. package/dist/cdn/{PTHICJDT.js → G6FMN3UN.js} +2 -2
  64. package/dist/cdn/{XONLO677.js → GLKOCXXL.js} +1 -1
  65. package/dist/cdn/{TULIECMB.js → GW6AE2U5.js} +2 -2
  66. package/dist/cdn/{WBJYTLXP.js → GZXJAOLY.js} +2 -2
  67. package/dist/cdn/{OW3LB2GE.js → H2SGYM2C.js} +2 -2
  68. package/dist/cdn/{CM6ZRCO7.js → HBSXVI5X.js} +2 -2
  69. package/dist/cdn/HHAPC7ZP.js +4 -0
  70. package/dist/cdn/{OSEMEBHP.js → HOWPLVCC.js} +1 -1
  71. package/dist/cdn/{TK2G4QLN.js → HOXJQSLL.js} +2 -2
  72. package/dist/cdn/{AYRGKWYX.js → HVQGQ5VF.js} +2 -2
  73. package/dist/cdn/{P4RO6IJH.js → I3MQE3VR.js} +2 -2
  74. package/dist/cdn/{5AGTEH72.js → I6F6DCVW.js} +2 -2
  75. package/dist/cdn/IKNCQ3TQ.js +4 -0
  76. package/dist/cdn/{XB2J53BS.js → IVJX4BTE.js} +2 -2
  77. package/dist/cdn/{7V72BMJQ.js → J5HVYRZV.js} +2 -2
  78. package/dist/cdn/{4J4YCOVT.js → JJEJHMVX.js} +1 -1
  79. package/dist/cdn/{KLNGAWNO.js → JMBWNNVX.js} +2 -2
  80. package/dist/cdn/JQKHI76Q.js +4 -0
  81. package/dist/cdn/{PINUYVHH.js → JVC3WUER.js} +2 -2
  82. package/dist/cdn/{UMKE7ZZP.js → K4OJNT3E.js} +2 -2
  83. package/dist/cdn/{RM4A2SGZ.js → KA2EYYU5.js} +1 -1
  84. package/dist/cdn/{CTND4VRI.js → KELM3AL5.js} +2 -2
  85. package/dist/cdn/{LLQCSDYD.js → KJDAPT5G.js} +2 -2
  86. package/dist/cdn/{C4SSRT57.js → KJVV5P2C.js} +2 -2
  87. package/dist/cdn/{7QW4YVVD.js → KQJYNFE5.js} +1 -1
  88. package/dist/cdn/{MOA2TSYU.js → KQP2MSCO.js} +2 -2
  89. package/dist/cdn/{NP4E632V.js → KVRMSM2C.js} +2 -2
  90. package/dist/cdn/LA2YQLYM.js +4 -0
  91. package/dist/cdn/{DPFJ2UHQ.js → LO4ORJWE.js} +2 -2
  92. package/dist/cdn/{ZNFJ3I46.js → LPAFY7LN.js} +2 -2
  93. package/dist/cdn/M2UFW75T.js +4 -0
  94. package/dist/cdn/M64EIXVM.js +4 -0
  95. package/dist/cdn/{DE6UU3ZD.js → M6RGM3GL.js} +2 -2
  96. package/dist/cdn/{VO75XKDU.js → MRXCMHHC.js} +2 -2
  97. package/dist/cdn/{SJZEURAP.js → MTKSOSMX.js} +2 -2
  98. package/dist/cdn/{YKAIURVE.js → MVJWUEST.js} +2 -2
  99. package/dist/cdn/{QFLJE5EG.js → MZNHWFTD.js} +1 -1
  100. package/dist/cdn/{4QDDXSFE.js → N3IPHITT.js} +1 -1
  101. package/dist/cdn/{EM3USNP5.js → N4A2OU65.js} +2 -2
  102. package/dist/cdn/{LO4YAXTK.js → NCHSLBNK.js} +2 -2
  103. package/dist/cdn/{RXRWJBOA.js → NED4AECK.js} +2 -2
  104. package/dist/cdn/{OCPN3PAN.js → NQD6CVGX.js} +2 -2
  105. package/dist/cdn/NZH2OTHG.js +4 -0
  106. package/dist/cdn/{VOMJ2XM6.js → NZWZSHHB.js} +2 -2
  107. package/dist/cdn/{3X7W56NU.js → O7CL2AAW.js} +2 -2
  108. package/dist/cdn/{4G4AG5CO.js → OKR6LOWC.js} +2 -2
  109. package/dist/cdn/{YCLAEOHG.js → OLQFCINR.js} +2 -2
  110. package/dist/cdn/{CO7HTG64.js → OX3M3D3N.js} +1 -1
  111. package/dist/cdn/{F2H2GLWO.js → P32TPG2A.js} +2 -2
  112. package/dist/cdn/{2YSKMGPB.js → PFKZAYXL.js} +2 -2
  113. package/dist/cdn/{ERV72IRR.js → PHP4DYDX.js} +2 -2
  114. package/dist/cdn/{ULAZULOX.js → PKSRSZVF.js} +2 -2
  115. package/dist/cdn/{XDICFOTP.js → PQBPHDYE.js} +2 -2
  116. package/dist/cdn/{V7DWFIYC.js → Q3DBPIC6.js} +2 -2
  117. package/dist/cdn/{DAGVGU64.js → QA5TJQO7.js} +2 -2
  118. package/dist/cdn/{OYGDMY37.js → QC6K42X3.js} +2 -2
  119. package/dist/cdn/{7KNEN43O.js → QCTCF5A6.js} +1 -1
  120. package/dist/cdn/{YJNT6DIW.js → QFEFT42B.js} +2 -2
  121. package/dist/cdn/{RKUJZ3HS.js → QK7PZNIP.js} +2 -2
  122. package/dist/cdn/{A2PM6GPB.js → QLMBSULB.js} +2 -2
  123. package/dist/cdn/{VNFP6MLN.js → QODEYSFY.js} +2 -2
  124. package/dist/cdn/{GHMPCKQE.js → QRNTQ2OL.js} +2 -2
  125. package/dist/cdn/{G5NRGWDP.js → QTRXU5FG.js} +2 -2
  126. package/dist/cdn/{YGZM4LFT.js → RDFCF7OX.js} +2 -2
  127. package/dist/cdn/{AE5G2GXW.js → RF2SDD3J.js} +1 -1
  128. package/dist/cdn/{OTKUUU5F.js → RN43BIGR.js} +2 -2
  129. package/dist/cdn/{ACVCOS6Y.js → RSQQAMUO.js} +2 -2
  130. package/dist/cdn/{KMJMJDAO.js → S37DS47J.js} +2 -2
  131. package/dist/cdn/{IWLX2W2Q.js → S65ZK6SL.js} +2 -2
  132. package/dist/cdn/{O4FAQW5X.js → SDVU4CGI.js} +2 -2
  133. package/dist/cdn/{E4VWKC6P.js → SGY3ZP35.js} +2 -2
  134. package/dist/cdn/{I3VKJPNN.js → SL7ZFIP4.js} +2 -2
  135. package/dist/cdn/{BGTQP7QT.js → SQV4W2JX.js} +2 -2
  136. package/dist/cdn/T26TGVJI.js +4 -0
  137. package/dist/cdn/{2BGUDHI7.js → TERYJKUH.js} +2 -2
  138. package/dist/cdn/{HF54UPAT.js → TFJNVRUM.js} +2 -2
  139. package/dist/cdn/TSSMN3LI.js +4 -0
  140. package/dist/cdn/{PNTKHVD5.js → TVMI22S3.js} +2 -2
  141. package/dist/cdn/{NAWXDWLO.js → TZT52NXM.js} +2 -2
  142. package/dist/cdn/{T54476KF.js → UDEXFMDN.js} +2 -2
  143. package/dist/cdn/{2PWTOMF5.js → UEJZPZW2.js} +2 -2
  144. package/dist/cdn/{Z76XEV4B.js → UGRXRAYX.js} +2 -2
  145. package/dist/cdn/{VAIIUYWI.js → ULMQ3X5V.js} +2 -2
  146. package/dist/cdn/{JFKETEU3.js → UNDC4B36.js} +2 -2
  147. package/dist/cdn/{XNTXWKAC.js → USZDLOTI.js} +2 -2
  148. package/dist/cdn/{AYO62F3N.js → UWLBLPCE.js} +2 -2
  149. package/dist/cdn/{OITPU3JU.js → V2OYFWT5.js} +2 -2
  150. package/dist/cdn/{F45PIF7T.js → VEG3IYIN.js} +2 -2
  151. package/dist/cdn/{MOX7FHSI.js → VGIKOYPM.js} +2 -2
  152. package/dist/cdn/{JF6GWNVM.js → VHIJH5YS.js} +2 -2
  153. package/dist/cdn/{MXA4BVE4.js → VNZFJTEW.js} +2 -2
  154. package/dist/cdn/{WKD3ET34.js → VQDEGM25.js} +2 -2
  155. package/dist/cdn/{FPF7KWKA.js → VSMRIYH3.js} +2 -2
  156. package/dist/cdn/{EGBQBZTG.js → VYSCBYBT.js} +2 -2
  157. package/dist/cdn/{7BLISY4D.js → W3BOY4TS.js} +2 -2
  158. package/dist/cdn/{NILNPIXN.js → WASEG33W.js} +2 -2
  159. package/dist/cdn/{OWFPC3AQ.js → WGA54NJ7.js} +2 -2
  160. package/dist/cdn/{MRZUXA5B.js → WYIMHX7H.js} +1 -1
  161. package/dist/cdn/{NHIV5ASJ.js → X24NPQYM.js} +2 -2
  162. package/dist/cdn/XEUYMPAG.js +4 -0
  163. package/dist/cdn/{GDIAN53K.js → XFX6RCGM.js} +1 -1
  164. package/dist/cdn/{6LCLO2ON.js → XI75PNML.js} +2 -2
  165. package/dist/cdn/{IYBCZA6Q.js → XWNC5DLR.js} +2 -2
  166. package/dist/cdn/{I6ZXKD5Q.js → XYSBHUO5.js} +2 -2
  167. package/dist/cdn/YNJ6KTGF.js +4 -0
  168. package/dist/cdn/{NHXNKBHX.js → YPGLISDQ.js} +2 -2
  169. package/dist/cdn/ZAQUMO3C.js +4 -0
  170. package/dist/cdn/{AICXHFI5.js → ZHKLZPKV.js} +2 -2
  171. package/dist/cdn/{FGVEQ3GO.js → ZNPCE7EG.js} +1 -1
  172. package/dist/cdn/{JMOCGIR5.js → ZNPN543K.js} +2 -2
  173. package/dist/cdn/{QITXHDAJ.js → ZXOLQPCK.js} +1 -1
  174. package/dist/cdn/index.js +2 -2
  175. package/dist/chunks/ExpandToggle.js +1 -1
  176. package/dist/chunks/FloatingArrow.js +1 -1
  177. package/dist/chunks/Heading.js +1 -1
  178. package/dist/chunks/InternalLabel.js +1 -1
  179. package/dist/chunks/Validation.js +1 -1
  180. package/dist/chunks/array.js +1 -1
  181. package/dist/chunks/component.js +1 -1
  182. package/dist/chunks/core.js +1 -1
  183. package/dist/chunks/date.js +1 -1
  184. package/dist/chunks/dom.js +1 -1
  185. package/dist/chunks/dynamicClasses.js +1 -1
  186. package/dist/chunks/filter.js +1 -1
  187. package/dist/chunks/floating-ui.js +1 -1
  188. package/dist/chunks/form.js +1 -1
  189. package/dist/chunks/global.js +1 -1
  190. package/dist/chunks/guid.js +1 -1
  191. package/dist/chunks/header.js +1 -1
  192. package/dist/chunks/input.js +1 -1
  193. package/dist/chunks/interact.min.js +1 -1
  194. package/dist/chunks/key.js +1 -1
  195. package/dist/chunks/label.js +1 -1
  196. package/dist/chunks/locale.js +1 -1
  197. package/dist/chunks/logger.js +1 -1
  198. package/dist/chunks/math.js +1 -1
  199. package/dist/chunks/observers.js +1 -1
  200. package/dist/chunks/openCloseComponent.js +1 -1
  201. package/dist/chunks/resources.js +1 -1
  202. package/dist/chunks/resources2.js +1 -1
  203. package/dist/chunks/resources3.js +1 -1
  204. package/dist/chunks/resources4.js +1 -1
  205. package/dist/chunks/resources5.js +2 -2
  206. package/dist/chunks/resources6.js +1 -1
  207. package/dist/chunks/resources7.js +1 -1
  208. package/dist/chunks/resources8.js +1 -1
  209. package/dist/chunks/responsive.js +1 -1
  210. package/dist/chunks/runtime.js +5 -5
  211. package/dist/chunks/sortable.js +1 -1
  212. package/dist/chunks/sortableComponent.js +1 -1
  213. package/dist/chunks/text.js +1 -1
  214. package/dist/chunks/useCancelable.js +1 -1
  215. package/dist/chunks/useFocusTrap.js +1 -1
  216. package/dist/chunks/useInteractive.js +1 -1
  217. package/dist/chunks/usePreventDocumentScroll.js +1 -1
  218. package/dist/chunks/useSetFocus.js +1 -1
  219. package/dist/chunks/useT9n.js +1 -1
  220. package/dist/chunks/useTime.js +1 -1
  221. package/dist/chunks/useTopLayer.js +32 -0
  222. package/dist/chunks/utils.js +1 -1
  223. package/dist/chunks/utils2.js +1 -1
  224. package/dist/chunks/utils3.js +1 -1
  225. package/dist/chunks/utils4.js +1 -1
  226. package/dist/components/calcite-accordion/customElement.js +1 -1
  227. package/dist/components/calcite-accordion-item/customElement.js +1 -1
  228. package/dist/components/calcite-action/customElement.js +1 -1
  229. package/dist/components/calcite-action-bar/customElement.js +1 -1
  230. package/dist/components/calcite-action-group/customElement.js +1 -1
  231. package/dist/components/calcite-action-menu/customElement.js +1 -1
  232. package/dist/components/calcite-action-pad/customElement.js +1 -1
  233. package/dist/components/calcite-alert/customElement.js +11 -22
  234. package/dist/components/calcite-autocomplete/customElement.js +7 -14
  235. package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
  236. package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
  237. package/dist/components/calcite-avatar/customElement.js +1 -1
  238. package/dist/components/calcite-block/customElement.js +1 -1
  239. package/dist/components/calcite-block-group/customElement.js +1 -1
  240. package/dist/components/calcite-block-section/customElement.js +1 -1
  241. package/dist/components/calcite-button/customElement.js +1 -1
  242. package/dist/components/calcite-card/customElement.js +1 -1
  243. package/dist/components/calcite-card-group/customElement.js +1 -1
  244. package/dist/components/calcite-carousel/customElement.js +1 -1
  245. package/dist/components/calcite-carousel-item/customElement.js +1 -1
  246. package/dist/components/calcite-checkbox/customElement.js +1 -1
  247. package/dist/components/calcite-chip/customElement.js +1 -1
  248. package/dist/components/calcite-chip-group/customElement.js +1 -1
  249. package/dist/components/calcite-color-picker/customElement.js +1 -1
  250. package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
  251. package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
  252. package/dist/components/calcite-combobox/customElement.js +7 -14
  253. package/dist/components/calcite-combobox-item/customElement.js +1 -1
  254. package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
  255. package/dist/components/calcite-date-picker/customElement.js +1 -1
  256. package/dist/components/calcite-date-picker-day/customElement.js +1 -1
  257. package/dist/components/calcite-date-picker-month/customElement.js +1 -1
  258. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  259. package/dist/components/calcite-dialog/customElement.d.ts +9 -0
  260. package/dist/components/calcite-dialog/customElement.js +10 -15
  261. package/dist/components/calcite-dropdown/customElement.js +7 -14
  262. package/dist/components/calcite-dropdown-group/customElement.js +1 -1
  263. package/dist/components/calcite-dropdown-item/customElement.js +1 -1
  264. package/dist/components/calcite-fab/customElement.js +1 -1
  265. package/dist/components/calcite-filter/customElement.js +1 -1
  266. package/dist/components/calcite-flow/customElement.js +1 -1
  267. package/dist/components/calcite-flow-item/customElement.js +1 -1
  268. package/dist/components/calcite-graph/customElement.js +1 -1
  269. package/dist/components/calcite-handle/customElement.js +1 -1
  270. package/dist/components/calcite-icon/customElement.js +1 -1
  271. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  272. package/dist/components/calcite-input/customElement.js +1 -1
  273. package/dist/components/calcite-input-date-picker/customElement.js +7 -14
  274. package/dist/components/calcite-input-message/customElement.js +1 -1
  275. package/dist/components/calcite-input-number/customElement.js +1 -1
  276. package/dist/components/calcite-input-text/customElement.js +1 -1
  277. package/dist/components/calcite-input-time-picker/customElement.js +1 -1
  278. package/dist/components/calcite-input-time-zone/customElement.js +1 -1
  279. package/dist/components/calcite-label/customElement.js +1 -1
  280. package/dist/components/calcite-link/customElement.js +1 -1
  281. package/dist/components/calcite-list/customElement.d.ts +2 -2
  282. package/dist/components/calcite-list/customElement.js +1 -1
  283. package/dist/components/calcite-list/resources.d.ts +1 -1
  284. package/dist/components/calcite-list-item/customElement.js +6 -8
  285. package/dist/components/calcite-list-item/resources.d.ts +1 -1
  286. package/dist/components/calcite-list-item-group/customElement.js +1 -1
  287. package/dist/components/calcite-loader/customElement.js +1 -1
  288. package/dist/components/calcite-menu/customElement.js +1 -1
  289. package/dist/components/calcite-menu-item/customElement.js +2 -2
  290. package/dist/components/calcite-meter/customElement.js +1 -1
  291. package/dist/components/calcite-navigation/customElement.js +1 -1
  292. package/dist/components/calcite-navigation-logo/customElement.js +1 -1
  293. package/dist/components/calcite-navigation-user/customElement.js +1 -1
  294. package/dist/components/calcite-notice/customElement.js +1 -1
  295. package/dist/components/calcite-option/customElement.js +1 -1
  296. package/dist/components/calcite-option-group/customElement.js +1 -1
  297. package/dist/components/calcite-pagination/customElement.js +1 -1
  298. package/dist/components/calcite-panel/customElement.js +1 -1
  299. package/dist/components/calcite-popover/customElement.js +9 -15
  300. package/dist/components/calcite-progress/customElement.js +1 -1
  301. package/dist/components/calcite-radio-button/customElement.js +1 -1
  302. package/dist/components/calcite-radio-button-group/customElement.js +1 -1
  303. package/dist/components/calcite-rating/customElement.js +1 -1
  304. package/dist/components/calcite-scrim/customElement.js +1 -1
  305. package/dist/components/calcite-segmented-control/customElement.js +1 -1
  306. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  307. package/dist/components/calcite-select/customElement.js +1 -1
  308. package/dist/components/calcite-sheet/customElement.d.ts +9 -0
  309. package/dist/components/calcite-sheet/customElement.js +13 -23
  310. package/dist/components/calcite-shell/customElement.js +1 -1
  311. package/dist/components/calcite-shell-panel/customElement.js +1 -1
  312. package/dist/components/calcite-slider/customElement.js +1 -1
  313. package/dist/components/calcite-sort-handle/customElement.js +1 -1
  314. package/dist/components/calcite-sortable-list/customElement.js +1 -1
  315. package/dist/components/calcite-split-button/customElement.js +1 -1
  316. package/dist/components/calcite-stack/customElement.js +1 -1
  317. package/dist/components/calcite-stepper/customElement.js +1 -1
  318. package/dist/components/calcite-stepper-item/customElement.js +1 -1
  319. package/dist/components/calcite-swatch/customElement.js +1 -1
  320. package/dist/components/calcite-swatch-group/customElement.js +1 -1
  321. package/dist/components/calcite-switch/customElement.js +1 -1
  322. package/dist/components/calcite-tab/customElement.js +1 -1
  323. package/dist/components/calcite-tab-nav/customElement.js +1 -1
  324. package/dist/components/calcite-tab-title/customElement.js +1 -1
  325. package/dist/components/calcite-table/customElement.js +1 -1
  326. package/dist/components/calcite-table-cell/customElement.js +1 -1
  327. package/dist/components/calcite-table-header/customElement.js +1 -1
  328. package/dist/components/calcite-table-row/customElement.js +1 -1
  329. package/dist/components/calcite-tabs/customElement.js +1 -1
  330. package/dist/components/calcite-text-area/customElement.js +1 -1
  331. package/dist/components/calcite-tile/customElement.js +1 -1
  332. package/dist/components/calcite-tile-group/customElement.js +1 -1
  333. package/dist/components/calcite-time-picker/customElement.js +1 -1
  334. package/dist/components/calcite-tooltip/customElement.js +9 -15
  335. package/dist/components/calcite-tree/customElement.js +1 -1
  336. package/dist/components/calcite-tree-item/customElement.js +1 -1
  337. package/dist/controllers/useTopLayer.d.ts +34 -0
  338. package/dist/docs/api.json +85 -5
  339. package/dist/docs/docs.json +63 -5
  340. package/dist/docs/vscode.html-custom-data.json +14 -1
  341. package/dist/docs/web-types.json +31 -4
  342. package/dist/index.js +1 -1
  343. package/dist/loader.js +3 -3
  344. package/dist/types/lumina.d.ts +2 -2
  345. package/dist/types/preact.d.ts +2 -2
  346. package/dist/types/preact10.d.ts +2 -2
  347. package/dist/types/react.d.ts +2 -2
  348. package/dist/types/stencil.d.ts +2 -2
  349. package/package.json +7 -7
  350. package/dist/cdn/2TKCBX6I.js +0 -4
  351. package/dist/cdn/DFSMLINY.js +0 -4
  352. package/dist/cdn/DIPDH4O6.js +0 -4
  353. package/dist/cdn/ELEH334X.js +0 -4
  354. package/dist/cdn/FPPAUZT4.js +0 -4
  355. package/dist/cdn/HNA2HPUT.js +0 -4
  356. package/dist/cdn/HPOJOAKY.js +0 -4
  357. package/dist/cdn/JVWAOJ7V.js +0 -4
  358. package/dist/cdn/K3RJBVS6.js +0 -4
  359. package/dist/cdn/LIPHKDHK.js +0 -4
  360. package/dist/cdn/NUH4WBHL.js +0 -4
  361. package/dist/cdn/R4YGEPWB.js +0 -4
  362. package/dist/cdn/UWSGNQDB.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{a as A}from"./FGVEQ3GO.js";import{a as H}from"./CO7HTG64.js";import{a as w}from"./UUM7YLQN.js";import{a as N}from"./V6OVMX6A.js";import{a as P}from"./UFWMXGBP.js";import{D as v,e as I,t as O,u as L}from"./VNFP6MLN.js";import"./2CES2KCJ.js";import{B as D,C,D as E,E as s,J as u,L as _,M as V,P as M,g as $,h as m,o as f}from"./A2G7MUU7.js";var T=B=>P(()=>{let e=(t,o,i)=>{if(t===void 0)return;let l=o==="block"?"block-size":"inline-size";if(t===null)return i.style.removeProperty(l),null;let a=t,n=B.getBounds?.()??{inline:{min:null,max:null},block:{min:null,max:null}},{min:c,max:h}=o==="inline"?n.inline:n.block;return c!==null&&(a=Math.round(Math.max(a,c))),h!==null&&(a=Math.round(Math.min(a,h))),i.style.setProperty(l,`${Math.round(a)}px`),a};return{resize(t){let o=B.targetElement.value,i=e(t.inline,"inline",o),l=e(t.block,"block",o);return{inline:i,block:l}}}}),Z=$`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,r={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},U={actionBar:"action-bar",header:"header"},K={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},j=$`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends E{constructor(){super(...arguments),this.actionBars=[],this.contentRef=D(),this.messages=N(),this.sizeOverride=T({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}})}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=f({cancelable:!1}),this.calciteInternalShellPanelResizeStart=f({cancelable:!1}),this.calciteShellPanelCollapse=f({cancelable:!1}),this.calciteShellPanelExpand=f({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[j,Z]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){if(!this.contentRef.value)return;let t=this.sizeOverride.resize(e);this.resizeValues={...this.resizeValues,...t.inline!==void 0&&{inlineSize:t.inline},...t.block!==void 0&&{blockSize:t.block}}}handleKeyDown(e){let{key:t,defaultPrevented:o,shiftKey:i}=e,{position:l,layout:a,resizable:n,contentRef:c,el:h,resizeValues:{maxBlockSize:x,maxInlineSize:y,minBlockSize:z,minInlineSize:g}}=this,k=[...a==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||o||!k.includes(t))return;let p=this.getContentElDOMRect(),S=I(h)==="rtl"?-1:1,d=i?V:_;switch(t){case"ArrowUp":this.updateSizeInternal({block:p.height+(a==="horizontal"&&l==="end"?d:-d)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(a==="horizontal"&&l==="end"?-d:d)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(a==="vertical"&&l==="end"?d:-d)*S}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(a==="vertical"&&l==="end"?-d:d)*S}),e.preventDefault();break;case"Home":this.updateSizeInternal(a==="horizontal"?{block:z}:{inline:g}),e.preventDefault();break;case"End":this.updateSizeInternal(a==="horizontal"?{block:x}:{inline:y}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:t,resizable:o,position:i,collapsed:l,resizeHandleEl:a,layout:n}=this;if(!t.value||l||!o||!a)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:h,blockSize:x,minBlockSize:y,maxInlineSize:z,maxBlockSize:g}=window.getComputedStyle(t.value),b={inlineSize:v(c),blockSize:v(x),minInlineSize:v(h),minBlockSize:v(y),maxInlineSize:v(z)||window.innerWidth,maxBlockSize:v(g)||window.innerHeight};this.resizeValues=b;let k=I(e)==="rtl";this.interaction=A(t.value,{context:e.ownerDocument}).resizable({edges:{top:i==="end"&&n==="horizontal"?a:!1,right:i===(k?"end":"start")&&n==="vertical"?a:!1,bottom:i==="start"&&n==="horizontal"?a:!1,left:i===(k?"start":"end")&&n==="vertical"?a:!1},modifiers:[A.modifiers.restrictSize({min:{width:b.minInlineSize,height:b.minBlockSize},max:{width:b.maxInlineSize,height:b.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:p})=>{let S=n==="horizontal";this.updateSize(S?{block:p.height}:{inline:p.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(t=>t.layout=this.layout)}handleActionBarSlotChange(e){let t=L(e).filter(o=>o?.matches("calcite-action-bar"));this.actionBars=t,this.setActionBarsLayout(t)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?K.dragVertical:K.dragHorizontal}renderHeader(){return w("header",m`<div class=${s(r.contentHeader)} .hidden=${!this.hasHeader}><slot name=${U.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:t,resizable:o,layout:i,displayMode:l,resizeValues:a}=this,n=I(this.el),c=!e&&o?w("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${i==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${i=="horizontal"?a.maxBlockSize:a.maxInlineSize} .ariaValueMin=${i=="horizontal"?a.minBlockSize:a.minInlineSize} .ariaValueNow=${i=="horizontal"?a.blockSize:a.inlineSize} class=${s(r.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${C(this.setResizeHandleEl)}><div class=${s(r.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,h=()=>i==="horizontal"?t==="start"?u.calciteAnimateInDown:u.calciteAnimateInUp:n==="ltr"&&t==="end"||n==="rtl"&&t==="start"?u.calciteAnimateInLeft:u.calciteAnimateInRight,x=m`<div class=${s(r.contentContainer)}>${w("content",m`<div class=${s({[u.rtl]:n==="rtl",[r.content]:!0,[r.contentOverlay]:l==="overlay",[r.floatContent]:l==="float-content"||l==="float",[u.calciteAnimate]:l==="overlay",[h()]:l==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${C(this.contentRef)}>${this.renderHeader()}<div class=${s(r.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,z=[w("action-bar-container",m`<div class=${s(r.actionBarContainer)}><slot name=${U.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return t==="end"&&z.reverse(),m`<div class=${s({[r.container]:!0,[r.floatAll]:l==="float-all"})}>${z}</div>`}};M("calcite-shell-panel",R);export{R as ShellPanel};
3
+ v5.0.0-next.43 */
4
+ import{a as A}from"./ZNPCE7EG.js";import{a as H}from"./OX3M3D3N.js";import{a as w}from"./4474PI3Y.js";import{a as N}from"./26NNRW3V.js";import{a as P}from"./7RIJVHG3.js";import{D as v,e as I,t as O,u as L}from"./QODEYSFY.js";import"./5QYXEPPN.js";import{B as D,C,D as E,E as s,J as u,L as _,M as V,P as M,g as $,h as m,o as f}from"./FQKUJ55K.js";var T=B=>P(()=>{let e=(t,o,i)=>{if(t===void 0)return;let l=o==="block"?"block-size":"inline-size";if(t===null)return i.style.removeProperty(l),null;let a=t,n=B.getBounds?.()??{inline:{min:null,max:null},block:{min:null,max:null}},{min:c,max:h}=o==="inline"?n.inline:n.block;return c!==null&&(a=Math.round(Math.max(a,c))),h!==null&&(a=Math.round(Math.min(a,h))),i.style.setProperty(l,`${Math.round(a)}px`),a};return{resize(t){let o=B.targetElement.value,i=e(t.inline,"inline",o),l=e(t.block,"block",o);return{inline:i,block:l}}}}),Z=$`.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-right{animation-name:in-right}.calcite-animate__in-left{animation-name:in-left}.calcite-animate__in-scale{animation-name:in-scale}@keyframes in{0%{opacity:0}to{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0,-5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0,5px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-right{0%{opacity:0;transform:translate3D(-5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-left{0%{opacity:0;transform:translate3D(5px,0,0)}to{opacity:1;transform:translateZ(0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(.95,.95,1)}to{opacity:1;transform:scaleZ(1)}}`,r={container:"container",actionBarContainer:"action-bar-container",contentContainer:"content-container",content:"content",contentHeader:"content__header",contentBody:"content__body",contentOverlay:"content--overlay",floatAll:"float-all",floatContent:"float--content",resizeHandle:"resize-handle",resizeHandleBar:"resize-handle-bar"},U={actionBar:"action-bar",header:"header"},K={dragVertical:"drag-resize-vertical",dragHorizontal:"drag-resize-horizontal"},j=$`:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;z-index:var(--calcite-shell-panel-z-index, var(--calcite-z-index));--calcite-shell-panel-max-height: unset;--calcite-internal-shell-panel-shadow-block-start: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-block-end: 0 -4px 8px -1px rgba(0, 0, 0, .08), 0 -2px 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-start: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04)}.calcite--rtl.content--overlay{--calcite-internal-shell-panel-shadow-inline-start: -4px 0 8px -1px rgba(0, 0, 0, .08), -2px 0 4px -1px rgba(0, 0, 0, .04);--calcite-internal-shell-panel-shadow-inline-end: 4px 0 8px -1px rgba(0, 0, 0, .08), 2px 0 4px -1px rgba(0, 0, 0, .04)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index) + 1))}:host([layout=vertical][display-mode=overlay]){z-index:var(--calcite-shell-panel-z-index, calc(var(--calcite-z-index-header) + 1))}:host([layout=vertical][display-mode=float-all]) .content{flex:2}:host([layout=vertical]:not([display-mode=float-all])) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 300px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][display-mode=float-all]) .width-s{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 12vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical]:not([display-mode=float-all])) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 420px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][display-mode=float-all]) .width-m{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 20vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical]:not([display-mode=float-all])) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-max-width: var(--calcite-shell-panel-max-width, 680px);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=vertical][display-mode=float-all]) .width-l{--calcite-internal-shell-panel-width: var(--calcite-shell-panel-width, 45vw);--calcite-internal-shell-panel-min-width: var(--calcite-shell-panel-min-width, 340px)}:host([layout=horizontal]) .content{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 30vh)}:host([layout=horizontal]) .height-s{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 20vh)}:host([layout=horizontal]) .height-l{--calcite-internal-shell-panel-height: var(--calcite-shell-panel-height);--calcite-internal-shell-panel-min-height: var(--calcite-shell-panel-min-height, 5vh);--calcite-internal-shell-panel-max-height: var(--calcite-shell-panel-max-height, 40vh)}:host([display-mode=float-all][height=s]),:host([display-mode=float-all][height-scale=s]) .content{min-block-size:var(--calcite-shell-panel-height, 20vh)}:host([display-mode=float-all][height=m]),:host([display-mode=float-all][height-scale=m]) .content{min-block-size:var(--calcite-shell-panel-height, 30vh)}:host([display-mode=float-all][height=l]),:host([display-mode=float-all][height-scale=l]) .content{min-block-size:var(--calcite-shell-panel-height, 40vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;block-size:100%;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-shell-panel-text-color, var(--calcite-color-text-2))}.container *{box-sizing:border-box}.container.float-all{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-sm)}.float-all{max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) );box-shadow:var(--calcite-shell-panel-shadow, var(--calcite-shadow-sm));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));overflow:hidden}:host([layout=vertical][position=start]) .float-all{border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-panel-border-color, var(--calcite-color-border-3))}:host([layout=vertical][position=end]) .float-all{border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .float-all{border-inline:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-shell-panel-border-color, var(--calcite-color-border-3)))}:host([layout=horizontal]) .container{block-size:auto;inline-size:100%;flex-direction:column}.resize-handle{position:absolute;box-sizing:border-box;display:flex;-webkit-user-select:none;user-select:none;align-items:center;justify-content:center;outline:2px solid transparent;outline-offset:2px;--calcite-internal-shell-panel-resize-handle-offset: calc( (var(--calcite-size-fixed-xxl) - var(--calcite-size-fixed-sm-plus)) / 2 * -1 );z-index:var(--calcite-z-index-header)}.resize-handle:active .resize-handle-bar,.resize-handle:hover .resize-handle-bar{color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-text-1));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-foreground-3))}.resize-handle-bar{pointer-events:none;display:flex;align-items:center;justify-content:center;color:var(--calcite-shell-panel-resize-icon-color, var(--calcite-color-border-input));background-color:var(--calcite-shell-panel-resize-background-color, var(--calcite-color-background))}.resize-handle:focus .resize-handle-bar{outline-color:transparent;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)))}:host([position=start][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-end:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=start][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=vertical]) .resize-handle{inline-size:var(--calcite-size-fixed-xxl);inset-inline-start:var(--calcite-internal-shell-panel-resize-handle-offset);block-size:100%}:host([position=end][layout=vertical]) .resize-handle-bar{block-size:100%;inline-size:var(--calcite-size-fixed-sm-plus);border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=vertical]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=start][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-end:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=start][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-start:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-end-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-end-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}:host([position=end][layout=horizontal]) .resize-handle{block-size:var(--calcite-size-fixed-xxl);inline-size:100%;inset-block-start:var(--calcite-internal-shell-panel-resize-handle-offset)}:host([position=end][layout=horizontal]) .resize-handle-bar{inline-size:100%;block-size:var(--calcite-size-fixed-sm-plus);border-block-end:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=end][layout=horizontal]):host([display-mode^=float]) .resize-handle-bar{border-start-start-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));border-start-end-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round))}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}.action-bar-container{pointer-events:auto;box-sizing:border-box;display:flex;flex:1 1 auto}.content-container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:stretch;align-self:stretch}:host([layout=horizontal]) .action-bar-container,:host([layout=horizontal]) .content-container{flex-direction:column}.content{pointer-events:auto;position:relative;box-sizing:border-box;display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;padding:0;background-color:var(--calcite-shell-panel-background-color, var(--calcite-color-background));transition:max-block-size var(--calcite-animation-timing),max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]:not([display-mode=float-all])) .content{inline-size:var(--calcite-internal-shell-panel-width);max-inline-size:var(--calcite-internal-shell-panel-max-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=vertical][display-mode=float-all]) .content{inline-size:var(--calcite-internal-shell-panel-width);min-inline-size:var(--calcite-internal-shell-panel-min-width)}:host([layout=horizontal]) .content{block-size:var(--calcite-internal-shell-panel-height);max-block-size:var(--calcite-internal-shell-panel-max-height);min-block-size:var(--calcite-internal-shell-panel-min-height)}:host([resizable][layout=vertical][position=start]) .content{padding-inline-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=vertical][position=end]) .content{padding-inline-start:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=start]) .content{padding-block-end:var(--calcite-size-fixed-sm-plus)}:host([resizable][layout=horizontal][position=end]) .content{padding-block-start:var(--calcite-size-fixed-sm-plus)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--overlay{position:absolute;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow))}:host([layout=vertical]) .content--overlay{inset-block-start:0px;block-size:100%}:host([layout=horizontal]) .content--overlay{inset-inline-start:0px;inline-size:100%}:host([layout=vertical][position=start]) .content--overlay{inset-inline-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-start)}:host([layout=vertical][position=end]) .content--overlay{inset-inline-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-inline-end)}:host([layout=horizontal][position=start]) .content--overlay{inset-block-start:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-start)}:host([layout=horizontal][position=end]) .content--overlay{inset-block-end:100%;box-shadow:var(--calcite-internal-shell-panel-shadow-block-end)}.float--content{margin-block-end:auto;block-size:auto;overflow:hidden;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--calcite-shell-panel-shadow, var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)), var(--tw-shadow));border-radius:var(--calcite-shell-panel-corner-radius, var(--calcite-corner-radius-round));margin-inline:var(--calcite-spacing-sm);margin-block-start:var(--calcite-spacing-sm);max-block-size:var(--calcite-internal-shell-panel-max-height, calc(100% - 1rem) )}.float--content ::slotted(calcite-panel),.float--content ::slotted(calcite-flow){max-block-size:unset}:host([layout=horizontal]) .float--content{margin-block:var(--calcite-spacing-sm)}:host([position=start]) .float--content ::slotted(calcite-panel),:host([position=start]) .float--content ::slotted(calcite-flow),:host([position=end]) .float--content ::slotted(calcite-panel),:host([position=end]) .float--content ::slotted(calcite-flow){border-style:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border:var(--calcite-border-width-sm) solid var(--calcite-shell-border-color, var(--calcite-color-border-3))}:host([position=start]:not([slot=panel-end])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-flow),:host([position=start]:not([slot=panel-end])) .content ::slotted(calcite-panel),:host([position=end][slot=panel-start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end][slot=panel-start]) .content ::slotted(calcite-flow),:host([position=end][slot=panel-start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([resizable][layout=vertical]) .content ::slotted(calcite-flow),:host([resizable][layout=vertical]) .content ::slotted(calcite-panel){border-inline-start:none;border-inline-end:none}:host([resizable][layout=horizontal]) .content ::slotted(calcite-flow),:host([resizable][layout=horizontal]) .content ::slotted(calcite-panel){border-block-start:none;border-block-end:none}:host([position=end]:not([slot=panel-start])) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-flow),:host([position=end]:not([slot=panel-start])) .content ::slotted(calcite-panel),:host([position=start][slot=panel-end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start][slot=panel-end]) .content ::slotted(calcite-flow),:host([position=start][slot=panel-end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}:host([hidden]){display:none}[hidden]{display:none}`,R=class extends E{constructor(){super(...arguments),this.actionBars=[],this.contentRef=D(),this.messages=N(),this.sizeOverride=T({targetElement:this.contentRef,getBounds:()=>({inline:{min:this.resizeValues.minInlineSize,max:this.resizeValues.maxInlineSize},block:{min:this.resizeValues.minBlockSize,max:this.resizeValues.maxBlockSize}})}),this.resizeValues={inlineSize:null,blockSize:null,minInlineSize:null,minBlockSize:null,maxInlineSize:null,maxBlockSize:null},this.hasHeader=!1,this.collapsed=!1,this.displayMode="dock",this.layout="vertical",this.position="start",this.resizable=!1,this.widthScale="m",this.calciteInternalShellPanelResizeEnd=f({cancelable:!1}),this.calciteInternalShellPanelResizeStart=f({cancelable:!1}),this.calciteShellPanelCollapse=f({cancelable:!1}),this.calciteShellPanelExpand=f({cancelable:!1})}static{this.properties={resizeValues:[16,{},{state:!0}],hasHeader:[16,{},{state:!0}],collapsed:[7,{},{reflect:!0,type:Boolean}],displayMode:[3,{},{reflect:!0}],heightScale:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:[3,{},{reflect:!0}],resizable:[7,{},{reflect:!0,type:Boolean}],height:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=[j,Z]}async updateSize(e){this.updateSizeInternal(e)}willUpdate(e){e.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&this.setActionBarsLayout(this.actionBars),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteShellPanelCollapse.emit():this.calciteShellPanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.cleanupInteractions()}getContentElDOMRect(){return this.contentRef.value.getBoundingClientRect()}updateSizeInternal(e){if(!this.contentRef.value)return;let t=this.sizeOverride.resize(e);this.resizeValues={...this.resizeValues,...t.inline!==void 0&&{inlineSize:t.inline},...t.block!==void 0&&{blockSize:t.block}}}handleKeyDown(e){let{key:t,defaultPrevented:o,shiftKey:i}=e,{position:l,layout:a,resizable:n,contentRef:c,el:h,resizeValues:{maxBlockSize:x,maxInlineSize:y,minBlockSize:z,minInlineSize:g}}=this,k=[...a==="horizontal"?["ArrowUp","ArrowDown"]:["ArrowLeft","ArrowRight"],"Home","End"];if(!n||!c.value||o||!k.includes(t))return;let p=this.getContentElDOMRect(),S=I(h)==="rtl"?-1:1,d=i?V:_;switch(t){case"ArrowUp":this.updateSizeInternal({block:p.height+(a==="horizontal"&&l==="end"?d:-d)}),e.preventDefault();break;case"ArrowDown":this.updateSizeInternal({block:p.height+(a==="horizontal"&&l==="end"?-d:d)}),e.preventDefault();break;case"ArrowLeft":this.updateSizeInternal({inline:p.width+(a==="vertical"&&l==="end"?d:-d)*S}),e.preventDefault();break;case"ArrowRight":this.updateSizeInternal({inline:p.width+(a==="vertical"&&l==="end"?-d:d)*S}),e.preventDefault();break;case"Home":this.updateSizeInternal(a==="horizontal"?{block:z}:{inline:g}),e.preventDefault();break;case"End":this.updateSizeInternal(a==="horizontal"?{block:x}:{inline:y}),e.preventDefault();break}}cleanupInteractions(){this.interaction?.unset()}async setupInteractions(){this.cleanupInteractions();let{el:e,contentRef:t,resizable:o,position:i,collapsed:l,resizeHandleEl:a,layout:n}=this;if(!t.value||l||!o||!a)return;await this.el.componentOnReady();let{inlineSize:c,minInlineSize:h,blockSize:x,minBlockSize:y,maxInlineSize:z,maxBlockSize:g}=window.getComputedStyle(t.value),b={inlineSize:v(c),blockSize:v(x),minInlineSize:v(h),minBlockSize:v(y),maxInlineSize:v(z)||window.innerWidth,maxBlockSize:v(g)||window.innerHeight};this.resizeValues=b;let k=I(e)==="rtl";this.interaction=A(t.value,{context:e.ownerDocument}).resizable({edges:{top:i==="end"&&n==="horizontal"?a:!1,right:i===(k?"end":"start")&&n==="vertical"?a:!1,bottom:i==="start"&&n==="horizontal"?a:!1,left:i===(k?"start":"end")&&n==="vertical"?a:!1},modifiers:[A.modifiers.restrictSize({min:{width:b.minInlineSize,height:b.minBlockSize},max:{width:b.maxInlineSize,height:b.maxBlockSize}})],listeners:{resizestart:()=>{this.calciteInternalShellPanelResizeStart.emit()},resizeend:()=>{this.calciteInternalShellPanelResizeEnd.emit()},move:({rect:p})=>{let S=n==="horizontal";this.updateSize(S?{block:p.height}:{inline:p.width})}}})}setResizeHandleEl(e){this.resizeHandleEl=e,this.setupInteractions()}setActionBarsLayout(e){e.forEach(t=>t.layout=this.layout)}handleActionBarSlotChange(e){let t=L(e).filter(o=>o?.matches("calcite-action-bar"));this.actionBars=t,this.setActionBarsLayout(t)}handleHeaderSlotChange(e){this.hasHeader=O(e)}getResizeIcon(){let{layout:e}=this;return e==="horizontal"?K.dragVertical:K.dragHorizontal}renderHeader(){return w("header",m`<div class=${s(r.contentHeader)} .hidden=${!this.hasHeader}><slot name=${U.header} @slotchange=${this.handleHeaderSlotChange}></slot></div>`)}render(){let{collapsed:e,position:t,resizable:o,layout:i,displayMode:l,resizeValues:a}=this,n=I(this.el),c=!e&&o?w("resize-handle",m`<div .ariaLabel=${this.messages.resize} .ariaOrientation=${i==="horizontal"?"vertical":"horizontal"} .ariaValueMax=${i=="horizontal"?a.maxBlockSize:a.maxInlineSize} .ariaValueMin=${i=="horizontal"?a.minBlockSize:a.minInlineSize} .ariaValueNow=${i=="horizontal"?a.blockSize:a.inlineSize} class=${s(r.resizeHandle)} @keydown=${this.handleKeyDown} role=separator tabindex=0 touch-action=none ${C(this.setResizeHandleEl)}><div class=${s(r.resizeHandleBar)}><calcite-icon .icon=${this.getResizeIcon()} scale=s></calcite-icon></div></div>`):null,h=()=>i==="horizontal"?t==="start"?u.calciteAnimateInDown:u.calciteAnimateInUp:n==="ltr"&&t==="end"||n==="rtl"&&t==="start"?u.calciteAnimateInLeft:u.calciteAnimateInRight,x=m`<div class=${s(r.contentContainer)}>${w("content",m`<div class=${s({[u.rtl]:n==="rtl",[r.content]:!0,[r.contentOverlay]:l==="overlay",[r.floatContent]:l==="float-content"||l==="float",[u.calciteAnimate]:l==="overlay",[h()]:l==="overlay",[H("width",this.width,this.widthScale)]:!!(this.width||this.widthScale),[H("height",this.height,this.heightScale)]:!!(this.height||this.heightScale)})} .hidden=${e} ${C(this.contentRef)}>${this.renderHeader()}<div class=${s(r.contentBody)}><slot></slot></div>${c}</div>`)}</div>`,z=[w("action-bar-container",m`<div class=${s(r.actionBarContainer)}><slot name=${U.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`),x];return t==="end"&&z.reverse(),m`<div class=${s({[r.container]:!0,[r.floatAll]:l==="float-all"})}>${z}</div>`}};M("calcite-shell-panel",R);export{R as ShellPanel};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{b as p}from"./H3HDJ3L5.js";var O="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),w=new Set(O),g="en",L={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"};var C=e=>{let[t,n]=e.split("-"),s=t.toLowerCase(),r=s;return n&&(r=`${s}-${n.toUpperCase()}`),r=L[r]??r,w.has(r)?r:n?C(s):g};var A=new RegExp("\\.(0+)?$"),x=new RegExp("0+$"),m=class e{static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(t){if(t instanceof e)return t;let[n,s]=k(t).split(".").concat("");this.value=BigInt(n+s.padEnd(e.DECIMALS,"0").slice(0,e.DECIMALS))+BigInt(e.ROUNDED&&s[e.DECIMALS]>="5"),this.isNegative=t.charAt(0)==="-"}static{this._divRound=(t,n)=>e.fromBigInt(t/n+(e.ROUNDED?t*BigInt(2)/n%BigInt(2):BigInt(0)))}static{this.fromBigInt=t=>Object.assign(Object.create(e.prototype),{value:t,isNegative:t<BigInt(0)})}getIntegersAndDecimals(){let t=this.value.toString().replace("-","").padStart(e.DECIMALS+1,"0"),n=t.slice(0,-e.DECIMALS),s=t.slice(-e.DECIMALS).replace(x,"");return{integers:n,decimals:s}}toString(){let{integers:t,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${t}${n.length?"."+n:""}`}formatToParts(t){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),r=t.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&r.unshift({type:"minusSign",value:t.minusSign}),s.length&&(r.push({type:"decimal",value:t.decimal}),s.split("").forEach(i=>r.push({type:"fraction",value:i}))),r}format(t){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),r=`${this.isNegative?t.minusSign:""}${t.numberFormatter.format(BigInt(n))}`,i=s.length?`${t.decimal}${s.split("").map(u=>t.numberFormatter.format(Number(u))).join("")}`:"";return`${r}${i}`}add(t){return e.fromBigInt(this.value+new e(t).value)}subtract(t){return e.fromBigInt(this.value-new e(t).value)}multiply(t){return e._divRound(this.value*new e(t).value,e.SHIFT)}divide(t){return e._divRound(this.value*e.SHIFT,new e(t).value)}};function $(e){return!(!e||isNaN(Number(e)))}function q(e){return!e||!z(e)?"":h(e,t=>{let n=!1,s=t.split("").filter((r,i)=>r.match(/\./g)&&!n?(n=!0,!0):r.match(/-/g)&&i===0?!0:p.includes(r)).join("");return $(s)?new m(s).toString():""})}var y=/^([-0])0+(?=\d)/,T=/(?!^\.)\.$/,_=/(?!^-)-/g,j=/^-\b0\b\.?0*$/,B=/0*$/,M=new Set(["e","E","-",",",".",...p]),W=e=>{let t=Array.from(e).filter(n=>M.has(n)).join("");return h(t,n=>{let s=n.replace(_,"").replace(T,"").replace(y,"$1");return $(s)?j.test(s)?s:P(s):n})};function P(e){let t=e.split(".")[1],n=new m(e).toString(),[s,r]=n.split(".");return t&&r!==t?`${s}.${t}`:n}function h(e,t){if(!e)return e;let n=e.toLowerCase().indexOf("e")+1;return n?e.replace(/[eE]*$/g,"").substring(0,n).concat(e.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,r)=>t(r===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):t(e)}function k(e){let t=e.split(/[eE]/);if(t.length===1)return e;let n=+e;if(Number.isSafeInteger(n))return`${n}`;let s=e.charAt(0)==="-",r=+t[1],i=t[0].split("."),u=(s?i[0].substring(1):i[0])||"",S=i[1]||"",N=(a,o)=>{let c=Math.abs(o)-a.length,d=c>0?`${"0".repeat(c)}${a}`:a;return`${d.slice(0,o)}.${d.slice(o)}`},E=(a,o)=>{let c=o>a.length?`${a}${"0".repeat(o-a.length)}`:a;return`${c.slice(0,o)}.${c.slice(o)}`},v=r>0?`${u}${E(S,r)}`:`${N(u,r)}${S}`;return`${s?"-":""}${v.charAt(0)==="."?"0":""}${v.replace(A,"").replace(y,"")}`}function z(e){return p.some(t=>e.includes(t))}function X(e,t,n){let s=t.split(".")[1];if(s){let r=s.match(B)[0];if(r&&n.delocalize(e).length!==t.length&&s.indexOf("e")===-1){let i=n.decimal;return e=e.includes(i)?e:`${e}${i}`,e.padEnd(e.length+r.length,n.localize("0"))}}return e}var Q=new Map(Object.entries({bg:{am:"\u043F\u0440.\u043E\u0431.",pm:"\u0441\u043B.\u043E\u0431."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a.\xA0m.",pm:"p.\xA0m."},cs:{am:"dop.",pm:"odp."},es:{am:"a.\xA0m.",pm:"p.\xA0m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",pm:"\u05D0\u05D7\u05D4\u05F4\u05E6"},hu:{am:"de. ",pm:"du."},lt:{am:"prie\u0161piet",pm:"popiet"},lv:{am:"priek\u0161pusdien\u0101",pm:"p\u0113cpusdien\u0101"},mk:{am:"\u043F\u0440\u0435\u0442\u043F\u043B.",pm:"\u043F\u043E\u043F\u043B."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manh\xE3",pm:"da tarde"},"pt-PT":{am:"da manh\xE3",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",pm:"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},tr:{am:"\xD6\xD6",pm:"\xD6S"},uk:{am:"\u0434\u043F",pm:"\u043F\u043F"},vi:{am:"SA",pm:"CH"}})),R=["arab","arabext","latn"],F=e=>R.includes(e),f=new Intl.NumberFormat().resolvedOptions().numberingSystem,I=f==="arab"||!F(f)?"latn":f,H=e=>F(e)?e:I;function V(e){switch(e){case"it-CH":return"de-CH";case"bs":return"sr-Latn-CS";default:return e}}var b=class{constructor(){this.delocalize=t=>this._numberFormatOptions?h(t,n=>n.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)):t,this.localize=t=>this._numberFormatOptions?h(t,n=>$(n.trim())?new m(n.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):n):t}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(t){if(t.numberingSystem=H(t?.numberingSystem),t.locale=t?.locale||g,!this._numberFormatOptions&&t.locale===g&&t.numberingSystem===I&&Object.keys(t).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(t))return;this._numberFormatOptions=t,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();let n=new Map(this._digits.map((r,i)=>[r,i])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1);this._actualGroup=s.find(r=>r.type==="group").value,this._group=this._actualGroup.trim().length===0||this._actualGroup==" "?"\xA0":this._actualGroup,this._decimal=t.locale==="bs"||t.locale==="mk"?",":s.find(r=>r.type==="decimal").value,this._minusSign=s.find(r=>r.type==="minusSign").value,this._getDigitIndex=r=>n.get(r)}},Y=new b,l,D;function Z(e={}){return Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(t=>`${t[0]}-${t[1]}`).flat().join(":")}function tt(e,t){l||(l=new Map),D!==e&&(l.clear(),D=e);let n=Z(t),s=l.get(n);if(s)return s;let r=new Intl.DateTimeFormat(e,t);return l.set(n,r),r}export{w as a,g as b,C as c,m as d,$ as e,q as f,W as g,X as h,Q as i,H as j,V as k,b as l,Y as m,tt as n};
3
+ v5.0.0-next.43 */
4
+ import{b as p}from"./CF3PBS3G.js";var O="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),w=new Set(O),g="en",L={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"};var C=e=>{let[t,n]=e.split("-"),s=t.toLowerCase(),r=s;return n&&(r=`${s}-${n.toUpperCase()}`),r=L[r]??r,w.has(r)?r:n?C(s):g};var A=new RegExp("\\.(0+)?$"),x=new RegExp("0+$"),m=class e{static{this.DECIMALS=100}static{this.ROUNDED=!0}static{this.SHIFT=BigInt("1"+"0".repeat(this.DECIMALS))}constructor(t){if(t instanceof e)return t;let[n,s]=k(t).split(".").concat("");this.value=BigInt(n+s.padEnd(e.DECIMALS,"0").slice(0,e.DECIMALS))+BigInt(e.ROUNDED&&s[e.DECIMALS]>="5"),this.isNegative=t.charAt(0)==="-"}static{this._divRound=(t,n)=>e.fromBigInt(t/n+(e.ROUNDED?t*BigInt(2)/n%BigInt(2):BigInt(0)))}static{this.fromBigInt=t=>Object.assign(Object.create(e.prototype),{value:t,isNegative:t<BigInt(0)})}getIntegersAndDecimals(){let t=this.value.toString().replace("-","").padStart(e.DECIMALS+1,"0"),n=t.slice(0,-e.DECIMALS),s=t.slice(-e.DECIMALS).replace(x,"");return{integers:n,decimals:s}}toString(){let{integers:t,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${t}${n.length?"."+n:""}`}formatToParts(t){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),r=t.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&r.unshift({type:"minusSign",value:t.minusSign}),s.length&&(r.push({type:"decimal",value:t.decimal}),s.split("").forEach(i=>r.push({type:"fraction",value:i}))),r}format(t){let{integers:n,decimals:s}=this.getIntegersAndDecimals(),r=`${this.isNegative?t.minusSign:""}${t.numberFormatter.format(BigInt(n))}`,i=s.length?`${t.decimal}${s.split("").map(u=>t.numberFormatter.format(Number(u))).join("")}`:"";return`${r}${i}`}add(t){return e.fromBigInt(this.value+new e(t).value)}subtract(t){return e.fromBigInt(this.value-new e(t).value)}multiply(t){return e._divRound(this.value*new e(t).value,e.SHIFT)}divide(t){return e._divRound(this.value*e.SHIFT,new e(t).value)}};function $(e){return!(!e||isNaN(Number(e)))}function q(e){return!e||!z(e)?"":h(e,t=>{let n=!1,s=t.split("").filter((r,i)=>r.match(/\./g)&&!n?(n=!0,!0):r.match(/-/g)&&i===0?!0:p.includes(r)).join("");return $(s)?new m(s).toString():""})}var y=/^([-0])0+(?=\d)/,T=/(?!^\.)\.$/,_=/(?!^-)-/g,j=/^-\b0\b\.?0*$/,B=/0*$/,M=new Set(["e","E","-",",",".",...p]),W=e=>{let t=Array.from(e).filter(n=>M.has(n)).join("");return h(t,n=>{let s=n.replace(_,"").replace(T,"").replace(y,"$1");return $(s)?j.test(s)?s:P(s):n})};function P(e){let t=e.split(".")[1],n=new m(e).toString(),[s,r]=n.split(".");return t&&r!==t?`${s}.${t}`:n}function h(e,t){if(!e)return e;let n=e.toLowerCase().indexOf("e")+1;return n?e.replace(/[eE]*$/g,"").substring(0,n).concat(e.slice(n).replace(/[eE]/g,"")).split(/[eE]/).map((s,r)=>t(r===1?s.replace(/\./g,""):s)).join("e").replace(/^e/,"1e"):t(e)}function k(e){let t=e.split(/[eE]/);if(t.length===1)return e;let n=+e;if(Number.isSafeInteger(n))return`${n}`;let s=e.charAt(0)==="-",r=+t[1],i=t[0].split("."),u=(s?i[0].substring(1):i[0])||"",S=i[1]||"",N=(a,o)=>{let c=Math.abs(o)-a.length,d=c>0?`${"0".repeat(c)}${a}`:a;return`${d.slice(0,o)}.${d.slice(o)}`},E=(a,o)=>{let c=o>a.length?`${a}${"0".repeat(o-a.length)}`:a;return`${c.slice(0,o)}.${c.slice(o)}`},v=r>0?`${u}${E(S,r)}`:`${N(u,r)}${S}`;return`${s?"-":""}${v.charAt(0)==="."?"0":""}${v.replace(A,"").replace(y,"")}`}function z(e){return p.some(t=>e.includes(t))}function X(e,t,n){let s=t.split(".")[1];if(s){let r=s.match(B)[0];if(r&&n.delocalize(e).length!==t.length&&s.indexOf("e")===-1){let i=n.decimal;return e=e.includes(i)?e:`${e}${i}`,e.padEnd(e.length+r.length,n.localize("0"))}}return e}var Q=new Map(Object.entries({bg:{am:"\u043F\u0440.\u043E\u0431.",pm:"\u0441\u043B.\u043E\u0431."},bs:{am:"prijepodne",pm:"popodne"},ca:{am:"a.\xA0m.",pm:"p.\xA0m."},cs:{am:"dop.",pm:"odp."},es:{am:"a.\xA0m.",pm:"p.\xA0m."},"es-mx":{am:"a.m.",pm:"p.m."},"es-MX":{am:"a.m.",pm:"p.m."},fi:{am:"ap.",pm:"ip."},he:{am:"\u05DC\u05E4\u05E0\u05D4\u05F4\u05E6",pm:"\u05D0\u05D7\u05D4\u05F4\u05E6"},hu:{am:"de. ",pm:"du."},lt:{am:"prie\u0161piet",pm:"popiet"},lv:{am:"priek\u0161pusdien\u0101",pm:"p\u0113cpusdien\u0101"},mk:{am:"\u043F\u0440\u0435\u0442\u043F\u043B.",pm:"\u043F\u043E\u043F\u043B."},no:{am:"a.m.",pm:"p.m."},nl:{am:"a.m.",pm:"p.m."},"pt-pt":{am:"da manh\xE3",pm:"da tarde"},"pt-PT":{am:"da manh\xE3",pm:"da tarde"},ro:{am:"a.m.",pm:"p.m."},sl:{am:"dop.",pm:"pop."},sv:{am:"fm",pm:"em"},th:{am:"\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07",pm:"\u0E2B\u0E25\u0E31\u0E07\u0E40\u0E17\u0E35\u0E48\u0E22\u0E07"},tr:{am:"\xD6\xD6",pm:"\xD6S"},uk:{am:"\u0434\u043F",pm:"\u043F\u043F"},vi:{am:"SA",pm:"CH"}})),R=["arab","arabext","latn"],F=e=>R.includes(e),f=new Intl.NumberFormat().resolvedOptions().numberingSystem,I=f==="arab"||!F(f)?"latn":f,H=e=>F(e)?e:I;function V(e){switch(e){case"it-CH":return"de-CH";case"bs":return"sr-Latn-CS";default:return e}}var b=class{constructor(){this.delocalize=t=>this._numberFormatOptions?h(t,n=>n.replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex)):t,this.localize=t=>this._numberFormatOptions?h(t,n=>$(n.trim())?new m(n.trim()).format(this).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):n):t}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(t){if(t.numberingSystem=H(t?.numberingSystem),t.locale=t?.locale||g,!this._numberFormatOptions&&t.locale===g&&t.numberingSystem===I&&Object.keys(t).length===2||JSON.stringify(this._numberFormatOptions)===JSON.stringify(t))return;this._numberFormatOptions=t,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();let n=new Map(this._digits.map((r,i)=>[r,i])),s=new Intl.NumberFormat(this._numberFormatOptions.locale,{numberingSystem:this._numberFormatOptions.numberingSystem}).formatToParts(-123456789e-1);this._actualGroup=s.find(r=>r.type==="group").value,this._group=this._actualGroup.trim().length===0||this._actualGroup==" "?"\xA0":this._actualGroup,this._decimal=t.locale==="bs"||t.locale==="mk"?",":s.find(r=>r.type==="decimal").value,this._minusSign=s.find(r=>r.type==="minusSign").value,this._getDigitIndex=r=>n.get(r)}},Y=new b,l,D;function Z(e={}){return Object.entries(e).sort(([t],[n])=>t.localeCompare(n)).map(t=>`${t[0]}-${t[1]}`).flat().join(":")}function tt(e,t){l||(l=new Map),D!==e&&(l.clear(),D=e);let n=Z(t),s=l.get(n);if(s)return s;let r=new Intl.DateTimeFormat(e,t);return l.set(n,r),r}export{w as a,g as b,C as c,m as d,$ as e,q as f,W as g,X as h,Q as i,H as j,V as k,b as l,Y as m,tt as n};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{a as i,b as t,c as e,d as n}from"./BZ4A65YS.js";var r={width:{medium:a(n.max),small:a(e.max),xsmall:a(t.max),xxsmall:a(i.max)}};function a(s){return parseInt(s)}export{r as a};
3
+ v5.0.0-next.43 */
4
+ import{a as i,b as t,c as e,d as n}from"./7L4KTY56.js";var r={width:{medium:a(n.max),small:a(e.max),xsmall:a(t.max),xxsmall:a(i.max)}};function a(s){return parseInt(s)}export{r as a};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{a as o}from"./RXRWJBOA.js";import"./4J4YCOVT.js";async function m(){return o.sort().map(r=>({label:r}))}export{m as groupByName};
3
+ v5.0.0-next.43 */
4
+ import{a as o}from"./NED4AECK.js";import"./JJEJHMVX.js";async function m(){return o.sort().map(r=>({label:r}))}export{m as groupByName};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{a as m}from"./SSZFTAS3.js";import{a as p}from"./F5YXINZP.js";import"./UFWMXGBP.js";import{y as i}from"./VNFP6MLN.js";import"./2CES2KCJ.js";import{C as r,D as n,E as d,P as h,g as l,h as c,o}from"./A2G7MUU7.js";var u={container:"container"},f=l`: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{box-sizing:border-box;display:inline-block}:host ::slotted(calcite-tile){margin-block-end:var(--calcite-spacing-px);margin-inline-end:var(--calcite-spacing-px)}.container{display:grid;grid-auto-rows:minmax(auto,1fr);grid-auto-flow:column}:host([scale=s]) .container{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}:host([scale=m]) .container{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}:host([scale=l]) .container{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}:host([layout=vertical]) .container{display:flex;flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.items=[],this.mutationObserver=p("mutation",()=>this.updateTiles()),this.interactiveContainer=m(this),this.alignment="start",this.disabled=!1,this.layout="horizontal",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.calciteTileGroupSelect=o({cancelable:!1}),this.listen("calciteInternalTileKeyEvent",this.calciteInternalTileKeyEventListener),this.listen("calciteTileSelect",this.calciteTileSelectHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=f}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateTiles()}willUpdate(e){(e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon"))&&this.updateTiles()}loaded(){this.updateSelectedItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getSlottedTiles(){return this.slotEl?.assignedElements({flatten:!0}).filter(e=>e?.matches("calcite-tile"))}selectItem(e){e&&(this.items?.forEach(t=>{let s=e===t;switch(this.selectionMode){case"multiple":s&&(t.selected=!t.selected);break;case"single":t.selected=s&&!t.selected;break;case"single-persist":t.selected=!!s;break}}),this.updateSelectedItems(),this.calciteTileGroupSelect.emit())}setSlotEl(e){this.slotEl=e}updateSelectedItems(){let e=this.items?.filter(t=>t.selected);(this.selectionMode==="single"||this.selectionMode==="single-persist")&&e?.length>1?(this.selectedItems=[e.pop()],this.items?.forEach(t=>{this.selectedItems.indexOf(t)===-1&&(t.selected=!1)})):this.selectedItems=e??[]}updateTiles(){this.items=this.getSlottedTiles(),this.items?.forEach(e=>{e.alignment=this.alignment,e.interactive=!0,e.layout=this.layout,e.scale=this.scale,e.selectionAppearance=this.selectionAppearance,e.selectionMode=this.selectionMode}),this.updateSelectedItems()}calciteInternalTileKeyEventListener(e){if(e.composedPath().includes(this.el)){e.preventDefault(),e.stopPropagation();let t=this.items?.filter(s=>!s.disabled);switch(e.detail.key){case"ArrowDown":case"ArrowRight":i(t,e.detail.target,"next",!0,!1);break;case"ArrowUp":case"ArrowLeft":i(t,e.detail.target,"previous",!0,!1);break;case"Home":i(t,e.detail.target,"first",!0,!1);break;case"End":i(t,e.detail.target,"last",!0,!1);break}}}calciteTileSelectHandler(e){e.composedPath().includes(this.el)&&this.selectItem(e.target)}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaLabel=${this.label} class=${d(u.container)} .role=${e}><slot @slotchange=${this.updateTiles} ${r(this.setSlotEl)}></slot></div>`})}};h("calcite-tile-group",a);export{a as TileGroup};
3
+ v5.0.0-next.43 */
4
+ import{a as m}from"./6HUGADED.js";import{a as p}from"./CX673EPC.js";import"./7RIJVHG3.js";import{y as i}from"./QODEYSFY.js";import"./5QYXEPPN.js";import{C as r,D as n,E as d,P as h,g as l,h as c,o}from"./FQKUJ55K.js";var u={container:"container"},f=l`: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{box-sizing:border-box;display:inline-block}:host ::slotted(calcite-tile){margin-block-end:var(--calcite-spacing-px);margin-inline-end:var(--calcite-spacing-px)}.container{display:grid;grid-auto-rows:minmax(auto,1fr);grid-auto-flow:column}:host([scale=s]) .container{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}:host([scale=m]) .container{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}:host([scale=l]) .container{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}:host([layout=vertical]) .container{display:flex;flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(),this.items=[],this.mutationObserver=p("mutation",()=>this.updateTiles()),this.interactiveContainer=m(this),this.alignment="start",this.disabled=!1,this.layout="horizontal",this.scale="m",this.selectedItems=[],this.selectionAppearance="icon",this.selectionMode="none",this.calciteTileGroupSelect=o({cancelable:!1}),this.listen("calciteInternalTileKeyEvent",this.calciteInternalTileKeyEventListener),this.listen("calciteTileSelect",this.calciteTileSelectHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=f}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0}),this.updateTiles()}willUpdate(e){(e.has("scale")&&(this.hasUpdated||this.scale!=="m")||e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="none")||e.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="icon"))&&this.updateTiles()}loaded(){this.updateSelectedItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getSlottedTiles(){return this.slotEl?.assignedElements({flatten:!0}).filter(e=>e?.matches("calcite-tile"))}selectItem(e){e&&(this.items?.forEach(t=>{let s=e===t;switch(this.selectionMode){case"multiple":s&&(t.selected=!t.selected);break;case"single":t.selected=s&&!t.selected;break;case"single-persist":t.selected=!!s;break}}),this.updateSelectedItems(),this.calciteTileGroupSelect.emit())}setSlotEl(e){this.slotEl=e}updateSelectedItems(){let e=this.items?.filter(t=>t.selected);(this.selectionMode==="single"||this.selectionMode==="single-persist")&&e?.length>1?(this.selectedItems=[e.pop()],this.items?.forEach(t=>{this.selectedItems.indexOf(t)===-1&&(t.selected=!1)})):this.selectedItems=e??[]}updateTiles(){this.items=this.getSlottedTiles(),this.items?.forEach(e=>{e.alignment=this.alignment,e.interactive=!0,e.layout=this.layout,e.scale=this.scale,e.selectionAppearance=this.selectionAppearance,e.selectionMode=this.selectionMode}),this.updateSelectedItems()}calciteInternalTileKeyEventListener(e){if(e.composedPath().includes(this.el)){e.preventDefault(),e.stopPropagation();let t=this.items?.filter(s=>!s.disabled);switch(e.detail.key){case"ArrowDown":case"ArrowRight":i(t,e.detail.target,"next",!0,!1);break;case"ArrowUp":case"ArrowLeft":i(t,e.detail.target,"previous",!0,!1);break;case"Home":i(t,e.detail.target,"first",!0,!1);break;case"End":i(t,e.detail.target,"last",!0,!1);break}}}calciteTileSelectHandler(e){e.composedPath().includes(this.el)&&this.selectItem(e.target)}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:c`<div .ariaLabel=${this.label} class=${d(u.container)} .role=${e}><slot @slotchange=${this.updateTiles} ${r(this.setSlotEl)}></slot></div>`})}};h("calcite-tile-group",a);export{a as TileGroup};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
3
+ v5.0.0-next.43 */
4
4
  var r=["date","datetime-local","month","number","range","time","week"],x=["email","password","search","tel","text","url"],u=["email","password","search","tel","text","textarea","url"];function a(e,n,t,c){let s=t.toLowerCase(),i=e[t];c&&i!=null?n.setAttribute(s,`${i}`):n.removeAttribute(s)}function m(e,n,t){t.type=e==="textarea"?"text":e;let c=r.includes(e),s=n;a(s,t,"min",c),a(s,t,"max",c),a(s,t,"step",c);let i=u.includes(e),o=n;a(o,t,"minLength",i),a(o,t,"maxLength",i);let l=x.includes(e);a(o,t,"pattern",l)}export{m as a};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{c as S,d as T,e as O}from"./CTND4VRI.js";import{b as i,c as w}from"./2PWTOMF5.js";import{a as z,b as $,d as E}from"./KOL2RUNY.js";import{a as C}from"./SSZFTAS3.js";import{a as c,b as f}from"./F5YXINZP.js";import{a as y}from"./V6OVMX6A.js";import{a as x}from"./MXA4BVE4.js";import{a as l}from"./FVEXGCGW.js";import{c as k}from"./UFWMXGBP.js";import{s as m}from"./VNFP6MLN.js";import"./2CES2KCJ.js";import{B as p,C as r,D as h,E as a,I as v,P as g,g as b,h as o,l as n}from"./A2G7MUU7.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`: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;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color-hover, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color-focus, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color-press, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=k(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.interactiveContainer=C(this),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),S(this),this.formEl=E(this)}async load(){this.updateHasContent()}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=m(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?z(this):t==="reset"&&$(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?i`a`:i`button`,R=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,F=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${l(this.scale)}></calcite-icon>`,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${l(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return this.interactiveContainer({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:O(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${R}${this.iconStart?F:null}${this.hasContent?j:null}${this.iconEnd?L:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
3
+ v5.0.0-next.43 */
4
+ import{c as S,d as T,e as O}from"./KELM3AL5.js";import{b as i,c as w}from"./UEJZPZW2.js";import{a as z,b as $,d as E}from"./7NBM4EOH.js";import{a as C}from"./6HUGADED.js";import{a as c,b as f}from"./CX673EPC.js";import{a as y}from"./26NNRW3V.js";import{a as x}from"./VNZFJTEW.js";import{a as l}from"./3GITZ4DI.js";import{c as k}from"./7RIJVHG3.js";import{s as m}from"./QODEYSFY.js";import"./5QYXEPPN.js";import{B as p,C as r,D as h,E as a,I as v,P as g,g as b,h as o,l as n}from"./FQKUJ55K.js";var e={buttonLoader:"calcite-button--loader",content:"content",contentSlotted:"content--slotted",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",loadingIn:"loading-in",loadingOut:"loading-out",iconStartEmpty:"icon-start-empty",iconEndEmpty:"icon-end-empty",buttonPadding:"button-padding",buttonPaddingShrunk:"button-padding--shrunk"},A=b`: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;inline-size:auto;vertical-align:middle;border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0))}:host a,:host button{--calcite-internal-button-content-margin: .5rem;--calcite-internal-button-padding-x: 7px;--calcite-internal-button-padding-y: 3px;position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;appearance:none;align-items:center;justify-content:center;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;outline-color:transparent;box-shadow:var(--calcite-button-shadow, var(--calcite-shadow-none));background-color:var(--calcite-button-background-color, var(--calcite-internal-button-background-color, var(--calcite-color-transparent)));border-block-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-block-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-block-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-start-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-start-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-inline-end-color:var(--calcite-button-border-color, var(--calcite-internal-button-border-inline-end-color, var(--calcite-internal-button-border-color, var(--calcite-color-transparent))));border-style:solid;border-width:var(--calcite-border-width-sm);border-radius:var(--calcite-button-corner-radius, var(--calcite-internal-button-corner-radius, 0));color:var(--calcite-button-text-color, var(--calcite-internal-button-text-color, currentColor));padding-block:var(--calcite-internal-button-padding-y);padding-inline:var(--calcite-internal-button-padding-x);transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,box-shadow var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host a:hover,:host button:hover{text-decoration-line:none;background-color:var(--calcite-button-background-color-hover, var(--calcite-internal-button-background-color-hover, var(--calcite-color-transparent)))}:host a:focus,:host button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));background-color:var(--calcite-button-background-color-focus, var(--calcite-internal-button-background-color))}:host a:active,:host button:active{background-color:var(--calcite-button-background-color-press, var(--calcite-internal-button-background-color-press, var(--calcite-color-transparent)))}:host a span,:host button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host a calcite-loader,:host button calcite-loader{color:var(--calcite-button-loader-color, var(--calcite-internal-button-loader-color, var(--calcite-button-text-color, var(--calcite-internal-button-text-color))))}:host([round]){--calcite-internal-button-corner-radius: 50px}.content{margin-inline:var(--calcite-internal-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-content-margin: .75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-internal-button-content-margin: 1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-internal-button-content-margin)}.icon--start,.icon--end{color:var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(.5)}to{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}to{inline-size:0;opacity:0;transform:scale(.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-internal-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{--calcite-internal-button-border-color: var(--calcite-color-transparent);border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([kind=brand]){--calcite-internal-button-background-color: var(--calcite-color-brand);--calcite-internal-button-background-color-hover: var(--calcite-color-brand-hover);--calcite-internal-button-background-color-press: var(--calcite-color-brand-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=danger]){--calcite-internal-button-background-color: var(--calcite-color-status-danger);--calcite-internal-button-background-color-hover: var(--calcite-color-status-danger-hover);--calcite-internal-button-background-color-press: var(--calcite-color-status-danger-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([kind=neutral]){--calcite-internal-button-background-color: var(--calcite-color-foreground-3);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1);--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([kind=inverse]){--calcite-internal-button-background-color: var(--calcite-color-inverse);--calcite-internal-button-background-color-hover: var(--calcite-color-inverse-hover);--calcite-internal-button-background-color-press: var(--calcite-color-inverse-press);--calcite-internal-button-loader-color: var(--calcite-color-text-inverse);--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([appearance=outline-fill]){--calcite-internal-button-background-color: var(--calcite-color-foreground-1);--calcite-internal-button-background-color-hover: var(--calcite-color-foreground-2);--calcite-internal-button-background-color-press: var(--calcite-color-foreground-3)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline-fill][kind=brand]) button,:host([appearance=outline-fill][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:hover,:host([appearance=outline-fill][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline-fill][kind=brand]) button:focus,:host([appearance=outline-fill][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=brand]) button:active,:host([appearance=outline-fill][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline-fill][kind=brand]) button calcite-loader,:host([appearance=outline-fill][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline-fill][kind=danger]) button,:host([appearance=outline-fill][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:hover,:host([appearance=outline-fill][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline-fill][kind=danger]) button:focus,:host([appearance=outline-fill][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=danger]) button:active,:host([appearance=outline-fill][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline-fill][kind=danger]) button calcite-loader,:host([appearance=outline-fill][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline-fill][kind=neutral]) button,:host([appearance=outline-fill][kind=neutral]) a{--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=neutral]) button:hover,:host([appearance=outline-fill][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline-fill][kind=neutral]) button:focus,:host([appearance=outline-fill][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline-fill][kind=neutral]) button:active,:host([appearance=outline-fill][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=solid][kind=neutral]){--calcite-internal-button-background-color-hover: var(--calcite-color-border-2);--calcite-internal-button-background-color-press: var(--calcite-color-border-1)}:host([appearance=outline-fill][kind=inverse]) button,:host([appearance=outline-fill][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline-fill][kind=inverse]) button:hover,:host([appearance=outline-fill][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline-fill][kind=inverse]) button:focus,:host([appearance=outline-fill][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline-fill][kind=inverse]) button:active,:host([appearance=outline-fill][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-style:solid;border-width:var(--calcite-button-border-size, 1px)}:host([appearance=outline][kind=brand]) button,:host([appearance=outline][kind=brand]) a{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:hover,:host([appearance=outline][kind=brand]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-brand-hover);--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=outline][kind=brand]) button:focus,:host([appearance=outline][kind=brand]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-brand);--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=outline][kind=brand]) button:active,:host([appearance=outline][kind=brand]) a:active{--calcite-internal-button-border-color: var(--calcite-color-brand-press);--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=outline][kind=brand]) button calcite-loader,:host([appearance=outline][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=outline][kind=danger]) button,:host([appearance=outline][kind=danger]) a{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:hover,:host([appearance=outline][kind=danger]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-status-danger-hover);--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=outline][kind=danger]) button:focus,:host([appearance=outline][kind=danger]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-status-danger);--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=danger]) button:active,:host([appearance=outline][kind=danger]) a:active{--calcite-internal-button-border-color: var(--calcite-color-status-danger-press);--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=outline][kind=danger]) button calcite-loader,:host([appearance=outline][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=outline][kind=neutral]) button,:host([appearance=outline][kind=neutral]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-border-1);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=neutral]) button:hover,:host([appearance=outline][kind=neutral]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-border-input)}:host([appearance=outline][kind=neutral]) button:focus,:host([appearance=outline][kind=neutral]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-foreground-3)}:host([appearance=outline][kind=neutral]) button:active,:host([appearance=outline][kind=neutral]) a:active{--calcite-internal-button-border-color: var(--calcite-color-text-3)}:host([appearance=outline][kind=inverse]) button,:host([appearance=outline][kind=inverse]) a{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-border-color: var(--calcite-color-inverse);--calcite-internal-button-loader-color: var(--calcite-color-text-1)}:host([appearance=outline][kind=inverse]) button:hover,:host([appearance=outline][kind=inverse]) a:hover{--calcite-internal-button-border-color: var(--calcite-color-inverse-hover)}:host([appearance=outline][kind=inverse]) button:focus,:host([appearance=outline][kind=inverse]) a:focus{--calcite-internal-button-border-color: var(--calcite-color-inverse)}:host([appearance=outline][kind=inverse]) button:active,:host([appearance=outline][kind=inverse]) a:active{--calcite-internal-button-border-color: var(--calcite-color-inverse-press)}:host([appearance=outline-fill][split-child=primary]) button,:host([appearance=outline][split-child=primary]) button,:host([appearance=outline-fill][split-child=primary]) a,:host([appearance=outline][split-child=primary]) a{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline-fill][split-child=secondary]) button,:host([appearance=outline][split-child=secondary]) button,:host([appearance=outline-fill][split-child=secondary]) a,:host([appearance=outline][split-child=secondary]) a{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]){--calcite-internal-button-background-color: var(--calcite-color-transparent);--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent]:not(.enable-editing-button)){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=brand]) button,:host([appearance=transparent][kind=brand]) a{--calcite-internal-button-text-color: var(--calcite-color-brand);--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:hover,:host([appearance=transparent][kind=brand]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-brand-hover)}:host([appearance=transparent][kind=brand]) button:focus,:host([appearance=transparent][kind=brand]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=brand]) button:active,:host([appearance=transparent][kind=brand]) a:active{--calcite-internal-button-text-color: var(--calcite-color-brand-press)}:host([appearance=transparent][kind=brand]) button calcite-loader,:host([appearance=transparent][kind=brand]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-brand)}:host([appearance=transparent][kind=danger]) button,:host([appearance=transparent][kind=danger]) a{--calcite-internal-button-text-color: var(--calcite-color-status-danger);--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:hover,:host([appearance=transparent][kind=danger]) a:hover{--calcite-internal-button-text-color: var(--calcite-color-status-danger-hover)}:host([appearance=transparent][kind=danger]) button:focus,:host([appearance=transparent][kind=danger]) a:focus{--calcite-internal-button-text-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=danger]) button:active,:host([appearance=transparent][kind=danger]) a:active{--calcite-internal-button-text-color: var(--calcite-color-status-danger-press)}:host([appearance=transparent][kind=danger]) button calcite-loader,:host([appearance=transparent][kind=danger]) a calcite-loader{--calcite-internal-button-loader-color: var(--calcite-color-status-danger)}:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][kind=neutral]:not(.cancel-editing-button)) calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-1)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button{--calcite-internal-button-text-color: var(--calcite-color-text-3)}:host([appearance=transparent][kind=neutral].cancel-editing-button) button:hover{--calcite-internal-button-text-color: var(--calcite-color-text-1);--calcite-internal-button-padding-y: 0}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][kind=inverse]){--calcite-internal-button-background-color-hover: var(--calcite-color-transparent-hover);--calcite-internal-button-background-color-press: var(--calcite-color-transparent-press)}:host([appearance=transparent][kind=inverse]) button calcite-loader,:host([appearance=transparent][kind=inverse]) a calcite-loader{--calcite-internal-button-text-color: var(--calcite-color-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-internal-button-padding-y: 3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-internal-button-padding-x: 11px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) button,:host([scale=m]) a{--calcite-internal-button-padding-y: 7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-internal-button-padding-x: .75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-internal-button-padding-x: 15px;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .button-padding{--calcite-internal-button-padding-x: 1rem;--calcite-internal-button-padding-y: 11px}:host([scale=l]) .button-padding--shrunk{--calcite-internal-button-padding-y: 9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 3px;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 7px;inline-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-internal-button-padding-x: .125rem;--calcite-internal-button-padding-y: 9px;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);min-block-size:2.75rem}:host(:is([scale=s],[scale=m],[scale=l])[width=full]) a:not(.content--slotted),:host(:is([scale=s],[scale=m],[scale=l])[width=full]) button:not(.content--slotted){inline-size:var(--calcite-container-size-content-fluid)}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-y: .625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 23px;block-size:1.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2rem;block-size:2rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-internal-button-padding-x: 43px;block-size:2.75rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-internal-button-padding-x: 2.75rem}:host([hidden]){display:none}[hidden]{display:none}`,s=class extends h{constructor(){super(...arguments),this.attributeWatch=k(["aria-expanded"],this.handleGlobalAttributesChanged),this.contentRef=p(),this.mutationObserver=c("mutation",()=>this.updateHasContent()),this.resizeObserver=c("resize",()=>this.setTooltipText()),this.focusSetter=x()(this),this.messages=y(),this.interactiveContainer=C(this),this.hasContent=!1,this.alignment="center",this.appearance="solid",this.disabled=!1,this.download=!1,this.kind="brand",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto"}static{this.properties={hasContent:[16,{},{state:!0}],tooltipText:[16,{},{state:!0}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],download:[3,{converter:v},{reflect:!0}],form:[3,{},{reflect:!0}],href:[3,{},{reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],rel:[3,{},{reflect:!0}],round:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],splitChild:[3,{},{reflect:!0}],target:[3,{},{reflect:!0}],type:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=A}async setFocus(t){return this.focusSetter(()=>this.childEl,t)}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),S(this),this.formEl=E(this)}async load(){this.updateHasContent()}loaded(){this.setTooltipText()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),T(this),this.resizeObserver?.disconnect(),this.formEl=null}handleGlobalAttributesChanged(){this.requestUpdate()}updateHasContent(){this.hasContent=m(this.el)}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}handleClick(){let{type:t}=this;this.href||(t==="submit"?z(this):t==="reset"&&$(this))}setTooltipText(){let{contentRef:{value:t}}=this;t&&(this.tooltipText=t.offsetWidth<t.scrollWidth&&this.el.innerText||null)}setChildEl(t){f(this.resizeObserver,this.childEl,t),this.childEl=t}render(){let t=this.href?"a":"button",d=this.href?i`a`:i`button`,R=this.loading?o`<div class=${a(e.buttonLoader)}><calcite-loader class=${a(this.loading?e.loadingIn:e.loadingOut)} inline .label=${this.messages.loading} .scale=${this.scale==="l"?"m":"s"}></calcite-loader></div>`:null,u=!this.iconStart&&!this.iconEnd,F=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${l(this.scale)}></calcite-icon>`,L=o`<calcite-icon class=${a({[e.icon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${l(this.scale)}></calcite-icon>`,j=o`<span class=${a(e.content)} ${r(this.contentRef)}><slot></slot></span>`;return this.interactiveContainer({disabled:this.disabled,children:w`<${d} .ariaBusy=${this.loading} .ariaExpanded=${this.el.ariaExpanded?this.el.ariaExpanded:null} .ariaLabel=${this.loading?this.messages.loading:O(this)} aria-live=polite class=${a({[e.buttonPadding]:u,[e.buttonPaddingShrunk]:!u,[e.contentSlotted]:this.hasContent,[e.iconStartEmpty]:!this.iconStart,[e.iconEndEmpty]:!this.iconEnd})} .disabled=${t==="button"?this.disabled:null} download=${(t==="a"?this.download===!0||this.download===""?"":this.download||null:null)??n} href=${(t==="a"&&this.href)??n} name=${(t==="button"&&this.name)??n} @click=${this.handleClick} rel=${(t==="a"&&this.rel)??n} tabindex=${(this.disabled?-1:null)??n} target=${(t==="a"&&this.target)??n} title=${this.tooltipText??n} type=${(t==="button"?this.type:null)??n} ${r(this.setChildEl)}>${R}${this.iconStart?F:null}${this.hasContent?j:null}${this.iconEnd?L:null}</${d}>`})}};g("calcite-button",s);export{s as Button};
@@ -0,0 +1,4 @@
1
+ /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
+ See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
+ v5.0.0-next.43 */
4
+ import{a as T}from"./OX3M3D3N.js";import{a as H}from"./JQKHI76Q.js";import{a as v,c as y,d as z,e as A,f as B,g as c,h as L}from"./H2SGYM2C.js";import{a as F}from"./V2OYFWT5.js";import{a as x}from"./6HUGADED.js";import"./LA2YQLYM.js";import{a as P}from"./3L7VHXSZ.js";import{a as $}from"./CF3PBS3G.js";import{a as u,b as w}from"./CX673EPC.js";import{a as S}from"./VNZFJTEW.js";import"./3GITZ4DI.js";import"./7RIJVHG3.js";import{C as g,l as b,y as l}from"./QODEYSFY.js";import{a as O}from"./5QYXEPPN.js";import{C as p,D as k,E as h,P as C,g as I,h as E,l as n,o}from"./FQKUJ55K.js";var G={trigger:"trigger"},D={content:"content",wrapper:"wrapper",triggerContainer:"trigger-container"},U="calcite-dropdown",f={menuButton:r=>`${U}-${r}-menubutton`,menu:r=>`${U}-${r}-menu`},M=I`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block}.wrapper{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.wrapper{opacity:0;inset-block-start:0;left:0}}.wrapper[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.wrapper:popover-open{display:block}.wrapper .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.wrapper[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.wrapper[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.wrapper[data-placement^=left] .calcite-floating-ui-anim{left:5px}.wrapper[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.content{max-height:45vh;width:auto;overflow-y:auto;overflow-x:hidden;inline-size:var(--calcite-dropdown-width, var(--calcite-internal-dropdown-width));background-color:var(--calcite-dropdown-background-color, var(--calcite-color-foreground-1))}.trigger-container{position:relative;display:flex;height:100%;flex:1 1 auto;word-wrap:break-word;word-break:break-word}.width-s{--calcite-internal-dropdown-width: 12rem}.width-m{--calcite-internal-dropdown-width: 14rem}.width-l{--calcite-internal-dropdown-width: 16rem}@media(forced-colors:active){:host([open]) .wrapper{border:var(--calcite-border-width-sm) solid canvasText}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,W=Object.defineProperty,_=(r,e,t,i)=>{for(var s=void 0,a=r.length-1,d;a>=0;a--)(d=r[a])&&(s=d(e,t,s)||s);return s&&W(e,t,s),s},m=class extends k{constructor(){super(),this.focusLastDropdownItem=!1,this.groups=[],this.guid=O(),this.items=[],this.mutationObserver=u("mutation",()=>this.updateItems()),this.transitionProp="opacity",this.resizeObserver=u("resize",e=>this.resizeObserverCallback(e)),this.focusSetter=S()(this),this.interactiveContainer=x(this),this.topLayer=H({target:()=>this.floatingEl})(this),this.closeOnSelectDisabled=!1,this.disabled=!1,this.maxItems=0,this.offsetDistance=0,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=v,this.scale="m",this.selectedItems=[],this.type="click",this.calciteDropdownBeforeClose=o({cancelable:!1}),this.calciteDropdownBeforeOpen=o({cancelable:!1}),this.calciteDropdownClose=o({cancelable:!1}),this.calciteDropdownOpen=o({cancelable:!1}),this.calciteDropdownSelect=o({cancelable:!1}),this.listenOn(window,"click",this.closeCalciteDropdownOnClick),this.listen("calciteInternalDropdownCloseRequest",this.closeCalciteDropdownOnEvent),this.listenOn(window,"calciteDropdownOpen",this.closeCalciteDropdownOnOpenEvent),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("calciteInternalDropdownItemKeyEvent",this.calciteInternalDropdownItemKeyEvent),this.listen("calciteInternalDropdownItemSelect",this.handleItemSelect)}static{this.properties={closeOnSelectDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],maxItems:[11,{},{reflect:!0,type:Number}],offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],type:[3,{},{reflect:!0}],widthScale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=M}async reposition(e=!1){let{filteredFlipPlacements:t,floatingEl:i,offsetDistance:s,offsetSkidding:a,overlayPositioning:d,placement:R,referenceEl:K}=this;return A(this,{floatingEl:i,referenceEl:K,offsetDistance:s,offsetSkidding:a,overlayPositioning:d,placement:R,flipPlacements:t,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>this.referenceEl,e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.updateItems(),c(this)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("maxItems")&&this.hasUpdated&&this.setMaxScrollerHeight(),this.hasUpdated&&(e.has("offsetDistance")&&this.offsetDistance!==0||e.has("offsetSkidding")&&this.offsetSkidding!==0||e.has("overlayPositioning")&&this.overlayPositioning!=="absolute"||e.has("placement")&&this.placement!==v)&&this.reposition(!0),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.handlePropsChange()}loaded(){this.updateSelectedItems(),c(this)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),L(this)}openHandler(){this.disabled||(F(this),this.reposition(!0))}handleDisabledChange(e){e||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}handlePropsChange(){this.updateItems(),this.updateGroupProps()}closeCalciteDropdownOnClick(e){this.disabled||!this.open||e.composedPath().includes(this.el)||this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(e){this.closeCalciteDropdown(),e.stopPropagation()}closeCalciteDropdownOnOpenEvent(e){e.composedPath().includes(this.el)||(this.open=!1)}pointerEnterHandler(){this.disabled||this.type!=="hover"||this.toggleDropdown()}pointerLeaveHandler(){this.disabled||this.type!=="hover"||this.closeCalciteDropdown()}getTraversableItems(){return this.items.filter(e=>!e.disabled&&!e.hidden)}calciteInternalDropdownItemKeyEvent(e){let{keyboardEvent:t}=e.detail,i=t.target,s=this.getTraversableItems();switch(t.key){case"Tab":this.open=!1,this.updateTabIndexOfItems(i);break;case"ArrowDown":l(s,i,"next");break;case"ArrowUp":l(s,i,"previous");break;case"Home":l(s,i,"first");break;case"End":l(s,i,"last");break}e.stopPropagation()}handleItemSelect(e){this.updateSelectedItems(),e.stopPropagation(),this.calciteDropdownSelect.emit(),this.closeOnSelectDisabled||this.closeCalciteDropdown()}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?z(t,e):null}updateItems(){this.items=this.groups.map(e=>Array.from(e?.querySelectorAll("calcite-dropdown-item"))).reduce((e,t)=>[...e,...t],[]),this.updateSelectedItems(),this.reposition(!0),this.items.forEach(e=>e.scale=this.scale)}updateGroups(e){let t=e.target.assignedElements({flatten:!0}).filter(i=>i?.matches("calcite-dropdown-group"));this.groups=t,this.updateItems(),this.updateGroupProps()}updateGroupProps(){this.groups.forEach((e,t)=>{e.scale=this.scale,e.position=t})}resizeObserverCallback(e){e.forEach(({target:t})=>{t===this.referenceEl?this.setDropdownWidth():t===this.scrollerEl&&this.setMaxScrollerHeight()})}setDropdownWidth(){let{referenceEl:e,scrollerEl:t}=this;!t||!e||(t.style.minWidth=`${e.clientWidth}px`)}setMaxScrollerHeight(){let{maxItems:e,items:t,scrollerEl:i}=this;if(!i)return;let s=t.length>=e&&e>0?this.getYDistanceFromScroller(t.at(e-1)):0;i.style.maxBlockSize=s>0?`${s}px`:"",this.reposition(!0)}setScrollerAndTransitionEl(e){w(this.resizeObserver,this.scrollerEl,e),this.scrollerEl=e,this.transitionEl=e}onBeforeOpen(){this.focusOnFirstActiveOrDefaultItem(),this.calciteDropdownBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit(),B(this),this.topLayer.hide()}setReferenceEl(e){w(this.resizeObserver,this.referenceEl,e),this.referenceEl=e,c(this)}setFloatingEl(e){this.floatingEl=e,c(this)}keyDownHandler(e){if(!e.composedPath().includes(this.referenceEl))return;let{defaultPrevented:t,key:i}=e;if(!t){if(i==="Escape"){this.closeCalciteDropdown(),e.preventDefault();return}if(this.open&&e.shiftKey&&i==="Tab"){this.closeCalciteDropdown(),e.preventDefault();return}$(i)?(this.toggleDropdown(),e.preventDefault()):(i==="ArrowDown"||i==="ArrowUp")&&(e.preventDefault(),this.focusLastDropdownItem=i==="ArrowUp",this.open=!0)}}updateSelectedItems(){this.selectedItems=this.items.filter(e=>e.selected)}getYDistanceFromScroller(e){let t=e.getBoundingClientRect();return e.offsetTop+t.height}closeCalciteDropdown(e=!0){this.open=!1,e&&b(this.triggerEls[0])}async focusOnFirstActiveOrDefaultItem(){let t=this.getTraversableItems().find(i=>i.selected)||(this.focusLastDropdownItem?this.items.at(-1):this.items[0]);this.focusLastDropdownItem=!1,t&&(await this.updateComplete,await g(),await g(),await b(t),t.scrollIntoView({block:"nearest"}))}toggleDropdown(){this.open=!this.open}updateTabIndexOfItems(e){this.items.forEach(t=>{t.tabIndex=e!==t?-1:0})}render(){let{open:e,guid:t}=this;return this.interactiveContainer({disabled:this.disabled,children:E`<div class=${h(D.triggerContainer)} id=${f.menuButton(t)??n} @click=${this.toggleDropdown} @keydown=${this.keyDownHandler} ${p(this.setReferenceEl)}><slot aria-controls=${f.menu(t)??n} .ariaExpanded=${e} aria-haspopup=menu name=${G.trigger}></slot></div><div .ariaHidden=${!e} class=${h({[D.wrapper]:!0,[T("width",this.width,this.widthScale)]:!!(this.width||this.widthScale)})} popover=manual ${p(this.setFloatingEl)}><div aria-labelledby=${f.menuButton(t)??n} class=${h({[D.content]:!0,[y.animation]:!0,[y.animationActive]:e})} id=${f.menu(t)??n} role=menu ${p(this.setScrollerAndTransitionEl)}><slot @slotchange=${this.updateGroups}></slot></div></div>`})}};_([P({slot:G.trigger})],m.prototype,"triggerEls");C("calcite-dropdown",m);export{m as Dropdown};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
3
+ v5.0.0-next.43 */
4
4
  var t={container:"container",actionsStart:"actions-start",contentStart:"content-start",content:"content",contentEnd:"content-end",actionsEnd:"actions-end"},n={actionsStart:"actions-start",contentStart:"content-start",contentEnd:"content-end",actionsEnd:"actions-end"};export{t as a,n as b};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.41 */
4
- import{a as pe,d as q,e as Ce}from"./RM4A2SGZ.js";import{a as re}from"./RCFEU7VD.js";import{A as P,B as he,C as X,D as de,E as ue,a as x,b as n,c as m,d as I,e as k,f as p,g as H,h as b,i as D,j as U,k as j,m as W,n as O,o as B,s as R,t as S,v as ce,x as _,y as N,z as V}from"./VAIIUYWI.js";import"./BZ4A65YS.js";import{a as le}from"./SSZFTAS3.js";import{a as T}from"./UUM7YLQN.js";import{a as se}from"./PNTKHVD5.js";import{c as E}from"./DIPDH4O6.js";import{a as ne}from"./H3HDJ3L5.js";import{a as te}from"./F5YXINZP.js";import{a as oe}from"./V6OVMX6A.js";import{a as ae}from"./MXA4BVE4.js";import"./FVEXGCGW.js";import"./UFWMXGBP.js";import{e as ie,w as K}from"./VNFP6MLN.js";import"./2CES2KCJ.js";import{B as F,C as g,D as Q,E as r,F as $,P as ee,g as Z,h as u,l as w,o as L}from"./A2G7MUU7.js";var Ae=Z`: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-relative-sm);line-height:var(--calcite-font-line-height-sm);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: var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: var(--calcite-spacing-lg);font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}: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}calcite-input-number{--calcite-input-number-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-number-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-number-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}calcite-button{--calcite-button-text-color: var(--calcite-color-picker-action-text-color);--calcite-button-text-color-press: var(--calcite-color-picker-action-text-color-press)}calcite-button:hover,calcite-button:focus{--calcite-button-text-color: var(--calcite-color-picker-action-text-color-hover)}calcite-button:active{--calcite-button-text-color: var(--calcite-color-picker-action-text-color-press)}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-picker-tab-border-color);--calcite-tab-text-color: var(--calcite-color-picker-tab-text-color);--calcite-tab-accent-color-press: var(--calcite-color-picker-tab-accent-color);--calcite-swatch-corner-radius: var(--calcite-color-picker-swatch-corner-radius)}calcite-tab-title:hover{--calcite-color-text-1: var(--calcite-color-picker-tab-text-color-hover)}calcite-swatch{--calcite-swatch-corner-radius: var(--calcite-color-picker-swatch-corner-radius)}.container{display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-picker-border-color, var(--calcite-color-border-3));background-color:var(--calcite-color-picker-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-color-picker-shadow, var(--calcite-shadow-none))}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none;border-radius:var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none)) var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none)) var(--calcite-corner-radius-none) var(--calcite-corner-radius-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-relative-base);outline-color:transparent}.scope:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));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-picker-text-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-buttons{display:flex}.swatch-group{margin-block-start:var(--calcite-color-picker-spacing)}:host([hidden]){display:none}[hidden]{display:none}`,fe=16,G=class extends Q{constructor(){super(),this._color=m,this.colorFieldScopeRef=F(),this.hueScopeRef=F(),this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=_.HEX,this.opacityScopeRef=F(),this.resizeObserver=te("resize",e=>this.resizeCanvas(e)),this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.messages=oe({blocking:!0}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:a,height:o}=this.dynamicDimensions.colorField,l=Math.round(p.s/a*e),s=Math.round(p.v/o*(o-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(s),i)},this.cancelable=se()(this),this.drawColorControls=E((e="all")=>{(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()},fe),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:a,bounds:o}=t,l,s,{clientX:c,clientY:h}=e;a.canvas.matches(":hover")?(l=c-o.x,s=h-o.y):(c<o.x+o.width&&c>o.x?l=c-o.x:c<o.x?l=0:l=o.width,h<o.y+o.height&&h>o.y?s=h-o.y:h<o.y?s=0:s=o.height),a===this.colorFieldRenderingContext?this.captureColorFieldColor(l,s,!1):a===this.hueSliderRenderingContext?this.captureHueSliderColor(l):a===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(l)},this.globalPointerUpHandler=e=>{if(!K(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.resizeCanvas=E(e=>{if(!this.hasUpdated)return;let[t]=e,i=Math.floor(t.contentBoxSize[0].inlineSize);this.dynamicDimensions.colorField.width!==i&&(this.updateDynamicDimensions(i),this.updateCanvasSize(),this.drawColorControls())},fe),this.updateDynamicDimensions=e=>{let t={width:de(e,this.staticDimensions,this.alphaChannel),height:this.staticDimensions.slider.height};this.dynamicDimensions={colorField:ue(e),slider:t}},this.focusSetter=ae()(this),this.interactiveContainer=le(this),this.channelMode="rgb",this.channels=this.toChannels(m),this.staticDimensions=D.m,this.savedColors=[],this.alphaChannel=!1,this.channelsDisabled=!1,this.clearable=!1,this.disabled=!1,this.fieldDisabled=!1,this.format="auto",this.hexDisabled=!1,this.savedDisabled=!1,this.scale="m",this.calciteColorPickerChange=L({cancelable:!1}),this.calciteColorPickerInput=L({cancelable:!1}),this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:[16,{},{state:!0}],channels:[16,{},{state:!0}],colorFieldScopeLeft:[16,{},{state:!0}],colorFieldScopeTop:[16,{},{state:!0}],staticDimensions:[16,{},{state:!0}],hueScopeLeft:[16,{},{state:!0}],opacityScopeLeft:[16,{},{state:!0}],savedColors:[16,{},{state:!0}],scopeOrientation:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],channelsDisabled:[5,{},{type:Boolean}],clearable:[7,{},{reflect:!0,type:Boolean}],color:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],fieldDisabled:[7,{},{reflect:!0,type:Boolean}],format:[3,{},{reflect:!0}],hexDisabled:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],savedDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],storageId:[3,{},{reflect:!0}],value:1}}static{this.styles=Ae}get baseColorFieldColor(){return this.color||this.previousColor||m}get effectiveSliderWidth(){return this.dynamicDimensions.slider.width}get color(){return this._color}set color(e){let t=this._color;this._color=e,this.handleColorChange(e,t)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.handleValueChange(e,t),this._valueWasSet=!0}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.observeResize(),this.cancelable.add([this.drawColorControls,this.resizeCanvas])}async load(){this._valueWasSet||(this._value??=R(S(m,this.alphaChannel)));let{clearable:e,color:t,format:i,value:a}=this,o=e&&!a,l=N(a),s=o||i==="auto"&&l||i===l,c=s?W(a,e,l):t;s||this.showIncompatibleColorWarning(a,i),this.setMode(i,!1),this.internalColorSet(c,!1,"initial"),this.updateStaticDimensions(this.scale),this.updateDynamicDimensions(D[this.scale].minWidth);let h=`${I}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}willUpdate(e){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!==D.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)}loaded(){this.handleAlphaChannelDimensionsChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler),this.resizeObserver?.disconnect()}observeResize(){this.resizeObserver?.observe(this.el)}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!P(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.drawColorControls()}handleColorChange(e,t){this.drawColorControls(),this.updateChannelsFromColor(e),this.previousColor=t}handleFormatOrAlphaChannelChange(){this.setMode(this.format),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(e="m"){this.updateStaticDimensions(e),this.updateCanvasSize(),this.drawColorControls()}handleValueChange(e,t){let{clearable:i,format:a}=this,o=!i||e,l=!1;if(o){let d=N(e);if(!d||a!=="auto"&&d!==a){this.showIncompatibleColorWarning(e,a),this._value=t;return}l=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let s=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),s||this.calciteColorPickerChange.emit();return}let c=W(e,i,this.mode),h=!V(c,this.color);(l||h)&&this.internalColorSet(c,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css"))||this.internalColorUpdateContext==="internal","internal")}handleTabActivate(e){this.channelMode=e.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)}handleColorFieldScopeKeyDown(e){let{key:t}=e,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};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))}handleHueScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(l+o);this.internalColorSet(s,!1)}}handleHexInputChange(e){e.stopPropagation();let{clearable:t,color:i}=this,o=e.target.value;if(t&&!o){this.internalColorSet(null);return}let l=i&&R(S(i,P(this.mode)));o!==l&&this.internalColorSet(x(o))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(x(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=i===3?b.max:this.channelMode==="rgb"?k[Object.keys(k)[i]]:p[Object.keys(p)[i]],l;if(!t.value)l="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let c=Number(t.value)+this.shiftKeyChannelAdjustment;l=pe(c,0,o).toString()}t.value=l,l!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):l!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];!t.value&&!this.clearable&&(t.value=a[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(o=>o.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let a=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?a:t==="ArrowDown"&&i?-a:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?k[Object.keys(k)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];if(this.clearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let l=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(a[i]+1<=this.getChannelInputLimit(i)?a[i]+1:this.getChannelInputLimit(i)).toString():(a[i]-1>=0?a[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let s=t.value?Number(t.value):a[i];a[i]=l?B(s):s,this.updateColorFromChannels(a)}handleSavedColorKeyDown(e){ne(e.key)&&(e.preventDefault(),this.handleSavedColorSelect(e))}handleColorFieldPointerDown(e){this.handleCanvasControlPointerDown(e,this.colorFieldRenderingContext,this.captureColorFieldColor,this.colorFieldScopeRef.value)}focusScope(e){requestAnimationFrame(()=>{e.focus()})}handleHueSliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.hueSliderRenderingContext,this.captureHueSliderColor,this.hueScopeRef.value)}handleOpacitySliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.opacitySliderRenderingContext,this.captureOpacitySliderValue,this.opacityScopeRef.value)}handleCanvasControlPointerDown(e,t,i,a){K(e)&&(window.addEventListener("pointermove",this.globalPointerMoveHandler),window.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeCanvasInfo={context:t,bounds:t.canvas.getBoundingClientRect()},i.call(this,e.offsetX,e.offsetY),this.focusScope(a))}handleKeyDown(e){e.key==="Enter"&&e.preventDefault()}showIncompatibleColorWarning(e,t){console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`)}setMode(e,t=!0){let i=e==="auto"?this.mode:e;this.mode=this.ensureCompatibleMode(i,t)}ensureCompatibleMode(e,t){let{alphaChannel:i}=this,a=P(e);if(i&&!a){let o=he(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}if(!i&&a){let o=X(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}return e}captureHueSliderColor(e){let t=H/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=B(b.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&V(e,this.color)||(this.internalColorUpdateContext=i,this.color=e,this.value=this.toValue(e),this.internalColorUpdateContext=null)}toValue(e,t=this.mode){if(!e)return null;if(t.includes("hex")){let o=t===_.HEXA;return R(S(e.round(),o),o)}if(t.includes("-css")){let o=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let s=o.slice(0,3),c=o.slice(4,-1);return`${s}a(${c}, ${e.alpha()})`}return o}let a=e[X(t)]().round().object();return t.endsWith("a")?ce(a):a}getSliderCapSpacing(){let{staticDimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateStaticDimensions(e="m"){this.staticDimensions=D[e]}deleteColor(){let e=S(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let i=this.savedColors.filter(o=>o!==e);this.savedColors=i;let a=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(a,JSON.stringify(i))}saveColor(){let e=S(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let i=[...this.savedColors,e];this.savedColors=i;let a=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(a,JSON.stringify(i))}drawColorField(){let e=this.colorFieldRenderingContext,{width:t,height:i}=this.dynamicDimensions.colorField;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,t,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=a,e.fillRect(0,0,t,i);let o=e.createLinearGradient(0,0,0,i);o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=o,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let a=window.devicePixelRatio||1;e.width=i*a,e.height=t*a,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(a,a)}initColorField(e){e&&(this.colorFieldRenderingContext=e.getContext("2d"),this.updateCanvasSize("color-field"),this.drawColorControls())}initHueSlider(e){e&&(this.hueSliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("hue-slider"),this.drawHueSlider())}initOpacitySlider(e){e&&(this.opacitySliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("opacity-slider"),this.drawOpacitySlider())}updateCanvasSize(e="all"){let{dynamicDimensions:t,staticDimensions:i}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let a={width:this.effectiveSliderWidth,height:i.slider.height+(i.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,a),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,a)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:a,height:o}=this.dynamicDimensions.colorField,l=t.saturationv()/(p.s/a),s=o-t.value()/(p.v/o);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=s}),this.drawThumb(this.colorFieldRenderingContext,i,l,s,t,!1)}drawThumb(e,t,i,a,o,l){let c=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,a,t,0,c),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),l&&o.alpha()<1){let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,a,t-3,0,c),e.fillStyle=f,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,a,t-3,0,c);let d=l?o.alpha():1;e.fillStyle=o.rgb().alpha(d).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=t.hue()/(H/a),l=i,s=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.hueScopeLeft=s}),this.drawThumb(this.hueSliderRenderingContext,i,s,l,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{staticDimensions:{slider:{height:t},thumb:{radius:i}}}=this,a=0,o=i-t/2,l=this.effectiveSliderWidth,s=e.createLinearGradient(0,0,l,0),c=["red","yellow","lime","cyan","blue","magenta","#ff0004"],h=1/(c.length-1),d=0;c.forEach(f=>{s.addColorStop(d,x(f).string()),d+=h}),e.clearRect(0,0,l,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,l,a,o),e.fillStyle=s,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,staticDimensions:{slider:{height:i},thumb:{radius:a}}}=this,o=0,l=a-i/2,s=this.effectiveSliderWidth;e.clearRect(0,0,s,i+this.getSliderCapSpacing()*2);let c=e.createLinearGradient(0,l,s,0),h=t.rgb().alpha(0),d=t.rgb().alpha(.5),f=t.rgb().alpha(1);c.addColorStop(0,h.string()),c.addColorStop(.5,d.string()),c.addColorStop(1,f.string()),this.drawSliderPath(e,i,s,o,l);let C=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=C,e.fill(),e.fillStyle=c,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveOpacitySliderColor()}drawSliderPath(e,t,i,a,o){let l=t/2+1;e.beginPath(),e.moveTo(a+l,o),e.lineTo(a+i-l,o),e.quadraticCurveTo(a+i,o,a+i,o+l),e.lineTo(a+i,o+t-l),e.quadraticCurveTo(a+i,o+t,a+i-l,o+t),e.lineTo(a+l,o+t),e.quadraticCurveTo(a,o+t,a,o+t-l),e.lineTo(a,o+l),e.quadraticCurveTo(a,o,a+l,o),e.closePath()}getCheckeredBackgroundPattern(){if(this.checkerPattern)return this.checkerPattern;let e=document.createElement("canvas");e.width=10,e.height=10;let t=e.getContext("2d");return t.fillStyle="#ccc",t.fillRect(0,0,10,10),t.fillStyle="#fff",t.fillRect(0,0,5,5),t.fillRect(5,5,5,5),this.checkerPattern=e,e}drawActiveOpacitySliderColor(){let{color:e}=this;if(!e)return;let t=e,{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=O(t.alpha())/(b.max/a),l=i,s=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.opacityScopeLeft=s}),this.drawThumb(this.opacitySliderRenderingContext,i,s,l,t,!0)}getSliderBoundX(e,t,i){let a=Ce(e,t,i);return a===0?e:a===-1?q(e,0,t,i,i*2):q(e,0,t,t-i*2,t-i)}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.alpha(),s=this.baseColorFieldColor.alpha(l+o);this.internalColorSet(s,!1)}}updateColorFromChannels(e){this.internalColorSet(x(e,this.channelMode))}updateChannelsFromColor(e){this.channels=e?this.toChannels(e):[null,null,null,null]}toChannels(e){let{channelMode:t}=this,i=e[t]().round().array();return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-U/2,t-U/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:a,staticDimensions:{thumb:{radius:o}},fieldDisabled:l,hexDisabled:s,hueScopeLeft:c,messages:h,alphaChannel:d,opacityScopeLeft:f,savedColors:C,savedDisabled:y,scale:v,scopeOrientation:ve}=this,Y=this.effectiveSliderWidth,M=t?S(t,d):null,me=o,ge=c??Y*m.hue()/p.h,be=o,Se=f??Y*O(m.alpha())/b.max,J=t===void 0,z=ve==="vertical",[ye,we]=this.getAdjustedScopePosition(i,a),[$e,xe]=this.getAdjustedScopePosition(ge,me),[ke,De]=this.getAdjustedScopePosition(Se,be);return this.interactiveContainer({disabled:this.disabled,children:u`<div class=${r(n.container)}>${l?null:u`<div class=${r(n.controlAndScope)}><canvas class=${r(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${g(this.initColorField)}></canvas><div .ariaLabel=${z?h.value:h.saturation} .ariaValueMax=${z?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(z?t?.saturationv():t?.value())||"0"} class=${r({[n.scope]:!0,[n.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${$({top:`${we||0}px`,left:`${ye||0}px`})} tabindex=0 ${g(this.colorFieldScopeRef)}></div></div>`}<div class=${r(n.previewAndSliders)}><calcite-swatch class=${r(n.preview)} .color=${M} .label=${M} .scale=${this.alphaChannel?"l":this.scale}></calcite-swatch><div class=${r(n.sliders)}><div class=${r(n.controlAndScope)}><canvas class=${r({[n.slider]:!0,[n.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${g(this.initHueSlider)}></canvas><div .ariaLabel=${h.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||m.round().hue()} class=${r({[n.scope]:!0,[n.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${$({top:`${xe}px`,left:`${$e}px`})} tabindex=0 ${g(this.hueScopeRef)}></div></div>${d?u`<div class=${r(n.controlAndScope)}><canvas class=${r({[n.slider]:!0,[n.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${g(this.initOpacitySlider)}></canvas><div .ariaLabel=${h.opacity} .ariaValueMax=${b.max} .ariaValueMin=${b.min} .ariaValueNow=${(t||m).round().alpha()} class=${r({[n.scope]:!0,[n.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${$({top:`${De}px`,left:`${ke}px`})} tabindex=0 ${g(this.opacityScopeRef)}></div></div>`:null}</div></div>${s&&e?null:u`<div class=${r({[n.controlSection]:!0,[n.section]:!0})}><div class=${r(n.hexAndChannelsGroup)}>${s?null:u`<div class=${r(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.clearable} .alphaChannel=${d} class=${r(n.control)} .messages=${h} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${v} .value=${M}></calcite-color-picker-hex-input></div>`}${e?null:u`<calcite-tabs class=${r({[n.colorModeContainer]:!0,[n.splitSection]:!0})} .scale=${v==="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>`}${y?null:u`<div class=${r({[n.savedColorsSection]:!0,[n.section]:!0})}><div class=${r(n.header)}><label>${h.saved}</label><div class=${r(n.savedColorsButtons)}><calcite-button appearance=transparent class=${r(n.deleteColor)} .disabled=${J} .iconStart=${j.minus} kind=neutral .label=${h.deleteColor} @click=${this.deleteColor} .scale=${v} type=button></calcite-button><calcite-button appearance=transparent class=${r(n.saveColor)} .disabled=${J} .iconStart=${j.plus} kind=neutral .label=${h.saveColor} @click=${this.saveColor} .scale=${v} type=button></calcite-button></div></div>${C.length>0?u`<calcite-swatch-group class=${r(n.swatchGroup)} .label=${h.saved} .scale=${v} selection-mode=none>${re(C,A=>A,A=>u`<calcite-swatch class=${r(n.savedColor)} .color=${A} .label=${A} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${v} tabindex=0></calcite-swatch>`)}</calcite-swatch-group>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,a=e===t,o=e==="rgb"?i.rgb:i.hsv;return T(e,u`<calcite-tab-title class=${r(n.colorMode)} data-color-mode=${e??w} @calciteTabsActivate=${this.handleTabActivate} .selected=${a}>${o}</calcite-tab-title>`)}renderChannelsTab(e){let{clearable:t,channelMode:i,channels:a,messages:o,alphaChannel:l}=this,s=e===i,h=e==="rgb"?[o.red,o.green,o.blue]:[o.hue,o.saturation,o.value],d=ie(this.el),f=l?a:a.slice(0,3);return T(e,u`<calcite-tab class=${r(n.control)} .selected=${s}><div class=${r(n.channels)} dir=ltr>${f.map((C,y)=>{let v=y===3;return v&&(C=t&&!C?C:O(C)),this.renderChannel(C,y,h[y],d,v?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,a,o){return T(t,u`<calcite-input-number class=${r(n.channel)} data-channel-index=${t??w} dir=${a??w} .label=${i} lang=${this.messages._lang??w} 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=${$({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${o} .value=${e?.toString()}></calcite-input-number>`)}};ee("calcite-color-picker",G);export{G as ColorPicker};
3
+ v5.0.0-next.43 */
4
+ import{a as pe,d as q,e as Ce}from"./KA2EYYU5.js";import{a as re}from"./B27OF4CC.js";import{A as P,B as he,C as X,D as de,E as ue,a as x,b as n,c as m,d as I,e as k,f as p,g as H,h as b,i as D,j as U,k as j,m as W,n as O,o as B,s as R,t as S,v as ce,x as _,y as N,z as V}from"./ULMQ3X5V.js";import"./7L4KTY56.js";import{a as le}from"./6HUGADED.js";import{a as T}from"./4474PI3Y.js";import{a as se}from"./TVMI22S3.js";import{c as E}from"./LA2YQLYM.js";import{a as ne}from"./CF3PBS3G.js";import{a as te}from"./CX673EPC.js";import{a as oe}from"./26NNRW3V.js";import{a as ae}from"./VNZFJTEW.js";import"./3GITZ4DI.js";import"./7RIJVHG3.js";import{e as ie,w as K}from"./QODEYSFY.js";import"./5QYXEPPN.js";import{B as F,C as g,D as Q,E as r,F as $,P as ee,g as Z,h as u,l as w,o as L}from"./FQKUJ55K.js";var Ae=Z`: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-relative-sm);line-height:var(--calcite-font-line-height-sm);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: var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-color-picker-min-width: 240px;--calcite-color-picker-spacing: var(--calcite-spacing-md)}:host([scale=l]){--calcite-internal-color-picker-min-width: 304px;--calcite-color-picker-spacing: var(--calcite-spacing-lg);font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=l]) .section:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}: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}calcite-input-number{--calcite-input-number-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-number-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-number-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color);--calcite-input-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}calcite-button{--calcite-button-text-color: var(--calcite-color-picker-action-text-color);--calcite-button-text-color-press: var(--calcite-color-picker-action-text-color-press)}calcite-button:hover,calcite-button:focus{--calcite-button-text-color: var(--calcite-color-picker-action-text-color-hover)}calcite-button:active{--calcite-button-text-color: var(--calcite-color-picker-action-text-color-press)}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-picker-tab-border-color);--calcite-tab-text-color: var(--calcite-color-picker-tab-text-color);--calcite-tab-accent-color-press: var(--calcite-color-picker-tab-accent-color);--calcite-swatch-corner-radius: var(--calcite-color-picker-swatch-corner-radius)}calcite-tab-title:hover{--calcite-color-text-1: var(--calcite-color-picker-tab-text-color-hover)}calcite-swatch{--calcite-swatch-corner-radius: var(--calcite-color-picker-swatch-corner-radius)}.container{display:flex;flex-direction:column;block-size:min-content;border:1px solid var(--calcite-color-picker-border-color, var(--calcite-color-border-3));background-color:var(--calcite-color-picker-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none));box-shadow:var(--calcite-color-picker-shadow, var(--calcite-shadow-none))}.control-and-scope{position:relative;display:flex;cursor:pointer;touch-action:none}.color-field,.control-and-scope{-webkit-user-select:none;user-select:none;border-radius:var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none)) var(--calcite-color-picker-corner-radius, var(--calcite-corner-radius-none)) var(--calcite-corner-radius-none) var(--calcite-corner-radius-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-relative-base);outline-color:transparent}.scope:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))));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-picker-text-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-buttons{display:flex}.swatch-group{margin-block-start:var(--calcite-color-picker-spacing)}:host([hidden]){display:none}[hidden]{display:none}`,fe=16,G=class extends Q{constructor(){super(),this._color=m,this.colorFieldScopeRef=F(),this.hueScopeRef=F(),this.internalColorUpdateContext=null,this.isActiveChannelInputEmpty=!1,this.mode=_.HEX,this.opacityScopeRef=F(),this.resizeObserver=te("resize",e=>this.resizeCanvas(e)),this.shiftKeyChannelAdjustment=0,this.upOrDownArrowKeyTracker=null,this._valueWasSet=!1,this.messages=oe({blocking:!0}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:a,height:o}=this.dynamicDimensions.colorField,l=Math.round(p.s/a*e),s=Math.round(p.v/o*(o-t));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(l).value(s),i)},this.cancelable=se()(this),this.drawColorControls=E((e="all")=>{(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()},fe),this.globalPointerMoveHandler=e=>{let{activeCanvasInfo:t,el:i}=this;if(!i.isConnected||!t)return;let{context:a,bounds:o}=t,l,s,{clientX:c,clientY:h}=e;a.canvas.matches(":hover")?(l=c-o.x,s=h-o.y):(c<o.x+o.width&&c>o.x?l=c-o.x:c<o.x?l=0:l=o.width,h<o.y+o.height&&h>o.y?s=h-o.y:h<o.y?s=0:s=o.height),a===this.colorFieldRenderingContext?this.captureColorFieldColor(l,s,!1):a===this.hueSliderRenderingContext?this.captureHueSliderColor(l):a===this.opacitySliderRenderingContext&&this.captureOpacitySliderValue(l)},this.globalPointerUpHandler=e=>{if(!K(e))return;let t=this.activeCanvasInfo;this.activeCanvasInfo=null,this.drawColorControls(),t&&this.calciteColorPickerChange.emit()},this.resizeCanvas=E(e=>{if(!this.hasUpdated)return;let[t]=e,i=Math.floor(t.contentBoxSize[0].inlineSize);this.dynamicDimensions.colorField.width!==i&&(this.updateDynamicDimensions(i),this.updateCanvasSize(),this.drawColorControls())},fe),this.updateDynamicDimensions=e=>{let t={width:de(e,this.staticDimensions,this.alphaChannel),height:this.staticDimensions.slider.height};this.dynamicDimensions={colorField:ue(e),slider:t}},this.focusSetter=ae()(this),this.interactiveContainer=le(this),this.channelMode="rgb",this.channels=this.toChannels(m),this.staticDimensions=D.m,this.savedColors=[],this.alphaChannel=!1,this.channelsDisabled=!1,this.clearable=!1,this.disabled=!1,this.fieldDisabled=!1,this.format="auto",this.hexDisabled=!1,this.savedDisabled=!1,this.scale="m",this.calciteColorPickerChange=L({cancelable:!1}),this.calciteColorPickerInput=L({cancelable:!1}),this.listen("keydown",this.handleChannelKeyUpOrDown,{capture:!0}),this.listen("keyup",this.handleChannelKeyUpOrDown,{capture:!0})}static{this.properties={channelMode:[16,{},{state:!0}],channels:[16,{},{state:!0}],colorFieldScopeLeft:[16,{},{state:!0}],colorFieldScopeTop:[16,{},{state:!0}],staticDimensions:[16,{},{state:!0}],hueScopeLeft:[16,{},{state:!0}],opacityScopeLeft:[16,{},{state:!0}],savedColors:[16,{},{state:!0}],scopeOrientation:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],channelsDisabled:[5,{},{type:Boolean}],clearable:[7,{},{reflect:!0,type:Boolean}],color:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],fieldDisabled:[7,{},{reflect:!0,type:Boolean}],format:[3,{},{reflect:!0}],hexDisabled:[5,{},{type:Boolean}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],savedDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],storageId:[3,{},{reflect:!0}],value:1}}static{this.styles=Ae}get baseColorFieldColor(){return this.color||this.previousColor||m}get effectiveSliderWidth(){return this.dynamicDimensions.slider.width}get color(){return this._color}set color(e){let t=this._color;this._color=e,this.handleColorChange(e,t)}get value(){return this._value}set value(e){let t=this._value;this._value=e,this.handleValueChange(e,t),this._valueWasSet=!0}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.observeResize(),this.cancelable.add([this.drawColorControls,this.resizeCanvas])}async load(){this._valueWasSet||(this._value??=R(S(m,this.alphaChannel)));let{clearable:e,color:t,format:i,value:a}=this,o=e&&!a,l=N(a),s=o||i==="auto"&&l||i===l,c=s?W(a,e,l):t;s||this.showIncompatibleColorWarning(a,i),this.setMode(i,!1),this.internalColorSet(c,!1,"initial"),this.updateStaticDimensions(this.scale),this.updateDynamicDimensions(D[this.scale].minWidth);let h=`${I}${this.storageId}`;this.storageId&&localStorage.getItem(h)&&(this.savedColors=JSON.parse(localStorage.getItem(h)))}willUpdate(e){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!==D.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)}loaded(){this.handleAlphaChannelDimensionsChange()}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("pointermove",this.globalPointerMoveHandler),window.removeEventListener("pointerup",this.globalPointerUpHandler),this.resizeObserver?.disconnect()}observeResize(){this.resizeObserver?.observe(this.el)}handleAlphaChannelChange(e){let{format:t}=this;e&&t!=="auto"&&!P(t)&&(console.warn(`ignoring alphaChannel as the current format (${t}) does not support alpha`),this.alphaChannel=!1)}handleAlphaChannelDimensionsChange(){this.drawColorControls()}handleColorChange(e,t){this.drawColorControls(),this.updateChannelsFromColor(e),this.previousColor=t}handleFormatOrAlphaChannelChange(){this.setMode(this.format),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(e="m"){this.updateStaticDimensions(e),this.updateCanvasSize(),this.drawColorControls()}handleValueChange(e,t){let{clearable:i,format:a}=this,o=!i||e,l=!1;if(o){let d=N(e);if(!d||a!=="auto"&&d!==a){this.showIncompatibleColorWarning(e,a),this._value=t;return}l=this.mode!==d,this.setMode(d,this.internalColorUpdateContext===null)}let s=this.activeCanvasInfo;if(this.internalColorUpdateContext==="initial")return;if(this.internalColorUpdateContext==="user-interaction"){this.calciteColorPickerInput.emit(),s||this.calciteColorPickerChange.emit();return}let c=W(e,i,this.mode),h=!V(c,this.color);(l||h)&&this.internalColorSet(c,this.alphaChannel&&!(this.mode.endsWith("a")||this.mode.endsWith("a-css"))||this.internalColorUpdateContext==="internal","internal")}handleTabActivate(e){this.channelMode=e.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)}handleColorFieldScopeKeyDown(e){let{key:t}=e,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};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))}handleHueScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(l+o);this.internalColorSet(s,!1)}}handleHexInputChange(e){e.stopPropagation();let{clearable:t,color:i}=this,o=e.target.value;if(t&&!o){this.internalColorSet(null);return}let l=i&&R(S(i,P(this.mode)));o!==l&&this.internalColorSet(x(o))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(x(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),o=i===3?b.max:this.channelMode==="rgb"?k[Object.keys(k)[i]]:p[Object.keys(p)[i]],l;if(!t.value)l="",this.isActiveChannelInputEmpty=!0,this.upOrDownArrowKeyTracker=null;else{let c=Number(t.value)+this.shiftKeyChannelAdjustment;l=pe(c,0,o).toString()}t.value=l,l!==""&&this.shiftKeyChannelAdjustment!==0?this.handleChannelChange(e):l!==""&&this.handleChannelChange(e)}handleChannelBlur(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];!t.value&&!this.clearable&&(t.value=a[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(o=>o.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let a=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?a:t==="ArrowDown"&&i?-a:0,t==="ArrowUp"&&(this.upOrDownArrowKeyTracker="up"),t==="ArrowDown"&&(this.upOrDownArrowKeyTracker="down")}getChannelInputLimit(e){return this.channelMode==="rgb"?k[Object.keys(k)[e]]:p[Object.keys(p)[e]]}handleChannelChange(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=[...this.channels];if(this.clearable&&!t.value){this.channels=[null,null,null,null],this.internalColorSet(null);return}let l=i===3;this.isActiveChannelInputEmpty&&this.upOrDownArrowKeyTracker&&(t.value=this.upOrDownArrowKeyTracker==="up"?(a[i]+1<=this.getChannelInputLimit(i)?a[i]+1:this.getChannelInputLimit(i)).toString():(a[i]-1>=0?a[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let s=t.value?Number(t.value):a[i];a[i]=l?B(s):s,this.updateColorFromChannels(a)}handleSavedColorKeyDown(e){ne(e.key)&&(e.preventDefault(),this.handleSavedColorSelect(e))}handleColorFieldPointerDown(e){this.handleCanvasControlPointerDown(e,this.colorFieldRenderingContext,this.captureColorFieldColor,this.colorFieldScopeRef.value)}focusScope(e){requestAnimationFrame(()=>{e.focus()})}handleHueSliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.hueSliderRenderingContext,this.captureHueSliderColor,this.hueScopeRef.value)}handleOpacitySliderPointerDown(e){this.handleCanvasControlPointerDown(e,this.opacitySliderRenderingContext,this.captureOpacitySliderValue,this.opacityScopeRef.value)}handleCanvasControlPointerDown(e,t,i,a){K(e)&&(window.addEventListener("pointermove",this.globalPointerMoveHandler),window.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeCanvasInfo={context:t,bounds:t.canvas.getBoundingClientRect()},i.call(this,e.offsetX,e.offsetY),this.focusScope(a))}handleKeyDown(e){e.key==="Enter"&&e.preventDefault()}showIncompatibleColorWarning(e,t){console.warn(`ignoring color value (${e}) as it is not compatible with the current format (${t})`)}setMode(e,t=!0){let i=e==="auto"?this.mode:e;this.mode=this.ensureCompatibleMode(i,t)}ensureCompatibleMode(e,t){let{alphaChannel:i}=this,a=P(e);if(i&&!a){let o=he(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}if(!i&&a){let o=X(e);return t&&console.warn(`setting format to (${o}) as the provided one (${e}) does not support alpha`),o}return e}captureHueSliderColor(e){let t=H/this.effectiveSliderWidth*e;this.internalColorSet(this.baseColorFieldColor.hue(t),!1)}captureOpacitySliderValue(e){let t=B(b.max/this.effectiveSliderWidth*e);this.internalColorSet(this.baseColorFieldColor.alpha(t),!1)}internalColorSet(e,t=!0,i="user-interaction"){t&&V(e,this.color)||(this.internalColorUpdateContext=i,this.color=e,this.value=this.toValue(e),this.internalColorUpdateContext=null)}toValue(e,t=this.mode){if(!e)return null;if(t.includes("hex")){let o=t===_.HEXA;return R(S(e.round(),o),o)}if(t.includes("-css")){let o=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let s=o.slice(0,3),c=o.slice(4,-1);return`${s}a(${c}, ${e.alpha()})`}return o}let a=e[X(t)]().round().object();return t.endsWith("a")?ce(a):a}getSliderCapSpacing(){let{staticDimensions:{slider:{height:e},thumb:{radius:t}}}=this;return t*2-e}updateStaticDimensions(e="m"){this.staticDimensions=D[e]}deleteColor(){let e=S(this.color,this.alphaChannel);if(!(this.savedColors.indexOf(e)>-1))return;let i=this.savedColors.filter(o=>o!==e);this.savedColors=i;let a=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(a,JSON.stringify(i))}saveColor(){let e=S(this.color,this.alphaChannel);if(this.savedColors.indexOf(e)>-1)return;let i=[...this.savedColors,e];this.savedColors=i;let a=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(a,JSON.stringify(i))}drawColorField(){let e=this.colorFieldRenderingContext,{width:t,height:i}=this.dynamicDimensions.colorField;e.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).alpha(1).string(),e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,t,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=a,e.fillRect(0,0,t,i);let o=e.createLinearGradient(0,0,0,i);o.addColorStop(0,"rgba(0,0,0,0)"),o.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=o,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let a=window.devicePixelRatio||1;e.width=i*a,e.height=t*a,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(a,a)}initColorField(e){e&&(this.colorFieldRenderingContext=e.getContext("2d"),this.updateCanvasSize("color-field"),this.drawColorControls())}initHueSlider(e){e&&(this.hueSliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("hue-slider"),this.drawHueSlider())}initOpacitySlider(e){e&&(this.opacitySliderRenderingContext=e.getContext("2d"),this.updateCanvasSize("opacity-slider"),this.drawOpacitySlider())}updateCanvasSize(e="all"){let{dynamicDimensions:t,staticDimensions:i}=this;(e==="all"||e==="color-field")&&this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas,t.colorField);let a={width:this.effectiveSliderWidth,height:i.slider.height+(i.thumb.radius-t.slider.height/2)*2};(e==="all"||e==="hue-slider")&&this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas,a),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,a)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:a,height:o}=this.dynamicDimensions.colorField,l=t.saturationv()/(p.s/a),s=o-t.value()/(p.v/o);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=s}),this.drawThumb(this.colorFieldRenderingContext,i,l,s,t,!1)}drawThumb(e,t,i,a,o,l){let c=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,a,t,0,c),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),l&&o.alpha()<1){let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,a,t-3,0,c),e.fillStyle=f,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,a,t-3,0,c);let d=l?o.alpha():1;e.fillStyle=o.rgb().alpha(d).string(),e.fill(),e.globalCompositeOperation="source-over"}drawActiveHueSliderColor(){let{color:e}=this;if(!e)return;let t=e.hsv().saturationv(100).value(100),{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=t.hue()/(H/a),l=i,s=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.hueScopeLeft=s}),this.drawThumb(this.hueSliderRenderingContext,i,s,l,t,!1)}drawHueSlider(){let e=this.hueSliderRenderingContext,{staticDimensions:{slider:{height:t},thumb:{radius:i}}}=this,a=0,o=i-t/2,l=this.effectiveSliderWidth,s=e.createLinearGradient(0,0,l,0),c=["red","yellow","lime","cyan","blue","magenta","#ff0004"],h=1/(c.length-1),d=0;c.forEach(f=>{s.addColorStop(d,x(f).string()),d+=h}),e.clearRect(0,0,l,t+this.getSliderCapSpacing()*2),this.drawSliderPath(e,t,l,a,o),e.fillStyle=s,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveHueSliderColor()}drawOpacitySlider(){let e=this.opacitySliderRenderingContext,{baseColorFieldColor:t,staticDimensions:{slider:{height:i},thumb:{radius:a}}}=this,o=0,l=a-i/2,s=this.effectiveSliderWidth;e.clearRect(0,0,s,i+this.getSliderCapSpacing()*2);let c=e.createLinearGradient(0,l,s,0),h=t.rgb().alpha(0),d=t.rgb().alpha(.5),f=t.rgb().alpha(1);c.addColorStop(0,h.string()),c.addColorStop(.5,d.string()),c.addColorStop(1,f.string()),this.drawSliderPath(e,i,s,o,l);let C=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.fillStyle=C,e.fill(),e.fillStyle=c,e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=1,e.stroke(),this.drawActiveOpacitySliderColor()}drawSliderPath(e,t,i,a,o){let l=t/2+1;e.beginPath(),e.moveTo(a+l,o),e.lineTo(a+i-l,o),e.quadraticCurveTo(a+i,o,a+i,o+l),e.lineTo(a+i,o+t-l),e.quadraticCurveTo(a+i,o+t,a+i-l,o+t),e.lineTo(a+l,o+t),e.quadraticCurveTo(a,o+t,a,o+t-l),e.lineTo(a,o+l),e.quadraticCurveTo(a,o,a+l,o),e.closePath()}getCheckeredBackgroundPattern(){if(this.checkerPattern)return this.checkerPattern;let e=document.createElement("canvas");e.width=10,e.height=10;let t=e.getContext("2d");return t.fillStyle="#ccc",t.fillRect(0,0,10,10),t.fillStyle="#fff",t.fillRect(0,0,5,5),t.fillRect(5,5,5,5),this.checkerPattern=e,e}drawActiveOpacitySliderColor(){let{color:e}=this;if(!e)return;let t=e,{staticDimensions:{thumb:{radius:i}}}=this,a=this.effectiveSliderWidth,o=O(t.alpha())/(b.max/a),l=i,s=this.getSliderBoundX(o,a,i);requestAnimationFrame(()=>{this.opacityScopeLeft=s}),this.drawThumb(this.opacitySliderRenderingContext,i,s,l,t,!0)}getSliderBoundX(e,t,i){let a=Ce(e,t,i);return a===0?e:a===-1?q(e,0,t,i,i*2):q(e,0,t,t-i*2,t-i)}handleOpacityScopeKeyDown(e){let t=e.shiftKey?10:1,{key:i}=e,a={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(a[i]){e.preventDefault();let o=a[i]*t,l=this.baseColorFieldColor.alpha(),s=this.baseColorFieldColor.alpha(l+o);this.internalColorSet(s,!1)}}updateColorFromChannels(e){this.internalColorSet(x(e,this.channelMode))}updateChannelsFromColor(e){this.channels=e?this.toChannels(e):[null,null,null,null]}toChannels(e){let{channelMode:t}=this,i=e[t]().round().array();return i.length===3&&i.push(1),i}getAdjustedScopePosition(e,t){return[e-U/2,t-U/2]}render(){let{channelsDisabled:e,color:t,colorFieldScopeLeft:i,colorFieldScopeTop:a,staticDimensions:{thumb:{radius:o}},fieldDisabled:l,hexDisabled:s,hueScopeLeft:c,messages:h,alphaChannel:d,opacityScopeLeft:f,savedColors:C,savedDisabled:y,scale:v,scopeOrientation:ve}=this,Y=this.effectiveSliderWidth,M=t?S(t,d):null,me=o,ge=c??Y*m.hue()/p.h,be=o,Se=f??Y*O(m.alpha())/b.max,J=t===void 0,z=ve==="vertical",[ye,we]=this.getAdjustedScopePosition(i,a),[$e,xe]=this.getAdjustedScopePosition(ge,me),[ke,De]=this.getAdjustedScopePosition(Se,be);return this.interactiveContainer({disabled:this.disabled,children:u`<div class=${r(n.container)}>${l?null:u`<div class=${r(n.controlAndScope)}><canvas class=${r(n.colorField)} @pointerdown=${this.handleColorFieldPointerDown} ${g(this.initColorField)}></canvas><div .ariaLabel=${z?h.value:h.saturation} .ariaValueMax=${z?p.v:p.s} aria-valuemin=0 .ariaValueNow=${(z?t?.saturationv():t?.value())||"0"} class=${r({[n.scope]:!0,[n.colorFieldScope]:!0})} @keydown=${this.handleColorFieldScopeKeyDown} role=slider style=${$({top:`${we||0}px`,left:`${ye||0}px`})} tabindex=0 ${g(this.colorFieldScopeRef)}></div></div>`}<div class=${r(n.previewAndSliders)}><calcite-swatch class=${r(n.preview)} .color=${M} .label=${M} .scale=${this.alphaChannel?"l":this.scale}></calcite-swatch><div class=${r(n.sliders)}><div class=${r(n.controlAndScope)}><canvas class=${r({[n.slider]:!0,[n.hueSlider]:!0})} @pointerdown=${this.handleHueSliderPointerDown} ${g(this.initHueSlider)}></canvas><div .ariaLabel=${h.hue} .ariaValueMax=${p.h} aria-valuemin=0 .ariaValueNow=${t?.round().hue()||m.round().hue()} class=${r({[n.scope]:!0,[n.hueScope]:!0})} @keydown=${this.handleHueScopeKeyDown} role=slider style=${$({top:`${xe}px`,left:`${$e}px`})} tabindex=0 ${g(this.hueScopeRef)}></div></div>${d?u`<div class=${r(n.controlAndScope)}><canvas class=${r({[n.slider]:!0,[n.opacitySlider]:!0})} @pointerdown=${this.handleOpacitySliderPointerDown} ${g(this.initOpacitySlider)}></canvas><div .ariaLabel=${h.opacity} .ariaValueMax=${b.max} .ariaValueMin=${b.min} .ariaValueNow=${(t||m).round().alpha()} class=${r({[n.scope]:!0,[n.opacityScope]:!0})} @keydown=${this.handleOpacityScopeKeyDown} role=slider style=${$({top:`${De}px`,left:`${ke}px`})} tabindex=0 ${g(this.opacityScopeRef)}></div></div>`:null}</div></div>${s&&e?null:u`<div class=${r({[n.controlSection]:!0,[n.section]:!0})}><div class=${r(n.hexAndChannelsGroup)}>${s?null:u`<div class=${r(n.hexOptions)}><calcite-color-picker-hex-input .allowEmpty=${this.clearable} .alphaChannel=${d} class=${r(n.control)} .messages=${h} .numberingSystem=${this.numberingSystem} @calciteColorPickerHexInputChange=${this.handleHexInputChange} .scale=${v} .value=${M}></calcite-color-picker-hex-input></div>`}${e?null:u`<calcite-tabs class=${r({[n.colorModeContainer]:!0,[n.splitSection]:!0})} .scale=${v==="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>`}${y?null:u`<div class=${r({[n.savedColorsSection]:!0,[n.section]:!0})}><div class=${r(n.header)}><label>${h.saved}</label><div class=${r(n.savedColorsButtons)}><calcite-button appearance=transparent class=${r(n.deleteColor)} .disabled=${J} .iconStart=${j.minus} kind=neutral .label=${h.deleteColor} @click=${this.deleteColor} .scale=${v} type=button></calcite-button><calcite-button appearance=transparent class=${r(n.saveColor)} .disabled=${J} .iconStart=${j.plus} kind=neutral .label=${h.saveColor} @click=${this.saveColor} .scale=${v} type=button></calcite-button></div></div>${C.length>0?u`<calcite-swatch-group class=${r(n.swatchGroup)} .label=${h.saved} .scale=${v} selection-mode=none>${re(C,A=>A,A=>u`<calcite-swatch class=${r(n.savedColor)} .color=${A} .label=${A} @click=${this.handleSavedColorSelect} @keydown=${this.handleSavedColorKeyDown} .scale=${v} tabindex=0></calcite-swatch>`)}</calcite-swatch-group>`:null}</div>`}</div>`})}renderChannelsTabTitle(e){let{channelMode:t,messages:i}=this,a=e===t,o=e==="rgb"?i.rgb:i.hsv;return T(e,u`<calcite-tab-title class=${r(n.colorMode)} data-color-mode=${e??w} @calciteTabsActivate=${this.handleTabActivate} .selected=${a}>${o}</calcite-tab-title>`)}renderChannelsTab(e){let{clearable:t,channelMode:i,channels:a,messages:o,alphaChannel:l}=this,s=e===i,h=e==="rgb"?[o.red,o.green,o.blue]:[o.hue,o.saturation,o.value],d=ie(this.el),f=l?a:a.slice(0,3);return T(e,u`<calcite-tab class=${r(n.control)} .selected=${s}><div class=${r(n.channels)} dir=ltr>${f.map((C,y)=>{let v=y===3;return v&&(C=t&&!C?C:O(C)),this.renderChannel(C,y,h[y],d,v?"%":"")})}</div></calcite-tab>`)}renderChannel(e,t,i,a,o){return T(t,u`<calcite-input-number class=${r(n.channel)} data-channel-index=${t??w} dir=${a??w} .label=${i} lang=${this.messages._lang??w} 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=${$({marginLeft:t>0&&!(this.scale==="s"&&this.alphaChannel&&t===3)?"-1px":""})} .suffixText=${o} .value=${e?.toString()}></calcite-input-number>`)}};ee("calcite-color-picker",G);export{G as ColorPicker};