@lifecorner/angular-ui-kit 3.9.0 → 3.10.1

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.
@@ -1,5 +1,6 @@
1
- import { ControlValueAccessor } from "@angular/forms";
2
1
  import * as i0 from "@angular/core";
2
+ import { OutputRef } from "@angular/core";
3
+ import { ControlValueAccessor } from "@angular/forms";
3
4
  /**
4
5
  * Textarea component for multi-line text input.
5
6
  *
@@ -11,91 +12,152 @@ import * as i0 from "@angular/core";
11
12
  * - Validation error message and helper text
12
13
  * - Disabled and readonly states
13
14
  * - ControlValueAccessor integration for reactive forms
15
+ * - Plain form posts without JavaScript: `name`, and a `value` that is
16
+ * prerendered into the native `<textarea>`
14
17
  *
15
18
  * @example
16
19
  * ```html
17
20
  * <lc-textarea placeholder="Enter message" [autoResize]="true" [(ngModel)]="message" />
21
+ * <lc-textarea label="Message" name="message" [required]="true" [value]="draft" />
18
22
  * ```
19
23
  */
20
24
  export declare class TextareaComponent implements ControlValueAccessor {
21
25
  private readonly textareaElement;
26
+ private readonly isServer;
22
27
  /**
23
28
  * Visual variant of the textarea
29
+ * @default 'outline'
24
30
  */
25
31
  readonly variant: import("@angular/core").InputSignal<"outline" | "filled">;
26
32
  /**
27
33
  * Size of the textarea
34
+ * @default 'md'
28
35
  */
29
36
  readonly size: import("@angular/core").InputSignal<"xs" | "sm" | "md" | "lg">;
30
37
  /**
31
38
  * Whether the textarea is disabled
39
+ * @default false
32
40
  */
33
41
  readonly disabled: import("@angular/core").InputSignal<boolean>;
34
42
  /**
35
43
  * Whether the textarea is in error state
44
+ * @default false
36
45
  */
37
46
  readonly error: import("@angular/core").InputSignal<boolean>;
38
47
  /**
39
48
  * Whether the textarea is required
49
+ * @default false
40
50
  */
41
51
  readonly required: import("@angular/core").InputSignal<boolean>;
52
+ /**
53
+ * Show the `*` after the label of a `required` field. `false` keeps the
54
+ * required semantics (`required`, `aria-required`) without the asterisk —
55
+ * for forms where every field is required.
56
+ * @default true
57
+ */
58
+ readonly requiredIndicator: import("@angular/core").InputSignal<boolean>;
59
+ /**
60
+ * Accessible name of the `*` marker, for API parity with `lc-input`.
61
+ * `lc-textarea` hides the `*` from assistive technology, because the native
62
+ * `required` state is announced already and naming the `*` would say
63
+ * "required" twice.
64
+ * @default 'required'
65
+ */
66
+ readonly requiredAriaLabel: import("@angular/core").InputSignal<string>;
42
67
  /**
43
68
  * Whether the textarea is readonly
69
+ * @default false
44
70
  */
45
71
  readonly readonly: import("@angular/core").InputSignal<boolean>;
46
72
  /**
47
73
  * Placeholder text
74
+ * @default ''
48
75
  */
49
76
  readonly placeholder: import("@angular/core").InputSignal<string>;
50
77
  /**
51
78
  * Label text displayed above the textarea
79
+ * @default ''
52
80
  */
53
81
  readonly label: import("@angular/core").InputSignal<string>;
54
82
  /**
55
83
  * Helper text displayed below the textarea
84
+ * @default ''
56
85
  */
57
86
  readonly helperText: import("@angular/core").InputSignal<string>;
58
87
  /**
59
88
  * Error message displayed when error is true
89
+ * @default ''
60
90
  */
61
91
  readonly errorMessage: import("@angular/core").InputSignal<string>;
62
92
  /**
63
93
  * ARIA label for accessibility
94
+ * @default undefined
64
95
  */
65
96
  readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
97
+ /**
98
+ * Native `name` of the inner `<textarea>`, so a form posts the text without
99
+ * JavaScript. Unset = no attribute. A `disabled` textarea is not posted
100
+ * (HTML); use `readonly` to post a fixed text.
101
+ * @default undefined
102
+ */
103
+ readonly name: import("@angular/core").InputSignal<string | undefined>;
66
104
  /**
67
105
  * Number of visible text rows
106
+ * @default 3
68
107
  */
69
108
  readonly rows: import("@angular/core").InputSignal<number>;
70
109
  /**
71
110
  * Maximum number of characters allowed
111
+ * @default undefined
72
112
  */
73
113
  readonly maxLength: import("@angular/core").InputSignal<number | undefined>;
74
114
  /**
75
115
  * Whether to show character count
116
+ * @default false
76
117
  */
77
118
  readonly showCharacterCount: import("@angular/core").InputSignal<boolean>;
78
119
  /**
79
120
  * Whether to automatically resize based on content
121
+ * @default false
80
122
  */
81
123
  readonly autoResize: import("@angular/core").InputSignal<boolean>;
82
124
  /**
83
125
  * Minimum number of rows for auto-resize
126
+ * @default 3
84
127
  */
85
128
  readonly minRows: import("@angular/core").InputSignal<number>;
86
129
  /**
87
130
  * Maximum number of rows for auto-resize
131
+ * @default undefined
88
132
  */
89
133
  readonly maxRows: import("@angular/core").InputSignal<number | undefined>;
90
134
  /**
91
- * Emitted when value changes
135
+ * Current text, two-way bindable (`[value]` / `[(value)]`). It pre-fills the
136
+ * native textarea, in prerendered HTML too, so a server-rendered page can
137
+ * keep a visitor's text. Emits `valueChange` whenever it changes: once per
138
+ * keystroke that changes the text, and when a bound form control or code
139
+ * sets a different text. With a form control, the control's value wins;
140
+ * don't bind both.
141
+ * @default ''
142
+ */
143
+ readonly value: import("@angular/core").ModelSignal<string>;
144
+ /**
145
+ * The model's change output as a class property, so code that subscribes to
146
+ * it (`textarea.valueChange.subscribe(…)`, `outputToObservable(…)`) keeps
147
+ * compiling as in 3.9. Template bindings `(valueChange)` use the model.
92
148
  */
93
- readonly valueChange: import("@angular/core").OutputEmitterRef<string>;
149
+ readonly valueChange: OutputRef<string>;
94
150
  /** Per-instance id: links label, error and helper text to the control. */
95
151
  readonly textareaId: string;
96
152
  readonly errorId: string;
97
153
  readonly helperId: string;
98
- readonly value: import("@angular/core").WritableSignal<string>;
154
+ /**
155
+ * The native textarea's value. On the server a leading line break gets one
156
+ * extra `\n`: the HTML parser drops the first line break after `<textarea>`,
157
+ * and the server's DOM serialiser doesn't add the one the HTML
158
+ * serialisation rules require, so the prerendered page would lose it.
159
+ */
160
+ protected readonly renderedValue: import("@angular/core").Signal<string>;
99
161
  private readonly formDisabled;
100
162
  /**
101
163
  * Computed disabled state from both input and form control
@@ -159,6 +221,16 @@ export declare class TextareaComponent implements ControlValueAccessor {
159
221
  "required": false;
160
222
  "isSignal": true;
161
223
  };
224
+ "requiredIndicator": {
225
+ "alias": "requiredIndicator";
226
+ "required": false;
227
+ "isSignal": true;
228
+ };
229
+ "requiredAriaLabel": {
230
+ "alias": "requiredAriaLabel";
231
+ "required": false;
232
+ "isSignal": true;
233
+ };
162
234
  "readonly": {
163
235
  "alias": "readonly";
164
236
  "required": false;
@@ -189,6 +261,11 @@ export declare class TextareaComponent implements ControlValueAccessor {
189
261
  "required": false;
190
262
  "isSignal": true;
191
263
  };
264
+ "name": {
265
+ "alias": "name";
266
+ "required": false;
267
+ "isSignal": true;
268
+ };
192
269
  "rows": {
193
270
  "alias": "rows";
194
271
  "required": false;
@@ -219,7 +296,12 @@ export declare class TextareaComponent implements ControlValueAccessor {
219
296
  "required": false;
220
297
  "isSignal": true;
221
298
  };
299
+ "value": {
300
+ "alias": "value";
301
+ "required": false;
302
+ "isSignal": true;
303
+ };
222
304
  }, {
223
- "valueChange": "valueChange";
305
+ "value": "valueChange";
224
306
  }, never, never, true, never>;
225
307
  }