@esri/calcite-components 1.0.0-beta.81 → 1.0.0-beta.84

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 (1310) hide show
  1. package/dist/calcite/assets/date-picker/nls/ru.json +4 -4
  2. package/dist/calcite/assets/date-picker/nls/th.json +1 -1
  3. package/dist/calcite/assets/icon/changeDetection16.json +1 -0
  4. package/dist/calcite/assets/icon/changeDetection24.json +1 -0
  5. package/dist/calcite/assets/icon/changeDetection32.json +1 -0
  6. package/dist/calcite/assets/icon/compactness16.json +1 -0
  7. package/dist/calcite/assets/icon/compactness24.json +1 -0
  8. package/dist/calcite/assets/icon/compactness32.json +1 -0
  9. package/dist/calcite/assets/icon/configure16.json +1 -0
  10. package/dist/calcite/assets/icon/configure24.json +1 -0
  11. package/dist/calcite/assets/icon/configure32.json +1 -0
  12. package/dist/calcite/assets/icon/debugScript16.json +1 -0
  13. package/dist/calcite/assets/icon/debugScript24.json +1 -0
  14. package/dist/calcite/assets/icon/debugScript32.json +1 -0
  15. package/dist/calcite/assets/icon/dissolveFeatures16.json +1 -0
  16. package/dist/calcite/assets/icon/dissolveFeatures24.json +1 -0
  17. package/dist/calcite/assets/icon/dissolveFeatures32.json +1 -0
  18. package/dist/calcite/assets/icon/distanceType16.json +1 -0
  19. package/dist/calcite/assets/icon/distanceType24.json +1 -0
  20. package/dist/calcite/assets/icon/distanceType32.json +1 -0
  21. package/dist/calcite/assets/icon/gridDiamond16.json +1 -0
  22. package/dist/calcite/assets/icon/gridDiamond24.json +1 -0
  23. package/dist/calcite/assets/icon/gridDiamond32.json +1 -0
  24. package/dist/calcite/assets/icon/gridHexagon16.json +1 -0
  25. package/dist/calcite/assets/icon/gridHexagon24.json +1 -0
  26. package/dist/calcite/assets/icon/gridHexagon32.json +1 -0
  27. package/dist/calcite/assets/icon/gridTriangle16.json +1 -0
  28. package/dist/calcite/assets/icon/gridTriangle24.json +1 -0
  29. package/dist/calcite/assets/icon/gridTriangle32.json +1 -0
  30. package/dist/calcite/assets/icon/imageDisplayOrder16.json +1 -0
  31. package/dist/calcite/assets/icon/imageDisplayOrder24.json +1 -0
  32. package/dist/calcite/assets/icon/imageDisplayOrder32.json +1 -0
  33. package/dist/calcite/assets/icon/insets16.json +1 -0
  34. package/dist/calcite/assets/icon/insets24.json +1 -0
  35. package/dist/calcite/assets/icon/insets32.json +1 -0
  36. package/dist/calcite/assets/icon/listCheckAll16.json +1 -0
  37. package/dist/calcite/assets/icon/listCheckAll24.json +1 -0
  38. package/dist/calcite/assets/icon/listCheckAll32.json +1 -0
  39. package/dist/calcite/assets/icon/ltrElementsAlign16.json +1 -0
  40. package/dist/calcite/assets/icon/ltrElementsAlign24.json +1 -0
  41. package/dist/calcite/assets/icon/ltrElementsAlign32.json +1 -0
  42. package/dist/calcite/assets/icon/ltrParagraphAlign16.json +1 -0
  43. package/dist/calcite/assets/icon/ltrParagraphAlign24.json +1 -0
  44. package/dist/calcite/assets/icon/ltrParagraphAlign32.json +1 -0
  45. package/dist/calcite/assets/icon/maximumTerritoryDistance16.json +1 -0
  46. package/dist/calcite/assets/icon/maximumTerritoryDistance24.json +1 -0
  47. package/dist/calcite/assets/icon/maximumTerritoryDistance32.json +1 -0
  48. package/dist/calcite/assets/icon/minDistanceBetweenCenters16.json +1 -0
  49. package/dist/calcite/assets/icon/minDistanceBetweenCenters24.json +1 -0
  50. package/dist/calcite/assets/icon/minDistanceBetweenCenters32.json +1 -0
  51. package/dist/calcite/assets/icon/numberCircle416.json +1 -0
  52. package/dist/calcite/assets/icon/numberCircle424.json +1 -0
  53. package/dist/calcite/assets/icon/numberCircle432.json +1 -0
  54. package/dist/calcite/assets/icon/numberCircle516.json +1 -0
  55. package/dist/calcite/assets/icon/numberCircle524.json +1 -0
  56. package/dist/calcite/assets/icon/numberCircle532.json +1 -0
  57. package/dist/calcite/assets/icon/numberCircle616.json +1 -0
  58. package/dist/calcite/assets/icon/numberCircle624.json +1 -0
  59. package/dist/calcite/assets/icon/numberCircle632.json +1 -0
  60. package/dist/calcite/assets/icon/numberCircle716.json +1 -0
  61. package/dist/calcite/assets/icon/numberCircle724.json +1 -0
  62. package/dist/calcite/assets/icon/numberCircle732.json +1 -0
  63. package/dist/calcite/assets/icon/numberCircle816.json +1 -0
  64. package/dist/calcite/assets/icon/numberCircle824.json +1 -0
  65. package/dist/calcite/assets/icon/numberCircle832.json +1 -0
  66. package/dist/calcite/assets/icon/numberCircle916.json +1 -0
  67. package/dist/calcite/assets/icon/numberCircle924.json +1 -0
  68. package/dist/calcite/assets/icon/numberCircle932.json +1 -0
  69. package/dist/calcite/assets/icon/numberOfTerritories16.json +1 -0
  70. package/dist/calcite/assets/icon/numberOfTerritories24.json +1 -0
  71. package/dist/calcite/assets/icon/numberOfTerritories32.json +1 -0
  72. package/dist/calcite/assets/icon/overlapFeatures16.json +1 -0
  73. package/dist/calcite/assets/icon/overlapFeatures24.json +1 -0
  74. package/dist/calcite/assets/icon/overlapFeatures32.json +1 -0
  75. package/dist/calcite/assets/icon/profileVariables16.json +1 -0
  76. package/dist/calcite/assets/icon/profileVariables24.json +1 -0
  77. package/dist/calcite/assets/icon/profileVariables32.json +1 -0
  78. package/dist/calcite/assets/icon/rangefinder16.json +1 -0
  79. package/dist/calcite/assets/icon/rangefinder24.json +1 -0
  80. package/dist/calcite/assets/icon/rangefinder32.json +1 -0
  81. package/dist/calcite/assets/icon/rasterAnalysis16.json +1 -0
  82. package/dist/calcite/assets/icon/rasterAnalysis24.json +1 -0
  83. package/dist/calcite/assets/icon/rasterAnalysis32.json +1 -0
  84. package/dist/calcite/assets/icon/recurrence16.json +1 -0
  85. package/dist/calcite/assets/icon/recurrence24.json +1 -0
  86. package/dist/calcite/assets/icon/recurrence32.json +1 -0
  87. package/dist/calcite/assets/icon/rfid16.json +1 -0
  88. package/dist/calcite/assets/icon/rfid24.json +1 -0
  89. package/dist/calcite/assets/icon/rfid32.json +1 -0
  90. package/dist/calcite/assets/icon/rtlElementsAlign16.json +1 -0
  91. package/dist/calcite/assets/icon/rtlElementsAlign24.json +1 -0
  92. package/dist/calcite/assets/icon/rtlElementsAlign32.json +1 -0
  93. package/dist/calcite/assets/icon/rtlParagraphAlign16.json +1 -0
  94. package/dist/calcite/assets/icon/rtlParagraphAlign24.json +1 -0
  95. package/dist/calcite/assets/icon/rtlParagraphAlign32.json +1 -0
  96. package/dist/calcite/assets/icon/showMultipleLayersAtATime16.json +1 -0
  97. package/dist/calcite/assets/icon/showMultipleLayersAtATime24.json +1 -0
  98. package/dist/calcite/assets/icon/showMultipleLayersAtATime32.json +1 -0
  99. package/dist/calcite/assets/icon/showOneLayerAtATime16.json +1 -0
  100. package/dist/calcite/assets/icon/showOneLayerAtATime24.json +1 -0
  101. package/dist/calcite/assets/icon/showOneLayerAtATime32.json +1 -0
  102. package/dist/calcite/assets/icon/splitFeatures16.json +1 -0
  103. package/dist/calcite/assets/icon/splitFeatures24.json +1 -0
  104. package/dist/calcite/assets/icon/splitFeatures32.json +1 -0
  105. package/dist/calcite/assets/icon/territoryBufferDistance16.json +1 -0
  106. package/dist/calcite/assets/icon/territoryBufferDistance24.json +1 -0
  107. package/dist/calcite/assets/icon/territoryBufferDistance32.json +1 -0
  108. package/dist/calcite/assets/icon/testData16.json +1 -0
  109. package/dist/calcite/assets/icon/testData24.json +1 -0
  110. package/dist/calcite/assets/icon/testData32.json +1 -0
  111. package/dist/calcite/calcite.css +1 -1
  112. package/dist/calcite/calcite.esm.js +2 -2
  113. package/dist/calcite/calcite.js +1 -1
  114. package/dist/calcite/index.esm.js +1 -1
  115. package/dist/calcite/p-00247a8d.system.js +7 -0
  116. package/dist/calcite/p-02bb8194.entry.js +6 -0
  117. package/dist/calcite/p-061aea88.entry.js +6 -0
  118. package/dist/calcite/p-07c6e102.system.js +6 -0
  119. package/dist/calcite/{p-14ca50d9.entry.js → p-0bfe5ca7.entry.js} +2 -2
  120. package/dist/calcite/{p-ffc13e2d.entry.js → p-114d44c3.entry.js} +2 -2
  121. package/dist/calcite/{p-f8d2efa3.js → p-1157ae2f.js} +1 -1
  122. package/dist/calcite/p-1363adcd.entry.js +6 -0
  123. package/dist/calcite/p-13d66ebf.entry.js +6 -0
  124. package/dist/calcite/p-14a22bfc.system.entry.js +6 -0
  125. package/dist/calcite/{p-e4a047e7.system.entry.js → p-14f0920e.system.entry.js} +2 -2
  126. package/dist/calcite/p-16888553.system.entry.js +6 -0
  127. package/dist/calcite/p-16dbdef2.system.entry.js +6 -0
  128. package/dist/calcite/p-1adea169.system.entry.js +6 -0
  129. package/dist/calcite/p-1db25c99.system.entry.js +6 -0
  130. package/dist/calcite/p-204443b0.system.entry.js +6 -0
  131. package/dist/calcite/p-20d610fc.entry.js +6 -0
  132. package/dist/calcite/p-21a1034c.entry.js +6 -0
  133. package/dist/calcite/p-236f1255.system.entry.js +6 -0
  134. package/dist/calcite/p-24d52a72.entry.js +6 -0
  135. package/dist/calcite/p-25349c89.system.entry.js +6 -0
  136. package/dist/calcite/{p-045f28b2.entry.js → p-26757de8.entry.js} +2 -2
  137. package/dist/calcite/p-278c8372.entry.js +6 -0
  138. package/dist/calcite/p-282106cb.system.js +6 -0
  139. package/dist/calcite/p-2b531882.entry.js +6 -0
  140. package/dist/calcite/{p-0ee86cc3.js → p-2bf5b9b6.js} +2 -2
  141. package/dist/calcite/p-2ce10f9a.system.js +6 -0
  142. package/dist/calcite/p-2e3ffd32.system.js +6 -0
  143. package/dist/calcite/p-30256458.entry.js +6 -0
  144. package/dist/calcite/{p-82c05795.js → p-34e0b58b.js} +2 -2
  145. package/dist/calcite/p-352b94a1.system.entry.js +6 -0
  146. package/dist/calcite/p-39bb68b3.system.js +6 -0
  147. package/dist/calcite/p-3aefc333.entry.js +6 -0
  148. package/dist/calcite/p-3d2eebab.system.entry.js +6 -0
  149. package/dist/calcite/{p-a2b46564.entry.js → p-3d8ab9d5.entry.js} +2 -2
  150. package/dist/calcite/p-4185af29.entry.js +6 -0
  151. package/dist/calcite/{p-4275a429.system.js → p-4196e498.system.js} +2 -2
  152. package/dist/calcite/p-41cbf505.system.entry.js +6 -0
  153. package/dist/calcite/p-438d87b0.entry.js +6 -0
  154. package/dist/calcite/p-448b3393.system.entry.js +6 -0
  155. package/dist/calcite/p-45588eee.system.entry.js +6 -0
  156. package/dist/calcite/{p-fb726bdd.system.js → p-4908e3a5.system.js} +1 -1
  157. package/dist/calcite/p-49488c34.entry.js +6 -0
  158. package/dist/calcite/p-4b414b81.entry.js +6 -0
  159. package/dist/calcite/{p-f839293b.system.js → p-4cfef590.system.js} +2 -2
  160. package/dist/calcite/{p-be0551f8.system.js → p-4d9c7cc9.system.js} +1 -1
  161. package/dist/calcite/p-4eb531c4.js +7 -0
  162. package/dist/calcite/p-4f1dbd36.system.entry.js +6 -0
  163. package/dist/calcite/p-4f9ce175.js +6 -0
  164. package/dist/calcite/{p-24db2b0a.system.js → p-51491e10.system.js} +1 -1
  165. package/dist/calcite/p-51ffb552.system.entry.js +6 -0
  166. package/dist/calcite/{p-61021069.system.js → p-549e267e.system.js} +1 -1
  167. package/dist/calcite/p-56f93049.js +6 -0
  168. package/dist/calcite/p-57b60838.entry.js +6 -0
  169. package/dist/calcite/p-594f52ca.system.entry.js +6 -0
  170. package/dist/calcite/{p-769054e6.entry.js → p-5bd80046.entry.js} +2 -2
  171. package/dist/calcite/{p-a9630b98.js → p-5d7f4169.js} +1 -1
  172. package/dist/calcite/p-6309de22.entry.js +6 -0
  173. package/dist/calcite/p-67a0e692.system.entry.js +6 -0
  174. package/dist/calcite/p-6a554714.entry.js +6 -0
  175. package/dist/calcite/{p-3412c57d.system.js → p-6a8f1936.system.js} +2 -2
  176. package/dist/calcite/p-6cff0a2a.entry.js +6 -0
  177. package/dist/calcite/p-6d1c91ee.entry.js +6 -0
  178. package/dist/calcite/p-6d96d61f.system.js +6 -0
  179. package/dist/calcite/p-6e366971.system.entry.js +6 -0
  180. package/dist/calcite/{p-89146101.entry.js → p-6eadd519.entry.js} +2 -2
  181. package/dist/calcite/p-70e1d287.system.entry.js +6 -0
  182. package/dist/calcite/{p-0f0713c7.entry.js → p-7168da40.entry.js} +2 -2
  183. package/dist/calcite/p-74153f82.js +6 -0
  184. package/dist/calcite/p-74b7ff1f.entry.js +6 -0
  185. package/dist/calcite/p-77bc0e49.entry.js +6 -0
  186. package/dist/calcite/p-7c7ad2d6.entry.js +6 -0
  187. package/dist/calcite/p-7cc3d924.system.entry.js +6 -0
  188. package/dist/calcite/{p-db2360e6.js → p-7ec42769.js} +1 -1
  189. package/dist/calcite/p-7ede3d65.system.entry.js +6 -0
  190. package/dist/calcite/{p-e3f1b697.system.entry.js → p-8018d689.system.entry.js} +2 -2
  191. package/dist/calcite/p-8133b2a5.entry.js +6 -0
  192. package/dist/calcite/{p-609f05ef.entry.js → p-8137bc05.entry.js} +2 -2
  193. package/dist/calcite/{p-c62291e6.system.entry.js → p-8202ad8a.system.entry.js} +2 -2
  194. package/dist/calcite/p-82dec536.system.entry.js +6 -0
  195. package/dist/calcite/{p-99bd5049.system.js → p-82e24e64.system.js} +1 -1
  196. package/dist/calcite/p-88d2d38a.entry.js +6 -0
  197. package/dist/calcite/p-890cc5a8.system.entry.js +6 -0
  198. package/dist/calcite/p-891e53dd.system.entry.js +6 -0
  199. package/dist/calcite/p-8ae680a2.system.entry.js +6 -0
  200. package/dist/calcite/{p-c76d5a12.entry.js → p-8c25b934.entry.js} +2 -2
  201. package/dist/calcite/p-8c9e453c.js +6 -0
  202. package/dist/calcite/p-90608473.entry.js +6 -0
  203. package/dist/calcite/{p-47913e44.system.entry.js → p-974b7008.system.entry.js} +2 -2
  204. package/dist/calcite/p-98a2aa34.entry.js +6 -0
  205. package/dist/calcite/p-98dfd14b.system.entry.js +6 -0
  206. package/dist/calcite/p-99551007.system.entry.js +6 -0
  207. package/dist/calcite/{p-1866c3d6.entry.js → p-9c4aa033.entry.js} +2 -2
  208. package/dist/calcite/p-9c5c3cb3.system.entry.js +6 -0
  209. package/dist/calcite/p-9c80707e.system.js +6 -0
  210. package/dist/calcite/p-9d158b37.system.js +6 -0
  211. package/dist/calcite/{p-3ceba891.js → p-9e8d6e02.js} +2 -2
  212. package/dist/calcite/p-9eaf38bc.js +6 -0
  213. package/dist/calcite/p-9f13e930.entry.js +6 -0
  214. package/dist/calcite/{p-4ff2f38c.entry.js → p-a0971f99.entry.js} +2 -2
  215. package/dist/calcite/p-a1208386.entry.js +6 -0
  216. package/dist/calcite/p-a1cc6421.entry.js +6 -0
  217. package/dist/calcite/{p-daf452fa.entry.js → p-a6e1e1e4.entry.js} +2 -2
  218. package/dist/calcite/{p-7e9cac29.system.entry.js → p-a89fc6a1.system.entry.js} +2 -2
  219. package/dist/calcite/{p-d7f31cff.system.js → p-a92ac42d.system.js} +1 -1
  220. package/dist/calcite/{p-5a3414c7.js → p-aa9ce421.js} +1 -1
  221. package/dist/calcite/{p-5dd1e943.system.js → p-aaba2ea0.system.js} +1 -1
  222. package/dist/calcite/p-b2f27af5.entry.js +6 -0
  223. package/dist/calcite/p-b31d3dad.system.entry.js +6 -0
  224. package/dist/calcite/p-b3a4497d.entry.js +6 -0
  225. package/dist/calcite/p-b48feb98.system.entry.js +6 -0
  226. package/dist/calcite/p-bb1711f3.js +6 -0
  227. package/dist/calcite/{p-5ed8397b.js → p-bbd8269c.js} +1 -1
  228. package/dist/calcite/{p-ceae054a.system.entry.js → p-bc5a7fee.system.entry.js} +2 -2
  229. package/dist/calcite/p-bce5ab4f.system.entry.js +6 -0
  230. package/dist/calcite/{p-99520e50.js → p-c2ed5f67.js} +1 -1
  231. package/dist/calcite/p-c78d1678.system.entry.js +6 -0
  232. package/dist/calcite/p-c9d73fce.system.entry.js +6 -0
  233. package/dist/calcite/{p-90660203.js → p-ca1b7a2e.js} +1 -1
  234. package/dist/calcite/{p-e837987d.system.js → p-cc041a12.system.js} +1 -1
  235. package/dist/calcite/p-ccf1e5d8.entry.js +6 -0
  236. package/dist/calcite/{p-1b7e43a7.js → p-ce28c259.js} +2 -2
  237. package/dist/calcite/{p-c477a6ac.system.entry.js → p-ce34288b.entry.js} +2 -2
  238. package/dist/calcite/{p-40a15f4a.system.entry.js → p-ce654c2c.system.entry.js} +2 -2
  239. package/dist/calcite/p-d05f35e8.system.js +6 -0
  240. package/dist/calcite/p-d48cc6d2.entry.js +6 -0
  241. package/dist/calcite/p-d4f596f2.entry.js +6 -0
  242. package/dist/calcite/{p-bef4c06f.system.js → p-d6d814a6.system.js} +1 -1
  243. package/dist/calcite/p-d96573eb.system.entry.js +6 -0
  244. package/dist/calcite/p-dca64e20.js +6 -0
  245. package/dist/calcite/{p-44f00a2a.system.entry.js → p-dd1e12e4.system.entry.js} +2 -2
  246. package/dist/calcite/{p-8729fefb.entry.js → p-dd5185d6.entry.js} +2 -2
  247. package/dist/calcite/p-dd5e585b.entry.js +6 -0
  248. package/dist/calcite/{p-dfd0c1ce.js → p-df26aab6.js} +1 -1
  249. package/dist/calcite/p-e2ccf473.entry.js +6 -0
  250. package/dist/calcite/p-e345449f.entry.js +6 -0
  251. package/dist/calcite/{p-ed535fb3.system.js → p-e45d0fed.system.js} +1 -1
  252. package/dist/calcite/p-e5381e40.system.entry.js +6 -0
  253. package/dist/calcite/p-e6578cf2.system.entry.js +6 -0
  254. package/dist/calcite/{p-7ebc956d.system.js → p-e69d3ca4.system.js} +1 -1
  255. package/dist/calcite/p-e78d93ed.entry.js +6 -0
  256. package/dist/calcite/p-e7b4e5b8.system.entry.js +6 -0
  257. package/dist/calcite/{p-e131dae7.system.entry.js → p-e956598c.system.entry.js} +2 -2
  258. package/dist/calcite/{p-72ab20ed.system.entry.js → p-e9c9fb33.system.entry.js} +2 -2
  259. package/dist/calcite/p-ebb71e37.system.entry.js +6 -0
  260. package/dist/calcite/p-ebeb09f0.system.entry.js +6 -0
  261. package/dist/calcite/{p-bddde234.system.entry.js → p-ec8d9088.system.entry.js} +2 -2
  262. package/dist/calcite/p-eccc820a.entry.js +6 -0
  263. package/dist/calcite/{p-a3478523.js → p-ecd12a92.js} +1 -1
  264. package/dist/calcite/p-eceb3f95.system.entry.js +6 -0
  265. package/dist/calcite/p-ee60b60f.system.entry.js +6 -0
  266. package/dist/calcite/{p-2363fc48.system.entry.js → p-f07627e7.system.entry.js} +2 -2
  267. package/dist/calcite/p-f14e0497.system.entry.js +6 -0
  268. package/dist/calcite/p-f2384caf.entry.js +6 -0
  269. package/dist/calcite/p-f537a6a5.entry.js +6 -0
  270. package/dist/calcite/p-f6760679.js +6 -0
  271. package/dist/calcite/{p-7c32da09.entry.js → p-f8695531.entry.js} +2 -2
  272. package/dist/calcite/{p-23c9c6f9.js → p-f8cb1eeb.js} +1 -1
  273. package/dist/calcite/{p-3113528a.js → p-fb0e5ae3.js} +1 -1
  274. package/dist/calcite/p-fb97a373.system.entry.js +6 -0
  275. package/dist/calcite/p-fbbfde67.system.js +6 -0
  276. package/dist/calcite/p-fc6a158c.system.entry.js +6 -0
  277. package/dist/calcite/p-fca56e68.system.entry.js +6 -0
  278. package/dist/calcite/{p-2f07bcb4.system.js → p-fdc7032c.system.js} +1 -1
  279. package/dist/cjs/{ExpandToggle-e3bd3e9d.js → ExpandToggle-894fe6d0.js} +9 -7
  280. package/dist/cjs/{Heading-b864aca1.js → Heading-9546b15c.js} +3 -3
  281. package/dist/cjs/{array-00db7b4e.js → array-1c85be7d.js} +1 -1
  282. package/dist/cjs/calcite-accordion_2.cjs.entry.js +41 -26
  283. package/dist/cjs/calcite-action-bar.cjs.entry.js +22 -16
  284. package/dist/cjs/calcite-action-group.cjs.entry.js +11 -11
  285. package/dist/cjs/calcite-action-menu.cjs.entry.js +32 -28
  286. package/dist/cjs/calcite-action-pad.cjs.entry.js +20 -15
  287. package/dist/cjs/calcite-action.cjs.entry.js +20 -15
  288. package/dist/cjs/calcite-alert.cjs.entry.js +61 -34
  289. package/dist/cjs/calcite-avatar.cjs.entry.js +12 -7
  290. package/dist/cjs/calcite-block_2.cjs.entry.js +40 -18
  291. package/dist/cjs/calcite-button.cjs.entry.js +18 -14
  292. package/dist/cjs/calcite-card.cjs.entry.js +23 -14
  293. package/dist/cjs/calcite-checkbox.cjs.entry.js +11 -10
  294. package/dist/cjs/calcite-chip.cjs.entry.js +19 -13
  295. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +1396 -1352
  296. package/dist/cjs/calcite-combobox_3.cjs.entry.js +111 -51
  297. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +115 -32
  298. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +129 -54
  299. package/dist/cjs/calcite-fab.cjs.entry.js +6 -5
  300. package/dist/cjs/calcite-filter.cjs.entry.js +17 -15
  301. package/dist/cjs/calcite-flow.cjs.entry.js +12 -11
  302. package/dist/cjs/calcite-graph_2.cjs.entry.js +57 -12
  303. package/dist/cjs/calcite-handle.cjs.entry.js +9 -6
  304. package/dist/cjs/calcite-icon.cjs.entry.js +10 -6
  305. package/dist/cjs/calcite-inline-editable.cjs.entry.js +23 -19
  306. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +56 -23
  307. package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
  308. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +117 -67
  309. package/dist/cjs/calcite-input.cjs.entry.js +136 -80
  310. package/dist/cjs/calcite-label.cjs.entry.js +13 -8
  311. package/dist/cjs/calcite-link.cjs.entry.js +8 -7
  312. package/dist/cjs/calcite-list_3.cjs.entry.js +13 -13
  313. package/dist/cjs/calcite-loader.cjs.entry.js +12 -10
  314. package/dist/cjs/calcite-modal.cjs.entry.js +46 -28
  315. package/dist/cjs/calcite-notice.cjs.entry.js +16 -14
  316. package/dist/cjs/calcite-option_3.cjs.entry.js +16 -16
  317. package/dist/cjs/calcite-pagination.cjs.entry.js +97 -12
  318. package/dist/cjs/calcite-panel.cjs.entry.js +54 -23
  319. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +47 -38
  320. package/dist/cjs/calcite-popover_2.cjs.entry.js +155 -63
  321. package/dist/cjs/calcite-progress.cjs.entry.js +5 -5
  322. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
  323. package/dist/cjs/calcite-radio-button.cjs.entry.js +13 -10
  324. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +15 -12
  325. package/dist/cjs/calcite-rating.cjs.entry.js +33 -15
  326. package/dist/cjs/calcite-scrim.cjs.entry.js +5 -3
  327. package/dist/cjs/calcite-shell_3.cjs.entry.js +10 -9
  328. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
  329. package/dist/cjs/calcite-split-button.cjs.entry.js +9 -6
  330. package/dist/cjs/calcite-stepper_2.cjs.entry.js +175 -121
  331. package/dist/cjs/calcite-switch.cjs.entry.js +12 -10
  332. package/dist/cjs/calcite-tab_4.cjs.entry.js +61 -37
  333. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +8 -7
  334. package/dist/cjs/calcite-tile.cjs.entry.js +9 -8
  335. package/dist/cjs/calcite-tip_3.cjs.entry.js +12 -10
  336. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +188 -141
  337. package/dist/cjs/calcite-tree_2.cjs.entry.js +35 -24
  338. package/dist/cjs/calcite-value-list_2.cjs.entry.js +43 -35
  339. package/dist/cjs/calcite.cjs.js +4 -4
  340. package/dist/cjs/{conditionalSlot-8468d1b6.js → conditionalSlot-ecb74d9a.js} +7 -3
  341. package/dist/cjs/{debounce-a29e2f71.js → debounce-a74a2080.js} +1 -1
  342. package/dist/cjs/{dom-66c5cb56.js → dom-69c7e941.js} +19 -27
  343. package/dist/cjs/{forIn-d4941a7b.js → forIn-efe39801.js} +2 -2
  344. package/dist/cjs/{form-cfcc3b12.js → form-901b31de.js} +39 -3
  345. package/dist/cjs/{guid-364777e6.js → guid-263ed05b.js} +1 -1
  346. package/dist/cjs/{index-ab066772.js → index-8fbe74dd.js} +7 -19
  347. package/dist/cjs/index.cjs.js +1 -1
  348. package/dist/cjs/{interactive-3808ad50.js → interactive-b2df5d51.js} +7 -4
  349. package/dist/cjs/{interfaces-597482d7.js → interfaces-a8a9ed80.js} +1 -1
  350. package/dist/cjs/key-0fe936c7.js +14 -0
  351. package/dist/cjs/{label-e53e11ab.js → label-f1317d82.js} +26 -19
  352. package/dist/cjs/loader.cjs.js +4 -4
  353. package/dist/cjs/locale-0becaa93.js +262 -0
  354. package/dist/cjs/{math-b81c3249.js → math-0877dd01.js} +1 -1
  355. package/dist/cjs/{observers-2dc895e1.js → observers-8169781c.js} +1 -1
  356. package/dist/cjs/{popper-5aeab272.js → popper-46476990.js} +2 -2
  357. package/dist/cjs/{resources-9baed1da.js → resources-192c00c3.js} +10 -22
  358. package/dist/cjs/{resources-7b0c6b5a.js → resources-6ac223e5.js} +44 -3
  359. package/dist/cjs/{resources-ff2cae6a.js → resources-80d6cd05.js} +1 -1
  360. package/dist/cjs/{resources-39df6d9b.js → resources-93a62cd3.js} +1 -1
  361. package/dist/cjs/{sortable.esm-6d0d59e8.js → sortable.esm-b7091c1d.js} +1 -1
  362. package/dist/cjs/{utils-9f674b6a.js → utils-b1d11545.js} +1 -1
  363. package/dist/collection/collection-manifest.json +1 -1
  364. package/dist/collection/components/accordion/accordion.js +27 -22
  365. package/dist/collection/components/accordion/interfaces.js +1 -1
  366. package/dist/collection/components/accordion-item/accordion-item.css +38 -18
  367. package/dist/collection/components/accordion-item/accordion-item.js +98 -27
  368. package/dist/collection/components/action/action.css +38 -14
  369. package/dist/collection/components/action/action.js +28 -24
  370. package/dist/collection/components/action/resources.js +1 -1
  371. package/dist/collection/components/action-bar/action-bar.js +29 -17
  372. package/dist/collection/components/action-bar/resources.js +1 -1
  373. package/dist/collection/components/action-bar/utils.js +1 -1
  374. package/dist/collection/components/action-group/action-group.css +1 -1
  375. package/dist/collection/components/action-group/action-group.js +11 -11
  376. package/dist/collection/components/action-group/resources.js +1 -1
  377. package/dist/collection/components/action-menu/action-menu.css +2 -3
  378. package/dist/collection/components/action-menu/action-menu.js +32 -28
  379. package/dist/collection/components/action-menu/resources.js +1 -1
  380. package/dist/collection/components/action-pad/action-pad.js +30 -19
  381. package/dist/collection/components/action-pad/resources.js +1 -1
  382. package/dist/collection/components/alert/alert.css +37 -38
  383. package/dist/collection/components/alert/alert.js +129 -57
  384. package/dist/collection/components/alert/interfaces.js +1 -1
  385. package/dist/collection/components/alert/resources.js +4 -1
  386. package/dist/collection/components/avatar/avatar.css +1 -1
  387. package/dist/collection/components/avatar/avatar.js +7 -7
  388. package/dist/collection/components/avatar/utils.js +6 -1
  389. package/dist/collection/components/block/block.css +6 -4
  390. package/dist/collection/components/block/block.js +84 -17
  391. package/dist/collection/components/block/resources.js +2 -1
  392. package/dist/collection/components/block-section/block-section.css +6 -5
  393. package/dist/collection/components/block-section/block-section.js +3 -3
  394. package/dist/collection/components/block-section/interfaces.js +1 -1
  395. package/dist/collection/components/block-section/resources.js +1 -1
  396. package/dist/collection/components/button/button.css +116 -57
  397. package/dist/collection/components/button/button.js +11 -7
  398. package/dist/collection/components/button/interfaces.js +1 -1
  399. package/dist/collection/components/button/resources.js +1 -1
  400. package/dist/collection/components/card/card.css +32 -11
  401. package/dist/collection/components/card/card.js +45 -11
  402. package/dist/collection/components/card/resources.js +3 -3
  403. package/dist/collection/components/checkbox/checkbox.css +15 -11
  404. package/dist/collection/components/checkbox/checkbox.js +5 -3
  405. package/dist/collection/components/chip/chip.css +27 -25
  406. package/dist/collection/components/chip/chip.js +28 -5
  407. package/dist/collection/components/chip/interfaces.js +1 -1
  408. package/dist/collection/components/chip/resources.js +4 -3
  409. package/dist/collection/components/color-picker/color-picker.css +3 -12
  410. package/dist/collection/components/color-picker/color-picker.js +111 -41
  411. package/dist/collection/components/color-picker/interfaces.js +1 -1
  412. package/dist/collection/components/color-picker/resources.js +1 -1
  413. package/dist/collection/components/color-picker/utils.js +1 -1
  414. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +27 -3
  415. package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
  416. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
  417. package/dist/collection/components/color-picker-swatch/resources.js +1 -1
  418. package/dist/collection/components/combobox/combobox.css +4 -4
  419. package/dist/collection/components/combobox/combobox.js +195 -57
  420. package/dist/collection/components/combobox/interfaces.js +1 -1
  421. package/dist/collection/components/combobox/resources.js +6 -1
  422. package/dist/collection/components/combobox/utils.js +1 -1
  423. package/dist/collection/components/combobox-item/combobox-item.css +4 -4
  424. package/dist/collection/components/combobox-item/combobox-item.js +32 -4
  425. package/dist/collection/components/combobox-item/resources.js +1 -1
  426. package/dist/collection/components/combobox-item-group/combobox-item-group.css +2 -1
  427. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
  428. package/dist/collection/components/combobox-item-group/resources.js +1 -1
  429. package/dist/collection/components/date-picker/assets/date-picker/nls/ru.json +4 -4
  430. package/dist/collection/components/date-picker/assets/date-picker/nls/th.json +1 -1
  431. package/dist/collection/components/date-picker/date-picker.js +36 -7
  432. package/dist/collection/components/date-picker/interfaces.js +1 -1
  433. package/dist/collection/components/date-picker/resources.js +1 -1
  434. package/dist/collection/components/date-picker/utils.js +7 -1
  435. package/dist/collection/components/date-picker-day/date-picker-day.css +25 -18
  436. package/dist/collection/components/date-picker-day/date-picker-day.js +4 -4
  437. package/dist/collection/components/date-picker-month/date-picker-month.js +38 -10
  438. package/dist/collection/components/date-picker-month-header/date-picker-month-header.css +5 -9
  439. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +32 -7
  440. package/dist/collection/components/date-picker-month-header/resources.js +6 -0
  441. package/dist/collection/components/dropdown/dropdown.css +2 -1
  442. package/dist/collection/components/dropdown/dropdown.js +186 -47
  443. package/dist/collection/components/dropdown/interfaces.js +1 -1
  444. package/dist/collection/components/dropdown/resources.js +4 -1
  445. package/dist/collection/components/dropdown-group/dropdown-group.css +4 -0
  446. package/dist/collection/components/dropdown-group/dropdown-group.js +9 -7
  447. package/dist/collection/components/dropdown-group/interfaces.js +1 -1
  448. package/dist/collection/components/dropdown-group/resources.js +1 -1
  449. package/dist/collection/components/dropdown-item/dropdown-item.css +16 -9
  450. package/dist/collection/components/dropdown-item/dropdown-item.js +21 -21
  451. package/dist/collection/components/dropdown-item/resources.js +1 -1
  452. package/dist/collection/components/fab/fab.js +2 -1
  453. package/dist/collection/components/fab/resources.js +1 -1
  454. package/dist/collection/components/filter/filter.css +3 -3
  455. package/dist/collection/components/filter/filter.js +9 -8
  456. package/dist/collection/components/filter/resources.js +2 -3
  457. package/dist/collection/components/flow/flow.css +1 -9
  458. package/dist/collection/components/flow/flow.js +9 -8
  459. package/dist/collection/components/flow/interfaces.js +1 -1
  460. package/dist/collection/components/flow/resources.js +1 -1
  461. package/dist/collection/components/functional/ExpandToggle.js +5 -3
  462. package/dist/collection/components/functional/Heading.js +2 -2
  463. package/dist/collection/components/graph/graph.css +1 -0
  464. package/dist/collection/components/graph/graph.js +1 -1
  465. package/dist/collection/components/graph/interfaces.js +1 -1
  466. package/dist/collection/components/graph/util.js +29 -1
  467. package/dist/collection/components/handle/handle.css +0 -2
  468. package/dist/collection/components/handle/handle.js +7 -5
  469. package/dist/collection/components/handle/resources.js +1 -1
  470. package/dist/collection/components/icon/assets/icon/changeDetection16.json +1 -0
  471. package/dist/collection/components/icon/assets/icon/changeDetection24.json +1 -0
  472. package/dist/collection/components/icon/assets/icon/changeDetection32.json +1 -0
  473. package/dist/collection/components/icon/assets/icon/compactness16.json +1 -0
  474. package/dist/collection/components/icon/assets/icon/compactness24.json +1 -0
  475. package/dist/collection/components/icon/assets/icon/compactness32.json +1 -0
  476. package/dist/collection/components/icon/assets/icon/configure16.json +1 -0
  477. package/dist/collection/components/icon/assets/icon/configure24.json +1 -0
  478. package/dist/collection/components/icon/assets/icon/configure32.json +1 -0
  479. package/dist/collection/components/icon/assets/icon/debugScript16.json +1 -0
  480. package/dist/collection/components/icon/assets/icon/debugScript24.json +1 -0
  481. package/dist/collection/components/icon/assets/icon/debugScript32.json +1 -0
  482. package/dist/collection/components/icon/assets/icon/dissolveFeatures16.json +1 -0
  483. package/dist/collection/components/icon/assets/icon/dissolveFeatures24.json +1 -0
  484. package/dist/collection/components/icon/assets/icon/dissolveFeatures32.json +1 -0
  485. package/dist/collection/components/icon/assets/icon/distanceType16.json +1 -0
  486. package/dist/collection/components/icon/assets/icon/distanceType24.json +1 -0
  487. package/dist/collection/components/icon/assets/icon/distanceType32.json +1 -0
  488. package/dist/collection/components/icon/assets/icon/gridDiamond16.json +1 -0
  489. package/dist/collection/components/icon/assets/icon/gridDiamond24.json +1 -0
  490. package/dist/collection/components/icon/assets/icon/gridDiamond32.json +1 -0
  491. package/dist/collection/components/icon/assets/icon/gridHexagon16.json +1 -0
  492. package/dist/collection/components/icon/assets/icon/gridHexagon24.json +1 -0
  493. package/dist/collection/components/icon/assets/icon/gridHexagon32.json +1 -0
  494. package/dist/collection/components/icon/assets/icon/gridTriangle16.json +1 -0
  495. package/dist/collection/components/icon/assets/icon/gridTriangle24.json +1 -0
  496. package/dist/collection/components/icon/assets/icon/gridTriangle32.json +1 -0
  497. package/dist/collection/components/icon/assets/icon/imageDisplayOrder16.json +1 -0
  498. package/dist/collection/components/icon/assets/icon/imageDisplayOrder24.json +1 -0
  499. package/dist/collection/components/icon/assets/icon/imageDisplayOrder32.json +1 -0
  500. package/dist/collection/components/icon/assets/icon/insets16.json +1 -0
  501. package/dist/collection/components/icon/assets/icon/insets24.json +1 -0
  502. package/dist/collection/components/icon/assets/icon/insets32.json +1 -0
  503. package/dist/collection/components/icon/assets/icon/listCheckAll16.json +1 -0
  504. package/dist/collection/components/icon/assets/icon/listCheckAll24.json +1 -0
  505. package/dist/collection/components/icon/assets/icon/listCheckAll32.json +1 -0
  506. package/dist/collection/components/icon/assets/icon/ltrElementsAlign16.json +1 -0
  507. package/dist/collection/components/icon/assets/icon/ltrElementsAlign24.json +1 -0
  508. package/dist/collection/components/icon/assets/icon/ltrElementsAlign32.json +1 -0
  509. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign16.json +1 -0
  510. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign24.json +1 -0
  511. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign32.json +1 -0
  512. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance16.json +1 -0
  513. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance24.json +1 -0
  514. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance32.json +1 -0
  515. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters16.json +1 -0
  516. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters24.json +1 -0
  517. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters32.json +1 -0
  518. package/dist/collection/components/icon/assets/icon/numberCircle416.json +1 -0
  519. package/dist/collection/components/icon/assets/icon/numberCircle424.json +1 -0
  520. package/dist/collection/components/icon/assets/icon/numberCircle432.json +1 -0
  521. package/dist/collection/components/icon/assets/icon/numberCircle516.json +1 -0
  522. package/dist/collection/components/icon/assets/icon/numberCircle524.json +1 -0
  523. package/dist/collection/components/icon/assets/icon/numberCircle532.json +1 -0
  524. package/dist/collection/components/icon/assets/icon/numberCircle616.json +1 -0
  525. package/dist/collection/components/icon/assets/icon/numberCircle624.json +1 -0
  526. package/dist/collection/components/icon/assets/icon/numberCircle632.json +1 -0
  527. package/dist/collection/components/icon/assets/icon/numberCircle716.json +1 -0
  528. package/dist/collection/components/icon/assets/icon/numberCircle724.json +1 -0
  529. package/dist/collection/components/icon/assets/icon/numberCircle732.json +1 -0
  530. package/dist/collection/components/icon/assets/icon/numberCircle816.json +1 -0
  531. package/dist/collection/components/icon/assets/icon/numberCircle824.json +1 -0
  532. package/dist/collection/components/icon/assets/icon/numberCircle832.json +1 -0
  533. package/dist/collection/components/icon/assets/icon/numberCircle916.json +1 -0
  534. package/dist/collection/components/icon/assets/icon/numberCircle924.json +1 -0
  535. package/dist/collection/components/icon/assets/icon/numberCircle932.json +1 -0
  536. package/dist/collection/components/icon/assets/icon/numberOfTerritories16.json +1 -0
  537. package/dist/collection/components/icon/assets/icon/numberOfTerritories24.json +1 -0
  538. package/dist/collection/components/icon/assets/icon/numberOfTerritories32.json +1 -0
  539. package/dist/collection/components/icon/assets/icon/overlapFeatures16.json +1 -0
  540. package/dist/collection/components/icon/assets/icon/overlapFeatures24.json +1 -0
  541. package/dist/collection/components/icon/assets/icon/overlapFeatures32.json +1 -0
  542. package/dist/collection/components/icon/assets/icon/profileVariables16.json +1 -0
  543. package/dist/collection/components/icon/assets/icon/profileVariables24.json +1 -0
  544. package/dist/collection/components/icon/assets/icon/profileVariables32.json +1 -0
  545. package/dist/collection/components/icon/assets/icon/rangefinder16.json +1 -0
  546. package/dist/collection/components/icon/assets/icon/rangefinder24.json +1 -0
  547. package/dist/collection/components/icon/assets/icon/rangefinder32.json +1 -0
  548. package/dist/collection/components/icon/assets/icon/rasterAnalysis16.json +1 -0
  549. package/dist/collection/components/icon/assets/icon/rasterAnalysis24.json +1 -0
  550. package/dist/collection/components/icon/assets/icon/rasterAnalysis32.json +1 -0
  551. package/dist/collection/components/icon/assets/icon/recurrence16.json +1 -0
  552. package/dist/collection/components/icon/assets/icon/recurrence24.json +1 -0
  553. package/dist/collection/components/icon/assets/icon/recurrence32.json +1 -0
  554. package/dist/collection/components/icon/assets/icon/rfid16.json +1 -0
  555. package/dist/collection/components/icon/assets/icon/rfid24.json +1 -0
  556. package/dist/collection/components/icon/assets/icon/rfid32.json +1 -0
  557. package/dist/collection/components/icon/assets/icon/rtlElementsAlign16.json +1 -0
  558. package/dist/collection/components/icon/assets/icon/rtlElementsAlign24.json +1 -0
  559. package/dist/collection/components/icon/assets/icon/rtlElementsAlign32.json +1 -0
  560. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign16.json +1 -0
  561. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign24.json +1 -0
  562. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign32.json +1 -0
  563. package/dist/collection/components/icon/assets/icon/showMultipleLayersAtATime16.json +1 -0
  564. package/dist/collection/components/icon/assets/icon/showMultipleLayersAtATime24.json +1 -0
  565. package/dist/collection/components/icon/assets/icon/showMultipleLayersAtATime32.json +1 -0
  566. package/dist/collection/components/icon/assets/icon/showOneLayerAtATime16.json +1 -0
  567. package/dist/collection/components/icon/assets/icon/showOneLayerAtATime24.json +1 -0
  568. package/dist/collection/components/icon/assets/icon/showOneLayerAtATime32.json +1 -0
  569. package/dist/collection/components/icon/assets/icon/splitFeatures16.json +1 -0
  570. package/dist/collection/components/icon/assets/icon/splitFeatures24.json +1 -0
  571. package/dist/collection/components/icon/assets/icon/splitFeatures32.json +1 -0
  572. package/dist/collection/components/icon/assets/icon/territoryBufferDistance16.json +1 -0
  573. package/dist/collection/components/icon/assets/icon/territoryBufferDistance24.json +1 -0
  574. package/dist/collection/components/icon/assets/icon/territoryBufferDistance32.json +1 -0
  575. package/dist/collection/components/icon/assets/icon/testData16.json +1 -0
  576. package/dist/collection/components/icon/assets/icon/testData24.json +1 -0
  577. package/dist/collection/components/icon/assets/icon/testData32.json +1 -0
  578. package/dist/collection/components/icon/icon.js +3 -3
  579. package/dist/collection/components/icon/resources.js +1 -1
  580. package/dist/collection/components/icon/utils.js +5 -1
  581. package/dist/collection/components/inline-editable/inline-editable.css +1 -4
  582. package/dist/collection/components/inline-editable/inline-editable.js +18 -14
  583. package/dist/collection/components/inline-editable/resources.js +1 -1
  584. package/dist/collection/components/input/input.css +47 -56
  585. package/dist/collection/components/input/input.js +250 -111
  586. package/dist/collection/components/input/interfaces.js +1 -1
  587. package/dist/collection/components/input/resources.js +4 -1
  588. package/dist/collection/components/input-date-picker/input-date-picker.css +1 -1
  589. package/dist/collection/components/input-date-picker/input-date-picker.js +52 -18
  590. package/dist/collection/components/input-message/input-message.css +11 -16
  591. package/dist/collection/components/input-message/input-message.js +1 -1
  592. package/dist/collection/components/input-message/interfaces.js +1 -1
  593. package/dist/collection/components/input-number/interfaces.js +1 -0
  594. package/dist/collection/components/input-time-picker/input-time-picker.js +54 -16
  595. package/dist/collection/components/interfaces.js +1 -1
  596. package/dist/collection/components/label/label.css +28 -8
  597. package/dist/collection/components/label/label.js +21 -13
  598. package/dist/collection/components/label/resources.js +1 -1
  599. package/dist/collection/components/link/link.css +11 -18
  600. package/dist/collection/components/link/link.js +3 -2
  601. package/dist/collection/components/list/list.js +5 -4
  602. package/dist/collection/components/list/resources.js +1 -1
  603. package/dist/collection/components/list-item/list-item.css +23 -15
  604. package/dist/collection/components/list-item/list-item.js +12 -12
  605. package/dist/collection/components/list-item/resources.js +1 -1
  606. package/dist/collection/components/list-item-group/list-item-group.css +1 -1
  607. package/dist/collection/components/list-item-group/list-item-group.js +3 -3
  608. package/dist/collection/components/list-item-group/resources.js +1 -1
  609. package/dist/collection/components/loader/loader.css +3 -3
  610. package/dist/collection/components/loader/loader.js +23 -21
  611. package/dist/collection/components/modal/interfaces.js +1 -1
  612. package/dist/collection/components/modal/modal.css +30 -60
  613. package/dist/collection/components/modal/modal.js +117 -71
  614. package/dist/collection/components/modal/resources.js +1 -1
  615. package/dist/collection/components/notice/notice.css +22 -25
  616. package/dist/collection/components/notice/notice.js +25 -22
  617. package/dist/collection/components/notice/resources.js +1 -1
  618. package/dist/collection/components/option/option.js +10 -10
  619. package/dist/collection/components/option-group/option-group.js +7 -7
  620. package/dist/collection/components/pagination/pagination.css +26 -20
  621. package/dist/collection/components/pagination/pagination.js +49 -22
  622. package/dist/collection/components/pagination/resources.js +1 -1
  623. package/dist/collection/components/panel/panel.css +15 -8
  624. package/dist/collection/components/panel/panel.js +123 -43
  625. package/dist/collection/components/panel/resources.js +2 -1
  626. package/dist/collection/components/pick-list/pick-list.js +40 -29
  627. package/dist/collection/components/pick-list/resources.js +1 -1
  628. package/dist/collection/components/pick-list/shared-list-logic.js +3 -3
  629. package/dist/collection/components/pick-list/shared-list-render.js +4 -15
  630. package/dist/collection/components/pick-list-group/pick-list-group.css +2 -1
  631. package/dist/collection/components/pick-list-group/pick-list-group.js +3 -3
  632. package/dist/collection/components/pick-list-group/resources.js +1 -1
  633. package/dist/collection/components/pick-list-item/pick-list-item.css +3 -4
  634. package/dist/collection/components/pick-list-item/pick-list-item.js +47 -37
  635. package/dist/collection/components/pick-list-item/resources.js +1 -1
  636. package/dist/collection/components/popover/PopoverManager.js +74 -0
  637. package/dist/collection/components/popover/popover.css +7 -1
  638. package/dist/collection/components/popover/popover.js +128 -50
  639. package/dist/collection/components/popover/resources.js +1 -2
  640. package/dist/collection/components/popover-manager/popover-manager.js +33 -45
  641. package/dist/collection/components/progress/progress.css +2 -1
  642. package/dist/collection/components/progress/progress.js +9 -9
  643. package/dist/collection/components/radio-button/radio-button.css +10 -6
  644. package/dist/collection/components/radio-button/radio-button.js +6 -3
  645. package/dist/collection/components/radio-button/resources.js +1 -1
  646. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
  647. package/dist/collection/components/radio-group/interfaces.js +1 -1
  648. package/dist/collection/components/radio-group/radio-group.css +2 -1
  649. package/dist/collection/components/radio-group/radio-group.js +12 -6
  650. package/dist/collection/components/radio-group-item/radio-group-item.css +14 -2
  651. package/dist/collection/components/radio-group-item/radio-group-item.js +6 -6
  652. package/dist/collection/components/radio-group-item/resources.js +1 -1
  653. package/dist/collection/components/rating/rating.css +2 -12
  654. package/dist/collection/components/rating/rating.js +26 -8
  655. package/dist/collection/components/rating/resources.js +1 -1
  656. package/dist/collection/components/scrim/resources.js +1 -1
  657. package/dist/collection/components/scrim/scrim.js +4 -2
  658. package/dist/collection/components/select/resources.js +1 -1
  659. package/dist/collection/components/select/select.css +0 -2
  660. package/dist/collection/components/select/select.js +3 -3
  661. package/dist/collection/components/shell/resources.js +1 -1
  662. package/dist/collection/components/shell/shell.css +7 -3
  663. package/dist/collection/components/shell/shell.js +1 -1
  664. package/dist/collection/components/shell-center-row/resources.js +1 -1
  665. package/dist/collection/components/shell-center-row/shell-center-row.css +1 -1
  666. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
  667. package/dist/collection/components/shell-panel/resources.js +1 -1
  668. package/dist/collection/components/shell-panel/shell-panel.css +13 -9
  669. package/dist/collection/components/shell-panel/shell-panel.js +6 -2
  670. package/dist/collection/components/slider/slider.css +47 -10
  671. package/dist/collection/components/slider/slider.js +19 -2
  672. package/dist/collection/components/sortable-list/resources.js +1 -1
  673. package/dist/collection/components/sortable-list/sortable-list.js +1 -1
  674. package/dist/collection/components/split-button/resources.js +1 -1
  675. package/dist/collection/components/split-button/split-button.css +1 -4
  676. package/dist/collection/components/split-button/split-button.js +6 -3
  677. package/dist/collection/components/stepper/interfaces.js +6 -0
  678. package/dist/collection/components/stepper/stepper.js +150 -72
  679. package/dist/collection/components/stepper-item/stepper-item.css +50 -17
  680. package/dist/collection/components/stepper-item/stepper-item.js +183 -89
  681. package/dist/collection/components/switch/switch.css +2 -3
  682. package/dist/collection/components/switch/switch.js +6 -4
  683. package/dist/collection/components/tab/interfaces.js +1 -1
  684. package/dist/collection/components/tab/tab.js +27 -10
  685. package/dist/collection/components/tab-nav/tab-nav.css +21 -4
  686. package/dist/collection/components/tab-nav/tab-nav.js +28 -17
  687. package/dist/collection/components/tab-title/tab-title.css +78 -27
  688. package/dist/collection/components/tab-title/tab-title.js +41 -26
  689. package/dist/collection/components/tabs/interfaces.js +1 -1
  690. package/dist/collection/components/tabs/resources.js +1 -1
  691. package/dist/collection/components/tabs/tabs.css +41 -1
  692. package/dist/collection/components/tabs/tabs.js +17 -12
  693. package/dist/collection/components/tile/resources.js +1 -1
  694. package/dist/collection/components/tile/tile.css +5 -4
  695. package/dist/collection/components/tile/tile.js +2 -1
  696. package/dist/collection/components/tile-select/interfaces.js +1 -1
  697. package/dist/collection/components/tile-select/resources.js +1 -1
  698. package/dist/collection/components/tile-select/tile-select.css +9 -3
  699. package/dist/collection/components/tile-select/tile-select.js +3 -2
  700. package/dist/collection/components/tile-select-group/interfaces.js +1 -1
  701. package/dist/collection/components/tile-select-group/tile-select-group.css +1 -1
  702. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
  703. package/dist/collection/components/time-picker/resources.js +1 -1
  704. package/dist/collection/components/time-picker/time-picker.css +8 -5
  705. package/dist/collection/components/time-picker/time-picker.js +61 -26
  706. package/dist/collection/components/tip/resources.js +1 -1
  707. package/dist/collection/components/tip/tip.css +4 -4
  708. package/dist/collection/components/tip/tip.js +1 -1
  709. package/dist/collection/components/tip-group/tip-group.js +1 -1
  710. package/dist/collection/components/tip-manager/resources.js +1 -1
  711. package/dist/collection/components/tip-manager/tip-manager.css +3 -14
  712. package/dist/collection/components/tip-manager/tip-manager.js +23 -4
  713. package/dist/collection/components/tooltip/TooltipManager.js +161 -0
  714. package/dist/collection/components/tooltip/resources.js +1 -2
  715. package/dist/collection/components/tooltip/tooltip.css +7 -4
  716. package/dist/collection/components/tooltip/tooltip.js +58 -30
  717. package/dist/collection/components/tooltip-manager/tooltip-manager.js +6 -160
  718. package/dist/collection/components/tree/interfaces.js +1 -1
  719. package/dist/collection/components/tree/tree.js +18 -13
  720. package/dist/collection/components/tree-item/interfaces.js +1 -1
  721. package/dist/collection/components/tree-item/resources.js +1 -1
  722. package/dist/collection/components/tree-item/tree-item.css +24 -19
  723. package/dist/collection/components/tree-item/tree-item.js +34 -28
  724. package/dist/collection/components/value-list/resources.js +1 -1
  725. package/dist/collection/components/value-list/value-list.js +45 -34
  726. package/dist/collection/components/value-list-item/resources.js +1 -1
  727. package/dist/collection/components/value-list-item/value-list-item.css +2 -3
  728. package/dist/collection/components/value-list-item/value-list-item.js +37 -28
  729. package/dist/collection/utils/array.js +1 -1
  730. package/dist/collection/utils/conditionalSlot.js +5 -1
  731. package/dist/collection/utils/date.js +36 -1
  732. package/dist/collection/utils/dom.js +17 -25
  733. package/dist/collection/utils/filter.js +4 -4
  734. package/dist/collection/utils/form.js +35 -1
  735. package/dist/collection/utils/globalAttributes.js +6 -1
  736. package/dist/collection/utils/guid.js +1 -1
  737. package/dist/collection/utils/interactive.js +7 -4
  738. package/dist/collection/utils/key.js +1 -1
  739. package/dist/collection/utils/label.js +25 -18
  740. package/dist/collection/utils/locale.js +30 -36
  741. package/dist/collection/utils/math.js +1 -1
  742. package/dist/collection/utils/number.js +71 -8
  743. package/dist/collection/utils/observers.js +1 -1
  744. package/dist/collection/utils/openCloseComponent.js +6 -0
  745. package/dist/collection/utils/popper.js +1 -1
  746. package/dist/collection/utils/resources.js +1 -1
  747. package/dist/collection/utils/time.js +1 -1
  748. package/dist/components/ExpandToggle.js +5 -3
  749. package/dist/components/Heading.js +2 -2
  750. package/dist/components/action-group.js +14 -20
  751. package/dist/components/action-menu.js +34 -36
  752. package/dist/components/action.js +16 -12
  753. package/dist/components/array.js +1 -1
  754. package/dist/components/button.js +14 -10
  755. package/dist/components/calcite-accordion-item.js +28 -15
  756. package/dist/components/calcite-accordion.js +17 -12
  757. package/dist/components/calcite-action-bar.js +25 -25
  758. package/dist/components/calcite-action-group.js +1 -1
  759. package/dist/components/calcite-action-menu.js +1 -1
  760. package/dist/components/calcite-action-pad.js +24 -25
  761. package/dist/components/calcite-action.js +1 -1
  762. package/dist/components/calcite-alert.js +59 -32
  763. package/dist/components/calcite-avatar.js +8 -3
  764. package/dist/components/calcite-block-section.js +4 -4
  765. package/dist/components/calcite-block.js +49 -31
  766. package/dist/components/calcite-button.js +1 -1
  767. package/dist/components/calcite-card.js +22 -12
  768. package/dist/components/calcite-checkbox.js +1 -1
  769. package/dist/components/calcite-chip.js +1 -1
  770. package/dist/components/calcite-color-picker-hex-input.js +1 -1
  771. package/dist/components/calcite-color-picker-swatch.js +1 -1
  772. package/dist/components/calcite-color-picker.js +96 -42
  773. package/dist/components/calcite-combobox-item-group.js +1 -1
  774. package/dist/components/calcite-combobox-item.js +5 -2
  775. package/dist/components/calcite-combobox.js +103 -42
  776. package/dist/components/calcite-date-picker-day.js +1 -1
  777. package/dist/components/calcite-date-picker-month-header.js +1 -1
  778. package/dist/components/calcite-date-picker-month.js +1 -1
  779. package/dist/components/calcite-date-picker.js +1 -1
  780. package/dist/components/calcite-dropdown-group.js +9 -7
  781. package/dist/components/calcite-dropdown-item.js +19 -19
  782. package/dist/components/calcite-dropdown.js +1 -1
  783. package/dist/components/calcite-fab.js +2 -1
  784. package/dist/components/calcite-filter.js +1 -1
  785. package/dist/components/calcite-flow.js +10 -9
  786. package/dist/components/calcite-graph.js +1 -1
  787. package/dist/components/calcite-handle.js +1 -1
  788. package/dist/components/calcite-icon.js +1 -1
  789. package/dist/components/calcite-inline-editable.js +19 -15
  790. package/dist/components/calcite-input-date-picker.js +51 -17
  791. package/dist/components/calcite-input-message.js +2 -2
  792. package/dist/components/calcite-input-time-picker.js +35 -14
  793. package/dist/components/calcite-input.js +1 -1
  794. package/dist/components/calcite-label.js +2 -2
  795. package/dist/components/calcite-link.js +1 -1
  796. package/dist/components/calcite-list-item-group.js +2 -2
  797. package/dist/components/calcite-list-item.js +4 -4
  798. package/dist/components/calcite-list.js +2 -2
  799. package/dist/components/calcite-loader.js +1 -1
  800. package/dist/components/calcite-modal.js +43 -25
  801. package/dist/components/calcite-notice.js +10 -8
  802. package/dist/components/calcite-option-group.js +4 -4
  803. package/dist/components/calcite-option.js +5 -5
  804. package/dist/components/calcite-pagination.js +96 -11
  805. package/dist/components/calcite-panel.js +61 -34
  806. package/dist/components/calcite-pick-list-group.js +2 -2
  807. package/dist/components/calcite-pick-list-item.js +1 -1
  808. package/dist/components/calcite-pick-list.js +21 -16
  809. package/dist/components/calcite-popover-manager.js +31 -38
  810. package/dist/components/calcite-popover.js +1 -1
  811. package/dist/components/calcite-progress.js +1 -1
  812. package/dist/components/calcite-radio-button-group.js +1 -1
  813. package/dist/components/calcite-radio-button.js +8 -5
  814. package/dist/components/calcite-radio-group-item.js +6 -6
  815. package/dist/components/calcite-radio-group.js +8 -5
  816. package/dist/components/calcite-rating.js +28 -10
  817. package/dist/components/calcite-scrim.js +1 -1
  818. package/dist/components/calcite-select.js +4 -4
  819. package/dist/components/calcite-shell-center-row.js +2 -2
  820. package/dist/components/calcite-shell-panel.js +3 -2
  821. package/dist/components/calcite-shell.js +1 -1
  822. package/dist/components/calcite-slider.js +22 -5
  823. package/dist/components/calcite-sortable-list.js +1 -1
  824. package/dist/components/calcite-split-button.js +7 -4
  825. package/dist/components/calcite-stepper-item.js +79 -65
  826. package/dist/components/calcite-stepper.js +97 -55
  827. package/dist/components/calcite-switch.js +1 -1
  828. package/dist/components/calcite-tab-nav.js +1 -1
  829. package/dist/components/calcite-tab-title.js +1 -1
  830. package/dist/components/calcite-tab.js +1 -1
  831. package/dist/components/calcite-tabs.js +1 -1
  832. package/dist/components/calcite-tile-select-group.js +2 -2
  833. package/dist/components/calcite-tile-select.js +4 -3
  834. package/dist/components/calcite-tile.js +1 -1
  835. package/dist/components/calcite-time-picker.js +1 -1
  836. package/dist/components/calcite-tip-group.js +1 -1
  837. package/dist/components/calcite-tip-manager.js +7 -5
  838. package/dist/components/calcite-tip.js +3 -3
  839. package/dist/components/calcite-tooltip-manager.js +48 -2
  840. package/dist/components/calcite-tooltip.js +195 -24
  841. package/dist/components/calcite-tree-item.js +21 -15
  842. package/dist/components/calcite-tree.js +12 -7
  843. package/dist/components/calcite-value-list-item.js +16 -13
  844. package/dist/components/calcite-value-list.js +22 -17
  845. package/dist/components/checkbox.js +7 -5
  846. package/dist/components/chip.js +15 -8
  847. package/dist/components/color-picker-hex-input.js +11 -3
  848. package/dist/components/color-picker-swatch.js +1335 -1351
  849. package/dist/components/conditionalSlot.js +5 -1
  850. package/dist/components/date-picker-day.js +4 -4
  851. package/dist/components/date-picker-month-header.js +35 -9
  852. package/dist/components/date-picker-month.js +36 -8
  853. package/dist/components/date-picker.js +42 -7
  854. package/dist/components/date.js +37 -2
  855. package/dist/components/debounce.js +1 -1
  856. package/dist/components/dom.js +18 -26
  857. package/dist/components/dropdown.js +104 -30
  858. package/dist/components/filter.js +11 -9
  859. package/dist/components/forIn.js +1 -1
  860. package/dist/components/form.js +37 -3
  861. package/dist/components/graph.js +30 -2
  862. package/dist/components/guid.js +1 -1
  863. package/dist/components/handle.js +7 -5
  864. package/dist/components/icon.js +7 -3
  865. package/dist/components/index.d.ts +90 -5
  866. package/dist/components/index.js +91 -1
  867. package/dist/components/input.js +126 -67
  868. package/dist/components/interactive.js +7 -4
  869. package/dist/components/interfaces.js +1 -1
  870. package/dist/components/interfaces2.js +1 -1
  871. package/dist/components/key.js +11 -0
  872. package/dist/components/label.js +86 -104
  873. package/dist/components/label2.js +112 -82
  874. package/dist/components/link.js +4 -3
  875. package/dist/components/loader.js +10 -8
  876. package/dist/components/locale.js +159 -37
  877. package/dist/components/math.js +1 -1
  878. package/dist/components/observers.js +1 -1
  879. package/dist/components/pick-list-item.js +22 -18
  880. package/dist/components/popover.js +145 -26
  881. package/dist/components/popper.js +2 -2
  882. package/dist/components/progress.js +4 -4
  883. package/dist/components/resources.js +11 -19
  884. package/dist/components/resources2.js +8 -6
  885. package/dist/components/resources3.js +25 -11
  886. package/dist/components/scrim.js +4 -2
  887. package/dist/components/shared-list-render.js +9 -21
  888. package/dist/components/sortable.esm.js +1 -1
  889. package/dist/components/switch.js +8 -6
  890. package/dist/components/tab-nav.js +22 -11
  891. package/dist/components/tab-title.js +19 -16
  892. package/dist/components/tab.js +11 -6
  893. package/dist/components/tabs.js +12 -7
  894. package/dist/components/tile.js +3 -2
  895. package/dist/components/time-picker.js +52 -22
  896. package/dist/components/utils.js +1 -1
  897. package/dist/components/utils2.js +1 -1
  898. package/dist/custom-elements/index.js +3830 -2719
  899. package/dist/esm/{ExpandToggle-847b61ba.js → ExpandToggle-baf2c551.js} +9 -7
  900. package/dist/esm/{Heading-f4ee0499.js → Heading-1183c4d7.js} +3 -3
  901. package/dist/esm/{array-328a8961.js → array-d7b2d2da.js} +1 -1
  902. package/dist/esm/calcite-accordion_2.entry.js +41 -26
  903. package/dist/esm/calcite-action-bar.entry.js +22 -16
  904. package/dist/esm/calcite-action-group.entry.js +11 -11
  905. package/dist/esm/calcite-action-menu.entry.js +32 -28
  906. package/dist/esm/calcite-action-pad.entry.js +20 -15
  907. package/dist/esm/calcite-action.entry.js +20 -15
  908. package/dist/esm/calcite-alert.entry.js +61 -34
  909. package/dist/esm/calcite-avatar.entry.js +12 -7
  910. package/dist/esm/calcite-block_2.entry.js +40 -18
  911. package/dist/esm/calcite-button.entry.js +18 -14
  912. package/dist/esm/calcite-card.entry.js +23 -14
  913. package/dist/esm/calcite-checkbox.entry.js +11 -10
  914. package/dist/esm/calcite-chip.entry.js +19 -13
  915. package/dist/esm/calcite-color-picker_3.entry.js +1396 -1352
  916. package/dist/esm/calcite-combobox_3.entry.js +111 -51
  917. package/dist/esm/calcite-date-picker_4.entry.js +115 -32
  918. package/dist/esm/calcite-dropdown_3.entry.js +129 -54
  919. package/dist/esm/calcite-fab.entry.js +6 -5
  920. package/dist/esm/calcite-filter.entry.js +17 -15
  921. package/dist/esm/calcite-flow.entry.js +12 -11
  922. package/dist/esm/calcite-graph_2.entry.js +57 -12
  923. package/dist/esm/calcite-handle.entry.js +9 -6
  924. package/dist/esm/calcite-icon.entry.js +10 -6
  925. package/dist/esm/calcite-inline-editable.entry.js +23 -19
  926. package/dist/esm/calcite-input-date-picker.entry.js +56 -23
  927. package/dist/esm/calcite-input-message.entry.js +5 -5
  928. package/dist/esm/calcite-input-time-picker_2.entry.js +87 -37
  929. package/dist/esm/calcite-input.entry.js +127 -71
  930. package/dist/esm/calcite-label.entry.js +13 -8
  931. package/dist/esm/calcite-link.entry.js +8 -7
  932. package/dist/esm/calcite-list_3.entry.js +13 -13
  933. package/dist/esm/calcite-loader.entry.js +12 -10
  934. package/dist/esm/calcite-modal.entry.js +46 -28
  935. package/dist/esm/calcite-notice.entry.js +16 -14
  936. package/dist/esm/calcite-option_3.entry.js +16 -16
  937. package/dist/esm/calcite-pagination.entry.js +97 -12
  938. package/dist/esm/calcite-panel.entry.js +54 -23
  939. package/dist/esm/calcite-pick-list_3.entry.js +47 -38
  940. package/dist/esm/calcite-popover_2.entry.js +155 -63
  941. package/dist/esm/calcite-progress.entry.js +5 -5
  942. package/dist/esm/calcite-radio-button-group.entry.js +3 -3
  943. package/dist/esm/calcite-radio-button.entry.js +13 -10
  944. package/dist/esm/calcite-radio-group_2.entry.js +15 -12
  945. package/dist/esm/calcite-rating.entry.js +33 -15
  946. package/dist/esm/calcite-scrim.entry.js +5 -3
  947. package/dist/esm/calcite-shell_3.entry.js +10 -9
  948. package/dist/esm/calcite-sortable-list.entry.js +5 -5
  949. package/dist/esm/calcite-split-button.entry.js +9 -6
  950. package/dist/esm/calcite-stepper_2.entry.js +175 -121
  951. package/dist/esm/calcite-switch.entry.js +12 -10
  952. package/dist/esm/calcite-tab_4.entry.js +61 -37
  953. package/dist/esm/calcite-tile-select_2.entry.js +8 -7
  954. package/dist/esm/calcite-tile.entry.js +9 -8
  955. package/dist/esm/calcite-tip_3.entry.js +12 -10
  956. package/dist/esm/calcite-tooltip_2.entry.js +188 -141
  957. package/dist/esm/calcite-tree_2.entry.js +35 -24
  958. package/dist/esm/calcite-value-list_2.entry.js +43 -35
  959. package/dist/esm/calcite.js +4 -4
  960. package/dist/esm/{conditionalSlot-a8a2c2f8.js → conditionalSlot-91141c10.js} +7 -3
  961. package/dist/esm/{debounce-f689f579.js → debounce-8620d992.js} +1 -1
  962. package/dist/esm/{dom-0dcd3a1e.js → dom-0e5130f0.js} +19 -27
  963. package/dist/esm/{forIn-8f588c7b.js → forIn-908ce382.js} +2 -2
  964. package/dist/esm/{form-2b88b33a.js → form-44145a77.js} +38 -4
  965. package/dist/esm/{guid-174508ff.js → guid-035850cf.js} +1 -1
  966. package/dist/esm/{index-221092de.js → index-7daa7f57.js} +7 -19
  967. package/dist/esm/index.js +1 -1
  968. package/dist/esm/{interactive-b11a6c05.js → interactive-26697f71.js} +7 -4
  969. package/dist/esm/{interfaces-2bc002ac.js → interfaces-666dcdb6.js} +1 -1
  970. package/dist/esm/key-5106532f.js +11 -0
  971. package/dist/esm/{label-2dac3c62.js → label-e58bd849.js} +26 -19
  972. package/dist/esm/loader.js +4 -4
  973. package/dist/esm/locale-bd54ff3b.js +254 -0
  974. package/dist/esm/{math-4cd9449e.js → math-28a370c3.js} +1 -1
  975. package/dist/esm/{observers-232c6ed6.js → observers-5cd6c82a.js} +1 -1
  976. package/dist/esm/polyfills/css-shim.js +1 -1
  977. package/dist/esm/{popper-66bcddc6.js → popper-1df5bd76.js} +2 -2
  978. package/dist/esm/{resources-886efb7e.js → resources-3498bd44.js} +44 -3
  979. package/dist/esm/{resources-8ade5fae.js → resources-b9270cdb.js} +1 -1
  980. package/dist/esm/{resources-762aa55a.js → resources-d196b6c1.js} +10 -22
  981. package/dist/esm/{resources-df870d40.js → resources-daaebdea.js} +1 -1
  982. package/dist/esm/{sortable.esm-0891f88f.js → sortable.esm-ef18907c.js} +1 -1
  983. package/dist/esm/{utils-79203b5b.js → utils-cf3669f8.js} +1 -1
  984. package/dist/esm-es5/{ExpandToggle-847b61ba.js → ExpandToggle-baf2c551.js} +2 -2
  985. package/dist/esm-es5/Heading-1183c4d7.js +6 -0
  986. package/dist/esm-es5/{array-328a8961.js → array-d7b2d2da.js} +1 -1
  987. package/dist/esm-es5/calcite-accordion_2.entry.js +2 -2
  988. package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
  989. package/dist/esm-es5/calcite-action-group.entry.js +2 -2
  990. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  991. package/dist/esm-es5/calcite-action-pad.entry.js +2 -2
  992. package/dist/esm-es5/calcite-action.entry.js +2 -2
  993. package/dist/esm-es5/calcite-alert.entry.js +3 -3
  994. package/dist/esm-es5/calcite-avatar.entry.js +2 -2
  995. package/dist/esm-es5/calcite-block_2.entry.js +2 -2
  996. package/dist/esm-es5/calcite-button.entry.js +2 -2
  997. package/dist/esm-es5/calcite-card.entry.js +2 -2
  998. package/dist/esm-es5/calcite-checkbox.entry.js +3 -3
  999. package/dist/esm-es5/calcite-chip.entry.js +3 -3
  1000. package/dist/esm-es5/calcite-color-picker_3.entry.js +3 -3
  1001. package/dist/esm-es5/calcite-combobox_3.entry.js +3 -3
  1002. package/dist/esm-es5/calcite-date-picker_4.entry.js +3 -3
  1003. package/dist/esm-es5/calcite-dropdown_3.entry.js +3 -3
  1004. package/dist/esm-es5/calcite-fab.entry.js +2 -2
  1005. package/dist/esm-es5/calcite-filter.entry.js +2 -2
  1006. package/dist/esm-es5/calcite-flow.entry.js +3 -3
  1007. package/dist/esm-es5/calcite-graph_2.entry.js +2 -2
  1008. package/dist/esm-es5/calcite-handle.entry.js +2 -2
  1009. package/dist/esm-es5/calcite-icon.entry.js +2 -2
  1010. package/dist/esm-es5/calcite-inline-editable.entry.js +3 -3
  1011. package/dist/esm-es5/calcite-input-date-picker.entry.js +3 -3
  1012. package/dist/esm-es5/calcite-input-message.entry.js +2 -2
  1013. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +3 -3
  1014. package/dist/esm-es5/calcite-input.entry.js +3 -3
  1015. package/dist/esm-es5/calcite-label.entry.js +2 -2
  1016. package/dist/esm-es5/calcite-link.entry.js +3 -3
  1017. package/dist/esm-es5/calcite-list_3.entry.js +2 -2
  1018. package/dist/esm-es5/calcite-loader.entry.js +3 -3
  1019. package/dist/esm-es5/calcite-modal.entry.js +3 -3
  1020. package/dist/esm-es5/calcite-notice.entry.js +3 -3
  1021. package/dist/esm-es5/calcite-option_3.entry.js +2 -2
  1022. package/dist/esm-es5/calcite-pagination.entry.js +2 -2
  1023. package/dist/esm-es5/calcite-panel.entry.js +3 -3
  1024. package/dist/esm-es5/calcite-pick-list_3.entry.js +3 -3
  1025. package/dist/esm-es5/calcite-popover_2.entry.js +3 -3
  1026. package/dist/esm-es5/calcite-progress.entry.js +2 -2
  1027. package/dist/esm-es5/calcite-radio-button-group.entry.js +2 -2
  1028. package/dist/esm-es5/calcite-radio-button.entry.js +2 -2
  1029. package/dist/esm-es5/calcite-radio-group_2.entry.js +3 -3
  1030. package/dist/esm-es5/calcite-rating.entry.js +3 -3
  1031. package/dist/esm-es5/calcite-scrim.entry.js +2 -2
  1032. package/dist/esm-es5/calcite-shell_3.entry.js +2 -2
  1033. package/dist/esm-es5/calcite-sortable-list.entry.js +2 -2
  1034. package/dist/esm-es5/calcite-split-button.entry.js +2 -2
  1035. package/dist/esm-es5/calcite-stepper_2.entry.js +3 -3
  1036. package/dist/esm-es5/calcite-switch.entry.js +3 -3
  1037. package/dist/esm-es5/calcite-tab_4.entry.js +3 -3
  1038. package/dist/esm-es5/calcite-tile-select_2.entry.js +2 -2
  1039. package/dist/esm-es5/calcite-tile.entry.js +2 -2
  1040. package/dist/esm-es5/calcite-tip_3.entry.js +3 -3
  1041. package/dist/esm-es5/calcite-tooltip_2.entry.js +3 -3
  1042. package/dist/esm-es5/calcite-tree_2.entry.js +2 -2
  1043. package/dist/esm-es5/calcite-value-list_2.entry.js +2 -2
  1044. package/dist/esm-es5/calcite.js +2 -2
  1045. package/dist/esm-es5/{conditionalSlot-a8a2c2f8.js → conditionalSlot-91141c10.js} +2 -2
  1046. package/dist/esm-es5/{debounce-f689f579.js → debounce-8620d992.js} +1 -1
  1047. package/dist/esm-es5/dom-0e5130f0.js +6 -0
  1048. package/dist/esm-es5/{forIn-8f588c7b.js → forIn-908ce382.js} +2 -2
  1049. package/dist/esm-es5/form-44145a77.js +6 -0
  1050. package/dist/esm-es5/{guid-174508ff.js → guid-035850cf.js} +1 -1
  1051. package/dist/esm-es5/index-7daa7f57.js +7 -0
  1052. package/dist/esm-es5/index.js +1 -1
  1053. package/dist/esm-es5/{interactive-b11a6c05.js → interactive-26697f71.js} +1 -1
  1054. package/dist/esm-es5/{interfaces-2bc002ac.js → interfaces-666dcdb6.js} +1 -1
  1055. package/dist/esm-es5/key-5106532f.js +6 -0
  1056. package/dist/esm-es5/label-e58bd849.js +6 -0
  1057. package/dist/esm-es5/loader.js +2 -2
  1058. package/dist/esm-es5/locale-bd54ff3b.js +6 -0
  1059. package/dist/esm-es5/{math-4cd9449e.js → math-28a370c3.js} +1 -1
  1060. package/dist/esm-es5/{observers-232c6ed6.js → observers-5cd6c82a.js} +1 -1
  1061. package/dist/esm-es5/{popper-66bcddc6.js → popper-1df5bd76.js} +2 -2
  1062. package/dist/esm-es5/{resources-886efb7e.js → resources-3498bd44.js} +2 -2
  1063. package/dist/esm-es5/{resources-8ade5fae.js → resources-b9270cdb.js} +1 -1
  1064. package/dist/esm-es5/resources-d196b6c1.js +6 -0
  1065. package/dist/esm-es5/{resources-df870d40.js → resources-daaebdea.js} +1 -1
  1066. package/dist/esm-es5/{sortable.esm-0891f88f.js → sortable.esm-ef18907c.js} +1 -1
  1067. package/dist/esm-es5/{utils-79203b5b.js → utils-cf3669f8.js} +1 -1
  1068. package/dist/extras/docs-json.d.ts +3 -0
  1069. package/dist/extras/docs-json.json +1256 -558
  1070. package/dist/loader/cdn.js +1 -1
  1071. package/dist/loader/index.cjs.js +1 -1
  1072. package/dist/loader/index.es2017.js +1 -1
  1073. package/dist/loader/index.js +1 -1
  1074. package/dist/types/components/accordion/accordion.d.ts +11 -9
  1075. package/dist/types/components/accordion-item/accordion-item.d.ts +26 -8
  1076. package/dist/types/components/action/action.d.ts +16 -15
  1077. package/dist/types/components/action-bar/action-bar.d.ts +14 -9
  1078. package/dist/types/components/action-group/action-group.d.ts +7 -7
  1079. package/dist/types/components/action-menu/action-menu.d.ts +11 -9
  1080. package/dist/types/components/action-pad/action-pad.d.ts +15 -11
  1081. package/dist/types/components/alert/alert.d.ts +45 -24
  1082. package/dist/types/components/alert/resources.d.ts +3 -0
  1083. package/dist/types/components/avatar/avatar.d.ts +5 -5
  1084. package/dist/types/components/avatar/utils.d.ts +5 -0
  1085. package/dist/types/components/block/block.d.ts +18 -4
  1086. package/dist/types/components/block/resources.d.ts +1 -0
  1087. package/dist/types/components/button/button.d.ts +6 -3
  1088. package/dist/types/components/card/card.d.ts +13 -4
  1089. package/dist/types/components/card/resources.d.ts +1 -1
  1090. package/dist/types/components/checkbox/checkbox.d.ts +4 -1
  1091. package/dist/types/components/chip/chip.d.ts +5 -1
  1092. package/dist/types/components/chip/resources.d.ts +3 -2
  1093. package/dist/types/components/color-picker/color-picker.d.ts +66 -23
  1094. package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +6 -1
  1095. package/dist/types/components/combobox/combobox.d.ts +36 -16
  1096. package/dist/types/components/combobox/resources.d.ts +5 -0
  1097. package/dist/types/components/combobox-item/combobox-item.d.ts +11 -1
  1098. package/dist/types/components/date-picker/date-picker.d.ts +32 -3
  1099. package/dist/types/components/date-picker/utils.d.ts +6 -1
  1100. package/dist/types/components/date-picker-day/date-picker-day.d.ts +2 -1
  1101. package/dist/types/components/date-picker-month/date-picker-month.d.ts +30 -2
  1102. package/dist/types/components/date-picker-month-header/date-picker-month-header.d.ts +9 -0
  1103. package/dist/types/components/date-picker-month-header/resources.d.ts +1 -0
  1104. package/dist/types/components/dropdown/dropdown.d.ts +34 -12
  1105. package/dist/types/components/dropdown/resources.d.ts +3 -0
  1106. package/dist/types/components/dropdown-group/dropdown-group.d.ts +5 -3
  1107. package/dist/types/components/dropdown-item/dropdown-item.d.ts +3 -3
  1108. package/dist/types/components/fab/fab.d.ts +1 -0
  1109. package/dist/types/components/filter/filter.d.ts +1 -1
  1110. package/dist/types/components/filter/resources.d.ts +0 -1
  1111. package/dist/types/components/flow/flow.d.ts +1 -1
  1112. package/dist/types/components/graph/util.d.ts +14 -0
  1113. package/dist/types/components/handle/handle.d.ts +1 -1
  1114. package/dist/types/components/icon/utils.d.ts +4 -0
  1115. package/dist/types/components/inline-editable/inline-editable.d.ts +10 -5
  1116. package/dist/types/components/input/input.d.ts +112 -47
  1117. package/dist/types/components/input/resources.d.ts +3 -0
  1118. package/dist/types/components/input-date-picker/input-date-picker.d.ts +26 -6
  1119. package/dist/types/components/input-message/input-message.d.ts +7 -3
  1120. package/dist/types/components/input-time-picker/input-time-picker.d.ts +9 -2
  1121. package/dist/types/components/interfaces.d.ts +1 -0
  1122. package/dist/types/components/label/label.d.ts +7 -2
  1123. package/dist/types/components/link/link.d.ts +2 -1
  1124. package/dist/types/components/list/list.d.ts +3 -2
  1125. package/dist/types/components/list-item/list-item.d.ts +9 -9
  1126. package/dist/types/components/list-item-group/list-item-group.d.ts +2 -2
  1127. package/dist/types/components/loader/loader.d.ts +11 -9
  1128. package/dist/types/components/modal/modal.d.ts +44 -29
  1129. package/dist/types/components/notice/notice.d.ts +20 -18
  1130. package/dist/types/components/option/option.d.ts +5 -5
  1131. package/dist/types/components/option-group/option-group.d.ts +3 -3
  1132. package/dist/types/components/pagination/pagination.d.ts +22 -12
  1133. package/dist/types/components/panel/panel.d.ts +41 -21
  1134. package/dist/types/components/panel/resources.d.ts +1 -0
  1135. package/dist/types/components/pick-list/pick-list.d.ts +19 -15
  1136. package/dist/types/components/pick-list/shared-list-logic.d.ts +1 -1
  1137. package/dist/types/components/pick-list-group/pick-list-group.d.ts +2 -2
  1138. package/dist/types/components/pick-list-item/pick-list-item.d.ts +25 -19
  1139. package/dist/types/components/popover/PopoverManager.d.ts +13 -0
  1140. package/dist/types/components/popover/popover.d.ts +43 -22
  1141. package/dist/types/components/popover/resources.d.ts +0 -1
  1142. package/dist/types/components/popover-manager/popover-manager.d.ts +7 -2
  1143. package/dist/types/components/progress/progress.d.ts +5 -5
  1144. package/dist/types/components/radio-button/radio-button.d.ts +7 -0
  1145. package/dist/types/components/radio-group/radio-group.d.ts +3 -0
  1146. package/dist/types/components/radio-group-item/radio-group-item.d.ts +2 -1
  1147. package/dist/types/components/rating/rating.d.ts +8 -2
  1148. package/dist/types/components/scrim/scrim.d.ts +3 -1
  1149. package/dist/types/components/shell-panel/shell-panel.d.ts +3 -0
  1150. package/dist/types/components/slider/slider.d.ts +19 -0
  1151. package/dist/types/components/split-button/split-button.d.ts +5 -2
  1152. package/dist/types/components/stepper/interfaces.d.ts +10 -0
  1153. package/dist/types/components/stepper/stepper.d.ts +27 -12
  1154. package/dist/types/components/stepper-item/stepper-item.d.ts +29 -12
  1155. package/dist/types/components/switch/switch.d.ts +3 -1
  1156. package/dist/types/components/tab/tab.d.ts +6 -2
  1157. package/dist/types/components/tab-nav/tab-nav.d.ts +15 -4
  1158. package/dist/types/components/tab-title/tab-title.d.ts +21 -9
  1159. package/dist/types/components/tabs/interfaces.d.ts +1 -1
  1160. package/dist/types/components/tabs/tabs.d.ts +8 -3
  1161. package/dist/types/components/tile/tile.d.ts +1 -0
  1162. package/dist/types/components/time-picker/time-picker.d.ts +45 -16
  1163. package/dist/types/components/tip-manager/tip-manager.d.ts +6 -0
  1164. package/dist/types/components/tooltip/TooltipManager.d.ts +28 -0
  1165. package/dist/types/components/tooltip/resources.d.ts +0 -1
  1166. package/dist/types/components/tooltip/tooltip.d.ts +15 -13
  1167. package/dist/types/components/tooltip-manager/tooltip-manager.d.ts +2 -29
  1168. package/dist/types/components/tree/tree.d.ts +14 -7
  1169. package/dist/types/components/tree-item/tree-item.d.ts +29 -15
  1170. package/dist/types/components/value-list/value-list.d.ts +22 -18
  1171. package/dist/types/components/value-list-item/value-list-item.d.ts +18 -15
  1172. package/dist/types/components.d.ts +1116 -588
  1173. package/dist/types/preact.d.ts +70 -60
  1174. package/dist/types/utils/conditionalSlot.d.ts +4 -0
  1175. package/dist/types/utils/date.d.ts +35 -0
  1176. package/dist/types/utils/dom.d.ts +14 -6
  1177. package/dist/types/utils/form.d.ts +35 -8
  1178. package/dist/types/utils/globalAttributes.d.ts +5 -0
  1179. package/dist/types/utils/interactive.d.ts +7 -4
  1180. package/dist/types/utils/label.d.ts +7 -0
  1181. package/dist/types/utils/locale.d.ts +2 -1
  1182. package/dist/types/utils/number.d.ts +16 -0
  1183. package/dist/types/utils/openCloseComponent.d.ts +26 -0
  1184. package/dist/types/utils/popper.d.ts +3 -2
  1185. package/hydrate/index.js +4062 -2777
  1186. package/package.json +47 -46
  1187. package/readme.md +12 -4
  1188. package/dist/calcite/p-023a27d2.system.entry.js +0 -6
  1189. package/dist/calcite/p-0a6b6898.system.entry.js +0 -6
  1190. package/dist/calcite/p-0ba791df.entry.js +0 -6
  1191. package/dist/calcite/p-0f8c3ea0.entry.js +0 -6
  1192. package/dist/calcite/p-1084cd40.entry.js +0 -6
  1193. package/dist/calcite/p-117836c2.system.entry.js +0 -6
  1194. package/dist/calcite/p-14be4304.system.entry.js +0 -6
  1195. package/dist/calcite/p-181bd093.entry.js +0 -6
  1196. package/dist/calcite/p-19987cfa.system.entry.js +0 -6
  1197. package/dist/calcite/p-1d0db848.system.entry.js +0 -6
  1198. package/dist/calcite/p-1d3ba736.system.entry.js +0 -6
  1199. package/dist/calcite/p-21461822.entry.js +0 -6
  1200. package/dist/calcite/p-22e1813c.entry.js +0 -6
  1201. package/dist/calcite/p-26fc61bb.system.js +0 -6
  1202. package/dist/calcite/p-2789e3e2.system.js +0 -6
  1203. package/dist/calcite/p-2a4bbfa2.system.entry.js +0 -6
  1204. package/dist/calcite/p-2bcf0f54.js +0 -6
  1205. package/dist/calcite/p-2c0fdd49.entry.js +0 -6
  1206. package/dist/calcite/p-2f42b00e.system.entry.js +0 -6
  1207. package/dist/calcite/p-300c0203.system.entry.js +0 -6
  1208. package/dist/calcite/p-3119474f.entry.js +0 -6
  1209. package/dist/calcite/p-329ade24.system.entry.js +0 -6
  1210. package/dist/calcite/p-33391f44.entry.js +0 -6
  1211. package/dist/calcite/p-34a92432.system.entry.js +0 -6
  1212. package/dist/calcite/p-34cf7a42.entry.js +0 -6
  1213. package/dist/calcite/p-3b38f3f5.system.entry.js +0 -6
  1214. package/dist/calcite/p-3b6e600a.entry.js +0 -6
  1215. package/dist/calcite/p-3c732519.entry.js +0 -6
  1216. package/dist/calcite/p-3e5f8e93.system.entry.js +0 -6
  1217. package/dist/calcite/p-3ebff946.system.entry.js +0 -6
  1218. package/dist/calcite/p-40334853.system.js +0 -6
  1219. package/dist/calcite/p-469490f8.js +0 -6
  1220. package/dist/calcite/p-482956de.entry.js +0 -6
  1221. package/dist/calcite/p-48aa73e5.entry.js +0 -6
  1222. package/dist/calcite/p-4a543a6e.entry.js +0 -6
  1223. package/dist/calcite/p-4b6a7167.entry.js +0 -6
  1224. package/dist/calcite/p-4f04264f.system.entry.js +0 -6
  1225. package/dist/calcite/p-4f443e21.system.entry.js +0 -6
  1226. package/dist/calcite/p-50f49b13.system.entry.js +0 -6
  1227. package/dist/calcite/p-52c9824d.system.entry.js +0 -6
  1228. package/dist/calcite/p-55d64bae.system.entry.js +0 -6
  1229. package/dist/calcite/p-5857c533.system.entry.js +0 -6
  1230. package/dist/calcite/p-608aaf1d.js +0 -6
  1231. package/dist/calcite/p-60f78917.system.entry.js +0 -6
  1232. package/dist/calcite/p-6294787b.system.js +0 -6
  1233. package/dist/calcite/p-62a93131.entry.js +0 -6
  1234. package/dist/calcite/p-6750e68e.entry.js +0 -6
  1235. package/dist/calcite/p-678e83fe.entry.js +0 -6
  1236. package/dist/calcite/p-693cc0cd.system.entry.js +0 -6
  1237. package/dist/calcite/p-69fdc534.entry.js +0 -6
  1238. package/dist/calcite/p-6c9ab1d6.system.entry.js +0 -6
  1239. package/dist/calcite/p-6ebbdae4.entry.js +0 -6
  1240. package/dist/calcite/p-7225f4ed.js +0 -6
  1241. package/dist/calcite/p-7463e93d.entry.js +0 -6
  1242. package/dist/calcite/p-7549f33d.entry.js +0 -6
  1243. package/dist/calcite/p-8117e07b.system.js +0 -6
  1244. package/dist/calcite/p-88f476f3.system.entry.js +0 -6
  1245. package/dist/calcite/p-8d372581.entry.js +0 -6
  1246. package/dist/calcite/p-8d9d8984.system.entry.js +0 -6
  1247. package/dist/calcite/p-941b8b06.js +0 -6
  1248. package/dist/calcite/p-948a5bba.system.entry.js +0 -6
  1249. package/dist/calcite/p-9b7b6b30.entry.js +0 -6
  1250. package/dist/calcite/p-9d488536.entry.js +0 -6
  1251. package/dist/calcite/p-9da64897.system.js +0 -6
  1252. package/dist/calcite/p-a4b72090.system.entry.js +0 -6
  1253. package/dist/calcite/p-aad21300.system.js +0 -6
  1254. package/dist/calcite/p-ae4a167e.system.js +0 -6
  1255. package/dist/calcite/p-af100a3b.entry.js +0 -6
  1256. package/dist/calcite/p-b15cde3f.js +0 -6
  1257. package/dist/calcite/p-b3d74df1.entry.js +0 -6
  1258. package/dist/calcite/p-b50b0f92.system.entry.js +0 -6
  1259. package/dist/calcite/p-b6dad672.system.entry.js +0 -6
  1260. package/dist/calcite/p-bae3c0b1.entry.js +0 -6
  1261. package/dist/calcite/p-bc873e26.system.js +0 -6
  1262. package/dist/calcite/p-c0ab6c20.system.entry.js +0 -6
  1263. package/dist/calcite/p-c22bd1df.system.entry.js +0 -6
  1264. package/dist/calcite/p-c2770291.js +0 -6
  1265. package/dist/calcite/p-c66cce4a.js +0 -6
  1266. package/dist/calcite/p-c82c3a08.entry.js +0 -6
  1267. package/dist/calcite/p-c91e5ce6.system.entry.js +0 -6
  1268. package/dist/calcite/p-cb3633ce.system.entry.js +0 -6
  1269. package/dist/calcite/p-cc881354.entry.js +0 -6
  1270. package/dist/calcite/p-cec925c5.system.entry.js +0 -6
  1271. package/dist/calcite/p-d0ae73bc.system.entry.js +0 -6
  1272. package/dist/calcite/p-d2aad5f9.system.entry.js +0 -6
  1273. package/dist/calcite/p-d441a36b.system.js +0 -6
  1274. package/dist/calcite/p-d668cc57.entry.js +0 -6
  1275. package/dist/calcite/p-d8c1d1bb.system.js +0 -6
  1276. package/dist/calcite/p-d9669187.entry.js +0 -6
  1277. package/dist/calcite/p-da5a9916.system.entry.js +0 -6
  1278. package/dist/calcite/p-ddc498f5.entry.js +0 -6
  1279. package/dist/calcite/p-de040bc0.entry.js +0 -6
  1280. package/dist/calcite/p-e21b549b.js +0 -6
  1281. package/dist/calcite/p-e6034e51.entry.js +0 -6
  1282. package/dist/calcite/p-e64fc8d7.entry.js +0 -6
  1283. package/dist/calcite/p-e6b83b93.entry.js +0 -6
  1284. package/dist/calcite/p-e8698d9f.system.entry.js +0 -6
  1285. package/dist/calcite/p-ea09f02f.system.entry.js +0 -6
  1286. package/dist/calcite/p-eaf8f62d.entry.js +0 -6
  1287. package/dist/calcite/p-ec6942a8.system.entry.js +0 -6
  1288. package/dist/calcite/p-ef8bcab3.entry.js +0 -6
  1289. package/dist/calcite/p-f3ba8a0a.entry.js +0 -6
  1290. package/dist/calcite/p-f5a00782.entry.js +0 -6
  1291. package/dist/calcite/p-f753e964.entry.js +0 -6
  1292. package/dist/calcite/p-f89876d3.system.entry.js +0 -6
  1293. package/dist/calcite/p-fc2aa57a.system.entry.js +0 -6
  1294. package/dist/calcite/p-ffeda3eb.system.entry.js +0 -6
  1295. package/dist/cjs/locale-2f9c939d.js +0 -137
  1296. package/dist/cjs/number-99949cb0.js +0 -85
  1297. package/dist/components/number.js +0 -77
  1298. package/dist/components/resources4.js +0 -16
  1299. package/dist/components/resources5.js +0 -33
  1300. package/dist/components/tooltip-manager.js +0 -172
  1301. package/dist/esm/locale-9c18bf7f.js +0 -132
  1302. package/dist/esm/number-a39356c7.js +0 -77
  1303. package/dist/esm-es5/Heading-f4ee0499.js +0 -6
  1304. package/dist/esm-es5/dom-0dcd3a1e.js +0 -6
  1305. package/dist/esm-es5/form-2b88b33a.js +0 -6
  1306. package/dist/esm-es5/index-221092de.js +0 -6
  1307. package/dist/esm-es5/label-2dac3c62.js +0 -6
  1308. package/dist/esm-es5/locale-9c18bf7f.js +0 -6
  1309. package/dist/esm-es5/number-a39356c7.js +0 -6
  1310. package/dist/esm-es5/resources-762aa55a.js +0 -6
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
4
- * v1.0.0-beta.81
4
+ * v1.0.0-beta.84
5
5
  */
