@spartan-ng/cli 0.0.1-alpha.656 → 0.0.1-alpha.658

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 (65) hide show
  1. package/package.json +1 -1
  2. package/src/generators/base/generator.js +4 -6
  3. package/src/generators/base/generator.js.map +1 -1
  4. package/src/generators/healthcheck/generator.js +2 -0
  5. package/src/generators/healthcheck/generator.js.map +1 -1
  6. package/src/generators/healthcheck/healthchecks/hlm-form-field.d.ts +2 -0
  7. package/src/generators/healthcheck/healthchecks/hlm-form-field.js +35 -0
  8. package/src/generators/healthcheck/healthchecks/hlm-form-field.js.map +1 -0
  9. package/src/generators/migrate-form-field/compat.d.ts +2 -0
  10. package/src/generators/migrate-form-field/compat.js +6 -0
  11. package/src/generators/migrate-form-field/compat.js.map +1 -0
  12. package/src/generators/migrate-form-field/generator.d.ts +4 -0
  13. package/src/generators/migrate-form-field/generator.js +60 -0
  14. package/src/generators/migrate-form-field/generator.js.map +1 -0
  15. package/src/generators/migrate-form-field/schema.d.ts +4 -0
  16. package/src/generators/migrate-form-field/schema.json +19 -0
  17. package/src/generators/ui/libs/autocomplete/files/lib/hlm-autocomplete-input.ts.template +9 -4
  18. package/src/generators/ui/libs/badge/files/lib/hlm-badge.ts.template +7 -8
  19. package/src/generators/ui/libs/card/files/lib/hlm-card-action.ts.template +1 -1
  20. package/src/generators/ui/libs/card/files/lib/hlm-card-content.ts.template +1 -1
  21. package/src/generators/ui/libs/card/files/lib/hlm-card-description.ts.template +1 -1
  22. package/src/generators/ui/libs/card/files/lib/hlm-card-footer.ts.template +1 -4
  23. package/src/generators/ui/libs/card/files/lib/hlm-card-header.ts.template +1 -1
  24. package/src/generators/ui/libs/card/files/lib/hlm-card-title.ts.template +1 -1
  25. package/src/generators/ui/libs/card/files/lib/hlm-card.ts.template +1 -4
  26. package/src/generators/ui/libs/checkbox/files/lib/hlm-checkbox.ts.template +18 -2
  27. package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chip-input.ts.template +1 -1
  28. package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-chips.ts.template +22 -7
  29. package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-input.ts.template +8 -4
  30. package/src/generators/ui/libs/combobox/files/lib/hlm-combobox-trigger.ts.template +10 -1
  31. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker-multi.ts.template +38 -5
  32. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-picker.ts.template +36 -6
  33. package/src/generators/ui/libs/date-picker/files/lib/hlm-date-range-picker.ts.template +33 -4
  34. package/src/generators/ui/libs/field/files/index.ts.template +3 -3
  35. package/src/generators/ui/libs/field/files/lib/hlm-field-content.ts.template +1 -1
  36. package/src/generators/ui/libs/field/files/lib/hlm-field-description.ts.template +40 -2
  37. package/src/generators/ui/libs/field/files/lib/hlm-field-error.ts.template +89 -27
  38. package/src/generators/ui/libs/field/files/lib/hlm-field-group.ts.template +1 -1
  39. package/src/generators/ui/libs/field/files/lib/hlm-field-legend.ts.template +2 -2
  40. package/src/generators/ui/libs/field/files/lib/hlm-field.ts.template +9 -6
  41. package/src/generators/ui/libs/input/files/lib/hlm-input.ts.template +10 -69
  42. package/src/generators/ui/libs/input-group/files/lib/hlm-input-group.ts.template +15 -5
  43. package/src/generators/ui/libs/label/files/lib/hlm-label.ts.template +4 -1
  44. package/src/generators/ui/libs/native-select/files/lib/hlm-native-select.ts.template +32 -13
  45. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio-group.ts.template +18 -2
  46. package/src/generators/ui/libs/radio-group/files/lib/hlm-radio.ts.template +16 -1
  47. package/src/generators/ui/libs/select/files/lib/hlm-select-trigger.ts.template +5 -2
  48. package/src/generators/ui/libs/slider/files/lib/hlm-slider.ts.template +3 -4
  49. package/src/generators/ui/libs/textarea/files/lib/hlm-textarea.ts.template +10 -71
  50. package/src/generators/ui/primitive-deps.js +0 -1
  51. package/src/generators/ui/primitive-deps.js.map +1 -1
  52. package/src/generators/ui/primitives.d.ts +1 -1
  53. package/src/generators/ui/style-lyra.css +16 -16
  54. package/src/generators/ui/style-maia.css +16 -16
  55. package/src/generators/ui/style-mira.css +16 -16
  56. package/src/generators/ui/style-nova.css +16 -16
  57. package/src/generators/ui/style-vega.css +16 -16
  58. package/src/generators/ui/supported-ui-libraries.json +54 -56
  59. package/src/generators/ui/libs/form-field/files/index.ts.template +0 -9
  60. package/src/generators/ui/libs/form-field/files/lib/hlm-error.ts.template +0 -12
  61. package/src/generators/ui/libs/form-field/files/lib/hlm-form-field.ts.template +0 -39
  62. package/src/generators/ui/libs/form-field/files/lib/hlm-hint.ts.template +0 -12
  63. package/src/generators/ui/libs/form-field/generator.d.ts +0 -3
  64. package/src/generators/ui/libs/form-field/generator.js +0 -9
  65. package/src/generators/ui/libs/form-field/generator.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  "name": "accordion",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=20.0.0 <22.0.0",
