@esri/calcite-components 5.0.0-next.27 → 5.0.0-next.28

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 (336) hide show
  1. package/dist/cdn/{7534BBHW.js → 26QSFR7F.js} +2 -2
  2. package/dist/cdn/{4V7BZLWR.js → 2EIDZAWM.js} +2 -2
  3. package/dist/cdn/{GJ6BOJ55.js → 2H7VF4HP.js} +2 -2
  4. package/dist/cdn/{UGNWHZTB.js → 2J6IGAJW.js} +2 -2
  5. package/dist/cdn/{G4DLNQ7K.js → 2Y7LGAAQ.js} +2 -2
  6. package/dist/cdn/{BWPFLE55.js → 3JFO4MUC.js} +2 -2
  7. package/dist/cdn/{ETNWW5JZ.js → 3NUNHJUT.js} +1 -1
  8. package/dist/cdn/{IVYPGTXR.js → 3PRYRSPU.js} +2 -2
  9. package/dist/cdn/{WBZKPWNZ.js → 3RYPPDCF.js} +2 -2
  10. package/dist/cdn/{OGT27QLK.js → 3V4Y4R3R.js} +2 -2
  11. package/dist/cdn/{OPY7DTRK.js → 3WMX2H3N.js} +1 -1
  12. package/dist/cdn/{DI373V3L.js → 4DX6AFI7.js} +2 -2
  13. package/dist/cdn/{R7BRBOU7.js → 4HYFSWQK.js} +1 -1
  14. package/dist/cdn/{RR76PS2R.js → 4RO44BNC.js} +2 -2
  15. package/dist/cdn/{RCMESI6O.js → 4ZEIXRNV.js} +2 -2
  16. package/dist/cdn/{Y3DMD2ZQ.js → 4ZTJWZEL.js} +2 -2
  17. package/dist/cdn/{B5ADLQCU.js → 55MNV4SX.js} +2 -2
  18. package/dist/cdn/{6Q5X66EV.js → 55ZUNINC.js} +2 -2
  19. package/dist/cdn/{7FZUMGVI.js → 5DSNOPU4.js} +1 -1
  20. package/dist/cdn/{VDLXSRZF.js → 5JVOYY5Q.js} +2 -2
  21. package/dist/cdn/{ZD3TGC7G.js → 5TYE2OST.js} +2 -2
  22. package/dist/cdn/{5DWNMUMC.js → 5UCLHM7V.js} +2 -2
  23. package/dist/cdn/{MSR5INSD.js → 6BMVHGKU.js} +2 -2
  24. package/dist/cdn/{2S2L3EQ7.js → 6MBPE7MP.js} +2 -2
  25. package/dist/cdn/{5VNWY5LG.js → 6N6F7HUE.js} +2 -2
  26. package/dist/cdn/{AC35Y5HD.js → 6ZGA5MOX.js} +2 -2
  27. package/dist/cdn/{MNEZ2PN3.js → 6ZMZXXUS.js} +2 -2
  28. package/dist/cdn/{IKQHPTMM.js → 7NEVPJQK.js} +2 -2
  29. package/dist/cdn/{O2KUWZ7O.js → 7SVTDM3O.js} +1 -1
  30. package/dist/cdn/{MMDFEAQH.js → 7VF5LHA7.js} +2 -2
  31. package/dist/cdn/{KEM4MXHR.js → 7VTI2NCJ.js} +2 -2
  32. package/dist/cdn/{KEWRGL4F.js → A2AZZATN.js} +2 -2
  33. package/dist/cdn/{AKR4JST4.js → AEE6OVYK.js} +2 -2
  34. package/dist/cdn/{LRICWPMS.js → ASQJLRWH.js} +2 -2
  35. package/dist/cdn/{563KGS4Y.js → AZL3A475.js} +1 -1
  36. package/dist/cdn/{XCTR672U.js → BW4MDK5S.js} +2 -2
  37. package/dist/cdn/{QRC6GKFC.js → BXMZ7UKN.js} +2 -2
  38. package/dist/cdn/{H4BVJCL2.js → C3I4G4TE.js} +2 -2
  39. package/dist/cdn/{Q3SFMQ52.js → C4X7YP5A.js} +2 -2
  40. package/dist/cdn/{A7LQL3JY.js → CBV3TPAG.js} +2 -2
  41. package/dist/cdn/{75JUYSEU.js → CPBV7Y2T.js} +2 -2
  42. package/dist/cdn/{SY5KU6WQ.js → CU3NAWYI.js} +2 -2
  43. package/dist/cdn/{AHWS3HRJ.js → D7CVTX7H.js} +2 -2
  44. package/dist/cdn/{DRIYSMRA.js → DAGZ3SWT.js} +2 -2
  45. package/dist/cdn/DBNHA57P.js +4 -0
  46. package/dist/cdn/{LICAKY7L.js → DCL3I2DT.js} +1 -1
  47. package/dist/cdn/{E6WZYQR6.js → DCOOWEHP.js} +2 -2
  48. package/dist/cdn/{2YK6CVS6.js → DWKM734D.js} +2 -2
  49. package/dist/cdn/{A2XXH362.js → EAM77PTJ.js} +2 -2
  50. package/dist/cdn/{HBRMGV7K.js → EBJF2Z5D.js} +2 -2
  51. package/dist/cdn/{VT6VJLTC.js → EJBQRGLZ.js} +1 -1
  52. package/dist/cdn/{6MHFUQ4I.js → EMU2AT4J.js} +2 -2
  53. package/dist/cdn/{QZYSDV6Y.js → ESYCDUKF.js} +1 -1
  54. package/dist/cdn/{ADI5Y4OW.js → F4IDAPEQ.js} +2 -2
  55. package/dist/cdn/{XHPBB4XG.js → FBLHNFXG.js} +2 -2
  56. package/dist/cdn/{AVLDSF5N.js → FIY2DX6P.js} +2 -2
  57. package/dist/cdn/{65TH2FK7.js → FJHKFLZA.js} +2 -2
  58. package/dist/cdn/{5253XWSA.js → FST7R3GB.js} +2 -2
  59. package/dist/cdn/{P525JITH.js → G2NYSDPG.js} +2 -2
  60. package/dist/cdn/{PDTD3TOA.js → G3JDC5B3.js} +2 -2
  61. package/dist/cdn/{X7XVUJ7O.js → G55KDLFK.js} +2 -2
  62. package/dist/cdn/{HHHR4LHE.js → G6JHTOAV.js} +2 -2
  63. package/dist/cdn/{MWIH32NM.js → G6WKLXCA.js} +2 -2
  64. package/dist/cdn/{RYA22M5U.js → GGDDKWJF.js} +1 -1
  65. package/dist/cdn/{6EM466OS.js → H27TXWXX.js} +2 -2
  66. package/dist/cdn/{3BS4LNKS.js → H2E2EHFM.js} +1 -1
  67. package/dist/cdn/{6ISI2CAF.js → H4CGEEPI.js} +2 -2
  68. package/dist/cdn/{Y4QOUGJH.js → H4TALTI2.js} +2 -2
  69. package/dist/cdn/{BYMVJ3VA.js → H6MITS4O.js} +2 -2
  70. package/dist/cdn/{Q5GMRZGW.js → HFYC6UTK.js} +2 -2
  71. package/dist/cdn/{QJ3D4NWB.js → HLOPOVBH.js} +1 -1
  72. package/dist/cdn/{HECPNLTC.js → HXAV5GMB.js} +2 -2
  73. package/dist/cdn/{BG7PIWAE.js → HZOORBJ3.js} +2 -2
  74. package/dist/cdn/{U77J5VMI.js → IBPV7BT4.js} +2 -2
  75. package/dist/cdn/{C7AEIVEN.js → IC5U3US4.js} +2 -2
  76. package/dist/cdn/{RSGI4OXJ.js → IDILHLJF.js} +2 -2
  77. package/dist/cdn/{K2GQIVQ6.js → IKZF6TKF.js} +2 -2
  78. package/dist/cdn/{U3MMDQWZ.js → ISQHYPZ4.js} +2 -2
  79. package/dist/cdn/{KKNAISCF.js → J7KS3TRU.js} +2 -2
  80. package/dist/cdn/{LF3YYZDO.js → JMKIESON.js} +2 -2
  81. package/dist/cdn/{PDQUI7VW.js → JNHQTFV5.js} +2 -2
  82. package/dist/cdn/{PXEIDJCC.js → JSBPVJXR.js} +2 -2
  83. package/dist/cdn/{AN35IWDM.js → JZSRHSJY.js} +2 -2
  84. package/dist/cdn/{OH5V54HS.js → K2PWBMJT.js} +2 -2
  85. package/dist/cdn/{SM3ZYGA6.js → K3BDA6T2.js} +2 -2
  86. package/dist/cdn/{GZZKKWOS.js → KHQANRU5.js} +1 -1
  87. package/dist/cdn/{IXD3TR3C.js → KKR37WY4.js} +2 -2
  88. package/dist/cdn/{GNDZLX6A.js → KLNZB56I.js} +2 -2
  89. package/dist/cdn/{JPM3XDBS.js → KNAMOTPE.js} +1 -1
  90. package/dist/cdn/{3VEW4WQK.js → KOUATFD2.js} +2 -2
  91. package/dist/cdn/{XGGDZ32P.js → KQIT3G2O.js} +2 -2
  92. package/dist/cdn/{UPJPTRRY.js → KR6644B5.js} +2 -2
  93. package/dist/cdn/{FCK2YVGM.js → KUCB7AAR.js} +2 -2
  94. package/dist/cdn/{BSYFCWRY.js → KXPGI7RX.js} +2 -2
  95. package/dist/cdn/{7UWAXM2S.js → L2YNL67H.js} +2 -2
  96. package/dist/cdn/{ZPFWHVJ3.js → LHU3B37P.js} +2 -2
  97. package/dist/cdn/{WXU74YSS.js → LI5Z7CE2.js} +2 -2
  98. package/dist/cdn/{ONONU6SL.js → LUNNRUAX.js} +1 -1
  99. package/dist/cdn/{G6OIPZFQ.js → MF7X7UFW.js} +2 -2
  100. package/dist/cdn/{NW3ES5B4.js → MMXI2D6G.js} +1 -1
  101. package/dist/cdn/{D77DSPLC.js → MOK6KL7H.js} +2 -2
  102. package/dist/cdn/{INTN5KDJ.js → MVCPUUT7.js} +2 -2
  103. package/dist/cdn/{336XVH75.js → MXHQJDVJ.js} +2 -2
  104. package/dist/cdn/{KOCV6HOA.js → MYAPFTJH.js} +2 -2
  105. package/dist/cdn/{VE4ELDOI.js → N5HK5HEI.js} +2 -2
  106. package/dist/cdn/{QWO4SEL6.js → NHVMWL3A.js} +2 -2
  107. package/dist/cdn/{FK2YURR7.js → NL2O53BU.js} +2 -2
  108. package/dist/cdn/{GQ276M6N.js → NNZ43CPZ.js} +2 -2
  109. package/dist/cdn/{ST2VDJTE.js → NUDIM2KL.js} +2 -2
  110. package/dist/cdn/{RCREKRA6.js → NZSUCBWV.js} +2 -2
  111. package/dist/cdn/{K7Q2ANSC.js → OEJG46EH.js} +2 -2
  112. package/dist/cdn/{7UOCOKWE.js → OF4NOCZU.js} +2 -2
  113. package/dist/cdn/{TNTDALVV.js → OU7I6WEY.js} +2 -2
  114. package/dist/cdn/{Z5GKFYA4.js → OVQX33E2.js} +1 -1
  115. package/dist/cdn/{35SARPY5.js → P3FHGL5F.js} +2 -2
  116. package/dist/cdn/{ZW6NLHDZ.js → PHIYXNE2.js} +2 -2
  117. package/dist/cdn/{U3XZF46Y.js → PZFUJGU2.js} +2 -2
  118. package/dist/cdn/{VK7J7QZN.js → QERW4UQO.js} +2 -2
  119. package/dist/cdn/{HCVN4Q5N.js → QJJ7H6I6.js} +2 -2
  120. package/dist/cdn/{YEMYHD55.js → QMZABX7P.js} +1 -1
  121. package/dist/cdn/{DD7LLHWA.js → QOM7U4UZ.js} +2 -2
  122. package/dist/cdn/{IMYRTSDO.js → QX4LMLHF.js} +2 -2
  123. package/dist/cdn/{JCGYNLNJ.js → QYGH3IIO.js} +2 -2
  124. package/dist/cdn/{JL5GJZBR.js → R4RP6VRQ.js} +2 -2
  125. package/dist/cdn/{TWFX6N6U.js → RFMQHFRV.js} +2 -2
  126. package/dist/cdn/{BSDYTDKB.js → ROYB4S4X.js} +2 -2
  127. package/dist/cdn/{NUXG46RX.js → RU6R2G5Y.js} +2 -2
  128. package/dist/cdn/{FWN7QRQ6.js → S2VACO7E.js} +2 -2
  129. package/dist/cdn/{5QEHA37M.js → SN26BSQX.js} +2 -2
  130. package/dist/cdn/{HS72OF43.js → SOZ5RY73.js} +2 -2
  131. package/dist/cdn/{MQ6F6Y65.js → SV3XQU5A.js} +1 -1
  132. package/dist/cdn/{CRQFGR7B.js → SV6DIEEI.js} +2 -2
  133. package/dist/cdn/{REMNCLV5.js → SWLBZTLD.js} +1 -1
  134. package/dist/cdn/{U56QVRC7.js → TQU7Q3EV.js} +2 -2
  135. package/dist/cdn/{7QBX6HG6.js → TSO7S7PW.js} +1 -1
  136. package/dist/cdn/{AIX6NZYG.js → TTJX2KFC.js} +2 -2
  137. package/dist/cdn/{2JL5ZGH7.js → U2E34VFR.js} +2 -2
  138. package/dist/cdn/{R2YM4H5W.js → U7YS2SMS.js} +1 -1
  139. package/dist/cdn/{ADHO4BCO.js → UD3HTL7I.js} +2 -2
  140. package/dist/cdn/{EI2RE76N.js → UNLRDVUQ.js} +2 -2
  141. package/dist/cdn/{7GTMUJBK.js → UQLN223W.js} +2 -2
  142. package/dist/cdn/{SEAKLVI3.js → USFXGR5W.js} +2 -2
  143. package/dist/cdn/{UJI5PZDE.js → USLAZ674.js} +2 -2
  144. package/dist/cdn/{PPEGXL3J.js → UW45WQTS.js} +2 -2
  145. package/dist/cdn/{T7VIIEO7.js → UWOTAU32.js} +2 -2
  146. package/dist/cdn/{DC2X7EYH.js → VAX5Y6UB.js} +2 -2
  147. package/dist/cdn/{3YPTDAT3.js → VBTWHDTJ.js} +1 -1
  148. package/dist/cdn/{F6IUDO2N.js → VCMJECUB.js} +2 -2
  149. package/dist/cdn/{OYLLYGS7.js → VGQB4AHH.js} +2 -2
  150. package/dist/cdn/{4DBNEHK3.js → VPOPLMYG.js} +2 -2
  151. package/dist/cdn/{PLTCLO5M.js → W5MUU35Y.js} +2 -2
  152. package/dist/cdn/{QOEYQJ3H.js → W672JU5G.js} +1 -1
  153. package/dist/cdn/{D235BG5B.js → WCYK7MUQ.js} +2 -2
  154. package/dist/cdn/{6OM4CJE6.js → WRLB6XFZ.js} +2 -2
  155. package/dist/cdn/{J4GW4FQA.js → WUPPIKDG.js} +1 -1
  156. package/dist/cdn/{3IEPPQ7X.js → WUWLWWQ6.js} +2 -2
  157. package/dist/cdn/{W75LIZ2T.js → WYB5UKU7.js} +2 -2
  158. package/dist/cdn/{QCFDEKM7.js → X2P4SGUR.js} +2 -2
  159. package/dist/cdn/{UNVOG4UB.js → XGQOOBLT.js} +2 -2
  160. package/dist/cdn/{VFG5QVI4.js → XSN6FWMH.js} +2 -2
  161. package/dist/cdn/{AJSBRVAB.js → Y7JKWXU3.js} +2 -2
  162. package/dist/cdn/{6KQ4JFWQ.js → YA3Q555R.js} +2 -2
  163. package/dist/cdn/{6WGTRGQ3.js → YB2JZFAL.js} +2 -2
  164. package/dist/cdn/{HLYZU57U.js → YBDW7FW6.js} +2 -2
  165. package/dist/cdn/{NTSGNHPP.js → YMYZDMBM.js} +2 -2
  166. package/dist/cdn/{GLKK4ERF.js → YROQ3D7Z.js} +2 -2
  167. package/dist/cdn/{GRLGAWZJ.js → YXCASTIP.js} +2 -2
  168. package/dist/cdn/{WCBSDOQC.js → ZA3IWUHI.js} +2 -2
  169. package/dist/cdn/{LKATYYOC.js → ZGMLXO4B.js} +2 -2
  170. package/dist/cdn/{V2JLOD4Q.js → ZHK6KUIW.js} +2 -2
  171. package/dist/cdn/{ZPHYW55J.js → ZOAOP2LU.js} +2 -2
  172. package/dist/cdn/{PQYHMM2S.js → ZWT36WSD.js} +2 -2
  173. package/dist/cdn/index.js +2 -2
  174. package/dist/chunks/ExpandToggle.js +1 -1
  175. package/dist/chunks/FloatingArrow.js +1 -1
  176. package/dist/chunks/Heading.js +1 -1
  177. package/dist/chunks/InternalLabel.js +1 -1
  178. package/dist/chunks/Validation.js +1 -1
  179. package/dist/chunks/array.js +1 -1
  180. package/dist/chunks/component.js +1 -1
  181. package/dist/chunks/core.js +1 -1
  182. package/dist/chunks/date.js +1 -1
  183. package/dist/chunks/dom.js +1 -1
  184. package/dist/chunks/dynamicClasses.js +1 -1
  185. package/dist/chunks/filter.js +1 -1
  186. package/dist/chunks/floating-ui.js +1 -1
  187. package/dist/chunks/form.js +1 -1
  188. package/dist/chunks/global.js +1 -1
  189. package/dist/chunks/guid.js +1 -1
  190. package/dist/chunks/header.js +1 -1
  191. package/dist/chunks/input.js +1 -1
  192. package/dist/chunks/interact.min.js +1 -1
  193. package/dist/chunks/key.js +1 -1
  194. package/dist/chunks/label.js +1 -1
  195. package/dist/chunks/locale.js +1 -1
  196. package/dist/chunks/logger.js +1 -1
  197. package/dist/chunks/math.js +1 -1
  198. package/dist/chunks/observers.js +1 -1
  199. package/dist/chunks/openCloseComponent.js +1 -1
  200. package/dist/chunks/resources.js +1 -1
  201. package/dist/chunks/resources2.js +1 -1
  202. package/dist/chunks/resources3.js +1 -1
  203. package/dist/chunks/resources4.js +1 -1
  204. package/dist/chunks/resources5.js +1 -1
  205. package/dist/chunks/resources6.js +1 -1
  206. package/dist/chunks/resources7.js +1 -1
  207. package/dist/chunks/resources8.js +1 -1
  208. package/dist/chunks/responsive.js +1 -1
  209. package/dist/chunks/runtime.js +4 -4
  210. package/dist/chunks/sortable.js +1 -1
  211. package/dist/chunks/sortableComponent.js +1 -1
  212. package/dist/chunks/text.js +1 -1
  213. package/dist/chunks/useCancelable.js +1 -1
  214. package/dist/chunks/useFocusTrap.js +1 -1
  215. package/dist/chunks/useInteractive.js +1 -1
  216. package/dist/chunks/usePreventDocumentScroll.js +1 -1
  217. package/dist/chunks/useSetFocus.js +1 -1
  218. package/dist/chunks/useT9n.js +1 -1
  219. package/dist/chunks/useTime.js +1 -1
  220. package/dist/chunks/utils.js +1 -1
  221. package/dist/chunks/utils2.js +1 -1
  222. package/dist/chunks/utils3.js +1 -1
  223. package/dist/chunks/utils4.js +1 -1
  224. package/dist/components/calcite-accordion/customElement.js +1 -1
  225. package/dist/components/calcite-accordion-item/customElement.js +1 -1
  226. package/dist/components/calcite-action/customElement.js +2 -2
  227. package/dist/components/calcite-action-bar/customElement.js +1 -1
  228. package/dist/components/calcite-action-group/customElement.js +1 -1
  229. package/dist/components/calcite-action-menu/customElement.js +1 -1
  230. package/dist/components/calcite-action-pad/customElement.js +1 -1
  231. package/dist/components/calcite-alert/customElement.js +1 -1
  232. package/dist/components/calcite-autocomplete/customElement.js +1 -1
  233. package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
  234. package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
  235. package/dist/components/calcite-avatar/customElement.js +1 -1
  236. package/dist/components/calcite-block/customElement.js +1 -1
  237. package/dist/components/calcite-block-group/customElement.js +1 -1
  238. package/dist/components/calcite-block-section/customElement.js +1 -1
  239. package/dist/components/calcite-button/customElement.js +1 -1
  240. package/dist/components/calcite-card/customElement.js +1 -1
  241. package/dist/components/calcite-card-group/customElement.js +1 -1
  242. package/dist/components/calcite-carousel/customElement.js +1 -1
  243. package/dist/components/calcite-carousel-item/customElement.js +1 -1
  244. package/dist/components/calcite-checkbox/customElement.js +1 -1
  245. package/dist/components/calcite-chip/customElement.js +1 -1
  246. package/dist/components/calcite-chip-group/customElement.js +1 -1
  247. package/dist/components/calcite-color-picker/customElement.js +1 -1
  248. package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
  249. package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
  250. package/dist/components/calcite-combobox/customElement.js +1 -1
  251. package/dist/components/calcite-combobox-item/customElement.js +1 -1
  252. package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
  253. package/dist/components/calcite-date-picker/customElement.js +1 -1
  254. package/dist/components/calcite-date-picker-day/customElement.js +1 -1
  255. package/dist/components/calcite-date-picker-month/customElement.js +1 -1
  256. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
  257. package/dist/components/calcite-dialog/customElement.js +1 -1
  258. package/dist/components/calcite-dropdown/customElement.js +1 -1
  259. package/dist/components/calcite-dropdown-group/customElement.js +1 -1
  260. package/dist/components/calcite-dropdown-item/customElement.js +1 -1
  261. package/dist/components/calcite-fab/customElement.js +1 -1
  262. package/dist/components/calcite-filter/customElement.js +1 -1
  263. package/dist/components/calcite-flow/customElement.js +1 -1
  264. package/dist/components/calcite-flow-item/customElement.js +1 -1
  265. package/dist/components/calcite-graph/customElement.js +1 -1
  266. package/dist/components/calcite-handle/customElement.js +1 -1
  267. package/dist/components/calcite-icon/customElement.js +1 -1
  268. package/dist/components/calcite-inline-editable/customElement.js +1 -1
  269. package/dist/components/calcite-input/customElement.js +1 -1
  270. package/dist/components/calcite-input-date-picker/customElement.js +1 -1
  271. package/dist/components/calcite-input-message/customElement.js +1 -1
  272. package/dist/components/calcite-input-number/customElement.js +1 -1
  273. package/dist/components/calcite-input-text/customElement.js +1 -1
  274. package/dist/components/calcite-input-time-picker/customElement.js +1 -1
  275. package/dist/components/calcite-input-time-zone/customElement.js +1 -1
  276. package/dist/components/calcite-label/customElement.js +1 -1
  277. package/dist/components/calcite-link/customElement.js +1 -1
  278. package/dist/components/calcite-list/customElement.js +1 -1
  279. package/dist/components/calcite-list-item/customElement.js +1 -1
  280. package/dist/components/calcite-list-item-group/customElement.js +1 -1
  281. package/dist/components/calcite-loader/customElement.js +1 -1
  282. package/dist/components/calcite-menu/customElement.js +1 -1
  283. package/dist/components/calcite-menu-item/customElement.js +1 -1
  284. package/dist/components/calcite-meter/customElement.js +1 -1
  285. package/dist/components/calcite-navigation/customElement.js +1 -1
  286. package/dist/components/calcite-navigation-logo/customElement.js +1 -1
  287. package/dist/components/calcite-navigation-user/customElement.js +1 -1
  288. package/dist/components/calcite-notice/customElement.js +1 -1
  289. package/dist/components/calcite-option/customElement.js +1 -1
  290. package/dist/components/calcite-option-group/customElement.js +1 -1
  291. package/dist/components/calcite-pagination/customElement.js +1 -1
  292. package/dist/components/calcite-panel/customElement.js +1 -1
  293. package/dist/components/calcite-popover/customElement.js +1 -1
  294. package/dist/components/calcite-progress/customElement.js +1 -1
  295. package/dist/components/calcite-radio-button/customElement.js +1 -1
  296. package/dist/components/calcite-radio-button-group/customElement.js +1 -1
  297. package/dist/components/calcite-rating/customElement.js +1 -1
  298. package/dist/components/calcite-scrim/customElement.js +1 -1
  299. package/dist/components/calcite-segmented-control/customElement.js +1 -1
  300. package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
  301. package/dist/components/calcite-select/customElement.js +1 -1
  302. package/dist/components/calcite-sheet/customElement.js +1 -1
  303. package/dist/components/calcite-shell/customElement.js +1 -1
  304. package/dist/components/calcite-shell-panel/customElement.js +1 -1
  305. package/dist/components/calcite-slider/customElement.js +1 -1
  306. package/dist/components/calcite-sort-handle/customElement.js +1 -1
  307. package/dist/components/calcite-sortable-list/customElement.js +1 -1
  308. package/dist/components/calcite-split-button/customElement.js +1 -1
  309. package/dist/components/calcite-stack/customElement.js +1 -1
  310. package/dist/components/calcite-stepper/customElement.js +1 -1
  311. package/dist/components/calcite-stepper-item/customElement.js +1 -1
  312. package/dist/components/calcite-swatch/customElement.js +1 -1
  313. package/dist/components/calcite-swatch-group/customElement.js +1 -1
  314. package/dist/components/calcite-switch/customElement.js +1 -1
  315. package/dist/components/calcite-tab/customElement.js +1 -1
  316. package/dist/components/calcite-tab-nav/customElement.js +1 -1
  317. package/dist/components/calcite-tab-title/customElement.js +1 -1
  318. package/dist/components/calcite-table/customElement.js +1 -1
  319. package/dist/components/calcite-table-cell/customElement.js +1 -1
  320. package/dist/components/calcite-table-header/customElement.js +1 -1
  321. package/dist/components/calcite-table-row/customElement.js +1 -1
  322. package/dist/components/calcite-tabs/customElement.js +1 -1
  323. package/dist/components/calcite-text-area/customElement.js +1 -1
  324. package/dist/components/calcite-tile/customElement.js +1 -1
  325. package/dist/components/calcite-tile-group/customElement.js +1 -1
  326. package/dist/components/calcite-time-picker/customElement.js +1 -1
  327. package/dist/components/calcite-tooltip/customElement.js +1 -1
  328. package/dist/components/calcite-tree/customElement.js +1 -1
  329. package/dist/components/calcite-tree-item/customElement.js +1 -1
  330. package/dist/docs/api.json +1 -1
  331. package/dist/docs/docs.json +1 -1
  332. package/dist/docs/web-types.json +1 -1
  333. package/dist/index.js +1 -1
  334. package/dist/loader.js +1 -1
  335. package/package.json +2 -2
  336. package/dist/cdn/5XGADHYE.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.27 */
