@esri/calcite-components 1.0.0-beta.80 → 1.0.0-beta.83

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 (1227) hide show
  1. package/dist/calcite/assets/date-picker/nls/ru.json +4 -4
  2. package/dist/calcite/assets/icon/compactness16.json +1 -0
  3. package/dist/calcite/assets/icon/compactness24.json +1 -0
  4. package/dist/calcite/assets/icon/compactness32.json +1 -0
  5. package/dist/calcite/assets/icon/configure16.json +1 -0
  6. package/dist/calcite/assets/icon/configure24.json +1 -0
  7. package/dist/calcite/assets/icon/configure32.json +1 -0
  8. package/dist/calcite/assets/icon/debugScript16.json +1 -0
  9. package/dist/calcite/assets/icon/debugScript24.json +1 -0
  10. package/dist/calcite/assets/icon/debugScript32.json +1 -0
  11. package/dist/calcite/assets/icon/dissolveFeatures16.json +1 -0
  12. package/dist/calcite/assets/icon/dissolveFeatures24.json +1 -0
  13. package/dist/calcite/assets/icon/dissolveFeatures32.json +1 -0
  14. package/dist/calcite/assets/icon/distanceType16.json +1 -0
  15. package/dist/calcite/assets/icon/distanceType24.json +1 -0
  16. package/dist/calcite/assets/icon/distanceType32.json +1 -0
  17. package/dist/calcite/assets/icon/fileEcd16.json +1 -0
  18. package/dist/calcite/assets/icon/fileEcd24.json +1 -0
  19. package/dist/calcite/assets/icon/fileEcd32.json +1 -0
  20. package/dist/calcite/assets/icon/gridDiamond16.json +1 -0
  21. package/dist/calcite/assets/icon/gridDiamond24.json +1 -0
  22. package/dist/calcite/assets/icon/gridDiamond32.json +1 -0
  23. package/dist/calcite/assets/icon/gridHexagon16.json +1 -0
  24. package/dist/calcite/assets/icon/gridHexagon24.json +1 -0
  25. package/dist/calcite/assets/icon/gridHexagon32.json +1 -0
  26. package/dist/calcite/assets/icon/gridTriangle16.json +1 -0
  27. package/dist/calcite/assets/icon/gridTriangle24.json +1 -0
  28. package/dist/calcite/assets/icon/gridTriangle32.json +1 -0
  29. package/dist/calcite/assets/icon/insets16.json +1 -0
  30. package/dist/calcite/assets/icon/insets24.json +1 -0
  31. package/dist/calcite/assets/icon/insets32.json +1 -0
  32. package/dist/calcite/assets/icon/listCheckAll16.json +1 -0
  33. package/dist/calcite/assets/icon/listCheckAll24.json +1 -0
  34. package/dist/calcite/assets/icon/listCheckAll32.json +1 -0
  35. package/dist/calcite/assets/icon/ltrElementsAlign16.json +1 -0
  36. package/dist/calcite/assets/icon/ltrElementsAlign24.json +1 -0
  37. package/dist/calcite/assets/icon/ltrElementsAlign32.json +1 -0
  38. package/dist/calcite/assets/icon/ltrParagraphAlign16.json +1 -0
  39. package/dist/calcite/assets/icon/ltrParagraphAlign24.json +1 -0
  40. package/dist/calcite/assets/icon/ltrParagraphAlign32.json +1 -0
  41. package/dist/calcite/assets/icon/maximumTerritoryDistance16.json +1 -0
  42. package/dist/calcite/assets/icon/maximumTerritoryDistance24.json +1 -0
  43. package/dist/calcite/assets/icon/maximumTerritoryDistance32.json +1 -0
  44. package/dist/calcite/assets/icon/minDistanceBetweenCenters16.json +1 -0
  45. package/dist/calcite/assets/icon/minDistanceBetweenCenters24.json +1 -0
  46. package/dist/calcite/assets/icon/minDistanceBetweenCenters32.json +1 -0
  47. package/dist/calcite/assets/icon/numberOfTerritories16.json +1 -0
  48. package/dist/calcite/assets/icon/numberOfTerritories24.json +1 -0
  49. package/dist/calcite/assets/icon/numberOfTerritories32.json +1 -0
  50. package/dist/calcite/assets/icon/overlapFeatures16.json +1 -0
  51. package/dist/calcite/assets/icon/overlapFeatures24.json +1 -0
  52. package/dist/calcite/assets/icon/overlapFeatures32.json +1 -0
  53. package/dist/calcite/assets/icon/profileVariables16.json +1 -0
  54. package/dist/calcite/assets/icon/profileVariables24.json +1 -0
  55. package/dist/calcite/assets/icon/profileVariables32.json +1 -0
  56. package/dist/calcite/assets/icon/rangefinder16.json +1 -0
  57. package/dist/calcite/assets/icon/rangefinder24.json +1 -0
  58. package/dist/calcite/assets/icon/rangefinder32.json +1 -0
  59. package/dist/calcite/assets/icon/rasterAnalysis16.json +1 -0
  60. package/dist/calcite/assets/icon/rasterAnalysis24.json +1 -0
  61. package/dist/calcite/assets/icon/rasterAnalysis32.json +1 -0
  62. package/dist/calcite/assets/icon/recurrence16.json +1 -0
  63. package/dist/calcite/assets/icon/recurrence24.json +1 -0
  64. package/dist/calcite/assets/icon/recurrence32.json +1 -0
  65. package/dist/calcite/assets/icon/rfid16.json +1 -0
  66. package/dist/calcite/assets/icon/rfid24.json +1 -0
  67. package/dist/calcite/assets/icon/rfid32.json +1 -0
  68. package/dist/calcite/assets/icon/rtlElementsAlign16.json +1 -0
  69. package/dist/calcite/assets/icon/rtlElementsAlign24.json +1 -0
  70. package/dist/calcite/assets/icon/rtlElementsAlign32.json +1 -0
  71. package/dist/calcite/assets/icon/rtlParagraphAlign16.json +1 -0
  72. package/dist/calcite/assets/icon/rtlParagraphAlign24.json +1 -0
  73. package/dist/calcite/assets/icon/rtlParagraphAlign32.json +1 -0
  74. package/dist/calcite/assets/icon/splitFeatures16.json +1 -0
  75. package/dist/calcite/assets/icon/splitFeatures24.json +1 -0
  76. package/dist/calcite/assets/icon/splitFeatures32.json +1 -0
  77. package/dist/calcite/assets/icon/territoryBufferDistance16.json +1 -0
  78. package/dist/calcite/assets/icon/territoryBufferDistance24.json +1 -0
  79. package/dist/calcite/assets/icon/territoryBufferDistance32.json +1 -0
  80. package/dist/calcite/assets/icon/testData16.json +1 -0
  81. package/dist/calcite/assets/icon/testData24.json +1 -0
  82. package/dist/calcite/assets/icon/testData32.json +1 -0
  83. package/dist/calcite/calcite.css +1 -1
  84. package/dist/calcite/calcite.esm.js +2 -1
  85. package/dist/calcite/calcite.js +1 -1
  86. package/dist/calcite/index.esm.js +1 -0
  87. package/dist/calcite/p-004e3dc9.js +6 -0
  88. package/dist/calcite/p-07587a94.system.entry.js +6 -0
  89. package/dist/calcite/{p-e66a8ca1.system.entry.js → p-0804ce36.system.entry.js} +3 -2
  90. package/dist/calcite/{p-9385e4b4.system.js → p-08b6213a.system.js} +2 -1
  91. package/dist/calcite/{p-9ac86d6a.entry.js → p-0cbdfc7e.entry.js} +2 -1
  92. package/dist/calcite/p-0d37d621.system.entry.js +6 -0
  93. package/dist/calcite/p-0e1c259f.system.entry.js +6 -0
  94. package/dist/calcite/p-0f41fb58.entry.js +6 -0
  95. package/dist/calcite/p-0fc84480.js +6 -0
  96. package/dist/calcite/p-132b60fd.system.entry.js +6 -0
  97. package/dist/calcite/p-1571ede3.system.entry.js +6 -0
  98. package/dist/calcite/{p-c2adeae4.entry.js → p-1755cd6f.entry.js} +2 -1
  99. package/dist/calcite/{p-6a541e77.system.js → p-191d0802.system.js} +2 -1
  100. package/dist/calcite/p-1a07da7e.system.js +6 -0
  101. package/dist/calcite/{p-b2493735.entry.js → p-1a5fc48b.entry.js} +2 -1
  102. package/dist/calcite/{p-4de6f4fd.system.js → p-1ba93966.system.js} +1 -0
  103. package/dist/calcite/{p-5958acc8.system.js → p-1bc2d58d.system.js} +1 -0
  104. package/dist/calcite/{p-5394666a.entry.js → p-1eb6cfb5.entry.js} +2 -1
  105. package/dist/calcite/p-1f94715e.entry.js +6 -0
  106. package/dist/calcite/p-2111668f.system.entry.js +6 -0
  107. package/dist/calcite/{p-5802a565.entry.js → p-23188966.entry.js} +2 -1
  108. package/dist/calcite/p-24edad61.entry.js +6 -0
  109. package/dist/calcite/p-25fd5141.entry.js +6 -0
  110. package/dist/calcite/p-2609d345.system.entry.js +6 -0
  111. package/dist/calcite/{p-052ba882.system.entry.js → p-26526a6d.system.entry.js} +2 -1
  112. package/dist/calcite/{p-8a7596e3.entry.js → p-2778cb53.entry.js} +2 -1
  113. package/dist/calcite/p-2785ecb9.system.js +6 -0
  114. package/dist/calcite/{p-6b5776af.js → p-292c567d.js} +1 -0
  115. package/dist/calcite/{p-7fc69a9d.js → p-2c974b60.js} +1 -0
  116. package/dist/calcite/{p-03c92ad2.entry.js → p-2e57803f.entry.js} +2 -1
  117. package/dist/calcite/{p-ac4aec20.system.js → p-2f82a677.system.js} +1 -0
  118. package/dist/calcite/p-2fcac2cf.system.entry.js +6 -0
  119. package/dist/calcite/p-2fd30fee.entry.js +6 -0
  120. package/dist/calcite/{p-1aded388.system.entry.js → p-358cba5a.system.entry.js} +2 -1
  121. package/dist/calcite/p-37c23e83.system.entry.js +6 -0
  122. package/dist/calcite/p-3962123d.system.entry.js +6 -0
  123. package/dist/calcite/{p-079a3322.js → p-3981a495.js} +1 -0
  124. package/dist/calcite/p-3a256056.entry.js +6 -0
  125. package/dist/calcite/{p-a11ee541.system.entry.js → p-3b54c4a0.system.entry.js} +2 -1
  126. package/dist/calcite/p-3d4548a9.js +6 -0
  127. package/dist/calcite/p-3f00dc7c.entry.js +6 -0
  128. package/dist/calcite/p-3f80afb9.system.entry.js +6 -0
  129. package/dist/calcite/p-41b0a2a1.system.js +6 -0
  130. package/dist/calcite/p-4214c119.system.entry.js +6 -0
  131. package/dist/calcite/p-45b6d321.entry.js +6 -0
  132. package/dist/calcite/p-4620ae05.entry.js +6 -0
  133. package/dist/calcite/p-462cefe9.system.entry.js +6 -0
  134. package/dist/calcite/{p-e095517f.system.js → p-46d30c39.system.js} +1 -0
  135. package/dist/calcite/p-476e276f.entry.js +6 -0
  136. package/dist/calcite/p-47bf0f7d.entry.js +6 -0
  137. package/dist/calcite/p-47dd3632.entry.js +6 -0
  138. package/dist/calcite/p-4a88016c.system.entry.js +6 -0
  139. package/dist/calcite/{p-bd38ff21.js → p-4effc6db.js} +1 -0
  140. package/dist/calcite/p-4f71c68d.js +6 -0
  141. package/dist/calcite/p-4f82d10a.system.entry.js +6 -0
  142. package/dist/calcite/{p-ef17447d.system.entry.js → p-506f5631.system.entry.js} +2 -1
  143. package/dist/calcite/p-515e5f7e.system.entry.js +6 -0
  144. package/dist/calcite/p-5207385b.system.entry.js +6 -0
  145. package/dist/calcite/p-53b147dc.system.entry.js +6 -0
  146. package/dist/calcite/{p-7ed4c551.system.js → p-57ccba45.system.js} +1 -0
  147. package/dist/calcite/{p-5bb4d012.entry.js → p-5904a047.entry.js} +2 -1
  148. package/dist/calcite/{p-97904e9a.entry.js → p-59122590.entry.js} +2 -1
  149. package/dist/calcite/p-59aae748.entry.js +6 -0
  150. package/dist/calcite/{p-b9a38a28.system.entry.js → p-5ae3ce21.system.entry.js} +2 -1
  151. package/dist/calcite/{p-05bf835f.js → p-5afb0fbb.js} +2 -1
  152. package/dist/calcite/p-5b60d64c.system.entry.js +6 -0
  153. package/dist/calcite/p-5df0640c.system.entry.js +6 -0
  154. package/dist/calcite/p-5e07a875.system.entry.js +6 -0
  155. package/dist/calcite/p-5eb016b6.system.entry.js +6 -0
  156. package/dist/calcite/p-61483431.system.entry.js +6 -0
  157. package/dist/calcite/p-623f6224.entry.js +6 -0
  158. package/dist/calcite/{p-3e9d96c6.system.entry.js → p-636e43ac.system.entry.js} +2 -1
  159. package/dist/calcite/p-63d2bcec.system.entry.js +6 -0
  160. package/dist/calcite/p-64384786.entry.js +6 -0
  161. package/dist/calcite/p-6531fb85.entry.js +6 -0
  162. package/dist/calcite/p-67af4998.entry.js +6 -0
  163. package/dist/calcite/p-67ef236d.entry.js +6 -0
  164. package/dist/calcite/{p-cb57638c.system.js → p-68e3013f.system.js} +2 -1
  165. package/dist/calcite/p-6a966c2f.entry.js +6 -0
  166. package/dist/calcite/{p-02d7cf64.system.entry.js → p-6bcb5a71.system.entry.js} +2 -1
  167. package/dist/calcite/p-6d41e372.system.entry.js +6 -0
  168. package/dist/calcite/p-717fac51.entry.js +6 -0
  169. package/dist/calcite/p-773b540e.system.entry.js +6 -0
  170. package/dist/calcite/{p-e020662f.system.js → p-77762ff3.system.js} +1 -0
  171. package/dist/calcite/p-78f2801c.entry.js +6 -0
  172. package/dist/calcite/p-799f79af.entry.js +6 -0
  173. package/dist/calcite/{p-2d09cc25.js → p-7a8cddad.js} +1 -0
  174. package/dist/calcite/p-7a95bbeb.entry.js +6 -0
  175. package/dist/calcite/p-7bbfe1a2.system.entry.js +6 -0
  176. package/dist/calcite/p-7d8fe7b3.system.entry.js +6 -0
  177. package/dist/calcite/p-7e576c74.system.entry.js +6 -0
  178. package/dist/calcite/p-800a9250.entry.js +6 -0
  179. package/dist/calcite/p-834f407d.system.entry.js +6 -0
  180. package/dist/calcite/p-85a769d3.system.entry.js +6 -0
  181. package/dist/calcite/p-878d7c09.system.js +6 -0
  182. package/dist/calcite/{p-4570cf6c.js → p-8dfe7af3.js} +2 -1
  183. package/dist/calcite/p-8e2129c6.system.entry.js +6 -0
  184. package/dist/calcite/p-900fd30e.js +6 -0
  185. package/dist/calcite/{p-eb3c084f.system.entry.js → p-912c9e61.system.entry.js} +2 -1
  186. package/dist/calcite/p-940ac25d.system.entry.js +6 -0
  187. package/dist/calcite/p-9634f60d.entry.js +6 -0
  188. package/dist/calcite/{p-a7770d75.entry.js → p-98dc9493.entry.js} +2 -1
  189. package/dist/calcite/{p-65dbbfb5.system.js → p-994d99ff.system.js} +3 -1
  190. package/dist/calcite/{p-7432e5ef.system.entry.js → p-9ba769e3.system.entry.js} +2 -1
  191. package/dist/calcite/{p-7bee4942.system.entry.js → p-9c85d763.system.entry.js} +2 -1
  192. package/dist/calcite/p-9d3f8b0c.system.entry.js +6 -0
  193. package/dist/calcite/p-9ea395ee.js +6 -0
  194. package/dist/calcite/p-a1118db1.entry.js +6 -0
  195. package/dist/calcite/p-a1176eac.system.entry.js +6 -0
  196. package/dist/calcite/p-a3e19cec.entry.js +6 -0
  197. package/dist/calcite/{p-8e0dd0af.system.entry.js → p-a5fd7a87.system.entry.js} +2 -1
  198. package/dist/calcite/p-a73419ab.js +6 -0
  199. package/dist/calcite/{p-3119ffce.system.js → p-a75ad7cb.system.js} +1 -0
  200. package/dist/calcite/p-a81ad35a.entry.js +6 -0
  201. package/dist/calcite/p-a945b681.system.js +6 -0
  202. package/dist/calcite/{p-7b8707b2.system.js → p-acafe8ca.system.js} +1 -0
  203. package/dist/calcite/p-adc2b773.entry.js +6 -0
  204. package/dist/calcite/{p-63624a01.js → p-ae6f5622.js} +1 -0
  205. package/dist/calcite/{p-1d6404b5.system.js → p-ba349f22.system.js} +1 -0
  206. package/dist/calcite/p-c1548c19.js +6 -0
  207. package/dist/calcite/p-c470cecf.entry.js +6 -0
  208. package/dist/calcite/p-c5eec108.entry.js +6 -0
  209. package/dist/calcite/{p-f344e163.entry.js → p-c84f0dec.entry.js} +2 -1
  210. package/dist/calcite/p-c86b91ca.entry.js +6 -0
  211. package/dist/calcite/{p-3c34f20d.system.js → p-c96917cb.system.js} +2 -1
  212. package/dist/calcite/p-caea0782.js +7 -0
  213. package/dist/calcite/p-cbe3c2c0.entry.js +6 -0
  214. package/dist/calcite/p-ccb27d44.system.entry.js +6 -0
  215. package/dist/calcite/{p-b06207bb.js → p-ccb5a784.js} +1 -0
  216. package/dist/calcite/p-d1d05643.entry.js +6 -0
  217. package/dist/calcite/p-d901c470.system.js +12 -0
  218. package/dist/calcite/p-db63dc35.system.entry.js +6 -0
  219. package/dist/calcite/p-dc10e8bb.system.entry.js +6 -0
  220. package/dist/calcite/p-ddb96773.system.js +6 -0
  221. package/dist/calcite/{p-cafd98e8.entry.js → p-df419c8b.entry.js} +2 -1
  222. package/dist/calcite/p-e0ff045a.js +6 -0
  223. package/dist/calcite/{p-1fc943d5.system.entry.js → p-e117fad1.system.entry.js} +2 -1
  224. package/dist/calcite/{p-c51699d3.system.js → p-e3076302.system.js} +2 -1
  225. package/dist/calcite/p-e321018b.js +12 -0
  226. package/dist/calcite/p-e6ef10e2.js +6 -0
  227. package/dist/calcite/p-e7336cab.entry.js +6 -0
  228. package/dist/calcite/{p-482885ae.system.entry.js → p-e9e34c7f.system.entry.js} +2 -1
  229. package/dist/calcite/p-ed0608ea.system.entry.js +6 -0
  230. package/dist/calcite/p-eda11878.entry.js +6 -0
  231. package/dist/calcite/{p-8ab345f2.js → p-edf3436f.js} +2 -1
  232. package/dist/calcite/p-ee47a382.system.entry.js +6 -0
  233. package/dist/calcite/p-ee8f8d7e.entry.js +6 -0
  234. package/dist/calcite/{p-cc6e7726.entry.js → p-ef4ca55d.entry.js} +2 -1
  235. package/dist/calcite/p-f1935a52.entry.js +6 -0
  236. package/dist/calcite/p-f313806e.entry.js +6 -0
  237. package/dist/calcite/p-f39d0565.system.entry.js +6 -0
  238. package/dist/calcite/{p-0a5d059d.js → p-f46cf640.js} +1 -0
  239. package/dist/calcite/{p-8a63221d.js → p-f54288ad.js} +1 -0
  240. package/dist/calcite/{p-a117af56.system.js → p-f7546789.system.js} +1 -0
  241. package/dist/calcite/p-f828bc9b.entry.js +6 -0
  242. package/dist/calcite/p-f850e63f.system.js +6 -0
  243. package/dist/calcite/{p-f68725d7.entry.js → p-f91e835d.entry.js} +2 -1
  244. package/dist/calcite/{p-f78023f1.system.js → p-f9687b03.system.js} +1 -0
  245. package/dist/calcite/p-f96d2623.system.entry.js +6 -0
  246. package/dist/calcite/{p-3b4662a5.entry.js → p-faaa959a.entry.js} +2 -1
  247. package/dist/calcite/p-fba2fa9f.system.js +6 -0
  248. package/dist/calcite/{p-78bc502f.entry.js → p-fd5a2277.entry.js} +2 -1
  249. package/dist/calcite/{p-18be4438.entry.js → p-fd70b6c1.entry.js} +2 -1
  250. package/dist/calcite/p-feb71776.system.entry.js +6 -0
  251. package/dist/cjs/{ExpandToggle-f7682a15.js → ExpandToggle-988c63cd.js} +9 -6
  252. package/dist/cjs/{Heading-ec707493.js → Heading-19d7669b.js} +2 -1
  253. package/dist/cjs/{array-a5dedf5a.js → array-d5bca414.js} +1 -0
  254. package/dist/cjs/calcite-accordion_2.cjs.entry.js +24 -17
  255. package/dist/cjs/calcite-action-bar.cjs.entry.js +17 -11
  256. package/dist/cjs/calcite-action-group.cjs.entry.js +8 -7
  257. package/dist/cjs/calcite-action-menu.cjs.entry.js +28 -23
  258. package/dist/cjs/calcite-action-pad.cjs.entry.js +15 -10
  259. package/dist/cjs/calcite-action.cjs.entry.js +11 -6
  260. package/dist/cjs/calcite-alert.cjs.entry.js +18 -14
  261. package/dist/cjs/calcite-avatar.cjs.entry.js +11 -5
  262. package/dist/cjs/calcite-block_2.cjs.entry.js +32 -15
  263. package/dist/cjs/calcite-button.cjs.entry.js +24 -20
  264. package/dist/cjs/calcite-card.cjs.entry.js +23 -13
  265. package/dist/cjs/calcite-checkbox.cjs.entry.js +11 -9
  266. package/dist/cjs/calcite-chip.cjs.entry.js +16 -12
  267. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +1417 -1389
  268. package/dist/cjs/calcite-combobox_3.cjs.entry.js +105 -58
  269. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +117 -44
  270. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +89 -48
  271. package/dist/cjs/calcite-fab.cjs.entry.js +6 -4
  272. package/dist/cjs/calcite-filter.cjs.entry.js +28 -21
  273. package/dist/cjs/calcite-flow.cjs.entry.js +13 -18
  274. package/dist/cjs/calcite-graph_2.cjs.entry.js +123 -48
  275. package/dist/cjs/calcite-handle.cjs.entry.js +7 -4
  276. package/dist/cjs/calcite-icon.cjs.entry.js +10 -5
  277. package/dist/cjs/calcite-inline-editable.cjs.entry.js +23 -18
  278. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +82 -32
  279. package/dist/cjs/calcite-input-message.cjs.entry.js +5 -4
  280. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +90 -42
  281. package/dist/cjs/calcite-input.cjs.entry.js +76 -47
  282. package/dist/cjs/calcite-label.cjs.entry.js +7 -5
  283. package/dist/cjs/calcite-link.cjs.entry.js +8 -6
  284. package/dist/cjs/calcite-list_3.cjs.entry.js +21 -14
  285. package/dist/cjs/calcite-loader.cjs.entry.js +11 -8
  286. package/dist/cjs/calcite-modal.cjs.entry.js +31 -21
  287. package/dist/cjs/calcite-notice.cjs.entry.js +17 -14
  288. package/dist/cjs/calcite-option_3.cjs.entry.js +14 -13
  289. package/dist/cjs/calcite-pagination.cjs.entry.js +91 -5
  290. package/dist/cjs/calcite-panel.cjs.entry.js +44 -13
  291. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +33 -23
  292. package/dist/cjs/calcite-popover_2.cjs.entry.js +162 -56
  293. package/dist/cjs/calcite-progress.cjs.entry.js +2 -1
  294. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -2
  295. package/dist/cjs/calcite-radio-button.cjs.entry.js +13 -9
  296. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +12 -11
  297. package/dist/cjs/calcite-rating.cjs.entry.js +14 -9
  298. package/dist/cjs/calcite-scrim.cjs.entry.js +5 -2
  299. package/dist/cjs/calcite-shell_3.cjs.entry.js +10 -8
  300. package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -4
  301. package/dist/cjs/calcite-split-button.cjs.entry.js +9 -5
  302. package/dist/cjs/calcite-stepper_2.cjs.entry.js +140 -117
  303. package/dist/cjs/calcite-switch.cjs.entry.js +13 -9
  304. package/dist/cjs/calcite-tab_4.cjs.entry.js +122 -81
  305. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +6 -5
  306. package/dist/cjs/calcite-tile.cjs.entry.js +9 -7
  307. package/dist/cjs/calcite-tip_3.cjs.entry.js +13 -10
  308. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +188 -144
  309. package/dist/cjs/calcite-tree_2.cjs.entry.js +33 -21
  310. package/dist/cjs/calcite-value-list_2.cjs.entry.js +40 -31
  311. package/dist/cjs/calcite.cjs.js +4 -3
  312. package/dist/cjs/{conditionalSlot-64f9bfd3.js → conditionalSlot-462ae1f4.js} +7 -2
  313. package/dist/cjs/{debounce-95979061.js → debounce-5127bc67.js} +1 -0
  314. package/dist/cjs/{dom-f3df220d.js → dom-b0904219.js} +28 -2
  315. package/dist/cjs/{forIn-a5d553af.js → forIn-265c8eb3.js} +2 -1
  316. package/dist/cjs/{form-0ef859c8.js → form-4c32a5c7.js} +36 -2
  317. package/dist/cjs/{guid-b270f0db.js → guid-8af0f93c.js} +1 -0
  318. package/dist/cjs/{index-1af0efd3.js → index-82ee13f7.js} +7 -7
  319. package/dist/cjs/index.cjs.js +1 -0
  320. package/dist/cjs/{interactive-87406231.js → interactive-15f9fd28.js} +7 -3
  321. package/dist/cjs/{interfaces-7216af30.js → interfaces-86334104.js} +1 -0
  322. package/dist/cjs/{label-980508de.js → label-131d9cce.js} +26 -18
  323. package/dist/cjs/loader.cjs.js +4 -3
  324. package/dist/cjs/{locale-02462821.js → locale-6c28abd8.js} +31 -28
  325. package/dist/cjs/{math-145c80e2.js → math-2f83830f.js} +1 -0
  326. package/dist/cjs/{number-e813e801.js → number-6f1151e7.js} +2 -1
  327. package/dist/cjs/{observers-79bfb8bc.js → observers-f672f664.js} +1 -0
  328. package/dist/cjs/{popper-64d89ef7.js → popper-5ca144d4.js} +29 -3
  329. package/dist/cjs/{resources-ac80e82c.js → resources-06f33bd4.js} +1 -0
  330. package/dist/cjs/{resources-7d5449fb.js → resources-08dc0a5e.js} +1 -0
  331. package/dist/cjs/{resources-e43fc9f3.js → resources-0de59f13.js} +9 -8
  332. package/dist/cjs/{resources-7811eb2c.js → resources-24a7ca1a.js} +44 -2
  333. package/dist/cjs/{sortable.esm-d7a4560b.js → sortable.esm-8e944897.js} +63 -54
  334. package/dist/cjs/{utils-6579522f.js → utils-f3a37c0a.js} +1 -0
  335. package/dist/collection/collection-manifest.json +1 -1
  336. package/dist/collection/components/accordion/accordion.js +16 -10
  337. package/dist/collection/components/accordion/interfaces.js +1 -0
  338. package/dist/collection/components/accordion-item/accordion-item.css +0 -2
  339. package/dist/collection/components/accordion-item/accordion-item.js +16 -14
  340. package/dist/collection/components/action/action.css +1 -3
  341. package/dist/collection/components/action/action.js +6 -2
  342. package/dist/collection/components/action/resources.js +1 -0
  343. package/dist/collection/components/action-bar/action-bar.js +16 -4
  344. package/dist/collection/components/action-bar/resources.js +1 -0
  345. package/dist/collection/components/action-bar/utils.js +1 -0
  346. package/dist/collection/components/action-group/action-group.js +1 -0
  347. package/dist/collection/components/action-group/resources.js +1 -0
  348. package/dist/collection/components/action-menu/action-menu.css +0 -2
  349. package/dist/collection/components/action-menu/action-menu.js +21 -16
  350. package/dist/collection/components/action-menu/resources.js +1 -0
  351. package/dist/collection/components/action-pad/action-pad.js +15 -4
  352. package/dist/collection/components/action-pad/resources.js +1 -0
  353. package/dist/collection/components/alert/alert.css +11 -24
  354. package/dist/collection/components/alert/alert.js +20 -15
  355. package/dist/collection/components/alert/interfaces.js +1 -0
  356. package/dist/collection/components/alert/resources.js +1 -0
  357. package/dist/collection/components/avatar/avatar.css +1 -1
  358. package/dist/collection/components/avatar/avatar.js +1 -0
  359. package/dist/collection/components/avatar/utils.js +6 -0
  360. package/dist/collection/components/block/block.css +0 -2
  361. package/dist/collection/components/block/block.js +37 -12
  362. package/dist/collection/components/block/resources.js +1 -0
  363. package/dist/collection/components/block-section/block-section.css +0 -2
  364. package/dist/collection/components/block-section/block-section.js +3 -2
  365. package/dist/collection/components/block-section/interfaces.js +1 -0
  366. package/dist/collection/components/block-section/resources.js +1 -0
  367. package/dist/collection/components/button/button.css +1 -3
  368. package/dist/collection/components/button/button.js +20 -15
  369. package/dist/collection/components/button/interfaces.js +1 -0
  370. package/dist/collection/components/button/resources.js +1 -0
  371. package/dist/collection/components/card/card.css +19 -5
  372. package/dist/collection/components/card/card.js +45 -10
  373. package/dist/collection/components/card/resources.js +3 -2
  374. package/dist/collection/components/checkbox/checkbox.css +13 -10
  375. package/dist/collection/components/checkbox/checkbox.js +5 -2
  376. package/dist/collection/components/chip/chip.css +23 -25
  377. package/dist/collection/components/chip/chip.js +7 -4
  378. package/dist/collection/components/chip/interfaces.js +1 -0
  379. package/dist/collection/components/chip/resources.js +4 -2
  380. package/dist/collection/components/color-picker/color-picker.css +2 -12
  381. package/dist/collection/components/color-picker/color-picker.js +76 -36
  382. package/dist/collection/components/color-picker/interfaces.js +1 -0
  383. package/dist/collection/components/color-picker/resources.js +1 -0
  384. package/dist/collection/components/color-picker/utils.js +1 -0
  385. package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +48 -50
  386. package/dist/collection/components/color-picker-hex-input/resources.js +1 -0
  387. package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -0
  388. package/dist/collection/components/color-picker-swatch/resources.js +1 -0
  389. package/dist/collection/components/combobox/combobox.css +0 -2
  390. package/dist/collection/components/combobox/combobox.js +95 -47
  391. package/dist/collection/components/combobox/interfaces.js +1 -0
  392. package/dist/collection/components/combobox/resources.js +5 -0
  393. package/dist/collection/components/combobox/utils.js +1 -0
  394. package/dist/collection/components/combobox-item/combobox-item.css +1 -3
  395. package/dist/collection/components/combobox-item/combobox-item.js +11 -2
  396. package/dist/collection/components/combobox-item/resources.js +1 -0
  397. package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -0
  398. package/dist/collection/components/combobox-item-group/resources.js +1 -0
  399. package/dist/collection/components/date-picker/assets/date-picker/nls/ru.json +4 -4
  400. package/dist/collection/components/date-picker/date-picker.js +36 -6
  401. package/dist/collection/components/date-picker/interfaces.js +1 -0
  402. package/dist/collection/components/date-picker/resources.js +1 -0
  403. package/dist/collection/components/date-picker/utils.js +7 -0
  404. package/dist/collection/components/date-picker-day/date-picker-day.css +7 -9
  405. package/dist/collection/components/date-picker-day/date-picker-day.js +4 -3
  406. package/dist/collection/components/date-picker-month/date-picker-month.js +38 -9
  407. package/dist/collection/components/date-picker-month-header/date-picker-month-header.css +1 -7
  408. package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +35 -19
  409. package/dist/collection/components/dropdown/dropdown.css +0 -1
  410. package/dist/collection/components/dropdown/dropdown.js +76 -35
  411. package/dist/collection/components/dropdown/interfaces.js +1 -0
  412. package/dist/collection/components/dropdown/resources.js +1 -0
  413. package/dist/collection/components/dropdown-group/dropdown-group.css +4 -0
  414. package/dist/collection/components/dropdown-group/dropdown-group.js +9 -6
  415. package/dist/collection/components/dropdown-group/interfaces.js +1 -0
  416. package/dist/collection/components/dropdown-group/resources.js +1 -0
  417. package/dist/collection/components/dropdown-item/dropdown-item.css +1 -2
  418. package/dist/collection/components/dropdown-item/dropdown-item.js +19 -19
  419. package/dist/collection/components/dropdown-item/resources.js +1 -0
  420. package/dist/collection/components/fab/fab.js +2 -0
  421. package/dist/collection/components/fab/resources.js +1 -0
  422. package/dist/collection/components/filter/filter.css +2 -2
  423. package/dist/collection/components/filter/filter.js +20 -15
  424. package/dist/collection/components/filter/resources.js +3 -2
  425. package/dist/collection/components/flow/flow.css +1 -9
  426. package/dist/collection/components/flow/flow.js +12 -17
  427. package/dist/collection/components/flow/interfaces.js +1 -0
  428. package/dist/collection/components/flow/resources.js +1 -0
  429. package/dist/collection/components/functional/ExpandToggle.js +5 -2
  430. package/dist/collection/components/functional/Heading.js +1 -0
  431. package/dist/collection/components/graph/graph.css +1 -0
  432. package/dist/collection/components/graph/graph.js +1 -0
  433. package/dist/collection/components/graph/interfaces.js +1 -0
  434. package/dist/collection/components/graph/util.js +29 -0
  435. package/dist/collection/components/handle/handle.css +0 -2
  436. package/dist/collection/components/handle/handle.js +5 -3
  437. package/dist/collection/components/handle/resources.js +1 -0
  438. package/dist/collection/components/icon/assets/icon/compactness16.json +1 -0
  439. package/dist/collection/components/icon/assets/icon/compactness24.json +1 -0
  440. package/dist/collection/components/icon/assets/icon/compactness32.json +1 -0
  441. package/dist/collection/components/icon/assets/icon/configure16.json +1 -0
  442. package/dist/collection/components/icon/assets/icon/configure24.json +1 -0
  443. package/dist/collection/components/icon/assets/icon/configure32.json +1 -0
  444. package/dist/collection/components/icon/assets/icon/debugScript16.json +1 -0
  445. package/dist/collection/components/icon/assets/icon/debugScript24.json +1 -0
  446. package/dist/collection/components/icon/assets/icon/debugScript32.json +1 -0
  447. package/dist/collection/components/icon/assets/icon/dissolveFeatures16.json +1 -0
  448. package/dist/collection/components/icon/assets/icon/dissolveFeatures24.json +1 -0
  449. package/dist/collection/components/icon/assets/icon/dissolveFeatures32.json +1 -0
  450. package/dist/collection/components/icon/assets/icon/distanceType16.json +1 -0
  451. package/dist/collection/components/icon/assets/icon/distanceType24.json +1 -0
  452. package/dist/collection/components/icon/assets/icon/distanceType32.json +1 -0
  453. package/dist/collection/components/icon/assets/icon/fileEcd16.json +1 -0
  454. package/dist/collection/components/icon/assets/icon/fileEcd24.json +1 -0
  455. package/dist/collection/components/icon/assets/icon/fileEcd32.json +1 -0
  456. package/dist/collection/components/icon/assets/icon/gridDiamond16.json +1 -0
  457. package/dist/collection/components/icon/assets/icon/gridDiamond24.json +1 -0
  458. package/dist/collection/components/icon/assets/icon/gridDiamond32.json +1 -0
  459. package/dist/collection/components/icon/assets/icon/gridHexagon16.json +1 -0
  460. package/dist/collection/components/icon/assets/icon/gridHexagon24.json +1 -0
  461. package/dist/collection/components/icon/assets/icon/gridHexagon32.json +1 -0
  462. package/dist/collection/components/icon/assets/icon/gridTriangle16.json +1 -0
  463. package/dist/collection/components/icon/assets/icon/gridTriangle24.json +1 -0
  464. package/dist/collection/components/icon/assets/icon/gridTriangle32.json +1 -0
  465. package/dist/collection/components/icon/assets/icon/insets16.json +1 -0
  466. package/dist/collection/components/icon/assets/icon/insets24.json +1 -0
  467. package/dist/collection/components/icon/assets/icon/insets32.json +1 -0
  468. package/dist/collection/components/icon/assets/icon/listCheckAll16.json +1 -0
  469. package/dist/collection/components/icon/assets/icon/listCheckAll24.json +1 -0
  470. package/dist/collection/components/icon/assets/icon/listCheckAll32.json +1 -0
  471. package/dist/collection/components/icon/assets/icon/ltrElementsAlign16.json +1 -0
  472. package/dist/collection/components/icon/assets/icon/ltrElementsAlign24.json +1 -0
  473. package/dist/collection/components/icon/assets/icon/ltrElementsAlign32.json +1 -0
  474. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign16.json +1 -0
  475. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign24.json +1 -0
  476. package/dist/collection/components/icon/assets/icon/ltrParagraphAlign32.json +1 -0
  477. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance16.json +1 -0
  478. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance24.json +1 -0
  479. package/dist/collection/components/icon/assets/icon/maximumTerritoryDistance32.json +1 -0
  480. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters16.json +1 -0
  481. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters24.json +1 -0
  482. package/dist/collection/components/icon/assets/icon/minDistanceBetweenCenters32.json +1 -0
  483. package/dist/collection/components/icon/assets/icon/numberOfTerritories16.json +1 -0
  484. package/dist/collection/components/icon/assets/icon/numberOfTerritories24.json +1 -0
  485. package/dist/collection/components/icon/assets/icon/numberOfTerritories32.json +1 -0
  486. package/dist/collection/components/icon/assets/icon/overlapFeatures16.json +1 -0
  487. package/dist/collection/components/icon/assets/icon/overlapFeatures24.json +1 -0
  488. package/dist/collection/components/icon/assets/icon/overlapFeatures32.json +1 -0
  489. package/dist/collection/components/icon/assets/icon/profileVariables16.json +1 -0
  490. package/dist/collection/components/icon/assets/icon/profileVariables24.json +1 -0
  491. package/dist/collection/components/icon/assets/icon/profileVariables32.json +1 -0
  492. package/dist/collection/components/icon/assets/icon/rangefinder16.json +1 -0
  493. package/dist/collection/components/icon/assets/icon/rangefinder24.json +1 -0
  494. package/dist/collection/components/icon/assets/icon/rangefinder32.json +1 -0
  495. package/dist/collection/components/icon/assets/icon/rasterAnalysis16.json +1 -0
  496. package/dist/collection/components/icon/assets/icon/rasterAnalysis24.json +1 -0
  497. package/dist/collection/components/icon/assets/icon/rasterAnalysis32.json +1 -0
  498. package/dist/collection/components/icon/assets/icon/recurrence16.json +1 -0
  499. package/dist/collection/components/icon/assets/icon/recurrence24.json +1 -0
  500. package/dist/collection/components/icon/assets/icon/recurrence32.json +1 -0
  501. package/dist/collection/components/icon/assets/icon/rfid16.json +1 -0
  502. package/dist/collection/components/icon/assets/icon/rfid24.json +1 -0
  503. package/dist/collection/components/icon/assets/icon/rfid32.json +1 -0
  504. package/dist/collection/components/icon/assets/icon/rtlElementsAlign16.json +1 -0
  505. package/dist/collection/components/icon/assets/icon/rtlElementsAlign24.json +1 -0
  506. package/dist/collection/components/icon/assets/icon/rtlElementsAlign32.json +1 -0
  507. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign16.json +1 -0
  508. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign24.json +1 -0
  509. package/dist/collection/components/icon/assets/icon/rtlParagraphAlign32.json +1 -0
  510. package/dist/collection/components/icon/assets/icon/splitFeatures16.json +1 -0
  511. package/dist/collection/components/icon/assets/icon/splitFeatures24.json +1 -0
  512. package/dist/collection/components/icon/assets/icon/splitFeatures32.json +1 -0
  513. package/dist/collection/components/icon/assets/icon/territoryBufferDistance16.json +1 -0
  514. package/dist/collection/components/icon/assets/icon/territoryBufferDistance24.json +1 -0
  515. package/dist/collection/components/icon/assets/icon/territoryBufferDistance32.json +1 -0
  516. package/dist/collection/components/icon/assets/icon/testData16.json +1 -0
  517. package/dist/collection/components/icon/assets/icon/testData24.json +1 -0
  518. package/dist/collection/components/icon/assets/icon/testData32.json +1 -0
  519. package/dist/collection/components/icon/icon.js +3 -2
  520. package/dist/collection/components/icon/resources.js +1 -0
  521. package/dist/collection/components/icon/utils.js +5 -0
  522. package/dist/collection/components/inline-editable/inline-editable.css +1 -4
  523. package/dist/collection/components/inline-editable/inline-editable.js +18 -13
  524. package/dist/collection/components/inline-editable/resources.js +1 -0
  525. package/dist/collection/components/input/input.css +14 -36
  526. package/dist/collection/components/input/input.js +106 -46
  527. package/dist/collection/components/input/interfaces.js +1 -0
  528. package/dist/collection/components/input/resources.js +4 -0
  529. package/dist/collection/components/input-date-picker/input-date-picker.css +1 -1
  530. package/dist/collection/components/input-date-picker/input-date-picker.js +107 -28
  531. package/dist/collection/components/input-message/input-message.css +11 -16
  532. package/dist/collection/components/input-message/input-message.js +1 -0
  533. package/dist/collection/components/input-message/interfaces.js +1 -0
  534. package/dist/collection/components/input-time-picker/input-time-picker.js +83 -14
  535. package/dist/collection/components/interfaces.js +1 -0
  536. package/dist/collection/components/label/label.css +2 -2
  537. package/dist/collection/components/label/label.js +2 -0
  538. package/dist/collection/components/label/resources.js +1 -0
  539. package/dist/collection/components/link/link.css +3 -14
  540. package/dist/collection/components/link/link.js +3 -1
  541. package/dist/collection/components/list/list.js +4 -3
  542. package/dist/collection/components/list/resources.js +1 -0
  543. package/dist/collection/components/list-item/list-item.css +20 -7
  544. package/dist/collection/components/list-item/list-item.js +12 -6
  545. package/dist/collection/components/list-item/resources.js +3 -1
  546. package/dist/collection/components/list-item-group/list-item-group.css +1 -1
  547. package/dist/collection/components/list-item-group/list-item-group.js +3 -2
  548. package/dist/collection/components/list-item-group/resources.js +1 -0
  549. package/dist/collection/components/loader/loader.css +3 -3
  550. package/dist/collection/components/loader/loader.js +18 -15
  551. package/dist/collection/components/modal/interfaces.js +1 -0
  552. package/dist/collection/components/modal/modal.css +7 -48
  553. package/dist/collection/components/modal/modal.js +79 -64
  554. package/dist/collection/components/modal/resources.js +1 -0
  555. package/dist/collection/components/notice/notice.css +5 -16
  556. package/dist/collection/components/notice/notice.js +27 -23
  557. package/dist/collection/components/notice/resources.js +1 -0
  558. package/dist/collection/components/option/option.js +5 -4
  559. package/dist/collection/components/option-group/option-group.js +4 -3
  560. package/dist/collection/components/pagination/pagination.css +2 -7
  561. package/dist/collection/components/pagination/pagination.js +32 -4
  562. package/dist/collection/components/pagination/resources.js +1 -0
  563. package/dist/collection/components/panel/panel.css +2 -1
  564. package/dist/collection/components/panel/panel.js +73 -12
  565. package/dist/collection/components/panel/resources.js +1 -0
  566. package/dist/collection/components/pick-list/pick-list.js +23 -11
  567. package/dist/collection/components/pick-list/resources.js +1 -0
  568. package/dist/collection/components/pick-list/shared-list-logic.js +3 -2
  569. package/dist/collection/components/pick-list/shared-list-render.js +3 -1
  570. package/dist/collection/components/pick-list-group/pick-list-group.js +1 -0
  571. package/dist/collection/components/pick-list-group/resources.js +1 -0
  572. package/dist/collection/components/pick-list-item/pick-list-item.css +1 -3
  573. package/dist/collection/components/pick-list-item/pick-list-item.js +25 -14
  574. package/dist/collection/components/pick-list-item/resources.js +1 -0
  575. package/dist/collection/components/popover/PopoverManager.js +75 -0
  576. package/dist/collection/components/popover/popover.css +5 -0
  577. package/dist/collection/components/popover/popover.js +121 -27
  578. package/dist/collection/components/popover/resources.js +1 -1
  579. package/dist/collection/components/popover-manager/popover-manager.js +33 -44
  580. package/dist/collection/components/progress/progress.js +1 -0
  581. package/dist/collection/components/radio-button/radio-button.css +10 -6
  582. package/dist/collection/components/radio-button/radio-button.js +6 -2
  583. package/dist/collection/components/radio-button/resources.js +1 -0
  584. package/dist/collection/components/radio-button-group/radio-button-group.js +1 -0
  585. package/dist/collection/components/radio-group/interfaces.js +1 -0
  586. package/dist/collection/components/radio-group/radio-group.js +3 -2
  587. package/dist/collection/components/radio-group-item/radio-group-item.css +0 -2
  588. package/dist/collection/components/radio-group-item/radio-group-item.js +6 -5
  589. package/dist/collection/components/radio-group-item/resources.js +1 -0
  590. package/dist/collection/components/rating/rating.css +2 -12
  591. package/dist/collection/components/rating/rating.js +7 -2
  592. package/dist/collection/components/rating/resources.js +1 -0
  593. package/dist/collection/components/scrim/resources.js +1 -0
  594. package/dist/collection/components/scrim/scrim.js +4 -1
  595. package/dist/collection/components/select/resources.js +1 -0
  596. package/dist/collection/components/select/select.css +0 -2
  597. package/dist/collection/components/select/select.js +3 -2
  598. package/dist/collection/components/shell/resources.js +1 -0
  599. package/dist/collection/components/shell/shell.js +1 -0
  600. package/dist/collection/components/shell-center-row/resources.js +1 -0
  601. package/dist/collection/components/shell-center-row/shell-center-row.css +1 -1
  602. package/dist/collection/components/shell-center-row/shell-center-row.js +1 -0
  603. package/dist/collection/components/shell-panel/resources.js +1 -0
  604. package/dist/collection/components/shell-panel/shell-panel.css +3 -6
  605. package/dist/collection/components/shell-panel/shell-panel.js +6 -1
  606. package/dist/collection/components/slider/slider.css +29 -2
  607. package/dist/collection/components/slider/slider.js +94 -41
  608. package/dist/collection/components/sortable-list/resources.js +1 -0
  609. package/dist/collection/components/sortable-list/sortable-list.js +1 -0
  610. package/dist/collection/components/split-button/resources.js +1 -0
  611. package/dist/collection/components/split-button/split-button.css +1 -4
  612. package/dist/collection/components/split-button/split-button.js +6 -2
  613. package/dist/{calcite/p-accdb0ce.js → collection/components/stepper/interfaces.js} +2 -1
  614. package/dist/collection/components/stepper/stepper.js +107 -67
  615. package/dist/collection/components/stepper-item/stepper-item.css +27 -2
  616. package/dist/collection/components/stepper-item/stepper-item.js +83 -82
  617. package/dist/collection/components/switch/switch.css +0 -2
  618. package/dist/collection/components/switch/switch.js +8 -4
  619. package/dist/collection/components/tab/interfaces.js +1 -0
  620. package/dist/collection/components/tab/tab.js +38 -22
  621. package/dist/collection/components/tab-nav/tab-nav.css +6 -0
  622. package/dist/collection/components/tab-nav/tab-nav.js +87 -37
  623. package/dist/collection/components/tab-title/tab-title.css +30 -15
  624. package/dist/collection/components/tab-title/tab-title.js +92 -44
  625. package/dist/collection/components/tabs/interfaces.js +1 -0
  626. package/dist/collection/components/tabs/resources.js +1 -0
  627. package/dist/collection/components/tabs/tabs.css +13 -1
  628. package/dist/collection/components/tabs/tabs.js +11 -9
  629. package/dist/collection/components/tile/resources.js +1 -0
  630. package/dist/collection/components/tile/tile.css +3 -4
  631. package/dist/collection/components/tile/tile.js +2 -0
  632. package/dist/collection/components/tile-select/interfaces.js +1 -0
  633. package/dist/collection/components/tile-select/resources.js +1 -0
  634. package/dist/collection/components/tile-select/tile-select.css +7 -2
  635. package/dist/collection/components/tile-select/tile-select.js +1 -0
  636. package/dist/collection/components/tile-select-group/interfaces.js +1 -0
  637. package/dist/collection/components/tile-select-group/tile-select-group.css +1 -1
  638. package/dist/collection/components/tile-select-group/tile-select-group.js +1 -0
  639. package/dist/collection/components/time-picker/resources.js +1 -0
  640. package/dist/collection/components/time-picker/time-picker.js +61 -33
  641. package/dist/collection/components/tip/resources.js +1 -0
  642. package/dist/collection/components/tip/tip.css +0 -2
  643. package/dist/collection/components/tip/tip.js +1 -0
  644. package/dist/collection/components/tip-group/tip-group.js +1 -0
  645. package/dist/collection/components/tip-manager/resources.js +1 -0
  646. package/dist/collection/components/tip-manager/tip-manager.css +1 -13
  647. package/dist/collection/components/tip-manager/tip-manager.js +25 -5
  648. package/dist/collection/components/tooltip/TooltipManager.js +161 -0
  649. package/dist/collection/components/tooltip/resources.js +1 -1
  650. package/dist/collection/components/tooltip/tooltip.css +7 -4
  651. package/dist/collection/components/tooltip/tooltip.js +58 -29
  652. package/dist/collection/components/tooltip-manager/tooltip-manager.js +6 -163
  653. package/dist/collection/components/tree/interfaces.js +1 -0
  654. package/dist/collection/components/tree/tree.js +18 -12
  655. package/dist/collection/components/tree-item/interfaces.js +1 -0
  656. package/dist/collection/components/tree-item/resources.js +1 -0
  657. package/dist/collection/components/tree-item/tree-item.css +8 -14
  658. package/dist/collection/components/tree-item/tree-item.js +31 -24
  659. package/dist/collection/components/value-list/resources.js +1 -0
  660. package/dist/collection/components/value-list/value-list.js +41 -29
  661. package/dist/collection/components/value-list-item/resources.js +1 -0
  662. package/dist/collection/components/value-list-item/value-list-item.css +0 -2
  663. package/dist/collection/components/value-list-item/value-list-item.js +33 -23
  664. package/dist/collection/demos/_assets/demo-spacer.js +17 -0
  665. package/dist/collection/demos/_assets/demo-template.js +13 -0
  666. package/dist/collection/demos/_assets/head.js +45 -0
  667. package/dist/collection/demos/_assets/locales.js +223 -0
  668. package/dist/collection/utils/array.js +1 -0
  669. package/dist/collection/utils/conditionalSlot.js +5 -0
  670. package/dist/collection/utils/date.js +36 -0
  671. package/dist/collection/utils/dom.js +26 -1
  672. package/dist/collection/utils/filter.js +2 -1
  673. package/dist/collection/utils/form.js +32 -0
  674. package/dist/collection/utils/globalAttributes.js +6 -0
  675. package/dist/collection/utils/guid.js +1 -0
  676. package/dist/collection/utils/interactive.js +7 -3
  677. package/dist/collection/utils/key.js +1 -0
  678. package/dist/collection/utils/label.js +25 -17
  679. package/dist/collection/utils/locale.js +31 -27
  680. package/dist/collection/utils/math.js +1 -0
  681. package/dist/collection/utils/number.js +2 -1
  682. package/dist/collection/utils/observers.js +1 -0
  683. package/dist/collection/utils/popper.js +17 -2
  684. package/dist/collection/utils/resources.js +1 -0
  685. package/dist/collection/utils/time.js +1 -0
  686. package/dist/components/ExpandToggle.js +5 -2
  687. package/dist/components/Heading.js +1 -0
  688. package/dist/components/action-group.js +11 -16
  689. package/dist/components/action-menu.js +30 -31
  690. package/dist/components/action.js +7 -3
  691. package/dist/components/array.js +1 -0
  692. package/dist/components/button.js +19 -15
  693. package/dist/components/calcite-accordion-item.js +13 -11
  694. package/dist/components/calcite-accordion.js +12 -6
  695. package/dist/components/calcite-action-bar.js +20 -20
  696. package/dist/components/calcite-action-group.js +1 -0
  697. package/dist/components/calcite-action-menu.js +1 -0
  698. package/dist/components/calcite-action-pad.js +19 -20
  699. package/dist/components/calcite-action.js +1 -0
  700. package/dist/components/calcite-alert.js +16 -12
  701. package/dist/components/calcite-avatar.js +8 -2
  702. package/dist/components/calcite-block-section.js +4 -3
  703. package/dist/components/calcite-block.js +38 -27
  704. package/dist/components/calcite-button.js +1 -0
  705. package/dist/components/calcite-card.js +21 -10
  706. package/dist/components/calcite-checkbox.js +1 -0
  707. package/dist/components/calcite-chip.js +1 -0
  708. package/dist/components/calcite-color-picker-hex-input.js +1 -0
  709. package/dist/components/calcite-color-picker-swatch.js +1 -0
  710. package/dist/components/calcite-color-picker.js +77 -37
  711. package/dist/components/calcite-combobox-item-group.js +1 -0
  712. package/dist/components/calcite-combobox-item.js +4 -1
  713. package/dist/components/calcite-combobox.js +94 -48
  714. package/dist/components/calcite-date-picker-day.js +1 -0
  715. package/dist/components/calcite-date-picker-month-header.js +1 -0
  716. package/dist/components/calcite-date-picker-month.js +1 -0
  717. package/dist/components/calcite-date-picker.js +1 -0
  718. package/dist/components/calcite-dropdown-group.js +9 -6
  719. package/dist/components/calcite-dropdown-item.js +17 -17
  720. package/dist/components/calcite-dropdown.js +1 -0
  721. package/dist/components/calcite-fab.js +2 -0
  722. package/dist/components/calcite-filter.js +1 -0
  723. package/dist/components/calcite-flow.js +12 -17
  724. package/dist/components/calcite-graph.js +1 -0
  725. package/dist/components/calcite-handle.js +1 -0
  726. package/dist/components/calcite-icon.js +1 -0
  727. package/dist/components/calcite-inline-editable.js +18 -13
  728. package/dist/components/calcite-input-date-picker.js +76 -24
  729. package/dist/components/calcite-input-message.js +2 -1
  730. package/dist/components/calcite-input-time-picker.js +38 -11
  731. package/dist/components/calcite-input.js +1 -0
  732. package/dist/components/calcite-label.js +1 -0
  733. package/dist/components/calcite-link.js +1 -0
  734. package/dist/components/calcite-list-item-group.js +2 -1
  735. package/dist/components/calcite-list-item.js +12 -5
  736. package/dist/components/calcite-list.js +2 -1
  737. package/dist/components/calcite-loader.js +1 -0
  738. package/dist/components/calcite-modal.js +27 -18
  739. package/dist/components/calcite-notice.js +11 -8
  740. package/dist/components/calcite-option-group.js +3 -2
  741. package/dist/components/calcite-option.js +4 -3
  742. package/dist/components/calcite-pagination.js +90 -4
  743. package/dist/components/calcite-panel.js +50 -24
  744. package/dist/components/calcite-pick-list-group.js +2 -1
  745. package/dist/components/calcite-pick-list-item.js +1 -0
  746. package/dist/components/calcite-pick-list.js +13 -7
  747. package/dist/components/calcite-popover-manager.js +31 -37
  748. package/dist/components/calcite-popover.js +1 -0
  749. package/dist/components/calcite-progress.js +1 -0
  750. package/dist/components/calcite-radio-button-group.js +1 -0
  751. package/dist/components/calcite-radio-button.js +7 -3
  752. package/dist/components/calcite-radio-group-item.js +6 -5
  753. package/dist/components/calcite-radio-group.js +3 -2
  754. package/dist/components/calcite-rating.js +8 -3
  755. package/dist/components/calcite-scrim.js +1 -0
  756. package/dist/components/calcite-select.js +3 -2
  757. package/dist/components/calcite-shell-center-row.js +2 -1
  758. package/dist/components/calcite-shell-panel.js +3 -1
  759. package/dist/components/calcite-shell.js +1 -0
  760. package/dist/components/calcite-slider.js +86 -39
  761. package/dist/components/calcite-sortable-list.js +1 -0
  762. package/dist/components/calcite-split-button.js +7 -3
  763. package/dist/components/calcite-stepper-item.js +56 -64
  764. package/dist/components/calcite-stepper.js +83 -51
  765. package/dist/components/calcite-switch.js +1 -0
  766. package/dist/components/calcite-tab-nav.js +1 -0
  767. package/dist/components/calcite-tab-title.js +1 -0
  768. package/dist/components/calcite-tab.js +1 -0
  769. package/dist/components/calcite-tabs.js +1 -0
  770. package/dist/components/calcite-tile-select-group.js +2 -1
  771. package/dist/components/calcite-tile-select.js +2 -1
  772. package/dist/components/calcite-tile.js +1 -0
  773. package/dist/components/calcite-time-picker.js +1 -0
  774. package/dist/components/calcite-tip-group.js +1 -0
  775. package/dist/components/calcite-tip-manager.js +8 -5
  776. package/dist/components/calcite-tip.js +3 -2
  777. package/dist/components/calcite-tooltip-manager.js +48 -1
  778. package/dist/components/calcite-tooltip.js +195 -23
  779. package/dist/components/calcite-tree-item.js +19 -12
  780. package/dist/components/calcite-tree.js +12 -6
  781. package/dist/components/calcite-value-list-item.js +15 -11
  782. package/dist/components/calcite-value-list.js +20 -14
  783. package/dist/components/checkbox.js +6 -3
  784. package/dist/components/chip.js +11 -7
  785. package/dist/components/color-picker-hex-input.js +48 -50
  786. package/dist/components/color-picker-swatch.js +1337 -1345
  787. package/dist/components/conditionalSlot.js +5 -0
  788. package/dist/components/date-picker-day.js +4 -3
  789. package/dist/components/date-picker-month-header.js +36 -20
  790. package/dist/components/date-picker-month.js +36 -7
  791. package/dist/components/date-picker.js +42 -6
  792. package/dist/components/date.js +36 -0
  793. package/dist/components/debounce.js +1 -0
  794. package/dist/components/dom.js +27 -2
  795. package/dist/components/dropdown.js +65 -25
  796. package/dist/components/filter.js +22 -15
  797. package/dist/components/forIn.js +1 -0
  798. package/dist/components/form.js +34 -2
  799. package/dist/components/graph.js +30 -1
  800. package/dist/components/guid.js +1 -0
  801. package/dist/components/handle.js +5 -3
  802. package/dist/components/icon.js +7 -2
  803. package/dist/components/index.d.ts +1 -1
  804. package/dist/components/index.js +1 -0
  805. package/dist/components/input.js +71 -40
  806. package/dist/components/interactive.js +7 -3
  807. package/dist/components/interfaces.js +1 -0
  808. package/dist/components/interfaces2.js +1 -0
  809. package/dist/components/label.js +26 -18
  810. package/dist/components/label2.js +3 -1
  811. package/dist/components/link.js +4 -2
  812. package/dist/components/loader.js +9 -6
  813. package/dist/components/locale.js +31 -28
  814. package/dist/components/math.js +1 -0
  815. package/dist/components/number.js +2 -1
  816. package/dist/components/observers.js +1 -0
  817. package/dist/components/pick-list-item.js +16 -11
  818. package/dist/components/popover.js +152 -19
  819. package/dist/components/popper.js +27 -2
  820. package/dist/components/progress.js +1 -0
  821. package/dist/components/resources.js +11 -18
  822. package/dist/components/resources2.js +8 -5
  823. package/dist/components/resources3.js +25 -10
  824. package/dist/components/scrim.js +4 -1
  825. package/dist/components/shared-list-render.js +8 -7
  826. package/dist/components/sortable.esm.js +63 -54
  827. package/dist/components/switch.js +8 -4
  828. package/dist/components/tab-nav.js +53 -25
  829. package/dist/components/tab-title.js +45 -34
  830. package/dist/components/tab.js +21 -17
  831. package/dist/components/tabs.js +9 -7
  832. package/dist/components/tile.js +3 -1
  833. package/dist/components/time-picker.js +51 -27
  834. package/dist/components/utils.js +1 -0
  835. package/dist/components/utils2.js +1 -0
  836. package/dist/custom-elements/index.js +3712 -2723
  837. package/dist/esm/{ExpandToggle-af224c1e.js → ExpandToggle-ce794961.js} +9 -6
  838. package/dist/esm/{Heading-d5f1710a.js → Heading-9ccb3452.js} +2 -1
  839. package/dist/esm/{array-91a648e2.js → array-7a76d321.js} +1 -0
  840. package/dist/esm/calcite-accordion_2.entry.js +24 -17
  841. package/dist/esm/calcite-action-bar.entry.js +17 -11
  842. package/dist/esm/calcite-action-group.entry.js +8 -7
  843. package/dist/esm/calcite-action-menu.entry.js +28 -23
  844. package/dist/esm/calcite-action-pad.entry.js +15 -10
  845. package/dist/esm/calcite-action.entry.js +11 -6
  846. package/dist/esm/calcite-alert.entry.js +18 -14
  847. package/dist/esm/calcite-avatar.entry.js +11 -5
  848. package/dist/esm/calcite-block_2.entry.js +32 -15
  849. package/dist/esm/calcite-button.entry.js +24 -20
  850. package/dist/esm/calcite-card.entry.js +23 -13
  851. package/dist/esm/calcite-checkbox.entry.js +11 -9
  852. package/dist/esm/calcite-chip.entry.js +16 -12
  853. package/dist/esm/calcite-color-picker_3.entry.js +1417 -1389
  854. package/dist/esm/calcite-combobox_3.entry.js +105 -58
  855. package/dist/esm/calcite-date-picker_4.entry.js +117 -44
  856. package/dist/esm/calcite-dropdown_3.entry.js +89 -48
  857. package/dist/esm/calcite-fab.entry.js +6 -4
  858. package/dist/esm/calcite-filter.entry.js +28 -21
  859. package/dist/esm/calcite-flow.entry.js +13 -18
  860. package/dist/esm/calcite-graph_2.entry.js +123 -48
  861. package/dist/esm/calcite-handle.entry.js +7 -4
  862. package/dist/esm/calcite-icon.entry.js +10 -5
  863. package/dist/esm/calcite-inline-editable.entry.js +23 -18
  864. package/dist/esm/calcite-input-date-picker.entry.js +82 -32
  865. package/dist/esm/calcite-input-message.entry.js +5 -4
  866. package/dist/esm/calcite-input-time-picker_2.entry.js +90 -42
  867. package/dist/esm/calcite-input.entry.js +77 -48
  868. package/dist/esm/calcite-label.entry.js +7 -5
  869. package/dist/esm/calcite-link.entry.js +8 -6
  870. package/dist/esm/calcite-list_3.entry.js +21 -14
  871. package/dist/esm/calcite-loader.entry.js +11 -8
  872. package/dist/esm/calcite-modal.entry.js +31 -21
  873. package/dist/esm/calcite-notice.entry.js +17 -14
  874. package/dist/esm/calcite-option_3.entry.js +14 -13
  875. package/dist/esm/calcite-pagination.entry.js +91 -5
  876. package/dist/esm/calcite-panel.entry.js +44 -13
  877. package/dist/esm/calcite-pick-list_3.entry.js +33 -23
  878. package/dist/esm/calcite-popover_2.entry.js +162 -56
  879. package/dist/esm/calcite-progress.entry.js +2 -1
  880. package/dist/esm/calcite-radio-button-group.entry.js +3 -2
  881. package/dist/esm/calcite-radio-button.entry.js +13 -9
  882. package/dist/esm/calcite-radio-group_2.entry.js +12 -11
  883. package/dist/esm/calcite-rating.entry.js +14 -9
  884. package/dist/esm/calcite-scrim.entry.js +5 -2
  885. package/dist/esm/calcite-shell_3.entry.js +10 -8
  886. package/dist/esm/calcite-sortable-list.entry.js +5 -4
  887. package/dist/esm/calcite-split-button.entry.js +9 -5
  888. package/dist/esm/calcite-stepper_2.entry.js +140 -117
  889. package/dist/esm/calcite-switch.entry.js +13 -9
  890. package/dist/esm/calcite-tab_4.entry.js +122 -81
  891. package/dist/esm/calcite-tile-select_2.entry.js +6 -5
  892. package/dist/esm/calcite-tile.entry.js +9 -7
  893. package/dist/esm/calcite-tip_3.entry.js +13 -10
  894. package/dist/esm/calcite-tooltip_2.entry.js +188 -144
  895. package/dist/esm/calcite-tree_2.entry.js +33 -21
  896. package/dist/esm/calcite-value-list_2.entry.js +40 -31
  897. package/dist/esm/calcite.js +4 -3
  898. package/dist/esm/{conditionalSlot-67f579ff.js → conditionalSlot-6be8f3bd.js} +7 -2
  899. package/dist/esm/{debounce-79648d42.js → debounce-9626aac0.js} +1 -0
  900. package/dist/esm/{dom-e7fa77b9.js → dom-4caa79e4.js} +28 -3
  901. package/dist/esm/{forIn-48d8fb84.js → forIn-091a9d50.js} +2 -1
  902. package/dist/esm/{form-5e4609eb.js → form-7c2e444b.js} +35 -3
  903. package/dist/esm/{guid-196bd5ea.js → guid-27925469.js} +1 -0
  904. package/dist/esm/{index-bd94948c.js → index-1e02e91b.js} +7 -7
  905. package/dist/esm/index.js +1 -0
  906. package/dist/esm/{interactive-48b5cc0f.js → interactive-32803ed8.js} +7 -3
  907. package/dist/esm/{interfaces-0e5b954c.js → interfaces-64ad1cde.js} +1 -0
  908. package/dist/esm/{label-68f22660.js → label-ccf07634.js} +26 -18
  909. package/dist/esm/loader.js +4 -3
  910. package/dist/esm/{locale-fc850b7c.js → locale-705ed382.js} +31 -28
  911. package/dist/esm/{math-456207f5.js → math-351ff0de.js} +1 -0
  912. package/dist/esm/{number-8779395f.js → number-bb265f44.js} +2 -1
  913. package/dist/esm/{observers-46118290.js → observers-c18e9524.js} +1 -0
  914. package/dist/esm/polyfills/css-shim.js +1 -1
  915. package/dist/esm/{popper-da45ec93.js → popper-44b3ba83.js} +28 -3
  916. package/dist/esm/{resources-73dac782.js → resources-0aacb21d.js} +44 -2
  917. package/dist/esm/{resources-b5c3d9a7.js → resources-529884cb.js} +9 -8
  918. package/dist/esm/{resources-027bd8f9.js → resources-a2cad43d.js} +1 -0
  919. package/dist/esm/{resources-34334875.js → resources-a32d1180.js} +1 -0
  920. package/dist/esm/{sortable.esm-04824d33.js → sortable.esm-4e7d5c7b.js} +63 -54
  921. package/dist/esm/{utils-e84055a3.js → utils-2f763d44.js} +1 -0
  922. package/dist/esm-es5/{ExpandToggle-af224c1e.js → ExpandToggle-ce794961.js} +2 -1
  923. package/dist/esm-es5/{Heading-d5f1710a.js → Heading-9ccb3452.js} +2 -1
  924. package/dist/esm-es5/{array-91a648e2.js → array-7a76d321.js} +1 -0
  925. package/dist/esm-es5/calcite-accordion_2.entry.js +2 -1
  926. package/dist/esm-es5/calcite-action-bar.entry.js +2 -1
  927. package/dist/esm-es5/calcite-action-group.entry.js +2 -1
  928. package/dist/esm-es5/calcite-action-menu.entry.js +3 -2
  929. package/dist/esm-es5/calcite-action-pad.entry.js +3 -2
  930. package/dist/esm-es5/calcite-action.entry.js +2 -1
  931. package/dist/esm-es5/calcite-alert.entry.js +3 -2
  932. package/dist/esm-es5/calcite-avatar.entry.js +2 -1
  933. package/dist/esm-es5/calcite-block_2.entry.js +2 -1
  934. package/dist/esm-es5/calcite-button.entry.js +2 -1
  935. package/dist/esm-es5/calcite-card.entry.js +2 -1
  936. package/dist/esm-es5/calcite-checkbox.entry.js +3 -2
  937. package/dist/esm-es5/calcite-chip.entry.js +3 -2
  938. package/dist/esm-es5/calcite-color-picker_3.entry.js +3 -2
  939. package/dist/esm-es5/calcite-combobox_3.entry.js +3 -2
  940. package/dist/esm-es5/calcite-date-picker_4.entry.js +3 -2
  941. package/dist/esm-es5/calcite-dropdown_3.entry.js +3 -2
  942. package/dist/esm-es5/calcite-fab.entry.js +2 -1
  943. package/dist/esm-es5/calcite-filter.entry.js +2 -1
  944. package/dist/esm-es5/calcite-flow.entry.js +2 -1
  945. package/dist/esm-es5/calcite-graph_2.entry.js +2 -1
  946. package/dist/esm-es5/calcite-handle.entry.js +2 -1
  947. package/dist/esm-es5/calcite-icon.entry.js +2 -1
  948. package/dist/esm-es5/calcite-inline-editable.entry.js +3 -2
  949. package/dist/esm-es5/calcite-input-date-picker.entry.js +2 -1
  950. package/dist/esm-es5/calcite-input-message.entry.js +2 -1
  951. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +3 -2
  952. package/dist/esm-es5/calcite-input.entry.js +3 -2
  953. package/dist/esm-es5/calcite-label.entry.js +2 -1
  954. package/dist/esm-es5/calcite-link.entry.js +3 -2
  955. package/dist/esm-es5/calcite-list_3.entry.js +3 -2
  956. package/dist/esm-es5/calcite-loader.entry.js +2 -1
  957. package/dist/esm-es5/calcite-modal.entry.js +3 -2
  958. package/dist/esm-es5/calcite-notice.entry.js +3 -2
  959. package/dist/esm-es5/calcite-option_3.entry.js +2 -1
  960. package/dist/esm-es5/calcite-pagination.entry.js +2 -1
  961. package/dist/esm-es5/calcite-panel.entry.js +3 -2
  962. package/dist/esm-es5/calcite-pick-list_3.entry.js +3 -2
  963. package/dist/esm-es5/calcite-popover_2.entry.js +2 -1
  964. package/dist/esm-es5/calcite-progress.entry.js +2 -1
  965. package/dist/esm-es5/calcite-radio-button-group.entry.js +2 -1
  966. package/dist/esm-es5/calcite-radio-button.entry.js +2 -1
  967. package/dist/esm-es5/calcite-radio-group_2.entry.js +2 -1
  968. package/dist/esm-es5/calcite-rating.entry.js +2 -1
  969. package/dist/esm-es5/calcite-scrim.entry.js +2 -1
  970. package/dist/esm-es5/calcite-shell_3.entry.js +2 -1
  971. package/dist/esm-es5/calcite-sortable-list.entry.js +2 -1
  972. package/dist/esm-es5/calcite-split-button.entry.js +2 -1
  973. package/dist/esm-es5/calcite-stepper_2.entry.js +3 -2
  974. package/dist/esm-es5/calcite-switch.entry.js +3 -2
  975. package/dist/esm-es5/calcite-tab_4.entry.js +3 -2
  976. package/dist/esm-es5/calcite-tile-select_2.entry.js +2 -1
  977. package/dist/esm-es5/calcite-tile.entry.js +2 -1
  978. package/dist/esm-es5/calcite-tip_3.entry.js +3 -2
  979. package/dist/esm-es5/calcite-tooltip_2.entry.js +3 -2
  980. package/dist/esm-es5/calcite-tree_2.entry.js +2 -1
  981. package/dist/esm-es5/calcite-value-list_2.entry.js +2 -1
  982. package/dist/esm-es5/calcite.js +2 -1
  983. package/dist/esm-es5/{conditionalSlot-67f579ff.js → conditionalSlot-6be8f3bd.js} +2 -1
  984. package/dist/esm-es5/{debounce-79648d42.js → debounce-9626aac0.js} +1 -0
  985. package/dist/esm-es5/dom-4caa79e4.js +6 -0
  986. package/dist/esm-es5/{forIn-48d8fb84.js → forIn-091a9d50.js} +2 -1
  987. package/dist/esm-es5/form-7c2e444b.js +6 -0
  988. package/dist/esm-es5/{guid-196bd5ea.js → guid-27925469.js} +1 -0
  989. package/dist/esm-es5/{index-bd94948c.js → index-1e02e91b.js} +4 -2
  990. package/dist/esm-es5/index.js +1 -0
  991. package/dist/esm-es5/{interactive-48b5cc0f.js → interactive-32803ed8.js} +1 -0
  992. package/dist/esm-es5/{interfaces-0e5b954c.js → interfaces-64ad1cde.js} +1 -0
  993. package/dist/esm-es5/label-ccf07634.js +6 -0
  994. package/dist/esm-es5/loader.js +2 -1
  995. package/dist/esm-es5/locale-705ed382.js +6 -0
  996. package/dist/esm-es5/{math-456207f5.js → math-351ff0de.js} +1 -0
  997. package/dist/esm-es5/number-bb265f44.js +6 -0
  998. package/dist/esm-es5/{observers-46118290.js → observers-c18e9524.js} +1 -0
  999. package/dist/esm-es5/{popper-da45ec93.js → popper-44b3ba83.js} +2 -1
  1000. package/dist/esm-es5/{resources-73dac782.js → resources-0aacb21d.js} +3 -2
  1001. package/dist/esm-es5/resources-529884cb.js +6 -0
  1002. package/dist/esm-es5/{resources-027bd8f9.js → resources-a2cad43d.js} +1 -0
  1003. package/dist/esm-es5/{resources-34334875.js → resources-a32d1180.js} +1 -0
  1004. package/dist/esm-es5/sortable.esm-4e7d5c7b.js +12 -0
  1005. package/dist/esm-es5/{utils-e84055a3.js → utils-2f763d44.js} +1 -0
  1006. package/dist/extras/docs-json.d.ts +3 -0
  1007. package/dist/extras/docs-json.json +577 -301
  1008. package/dist/loader/cdn.js +1 -0
  1009. package/dist/loader/index.cjs.js +1 -0
  1010. package/dist/loader/index.es2017.js +1 -0
  1011. package/dist/loader/index.js +1 -0
  1012. package/dist/types/components/accordion/accordion.d.ts +6 -4
  1013. package/dist/types/components/accordion-item/accordion-item.d.ts +4 -4
  1014. package/dist/types/components/action/action.d.ts +4 -1
  1015. package/dist/types/components/action-bar/action-bar.d.ts +6 -1
  1016. package/dist/types/components/action-menu/action-menu.d.ts +4 -2
  1017. package/dist/types/components/action-pad/action-pad.d.ts +5 -1
  1018. package/dist/types/components/alert/alert.d.ts +11 -6
  1019. package/dist/types/components/avatar/utils.d.ts +5 -0
  1020. package/dist/types/components/block/block.d.ts +12 -4
  1021. package/dist/types/components/button/button.d.ts +7 -4
  1022. package/dist/types/components/card/card.d.ts +13 -4
  1023. package/dist/types/components/card/resources.d.ts +1 -1
  1024. package/dist/types/components/checkbox/checkbox.d.ts +3 -1
  1025. package/dist/types/components/chip/chip.d.ts +3 -1
  1026. package/dist/types/components/chip/resources.d.ts +3 -2
  1027. package/dist/types/components/color-picker/color-picker.d.ts +58 -18
  1028. package/dist/types/components/color-picker-hex-input/color-picker-hex-input.d.ts +5 -1
  1029. package/dist/types/components/combobox/combobox.d.ts +15 -4
  1030. package/dist/types/components/combobox/resources.d.ts +4 -0
  1031. package/dist/types/components/combobox-item/combobox-item.d.ts +2 -0
  1032. package/dist/types/components/date-picker/date-picker.d.ts +32 -3
  1033. package/dist/types/components/date-picker/utils.d.ts +5 -0
  1034. package/dist/types/components/date-picker-day/date-picker-day.d.ts +2 -1
  1035. package/dist/types/components/date-picker-month/date-picker-month.d.ts +30 -2
  1036. package/dist/types/components/date-picker-month-header/date-picker-month-header.d.ts +10 -1
  1037. package/dist/types/components/dropdown/dropdown.d.ts +18 -9
  1038. package/dist/types/components/dropdown-group/dropdown-group.d.ts +5 -3
  1039. package/dist/types/components/dropdown-item/dropdown-item.d.ts +3 -3
  1040. package/dist/types/components/fab/fab.d.ts +1 -0
  1041. package/dist/types/components/filter/filter.d.ts +3 -3
  1042. package/dist/types/components/filter/resources.d.ts +1 -1
  1043. package/dist/types/components/flow/flow.d.ts +1 -4
  1044. package/dist/types/components/graph/util.d.ts +14 -0
  1045. package/dist/types/components/handle/handle.d.ts +1 -1
  1046. package/dist/types/components/icon/utils.d.ts +4 -0
  1047. package/dist/types/components/inline-editable/inline-editable.d.ts +10 -5
  1048. package/dist/types/components/input/input.d.ts +32 -13
  1049. package/dist/types/components/input/resources.d.ts +3 -0
  1050. package/dist/types/components/input-date-picker/input-date-picker.d.ts +35 -7
  1051. package/dist/types/components/input-message/input-message.d.ts +7 -3
  1052. package/dist/types/components/input-time-picker/input-time-picker.d.ts +15 -2
  1053. package/dist/types/components/interfaces.d.ts +1 -0
  1054. package/dist/types/components/label/label.d.ts +1 -0
  1055. package/dist/types/components/link/link.d.ts +2 -1
  1056. package/dist/types/components/list/list.d.ts +2 -2
  1057. package/dist/types/components/list-item/list-item.d.ts +3 -3
  1058. package/dist/types/components/list-item/resources.d.ts +1 -0
  1059. package/dist/types/components/list-item-group/list-item-group.d.ts +2 -2
  1060. package/dist/types/components/loader/loader.d.ts +11 -9
  1061. package/dist/types/components/modal/modal.d.ts +37 -28
  1062. package/dist/types/components/notice/notice.d.ts +24 -19
  1063. package/dist/types/components/option/option.d.ts +1 -1
  1064. package/dist/types/components/option-group/option-group.d.ts +1 -1
  1065. package/dist/types/components/pagination/pagination.d.ts +13 -3
  1066. package/dist/types/components/panel/panel.d.ts +18 -2
  1067. package/dist/types/components/pick-list/pick-list.d.ts +7 -3
  1068. package/dist/types/components/pick-list/shared-list-logic.d.ts +1 -1
  1069. package/dist/types/components/pick-list-item/pick-list-item.d.ts +9 -3
  1070. package/dist/types/components/popover/PopoverManager.d.ts +13 -0
  1071. package/dist/types/components/popover/popover.d.ts +32 -7
  1072. package/dist/types/components/popover/resources.d.ts +0 -1
  1073. package/dist/types/components/popover-manager/popover-manager.d.ts +7 -2
  1074. package/dist/types/components/radio-button/radio-button.d.ts +6 -0
  1075. package/dist/types/components/radio-group-item/radio-group-item.d.ts +2 -1
  1076. package/dist/types/components/rating/rating.d.ts +6 -2
  1077. package/dist/types/components/scrim/scrim.d.ts +3 -1
  1078. package/dist/types/components/shell-panel/shell-panel.d.ts +3 -0
  1079. package/dist/types/components/slider/slider.d.ts +24 -2
  1080. package/dist/types/components/split-button/split-button.d.ts +5 -2
  1081. package/dist/types/components/stepper/interfaces.d.ts +10 -0
  1082. package/dist/types/components/stepper/stepper.d.ts +20 -11
  1083. package/dist/types/components/stepper-item/stepper-item.d.ts +7 -8
  1084. package/dist/types/components/switch/switch.d.ts +3 -1
  1085. package/dist/types/components/tab/tab.d.ts +11 -8
  1086. package/dist/types/components/tab-nav/tab-nav.d.ts +34 -21
  1087. package/dist/types/components/tab-title/tab-title.d.ts +37 -28
  1088. package/dist/types/components/tabs/tabs.d.ts +7 -6
  1089. package/dist/types/components/tile/tile.d.ts +1 -0
  1090. package/dist/types/components/time-picker/time-picker.d.ts +45 -17
  1091. package/dist/types/components/tip-manager/tip-manager.d.ts +7 -1
  1092. package/dist/types/components/tooltip/TooltipManager.d.ts +28 -0
  1093. package/dist/types/components/tooltip/resources.d.ts +0 -1
  1094. package/dist/types/components/tooltip/tooltip.d.ts +15 -13
  1095. package/dist/types/components/tooltip-manager/tooltip-manager.d.ts +2 -29
  1096. package/dist/types/components/tree/tree.d.ts +14 -7
  1097. package/dist/types/components/tree-item/tree-item.d.ts +28 -14
  1098. package/dist/types/components/value-list/value-list.d.ts +20 -16
  1099. package/dist/types/components/value-list-item/value-list-item.d.ts +15 -12
  1100. package/dist/types/components.d.ts +606 -252
  1101. package/dist/types/preact.d.ts +63 -59
  1102. package/dist/types/utils/conditionalSlot.d.ts +4 -0
  1103. package/dist/types/utils/date.d.ts +35 -0
  1104. package/dist/types/utils/dom.d.ts +18 -2
  1105. package/dist/types/utils/form.d.ts +34 -5
  1106. package/dist/types/utils/globalAttributes.d.ts +5 -0
  1107. package/dist/types/utils/interactive.d.ts +7 -4
  1108. package/dist/types/utils/label.d.ts +7 -0
  1109. package/dist/types/utils/locale.d.ts +2 -1
  1110. package/dist/types/utils/popper.d.ts +6 -4
  1111. package/hydrate/index.d.ts +1 -1
  1112. package/hydrate/index.js +3805 -2797
  1113. package/package.json +49 -48
  1114. package/readme.md +4 -5
  1115. package/dist/calcite/p-07f1f162.system.entry.js +0 -5
  1116. package/dist/calcite/p-1263bcc0.entry.js +0 -5
  1117. package/dist/calcite/p-162604a0.entry.js +0 -5
  1118. package/dist/calcite/p-193749c1.entry.js +0 -5
  1119. package/dist/calcite/p-1aeca42a.system.entry.js +0 -5
  1120. package/dist/calcite/p-23145377.entry.js +0 -5
  1121. package/dist/calcite/p-28c333d0.entry.js +0 -5
  1122. package/dist/calcite/p-2bcaed33.entry.js +0 -5
  1123. package/dist/calcite/p-2dd22e8c.system.entry.js +0 -5
  1124. package/dist/calcite/p-2fae8516.system.entry.js +0 -5
  1125. package/dist/calcite/p-31c58f25.entry.js +0 -5
  1126. package/dist/calcite/p-32d6b962.entry.js +0 -5
  1127. package/dist/calcite/p-32efc4cd.system.entry.js +0 -5
  1128. package/dist/calcite/p-34730e94.entry.js +0 -5
  1129. package/dist/calcite/p-364db271.entry.js +0 -5
  1130. package/dist/calcite/p-364f0abe.system.entry.js +0 -5
  1131. package/dist/calcite/p-3915705c.entry.js +0 -5
  1132. package/dist/calcite/p-3e149640.system.entry.js +0 -5
  1133. package/dist/calcite/p-42227a04.entry.js +0 -5
  1134. package/dist/calcite/p-426f011a.entry.js +0 -5
  1135. package/dist/calcite/p-46071f17.entry.js +0 -5
  1136. package/dist/calcite/p-47d38839.entry.js +0 -5
  1137. package/dist/calcite/p-48637359.system.entry.js +0 -5
  1138. package/dist/calcite/p-4905189e.system.entry.js +0 -5
  1139. package/dist/calcite/p-496e907a.system.entry.js +0 -5
  1140. package/dist/calcite/p-4aecbaef.entry.js +0 -5
  1141. package/dist/calcite/p-4afb5a1b.system.entry.js +0 -5
  1142. package/dist/calcite/p-4eae61c5.entry.js +0 -5
  1143. package/dist/calcite/p-54c49493.entry.js +0 -5
  1144. package/dist/calcite/p-55e1a3a0.system.entry.js +0 -5
  1145. package/dist/calcite/p-569150ab.system.entry.js +0 -5
  1146. package/dist/calcite/p-588bfa74.system.js +0 -5
  1147. package/dist/calcite/p-5a8829cd.entry.js +0 -5
  1148. package/dist/calcite/p-5c637131.entry.js +0 -5
  1149. package/dist/calcite/p-5f6e35f3.entry.js +0 -5
  1150. package/dist/calcite/p-614d8925.js +0 -5
  1151. package/dist/calcite/p-6261469d.entry.js +0 -5
  1152. package/dist/calcite/p-653bd7bf.entry.js +0 -5
  1153. package/dist/calcite/p-69d2d9cf.system.entry.js +0 -5
  1154. package/dist/calcite/p-6ab3e489.entry.js +0 -5
  1155. package/dist/calcite/p-6b7b23d0.js +0 -5
  1156. package/dist/calcite/p-6c4a7041.system.entry.js +0 -5
  1157. package/dist/calcite/p-6e0103f5.system.entry.js +0 -5
  1158. package/dist/calcite/p-6ed27595.system.entry.js +0 -5
  1159. package/dist/calcite/p-6fba3e1b.system.entry.js +0 -5
  1160. package/dist/calcite/p-7247b667.system.entry.js +0 -5
  1161. package/dist/calcite/p-7260c869.system.entry.js +0 -5
  1162. package/dist/calcite/p-765c9bef.entry.js +0 -5
  1163. package/dist/calcite/p-7c88d545.js +0 -5
  1164. package/dist/calcite/p-824da4be.entry.js +0 -5
  1165. package/dist/calcite/p-867f7b7a.system.entry.js +0 -5
  1166. package/dist/calcite/p-872e82a6.system.entry.js +0 -5
  1167. package/dist/calcite/p-87888359.entry.js +0 -5
  1168. package/dist/calcite/p-895d22f3.entry.js +0 -5
  1169. package/dist/calcite/p-8b982f91.entry.js +0 -5
  1170. package/dist/calcite/p-8f3a3e4e.js +0 -5
  1171. package/dist/calcite/p-963e9aec.system.entry.js +0 -5
  1172. package/dist/calcite/p-9940b82a.system.entry.js +0 -5
  1173. package/dist/calcite/p-9ad8c7c5.system.entry.js +0 -5
  1174. package/dist/calcite/p-9c913e3a.entry.js +0 -5
  1175. package/dist/calcite/p-9e61d89d.entry.js +0 -5
  1176. package/dist/calcite/p-a9b3ef39.js +0 -5
  1177. package/dist/calcite/p-a9ea7f4f.entry.js +0 -5
  1178. package/dist/calcite/p-aaa21a84.system.entry.js +0 -5
  1179. package/dist/calcite/p-aad14a5d.system.entry.js +0 -5
  1180. package/dist/calcite/p-ac9607f2.system.js +0 -11
  1181. package/dist/calcite/p-afe59546.entry.js +0 -5
  1182. package/dist/calcite/p-b0827b8c.system.entry.js +0 -5
  1183. package/dist/calcite/p-b10af2b4.entry.js +0 -5
  1184. package/dist/calcite/p-b2b6f712.js +0 -5
  1185. package/dist/calcite/p-b3c5247b.system.entry.js +0 -5
  1186. package/dist/calcite/p-b47dc903.system.entry.js +0 -5
  1187. package/dist/calcite/p-b765d197.system.js +0 -5
  1188. package/dist/calcite/p-bb401f25.system.js +0 -5
  1189. package/dist/calcite/p-bccbf58a.entry.js +0 -5
  1190. package/dist/calcite/p-bdcb43b1.system.entry.js +0 -5
  1191. package/dist/calcite/p-bffb4da3.system.entry.js +0 -5
  1192. package/dist/calcite/p-c228a1da.system.entry.js +0 -5
  1193. package/dist/calcite/p-c2caeb2a.system.entry.js +0 -5
  1194. package/dist/calcite/p-c4cb35ba.system.entry.js +0 -5
  1195. package/dist/calcite/p-c5ec8d74.js +0 -11
  1196. package/dist/calcite/p-c9fc13b9.system.entry.js +0 -5
  1197. package/dist/calcite/p-cb847074.entry.js +0 -5
  1198. package/dist/calcite/p-cbc6fee6.entry.js +0 -5
  1199. package/dist/calcite/p-cd5f5c8f.js +0 -5
  1200. package/dist/calcite/p-cd9226a1.system.entry.js +0 -5
  1201. package/dist/calcite/p-daf5f04c.system.js +0 -5
  1202. package/dist/calcite/p-dcf33bb2.js +0 -5
  1203. package/dist/calcite/p-dd9f2e61.js +0 -5
  1204. package/dist/calcite/p-e22ab8fa.entry.js +0 -5
  1205. package/dist/calcite/p-e3280a36.system.entry.js +0 -5
  1206. package/dist/calcite/p-e43605c5.entry.js +0 -5
  1207. package/dist/calcite/p-e4d1651b.system.entry.js +0 -5
  1208. package/dist/calcite/p-e55c5bb4.entry.js +0 -5
  1209. package/dist/calcite/p-ea4119b1.system.entry.js +0 -5
  1210. package/dist/calcite/p-ec9bab33.system.js +0 -5
  1211. package/dist/calcite/p-ecc31b40.system.entry.js +0 -5
  1212. package/dist/calcite/p-edf1e815.system.entry.js +0 -5
  1213. package/dist/calcite/p-ee522afa.system.entry.js +0 -5
  1214. package/dist/calcite/p-ef6b4184.js +0 -5
  1215. package/dist/calcite/p-f09e27b0.system.js +0 -5
  1216. package/dist/calcite/p-fa922721.system.js +0 -5
  1217. package/dist/calcite/p-fe9380a0.system.js +0 -5
  1218. package/dist/components/resources4.js +0 -15
  1219. package/dist/components/resources5.js +0 -32
  1220. package/dist/components/tooltip-manager.js +0 -175
  1221. package/dist/esm-es5/dom-e7fa77b9.js +0 -5
  1222. package/dist/esm-es5/form-5e4609eb.js +0 -5
  1223. package/dist/esm-es5/label-68f22660.js +0 -5
  1224. package/dist/esm-es5/locale-fc850b7c.js +0 -5
  1225. package/dist/esm-es5/number-8779395f.js +0 -5
  1226. package/dist/esm-es5/resources-b5c3d9a7.js +0 -5
  1227. package/dist/esm-es5/sortable.esm-04824d33.js +0 -11
