ngx-color 7.2.0 → 7.3.0

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 (339) hide show
  1. package/alpha/alpha-picker.component.d.ts +8 -0
  2. package/alpha/esm2020/alpha-picker.component.mjs +116 -0
  3. package/alpha/{esm2015/ngx-color-alpha.js → esm2020/ngx-color-alpha.mjs} +2 -2
  4. package/alpha/esm2020/public_api.mjs +2 -0
  5. package/alpha/fesm2015/ngx-color-alpha.mjs +123 -0
  6. package/alpha/fesm2015/ngx-color-alpha.mjs.map +1 -0
  7. package/alpha/fesm2020/ngx-color-alpha.mjs +123 -0
  8. package/alpha/fesm2020/ngx-color-alpha.mjs.map +1 -0
  9. package/alpha/ngx-color-alpha.d.ts +2 -1
  10. package/alpha/package.json +19 -7
  11. package/alpha/public_api.d.ts +1 -0
  12. package/alpha.component.d.ts +9 -0
  13. package/block/block-swatches.component.d.ts +3 -0
  14. package/block/block.component.d.ts +9 -0
  15. package/block/esm2020/block-swatches.component.mjs +76 -0
  16. package/block/esm2020/block.component.mjs +199 -0
  17. package/block/esm2020/ngx-color-block.mjs +5 -0
  18. package/block/esm2020/public_api.mjs +3 -0
  19. package/block/fesm2015/ngx-color-block.mjs +277 -0
  20. package/block/fesm2015/ngx-color-block.mjs.map +1 -0
  21. package/block/fesm2020/ngx-color-block.mjs +277 -0
  22. package/block/fesm2020/ngx-color-block.mjs.map +1 -0
  23. package/block/ngx-color-block.d.ts +2 -2
  24. package/block/package.json +19 -7
  25. package/block/public_api.d.ts +2 -0
  26. package/checkboard.component.d.ts +7 -0
  27. package/chrome/chrome-fields.component.d.ts +3 -0
  28. package/chrome/chrome.component.d.ts +9 -0
  29. package/chrome/esm2020/chrome-fields.component.mjs +356 -0
  30. package/chrome/esm2020/chrome.component.mjs +249 -0
  31. package/chrome/esm2020/ngx-color-chrome.mjs +5 -0
  32. package/chrome/esm2020/public_api.mjs +3 -0
  33. package/chrome/fesm2015/ngx-color-chrome.mjs +606 -0
  34. package/chrome/fesm2015/ngx-color-chrome.mjs.map +1 -0
  35. package/chrome/fesm2020/ngx-color-chrome.mjs +606 -0
  36. package/chrome/fesm2020/ngx-color-chrome.mjs.map +1 -0
  37. package/chrome/ngx-color-chrome.d.ts +2 -2
  38. package/chrome/package.json +19 -7
  39. package/chrome/public_api.d.ts +2 -0
  40. package/circle/circle-swatch.component.d.ts +3 -0
  41. package/circle/circle.component.d.ts +9 -0
  42. package/circle/esm2020/circle-swatch.component.mjs +85 -0
  43. package/circle/esm2020/circle.component.mjs +148 -0
  44. package/circle/esm2020/ngx-color-circle.mjs +5 -0
  45. package/circle/esm2020/public_api.mjs +3 -0
  46. package/circle/fesm2015/ngx-color-circle.mjs +237 -0
  47. package/circle/fesm2015/ngx-color-circle.mjs.map +1 -0
  48. package/circle/fesm2020/ngx-color-circle.mjs +237 -0
  49. package/circle/fesm2020/ngx-color-circle.mjs.map +1 -0
  50. package/circle/ngx-color-circle.d.ts +2 -2
  51. package/circle/package.json +19 -7
  52. package/circle/public_api.d.ts +2 -0
  53. package/color-wrap.component.d.ts +7 -0
  54. package/compact/compact-color.component.d.ts +3 -0
  55. package/compact/compact-fields.component.d.ts +3 -0
  56. package/compact/compact.component.d.ts +10 -0
  57. package/compact/esm2020/compact-color.component.mjs +91 -0
  58. package/compact/esm2020/compact-fields.component.mjs +186 -0
  59. package/compact/esm2020/compact.component.mjs +177 -0
  60. package/compact/esm2020/ngx-color-compact.mjs +5 -0
  61. package/compact/esm2020/public_api.mjs +4 -0
  62. package/compact/fesm2015/ngx-color-compact.mjs +451 -0
  63. package/compact/fesm2015/ngx-color-compact.mjs.map +1 -0
  64. package/compact/fesm2020/ngx-color-compact.mjs +451 -0
  65. package/compact/fesm2020/ngx-color-compact.mjs.map +1 -0
  66. package/compact/ngx-color-compact.d.ts +2 -3
  67. package/compact/package.json +19 -7
  68. package/compact/public_api.d.ts +3 -0
  69. package/coordinates.directive.d.ts +6 -0
  70. package/editable-input.component.d.ts +7 -0
  71. package/esm2020/alpha.component.mjs +186 -0
  72. package/esm2020/checkboard.component.mjs +66 -0
  73. package/esm2020/color-wrap.component.mjs +163 -0
  74. package/esm2020/coordinates.directive.mjs +104 -0
  75. package/esm2020/editable-input.component.mjs +217 -0
  76. package/{esm2015/helpers/checkboard.js → esm2020/helpers/checkboard.mjs} +0 -0
  77. package/{esm2015/helpers/color.interfaces.js → esm2020/helpers/color.interfaces.mjs} +0 -0
  78. package/{esm2015/helpers/color.js → esm2020/helpers/color.mjs} +0 -0
  79. package/esm2020/hue.component.mjs +165 -0
  80. package/{esm2015/ngx-color.js → esm2020/ngx-color.mjs} +0 -0
  81. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  82. package/esm2020/raised.component.mjs +89 -0
  83. package/esm2020/saturation.component.mjs +136 -0
  84. package/esm2020/shade.component.mjs +165 -0
  85. package/esm2020/swatch.component.mjs +125 -0
  86. package/fesm2015/ngx-color.mjs +1461 -0
  87. package/fesm2015/ngx-color.mjs.map +1 -0
  88. package/fesm2020/ngx-color.mjs +1466 -0
  89. package/fesm2020/ngx-color.mjs.map +1 -0
  90. package/github/esm2020/github-swatch.component.mjs +67 -0
  91. package/github/esm2020/github.component.mjs +179 -0
  92. package/github/esm2020/ngx-color-github.mjs +5 -0
  93. package/github/esm2020/public_api.mjs +3 -0
  94. package/github/fesm2015/ngx-color-github.mjs +250 -0
  95. package/github/fesm2015/ngx-color-github.mjs.map +1 -0
  96. package/github/fesm2020/ngx-color-github.mjs +250 -0
  97. package/github/fesm2020/ngx-color-github.mjs.map +1 -0
  98. package/github/github-swatch.component.d.ts +3 -0
  99. package/github/github.component.d.ts +9 -0
  100. package/github/ngx-color-github.d.ts +2 -2
  101. package/github/package.json +19 -7
  102. package/github/public_api.d.ts +2 -0
  103. package/helpers/checkboard.d.ts +2 -2
  104. package/hue/esm2020/hue-picker.component.mjs +113 -0
  105. package/hue/{esm2015/ngx-color-hue.js → esm2020/ngx-color-hue.mjs} +2 -2
  106. package/hue/esm2020/public_api.mjs +2 -0
  107. package/hue/fesm2015/ngx-color-hue.mjs +120 -0
  108. package/hue/fesm2015/ngx-color-hue.mjs.map +1 -0
  109. package/hue/fesm2020/ngx-color-hue.mjs +120 -0
  110. package/hue/fesm2020/ngx-color-hue.mjs.map +1 -0
  111. package/hue/hue-picker.component.d.ts +8 -0
  112. package/hue/ngx-color-hue.d.ts +2 -1
  113. package/hue/package.json +19 -7
  114. package/hue/public_api.d.ts +1 -0
  115. package/hue.component.d.ts +8 -0
  116. package/material/esm2020/material.component.mjs +211 -0
  117. package/material/{esm2015/ngx-color-material.js → esm2020/ngx-color-material.mjs} +2 -2
  118. package/material/esm2020/public_api.mjs +2 -0
  119. package/material/fesm2015/ngx-color-material.mjs +218 -0
  120. package/material/fesm2015/ngx-color-material.mjs.map +1 -0
  121. package/material/fesm2020/ngx-color-material.mjs +218 -0
  122. package/material/fesm2020/ngx-color-material.mjs.map +1 -0
  123. package/material/material.component.d.ts +8 -0
  124. package/material/ngx-color-material.d.ts +2 -1
  125. package/material/package.json +19 -7
  126. package/material/public_api.d.ts +1 -0
  127. package/ngx-color.d.ts +1 -0
  128. package/package.json +20 -8
  129. package/photoshop/esm2020/ngx-color-photoshop.mjs +5 -0
  130. package/photoshop/esm2020/photoshop-button.component.mjs +63 -0
  131. package/photoshop/esm2020/photoshop-fields.component.mjs +241 -0
  132. package/photoshop/esm2020/photoshop-previews.component.mjs +68 -0
  133. package/photoshop/esm2020/photoshop.component.mjs +258 -0
  134. package/photoshop/esm2020/public_api.mjs +5 -0
  135. package/photoshop/fesm2015/ngx-color-photoshop.mjs +626 -0
  136. package/photoshop/fesm2015/ngx-color-photoshop.mjs.map +1 -0
  137. package/photoshop/fesm2020/ngx-color-photoshop.mjs +626 -0
  138. package/photoshop/fesm2020/ngx-color-photoshop.mjs.map +1 -0
  139. package/photoshop/ngx-color-photoshop.d.ts +2 -4
  140. package/photoshop/package.json +19 -7
  141. package/photoshop/photoshop-button.component.d.ts +3 -0
  142. package/photoshop/photoshop-fields.component.d.ts +3 -0
  143. package/photoshop/photoshop-previews.component.d.ts +3 -0
  144. package/photoshop/photoshop.component.d.ts +11 -0
  145. package/photoshop/public_api.d.ts +4 -0
  146. package/raised.component.d.ts +7 -0
  147. package/saturation.component.d.ts +8 -0
  148. package/shade/{esm2015/ngx-color-shade.js → esm2020/ngx-color-shade.mjs} +2 -2
  149. package/shade/esm2020/public_api.mjs +2 -0
  150. package/shade/esm2020/shade-picker.component.mjs +105 -0
  151. package/shade/fesm2015/ngx-color-shade.mjs +112 -0
  152. package/shade/fesm2015/ngx-color-shade.mjs.map +1 -0
  153. package/shade/fesm2020/ngx-color-shade.mjs +112 -0
  154. package/shade/fesm2020/ngx-color-shade.mjs.map +1 -0
  155. package/shade/ngx-color-shade.d.ts +2 -1
  156. package/shade/package.json +19 -7
  157. package/shade/public_api.d.ts +1 -0
  158. package/shade/shade-picker.component.d.ts +8 -0
  159. package/shade.component.d.ts +8 -0
  160. package/sketch/esm2020/ngx-color-sketch.mjs +5 -0
  161. package/sketch/esm2020/public_api.mjs +4 -0
  162. package/sketch/esm2020/sketch-fields.component.mjs +243 -0
  163. package/sketch/esm2020/sketch-preset-colors.component.mjs +98 -0
  164. package/sketch/esm2020/sketch.component.mjs +283 -0
  165. package/sketch/fesm2015/ngx-color-sketch.mjs +620 -0
  166. package/sketch/fesm2015/ngx-color-sketch.mjs.map +1 -0
  167. package/sketch/fesm2020/ngx-color-sketch.mjs +620 -0
  168. package/sketch/fesm2020/ngx-color-sketch.mjs.map +1 -0
  169. package/sketch/ngx-color-sketch.d.ts +2 -3
  170. package/sketch/package.json +19 -7
  171. package/sketch/public_api.d.ts +3 -0
  172. package/sketch/sketch-fields.component.d.ts +3 -0
  173. package/sketch/sketch-preset-colors.component.d.ts +3 -0
  174. package/sketch/sketch.component.d.ts +10 -0
  175. package/slider/esm2020/ngx-color-slider.mjs +5 -0
  176. package/slider/esm2020/public_api.mjs +4 -0
  177. package/slider/esm2020/slider-swatch.component.mjs +80 -0
  178. package/slider/esm2020/slider-swatches.component.mjs +135 -0
  179. package/slider/esm2020/slider.component.mjs +116 -0
  180. package/slider/fesm2015/ngx-color-slider.mjs +331 -0
  181. package/slider/fesm2015/ngx-color-slider.mjs.map +1 -0
  182. package/slider/fesm2020/ngx-color-slider.mjs +331 -0
  183. package/slider/fesm2020/ngx-color-slider.mjs.map +1 -0
  184. package/slider/ngx-color-slider.d.ts +2 -3
  185. package/slider/package.json +19 -7
  186. package/slider/public_api.d.ts +3 -0
  187. package/slider/slider-swatch.component.d.ts +3 -0
  188. package/slider/slider-swatches.component.d.ts +3 -0
  189. package/slider/slider.component.d.ts +10 -0
  190. package/swatch.component.d.ts +8 -0
  191. package/swatches/esm2020/ngx-color-swatches.mjs +5 -0
  192. package/swatches/esm2020/public_api.mjs +4 -0
  193. package/swatches/esm2020/swatches-color.component.mjs +123 -0
  194. package/swatches/esm2020/swatches-group.component.mjs +64 -0
  195. package/swatches/esm2020/swatches.component.mjs +258 -0
  196. package/swatches/fesm2015/ngx-color-swatches.mjs +441 -0
  197. package/swatches/fesm2015/ngx-color-swatches.mjs.map +1 -0
  198. package/swatches/fesm2020/ngx-color-swatches.mjs +441 -0
  199. package/swatches/fesm2020/ngx-color-swatches.mjs.map +1 -0
  200. package/swatches/ngx-color-swatches.d.ts +2 -3
  201. package/swatches/package.json +19 -7
  202. package/swatches/public_api.d.ts +3 -0
  203. package/swatches/swatches-color.component.d.ts +3 -0
  204. package/swatches/swatches-group.component.d.ts +3 -0
  205. package/swatches/swatches.component.d.ts +10 -0
  206. package/twitter/{esm2015/ngx-color-twitter.js → esm2020/ngx-color-twitter.mjs} +2 -2
  207. package/twitter/esm2020/public_api.mjs +2 -0
  208. package/twitter/esm2020/twitter.component.mjs +255 -0
  209. package/twitter/fesm2015/ngx-color-twitter.mjs +262 -0
  210. package/twitter/fesm2015/ngx-color-twitter.mjs.map +1 -0
  211. package/twitter/fesm2020/ngx-color-twitter.mjs +262 -0
  212. package/twitter/fesm2020/ngx-color-twitter.mjs.map +1 -0
  213. package/twitter/ngx-color-twitter.d.ts +2 -1
  214. package/twitter/package.json +19 -7
  215. package/twitter/public_api.d.ts +1 -0
  216. package/twitter/twitter.component.d.ts +8 -0
  217. package/alpha/bundles/ngx-color-alpha.umd.js +0 -404
  218. package/alpha/bundles/ngx-color-alpha.umd.js.map +0 -1
  219. package/alpha/esm2015/alpha-picker.component.js +0 -84
  220. package/alpha/fesm2015/ngx-color-alpha.js +0 -91
  221. package/alpha/fesm2015/ngx-color-alpha.js.map +0 -1
  222. package/alpha/ngx-color-alpha.metadata.json +0 -1
  223. package/block/bundles/ngx-color-block.umd.js +0 -472
  224. package/block/bundles/ngx-color-block.umd.js.map +0 -1
  225. package/block/esm2015/block-swatches.component.js +0 -58
  226. package/block/esm2015/block.component.js +0 -151
  227. package/block/esm2015/ngx-color-block.js +0 -6
  228. package/block/fesm2015/ngx-color-block.js +0 -214
  229. package/block/fesm2015/ngx-color-block.js.map +0 -1
  230. package/block/ngx-color-block.metadata.json +0 -1
  231. package/bundles/ngx-color.umd.js +0 -1014
  232. package/bundles/ngx-color.umd.js.map +0 -1
  233. package/chrome/bundles/ngx-color-chrome.umd.js +0 -543
  234. package/chrome/bundles/ngx-color-chrome.umd.js.map +0 -1
  235. package/chrome/esm2015/chrome-fields.component.js +0 -255
  236. package/chrome/esm2015/chrome.component.js +0 -173
  237. package/chrome/esm2015/ngx-color-chrome.js +0 -6
  238. package/chrome/fesm2015/ngx-color-chrome.js +0 -432
  239. package/chrome/fesm2015/ngx-color-chrome.js.map +0 -1
  240. package/chrome/ngx-color-chrome.metadata.json +0 -1
  241. package/circle/bundles/ngx-color-circle.umd.js +0 -469
  242. package/circle/bundles/ngx-color-circle.umd.js.map +0 -1
  243. package/circle/esm2015/circle-swatch.component.js +0 -63
  244. package/circle/esm2015/circle.component.js +0 -109
  245. package/circle/esm2015/ngx-color-circle.js +0 -6
  246. package/circle/fesm2015/ngx-color-circle.js +0 -177
  247. package/circle/fesm2015/ngx-color-circle.js.map +0 -1
  248. package/circle/ngx-color-circle.metadata.json +0 -1
  249. package/compact/bundles/ngx-color-compact.umd.js +0 -579
  250. package/compact/bundles/ngx-color-compact.umd.js.map +0 -1
  251. package/compact/esm2015/compact-color.component.js +0 -70
  252. package/compact/esm2015/compact-fields.component.js +0 -142
  253. package/compact/esm2015/compact.component.js +0 -135
  254. package/compact/esm2015/ngx-color-compact.js +0 -7
  255. package/compact/fesm2015/ngx-color-compact.js +0 -348
  256. package/compact/fesm2015/ngx-color-compact.js.map +0 -1
  257. package/compact/ngx-color-compact.metadata.json +0 -1
  258. package/esm2015/alpha.component.js +0 -156
  259. package/esm2015/checkboard.component.js +0 -52
  260. package/esm2015/color-wrap.component.js +0 -145
  261. package/esm2015/coordinates.directive.js +0 -85
  262. package/esm2015/editable-input.component.js +0 -183
  263. package/esm2015/hue.component.js +0 -140
  264. package/esm2015/raised.component.js +0 -73
  265. package/esm2015/saturation.component.js +0 -111
  266. package/esm2015/shade.component.js +0 -127
  267. package/esm2015/swatch.component.js +0 -85
  268. package/fesm2015/ngx-color.js +0 -1228
  269. package/fesm2015/ngx-color.js.map +0 -1
  270. package/github/bundles/ngx-color-github.umd.js +0 -447
  271. package/github/bundles/ngx-color-github.umd.js.map +0 -1
  272. package/github/esm2015/github-swatch.component.js +0 -48
  273. package/github/esm2015/github.component.js +0 -146
  274. package/github/esm2015/ngx-color-github.js +0 -6
  275. package/github/fesm2015/ngx-color-github.js +0 -199
  276. package/github/fesm2015/ngx-color-github.js.map +0 -1
  277. package/github/ngx-color-github.metadata.json +0 -1
  278. package/hue/bundles/ngx-color-hue.umd.js +0 -407
  279. package/hue/bundles/ngx-color-hue.umd.js.map +0 -1
  280. package/hue/esm2015/hue-picker.component.js +0 -82
  281. package/hue/fesm2015/ngx-color-hue.js +0 -89
  282. package/hue/fesm2015/ngx-color-hue.js.map +0 -1
  283. package/hue/ngx-color-hue.metadata.json +0 -1
  284. package/material/bundles/ngx-color-material.umd.js +0 -455
  285. package/material/bundles/ngx-color-material.umd.js.map +0 -1
  286. package/material/esm2015/material.component.js +0 -161
  287. package/material/fesm2015/ngx-color-material.js +0 -168
  288. package/material/fesm2015/ngx-color-material.js.map +0 -1
  289. package/material/ngx-color-material.metadata.json +0 -1
  290. package/ngx-color.metadata.json +0 -1
  291. package/photoshop/bundles/ngx-color-photoshop.umd.js +0 -571
  292. package/photoshop/bundles/ngx-color-photoshop.umd.js.map +0 -1
  293. package/photoshop/esm2015/ngx-color-photoshop.js +0 -8
  294. package/photoshop/esm2015/photoshop-button.component.js +0 -50
  295. package/photoshop/esm2015/photoshop-fields.component.js +0 -180
  296. package/photoshop/esm2015/photoshop-previews.component.js +0 -53
  297. package/photoshop/esm2015/photoshop.component.js +0 -181
  298. package/photoshop/fesm2015/ngx-color-photoshop.js +0 -464
  299. package/photoshop/fesm2015/ngx-color-photoshop.js.map +0 -1
  300. package/photoshop/ngx-color-photoshop.metadata.json +0 -1
  301. package/shade/bundles/ngx-color-shade.umd.js +0 -399
  302. package/shade/bundles/ngx-color-shade.umd.js.map +0 -1
  303. package/shade/esm2015/shade-picker.component.js +0 -75
  304. package/shade/fesm2015/ngx-color-shade.js +0 -82
  305. package/shade/fesm2015/ngx-color-shade.js.map +0 -1
  306. package/shade/ngx-color-shade.metadata.json +0 -1
  307. package/sketch/bundles/ngx-color-sketch.umd.js +0 -585
  308. package/sketch/bundles/ngx-color-sketch.umd.js.map +0 -1
  309. package/sketch/esm2015/ngx-color-sketch.js +0 -7
  310. package/sketch/esm2015/sketch-fields.component.js +0 -181
  311. package/sketch/esm2015/sketch-preset-colors.component.js +0 -76
  312. package/sketch/esm2015/sketch.component.js +0 -203
  313. package/sketch/fesm2015/ngx-color-sketch.js +0 -462
  314. package/sketch/fesm2015/ngx-color-sketch.js.map +0 -1
  315. package/sketch/ngx-color-sketch.metadata.json +0 -1
  316. package/slider/bundles/ngx-color-slider.umd.js +0 -470
  317. package/slider/bundles/ngx-color-slider.umd.js.map +0 -1
  318. package/slider/esm2015/ngx-color-slider.js +0 -7
  319. package/slider/esm2015/slider-swatch.component.js +0 -65
  320. package/slider/esm2015/slider-swatches.component.js +0 -84
  321. package/slider/esm2015/slider.component.js +0 -81
  322. package/slider/fesm2015/ngx-color-slider.js +0 -233
  323. package/slider/fesm2015/ngx-color-slider.js.map +0 -1
  324. package/slider/ngx-color-slider.metadata.json +0 -1
  325. package/swatches/bundles/ngx-color-swatches.umd.js +0 -612
  326. package/swatches/bundles/ngx-color-swatches.umd.js.map +0 -1
  327. package/swatches/esm2015/ngx-color-swatches.js +0 -7
  328. package/swatches/esm2015/swatches-color.component.js +0 -90
  329. package/swatches/esm2015/swatches-group.component.js +0 -42
  330. package/swatches/esm2015/swatches.component.js +0 -217
  331. package/swatches/fesm2015/ngx-color-swatches.js +0 -351
  332. package/swatches/fesm2015/ngx-color-swatches.js.map +0 -1
  333. package/swatches/ngx-color-swatches.metadata.json +0 -1
  334. package/twitter/bundles/ngx-color-twitter.umd.js +0 -433
  335. package/twitter/bundles/ngx-color-twitter.umd.js.map +0 -1
  336. package/twitter/esm2015/twitter.component.js +0 -207
  337. package/twitter/fesm2015/ngx-color-twitter.js +0 -214
  338. package/twitter/fesm2015/ngx-color-twitter.js.map +0 -1
  339. package/twitter/ngx-color-twitter.metadata.json +0 -1
