shirkasoft-ui-components 1.3.14 → 1.4.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.
Files changed (90) hide show
  1. package/README.md +447 -67
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +7 -7
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +11 -11
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +6 -6
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +914 -0
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -0
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +8 -8
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +901 -753
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +5 -5
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +16 -9
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +646 -0
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -0
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +44 -17
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +16 -16
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +42 -31
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +8 -8
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +79 -29
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +7 -7
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +50 -23
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +6 -6
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +4 -4
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +165 -111
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +21 -23
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +9 -9
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +63 -30
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +280 -0
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -0
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +180 -0
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -0
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +10 -22
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +60 -53
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +29 -11
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +22 -11
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +9 -10
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/package.json +33 -3
  61. package/src/baseline.css +2472 -0
  62. package/src/theme.css +15 -543
  63. package/src/themes/ocean.css +56 -0
  64. package/src/themes/sunset.css +55 -0
  65. package/src/themes/violet.css +25 -0
  66. package/src/tokens.css +612 -0
  67. package/types/shirkasoft-ui-components-button.d.ts +1 -1
  68. package/types/shirkasoft-ui-components-config.d.ts +368 -0
  69. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +2 -1
  70. package/types/shirkasoft-ui-components-date-picker.d.ts +276 -224
  71. package/types/shirkasoft-ui-components-fieldset.d.ts +2 -1
  72. package/types/shirkasoft-ui-components-file-upload.d.ts +11 -5
  73. package/types/shirkasoft-ui-components-icons.d.ts +1422 -0
  74. package/types/shirkasoft-ui-components-knob.d.ts +28 -7
  75. package/types/shirkasoft-ui-components-modal.d.ts +11 -7
  76. package/types/shirkasoft-ui-components-notification.d.ts +2 -1
  77. package/types/shirkasoft-ui-components-price-input.d.ts +37 -9
  78. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +3 -3
  79. package/types/shirkasoft-ui-components-select.d.ts +24 -8
  80. package/types/shirkasoft-ui-components-sidebar.d.ts +2 -1
  81. package/types/shirkasoft-ui-components-table.d.ts +91 -77
  82. package/types/shirkasoft-ui-components-tag.d.ts +1 -1
  83. package/types/shirkasoft-ui-components-text-field.d.ts +29 -13
  84. package/types/shirkasoft-ui-components-theme-picker.d.ts +83 -0
  85. package/types/shirkasoft-ui-components-theme.d.ts +88 -0
  86. package/types/shirkasoft-ui-components-timeline.d.ts +5 -4
  87. package/types/shirkasoft-ui-components-toggle.d.ts +20 -13
  88. package/types/shirkasoft-ui-components-tooltip.d.ts +6 -0
  89. package/types/shirkasoft-ui-components-utils.d.ts +16 -6
  90. package/types/shirkasoft-ui-components-wizard.d.ts +4 -3
@@ -1,20 +1,33 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef } from '@angular/core';
3
3
  import { ControlValueAccessor } from '@angular/forms';
4
+ import { FormValueControl } from '@angular/forms/signals';
4
5
 
5
6
  /**
6
7
  * Shirkasoft UI Components.
7
8
  * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
8
9
  * Belongs to Shirkasoft.
9
10
  */