@@ -1,9 +1,10 @@
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.83
4
5
  */
5
6
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
6
- import { c as getThemeName } from './dom.js';
7
+ import { d as getThemeName } from './dom.js';
7
8
 
8
9
  function createCommonjsModule(fn, basedir, module) {
9
10
  return module = {
@@ -456,1023 +457,995 @@ function hexDouble(num) {
456
457
  }
457
458
  });
458
459
 
459
- var colorName = {
460
- "aliceblue": [240, 248, 255],
461
- "antiquewhite": [250, 235, 215],
462
- "aqua": [0, 255, 255],
463
- "aquamarine": [127, 255, 212],
464
- "azure": [240, 255, 255],
465
- "beige": [245, 245, 220],
466
- "bisque": [255, 228, 196],
467
- "black": [0, 0, 0],
468
- "blanchedalmond": [255, 235, 205],
469
- "blue": [0, 0, 255],
470
- "blueviolet": [138, 43, 226],
471
- "brown": [165, 42, 42],
472
- "burlywood": [222, 184, 135],
473
- "cadetblue": [95, 158, 160],
474
- "chartreuse": [127, 255, 0],
475
- "chocolate": [210, 105, 30],
476
- "coral": [255, 127, 80],
477
- "cornflowerblue": [100, 149, 237],
478
- "cornsilk": [255, 248, 220],
479
- "crimson": [220, 20, 60],
480
- "cyan": [0, 255, 255],
481
- "darkblue": [0, 0, 139],
482
- "darkcyan": [0, 139, 139],
483
- "darkgoldenrod": [184, 134, 11],
484
- "darkgray": [169, 169, 169],
485
- "darkgreen": [0, 100, 0],
486
- "darkgrey": [169, 169, 169],
487
- "darkkhaki": [189, 183, 107],
488
- "darkmagenta": [139, 0, 139],
489
- "darkolivegreen": [85, 107, 47],
490
- "darkorange": [255, 140, 0],
491
- "darkorchid": [153, 50, 204],
492
- "darkred": [139, 0, 0],
493
- "darksalmon": [233, 150, 122],
494
- "darkseagreen": [143, 188, 143],
495
- "darkslateblue": [72, 61, 139],
496
- "darkslategray": [47, 79, 79],
497
- "darkslategrey": [47, 79, 79],
498
- "darkturquoise": [0, 206, 209],
499
- "darkviolet": [148, 0, 211],
500
- "deeppink": [255, 20, 147],
501
- "deepskyblue": [0, 191, 255],
502
- "dimgray": [105, 105, 105],
503
- "dimgrey": [105, 105, 105],
504
- "dodgerblue": [30, 144, 255],
505
- "firebrick": [178, 34, 34],
506
- "floralwhite": [255, 250, 240],
507
- "forestgreen": [34, 139, 34],
508
- "fuchsia": [255, 0, 255],
509
- "gainsboro": [220, 220, 220],
510
- "ghostwhite": [248, 248, 255],
511
- "gold": [255, 215, 0],
512
- "goldenrod": [218, 165, 32],
513
- "gray": [128, 128, 128],
514
- "green": [0, 128, 0],
515
- "greenyellow": [173, 255, 47],
516
- "grey": [128, 128, 128],
517
- "honeydew": [240, 255, 240],
518
- "hotpink": [255, 105, 180],
519
- "indianred": [205, 92, 92],
520
- "indigo": [75, 0, 130],
521
- "ivory": [255, 255, 240],
522
- "khaki": [240, 230, 140],
523
- "lavender": [230, 230, 250],
524
- "lavenderblush": [255, 240, 245],
525
- "lawngreen": [124, 252, 0],
526
- "lemonchiffon": [255, 250, 205],
527
- "lightblue": [173, 216, 230],
528
- "lightcoral": [240, 128, 128],
529
- "lightcyan": [224, 255, 255],
530
- "lightgoldenrodyellow": [250, 250, 210],
531
- "lightgray": [211, 211, 211],
532
- "lightgreen": [144, 238, 144],
533
- "lightgrey": [211, 211, 211],
534
- "lightpink": [255, 182, 193],
535
- "lightsalmon": [255, 160, 122],
536
- "lightseagreen": [32, 178, 170],
537
- "lightskyblue": [135, 206, 250],
538
- "lightslategray": [119, 136, 153],
539
- "lightslategrey": [119, 136, 153],
540
- "lightsteelblue": [176, 196, 222],
541
- "lightyellow": [255, 255, 224],
542
- "lime": [0, 255, 0],
543
- "limegreen": [50, 205, 50],
544
- "linen": [250, 240, 230],
545
- "magenta": [255, 0, 255],
546
- "maroon": [128, 0, 0],
547
- "mediumaquamarine": [102, 205, 170],
548
- "mediumblue": [0, 0, 205],
549
- "mediumorchid": [186, 85, 211],
550
- "mediumpurple": [147, 112, 219],
551
- "mediumseagreen": [60, 179, 113],
552
- "mediumslateblue": [123, 104, 238],
553
- "mediumspringgreen": [0, 250, 154],
554
- "mediumturquoise": [72, 209, 204],
555
- "mediumvioletred": [199, 21, 133],
556
- "midnightblue": [25, 25, 112],
557
- "mintcream": [245, 255, 250],
558
- "mistyrose": [255, 228, 225],
559
- "moccasin": [255, 228, 181],
560
- "navajowhite": [255, 222, 173],
561
- "navy": [0, 0, 128],
562
- "oldlace": [253, 245, 230],
563
- "olive": [128, 128, 0],
564
- "olivedrab": [107, 142, 35],
565
- "orange": [255, 165, 0],
566
- "orangered": [255, 69, 0],
567
- "orchid": [218, 112, 214],
568
- "palegoldenrod": [238, 232, 170],
569
- "palegreen": [152, 251, 152],
570
- "paleturquoise": [175, 238, 238],
571
- "palevioletred": [219, 112, 147],
572
- "papayawhip": [255, 239, 213],
573
- "peachpuff": [255, 218, 185],
574
- "peru": [205, 133, 63],
575
- "pink": [255, 192, 203],
576
- "plum": [221, 160, 221],
577
- "powderblue": [176, 224, 230],
578
- "purple": [128, 0, 128],
579
- "rebeccapurple": [102, 51, 153],
580
- "red": [255, 0, 0],
581
- "rosybrown": [188, 143, 143],
582
- "royalblue": [65, 105, 225],
583
- "saddlebrown": [139, 69, 19],
584
- "salmon": [250, 128, 114],
585
- "sandybrown": [244, 164, 96],
586
- "seagreen": [46, 139, 87],
587
- "seashell": [255, 245, 238],
588
- "sienna": [160, 82, 45],
589
- "silver": [192, 192, 192],
590
- "skyblue": [135, 206, 235],
591
- "slateblue": [106, 90, 205],
592
- "slategray": [112, 128, 144],
593
- "slategrey": [112, 128, 144],
594
- "snow": [255, 250, 250],
595
- "springgreen": [0, 255, 127],
596
- "steelblue": [70, 130, 180],
597
- "tan": [210, 180, 140],
598
- "teal": [0, 128, 128],
599
- "thistle": [216, 191, 216],
600
- "tomato": [255, 99, 71],
601
- "turquoise": [64, 224, 208],
602
- "violet": [238, 130, 238],
603
- "wheat": [245, 222, 179],
604
- "white": [255, 255, 255],
605
- "whitesmoke": [245, 245, 245],
606
- "yellow": [255, 255, 0],
607
- "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]
608
609
  };