6
- "@spartan-ng/brain": "0.0.1-alpha.656",
6
+ "@spartan-ng/brain": "0.0.1-alpha.658",
7
7
  "@ng-icons/core": ">=32.0.0 <34.0.0",
8
8
  "@ng-icons/lucide": ">=32.0.0 <34.0.0"
9
9
  }
@@ -19,7 +19,7 @@
19
19
  "name": "alert-dialog",
20
20
  "peerDependencies": {
21
21
  "@angular/core": ">=20.0.0 <22.0.0",
22
- "@spartan-ng/brain": "0.0.1-alpha.656",
22
+ "@spartan-ng/brain": "0.0.1-alpha.658",
23
23
  "clsx": "^2.1.1"
24
24
  }
25
25
  },
@@ -34,7 +34,8 @@
34
34
  "name": "autocomplete",
35
35
  "peerDependencies": {
36
36
  "@angular/core": ">=20.0.0 <22.0.0",
37
- "@spartan-ng/brain": "0.0.1-alpha.656",
37
+ "@angular/forms": ">=20.0.0 <22.0.0",
38
+ "@spartan-ng/brain": "0.0.1-alpha.658",
38
39
  "@angular/cdk": ">=20.0.0 <22.0.0",
39
40
  "@ng-icons/core": ">=32.0.0 <34.0.0",
40
41
  "@ng-icons/lucide": ">=32.0.0 <34.0.0"
@@ -44,7 +45,7 @@
44
45
  "name": "avatar",
45
46
  "peerDependencies": {
46
47
  "@angular/core": ">=20.0.0 <22.0.0",
47
- "@spartan-ng/brain": "0.0.1-alpha.656"
48
+ "@spartan-ng/brain": "0.0.1-alpha.658"
48
49
  }
49
50
  },
50
51
  "badge": {
@@ -68,7 +69,7 @@
68
69
  "name": "button",
69
70
  "peerDependencies": {
70
71
  "@angular/core": ">=20.0.0 <22.0.0",
71
- "@spartan-ng/brain": "0.0.1-alpha.656",
72
+ "@spartan-ng/brain": "0.0.1-alpha.658",
72
73
  "class-variance-authority": "^0.7.0",
73
74
  "clsx": "^2.1.1"
74
75
  }
@@ -77,7 +78,7 @@
77
78
  "name": "button-group",
78
79
  "peerDependencies": {
79
80
  "@angular/core": ">=20.0.0 <22.0.0",
80
- "@spartan-ng/brain": "0.0.1-alpha.656",
81
+ "@spartan-ng/brain": "0.0.1-alpha.658",
81
82
  "class-variance-authority": "^0.7.0"
82
83
  }
83
84
  },