6
6
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
7
7
  import { c as getThemeName } from './dom.js';
@@ -457,1023 +457,995 @@ function hexDouble(num) {
457
457
  }
458
458
  });
459
459
 
460
- var colorName = {
461
- "aliceblue": [240, 248, 255],
462
- "antiquewhite": [250, 235, 215],
463
- "aqua": [0, 255, 255],
464
- "aquamarine": [127, 255, 212],
465
- "azure": [240, 255, 255],
466
- "beige": [245, 245, 220],
467
- "bisque": [255, 228, 196],
468
- "black": [0, 0, 0],
469
- "blanchedalmond": [255, 235, 205],
470
- "blue": [0, 0, 255],
471
- "blueviolet": [138, 43, 226],
472
- "brown": [165, 42, 42],
473
- "burlywood": [222, 184, 135],
474
- "cadetblue": [95, 158, 160],
475
- "chartreuse": [127, 255, 0],
476
- "chocolate": [210, 105, 30],
477
- "coral": [255, 127, 80],
478
- "cornflowerblue": [100, 149, 237],
479
- "cornsilk": [255, 248, 220],
480
- "crimson": [220, 20, 60],
481
- "cyan": [0, 255, 255],
482
- "darkblue": [0, 0, 139],
483
- "darkcyan": [0, 139, 139],
484
- "darkgoldenrod": [184, 134, 11],
485
- "darkgray": [169, 169, 169],
486
- "darkgreen": [0, 100, 0],
487
- "darkgrey": [169, 169, 169],
488
- "darkkhaki": [189, 183, 107],
489
- "darkmagenta": [139, 0, 139],
490
- "darkolivegreen": [85, 107, 47],
491
- "darkorange": [255, 140, 0],
492
- "darkorchid": [153, 50, 204],
493
- "darkred": [139, 0, 0],
494
- "darksalmon": [233, 150, 122],
495
- "darkseagreen": [143, 188, 143],
496
- "darkslateblue": [72, 61, 139],
497
- "darkslategray": [47, 79, 79],
498
- "darkslategrey": [47, 79, 79],
499
- "darkturquoise": [0, 206, 209],
500
- "darkviolet": [148, 0, 211],
501
- "deeppink": [255, 20, 147],
502
- "deepskyblue": [0, 191, 255],
503
- "dimgray": [105, 105, 105],
504
- "dimgrey": [105, 105, 105],
505
- "dodgerblue": [30, 144, 255],
506
- "firebrick": [178, 34, 34],
507
- "floralwhite": [255, 250, 240],
508
- "forestgreen": [34, 139, 34],
509
- "fuchsia": [255, 0, 255],
510
- "gainsboro": [220, 220, 220],
511
- "ghostwhite": [248, 248, 255],
512
- "gold": [255, 215, 0],
513
- "goldenrod": [218, 165, 32],
514
- "gray": [128, 128, 128],
515
- "green": [0, 128, 0],
516
- "greenyellow": [173, 255, 47],
517
- "grey": [128, 128, 128],
518
- "honeydew": [240, 255, 240],
519
- "hotpink": [255, 105, 180],
520
- "indianred": [205, 92, 92],
521
- "indigo": [75, 0, 130],
522
- "ivory": [255, 255, 240],
523
- "khaki": [240, 230, 140],
524
- "lavender": [230, 230, 250],
525
- "lavenderblush": [255, 240, 245],
526
- "lawngreen": [124, 252, 0],
527
- "lemonchiffon": [255, 250, 205],
528
- "lightblue": [173, 216, 230],
529
- "lightcoral": [240, 128, 128],
530
- "lightcyan": [224, 255, 255],
531
- "lightgoldenrodyellow": [250, 250, 210],
532
- "lightgray": [211, 211, 211],
533
- "lightgreen": [144, 238, 144],
534
- "lightgrey": [211, 211, 211],
535
- "lightpink": [255, 182, 193],
536
- "lightsalmon": [255, 160, 122],
537
- "lightseagreen": [32, 178, 170],
538
- "lightskyblue": [135, 206, 250],
539
- "lightslategray": [119, 136, 153],
540
- "lightslategrey": [119, 136, 153],
541
- "lightsteelblue": [176, 196, 222],
542
- "lightyellow": [255, 255, 224],
543
- "lime": [0, 255, 0],
544
- "limegreen": [50, 205, 50],
545
- "linen": [250, 240, 230],
546
- "magenta": [255, 0, 255],
547
- "maroon": [128, 0, 0],
548
- "mediumaquamarine": [102, 205, 170],
549
- "mediumblue": [0, 0, 205],
550
- "mediumorchid": [186, 85, 211],
551
- "mediumpurple": [147, 112, 219],
552
- "mediumseagreen": [60, 179, 113],
553
- "mediumslateblue": [123, 104, 238],
554
- "mediumspringgreen": [0, 250, 154],
555
- "mediumturquoise": [72, 209, 204],
556
- "mediumvioletred": [199, 21, 133],
557
- "midnightblue": [25, 25, 112],
558
- "mintcream": [245, 255, 250],
559
- "mistyrose": [255, 228, 225],
560
- "moccasin": [255, 228, 181],
561
- "navajowhite": [255, 222, 173],
562
- "navy": [0, 0, 128],
563
- "oldlace": [253, 245, 230],
564
- "olive": [128, 128, 0],
565
- "olivedrab": [107, 142, 35],
566
- "orange": [255, 165, 0],
567
- "orangered": [255, 69, 0],
568
- "orchid": [218, 112, 214],
569
- "palegoldenrod": [238, 232, 170],
570
- "palegreen": [152, 251, 152],
571
- "paleturquoise": [175, 238, 238],
572
- "palevioletred": [219, 112, 147],
573
- "papayawhip": [255, 239, 213],
574
- "peachpuff": [255, 218, 185],
575
- "peru": [205, 133, 63],
576
- "pink": [255, 192, 203],
577
- "plum": [221, 160, 221],
578
- "powderblue": [176, 224, 230],
579
- "purple": [128, 0, 128],
580
- "rebeccapurple": [102, 51, 153],
581
- "red": [255, 0, 0],
582
- "rosybrown": [188, 143, 143],
583
- "royalblue": [65, 105, 225],
584
- "saddlebrown": [139, 69, 19],
585
- "salmon": [250, 128, 114],
586
- "sandybrown": [244, 164, 96],
587
- "seagreen": [46, 139, 87],
588
- "seashell": [255, 245, 238],
589
- "sienna": [160, 82, 45],
590
- "silver": [192, 192, 192],
591
- "skyblue": [135, 206, 235],
592
- "slateblue": [106, 90, 205],
593
- "slategray": [112, 128, 144],
594
- "slategrey": [112, 128, 144],
595
- "snow": [255, 250, 250],
596
- "springgreen": [0, 255, 127],
597
- "steelblue": [70, 130, 180],
598
- "tan": [210, 180, 140],
599
- "teal": [0, 128, 128],
600
- "thistle": [216, 191, 216],
601
- "tomato": [255, 99, 71],
602
- "turquoise": [64, 224, 208],
603
- "violet": [238, 130, 238],
604
- "wheat": [245, 222, 179],
605
- "white": [255, 255, 255],
606
- "whitesmoke": [245, 245, 245],
607
- "yellow": [255, 255, 0],
608
- "yellowgreen": [154, 205, 50]
460
+ var colorName = {
461
+ "aliceblue": [240, 248, 255],
462
+ "antiquewhite": [250, 235, 215],
463
+ "aqua": [0, 255, 255],
464
+ "aquamarine": [127, 255, 212],
465
+ "azure": [240, 255, 255],
466
+ "beige": [245, 245, 220],
467
+ "bisque": [255, 228, 196],
468
+ "black": [0, 0, 0],
469
+ "blanchedalmond": [255, 235, 205],
470
+ "blue": [0, 0, 255],
471
+ "blueviolet": [138, 43, 226],
472
+ "brown": [165, 42, 42],
473
+ "burlywood": [222, 184, 135],
474
+ "cadetblue": [95, 158, 160],
475
+ "chartreuse": [127, 255, 0],
476
+ "chocolate": [210, 105, 30],
477
+ "coral": [255, 127, 80],
478
+ "cornflowerblue": [100, 149, 237],
479
+ "cornsilk": [255, 248, 220],
480
+ "crimson": [220, 20, 60],
481
+ "cyan": [0, 255, 255],
482
+ "darkblue": [0, 0, 139],
483
+ "darkcyan": [0, 139, 139],
484
+ "darkgoldenrod": [184, 134, 11],
485
+ "darkgray": [169, 169, 169],
486
+ "darkgreen": [0, 100, 0],
487
+ "darkgrey": [169, 169, 169],
488
+ "darkkhaki": [189, 183, 107],
489
+ "darkmagenta": [139, 0, 139],
490
+ "darkolivegreen": [85, 107, 47],
491
+ "darkorange": [255, 140, 0],
492
+ "darkorchid": [153, 50, 204],
493
+ "darkred": [139, 0, 0],
494
+ "darksalmon": [233, 150, 122],
495
+ "darkseagreen": [143, 188, 143],
496
+ "darkslateblue": [72, 61, 139],
497
+ "darkslategray": [47, 79, 79],
498
+ "darkslategrey": [47, 79, 79],
499
+ "darkturquoise": [0, 206, 209],
500
+ "darkviolet": [148, 0, 211],
501
+ "deeppink": [255, 20, 147],
502
+ "deepskyblue": [0, 191, 255],
503
+ "dimgray": [105, 105, 105],
504
+ "dimgrey": [105, 105, 105],
505
+ "dodgerblue": [30, 144, 255],
506
+ "firebrick": [178, 34, 34],
507
+ "floralwhite": [255, 250, 240],
508
+ "forestgreen": [34, 139, 34],
509
+ "fuchsia": [255, 0, 255],
510
+ "gainsboro": [220, 220, 220],
511
+ "ghostwhite": [248, 248, 255],
512
+ "gold": [255, 215, 0],
513
+ "goldenrod": [218, 165, 32],
514
+ "gray": [128, 128, 128],
515
+ "green": [0, 128, 0],
516
+ "greenyellow": [173, 255, 47],
517
+ "grey": [128, 128, 128],
518
+ "honeydew": [240, 255, 240],
519
+ "hotpink": [255, 105, 180],
520
+ "indianred": [205, 92, 92],
521
+ "indigo": [75, 0, 130],
522
+ "ivory": [255, 255, 240],
523
+ "khaki": [240, 230, 140],
524
+ "lavender": [230, 230, 250],
525
+ "lavenderblush": [255, 240, 245],
526
+ "lawngreen": [124, 252, 0],
527
+ "lemonchiffon": [255, 250, 205],
528
+ "lightblue": [173, 216, 230],
529
+ "lightcoral": [240, 128, 128],
530
+ "lightcyan": [224, 255, 255],
531
+ "lightgoldenrodyellow": [250, 250, 210],
532
+ "lightgray": [211, 211, 211],
533
+ "lightgreen": [144, 238, 144],
534
+ "lightgrey": [211, 211, 211],
535
+ "lightpink": [255, 182, 193],
536
+ "lightsalmon": [255, 160, 122],
537
+ "lightseagreen": [32, 178, 170],
538
+ "lightskyblue": [135, 206, 250],
539
+ "lightslategray": [119, 136, 153],
540
+ "lightslategrey": [119, 136, 153],
541
+ "lightsteelblue": [176, 196, 222],
542
+ "lightyellow": [255, 255, 224],
543
+ "lime": [0, 255, 0],
544
+ "limegreen": [50, 205, 50],
545
+ "linen": [250, 240, 230],
546
+ "magenta": [255, 0, 255],
547
+ "maroon": [128, 0, 0],
548
+ "mediumaquamarine": [102, 205, 170],
549
+ "mediumblue": [0, 0, 205],
550
+ "mediumorchid": [186, 85, 211],
551
+ "mediumpurple": [147, 112, 219],
552
+ "mediumseagreen": [60, 179, 113],
553
+ "mediumslateblue": [123, 104, 238],
554
+ "mediumspringgreen": [0, 250, 154],
555
+ "mediumturquoise": [72, 209, 204],
556
+ "mediumvioletred": [199, 21, 133],
557
+ "midnightblue": [25, 25, 112],
558
+ "mintcream": [245, 255, 250],
559
+ "mistyrose": [255, 228, 225],
560
+ "moccasin": [255, 228, 181],
561
+ "navajowhite": [255, 222, 173],
562
+ "navy": [0, 0, 128],
563
+ "oldlace": [253, 245, 230],
564
+ "olive": [128, 128, 0],
565
+ "olivedrab": [107, 142, 35],
566
+ "orange": [255, 165, 0],
567
+ "orangered": [255, 69, 0],
568
+ "orchid": [218, 112, 214],
569
+ "palegoldenrod": [238, 232, 170],
570
+ "palegreen": [152, 251, 152],
571
+ "paleturquoise": [175, 238, 238],
572
+ "palevioletred": [219, 112, 147],
573
+ "papayawhip": [255, 239, 213],
574
+ "peachpuff": [255, 218, 185],
575
+ "peru": [205, 133, 63],
576
+ "pink": [255, 192, 203],
577
+ "plum": [221, 160, 221],
578
+ "powderblue": [176, 224, 230],
579
+ "purple": [128, 0, 128],
580
+ "rebeccapurple": [102, 51, 153],
581
+ "red": [255, 0, 0],
582
+ "rosybrown": [188, 143, 143],
583
+ "royalblue": [65, 105, 225],
584
+ "saddlebrown": [139, 69, 19],
585
+ "salmon": [250, 128, 114],
586
+ "sandybrown": [244, 164, 96],
587
+ "seagreen": [46, 139, 87],
588
+ "seashell": [255, 245, 238],
589
+ "sienna": [160, 82, 45],
590
+ "silver": [192, 192, 192],
591
+ "skyblue": [135, 206, 235],
592
+ "slateblue": [106, 90, 205],
593
+ "slategray": [112, 128, 144],
594
+ "slategrey": [112, 128, 144],
595
+ "snow": [255, 250, 250],
596
+ "springgreen": [0, 255, 127],
597
+ "steelblue": [70, 130, 180],
598
+ "tan": [210, 180, 140],
599
+ "teal": [0, 128, 128],
600
+ "thistle": [216, 191, 216],
601
+ "tomato": [255, 99, 71],
602
+ "turquoise": [64, 224, 208],
603
+ "violet": [238, 130, 238],
604
+ "wheat": [245, 222, 179],
605
+ "white": [255, 255, 255],
606
+ "whitesmoke": [245, 245, 245],
607
+ "yellow": [255, 255, 0],
608
+ "yellowgreen": [154, 205, 50]
609
609
  };
610
610
 
611
611
  /* MIT license */
612
-
613
612
  /* eslint-disable no-mixed-operators */
613
+
614
+
614
615
  // NOTE: conversions should only return primitive values (i.e. arrays, or
615
616
  // values that give correct `typeof` results).
616
617
  // do not use box values types (i.e. Number(), String(), etc.)
617
618
 
618
619
  const reverseKeywords = {};
619
-
620
620
  for (const key of Object.keys(colorName)) {
621
- reverseKeywords[colorName[key]] = key;
621
+ reverseKeywords[colorName[key]] = key;
622
622
  }
623
623
 
624
624
  const convert$1 = {
625
- rgb: {
626
- channels: 3,
627
- labels: 'rgb'
628
- },
629
- hsl: {
630
- channels: 3,
631
- labels: 'hsl'
632
- },
633
- hsv: {
634
- channels: 3,
635
- labels: 'hsv'
636
- },
637
- hwb: {
638
- channels: 3,
639
- labels: 'hwb'
640
- },
641
- cmyk: {
642
- channels: 4,
643
- labels: 'cmyk'
644
- },
645
- xyz: {
646
- channels: 3,
647
- labels: 'xyz'
648
- },
649
- lab: {
650
- channels: 3,
651
- labels: 'lab'
652
- },
653
- lch: {
654
- channels: 3,
655
- labels: 'lch'
656
- },
657
- hex: {
658
- channels: 1,
659
- labels: ['hex']
660
- },
661
- keyword: {
662
- channels: 1,
663
- labels: ['keyword']
664
- },
665
- ansi16: {
666
- channels: 1,
667
- labels: ['ansi16']
668
- },
669
- ansi256: {
670
- channels: 1,
671
- labels: ['ansi256']
672
- },
673
- hcg: {
674
- channels: 3,
675
- labels: ['h', 'c', 'g']
676
- },
677
- apple: {
678
- channels: 3,
679
- labels: ['r16', 'g16', 'b16']
680
- },
681
- gray: {
682
- channels: 1,
683
- labels: ['gray']
684
- }
625
+ rgb: {channels: 3, labels: 'rgb'},
626
+ hsl: {channels: 3, labels: 'hsl'},
627
+ hsv: {channels: 3, labels: 'hsv'},
628
+ hwb: {channels: 3, labels: 'hwb'},
629
+ cmyk: {channels: 4, labels: 'cmyk'},
630
+ xyz: {channels: 3, labels: 'xyz'},
631
+ lab: {channels: 3, labels: 'lab'},
632
+ lch: {channels: 3, labels: 'lch'},
633
+ hex: {channels: 1, labels: ['hex']},
634
+ keyword: {channels: 1, labels: ['keyword']},
635
+ ansi16: {channels: 1, labels: ['ansi16']},
636
+ ansi256: {channels: 1, labels: ['ansi256']},
637
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
638
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
639
+ gray: {channels: 1, labels: ['gray']}
685
640
  };
686
- var conversions = convert$1; // Hide .channels and .labels properties
687
641
 
642
+ var conversions = convert$1;
643
+
644
+ // Hide .channels and .labels properties
688
645
  for (const model of Object.keys(convert$1)) {
689
- if (!('channels' in convert$1[model])) {
690
- throw new Error('missing channels property: ' + model);
691
- }
646
+ if (!('channels' in convert$1[model])) {
647
+ throw new Error('missing channels property: ' + model);
648
+ }
692
649
 
693
- if (!('labels' in convert$1[model])) {
694
- throw new Error('missing channel labels property: ' + model);
695
- }
650
+ if (!('labels' in convert$1[model])) {
651
+ throw new Error('missing channel labels property: ' + model);
652
+ }
696
653
 
697
- if (convert$1[model].labels.length !== convert$1[model].channels) {
698
- throw new Error('channel and label counts mismatch: ' + model);
699
- }
654
+ if (convert$1[model].labels.length !== convert$1[model].channels) {
655
+ throw new Error('channel and label counts mismatch: ' + model);
656
+ }
700
657
 
701
- const {
702
- channels,
703
- labels
704
- } = convert$1[model];
705
- delete convert$1[model].channels;
706
- delete convert$1[model].labels;
707
- Object.defineProperty(convert$1[model], 'channels', {
708
- value: channels
709
- });
710
- Object.defineProperty(convert$1[model], 'labels', {
711
- value: labels
712
- });
658
+ const {channels, labels} = convert$1[model];
659
+ delete convert$1[model].channels;
660
+ delete convert$1[model].labels;
661
+ Object.defineProperty(convert$1[model], 'channels', {value: channels});
662
+ Object.defineProperty(convert$1[model], 'labels', {value: labels});
713
663
  }
714
664
 
715
665
  convert$1.rgb.hsl = function (rgb) {
716
- const r = rgb[0] / 255;
717
- const g = rgb[1] / 255;
718
- const b = rgb[2] / 255;
719
- const min = Math.min(r, g, b);
720
- const max = Math.max(r, g, b);
721
- const delta = max - min;
722
- let h;
723
- let s;
724
-
725
- if (max === min) {
726
- h = 0;
727
- } else if (r === max) {
728
- h = (g - b) / delta;
729
- } else if (g === max) {
730
- h = 2 + (b - r) / delta;
731
- } else if (b === max) {
732
- h = 4 + (r - g) / delta;
733
- }
666
+ const r = rgb[0] / 255;
667
+ const g = rgb[1] / 255;
668
+ const b = rgb[2] / 255;
669
+ const min = Math.min(r, g, b);
670
+ const max = Math.max(r, g, b);
671
+ const delta = max - min;
672
+ let h;
673
+ let s;
674
+
675
+ if (max === min) {
676
+ h = 0;
677
+ } else if (r === max) {
678
+ h = (g - b) / delta;
679
+ } else if (g === max) {
680
+ h = 2 + (b - r) / delta;
681
+ } else if (b === max) {
682
+ h = 4 + (r - g) / delta;
683
+ }
734
684
 
735
- h = Math.min(h * 60, 360);
685
+ h = Math.min(h * 60, 360);
736
686
 
737
- if (h < 0) {
738
- h += 360;
739
- }
687
+ if (h < 0) {
688
+ h += 360;
689
+ }
740
690
 
741
- const l = (min + max) / 2;
691
+ const l = (min + max) / 2;
742
692
 
743
- if (max === min) {
744
- s = 0;
745
- } else if (l <= 0.5) {
746
- s = delta / (max + min);
747
- } else {
748
- s = delta / (2 - max - min);
749
- }
693
+ if (max === min) {
694
+ s = 0;
695
+ } else if (l <= 0.5) {
696
+ s = delta / (max + min);
697
+ } else {
698
+ s = delta / (2 - max - min);
699
+ }
750
700
 
751
- return [h, s * 100, l * 100];
701
+ return [h, s * 100, l * 100];
752
702
  };
753
703
 
754
704
  convert$1.rgb.hsv = function (rgb) {
755
- let rdif;
756
- let gdif;
757
- let bdif;
758
- let h;
759
- let s;
760
- const r = rgb[0] / 255;
761
- const g = rgb[1] / 255;
762
- const b = rgb[2] / 255;
763
- const v = Math.max(r, g, b);
764
- const diff = v - Math.min(r, g, b);
765
-
766
- const diffc = function (c) {
767
- return (v - c) / 6 / diff + 1 / 2;
768
- };
769
-
770
- if (diff === 0) {
771
- h = 0;
772
- s = 0;
773
- } else {
774
- s = diff / v;
775
- rdif = diffc(r);
776
- gdif = diffc(g);
777
- bdif = diffc(b);
778
-
779
- if (r === v) {
780
- h = bdif - gdif;
781
- } else if (g === v) {
782
- h = 1 / 3 + rdif - bdif;
783
- } else if (b === v) {
784
- h = 2 / 3 + gdif - rdif;
785
- }
786
-
787
- if (h < 0) {
788
- h += 1;
789
- } else if (h > 1) {
790
- h -= 1;
791
- }
792
- }
705
+ let rdif;
706
+ let gdif;
707
+ let bdif;
708
+ let h;
709
+ let s;
710
+
711
+ const r = rgb[0] / 255;
712
+ const g = rgb[1] / 255;
713
+ const b = rgb[2] / 255;
714
+ const v = Math.max(r, g, b);
715
+ const diff = v - Math.min(r, g, b);
716
+ const diffc = function (c) {
717
+ return (v - c) / 6 / diff + 1 / 2;
718
+ };
793
719
 
794
- return [h * 360, s * 100, v * 100];
720
+ if (diff === 0) {
721
+ h = 0;
722
+ s = 0;
723
+ } else {
724
+ s = diff / v;
725
+ rdif = diffc(r);
726
+ gdif = diffc(g);
727
+ bdif = diffc(b);
728
+
729
+ if (r === v) {
730
+ h = bdif - gdif;
731
+ } else if (g === v) {
732
+ h = (1 / 3) + rdif - bdif;
733
+ } else if (b === v) {
734
+ h = (2 / 3) + gdif - rdif;
735
+ }
736
+
737
+ if (h < 0) {
738
+ h += 1;
739
+ } else if (h > 1) {
740
+ h -= 1;
741
+ }
742
+ }
743
+
744
+ return [
745
+ h * 360,
746
+ s * 100,
747
+ v * 100
748
+ ];
795
749
  };
796
750
 
797
751
  convert$1.rgb.hwb = function (rgb) {
798
- const r = rgb[0];
799
- const g = rgb[1];
800
- let b = rgb[2];
801
- const h = convert$1.rgb.hsl(rgb)[0];
802
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
803
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
804
- return [h, w * 100, b * 100];
752
+ const r = rgb[0];
753
+ const g = rgb[1];
754
+ let b = rgb[2];
755
+ const h = convert$1.rgb.hsl(rgb)[0];
756
+ const w = 1 / 255 * Math.min(r, Math.min(g, b));
757
+
758
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
759
+
760
+ return [h, w * 100, b * 100];
805
761
  };
806
762
 
807
763
  convert$1.rgb.cmyk = function (rgb) {
808
- const r = rgb[0] / 255;
809
- const g = rgb[1] / 255;
810
- const b = rgb[2] / 255;
811
- const k = Math.min(1 - r, 1 - g, 1 - b);
812
- const c = (1 - r - k) / (1 - k) || 0;
813
- const m = (1 - g - k) / (1 - k) || 0;
814
- const y = (1 - b - k) / (1 - k) || 0;
815
- return [c * 100, m * 100, y * 100, k * 100];
764
+ const r = rgb[0] / 255;
765
+ const g = rgb[1] / 255;
766
+ const b = rgb[2] / 255;
767
+
768
+ const k = Math.min(1 - r, 1 - g, 1 - b);
769
+ const c = (1 - r - k) / (1 - k) || 0;
770
+ const m = (1 - g - k) / (1 - k) || 0;
771
+ const y = (1 - b - k) / (1 - k) || 0;
772
+
773
+ return [c * 100, m * 100, y * 100, k * 100];
816
774
  };
817
775
 
818
776
  function comparativeDistance(x, y) {
819
- /*
820
- See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
821
- */
822
- return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
777
+ /*
778
+ See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
779
+ */
780
+ return (
781
+ ((x[0] - y[0]) ** 2) +
782
+ ((x[1] - y[1]) ** 2) +
783
+ ((x[2] - y[2]) ** 2)
784
+ );
823
785
  }
824
786
 
825
787
  convert$1.rgb.keyword = function (rgb) {
826
- const reversed = reverseKeywords[rgb];
827
-
828
- if (reversed) {
829
- return reversed;
830
- }
788
+ const reversed = reverseKeywords[rgb];
789
+ if (reversed) {
790
+ return reversed;
791
+ }
831
792
 
832
- let currentClosestDistance = Infinity;
833
- let currentClosestKeyword;
793
+ let currentClosestDistance = Infinity;
794
+ let currentClosestKeyword;
834
795
 
835
- for (const keyword of Object.keys(colorName)) {
836
- const value = colorName[keyword]; // Compute comparative distance
796
+ for (const keyword of Object.keys(colorName)) {
797
+ const value = colorName[keyword];
837
798
 
838
- const distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
799
+ // Compute comparative distance
800
+ const distance = comparativeDistance(rgb, value);
839
801
 
840
- if (distance < currentClosestDistance) {
841
- currentClosestDistance = distance;
842
- currentClosestKeyword = keyword;
843
- }
844
- }
802
+ // Check if its less, if so set as closest
803
+ if (distance < currentClosestDistance) {
804
+ currentClosestDistance = distance;
805
+ currentClosestKeyword = keyword;
806
+ }
807
+ }
845
808
 
846
- return currentClosestKeyword;
809
+ return currentClosestKeyword;
847
810
  };
848
811
 
849
812
  convert$1.keyword.rgb = function (keyword) {
850
- return colorName[keyword];
813
+ return colorName[keyword];
851
814
  };
852
815
 
853
816
  convert$1.rgb.xyz = function (rgb) {
854
- let r = rgb[0] / 255;
855
- let g = rgb[1] / 255;
856
- let b = rgb[2] / 255; // Assume sRGB
817
+ let r = rgb[0] / 255;
818
+ let g = rgb[1] / 255;
819
+ let b = rgb[2] / 255;
820
+
821
+ // Assume sRGB
822
+ r = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);
823
+ g = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);
824
+ b = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);
825
+
826
+ const x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
827
+ const y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
828
+ const z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
857
829
 