609
610
 
610
611
  /* MIT license */
611
-
612
612
  /* eslint-disable no-mixed-operators */
613
+
614
+
613
615
  // NOTE: conversions should only return primitive values (i.e. arrays, or
614
616
  // values that give correct `typeof` results).
615
617
  // do not use box values types (i.e. Number(), String(), etc.)
616
618
 
617
619
  const reverseKeywords = {};
618
-
619
620
  for (const key of Object.keys(colorName)) {
620
- reverseKeywords[colorName[key]] = key;
621
+ reverseKeywords[colorName[key]] = key;
621
622
  }
622
623
 
623
624
  const convert$1 = {
624
- rgb: {
625
- channels: 3,
626
- labels: 'rgb'
627
- },
628
- hsl: {
629
- channels: 3,
630
- labels: 'hsl'
631
- },
632
- hsv: {
633
- channels: 3,
634
- labels: 'hsv'
635
- },
636
- hwb: {
637
- channels: 3,
638
- labels: 'hwb'
639
- },
640
- cmyk: {
641
- channels: 4,
642
- labels: 'cmyk'
643
- },
644
- xyz: {
645
- channels: 3,
646
- labels: 'xyz'
647
- },
648
- lab: {
649
- channels: 3,
650
- labels: 'lab'
651
- },
652
- lch: {
653
- channels: 3,
654
- labels: 'lch'
655
- },
656
- hex: {
657
- channels: 1,
658
- labels: ['hex']
659
- },
660
- keyword: {
661
- channels: 1,
662
- labels: ['keyword']
663
- },
664
- ansi16: {
665
- channels: 1,
666
- labels: ['ansi16']
667
- },
668
- ansi256: {
669
- channels: 1,
670
- labels: ['ansi256']
671
- },
672
- hcg: {
673
- channels: 3,
674
- labels: ['h', 'c', 'g']
675
- },
676
- apple: {
677
- channels: 3,
678
- labels: ['r16', 'g16', 'b16']
679
- },
680
- gray: {
681
- channels: 1,
682
- labels: ['gray']
683
- }
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']}
684
640
  };
