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