nexheal-lib 0.0.28 → 0.0.30

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
@@ -234,6 +234,7 @@ type HSB = {
234
234
  type ColorPickerFormat = "hex" | "rgb" | "hsb";
235
235
  type ColorPickerValue = string | RGB | HSB;
236
236
  declare class ColorPicker implements ControlValueAccessor, OnDestroy {
237
+ private elementRef;
237
238
  title: string;
238
239
  required: boolean;
239
240
  customClass: string;
@@ -242,6 +243,14 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
242
243
  defaultColor: string;
243
244
  disabled: boolean;
244
245
  readonly: boolean;
246
+ /** Show the chosen value as text next to the swatch. */
247
+ showValue: boolean;
248
+ /** Where the value text sits relative to the swatch/panel. */
249
+ valuePosition: "left" | "right" | "bottom";
250
+ /** Trigger look: a plain `swatch`, or an `input`-style field with the swatch inside it. */
251
+ variant: "swatch" | "input";
252
+ /** Placeholder shown in the `input` variant when there is no value yet. */
253
+ placeholder: string;
245
254
  onChange: EventEmitter<ColorPickerValue>;
246
255
  blurEvent: EventEmitter<void>;
247
256
  h: number;
@@ -264,12 +273,22 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
264
273
  get hueBackground(): string;
265
274
  /** Hex of the currently selected colour (used for the preview swatch + hex field). */
266
275
  get previewColor(): string;
276
+ /** The chosen value as a display string, formatted to match `format`. */
277
+ get displayValue(): string;
278
+ /** Whether a value has actually been set (vs. just the default colour). */
279
+ get hasValue(): boolean;
267
280
  get satHandleLeft(): number;
268
281
  get briHandleTop(): number;
269
282
  get hueHandleTop(): number;
270
283
  toggle(): void;
271
284
  open(): void;
272
285
  close(): void;
286
+ /**
287
+ * Close the popup when a press starts outside the component. Uses
288
+ * `mousedown`/`touchstart` (not `click`) so it stays reliable even when a
289
+ * drag ends outside the panel or an outside element stops click propagation.
290
+ */
291
+ onDocumentPointerDown(event: Event): void;
273
292
  onSelectorDown(event: MouseEvent | TouchEvent): void;
274
293
  onHueDown(event: MouseEvent | TouchEvent): void;
275
294
  private bindDragListeners;
@@ -286,7 +305,7 @@ declare class ColorPicker implements ControlValueAccessor, OnDestroy {
286
305
  private hexToRgb;
287
306
  private rgbToHex;
288
307
  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>;
308
+ 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; }; "showValue": { "alias": "showValue"; "required": false; }; "valuePosition": { "alias": "valuePosition"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; }, { "onChange": "onChange"; "blurEvent": "blurEvent"; }, never, never, true, never>;
290
309
  }
291
310
 
292
311
  declare class InputControl implements ControlValueAccessor, OnInit, OnDestroy {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexheal-lib",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.1.0",
6
6
  "@angular/core": "^20.1.0"