685
- var conversions = convert$1; // Hide .channels and .labels properties
686
641
 
642
+ var conversions = convert$1;
643
+
644
+ // Hide .channels and .labels properties
687
645
  for (const model of Object.keys(convert$1)) {
688
- if (!('channels' in convert$1[model])) {
689
- throw new Error('missing channels property: ' + model);
690
- }
646
+ if (!('channels' in convert$1[model])) {
647
+ throw new Error('missing channels property: ' + model);
648
+ }
691
649
 
692
- if (!('labels' in convert$1[model])) {
693
- throw new Error('missing channel labels property: ' + model);
694
- }
650
+ if (!('labels' in convert$1[model])) {
651
+ throw new Error('missing channel labels property: ' + model);
652
+ }
695
653
 
696
- if (convert$1[model].labels.length !== convert$1[model].channels) {
697
- throw new Error('channel and label counts mismatch: ' + model);
698
- }
654
+ if (convert$1[model].labels.length !== convert$1[model].channels) {
655
+ throw new Error('channel and label counts mismatch: ' + model);
656
+ }
699
657
 
700
- const {
701
- channels,
702
- labels
703
- } = convert$1[model];
704
- delete convert$1[model].channels;
705
- delete convert$1[model].labels;
706
- Object.defineProperty(convert$1[model], 'channels', {
707
- value: channels
708
- });
709
- Object.defineProperty(convert$1[model], 'labels', {
710
- value: labels
711
- });
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});
712
663
  }