4
- import{a as A}from"./7GTMUJBK.js";import{a as P}from"./EI2RE76N.js";import{b as I}from"./AVLDSF5N.js";import{a as z}from"./PDTD3TOA.js";import{a as O}from"./C7AEIVEN.js";import"./T7VIIEO7.js";import{a as w}from"./5253XWSA.js";import{a as h}from"./V2JLOD4Q.js";import"./NW3ES5B4.js";import{a as m}from"./LF3YYZDO.js";import{a as B}from"./NUXG46RX.js";import{a as E}from"./6MHFUQ4I.js";import{a as p}from"./REMNCLV5.js";import"./ST2VDJTE.js";import{t as r,u as H}from"./SY5KU6WQ.js";import"./R7BRBOU7.js";import{C as S,D as C,E as a,P as y,g as x,h as n,l as f,o as c}from"./DI373V3L.js";var s={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",container:"container",content:"content",contentEnd:"content-end",contentStart:"content-start",description:"description",header:"header",headerContainer:"header-container",headerHasContent:"header--has-content",headerDraggable:"header--draggable",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},g={actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start",headerMenuActions:"header-menu-actions"},u={expanded:"chevron-up",collapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},X=x`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}: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([scale=s]) .header{gap:var(--calcite-spacing-sm)}:host([scale=s]) .icon-end-container{gap:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm)}:host([scale=s]) .description{font-size:var(--calcite-font-size-xs)}:host([scale=s]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-sm);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-xxs)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) )}:host([scale=m]) .header{gap:var(--calcite-spacing-md)}:host([scale=m]) .icon-end-container{gap:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size)}:host([scale=m]) .description{font-size:var(--calcite-font-size-sm)}:host([scale=m]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-md);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) )}:host([scale=l]) .header{gap:var(--calcite-spacing-lg)}:host([scale=l]) .icon-end-container{gap:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md)}:host([scale=l]) .description{font-size:var(--calcite-font-size)}:host([scale=l]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-lg);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-lg)) )}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;border-color:var(--calcite-block-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{justify-content:flex-start}.header--has-content{padding:var(--calcite-internal-block-header-content-padding)}.header--draggable{padding-inline-start:var(--calcite-spacing-xxs)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto auto auto;grid-template-areas:"handle header icon-end menu actions-end"}.icon--start,.icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.actions-end{align-items:center;display:flex;gap:var(--calcite-internal-block-actions-spacing);grid-area:actions-end;padding-block:var(--calcite-internal-block-actions-spacing);padding-inline-end:var(--calcite-internal-block-actions-spacing)}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;outline-color:transparent;font-family:inherit;text-align:initial;background-color:var(--calcite-block-header-background-color, transparent)}.toggle:hover{background-color:var(--calcite-block-header-background-color-hover, var(--calcite-color-foreground-2))}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:active{background-color:var(--calcite-block-header-background-color-press, var(--calcite-color-foreground-3))}calcite-loader[inline]{align-self:center}calcite-sort-handle{align-self:center;grid-area:handle;margin-block:var(--calcite-internal-block-actions-spacing);padding-inline-start:var(--calcite-spacing-xxs)}.title{display:flex;flex-direction:column}.header .title .heading{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-heading-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug)}.description{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-description-text-color, var(--calcite-color-text-3));font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-snug)}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;grid-area:icon-end}.toggle-icon{align-self:center;justify-self:end;transition-property:color;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.toggle:hover .toggle-icon{color:var(--calcite-block-icon-color-hover, var(--calcite-color-text-1))}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%}@keyframes in{0%{opacity:0}to{opacity:1}}.content{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-internal-block-padding-block);padding-inline:var(--calcite-internal-block-padding-inline)}.content-end,.content-start{display:flex;align-items:center;color:var(--calcite-block-text-color, var(--calcite-color-text-3))}calcite-action-menu{align-self:center;grid-area:menu;margin-inline-end:var(--calcite-internal-block-actions-spacing)}:host([expanded]){margin-block:.5rem}:host([expanded]) .header .title .heading{color:var(--calcite-block-heading-text-color, var(--calcite-block-heading-text-color-press, var(--calcite-color-text-1)));font-weight:var(--calcite-font-weight-medium)}:host([expanded]) .description{color:var(--calcite-block-description-text-color, var(--calcite-color-text-2))}:host([expanded]) .icon--start,:host([expanded]) .icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-1))}:host([expanded][scale=s]){margin-block:var(--calcite-spacing-xxs)}:host([expanded][scale=l]){margin-block:var(--calcite-spacing-md)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(...arguments),this.transitionProp="margin-top",this.blockSectionChildren=[],this.messages=B(),this.focusSetter=E()(this),this.interactiveContainer=w(this),this.hasContentEnd=!1,this.hasContentStart=!1,this.hasEndActions=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.loading=!1,this.menuPlacement=I,this.addToItems=[],this.moveToItems=[],this.sortDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.setPosition=null,this.setSize=null,this.sortHandleOpen=!1,this.calciteBlockBeforeClose=c({cancelable:!1}),this.calciteBlockBeforeOpen=c({cancelable:!1}),this.calciteBlockClose=c({cancelable:!1}),this.calciteBlockCollapse=c({cancelable:!1}),this.calciteBlockExpand=c({cancelable:!1}),this.calciteBlockOpen=c({cancelable:!1}),this.calciteBlockSortHandleBeforeClose=c({cancelable:!1}),this.calciteBlockSortHandleBeforeOpen=c({cancelable:!1}),this.calciteBlockSortHandleClose=c({cancelable:!1}),this.calciteBlockSortHandleOpen=c({cancelable:!1}),this.calciteBlockToggle=c({cancelable:!1}),this.calciteInternalBlockUpdateSortMenuItems=c({cancelable:!1})}static{this.properties={hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasMenuActions:[16,{},{state:!0}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],label:1,menuFlipPlacements:[0,{},{attribute:!1}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],sortDisabled:[5,{},{type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}]}}static{this.styles=[A,X,P]}get open(){return this.expanded}set open(e){m.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}load(){!this.heading&&!this.label&&m.warn(`${this.el.tagName} is missing both heading & label. Please provide a heading or label for the component to be accessible.`)}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&z(this),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockExpand.emit():this.calciteBlockCollapse.emit()),e.has("scale")&&this.hasUpdated&&this.updateBlockSectionScale()}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteBlockSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteBlockSortHandleOpen.emit()}onHeaderClick(){this.expanded=!this.expanded,this.calciteBlockToggle.emit()}menuActionsSlotChangeHandler(e){this.hasMenuActions=r(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=r(e)}handleContentEndSlotChange(e){this.hasContentEnd=r(e)}handleContentStartSlotChange(e){this.hasContentStart=r(e)}handleDefaultSlotChange(e){this.blockSectionChildren=H(e,"calcite-block-section"),this.updateBlockSectionScale()}updateBlockSectionScale(){this.blockSectionChildren.forEach(e=>{e.scale=this.scale})}renderScrim(){let{loading:e}=this,l=n`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,l]}renderLoaderStatusIcon(){let{loading:e,messages:l,status:i}=this;return e?h("loader",n`<div class=${a(t.icon)}><calcite-loader inline .label=${l.loading} .scale=${this.scale}></calcite-loader></div>`):i?h("status-icon",n`<div class=${a(t.icon)}><calcite-icon class=${a({[t.statusIcon]:!0,[t.valid]:i=="valid",[t.invalid]:i=="invalid"})} .icon=${u[i]} .scale=${p(this.scale)}></calcite-icon></div>`):null}renderActionsEnd(){return n`<div class=${a(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${g.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentEnd(){return n`<div class=${a({[t.iconEndContainer]:!this.iconEnd&&!this.collapsible})} .hidden=${!this.hasContentEnd}><div class=${a(t.contentEnd)}><slot name=${g.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div></div>`}renderContentStart(){return n`<div class=${a(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${g.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:l,description:i}=this;return e||i?n`<div class=${a(t.title)}>${O({class:t.heading,level:l,children:e})}${i?n`<div class=${a(t.description)}>${i}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:l}=this,i=l==="both"||e==="start"?l==="start":l==="end",o=e==="start"?this.iconStart:this.iconEnd,d=e==="start"?t.iconStart:t.iconEnd;if(o)return h(o,n`<calcite-icon class=${a(d)} .flipRtl=${i} .icon=${o} .scale=${p(this.scale)}></calcite-icon>`)}render(){let{collapsible:e,loading:l,expanded:i,label:o,heading:d,messages:b,description:T,menuFlipPlacements:D,menuPlacement:M,moveToItems:L,addToItems:F,setPosition:N,setSize:U,dragDisabled:R,sortDisabled:j,iconEnd:k,hasContentEnd:V,hasContentStart:G,iconStart:q}=this,J=i?b.collapse:b.expand,K=!!(d||T||V||G||q||l||status),$=n`<header class=${a({[t.header]:!0,[t.headerHasContent]:K,[t.headerDraggable]:this.dragHandle})} id=${s.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,Q=i?u.expanded:u.collapsed,W=n`<div class=${a(t.headerContainer)}>${this.dragHandle?n`<calcite-sort-handle .addToItems=${F} .disabled=${R} .label=${d||o} .moveToItems=${L} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${N} .setSize=${U} .sortDisabled=${j} ${S(this.setSortHandleEl)}></calcite-sort-handle>`:null}${e?n`<button aria-controls=${s.content} aria-describedby=${s.header} .ariaExpanded=${e?i:null} class=${a(t.toggle)} id=${s.toggle} @click=${this.onHeaderClick} title=${J??f}>${$}<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}<calcite-icon class=${a(t.toggleIcon)} .icon=${Q} .scale=${p(this.scale)}></calcite-icon></div></button>`:$}${k&&!e?n`<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}</div>`:!k&&!e?this.renderContentEnd():null}<calcite-action-menu .flipPlacements=${D??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${b.options} .overlayPositioning=${this.overlayPositioning} .placement=${M} .scale=${this.scale}><slot name=${g.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return this.interactiveContainer({disabled:this.disabled,children:n`<article aria-label=${o??f} .ariaBusy=${l} class=${a({[t.container]:!0})}>${W}<section aria-labelledby=${s.toggle} class=${a(t.content)} .hidden=${!i} id=${s.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",v);export{v as Block};
3
+ v5.0.0-next.28 */
4
+ import{a as A}from"./UQLN223W.js";import{a as P}from"./UNLRDVUQ.js";import{b as I}from"./FIY2DX6P.js";import{a as z}from"./G3JDC5B3.js";import{a as O}from"./IC5U3US4.js";import"./UWOTAU32.js";import{a as w}from"./FST7R3GB.js";import{a as h}from"./ZHK6KUIW.js";import"./MMXI2D6G.js";import{a as m}from"./JMKIESON.js";import{a as B}from"./RU6R2G5Y.js";import{a as E}from"./EMU2AT4J.js";import{a as p}from"./SWLBZTLD.js";import"./NUDIM2KL.js";import{t as r,u as H}from"./CU3NAWYI.js";import"./4HYFSWQK.js";import{C as S,D as C,E as a,P as y,g as x,h as n,l as f,o as c}from"./4DX6AFI7.js";var s={content:"content",toggle:"toggle",header:"header"},t={actionsEnd:"actions-end",container:"container",content:"content",contentEnd:"content-end",contentStart:"content-start",description:"description",header:"header",headerContainer:"header-container",headerHasContent:"header--has-content",headerDraggable:"header--draggable",heading:"heading",icon:"icon",iconStart:"icon--start",iconEnd:"icon--end",iconEndContainer:"icon-end-container",invalid:"invalid",statusIcon:"status-icon",title:"title",toggle:"toggle",toggleIcon:"toggle-icon",valid:"valid"},g={actionsEnd:"actions-end",contentEnd:"content-end",contentStart:"content-start",headerMenuActions:"header-menu-actions"},u={expanded:"chevron-up",collapsed:"chevron-down",valid:"check-circle",invalid:"exclamation-mark-triangle"},X=x`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}: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([scale=s]) .header{gap:var(--calcite-spacing-sm)}:host([scale=s]) .icon-end-container{gap:var(--calcite-spacing-sm);padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm)}:host([scale=s]) .description{font-size:var(--calcite-font-size-xs)}:host([scale=s]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-sm);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-xxs)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) )}:host([scale=m]) .header{gap:var(--calcite-spacing-md)}:host([scale=m]) .icon-end-container{gap:var(--calcite-spacing-md);padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size)}:host([scale=m]) .description{font-size:var(--calcite-font-size-sm)}:host([scale=m]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xxs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-md);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-sm)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) )}:host([scale=l]) .header{gap:var(--calcite-spacing-lg)}:host([scale=l]) .icon-end-container{gap:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md)}:host([scale=l]) .description{font-size:var(--calcite-font-size)}:host([scale=l]){--calcite-internal-block-actions-spacing: var(--calcite-spacing-xs);--calcite-internal-block-header-content-padding: var(--calcite-spacing-lg);--calcite-internal-block-padding-block: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-md)) );--calcite-internal-block-padding-inline: var( --calcite-block-content-space, var(--calcite-block-padding, var(--calcite-spacing-lg)) )}:host{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;padding:0;transition-property:margin;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.215,.44,.42,.88);flex-basis:auto;border-color:var(--calcite-block-border-color, var(--calcite-color-border-3))}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.header{justify-content:flex-start}.header--has-content{padding:var(--calcite-internal-block-header-content-padding)}.header--draggable{padding-inline-start:var(--calcite-spacing-xxs)}.header,.toggle{grid-area:header}.header-container{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto auto auto;grid-template-areas:"handle header icon-end menu actions-end"}.icon--start,.icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.actions-end{align-items:center;display:flex;gap:var(--calcite-internal-block-actions-spacing);grid-area:actions-end;padding-block:var(--calcite-internal-block-actions-spacing);padding-inline-end:var(--calcite-internal-block-actions-spacing)}.toggle{margin:0;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0;outline-color:transparent;font-family:inherit;text-align:initial;background-color:var(--calcite-block-header-background-color, transparent)}.toggle:hover{background-color:var(--calcite-block-header-background-color-hover, var(--calcite-color-foreground-2))}.toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:active{background-color:var(--calcite-block-header-background-color-press, var(--calcite-color-foreground-3))}calcite-loader[inline]{align-self:center}calcite-sort-handle{align-self:center;grid-area:handle;margin-block:var(--calcite-internal-block-actions-spacing);padding-inline-start:var(--calcite-spacing-xxs)}.title{display:flex;flex-direction:column}.header .title .heading{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-heading-text-color, var(--calcite-color-text-1));font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-font-line-height-relative-snug)}.description{padding:0;word-wrap:break-word;word-break:break-word;color:var(--calcite-block-description-text-color, var(--calcite-color-text-3));font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-snug)}.icon{display:flex}.status-icon.valid{color:var(--calcite-color-status-success)}.status-icon.invalid{color:var(--calcite-color-status-danger)}@keyframes spin{0%{transform:rotate(0)}50%{transform:rotate(180deg)}to{transform:rotate(360deg)}}.icon-end-container{display:flex;align-items:center;grid-area:icon-end}.toggle-icon{align-self:center;justify-self:end;transition-property:color;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-block-icon-color, var(--calcite-color-text-3))}.toggle:hover .toggle-icon{color:var(--calcite-block-icon-color-hover, var(--calcite-color-text-1))}.container{position:relative;display:flex;block-size:100%;flex-direction:column}.content{position:relative;min-block-size:0px;flex:1 1 0%}@keyframes in{0%{opacity:0}to{opacity:1}}.content{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-internal-block-padding-block);padding-inline:var(--calcite-internal-block-padding-inline)}.content-end,.content-start{display:flex;align-items:center;color:var(--calcite-block-text-color, var(--calcite-color-text-3))}calcite-action-menu{align-self:center;grid-area:menu;margin-inline-end:var(--calcite-internal-block-actions-spacing)}:host([expanded]){margin-block:.5rem}:host([expanded]) .header .title .heading{color:var(--calcite-block-heading-text-color, var(--calcite-block-heading-text-color-press, var(--calcite-color-text-1)));font-weight:var(--calcite-font-weight-medium)}:host([expanded]) .description{color:var(--calcite-block-description-text-color, var(--calcite-color-text-2))}:host([expanded]) .icon--start,:host([expanded]) .icon--end{color:var(--calcite-block-icon-color, var(--calcite-color-text-1))}:host([expanded][scale=s]){margin-block:var(--calcite-spacing-xxs)}:host([expanded][scale=l]){margin-block:var(--calcite-spacing-md)}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends C{constructor(){super(...arguments),this.transitionProp="margin-top",this.blockSectionChildren=[],this.messages=B(),this.focusSetter=E()(this),this.interactiveContainer=w(this),this.hasContentEnd=!1,this.hasContentStart=!1,this.hasEndActions=!1,this.hasMenuActions=!1,this.collapsible=!1,this.disabled=!1,this.dragDisabled=!1,this.dragHandle=!1,this.expanded=!1,this.loading=!1,this.menuPlacement=I,this.addToItems=[],this.moveToItems=[],this.sortDisabled=!1,this.overlayPositioning="absolute",this.scale="m",this.setPosition=null,this.setSize=null,this.sortHandleOpen=!1,this.calciteBlockBeforeClose=c({cancelable:!1}),this.calciteBlockBeforeOpen=c({cancelable:!1}),this.calciteBlockClose=c({cancelable:!1}),this.calciteBlockCollapse=c({cancelable:!1}),this.calciteBlockExpand=c({cancelable:!1}),this.calciteBlockOpen=c({cancelable:!1}),this.calciteBlockSortHandleBeforeClose=c({cancelable:!1}),this.calciteBlockSortHandleBeforeOpen=c({cancelable:!1}),this.calciteBlockSortHandleClose=c({cancelable:!1}),this.calciteBlockSortHandleOpen=c({cancelable:!1}),this.calciteBlockToggle=c({cancelable:!1}),this.calciteInternalBlockUpdateSortMenuItems=c({cancelable:!1})}static{this.properties={hasContentEnd:[16,{},{state:!0}],hasContentStart:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasMenuActions:[16,{},{state:!0}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],dragDisabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}],label:1,menuFlipPlacements:[0,{},{attribute:!1}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],addToItems:[0,{},{attribute:!1}],moveToItems:[0,{},{attribute:!1}],sortDisabled:[5,{},{type:Boolean}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],setPosition:[9,{},{type:Number}],setSize:[9,{},{type:Number}],sortHandleOpen:[7,{},{reflect:!0,type:Boolean}],status:[3,{},{reflect:!0}]}}static{this.styles=[A,X,P]}get open(){return this.expanded}set open(e){m.deprecated("property",{component:this,name:"open",removalVersion:5,suggested:"expanded"}),this.expanded=e}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.transitionEl=this.el}load(){!this.heading&&!this.label&&m.warn(`${this.el.tagName} is missing both heading & label. Please provide a heading or label for the component to be accessible.`)}willUpdate(e){e.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&z(this),e.has("sortHandleOpen")&&(this.hasUpdated||this.sortHandleOpen!==!1)&&this.sortHandleOpenHandler(),e.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteBlockExpand.emit():this.calciteBlockCollapse.emit()),e.has("scale")&&this.hasUpdated&&this.updateBlockSectionScale()}onBeforeOpen(){this.calciteBlockBeforeOpen.emit()}onOpen(){this.calciteBlockOpen.emit()}onBeforeClose(){this.calciteBlockBeforeClose.emit()}onClose(){this.calciteBlockClose.emit()}sortHandleOpenHandler(){this.sortHandleEl&&(this.sortHandleEl.open=this.sortHandleOpen)}setSortHandleEl(e){this.sortHandleEl=e,this.sortHandleOpenHandler()}handleSortHandleBeforeOpen(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeOpen.emit()}handleSortHandleBeforeClose(e){e.stopPropagation(),this.calciteBlockSortHandleBeforeClose.emit()}handleSortHandleClose(e){e.stopPropagation(),this.sortHandleOpen=!1,this.calciteBlockSortHandleClose.emit()}handleSortHandleOpen(e){e.stopPropagation(),this.sortHandleOpen=!0,this.calciteBlockSortHandleOpen.emit()}onHeaderClick(){this.expanded=!this.expanded,this.calciteBlockToggle.emit()}menuActionsSlotChangeHandler(e){this.hasMenuActions=r(e)}actionsEndSlotChangeHandler(e){this.hasEndActions=r(e)}handleContentEndSlotChange(e){this.hasContentEnd=r(e)}handleContentStartSlotChange(e){this.hasContentStart=r(e)}handleDefaultSlotChange(e){this.blockSectionChildren=H(e,"calcite-block-section"),this.updateBlockSectionScale()}updateBlockSectionScale(){this.blockSectionChildren.forEach(e=>{e.scale=this.scale})}renderScrim(){let{loading:e}=this,l=n`<slot @slotchange=${this.handleDefaultSlotChange}></slot>`;return[e?n`<calcite-scrim .loading=${e}></calcite-scrim>`:null,l]}renderLoaderStatusIcon(){let{loading:e,messages:l,status:i}=this;return e?h("loader",n`<div class=${a(t.icon)}><calcite-loader inline .label=${l.loading} .scale=${this.scale}></calcite-loader></div>`):i?h("status-icon",n`<div class=${a(t.icon)}><calcite-icon class=${a({[t.statusIcon]:!0,[t.valid]:i=="valid",[t.invalid]:i=="invalid"})} .icon=${u[i]} .scale=${p(this.scale)}></calcite-icon></div>`):null}renderActionsEnd(){return n`<div class=${a(t.actionsEnd)} .hidden=${!this.hasEndActions}><slot name=${g.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderContentEnd(){return n`<div class=${a({[t.iconEndContainer]:!this.iconEnd&&!this.collapsible})} .hidden=${!this.hasContentEnd}><div class=${a(t.contentEnd)}><slot name=${g.contentEnd} @slotchange=${this.handleContentEndSlotChange}></slot></div></div>`}renderContentStart(){return n`<div class=${a(t.contentStart)} .hidden=${!this.hasContentStart}><slot name=${g.contentStart} @slotchange=${this.handleContentStartSlotChange}></slot></div>`}renderTitle(){let{heading:e,headingLevel:l,description:i}=this;return e||i?n`<div class=${a(t.title)}>${O({class:t.heading,level:l,children:e})}${i?n`<div class=${a(t.description)}>${i}</div>`:null}</div>`:null}renderIcon(e){let{iconFlipRtl:l}=this,i=l==="both"||e==="start"?l==="start":l==="end",o=e==="start"?this.iconStart:this.iconEnd,d=e==="start"?t.iconStart:t.iconEnd;if(o)return h(o,n`<calcite-icon class=${a(d)} .flipRtl=${i} .icon=${o} .scale=${p(this.scale)}></calcite-icon>`)}render(){let{collapsible:e,loading:l,expanded:i,label:o,heading:d,messages:b,description:T,menuFlipPlacements:D,menuPlacement:M,moveToItems:L,addToItems:F,setPosition:N,setSize:U,dragDisabled:R,sortDisabled:j,iconEnd:k,hasContentEnd:V,hasContentStart:G,iconStart:q}=this,J=i?b.collapse:b.expand,K=!!(d||T||V||G||q||l||status),$=n`<header class=${a({[t.header]:!0,[t.headerHasContent]:K,[t.headerDraggable]:this.dragHandle})} id=${s.header}>${this.renderIcon("start")}${this.renderContentStart()}${this.renderLoaderStatusIcon()}${this.renderTitle()}</header>`,Q=i?u.expanded:u.collapsed,W=n`<div class=${a(t.headerContainer)}>${this.dragHandle?n`<calcite-sort-handle .addToItems=${F} .disabled=${R} .label=${d||o} .moveToItems=${L} @calciteSortHandleBeforeClose=${this.handleSortHandleBeforeClose} @calciteSortHandleBeforeOpen=${this.handleSortHandleBeforeOpen} @calciteSortHandleClose=${this.handleSortHandleClose} @calciteSortHandleOpen=${this.handleSortHandleOpen} overlay-positioning=fixed .scale=${this.scale} .setPosition=${N} .setSize=${U} .sortDisabled=${j} ${S(this.setSortHandleEl)}></calcite-sort-handle>`:null}${e?n`<button aria-controls=${s.content} aria-describedby=${s.header} .ariaExpanded=${e?i:null} class=${a(t.toggle)} id=${s.toggle} @click=${this.onHeaderClick} title=${J??f}>${$}<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}<calcite-icon class=${a(t.toggleIcon)} .icon=${Q} .scale=${p(this.scale)}></calcite-icon></div></button>`:$}${k&&!e?n`<div class=${a(t.iconEndContainer)}>${this.renderContentEnd()}${this.renderIcon("end")}</div>`:!k&&!e?this.renderContentEnd():null}<calcite-action-menu .flipPlacements=${D??["top","bottom"]} .hidden=${!this.hasMenuActions} .label=${b.options} .overlayPositioning=${this.overlayPositioning} .placement=${M} .scale=${this.scale}><slot name=${g.headerMenuActions} @slotchange=${this.menuActionsSlotChangeHandler}></slot></calcite-action-menu>${this.renderActionsEnd()}</div>`;return this.interactiveContainer({disabled:this.disabled,children:n`<article aria-label=${o??f} .ariaBusy=${l} class=${a({[t.container]:!0})}>${W}<section aria-labelledby=${s.toggle} class=${a(t.content)} .hidden=${!i} id=${s.content}>${this.renderScrim()}</section></article>`})}};y("calcite-block",v);export{v as Block};
@@ -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.27 */
4
- import{a as S}from"./75JUYSEU.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./AVLDSF5N.js";import{a as H}from"./PDTD3TOA.js";import"./V2JLOD4Q.js";import"./NW3ES5B4.js";import{h as k,j as y}from"./SY5KU6WQ.js";import{a as b}from"./R7BRBOU7.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as s}from"./DI373V3L.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=s({cancelable:!1}),this.calciteTooltipBeforeOpen=s({cancelable:!1}),this.calciteTooltipClose=s({cancelable:!1}),this.calciteTooltipOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,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}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:r,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:r,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,r=e&&i,a=!r;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:r})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
3
+ v5.0.0-next.28 */
4
+ import{a as S}from"./CPBV7Y2T.js";import{c as h,e as C,f as L,g as O,h as R,i as p}from"./FIY2DX6P.js";import{a as H}from"./G3JDC5B3.js";import"./ZHK6KUIW.js";import"./MMXI2D6G.js";import{h as k,j as y}from"./CU3NAWYI.js";import{a as b}from"./4HYFSWQK.js";import{B as c,C as d,D as T,E as l,H as w,P as E,g as v,h as g,o as s}from"./4DX6AFI7.js";var P={positionContainer:"position-container",container:"container"},U="calcite-tooltip",z={host:n=>`${U}-${n}`},m=300,F=m/3,N=m*1.5,x="aria-describedby";function I(n){let{referenceElement:e}=n;return(typeof e=="string"?y(n,{id:e}):e)||null}var f=class{constructor(){this.registeredElements=new WeakMap,this.registeredShadowRootCounts=new WeakMap,this.hoverOpenTimeout=null,this.hoverCloseTimeout=null,this.activeTooltip=null,this.registeredElementCount=0,this.clickedTooltip=null,this.hoveredTooltip=null,this.queryTooltip=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.keyDownHandler=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let{activeTooltip:t}=this;if(t?.open){this.clearHoverTimeout(),this.closeActiveTooltip();let i=I(t),o=e.composedPath();(i instanceof Element&&o.includes(i)||o.includes(t))&&e.preventDefault()}}},this.pointerLeaveHandler=e=>{e.defaultPrevented||(this.clearHoverTimeout(),this.closeHoveredTooltip())},this.pointerMoveHandler=e=>{if(e.defaultPrevented){this.closeHoveredTooltip();return}let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(i!==this.hoveredTooltip&&this.clearHoverOpenTimeout(),this.hoveredTooltip=i,i?this.openHoveredTooltip(i):this.activeTooltip?.open&&this.closeHoveredTooltip(),this.clickedTooltip=null)},this.clickHandler=e=>{if(e.defaultPrevented)return;this.clickedTooltip=null;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}if(this.closeActiveTooltip(),!!i){if(this.clearHoverTimeout(),i.closeOnClick){this.clickedTooltip=i,this.toggleTooltip(i,!1);return}this.toggleTooltip(i,!0)}},this.blurHandler=()=>{this.closeActiveTooltip()},this.focusInHandler=e=>{if(e.defaultPrevented)return;let t=e.composedPath(),i=this.queryTooltip(t);if(this.pathHasOpenTooltip(i,t)){this.clearHoverTimeout();return}i!==this.clickedTooltip&&(this.clickedTooltip=null,this.closeTooltipIfNotActive(i),i&&this.toggleFocusedTooltip(i,!0))},this.openHoveredTooltip=e=>{this.hoverOpenTimeout=window.setTimeout(()=>{this.hoverOpenTimeout===null||e!==this.hoveredTooltip||(this.clearHoverCloseTimeout(),this.closeTooltipIfNotActive(e),this.toggleTooltip(e,!0))},this.activeTooltip?.open?F:m)},this.closeHoveredTooltip=()=>{this.hoverCloseTimeout=window.setTimeout(()=>{this.hoverCloseTimeout!==null&&this.closeActiveTooltip()},N)}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t);let i=this.getReferenceElShadowRootNode(e);i&&this.registerShadowRoot(i),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){let t=this.getReferenceElShadowRootNode(e);t&&this.unregisterShadowRoot(t),this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}pathHasOpenTooltip(e,t){let{activeTooltip:i}=this;return i?.open&&t.includes(i)||e?.open&&t.includes(e)}addShadowListeners(e){e.addEventListener("focusin",this.focusInHandler)}removeShadowListeners(e){e.removeEventListener("focusin",this.focusInHandler)}addListeners(){window.addEventListener("keydown",this.keyDownHandler),window.addEventListener("pointermove",this.pointerMoveHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("focusin",this.focusInHandler),window.addEventListener("blur",this.blurHandler),document.addEventListener("pointerleave",this.pointerLeaveHandler)}removeListeners(){window.removeEventListener("keydown",this.keyDownHandler),window.removeEventListener("pointermove",this.pointerMoveHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("focusin",this.focusInHandler),window.removeEventListener("blur",this.blurHandler),document.removeEventListener("pointerleave",this.pointerLeaveHandler)}clearHoverOpenTimeout(){window.clearTimeout(this.hoverOpenTimeout),this.hoverOpenTimeout=null}clearHoverCloseTimeout(){window.clearTimeout(this.hoverCloseTimeout),this.hoverCloseTimeout=null}clearHoverTimeout(){this.clearHoverOpenTimeout(),this.clearHoverCloseTimeout()}closeTooltipIfNotActive(e){this.activeTooltip!==e&&this.closeActiveTooltip()}closeActiveTooltip(){let{activeTooltip:e}=this;e?.open&&this.toggleTooltip(e,!1)}toggleFocusedTooltip(e,t){t&&this.clearHoverTimeout(),this.toggleTooltip(e,t)}toggleTooltip(e,t){e.open=t,this.activeTooltip=t?e:null}registerShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.min((typeof i=="number"?i:0)+1,1);o===1&&this.addShadowListeners(e),t.set(e,o)}unregisterShadowRoot(e){let{registeredShadowRootCounts:t}=this,i=t.get(e),o=Math.max((typeof i=="number"?i:1)-1,0);o===0&&this.removeShadowListeners(e),t.set(e,o)}getReferenceElShadowRootNode(e){return e instanceof Element?k(e):null}},B=v`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}.container{position:relative;overflow:hidden;padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,A=new f,u=class extends T{constructor(){super(...arguments),this.arrowRef=c(),this.guid=z.host(b()),this.transitionProp="opacity",this.transitionRef=c(),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=p,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.calciteTooltipBeforeClose=s({cancelable:!1}),this.calciteTooltipBeforeOpen=s({cancelable:!1}),this.calciteTooltipClose=s({cancelable:!1}),this.calciteTooltipOpen=s({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,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}],referenceElement:1}}static{this.styles=B}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,offsetDistance:r,offsetSkidding:a,arrowRef:D,floatingEl:_}=this;return C(this,{floatingEl:_,referenceEl:t,overlayPositioning:o,placement:i,offsetDistance:r,offsetSkidding:a,arrowEl:D.value,type:"tooltip"},e)}connectedCallback(){super.connectedCallback(),this.setUpReferenceElement(!0)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==p)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&this.setUpReferenceElement()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement()}disconnectedCallback(){super.disconnectedCallback(),this.removeReferences(),R(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}openHandler(){H(this),this.reposition(!0),this.handlePopover()}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),L(this)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=I(this.el),O(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(x,t),A.registerElement(e,this.el)}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&e.removeAttribute(x),A.unregisterElement(e))}render(){let{referenceEl:e,label:t,open:i,floatingLayout:o}=this,r=e&&i,a=!r;return this.el.inert=a,this.el.ariaLabel=t,this.el.ariaLive="polite",w(this.el,"id",this.getId()),this.el.role="tooltip",g`<div class=${l(P.positionContainer)} popover=manual ${d(this.setFloatingEl)}><div class=${l({[h.animation]:!0,[h.animationActive]:r})} ${d(this.transitionRef)}>${S({floatingLayout:o,ref:this.arrowRef})}<div class=${l(P.container)}><slot></slot></div></div></div>`}};E("calcite-tooltip",u);export{u as Tooltip};
@@ -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.27 */
4
- import{b as r}from"./ST2VDJTE.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f as a};
3
+ v5.0.0-next.28 */
4
+ import{b as r}from"./NUDIM2KL.js";var n=0,u="",f=()=>{function t(){n++,n===1&&(u=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden")}function o(){n--,n===0&&(document.documentElement.style.overflow=u)}return r((e,l)=>{l.onConnected(()=>{e.opened&&e.preventDocumentScroll&&t()}),l.onUpdate(d=>{e.hasUpdated&&(d.has("opened")&&e.preventDocumentScroll?e.opened?t():o():d.has("preventDocumentScroll")&&e.opened&&(e.preventDocumentScroll?t():o()))}),l.onDisconnected(()=>{e.opened&&e.preventDocumentScroll&&o()})})};export{f 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.27 */
4
- import{a as _}from"./75JUYSEU.js";import{a as q}from"./MWIH32NM.js";import{c as g,d as T,e as U,f as S,g as I,h as N,i as v}from"./AVLDSF5N.js";import{a as z}from"./PDTD3TOA.js";import{a as $}from"./C7AEIVEN.js";import"./T7VIIEO7.js";import{a as c}from"./V2JLOD4Q.js";import"./NW3ES5B4.js";import{a as O}from"./J4GW4FQA.js";import{a as C}from"./ETNWW5JZ.js";import{a as R}from"./NUXG46RX.js";import{a as H}from"./6MHFUQ4I.js";import"./REMNCLV5.js";import"./ST2VDJTE.js";import{j as A,q as B,w as L,x as F}from"./SY5KU6WQ.js";import{a as D}from"./R7BRBOU7.js";import{B as y,C as m,D as P,E as s,H as k,P as x,g as E,h as l,o as n}from"./DI373V3L.js";var V=5;function G({startX:d,startY:e,endX:t,endY:i}){return Math.hypot(t-d,i-e)>V}var b=class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.togglePopovers=e=>{let t=e.composedPath(),i=this.queryPopover(t);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter(o=>o!==i&&o.autoClose&&o.open&&!t.includes(o)).forEach(o=>o.open=!1)},this.keyDownHandler=e=>{e.defaultPrevented||(e.key==="Escape"?this.closeAllPopovers():O(e.key)&&this.togglePopovers(e))},this.pointerDownHandler=e=>{if(e.defaultPrevented||!L(e))return;let{clientX:t,clientY:i}=e;this.pointerDownPosition={x:t,y:i}},this.clickHandler=e=>{F(e)||e.defaultPrevented||this.pointerDownPosition&&G({endY:e.clientY,endX:e.clientX,startY:this.pointerDownPosition.y,startX:this.pointerDownPosition.x})||(this.pointerDownPosition=void 0,this.togglePopovers(e))}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach(e=>e.open=!1)}addListeners(){window.addEventListener("pointerdown",this.pointerDownHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("keydown",this.keyDownHandler)}removeListeners(){window.removeEventListener("pointerdown",this.pointerDownHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("keydown",this.keyDownHandler)}},r={positionContainer:"position-container",container:"container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContainer:"header-container",heading:"heading"},X="auto",Y="aria-controls",K="aria-expanded",J=E`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host(:is([scale=s],[scale=m])){--calcite-internal-popover-close-spacing: var(--calcite-spacing-xs)}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]){--calcite-internal-popover-close-spacing: var(--calcite-spacing-sm)}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button{margin:auto;margin-inline-end:var(--calcite-internal-popover-close-spacing)}.close-button-container{display:flex;flex:0 0 auto}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`,M=new b,w=class extends P{constructor(){super(...arguments),this.focusTrap=q({triggerProp:"open",focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(e.defaultPrevented||(this.open=!1,e.preventDefault()),!1)}})(this),this.guid=`calcite-popover-${D()}`,this.hasLoaded=!1,this.mutationObserver=C("mutation",()=>this.focusTrap.updateContainerElements()),this.transitionProp="opacity",this.transitionRef=y(),this.messages=R(),this.focusSetter=H()(this),this.floatingLayout="vertical",this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.offsetDistance=v,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=X,this.pointerDisabled=!1,this.scale="m",this.triggerDisabled=!1,this.calcitePopoverBeforeClose=n({cancelable:!1}),this.calcitePopoverBeforeOpen=n({cancelable:!1}),this.calcitePopoverClose=n({cancelable:!1}),this.calcitePopoverOpen=n({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],autoClose:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],flipDisabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],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}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],triggerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=J}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,flipDisabled:p,filteredFlipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,floatingEl:j}=this;return U(this,{floatingEl:j,referenceEl:t,overlayPositioning:o,placement:i,flipDisabled:p,flipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,type:"popover"},e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(){this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),requestAnimationFrame(()=>this.setUpReferenceElement(this.hasLoaded))}willUpdate(e){e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==v)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==X))&&this.reposition(!0),e.has("referenceElement")&&this.referenceElementHandler()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement(),this.hasLoaded=!0}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeReferences(),N(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}openHandler(){z(this),this.reposition(!0),this.setExpandedAttr(),this.handlePopover()}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?T(t,e):null}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=this.getReferenceElement(),I(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}setExpandedAttr(){let{referenceEl:e,open:t}=this;e&&"setAttribute"in e&&e.setAttribute(K,B(t))}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(Y,t),M.registerElement(e,this.el),this.setExpandedAttr()}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&(e.removeAttribute(Y),e.removeAttribute(K)),M.unregisterElement(e))}getReferenceElement(){let{referenceElement:e,el:t}=this;return(typeof e=="string"?A(t,{id:e}):e)||null}hide(){this.open=!1}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),S(this),this.focusTrap.deactivate()}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}renderCloseButton(){let{messages:e,closable:t}=this;return t?c(r.closeButtonContainer,l`<div class=${s(r.closeButtonContainer)}><calcite-action class=${s(r.closeButton)} icon=x @click=${this.hide} .scale=${this.scale} .text=${e.close}></calcite-action></div>`):null}renderHeader(){let{heading:e,headingLevel:t}=this,i=e?$({class:r.heading,level:t,children:e}):null;return i?c(r.header,l`<div class=${s(r.header)}>${i}${this.renderCloseButton()}</div>`):null}render(){let{referenceEl:e,heading:t,label:i,open:o,pointerDisabled:p,floatingLayout:h}=this,a=e&&o,f=!a,u=p?null:c("floating-arrow",_({floatingLayout:h,ref:this.setArrowEl}));return this.el.inert=f,this.el.ariaLabel=i,this.el.ariaLive="polite",k(this.el,"id",this.getId()),this.el.role="dialog",l`<div class=${s(r.positionContainer)} popover=manual ${m(this.setFloatingEl)}><div class=${s({[r.container]:!0,[g.animation]:!0,[g.animationActive]:a})} ${m(this.transitionRef)}>${u}<div class=${s({[r.hasHeader]:!!t,[r.headerContainer]:!0})}>${this.renderHeader()}<div class=${s(r.content)}><slot></slot></div>${t?null:this.renderCloseButton()}</div></div></div>`}};x("calcite-popover",w);export{w as Popover};
3
+ v5.0.0-next.28 */
4
+ import{a as _}from"./CPBV7Y2T.js";import{a as q}from"./G6WKLXCA.js";import{c as g,d as T,e as U,f as S,g as I,h as N,i as v}from"./FIY2DX6P.js";import{a as z}from"./G3JDC5B3.js";import{a as $}from"./IC5U3US4.js";import"./UWOTAU32.js";import{a as c}from"./ZHK6KUIW.js";import"./MMXI2D6G.js";import{a as O}from"./WUPPIKDG.js";import{a as C}from"./3NUNHJUT.js";import{a as R}from"./RU6R2G5Y.js";import{a as H}from"./EMU2AT4J.js";import"./SWLBZTLD.js";import"./NUDIM2KL.js";import{j as A,q as B,w as L,x as F}from"./CU3NAWYI.js";import{a as D}from"./4HYFSWQK.js";import{B as y,C as m,D as P,E as s,H as k,P as x,g as E,h as l,o as n}from"./4DX6AFI7.js";var V=5;function G({startX:d,startY:e,endX:t,endY:i}){return Math.hypot(t-d,i-e)>V}var b=class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=e=>{let{registeredElements:t}=this,i=e.find(o=>t.has(o));return t.get(i)},this.togglePopovers=e=>{let t=e.composedPath(),i=this.queryPopover(t);i&&!i.triggerDisabled&&(i.open=!i.open),Array.from(this.registeredElements.values()).filter(o=>o!==i&&o.autoClose&&o.open&&!t.includes(o)).forEach(o=>o.open=!1)},this.keyDownHandler=e=>{e.defaultPrevented||(e.key==="Escape"?this.closeAllPopovers():O(e.key)&&this.togglePopovers(e))},this.pointerDownHandler=e=>{if(e.defaultPrevented||!L(e))return;let{clientX:t,clientY:i}=e;this.pointerDownPosition={x:t,y:i}},this.clickHandler=e=>{F(e)||e.defaultPrevented||this.pointerDownPosition&&G({endY:e.clientY,endX:e.clientX,startY:this.pointerDownPosition.y,startX:this.pointerDownPosition.x})||(this.pointerDownPosition=void 0,this.togglePopovers(e))}}registerElement(e,t){this.registeredElementCount++,this.registeredElements.set(e,t),this.registeredElementCount===1&&this.addListeners()}unregisterElement(e){this.registeredElements.delete(e)&&this.registeredElementCount--,this.registeredElementCount===0&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach(e=>e.open=!1)}addListeners(){window.addEventListener("pointerdown",this.pointerDownHandler),window.addEventListener("click",this.clickHandler),window.addEventListener("keydown",this.keyDownHandler)}removeListeners(){window.removeEventListener("pointerdown",this.pointerDownHandler),window.removeEventListener("click",this.clickHandler),window.removeEventListener("keydown",this.keyDownHandler)}},r={positionContainer:"position-container",container:"container",closeButtonContainer:"close-button-container",closeButton:"close-button",content:"content",hasHeader:"has-header",header:"header",headerContainer:"header-container",heading:"heading"},X="auto",Y="aria-controls",K="aria-expanded",J=E`:host{display:contents}.position-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-popover-max-size-x, 100vw)}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-container .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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]) .heading{padding:.5rem .75rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host(:is([scale=s],[scale=m])){--calcite-internal-popover-close-spacing: var(--calcite-spacing-xs)}:host([scale=m]) .heading{padding:.75rem 1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]){--calcite-internal-popover-close-spacing: var(--calcite-spacing-sm)}:host([scale=l]) .heading{padding:1rem 1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;background-color:var(--calcite-popover-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-popover-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-popover-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-popover-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-bottom-width:1px;border-style:solid;border-block-end-color:var(--calcite-popover-border-color, var(--calcite-color-border-3))}.heading{margin:0;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container{position:relative;display:flex;height:100%;flex-direction:row;flex-wrap:nowrap;border-radius:.25rem;color:var(--calcite-popover-text-color, var(--calcite-color-text-1))}.header-container.has-header{flex-direction:column}.content{display:flex;height:100%;width:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button{margin:auto;margin-inline-end:var(--calcite-internal-popover-close-spacing)}.close-button-container{display:flex;flex:0 0 auto}::slotted(calcite-panel),::slotted(calcite-flow){height:100%}:host([hidden]){display:none}[hidden]{display:none}`,M=new b,w=class extends P{constructor(){super(...arguments),this.focusTrap=q({triggerProp:"open",focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(e.defaultPrevented||(this.open=!1,e.preventDefault()),!1)}})(this),this.guid=`calcite-popover-${D()}`,this.hasLoaded=!1,this.mutationObserver=C("mutation",()=>this.focusTrap.updateContainerElements()),this.transitionProp="opacity",this.transitionRef=y(),this.messages=R(),this.focusSetter=H()(this),this.floatingLayout="vertical",this.autoClose=!1,this.closable=!1,this.flipDisabled=!1,this.focusTrapDisabled=!1,this.offsetDistance=v,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement=X,this.pointerDisabled=!1,this.scale="m",this.triggerDisabled=!1,this.calcitePopoverBeforeClose=n({cancelable:!1}),this.calcitePopoverBeforeOpen=n({cancelable:!1}),this.calcitePopoverClose=n({cancelable:!1}),this.calcitePopoverOpen=n({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],autoClose:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],flipDisabled:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],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}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],triggerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=J}async reposition(e=!1){let{referenceEl:t,placement:i,overlayPositioning:o,flipDisabled:p,filteredFlipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,floatingEl:j}=this;return U(this,{floatingEl:j,referenceEl:t,overlayPositioning:o,placement:i,flipDisabled:p,flipPlacements:h,offsetDistance:a,offsetSkidding:f,arrowEl:u,type:"popover"},e)}async setFocus(e){return this.focusSetter(()=>this.el,e)}async updateFocusTrapElements(){this.focusTrap.updateContainerElements()}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),requestAnimationFrame(()=>this.setUpReferenceElement(this.hasLoaded))}willUpdate(e){e.has("flipPlacements")&&this.flipPlacementsHandler(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==v)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==X))&&this.reposition(!0),e.has("referenceElement")&&this.referenceElementHandler()}loaded(){this.referenceElement&&!this.referenceEl&&this.setUpReferenceElement(),this.hasLoaded=!0}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.removeReferences(),N(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open&&this.referenceEl?this.floatingEl.showPopover():this.floatingEl.hidePopover())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}openHandler(){z(this),this.reposition(!0),this.setExpandedAttr(),this.handlePopover()}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}setFloatingEl(e){this.floatingEl=e,e&&requestAnimationFrame(()=>this.setUpReferenceElement())}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?T(t,e):null}setUpReferenceElement(e=!0){this.removeReferences(),this.referenceEl=this.getReferenceElement(),I(this);let{el:t,referenceElement:i,referenceEl:o}=this;e&&i&&!o&&console.warn(`${t.tagName}: reference-element id "${i}" was not found.`,{el:t}),this.addReferences(),this.handlePopover()}getId(){return this.el.id||this.guid}setExpandedAttr(){let{referenceEl:e,open:t}=this;e&&"setAttribute"in e&&e.setAttribute(K,B(t))}addReferences(){let{referenceEl:e}=this;if(!e)return;let t=this.getId();"setAttribute"in e&&e.setAttribute(Y,t),M.registerElement(e,this.el),this.setExpandedAttr()}removeReferences(){let{referenceEl:e}=this;e&&("removeAttribute"in e&&(e.removeAttribute(Y),e.removeAttribute(K)),M.unregisterElement(e))}getReferenceElement(){let{referenceElement:e,el:t}=this;return(typeof e=="string"?A(t,{id:e}):e)||null}hide(){this.open=!1}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.focusTrap.activate()}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),S(this),this.focusTrap.deactivate()}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}renderCloseButton(){let{messages:e,closable:t}=this;return t?c(r.closeButtonContainer,l`<div class=${s(r.closeButtonContainer)}><calcite-action class=${s(r.closeButton)} icon=x @click=${this.hide} .scale=${this.scale} .text=${e.close}></calcite-action></div>`):null}renderHeader(){let{heading:e,headingLevel:t}=this,i=e?$({class:r.heading,level:t,children:e}):null;return i?c(r.header,l`<div class=${s(r.header)}>${i}${this.renderCloseButton()}</div>`):null}render(){let{referenceEl:e,heading:t,label:i,open:o,pointerDisabled:p,floatingLayout:h}=this,a=e&&o,f=!a,u=p?null:c("floating-arrow",_({floatingLayout:h,ref:this.setArrowEl}));return this.el.inert=f,this.el.ariaLabel=i,this.el.ariaLive="polite",k(this.el,"id",this.getId()),this.el.role="dialog",l`<div class=${s(r.positionContainer)} popover=manual ${m(this.setFloatingEl)}><div class=${s({[r.container]:!0,[g.animation]:!0,[g.animationActive]:a})} ${m(this.transitionRef)}>${u}<div class=${s({[r.hasHeader]:!!t,[r.headerContainer]:!0})}>${this.renderHeader()}<div class=${s(r.content)}><slot></slot></div>${t?null:this.renderCloseButton()}</div></div></div>`}};x("calcite-popover",w);export{w as Popover};
@@ -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.27 */
4
- import{a}from"./GZZKKWOS.js";import{c as S}from"./QJ3D4NWB.js";import{e as E}from"./SY5KU6WQ.js";import{C as v,h as g,l as A}from"./DI373V3L.js";var b=t=>Array.from(t.querySelectorAll("calcite-action")).filter(e=>e.closest("calcite-action-menu")?e.slot===S.trigger:!0),D=({actionGroups:t,expanded:e,overflowCount:o})=>{let c=o;t.reverse().forEach(i=>{let l=0,s=b(i).reverse();s.forEach(n=>{n.slot===a.menuActions&&(n.removeAttribute("slot"),n.textEnabled=e)}),c>0&&s.some(n=>(s.filter(u=>!u.slot).length>1&&s.length>2&&!n.closest("calcite-action-menu")&&(n.textEnabled=!0,n.setAttribute("slot",a.menuActions),l++,l>1&&c--),c<1)),i.manager.component.requestUpdate()})};function G(t){return t?.tagName==="CALCITE-ACTION"}var $={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function I(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}function P({el:t,expanded:e}){b(t).filter(o=>o.slot!==a.menuActions).forEach(o=>o.textEnabled=e),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=e)}var L=({tooltip:t,referenceElement:e,expanded:o,ref:c})=>(t&&(t.referenceElement=!o&&e?e:null),c&&c(e),e),U=({expanded:t,expandText:e,collapseText:o,expandLabel:c,collapseLabel:i,toggle:l,el:s,position:n,tooltip:f,ref:u,scale:C})=>{let T=E(s)==="rtl",m=t?o:e,d=t?i:c,r=[$.chevronsLeft,$.chevronsRight];T&&r.reverse();let h=I(n,s)==="end",p=h?r[1]:r[0],q=h?r[0]:r[1];return g`<calcite-action .aria=${{expanded:t}} .icon=${t?p:q} id=expand-toggle .label=${d} @click=${l} .scale=${C} .text=${m} .textEnabled=${t} title=${(!t&&!f?m:null)??A} ${v(x=>L({tooltip:f,referenceElement:x,expanded:t,ref:u}))}></calcite-action>`};export{b as a,D as b,G as c,P as d,U as e};
3
+ v5.0.0-next.28 */
4
+ import{a}from"./KHQANRU5.js";import{c as S}from"./HLOPOVBH.js";import{e as E}from"./CU3NAWYI.js";import{C as v,h as g,l as A}from"./4DX6AFI7.js";var b=t=>Array.from(t.querySelectorAll("calcite-action")).filter(e=>e.closest("calcite-action-menu")?e.slot===S.trigger:!0),D=({actionGroups:t,expanded:e,overflowCount:o})=>{let c=o;t.reverse().forEach(i=>{let l=0,s=b(i).reverse();s.forEach(n=>{n.slot===a.menuActions&&(n.removeAttribute("slot"),n.textEnabled=e)}),c>0&&s.some(n=>(s.filter(u=>!u.slot).length>1&&s.length>2&&!n.closest("calcite-action-menu")&&(n.textEnabled=!0,n.setAttribute("slot",a.menuActions),l++,l>1&&c--),c<1)),i.manager.component.requestUpdate()})};function G(t){return t?.tagName==="CALCITE-ACTION"}var $={chevronsLeft:"chevrons-left",chevronsRight:"chevrons-right"};function I(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}function P({el:t,expanded:e}){b(t).filter(o=>o.slot!==a.menuActions).forEach(o=>o.textEnabled=e),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach(o=>o.expanded=e)}var L=({tooltip:t,referenceElement:e,expanded:o,ref:c})=>(t&&(t.referenceElement=!o&&e?e:null),c&&c(e),e),U=({expanded:t,expandText:e,collapseText:o,expandLabel:c,collapseLabel:i,toggle:l,el:s,position:n,tooltip:f,ref:u,scale:C})=>{let T=E(s)==="rtl",m=t?o:e,d=t?i:c,r=[$.chevronsLeft,$.chevronsRight];T&&r.reverse();let h=I(n,s)==="end",p=h?r[1]:r[0],q=h?r[0]:r[1];return g`<calcite-action .aria=${{expanded:t}} .icon=${t?p:q} id=expand-toggle .label=${d} @click=${l} .scale=${C} .text=${m} .textEnabled=${t} title=${(!t&&!f?m:null)??A} ${v(x=>L({tooltip:f,referenceElement:x,expanded:t,ref:u}))}></calcite-action>`};export{b as a,D as b,G as c,P as d,U as e};
@@ -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.27 */
3
+ v5.0.0-next.28 */
4
4
  var n={container:"container",containerNone:"container--none-selection",icon:"dropdown-item-icon",iconEnd:"dropdown-item-icon--end",iconStart:"dropdown-item-icon--start",itemContent:"dropdown-item-content",link:"dropdown-link"},o={check:"check",bulletPoint:"bullet-point"};export{n as a,o 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.27 */
4
- import{a as d}from"./O2KUWZ7O.js";import{a as n}from"./ETNWW5JZ.js";import{D as l,E as i,P as c,g as o,h as t,o as r}from"./DI373V3L.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=o`:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=r({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
3
+ v5.0.0-next.28 */
4
+ import{a as d}from"./7SVTDM3O.js";import{a as n}from"./3NUNHJUT.js";import{D as l,E as i,P as c,g as o,h as t,o as r}from"./4DX6AFI7.js";var s={title:"title",firstTitle:"first-title",separator:"separator"},h=o`:host{display:block}.container{text-align:start}.title{margin-block-end:-1px;display:block;cursor:default;overflow-wrap:break-word;border-width:0px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-dropdown-group-title-text-color, var(--calcite-color-text-1))}.separator{display:block;block-size:1px;background-color:var(--calcite-dropdown-group-border-color, var(--calcite-color-border-3))}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .title{padding-block:var(--calcite-spacing-xxs);padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .first-title{padding-block-start:var(--calcite-spacing-sm)}:host([scale=s]) .separator{margin-block:var(--calcite-spacing-xxs);margin-inline:var(--calcite-spacing-sm)}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .title{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .first-title{padding-block-start:var(--calcite-spacing-lg)}:host([scale=m]) .separator{margin-block:var(--calcite-spacing-sm);margin-inline:var(--calcite-spacing-md)}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .title{padding-block:var(--calcite-spacing-sm-plus);padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .first-title{padding-block-start:var(--calcite-spacing-xl)}:host([scale=l]) .separator{margin-block:var(--calcite-spacing-sm-plus);margin-inline:var(--calcite-spacing-lg)}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends l{constructor(){super(),this.mutationObserver=n("mutation",()=>this.updateItems()),this.position=-1,this.scale="m",this.selectionMode="single",this.calciteInternalDropdownItemChange=r({cancelable:!1}),this.listen("calciteInternalDropdownItemSelect",this.updateActiveItemOnChange)}static{this.properties={groupTitle:[3,{},{reflect:!0}],position:[9,{},{type:Number}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=h}connectedCallback(){super.connectedCallback(),this.updateItems(),this.mutationObserver?.observe(this.el,{childList:!0})}willUpdate(e){e.has("selectionMode")&&(this.hasUpdated||this.selectionMode!=="single")&&this.updateItems()}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}updateActiveItemOnChange(e){this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.calciteInternalDropdownItemChange.emit({requestedDropdownGroup:this.requestedDropdownGroup,requestedDropdownItem:this.requestedDropdownItem})}updateItems(){Array.from(this.el.querySelectorAll("calcite-dropdown-item")).forEach(e=>e.selectionMode=this.selectionMode)}render(){let e=this.groupTitle?t`<span aria-hidden=true class=${i({[s.title]:!0,[s.firstTitle]:this.position===0})}>${this.groupTitle}</span>`:null,p=this.position>0?t`<div class=${i(s.separator)} role=separator></div>`:null;return this.el.ariaLabel=this.groupTitle,this.el.role="group",t`<div class=${i({[d.container]:!0})}>${p}${e}<slot></slot></div>`}};c("calcite-dropdown-group",a);export{a as DropdownGroup};
@@ -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.27 */
4
- import{a as f,h as y,l as B,n as g,o as b,p,q as I,r as d,s as r,t as h,u as D}from"./X7XVUJ7O.js";import"./VT6VJLTC.js";import{a as T}from"./V2JLOD4Q.js";import{a as E}from"./6MHFUQ4I.js";import"./REMNCLV5.js";import"./ST2VDJTE.js";import"./SY5KU6WQ.js";import"./R7BRBOU7.js";import{B as C,C as v,D as F,E as x,P as O,g as k,h as m,o as R}from"./DI373V3L.js";var $={container:"container",hexInput:"hex-input",opacityInput:"opacity-input"},U=k`:host{display:block}.container{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}.hex-input{--calcite-input-text-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-text-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-text-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color)}.opacity-input{--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-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}.hex-input{flex-grow:1;text-transform:uppercase}.opacity-input{inline-size:100px;margin-inline-start:-1px}:host([hidden]){display:none}[hidden]{display:none}`,V=f(),w=class extends F{constructor(){super(...arguments),this.hexInputRef=C(),this.opacityInputRef=C(),this.focusSetter=E()(this),this.internalColor=V,this.alphaChannel=!1,this.allowEmpty=!1,this.hexLabel="Hex",this.scale="m",this.value=r(h(V,this.alphaChannel),this.alphaChannel,!0),this.calciteColorPickerHexInputChange=R({cancelable:!1})}static{this.properties={internalColor:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],allowEmpty:[5,{},{type:Boolean}],hexLabel:1,messages:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],value:[3,{},{reflect:!0}]}}static{this.styles=U}async setFocus(t){return this.focusSetter(()=>this.hexInputRef.value,t)}connectedCallback(){super.connectedCallback(),this.previousNonNullValue=this.value;let{allowEmpty:t,alphaChannel:e,value:a}=this;if(a){let n=r(a,e);p(n,e)&&this.internalSetValue(n,n,!1);return}t&&this.internalSetValue(void 0,void 0,!1)}willUpdate(t){t.has("value")&&(this.hasUpdated||this.value!==r(h(V,this.alphaChannel),this.alphaChannel,!0))&&this.internalSetValue(this.value,t.get("value"),!1)}onHexInputBlur(){let t=this.hexInputRef.value,e=t.value,a=`#${e}`,{allowEmpty:n,internalColor:l}=this,o=n&&!e,i=d(a);(I(a,!0)||I(a,!1))&&this.onHexInputChange(),!(o||p(a)&&i)&&(t.value=n&&!l?"":this.formatHexForInternalInput(D(l.object())))}onOpacityInputBlur(){let t=this.opacityInputRef.value,e=t.value,{allowEmpty:a,internalColor:n}=this;a&&!e||(t.value=a&&!n?"":this.formatOpacityForInternalInput(n))}onOpacityInputInput(){this.onOpacityInputChange()}onHexInputChange(){let e=this.hexInputRef.value.value;if(e){let a=r(e,!1);if(p(a)&&this.alphaChannel&&this.internalColor){let l=r(this.internalColor.hexa(),!0).slice(-2);e=`${a+l}`}}this.internalSetValue(e,this.value)}onOpacityInputChange(){let t=this.opacityInputRef.value,e;if(!t.value)e=t.value;else{let a=b(Number(t.value));e=this.internalColor?.alpha(a).hexa()}this.internalSetValue(e,this.value)}onInputFocus(t){(t.type==="calciteInternalInputTextFocus"?this.hexInputRef:this.opacityInputRef).value.selectText()}onHexInputInput(){let t=`#${this.hexInputRef.value.value}`,e=this.value;p(t,this.alphaChannel)&&d(t,this.alphaChannel)&&this.internalSetValue(t,e)}onInputKeyDown(t){let{altKey:e,ctrlKey:a,metaKey:n,shiftKey:l}=t,{alphaChannel:o,hexInputRef:i,internalColor:s,value:c}=this,{key:u}=t,H=t.composedPath();if(u==="Tab"&&I(c,this.alphaChannel)||u==="Enter"){H.includes(i.value)?this.onHexInputChange():this.onOpacityInputChange(),u==="Enter"&&t.preventDefault();return}let L=u==="ArrowDown"||u==="ArrowUp",S=this.value;if(L){if(!c){this.internalSetValue(this.previousNonNullValue,S),t.preventDefault();return}let z=u==="ArrowUp"?1:-1,P=l?10:1;this.internalSetValue(h(this.nudgeRGBChannels(s,P*z,H.includes(i.value)?"rgb":"a"),o),S),t.preventDefault();return}let N=e||a||n,A=u.length===1,K=B.test(u);A&&!N&&!K&&t.preventDefault()}onHexInputPaste(t){let e=t.clipboardData.getData("text");p(e,this.alphaChannel)&&d(e,this.alphaChannel)&&(t.preventDefault(),this.hexInputRef.value.value=e.slice(1),this.internalSetValue(e,this.value))}internalSetValue(t,e,a=!0){if(t){let{alphaChannel:n}=this,l=r(t,n,n);if(p(l,n)){let{internalColor:o}=this,i=f(l),s=r(h(i,n),n),c=!o||s!==r(h(o,n),n);this.internalColor=i,this.previousNonNullValue=s,this.value=s,c&&a&&this.calciteColorPickerHexInputChange.emit();return}}else if(this.allowEmpty){this.internalColor=void 0,this.value=void 0,a&&this.calciteColorPickerHexInputChange.emit();return}this.value=e}formatHexForInternalInput(t){return t?t.replace("#","").slice(0,6):""}formatOpacityForInternalInput(t){return t?`${g(t.alpha())}`:""}nudgeRGBChannels(t,e,a){let n,l=t.array(),o=l.slice(0,3);if(a==="rgb")n=[...o.map(s=>s+e),this.alphaChannel?l[3]:void 0];else{let i=b(g(t.alpha())+e);n=[...o,i]}return f(n)}render(){let{alphaChannel:t,hexLabel:e,internalColor:a,messages:n,scale:l,value:o}=this,i=this.formatHexForInternalInput(o),s=this.formatOpacityForInternalInput(a),c=l==="l"?"m":"s";return m`<div class=${x($.container)}><calcite-input-text class=${x($.hexInput)} .label=${n?.hex||e} .maxLength=${this.alphaChannel?8:6} @keydown=${this.onInputKeyDown} @paste=${this.onHexInputPaste} @calciteInputTextChange=${this.onHexInputChange} @calciteInputTextInput=${this.onHexInputInput} @calciteInternalInputTextBlur=${this.onHexInputBlur} @calciteInternalInputTextFocus=${this.onInputFocus} prefix-text=# .scale=${c} .value=${i} ${v(this.hexInputRef)}></calcite-input-text>${t?T("opacity-input",m`<calcite-input-number class=${x($.opacityInput)} .label=${n?.opacity} .max=${y.max} max-length=3 .min=${y.min} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.onInputKeyDown} @calciteInputNumberInput=${this.onOpacityInputInput} @calciteInternalInputNumberBlur=${this.onOpacityInputBlur} @calciteInternalInputNumberFocus=${this.onInputFocus} .scale=${c} suffix-text=% .value=${s} ${v(this.opacityInputRef)}></calcite-input-number>`):null}</div>`}};O("calcite-color-picker-hex-input",w);export{w as ColorPickerHexInput};
3
+ v5.0.0-next.28 */
4
+ import{a as f,h as y,l as B,n as g,o as b,p,q as I,r as d,s as r,t as h,u as D}from"./G55KDLFK.js";import"./EJBQRGLZ.js";import{a as T}from"./ZHK6KUIW.js";import{a as E}from"./EMU2AT4J.js";import"./SWLBZTLD.js";import"./NUDIM2KL.js";import"./CU3NAWYI.js";import"./4HYFSWQK.js";import{B as C,C as v,D as F,E as x,P as O,g as k,h as m,o as R}from"./4DX6AFI7.js";var $={container:"container",hexInput:"hex-input",opacityInput:"opacity-input"},U=k`:host{display:block}.container{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}.hex-input{--calcite-input-text-background-color: var(--calcite-color-picker-input-background-color);--calcite-input-text-border-color: var(--calcite-color-picker-input-border-color);--calcite-input-text-text-color: var(--calcite-color-picker-input-text-color);--calcite-input-prefix-text-color: var(--calcite-color-picker-input-prefix-text-color)}.opacity-input{--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-suffix-text-color: var(--calcite-color-picker-input-suffix-text-color)}.hex-input{flex-grow:1;text-transform:uppercase}.opacity-input{inline-size:100px;margin-inline-start:-1px}:host([hidden]){display:none}[hidden]{display:none}`,V=f(),w=class extends F{constructor(){super(...arguments),this.hexInputRef=C(),this.opacityInputRef=C(),this.focusSetter=E()(this),this.internalColor=V,this.alphaChannel=!1,this.allowEmpty=!1,this.hexLabel="Hex",this.scale="m",this.value=r(h(V,this.alphaChannel),this.alphaChannel,!0),this.calciteColorPickerHexInputChange=R({cancelable:!1})}static{this.properties={internalColor:[16,{},{state:!0}],alphaChannel:[5,{},{type:Boolean}],allowEmpty:[5,{},{type:Boolean}],hexLabel:1,messages:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],value:[3,{},{reflect:!0}]}}static{this.styles=U}async setFocus(t){return this.focusSetter(()=>this.hexInputRef.value,t)}connectedCallback(){super.connectedCallback(),this.previousNonNullValue=this.value;let{allowEmpty:t,alphaChannel:e,value:a}=this;if(a){let n=r(a,e);p(n,e)&&this.internalSetValue(n,n,!1);return}t&&this.internalSetValue(void 0,void 0,!1)}willUpdate(t){t.has("value")&&(this.hasUpdated||this.value!==r(h(V,this.alphaChannel),this.alphaChannel,!0))&&this.internalSetValue(this.value,t.get("value"),!1)}onHexInputBlur(){let t=this.hexInputRef.value,e=t.value,a=`#${e}`,{allowEmpty:n,internalColor:l}=this,o=n&&!e,i=d(a);(I(a,!0)||I(a,!1))&&this.onHexInputChange(),!(o||p(a)&&i)&&(t.value=n&&!l?"":this.formatHexForInternalInput(D(l.object())))}onOpacityInputBlur(){let t=this.opacityInputRef.value,e=t.value,{allowEmpty:a,internalColor:n}=this;a&&!e||(t.value=a&&!n?"":this.formatOpacityForInternalInput(n))}onOpacityInputInput(){this.onOpacityInputChange()}onHexInputChange(){let e=this.hexInputRef.value.value;if(e){let a=r(e,!1);if(p(a)&&this.alphaChannel&&this.internalColor){let l=r(this.internalColor.hexa(),!0).slice(-2);e=`${a+l}`}}this.internalSetValue(e,this.value)}onOpacityInputChange(){let t=this.opacityInputRef.value,e;if(!t.value)e=t.value;else{let a=b(Number(t.value));e=this.internalColor?.alpha(a).hexa()}this.internalSetValue(e,this.value)}onInputFocus(t){(t.type==="calciteInternalInputTextFocus"?this.hexInputRef:this.opacityInputRef).value.selectText()}onHexInputInput(){let t=`#${this.hexInputRef.value.value}`,e=this.value;p(t,this.alphaChannel)&&d(t,this.alphaChannel)&&this.internalSetValue(t,e)}onInputKeyDown(t){let{altKey:e,ctrlKey:a,metaKey:n,shiftKey:l}=t,{alphaChannel:o,hexInputRef:i,internalColor:s,value:c}=this,{key:u}=t,H=t.composedPath();if(u==="Tab"&&I(c,this.alphaChannel)||u==="Enter"){H.includes(i.value)?this.onHexInputChange():this.onOpacityInputChange(),u==="Enter"&&t.preventDefault();return}let L=u==="ArrowDown"||u==="ArrowUp",S=this.value;if(L){if(!c){this.internalSetValue(this.previousNonNullValue,S),t.preventDefault();return}let z=u==="ArrowUp"?1:-1,P=l?10:1;this.internalSetValue(h(this.nudgeRGBChannels(s,P*z,H.includes(i.value)?"rgb":"a"),o),S),t.preventDefault();return}let N=e||a||n,A=u.length===1,K=B.test(u);A&&!N&&!K&&t.preventDefault()}onHexInputPaste(t){let e=t.clipboardData.getData("text");p(e,this.alphaChannel)&&d(e,this.alphaChannel)&&(t.preventDefault(),this.hexInputRef.value.value=e.slice(1),this.internalSetValue(e,this.value))}internalSetValue(t,e,a=!0){if(t){let{alphaChannel:n}=this,l=r(t,n,n);if(p(l,n)){let{internalColor:o}=this,i=f(l),s=r(h(i,n),n),c=!o||s!==r(h(o,n),n);this.internalColor=i,this.previousNonNullValue=s,this.value=s,c&&a&&this.calciteColorPickerHexInputChange.emit();return}}else if(this.allowEmpty){this.internalColor=void 0,this.value=void 0,a&&this.calciteColorPickerHexInputChange.emit();return}this.value=e}formatHexForInternalInput(t){return t?t.replace("#","").slice(0,6):""}formatOpacityForInternalInput(t){return t?`${g(t.alpha())}`:""}nudgeRGBChannels(t,e,a){let n,l=t.array(),o=l.slice(0,3);if(a==="rgb")n=[...o.map(s=>s+e),this.alphaChannel?l[3]:void 0];else{let i=b(g(t.alpha())+e);n=[...o,i]}return f(n)}render(){let{alphaChannel:t,hexLabel:e,internalColor:a,messages:n,scale:l,value:o}=this,i=this.formatHexForInternalInput(o),s=this.formatOpacityForInternalInput(a),c=l==="l"?"m":"s";return m`<div class=${x($.container)}><calcite-input-text class=${x($.hexInput)} .label=${n?.hex||e} .maxLength=${this.alphaChannel?8:6} @keydown=${this.onInputKeyDown} @paste=${this.onHexInputPaste} @calciteInputTextChange=${this.onHexInputChange} @calciteInputTextInput=${this.onHexInputInput} @calciteInternalInputTextBlur=${this.onHexInputBlur} @calciteInternalInputTextFocus=${this.onInputFocus} prefix-text=# .scale=${c} .value=${i} ${v(this.hexInputRef)}></calcite-input-text>${t?T("opacity-input",m`<calcite-input-number class=${x($.opacityInput)} .label=${n?.opacity} .max=${y.max} max-length=3 .min=${y.min} number-button-type=none .numberingSystem=${this.numberingSystem} @keydown=${this.onInputKeyDown} @calciteInputNumberInput=${this.onOpacityInputInput} @calciteInternalInputNumberBlur=${this.onOpacityInputBlur} @calciteInternalInputNumberFocus=${this.onInputFocus} .scale=${c} suffix-text=% .value=${s} ${v(this.opacityInputRef)}></calcite-input-number>`):null}</div>`}};O("calcite-color-picker-hex-input",w);export{w as ColorPickerHexInput};
@@ -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.27 */
4
- import{D as l,E as a,G as o,P as r,g as n,h as t}from"./DI373V3L.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=n`.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??o} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
3
+ v5.0.0-next.28 */
4
+ import{D as l,E as a,G as o,P as r,g as n,h as t}from"./4DX6AFI7.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=n`.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??o} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
@@ -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.27 */
4
- import{h as b}from"./GQ276M6N.js";import{m as c}from"./RCMESI6O.js";import{a as p}from"./5253XWSA.js";import{a as g}from"./J4GW4FQA.js";import{a as y}from"./6MHFUQ4I.js";import"./REMNCLV5.js";import"./ST2VDJTE.js";import{k as f,q as v}from"./SY5KU6WQ.js";import"./R7BRBOU7.js";import{D as h,E as t,H as o,P as u,g as n,h as d,o as a}from"./DI373V3L.js";var x=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-0)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-foreground-1))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=y()(this),this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeEdge:[3,{},{reflect:!0}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=f(this.el,"calcite-date-picker")}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=c.localize(String(this.day)),k=this.dateTimeFormat.format(this.value);return this.el.ariaLabel=k,this.el.ariaSelected=v(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
3
+ v5.0.0-next.28 */
4
+ import{h as b}from"./NNZ43CPZ.js";import{m as c}from"./4ZEIXRNV.js";import{a as p}from"./FST7R3GB.js";import{a as g}from"./WUPPIKDG.js";import{a as y}from"./EMU2AT4J.js";import"./SWLBZTLD.js";import"./NUDIM2KL.js";import{k as f,q as v}from"./CU3NAWYI.js";import"./4HYFSWQK.js";import{D as h,E as t,H as o,P as u,g as n,h as d,o as a}from"./4DX6AFI7.js";var x=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-0)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-foreground-1))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,r={dayWrapper:"day-wrapper",day:"day",text:"text"},i=class extends h{constructor(){super(),this.focusSetter=y()(this),this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeEdge:[3,{},{reflect:!0}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=f(this.el,"calcite-date-picker")}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;c.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=c.localize(String(this.day)),k=this.dateTimeFormat.format(this.value);return this.el.ariaLabel=k,this.el.ariaSelected=v(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(r.dayWrapper)}><span class=${t(r.day)}><span class=${t(r.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",i);export{i as DatePickerDay};
@@ -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.27 */
4
- import{a as pe,d as q,e as Ce}from"./LICAKY7L.js";import{a as re}from"./D235BG5B.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"./X7XVUJ7O.js";import"./VT6VJLTC.js";import{a as le}from"./5253XWSA.js";import{a as T}from"./V2JLOD4Q.js";import{a as se}from"./7UWAXM2S.js";import{c as E}from"./NW3ES5B4.js";import{a as ne}from"./J4GW4FQA.js";import{a as te}from"./ETNWW5JZ.js";import{a as ae}from"./NUXG46RX.js";import{a as oe}from"./6MHFUQ4I.js";import"./REMNCLV5.js";import"./ST2VDJTE.js";import{e as ie,w as K}from"./SY5KU6WQ.js";import"./R7BRBOU7.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"./DI373V3L.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--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 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--1);line-height:1rem}: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--1);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=ae({blocking:!0}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:o,height:a}=this.dynamicDimensions.colorField,l=Math.round(p.s/o*e),s=Math.round(p.v/a*(a-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:o,bounds:a}=t,l,s,{clientX:c,clientY:h}=e;o.canvas.matches(":hover")?(l=c-a.x,s=h-a.y):(c<a.x+a.width&&c>a.x?l=c-a.x:c<a.x?l=0:l=a.width,h<a.y+a.height&&h>a.y?s=h-a.y:h<a.y?s=0:s=a.height),o===this.colorFieldRenderingContext?this.captureColorFieldColor(l,s,!1):o===this.hueSliderRenderingContext?this.captureHueSliderColor(l):o===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=oe()(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:o}=this,a=e&&!o,l=N(o),s=a||i==="auto"&&l||i===l,c=s?W(o,e,l):t;s||this.showIncompatibleColorWarning(o,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:o}=this,a=!i||e,l=!1;if(a){let d=N(e);if(!d||o!=="auto"&&d!==o){this.showIncompatibleColorWarning(e,o),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,o={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(o[i]){e.preventDefault();let a=o[i]*t,l=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(l+a);this.internalColorSet(s,!1)}}handleHexInputChange(e){e.stopPropagation();let{clearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let l=i&&R(S(i,P(this.mode)));a!==l&&this.internalColorSet(x(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(x(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=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,a).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")),o=[...this.channels];!t.value&&!this.clearable&&(t.value=o[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(a=>a.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let o=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?o:t==="ArrowDown"&&i?-o: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")),o=[...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"?(o[i]+1<=this.getChannelInputLimit(i)?o[i]+1:this.getChannelInputLimit(i)).toString():(o[i]-1>=0?o[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let s=t.value?Number(t.value):o[i];o[i]=l?B(s):s,this.updateColorFromChannels(o)}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,o){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(o))}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,o=P(e);if(i&&!o){let a=he(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}if(!i&&o){let a=X(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}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 a=t===_.HEXA;return R(S(e.round(),a),a)}if(t.includes("-css")){let a=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let s=a.slice(0,3),c=a.slice(4,-1);return`${s}a(${c}, ${e.alpha()})`}return a}let o=e[X(t)]().round().object();return t.endsWith("a")?ce(o):o}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(a=>a!==e);this.savedColors=i;let o=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(o,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 o=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(o,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 o=e.createLinearGradient(0,0,t,0);o.addColorStop(0,"rgba(255,255,255,1)"),o.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=o,e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,0,i);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=a,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let o=window.devicePixelRatio||1;e.width=i*o,e.height=t*o,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(o,o)}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 o={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,o),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,o)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:o,height:a}=this.dynamicDimensions.colorField,l=t.saturationv()/(p.s/o),s=a-t.value()/(p.v/a);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=s}),this.drawThumb(this.colorFieldRenderingContext,i,l,s,t,!1)}drawThumb(e,t,i,o,a,l){let c=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,o,t,0,c),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),l&&a.alpha()<1){let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,o,t-3,0,c),e.fillStyle=f,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,o,t-3,0,c);let d=l?a.alpha():1;e.fillStyle=a.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,o=this.effectiveSliderWidth,a=t.hue()/(H/o),l=i,s=this.getSliderBoundX(a,o,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,o=0,a=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,o,a),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:o}}}=this,a=0,l=o-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,a,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,o,a){let l=t/2+1;e.beginPath(),e.moveTo(o+l,a),e.lineTo(o+i-l,a),e.quadraticCurveTo(o+i,a,o+i,a+l),e.lineTo(o+i,a+t-l),e.quadraticCurveTo(o+i,a+t,o+i-l,a+t),e.lineTo(o+l,a+t),e.quadraticCurveTo(o,a+t,o,a+t-l),e.lineTo(o,a+l),e.quadraticCurveTo(o,a,o+l,a),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,o=this.effectiveSliderWidth,a=O(t.alpha())/(b.max/o),l=i,s=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.opacityScopeLeft=s}),this.drawThumb(this.opacitySliderRenderingContext,i,s,l,t,!0)}getSliderBoundX(e,t,i){let o=Ce(e,t,i);return o===0?e:o===-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,o={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(o[i]){e.preventDefault();let a=o[i]*t,l=this.baseColorFieldColor.alpha(),s=this.baseColorFieldColor.alpha(l+a);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:o,staticDimensions:{thumb:{radius:a}},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=a,ge=c??Y*m.hue()/p.h,be=a,Se=f??Y*O(m.alpha())/b.max,J=t===void 0,z=ve==="vertical",[ye,we]=this.getAdjustedScopePosition(i,o),[$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,o=e===t,a=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=${o}>${a}</calcite-tab-title>`)}renderChannelsTab(e){let{clearable:t,channelMode:i,channels:o,messages:a,alphaChannel:l}=this,s=e===i,h=e==="rgb"?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],d=ie(this.el),f=l?o:o.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,o,a){return T(t,u`<calcite-input-number class=${r(n.channel)} data-channel-index=${t??w} dir=${o??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=${a} .value=${e?.toString()}></calcite-input-number>`)}};ee("calcite-color-picker",G);export{G as ColorPicker};
3
+ v5.0.0-next.28 */
4
+ import{a as pe,d as q,e as Ce}from"./DCL3I2DT.js";import{a as re}from"./WCYK7MUQ.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"./G55KDLFK.js";import"./EJBQRGLZ.js";import{a as le}from"./FST7R3GB.js";import{a as T}from"./ZHK6KUIW.js";import{a as se}from"./L2YNL67H.js";import{c as E}from"./MMXI2D6G.js";import{a as ne}from"./WUPPIKDG.js";import{a as te}from"./3NUNHJUT.js";import{a as ae}from"./RU6R2G5Y.js";import{a as oe}from"./EMU2AT4J.js";import"./SWLBZTLD.js";import"./NUDIM2KL.js";import{e as ie,w as K}from"./CU3NAWYI.js";import"./4HYFSWQK.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"./4DX6AFI7.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--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal);inline-size:var(--calcite-internal-color-picker-min-width);min-inline-size:var(--calcite-internal-color-picker-min-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-color-picker-min-width: 200px;--calcite-color-picker-spacing: 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--1);line-height:1rem}: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--1);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=ae({blocking:!0}),this.captureColorFieldColor=(e,t,i=!0)=>{let{width:o,height:a}=this.dynamicDimensions.colorField,l=Math.round(p.s/o*e),s=Math.round(p.v/a*(a-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:o,bounds:a}=t,l,s,{clientX:c,clientY:h}=e;o.canvas.matches(":hover")?(l=c-a.x,s=h-a.y):(c<a.x+a.width&&c>a.x?l=c-a.x:c<a.x?l=0:l=a.width,h<a.y+a.height&&h>a.y?s=h-a.y:h<a.y?s=0:s=a.height),o===this.colorFieldRenderingContext?this.captureColorFieldColor(l,s,!1):o===this.hueSliderRenderingContext?this.captureHueSliderColor(l):o===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=oe()(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:o}=this,a=e&&!o,l=N(o),s=a||i==="auto"&&l||i===l,c=s?W(o,e,l):t;s||this.showIncompatibleColorWarning(o,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:o}=this,a=!i||e,l=!1;if(a){let d=N(e);if(!d||o!=="auto"&&d!==o){this.showIncompatibleColorWarning(e,o),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,o={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(o[i]){e.preventDefault();let a=o[i]*t,l=this.baseColorFieldColor.hue(),s=this.baseColorFieldColor.hue(l+a);this.internalColorSet(s,!1)}}handleHexInputChange(e){e.stopPropagation();let{clearable:t,color:i}=this,a=e.target.value;if(t&&!a){this.internalColorSet(null);return}let l=i&&R(S(i,P(this.mode)));a!==l&&this.internalColorSet(x(a))}handleSavedColorSelect(e){let t=e.currentTarget;this.internalColorSet(x(t.color))}handleChannelInput(e){let t=e.currentTarget,i=Number(t.getAttribute("data-channel-index")),a=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,a).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")),o=[...this.channels];!t.value&&!this.clearable&&(t.value=o[i]?.toString())}handleChannelFocus(e){e.currentTarget.selectText()}handleChannelKeyUpOrDown(e){this.shiftKeyChannelAdjustment=0;let{key:t}=e;if(t!=="ArrowUp"&&t!=="ArrowDown"||!e.composedPath().some(a=>a.classList?.contains(n.channel)))return;let{shiftKey:i}=e;if(e.preventDefault(),!this.color){this.internalColorSet(this.previousColor),e.stopPropagation();return}let o=9;this.shiftKeyChannelAdjustment=t==="ArrowUp"&&i?o:t==="ArrowDown"&&i?-o: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")),o=[...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"?(o[i]+1<=this.getChannelInputLimit(i)?o[i]+1:this.getChannelInputLimit(i)).toString():(o[i]-1>=0?o[i]-1:0).toString(),this.isActiveChannelInputEmpty=!1,this.upOrDownArrowKeyTracker=null);let s=t.value?Number(t.value):o[i];o[i]=l?B(s):s,this.updateColorFromChannels(o)}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,o){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(o))}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,o=P(e);if(i&&!o){let a=he(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}if(!i&&o){let a=X(e);return t&&console.warn(`setting format to (${a}) as the provided one (${e}) does not support alpha`),a}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 a=t===_.HEXA;return R(S(e.round(),a),a)}if(t.includes("-css")){let a=e[t.replace("-css","").replace("a","")]().round().string();if((t.endsWith("a")||t.endsWith("a-css"))&&e.alpha()===1){let s=a.slice(0,3),c=a.slice(4,-1);return`${s}a(${c}, ${e.alpha()})`}return a}let o=e[X(t)]().round().object();return t.endsWith("a")?ce(o):o}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(a=>a!==e);this.savedColors=i;let o=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(o,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 o=`${I}${this.storageId}`;this.storageId&&localStorage.setItem(o,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 o=e.createLinearGradient(0,0,t,0);o.addColorStop(0,"rgba(255,255,255,1)"),o.addColorStop(1,"rgba(255,255,255,0)"),e.fillStyle=o,e.fillRect(0,0,t,i);let a=e.createLinearGradient(0,0,0,i);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),e.fillStyle=a,e.fillRect(0,0,t,i),this.drawActiveColorFieldColor()}setCanvasContextSize(e,{height:t,width:i}){if(!e)return;let o=window.devicePixelRatio||1;e.width=i*o,e.height=t*o,e.style.height=`${t}px`,e.style.width=`${i}px`,e.getContext("2d").scale(o,o)}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 o={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,o),(e==="all"||e==="opacity-slider")&&this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas,o)}drawActiveColorFieldColor(){let{color:e}=this;if(!e)return;let t=e.hsv(),{staticDimensions:{thumb:{radius:i}}}=this,{width:o,height:a}=this.dynamicDimensions.colorField,l=t.saturationv()/(p.s/o),s=a-t.value()/(p.v/a);requestAnimationFrame(()=>{this.colorFieldScopeLeft=l,this.colorFieldScopeTop=s}),this.drawThumb(this.colorFieldRenderingContext,i,l,s,t,!1)}drawThumb(e,t,i,o,a,l){let c=2*Math.PI,h=1;if(e.beginPath(),e.arc(i,o,t,0,c),e.fillStyle="#fff",e.fill(),e.strokeStyle="rgba(0,0,0,0.3)",e.lineWidth=h,e.stroke(),l&&a.alpha()<1){let f=e.createPattern(this.getCheckeredBackgroundPattern(),"repeat");e.beginPath(),e.arc(i,o,t-3,0,c),e.fillStyle=f,e.fill()}e.globalCompositeOperation="source-atop",e.beginPath(),e.arc(i,o,t-3,0,c);let d=l?a.alpha():1;e.fillStyle=a.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,o=this.effectiveSliderWidth,a=t.hue()/(H/o),l=i,s=this.getSliderBoundX(a,o,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,o=0,a=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,o,a),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:o}}}=this,a=0,l=o-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,a,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,o,a){let l=t/2+1;e.beginPath(),e.moveTo(o+l,a),e.lineTo(o+i-l,a),e.quadraticCurveTo(o+i,a,o+i,a+l),e.lineTo(o+i,a+t-l),e.quadraticCurveTo(o+i,a+t,o+i-l,a+t),e.lineTo(o+l,a+t),e.quadraticCurveTo(o,a+t,o,a+t-l),e.lineTo(o,a+l),e.quadraticCurveTo(o,a,o+l,a),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,o=this.effectiveSliderWidth,a=O(t.alpha())/(b.max/o),l=i,s=this.getSliderBoundX(a,o,i);requestAnimationFrame(()=>{this.opacityScopeLeft=s}),this.drawThumb(this.opacitySliderRenderingContext,i,s,l,t,!0)}getSliderBoundX(e,t,i){let o=Ce(e,t,i);return o===0?e:o===-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,o={ArrowUp:.01,ArrowRight:.01,ArrowDown:-.01,ArrowLeft:-.01};if(o[i]){e.preventDefault();let a=o[i]*t,l=this.baseColorFieldColor.alpha(),s=this.baseColorFieldColor.alpha(l+a);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:o,staticDimensions:{thumb:{radius:a}},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=a,ge=c??Y*m.hue()/p.h,be=a,Se=f??Y*O(m.alpha())/b.max,J=t===void 0,z=ve==="vertical",[ye,we]=this.getAdjustedScopePosition(i,o),[$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,o=e===t,a=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=${o}>${a}</calcite-tab-title>`)}renderChannelsTab(e){let{clearable:t,channelMode:i,channels:o,messages:a,alphaChannel:l}=this,s=e===i,h=e==="rgb"?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],d=ie(this.el),f=l?o:o.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,o,a){return T(t,u`<calcite-input-number class=${r(n.channel)} data-channel-index=${t??w} dir=${o??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=${a} .value=${e?.toString()}></calcite-input-number>`)}};ee("calcite-color-picker",G);export{G as ColorPicker};
@@ -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.27 */
3
+ v5.0.0-next.28 */
4
4
  function o(e,n){return(e+n)%n}export{o as a};