858
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
859
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
860
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
861
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
862
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
863
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
864
- return [x * 100, y * 100, z * 100];
830
+ return [x * 100, y * 100, z * 100];
865
831
  };
866
832
 
867
833
  convert$1.rgb.lab = function (rgb) {
868
- const xyz = convert$1.rgb.xyz(rgb);
869
- let x = xyz[0];
870
- let y = xyz[1];
871
- let z = xyz[2];
872
- x /= 95.047;
873
- y /= 100;
874
- z /= 108.883;
875
- x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
876
- y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
877
- z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
878
- const l = 116 * y - 16;
879
- const a = 500 * (x - y);
880
- const b = 200 * (y - z);
881
- return [l, a, b];
834
+ const xyz = convert$1.rgb.xyz(rgb);
835
+ let x = xyz[0];
836
+ let y = xyz[1];
837
+ let z = xyz[2];
838
+
839
+ x /= 95.047;
840
+ y /= 100;
841
+ z /= 108.883;
842
+
843
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
844
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
845
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
846
+
847
+ const l = (116 * y) - 16;
848
+ const a = 500 * (x - y);
849
+ const b = 200 * (y - z);
850
+
851
+ return [l, a, b];
882
852
  };
883
853
 
884
854
  convert$1.hsl.rgb = function (hsl) {
885
- const h = hsl[0] / 360;
886
- const s = hsl[1] / 100;
887
- const l = hsl[2] / 100;
888
- let t2;
889
- let t3;
890
- let val;
891
-
892
- if (s === 0) {
893
- val = l * 255;
894
- return [val, val, val];
895
- }
896
-
897
- if (l < 0.5) {
898
- t2 = l * (1 + s);
899
- } else {
900
- t2 = l + s - l * s;
901
- }
855
+ const h = hsl[0] / 360;
856
+ const s = hsl[1] / 100;
857
+ const l = hsl[2] / 100;
858
+ let t2;
859
+ let t3;
860
+ let val;
861
+
862
+ if (s === 0) {
863
+ val = l * 255;
864
+ return [val, val, val];
865
+ }
902
866
 
903
- const t1 = 2 * l - t2;
904
- const rgb = [0, 0, 0];
867
+ if (l < 0.5) {
868
+ t2 = l * (1 + s);
869
+ } else {
870
+ t2 = l + s - l * s;
871
+ }
905
872
 
906
- for (let i = 0; i < 3; i++) {
907
- t3 = h + 1 / 3 * -(i - 1);
873
+ const t1 = 2 * l - t2;
908
874
 
909
- if (t3 < 0) {
910
- t3++;
911
- }
875
+ const rgb = [0, 0, 0];
876
+ for (let i = 0; i < 3; i++) {
877
+ t3 = h + 1 / 3 * -(i - 1);
878
+ if (t3 < 0) {
879
+ t3++;
880
+ }
912
881
 
913
- if (t3 > 1) {
914
- t3--;
915
- }
882
+ if (t3 > 1) {
883
+ t3--;
884
+ }
916
885
 
917
- if (6 * t3 < 1) {
918
- val = t1 + (t2 - t1) * 6 * t3;
919
- } else if (2 * t3 < 1) {
920
- val = t2;
921
- } else if (3 * t3 < 2) {
922
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
923
- } else {
924
- val = t1;
925
- }
886
+ if (6 * t3 < 1) {
887
+ val = t1 + (t2 - t1) * 6 * t3;
888
+ } else if (2 * t3 < 1) {
889
+ val = t2;
890
+ } else if (3 * t3 < 2) {
891
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
892
+ } else {
893
+ val = t1;
894
+ }
926
895
 
927
- rgb[i] = val * 255;
928
- }
896
+ rgb[i] = val * 255;
897
+ }
929
898
 
930
- return rgb;
899
+ return rgb;
931
900
  };