713
664
 
714
665
  convert$1.rgb.hsl = function (rgb) {
715
- const r = rgb[0] / 255;
716
- const g = rgb[1] / 255;
717
- const b = rgb[2] / 255;
718
- const min = Math.min(r, g, b);
719
- const max = Math.max(r, g, b);
720
- const delta = max - min;
721
- let h;
722
- let s;
723
-
724
- if (max === min) {
725
- h = 0;
726
- } else if (r === max) {
727
- h = (g - b) / delta;
728
- } else if (g === max) {
729
- h = 2 + (b - r) / delta;
730
- } else if (b === max) {
731
- h = 4 + (r - g) / delta;
732
- }
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
+ }
733
684
 
734
- h = Math.min(h * 60, 360);
685
+ h = Math.min(h * 60, 360);
735
686
 
736
- if (h < 0) {
737
- h += 360;
738
- }
687
+ if (h < 0) {
688
+ h += 360;
689
+ }
739
690
 
740
- const l = (min + max) / 2;
691
+ const l = (min + max) / 2;
741
692
 
742
- if (max === min) {
743
- s = 0;
744
- } else if (l <= 0.5) {
745
- s = delta / (max + min);
746
- } else {
747
- s = delta / (2 - max - min);
748
- }
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
+ }
749
700
 
