@esri/calcite-components 1.4.0-next.5 → 1.4.0-next.7

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 (713) 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-4f5e6c21.js → p-010e90fc.js} +1 -1
  4. package/dist/calcite/{p-4ba85479.entry.js → p-022b463d.entry.js} +2 -2
  5. package/dist/calcite/{p-ef5d7b3e.js → p-040b0aac.js} +1 -1
  6. package/dist/calcite/p-049bc3c1.entry.js +6 -0
  7. package/dist/calcite/p-07f56efe.entry.js +6 -0
  8. package/dist/calcite/{p-8da41040.js → p-08b9b673.js} +1 -1
  9. package/dist/calcite/{p-c317fcde.entry.js → p-0a9a5b0f.entry.js} +2 -2
  10. package/dist/calcite/p-0b8cadf4.entry.js +6 -0
  11. package/dist/calcite/{p-5635a90f.entry.js → p-0d2823c2.entry.js} +2 -2
  12. package/dist/calcite/{p-6a4f4075.entry.js → p-0ec4ccbd.entry.js} +2 -2
  13. package/dist/calcite/{p-8bad2ca2.entry.js → p-0fa679c7.entry.js} +2 -2
  14. package/dist/calcite/{p-6f142c94.entry.js → p-0fc95de5.entry.js} +2 -2
  15. package/dist/calcite/{p-007591b0.entry.js → p-138e015a.entry.js} +2 -2
  16. package/dist/calcite/p-167e256a.entry.js +6 -0
  17. package/dist/calcite/{p-de962734.entry.js → p-18d60b13.entry.js} +2 -2
  18. package/dist/calcite/{p-2ea3e0f8.entry.js → p-1a34083a.entry.js} +2 -2
  19. package/dist/calcite/{p-845f7224.entry.js → p-1b10ccc2.entry.js} +2 -2
  20. package/dist/calcite/p-1c72c9ec.entry.js +6 -0
  21. package/dist/calcite/{p-08729579.js → p-1d2b5776.js} +2 -2
  22. package/dist/calcite/{p-5aae4da6.entry.js → p-23292162.entry.js} +2 -2
  23. package/dist/calcite/{p-4d2c5072.entry.js → p-26a14afd.entry.js} +2 -2
  24. package/dist/calcite/{p-07511c24.js → p-285f16a5.js} +1 -1
  25. package/dist/calcite/{p-9e5ecd8f.entry.js → p-28615250.entry.js} +2 -2
  26. package/dist/calcite/{p-28a2dd16.entry.js → p-2a3a2add.entry.js} +2 -2
  27. package/dist/calcite/{p-2d58ccf9.entry.js → p-3057efa7.entry.js} +2 -2
  28. package/dist/calcite/{p-0e16a6f5.entry.js → p-31ec39d7.entry.js} +2 -2
  29. package/dist/calcite/{p-3bc58ca6.js → p-33886fed.js} +1 -1
  30. package/dist/calcite/p-3401a9d5.js +6 -0
  31. package/dist/calcite/{p-a5d7eac9.entry.js → p-3e1547ee.entry.js} +2 -2
  32. package/dist/calcite/p-40e30e60.entry.js +6 -0
  33. package/dist/calcite/{p-4dad7876.entry.js → p-4782f04e.entry.js} +2 -2
  34. package/dist/calcite/{p-390024af.entry.js → p-489e3960.entry.js} +2 -2
  35. package/dist/calcite/{p-3967a41b.entry.js → p-498f4e75.entry.js} +2 -2
  36. package/dist/calcite/p-4ca219cb.js +6 -0
  37. package/dist/calcite/{p-d46471f4.js → p-4ce3f0cc.js} +2 -2
  38. package/dist/calcite/{p-ad8ccffe.entry.js → p-51d0f35f.entry.js} +2 -2
  39. package/dist/calcite/{p-f8548479.entry.js → p-53d77573.entry.js} +2 -2
  40. package/dist/calcite/{p-da6cd4a3.entry.js → p-546047ac.entry.js} +2 -2
  41. package/dist/calcite/{p-bfb669c3.entry.js → p-55c6d5ef.entry.js} +2 -2
  42. package/dist/calcite/{p-90ac4488.js → p-56f76acb.js} +2 -2
  43. package/dist/calcite/{p-fb70cd21.entry.js → p-599c21a0.entry.js} +2 -2
  44. package/dist/calcite/{p-fffffb02.entry.js → p-5b473563.entry.js} +2 -2
  45. package/dist/calcite/p-5bae27a0.entry.js +6 -0
  46. package/dist/calcite/{p-afff3fca.entry.js → p-5d215531.entry.js} +2 -2
  47. package/dist/calcite/p-61e10cd6.js +6 -0
  48. package/dist/calcite/{p-e4e2ef16.entry.js → p-6430ae01.entry.js} +2 -2
  49. package/dist/calcite/{p-66974d66.js → p-64f6ce40.js} +1 -1
  50. package/dist/calcite/{p-b95ea253.entry.js → p-6642106e.entry.js} +2 -2
  51. package/dist/calcite/{p-bbe1dcd7.js → p-6736a1c8.js} +2 -2
  52. package/dist/calcite/{p-6cb562d2.js → p-6c0bfe2b.js} +1 -1
  53. package/dist/calcite/p-70cbe824.entry.js +6 -0
  54. package/dist/calcite/p-7272e447.entry.js +6 -0
  55. package/dist/calcite/{p-fa7cbd28.entry.js → p-72855c96.entry.js} +2 -2
  56. package/dist/calcite/{p-6162eb45.entry.js → p-74e68a45.entry.js} +2 -2
  57. package/dist/calcite/{p-3662475d.js → p-7620a6dc.js} +3 -3
  58. package/dist/calcite/{p-1990923c.entry.js → p-7f36e577.entry.js} +2 -2
  59. package/dist/calcite/{p-192eac45.js → p-8110a0aa.js} +1 -1
  60. package/dist/calcite/{p-90d6c7e7.entry.js → p-81ce6424.entry.js} +2 -2
  61. package/dist/calcite/{p-2f4db746.js → p-88150a71.js} +1 -1
  62. package/dist/calcite/{p-28d3450f.entry.js → p-898bcdc5.entry.js} +2 -2
  63. package/dist/calcite/{p-63044193.entry.js → p-8c344e6d.entry.js} +2 -2
  64. package/dist/calcite/{p-73115945.entry.js → p-9547760d.entry.js} +2 -2
  65. package/dist/calcite/{p-bcbbb815.entry.js → p-9590cf67.entry.js} +2 -2
  66. package/dist/calcite/{p-8930657f.js → p-9de2c114.js} +2 -2
  67. package/dist/calcite/{p-d7a5eecc.js → p-9f23571b.js} +2 -2
  68. package/dist/calcite/{p-91588dca.entry.js → p-a01669a2.entry.js} +2 -2
  69. package/dist/calcite/{p-d21cc90e.js → p-a0de8dfd.js} +2 -2
  70. package/dist/calcite/{p-1b457129.entry.js → p-a4a4af85.entry.js} +2 -2
  71. package/dist/calcite/{p-fc629722.js → p-a4d220af.js} +1 -1
  72. package/dist/calcite/{p-65e3cea1.js → p-a7ea5e08.js} +1 -1
  73. package/dist/calcite/{p-e733a25c.js → p-ac7ab3bc.js} +1 -1
  74. package/dist/calcite/{p-3109bb3b.entry.js → p-b30818cc.entry.js} +2 -2
  75. package/dist/calcite/{p-b369bc51.entry.js → p-b4cf4fb1.entry.js} +2 -2
  76. package/dist/calcite/{p-8a9cd7b3.entry.js → p-b9ea3e0b.entry.js} +2 -2
  77. package/dist/calcite/p-bbdbf9c0.entry.js +6 -0
  78. package/dist/calcite/{p-f0068a81.js → p-bd22a68d.js} +2 -2
  79. package/dist/calcite/p-be9d3f6c.js +6 -0
  80. package/dist/calcite/{p-77272332.entry.js → p-c419c802.entry.js} +2 -2
  81. package/dist/calcite/{p-3e7998b2.entry.js → p-c618c39c.entry.js} +2 -2
  82. package/dist/calcite/p-cbaa4869.entry.js +6 -0
  83. package/dist/calcite/{p-f584280e.entry.js → p-cce18d43.entry.js} +2 -2
  84. package/dist/calcite/{p-d483fd2b.js → p-d0ce0619.js} +1 -1
  85. package/dist/calcite/{p-7c541e4a.js → p-d2c4f9fa.js} +2 -2
  86. package/dist/calcite/{p-e7f26d13.entry.js → p-d6141ae1.entry.js} +2 -2
  87. package/dist/calcite/{p-9deaa925.entry.js → p-d6bd6b2f.entry.js} +2 -2
  88. package/dist/calcite/{p-6de0b90c.js → p-de4a323b.js} +2 -2
  89. package/dist/calcite/{p-46c91095.js → p-deb7e311.js} +2 -2
  90. package/dist/calcite/p-e0a8dce0.entry.js +6 -0
  91. package/dist/calcite/{p-69688697.entry.js → p-e0f5bda5.entry.js} +2 -2
  92. package/dist/calcite/{p-2e559754.entry.js → p-e1da1d05.entry.js} +2 -2
  93. package/dist/calcite/{p-15999e7b.js → p-e2329cc3.js} +2 -2
  94. package/dist/calcite/{p-bd470121.js → p-ee1c4ef3.js} +1 -1
  95. package/dist/calcite/{p-d748e9af.entry.js → p-eee7ca58.entry.js} +2 -2
  96. package/dist/calcite/p-f025faa7.js +6 -0
  97. package/dist/calcite/{p-338bd804.js → p-f3646d69.js} +1 -1
  98. package/dist/calcite/{p-e5976c70.js → p-ff342ff3.js} +1 -1
  99. package/dist/cjs/{ExpandToggle-9ace1f7f.js → ExpandToggle-843202ab.js} +5 -5
  100. package/dist/cjs/{FloatingArrow-601ed84e.js → FloatingArrow-63ebb862.js} +2 -2
  101. package/dist/cjs/{Heading-3a3631f9.js → Heading-52698bda.js} +2 -2
  102. package/dist/cjs/{app-globals-096a1b41.js → app-globals-a5281951.js} +2 -2
  103. package/dist/cjs/{array-86ab4108.js → array-7cb19871.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 +13 -13
  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 +15 -15
  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-c2a90b43.js → composed-offset-position.esm-32cef964.js} +1 -1
  168. package/dist/cjs/{conditionalSlot-88fb38cc.js → conditionalSlot-a36ded86.js} +3 -3
  169. package/dist/cjs/{debounce-16574b24.js → debounce-b3ebca79.js} +1 -1
  170. package/dist/cjs/{dom-ecacd5bf.js → dom-21aaf3f4.js} +3 -3
  171. package/dist/cjs/{filter-0cad4ef9.js → filter-7b1ac325.js} +2 -2
  172. package/dist/cjs/{floating-ui-43a0665a.js → floating-ui-4bb47c90.js} +71 -65
  173. package/dist/cjs/{focusTrapComponent-f6248c95.js → focusTrapComponent-4fc83c52.js} +2 -2
  174. package/dist/cjs/{form-b8173c62.js → form-9cc29ef1.js} +3 -3
  175. package/dist/cjs/{guid-0f40f4b7.js → guid-43b37504.js} +1 -1
  176. package/dist/cjs/{index-4f672718.js → index-d0394290.js} +1 -1
  177. package/dist/cjs/index.cjs.js +2 -2
  178. package/dist/cjs/{interactive-10e3fc78.js → interactive-ba615a5f.js} +1 -1
  179. package/dist/cjs/{key-ae6bcfdf.js → key-88971126.js} +1 -1
  180. package/dist/cjs/{label-1789923c.js → label-a63005cd.js} +2 -2
  181. package/dist/cjs/{loadable-0be7f59e.js → loadable-c2a58fbe.js} +1 -1
  182. package/dist/cjs/loader.cjs.js +5 -5
  183. package/dist/cjs/{locale-d8b5c255.js → locale-01665a55.js} +4 -4
  184. package/dist/cjs/{math-342fe578.js → math-b78a1af1.js} +1 -1
  185. package/dist/cjs/{observers-ac0d13c9.js → observers-f592bc28.js} +1 -1
  186. package/dist/cjs/{openCloseComponent-6b722fcd.js → openCloseComponent-5b97ba86.js} +2 -2
  187. package/dist/cjs/{resources-dc6c04d7.js → resources-a0100bbf.js} +1 -1
  188. package/dist/cjs/{resources-eb548a75.js → resources-a4a25b5c.js} +1 -1
  189. package/dist/cjs/{resources-e4718f51.js → resources-b46063a7.js} +1 -1
  190. package/dist/cjs/{resources-7f7f7aa5.js → resources-cd5d5858.js} +5 -5
  191. package/dist/cjs/{resources-b995b60c.js → resources-d974ce14.js} +1 -1
  192. package/dist/cjs/{resources-236ea1ee.js → resources-f1c8c5f7.js} +1 -1
  193. package/dist/cjs/{sortable.esm-130e0d23.js → sortable.esm-3077a5f4.js} +1 -1
  194. package/dist/cjs/{t9n-aa500fb7.js → t9n-14a96fb0.js} +3 -3
  195. package/dist/cjs/{throttle-adbd7cba.js → throttle-ac1f5cd2.js} +2 -2
  196. package/dist/cjs/{utils-e51200ba.js → utils-1af6a566.js} +3 -3
  197. package/dist/cjs/utils-4f112a5e.js +213 -0
  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.css +12 -0
  265. package/dist/collection/components/flow-item/flow-item.js +2 -2
  266. package/dist/collection/components/flow-item/resources.js +1 -1
  267. package/dist/collection/components/functional/ExpandToggle.js +1 -1
  268. package/dist/collection/components/functional/FloatingArrow.js +1 -1
  269. package/dist/collection/components/functional/Heading.js +1 -1
  270. package/dist/collection/components/graph/graph.js +1 -1
  271. package/dist/collection/components/graph/util.js +1 -1
  272. package/dist/collection/components/handle/handle.js +1 -1
  273. package/dist/collection/components/handle/resources.js +1 -1
  274. package/dist/collection/components/icon/icon.js +1 -1
  275. package/dist/collection/components/icon/resources.js +1 -1
  276. package/dist/collection/components/icon/utils.js +1 -1
  277. package/dist/collection/components/inline-editable/inline-editable.js +1 -1
  278. package/dist/collection/components/inline-editable/resources.js +1 -1
  279. package/dist/collection/components/input/input.js +1 -1
  280. package/dist/collection/components/input/resources.js +1 -1
  281. package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
  282. package/dist/collection/components/input-date-picker/resources.js +1 -1
  283. package/dist/collection/components/input-message/input-message.js +1 -1
  284. package/dist/collection/components/input-message/interfaces.js +1 -1
  285. package/dist/collection/components/input-number/input-number.js +1 -1
  286. package/dist/collection/components/input-number/resources.js +1 -1
  287. package/dist/collection/components/input-text/input-text.js +1 -1
  288. package/dist/collection/components/input-text/resources.js +1 -1
  289. package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
  290. package/dist/collection/components/input-time-picker/resources.js +1 -1
  291. package/dist/collection/components/label/label.js +1 -1
  292. package/dist/collection/components/label/resources.js +1 -1
  293. package/dist/collection/components/link/link.js +1 -1
  294. package/dist/collection/components/list/list.js +60 -30
  295. package/dist/collection/components/list/resources.js +2 -2
  296. package/dist/collection/components/list-item/list-item.js +1 -1
  297. package/dist/collection/components/list-item/resources.js +1 -1
  298. package/dist/collection/components/list-item/utils.js +1 -1
  299. package/dist/collection/components/list-item-group/list-item-group.js +1 -1
  300. package/dist/collection/components/list-item-group/resources.js +1 -1
  301. package/dist/collection/components/loader/loader.js +1 -1
  302. package/dist/collection/components/modal/modal.js +1 -1
  303. package/dist/collection/components/modal/resources.js +1 -1
  304. package/dist/collection/components/notice/notice.js +1 -1
  305. package/dist/collection/components/notice/resources.js +1 -1
  306. package/dist/collection/components/option/option.js +1 -1
  307. package/dist/collection/components/option-group/option-group.js +1 -1
  308. package/dist/collection/components/pagination/pagination.js +1 -1
  309. package/dist/collection/components/pagination/resources.js +1 -1
  310. package/dist/collection/components/panel/panel.css +9 -1
  311. package/dist/collection/components/panel/panel.js +2 -2
  312. package/dist/collection/components/panel/resources.js +1 -1
  313. package/dist/collection/components/pick-list/pick-list.js +1 -1
  314. package/dist/collection/components/pick-list/resources.js +1 -1
  315. package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
  316. package/dist/collection/components/pick-list/shared-list-render.js +1 -1
  317. package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
  318. package/dist/collection/components/pick-list-group/resources.js +1 -1
  319. package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
  320. package/dist/collection/components/pick-list-item/resources.js +1 -1
  321. package/dist/collection/components/popover/PopoverManager.js +1 -1
  322. package/dist/collection/components/popover/popover.js +1 -1
  323. package/dist/collection/components/popover/resources.js +1 -1
  324. package/dist/collection/components/progress/progress.js +1 -1
  325. package/dist/collection/components/radio-button/radio-button.js +1 -1
  326. package/dist/collection/components/radio-button/resources.js +1 -1
  327. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  328. package/dist/collection/components/rating/function/star.js +1 -1
  329. package/dist/collection/components/rating/rating.js +1 -1
  330. package/dist/collection/components/resources.js +1 -1
  331. package/dist/collection/components/scrim/resources.js +1 -1
  332. package/dist/collection/components/scrim/scrim.js +1 -1
  333. package/dist/collection/components/segmented-control/segmented-control.js +1 -1
  334. package/dist/collection/components/segmented-control-item/resources.js +1 -1
  335. package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
  336. package/dist/collection/components/select/resources.js +1 -1
  337. package/dist/collection/components/select/select.js +1 -1
  338. package/dist/collection/components/shell/resources.js +1 -1
  339. package/dist/collection/components/shell/shell.js +1 -1
  340. package/dist/collection/components/shell-center-row/resources.js +1 -1
  341. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
  342. package/dist/collection/components/shell-panel/resources.js +1 -1
  343. package/dist/collection/components/shell-panel/shell-panel.js +1 -1
  344. package/dist/collection/components/slider/resources.js +1 -1
  345. package/dist/collection/components/slider/slider.js +1 -1
  346. package/dist/collection/components/sortable-list/resources.js +1 -1
  347. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  348. package/dist/collection/components/split-button/resources.js +1 -1
  349. package/dist/collection/components/split-button/split-button.js +1 -1
  350. package/dist/collection/components/stepper/stepper.js +1 -1
  351. package/dist/collection/components/stepper-item/stepper-item.js +1 -1
  352. package/dist/collection/components/switch/switch.js +1 -1
  353. package/dist/collection/components/tab/tab.js +1 -1
  354. package/dist/collection/components/tab-nav/tab-nav.js +1 -1
  355. package/dist/collection/components/tab-title/resources.js +1 -1
  356. package/dist/collection/components/tab-title/tab-title.js +1 -1
  357. package/dist/collection/components/tabs/resources.js +1 -1
  358. package/dist/collection/components/tabs/tabs.js +1 -1
  359. package/dist/collection/components/text-area/resources.js +1 -1
  360. package/dist/collection/components/text-area/text-area.js +1 -1
  361. package/dist/collection/components/tile/resources.js +1 -1
  362. package/dist/collection/components/tile/tile.js +1 -1
  363. package/dist/collection/components/tile-select/resources.js +1 -1
  364. package/dist/collection/components/tile-select/tile-select.js +1 -1
  365. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  366. package/dist/collection/components/time-picker/resources.js +1 -1
  367. package/dist/collection/components/time-picker/time-picker.js +1 -1
  368. package/dist/collection/components/tip/resources.js +1 -1
  369. package/dist/collection/components/tip/tip.js +1 -1
  370. package/dist/collection/components/tip-group/tip-group.js +1 -1
  371. package/dist/collection/components/tip-manager/resources.js +1 -1
  372. package/dist/collection/components/tip-manager/tip-manager.js +1 -1
  373. package/dist/collection/components/tooltip/TooltipManager.js +1 -1
  374. package/dist/collection/components/tooltip/resources.js +1 -1
  375. package/dist/collection/components/tooltip/tooltip.js +1 -1
  376. package/dist/collection/components/tooltip/utils.js +1 -1
  377. package/dist/collection/components/tree/tree.js +1 -1
  378. package/dist/collection/components/tree/utils.js +1 -1
  379. package/dist/collection/components/tree-item/resources.js +1 -1
  380. package/dist/collection/components/tree-item/tree-item.js +1 -1
  381. package/dist/collection/components/value-list/resources.js +1 -1
  382. package/dist/collection/components/value-list/utils.js +1 -1
  383. package/dist/collection/components/value-list/value-list.js +1 -1
  384. package/dist/collection/components/value-list-item/resources.js +1 -1
  385. package/dist/collection/components/value-list-item/value-list-item.js +1 -1
  386. package/dist/collection/index.js +1 -1
  387. package/dist/collection/utils/array.js +1 -1
  388. package/dist/collection/utils/conditionalSlot.js +1 -1
  389. package/dist/collection/utils/config.js +1 -1
  390. package/dist/collection/utils/date.js +1 -1
  391. package/dist/collection/utils/dom.js +1 -1
  392. package/dist/collection/utils/filter.js +1 -1
  393. package/dist/collection/utils/floating-ui.js +1 -1
  394. package/dist/collection/utils/focusTrapComponent.js +1 -1
  395. package/dist/collection/utils/form.js +1 -1
  396. package/dist/collection/utils/globalAttributes.js +1 -1
  397. package/dist/collection/utils/globalScript.js +1 -1
  398. package/dist/collection/utils/guid.js +1 -1
  399. package/dist/collection/utils/interactive.js +1 -1
  400. package/dist/collection/utils/key.js +1 -1
  401. package/dist/collection/utils/label.js +1 -1
  402. package/dist/collection/utils/loadable.js +1 -1
  403. package/dist/collection/utils/locale.js +1 -1
  404. package/dist/collection/utils/math.js +1 -1
  405. package/dist/collection/utils/mode.js +1 -1
  406. package/dist/collection/utils/number.js +1 -1
  407. package/dist/collection/utils/observers.js +1 -1
  408. package/dist/collection/utils/openCloseComponent.js +1 -1
  409. package/dist/collection/utils/resources.js +1 -1
  410. package/dist/collection/utils/t9n.js +1 -1
  411. package/dist/collection/utils/time.js +1 -1
  412. package/dist/components/ExpandToggle.js +1 -1
  413. package/dist/components/FloatingArrow.js +1 -1
  414. package/dist/components/Heading.js +1 -1
  415. package/dist/components/action-group.js +1 -1
  416. package/dist/components/action-menu.js +1 -1
  417. package/dist/components/action.js +1 -1
  418. package/dist/components/array.js +1 -1
  419. package/dist/components/button.js +1 -1
  420. package/dist/components/calcite-accordion-item.js +1 -1
  421. package/dist/components/calcite-accordion.js +1 -1
  422. package/dist/components/calcite-action-bar.js +1 -1
  423. package/dist/components/calcite-action-group.js +1 -1
  424. package/dist/components/calcite-action-menu.js +1 -1
  425. package/dist/components/calcite-action-pad.js +1 -1
  426. package/dist/components/calcite-action.js +1 -1
  427. package/dist/components/calcite-alert.js +1 -1
  428. package/dist/components/calcite-avatar.js +1 -1
  429. package/dist/components/calcite-block-section.js +1 -1
  430. package/dist/components/calcite-block.js +1 -1
  431. package/dist/components/calcite-button.js +1 -1
  432. package/dist/components/calcite-card.js +1 -1
  433. package/dist/components/calcite-checkbox.js +1 -1
  434. package/dist/components/calcite-chip-group.js +1 -1
  435. package/dist/components/calcite-chip.js +1 -1
  436. package/dist/components/calcite-color-picker-hex-input.js +2 -2
  437. package/dist/components/calcite-color-picker-swatch.js +1 -1
  438. package/dist/components/calcite-color-picker.js +377 -314
  439. package/dist/components/calcite-combobox-item-group.js +1 -1
  440. package/dist/components/calcite-combobox-item.js +1 -1
  441. package/dist/components/calcite-combobox.js +1 -1
  442. package/dist/components/calcite-date-picker-day.js +1 -1
  443. package/dist/components/calcite-date-picker-month-header.js +1 -1
  444. package/dist/components/calcite-date-picker-month.js +1 -1
  445. package/dist/components/calcite-date-picker.js +1 -1
  446. package/dist/components/calcite-dropdown-group.js +1 -1
  447. package/dist/components/calcite-dropdown-item.js +1 -1
  448. package/dist/components/calcite-dropdown.js +1 -1
  449. package/dist/components/calcite-fab.js +1 -1
  450. package/dist/components/calcite-filter.js +1 -1
  451. package/dist/components/calcite-flow-item.js +2 -2
  452. package/dist/components/calcite-flow.js +1 -1
  453. package/dist/components/calcite-graph.js +1 -1
  454. package/dist/components/calcite-handle.js +1 -1
  455. package/dist/components/calcite-icon.js +1 -1
  456. package/dist/components/calcite-inline-editable.js +1 -1
  457. package/dist/components/calcite-input-date-picker.js +1 -1
  458. package/dist/components/calcite-input-message.js +1 -1
  459. package/dist/components/calcite-input-number.js +2 -617
  460. package/dist/components/calcite-input-text.js +1 -1
  461. package/dist/components/calcite-input-time-picker.js +1 -1
  462. package/dist/components/calcite-input.js +1 -1
  463. package/dist/components/calcite-label.js +1 -1
  464. package/dist/components/calcite-link.js +1 -1
  465. package/dist/components/calcite-list-item-group.js +1 -1
  466. package/dist/components/calcite-list-item.js +1 -1
  467. package/dist/components/calcite-list.js +40 -30
  468. package/dist/components/calcite-loader.js +1 -1
  469. package/dist/components/calcite-modal.js +1 -1
  470. package/dist/components/calcite-notice.js +1 -1
  471. package/dist/components/calcite-option-group.js +1 -1
  472. package/dist/components/calcite-option.js +1 -1
  473. package/dist/components/calcite-pagination.js +1 -1
  474. package/dist/components/calcite-panel.js +1 -1
  475. package/dist/components/calcite-pick-list-group.js +1 -1
  476. package/dist/components/calcite-pick-list-item.js +1 -1
  477. package/dist/components/calcite-pick-list.js +1 -1
  478. package/dist/components/calcite-popover.js +1 -1
  479. package/dist/components/calcite-progress.js +1 -1
  480. package/dist/components/calcite-radio-button-group.js +1 -1
  481. package/dist/components/calcite-radio-button.js +1 -1
  482. package/dist/components/calcite-rating.js +1 -1
  483. package/dist/components/calcite-scrim.js +1 -1
  484. package/dist/components/calcite-segmented-control-item.js +1 -1
  485. package/dist/components/calcite-segmented-control.js +1 -1
  486. package/dist/components/calcite-select.js +1 -1
  487. package/dist/components/calcite-shell-center-row.js +1 -1
  488. package/dist/components/calcite-shell-panel.js +1 -1
  489. package/dist/components/calcite-shell.js +1 -1
  490. package/dist/components/calcite-slider.js +1 -1
  491. package/dist/components/calcite-sortable-list.js +1 -1
  492. package/dist/components/calcite-split-button.js +1 -1
  493. package/dist/components/calcite-stepper-item.js +1 -1
  494. package/dist/components/calcite-stepper.js +1 -1
  495. package/dist/components/calcite-switch.js +1 -1
  496. package/dist/components/calcite-tab-nav.js +1 -1
  497. package/dist/components/calcite-tab-title.js +1 -1
  498. package/dist/components/calcite-tab.js +1 -1
  499. package/dist/components/calcite-tabs.js +1 -1
  500. package/dist/components/calcite-text-area.js +1 -1
  501. package/dist/components/calcite-tile-select-group.js +1 -1
  502. package/dist/components/calcite-tile-select.js +1 -1
  503. package/dist/components/calcite-tile.js +1 -1
  504. package/dist/components/calcite-time-picker.js +1 -1
  505. package/dist/components/calcite-tip-group.js +1 -1
  506. package/dist/components/calcite-tip-manager.js +1 -1
  507. package/dist/components/calcite-tip.js +1 -1
  508. package/dist/components/calcite-tooltip.js +1 -1
  509. package/dist/components/calcite-tree-item.js +1 -1
  510. package/dist/components/calcite-tree.js +1 -1
  511. package/dist/components/calcite-value-list-item.js +1 -1
  512. package/dist/components/calcite-value-list.js +1 -1
  513. package/dist/components/checkbox.js +1 -1
  514. package/dist/components/chip.js +1 -1
  515. package/dist/components/color-picker-hex-input.js +252 -88
  516. package/dist/components/color-picker-swatch.js +42 -2118
  517. package/dist/components/composed-offset-position.esm.js +1 -1
  518. package/dist/components/conditionalSlot.js +1 -1
  519. package/dist/components/date-picker-day.js +1 -1
  520. package/dist/components/date-picker-month-header.js +1 -1
  521. package/dist/components/date-picker-month.js +1 -1
  522. package/dist/components/date-picker.js +2 -2
  523. package/dist/components/date.js +1 -1
  524. package/dist/components/debounce.js +1 -1
  525. package/dist/components/dom.js +1 -1
  526. package/dist/components/dropdown.js +1 -1
  527. package/dist/components/filter.js +1 -1
  528. package/dist/components/filter2.js +1 -1
  529. package/dist/components/floating-ui.js +68 -62
  530. package/dist/components/focusTrapComponent.js +1 -1
  531. package/dist/components/form.js +1 -1
  532. package/dist/components/graph.js +1 -1
  533. package/dist/components/guid.js +1 -1
  534. package/dist/components/handle.js +1 -1
  535. package/dist/components/icon.js +1 -1
  536. package/dist/components/index.js +1 -1
  537. package/dist/components/index2.js +2116 -0
  538. package/dist/components/input-number.js +623 -0
  539. package/dist/components/input.js +2 -2
  540. package/dist/components/interactive.js +1 -1
  541. package/dist/components/key.js +1 -1
  542. package/dist/components/label.js +1 -1
  543. package/dist/components/label2.js +1 -1
  544. package/dist/components/link.js +1 -1
  545. package/dist/components/loadable.js +1 -1
  546. package/dist/components/loader.js +1 -1
  547. package/dist/components/locale.js +2 -2
  548. package/dist/components/math.js +1 -1
  549. package/dist/components/observers.js +1 -1
  550. package/dist/components/openCloseComponent.js +1 -1
  551. package/dist/components/panel.js +2 -2
  552. package/dist/components/pick-list-item.js +1 -1
  553. package/dist/components/popover.js +1 -1
  554. package/dist/components/progress.js +1 -1
  555. package/dist/components/resources.js +1 -1
  556. package/dist/components/resources2.js +1 -1
  557. package/dist/components/resources3.js +1 -1
  558. package/dist/components/scrim.js +1 -1
  559. package/dist/components/shared-list-render.js +1 -1
  560. package/dist/components/sortable.esm.js +1 -1
  561. package/dist/components/switch.js +1 -1
  562. package/dist/components/t9n.js +1 -1
  563. package/dist/components/tab-nav.js +1 -1
  564. package/dist/components/tab-title.js +1 -1
  565. package/dist/components/tab.js +1 -1
  566. package/dist/components/tabs.js +1 -1
  567. package/dist/components/throttle.js +1 -1
  568. package/dist/components/tile.js +1 -1
  569. package/dist/components/time-picker.js +2 -2
  570. package/dist/components/tooltip.js +1 -1
  571. package/dist/components/utils.js +112 -31
  572. package/dist/components/utils2.js +1 -1
  573. package/dist/components/utils3.js +1 -1
  574. package/dist/esm/{ExpandToggle-44731758.js → ExpandToggle-c5f0fddb.js} +5 -5
  575. package/dist/esm/{FloatingArrow-03b56cd6.js → FloatingArrow-f3d3553d.js} +2 -2
  576. package/dist/esm/{Heading-6a521ea6.js → Heading-94ecceec.js} +2 -2
  577. package/dist/esm/{app-globals-d6b77dae.js → app-globals-16708176.js} +2 -2
  578. package/dist/esm/{array-413b0700.js → array-ebcf4eb4.js} +1 -1
  579. package/dist/esm/calcite-accordion_2.entry.js +7 -7
  580. package/dist/esm/calcite-action-bar.entry.js +15 -15
  581. package/dist/esm/calcite-action-group.entry.js +13 -13
  582. package/dist/esm/calcite-action-menu.entry.js +9 -9
  583. package/dist/esm/calcite-action-pad.entry.js +14 -14
  584. package/dist/esm/calcite-action.entry.js +11 -11
  585. package/dist/esm/calcite-alert.entry.js +12 -12
  586. package/dist/esm/calcite-avatar.entry.js +6 -6
  587. package/dist/esm/calcite-block_2.entry.js +12 -12
  588. package/dist/esm/calcite-button.entry.js +13 -13
  589. package/dist/esm/calcite-card.entry.js +10 -10
  590. package/dist/esm/calcite-checkbox.entry.js +10 -10
  591. package/dist/esm/calcite-chip-group.entry.js +8 -8
  592. package/dist/esm/calcite-chip.entry.js +12 -12
  593. package/dist/esm/calcite-color-picker_3.entry.js +585 -339
  594. package/dist/esm/calcite-combobox_3.entry.js +18 -18
  595. package/dist/esm/calcite-date-picker_4.entry.js +13 -13
  596. package/dist/esm/calcite-dropdown_3.entry.js +12 -12
  597. package/dist/esm/calcite-fab.entry.js +7 -7
  598. package/dist/esm/calcite-filter.entry.js +13 -13
  599. package/dist/esm/calcite-flow-item.entry.js +13 -13
  600. package/dist/esm/calcite-flow.entry.js +3 -3
  601. package/dist/esm/calcite-graph_2.entry.js +13 -13
  602. package/dist/esm/calcite-handle.entry.js +10 -10
  603. package/dist/esm/calcite-icon.entry.js +6 -6
  604. package/dist/esm/calcite-inline-editable.entry.js +12 -12
  605. package/dist/esm/calcite-input-date-picker.entry.js +18 -18
  606. package/dist/esm/calcite-input-message.entry.js +5 -5
  607. package/dist/esm/calcite-input-number.entry.js +13 -13
  608. package/dist/esm/calcite-input-text.entry.js +13 -13
  609. package/dist/esm/calcite-input-time-picker_2.entry.js +14 -14
  610. package/dist/esm/calcite-input.entry.js +13 -13
  611. package/dist/esm/calcite-label.entry.js +6 -6
  612. package/dist/esm/calcite-link.entry.js +7 -7
  613. package/dist/esm/calcite-list_3.entry.js +50 -40
  614. package/dist/esm/calcite-loader.entry.js +3 -3
  615. package/dist/esm/calcite-modal.entry.js +13 -13
  616. package/dist/esm/calcite-notice.entry.js +12 -12
  617. package/dist/esm/calcite-option_3.entry.js +10 -10
  618. package/dist/esm/calcite-pagination.entry.js +10 -10
  619. package/dist/esm/calcite-panel.entry.js +15 -15
  620. package/dist/esm/calcite-pick-list_3.entry.js +16 -16
  621. package/dist/esm/calcite-popover.entry.js +16 -16
  622. package/dist/esm/calcite-progress.entry.js +2 -2
  623. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  624. package/dist/esm/calcite-radio-button.entry.js +10 -10
  625. package/dist/esm/calcite-rating.entry.js +13 -13
  626. package/dist/esm/calcite-scrim.entry.js +9 -9
  627. package/dist/esm/calcite-segmented-control_2.entry.js +9 -9
  628. package/dist/esm/calcite-shell_3.entry.js +11 -11
  629. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  630. package/dist/esm/calcite-split-button.entry.js +4 -4
  631. package/dist/esm/calcite-stepper_2.entry.js +10 -10
  632. package/dist/esm/calcite-switch.entry.js +10 -10
  633. package/dist/esm/calcite-tab_4.entry.js +7 -7
  634. package/dist/esm/calcite-text-area.entry.js +15 -15
  635. package/dist/esm/calcite-tile-select_2.entry.js +5 -5
  636. package/dist/esm/calcite-tile.entry.js +8 -8
  637. package/dist/esm/calcite-tip_3.entry.js +11 -11
  638. package/dist/esm/calcite-tooltip.entry.js +9 -9
  639. package/dist/esm/calcite-tree_2.entry.js +9 -9
  640. package/dist/esm/calcite-value-list_2.entry.js +16 -16
  641. package/dist/esm/calcite.js +6 -6
  642. package/dist/esm/{composed-offset-position.esm-6cdde655.js → composed-offset-position.esm-2166efd1.js} +1 -1
  643. package/dist/esm/{conditionalSlot-2c9efd4d.js → conditionalSlot-abceadb0.js} +3 -3
  644. package/dist/esm/{debounce-2d6a0149.js → debounce-797b3e86.js} +1 -1
  645. package/dist/esm/{dom-423b852c.js → dom-c48a1b86.js} +3 -3
  646. package/dist/esm/{filter-de45be94.js → filter-8d6350fc.js} +2 -2
  647. package/dist/esm/{floating-ui-e67f4473.js → floating-ui-50197fc5.js} +71 -65
  648. package/dist/esm/{focusTrapComponent-c995cd90.js → focusTrapComponent-e588f549.js} +2 -2
  649. package/dist/esm/{form-e2c5bf23.js → form-5f4ee7a2.js} +3 -3
  650. package/dist/esm/{guid-3036ce51.js → guid-aef51297.js} +1 -1
  651. package/dist/esm/{index-86650d5a.js → index-217dadcd.js} +1 -1
  652. package/dist/esm/index.js +2 -2
  653. package/dist/esm/{interactive-47568053.js → interactive-3fff4fda.js} +1 -1
  654. package/dist/esm/{key-4161a3c1.js → key-8c1dc5de.js} +1 -1
  655. package/dist/esm/{label-26d6be6f.js → label-55aef7bc.js} +2 -2
  656. package/dist/esm/{loadable-3cf63846.js → loadable-8c1293f5.js} +1 -1
  657. package/dist/esm/loader.js +6 -6
  658. package/dist/esm/{locale-c07ca0c8.js → locale-5571dc0a.js} +4 -4
  659. package/dist/esm/{math-47943cf6.js → math-a0aa08d8.js} +1 -1
  660. package/dist/esm/{observers-28615899.js → observers-5d51590f.js} +1 -1
  661. package/dist/esm/{openCloseComponent-0d035d10.js → openCloseComponent-9ba2ae60.js} +2 -2
  662. package/dist/esm/{resources-c6c0f7e5.js → resources-1d0e42db.js} +1 -1
  663. package/dist/esm/{resources-b3aa225f.js → resources-7678f57a.js} +1 -1
  664. package/dist/esm/{resources-55a9df4d.js → resources-aa4e4c3c.js} +1 -1
  665. package/dist/esm/{resources-bea143a5.js → resources-d26eaa68.js} +5 -5
  666. package/dist/esm/{resources-cfdd5c95.js → resources-d4765ecc.js} +1 -1
  667. package/dist/esm/{resources-b133f9d1.js → resources-ef20e35f.js} +1 -1
  668. package/dist/esm/{sortable.esm-c2c7bd66.js → sortable.esm-89325ef7.js} +1 -1
  669. package/dist/esm/{t9n-70b30ed6.js → t9n-e678f4c8.js} +3 -3
  670. package/dist/esm/{throttle-4e0b6325.js → throttle-9b1221ed.js} +2 -2
  671. package/dist/esm/utils-c9e01e02.js +195 -0
  672. package/dist/esm/{utils-49cc87a4.js → utils-edb91a03.js} +3 -3
  673. package/dist/extras/docs-json.json +175 -37
  674. package/dist/extras/vscode-data.json +22 -2
  675. package/dist/loader/cdn.js +1 -1
  676. package/dist/loader/index.cjs.js +1 -1
  677. package/dist/loader/index.es2017.js +1 -1
  678. package/dist/loader/index.js +1 -1
  679. package/dist/types/components/color-picker/color-picker.d.ts +54 -23
  680. package/dist/types/components/color-picker/interfaces.d.ts +1 -0
  681. package/dist/types/components/color-picker/resources.d.ts +28 -18
  682. package/dist/types/components/color-picker/utils.d.ts +16 -7
  683. package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +33 -16
  684. package/dist/types/components/color-picker-hex-input/resources.d.ts +2 -2
  685. package/dist/types/components/color-picker-swatch/color-picker-swatch.d.ts +3 -2
  686. package/dist/types/components/color-picker-swatch/resources.d.ts +6 -1
  687. package/dist/types/components/flow-item/flow-item.d.ts +1 -1
  688. package/dist/types/components/list/list.d.ts +7 -2
  689. package/dist/types/components/list/resources.d.ts +1 -1
  690. package/dist/types/components/panel/panel.d.ts +1 -1
  691. package/dist/types/components.d.ts +62 -6
  692. package/dist/types/preact.d.ts +2 -1
  693. package/hydrate/index.js +800 -451
  694. package/package.json +3 -4
  695. package/dist/calcite/p-0b1443fd.entry.js +0 -6
  696. package/dist/calcite/p-1163bf7a.entry.js +0 -6
  697. package/dist/calcite/p-17bad11f.entry.js +0 -6
  698. package/dist/calcite/p-305b842d.js +0 -6
  699. package/dist/calcite/p-746ed68a.js +0 -6
  700. package/dist/calcite/p-777b6df8.js +0 -6
  701. package/dist/calcite/p-8441a7c3.entry.js +0 -6
  702. package/dist/calcite/p-8db4a274.js +0 -6
  703. package/dist/calcite/p-91dfe31f.entry.js +0 -6
  704. package/dist/calcite/p-96cdcb63.entry.js +0 -6
  705. package/dist/calcite/p-a147a2e6.entry.js +0 -6
  706. package/dist/calcite/p-b50b98d3.entry.js +0 -6
  707. package/dist/calcite/p-cc5724cc.entry.js +0 -6
  708. package/dist/calcite/p-d71fbdea.entry.js +0 -6
  709. package/dist/calcite/p-e291883a.entry.js +0 -6
  710. package/dist/calcite/p-ea4d15b2.js +0 -6
  711. package/dist/calcite/p-fd4b3d0c.entry.js +0 -6
  712. package/dist/cjs/utils-390db9d9.js +0 -124
  713. package/dist/esm/utils-a9865126.js +0 -114
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.5
5
- */
6
- import{b as t}from"./p-3662475d.js";import{d as n}from"./p-66974d66.js";function e(t){return t.split("-")[1]}function o(t){return"y"===t?"height":"width"}function r(t){return t.split("-")[0]}function i(t){return["top","bottom"].includes(r(t))?"x":"y"}function a(t,n,a){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=o(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(r(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(e(n)){case"start":y[u]-=m*(a&&p?-1:1);break;case"end":y[u]+=m*(a&&p?-1:1)}return y}function l(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function s(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function c(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:c,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=l(y),h=c[p?"floating"===m?"reference":"floating":m],x=s(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(h)))||e?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},A=s(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:f}):v);return{top:(x.top-A.top+g.top)/w.y,bottom:(A.bottom-x.bottom+g.bottom)/w.y,left:(x.left-A.left+g.left)/w.x,right:(A.right-x.right+g.right)/w.x}}const f=Math.min,u=Math.max;function d(t,n,e){return u(t,f(n,e))}const m=["top","right","bottom","left"],p=m.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),y={left:"right",right:"left",bottom:"top",top:"bottom"};function g(t){return t.replace(/left|right|bottom|top/g,(t=>y[t]))}function h(t,n,r){void 0===r&&(r=!1);const a=e(t),l=i(t),s=o(l);let c="x"===l?a===(r?"end":"start")?"right":"left":"start"===a?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=g(c)),{main:c,cross:g(c)}}const x={start:"end",end:"start"};function v(t){return t.replace(/start|end/g,(t=>x[t]))}const b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var o;const{placement:i,middlewareData:a,rects:l,initialPlacement:s,platform:f,elements:u}=n,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...w}=t,A=r(i),P=r(s)===s,k=await(null==f.isRTL?void 0:f.isRTL(u.floating)),D=p||(P||!b?[g(s)]:function(t){const n=g(t);return[v(t),n,v(n)]}(s));p||"none"===x||D.push(...function(t,n,o,i){const a=e(t);let l=function(t,n,e){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?r:o:n?o:r;case"left":case"right":return n?i:a;default:return[]}}(r(t),"start"===o,i);return a&&(l=l.map((t=>t+"-"+a)),n&&(l=l.concat(l.map(v)))),l}(s,b,x,k));const R=[s,...D],F=await c(n,w),M=[];let E=(null==(o=a.flip)?void 0:o.overflows)||[];if(d&&M.push(F[A]),m){const{main:t,cross:n}=h(i,l,k);M.push(F[t],F[n])}if(E=[...E,{placement:i,overflows:M}],!M.every((t=>t<=0))){var S,C;const t=((null==(S=a.flip)?void 0:S.index)||0)+1,n=R[t];if(n)return{data:{index:t,overflows:E},reset:{placement:n}};let e=null==(C=E.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:C.placement;if(!e)switch(y){case"bestFit":{var O;const t=null==(O=E.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:O[0];t&&(e=t);break}case"initialPlacement":e=s}if(i!==e)return{reset:{placement:e}}}return{}}}};function w(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function A(t){return m.some((n=>t[n]>=0))}const P=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=w(await c(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:A(t)}}}case"escaped":{const t=w(await c(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:A(t)}}}default:return{}}}}};function k(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return k(t).getComputedStyle(t)}const R=Math.min,F=Math.max,M=Math.round;function E(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=M(e)!==r||M(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function S(t){return j(t)?(t.nodeName||"").toLowerCase():""}let C;function O(){if(C)return C;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(C=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),C):navigator.userAgent}function T(t){return t instanceof k(t).HTMLElement}function $(t){return t instanceof k(t).Element}function j(t){return t instanceof k(t).Node}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof k(t).ShadowRoot||t instanceof ShadowRoot)}function B(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function L(t){return["table","td","th"].includes(S(t))}function H(t){const n=/firefox/i.test(O()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function N(){return/^((?!chrome|android).)*safari/i.test(O())}function I(t){return["html","body","#document"].includes(S(t))}function W(t){return $(t)?t:t.contextElement}const q={x:1,y:1};function G(t){const n=W(t);if(!T(n))return q;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=E(n);let a=(i?M(e.width):e.width)/o,l=(i?M(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function U(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=W(t);let s=q;n&&(o?$(o)&&(s=G(o)):s=G(t));const c=l?k(l):window,f=N()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=k(l),n=o&&$(o)?k(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=G(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=k(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function V(t){return((j(t)?t.ownerDocument:t.document)||window.document).documentElement}function X(t){return $(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Y(t){return U(V(t)).left+X(t).scrollLeft}function _(t){if("html"===S(t))return t;const n=t.assignedSlot||t.parentNode||z(t)&&t.host||V(t);return z(n)?n.host:n}function J(t){const n=_(t);return I(n)?n.ownerDocument.body:T(n)&&B(n)?n:J(n)}function K(t,n){var e;void 0===n&&(n=[]);const o=J(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=k(o);return r?n.concat(i,i.visualViewport||[],B(o)?o:[]):n.concat(o,K(o))}function Q(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=k(t),o=V(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=N();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e);else if("document"===n)o=function(t){const n=V(t),e=X(t),o=t.ownerDocument.body,r=F(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=F(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-e.scrollLeft+Y(t);const l=-e.scrollTop;return"rtl"===D(o).direction&&(a+=F(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(V(t));else if($(n))o=function(t,n){const e=U(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=T(t)?G(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e={...n};if(N()){var r,i;const n=k(t);e.x-=(null==(r=n.visualViewport)?void 0:r.offsetLeft)||0,e.y-=(null==(i=n.visualViewport)?void 0:i.offsetTop)||0}o=e}return s(o)}function Z(t,n){return T(t)&&"fixed"!==D(t).position?n?n(t):t.offsetParent:null}function tt(t,n){const e=k(t);let o=Z(t,n);for(;o&&L(o)&&"static"===D(o).position;)o=Z(o,n);return o&&("html"===S(o)||"body"===S(o)&&"static"===D(o).position&&!H(o))?e:o||function(t){let n=_(t);for(;T(n)&&!I(n);){if(H(n))return n;n=_(n)}return null}(t)||e}function nt(t,n,e){const o=T(n),r=V(n),i=U(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==S(n)||B(r))&&(a=X(n)),T(n)){const t=U(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=Y(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const et={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=K(t).filter((t=>$(t)&&"body"!==S(t))),r=null;const i="fixed"===D(t).position;let a=i?_(t):t;for(;$(a)&&!I(a);){const t=D(a),n=H(a);"fixed"===t.position?r=null:(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=_(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Q(n,e,r);return t.top=F(o.top,t.top),t.right=R(o.right,t.right),t.bottom=R(o.bottom,t.bottom),t.left=F(o.left,t.left),t}),Q(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=T(e),i=V(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==S(e)||B(i))&&(a=X(e)),T(e))){const t=U(e);l=G(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:$,getDimensions:function(t){return T(t)?E(t):t.getBoundingClientRect()},getOffsetParent:tt,getDocumentElement:V,getScale:G,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||tt,i=this.getDimensions;return{reference:nt(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const ot={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},rt=async function(){function t(){return navigator.userAgentData}if(ot.floatingUINonChromiumPositioningFix&&(/firefox|safari/i.test(function(){const n=t();return n?.brands?n.brands.map((({brand:t,version:n})=>`${t}/${n}`)).join(" "):navigator.userAgent}())||function(){const n=t();return n?.brands?!!n.brands.find((({brand:t,version:n})=>("Google Chrome"===t||"Chromium"===t)&&Number(n)>=109)):!!navigator.userAgent.split(" ").find((t=>{const[n,e]=t.split("/");return"Chrome"===n&&parseInt(e)>=109}))}())){const{offsetParent:t}=await import("./p-ef5d7b3e.js"),n=et.getOffsetParent;et.getOffsetParent=e=>n(e,t)}}(),it=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],at="bottom-start",lt={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function st({placement:t,flipDisabled:n,flipPlacements:a,offsetDistance:s,offsetSkidding:f,arrowEl:u,type:m}){const y=[(void 0===g&&(g={}),{name:"shift",options:g,async fn(t){const{x:n,y:e,placement:o}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...f}=g,u={x:n,y:e},m=await c(t,f),p=i(r(o)),y="x"===p?"y":"x";let h=u[p],x=u[y];a&&(h=d(h+m["y"===p?"top":"left"],h,h-m["y"===p?"bottom":"right"])),l&&(x=d(x+m["y"===y?"top":"left"],x,x-m["y"===y?"bottom":"right"]));const v=s.fn({...t,[p]:h,[y]:x});return{...v,data:{x:v.x-n,y:v.y-e}}}}),P()];var g,x;if("menu"===m)return[...y,b({fallbackPlacements:a||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===m||"tooltip"===m){const m=[...y,(x={mainAxis:"number"==typeof s?s:0,crossAxis:"number"==typeof f?f:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:o}=t,a=await async function(t,n){const{placement:o,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=r(o),f=e(o),u="x"===i(o),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:h}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof h&&(g="end"===f?-1*h:h),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:o+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?m.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var o,i,a;const{rects:l,middlewareData:s,placement:f,platform:u,elements:d}=n,{crossAxis:m=!1,alignment:y,allowedPlacements:g=p,autoAlignment:x=!0,...b}=t,w=void 0!==y||g===p?function(t,n,o){return(t?[...o.filter((n=>e(n)===t)),...o.filter((n=>e(n)!==t))]:o.filter((t=>r(t)===t))).filter((o=>!t||e(o)===t||!!n&&v(o)!==o))}(y||null,x,g):g,A=await c(n,b),P=(null==(o=s.autoPlacement)?void 0:o.index)||0,k=w[P];if(null==k)return{};const{main:D,cross:R}=h(k,l,await(null==u.isRTL?void 0:u.isRTL(d.floating)));if(f!==k)return{reset:{placement:w[0]}};const F=[A[r(k)],A[D],A[R]],M=[...(null==(i=s.autoPlacement)?void 0:i.overflows)||[],{placement:k,overflows:F}],E=w[P+1];if(E)return{data:{index:P+1,overflows:M},reset:{placement:E}};const S=M.map((t=>{const n=e(t.placement);return[t.placement,n&&m?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),C=(null==(a=S.filter((t=>t[2].slice(0,e(t[0])?2:3).every((t=>t<=0))))[0])?void 0:a[0])||S[0][0];return C!==f?{data:{index:P+1,overflows:M},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||m.push(b(a?{fallbackPlacements:a}:{})),u&&m.push((t=>({name:"arrow",options:t,async fn(n){const{element:r,padding:a=0}=t||{},{x:s,y:c,placement:f,rects:u,platform:m}=n;if(null==r)return{};const p=l(a),y={x:s,y:c},g=i(f),h=o(g),x=await m.getDimensions(r),v="y"===g?"top":"left",b="y"===g?"bottom":"right",w=u.reference[h]+u.reference[g]-y[g]-u.floating[h],A=y[g]-u.reference[g],P=await(null==m.getOffsetParent?void 0:m.getOffsetParent(r));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[h]);const D=p[v],R=k-x[h]-p[b],F=k/2-x[h]/2+(w/2-A/2),M=d(D,F,R),E=null!=e(f)&&F!=M&&u.reference[h]/2-(F<D?p[v]:p[b])-x[h]/2<0;return{[g]:y[g]-(E?F<D?D-F:R-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:u})),m}return[]}function ct(t,n){const e=t.filter((t=>it.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${it.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ft(n,e){const o=["left","right"];return"rtl"===t(n)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function ut(t,n,e=!1){if(t.open)return e?dt(t,n):pt(t,n)}const dt=n(pt,100,{leading:!0,maxWait:100}),mt={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"};async function pt(t,{referenceEl:n,floatingEl:e,overlayPositioning:o="absolute",placement:r,flipDisabled:i,flipPlacements:l,offsetDistance:s,offsetSkidding:c,arrowEl:f,type:u}){if(!n||!e)return null;await rt;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:et,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=e,s=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(n));let f=await l.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=a(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x:h,y:x,data:v,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:l,elements:{reference:t,floating:n}});u=null!=h?h:u,d=null!=x?x:d,p={...p,[i]:{...p[i],...v}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(f=!0===b.rects?await l.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:d}=a(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(n,e,{strategy:o,placement:"auto"===r||"auto-start"===r||"auto-end"===r?void 0:ft(e,r),middleware:st({placement:r,flipDisabled:i,flipPlacements:l,offsetDistance:s,offsetSkidding:c,arrowEl:f,type:u})});if(f&&g.arrow){const{x:n,y:e}=g.arrow,o=p.split("-")[0],r=null!=n?"left":"top",i=mt[o],a={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout="left"===o||"right"===o?"horizontal":"vertical"),Object.assign(f.style,{...a,[r]:`${"left"==r?n:e}px`,[o]:"100%",transform:i})}const h=g.hide?.referenceHidden,x=h?"hidden":null,v=x?"none":null;e.setAttribute("data-placement",p);const b=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(e.style,{visibility:x,pointerEvents:v,position:y,top:"0",left:"0",transform:b})}const yt=new WeakMap;function gt(t,n,e){e&&n&&(ht(t,n,e),Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:t.overlayPositioning,top:"0",left:"0"}),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...$(t)?K(t):t.contextElement?K(t.contextElement):[],...K(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),$(t)&&!l&&u.observe(t),$(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?U(t):null;return l&&function n(){const o=U(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition()))))}function ht(t,n,e){if(!e||!n)return;const o=yt.get(t);o&&o(),yt.delete(t)}const xt=Math.ceil(Math.hypot(4,4));export{lt as F,ht as a,xt as b,gt as c,at as d,ct as f,ut as r}
@@ -1,6 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.5
5
- */
6
- import{r as i,c as t,h as e,H as a,a as s}from"./p-07511c24.js";import{f as n}from"./p-d7a5eecc.js";import{w as o,i as c,t as l,u as r,g as h}from"./p-3662475d.js";import{d,f as m,c as p,r as u,a as b,F as f}from"./p-ea4d15b2.js";import{s as g,c as x,a as v,d as y,H as w}from"./p-d46471f4.js";import{g as k}from"./p-2f4db746.js";import{u as C}from"./p-e5976c70.js";import{c as z,d as I,g as $}from"./p-6de0b90c.js";import{c as _,s as D,a as H}from"./p-338bd804.js";import{c as E,d as j}from"./p-90ac4488.js";import{c as O}from"./p-192eac45.js";import{c as A,d as L}from"./p-f0068a81.js";import{c as M,s as P,d as B,u as T}from"./p-305b842d.js";import{d as F}from"./p-66974d66.js";import{c as R,d as S}from"./p-8db4a274.js";import"./p-d483fd2b.js";import"./p-e733a25c.js";const X="CALCITE-COMBOBOX-ITEM",U="CALCITE-COMBOBOX-ITEM-GROUP",W=`${X}, ${U}`;function G(i){const t=i.parentElement?.closest(W),e=t?.parentElement?.closest(W);return[t,e].filter((i=>i))}function Y(i){return i.ancestors?.filter((i=>"CALCITE-COMBOBOX-ITEM"===i.nodeName))||[]}function K(i){return o(i.querySelectorAll("calcite-combobox-item")).filter((i=>i.selected)).length>0}function N(i){return document.evaluate("ancestor::calcite-combobox-item | ancestor::calcite-combobox-item-group",i,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const V="combobox-item-",q="combobox-chip-",J="combobox-label-",Q="combobox-listbox-",Z="combobox-input-",ii=class{constructor(e){i(this,e),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipClose=t(this,"calciteComboboxChipClose",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.placement=d,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=O("mutation",(()=>this.updateItems())),this.resizeObserver=O("resize",(()=>this.setMaxScrollerHeight())),this.guid=k(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?m(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>i?.value?.toString()));return i?.length?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||g(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const a=this.getMaxScrollerHeight();i.style.maxHeight=a>0?`${a}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=i=>{this.open=!1;const t=this.items.find((t=>t===i));t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=i=>{if(i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName)))return this.open=!1,void i.stopPropagation();this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus()},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,p(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,A(this)},this.setReferenceEl=i=>{this.referenceEl=i,p(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===U?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return F((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const a=!i(t,e);t.hidden=a;const[s,n]=t.ancestors;(i(s,e)||i(n,e))&&(t.hidden=!1),a||t.ancestors.forEach((i=>i.hidden=!1))})),this.filteredItems=this.getfilteredItems(),this.calciteComboboxFilterChange.emit()}),100)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=F(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getfilteredItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.filteredItems[this.activeItemIndex];if(!i)return;const t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:a}=this.listContainerEl;e+a<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<a&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{this.disabled||this.textInput?.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)},this.open=!1,this.disabled=!1,this.form=void 0,this.label=void 0,this.placeholder=void 0,this.placeholderIcon=void 0,this.placeholderIconFlipRtl=!1,this.maxItems=0,this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(){this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}documentClickHandler(i){!this.disabled&&c(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.filteredItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:a,overlayPositioning:s,filteredFlipPlacements:n}=this;return u(this,{floatingEl:t,referenceEl:e,overlayPositioning:s,placement:a,flipPlacements:n,type:"menu"},i)}async setFocus(){await _(this),this.textInput?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){E(this),M(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),z(this),x(this),A(this),this.setFilteredPlacements(),this.reposition(!0),this.open&&this.openHandler()}async componentWillLoad(){D(this),this.updateItems(),await P(this)}componentDidLoad(){v(this,this.getValue()),this.reposition(!0),H(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),C(this)}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),I(this),y(this),b(this,this.referenceEl,this.floatingEl),L(this),j(this),B(this)}textHandler(){this.updateActiveItemIndex(-1)}effectiveLocaleChange(){T(this,this.effectiveLocale)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,a=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(a+=t,e++)}})),a}calculateSingleItemHeight(i){if(!i)return;let t=i.offsetHeight;return Array.from(i.querySelectorAll(W)).map((i=>i?.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=Y(i),e=function(i){return o(i.querySelectorAll("calcite-combobox-item"))}(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{K(i)||(i.selected=!1)})))}getfilteredItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!K(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),a=this.selectedItems.indexOf(t);return e>-1&&a>-1?e-a:a-e}))}getData(){return this.items.map((i=>({filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(X)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(U))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(X);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){const i=this.selectedItems[this.activeChipIndex]?.guid;(i?this.referenceEl.querySelector(`#${q}${i}`):null)?.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){this.activeItemIndex=i;let t=null;this.filteredItems.forEach(((e,a)=>{a===i?(e.active=!0,t=`${V}${e.guid}`):e.active=!1})),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:a,messages:s}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...Y(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==a?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,closable:!0,icon:n.icon,iconFlipRtl:n.iconFlipRtl,id:n.guid?`${q}${n.guid}`:null,key:n.textLabel,messageOverrides:{dismissLabel:s.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,disabled:t,placeholder:a,selectionMode:s,selectedItems:n,open:o}=this,c="single"===s,l=n[0],r=!o&&c&&!!l;return e("span",{class:{"input-wrap":!0,"input-wrap--single":c}},r&&e("span",{class:{label:!0,"label--icon":!!l?.icon},key:"label"},l.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`${Q}${i}`,"aria-label":$(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":r,"input--icon":!!this.placeholderIcon},disabled:t,id:`${Z}${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,type:"text",ref:i=>this.textInput=i}))}renderListBoxOptions(){return this.filteredItems.map((i=>e("li",{"aria-selected":l(i.selected),id:i.guid?`${V}${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:i,setContainerEl:t,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a},ref:i},e("div",{class:{"list-container":!0,[f.animation]:!0,[f.animationActive]:a},ref:t},e("ul",{class:{list:!0,"list--hide":!a}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:a,placeholderIconFlipRtl:s}=this,n=i[0],o=n?.icon,c="single"===a;return(!this.open&&n?!!o&&c:!!this.placeholderIcon&&(!n||c))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",flipRtl:this.open&&n?n.iconFlipRtl:s,icon:!this.open&&n?o:t,scale:"s"}))}renderIconEnd(){const{open:i}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i?"chevron-up":"chevron-down",scale:"s"}))}render(){const{guid:i,label:t,open:s}=this,n="single"===this.selectionMode;return e(a,{onClick:this.comboboxFocusHandler},e("div",{"aria-autocomplete":"list","aria-controls":`${Q}${i}`,"aria-expanded":l(s),"aria-haspopup":"listbox","aria-label":$(this),"aria-live":"polite","aria-owns":`${Q}${i}`,class:{wrapper:!0,"wrapper--single":n||!this.selectedItems.length,"wrapper--active":s},onClick:this.clickHandler,onKeyDown:this.keydownHandler,role:"combobox",ref:this.setReferenceEl},e("div",{class:"grid-input"},this.renderIconStart(),!n&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`${Z}${i}`,id:`${J}${i}`},t),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`${J}${i}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`${Q}${i}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e(w,{component:this}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"],effectiveLocale:["effectiveLocaleChange"]}}};ii.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{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 )}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{--calcite-floating-ui-z-index:600;display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}.floating-ui-container--active{visibility:visible}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const ti="icon",ei="icon--active",ai="icon--indent",si=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.toggleSelected()},this.disabled=!1,this.selected=!1,this.active=!1,this.ancestors=void 0,this.guid=k(),this.icon=void 0,this.iconFlipRtl=!1,this.textLabel=void 0,this.value=void 0,this.filterDisabled=void 0}selectedWatchHandler(){this.calciteComboboxItemChange.emit()}connectedCallback(){this.ancestors=G(this.el),this.scale=r(this.el,"scale",this.scale),R(this)}disconnectedCallback(){S(this)}componentDidRender(){C(this)}toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){return this.icon?e("calcite-icon",{class:{"icon--custom":!!this.icon,[ei]:this.icon&&this.selected,[ai]:!0},flipRtl:this.iconFlipRtl,icon:this.icon||i,key:"icon",scale:"l"===this.scale?"m":"s"}):null}renderSelectIndicator(i,t){return i?e("span",{class:{[ti]:!0,"icon--dot":!0,[ai]:!0}}):e("calcite-icon",{class:{[ti]:!0,[ei]:this.selected,[ai]:!0},flipRtl:this.iconFlipRtl,icon:t,key:"indicator",scale:"l"===this.scale?"m":"s"})}renderChildren(){return h(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===r(this.el,"selection-mode","multiple"),t=i&&!this.disabled,s=this.disabled?"circle-disallowed":i?"dot":"check",n={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},o=N(this.el);return e(a,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${o}`}},e("li",{class:n,id:this.guid,onClick:this.itemClickHandler},this.renderSelectIndicator(t,s),this.renderIcon(s),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return s(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};si.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem;--calcite-combobox-item-selector-icon-size:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem;--calcite-combobox-item-selector-icon-size:1rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.625rem;--calcite-combobox-item-spacing-indent:1rem;--calcite-combobox-item-selector-icon-size:1.5rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--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)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{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 )}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);text-decoration-line:none;--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)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-block-start:-1px;padding-inline-start:var(--calcite-combobox-item-spacing-unit-l);color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:center;min-inline-size:var(--calcite-combobox-item-selector-icon-size)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const ni=class{constructor(t){i(this,t),this.guid=k(),this.scale="m",this.ancestors=void 0,this.label=void 0}connectedCallback(){this.ancestors=G(this.el),this.scale=r(this.el,"scale",this.scale)}render(){const{el:i,scale:t}=this,a=N(i);return e("ul",{"aria-labelledby":this.guid,class:{list:!0,[`scale--${t}`]:!0},role:"group"},e("li",{class:{label:!0},id:this.guid,role:"presentation",style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("span",{class:"title"},this.label)),e("slot",null))}get el(){return s(this)}};ni.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}:host,.list{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%;color:var(--calcite-ui-text-3)}.title{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n );border:0 solid;display:block;flex:1 1 0%;border-block-end-width:1px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2);word-wrap:break-word;word-break:break-word;border-block-end-color:var(--calcite-ui-border-3);padding-block:var(--calcite-combobox-item-spacing-unit-l);padding-inline:var(--calcite-combobox-item-spacing-unit-s);margin-inline-start:var(--calcite-combobox-item-indent-value)}";export{ii as calcite_combobox,si as calcite_combobox_item,ni as calcite_combobox_item_group}
@@ -1,124 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.5
5
- */
6
- 'use strict';
7
-
8
- function rgbToHex(color) {
9
- const { r, g, b } = color;
10
- return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b
11
- .toString(16)
12
- .padStart(2, "0")}`.toLowerCase();
13
- }
14
- const hexChar = /^[0-9A-F]$/i;
15
- const shortHandHex = /^#[0-9A-F]{3}$/i;
16
- const longhandHex = /^#[0-9A-F]{6}$/i;
17
- function isValidHex(hex) {
18
- return isShorthandHex(hex) || isLonghandHex(hex);
19
- }
20
- function isShorthandHex(hex) {
21
- return hex && hex.length === 4 && shortHandHex.test(hex);
22
- }
23
- function isLonghandHex(hex) {
24
- return hex && hex.length === 7 && longhandHex.test(hex);
25
- }
26
- function normalizeHex(hex) {
27
- hex = hex.toLowerCase();
28
- if (!hex.startsWith("#")) {
29
- hex = `#${hex}`;
30
- }
31
- if (isShorthandHex(hex)) {
32
- return rgbToHex(hexToRGB(hex));
33
- }
34
- return hex;
35
- }
36
- function hexToRGB(hex) {
37
- if (!isValidHex(hex)) {
38
- return null;
39
- }
40
- hex = hex.replace("#", "");
41
- if (hex.length === 3) {
42
- const [first, second, third] = hex.split("");
43
- const r = parseInt(`${first}${first}`, 16);
44
- const g = parseInt(`${second}${second}`, 16);
45
- const b = parseInt(`${third}${third}`, 16);
46
- return { r, g, b };
47
- }
48
- const r = parseInt(hex.slice(0, 2), 16);
49
- const g = parseInt(hex.slice(2, 4), 16);
50
- const b = parseInt(hex.slice(4, 6), 16);
51
- return { r, g, b };
52
- }
53
- // these utils allow users to pass enum values as strings without having to access the enum
54
- // based on the approach suggested by https://github.com/microsoft/TypeScript/issues/17690#issuecomment-321365759,
55
- const enumify = (x) => x;
56
- const CSSColorMode = enumify({
57
- HEX: "hex",
58
- HEXA: "hexa",
59
- RGB_CSS: "rgb-css",
60
- RGBA_CSS: "rgba-css",
61
- HSL_CSS: "hsl-css",
62
- HSLA_CSS: "hsla-css"
63
- });
64
- const ObjectColorMode = enumify({
65
- RGB: "rgb",
66
- RGBA: "rgba",
67
- HSL: "hsl",
68
- HSLA: "hsla",
69
- HSV: "hsv",
70
- HSVA: "hsva"
71
- });
72
- function parseMode(colorValue) {
73
- if (typeof colorValue === "string") {
74
- if (colorValue.startsWith("#")) {
75
- const { length } = colorValue;
76
- if (length === 4 || length === 7) {
77
- return CSSColorMode.HEX;
78
- }
79
- if (length === 5 || length === 9) {
80
- return CSSColorMode.HEXA;
81
- }
82
- }
83
- if (colorValue.startsWith("rgba(")) {
84
- return CSSColorMode.RGBA_CSS;
85
- }
86
- if (colorValue.startsWith("rgb(")) {
87
- return CSSColorMode.RGB_CSS;
88
- }
89
- if (colorValue.startsWith("hsl(")) {
90
- return CSSColorMode.HSL_CSS;
91
- }
92
- if (colorValue.startsWith("hsla(")) {
93
- return CSSColorMode.HSLA_CSS;
94
- }
95
- }
96
- if (typeof colorValue === "object") {
97
- if (hasChannels(colorValue, "r", "g", "b")) {
98
- return hasChannels(colorValue, "a") ? ObjectColorMode.RGBA : ObjectColorMode.RGB;
99
- }
100
- if (hasChannels(colorValue, "h", "s", "l")) {
101
- return hasChannels(colorValue, "a") ? ObjectColorMode.HSLA : ObjectColorMode.HSL;
102
- }
103
- if (hasChannels(colorValue, "h", "s", "v")) {
104
- return hasChannels(colorValue, "a") ? ObjectColorMode.HSVA : ObjectColorMode.HSV;
105
- }
106
- }
107
- return null;
108
- }
109
- function hasChannels(colorObject, ...channels) {
110
- return channels.every((channel) => channel && colorObject && `${channel}` in colorObject);
111
- }
112
- function colorEqual(value1, value2) {
113
- return value1?.rgbNumber() === value2?.rgbNumber();
114
- }
115
-
116
- exports.CSSColorMode = CSSColorMode;
117
- exports.colorEqual = colorEqual;
118
- exports.hexChar = hexChar;
119
- exports.hexToRGB = hexToRGB;
120
- exports.isLonghandHex = isLonghandHex;
121
- exports.isValidHex = isValidHex;
122
- exports.normalizeHex = normalizeHex;
123
- exports.parseMode = parseMode;
124
- exports.rgbToHex = rgbToHex;
@@ -1,114 +0,0 @@
1
- /*!
2
- * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
- * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.4.0-next.5
5
- */
6
- function rgbToHex(color) {
7
- const { r, g, b } = color;
8
- return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b
9
- .toString(16)
10
- .padStart(2, "0")}`.toLowerCase();
11
- }
12
- const hexChar = /^[0-9A-F]$/i;
13
- const shortHandHex = /^#[0-9A-F]{3}$/i;
14
- const longhandHex = /^#[0-9A-F]{6}$/i;
15
- function isValidHex(hex) {
16
- return isShorthandHex(hex) || isLonghandHex(hex);
17
- }
18
- function isShorthandHex(hex) {
19
- return hex && hex.length === 4 && shortHandHex.test(hex);
20
- }
21
- function isLonghandHex(hex) {
22
- return hex && hex.length === 7 && longhandHex.test(hex);
23
- }
24
- function normalizeHex(hex) {
25
- hex = hex.toLowerCase();
26
- if (!hex.startsWith("#")) {
27
- hex = `#${hex}`;
28
- }
29
- if (isShorthandHex(hex)) {
30
- return rgbToHex(hexToRGB(hex));
31
- }
32
- return hex;
33
- }
34
- function hexToRGB(hex) {
35
- if (!isValidHex(hex)) {
36
- return null;
37
- }
38
- hex = hex.replace("#", "");
39
- if (hex.length === 3) {
40
- const [first, second, third] = hex.split("");
41
- const r = parseInt(`${first}${first}`, 16);
42
- const g = parseInt(`${second}${second}`, 16);
43
- const b = parseInt(`${third}${third}`, 16);
44
- return { r, g, b };
45
- }
46
- const r = parseInt(hex.slice(0, 2), 16);
47
- const g = parseInt(hex.slice(2, 4), 16);
48
- const b = parseInt(hex.slice(4, 6), 16);
49
- return { r, g, b };
50
- }
51
- // these utils allow users to pass enum values as strings without having to access the enum
52
- // based on the approach suggested by https://github.com/microsoft/TypeScript/issues/17690#issuecomment-321365759,
53
- const enumify = (x) => x;
54
- const CSSColorMode = enumify({
55
- HEX: "hex",
56
- HEXA: "hexa",
57
- RGB_CSS: "rgb-css",
58
- RGBA_CSS: "rgba-css",
59
- HSL_CSS: "hsl-css",
60
- HSLA_CSS: "hsla-css"
61
- });
62
- const ObjectColorMode = enumify({
63
- RGB: "rgb",
64
- RGBA: "rgba",
65
- HSL: "hsl",
66
- HSLA: "hsla",
67
- HSV: "hsv",
68
- HSVA: "hsva"
69
- });
70
- function parseMode(colorValue) {
71
- if (typeof colorValue === "string") {
72
- if (colorValue.startsWith("#")) {
73
- const { length } = colorValue;
74
- if (length === 4 || length === 7) {
75
- return CSSColorMode.HEX;
76
- }
77
- if (length === 5 || length === 9) {
78
- return CSSColorMode.HEXA;
79
- }
80
- }
81
- if (colorValue.startsWith("rgba(")) {
82
- return CSSColorMode.RGBA_CSS;
83
- }
84
- if (colorValue.startsWith("rgb(")) {
85
- return CSSColorMode.RGB_CSS;
86
- }
87
- if (colorValue.startsWith("hsl(")) {
88
- return CSSColorMode.HSL_CSS;
89
- }
90
- if (colorValue.startsWith("hsla(")) {
91
- return CSSColorMode.HSLA_CSS;
92
- }
93
- }
94
- if (typeof colorValue === "object") {
95
- if (hasChannels(colorValue, "r", "g", "b")) {
96
- return hasChannels(colorValue, "a") ? ObjectColorMode.RGBA : ObjectColorMode.RGB;
97
- }
98
- if (hasChannels(colorValue, "h", "s", "l")) {
99
- return hasChannels(colorValue, "a") ? ObjectColorMode.HSLA : ObjectColorMode.HSL;
100
- }
101
- if (hasChannels(colorValue, "h", "s", "v")) {
102
- return hasChannels(colorValue, "a") ? ObjectColorMode.HSVA : ObjectColorMode.HSV;
103
- }
104
- }
105
- return null;
106
- }
107
- function hasChannels(colorObject, ...channels) {
108
- return channels.every((channel) => channel && colorObject && `${channel}` in colorObject);
109
- }
110
- function colorEqual(value1, value2) {
111
- return value1?.rgbNumber() === value2?.rgbNumber();
112
- }
113
-
114
- export { CSSColorMode as C, isLonghandHex as a, hexChar as b, colorEqual as c, hexToRGB as h, isValidHex as i, normalizeHex as n, parseMode as p, rgbToHex as r };