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
@@ -1,7 +1,7 @@
|
|
1
1
|
import * as i1 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, ChangeDetectionStrategy, Input, NgModule, Directive, Output, HostListener, EventEmitter, isDevMode, forwardRef } from '@angular/core';
|
4
|
+
import { Component, ChangeDetectionStrategy, Input, NgModule, inject, ElementRef, Directive, Output, HostListener, EventEmitter, isDevMode, forwardRef } from '@angular/core';
|
5
5
|
import { Subject, Subscription, fromEvent } from 'rxjs';
|
6
6
|
import { distinctUntilChanged, debounceTime, tap } from 'rxjs/operators';
|
7
7
|
import { TinyColor } from '@ctrl/tinycolor';
|
@@ -41,11 +41,12 @@ function getCheckerboard(c1, c2, size) {
|
|
41
41
|
}
|
42
42
|
|
43
43
|
class CheckboardComponent {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
44
|
+
white = 'transparent';
|
45
|
+
size = 8;
|
46
|
+
grey = 'rgba(0,0,0,.08)';
|
47
|
+
boxShadow;
|
48
|
+
borderRadius;
|
49
|
+
gridStyles;
|
49
50
|
ngOnInit() {
|
50
51
|
const background = getCheckerboard(this.white, this.grey, this.size);
|
51
52
|
this.gridStyles = {
|
@@ -54,12 +55,12 @@ class CheckboardComponent {
|
|
54
55
|
background: `url(${background}) center left`,
|
55
56
|
};
|
56
57
|
}
|
58
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CheckboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: CheckboardComponent, isStandalone: false, selector: "color-checkboard", inputs: { white: "white", size: "size", grey: "grey", boxShadow: "boxShadow", borderRadius: "borderRadius" }, ngImport: i0, template: `<div class="grid" [ngStyle]="gridStyles"></div>`, isInline: true, styles: [".grid{inset:0;position:absolute}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
57
60
|
}
|
58
|
-
|
59
|
-
CheckboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: CheckboardComponent, selector: "color-checkboard", inputs: { white: "white", size: "size", grey: "grey", boxShadow: "boxShadow", borderRadius: "borderRadius" }, ngImport: i0, template: `<div class="grid" [ngStyle]="gridStyles"></div>`, isInline: true, styles: [".grid{top:0px;right:0px;bottom:0px;left:0px;position:absolute}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
60
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CheckboardComponent, decorators: [{
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CheckboardComponent, decorators: [{
|
61
62
|
type: Component,
|
62
|
-
args: [{ selector: 'color-checkboard', template: `<div class="grid" [ngStyle]="gridStyles"></div>`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".grid{
|
63
|
+
args: [{ selector: 'color-checkboard', template: `<div class="grid" [ngStyle]="gridStyles"></div>`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".grid{inset:0;position:absolute}\n"] }]
|
63
64
|
}], propDecorators: { white: [{
|
64
65
|
type: Input
|
65
66
|
}], size: [{
|
@@ -72,11 +73,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
72
73
|
type: Input
|
73
74
|
}] } });
|
74
75
|
class CheckboardModule {
|
76
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CheckboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
77
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: CheckboardModule, declarations: [CheckboardComponent], imports: [CommonModule], exports: [CheckboardComponent] });
|
78
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CheckboardModule, imports: [CommonModule] });
|
75
79
|
}
|
76
|
-
|
77
|
-
CheckboardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: CheckboardModule, declarations: [CheckboardComponent], imports: [CommonModule], exports: [CheckboardComponent] });
|
78
|
-
CheckboardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CheckboardModule, imports: [CommonModule] });
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CheckboardModule, decorators: [{
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CheckboardModule, decorators: [{
|
80
81
|
type: NgModule,
|
81
82
|
args: [{
|
82
83
|
declarations: [CheckboardComponent],
|
@@ -86,12 +87,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
86
87
|
}] });
|
87
88
|
|
88
89
|
class CoordinatesDirective {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
}
|
90
|
+
el = inject(ElementRef);
|
91
|
+
coordinatesChange = new Subject();
|
92
|
+
mousechange = new Subject();
|
93
|
+
mouseListening = false;
|
94
|
+
sub;
|
95
95
|
mousemove($event, x, y, isTouch = false) {
|
96
96
|
if (this.mouseListening) {
|
97
97
|
$event.preventDefault();
|
@@ -119,8 +119,7 @@ class CoordinatesDirective {
|
|
119
119
|
handleChange(x, y, $event, isTouch) {
|
120
120
|
const containerWidth = this.el.nativeElement.clientWidth;
|
121
121
|
const containerHeight = this.el.nativeElement.clientHeight;
|
122
|
-
const left = x -
|
123
|
-
(this.el.nativeElement.getBoundingClientRect().left + window.pageXOffset);
|
122
|
+
const left = x - (this.el.nativeElement.getBoundingClientRect().left + window.pageXOffset);
|
124
123
|
let top = y - this.el.nativeElement.getBoundingClientRect().top;
|
125
124
|
if (!isTouch) {
|
126
125
|
top = top - window.pageYOffset;
|
@@ -135,13 +134,16 @@ class CoordinatesDirective {
|
|
135
134
|
$event,
|
136
135
|
});
|
137
136
|
}
|
137
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
138
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: CoordinatesDirective, isStandalone: false, selector: "[ngx-color-coordinates]", outputs: { coordinatesChange: "coordinatesChange" }, host: { listeners: { "window:mousemove": "mousemove($event,$event.pageX,$event.pageY)", "window:touchmove": "mousemove($event,$event.touches[0].clientX,$event.touches[0].clientY,true)", "window:mouseup": "mouseup()", "window:touchend": "mouseup()", "mousedown": "mousedown($event,$event.pageX,$event.pageY)", "touchstart": "mousedown($event,$event.touches[0].clientX,$event.touches[0].clientY,true)" } }, ngImport: i0 });
|
138
139
|
}
|
139
|
-
|
140
|
-
CoordinatesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.2", type: CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: { coordinatesChange: "coordinatesChange" }, host: { listeners: { "window:mousemove": "mousemove($event,$event.pageX,$event.pageY)", "window:touchmove": "mousemove($event,$event.touches[0].clientX,$event.touches[0].clientY,true)", "window:mouseup": "mouseup()", "window:touchend": "mouseup()", "mousedown": "mousedown($event,$event.pageX,$event.pageY)", "touchstart": "mousedown($event,$event.touches[0].clientX,$event.touches[0].clientY,true)" } }, ngImport: i0 });
|
141
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CoordinatesDirective, decorators: [{
|
140
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesDirective, decorators: [{
|
142
141
|
type: Directive,
|
143
|
-
args: [{
|
144
|
-
|
142
|
+
args: [{
|
143
|
+
selector: '[ngx-color-coordinates]',
|
144
|
+
standalone: false,
|
145
|
+
}]
|
146
|
+
}], propDecorators: { coordinatesChange: [{
|
145
147
|
type: Output
|
146
148
|
}], mousemove: [{
|
147
149
|
type: HostListener,
|
@@ -173,11 +175,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
173
175
|
]]
|
174
176
|
}] } });
|
175
177
|
class CoordinatesModule {
|
178
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
179
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesModule, declarations: [CoordinatesDirective], exports: [CoordinatesDirective] });
|
180
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesModule });
|
176
181
|
}
|
177
|
-
|
178
|
-
CoordinatesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: CoordinatesModule, declarations: [CoordinatesDirective], exports: [CoordinatesDirective] });
|
179
|
-
CoordinatesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CoordinatesModule });
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: CoordinatesModule, decorators: [{
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CoordinatesModule, decorators: [{
|
181
183
|
type: NgModule,
|
182
184
|
args: [{
|
183
185
|
declarations: [CoordinatesDirective],
|
@@ -186,10 +188,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
186
188
|
}] });
|
187
189
|
|
188
190
|
class AlphaComponent {
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
191
|
+
hsl;
|
192
|
+
rgb;
|
193
|
+
pointer;
|
194
|
+
shadow;
|
195
|
+
radius;
|
196
|
+
direction = 'horizontal';
|
197
|
+
onChange = new EventEmitter();
|
198
|
+
gradient;
|
199
|
+
pointerLeft;
|
200
|
+
pointerTop;
|
193
201
|
ngOnChanges() {
|
194
202
|
if (this.direction === 'vertical') {
|
195
203
|
this.pointerLeft = 0;
|
@@ -218,7 +226,7 @@ class AlphaComponent {
|
|
218
226
|
a = 1;
|
219
227
|
}
|
220
228
|
else {
|
221
|
-
a = Math.round(top * 100 / containerHeight) / 100;
|
229
|
+
a = Math.round((top * 100) / containerHeight) / 100;
|
222
230
|
}
|
223
231
|
if (this.hsl.a !== a) {
|
224
232
|
data = {
|
@@ -239,7 +247,7 @@ class AlphaComponent {
|
|
239
247
|
a = 1;
|
240
248
|
}
|
241
249
|
else {
|
242
|
-
a = Math.round(left * 100 / containerWidth) / 100;
|
250
|
+
a = Math.round((left * 100) / containerWidth) / 100;
|
243
251
|
}
|
244
252
|
if (this.hsl.a !== a) {
|
245
253
|
data = {
|
@@ -256,36 +264,54 @@ class AlphaComponent {
|
|
256
264
|
}
|
257
265
|
this.onChange.emit({ data, $event });
|
258
266
|
}
|
259
|
-
}
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
267
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: AlphaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
268
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: AlphaComponent, isStandalone: false, selector: "color-alpha", inputs: { hsl: "hsl", rgb: "rgb", pointer: "pointer", shadow: "shadow", radius: "radius", direction: "direction" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
269
|
+
<div class="alpha" [style.border-radius]="radius">
|
270
|
+
<div class="alpha-checkboard">
|
271
|
+
<color-checkboard></color-checkboard>
|
272
|
+
</div>
|
273
|
+
<div
|
274
|
+
class="alpha-gradient"
|
275
|
+
[ngStyle]="gradient"
|
276
|
+
[style.box-shadow]="shadow"
|
277
|
+
[style.border-radius]="radius"
|
278
|
+
></div>
|
279
|
+
<div
|
280
|
+
ngx-color-coordinates
|
281
|
+
(coordinatesChange)="handleChange($event)"
|
282
|
+
class="alpha-container color-alpha-{{ direction }}"
|
283
|
+
>
|
284
|
+
<div class="alpha-pointer" [style.left.%]="pointerLeft" [style.top.%]="pointerTop">
|
285
|
+
<div class="alpha-slider" [ngStyle]="pointer"></div>
|
286
|
+
</div>
|
270
287
|
</div>
|
271
288
|
</div>
|
272
|
-
|
273
|
-
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
289
|
+
`, isInline: true, styles: [".alpha{position:absolute;inset:0}.alpha-checkboard{position:absolute;inset:0;overflow:hidden}.alpha-gradient{position:absolute;inset:0}.alpha-container{position:relative;height:100%;margin:0 3px}.alpha-pointer{position:absolute}.alpha-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CheckboardComponent, selector: "color-checkboard", inputs: ["white", "size", "grey", "boxShadow", "borderRadius"] }, { kind: "directive", type: CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: ["coordinatesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
290
|
+
}
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: AlphaComponent, decorators: [{
|
275
292
|
type: Component,
|
276
293
|
args: [{ selector: 'color-alpha', template: `
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
294
|
+
<div class="alpha" [style.border-radius]="radius">
|
295
|
+
<div class="alpha-checkboard">
|
296
|
+
<color-checkboard></color-checkboard>
|
297
|
+
</div>
|
298
|
+
<div
|
299
|
+
class="alpha-gradient"
|
300
|
+
[ngStyle]="gradient"
|
301
|
+
[style.box-shadow]="shadow"
|
302
|
+
[style.border-radius]="radius"
|
303
|
+
></div>
|
304
|
+
<div
|
305
|
+
ngx-color-coordinates
|
306
|
+
(coordinatesChange)="handleChange($event)"
|
307
|
+
class="alpha-container color-alpha-{{ direction }}"
|
308
|
+
>
|
309
|
+
<div class="alpha-pointer" [style.left.%]="pointerLeft" [style.top.%]="pointerTop">
|
310
|
+
<div class="alpha-slider" [ngStyle]="pointer"></div>
|
311
|
+
</div>
|
285
312
|
</div>
|
286
313
|
</div>
|
287
|
-
|
288
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".alpha{position:absolute;top:0;bottom:0;left:0;right:0}.alpha-checkboard{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.alpha-gradient{position:absolute;top:0;bottom:0;left:0;right:0}.alpha-container{position:relative;height:100%;margin:0 3px}.alpha-pointer{position:absolute}.alpha-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"] }]
|
314
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, standalone: false, styles: [".alpha{position:absolute;inset:0}.alpha-checkboard{position:absolute;inset:0;overflow:hidden}.alpha-gradient{position:absolute;inset:0}.alpha-container{position:relative;height:100%;margin:0 3px}.alpha-pointer{position:absolute}.alpha-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"] }]
|
289
315
|
}], propDecorators: { hsl: [{
|
290
316
|
type: Input
|
291
317
|
}], rgb: [{
|
@@ -302,11 +328,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
302
328
|
type: Output
|
303
329
|
}] } });
|
304
330
|
class AlphaModule {
|
331
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: AlphaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
332
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: AlphaModule, declarations: [AlphaComponent], imports: [CommonModule, CheckboardModule, CoordinatesModule], exports: [AlphaComponent] });
|
333
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: AlphaModule, imports: [CommonModule, CheckboardModule, CoordinatesModule] });
|
305
334
|
}
|
306
|
-
|
307
|
-
AlphaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, declarations: [AlphaComponent], imports: [CommonModule, CheckboardModule, CoordinatesModule], exports: [AlphaComponent] });
|
308
|
-
AlphaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, imports: [CommonModule, CheckboardModule, CoordinatesModule] });
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: AlphaModule, decorators: [{
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: AlphaModule, decorators: [{
|
310
336
|
type: NgModule,
|
311
337
|
args: [{
|
312
338
|
declarations: [AlphaComponent],
|
@@ -382,24 +408,32 @@ var ColorMode;
|
|
382
408
|
ColorMode["RGB"] = "rgb";
|
383
409
|
})(ColorMode || (ColorMode = {}));
|
384
410
|
class ColorWrap {
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
411
|
+
className;
|
412
|
+
/**
|
413
|
+
* Descriptors the return color format if the component is used with two-way binding
|
414
|
+
*/
|
415
|
+
mode = ColorMode.HEX;
|
416
|
+
color = {
|
417
|
+
h: 250,
|
418
|
+
s: 0.5,
|
419
|
+
l: 0.2,
|
420
|
+
a: 1,
|
421
|
+
};
|
422
|
+
colorChange = new EventEmitter();
|
423
|
+
onChange = new EventEmitter();
|
424
|
+
onChangeComplete = new EventEmitter();
|
425
|
+
onSwatchHover = new EventEmitter();
|
426
|
+
oldHue;
|
427
|
+
hsl;
|
428
|
+
hsv;
|
429
|
+
rgb;
|
430
|
+
hex;
|
431
|
+
source;
|
432
|
+
currentColor;
|
433
|
+
changes;
|
434
|
+
disableAlpha;
|
435
|
+
_onChangeCompleteSubscription = new Subscription();
|
436
|
+
_onSwatchHoverSubscription = new Subscription();
|
403
437
|
ngOnInit() {
|
404
438
|
this.changes = this.onChange
|
405
439
|
.pipe(debounceTime(100), tap(event => {
|
@@ -478,16 +512,16 @@ class ColorWrap {
|
|
478
512
|
writeValue(hex) {
|
479
513
|
this.color = hex;
|
480
514
|
}
|
515
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorWrap, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
516
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: ColorWrap, isStandalone: false, selector: "color-wrap", inputs: { className: "className", mode: "mode", color: "color" }, outputs: { colorChange: "colorChange", onChange: "onChange", onChangeComplete: "onChangeComplete", onSwatchHover: "onSwatchHover" }, providers: [
|
517
|
+
{
|
518
|
+
provide: NG_VALUE_ACCESSOR,
|
519
|
+
useExisting: forwardRef(() => ColorWrap),
|
520
|
+
multi: true,
|
521
|
+
},
|
522
|
+
], usesOnChanges: true, ngImport: i0, template: ``, isInline: true });
|
481
523
|
}
|
482
|
-
|
483
|
-
ColorWrap.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ColorWrap, selector: "color-wrap", inputs: { className: "className", mode: "mode", color: "color" }, outputs: { colorChange: "colorChange", onChange: "onChange", onChangeComplete: "onChangeComplete", onSwatchHover: "onSwatchHover" }, providers: [
|
484
|
-
{
|
485
|
-
provide: NG_VALUE_ACCESSOR,
|
486
|
-
useExisting: forwardRef(() => ColorWrap),
|
487
|
-
multi: true,
|
488
|
-
}
|
489
|
-
], usesOnChanges: true, ngImport: i0, template: ``, isInline: true });
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorWrap, decorators: [{
|
524
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorWrap, decorators: [{
|
491
525
|
type: Component,
|
492
526
|
args: [{
|
493
527
|
// create seletor base for test override property
|
@@ -498,8 +532,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
498
532
|
provide: NG_VALUE_ACCESSOR,
|
499
533
|
useExisting: forwardRef(() => ColorWrap),
|
500
534
|
multi: true,
|
501
|
-
}
|
502
|
-
]
|
535
|
+
},
|
536
|
+
],
|
537
|
+
standalone: false,
|
503
538
|
}]
|
504
539
|
}], propDecorators: { className: [{
|
505
540
|
type: Input
|
@@ -517,11 +552,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
517
552
|
type: Output
|
518
553
|
}] } });
|
519
554
|
class ColorWrapModule {
|
555
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorWrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
556
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: ColorWrapModule, declarations: [ColorWrap], imports: [CommonModule], exports: [ColorWrap] });
|
557
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorWrapModule, imports: [CommonModule] });
|
520
558
|
}
|
521
|
-
|
522
|
-
ColorWrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ColorWrapModule, declarations: [ColorWrap], imports: [CommonModule], exports: [ColorWrap] });
|
523
|
-
ColorWrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorWrapModule, imports: [CommonModule] });
|
524
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ColorWrapModule, decorators: [{
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ColorWrapModule, decorators: [{
|
525
560
|
type: NgModule,
|
526
561
|
args: [{
|
527
562
|
declarations: [ColorWrap],
|
@@ -532,12 +567,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
532
567
|
|
533
568
|
let nextUniqueId = 0;
|
534
569
|
class EditableInputComponent {
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
570
|
+
style;
|
571
|
+
label;
|
572
|
+
value;
|
573
|
+
arrowOffset;
|
574
|
+
dragLabel;
|
575
|
+
dragMax;
|
576
|
+
placeholder = '';
|
577
|
+
onChange = new EventEmitter();
|
578
|
+
currentValue;
|
579
|
+
blurValue;
|
580
|
+
wrapStyle;
|
581
|
+
inputStyle;
|
582
|
+
labelStyle;
|
583
|
+
focus = false;
|
584
|
+
mousemove;
|
585
|
+
mouseup;
|
586
|
+
uniqueId = `editableInput-${++nextUniqueId}`;
|
541
587
|
ngOnInit() {
|
542
588
|
this.wrapStyle = this.style && this.style.wrap ? this.style.wrap : {};
|
543
589
|
this.inputStyle = this.style && this.style.input ? this.style.input : {};
|
@@ -653,9 +699,8 @@ class EditableInputComponent {
|
|
653
699
|
}
|
654
700
|
}
|
655
701
|
}
|
656
|
-
}
|
657
|
-
|
658
|
-
EditableInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: EditableInputComponent, selector: "color-editable-input", inputs: { style: "style", label: "label", value: "value", arrowOffset: "arrowOffset", dragLabel: "dragLabel", dragMax: "dragMax", placeholder: "placeholder" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
702
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EditableInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
703
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: EditableInputComponent, isStandalone: false, selector: "color-editable-input", inputs: { style: "style", label: "label", value: "value", arrowOffset: "arrowOffset", dragLabel: "dragLabel", dragMax: "dragMax", placeholder: "placeholder" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
659
704
|
<div class="wrap" [ngStyle]="wrapStyle">
|
660
705
|
<input
|
661
706
|
[ngStyle]="inputStyle"
|
@@ -668,12 +713,15 @@ EditableInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
668
713
|
(focusout)="handleFocusOut($event)"
|
669
714
|
[attr.aria-labelledby]="uniqueId"
|
670
715
|
/>
|
671
|
-
|
672
|
-
|
673
|
-
|
716
|
+
@if (label) {
|
717
|
+
<span [id]="uniqueId" [ngStyle]="labelStyle" (mousedown)="handleMousedown($event)">
|
718
|
+
{{ label }}
|
719
|
+
</span>
|
720
|
+
}
|
674
721
|
</div>
|
675
|
-
`, isInline: true, styles: [":host{display:flex}.wrap{position:relative}\n"], dependencies: [{ kind: "directive", type: i1.
|
676
|
-
|
722
|
+
`, isInline: true, styles: [":host{display:flex}.wrap{position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
723
|
+
}
|
724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EditableInputComponent, decorators: [{
|
677
725
|
type: Component,
|
678
726
|
args: [{ selector: 'color-editable-input', template: `
|
679
727
|
<div class="wrap" [ngStyle]="wrapStyle">
|
@@ -688,11 +736,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
688
736
|
(focusout)="handleFocusOut($event)"
|
689
737
|
[attr.aria-labelledby]="uniqueId"
|
690
738
|
/>
|
691
|
-
|
692
|
-
|
693
|
-
|
739
|
+
@if (label) {
|
740
|
+
<span [id]="uniqueId" [ngStyle]="labelStyle" (mousedown)="handleMousedown($event)">
|
741
|
+
{{ label }}
|
742
|
+
</span>
|
743
|
+
}
|
694
744
|
</div>
|
695
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex}.wrap{position:relative}\n"] }]
|
745
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [":host{display:flex}.wrap{position:relative}\n"] }]
|
696
746
|
}], propDecorators: { style: [{
|
697
747
|
type: Input
|
698
748
|
}], label: [{
|
@@ -711,11 +761,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
711
761
|
type: Output
|
712
762
|
}] } });
|
713
763
|
class EditableInputModule {
|
764
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EditableInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
765
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: EditableInputModule, declarations: [EditableInputComponent], imports: [CommonModule], exports: [EditableInputComponent] });
|
766
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EditableInputModule, imports: [CommonModule] });
|
714
767
|
}
|
715
|
-
|
716
|
-
EditableInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: EditableInputModule, declarations: [EditableInputComponent], imports: [CommonModule], exports: [EditableInputComponent] });
|
717
|
-
EditableInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: EditableInputModule, imports: [CommonModule] });
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: EditableInputModule, decorators: [{
|
768
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EditableInputModule, decorators: [{
|
719
769
|
type: NgModule,
|
720
770
|
args: [{
|
721
771
|
declarations: [EditableInputComponent],
|
@@ -725,19 +775,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
725
775
|
}] });
|
726
776
|
|
727
777
|
class HueComponent {
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
778
|
+
hsl;
|
779
|
+
pointer;
|
780
|
+
radius;
|
781
|
+
shadow;
|
782
|
+
hidePointer = false;
|
783
|
+
direction = 'horizontal';
|
784
|
+
onChange = new EventEmitter();
|
785
|
+
left = '0px';
|
786
|
+
top = '';
|
735
787
|
ngOnChanges() {
|
736
788
|
if (this.direction === 'horizontal') {
|
737
|
-
this.left = `${this.hsl.h * 100 / 360}%`;
|
789
|
+
this.left = `${(this.hsl.h * 100) / 360}%`;
|
738
790
|
}
|
739
791
|
else {
|
740
|
-
this.top = `${-(this.hsl.h * 100 / 360) + 100}%`;
|
792
|
+
this.top = `${-((this.hsl.h * 100) / 360) + 100}%`;
|
741
793
|
}
|
742
794
|
}
|
743
795
|
handleChange({ top, left, containerHeight, containerWidth, $event }) {
|
@@ -751,8 +803,8 @@ class HueComponent {
|
|
751
803
|
h = 0;
|
752
804
|
}
|
753
805
|
else {
|
754
|
-
const percent = -(top * 100 / containerHeight) + 100;
|
755
|
-
h = 360 * percent / 100;
|
806
|
+
const percent = -((top * 100) / containerHeight) + 100;
|
807
|
+
h = (360 * percent) / 100;
|
756
808
|
}
|
757
809
|
if (this.hsl.h !== h) {
|
758
810
|
data = {
|
@@ -773,8 +825,8 @@ class HueComponent {
|
|
773
825
|
h = 359;
|
774
826
|
}
|
775
827
|
else {
|
776
|
-
const percent = left * 100 / containerWidth;
|
777
|
-
h = 360 * percent / 100;
|
828
|
+
const percent = (left * 100) / containerWidth;
|
829
|
+
h = (360 * percent) / 100;
|
778
830
|
}
|
779
831
|
if (this.hsl.h !== h) {
|
780
832
|
data = {
|
@@ -791,28 +843,48 @@ class HueComponent {
|
|
791
843
|
}
|
792
844
|
this.onChange.emit({ data, $event });
|
793
845
|
}
|
794
|
-
}
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
846
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
847
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: HueComponent, isStandalone: false, selector: "color-hue", inputs: { hsl: "hsl", pointer: "pointer", radius: "radius", shadow: "shadow", hidePointer: "hidePointer", direction: "direction" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
848
|
+
<div
|
849
|
+
class="color-hue color-hue-{{ direction }}"
|
850
|
+
[style.border-radius.px]="radius"
|
851
|
+
[style.box-shadow]="shadow"
|
852
|
+
>
|
853
|
+
<div
|
854
|
+
ngx-color-coordinates
|
855
|
+
(coordinatesChange)="handleChange($event)"
|
856
|
+
class="color-hue-container"
|
857
|
+
>
|
858
|
+
@if (!hidePointer) {
|
859
|
+
<div class="color-hue-pointer" [style.left]="left" [style.top]="top">
|
860
|
+
<div class="color-hue-slider" [ngStyle]="pointer"></div>
|
861
|
+
</div>
|
862
|
+
}
|
801
863
|
</div>
|
802
864
|
</div>
|
803
|
-
|
804
|
-
|
805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
865
|
+
`, isInline: true, styles: [".color-hue{position:absolute;inset:0}.color-hue-container{margin:0 2px;position:relative;height:100%}.color-hue-pointer{position:absolute}.color-hue-slider{margin-top:1px;width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;transform:translate(-2px)}.color-hue-horizontal{background:linear-gradient(to right,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.color-hue-vertical{background:linear-gradient(to top,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: ["coordinatesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
866
|
+
}
|
867
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HueComponent, decorators: [{
|
806
868
|
type: Component,
|
807
869
|
args: [{ selector: 'color-hue', template: `
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
870
|
+
<div
|
871
|
+
class="color-hue color-hue-{{ direction }}"
|
872
|
+
[style.border-radius.px]="radius"
|
873
|
+
[style.box-shadow]="shadow"
|
874
|
+
>
|
875
|
+
<div
|
876
|
+
ngx-color-coordinates
|
877
|
+
(coordinatesChange)="handleChange($event)"
|
878
|
+
class="color-hue-container"
|
879
|
+
>
|
880
|
+
@if (!hidePointer) {
|
881
|
+
<div class="color-hue-pointer" [style.left]="left" [style.top]="top">
|
882
|
+
<div class="color-hue-slider" [ngStyle]="pointer"></div>
|
883
|
+
</div>
|
884
|
+
}
|
812
885
|
</div>
|
813
886
|
</div>
|
814
|
-
|
815
|
-
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".color-hue{position:absolute;top:0;bottom:0;left:0;right:0}.color-hue-container{margin:0 2px;position:relative;height:100%}.color-hue-pointer{position:absolute}.color-hue-slider{margin-top:1px;width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;transform:translate(-2px)}.color-hue-horizontal{background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)}.color-hue-vertical{background:linear-gradient(to top,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%)}\n"] }]
|
887
|
+
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".color-hue{position:absolute;inset:0}.color-hue-container{margin:0 2px;position:relative;height:100%}.color-hue-pointer{position:absolute}.color-hue-slider{margin-top:1px;width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;transform:translate(-2px)}.color-hue-horizontal{background:linear-gradient(to right,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}.color-hue-vertical{background:linear-gradient(to top,red,#ff0 17%,#0f0 33%,#0ff,#00f 67%,#f0f 83%,red)}\n"] }]
|
816
888
|
}], propDecorators: { hsl: [{
|
817
889
|
type: Input
|
818
890
|
}], pointer: [{
|
@@ -829,11 +901,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
829
901
|
type: Output
|
830
902
|
}] } });
|
831
903
|
class HueModule {
|
904
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HueModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
905
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: HueModule, declarations: [HueComponent], imports: [CommonModule, CoordinatesModule], exports: [HueComponent] });
|
906
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HueModule, imports: [CommonModule, CoordinatesModule] });
|
832
907
|
}
|
833
|
-
|
834
|
-
HueModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: HueModule, declarations: [HueComponent], imports: [CommonModule, CoordinatesModule], exports: [HueComponent] });
|
835
|
-
HueModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: HueModule, imports: [CommonModule, CoordinatesModule] });
|
836
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: HueModule, decorators: [{
|
908
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: HueModule, decorators: [{
|
837
909
|
type: NgModule,
|
838
910
|
args: [{
|
839
911
|
declarations: [HueComponent],
|
@@ -843,31 +915,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
843
915
|
}] });
|
844
916
|
|
845
917
|
class RaisedComponent {
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
}
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
<div class="raised-content">
|
857
|
-
<ng-content></ng-content>
|
918
|
+
zDepth = 1;
|
919
|
+
radius = 1;
|
920
|
+
background = '#fff';
|
921
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: RaisedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: RaisedComponent, isStandalone: false, selector: "color-raised", inputs: { zDepth: "zDepth", radius: "radius", background: "background" }, ngImport: i0, template: `
|
923
|
+
<div class="raised-wrap">
|
924
|
+
<div class="raised-bg zDepth-{{ zDepth }}" [style.background]="background"></div>
|
925
|
+
<div class="raised-content">
|
926
|
+
<ng-content></ng-content>
|
927
|
+
</div>
|
858
928
|
</div>
|
859
|
-
|
860
|
-
|
861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
929
|
+
`, isInline: true, styles: [".raised-wrap{position:relative;display:inline-block}.raised-bg{position:absolute;inset:0}.raised-content{position:relative}.zDepth-0{box-shadow:none}.zDepth-1{box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029}.zDepth-2{box-shadow:0 6px 20px #00000030,0 8px 17px #0003}.zDepth-3{box-shadow:0 17px 50px #00000030,0 12px 15px #0000003d}.zDepth-4{box-shadow:0 25px 55px #00000036,0 16px 28px #00000038}.zDepth-5{box-shadow:0 40px 77px #00000038,0 27px 24px #0003}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
930
|
+
}
|
931
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: RaisedComponent, decorators: [{
|
862
932
|
type: Component,
|
863
933
|
args: [{ selector: 'color-raised', template: `
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
934
|
+
<div class="raised-wrap">
|
935
|
+
<div class="raised-bg zDepth-{{ zDepth }}" [style.background]="background"></div>
|
936
|
+
<div class="raised-content">
|
937
|
+
<ng-content></ng-content>
|
938
|
+
</div>
|
868
939
|
</div>
|
869
|
-
|
870
|
-
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".raised-wrap{position:relative;display:inline-block}.raised-bg{position:absolute;top:0px;right:0px;bottom:0px;left:0px}.raised-content{position:relative}.zDepth-0{box-shadow:none}.zDepth-1{box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029}.zDepth-2{box-shadow:0 6px 20px #00000030,0 8px 17px #0003}.zDepth-3{box-shadow:0 17px 50px #00000030,0 12px 15px #0000003d}.zDepth-4{box-shadow:0 25px 55px #00000036,0 16px 28px #00000038}.zDepth-5{box-shadow:0 40px 77px #00000038,0 27px 24px #0003}\n"] }]
|
940
|
+
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".raised-wrap{position:relative;display:inline-block}.raised-bg{position:absolute;inset:0}.raised-content{position:relative}.zDepth-0{box-shadow:none}.zDepth-1{box-shadow:0 2px 10px #0000001f,0 2px 5px #00000029}.zDepth-2{box-shadow:0 6px 20px #00000030,0 8px 17px #0003}.zDepth-3{box-shadow:0 17px 50px #00000030,0 12px 15px #0000003d}.zDepth-4{box-shadow:0 25px 55px #00000036,0 16px 28px #00000038}.zDepth-5{box-shadow:0 40px 77px #00000038,0 27px 24px #0003}\n"] }]
|
871
941
|
}], propDecorators: { zDepth: [{
|
872
942
|
type: Input
|
873
943
|
}], radius: [{
|
@@ -876,11 +946,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
876
946
|
type: Input
|
877
947
|
}] } });
|
878
948
|
class RaisedModule {
|
949
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: RaisedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
950
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: RaisedModule, declarations: [RaisedComponent], imports: [CommonModule], exports: [RaisedComponent] });
|
951
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: RaisedModule, imports: [CommonModule] });
|
879
952
|
}
|
880
|
-
|
881
|
-
RaisedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: RaisedModule, declarations: [RaisedComponent], imports: [CommonModule], exports: [RaisedComponent] });
|
882
|
-
RaisedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RaisedModule, imports: [CommonModule] });
|
883
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: RaisedModule, decorators: [{
|
953
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: RaisedModule, decorators: [{
|
884
954
|
type: NgModule,
|
885
955
|
args: [{
|
886
956
|
declarations: [RaisedComponent],
|
@@ -890,9 +960,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
890
960
|
}] });
|
891
961
|
|
892
962
|
class SaturationComponent {
|
893
|
-
|
894
|
-
|
895
|
-
|
963
|
+
hsl;
|
964
|
+
hsv;
|
965
|
+
radius;
|
966
|
+
pointer;
|
967
|
+
circle;
|
968
|
+
onChange = new EventEmitter();
|
969
|
+
background;
|
970
|
+
pointerTop;
|
971
|
+
pointerLeft;
|
896
972
|
ngOnChanges() {
|
897
973
|
this.background = `hsl(${this.hsl.h}, 100%, 50%)`;
|
898
974
|
this.pointerTop = -(this.hsv.v * 100) + 1 + 100 + '%';
|
@@ -924,30 +1000,50 @@ class SaturationComponent {
|
|
924
1000
|
};
|
925
1001
|
this.onChange.emit({ data, $event });
|
926
1002
|
}
|
927
|
-
}
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
1003
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SaturationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1004
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: SaturationComponent, isStandalone: false, selector: "color-saturation", inputs: { hsl: "hsl", hsv: "hsv", radius: "radius", pointer: "pointer", circle: "circle" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
1005
|
+
<div
|
1006
|
+
class="color-saturation"
|
1007
|
+
ngx-color-coordinates
|
1008
|
+
(coordinatesChange)="handleChange($event)"
|
1009
|
+
[style.background]="background"
|
1010
|
+
>
|
1011
|
+
<div class="saturation-white">
|
1012
|
+
<div class="saturation-black"></div>
|
1013
|
+
<div
|
1014
|
+
class="saturation-pointer"
|
1015
|
+
[ngStyle]="pointer"
|
1016
|
+
[style.top]="pointerTop"
|
1017
|
+
[style.left]="pointerLeft"
|
1018
|
+
>
|
1019
|
+
<div class="saturation-circle" [ngStyle]="circle"></div>
|
1020
|
+
</div>
|
935
1021
|
</div>
|
936
1022
|
</div>
|
937
|
-
|
938
|
-
|
939
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
1023
|
+
`, isInline: true, styles: [".saturation-white{background:linear-gradient(to right,#fff,#fff0);position:absolute;inset:0}.saturation-black{background:linear-gradient(to top,#000,#0000);position:absolute;inset:0}.color-saturation{position:absolute;inset:0}.saturation-pointer{position:absolute;cursor:default}.saturation-circle{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;border-radius:50%;cursor:hand;transform:translate(-2px,-4px)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: ["coordinatesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1024
|
+
}
|
1025
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SaturationComponent, decorators: [{
|
940
1026
|
type: Component,
|
941
1027
|
args: [{ selector: 'color-saturation', template: `
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
1028
|
+
<div
|
1029
|
+
class="color-saturation"
|
1030
|
+
ngx-color-coordinates
|
1031
|
+
(coordinatesChange)="handleChange($event)"
|
1032
|
+
[style.background]="background"
|
1033
|
+
>
|
1034
|
+
<div class="saturation-white">
|
1035
|
+
<div class="saturation-black"></div>
|
1036
|
+
<div
|
1037
|
+
class="saturation-pointer"
|
1038
|
+
[ngStyle]="pointer"
|
1039
|
+
[style.top]="pointerTop"
|
1040
|
+
[style.left]="pointerLeft"
|
1041
|
+
>
|
1042
|
+
<div class="saturation-circle" [ngStyle]="circle"></div>
|
1043
|
+
</div>
|
947
1044
|
</div>
|
948
1045
|
</div>
|
949
|
-
|
950
|
-
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".saturation-white{background:linear-gradient(to right,#fff,rgba(255,255,255,0));position:absolute;top:0;bottom:0;left:0;right:0}.saturation-black{background:linear-gradient(to top,#000,rgba(0,0,0,0));position:absolute;top:0;bottom:0;left:0;right:0}.color-saturation{position:absolute;top:0;bottom:0;left:0;right:0}.saturation-pointer{position:absolute;cursor:default}.saturation-circle{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;border-radius:50%;cursor:hand;transform:translate(-2px,-4px)}\n"] }]
|
1046
|
+
`, preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".saturation-white{background:linear-gradient(to right,#fff,#fff0);position:absolute;inset:0}.saturation-black{background:linear-gradient(to top,#000,#0000);position:absolute;inset:0}.color-saturation{position:absolute;inset:0}.saturation-pointer{position:absolute;cursor:default}.saturation-circle{width:4px;height:4px;box-shadow:0 0 0 1.5px #fff,inset 0 0 1px 1px #0000004d,0 0 1px 2px #0006;border-radius:50%;cursor:hand;transform:translate(-2px,-4px)}\n"] }]
|
951
1047
|
}], propDecorators: { hsl: [{
|
952
1048
|
type: Input
|
953
1049
|
}], hsv: [{
|
@@ -962,11 +1058,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
962
1058
|
type: Output
|
963
1059
|
}] } });
|
964
1060
|
class SaturationModule {
|
1061
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SaturationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1062
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: SaturationModule, declarations: [SaturationComponent], imports: [CommonModule, CoordinatesModule], exports: [SaturationComponent] });
|
1063
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SaturationModule, imports: [CommonModule, CoordinatesModule] });
|
965
1064
|
}
|
966
|
-
|
967
|
-
SaturationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SaturationModule, declarations: [SaturationComponent], imports: [CommonModule, CoordinatesModule], exports: [SaturationComponent] });
|
968
|
-
SaturationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SaturationModule, imports: [CommonModule, CoordinatesModule] });
|
969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SaturationModule, decorators: [{
|
1065
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SaturationModule, decorators: [{
|
970
1066
|
type: NgModule,
|
971
1067
|
args: [{
|
972
1068
|
declarations: [SaturationComponent],
|
@@ -976,15 +1072,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
976
1072
|
}] });
|
977
1073
|
|
978
1074
|
class SwatchComponent {
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
1075
|
+
color;
|
1076
|
+
style = {};
|
1077
|
+
focusStyle = {};
|
1078
|
+
focus;
|
1079
|
+
onClick = new EventEmitter();
|
1080
|
+
onHover = new EventEmitter();
|
1081
|
+
divStyles = {};
|
1082
|
+
focusStyles = {};
|
1083
|
+
inFocus = false;
|
988
1084
|
ngOnInit() {
|
989
1085
|
this.divStyles = {
|
990
1086
|
background: this.color,
|
@@ -1010,9 +1106,8 @@ class SwatchComponent {
|
|
1010
1106
|
handleClick(hex, $event) {
|
1011
1107
|
this.onClick.emit({ hex, $event });
|
1012
1108
|
}
|
1013
|
-
}
|
1014
|
-
|
1015
|
-
SwatchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: SwatchComponent, selector: "color-swatch", inputs: { color: "color", style: "style", focusStyle: "focusStyle", focus: "focus" }, outputs: { onClick: "onClick", onHover: "onHover" }, ngImport: i0, template: `
|
1109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SwatchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.3", type: SwatchComponent, isStandalone: false, selector: "color-swatch", inputs: { color: "color", style: "style", focusStyle: "focusStyle", focus: "focus" }, outputs: { onClick: "onClick", onHover: "onHover" }, ngImport: i0, template: `
|
1016
1111
|
<div
|
1017
1112
|
class="swatch"
|
1018
1113
|
[ngStyle]="currentStyles()"
|
@@ -1025,13 +1120,13 @@ SwatchComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
|
|
1025
1120
|
tabindex="0"
|
1026
1121
|
>
|
1027
1122
|
<ng-content></ng-content>
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
></color-checkboard>
|
1123
|
+
@if (color === 'transparent') {
|
1124
|
+
<color-checkboard boxShadow="inset 0 0 0 1px rgba(0,0,0,0.1)"></color-checkboard>
|
1125
|
+
}
|
1032
1126
|
</div>
|
1033
|
-
`, isInline: true, styles: [".swatch{outline:none;height:100%;width:100%;cursor:pointer;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.
|
1034
|
-
|
1127
|
+
`, isInline: true, styles: [".swatch{outline:none;height:100%;width:100%;cursor:pointer;position:relative}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: CheckboardComponent, selector: "color-checkboard", inputs: ["white", "size", "grey", "boxShadow", "borderRadius"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1128
|
+
}
|
1129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SwatchComponent, decorators: [{
|
1035
1130
|
type: Component,
|
1036
1131
|
args: [{ selector: 'color-swatch', template: `
|
1037
1132
|
<div
|
@@ -1046,12 +1141,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
1046
1141
|
tabindex="0"
|
1047
1142
|
>
|
1048
1143
|
<ng-content></ng-content>
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
></color-checkboard>
|
1144
|
+
@if (color === 'transparent') {
|
1145
|
+
<color-checkboard boxShadow="inset 0 0 0 1px rgba(0,0,0,0.1)"></color-checkboard>
|
1146
|
+
}
|
1053
1147
|
</div>
|
1054
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".swatch{outline:none;height:100%;width:100%;cursor:pointer;position:relative}\n"] }]
|
1148
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, styles: [".swatch{outline:none;height:100%;width:100%;cursor:pointer;position:relative}\n"] }]
|
1055
1149
|
}], propDecorators: { color: [{
|
1056
1150
|
type: Input
|
1057
1151
|
}], style: [{
|
@@ -1066,11 +1160,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
1066
1160
|
type: Output
|
1067
1161
|
}] } });
|
1068
1162
|
class SwatchModule {
|
1163
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SwatchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1164
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: SwatchModule, declarations: [SwatchComponent], imports: [CommonModule, CheckboardModule], exports: [SwatchComponent] });
|
1165
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SwatchModule, imports: [CommonModule, CheckboardModule] });
|
1069
1166
|
}
|
1070
|
-
|
1071
|
-
SwatchModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: SwatchModule, declarations: [SwatchComponent], imports: [CommonModule, CheckboardModule], exports: [SwatchComponent] });
|
1072
|
-
SwatchModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SwatchModule, imports: [CommonModule, CheckboardModule] });
|
1073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: SwatchModule, decorators: [{
|
1167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: SwatchModule, decorators: [{
|
1074
1168
|
type: NgModule,
|
1075
1169
|
args: [{
|
1076
1170
|
declarations: [SwatchComponent],
|
@@ -1080,9 +1174,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
1080
1174
|
}] });
|
1081
1175
|
|
1082
1176
|
class ShadeComponent {
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1177
|
+
hsl;
|
1178
|
+
rgb;
|
1179
|
+
pointer;
|
1180
|
+
shadow;
|
1181
|
+
radius;
|
1182
|
+
onChange = new EventEmitter();
|
1183
|
+
gradient;
|
1184
|
+
pointerLeft;
|
1185
|
+
pointerTop;
|
1086
1186
|
ngOnChanges() {
|
1087
1187
|
this.gradient = {
|
1088
1188
|
background: `linear-gradient(to right,
|
@@ -1090,7 +1190,7 @@ class ShadeComponent {
|
|
1090
1190
|
#000)`,
|
1091
1191
|
};
|
1092
1192
|
const hsv = new TinyColor(this.hsl).toHsv();
|
1093
|
-
this.pointerLeft = 100 -
|
1193
|
+
this.pointerLeft = 100 - hsv.v * 100;
|
1094
1194
|
}
|
1095
1195
|
handleChange({ left, containerWidth, $event }) {
|
1096
1196
|
let data;
|
@@ -1120,9 +1220,8 @@ class ShadeComponent {
|
|
1120
1220
|
}
|
1121
1221
|
this.onChange.emit({ data, $event });
|
1122
1222
|
}
|
1123
|
-
}
|
1124
|
-
|
1125
|
-
ShadeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.2", type: ShadeComponent, selector: "color-shade", inputs: { hsl: "hsl", rgb: "rgb", pointer: "pointer", shadow: "shadow", radius: "radius" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
1223
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ShadeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1224
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: ShadeComponent, isStandalone: false, selector: "color-shade", inputs: { hsl: "hsl", rgb: "rgb", pointer: "pointer", shadow: "shadow", radius: "radius" }, outputs: { onChange: "onChange" }, usesOnChanges: true, ngImport: i0, template: `
|
1126
1225
|
<div class="shade" [style.border-radius]="radius">
|
1127
1226
|
<div
|
1128
1227
|
class="shade-gradient"
|
@@ -1130,22 +1229,15 @@ ShadeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
|
|
1130
1229
|
[style.box-shadow]="shadow"
|
1131
1230
|
[style.border-radius]="radius"
|
1132
1231
|
></div>
|
1133
|
-
<div
|
1134
|
-
|
1135
|
-
(coordinatesChange)="handleChange($event)"
|
1136
|
-
class="shade-container"
|
1137
|
-
>
|
1138
|
-
<div
|
1139
|
-
class="shade-pointer"
|
1140
|
-
[style.left.%]="pointerLeft"
|
1141
|
-
[style.top.%]="pointerTop"
|
1142
|
-
>
|
1232
|
+
<div ngx-color-coordinates (coordinatesChange)="handleChange($event)" class="shade-container">
|
1233
|
+
<div class="shade-pointer" [style.left.%]="pointerLeft" [style.top.%]="pointerTop">
|
1143
1234
|
<div class="shade-slider" [ngStyle]="pointer"></div>
|
1144
1235
|
</div>
|
1145
1236
|
</div>
|
1146
1237
|
</div>
|
1147
|
-
`, isInline: true, styles: [".shade,.shade-gradient{position:absolute;
|
1148
|
-
|
1238
|
+
`, isInline: true, styles: [".shade,.shade-gradient{position:absolute;inset:0}.shade-container{position:relative;height:100%;margin:0 3px}.shade-pointer{position:absolute}.shade-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: CoordinatesDirective, selector: "[ngx-color-coordinates]", outputs: ["coordinatesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1239
|
+
}
|
1240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ShadeComponent, decorators: [{
|
1149
1241
|
type: Component,
|
1150
1242
|
args: [{ selector: 'color-shade', template: `
|
1151
1243
|
<div class="shade" [style.border-radius]="radius">
|
@@ -1155,21 +1247,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
1155
1247
|
[style.box-shadow]="shadow"
|
1156
1248
|
[style.border-radius]="radius"
|
1157
1249
|
></div>
|
1158
|
-
<div
|
1159
|
-
|
1160
|
-
(coordinatesChange)="handleChange($event)"
|
1161
|
-
class="shade-container"
|
1162
|
-
>
|
1163
|
-
<div
|
1164
|
-
class="shade-pointer"
|
1165
|
-
[style.left.%]="pointerLeft"
|
1166
|
-
[style.top.%]="pointerTop"
|
1167
|
-
>
|
1250
|
+
<div ngx-color-coordinates (coordinatesChange)="handleChange($event)" class="shade-container">
|
1251
|
+
<div class="shade-pointer" [style.left.%]="pointerLeft" [style.top.%]="pointerTop">
|
1168
1252
|
<div class="shade-slider" [ngStyle]="pointer"></div>
|
1169
1253
|
</div>
|
1170
1254
|
</div>
|
1171
1255
|
</div>
|
1172
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, styles: [".shade,.shade-gradient{position:absolute;
|
1256
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, preserveWhitespaces: false, standalone: false, styles: [".shade,.shade-gradient{position:absolute;inset:0}.shade-container{position:relative;height:100%;margin:0 3px}.shade-pointer{position:absolute}.shade-slider{width:4px;border-radius:1px;height:8px;box-shadow:0 0 2px #0009;background:#fff;margin-top:1px;transform:translate(-2px)}\n"] }]
|
1173
1257
|
}], propDecorators: { hsl: [{
|
1174
1258
|
type: Input
|
1175
1259
|
}], rgb: [{
|
@@ -1184,11 +1268,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImpor
|
|
1184
1268
|
type: Output
|
1185
1269
|
}] } });
|
1186
1270
|
class ShadeModule {
|
1271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ShadeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1272
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: ShadeModule, declarations: [ShadeComponent], imports: [CommonModule, CoordinatesModule], exports: [ShadeComponent] });
|
1273
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ShadeModule, imports: [CommonModule, CoordinatesModule] });
|
1187
1274
|
}
|
1188
|
-
|
1189
|
-
ShadeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.2", ngImport: i0, type: ShadeModule, declarations: [ShadeComponent], imports: [CommonModule, CoordinatesModule], exports: [ShadeComponent] });
|
1190
|
-
ShadeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ShadeModule, imports: [CommonModule, CoordinatesModule] });
|
1191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.2", ngImport: i0, type: ShadeModule, decorators: [{
|
1275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ShadeModule, decorators: [{
|
1192
1276
|
type: NgModule,
|
1193
1277
|
args: [{
|
1194
1278
|
declarations: [ShadeComponent],
|