750
- return [h, s * 100, l * 100];
701
+ return [h, s * 100, l * 100];
751
702
  };
752
703
 
753
704
  convert$1.rgb.hsv = function (rgb) {
754
- let rdif;
755
- let gdif;
756
- let bdif;
757
- let h;
758
- let s;
759
- const r = rgb[0] / 255;
760
- const g = rgb[1] / 255;
761
- const b = rgb[2] / 255;
762
- const v = Math.max(r, g, b);
763
- const diff = v - Math.min(r, g, b);
764
-
765
- const diffc = function (c) {
766
- return (v - c) / 6 / diff + 1 / 2;
767
- };
768
-
769
- if (diff === 0) {
770
- h = 0;
771
- s = 0;
772
- } else {
773
- s = diff / v;
774
- rdif = diffc(r);
775
- gdif = diffc(g);
776
- bdif = diffc(b);
777
-
778
- if (r === v) {
779
- h = bdif - gdif;
780
- } else if (g === v) {
781
- h = 1 / 3 + rdif - bdif;
782
- } else if (b === v) {
783
- h = 2 / 3 + gdif - rdif;
784
- }
785
-
786
- if (h < 0) {
787
- h += 1;
788
- } else if (h > 1) {
789
- h -= 1;
790
- }
791
- }
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
+ };
719
+
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
+ }
792
743
 
793
- return [h * 360, s * 100, v * 100];
744
+ return [
745
+ h * 360,
746
+ s * 100,
747
+ v * 100
748
+ ];
794
749
  };
795
750
 
796
751
  convert$1.rgb.hwb = function (rgb) {
797
- const r = rgb[0];
798
- const g = rgb[1];
799
- let b = rgb[2];
800
- const h = convert$1.rgb.hsl(rgb)[0];
801
- const w = 1 / 255 * Math.min(r, Math.min(g, b));
802
- b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
803
- 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];
804
761
  };
805
762
 
806
763
  convert$1.rgb.cmyk = function (rgb) {
807
- const r = rgb[0] / 255;
808
- const g = rgb[1] / 255;
809
- const b = rgb[2] / 255;
810
- const k = Math.min(1 - r, 1 - g, 1 - b);
811
- const c = (1 - r - k) / (1 - k) || 0;
812
- const m = (1 - g - k) / (1 - k) || 0;
813
- const y = (1 - b - k) / (1 - k) || 0;
814
- 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];
815
774
  };
816
775
 
817
776
  function comparativeDistance(x, y) {
818
- /*
819
- See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
820
- */
821
- 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
+ );
822
785
  }
823
786
 
824
787
  convert$1.rgb.keyword = function (rgb) {
825
- const reversed = reverseKeywords[rgb];
826
-
827
- if (reversed) {
828
- return reversed;
829
- }
788
+ const reversed = reverseKeywords[rgb];
789
+ if (reversed) {
790
+ return reversed;
791
+ }
830
792
 
831
- let currentClosestDistance = Infinity;
832
- let currentClosestKeyword;
793
+ let currentClosestDistance = Infinity;
794
+ let currentClosestKeyword;
833
795
 
834
- for (const keyword of Object.keys(colorName)) {
835
- const value = colorName[keyword]; // Compute comparative distance
796
+ for (const keyword of Object.keys(colorName)) {
797
+ const value = colorName[keyword];
836
798
 
837
- const distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest
799
+ // Compute comparative distance
800
+ const distance = comparativeDistance(rgb, value);
838
801
 
839
- if (distance < currentClosestDistance) {
840
- currentClosestDistance = distance;
841
- currentClosestKeyword = keyword;
842
- }
843
- }
802
+ // Check if its less, if so set as closest
803
+ if (distance < currentClosestDistance) {
804
+ currentClosestDistance = distance;
805
+ currentClosestKeyword = keyword;
806
+ }
807
+ }
844
808
 
845
- return currentClosestKeyword;
809
+ return currentClosestKeyword;
846
810
  };
847
811
 
848
812
  convert$1.keyword.rgb = function (keyword) {
849
- return colorName[keyword];
813
+ return colorName[keyword];
850
814
  };
851
815
 
852
816
  convert$1.rgb.xyz = function (rgb) {
853
- let r = rgb[0] / 255;
854
- let g = rgb[1] / 255;
855
- 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);
856
825
 
857
- r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
858
- g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
859
- b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
860
- const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
861
- const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
862
- const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
863
- return [x * 100, y * 100, z * 100];
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);
829
+
830
+ return [x * 100, y * 100, z * 100];
864
831
  };
865
832
 
866
833
  convert$1.rgb.lab = function (rgb) {
867
- const xyz = convert$1.rgb.xyz(rgb);
868
- let x = xyz[0];
869
- let y = xyz[1];
870
- let z = xyz[2];
871
- x /= 95.047;
872
- y /= 100;
873
- z /= 108.883;
874
- x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
875
- y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
876
- z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
877
- const l = 116 * y - 16;
878
- const a = 500 * (x - y);
879
- const b = 200 * (y - z);
880
- 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];
881
852
  };
882
853
 
883
854
  convert$1.hsl.rgb = function (hsl) {
884
- const h = hsl[0] / 360;
885
- const s = hsl[1] / 100;
886
- const l = hsl[2] / 100;
887
- let t2;
888
- let t3;
889
- let val;
890
-
891
- if (s === 0) {
892
- val = l * 255;
893
- return [val, val, val];
894
- }
895
-
896
- if (l < 0.5) {
897
- t2 = l * (1 + s);
898
- } else {
899
- t2 = l + s - l * s;
900
- }
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
+ }
901
866
 
902
- const t1 = 2 * l - t2;
903
- const rgb = [0, 0, 0];
867
+ if (l < 0.5) {
868
+ t2 = l * (1 + s);
869
+ } else {
870
+ t2 = l + s - l * s;
871
+ }
904
872
 
905
- for (let i = 0; i < 3; i++) {
906
- t3 = h + 1 / 3 * -(i - 1);
873
+ const t1 = 2 * l - t2;
907
874
 
908
- if (t3 < 0) {
909
- t3++;
910
- }
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
+ }
911
881
 
912
- if (t3 > 1) {
913
- t3--;
914
- }
882
+ if (t3 > 1) {
883
+ t3--;
884
+ }
915
885
 
916
- if (6 * t3 < 1) {
917
- val = t1 + (t2 - t1) * 6 * t3;
918
- } else if (2 * t3 < 1) {
919
- val = t2;
920
- } else if (3 * t3 < 2) {
921
- val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
922
- } else {
923
- val = t1;
924
- }
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
+ }
925
895
 
926
- rgb[i] = val * 255;
927
- }
896
+ rgb[i] = val * 255;
897
+ }
928
898
 
929
- return rgb;
899
+ return rgb;
930
900
  };
931
901
 
932
902
  convert$1.hsl.hsv = function (hsl) {
933
- const h = hsl[0];
934
- let s = hsl[1] / 100;
935
- let l = hsl[2] / 100;
936
- let smin = s;
937
- const lmin = Math.max(l, 0.01);
938
- l *= 2;
939
- s *= l <= 1 ? l : 2 - l;
940
- smin *= lmin <= 1 ? lmin : 2 - lmin;
941
- const v = (l + s) / 2;
942
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
943
- 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];
944
916
  };
945
917
 
946
918
  convert$1.hsv.rgb = function (hsv) {
947
- const h = hsv[0] / 60;
948
- const s = hsv[1] / 100;
949
- let v = hsv[2] / 100;
950
- const hi = Math.floor(h) % 6;
951
- const f = h - Math.floor(h);
952
- const p = 255 * v * (1 - s);
953
- const q = 255 * v * (1 - s * f);
954
- const t = 255 * v * (1 - s * (1 - f));
955
- v *= 255;
956
-
957
- switch (hi) {
958
- case 0:
959
- return [v, t, p];
960
-
961
- case 1:
962
- return [q, v, p];
963
-
964
- case 2:
965
- return [p, v, t];
966
-
967
- case 3:
968
- return [p, q, v];
969
-
970
- case 4:
971
- return [t, p, v];
972
-
973
- case 5:
974
- return [v, p, q];
975
- }
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
+ }
976
944
  };
977
945
 
978
946
  convert$1.hsv.hsl = function (hsv) {
979
- const h = hsv[0];
980
- const s = hsv[1] / 100;
981
- const v = hsv[2] / 100;
982
- const vmin = Math.max(v, 0.01);
983
- let sl;
984
- let l;
985
- l = (2 - s) * v;
986
- const lmin = (2 - s) * vmin;
987
- sl = s * vmin;
988
- sl /= lmin <= 1 ? lmin : 2 - lmin;
989
- sl = sl || 0;
990
- l /= 2;
991
- return [h, sl * 100, l * 100];
992
- }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
993
-
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
+ };
994
963
 
964
+ // http://dev.w3.org/csswg/css-color/#hwb-to-rgb
995
965
  convert$1.hwb.rgb = function (hwb) {
996
- const h = hwb[0] / 360;
997
- let wh = hwb[1] / 100;
998
- let bl = hwb[2] / 100;
999
- const ratio = wh + bl;
1000
- let f; // Wh + bl cant be > 1
1001
-
1002
- if (ratio > 1) {
1003
- wh /= ratio;
1004
- bl /= ratio;
1005
- }
1006
-
1007
- const i = Math.floor(6 * h);
1008
- const v = 1 - bl;
1009
- f = 6 * h - i;
1010
-
1011
- if ((i & 0x01) !== 0) {
1012
- f = 1 - f;
1013
- }
1014
-
1015
- const n = wh + f * (v - wh); // Linear interpolation
1016
-
1017
- let r;
1018
- let g;
1019
- let b;
1020
- /* eslint-disable max-statements-per-line,no-multi-spaces */
1021
-
1022
- switch (i) {
1023
- default:
1024
- case 6:
1025
- case 0:
1026
- r = v;
1027
- g = n;
1028
- b = wh;
1029
- break;
1030
-
1031
- case 1:
1032
- r = n;
1033
- g = v;
1034
- b = wh;
1035
- break;
1036
-
1037
- case 2:
1038
- r = wh;
1039
- g = v;
1040
- b = n;
1041
- 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
+ }
1042
977
 
1043
- case 3:
1044
- r = wh;
1045
- g = n;
1046
- b = v;
1047
- break;
978
+ const i = Math.floor(6 * h);
979
+ const v = 1 - bl;
980
+ f = 6 * h - i;
1048
981
 
1049
- case 4:
1050
- r = n;
1051
- g = wh;
1052
- b = v;
1053
- break;
982
+ if ((i & 0x01) !== 0) {
983
+ f = 1 - f;
984
+ }
1054
985
 
1055
- case 5:
1056
- r = v;
1057
- g = wh;
1058
- b = n;
1059
- break;
1060
- }
1061
- /* eslint-enable max-statements-per-line,no-multi-spaces */
986
+ const n = wh + f * (v - wh); // Linear interpolation
1062
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 */
1063
1003
 
1064
- return [r * 255, g * 255, b * 255];
1004
+ return [r * 255, g * 255, b * 255];
1065
1005
  };
1066
1006
 
1067
1007
  convert$1.cmyk.rgb = function (cmyk) {
1068
- const c = cmyk[0] / 100;
1069
- const m = cmyk[1] / 100;
1070
- const y = cmyk[2] / 100;
1071
- const k = cmyk[3] / 100;
1072
- const r = 1 - Math.min(1, c * (1 - k) + k);
1073
- const g = 1 - Math.min(1, m * (1 - k) + k);
1074
- const b = 1 - Math.min(1, y * (1 - k) + k);
1075
- 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];
1076
1018
  };
1077
1019
 
1078
1020
  convert$1.xyz.rgb = function (xyz) {
1079
- const x = xyz[0] / 100;
1080
- const y = xyz[1] / 100;
1081
- const z = xyz[2] / 100;
1082
- let r;
1083
- let g;
1084
- let b;
1085
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
1086
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
1087
- b = x * 0.0557 + y * -0.2040 + z * 1.0570; // Assume sRGB
1088
-
1089
- r = r > 0.0031308 ? 1.055 * r ** (1.0 / 2.4) - 0.055 : r * 12.92;
1090
- g = g > 0.0031308 ? 1.055 * g ** (1.0 / 2.4) - 0.055 : g * 12.92;
1091
- b = b > 0.0031308 ? 1.055 * b ** (1.0 / 2.4) - 0.055 : b * 12.92;
1092
- r = Math.min(Math.max(0, r), 1);
1093
- g = Math.min(Math.max(0, g), 1);
1094
- b = Math.min(Math.max(0, b), 1);
1095
- 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];
1096
1050
  };
1097
1051
 
