ngx-color 9.0.0 → 10.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.
- 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, SwatchModule } 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
|
|
@@ -91,114 +90,118 @@ class SketchFieldsComponent {
|
|
91
90
|
});
|
92
91
|
}
|
93
92
|
}
|
94
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
95
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
93
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
94
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: SketchFieldsComponent, isStandalone: false, selector: "color-sketch-fields", inputs: { hsl: "hsl", rgb: "rgb", hex: "hex", disableAlpha: "disableAlpha" }, outputs: { onChange: "onChange" }, ngImport: i0, template: `
|
95
|
+
<div class="sketch-fields">
|
96
|
+
<div class="sketch-double">
|
97
|
+
<color-editable-input
|
98
|
+
[style]="{ input: input, label: label }"
|
99
|
+
label="hex"
|
100
|
+
[value]="hex.replace('#', '')"
|
101
|
+
(onChange)="handleChange($event)"
|
102
|
+
></color-editable-input>
|
103
|
+
</div>
|
104
|
+
<div class="sketch-single">
|
105
|
+
<color-editable-input
|
106
|
+
[style]="{ input: input, label: label }"
|
107
|
+
label="r"
|
108
|
+
[value]="rgb.r"
|
109
|
+
(onChange)="handleChange($event)"
|
110
|
+
[dragLabel]="true"
|
111
|
+
[dragMax]="255"
|
112
|
+
></color-editable-input>
|
113
|
+
</div>
|
114
|
+
<div class="sketch-single">
|
115
|
+
<color-editable-input
|
116
|
+
[style]="{ input: input, label: label }"
|
117
|
+
label="g"
|
118
|
+
[value]="rgb.g"
|
119
|
+
(onChange)="handleChange($event)"
|
120
|
+
[dragLabel]="true"
|
121
|
+
[dragMax]="255"
|
122
|
+
></color-editable-input>
|
123
|
+
</div>
|
124
|
+
<div class="sketch-single">
|
125
|
+
<color-editable-input
|
126
|
+
[style]="{ input: input, label: label }"
|
127
|
+
label="b"
|
128
|
+
[value]="rgb.b"
|
129
|
+
(onChange)="handleChange($event)"
|
130
|
+
[dragLabel]="true"
|
131
|
+
[dragMax]="255"
|
132
|
+
></color-editable-input>
|
133
|
+
</div>
|
134
|
+
@if (disableAlpha === false) {
|
135
|
+
<div class="sketch-alpha">
|
136
|
+
<color-editable-input
|
137
|
+
[style]="{ input: input, label: label }"
|
138
|
+
label="a"
|
139
|
+
[value]="round(rgb.a * 100)"
|
140
|
+
(onChange)="handleChange($event)"
|
141
|
+
[dragLabel]="true"
|
142
|
+
[dragMax]="100"
|
143
|
+
></color-editable-input>
|
144
|
+
</div>
|
145
|
+
}
|
144
146
|
</div>
|
145
|
-
|
146
|
-
`, isInline: true, styles: [".sketch-fields{display:flex;padding-top:4px}.sketch-double{flex:2 1 0%}.sketch-single,.sketch-alpha{flex:1 1 0%;padding-left:6px}:host-context([dir=rtl]) .sketch-single{padding-right:6px;padding-left:0}:host-context([dir=rtl]) .sketch-alpha{padding-right:6px;padding-left:0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.EditableInputComponent, selector: "color-editable-input", inputs: ["style", "label", "value", "arrowOffset", "dragLabel", "dragMax", "placeholder"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
147
|
+
`, isInline: true, styles: [".sketch-fields{display:flex;padding-top:4px}.sketch-double{-webkit-box-flex:2;flex:2 1 0%}.sketch-single{flex:1 1 0%;padding-left:6px}.sketch-alpha{-webkit-box-flex:1;flex:1 1 0%;padding-left:6px}:host-context([dir=\"rtl\"]) .sketch-single{padding-right:6px;padding-left:0}:host-context([dir=\"rtl\"]) .sketch-alpha{padding-right:6px;padding-left:0}\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 });
|
147
148
|
}
|
148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchFieldsComponent, decorators: [{
|
149
150
|
type: Component,
|
150
151
|
args: [{ selector: 'color-sketch-fields', template: `
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
152
|
+
<div class="sketch-fields">
|
153
|
+
<div class="sketch-double">
|
154
|
+
<color-editable-input
|
155
|
+
[style]="{ input: input, label: label }"
|
156
|
+
label="hex"
|
157
|
+
[value]="hex.replace('#', '')"
|
158
|
+
(onChange)="handleChange($event)"
|
159
|
+
></color-editable-input>
|
160
|
+
</div>
|
161
|
+
<div class="sketch-single">
|
162
|
+
<color-editable-input
|
163
|
+
[style]="{ input: input, label: label }"
|
164
|
+
label="r"
|
165
|
+
[value]="rgb.r"
|
166
|
+
(onChange)="handleChange($event)"
|
167
|
+
[dragLabel]="true"
|
168
|
+
[dragMax]="255"
|
169
|
+
></color-editable-input>
|
170
|
+
</div>
|
171
|
+
<div class="sketch-single">
|
172
|
+
<color-editable-input
|
173
|
+
[style]="{ input: input, label: label }"
|
174
|
+
label="g"
|
175
|
+
[value]="rgb.g"
|
176
|
+
(onChange)="handleChange($event)"
|
177
|
+
[dragLabel]="true"
|
178
|
+
[dragMax]="255"
|
179
|
+
></color-editable-input>
|
180
|
+
</div>
|
181
|
+
<div class="sketch-single">
|
182
|
+
<color-editable-input
|
183
|
+
[style]="{ input: input, label: label }"
|
184
|
+
label="b"
|
185
|
+
[value]="rgb.b"
|
186
|
+
(onChange)="handleChange($event)"
|
187
|
+
[dragLabel]="true"
|
188
|
+
[dragMax]="255"
|
189
|
+
></color-editable-input>
|
190
|
+
</div>
|
191
|
+
@if (disableAlpha === false) {
|
192
|
+
<div class="sketch-alpha">
|
193
|
+
<color-editable-input
|
194
|
+
[style]="{ input: input, label: label }"
|
195
|
+
label="a"
|
196
|
+
[value]="round(rgb.a * 100)"
|
197
|
+
(onChange)="handleChange($event)"
|
198
|
+
[dragLabel]="true"
|
199
|
+
[dragMax]="100"
|
200
|
+
></color-editable-input>
|
201
|
+
</div>
|
202
|
+
}
|
199
203
|
</div>
|
200
|
-
|
201
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".sketch-fields{display:flex;padding-top:4px}.sketch-double{flex:2 1 0%}.sketch-single,.sketch-alpha{flex:1 1 0%;padding-left:6px}:host-context([dir=rtl]) .sketch-single{padding-right:6px;padding-left:0}:host-context([dir=rtl]) .sketch-alpha{padding-right:6px;padding-left:0}\n"] }]
|
204
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, standalone: false, styles: [".sketch-fields{display:flex;padding-top:4px}.sketch-double{-webkit-box-flex:2;flex:2 1 0%}.sketch-single{flex:1 1 0%;padding-left:6px}.sketch-alpha{-webkit-box-flex:1;flex:1 1 0%;padding-left:6px}:host-context([dir=\"rtl\"]) .sketch-single{padding-right:6px;padding-left:0}:host-context([dir=\"rtl\"]) .sketch-alpha{padding-right:6px;padding-left:0}\n"] }]
|
202
205
|
}], propDecorators: { hsl: [{
|
203
206
|
type: Input
|
204
207
|
}], rgb: [{
|
@@ -234,38 +237,42 @@ class SketchPresetColorsComponent {
|
|
234
237
|
boxShadow: `inset 0 0 0 1px rgba(0,0,0,.15), 0 0 4px ${c.color}`,
|
235
238
|
};
|
236
239
|
}
|
237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchPresetColorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: SketchPresetColorsComponent, isStandalone: false, selector: "color-sketch-preset-colors", inputs: { colors: "colors" }, outputs: { onClick: "onClick", onSwatchHover: "onSwatchHover" }, ngImport: i0, template: `
|
242
|
+
<div class="sketch-swatches">
|
243
|
+
@for (c of colors; track c) {
|
244
|
+
<div class="sketch-wrap">
|
245
|
+
<color-swatch
|
246
|
+
[color]="normalizeValue(c).color"
|
247
|
+
[style]="swatchStyle"
|
248
|
+
[focusStyle]="focusStyle(c)"
|
249
|
+
(onClick)="handleClick($event)"
|
250
|
+
(onHover)="onSwatchHover.emit($event)"
|
251
|
+
class="swatch"
|
252
|
+
></color-swatch>
|
253
|
+
</div>
|
254
|
+
}
|
249
255
|
</div>
|
250
|
-
|
251
|
-
`, isInline: true, styles: [".sketch-swatches{position:relative;display:flex;flex-wrap:wrap;margin:0 -10px;padding:10px 0 0 10px;border-top:1px solid rgb(238,238,238)}.sketch-wrap{width:16px;height:16px;margin:0 10px 10px 0}:host-context([dir=rtl]) .sketch-swatches{padding-right:10px;padding-left:0}:host-context([dir=rtl]) .sketch-wrap{margin-left:10px;margin-right:0}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i2.SwatchComponent, selector: "color-swatch", inputs: ["color", "style", "focusStyle", "focus"], outputs: ["onClick", "onHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
256
|
+
`, isInline: true, styles: [".sketch-swatches{position:relative;display:flex;flex-wrap:wrap;margin:0 -10px;padding:10px 0 0 10px;border-top:1px solid rgb(238,238,238)}.sketch-wrap{width:16px;height:16px;margin:0 10px 10px 0}:host-context([dir=\"rtl\"]) .sketch-swatches{padding-right:10px;padding-left:0}:host-context([dir=\"rtl\"]) .sketch-wrap{margin-left:10px;margin-right:0}\n"], dependencies: [{ kind: "component", type: i1.SwatchComponent, selector: "color-swatch", inputs: ["color", "style", "focusStyle", "focus"], outputs: ["onClick", "onHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
252
257
|
}
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
258
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchPresetColorsComponent, decorators: [{
|
254
259
|
type: Component,
|
255
260
|
args: [{ selector: 'color-sketch-preset-colors', template: `
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
261
|
+
<div class="sketch-swatches">
|
262
|
+
@for (c of colors; track c) {
|
263
|
+
<div class="sketch-wrap">
|
264
|
+
<color-swatch
|
265
|
+
[color]="normalizeValue(c).color"
|
266
|
+
[style]="swatchStyle"
|
267
|
+
[focusStyle]="focusStyle(c)"
|
268
|
+
(onClick)="handleClick($event)"
|
269
|
+
(onHover)="onSwatchHover.emit($event)"
|
270
|
+
class="swatch"
|
271
|
+
></color-swatch>
|
272
|
+
</div>
|
273
|
+
}
|
266
274
|
</div>
|
267
|
-
|
268
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".sketch-swatches{position:relative;display:flex;flex-wrap:wrap;margin:0 -10px;padding:10px 0 0 10px;border-top:1px solid rgb(238,238,238)}.sketch-wrap{width:16px;height:16px;margin:0 10px 10px 0}:host-context([dir=rtl]) .sketch-swatches{padding-right:10px;padding-left:0}:host-context([dir=rtl]) .sketch-wrap{margin-left:10px;margin-right:0}\n"] }]
|
275
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, standalone: false, styles: [".sketch-swatches{position:relative;display:flex;flex-wrap:wrap;margin:0 -10px;padding:10px 0 0 10px;border-top:1px solid rgb(238,238,238)}.sketch-wrap{width:16px;height:16px;margin:0 10px 10px 0}:host-context([dir=\"rtl\"]) .sketch-swatches{padding-right:10px;padding-left:0}:host-context([dir=\"rtl\"]) .sketch-wrap{margin-left:10px;margin-right:0}\n"] }]
|
269
276
|
}], propDecorators: { colors: [{
|
270
277
|
type: Input
|
271
278
|
}], onClick: [{
|
@@ -317,8 +324,8 @@ class SketchComponent extends ColorWrap {
|
|
317
324
|
}, $event);
|
318
325
|
}
|
319
326
|
}
|
320
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
321
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
328
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: SketchComponent, isStandalone: false, selector: "color-sketch", inputs: { disableAlpha: "disableAlpha", presetColors: "presetColors", width: "width" }, providers: [
|
322
329
|
{
|
323
330
|
provide: NG_VALUE_ACCESSOR,
|
324
331
|
useExisting: forwardRef(() => SketchComponent),
|
@@ -329,93 +336,101 @@ class SketchComponent extends ColorWrap {
|
|
329
336
|
useExisting: forwardRef(() => SketchComponent),
|
330
337
|
},
|
331
338
|
], usesInheritance: true, ngImport: i0, template: `
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
>
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
339
|
+
<div class="sketch-picker {{ className }}" [style.width.px]="width">
|
340
|
+
<div class="sketch-saturation">
|
341
|
+
<color-saturation [hsl]="hsl" [hsv]="hsv" (onChange)="handleValueChange($event)">
|
342
|
+
</color-saturation>
|
343
|
+
</div>
|
344
|
+
<div class="sketch-controls">
|
345
|
+
<div class="sketch-sliders">
|
346
|
+
<div class="sketch-hue">
|
347
|
+
<color-hue [hsl]="hsl" (onChange)="handleValueChange($event)"></color-hue>
|
348
|
+
</div>
|
349
|
+
@if (disableAlpha === false) {
|
350
|
+
<div class="sketch-alpha">
|
351
|
+
<color-alpha
|
352
|
+
[radius]="2"
|
353
|
+
[rgb]="rgb"
|
354
|
+
[hsl]="hsl"
|
355
|
+
(onChange)="handleValueChange($event)"
|
356
|
+
></color-alpha>
|
357
|
+
</div>
|
358
|
+
}
|
345
359
|
</div>
|
346
|
-
<div class="sketch-
|
347
|
-
<color-
|
348
|
-
|
349
|
-
(onChange)="handleValueChange($event)"
|
350
|
-
></color-alpha>
|
360
|
+
<div class="sketch-color">
|
361
|
+
<color-checkboard></color-checkboard>
|
362
|
+
<div class="sketch-active" [style.background]="activeBackground"></div>
|
351
363
|
</div>
|
352
364
|
</div>
|
353
|
-
<div class="sketch-
|
354
|
-
<color-
|
355
|
-
|
365
|
+
<div class="sketch-fields-container">
|
366
|
+
<color-sketch-fields
|
367
|
+
[rgb]="rgb"
|
368
|
+
[hsl]="hsl"
|
369
|
+
[hex]="hex"
|
370
|
+
[disableAlpha]="disableAlpha"
|
371
|
+
(onChange)="handleValueChange($event)"
|
372
|
+
></color-sketch-fields>
|
356
373
|
</div>
|
374
|
+
@if (presetColors && presetColors.length) {
|
375
|
+
<div class="sketch-swatches-container">
|
376
|
+
<color-sketch-preset-colors
|
377
|
+
[colors]="presetColors"
|
378
|
+
(onClick)="handleBlockChange($event)"
|
379
|
+
(onSwatchHover)="onSwatchHover.emit($event)"
|
380
|
+
></color-sketch-preset-colors>
|
381
|
+
</div>
|
382
|
+
}
|
357
383
|
</div>
|
358
|
-
|
359
|
-
<color-sketch-fields
|
360
|
-
[rgb]="rgb" [hsl]="hsl" [hex]="hex"
|
361
|
-
[disableAlpha]="disableAlpha"
|
362
|
-
(onChange)="handleValueChange($event)"
|
363
|
-
></color-sketch-fields>
|
364
|
-
</div>
|
365
|
-
<div class="sketch-swatches-container" *ngIf="presetColors && presetColors.length">
|
366
|
-
<color-sketch-preset-colors
|
367
|
-
[colors]="presetColors"
|
368
|
-
(onClick)="handleBlockChange($event)"
|
369
|
-
(onSwatchHover)="onSwatchHover.emit($event)"
|
370
|
-
></color-sketch-preset-colors>
|
371
|
-
</div>
|
372
|
-
</div>
|
373
|
-
`, isInline: true, styles: [".sketch-picker{padding:10px 10px 3px;box-sizing:initial;background:#fff;border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026}.sketch-saturation{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.sketch-fields-container,.sketch-swatches-container{display:block}.sketch-controls{display:flex}.sketch-sliders{padding:4px 0;flex:1 1 0%}.sketch-hue{position:relative;height:10px;overflow:hidden}.sketch-alpha{position:relative;height:10px;margin-top:4px;overflow:hidden}.sketch-color{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:3px}.sketch-active{position:absolute;inset:0;border-radius:2px;box-shadow:#00000026 0 0 0 1px inset,#00000040 0 0 4px inset}:host-context([dir=rtl]) .sketch-color{margin-right:4px;margin-left:0}\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 SketchFieldsComponent; }), selector: "color-sketch-fields", inputs: ["hsl", "rgb", "hex", "disableAlpha"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(function () { return SketchPresetColorsComponent; }), selector: "color-sketch-preset-colors", inputs: ["colors"], outputs: ["onClick", "onSwatchHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
384
|
+
`, isInline: true, styles: [".sketch-picker{padding:10px 10px 3px;box-sizing:initial;background:#fff;border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026}.sketch-saturation{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.sketch-fields-container,.sketch-swatches-container{display:block}.sketch-controls{display:flex}.sketch-sliders{padding:4px 0;-webkit-box-flex:1;flex:1 1 0%}.sketch-hue{position:relative;height:10px;overflow:hidden}.sketch-alpha{position:relative;height:10px;margin-top:4px;overflow:hidden}.sketch-color{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:3px}.sketch-active{position:absolute;inset:0;border-radius:2px;box-shadow:#00000026 0 0 0 1px inset,#00000040 0 0 4px inset}:host-context([dir=\"rtl\"]) .sketch-color{margin-right:4px;margin-left:0}\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(() => SketchFieldsComponent), selector: "color-sketch-fields", inputs: ["hsl", "rgb", "hex", "disableAlpha"], outputs: ["onChange"] }, { kind: "component", type: i0.forwardRef(() => SketchPresetColorsComponent), selector: "color-sketch-preset-colors", inputs: ["colors"], outputs: ["onClick", "onSwatchHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
374
385
|
}
|
375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
386
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SketchComponent, decorators: [{
|
376
387
|
type: Component,
|
377
388
|
args: [{ selector: 'color-sketch', template: `
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
>
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
389
|
+
<div class="sketch-picker {{ className }}" [style.width.px]="width">
|
390
|
+
<div class="sketch-saturation">
|
391
|
+
<color-saturation [hsl]="hsl" [hsv]="hsv" (onChange)="handleValueChange($event)">
|
392
|
+
</color-saturation>
|
393
|
+
</div>
|
394
|
+
<div class="sketch-controls">
|
395
|
+
<div class="sketch-sliders">
|
396
|
+
<div class="sketch-hue">
|
397
|
+
<color-hue [hsl]="hsl" (onChange)="handleValueChange($event)"></color-hue>
|
398
|
+
</div>
|
399
|
+
@if (disableAlpha === false) {
|
400
|
+
<div class="sketch-alpha">
|
401
|
+
<color-alpha
|
402
|
+
[radius]="2"
|
403
|
+
[rgb]="rgb"
|
404
|
+
[hsl]="hsl"
|
405
|
+
(onChange)="handleValueChange($event)"
|
406
|
+
></color-alpha>
|
407
|
+
</div>
|
408
|
+
}
|
391
409
|
</div>
|
392
|
-
<div class="sketch-
|
393
|
-
<color-
|
394
|
-
|
395
|
-
(onChange)="handleValueChange($event)"
|
396
|
-
></color-alpha>
|
410
|
+
<div class="sketch-color">
|
411
|
+
<color-checkboard></color-checkboard>
|
412
|
+
<div class="sketch-active" [style.background]="activeBackground"></div>
|
397
413
|
</div>
|
398
414
|
</div>
|
399
|
-
<div class="sketch-
|
400
|
-
<color-
|
401
|
-
|
415
|
+
<div class="sketch-fields-container">
|
416
|
+
<color-sketch-fields
|
417
|
+
[rgb]="rgb"
|
418
|
+
[hsl]="hsl"
|
419
|
+
[hex]="hex"
|
420
|
+
[disableAlpha]="disableAlpha"
|
421
|
+
(onChange)="handleValueChange($event)"
|
422
|
+
></color-sketch-fields>
|
402
423
|
</div>
|
424
|
+
@if (presetColors && presetColors.length) {
|
425
|
+
<div class="sketch-swatches-container">
|
426
|
+
<color-sketch-preset-colors
|
427
|
+
[colors]="presetColors"
|
428
|
+
(onClick)="handleBlockChange($event)"
|
429
|
+
(onSwatchHover)="onSwatchHover.emit($event)"
|
430
|
+
></color-sketch-preset-colors>
|
431
|
+
</div>
|
432
|
+
}
|
403
433
|
</div>
|
404
|
-
<div class="sketch-fields-container">
|
405
|
-
<color-sketch-fields
|
406
|
-
[rgb]="rgb" [hsl]="hsl" [hex]="hex"
|
407
|
-
[disableAlpha]="disableAlpha"
|
408
|
-
(onChange)="handleValueChange($event)"
|
409
|
-
></color-sketch-fields>
|
410
|
-
</div>
|
411
|
-
<div class="sketch-swatches-container" *ngIf="presetColors && presetColors.length">
|
412
|
-
<color-sketch-preset-colors
|
413
|
-
[colors]="presetColors"
|
414
|
-
(onClick)="handleBlockChange($event)"
|
415
|
-
(onSwatchHover)="onSwatchHover.emit($event)"
|
416
|
-
></color-sketch-preset-colors>
|
417
|
-
</div>
|
418
|
-
</div>
|
419
434
|
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
|
420
435
|
{
|
421
436
|
provide: NG_VALUE_ACCESSOR,
|
@@ -426,8 +441,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
426
441
|
provide: ColorWrap,
|
427
442
|
useExisting: forwardRef(() => SketchComponent),
|
428
443
|
},
|
429
|
-
], styles: [".sketch-picker{padding:10px 10px 3px;box-sizing:initial;background:#fff;border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026}.sketch-saturation{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.sketch-fields-container,.sketch-swatches-container{display:block}.sketch-controls{display:flex}.sketch-sliders{padding:4px 0;flex:1 1 0%}.sketch-hue{position:relative;height:10px;overflow:hidden}.sketch-alpha{position:relative;height:10px;margin-top:4px;overflow:hidden}.sketch-color{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:3px}.sketch-active{position:absolute;inset:0;border-radius:2px;box-shadow:#00000026 0 0 0 1px inset,#00000040 0 0 4px inset}:host-context([dir
|
430
|
-
}], ctorParameters:
|
444
|
+
], standalone: false, styles: [".sketch-picker{padding:10px 10px 3px;box-sizing:initial;background:#fff;border-radius:4px;box-shadow:0 0 0 1px #00000026,0 8px 16px #00000026}.sketch-saturation{width:100%;padding-bottom:75%;position:relative;overflow:hidden}.sketch-fields-container,.sketch-swatches-container{display:block}.sketch-controls{display:flex}.sketch-sliders{padding:4px 0;-webkit-box-flex:1;flex:1 1 0%}.sketch-hue{position:relative;height:10px;overflow:hidden}.sketch-alpha{position:relative;height:10px;margin-top:4px;overflow:hidden}.sketch-color{width:24px;height:24px;position:relative;margin-top:4px;margin-left:4px;border-radius:3px}.sketch-active{position:absolute;inset:0;border-radius:2px;box-shadow:#00000026 0 0 0 1px inset,#00000040 0 0 4px inset}:host-context([dir=\"rtl\"]) .sketch-color{margin-right:4px;margin-left:0}\n"] }]
|
445
|
+
}], ctorParameters: () => [], propDecorators: { disableAlpha: [{
|
431
446
|
type: Input
|
432
447
|
}], presetColors: [{
|
433
448
|
type: Input
|
@@ -435,17 +450,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
435
450
|
type: Input
|
436
451
|
}] } });
|
437
452
|
class ColorSketchModule {
|
438
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
439
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
440
|
-
SketchPresetColorsComponent], imports: [CommonModule,
|
453
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorSketchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
454
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: ColorSketchModule, declarations: [SketchComponent, SketchFieldsComponent, SketchPresetColorsComponent], imports: [CommonModule,
|
441
455
|
AlphaModule,
|
442
456
|
CheckboardModule,
|
443
457
|
EditableInputModule,
|
444
458
|
HueModule,
|
445
459
|
SaturationModule,
|
446
|
-
SwatchModule], exports: [SketchComponent, SketchFieldsComponent,
|
447
|
-
|
448
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: ColorSketchModule, imports: [CommonModule,
|
460
|
+
SwatchModule], exports: [SketchComponent, SketchFieldsComponent, SketchPresetColorsComponent] });
|
461
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorSketchModule, imports: [CommonModule,
|
449
462
|
AlphaModule,
|
450
463
|
CheckboardModule,
|
451
464
|
EditableInputModule,
|
@@ -453,19 +466,11 @@ class ColorSketchModule {
|
|
453
466
|
SaturationModule,
|
454
467
|
SwatchModule] });
|
455
468
|
}
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorSketchModule, decorators: [{
|
457
470
|
type: NgModule,
|
458
471
|
args: [{
|
459
|
-
declarations: [
|
460
|
-
|
461
|
-
SketchFieldsComponent,
|
462
|
-
SketchPresetColorsComponent,
|
463
|
-
],
|
464
|
-
exports: [
|
465
|
-
SketchComponent,
|
466
|
-
SketchFieldsComponent,
|
467
|
-
SketchPresetColorsComponent,
|
468
|
-
],
|
472
|
+
declarations: [SketchComponent, SketchFieldsComponent, SketchPresetColorsComponent],
|
473
|
+
exports: [SketchComponent, SketchFieldsComponent, SketchPresetColorsComponent],
|
469
474
|
imports: [
|
470
475
|
CommonModule,
|
471
476
|
AlphaModule,
|