932
901
 
933
902
  convert$1.hsl.hsv = function (hsl) {
934
- const h = hsl[0];
935
- let s = hsl[1] / 100;
936
- let l = hsl[2] / 100;
937
- let smin = s;
938
- const lmin = Math.max(l, 0.01);
939
- l *= 2;
940
- s *= l <= 1 ? l : 2 - l;
941
- smin *= lmin <= 1 ? lmin : 2 - lmin;
942
- const v = (l + s) / 2;
943
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
944
- return [h, sv * 100, v * 100];
903
+ const h = hsl[0];
904
+ let s = hsl[1] / 100;
905
+ let l = hsl[2] / 100;
906
+ let smin = s;
907
+ const lmin = Math.max(l, 0.01);
908
+
909
+ l *= 2;
910
+ s *= (l <= 1) ? l : 2 - l;
911
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
912
+ const v = (l + s) / 2;
913
+ const sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
914
+
915
+ return [h, sv * 100, v * 100];
945
916
  };
946
917
 
947
918
  convert$1.hsv.rgb = function (hsv) {
948
- const h = hsv[0] / 60;
949
- const s = hsv[1] / 100;
950
- let v = hsv[2] / 100;
951
- const hi = Math.floor(h) % 6;
952
- const f = h - Math.floor(h);
953
- const p = 255 * v * (1 - s);
954
- const q = 255 * v * (1 - s * f);
955
- const t = 255 * v * (1 - s * (1 - f));
956
- v *= 255;
957
-
958
- switch (hi) {
959
- case 0:
960
- return [v, t, p];
961
-
962
- case 1:
963
- return [q, v, p];
964
-
965
- case 2:
966
- return [p, v, t];
967
-
968
- case 3:
969
- return [p, q, v];
970
-
971
- case 4:
972
- return [t, p, v];
973
-
974
- case 5:
975
- return [v, p, q];
976
- }
919
+ const h = hsv[0] / 60;
920
+ const s = hsv[1] / 100;
921
+ let v = hsv[2] / 100;
922
+ const hi = Math.floor(h) % 6;
923
+
924
+ const f = h - Math.floor(h);
925
+ const p = 255 * v * (1 - s);
926
+ const q = 255 * v * (1 - (s * f));
927
+ const t = 255 * v * (1 - (s * (1 - f)));
928
+ v *= 255;
929
+
930
+ switch (hi) {
931
+ case 0:
932
+ return [v, t, p];
933
+ case 1:
934
+ return [q, v, p];
935
+ case 2:
936
+ return [p, v, t];
937
+ case 3:
938
+ return [p, q, v];
939
+ case 4:
940
+ return [t, p, v];
941
+ case 5:
942
+ return [v, p, q];
943
+ }
977
944
  };