1098
1052
  convert$1.xyz.lab = function (xyz) {
1099
- let x = xyz[0];
1100
- let y = xyz[1];
1101
- let z = xyz[2];
1102
- x /= 95.047;
1103
- y /= 100;
1104
- z /= 108.883;
1105
- x = x > 0.008856 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
1106
- y = y > 0.008856 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
1107
- z = z > 0.008856 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
1108
- const l = 116 * y - 16;
1109
- const a = 500 * (x - y);
1110
- const b = 200 * (y - z);
1111
- 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];
1112
1070
  };
1113
1071
 
1114
1072
  convert$1.lab.xyz = function (lab) {
1115
- const l = lab[0];
1116
- const a = lab[1];
1117
- const b = lab[2];
1118
- let x;
1119
- let y;
1120
- let z;
1121
- y = (l + 16) / 116;
1122
- x = a / 500 + y;
1123
- z = y - b / 200;
1124
- const y2 = y ** 3;
1125
- const x2 = x ** 3;
1126
- const z2 = z ** 3;
1127
- y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
1128
- x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
1129
- z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
1130
- x *= 95.047;
1131
- y *= 100;
1132
- z *= 108.883;
1133
- 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];
1134
1096
  };
1135
1097
 
1136
1098
  convert$1.lab.lch = function (lab) {
1137
- const l = lab[0];
1138
- const a = lab[1];
1139
- const b = lab[2];
1140
- let h;
1141
- const hr = Math.atan2(b, a);
1142
- h = hr * 360 / 2 / Math.PI;
1143
-
1144
- if (h < 0) {
1145
- h += 360;
1146
- }
1099
+ const l = lab[0];
1100
+ const a = lab[1];
1101
+ const b = lab[2];
1102
+ let h;
1103
+
1104
+ const hr = Math.atan2(b, a);
1105
+ h = hr * 360 / 2 / Math.PI;
1106
+
1107
+ if (h < 0) {
1108
+ h += 360;
1109
+ }
1147
1110
 
1148
- const c = Math.sqrt(a * a + b * b);
1149
- return [l, c, h];
1111
+ const c = Math.sqrt(a * a + b * b);
1112
+
1113
+ return [l, c, h];
1150
1114
  };
1151
1115
 
1152
1116
  convert$1.lch.lab = function (lch) {
1153
- const l = lch[0];
1154
- const c = lch[1];
1155
- const h = lch[2];
1156
- const hr = h / 360 * 2 * Math.PI;
1157
- const a = c * Math.cos(hr);
1158
- const b = c * Math.sin(hr);
1159
- 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];
1160
1126
  };
1161
1127
 
1162
1128
  convert$1.rgb.ansi16 = function (args, saturation = null) {
1163
- const [r, g, b] = args;
1164
- 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
1165
1131
 
1166
- value = Math.round(value / 50);
1132
+ value = Math.round(value / 50);
1167
1133
 
1168
- if (value === 0) {
1169
- return 30;
1170
- }
1134
+ if (value === 0) {
1135
+ return 30;
1136
+ }
1171
1137
 
1172
- 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));
1173
1142
 
1174
- if (value === 2) {
1175
- ansi += 60;
1176
- }
1143
+ if (value === 2) {
1144
+ ansi += 60;
1145
+ }
1177
1146
 
1178
- return ansi;
1147
+ return ansi;
1179
1148
  };
1180
1149
 
1181
1150
  convert$1.hsv.ansi16 = function (args) {
1182
- // Optimization here; we already know the value and don't need to get
1183
- // it converted for us.
1184
- 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]);
1185
1154
  };
1186
1155
 
1187
1156
  convert$1.rgb.ansi256 = function (args) {
1188
- const r = args[0];
1189
- const g = args[1];
1190
- const b = args[2]; // We use the extended greyscale palette here, with the exception of
1191
- // 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
+ }
1192
1167
 
1193
- if (r === g && g === b) {
1194
- if (r < 8) {
1195
- return 16;
1196
- }
1168
+ if (r > 248) {
1169
+ return 231;
1170
+ }
1197
1171
 
1198
- if (r > 248) {
1199
- return 231;
1200
- }
1172
+ return Math.round(((r - 8) / 247) * 24) + 232;
1173
+ }
1201
1174
 
1202
- return Math.round((r - 8) / 247 * 24) + 232;
1203
- }
1175
+ const ansi = 16
1176
+ + (36 * Math.round(r / 255 * 5))
1177
+ + (6 * Math.round(g / 255 * 5))
1178
+ + Math.round(b / 255 * 5);
1204
1179
 
1205
- const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
1206
- return ansi;
1180
+ return ansi;
1207
1181
  };
1208
1182
 
1209
1183
  convert$1.ansi16.rgb = function (args) {
1210
- let color = args % 10; // Handle greyscale
1184
+ let color = args % 10;
1211
1185
 
1212
- if (color === 0 || color === 7) {
1213
- if (args > 50) {
1214
- color += 3.5;
1215
- }
1186
+ // Handle greyscale
1187
+ if (color === 0 || color === 7) {
1188
+ if (args > 50) {
1189
+ color += 3.5;
1190
+ }
1216
1191
 
1217
- color = color / 10.5 * 255;
1218
- return [color, color, color];
1219
- }
1192
+ color = color / 10.5 * 255;
1220
1193
 
1221
- const mult = (~~(args > 50) + 1) * 0.5;
1222
- const r = (color & 1) * mult * 255;
1223
- const g = (color >> 1 & 1) * mult * 255;
1224
- const b = (color >> 2 & 1) * mult * 255;
1225
- return [r, g, b];
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;
1201
+
1202
+ return [r, g, b];
1226
1203
  };
1227
1204
 
1228
1205
  convert$1.ansi256.rgb = function (args) {
1229
- // Handle greyscale
1230
- if (args >= 232) {
1231
- const c = (args - 232) * 10 + 8;
1232
- return [c, c, c];
1233
- }
1206
+ // Handle greyscale
1207
+ if (args >= 232) {
1208
+ const c = (args - 232) * 10 + 8;
1209
+ return [c, c, c];
1210
+ }
1211
+
1212
+ args -= 16;
1234
1213
 
1235
- args -= 16;
1236
- let rem;
1237
- const r = Math.floor(args / 36) / 5 * 255;
1238
- const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
1239
- const b = rem % 6 / 5 * 255;
1240
- return [r, g, b];
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;
1218
+
1219
+ return [r, g, b];
1241
1220
  };
1242
1221
 
1243
1222
  convert$1.rgb.hex = function (args) {
1244
- const integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF);
1245
- const string = integer.toString(16).toUpperCase();
1246
- 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;
1247
1229
  };
1248
1230
 
1249
1231
  convert$1.hex.rgb = function (args) {
1250
- 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
+ }
1251
1236
 
1252
- if (!match) {
1253
- return [0, 0, 0];
1254
- }
1237
+ let colorString = match[0];
1255
1238
 
1256
- let colorString = match[0];
1239
+ if (match[0].length === 3) {
1240
+ colorString = colorString.split('').map(char => {
1241
+ return char + char;
1242
+ }).join('');
1243
+ }
1257
1244
 
1258
- if (match[0].length === 3) {
1259
- colorString = colorString.split('').map(char => {
1260
- return char + char;
1261
- }).join('');
1262
- }
1245
+ const integer = parseInt(colorString, 16);
1246
+ const r = (integer >> 16) & 0xFF;
1247
+ const g = (integer >> 8) & 0xFF;
1248
+ const b = integer & 0xFF;
1263
1249
 
1264
- const integer = parseInt(colorString, 16);
1265
- const r = integer >> 16 & 0xFF;
1266
- const g = integer >> 8 & 0xFF;
1267
- const b = integer & 0xFF;
1268
- return [r, g, b];
1250
+ return [r, g, b];
1269
1251
  };
1270
1252
 
1271
1253
  convert$1.rgb.hcg = function (rgb) {
1272
- const r = rgb[0] / 255;
1273
- const g = rgb[1] / 255;
1274
- const b = rgb[2] / 255;
1275
- const max = Math.max(Math.max(r, g), b);
1276
- const min = Math.min(Math.min(r, g), b);
1277
- const chroma = max - min;
1278
- let grayscale;
1279
- let hue;
1280
-
1281
- if (chroma < 1) {
1282
- grayscale = min / (1 - chroma);
1283
- } else {
1284
- grayscale = 0;
1285
- }
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
+ }
1286
1268
 
1287
- if (chroma <= 0) {
1288
- hue = 0;
1289
- } else if (max === r) {
1290
- hue = (g - b) / chroma % 6;
1291
- } else if (max === g) {
1292
- hue = 2 + (b - r) / chroma;
1293
- } else {
1294
- hue = 4 + (r - g) / chroma;
1295
- }
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
+ }
1296
1280
 
1297
- hue /= 6;
1298
- hue %= 1;
1299
- return [hue * 360, chroma * 100, grayscale * 100];
1281
+ hue /= 6;
1282
+ hue %= 1;
1283
+
1284
+ return [hue * 360, chroma * 100, grayscale * 100];
1300
1285
  };
1301
1286
 
1302
1287
  convert$1.hsl.hcg = function (hsl) {
1303
- const s = hsl[1] / 100;
1304
- const l = hsl[2] / 100;
1305
- const c = l < 0.5 ? 2.0 * s * l : 2.0 * s * (1.0 - l);
1306
- let f = 0;
1288
+ const s = hsl[1] / 100;
1289
+ const l = hsl[2] / 100;
1307
1290
 
1308
- if (c < 1.0) {
1309
- f = (l - 0.5 * c) / (1.0 - c);
1310
- }
1291
+ const c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));
1292
+
1293
+ let f = 0;
1294
+ if (c < 1.0) {
1295
+ f = (l - 0.5 * c) / (1.0 - c);
1296
+ }
1311
1297
 
1312
- return [hsl[0], c * 100, f * 100];
1298
+ return [hsl[0], c * 100, f * 100];
1313
1299
  };
1314
1300
 
1315
1301
  convert$1.hsv.hcg = function (hsv) {
1316
- const s = hsv[1] / 100;
1317
- const v = hsv[2] / 100;
1318
- const c = s * v;
1319
- let f = 0;
1302
+ const s = hsv[1] / 100;
1303
+ const v = hsv[2] / 100;
1320
1304
 
1321
- if (c < 1.0) {
1322
- f = (v - c) / (1 - c);
1323
- }
1305
+ const c = s * v;
1306
+ let f = 0;
1307
+
1308
+ if (c < 1.0) {
1309
+ f = (v - c) / (1 - c);
1310
+ }
1324
1311
 
1325
- return [hsv[0], c * 100, f * 100];
1312
+ return [hsv[0], c * 100, f * 100];
1326
1313
  };
1327
1314
 
1328
1315
  convert$1.hcg.rgb = function (hcg) {
1329
- const h = hcg[0] / 360;
1330
- const c = hcg[1] / 100;
1331
- const g = hcg[2] / 100;
1332
-
1333
- if (c === 0.0) {
1334
- return [g * 255, g * 255, g * 255];
1335
- }
1336
-
1337
- const pure = [0, 0, 0];
1338
- const hi = h % 1 * 6;
1339
- const v = hi % 1;
1340
- const w = 1 - v;
1341
- let mg = 0;
1342
- /* eslint-disable max-statements-per-line */
1343
-
1344
- switch (Math.floor(hi)) {
1345
- case 0:
1346
- pure[0] = 1;
1347
- pure[1] = v;
1348
- pure[2] = 0;
1349
- break;
1350
-
1351
- case 1:
1352
- pure[0] = w;
1353
- pure[1] = 1;
1354
- pure[2] = 0;
1355
- break;
1356
-
1357
- case 2:
1358
- pure[0] = 0;
1359
- pure[1] = 1;
1360
- pure[2] = v;
1361
- break;
1362
-
1363
- case 3:
1364
- pure[0] = 0;
1365
- pure[1] = w;
1366
- pure[2] = 1;
1367
- break;
1316
+ const h = hcg[0] / 360;
1317
+ const c = hcg[1] / 100;
1318
+ const g = hcg[2] / 100;
1368
1319
 
1369
- case 4:
1370
- pure[0] = v;
1371
- pure[1] = 0;
1372
- pure[2] = 1;
1373
- break;
1320
+ if (c === 0.0) {
1321
+ return [g * 255, g * 255, g * 255];
1322
+ }
1374
1323
 
1375
- default:
1376
- pure[0] = 1;
1377
- pure[1] = 0;
1378
- pure[2] = w;
1379
- }
1380
- /* 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 */
1381
1346
 
1347
+ mg = (1.0 - c) * g;
1382
1348
 
1383
- mg = (1.0 - c) * g;
1384
- 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
+ ];
1385
1354
  };
1386
1355
 
1387
1356
  convert$1.hcg.hsv = function (hcg) {
1388
- const c = hcg[1] / 100;
1389
- const g = hcg[2] / 100;
1390
- const v = c + g * (1.0 - c);
1391
- let f = 0;
1357
+ const c = hcg[1] / 100;
1358
+ const g = hcg[2] / 100;
1392
1359
 
1393
- if (v > 0.0) {
1394
- f = c / v;
1395
- }
1360
+ const v = c + g * (1.0 - c);
1361
+ let f = 0;
1362
+
1363
+ if (v > 0.0) {
1364
+ f = c / v;
1365
+ }
1396
1366
 
1397
- return [hcg[0], f * 100, v * 100];
1367
+ return [hcg[0], f * 100, v * 100];
1398
1368
  };
1399
1369
 
1400
1370
  convert$1.hcg.hsl = function (hcg) {
1401
- const c = hcg[1] / 100;
1402
- const g = hcg[2] / 100;
1403
- const l = g * (1.0 - c) + 0.5 * c;
1404
- let s = 0;
1405
-
1406
- if (l > 0.0 && l < 0.5) {
1407
- s = c / (2 * l);
1408
- } else if (l >= 0.5 && l < 1.0) {
1409
- s = c / (2 * (1 - l));
1410
- }
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;
1376
+
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
+ }
1411
1383
 
1412
- return [hcg[0], s * 100, l * 100];
1384
+ return [hcg[0], s * 100, l * 100];
1413
1385
  };
1414
1386
 
1415
1387
  convert$1.hcg.hwb = function (hcg) {
1416
- const c = hcg[1] / 100;
1417
- const g = hcg[2] / 100;
1418
- const v = c + g * (1.0 - c);
1419
- 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];
1420
1392
  };
1421
1393
 
1422
1394
  convert$1.hwb.hcg = function (hwb) {
1423
- const w = hwb[1] / 100;
1424
- const b = hwb[2] / 100;
1425
- const v = 1 - b;
1426
- const c = v - w;
1427
- let g = 0;
1428
-
1429
- if (c < 1) {
1430
- g = (v - c) / (1 - c);
1431
- }
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
+ }
1432
1404
 
1433
- return [hwb[0], c * 100, g * 100];
1405
+ return [hwb[0], c * 100, g * 100];
1434
1406
  };
1435
1407
 
1436
1408
  convert$1.apple.rgb = function (apple) {
1437
- 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];
1438
1410
  };
1439
1411
 
1440
1412
  convert$1.rgb.apple = function (rgb) {
1441
- 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];
1442
1414
  };
1443
1415
 
1444
1416
  convert$1.gray.rgb = function (args) {
1445
- 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];
1446
1418
  };
1447
1419
 
1448
1420
  convert$1.gray.hsl = function (args) {
1449
- return [0, 0, args[0]];
1421
+ return [0, 0, args[0]];
1450
1422
  };
1451
1423
 
1452
1424
  convert$1.gray.hsv = convert$1.gray.hsl;
1453
1425
 
1454
1426
  convert$1.gray.hwb = function (gray) {
1455
- return [0, 100, gray[0]];
1427
+ return [0, 100, gray[0]];
1456
1428
  };
1457
1429
 
1458
1430
  convert$1.gray.cmyk = function (gray) {
1459
- return [0, 0, 0, gray[0]];
1431
+ return [0, 0, 0, gray[0]];
1460
1432
  };
1461
1433
 
1462
1434
  convert$1.gray.lab = function (gray) {
1463
- return [gray[0], 0, 0];
1435
+ return [gray[0], 0, 0];
1464
1436
  };
1465
1437
 
1466
1438
  convert$1.gray.hex = function (gray) {
1467
- const val = Math.round(gray[0] / 100 * 255) & 0xFF;
1468
- const integer = (val << 16) + (val << 8) + val;
1469
- const string = integer.toString(16).toUpperCase();
1470
- 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;
1471
1444
  };
1472
1445
 
1473
1446
  convert$1.rgb.gray = function (rgb) {
1474
- const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1475
- return [val / 255 * 100];
1447
+ const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
1448
+ return [val / 255 * 100];
1476
1449
  };
1477
1450
 
1478
1451
  /*
@@ -1487,639 +1460,658 @@ convert$1.rgb.gray = function (rgb) {
1487
1460
  */
1488
1461
 
1489
1462
  function buildGraph() {
1490
- const graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3
1491
-
1492
- const models = Object.keys(conversions);
1493
-
1494
- for (let len = models.length, i = 0; i < len; i++) {
1495
- graph[models[i]] = {
1496
- // http://jsperf.com/1-vs-infinity
1497
- // micro-opt, but this is simple.
1498
- distance: -1,
1499
- parent: null
1500
- };
1501
- }
1502
-
1503
- return graph;
1504
- } // 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
+ }
1505
1475
 
1476
+ return graph;
1477
+ }
1506
1478
 
1479
+ // https://en.wikipedia.org/wiki/Breadth-first_search
1507
1480
  function deriveBFS(fromModel) {
1508
- const graph = buildGraph();
1509
- const queue = [fromModel]; // Unshift -> queue -> pop
1481
+ const graph = buildGraph();
1482
+ const queue = [fromModel]; // Unshift -> queue -> pop
1510
1483
 
1511
- graph[fromModel].distance = 0;
1484
+ graph[fromModel].distance = 0;
1512
1485
 
1513
- while (queue.length) {
1514
- const current = queue.pop();
1515
- const adjacents = Object.keys(conversions[current]);
1486
+ while (queue.length) {
1487
+ const current = queue.pop();
1488
+ const adjacents = Object.keys(conversions[current]);
1516
1489
 
1517
- for (let len = adjacents.length, i = 0; i < len; i++) {
1518
- const adjacent = adjacents[i];
1519
- 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];
1520
1493
 
1521
- if (node.distance === -1) {
1522
- node.distance = graph[current].distance + 1;
1523
- node.parent = current;
1524
- queue.unshift(adjacent);
1525
- }
1526
- }
1527
- }
1494
+ if (node.distance === -1) {
1495
+ node.distance = graph[current].distance + 1;
1496
+ node.parent = current;
1497
+ queue.unshift(adjacent);
1498
+ }
1499
+ }
1500
+ }
1528
1501
 
1529
- return graph;
1502
+ return graph;
1530
1503
  }
1531
1504
 
1532
1505
  function link(from, to) {
1533
- return function (args) {
1534
- return to(from(args));
1535
- };
1506
+ return function (args) {
1507
+ return to(from(args));
1508
+ };
1536
1509
  }
1537
1510
 
1538
1511
  function wrapConversion(toModel, graph) {
1539
- const path = [graph[toModel].parent, toModel];
1540
- let fn = conversions[graph[toModel].parent][toModel];
1541
- let cur = graph[toModel].parent;
1542
-
1543
- while (graph[cur].parent) {
1544
- path.unshift(graph[cur].parent);
1545
- fn = link(conversions[graph[cur].parent][cur], fn);
1546
- cur = graph[cur].parent;
1547
- }
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
+ }
1548
1521
 
1549
- fn.conversion = path;
1550
- return fn;
1522
+ fn.conversion = path;
1523
+ return fn;
1551
1524
  }
1552
1525
 