@@ -89,7 +90,7 @@
89
90
  "@angular/core": ">=20.0.0 <22.0.0",
90
91
  "@ng-icons/core": ">=32.0.0 <34.0.0",
91
92
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
92
- "@spartan-ng/brain": "0.0.1-alpha.656",
93
+ "@spartan-ng/brain": "0.0.1-alpha.658",
93
94
  "clsx": "^2.1.1"
94
95
  }
95
96
  },
@@ -117,7 +118,7 @@
117
118
  "@angular/cdk": ">=20.0.0 <22.0.0",
118
119
  "@ng-icons/core": ">=32.0.0 <34.0.0",
119
120
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
120
- "@spartan-ng/brain": "0.0.1-alpha.656",
121
+ "@spartan-ng/brain": "0.0.1-alpha.658",
121
122
  "clsx": "^2.1.1"
122
123
  }
123
124
  },
@@ -125,14 +126,15 @@
125
126
  "name": "collapsible",
126
127
  "peerDependencies": {
127
128
  "@angular/core": ">=20.0.0 <22.0.0",
128
- "@spartan-ng/brain": "0.0.1-alpha.656"
129
+ "@spartan-ng/brain": "0.0.1-alpha.658"
129
130
  }
130
131
  },
131
132
  "combobox": {
132
133
  "name": "combobox",
133
134
  "peerDependencies": {
134
135
  "@angular/core": ">=20.0.0 <22.0.0",
135
- "@spartan-ng/brain": "0.0.1-alpha.656",
136
+ "@angular/forms": ">=20.0.0 <22.0.0",
137
+ "@spartan-ng/brain": "0.0.1-alpha.658",
136
138
  "@angular/cdk": ">=20.0.0 <22.0.0",
137
139
  "@ng-icons/core": ">=32.0.0 <34.0.0",
138
140
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
@@ -144,7 +146,7 @@
144
146
  "peerDependencies": {
145
147
  "@angular/cdk": ">=20.0.0 <22.0.0",
146
148
  "@angular/core": ">=20.0.0 <22.0.0",
147
- "@spartan-ng/brain": "0.0.1-alpha.656",
149
+ "@spartan-ng/brain": "0.0.1-alpha.658",
148
150
  "clsx": "^2.1.1",
149
151
  "@ng-icons/core": ">=32.0.0 <34.0.0",
150
152
  "@ng-icons/lucide": ">=32.0.0 <34.0.0"
@@ -154,7 +156,7 @@
154
156
  "name": "context-menu",
155
157
  "peerDependencies": {
156
158
  "@angular/core": ">=20.0.0 <22.0.0",
157
- "@spartan-ng/brain": "0.0.1-alpha.656",
159
+ "@spartan-ng/brain": "0.0.1-alpha.658",
158
160
  "@angular/cdk": ">=20.0.0 <22.0.0",
159
161
  "rxjs": "^7.8.0"
160
162
  }
@@ -163,11 +165,11 @@
163
165
  "name": "date-picker",
164
166
  "peerDependencies": {
165
167
  "@angular/core": ">=20.0.0 <22.0.0",
166
- "@angular/cdk": ">=20.0.0 <22.0.0",
167
168
  "@angular/forms": ">=20.0.0 <22.0.0",
169
+ "@angular/cdk": ">=20.0.0 <22.0.0",
168
170
  "@ng-icons/core": ">=32.0.0 <34.0.0",
169
171
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
170
- "@spartan-ng/brain": "0.0.1-alpha.656",
172
+ "@spartan-ng/brain": "0.0.1-alpha.658",
171
173
  "clsx": "^2.1.1"
172
174
  }
173
175
  },
@@ -175,7 +177,7 @@
175
177
  "name": "dialog",
176
178
  "peerDependencies": {
177
179
  "@angular/core": ">=20.0.0 <22.0.0",
178
- "@spartan-ng/brain": "0.0.1-alpha.656",
180
+ "@spartan-ng/brain": "0.0.1-alpha.658",
179
181
  "@angular/cdk": ">=20.0.0 <22.0.0",
180
182
  "@angular/common": ">=20.0.0 <22.0.0",
181
183
  "@ng-icons/core": ">=32.0.0 <34.0.0",
@@ -191,7 +193,7 @@
191
193
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
192
194
  "@angular/cdk": ">=20.0.0 <22.0.0",
193
195
  "rxjs": "^7.8.0",
194
- "@spartan-ng/brain": "0.0.1-alpha.656"
196
+ "@spartan-ng/brain": "0.0.1-alpha.658"
195
197
  }
196
198
  },
197
199
  "empty": {
@@ -205,23 +207,17 @@
205
207
  "name": "field",
206
208
  "peerDependencies": {
207
209
  "@angular/core": ">=20.0.0 <22.0.0",
210
+ "@spartan-ng/brain": "0.0.1-alpha.658",
208
211
  "clsx": "^2.1.1",
212
+ "@angular/cdk": ">=20.0.0 <22.0.0",
209
213
  "class-variance-authority": "^0.7.0"
210
214
  }
211
215
  },
212
- "form-field": {
213
- "name": "form-field",
214
- "peerDependencies": {
215
- "@angular/core": ">=20.0.0 <22.0.0",
216
- "@angular/forms": ">=20.0.0 <22.0.0",
217
- "@spartan-ng/brain": "0.0.1-alpha.656"
218
- }
219
- },
220
216
  "hover-card": {
221
217
  "name": "hover-card",
222
218
  "peerDependencies": {
223
219
  "@angular/core": ">=20.0.0 <22.0.0",
224
- "@spartan-ng/brain": "0.0.1-alpha.656"
220
+ "@spartan-ng/brain": "0.0.1-alpha.658"
225
221
  }
226
222
  },
227
223
  "icon": {
@@ -237,16 +233,16 @@
237
233
  "peerDependencies": {
238
234
  "@angular/core": ">=20.0.0 <22.0.0",
239
235
  "@angular/forms": ">=20.0.0 <22.0.0",
240
- "@spartan-ng/brain": "0.0.1-alpha.656",
241
- "class-variance-authority": "^0.7.0",
242
- "clsx": "^2.1.1"
236
+ "@spartan-ng/brain": "0.0.1-alpha.658",
237
+ "class-variance-authority": "^0.7.0"
243
238
  }
244
239
  },
245
240
  "input-group": {
246
241
  "name": "input-group",
247
242
  "peerDependencies": {
248
243
  "@angular/core": ">=20.0.0 <22.0.0",
249
- "class-variance-authority": "^0.7.0"
244
+ "class-variance-authority": "^0.7.0",
245
+ "@spartan-ng/brain": "0.0.1-alpha.658"
250
246
  }
251
247
  },
252
248
  "input-otp": {
@@ -256,7 +252,7 @@
256
252
  "@ng-icons/core": ">=32.0.0 <34.0.0",
257
253
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
258
254
  "@angular/cdk": ">=20.0.0 <22.0.0",
259
- "@spartan-ng/brain": "0.0.1-alpha.656"
255
+ "@spartan-ng/brain": "0.0.1-alpha.658"
260
256
  }
261
257
  },