978
945
 
979
946
  convert$1.hsv.hsl = function (hsv) {
980
- const h = hsv[0];
981
- const s = hsv[1] / 100;
982
- const v = hsv[2] / 100;
983
- const vmin = Math.max(v, 0.01);
984
- let sl;
985
- let l;
986
- l = (2 - s) * v;
987
- const lmin = (2 - s) * vmin;
988
- sl = s * vmin;
989
- sl /= lmin <= 1 ? lmin : 2 - lmin;
990
- sl = sl || 0;
991
- l /= 2;
992
- return [h, sl * 100, l * 100];
993
- }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
994
-
947
+ const h = hsv[0];
948
+ const s = hsv[1] / 100;
949
+ const v = hsv[2] / 100;
950
+ const vmin = Math.max(v, 0.01);
951
+ let sl;
952
+ let l;
953
+
954
+ l = (2 - s) * v;
955
+ const lmin = (2 - s) * vmin;
956
+ sl = s * vmin;
957
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
958
+ sl = sl || 0;
959
+ l /= 2;
960
+
961
+ return [h, sl * 100, l * 100];
962
+ };
995
963
 
964
+ // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
996
965
  convert$1.hwb.rgb = function (hwb) {
997
- const h = hwb[0] / 360;
998
- let wh = hwb[1] / 100;
999
- let bl = hwb[2] / 100;
1000
- const ratio = wh + bl;
1001
- let f; // Wh + bl cant be > 1
1002
-
1003
- if (ratio > 1) {
1004
- wh /= ratio;
1005
- bl /= ratio;
1006
- }
1007
-
1008
- const i = Math.floor(6 * h);
1009
- const v = 1 - bl;
1010
- f = 6 * h - i;
1011
-
1012
- if ((i & 0x01) !== 0) {
1013
- f = 1 - f;
1014
- }
1015
-
1016
- const n = wh + f * (v - wh); // Linear interpolation
1017
-
1018
- let r;
1019
- let g;
1020
- let b;
1021
- /* eslint-disable max-statements-per-line,no-multi-spaces */
1022
-
1023
- switch (i) {
1024
- default:
1025
- case 6:
1026
- case 0:
1027
- r = v;
1028
- g = n;
1029
- b = wh;
1030
- break;
1031
-
1032
- case 1:
1033
- r = n;
1034
- g = v;
1035
- b = wh;
1036
- break;
1037
-
1038
- case 2:
1039
- r = wh;
1040
- g = v;
1041
- b = n;
1042
- break;
966
+ const h = hwb[0] / 360;
967
+ let wh = hwb[1] / 100;
968
+ let bl = hwb[2] / 100;
969
+ const ratio = wh + bl;
970
+ let f;
971
+
972
+ // Wh + bl cant be > 1
973
+ if (ratio > 1) {
974
+ wh /= ratio;
975
+ bl /= ratio;
976
+ }
1043
977
 
1044
- case 3:
1045
- r = wh;
1046
- g = n;
1047
- b = v;
1048
- break;
978
+ const i = Math.floor(6 * h);
979
+ const v = 1 - bl;
980
+ f = 6 * h - i;
1049
981
 
1050
- case 4:
1051
- r = n;
1052
- g = wh;
1053
- b = v;
1054
- break;
982
+ if ((i & 0x01) !== 0) {
983
+ f = 1 - f;
984
+ }
1055
985
 
1056
- case 5:
1057
- r = v;
1058
- g = wh;
1059
- b = n;
1060
- break;
1061
- }
1062
- /* eslint-enable max-statements-per-line,no-multi-spaces */
986
+ const n = wh + f * (v - wh); // Linear interpolation
1063
987
 
988
+ let r;
989
+ let g;
990
+ let b;
991
+ /* eslint-disable max-statements-per-line,no-multi-spaces */
992
+ switch (i) {
993
+ default:
994
+ case 6:
995
+ case 0: r = v; g = n; b = wh; break;
996
+ case 1: r = n; g = v; b = wh; break;
997
+ case 2: r = wh; g = v; b = n; break;
998
+ case 3: r = wh; g = n; b = v; break;
999
+ case 4: r = n; g = wh; b = v; break;
1000
+ case 5: r = v; g = wh; b = n; break;
1001
+ }
1002
+ /* eslint-enable max-statements-per-line,no-multi-spaces */
1064
1003
 
1065
- return [r * 255, g * 255, b * 255];
1004
+ return [r * 255, g * 255, b * 255];
1066
1005
  };
