@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/hydrate/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.0
4
+ * v1.4.0-next.10
5
5
  */
6
6
  'use strict';
7
7
 
@@ -6537,6 +6537,11 @@ function gen(counts) {
6537
6537
  }
6538
6538
  const guid = () => gen([2, 1, 1, 1, 3]);
6539
6539
 
6540
+ /**
6541
+ * The default `focus-trap/tabbable` options.
6542
+ *
6543
+ * See https://github.com/focus-trap/tabbable#tabbable
6544
+ */
6540
6545
  const tabbableOptions = {
6541
6546
  getShadowRoot: true
6542
6547
  };
@@ -6545,7 +6550,7 @@ const tabbableOptions = {
6545
6550
  *
6546
6551
  * If it already has an ID, it will be preserved, otherwise a unique one will be generated and assigned.
6547
6552
  *
6548
- * @param el
6553
+ * @param {Element} el An element.
6549
6554
  * @returns {string} The element's ID.
6550
6555
  */
6551
6556
  function ensureId(el) {
@@ -6554,27 +6559,66 @@ function ensureId(el) {
6554
6559
  }
6555
6560
  return (el.id = el.id || `${el.tagName.toLowerCase()}-${guid()}`);
6556
6561
  }
6562
+ /**
6563
+ * This helper returns an array from a NodeList.
6564
+ *
6565
+ * @param {NodeList} nodeList A NodeList.
6566
+ * @returns {Element[]} An array of elements.
6567
+ */
6557
6568
  function nodeListToArray(nodeList) {
6558
6569
  return Array.isArray(nodeList) ? nodeList : Array.from(nodeList);
6559
6570
  }
6571
+ /**
6572
+ * This helper returns the Calcite "mode" of an element.
6573
+ *
6574
+ * @param {HTMLElement} el An element.
6575
+ * @returns {"light"|"dark"} The Calcite mode.
6576
+ */
6560
6577
  function getModeName(el) {
6561
6578
  const closestElWithMode = closestElementCrossShadowBoundary(el, `.${CSS_UTILITY.darkMode}, .${CSS_UTILITY.lightMode}`);
6562
6579
  return closestElWithMode?.classList.contains("calcite-mode-dark") ? "dark" : "light";
6563
6580
  }
6581
+ /**
6582
+ * This helper returns the direction of a HTML element.
6583
+ *
6584
+ * @param {HTMLElement} el An element.
6585
+ * @returns {Direction} The direction.
6586
+ */
6564
6587
  function getElementDir(el) {
6565
6588
  const prop = "dir";
6566
6589
  const selector = `[${prop}]`;
6567
6590
  const closest = closestElementCrossShadowBoundary(el, selector);
6568
6591
  return closest ? closest.getAttribute(prop) : "ltr";
6569
6592
  }
6570
- function getElementProp(el, prop, fallbackValue) {
6571
- const selector = `[${prop}]`;
6593
+ /**
6594
+ * This helper returns the value of an attribute on an element.
6595
+ *
6596
+ * @param {HTMLElement} el An element.
6597
+ * @param {string} attribute An attribute name.
6598
+ * @param {any} fallbackValue A fallback value.
6599
+ * @returns {any} The value.
6600
+ * @deprecated
6601
+ */
6602
+ function getElementProp(el, attribute, fallbackValue) {
6603
+ const selector = `[${attribute}]`;
6572
6604
  const closest = el.closest(selector);
6573
- return closest ? closest.getAttribute(prop) : fallbackValue;
6605
+ return closest ? closest.getAttribute(attribute) : fallbackValue;
6574
6606
  }
6607
+ /**
6608
+ * This helper returns the rootNode of an element.
6609
+ *
6610
+ * @param {Element} el An element.
6611
+ * @returns {Document|ShadowRoot} The element's root node.
6612
+ */
6575
6613
  function getRootNode(el) {
6576
6614
  return el.getRootNode();
6577
6615
  }
6616
+ /**
6617
+ * This helper returns the host of a ShadowRoot.
6618
+ *
6619
+ * @param {Document | ShadowRoot} root A root element.
6620
+ * @returns {Element | null} The host element.
6621
+ */
6578
6622
  function getHost(root) {
6579
6623
  return root.host || null;
6580
6624
  }
@@ -6583,11 +6627,11 @@ function getHost(root) {
6583
6627
  *
6584
6628
  * If both an 'id' and 'selector' are supplied, 'id' will take precedence over 'selector'.
6585
6629
  *
6586
- * @param element
6630
+ * @param {Element} element An element.
6587
6631
  * @param root0
6588
6632
  * @param root0.selector
6589
6633
  * @param root0.id
6590
- * @returns {Element} The element.
6634
+ * @returns {Element} An element.
6591
6635
  */
6592
6636
  function queryElementRoots(element, { selector, id }) {
6593
6637
  // Gets the rootNode and any ancestor rootNodes (shadowRoot or document) of an element and queries them for a selector.
@@ -6616,6 +6660,13 @@ function queryElementRoots(element, { selector, id }) {
6616
6660
  }
6617
6661
  return queryFrom(element);
6618
6662
  }
6663
+ /**
6664
+ * This helper returns the closest element matching the selector by crossing he shadow boundary if necessary.
6665
+ *
6666
+ * @param {Element} element The starting element.
6667
+ * @param {string} selector The selector.
6668
+ * @returns {Element} The targeted element.
6669
+ */
6619
6670
  function closestElementCrossShadowBoundary(element, selector) {
6620
6671
  // based on https://stackoverflow.com/q/54520554/194216
6621
6672
  function closestFrom(el) {
@@ -6623,9 +6674,20 @@ function closestElementCrossShadowBoundary(element, selector) {
6623
6674
  }
6624
6675
  return closestFrom(element);
6625
6676
  }
6677
+ /**
6678
+ * This helper returns true when an element has a setFocus method.
6679
+ *
6680
+ * @param {Element} el An element.
6681
+ * @returns {boolean} The result.
6682
+ */
6626
6683
  function isCalciteFocusable(el) {
6627
6684
  return typeof el?.setFocus === "function";
6628
6685
  }
6686
+ /**
6687
+ * This helper focuses an element using the `setFocus` method if available and falls back to using the `focus` method if not available.
6688
+ *
6689
+ * @param {Element} el An element.
6690
+ */
6629
6691
  async function focusElement(el) {
6630
6692
  if (!el) {
6631
6693
  return;
@@ -6685,10 +6747,24 @@ function querySingle(element, slotSelector, options) {
6685
6747
  const selector = options?.selector;
6686
6748
  return selector ? match?.querySelector(selector) : match;
6687
6749
  }
6750
+ /**
6751
+ * Filters direct children.
6752
+ *
6753
+ * @param {Element} el An element.
6754
+ * @param {string} selector The selector.
6755
+ * @returns {Element[]} An array of elements.
6756
+ */
6688
6757
  function filterDirectChildren(el, selector) {
6689
6758
  return Array.from(el.children).filter((child) => child.matches(selector));
6690
6759
  }
6691
- // set a default icon from a defined set or allow an override with an icon name string
6760
+ /**
6761
+ * Set a default icon from a defined set or allow an override with an icon name string
6762
+ *
6763
+ * @param {Record<string, string>} iconObject The icon object.
6764
+ * @param {string | boolean} iconValue The icon value.
6765
+ * @param {string} matchedValue The matched value.
6766
+ * @returns {string|undefined} The resulting icon value.
6767
+ */
6692
6768
  function setRequestedIcon(iconObject, iconValue, matchedValue) {
6693
6769
  if (typeof iconValue === "string" && iconValue !== "") {
6694
6770
  return iconValue;
@@ -6697,6 +6773,13 @@ function setRequestedIcon(iconObject, iconValue, matchedValue) {
6697
6773
  return iconObject[matchedValue];
6698
6774
  }
6699
6775
  }
6776
+ /**
6777
+ * This helper returns true when two rectangles intersect.
6778
+ *
6779
+ * @param {DOMRect} rect1 The first rectangle.
6780
+ * @param {DOMRect} rect2 The second rectangle.
6781
+ * @returns {boolean} The result.
6782
+ */
6700
6783
  function intersects(rect1, rect2) {
6701
6784
  return !(rect2.left > rect1.right ||
6702
6785
  rect2.right < rect1.left ||
@@ -6708,7 +6791,7 @@ function intersects(rect1, rect2) {
6708
6791
  *
6709
6792
  * It should only be used for aria attributes that require a string value of "true" or "false".
6710
6793
  *
6711
- * @param value
6794
+ * @param {boolean} value The value.
6712
6795
  * @returns {string} The string conversion of a boolean value ("true" | "false").
6713
6796
  */
6714
6797
  function toAriaBoolean(value) {
@@ -6721,7 +6804,7 @@ function toAriaBoolean(value) {
6721
6804
  * <slot onSlotchange={(event) => this.mySlotHasElement = slotChangeHasAssignedElement(event)} />}
6722
6805
  * ```
6723
6806
  *
6724
- * @param event
6807
+ * @param {Event} event The event.
6725
6808
  * @returns {boolean} Whether the slot has any assigned elements.
6726
6809
  */
6727
6810
  function slotChangeHasAssignedElement(event) {
@@ -6734,7 +6817,7 @@ function slotChangeHasAssignedElement(event) {
6734
6817
  * <slot onSlotchange={(event) => this.mySlotElements = slotChangeGetAssignedElements(event)} />}
6735
6818
  * ```
6736
6819
  *
6737
- * @param event
6820
+ * @param {Event} event The event.
6738
6821
  * @returns {boolean} Whether the slot has any assigned elements.
6739
6822
  */
6740
6823
  function slotChangeGetAssignedElements(event) {
@@ -6747,12 +6830,20 @@ function slotChangeGetAssignedElements(event) {
6747
6830
  *
6748
6831
  * See https://www.w3.org/TR/pointerevents/#the-button-property.
6749
6832
  *
6750
- * @param event
6751
- * @returns {boolean}
6833
+ * @param {PointerEvent} event The pointer event.
6834
+ * @returns {boolean} The value.
6752
6835
  */
6753
6836
  function isPrimaryPointerButton(event) {
6754
6837
  return !!(event.isPrimary && event.button === 0);
6755
6838
  }
6839
+ /**
6840
+ * This helper sets focus on and returns a destination element from within a group of provided elements.
6841
+ *
6842
+ * @param {Element[]} elements An array of elements.
6843
+ * @param {Element} currentElement The current element.
6844
+ * @param {FocusElementInGroupDestination} destination The target destination element to focus.
6845
+ * @returns {Element} The focused element
6846
+ */
6756
6847
  const focusElementInGroup = (elements, currentElement, destination) => {
6757
6848
  const currentIndex = elements.indexOf(currentElement);
6758
6849
  const isFirstItem = currentIndex === 0;
@@ -9223,7 +9314,7 @@ const SLOTS$r = {
9223
9314
  expandTooltip: "expand-tooltip"
9224
9315
  };
9225
9316
 
9226
- const actionBarCss = "@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*/.sc-calcite-action-bar: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*/.calcite-animate.sc-calcite-action-bar{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-action-bar{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-action-bar{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-action-bar{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-action-bar{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-action-bar:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-action-bar-h{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 **/.sc-calcite-action-bar-h *.sc-calcite-action-bar{box-sizing:border-box}/*!@:root*/.sc-calcite-action-bar:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-action-bar-h{display:none}/*!@:host*/.sc-calcite-action-bar-h{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}/*!@:host([layout=vertical])*/[layout=vertical].sc-calcite-action-bar-h{flex-direction:column}/*!@:host([layout=horizontal])*/[layout=horizontal].sc-calcite-action-bar-h{flex-direction:row}/*!@:host([layout=vertical][overflow-actions-disabled])*/[layout=vertical][overflow-actions-disabled].sc-calcite-action-bar-h{overflow-y:auto}/*!@:host([layout=horizontal][overflow-actions-disabled])*/[layout=horizontal][overflow-actions-disabled].sc-calcite-action-bar-h{overflow-x:auto}/*!@:host([layout=vertical][expanded])*/[layout=vertical][expanded].sc-calcite-action-bar-h{max-inline-size:var(--calcite-action-bar-expanded-max-width)}/*!@::slotted(calcite-action-group)*/.sc-calcite-action-bar-s>calcite-action-group{border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}/*!@:host([layout=horizontal]) ::slotted(calcite-action-group)*/.sc-calcite-action-bar-h[layout=horizontal] .sc-calcite-action-bar-s>calcite-action-group{border-width:0px;border-inline-end-width:1px;border-style:solid}/*!@::slotted(calcite-action-group:last-child)*/.sc-calcite-action-bar-s>calcite-action-group:last-child{border-block-end-width:0px;border-inline-end-width:0px}/*!@.action-group--bottom*/.action-group--bottom.sc-calcite-action-bar{flex-grow:1;justify-content:flex-end;padding-block-end:0px;padding-inline-end:0px}";
9317
+ const actionBarCss = "@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*/.sc-calcite-action-bar: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*/.calcite-animate.sc-calcite-action-bar{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-action-bar{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-action-bar{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-action-bar{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-action-bar{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-action-bar:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-action-bar-h{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 **/.sc-calcite-action-bar-h *.sc-calcite-action-bar{box-sizing:border-box}/*!@:root*/.sc-calcite-action-bar:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-action-bar-h{display:none}/*!@:host*/.sc-calcite-action-bar-h{pointer-events:auto;display:inline-flex;align-self:stretch;--calcite-action-bar-expanded-max-width:auto}/*!@:host([layout=vertical])*/[layout=vertical].sc-calcite-action-bar-h{flex-direction:column}/*!@:host([layout=horizontal])*/[layout=horizontal].sc-calcite-action-bar-h{flex-direction:row}/*!@:host([layout=vertical][overflow-actions-disabled])*/[layout=vertical][overflow-actions-disabled].sc-calcite-action-bar-h{overflow-y:auto}/*!@:host([layout=horizontal][overflow-actions-disabled])*/[layout=horizontal][overflow-actions-disabled].sc-calcite-action-bar-h{overflow-x:auto}/*!@:host([layout=vertical][expanded])*/[layout=vertical][expanded].sc-calcite-action-bar-h{max-inline-size:var(--calcite-action-bar-expanded-max-width)}/*!@::slotted(calcite-action-group)*/.sc-calcite-action-bar-s>calcite-action-group{border-block-end:1px solid var(--calcite-ui-border-3)}/*!@:host([layout=horizontal]) ::slotted(calcite-action-group)*/.sc-calcite-action-bar-h[layout=horizontal] .sc-calcite-action-bar-s>calcite-action-group{border-block-end:0;border-inline-end:1px solid var(--calcite-ui-border-3)}/*!@:host([layout=horizontal][expand-disabled]) ::slotted(calcite-action-group:last-of-type)*/.sc-calcite-action-bar-h[layout=horizontal][expand-disabled] .sc-calcite-action-bar-s>calcite-action-group:last-of-type{border-inline-end:0}/*!@::slotted(calcite-action-group:last-child)*/.sc-calcite-action-bar-s>calcite-action-group:last-child{border-block-end:0;border-inline-end:0}/*!@.action-group--bottom*/.action-group--bottom.sc-calcite-action-bar{flex-grow:1;justify-content:flex-end}";
9227
9318
 
9228
9319
  /**
9229
9320
  * @slot - A slot for adding `calcite-action`s that will appear at the top of the component.
@@ -10389,50 +10480,91 @@ class Alert {
10389
10480
  }; }
10390
10481
  }
10391
10482
 
10392
- function rgbToHex(color) {
10393
- const { r, g, b } = color;
10394
- return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b
10395
- .toString(16)
10396
- .padStart(2, "0")}`.toLowerCase();
10397
- }
10398
10483
  const hexChar = /^[0-9A-F]$/i;
10399
- const shortHandHex = /^#[0-9A-F]{3}$/i;
10484
+ const shorthandHex = /^#[0-9A-F]{3}$/i;
10400
10485
  const longhandHex = /^#[0-9A-F]{6}$/i;
10401
- function isValidHex(hex) {
10402
- return isShorthandHex(hex) || isLonghandHex(hex);
10486
+ const shorthandHexWithAlpha = /^#[0-9A-F]{4}$/i;
10487
+ const longhandHexWithAlpha = /^#[0-9A-F]{8}$/i;
10488
+ const alphaToOpacity = (alpha) => Number((alpha * 100).toFixed());
10489
+ const opacityToAlpha = (opacity) => Number((opacity / 100).toFixed(2));
10490
+ function isValidHex(hex, hasAlpha = false) {
10491
+ return isShorthandHex(hex, hasAlpha) || isLonghandHex(hex, hasAlpha);
10492
+ }
10493
+ function evaluateHex(hex, length, pattern) {
10494
+ if (!hex) {
10495
+ return false;
10496
+ }
10497
+ return hex.length === length && pattern.test(hex);
10403
10498
  }
10404
- function isShorthandHex(hex) {
10405
- return hex && hex.length === 4 && shortHandHex.test(hex);
10499
+ function isShorthandHex(hex, hasAlpha = false) {
10500
+ const hexLength = hasAlpha ? 5 : 4;
10501
+ const hexPattern = hasAlpha ? shorthandHexWithAlpha : shorthandHex;
10502
+ return evaluateHex(hex, hexLength, hexPattern);
10406
10503
  }
10407
- function isLonghandHex(hex) {
10408
- return hex && hex.length === 7 && longhandHex.test(hex);
10504
+ function isLonghandHex(hex, hasAlpha = false) {
10505
+ const hexLength = hasAlpha ? 9 : 7;
10506
+ const hexPattern = hasAlpha ? longhandHexWithAlpha : longhandHex;
10507
+ return evaluateHex(hex, hexLength, hexPattern);
10409
10508
  }
10410
- function normalizeHex(hex) {
10509
+ function normalizeHex(hex, hasAlpha = false, convertFromHexToHexa = false) {
10411
10510
  hex = hex.toLowerCase();
10412
10511
  if (!hex.startsWith("#")) {
10413
10512
  hex = `#${hex}`;
10414
10513
  }
10415
- if (isShorthandHex(hex)) {
10416
- return rgbToHex(hexToRGB(hex));
10514
+ if (isShorthandHex(hex, hasAlpha)) {
10515
+ return rgbToHex(hexToRGB(hex, hasAlpha));
10516
+ }
10517
+ if (hasAlpha && convertFromHexToHexa && isValidHex(hex, false /* we only care about RGB hex for conversion */)) {
10518
+ const isShorthand = isShorthandHex(hex, false);
10519
+ return rgbToHex(hexToRGB(`${hex}${isShorthand ? "f" : "ff"}`, true));
10417
10520
  }
10418
10521
  return hex;
10419
10522
  }
10420
- function hexToRGB(hex) {
10421
- if (!isValidHex(hex)) {
10523
+ function hexify(color, hasAlpha = false) {
10524
+ return hasAlpha ? color.hexa() : color.hex();
10525
+ }
10526
+ function rgbToHex(color) {
10527
+ const { r, g, b } = color;
10528
+ const rChars = numToHex(r);
10529
+ const gChars = numToHex(g);
10530
+ const bChars = numToHex(b);
10531
+ const alphaChars = "a" in color ? numToHex(color.a * 255) : "";
10532
+ return `#${rChars}${gChars}${bChars}${alphaChars}`.toLowerCase();
10533
+ }
10534
+ function numToHex(num) {
10535
+ return num.toString(16).padStart(2, "0");
10536
+ }
10537
+ function normalizeAlpha(colorObject) {
10538
+ const normalized = { ...colorObject, a: colorObject.alpha ?? 1 /* Color() will omit alpha if 1 */ };
10539
+ delete normalized.alpha;
10540
+ return normalized;
10541
+ }
10542
+ function normalizeColor(alphaColorObject) {
10543
+ const normalized = { ...alphaColorObject, alpha: alphaColorObject.a ?? 1 };
10544
+ delete normalized.a;
10545
+ return normalized;
10546
+ }
10547
+ function hexToRGB(hex, hasAlpha = false) {
10548
+ if (!isValidHex(hex, hasAlpha)) {
10422
10549
  return null;
10423
10550
  }
10424
10551
  hex = hex.replace("#", "");
10425
- if (hex.length === 3) {
10426
- const [first, second, third] = hex.split("");
10427
- const r = parseInt(`${first}${first}`, 16);
10428
- const g = parseInt(`${second}${second}`, 16);
10429
- const b = parseInt(`${third}${third}`, 16);
10430
- return { r, g, b };
10431
- }
10432
- const r = parseInt(hex.slice(0, 2), 16);
10433
- const g = parseInt(hex.slice(2, 4), 16);
10434
- const b = parseInt(hex.slice(4, 6), 16);
10435
- return { r, g, b };
10552
+ let r, g, b, a;
10553
+ const isShorthand = hex.length === 3 || hex.length === 4;
10554
+ if (isShorthand) {
10555
+ const [first, second, third, fourth] = hex.split("");
10556
+ r = parseInt(`${first}${first}`, 16);
10557
+ g = parseInt(`${second}${second}`, 16);
10558
+ b = parseInt(`${third}${third}`, 16);
10559
+ a = parseInt(`${fourth}${fourth}`, 16) / 255;
10560
+ }
10561
+ else {
10562
+ r = parseInt(hex.slice(0, 2), 16);
10563
+ g = parseInt(hex.slice(2, 4), 16);
10564
+ b = parseInt(hex.slice(4, 6), 16);
10565
+ a = parseInt(hex.slice(6, 8), 16) / 255;
10566
+ }
10567
+ return isNaN(a) ? { r, g, b } : { r, g, b, a };
10436
10568
  }
10437
10569
  // these utils allow users to pass enum values as strings without having to access the enum
10438
10570
  // based on the approach suggested by https://github.com/microsoft/TypeScript/issues/17690#issuecomment-321365759,
@@ -10494,7 +10626,47 @@ function hasChannels(colorObject, ...channels) {
10494
10626
  return channels.every((channel) => channel && colorObject && `${channel}` in colorObject);
10495
10627
  }
10496
10628
  function colorEqual(value1, value2) {
10497
- return value1?.rgbNumber() === value2?.rgbNumber();
10629
+ return value1?.rgb().array().toString() === value2?.rgb().array().toString();
10630
+ }
10631
+ function alphaCompatible(mode) {
10632
+ return (mode === CSSColorMode.HEXA ||
10633
+ mode === CSSColorMode.RGBA_CSS ||
10634
+ mode === CSSColorMode.HSLA_CSS ||
10635
+ mode === ObjectColorMode.RGBA ||
10636
+ mode === ObjectColorMode.HSLA ||
10637
+ mode === ObjectColorMode.HSVA);
10638
+ }
10639
+ function toAlphaMode(mode) {
10640
+ const alphaMode = mode === CSSColorMode.HEX
10641
+ ? CSSColorMode.HEXA
10642
+ : mode === CSSColorMode.RGB_CSS
10643
+ ? CSSColorMode.RGBA_CSS
10644
+ : mode === CSSColorMode.HSL_CSS
10645
+ ? CSSColorMode.HSLA_CSS
10646
+ : mode === ObjectColorMode.RGB
10647
+ ? ObjectColorMode.RGBA
10648
+ : mode === ObjectColorMode.HSL
10649
+ ? ObjectColorMode.HSLA
10650
+ : mode === ObjectColorMode.HSV
10651
+ ? ObjectColorMode.HSVA
10652
+ : mode;
10653
+ return alphaMode;
10654
+ }
10655
+ function toNonAlphaMode(mode) {
10656
+ const nonAlphaMode = mode === CSSColorMode.HEXA
10657
+ ? CSSColorMode.HEX
10658
+ : mode === CSSColorMode.RGBA_CSS
10659
+ ? CSSColorMode.RGB_CSS
10660
+ : mode === CSSColorMode.HSLA_CSS
10661
+ ? CSSColorMode.HSL_CSS
10662
+ : mode === ObjectColorMode.RGBA
10663
+ ? ObjectColorMode.RGB
10664
+ : mode === ObjectColorMode.HSLA
10665
+ ? ObjectColorMode.HSL
10666
+ : mode === ObjectColorMode.HSVA
10667
+ ? ObjectColorMode.HSV
10668
+ : mode;
10669
+ return nonAlphaMode;
10498
10670
  }
10499
10671
 
10500
10672
  /**
@@ -10564,6 +10736,7 @@ class Avatar {
10564
10736
  this.fullName = undefined;
10565
10737
  this.username = undefined;
10566
10738
  this.userId = undefined;
10739
+ this.label = undefined;
10567
10740
  this.thumbnailFailedToLoad = false;
10568
10741
  }
10569
10742
  //--------------------------------------------------------------------------
@@ -10581,11 +10754,11 @@ class Avatar {
10581
10754
  //--------------------------------------------------------------------------
10582
10755
  determineContent() {
10583
10756
  if (this.thumbnail && !this.thumbnailFailedToLoad) {
10584
- return (hAsync("img", { alt: "", class: "thumbnail", onError: () => (this.thumbnailFailedToLoad = true), src: this.thumbnail }));
10757
+ return (hAsync("img", { alt: this.label || "", class: "thumbnail", onError: () => (this.thumbnailFailedToLoad = true), src: this.thumbnail }));
10585
10758
  }
10586
10759
  const initials = this.generateInitials();
10587
10760
  const backgroundColor = this.generateFillColor();
10588
- return (hAsync("span", { class: "background", style: { backgroundColor } }, initials ? (hAsync("span", { "aria-hidden": "true", class: "initials" }, initials)) : (hAsync("calcite-icon", { class: "icon", icon: "user", scale: this.scale }))));
10761
+ return (hAsync("span", { "aria-label": this.label || this.fullName, class: "background", role: "figure", style: { backgroundColor } }, initials ? (hAsync("span", { "aria-hidden": "true", class: "initials" }, initials)) : (hAsync("calcite-icon", { class: "icon", icon: "user", scale: this.scale }))));
10589
10762
  }
10590
10763
  /**
10591
10764
  * Generate a valid background color that is consistent and unique to this user
@@ -10632,6 +10805,7 @@ class Avatar {
10632
10805
  "fullName": [513, "full-name"],
10633
10806
  "username": [513],
10634
10807
  "userId": [513, "user-id"],
10808
+ "label": [1],
10635
10809
  "thumbnailFailedToLoad": [32]
10636
10810
  },
10637
10811
  "$listeners$": undefined,
@@ -10681,7 +10855,7 @@ const ICONS$e = {
10681
10855
  refresh: "refresh"
10682
10856
  };
10683
10857
 
10684
- const blockCss = "@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*/.sc-calcite-block: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*/.calcite-animate.sc-calcite-block{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-block{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-block{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-block{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-block{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-block:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-block-h{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 **/.sc-calcite-block-h *.sc-calcite-block{box-sizing:border-box}/*!@:host*/.sc-calcite-block-h{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}/*!@:root*/.sc-calcite-block:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-block-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-block-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-block-h *.sc-calcite-block,.sc-calcite-block-h[disabled] .sc-calcite-block-s>*{pointer-events:none}/*!@:host*/.sc-calcite-block-h{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding:0px;transition-property:margin;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0.215, 0.440, 0.420, 0.880);flex-basis:auto}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-block-h[disabled] .sc-calcite-block-s>[calcite-hydrated][disabled],[disabled].sc-calcite-block-h [calcite-hydrated][disabled].sc-calcite-block{opacity:1}@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*/.sc-calcite-block: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*/.calcite-animate.sc-calcite-block{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-block{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-block{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-block{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-block{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-block:root{--calcite-internal-duration-factor:0.01}}/*!@.header*/.header.sc-calcite-block{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-block{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-block .heading.sc-calcite-block{flex:1 1 auto;padding:0.5rem}/*!@.header*/.header.sc-calcite-block{justify-content:flex-start;padding:0px}/*!@.header,\n.toggle*/.header.sc-calcite-block,.toggle.sc-calcite-block{grid-area:header}/*!@.header-container*/.header-container.sc-calcite-block{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto;grid-template-areas:\"handle header control menu\";grid-column:header-start/menu-end;grid-row:1/2}/*!@.toggle*/.toggle.sc-calcite-block{margin:0px;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0px;font-family:inherit;outline-color:transparent;text-align:initial;background-color:transparent}/*!@.toggle:hover*/.toggle.sc-calcite-block:hover{background-color:var(--calcite-ui-foreground-2)}/*!@.toggle:focus*/.toggle.sc-calcite-block: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 )}/*!@calcite-loader[inline]*/calcite-loader[inline].sc-calcite-block{grid-area:control;align-self:center}/*!@calcite-handle*/calcite-handle.sc-calcite-block{grid-area:handle}/*!@.title*/.title.sc-calcite-block{margin:0px;padding:0.75rem}/*!@.header .title .heading*/.header.sc-calcite-block .title.sc-calcite-block .heading.sc-calcite-block{padding:0px;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-2);transition-property:color;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);word-wrap:break-word;word-break:break-word}/*!@.description*/.description.sc-calcite-block{margin-block-start:0.125rem;padding:0px;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-ui-text-3);word-wrap:break-word;word-break:break-word}/*!@.icon*/.icon.sc-calcite-block{margin-inline-start:0.75rem;margin-inline-end:0px;margin-block:0.75rem}/*!@.status-icon.valid*/.status-icon.valid.sc-calcite-block{color:var(--calcite-ui-success)}/*!@.status-icon.invalid*/.status-icon.invalid.sc-calcite-block{color:var(--calcite-ui-danger)}/*!@.status-icon.loading*/.status-icon.loading.sc-calcite-block{animation:spin calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}/*!@.toggle-icon*/.toggle-icon.sc-calcite-block{margin-block:0.75rem;align-self:center;justify-self:end;color:var(--calcite-ui-text-3);transition-property:color;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:1rem;margin-inline-start:auto}/*!@.toggle:hover .toggle-icon*/.toggle.sc-calcite-block:hover .toggle-icon.sc-calcite-block{color:var(--calcite-ui-text-1)}/*!@.container*/.container.sc-calcite-block{position:relative;display:flex;block-size:100%;flex-direction:column}/*!@.content*/.content.sc-calcite-block{position:relative;flex:1 1 0%}@keyframes in{0%{opacity:0}100%{opacity:1}}/*!@.content*/.content.sc-calcite-block{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-block-padding, 0.5rem);padding-inline:var(--calcite-block-padding, 0.625rem)}/*!@.control-container*/.control-container.sc-calcite-block{margin:0px;display:flex;grid-area:control}/*!@calcite-action-menu*/calcite-action-menu.sc-calcite-block{grid-area:menu}/*!@:host([open])*/[open].sc-calcite-block-h{margin-block:0.5rem}/*!@:host([open]) .header .title .heading*/[open].sc-calcite-block-h .header.sc-calcite-block .title.sc-calcite-block .heading.sc-calcite-block{color:var(--calcite-ui-text-1)}";
10858
+ const blockCss = "@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*/.sc-calcite-block: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*/.calcite-animate.sc-calcite-block{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-block{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-block{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-block{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-block{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-block:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-block-h{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 **/.sc-calcite-block-h *.sc-calcite-block{box-sizing:border-box}/*!@:host*/.sc-calcite-block-h{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}/*!@:root*/.sc-calcite-block:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-block-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-block-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-block-h *.sc-calcite-block,.sc-calcite-block-h[disabled] .sc-calcite-block-s>*{pointer-events:none}/*!@:host*/.sc-calcite-block-h{display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding:0px;transition-property:margin;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0.215, 0.440, 0.420, 0.880);flex-basis:auto}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-block-h[disabled] .sc-calcite-block-s>[calcite-hydrated][disabled],[disabled].sc-calcite-block-h [calcite-hydrated][disabled].sc-calcite-block{opacity:1}@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*/.sc-calcite-block: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*/.calcite-animate.sc-calcite-block{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-block{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-block{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-block{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-block{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-block:root{--calcite-internal-duration-factor:0.01}}/*!@.header*/.header.sc-calcite-block{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-block{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-block .heading.sc-calcite-block{flex:1 1 auto;padding:0.5rem}/*!@.header*/.header.sc-calcite-block{justify-content:flex-start;padding:0px}/*!@.header,\n.toggle*/.header.sc-calcite-block,.toggle.sc-calcite-block{grid-area:header}/*!@.header-container*/.header-container.sc-calcite-block{display:grid;align-items:stretch;grid-template:auto/auto 1fr auto auto;grid-template-areas:\"handle header control menu\";grid-column:header-start/menu-end;grid-row:1/2}/*!@.toggle*/.toggle.sc-calcite-block{margin:0px;display:flex;cursor:pointer;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-style:none;padding:0px;font-family:inherit;outline-color:transparent;text-align:initial;background-color:transparent}/*!@.toggle:hover*/.toggle.sc-calcite-block:hover{background-color:var(--calcite-ui-foreground-2)}/*!@.toggle:focus*/.toggle.sc-calcite-block: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 )}/*!@calcite-loader[inline]*/calcite-loader[inline].sc-calcite-block{grid-area:control;align-self:center}/*!@calcite-handle*/calcite-handle.sc-calcite-block{grid-area:handle}/*!@.title*/.title.sc-calcite-block{margin:0px;padding:0.75rem}/*!@.header .title .heading*/.header.sc-calcite-block .title.sc-calcite-block .heading.sc-calcite-block{padding:0px;font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-2);transition-property:color;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);word-wrap:break-word;word-break:break-word}/*!@.description*/.description.sc-calcite-block{margin-block-start:0.125rem;padding:0px;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-ui-text-3);word-wrap:break-word;word-break:break-word}/*!@.icon*/.icon.sc-calcite-block{display:flex;margin-inline-start:0.75rem;margin-inline-end:0px}/*!@.status-icon.valid*/.status-icon.valid.sc-calcite-block{color:var(--calcite-ui-success)}/*!@.status-icon.invalid*/.status-icon.invalid.sc-calcite-block{color:var(--calcite-ui-danger)}/*!@.status-icon.loading*/.status-icon.loading.sc-calcite-block{animation:spin calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}@keyframes spin{0%{transform:rotate(0deg)}50%{transform:rotate(180deg)}100%{transform:rotate(360deg)}}/*!@.toggle-icon*/.toggle-icon.sc-calcite-block{margin-block:0.75rem;align-self:center;justify-self:end;color:var(--calcite-ui-text-3);transition-property:color;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:1rem;margin-inline-start:auto}/*!@.toggle:hover .toggle-icon*/.toggle.sc-calcite-block:hover .toggle-icon.sc-calcite-block{color:var(--calcite-ui-text-1)}/*!@.container*/.container.sc-calcite-block{position:relative;display:flex;block-size:100%;flex-direction:column}/*!@.content*/.content.sc-calcite-block{position:relative;flex:1 1 0%}@keyframes in{0%{opacity:0}100%{opacity:1}}/*!@.content*/.content.sc-calcite-block{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;padding-block:var(--calcite-block-padding, 0.5rem);padding-inline:var(--calcite-block-padding, 0.625rem)}/*!@.control-container*/.control-container.sc-calcite-block{margin:0px;display:flex;grid-area:control}/*!@calcite-action-menu*/calcite-action-menu.sc-calcite-block{grid-area:menu}/*!@:host([open])*/[open].sc-calcite-block-h{margin-block:0.5rem}/*!@:host([open]) .header .title .heading*/[open].sc-calcite-block-h .header.sc-calcite-block .title.sc-calcite-block .heading.sc-calcite-block{color:var(--calcite-ui-text-1)}";
10685
10859
 
10686
10860
  /**
10687
10861
  * @slot - A slot for adding custom content.
@@ -14378,30 +14552,36 @@ function zeroArray(array, length) {
14378
14552
  var color = Color;
14379
14553
 
14380
14554
  const CSS$P = {
14555
+ channel: "channel",
14556
+ channels: "channels",
14557
+ colorField: "color-field",
14558
+ colorFieldScope: "scope--color-field",
14559
+ colorMode: "color-mode",
14560
+ colorModeContainer: "color-mode-container",
14381
14561
  container: "container",
14562
+ control: "control",
14563
+ controlAndScope: "control-and-scope",
14382
14564
  controlSection: "control-section",
14383
- hexOptions: "color-hex-options",
14384
- section: "section",
14565
+ deleteColor: "delete-color",
14385
14566
  header: "header",
14386
- control: "control",
14387
- splitSection: "section--split",
14388
- colorModeContainer: "color-mode-container",
14389
- colorMode: "color-mode",
14390
- channels: "channels",
14391
- channel: "channel",
14392
- savedColors: "saved-colors",
14393
- savedColorsSection: "saved-colors-section",
14567
+ hexAndChannelsGroup: "hex-and-channels-group",
14568
+ hexOptions: "color-hex-options",
14569
+ hueScope: "scope--hue",
14570
+ hueSlider: "hue-slider",
14571
+ opacityScope: "scope--opacity",
14572
+ opacitySlider: "opacity-slider",
14573
+ preview: "preview",
14574
+ previewAndSliders: "preview-and-sliders",
14394
14575
  saveColor: "save-color",
14395
- deleteColor: "delete-color",
14576
+ savedColor: "saved-color",
14577
+ savedColors: "saved-colors",
14396
14578
  savedColorsButtons: "saved-colors-buttons",
14397
- headerHex: "header--hex",
14398
- colorFieldAndSlider: "color-field-and-slider",
14399
- colorFieldAndSliderInteractive: "color-field-and-slider--interactive",
14400
- colorFieldAndSliderWrap: "color-field-and-slider-wrap",
14579
+ savedColorsSection: "saved-colors-section",
14401
14580
  scope: "scope",
14402
- hueScope: "scope--hue",
14403
- colorFieldScope: "scope--color-field",
14404
- savedColor: "saved-color"
14581
+ section: "section",
14582
+ slider: "slider",
14583
+ sliders: "sliders",
14584
+ splitSection: "section--split"
14405
14585
  };
14406
14586
  const DEFAULT_COLOR$1 = color("#007AC2");
14407
14587
  const DEFAULT_STORAGE_KEY_PREFIX = "calcite-color-";
@@ -14415,24 +14595,28 @@ const HSV_LIMITS = {
14415
14595
  s: 100,
14416
14596
  v: 100
14417
14597
  };
14598
+ const OPACITY_LIMITS = {
14599
+ min: 0,
14600
+ max: 100
14601
+ };
14418
14602
  const DIMENSIONS = {
14419
14603
  s: {
14420
14604
  slider: {
14421
- height: 10,
14422
- width: 160
14605
+ height: 12,
14606
+ width: 104
14423
14607
  },
14424
14608
  colorField: {
14425
14609
  height: 80,
14426
14610
  width: 160
14427
14611
  },
14428
14612
  thumb: {
14429
- radius: 8
14613
+ radius: 10
14430
14614
  }
14431
14615
  },
14432
14616
  m: {
14433
14617
  slider: {
14434
- height: 14,
14435
- width: 272
14618
+ height: 12,
14619
+ width: 204
14436
14620
  },
14437
14621
  colorField: {
14438
14622
  height: 150,
@@ -14444,15 +14628,15 @@ const DIMENSIONS = {
14444
14628
  },
14445
14629
  l: {
14446
14630
  slider: {
14447
- height: 16,
14448
- width: 464
14631
+ height: 12,
14632
+ width: 384
14449
14633
  },
14450
14634
  colorField: {
14451
14635
  height: 200,
14452
14636
  width: 464
14453
14637
  },
14454
14638
  thumb: {
14455
- radius: 12
14639
+ radius: 10
14456
14640
  }
14457
14641
  }
14458
14642
  };
@@ -14471,22 +14655,17 @@ const decimalPlaces = (value) => {
14471
14655
  (match[2] ? +match[2] : 0));
14472
14656
  };
14473
14657
 
14474
- const colorPickerCss = "@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*/.sc-calcite-color-picker: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*/.calcite-animate.sc-calcite-color-picker{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-color-picker-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-color-picker-h *.sc-calcite-color-picker,.sc-calcite-color-picker-h[disabled] .sc-calcite-color-picker-s>*{pointer-events:none}/*!@:host*/.sc-calcite-color-picker-h{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]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-color-picker-h[disabled] .sc-calcite-color-picker-s>[calcite-hydrated][disabled],[disabled].sc-calcite-color-picker-h [calcite-hydrated][disabled].sc-calcite-color-picker{opacity:1}/*!@:host([scale=s]) .container*/[scale=s].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:160px}/*!@:host([scale=s]) .saved-colors*/[scale=s].sc-calcite-color-picker-h .saved-colors.sc-calcite-color-picker{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}/*!@:host([scale=s]) .channels*/[scale=s].sc-calcite-color-picker-h .channels.sc-calcite-color-picker{flex-direction:column}/*!@:host([scale=s]) .channel*/[scale=s].sc-calcite-color-picker-h .channel.sc-calcite-color-picker{inline-size:100%;margin-block-end:4px}/*!@:host([scale=s]) .channel:last-child*/[scale=s].sc-calcite-color-picker-h .channel.sc-calcite-color-picker:last-child{margin-block-end:0}/*!@:host([scale=m]) .container*/[scale=m].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:272px}/*!@:host([scale=l]) .header*/[scale=l].sc-calcite-color-picker-h .header.sc-calcite-color-picker{padding-block-end:0px}/*!@:host([scale=l])*/[scale=l].sc-calcite-color-picker-h{font-size:var(--calcite-font-size--1);line-height:1rem}/*!@:host([scale=l]) .container*/[scale=l].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:464px}/*!@:host([scale=l]) .color-field-and-slider*/[scale=l].sc-calcite-color-picker-h .color-field-and-slider.sc-calcite-color-picker{margin-block-end:-20px}/*!@:host([scale=l]) .section*/[scale=l].sc-calcite-color-picker-h .section.sc-calcite-color-picker{padding-block:0 16px;padding-inline:16px}/*!@:host([scale=l]) .section:first-of-type*/[scale=l].sc-calcite-color-picker-h .section.sc-calcite-color-picker:first-of-type{padding-block-start:16px}/*!@:host([scale=l]) .saved-colors*/[scale=l].sc-calcite-color-picker-h .saved-colors.sc-calcite-color-picker{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}/*!@:host([scale=l]) .control-section*/[scale=l].sc-calcite-color-picker-h .control-section.sc-calcite-color-picker{flex-wrap:nowrap;align-items:baseline}/*!@:host([scale=l]) .control-section > :nth-child(2)*/[scale=l].sc-calcite-color-picker-h .control-section.sc-calcite-color-picker>.sc-calcite-color-picker:nth-child(2){margin-inline-start:12px}/*!@:host([scale=l]) .color-hex-options*/[scale=l].sc-calcite-color-picker-h .color-hex-options.sc-calcite-color-picker{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*/[scale=l].sc-calcite-color-picker-h .color-mode-container.sc-calcite-color-picker{flex-shrink:3}/*!@.container*/.container.sc-calcite-color-picker{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}/*!@.color-field-and-slider-wrap*/.color-field-and-slider-wrap.sc-calcite-color-picker{position:relative}/*!@.scope*/.scope.sc-calcite-color-picker{position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}/*!@.scope:focus*/.scope.sc-calcite-color-picker: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*/.color-field-and-slider.sc-calcite-color-picker{margin-block-end:-16px;touch-action:none}/*!@.color-field-and-slider--interactive*/.color-field-and-slider--interactive.sc-calcite-color-picker{cursor:pointer}/*!@.control-section*/.control-section.sc-calcite-color-picker{display:flex;flex-direction:row;flex-wrap:wrap}/*!@.section*/.section.sc-calcite-color-picker{padding-block:0 12px;padding-inline:12px}/*!@.section:first-of-type*/.section.sc-calcite-color-picker:first-of-type{padding-block-start:12px}/*!@.color-hex-options,\n.section--split*/.color-hex-options.sc-calcite-color-picker,.section--split.sc-calcite-color-picker{flex-grow:1}/*!@.header*/.header.sc-calcite-color-picker{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}/*!@.header--hex,\n.color-mode-container*/.header--hex.sc-calcite-color-picker,.color-mode-container.sc-calcite-color-picker{padding-block-start:12px}/*!@.channels*/.channels.sc-calcite-color-picker{display:flex;justify-content:space-between}/*!@.channel*/.channel.sc-calcite-color-picker{inline-size:31%}/*!@.saved-colors*/.saved-colors.sc-calcite-color-picker{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}/*!@.saved-colors-buttons*/.saved-colors-buttons.sc-calcite-color-picker{display:flex}/*!@.saved-color*/.saved-color.sc-calcite-color-picker{outline-offset:0;outline-color:transparent;cursor:pointer}/*!@.saved-color:focus*/.saved-color.sc-calcite-color-picker:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}/*!@.saved-color:hover*/.saved-color.sc-calcite-color-picker:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";
14658
+ const colorPickerCss = "@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*/.sc-calcite-color-picker: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*/.calcite-animate.sc-calcite-color-picker{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-color-picker-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-color-picker-h *.sc-calcite-color-picker,.sc-calcite-color-picker-h[disabled] .sc-calcite-color-picker-s>*{pointer-events:none}/*!@:host*/.sc-calcite-color-picker-h{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]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-color-picker-h[disabled] .sc-calcite-color-picker-s>[calcite-hydrated][disabled],[disabled].sc-calcite-color-picker-h [calcite-hydrated][disabled].sc-calcite-color-picker{opacity:1}/*!@:host([scale=s])*/[scale=s].sc-calcite-color-picker-h{--calcite-color-picker-spacing:8px}/*!@:host([scale=s]) .container*/[scale=s].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:160px}/*!@:host([scale=s]) .saved-colors*/[scale=s].sc-calcite-color-picker-h .saved-colors.sc-calcite-color-picker{gap:0.25rem;grid-template-columns:repeat(auto-fill, 20px)}/*!@:host([scale=m])*/[scale=m].sc-calcite-color-picker-h{--calcite-color-picker-spacing:12px}/*!@:host([scale=m]) .container*/[scale=m].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:272px}/*!@:host([scale=l])*/[scale=l].sc-calcite-color-picker-h{--calcite-color-picker-spacing:16px;font-size:var(--calcite-font-size--1);line-height:1rem}/*!@:host([scale=l]) .container*/[scale=l].sc-calcite-color-picker-h .container.sc-calcite-color-picker{inline-size:464px}/*!@:host([scale=l]) .section:first-of-type*/[scale=l].sc-calcite-color-picker-h .section.sc-calcite-color-picker:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}/*!@:host([scale=l]) .saved-colors*/[scale=l].sc-calcite-color-picker-h .saved-colors.sc-calcite-color-picker{grid-template-columns:repeat(auto-fill, 32px)}/*!@:host([scale=l]) .control-section*/[scale=l].sc-calcite-color-picker-h .control-section.sc-calcite-color-picker{flex-wrap:nowrap;align-items:baseline;flex-wrap:wrap}/*!@:host([scale=l]) .color-hex-options*/[scale=l].sc-calcite-color-picker-h .color-hex-options.sc-calcite-color-picker{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around}/*!@:host([scale=l]) .color-mode-container*/[scale=l].sc-calcite-color-picker-h .color-mode-container.sc-calcite-color-picker{flex-shrink:3}/*!@.container*/.container.sc-calcite-color-picker{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}/*!@.control-and-scope*/.control-and-scope.sc-calcite-color-picker{position:relative;display:flex;cursor:pointer;touch-action:none}/*!@.scope*/.scope.sc-calcite-color-picker{position:absolute;z-index:1;font-size:var(--calcite-font-size--1);outline-color:transparent}/*!@.scope:focus*/.scope.sc-calcite-color-picker: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}/*!@.hex-and-channels-group*/.hex-and-channels-group.sc-calcite-color-picker{inline-size:100%}/*!@.hex-and-channels-group,\n.control-section*/.hex-and-channels-group.sc-calcite-color-picker,.control-section.sc-calcite-color-picker{display:flex;flex-direction:row;flex-wrap:wrap}/*!@.section*/.section.sc-calcite-color-picker{padding-block:0 var(--calcite-color-picker-spacing);padding-inline:var(--calcite-color-picker-spacing)}/*!@.section:first-of-type*/.section.sc-calcite-color-picker:first-of-type{padding-block-start:var(--calcite-color-picker-spacing)}/*!@.sliders*/.sliders.sc-calcite-color-picker{display:flex;flex-direction:column;justify-content:space-between;margin-inline-start:var(--calcite-color-picker-spacing)}/*!@.preview-and-sliders*/.preview-and-sliders.sc-calcite-color-picker{display:flex;align-items:center;padding:var(--calcite-color-picker-spacing)}/*!@.color-hex-options,\n.section--split*/.color-hex-options.sc-calcite-color-picker,.section--split.sc-calcite-color-picker{flex-grow:1}/*!@.header*/.header.sc-calcite-color-picker{display:flex;align-items:center;justify-content:space-between;color:var(--calcite-ui-text-1)}/*!@.color-mode-container*/.color-mode-container.sc-calcite-color-picker{padding-block-start:var(--calcite-color-picker-spacing)}/*!@.channels*/.channels.sc-calcite-color-picker{display:flex;row-gap:0.125rem}/*!@.channel[data-channel-index=\"3\"]*/.channel[data-channel-index=\"3\"].sc-calcite-color-picker{inline-size:159px}/*!@:host([scale=s]) .channels*/[scale=s].sc-calcite-color-picker-h .channels.sc-calcite-color-picker{flex-wrap:wrap}/*!@:host([scale=s]) .channel*/[scale=s].sc-calcite-color-picker-h .channel.sc-calcite-color-picker{flex-basis:30%;flex-grow:1}/*!@:host([scale=s]) .channel[data-channel-index=\"3\"]*/[scale=s].sc-calcite-color-picker-h .channel[data-channel-index=\"3\"].sc-calcite-color-picker{inline-size:unset;margin-inline-start:unset}/*!@:host([scale=l]) .channel[data-channel-index=\"3\"]*/[scale=l].sc-calcite-color-picker-h .channel[data-channel-index=\"3\"].sc-calcite-color-picker{inline-size:131px}/*!@.saved-colors*/.saved-colors.sc-calcite-color-picker{display:grid;gap:0.5rem;padding-block-start:var(--calcite-color-picker-spacing);grid-template-columns:repeat(auto-fill, 24px)}/*!@.saved-colors-buttons*/.saved-colors-buttons.sc-calcite-color-picker{display:flex}/*!@.saved-color*/.saved-color.sc-calcite-color-picker{outline-offset:0;outline-color:transparent;cursor:pointer}/*!@.saved-color:focus*/.saved-color.sc-calcite-color-picker:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}/*!@.saved-color:hover*/.saved-color.sc-calcite-color-picker:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";
14475
14659
 
14476
14660
  const throttleFor60FpsInMs = 16;
14477
- const defaultValue = normalizeHex(DEFAULT_COLOR$1.hex());
14478
- const defaultFormat = "auto";
14479
14661
  class ColorPicker {
14480
14662
  constructor(hostRef) {
14481
14663
  registerInstance(this, hostRef);
14482
14664
  this.calciteColorPickerChange = createEvent(this, "calciteColorPickerChange", 6);
14483
14665
  this.calciteColorPickerInput = createEvent(this, "calciteColorPickerInput", 6);
14484
- this.colorFieldAndSliderHovered = false;
14485
- this.hueThumbState = "idle";
14486
14666
  this.internalColorUpdateContext = null;
14487
14667
  this.mode = CSSColorMode.HEX;
14488
14668
  this.shiftKeyChannelAdjustment = 0;
14489
- this.sliderThumbState = "idle";
14490
14669
  this.handleTabActivate = (event) => {
14491
14670
  this.channelMode = event.currentTarget.getAttribute("data-color-mode");
14492
14671
  this.updateChannelsFromColor(this.color);
@@ -14531,7 +14710,7 @@ class ColorPicker {
14531
14710
  this.internalColorSet(null);
14532
14711
  return;
14533
14712
  }
14534
- const normalizedHex = color$1 && normalizeHex(color$1.hex());
14713
+ const normalizedHex = color$1 && normalizeHex(hexify(color$1, alphaCompatible(this.mode)));
14535
14714
  if (hex !== normalizedHex) {
14536
14715
  this.internalColorSet(color(hex));
14537
14716
  }
@@ -14543,16 +14722,20 @@ class ColorPicker {
14543
14722
  this.handleChannelInput = (event) => {
14544
14723
  const input = event.currentTarget;
14545
14724
  const channelIndex = Number(input.getAttribute("data-channel-index"));
14546
- const limit = this.channelMode === "rgb"
14547
- ? RGB_LIMITS[Object.keys(RGB_LIMITS)[channelIndex]]
14548
- : HSV_LIMITS[Object.keys(HSV_LIMITS)[channelIndex]];
14725
+ const isAlphaChannel = channelIndex === 3;
14726
+ const limit = isAlphaChannel
14727
+ ? OPACITY_LIMITS.max
14728
+ : this.channelMode === "rgb"
14729
+ ? RGB_LIMITS[Object.keys(RGB_LIMITS)[channelIndex]]
14730
+ : HSV_LIMITS[Object.keys(HSV_LIMITS)[channelIndex]];
14549
14731
  let inputValue;
14550
14732
  if (this.allowEmpty && !input.value) {
14551
14733
  inputValue = "";
14552
14734
  }
14553
14735
  else {
14554
- const value = Number(input.value) + this.shiftKeyChannelAdjustment;
14555
- const clamped = clamp(value, 0, limit);
14736
+ const value = Number(input.value);
14737
+ const adjustedValue = value + this.shiftKeyChannelAdjustment;
14738
+ const clamped = clamp(adjustedValue, 0, limit);
14556
14739
  inputValue = clamped.toString();
14557
14740
  }
14558
14741
  input.value = inputValue;
@@ -14566,11 +14749,13 @@ class ColorPicker {
14566
14749
  const channels = [...this.channels];
14567
14750
  const shouldClearChannels = this.allowEmpty && !input.value;
14568
14751
  if (shouldClearChannels) {
14569
- this.channels = [null, null, null];
14752
+ this.channels = [null, null, null, null];
14570
14753
  this.internalColorSet(null);
14571
14754
  return;
14572
14755
  }
14573
- channels[channelIndex] = Number(input.value);
14756
+ const isAlphaChannel = channelIndex === 3;
14757
+ const value = Number(input.value);
14758
+ channels[channelIndex] = isAlphaChannel ? opacityToAlpha(value) : value;
14574
14759
  this.updateColorFromChannels(channels);
14575
14760
  };
14576
14761
  this.handleSavedColorKeyDown = (event) => {
@@ -14579,144 +14764,101 @@ class ColorPicker {
14579
14764
  this.handleSavedColorSelect(event);
14580
14765
  }
14581
14766
  };
14582
- this.handleColorFieldAndSliderPointerLeave = () => {
14583
- this.colorFieldAndSliderInteractive = false;
14584
- this.colorFieldAndSliderHovered = false;
14585
- if (this.sliderThumbState !== "drag" && this.hueThumbState !== "drag") {
14586
- this.hueThumbState = "idle";
14587
- this.sliderThumbState = "idle";
14588
- this.drawColorFieldAndSlider();
14589
- }
14590
- };
14591
- this.handleColorFieldAndSliderPointerDown = (event) => {
14767
+ this.handleColorFieldPointerDown = (event) => {
14592
14768
  if (!isPrimaryPointerButton(event)) {
14593
14769
  return;
14594
14770
  }
14595
14771
  const { offsetX, offsetY } = event;
14596
- const region = this.getCanvasRegion(offsetY);
14597
- if (region === "color-field") {
14598
- this.hueThumbState = "drag";
14599
- this.captureColorFieldColor(offsetX, offsetY);
14600
- this.colorFieldScopeNode?.focus();
14772
+ document.addEventListener("pointermove", this.globalPointerMoveHandler);
14773
+ document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14774
+ this.activeCanvasInfo = {
14775
+ context: this.colorFieldRenderingContext,
14776
+ bounds: this.colorFieldRenderingContext.canvas.getBoundingClientRect()
14777
+ };
14778
+ this.captureColorFieldColor(offsetX, offsetY);
14779
+ this.colorFieldScopeNode.focus();
14780
+ };
14781
+ this.handleHueSliderPointerDown = (event) => {
14782
+ if (!isPrimaryPointerButton(event)) {
14783
+ return;
14601
14784
  }
14602
- else if (region === "slider") {
14603
- this.sliderThumbState = "drag";
14604
- this.captureHueSliderColor(offsetX);
14605
- this.hueScopeNode?.focus();
14785
+ const { offsetX } = event;
14786
+ document.addEventListener("pointermove", this.globalPointerMoveHandler);
14787
+ document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14788
+ this.activeCanvasInfo = {
14789
+ context: this.hueSliderRenderingContext,
14790
+ bounds: this.hueSliderRenderingContext.canvas.getBoundingClientRect()
14791
+ };
14792
+ this.captureHueSliderColor(offsetX);
14793
+ this.hueScopeNode.focus();
14794
+ };
14795
+ this.handleOpacitySliderPointerDown = (event) => {
14796
+ if (!isPrimaryPointerButton(event)) {
14797
+ return;
14606
14798
  }
14799
+ const { offsetX } = event;
14607
14800
  document.addEventListener("pointermove", this.globalPointerMoveHandler);
14608
14801
  document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14609
- this.activeColorFieldAndSliderRect =
14610
- this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect();
14802
+ this.activeCanvasInfo = {
14803
+ context: this.opacitySliderRenderingContext,
14804
+ bounds: this.opacitySliderRenderingContext.canvas.getBoundingClientRect()
14805
+ };
14806
+ this.captureOpacitySliderValue(offsetX);
14807
+ this.opacityScopeNode.focus();
14611
14808
  };
14612
14809
  this.globalPointerUpHandler = (event) => {
14613
14810
  if (!isPrimaryPointerButton(event)) {
14614
14811
  return;
14615
14812
  }
14616
- const previouslyDragging = this.sliderThumbState === "drag" || this.hueThumbState === "drag";
14617
- this.hueThumbState = "idle";
14618
- this.sliderThumbState = "idle";
14619
- this.activeColorFieldAndSliderRect = null;
14620
- this.drawColorFieldAndSlider();
14813
+ const previouslyDragging = this.activeCanvasInfo;
14814
+ this.activeCanvasInfo = null;
14815
+ this.drawColorControls();
14621
14816
  if (previouslyDragging) {
14622
14817
  this.calciteColorPickerChange.emit();
14623
14818
  }
14624
14819
  };
14625
14820
  this.globalPointerMoveHandler = (event) => {
14626
- const { el, dimensions } = this;
14627
- const sliderThumbDragging = this.sliderThumbState === "drag";
14628
- const hueThumbDragging = this.hueThumbState === "drag";
14629
- if (!el.isConnected || (!sliderThumbDragging && !hueThumbDragging)) {
14821
+ const { activeCanvasInfo, el } = this;
14822
+ if (!el.isConnected || !activeCanvasInfo) {
14630
14823
  return;
14631
14824
  }
14825
+ const { context, bounds } = activeCanvasInfo;
14632
14826
  let samplingX;
14633
14827
  let samplingY;
14634
- const colorFieldAndSliderRect = this.activeColorFieldAndSliderRect;
14635
14828
  const { clientX, clientY } = event;
14636
- if (this.colorFieldAndSliderHovered) {
14637
- samplingX = clientX - colorFieldAndSliderRect.x;
14638
- samplingY = clientY - colorFieldAndSliderRect.y;
14829
+ if (context.canvas.matches(":hover")) {
14830
+ samplingX = clientX - bounds.x;
14831
+ samplingY = clientY - bounds.y;
14639
14832
  }
14640
14833
  else {
14641
- const colorFieldWidth = dimensions.colorField.width;
14642
- const colorFieldHeight = dimensions.colorField.height;
14643
- const hueSliderHeight = dimensions.slider.height;
14644
- if (clientX < colorFieldAndSliderRect.x + colorFieldWidth &&
14645
- clientX > colorFieldAndSliderRect.x) {
14646
- samplingX = clientX - colorFieldAndSliderRect.x;
14647
- }
14648
- else if (clientX < colorFieldAndSliderRect.x) {
14834
+ // snap x and y to the closest edge
14835
+ if (clientX < bounds.x + bounds.width && clientX > bounds.x) {
14836
+ samplingX = clientX - bounds.x;
14837
+ }
14838
+ else if (clientX < bounds.x) {
14649
14839
  samplingX = 0;
14650
14840
  }
14651
14841
  else {
14652
- samplingX = colorFieldWidth - 1;
14842
+ samplingX = bounds.width;
14653
14843
  }
14654
- if (clientY < colorFieldAndSliderRect.y + colorFieldHeight + hueSliderHeight &&
14655
- clientY > colorFieldAndSliderRect.y) {
14656
- samplingY = clientY - colorFieldAndSliderRect.y;
14844
+ if (clientY < bounds.y + bounds.height && clientY > bounds.y) {
14845
+ samplingY = clientY - bounds.y;
14657
14846
  }
14658
- else if (clientY < colorFieldAndSliderRect.y) {
14847
+ else if (clientY < bounds.y) {
14659
14848
  samplingY = 0;
14660
14849
  }
14661
14850
  else {
14662
- samplingY = colorFieldHeight + hueSliderHeight;
14851
+ samplingY = bounds.height;
14663
14852
  }
14664
14853
  }
14665
- if (hueThumbDragging) {
14854
+ if (context === this.colorFieldRenderingContext) {
14666
14855
  this.captureColorFieldColor(samplingX, samplingY, false);
14667
14856
  }
14668
- else {
14857
+ else if (context === this.hueSliderRenderingContext) {
14669
14858
  this.captureHueSliderColor(samplingX);
14670
14859
  }
14671
- };
14672
- this.handleColorFieldAndSliderPointerEnterOrMove = ({ offsetX, offsetY }) => {
14673
- const { dimensions: { colorField, slider, thumb } } = this;
14674
- this.colorFieldAndSliderInteractive = offsetY <= colorField.height + slider.height;
14675
- this.colorFieldAndSliderHovered = true;
14676
- const region = this.getCanvasRegion(offsetY);
14677
- if (region === "color-field") {
14678
- const prevHueThumbState = this.hueThumbState;
14679
- const color = this.baseColorFieldColor.hsv();
14680
- const centerX = Math.round(color.saturationv() / (HSV_LIMITS.s / colorField.width));
14681
- const centerY = Math.round(colorField.height - color.value() / (HSV_LIMITS.v / colorField.height));
14682
- const hoveringThumb = this.containsPoint(offsetX, offsetY, centerX, centerY, thumb.radius);
14683
- let transitionedBetweenHoverAndIdle = false;
14684
- if (prevHueThumbState === "idle" && hoveringThumb) {
14685
- this.hueThumbState = "hover";
14686
- transitionedBetweenHoverAndIdle = true;
14687
- }
14688
- else if (prevHueThumbState === "hover" && !hoveringThumb) {
14689
- this.hueThumbState = "idle";
14690
- transitionedBetweenHoverAndIdle = true;
14691
- }
14692
- if (this.hueThumbState !== "drag") {
14693
- if (transitionedBetweenHoverAndIdle) {
14694
- // refresh since we won't update color and thus no redraw
14695
- this.drawColorFieldAndSlider();
14696
- }
14697
- }
14698
- }
14699
- else if (region === "slider") {
14700
- const sliderThumbColor = this.baseColorFieldColor.hsv().saturationv(100).value(100);
14701
- const prevSliderThumbState = this.sliderThumbState;
14702
- const sliderThumbCenterX = Math.round(sliderThumbColor.hue() / (360 / slider.width));
14703
- const sliderThumbCenterY = Math.round((slider.height + this.getSliderCapSpacing()) / 2) + colorField.height;
14704
- const hoveringSliderThumb = this.containsPoint(offsetX, offsetY, sliderThumbCenterX, sliderThumbCenterY, thumb.radius);
14705
- let sliderThumbTransitionedBetweenHoverAndIdle = false;
14706
- if (prevSliderThumbState === "idle" && hoveringSliderThumb) {
14707
- this.sliderThumbState = "hover";
14708
- sliderThumbTransitionedBetweenHoverAndIdle = true;
14709
- }
14710
- else if (prevSliderThumbState === "hover" && !hoveringSliderThumb) {
14711
- this.sliderThumbState = "idle";
14712
- sliderThumbTransitionedBetweenHoverAndIdle = true;
14713
- }
14714
- if (this.sliderThumbState !== "drag") {
14715
- if (sliderThumbTransitionedBetweenHoverAndIdle) {
14716
- // refresh since we won't update color and thus no redraw
14717
- this.drawColorFieldAndSlider();
14718
- }
14719
- }
14860
+ else if (context === this.opacitySliderRenderingContext) {
14861
+ this.captureOpacitySliderValue(samplingX);
14720
14862
  }
14721
14863
  };
14722
14864
  this.storeColorFieldScope = (node) => {
@@ -14732,23 +14874,35 @@ class ColorPicker {
14732
14874
  return (hAsync("calcite-tab-title", { class: CSS$P.colorMode, "data-color-mode": channelMode, key: channelMode, onCalciteTabsActivate: this.handleTabActivate, selected: selected }, label));
14733
14875
  };
14734
14876
  this.renderChannelsTab = (channelMode) => {
14735
- const { channelMode: activeChannelMode, channels, messages } = this;
14877
+ const { allowEmpty, channelMode: activeChannelMode, channels, messages, alphaChannel } = this;
14736
14878
  const selected = channelMode === activeChannelMode;
14737
14879
  const isRgb = channelMode === "rgb";
14738
- const channelLabels = isRgb
14739
- ? [messages.r, messages.g, messages.b]
14740
- : [messages.h, messages.s, messages.v];
14741
14880
  const channelAriaLabels = isRgb
14742
14881
  ? [messages.red, messages.green, messages.blue]
14743
14882
  : [messages.hue, messages.saturation, messages.value];
14744
14883
  const direction = getElementDir(this.el);
14745
- return (hAsync("calcite-tab", { class: CSS$P.control, key: channelMode, selected: selected }, hAsync("div", { class: CSS$P.channels, dir: "ltr" }, channels.map((channel, index) =>
14746
- /* the channel container is ltr, so we apply the host's direction */
14747
- this.renderChannel(channel, index, channelLabels[index], channelAriaLabels[index], direction)))));
14884
+ const channelsToRender = alphaChannel ? channels : channels.slice(0, 3);
14885
+ return (hAsync("calcite-tab", { class: CSS$P.control, key: channelMode, selected: selected }, hAsync("div", { class: CSS$P.channels, dir: "ltr" }, channelsToRender.map((channelValue, index) => {
14886
+ const isAlphaChannel = index === 3;
14887
+ if (isAlphaChannel) {
14888
+ channelValue =
14889
+ allowEmpty && !channelValue ? channelValue : alphaToOpacity(channelValue);
14890
+ }
14891
+ /* the channel container is ltr, so we apply the host's direction */
14892
+ return this.renderChannel(channelValue, index, channelAriaLabels[index], direction, isAlphaChannel ? "%" : "");
14893
+ }))));
14894
+ };
14895
+ this.renderChannel = (value, index, ariaLabel, direction, suffix) => {
14896
+ return (hAsync("calcite-input", { class: CSS$P.channel, "data-channel-index": index, dir: direction, key: index, label: ariaLabel, lang: this.effectiveLocale, numberButtonType: "none", numberingSystem: this.numberingSystem, onCalciteInputChange: this.handleChannelChange, onCalciteInputInput: this.handleChannelInput, onKeyDown: this.handleKeyDown, scale: this.scale === "l" ? "m" : "s",
14897
+ // workaround to ensure input borders overlap as desired
14898
+ // this is because the build transforms margin-left to its
14899
+ // logical-prop, which is undesired as channels are always ltr
14900
+ style: {
14901
+ marginLeft: index > 0 && !(this.scale === "s" && this.alphaChannel && index === 3) ? "-1px" : ""
14902
+ }, suffixText: suffix, type: "number", value: value?.toString() }));
14748
14903
  };
14749
- this.renderChannel = (value, index, label, ariaLabel, direction) => (hAsync("calcite-input", { class: CSS$P.channel, "data-channel-index": index, dir: direction, label: ariaLabel, lang: this.effectiveLocale, numberButtonType: "none", numberingSystem: this.numberingSystem, onCalciteInputChange: this.handleChannelChange, onCalciteInputInput: this.handleChannelInput, onKeyDown: this.handleKeyDown, prefixText: label, scale: this.scale === "l" ? "m" : "s", type: "number", value: value?.toString() }));
14750
14904
  this.deleteColor = () => {
14751
- const colorToDelete = this.color.hex();
14905
+ const colorToDelete = hexify(this.color, this.alphaChannel);
14752
14906
  const inStorage = this.savedColors.indexOf(colorToDelete) > -1;
14753
14907
  if (!inStorage) {
14754
14908
  return;
@@ -14761,7 +14915,7 @@ class ColorPicker {
14761
14915
  }
14762
14916
  };
14763
14917
  this.saveColor = () => {
14764
- const colorToSave = this.color.hex();
14918
+ const colorToSave = hexify(this.color, this.alphaChannel);
14765
14919
  const alreadySaved = this.savedColors.indexOf(colorToSave) > -1;
14766
14920
  if (alreadySaved) {
14767
14921
  return;
@@ -14773,12 +14927,18 @@ class ColorPicker {
14773
14927
  localStorage.setItem(storageKey, JSON.stringify(savedColors));
14774
14928
  }
14775
14929
  };
14776
- this.drawColorFieldAndSlider = throttle$1(() => {
14777
- if (!this.fieldAndSliderRenderingContext) {
14778
- return;
14930
+ this.drawColorControls = throttle$1((type = "all") => {
14931
+ if ((type === "all" || type === "color-field") && this.colorFieldRenderingContext) {
14932
+ this.drawColorField();
14933
+ }
14934
+ if ((type === "all" || type === "hue-slider") && this.hueSliderRenderingContext) {
14935
+ this.drawHueSlider();
14936
+ }
14937
+ if (this.alphaChannel &&
14938
+ (type === "all" || type === "opacity-slider") &&
14939
+ this.opacitySliderRenderingContext) {
14940
+ this.drawOpacitySlider();
14779
14941
  }
14780
- this.drawColorField();
14781
- this.drawHueSlider();
14782
14942
  }, throttleFor60FpsInMs);
14783
14943
  this.captureColorFieldColor = (x, y, skipEqual = true) => {
14784
14944
  const { dimensions: { colorField: { height, width } } } = this;
@@ -14786,24 +14946,56 @@ class ColorPicker {
14786
14946
  const value = Math.round((HSV_LIMITS.v / height) * (height - y));
14787
14947
  this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(saturation).value(value), skipEqual);
14788
14948
  };
14789
- this.initColorFieldAndSlider = (canvas) => {
14790
- this.fieldAndSliderRenderingContext = canvas.getContext("2d");
14791
- this.updateCanvasSize(canvas);
14949
+ this.initColorField = (canvas) => {
14950
+ this.colorFieldRenderingContext = canvas.getContext("2d");
14951
+ this.updateCanvasSize("color-field");
14952
+ this.drawColorControls();
14953
+ };
14954
+ this.initHueSlider = (canvas) => {
14955
+ this.hueSliderRenderingContext = canvas.getContext("2d");
14956
+ this.updateCanvasSize("hue-slider");
14957
+ this.drawHueSlider();
14958
+ };
14959
+ this.initOpacitySlider = (canvas) => {
14960
+ this.opacitySliderRenderingContext = canvas.getContext("2d");
14961
+ this.updateCanvasSize("opacity-slider");
14962
+ this.drawOpacitySlider();
14963
+ };
14964
+ this.storeOpacityScope = (node) => {
14965
+ this.opacityScopeNode = node;
14966
+ };
14967
+ this.handleOpacityScopeKeyDown = (event) => {
14968
+ const modifier = event.shiftKey ? 10 : 1;
14969
+ const { key } = event;
14970
+ const arrowKeyToXOffset = {
14971
+ ArrowUp: 1,
14972
+ ArrowRight: 1,
14973
+ ArrowDown: -1,
14974
+ ArrowLeft: -1
14975
+ };
14976
+ if (arrowKeyToXOffset[key]) {
14977
+ event.preventDefault();
14978
+ const delta = opacityToAlpha(arrowKeyToXOffset[key] * modifier);
14979
+ this.captureHueSliderColor(this.opacityScopeLeft + delta);
14980
+ }
14792
14981
  };
14793
14982
  this.allowEmpty = false;
14983
+ this.alphaChannel = false;
14984
+ this.channelsDisabled = false;
14794
14985
  this.color = DEFAULT_COLOR$1;
14795
14986
  this.disabled = false;
14796
- this.format = defaultFormat;
14797
- this.hideHex = false;
14987
+ this.format = "auto";
14798
14988
  this.hideChannels = false;
14989
+ this.hexDisabled = false;
14990
+ this.hideHex = false;
14799
14991
  this.hideSaved = false;
14992
+ this.savedDisabled = false;
14800
14993
  this.scale = "m";
14801
14994
  this.storageId = undefined;
14802
14995
  this.messageOverrides = undefined;
14803
14996
  this.numberingSystem = undefined;
14804
- this.value = defaultValue;
14997
+ this.value = normalizeHex(hexify(DEFAULT_COLOR$1, this.alphaChannel));
14805
14998
  this.defaultMessages = undefined;
14806
- this.colorFieldAndSliderInteractive = false;
14807
14999
  this.channelMode = "rgb";
14808
15000
  this.channels = this.toChannels(DEFAULT_COLOR$1);
14809
15001
  this.dimensions = DIMENSIONS.m;
@@ -14812,12 +15004,19 @@ class ColorPicker {
14812
15004
  this.savedColors = [];
14813
15005
  this.colorFieldScopeTop = undefined;
14814
15006
  this.colorFieldScopeLeft = undefined;
14815
- this.scopeOrientation = undefined;
14816
15007
  this.hueScopeLeft = undefined;
14817
- this.hueScopeTop = undefined;
15008
+ this.opacityScopeLeft = undefined;
15009
+ this.scopeOrientation = undefined;
15010
+ }
15011
+ handleAlphaChannelChange(alphaChannel) {
15012
+ const { format } = this;
15013
+ if (alphaChannel && format !== "auto" && !alphaCompatible(format)) {
15014
+ console.warn(`ignoring alphaChannel as the current format (${format}) does not support alpha`);
15015
+ this.alphaChannel = false;
15016
+ }
14818
15017
  }
14819
15018
  handleColorChange(color, oldColor) {
14820
- this.drawColorFieldAndSlider();
15019
+ this.drawColorControls();
14821
15020
  this.updateChannelsFromColor(color);
14822
15021
  this.previousColor = oldColor;
14823
15022
  }
@@ -14827,7 +15026,8 @@ class ColorPicker {
14827
15026
  }
14828
15027
  handleScaleChange(scale = "m") {
14829
15028
  this.updateDimensions(scale);
14830
- this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas);
15029
+ this.updateCanvasSize("all");
15030
+ this.drawColorControls();
14831
15031
  }
14832
15032
  onMessagesChange() {
14833
15033
  /* wired up by t9n util */
@@ -14844,9 +15044,9 @@ class ColorPicker {
14844
15044
  return;
14845
15045
  }
14846
15046
  modeChanged = this.mode !== nextMode;
14847
- this.setMode(nextMode);
15047
+ this.setMode(nextMode, this.internalColorUpdateContext === null);
14848
15048
  }
14849
- const dragging = this.sliderThumbState === "drag" || this.hueThumbState === "drag";
15049
+ const dragging = this.activeCanvasInfo;
14850
15050
  if (this.internalColorUpdateContext === "initial") {
14851
15051
  return;
14852
15052
  }
@@ -14857,17 +15057,16 @@ class ColorPicker {
14857
15057
  }
14858
15058
  return;
14859
15059
  }
14860
- const color$1 = allowEmpty && !value ? null : color(value);
15060
+ const color$1 = allowEmpty && !value
15061
+ ? null
15062
+ : color(value != null && typeof value === "object" && alphaCompatible(this.mode)
15063
+ ? normalizeColor(value)
15064
+ : value);
14861
15065
  const colorChanged = !colorEqual(color$1, this.color);
14862
15066
  if (modeChanged || colorChanged) {
14863
- this.internalColorSet(color$1, true, "internal");
15067
+ this.internalColorSet(color$1, this.alphaChannel && !(this.mode.endsWith("a") || this.mode.endsWith("a-css")), "internal");
14864
15068
  }
14865
15069
  }
14866
- //--------------------------------------------------------------------------
14867
- //
14868
- // Internal State/Props
14869
- //
14870
- //--------------------------------------------------------------------------
14871
15070
  get baseColorFieldColor() {
14872
15071
  return this.color || this.previousColor || DEFAULT_COLOR$1;
14873
15072
  }
@@ -14923,7 +15122,7 @@ class ColorPicker {
14923
15122
  if (!valueIsCompatible) {
14924
15123
  this.showIncompatibleColorWarning(value, format);
14925
15124
  }
14926
- this.setMode(format);
15125
+ this.setMode(format, false);
14927
15126
  this.internalColorSet(initialColor, false, "initial");
14928
15127
  this.updateDimensions(this.scale);
14929
15128
  const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
@@ -14954,34 +15153,38 @@ class ColorPicker {
14954
15153
  //
14955
15154
  //--------------------------------------------------------------------------
14956
15155
  render() {
14957
- const { allowEmpty, color, messages, hideHex, hideChannels, hideSaved, savedColors, scale } = this;
14958
- const selectedColorInHex = color ? color.hex() : null;
14959
- const hexInputScale = scale === "l" ? "m" : "s";
14960
- const { colorFieldAndSliderInteractive, colorFieldScopeTop, colorFieldScopeLeft, hueScopeLeft, hueScopeTop, scopeOrientation, dimensions: { colorField: { height: colorFieldHeight, width: colorFieldWidth }, slider: { height: sliderHeight } } } = this;
14961
- const hueTop = hueScopeTop ?? sliderHeight / 2 + colorFieldHeight;
14962
- const hueLeft = hueScopeLeft ?? (colorFieldWidth * DEFAULT_COLOR$1.hue()) / HSV_LIMITS.h;
15156
+ const { allowEmpty, channelsDisabled, color, colorFieldScopeLeft, colorFieldScopeTop, dimensions: { colorField: { width: colorFieldWidth }, slider: { width: sliderWidth }, thumb: { radius: thumbRadius } }, hexDisabled, hideChannels, hideHex, hideSaved, hueScopeLeft, messages, alphaChannel, opacityScopeLeft, savedColors, savedDisabled, scale, scopeOrientation } = this;
15157
+ const selectedColorInHex = color ? hexify(color, alphaChannel) : null;
15158
+ const hueTop = thumbRadius;
15159
+ const hueLeft = hueScopeLeft ?? (sliderWidth * DEFAULT_COLOR$1.hue()) / HSV_LIMITS.h;
15160
+ const opacityTop = thumbRadius;
15161
+ const opacityLeft = opacityScopeLeft ??
15162
+ (colorFieldWidth * alphaToOpacity(DEFAULT_COLOR$1.alpha())) / OPACITY_LIMITS.max;
14963
15163
  const noColor = color === null;
14964
15164
  const vertical = scopeOrientation === "vertical";
14965
- return (hAsync("div", { class: CSS$P.container }, hAsync("div", { class: CSS$P.colorFieldAndSliderWrap }, hAsync("canvas", { class: {
14966
- [CSS$P.colorFieldAndSlider]: true,
14967
- [CSS$P.colorFieldAndSliderInteractive]: colorFieldAndSliderInteractive
14968
- }, onPointerDown: this.handleColorFieldAndSliderPointerDown, onPointerEnter: this.handleColorFieldAndSliderPointerEnterOrMove, onPointerLeave: this.handleColorFieldAndSliderPointerLeave, onPointerMove: this.handleColorFieldAndSliderPointerEnterOrMove,
15165
+ const noHex = hexDisabled || hideHex;
15166
+ const noChannels = channelsDisabled || hideChannels;
15167
+ const noSaved = savedDisabled || hideSaved;
15168
+ return (hAsync("div", { class: CSS$P.container }, hAsync("div", { class: CSS$P.controlAndScope }, hAsync("canvas", { class: CSS$P.colorField, onPointerDown: this.handleColorFieldPointerDown,
15169
+ // eslint-disable-next-line react/jsx-sort-props
15170
+ ref: this.initColorField }), hAsync("div", { "aria-label": vertical ? messages.value : messages.saturation, "aria-valuemax": vertical ? HSV_LIMITS.v : HSV_LIMITS.s, "aria-valuemin": "0", "aria-valuenow": (vertical ? color?.saturationv() : color?.value()) || "0", class: { [CSS$P.scope]: true, [CSS$P.colorFieldScope]: true }, onKeyDown: this.handleColorFieldScopeKeyDown, role: "slider", style: { top: `${colorFieldScopeTop || 0}px`, left: `${colorFieldScopeLeft || 0}px` }, tabindex: "0",
15171
+ // eslint-disable-next-line react/jsx-sort-props
15172
+ ref: this.storeColorFieldScope })), hAsync("div", { class: CSS$P.previewAndSliders }, hAsync("calcite-color-picker-swatch", { class: CSS$P.preview, color: selectedColorInHex, scale: "l" }), hAsync("div", { class: CSS$P.sliders }, hAsync("div", { class: CSS$P.controlAndScope }, hAsync("canvas", { class: { [CSS$P.slider]: true, [CSS$P.hueSlider]: true }, onPointerDown: this.handleHueSliderPointerDown,
14969
15173
  // eslint-disable-next-line react/jsx-sort-props
14970
- ref: this.initColorFieldAndSlider }), hAsync("div", { "aria-label": vertical ? messages.value : messages.saturation, "aria-valuemax": vertical ? HSV_LIMITS.v : HSV_LIMITS.s, "aria-valuemin": "0", "aria-valuenow": (vertical ? color?.saturationv() : color?.value()) || "0", class: { [CSS$P.scope]: true, [CSS$P.colorFieldScope]: true }, onKeyDown: this.handleColorFieldScopeKeyDown, role: "slider", style: { top: `${colorFieldScopeTop || 0}px`, left: `${colorFieldScopeLeft || 0}px` }, tabindex: "0",
15174
+ ref: this.initHueSlider }), hAsync("div", { "aria-label": messages.hue, "aria-valuemax": HSV_LIMITS.h, "aria-valuemin": "0", "aria-valuenow": color?.round().hue() || DEFAULT_COLOR$1.round().hue(), class: { [CSS$P.scope]: true, [CSS$P.hueScope]: true }, onKeyDown: this.handleHueScopeKeyDown, role: "slider", style: { top: `${hueTop}px`, left: `${hueLeft}px` }, tabindex: "0",
14971
15175
  // eslint-disable-next-line react/jsx-sort-props
14972
- ref: this.storeColorFieldScope }), hAsync("div", { "aria-label": messages.hue, "aria-valuemax": HSV_LIMITS.h, "aria-valuemin": "0", "aria-valuenow": color?.round().hue() || DEFAULT_COLOR$1.round().hue(), class: { [CSS$P.scope]: true, [CSS$P.hueScope]: true }, onKeyDown: this.handleHueScopeKeyDown, role: "slider", style: { top: `${hueTop}px`, left: `${hueLeft}px` }, tabindex: "0",
15176
+ ref: this.storeHueScope })), alphaChannel ? (hAsync("div", { class: CSS$P.controlAndScope }, hAsync("canvas", { class: { [CSS$P.slider]: true, [CSS$P.opacitySlider]: true }, onPointerDown: this.handleOpacitySliderPointerDown,
14973
15177
  // eslint-disable-next-line react/jsx-sort-props
14974
- ref: this.storeHueScope })), hideHex && hideChannels ? null : (hAsync("div", { class: {
15178
+ ref: this.initOpacitySlider }), hAsync("div", { "aria-label": messages.opacity, "aria-valuemax": OPACITY_LIMITS.max, "aria-valuemin": OPACITY_LIMITS.min, "aria-valuenow": (color || DEFAULT_COLOR$1).round().alpha(), class: { [CSS$P.scope]: true, [CSS$P.opacityScope]: true }, onKeyDown: this.handleOpacityScopeKeyDown, role: "slider", style: { top: `${opacityTop}px`, left: `${opacityLeft}px` }, tabindex: "0",
15179
+ // eslint-disable-next-line react/jsx-sort-props
15180
+ ref: this.storeOpacityScope }))) : null)), noHex && noChannels ? null : (hAsync("div", { class: {
14975
15181
  [CSS$P.controlSection]: true,
14976
15182
  [CSS$P.section]: true
14977
- } }, hideHex ? null : (hAsync("div", { class: CSS$P.hexOptions }, hAsync("span", { class: {
14978
- [CSS$P.header]: true,
14979
- [CSS$P.headerHex]: true
14980
- } }, messages.hex), hAsync("calcite-color-picker-hex-input", { allowEmpty: allowEmpty, class: CSS$P.control, hexLabel: messages.hex, numberingSystem: this.numberingSystem, onCalciteColorPickerHexInputChange: this.handleHexInputChange, scale: hexInputScale, value: selectedColorInHex }))), hideChannels ? null : (hAsync("calcite-tabs", { class: {
15183
+ } }, hAsync("div", { class: CSS$P.hexAndChannelsGroup }, noHex ? null : (hAsync("div", { class: CSS$P.hexOptions }, hAsync("calcite-color-picker-hex-input", { allowEmpty: allowEmpty, alphaChannel: alphaChannel, class: CSS$P.control, messages: messages, numberingSystem: this.numberingSystem, onCalciteColorPickerHexInputChange: this.handleHexInputChange, scale: scale, value: selectedColorInHex }))), noChannels ? null : (hAsync("calcite-tabs", { class: {
14981
15184
  [CSS$P.colorModeContainer]: true,
14982
15185
  [CSS$P.splitSection]: true
14983
- }, scale: hexInputScale }, hAsync("calcite-tab-nav", { slot: "title-group" }, this.renderChannelsTabTitle("rgb"), this.renderChannelsTabTitle("hsv")), this.renderChannelsTab("rgb"), this.renderChannelsTab("hsv"))))), hideSaved ? null : (hAsync("div", { class: { [CSS$P.savedColorsSection]: true, [CSS$P.section]: true } }, hAsync("div", { class: CSS$P.header }, hAsync("label", null, messages.saved), hAsync("div", { class: CSS$P.savedColorsButtons }, hAsync("calcite-button", { appearance: "transparent", class: CSS$P.deleteColor, disabled: noColor, iconStart: "minus", kind: "neutral", label: messages.deleteColor, onClick: this.deleteColor, scale: hexInputScale, type: "button" }), hAsync("calcite-button", { appearance: "transparent", class: CSS$P.saveColor, disabled: noColor, iconStart: "plus", kind: "neutral", label: messages.saveColor, onClick: this.saveColor, scale: hexInputScale, type: "button" }))), savedColors.length > 0 ? (hAsync("div", { class: CSS$P.savedColors }, [
14984
- ...savedColors.map((color) => (hAsync("calcite-color-picker-swatch", { active: selectedColorInHex === color, class: CSS$P.savedColor, color: color, key: color, onClick: this.handleSavedColorSelect, onKeyDown: this.handleSavedColorKeyDown, scale: scale, tabIndex: 0 })))
15186
+ }, scale: scale === "l" ? "m" : "s" }, hAsync("calcite-tab-nav", { slot: "title-group" }, this.renderChannelsTabTitle("rgb"), this.renderChannelsTabTitle("hsv")), this.renderChannelsTab("rgb"), this.renderChannelsTab("hsv")))))), noSaved ? null : (hAsync("div", { class: { [CSS$P.savedColorsSection]: true, [CSS$P.section]: true } }, hAsync("div", { class: CSS$P.header }, hAsync("label", null, messages.saved), hAsync("div", { class: CSS$P.savedColorsButtons }, hAsync("calcite-button", { appearance: "transparent", class: CSS$P.deleteColor, disabled: noColor, iconStart: "minus", kind: "neutral", label: messages.deleteColor, onClick: this.deleteColor, scale: scale, type: "button" }), hAsync("calcite-button", { appearance: "transparent", class: CSS$P.saveColor, disabled: noColor, iconStart: "plus", kind: "neutral", label: messages.saveColor, onClick: this.saveColor, scale: scale, type: "button" }))), savedColors.length > 0 ? (hAsync("div", { class: CSS$P.savedColors }, [
15187
+ ...savedColors.map((color) => (hAsync("calcite-color-picker-swatch", { class: CSS$P.savedColor, color: color, key: color, onClick: this.handleSavedColorSelect, onKeyDown: this.handleSavedColorKeyDown, scale: scale, tabIndex: 0 })))
14985
15188
  ])) : null))));
14986
15189
  }
14987
15190
  // --------------------------------------------------------------------------
@@ -14997,23 +15200,38 @@ class ColorPicker {
14997
15200
  showIncompatibleColorWarning(value, format) {
14998
15201
  console.warn(`ignoring color value (${value}) as it is not compatible with the current format (${format})`);
14999
15202
  }
15000
- setMode(format) {
15001
- this.mode = format === "auto" ? this.mode : format;
15203
+ setMode(format, warn = true) {
15204
+ const mode = format === "auto" ? this.mode : format;
15205
+ this.mode = this.ensureCompatibleMode(mode, warn);
15206
+ }
15207
+ ensureCompatibleMode(mode, warn) {
15208
+ const { alphaChannel } = this;
15209
+ const isAlphaCompatible = alphaCompatible(mode);
15210
+ if (alphaChannel && !isAlphaCompatible) {
15211
+ const alphaMode = toAlphaMode(mode);
15212
+ if (warn) {
15213
+ console.warn(`setting format to (${alphaMode}) as the provided one (${mode}) does not support alpha`);
15214
+ }
15215
+ return alphaMode;
15216
+ }
15217
+ if (!alphaChannel && isAlphaCompatible) {
15218
+ const nonAlphaMode = toNonAlphaMode(mode);
15219
+ if (warn) {
15220
+ console.warn(`setting format to (${nonAlphaMode}) as the provided one (${mode}) does not support alpha`);
15221
+ }
15222
+ return nonAlphaMode;
15223
+ }
15224
+ return mode;
15002
15225
  }
15003
15226
  captureHueSliderColor(x) {
15004
15227
  const { dimensions: { slider: { width } } } = this;
15005
15228
  const hue = (360 / width) * x;
15006
15229
  this.internalColorSet(this.baseColorFieldColor.hue(hue), false);
15007
15230
  }
15008
- getCanvasRegion(y) {
15009
- const { dimensions: { colorField: { height: colorFieldHeight }, slider: { height: sliderHeight } } } = this;
15010
- if (y <= colorFieldHeight) {
15011
- return "color-field";
15012
- }
15013
- if (y <= colorFieldHeight + sliderHeight) {
15014
- return "slider";
15015
- }
15016
- return "none";
15231
+ captureOpacitySliderValue(x) {
15232
+ const { dimensions: { slider: { width } } } = this;
15233
+ const alpha = opacityToAlpha((OPACITY_LIMITS.max / width) * x);
15234
+ this.internalColorSet(this.baseColorFieldColor.alpha(alpha), false);
15017
15235
  }
15018
15236
  internalColorSet(color, skipEqual = true, context = "user-interaction") {
15019
15237
  if (skipEqual && colorEqual(color, this.color)) {
@@ -15030,16 +15248,25 @@ class ColorPicker {
15030
15248
  }
15031
15249
  const hexMode = "hex";
15032
15250
  if (format.includes(hexMode)) {
15033
- return normalizeHex(color.round()[hexMode]());
15251
+ const hasAlpha = format === CSSColorMode.HEXA;
15252
+ return normalizeHex(hexify(color.round(), hasAlpha), hasAlpha);
15034
15253
  }
15035
15254
  if (format.includes("-css")) {
15036
- return color[format.replace("-css", "").replace("a", "")]().round().string();
15037
- }
15038
- const colorObject = color[format]().round().object();
15255
+ const value = color[format.replace("-css", "").replace("a", "")]().round().string();
15256
+ // Color omits alpha values when alpha is 1
15257
+ const needToInjectAlpha = (format.endsWith("a") || format.endsWith("a-css")) && color.alpha() === 1;
15258
+ if (needToInjectAlpha) {
15259
+ const model = value.slice(0, 3);
15260
+ const values = value.slice(4, -1);
15261
+ return `${model}a(${values}, ${color.alpha()})`;
15262
+ }
15263
+ return value;
15264
+ }
15265
+ const colorObject =
15266
+ /* Color() does not support hsva, hsla nor rgba, so we use the non-alpha mode */
15267
+ color[toNonAlphaMode(format)]().round().object();
15039
15268
  if (format.endsWith("a")) {
15040
- // normalize alpha prop
15041
- colorObject.a = colorObject.alpha;
15042
- delete colorObject.alpha;
15269
+ return normalizeAlpha(colorObject);
15043
15270
  }
15044
15271
  return colorObject;
15045
15272
  }
@@ -15051,9 +15278,14 @@ class ColorPicker {
15051
15278
  this.dimensions = DIMENSIONS[scale];
15052
15279
  }
15053
15280
  drawColorField() {
15054
- const context = this.fieldAndSliderRenderingContext;
15281
+ const context = this.colorFieldRenderingContext;
15055
15282
  const { dimensions: { colorField: { height, width } } } = this;
15056
- context.fillStyle = this.baseColorFieldColor.hsv().saturationv(100).value(100).string();
15283
+ context.fillStyle = this.baseColorFieldColor
15284
+ .hsv()
15285
+ .saturationv(100)
15286
+ .value(100)
15287
+ .alpha(1)
15288
+ .string();
15057
15289
  context.fillRect(0, 0, width, height);
15058
15290
  const whiteGradient = context.createLinearGradient(0, 0, width, 0);
15059
15291
  whiteGradient.addColorStop(0, "rgba(255,255,255,1)");
@@ -15068,6 +15300,9 @@ class ColorPicker {
15068
15300
  this.drawActiveColorFieldColor();
15069
15301
  }
15070
15302
  setCanvasContextSize(canvas, { height, width }) {
15303
+ if (!canvas) {
15304
+ return;
15305
+ }
15071
15306
  const devicePixelRatio = window.devicePixelRatio || 1;
15072
15307
  canvas.width = width * devicePixelRatio;
15073
15308
  canvas.height = height * devicePixelRatio;
@@ -15076,21 +15311,21 @@ class ColorPicker {
15076
15311
  const context = canvas.getContext("2d");
15077
15312
  context.scale(devicePixelRatio, devicePixelRatio);
15078
15313
  }
15079
- updateCanvasSize(canvas) {
15080
- if (!canvas) {
15081
- return;
15314
+ updateCanvasSize(context = "all") {
15315
+ const { dimensions } = this;
15316
+ if (context === "all" || context === "color-field") {
15317
+ this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas, dimensions.colorField);
15318
+ }
15319
+ const adjustedSliderDimensions = {
15320
+ width: dimensions.slider.width,
15321
+ height: dimensions.slider.height + (dimensions.thumb.radius - dimensions.slider.height / 2) * 2
15322
+ };
15323
+ if (context === "all" || context === "hue-slider") {
15324
+ this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas, adjustedSliderDimensions);
15325
+ }
15326
+ if (context === "all" || context === "opacity-slider") {
15327
+ this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas, adjustedSliderDimensions);
15082
15328
  }
15083
- this.setCanvasContextSize(canvas, {
15084
- width: this.dimensions.colorField.width,
15085
- height: this.dimensions.colorField.height +
15086
- this.dimensions.slider.height +
15087
- this.getSliderCapSpacing() * 2
15088
- });
15089
- this.drawColorFieldAndSlider();
15090
- }
15091
- containsPoint(testPointX, testPointY, boundsX, boundsY, boundsRadius) {
15092
- return (Math.pow(testPointX - boundsX, 2) + Math.pow(testPointY - boundsY, 2) <=
15093
- Math.pow(boundsRadius, 2));
15094
15329
  }
15095
15330
  drawActiveColorFieldColor() {
15096
15331
  const { color } = this;
@@ -15105,22 +15340,23 @@ class ColorPicker {
15105
15340
  this.colorFieldScopeLeft = x;
15106
15341
  this.colorFieldScopeTop = y;
15107
15342
  });
15108
- this.drawThumb(this.fieldAndSliderRenderingContext, radius, x, y, hsvColor, this.hueThumbState);
15343
+ this.drawThumb(this.colorFieldRenderingContext, radius, x, y, hsvColor);
15109
15344
  }
15110
- drawThumb(context, radius, x, y, color, state) {
15345
+ drawThumb(context, radius, x, y, color) {
15111
15346
  const startAngle = 0;
15112
15347
  const endAngle = 2 * Math.PI;
15348
+ const outlineWidth = 1;
15349
+ radius = radius - outlineWidth;
15113
15350
  context.beginPath();
15114
15351
  context.arc(x, y, radius, startAngle, endAngle);
15115
- context.shadowBlur = state === "hover" ? 32 : 16;
15116
- context.shadowColor = `rgba(0, 0, 0, ${state === "drag" ? 0.32 : 0.16})`;
15117
15352
  context.fillStyle = "#fff";
15118
15353
  context.fill();
15354
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15355
+ context.lineWidth = outlineWidth;
15356
+ context.stroke();
15119
15357
  context.beginPath();
15120
15358
  context.arc(x, y, radius - 3, startAngle, endAngle);
15121
- context.shadowBlur = 0;
15122
- context.shadowColor = "transparent";
15123
- context.fillStyle = color.rgb().string();
15359
+ context.fillStyle = color.rgb().alpha(1).string();
15124
15360
  context.fill();
15125
15361
  }
15126
15362
  drawActiveHueSliderColor() {
@@ -15129,18 +15365,19 @@ class ColorPicker {
15129
15365
  return;
15130
15366
  }
15131
15367
  const hsvColor = color.hsv().saturationv(100).value(100);
15132
- const { dimensions: { colorField: { height: colorFieldHeight }, slider: { height, width }, thumb: { radius } } } = this;
15368
+ const { dimensions: { slider: { height, width }, thumb: { radius } } } = this;
15133
15369
  const x = hsvColor.hue() / (360 / width);
15134
- const y = height / 2 + colorFieldHeight;
15370
+ const y = radius - height / 2 + height / 2;
15135
15371
  requestAnimationFrame(() => {
15136
15372
  this.hueScopeLeft = x;
15137
- this.hueScopeTop = y;
15138
15373
  });
15139
- this.drawThumb(this.fieldAndSliderRenderingContext, radius, x, y, hsvColor, this.sliderThumbState);
15374
+ this.drawThumb(this.hueSliderRenderingContext, radius, x, y, hsvColor);
15140
15375
  }
15141
15376
  drawHueSlider() {
15142
- const context = this.fieldAndSliderRenderingContext;
15143
- const { dimensions: { colorField: { height: colorFieldHeight }, slider: { height, width } } } = this;
15377
+ const context = this.hueSliderRenderingContext;
15378
+ const { dimensions: { slider: { height, width }, thumb: { radius: thumbRadius } } } = this;
15379
+ const x = 0;
15380
+ const y = thumbRadius - height / 2;
15144
15381
  const gradient = context.createLinearGradient(0, 0, width, 0);
15145
15382
  const hueSliderColorStopKeywords = ["red", "yellow", "lime", "cyan", "blue", "magenta", "red"];
15146
15383
  const offset = 1 / (hueSliderColorStopKeywords.length - 1);
@@ -15149,27 +15386,107 @@ class ColorPicker {
15149
15386
  gradient.addColorStop(currentOffset, color(keyword).string());
15150
15387
  currentOffset += offset;
15151
15388
  });
15389
+ context.clearRect(0, 0, width, height + this.getSliderCapSpacing() * 2);
15390
+ this.drawSliderPath(context, height, width, x, y);
15152
15391
  context.fillStyle = gradient;
15153
- context.clearRect(0, colorFieldHeight, width, height + this.getSliderCapSpacing() * 2);
15154
- context.fillRect(0, colorFieldHeight, width, height);
15392
+ context.fill();
15393
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15394
+ context.lineWidth = 1;
15395
+ context.stroke();
15155
15396
  this.drawActiveHueSliderColor();
15156
15397
  }
15398
+ drawOpacitySlider() {
15399
+ const context = this.opacitySliderRenderingContext;
15400
+ const { baseColorFieldColor: previousColor, dimensions: { slider: { height, width }, thumb: { radius: thumbRadius } } } = this;
15401
+ const x = 0;
15402
+ const y = thumbRadius - height / 2;
15403
+ context.clearRect(0, 0, width, height + this.getSliderCapSpacing() * 2);
15404
+ const gradient = context.createLinearGradient(0, y, width, 0);
15405
+ const startColor = previousColor.rgb().alpha(0);
15406
+ const midColor = previousColor.rgb().alpha(0.5);
15407
+ const endColor = previousColor.rgb().alpha(1);
15408
+ gradient.addColorStop(0, startColor.string());
15409
+ gradient.addColorStop(0.5, midColor.string());
15410
+ gradient.addColorStop(1, endColor.string());
15411
+ this.drawSliderPath(context, height, width, x, y);
15412
+ const pattern = context.createPattern(this.getCheckeredBackgroundPattern(), "repeat");
15413
+ context.fillStyle = pattern;
15414
+ context.fill();
15415
+ context.fillStyle = gradient;
15416
+ context.fill();
15417
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15418
+ context.lineWidth = 1;
15419
+ context.stroke();
15420
+ this.drawActiveOpacitySliderColor();
15421
+ }
15422
+ drawSliderPath(context, height, width, x, y) {
15423
+ const radius = height / 2 + 1;
15424
+ context.beginPath();
15425
+ context.moveTo(x + radius, y);
15426
+ context.lineTo(x + width - radius, y);
15427
+ context.quadraticCurveTo(x + width, y, x + width, y + radius);
15428
+ context.lineTo(x + width, y + height - radius);
15429
+ context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
15430
+ context.lineTo(x + radius, y + height);
15431
+ context.quadraticCurveTo(x, y + height, x, y + height - radius);
15432
+ context.lineTo(x, y + radius);
15433
+ context.quadraticCurveTo(x, y, x + radius, y);
15434
+ context.closePath();
15435
+ }
15436
+ getCheckeredBackgroundPattern() {
15437
+ if (this.checkerPattern) {
15438
+ return this.checkerPattern;
15439
+ }
15440
+ const pattern = document.createElement("canvas");
15441
+ pattern.width = 10;
15442
+ pattern.height = 10;
15443
+ const patternContext = pattern.getContext("2d");
15444
+ patternContext.fillStyle = "#ccc";
15445
+ patternContext.fillRect(0, 0, 10, 10);
15446
+ patternContext.fillStyle = "#fff";
15447
+ patternContext.fillRect(0, 0, 5, 5);
15448
+ patternContext.fillRect(5, 5, 5, 5);
15449
+ this.checkerPattern = pattern;
15450
+ return pattern;
15451
+ }
15452
+ drawActiveOpacitySliderColor() {
15453
+ const { color } = this;
15454
+ if (!color) {
15455
+ return;
15456
+ }
15457
+ const hsvColor = color;
15458
+ const { dimensions: { slider: { width }, thumb: { radius } } } = this;
15459
+ const x = alphaToOpacity(hsvColor.alpha()) / (OPACITY_LIMITS.max / width);
15460
+ const y = radius;
15461
+ requestAnimationFrame(() => {
15462
+ this.opacityScopeLeft = x;
15463
+ });
15464
+ this.drawThumb(this.opacitySliderRenderingContext, radius, x, y, hsvColor);
15465
+ }
15157
15466
  updateColorFromChannels(channels) {
15158
15467
  this.internalColorSet(color(channels, this.channelMode));
15159
15468
  }
15160
15469
  updateChannelsFromColor(color) {
15161
- this.channels = color ? this.toChannels(color) : [null, null, null];
15470
+ this.channels = color ? this.toChannels(color) : [null, null, null, null];
15162
15471
  }
15163
15472
  toChannels(color) {
15164
15473
  const { channelMode } = this;
15165
- return color[channelMode]()
15474
+ const channels = color[channelMode]()
15166
15475
  .array()
15167
- .map((value) => Math.floor(value));
15476
+ .map((value, index) => {
15477
+ const isAlpha = index === 3;
15478
+ return isAlpha ? value : Math.floor(value);
15479
+ });
15480
+ if (channels.length === 3) {
15481
+ channels.push(1); // Color omits alpha when 1
15482
+ }
15483
+ return channels;
15168
15484
  }
15169
15485
  static get delegatesFocus() { return true; }
15170
15486
  static get assetsDirs() { return ["assets"]; }
15171
15487
  get el() { return getElement(this); }
15172
15488
  static get watchers() { return {
15489
+ "alphaChannel": ["handleAlphaChannelChange"],
15173
15490
  "color": ["handleColorChange"],
15174
15491
  "format": ["handleFormatChange"],
15175
15492
  "scale": ["handleScaleChange"],
@@ -15183,12 +15500,16 @@ class ColorPicker {
15183
15500
  "$tagName$": "calcite-color-picker",
15184
15501
  "$members$": {
15185
15502
  "allowEmpty": [516, "allow-empty"],
15503
+ "alphaChannel": [4, "alpha-channel"],
15504
+ "channelsDisabled": [4, "channels-disabled"],
15186
15505
  "color": [1040],
15187
15506
  "disabled": [516],
15188
15507
  "format": [513],
15189
- "hideHex": [516, "hide-hex"],
15190
15508
  "hideChannels": [516, "hide-channels"],
15509
+ "hexDisabled": [4, "hex-disabled"],
15510
+ "hideHex": [516, "hide-hex"],
15191
15511
  "hideSaved": [516, "hide-saved"],
15512
+ "savedDisabled": [516, "saved-disabled"],
15192
15513
  "scale": [513],
15193
15514
  "storageId": [513, "storage-id"],
15194
15515
  "messageOverrides": [1040],
@@ -15196,7 +15517,6 @@ class ColorPicker {
15196
15517
  "value": [1025],
15197
15518
  "messages": [1040],
15198
15519
  "defaultMessages": [32],
15199
- "colorFieldAndSliderInteractive": [32],
15200
15520
  "channelMode": [32],
15201
15521
  "channels": [32],
15202
15522
  "dimensions": [32],
@@ -15204,56 +15524,144 @@ class ColorPicker {
15204
15524
  "savedColors": [32],
15205
15525
  "colorFieldScopeTop": [32],
15206
15526
  "colorFieldScopeLeft": [32],
15207
- "scopeOrientation": [32],
15208
15527
  "hueScopeLeft": [32],
15209
- "hueScopeTop": [32],
15528
+ "opacityScopeLeft": [32],
15529
+ "scopeOrientation": [32],
15210
15530
  "setFocus": [64]
15211
15531
  },
15212
15532
  "$listeners$": [[2, "keydown", "handleChannelKeyUpOrDown"], [2, "keyup", "handleChannelKeyUpOrDown"]],
15213
15533
  "$lazyBundleId$": "-",
15214
- "$attrsToReflect$": [["allowEmpty", "allow-empty"], ["disabled", "disabled"], ["format", "format"], ["hideHex", "hide-hex"], ["hideChannels", "hide-channels"], ["hideSaved", "hide-saved"], ["scale", "scale"], ["storageId", "storage-id"], ["numberingSystem", "numbering-system"]]
15534
+ "$attrsToReflect$": [["allowEmpty", "allow-empty"], ["disabled", "disabled"], ["format", "format"], ["hideChannels", "hide-channels"], ["hideHex", "hide-hex"], ["hideSaved", "hide-saved"], ["savedDisabled", "saved-disabled"], ["scale", "scale"], ["storageId", "storage-id"], ["numberingSystem", "numbering-system"]]
15215
15535
  }; }
15216
15536
  }
15217
15537
 
15218
15538
  const CSS$O = {
15219
15539
  container: "container",
15220
- preview: "preview",
15221
- input: "input"
15540
+ hexInput: "hex-input",
15541
+ opacityInput: "opacity-input"
15222
15542
  };
15223
15543
 
15224
- const colorPickerHexInputCss = "@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*/.sc-calcite-color-picker-hex-input: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*/.calcite-animate.sc-calcite-color-picker-hex-input{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker-hex-input{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker-hex-input{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker-hex-input{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker-hex-input{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker-hex-input:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker-hex-input:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-hex-input-h{display:none}/*!@:host*/.sc-calcite-color-picker-hex-input-h{display:block}/*!@.container*/.container.sc-calcite-color-picker-hex-input{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}/*!@.preview*/.preview.sc-calcite-color-picker-hex-input{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}/*!@.preview,\n.input*/.preview.sc-calcite-color-picker-hex-input,.input.sc-calcite-color-picker-hex-input{grid-row:1}/*!@.input*/.input.sc-calcite-color-picker-hex-input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";
15544
+ const colorPickerHexInputCss = "@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*/.sc-calcite-color-picker-hex-input: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*/.calcite-animate.sc-calcite-color-picker-hex-input{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker-hex-input{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker-hex-input{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker-hex-input{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker-hex-input{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker-hex-input:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker-hex-input:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-hex-input-h{display:none}/*!@:host*/.sc-calcite-color-picker-hex-input-h{display:block}/*!@.container*/.container.sc-calcite-color-picker-hex-input{display:flex;inline-size:100%;flex-wrap:nowrap;align-items:center}/*!@.hex-input*/.hex-input.sc-calcite-color-picker-hex-input{flex-grow:1;text-transform:uppercase}/*!@.opacity-input*/.opacity-input.sc-calcite-color-picker-hex-input{inline-size:68px;margin-inline-start:-1px}/*!@:host([scale=s]) .container*/[scale=s].sc-calcite-color-picker-hex-input-h .container.sc-calcite-color-picker-hex-input{flex-wrap:wrap;row-gap:0.125rem}/*!@:host([scale=s]) .opacity-input*/[scale=s].sc-calcite-color-picker-hex-input-h .opacity-input.sc-calcite-color-picker-hex-input{inline-size:unset;margin-inline-start:unset}/*!@:host([scale=l]) .opacity-input*/[scale=l].sc-calcite-color-picker-hex-input-h .opacity-input.sc-calcite-color-picker-hex-input{inline-size:88px}";
15225
15545
 
15226
15546
  const DEFAULT_COLOR = color();
15227
15547
  class ColorPickerHexInput {
15228
15548
  constructor(hostRef) {
15229
15549
  registerInstance(this, hostRef);
15230
15550
  this.calciteColorPickerHexInputChange = createEvent(this, "calciteColorPickerHexInputChange", 6);
15231
- this.onCalciteInternalInputBlur = () => {
15232
- const node = this.inputNode;
15551
+ this.onHexInputBlur = () => {
15552
+ const node = this.hexInputNode;
15233
15553
  const inputValue = node.value;
15234
15554
  const hex = `#${inputValue}`;
15235
- const willClearValue = this.allowEmpty && !inputValue;
15236
- if (willClearValue || (isValidHex(hex) && isLonghandHex(hex))) {
15555
+ const { allowEmpty, internalColor } = this;
15556
+ const willClearValue = allowEmpty && !inputValue;
15557
+ const isLonghand = isLonghandHex(hex);
15558
+ if (willClearValue || (isValidHex(hex) && isLonghand)) {
15237
15559
  return;
15238
15560
  }
15239
15561
  // manipulating DOM directly since rerender doesn't update input value
15240
15562
  node.value =
15241
- this.allowEmpty && !this.internalColor
15563
+ allowEmpty && !internalColor
15242
15564
  ? ""
15243
- : this.formatForInternalInput(rgbToHex(this.internalColor.object()));
15565
+ : this.formatHexForInternalInput(rgbToHex(
15566
+ // always display hex input in RRGGBB format
15567
+ internalColor.object()));
15244
15568
  };
15245
- this.onInputChange = () => {
15246
- this.internalSetValue(this.inputNode.value, this.value);
15569
+ this.onOpacityInputBlur = () => {
15570
+ const node = this.opacityInputNode;
15571
+ const inputValue = node.value;
15572
+ const { allowEmpty, internalColor } = this;
15573
+ const willClearValue = allowEmpty && !inputValue;
15574
+ if (willClearValue) {
15575
+ return;
15576
+ }
15577
+ // manipulating DOM directly since rerender doesn't update input value
15578
+ node.value =
15579
+ allowEmpty && !internalColor ? "" : this.formatOpacityForInternalInput(internalColor);
15580
+ };
15581
+ this.onHexInputChange = () => {
15582
+ const nodeValue = this.hexInputNode.value;
15583
+ let value = nodeValue;
15584
+ if (value) {
15585
+ const normalized = normalizeHex(value, false);
15586
+ const preserveExistingAlpha = isValidHex(normalized) && this.alphaChannel;
15587
+ if (preserveExistingAlpha && this.internalColor) {
15588
+ const alphaHex = normalizeHex(this.internalColor.hexa(), true).slice(-2);
15589
+ value = `${normalized + alphaHex}`;
15590
+ }
15591
+ }
15592
+ this.internalSetValue(value, this.value);
15593
+ };
15594
+ this.onOpacityInputChange = () => {
15595
+ const node = this.opacityInputNode;
15596
+ let value;
15597
+ if (!node.value) {
15598
+ value = node.value;
15599
+ }
15600
+ else {
15601
+ const alpha = opacityToAlpha(Number(node.value));
15602
+ value = this.internalColor?.alpha(alpha).hexa();
15603
+ }
15604
+ this.internalSetValue(value, this.value);
15605
+ };
15606
+ this.onInputKeyDown = (event) => {
15607
+ const { altKey, ctrlKey, metaKey, shiftKey } = event;
15608
+ const { alphaChannel, hexInputNode, internalColor, value } = this;
15609
+ const { key } = event;
15610
+ const composedPath = event.composedPath();
15611
+ if (key === "Tab" || key === "Enter") {
15612
+ if (composedPath.includes(hexInputNode)) {
15613
+ this.onHexInputChange();
15614
+ }
15615
+ else {
15616
+ this.onOpacityInputChange();
15617
+ }
15618
+ if (key === "Enter") {
15619
+ event.preventDefault();
15620
+ }
15621
+ return;
15622
+ }
15623
+ const isNudgeKey = key === "ArrowDown" || key === "ArrowUp";
15624
+ const oldValue = this.value;
15625
+ if (isNudgeKey) {
15626
+ if (!value) {
15627
+ this.internalSetValue(this.previousNonNullValue, oldValue);
15628
+ event.preventDefault();
15629
+ return;
15630
+ }
15631
+ const direction = key === "ArrowUp" ? 1 : -1;
15632
+ const bump = shiftKey ? 10 : 1;
15633
+ this.internalSetValue(hexify(this.nudgeRGBChannels(internalColor, bump * direction, composedPath.includes(hexInputNode) ? "rgb" : "a"), alphaChannel), oldValue);
15634
+ event.preventDefault();
15635
+ return;
15636
+ }
15637
+ const withModifiers = altKey || ctrlKey || metaKey;
15638
+ const singleChar = key.length === 1;
15639
+ const validHexChar = hexChar.test(key);
15640
+ if (singleChar && !withModifiers && !validHexChar) {
15641
+ event.preventDefault();
15642
+ }
15643
+ };
15644
+ this.onHexInputPaste = (event) => {
15645
+ const hex = event.clipboardData.getData("text");
15646
+ if (isValidHex(hex)) {
15647
+ event.preventDefault();
15648
+ this.hexInputNode.value = hex.slice(1);
15649
+ }
15247
15650
  };
15248
15651
  this.previousNonNullValue = this.value;
15249
- this.storeInputRef = (node) => {
15250
- this.inputNode = node;
15652
+ this.storeHexInputRef = (node) => {
15653
+ this.hexInputNode = node;
15654
+ };
15655
+ this.storeOpacityInputRef = (node) => {
15656
+ this.opacityInputNode = node;
15251
15657
  };
15252
- this.hexLabel = "Hex";
15253
15658
  this.allowEmpty = false;
15254
- this.scale = "m";
15255
- this.value = normalizeHex(DEFAULT_COLOR.hex());
15659
+ this.alphaChannel = false;
15660
+ this.hexLabel = "Hex";
15661
+ this.messages = undefined;
15256
15662
  this.numberingSystem = undefined;
15663
+ this.scale = "m";
15664
+ this.value = normalizeHex(hexify(DEFAULT_COLOR, this.alphaChannel), this.alphaChannel, true);
15257
15665
  this.internalColor = DEFAULT_COLOR;
15258
15666
  }
15259
15667
  //--------------------------------------------------------------------------
@@ -15262,10 +15670,10 @@ class ColorPickerHexInput {
15262
15670
  //
15263
15671
  //--------------------------------------------------------------------------
15264
15672
  connectedCallback() {
15265
- const { allowEmpty, value } = this;
15673
+ const { allowEmpty, alphaChannel, value } = this;
15266
15674
  if (value) {
15267
- const normalized = normalizeHex(value);
15268
- if (isValidHex(normalized)) {
15675
+ const normalized = normalizeHex(value, alphaChannel);
15676
+ if (isValidHex(normalized, alphaChannel)) {
15269
15677
  this.internalSetValue(normalized, normalized, false);
15270
15678
  }
15271
15679
  return;
@@ -15283,54 +15691,21 @@ class ColorPickerHexInput {
15283
15691
  handleValueChange(value, oldValue) {
15284
15692
  this.internalSetValue(value, oldValue, false);
15285
15693
  }
15286
- // using @Listen as a workaround for VDOM listener not firing
15287
- onInputKeyDown(event) {
15288
- const { altKey, ctrlKey, metaKey, shiftKey } = event;
15289
- const { internalColor, value } = this;
15290
- const { key } = event;
15291
- if (key === "Tab" || key === "Enter") {
15292
- this.onInputChange();
15293
- return;
15294
- }
15295
- const isNudgeKey = key === "ArrowDown" || key === "ArrowUp";
15296
- const oldValue = this.value;
15297
- if (isNudgeKey) {
15298
- if (!value) {
15299
- this.internalSetValue(this.previousNonNullValue, oldValue);
15300
- event.preventDefault();
15301
- return;
15302
- }
15303
- const direction = key === "ArrowUp" ? 1 : -1;
15304
- const bump = shiftKey ? 10 : 1;
15305
- this.internalSetValue(normalizeHex(this.nudgeRGBChannels(internalColor, bump * direction).hex()), oldValue);
15306
- event.preventDefault();
15307
- return;
15308
- }
15309
- const withModifiers = altKey || ctrlKey || metaKey;
15310
- const singleChar = key.length === 1;
15311
- const validHexChar = hexChar.test(key);
15312
- if (singleChar && !withModifiers && !validHexChar) {
15313
- event.preventDefault();
15314
- }
15315
- }
15316
- onPaste(event) {
15317
- const hex = event.clipboardData.getData("text");
15318
- if (isValidHex(hex)) {
15319
- event.preventDefault();
15320
- this.inputNode.value = hex.slice(1);
15321
- }
15322
- }
15323
15694
  //--------------------------------------------------------------------------
15324
15695
  //
15325
15696
  // Lifecycle
15326
15697
  //
15327
15698
  //--------------------------------------------------------------------------
15328
15699
  render() {
15329
- const { value } = this;
15330
- const hexInputValue = this.formatForInternalInput(value);
15331
- return (hAsync("div", { class: CSS$O.container }, hAsync("calcite-input", { class: CSS$O.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: hexInputValue,
15700
+ const { alphaChannel, hexLabel, internalColor, messages, scale, value } = this;
15701
+ const hexInputValue = this.formatHexForInternalInput(value);
15702
+ const opacityInputValue = this.formatOpacityForInternalInput(internalColor);
15703
+ const inputScale = scale === "l" ? "m" : "s";
15704
+ return (hAsync("div", { class: CSS$O.container }, hAsync("calcite-input", { class: CSS$O.hexInput, label: messages?.hex || hexLabel, maxLength: 6, numberingSystem: this.numberingSystem, onCalciteInputChange: this.onHexInputChange, onCalciteInternalInputBlur: this.onHexInputBlur, onKeyDown: this.onInputKeyDown, onPaste: this.onHexInputPaste, prefixText: "#", scale: inputScale, value: hexInputValue,
15705
+ // eslint-disable-next-line react/jsx-sort-props
15706
+ ref: this.storeHexInputRef }), alphaChannel ? (hAsync("calcite-input-number", { class: CSS$O.opacityInput, key: "opacity-input", label: messages?.opacity, max: OPACITY_LIMITS.max, maxLength: 3, min: OPACITY_LIMITS.min, numberButtonType: "none", numberingSystem: this.numberingSystem, onCalciteInputNumberChange: this.onOpacityInputChange, onCalciteInternalInputNumberBlur: this.onOpacityInputBlur, onKeyDown: this.onInputKeyDown, scale: inputScale, suffixText: "%", value: opacityInputValue,
15332
15707
  // eslint-disable-next-line react/jsx-sort-props
15333
- ref: this.storeInputRef }), hexInputValue ? (hAsync("calcite-color-picker-swatch", { active: true, class: CSS$O.preview, color: `#${hexInputValue}`, scale: this.scale })) : null));
15708
+ ref: this.storeOpacityInputRef })) : null));
15334
15709
  }
15335
15710
  //--------------------------------------------------------------------------
15336
15711
  //
@@ -15340,7 +15715,7 @@ class ColorPickerHexInput {
15340
15715
  /** Sets focus on the component. */
15341
15716
  async setFocus() {
15342
15717
  await componentLoaded(this);
15343
- focusElement(this.inputNode);
15718
+ focusElement(this.hexInputNode);
15344
15719
  }
15345
15720
  //--------------------------------------------------------------------------
15346
15721
  //
@@ -15349,13 +15724,17 @@ class ColorPickerHexInput {
15349
15724
  //--------------------------------------------------------------------------
15350
15725
  internalSetValue(value, oldValue, emit = true) {
15351
15726
  if (value) {
15352
- const normalized = normalizeHex(value);
15353
- if (isValidHex(normalized)) {
15354
- const { internalColor } = this;
15355
- const changed = !internalColor || normalized !== normalizeHex(internalColor.hex());
15356
- this.internalColor = color(normalized);
15357
- this.previousNonNullValue = normalized;
15358
- this.value = normalized;
15727
+ const { alphaChannel } = this;
15728
+ const normalized = normalizeHex(value, alphaChannel, alphaChannel);
15729
+ if (isValidHex(normalized, alphaChannel)) {
15730
+ const { internalColor: currentColor } = this;
15731
+ const nextColor = color(normalized);
15732
+ const normalizedLonghand = normalizeHex(hexify(nextColor, alphaChannel), alphaChannel);
15733
+ const changed = !currentColor ||
15734
+ normalizedLonghand !== normalizeHex(hexify(currentColor, alphaChannel), alphaChannel);
15735
+ this.internalColor = nextColor;
15736
+ this.previousNonNullValue = normalizedLonghand;
15737
+ this.value = normalizedLonghand;
15359
15738
  if (changed && emit) {
15360
15739
  this.calciteColorPickerHexInputChange.emit();
15361
15740
  }
@@ -15372,16 +15751,28 @@ class ColorPickerHexInput {
15372
15751
  }
15373
15752
  this.value = oldValue;
15374
15753
  }
15375
- formatForInternalInput(hex) {
15376
- return hex ? hex.replace("#", "") : "";
15377
- }
15378
- nudgeRGBChannels(color$1, amount) {
15379
- return color.rgb(color$1.array().map((channel) => channel + amount));
15380
- }
15381
- handleKeyDown(event) {
15382
- if (event.key === "Enter") {
15383
- event.preventDefault();
15754
+ formatHexForInternalInput(hex) {
15755
+ return hex ? hex.replace("#", "").slice(0, 6) : "";
15756
+ }
15757
+ formatOpacityForInternalInput(color) {
15758
+ return color ? `${alphaToOpacity(color.alpha())}` : "";
15759
+ }
15760
+ nudgeRGBChannels(color$1, amount, context) {
15761
+ let nudgedChannels;
15762
+ const channels = color$1.array();
15763
+ const rgbChannels = channels.slice(0, 3);
15764
+ if (context === "rgb") {
15765
+ const nudgedRGBChannels = rgbChannels.map((channel) => channel + amount);
15766
+ nudgedChannels = [
15767
+ ...nudgedRGBChannels,
15768
+ this.alphaChannel ? channels[3] : undefined
15769
+ ];
15770
+ }
15771
+ else {
15772
+ const nudgedAlpha = opacityToAlpha(alphaToOpacity(color$1.alpha()) + amount);
15773
+ nudgedChannels = [...rgbChannels, nudgedAlpha];
15384
15774
  }
15775
+ return color(nudgedChannels);
15385
15776
  }
15386
15777
  get el() { return getElement(this); }
15387
15778
  static get watchers() { return {
@@ -15392,15 +15783,17 @@ class ColorPickerHexInput {
15392
15783
  "$flags$": 9,
15393
15784
  "$tagName$": "calcite-color-picker-hex-input",
15394
15785
  "$members$": {
15395
- "hexLabel": [1, "hex-label"],
15396
15786
  "allowEmpty": [4, "allow-empty"],
15787
+ "alphaChannel": [4, "alpha-channel"],
15788
+ "hexLabel": [1, "hex-label"],
15789
+ "messages": [16],
15790
+ "numberingSystem": [1, "numbering-system"],
15397
15791
  "scale": [513],
15398
15792
  "value": [1537],
15399
- "numberingSystem": [1, "numbering-system"],
15400
15793
  "internalColor": [32],
15401
15794
  "setFocus": [64]
15402
15795
  },
15403
- "$listeners$": [[2, "keydown", "onInputKeyDown"]],
15796
+ "$listeners$": undefined,
15404
15797
  "$lazyBundleId$": "-",
15405
15798
  "$attrsToReflect$": [["scale", "scale"], ["value", "value"]]
15406
15799
  }; }
@@ -15408,14 +15801,20 @@ class ColorPickerHexInput {
15408
15801
 
15409
15802
  const CSS$N = {
15410
15803
  swatch: "swatch",
15411
- noColorIcon: "no-color-icon"
15804
+ noColorSwatch: "swatch--no-color",
15805
+ checker: "checker"
15412
15806
  };
15413
15807
  const COLORS = {
15414
15808
  borderLight: "rgba(0, 0, 0, 0.3)",
15415
15809
  borderDark: "rgba(255, 255, 255, 0.15)"
15416
15810
  };
15811
+ const checkerSquareSize = 4;
15812
+ const CHECKER_DIMENSIONS = {
15813
+ squareSize: checkerSquareSize,
15814
+ size: checkerSquareSize * 2
15815
+ };
15417
15816
 
15418
- const colorPickerSwatchCss = "@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*/.sc-calcite-color-picker-swatch: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*/.calcite-animate.sc-calcite-color-picker-swatch{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker-swatch{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker-swatch{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker-swatch{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker-swatch{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker-swatch:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker-swatch:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-swatch-h{display:none}/*!@:host*/.sc-calcite-color-picker-swatch-h{position:relative;display:inline-flex}/*!@:host([scale=s])*/[scale=s].sc-calcite-color-picker-swatch-h{block-size:1.25rem;inline-size:1.25rem}/*!@:host([scale=m])*/[scale=m].sc-calcite-color-picker-swatch-h{block-size:1.5rem;inline-size:1.5rem}/*!@:host([scale=l])*/[scale=l].sc-calcite-color-picker-swatch-h{block-size:2rem;inline-size:2rem}/*!@.swatch*/.swatch.sc-calcite-color-picker-swatch{overflow:visible;block-size:inherit;inline-size:inherit}/*!@.swatch rect*/.swatch.sc-calcite-color-picker-swatch rect.sc-calcite-color-picker-swatch{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}/*!@.no-color-icon*/.no-color-icon.sc-calcite-color-picker-swatch{position:absolute;inset:0px;block-size:100%;inline-size:100%}";
15817
+ const colorPickerSwatchCss = "@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*/.sc-calcite-color-picker-swatch: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*/.calcite-animate.sc-calcite-color-picker-swatch{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-color-picker-swatch{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-color-picker-swatch{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-color-picker-swatch{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-color-picker-swatch{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-color-picker-swatch:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-color-picker-swatch:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-color-picker-swatch-h{display:none}/*!@:host*/.sc-calcite-color-picker-swatch-h{position:relative;display:inline-flex}/*!@:host([scale=s])*/[scale=s].sc-calcite-color-picker-swatch-h{block-size:1.25rem;inline-size:1.25rem}/*!@:host([scale=m])*/[scale=m].sc-calcite-color-picker-swatch-h{block-size:1.5rem;inline-size:1.5rem}/*!@:host([scale=l])*/[scale=l].sc-calcite-color-picker-swatch-h{block-size:2rem;inline-size:2rem}/*!@.swatch*/.swatch.sc-calcite-color-picker-swatch{overflow:hidden;block-size:inherit;inline-size:inherit}/*!@.swatch rect*/.swatch.sc-calcite-color-picker-swatch rect.sc-calcite-color-picker-swatch{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}/*!@.swatch--no-color rect*/.swatch--no-color.sc-calcite-color-picker-swatch rect.sc-calcite-color-picker-swatch{fill:var(--calcite-ui-foreground-1)}/*!@.swatch--no-color line*/.swatch--no-color.sc-calcite-color-picker-swatch line.sc-calcite-color-picker-swatch{stroke:var(--calcite-ui-danger)}/*!@.checker*/.checker.sc-calcite-color-picker-swatch{fill:#cacaca}";
15419
15818
 
15420
15819
  class ColorPickerSwatch {
15421
15820
  constructor(hostRef) {
@@ -15425,7 +15824,7 @@ class ColorPickerSwatch {
15425
15824
  this.scale = "m";
15426
15825
  }
15427
15826
  handleColorChange(color$1) {
15428
- this.internalColor = color(color$1);
15827
+ this.internalColor = color$1 ? color(color$1) : null;
15429
15828
  }
15430
15829
  //--------------------------------------------------------------------------
15431
15830
  //
@@ -15436,12 +15835,38 @@ class ColorPickerSwatch {
15436
15835
  this.handleColorChange(this.color);
15437
15836
  }
15438
15837
  render() {
15838
+ const isEmpty = !this.internalColor;
15839
+ const classes = {
15840
+ [CSS$N.swatch]: true,
15841
+ [CSS$N.noColorSwatch]: isEmpty
15842
+ };
15843
+ return (hAsync("svg", { class: classes, xmlns: "http://www.w3.org/2000/svg" }, this.renderSwatch()));
15844
+ }
15845
+ renderSwatch() {
15439
15846
  const { active, el, internalColor } = this;
15440
15847
  const borderRadius = active ? "100%" : "0";
15441
- const hex = internalColor.hex();
15442
15848
  const theme = getModeName(el);
15443
15849
  const borderColor = theme === "light" ? COLORS.borderLight : COLORS.borderDark;
15444
- return (hAsync("svg", { class: CSS$N.swatch, xmlns: "http://www.w3.org/2000/svg" }, hAsync("title", null, hex), hAsync("rect", { fill: hex, height: "100%", id: "swatch", rx: borderRadius, stroke: borderColor, "stroke-width": "2", style: { "clip-path": `inset(0 round ${borderRadius})` }, width: "100%" })));
15850
+ const commonSwatchProps = {
15851
+ height: "100%",
15852
+ rx: borderRadius,
15853
+ stroke: borderColor,
15854
+ // stroke-width and clip-path are needed to hide overflowing portion of stroke
15855
+ // see https://stackoverflow.com/a/7273346/194216
15856
+ // using attribute to work around Stencil using the prop name vs the attribute when rendering
15857
+ ["stroke-width"]: "2",
15858
+ width: "100%"
15859
+ };
15860
+ const isEmpty = !internalColor;
15861
+ if (isEmpty) {
15862
+ return (hAsync(Fragment, null, hAsync("clipPath", { id: "shape" }, hAsync("rect", { height: "100%", rx: borderRadius, width: "100%" })), hAsync("rect", { "clip-path": `inset(0 round ${borderRadius})`, rx: borderRadius, ...commonSwatchProps }), hAsync("line", { "clip-path": "url(#shape)", "stroke-width": "3", x1: "100%", x2: "0", y1: "0", y2: "100%" })));
15863
+ }
15864
+ const alpha = internalColor.alpha();
15865
+ const hex = hexify(internalColor);
15866
+ const hexa = hexify(internalColor, alpha < 1);
15867
+ return (hAsync(Fragment, null, hAsync("title", null, hexa), hAsync("defs", null, hAsync("pattern", { height: CHECKER_DIMENSIONS.size, id: "checker", patternUnits: "userSpaceOnUse", width: CHECKER_DIMENSIONS.size, x: "0", y: "0" }, hAsync("rect", { class: CSS$N.checker, height: CHECKER_DIMENSIONS.squareSize, width: CHECKER_DIMENSIONS.squareSize, x: "0", y: "0" }), hAsync("rect", { class: CSS$N.checker, height: CHECKER_DIMENSIONS.squareSize, width: CHECKER_DIMENSIONS.squareSize, x: CHECKER_DIMENSIONS.squareSize, y: CHECKER_DIMENSIONS.squareSize }))), hAsync("rect", { fill: "url(#checker)", height: "100%", rx: borderRadius, width: "100%" }), hAsync("rect", { fill: hex, style: {
15868
+ "clip-path": alpha < 1 ? "polygon(100% 0, 0 0, 0 100%)" : `inset(0 round ${borderRadius})`
15869
+ }, ...commonSwatchProps }), alpha < 1 ? (hAsync("rect", { fill: hexa, key: "opacity-fill", style: { "clip-path": "polygon(100% 0, 100% 100%, 0 100%)" }, ...commonSwatchProps })) : null));
15445
15870
  }
15446
15871
  get el() { return getElement(this); }
15447
15872
  static get watchers() { return {
@@ -15776,7 +16201,8 @@ const arrow = options => ({
15776
16201
  y,
15777
16202
  placement,
15778
16203
  rects,
15779
- platform
16204
+ platform,
16205
+ elements
15780
16206
  } = state;
15781
16207
  if (element == null) {
15782
16208
  return {};
@@ -15789,14 +16215,18 @@ const arrow = options => ({
15789
16215
  const axis = getMainAxisFromPlacement(placement);
15790
16216
  const length = getLengthFromAxis(axis);
15791
16217
  const arrowDimensions = await platform.getDimensions(element);
15792
- const minProp = axis === 'y' ? 'top' : 'left';
15793
- const maxProp = axis === 'y' ? 'bottom' : 'right';
16218
+ const isYAxis = axis === 'y';
16219
+ const minProp = isYAxis ? 'top' : 'left';
16220
+ const maxProp = isYAxis ? 'bottom' : 'right';
16221
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
15794
16222
  const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
15795
16223
  const startDiff = coords[axis] - rects.reference[axis];
15796
16224
  const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
15797
- let clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
15798
- if (clientSize === 0) {
15799
- clientSize = rects.floating[length];
16225
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
16226
+
16227
+ // DOM platform can return `window` as the `offsetParent`.
16228
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
16229
+ clientSize = elements.floating[clientProp] || rects.floating[length];
15800
16230
  }
15801
16231
  const centerToReference = endDiff / 2 - startDiff / 2;
15802
16232
 
@@ -16337,28 +16767,9 @@ function getComputedStyle$1(element) {
16337
16767
  return getWindow(element).getComputedStyle(element);
16338
16768
  }
16339
16769
 
16340
- const min = Math.min;
16341
- const max = Math.max;
16342
- const round = Math.round;
16343
-
16344
- function getCssDimensions(element) {
16345
- const css = getComputedStyle$1(element);
16346
- let width = parseFloat(css.width);
16347
- let height = parseFloat(css.height);
16348
- const offsetWidth = element.offsetWidth;
16349
- const offsetHeight = element.offsetHeight;
16350
- const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
16351
- if (shouldFallback) {
16352
- width = offsetWidth;
16353
- height = offsetHeight;
16354
- }
16355
- return {
16356
- width,
16357
- height,
16358
- fallback: shouldFallback
16359
- };
16770
+ function isNode(value) {
16771
+ return value instanceof getWindow(value).Node;
16360
16772
  }
16361
-
16362
16773
  function getNodeName(node) {
16363
16774
  return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
16364
16775
  }
@@ -16382,9 +16793,6 @@ function isHTMLElement(value) {
16382
16793
  function isElement(value) {
16383
16794
  return value instanceof getWindow(value).Element;
16384
16795
  }
16385
- function isNode(value) {
16386
- return value instanceof getWindow(value).Node;
16387
- }
16388
16796
  function isShadowRoot(node) {
16389
16797
  // Browsers without `ShadowRoot` support.
16390
16798
  if (typeof ShadowRoot === 'undefined') {
@@ -16441,6 +16849,29 @@ function isLastTraversableNode(node) {
16441
16849
  return ['html', 'body', '#document'].includes(getNodeName(node));
16442
16850
  }
16443
16851
 
16852
+ const min = Math.min;
16853
+ const max = Math.max;
16854
+ const round = Math.round;
16855
+
16856
+ function getCssDimensions(element) {
16857
+ const css = getComputedStyle$1(element);
16858
+ let width = parseFloat(css.width);
16859
+ let height = parseFloat(css.height);
16860
+ const hasOffset = isHTMLElement(element);
16861
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
16862
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
16863
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
16864
+ if (shouldFallback) {
16865
+ width = offsetWidth;
16866
+ height = offsetHeight;
16867
+ }
16868
+ return {
16869
+ width,
16870
+ height,
16871
+ fallback: shouldFallback
16872
+ };
16873
+ }
16874
+
16444
16875
  function unwrapElement(element) {
16445
16876
  return !isElement(element) ? element.contextElement : element;
16446
16877
  }
@@ -16522,16 +16953,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
16522
16953
  currentIFrame = getWindow(currentIFrame).frameElement;
16523
16954
  }
16524
16955
  }
16525
- return {
16956
+ return rectToClientRect({
16526
16957
  width,
16527
16958
  height,
16528
- top: y,
16529
- right: x + width,
16530
- bottom: y + height,
16531
- left: x,
16532
16959
  x,
16533
16960
  y
16534
- };
16961
+ });
16535
16962
  }
16536
16963
 
16537
16964
  function getDocumentElement(node) {
@@ -16730,6 +17157,13 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
16730
17157
  }
16731
17158
  return rectToClientRect(rect);
16732
17159
  }
17160
+ function hasFixedPositionAncestor(element, stopNode) {
17161
+ const parentNode = getParentNode(element);
17162
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
17163
+ return false;
17164
+ }
17165
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
17166
+ }
16733
17167
 
16734
17168
  // A "clipping ancestor" is an `overflow` element with the characteristic of
16735
17169
  // clipping (or hiding) child elements. This returns all clipping ancestors
@@ -16747,19 +17181,17 @@ function getClippingElementAncestors(element, cache) {
16747
17181
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
16748
17182
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
16749
17183
  const computedStyle = getComputedStyle$1(currentNode);
16750
- const containingBlock = isContainingBlock(currentNode);
16751
- const shouldIgnoreCurrentNode = computedStyle.position === 'fixed';
16752
- if (shouldIgnoreCurrentNode) {
17184
+ const currentNodeIsContaining = isContainingBlock(currentNode);
17185
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
16753
17186
  currentContainingBlockComputedStyle = null;
17187
+ }
17188
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
17189
+ if (shouldDropCurrentNode) {
17190
+ // Drop non-containing blocks.
17191
+ result = result.filter(ancestor => ancestor !== currentNode);
16754
17192
  } else {
16755
- const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position);
16756
- if (shouldDropCurrentNode) {
16757
- // Drop non-containing blocks.
16758
- result = result.filter(ancestor => ancestor !== currentNode);
16759
- } else {
16760
- // Record last containing block for next iteration.
16761
- currentContainingBlockComputedStyle = computedStyle;
16762
- }
17193
+ // Record last containing block for next iteration.
17194
+ currentContainingBlockComputedStyle = computedStyle;
16763
17195
  }
16764
17196
  currentNode = getParentNode(currentNode);
16765
17197
  }
@@ -16796,10 +17228,7 @@ function getClippingRect(_ref) {
16796
17228
  }
16797
17229
 
16798
17230
  function getDimensions(element) {
16799
- if (isHTMLElement(element)) {
16800
- return getCssDimensions(element);
16801
- }
16802
- return element.getBoundingClientRect();
17231
+ return getCssDimensions(element);
16803
17232
  }
16804
17233
 
16805
17234
  function getTrueOffsetParent(element, polyfill) {
@@ -16827,6 +17256,9 @@ function getContainingBlock(element) {
16827
17256
  // such as table ancestors and cross browser bugs.
16828
17257
  function getOffsetParent(element, polyfill) {
16829
17258
  const window = getWindow(element);
17259
+ if (!isHTMLElement(element)) {
17260
+ return window;
17261
+ }
16830
17262
  let offsetParent = getTrueOffsetParent(element, polyfill);
16831
17263
  while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
16832
17264
  offsetParent = getTrueOffsetParent(offsetParent, polyfill);
@@ -20698,6 +21130,7 @@ const ICONS$8 = {
20698
21130
  backRight: "chevron-right"
20699
21131
  };
20700
21132
  const SLOTS$j = {
21133
+ actionBar: "action-bar",
20701
21134
  headerActionsStart: "header-actions-start",
20702
21135
  headerActionsEnd: "header-actions-end",
20703
21136
  headerMenuActions: "header-menu-actions",
@@ -20707,16 +21140,17 @@ const SLOTS$j = {
20707
21140
  footerActions: "footer-actions"
20708
21141
  };
20709
21142
 
20710
- const flowItemCss = "@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*/.sc-calcite-flow-item: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*/.calcite-animate.sc-calcite-flow-item{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-flow-item{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-flow-item{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-flow-item{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-flow-item{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-flow-item:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-flow-item-h{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 **/.sc-calcite-flow-item-h *.sc-calcite-flow-item{box-sizing:border-box}/*!@:root*/.sc-calcite-flow-item:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-flow-item-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-flow-item-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-flow-item-h *.sc-calcite-flow-item,.sc-calcite-flow-item-h[disabled] .sc-calcite-flow-item-s>*{pointer-events:none}/*!@:host*/.sc-calcite-flow-item-h{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-flow-item-h[disabled] .sc-calcite-flow-item-s>[calcite-hydrated][disabled],[disabled].sc-calcite-flow-item-h [calcite-hydrated][disabled].sc-calcite-flow-item{opacity:1}/*!@.back-button*/.back-button.sc-calcite-flow-item{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}";
21143
+ const flowItemCss = "@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*/.sc-calcite-flow-item: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*/.calcite-animate.sc-calcite-flow-item{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-flow-item{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-flow-item{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-flow-item{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-flow-item{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-flow-item:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-flow-item-h{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 **/.sc-calcite-flow-item-h *.sc-calcite-flow-item{box-sizing:border-box}/*!@:root*/.sc-calcite-flow-item:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-flow-item-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-flow-item-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-flow-item-h *.sc-calcite-flow-item,.sc-calcite-flow-item-h[disabled] .sc-calcite-flow-item-s>*{pointer-events:none}/*!@:host*/.sc-calcite-flow-item-h{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-flow-item-footer-padding:0.5rem}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-flow-item-h[disabled] .sc-calcite-flow-item-s>[calcite-hydrated][disabled],[disabled].sc-calcite-flow-item-h [calcite-hydrated][disabled].sc-calcite-flow-item{opacity:1}/*!@.back-button*/.back-button.sc-calcite-flow-item{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}/*!@calcite-panel*/calcite-panel.sc-calcite-flow-item{--calcite-panel-footer-padding:var(--calcite-flow-item-footer-padding)}";
20711
21144
 
20712
21145
  /**
20713
21146
  * @slot - A slot for adding custom content.
21147
+ * @slot action-bar - A slot for adding a `calcite-action-bar` to the component.
20714
21148
  * @slot header-actions-start - A slot for adding `calcite-action`s or content to the start side of the component's header.
20715
21149
  * @slot header-actions-end - A slot for adding `calcite-action`s or content to the end side of the component's header.
20716
21150
  * @slot header-content - A slot for adding custom content to the component's header.
20717
21151
  * @slot header-menu-actions - A slot for adding an overflow menu with `calcite-action`s inside a `calcite-dropdown`.
20718
21152
  * @slot fab - A slot for adding a `calcite-fab` (floating action button) to perform an action.
20719
- * @slot footer-actions - A slot for adding `calcite-button`s to the component's footer.
21153
+ * @slot footer-actions - [Deprecated] A slot for adding `calcite-button`s to the component's footer.
20720
21154
  * @slot footer - A slot for adding custom content to the component's footer.
20721
21155
  */
20722
21156
  class FlowItem {
@@ -20843,7 +21277,7 @@ class FlowItem {
20843
21277
  const label = messages.back;
20844
21278
  return (hAsync(Host, null, hAsync("calcite-panel", { closable: closable, closed: closed, description: description, disabled: disabled, heading: heading, headingLevel: headingLevel, loading: loading, menuOpen: menuOpen, messageOverrides: messages, onCalcitePanelClose: this.handlePanelClose, onCalcitePanelScroll: this.handlePanelScroll,
20845
21279
  // eslint-disable-next-line react/jsx-sort-props
20846
- ref: this.setContainerRef }, this.renderBackButton(), hAsync("slot", { name: SLOTS$j.headerActionsStart, slot: SLOTS$k.headerActionsStart }), hAsync("slot", { name: SLOTS$j.headerActionsEnd, slot: SLOTS$k.headerActionsEnd }), hAsync("slot", { name: SLOTS$j.headerContent, slot: SLOTS$k.headerContent }), hAsync("slot", { name: SLOTS$j.headerMenuActions, slot: SLOTS$k.headerMenuActions }), hAsync("slot", { name: SLOTS$j.fab, slot: SLOTS$k.fab }), hAsync("slot", { name: SLOTS$j.footerActions, slot: SLOTS$k.footerActions }), hAsync("slot", { name: SLOTS$j.footer, slot: SLOTS$k.footer }), hAsync("slot", null)), backButtonEl ? (hAsync("calcite-tooltip", { label: label, overlayPositioning: "fixed", placement: "top", referenceElement: backButtonEl }, label)) : null));
21280
+ ref: this.setContainerRef }, this.renderBackButton(), hAsync("slot", { name: SLOTS$j.actionBar, slot: SLOTS$k.actionBar }), hAsync("slot", { name: SLOTS$j.headerActionsStart, slot: SLOTS$k.headerActionsStart }), hAsync("slot", { name: SLOTS$j.headerActionsEnd, slot: SLOTS$k.headerActionsEnd }), hAsync("slot", { name: SLOTS$j.headerContent, slot: SLOTS$k.headerContent }), hAsync("slot", { name: SLOTS$j.headerMenuActions, slot: SLOTS$k.headerMenuActions }), hAsync("slot", { name: SLOTS$j.fab, slot: SLOTS$k.fab }), hAsync("slot", { name: SLOTS$j.footerActions, slot: SLOTS$k.footerActions }), hAsync("slot", { name: SLOTS$j.footer, slot: SLOTS$k.footer }), hAsync("slot", null)), backButtonEl ? (hAsync("calcite-tooltip", { label: label, overlayPositioning: "fixed", placement: "top", referenceElement: backButtonEl }, label)) : null));
20847
21281
  }
20848
21282
  static get assetsDirs() { return ["assets"]; }
20849
21283
  get el() { return getElement(this); }
@@ -25491,7 +25925,7 @@ const CSS$s = {
25491
25925
  tableContainer: "table-container",
25492
25926
  sticky: "sticky-pos"
25493
25927
  };
25494
- const debounceTimeout = 100;
25928
+ const debounceTimeout = 0;
25495
25929
 
25496
25930
  const listCss = "@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*/.sc-calcite-list: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*/.calcite-animate.sc-calcite-list{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-list{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-list{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-list{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-list{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-list:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-list:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-list-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-list-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-list-h *.sc-calcite-list,.sc-calcite-list-h[disabled] .sc-calcite-list-s>*{pointer-events:none}/*!@:host*/.sc-calcite-list-h{display:block}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-list-h[disabled] .sc-calcite-list-s>[calcite-hydrated][disabled],[disabled].sc-calcite-list-h [calcite-hydrated][disabled].sc-calcite-list{opacity:1}/*!@.container*/.container.sc-calcite-list{position:relative}/*!@.table-container*/.table-container.sc-calcite-list{position:relative;z-index:1;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}/*!@.table-container **/.table-container.sc-calcite-list *.sc-calcite-list{box-sizing:border-box}/*!@.table*/.table.sc-calcite-list{inline-size:100%}/*!@::slotted(calcite-list-item)*/.sc-calcite-list-s>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)*/.sc-calcite-list-s>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*/.sticky-pos.sc-calcite-list{position:sticky;inset-block-start:0px;z-index:300}/*!@calcite-filter*/calcite-filter.sc-calcite-list{margin-block-end:1px}";
25497
25931
 
@@ -25504,6 +25938,7 @@ const listItemSelector = "calcite-list-item";
25504
25938
  class List$1 {
25505
25939
  constructor(hostRef) {
25506
25940
  registerInstance(this, hostRef);
25941
+ this.calciteListChange = createEvent(this, "calciteListChange", 6);
25507
25942
  this.calciteListFilter = createEvent(this, "calciteListFilter", 6);
25508
25943
  this.listItems = [];
25509
25944
  this.enabledListItems = [];
@@ -25524,10 +25959,13 @@ class List$1 {
25524
25959
  }
25525
25960
  }
25526
25961
  };
25527
- this.updateSelectedItems = debounce(() => {
25962
+ this.updateSelectedItems = (emit = false) => {
25528
25963
  this.selectedItems = this.enabledListItems.filter((item) => item.selected);
25529
- }, debounceTimeout);
25530
- this.updateFilteredItems = debounce(() => {
25964
+ if (emit) {
25965
+ this.calciteListChange.emit();
25966
+ }
25967
+ };
25968
+ this.updateFilteredItems = (emit = false) => {
25531
25969
  const { listItems, filteredData, filterText } = this;
25532
25970
  const values = filteredData.map((item) => item.value);
25533
25971
  const groups = new Set();
@@ -25541,7 +25979,6 @@ class List$1 {
25541
25979
  item.hidden = !matches;
25542
25980
  return matches;
25543
25981
  }) || [];
25544
- this.filteredItems = filteredItems;
25545
25982
  groups.forEach((group) => {
25546
25983
  const hasAtLeastOneMatch = filteredItems.some((item) => group.contains(item));
25547
25984
  group.hidden = !hasAtLeastOneMatch;
@@ -25557,14 +25994,17 @@ class List$1 {
25557
25994
  }
25558
25995
  });
25559
25996
  groups.clear();
25560
- });
25997
+ this.filteredItems = filteredItems;
25998
+ if (emit) {
25999
+ this.calciteListFilter.emit();
26000
+ }
26001
+ };
25561
26002
  this.handleFilter = (event) => {
25562
26003
  event.stopPropagation();
25563
26004
  const { filteredItems, value } = event.currentTarget;
25564
26005
  this.filteredData = filteredItems;
25565
26006
  this.filterText = value;
25566
- this.updateFilteredItems();
25567
- this.calciteListFilter.emit();
26007
+ this.updateListItems(true);
25568
26008
  };
25569
26009
  this.getItemData = () => {
25570
26010
  return this.listItems.map((item) => ({
@@ -25574,6 +26014,23 @@ class List$1 {
25574
26014
  value: item.value
25575
26015
  }));
25576
26016
  };
26017
+ this.updateListItems = debounce((emit = false) => {
26018
+ const { selectionAppearance, selectionMode } = this;
26019
+ const items = this.queryListItems();
26020
+ items.forEach((item) => {
26021
+ item.selectionAppearance = selectionAppearance;
26022
+ item.selectionMode = selectionMode;
26023
+ });
26024
+ this.listItems = items;
26025
+ if (this.filterEnabled) {
26026
+ this.dataForFilter = this.getItemData();
26027
+ this.filterEl.items = this.dataForFilter;
26028
+ }
26029
+ this.updateFilteredItems(emit);
26030
+ this.enabledListItems = items.filter((item) => !item.disabled && !item.closed);
26031
+ this.setActiveListItem();
26032
+ this.updateSelectedItems(emit);
26033
+ }, debounceTimeout);
25577
26034
  this.queryListItems = () => {
25578
26035
  return Array.from(this.el.querySelectorAll(listItemSelector));
25579
26036
  };
@@ -25654,14 +26111,17 @@ class List$1 {
25654
26111
  this.focusRow(enabledListItems[prevIndex]);
25655
26112
  }
25656
26113
  }
25657
- handleCalciteListItemActive(event) {
26114
+ handleCalciteInternalListItemActive(event) {
25658
26115
  const target = event.target;
25659
26116
  const { listItems } = this;
25660
26117
  listItems.forEach((listItem) => {
25661
26118
  listItem.active = listItem === target;
25662
26119
  });
25663
26120
  }
25664
- handleCalciteListItemSelect(event) {
26121
+ handleCalciteListItemSelect() {
26122
+ this.updateSelectedItems(true);
26123
+ }
26124
+ handleCalciteInternalListItemSelect(event) {
25665
26125
  const target = event.target;
25666
26126
  const { listItems, selectionMode } = this;
25667
26127
  listItems.forEach((listItem) => {
@@ -25672,7 +26132,7 @@ class List$1 {
25672
26132
  this.updateSelectedItems();
25673
26133
  }
25674
26134
  handleCalciteListItemClose() {
25675
- this.updateListItems();
26135
+ this.updateListItems(true);
25676
26136
  }
25677
26137
  //--------------------------------------------------------------------------
25678
26138
  //
@@ -25699,7 +26159,7 @@ class List$1 {
25699
26159
  if (filteredItems) {
25700
26160
  this.filteredData = filteredItems;
25701
26161
  }
25702
- this.updateFilteredItems();
26162
+ this.updateListItems();
25703
26163
  }
25704
26164
  // --------------------------------------------------------------------------
25705
26165
  //
@@ -25722,22 +26182,6 @@ class List$1 {
25722
26182
  // eslint-disable-next-line react/jsx-sort-props
25723
26183
  ref: (el) => (this.filterEl = el) }))))) : null, hAsync("tbody", { class: CSS$s.tableContainer }, hAsync("slot", { onSlotchange: this.handleDefaultSlotChange })))));
25724
26184
  }
25725
- updateListItems() {
25726
- const { selectionAppearance, selectionMode } = this;
25727
- const items = this.queryListItems();
25728
- items.forEach((item) => {
25729
- item.selectionAppearance = selectionAppearance;
25730
- item.selectionMode = selectionMode;
25731
- });
25732
- this.listItems = items;
25733
- this.enabledListItems = items.filter((item) => !item.disabled && !item.closed);
25734
- if (this.filterEnabled) {
25735
- this.dataForFilter = this.getItemData();
25736
- }
25737
- this.setActiveListItem();
25738
- this.updateSelectedItems();
25739
- this.updateFilteredItems();
25740
- }
25741
26185
  get el() { return getElement(this); }
25742
26186
  static get watchers() { return {
25743
26187
  "filterEnabled": ["handleFilterEnabledChange"],
@@ -25764,7 +26208,7 @@ class List$1 {
25764
26208
  "dataForFilter": [32],
25765
26209
  "setFocus": [64]
25766
26210
  },
25767
- "$listeners$": [[0, "calciteInternalFocusPreviousItem", "handleCalciteInternalFocusPreviousItem"], [0, "calciteInternalListItemActive", "handleCalciteListItemActive"], [0, "calciteInternalListItemSelect", "handleCalciteListItemSelect"], [0, "calciteListItemClose", "handleCalciteListItemClose"]],
26211
+ "$listeners$": [[0, "calciteInternalFocusPreviousItem", "handleCalciteInternalFocusPreviousItem"], [0, "calciteInternalListItemActive", "handleCalciteInternalListItemActive"], [0, "calciteListItemSelect", "handleCalciteListItemSelect"], [0, "calciteInternalListItemSelect", "handleCalciteInternalListItemSelect"], [0, "calciteListItemClose", "handleCalciteListItemClose"]],
25768
26212
  "$lazyBundleId$": "-",
25769
26213
  "$attrsToReflect$": [["disabled", "disabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["filterText", "filter-text"], ["loading", "loading"], ["selectionMode", "selection-mode"], ["selectionAppearance", "selection-appearance"]]
25770
26214
  }; }
@@ -27139,7 +27583,7 @@ class Pagination {
27139
27583
  }; }
27140
27584
  }
27141
27585
 
27142
- const panelCss = "@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*/.sc-calcite-panel: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*/.calcite-animate.sc-calcite-panel{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-panel{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-panel{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-panel{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-panel{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-panel:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-panel-h{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 **/.sc-calcite-panel-h *.sc-calcite-panel{box-sizing:border-box}/*!@:root*/.sc-calcite-panel:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-panel-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-panel-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-panel-h *.sc-calcite-panel,.sc-calcite-panel-h[disabled] .sc-calcite-panel-s>*{pointer-events:none}/*!@:host*/.sc-calcite-panel-h{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height:calc(var(--calcite-icon-size) * 3)}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-panel-h[disabled] .sc-calcite-panel-s>[calcite-hydrated][disabled],[disabled].sc-calcite-panel-h [calcite-hydrated][disabled].sc-calcite-panel{opacity:1}/*!@.header*/.header.sc-calcite-panel{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-panel{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-panel .heading.sc-calcite-panel{flex:1 1 auto;padding:0.5rem}/*!@.container*/.container.sc-calcite-panel{margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;background-color:var(--calcite-ui-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing)}/*!@.container[hidden]*/.container[hidden].sc-calcite-panel{display:none}/*!@.header*/.header.sc-calcite-panel{border-block-end:1px solid;z-index:400;inline-size:100%;align-items:stretch;justify-content:flex-start;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3);flex:0 0 auto}/*!@.action-bar-container*/.action-bar-container.sc-calcite-panel{border-block-end:1px solid;z-index:400;inline-size:100%;border-block-end-color:var(--calcite-ui-border-3)}/*!@.action-bar-container ::slotted(calcite-action-bar)*/.action-bar-container .sc-calcite-panel-s>calcite-action-bar{inline-size:100%}/*!@.header-content*/.header-content.sc-calcite-panel{display:flex;flex-direction:column;overflow:hidden;padding-inline:0.75rem;padding-block:0.875rem;margin-inline-end:auto}/*!@.header-content .heading,\n.header-content .description*/.header-content.sc-calcite-panel .heading.sc-calcite-panel,.header-content.sc-calcite-panel .description.sc-calcite-panel{display:block;overflow-wrap:break-word;padding:0px}/*!@.header-content .heading*/.header-content.sc-calcite-panel .heading.sc-calcite-panel{margin-inline:0px;margin-block:0px 0.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-medium)}/*!@.header-content .heading:only-child*/.header-content.sc-calcite-panel .heading.sc-calcite-panel:only-child{margin-block-end:0px}/*!@.header-content .description*/.header-content.sc-calcite-panel .description.sc-calcite-panel{font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}/*!@.back-button*/.back-button.sc-calcite-panel{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}/*!@.header-actions*/.header-actions.sc-calcite-panel{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}/*!@.header-actions--end*/.header-actions--end.sc-calcite-panel{margin-inline-start:auto}/*!@.content-wrapper*/.content-wrapper.sc-calcite-panel{overflow:auto}/*!@.content-height*/.content-height.sc-calcite-panel{block-size:100%}/*!@.content-container*/.content-container.sc-calcite-panel{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;background-color:var(--calcite-ui-background)}/*!@.footer*/.footer.sc-calcite-panel{border-block-start:1px solid;display:flex;inline-size:100%;justify-content:space-evenly;background-color:var(--calcite-ui-foreground-1);border-block-start-color:var(--calcite-ui-border-3);flex:0 0 auto;min-block-size:3rem;padding:0.5rem}/*!@.fab-container*/.fab-container.sc-calcite-panel{position:sticky;inset-block-end:0px;z-index:300;margin-block:0px;margin-inline:auto;display:block;padding:0.5rem;inset-inline:0;inline-size:-moz-fit-content;inline-size:fit-content}/*!@[hidden]*/[hidden].sc-calcite-panel{display:none}";
27586
+ const panelCss = "@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*/.sc-calcite-panel: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*/.calcite-animate.sc-calcite-panel{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-panel{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-panel{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-panel{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-panel{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-panel:root{--calcite-internal-duration-factor:0.01}}/*!@:host*/.sc-calcite-panel-h{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 **/.sc-calcite-panel-h *.sc-calcite-panel{box-sizing:border-box}/*!@:root*/.sc-calcite-panel:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-panel-h{display:none}/*!@:host([disabled])*/[disabled].sc-calcite-panel-h{cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}/*!@:host([disabled]) *,\n:host([disabled]) ::slotted(*)*/[disabled].sc-calcite-panel-h *.sc-calcite-panel,.sc-calcite-panel-h[disabled] .sc-calcite-panel-s>*{pointer-events:none}/*!@:host*/.sc-calcite-panel-h{position:relative;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height:calc(var(--calcite-icon-size) * 3);--calcite-panel-footer-padding:0.5rem}/*!@:host([disabled]) ::slotted([calcite-hydrated][disabled]),\n:host([disabled]) [calcite-hydrated][disabled]*/.sc-calcite-panel-h[disabled] .sc-calcite-panel-s>[calcite-hydrated][disabled],[disabled].sc-calcite-panel-h [calcite-hydrated][disabled].sc-calcite-panel{opacity:1}/*!@.header*/.header.sc-calcite-panel{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}/*!@.heading*/.heading.sc-calcite-panel{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}/*!@.header .heading*/.header.sc-calcite-panel .heading.sc-calcite-panel{flex:1 1 auto;padding:0.5rem}/*!@.container*/.container.sc-calcite-panel{margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;background-color:var(--calcite-ui-background);padding:0px;transition:max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing)}/*!@.container[hidden]*/.container[hidden].sc-calcite-panel{display:none}/*!@.header*/.header.sc-calcite-panel{border-block-end:1px solid;z-index:400;inline-size:100%;align-items:stretch;justify-content:flex-start;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3);flex:0 0 auto}/*!@.action-bar-container*/.action-bar-container.sc-calcite-panel{border-block-end:1px solid;z-index:400;inline-size:100%;border-block-end-color:var(--calcite-ui-border-3)}/*!@.action-bar-container ::slotted(calcite-action-bar)*/.action-bar-container .sc-calcite-panel-s>calcite-action-bar{inline-size:100%}/*!@.header-content*/.header-content.sc-calcite-panel{display:flex;flex-direction:column;overflow:hidden;padding-inline:0.75rem;padding-block:0.875rem;margin-inline-end:auto}/*!@.header-content .heading,\n.header-content .description*/.header-content.sc-calcite-panel .heading.sc-calcite-panel,.header-content.sc-calcite-panel .description.sc-calcite-panel{display:block;overflow-wrap:break-word;padding:0px}/*!@.header-content .heading*/.header-content.sc-calcite-panel .heading.sc-calcite-panel{margin-inline:0px;margin-block:0px 0.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-medium)}/*!@.header-content .heading:only-child*/.header-content.sc-calcite-panel .heading.sc-calcite-panel:only-child{margin-block-end:0px}/*!@.header-content .description*/.header-content.sc-calcite-panel .description.sc-calcite-panel{font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}/*!@.back-button*/.back-button.sc-calcite-panel{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}/*!@.header-actions*/.header-actions.sc-calcite-panel{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}/*!@.header-actions--end*/.header-actions--end.sc-calcite-panel{margin-inline-start:auto}/*!@.content-wrapper*/.content-wrapper.sc-calcite-panel{overflow:auto}/*!@.content-height*/.content-height.sc-calcite-panel{block-size:100%}/*!@.content-container*/.content-container.sc-calcite-panel{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;background-color:var(--calcite-ui-background)}/*!@.footer*/.footer.sc-calcite-panel{border-block-start:1px solid;display:flex;inline-size:100%;justify-content:space-evenly;background-color:var(--calcite-ui-foreground-1);border-block-start-color:var(--calcite-ui-border-3);flex:0 0 auto;padding:var(--calcite-panel-footer-padding)}/*!@.fab-container*/.fab-container.sc-calcite-panel{position:sticky;inset-block-end:0px;z-index:300;margin-block:0px;margin-inline:auto;display:block;padding:0.5rem;inset-inline:0;inline-size:-moz-fit-content;inline-size:fit-content}/*!@[hidden]*/[hidden].sc-calcite-panel{display:none}";
27143
27587
 
27144
27588
  /**
27145
27589
  * @slot - A slot for adding custom content.
@@ -27149,7 +27593,7 @@ const panelCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{
27149
27593
  * @slot header-content - A slot for adding custom content to the header.
27150
27594
  * @slot header-menu-actions - A slot for adding an overflow menu with actions inside a `calcite-dropdown`.
27151
27595
  * @slot fab - A slot for adding a `calcite-fab` (floating action button) to perform an action.
27152
- * @slot footer-actions - A slot for adding buttons to the footer.
27596
+ * @slot footer-actions - [Deprecated] A slot for adding buttons to the footer.
27153
27597
  * @slot footer - A slot for adding custom content to the footer.
27154
27598
  */
27155
27599
  class Panel {
@@ -30123,9 +30567,6 @@ class ShellCenterRow {
30123
30567
  const { el } = this;
30124
30568
  const contentNode = (hAsync("div", { class: CSS$d.content }, hAsync("slot", null)));
30125
30569
  const actionBar = getSlotted(el, SLOTS$7.actionBar);
30126
- if (actionBar) {
30127
- actionBar.layout = "horizontal";
30128
- }
30129
30570
  const actionBarNode = actionBar ? (hAsync("div", { class: CSS$d.actionBarContainer, key: "action-bar" }, hAsync("slot", { name: SLOTS$7.actionBar }))) : null;
30130
30571
  const children = [actionBarNode, contentNode];
30131
30572
  if (actionBar?.position === "end") {
@@ -37579,6 +38020,9 @@ class TooltipManager {
37579
38020
  // --------------------------------------------------------------------------
37580
38021
  this.registeredElements = new WeakMap();
37581
38022
  this.hoverTimeout = null;
38023
+ this.hoveredTooltip = null;
38024
+ this.clickedTooltip = null;
38025
+ this.activeTooltip = null;
37582
38026
  this.registeredElementCount = 0;
37583
38027
  // --------------------------------------------------------------------------
37584
38028
  //
@@ -37592,36 +38036,38 @@ class TooltipManager {
37592
38036
  };
37593
38037
  this.keyDownHandler = (event) => {
37594
38038
  if (event.key === "Escape" && !event.defaultPrevented) {
37595
- const { activeTooltipEl } = this;
37596
- if (activeTooltipEl && activeTooltipEl.open) {
38039
+ const { activeTooltip } = this;
38040
+ if (activeTooltip?.open) {
37597
38041
  this.clearHoverTimeout();
37598
- this.toggleTooltip(activeTooltipEl, false);
37599
- const referenceElement = getEffectiveReferenceElement(activeTooltipEl);
38042
+ this.closeExistingTooltip();
38043
+ const referenceElement = getEffectiveReferenceElement(activeTooltip);
37600
38044
  if (referenceElement instanceof Element && referenceElement.contains(event.target)) {
37601
38045
  event.preventDefault();
37602
38046
  }
37603
38047
  }
37604
38048
  }
37605
38049
  };
37606
- this.queryHoveredTooltip = (composedPath) => {
37607
- const { activeTooltipEl } = this;
37608
- if (activeTooltipEl && composedPath.includes(activeTooltipEl)) {
38050
+ this.pointerMoveHandler = (event) => {
38051
+ const composedPath = event.composedPath();
38052
+ const { activeTooltip } = this;
38053
+ const hoveringActiveTooltip = activeTooltip?.open && composedPath.includes(activeTooltip);
38054
+ if (hoveringActiveTooltip) {
37609
38055
  this.clearHoverTimeout();
37610
38056
  return;
37611
38057
  }
37612
38058
  const tooltip = this.queryTooltip(composedPath);
38059
+ this.hoveredTooltip = tooltip;
38060
+ if (this.isClosableClickedTooltip(tooltip)) {
38061
+ return;
38062
+ }
38063
+ this.clickedTooltip = null;
37613
38064
  if (tooltip) {
37614
38065
  this.toggleHoveredTooltip(tooltip, true);
37615
38066
  }
37616
- else if (activeTooltipEl) {
37617
- this.toggleHoveredTooltip(activeTooltipEl, false);
38067
+ else if (activeTooltip) {
38068
+ this.toggleHoveredTooltip(activeTooltip, false);
37618
38069
  }
37619
38070
  };
37620
- this.pointerMoveHandler = (event) => {
37621
- const composedPath = event.composedPath();
37622
- this.clearHoverTimeout();
37623
- this.hoverTimeout = window.setTimeout(() => this.queryHoveredTooltip(composedPath), TOOLTIP_DELAY_MS );
37624
- };
37625
38071
  this.pointerDownHandler = (event) => {
37626
38072
  if (!isPrimaryPointerButton(event)) {
37627
38073
  return;
@@ -37640,10 +38086,16 @@ class TooltipManager {
37640
38086
  this.queryFocusedTooltip(event, false);
37641
38087
  };
37642
38088
  this.toggleHoveredTooltip = (tooltip, value) => {
37643
- if (value) {
38089
+ this.hoverTimeout = window.setTimeout(() => {
38090
+ if (this.hoverTimeout === null) {
38091
+ return;
38092
+ }
37644
38093
  this.closeExistingTooltip();
37645
- }
37646
- this.toggleTooltip(tooltip, value);
38094
+ if (tooltip !== this.hoveredTooltip) {
38095
+ return;
38096
+ }
38097
+ this.toggleTooltip(tooltip, value);
38098
+ }, TOOLTIP_DELAY_MS);
37647
38099
  };
37648
38100
  }
37649
38101
  // --------------------------------------------------------------------------
@@ -37682,11 +38134,12 @@ class TooltipManager {
37682
38134
  }
37683
38135
  clearHoverTimeout() {
37684
38136
  window.clearTimeout(this.hoverTimeout);
38137
+ this.hoverTimeout = null;
37685
38138
  }
37686
38139
  closeExistingTooltip() {
37687
- const { activeTooltipEl } = this;
37688
- if (activeTooltipEl) {
37689
- this.toggleTooltip(activeTooltipEl, false);
38140
+ const { activeTooltip } = this;
38141
+ if (activeTooltip?.open) {
38142
+ this.toggleTooltip(activeTooltip, false);
37690
38143
  }
37691
38144
  }
37692
38145
  toggleFocusedTooltip(tooltip, value) {
@@ -37699,17 +38152,19 @@ class TooltipManager {
37699
38152
  toggleTooltip(tooltip, value) {
37700
38153
  tooltip.open = value;
37701
38154
  if (value) {
37702
- this.activeTooltipEl = tooltip;
38155
+ this.activeTooltip = tooltip;
37703
38156
  }
37704
38157
  }
37705
38158
  queryFocusedTooltip(event, value) {
37706
38159
  const tooltip = this.queryTooltip(event.composedPath());
37707
- if (!tooltip || tooltip === this.clickedTooltip) {
37708
- this.clickedTooltip = null;
38160
+ if (!tooltip || this.isClosableClickedTooltip(tooltip)) {
37709
38161
  return;
37710
38162
  }
37711
38163
  this.toggleFocusedTooltip(tooltip, value);
37712
38164
  }
38165
+ isClosableClickedTooltip(tooltip) {
38166
+ return tooltip?.closeOnClick && tooltip === this.clickedTooltip;
38167
+ }
37713
38168
  }
37714
38169
 
37715
38170
  const tooltipCss = "@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*/.sc-calcite-tooltip: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*/.calcite-animate.sc-calcite-tooltip{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}/*!@.calcite-animate__in*/.calcite-animate__in.sc-calcite-tooltip{animation-name:in}/*!@.calcite-animate__in-down*/.calcite-animate__in-down.sc-calcite-tooltip{animation-name:in-down}/*!@.calcite-animate__in-up*/.calcite-animate__in-up.sc-calcite-tooltip{animation-name:in-up}/*!@.calcite-animate__in-scale*/.calcite-animate__in-scale.sc-calcite-tooltip{animation-name:in-scale}@media (prefers-reduced-motion: reduce){/*!@:root*/.sc-calcite-tooltip:root{--calcite-internal-duration-factor:0.01}}/*!@:root*/.sc-calcite-tooltip:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}/*!@:host([hidden])*/[hidden].sc-calcite-tooltip-h{display:none}/*!@:host*/.sc-calcite-tooltip-h{--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*/.calcite-floating-ui-anim.sc-calcite-tooltip{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*/[data-placement^=bottom].sc-calcite-tooltip-h .calcite-floating-ui-anim.sc-calcite-tooltip{transform:translateY(-5px)}/*!@:host([data-placement^=top]) .calcite-floating-ui-anim*/[data-placement^=top].sc-calcite-tooltip-h .calcite-floating-ui-anim.sc-calcite-tooltip{transform:translateY(5px)}/*!@:host([data-placement^=left]) .calcite-floating-ui-anim*/[data-placement^=left].sc-calcite-tooltip-h .calcite-floating-ui-anim.sc-calcite-tooltip{transform:translateX(5px)}/*!@:host([data-placement^=right]) .calcite-floating-ui-anim*/[data-placement^=right].sc-calcite-tooltip-h .calcite-floating-ui-anim.sc-calcite-tooltip{transform:translateX(-5px)}/*!@:host([data-placement]) .calcite-floating-ui-anim--active*/[data-placement].sc-calcite-tooltip-h .calcite-floating-ui-anim--active.sc-calcite-tooltip{opacity:1;transform:translate(0)}/*!@:host([calcite-hydrated-hidden])*/[calcite-hydrated-hidden].sc-calcite-tooltip-h{visibility:hidden !important;pointer-events:none}/*!@.calcite-floating-ui-arrow*/.calcite-floating-ui-arrow.sc-calcite-tooltip{pointer-events:none;position:absolute;z-index:-1;fill:var(--calcite-ui-foreground-1)}/*!@.calcite-floating-ui-arrow__stroke*/.calcite-floating-ui-arrow__stroke.sc-calcite-tooltip{stroke:var(--calcite-ui-border-3)}/*!@.container*/.container.sc-calcite-tooltip{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*/.calcite-floating-ui-anim.sc-calcite-tooltip{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*/.arrow.sc-calcite-tooltip::before{outline:1px solid var(--calcite-ui-border-3)}";
@@ -38002,26 +38457,24 @@ class Tree {
38002
38457
  (!target.hasChildren ||
38003
38458
  (target.hasChildren &&
38004
38459
  (this.selectionMode === "children" || this.selectionMode === "multichildren")));
38460
+ const shouldDeselectAllChildren = this.selectionMode === "multichildren" && target.hasChildren;
38005
38461
  const shouldModifyToCurrentSelection = !isNoneSelectionMode &&
38006
38462
  event.detail.modifyCurrentSelection &&
38007
38463
  (this.selectionMode === "multiple" || this.selectionMode === "multichildren");
38008
- const shouldSelectChildren = this.selectionMode === "multichildren" || this.selectionMode === "children";
38009
38464
  const shouldClearCurrentSelection = !shouldModifyToCurrentSelection &&
38010
38465
  (((this.selectionMode === "single" || this.selectionMode === "multiple") &&
38011
38466
  childItems.length <= 0) ||
38012
38467
  this.selectionMode === "children" ||
38013
38468
  this.selectionMode === "multichildren");
38014
- const shouldExpandTarget = this.selectionMode === "children" || this.selectionMode === "multichildren";
38469
+ const shouldUpdateExpand = ["children", "multichildren"].includes(this.selectionMode) ||
38470
+ (["single", "multiple"].includes(this.selectionMode) &&
38471
+ target.hasChildren &&
38472
+ !event.detail.forceToggle);
38015
38473
  if (!this.child) {
38016
38474
  const targetItems = [];
38017
38475
  if (shouldSelect) {
38018
38476
  targetItems.push(target);
38019
38477
  }
38020
- if (shouldSelectChildren) {
38021
- childItems.forEach((treeItem) => {
38022
- targetItems.push(treeItem);
38023
- });
38024
- }
38025
38478
  if (shouldClearCurrentSelection) {
38026
38479
  const selectedItems = nodeListToArray(this.el.querySelectorAll("calcite-tree-item[selected]"));
38027
38480
  selectedItems.forEach((treeItem) => {
@@ -38030,14 +38483,29 @@ class Tree {
38030
38483
  }
38031
38484
  });
38032
38485
  }
38033
- if (shouldExpandTarget && !event.detail.forceToggle) {
38034
- target.expanded = true;
38486
+ if (shouldUpdateExpand) {
38487
+ if (["single", "multiple"].includes(this.selectionMode)) {
38488
+ target.expanded = !target.expanded;
38489
+ }
38490
+ else if (this.selectionMode === "multichildren") {
38491
+ target.expanded = !target.selected;
38492
+ }
38493
+ else if (this.selectionMode === "children") {
38494
+ target.expanded = target.selected ? !target.expanded : true;
38495
+ }
38496
+ }
38497
+ if (shouldDeselectAllChildren) {
38498
+ childItems.forEach((item) => {
38499
+ item.selected = false;
38500
+ if (item.hasChildren) {
38501
+ item.expanded = false;
38502
+ }
38503
+ });
38035
38504
  }
38036
38505
  if (shouldModifyToCurrentSelection) {
38037
38506
  window.getSelection().removeAllRanges();
38038
38507
  }
38039
- if ((shouldModifyToCurrentSelection && target.selected) ||
38040
- (shouldSelectChildren && event.detail.forceToggle)) {
38508
+ if ((shouldModifyToCurrentSelection && target.selected) || event.detail.forceToggle) {
38041
38509
  targetItems.forEach((treeItem) => {
38042
38510
  if (!treeItem.disabled) {
38043
38511
  treeItem.selected = false;
@@ -38233,11 +38701,6 @@ class TreeItem {
38233
38701
  this.expanded = !this.expanded;
38234
38702
  };
38235
38703
  this.childrenClickHandler = (event) => event.stopPropagation();
38236
- //--------------------------------------------------------------------------
38237
- //
38238
- // Private Methods
38239
- //
38240
- //--------------------------------------------------------------------------
38241
38704
  this.updateParentIsExpanded = (el, expanded) => {
38242
38705
  const items = getSlotted(el, SLOTS$1.children, {
38243
38706
  all: true,
@@ -38378,7 +38841,7 @@ class TreeItem {
38378
38841
  [CSS_UTILITY.rtl]: rtl
38379
38842
  }, "data-selection-mode": this.selectionMode,
38380
38843
  // eslint-disable-next-line react/jsx-sort-props
38381
- ref: (el) => (this.defaultSlotWrapper = el) }, chevron, itemIndicator, this.iconStart ? iconStartEl : null, checkbox ? checkbox : defaultSlotNode), hAsync("div", { class: CSS$1.actionsEnd, hidden: !hasEndActions }, slotNode)), hAsync("div", { class: {
38844
+ ref: (el) => (this.defaultSlotWrapper = el) }, chevron, itemIndicator, this.iconStart ? iconStartEl : null, checkbox ? checkbox : defaultSlotNode), hAsync("div", { class: CSS$1.actionsEnd, hidden: !hasEndActions, ref: (el) => (this.actionSlotWrapper = el) }, slotNode)), hAsync("div", { class: {
38382
38845
  [CSS$1.childrenContainer]: true,
38383
38846
  [CSS_UTILITY.rtl]: rtl
38384
38847
  }, "data-test-id": "calcite-tree-children", onClick: this.childrenClickHandler, role: this.hasChildren ? "group" : undefined,
@@ -38394,7 +38857,7 @@ class TreeItem {
38394
38857
  //
38395
38858
  //--------------------------------------------------------------------------
38396
38859
  onClick(event) {
38397
- if (this.disabled) {
38860
+ if (this.disabled || this.isActionEndEvent(event)) {
38398
38861
  return;
38399
38862
  }
38400
38863
  // Solve for if the item is clicked somewhere outside the slotted anchor.
@@ -38411,6 +38874,9 @@ class TreeItem {
38411
38874
  }
38412
38875
  keyDownHandler(event) {
38413
38876
  let root;
38877
+ if (this.isActionEndEvent(event)) {
38878
+ return;
38879
+ }
38414
38880
  switch (event.key) {
38415
38881
  case " ":
38416
38882
  if (this.selectionMode === "none") {
@@ -38457,6 +38923,15 @@ class TreeItem {
38457
38923
  break;
38458
38924
  }
38459
38925
  }
38926
+ //--------------------------------------------------------------------------
38927
+ //
38928
+ // Private Methods
38929
+ //
38930
+ //--------------------------------------------------------------------------
38931
+ isActionEndEvent(event) {
38932
+ const composedPath = event.composedPath();
38933
+ return composedPath.includes(this.actionSlotWrapper);
38934
+ }
38460
38935
  /**
38461
38936
  * This is meant to be called in `componentDidLoad` in order to take advantage of the hierarchical component lifecycle
38462
38937
  * and help check for item selection as items are initialized