ngx-color 8.0.3 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +1 -1
- package/editable-input.component.d.ts +1 -1
- package/esm2022/alpha/alpha-picker.component.mjs +102 -0
- package/esm2022/alpha.component.mjs +146 -0
- package/esm2022/block/block-swatches.component.mjs +63 -0
- package/esm2022/block/block.component.mjs +160 -0
- package/esm2022/checkboard.component.mjs +53 -0
- package/esm2022/chrome/chrome-fields.component.mjs +317 -0
- package/esm2022/chrome/chrome.component.mjs +187 -0
- package/esm2022/circle/circle-swatch.component.mjs +69 -0
- package/esm2022/circle/circle.component.mjs +136 -0
- package/esm2022/color-wrap.component.mjs +173 -0
- package/esm2022/compact/compact-color.component.mjs +71 -0
- package/esm2022/compact/compact-fields.component.mjs +165 -0
- package/esm2022/compact/compact.component.mjs +156 -0
- package/esm2022/coordinates.directive.mjs +108 -0
- package/esm2022/editable-input.component.mjs +212 -0
- package/esm2022/github/github-swatch.component.mjs +53 -0
- package/esm2022/github/github.component.mjs +114 -0
- package/esm2022/hue/hue-picker.component.mjs +102 -0
- package/esm2022/hue.component.mjs +128 -0
- package/esm2022/material/material.component.mjs +188 -0
- package/esm2022/photoshop/photoshop-button.component.mjs +33 -0
- package/esm2022/photoshop/photoshop-fields.component.mjs +214 -0
- package/esm2022/photoshop/photoshop-previews.component.mjs +40 -0
- package/esm2022/photoshop/photoshop.component.mjs +187 -0
- package/esm2022/raised.component.mjs +50 -0
- package/esm2022/saturation.component.mjs +100 -0
- package/esm2022/shade/shade-picker.component.mjs +94 -0
- package/esm2022/shade.component.mjs +133 -0
- package/esm2022/sketch/sketch-fields.component.mjs +211 -0
- package/esm2022/sketch/sketch-preset-colors.component.mjs +68 -0
- package/esm2022/sketch/sketch.component.mjs +215 -0
- package/esm2022/slider/slider-swatch.component.mjs +55 -0
- package/esm2022/slider/slider-swatches.component.mjs +119 -0
- package/esm2022/slider/slider.component.mjs +104 -0
- package/esm2022/swatch.component.mjs +112 -0
- package/esm2022/swatches/swatches-color.component.mjs +105 -0
- package/esm2022/swatches/swatches-group.component.mjs +50 -0
- package/esm2022/swatches/swatches.component.mjs +244 -0
- package/esm2022/twitter/twitter.component.mjs +161 -0
- package/{fesm2020 → fesm2022}/ngx-color-alpha.mjs +30 -30
- package/fesm2022/ngx-color-alpha.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngx-color-block.mjs +65 -66
- package/fesm2022/ngx-color-block.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/ngx-color-chrome.mjs +77 -74
- package/{fesm2020 → fesm2022}/ngx-color-chrome.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngx-color-circle.mjs +61 -62
- package/fesm2022/ngx-color-circle.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngx-color-compact.mjs +136 -136
- package/{fesm2015 → fesm2022}/ngx-color-compact.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngx-color-github.mjs +53 -54
- package/{fesm2020 → fesm2022}/ngx-color-github.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngx-color-hue.mjs +32 -32
- package/fesm2022/ngx-color-hue.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngx-color-material.mjs +59 -59
- package/{fesm2015 → fesm2022}/ngx-color-material.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngx-color-photoshop.mjs +111 -113
- package/{fesm2015 → fesm2022}/ngx-color-photoshop.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngx-color-shade.mjs +29 -29
- package/fesm2022/ngx-color-shade.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngx-color-sketch.mjs +94 -93
- package/{fesm2015 → fesm2022}/ngx-color-sketch.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngx-color-slider.mjs +46 -45
- package/{fesm2015 → fesm2022}/ngx-color-slider.mjs.map +1 -1
- package/{fesm2015 → fesm2022}/ngx-color-swatches.mjs +182 -182
- package/fesm2022/ngx-color-swatches.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/ngx-color-twitter.mjs +55 -55
- package/{fesm2015 → fesm2022}/ngx-color-twitter.mjs.map +1 -1
- package/{fesm2020 → fesm2022}/ngx-color.mjs +200 -160
- 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 +59 -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.component.mjs +0 -138
- package/esm2020/block/block-swatches.component.mjs +0 -63
- package/esm2020/block/block.component.mjs +0 -158
- 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/circle/circle-swatch.component.mjs +0 -69
- package/esm2020/circle/circle.component.mjs +0 -134
- 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/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/hue/hue-picker.component.mjs +0 -100
- package/esm2020/hue.component.mjs +0 -124
- package/esm2020/material/material.component.mjs +0 -186
- 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/raised.component.mjs +0 -50
- package/esm2020/saturation.component.mjs +0 -92
- package/esm2020/shade/shade-picker.component.mjs +0 -92
- package/esm2020/shade.component.mjs +0 -125
- 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/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/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/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.map +0 -1
- 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-photoshop.mjs +0 -467
- package/fesm2015/ngx-color-shade.mjs.map +0 -1
- package/fesm2015/ngx-color-slider.mjs +0 -273
- package/fesm2015/ngx-color-swatches.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.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-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.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.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
- /package/{esm2020 → esm2022}/alpha/ngx-color-alpha.mjs +0 -0
- /package/{esm2020 → esm2022}/alpha/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/block/ngx-color-block.mjs +0 -0
- /package/{esm2020 → esm2022}/block/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/chrome/ngx-color-chrome.mjs +0 -0
- /package/{esm2020 → esm2022}/chrome/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/circle/ngx-color-circle.mjs +0 -0
- /package/{esm2020 → esm2022}/circle/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/compact/ngx-color-compact.mjs +0 -0
- /package/{esm2020 → esm2022}/compact/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/github/ngx-color-github.mjs +0 -0
- /package/{esm2020 → esm2022}/github/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/checkboard.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/color.interfaces.mjs +0 -0
- /package/{esm2020 → esm2022}/helpers/color.mjs +0 -0
- /package/{esm2020 → esm2022}/hue/ngx-color-hue.mjs +0 -0
- /package/{esm2020 → esm2022}/hue/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/material/ngx-color-material.mjs +0 -0
- /package/{esm2020 → esm2022}/material/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/ngx-color.mjs +0 -0
- /package/{esm2020 → esm2022}/photoshop/ngx-color-photoshop.mjs +0 -0
- /package/{esm2020 → esm2022}/photoshop/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/shade/ngx-color-shade.mjs +0 -0
- /package/{esm2020 → esm2022}/shade/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/sketch/ngx-color-sketch.mjs +0 -0
- /package/{esm2020 → esm2022}/sketch/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/slider/ngx-color-slider.mjs +0 -0
- /package/{esm2020 → esm2022}/slider/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/swatches/ngx-color-swatches.mjs +0 -0
- /package/{esm2020 → esm2022}/swatches/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/twitter/ngx-color-twitter.mjs +0 -0
- /package/{esm2020 → esm2022}/twitter/public_api.mjs +0 -0
@@ -1,385 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, NgModule } from '@angular/core';
|
3
|
-
import * as i1 from 'ngx-color';
|
4
|
-
import { getContrastingColor, isValidHex, ColorWrap, EditableInputModule, SwatchModule, RaisedModule } from 'ngx-color';
|
5
|
-
import * as i1$1 from '@angular/common';
|
6
|
-
import { CommonModule } from '@angular/common';
|
7
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
8
|
-
|
9
|
-
class CompactColorComponent {
|
10
|
-
constructor() {
|
11
|
-
this.onClick = new EventEmitter();
|
12
|
-
this.onSwatchHover = new EventEmitter();
|
13
|
-
this.swatchStyle = {
|
14
|
-
width: '15px',
|
15
|
-
height: '15px',
|
16
|
-
float: 'left',
|
17
|
-
marginRight: '5px',
|
18
|
-
marginBottom: '5px',
|
19
|
-
position: 'relative',
|
20
|
-
cursor: 'pointer',
|
21
|
-
};
|
22
|
-
this.swatchFocus = {};
|
23
|
-
this.getContrastingColor = getContrastingColor;
|
24
|
-
}
|
25
|
-
ngOnChanges() {
|
26
|
-
this.swatchStyle.background = this.color;
|
27
|
-
this.swatchFocus.boxShadow = `0 0 4px ${this.color}`;
|
28
|
-
if (this.color.toLowerCase() === '#ffffff') {
|
29
|
-
this.swatchStyle.boxShadow = 'inset 0 0 0 1px #ddd';
|
30
|
-
}
|
31
|
-
}
|
32
|
-
handleClick({ hex, $event }) {
|
33
|
-
this.onClick.emit({ hex, $event });
|
34
|
-
}
|
35
|
-
}
|
36
|
-
CompactColorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactColorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
37
|
-
CompactColorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: CompactColorComponent, selector: "color-compact-color", inputs: { color: "color", active: "active" }, outputs: { onClick: "onClick", onSwatchHover: "onSwatchHover" }, usesOnChanges: true, ngImport: i0, template: `
|
38
|
-
<div class="compact-color">
|
39
|
-
<color-swatch class="swatch"
|
40
|
-
[color]="color" [style]="swatchStyle"
|
41
|
-
[focusStyle]="swatchFocus"
|
42
|
-
(onClick)="handleClick($event)" (onHover)="onSwatchHover.emit($event)"
|
43
|
-
>
|
44
|
-
<div class="compact-dot"
|
45
|
-
[class.active]="active" [style.background]="getContrastingColor(color)"
|
46
|
-
></div>
|
47
|
-
</color-swatch>
|
48
|
-
</div>
|
49
|
-
`, isInline: true, styles: [".compact-dot{position:absolute;top:5px;right:5px;bottom:5px;left:5px;border-radius:50%;opacity:0}.compact-dot.active{opacity:1}\n"], dependencies: [{ kind: "component", type: i1.SwatchComponent, selector: "color-swatch", inputs: ["color", "style", "focusStyle", "focus"], outputs: ["onClick", "onHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactColorComponent, decorators: [{
|
51
|
-
type: Component,
|
52
|
-
args: [{ selector: 'color-compact-color', template: `
|
53
|
-
<div class="compact-color">
|
54
|
-
<color-swatch class="swatch"
|
55
|
-
[color]="color" [style]="swatchStyle"
|
56
|
-
[focusStyle]="swatchFocus"
|
57
|
-
(onClick)="handleClick($event)" (onHover)="onSwatchHover.emit($event)"
|
58
|
-
>
|
59
|
-
<div class="compact-dot"
|
60
|
-
[class.active]="active" [style.background]="getContrastingColor(color)"
|
61
|
-
></div>
|
62
|
-
</color-swatch>
|
63
|
-
</div>
|
64
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".compact-dot{position:absolute;top:5px;right:5px;bottom:5px;left:5px;border-radius:50%;opacity:0}.compact-dot.active{opacity:1}\n"] }]
|
65
|
-
}], propDecorators: { color: [{
|
66
|
-
type: Input
|
67
|
-
}], active: [{
|
68
|
-
type: Input
|
69
|
-
}], onClick: [{
|
70
|
-
type: Output
|
71
|
-
}], onSwatchHover: [{
|
72
|
-
type: Output
|
73
|
-
}] } });
|
74
|
-
|
75
|
-
class CompactFieldsComponent {
|
76
|
-
constructor() {
|
77
|
-
this.onChange = new EventEmitter();
|
78
|
-
this.HEXWrap = {
|
79
|
-
marginTop: '-3px',
|
80
|
-
marginBottom: '-3px',
|
81
|
-
// flex: '6 1 0%',
|
82
|
-
position: 'relative',
|
83
|
-
};
|
84
|
-
this.HEXinput = {
|
85
|
-
width: '80%',
|
86
|
-
padding: '0px',
|
87
|
-
paddingLeft: '20%',
|
88
|
-
border: 'none',
|
89
|
-
outline: 'none',
|
90
|
-
background: 'none',
|
91
|
-
fontSize: '12px',
|
92
|
-
color: '#333',
|
93
|
-
height: '16px',
|
94
|
-
};
|
95
|
-
this.HEXlabel = {
|
96
|
-
display: 'none',
|
97
|
-
};
|
98
|
-
this.RGBwrap = {
|
99
|
-
marginTop: '-3px',
|
100
|
-
marginBottom: '-3px',
|
101
|
-
// flex: '3 1 0%',
|
102
|
-
position: 'relative',
|
103
|
-
};
|
104
|
-
this.RGBinput = {
|
105
|
-
width: '80%',
|
106
|
-
padding: '0px',
|
107
|
-
paddingLeft: '30%',
|
108
|
-
border: 'none',
|
109
|
-
outline: 'none',
|
110
|
-
background: 'none',
|
111
|
-
fontSize: '12px',
|
112
|
-
color: '#333',
|
113
|
-
height: '16px',
|
114
|
-
};
|
115
|
-
this.RGBlabel = {
|
116
|
-
position: 'absolute',
|
117
|
-
top: '6px',
|
118
|
-
left: '0px',
|
119
|
-
'line-height': '16px',
|
120
|
-
'text-transform': 'uppercase',
|
121
|
-
fontSize: '12px',
|
122
|
-
color: '#999',
|
123
|
-
};
|
124
|
-
}
|
125
|
-
handleChange({ data, $event }) {
|
126
|
-
if (data.hex) {
|
127
|
-
if (isValidHex(data.hex)) {
|
128
|
-
this.onChange.emit({
|
129
|
-
data: {
|
130
|
-
hex: data.hex,
|
131
|
-
source: 'hex',
|
132
|
-
},
|
133
|
-
$event,
|
134
|
-
});
|
135
|
-
}
|
136
|
-
}
|
137
|
-
else {
|
138
|
-
this.onChange.emit({
|
139
|
-
data: {
|
140
|
-
r: data.r || this.rgb.r,
|
141
|
-
g: data.g || this.rgb.g,
|
142
|
-
b: data.b || this.rgb.b,
|
143
|
-
source: 'rgb',
|
144
|
-
},
|
145
|
-
$event,
|
146
|
-
});
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
CompactFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
151
|
-
CompactFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: CompactFieldsComponent, selector: "color-compact-fields", inputs: { hex: "hex", rgb: "rgb" }, outputs: { onChange: "onChange" }, ngImport: i0, template: `
|
152
|
-
<div class="compact-fields">
|
153
|
-
<div class="compact-active" [style.background]="hex"></div>
|
154
|
-
<div style="flex: 6 1 0%;">
|
155
|
-
<color-editable-input
|
156
|
-
[style]="{ wrap: HEXWrap, input: HEXinput, label: HEXlabel }"
|
157
|
-
label="hex"
|
158
|
-
[value]="hex"
|
159
|
-
(onChange)="handleChange($event)"
|
160
|
-
></color-editable-input>
|
161
|
-
</div>
|
162
|
-
<div style="flex: 3 1 0%">
|
163
|
-
<color-editable-input
|
164
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
165
|
-
label="r"
|
166
|
-
[value]="rgb.r"
|
167
|
-
(onChange)="handleChange($event)"
|
168
|
-
></color-editable-input>
|
169
|
-
</div>
|
170
|
-
<div style="flex: 3 1 0%">
|
171
|
-
<color-editable-input
|
172
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
173
|
-
label="g"
|
174
|
-
[value]="rgb.g"
|
175
|
-
(onChange)="handleChange($event)"
|
176
|
-
></color-editable-input>
|
177
|
-
</div>
|
178
|
-
<div style="flex: 3 1 0%">
|
179
|
-
<color-editable-input
|
180
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
181
|
-
label="b"
|
182
|
-
[value]="rgb.b"
|
183
|
-
(onChange)="handleChange($event)"
|
184
|
-
></color-editable-input>
|
185
|
-
</div>
|
186
|
-
</div>
|
187
|
-
`, isInline: true, styles: [".compact-fields{display:flex;padding-bottom:6px;padding-right:5px;position:relative}.compact-active{position:absolute;top:6px;left:5px;height:9px;width:9px}\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 });
|
188
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactFieldsComponent, decorators: [{
|
189
|
-
type: Component,
|
190
|
-
args: [{ selector: 'color-compact-fields', template: `
|
191
|
-
<div class="compact-fields">
|
192
|
-
<div class="compact-active" [style.background]="hex"></div>
|
193
|
-
<div style="flex: 6 1 0%;">
|
194
|
-
<color-editable-input
|
195
|
-
[style]="{ wrap: HEXWrap, input: HEXinput, label: HEXlabel }"
|
196
|
-
label="hex"
|
197
|
-
[value]="hex"
|
198
|
-
(onChange)="handleChange($event)"
|
199
|
-
></color-editable-input>
|
200
|
-
</div>
|
201
|
-
<div style="flex: 3 1 0%">
|
202
|
-
<color-editable-input
|
203
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
204
|
-
label="r"
|
205
|
-
[value]="rgb.r"
|
206
|
-
(onChange)="handleChange($event)"
|
207
|
-
></color-editable-input>
|
208
|
-
</div>
|
209
|
-
<div style="flex: 3 1 0%">
|
210
|
-
<color-editable-input
|
211
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
212
|
-
label="g"
|
213
|
-
[value]="rgb.g"
|
214
|
-
(onChange)="handleChange($event)"
|
215
|
-
></color-editable-input>
|
216
|
-
</div>
|
217
|
-
<div style="flex: 3 1 0%">
|
218
|
-
<color-editable-input
|
219
|
-
[style]="{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }"
|
220
|
-
label="b"
|
221
|
-
[value]="rgb.b"
|
222
|
-
(onChange)="handleChange($event)"
|
223
|
-
></color-editable-input>
|
224
|
-
</div>
|
225
|
-
</div>
|
226
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".compact-fields{display:flex;padding-bottom:6px;padding-right:5px;position:relative}.compact-active{position:absolute;top:6px;left:5px;height:9px;width:9px}\n"] }]
|
227
|
-
}], propDecorators: { hex: [{
|
228
|
-
type: Input
|
229
|
-
}], rgb: [{
|
230
|
-
type: Input
|
231
|
-
}], onChange: [{
|
232
|
-
type: Output
|
233
|
-
}] } });
|
234
|
-
|
235
|
-
class CompactComponent extends ColorWrap {
|
236
|
-
constructor() {
|
237
|
-
super();
|
238
|
-
/** Color squares to display */
|
239
|
-
this.colors = [
|
240
|
-
'#4D4D4D',
|
241
|
-
'#999999',
|
242
|
-
'#FFFFFF',
|
243
|
-
'#F44E3B',
|
244
|
-
'#FE9200',
|
245
|
-
'#FCDC00',
|
246
|
-
'#DBDF00',
|
247
|
-
'#A4DD00',
|
248
|
-
'#68CCCA',
|
249
|
-
'#73D8FF',
|
250
|
-
'#AEA1FF',
|
251
|
-
'#FDA1FF',
|
252
|
-
'#333333',
|
253
|
-
'#808080',
|
254
|
-
'#cccccc',
|
255
|
-
'#D33115',
|
256
|
-
'#E27300',
|
257
|
-
'#FCC400',
|
258
|
-
'#B0BC00',
|
259
|
-
'#68BC00',
|
260
|
-
'#16A5A5',
|
261
|
-
'#009CE0',
|
262
|
-
'#7B64FF',
|
263
|
-
'#FA28FF',
|
264
|
-
'#000000',
|
265
|
-
'#666666',
|
266
|
-
'#B3B3B3',
|
267
|
-
'#9F0500',
|
268
|
-
'#C45100',
|
269
|
-
'#FB9E00',
|
270
|
-
'#808900',
|
271
|
-
'#194D33',
|
272
|
-
'#0C797D',
|
273
|
-
'#0062B1',
|
274
|
-
'#653294',
|
275
|
-
'#AB149E',
|
276
|
-
];
|
277
|
-
this.zDepth = 1;
|
278
|
-
this.radius = 1;
|
279
|
-
this.background = '#fff';
|
280
|
-
this.disableAlpha = true;
|
281
|
-
}
|
282
|
-
handleBlockChange({ hex, $event }) {
|
283
|
-
if (isValidHex(hex)) {
|
284
|
-
this.handleChange({ hex, source: 'hex' }, $event);
|
285
|
-
}
|
286
|
-
}
|
287
|
-
handleValueChange({ data, $event }) {
|
288
|
-
this.handleChange(data, $event);
|
289
|
-
}
|
290
|
-
}
|
291
|
-
CompactComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
292
|
-
CompactComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: CompactComponent, selector: "color-compact", inputs: { colors: "colors", zDepth: "zDepth", radius: "radius", background: "background" }, providers: [
|
293
|
-
{
|
294
|
-
provide: NG_VALUE_ACCESSOR,
|
295
|
-
useExisting: forwardRef(() => CompactComponent),
|
296
|
-
multi: true,
|
297
|
-
},
|
298
|
-
{
|
299
|
-
provide: ColorWrap,
|
300
|
-
useExisting: forwardRef(() => CompactComponent),
|
301
|
-
},
|
302
|
-
], usesInheritance: true, ngImport: i0, template: `
|
303
|
-
<color-raised class="color-compact" [zDepth]="zDepth" [background]="background" [radius]="radius">
|
304
|
-
<div class="compact-picker {{ className }}">
|
305
|
-
<div>
|
306
|
-
<color-compact-color
|
307
|
-
*ngFor="let color of colors" [color]="color"
|
308
|
-
[active]="color.toLowerCase() === hex.toLowerCase()"
|
309
|
-
(onClick)="handleBlockChange($event)"
|
310
|
-
></color-compact-color>
|
311
|
-
<div class="compact-clear"></div>
|
312
|
-
</div>
|
313
|
-
<color-compact-fields
|
314
|
-
[hex]="hex"
|
315
|
-
[rgb]="rgb"
|
316
|
-
(onChange)="handleValueChange($event)"
|
317
|
-
></color-compact-fields>
|
318
|
-
</div>
|
319
|
-
</color-raised>
|
320
|
-
`, isInline: true, styles: [".color-compact{background:#f6f6f6;radius:4px}.compact-picker{padding-top:5px;padding-left:5px;box-sizing:border-box;width:245px}.compact-clear{clear:both}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i0.forwardRef(function () { return i1.RaisedComponent; }), selector: "color-raised", inputs: ["zDepth", "radius", "background"] }, { kind: "component", type: i0.forwardRef(function () { return CompactColorComponent; }), selector: "color-compact-color", inputs: ["color", "active"], outputs: ["onClick", "onSwatchHover"] }, { kind: "component", type: i0.forwardRef(function () { return CompactFieldsComponent; }), selector: "color-compact-fields", inputs: ["hex", "rgb"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CompactComponent, decorators: [{
|
322
|
-
type: Component,
|
323
|
-
args: [{ selector: 'color-compact', template: `
|
324
|
-
<color-raised class="color-compact" [zDepth]="zDepth" [background]="background" [radius]="radius">
|
325
|
-
<div class="compact-picker {{ className }}">
|
326
|
-
<div>
|
327
|
-
<color-compact-color
|
328
|
-
*ngFor="let color of colors" [color]="color"
|
329
|
-
[active]="color.toLowerCase() === hex.toLowerCase()"
|
330
|
-
(onClick)="handleBlockChange($event)"
|
331
|
-
></color-compact-color>
|
332
|
-
<div class="compact-clear"></div>
|
333
|
-
</div>
|
334
|
-
<color-compact-fields
|
335
|
-
[hex]="hex"
|
336
|
-
[rgb]="rgb"
|
337
|
-
(onChange)="handleValueChange($event)"
|
338
|
-
></color-compact-fields>
|
339
|
-
</div>
|
340
|
-
</color-raised>
|
341
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
|
342
|
-
{
|
343
|
-
provide: NG_VALUE_ACCESSOR,
|
344
|
-
useExisting: forwardRef(() => CompactComponent),
|
345
|
-
multi: true,
|
346
|
-
},
|
347
|
-
{
|
348
|
-
provide: ColorWrap,
|
349
|
-
useExisting: forwardRef(() => CompactComponent),
|
350
|
-
},
|
351
|
-
], styles: [".color-compact{background:#f6f6f6;radius:4px}.compact-picker{padding-top:5px;padding-left:5px;box-sizing:border-box;width:245px}.compact-clear{clear:both}\n"] }]
|
352
|
-
}], ctorParameters: function () { return []; }, propDecorators: { colors: [{
|
353
|
-
type: Input
|
354
|
-
}], zDepth: [{
|
355
|
-
type: Input
|
356
|
-
}], radius: [{
|
357
|
-
type: Input
|
358
|
-
}], background: [{
|
359
|
-
type: Input
|
360
|
-
}] } });
|
361
|
-
class ColorCompactModule {
|
362
|
-
}
|
363
|
-
ColorCompactModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorCompactModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
364
|
-
ColorCompactModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorCompactModule, declarations: [CompactComponent, CompactColorComponent,
|
365
|
-
CompactFieldsComponent], imports: [CommonModule, EditableInputModule, SwatchModule, RaisedModule], exports: [CompactComponent, CompactColorComponent, CompactFieldsComponent] });
|
366
|
-
ColorCompactModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorCompactModule, imports: [CommonModule, EditableInputModule, SwatchModule, RaisedModule] });
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorCompactModule, decorators: [{
|
368
|
-
type: NgModule,
|
369
|
-
args: [{
|
370
|
-
declarations: [
|
371
|
-
CompactComponent,
|
372
|
-
CompactColorComponent,
|
373
|
-
CompactFieldsComponent,
|
374
|
-
],
|
375
|
-
exports: [CompactComponent, CompactColorComponent, CompactFieldsComponent],
|
376
|
-
imports: [CommonModule, EditableInputModule, SwatchModule, RaisedModule],
|
377
|
-
}]
|
378
|
-
}] });
|
379
|
-
|
380
|
-
/**
|
381
|
-
* Generated bundle index. Do not edit.
|
382
|
-
*/
|
383
|
-
|
384
|
-
export { ColorCompactModule, CompactColorComponent, CompactComponent, CompactFieldsComponent };
|
385
|
-
//# sourceMappingURL=ngx-color-compact.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ngx-color-compact.mjs","sources":["../../src/lib/compact/compact-color.component.ts","../../src/lib/compact/compact-fields.component.ts","../../src/lib/compact/compact.component.ts","../../src/lib/compact/ngx-color-compact.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n OnChanges,\n Output,\n} from '@angular/core';\n\nimport { getContrastingColor } from 'ngx-color';\n\n@Component({\n selector: 'color-compact-color',\n template: `\n <div class=\"compact-color\">\n <color-swatch class=\"swatch\"\n [color]=\"color\" [style]=\"swatchStyle\"\n [focusStyle]=\"swatchFocus\"\n (onClick)=\"handleClick($event)\" (onHover)=\"onSwatchHover.emit($event)\"\n >\n <div class=\"compact-dot\"\n [class.active]=\"active\" [style.background]=\"getContrastingColor(color)\"\n ></div>\n </color-swatch>\n </div>\n `,\n styles: [\n `\n .compact-dot {\n position: absolute;\n top: 5px;\n right: 5px;\n bottom: 5px;\n left: 5px;\n border-radius: 50%;\n opacity: 0;\n }\n .compact-dot.active {\n opacity: 1;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n})\nexport class CompactColorComponent implements OnChanges {\n @Input() color!: string;\n @Input() active!: boolean;\n @Output() onClick = new EventEmitter<any>();\n @Output() onSwatchHover = new EventEmitter<any>();\n swatchStyle: Record<string, string> = {\n width: '15px',\n height: '15px',\n float: 'left',\n marginRight: '5px',\n marginBottom: '5px',\n position: 'relative',\n cursor: 'pointer',\n };\n swatchFocus: Record<string, string> = {};\n getContrastingColor = getContrastingColor;\n\n ngOnChanges() {\n this.swatchStyle.background = this.color;\n this.swatchFocus.boxShadow = `0 0 4px ${this.color}`;\n if (this.color.toLowerCase() === '#ffffff') {\n this.swatchStyle.boxShadow = 'inset 0 0 0 1px #ddd';\n }\n }\n handleClick({ hex, $event }) {\n this.onClick.emit({ hex, $event });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output,\n} from '@angular/core';\n\nimport { isValidHex, RGBA } from 'ngx-color';\n\n@Component({\n selector: 'color-compact-fields',\n template: `\n <div class=\"compact-fields\">\n <div class=\"compact-active\" [style.background]=\"hex\"></div>\n <div style=\"flex: 6 1 0%;\">\n <color-editable-input\n [style]=\"{ wrap: HEXWrap, input: HEXinput, label: HEXlabel }\"\n label=\"hex\"\n [value]=\"hex\"\n (onChange)=\"handleChange($event)\"\n ></color-editable-input>\n </div>\n <div style=\"flex: 3 1 0%\">\n <color-editable-input\n [style]=\"{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }\"\n label=\"r\"\n [value]=\"rgb.r\"\n (onChange)=\"handleChange($event)\"\n ></color-editable-input>\n </div>\n <div style=\"flex: 3 1 0%\">\n <color-editable-input\n [style]=\"{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }\"\n label=\"g\"\n [value]=\"rgb.g\"\n (onChange)=\"handleChange($event)\"\n ></color-editable-input>\n </div>\n <div style=\"flex: 3 1 0%\">\n <color-editable-input\n [style]=\"{ wrap: RGBwrap, input: RGBinput, label: RGBlabel }\"\n label=\"b\"\n [value]=\"rgb.b\"\n (onChange)=\"handleChange($event)\"\n ></color-editable-input>\n </div>\n </div>\n `,\n styles: [\n `\n .compact-fields {\n display: flex;\n padding-bottom: 6px;\n padding-right: 5px;\n position: relative;\n }\n .compact-active {\n position: absolute;\n top: 6px;\n left: 5px;\n height: 9px;\n width: 9px;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n})\nexport class CompactFieldsComponent {\n @Input() hex!: string;\n @Input() rgb!: RGBA;\n @Output() onChange = new EventEmitter<any>();\n HEXWrap: {[key: string]: string} = {\n marginTop: '-3px',\n marginBottom: '-3px',\n // flex: '6 1 0%',\n position: 'relative',\n };\n HEXinput: {[key: string]: string} = {\n width: '80%',\n padding: '0px',\n paddingLeft: '20%',\n border: 'none',\n outline: 'none',\n background: 'none',\n fontSize: '12px',\n color: '#333',\n height: '16px',\n };\n HEXlabel: {[key: string]: string} = {\n display: 'none',\n };\n RGBwrap: {[key: string]: string} = {\n marginTop: '-3px',\n marginBottom: '-3px',\n // flex: '3 1 0%',\n position: 'relative',\n };\n RGBinput: {[key: string]: string} = {\n width: '80%',\n padding: '0px',\n paddingLeft: '30%',\n border: 'none',\n outline: 'none',\n background: 'none',\n fontSize: '12px',\n color: '#333',\n height: '16px',\n };\n RGBlabel: {[key: string]: string} = {\n position: 'absolute',\n top: '6px',\n left: '0px',\n 'line-height': '16px',\n 'text-transform': 'uppercase',\n fontSize: '12px',\n color: '#999',\n };\n\n handleChange({ data, $event }) {\n if (data.hex) {\n if (isValidHex(data.hex)) {\n this.onChange.emit({\n data: {\n hex: data.hex,\n source: 'hex',\n },\n $event,\n });\n }\n } else {\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 }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule } from '@angular/core';\n\nimport { ColorWrap, EditableInputModule, isValidHex, RaisedModule, SwatchModule, zDepth } from 'ngx-color';\nimport { CompactColorComponent } from './compact-color.component';\nimport { CompactFieldsComponent } from './compact-fields.component';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'color-compact',\n template: `\n <color-raised class=\"color-compact\" [zDepth]=\"zDepth\" [background]=\"background\" [radius]=\"radius\">\n <div class=\"compact-picker {{ className }}\">\n <div>\n <color-compact-color\n *ngFor=\"let color of colors\" [color]=\"color\"\n [active]=\"color.toLowerCase() === hex.toLowerCase()\"\n (onClick)=\"handleBlockChange($event)\"\n ></color-compact-color>\n <div class=\"compact-clear\"></div>\n </div>\n <color-compact-fields\n [hex]=\"hex\"\n [rgb]=\"rgb\"\n (onChange)=\"handleValueChange($event)\"\n ></color-compact-fields>\n </div>\n </color-raised>\n `,\n styles: [\n `\n .color-compact {\n background: #f6f6f6;\n radius: 4px;\n }\n .compact-picker {\n padding-top: 5px;\n padding-left: 5px;\n box-sizing: border-box;\n width: 245px;\n }\n .compact-clear {\n clear: both;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => CompactComponent),\n multi: true,\n },\n {\n provide: ColorWrap,\n useExisting: forwardRef(() => CompactComponent),\n },\n ]\n})\nexport class CompactComponent extends ColorWrap {\n /** Color squares to display */\n @Input() colors = [\n '#4D4D4D',\n '#999999',\n '#FFFFFF',\n '#F44E3B',\n '#FE9200',\n '#FCDC00',\n '#DBDF00',\n '#A4DD00',\n '#68CCCA',\n '#73D8FF',\n '#AEA1FF',\n '#FDA1FF',\n '#333333',\n '#808080',\n '#cccccc',\n '#D33115',\n '#E27300',\n '#FCC400',\n '#B0BC00',\n '#68BC00',\n '#16A5A5',\n '#009CE0',\n '#7B64FF',\n '#FA28FF',\n '#000000',\n '#666666',\n '#B3B3B3',\n '#9F0500',\n '#C45100',\n '#FB9E00',\n '#808900',\n '#194D33',\n '#0C797D',\n '#0062B1',\n '#653294',\n '#AB149E',\n ];\n @Input() zDepth: zDepth = 1;\n @Input() radius = 1;\n @Input() background = '#fff';\n disableAlpha = true;\n\n constructor() {\n super();\n }\n handleBlockChange({ hex, $event }) {\n if (isValidHex(hex)) {\n this.handleChange({ hex, source: 'hex' }, $event);\n }\n }\n handleValueChange({ data, $event }) {\n this.handleChange(data, $event);\n }\n}\n\n@NgModule({\n declarations: [\n CompactComponent,\n CompactColorComponent,\n CompactFieldsComponent,\n ],\n exports: [CompactComponent, CompactColorComponent, CompactFieldsComponent],\n imports: [CommonModule, EditableInputModule, SwatchModule, RaisedModule],\n})\nexport class ColorCompactModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i2"],"mappings":";;;;;;;;MA6Ca,qBAAqB,CAAA;AAlClC,IAAA,WAAA,GAAA;AAqCY,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAAO,CAAC;AAClC,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,YAAY,EAAO,CAAC;AAClD,QAAA,IAAA,CAAA,WAAW,GAA2B;AACpC,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,MAAM,EAAE,SAAS;SAClB,CAAC;QACF,IAAW,CAAA,WAAA,GAA2B,EAAE,CAAC;QACzC,IAAmB,CAAA,mBAAA,GAAG,mBAAmB,CAAC;AAY3C,KAAA;IAVC,WAAW,GAAA;QACT,IAAI,CAAC,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAA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,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAnElB,gBAAgB,EA6DzB,qBAAqB;AACrB,QAAA,sBAAsB,CAGd,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,CAjE5D,EAAA,OAAA,EAAA,CAAA,gBAAgB,EAgEC,qBAAqB,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;AAG9D,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAFnB,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;2FAE5D,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAT9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,gBAAgB;wBAChB,qBAAqB;wBACrB,sBAAsB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;oBAC1E,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,YAAY,EAAE,YAAY,CAAC;AACzE,iBAAA,CAAA;;;AC9HD;;AAEG;;;;"}
|
@@ -1,169 +0,0 @@
|
|
1
|
-
import * as i0 from '@angular/core';
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, forwardRef, NgModule } from '@angular/core';
|
3
|
-
import * as i1 from 'ngx-color';
|
4
|
-
import { ColorWrap, isValidHex, SwatchModule } from 'ngx-color';
|
5
|
-
import * as i1$1 from '@angular/common';
|
6
|
-
import { CommonModule } from '@angular/common';
|
7
|
-
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
8
|
-
|
9
|
-
class GithubSwatchComponent {
|
10
|
-
constructor() {
|
11
|
-
this.onClick = new EventEmitter();
|
12
|
-
this.onSwatchHover = new EventEmitter();
|
13
|
-
this.focusStyle = {
|
14
|
-
position: 'relative',
|
15
|
-
'z-index': '2',
|
16
|
-
outline: '2px solid #fff',
|
17
|
-
'box-shadow': '0 0 5px 2px rgba(0,0,0,0.25)',
|
18
|
-
};
|
19
|
-
}
|
20
|
-
handleClick({ hex, $event }) {
|
21
|
-
this.onClick.emit({ hex, $event });
|
22
|
-
}
|
23
|
-
}
|
24
|
-
GithubSwatchComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GithubSwatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
25
|
-
GithubSwatchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: GithubSwatchComponent, selector: "color-github-swatch", inputs: { color: "color" }, outputs: { onClick: "onClick", onSwatchHover: "onSwatchHover" }, ngImport: i0, template: `
|
26
|
-
<div class="github-swatch">
|
27
|
-
<color-swatch
|
28
|
-
[color]="color"
|
29
|
-
[focusStyle]="focusStyle"
|
30
|
-
(onClick)="handleClick($event)"
|
31
|
-
(onHover)="onSwatchHover.emit($event)"
|
32
|
-
class="swatch"
|
33
|
-
></color-swatch>
|
34
|
-
<div class="clear"></div>
|
35
|
-
</div>
|
36
|
-
`, isInline: true, styles: [".github-swatch{width:25px;height:25px;font-size:0}\n"], dependencies: [{ kind: "component", type: i1.SwatchComponent, selector: "color-swatch", inputs: ["color", "style", "focusStyle", "focus"], outputs: ["onClick", "onHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GithubSwatchComponent, decorators: [{
|
38
|
-
type: Component,
|
39
|
-
args: [{ selector: 'color-github-swatch', template: `
|
40
|
-
<div class="github-swatch">
|
41
|
-
<color-swatch
|
42
|
-
[color]="color"
|
43
|
-
[focusStyle]="focusStyle"
|
44
|
-
(onClick)="handleClick($event)"
|
45
|
-
(onHover)="onSwatchHover.emit($event)"
|
46
|
-
class="swatch"
|
47
|
-
></color-swatch>
|
48
|
-
<div class="clear"></div>
|
49
|
-
</div>
|
50
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".github-swatch{width:25px;height:25px;font-size:0}\n"] }]
|
51
|
-
}], propDecorators: { color: [{
|
52
|
-
type: Input
|
53
|
-
}], onClick: [{
|
54
|
-
type: Output
|
55
|
-
}], onSwatchHover: [{
|
56
|
-
type: Output
|
57
|
-
}] } });
|
58
|
-
|
59
|
-
class GithubComponent extends ColorWrap {
|
60
|
-
constructor() {
|
61
|
-
super();
|
62
|
-
/** Pixel value for picker width */
|
63
|
-
this.width = 212;
|
64
|
-
/** Color squares to display */
|
65
|
-
this.colors = [
|
66
|
-
'#B80000',
|
67
|
-
'#DB3E00',
|
68
|
-
'#FCCB00',
|
69
|
-
'#008B02',
|
70
|
-
'#006B76',
|
71
|
-
'#1273DE',
|
72
|
-
'#004DCF',
|
73
|
-
'#5300EB',
|
74
|
-
'#EB9694',
|
75
|
-
'#FAD0C3',
|
76
|
-
'#FEF3BD',
|
77
|
-
'#C1E1C5',
|
78
|
-
'#BEDADC',
|
79
|
-
'#C4DEF6',
|
80
|
-
'#BED3F3',
|
81
|
-
'#D4C4FB',
|
82
|
-
];
|
83
|
-
this.triangle = 'top-left';
|
84
|
-
}
|
85
|
-
handleBlockChange({ hex, $event }) {
|
86
|
-
if (isValidHex(hex)) {
|
87
|
-
this.handleChange({ hex, source: 'hex' }, $event);
|
88
|
-
}
|
89
|
-
}
|
90
|
-
handleValueChange({ data, $event }) {
|
91
|
-
this.handleChange(data, $event);
|
92
|
-
}
|
93
|
-
}
|
94
|
-
GithubComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GithubComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
95
|
-
GithubComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: GithubComponent, selector: "color-github", inputs: { width: "width", colors: "colors", triangle: "triangle" }, providers: [
|
96
|
-
{
|
97
|
-
provide: NG_VALUE_ACCESSOR,
|
98
|
-
useExisting: forwardRef(() => GithubComponent),
|
99
|
-
multi: true,
|
100
|
-
},
|
101
|
-
{
|
102
|
-
provide: ColorWrap,
|
103
|
-
useExisting: forwardRef(() => GithubComponent),
|
104
|
-
},
|
105
|
-
], usesInheritance: true, ngImport: i0, template: `
|
106
|
-
<div class="github-picker {{ triangle }}-triangle {{ className }}"
|
107
|
-
[style.width.px]="width"
|
108
|
-
>
|
109
|
-
<div class="triangleShadow"></div>
|
110
|
-
<div class="triangle"></div>
|
111
|
-
<color-github-swatch *ngFor="let color of colors"
|
112
|
-
[color]="color"
|
113
|
-
(onClick)="handleBlockChange($event)"
|
114
|
-
(onSwatchHover)="onSwatchHover.emit($event)"
|
115
|
-
></color-github-swatch>
|
116
|
-
</div>
|
117
|
-
`, isInline: true, styles: [".github-picker{background:rgb(255,255,255);border:1px solid rgba(0,0,0,.2);box-shadow:#00000026 0 3px 12px;border-radius:4px;position:relative;padding:5px;display:flex;flex-wrap:wrap;box-sizing:border-box}.triangleShadow{position:absolute;border-width:8px;border-style:solid;border-color:transparent transparent rgba(0,0,0,.15);border-image:initial}.triangle{position:absolute;border-width:7px;border-style:solid;border-color:transparent transparent rgb(255,255,255);border-image:initial}.hide-triangle>.triangle{display:none}.hide-triangle>.triangleShadow{display:none}.top-left-triangle>.triangle{top:-14px;left:10px}.top-left-triangle>.triangleShadow{top:-16px;left:9px}.top-right-triangle>.triangle{top:-14px;right:10px}.top-right-triangle>.triangleShadow{top:-16px;right:9px}.bottom-right-triangle>.triangle{top:35px;right:10px;transform:rotate(180deg)}.bottom-right-triangle>.triangleShadow{top:37px;right:9px;transform:rotate(180deg)}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1$1.NgForOf; }), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i0.forwardRef(function () { return GithubSwatchComponent; }), selector: "color-github-swatch", inputs: ["color"], outputs: ["onClick", "onSwatchHover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: GithubComponent, decorators: [{
|
119
|
-
type: Component,
|
120
|
-
args: [{ selector: 'color-github', template: `
|
121
|
-
<div class="github-picker {{ triangle }}-triangle {{ className }}"
|
122
|
-
[style.width.px]="width"
|
123
|
-
>
|
124
|
-
<div class="triangleShadow"></div>
|
125
|
-
<div class="triangle"></div>
|
126
|
-
<color-github-swatch *ngFor="let color of colors"
|
127
|
-
[color]="color"
|
128
|
-
(onClick)="handleBlockChange($event)"
|
129
|
-
(onSwatchHover)="onSwatchHover.emit($event)"
|
130
|
-
></color-github-swatch>
|
131
|
-
</div>
|
132
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, providers: [
|
133
|
-
{
|
134
|
-
provide: NG_VALUE_ACCESSOR,
|
135
|
-
useExisting: forwardRef(() => GithubComponent),
|
136
|
-
multi: true,
|
137
|
-
},
|
138
|
-
{
|
139
|
-
provide: ColorWrap,
|
140
|
-
useExisting: forwardRef(() => GithubComponent),
|
141
|
-
},
|
142
|
-
], styles: [".github-picker{background:rgb(255,255,255);border:1px solid rgba(0,0,0,.2);box-shadow:#00000026 0 3px 12px;border-radius:4px;position:relative;padding:5px;display:flex;flex-wrap:wrap;box-sizing:border-box}.triangleShadow{position:absolute;border-width:8px;border-style:solid;border-color:transparent transparent rgba(0,0,0,.15);border-image:initial}.triangle{position:absolute;border-width:7px;border-style:solid;border-color:transparent transparent rgb(255,255,255);border-image:initial}.hide-triangle>.triangle{display:none}.hide-triangle>.triangleShadow{display:none}.top-left-triangle>.triangle{top:-14px;left:10px}.top-left-triangle>.triangleShadow{top:-16px;left:9px}.top-right-triangle>.triangle{top:-14px;right:10px}.top-right-triangle>.triangleShadow{top:-16px;right:9px}.bottom-right-triangle>.triangle{top:35px;right:10px;transform:rotate(180deg)}.bottom-right-triangle>.triangleShadow{top:37px;right:9px;transform:rotate(180deg)}\n"] }]
|
143
|
-
}], ctorParameters: function () { return []; }, propDecorators: { width: [{
|
144
|
-
type: Input
|
145
|
-
}], colors: [{
|
146
|
-
type: Input
|
147
|
-
}], triangle: [{
|
148
|
-
type: Input
|
149
|
-
}] } });
|
150
|
-
class ColorGithubModule {
|
151
|
-
}
|
152
|
-
ColorGithubModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorGithubModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
153
|
-
ColorGithubModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorGithubModule, declarations: [GithubComponent, GithubSwatchComponent], imports: [CommonModule, SwatchModule], exports: [GithubComponent, GithubSwatchComponent] });
|
154
|
-
ColorGithubModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorGithubModule, imports: [CommonModule, SwatchModule] });
|
155
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorGithubModule, decorators: [{
|
156
|
-
type: NgModule,
|
157
|
-
args: [{
|
158
|
-
declarations: [GithubComponent, GithubSwatchComponent],
|
159
|
-
exports: [GithubComponent, GithubSwatchComponent],
|
160
|
-
imports: [CommonModule, SwatchModule],
|
161
|
-
}]
|
162
|
-
}] });
|
163
|
-
|
164
|
-
/**
|
165
|
-
* Generated bundle index. Do not edit.
|
166
|
-
*/
|
167
|
-
|
168
|
-
export { ColorGithubModule, GithubComponent, GithubSwatchComponent };
|
169
|
-
//# sourceMappingURL=ngx-color-github.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ngx-color-hue.mjs","sources":["../../src/lib/hue/hue-picker.component.ts","../../src/lib/hue/ngx-color-hue.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, forwardRef, Input, NgModule, OnChanges } from '@angular/core';\n\nimport { ColorWrap, HueModule, toState } from 'ngx-color';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\n@Component({\n selector: 'color-hue-picker',\n template: `\n <div class=\"hue-picker {{ className }}\"\n [style.width.px]=\"width\" [style.height.px]=\"height\"\n >\n <color-hue [hsl]=\"hsl\" [pointer]=\"pointer\"\n [direction]=\"direction\" [radius]=\"radius\"\n (onChange)=\"handlePickerChange($event)\"\n ></color-hue>\n </div>\n `,\n styles: [\n `\n .hue-picker {\n position: relative;\n }\n `,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n preserveWhitespaces: false,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => HuePickerComponent),\n multi: true,\n },\n {\n provide: ColorWrap,\n useExisting: forwardRef(() => HuePickerComponent),\n },\n ]\n})\nexport class HuePickerComponent extends ColorWrap implements OnChanges {\n /** Pixel value for picker width */\n @Input() width: string | number = 316;\n /** Pixel value for picker height */\n @Input() height: string | number = 16;\n @Input() radius = 2;\n @Input() direction: 'horizontal' | 'vertical' = 'horizontal';\n pointer: {[key: string]: string} = {\n width: '18px',\n height: '18px',\n borderRadius: '50%',\n transform: 'translate(-9px, -2px)',\n backgroundColor: 'rgb(248, 248, 248)',\n boxShadow: '0 1px 4px 0 rgba(0, 0, 0, 0.37)',\n };\n\n constructor() {\n super();\n }\n\n ngOnChanges() {\n if (this.direction === 'vertical') {\n this.pointer.transform = 'translate(-3px, -9px)';\n }\n this.setState(toState(this.color, this.oldHue));\n }\n handlePickerChange({ data, $event }) {\n this.handleChange({ a: 1, h: data.h, l: 0.5, s: 1 }, $event);\n }\n}\n\n@NgModule({\n declarations: [HuePickerComponent],\n exports: [HuePickerComponent],\n imports: [CommonModule, HueModule],\n})\nexport class ColorHueModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAuCM,MAAO,kBAAmB,SAAQ,SAAS,CAAA;AAgB/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE,CAAC;;QAfD,IAAK,CAAA,KAAA,GAAoB,GAAG,CAAC;;QAE7B,IAAM,CAAA,MAAA,GAAoB,EAAE,CAAC;QAC7B,IAAM,CAAA,MAAA,GAAG,CAAC,CAAC;QACX,IAAS,CAAA,SAAA,GAA8B,YAAY,CAAC;AAC7D,QAAA,IAAA,CAAA,OAAO,GAA4B;AACjC,YAAA,KAAK,EAAE,MAAM;AACb,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,SAAS,EAAE,uBAAuB;AAClC,YAAA,eAAe,EAAE,oBAAoB;AACrC,YAAA,SAAS,EAAE,iCAAiC;SAC7C,CAAC;KAID;IAED,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,SAAS,KAAK,UAAU,EAAE;AACjC,YAAA,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,uBAAuB,CAAC;AAClD,SAAA;AACD,QAAA,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;KACjD;AACD,IAAA,kBAAkB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAA;QACjC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;KA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