1067
1006
 
1068
1007
  convert$1.cmyk.rgb = function (cmyk) {
1069
- const c = cmyk[0] / 100;
1070
- const m = cmyk[1] / 100;
1071
- const y = cmyk[2] / 100;
1072
- const k = cmyk[3] / 100;
1073
- const r = 1 - Math.min(1, c * (1 - k) + k);
1074
- const g = 1 - Math.min(1, m * (1 - k) + k);
1075
- const b = 1 - Math.min(1, y * (1 - k) + k);
1076
- return [r * 255, g * 255, b * 255];
1008
+ const c = cmyk[0] / 100;
1009
+ const m = cmyk[1] / 100;
1010
+ const y = cmyk[2] / 100;
1011
+ const k = cmyk[3] / 100;
1012
+
1013
+ const r = 1 - Math.min(1, c * (1 - k) + k);
1014
+ const g = 1 - Math.min(1, m * (1 - k) + k);
1015
+ const b = 1 - Math.min(1, y * (1 - k) + k);
1016
+
1017
+ return [r * 255, g * 255, b * 255];
1077
1018
  };
1078
1019
 
1079
1020
  convert$1.xyz.rgb = function (xyz) {
1080
- const x = xyz[0] / 100;
1081
- const y = xyz[1] / 100;
1082
- const z = xyz[2] / 100;
1083
- let r;
1084
- let g;
1085
- let b;
1086
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
1087
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
1088
- b = x * 0.0557 + y * -0.2040 + z * 1.0570; // Assume sRGB
1089
-
1090
- r = r > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : r * 12.92;
1091
- g = g > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : g * 12.92;
1092
- b = b > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : b * 12.92;
1093
- r = Math.min(Math.max(0, r), 1);
1094
- g = Math.min(Math.max(0, g), 1);
1095
- b = Math.min(Math.max(0, b), 1);
1096
- return [r * 255, g * 255, b * 255];
1021
+ const x = xyz[0] / 100;
1022
+ const y = xyz[1] / 100;
1023
+ const z = xyz[2] / 100;
1024
+ let r;
1025
+ let g;
1026
+ let b;
1027
+
1028
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
1029
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
1030
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
1031
+
1032
+ // Assume sRGB
1033
+ r = r > 0.0031308
1034
+ ? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)
1035
+ : r * 12.92;
1036
+
1037
+ g = g > 0.0031308
1038
+ ? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)
1039
+ : g * 12.92;
1040
+
1041
+ b = b > 0.0031308
1042
+ ? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)
1043
+ : b * 12.92;
1044
+
1045
+ r = Math.min(Math.max(0, r), 1);
1046
+ g = Math.min(Math.max(0, g), 1);
1047
+ b = Math.min(Math.max(0, b), 1);
1048
+
1049
+ return [r * 255, g * 255, b * 255];
1097
1050
  };
1098
1051
 
1099
1052
  convert$1.xyz.lab = function (xyz) {
1100
- let x = xyz[0];
1101
- let y = xyz[1];
1102
- let z = xyz[2];
1103
- x /= 95.047;
1104
- y /= 100;
1105
- z /= 108.883;
1106
- x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1107
- y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1108
- z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1109
- const l = 116 * y - 16;
1110
- const a = 500 * (x - y);
1111
- const b = 200 * (y - z);
1112
- return [l, a, b];
1053
+ let x = xyz[0];
1054
+ let y = xyz[1];
1055
+ let z = xyz[2];
1056
+
1057
+ x /= 95.047;
1058
+ y /= 100;
1059
+ z /= 108.883;
1060
+
1061
+ x = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);
1062
+ y = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);
1063
+ z = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);
1064
+
1065
+ const l = (116 * y) - 16;
1066
+ const a = 500 * (x - y);
1067
+ const b = 200 * (y - z);
1068
+
1069
+ return [l, a, b];
1113
1070
  };
1114
1071
 
1115
1072
  convert$1.lab.xyz = function (lab) {
1116
- const l = lab[0];
1117
- const a = lab[1];
1118
- const b = lab[2];
1119
- let x;
1120
- let y;
1121
- let z;
1122
- y = (l + 16) / 116;
1123
- x = a / 500 + y;
1124
- z = y - b / 200;
1125
- const y2 = y ** 3;
1126
- const x2 = x ** 3;
1127
- const z2 = z ** 3;
1128
- y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
1129
- x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
1130
- z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
1131
- x *= 95.047;
1132
- y *= 100;
1133
- z *= 108.883;
1134
- return [x, y, z];
1073
+ const l = lab[0];
1074
+ const a = lab[1];
1075
+ const b = lab[2];
1076
+ let x;
1077
+ let y;
1078
+ let z;
1079
+
1080
+ y = (l + 16) / 116;
1081
+ x = a / 500 + y;
1082
+ z = y - b / 200;
1083
+
1084
+ const y2 = y ** 3;
1085
+ const x2 = x ** 3;
1086
+ const z2 = z ** 3;
1087
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
1088
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
1089
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
1090
+
1091
+ x *= 95.047;
1092
+ y *= 100;
1093
+ z *= 108.883;
1094
+
1095
+ return [x, y, z];
1135
1096
  };
1136
1097
 
1137
1098
  convert$1.lab.lch = function (lab) {
1138
- const l = lab[0];
1139
- const a = lab[1];
1140
- const b = lab[2];
1141
- let h;
1142
- const hr = Math.atan2(b, a);
1143
- h = hr * 360 / 2 / Math.PI;
1144
-
1145
- if (h < 0) {
1146
- h += 360;
1147
- }
1099
+ const l = lab[0];
1100
+ const a = lab[1];
1101
+ const b = lab[2];
1102
+ let h;
1148
1103
 
1149
- const c = Math.sqrt(a * a + b * b);
1150
- return [l, c, h];
1104
+ const hr = Math.atan2(b, a);
1105
+ h = hr * 360 / 2 / Math.PI;
1106
+
1107
+ if (h < 0) {
1108
+ h += 360;
1109
+ }
1110
+
1111
+ const c = Math.sqrt(a * a + b * b);
1112
+
1113
+ return [l, c, h];
1151
1114
  };
1152
1115
 
1153
1116
  convert$1.lch.lab = function (lch) {
1154
- const l = lch[0];
1155
- const c = lch[1];
1156
- const h = lch[2];
1157
- const hr = h / 360 * 2 * Math.PI;
1158
- const a = c * Math.cos(hr);
1159
- const b = c * Math.sin(hr);
1160
- return [l, a, b];
1117
+ const l = lch[0];
1118
+ const c = lch[1];
1119
+ const h = lch[2];
1120
+
1121
+ const hr = h / 360 * 2 * Math.PI;
1122
+ const a = c * Math.cos(hr);
1123
+ const b = c * Math.sin(hr);
1124
+
1125
+ return [l, a, b];
1161
1126
  };
1162
1127
 
1163
1128
  convert$1.rgb.ansi16 = function (args, saturation = null) {
1164
- const [r, g, b] = args;
1165
- let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
1129
+ const [r, g, b] = args;
1130
+ let value = saturation === null ? convert$1.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization
1166
1131
 
1167
- value = Math.round(value / 50);
1132
+ value = Math.round(value / 50);
1168
1133
 
1169
- if (value === 0) {
1170
- return 30;
1171
- }
1134
+ if (value === 0) {
1135
+ return 30;
1136
+ }
1172
1137
 
1173
- let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
1138
+ let ansi = 30
1139
+ + ((Math.round(b / 255) << 2)
1140
+ | (Math.round(g / 255) << 1)
1141
+ | Math.round(r / 255));
1174
1142
 
1175
- if (value === 2) {
1176
- ansi += 60;
1177
- }
1143
+ if (value === 2) {
1144
+ ansi += 60;
1145
+ }
1178
1146
 
1179
- return ansi;
1147
+ return ansi;
1180
1148
  };
1181
1149
 
1182
1150
  convert$1.hsv.ansi16 = function (args) {
1183
- // Optimization here; we already know the value and don't need to get
1184
- // it converted for us.
1185
- return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
1151
+ // Optimization here; we already know the value and don't need to get
1152
+ // it converted for us.
1153
+ return convert$1.rgb.ansi16(convert$1.hsv.rgb(args), args[2]);
1186
1154
  };
1187
1155
 
1188
1156
  convert$1.rgb.ansi256 = function (args) {
1189
- const r = args[0];
1190
- const g = args[1];
1191
- const b = args[2]; // We use the extended greyscale palette here, with the exception of
1192
- // black and white. normal palette only has 4 greyscale shades.
1157
+ const r = args[0];
1158
+ const g = args[1];
1159
+ const b = args[2];
1160
+
1161
+ // We use the extended greyscale palette here, with the exception of
1162
+ // black and white. normal palette only has 4 greyscale shades.
1163
+ if (r === g && g === b) {
1164
+ if (r < 8) {
1165
+ return 16;
1166
+ }
1193
1167
 
1194
- if (r === g && g === b) {
1195
- if (r < 8) {
1196
- return 16;
1197
- }
1168
+ if (r > 248) {
1169
+ return 231;
1170
+ }
1198
1171
 
1199
- if (r > 248) {
1200
- return 231;
1201
- }
1172
+ return Math.round(((r - 8) / 247) * 24) + 232;
1173
+ }
1202
1174
 
1203
- return Math.round((r - 8) / 247 * 24) + 232;
1204
- }
1175
+ const ansi = 16
1176
+ + (36 * Math.round(r / 255 * 5))
1177
+ + (6 * Math.round(g / 255 * 5))
1178
+ + Math.round(b / 255 * 5);
1205
1179
 
1206
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1207
- return ansi;
1180
+ return ansi;
1208
1181
  };
1209
1182
 
1210
1183
  convert$1.ansi16.rgb = function (args) {
1211
- let color = args % 10; // Handle greyscale
1184
+ let color = args % 10;
1212
1185
 
1213
- if (color === 0 || color === 7) {
1214
- if (args > 50) {
1215
- color += 3.5;
1216
- }
1186
+ // Handle greyscale
1187
+ if (color === 0 || color === 7) {
1188
+ if (args > 50) {
1189
+ color += 3.5;
1190
+ }
1217
1191
 
1218
- color = color / 10.5 * 255;
1219
- return [color, color, color];
1220
- }
1192
+ color = color / 10.5 * 255;
1193
+
1194
+ return [color, color, color];
1195
+ }
1196
+
1197
+ const mult = (~~(args > 50) + 1) * 0.5;
1198
+ const r = ((color & 1) * mult) * 255;
1199
+ const g = (((color >> 1) & 1) * mult) * 255;
1200
+ const b = (((color >> 2) & 1) * mult) * 255;
1221
1201
 
1222
- const mult = (~~(args > 50) + 1) * 0.5;
1223
- const r = (color & 1) * mult * 255;
1224
- const g = (color >> 1 & 1) * mult * 255;
1225
- const b = (color >> 2 & 1) * mult * 255;
1226
- return [r, g, b];
1202
+ return [r, g, b];
1227
1203
  };
1228
1204
 
1229
1205
  convert$1.ansi256.rgb = function (args) {
1230
- // Handle greyscale
1231
- if (args >= 232) {
1232
- const c = (args - 232) * 10 + 8;
1233
- return [c, c, c];
1234
- }
1206
+ // Handle greyscale
1207
+ if (args >= 232) {
1208
+ const c = (args - 232) * 10 + 8;
1209
+ return [c, c, c];
1210
+ }
1211
+
1212
+ args -= 16;
1213
+
1214
+ let rem;
1215
+ const r = Math.floor(args / 36) / 5 * 255;
1216
+ const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1217
+ const b = (rem % 6) / 5 * 255;
1235
1218
 
1236
- args -= 16;
1237
- let rem;
1238
- const r = Math.floor(args / 36) / 5 * 255;
1239
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1240
- const b = rem % 6 / 5 * 255;
1241
- return [r, g, b];
1219
+ return [r, g, b];
1242
1220
  };
1243
1221
 
1244
1222
  convert$1.rgb.hex = function (args) {
1245
- const integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
1246
- const string = integer.toString(16).toUpperCase();
1247
- return '000000'.substring(string.length) + string;
1223
+ const integer = ((Math.round(args[0]) & 0xFF) << 16)
1224
+ + ((Math.round(args[1]) & 0xFF) << 8)
1225
+ + (Math.round(args[2]) & 0xFF);
1226
+
1227
+ const string = integer.toString(16).toUpperCase();
1228
+ return '000000'.substring(string.length) + string;
1248
1229
  };
1249
1230
 
1250
1231
  convert$1.hex.rgb = function (args) {
1251
- const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1232
+ const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
1233
+ if (!match) {
1234
+ return [0, 0, 0];
1235
+ }
1252
1236
 
1253
- if (!match) {
1254
- return [0, 0, 0];
1255
- }
1237
+ let colorString = match[0];
1256
1238
 
1257
- let colorString = match[0];
1239
+ if (match[0].length === 3) {
1240
+ colorString = colorString.split('').map(char => {
1241
+ return char + char;
1242
+ }).join('');
1243
+ }
1258
1244
 
1259
- if (match[0].length === 3) {
1260
- colorString = colorString.split('').map(char => {
1261
- return char + char;
1262
- }).join('');
1263
- }
1245
+ const integer = parseInt(colorString, 16);
1246
+ const r = (integer >> 16) & 0xFF;
1247
+ const g = (integer >> 8) & 0xFF;
1248
+ const b = integer & 0xFF;
1264
1249
 
1265
- const integer = parseInt(colorString, 16);
1266
- const r = integer >> 16 & 0xFF;
1267
- const g = integer >> 8 & 0xFF;
1268
- const b = integer & 0xFF;
1269
- return [r, g, b];
1250
+ return [r, g, b];
1270
1251
  };
1271
1252
 
1272
1253
  convert$1.rgb.hcg = function (rgb) {
1273
- const r = rgb[0] / 255;
1274
- const g = rgb[1] / 255;
1275
- const b = rgb[2] / 255;
1276
- const max = Math.max(Math.max(r, g), b);
1277
- const min = Math.min(Math.min(r, g), b);
1278
- const chroma = max - min;
1279
- let grayscale;
1280
- let hue;
1281
-
1282
- if (chroma < 1) {
1283
- grayscale = min / (1 - chroma);
1284
- } else {
1285
- grayscale = 0;
1286
- }
1254
+ const r = rgb[0] / 255;
1255
+ const g = rgb[1] / 255;
1256
+ const b = rgb[2] / 255;
1257
+ const max = Math.max(Math.max(r, g), b);
1258
+ const min = Math.min(Math.min(r, g), b);
1259
+ const chroma = (max - min);
1260
+ let grayscale;
1261
+ let hue;
1262
+
1263
+ if (chroma < 1) {
1264
+ grayscale = min / (1 - chroma);
1265
+ } else {
1266
+ grayscale = 0;
1267
+ }
1287
1268
 
1288
- if (chroma <= 0) {
1289
- hue = 0;
1290
- } else if (max === r) {
1291
- hue = (g - b) / chroma % 6;
1292
- } else if (max === g) {
1293
- hue = 2 + (b - r) / chroma;
1294
- } else {
1295
- hue = 4 + (r - g) / chroma;
1296
- }
1269
+ if (chroma <= 0) {
1270
+ hue = 0;
1271
+ } else
1272
+ if (max === r) {
1273
+ hue = ((g - b) / chroma) % 6;
1274
+ } else
1275
+ if (max === g) {
1276
+ hue = 2 + (b - r) / chroma;
1277
+ } else {
1278
+ hue = 4 + (r - g) / chroma;
1279
+ }
1280
+
1281
+ hue /= 6;
1282
+ hue %= 1;
1297
1283
 
1298
- hue /= 6;
1299
- hue %= 1;
1300
- return [hue * 360, chroma * 100, grayscale * 100];
1284
+ return [hue * 360, chroma * 100, grayscale * 100];
1301
1285
  };
