-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included libs
- Loading branch information
Showing
21 changed files
with
979 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"name": "angular2-color-picker", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"authors": [ | ||
"Alberto Pujante <[email protected]>" | ||
], | ||
"description": "Color Picker Directive for Angular 2 with no dependencies required", | ||
"main": [ | ||
"app/color-picker/color-picker.directive.ts" | ||
"src/color-picker.directive.ts" | ||
], | ||
"ignore": [ | ||
"node_modules" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Angular 2 Color Picker (Demo Page)</title> | ||
|
||
<base href="/"> | ||
|
||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/> | ||
|
||
<style> | ||
.col-md-5 > input{ | ||
margin-bottom: 10px; | ||
width: 182px; | ||
} | ||
#changeme{ | ||
font-size:30px; | ||
font-weight: bolder; | ||
cursor: pointer; | ||
} | ||
</style> | ||
|
||
<!--uncomment to load files locally | ||
<script src="https://npmcdn.com/core-js/client/shim.min.js"></script> | ||
<script src="https://npmcdn.com/[email protected]?main=browser"></script> | ||
<script src="https://npmcdn.com/[email protected]"></script> | ||
<script src="https://npmcdn.com/[email protected]/dist/system.src.js"></script> | ||
--> | ||
|
||
<script src="node_modules/core-js/client/shim.min.js"></script> | ||
<script src="node_modules/zone.js/dist/zone.js"></script> | ||
<script src="node_modules/reflect-metadata/Reflect.js"></script> | ||
<script src="node_modules/systemjs/dist/system.src.js"></script> | ||
|
||
<script src="systemjs.config.js"></script> | ||
|
||
<script> | ||
System.import('app').catch(function(err){ console.error(err); }); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<my-app>Loading...</my-app> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './lib/index'; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export declare class Hsva { | ||
h: number; | ||
s: number; | ||
v: number; | ||
a: number; | ||
constructor(h: number, s: number, v: number, a: number); | ||
} | ||
export declare class Hsla { | ||
h: number; | ||
s: number; | ||
l: number; | ||
a: number; | ||
constructor(h: number, s: number, l: number, a: number); | ||
} | ||
export declare class Rgba { | ||
r: number; | ||
g: number; | ||
b: number; | ||
a: number; | ||
constructor(r: number, g: number, b: number, a: number); | ||
} | ||
export declare class SliderPosition { | ||
h: number; | ||
s: number; | ||
v: number; | ||
a: number; | ||
constructor(h: number, s: number, v: number, a: number); | ||
} | ||
export declare class SliderDimension { | ||
h: number; | ||
s: number; | ||
v: number; | ||
a: number; | ||
constructor(h: number, s: number, v: number, a: number); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
import { DynamicComponentLoader, ViewContainerRef, ElementRef, EventEmitter, OnInit } from '@angular/core'; | ||
import { ColorPickerService } from './color-picker.service'; | ||
export declare class ColorPickerDirective implements OnInit { | ||
private dcl; | ||
private vcRef; | ||
private el; | ||
private service; | ||
colorPicker: string; | ||
colorPickerChange: EventEmitter<string>; | ||
cpPosition: string; | ||
cpPositionOffset: string; | ||
cpPositionRelativeToArrow: boolean; | ||
cpOutputFormat: string; | ||
cpCancelButton: boolean; | ||
cpCancelButtonClass: string; | ||
cpCancelButtonText: string; | ||
cpFallbackColor: string; | ||
cpHeight: string; | ||
private dialog; | ||
private created; | ||
constructor(dcl: DynamicComponentLoader, vcRef: ViewContainerRef, el: ElementRef, service: ColorPickerService); | ||
ngOnInit(): void; | ||
onClick(): void; | ||
colorChanged(value: string): void; | ||
changeInput(value: string): void; | ||
} | ||
export declare class TextDirective { | ||
newValue: EventEmitter<any>; | ||
text: any; | ||
rg: number; | ||
changeInput(value: string): void; | ||
} | ||
export declare class SliderDirective { | ||
private el; | ||
newValue: EventEmitter<any>; | ||
slider: string; | ||
rgX: number; | ||
rgY: number; | ||
private listenerMove; | ||
private listenerStop; | ||
constructor(el: ElementRef); | ||
setCursor(event: any): void; | ||
move(event: any): void; | ||
start(event: any): void; | ||
stop(): void; | ||
getX(event: any): number; | ||
getY(event: any): number; | ||
} | ||
export declare class DialogComponent implements OnInit { | ||
private el; | ||
private service; | ||
private hsva; | ||
private rgbaText; | ||
private hslaText; | ||
private hexText; | ||
private outputColor; | ||
private alphaSliderColor; | ||
private hueSliderColor; | ||
private slider; | ||
private sliderDimMax; | ||
private format; | ||
private show; | ||
private top; | ||
private left; | ||
private position; | ||
private directiveInstance; | ||
private initialColor; | ||
private directiveElementRef; | ||
private listenerMouseDown; | ||
private listenerResize; | ||
private cpPosition; | ||
private cpPositionOffset; | ||
private cpOutputFormat; | ||
private cpCancelButton; | ||
private cpCancelButtonClass; | ||
private cpCancelButtonText; | ||
private cpHeight; | ||
private dialogWidth; | ||
private dialogArrowSize; | ||
private dialogArrowOffset; | ||
private arrowTop; | ||
constructor(el: ElementRef, service: ColorPickerService); | ||
setDialog(instance: any, elementRef: ElementRef, color: any, cpPosition: string, cpPositionOffset: string, cpPositionRelativeToArrow: boolean, cpOutputFormat: string, cpCancelButton: boolean, cpCancelButtonClass: string, cpCancelButtonText: string, cpHeight: string): void; | ||
setInitialColor(color: any): void; | ||
ngOnInit(): void; | ||
openColorPicker(): void; | ||
onMouseDown(event: any): void; | ||
closeColorPicker(): void; | ||
onResize(): void; | ||
setDialogPosition(): void; | ||
setSaturation(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setLightness(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setHue(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setAlpha(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setR(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setG(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setB(val: { | ||
v: number; | ||
rg: number; | ||
}): void; | ||
setSaturationAndBrightness(val: { | ||
s: number; | ||
v: number; | ||
rgX: number; | ||
rgY: number; | ||
}): void; | ||
setColorFromString(value: string): void; | ||
formatPolicy(): number; | ||
update(): void; | ||
cancelColor(): void; | ||
isDescendant(parent: any, child: any): boolean; | ||
createBox(element: any, offset: any): any; | ||
} |
Oops, something went wrong.