ngx-color 8.0.3 → 9.0.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 (219) hide show
  1. package/README.md +2 -3
  2. package/alpha/alpha-picker.component.d.ts +1 -1
  3. package/alpha.component.d.ts +1 -1
  4. package/block/block-swatches.component.d.ts +1 -1
  5. package/block/block.component.d.ts +1 -1
  6. package/checkboard.component.d.ts +1 -1
  7. package/chrome/chrome-fields.component.d.ts +1 -1
  8. package/chrome/chrome.component.d.ts +1 -1
  9. package/circle/circle-swatch.component.d.ts +1 -1
  10. package/circle/circle.component.d.ts +1 -1
  11. package/color-wrap.component.d.ts +1 -1
  12. package/compact/compact-color.component.d.ts +1 -1
  13. package/compact/compact-fields.component.d.ts +1 -1
  14. package/compact/compact.component.d.ts +1 -1
  15. package/coordinates.directive.d.ts +1 -1
  16. package/editable-input.component.d.ts +1 -1
  17. package/esm2022/alpha/alpha-picker.component.mjs +102 -0
  18. package/esm2022/alpha.component.mjs +146 -0
  19. package/esm2022/block/block-swatches.component.mjs +63 -0
  20. package/esm2022/block/block.component.mjs +160 -0
  21. package/esm2022/checkboard.component.mjs +53 -0
  22. package/esm2022/chrome/chrome-fields.component.mjs +317 -0
  23. package/esm2022/chrome/chrome.component.mjs +187 -0
  24. package/esm2022/circle/circle-swatch.component.mjs +69 -0
  25. package/esm2022/circle/circle.component.mjs +136 -0
  26. package/esm2022/color-wrap.component.mjs +173 -0
  27. package/esm2022/compact/compact-color.component.mjs +71 -0
  28. package/esm2022/compact/compact-fields.component.mjs +165 -0
  29. package/esm2022/compact/compact.component.mjs +156 -0
  30. package/esm2022/coordinates.directive.mjs +108 -0
  31. package/esm2022/editable-input.component.mjs +212 -0
  32. package/esm2022/github/github-swatch.component.mjs +53 -0
  33. package/esm2022/github/github.component.mjs +114 -0
  34. package/esm2022/hue/hue-picker.component.mjs +102 -0
  35. package/esm2022/hue.component.mjs +128 -0
  36. package/esm2022/material/material.component.mjs +188 -0
  37. package/esm2022/photoshop/photoshop-button.component.mjs +33 -0
  38. package/esm2022/photoshop/photoshop-fields.component.mjs +214 -0
  39. package/esm2022/photoshop/photoshop-previews.component.mjs +40 -0
  40. package/esm2022/photoshop/photoshop.component.mjs +187 -0
  41. package/esm2022/raised.component.mjs +50 -0
  42. package/esm2022/saturation.component.mjs +100 -0
  43. package/esm2022/shade/shade-picker.component.mjs +94 -0
  44. package/esm2022/shade.component.mjs +133 -0
  45. package/esm2022/sketch/sketch-fields.component.mjs +211 -0
  46. package/esm2022/sketch/sketch-preset-colors.component.mjs +68 -0
  47. package/esm2022/sketch/sketch.component.mjs +215 -0
  48. package/esm2022/slider/slider-swatch.component.mjs +55 -0
  49. package/esm2022/slider/slider-swatches.component.mjs +119 -0
  50. package/esm2022/slider/slider.component.mjs +104 -0
  51. package/esm2022/swatch.component.mjs +112 -0
  52. package/esm2022/swatches/swatches-color.component.mjs +105 -0
  53. package/esm2022/swatches/swatches-group.component.mjs +50 -0
  54. package/esm2022/swatches/swatches.component.mjs +244 -0
  55. package/esm2022/twitter/twitter.component.mjs +161 -0
  56. package/{fesm2020 → fesm2022}/ngx-color-alpha.mjs +30 -30
  57. package/fesm2022/ngx-color-alpha.mjs.map +1 -0
  58. package/{fesm2020 → fesm2022}/ngx-color-block.mjs +65 -66
  59. package/fesm2022/ngx-color-block.mjs.map +1 -0
  60. package/{fesm2020 → fesm2022}/ngx-color-chrome.mjs +77 -74
  61. package/{fesm2020 → fesm2022}/ngx-color-chrome.mjs.map +1 -1
  62. package/{fesm2015 → fesm2022}/ngx-color-circle.mjs +61 -62
  63. package/fesm2022/ngx-color-circle.mjs.map +1 -0
  64. package/{fesm2015 → fesm2022}/ngx-color-compact.mjs +136 -136
  65. package/{fesm2015 → fesm2022}/ngx-color-compact.mjs.map +1 -1
  66. package/{fesm2015 → fesm2022}/ngx-color-github.mjs +53 -54
  67. package/{fesm2020 → fesm2022}/ngx-color-github.mjs.map +1 -1
  68. package/{fesm2020 → fesm2022}/ngx-color-hue.mjs +32 -32
  69. package/fesm2022/ngx-color-hue.mjs.map +1 -0
  70. package/{fesm2015 → fesm2022}/ngx-color-material.mjs +59 -59
  71. package/{fesm2015 → fesm2022}/ngx-color-material.mjs.map +1 -1
  72. package/{fesm2020 → fesm2022}/ngx-color-photoshop.mjs +111 -113
  73. package/{fesm2015 → fesm2022}/ngx-color-photoshop.mjs.map +1 -1
  74. package/{fesm2015 → fesm2022}/ngx-color-shade.mjs +29 -29
  75. package/fesm2022/ngx-color-shade.mjs.map +1 -0
  76. package/{fesm2015 → fesm2022}/ngx-color-sketch.mjs +94 -93
  77. package/{fesm2015 → fesm2022}/ngx-color-sketch.mjs.map +1 -1
  78. package/{fesm2020 → fesm2022}/ngx-color-slider.mjs +46 -45
  79. package/{fesm2015 → fesm2022}/ngx-color-slider.mjs.map +1 -1
  80. package/{fesm2015 → fesm2022}/ngx-color-swatches.mjs +182 -182
  81. package/fesm2022/ngx-color-swatches.mjs.map +1 -0
  82. package/{fesm2015 → fesm2022}/ngx-color-twitter.mjs +55 -55
  83. package/{fesm2015 → fesm2022}/ngx-color-twitter.mjs.map +1 -1
  84. package/{fesm2020 → fesm2022}/ngx-color.mjs +200 -160
  85. package/fesm2022/ngx-color.mjs.map +1 -0
  86. package/github/github-swatch.component.d.ts +1 -1
  87. package/github/github.component.d.ts +1 -1
  88. package/hue/hue-picker.component.d.ts +1 -1
  89. package/hue.component.d.ts +1 -1
  90. package/material/material.component.d.ts +1 -1
  91. package/package.json +59 -84
  92. package/photoshop/photoshop-button.component.d.ts +1 -1
  93. package/photoshop/photoshop-fields.component.d.ts +1 -1
  94. package/photoshop/photoshop-previews.component.d.ts +1 -1
  95. package/photoshop/photoshop.component.d.ts +1 -1
  96. package/raised.component.d.ts +2 -2
  97. package/saturation.component.d.ts +1 -1
  98. package/shade/shade-picker.component.d.ts +1 -1
  99. package/shade.component.d.ts +1 -1
  100. package/sketch/sketch-fields.component.d.ts +1 -1
  101. package/sketch/sketch-preset-colors.component.d.ts +1 -1
  102. package/sketch/sketch.component.d.ts +1 -1
  103. package/slider/slider-swatch.component.d.ts +1 -1
  104. package/slider/slider-swatches.component.d.ts +1 -1
  105. package/slider/slider.component.d.ts +1 -1
  106. package/swatch.component.d.ts +1 -1
  107. package/swatches/swatches-color.component.d.ts +1 -1
  108. package/swatches/swatches-group.component.d.ts +1 -1
  109. package/swatches/swatches.component.d.ts +1 -1
  110. package/twitter/twitter.component.d.ts +1 -1
  111. package/esm2020/alpha/alpha-picker.component.mjs +0 -100
  112. package/esm2020/alpha.component.mjs +0 -138
  113. package/esm2020/block/block-swatches.component.mjs +0 -63
  114. package/esm2020/block/block.component.mjs +0 -158
  115. package/esm2020/checkboard.component.mjs +0 -50
  116. package/esm2020/chrome/chrome-fields.component.mjs +0 -314
  117. package/esm2020/chrome/chrome.component.mjs +0 -184
  118. package/esm2020/circle/circle-swatch.component.mjs +0 -69
  119. package/esm2020/circle/circle.component.mjs +0 -134
  120. package/esm2020/color-wrap.component.mjs +0 -163
  121. package/esm2020/compact/compact-color.component.mjs +0 -70
  122. package/esm2020/compact/compact-fields.component.mjs +0 -164
  123. package/esm2020/compact/compact.component.mjs +0 -154
  124. package/esm2020/coordinates.directive.mjs +0 -104
  125. package/esm2020/editable-input.component.mjs +0 -199
  126. package/esm2020/github/github-swatch.component.mjs +0 -53
  127. package/esm2020/github/github.component.mjs +0 -112
  128. package/esm2020/hue/hue-picker.component.mjs +0 -100
  129. package/esm2020/hue.component.mjs +0 -124
  130. package/esm2020/material/material.component.mjs +0 -186
  131. package/esm2020/photoshop/photoshop-button.component.mjs +0 -34
  132. package/esm2020/photoshop/photoshop-fields.component.mjs +0 -212
  133. package/esm2020/photoshop/photoshop-previews.component.mjs +0 -40
  134. package/esm2020/photoshop/photoshop.component.mjs +0 -185
  135. package/esm2020/raised.component.mjs +0 -50
  136. package/esm2020/saturation.component.mjs +0 -92
  137. package/esm2020/shade/shade-picker.component.mjs +0 -92
  138. package/esm2020/shade.component.mjs +0 -125
  139. package/esm2020/sketch/sketch-fields.component.mjs +0 -209
  140. package/esm2020/sketch/sketch-preset-colors.component.mjs +0 -68
  141. package/esm2020/sketch/sketch.component.mjs +0 -212
  142. package/esm2020/slider/slider-swatch.component.mjs +0 -52
  143. package/esm2020/slider/slider-swatches.component.mjs +0 -119
  144. package/esm2020/slider/slider.component.mjs +0 -102
  145. package/esm2020/swatch.component.mjs +0 -110
  146. package/esm2020/swatches/swatches-color.component.mjs +0 -104
  147. package/esm2020/swatches/swatches-group.component.mjs +0 -49
  148. package/esm2020/swatches/swatches.component.mjs +0 -242
  149. package/esm2020/twitter/twitter.component.mjs +0 -159
  150. package/fesm2015/ngx-color-alpha.mjs +0 -107
  151. package/fesm2015/ngx-color-alpha.mjs.map +0 -1
  152. package/fesm2015/ngx-color-block.mjs +0 -223
  153. package/fesm2015/ngx-color-block.mjs.map +0 -1
  154. package/fesm2015/ngx-color-chrome.mjs +0 -499
  155. package/fesm2015/ngx-color-chrome.mjs.map +0 -1
  156. package/fesm2015/ngx-color-circle.mjs.map +0 -1
  157. package/fesm2015/ngx-color-github.mjs.map +0 -1
  158. package/fesm2015/ngx-color-hue.mjs +0 -107
  159. package/fesm2015/ngx-color-hue.mjs.map +0 -1
  160. package/fesm2015/ngx-color-photoshop.mjs +0 -467
  161. package/fesm2015/ngx-color-shade.mjs.map +0 -1
  162. package/fesm2015/ngx-color-slider.mjs +0 -273
  163. package/fesm2015/ngx-color-swatches.mjs.map +0 -1
  164. package/fesm2015/ngx-color.mjs +0 -1202
  165. package/fesm2015/ngx-color.mjs.map +0 -1
  166. package/fesm2020/ngx-color-alpha.mjs.map +0 -1
  167. package/fesm2020/ngx-color-block.mjs.map +0 -1
  168. package/fesm2020/ngx-color-circle.mjs +0 -207
  169. package/fesm2020/ngx-color-circle.mjs.map +0 -1
  170. package/fesm2020/ngx-color-compact.mjs +0 -385
  171. package/fesm2020/ngx-color-compact.mjs.map +0 -1
  172. package/fesm2020/ngx-color-github.mjs +0 -169
  173. package/fesm2020/ngx-color-hue.mjs.map +0 -1
  174. package/fesm2020/ngx-color-material.mjs +0 -193
  175. package/fesm2020/ngx-color-material.mjs.map +0 -1
  176. package/fesm2020/ngx-color-photoshop.mjs.map +0 -1
  177. package/fesm2020/ngx-color-shade.mjs +0 -99
  178. package/fesm2020/ngx-color-shade.mjs.map +0 -1
  179. package/fesm2020/ngx-color-sketch.mjs +0 -485
  180. package/fesm2020/ngx-color-sketch.mjs.map +0 -1
  181. package/fesm2020/ngx-color-slider.mjs.map +0 -1
  182. package/fesm2020/ngx-color-swatches.mjs +0 -391
  183. package/fesm2020/ngx-color-swatches.mjs.map +0 -1
  184. package/fesm2020/ngx-color-twitter.mjs +0 -166
  185. package/fesm2020/ngx-color-twitter.mjs.map +0 -1
  186. package/fesm2020/ngx-color.mjs.map +0 -1
  187. /package/{esm2020 → esm2022}/alpha/ngx-color-alpha.mjs +0 -0
  188. /package/{esm2020 → esm2022}/alpha/public_api.mjs +0 -0
  189. /package/{esm2020 → esm2022}/block/ngx-color-block.mjs +0 -0
  190. /package/{esm2020 → esm2022}/block/public_api.mjs +0 -0
  191. /package/{esm2020 → esm2022}/chrome/ngx-color-chrome.mjs +0 -0
  192. /package/{esm2020 → esm2022}/chrome/public_api.mjs +0 -0
  193. /package/{esm2020 → esm2022}/circle/ngx-color-circle.mjs +0 -0
  194. /package/{esm2020 → esm2022}/circle/public_api.mjs +0 -0
  195. /package/{esm2020 → esm2022}/compact/ngx-color-compact.mjs +0 -0
  196. /package/{esm2020 → esm2022}/compact/public_api.mjs +0 -0
  197. /package/{esm2020 → esm2022}/github/ngx-color-github.mjs +0 -0
  198. /package/{esm2020 → esm2022}/github/public_api.mjs +0 -0
  199. /package/{esm2020 → esm2022}/helpers/checkboard.mjs +0 -0
  200. /package/{esm2020 → esm2022}/helpers/color.interfaces.mjs +0 -0
  201. /package/{esm2020 → esm2022}/helpers/color.mjs +0 -0
  202. /package/{esm2020 → esm2022}/hue/ngx-color-hue.mjs +0 -0
  203. /package/{esm2020 → esm2022}/hue/public_api.mjs +0 -0
  204. /package/{esm2020 → esm2022}/material/ngx-color-material.mjs +0 -0
  205. /package/{esm2020 → esm2022}/material/public_api.mjs +0 -0
  206. /package/{esm2020 → esm2022}/ngx-color.mjs +0 -0
  207. /package/{esm2020 → esm2022}/photoshop/ngx-color-photoshop.mjs +0 -0
  208. /package/{esm2020 → esm2022}/photoshop/public_api.mjs +0 -0
  209. /package/{esm2020 → esm2022}/public_api.mjs +0 -0
  210. /package/{esm2020 → esm2022}/shade/ngx-color-shade.mjs +0 -0
  211. /package/{esm2020 → esm2022}/shade/public_api.mjs +0 -0
  212. /package/{esm2020 → esm2022}/sketch/ngx-color-sketch.mjs +0 -0
  213. /package/{esm2020 → esm2022}/sketch/public_api.mjs +0 -0
  214. /package/{esm2020 → esm2022}/slider/ngx-color-slider.mjs +0 -0
  215. /package/{esm2020 → esm2022}/slider/public_api.mjs +0 -0
  216. /package/{esm2020 → esm2022}/swatches/ngx-color-swatches.mjs +0 -0
  217. /package/{esm2020 → esm2022}/swatches/public_api.mjs +0 -0
  218. /package/{esm2020 → esm2022}/twitter/ngx-color-twitter.mjs +0 -0
  219. /package/{esm2020 → esm2022}/twitter/public_api.mjs +0 -0
