@esri/calcite-components 1.4.0-next.0 → 1.4.0-next.10

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 (737) hide show
  1. package/dist/calcite/assets/icon/orientedImageryLayer16.json +1 -0
  2. package/dist/calcite/assets/icon/orientedImageryLayer24.json +1 -0
  3. package/dist/calcite/assets/icon/orientedImageryLayer32.json +1 -0
  4. package/dist/calcite/assets/icon/parcelLayer16.json +1 -0
  5. package/dist/calcite/assets/icon/parcelLayer24.json +1 -0
  6. package/dist/calcite/assets/icon/parcelLayer32.json +1 -0
  7. package/dist/calcite/assets/icon/viewAssociations16.json +1 -0
  8. package/dist/calcite/assets/icon/viewAssociations24.json +1 -0
  9. package/dist/calcite/assets/icon/viewAssociations32.json +1 -0
  10. package/dist/calcite/calcite.esm.js +2 -2
  11. package/dist/calcite/index.esm.js +2 -2
  12. package/dist/calcite/{p-289f6317.js → p-00383b72.js} +1 -1
  13. package/dist/calcite/{p-ba0d3bd7.entry.js → p-006421cf.entry.js} +2 -2
  14. package/dist/calcite/{p-cf703c59.entry.js → p-033b7e01.entry.js} +2 -2
  15. package/dist/calcite/{p-4326ccbd.js → p-04577b20.js} +1 -1
  16. package/dist/calcite/{p-e7ad5add.js → p-063a4869.js} +1 -1
  17. package/dist/calcite/{p-9748745f.entry.js → p-088553ab.entry.js} +2 -2
  18. package/dist/calcite/{p-2fa9c44a.js → p-0990e4b1.js} +1 -1
  19. package/dist/calcite/p-0b5b83ca.js +6 -0
  20. package/dist/calcite/{p-c01d0233.entry.js → p-0c5c7ac8.entry.js} +2 -2
  21. package/dist/calcite/{p-02ef04d5.entry.js → p-0f914551.entry.js} +2 -2
  22. package/dist/calcite/{p-0f59b0fa.js → p-11d8b4fa.js} +2 -2
  23. package/dist/calcite/{p-51cd139f.entry.js → p-12a17917.entry.js} +2 -2
  24. package/dist/calcite/{p-3c4b364e.entry.js → p-166b2653.entry.js} +2 -2
  25. package/dist/calcite/{p-376775c7.entry.js → p-1d8d9ad5.entry.js} +2 -2
  26. package/dist/calcite/p-21f70058.entry.js +6 -0
  27. package/dist/calcite/{p-edc60e96.entry.js → p-26ff46fc.entry.js} +2 -2
  28. package/dist/calcite/{p-6011d8eb.entry.js → p-285fde7a.entry.js} +2 -2
  29. package/dist/calcite/{p-11beded1.js → p-28bd653e.js} +3 -3
  30. package/dist/calcite/{p-64a44a39.js → p-2c11ed7d.js} +2 -2
  31. package/dist/calcite/p-2e345437.entry.js +6 -0
  32. package/dist/calcite/{p-57e653ea.js → p-2fba8e6a.js} +1 -1
  33. package/dist/calcite/{p-37d9d3e2.entry.js → p-33841e82.entry.js} +2 -2
  34. package/dist/calcite/{p-3255b488.js → p-33c5c291.js} +1 -1
  35. package/dist/calcite/{p-6088fbfa.js → p-369d7e1a.js} +1 -1
  36. package/dist/calcite/{p-e11ced36.js → p-37d03f0c.js} +2 -2
  37. package/dist/calcite/{p-f4cf789b.js → p-386abb7d.js} +3 -3
  38. package/dist/calcite/{p-f357d9a8.entry.js → p-39d22c35.entry.js} +2 -2
  39. package/dist/calcite/{p-137b6f9b.js → p-3d973854.js} +2 -2
  40. package/dist/calcite/{p-6f2233a8.entry.js → p-3fe662f7.entry.js} +2 -2
  41. package/dist/calcite/{p-df66e5af.entry.js → p-463c3817.entry.js} +2 -2
  42. package/dist/calcite/p-4e5db9b6.js +6 -0
  43. package/dist/calcite/{p-b7cc02fa.js → p-4f50176e.js} +1 -1
  44. package/dist/calcite/p-504ea909.entry.js +6 -0
  45. package/dist/calcite/{p-1d34d5b7.entry.js → p-548fb4ce.entry.js} +2 -2
  46. package/dist/calcite/{p-dc29d755.entry.js → p-55caae0c.entry.js} +2 -2
  47. package/dist/calcite/{p-f77c2524.entry.js → p-590cc126.entry.js} +2 -2
  48. package/dist/calcite/{p-5368cb06.entry.js → p-5bc7013c.entry.js} +2 -2
  49. package/dist/calcite/{p-34268eb0.entry.js → p-63d45233.entry.js} +2 -2
  50. package/dist/calcite/{p-cdbd4c6f.entry.js → p-6b84d6ef.entry.js} +2 -2
  51. package/dist/calcite/p-6d7e5273.entry.js +6 -0
  52. package/dist/calcite/{p-695e0525.entry.js → p-706ed58d.entry.js} +2 -2
  53. package/dist/calcite/p-718f633f.entry.js +6 -0
  54. package/dist/calcite/{p-7fb70776.entry.js → p-7249fbe5.entry.js} +2 -2
  55. package/dist/calcite/{p-5e23d67e.entry.js → p-72ba446e.entry.js} +2 -2
  56. package/dist/calcite/{p-6b118e60.entry.js → p-75b724ae.entry.js} +2 -2
  57. package/dist/calcite/{p-86a533d8.entry.js → p-771ec30b.entry.js} +2 -2
  58. package/dist/calcite/{p-f8e1c231.js → p-797661fe.js} +1 -1
  59. package/dist/calcite/{p-47d5e341.entry.js → p-7c870019.entry.js} +2 -2
  60. package/dist/calcite/{p-3b3b1e7e.entry.js → p-7cb6bb0c.entry.js} +2 -2
  61. package/dist/calcite/{p-b822b669.entry.js → p-7ddd51c0.entry.js} +2 -2
  62. package/dist/calcite/{p-8c54a92e.entry.js → p-80b4addf.entry.js} +2 -2
  63. package/dist/calcite/p-83924270.entry.js +6 -0
  64. package/dist/calcite/{p-8bd7bc4a.js → p-892279b1.js} +1 -1
  65. package/dist/calcite/{p-2fceaf3f.entry.js → p-8d09a65c.entry.js} +2 -2
  66. package/dist/calcite/{p-7b652538.entry.js → p-923166fc.entry.js} +2 -2
  67. package/dist/calcite/{p-c6b0ff12.entry.js → p-95fdcb91.entry.js} +2 -2
  68. package/dist/calcite/p-96968ac7.entry.js +6 -0
  69. package/dist/calcite/p-970be967.entry.js +6 -0
  70. package/dist/calcite/p-99e63f9f.js +6 -0
  71. package/dist/calcite/{p-6505aa9e.entry.js → p-9c84eb29.entry.js} +2 -2
  72. package/dist/calcite/{p-d37c6c61.js → p-9d02fe1c.js} +1 -1
  73. package/dist/calcite/{p-2f0fa893.entry.js → p-9d07088d.entry.js} +2 -2
  74. package/dist/calcite/{p-4f208a60.js → p-9fe27e8d.js} +2 -2
  75. package/dist/calcite/{p-b66a142d.js → p-a0a1f925.js} +1 -1
  76. package/dist/calcite/p-a15f7de3.js +6 -0
  77. package/dist/calcite/{p-483b59be.entry.js → p-a49d3536.entry.js} +2 -2
  78. package/dist/calcite/{p-4d55aa78.js → p-a7daef7a.js} +2 -2
  79. package/dist/calcite/p-a94a945f.entry.js +6 -0
  80. package/dist/calcite/{p-1f0e9bdc.entry.js → p-aa277b5a.entry.js} +2 -2
  81. package/dist/calcite/{p-06615599.entry.js → p-ac273467.entry.js} +2 -2
  82. package/dist/calcite/p-b140b736.js +6 -0
  83. package/dist/calcite/{p-5682711c.entry.js → p-b149fa47.entry.js} +2 -2
  84. package/dist/calcite/{p-58337196.entry.js → p-b2b99a48.entry.js} +2 -2
  85. package/dist/calcite/{p-5b24b90a.js → p-b6042b6c.js} +1 -1
  86. package/dist/calcite/{p-e243abb7.entry.js → p-b99a1036.entry.js} +2 -2
  87. package/dist/calcite/{p-dc1dcfc1.entry.js → p-c6a73b19.entry.js} +2 -2
  88. package/dist/calcite/{p-397fcd80.entry.js → p-c8c93dc4.entry.js} +2 -2
  89. package/dist/calcite/{p-ffd4191d.js → p-ca33af16.js} +2 -2
  90. package/dist/calcite/{p-db9631fc.entry.js → p-cc171e49.entry.js} +2 -2
  91. package/dist/calcite/{p-087c40ee.js → p-d2a6b24b.js} +1 -1
  92. package/dist/calcite/{p-48622a82.entry.js → p-d3245ccf.entry.js} +2 -2
  93. package/dist/calcite/{p-0008c6a3.entry.js → p-deb3bdde.entry.js} +2 -2
  94. package/dist/calcite/{p-21bacae6.entry.js → p-e0e93a72.entry.js} +2 -2
  95. package/dist/calcite/{p-94f16774.js → p-e1098787.js} +2 -2
  96. package/dist/calcite/p-e22cb550.entry.js +6 -0
  97. package/dist/calcite/{p-121f6053.js → p-e4c1febd.js} +1 -1
  98. package/dist/calcite/{p-1d426b87.js → p-e79254d3.js} +2 -2
  99. package/dist/calcite/{p-94aa5071.js → p-eacf0ee1.js} +1 -1
  100. package/dist/calcite/p-ee458bd5.js +6 -0
  101. package/dist/calcite/{p-1abc82c2.entry.js → p-f0fdf516.entry.js} +2 -2
  102. package/dist/calcite/{p-83bf9a0f.entry.js → p-f1642ec6.entry.js} +2 -2
  103. package/dist/calcite/{p-6950ca4b.js → p-f395d0e2.js} +2 -2
  104. package/dist/calcite/{p-f3753747.entry.js → p-f5e50012.entry.js} +2 -2
  105. package/dist/calcite/{p-c86d27a3.entry.js → p-fbfe8e4d.entry.js} +2 -2
  106. package/dist/calcite/{p-00a2d9ab.entry.js → p-fe1c87d5.entry.js} +2 -2
  107. package/dist/calcite/{p-97efa412.entry.js → p-ffdbd6d1.entry.js} +2 -2
  108. package/dist/cjs/{ExpandToggle-bdfd6fa1.js → ExpandToggle-953ef45b.js} +5 -5
  109. package/dist/cjs/{FloatingArrow-2721f8fc.js → FloatingArrow-cf108924.js} +2 -2
  110. package/dist/cjs/{Heading-6ef1898d.js → Heading-0b55bc06.js} +2 -2
  111. package/dist/cjs/{app-globals-cd964522.js → app-globals-4953ac0e.js} +2 -2
  112. package/dist/cjs/{array-576d7912.js → array-2726dfca.js} +1 -1
  113. package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
  114. package/dist/cjs/calcite-action-bar.cjs.entry.js +16 -16
  115. package/dist/cjs/calcite-action-group.cjs.entry.js +13 -13
  116. package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
  117. package/dist/cjs/calcite-action-pad.cjs.entry.js +14 -14
  118. package/dist/cjs/calcite-action.cjs.entry.js +11 -11
  119. package/dist/cjs/calcite-alert.cjs.entry.js +12 -12
  120. package/dist/cjs/calcite-avatar.cjs.entry.js +9 -8
  121. package/dist/cjs/calcite-block_2.cjs.entry.js +13 -13
  122. package/dist/cjs/calcite-button.cjs.entry.js +13 -13
  123. package/dist/cjs/calcite-card.cjs.entry.js +10 -10
  124. package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -10
  125. package/dist/cjs/calcite-chip-group.cjs.entry.js +8 -8
  126. package/dist/cjs/calcite-chip.cjs.entry.js +12 -12
  127. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +585 -339
  128. package/dist/cjs/calcite-combobox_3.cjs.entry.js +18 -18
  129. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +13 -13
  130. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -12
  131. package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
  132. package/dist/cjs/calcite-filter.cjs.entry.js +13 -13
  133. package/dist/cjs/calcite-flow-item.cjs.entry.js +15 -14
  134. package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
  135. package/dist/cjs/calcite-graph_2.cjs.entry.js +13 -13
  136. package/dist/cjs/calcite-handle.cjs.entry.js +10 -10
  137. package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
  138. package/dist/cjs/calcite-inline-editable.cjs.entry.js +12 -12
  139. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +18 -18
  140. package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
  141. package/dist/cjs/calcite-input-number.cjs.entry.js +13 -13
  142. package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
  143. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +14 -14
  144. package/dist/cjs/calcite-input.cjs.entry.js +13 -13
  145. package/dist/cjs/calcite-label.cjs.entry.js +6 -6
  146. package/dist/cjs/calcite-link.cjs.entry.js +7 -7
  147. package/dist/cjs/calcite-list_3.cjs.entry.js +50 -40
  148. package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
  149. package/dist/cjs/calcite-modal.cjs.entry.js +13 -13
  150. package/dist/cjs/calcite-notice.cjs.entry.js +12 -12
  151. package/dist/cjs/calcite-option_3.cjs.entry.js +10 -10
  152. package/dist/cjs/calcite-pagination.cjs.entry.js +10 -10
  153. package/dist/cjs/calcite-panel.cjs.entry.js +15 -15
  154. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +16 -16
  155. package/dist/cjs/calcite-popover.cjs.entry.js +16 -16
  156. package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
  157. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
  158. package/dist/cjs/calcite-radio-button.cjs.entry.js +10 -10
  159. package/dist/cjs/calcite-rating.cjs.entry.js +13 -13
  160. package/dist/cjs/calcite-scrim.cjs.entry.js +9 -9
  161. package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +9 -9
  162. package/dist/cjs/calcite-shell_3.cjs.entry.js +11 -14
  163. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
  164. package/dist/cjs/calcite-split-button.cjs.entry.js +4 -4
  165. package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -10
  166. package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
  167. package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
  168. package/dist/cjs/calcite-text-area.cjs.entry.js +15 -15
  169. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +5 -5
  170. package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
  171. package/dist/cjs/calcite-tip_3.cjs.entry.js +11 -11
  172. package/dist/cjs/calcite-tooltip.cjs.entry.js +46 -32
  173. package/dist/cjs/calcite-tree_2.cjs.entry.js +47 -27
  174. package/dist/cjs/calcite-value-list_2.cjs.entry.js +16 -16
  175. package/dist/cjs/calcite.cjs.js +5 -5
  176. package/dist/cjs/{composed-offset-position.esm-1a67d05e.js → composed-offset-position.esm-12a68feb.js} +1 -1
  177. package/dist/cjs/{conditionalSlot-229cfc41.js → conditionalSlot-f5ae40d5.js} +3 -3
  178. package/dist/cjs/{debounce-b4f960bc.js → debounce-a5772547.js} +1 -1
  179. package/dist/cjs/{dom-aa42bfcf.js → dom-60bc41cc.js} +116 -17
  180. package/dist/cjs/{filter-0dcbb310.js → filter-6d66baa0.js} +2 -2
  181. package/dist/cjs/{floating-ui-681123a5.js → floating-ui-eea897d6.js} +71 -65
  182. package/dist/cjs/{focusTrapComponent-2d2242ef.js → focusTrapComponent-adfb6fd0.js} +2 -2
  183. package/dist/cjs/{form-7bfb80aa.js → form-375179b0.js} +3 -3
  184. package/dist/cjs/{guid-00be0e24.js → guid-20fbb6f5.js} +1 -1
  185. package/dist/cjs/{index-8eb869ae.js → index-7ff03af4.js} +1 -1
  186. package/dist/cjs/index.cjs.js +2 -2
  187. package/dist/cjs/{interactive-2287fde4.js → interactive-e756405a.js} +1 -1
  188. package/dist/cjs/{key-a8c7ee49.js → key-965a0499.js} +1 -1
  189. package/dist/cjs/{label-cd4c10e7.js → label-d45108db.js} +2 -2
  190. package/dist/cjs/{loadable-68686b66.js → loadable-43aa8e12.js} +1 -1
  191. package/dist/cjs/loader.cjs.js +5 -5
  192. package/dist/cjs/{locale-c1aecec9.js → locale-352dde9f.js} +4 -4
  193. package/dist/cjs/{math-e324135c.js → math-9638f9db.js} +1 -1
  194. package/dist/cjs/{observers-2ab1ae0b.js → observers-c0279726.js} +1 -1
  195. package/dist/cjs/{openCloseComponent-9ad26303.js → openCloseComponent-02cae5bf.js} +2 -2
  196. package/dist/cjs/{resources-82f78554.js → resources-0c626808.js} +1 -1
  197. package/dist/cjs/{resources-b8855250.js → resources-2dbf7729.js} +1 -1
  198. package/dist/cjs/{resources-5c51a6fd.js → resources-4097e6e6.js} +5 -5
  199. package/dist/cjs/{resources-d24283c8.js → resources-b2185290.js} +1 -1
  200. package/dist/cjs/{resources-cf6da3a8.js → resources-db42842c.js} +1 -1
  201. package/dist/cjs/{resources-0e53773f.js → resources-ebef8fc8.js} +1 -1
  202. package/dist/cjs/{sortable.esm-b85af44a.js → sortable.esm-4549097b.js} +1 -1
  203. package/dist/cjs/{t9n-c3de7794.js → t9n-6dbfaf2b.js} +3 -3
  204. package/dist/cjs/{throttle-32a0520b.js → throttle-5b0015f5.js} +2 -2
  205. package/dist/cjs/utils-52def2ad.js +213 -0
  206. package/dist/cjs/{utils-b82df3c4.js → utils-643437eb.js} +3 -3
  207. package/dist/collection/components/accordion/accordion.js +1 -1
  208. package/dist/collection/components/accordion-item/accordion-item.js +1 -1
  209. package/dist/collection/components/accordion-item/resources.js +1 -1
  210. package/dist/collection/components/action/action.js +1 -1
  211. package/dist/collection/components/action/resources.js +1 -1
  212. package/dist/collection/components/action-bar/action-bar.css +9 -12
  213. package/dist/collection/components/action-bar/action-bar.js +1 -1
  214. package/dist/collection/components/action-bar/resources.js +1 -1
  215. package/dist/collection/components/action-bar/utils.js +1 -1
  216. package/dist/collection/components/action-group/action-group.js +1 -1
  217. package/dist/collection/components/action-group/resources.js +1 -1
  218. package/dist/collection/components/action-menu/action-menu.js +1 -1
  219. package/dist/collection/components/action-menu/resources.js +1 -1
  220. package/dist/collection/components/action-pad/action-pad.js +1 -1
  221. package/dist/collection/components/action-pad/resources.js +1 -1
  222. package/dist/collection/components/alert/alert.js +1 -1
  223. package/dist/collection/components/alert/resources.js +1 -1
  224. package/dist/collection/components/avatar/avatar.js +22 -4
  225. package/dist/collection/components/avatar/utils.js +1 -1
  226. package/dist/collection/components/block/block.css +1 -1
  227. package/dist/collection/components/block/block.js +1 -1
  228. package/dist/collection/components/block/resources.js +1 -1
  229. package/dist/collection/components/block-section/block-section.js +1 -1
  230. package/dist/collection/components/block-section/resources.js +1 -1
  231. package/dist/collection/components/button/button.js +1 -1
  232. package/dist/collection/components/button/resources.js +1 -1
  233. package/dist/collection/components/card/card.js +1 -1
  234. package/dist/collection/components/card/resources.js +1 -1
  235. package/dist/collection/components/checkbox/checkbox.js +1 -1
  236. package/dist/collection/components/chip/chip.js +1 -1
  237. package/dist/collection/components/chip/resources.js +1 -1
  238. package/dist/collection/components/chip-group/chip-group.js +1 -1
  239. package/dist/collection/components/color-picker/color-picker.css +59 -52
  240. package/dist/collection/components/color-picker/color-picker.js +449 -234
  241. package/dist/collection/components/color-picker/resources.js +37 -27
  242. package/dist/collection/components/color-picker/utils.js +116 -30
  243. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.css +19 -16
  244. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +225 -118
  245. package/dist/collection/components/color-picker-hex-input/resources.js +3 -3
  246. package/dist/collection/components/color-picker-swatch/color-picker-swatch.css +10 -6
  247. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +34 -7
  248. package/dist/collection/components/color-picker-swatch/resources.js +8 -2
  249. package/dist/collection/components/combobox/combobox.js +1 -1
  250. package/dist/collection/components/combobox/resources.js +1 -1
  251. package/dist/collection/components/combobox/utils.js +1 -1
  252. package/dist/collection/components/combobox-item/combobox-item.js +1 -1
  253. package/dist/collection/components/combobox-item/resources.js +1 -1
  254. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
  255. package/dist/collection/components/combobox-item-group/resources.js +1 -1
  256. package/dist/collection/components/date-picker/date-picker.js +1 -1
  257. package/dist/collection/components/date-picker/resources.js +1 -1
  258. package/dist/collection/components/date-picker/utils.js +1 -1
  259. package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
  260. package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
  261. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
  262. package/dist/collection/components/date-picker-month-header/resources.js +1 -1
  263. package/dist/collection/components/dropdown/dropdown.js +1 -1
  264. package/dist/collection/components/dropdown/resources.js +1 -1
  265. package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
  266. package/dist/collection/components/dropdown-group/resources.js +1 -1
  267. package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
  268. package/dist/collection/components/dropdown-item/resources.js +1 -1
  269. package/dist/collection/components/fab/fab.js +1 -1
  270. package/dist/collection/components/fab/resources.js +1 -1
  271. package/dist/collection/components/filter/filter.js +1 -1
  272. package/dist/collection/components/filter/resources.js +1 -1
  273. package/dist/collection/components/flow/flow.js +1 -1
  274. package/dist/collection/components/flow/resources.js +1 -1
  275. package/dist/collection/components/flow-item/flow-item.css +12 -0
  276. package/dist/collection/components/flow-item/flow-item.js +4 -3
  277. package/dist/collection/components/flow-item/resources.js +2 -1
  278. package/dist/collection/components/functional/ExpandToggle.js +1 -1
  279. package/dist/collection/components/functional/FloatingArrow.js +1 -1
  280. package/dist/collection/components/functional/Heading.js +1 -1
  281. package/dist/collection/components/graph/graph.js +1 -1
  282. package/dist/collection/components/graph/util.js +1 -1
  283. package/dist/collection/components/handle/handle.js +1 -1
  284. package/dist/collection/components/handle/resources.js +1 -1
  285. package/dist/collection/components/icon/assets/icon/orientedImageryLayer16.json +1 -0
  286. package/dist/collection/components/icon/assets/icon/orientedImageryLayer24.json +1 -0
  287. package/dist/collection/components/icon/assets/icon/orientedImageryLayer32.json +1 -0
  288. package/dist/collection/components/icon/assets/icon/parcelLayer16.json +1 -0
  289. package/dist/collection/components/icon/assets/icon/parcelLayer24.json +1 -0
  290. package/dist/collection/components/icon/assets/icon/parcelLayer32.json +1 -0
  291. package/dist/collection/components/icon/assets/icon/viewAssociations16.json +1 -0
  292. package/dist/collection/components/icon/assets/icon/viewAssociations24.json +1 -0
  293. package/dist/collection/components/icon/assets/icon/viewAssociations32.json +1 -0
  294. package/dist/collection/components/icon/icon.js +1 -1
  295. package/dist/collection/components/icon/resources.js +1 -1
  296. package/dist/collection/components/icon/utils.js +1 -1
  297. package/dist/collection/components/inline-editable/inline-editable.js +1 -1
  298. package/dist/collection/components/inline-editable/resources.js +1 -1
  299. package/dist/collection/components/input/input.js +1 -1
  300. package/dist/collection/components/input/resources.js +1 -1
  301. package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
  302. package/dist/collection/components/input-date-picker/resources.js +1 -1
  303. package/dist/collection/components/input-message/input-message.js +1 -1
  304. package/dist/collection/components/input-message/interfaces.js +1 -1
  305. package/dist/collection/components/input-number/input-number.js +1 -1
  306. package/dist/collection/components/input-number/resources.js +1 -1
  307. package/dist/collection/components/input-text/input-text.js +1 -1
  308. package/dist/collection/components/input-text/resources.js +1 -1
  309. package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
  310. package/dist/collection/components/input-time-picker/resources.js +1 -1
  311. package/dist/collection/components/label/label.js +1 -1
  312. package/dist/collection/components/label/resources.js +1 -1
  313. package/dist/collection/components/link/link.js +1 -1
  314. package/dist/collection/components/list/list.js +60 -30
  315. package/dist/collection/components/list/resources.js +2 -2
  316. package/dist/collection/components/list-item/list-item.js +1 -1
  317. package/dist/collection/components/list-item/resources.js +1 -1
  318. package/dist/collection/components/list-item/utils.js +1 -1
  319. package/dist/collection/components/list-item-group/list-item-group.js +1 -1
  320. package/dist/collection/components/list-item-group/resources.js +1 -1
  321. package/dist/collection/components/loader/loader.js +1 -1
  322. package/dist/collection/components/modal/modal.js +1 -1
  323. package/dist/collection/components/modal/resources.js +1 -1
  324. package/dist/collection/components/notice/notice.js +1 -1
  325. package/dist/collection/components/notice/resources.js +1 -1
  326. package/dist/collection/components/option/option.js +1 -1
  327. package/dist/collection/components/option-group/option-group.js +1 -1
  328. package/dist/collection/components/pagination/pagination.js +1 -1
  329. package/dist/collection/components/pagination/resources.js +1 -1
  330. package/dist/collection/components/panel/panel.css +9 -2
  331. package/dist/collection/components/panel/panel.js +2 -2
  332. package/dist/collection/components/panel/resources.js +1 -1
  333. package/dist/collection/components/pick-list/pick-list.js +1 -1
  334. package/dist/collection/components/pick-list/resources.js +1 -1
  335. package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
  336. package/dist/collection/components/pick-list/shared-list-render.js +1 -1
  337. package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
  338. package/dist/collection/components/pick-list-group/resources.js +1 -1
  339. package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
  340. package/dist/collection/components/pick-list-item/resources.js +1 -1
  341. package/dist/collection/components/popover/PopoverManager.js +1 -1
  342. package/dist/collection/components/popover/popover.js +1 -1
  343. package/dist/collection/components/popover/resources.js +1 -1
  344. package/dist/collection/components/progress/progress.js +1 -1
  345. package/dist/collection/components/radio-button/radio-button.js +1 -1
  346. package/dist/collection/components/radio-button/resources.js +1 -1
  347. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  348. package/dist/collection/components/rating/function/star.js +1 -1
  349. package/dist/collection/components/rating/rating.js +1 -1
  350. package/dist/collection/components/resources.js +1 -1
  351. package/dist/collection/components/scrim/resources.js +1 -1
  352. package/dist/collection/components/scrim/scrim.js +1 -1
  353. package/dist/collection/components/segmented-control/segmented-control.js +1 -1
  354. package/dist/collection/components/segmented-control-item/resources.js +1 -1
  355. package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
  356. package/dist/collection/components/select/resources.js +1 -1
  357. package/dist/collection/components/select/select.js +1 -1
  358. package/dist/collection/components/shell/resources.js +1 -1
  359. package/dist/collection/components/shell/shell.js +1 -1
  360. package/dist/collection/components/shell-center-row/resources.js +1 -1
  361. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -4
  362. package/dist/collection/components/shell-panel/resources.js +1 -1
  363. package/dist/collection/components/shell-panel/shell-panel.js +1 -1
  364. package/dist/collection/components/slider/resources.js +1 -1
  365. package/dist/collection/components/slider/slider.js +1 -1
  366. package/dist/collection/components/sortable-list/resources.js +1 -1
  367. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  368. package/dist/collection/components/split-button/resources.js +1 -1
  369. package/dist/collection/components/split-button/split-button.js +1 -1
  370. package/dist/collection/components/stepper/stepper.js +1 -1
  371. package/dist/collection/components/stepper-item/stepper-item.js +1 -1
  372. package/dist/collection/components/switch/switch.js +1 -1
  373. package/dist/collection/components/tab/tab.js +1 -1
  374. package/dist/collection/components/tab-nav/tab-nav.js +1 -1
  375. package/dist/collection/components/tab-title/resources.js +1 -1
  376. package/dist/collection/components/tab-title/tab-title.js +1 -1
  377. package/dist/collection/components/tabs/resources.js +1 -1
  378. package/dist/collection/components/tabs/tabs.js +1 -1
  379. package/dist/collection/components/text-area/resources.js +1 -1
  380. package/dist/collection/components/text-area/text-area.js +1 -1
  381. package/dist/collection/components/tile/resources.js +1 -1
  382. package/dist/collection/components/tile/tile.js +1 -1
  383. package/dist/collection/components/tile-select/resources.js +1 -1
  384. package/dist/collection/components/tile-select/tile-select.js +1 -1
  385. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  386. package/dist/collection/components/time-picker/resources.js +1 -1
  387. package/dist/collection/components/time-picker/time-picker.js +1 -1
  388. package/dist/collection/components/tip/resources.js +1 -1
  389. package/dist/collection/components/tip/tip.js +1 -1
  390. package/dist/collection/components/tip-group/tip-group.js +1 -1
  391. package/dist/collection/components/tip-manager/resources.js +1 -1
  392. package/dist/collection/components/tip-manager/tip-manager.js +1 -1
  393. package/dist/collection/components/tooltip/TooltipManager.js +38 -24
  394. package/dist/collection/components/tooltip/resources.js +1 -1
  395. package/dist/collection/components/tooltip/tooltip.js +1 -1
  396. package/dist/collection/components/tooltip/utils.js +1 -1
  397. package/dist/collection/components/tree/tree.js +25 -12
  398. package/dist/collection/components/tree/utils.js +1 -1
  399. package/dist/collection/components/tree-item/resources.js +1 -1
  400. package/dist/collection/components/tree-item/tree-item.js +15 -8
  401. package/dist/collection/components/value-list/resources.js +1 -1
  402. package/dist/collection/components/value-list/utils.js +1 -1
  403. package/dist/collection/components/value-list/value-list.js +1 -1
  404. package/dist/collection/components/value-list-item/resources.js +1 -1
  405. package/dist/collection/components/value-list-item/value-list-item.js +1 -1
  406. package/dist/collection/index.js +1 -1
  407. package/dist/collection/utils/array.js +1 -1
  408. package/dist/collection/utils/conditionalSlot.js +1 -1
  409. package/dist/collection/utils/config.js +1 -1
  410. package/dist/collection/utils/date.js +1 -1
  411. package/dist/collection/utils/dom.js +114 -15
  412. package/dist/collection/utils/filter.js +1 -1
  413. package/dist/collection/utils/floating-ui.js +1 -1
  414. package/dist/collection/utils/focusTrapComponent.js +1 -1
  415. package/dist/collection/utils/form.js +1 -1
  416. package/dist/collection/utils/globalAttributes.js +1 -1
  417. package/dist/collection/utils/globalScript.js +1 -1
  418. package/dist/collection/utils/guid.js +1 -1
  419. package/dist/collection/utils/interactive.js +1 -1
  420. package/dist/collection/utils/key.js +1 -1
  421. package/dist/collection/utils/label.js +1 -1
  422. package/dist/collection/utils/loadable.js +1 -1
  423. package/dist/collection/utils/locale.js +1 -1
  424. package/dist/collection/utils/math.js +1 -1
  425. package/dist/collection/utils/mode.js +1 -1
  426. package/dist/collection/utils/number.js +1 -1
  427. package/dist/collection/utils/observers.js +1 -1
  428. package/dist/collection/utils/openCloseComponent.js +1 -1
  429. package/dist/collection/utils/resources.js +1 -1
  430. package/dist/collection/utils/t9n.js +1 -1
  431. package/dist/collection/utils/time.js +1 -1
  432. package/dist/components/ExpandToggle.js +1 -1
  433. package/dist/components/FloatingArrow.js +1 -1
  434. package/dist/components/Heading.js +1 -1
  435. package/dist/components/action-group.js +1 -1
  436. package/dist/components/action-menu.js +1 -1
  437. package/dist/components/action.js +1 -1
  438. package/dist/components/array.js +1 -1
  439. package/dist/components/button.js +1 -1
  440. package/dist/components/calcite-accordion-item.js +1 -1
  441. package/dist/components/calcite-accordion.js +1 -1
  442. package/dist/components/calcite-action-bar.js +2 -2
  443. package/dist/components/calcite-action-group.js +1 -1
  444. package/dist/components/calcite-action-menu.js +1 -1
  445. package/dist/components/calcite-action-pad.js +1 -1
  446. package/dist/components/calcite-action.js +1 -1
  447. package/dist/components/calcite-alert.js +1 -1
  448. package/dist/components/calcite-avatar.js +5 -3
  449. package/dist/components/calcite-block-section.js +1 -1
  450. package/dist/components/calcite-block.js +2 -2
  451. package/dist/components/calcite-button.js +1 -1
  452. package/dist/components/calcite-card.js +1 -1
  453. package/dist/components/calcite-checkbox.js +1 -1
  454. package/dist/components/calcite-chip-group.js +1 -1
  455. package/dist/components/calcite-chip.js +1 -1
  456. package/dist/components/calcite-color-picker-hex-input.js +2 -2
  457. package/dist/components/calcite-color-picker-swatch.js +1 -1
  458. package/dist/components/calcite-color-picker.js +377 -314
  459. package/dist/components/calcite-combobox-item-group.js +1 -1
  460. package/dist/components/calcite-combobox-item.js +1 -1
  461. package/dist/components/calcite-combobox.js +1 -1
  462. package/dist/components/calcite-date-picker-day.js +1 -1
  463. package/dist/components/calcite-date-picker-month-header.js +1 -1
  464. package/dist/components/calcite-date-picker-month.js +1 -1
  465. package/dist/components/calcite-date-picker.js +1 -1
  466. package/dist/components/calcite-dropdown-group.js +1 -1
  467. package/dist/components/calcite-dropdown-item.js +1 -1
  468. package/dist/components/calcite-dropdown.js +1 -1
  469. package/dist/components/calcite-fab.js +1 -1
  470. package/dist/components/calcite-filter.js +1 -1
  471. package/dist/components/calcite-flow-item.js +4 -3
  472. package/dist/components/calcite-flow.js +1 -1
  473. package/dist/components/calcite-graph.js +1 -1
  474. package/dist/components/calcite-handle.js +1 -1
  475. package/dist/components/calcite-icon.js +1 -1
  476. package/dist/components/calcite-inline-editable.js +1 -1
  477. package/dist/components/calcite-input-date-picker.js +1 -1
  478. package/dist/components/calcite-input-message.js +1 -1
  479. package/dist/components/calcite-input-number.js +2 -617
  480. package/dist/components/calcite-input-text.js +1 -1
  481. package/dist/components/calcite-input-time-picker.js +1 -1
  482. package/dist/components/calcite-input.js +1 -1
  483. package/dist/components/calcite-label.js +1 -1
  484. package/dist/components/calcite-link.js +1 -1
  485. package/dist/components/calcite-list-item-group.js +1 -1
  486. package/dist/components/calcite-list-item.js +1 -1
  487. package/dist/components/calcite-list.js +40 -30
  488. package/dist/components/calcite-loader.js +1 -1
  489. package/dist/components/calcite-modal.js +1 -1
  490. package/dist/components/calcite-notice.js +1 -1
  491. package/dist/components/calcite-option-group.js +1 -1
  492. package/dist/components/calcite-option.js +1 -1
  493. package/dist/components/calcite-pagination.js +1 -1
  494. package/dist/components/calcite-panel.js +1 -1
  495. package/dist/components/calcite-pick-list-group.js +1 -1
  496. package/dist/components/calcite-pick-list-item.js +1 -1
  497. package/dist/components/calcite-pick-list.js +1 -1
  498. package/dist/components/calcite-popover.js +1 -1
  499. package/dist/components/calcite-progress.js +1 -1
  500. package/dist/components/calcite-radio-button-group.js +1 -1
  501. package/dist/components/calcite-radio-button.js +1 -1
  502. package/dist/components/calcite-rating.js +1 -1
  503. package/dist/components/calcite-scrim.js +1 -1
  504. package/dist/components/calcite-segmented-control-item.js +1 -1
  505. package/dist/components/calcite-segmented-control.js +1 -1
  506. package/dist/components/calcite-select.js +1 -1
  507. package/dist/components/calcite-shell-center-row.js +1 -4
  508. package/dist/components/calcite-shell-panel.js +1 -1
  509. package/dist/components/calcite-shell.js +1 -1
  510. package/dist/components/calcite-slider.js +1 -1
  511. package/dist/components/calcite-sortable-list.js +1 -1
  512. package/dist/components/calcite-split-button.js +1 -1
  513. package/dist/components/calcite-stepper-item.js +1 -1
  514. package/dist/components/calcite-stepper.js +1 -1
  515. package/dist/components/calcite-switch.js +1 -1
  516. package/dist/components/calcite-tab-nav.js +1 -1
  517. package/dist/components/calcite-tab-title.js +1 -1
  518. package/dist/components/calcite-tab.js +1 -1
  519. package/dist/components/calcite-tabs.js +1 -1
  520. package/dist/components/calcite-text-area.js +1 -1
  521. package/dist/components/calcite-tile-select-group.js +1 -1
  522. package/dist/components/calcite-tile-select.js +1 -1
  523. package/dist/components/calcite-tile.js +1 -1
  524. package/dist/components/calcite-time-picker.js +1 -1
  525. package/dist/components/calcite-tip-group.js +1 -1
  526. package/dist/components/calcite-tip-manager.js +1 -1
  527. package/dist/components/calcite-tip.js +1 -1
  528. package/dist/components/calcite-tooltip.js +1 -1
  529. package/dist/components/calcite-tree-item.js +15 -8
  530. package/dist/components/calcite-tree.js +25 -12
  531. package/dist/components/calcite-value-list-item.js +1 -1
  532. package/dist/components/calcite-value-list.js +1 -1
  533. package/dist/components/checkbox.js +1 -1
  534. package/dist/components/chip.js +1 -1
  535. package/dist/components/color-picker-hex-input.js +252 -88
  536. package/dist/components/color-picker-swatch.js +42 -2118
  537. package/dist/components/composed-offset-position.esm.js +1 -1
  538. package/dist/components/conditionalSlot.js +1 -1
  539. package/dist/components/date-picker-day.js +1 -1
  540. package/dist/components/date-picker-month-header.js +1 -1
  541. package/dist/components/date-picker-month.js +1 -1
  542. package/dist/components/date-picker.js +2 -2
  543. package/dist/components/date.js +1 -1
  544. package/dist/components/debounce.js +1 -1
  545. package/dist/components/dom.js +114 -15
  546. package/dist/components/dropdown.js +1 -1
  547. package/dist/components/filter.js +1 -1
  548. package/dist/components/filter2.js +1 -1
  549. package/dist/components/floating-ui.js +68 -62
  550. package/dist/components/focusTrapComponent.js +1 -1
  551. package/dist/components/form.js +1 -1
  552. package/dist/components/graph.js +1 -1
  553. package/dist/components/guid.js +1 -1
  554. package/dist/components/handle.js +1 -1
  555. package/dist/components/icon.js +1 -1
  556. package/dist/components/index.js +1 -1
  557. package/dist/components/index2.js +2116 -0
  558. package/dist/components/input-number.js +623 -0
  559. package/dist/components/input.js +2 -2
  560. package/dist/components/interactive.js +1 -1
  561. package/dist/components/key.js +1 -1
  562. package/dist/components/label.js +1 -1
  563. package/dist/components/label2.js +1 -1
  564. package/dist/components/link.js +1 -1
  565. package/dist/components/loadable.js +1 -1
  566. package/dist/components/loader.js +1 -1
  567. package/dist/components/locale.js +2 -2
  568. package/dist/components/math.js +1 -1
  569. package/dist/components/observers.js +1 -1
  570. package/dist/components/openCloseComponent.js +1 -1
  571. package/dist/components/panel.js +2 -2
  572. package/dist/components/pick-list-item.js +1 -1
  573. package/dist/components/popover.js +1 -1
  574. package/dist/components/progress.js +1 -1
  575. package/dist/components/resources.js +1 -1
  576. package/dist/components/resources2.js +1 -1
  577. package/dist/components/resources3.js +1 -1
  578. package/dist/components/scrim.js +1 -1
  579. package/dist/components/shared-list-render.js +1 -1
  580. package/dist/components/sortable.esm.js +1 -1
  581. package/dist/components/switch.js +1 -1
  582. package/dist/components/t9n.js +1 -1
  583. package/dist/components/tab-nav.js +1 -1
  584. package/dist/components/tab-title.js +1 -1
  585. package/dist/components/tab.js +1 -1
  586. package/dist/components/tabs.js +1 -1
  587. package/dist/components/throttle.js +1 -1
  588. package/dist/components/tile.js +1 -1
  589. package/dist/components/time-picker.js +2 -2
  590. package/dist/components/tooltip.js +38 -24
  591. package/dist/components/utils.js +112 -31
  592. package/dist/components/utils2.js +1 -1
  593. package/dist/components/utils3.js +1 -1
  594. package/dist/esm/{ExpandToggle-fde6af4a.js → ExpandToggle-453532fb.js} +5 -5
  595. package/dist/esm/{FloatingArrow-22ca29de.js → FloatingArrow-7e092a81.js} +2 -2
  596. package/dist/esm/{Heading-0cfa1161.js → Heading-3e8ede2b.js} +2 -2
  597. package/dist/esm/{app-globals-2838ecbb.js → app-globals-f5cd924f.js} +2 -2
  598. package/dist/esm/{array-2b055bc9.js → array-cd8aabd5.js} +1 -1
  599. package/dist/esm/calcite-accordion_2.entry.js +7 -7
  600. package/dist/esm/calcite-action-bar.entry.js +16 -16
  601. package/dist/esm/calcite-action-group.entry.js +13 -13
  602. package/dist/esm/calcite-action-menu.entry.js +9 -9
  603. package/dist/esm/calcite-action-pad.entry.js +14 -14
  604. package/dist/esm/calcite-action.entry.js +11 -11
  605. package/dist/esm/calcite-alert.entry.js +12 -12
  606. package/dist/esm/calcite-avatar.entry.js +9 -8
  607. package/dist/esm/calcite-block_2.entry.js +13 -13
  608. package/dist/esm/calcite-button.entry.js +13 -13
  609. package/dist/esm/calcite-card.entry.js +10 -10
  610. package/dist/esm/calcite-checkbox.entry.js +10 -10
  611. package/dist/esm/calcite-chip-group.entry.js +8 -8
  612. package/dist/esm/calcite-chip.entry.js +12 -12
  613. package/dist/esm/calcite-color-picker_3.entry.js +585 -339
  614. package/dist/esm/calcite-combobox_3.entry.js +18 -18
  615. package/dist/esm/calcite-date-picker_4.entry.js +13 -13
  616. package/dist/esm/calcite-dropdown_3.entry.js +12 -12
  617. package/dist/esm/calcite-fab.entry.js +7 -7
  618. package/dist/esm/calcite-filter.entry.js +13 -13
  619. package/dist/esm/calcite-flow-item.entry.js +15 -14
  620. package/dist/esm/calcite-flow.entry.js +3 -3
  621. package/dist/esm/calcite-graph_2.entry.js +13 -13
  622. package/dist/esm/calcite-handle.entry.js +10 -10
  623. package/dist/esm/calcite-icon.entry.js +6 -6
  624. package/dist/esm/calcite-inline-editable.entry.js +12 -12
  625. package/dist/esm/calcite-input-date-picker.entry.js +18 -18
  626. package/dist/esm/calcite-input-message.entry.js +5 -5
  627. package/dist/esm/calcite-input-number.entry.js +13 -13
  628. package/dist/esm/calcite-input-text.entry.js +13 -13
  629. package/dist/esm/calcite-input-time-picker_2.entry.js +14 -14
  630. package/dist/esm/calcite-input.entry.js +13 -13
  631. package/dist/esm/calcite-label.entry.js +6 -6
  632. package/dist/esm/calcite-link.entry.js +7 -7
  633. package/dist/esm/calcite-list_3.entry.js +50 -40
  634. package/dist/esm/calcite-loader.entry.js +3 -3
  635. package/dist/esm/calcite-modal.entry.js +13 -13
  636. package/dist/esm/calcite-notice.entry.js +12 -12
  637. package/dist/esm/calcite-option_3.entry.js +10 -10
  638. package/dist/esm/calcite-pagination.entry.js +10 -10
  639. package/dist/esm/calcite-panel.entry.js +15 -15
  640. package/dist/esm/calcite-pick-list_3.entry.js +16 -16
  641. package/dist/esm/calcite-popover.entry.js +16 -16
  642. package/dist/esm/calcite-progress.entry.js +2 -2
  643. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  644. package/dist/esm/calcite-radio-button.entry.js +10 -10
  645. package/dist/esm/calcite-rating.entry.js +13 -13
  646. package/dist/esm/calcite-scrim.entry.js +9 -9
  647. package/dist/esm/calcite-segmented-control_2.entry.js +9 -9
  648. package/dist/esm/calcite-shell_3.entry.js +11 -14
  649. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  650. package/dist/esm/calcite-split-button.entry.js +4 -4
  651. package/dist/esm/calcite-stepper_2.entry.js +10 -10
  652. package/dist/esm/calcite-switch.entry.js +10 -10
  653. package/dist/esm/calcite-tab_4.entry.js +7 -7
  654. package/dist/esm/calcite-text-area.entry.js +15 -15
  655. package/dist/esm/calcite-tile-select_2.entry.js +5 -5
  656. package/dist/esm/calcite-tile.entry.js +8 -8
  657. package/dist/esm/calcite-tip_3.entry.js +11 -11
  658. package/dist/esm/calcite-tooltip.entry.js +46 -32
  659. package/dist/esm/calcite-tree_2.entry.js +47 -27
  660. package/dist/esm/calcite-value-list_2.entry.js +16 -16
  661. package/dist/esm/calcite.js +6 -6
  662. package/dist/esm/{composed-offset-position.esm-3d3a33f0.js → composed-offset-position.esm-76d65efb.js} +1 -1
  663. package/dist/esm/{conditionalSlot-cf62479a.js → conditionalSlot-aa1ef58a.js} +3 -3
  664. package/dist/esm/{debounce-5d51c702.js → debounce-8c6a3cbc.js} +1 -1
  665. package/dist/esm/{dom-edf2353d.js → dom-b9bed823.js} +116 -17
  666. package/dist/esm/{filter-f186a577.js → filter-e32fe919.js} +2 -2
  667. package/dist/esm/{floating-ui-6059a48a.js → floating-ui-fbd8bbc8.js} +71 -65
  668. package/dist/esm/{focusTrapComponent-3502b72b.js → focusTrapComponent-d63c1aa7.js} +2 -2
  669. package/dist/esm/{form-9792ef7d.js → form-7d8a2b92.js} +3 -3
  670. package/dist/esm/{guid-f191591c.js → guid-8fc9c6e4.js} +1 -1
  671. package/dist/esm/{index-182e3b39.js → index-18aa0ab5.js} +1 -1
  672. package/dist/esm/index.js +2 -2
  673. package/dist/esm/{interactive-e9ff4b45.js → interactive-c1d7134a.js} +1 -1
  674. package/dist/esm/{key-3503f056.js → key-c41d524a.js} +1 -1
  675. package/dist/esm/{label-21907408.js → label-fab33c80.js} +2 -2
  676. package/dist/esm/{loadable-a090b4d4.js → loadable-a4cb0e0a.js} +1 -1
  677. package/dist/esm/loader.js +6 -6
  678. package/dist/esm/{locale-6785b469.js → locale-70a08434.js} +4 -4
  679. package/dist/esm/{math-370975a2.js → math-4700eb3d.js} +1 -1
  680. package/dist/esm/{observers-cd3c1de9.js → observers-72f649b9.js} +1 -1
  681. package/dist/esm/{openCloseComponent-f3ea7fc6.js → openCloseComponent-7099262f.js} +2 -2
  682. package/dist/esm/{resources-5b8d643e.js → resources-04baed08.js} +1 -1
  683. package/dist/esm/{resources-f0665539.js → resources-3a3d58c2.js} +1 -1
  684. package/dist/esm/{resources-052baf79.js → resources-6f9c09ba.js} +5 -5
  685. package/dist/esm/{resources-63300d44.js → resources-6fb499ae.js} +1 -1
  686. package/dist/esm/{resources-a3f184da.js → resources-7d1e244f.js} +1 -1
  687. package/dist/esm/{resources-18d35b9a.js → resources-941c20ae.js} +1 -1
  688. package/dist/esm/{sortable.esm-8a9dc2f0.js → sortable.esm-fa5ebcb2.js} +1 -1
  689. package/dist/esm/{t9n-ee8bc8cf.js → t9n-1cf2a8af.js} +3 -3
  690. package/dist/esm/{throttle-e902571a.js → throttle-48795209.js} +2 -2
  691. package/dist/esm/{utils-dfe7cb74.js → utils-b673e5a0.js} +3 -3
  692. package/dist/esm/utils-cb560d06.js +195 -0
  693. package/dist/extras/docs-json.json +201 -39
  694. package/dist/extras/vscode-data.json +28 -4
  695. package/dist/loader/cdn.js +1 -1
  696. package/dist/loader/index.cjs.js +1 -1
  697. package/dist/loader/index.es2017.js +1 -1
  698. package/dist/loader/index.js +1 -1
  699. package/dist/types/components/avatar/avatar.d.ts +3 -1
  700. package/dist/types/components/color-picker/color-picker.d.ts +55 -26
  701. package/dist/types/components/color-picker/interfaces.d.ts +1 -0
  702. package/dist/types/components/color-picker/resources.d.ts +28 -18
  703. package/dist/types/components/color-picker/utils.d.ts +16 -7
  704. package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +33 -16
  705. package/dist/types/components/color-picker-hex-input/resources.d.ts +2 -2
  706. package/dist/types/components/color-picker-swatch/color-picker-swatch.d.ts +3 -2
  707. package/dist/types/components/color-picker-swatch/resources.d.ts +6 -1
  708. package/dist/types/components/flow-item/flow-item.d.ts +2 -1
  709. package/dist/types/components/flow-item/resources.d.ts +1 -0
  710. package/dist/types/components/list/list.d.ts +7 -2
  711. package/dist/types/components/list/resources.d.ts +1 -1
  712. package/dist/types/components/panel/panel.d.ts +1 -1
  713. package/dist/types/components/tooltip/TooltipManager.d.ts +3 -2
  714. package/dist/types/components/tree-item/tree-item.d.ts +2 -0
  715. package/dist/types/components.d.ts +74 -10
  716. package/dist/types/preact.d.ts +2 -1
  717. package/dist/types/utils/dom.d.ts +115 -19
  718. package/hydrate/index.js +987 -512
  719. package/package.json +5 -6
  720. package/dist/calcite/p-0847f232.entry.js +0 -6
  721. package/dist/calcite/p-20ed5889.entry.js +0 -6
  722. package/dist/calcite/p-2cccfd42.entry.js +0 -6
  723. package/dist/calcite/p-3b4e44ab.entry.js +0 -6
  724. package/dist/calcite/p-425f369a.entry.js +0 -6
  725. package/dist/calcite/p-48afa956.entry.js +0 -6
  726. package/dist/calcite/p-5fae16d7.js +0 -6
  727. package/dist/calcite/p-8b364d5b.entry.js +0 -6
  728. package/dist/calcite/p-9779f6b5.entry.js +0 -6
  729. package/dist/calcite/p-afae74bd.js +0 -6
  730. package/dist/calcite/p-bf6df76d.js +0 -6
  731. package/dist/calcite/p-d2900eba.js +0 -6
  732. package/dist/calcite/p-e6dc645d.entry.js +0 -6
  733. package/dist/calcite/p-ebefbd07.js +0 -6
  734. package/dist/calcite/p-f0f05600.entry.js +0 -6
  735. package/dist/calcite/p-f8e0c9ff.js +0 -6
  736. package/dist/cjs/utils-7c8d4b9c.js +0 -124
  737. package/dist/esm/utils-9af69cbe.js +0 -114
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esri/calcite-components",
3
- "version": "1.4.0-next.0",
3
+ "version": "1.4.0-next.10",
4
4
  "description": "Web Components for Esri's Calcite Design System.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -71,10 +71,11 @@
