ngx-color 9.0.0 → 10.1.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.
- package/README.md +1 -0
- package/coordinates.directive.d.ts +1 -2
- package/fesm2022/ngx-color-alpha.mjs +15 -17
- package/fesm2022/ngx-color-alpha.mjs.map +1 -1
- package/fesm2022/ngx-color-block.mjs +87 -76
- package/fesm2022/ngx-color-block.mjs.map +1 -1
- package/fesm2022/ngx-color-chrome.mjs +186 -145
- package/fesm2022/ngx-color-chrome.mjs.map +1 -1
- package/fesm2022/ngx-color-circle.mjs +68 -51
- package/fesm2022/ngx-color-circle.mjs.map +1 -1
- package/fesm2022/ngx-color-compact.mjs +163 -145
- package/fesm2022/ngx-color-compact.mjs.map +1 -1
- package/fesm2022/ngx-color-github.mjs +36 -37
- package/fesm2022/ngx-color-github.mjs.map +1 -1
- package/fesm2022/ngx-color-hue.mjs +27 -25
- package/fesm2022/ngx-color-hue.mjs.map +1 -1
- package/fesm2022/ngx-color-material.mjs +77 -61
- package/fesm2022/ngx-color-material.mjs.map +1 -1
- package/fesm2022/ngx-color-photoshop.mjs +224 -214
- package/fesm2022/ngx-color-photoshop.mjs.map +1 -1
- package/fesm2022/ngx-color-shade.mjs +19 -13
- package/fesm2022/ngx-color-shade.mjs.map +1 -1
- package/fesm2022/ngx-color-sketch.mjs +232 -227
- package/fesm2022/ngx-color-sketch.mjs.map +1 -1
- package/fesm2022/ngx-color-slider.mjs +153 -145
- package/fesm2022/ngx-color-slider.mjs.map +1 -1
- package/fesm2022/ngx-color-swatches.mjs +118 -216
- package/fesm2022/ngx-color-swatches.mjs.map +1 -1
- package/fesm2022/ngx-color-twitter.mjs +61 -58
- package/fesm2022/ngx-color-twitter.mjs.map +1 -1
- package/fesm2022/ngx-color.mjs +231 -187
- package/fesm2022/ngx-color.mjs.map +1 -1
- package/package.json +4 -34
- package/esm2022/alpha/alpha-picker.component.mjs +0 -102
- package/esm2022/alpha/ngx-color-alpha.mjs +0 -5
- package/esm2022/alpha/public_api.mjs +0 -2
- package/esm2022/alpha.component.mjs +0 -146
- package/esm2022/block/block-swatches.component.mjs +0 -63
- package/esm2022/block/block.component.mjs +0 -160
- package/esm2022/block/ngx-color-block.mjs +0 -5
- package/esm2022/block/public_api.mjs +0 -3
- package/esm2022/checkboard.component.mjs +0 -53
- package/esm2022/chrome/chrome-fields.component.mjs +0 -317
- package/esm2022/chrome/chrome.component.mjs +0 -187
- package/esm2022/chrome/ngx-color-chrome.mjs +0 -5
- package/esm2022/chrome/public_api.mjs +0 -3
- package/esm2022/circle/circle-swatch.component.mjs +0 -69
- package/esm2022/circle/circle.component.mjs +0 -136
- package/esm2022/circle/ngx-color-circle.mjs +0 -5
- package/esm2022/circle/public_api.mjs +0 -3
- package/esm2022/color-wrap.component.mjs +0 -173
- package/esm2022/compact/compact-color.component.mjs +0 -71
- package/esm2022/compact/compact-fields.component.mjs +0 -165
- package/esm2022/compact/compact.component.mjs +0 -156
- package/esm2022/compact/ngx-color-compact.mjs +0 -5
- package/esm2022/compact/public_api.mjs +0 -4
- package/esm2022/coordinates.directive.mjs +0 -108
- package/esm2022/editable-input.component.mjs +0 -212
- package/esm2022/github/github-swatch.component.mjs +0 -53
- package/esm2022/github/github.component.mjs +0 -114
- package/esm2022/github/ngx-color-github.mjs +0 -5
- package/esm2022/github/public_api.mjs +0 -3
- package/esm2022/helpers/checkboard.mjs +0 -33
- package/esm2022/helpers/color.interfaces.mjs +0 -2
- package/esm2022/helpers/color.mjs +0 -60
- package/esm2022/hue/hue-picker.component.mjs +0 -102
- package/esm2022/hue/ngx-color-hue.mjs +0 -5
- package/esm2022/hue/public_api.mjs +0 -2
- package/esm2022/hue.component.mjs +0 -128
- package/esm2022/material/material.component.mjs +0 -188
- package/esm2022/material/ngx-color-material.mjs +0 -5
- package/esm2022/material/public_api.mjs +0 -2
- package/esm2022/ngx-color.mjs +0 -5
- package/esm2022/photoshop/ngx-color-photoshop.mjs +0 -5
- package/esm2022/photoshop/photoshop-button.component.mjs +0 -33
- package/esm2022/photoshop/photoshop-fields.component.mjs +0 -214
- package/esm2022/photoshop/photoshop-previews.component.mjs +0 -40
- package/esm2022/photoshop/photoshop.component.mjs +0 -187
- package/esm2022/photoshop/public_api.mjs +0 -5
- package/esm2022/public_api.mjs +0 -14
- package/esm2022/raised.component.mjs +0 -50
- package/esm2022/saturation.component.mjs +0 -100
- package/esm2022/shade/ngx-color-shade.mjs +0 -5
- package/esm2022/shade/public_api.mjs +0 -2
- package/esm2022/shade/shade-picker.component.mjs +0 -94
- package/esm2022/shade.component.mjs +0 -133
- package/esm2022/sketch/ngx-color-sketch.mjs +0 -5
- package/esm2022/sketch/public_api.mjs +0 -4
- package/esm2022/sketch/sketch-fields.component.mjs +0 -211
- package/esm2022/sketch/sketch-preset-colors.component.mjs +0 -68
- package/esm2022/sketch/sketch.component.mjs +0 -215
- package/esm2022/slider/ngx-color-slider.mjs +0 -5
- package/esm2022/slider/public_api.mjs +0 -4
- package/esm2022/slider/slider-swatch.component.mjs +0 -55
- package/esm2022/slider/slider-swatches.component.mjs +0 -119
- package/esm2022/slider/slider.component.mjs +0 -104
- package/esm2022/swatch.component.mjs +0 -112
- package/esm2022/swatches/ngx-color-swatches.mjs +0 -5
- package/esm2022/swatches/public_api.mjs +0 -4
- package/esm2022/swatches/swatches-color.component.mjs +0 -105
- package/esm2022/swatches/swatches-group.component.mjs +0 -50
- package/esm2022/swatches/swatches.component.mjs +0 -244
- package/esm2022/twitter/ngx-color-twitter.mjs +0 -5
- package/esm2022/twitter/public_api.mjs +0 -2
- package/esm2022/twitter/twitter.component.mjs +0 -161
@@ -1,9 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, NgModule } from '@angular/core';
|
3
|
-
import * as
|
3
|
+
import * as i1 from 'ngx-color';
|
4
4
|
import { isValidHex, ColorWrap, AlphaModule, CheckboardModule, EditableInputModule, HueModule, SaturationModule } from 'ngx-color';
|
5
5
|
import { TinyColor } from '@ctrl/tinycolor';
|
6
|
-
import * as i1 from '@angular/common';
|
7
6
|
import { CommonModule } from '@angular/common';
|
8
7
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
9
8
|
|
@@ -119,51 +118,58 @@ class ChromeFieldsComponent {
|
|
119
118
|
});
|
120
119
|
}
|
121
120
|
}
|
122
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
123
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
121
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ChromeFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
122
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: ChromeFieldsComponent, isStandalone: false, selector: "color-chrome-fields", inputs: { disableAlpha: "disableAlpha", hsl: "hsl", rgb: "rgb", hex: "hex" }, outputs: { onChange: "onChange" }, ngImport: i0, template: `
|
124
123
|
<div class="chrome-wrap">
|
125
124
|
<div class="chrome-fields">
|
126
|
-
|
125
|
+
@if (view === 'hex') {
|
127
126
|
<div class="chrome-field">
|
128
127
|
<color-editable-input
|
129
128
|
[style]="{ input: input, label: label }"
|
130
|
-
label="hex"
|
129
|
+
label="hex"
|
130
|
+
[value]="hex"
|
131
131
|
(onChange)="handleChange($event)"
|
132
132
|
></color-editable-input>
|
133
133
|
</div>
|
134
|
-
|
135
|
-
|
134
|
+
}
|
135
|
+
@if (view === 'rgb') {
|
136
136
|
<div class="chrome-field">
|
137
137
|
<color-editable-input
|
138
138
|
[style]="{ input: input, label: label }"
|
139
|
-
label="r"
|
139
|
+
label="r"
|
140
|
+
[value]="rgb.r"
|
140
141
|
(onChange)="handleChange($event)"
|
141
142
|
></color-editable-input>
|
142
143
|
</div>
|
143
144
|
<div class="chrome-field">
|
144
145
|
<color-editable-input
|
145
146
|
[style]="{ input: input, label: label }"
|
146
|
-
label="g"
|
147
|
+
label="g"
|
148
|
+
[value]="rgb.g"
|
147
149
|
(onChange)="handleChange($event)"
|
148
150
|
></color-editable-input>
|
149
151
|
</div>
|
150
152
|
<div class="chrome-field">
|
151
153
|
<color-editable-input
|
152
154
|
[style]="{ input: input, label: label }"
|
153
|
-
label="b"
|
155
|
+
label="b"
|
156
|
+
[value]="rgb.b"
|
154
157
|
(onChange)="handleChange($event)"
|
155
158
|
></color-editable-input>
|
156
159
|
</div>
|
157
160
|
<div class="chrome-field">
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
@if (!disableAlpha) {
|
162
|
+
<color-editable-input
|
163
|
+
[style]="{ input: input, label: label }"
|
164
|
+
label="a"
|
165
|
+
[value]="rgb.a"
|
166
|
+
[arrowOffset]="0.01"
|
167
|
+
(onChange)="handleChange($event)"
|
168
|
+
></color-editable-input>
|
169
|
+
}
|
164
170
|
</div>
|
165
|
-
|
166
|
-
|
171
|
+
}
|
172
|
+
@if (view === 'hsl') {
|
167
173
|
<div class="chrome-field">
|
168
174
|
<color-editable-input
|
169
175
|
[style]="{ input: input, label: label }"
|
@@ -175,89 +181,105 @@ class ChromeFieldsComponent {
|
|
175
181
|
<div class="chrome-field">
|
176
182
|
<color-editable-input
|
177
183
|
[style]="{ input: input, label: label }"
|
178
|
-
label="s"
|
184
|
+
label="s"
|
185
|
+
[value]="round(hsl.s * 100) + '%'"
|
179
186
|
(onChange)="handleChange($event)"
|
180
187
|
></color-editable-input>
|
181
188
|
</div>
|
182
189
|
<div class="chrome-field">
|
183
190
|
<color-editable-input
|
184
191
|
[style]="{ input: input, label: label }"
|
185
|
-
label="l"
|
192
|
+
label="l"
|
193
|
+
[value]="round(hsl.l * 100) + '%'"
|
186
194
|
(onChange)="handleChange($event)"
|
187
195
|
></color-editable-input>
|
188
196
|
</div>
|
189
197
|
<div class="chrome-field">
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
198
|
+
@if (!disableAlpha) {
|
199
|
+
<color-editable-input
|
200
|
+
[style]="{ input: input, label: label }"
|
201
|
+
label="a"
|
202
|
+
[value]="hsl.a"
|
203
|
+
[arrowOffset]="0.01"
|
204
|
+
(onChange)="handleChange($event)"
|
205
|
+
></color-editable-input>
|
206
|
+
}
|
196
207
|
</div>
|
197
|
-
|
208
|
+
}
|
198
209
|
</div>
|
199
210
|
|
200
211
|
<div class="chrome-toggle">
|
201
212
|
<div class="chrome-icon" (click)="toggleViews()" #icon>
|
202
213
|
<svg class="chrome-toggle-svg" viewBox="0 0 24 24">
|
203
|
-
<path
|
214
|
+
<path
|
215
|
+
#iconUp
|
216
|
+
fill="#333"
|
204
217
|
d="M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"
|
205
218
|
/>
|
206
|
-
<path
|
219
|
+
<path
|
220
|
+
#iconDown
|
221
|
+
fill="#333"
|
207
222
|
d="M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15Z"
|
208
223
|
/>
|
209
224
|
</svg>
|
210
225
|
</div>
|
211
226
|
</div>
|
212
227
|
</div>
|
213
|
-
`, isInline: true, styles: [".chrome-wrap{padding-top:16px;display:flex}.chrome-fields{flex:1;display:flex;margin-left:-6px}.chrome-field{padding-left:6px;width:100%}.chrome-toggle{width:32px;text-align:right;position:relative}.chrome-icon{margin-right:-4px;margin-top:12px;cursor:pointer;position:relative}.chrome-toggle-svg{width:24px;height:24px;border:1px transparent solid;border-radius:5px}.chrome-toggle-svg:hover{background:#eee}\n"], dependencies: [{ kind: "
|
228
|
+
`, isInline: true, styles: [".chrome-wrap{padding-top:16px;display:flex}.chrome-fields{flex:1;display:flex;margin-left:-6px}.chrome-field{padding-left:6px;width:100%}.chrome-toggle{width:32px;text-align:right;position:relative}.chrome-icon{margin-right:-4px;margin-top:12px;cursor:pointer;position:relative}.chrome-toggle-svg{width:24px;height:24px;border:1px transparent solid;border-radius:5px}.chrome-toggle-svg:hover{background:#eee}\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 });
|
214
229
|
}
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ChromeFieldsComponent, decorators: [{
|
216
231
|
type: Component,
|
217
232
|
args: [{ selector: 'color-chrome-fields', template: `
|
218
233
|
<div class="chrome-wrap">
|
219
234
|
<div class="chrome-fields">
|
220
|
-
|
235
|
+
@if (view === 'hex') {
|
221
236
|
<div class="chrome-field">
|
222
237
|
<color-editable-input
|
223
238
|
[style]="{ input: input, label: label }"
|
224
|
-
label="hex"
|
239
|
+
label="hex"
|
240
|
+
[value]="hex"
|
225
241
|
(onChange)="handleChange($event)"
|
226
242
|
></color-editable-input>
|
227
243
|
</div>
|
228
|
-
|
229
|
-
|
244
|
+
}
|
245
|
+
@if (view === 'rgb') {
|
230
246
|
<div class="chrome-field">
|
231
247
|
<color-editable-input
|
232
248
|
[style]="{ input: input, label: label }"
|
233
|
-
label="r"
|
249
|
+
label="r"
|
250
|
+
[value]="rgb.r"
|
234
251
|
(onChange)="handleChange($event)"
|
235
252
|
></color-editable-input>
|
236
253
|
</div>
|
237
254
|
<div class="chrome-field">
|
238
255
|
<color-editable-input
|
239
256
|
[style]="{ input: input, label: label }"
|
240
|
-
label="g"
|
257
|
+
label="g"
|
258
|
+
[value]="rgb.g"
|
241
259
|
(onChange)="handleChange($event)"
|
242
260
|
></color-editable-input>
|
243
261
|
</div>
|
244
262
|
<div class="chrome-field">
|
245
263
|
<color-editable-input
|
246
264
|
[style]="{ input: input, label: label }"
|
247
|
-
label="b"
|
265
|
+
label="b"
|
266
|
+
[value]="rgb.b"
|
248
267
|
(onChange)="handleChange($event)"
|
249
268
|
></color-editable-input>
|
250
269
|
</div>
|
251
270
|
<div class="chrome-field">
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
271
|
+
@if (!disableAlpha) {
|
272
|
+
<color-editable-input
|
273
|
+
[style]="{ input: input, label: label }"
|
274
|
+
label="a"
|
275
|
+
[value]="rgb.a"
|
276
|
+
[arrowOffset]="0.01"
|
277
|
+
(onChange)="handleChange($event)"
|
278
|
+
></color-editable-input>
|
279
|
+
}
|
258
280
|
</div>
|
259
|
-
|
260
|
-
|
281
|
+
}
|
282
|
+
@if (view === 'hsl') {
|
261
283
|
<div class="chrome-field">
|
262
284
|
<color-editable-input
|
263
285
|
[style]="{ input: input, label: label }"
|
@@ -269,42 +291,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
269
291
|
<div class="chrome-field">
|
270
292
|
<color-editable-input
|
271
293
|
[style]="{ input: input, label: label }"
|
272
|
-
label="s"
|
294
|
+
label="s"
|
295
|
+
[value]="round(hsl.s * 100) + '%'"
|
273
296
|
(onChange)="handleChange($event)"
|
274
297
|
></color-editable-input>
|
275
298
|
</div>
|
276
299
|
<div class="chrome-field">
|
277
300
|
<color-editable-input
|
278
301
|
[style]="{ input: input, label: label }"
|
279
|
-
label="l"
|
302
|
+
label="l"
|
303
|
+
[value]="round(hsl.l * 100) + '%'"
|
280
304
|
(onChange)="handleChange($event)"
|
281
305
|
></color-editable-input>
|
282
306
|
</div>
|
283
307
|
<div class="chrome-field">
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
308
|
+
@if (!disableAlpha) {
|
309
|
+
<color-editable-input
|
310
|
+
[style]="{ input: input, label: label }"
|
311
|
+
label="a"
|
312
|
+
[value]="hsl.a"
|
313
|
+
[arrowOffset]="0.01"
|
314
|
+
(onChange)="handleChange($event)"
|
315
|
+
></color-editable-input>
|
316
|
+
}
|
290
317
|
</div>
|
291
|
-
|
318
|
+
}
|
292
319
|
</div>
|
293
320
|
|
294
321
|
<div class="chrome-toggle">
|
295
322
|
<div class="chrome-icon" (click)="toggleViews()" #icon>
|
296
323
|
<svg class="chrome-toggle-svg" viewBox="0 0 24 24">
|
297
|
-
<path
|
324
|
+
<path
|
325
|
+
#iconUp
|
326
|
+
fill="#333"
|
298
327
|
d="M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"
|
299
328
|
/>
|
300
|
-
<path
|
329
|
+
<path
|
330
|
+
#iconDown
|
331
|
+
fill="#333"
|
301
332
|
d="M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15Z"
|
302
333
|
/>
|
303
334
|
</svg>
|
304
335
|
</div>
|
305
336
|
</div>
|
306
337
|
</div>
|
307
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".chrome-wrap{padding-top:16px;display:flex}.chrome-fields{flex:1;display:flex;margin-left:-6px}.chrome-field{padding-left:6px;width:100%}.chrome-toggle{width:32px;text-align:right;position:relative}.chrome-icon{margin-right:-4px;margin-top:12px;cursor:pointer;position:relative}.chrome-toggle-svg{width:24px;height:24px;border:1px transparent solid;border-radius:5px}.chrome-toggle-svg:hover{background:#eee}\n"] }]
|
338
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, standalone: false, styles: [".chrome-wrap{padding-top:16px;display:flex}.chrome-fields{flex:1;display:flex;margin-left:-6px}.chrome-field{padding-left:6px;width:100%}.chrome-toggle{width:32px;text-align:right;position:relative}.chrome-icon{margin-right:-4px;margin-top:12px;cursor:pointer;position:relative}.chrome-toggle-svg{width:24px;height:24px;border:1px transparent solid;border-radius:5px}.chrome-toggle-svg:hover{background:#eee}\n"] }]
|
308
339
|
}], propDecorators: { disableAlpha: [{
|
309
340
|
type: Input
|
310
341
|
}], hsl: [{
|
@@ -346,8 +377,8 @@ class ChromeComponent extends ColorWrap {
|
|
346
377
|
handleValueChange({ data, $event }) {
|
347
378
|
this.handleChange(data, $event);
|
348
379
|
}
|
349
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
350
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
380
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ChromeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
381
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: ChromeComponent, isStandalone: false, selector: "color-chrome", inputs: { disableAlpha: "disableAlpha" }, providers: [
|
351
382
|
{
|
352
383
|
provide: NG_VALUE_ACCESSOR,
|
353
384
|
useExisting: forwardRef(() => ChromeComponent),
|
@@ -358,97 +389,107 @@ class ChromeComponent extends ColorWrap {
|
|
358
389
|
useExisting: forwardRef(() => ChromeComponent),
|
359
390
|
},
|
360
391
|
], usesInheritance: true, ngImport: i0, template: `
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
<color-checkboard></color-checkboard>
|
378
|
-
</div>
|
379
|
-
</div>
|
380
|
-
<div class="chrome-toggles">
|
381
|
-
<div class="chrome-hue">
|
382
|
-
<color-hue
|
383
|
-
[radius]="2"
|
384
|
-
[hsl]="hsl"
|
385
|
-
[pointer]="pointer"
|
386
|
-
(onChange)="handleValueChange($event)"
|
387
|
-
></color-hue>
|
392
|
+
<div class="chrome-picker {{ className }}">
|
393
|
+
<div class="saturation">
|
394
|
+
<color-saturation
|
395
|
+
[hsl]="hsl"
|
396
|
+
[hsv]="hsv"
|
397
|
+
[circle]="circle"
|
398
|
+
(onChange)="handleValueChange($event)"
|
399
|
+
></color-saturation>
|
400
|
+
</div>
|
401
|
+
<div class="chrome-body">
|
402
|
+
<div class="chrome-controls">
|
403
|
+
<div class="chrome-color">
|
404
|
+
<div class="chrome-swatch">
|
405
|
+
<div class="chrome-active" [style.background]="activeBackground"></div>
|
406
|
+
<color-checkboard></color-checkboard>
|
407
|
+
</div>
|
388
408
|
</div>
|
389
|
-
<div class="chrome-
|
390
|
-
<
|
391
|
-
|
392
|
-
|
393
|
-
|
409
|
+
<div class="chrome-toggles">
|
410
|
+
<div class="chrome-hue">
|
411
|
+
<color-hue
|
412
|
+
[radius]="2"
|
413
|
+
[hsl]="hsl"
|
414
|
+
[pointer]="pointer"
|
415
|
+
(onChange)="handleValueChange($event)"
|
416
|
+
></color-hue>
|
417
|
+
</div>
|
418
|
+
@if (!disableAlpha) {
|
419
|
+
<div class="chrome-alpha">
|
420
|
+
<color-alpha
|
421
|
+
[radius]="2"
|
422
|
+
[rgb]="rgb"
|
423
|
+
[hsl]="hsl"
|
424
|
+
[pointer]="pointer"
|
425
|
+
(onChange)="handleValueChange($event)"
|
426
|
+
></color-alpha>
|
427
|
+
</div>
|
428
|
+
}
|
394
429
|
</div>
|
395
430
|
</div>
|
431
|
+
<color-chrome-fields
|
432
|
+
[rgb]="rgb"
|
433
|
+
[hsl]="hsl"
|
434
|
+
[hex]="hex"
|
435
|
+
[disableAlpha]="disableAlpha"
|
436
|
+
(onChange)="handleValueChange($event)"
|
437
|
+
></color-chrome-fields>
|
396
438
|
</div>
|
397
|
-
<color-chrome-fields
|
398
|
-
[rgb]="rgb" [hsl]="hsl" [hex]="hex"
|
399
|
-
[disableAlpha]="disableAlpha"
|
400
|
-
(onChange)="handleValueChange($event)"
|
401
|
-
></color-chrome-fields>
|
402
439
|
</div>
|
403
|
-
|
404
|
-
`, isInline: true, styles: [".chrome-picker{background:#fff;border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;box-sizing:initial;width:225px;font-family:Menlo}.chrome-controls{display:flex}.chrome-color{width:42px}.chrome-body{padding:14px 14px 12px}.chrome-active{position:absolute;inset:0;border-radius:20px;box-shadow:inset 0 0 0 1px #0000001a;z-index:2}.chrome-swatch{width:28px;height:28px;border-radius:15px;position:relative;overflow:hidden}.saturation{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.chrome-toggles{flex:1}.chrome-hue{height:10px;position:relative;margin-bottom:8px}.chrome-alpha{height:10px;position:relative}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(function () { return i2.AlphaComponent; }), selector: "color-alpha", inputs: ["hsl", "rgb", "pointer", "shadow", "radius", "direction"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return i2.CheckboardComponent; }), selector: "color-checkboard", inputs: ["white", "size", "grey", "boxShadow", "borderRadius"] }, { kind: "component", type: i0.forwardRef(function () { return i2.HueComponent; }), selector: "color-hue", inputs: ["hsl", "pointer", "radius", "shadow", "hidePointer", "direction"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return i2.SaturationComponent; }), selector: "color-saturation", inputs: ["hsl", "hsv", "radius", "pointer", "circle"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return ChromeFieldsComponent; }), selector: "color-chrome-fields", inputs: ["disableAlpha", "hsl", "rgb", "hex"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
440
|
+
`, isInline: true, styles: [".chrome-picker{background:#fff;border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;box-sizing:initial;width:225px;font-family:Menlo}.chrome-controls{display:flex}.chrome-color{width:42px}.chrome-body{padding:14px 14px 12px}.chrome-active{position:absolute;inset:0;border-radius:20px;box-shadow:inset 0 0 0 1px #0000001a;z-index:2}.chrome-swatch{width:28px;height:28px;border-radius:15px;position:relative;overflow:hidden}.saturation{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.chrome-toggles{flex:1}.chrome-hue{height:10px;position:relative;margin-bottom:8px}.chrome-alpha{height:10px;position:relative}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => i1.AlphaComponent), selector: "color-alpha", inputs: ["hsl", "rgb", "pointer", "shadow", "radius", "direction"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(() => i1.CheckboardComponent), selector: "color-checkboard", inputs: ["white", "size", "grey", "boxShadow", "borderRadius"] }, { kind: "component", type: i0.forwardRef(() => i1.HueComponent), selector: "color-hue", inputs: ["hsl", "pointer", "radius", "shadow", "hidePointer", "direction"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(() => i1.SaturationComponent), selector: "color-saturation", inputs: ["hsl", "hsv", "radius", "pointer", "circle"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(() => ChromeFieldsComponent), selector: "color-chrome-fields", inputs: ["disableAlpha", "hsl", "rgb", "hex"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
405
441
|
}
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
442
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ChromeComponent, decorators: [{
|
407
443
|
type: Component,
|
408
444
|
args: [{ selector: 'color-chrome', template: `
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
<color-checkboard></color-checkboard>
|
426
|
-
</div>
|
427
|
-
</div>
|
428
|
-
<div class="chrome-toggles">
|
429
|
-
<div class="chrome-hue">
|
430
|
-
<color-hue
|
431
|
-
[radius]="2"
|
432
|
-
[hsl]="hsl"
|
433
|
-
[pointer]="pointer"
|
434
|
-
(onChange)="handleValueChange($event)"
|
435
|
-
></color-hue>
|
445
|
+
<div class="chrome-picker {{ className }}">
|
446
|
+
<div class="saturation">
|
447
|
+
<color-saturation
|
448
|
+
[hsl]="hsl"
|
449
|
+
[hsv]="hsv"
|
450
|
+
[circle]="circle"
|
451
|
+
(onChange)="handleValueChange($event)"
|
452
|
+
></color-saturation>
|
453
|
+
</div>
|
454
|
+
<div class="chrome-body">
|
455
|
+
<div class="chrome-controls">
|
456
|
+
<div class="chrome-color">
|
457
|
+
<div class="chrome-swatch">
|
458
|
+
<div class="chrome-active" [style.background]="activeBackground"></div>
|
459
|
+
<color-checkboard></color-checkboard>
|
460
|
+
</div>
|
436
461
|
</div>
|
437
|
-
<div class="chrome-
|
438
|
-
<
|
439
|
-
|
440
|
-
|
441
|
-
|
462
|
+
<div class="chrome-toggles">
|
463
|
+
<div class="chrome-hue">
|
464
|
+
<color-hue
|
465
|
+
[radius]="2"
|
466
|
+
[hsl]="hsl"
|
467
|
+
[pointer]="pointer"
|
468
|
+
(onChange)="handleValueChange($event)"
|
469
|
+
></color-hue>
|
470
|
+
</div>
|
471
|
+
@if (!disableAlpha) {
|
472
|
+
<div class="chrome-alpha">
|
473
|
+
<color-alpha
|
474
|
+
[radius]="2"
|
475
|
+
[rgb]="rgb"
|
476
|
+
[hsl]="hsl"
|
477
|
+
[pointer]="pointer"
|
478
|
+
(onChange)="handleValueChange($event)"
|
479
|
+
></color-alpha>
|
480
|
+
</div>
|
481
|
+
}
|
442
482
|
</div>
|
443
483
|
</div>
|
484
|
+
<color-chrome-fields
|
485
|
+
[rgb]="rgb"
|
486
|
+
[hsl]="hsl"
|
487
|
+
[hex]="hex"
|
488
|
+
[disableAlpha]="disableAlpha"
|
489
|
+
(onChange)="handleValueChange($event)"
|
490
|
+
></color-chrome-fields>
|
444
491
|
</div>
|
445
|
-
<color-chrome-fields
|
446
|
-
[rgb]="rgb" [hsl]="hsl" [hex]="hex"
|
447
|
-
[disableAlpha]="disableAlpha"
|
448
|
-
(onChange)="handleValueChange($event)"
|
449
|
-
></color-chrome-fields>
|
450
492
|
</div>
|
451
|
-
</div>
|
452
493
|
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
|
453
494
|
{
|
454
495
|
provide: NG_VALUE_ACCESSOR,
|
@@ -459,26 +500,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
459
500
|
provide: ColorWrap,
|
460
501
|
useExisting: forwardRef(() => ChromeComponent),
|
461
502
|
},
|
462
|
-
], styles: [".chrome-picker{background:#fff;border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;box-sizing:initial;width:225px;font-family:Menlo}.chrome-controls{display:flex}.chrome-color{width:42px}.chrome-body{padding:14px 14px 12px}.chrome-active{position:absolute;inset:0;border-radius:20px;box-shadow:inset 0 0 0 1px #0000001a;z-index:2}.chrome-swatch{width:28px;height:28px;border-radius:15px;position:relative;overflow:hidden}.saturation{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.chrome-toggles{flex:1}.chrome-hue{height:10px;position:relative;margin-bottom:8px}.chrome-alpha{height:10px;position:relative}\n"] }]
|
463
|
-
}], ctorParameters:
|
503
|
+
], standalone: false, styles: [".chrome-picker{background:#fff;border-radius:2px;box-shadow:0 0 2px #0000004d,0 4px 8px #0000004d;box-sizing:initial;width:225px;font-family:Menlo}.chrome-controls{display:flex}.chrome-color{width:42px}.chrome-body{padding:14px 14px 12px}.chrome-active{position:absolute;inset:0;border-radius:20px;box-shadow:inset 0 0 0 1px #0000001a;z-index:2}.chrome-swatch{width:28px;height:28px;border-radius:15px;position:relative;overflow:hidden}.saturation{width:100%;padding-bottom:55%;position:relative;border-radius:2px 2px 0 0;overflow:hidden}.chrome-toggles{flex:1}.chrome-hue{height:10px;position:relative;margin-bottom:8px}.chrome-alpha{height:10px;position:relative}\n"] }]
|
504
|
+
}], ctorParameters: () => [], propDecorators: { disableAlpha: [{
|
464
505
|
type: Input
|
465
506
|
}] } });
|
466
507
|
class ColorChromeModule {
|
467
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
468
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
508
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorChromeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
509
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: ColorChromeModule, declarations: [ChromeComponent, ChromeFieldsComponent], imports: [CommonModule,
|
469
510
|
AlphaModule,
|
470
511
|
CheckboardModule,
|
471
512
|
EditableInputModule,
|
472
513
|
HueModule,
|
473
514
|
SaturationModule], exports: [ChromeComponent, ChromeFieldsComponent] });
|
474
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
515
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorChromeModule, imports: [CommonModule,
|
475
516
|
AlphaModule,
|
476
517
|
CheckboardModule,
|
477
518
|
EditableInputModule,
|
478
519
|
HueModule,
|
479
520
|
SaturationModule] });
|
480
521
|
}
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
522
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorChromeModule, decorators: [{
|
482
523
|
type: NgModule,
|
483
524
|
args: [{
|
484
525
|
declarations: [ChromeComponent, ChromeFieldsComponent],
|