nexheal-lib 0.0.26 → 0.0.28

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/index.d.ts CHANGED
@@ -221,6 +221,74 @@ declare class CheckboxControl implements ControlValueAccessor {
221
221
  static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxControl, "checkbox-control", never, { "title": { "alias": "title"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "type": { "alias": "type"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "checkboxChange": "checkboxChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
222
222
  }
223
223
 
224
+ type RGB = {
225
+ r: number;
226
+ g: number;
227
+ b: number;
228
+ };
229
+ type HSB = {
230
+ h: number;
231
+ s: number;
232
+ b: number;
233
+ };
234
+ type ColorPickerFormat = "hex" | "rgb" | "hsb";
235
+ type ColorPickerValue = string | RGB | HSB;
236
+ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
237
+ title: string;
238
+ required: boolean;
239
+ customClass: string;
240
+ inline: boolean;
241
+ format: ColorPickerFormat;
242
+ defaultColor: string;
243
+ disabled: boolean;
244
+ readonly: boolean;
245
+ onChange: EventEmitter<ColorPickerValue>;
246
+ blurEvent: EventEmitter<void>;
247
+ h: number;
248
+ s: number;
249
+ b: number;
250
+ overlayVisible: boolean;
251
+ private value;
252
+ private dragMode;
253
+ private dragEl;
254
+ private moveListener;
255
+ private upListener;
256
+ private onChangeFn;
257
+ private onTouchedFn;
258
+ ngOnDestroy(): void;
259
+ writeValue(value: ColorPickerValue | null): void;
260
+ registerOnChange(fn: (value: ColorPickerValue | null) => void): void;
261
+ registerOnTouched(fn: () => void): void;
262
+ setDisabledState(isDisabled: boolean): void;
263
+ /** Background of the saturation/brightness box: the pure hue at full S/B. */
264
+ get hueBackground(): string;
265
+ /** Hex of the currently selected colour (used for the preview swatch + hex field). */
266
+ get previewColor(): string;
267
+ get satHandleLeft(): number;
268
+ get briHandleTop(): number;
269
+ get hueHandleTop(): number;
270
+ toggle(): void;
271
+ open(): void;
272
+ close(): void;
273
+ onSelectorDown(event: MouseEvent | TouchEvent): void;
274
+ onHueDown(event: MouseEvent | TouchEvent): void;
275
+ private bindDragListeners;
276
+ private unbindDragListeners;
277
+ private handleDrag;
278
+ private emitChange;
279
+ private getValueToEmit;
280
+ private setFromHex;
281
+ private isTouch;
282
+ private getPoint;
283
+ private clamp;
284
+ private hsbToRgb;
285
+ private rgbToHsb;
286
+ private hexToRgb;
287
+ private rgbToHex;
288
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorPicker, never>;
289
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColorPicker, "color-picker", never, { "title": { "alias": "title"; "required": false; }; "required": { "alias": "required"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "format": { "alias": "format"; "required": false; }; "defaultColor": { "alias": "defaultColor"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, { "onChange": "onChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
290
+ }
291
+
224
292
  declare class InputControl implements ControlValueAccessor, OnInit, OnDestroy {
225
293
  type: "text" | "password" | "decimal" | "number" | "email" | "search";
226
294
  title: string;
@@ -540,4 +608,4 @@ declare class TextareaControl {
540
608
  static ɵcmp: i0.ɵɵComponentDeclaration<TextareaControl, "textarea-control", never, { "title": { "alias": "title"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; "clearVal": { "alias": "clearVal"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "error": { "alias": "error"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; }, { "textareaChange": "textareaChange"; "selectionCleared": "selectionCleared"; "blurEvent": "blurEvent"; }, never, never, true, never>;
541
609
  }
542
610
 
543
- export { AutocompleteControl, CalendarControl, CheckboxControl, InputControl, MultiselectControl, SelectControl, SwitchControl, TextEditor, TextareaControl };
611
+ export { AutocompleteControl, CalendarControl, CheckboxControl, ColorPicker, InputControl, MultiselectControl, SelectControl, SwitchControl, TextEditor, TextareaControl };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexheal-lib",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"