1302
1286
 
1303
1287
  convert$1.hsl.hcg = function (hsl) {
1304
- const s = hsl[1] / 100;
1305
- const l = hsl[2] / 100;
1306
- const c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l);
1307
- let f = 0;
1288
+ const s = hsl[1] / 100;
1289
+ const l = hsl[2] / 100;
1308
1290
 
1309
- if (c < 1.0) {
1310
- f = (l - 0.5 * c) / (1.0 - c);
1311
- }
1291
+ const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
1312
1292
 
1313
- return [hsl[0], c * 100, f * 100];
1293
+ let f = 0;
1294
+ if (c < 1.0) {
1295
+ f = (l - 0.5 * c) / (1.0 - c);
1296
+ }
1297
+
1298
+ return [hsl[0], c * 100, f * 100];
1314
1299
  };
1315
1300
 
1316
1301
  convert$1.hsv.hcg = function (hsv) {
1317
- const s = hsv[1] / 100;
1318
- const v = hsv[2] / 100;
1319
- const c = s * v;
1320
- let f = 0;
1302
+ const s = hsv[1] / 100;
1303
+ const v = hsv[2] / 100;
1321
1304
 
1322
- if (c < 1.0) {
1323
- f = (v - c) / (1 - c);
1324
- }
1305
+ const c = s * v;
1306
+ let f = 0;
1307
+
1308
+ if (c < 1.0) {
1309
+ f = (v - c) / (1 - c);
1310
+ }
1325
1311
 
1326
- return [hsv[0], c * 100, f * 100];
1312
+ return [hsv[0], c * 100, f * 100];
1327
1313
  };
1328
1314
 
1329
1315
  convert$1.hcg.rgb = function (hcg) {
1330
- const h = hcg[0] / 360;
1331
- const c = hcg[1] / 100;
1332
- const g = hcg[2] / 100;
1333
-
1334
- if (c === 0.0) {
1335
- return [g * 255, g * 255, g * 255];
1336
- }
1337
-
1338
- const pure = [0, 0, 0];
1339
- const hi = h % 1 * 6;
1340
- const v = hi % 1;
1341
- const w = 1 - v;
1342
- let mg = 0;
1343
- /* eslint-disable max-statements-per-line */
1344
-
1345
- switch (Math.floor(hi)) {
1346
- case 0:
1347
- pure[0] = 1;
1348
- pure[1] = v;
1349
- pure[2] = 0;
1350
- break;
1351
-
1352
- case 1:
1353
- pure[0] = w;
1354
- pure[1] = 1;
1355
- pure[2] = 0;
1356
- break;
1316
+ const h = hcg[0] / 360;
1317
+ const c = hcg[1] / 100;
1318
+ const g = hcg[2] / 100;
1357
1319
 
1358
- case 2:
1359
- pure[0] = 0;
1360
- pure[1] = 1;
1361
- pure[2] = v;
1362
- break;
1363
-
1364
- case 3:
1365
- pure[0] = 0;
1366
- pure[1] = w;
1367
- pure[2] = 1;
1368
- break;
1369
-
1370
- case 4:
1371
- pure[0] = v;
1372
- pure[1] = 0;
1373
- pure[2] = 1;
1374
- break;
1320
+ if (c === 0.0) {
1321
+ return [g * 255, g * 255, g * 255];
1322
+ }
1375
1323
 
1376
- default:
1377
- pure[0] = 1;
1378
- pure[1] = 0;
1379
- pure[2] = w;
1380
- }
1381
- /* eslint-enable max-statements-per-line */
1324
+ const pure = [0, 0, 0];
1325
+ const hi = (h % 1) * 6;
1326
+ const v = hi % 1;
1327
+ const w = 1 - v;
1328
+ let mg = 0;
1329
+
1330
+ /* eslint-disable max-statements-per-line */
1331
+ switch (Math.floor(hi)) {
1332
+ case 0:
1333
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
1334
+ case 1:
1335
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
1336
+ case 2:
1337
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
1338
+ case 3:
1339
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
1340
+ case 4:
1341
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
1342
+ default:
1343
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
1344
+ }
1345
+ /* eslint-enable max-statements-per-line */
1382
1346
 
1347
+ mg = (1.0 - c) * g;
1383
1348
 
1384
- mg = (1.0 - c) * g;
1385
- return [(c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255];
1349
+ return [
1350
+ (c * pure[0] + mg) * 255,
1351
+ (c * pure[1] + mg) * 255,
1352
+ (c * pure[2] + mg) * 255
1353
+ ];
1386
1354
  };
1387
1355
 
1388
1356
  convert$1.hcg.hsv = function (hcg) {
1389
- const c = hcg[1] / 100;
1390
- const g = hcg[2] / 100;
1391
- const v = c + g * (1.0 - c);
1392
- let f = 0;
1357
+ const c = hcg[1] / 100;
1358
+ const g = hcg[2] / 100;
1393
1359
 
1394
- if (v > 0.0) {
1395
- f = c / v;
1396
- }
1360
+ const v = c + g * (1.0 - c);
1361
+ let f = 0;
1362
+
1363
+ if (v > 0.0) {
1364
+ f = c / v;
1365
+ }
1397
1366
 
1398
- return [hcg[0], f * 100, v * 100];
1367
+ return [hcg[0], f * 100, v * 100];
1399
1368
  };
1400
1369
 
1401
1370
  convert$1.hcg.hsl = function (hcg) {
1402
- const c = hcg[1] / 100;
1403
- const g = hcg[2] / 100;
1404
- const l = g * (1.0 - c) + 0.5 * c;
1405
- let s = 0;
1406
-
1407
- if (l > 0.0 && l < 0.5) {
1408
- s = c / (2 * l);
1409
- } else if (l >= 0.5 && l < 1.0) {
1410
- s = c / (2 * (1 - l));
1411
- }
1371
+ const c = hcg[1] / 100;
1372
+ const g = hcg[2] / 100;
1373
+
1374
+ const l = g * (1.0 - c) + 0.5 * c;
1375
+ let s = 0;
1412
1376
 
1413
- return [hcg[0], s * 100, l * 100];
1377
+ if (l > 0.0 && l < 0.5) {
1378
+ s = c / (2 * l);
1379
+ } else
1380
+ if (l >= 0.5 && l < 1.0) {
1381
+ s = c / (2 * (1 - l));
1382
+ }
1383
+
1384
+ return [hcg[0], s * 100, l * 100];
1414
1385
  };
1415
1386
 
1416
1387
  convert$1.hcg.hwb = function (hcg) {
1417
- const c = hcg[1] / 100;
1418
- const g = hcg[2] / 100;
1419
- const v = c + g * (1.0 - c);
1420
- return [hcg[0], (v - c) * 100, (1 - v) * 100];
1388
+ const c = hcg[1] / 100;
1389
+ const g = hcg[2] / 100;
1390
+ const v = c + g * (1.0 - c);
1391
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
1421
1392
  };
1422
1393
 
1423
1394
  convert$1.hwb.hcg = function (hwb) {
1424
- const w = hwb[1] / 100;
1425
- const b = hwb[2] / 100;
1426
- const v = 1 - b;
1427
- const c = v - w;
1428
- let g = 0;
1429
-
1430
- if (c < 1) {
1431
- g = (v - c) / (1 - c);
1432
- }
1395
+ const w = hwb[1] / 100;
1396
+ const b = hwb[2] / 100;
1397
+ const v = 1 - b;
1398
+ const c = v - w;
1399
+ let g = 0;
1400
+
1401
+ if (c < 1) {
1402
+ g = (v - c) / (1 - c);
1403
+ }
1433
1404
 
1434
- return [hwb[0], c * 100, g * 100];
1405
+ return [hwb[0], c * 100, g * 100];
1435
1406
  };
1436
1407
 
1437
1408
  convert$1.apple.rgb = function (apple) {
1438
- return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
1409
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
1439
1410
  };
1440
1411
 
1441
1412
  convert$1.rgb.apple = function (rgb) {
1442
- return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
1413
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
1443
1414
  };
1444
1415
 
1445
1416
  convert$1.gray.rgb = function (args) {
1446
- return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1417
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
1447
1418
  };
1448
1419
 
1449
1420
  convert$1.gray.hsl = function (args) {
1450
- return [0, 0, args[0]];
1421
+ return [0, 0, args[0]];
1451
1422
  };
1452
1423
 
1453
1424
  convert$1.gray.hsv = convert$1.gray.hsl;
1454
1425
 
1455
1426
  convert$1.gray.hwb = function (gray) {
1456
- return [0, 100, gray[0]];
1427
+ return [0, 100, gray[0]];
1457
1428
  };
1458
1429
 
1459
1430
  convert$1.gray.cmyk = function (gray) {
1460
- return [0, 0, 0, gray[0]];
1431
+ return [0, 0, 0, gray[0]];
1461
1432
  };
1462
1433
 
1463
1434
  convert$1.gray.lab = function (gray) {
1464
- return [gray[0], 0, 0];
1435
+ return [gray[0], 0, 0];
1465
1436
  };
1466
1437
 
1467
1438
  convert$1.gray.hex = function (gray) {
1468
- const val = Math.round(gray[0] / 100 * 255) & 0xFF;
1469
- const integer = (val << 16) + (val << 8) + val;
1470
- const string = integer.toString(16).toUpperCase();
1471
- return '000000'.substring(string.length) + string;
1439
+ const val = Math.round(gray[0] / 100 * 255) & 0xFF;
1440
+ const integer = (val << 16) + (val << 8) + val;
1441
+
1442
+ const string = integer.toString(16).toUpperCase();
1443
+ return '000000'.substring(string.length) + string;
1472
1444
  };
1473
1445
 
1474
1446
  convert$1.rgb.gray = function (rgb) {
1475
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1476
- return [val / 255 * 100];
1447
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1448
+ return [val / 255 * 100];
1477
1449
  };
1478
1450
 
1479
1451
  /*
@@ -1488,646 +1460,658 @@ convert$1.rgb.gray = function (rgb) {
1488
1460
  */
1489
1461
 
1490
1462
  function buildGraph() {
1491
- const graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3
1492
-
1493
- const models = Object.keys(conversions);
1494
-
1495
- for (let len = models.length, i = 0; i < len; i++) {
1496
- graph[models[i]] = {
1497
- // http://jsperf.com/1-vs-infinity
1498
- // micro-opt, but this is simple.
1499
- distance: -1,
1500
- parent: null
1501
- };
1502
- }
1503
-
1504
- return graph;
1505
- } // https://en.wikipedia.org/wiki/Breadth-first_search
1463
+ const graph = {};
1464
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
1465
+ const models = Object.keys(conversions);
1466
+
1467
+ for (let len = models.length, i = 0; i < len; i++) {
1468
+ graph[models[i]] = {
1469
+ // http://jsperf.com/1-vs-infinity
1470
+ // micro-opt, but this is simple.
1471
+ distance: -1,
1472
+ parent: null
1473
+ };
1474
+ }
1506
1475
 
1476
+ return graph;
1477
+ }
1507
1478
 
1479
+ // https://en.wikipedia.org/wiki/Breadth-first_search
1508
1480
  function deriveBFS(fromModel) {
1509
- const graph = buildGraph();
1510
- const queue = [fromModel]; // Unshift -> queue -> pop
1481
+ const graph = buildGraph();
1482
+ const queue = [fromModel]; // Unshift -> queue -> pop
1511
1483
 
1512
- graph[fromModel].distance = 0;
1484
+ graph[fromModel].distance = 0;
1513
1485
 
1514
- while (queue.length) {
1515
- const current = queue.pop();
1516
- const adjacents = Object.keys(conversions[current]);
1486
+ while (queue.length) {
1487
+ const current = queue.pop();
1488
+ const adjacents = Object.keys(conversions[current]);
1517
1489
 
1518
- for (let len = adjacents.length, i = 0; i < len; i++) {
1519
- const adjacent = adjacents[i];
1520
- const node = graph[adjacent];
1490
+ for (let len = adjacents.length, i = 0; i < len; i++) {
1491
+ const adjacent = adjacents[i];
1492
+ const node = graph[adjacent];
1521
1493
 
1522
- if (node.distance === -1) {
1523
- node.distance = graph[current].distance + 1;
1524
- node.parent = current;
1525
- queue.unshift(adjacent);
1526
- }
1527
- }
1528
- }
1494
+ if (node.distance === -1) {
1495
+ node.distance = graph[current].distance + 1;
1496
+ node.parent = current;
1497
+ queue.unshift(adjacent);
1498
+ }
1499
+ }
1500
+ }
1529
1501
 
1530
- return graph;
1502
+ return graph;
1531
1503
  }
1532
1504
 
1533
1505
  function link(from, to) {
1534
- return function (args) {
1535
- return to(from(args));
1536
- };
1506
+ return function (args) {
1507
+ return to(from(args));
1508
+ };
1537
1509
  }
1538
1510
 
1539
1511
  function wrapConversion(toModel, graph) {
1540
- const path = [graph[toModel].parent, toModel];
1541
- let fn = conversions[graph[toModel].parent][toModel];
1542
- let cur = graph[toModel].parent;
1543
-
1544
- while (graph[cur].parent) {
1545
- path.unshift(graph[cur].parent);
1546
- fn = link(conversions[graph[cur].parent][cur], fn);
1547
- cur = graph[cur].parent;
1548
- }
1512
+ const path = [graph[toModel].parent, toModel];
1513
+ let fn = conversions[graph[toModel].parent][toModel];
1514
+
1515
+ let cur = graph[toModel].parent;
1516
+ while (graph[cur].parent) {
1517
+ path.unshift(graph[cur].parent);
1518
+ fn = link(conversions[graph[cur].parent][cur], fn);
1519
+ cur = graph[cur].parent;
1520
+ }
1549
1521
 
1550
- fn.conversion = path;
1551
- return fn;
1522
+ fn.conversion = path;
1523
+ return fn;
1552
1524
  }
1553
1525
 
1554
1526
  var route = function (fromModel) {
1555
- const graph = deriveBFS(fromModel);
1556
- const conversion = {};
1557
- const models = Object.keys(graph);
1527
+ const graph = deriveBFS(fromModel);
1528
+ const conversion = {};
1558
1529
 
1559
- for (let len = models.length, i = 0; i < len; i++) {
1560
- const toModel = models[i];
1561
- const node = graph[toModel];
1530
+ const models = Object.keys(graph);
1531
+ for (let len = models.length, i = 0; i < len; i++) {
1532
+ const toModel = models[i];
1533
+ const node = graph[toModel];
1562
1534
 
1563
- if (node.parent === null) {
1564
- // No possible conversion, or this node is the source model.
1565
- continue;
1566
- }
1535
+ if (node.parent === null) {
1536
+ // No possible conversion, or this node is the source model.
1537
+ continue;
1538
+ }
1567
1539
 
1568
- conversion[toModel] = wrapConversion(toModel, graph);
1569
- }
1540
+ conversion[toModel] = wrapConversion(toModel, graph);
1541
+ }
1570
1542
 
1571
- return conversion;
1543
+ return conversion;
1572
1544
  };
1573
1545
 
1574
1546
  const convert = {};
1547
+
1575
1548
  const models = Object.keys(conversions);
1576
1549
 
1577
1550
  function wrapRaw(fn) {
1578
- const wrappedFn = function (...args) {
1579
- const arg0 = args[0];
1580
-
1581
- if (arg0 === undefined || arg0 === null) {
1582
- return arg0;
1583
- }
1584
-
1585
- if (arg0.length > 1) {
1586
- args = arg0;
1587
- }
1551
+ const wrappedFn = function (...args) {
1552
+ const arg0 = args[0];
1553
+ if (arg0 === undefined || arg0 === null) {
1554
+ return arg0;
1555
+ }
1588
1556
 
1589
- return fn(args);
1590
- }; // Preserve .conversion property if there is one
1557
+ if (arg0.length > 1) {
1558
+ args = arg0;
1559
+ }
1591
1560
 
1561
+ return fn(args);
1562
+ };
1592
1563
 
1593
- if ('conversion' in fn) {
1594
- wrappedFn.conversion = fn.conversion;
1595
- }
1564
+ // Preserve .conversion property if there is one
1565
+ if ('conversion' in fn) {
1566
+ wrappedFn.conversion = fn.conversion;
1567
+ }
1596
1568
 
1597
- return wrappedFn;
1569
+ return wrappedFn;
1598
1570
  }
1599
1571
 
1600
1572
  function wrapRounded(fn) {
1601
- const wrappedFn = function (...args) {
1602
- const arg0 = args[0];
1573
+ const wrappedFn = function (...args) {
1574
+ const arg0 = args[0];
1603
1575
 
1604
- if (arg0 === undefined || arg0 === null) {
1605
- return arg0;
1606
- }
1576
+ if (arg0 === undefined || arg0 === null) {
1577
+ return arg0;
1578
+ }
1607
1579
 
1608
- if (arg0.length > 1) {
1609
- args = arg0;
1610
- }
1580
+ if (arg0.length > 1) {
1581
+ args = arg0;
1582
+ }
1611
1583
 
1612
- const result = fn(args); // We're assuming the result is an array here.
1613
- // see notice in conversions.js; don't use box types
1614
- // in conversion functions.
1584
+ const result = fn(args);
1615
1585
 
1616
- if (typeof result === 'object') {
1617
- for (let len = result.length, i = 0; i < len; i++) {
1618
- result[i] = Math.round(result[i]);
1619
- }
1620
- }
1621
-
1622
- return result;
1623
- }; // Preserve .conversion property if there is one
1586
+ // We're assuming the result is an array here.
1587
+ // see notice in conversions.js; don't use box types
1588
+ // in conversion functions.
1589
+ if (typeof result === 'object') {
1590
+ for (let len = result.length, i = 0; i < len; i++) {
1591
+ result[i] = Math.round(result[i]);
1592
+ }
1593
+ }
1624
1594
 
1595
+ return result;
1596
+ };
1625
1597
 
1626
- if ('conversion' in fn) {
1627
- wrappedFn.conversion = fn.conversion;
1628
- }
1598
+ // Preserve .conversion property if there is one
1599
+ if ('conversion' in fn) {
1600
+ wrappedFn.conversion = fn.conversion;
1601
+ }
1629
1602
 
1630
- return wrappedFn;
1603
+ return wrappedFn;
1631
1604
  }
1632
1605
 
1633
1606
  models.forEach(fromModel => {
1634
- convert[fromModel] = {};
1635
- Object.defineProperty(convert[fromModel], 'channels', {
1636
- value: conversions[fromModel].channels
1637
- });
1638
- Object.defineProperty(convert[fromModel], 'labels', {
1639
- value: conversions[fromModel].labels
1640
- });
1641
- const routes = route(fromModel);
1642
- const routeModels = Object.keys(routes);
1643
- routeModels.forEach(toModel => {
1644
- const fn = routes[toModel];
1645
- convert[fromModel][toModel] = wrapRounded(fn);
1646
- convert[fromModel][toModel].raw = wrapRaw(fn);
1647
- });
1607
+ convert[fromModel] = {};
1608
+
1609
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
1610
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
1611
+
1612
+ const routes = route(fromModel);
1613
+ const routeModels = Object.keys(routes);
1614
+
1615
+ routeModels.forEach(toModel => {
1616
+ const fn = routes[toModel];
1617
+
1618
+ convert[fromModel][toModel] = wrapRounded(fn);
1619
+ convert[fromModel][toModel].raw = wrapRaw(fn);
1620
+ });
1648
1621
  });
1622
+
1649
1623
  var colorConvert = convert;
1650
1624
 
1651
- const skippedModels = [// To be honest, I don't really feel like keyword belongs in color convert, but eh.
1652
- 'keyword', // Gray conflicts with some method names, and has its own method defined.
1653
- 'gray', // Shouldn't really be in color-convert either...
1654
- 'hex'];
1655
- const hashedModelKeys = {};
1625
+ const skippedModels = [
1626
+ // To be honest, I don't really feel like keyword belongs in color convert, but eh.
1627
+ 'keyword',
1628
+
1629
+ // Gray conflicts with some method names, and has its own method defined.
1630
+ 'gray',
1631
+
1632
+ // Shouldn't really be in color-convert either...
1633
+ 'hex',
1634
+ ];
1656
1635
 
1636
+ const hashedModelKeys = {};
1657
1637
  for (const model of Object.keys(colorConvert)) {
1658
- hashedModelKeys[[...colorConvert[model].labels].sort().join('')] = model;
1638
+ hashedModelKeys[[...colorConvert[model].labels].sort().join('')] = model;
1659
1639
  }
1660
1640
 
1661
1641
  const limiters = {};
1662
1642
 
1663
1643
  function Color(object, model) {
1664
- if (!(this instanceof Color)) {
1665
- return new Color(object, model);
1666
- }
1644
+ if (!(this instanceof Color)) {
1645
+ return new Color(object, model);
1646
+ }
1667
1647
 
1668
- if (model && model in skippedModels) {
1669
- model = null;
1670
- }
1648
+ if (model && model in skippedModels) {
1649
+ model = null;
1650
+ }
1671
1651
 
1672
- if (model && !(model in colorConvert)) {
1673
- throw new Error('Unknown model: ' + model);
1674
- }
1652
+ if (model && !(model in colorConvert)) {
1653
+ throw new Error('Unknown model: ' + model);
1654
+ }
1675
1655
 
1676
- let i;
1677
- let channels;
1678
-
1679
- if (object == null) {
1680
- // eslint-disable-line no-eq-null,eqeqeq
1681
- this.model = 'rgb';
1682
- this.color = [0, 0, 0];
1683
- this.valpha = 1;
1684
- } else if (object instanceof Color) {
1685
- this.model = object.model;
1686
- this.color = [...object.color];
1687
- this.valpha = object.valpha;
1688
- } else if (typeof object === 'string') {
1689
- const result = colorString.get(object);
1690
-
1691
- if (result === null) {
1692
- throw new Error('Unable to parse color from string: ' + object);
1693
- }
1694
-
1695
- this.model = result.model;
1696
- channels = colorConvert[this.model].channels;
1697
- this.color = result.value.slice(0, channels);
1698
- this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;
1699
- } else if (object.length > 0) {
1700
- this.model = model || 'rgb';
1701
- channels = colorConvert[this.model].channels;
1702
- const newArray = Array.prototype.slice.call(object, 0, channels);
1703
- this.color = zeroArray(newArray, channels);
1704
- this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
1705
- } else if (typeof object === 'number') {
1706
- // This is always RGB - can be converted later on.
1707
- this.model = 'rgb';
1708
- this.color = [object >> 16 & 0xFF, object >> 8 & 0xFF, object & 0xFF];
1709
- this.valpha = 1;
1710
- } else {
1711
- this.valpha = 1;
1712
- const keys = Object.keys(object);
1713
-
1714
- if ('alpha' in object) {
1715
- keys.splice(keys.indexOf('alpha'), 1);
1716
- this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
1717
- }
1718
-
1719
- const hashedKeys = keys.sort().join('');
1720
-
1721
- if (!(hashedKeys in hashedModelKeys)) {
1722
- throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
1723
- }
1724
-
1725
- this.model = hashedModelKeys[hashedKeys];
1726
- const {
1727
- labels
1728
- } = colorConvert[this.model];
1729
- const color = [];
1730
-
1731
- for (i = 0; i < labels.length; i++) {
1732
- color.push(object[labels[i]]);
1733
- }
1734
-
1735
- this.color = zeroArray(color);
1736
- } // Perform limitations (clamping, etc.)
1737
-
1738
-
1739
- if (limiters[this.model]) {
1740
- channels = colorConvert[this.model].channels;
1741
-
1742
- for (i = 0; i < channels; i++) {
1743
- const limit = limiters[this.model][i];
1744
-
1745
- if (limit) {
1746
- this.color[i] = limit(this.color[i]);
1747
- }
1748
- }
1749
- }
1656
+ let i;
1657
+ let channels;
1658
+
1659
+ if (object == null) { // eslint-disable-line no-eq-null,eqeqeq
1660
+ this.model = 'rgb';
1661
+ this.color = [0, 0, 0];
1662
+ this.valpha = 1;
1663
+ } else if (object instanceof Color) {
1664
+ this.model = object.model;
1665
+ this.color = [...object.color];
1666
+ this.valpha = object.valpha;
1667
+ } else if (typeof object === 'string') {
1668
+ const result = colorString.get(object);
1669
+ if (result === null) {
1670
+ throw new Error('Unable to parse color from string: ' + object);
1671
+ }
1750
1672
 
1751
- this.valpha = Math.max(0, Math.min(1, this.valpha));
1673
+ this.model = result.model;
1674
+ channels = colorConvert[this.model].channels;
1675
+ this.color = result.value.slice(0, channels);
1676
+ this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;
1677
+ } else if (object.length > 0) {
1678
+ this.model = model || 'rgb';
1679
+ channels = colorConvert[this.model].channels;
1680
+ const newArray = Array.prototype.slice.call(object, 0, channels);
1681
+ this.color = zeroArray(newArray, channels);
1682
+ this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
1683
+ } else if (typeof object === 'number') {
1684
+ // This is always RGB - can be converted later on.
1685
+ this.model = 'rgb';
1686
+ this.color = [
1687
+ (object >> 16) & 0xFF,
1688
+ (object >> 8) & 0xFF,
1689
+ object & 0xFF,
1690
+ ];
1691
+ this.valpha = 1;
1692
+ } else {
1693
+ this.valpha = 1;
1752
1694
 
1753
- if (Object.freeze) {
1754
- Object.freeze(this);
1755
- }
1695
+ const keys = Object.keys(object);
1696
+ if ('alpha' in object) {
1697
+ keys.splice(keys.indexOf('alpha'), 1);
1698
+ this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
1699
+ }
1700
+
1701
+ const hashedKeys = keys.sort().join('');
1702
+ if (!(hashedKeys in hashedModelKeys)) {
1703
+ throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
1704
+ }
1705
+
1706
+ this.model = hashedModelKeys[hashedKeys];
1707
+
1708
+ const {labels} = colorConvert[this.model];
1709
+ const color = [];
1710
+ for (i = 0; i < labels.length; i++) {
1711
+ color.push(object[labels[i]]);
1712
+ }
1713
+
1714
+ this.color = zeroArray(color);
1715
+ }
1716
+
1717
+ // Perform limitations (clamping, etc.)
1718
+ if (limiters[this.model]) {
1719
+ channels = colorConvert[this.model].channels;
1720
+ for (i = 0; i < channels; i++) {
1721
+ const limit = limiters[this.model][i];
1722
+ if (limit) {
1723
+ this.color[i] = limit(this.color[i]);
1724
+ }
1725
+ }
1726
+ }
1727
+
1728
+ this.valpha = Math.max(0, Math.min(1, this.valpha));
1729
+
1730
+ if (Object.freeze) {
1731
+ Object.freeze(this);
1732
+ }
1756
1733
  }
