@esri/calcite-components 1.4.0-next.4 → 1.4.0-next.6

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 (704) hide show
  1. package/dist/calcite/calcite.esm.js +2 -2
  2. package/dist/calcite/index.esm.js +2 -2
  3. package/dist/calcite/{p-1b48dcda.entry.js → p-00e1b3a8.entry.js} +2 -2
  4. package/dist/calcite/{p-4a86d1ab.js → p-02706e35.js} +1 -1
  5. package/dist/calcite/p-058ac7cb.entry.js +6 -0
  6. package/dist/calcite/{p-be5734f7.js → p-08fb12d7.js} +2 -2
  7. package/dist/calcite/{p-5081856a.entry.js → p-09339f89.entry.js} +2 -2
  8. package/dist/calcite/{p-549d3d07.entry.js → p-0f9e9bef.entry.js} +2 -2
  9. package/dist/calcite/{p-198ab071.entry.js → p-15d26e08.entry.js} +2 -2
  10. package/dist/calcite/{p-c6c82380.entry.js → p-1678bfd5.entry.js} +2 -2
  11. package/dist/calcite/{p-14f78c1b.entry.js → p-18e2b588.entry.js} +2 -2
  12. package/dist/calcite/{p-14eccdb3.entry.js → p-198abcbb.entry.js} +2 -2
  13. package/dist/calcite/p-1bcc4ef2.js +6 -0
  14. package/dist/calcite/{p-4be0d67c.entry.js → p-20c6068d.entry.js} +2 -2
  15. package/dist/calcite/{p-2468ff71.js → p-238464b3.js} +1 -1
  16. package/dist/calcite/{p-10335369.js → p-24833d0f.js} +2 -2
  17. package/dist/calcite/{p-a8ae64d6.js → p-28ee6675.js} +1 -1
  18. package/dist/calcite/{p-f8af9a6c.js → p-2d155925.js} +1 -1
  19. package/dist/calcite/{p-f8ff6c94.entry.js → p-2f987df1.entry.js} +2 -2
  20. package/dist/calcite/{p-a0d99484.entry.js → p-309c88b2.entry.js} +2 -2
  21. package/dist/calcite/{p-460df0b5.js → p-36a4f2c8.js} +1 -1
  22. package/dist/calcite/{p-607951d2.entry.js → p-3c58757e.entry.js} +2 -2
  23. package/dist/calcite/{p-3465fcef.js → p-3d782f5e.js} +1 -1
  24. package/dist/calcite/{p-9170dc8c.entry.js → p-3e4ed9a3.entry.js} +2 -2
  25. package/dist/calcite/{p-29675f69.entry.js → p-3f09b972.entry.js} +2 -2
  26. package/dist/calcite/{p-b88213e9.entry.js → p-3fb7e1e9.entry.js} +2 -2
  27. package/dist/calcite/{p-4094c395.js → p-49e5e96a.js} +1 -1
  28. package/dist/calcite/{p-e4676089.entry.js → p-4ad0e5e7.entry.js} +2 -2
  29. package/dist/calcite/{p-167a7bdc.js → p-50e95bdb.js} +1 -1
  30. package/dist/calcite/{p-e7e84acd.entry.js → p-51f4cb23.entry.js} +2 -2
  31. package/dist/calcite/{p-09b5e911.entry.js → p-520cf1b0.entry.js} +2 -2
  32. package/dist/calcite/{p-690e8224.entry.js → p-56d69bd6.entry.js} +2 -2
  33. package/dist/calcite/{p-4612e3c4.entry.js → p-5b82075d.entry.js} +2 -2
  34. package/dist/calcite/{p-5099d131.entry.js → p-6582a43e.entry.js} +2 -2
  35. package/dist/calcite/{p-99546fc2.entry.js → p-6989f500.entry.js} +2 -2
  36. package/dist/calcite/{p-ac512a57.entry.js → p-6aadaed2.entry.js} +2 -2
  37. package/dist/calcite/{p-eabc3a81.entry.js → p-6c011dac.entry.js} +2 -2
  38. package/dist/calcite/{p-110f836d.js → p-6e1f7f1f.js} +1 -1
  39. package/dist/calcite/{p-762e069e.entry.js → p-70edce50.entry.js} +2 -2
  40. package/dist/calcite/{p-00346107.entry.js → p-71294102.entry.js} +2 -2
  41. package/dist/calcite/{p-c592404b.entry.js → p-721669b1.entry.js} +2 -2
  42. package/dist/calcite/{p-cc5d73b1.entry.js → p-7773ec0c.entry.js} +2 -2
  43. package/dist/calcite/{p-7aac398a.js → p-78ecccfd.js} +2 -2
  44. package/dist/calcite/{p-7c069e47.entry.js → p-794cd7e0.entry.js} +2 -2
  45. package/dist/calcite/{p-1e353e72.js → p-7e85033a.js} +1 -1
  46. package/dist/calcite/{p-37601822.entry.js → p-829a8016.entry.js} +2 -2
  47. package/dist/calcite/{p-bfa1073e.entry.js → p-8576f7a9.entry.js} +2 -2
  48. package/dist/calcite/{p-4dd1d026.entry.js → p-85ce36b4.entry.js} +2 -2
  49. package/dist/calcite/{p-fbb43fd3.entry.js → p-89b037e5.entry.js} +2 -2
  50. package/dist/calcite/{p-7c93f55c.entry.js → p-8bc8392a.entry.js} +2 -2
  51. package/dist/calcite/{p-d83e122d.js → p-8d592b3c.js} +1 -1
  52. package/dist/calcite/{p-bf3b07a8.entry.js → p-8d911c0f.entry.js} +2 -2
  53. package/dist/calcite/{p-518e42e2.js → p-8e4e219a.js} +1 -1
  54. package/dist/calcite/{p-798257c9.js → p-8eb6d3d6.js} +2 -2
  55. package/dist/calcite/{p-9d6d46fb.js → p-8eed6488.js} +1 -1
  56. package/dist/calcite/{p-1f65fd97.entry.js → p-902ccf8c.entry.js} +2 -2
  57. package/dist/calcite/{p-41b1924f.entry.js → p-90faa188.entry.js} +2 -2
  58. package/dist/calcite/{p-5b0e38f4.entry.js → p-94ae14ed.entry.js} +2 -2
  59. package/dist/calcite/{p-2477ffab.js → p-977a7373.js} +2 -2
  60. package/dist/calcite/{p-fc5a05c8.js → p-9c5561f6.js} +2 -2
  61. package/dist/calcite/{p-71ee6c09.js → p-9ecad02c.js} +2 -2
  62. package/dist/calcite/p-a2dcc545.js +6 -0
  63. package/dist/calcite/{p-6c28a6a6.entry.js → p-ac50f328.entry.js} +2 -2
  64. package/dist/calcite/{p-af19d2eb.entry.js → p-acbe9c99.entry.js} +2 -2
  65. package/dist/calcite/p-ad29a95f.js +6 -0
  66. package/dist/calcite/{p-3476e72e.js → p-ae330013.js} +2 -2
  67. package/dist/calcite/{p-88e0c279.js → p-b0388e91.js} +2 -2
  68. package/dist/calcite/{p-07e56bf4.js → p-b086f92d.js} +1 -1
  69. package/dist/calcite/p-b3099221.js +6 -0
  70. package/dist/calcite/{p-c33810ce.js → p-b3f59734.js} +1 -1
  71. package/dist/calcite/{p-12b426c9.entry.js → p-b7f76e88.entry.js} +2 -2
  72. package/dist/calcite/p-bb1f280b.entry.js +6 -0
  73. package/dist/calcite/{p-cafbf219.entry.js → p-bde56e46.entry.js} +2 -2
  74. package/dist/calcite/{p-48071f1a.entry.js → p-bde9a8bf.entry.js} +2 -2
  75. package/dist/calcite/{p-e88938fe.entry.js → p-becceac4.entry.js} +2 -2
  76. package/dist/calcite/p-c3bd1ae0.entry.js +6 -0
  77. package/dist/calcite/{p-8ac1324f.entry.js → p-c477bf75.entry.js} +2 -2
  78. package/dist/calcite/{p-db1f6411.js → p-c4e985ef.js} +2 -2
  79. package/dist/calcite/{p-605ff48d.entry.js → p-c9159a0a.entry.js} +2 -2
  80. package/dist/calcite/{p-4569f702.entry.js → p-ca95c6ed.entry.js} +2 -2
  81. package/dist/calcite/{p-dc554515.entry.js → p-cabf475d.entry.js} +2 -2
  82. package/dist/calcite/p-cc008746.js +6 -0
  83. package/dist/calcite/{p-b6d1694c.entry.js → p-cd8ecd59.entry.js} +2 -2
  84. package/dist/calcite/{p-b1c81dcc.js → p-cf5e973f.js} +2 -2
  85. package/dist/calcite/{p-90b23414.entry.js → p-d4f5d56a.entry.js} +2 -2
  86. package/dist/calcite/{p-0e0a4c8e.entry.js → p-dda5a868.entry.js} +2 -2
  87. package/dist/calcite/p-de460c7f.js +6 -0
  88. package/dist/calcite/p-e907c9d7.entry.js +6 -0
  89. package/dist/calcite/{p-23c694da.entry.js → p-e9dedbc2.entry.js} +2 -2
  90. package/dist/calcite/{p-74a4ac3e.js → p-ece4c169.js} +1 -1
  91. package/dist/calcite/{p-df5d4340.entry.js → p-ef9439cd.entry.js} +2 -2
  92. package/dist/calcite/p-f0eab93a.entry.js +6 -0
  93. package/dist/calcite/{p-01e73d3c.entry.js → p-f1dc743d.entry.js} +2 -2
  94. package/dist/calcite/{p-feb44263.entry.js → p-f2bf5444.entry.js} +2 -2
  95. package/dist/calcite/{p-ab5ba8d8.entry.js → p-f44b8d1c.entry.js} +2 -2
  96. package/dist/calcite/{p-083022ce.entry.js → p-fd37640e.entry.js} +2 -2
  97. package/dist/calcite/{p-18fe3593.entry.js → p-fd38d722.entry.js} +2 -2
  98. package/dist/calcite/p-ff1e2786.js +6 -0
  99. package/dist/cjs/{ExpandToggle-9c9692c9.js → ExpandToggle-34efb36e.js} +5 -5
  100. package/dist/cjs/{FloatingArrow-8cad3e02.js → FloatingArrow-ca4a438c.js} +2 -2
  101. package/dist/cjs/{Heading-a54c437a.js → Heading-16403a18.js} +2 -2
  102. package/dist/cjs/{app-globals-6921d6ca.js → app-globals-08fa4928.js} +2 -2
  103. package/dist/cjs/{array-11eaef78.js → array-a48e72f4.js} +1 -1
  104. package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
  105. package/dist/cjs/calcite-action-bar.cjs.entry.js +15 -15
  106. package/dist/cjs/calcite-action-group.cjs.entry.js +13 -13
  107. package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
  108. package/dist/cjs/calcite-action-pad.cjs.entry.js +14 -14
  109. package/dist/cjs/calcite-action.cjs.entry.js +11 -11
  110. package/dist/cjs/calcite-alert.cjs.entry.js +12 -12
  111. package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
  112. package/dist/cjs/calcite-block_2.cjs.entry.js +12 -12
  113. package/dist/cjs/calcite-button.cjs.entry.js +13 -13
  114. package/dist/cjs/calcite-card.cjs.entry.js +10 -10
  115. package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -10
  116. package/dist/cjs/calcite-chip-group.cjs.entry.js +8 -8
  117. package/dist/cjs/calcite-chip.cjs.entry.js +12 -12
  118. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +585 -339
  119. package/dist/cjs/calcite-combobox_3.cjs.entry.js +18 -18
  120. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +13 -13
  121. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -12
  122. package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
  123. package/dist/cjs/calcite-filter.cjs.entry.js +13 -13
  124. package/dist/cjs/calcite-flow-item.cjs.entry.js +12 -12
  125. package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
  126. package/dist/cjs/calcite-graph_2.cjs.entry.js +13 -13
  127. package/dist/cjs/calcite-handle.cjs.entry.js +10 -10
  128. package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
  129. package/dist/cjs/calcite-inline-editable.cjs.entry.js +12 -12
  130. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +18 -18
  131. package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
  132. package/dist/cjs/calcite-input-number.cjs.entry.js +13 -13
  133. package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
  134. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +14 -14
  135. package/dist/cjs/calcite-input.cjs.entry.js +13 -13
  136. package/dist/cjs/calcite-label.cjs.entry.js +6 -6
  137. package/dist/cjs/calcite-link.cjs.entry.js +7 -7
  138. package/dist/cjs/calcite-list_3.cjs.entry.js +50 -40
  139. package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
  140. package/dist/cjs/calcite-modal.cjs.entry.js +13 -13
  141. package/dist/cjs/calcite-notice.cjs.entry.js +12 -12
  142. package/dist/cjs/calcite-option_3.cjs.entry.js +10 -10
  143. package/dist/cjs/calcite-pagination.cjs.entry.js +10 -10
  144. package/dist/cjs/calcite-panel.cjs.entry.js +14 -14
  145. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +16 -16
  146. package/dist/cjs/calcite-popover.cjs.entry.js +16 -16
  147. package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
  148. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
  149. package/dist/cjs/calcite-radio-button.cjs.entry.js +10 -10
  150. package/dist/cjs/calcite-rating.cjs.entry.js +13 -13
  151. package/dist/cjs/calcite-scrim.cjs.entry.js +9 -9
  152. package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +9 -9
  153. package/dist/cjs/calcite-shell_3.cjs.entry.js +11 -11
  154. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
  155. package/dist/cjs/calcite-split-button.cjs.entry.js +4 -4
  156. package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -10
  157. package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
  158. package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
  159. package/dist/cjs/calcite-text-area.cjs.entry.js +15 -15
  160. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +5 -5
  161. package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
  162. package/dist/cjs/calcite-tip_3.cjs.entry.js +11 -11
  163. package/dist/cjs/calcite-tooltip.cjs.entry.js +9 -9
  164. package/dist/cjs/calcite-tree_2.cjs.entry.js +9 -9
  165. package/dist/cjs/calcite-value-list_2.cjs.entry.js +16 -16
  166. package/dist/cjs/calcite.cjs.js +5 -5
  167. package/dist/cjs/{composed-offset-position.esm-5a2f9ff8.js → composed-offset-position.esm-00262258.js} +1 -1
  168. package/dist/cjs/{conditionalSlot-39f2741e.js → conditionalSlot-44ce332c.js} +3 -3
  169. package/dist/cjs/{debounce-f09b6263.js → debounce-a2674dc4.js} +1 -1
  170. package/dist/cjs/{dom-1b2f41d1.js → dom-c4a69490.js} +3 -3
  171. package/dist/cjs/{filter-c268fa9a.js → filter-a7677076.js} +2 -2
  172. package/dist/cjs/{floating-ui-86f1cd7e.js → floating-ui-b9ad845e.js} +71 -65
  173. package/dist/cjs/{focusTrapComponent-84a6204d.js → focusTrapComponent-ad111b58.js} +2 -2
  174. package/dist/cjs/{form-c4ef3b01.js → form-4441b5de.js} +3 -3
  175. package/dist/cjs/{guid-053b3b9f.js → guid-3ea77659.js} +1 -1
  176. package/dist/cjs/{index-3f1e65e1.js → index-5631fa22.js} +1 -1
  177. package/dist/cjs/index.cjs.js +2 -2
  178. package/dist/cjs/{interactive-002e7de1.js → interactive-0d0f7af7.js} +1 -1
  179. package/dist/cjs/{key-26c7350c.js → key-5a12f647.js} +1 -1
  180. package/dist/cjs/{label-c5a73703.js → label-81db116a.js} +2 -2
  181. package/dist/cjs/{loadable-21f49ddd.js → loadable-9733bc78.js} +1 -1
  182. package/dist/cjs/loader.cjs.js +5 -5
  183. package/dist/cjs/{locale-bec864db.js → locale-cd52f850.js} +4 -4
  184. package/dist/cjs/{math-b23a2620.js → math-d7fcd025.js} +1 -1
  185. package/dist/cjs/{observers-7b381996.js → observers-6aa64455.js} +1 -1
  186. package/dist/cjs/{openCloseComponent-d285707d.js → openCloseComponent-f2d47f5b.js} +2 -2
  187. package/dist/cjs/{resources-4b35c7c3.js → resources-4a16f695.js} +1 -1
  188. package/dist/cjs/{resources-ccc69560.js → resources-7805e29e.js} +5 -5
  189. package/dist/cjs/{resources-d72b2060.js → resources-9c69ee5f.js} +1 -1
  190. package/dist/cjs/{resources-6603995b.js → resources-a3154079.js} +1 -1
  191. package/dist/cjs/{resources-42c16d2f.js → resources-cb69cc10.js} +1 -1
  192. package/dist/cjs/{resources-adbdd1d0.js → resources-fb8b0a5e.js} +1 -1
  193. package/dist/cjs/{sortable.esm-e90f34c4.js → sortable.esm-b954a413.js} +1 -1
  194. package/dist/cjs/{t9n-d1d3fae9.js → t9n-e49fe20d.js} +3 -3
  195. package/dist/cjs/{throttle-d2814ea6.js → throttle-3df9debd.js} +2 -2
  196. package/dist/cjs/utils-136fb325.js +213 -0
  197. package/dist/cjs/{utils-da168911.js → utils-411455bc.js} +3 -3
  198. package/dist/collection/components/accordion/accordion.js +1 -1
  199. package/dist/collection/components/accordion-item/accordion-item.js +1 -1
  200. package/dist/collection/components/accordion-item/resources.js +1 -1
  201. package/dist/collection/components/action/action.js +1 -1
  202. package/dist/collection/components/action/resources.js +1 -1
  203. package/dist/collection/components/action-bar/action-bar.js +1 -1
  204. package/dist/collection/components/action-bar/resources.js +1 -1
  205. package/dist/collection/components/action-bar/utils.js +1 -1
  206. package/dist/collection/components/action-group/action-group.js +1 -1
  207. package/dist/collection/components/action-group/resources.js +1 -1
  208. package/dist/collection/components/action-menu/action-menu.js +1 -1
  209. package/dist/collection/components/action-menu/resources.js +1 -1
  210. package/dist/collection/components/action-pad/action-pad.js +1 -1
  211. package/dist/collection/components/action-pad/resources.js +1 -1
  212. package/dist/collection/components/alert/alert.js +1 -1
  213. package/dist/collection/components/alert/resources.js +1 -1
  214. package/dist/collection/components/avatar/avatar.js +1 -1
  215. package/dist/collection/components/avatar/utils.js +1 -1
  216. package/dist/collection/components/block/block.js +1 -1
  217. package/dist/collection/components/block/resources.js +1 -1
  218. package/dist/collection/components/block-section/block-section.js +1 -1
  219. package/dist/collection/components/block-section/resources.js +1 -1
  220. package/dist/collection/components/button/button.js +1 -1
  221. package/dist/collection/components/button/resources.js +1 -1
  222. package/dist/collection/components/card/card.js +1 -1
  223. package/dist/collection/components/card/resources.js +1 -1
  224. package/dist/collection/components/checkbox/checkbox.js +1 -1
  225. package/dist/collection/components/chip/chip.js +1 -1
  226. package/dist/collection/components/chip/resources.js +1 -1
  227. package/dist/collection/components/chip-group/chip-group.js +1 -1
  228. package/dist/collection/components/color-picker/color-picker.css +59 -52
  229. package/dist/collection/components/color-picker/color-picker.js +448 -233
  230. package/dist/collection/components/color-picker/resources.js +37 -27
  231. package/dist/collection/components/color-picker/utils.js +116 -30
  232. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.css +19 -16
  233. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +225 -118
  234. package/dist/collection/components/color-picker-hex-input/resources.js +3 -3
  235. package/dist/collection/components/color-picker-swatch/color-picker-swatch.css +10 -6
  236. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +34 -7
  237. package/dist/collection/components/color-picker-swatch/resources.js +8 -2
  238. package/dist/collection/components/combobox/combobox.js +1 -1
  239. package/dist/collection/components/combobox/resources.js +1 -1
  240. package/dist/collection/components/combobox/utils.js +1 -1
  241. package/dist/collection/components/combobox-item/combobox-item.js +1 -1
  242. package/dist/collection/components/combobox-item/resources.js +1 -1
  243. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
  244. package/dist/collection/components/combobox-item-group/resources.js +1 -1
  245. package/dist/collection/components/date-picker/date-picker.js +1 -1
  246. package/dist/collection/components/date-picker/resources.js +1 -1
  247. package/dist/collection/components/date-picker/utils.js +1 -1
  248. package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
  249. package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
  250. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
  251. package/dist/collection/components/date-picker-month-header/resources.js +1 -1
  252. package/dist/collection/components/dropdown/dropdown.js +1 -1
  253. package/dist/collection/components/dropdown/resources.js +1 -1
  254. package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
  255. package/dist/collection/components/dropdown-group/resources.js +1 -1
  256. package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
  257. package/dist/collection/components/dropdown-item/resources.js +1 -1
  258. package/dist/collection/components/fab/fab.js +1 -1
  259. package/dist/collection/components/fab/resources.js +1 -1
  260. package/dist/collection/components/filter/filter.js +1 -1
  261. package/dist/collection/components/filter/resources.js +1 -1
  262. package/dist/collection/components/flow/flow.js +1 -1
  263. package/dist/collection/components/flow/resources.js +1 -1
  264. package/dist/collection/components/flow-item/flow-item.js +1 -1
  265. package/dist/collection/components/flow-item/resources.js +1 -1
  266. package/dist/collection/components/functional/ExpandToggle.js +1 -1
  267. package/dist/collection/components/functional/FloatingArrow.js +1 -1
  268. package/dist/collection/components/functional/Heading.js +1 -1
  269. package/dist/collection/components/graph/graph.js +1 -1
  270. package/dist/collection/components/graph/util.js +1 -1
  271. package/dist/collection/components/handle/handle.js +1 -1
  272. package/dist/collection/components/handle/resources.js +1 -1
  273. package/dist/collection/components/icon/icon.js +1 -1
  274. package/dist/collection/components/icon/resources.js +1 -1
  275. package/dist/collection/components/icon/utils.js +1 -1
  276. package/dist/collection/components/inline-editable/inline-editable.js +1 -1
  277. package/dist/collection/components/inline-editable/resources.js +1 -1
  278. package/dist/collection/components/input/input.js +1 -1
  279. package/dist/collection/components/input/resources.js +1 -1
  280. package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
  281. package/dist/collection/components/input-date-picker/resources.js +1 -1
  282. package/dist/collection/components/input-message/input-message.js +1 -1
  283. package/dist/collection/components/input-message/interfaces.js +1 -1
  284. package/dist/collection/components/input-number/input-number.js +1 -1
  285. package/dist/collection/components/input-number/resources.js +1 -1
  286. package/dist/collection/components/input-text/input-text.js +1 -1
  287. package/dist/collection/components/input-text/resources.js +1 -1
  288. package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
  289. package/dist/collection/components/input-time-picker/resources.js +1 -1
  290. package/dist/collection/components/label/label.js +1 -1
  291. package/dist/collection/components/label/resources.js +1 -1
  292. package/dist/collection/components/link/link.js +1 -1
  293. package/dist/collection/components/list/list.js +60 -30
  294. package/dist/collection/components/list/resources.js +2 -2
  295. package/dist/collection/components/list-item/list-item.js +1 -1
  296. package/dist/collection/components/list-item/resources.js +1 -1
  297. package/dist/collection/components/list-item/utils.js +1 -1
  298. package/dist/collection/components/list-item-group/list-item-group.js +1 -1
  299. package/dist/collection/components/list-item-group/resources.js +1 -1
  300. package/dist/collection/components/loader/loader.js +1 -1
  301. package/dist/collection/components/modal/modal.js +1 -1
  302. package/dist/collection/components/modal/resources.js +1 -1
  303. package/dist/collection/components/notice/notice.js +1 -1
  304. package/dist/collection/components/notice/resources.js +1 -1
  305. package/dist/collection/components/option/option.js +1 -1
  306. package/dist/collection/components/option-group/option-group.js +1 -1
  307. package/dist/collection/components/pagination/pagination.js +1 -1
  308. package/dist/collection/components/pagination/resources.js +1 -1
  309. package/dist/collection/components/panel/panel.js +1 -1
  310. package/dist/collection/components/panel/resources.js +1 -1
  311. package/dist/collection/components/pick-list/pick-list.js +1 -1
  312. package/dist/collection/components/pick-list/resources.js +1 -1
  313. package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
  314. package/dist/collection/components/pick-list/shared-list-render.js +1 -1
  315. package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
  316. package/dist/collection/components/pick-list-group/resources.js +1 -1
  317. package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
  318. package/dist/collection/components/pick-list-item/resources.js +1 -1
  319. package/dist/collection/components/popover/PopoverManager.js +1 -1
  320. package/dist/collection/components/popover/popover.js +1 -1
  321. package/dist/collection/components/popover/resources.js +1 -1
  322. package/dist/collection/components/progress/progress.js +1 -1
  323. package/dist/collection/components/radio-button/radio-button.js +1 -1
  324. package/dist/collection/components/radio-button/resources.js +1 -1
  325. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  326. package/dist/collection/components/rating/function/star.js +1 -1
  327. package/dist/collection/components/rating/rating.js +1 -1
  328. package/dist/collection/components/resources.js +1 -1
  329. package/dist/collection/components/scrim/resources.js +1 -1
  330. package/dist/collection/components/scrim/scrim.js +1 -1
  331. package/dist/collection/components/segmented-control/segmented-control.js +1 -1
  332. package/dist/collection/components/segmented-control-item/resources.js +1 -1
  333. package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
  334. package/dist/collection/components/select/resources.js +1 -1
  335. package/dist/collection/components/select/select.js +1 -1
  336. package/dist/collection/components/shell/resources.js +1 -1
  337. package/dist/collection/components/shell/shell.js +1 -1
  338. package/dist/collection/components/shell-center-row/resources.js +1 -1
  339. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
  340. package/dist/collection/components/shell-panel/resources.js +1 -1
  341. package/dist/collection/components/shell-panel/shell-panel.js +1 -1
  342. package/dist/collection/components/slider/resources.js +1 -1
  343. package/dist/collection/components/slider/slider.js +1 -1
  344. package/dist/collection/components/sortable-list/resources.js +1 -1
  345. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  346. package/dist/collection/components/split-button/resources.js +1 -1
  347. package/dist/collection/components/split-button/split-button.js +1 -1
  348. package/dist/collection/components/stepper/stepper.js +1 -1
  349. package/dist/collection/components/stepper-item/stepper-item.js +1 -1
  350. package/dist/collection/components/switch/switch.js +1 -1
  351. package/dist/collection/components/tab/tab.js +1 -1
  352. package/dist/collection/components/tab-nav/tab-nav.js +1 -1
  353. package/dist/collection/components/tab-title/resources.js +1 -1
  354. package/dist/collection/components/tab-title/tab-title.js +1 -1
  355. package/dist/collection/components/tabs/resources.js +1 -1
  356. package/dist/collection/components/tabs/tabs.js +1 -1
  357. package/dist/collection/components/text-area/resources.js +1 -1
  358. package/dist/collection/components/text-area/text-area.js +1 -1
  359. package/dist/collection/components/tile/resources.js +1 -1
  360. package/dist/collection/components/tile/tile.js +1 -1
  361. package/dist/collection/components/tile-select/resources.js +1 -1
  362. package/dist/collection/components/tile-select/tile-select.js +1 -1
  363. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  364. package/dist/collection/components/time-picker/resources.js +1 -1
  365. package/dist/collection/components/time-picker/time-picker.js +1 -1
  366. package/dist/collection/components/tip/resources.js +1 -1
  367. package/dist/collection/components/tip/tip.js +1 -1
  368. package/dist/collection/components/tip-group/tip-group.js +1 -1
  369. package/dist/collection/components/tip-manager/resources.js +1 -1
  370. package/dist/collection/components/tip-manager/tip-manager.js +1 -1
  371. package/dist/collection/components/tooltip/TooltipManager.js +1 -1
  372. package/dist/collection/components/tooltip/resources.js +1 -1
  373. package/dist/collection/components/tooltip/tooltip.js +1 -1
  374. package/dist/collection/components/tooltip/utils.js +1 -1
  375. package/dist/collection/components/tree/tree.js +1 -1
  376. package/dist/collection/components/tree/utils.js +1 -1
  377. package/dist/collection/components/tree-item/resources.js +1 -1
  378. package/dist/collection/components/tree-item/tree-item.js +1 -1
  379. package/dist/collection/components/value-list/resources.js +1 -1
  380. package/dist/collection/components/value-list/utils.js +1 -1
  381. package/dist/collection/components/value-list/value-list.js +1 -1
  382. package/dist/collection/components/value-list-item/resources.js +1 -1
  383. package/dist/collection/components/value-list-item/value-list-item.js +1 -1
  384. package/dist/collection/index.js +1 -1
  385. package/dist/collection/utils/array.js +1 -1
  386. package/dist/collection/utils/conditionalSlot.js +1 -1
  387. package/dist/collection/utils/config.js +1 -1
  388. package/dist/collection/utils/date.js +1 -1
  389. package/dist/collection/utils/dom.js +1 -1
  390. package/dist/collection/utils/filter.js +1 -1
  391. package/dist/collection/utils/floating-ui.js +1 -1
  392. package/dist/collection/utils/focusTrapComponent.js +1 -1
  393. package/dist/collection/utils/form.js +1 -1
  394. package/dist/collection/utils/globalAttributes.js +1 -1
  395. package/dist/collection/utils/globalScript.js +1 -1
  396. package/dist/collection/utils/guid.js +1 -1
  397. package/dist/collection/utils/interactive.js +1 -1
  398. package/dist/collection/utils/key.js +1 -1
  399. package/dist/collection/utils/label.js +1 -1
  400. package/dist/collection/utils/loadable.js +1 -1
  401. package/dist/collection/utils/locale.js +1 -1
  402. package/dist/collection/utils/math.js +1 -1
  403. package/dist/collection/utils/mode.js +1 -1
  404. package/dist/collection/utils/number.js +1 -1
  405. package/dist/collection/utils/observers.js +1 -1
  406. package/dist/collection/utils/openCloseComponent.js +1 -1
  407. package/dist/collection/utils/resources.js +1 -1
  408. package/dist/collection/utils/t9n.js +1 -1
  409. package/dist/collection/utils/time.js +1 -1
  410. package/dist/components/ExpandToggle.js +1 -1
  411. package/dist/components/FloatingArrow.js +1 -1
  412. package/dist/components/Heading.js +1 -1
  413. package/dist/components/action-group.js +1 -1
  414. package/dist/components/action-menu.js +1 -1
  415. package/dist/components/action.js +1 -1
  416. package/dist/components/array.js +1 -1
  417. package/dist/components/button.js +1 -1
  418. package/dist/components/calcite-accordion-item.js +1 -1
  419. package/dist/components/calcite-accordion.js +1 -1
  420. package/dist/components/calcite-action-bar.js +1 -1
  421. package/dist/components/calcite-action-group.js +1 -1
  422. package/dist/components/calcite-action-menu.js +1 -1
  423. package/dist/components/calcite-action-pad.js +1 -1
  424. package/dist/components/calcite-action.js +1 -1
  425. package/dist/components/calcite-alert.js +1 -1
  426. package/dist/components/calcite-avatar.js +1 -1
  427. package/dist/components/calcite-block-section.js +1 -1
  428. package/dist/components/calcite-block.js +1 -1
  429. package/dist/components/calcite-button.js +1 -1
  430. package/dist/components/calcite-card.js +1 -1
  431. package/dist/components/calcite-checkbox.js +1 -1
  432. package/dist/components/calcite-chip-group.js +1 -1
  433. package/dist/components/calcite-chip.js +1 -1
  434. package/dist/components/calcite-color-picker-hex-input.js +2 -2
  435. package/dist/components/calcite-color-picker-swatch.js +1 -1
  436. package/dist/components/calcite-color-picker.js +377 -314
  437. package/dist/components/calcite-combobox-item-group.js +1 -1
  438. package/dist/components/calcite-combobox-item.js +1 -1
  439. package/dist/components/calcite-combobox.js +1 -1
  440. package/dist/components/calcite-date-picker-day.js +1 -1
  441. package/dist/components/calcite-date-picker-month-header.js +1 -1
  442. package/dist/components/calcite-date-picker-month.js +1 -1
  443. package/dist/components/calcite-date-picker.js +1 -1
  444. package/dist/components/calcite-dropdown-group.js +1 -1
  445. package/dist/components/calcite-dropdown-item.js +1 -1
  446. package/dist/components/calcite-dropdown.js +1 -1
  447. package/dist/components/calcite-fab.js +1 -1
  448. package/dist/components/calcite-filter.js +1 -1
  449. package/dist/components/calcite-flow-item.js +1 -1
  450. package/dist/components/calcite-flow.js +1 -1
  451. package/dist/components/calcite-graph.js +1 -1
  452. package/dist/components/calcite-handle.js +1 -1
  453. package/dist/components/calcite-icon.js +1 -1
  454. package/dist/components/calcite-inline-editable.js +1 -1
  455. package/dist/components/calcite-input-date-picker.js +1 -1
  456. package/dist/components/calcite-input-message.js +1 -1
  457. package/dist/components/calcite-input-number.js +2 -617
  458. package/dist/components/calcite-input-text.js +1 -1
  459. package/dist/components/calcite-input-time-picker.js +1 -1
  460. package/dist/components/calcite-input.js +1 -1
  461. package/dist/components/calcite-label.js +1 -1
  462. package/dist/components/calcite-link.js +1 -1
  463. package/dist/components/calcite-list-item-group.js +1 -1
  464. package/dist/components/calcite-list-item.js +1 -1
  465. package/dist/components/calcite-list.js +40 -30
  466. package/dist/components/calcite-loader.js +1 -1
  467. package/dist/components/calcite-modal.js +1 -1
  468. package/dist/components/calcite-notice.js +1 -1
  469. package/dist/components/calcite-option-group.js +1 -1
  470. package/dist/components/calcite-option.js +1 -1
  471. package/dist/components/calcite-pagination.js +1 -1
  472. package/dist/components/calcite-panel.js +1 -1
  473. package/dist/components/calcite-pick-list-group.js +1 -1
  474. package/dist/components/calcite-pick-list-item.js +1 -1
  475. package/dist/components/calcite-pick-list.js +1 -1
  476. package/dist/components/calcite-popover.js +1 -1
  477. package/dist/components/calcite-progress.js +1 -1
  478. package/dist/components/calcite-radio-button-group.js +1 -1
  479. package/dist/components/calcite-radio-button.js +1 -1
  480. package/dist/components/calcite-rating.js +1 -1
  481. package/dist/components/calcite-scrim.js +1 -1
  482. package/dist/components/calcite-segmented-control-item.js +1 -1
  483. package/dist/components/calcite-segmented-control.js +1 -1
  484. package/dist/components/calcite-select.js +1 -1
  485. package/dist/components/calcite-shell-center-row.js +1 -1
  486. package/dist/components/calcite-shell-panel.js +1 -1
  487. package/dist/components/calcite-shell.js +1 -1
  488. package/dist/components/calcite-slider.js +1 -1
  489. package/dist/components/calcite-sortable-list.js +1 -1
  490. package/dist/components/calcite-split-button.js +1 -1
  491. package/dist/components/calcite-stepper-item.js +1 -1
  492. package/dist/components/calcite-stepper.js +1 -1
  493. package/dist/components/calcite-switch.js +1 -1
  494. package/dist/components/calcite-tab-nav.js +1 -1
  495. package/dist/components/calcite-tab-title.js +1 -1
  496. package/dist/components/calcite-tab.js +1 -1
  497. package/dist/components/calcite-tabs.js +1 -1
  498. package/dist/components/calcite-text-area.js +1 -1
  499. package/dist/components/calcite-tile-select-group.js +1 -1
  500. package/dist/components/calcite-tile-select.js +1 -1
  501. package/dist/components/calcite-tile.js +1 -1
  502. package/dist/components/calcite-time-picker.js +1 -1
  503. package/dist/components/calcite-tip-group.js +1 -1
  504. package/dist/components/calcite-tip-manager.js +1 -1
  505. package/dist/components/calcite-tip.js +1 -1
  506. package/dist/components/calcite-tooltip.js +1 -1
  507. package/dist/components/calcite-tree-item.js +1 -1
  508. package/dist/components/calcite-tree.js +1 -1
  509. package/dist/components/calcite-value-list-item.js +1 -1
  510. package/dist/components/calcite-value-list.js +1 -1
  511. package/dist/components/checkbox.js +1 -1
  512. package/dist/components/chip.js +1 -1
  513. package/dist/components/color-picker-hex-input.js +252 -88
  514. package/dist/components/color-picker-swatch.js +42 -2118
  515. package/dist/components/composed-offset-position.esm.js +1 -1
  516. package/dist/components/conditionalSlot.js +1 -1
  517. package/dist/components/date-picker-day.js +1 -1
  518. package/dist/components/date-picker-month-header.js +1 -1
  519. package/dist/components/date-picker-month.js +1 -1
  520. package/dist/components/date-picker.js +2 -2
  521. package/dist/components/date.js +1 -1
  522. package/dist/components/debounce.js +1 -1
  523. package/dist/components/dom.js +1 -1
  524. package/dist/components/dropdown.js +1 -1
  525. package/dist/components/filter.js +1 -1
  526. package/dist/components/filter2.js +1 -1
  527. package/dist/components/floating-ui.js +68 -62
  528. package/dist/components/focusTrapComponent.js +1 -1
  529. package/dist/components/form.js +1 -1
  530. package/dist/components/graph.js +1 -1
  531. package/dist/components/guid.js +1 -1
  532. package/dist/components/handle.js +1 -1
  533. package/dist/components/icon.js +1 -1
  534. package/dist/components/index.js +1 -1
  535. package/dist/components/index2.js +2116 -0
  536. package/dist/components/input-number.js +623 -0
  537. package/dist/components/input.js +2 -2
  538. package/dist/components/interactive.js +1 -1
  539. package/dist/components/key.js +1 -1
  540. package/dist/components/label.js +1 -1
  541. package/dist/components/label2.js +1 -1
  542. package/dist/components/link.js +1 -1
  543. package/dist/components/loadable.js +1 -1
  544. package/dist/components/loader.js +1 -1
  545. package/dist/components/locale.js +2 -2
  546. package/dist/components/math.js +1 -1
  547. package/dist/components/observers.js +1 -1
  548. package/dist/components/openCloseComponent.js +1 -1
  549. package/dist/components/panel.js +1 -1
  550. package/dist/components/pick-list-item.js +1 -1
  551. package/dist/components/popover.js +1 -1
  552. package/dist/components/progress.js +1 -1
  553. package/dist/components/resources.js +1 -1
  554. package/dist/components/resources2.js +1 -1
  555. package/dist/components/resources3.js +1 -1
  556. package/dist/components/scrim.js +1 -1
  557. package/dist/components/shared-list-render.js +1 -1
  558. package/dist/components/sortable.esm.js +1 -1
  559. package/dist/components/switch.js +1 -1
  560. package/dist/components/t9n.js +1 -1
  561. package/dist/components/tab-nav.js +1 -1
  562. package/dist/components/tab-title.js +1 -1
  563. package/dist/components/tab.js +1 -1
  564. package/dist/components/tabs.js +1 -1
  565. package/dist/components/throttle.js +1 -1
  566. package/dist/components/tile.js +1 -1
  567. package/dist/components/time-picker.js +2 -2
  568. package/dist/components/tooltip.js +1 -1
  569. package/dist/components/utils.js +112 -31
  570. package/dist/components/utils2.js +1 -1
  571. package/dist/components/utils3.js +1 -1
  572. package/dist/esm/{ExpandToggle-095e2f69.js → ExpandToggle-84cd3334.js} +5 -5
  573. package/dist/esm/{FloatingArrow-4e190499.js → FloatingArrow-2a728102.js} +2 -2
  574. package/dist/esm/{Heading-08826e02.js → Heading-aa5e7f03.js} +2 -2
  575. package/dist/esm/{app-globals-a86875ad.js → app-globals-9a63f836.js} +2 -2
  576. package/dist/esm/{array-937e8e63.js → array-cba42ef7.js} +1 -1
  577. package/dist/esm/calcite-accordion_2.entry.js +7 -7
  578. package/dist/esm/calcite-action-bar.entry.js +15 -15
  579. package/dist/esm/calcite-action-group.entry.js +13 -13
  580. package/dist/esm/calcite-action-menu.entry.js +9 -9
  581. package/dist/esm/calcite-action-pad.entry.js +14 -14
  582. package/dist/esm/calcite-action.entry.js +11 -11
  583. package/dist/esm/calcite-alert.entry.js +12 -12
  584. package/dist/esm/calcite-avatar.entry.js +6 -6
  585. package/dist/esm/calcite-block_2.entry.js +12 -12
  586. package/dist/esm/calcite-button.entry.js +13 -13
  587. package/dist/esm/calcite-card.entry.js +10 -10
  588. package/dist/esm/calcite-checkbox.entry.js +10 -10
  589. package/dist/esm/calcite-chip-group.entry.js +8 -8
  590. package/dist/esm/calcite-chip.entry.js +12 -12
  591. package/dist/esm/calcite-color-picker_3.entry.js +585 -339
  592. package/dist/esm/calcite-combobox_3.entry.js +18 -18
  593. package/dist/esm/calcite-date-picker_4.entry.js +13 -13
  594. package/dist/esm/calcite-dropdown_3.entry.js +12 -12
  595. package/dist/esm/calcite-fab.entry.js +7 -7
  596. package/dist/esm/calcite-filter.entry.js +13 -13
  597. package/dist/esm/calcite-flow-item.entry.js +12 -12
  598. package/dist/esm/calcite-flow.entry.js +3 -3
  599. package/dist/esm/calcite-graph_2.entry.js +13 -13
  600. package/dist/esm/calcite-handle.entry.js +10 -10
  601. package/dist/esm/calcite-icon.entry.js +6 -6
  602. package/dist/esm/calcite-inline-editable.entry.js +12 -12
  603. package/dist/esm/calcite-input-date-picker.entry.js +18 -18
  604. package/dist/esm/calcite-input-message.entry.js +5 -5
  605. package/dist/esm/calcite-input-number.entry.js +13 -13
  606. package/dist/esm/calcite-input-text.entry.js +13 -13
  607. package/dist/esm/calcite-input-time-picker_2.entry.js +14 -14
  608. package/dist/esm/calcite-input.entry.js +13 -13
  609. package/dist/esm/calcite-label.entry.js +6 -6
  610. package/dist/esm/calcite-link.entry.js +7 -7
  611. package/dist/esm/calcite-list_3.entry.js +50 -40
  612. package/dist/esm/calcite-loader.entry.js +3 -3
  613. package/dist/esm/calcite-modal.entry.js +13 -13
  614. package/dist/esm/calcite-notice.entry.js +12 -12
  615. package/dist/esm/calcite-option_3.entry.js +10 -10
  616. package/dist/esm/calcite-pagination.entry.js +10 -10
  617. package/dist/esm/calcite-panel.entry.js +14 -14
  618. package/dist/esm/calcite-pick-list_3.entry.js +16 -16
  619. package/dist/esm/calcite-popover.entry.js +16 -16
  620. package/dist/esm/calcite-progress.entry.js +2 -2
  621. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  622. package/dist/esm/calcite-radio-button.entry.js +10 -10
  623. package/dist/esm/calcite-rating.entry.js +13 -13
  624. package/dist/esm/calcite-scrim.entry.js +9 -9
  625. package/dist/esm/calcite-segmented-control_2.entry.js +9 -9
  626. package/dist/esm/calcite-shell_3.entry.js +11 -11
  627. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  628. package/dist/esm/calcite-split-button.entry.js +4 -4
  629. package/dist/esm/calcite-stepper_2.entry.js +10 -10
  630. package/dist/esm/calcite-switch.entry.js +10 -10
  631. package/dist/esm/calcite-tab_4.entry.js +7 -7
  632. package/dist/esm/calcite-text-area.entry.js +15 -15
  633. package/dist/esm/calcite-tile-select_2.entry.js +5 -5
  634. package/dist/esm/calcite-tile.entry.js +8 -8
  635. package/dist/esm/calcite-tip_3.entry.js +11 -11
  636. package/dist/esm/calcite-tooltip.entry.js +9 -9
  637. package/dist/esm/calcite-tree_2.entry.js +9 -9
  638. package/dist/esm/calcite-value-list_2.entry.js +16 -16
  639. package/dist/esm/calcite.js +6 -6
  640. package/dist/esm/{composed-offset-position.esm-fb83e249.js → composed-offset-position.esm-2c2ff148.js} +1 -1
  641. package/dist/esm/{conditionalSlot-98fcfe31.js → conditionalSlot-734f45e3.js} +3 -3
  642. package/dist/esm/{debounce-911eef82.js → debounce-13053af0.js} +1 -1
  643. package/dist/esm/{dom-2b55c6b1.js → dom-3643d47b.js} +3 -3
  644. package/dist/esm/{filter-6a2a0d23.js → filter-c124b3a7.js} +2 -2
  645. package/dist/esm/{floating-ui-1f96fa4e.js → floating-ui-dde330fd.js} +71 -65
  646. package/dist/esm/{focusTrapComponent-9f5c20f0.js → focusTrapComponent-be382f0c.js} +2 -2
  647. package/dist/esm/{form-ef433149.js → form-9b4d08d5.js} +3 -3
  648. package/dist/esm/{guid-08c9d9d2.js → guid-00c961cf.js} +1 -1
  649. package/dist/esm/{index-34f68bbe.js → index-de813188.js} +1 -1
  650. package/dist/esm/index.js +2 -2
  651. package/dist/esm/{interactive-a2eb6b56.js → interactive-7577fa95.js} +1 -1
  652. package/dist/esm/{key-a12e3d36.js → key-204f54dc.js} +1 -1
  653. package/dist/esm/{label-e5638056.js → label-aa3ca023.js} +2 -2
  654. package/dist/esm/{loadable-7ddbc3f7.js → loadable-295e7059.js} +1 -1
  655. package/dist/esm/loader.js +6 -6
  656. package/dist/esm/{locale-cdbef5ac.js → locale-cf07a13b.js} +4 -4
  657. package/dist/esm/{math-2b6a45bc.js → math-81cb18a5.js} +1 -1
  658. package/dist/esm/{observers-58b3356b.js → observers-e24920a0.js} +1 -1
  659. package/dist/esm/{openCloseComponent-6350a6b9.js → openCloseComponent-d6957380.js} +2 -2
  660. package/dist/esm/{resources-f97f2e3d.js → resources-20a9105d.js} +1 -1
  661. package/dist/esm/{resources-95e5c0bc.js → resources-510afe06.js} +1 -1
  662. package/dist/esm/{resources-52988112.js → resources-b814eba0.js} +5 -5
  663. package/dist/esm/{resources-87498192.js → resources-b81c1240.js} +1 -1
  664. package/dist/esm/{resources-66bba32b.js → resources-d27d888f.js} +1 -1
  665. package/dist/esm/{resources-509df361.js → resources-f496ba11.js} +1 -1
  666. package/dist/esm/{sortable.esm-69990d9c.js → sortable.esm-8c3ec43a.js} +1 -1
  667. package/dist/esm/{t9n-c5155b27.js → t9n-62bf4e90.js} +3 -3
  668. package/dist/esm/{throttle-161e1712.js → throttle-ab3e5fce.js} +2 -2
  669. package/dist/esm/utils-119581ee.js +195 -0
  670. package/dist/esm/{utils-4c71f289.js → utils-1692b158.js} +3 -3
  671. package/dist/extras/docs-json.json +156 -30
  672. package/dist/extras/vscode-data.json +22 -2
  673. package/dist/loader/cdn.js +1 -1
  674. package/dist/loader/index.cjs.js +1 -1
  675. package/dist/loader/index.es2017.js +1 -1
  676. package/dist/loader/index.js +1 -1
  677. package/dist/types/components/color-picker/color-picker.d.ts +54 -23
  678. package/dist/types/components/color-picker/interfaces.d.ts +1 -0
  679. package/dist/types/components/color-picker/resources.d.ts +28 -18
  680. package/dist/types/components/color-picker/utils.d.ts +16 -7
  681. package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +33 -16
  682. package/dist/types/components/color-picker-hex-input/resources.d.ts +2 -2
  683. package/dist/types/components/color-picker-swatch/color-picker-swatch.d.ts +3 -2
  684. package/dist/types/components/color-picker-swatch/resources.d.ts +6 -1
  685. package/dist/types/components/list/list.d.ts +7 -2
  686. package/dist/types/components/list/resources.d.ts +1 -1
  687. package/dist/types/components.d.ts +62 -6
  688. package/dist/types/preact.d.ts +2 -1
  689. package/hydrate/index.js +796 -447
  690. package/package.json +4 -5
  691. package/dist/calcite/p-2927ff1d.js +0 -6
  692. package/dist/calcite/p-3623550f.entry.js +0 -6
  693. package/dist/calcite/p-5782f6ba.js +0 -6
  694. package/dist/calcite/p-5e1869b5.js +0 -6
  695. package/dist/calcite/p-663a4c37.js +0 -6
  696. package/dist/calcite/p-8b7561ca.js +0 -6
  697. package/dist/calcite/p-95860b15.entry.js +0 -6
  698. package/dist/calcite/p-b0a41644.js +0 -6
  699. package/dist/calcite/p-b1dcf567.js +0 -6
  700. package/dist/calcite/p-b73ede81.entry.js +0 -6
  701. package/dist/calcite/p-c107f270.entry.js +0 -6
  702. package/dist/calcite/p-f8d77f71.entry.js +0 -6
  703. package/dist/cjs/utils-78b4120a.js +0 -124
  704. package/dist/esm/utils-ab93be5f.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.4