@@ -1,109 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule } from '@angular/core';
3
- import { amber, blue, blueGrey, brown, cyan, deepOrange, deepPurple, green, indigo, lightBlue, lightGreen, lime, orange, pink, purple, red, teal, yellow, } from 'material-colors';
4
- import { TinyColor } from '@ctrl/tinycolor';
5
- import { ColorWrap, isValidHex, SwatchModule } from 'ngx-color';
6
- import { CircleSwatchComponent } from './circle-swatch.component';
7
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
- export class CircleComponent extends ColorWrap {
9
- constructor() {
10
- super();
11
- /** Pixel value for picker width */
12
- this.width = 252;
13
- /** Color squares to display */
14
- this.colors = [
15
- red['500'],
16
- pink['500'],
17
- purple['500'],
18
- deepPurple['500'],
19
- indigo['500'],
20
- blue['500'],
21
- lightBlue['500'],
22
- cyan['500'],
23
- teal['500'],
24
- green['500'],
25
- lightGreen['500'],
26
- lime['500'],
27
- yellow['500'],
28
- amber['500'],
29
- orange['500'],
30
- deepOrange['500'],
31
- brown['500'],
32
- blueGrey['500'],
33
- ];
34
- /** Value for circle size */
35
- this.circleSize = 28;
36
- /** Value for spacing between circles */
37
- this.circleSpacing = 14;
38
- }
39
- isActive(color) {
40
- return new TinyColor(this.hex).equals(color);
41
- }
42
- handleBlockChange({ hex, $event }) {
43
- if (isValidHex(hex)) {
44
- this.handleChange({ hex, source: 'hex' }, $event);
45
- }
46
- }
47
- handleValueChange({ data, $event }) {
48
- this.handleChange(data, $event);
49
- }
50
- }
51
- CircleComponent.decorators = [
52
- { type: Component, args: [{
53
- selector: 'color-circle',
54
- template: `
55
- <div
56
- class="circle-picker {{ className }}"
57
- [style.width.px]="width"
58
- [style.margin-right.px]="-circleSpacing"
59
- [style.margin-bottom.px]="-circleSpacing"
60
- >
61
- <color-circle-swatch
62
- *ngFor="let color of colors"
63
- [circleSize]="circleSize"
64
- [circleSpacing]="circleSpacing"
65
- [color]="color"
66
- [focus]="isActive(color)"
67
- (onClick)="handleBlockChange($event)"
68
- (onSwatchHover)="onSwatchHover.emit($event)"
69
- ></color-circle-swatch>
70
- </div>
71
- `,
72
- changeDetection: ChangeDetectionStrategy.OnPush,
73
- preserveWhitespaces: false,
74
- providers: [
75
- {
76
- provide: NG_VALUE_ACCESSOR,
77
- useExisting: forwardRef(() => CircleComponent),
78
- multi: true,
79
- },
80
- {
81
- provide: ColorWrap,
82
- useExisting: forwardRef(() => CircleComponent),
83
- },
84
- ],
85
- styles: [`
86
- .circle-picker {
87
- display: flex;
88
- flex-wrap: wrap;
89
- }
90
- `]
91
- },] }
92
- ];
93
- CircleComponent.ctorParameters = () => [];
94
- CircleComponent.propDecorators = {
95
- width: [{ type: Input }],
96
- colors: [{ type: Input }],
97
- circleSize: [{ type: Input }],
98
- circleSpacing: [{ type: Input }]
99
- };
100
- export class ColorCircleModule {
101
- }
102
- ColorCircleModule.decorators = [
103
- { type: NgModule, args: [{
104
- declarations: [CircleComponent, CircleSwatchComponent],
105
- exports: [CircleComponent, CircleSwatchComponent],
106
- imports: [CommonModule, SwatchModule],
107
- },] }
108
- ];
109
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2lyY2xlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9jaXJjbGUvY2lyY2xlLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDL0MsT0FBTyxFQUFFLHVCQUF1QixFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNoRyxPQUFPLEVBQ0wsS0FBSyxFQUNMLElBQUksRUFDSixRQUFRLEVBQ1IsS0FBSyxFQUNMLElBQUksRUFDSixVQUFVLEVBQ1YsVUFBVSxFQUNWLEtBQUssRUFDTCxNQUFNLEVBQ04sU0FBUyxFQUNULFVBQVUsRUFDVixJQUFJLEVBQ0osTUFBTSxFQUNOLElBQUksRUFDSixNQUFNLEVBQ04sR0FBRyxFQUNILElBQUksRUFDSixNQUFNLEdBQ1AsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFNUMsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFL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@@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './circle.component';
5
- export { CircleSwatchComponent as ɵa } from './circle-swatch.component';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWNvbG9yLWNpcmNsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvY29tcG9uZW50cy9jaXJjbGUvbmd4LWNvbG9yLWNpcmNsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsb0JBQW9CLENBQUM7QUFFbkMsT0FBTyxFQUFDLHFCQUFxQixJQUFJLEVBQUUsRUFBQyxNQUFNLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2NpcmNsZS5jb21wb25lbnQnO1xuXG5leHBvcnQge0NpcmNsZVN3YXRjaENvbXBvbmVudCBhcyDJtWF9IGZyb20gJy4vY2lyY2xlLXN3YXRjaC5jb21wb25lbnQnOyJdfQ==
@@ -1,177 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, NgModule } from '@angular/core';
3
- import { red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, blueGrey } from 'material-colors';
4
- import { TinyColor } from '@ctrl/tinycolor';
5
- import { ColorWrap, isValidHex, SwatchModule } from 'ngx-color';
6
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
-
8
- class CircleSwatchComponent {
9
- constructor() {
10
- this.circleSize = 28;
11
- this.circleSpacing = 14;
12
- this.focus = false;
13
- this.onClick = new EventEmitter();
14
- this.onSwatchHover = new EventEmitter();
15
- this.focusStyle = {};
16
- this.swatchStyle = {
17
- borderRadius: '50%',
18
- background: 'transparent',
19
- transition: '100ms box-shadow ease 0s',
20
- };
21
- }
22
- ngOnChanges() {
23
- this.swatchStyle.boxShadow = `inset 0 0 0 ${this.circleSize / 2}px ${this.color}`;
24
- this.focusStyle.boxShadow = `inset 0 0 0 ${this.circleSize / 2}px ${this.color}, 0 0 5px ${this.color}`;
25
- if (this.focus) {
26
- this.focusStyle.boxShadow = `inset 0 0 0 3px ${this.color}, 0 0 5px ${this.color}`;
27
- }
28
- }
29
- handleClick({ hex, $event }) {
30
- this.onClick.emit({ hex, $event });
31
- }
32
- }
33
- CircleSwatchComponent.decorators = [
34
- { type: Component, args: [{
35
- selector: 'color-circle-swatch',
36
- template: `
37
- <div class="circle-swatch"
38
- [style.width.px]="circleSize" [style.height.px]="circleSize"
39
- [style.margin-right.px]="circleSpacing" [style.margin-bottom.px]="circleSpacing"
40
- >
41
- <color-swatch
42
- [color]="color" [style]="swatchStyle" [focus]="focus" [focusStyle]="focusStyle"
43
- (onClick)="handleClick($event)" (onHover)="onSwatchHover.emit($event)">
44
- </color-swatch>
45
- <div class="clear"></div>
46
- </div>
47
- `,
48
- changeDetection: ChangeDetectionStrategy.OnPush,
49
- preserveWhitespaces: false,
50
- styles: [`
51
- .circle-swatch {
52
- transform: scale(1);
53
- transition: transform 100ms ease;
54
- }
55
- .circle-swatch:hover {
56
- transform: scale(1.2);
57
- }
58
- `]
59
- },] }
60
- ];
61
- CircleSwatchComponent.propDecorators = {
62
- color: [{ type: Input }],
63
- circleSize: [{ type: Input }],
64
- circleSpacing: [{ type: Input }],
65
- focus: [{ type: Input }],
66
- onClick: [{ type: Output }],
67
- onSwatchHover: [{ type: Output }]
68
- };
69
-
70
- class CircleComponent extends ColorWrap {
71
- constructor() {
72
- super();
73
- /** Pixel value for picker width */
74
- this.width = 252;
75
- /** Color squares to display */
76
- this.colors = [
77
- red['500'],
78
- pink['500'],
79
- purple['500'],
80
- deepPurple['500'],
81
- indigo['500'],
82
- blue['500'],
83
- lightBlue['500'],
84
- cyan['500'],
85
- teal['500'],
86
- green['500'],
87
- lightGreen['500'],
88
- lime['500'],
89
- yellow['500'],
90
- amber['500'],
91
- orange['500'],
92
- deepOrange['500'],
93
- brown['500'],
94
- blueGrey['500'],
95
- ];
96
- /** Value for circle size */
97
- this.circleSize = 28;
98
- /** Value for spacing between circles */
99
- this.circleSpacing = 14;
100
- }
101
- isActive(color) {
102
- return new TinyColor(this.hex).equals(color);
103
- }
104
- handleBlockChange({ hex, $event }) {
105
- if (isValidHex(hex)) {
106
- this.handleChange({ hex, source: 'hex' }, $event);
107
- }
108
- }
109
- handleValueChange({ data, $event }) {
110
- this.handleChange(data, $event);
111
- }
112
- }
113
- CircleComponent.decorators = [
114
- { type: Component, args: [{
115
- selector: 'color-circle',
116
- template: `
117
- <div
118
- class="circle-picker {{ className }}"
119
- [style.width.px]="width"
120
- [style.margin-right.px]="-circleSpacing"
121
- [style.margin-bottom.px]="-circleSpacing"
122
- >
123
- <color-circle-swatch
124
- *ngFor="let color of colors"
125
- [circleSize]="circleSize"
126
- [circleSpacing]="circleSpacing"
127
- [color]="color"
128
- [focus]="isActive(color)"
129
- (onClick)="handleBlockChange($event)"
130
- (onSwatchHover)="onSwatchHover.emit($event)"
131
- ></color-circle-swatch>
132
- </div>
133
- `,
134
- changeDetection: ChangeDetectionStrategy.OnPush,
135
- preserveWhitespaces: false,
136
- providers: [
137
- {
138
- provide: NG_VALUE_ACCESSOR,
139
- useExisting: forwardRef(() => CircleComponent),
140
- multi: true,
141
- },
142
- {
143
- provide: ColorWrap,
144
- useExisting: forwardRef(() => CircleComponent),
145
- },
146
- ],
147
- styles: [`
148
- .circle-picker {
149
- display: flex;
150
- flex-wrap: wrap;
151
- }
152
- `]
153
- },] }
154
- ];
155
- CircleComponent.ctorParameters = () => [];
156
- CircleComponent.propDecorators = {
157
- width: [{ type: Input }],
158
- colors: [{ type: Input }],
159
- circleSize: [{ type: Input }],
160
- circleSpacing: [{ type: Input }]
161
- };
162
- class ColorCircleModule {
163
- }
164
- ColorCircleModule.decorators = [
165
- { type: NgModule, args: [{
166
- declarations: [CircleComponent, CircleSwatchComponent],
167
- exports: [CircleComponent, CircleSwatchComponent],
168
- imports: [CommonModule, SwatchModule],
169
- },] }
170
- ];
171
-
172
- /**
173
- * Generated bundle index. Do not edit.
174
- */
175
-
176
- export { CircleComponent, ColorCircleModule, CircleSwatchComponent as ɵa };
177
- //# sourceMappingURL=ngx-color-circle.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-color-circle.js","sources":["../../../../src/lib/components/circle/circle-swatch.component.ts","../../../../src/lib/components/circle/circle.component.ts","../../../../src/lib/components/circle/ngx-color-circle.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n} from '@angular/core';\n\n@Component({\n selector: 'color-circle-swatch',\n template: `\n <div class=\"circle-swatch\"\n [style.width.px]=\"circleSize\" [style.height.px]=\"circleSize\"\n [style.margin-right.px]=\"circleSpacing\" [style.margin-bottom.px]=\"circleSpacing\"\n >\n <color-swatch\n [color]=\"color\" [style]=\"swatchStyle\" [focus]=\"focus\" [focusStyle]=\"focusStyle\"\n (onClick)=\"handleClick($event)\" (onHover)=\"onSwatchHover.emit($event)\">\n </color-swatch>\n <div class=\"clear\"></div>\n </div>\n `,\n styles: [\n `\n .circle-swatch {\n transform: scale(1);\n transition: transform 100ms ease;\n }\n .circle-swatch:hover {\n transform: scale(1.2);\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n})\nexport class CircleSwatchComponent implements OnChanges {\n @Input() color!: string;\n @Input() circleSize = 28;\n @Input() circleSpacing = 14;\n @Input() focus = false;\n @Output() onClick = new EventEmitter<any>();\n @Output() onSwatchHover = new EventEmitter<any>();\n focusStyle: Record<string, string> = {};\n swatchStyle: Record<string, string> = {\n borderRadius: '50%',\n background: 'transparent',\n transition: '100ms box-shadow ease 0s',\n };\n\n ngOnChanges() {\n this.swatchStyle.boxShadow = `inset 0 0 0 ${this.circleSize / 2}px ${this.color}`;\n this.focusStyle.boxShadow = `inset 0 0 0 ${ this.circleSize / 2 }px ${ this.color }, 0 0 5px ${ this.color }`;\n if (this.focus) {\n this.focusStyle.boxShadow = `inset 0 0 0 3px ${ this.color }, 0 0 5px ${ this.color }`;\n }\n }\n handleClick({ hex, $event }) {\n this.onClick.emit({ hex, $event });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule } from '@angular/core';\nimport {\n amber,\n blue,\n blueGrey,\n brown,\n cyan,\n deepOrange,\n deepPurple,\n green,\n indigo,\n lightBlue,\n lightGreen,\n lime,\n orange,\n pink,\n purple,\n red,\n teal,\n yellow,\n} from 'material-colors';\nimport { TinyColor } from '@ctrl/tinycolor';\n\nimport { ColorWrap, isValidHex, SwatchModule } from 'ngx-color';\nimport { CircleSwatchComponent } from './circle-swatch.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'color-circle',\n template: `\n <div\n class=\"circle-picker {{ className }}\"\n [style.width.px]=\"width\"\n [style.margin-right.px]=\"-circleSpacing\"\n [style.margin-bottom.px]=\"-circleSpacing\"\n >\n <color-circle-swatch\n *ngFor=\"let color of colors\"\n [circleSize]=\"circleSize\"\n [circleSpacing]=\"circleSpacing\"\n [color]=\"color\"\n [focus]=\"isActive(color)\"\n (onClick)=\"handleBlockChange($event)\"\n (onSwatchHover)=\"onSwatchHover.emit($event)\"\n ></color-circle-swatch>\n </div>\n `,\n styles: [\n `\n .circle-picker {\n display: flex;\n flex-wrap: wrap;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CircleComponent),\n multi: true,\n },\n {\n provide: ColorWrap,\n useExisting: forwardRef(() => CircleComponent),\n },\n ]\n})\nexport class CircleComponent extends ColorWrap {\n /** Pixel value for picker width */\n @Input() width: string | number = 252;\n /** Color squares to display */\n @Input()\n colors: string[] = [\n red['500'],\n pink['500'],\n purple['500'],\n deepPurple['500'],\n indigo['500'],\n blue['500'],\n lightBlue['500'],\n cyan['500'],\n teal['500'],\n green['500'],\n lightGreen['500'],\n lime['500'],\n yellow['500'],\n amber['500'],\n orange['500'],\n deepOrange['500'],\n brown['500'],\n blueGrey['500'],\n ];\n /** Value for circle size */\n @Input() circleSize = 28;\n /** Value for spacing between circles */\n @Input() circleSpacing = 14;\n\n constructor() {\n super();\n }\n isActive(color: string) {\n return new TinyColor(this.hex).equals(color);\n }\n handleBlockChange({ hex, $event }: { hex: string, $event: Event }) {\n if (isValidHex(hex)) {\n this.handleChange({ hex, source: 'hex' }, $event);\n }\n }\n handleValueChange({ data, $event }) {\n this.handleChange(data, $event);\n }\n}\n\n@NgModule({\n declarations: [CircleComponent, CircleSwatchComponent],\n exports: [CircleComponent, CircleSwatchComponent],\n imports: [CommonModule, SwatchModule],\n})\nexport class ColorCircleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './circle.component';\n\nexport {CircleSwatchComponent as ɵa} from './circle-swatch.component';"],"names":[],"mappings":";;;;;;;MAqCa,qBAAqB;IA5BlC;QA8BW,eAAU,GAAG,EAAE,CAAC;QAChB,kBAAa,GAAG,EAAE,CAAC;QACnB,UAAK,GAAG,KAAK,CAAC;QACb,YAAO,GAAG,IAAI,YAAY,EAAO,CAAC;QAClC,kBAAa,GAAG,IAAI,YAAY,EAAO,CAAC;QAClD,eAAU,GAA2B,EAAE,CAAC;QACxC,gBAAW,GAA2B;YACpC,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,aAAa;YACzB,UAAU,EAAE,0BAA0B;SACvC,CAAC;KAYH;IAVC,WAAW;QACT,IAAI,CAAC,WAAW,CAAC,SAAS,GAAG,eAAe,IAAI,CAAC,UAAU,GAAG,CA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gBACtD,OAAO,EAAE,CAAC,eAAe,EAAE,qBAAqB,CAAC;gBACjD,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;aACtC;;;ACxHD;;;;;;"}
@@ -1 +0,0 @@
1
- {"__symbolic":"module","version":4,"metadata":{"CircleComponent":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"ngx-color","name":"ColorWrap","line":70,"character":37},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":28,"character":1},"arguments":[{"selector":"color-circle","template":"\n <div\n class=\"circle-picker {{ className }}\"\n [style.width.px]=\"width\"\n [style.margin-right.px]=\"-circleSpacing\"\n [style.margin-bottom.px]=\"-circleSpacing\"\n >\n <color-circle-swatch\n *ngFor=\"let color of colors\"\n [circleSize]=\"circleSize\"\n [circleSpacing]=\"circleSpacing\"\n [color]=\"color\"\n [focus]=\"isActive(color)\"\n (onClick)=\"handleBlockChange($event)\"\n (onSwatchHover)=\"onSwatchHover.emit($event)\"\n ></color-circle-swatch>\n </div>\n ","styles":["\n .circle-picker {\n display: flex;\n flex-wrap: wrap;\n }\n "],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":56,"character":19},"member":"OnPush"},"preserveWhitespaces":false,"providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":60,"character":15},"useExisting":{"__symbolic":"reference","name":"CircleComponent"},"multi":true},{"provide":{"__symbolic":"reference","module":"ngx-color","name":"ColorWrap","line":65,"character":15},"useExisting":{"__symbolic":"reference","name":"CircleComponent"}}]}]}],"members":{"width":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":72,"character":3}}]}],"colors":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":74,"character":3}}]}],"circleSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":96,"character":3}}]}],"circleSpacing":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":98,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor"}],"isActive":[{"__symbolic":"method"}],"handleBlockChange":[{"__symbolic":"method"}],"handleValueChange":[{"__symbolic":"method"}]}},"ColorCircleModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":116,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CircleComponent"},{"__symbolic":"reference","name":"ɵa"}],"exports":[{"__symbolic":"reference","name":"CircleComponent"},{"__symbolic":"reference","name":"ɵa"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":119,"character":12},{"__symbolic":"reference","module":"ngx-color","name":"SwatchModule","line":119,"character":26}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"color-circle-swatch","template":"\n <div class=\"circle-swatch\"\n [style.width.px]=\"circleSize\" [style.height.px]=\"circleSize\"\n [style.margin-right.px]=\"circleSpacing\" [style.margin-bottom.px]=\"circleSpacing\"\n >\n <color-swatch\n [color]=\"color\" [style]=\"swatchStyle\" [focus]=\"focus\" [focusStyle]=\"focusStyle\"\n (onClick)=\"handleClick($event)\" (onHover)=\"onSwatchHover.emit($event)\">\n </color-swatch>\n <div class=\"clear\"></div>\n </div>\n ","styles":["\n .circle-swatch {\n transform: scale(1);\n transition: transform 100ms ease;\n }\n .circle-swatch:hover {\n transform: scale(1.2);\n }\n "],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":34,"character":19},"member":"OnPush"},"preserveWhitespaces":false}]}],"members":{"color":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":38,"character":3}}]}],"circleSize":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":39,"character":3}}]}],"circleSpacing":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":3}}]}],"focus":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":3}}]}],"onClick":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":42,"character":3}}]}],"onSwatchHover":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":43,"character":3}}]}],"ngOnChanges":[{"__symbolic":"method"}],"handleClick":[{"__symbolic":"method"}]}}},"origins":{"CircleComponent":"./circle.component","ColorCircleModule":"./circle.component","ɵa":"./circle-swatch.component"},"importAs":"ngx-color/circle"}