1757
1734
 
1758
1735
  Color.prototype = {
1759
- toString() {
1760
- return this.string();
1761
- },
1762
-
1763
- toJSON() {
1764
- return this[this.model]();
1765
- },
1766
-
1767
- string(places) {
1768
- let self = this.model in colorString.to ? this : this.rgb();
1769
- self = self.round(typeof places === 'number' ? places : 1);
1770
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1771
- return colorString.to[self.model](args);
1772
- },
1773
-
1774
- percentString(places) {
1775
- const self = this.rgb().round(typeof places === 'number' ? places : 1);
1776
- const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1777
- return colorString.to.rgb.percent(args);
1778
- },
1779
-
1780
- array() {
1781
- return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
1782
- },
1783
-
1784
- object() {
1785
- const result = {};
1786
- const {
1787
- channels
1788
- } = colorConvert[this.model];
1789
- const {
1790
- labels
1791
- } = colorConvert[this.model];
1792
-
1793
- for (let i = 0; i < channels; i++) {
1794
- result[labels[i]] = this.color[i];
1795
- }
1796
-
1797
- if (this.valpha !== 1) {
1798
- result.alpha = this.valpha;
1799
- }
1800
-
1801
- return result;
1802
- },
1803
-
1804
- unitArray() {
1805
- const rgb = this.rgb().color;
1806
- rgb[0] /= 255;
1807
- rgb[1] /= 255;
1808
- rgb[2] /= 255;
1809
-
1810
- if (this.valpha !== 1) {
1811
- rgb.push(this.valpha);
1812
- }
1813
-
1814
- return rgb;
1815
- },
1816
-
1817
- unitObject() {
1818
- const rgb = this.rgb().object();
1819
- rgb.r /= 255;
1820
- rgb.g /= 255;
1821
- rgb.b /= 255;
1822
-
1823
- if (this.valpha !== 1) {
1824
- rgb.alpha = this.valpha;
1825
- }
1826
-
1827
- return rgb;
1828
- },
1829
-
1830
- round(places) {
1831
- places = Math.max(places || 0, 0);
1832
- return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
1833
- },
1834
-
1835
- alpha(value) {
1836
- if (value !== undefined) {
1837
- return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
1838
- }
1839
-
1840
- return this.valpha;
1841
- },
1842
-
1843
- // Rgb
1844
- red: getset('rgb', 0, maxfn(255)),
1845
- green: getset('rgb', 1, maxfn(255)),
1846
- blue: getset('rgb', 2, maxfn(255)),
1847
- hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => (value % 360 + 360) % 360),
1848
- saturationl: getset('hsl', 1, maxfn(100)),
1849
- lightness: getset('hsl', 2, maxfn(100)),
1850
- saturationv: getset('hsv', 1, maxfn(100)),
1851
- value: getset('hsv', 2, maxfn(100)),
1852
- chroma: getset('hcg', 1, maxfn(100)),
1853
- gray: getset('hcg', 2, maxfn(100)),
1854
- white: getset('hwb', 1, maxfn(100)),
1855
- wblack: getset('hwb', 2, maxfn(100)),
1856
- cyan: getset('cmyk', 0, maxfn(100)),
1857
- magenta: getset('cmyk', 1, maxfn(100)),
1858
- yellow: getset('cmyk', 2, maxfn(100)),
1859
- black: getset('cmyk', 3, maxfn(100)),
1860
- x: getset('xyz', 0, maxfn(95.047)),
1861
- y: getset('xyz', 1, maxfn(100)),
1862
- z: getset('xyz', 2, maxfn(108.833)),
1863
- l: getset('lab', 0, maxfn(100)),
1864
- a: getset('lab', 1),
1865
- b: getset('lab', 2),
1866
-
1867
- keyword(value) {
1868
- if (value !== undefined) {
1869
- return new Color(value);
1870
- }
1871
-
1872
- return colorConvert[this.model].keyword(this.color);
1873
- },
1874
-
1875
- hex(value) {
1876
- if (value !== undefined) {
1877
- return new Color(value);
1878
- }
1879
-
1880
- return colorString.to.hex(this.rgb().round().color);
1881
- },
1882
-
1883
- hexa(value) {
1884
- if (value !== undefined) {
1885
- return new Color(value);
1886
- }
1887
-
1888
- const rgbArray = this.rgb().round().color;
1889
- let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
1890
-
1891
- if (alphaHex.length === 1) {
1892
- alphaHex = '0' + alphaHex;
1893
- }
1894
-
1895
- return colorString.to.hex(rgbArray) + alphaHex;
1896
- },
1897
-
1898
- rgbNumber() {
1899
- const rgb = this.rgb().color;
1900
- return (rgb[0] & 0xFF) << 16 | (rgb[1] & 0xFF) << 8 | rgb[2] & 0xFF;
1901
- },
1902
-
1903
- luminosity() {
1904
- // http://www.w3.org/TR/WCAG20/#relativeluminancedef
1905
- const rgb = this.rgb().color;
1906
- const lum = [];
1907
-
1908
- for (const [i, element] of rgb.entries()) {
1909
- const chan = element / 255;
1910
- lum[i] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
1911
- }
1912
-
1913
- return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
1914
- },
1915
-
1916
- contrast(color2) {
1917
- // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
1918
- const lum1 = this.luminosity();
1919
- const lum2 = color2.luminosity();
1920
-
1921
- if (lum1 > lum2) {
1922
- return (lum1 + 0.05) / (lum2 + 0.05);
1923
- }
1924
-
1925
- return (lum2 + 0.05) / (lum1 + 0.05);
1926
- },
1927
-
1928
- level(color2) {
1929
- // https://www.w3.org/TR/WCAG/#contrast-enhanced
1930
- const contrastRatio = this.contrast(color2);
1931
-
1932
- if (contrastRatio >= 7) {
1933
- return 'AAA';
1934
- }
1935
-
1936
- return contrastRatio >= 4.5 ? 'AA' : '';
1937
- },
1938
-
1939
- isDark() {
1940
- // YIQ equation from http://24ways.org/2010/calculating-color-contrast
1941
- const rgb = this.rgb().color;
1942
- const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
1943
- return yiq < 128;
1944
- },
1945
-
1946
- isLight() {
1947
- return !this.isDark();
1948
- },
1949
-
1950
- negate() {
1951
- const rgb = this.rgb();
1952
-
1953
- for (let i = 0; i < 3; i++) {
1954
- rgb.color[i] = 255 - rgb.color[i];
1955
- }
1956
-
1957
- return rgb;
1958
- },
1959
-
1960
- lighten(ratio) {
1961
- const hsl = this.hsl();
1962
- hsl.color[2] += hsl.color[2] * ratio;
1963
- return hsl;
1964
- },
1965
-
1966
- darken(ratio) {
1967
- const hsl = this.hsl();
1968
- hsl.color[2] -= hsl.color[2] * ratio;
1969
- return hsl;
1970
- },
1971
-
1972
- saturate(ratio) {
1973
- const hsl = this.hsl();
1974
- hsl.color[1] += hsl.color[1] * ratio;
1975
- return hsl;
1976
- },
1977
-
1978
- desaturate(ratio) {
1979
- const hsl = this.hsl();
1980
- hsl.color[1] -= hsl.color[1] * ratio;
1981
- return hsl;
1982
- },
1983
-
1984
- whiten(ratio) {
1985
- const hwb = this.hwb();
1986
- hwb.color[1] += hwb.color[1] * ratio;
1987
- return hwb;
1988
- },
1989
-
1990
- blacken(ratio) {
1991
- const hwb = this.hwb();
1992
- hwb.color[2] += hwb.color[2] * ratio;
1993
- return hwb;
1994
- },
1995
-
1996
- grayscale() {
1997
- // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
1998
- const rgb = this.rgb().color;
1999
- const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
2000
- return Color.rgb(value, value, value);
2001
- },
2002
-
2003
- fade(ratio) {
2004
- return this.alpha(this.valpha - this.valpha * ratio);
2005
- },
2006
-
2007
- opaquer(ratio) {
2008
- return this.alpha(this.valpha + this.valpha * ratio);
2009
- },
2010
-
2011
- rotate(degrees) {
2012
- const hsl = this.hsl();
2013
- let hue = hsl.color[0];
2014
- hue = (hue + degrees) % 360;
2015
- hue = hue < 0 ? 360 + hue : hue;
2016
- hsl.color[0] = hue;
2017
- return hsl;
2018
- },
2019
-
2020
- mix(mixinColor, weight) {
2021
- // Ported from sass implementation in C
2022
- // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
2023
- if (!mixinColor || !mixinColor.rgb) {
2024
- throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
2025
- }
2026
-
2027
- const color1 = mixinColor.rgb();
2028
- const color2 = this.rgb();
2029
- const p = weight === undefined ? 0.5 : weight;
2030
- const w = 2 * p - 1;
2031
- const a = color1.alpha() - color2.alpha();
2032
- const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;
2033
- const w2 = 1 - w1;
2034
- return Color.rgb(w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p));
2035
- }
1736
+ toString() {
1737
+ return this.string();
1738
+ },
1739
+
1740
+ toJSON() {
1741
+ return this[this.model]();
1742
+ },
1743
+
1744
+ string(places) {
1745
+ let self = this.model in colorString.to ? this : this.rgb();
1746
+ self = self.round(typeof places === 'number' ? places : 1);
1747
+ const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1748
+ return colorString.to[self.model](args);
1749
+ },
1750
+
1751
+ percentString(places) {
1752
+ const self = this.rgb().round(typeof places === 'number' ? places : 1);
1753
+ const args = self.valpha === 1 ? self.color : [...self.color, this.valpha];
1754
+ return colorString.to.rgb.percent(args);
1755
+ },
1756
+
1757
+ array() {
1758
+ return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
1759
+ },
1760
+
1761
+ object() {
1762
+ const result = {};
1763
+ const {channels} = colorConvert[this.model];
1764
+ const {labels} = colorConvert[this.model];
1765
+
1766
+ for (let i = 0; i < channels; i++) {
1767
+ result[labels[i]] = this.color[i];
1768
+ }
2036
1769
 
2037
- }; // Model conversion methods and static constructors
1770
+ if (this.valpha !== 1) {
1771
+ result.alpha = this.valpha;
1772
+ }
2038
1773
 
2039
- for (const model of Object.keys(colorConvert)) {
2040
- if (skippedModels.includes(model)) {
2041
- continue;
2042
- }
1774
+ return result;
1775
+ },
1776
+
1777
+ unitArray() {
1778
+ const rgb = this.rgb().color;
1779
+ rgb[0] /= 255;
1780
+ rgb[1] /= 255;
1781
+ rgb[2] /= 255;
1782
+
1783
+ if (this.valpha !== 1) {
1784
+ rgb.push(this.valpha);
1785
+ }
1786
+
1787
+ return rgb;
1788
+ },
1789
+
1790
+ unitObject() {
1791
+ const rgb = this.rgb().object();
1792
+ rgb.r /= 255;
1793
+ rgb.g /= 255;
1794
+ rgb.b /= 255;
1795
+
1796
+ if (this.valpha !== 1) {
1797
+ rgb.alpha = this.valpha;
1798
+ }
1799
+
1800
+ return rgb;
1801
+ },
1802
+
1803
+ round(places) {
1804
+ places = Math.max(places || 0, 0);
1805
+ return new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);
1806
+ },
1807
+
1808
+ alpha(value) {
1809
+ if (value !== undefined) {
1810
+ return new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);
1811
+ }
1812
+
1813
+ return this.valpha;
1814
+ },
2043
1815
 
2044
- const {
2045
- channels
2046
- } = colorConvert[model]; // Conversion methods
1816
+ // Rgb
1817
+ red: getset('rgb', 0, maxfn(255)),
1818
+ green: getset('rgb', 1, maxfn(255)),
1819
+ blue: getset('rgb', 2, maxfn(255)),
2047
1820
 
2048
- Color.prototype[model] = function (...args) {
2049
- if (this.model === model) {
2050
- return new Color(this);
2051
- }
1821
+ hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),
2052
1822
 
2053
- if (args.length > 0) {
2054
- return new Color(args, model);
2055
- }
1823
+ saturationl: getset('hsl', 1, maxfn(100)),
1824
+ lightness: getset('hsl', 2, maxfn(100)),
2056
1825
 
2057
- return new Color([...assertArray(colorConvert[this.model][model].raw(this.color)), this.valpha], model);
2058
- }; // 'static' construction methods
1826
+ saturationv: getset('hsv', 1, maxfn(100)),
1827
+ value: getset('hsv', 2, maxfn(100)),
2059
1828
 
1829
+ chroma: getset('hcg', 1, maxfn(100)),
1830
+ gray: getset('hcg', 2, maxfn(100)),
2060
1831
 
2061
- Color[model] = function (...args) {
2062
- let color = args[0];
1832
+ white: getset('hwb', 1, maxfn(100)),
1833
+ wblack: getset('hwb', 2, maxfn(100)),
2063
1834
 
2064
- if (typeof color === 'number') {
2065
- color = zeroArray(args, channels);
2066
- }
1835
+ cyan: getset('cmyk', 0, maxfn(100)),
1836
+ magenta: getset('cmyk', 1, maxfn(100)),
1837
+ yellow: getset('cmyk', 2, maxfn(100)),
1838
+ black: getset('cmyk', 3, maxfn(100)),
1839
+
1840
+ x: getset('xyz', 0, maxfn(95.047)),
1841
+ y: getset('xyz', 1, maxfn(100)),
1842
+ z: getset('xyz', 2, maxfn(108.833)),
1843
+
1844
+ l: getset('lab', 0, maxfn(100)),
1845
+ a: getset('lab', 1),
1846
+ b: getset('lab', 2),
1847
+
1848
+ keyword(value) {
1849
+ if (value !== undefined) {
1850
+ return new Color(value);
1851
+ }
1852
+
1853
+ return colorConvert[this.model].keyword(this.color);
1854
+ },
1855
+
1856
+ hex(value) {
1857
+ if (value !== undefined) {
1858
+ return new Color(value);
1859
+ }
2067
1860
 
2068
- return new Color(color, model);
2069
- };
1861
+ return colorString.to.hex(this.rgb().round().color);
1862
+ },
1863
+
1864
+ hexa(value) {
1865
+ if (value !== undefined) {
1866
+ return new Color(value);
1867
+ }
1868
+
1869
+ const rgbArray = this.rgb().round().color;
1870
+
1871
+ let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
1872
+ if (alphaHex.length === 1) {
1873
+ alphaHex = '0' + alphaHex;
1874
+ }
1875
+
1876
+ return colorString.to.hex(rgbArray) + alphaHex;
1877
+ },
1878
+
1879
+ rgbNumber() {
1880
+ const rgb = this.rgb().color;
1881
+ return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);
1882
+ },
1883
+
1884
+ luminosity() {
1885
+ // http://www.w3.org/TR/WCAG20/#relativeluminancedef
1886
+ const rgb = this.rgb().color;
1887
+
1888
+ const lum = [];
1889
+ for (const [i, element] of rgb.entries()) {
1890
+ const chan = element / 255;
1891
+ lum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
1892
+ }
1893
+
1894
+ return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
1895
+ },
1896
+
1897
+ contrast(color2) {
1898
+ // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
1899
+ const lum1 = this.luminosity();
1900
+ const lum2 = color2.luminosity();
1901
+
1902
+ if (lum1 > lum2) {
1903
+ return (lum1 + 0.05) / (lum2 + 0.05);
1904
+ }
1905
+
1906
+ return (lum2 + 0.05) / (lum1 + 0.05);
1907
+ },
1908
+
1909
+ level(color2) {
1910
+ // https://www.w3.org/TR/WCAG/#contrast-enhanced
1911
+ const contrastRatio = this.contrast(color2);
1912
+ if (contrastRatio >= 7) {
1913
+ return 'AAA';
1914
+ }
1915
+
1916
+ return (contrastRatio >= 4.5) ? 'AA' : '';
1917
+ },
1918
+
1919
+ isDark() {
1920
+ // YIQ equation from http://24ways.org/2010/calculating-color-contrast
1921
+ const rgb = this.rgb().color;
1922
+ const yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;
1923
+ return yiq < 128;
1924
+ },
1925
+
1926
+ isLight() {
1927
+ return !this.isDark();
1928
+ },
1929
+
1930
+ negate() {
1931
+ const rgb = this.rgb();
1932
+ for (let i = 0; i < 3; i++) {
1933
+ rgb.color[i] = 255 - rgb.color[i];
1934
+ }
1935
+
1936
+ return rgb;
1937
+ },
1938
+
1939
+ lighten(ratio) {
1940
+ const hsl = this.hsl();
1941
+ hsl.color[2] += hsl.color[2] * ratio;
1942
+ return hsl;
1943
+ },
1944
+
1945
+ darken(ratio) {
1946
+ const hsl = this.hsl();
1947
+ hsl.color[2] -= hsl.color[2] * ratio;
1948
+ return hsl;
1949
+ },
1950
+
1951
+ saturate(ratio) {
1952
+ const hsl = this.hsl();
1953
+ hsl.color[1] += hsl.color[1] * ratio;
1954
+ return hsl;
1955
+ },
1956
+
1957
+ desaturate(ratio) {
1958
+ const hsl = this.hsl();
1959
+ hsl.color[1] -= hsl.color[1] * ratio;
1960
+ return hsl;
1961
+ },
1962
+
1963
+ whiten(ratio) {
1964
+ const hwb = this.hwb();
1965
+ hwb.color[1] += hwb.color[1] * ratio;
1966
+ return hwb;
1967
+ },
1968
+
1969
+ blacken(ratio) {
1970
+ const hwb = this.hwb();
1971
+ hwb.color[2] += hwb.color[2] * ratio;
1972
+ return hwb;
1973
+ },
1974
+
1975
+ grayscale() {
1976
+ // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
1977
+ const rgb = this.rgb().color;
1978
+ const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
1979
+ return Color.rgb(value, value, value);
1980
+ },
1981
+
1982
+ fade(ratio) {
1983
+ return this.alpha(this.valpha - (this.valpha * ratio));
1984
+ },
1985
+
1986
+ opaquer(ratio) {
1987
+ return this.alpha(this.valpha + (this.valpha * ratio));
1988
+ },
1989
+
1990
+ rotate(degrees) {
1991
+ const hsl = this.hsl();
1992
+ let hue = hsl.color[0];
1993
+ hue = (hue + degrees) % 360;
1994
+ hue = hue < 0 ? 360 + hue : hue;
1995
+ hsl.color[0] = hue;
1996
+ return hsl;
1997
+ },
1998
+
1999
+ mix(mixinColor, weight) {
2000
+ // Ported from sass implementation in C
2001
+ // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
2002
+ if (!mixinColor || !mixinColor.rgb) {
2003
+ throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
2004
+ }
2005
+
2006
+ const color1 = mixinColor.rgb();
2007
+ const color2 = this.rgb();
2008
+ const p = weight === undefined ? 0.5 : weight;
2009
+
2010
+ const w = 2 * p - 1;
2011
+ const a = color1.alpha() - color2.alpha();
2012
+
2013
+ const w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;
2014
+ const w2 = 1 - w1;
2015
+
2016
+ return Color.rgb(
2017
+ w1 * color1.red() + w2 * color2.red(),
2018
+ w1 * color1.green() + w2 * color2.green(),
2019
+ w1 * color1.blue() + w2 * color2.blue(),
2020
+ color1.alpha() * p + color2.alpha() * (1 - p));
2021
+ },
2022
+ };
2023
+
2024
+ // Model conversion methods and static constructors
2025
+ for (const model of Object.keys(colorConvert)) {
2026
+ if (skippedModels.includes(model)) {
2027
+ continue;
2028
+ }
2029
+
2030
+ const {channels} = colorConvert[model];
2031
+
2032
+ // Conversion methods
2033
+ Color.prototype[model] = function (...args) {
2034
+ if (this.model === model) {
2035
+ return new Color(this);
2036
+ }
2037
+
2038
+ if (args.length > 0) {
2039
+ return new Color(args, model);
2040
+ }
2041
+
2042
+ return new Color([...assertArray(colorConvert[this.model][model].raw(this.color)), this.valpha], model);
2043
+ };
2044
+
2045
+ // 'static' construction methods
2046
+ Color[model] = function (...args) {
2047
+ let color = args[0];
2048
+ if (typeof color === 'number') {
2049
+ color = zeroArray(args, channels);
2050
+ }
2051
+
2052
+ return new Color(color, model);
2053
+ };
2070
2054
  }
2071
2055
 
2072
2056
  function roundTo(number, places) {
2073
- return Number(number.toFixed(places));
2057
+ return Number(number.toFixed(places));
2074
2058
  }
2075
2059
 
2076
2060
  function roundToPlace(places) {
2077
- return function (number) {
2078
- return roundTo(number, places);
2079
- };
2061
+ return function (number) {
2062
+ return roundTo(number, places);
2063
+ };
2080
2064
  }
2081
2065
 
2082
2066
  function getset(model, channel, modifier) {
2083
- model = Array.isArray(model) ? model : [model];
2067
+ model = Array.isArray(model) ? model : [model];
2084
2068
 
2085
- for (const m of model) {
2086
- (limiters[m] || (limiters[m] = []))[channel] = modifier;
2087
- }
2069
+ for (const m of model) {
2070
+ (limiters[m] || (limiters[m] = []))[channel] = modifier;
2071
+ }
2088
2072
 
2089
- model = model[0];
2090
- return function (value) {
2091
- let result;
2073
+ model = model[0];
2092
2074
 
2093
- if (value !== undefined) {
2094
- if (modifier) {
2095
- value = modifier(value);
2096
- }
2075
+ return function (value) {
2076
+ let result;
2097
2077
 
2098
- result = this[model]();
2099
- result.color[channel] = value;
2100
- return result;
2101
- }
2078
+ if (value !== undefined) {
2079
+ if (modifier) {
2080
+ value = modifier(value);
2081
+ }
2102
2082
 
2103
- result = this[model]().color[channel];
2083
+ result = this[model]();
2084
+ result.color[channel] = value;
2085
+ return result;
2086
+ }
2104
2087
 
2105
- if (modifier) {
2106
- result = modifier(result);
2107
- }
2088
+ result = this[model]().color[channel];
2089
+ if (modifier) {
2090
+ result = modifier(result);
2091
+ }
2108
2092
 
2109
- return result;
2110
- };
2093
+ return result;
2094
+ };
2111
2095
  }
2112
2096
 
2113
2097
  function maxfn(max) {
2114
- return function (v) {
2115
- return Math.max(0, Math.min(max, v));
2116
- };
2098
+ return function (v) {
2099
+ return Math.max(0, Math.min(max, v));
2100
+ };
2117
2101
  }
2118
2102
 
2119
2103
  function assertArray(value) {
2120
- return Array.isArray(value) ? value : [value];
2104
+ return Array.isArray(value) ? value : [value];
2121
2105
  }
2122
2106
 
2123
2107
  function zeroArray(array, length) {
2124
- for (let i = 0; i < length; i++) {
2125
- if (typeof array[i] !== 'number') {
2126
- array[i] = 0;
2127
- }
2128
- }
2108
+ for (let i = 0; i < length; i++) {
2109
+ if (typeof array[i] !== 'number') {
2110
+ array[i] = 0;
2111
+ }
2112
+ }
2129
2113
 
2130
- return array;
2114
+ return array;
2131
2115
  }
2132
2116
 
2133
2117
  var color = Color;