@nova-ui/bits 17.0.4 → 17.0.5
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/constants/color-picker.constants.d.ts +5 -0
- package/esm2022/constants/color-picker.constants.mjs +163 -0
- package/esm2022/functions/color.helper.mjs +30 -0
- package/esm2022/functions/public-api.mjs +2 -1
- package/esm2022/lib/color-picker/color-picker.component.mjs +192 -0
- package/esm2022/lib/color-picker/color-picker.module.mjs +24 -0
- package/esm2022/lib/color-picker/color.service.mjs +56 -0
- package/esm2022/lib/docs/live-example-files/app.module.mjs +3 -1
- package/esm2022/lib/radio/radio-group.component.mjs +3 -3
- package/esm2022/lib/tabgroup/tab-heading/tab-heading.component.mjs +24 -8
- package/esm2022/nui-api.mjs +2 -1
- package/esm2022/public_api.mjs +3 -1
- package/fesm2022/nova-ui-bits.mjs +465 -9
- package/fesm2022/nova-ui-bits.mjs.map +1 -1
- package/functions/color.helper.d.ts +1 -0
- package/functions/public-api.d.ts +1 -0
- package/lib/color-picker/color-picker.component.d.ts +56 -0
- package/lib/color-picker/color-picker.module.d.ts +13 -0
- package/lib/color-picker/color.service.d.ts +8 -0
- package/lib/tabgroup/tab-heading/tab-heading.component.d.ts +5 -2
- package/nui-api.d.ts +1 -0
- package/package.json +1 -1
- package/public_api.d.ts +2 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getColorValueByName(colorVariable: string): string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
|
|
2
|
+
import { AfterViewInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges } from "@angular/core";
|
|
3
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
4
|
+
import { ColorService } from "./color.service";
|
|
5
|
+
import { IPaletteColor } from "./../../constants/color-picker.constants";
|
|
6
|
+
import { IOptionValueObject, NuiFormFieldControl, OverlayUtilitiesService } from "../public-api";
|
|
7
|
+
import { SelectV2Component } from "../select-v2/select/select-v2.component";
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class ColorPickerComponent implements NuiFormFieldControl, ControlValueAccessor, OnChanges, AfterViewInit, OnDestroy {
|
|
10
|
+
protected changeDetection: ChangeDetectorRef;
|
|
11
|
+
private colorService;
|
|
12
|
+
private cdkOverlay;
|
|
13
|
+
/**
|
|
14
|
+
* Colors to be displayed as array of strings
|
|
15
|
+
*/
|
|
16
|
+
colors: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Color pallete which should be displayed
|
|
19
|
+
*/
|
|
20
|
+
colorPalette: IPaletteColor[];
|
|
21
|
+
/**
|
|
22
|
+
* Number of columns in the color picker
|
|
23
|
+
*/
|
|
24
|
+
cols: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Determine if the color picket should be displayed as select
|
|
27
|
+
*/
|
|
28
|
+
isSelect: boolean | undefined;
|
|
29
|
+
select: SelectV2Component;
|
|
30
|
+
overlayConfig: OverlayConfig;
|
|
31
|
+
value: string | IOptionValueObject;
|
|
32
|
+
defaultColor: string;
|
|
33
|
+
maxWidth: string;
|
|
34
|
+
palette: Partial<IPaletteColor[]>;
|
|
35
|
+
isBlackTick: boolean;
|
|
36
|
+
isInErrorState: boolean;
|
|
37
|
+
ariaLabel?: string | undefined;
|
|
38
|
+
protected overlayUtilities: OverlayUtilitiesService;
|
|
39
|
+
private selectResizeObserver;
|
|
40
|
+
private destroy$;
|
|
41
|
+
constructor(changeDetection: ChangeDetectorRef, colorService: ColorService, cdkOverlay: Overlay);
|
|
42
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
43
|
+
ngAfterViewInit(): void;
|
|
44
|
+
ngOnDestroy(): void;
|
|
45
|
+
onChange(value: any): void;
|
|
46
|
+
_onTouched(): void;
|
|
47
|
+
writeValue(value: string | IOptionValueObject): void;
|
|
48
|
+
registerOnChange(fn: () => void): void;
|
|
49
|
+
registerOnTouched(fn: () => void): void;
|
|
50
|
+
setStyles: (color: string) => Record<string, any>;
|
|
51
|
+
determineBlackTick(color: string): boolean;
|
|
52
|
+
private initOverlayUtilities;
|
|
53
|
+
private getContrastOnBgColor;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "nui-color-picker", never, { "colors": { "alias": "colors"; "required": false; }; "colorPalette": { "alias": "colorPalette"; "required": false; }; "cols": { "alias": "cols"; "required": false; }; "isSelect": { "alias": "isSelect"; "required": false; }; }, {}, never, never, false, never>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./color-picker.component";
|
|
3
|
+
import * as i2 from "../../common/common.module";
|
|
4
|
+
import * as i3 from "../select-v2/select-v2.module";
|
|
5
|
+
import * as i4 from "../icon/icon.module";
|
|
6
|
+
/**
|
|
7
|
+
* @ignore
|
|
8
|
+
*/
|
|
9
|
+
export declare class NuiColorPickerModule {
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NuiColorPickerModule, never>;
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NuiColorPickerModule, [typeof i1.ColorPickerComponent], [typeof i2.NuiCommonModule, typeof i3.NuiSelectV2Module, typeof i4.NuiIconModule], [typeof i1.ColorPickerComponent]>;
|
|
12
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NuiColorPickerModule>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class ColorService {
|
|
3
|
+
RGBToHexRGBToHex(rgbColor: string): string;
|
|
4
|
+
isHEX(hexColor: string): boolean;
|
|
5
|
+
colorKeywordsToHex(color: string): string;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ColorService, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ColorService>;
|
|
8
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter } from "@angular/core";
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/** @ignore */
|
|
4
4
|
export declare class TabHeadingComponent {
|
|
5
5
|
private changeDetector;
|
|
6
|
+
private elementRef;
|
|
6
7
|
/** This adds 'disabled' class to the host component depending on the 'disabled' @Input to properly style disabled tabs */
|
|
7
8
|
get isDisabled(): boolean;
|
|
9
|
+
get ariaSelected(): string | null;
|
|
8
10
|
/** If true tab can not be activated */
|
|
9
11
|
disabled: boolean;
|
|
10
12
|
/** Tab active state toggle */
|
|
@@ -15,8 +17,9 @@ export declare class TabHeadingComponent {
|
|
|
15
17
|
/** Event is fired when tab became active, $event:Tab equals to selected instance of Tab component */
|
|
16
18
|
selected: EventEmitter<TabHeadingComponent>;
|
|
17
19
|
protected _active: boolean;
|
|
18
|
-
constructor(changeDetector: ChangeDetectorRef);
|
|
20
|
+
constructor(changeDetector: ChangeDetectorRef, elementRef: ElementRef);
|
|
19
21
|
selectTab(): void;
|
|
22
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
20
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TabHeadingComponent, never>;
|
|
21
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<TabHeadingComponent, "nui-tab-heading", never, { "disabled": { "alias": "disabled"; "required": false; }; "active": { "alias": "active"; "required": false; }; "tabId": { "alias": "tabId"; "required": false; }; }, { "selected": "selected"; }, never, ["*"], false, never>;
|
|
22
25
|
}
|
package/nui-api.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export { NuiOverlayAdditionsModule } from "./lib/overlay/overlay-additions.modul
|
|
|
21
21
|
export { NuiBreadcrumbModule } from "./lib/breadcrumb/breadcrumb.module";
|
|
22
22
|
export { NuiBusyModule } from "./lib/busy/busy.module";
|
|
23
23
|
export { NuiChipsModule } from "./lib/chips/chips.module";
|
|
24
|
+
export { NuiColorPickerModule } from "./lib/color-picker/color-picker.module";
|
|
24
25
|
export { NuiContentModule } from "./lib/content/content.module";
|
|
25
26
|
export { NuiDatePickerModule } from "./lib/date-picker/date-picker.module";
|
|
26
27
|
export { NuiDateTimePickerModule } from "./lib/date-time-picker/date-time-picker.module";
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { RadioComponent } from "./lib/radio/radio-group.component";
|
|
|
8
8
|
export { RadioGroupComponent } from "./lib/radio/radio-group.component";
|
|
9
9
|
export { CheckboxComponent } from "./lib/checkbox/checkbox.component";
|
|
10
10
|
export { CheckboxGroupComponent } from "./lib/checkbox/checkbox-group.component";
|
|
11
|
+
export { ColorPickerComponent } from "./lib/color-picker/color-picker.component";
|
|
11
12
|
export { ChipComponent } from "./lib/chips/chip/chip.component";
|
|
12
13
|
export { ChipsComponent } from "./lib/chips/chips.component";
|
|
13
14
|
export { ChipsOverflowComponent } from "./lib/chips/chips-overflow/chips-overflow.component";
|
|
@@ -161,5 +162,6 @@ export { VirtualViewportManager } from "./services/virtual-viewport-manager.serv
|
|
|
161
162
|
export { OverlayContainerService } from "./lib/overlay/overlay-container.service";
|
|
162
163
|
export { OverlayPositionService } from "./lib/overlay/overlay-position.service";
|
|
163
164
|
export { OverlayService } from "./lib/overlay/overlay.service";
|
|
165
|
+
export { ColorService } from "./lib/color-picker/color.service";
|
|
164
166
|
export { DEMO_PATH_TOKEN } from "./constants/path.constants";
|
|
165
167
|
export { expand } from "./animations/expand";
|