1553
1526
  var route = function (fromModel) {
1554
- const graph = deriveBFS(fromModel);
1555
- const conversion = {};
1556
- const models = Object.keys(graph);
1527
+ const graph = deriveBFS(fromModel);
1528
+ const conversion = {};
1557
1529
 
1558
- for (let len = models.length, i = 0; i < len; i++) {
1559
- const toModel = models[i];
1560
- 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];
1561
1534
 
1562
- if (node.parent === null) {
1563
- // No possible conversion, or this node is the source model.
1564
- continue;
1565
- }
1535
+ if (node.parent === null) {
1536
+ // No possible conversion, or this node is the source model.
1537
+ continue;
1538
+ }
1566
1539
 
1567
- conversion[toModel] = wrapConversion(toModel, graph);
1568
- }
1540
+ conversion[toModel] = wrapConversion(toModel, graph);
1541
+ }
1569
1542
 
1570
- return conversion;
1543
+ return conversion;
1571
1544
  };
1572
1545
 
1573
1546
  const convert = {};
1547
+
1574
1548
  const models = Object.keys(conversions);
1575
1549
 
1576
1550
  function wrapRaw(fn) {
1577
- const wrappedFn = function (...args) {
1578
- const arg0 = args[0];
1579
-
1580
- if (arg0 === undefined || arg0 === null) {
1581
- return arg0;
1582
- }
1583
-
1584
- if (arg0.length > 1) {
1585
- args = arg0;
1586
- }
1551
+ const wrappedFn = function (...args) {
1552
+ const arg0 = args[0];
1553
+ if (arg0 === undefined || arg0 === null) {
1554
+ return arg0;
1555
+ }
1587
1556
 
1588
- return fn(args);
1589
- }; // Preserve .conversion property if there is one
1557
+ if (arg0.length > 1) {
1558
+ args = arg0;
1559
+ }
1590
1560
 
1561
+ return fn(args);
1562
+ };
1591
1563
 
1592
- if ('conversion' in fn) {
1593
- wrappedFn.conversion = fn.conversion;
1594
- }
1564
+ // Preserve .conversion property if there is one
1565
+ if ('conversion' in fn) {
1566
+ wrappedFn.conversion = fn.conversion;
1567
+ }
1595
1568
 
1596
- return wrappedFn;
1569
+ return wrappedFn;
1597
1570
  }
1598
1571
 
1599
1572
  function wrapRounded(fn) {
1600
- const wrappedFn = function (...args) {
1601
- const arg0 = args[0];
1573
+ const wrappedFn = function (...args) {
1574
+ const arg0 = args[0];
1602
1575
 
1603
- if (arg0 === undefined || arg0 === null) {
1604
- return arg0;
1605
- }
1606
-
1607
- if (arg0.length > 1) {
1608
- args = arg0;
1609
- }
1576
+ if (arg0 === undefined || arg0 === null) {
1577
+ return arg0;
1578
+ }
1610
1579
 
1611
- const result = fn(args); // We're assuming the result is an array here.
1612
- // see notice in conversions.js; don't use box types
1613
- // in conversion functions.
1580
+ if (arg0.length > 1) {
1581
+ args = arg0;
1582
+ }
1614
1583
 
1615
- if (typeof result === 'object') {
1616
- for (let len = result.length, i = 0; i < len; i++) {
1617
- result[i] = Math.round(result[i]);
1618
- }
1619
- }
1584
+ const result = fn(args);
1620
1585
 
1621
- return result;
1622
- }; // 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
+ }
1623
1594
 
1595
+ return result;
1596
+ };
1624
1597
 
1625
- if ('conversion' in fn) {
1626
- wrappedFn.conversion = fn.conversion;
1627
- }
1598
+ // Preserve .conversion property if there is one
1599
+ if ('conversion' in fn) {
1600
+ wrappedFn.conversion = fn.conversion;
1601
+ }
1628
1602
 
1629
- return wrappedFn;
1603
+ return wrappedFn;
1630
1604
  }
1631
1605
 
1632
1606
  models.forEach(fromModel => {
1633
- convert[fromModel] = {};
1634
- Object.defineProperty(convert[fromModel], 'channels', {
1635
- value: conversions[fromModel].channels
1636
- });
1637
- Object.defineProperty(convert[fromModel], 'labels', {
1638
- value: conversions[fromModel].labels
1639
- });
1640
- const routes = route(fromModel);
1641
- const routeModels = Object.keys(routes);
1642
- routeModels.forEach(toModel => {
1643
- const fn = routes[toModel];
1644
- convert[fromModel][toModel] = wrapRounded(fn);
1645
- convert[fromModel][toModel].raw = wrapRaw(fn);
1646
- });
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
+ });
1647
1621
  });
1622
+
1648
1623
  var colorConvert = convert;
1649
1624
 
1650
- const _slice = [].slice;
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',
1656
1631
 
1632
+ // Shouldn't really be in color-convert either...
1633
+ 'hex',
1634
+ ];
1635
+
1636
+ const hashedModelKeys = {};
1657
1637
  for (const model of Object.keys(colorConvert)) {
1658
- hashedModelKeys[_slice.call(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.slice();
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
-
1703
- const newArray = _slice.call(object, 0, channels);
1704
-
1705
- this.color = zeroArray(newArray, channels);
1706
- this.valpha = typeof object[channels] === 'number' ? object[channels] : 1;
1707
- } else if (typeof object === 'number') {
1708
- // This is always RGB - can be converted later on.
1709
- this.model = 'rgb';
1710
- this.color = [object >> 16 & 0xFF, object >> 8 & 0xFF, object & 0xFF];
1711
- this.valpha = 1;
1712
- } else {
1713
- this.valpha = 1;
1714
- const keys = Object.keys(object);
1715
-
1716
- if ('alpha' in object) {
1717
- keys.splice(keys.indexOf('alpha'), 1);
1718
- this.valpha = typeof object.alpha === 'number' ? object.alpha : 0;
1719
- }
1720
-
1721
- const hashedKeys = keys.sort().join('');
1722
-
1723
- if (!(hashedKeys in hashedModelKeys)) {
1724
- throw new Error('Unable to parse color from object: ' + JSON.stringify(object));
1725
- }
1726
-
1727
- this.model = hashedModelKeys[hashedKeys];
1728
- const labels = colorConvert[this.model].labels;
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.concat(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.concat(this.valpha);
1777
- return colorString.to.rgb.percent(args);
1778
- },
1779
-
1780
- array() {
1781
- return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha);
1782
- },
1783
-
1784
- object() {
1785
- const result = {};
1786
- const channels = colorConvert[this.model].channels;
1787
- const labels = colorConvert[this.model].labels;
1788
-
1789
- for (let i = 0; i < channels; i++) {
1790
- result[labels[i]] = this.color[i];
1791
- }
1792
-
1793
- if (this.valpha !== 1) {
1794
- result.alpha = this.valpha;
1795
- }
1796
-
1797
- return result;
1798
- },
1799
-
1800
- unitArray() {
1801
- const rgb = this.rgb().color;
1802
- rgb[0] /= 255;
1803
- rgb[1] /= 255;
1804
- rgb[2] /= 255;
1805
-
1806
- if (this.valpha !== 1) {
1807
- rgb.push(this.valpha);
1808
- }
1809
-
1810
- return rgb;
1811
- },
1812
-
1813
- unitObject() {
1814
- const rgb = this.rgb().object();
1815
- rgb.r /= 255;
1816
- rgb.g /= 255;
1817
- rgb.b /= 255;
1818
-
1819
- if (this.valpha !== 1) {
1820
- rgb.alpha = this.valpha;
1821
- }
1822
-
1823
- return rgb;
1824
- },
1825
-
1826
- round(places) {
1827
- places = Math.max(places || 0, 0);
1828
- return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model);
1829
- },
1830
-
1831
- alpha(value) {
1832
- if (arguments.length > 0) {
1833
- return new Color(this.color.concat(Math.max(0, Math.min(1, value))), this.model);
1834
- }
1835
-
1836
- return this.valpha;
1837
- },
1838
-
1839
- // Rgb
1840
- red: getset('rgb', 0, maxfn(255)),
1841
- green: getset('rgb', 1, maxfn(255)),
1842
- blue: getset('rgb', 2, maxfn(255)),
1843
- hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => (value % 360 + 360) % 360),
1844
- saturationl: getset('hsl', 1, maxfn(100)),
1845
- lightness: getset('hsl', 2, maxfn(100)),
1846
- saturationv: getset('hsv', 1, maxfn(100)),
1847
- value: getset('hsv', 2, maxfn(100)),
1848
- chroma: getset('hcg', 1, maxfn(100)),
1849
- gray: getset('hcg', 2, maxfn(100)),
1850
- white: getset('hwb', 1, maxfn(100)),
1851
- wblack: getset('hwb', 2, maxfn(100)),
1852
- cyan: getset('cmyk', 0, maxfn(100)),
1853
- magenta: getset('cmyk', 1, maxfn(100)),
1854
- yellow: getset('cmyk', 2, maxfn(100)),
1855
- black: getset('cmyk', 3, maxfn(100)),
1856
- x: getset('xyz', 0, maxfn(100)),
1857
- y: getset('xyz', 1, maxfn(100)),
1858
- z: getset('xyz', 2, maxfn(100)),
1859
- l: getset('lab', 0, maxfn(100)),
1860
- a: getset('lab', 1),
1861
- b: getset('lab', 2),
1862
-
1863
- keyword(value) {
1864
- if (arguments.length > 0) {
1865
- return new Color(value);
1866
- }
1867
-
1868
- return colorConvert[this.model].keyword(this.color);
1869
- },
1870
-
1871
- hex(value) {
1872
- if (arguments.length > 0) {
1873
- return new Color(value);
1874
- }
1875
-
1876
- return colorString.to.hex(this.rgb().round().color);
1877
- },
1878
-
1879
- hexa(value) {
1880
- if (arguments.length > 0) {
1881
- return new Color(value);
1882
- }
1883
-
1884
- const rgbArray = this.rgb().round().color;
1885
- let alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();
1886
-
1887
- if (alphaHex.length === 1) {
1888
- alphaHex = '0' + alphaHex;
1889
- }
1890
-
1891
- return colorString.to.hex(rgbArray) + alphaHex;
1892
- },
1893
-
1894
- rgbNumber() {
1895
- const rgb = this.rgb().color;
1896
- return (rgb[0] & 0xFF) << 16 | (rgb[1] & 0xFF) << 8 | rgb[2] & 0xFF;
1897
- },
1898
-
1899
- luminosity() {
1900
- // http://www.w3.org/TR/WCAG20/#relativeluminancedef
1901
- const rgb = this.rgb().color;
1902
- const lum = [];
1903
-
1904
- for (const [i, element] of rgb.entries()) {
1905
- const chan = element / 255;
1906
- lum[i] = chan <= 0.03928 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
1907
- }
1908
-
1909
- return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
1910
- },
1911
-
1912
- contrast(color2) {
1913
- // http://www.w3.org/TR/WCAG20/#contrast-ratiodef
1914
- const lum1 = this.luminosity();
1915
- const lum2 = color2.luminosity();
1916
-
1917
- if (lum1 > lum2) {
1918
- return (lum1 + 0.05) / (lum2 + 0.05);
1919
- }
1920
-
1921
- return (lum2 + 0.05) / (lum1 + 0.05);
1922
- },
1923
-
1924
- level(color2) {
1925
- const contrastRatio = this.contrast(color2);
1926
-
1927
- if (contrastRatio >= 7.1) {
1928
- return 'AAA';
1929
- }
1930
-
1931
- return contrastRatio >= 4.5 ? 'AA' : '';
1932
- },
1933
-
1934
- isDark() {
1935
- // YIQ equation from http://24ways.org/2010/calculating-color-contrast
1936
- const rgb = this.rgb().color;
1937
- const yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;
1938
- return yiq < 128;
1939
- },
1940
-
1941
- isLight() {
1942
- return !this.isDark();
1943
- },
1944
-
1945
- negate() {
1946
- const rgb = this.rgb();
1947
-
1948
- for (let i = 0; i < 3; i++) {
1949
- rgb.color[i] = 255 - rgb.color[i];
1950
- }
1951
-
1952
- return rgb;
1953
- },
1954
-
1955
- lighten(ratio) {
1956
- const hsl = this.hsl();
1957
- hsl.color[2] += hsl.color[2] * ratio;
1958
- return hsl;
1959
- },
1960
-
1961
- darken(ratio) {
1962
- const hsl = this.hsl();
1963
- hsl.color[2] -= hsl.color[2] * ratio;
1964
- return hsl;
1965
- },
1966
-
1967
- saturate(ratio) {
1968
- const hsl = this.hsl();
1969
- hsl.color[1] += hsl.color[1] * ratio;
1970
- return hsl;
1971
- },
1972
-
1973
- desaturate(ratio) {
1974
- const hsl = this.hsl();
1975
- hsl.color[1] -= hsl.color[1] * ratio;
1976
- return hsl;
1977
- },
1978
-
1979
- whiten(ratio) {
1980
- const hwb = this.hwb();
1981
- hwb.color[1] += hwb.color[1] * ratio;
1982
- return hwb;
1983
- },
1984
-
1985
- blacken(ratio) {
1986
- const hwb = this.hwb();
1987
- hwb.color[2] += hwb.color[2] * ratio;
1988
- return hwb;
1989
- },
1990
-
1991
- grayscale() {
1992
- // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale
1993
- const rgb = this.rgb().color;
1994
- const value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;
1995
- return Color.rgb(value, value, value);
1996
- },
1997
-
1998
- fade(ratio) {
1999
- return this.alpha(this.valpha - this.valpha * ratio);
2000
- },
2001
-
2002
- opaquer(ratio) {
2003
- return this.alpha(this.valpha + this.valpha * ratio);
2004
- },
2005
-
2006
- rotate(degrees) {
2007
- const hsl = this.hsl();
2008
- let hue = hsl.color[0];
2009
- hue = (hue + degrees) % 360;
2010
- hue = hue < 0 ? 360 + hue : hue;
2011
- hsl.color[0] = hue;
2012
- return hsl;
2013
- },
2014
-
2015
- mix(mixinColor, weight) {
2016
- // Ported from sass implementation in C
2017
- // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209
2018
- if (!mixinColor || !mixinColor.rgb) {
2019
- throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor);
2020
- }
2021
-
2022
- const color1 = mixinColor.rgb();
2023
- const color2 = this.rgb();
2024
- const p = weight === undefined ? 0.5 : weight;
2025
- const w = 2 * p - 1;
2026
- const a = color1.alpha() - color2.alpha();
2027
- const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2;
2028
- const w2 = 1 - w1;
2029
- 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));
2030
- }
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
+ }
2031
1769
 
2032
- }; // Model conversion methods and static constructors
1770
+ if (this.valpha !== 1) {
1771
+ result.alpha = this.valpha;
1772
+ }
2033
1773
 
2034
- for (const model of Object.keys(colorConvert)) {
2035
- if (skippedModels.includes(model)) {
2036
- continue;
2037
- }
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
+ }
2038
1799
 
2039
- const channels = colorConvert[model].channels; // Conversion methods
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
+ },
1815
+
1816
+ // Rgb
1817
+ red: getset('rgb', 0, maxfn(255)),
1818
+ green: getset('rgb', 1, maxfn(255)),
1819
+ blue: getset('rgb', 2, maxfn(255)),
1820
+
1821
+ hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),
2040
1822
 
2041
- Color.prototype[model] = function () {
2042
- if (this.model === model) {
2043
- return new Color(this);
2044
- }
1823
+ saturationl: getset('hsl', 1, maxfn(100)),
1824
+ lightness: getset('hsl', 2, maxfn(100)),
2045
1825
 
2046
- if (arguments.length > 0) {
2047
- return new Color(arguments, model);
2048
- }
1826
+ saturationv: getset('hsv', 1, maxfn(100)),
1827
+ value: getset('hsv', 2, maxfn(100)),
2049
1828
 
2050
- const newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha;
2051
- return new Color(assertArray(colorConvert[this.model][model].raw(this.color)).concat(newAlpha), model);
2052
- }; // 'static' construction methods
1829
+ chroma: getset('hcg', 1, maxfn(100)),
1830
+ gray: getset('hcg', 2, maxfn(100)),
2053
1831
 
1832
+ white: getset('hwb', 1, maxfn(100)),
1833
+ wblack: getset('hwb', 2, maxfn(100)),
2054
1834
 
2055
- Color[model] = function (color) {
2056
- if (typeof color === 'number') {
2057
- color = zeroArray(_slice.call(arguments), channels);
2058
- }
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
+ }
2059
1860
 
2060
- return new Color(color, model);
2061
- };
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
+ };
2062
2054
  }
2063
2055
 
2064
2056
  function roundTo(number, places) {
2065
- return Number(number.toFixed(places));
2057
+ return Number(number.toFixed(places));
2066
2058
  }
2067
2059
 
2068
2060
  function roundToPlace(places) {
2069
- return function (number) {
2070
- return roundTo(number, places);
2071
- };
2061
+ return function (number) {
2062
+ return roundTo(number, places);
2063
+ };
2072
2064
  }
2073
2065
 
2074
2066
  function getset(model, channel, modifier) {
2075
- model = Array.isArray(model) ? model : [model];
2067
+ model = Array.isArray(model) ? model : [model];
2076
2068
 
2077
- for (const m of model) {
2078
- (limiters[m] || (limiters[m] = []))[channel] = modifier;
2079
- }
2069
+ for (const m of model) {
2070
+ (limiters[m] || (limiters[m] = []))[channel] = modifier;
2071
+ }
2080
2072
 
2081
- model = model[0];
2082
- return function (value) {
2083
- let result;
2073
+ model = model[0];
2084
2074
 
2085
- if (arguments.length > 0) {
2086
- if (modifier) {
2087
- value = modifier(value);
2088
- }
2075
+ return function (value) {
2076
+ let result;
2089
2077
 
2090
- result = this[model]();
2091
- result.color[channel] = value;
2092
- return result;
2093
- }
2078
+ if (value !== undefined) {
2079
+ if (modifier) {
2080
+ value = modifier(value);
2081
+ }
2094
2082
 
2095
- result = this[model]().color[channel];
2083
+ result = this[model]();
2084
+ result.color[channel] = value;
2085
+ return result;
2086
+ }
2096
2087
 
2097
- if (modifier) {
2098
- result = modifier(result);
2099
- }
2088
+ result = this[model]().color[channel];
2089
+ if (modifier) {
2090
+ result = modifier(result);
2091
+ }
2100
2092
 
2101
- return result;
2102
- };
2093
+ return result;
2094
+ };
2103
2095
  }
2104
2096
 
2105
2097
  function maxfn(max) {
2106
- return function (v) {
2107
- return Math.max(0, Math.min(max, v));
2108
- };
2098
+ return function (v) {
2099
+ return Math.max(0, Math.min(max, v));
2100
+ };
2109
2101
  }
2110
2102
 
2111
2103
  function assertArray(value) {
2112
- return Array.isArray(value) ? value : [value];
2104
+ return Array.isArray(value) ? value : [value];
2113
2105
  }
2114
2106
 
2115
2107
  function zeroArray(array, length) {
2116
- for (let i = 0; i < length; i++) {
2117
- if (typeof array[i] !== 'number') {
2118
- array[i] = 0;
2119
- }
2120
- }
2108
+ for (let i = 0; i < length; i++) {
2109
+ if (typeof array[i] !== 'number') {
2110
+ array[i] = 0;
2111
+ }
2112
+ }
2121
2113
 
2122
- return array;
2114
+ return array;
2123
2115
  }
2124
2116
 
2125
2117
  var color = Color;