262
258
  "item": {
@@ -264,7 +260,7 @@
264
260
  "peerDependencies": {
265
261
  "@angular/core": ">=20.0.0 <22.0.0",
266
262
  "class-variance-authority": "^0.7.0",
267
- "@spartan-ng/brain": "0.0.1-alpha.656"
263
+ "@spartan-ng/brain": "0.0.1-alpha.658"
268
264
  }
269
265
  },
270
266
  "kbd": {
@@ -277,14 +273,14 @@
277
273
  "name": "label",
278
274
  "peerDependencies": {
279
275
  "@angular/core": ">=20.0.0 <22.0.0",
280
- "@spartan-ng/brain": "0.0.1-alpha.656"
276
+ "@spartan-ng/brain": "0.0.1-alpha.658"
281
277
  }
282
278
  },
283
279
  "menubar": {
284
280
  "name": "menubar",
285
281
  "peerDependencies": {
286
282
  "@angular/core": ">=20.0.0 <22.0.0",
287
- "@spartan-ng/brain": "0.0.1-alpha.656",
283
+ "@spartan-ng/brain": "0.0.1-alpha.658",
288
284
  "@angular/cdk": ">=20.0.0 <22.0.0",
289
285
  "rxjs": "^7.8.0"
290
286
  }
@@ -297,7 +293,7 @@
297
293
  "@angular/forms": ">=20.0.0 <22.0.0",
298
294
  "@ng-icons/core": ">=32.0.0 <34.0.0",
299
295
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
300
- "@spartan-ng/brain": "0.0.1-alpha.656",
296
+ "@spartan-ng/brain": "0.0.1-alpha.658",
301
297
  "clsx": "^2.1.1"
302
298
  }