71
71
  "url": "git+https://github.com/Esri/calcite-components.git"
72
72
  },
73
73
  "dependencies": {
74
- "@floating-ui/dom": "1.2.1",
74
+ "@floating-ui/dom": "1.2.7",
75
75
  "@stencil/core": "2.22.3",
76
76
  "@types/color": "3.0.3",
77
77
  "color": "4.2.3",
78
+ "composed-offset-position": "0.0.4",
78
79
  "focus-trap": "7.4.0",
79
80
  "form-request-submit-polyfill": "2.0.0",
80
81
  "lodash-es": "4.17.21",
@@ -84,7 +85,7 @@
84
85
  "@babel/preset-react": "7.18.6",
85
86
  "@esri/calcite-base": "^1.2.0",
86
87
  "@esri/calcite-colors": "6.1.0",
87
- "@esri/calcite-ui-icons": "3.22.1",
88
+ "@esri/calcite-ui-icons": "3.22.2",
88
89
  "@esri/eslint-plugin-calcite-components": "0.2.2",
89
90
  "@stencil-community/eslint-plugin": "0.5.0",
90
91
  "@stencil/postcss": "2.1.0",
@@ -116,7 +117,6 @@
116
117
  "cheerio": "1.0.0-rc.10",
117
118
  "chokidar": "3.5.3",
118
119
  "chromatic": "6.17.3",
119
- "composed-offset-position": "0.0.4",
120
120
  "concurrently": "7.6.0",
121
121
  "conventional-changelog-cli": "2.2.2",
122
122
  "cpy-cli": "^4.0.0",
@@ -162,7 +162,6 @@
162
162
  },