4
+ * v1.4.0-next.6
5
5
  */
6
6
  'use strict';
7
7
 
@@ -10389,50 +10389,91 @@ class Alert {
10389
10389
  }; }
10390
10390
  }
10391
10391
 
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
10392
  const hexChar = /^[0-9A-F]$/i;
10399
- const shortHandHex = /^#[0-9A-F]{3}$/i;
10393
+ const shorthandHex = /^#[0-9A-F]{3}$/i;
10400
10394
  const longhandHex = /^#[0-9A-F]{6}$/i;
10401
- function isValidHex(hex) {
10402
- return isShorthandHex(hex) || isLonghandHex(hex);
10395
+ const shorthandHexWithAlpha = /^#[0-9A-F]{4}$/i;
10396
+ const longhandHexWithAlpha = /^#[0-9A-F]{8}$/i;
10397
+ const alphaToOpacity = (alpha) => Number((alpha * 100).toFixed());
10398
+ const opacityToAlpha = (opacity) => Number((opacity / 100).toFixed(2));
10399
+ function isValidHex(hex, hasAlpha = false) {
10400
+ return isShorthandHex(hex, hasAlpha) || isLonghandHex(hex, hasAlpha);
10401
+ }
10402
+ function evaluateHex(hex, length, pattern) {
10403
+ if (!hex) {
10404
+ return false;
10405
+ }
10406
+ return hex.length === length && pattern.test(hex);
10403
10407
  }
10404
- function isShorthandHex(hex) {
10405
- return hex && hex.length === 4 && shortHandHex.test(hex);
10408
+ function isShorthandHex(hex, hasAlpha = false) {
10409
+ const hexLength = hasAlpha ? 5 : 4;
10410
+ const hexPattern = hasAlpha ? shorthandHexWithAlpha : shorthandHex;
10411
+ return evaluateHex(hex, hexLength, hexPattern);
10406
10412
  }
10407
- function isLonghandHex(hex) {
10408
- return hex && hex.length === 7 && longhandHex.test(hex);
10413
+ function isLonghandHex(hex, hasAlpha = false) {
10414
+ const hexLength = hasAlpha ? 9 : 7;
10415
+ const hexPattern = hasAlpha ? longhandHexWithAlpha : longhandHex;
10416
+ return evaluateHex(hex, hexLength, hexPattern);
10409
10417
  }
10410
- function normalizeHex(hex) {
10418
+ function normalizeHex(hex, hasAlpha = false, convertFromHexToHexa = false) {
10411
10419
  hex = hex.toLowerCase();
10412
10420
  if (!hex.startsWith("#")) {
10413
10421
  hex = `#${hex}`;
10414
10422
  }
10415
- if (isShorthandHex(hex)) {
10416
- return rgbToHex(hexToRGB(hex));
10423
+ if (isShorthandHex(hex, hasAlpha)) {
10424
+ return rgbToHex(hexToRGB(hex, hasAlpha));
10425
+ }
10426
+ if (hasAlpha && convertFromHexToHexa && isValidHex(hex, false /* we only care about RGB hex for conversion */)) {
10427
+ const isShorthand = isShorthandHex(hex, false);
10428
+ return rgbToHex(hexToRGB(`${hex}${isShorthand ? "f" : "ff"}`, true));
10417
10429
  }
10418
10430
  return hex;
10419
10431
  }
10420
- function hexToRGB(hex) {
10421
- if (!isValidHex(hex)) {
10432
+ function hexify(color, hasAlpha = false) {
10433
+ return hasAlpha ? color.hexa() : color.hex();
10434
+ }
10435
+ function rgbToHex(color) {
10436
+ const { r, g, b } = color;
10437
+ const rChars = numToHex(r);
10438
+ const gChars = numToHex(g);
10439
+ const bChars = numToHex(b);
10440
+ const alphaChars = "a" in color ? numToHex(color.a * 255) : "";
10441
+ return `#${rChars}${gChars}${bChars}${alphaChars}`.toLowerCase();
10442
+ }
10443
+ function numToHex(num) {
10444
+ return num.toString(16).padStart(2, "0");
10445
+ }
10446
+ function normalizeAlpha(colorObject) {
10447
+ const normalized = { ...colorObject, a: colorObject.alpha ?? 1 /* Color() will omit alpha if 1 */ };
10448
+ delete normalized.alpha;
10449
+ return normalized;
10450
+ }
10451
+ function normalizeColor(alphaColorObject) {
10452
+ const normalized = { ...alphaColorObject, alpha: alphaColorObject.a ?? 1 };
10453
+ delete normalized.a;
10454
+ return normalized;
10455
+ }
10456
+ function hexToRGB(hex, hasAlpha = false) {
10457
+ if (!isValidHex(hex, hasAlpha)) {
10422
10458
  return null;
10423
10459
  }
10424
10460
  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 };
10461
+ let r, g, b, a;
10462
+ const isShorthand = hex.length === 3 || hex.length === 4;
10463
+ if (isShorthand) {
10464
+ const [first, second, third, fourth] = hex.split("");
10465
+ r = parseInt(`${first}${first}`, 16);
10466
+ g = parseInt(`${second}${second}`, 16);
10467
+ b = parseInt(`${third}${third}`, 16);
10468
+ a = parseInt(`${fourth}${fourth}`, 16) / 255;
10469
+ }
10470
+ else {
10471
+ r = parseInt(hex.slice(0, 2), 16);
10472
+ g = parseInt(hex.slice(2, 4), 16);
10473
+ b = parseInt(hex.slice(4, 6), 16);
10474
+ a = parseInt(hex.slice(6, 8), 16) / 255;
10475
+ }
10476
+ return isNaN(a) ? { r, g, b } : { r, g, b, a };
10436
10477
  }
10437
10478
  // these utils allow users to pass enum values as strings without having to access the enum
10438
10479
  // based on the approach suggested by https://github.com/microsoft/TypeScript/issues/17690#issuecomment-321365759,
@@ -10494,7 +10535,47 @@ function hasChannels(colorObject, ...channels) {
10494
10535
  return channels.every((channel) => channel && colorObject && `${channel}` in colorObject);
10495
10536
  }
10496
10537
  function colorEqual(value1, value2) {
10497
- return value1?.rgbNumber() === value2?.rgbNumber();
10538
+ return value1?.rgb().array().toString() === value2?.rgb().array().toString();
10539
+ }
10540
+ function alphaCompatible(mode) {
10541
+ return (mode === CSSColorMode.HEXA ||
10542
+ mode === CSSColorMode.RGBA_CSS ||
10543
+ mode === CSSColorMode.HSLA_CSS ||
10544
+ mode === ObjectColorMode.RGBA ||
10545
+ mode === ObjectColorMode.HSLA ||
10546
+ mode === ObjectColorMode.HSVA);
10547
+ }
10548
+ function toAlphaMode(mode) {
10549
+ const alphaMode = mode === CSSColorMode.HEX
10550
+ ? CSSColorMode.HEXA
10551
+ : mode === CSSColorMode.RGB_CSS
10552
+ ? CSSColorMode.RGBA_CSS
10553
+ : mode === CSSColorMode.HSL_CSS
10554
+ ? CSSColorMode.HSLA_CSS
10555
+ : mode === ObjectColorMode.RGB
10556
+ ? ObjectColorMode.RGBA
10557
+ : mode === ObjectColorMode.HSL
10558
+ ? ObjectColorMode.HSLA
10559
+ : mode === ObjectColorMode.HSV
10560
+ ? ObjectColorMode.HSVA
10561
+ : mode;
10562
+ return alphaMode;
10563
+ }
10564
+ function toNonAlphaMode(mode) {
10565
+ const nonAlphaMode = mode === CSSColorMode.HEXA
10566
+ ? CSSColorMode.HEX
10567
+ : mode === CSSColorMode.RGBA_CSS
10568
+ ? CSSColorMode.RGB_CSS
10569
+ : mode === CSSColorMode.HSLA_CSS
10570
+ ? CSSColorMode.HSL_CSS
10571
+ : mode === ObjectColorMode.RGBA
10572
+ ? ObjectColorMode.RGB
10573
+ : mode === ObjectColorMode.HSLA
10574
+ ? ObjectColorMode.HSL
10575
+ : mode === ObjectColorMode.HSVA
10576
+ ? ObjectColorMode.HSV
10577
+ : mode;
10578
+ return nonAlphaMode;
10498
10579
  }
10499
10580
 
10500
10581
  /**
@@ -14378,30 +14459,36 @@ function zeroArray(array, length) {
14378
14459
  var color = Color;
14379
14460
 
14380
14461
  const CSS$P = {
14462
+ channel: "channel",
14463
+ channels: "channels",
14464
+ colorField: "color-field",
14465
+ colorFieldScope: "scope--color-field",
14466
+ colorMode: "color-mode",
14467
+ colorModeContainer: "color-mode-container",
14381
14468
  container: "container",
14469
+ control: "control",
14470
+ controlAndScope: "control-and-scope",
14382
14471
  controlSection: "control-section",
14383
- hexOptions: "color-hex-options",
14384
- section: "section",
14472
+ deleteColor: "delete-color",
14385
14473
  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",
14474
+ hexAndChannelsGroup: "hex-and-channels-group",
14475
+ hexOptions: "color-hex-options",
14476
+ hueScope: "scope--hue",
14477
+ hueSlider: "hue-slider",
14478
+ opacityScope: "scope--opacity",
14479
+ opacitySlider: "opacity-slider",
14480
+ preview: "preview",
14481
+ previewAndSliders: "preview-and-sliders",
14394
14482
  saveColor: "save-color",
14395
- deleteColor: "delete-color",
14483
+ savedColor: "saved-color",
14484
+ savedColors: "saved-colors",
14396
14485
  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",
14486
+ savedColorsSection: "saved-colors-section",
14401
14487
  scope: "scope",
14402
- hueScope: "scope--hue",
14403
- colorFieldScope: "scope--color-field",
14404
- savedColor: "saved-color"
14488
+ section: "section",
14489
+ slider: "slider",
14490
+ sliders: "sliders",
14491
+ splitSection: "section--split"
14405
14492
  };
14406
14493
  const DEFAULT_COLOR$1 = color("#007AC2");
14407
14494
  const DEFAULT_STORAGE_KEY_PREFIX = "calcite-color-";
@@ -14415,24 +14502,28 @@ const HSV_LIMITS = {
14415
14502
  s: 100,
14416
14503
  v: 100
14417
14504
  };
14505
+ const OPACITY_LIMITS = {
14506
+ min: 0,
14507
+ max: 100
14508
+ };
14418
14509
  const DIMENSIONS = {
14419
14510
  s: {
14420
14511
  slider: {
14421
- height: 10,
14422
- width: 160
14512
+ height: 12,
14513
+ width: 104
14423
14514
  },
14424
14515
  colorField: {
14425
14516
  height: 80,
14426
14517
  width: 160
14427
14518
  },
14428
14519
  thumb: {
14429
- radius: 8
14520
+ radius: 10
14430
14521
  }
14431
14522
  },
14432
14523
  m: {
14433
14524
  slider: {
14434
- height: 14,
14435
- width: 272
14525
+ height: 12,
14526
+ width: 204
14436
14527
  },
14437
14528
  colorField: {
14438
14529
  height: 150,
@@ -14444,15 +14535,15 @@ const DIMENSIONS = {
14444
14535
  },
14445
14536
  l: {
14446
14537
  slider: {
14447
- height: 16,
14448
- width: 464
14538
+ height: 12,
14539
+ width: 384
14449
14540
  },
14450
14541
  colorField: {
14451
14542
  height: 200,
14452
14543
  width: 464
14453
14544
  },
14454
14545
  thumb: {
14455
- radius: 12
14546
+ radius: 10
14456
14547
  }
14457
14548
  }
14458
14549
  };
@@ -14471,22 +14562,17 @@ const decimalPlaces = (value) => {
14471
14562
  (match[2] ? +match[2] : 0));
14472
14563
  };
14473
14564
 
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}";
14565
+ 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
14566
 
14476
14567
  const throttleFor60FpsInMs = 16;
14477
- const defaultValue = normalizeHex(DEFAULT_COLOR$1.hex());
14478
- const defaultFormat = "auto";
14479
14568
  class ColorPicker {
14480
14569
  constructor(hostRef) {
14481
14570
  registerInstance(this, hostRef);
14482
14571
  this.calciteColorPickerChange = createEvent(this, "calciteColorPickerChange", 6);
14483
14572
  this.calciteColorPickerInput = createEvent(this, "calciteColorPickerInput", 6);
14484
- this.colorFieldAndSliderHovered = false;
14485
- this.hueThumbState = "idle";
14486
14573
  this.internalColorUpdateContext = null;
14487
14574
  this.mode = CSSColorMode.HEX;
14488
14575
  this.shiftKeyChannelAdjustment = 0;
14489
- this.sliderThumbState = "idle";
14490
14576
  this.handleTabActivate = (event) => {
14491
14577
  this.channelMode = event.currentTarget.getAttribute("data-color-mode");
14492
14578
  this.updateChannelsFromColor(this.color);
@@ -14531,7 +14617,7 @@ class ColorPicker {
14531
14617
  this.internalColorSet(null);
14532
14618
  return;
14533
14619
  }
14534
- const normalizedHex = color$1 && normalizeHex(color$1.hex());
14620
+ const normalizedHex = color$1 && normalizeHex(hexify(color$1, alphaCompatible(this.mode)));
14535
14621
  if (hex !== normalizedHex) {
14536
14622
  this.internalColorSet(color(hex));
14537
14623
  }
@@ -14543,16 +14629,20 @@ class ColorPicker {
14543
14629
  this.handleChannelInput = (event) => {
14544
14630
  const input = event.currentTarget;
14545
14631
  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]];
14632
+ const isAlphaChannel = channelIndex === 3;
14633
+ const limit = isAlphaChannel
14634
+ ? OPACITY_LIMITS.max
14635
+ : this.channelMode === "rgb"
14636
+ ? RGB_LIMITS[Object.keys(RGB_LIMITS)[channelIndex]]
14637
+ : HSV_LIMITS[Object.keys(HSV_LIMITS)[channelIndex]];
14549
14638
  let inputValue;
14550
14639
  if (this.allowEmpty && !input.value) {
14551
14640
  inputValue = "";
14552
14641
  }
14553
14642
  else {
14554
- const value = Number(input.value) + this.shiftKeyChannelAdjustment;
14555
- const clamped = clamp(value, 0, limit);
14643
+ const value = Number(input.value);
14644
+ const adjustedValue = value + this.shiftKeyChannelAdjustment;
14645
+ const clamped = clamp(adjustedValue, 0, limit);
14556
14646
  inputValue = clamped.toString();
14557
14647
  }
14558
14648
  input.value = inputValue;
@@ -14566,11 +14656,13 @@ class ColorPicker {
14566
14656
  const channels = [...this.channels];
14567
14657
  const shouldClearChannels = this.allowEmpty && !input.value;
14568
14658
  if (shouldClearChannels) {
14569
- this.channels = [null, null, null];
14659
+ this.channels = [null, null, null, null];
14570
14660
  this.internalColorSet(null);
14571
14661
  return;
14572
14662
  }
14573
- channels[channelIndex] = Number(input.value);
14663
+ const isAlphaChannel = channelIndex === 3;
14664
+ const value = Number(input.value);
14665
+ channels[channelIndex] = isAlphaChannel ? opacityToAlpha(value) : value;
14574
14666
  this.updateColorFromChannels(channels);
14575
14667
  };
14576
14668
  this.handleSavedColorKeyDown = (event) => {
@@ -14579,144 +14671,101 @@ class ColorPicker {
14579
14671
  this.handleSavedColorSelect(event);
14580
14672
  }
14581
14673
  };
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) => {
14674
+ this.handleColorFieldPointerDown = (event) => {
14592
14675
  if (!isPrimaryPointerButton(event)) {
14593
14676
  return;
14594
14677
  }
14595
14678
  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();
14679
+ document.addEventListener("pointermove", this.globalPointerMoveHandler);
14680
+ document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14681
+ this.activeCanvasInfo = {
14682
+ context: this.colorFieldRenderingContext,
14683
+ bounds: this.colorFieldRenderingContext.canvas.getBoundingClientRect()
14684
+ };
14685
+ this.captureColorFieldColor(offsetX, offsetY);
14686
+ this.colorFieldScopeNode.focus();
14687
+ };
14688
+ this.handleHueSliderPointerDown = (event) => {
14689
+ if (!isPrimaryPointerButton(event)) {
14690
+ return;
14601
14691
  }
14602
- else if (region === "slider") {
14603
- this.sliderThumbState = "drag";
14604
- this.captureHueSliderColor(offsetX);
14605
- this.hueScopeNode?.focus();
14692
+ const { offsetX } = event;
14693
+ document.addEventListener("pointermove", this.globalPointerMoveHandler);
14694
+ document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14695
+ this.activeCanvasInfo = {
14696
+ context: this.hueSliderRenderingContext,
14697
+ bounds: this.hueSliderRenderingContext.canvas.getBoundingClientRect()
14698
+ };
14699
+ this.captureHueSliderColor(offsetX);
14700
+ this.hueScopeNode.focus();
14701
+ };
14702
+ this.handleOpacitySliderPointerDown = (event) => {
14703
+ if (!isPrimaryPointerButton(event)) {
14704
+ return;
14606
14705
  }
14706
+ const { offsetX } = event;
14607
14707
  document.addEventListener("pointermove", this.globalPointerMoveHandler);
14608
14708
  document.addEventListener("pointerup", this.globalPointerUpHandler, { once: true });
14609
- this.activeColorFieldAndSliderRect =
14610
- this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect();
14709
+ this.activeCanvasInfo = {
14710
+ context: this.opacitySliderRenderingContext,
14711
+ bounds: this.opacitySliderRenderingContext.canvas.getBoundingClientRect()
14712
+ };
14713
+ this.captureOpacitySliderValue(offsetX);
14714
+ this.opacityScopeNode.focus();
14611
14715
  };
14612
14716
  this.globalPointerUpHandler = (event) => {
14613
14717
  if (!isPrimaryPointerButton(event)) {
14614
14718
  return;
14615
14719
  }
14616
- const previouslyDragging = this.sliderThumbState === "drag" || this.hueThumbState === "drag";
14617
- this.hueThumbState = "idle";
14618
- this.sliderThumbState = "idle";
14619
- this.activeColorFieldAndSliderRect = null;
14620
- this.drawColorFieldAndSlider();
14720
+ const previouslyDragging = this.activeCanvasInfo;
14721
+ this.activeCanvasInfo = null;
14722
+ this.drawColorControls();
14621
14723
  if (previouslyDragging) {
14622
14724
  this.calciteColorPickerChange.emit();
14623
14725
  }
14624
14726
  };
14625
14727
  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)) {
14728
+ const { activeCanvasInfo, el } = this;
14729
+ if (!el.isConnected || !activeCanvasInfo) {
14630
14730
  return;
14631
14731
  }
14732
+ const { context, bounds } = activeCanvasInfo;
14632
14733
  let samplingX;
14633
14734
  let samplingY;
14634
- const colorFieldAndSliderRect = this.activeColorFieldAndSliderRect;
14635
14735
  const { clientX, clientY } = event;
14636
- if (this.colorFieldAndSliderHovered) {
14637
- samplingX = clientX - colorFieldAndSliderRect.x;
14638
- samplingY = clientY - colorFieldAndSliderRect.y;
14736
+ if (context.canvas.matches(":hover")) {
14737
+ samplingX = clientX - bounds.x;
14738
+ samplingY = clientY - bounds.y;
14639
14739
  }
14640
14740
  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) {
14741
+ // snap x and y to the closest edge
14742
+ if (clientX < bounds.x + bounds.width && clientX > bounds.x) {
14743
+ samplingX = clientX - bounds.x;
14744
+ }
14745
+ else if (clientX < bounds.x) {
14649
14746
  samplingX = 0;
14650
14747
  }
14651
14748
  else {
14652
- samplingX = colorFieldWidth - 1;
14749
+ samplingX = bounds.width;
14653
14750
  }
14654
- if (clientY < colorFieldAndSliderRect.y + colorFieldHeight + hueSliderHeight &&
14655
- clientY > colorFieldAndSliderRect.y) {
14656
- samplingY = clientY - colorFieldAndSliderRect.y;
14751
+ if (clientY < bounds.y + bounds.height && clientY > bounds.y) {
14752
+ samplingY = clientY - bounds.y;
14657
14753
  }
14658
- else if (clientY < colorFieldAndSliderRect.y) {
14754
+ else if (clientY < bounds.y) {
14659
14755
  samplingY = 0;
14660
14756
  }
14661
14757
  else {
14662
- samplingY = colorFieldHeight + hueSliderHeight;
14758
+ samplingY = bounds.height;
14663
14759
  }
14664
14760
  }
14665
- if (hueThumbDragging) {
14761
+ if (context === this.colorFieldRenderingContext) {
14666
14762
  this.captureColorFieldColor(samplingX, samplingY, false);
14667
14763
  }
14668
- else {
14764
+ else if (context === this.hueSliderRenderingContext) {
14669
14765
  this.captureHueSliderColor(samplingX);
14670
14766
  }
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
- }
14767
+ else if (context === this.opacitySliderRenderingContext) {
14768
+ this.captureOpacitySliderValue(samplingX);
14720
14769
  }
14721
14770
  };
14722
14771
  this.storeColorFieldScope = (node) => {
@@ -14732,23 +14781,35 @@ class ColorPicker {
14732
14781
  return (hAsync("calcite-tab-title", { class: CSS$P.colorMode, "data-color-mode": channelMode, key: channelMode, onCalciteTabsActivate: this.handleTabActivate, selected: selected }, label));
14733
14782
  };
14734
14783
  this.renderChannelsTab = (channelMode) => {
14735
- const { channelMode: activeChannelMode, channels, messages } = this;
14784
+ const { allowEmpty, channelMode: activeChannelMode, channels, messages, alphaChannel } = this;
14736
14785
  const selected = channelMode === activeChannelMode;
14737
14786
  const isRgb = channelMode === "rgb";
14738
- const channelLabels = isRgb
14739
- ? [messages.r, messages.g, messages.b]
14740
- : [messages.h, messages.s, messages.v];
14741
14787
  const channelAriaLabels = isRgb
14742
14788
  ? [messages.red, messages.green, messages.blue]
14743
14789
  : [messages.hue, messages.saturation, messages.value];
14744
14790
  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)))));
14791
+ const channelsToRender = alphaChannel ? channels : channels.slice(0, 3);
14792
+ return (hAsync("calcite-tab", { class: CSS$P.control, key: channelMode, selected: selected }, hAsync("div", { class: CSS$P.channels, dir: "ltr" }, channelsToRender.map((channelValue, index) => {
14793
+ const isAlphaChannel = index === 3;
14794
+ if (isAlphaChannel) {
14795
+ channelValue =
14796
+ allowEmpty && !channelValue ? channelValue : alphaToOpacity(channelValue);
14797
+ }
14798
+ /* the channel container is ltr, so we apply the host's direction */
14799
+ return this.renderChannel(channelValue, index, channelAriaLabels[index], direction, isAlphaChannel ? "%" : "");
14800
+ }))));
14801
+ };
14802
+ this.renderChannel = (value, index, ariaLabel, direction, suffix) => {
14803
+ 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",
14804
+ // workaround to ensure input borders overlap as desired
14805
+ // this is because the build transforms margin-left to its
14806
+ // logical-prop, which is undesired as channels are always ltr
14807
+ style: {
14808
+ marginLeft: index > 0 && !(this.scale === "s" && this.alphaChannel && index === 3) ? "-1px" : ""
14809
+ }, suffixText: suffix, type: "number", value: value?.toString() }));
14748
14810
  };
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
14811
  this.deleteColor = () => {
14751
- const colorToDelete = this.color.hex();
14812
+ const colorToDelete = hexify(this.color, this.alphaChannel);
14752
14813
  const inStorage = this.savedColors.indexOf(colorToDelete) > -1;
14753
14814
  if (!inStorage) {
14754
14815
  return;
@@ -14761,7 +14822,7 @@ class ColorPicker {
14761
14822
  }
14762
14823
  };
14763
14824
  this.saveColor = () => {
14764
- const colorToSave = this.color.hex();
14825
+ const colorToSave = hexify(this.color, this.alphaChannel);
14765
14826
  const alreadySaved = this.savedColors.indexOf(colorToSave) > -1;
14766
14827
  if (alreadySaved) {
14767
14828
  return;
@@ -14773,12 +14834,18 @@ class ColorPicker {
14773
14834
  localStorage.setItem(storageKey, JSON.stringify(savedColors));
14774
14835
  }
14775
14836
  };
14776
- this.drawColorFieldAndSlider = throttle$1(() => {
14777
- if (!this.fieldAndSliderRenderingContext) {
14778
- return;
14837
+ this.drawColorControls = throttle$1((type = "all") => {
14838
+ if ((type === "all" || type === "color-field") && this.colorFieldRenderingContext) {
14839
+ this.drawColorField();
14840
+ }
14841
+ if ((type === "all" || type === "hue-slider") && this.hueSliderRenderingContext) {
14842
+ this.drawHueSlider();
14843
+ }
14844
+ if (this.alphaChannel &&
14845
+ (type === "all" || type === "opacity-slider") &&
14846
+ this.opacitySliderRenderingContext) {
14847
+ this.drawOpacitySlider();
14779
14848
  }
14780
- this.drawColorField();
14781
- this.drawHueSlider();
14782
14849
  }, throttleFor60FpsInMs);
14783
14850
  this.captureColorFieldColor = (x, y, skipEqual = true) => {
14784
14851
  const { dimensions: { colorField: { height, width } } } = this;
@@ -14786,24 +14853,56 @@ class ColorPicker {
14786
14853
  const value = Math.round((HSV_LIMITS.v / height) * (height - y));
14787
14854
  this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(saturation).value(value), skipEqual);
14788
14855
  };
14789
- this.initColorFieldAndSlider = (canvas) => {
14790
- this.fieldAndSliderRenderingContext = canvas.getContext("2d");
14791
- this.updateCanvasSize(canvas);
14856
+ this.initColorField = (canvas) => {
14857
+ this.colorFieldRenderingContext = canvas.getContext("2d");
14858
+ this.updateCanvasSize("color-field");
14859
+ this.drawColorControls();
14860
+ };
14861
+ this.initHueSlider = (canvas) => {
14862
+ this.hueSliderRenderingContext = canvas.getContext("2d");
14863
+ this.updateCanvasSize("hue-slider");
14864
+ this.drawHueSlider();
14865
+ };
14866
+ this.initOpacitySlider = (canvas) => {
14867
+ this.opacitySliderRenderingContext = canvas.getContext("2d");
14868
+ this.updateCanvasSize("opacity-slider");
14869
+ this.drawOpacitySlider();
14870
+ };
14871
+ this.storeOpacityScope = (node) => {
14872
+ this.opacityScopeNode = node;
14873
+ };
14874
+ this.handleOpacityScopeKeyDown = (event) => {
14875
+ const modifier = event.shiftKey ? 10 : 1;
14876
+ const { key } = event;
14877
+ const arrowKeyToXOffset = {
14878
+ ArrowUp: 1,
14879
+ ArrowRight: 1,
14880
+ ArrowDown: -1,
14881
+ ArrowLeft: -1
14882
+ };
14883
+ if (arrowKeyToXOffset[key]) {
14884
+ event.preventDefault();
14885
+ const delta = opacityToAlpha(arrowKeyToXOffset[key] * modifier);
14886
+ this.captureHueSliderColor(this.opacityScopeLeft + delta);
14887
+ }
14792
14888
  };
14793
14889
  this.allowEmpty = false;
14890
+ this.alphaChannel = false;
14891
+ this.channelsDisabled = false;
14794
14892
  this.color = DEFAULT_COLOR$1;
14795
14893
  this.disabled = false;
14796
- this.format = defaultFormat;
14797
- this.hideHex = false;
14894
+ this.format = "auto";
14798
14895
  this.hideChannels = false;
14896
+ this.hexDisabled = false;
14897
+ this.hideHex = false;
14799
14898
  this.hideSaved = false;
14899
+ this.savedDisabled = false;
14800
14900
  this.scale = "m";
14801
14901
  this.storageId = undefined;
14802
14902
  this.messageOverrides = undefined;
14803
14903
  this.numberingSystem = undefined;
14804
- this.value = defaultValue;
14904
+ this.value = normalizeHex(hexify(DEFAULT_COLOR$1, this.alphaChannel));
14805
14905
  this.defaultMessages = undefined;
14806
- this.colorFieldAndSliderInteractive = false;
14807
14906
  this.channelMode = "rgb";
14808
14907
  this.channels = this.toChannels(DEFAULT_COLOR$1);
14809
14908
  this.dimensions = DIMENSIONS.m;
@@ -14812,12 +14911,19 @@ class ColorPicker {
14812
14911
  this.savedColors = [];
14813
14912
  this.colorFieldScopeTop = undefined;
14814
14913
  this.colorFieldScopeLeft = undefined;
14815
- this.scopeOrientation = undefined;
14816
14914
  this.hueScopeLeft = undefined;
14817
- this.hueScopeTop = undefined;
14915
+ this.opacityScopeLeft = undefined;
14916
+ this.scopeOrientation = undefined;
14917
+ }
14918
+ handleAlphaChannelChange(alphaChannel) {
14919
+ const { format } = this;
14920
+ if (alphaChannel && format !== "auto" && !alphaCompatible(format)) {
14921
+ console.warn(`ignoring alphaChannel as the current format (${format}) does not support alpha`);
14922
+ this.alphaChannel = false;
14923
+ }
14818
14924
  }
14819
14925
  handleColorChange(color, oldColor) {
14820
- this.drawColorFieldAndSlider();
14926
+ this.drawColorControls();
14821
14927
  this.updateChannelsFromColor(color);
14822
14928
  this.previousColor = oldColor;
14823
14929
  }
@@ -14827,7 +14933,8 @@ class ColorPicker {
14827
14933
  }
14828
14934
  handleScaleChange(scale = "m") {
14829
14935
  this.updateDimensions(scale);
14830
- this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas);
14936
+ this.updateCanvasSize("all");
14937
+ this.drawColorControls();
14831
14938
  }
14832
14939
  onMessagesChange() {
14833
14940
  /* wired up by t9n util */
@@ -14844,9 +14951,9 @@ class ColorPicker {
14844
14951
  return;
14845
14952
  }
14846
14953
  modeChanged = this.mode !== nextMode;
14847
- this.setMode(nextMode);
14954
+ this.setMode(nextMode, this.internalColorUpdateContext === null);
14848
14955
  }
14849
- const dragging = this.sliderThumbState === "drag" || this.hueThumbState === "drag";
14956
+ const dragging = this.activeCanvasInfo;
14850
14957
  if (this.internalColorUpdateContext === "initial") {
14851
14958
  return;
14852
14959
  }
@@ -14857,17 +14964,16 @@ class ColorPicker {
14857
14964
  }
14858
14965
  return;
14859
14966
  }
14860
- const color$1 = allowEmpty && !value ? null : color(value);
14967
+ const color$1 = allowEmpty && !value
14968
+ ? null
14969
+ : color(value != null && typeof value === "object" && alphaCompatible(this.mode)
14970
+ ? normalizeColor(value)
14971
+ : value);
14861
14972
  const colorChanged = !colorEqual(color$1, this.color);
14862
14973
  if (modeChanged || colorChanged) {
14863
- this.internalColorSet(color$1, true, "internal");
14974
+ this.internalColorSet(color$1, this.alphaChannel && !(this.mode.endsWith("a") || this.mode.endsWith("a-css")), "internal");
14864
14975
  }
14865
14976
  }
14866
- //--------------------------------------------------------------------------
14867
- //
14868
- // Internal State/Props
14869
- //
14870
- //--------------------------------------------------------------------------
14871
14977
  get baseColorFieldColor() {
14872
14978
  return this.color || this.previousColor || DEFAULT_COLOR$1;
14873
14979
  }
@@ -14923,7 +15029,7 @@ class ColorPicker {
14923
15029
  if (!valueIsCompatible) {
14924
15030
  this.showIncompatibleColorWarning(value, format);
14925
15031
  }
14926
- this.setMode(format);
15032
+ this.setMode(format, false);
14927
15033
  this.internalColorSet(initialColor, false, "initial");
14928
15034
  this.updateDimensions(this.scale);
14929
15035
  const storageKey = `${DEFAULT_STORAGE_KEY_PREFIX}${this.storageId}`;
@@ -14954,34 +15060,38 @@ class ColorPicker {
14954
15060
  //
14955
15061
  //--------------------------------------------------------------------------
14956
15062
  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;
15063
+ 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;
15064
+ const selectedColorInHex = color ? hexify(color, alphaChannel) : null;
15065
+ const hueTop = thumbRadius;
15066
+ const hueLeft = hueScopeLeft ?? (sliderWidth * DEFAULT_COLOR$1.hue()) / HSV_LIMITS.h;
15067
+ const opacityTop = thumbRadius;
15068
+ const opacityLeft = opacityScopeLeft ??
15069
+ (colorFieldWidth * alphaToOpacity(DEFAULT_COLOR$1.alpha())) / OPACITY_LIMITS.max;
14963
15070
  const noColor = color === null;
14964
15071
  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,
15072
+ const noHex = hexDisabled || hideHex;
15073
+ const noChannels = channelsDisabled || hideChannels;
15074
+ const noSaved = savedDisabled || hideSaved;
15075
+ return (hAsync("div", { class: CSS$P.container }, hAsync("div", { class: CSS$P.controlAndScope }, hAsync("canvas", { class: CSS$P.colorField, onPointerDown: this.handleColorFieldPointerDown,
15076
+ // eslint-disable-next-line react/jsx-sort-props
15077
+ 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",
14969
15078
  // 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",
15079
+ 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,
14971
15080
  // 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",
15081
+ 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",
14973
15082
  // eslint-disable-next-line react/jsx-sort-props
14974
- ref: this.storeHueScope })), hideHex && hideChannels ? null : (hAsync("div", { class: {
15083
+ ref: this.storeHueScope })), alphaChannel ? (hAsync("div", { class: CSS$P.controlAndScope }, hAsync("canvas", { class: { [CSS$P.slider]: true, [CSS$P.opacitySlider]: true }, onPointerDown: this.handleOpacitySliderPointerDown,
15084
+ // eslint-disable-next-line react/jsx-sort-props
15085
+ 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",
15086
+ // eslint-disable-next-line react/jsx-sort-props
15087
+ ref: this.storeOpacityScope }))) : null)), noHex && noChannels ? null : (hAsync("div", { class: {
14975
15088
  [CSS$P.controlSection]: true,
14976
15089
  [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: {
15090
+ } }, 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
15091
  [CSS$P.colorModeContainer]: true,
14982
15092
  [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 })))
15093
+ }, 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 }, [
15094
+ ...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
15095
  ])) : null))));