@@ -1,107 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { forwardRef, Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
4
- import * as i1 from 'ngx-color';
5
- import { ColorWrap, toState, HueModule } from 'ngx-color';
6
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
-
8
- class HuePickerComponent extends ColorWrap {
9
- constructor() {
10
- super();
11
- /** Pixel value for picker width */
12
- this.width = 316;
13
- /** Pixel value for picker height */
14
- this.height = 16;
15
- this.radius = 2;
16
- this.direction = 'horizontal';
17
- this.pointer = {
18
- width: '18px',
19
- height: '18px',
20
- borderRadius: '50%',
21
- transform: 'translate(-9px, -2px)',
22
- backgroundColor: 'rgb(248, 248, 248)',
23
- boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)',
24
- };
25
- }
26
- ngOnChanges() {
27
- if (this.direction === 'vertical') {
28
- this.pointer.transform = 'translate(-3px, -9px)';
29
- }
30
- this.setState(toState(this.color, this.oldHue));
31
- }
32
- handlePickerChange({ data, $event }) {
33
- this.handleChange({ a: 1, h: data.h, l: 0.5, s: 1 }, $event);
34
- }
35
- }
36
- HuePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: HuePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
37
- HuePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: HuePickerComponent, selector: "color-hue-picker", inputs: { width: "width", height: "height", radius: "radius", direction: "direction" }, providers: [
38
- {
39
- provide: NG_VALUE_ACCESSOR,
40
- useExisting: forwardRef(() => HuePickerComponent),
41
- multi: true,
42
- },
43
- {
44
- provide: ColorWrap,
45
- useExisting: forwardRef(() => HuePickerComponent),
46
- },
47
- ], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
48
- <div class="hue-picker {{ className }}"
49
- [style.width.px]="width" [style.height.px]="height"
50
- >
51
- <color-hue [hsl]="hsl" [pointer]="pointer"
52
- [direction]="direction" [radius]="radius"
53
- (onChange)="handlePickerChange($event)"
54
- ></color-hue>
55
- </div>
56
- `, isInline: true, styles: [".hue-picker{position:relative}\n"], dependencies: [{ kind: "component", type: i1.HueComponent, selector: "color-hue", inputs: ["hsl", "pointer", "radius", "shadow", "hidePointer", "direction"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
57
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: HuePickerComponent, decorators: [{
58
- type: Component,
59
- args: [{ selector: 'color-hue-picker', template: `
60
- <div class="hue-picker {{ className }}"
61
- [style.width.px]="width" [style.height.px]="height"
62
- >
63
- <color-hue [hsl]="hsl" [pointer]="pointer"
64
- [direction]="direction" [radius]="radius"
65
- (onChange)="handlePickerChange($event)"
66
- ></color-hue>
67
- </div>
68
- `, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
69
- {
70
- provide: NG_VALUE_ACCESSOR,
71
- useExisting: forwardRef(() => HuePickerComponent),
72
- multi: true,
73
- },
74
- {
75
- provide: ColorWrap,
76
- useExisting: forwardRef(() => HuePickerComponent),
77
- },
78
- ], styles: [".hue-picker{position:relative}\n"] }]
79
- }], ctorParameters: function () { return []; }, propDecorators: { width: [{
80
- type: Input
81
- }], height: [{
82
- type: Input
83
- }], radius: [{
84
- type: Input
85
- }], direction: [{
86
- type: Input
87
- }] } });
88
- class ColorHueModule {
89
- }
90
- ColorHueModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorHueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
91
- ColorHueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorHueModule, declarations: [HuePickerComponent], imports: [CommonModule, HueModule], exports: [HuePickerComponent] });
92
- ColorHueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorHueModule, imports: [CommonModule, HueModule] });
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorHueModule, decorators: [{
94
- type: NgModule,
95
- args: [{
96
- declarations: [HuePickerComponent],
97
- exports: [HuePickerComponent],
98
- imports: [CommonModule, HueModule],
99
- }]
100
- }] });
101
-
102
- /**
103
- * Generated bundle index. Do not edit.
104
- */
105
-
106
- export { ColorHueModule, HuePickerComponent };
107
- //# sourceMappingURL=ngx-color-hue.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-color-hue.mjs","sources":["../../src/lib/hue/hue-picker.component.ts","../../src/lib/hue/ngx-color-hue.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule, OnChanges } from '@angular/core';\n\nimport { ColorWrap, HueModule, toState } from 'ngx-color';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'color-hue-picker',\n template: `\n <div class=\"hue-picker {{ className }}\"\n [style.width.px]=\"width\" [style.height.px]=\"height\"\n >\n <color-hue [hsl]=\"hsl\" [pointer]=\"pointer\"\n [direction]=\"direction\" [radius]=\"radius\"\n (onChange)=\"handlePickerChange($event)\"\n ></color-hue>\n </div>\n `,\n styles: [\n `\n .hue-picker {\n position: relative;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HuePickerComponent),\n multi: true,\n },\n {\n provide: ColorWrap,\n useExisting: forwardRef(() => HuePickerComponent),\n },\n ]\n})\nexport class HuePickerComponent extends ColorWrap implements OnChanges {\n /** Pixel value for picker width */\n @Input() width: string | number = 316;\n /** Pixel value for picker height */\n @Input() height: string | number = 16;\n @Input() radius = 2;\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n pointer: {[key: string]: string} = {\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n transform: 'translate(-9px, -2px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)',\n };\n\n constructor() {\n super();\n }\n\n ngOnChanges() {\n if (this.direction === 'vertical') {\n this.pointer.transform = 'translate(-3px, -9px)';\n }\n this.setState(toState(this.color, this.oldHue));\n }\n handlePickerChange({ data, $event }) {\n this.handleChange({ a: 1, h: data.h, l: 0.5, s: 1 }, $event);\n }\n}\n\n@NgModule({\n declarations: [HuePickerComponent],\n exports: [HuePickerComponent],\n imports: [CommonModule, HueModule],\n})\nexport class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 -1,467 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, NgModule } from '@angular/core';
3
- import * as i1 from 'ngx-color';
4
- import { isValidHex, ColorWrap, EditableInputModule, HueModule, AlphaModule, SwatchModule, SaturationModule } from 'ngx-color';
5
- import { CommonModule } from '@angular/common';
6
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
-
8
- class PhotoshopButtonComponent {
9
- constructor() {
10
- this.label = '';
11
- this.active = false;
12
- this.onClick = new EventEmitter();
13
- }
14
- }
15
- PhotoshopButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- PhotoshopButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PhotoshopButtonComponent, selector: "color-photoshop-button", inputs: { label: "label", active: "active" }, outputs: { onClick: "onClick" }, ngImport: i0, template: `
17
- <div class="photoshop-button" [class.active]="active"
18
- (click)="onClick.emit($event)"
19
- >
20
- {{ label }}
21
- </div>
22
- `, isInline: true, styles: [".photoshop-button{background-image:linear-gradient(-180deg,rgb(255,255,255) 0%,rgb(230,230,230) 100%);border:1px solid rgb(135,135,135);border-radius:2px;height:22px;box-shadow:#eaeaea 0 1px;font-size:14px;color:#000;line-height:20px;text-align:center;margin-bottom:10px;cursor:pointer}.photoshop-button.active{box-shadow:0 0 0 1px #878787}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopButtonComponent, decorators: [{
24
- type: Component,
25
- args: [{ selector: 'color-photoshop-button', template: `
26
- <div class="photoshop-button" [class.active]="active"
27
- (click)="onClick.emit($event)"
28
- >
29
- {{ label }}
30
- </div>
31
- `, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".photoshop-button{background-image:linear-gradient(-180deg,rgb(255,255,255) 0%,rgb(230,230,230) 100%);border:1px solid rgb(135,135,135);border-radius:2px;height:22px;box-shadow:#eaeaea 0 1px;font-size:14px;color:#000;line-height:20px;text-align:center;margin-bottom:10px;cursor:pointer}.photoshop-button.active{box-shadow:0 0 0 1px #878787}\n"] }]
32
- }], propDecorators: { label: [{
33
- type: Input
34
- }], active: [{
35
- type: Input
36
- }], onClick: [{
37
- type: Output
38
- }] } });
39
-
40
- class PhotoshopFieldsComponent {
41
- constructor() {
42
- this.onChange = new EventEmitter();
43
- this.RGBinput = {
44
- marginLeft: '35%',
45
- width: '40%',
46
- height: '22px',
47
- border: '1px solid rgb(136, 136, 136)',
48
- boxShadow: 'rgba(0, 0, 0, 0.1) 0px 1px 1px inset, rgb(236, 236, 236) 0px 1px 0px 0px',
49
- marginBottom: '2px',
50
- fontSize: '13px',
51
- paddingLeft: '3px',
52
- marginRight: '10px',
53
- };
54
- this.RGBwrap = {
55
- position: 'relative',
56
- };
57
- this.RGBlabel = {
58
- left: '0px',
59
- width: '34px',
60
- textTransform: 'uppercase',
61
- fontSize: '13px',
62
- height: '24px',
63
- lineHeight: '24px',
64
- position: 'absolute',
65
- };
66
- this.HEXinput = {
67
- marginLeft: '20%',
68
- width: '80%',
69
- height: '22px',
70
- border: '1px solid #888888',
71
- boxShadow: 'inset 0 1px 1px rgba(0,0,0,.1), 0 1px 0 0 #ECECEC',
72
- marginBottom: '3px',
73
- fontSize: '13px',
74
- paddingLeft: '3px',
75
- };
76
- this.HEXwrap = {
77
- position: 'relative',
78
- };
79
- this.HEXlabel = {
80
- position: 'absolute',
81
- top: '0px',
82
- left: '0px',
83
- width: '14px',
84
- textTransform: 'uppercase',
85
- fontSize: '13px',
86
- height: '24px',
87
- lineHeight: '24px',
88
- };
89
- }
90
- round(v) {
91
- return Math.round(v);
92
- }
93
- handleValueChange({ data, $event }) {
94
- if (data['#']) {
95
- if (isValidHex(data['#'])) {
96
- this.onChange.emit({
97
- data: {
98
- hex: data['#'],
99
- source: 'hex',
100
- },
101
- $event,
102
- });
103
- }
104
- }
105
- else if (data.r || data.g || data.b) {
106
- this.onChange.emit({
107
- data: {
108
- r: data.r || this.rgb.r,
109
- g: data.g || this.rgb.g,
110
- b: data.b || this.rgb.b,
111
- source: 'rgb',
112
- },
113
- $event,
114
- });
115
- }
116
- else if (data.h || data.s || data.v) {
117
- this.onChange.emit({
118
- data: {
119
- h: data.h || this.hsv.h,
120
- s: data.s || this.hsv.s,
121
- v: data.v || this.hsv.v,
122
- source: 'hsv',
123
- },
124
- $event,
125
- });
126
- }
127
- }
128
- }
129
- PhotoshopFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
130
- PhotoshopFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PhotoshopFieldsComponent, selector: "color-photoshop-fields", inputs: { rgb: "rgb", hsv: "hsv", hex: "hex" }, outputs: { onChange: "onChange" }, ngImport: i0, template: `
131
- <div class="photoshop-fields">
132
- <color-editable-input
133
- [value]="round(hsv.h)"
134
- label="h"
135
- (onChange)="handleValueChange($event)"
136
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
137
- ></color-editable-input>
138
- <color-editable-input
139
- [value]="round(hsv.s * 100)"
140
- label="s"
141
- (onChange)="handleValueChange($event)"
142
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
143
- ></color-editable-input>
144
- <color-editable-input
145
- [value]="round(hsv.v * 100)"
146
- label="v"
147
- (onChange)="handleValueChange($event)"
148
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
149
- ></color-editable-input>
150
- <div class="photoshop-divider"></div>
151
- <color-editable-input
152
- [value]="rgb.r"
153
- label="r"
154
- (onChange)="handleValueChange($event)"
155
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
156
- ></color-editable-input>
157
- <color-editable-input
158
- [value]="rgb.g"
159
- label="g"
160
- (onChange)="handleValueChange($event)"
161
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
162
- ></color-editable-input>
163
- <color-editable-input
164
- [value]="rgb.b"
165
- label="b"
166
- (onChange)="handleValueChange($event)"
167
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
168
- ></color-editable-input>
169
- <div class="photoshop-divider"></div>
170
- <color-editable-input
171
- [value]="hex.replace('#', '')"
172
- label="#"
173
- (onChange)="handleValueChange($event)"
174
- [style]="{input: HEXinput, wrap: HEXwrap, label: HEXlabel}"
175
- ></color-editable-input>
176
- <div class="photoshop-field-symbols">
177
- <div class="photoshop-symbol">°</div>
178
- <div class="photoshop-symbol">%</div>
179
- <div class="photoshop-symbol">%</div>
180
- </div>
181
- </div>
182
- `, isInline: true, styles: [".photoshop-fields{padding-top:5px;padding-bottom:9px;width:85px;position:relative}.photoshop-field-symbols{position:absolute;top:5px;right:-7px;font-size:13px}.photoshop-symbol{height:24px;line-height:24px;padding-bottom:7px}.photoshop-divider{height:5px}\n"], dependencies: [{ kind: "component", type: i1.EditableInputComponent, selector: "color-editable-input", inputs: ["style", "label", "value", "arrowOffset", "dragLabel", "dragMax", "placeholder"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopFieldsComponent, decorators: [{
184
- type: Component,
185
- args: [{ selector: 'color-photoshop-fields', template: `
186
- <div class="photoshop-fields">
187
- <color-editable-input
188
- [value]="round(hsv.h)"
189
- label="h"
190
- (onChange)="handleValueChange($event)"
191
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
192
- ></color-editable-input>
193
- <color-editable-input
194
- [value]="round(hsv.s * 100)"
195
- label="s"
196
- (onChange)="handleValueChange($event)"
197
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
198
- ></color-editable-input>
199
- <color-editable-input
200
- [value]="round(hsv.v * 100)"
201
- label="v"
202
- (onChange)="handleValueChange($event)"
203
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
204
- ></color-editable-input>
205
- <div class="photoshop-divider"></div>
206
- <color-editable-input
207
- [value]="rgb.r"
208
- label="r"
209
- (onChange)="handleValueChange($event)"
210
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
211
- ></color-editable-input>
212
- <color-editable-input
213
- [value]="rgb.g"
214
- label="g"
215
- (onChange)="handleValueChange($event)"
216
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
217
- ></color-editable-input>
218
- <color-editable-input
219
- [value]="rgb.b"
220
- label="b"
221
- (onChange)="handleValueChange($event)"
222
- [style]="{input: RGBinput, wrap: RGBwrap, label: RGBlabel}"
223
- ></color-editable-input>
224
- <div class="photoshop-divider"></div>
225
- <color-editable-input
226
- [value]="hex.replace('#', '')"
227
- label="#"
228
- (onChange)="handleValueChange($event)"
229
- [style]="{input: HEXinput, wrap: HEXwrap, label: HEXlabel}"
230
- ></color-editable-input>
231
- <div class="photoshop-field-symbols">
232
- <div class="photoshop-symbol">°</div>
233
- <div class="photoshop-symbol">%</div>
234
- <div class="photoshop-symbol">%</div>
235
- </div>
236
- </div>
237
- `, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".photoshop-fields{padding-top:5px;padding-bottom:9px;width:85px;position:relative}.photoshop-field-symbols{position:absolute;top:5px;right:-7px;font-size:13px}.photoshop-symbol{height:24px;line-height:24px;padding-bottom:7px}.photoshop-divider{height:5px}\n"] }]
238
- }], propDecorators: { rgb: [{
239
- type: Input
240
- }], hsv: [{
241
- type: Input
242
- }], hex: [{
243
- type: Input
244
- }], onChange: [{
245
- type: Output
246
- }] } });
247
-
248
- class PhotoshopPreviewsComponent {
249
- constructor() {
250
- this.currentColor = '';
251
- this.backgroundNew = '';
252
- }
253
- ngOnChanges() {
254
- this.backgroundNew = `rgb(${this.rgb.r},${this.rgb.g}, ${this.rgb.b})`;
255
- }
256
- }
257
- PhotoshopPreviewsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopPreviewsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
258
- PhotoshopPreviewsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PhotoshopPreviewsComponent, selector: "color-photoshop-previews", inputs: { rgb: "rgb", currentColor: "currentColor" }, usesOnChanges: true, ngImport: i0, template: `
259
- <div>
260
- <div class="photoshop-label">new</div>
261
- <div class="photoshop-swatches">
262
- <div class="photoshop-new" [style.background]="backgroundNew"></div>
263
- <div class="photoshop-current" [style.background]="currentColor"></div>
264
- </div>
265
- <div class="photoshop-label">current</div>
266
- </div>
267
- `, isInline: true, styles: [".photoshop-swatches{border:1px solid #B3B3B3;border-bottom:1px solid #F0F0F0;margin-bottom:2px;margin-top:1px}.photoshop-new{height:34px;box-shadow:inset 1px 0 #000,inset -1px 0 #000,inset 0 1px #000}.photoshop-current{height:34px;box-shadow:inset 1px 0 #000,inset -1px 0 #000,inset 0 -1px #000}.photoshop-label{font-size:14px;color:#000;text-align:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopPreviewsComponent, decorators: [{
269
- type: Component,
270
- args: [{ selector: 'color-photoshop-previews', template: `
271
- <div>
272
- <div class="photoshop-label">new</div>
273
- <div class="photoshop-swatches">
274
- <div class="photoshop-new" [style.background]="backgroundNew"></div>
275
- <div class="photoshop-current" [style.background]="currentColor"></div>
276
- </div>
277
- <div class="photoshop-label">current</div>
278
- </div>
279
- `, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".photoshop-swatches{border:1px solid #B3B3B3;border-bottom:1px solid #F0F0F0;margin-bottom:2px;margin-top:1px}.photoshop-new{height:34px;box-shadow:inset 1px 0 #000,inset -1px 0 #000,inset 0 1px #000}.photoshop-current{height:34px;box-shadow:inset 1px 0 #000,inset -1px 0 #000,inset 0 -1px #000}.photoshop-label{font-size:14px;color:#000;text-align:center}\n"] }]
280
- }], propDecorators: { rgb: [{
281
- type: Input
282
- }], currentColor: [{
283
- type: Input
284
- }] } });
285
-
286
- class PhotoshopComponent extends ColorWrap {
287
- constructor() {
288
- super();
289
- /** Title text */
290
- this.header = 'Color Picker';
291
- this.onAccept = new EventEmitter();
292
- this.onCancel = new EventEmitter();
293
- this.circle = {
294
- width: '12px',
295
- height: '12px',
296
- borderRadius: '6px',
297
- boxShadow: 'rgb(255, 255, 255) 0px 0px 0px 1px inset',
298
- transform: 'translate(-6px, -10px)',
299
- };
300
- }
301
- handleValueChange({ data, $event }) {
302
- this.handleChange(data, $event);
303
- }
304
- }
305
- PhotoshopComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
306
- PhotoshopComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: PhotoshopComponent, selector: "color-photoshop", inputs: { header: "header" }, outputs: { onAccept: "onAccept", onCancel: "onCancel" }, providers: [
307
- {
308
- provide: NG_VALUE_ACCESSOR,
309
- useExisting: forwardRef(() => PhotoshopComponent),
310
- multi: true,
311
- },
312
- {
313
- provide: ColorWrap,
314
- useExisting: forwardRef(() => PhotoshopComponent),
315
- },
316
- ], usesInheritance: true, ngImport: i0, template: `
317
- <div class="photoshop-picker {{ className }}">
318
- <div class="photoshop-head">{{ header }}</div>
319
- <div class="photoshop-body">
320
- <div class="photoshop-saturation">
321
- <color-saturation
322
- [hsl]="hsl" [hsv]="hsv" [circle]="circle"
323
- (onChange)="handleValueChange($event)"
324
- ></color-saturation>
325
- </div>
326
- <div class="photoshop-hue">
327
- <color-hue direction="vertical"
328
- [hsl]="hsl" [hidePointer]="true"
329
- (onChange)="handleValueChange($event)"
330
- ></color-hue>
331
- </div>
332
- <div class="photoshop-controls">
333
- <div class="photoshop-top">
334
- <div class="photoshop-previews">
335
- <color-photoshop-previews
336
- [rgb]="rgb" [currentColor]="currentColor"
337
- ></color-photoshop-previews>
338
- </div>
339
- <div class="photoshop-actions">
340
- <color-photoshop-button label="OK"
341
- [active]="true" (onClick)="onAccept.emit($event)"
342
- ></color-photoshop-button>
343
- <color-photoshop-button label="Cancel"
344
- (onClick)="onCancel.emit($event)"
345
- >
346
- </color-photoshop-button>
347
- <color-photoshop-fields
348
- [rgb]="rgb" [hex]="hex" [hsv]="hsv"
349
- (onChange)="handleValueChange($event)"
350
- ></color-photoshop-fields>
351
- </div>
352
- </div>
353
- </div>
354
- </div>
355
- </div>
356
- `, isInline: true, styles: [".photoshop-picker{background:rgb(220,220,220);border-radius:4px;box-shadow:#00000040 0 0 0 1px,#00000026 0 8px 16px;box-sizing:initial;width:513px}.photoshop-head{background-image:linear-gradient(-180deg,rgb(240,240,240) 0%,rgb(212,212,212) 100%);border-bottom:1px solid rgb(177,177,177);box-shadow:#fff3 0 1px inset,#00000005 0 -1px inset;height:23px;line-height:24px;border-radius:4px 4px 0 0;font-size:13px;color:#4d4d4d;text-align:center}.photoshop-body{padding:15px 15px 0;display:flex}.photoshop-saturation{width:256px;height:256px;position:relative;border-width:2px;border-style:solid;border-color:rgb(179,179,179) rgb(179,179,179) rgb(240,240,240);border-image:initial;overflow:hidden}.photoshop-hue{position:relative;height:256px;width:23px;margin-left:10px;border-width:2px;border-style:solid;border-color:rgb(179,179,179) rgb(179,179,179) rgb(240,240,240);border-image:initial}.photoshop-controls{width:180px;margin-left:10px}.photoshop-top{display:flex}.photoshop-previews{width:60px}.photoshop-actions{flex:1 1 0%;margin-left:20px}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(function () { return i1.HueComponent; }), selector: "color-hue", inputs: ["hsl", "pointer", "radius", "shadow", "hidePointer", "direction"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return i1.SaturationComponent; }), selector: "color-saturation", inputs: ["hsl", "hsv", "radius", "pointer", "circle"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return PhotoshopPreviewsComponent; }), selector: "color-photoshop-previews", inputs: ["rgb", "currentColor"] }, { kind: "component", type: i0.forwardRef(function () { return PhotoshopButtonComponent; }), selector: "color-photoshop-button", inputs: ["label", "active"], outputs: ["onClick"] }, { kind: "component", type: i0.forwardRef(function () { return PhotoshopFieldsComponent; }), selector: "color-photoshop-fields", inputs: ["rgb", "hsv", "hex"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
357
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: PhotoshopComponent, decorators: [{
358
- type: Component,
359
- args: [{ selector: 'color-photoshop', template: `
360
- <div class="photoshop-picker {{ className }}">
361
- <div class="photoshop-head">{{ header }}</div>
362
- <div class="photoshop-body">
363
- <div class="photoshop-saturation">
364
- <color-saturation
365
- [hsl]="hsl" [hsv]="hsv" [circle]="circle"
366
- (onChange)="handleValueChange($event)"
367
- ></color-saturation>
368
- </div>
369
- <div class="photoshop-hue">
370
- <color-hue direction="vertical"
371
- [hsl]="hsl" [hidePointer]="true"
372
- (onChange)="handleValueChange($event)"
373
- ></color-hue>
374
- </div>
375
- <div class="photoshop-controls">
376
- <div class="photoshop-top">
377
- <div class="photoshop-previews">
378
- <color-photoshop-previews
379
- [rgb]="rgb" [currentColor]="currentColor"
380
- ></color-photoshop-previews>
381
- </div>
382
- <div class="photoshop-actions">
383
- <color-photoshop-button label="OK"
384
- [active]="true" (onClick)="onAccept.emit($event)"
385
- ></color-photoshop-button>
386
- <color-photoshop-button label="Cancel"
387
- (onClick)="onCancel.emit($event)"
388
- >
389
- </color-photoshop-button>
390
- <color-photoshop-fields
391
- [rgb]="rgb" [hex]="hex" [hsv]="hsv"
392
- (onChange)="handleValueChange($event)"
393
- ></color-photoshop-fields>
394
- </div>
395
- </div>
396
- </div>
397
- </div>
398
- </div>
399
- `, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
400
- {
401
- provide: NG_VALUE_ACCESSOR,
402
- useExisting: forwardRef(() => PhotoshopComponent),
403
- multi: true,
404
- },
405
- {
406
- provide: ColorWrap,
407
- useExisting: forwardRef(() => PhotoshopComponent),
408
- },
409
- ], styles: [".photoshop-picker{background:rgb(220,220,220);border-radius:4px;box-shadow:#00000040 0 0 0 1px,#00000026 0 8px 16px;box-sizing:initial;width:513px}.photoshop-head{background-image:linear-gradient(-180deg,rgb(240,240,240) 0%,rgb(212,212,212) 100%);border-bottom:1px solid rgb(177,177,177);box-shadow:#fff3 0 1px inset,#00000005 0 -1px inset;height:23px;line-height:24px;border-radius:4px 4px 0 0;font-size:13px;color:#4d4d4d;text-align:center}.photoshop-body{padding:15px 15px 0;display:flex}.photoshop-saturation{width:256px;height:256px;position:relative;border-width:2px;border-style:solid;border-color:rgb(179,179,179) rgb(179,179,179) rgb(240,240,240);border-image:initial;overflow:hidden}.photoshop-hue{position:relative;height:256px;width:23px;margin-left:10px;border-width:2px;border-style:solid;border-color:rgb(179,179,179) rgb(179,179,179) rgb(240,240,240);border-image:initial}.photoshop-controls{width:180px;margin-left:10px}.photoshop-top{display:flex}.photoshop-previews{width:60px}.photoshop-actions{flex:1 1 0%;margin-left:20px}\n"] }]
410
- }], ctorParameters: function () { return []; }, propDecorators: { header: [{
411
- type: Input
412
- }], onAccept: [{
413
- type: Output
414
- }], onCancel: [{
415
- type: Output
416
- }] } });
417
- class ColorPhotoshopModule {
418
- }
419
- ColorPhotoshopModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorPhotoshopModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
420
- ColorPhotoshopModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorPhotoshopModule, declarations: [PhotoshopComponent, PhotoshopPreviewsComponent,
421
- PhotoshopButtonComponent,
422
- PhotoshopFieldsComponent], imports: [CommonModule,
423
- EditableInputModule,
424
- HueModule,
425
- AlphaModule,
426
- SwatchModule,
427
- SaturationModule], exports: [PhotoshopComponent, PhotoshopPreviewsComponent,
428
- PhotoshopButtonComponent,
429
- PhotoshopFieldsComponent] });
430
- ColorPhotoshopModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorPhotoshopModule, imports: [CommonModule,
431
- EditableInputModule,
432
- HueModule,
433
- AlphaModule,
434
- SwatchModule,
435
- SaturationModule] });
436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorPhotoshopModule, decorators: [{
437
- type: NgModule,
438
- args: [{
439
- declarations: [
440
- PhotoshopComponent,
441
- PhotoshopPreviewsComponent,
442
- PhotoshopButtonComponent,
443
- PhotoshopFieldsComponent,
444
- ],
445
- exports: [
446
- PhotoshopComponent,
447
- PhotoshopPreviewsComponent,
448
- PhotoshopButtonComponent,
449
- PhotoshopFieldsComponent,
450
- ],
451
- imports: [
452
- CommonModule,
453
- EditableInputModule,
454
- HueModule,
455
- AlphaModule,
456
- SwatchModule,
457
- SaturationModule,
458
- ],
459
- }]
460
- }] });
461
-
462
- /**
463
- * Generated bundle index. Do not edit.
464
- */
465
-
466
- export { ColorPhotoshopModule, PhotoshopButtonComponent, PhotoshopComponent, PhotoshopFieldsComponent, PhotoshopPreviewsComponent };
467
- //# sourceMappingURL=ngx-color-photoshop.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-color-shade.mjs","sources":["../../src/lib/shade/shade-picker.component.ts","../../src/lib/shade/ngx-color-shade.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule, OnChanges } from '@angular/core';\nimport { ColorWrap, ShadeModule, toState } from 'ngx-color';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'color-shade-picker',\n template: `\n <div class=\"shade-slider {{ className || '' }}\"\n [style.width.px]=\"width\" [style.height.px]=\"height\">\n <color-shade\n [hsl]=\"hsl\"\n [rgb]=\"rgb\"\n [pointer]=\"pointer\"\n (onChange)=\"handlePickerChange($event)\"\n ></color-shade>\n </div>\n `,\n styles: [\n `\n .shade-slider {\n position: relative;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ShadeSliderComponent),\n multi: true,\n },\n {\n provide: ColorWrap,\n useExisting: forwardRef(() => ShadeSliderComponent),\n },\n ]\n})\nexport class ShadeSliderComponent extends ColorWrap implements OnChanges {\n /** Pixel value for picker width */\n @Input() width: string | number = 316;\n /** Pixel value for picker height */\n @Input() height: string | number = 16;\n pointer: {[key: string]: string} = {\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n transform: 'translate(-9px, -2px)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)',\n };\n\n constructor() {\n super();\n }\n ngOnChanges() {\n this.setState(toState(this.color, this.oldHue));\n }\n handlePickerChange({ data, $event }) {\n this.handleChange(data, $event);\n }\n}\n\n@NgModule({\n declarations: [ShadeSliderComponent],\n exports: [ShadeSliderComponent],\n imports: [CommonModule, ShadeModule],\n})\nexport class ColorShadeModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAuCM,MAAO,oBAAqB,SAAQ,SAAS,CAAA;AAajD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;;AAZD,QAAA,IAAK,CAAA,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