@jdpo2008/ngx-ds 0.4.0 → 0.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jdpo2008/ngx-ds",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Angular 21 component library: standalone signal-based components with design tokens and an opt-in dark theme.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -63,6 +63,11 @@
63
63
  --surface-hover: #1f2937;
64
64
  --surface-active: #374151;
65
65
  --fill-neutral: #9ca3af; // lighter so dark --text-on-color stays readable
66
+ --fill-primary: var(--primary-500);
67
+ --fill-danger: var(--danger-500);
68
+ --fill-success: var(--success-500);
69
+ --fill-warning: var(--warning-500);
70
+ --fill-info: var(--info-500);
66
71
 
67
72
  // Borders
68
73
  --border-subtle: #1f2937;
@@ -69,7 +69,7 @@
69
69
  --text-base: var(--gray-900);
70
70
  --text-secondary: var(--gray-700);
71
71
  --text-muted: var(--gray-500);
72
- --text-placeholder: var(--gray-400);
72
+ --text-placeholder: var(--gray-500); // 4.8:1 on white (AA)
73
73
  --text-disabled: var(--gray-300);
74
74
  --text-inverse: #ffffff;
75
75
  --text-on-color: #ffffff; // text/marks on solid colored fills
@@ -82,6 +82,12 @@
82
82
  --surface-active: var(--gray-200);
83
83
  --surface-thumb: #ffffff; // switch / slider thumbs; same in dark
84
84
  --fill-neutral: var(--gray-500); // solid neutral fills (secondary variants)
85
+ // Solid fills behind --text-on-color, also safe as text on --surface-base (AA 4.5:1).
86
+ --fill-primary: var(--primary-600);
87
+ --fill-danger: var(--danger-600);
88
+ --fill-success: var(--success-700);
89
+ --fill-warning: var(--warning-700);
90
+ --fill-info: var(--info-600);
85
91
 
86
92
  // Borders
87
93
  --border-subtle: var(--gray-100);