303
299
  },
@@ -305,7 +301,7 @@
305
301
  "name": "navigation-menu",
306
302
  "peerDependencies": {
307
303
  "@angular/core": ">=20.0.0 <22.0.0",
308
- "@spartan-ng/brain": "0.0.1-alpha.656"
304
+ "@spartan-ng/brain": "0.0.1-alpha.658"
309
305
  }
310
306
  },
311
307
  "pagination": {
@@ -323,31 +319,32 @@
323
319
  "name": "popover",
324
320
  "peerDependencies": {
325
321
  "@angular/core": ">=20.0.0 <22.0.0",
326
- "@spartan-ng/brain": "0.0.1-alpha.656"
322
+ "@spartan-ng/brain": "0.0.1-alpha.658"
327
323
  }
328
324
  },
329
325
  "progress": {
330
326
  "name": "progress",
331
327
  "peerDependencies": {
332
328
  "@angular/core": ">=20.0.0 <22.0.0",
333
- "@spartan-ng/brain": "0.0.1-alpha.656"
329
+ "@spartan-ng/brain": "0.0.1-alpha.658"
334
330
  }
335
331
  },
336
332
  "radio-group": {
337
333
  "name": "radio-group",
338
334
  "peerDependencies": {
339
335
  "@angular/core": ">=20.0.0 <22.0.0",
340
- "@spartan-ng/brain": "0.0.1-alpha.656",
336
+ "@angular/forms": ">=20.0.0 <22.0.0",
337
+ "@spartan-ng/brain": "0.0.1-alpha.658",
338
+ "clsx": "^2.1.1",
341
339
  "@angular/cdk": ">=20.0.0 <22.0.0",
342
- "@angular/common": ">=20.0.0 <22.0.0",
343
- "clsx": "^2.1.1"
340
+ "@angular/common": ">=20.0.0 <22.0.0"
344
341
  }
345
342
  },
346
343
  "resizable": {
347
344
  "name": "resizable",
348
345
  "peerDependencies": {
349
346
  "@angular/core": ">=20.0.0 <22.0.0",
350
- "@spartan-ng/brain": "0.0.1-alpha.656"
347
+ "@spartan-ng/brain": "0.0.1-alpha.658"
351
348
  }
352
349
  },