10
- /** SVG radial knob with drag and keyboard support. Implements ControlValueAccessor. */
11
- declare class KnobComponent implements ControlValueAccessor {
11
+ /**
12
+ * SVG radial knob with drag and keyboard support.
13
+ *
14
+ * Implements `ControlValueAccessor` (reactive/template-driven forms) and the
15
+ * Angular Signal Forms `FormValueControl<number>` contract through its
16
+ * `value` model, so it also works with `[formField]`.
17
+ */
18
+ declare class KnobComponent implements ControlValueAccessor, FormValueControl<number> {
12
19
  /** Current value. Two-way bindable with [(value)]. */
13
20
  value: _angular_core.ModelSignal<number>;
14
- /** Minimum value. */
15
- min: _angular_core.InputSignal<number>;
16
- /** Maximum value. */
17
- max: _angular_core.InputSignal<number>;
21
+ /**
22
+ * Minimum value. Optional so the component satisfies the Signal Forms
23
+ * `FormUiControl` contract (`min` accepts `undefined`); defaults to 0.
24
+ */
25
+ min: _angular_core.InputSignal<number | undefined>;
26
+ /**
27
+ * Maximum value. Optional so the component satisfies the Signal Forms
28
+ * `FormUiControl` contract (`max` accepts `undefined`); defaults to 100.
29
+ */
30
+ max: _angular_core.InputSignal<number | undefined>;
18
31
  /** Increment used by arrows and pointer drag rounding. */
19
32
  step: _angular_core.InputSignal<number>;
20
33
  /** Diameter of the knob in px. */
@@ -37,6 +50,8 @@ declare class KnobComponent implements ControlValueAccessor {
37
50
  change: _angular_core.OutputEmitterRef<number>;
38
51
  /** Emitted when the user releases the pointer. */
39
52
  end: _angular_core.OutputEmitterRef<number>;
53
+ /** Emitted on blur so Signal Forms can mark the field as touched. */
54
+ touch: _angular_core.OutputEmitterRef<void>;
40
55
  protected knobSvg: _angular_core.Signal<ElementRef<SVGElement> | undefined>;
41
56
  private onChange;
42
57
  private onTouched;
@@ -44,6 +59,10 @@ declare class KnobComponent implements ControlValueAccessor {
44
59
  private formDisabled;
45
60
  /** Effective disabled state combining the `disabled` input and the form binding. */
46
61
  protected effectiveDisabled: _angular_core.Signal<boolean>;
62
+ /** Minimum value with the `0` fallback applied. */
63
+ protected effectiveMin: _angular_core.Signal<number>;
64
+ /** Maximum value with the `100` fallback applied. */
65
+ protected effectiveMax: _angular_core.Signal<number>;
47
66
  protected r: _angular_core.Signal<number>;
48
67
  protected center: _angular_core.Signal<number>;
49
68
  protected fraction: _angular_core.Signal<number>;
@@ -52,6 +71,8 @@ declare class KnobComponent implements ControlValueAccessor {
52
71
  writeValue(value: any): void;
53
72
  registerOnChange(fn: any): void;
54
73
  registerOnTouched(fn: any): void;
74
+ /** Marks the control as touched when focus leaves the knob. */
75
+ onBlur(): void;
55
76
  setDisabledState(isDisabled: boolean): void;
56
77
  onPointerDown(event: PointerEvent): void;
57
78
  onPointerMove(event: PointerEvent): void;
@@ -63,7 +84,7 @@ declare class KnobComponent implements ControlValueAccessor {
63
84
  private getArcPath;
64
85
  private anglePoint;
65
86
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<KnobComponent, never>;
66
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<KnobComponent, "shk-knob", 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; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "rangeColor": { "alias": "rangeColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "change": "change"; "end": "end"; }, never, never, true, never>;
87
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<KnobComponent, "shk-knob", 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; }; "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; "valueColor": { "alias": "valueColor"; "required": false; "isSignal": true; }; "rangeColor": { "alias": "rangeColor"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "change": "change"; "end": "end"; "touch": "touch"; }, never, never, true, never>;
67
88
  }
68
89
 
69
90
  export { KnobComponent };
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Type, ViewContainerRef, ComponentRef } from '@angular/core';
3
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
3
4
 
4
5
  /**
5
6
  * Shirkasoft UI Components.
@@ -64,18 +65,13 @@ declare class ModalService {
64
65
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<ModalService>;
65
66
  }
66
67
 
67
- /**
68
- * Shirkasoft UI Components.
69
- * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
70
- * Belongs to Shirkasoft.
71
- */
72
68
  /**
73
69
  * Modal dialog that renders a dynamically loaded component, tracks its
74
70
  * form validity and submit outputs, and delegates accept/cancel to the
75
71
  * shared ModalService.
76
72
  */
77
73
  declare class ModalComponent {
78
- protected getIcon: (name: any) => any;
74
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
79
75
  private notificationSrv;
80
76
  private destroyRef;
81
77
  private modalSrv;
@@ -130,12 +126,20 @@ declare class ModalComponent {
130
126
  toggleExpand(): void;
131
127
  /** Validates the dynamic component form and triggers its `onSubmit`. */
132
128
  onAccept(): void;
133
- /** Resolves the dynamic component's form (property or getter function). */
129
+ /**
130
+ * Resolves the dynamic component's form: a reactive form (property or getter
131
+ * function) or a Signal Forms `FieldTree`, which is itself a function that
132
+ * returns its `FieldState`.
133
+ */
134
134
  private getForm;
135
+ /** True when the form is a Signal Forms `FieldState`, not a reactive control. */
136
+ private isSignalField;
135
137
  /** Recursively checks for real validation errors (ignoring 'warning'). */
136
138
  private hasRealErrors;
137
139
  /** Marks a form (and all its descendants) as touched. */
138
140
  private markAllAsTouched;
141
+ /** Normalizes `controls` (record for groups, array for form arrays). */
142
+ private childControls;
139
143
  /**
140
144
  * True when the component exposes `onSubmit`. The `form` is optional:
141
145
  * without it, validation is skipped and `onSubmit` runs directly.
@@ -1,3 +1,4 @@
1
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
1
2
  import * as _angular_core from '@angular/core';
2
3
 
3
4
  /**
@@ -57,7 +58,7 @@ declare class NotificationComponent {
57
58
  /** Position of the notification stack: center, right or left top. */
58
59
  position: _angular_core.InputSignal<NotificationPosition>;
59
60
  private notificationService;
60
- protected getIcon: (name: any) => any;
61
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
61
62
  /** Maps each notification type to its internal icon name. */
62
63
  private readonly iconMap;
63
64
  /** Resolves the icon name for a notification type. */
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ControlValueAccessor, FormControl } from '@angular/forms';
3
+ import { FormValueControl } from '@angular/forms/signals';
3
4
 
4
5
  /**
5
6
  * Shirkasoft UI Components.
@@ -16,7 +17,7 @@ import { ControlValueAccessor, FormControl } from '@angular/forms';
16
17
  * Text-based input (`type="text"` + `inputmode="decimal"`) with decimal
17
18
  * precision control, min/max clamping on blur and thousands formatting.
18
19
  */
19
- declare class PriceInputComponent implements ControlValueAccessor {
20
+ declare class PriceInputComponent implements ControlValueAccessor, FormValueControl<number | null> {
20
21
  /** Reactive control. When provided it takes precedence over `value`/`valueChange`. */
21
22
  control: _angular_core.InputSignal<FormControl<number | null> | undefined>;
22
23
  /** Numeric value (two-way), used when no `control` is bound. */
@@ -32,12 +33,18 @@ declare class PriceInputComponent implements ControlValueAccessor {
32
33
  /** Disables the input. */
33
34
  disabled: _angular_core.InputSignal<boolean>;
34
35
  /** Minimum allowed value (clamped on blur). */
35
- min: _angular_core.InputSignal<number>;
36
+ min: _angular_core.InputSignal<number | undefined>;
36
37
  /** Maximum allowed value (clamped on blur). */
37
- max: _angular_core.InputSignal<number>;
38
- /** Maximum number of decimal places (0 = integer). */
39
- decimals: _angular_core.InputSignal<number>;
40
- /** Symbol shown in the mode toggle button when not a percentage. */
38
+ max: _angular_core.InputSignal<number | undefined>;
39
+ /**
40
+ * Maximum number of decimal places (0 = integer). Unset = the `numbers.decimals`
41
+ * option, else the digits of the `numbers.currency` option (2 for USD).
42
+ */
43
+ decimals: _angular_core.InputSignal<number | undefined>;
44
+ /**
45
+ * Symbol shown in the mode toggle button when not a percentage. Empty = the
46
+ * `numbers.currencySymbol` option, else the symbol of `numbers.currency` ('$').
47
+ */
41
48
  currency: _angular_core.InputSignal<string>;
42
49
  /** Placeholder text of the native input. */
43
50
  placeholder: _angular_core.InputSignal<string>;
@@ -49,8 +56,20 @@ declare class PriceInputComponent implements ControlValueAccessor {
49
56
  showError: _angular_core.InputSignal<boolean>;
50
57
  /** Message rendered when the field is in error state. */
51
58
  errorMessage: _angular_core.InputSignal<string>;
59
+ /** Emitted on blur so Signal Forms can mark the field as touched. */
60
+ touch: _angular_core.OutputEmitterRef<void>;
52
61
  private destroyRef;
53
62
  private transloco;
63
+ /** Library-wide options: currency, decimals and number separators. */
64
+ private readonly config;
65
+ /** Decimal places actually used. */
66
+ private readonly effectiveDecimals;
67
+ /** Locale of the grouping/decimal separators. */
68
+ private readonly numbersLocale;
69
+ /** Decimal separator of the locale (`.` or `,`), used while editing. */
70
+ private readonly decimalSeparator;
71
+ /** Symbol shown in the toggle: input, `numbers.currencySymbol`, or the currency's symbol. */
72
+ readonly displaySymbol: _angular_core.Signal<string>;
54
73
  /** Text currently shown in the input (raw while focused, formatted on blur). */
55
74
  displayText: _angular_core.WritableSignal<string>;
56
75
  /** Whether the native input currently has focus. */
@@ -76,7 +95,10 @@ declare class PriceInputComponent implements ControlValueAccessor {
76
95
  constructor();
77
96
  /** Toggles between amount and percentage modes (unless disabled). */
78
97
  toggleMode(): void;
79
- /** Selects the whole value on focus so the user can type over it. */
98
+ /**
99
+ * Switches to the editable form (no grouping, locale decimal separator) and
100
+ * selects it so the user can type over it or edit in the middle safely.
101
+ */
80
102
  onFocus(event: FocusEvent): void;
81
103
  /** Clamps, rounds and formats the value when the field loses focus. */
82
104
  onBlur(): void;
@@ -87,14 +109,20 @@ declare class PriceInputComponent implements ControlValueAccessor {
87
109
  /** Writes the value to the effective binding source. */
88
110
  private setValue;
89
111
  private roundTo;
90
- /** Formats a number with thousands separator and up to `decimals` places. */
112
+ /** Formats a number with the locale's separators and up to `decimals` places. */
91
113
  private formatNumber;
114
+ /** Number as edited: no grouping, locale decimal separator ("1234,5" for es-ES). */
115
+ private editableNumber;
116
+ /** Parses the editable text back to a number (either separator is accepted). */
117
+ private parseEditable;
118
+ /** Value of the effective binding source (control or `value`). */
119
+ private currentValue;
92
120
  writeValue(value: any): void;
93
121
  registerOnChange(fn: any): void;
94
122
  registerOnTouched(fn: any): void;
95
123
  setDisabledState(isDisabled: boolean): void;
96
124
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PriceInputComponent, never>;
97
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PriceInputComponent, "shk-price-input", never, { "control": { "alias": "control"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "isPercentage": { "alias": "isPercentage"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "currency": { "alias": "currency"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "preventNegative": { "alias": "preventNegative"; "required": false; "isSignal": true; }; "showError": { "alias": "showError"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "isPercentage": "isPercentageChange"; }, never, never, true, never>;
125
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PriceInputComponent, "shk-price-input", never, { "control": { "alias": "control"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "isPercentage": { "alias": "isPercentage"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "decimals": { "alias": "decimals"; "required": false; "isSignal": true; }; "currency": { "alias": "currency"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "preventNegative": { "alias": "preventNegative"; "required": false; "isSignal": true; }; "showError": { "alias": "showError"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "isPercentage": "isPercentageChange"; "touch": "touch"; }, never, never, true, never>;
98
126
  }
99
127
 
100
128
  export { PriceInputComponent };
@@ -1,5 +1,5 @@
1
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
1
2
  import * as _angular_core from '@angular/core';
2
- import { LucideX } from '@lucide/angular';
3
3
 
4
4
  interface RailSidebarItem {
5
5
  id: string;
@@ -94,8 +94,8 @@ declare class RailSidebarComponent {
94
94
  toggleSidebar: _angular_core.OutputEmitterRef<boolean>;
95
95
  /** Emitted when the workspace/home entry is clicked. */
96
96
  workspaceClick: _angular_core.OutputEmitterRef<void>;
97
- protected getIcon: (name: any) => any;
98
- protected readonly closeIcon: typeof LucideX;
97
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
98
+ protected readonly closeIcon: shirkasoft_ui_components_icons.IconNode;
99
99
  /** Current viewport width (updated on resize). */
100
100
  private viewportWidth;
101
101
  /** Whether the mobile drawer mode is active. */
@@ -1,6 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef } from '@angular/core';
3
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
3
4
  import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
5
+ import { FormValueControl } from '@angular/forms/signals';
4
6
 
5
7
  /** Option rendered by the select, optionally prefixed with a "new entry" badge. */
6
8
  interface SelectOption {
@@ -18,10 +20,10 @@ interface SelectOption {
18
20
  * selection, searchable, keyboard navigation, pagination, custom entries and
19
21
  * reactive-form integration.
20
22
  */
21
- declare class SelectComponent implements ControlValueAccessor {
23
+ declare class SelectComponent implements ControlValueAccessor, FormValueControl<any> {
22
24
  private elementRef;
23
- /** Resolves icon names to lucide components, falling back to a chevron. */
24
- protected getIcon: (name: any) => any;
25
+ /** Resolves icon names to SVG data, falling back to a chevron. */
26
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
25
27
  /** Available options. */
26
28
  options: _angular_core.InputSignal<SelectOption[]>;
27
29
  /** Enables multi-select mode. */
@@ -64,6 +66,8 @@ declare class SelectComponent implements ControlValueAccessor {
64
66
  showEmptyOption: _angular_core.InputSignal<boolean>;
65
67
  /** Emits when the selection changes (new value or array in multiple mode). */
66
68
  selectionChange: _angular_core.OutputEmitterRef<any>;
69
+ /** Emitted on blur/close so Signal Forms can mark the field as touched. */
70
+ touch: _angular_core.OutputEmitterRef<void>;
67
71
  /** Emits the debounced search term while typing. */
68
72
  search: _angular_core.OutputEmitterRef<string>;
69
73
  /** Reference to the filter input inside the dropdown (when searchable). */
@@ -74,8 +78,10 @@ declare class SelectComponent implements ControlValueAccessor {
74
78
  private selectTrigger;
75
79
  /** Reference to the dropdown list container. */
76
80
  private dropdownContainer;
77
- /** Underlying selection value (mirrors the reactive control). */
78
- private _value;
81
+ /** Selection value. Two-way bindable and used by Signal Forms `[formField]`. */
82
+ value: _angular_core.ModelSignal<any>;
83
+ /** Internal alias kept for the existing implementation. */
84
+ private get _value();
79
85
  /** Whether the dropdown is open. */
80
86
  isOpen: _angular_core.WritableSignal<boolean>;
81
87
  /** Index of the currently focused option for keyboard navigation. */
@@ -97,8 +103,6 @@ declare class SelectComponent implements ControlValueAccessor {
97
103
  /** Whether control status/value subscriptions have been attached. */
98
104
  private subscribed;
99
105
  private valueSubscribed;
100
- /** Current selection value. */
101
- value: _angular_core.Signal<any>;
102
106
  /** True when the select is disabled via input or by the reactive form. */
103
107
  isDisabled: _angular_core.Signal<boolean>;
104
108
  /** Resolves the form control from `control` or from `formGroup`+`label`. */
@@ -130,6 +134,18 @@ declare class SelectComponent implements ControlValueAccessor {
130
134
  width: number;
131
135
  }>;
132
136
  /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
137
+ /** Max height of the dropdown panel (matches `max-h-[240px]` in the template). */
138
+ private static readonly DROPDOWN_MAX_HEIGHT;
139
+ /** Approximate height of one option row (`py-2` + `text-sm`), used before the panel is rendered. */
140
+ private static readonly OPTION_HEIGHT;
141
+ /**
142
+ * Height the panel will take: the rendered height when the panel already
143
+ * exists, otherwise an estimate from the number of rows. Before this the
144
+ * position always assumed 240px, so a 3-option select near the bottom of the
145
+ * viewport opened upward even though it fitted below.
146
+ */
147
+ private dropdownHeight;
148
+ /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
133
149
  computeDropdownPosition(): void;
134
150
  private transloco;
135
151
  /** ControlValueAccessor onChange callback. */
@@ -187,7 +203,7 @@ declare class SelectComponent implements ControlValueAccessor {
187
203
  /** Stores the onTouched callback (ControlValueAccessor). */
188
204
  registerOnTouched(fn: any): void;
189
205
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent, never>;
190
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "validCombinations": { "alias": "validCombinations"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isAllDataLoaded": { "alias": "isAllDataLoaded"; "required": false; "isSignal": true; }; "allowCustomEntries": { "alias": "allowCustomEntries"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "isSearchable": { "alias": "isSearchable"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "usePagination": { "alias": "usePagination"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "preserveSearchOnLoad": { "alias": "preserveSearchOnLoad"; "required": false; "isSignal": true; }; "emptyMessageKey": { "alias": "emptyMessageKey"; "required": false; "isSignal": true; }; "dropdownUpward": { "alias": "dropdownUpward"; "required": false; "isSignal": true; }; "showEmptyOption": { "alias": "showEmptyOption"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "search": "search"; }, never, never, true, never>;
206
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "validCombinations": { "alias": "validCombinations"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isAllDataLoaded": { "alias": "isAllDataLoaded"; "required": false; "isSignal": true; }; "allowCustomEntries": { "alias": "allowCustomEntries"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "isSearchable": { "alias": "isSearchable"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "usePagination": { "alias": "usePagination"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "preserveSearchOnLoad": { "alias": "preserveSearchOnLoad"; "required": false; "isSignal": true; }; "emptyMessageKey": { "alias": "emptyMessageKey"; "required": false; "isSignal": true; }; "dropdownUpward": { "alias": "dropdownUpward"; "required": false; "isSignal": true; }; "showEmptyOption": { "alias": "showEmptyOption"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "touch": "touch"; "search": "search"; "value": "valueChange"; }, never, never, true, never>;
191
207
  }
192
208
 
193
209
  export { SelectComponent };
@@ -1,3 +1,4 @@
1
+ import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
1
2
  import * as _angular_core from '@angular/core';
2
3
 
3
4
  interface SidebarItem {
@@ -71,7 +72,7 @@ declare class SidebarComponent {
71
72
  itemClick: _angular_core.OutputEmitterRef<SidebarItem>;
72
73
  /** Emitted with the new collapsed state after toggling. */
73
74
  toggle: _angular_core.OutputEmitterRef<boolean>;
74
- protected getIcon: (name: any) => any;
75
+ protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
75
76
  /** Currently selected item id. */
76
77
  protected selectedId: _angular_core.WritableSignal<string>;
77
78
  /** Set of group ids currently expanded. */