@@ -107,7 +107,13 @@ interface NgxDsLabels {
107
107
  increment: string;
108
108
  decrement: string;
109
109
  otpGroup: string;
110
+ otpDigit: (n: number, total: number) => string;
111
+ rangeStart: string;
112
+ rangeEnd: string;
110
113
  removeTag: (label: string) => string;
114
+ /** Accessible name of the InlineEdit trigger: "Edit <label>". */
115
+ edit: (label: string) => string;
116
+ save: string;
111
117
  removeChip: (label: string) => string;
112
118
  rating: string;
113
119
  ratingStar: (n: number) => string;
@@ -221,18 +227,56 @@ interface NgxDsConfig {
221
227
  labels?: Partial<NgxDsLabels>;
222
228
  /** Sets `data-theme` on `<html>`. Omit it to manage the theme yourself. */
223
229
  theme?: NgxDsTheme;
230
+ /**
231
+ * Brand colours. `primary` (`#rgb` / `#rrggbb`) replaces the default indigo: it becomes
232
+ * `--primary-600` and the rest of the `--primary-*` scale is generated from it, for the
233
+ * light and the dark theme. Change it later with `applyPrimaryColor()`.
234
+ */
235
+ colors?: {
236
+ primary?: string;
237
+ };
224
238
  }
225
239
  /**
226
240
  * Configures ngx-ds in one call:
227
241
  *
228
242
  * ```ts
229
243
  * bootstrapApplication(AppComponent, {
230
- * providers: [provideNgxDs({ locale: 'en-US', theme: 'system' })],
244
+ * providers: [
245
+ * provideNgxDs({ locale: 'en-US', theme: 'system', colors: { primary: '#0d9488' } }),
246
+ * ],
231
247
  * });
232
248
  * ```
233
249
  */
234
250
  declare function provideNgxDs(config?: NgxDsConfig): EnvironmentProviders;
235
251
 
252
+ /** Steps of `--primary-*` the components read, in the light and in the dark theme. */
253
+ declare const PRIMARY_STEPS: readonly [50, 100, 200, 300, 400, 500, 600, 700];
254
+ type PrimaryStep = (typeof PRIMARY_STEPS)[number];
255
+ /** `--primary-*` values as hex colours, for the light and the dark theme. */
256
+ interface PrimaryPalette {
257
+ light: Record<PrimaryStep, string>;
258
+ /** Only the steps the dark theme overrides (the rest are shared with light). */
259
+ dark: Partial<Record<PrimaryStep, string>>;
260
+ }
261
+ /** Parses `#rgb` or `#rrggbb`. Returns `null` for anything else. */
262
+ declare function parseHex(color: string): [number, number, number] | null;
263
+ /** WCAG 2 contrast ratio between two hex colours. */
264
+ declare function contrastRatio(a: string, b: string): number;
265
+ /**
266
+ * Builds the `--primary-*` scale from a brand colour (`#rgb` / `#rrggbb`), which
267
+ * becomes step 600 in the light theme. Throws on an invalid colour.
268
+ */
269
+ declare function createPrimaryPalette(color: string): PrimaryPalette;
270
+ /** CSS that sets the palette on `:root`, with the dark overrides for `data-theme="dark"` / `.dark`. */
271
+ declare function primaryPaletteCss({ light, dark }: PrimaryPalette): string;
272
+ /**
273
+ * Applies a brand colour as the primary colour of every ngx-ds component, at runtime.
274
+ * Call it again to change it, or with `null` to go back to the default indigo.
275
+ *
276
+ * The styles are not in a cascade layer, so they win over the tokens in `ngx-ds.scss`.
277
+ */
278
+ declare function applyPrimaryColor(color: string | null, doc?: Document): void;
279
+
236
280
  /**
237
281
  * Atrapa el foco dentro del elemento host mientras esté en el DOM.
238
282
  * Al inicializarse enfoca `[autofocus]`, el primer focusable o el propio host
@@ -277,11 +321,13 @@ declare class ButtonComponent {
277
321
  readonly loading: _angular_core.InputSignal<boolean>;
278
322
  readonly rounded: _angular_core.InputSignal<boolean>;
279
323
  readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
324
+ /** Accessible name for icon-only buttons; set on the native `<button>`. */
325
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
280
326
  readonly hostClasses: _angular_core.Signal<string>;
281
327
  readonly iconSize: _angular_core.Signal<number>;
282
328
  readonly spinnerSize: _angular_core.Signal<SpinnerSize>;
283
329
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonComponent, never>;
284
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ngx-ds-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "iconLeft": { "alias": "iconLeft"; "required": false; "isSignal": true; }; "iconRight": { "alias": "iconRight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
330
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "ngx-ds-button", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "iconLeft": { "alias": "iconLeft"; "required": false; "isSignal": true; }; "iconRight": { "alias": "iconRight"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "rounded": { "alias": "rounded"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
285
331
  }
286
332
 
287
333
  declare class IconButtonComponent {
@@ -470,6 +516,8 @@ type CheckboxColor = 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
470
516
  declare class CheckboxComponent implements ControlValueAccessor {
471
517
  #private;
472
518
  readonly label: _angular_core.InputSignal<string>;
519
+ /** Accessible name when there is no visible `label`. */
520
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
473
521
  readonly size: _angular_core.InputSignal<Size>;
474
522
  readonly color: _angular_core.InputSignal<CheckboxColor>;
475
523
  readonly indeterminate: _angular_core.InputSignal<boolean>;
@@ -486,7 +534,7 @@ declare class CheckboxComponent implements ControlValueAccessor {
486
534
  registerOnTouched(fn: () => void): void;
487
535
  setDisabledState(disabled: boolean): void;
488
536
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxComponent, never>;
489
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "ngx-ds-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
537
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "ngx-ds-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
490
538
  }
491
539
 
492
540
  type RadioSize = Size;
@@ -528,6 +576,8 @@ type SwitchColor = 'primary' | 'secondary' | 'danger' | 'success' | 'warning';
528
576
  declare class SwitchComponent implements ControlValueAccessor {
529
577
  #private;
530
578
  readonly label: _angular_core.InputSignal<string>;
579
+ /** Accessible name when there is no visible `label`. */
580
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
531
581
  readonly labelPosition: _angular_core.InputSignal<"left" | "right">;
532
582
  readonly size: _angular_core.InputSignal<Size>;
533
583
  readonly color: _angular_core.InputSignal<SwitchColor>;
@@ -546,7 +596,7 @@ declare class SwitchComponent implements ControlValueAccessor {
546
596
  registerOnTouched(fn: () => void): void;
547
597
  setDisabledState(disabled: boolean): void;
548
598
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SwitchComponent, never>;
549
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SwitchComponent, "ngx-ds-switch", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "labelOn": { "alias": "labelOn"; "required": false; "isSignal": true; }; "labelOff": { "alias": "labelOff"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
599
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SwitchComponent, "ngx-ds-switch", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "labelOn": { "alias": "labelOn"; "required": false; "isSignal": true; }; "labelOff": { "alias": "labelOff"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; }, never, never, true, never>;
550
600
  }
551
601
 
552
602
  /** Errors that Signal Forms' `[formField]` passes to a control's `errors` input. */
@@ -1089,6 +1139,7 @@ type SliderColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
1089
1139
  declare class RangeSliderComponent implements ControlValueAccessor {
1090
1140
  #private;
1091
1141
  readonly id: string;
1142
+ readonly i18n: _jdpo2008_ngx_ds.NgxDsLabels;
1092
1143
  readonly value: _angular_core.ModelSignal<number>;
1093
1144
  readonly min: _angular_core.InputSignalWithTransform<number, number | undefined>;
1094
1145
  readonly max: _angular_core.InputSignalWithTransform<number, number | undefined>;
@@ -1101,6 +1152,8 @@ declare class RangeSliderComponent implements ControlValueAccessor {
1101
1152
  readonly range: _angular_core.InputSignal<boolean>;
1102
1153
  readonly values: _angular_core.ModelSignal<[number, number]>;
1103
1154
  readonly minGap: _angular_core.InputSignal<number>;
1155
+ /** Accessible name for the single slider when there is no visible `label`. */
1156
+ readonly ariaLabel: _angular_core.InputSignal<string>;
1104
1157
  readonly ariaLabelStart: _angular_core.InputSignal<string>;
1105
1158
  readonly ariaLabelEnd: _angular_core.InputSignal<string>;
1106
1159
  readonly rangeChange: _angular_core.OutputEmitterRef<[number, number]>;
@@ -1129,7 +1182,7 @@ declare class RangeSliderComponent implements ControlValueAccessor {
1129
1182
  registerOnTouched(fn: () => void): void;
1130
1183
  setDisabledState(disabled: boolean): void;
1131
1184
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RangeSliderComponent, never>;
1132
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeSliderComponent, "ngx-ds-range-slider", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "showMinMax": { "alias": "showMinMax"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "minGap": { "alias": "minGap"; "required": false; "isSignal": true; }; "ariaLabelStart": { "alias": "ariaLabelStart"; "required": false; "isSignal": true; }; "ariaLabelEnd": { "alias": "ariaLabelEnd"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "values": "valuesChange"; "rangeChange": "rangeChange"; }, never, never, true, never>;
1185
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeSliderComponent, "ngx-ds-range-slider", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "showMinMax": { "alias": "showMinMax"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "values": { "alias": "values"; "required": false; "isSignal": true; }; "minGap": { "alias": "minGap"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelStart": { "alias": "ariaLabelStart"; "required": false; "isSignal": true; }; "ariaLabelEnd": { "alias": "ariaLabelEnd"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "values": "valuesChange"; "rangeChange": "rangeChange"; }, never, never, true, never>;
1133
1186
  }
1134
1187
 
1135
1188
  type CardShadow = 'none' | 'sm' | 'md' | 'lg';
@@ -1216,6 +1269,8 @@ declare class NumberInputComponent implements ControlValueAccessor {
1216
1269
  readonly step: _angular_core.InputSignal<number>;
1217
1270
  readonly size: _angular_core.InputSignal<Size>;
1218
1271
  readonly label: _angular_core.InputSignal<string>;
1272
+ /** Accessible name when there is no visible `label`. */
1273
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
1219
1274
  readonly hint: _angular_core.InputSignal<string>;
1220
1275
  readonly errorMessage: _angular_core.InputSignal<string>;
1221
1276
  /** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
@@ -1242,7 +1297,7 @@ declare class NumberInputComponent implements ControlValueAccessor {
1242
1297
  registerOnTouched(fn: () => void): void;
1243
1298
  setDisabledState(isDisabled: boolean): void;
1244
1299
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NumberInputComponent, never>;
1245
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NumberInputComponent, "ngx-ds-number-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1300
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NumberInputComponent, "ngx-ds-number-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1246
1301
  }
1247
1302
 
1248
1303
  interface MultiSelectOption {
@@ -1670,6 +1725,176 @@ declare class TagInputComponent implements ControlValueAccessor {
1670
1725
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TagInputComponent, "ngx-ds-tag-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "maxTags": { "alias": "maxTags"; "required": false; "isSignal": true; }; "allowDuplicates": { "alias": "allowDuplicates"; "required": false; "isSignal": true; }; "addOnBlur": { "alias": "addOnBlur"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "added": "added"; "removed": "removed"; }, never, never, true, never>;
1671
1726
  }
1672
1727
 
1728
+ type InlineEditSize = Size;
1729
+ /**
1730
+ * Text that turns into a field on click. Enter (Ctrl/⌘+Enter when `multiline`) or
1731
+ * blur saves, Escape restores the previous value.
1732
+ *
1733
+ * Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
1734
+ */
1735
+ declare class InlineEditComponent implements ControlValueAccessor {
1736
+ #private;
1737
+ readonly i18n: _jdpo2008_ngx_ds.NgxDsLabels;
1738
+ /** Names the field for assistive tech ("Edit <label>"). Not shown. */
1739
+ readonly label: _angular_core.InputSignal<string>;
1740
+ /** Shown, muted, while the value is empty. */
1741
+ readonly placeholder: _angular_core.InputSignal<string>;
1742
+ readonly size: _angular_core.InputSignal<Size>;
1743
+ /** Uses a textarea. Enter adds a line, Ctrl/⌘+Enter saves. */
1744
+ readonly multiline: _angular_core.InputSignal<boolean>;
1745
+ /** An empty value is not saved: the previous one is restored. */
1746
+ readonly required: _angular_core.InputSignal<boolean>;
1747
+ /** Shows save and cancel buttons while editing. */
1748
+ readonly showActions: _angular_core.InputSignal<boolean>;
1749
+ /** Saves when the field loses focus. With `false`, leaving the field cancels. */
1750
+ readonly saveOnBlur: _angular_core.InputSignal<boolean>;
1751
+ readonly disabled: _angular_core.InputSignal<boolean>;
1752
+ readonly value: _angular_core.ModelSignal<string>;
1753
+ /** Whether the field is being edited. Bind it to start editing from outside. */
1754
+ readonly editing: _angular_core.ModelSignal<boolean>;
1755
+ /** Emits the new value when an edit is saved and the value changed. */
1756
+ readonly saved: _angular_core.OutputEmitterRef<string>;
1757
+ /** Emits when an edit is cancelled. */
1758
+ readonly cancelled: _angular_core.OutputEmitterRef<void>;
1759
+ private readonly fieldRef;
1760
+ private readonly triggerRef;
1761
+ readonly draft: _angular_core.Signal<string>;
1762
+ readonly isDisabled: _angular_core.Signal<boolean>;
1763
+ readonly isEmpty: _angular_core.Signal<boolean>;
1764
+ readonly iconSize: _angular_core.Signal<number>;
1765
+ readonly triggerLabel: _angular_core.Signal<string>;
1766
+ readonly hostClasses: _angular_core.Signal<string>;
1767
+ readonly icons: {
1768
+ Pencil: lucide_angular.LucideIconData;
1769
+ Check: lucide_angular.LucideIconData;
1770
+ X: lucide_angular.LucideIconData;
1771
+ };
1772
+ constructor();
1773
+ edit(): void;
1774
+ save(): void;
1775
+ cancel(): void;
1776
+ onInput(event: Event): void;
1777
+ onKeydown(event: KeyboardEvent): void;
1778
+ onBlur(event: FocusEvent): void;
1779
+ onAction(kind: 'save' | 'cancel'): void;
1780
+ private onChange;
1781
+ private onTouched;
1782
+ writeValue(v: string | null): void;
1783
+ registerOnChange(fn: (v: string) => void): void;
1784
+ registerOnTouched(fn: () => void): void;
1785
+ setDisabledState(disabled: boolean): void;
1786
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InlineEditComponent, never>;
1787
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InlineEditComponent, "ngx-ds-inline-edit", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "multiline": { "alias": "multiline"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "saveOnBlur": { "alias": "saveOnBlur"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "editing": { "alias": "editing"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "editing": "editingChange"; "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
1788
+ }
1789
+
1790
+ type TreeSelectId = string | number;
1791
+ interface TreeSelectNode {
1792
+ id: TreeSelectId;
1793
+ label: string;
1794
+ children?: TreeSelectNode[];
1795
+ disabled?: boolean;
1796
+ }
1797
+ /** One id (or `null`) in single mode, an array of ids with `multiple`. */
1798
+ type TreeSelectValue = TreeSelectId | TreeSelectId[] | null;
1799
+ type TreeSelectSize = Size;
1800
+ type TreeSelectCheckState = 'checked' | 'mixed' | 'unchecked';
1801
+ /** A visible row of the flattened tree. */
1802
+ interface TreeSelectRow {
1803
+ node: TreeSelectNode;
1804
+ level: number;
1805
+ parentId: TreeSelectId | null;
1806
+ hasChildren: boolean;
1807
+ expanded: boolean;
1808
+ posinset: number;
1809
+ setsize: number;
1810
+ }
1811
+ /**
1812
+ * A select whose options form a tree. Single mode picks one node; `multiple` adds
1813
+ * checkboxes that, with `cascade`, check every leaf under a parent.
1814
+ *
1815
+ * Works with `[(value)]`, reactive forms and Signal Forms `[formField]`.
1816
+ */
1817
+ declare class TreeSelectComponent implements ControlValueAccessor {
1818
+ #private;
1819
+ readonly i18n: _jdpo2008_ngx_ds.NgxDsLabels;
1820
+ readonly nodes: _angular_core.InputSignal<TreeSelectNode[]>;
1821
+ /** Checkboxes and an array value instead of a single id. */
1822
+ readonly multiple: _angular_core.InputSignal<boolean>;
1823
+ /**
1824
+ * With `multiple`, checking a parent checks every leaf under it, and the value
1825
+ * holds leaf ids only. With `false`, each node is checked on its own.
1826
+ */
1827
+ readonly cascade: _angular_core.InputSignal<boolean>;
1828
+ /** In single mode, parents can be picked too. By default a click on them expands. */
1829
+ readonly selectableParents: _angular_core.InputSignal<boolean>;
1830
+ /** Adds a box that filters the tree by label, keeping the ancestors of matches. */
1831
+ readonly searchable: _angular_core.InputSignal<boolean>;
1832
+ readonly placeholder: _angular_core.InputSignal<string | undefined>;
1833
+ readonly label: _angular_core.InputSignal<string>;
1834
+ readonly hint: _angular_core.InputSignal<string>;
1835
+ readonly errorMessage: _angular_core.InputSignal<string>;
1836
+ /** Set by Signal Forms `[formField]`. Its errors show once the field is touched. */
1837
+ readonly errors: _angular_core.InputSignal<FieldErrors>;
1838
+ readonly touched: _angular_core.InputSignal<boolean>;
1839
+ readonly size: _angular_core.InputSignal<Size>;
1840
+ readonly disabled: _angular_core.InputSignal<boolean>;
1841
+ readonly value: _angular_core.ModelSignal<TreeSelectValue>;
1842
+ /** Ids of the expanded parents. */
1843
+ readonly expanded: _angular_core.ModelSignal<TreeSelectId[]>;
1844
+ readonly id: string;
1845
+ readonly panelId: string;
1846
+ readonly messageId: string;
1847
+ protected readonly icons: {
1848
+ ChevronDown: lucide_angular.LucideIconData;
1849
+ ChevronRight: lucide_angular.LucideIconData;
1850
+ Check: lucide_angular.LucideIconData;
1851
+ Minus: lucide_angular.LucideIconData;
1852
+ X: lucide_angular.LucideIconData;
1853
+ };
1854
+ readonly search: _angular_core.Signal<string>;
1855
+ readonly activeId: _angular_core.Signal<TreeSelectId | null>;
1856
+ private readonly triggerRef;
1857
+ readonly isDisabled: _angular_core.Signal<boolean>;
1858
+ /** Disabling the control while it is open hides the panel. */
1859
+ readonly isOpen: _angular_core.Signal<boolean>;
1860
+ readonly selectedIds: _angular_core.Signal<TreeSelectId[]>;
1861
+ /** Selected nodes, in value order. Unknown ids are skipped. */
1862
+ readonly selectedNodes: _angular_core.Signal<TreeSelectNode[]>;
1863
+ /** The visible rows: expanded branches, or the matches and their ancestors while searching. */
1864
+ readonly rows: _angular_core.Signal<TreeSelectRow[]>;
1865
+ /** The row that takes Tab focus: the active one, else the first selected, else the first. */
1866
+ readonly focusableId: _angular_core.Signal<TreeSelectId | null>;
1867
+ readonly hasError: _angular_core.Signal<boolean>;
1868
+ readonly errorText: _angular_core.Signal<string>;
1869
+ readonly triggerClasses: _angular_core.Signal<string>;
1870
+ constructor();
1871
+ checkState(node: TreeSelectNode): TreeSelectCheckState;
1872
+ /** `aria-checked` in multiple mode. */
1873
+ ariaChecked(node: TreeSelectNode): 'true' | 'false' | 'mixed';
1874
+ rowDomId(index: number): string;
1875
+ toggleOpen(): void;
1876
+ open(focusTree?: boolean): void;
1877
+ close(focusTrigger: boolean): void;
1878
+ toggleExpand(node: TreeSelectNode, force?: boolean): void;
1879
+ /** Click or Enter / Space on a row. */
1880
+ activate(row: TreeSelectRow): void;
1881
+ select(node: TreeSelectNode): void;
1882
+ toggleCheck(node: TreeSelectNode): void;
1883
+ remove(id: TreeSelectId, event: Event): void;
1884
+ onSearch(event: Event): void;
1885
+ onTriggerKeydown(event: KeyboardEvent): void;
1886
+ onSearchKeydown(event: KeyboardEvent): void;
1887
+ onRowKeydown(event: KeyboardEvent, row: TreeSelectRow, index: number): void;
1888
+ private onChange;
1889
+ private onTouched;
1890
+ writeValue(v: TreeSelectValue | undefined): void;
1891
+ registerOnChange(fn: (v: TreeSelectValue) => void): void;
1892
+ registerOnTouched(fn: () => void): void;
1893
+ setDisabledState(disabled: boolean): void;
1894
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TreeSelectComponent, never>;
1895
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TreeSelectComponent, "ngx-ds-tree-select", never, { "nodes": { "alias": "nodes"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "cascade": { "alias": "cascade"; "required": false; "isSignal": true; }; "selectableParents": { "alias": "selectableParents"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errors": { "alias": "errors"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "expanded": "expandedChange"; }, never, never, true, never>;
1896
+ }
1897
+
1673
1898
  declare class PaginationComponent {
1674
1899
  readonly i18n: _jdpo2008_ngx_ds.NgxDsLabels;
1675
1900
  readonly totalPages: _angular_core.InputSignal<number>;
@@ -2059,8 +2284,13 @@ declare class PopoverComponent {
2059
2284
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
2060
2285
  readonly opened: _angular_core.OutputEmitterRef<void>;
2061
2286
  readonly closed: _angular_core.OutputEmitterRef<void>;
2287
+ private readonly triggerRef;
2288
+ /** The interactive element projected as trigger, if any. */
2289
+ readonly nativeTrigger: _angular_core.WritableSignal<HTMLElement | null>;
2062
2290
  readonly panelClasses: _angular_core.Signal<string>;
2063
2291
  toggle(): void;
2292
+ /** Keyboard toggle for a non-interactive trigger; native ones fire `click`. */
2293
+ onTriggerKey(event: Event): void;
2064
2294
  constructor();
2065
2295
  private close;
2066
2296
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverComponent, never>;
@@ -2499,5 +2729,5 @@ declare class SplitterComponent {
2499
2729
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SplitterComponent, "ngx-ds-splitter", never, { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "size": "sizeChange"; "resizeEnd": "resizeEnd"; }, never, ["[splitter-start]", "[splitter-end]"], true, never>;
2500
2730
  }
2501
2731
 
2502
- export { ACCORDION_CONTROLLER, AccordionComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CalendarComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipGroupComponent, ColorPickerComponent, CommandPaletteComponent, ConfirmationComponent, ConfirmationService, ContextMenuComponent, DateRangePickerComponent, DatepickerComponent, DividerComponent, DrawerComponent, DropdownComponent, EmptyStateComponent, FileUploadComponent, FocusTrapDirective, FormFieldComponent, IconButtonComponent, IconComponent, InputComponent, KbdComponent, LightboxComponent, MenuButtonComponent, MenuComponent, ModalComponent, MultiSelectComponent, NGX_DS_LABELS, NGX_DS_LABELS_EN, NGX_DS_LABELS_ES, NGX_DS_LOCALE, NotificationCenterComponent, NotificationItemComponent, NumberInputComponent, OtpInputComponent, PaginationComponent, PasswordStrengthComponent, PopoverComponent, ProgressBarComponent, RadioComponent, RangeSliderComponent, RatingComponent, SearchInputComponent, SegmentedControlComponent, SelectComponent, SidebarComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, StepComponent, StepperComponent, SwitchComponent, TabComponent, TabContentDirective, TableComponent, TabsComponent, TagComponent, TagInputComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastrService, TooltipDirective, TreeNodeComponent, TreeViewComponent, UserMenuComponent, formatDayLabel, monthNames, parseTime, provideNgxDs, provideNgxDsLabels, provideNgxDsLocale, stepIndex, weekdayNames };
2503
- export type { AccordionController, AccordionSize, AccordionVariant, ActionColor, AlertType, AlertVariant, AutocompleteOption, AutocompleteSize, AutocompleteValue, AvatarColor, AvatarShape, AvatarSize, AvatarStatus, BadgeColor, BadgeSize, BadgeVariant, BreadcrumbItem, BreadcrumbSize, ButtonColor, ButtonSize, ButtonVariant, CalendarDayCell, CardPadding, CardShadow, CarouselFit, CarouselItem, CheckboxColor, CheckboxSize, ChipGroupSize, ChipGroupVariant, ChipItem, ColumnAlign, ColumnType, CommandItem, ConfirmationOptions, ConfirmationState, DateRange, DateRangePickerSize, DatepickerSize, DayCell, DayCellBase, DividerAlign, DividerOrientation, DividerVariant, DrawerSide, DrawerSize, DropdownOption, DropdownSize, DropdownValue, EmptyStateSize, FileUploadState, FileUploadStatus, InputSize, InputType, KbdSize, MenuButtonColor, MenuButtonSize, MenuItem, MenuSize, ModalSize, MultiSelectOption, MultiSelectSize, NgxDsConfig, NgxDsLabels, NgxDsTheme, NgxNotification, NotificationFilter, NotificationType, NumberInputSize, OtpSize, OtpType, PasswordCriterion, PasswordStrengthLevel, PopoverPlacement, ProgressBarColor, ProgressBarSize, RadioColor, RadioSize, RadioValue, RatingSize, SearchSize, SegmentOption, SegmentedControlSize, SelectMode, SelectOption, SelectSize, SelectValue, SidebarItem, SidebarSection, SkeletonVariant, SliderColor, SortDirection, SpinnerColor, SpinnerSize, SplitterOrientation, StepperOrientation, SwitchColor, SwitchSize, TableAction, TableColumn, TablePageEvent, TableSort, TabsSize, TabsVariant, TagColor, TagInputSize, TagSize, TagVariant, TextareaResize, TextareaSize, TimeOption, TimePickerHourFormat, TimePickerSize, TimelineItemStatus, TimelineVariant, Toast, ToastOptions, ToastPosition, ToastType, TooltipPlacement, TreeNode, UploadedFile, UserMenuAction, UserMenuUser };
2732
+ export { ACCORDION_CONTROLLER, AccordionComponent, AccordionItemComponent, AlertComponent, AutocompleteComponent, AvatarComponent, AvatarGroupComponent, BadgeComponent, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CalendarComponent, CardComponent, CarouselComponent, CheckboxComponent, ChipGroupComponent, ColorPickerComponent, CommandPaletteComponent, ConfirmationComponent, ConfirmationService, ContextMenuComponent, DateRangePickerComponent, DatepickerComponent, DividerComponent, DrawerComponent, DropdownComponent, EmptyStateComponent, FileUploadComponent, FocusTrapDirective, FormFieldComponent, IconButtonComponent, IconComponent, InlineEditComponent, InputComponent, KbdComponent, LightboxComponent, MenuButtonComponent, MenuComponent, ModalComponent, MultiSelectComponent, NGX_DS_LABELS, NGX_DS_LABELS_EN, NGX_DS_LABELS_ES, NGX_DS_LOCALE, NotificationCenterComponent, NotificationItemComponent, NumberInputComponent, OtpInputComponent, PRIMARY_STEPS, PaginationComponent, PasswordStrengthComponent, PopoverComponent, ProgressBarComponent, RadioComponent, RangeSliderComponent, RatingComponent, SearchInputComponent, SegmentedControlComponent, SelectComponent, SidebarComponent, SkeletonComponent, SpinnerComponent, SplitterComponent, StepComponent, StepperComponent, SwitchComponent, TabComponent, TabContentDirective, TableComponent, TabsComponent, TagComponent, TagInputComponent, TextareaComponent, TimePickerComponent, TimelineComponent, TimelineItemComponent, ToastComponent, ToastrService, TooltipDirective, TreeNodeComponent, TreeSelectComponent, TreeViewComponent, UserMenuComponent, applyPrimaryColor, contrastRatio, createPrimaryPalette, formatDayLabel, monthNames, parseHex, parseTime, primaryPaletteCss, provideNgxDs, provideNgxDsLabels, provideNgxDsLocale, stepIndex, weekdayNames };
2733
+ export type { AccordionController, AccordionSize, AccordionVariant, ActionColor, AlertType, AlertVariant, AutocompleteOption, AutocompleteSize, AutocompleteValue, AvatarColor, AvatarShape, AvatarSize, AvatarStatus, BadgeColor, BadgeSize, BadgeVariant, BreadcrumbItem, BreadcrumbSize, ButtonColor, ButtonSize, ButtonVariant, CalendarDayCell, CardPadding, CardShadow, CarouselFit, CarouselItem, CheckboxColor, CheckboxSize, ChipGroupSize, ChipGroupVariant, ChipItem, ColumnAlign, ColumnType, CommandItem, ConfirmationOptions, ConfirmationState, DateRange, DateRangePickerSize, DatepickerSize, DayCell, DayCellBase, DividerAlign, DividerOrientation, DividerVariant, DrawerSide, DrawerSize, DropdownOption, DropdownSize, DropdownValue, EmptyStateSize, FileUploadState, FileUploadStatus, InlineEditSize, InputSize, InputType, KbdSize, MenuButtonColor, MenuButtonSize, MenuItem, MenuSize, ModalSize, MultiSelectOption, MultiSelectSize, NgxDsConfig, NgxDsLabels, NgxDsTheme, NgxNotification, NotificationFilter, NotificationType, NumberInputSize, OtpSize, OtpType, PasswordCriterion, PasswordStrengthLevel, PopoverPlacement, PrimaryPalette, PrimaryStep, ProgressBarColor, ProgressBarSize, RadioColor, RadioSize, RadioValue, RatingSize, SearchSize, SegmentOption, SegmentedControlSize, SelectMode, SelectOption, SelectSize, SelectValue, SidebarItem, SidebarSection, SkeletonVariant, SliderColor, SortDirection, SpinnerColor, SpinnerSize, SplitterOrientation, StepperOrientation, SwitchColor, SwitchSize, TableAction, TableColumn, TablePageEvent, TableSort, TabsSize, TabsVariant, TagColor, TagInputSize, TagSize, TagVariant, TextareaResize, TextareaSize, TimeOption, TimePickerHourFormat, TimePickerSize, TimelineItemStatus, TimelineVariant, Toast, ToastOptions, ToastPosition, ToastType, TooltipPlacement, TreeNode, TreeSelectCheckState, TreeSelectId, TreeSelectNode, TreeSelectRow, TreeSelectSize, TreeSelectValue, UploadedFile, UserMenuAction, UserMenuUser };