14986
15096
  }
14987
15097
  // --------------------------------------------------------------------------
@@ -14997,23 +15107,38 @@ class ColorPicker {
14997
15107
  showIncompatibleColorWarning(value, format) {
14998
15108
  console.warn(`ignoring color value (${value}) as it is not compatible with the current format (${format})`);
14999
15109
  }
15000
- setMode(format) {
15001
- this.mode = format === "auto" ? this.mode : format;
15110
+ setMode(format, warn = true) {
15111
+ const mode = format === "auto" ? this.mode : format;
15112
+ this.mode = this.ensureCompatibleMode(mode, warn);
15113
+ }
15114
+ ensureCompatibleMode(mode, warn) {
15115
+ const { alphaChannel } = this;
15116
+ const isAlphaCompatible = alphaCompatible(mode);
15117
+ if (alphaChannel && !isAlphaCompatible) {
15118
+ const alphaMode = toAlphaMode(mode);
15119
+ if (warn) {
15120
+ console.warn(`setting format to (${alphaMode}) as the provided one (${mode}) does not support alpha`);
15121
+ }
15122
+ return alphaMode;
15123
+ }
15124
+ if (!alphaChannel && isAlphaCompatible) {
15125
+ const nonAlphaMode = toNonAlphaMode(mode);
15126
+ if (warn) {
15127
+ console.warn(`setting format to (${nonAlphaMode}) as the provided one (${mode}) does not support alpha`);
15128
+ }
15129
+ return nonAlphaMode;
15130
+ }
15131
+ return mode;
15002
15132
  }
15003
15133
  captureHueSliderColor(x) {
15004
15134
  const { dimensions: { slider: { width } } } = this;
15005
15135
  const hue = (360 / width) * x;
15006
15136
  this.internalColorSet(this.baseColorFieldColor.hue(hue), false);
15007
15137
  }
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";
15138
+ captureOpacitySliderValue(x) {
15139
+ const { dimensions: { slider: { width } } } = this;
15140
+ const alpha = opacityToAlpha((OPACITY_LIMITS.max / width) * x);
15141
+ this.internalColorSet(this.baseColorFieldColor.alpha(alpha), false);
15017
15142
  }
15018
15143
  internalColorSet(color, skipEqual = true, context = "user-interaction") {
15019
15144
  if (skipEqual && colorEqual(color, this.color)) {
@@ -15030,16 +15155,25 @@ class ColorPicker {
15030
15155
  }
15031
15156
  const hexMode = "hex";
15032
15157
  if (format.includes(hexMode)) {
15033
- return normalizeHex(color.round()[hexMode]());
15158
+ const hasAlpha = format === CSSColorMode.HEXA;
15159
+ return normalizeHex(hexify(color.round(), hasAlpha), hasAlpha);
15034
15160
  }
15035
15161
  if (format.includes("-css")) {
15036
- return color[format.replace("-css", "").replace("a", "")]().round().string();
15037
- }
15038
- const colorObject = color[format]().round().object();
15162
+ const value = color[format.replace("-css", "").replace("a", "")]().round().string();
15163
+ // Color omits alpha values when alpha is 1
15164
+ const needToInjectAlpha = (format.endsWith("a") || format.endsWith("a-css")) && color.alpha() === 1;
15165
+ if (needToInjectAlpha) {
15166
+ const model = value.slice(0, 3);
15167
+ const values = value.slice(4, -1);
15168
+ return `${model}a(${values}, ${color.alpha()})`;
15169
+ }
15170
+ return value;
15171
+ }
15172
+ const colorObject =
15173
+ /* Color() does not support hsva, hsla nor rgba, so we use the non-alpha mode */
15174
+ color[toNonAlphaMode(format)]().round().object();
15039
15175
  if (format.endsWith("a")) {
15040
- // normalize alpha prop
15041
- colorObject.a = colorObject.alpha;
15042
- delete colorObject.alpha;
15176
+ return normalizeAlpha(colorObject);
15043
15177
  }
15044
15178
  return colorObject;
15045
15179
  }
@@ -15051,9 +15185,14 @@ class ColorPicker {
15051
15185
  this.dimensions = DIMENSIONS[scale];
15052
15186
  }
15053
15187
  drawColorField() {
15054
- const context = this.fieldAndSliderRenderingContext;
15188
+ const context = this.colorFieldRenderingContext;
15055
15189
  const { dimensions: { colorField: { height, width } } } = this;
15056
- context.fillStyle = this.baseColorFieldColor.hsv().saturationv(100).value(100).string();
15190
+ context.fillStyle = this.baseColorFieldColor
15191
+ .hsv()
15192
+ .saturationv(100)
15193
+ .value(100)
15194
+ .alpha(1)
15195
+ .string();
15057
15196
  context.fillRect(0, 0, width, height);
15058
15197
  const whiteGradient = context.createLinearGradient(0, 0, width, 0);
15059
15198
  whiteGradient.addColorStop(0, "rgba(255,255,255,1)");
@@ -15068,6 +15207,9 @@ class ColorPicker {
15068
15207
  this.drawActiveColorFieldColor();
15069
15208
  }
15070
15209
  setCanvasContextSize(canvas, { height, width }) {
15210
+ if (!canvas) {
15211
+ return;
15212
+ }
15071
15213
  const devicePixelRatio = window.devicePixelRatio || 1;
15072
15214
  canvas.width = width * devicePixelRatio;
15073
15215
  canvas.height = height * devicePixelRatio;
@@ -15076,21 +15218,21 @@ class ColorPicker {
15076
15218
  const context = canvas.getContext("2d");
15077
15219
  context.scale(devicePixelRatio, devicePixelRatio);
15078
15220
  }
15079
- updateCanvasSize(canvas) {
15080
- if (!canvas) {
15081
- return;
15221
+ updateCanvasSize(context = "all") {
15222
+ const { dimensions } = this;
15223
+ if (context === "all" || context === "color-field") {
15224
+ this.setCanvasContextSize(this.colorFieldRenderingContext?.canvas, dimensions.colorField);
15225
+ }
15226
+ const adjustedSliderDimensions = {
15227
+ width: dimensions.slider.width,
15228
+ height: dimensions.slider.height + (dimensions.thumb.radius - dimensions.slider.height / 2) * 2
15229
+ };
15230
+ if (context === "all" || context === "hue-slider") {
15231
+ this.setCanvasContextSize(this.hueSliderRenderingContext?.canvas, adjustedSliderDimensions);
15232
+ }
15233
+ if (context === "all" || context === "opacity-slider") {
15234
+ this.setCanvasContextSize(this.opacitySliderRenderingContext?.canvas, adjustedSliderDimensions);
15082
15235
  }
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
15236
  }
15095
15237
  drawActiveColorFieldColor() {
15096
15238
  const { color } = this;
@@ -15105,22 +15247,23 @@ class ColorPicker {
15105
15247
  this.colorFieldScopeLeft = x;
15106
15248
  this.colorFieldScopeTop = y;
15107
15249
  });
15108
- this.drawThumb(this.fieldAndSliderRenderingContext, radius, x, y, hsvColor, this.hueThumbState);
15250
+ this.drawThumb(this.colorFieldRenderingContext, radius, x, y, hsvColor);
15109
15251
  }
15110
- drawThumb(context, radius, x, y, color, state) {
15252
+ drawThumb(context, radius, x, y, color) {
15111
15253
  const startAngle = 0;
15112
15254
  const endAngle = 2 * Math.PI;
15255
+ const outlineWidth = 1;
15256
+ radius = radius - outlineWidth;
15113
15257
  context.beginPath();
15114
15258
  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
15259
  context.fillStyle = "#fff";
15118
15260
  context.fill();
15261
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15262
+ context.lineWidth = outlineWidth;
15263
+ context.stroke();
15119
15264
  context.beginPath();
15120
15265
  context.arc(x, y, radius - 3, startAngle, endAngle);
15121
- context.shadowBlur = 0;
15122
- context.shadowColor = "transparent";
15123
- context.fillStyle = color.rgb().string();
15266
+ context.fillStyle = color.rgb().alpha(1).string();
15124
15267
  context.fill();
15125
15268
  }
15126
15269
  drawActiveHueSliderColor() {
@@ -15129,18 +15272,19 @@ class ColorPicker {
15129
15272
  return;
15130
15273
  }
15131
15274
  const hsvColor = color.hsv().saturationv(100).value(100);
15132
- const { dimensions: { colorField: { height: colorFieldHeight }, slider: { height, width }, thumb: { radius } } } = this;
15275
+ const { dimensions: { slider: { height, width }, thumb: { radius } } } = this;
15133
15276
  const x = hsvColor.hue() / (360 / width);
15134
- const y = height / 2 + colorFieldHeight;
15277
+ const y = radius - height / 2 + height / 2;
15135
15278
  requestAnimationFrame(() => {
15136
15279
  this.hueScopeLeft = x;
15137
- this.hueScopeTop = y;
15138
15280
  });
15139
- this.drawThumb(this.fieldAndSliderRenderingContext, radius, x, y, hsvColor, this.sliderThumbState);
15281
+ this.drawThumb(this.hueSliderRenderingContext, radius, x, y, hsvColor);
15140
15282
  }
15141
15283
  drawHueSlider() {
15142
- const context = this.fieldAndSliderRenderingContext;
15143
- const { dimensions: { colorField: { height: colorFieldHeight }, slider: { height, width } } } = this;
15284
+ const context = this.hueSliderRenderingContext;
15285
+ const { dimensions: { slider: { height, width }, thumb: { radius: thumbRadius } } } = this;
15286
+ const x = 0;
15287
+ const y = thumbRadius - height / 2;
15144
15288
  const gradient = context.createLinearGradient(0, 0, width, 0);
15145
15289
  const hueSliderColorStopKeywords = ["red", "yellow", "lime", "cyan", "blue", "magenta", "red"];
15146
15290
  const offset = 1 / (hueSliderColorStopKeywords.length - 1);
@@ -15149,27 +15293,107 @@ class ColorPicker {
15149
15293
  gradient.addColorStop(currentOffset, color(keyword).string());
15150
15294
  currentOffset += offset;
15151
15295
  });
15296
+ context.clearRect(0, 0, width, height + this.getSliderCapSpacing() * 2);
15297
+ this.drawSliderPath(context, height, width, x, y);
15152
15298
  context.fillStyle = gradient;
15153
- context.clearRect(0, colorFieldHeight, width, height + this.getSliderCapSpacing() * 2);
15154
- context.fillRect(0, colorFieldHeight, width, height);
15299
+ context.fill();
15300
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15301
+ context.lineWidth = 1;
15302
+ context.stroke();
15155
15303
  this.drawActiveHueSliderColor();
15156
15304
  }
15305
+ drawOpacitySlider() {
15306
+ const context = this.opacitySliderRenderingContext;
15307
+ const { baseColorFieldColor: previousColor, dimensions: { slider: { height, width }, thumb: { radius: thumbRadius } } } = this;
15308
+ const x = 0;
15309
+ const y = thumbRadius - height / 2;
15310
+ context.clearRect(0, 0, width, height + this.getSliderCapSpacing() * 2);
15311
+ const gradient = context.createLinearGradient(0, y, width, 0);
15312
+ const startColor = previousColor.rgb().alpha(0);
15313
+ const midColor = previousColor.rgb().alpha(0.5);
15314
+ const endColor = previousColor.rgb().alpha(1);
15315
+ gradient.addColorStop(0, startColor.string());
15316
+ gradient.addColorStop(0.5, midColor.string());
15317
+ gradient.addColorStop(1, endColor.string());
15318
+ this.drawSliderPath(context, height, width, x, y);
15319
+ const pattern = context.createPattern(this.getCheckeredBackgroundPattern(), "repeat");
15320
+ context.fillStyle = pattern;
15321
+ context.fill();
15322
+ context.fillStyle = gradient;
15323
+ context.fill();
15324
+ context.strokeStyle = "rgba(0,0,0,0.3)";
15325
+ context.lineWidth = 1;
15326
+ context.stroke();
15327
+ this.drawActiveOpacitySliderColor();
15328
+ }
15329
+ drawSliderPath(context, height, width, x, y) {
15330
+ const radius = height / 2 + 1;
15331
+ context.beginPath();
15332
+ context.moveTo(x + radius, y);
15333
+ context.lineTo(x + width - radius, y);
15334
+ context.quadraticCurveTo(x + width, y, x + width, y + radius);
15335
+ context.lineTo(x + width, y + height - radius);
15336
+ context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
15337
+ context.lineTo(x + radius, y + height);
15338
+ context.quadraticCurveTo(x, y + height, x, y + height - radius);
15339
+ context.lineTo(x, y + radius);
15340
+ context.quadraticCurveTo(x, y, x + radius, y);
15341
+ context.closePath();
15342
+ }
15343
+ getCheckeredBackgroundPattern() {
15344
+ if (this.checkerPattern) {
15345
+ return this.checkerPattern;
15346
+ }
15347
+ const pattern = document.createElement("canvas");
15348
+ pattern.width = 10;
15349
+ pattern.height = 10;
15350
+ const patternContext = pattern.getContext("2d");
15351
+ patternContext.fillStyle = "#ccc";
15352
+ patternContext.fillRect(0, 0, 10, 10);
15353
+ patternContext.fillStyle = "#fff";
15354
+ patternContext.fillRect(0, 0, 5, 5);
15355
+ patternContext.fillRect(5, 5, 5, 5);
15356
+ this.checkerPattern = pattern;
15357
+ return pattern;
15358
+ }
15359
+ drawActiveOpacitySliderColor() {
15360
+ const { color } = this;
15361
+ if (!color) {
15362
+ return;
15363
+ }
15364
+ const hsvColor = color;
15365
+ const { dimensions: { slider: { width }, thumb: { radius } } } = this;
15366
+ const x = alphaToOpacity(hsvColor.alpha()) / (OPACITY_LIMITS.max / width);
15367
+ const y = radius;
15368
+ requestAnimationFrame(() => {
15369
+ this.opacityScopeLeft = x;
15370
+ });
15371
+ this.drawThumb(this.opacitySliderRenderingContext, radius, x, y, hsvColor);
15372
+ }
15157
15373
  updateColorFromChannels(channels) {
15158
15374
  this.internalColorSet(color(channels, this.channelMode));
15159
15375
  }
15160
15376
  updateChannelsFromColor(color) {
15161
- this.channels = color ? this.toChannels(color) : [null, null, null];
15377
+ this.channels = color ? this.toChannels(color) : [null, null, null, null];
15162
15378
  }
15163
15379
  toChannels(color) {
15164
15380
  const { channelMode } = this;
15165
- return color[channelMode]()
15381
+ const channels = color[channelMode]()
15166
15382
  .array()
15167
- .map((value) => Math.floor(value));
15383
+ .map((value, index) => {
15384
+ const isAlpha = index === 3;
15385
+ return isAlpha ? value : Math.floor(value);
15386
+ });
15387
+ if (channels.length === 3) {
15388
+ channels.push(1); // Color omits alpha when 1
15389
+ }
15390
+ return channels;
15168
15391
  }
15169
15392
  static get delegatesFocus() { return true; }
15170
15393
  static get assetsDirs() { return ["assets"]; }
15171
15394
  get el() { return getElement(this); }
15172
15395
  static get watchers() { return {
15396
+ "alphaChannel": ["handleAlphaChannelChange"],
15173
15397
  "color": ["handleColorChange"],
15174
15398
  "format": ["handleFormatChange"],
15175
15399
  "scale": ["handleScaleChange"],
@@ -15183,12 +15407,16 @@ class ColorPicker {
15183
15407
  "$tagName$": "calcite-color-picker",
15184
15408
  "$members$": {
15185
15409
  "allowEmpty": [516, "allow-empty"],
15410
+ "alphaChannel": [4, "alpha-channel"],
15411
+ "channelsDisabled": [4, "channels-disabled"],
15186
15412
  "color": [1040],
15187
15413
  "disabled": [516],
15188
15414
  "format": [513],
15189
- "hideHex": [516, "hide-hex"],
15190
15415
  "hideChannels": [516, "hide-channels"],
15416
+ "hexDisabled": [4, "hex-disabled"],
15417
+ "hideHex": [516, "hide-hex"],
15191
15418
  "hideSaved": [516, "hide-saved"],
15419
+ "savedDisabled": [516, "saved-disabled"],
15192
15420
  "scale": [513],
15193
15421
  "storageId": [513, "storage-id"],
15194
15422
  "messageOverrides": [1040],
@@ -15196,7 +15424,6 @@ class ColorPicker {
15196
15424
  "value": [1025],
15197
15425
  "messages": [1040],
15198
15426
  "defaultMessages": [32],
15199
- "colorFieldAndSliderInteractive": [32],
15200
15427
  "channelMode": [32],
15201
15428
  "channels": [32],
15202
15429
  "dimensions": [32],
@@ -15204,56 +15431,144 @@ class ColorPicker {
15204
15431
  "savedColors": [32],
15205
15432
  "colorFieldScopeTop": [32],
15206
15433
  "colorFieldScopeLeft": [32],
15207
- "scopeOrientation": [32],
15208
15434
  "hueScopeLeft": [32],
15209
- "hueScopeTop": [32],
15435
+ "opacityScopeLeft": [32],
15436
+ "scopeOrientation": [32],
15210
15437
  "setFocus": [64]
15211
15438
  },
15212
15439
  "$listeners$": [[2, "keydown", "handleChannelKeyUpOrDown"], [2, "keyup", "handleChannelKeyUpOrDown"]],
15213
15440
  "$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"]]
15441
+ "$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
15442
  }; }
15216
15443
  }
15217
15444
 
15218
15445
  const CSS$O = {
15219
15446
  container: "container",
15220
- preview: "preview",
15221
- input: "input"
15447
+ hexInput: "hex-input",
15448
+ opacityInput: "opacity-input"
15222
15449
  };
15223
15450
 
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}";
15451
+ 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
15452
 
15226
15453
  const DEFAULT_COLOR = color();
15227
15454
  class ColorPickerHexInput {
15228
15455
  constructor(hostRef) {
15229
15456
  registerInstance(this, hostRef);
15230
15457
  this.calciteColorPickerHexInputChange = createEvent(this, "calciteColorPickerHexInputChange", 6);
15231
- this.onCalciteInternalInputBlur = () => {
15232
- const node = this.inputNode;
15458
+ this.onHexInputBlur = () => {
15459
+ const node = this.hexInputNode;
15233
15460
  const inputValue = node.value;
15234
15461
  const hex = `#${inputValue}`;
15235
- const willClearValue = this.allowEmpty && !inputValue;
15236
- if (willClearValue || (isValidHex(hex) && isLonghandHex(hex))) {
15462
+ const { allowEmpty, internalColor } = this;
15463
+ const willClearValue = allowEmpty && !inputValue;
15464
+ const isLonghand = isLonghandHex(hex);
15465
+ if (willClearValue || (isValidHex(hex) && isLonghand)) {
15237
15466
  return;
15238
15467
  }
15239
15468
  // manipulating DOM directly since rerender doesn't update input value
15240
15469
  node.value =
15241
- this.allowEmpty && !this.internalColor
15470
+ allowEmpty && !internalColor
15242
15471
  ? ""
15243
- : this.formatForInternalInput(rgbToHex(this.internalColor.object()));
15472
+ : this.formatHexForInternalInput(rgbToHex(
15473
+ // always display hex input in RRGGBB format
15474
+ internalColor.object()));
15244
15475
  };
15245
- this.onInputChange = () => {
15246
- this.internalSetValue(this.inputNode.value, this.value);
15476
+ this.onOpacityInputBlur = () => {
15477
+ const node = this.opacityInputNode;
15478
+ const inputValue = node.value;
15479
+ const { allowEmpty, internalColor } = this;
15480
+ const willClearValue = allowEmpty && !inputValue;
15481
+ if (willClearValue) {
15482
+ return;
15483
+ }
15484
+ // manipulating DOM directly since rerender doesn't update input value
15485
+ node.value =
15486
+ allowEmpty && !internalColor ? "" : this.formatOpacityForInternalInput(internalColor);
15487
+ };
15488
+ this.onHexInputChange = () => {
15489
+ const nodeValue = this.hexInputNode.value;
15490
+ let value = nodeValue;
15491
+ if (value) {
15492
+ const normalized = normalizeHex(value, false);
15493
+ const preserveExistingAlpha = isValidHex(normalized) && this.alphaChannel;
15494
+ if (preserveExistingAlpha && this.internalColor) {
15495
+ const alphaHex = normalizeHex(this.internalColor.hexa(), true).slice(-2);
15496
+ value = `${normalized + alphaHex}`;
15497
+ }
15498
+ }
15499
+ this.internalSetValue(value, this.value);
15500
+ };
15501
+ this.onOpacityInputChange = () => {
15502
+ const node = this.opacityInputNode;
15503
+ let value;
15504
+ if (!node.value) {
15505
+ value = node.value;
15506
+ }
15507
+ else {
15508
+ const alpha = opacityToAlpha(Number(node.value));
15509
+ value = this.internalColor?.alpha(alpha).hexa();
15510
+ }
15511
+ this.internalSetValue(value, this.value);
15512
+ };
15513
+ this.onInputKeyDown = (event) => {
15514
+ const { altKey, ctrlKey, metaKey, shiftKey } = event;
15515
+ const { alphaChannel, hexInputNode, internalColor, value } = this;
15516
+ const { key } = event;
15517
+ const composedPath = event.composedPath();
15518
+ if (key === "Tab" || key === "Enter") {
15519
+ if (composedPath.includes(hexInputNode)) {
15520
+ this.onHexInputChange();
15521
+ }
15522
+ else {
15523
+ this.onOpacityInputChange();
15524
+ }
15525
+ if (key === "Enter") {
15526
+ event.preventDefault();
15527
+ }
15528
+ return;
15529
+ }
15530
+ const isNudgeKey = key === "ArrowDown" || key === "ArrowUp";
15531
+ const oldValue = this.value;
15532
+ if (isNudgeKey) {
15533
+ if (!value) {
15534
+ this.internalSetValue(this.previousNonNullValue, oldValue);
15535
+ event.preventDefault();
15536
+ return;
15537
+ }
15538
+ const direction = key === "ArrowUp" ? 1 : -1;
15539
+ const bump = shiftKey ? 10 : 1;
15540
+ this.internalSetValue(hexify(this.nudgeRGBChannels(internalColor, bump * direction, composedPath.includes(hexInputNode) ? "rgb" : "a"), alphaChannel), oldValue);
15541
+ event.preventDefault();
15542
+ return;
15543
+ }
15544
+ const withModifiers = altKey || ctrlKey || metaKey;
15545
+ const singleChar = key.length === 1;
15546
+ const validHexChar = hexChar.test(key);
15547
+ if (singleChar && !withModifiers && !validHexChar) {
15548
+ event.preventDefault();
15549
+ }
15550
+ };
15551
+ this.onHexInputPaste = (event) => {
15552
+ const hex = event.clipboardData.getData("text");
15553
+ if (isValidHex(hex)) {
15554
+ event.preventDefault();
15555
+ this.hexInputNode.value = hex.slice(1);
15556
+ }
15247
15557
  };
15248
15558
  this.previousNonNullValue = this.value;
15249
- this.storeInputRef = (node) => {
15250
- this.inputNode = node;
15559
+ this.storeHexInputRef = (node) => {
15560
+ this.hexInputNode = node;
15561
+ };
15562
+ this.storeOpacityInputRef = (node) => {
15563
+ this.opacityInputNode = node;
15251
15564
  };
15252
- this.hexLabel = "Hex";
15253
15565
  this.allowEmpty = false;
15254
- this.scale = "m";
15255
- this.value = normalizeHex(DEFAULT_COLOR.hex());
15566
+ this.alphaChannel = false;
15567
+ this.hexLabel = "Hex";
15568
+ this.messages = undefined;
15256
15569
  this.numberingSystem = undefined;
15570
+ this.scale = "m";
15571
+ this.value = normalizeHex(hexify(DEFAULT_COLOR, this.alphaChannel), this.alphaChannel, true);
15257
15572
  this.internalColor = DEFAULT_COLOR;
15258
15573
  }
15259
15574
  //--------------------------------------------------------------------------
@@ -15262,10 +15577,10 @@ class ColorPickerHexInput {
15262
15577
  //
15263
15578
  //--------------------------------------------------------------------------
15264
15579
  connectedCallback() {
15265
- const { allowEmpty, value } = this;
15580
+ const { allowEmpty, alphaChannel, value } = this;
15266
15581
  if (value) {
15267
- const normalized = normalizeHex(value);
15268
- if (isValidHex(normalized)) {
15582
+ const normalized = normalizeHex(value, alphaChannel);
15583
+ if (isValidHex(normalized, alphaChannel)) {
15269
15584
  this.internalSetValue(normalized, normalized, false);
15270
15585
  }
15271
15586
  return;
@@ -15283,54 +15598,21 @@ class ColorPickerHexInput {
15283
15598
  handleValueChange(value, oldValue) {
15284
15599
  this.internalSetValue(value, oldValue, false);
15285
15600
  }
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
15601
  //--------------------------------------------------------------------------
15324
15602
  //
15325
15603
  // Lifecycle
15326
15604
  //
15327
15605
  //--------------------------------------------------------------------------
15328
15606
  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,
15607
+ const { alphaChannel, hexLabel, internalColor, messages, scale, value } = this;
15608
+ const hexInputValue = this.formatHexForInternalInput(value);
15609
+ const opacityInputValue = this.formatOpacityForInternalInput(internalColor);
15610
+ const inputScale = scale === "l" ? "m" : "s";
15611
+ 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,
15612
+ // eslint-disable-next-line react/jsx-sort-props
15613
+ 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
15614
  // 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));
15615
+ ref: this.storeOpacityInputRef })) : null));
15334
15616
  }
15335
15617
  //--------------------------------------------------------------------------
15336
15618
  //
@@ -15340,7 +15622,7 @@ class ColorPickerHexInput {
15340
15622
  /** Sets focus on the component. */
15341
15623
  async setFocus() {
15342
15624
  await componentLoaded(this);
15343
- focusElement(this.inputNode);
15625
+ focusElement(this.hexInputNode);
15344
15626
  }
15345
15627
  //--------------------------------------------------------------------------
15346
15628
  //
@@ -15349,13 +15631,17 @@ class ColorPickerHexInput {
15349
15631
  //--------------------------------------------------------------------------
15350
15632
  internalSetValue(value, oldValue, emit = true) {
15351
15633
  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;
15634
+ const { alphaChannel } = this;
15635
+ const normalized = normalizeHex(value, alphaChannel, alphaChannel);
15636
+ if (isValidHex(normalized, alphaChannel)) {
15637
+ const { internalColor: currentColor } = this;
15638
+ const nextColor = color(normalized);
15639
+ const normalizedLonghand = normalizeHex(hexify(nextColor, alphaChannel), alphaChannel);
15640
+ const changed = !currentColor ||
15641
+ normalizedLonghand !== normalizeHex(hexify(currentColor, alphaChannel), alphaChannel);
15642
+ this.internalColor = nextColor;
15643
+ this.previousNonNullValue = normalizedLonghand;
15644
+ this.value = normalizedLonghand;
15359
15645
  if (changed && emit) {
15360
15646
  this.calciteColorPickerHexInputChange.emit();
15361
15647
  }
@@ -15372,16 +15658,28 @@ class ColorPickerHexInput {
15372
15658
  }
15373
15659
  this.value = oldValue;
15374
15660
  }
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();
15661
+ formatHexForInternalInput(hex) {
15662
+ return hex ? hex.replace("#", "").slice(0, 6) : "";
15663
+ }
15664
+ formatOpacityForInternalInput(color) {
15665
+ return color ? `${alphaToOpacity(color.alpha())}` : "";
15666
+ }
15667
+ nudgeRGBChannels(color$1, amount, context) {
15668
+ let nudgedChannels;
15669
+ const channels = color$1.array();
15670
+ const rgbChannels = channels.slice(0, 3);
15671
+ if (context === "rgb") {
15672
+ const nudgedRGBChannels = rgbChannels.map((channel) => channel + amount);
15673
+ nudgedChannels = [
15674
+ ...nudgedRGBChannels,
15675
+ this.alphaChannel ? channels[3] : undefined
15676
+ ];
15384
15677
  }
15678
+ else {
15679
+ const nudgedAlpha = opacityToAlpha(alphaToOpacity(color$1.alpha()) + amount);
15680
+ nudgedChannels = [...rgbChannels, nudgedAlpha];
15681
+ }
15682
+ return color(nudgedChannels);
15385
15683
  }
15386
15684
  get el() { return getElement(this); }
15387
15685
  static get watchers() { return {
@@ -15392,15 +15690,17 @@ class ColorPickerHexInput {
15392
15690
  "$flags$": 9,
15393
15691
  "$tagName$": "calcite-color-picker-hex-input",
15394
15692
  "$members$": {
15395
- "hexLabel": [1, "hex-label"],
15396
15693
  "allowEmpty": [4, "allow-empty"],
15694
+ "alphaChannel": [4, "alpha-channel"],
15695
+ "hexLabel": [1, "hex-label"],
15696
+ "messages": [16],
15697
+ "numberingSystem": [1, "numbering-system"],
15397
15698
  "scale": [513],
15398
15699
  "value": [1537],
15399
- "numberingSystem": [1, "numbering-system"],
15400
15700
  "internalColor": [32],
15401
15701
  "setFocus": [64]
15402
15702
  },
15403
- "$listeners$": [[2, "keydown", "onInputKeyDown"]],
15703
+ "$listeners$": undefined,
15404
15704
  "$lazyBundleId$": "-",
15405
15705
  "$attrsToReflect$": [["scale", "scale"], ["value", "value"]]
15406
15706
  }; }
@@ -15408,14 +15708,20 @@ class ColorPickerHexInput {
15408
15708
 
15409
15709
  const CSS$N = {
15410
15710
  swatch: "swatch",
15411
- noColorIcon: "no-color-icon"
15711
+ noColorSwatch: "swatch--no-color",
15712
+ checker: "checker"
15412
15713
  };
15413
15714
  const COLORS = {
15414
15715
  borderLight: "rgba(0, 0, 0, 0.3)",
15415
15716
  borderDark: "rgba(255, 255, 255, 0.15)"
15416
15717
  };
15718
+ const checkerSquareSize = 4;
15719
+ const CHECKER_DIMENSIONS = {
15720
+ squareSize: checkerSquareSize,
15721
+ size: checkerSquareSize * 2
15722
+ };
15417
15723
 
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%}";
15724
+ 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
15725
 
15420
15726
  class ColorPickerSwatch {
15421
15727
  constructor(hostRef) {
@@ -15425,7 +15731,7 @@ class ColorPickerSwatch {
15425
15731
  this.scale = "m";
15426
15732
  }
15427
15733
  handleColorChange(color$1) {
15428
- this.internalColor = color(color$1);
15734
+ this.internalColor = color$1 ? color(color$1) : null;
15429
15735
  }
15430
15736
  //--------------------------------------------------------------------------
15431
15737
  //
@@ -15436,12 +15742,38 @@ class ColorPickerSwatch {
15436
15742
  this.handleColorChange(this.color);
15437
15743
  }
15438
15744
  render() {
15745
+ const isEmpty = !this.internalColor;
15746
+ const classes = {
15747
+ [CSS$N.swatch]: true,
15748
+ [CSS$N.noColorSwatch]: isEmpty
15749
+ };
15750
+ return (hAsync("svg", { class: classes, xmlns: "http://www.w3.org/2000/svg" }, this.renderSwatch()));
15751
+ }
15752
+ renderSwatch() {
15439
15753
  const { active, el, internalColor } = this;
15440
15754
  const borderRadius = active ? "100%" : "0";
15441
- const hex = internalColor.hex();
15442
15755
  const theme = getModeName(el);
15443
15756
  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%" })));
15757
+ const commonSwatchProps = {
15758
+ height: "100%",
15759
+ rx: borderRadius,
15760
+ stroke: borderColor,
15761
+ // stroke-width and clip-path are needed to hide overflowing portion of stroke
15762
+ // see https://stackoverflow.com/a/7273346/194216
15763
+ // using attribute to work around Stencil using the prop name vs the attribute when rendering
15764
+ ["stroke-width"]: "2",
15765
+ width: "100%"
15766
+ };
15767
+ const isEmpty = !internalColor;
15768
+ if (isEmpty) {
15769
+ 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%" })));
15770
+ }
15771
+ const alpha = internalColor.alpha();
15772
+ const hex = hexify(internalColor);
15773
+ const hexa = hexify(internalColor, alpha < 1);
15774
+ 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: {
15775
+ "clip-path": alpha < 1 ? "polygon(100% 0, 0 0, 0 100%)" : `inset(0 round ${borderRadius})`
15776
+ }, ...commonSwatchProps }), alpha < 1 ? (hAsync("rect", { fill: hexa, key: "opacity-fill", style: { "clip-path": "polygon(100% 0, 100% 100%, 0 100%)" }, ...commonSwatchProps })) : null));
15445
15777
  }
15446
15778
  get el() { return getElement(this); }
15447
15779
  static get watchers() { return {
@@ -15776,7 +16108,8 @@ const arrow = options => ({
15776
16108
  y,
15777
16109
  placement,
15778
16110
  rects,
15779
- platform
16111
+ platform,
16112
+ elements
15780
16113
  } = state;
15781
16114
  if (element == null) {
15782
16115
  return {};
@@ -15789,14 +16122,18 @@ const arrow = options => ({
15789
16122
  const axis = getMainAxisFromPlacement(placement);
15790
16123
  const length = getLengthFromAxis(axis);
15791
16124
  const arrowDimensions = await platform.getDimensions(element);
15792
- const minProp = axis === 'y' ? 'top' : 'left';
15793
- const maxProp = axis === 'y' ? 'bottom' : 'right';
16125
+ const isYAxis = axis === 'y';
16126
+ const minProp = isYAxis ? 'top' : 'left';
16127
+ const maxProp = isYAxis ? 'bottom' : 'right';
16128
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
15794
16129
  const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
15795
16130
  const startDiff = coords[axis] - rects.reference[axis];
15796
16131
  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];
16132
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
16133
+
16134
+ // DOM platform can return `window` as the `offsetParent`.
16135
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
16136
+ clientSize = elements.floating[clientProp] || rects.floating[length];
15800
16137
  }
15801
16138
  const centerToReference = endDiff / 2 - startDiff / 2;
15802
16139
 
@@ -16337,28 +16674,9 @@ function getComputedStyle$1(element) {
16337
16674
  return getWindow(element).getComputedStyle(element);
16338
16675
  }
16339
16676
 
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
- };
16677
+ function isNode(value) {
16678
+ return value instanceof getWindow(value).Node;
16360
16679
  }
16361
-
16362
16680
  function getNodeName(node) {
16363
16681
  return isNode(node) ? (node.nodeName || '').toLowerCase() : '';
16364
16682
  }
@@ -16382,9 +16700,6 @@ function isHTMLElement(value) {
16382
16700
  function isElement(value) {
16383
16701
  return value instanceof getWindow(value).Element;
16384
16702
  }
16385
- function isNode(value) {
16386
- return value instanceof getWindow(value).Node;
16387
- }
16388
16703
  function isShadowRoot(node) {
16389
16704
  // Browsers without `ShadowRoot` support.
16390
16705
  if (typeof ShadowRoot === 'undefined') {
@@ -16441,6 +16756,29 @@ function isLastTraversableNode(node) {
16441
16756
  return ['html', 'body', '#document'].includes(getNodeName(node));
16442
16757
  }
16443
16758
 
16759
+ const min = Math.min;
16760
+ const max = Math.max;
16761
+ const round = Math.round;
16762
+
16763
+ function getCssDimensions(element) {
16764
+ const css = getComputedStyle$1(element);
16765
+ let width = parseFloat(css.width);
16766
+ let height = parseFloat(css.height);
16767
+ const hasOffset = isHTMLElement(element);
16768
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
16769
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
16770
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
16771
+ if (shouldFallback) {
16772
+ width = offsetWidth;
16773
+ height = offsetHeight;
16774
+ }
16775
+ return {
16776
+ width,
16777
+ height,
16778
+ fallback: shouldFallback
16779
+ };
16780
+ }
16781
+
16444
16782
  function unwrapElement(element) {
16445
16783
  return !isElement(element) ? element.contextElement : element;
16446
16784
  }
@@ -16522,16 +16860,12 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
16522
16860
  currentIFrame = getWindow(currentIFrame).frameElement;
16523
16861
  }
16524
16862
  }
16525
- return {
16863
+ return rectToClientRect({
16526
16864
  width,
16527
16865
  height,
16528
- top: y,
16529
- right: x + width,
16530
- bottom: y + height,
16531
- left: x,
16532
16866
  x,
16533
16867
  y
16534
- };
16868
+ });
16535
16869
  }
16536
16870
 
16537
16871
  function getDocumentElement(node) {
@@ -16730,6 +17064,13 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
16730
17064
  }
16731
17065
  return rectToClientRect(rect);
16732
17066
  }
17067
+ function hasFixedPositionAncestor(element, stopNode) {
17068
+ const parentNode = getParentNode(element);
17069
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
17070
+ return false;
17071
+ }
17072
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
17073
+ }
16733
17074
 
16734
17075
  // A "clipping ancestor" is an `overflow` element with the characteristic of
16735
17076
  // clipping (or hiding) child elements. This returns all clipping ancestors
@@ -16747,19 +17088,17 @@ function getClippingElementAncestors(element, cache) {
16747
17088
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
16748
17089
  while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
16749
17090
  const computedStyle = getComputedStyle$1(currentNode);
16750
- const containingBlock = isContainingBlock(currentNode);
16751
- const shouldIgnoreCurrentNode = computedStyle.position === 'fixed';
16752
- if (shouldIgnoreCurrentNode) {
17091
+ const currentNodeIsContaining = isContainingBlock(currentNode);
17092
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
16753
17093
  currentContainingBlockComputedStyle = null;
17094
+ }
17095
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
17096
+ if (shouldDropCurrentNode) {
17097
+ // Drop non-containing blocks.
17098
+ result = result.filter(ancestor => ancestor !== currentNode);
16754
17099
  } 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
- }
17100
+ // Record last containing block for next iteration.
17101
+ currentContainingBlockComputedStyle = computedStyle;
16763
17102
  }
16764
17103
  currentNode = getParentNode(currentNode);
16765
17104
  }
@@ -16796,10 +17135,7 @@ function getClippingRect(_ref) {
16796
17135
  }
16797
17136
 
16798
17137
  function getDimensions(element) {
16799
- if (isHTMLElement(element)) {
16800
- return getCssDimensions(element);
16801
- }
16802
- return element.getBoundingClientRect();
17138
+ return getCssDimensions(element);
16803
17139
  }
16804
17140
 
16805
17141
  function getTrueOffsetParent(element, polyfill) {
@@ -16827,6 +17163,9 @@ function getContainingBlock(element) {
16827
17163
  // such as table ancestors and cross browser bugs.
16828
17164
  function getOffsetParent(element, polyfill) {
16829
17165
  const window = getWindow(element);
17166
+ if (!isHTMLElement(element)) {
17167
+ return window;
17168
+ }
16830
17169
  let offsetParent = getTrueOffsetParent(element, polyfill);
16831
17170
  while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
16832
17171
  offsetParent = getTrueOffsetParent(offsetParent, polyfill);
@@ -25493,7 +25832,7 @@ const CSS$s = {
25493
25832
  tableContainer: "table-container",
25494
25833
  sticky: "sticky-pos"
25495
25834
  };
25496
- const debounceTimeout = 100;
25835
+ const debounceTimeout = 0;
25497
25836
 
25498
25837
  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}";
25499
25838
 
@@ -25506,6 +25845,7 @@ const listItemSelector = "calcite-list-item";
25506
25845
  class List$1 {
25507
25846
  constructor(hostRef) {
25508
25847
  registerInstance(this, hostRef);
25848
+ this.calciteListChange = createEvent(this, "calciteListChange", 6);
25509
25849
  this.calciteListFilter = createEvent(this, "calciteListFilter", 6);
25510
25850
  this.listItems = [];
25511
25851
  this.enabledListItems = [];
@@ -25526,10 +25866,13 @@ class List$1 {
25526
25866
  }
25527
25867
  }
25528
25868
  };
25529
- this.updateSelectedItems = debounce(() => {
25869
+ this.updateSelectedItems = (emit = false) => {
25530
25870
  this.selectedItems = this.enabledListItems.filter((item) => item.selected);
25531
- }, debounceTimeout);
25532
- this.updateFilteredItems = debounce(() => {
25871
+ if (emit) {
25872
+ this.calciteListChange.emit();
25873
+ }
25874
+ };
25875
+ this.updateFilteredItems = (emit = false) => {
25533
25876
  const { listItems, filteredData, filterText } = this;
25534
25877
  const values = filteredData.map((item) => item.value);
25535
25878
  const groups = new Set();
@@ -25543,7 +25886,6 @@ class List$1 {
25543
25886
  item.hidden = !matches;
25544
25887
  return matches;
25545
25888
  }) || [];
25546
- this.filteredItems = filteredItems;
25547
25889
  groups.forEach((group) => {
25548
25890
  const hasAtLeastOneMatch = filteredItems.some((item) => group.contains(item));
25549
25891
  group.hidden = !hasAtLeastOneMatch;
@@ -25559,14 +25901,17 @@ class List$1 {
25559
25901
  }
25560
25902
  });
25561
25903
  groups.clear();
25562
- });
25904
+ this.filteredItems = filteredItems;
25905
+ if (emit) {
25906
+ this.calciteListFilter.emit();
25907
+ }
25908
+ };
25563
25909
  this.handleFilter = (event) => {
25564
25910
  event.stopPropagation();
25565
25911
  const { filteredItems, value } = event.currentTarget;
25566
25912
  this.filteredData = filteredItems;
25567
25913
  this.filterText = value;
25568
- this.updateFilteredItems();
25569
- this.calciteListFilter.emit();
25914
+ this.updateListItems(true);
25570
25915
  };
25571
25916
  this.getItemData = () => {
25572
25917
  return this.listItems.map((item) => ({
@@ -25576,6 +25921,23 @@ class List$1 {
25576
25921
  value: item.value
25577
25922
  }));
25578
25923
  };
25924
+ this.updateListItems = debounce((emit = false) => {
25925
+ const { selectionAppearance, selectionMode } = this;
25926
+ const items = this.queryListItems();
25927
+ items.forEach((item) => {
25928
+ item.selectionAppearance = selectionAppearance;
25929
+ item.selectionMode = selectionMode;
25930
+ });
25931
+ this.listItems = items;
25932
+ if (this.filterEnabled) {
25933
+ this.dataForFilter = this.getItemData();
25934
+ this.filterEl.items = this.dataForFilter;
25935
+ }
25936
+ this.updateFilteredItems(emit);
25937
+ this.enabledListItems = items.filter((item) => !item.disabled && !item.closed);
25938
+ this.setActiveListItem();
25939
+ this.updateSelectedItems(emit);
25940
+ }, debounceTimeout);
25579
25941
  this.queryListItems = () => {
25580
25942
  return Array.from(this.el.querySelectorAll(listItemSelector));
25581
25943
  };
@@ -25656,14 +26018,17 @@ class List$1 {
25656
26018
  this.focusRow(enabledListItems[prevIndex]);
25657
26019
  }
25658
26020
  }
25659
- handleCalciteListItemActive(event) {
26021
+ handleCalciteInternalListItemActive(event) {
25660
26022
  const target = event.target;
25661
26023
  const { listItems } = this;
25662
26024
  listItems.forEach((listItem) => {
25663
26025
  listItem.active = listItem === target;
25664
26026
  });
25665
26027
  }
25666
- handleCalciteListItemSelect(event) {
26028
+ handleCalciteListItemSelect() {
26029
+ this.updateSelectedItems(true);
26030
+ }
26031
+ handleCalciteInternalListItemSelect(event) {
25667
26032
  const target = event.target;
25668
26033
  const { listItems, selectionMode } = this;
25669
26034
  listItems.forEach((listItem) => {
@@ -25674,7 +26039,7 @@ class List$1 {
25674
26039
  this.updateSelectedItems();
25675
26040
  }
25676
26041
  handleCalciteListItemClose() {
25677
- this.updateListItems();
26042
+ this.updateListItems(true);
25678
26043
  }
25679
26044
  //--------------------------------------------------------------------------
25680
26045
  //
@@ -25701,7 +26066,7 @@ class List$1 {
25701
26066
  if (filteredItems) {
25702
26067
  this.filteredData = filteredItems;
25703
26068
  }
25704
- this.updateFilteredItems();
26069
+ this.updateListItems();
25705
26070
  }
25706
26071
  // --------------------------------------------------------------------------
25707
26072
  //
@@ -25724,22 +26089,6 @@ class List$1 {
25724
26089
  // eslint-disable-next-line react/jsx-sort-props
25725
26090
  ref: (el) => (this.filterEl = el) }))))) : null, hAsync("tbody", { class: CSS$s.tableContainer }, hAsync("slot", { onSlotchange: this.handleDefaultSlotChange })))));
25726
26091
  }
25727
- updateListItems() {
25728
- const { selectionAppearance, selectionMode } = this;
25729
- const items = this.queryListItems();
25730
- items.forEach((item) => {
25731
- item.selectionAppearance = selectionAppearance;
25732
- item.selectionMode = selectionMode;
25733
- });
25734
- this.listItems = items;
25735
- this.enabledListItems = items.filter((item) => !item.disabled && !item.closed);
25736
- if (this.filterEnabled) {
25737
- this.dataForFilter = this.getItemData();
25738
- }
25739
- this.setActiveListItem();
25740
- this.updateSelectedItems();
25741
- this.updateFilteredItems();
25742
- }
25743
26092
  get el() { return getElement(this); }
25744
26093
  static get watchers() { return {
25745
26094
  "filterEnabled": ["handleFilterEnabledChange"],
@@ -25766,7 +26115,7 @@ class List$1 {
25766
26115
  "dataForFilter": [32],
25767
26116
  "setFocus": [64]
25768
26117
  },
25769
- "$listeners$": [[0, "calciteInternalFocusPreviousItem", "handleCalciteInternalFocusPreviousItem"], [0, "calciteInternalListItemActive", "handleCalciteListItemActive"], [0, "calciteInternalListItemSelect", "handleCalciteListItemSelect"], [0, "calciteListItemClose", "handleCalciteListItemClose"]],
26118
+ "$listeners$": [[0, "calciteInternalFocusPreviousItem", "handleCalciteInternalFocusPreviousItem"], [0, "calciteInternalListItemActive", "handleCalciteInternalListItemActive"], [0, "calciteListItemSelect", "handleCalciteListItemSelect"], [0, "calciteInternalListItemSelect", "handleCalciteInternalListItemSelect"], [0, "calciteListItemClose", "handleCalciteListItemClose"]],
25770
26119
  "$lazyBundleId$": "-",
25771
26120
  "$attrsToReflect$": [["disabled", "disabled"], ["filterEnabled", "filter-enabled"], ["filterPlaceholder", "filter-placeholder"], ["filterText", "filter-text"], ["loading", "loading"], ["selectionMode", "selection-mode"], ["selectionAppearance", "selection-appearance"]]
25772
26121
  }; }