163
163
  "license": "SEE LICENSE IN copyright.txt",
164
164
  "volta": {
165
- "node": "16.13.2",
166
- "npm": "8.3.1"
165
+ "node": "16.20.0"
167
166
  }
168
167
  }
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as i,h as a,a as n}from"./p-57e653ea.js";import{S as e}from"./p-6088fbfa.js";import{u as s}from"./p-b7cc02fa.js";import{c}from"./p-2fa9c44a.js";const o=class{constructor(a){t(this,a),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.items=[],this.mutationObserver=c("mutation",(()=>{this.cleanUpDragAndDrop(),this.items=Array.from(this.el.children),this.setUpDragAndDrop()})),this.dragSelector=void 0,this.group=void 0,this.handleSelector="calcite-handle",this.layout="vertical",this.disabled=!1,this.loading=!1,this.handleActivated=!1}connectedCallback(){this.items=Array.from(this.el.children),this.setUpDragAndDrop(),this.beginObserving()}disconnectedCallback(){this.mutationObserver?.disconnect(),this.cleanUpDragAndDrop()}componentDidRender(){s(this)}calciteHandleNudgeNextHandler(t){this.handleNudgeEvent(t)}handleNudgeEvent(t){const{direction:i}=t.detail,a=t.target,n=this.items.find((i=>i.contains(a)||t.composedPath().includes(i))),e=this.items.length-1,s=this.items.indexOf(n);let c,o=!1;"up"===i?0===s?o=!0:c=s-1:s===e?c=0:s===e-1?o=!0:c=s+2,this.mutationObserver?.disconnect(),o?n.parentElement.appendChild(n):n.parentElement.insertBefore(n,this.items[c]),this.items=Array.from(this.el.children),a.activated=!0,a.setFocus(),this.beginObserving()}setUpDragAndDrop(){this.cleanUpDragAndDrop();const t={dataIdAttr:"id",group:this.group,handle:this.handleSelector,onUpdate:()=>{this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()},onStart:()=>{this.mutationObserver?.disconnect()},onEnd:()=>{this.beginObserving()}};this.dragSelector&&(t.draggable=this.dragSelector),this.sortable=e.create(this.el,t)}cleanUpDragAndDrop(){this.sortable?.destroy(),this.sortable=null}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}render(){const{layout:t}=this,i="horizontal"===t||!1;return a("div",{class:{container:!0,"container--vertical":!i,"container--horizontal":i}},a("slot",null))}get el(){return n(this)}};o.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}";export{o as calcite_sortable_list}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as e,h as i,a as n}from"./p-57e653ea.js";import{i as a,b as s,f as r,h as o}from"./p-11beded1.js";import{n as l,C as c,p as h,c as u,i as d,a as f,r as m,b as p}from"./p-f8e0c9ff.js";import{u as g}from"./p-b7cc02fa.js";import{i as b}from"./p-94aa5071.js";import{c as y,s as v,a as w}from"./p-f8e1c231.js";import{c as k,d as x}from"./p-94f16774.js";import{c as M}from"./p-121f6053.js";import{u as C,s as j,c as z,d as D}from"./p-64a44a39.js";import{t as F}from"./p-ffd4191d.js";import"./p-3255b488.js";import"./p-5b24b90a.js";import"./p-2fa9c44a.js";import"./p-289f6317.js";function A(t,e,i){return t(i={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var S={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_=A((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],s=0,r=t.length;s<r;s++){var o=t[s];(n=o)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,i.call(o)):a.push(o)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),O=A((function(t){var e=Object.hasOwnProperty,i={};for(var n in S)e.call(S,n)&&(i[S[n]]=n);var a=t.exports={to:{},get:{}};function s(t,e,i){return Math.min(Math.max(e,t),i)}function r(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,i;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),i="hsl";break;case"hwb":e=a.get.hwb(t),i="hwb";break;default:e=a.get.rgb(t),i="rgb"}return e?{model:i,value:e}:null},a.get.rgb=function(t){if(!t)return null;var i,n,a,r=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],n=0;n<3;n++){var o=2*n;r[n]=parseInt(i.slice(o,o+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],n=0;n<3;n++)r[n]=parseInt(i[n]+i[n],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(i[n+1],0);i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:e.call(S,i[1])?((r=S[i[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)r[n]=s(r[n],0,255);return r[3]=s(r[3],0,1),r},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=_(arguments);return"#"+r(t[0])+r(t[1])+r(t[2])+(t[3]<1?r(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=_(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=_(arguments),e=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+i+"%, "+n+"%)":"rgba("+e+"%, "+i+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(){var t=_(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=_(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return i[t.slice(0,3)]}})),$={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const q={};for(const t of Object.keys($))q[$[t]]=t;const I={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var E=I;for(const t of Object.keys(I)){if(!("channels"in I[t]))throw new Error("missing channels property: "+t);if(!("labels"in I[t]))throw new Error("missing channel labels property: "+t);if(I[t].labels.length!==I[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=I[t];delete I[t].channels,delete I[t].labels,Object.defineProperty(I[t],"channels",{value:e}),Object.defineProperty(I[t],"labels",{value:i})}function L(t,e){return function(i){return e(t(i))}}function N(t,e){const i=[e[t].parent,t];let n=E[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=L(E[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}I.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),s=Math.max(e,i,n),r=s-a;let o,l;s===a?o=0:e===s?o=(i-n)/r:i===s?o=2+(n-e)/r:n===s&&(o=4+(e-i)/r),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+s)/2;return l=s===a?0:c<=.5?r/(s+a):r/(2-s-a),[o,100*l,100*c]},I.rgb.hsv=function(t){let e,i,n,a,s;const r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(r,o,l),h=c-Math.min(r,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,s=0):(s=h/c,e=u(r),i=u(o),n=u(l),r===c?a=n-i:o===c?a=1/3+e-n:l===c&&(a=2/3+i-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*s,100*c]},I.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=I.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*s,100*n]},I.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(1-e,1-i,1-n);return[100*((1-e-a)/(1-a)||0),100*((1-i-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},I.rgb.keyword=function(t){const e=q[t];if(e)return e;let i,n=1/0;for(const e of Object.keys($)){const r=((a=t)[0]-(s=$[e])[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2;r<n&&(n=r,i=e)}var a,s;return i},I.keyword.rgb=function(t){return $[t]},I.rgb.xyz=function(t){let e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},I.rgb.lab=function(t){const e=I.rgb.xyz(t);let i=e[0],n=e[1],a=e[2];return i/=95.047,n/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*n-16,500*(i-n),200*(n-a)]},I.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,s,r;if(0===i)return r=255*n,[r,r,r];a=n<.5?n*(1+i):n+i-n*i;const o=2*n-a,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,r=6*s<1?o+6*(a-o)*s:2*s<1?a:3*s<2?o+(a-o)*(2/3-s)*6:o,l[t]=255*r;return l},I.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const s=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=s<=1?s:2-s,[e,100*(0===n?2*a/(s+a):2*i/(n+i)),(n+i)/2*100]},I.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,s=e-Math.floor(e),r=255*n*(1-i),o=255*n*(1-i*s),l=255*n*(1-i*(1-s));switch(n*=255,a){case 0:return[n,l,r];case 1:return[o,n,r];case 2:return[r,n,l];case 3:return[r,o,n];case 4:return[l,r,n];case 5:return[n,r,o]}},I.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let s,r;r=(2-i)*n;const o=(2-i)*a;return s=i*a,s/=o<=1?o:2-o,s=s||0,r/=2,[e,100*s,100*r]},I.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let s;a>1&&(i/=a,n/=a);const r=Math.floor(6*e),o=1-n;s=6*e-r,0!=(1&r)&&(s=1-s);const l=i+s*(o-i);let c,h,u;switch(r){default:case 6:case 0:c=o,h=l,u=i;break;case 1:c=l,h=o,u=i;break;case 2:c=i,h=o,u=l;break;case 3:c=i,h=l,u=o;break;case 4:c=l,h=i,u=o;break;case 5:c=o,h=i,u=l}return[255*c,255*h,255*u]},I.cmyk.rgb=function(t){const e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},I.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,s,r;return a=3.2406*e+-1.5372*i+-.4986*n,s=-.9689*e+1.8758*i+.0415*n,r=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*a,255*s,255*r]},I.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];return e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(e-i),200*(i-n)]},I.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const a=i**3,s=e**3,r=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},I.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let a;return a=360*Math.atan2(n,i)/2/Math.PI,a<0&&(a+=360),[e,Math.sqrt(i*i+n*n),a]},I.lch.lab=function(t){const e=t[1],i=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(i),e*Math.sin(i)]},I.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let s=null===e?I.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let r=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===s&&(r+=60),r},I.hsv.ansi16=function(t){return I.rgb.ansi16(I.hsv.rgb(t),t[2])},I.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},I.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},I.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},I.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},I.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},I.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,i),n),s=Math.min(Math.min(e,i),n),r=a-s;let o,l;return o=r<1?s/(1-r):0,l=r<=0?0:a===e?(i-n)/r%6:a===i?2+(n-e)/r:4+(e-i)/r,l/=6,l%=1,[360*l,100*r,100*o]},I.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let a=0;return n<1&&(a=(i-.5*n)/(1-n)),[t[0],100*n,100*a]},I.hsv.hcg=function(t){const e=t[2]/100,i=t[1]/100*e;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},I.hcg.rgb=function(t){const e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];const n=[0,0,0],a=t[0]/360%1*6,s=a%1,r=1-s;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=r,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=r,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=r}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},I.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},I.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},I.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},I.hwb.hcg=function(t){const e=1-t[2]/100,i=e-t[1]/100;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},I.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},I.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},I.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},I.gray.hsl=function(t){return[0,0,t[0]]},I.gray.hsv=I.gray.hsl,I.gray.hwb=function(t){return[0,100,t[0]]},I.gray.cmyk=function(t){return[0,0,0,t[0]]},I.gray.lab=function(t){return[t[0],0,0]},I.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},I.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const K={};Object.keys(E).forEach((t=>{K[t]={},Object.defineProperty(K[t],"channels",{value:E[t].channels}),Object.defineProperty(K[t],"labels",{value:E[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(E);for(let i=e.length,n=0;n<i;n++)t[e[n]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;){const t=i.pop(),n=Object.keys(E[t]);for(let a=n.length,s=0;s<a;s++){const a=n[s],r=e[a];-1===r.distance&&(r.distance=e[t].distance+1,r.parent=t,i.unshift(a))}}return e}(t),i={},n=Object.keys(e);for(let t=n.length,a=0;a<t;a++){const t=n[a];null!==e[t].parent&&(i[t]=N(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];K[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(n),K[t][i].raw=function(t){const e=function(...e){const i=e[0];return null==i?i:(i.length>1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var P=K;const U=["keyword","gray","hex"],T={};for(const t of Object.keys(P))T[[...P[t].labels].sort().join("")]=t;const H={};function V(t,e){if(!(this instanceof V))return new V(t,e);if(e&&e in U&&(e=null),e&&!(e in P))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof V)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=O.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=P[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=P[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=B(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in T))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=T[n];const{labels:a}=P[this.model],s=[];for(i=0;i<a.length;i++)s.push(t[a[i]]);this.color=B(s)}if(H[this.model])for(n=P[this.model].channels,i=0;i<n;i++){const t=H[this.model][i];t&&(this.color[i]=t(this.color[i]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}V.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in O.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return O.to[e.model](i)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),i=1===e.valpha?e.color:[...e.color,this.valpha];return O.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=P[this.model],{labels:i}=P[this.model];for(let n=0;n<e;n++)t[i[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new V([...this.color.map(J(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new V([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:R("rgb",0,W(255)),green:R("rgb",1,W(255)),blue:R("rgb",2,W(255)),hue:R(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:R("hsl",1,W(100)),lightness:R("hsl",2,W(100)),saturationv:R("hsv",1,W(100)),value:R("hsv",2,W(100)),chroma:R("hcg",1,W(100)),gray:R("hcg",2,W(100)),white:R("hwb",1,W(100)),wblack:R("hwb",2,W(100)),cyan:R("cmyk",0,W(100)),magenta:R("cmyk",1,W(100)),yellow:R("cmyk",2,W(100)),black:R("cmyk",3,W(100)),x:R("xyz",0,W(95.047)),y:R("xyz",1,W(100)),z:R("xyz",2,W(108.833)),l:R("lab",0,W(100)),a:R("lab",1),b:R("lab",2),keyword(t){return void 0!==t?new V(t):P[this.model].keyword(this.color)},hex(t){return void 0!==t?new V(t):O.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new V(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),O.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return V.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,s=2*a-1,r=i.alpha()-n.alpha(),o=((s*r==-1?s:(s+r)/(1+s*r))+1)/2,l=1-o;return V.rgb(o*i.red()+l*n.red(),o*i.green()+l*n.green(),o*i.blue()+l*n.blue(),i.alpha()*a+n.alpha()*(1-a))}};for(const t of Object.keys(P)){if(U.includes(t))continue;const{channels:e}=P[t];V.prototype[t]=function(...e){return this.model===t?new V(this):new V(e.length>0?e:[...(i=P[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},V[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=B(i,e)),new V(n,t)}}function J(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function R(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(H[n]||(H[n]=[]))[e]=i;return t=t[0],function(n){let a;return void 0!==n?(i&&(n=i(n)),a=this[t](),a.color[e]=n,a):(a=this[t]().color[e],i&&(a=i(a)),a)}}function W(t){return function(e){return Math.max(0,Math.min(t,e))}}function B(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var X=V;const Y="section",G="header",Q="control",Z="channel",tt="scope",et=X("#007AC2"),it="calcite-color-",nt={r:255,g:255,b:255},at={h:360,s:100,v:100},st={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}},rt=l(et.hex()),ot=class{constructor(n){t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:e}=t,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[e]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===e||"ArrowUp"===e?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[e].x||0,this.colorFieldScopeTop+i[e].y||0,!1))},this.handleHueScopeKeyDown=t=>{const e=t.shiftKey?10:1,{key:i}=t,n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[i]){t.preventDefault();const a=n[i]*e,s=this.baseColorFieldColor.hue(),r=this.baseColorFieldColor.hue(s+a);this.internalColorSet(r,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:e,color:i}=this,n=t.target.value;!e||n?n!==(i&&l(i.hex()))&&this.internalColorSet(X(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(X(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n="rgb"===this.channelMode?nt[Object.keys(nt)[i]]:at[Object.keys(at)[i]];let a;if(this.allowEmpty&&!e.value)a="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;a=M(t,0,n).toString()}e.value=a,e.internalSyncChildElValue()},this.handleChannelChange=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n=[...this.channels];if(this.allowEmpty&&!e.value)return this.channels=[null,null,null],void this.internalColorSet(null);n[i]=Number(e.value),this.updateColorFromChannels(n)},this.handleSavedColorKeyDown=t=>{b(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{if(!a(t))return;const{offsetX:e,offsetY:i}=t,n=this.getCanvasRegion(i);"color-field"===n?(this.hueThumbState="drag",this.captureColorFieldColor(e,i),this.colorFieldScopeNode?.focus()):"slider"===n&&(this.sliderThumbState="drag",this.captureHueSliderColor(e),this.hueScopeNode?.focus()),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!a(t))return;const e="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),e&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:e,dimensions:i}=this,n="drag"===this.hueThumbState;if(!e.isConnected||"drag"!==this.sliderThumbState&&!n)return;let a,s;const r=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-r.x,s=l-r.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<r.x+t&&o>r.x?o-r.x:o<r.x?0:t-1,s=l<r.y+e+n&&l>r.y?l-r.y:l<r.y?0:e+n}n?this.captureColorFieldColor(a,s,!1):this.captureHueSliderColor(a)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:e})=>{const{dimensions:{colorField:i,slider:n,thumb:a}}=this;this.colorFieldAndSliderInteractive=e<=i.height+n.height,this.colorFieldAndSliderHovered=!0;const s=this.getCanvasRegion(e);if("color-field"===s){const n=this.hueThumbState,s=this.baseColorFieldColor.hsv(),r=Math.round(s.saturationv()/(at.s/i.width)),o=Math.round(i.height-s.value()/(at.v/i.height)),l=this.containsPoint(t,e,r,o,a.radius);let c=!1;"idle"===n&&l?(this.hueThumbState="hover",c=!0):"hover"!==n||l||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===s){const s=this.baseColorFieldColor.hsv().saturationv(100).value(100),r=this.sliderThumbState,o=Math.round(s.hue()/(360/n.width)),l=Math.round((n.height+this.getSliderCapSpacing())/2)+i.height,c=this.containsPoint(t,e,o,l,a.radius);let h=!1;"idle"===r&&c?(this.sliderThumbState="hover",h=!0):"hover"!==r||c||(this.sliderThumbState="idle",h=!0),"drag"!==this.sliderThumbState&&h&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:e,messages:n}=this;return i("calcite-tab-title",{class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate,selected:t===e},"rgb"===t?n.rgb:n.hsv)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,messages:a}=this,r=t===e,o="rgb"===t,l=o?[a.r,a.g,a.b]:[a.h,a.s,a.v],c=o?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],h=s(this.el);return i("calcite-tab",{class:Q,key:t,selected:r},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,l[e],c[e],h)))))},this.renderChannel=(t,e,n,a,s)=>i("calcite-input",{class:Z,"data-channel-index":e,dir:s,label:a,lang:this.effectiveLocale,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:n,scale:"l"===this.scale?"m":"s",type:"number",value:t?.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const e=this.savedColors.filter((e=>e!==t));this.savedColors=e,this.storageId&&localStorage.setItem(`${it}${this.storageId}`,JSON.stringify(e))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const e=[...this.savedColors,t];this.savedColors=e,this.storageId&&localStorage.setItem(`${it}${this.storageId}`,JSON.stringify(e))},this.drawColorFieldAndSlider=F((()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())}),16),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,s=Math.round(at.s/a*t),r=Math.round(at.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(r),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)},this.allowEmpty=!1,this.color=et,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.scale="m",this.storageId=void 0,this.messageOverrides=void 0,this.numberingSystem=void 0,this.value=rt,this.defaultMessages=void 0,this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(et),this.dimensions=st.m,this.effectiveLocale="",this.messages=void 0,this.savedColors=[],this.colorFieldScopeTop=void 0,this.colorFieldScopeLeft=void 0,this.scopeOrientation=void 0,this.hueScopeLeft=void 0,this.hueScopeTop=void 0}handleColorChange(t,e){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=e}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){this.updateDimensions(t),this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas)}onMessagesChange(){}handleValueChange(t,e){const{allowEmpty:i,format:n}=this;let a=!1;if(!i||t){const i=h(t);if(!i||"auto"!==n&&i!==n)return this.showIncompatibleColorWarning(t,n),void(this.value=e);a=this.mode!==i,this.setMode(i)}const s="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(s||this.calciteColorPickerChange.emit());const r=i&&!t?null:X(t),o=!u(r,this.color);(a||o)&&this.internalColorSet(r,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||et}effectiveLocaleChange(){C(this,this.effectiveLocale)}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>t.classList?.contains(Z))))return;const{shiftKey:i}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===e&&i?9:"ArrowDown"===e&&i?-9:0}async setFocus(){await y(this),this.el.focus()}async componentWillLoad(){v(this);const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,s=h(n),r=a||"auto"===i&&s||i===s,o=a?null:r?X(n):e;r||this.showIncompatibleColorWarning(n,i),this.setMode(i),this.internalColorSet(o,!1,"initial"),this.updateDimensions(this.scale);const l=`${it}${this.storageId}`;this.storageId&&localStorage.getItem(l)&&(this.savedColors=JSON.parse(localStorage.getItem(l))),await j(this)}connectedCallback(){k(this),z(this)}componentDidLoad(){w(this)}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler),x(this),D(this)}componentDidRender(){g(this)}render(){const{allowEmpty:t,color:e,messages:n,hideHex:a,hideChannels:s,hideSaved:r,savedColors:o,scale:l}=this,c=e?e.hex():null,h="l"===l?"m":"s",{colorFieldAndSliderInteractive:u,colorFieldScopeTop:d,colorFieldScopeLeft:f,hueScopeLeft:m,hueScopeTop:p,scopeOrientation:g,dimensions:{colorField:{height:b,width:y},slider:{height:v}}}=this,w=p??v/2+b,k=m??y*et.hue()/at.h,x=null===e,M="vertical"===g;return i("div",{class:"container"},i("div",{class:"color-field-and-slider-wrap"},i("canvas",{class:{"color-field-and-slider":!0,"color-field-and-slider--interactive":u},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":M?n.value:n.saturation,"aria-valuemax":M?at.v:at.s,"aria-valuemin":"0","aria-valuenow":(M?e?.saturationv():e?.value())||"0",class:{[tt]:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,role:"slider",style:{top:`${d||0}px`,left:`${f||0}px`},tabindex:"0",ref:this.storeColorFieldScope}),i("div",{"aria-label":n.hue,"aria-valuemax":at.h,"aria-valuemin":"0","aria-valuenow":e?.round().hue()||et.round().hue(),class:{[tt]:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,role:"slider",style:{top:`${w}px`,left:`${k}px`},tabindex:"0",ref:this.storeHueScope})),a&&s?null:i("div",{class:{"control-section":!0,[Y]:!0}},a?null:i("div",{class:"color-hex-options"},i("span",{class:{[G]:!0,"header--hex":!0}},n.hex),i("calcite-color-picker-hex-input",{allowEmpty:t,class:Q,hexLabel:n.hex,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:h,value:c})),s?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:h},i("calcite-tab-nav",{slot:"title-group"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),r?null:i("div",{class:{"saved-colors-section":!0,[Y]:!0}},i("div",{class:G},i("label",null,n.saved),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",disabled:x,iconStart:"minus",kind:"neutral",label:n.deleteColor,onClick:this.deleteColor,scale:h,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",disabled:x,iconStart:"plus",kind:"neutral",label:n.saveColor,onClick:this.saveColor,scale:h,type:"button"}))),o.length>0?i("div",{class:"saved-colors"},[...o.map((t=>i("calcite-color-picker-swatch",{active:c===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:l,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,e){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${e})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:e}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/e*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:e},slider:{height:i}}}=this;return t<=e?"color-field":t<=e+i?"slider":"none"}internalColorSet(t,e=!0,i="user-interaction"){e&&u(t,this.color)||(this.internalColorUpdateContext=i,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,e=this.mode){if(!t)return null;if(e.includes("hex"))return l(t.round().hex());if(e.includes("-css"))return t[e.replace("-css","").replace("a","")]().round().string();const i=t[e]().round().object();return e.endsWith("a")&&(i.a=i.alpha,delete i.alpha),i}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:e}}}=this;return 2*e-t}updateDimensions(t="m"){this.dimensions=st[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e,width:i}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,i,e);const n=t.createLinearGradient(0,0,i,0);n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,i,e);const a=t.createLinearGradient(0,0,0,e);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=a,t.fillRect(0,0,i,e),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:e,width:i}){const n=window.devicePixelRatio||1;t.width=i*n,t.height=e*n,t.style.height=`${e}px`,t.style.width=`${i}px`,t.getContext("2d").scale(n,n)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,e,i,n,a){return Math.pow(t-i,2)+Math.pow(e-n,2)<=Math.pow(a,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const e=t.hsv(),{dimensions:{colorField:{height:i,width:n},thumb:{radius:a}}}=this,s=e.saturationv()/(at.s/n),r=i-e.value()/(at.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=r})),this.drawThumb(this.fieldAndSliderRenderingContext,a,s,r,e,this.hueThumbState)}drawThumb(t,e,i,n,a,s){const r=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,r),t.shadowBlur="hover"===s?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===s?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,r),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=a.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const e=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:i},slider:{height:n,width:a},thumb:{radius:s}}}=this,r=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=r,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,s,r,o,e,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e},slider:{height:i,width:n}}}=this,a=t.createLinearGradient(0,0,n,0),s=["red","yellow","lime","cyan","blue","magenta","red"],r=1/(s.length-1);let o=0;s.forEach((t=>{a.addColorStop(o,X(t).string()),o+=r})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(X(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:e}=this;return t[e]().array().map((t=>Math.floor(t)))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],messageOverrides:["onMessagesChange"],value:["handleValueChange"],effectiveLocale:["effectiveLocaleChange"]}}};ot.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;margin-block-end:4px}:host([scale=s]) .channel:last-child{margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n );outline-offset:16px}.color-field-and-slider{margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";const lt=X(),ct=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,e=t.value,i=`#${e}`;this.allowEmpty&&!e||d(i)&&f(i)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(m(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t},this.hexLabel="Hex",this.allowEmpty=!1,this.scale="m",this.value=l(lt.hex()),this.numberingSystem=void 0,this.internalColor=lt}connectedCallback(){const{allowEmpty:t,value:e}=this;if(e){const t=l(e);d(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}componentWillLoad(){v(this)}componentDidLoad(){w(this)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:s,value:r}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return r?(this.internalSetValue(l(this.nudgeRGBChannels(s,(a?10:1)*("ArrowUp"===o?1:-1)).hex()),c),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,c),void t.preventDefault());const h=e||i||n,u=1===o.length,d=p.test(o);!u||h||d||t.preventDefault()}onPaste(t){const e=t.clipboardData.getData("text");d(e)&&(t.preventDefault(),this.inputNode.value=e.slice(1))}render(){const{value:t}=this,e=this.formatForInternalInput(t);return i("div",{class:"container"},i("calcite-input",{class:"input",label:this.hexLabel,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",scale:this.scale,value:e,ref:this.storeInputRef}),e?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${e}`,scale:this.scale}):null)}async setFocus(){await y(this),r(this.inputNode)}internalSetValue(t,e,i=!0){if(t){const e=l(t);if(d(e)){const{internalColor:t}=this,n=!t||e!==l(t.hex());return this.internalColor=X(e),this.previousNonNullValue=e,this.value=e,void(n&&i&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(i&&this.calciteColorPickerHexInputChange.emit());this.value=e}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,e){return X.rgb(t.array().map((t=>t+e)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};ct.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";const ht=class{constructor(e){t(this,e),this.active=!1,this.color=void 0,this.scale="m"}handleColorChange(t){this.internalColor=X(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",s=n.hex(),r="light"===o(e)?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.15)";return i("svg",{class:"swatch",xmlns:"http://www.w3.org/2000/svg"},i("title",null,s),i("rect",{fill:s,height:"100%",id:"swatch",rx:a,stroke:r,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};ht.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:visible;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{position:absolute;inset:0px;block-size:100%;inline-size:100%}";export{ot as calcite_color_picker,ct as calcite_color_picker_hex_input,ht as calcite_color_picker_swatch}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,h as e,F as i,a,f as n}from"./p-57e653ea.js";import{c as o,d as l}from"./p-d2900eba.js";import{d as s,s as r,g as c,b as h,i as d}from"./p-11beded1.js";import{c as p,d as m}from"./p-94f16774.js";import{c as u}from"./p-121f6053.js";import{c as f,s as x,d as b,u as w}from"./p-64a44a39.js";import"./p-2fa9c44a.js";import"./p-3255b488.js";import"./p-5b24b90a.js";import"./p-94aa5071.js";const v="content",g=class{constructor(e){t(this,e),this.handleHeaderSlotChange=t=>{this.hasHeader=!!s(t)},this.handleFooterSlotChange=t=>{this.hasFooter=!!s(t)},this.handleAlertsSlotChange=t=>{this.hasAlerts=!!s(t),r(t)?.map((t=>{"CALCITE-ALERT"===t.nodeName&&(t.slottedInShell=!0)}))},this.handleModalsSlotChange=t=>{this.hasModals=!!s(t),r(t)?.map((t=>{"CALCITE-MODAL"===t.nodeName&&(t.slottedInShell=!0)}))},this.contentBehind=!1,this.hasHeader=!1,this.hasFooter=!1,this.hasAlerts=!1,this.hasModals=!1}connectedCallback(){o(this)}disconnectedCallback(){l(this)}renderHeader(){return e("div",{hidden:!this.hasHeader},e("slot",{key:"header",name:"header",onSlotchange:this.handleHeaderSlotChange}))}renderFooter(){return e("div",{class:"footer",hidden:!this.hasFooter,key:"footer"},e("slot",{name:"footer",onSlotchange:this.handleFooterSlotChange}))}renderAlerts(){return e("div",{hidden:!this.hasAlerts},e("slot",{key:"alerts",name:"alerts",onSlotchange:this.handleAlertsSlotChange}))}renderModals(){return e("div",{hidden:!this.hasModals},e("slot",{key:"modals",name:"modals",onSlotchange:this.handleModalsSlotChange}))}renderContent(){const t=e("slot",{key:"default-slot"}),i=e("slot",{key:"center-row-slot",name:"center-row"}),a=e("slot",{key:"panel-bottom-slot",name:"panel-bottom"}),n=e("slot",{key:"panel-top-slot",name:"panel-top"}),o="content-container";return this.contentBehind?[e("div",{class:{[v]:!0,"content--behind":!0},key:o},t),e("div",{class:"center-content"},n,a,i)]:[e("div",{class:v,key:o},n,t,a,i)]}renderMain(){return e("div",{class:"main"},e("slot",{name:"panel-start"}),this.renderContent(),e("slot",{name:"panel-end"}))}renderPositionedSlots(){return e("div",{class:"positioned-slot-wrapper"},this.renderAlerts(),this.renderModals())}render(){return e(i,null,this.renderHeader(),this.renderMain(),this.renderFooter(),this.renderPositionedSlots())}get el(){return a(this)}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:absolute;inset:0px;display:flex;block-size:100%;inline-size:100%;flex-direction:column;overflow:hidden;--calcite-shell-tip-spacing:26vw}.main{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;flex-direction:row;justify-content:space-between;overflow:hidden}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;overflow:auto}.content ::slotted(calcite-shell-center-row),.content ::slotted(calcite-panel),.content ::slotted(calcite-flow){flex:1 1 auto;align-self:stretch;max-block-size:unset}.content--behind{position:absolute;inset:0px;border-width:0px;z-index:calc(1 - 1);display:initial}::slotted(calcite-shell-center-row){inline-size:unset}::slotted(.header .heading){font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-normal)}slot[name=panel-end]::slotted(calcite-shell-panel){margin-inline-start:auto}::slotted(calcite-panel),::slotted(calcite-flow){border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3)}slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-top]::slotted(calcite-shell-center-row:not([detached])),slot[name=panel-bottom]::slotted(calcite-shell-center-row:not([detached])){border-inline-start-width:1px;border-inline-end-width:1px;border-color:var(--calcite-ui-border-3)}.center-content{display:flex;flex-direction:column;justify-content:space-between;block-size:100%;inline-size:100%;min-inline-size:0}::slotted(calcite-shell-center-row){flex:none;align-self:stretch}::slotted(calcite-tip-manager){position:absolute;z-index:500;box-sizing:border-box}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}::slotted(calcite-tip-manager){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.25rem;--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);inset-block-end:0.5rem;inset-inline:var(--calcite-shell-tip-spacing)}slot[name=center-row]::slotted(calcite-shell-center-row),slot[name=panel-bottom]::slotted(calcite-shell-center-row){margin-block-start:auto}slot[name=panel-top]::slotted(calcite-shell-center-row){margin-block-end:auto}.position-wrapper{position:absolute;pointer-events:none;inset:0}";const y="action-bar",z=class{constructor(e){t(this,e),this.detached=!1,this.heightScale="s",this.position="end"}connectedCallback(){o(this)}disconnectedCallback(){l(this)}render(){const{el:t}=this,a=e("div",{class:"content"},e("slot",null)),n=c(t,y);n&&(n.layout="horizontal");const o=[n?e("div",{class:"action-bar-container",key:"action-bar"},e("slot",{name:y})):null,a];return"end"===n?.position&&o.reverse(),e(i,null,o)}get el(){return a(this)}};z.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{z-index:1;display:flex;flex:1 1 auto;overflow:hidden;background-color:transparent}.content{margin:0px;display:flex;block-size:100%;inline-size:100%;overflow:hidden;flex:1 0 0}.action-bar-container{display:flex}:host([detached]){margin-inline:0.5rem;margin-block:0.5rem 1.5rem}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}:host([detached]){animation:in-up var(--calcite-internal-animation-timing-slow) ease-in-out;border-radius:0.25rem;border-width:0px;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([position=end]){align-self:flex-end}:host([position=start]){align-self:flex-start}:host([height-scale=s]){block-size:33.333333%}:host([height-scale=m]){block-size:70%}:host([height-scale=l]){block-size:100%}:host([height-scale=l][detached]){block-size:calc(100% - 2rem)}::slotted(calcite-panel){block-size:100%;inline-size:100%}::slotted(calcite-action-bar),::slotted(calcite-action-bar[position=end]){border-inline-end:1px solid;border-color:var(--calcite-ui-border-3)}";const k="header",_=class{constructor(e){t(this,e),this.initialContentWidth=null,this.initialContentHeight=null,this.initialClientX=null,this.initialClientY=null,this.contentWidthMax=null,this.contentWidthMin=null,this.contentHeightMax=null,this.contentHeightMin=null,this.step=1,this.stepMultiplier=10,this.actionBars=[],this.storeContentEl=t=>{this.contentEl=t},this.getKeyAdjustedSize=t=>{const{key:e}=t,{el:i,step:a,stepMultiplier:n,layout:o,contentWidthMin:l,contentWidthMax:s,initialContentWidth:r,initialContentHeight:c,contentHeightMin:d,contentHeightMax:p,position:m}=this,u=a*n;["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"].indexOf(e)>-1&&t.preventDefault();const f=["ArrowLeft","ArrowRight"],x=["ArrowDown","ArrowUp"],b="rtl"===h(i)&&f.includes(e)?-1:1;if("horizontal"===o?"end"===m?e===x[1]||e===f[0]:e===x[0]||e===f[1]:e===x[1]||("end"===m?e===f[0]:e===f[1])){const e=t.shiftKey?u:a;return"horizontal"===o?c+b*e:r+b*e}if("horizontal"===o?"end"===m?e===x[0]||e===f[0]:e===x[1]||e===f[1]:e===x[0]||("end"===m?e===f[1]:e===f[0])){const e=t.shiftKey?u:a;return"horizontal"===o?c-b*e:r-b*e}return"Home"===e&&"horizontal"===o&&"number"==typeof d?d:"Home"===e&&"vertical"===o&&"number"==typeof l?l:"End"===e&&"horizontal"===o&&"number"==typeof p?p:"End"===e&&"vertical"===o&&"number"==typeof s?s:"PageDown"===e?"horizontal"===o?c-u:r-u:"PageUp"===e?"horizontal"===o?c+u:r+u:null},this.initialKeydownWidth=t=>{this.setInitialContentWidth();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentWidth(e)},this.initialKeydownHeight=t=>{this.setInitialContentHeight();const e=this.getKeyAdjustedSize(t);"number"==typeof e&&this.setContentHeight(e)},this.separatorKeyDown=t=>{"horizontal"===this.layout?this.initialKeydownHeight(t):this.initialKeydownWidth(t)},this.separatorPointerMove=t=>{t.preventDefault();const{el:e,layout:i,initialContentWidth:a,initialContentHeight:n,position:o,initialClientX:l,initialClientY:s}=this,r="horizontal"===i?t.clientY-s:t.clientX-l,c="vertical"===i&&"rtl"===h(e)?-1:1,d="end"===o?-c*r:c*r;"horizontal"===i?this.setContentHeight(n+d):this.setContentWidth(a+d)},this.separatorPointerUp=t=>{d(t)&&(t.preventDefault(),document.removeEventListener("pointerup",this.separatorPointerUp),document.removeEventListener("pointermove",this.separatorPointerMove))},this.setInitialContentHeight=()=>{this.initialContentHeight=this.contentEl?.getBoundingClientRect().height},this.setInitialContentWidth=()=>{this.initialContentWidth=this.contentEl?.getBoundingClientRect().width},this.separatorPointerDown=t=>{if(!d(t))return;t.preventDefault();const{separatorEl:e}=this;e&&document.activeElement!==e&&e.focus(),"horizontal"===this.layout?(this.setInitialContentHeight(),this.initialClientY=t.clientY):(this.setInitialContentWidth(),this.initialClientX=t.clientX),document.addEventListener("pointerup",this.separatorPointerUp),document.addEventListener("pointermove",this.separatorPointerMove)},this.connectSeparator=t=>{this.disconnectSeparator(),this.separatorEl=t,t.addEventListener("pointerdown",this.separatorPointerDown)},this.disconnectSeparator=()=>{this.separatorEl?.removeEventListener("pointerdown",this.separatorPointerDown)},this.setActionBarsLayout=t=>{t.forEach((t=>t.layout=this.layout))},this.handleActionBarSlotChange=t=>{const e=r(t).filter((t=>t?.matches("calcite-action-bar")));this.actionBars=e,this.setActionBarsLayout(e)},this.collapsed=!1,this.detached=!1,this.detachedHeightScale="l",this.widthScale="m",this.layout="vertical",this.position=void 0,this.resizable=!1,this.messages=void 0,this.messageOverrides=void 0,this.contentWidth=null,this.contentHeight=null,this.defaultMessages=void 0,this.effectiveLocale=""}layoutHandler(){this.setActionBarsLayout(this.actionBars)}onMessagesChange(){}connectedCallback(){o(this),p(this),f(this)}async componentWillLoad(){await x(this)}disconnectedCallback(){l(this),this.disconnectSeparator(),m(this),b(this)}componentDidLoad(){this.updateAriaValues()}effectiveLocaleChange(){w(this,this.effectiveLocale)}renderHeader(){const{el:t}=this;return c(t,k)?e("div",{class:"content__header",key:"header"},e("slot",{name:k})):null}render(){const{collapsed:t,detached:i,position:a,initialContentWidth:n,initialContentHeight:o,contentWidth:l,contentWidthMax:s,contentWidthMin:r,contentHeight:c,contentHeightMax:h,contentHeightMin:d,resizable:p,layout:m}=this,u=!i&&p,f=e("div",{class:{content:!0,"content--detached":i},hidden:t,key:"content",style:u?"horizontal"===m?c?{height:`${c}px`}:null:l?{width:`${l}px`}:null:null,ref:this.storeContentEl},this.renderHeader(),e("div",{class:"content__body"},e("slot",null))),x=u?e("div",{"aria-label":this.messages.resize,"aria-orientation":"horizontal"===m?"vertical":"horizontal","aria-valuemax":"horizontal"==m?h:s,"aria-valuemin":"horizontal"==m?d:r,"aria-valuenow":"horizontal"==m?c??o:l??n,class:"separator",key:"separator",onKeyDown:this.separatorKeyDown,role:"separator",tabIndex:0,"touch-action":"none",ref:this.connectSeparator}):null,b=[e("slot",{key:"action-bar",name:"action-bar",onSlotchange:this.handleActionBarSlotChange}),f,x];return"end"===a&&b.reverse(),e("div",{class:{container:!0}},b)}setContentWidth(t){const{contentWidthMax:e,contentWidthMin:i}=this,a=Math.round(t);this.contentWidth="number"==typeof e&&"number"==typeof i?u(a,i,e):a}updateAriaValues(){const{contentEl:t}=this,e=t&&getComputedStyle(t);e&&("horizontal"===this.layout?this.updateHeights(e):this.updateWidths(e),n(this))}setContentHeight(t){const{contentHeightMax:e,contentHeightMin:i}=this,a=Math.round(t);this.contentHeight="number"==typeof e&&"number"==typeof i?u(a,i,e):a}updateWidths(t){const e=parseInt(t.getPropertyValue("max-width"),10),i=parseInt(t.getPropertyValue("min-width"),10),a=parseInt(t.getPropertyValue("width"),10);"number"!=typeof a||isNaN(a)||(this.initialContentWidth=a),"number"!=typeof e||isNaN(e)||(this.contentWidthMax=e),"number"!=typeof i||isNaN(i)||(this.contentWidthMin=i)}updateHeights(t){const e=parseInt(t.getPropertyValue("max-height"),10),i=parseInt(t.getPropertyValue("min-height"),10),a=parseInt(t.getPropertyValue("height"),10);"number"!=typeof a||isNaN(a)||(this.initialContentHeight=a),"number"!=typeof e||isNaN(e)||(this.contentHeightMax=e),"number"!=typeof i||isNaN(i)||(this.contentHeightMin=i)}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{layout:["layoutHandler"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};_.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{pointer-events:none;position:relative;display:flex;flex:0 1 auto;align-items:stretch;--calcite-shell-panel-detached-max-height:unset;z-index:var(--calcite-shell-panel-z-index, 1)}:host([layout=vertical]){z-index:var(--calcite-shell-panel-z-index, calc(1 + 1))}:host([layout=horizontal]) .content{--calcite-shell-panel-height-internal:var(--calcite-shell-panel-height, 20vh);--calcite-shell-panel-max-height-internal:var(--calcite-shell-panel-max-height, 420px);--calcite-shell-panel-min-height-internal:var(--calcite-shell-panel-min-height, 240px)}:host([layout=vertical][width-scale=s]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 12vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 300px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 150px)}:host([layout=vertical][width-scale=m]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 20vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 420px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 240px)}:host([layout=vertical][width-scale=l]) .content{--calcite-shell-panel-width-internal:var(--calcite-shell-panel-width, 45vw);--calcite-shell-panel-max-width-internal:var(--calcite-shell-panel-max-width, 680px);--calcite-shell-panel-min-width-internal:var(--calcite-shell-panel-min-width, 340px)}:host([detached-height-scale=s]) .content--detached{--calcite-shell-panel-detached-max-height-internal:var(--calcite-shell-panel-detached-max-height, 40vh)}:host([detached-height-scale=m]) .content--detached{--calcite-shell-panel-detached-max-height-internal:var(--calcite-shell-panel-detached-max-height, 60vh)}:host([detached-height-scale=l]) .content--detached{--calcite-shell-panel-detached-max-height-internal:var(--calcite-shell-panel-detached-max-height, 80vh)}.container{pointer-events:none;box-sizing:border-box;display:flex;flex:1 1 auto;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}.container *{box-sizing:border-box}:host([layout=horizontal]) .container{flex-direction:column}:host(:hover) .separator:not(:hover):not(:focus),:host(:focus-within) .separator:not(:hover):not(:focus){opacity:1;background-color:var(--calcite-ui-border-3)}.separator{pointer-events:auto;position:absolute;display:flex;background-color:transparent;opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;cursor:col-resize;outline:none}.separator:hover{opacity:1;background-color:var(--calcite-ui-border-2)}.separator:focus{background-color:var(--calcite-ui-brand);opacity:1}:host([layout=vertical]) .separator{inset-block:0px;block-size:100%;inline-size:0.125rem;cursor:col-resize}:host([layout=horizontal][position=start]) .separator{inset-block-end:0px}:host([layout=horizontal][position=end]) .separator{inset-block-start:0px}:host([layout=horizontal]) .separator{inset-inline-end:0px;block-size:0.125rem;inline-size:100%;cursor:row-resize}:host([layout=vertical][position=start]) .separator{inset-inline-end:-2px}:host([layout=horizontal][position=start]) .separator{inset-block-end:-2px}:host([layout=vertical][position=end]) .separator{inset-inline-start:-2px}:host([layout=horizontal][position=end]) .separator{inset-block-start:-2px}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%;inline-size:100%;flex:1 1 auto;max-block-size:unset;max-inline-size:unset}::slotted(.calcite-match-height){display:flex;flex:1 1 auto;overflow:hidden}.content{pointer-events:auto;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;align-self:stretch;background-color:var(--calcite-ui-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), max-inline-size var(--calcite-animation-timing)}:host([layout=vertical]) .content{inline-size:var(--calcite-shell-panel-width-internal);max-inline-size:var(--calcite-shell-panel-max-width-internal);min-inline-size:var(--calcite-shell-panel-min-width-internal)}:host([layout=horizontal]) .content{block-size:var(--calcite-shell-panel-height-internal);max-block-size:var(--calcite-shell-panel-max-height-internal);min-block-size:var(--calcite-shell-panel-min-height-internal)}.content__header{display:flex;flex:0 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch}.content__body{display:flex;flex:1 1 auto;flex-direction:column;overflow:hidden}.content--detached{margin-inline:0.5rem;margin-block:0.5rem auto;block-size:auto;overflow:hidden;border-radius:0.25rem;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);max-block-size:var(--calcite-shell-panel-detached-max-height-internal)}.content--detached ::slotted(calcite-panel),.content--detached ::slotted(calcite-flow){max-block-size:unset}:host([position=start]) .content--detached ::slotted(calcite-panel),:host([position=start]) .content--detached ::slotted(calcite-flow),:host([position=end]) .content--detached ::slotted(calcite-panel),:host([position=end]) .content--detached ::slotted(calcite-flow){border-style:none}.content[hidden]{display:none}slot[name=action-bar]::slotted(calcite-action-bar),.content ::slotted(calcite-flow),.content ::slotted(calcite-panel:not([closed])){border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=start]) .content ::slotted(calcite-flow),:host([position=start]) .content ::slotted(calcite-panel){border-inline-start:none}:host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),:host([position=end]) .content ::slotted(calcite-flow),:host([position=end]) .content ::slotted(calcite-panel){border-inline-end:none}:host([layout=horizontal]) slot[name=action-bar]::slotted(calcite-action-bar){border-inline:0}:host([layout=horizontal][position=start]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=start]) .content ::slotted(calcite-panel){border-inline:0;border-block-start:0}:host([layout=horizontal][position=end]) .content ::slotted(calcite-flow),:host([layout=horizontal][position=end]) .content ::slotted(calcite-panel){border-inline:0;border-block-end:0}";export{g as calcite_shell,z as calcite_shell_center_row,_ as calcite_shell_panel}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as a,h as i,H as e,a as s}from"./p-57e653ea.js";import{b as o}from"./p-11beded1.js";import{u as n}from"./p-b7cc02fa.js";import{s as c,a as l,c as r}from"./p-f8e1c231.js";import{c as d,d as h}from"./p-94f16774.js";import{c as m,s as p,d as f,u}from"./p-64a44a39.js";import{S as b}from"./p-8bd7bc4a.js";import"./p-3255b488.js";import"./p-5b24b90a.js";import"./p-94aa5071.js";import"./p-2fa9c44a.js";const g=class{constructor(i){t(this,i),this.calciteFlowItemBack=a(this,"calciteFlowItemBack",6),this.calciteFlowItemScroll=a(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=a(this,"calciteFlowItemClose",6),this.handlePanelScroll=t=>{t.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=t=>{t.stopPropagation(),this.calciteFlowItemClose.emit()},this.backButtonClick=()=>{this.calciteFlowItemBack.emit()},this.setBackRef=t=>{this.backButtonEl=t},this.setContainerRef=t=>{this.containerEl=t},this.closable=!1,this.closed=!1,this.beforeBack=void 0,this.description=void 0,this.disabled=!1,this.heading=void 0,this.headingLevel=void 0,this.loading=!1,this.menuOpen=!1,this.messageOverrides=void 0,this.messages=void 0,this.showBackButton=!1,this.backButtonEl=void 0,this.defaultMessages=void 0,this.effectiveLocale=""}onMessagesChange(){}connectedCallback(){d(this),m(this)}async componentWillLoad(){await p(this),c(this)}componentDidRender(){n(this)}disconnectedCallback(){h(this),f(this)}componentDidLoad(){l(this)}effectiveLocaleChange(){u(this,this.effectiveLocale)}async setFocus(){await r(this);const{backButtonEl:t,containerEl:a}=this;t?t.setFocus():a?.setFocus()}async scrollContentTo(t){await(this.containerEl?.scrollContentTo(t))}renderBackButton(){const{el:t}=this,a="rtl"===o(t),{showBackButton:e,backButtonClick:s,messages:n}=this,c=n.back;return e?i("calcite-action",{"aria-label":c,class:"back-button",icon:a?"chevron-right":"chevron-left",key:"flow-back-button",onClick:s,scale:"s",slot:"header-actions-start",text:c,ref:this.setBackRef}):null}render(){const{closable:t,closed:a,description:s,disabled:o,heading:n,headingLevel:c,loading:l,menuOpen:r,messages:d,backButtonEl:h}=this,m=d.back;return i(e,null,i("calcite-panel",{closable:t,closed:a,description:s,disabled:o,heading:n,headingLevel:c,loading:l,menuOpen:r,messageOverrides:d,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,ref:this.setContainerRef},this.renderBackButton(),i("slot",{name:"header-actions-start",slot:b.headerActionsStart}),i("slot",{name:"header-actions-end",slot:b.headerActionsEnd}),i("slot",{name:"header-content",slot:b.headerContent}),i("slot",{name:"header-menu-actions",slot:b.headerMenuActions}),i("slot",{name:"fab",slot:b.fab}),i("slot",{name:"footer-actions",slot:b.footerActions}),i("slot",{name:"footer",slot:b.footer}),i("slot",null)),h?i("calcite-tooltip",{label:m,overlayPositioning:"fixed",placement:"top",referenceElement:h},m):null)}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}";export{g as calcite_flow_item}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as i,h as e,a,H as n}from"./p-57e653ea.js";import{t as s,d as c,b as o}from"./p-11beded1.js";import{u as l}from"./p-b7cc02fa.js";import{c as r}from"./p-2fa9c44a.js";import{s as d,a as h,c as m}from"./p-f8e1c231.js";import{d as p}from"./p-289f6317.js";import{c as u,d as f}from"./p-94f16774.js";import{u as b,c as g,s as v,d as y}from"./p-64a44a39.js";import"./p-3255b488.js";import"./p-5b24b90a.js";import"./p-94aa5071.js";const w="open-container",x="calcite-list-item";function k(t){const i=t.target.assignedElements({flatten:!0});return[...i.filter((t=>t?.matches("calcite-list-item-group"))).map((t=>Array.from(t.querySelectorAll(x)))).reduce(((t,i)=>[...t,...i]),[]),...i.filter((t=>t?.matches(x)))]}function C(t){t.forEach((i=>{i.setPosition=t.indexOf(i)+1,i.setSize=t.length}))}function _(t,i=!1){return document.evaluate(i?"ancestor::calcite-list-item | ancestor::calcite-list-item-group":"ancestor::calcite-list-item",t,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const D="calcite-list-item",E=class{constructor(e){t(this,e),this.calciteListFilter=i(this,"calciteListFilter",6),this.listItems=[],this.enabledListItems=[],this.mutationObserver=r("mutation",(()=>this.updateListItems())),this.handleDefaultSlotChange=t=>{C(k(t))},this.setActiveListItem=()=>{const{enabledListItems:t}=this;t.some((t=>t.active))||t[0]&&(t[0].active=!0)},this.updateSelectedItems=p((()=>{this.selectedItems=this.enabledListItems.filter((t=>t.selected))}),100),this.updateFilteredItems=p((()=>{const{listItems:t,filteredData:i,filterText:e}=this,a=i.map((t=>t.value)),n=new Set,s=t?.filter((t=>{const i=t.parentElement;i.matches("calcite-list-item-group")&&n.add(i);const s=!e||a.includes(t.value);return t.hidden=!s,s}))||[];this.filteredItems=s,n.forEach((t=>{const i=s.some((i=>t.contains(i)));if(t.hidden=!i,!i)return;const e=t.closest("calcite-list-item");e&&(e.hidden=!1,s.includes(e)&&Array.from(t.querySelectorAll("calcite-list-item")).forEach((t=>t.hidden=!1)))})),n.clear()})),this.handleFilter=t=>{t.stopPropagation();const{filteredItems:i,value:e}=t.currentTarget;this.filteredData=i,this.filterText=e,this.updateFilteredItems(),this.calciteListFilter.emit()},this.getItemData=()=>this.listItems.map((t=>({label:t.label,description:t.description,metadata:t.metadata,value:t.value}))),this.queryListItems=()=>Array.from(this.el.querySelectorAll(D)),this.focusRow=t=>{const{enabledListItems:i}=this;t&&(i.forEach((i=>i.active=i===t)),t.setFocus())},this.isNavigable=t=>{const i=t.parentElement?.closest(D);return!i||i.open&&this.isNavigable(i)},this.handleListKeydown=t=>{const{key:i}=t,e=this.enabledListItems.filter((t=>this.isNavigable(t))),a=e.findIndex((t=>t.active));if("ArrowDown"===i){t.preventDefault();const i=a+1;e[i]&&this.focusRow(e[i])}else if("ArrowUp"===i){t.preventDefault();const i=a-1;e[i]&&this.focusRow(e[i])}else if("Home"===i){t.preventDefault();const i=e[0];i&&this.focusRow(i)}else if("End"===i){t.preventDefault();const i=e[e.length-1];i&&this.focusRow(i)}},this.disabled=!1,this.filterEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterPlaceholder=void 0,this.filterText=void 0,this.label=void 0,this.loading=!1,this.openable=!1,this.selectedItems=[],this.selectionMode="none",this.selectionAppearance="icon",this.dataForFilter=[]}handleFilterEnabledChange(){this.updateListItems()}handleSelectionAppearanceChange(){this.updateListItems()}handleCalciteInternalFocusPreviousItem(t){t.stopPropagation();const{enabledListItems:i}=this,e=i.findIndex((t=>t.active))-1;i[e]&&this.focusRow(i[e])}handleCalciteListItemActive(t){const i=t.target,{listItems:e}=this;e.forEach((t=>{t.active=t===i}))}handleCalciteListItemSelect(t){const i=t.target,{listItems:e,selectionMode:a}=this;e.forEach((t=>{"single"!==a&&"single-persist"!==a||(t.selected=t===i)})),this.updateSelectedItems()}handleCalciteListItemClose(){this.updateListItems()}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateListItems()}disconnectedCallback(){this.mutationObserver?.disconnect()}componentWillLoad(){d(this)}componentDidRender(){l(this)}componentDidLoad(){h(this);const{filterEl:t}=this,i=t?.filteredItems;i&&(this.filteredData=i),this.updateFilteredItems()}async setFocus(){await m(this),this.enabledListItems.find((t=>t.active))?.setFocus()}render(){const{loading:t,label:i,disabled:a,dataForFilter:n,filterEnabled:c,filterPlaceholder:o,filterText:l}=this;return e("div",{class:"container"},t?e("calcite-scrim",{class:"scrim",loading:t}):null,e("table",{"aria-busy":s(t),"aria-label":i||"",class:"table",onKeyDown:this.handleListKeydown,role:"treegrid"},c?e("thead",null,e("tr",{class:{"sticky-pos":!0}},e("th",{colSpan:5},e("calcite-filter",{"aria-label":o,disabled:t||a,items:n,onCalciteFilterChange:this.handleFilter,placeholder:o,value:l,ref:t=>this.filterEl=t})))):null,e("tbody",{class:"table-container"},e("slot",{onSlotchange:this.handleDefaultSlotChange}))))}updateListItems(){const{selectionAppearance:t,selectionMode:i}=this,e=this.queryListItems();e.forEach((e=>{e.selectionAppearance=t,e.selectionMode=i})),this.listItems=e,this.enabledListItems=e.filter((t=>!t.disabled&&!t.closed)),this.filterEnabled&&(this.dataForFilter=this.getItemData()),this.setActiveListItem(),this.updateSelectedItems(),this.updateFilteredItems()}get el(){return a(this)}static get watchers(){return{filterEnabled:["handleFilterEnabledChange"],selectionMode:["handleSelectionAppearanceChange"],selectionAppearance:["handleSelectionAppearanceChange"]}}};E.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{position:relative}.table-container{position:relative;z-index:1;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.sticky-pos{position:sticky;inset-block-start:0px;z-index:300}calcite-filter{margin-block-end:1px}";const S=new Map,L=class{constructor(e){t(this,e),this.calciteListItemSelect=i(this,"calciteListItemSelect",6),this.calciteListItemClose=i(this,"calciteListItemClose",6),this.calciteInternalListItemSelect=i(this,"calciteInternalListItemSelect",6),this.calciteInternalListItemActive=i(this,"calciteInternalListItemActive",6),this.calciteInternalFocusPreviousItem=i(this,"calciteInternalFocusPreviousItem",6),this.closeClickHandler=()=>{this.closed=!0,this.calciteListItemClose.emit()},this.handleContentSlotChange=t=>{this.hasCustomContent=c(t)},this.handleActionsStartSlotChange=t=>{this.hasActionsStart=c(t)},this.handleActionsEndSlotChange=t=>{this.hasActionsEnd=c(t)},this.handleContentStartSlotChange=t=>{this.hasContentStart=c(t)},this.handleContentEndSlotChange=t=>{this.hasContentEnd=c(t)},this.handleDefaultSlotChange=t=>{const{parentListEl:i}=this,e=k(t);C(e);const a=!!e.length;a&&i&&!i.openable&&(i.openable=!0),this.openable=a,a||(this.open=!1)},this.toggleOpen=()=>{this.open=!this.open},this.itemClicked=()=>{this.toggleSelected(),this.calciteInternalListItemActive.emit()},this.toggleSelected=()=>{this.disabled||("multiple"===this.selectionMode||"single"===this.selectionMode?this.selected=!this.selected:"single-persist"===this.selectionMode&&(this.selected=!0),this.calciteListItemSelect.emit())},this.handleItemKeyDown=t=>{const{key:i}=t,e=t.composedPath(),{containerEl:a,contentEl:n,actionsStartEl:s,actionsEndEl:c,open:o,openable:l}=this,r=[s,n,c].filter(Boolean),d=r.findIndex((t=>e.includes(t)));if(" "===i)t.preventDefault(),this.toggleSelected();else if("ArrowRight"===i){t.preventDefault();const i=d+1;-1===d?!o&&l?(this.open=!0,this.focusCell(null)):r[0]&&this.focusCell(r[0]):r[d]&&r[i]&&this.focusCell(r[i])}else if("ArrowLeft"===i){t.preventDefault();const i=d-1;-1===d?(this.focusCell(null),o&&l?this.open=!1:this.calciteInternalFocusPreviousItem.emit()):0===d?(this.focusCell(null),a.focus()):r[d]&&r[i]&&this.focusCell(r[i])}},this.focusCellNull=()=>{this.focusCell(null)},this.focusCell=(t,i=!0)=>{const{contentEl:e,actionsStartEl:a,actionsEndEl:n,parentListEl:s}=this;i&&S.set(s,null),[a,e,n].filter(Boolean).forEach(((e,a)=>{const n="tabindex";e===t?(e.setAttribute(n,"0"),i&&S.set(s,a)):e.removeAttribute(n)})),t?.focus()},this.active=!1,this.closable=!1,this.closed=!1,this.description=void 0,this.disabled=!1,this.label=void 0,this.metadata=void 0,this.open=!1,this.setSize=null,this.setPosition=null,this.selected=!1,this.value=void 0,this.selectionMode=null,this.selectionAppearance=null,this.messageOverrides=void 0,this.messages=void 0,this.effectiveLocale="",this.defaultMessages=void 0,this.level=null,this.visualLevel=null,this.parentListEl=void 0,this.openable=!1,this.hasActionsStart=!1,this.hasActionsEnd=!1,this.hasCustomContent=!1,this.hasContentStart=!1,this.hasContentEnd=!1}activeHandler(t){t||this.focusCell(null,!1)}handleSelectedChange(t){t&&this.calciteInternalListItemSelect.emit()}onMessagesChange(){}effectiveLocaleChange(){b(this,this.effectiveLocale)}connectedCallback(){u(this),g(this);const{el:t}=this;this.parentListEl=t.closest("calcite-list"),this.level=_(t)+1,this.visualLevel=_(t,!0),this.setSelectionDefaults()}async componentWillLoad(){d(this),await v(this)}componentDidLoad(){h(this)}componentDidRender(){l(this,"managed")}disconnectedCallback(){f(this),y(this)}async setFocus(){await m(this);const{containerEl:t,contentEl:i,actionsStartEl:e,actionsEndEl:a,parentListEl:n}=this,s=S.get(n);if("number"!=typeof s)t?.focus();else{const n=[e,i,a].filter(Boolean);n[s]?this.focusCell(n[s]):t?.focus()}}renderSelected(){const{selected:t,selectionMode:i,selectionAppearance:a}=this;return"none"===i||"border"===a?null:e("td",{class:"selection-container",key:"selection-container",onClick:this.itemClicked},e("calcite-icon",{icon:t?"multiple"===i?"check-circle-f":"circle-f":"blank",scale:"s"}))}renderOpen(){const{el:t,open:i,openable:a,parentListEl:n}=this,s=o(t);return a?e("td",{class:w,key:"open-container",onClick:this.toggleOpen},e("calcite-icon",{icon:i?"caret-down":"rtl"===s?"caret-left":"caret-right",scale:"s"})):n?.openable?e("td",{class:w,key:"open-container",onClick:this.itemClicked},e("calcite-icon",{icon:"blank",scale:"s"})):null}renderActionsStart(){const{label:t,hasActionsStart:i}=this;return e("td",{"aria-label":t,class:"actions-start",hidden:!i,key:"actions-start-container",role:"gridcell",ref:t=>this.actionsStartEl=t},e("slot",{name:"actions-start",onSlotchange:this.handleActionsStartSlotChange}))}renderActionsEnd(){const{label:t,hasActionsEnd:i,closable:a,messages:n}=this;return e("td",{"aria-label":t,class:"actions-end",hidden:!(i||a),key:"actions-end-container",role:"gridcell",ref:t=>this.actionsEndEl=t},e("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}),a?e("calcite-action",{appearance:"transparent",icon:"x",key:"close-action",label:n.close,onClick:this.closeClickHandler,text:n.close}):null)}renderContentStart(){const{hasContentStart:t}=this;return e("div",{class:"content-start",hidden:!t},e("slot",{name:"content-start",onSlotchange:this.handleContentStartSlotChange}))}renderCustomContent(){const{hasCustomContent:t}=this;return e("div",{class:"custom-content",hidden:!t},e("slot",{name:"content",onSlotchange:this.handleContentSlotChange}))}renderContentEnd(){const{hasContentEnd:t}=this;return e("div",{class:"content-end",hidden:!t},e("slot",{name:"content-end",onSlotchange:this.handleContentEndSlotChange}))}renderContentProperties(){const{label:t,description:i,hasCustomContent:a}=this;return a||!t&&!i?null:e("div",{class:"content",key:"content"},t?e("div",{class:"label",key:"label"},t):null,i?e("div",{class:"description",key:"description"},i):null)}renderContentContainer(){const{description:t,label:i,selectionMode:a,hasCustomContent:n}=this,s=n||!!i||!!t,c=[this.renderContentStart(),this.renderCustomContent(),this.renderContentProperties(),this.renderContentEnd()];return e("td",{"aria-label":i,class:{"content-container":!0,"content-container--selectable":"none"!==a,"content-container--has-center-content":s},key:"content-container",onClick:this.itemClicked,role:"gridcell",ref:t=>this.contentEl=t},c)}render(){const{openable:t,open:i,level:a,setPosition:c,setSize:o,active:l,label:r,selected:d,selectionAppearance:h,selectionMode:m,closed:p}=this,u="none"!==m&&"border"===h,f=u&&d,b=u&&!d;return e(n,null,e("tr",{"aria-expanded":t?s(i):null,"aria-label":r,"aria-level":a,"aria-posinset":c,"aria-selected":s(d),"aria-setsize":o,class:{container:!0,"container--border-selected":f,"container--border-unselected":b},hidden:p,onFocus:this.focusCellNull,onKeyDown:this.handleItemKeyDown,role:"row",style:{"--calcite-list-item-spacing-indent-multiplier":`${this.visualLevel}`},tabIndex:l?0:-1,ref:t=>this.containerEl=t},this.renderSelected(),this.renderOpen(),this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),e("div",{class:{"nested-container":!0,"nested-container--hidden":t&&!i}},e("slot",{onSlotchange:this.handleDefaultSlotChange})))}setSelectionDefaults(){const{parentListEl:t,selectionMode:i,selectionAppearance:e}=this;t&&(i||(this.selectionMode=t.selectionMode),e||(this.selectionAppearance=t.selectionAppearance))}static get assetsDirs(){return["assets"]}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],selected:["handleSelectedChange"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};L.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;--calcite-list-item-icon-color:var(--calcite-ui-brand);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-1);font-family:var(--calcite-sans-family);padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}.container *{box-sizing:border-box}.container:hover{cursor:pointer;background-color:var(--calcite-ui-foreground-2)}.container--border-selected{border-inline-start:4px solid var(--calcite-ui-brand)}.container--border-unselected{border-inline-start:4px solid transparent}.nested-container{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}.nested-container--hidden{display:none}.content-container{display:flex;flex:1 1 auto;align-items:stretch;padding:0px;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}tr,td{outline-color:transparent}tr:focus,td:focus{z-index:300;outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand))}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}.label,.description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}.label:only-child,.description:only-child{margin:0px;padding-block:0.25rem}.label{color:var(--calcite-ui-text-1)}.description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.selection-container{display:flex;padding-inline:0.75rem;color:var(--calcite-list-item-icon-color)}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.open-container{display:flex;align-items:center}.open-container,.selection-container{cursor:pointer}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch;color:inherit}::slotted(calcite-list-item){border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}[hidden]{display:none}";const I=class{constructor(i){t(this,i),this.disabled=!1,this.heading=void 0,this.visualLevel=null}connectedCallback(){const{el:t}=this;this.visualLevel=_(t,!0)}componentDidRender(){l(this)}render(){const{heading:t,visualLevel:i}=this;return e(n,null,e("tr",{class:"container",style:{"--calcite-list-item-spacing-indent-multiplier":`${i}`}},e("td",{class:"heading",colSpan:5},t)),e("slot",null))}get el(){return a(this)}};I.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{margin:0px;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-2);padding:0.75rem;font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}.heading{padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";export{E as calcite_list,L as calcite_list_item,I as calcite_list_item_group}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as e,h as i,H as n,a as o}from"./p-57e653ea.js";import{f as a,w as c,x as s,g as r,d as l,b as d,t as h,y as m}from"./p-11beded1.js";import{c as u,d as f}from"./p-d2900eba.js";import{u as p}from"./p-b7cc02fa.js";import{o as b}from"./p-1d426b87.js";import{C as v}from"./p-5b24b90a.js";import"./p-3255b488.js";import"./p-2fa9c44a.js";function k(t,e){const i="down"===e?"nextElementSibling":"previousElementSibling";let n=t,o=null;for(;n?.matches("calcite-tree-item");){if(!n.disabled){o=n;break}n=n[i]}return o}const g=class{constructor(i){t(this,i),this.calciteTreeSelect=e(this,"calciteTreeSelect",6),this.lines=!1,this.child=void 0,this.scale="m",this.selectionMode="single",this.selectedItems=[]}componentWillRender(){const t=this.el.parentElement?.closest("calcite-tree");this.lines=t?t.lines:this.lines,this.scale=t?t.scale:this.scale,this.selectionMode=t?t.selectionMode:this.selectionMode,this.child=!!t}render(){return i(n,{"aria-multiselectable":this.child?void 0:("multiple"===this.selectionMode||"multichildren"===this.selectionMode).toString(),role:this.child?void 0:"tree",tabIndex:this.getRootTabIndex()},i("slot",null))}onFocus(){if(!this.child){const t=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");a(t)}}onFocusIn(t){(t.relatedTarget===this.el||!this.el.contains(t.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(t){!this.el.contains(t.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onClick(t){const e=t.target,i=c(e.querySelectorAll("calcite-tree-item"));if(this.child)return;if(this.child||(t.preventDefault(),t.stopPropagation()),"ancestors"===this.selectionMode&&!this.child)return void this.updateAncestorTree(t);const n="none"===this.selectionMode,o=!n&&t.detail.modifyCurrentSelection&&("multiple"===this.selectionMode||"multichildren"===this.selectionMode),a="multichildren"===this.selectionMode||"children"===this.selectionMode,s=!o&&(("single"===this.selectionMode||"multiple"===this.selectionMode)&&i.length<=0||"children"===this.selectionMode||"multichildren"===this.selectionMode),r="children"===this.selectionMode||"multichildren"===this.selectionMode;if(!this.child){const l=[];null!==this.selectionMode&&(!e.hasChildren||e.hasChildren&&("children"===this.selectionMode||"multichildren"===this.selectionMode))&&l.push(e),a&&i.forEach((t=>{l.push(t)})),s&&c(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach((t=>{l.includes(t)||(t.selected=!1)})),r&&!t.detail.forceToggle&&(e.expanded=!0),o&&window.getSelection().removeAllRanges(),o&&e.selected||a&&t.detail.forceToggle?l.forEach((t=>{t.disabled||(t.selected=!1)})):n||l.forEach((t=>{t.disabled||(t.selected=!0)}))}this.selectedItems=n?[e]:c(this.el.querySelectorAll("calcite-tree-item")).filter((t=>t.selected)),this.calciteTreeSelect.emit(),t.stopPropagation()}keyDownHandler(t){const e=this.el.closest("calcite-tree:not([child])"),i=t.target;if(e===this.el&&"CALCITE-TREE-ITEM"===i.tagName&&this.el.contains(i))if("ArrowDown"!==t.key){if("ArrowUp"===t.key){const e=k(i.previousElementSibling,"up");e&&(e.focus(),t.preventDefault())}if("ArrowLeft"===t.key&&!i.disabled){if(i.hasChildren&&i.expanded)return i.expanded=!1,void t.preventDefault();const e=i.parentElement.closest("calcite-tree-item");return!e||i.hasChildren&&!1!==i.expanded?void 0:(e.focus(),void t.preventDefault())}"ArrowRight"!==t.key||i.disabled||i.hasChildren&&(i.expanded&&s(this.el).activeElement===i?(k(i.querySelector("calcite-tree-item"),"down")?.focus(),t.preventDefault()):(i.expanded=!0,t.preventDefault()))}else{const e=k(i.nextElementSibling,"down");e&&(e.focus(),t.preventDefault())}}updateAncestorTree(t){const e=t.target;if(e.disabled)return;const i=[];let n=e.parentElement.closest("calcite-tree-item");for(;n;)i.push(n),n=n.parentElement.closest("calcite-tree-item");const o=Array.from(e.querySelectorAll("calcite-tree-item:not([disabled])")),a=o.filter((t=>!t.hasChildren)),s=o.filter((t=>t.hasChildren)),r=e.hasChildren?!(e.selected||e.indeterminate):!e.selected;function l(t,e){const i=t.filter((t=>t.selected)),n=t.filter((t=>!t.selected));e.selected=i.length===t.length,e.indeterminate=i.length>0&&n.length>0}a.forEach((t=>{t.selected=r,t.indeterminate=!1})),s.forEach((t=>{l(Array.from(t.querySelectorAll(":scope > calcite-tree > calcite-tree-item")),t)})),e.hasChildren?l(o,e):(e.selected=r,e.indeterminate=!1),i.forEach((t=>{const e=c(t.querySelectorAll("calcite-tree-item")),i=e.filter((t=>t.selected));if(0===i.length)return t.selected=!1,void(t.indeterminate=!1);const n=i.length<e.length;t.indeterminate=n,t.selected=!n})),this.selectedItems=c(this.el.querySelectorAll("calcite-tree-item")).filter((t=>t.selected)),this.calciteTreeSelect.emit()}getRootTabIndex(){return this.child?-1:0}get el(){return o(this)}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}";const x="children",y="bullet-point",w="check",z=class{constructor(i){t(this,i),this.calciteInternalTreeItemSelect=e(this,"calciteInternalTreeItemSelect",6),this.openTransitionProp="opacity",this.transitionProp="expanded",this.iconClickHandler=t=>{t.stopPropagation(),this.expanded=!this.expanded},this.childrenClickHandler=t=>t.stopPropagation(),this.updateParentIsExpanded=(t,e)=>{r(t,x,{all:!0,selector:"calcite-tree-item"}).forEach((t=>t.parentExpanded=e))},this.actionsEndSlotChangeHandler=t=>{this.hasEndActions=l(t)},this.disabled=!1,this.expanded=!1,this.iconFlipRtl=void 0,this.iconStart=void 0,this.selected=!1,this.parentExpanded=!1,this.depth=-1,this.hasChildren=null,this.lines=void 0,this.scale=void 0,this.indeterminate=!1,this.selectionMode=void 0,this.updateAfterInitialRender=!1,this.hasEndActions=!1}expandedHandler(t){this.updateParentIsExpanded(this.el,t),b(this,!0)}getselectionMode(){this.isSelectionMultiLike="multiple"===this.selectionMode||"multichildren"===this.selectionMode}onBeforeOpen(){this.transitionEl.style.transform="scaleY(1)"}onOpen(){this.transitionEl.style.transform="none"}onBeforeClose(){}onClose(){this.transitionEl.style.transform="scaleY(0)"}connectedCallback(){if(this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item"),this.parentTreeItem){const{expanded:t}=this.parentTreeItem;this.updateParentIsExpanded(this.parentTreeItem,t)}u(this)}disconnectedCallback(){f(this)}componentWillRender(){this.hasChildren=!!this.el.querySelector("calcite-tree"),this.depth=0;let t,e=this.el.closest("calcite-tree");if(e)for(this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;e&&(t=e.parentElement?.closest("calcite-tree"),t!==e);)e=t,this.depth=this.depth+1}componentWillLoad(){this.expanded&&b(this,!0),requestAnimationFrame((()=>this.updateAfterInitialRender=!0))}componentDidLoad(){this.updateAncestorTree()}componentDidRender(){p(this,(()=>this.parentExpanded||1===this.depth))}render(){const t="rtl"===d(this.el),e="single"===this.selectionMode||"children"===this.selectionMode,o="multiple"===this.selectionMode||"multichildren"===this.selectionMode,a="none"===this.selectionMode&&!this.hasChildren,c=this.hasChildren?i("calcite-icon",{class:{chevron:!0,[v.rtl]:t},"data-test-id":"icon",icon:"chevron-right",onClick:this.iconClickHandler,scale:"l"===this.scale?"m":"s"}):null,s=i("slot",{key:"default-slot"}),r="ancestors"===this.selectionMode?i("label",{class:"checkbox-label",key:"checkbox-label"},i("calcite-checkbox",{checked:this.selected,class:"checkbox","data-test-id":"checkbox",indeterminate:this.hasChildren&&this.indeterminate,scale:this.scale,tabIndex:-1}),s):null,l=e?y:o?w:a?"blank":null,m=l?i("calcite-icon",{class:{"bullet-point":l===y,checkmark:l===w,[v.rtl]:t},icon:l,scale:"l"===this.scale?"m":"s"}):null,u=!(this.parentExpanded||1===this.depth),f=this.updateAfterInitialRender&&this.expanded,{hasEndActions:p}=this,b=i("slot",{key:"actionsEndSlot",name:"actions-end",onSlotchange:this.actionsEndSlotChangeHandler}),k=i("calcite-icon",{class:"icon-start",flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"});return i(n,{"aria-expanded":this.hasChildren?h(f):void 0,"aria-hidden":h(u),"aria-selected":this.selected?"true":o?"false":void 0,"calcite-hydrated-hidden":u,role:"treeitem"},i("div",{class:{"item--expanded":f}},i("div",{class:"node-actions-container"},i("div",{class:{"node-container":!0,[v.rtl]:t},"data-selection-mode":this.selectionMode,ref:t=>this.defaultSlotWrapper=t},c,m,this.iconStart?k:null,r||s),i("div",{class:"actions-end",hidden:!p},b)),i("div",{class:{"children-container":!0,[v.rtl]:t},"data-test-id":"calcite-tree-children",onClick:this.childrenClickHandler,role:this.hasChildren?"group":void 0,ref:t=>this.setTransitionEl(t)},i("slot",{name:x}))))}setTransitionEl(t){this.transitionEl=t}onClick(t){if(this.disabled)return;const[e]=m(this.el,"a");e&&"a"!==t.composedPath()[0].tagName.toLowerCase()&&window.open(e.href,""===e.target?"_self":e.target),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:"ancestors"===this.selectionMode||this.isSelectionMultiLike,forceToggle:!1})}keyDownHandler(t){let e;switch(t.key){case" ":if("none"===this.selectionMode)return;this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,forceToggle:!1}),t.preventDefault();break;case"Enter":if("none"===this.selectionMode)return;const i=c(this.el.children).find((t=>t.matches("a")));i?(i.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,forceToggle:!1}),t.preventDefault();break;case"Home":e=this.el.closest("calcite-tree:not([child])"),e.querySelector("calcite-tree-item")?.focus();break;case"End":e=this.el.closest("calcite-tree:not([child])");let n=e.children[e.children.length-1],o=c(n.children).find((t=>t.matches("calcite-tree")));for(;o;)n=o.children[e.children.length-1],o=c(n.children).find((t=>t.matches("calcite-tree")));n?.focus()}}updateAncestorTree(){const t=this.parentTreeItem;if("ancestors"===this.selectionMode&&t)if(this.selected){const e=Array.from(this.el.parentElement?.children),i=e.filter((t=>t.selected));e.length===i.length?(t.selected=!0,t.indeterminate=!1):i.length>0&&(t.indeterminate=!0)}else this.indeterminate&&(this.parentTreeItem.indeterminate=!0)}get el(){return o(this)}static get watchers(){return{expanded:["expandedHandler"],selectionMode:["getselectionMode"]}}};z.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;max-inline-size:100%;cursor:pointer;color:var(--calcite-ui-text-3)}[hidden]{display:none}.node-actions-container{display:flex;justify-content:space-between}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .node-actions-container{min-block-size:1.5rem}:host([scale=s]) .node-actions-container .node-container .checkbox,:host([scale=s]) .node-actions-container .node-container .chevron,:host([scale=s]) .node-actions-container .node-container .checkmark,:host([scale=s]) .node-actions-container .node-container .bullet-point{margin-inline:0.25rem}:host([scale=s]) .node-actions-container .node-container .icon-start{margin-inline:0.75rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .node-actions-container{min-block-size:2rem}:host([scale=m]) .node-actions-container .node-container .checkbox,:host([scale=m]) .node-actions-container .node-container .chevron,:host([scale=m]) .node-actions-container .node-container .checkmark,:host([scale=m]) .node-actions-container .node-container .bullet-point{margin-inline:0.5rem}:host([scale=m]) .node-actions-container .node-container .icon-start{margin-inline:0.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .node-actions-container{min-block-size:2.75rem}:host([scale=l]) .node-actions-container .node-container .checkbox,:host([scale=l]) .node-actions-container .node-container .chevron,:host([scale=l]) .node-actions-container .node-container .checkmark,:host([scale=l]) .node-actions-container .node-container .bullet-point{margin-inline:0.75rem}:host([scale=l]) .node-actions-container .node-container .icon-start{margin-inline:0.75rem}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:1;inline-size:1px;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;block-size:96%;content:"";background-color:var(--calcite-ui-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none !important}::slotted(*):hover{text-decoration:none !important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline-color:transparent}:host:focus,:host:active{outline:2px solid transparent;outline-offset:2px;outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host(:focus:not([disabled])){outline:2px solid transparent;outline-offset:2px;outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n -2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}.actions-end{display:flex;flex-direction:row;align-items:center;align-self:stretch}.checkbox{line-height:0}.checkbox-label{pointer-events:none;display:flex;align-items:center}.checkbox:focus{outline:2px solid transparent;outline-offset:2px}.children-container{position:relative;block-size:0px;overflow:hidden;margin-inline-start:1.25rem;transform:scaleY(0);opacity:0;transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;transform-origin:top}.item--expanded>.children-container{overflow:visible;opacity:1;block-size:auto}.node-container{position:relative;display:flex;min-inline-size:0px;align-items:center}.node-container .checkmark,.node-container .bullet-point{opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;color:var(--calcite-ui-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus:not([disabled])) .node-container .checkmark,:host(:focus:not([disabled])) .node-container .bullet-point{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected]) .node-container .bullet-point,:host([selected]) .node-container .checkmark,:host([selected]) .node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark{opacity:1;color:var(--calcite-ui-brand)}:host([selection-mode=none]:not([has-children])):host([scale=s]) .node-container{padding-inline-start:0.5rem}:host([selection-mode=none]:not([has-children])):host([scale=m]) .node-container{padding-inline-start:1rem}:host([selection-mode=none]:not([has-children])):host([scale=l]) .node-container{padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=s]) .node-container[data-selection-mode=ancestors] .checkbox{padding-inline-start:1.25rem}:host(:not([has-children])):host([scale=m]) .node-container[data-selection-mode=ancestors] .checkbox{padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=l]) .node-container[data-selection-mode=ancestors] .checkbox{padding-inline-start:1.75rem}:host([has-children]) .node-container[data-selection-mode=ancestors] .checkbox{margin-inline-start:0}:host([has-children]) .node-container .bullet-point,:host([has-children]) .node-container .checkmark{display:none}:host([has-children][expanded]:not([selected]):not([selection-mode=none])) .node-container ::slotted(*){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([has-children][selected]) .node-container[data-selection-mode=children],:host([has-children][selected]) .node-container[data-selection-mode=multichildren]{color:var(--calcite-ui-brand)}.chevron{position:relative;align-self:center;color:var(--calcite-ui-text-3);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;flex:0 0 auto;transform:rotate(0deg)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-ui-brand)}';export{g as calcite_tree,z as calcite_tree_item}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{b as t}from"./p-11beded1.js";import{d as n}from"./p-289f6317.js";function e(t){return t.split("-")[1]}function o(t){return"y"===t?"height":"width"}function r(t){return t.split("-")[0]}function i(t){return["top","bottom"].includes(r(t))?"x":"y"}function a(t,n,a){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=o(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(r(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(e(n)){case"start":y[u]-=m*(a&&p?-1:1);break;case"end":y[u]+=m*(a&&p?-1:1)}return y}function l(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function s(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function c(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=l(y),h=c[p?"floating"===m?"reference":"floating":m],x=s(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(h)))||e?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},A=s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:f}):v);return{top:(x.top-A.top+g.top)/w.y,bottom:(A.bottom-x.bottom+g.bottom)/w.y,left:(x.left-A.left+g.left)/w.x,right:(A.right-x.right+g.right)/w.x}}const f=Math.min,u=Math.max;function d(t,n,e){return u(t,f(n,e))}const m=["top","right","bottom","left"],p=m.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),y={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t){return t.replace(/left|right|bottom|top/g,(t=>y[t]))}function h(t,n,r){void 0===r&&(r=!1);const a=e(t),l=i(t),s=o(l);let c="x"===l?a===(r?"end":"start")?"right":"left":"start"===a?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=g(c)),{main:c,cross:g(c)}}const x={start:"end",end:"start"};function v(t){return t.replace(/start|end/g,(t=>x[t]))}const b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var o;const{placement:i,middlewareData:a,rects:l,initialPlacement:s,platform:f,elements:u}=n,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...w}=t,A=r(i),P=r(s)===s,k=await(null==f.isRTL?void 0:f.isRTL(u.floating)),D=p||(P||!b?[g(s)]:function(t){const n=g(t);return[v(t),n,v(n)]}(s));p||"none"===x||D.push(...function(t,n,o,i){const a=e(t);let l=function(t,n,e){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?r:o:n?o:r;case"left":case"right":return n?i:a;default:return[]}}(r(t),"start"===o,i);return a&&(l=l.map((t=>t+"-"+a)),n&&(l=l.concat(l.map(v)))),l}(s,b,x,k));const R=[s,...D],F=await c(n,w),M=[];let E=(null==(o=a.flip)?void 0:o.overflows)||[];if(d&&M.push(F[A]),m){const{main:t,cross:n}=h(i,l,k);M.push(F[t],F[n])}if(E=[...E,{placement:i,overflows:M}],!M.every((t=>t<=0))){var S,C;const t=((null==(S=a.flip)?void 0:S.index)||0)+1,n=R[t];if(n)return{data:{index:t,overflows:E},reset:{placement:n}};let e=null==(C=E.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:C.placement;if(!e)switch(y){case"bestFit":{var O;const t=null==(O=E.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:O[0];t&&(e=t);break}case"initialPlacement":e=s}if(i!==e)return{reset:{placement:e}}}return{}}}};function w(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function A(t){return m.some((n=>t[n]>=0))}const P=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=w(await c(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:A(t)}}}case"escaped":{const t=w(await c(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:A(t)}}}default:return{}}}}};function k(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return k(t).getComputedStyle(t)}const R=Math.min,F=Math.max,M=Math.round;function E(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=M(e)!==r||M(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function S(t){return j(t)?(t.nodeName||"").toLowerCase():""}let C;function O(){if(C)return C;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(C=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),C):navigator.userAgent}function T(t){return t instanceof k(t).HTMLElement}function $(t){return t instanceof k(t).Element}function j(t){return t instanceof k(t).Node}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof k(t).ShadowRoot||t instanceof ShadowRoot)}function B(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function L(t){return["table","td","th"].includes(S(t))}function H(t){const n=/firefox/i.test(O()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function N(){return/^((?!chrome|android).)*safari/i.test(O())}function I(t){return["html","body","#document"].includes(S(t))}function W(t){return $(t)?t:t.contextElement}const q={x:1,y:1};function G(t){const n=W(t);if(!T(n))return q;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=E(n);let a=(i?M(e.width):e.width)/o,l=(i?M(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function U(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=W(t);let s=q;n&&(o?$(o)&&(s=G(o)):s=G(t));const c=l?k(l):window,f=N()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=k(l),n=o&&$(o)?k(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=G(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=k(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function V(t){return((j(t)?t.ownerDocument:t.document)||window.document).documentElement}function X(t){return $(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){return U(V(t)).left+X(t).scrollLeft}function _(t){if("html"===S(t))return t;const n=t.assignedSlot||t.parentNode||z(t)&&t.host||V(t);return z(n)?n.host:n}function J(t){const n=_(t);return I(n)?n.ownerDocument.body:T(n)&&B(n)?n:J(n)}function K(t,n){var e;void 0===n&&(n=[]);const o=J(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=k(o);return r?n.concat(i,i.visualViewport||[],B(o)?o:[]):n.concat(o,K(o))}function Q(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=k(t),o=V(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=N();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e);else if("document"===n)o=function(t){const n=V(t),e=X(t),o=t.ownerDocument.body,r=F(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=F(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-e.scrollLeft+Y(t);const l=-e.scrollTop;return"rtl"===D(o).direction&&(a+=F(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(V(t));else if($(n))o=function(t,n){const e=U(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=T(t)?G(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e={...n};if(N()){var r,i;const n=k(t);e.x-=(null==(r=n.visualViewport)?void 0:r.offsetLeft)||0,e.y-=(null==(i=n.visualViewport)?void 0:i.offsetTop)||0}o=e}return s(o)}function Z(t,n){return T(t)&&"fixed"!==D(t).position?n?n(t):t.offsetParent:null}function tt(t,n){const e=k(t);let o=Z(t,n);for(;o&&L(o)&&"static"===D(o).position;)o=Z(o,n);return o&&("html"===S(o)||"body"===S(o)&&"static"===D(o).position&&!H(o))?e:o||function(t){let n=_(t);for(;T(n)&&!I(n);){if(H(n))return n;n=_(n)}return null}(t)||e}function nt(t,n,e){const o=T(n),r=V(n),i=U(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==S(n)||B(r))&&(a=X(n)),T(n)){const t=U(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=Y(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const et={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=K(t).filter((t=>$(t)&&"body"!==S(t))),r=null;const i="fixed"===D(t).position;let a=i?_(t):t;for(;$(a)&&!I(a);){const t=D(a),n=H(a);"fixed"===t.position?r=null:(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=_(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Q(n,e,r);return t.top=F(o.top,t.top),t.right=R(o.right,t.right),t.bottom=R(o.bottom,t.bottom),t.left=F(o.left,t.left),t}),Q(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=T(e),i=V(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==S(e)||B(i))&&(a=X(e)),T(e))){const t=U(e);l=G(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:$,getDimensions:function(t){return T(t)?E(t):t.getBoundingClientRect()},getOffsetParent:tt,getDocumentElement:V,getScale:G,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||tt,i=this.getDimensions;return{reference:nt(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const ot={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},rt=async function(){function t(){return navigator.userAgentData}if(ot.floatingUINonChromiumPositioningFix&&(/firefox|safari/i.test(function(){const n=t();return n?.brands?n.brands.map((({brand:t,version:n})=>`${t}/${n}`)).join(" "):navigator.userAgent}())||function(){const n=t();return n?.brands?!!n.brands.find((({brand:t,version:n})=>("Google Chrome"===t||"Chromium"===t)&&Number(n)>=109)):!!navigator.userAgent.split(" ").find((t=>{const[n,e]=t.split("/");return"Chrome"===n&&parseInt(e)>=109}))}())){const{offsetParent:t}=await import("./p-b66a142d.js"),n=et.getOffsetParent;et.getOffsetParent=e=>n(e,t)}}(),it=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],at="bottom-start",lt={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function st({placement:t,flipDisabled:n,flipPlacements:a,offsetDistance:s,offsetSkidding:f,arrowEl:u,type:m}){const y=[(void 0===g&&(g={}),{name:"shift",options:g,async fn(t){const{x:n,y:e,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...f}=g,u={x:n,y:e},m=await c(t,f),p=i(r(o)),y="x"===p?"y":"x";let h=u[p],x=u[y];a&&(h=d(h+m["y"===p?"top":"left"],h,h-m["y"===p?"bottom":"right"])),l&&(x=d(x+m["y"===y?"top":"left"],x,x-m["y"===y?"bottom":"right"]));const v=s.fn({...t,[p]:h,[y]:x});return{...v,data:{x:v.x-n,y:v.y-e}}}}),P()];var g,x;if("menu"===m)return[...y,b({fallbackPlacements:a||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===m||"tooltip"===m){const m=[...y,(x={mainAxis:"number"==typeof s?s:0,crossAxis:"number"==typeof f?f:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:o}=t,a=await async function(t,n){const{placement:o,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=r(o),f=e(o),u="x"===i(o),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:h}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof h&&(g="end"===f?-1*h:h),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:o+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?m.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var o,i,a;const{rects:l,middlewareData:s,placement:f,platform:u,elements:d}=n,{crossAxis:m=!1,alignment:y,allowedPlacements:g=p,autoAlignment:x=!0,...b}=t,w=void 0!==y||g===p?function(t,n,o){return(t?[...o.filter((n=>e(n)===t)),...o.filter((n=>e(n)!==t))]:o.filter((t=>r(t)===t))).filter((o=>!t||e(o)===t||!!n&&v(o)!==o))}(y||null,x,g):g,A=await c(n,b),P=(null==(o=s.autoPlacement)?void 0:o.index)||0,k=w[P];if(null==k)return{};const{main:D,cross:R}=h(k,l,await(null==u.isRTL?void 0:u.isRTL(d.floating)));if(f!==k)return{reset:{placement:w[0]}};const F=[A[r(k)],A[D],A[R]],M=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:k,overflows:F}],E=w[P+1];if(E)return{data:{index:P+1,overflows:M},reset:{placement:E}};const S=M.map((t=>{const n=e(t.placement);return[t.placement,n&&m?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),C=(null==(a=S.filter((t=>t[2].slice(0,e(t[0])?2:3).every((t=>t<=0))))[0])?void 0:a[0])||S[0][0];return C!==f?{data:{index:P+1,overflows:M},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||m.push(b(a?{fallbackPlacements:a}:{})),u&&m.push((t=>({name:"arrow",options:t,async fn(n){const{element:r,padding:a=0}=t||{},{x:s,y:c,placement:f,rects:u,platform:m}=n;if(null==r)return{};const p=l(a),y={x:s,y:c},g=i(f),h=o(g),x=await m.getDimensions(r),v="y"===g?"top":"left",b="y"===g?"bottom":"right",w=u.reference[h]+u.reference[g]-y[g]-u.floating[h],A=y[g]-u.reference[g],P=await(null==m.getOffsetParent?void 0:m.getOffsetParent(r));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[h]);const D=p[v],R=k-x[h]-p[b],F=k/2-x[h]/2+(w/2-A/2),M=d(D,F,R),E=null!=e(f)&&F!=M&&u.reference[h]/2-(F<D?p[v]:p[b])-x[h]/2<0;return{[g]:y[g]-(E?F<D?D-F:R-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:u})),m}return[]}function ct(t,n){const e=t.filter((t=>it.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${it.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ft(n,e){const o=["left","right"];return"rtl"===t(n)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function ut(t,n,e=!1){if(t.open)return e?dt(t,n):pt(t,n)}const dt=n(pt,100,{leading:!0,maxWait:100}),mt={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"};async function pt(t,{referenceEl:n,floatingEl:e,overlayPositioning:o="absolute",placement:r,flipDisabled:i,flipPlacements:l,offsetDistance:s,offsetSkidding:c,arrowEl:f,type:u}){if(!n||!e)return null;await rt;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:et,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=e,s=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(n));let f=await l.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=a(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x:h,y:x,data:v,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:l,elements:{reference:t,floating:n}});u=null!=h?h:u,d=null!=x?x:d,p={...p,[i]:{...p[i],...v}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(f=!0===b.rects?await l.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:d}=a(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(n,e,{strategy:o,placement:"auto"===r||"auto-start"===r||"auto-end"===r?void 0:ft(e,r),middleware:st({placement:r,flipDisabled:i,flipPlacements:l,offsetDistance:s,offsetSkidding:c,arrowEl:f,type:u})});if(f&&g.arrow){const{x:n,y:e}=g.arrow,o=p.split("-")[0],r=null!=n?"left":"top",i=mt[o],a={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout="left"===o||"right"===o?"horizontal":"vertical"),Object.assign(f.style,{...a,[r]:`${"left"==r?n:e}px`,[o]:"100%",transform:i})}const h=g.hide?.referenceHidden,x=h?"hidden":null,v=x?"none":null;e.setAttribute("data-placement",p);const b=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(e.style,{visibility:x,pointerEvents:v,position:y,top:"0",left:"0",transform:b})}const yt=new WeakMap;function gt(t,n,e){e&&n&&(ht(t,n,e),Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:t.overlayPositioning,top:"0",left:"0"}),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...$(t)?K(t):t.contextElement?K(t.contextElement):[],...K(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),$(t)&&!l&&u.observe(t),$(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?U(t):null;return l&&function n(){const o=U(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition()))))}function ht(t,n,e){if(!e||!n)return;const o=yt.get(t);o&&o(),yt.delete(t)}const xt=Math.ceil(Math.hypot(4,4));export{lt as F,ht as a,xt as b,gt as c,at as d,ct as f,ut as r}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as e,h as i,a,H as n}from"./p-57e653ea.js";import{j as r,u as o,t as s}from"./p-11beded1.js";import{u as c}from"./p-b7cc02fa.js";import{n as l,c as p,d}from"./p-94f16774.js";import{s as h,a as m,c as u}from"./p-f8e1c231.js";import"./p-3255b488.js";import"./p-5b24b90a.js";import"./p-94aa5071.js";import"./p-2fa9c44a.js";const f=class{constructor(i){t(this,i),this.calciteStepperItemChange=e(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=e(this,"calciteInternalStepperItemChange",6),this.itemMap=new Map,this.items=[],this.enabledItems=[],this.icon=!1,this.layout="horizontal",this.numbered=!1,this.numberingSystem=void 0,this.selectedItem=null,this.scale="m"}numberingSystemChange(){this.setStepperItemNumberingSystem()}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return i("slot",{onSlotchange:t=>{const e=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===t?.tagName)),i=Array(e.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=i,this.el.style.gridTemplateColumns=i,this.setStepperItemNumberingSystem()}})}calciteInternalStepperItemKeyEvent(t){const e=t.target;switch(t.detail.item.key){case"ArrowDown":case"ArrowRight":r(this.enabledItems,e,"next");break;case"ArrowUp":case"ArrowLeft":r(this.enabledItems,e,"previous");break;case"Home":r(this.enabledItems,e,"first");break;case"End":r(this.enabledItems,e,"last")}t.stopPropagation()}registerItem(t){const e=t.target,{content:i,position:a}=t.detail;this.itemMap.set(e,{position:a,content:i}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:e}=t.detail;"number"==typeof e&&(this.currentPosition=e,this.selectedItem=t.target),this.calciteInternalStepperItemChange.emit({position:e})}handleUserRequestedStepperItemSelect(){this.calciteStepperItemChange.emit()}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const e=t-1;this.currentPosition!==e&&this.updateStep(e)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,e="next"){const{items:i,currentPosition:a}=this;let n=t;for(;i[n]?.disabled;)n+="previous"===e?-1:1;return n!==a&&n<i.length&&n>=0?n:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((e,i)=>t.get(e).position-t.get(i).position))}filterItems(){return this.items.filter((t=>!t.disabled))}setStepperItemNumberingSystem(){this.items.forEach((t=>{t.numberingSystem=this.numberingSystem}))}get el(){return a(this)}static get watchers(){return{numberingSystem:["numberingSystemChange"]}}};f.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';const b=class{constructor(i){t(this,i),this.calciteInternalStepperItemKeyEvent=e(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=e(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=e(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=e(this,"calciteInternalStepperItemRegister",6),this.keyDownHandler=t=>{if(!this.disabled&&t.target===this.el)switch(t.key){case" ":case"Enter":this.emitUserRequestedItem(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:t}),t.preventDefault()}},this.handleItemClick=t=>{this.disabled||"horizontal"===this.layout&&t.composedPath().some((t=>t.classList?.contains("stepper-item-content")))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})},this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.heading=void 0,this.description=void 0,this.layout="horizontal",this.icon=!1,this.iconFlipRtl=!1,this.numbered=!1,this.scale="m",this.numberingSystem=void 0,this.effectiveLocale=""}selectedHandler(){this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(t){l.numberFormatOptions={locale:t,numberingSystem:this.numberingSystem,useGrouping:!1}}connectedCallback(){p(this)}componentWillLoad(){h(this),this.icon=o(this.el,"icon",!1),this.numbered=o(this.el,"numbered",!1),this.layout=o(this.el,"layout",!1),this.scale=o(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidLoad(){m(this)}componentDidRender(){c(this,!0)}disconnectedCallback(){d(this)}render(){return i(n,{"aria-expanded":s(this.selected),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",tabIndex:"horizontal"!==this.layout||this.disabled?null:0,ref:t=>this.headerEl=t},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},this.renderNumbers(),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading),i("span",{class:"stepper-item-description"},this.description))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(t){(t.target===this.parentStepperEl||t.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=t.detail.position,this.determineSelectedItem())}async setFocus(){await u(this),("vertical"===this.layout?this.el:this.headerEl)?.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",flipRtl:this.iconFlipRtl,icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}renderNumbers(){return l.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}get el(){return a(this)}static get watchers(){return{selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};b.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([layout=horizontal][disabled]) .stepper-item-header *,:host([disabled]) *,:host([layout=horizontal][disabled]) .stepper-item-header ::slotted(*),:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content:not(:empty){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-focus-color, var(--calcite-ui-brand));outline-offset:calc(\n 2px *\n calc(\n 1 -\n 2 * clamp(\n 0,\n var(--calcite-ui-focus-offset-invert),\n 1\n )\n )\n )}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}";export{f as calcite_stepper,b as calcite_stepper_item}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{r as t,c as i,h as e,H as a,a as n}from"./p-57e653ea.js";import{q as o,i as s,t as r}from"./p-11beded1.js";import{c,b as l,a as h,r as d,F as f}from"./p-5fae16d7.js";import{g as m}from"./p-3255b488.js";import{c as p,d as u}from"./p-1d426b87.js";import{F as g}from"./p-137b6f9b.js";import"./p-5b24b90a.js";import"./p-289f6317.js";const v="aria-describedby";function b(t){const{referenceElement:i}=t;return("string"==typeof i?o(t,{id:i}):i)||null}const y=new class{constructor(){this.registeredElements=new WeakMap,this.hoverTimeout=null,this.registeredElementCount=0,this.queryTooltip=t=>{const{registeredElements:i}=this,e=t.find((t=>i.has(t)));return i.get(e)},this.keyDownHandler=t=>{if("Escape"===t.key&&!t.defaultPrevented){const{activeTooltipEl:i}=this;if(i&&i.open){this.clearHoverTimeout(),this.toggleTooltip(i,!1);const e=b(i);e instanceof Element&&e.contains(t.target)&&t.preventDefault()}}},this.queryHoveredTooltip=t=>{const{activeTooltipEl:i}=this;if(i&&t.includes(i))return void this.clearHoverTimeout();const e=this.queryTooltip(t);e?this.toggleHoveredTooltip(e,!0):i&&this.toggleHoveredTooltip(i,!1)},this.pointerMoveHandler=t=>{const i=t.composedPath();this.clearHoverTimeout(),this.hoverTimeout=window.setTimeout((()=>this.queryHoveredTooltip(i)),500)},this.pointerDownHandler=t=>{if(!s(t))return;const i=this.queryTooltip(t.composedPath());this.clickedTooltip=i,i?.closeOnClick&&(this.toggleTooltip(i,!1),this.clearHoverTimeout())},this.focusInHandler=t=>{this.queryFocusedTooltip(t,!0)},this.focusOutHandler=t=>{this.queryFocusedTooltip(t,!1)},this.toggleHoveredTooltip=(t,i)=>{i&&this.closeExistingTooltip(),this.toggleTooltip(t,i)}}registerElement(t,i){this.registeredElementCount++,this.registeredElements.set(t,i),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}addListeners(){document.addEventListener("keydown",this.keyDownHandler,{capture:!0}),document.addEventListener("pointermove",this.pointerMoveHandler,{capture:!0}),document.addEventListener("pointerdown",this.pointerDownHandler,{capture:!0}),document.addEventListener("focusin",this.focusInHandler,{capture:!0}),document.addEventListener("focusout",this.focusOutHandler,{capture:!0})}removeListeners(){document.removeEventListener("keydown",this.keyDownHandler,{capture:!0}),document.removeEventListener("pointermove",this.pointerMoveHandler,{capture:!0}),document.removeEventListener("pointerdown",this.pointerDownHandler,{capture:!0}),document.removeEventListener("focusin",this.focusInHandler,{capture:!0}),document.removeEventListener("focusout",this.focusOutHandler,{capture:!0})}clearHoverTimeout(){window.clearTimeout(this.hoverTimeout)}closeExistingTooltip(){const{activeTooltipEl:t}=this;t&&this.toggleTooltip(t,!1)}toggleFocusedTooltip(t,i){this.closeExistingTooltip(),i&&this.clearHoverTimeout(),this.toggleTooltip(t,i)}toggleTooltip(t,i){t.open=i,i&&(this.activeTooltipEl=t)}queryFocusedTooltip(t,i){const e=this.queryTooltip(t.composedPath());e&&e!==this.clickedTooltip?this.toggleFocusedTooltip(e,i):this.clickedTooltip=null}},w=class{constructor(e){t(this,e),this.calciteTooltipBeforeClose=i(this,"calciteTooltipBeforeClose",6),this.calciteTooltipClose=i(this,"calciteTooltipClose",6),this.calciteTooltipBeforeOpen=i(this,"calciteTooltipBeforeOpen",6),this.calciteTooltipOpen=i(this,"calciteTooltipOpen",6),this.guid=`calcite-tooltip-${m()}`,this.hasLoaded=!1,this.openTransitionProp="opacity",this.setTransitionEl=t=>{this.transitionEl=t,p(this)},this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=b(this.el),c(this,this.effectiveReferenceElement,this.el);const{el:i,referenceElement:e,effectiveReferenceElement:a}=this;t&&e&&!a&&console.warn(`${i.tagName}: reference-element id "${e}" was not found.`,{el:i}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const i=this.getId();"setAttribute"in t&&t.setAttribute(v,i),y.registerElement(t,this.el)},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&t.removeAttribute(v),y.unregisterElement(t))},this.closeOnClick=!1,this.label=void 0,this.offsetDistance=l,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.referenceElement=void 0,this.effectiveReferenceElement=void 0,this.floatingLayout="vertical"}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(t){t&&this.reposition(!0)}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement()}connectedCallback(){p(this),this.setUpReferenceElement(this.hasLoaded)}componentDidLoad(){this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(!0),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),h(this,this.effectiveReferenceElement,this.el),u(this)}async reposition(t=!1){const{el:i,effectiveReferenceElement:e,placement:a,overlayPositioning:n,offsetDistance:o,offsetSkidding:s,arrowEl:r}=this;return d(this,{floatingEl:i,referenceEl:e,overlayPositioning:n,placement:a,offsetDistance:o,offsetSkidding:s,arrowEl:r,type:"tooltip"},t)}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit()}render(){const{effectiveReferenceElement:t,label:i,open:n,floatingLayout:o}=this,s=t&&n,c=!s;return e(a,{"aria-hidden":r(c),"aria-label":i,"aria-live":"polite","calcite-hydrated-hidden":c,id:this.getId(),role:"tooltip"},e("div",{class:{[f.animation]:!0,[f.animationActive]:s},ref:this.setTransitionEl},e(g,{floatingLayout:o,ref:t=>this.arrowEl=t}),e("div",{class:"container"},e("slot",null))))}get el(){return n(this)}static get watchers(){return{offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}};w.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{--calcite-floating-ui-z-index:var(--calcite-tooltip-z-index, 901);display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index)}.calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:-1;fill:var(--calcite-ui-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-ui-border-3)}.container{position:relative;overflow:hidden;border-radius:0.25rem;padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size--2);line-height:1.375;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);max-inline-size:20rem;max-block-size:20rem;text-align:start}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}";export{w as calcite_tooltip}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{f as t,h as e}from"./p-57e653ea.js";import{b as o}from"./p-11beded1.js";import{S as n}from"./p-4326ccbd.js";import{S as a}from"./p-e7ad5add.js";const i=150,c=t=>t.reduce(((t,e)=>t+e),0)/t.length,l=t=>{const e=t?.length;return{actionWidth:e?c(t.map((t=>t.clientWidth||0))):0,actionHeight:e?c(t.map((t=>t.clientHeight||0))):0}},r=({layout:t,actionCount:e,actionWidth:o,width:n,actionHeight:a,height:i,groupCount:c})=>Math.max(e-(({width:t,actionWidth:e,layout:o,height:n,actionHeight:a,groupCount:i})=>Math.floor((("horizontal"===o?t:n)-2*i)/("horizontal"===o?e:a)))({width:n,actionWidth:o,layout:t,height:i,actionHeight:a,groupCount:c}),0),s=t=>Array.from(t.querySelectorAll("calcite-action")).filter((t=>!t.closest("calcite-action-menu")||t.slot===a.trigger)),p=({actionGroups:e,expanded:o,overflowCount:a})=>{let i=a;e.reverse().forEach((e=>{let a=0;const c=s(e).reverse();c.forEach((t=>{t.slot===n.menuActions&&(t.removeAttribute("slot"),t.textEnabled=o)})),i>0&&c.some((t=>(c.filter((t=>!t.slot)).length>1&&c.length>2&&!t.closest("calcite-action-menu")&&(t.textEnabled=!0,t.setAttribute("slot",n.menuActions),a++,a>1&&i--),i<1))),t(e)}))};function d({parent:t,expanded:e}){s(t).filter((t=>t.slot!==n.menuActions)).forEach((t=>t.textEnabled=e)),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach((t=>t.expanded=e))}const h=({expanded:t,intlExpand:n,intlCollapse:a,toggle:i,el:c,position:l,tooltip:r,ref:s,scale:p})=>{const d="rtl"===o(c),h=t?a:n,u=["chevrons-left","chevrons-right"];d&&u.reverse();const f="end"===function(t,e){return t||e.closest("calcite-shell-panel")?.position||"start"}(l,c),g=e("calcite-action",{icon:t?f?u[1]:u[0]:f?u[0]:u[1],onClick:i,scale:p,text:h,textEnabled:t,ref:e=>(({tooltip:t,referenceElement:e,expanded:o,ref:n})=>(t&&(t.referenceElement=!o&&e?e:null),n&&n(e),e))({tooltip:r,referenceElement:e,expanded:t,ref:s})});return g};export{h as E,p as a,r as b,l as g,i as o,s as q,d as t}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{h as t}from"./p-57e653ea.js";function e(t){return Math.min(Math.max(Math.ceil(t),1),6)}const r=(e,r)=>{const a=e.level?`h${e.level}`:"div";return delete e.level,t(a,{...e},r)};export{r as H,e as c}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
5
- */
6
- import{f as t}from"./p-57e653ea.js";import{c as o}from"./p-2fa9c44a.js";const n=new Set;let c;const s={childList:!0};function a(t){c||(c=o("mutation",i)),c.observe(t.el,s)}function f(t){n.delete(t.el),i(c.takeRecords()),c.disconnect();for(const[t]of n.entries())c.observe(t,s)}function i(o){o.forEach((({target:o})=>{t(o)}))}export{a as c,f as d}