353
350
  "scroll-area": {
@@ -359,9 +356,10 @@
359
356
  "select": {
360
357
  "name": "select",
361
358
  "peerDependencies": {
362
- "@angular/cdk": ">=20.0.0 <22.0.0",
363
359
  "@angular/core": ">=20.0.0 <22.0.0",
364
- "@spartan-ng/brain": "0.0.1-alpha.656",
360
+ "@angular/forms": ">=20.0.0 <22.0.0",
361
+ "@angular/cdk": ">=20.0.0 <22.0.0",
362
+ "@spartan-ng/brain": "0.0.1-alpha.658",
365
363
  "@ng-icons/core": ">=32.0.0 <34.0.0",
366
364
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
367
365
  "clsx": "^2.1.1"
@@ -371,14 +369,14 @@
371
369
  "name": "separator",
372
370
  "peerDependencies": {
373
371
  "@angular/core": ">=20.0.0 <22.0.0",
374
- "@spartan-ng/brain": "0.0.1-alpha.656"
372
+ "@spartan-ng/brain": "0.0.1-alpha.658"
375
373
  }
376
374
  },
377
375
  "sheet": {
378
376
  "name": "sheet",
379
377
  "peerDependencies": {
380
378
  "@angular/core": ">=20.0.0 <22.0.0",
381
- "@spartan-ng/brain": "0.0.1-alpha.656",
379
+ "@spartan-ng/brain": "0.0.1-alpha.658",
382
380
  "@angular/cdk": ">=20.0.0 <22.0.0",
383
381
  "@ng-icons/core": ">=32.0.0 <34.0.0",
384
382
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
@@ -391,7 +389,7 @@
391
389
  "peerDependencies": {
392
390
  "@angular/core": ">=20.0.0 <22.0.0",
393
391
  "@angular/cdk": ">=20.0.0 <22.0.0",
394
- "@spartan-ng/brain": "0.0.1-alpha.656",
392
+ "@spartan-ng/brain": "0.0.1-alpha.658",
395
393
  "class-variance-authority": "^0.7.0",
396
394
  "@ng-icons/core": ">=32.0.0 <34.0.0",
397
395
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
@@ -409,7 +407,8 @@
409
407
  "name": "slider",
410
408
  "peerDependencies": {
411
409
  "@angular/core": ">=20.0.0 <22.0.0",
412
- "@spartan-ng/brain": "0.0.1-alpha.656"
410
+ "@angular/forms": ">=20.0.0 <22.0.0",
411
+ "@spartan-ng/brain": "0.0.1-alpha.658"
413
412
  }
414
413
  },
415
414
  "sonner": {
@@ -419,7 +418,7 @@
419
418
  "@angular/core": ">=20.0.0 <22.0.0",
420
419
  "@ng-icons/core": ">=32.0.0 <34.0.0",
421
420
  "@ng-icons/lucide": ">=32.0.0 <34.0.0",
422
- "@spartan-ng/brain": "0.0.1-alpha.656",
421
+ "@spartan-ng/brain": "0.0.1-alpha.658",
423
422
  "clsx": "^2.1.1"
424
423
  }
425
424
  },
@@ -437,7 +436,7 @@
437
436
  "@angular/core": ">=20.0.0 <22.0.0",
438
437
  "@angular/cdk": ">=20.0.0 <22.0.0",
439
438
  "@angular/forms": ">=20.0.0 <22.0.0",
440
- "@spartan-ng/brain": "0.0.1-alpha.656",
439
+ "@spartan-ng/brain": "0.0.1-alpha.658",
441
440
  "clsx": "^2.1.1"
442
441
  }
443
442
  },
@@ -451,7 +450,7 @@
451
450
  "name": "tabs",
452
451
  "peerDependencies": {
453
452
  "@angular/core": ">=20.0.0 <22.0.0",
454
- "@spartan-ng/brain": "0.0.1-alpha.656",
453
+ "@spartan-ng/brain": "0.0.1-alpha.658",
455
454
  "class-variance-authority": "^0.7.0",
456
455
  "@angular/cdk": ">=20.0.0 <22.0.0",
457
456
  "@ng-icons/core": ">=32.0.0 <34.0.0",
@@ -465,16 +464,15 @@
465
464
  "peerDependencies": {
466
465
  "@angular/core": ">=20.0.0 <22.0.0",
467
466
  "@angular/forms": ">=20.0.0 <22.0.0",
468
- "@spartan-ng/brain": "0.0.1-alpha.656",
469
- "class-variance-authority": "^0.7.0",
470
- "clsx": "^2.1.1"
467
+ "@spartan-ng/brain": "0.0.1-alpha.658",
468
+ "class-variance-authority": "^0.7.0"
471
469
  }
472
470
  },
473
471
  "toggle": {
474
472
  "name": "toggle",
475
473
  "peerDependencies": {
476
474
  "@angular/core": ">=20.0.0 <22.0.0",
477
- "@spartan-ng/brain": "0.0.1-alpha.656",
475
+ "@spartan-ng/brain": "0.0.1-alpha.658",
478
476
  "class-variance-authority": "^0.7.0"
479
477
  }
480
478
  },
@@ -482,7 +480,7 @@
482
480
  "name": "toggle-group",
483
481
  "peerDependencies": {
484
482
  "@angular/core": ">=20.0.0 <22.0.0",
485
- "@spartan-ng/brain": "0.0.1-alpha.656",
483
+ "@spartan-ng/brain": "0.0.1-alpha.658",
486
484
  "@angular/cdk": ">=20.0.0 <22.0.0"
487
485
  }
488
486
  },
@@ -490,7 +488,7 @@
490
488
  "name": "tooltip",
491
489
  "peerDependencies": {
492
490
  "@angular/core": ">=20.0.0 <22.0.0",
493
- "@spartan-ng/brain": "0.0.1-alpha.656",
491
+ "@spartan-ng/brain": "0.0.1-alpha.658",
494
492
  "class-variance-authority": "^0.7.0"
495
493
  }
496
494
  },
@@ -1,9 +0,0 @@
1
- import { HlmError } from './lib/hlm-error';
2
- import { HlmFormField } from './lib/hlm-form-field';
3
- import { HlmHint } from './lib/hlm-hint';
4
-
5
- export * from './lib/hlm-error';
6
- export * from './lib/hlm-form-field';
7
- export * from './lib/hlm-hint';
8
-
9
- export const HlmFormFieldImports = [HlmFormField, HlmError, HlmHint] as const;
@@ -1,12 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { classes } from '<%- importAlias %>/utils';
3
-
4
- @Directive({
5
- // eslint-disable-next-line @angular-eslint/directive-selector
6
- selector: 'hlm-error',
7
- })
8
- export class HlmError {
9
- constructor() {
10
- classes(() => 'text-destructive block text-sm font-medium');
11
- }
12
- }
@@ -1,39 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect } from '@angular/core';
2
- import { BrnFormFieldControl } from '@spartan-ng/brain/form-field';
3
- import { classes } from '<%- importAlias %>/utils';
4
- import { HlmError } from './hlm-error';
5
-
6
- @Component({
7
- selector: 'hlm-form-field',
8
- changeDetection: ChangeDetectionStrategy.OnPush,
9
- template: `
10
- <ng-content />
11
-
12
- @switch (_hasDisplayedMessage()) {
13
- @case ('error') {
14
- <ng-content select="hlm-error" />
15
- }
16
- @default {
17
- <ng-content select="hlm-hint" />
18
- }
19
- }
20
- `,
21
- })
22
- export class HlmFormField {
23
- public readonly control = contentChild(BrnFormFieldControl);
24
-
25
- public readonly errorChildren = contentChildren(HlmError);
26
-
27
- protected readonly _hasDisplayedMessage = computed<'error' | 'hint'>(() =>
28
- this.errorChildren() && this.errorChildren().length > 0 && this.control()?.errorState() ? 'error' : 'hint',
29
- );
30
-
31
- constructor() {
32
- classes(() => 'block space-y-2');
33
- effect(() => {
34
- if (!this.control()) {
35
- throw new Error('hlm-form-field must contain a BrnFormFieldControl.');
36
- }
37
- });
38
- }
39
- }
@@ -1,12 +0,0 @@
1
- import { Directive } from '@angular/core';
2
- import { classes } from '<%- importAlias %>/utils';
3
-
4
- @Directive({
5
- // eslint-disable-next-line @angular-eslint/directive-selector
6
- selector: 'hlm-hint',
7
- })
8
- export class HlmHint {
9
- constructor() {
10
- classes(() => 'text-muted-foreground block text-sm');
11
- }
12
- }
@@ -1,3 +0,0 @@
1
- import type { Tree } from '@nx/devkit';
2
- import type { HlmBaseGeneratorSchema } from '../../../base/schema';
3
- export declare function generator(tree: Tree, options: HlmBaseGeneratorSchema): Promise<import("@nx/devkit").GeneratorCallback>;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generator = generator;
4
- const tslib_1 = require("tslib");
5
- const generator_1 = tslib_1.__importDefault(require("../../../base/generator"));
6
- async function generator(tree, options) {
7
- return await (0, generator_1.default)(tree, { ...options, name: 'form-field' });
8
- }
9
- //# sourceMappingURL=generator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../../libs/cli/src/generators/ui/libs/form-field/generator.ts"],"names":[],"mappings":";;AAIA,8BAEC;;AALD,gFAAuD;AAGhD,KAAK,UAAU,SAAS,CAAC,IAAU,EAAE,OAA+B;IAC1E,OAAO,MAAM,IAAA,mBAAgB,EAAC,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;AACzE,CAAC"}