@spartan-ng/cli 0.0.1-alpha.525 → 0.0.1-alpha.526

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": "@spartan-ng/cli",
3
- "version": "0.0.1-alpha.525",
3
+ "version": "0.0.1-alpha.526",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@nx/angular": ">=20.0.0",
@@ -13,7 +13,7 @@ exports[`Theme generator Tailwind v3 should add the gray theme styles to the glo
13
13
  :root {
14
14
  color-scheme: light;
15
15
 
16
- --font-sans: ''
16
+ --font-sans: '';
17
17
 
18
18
  --background: 0deg 0% 100%;
19
19
  --foreground: 224.06deg 72.27% 4.17%;
@@ -79,7 +79,7 @@ exports[`Theme generator Tailwind v3 should add the neutral theme styles to the
79
79
  :root {
80
80
  color-scheme: light;
81
81
 
82
- --font-sans: ''
82
+ --font-sans: '';
83
83
 
84
84
  --background: 0deg 0% 100%;
85
85
  --foreground: 0deg 0.02% 3.94%;
@@ -145,7 +145,7 @@ exports[`Theme generator Tailwind v3 should add the slate theme styles to the gl
145
145
  :root {
146
146
  color-scheme: light;
147
147
 
148
- --font-sans: ''
148
+ --font-sans: '';
149
149
 
150
150
  --background: 0deg 0% 100%;
151
151
  --foreground: 228.82deg 85.15% 5%;
@@ -211,7 +211,7 @@ exports[`Theme generator Tailwind v3 should add the stone theme styles to the gl
211
211
  :root {
212
212
  color-scheme: light;
213
213
 
214
- --font-sans: ''
214
+ --font-sans: '';
215
215
 
216
216
  --background: 0deg 0% 100%;
217
217
  --foreground: 344.17deg 10.1% 4.29%;
@@ -276,7 +276,7 @@ exports[`Theme generator Tailwind v3 should add the zinc theme styles to the glo
276
276
  :root {
277
277
  color-scheme: light;
278
278
 
279
- --font-sans: ''
279
+ --font-sans: '';
280
280
 
281
281
  --background: 0deg 0% 100%;
282
282
  --foreground: 344.97deg 13.46% 3.85%;
@@ -338,7 +338,7 @@ exports[`Theme generator Tailwind v4 should add the gray theme styles to the glo
338
338
  :root {
339
339
  color-scheme: light;
340
340
 
341
- --font-sans: ''
341
+ --font-sans: '';
342
342
 
343
343
  --background: oklch(1 0 0);
344
344
  --foreground: oklch(0.13 0.028 261.692);
@@ -400,7 +400,7 @@ exports[`Theme generator Tailwind v4 should add the neutral theme styles to the
400
400
  :root {
401
401
  color-scheme: light;
402
402
 
403
- --font-sans: ''
403
+ --font-sans: '';
404
404
 
405
405
  --background: oklch(1 0 0);
406
406
  --foreground: oklch(0.145 0 0);
@@ -462,7 +462,7 @@ exports[`Theme generator Tailwind v4 should add the slate theme styles to the gl
462
462
  :root {
463
463
  color-scheme: light;
464
464
 
465
- --font-sans: ''
465
+ --font-sans: '';
466
466
 
467
467
  --background: oklch(1 0 0);
468
468
  --foreground: oklch(0.129 0.042 264.695);
@@ -524,7 +524,7 @@ exports[`Theme generator Tailwind v4 should add the stone theme styles to the gl
524
524
  :root {
525
525
  color-scheme: light;
526
526
 
527
- --font-sans: ''
527
+ --font-sans: '';
528
528
 
529
529
  --background: oklch(1 0 0);
530
530
  --foreground: oklch(0.147 0.004 49.25);
@@ -586,7 +586,7 @@ exports[`Theme generator Tailwind v4 should add the zinc theme styles to the glo
586
586
  :root {
587
587
  color-scheme: light;
588
588
 
589
- --font-sans: ''
589
+ --font-sans: '';
590
590
 
591
591
  --background: oklch(1 0 0);
592
592
  --foreground: oklch(0.141 0.005 285.823);
@@ -31,7 +31,7 @@ function addThemeToApplicationStyles(tree, options, project) {
31
31
  const stylesEntryPointContent = tree.read(stylesEntryPoint, 'utf-8');
32
32
  const CDK_IMPORT = `@import '@angular/cdk/overlay-prebuilt.css';`;
33
33
  const ckdOverlayImport = stylesEntryPointContent.includes(CDK_IMPORT) ? '' : CDK_IMPORT;
34
- const fontSans = stylesEntryPointContent.includes('--font-sans') ? '' : `--font-sans: ''`;
34
+ const fontSans = stylesEntryPointContent.includes('--font-sans') ? '' : `--font-sans: '';`;
35
35
  const colorScheme = tailwindVersion === 4 ? colors_1.themes[options.theme].cssVarsV4 : colors_1.themes[options.theme].cssVarsV3;
36
36
  tree.write(stylesEntryPoint, (0, devkit_1.stripIndents) `
37
37
  ${ckdOverlayImport}
@@ -1 +1 @@
1
- {"version":3,"file":"add-theme-to-application-styles.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/theme/libs/add-theme-to-application-styles.ts"],"names":[],"mappings":";AAAA,gHAAgH;AAChH,kJAAkJ;;AAelJ,kEA4EC;;AAzFD,uCAA6G;AAE7G,uDAAiC;AACjC,qCAAkD;AAUlD,SAAgB,2BAA2B,CAC1C,IAAU,EACV,OAA2C,EAC3C,OAA6B;IAE7B,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAc,IAAI,EAAE,cAAc,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAE7E,IAAI,eAAe,GAAG,CAAC,CAAC;IAExB,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;QACpC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,cAAc,GAAG,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,sDAAsD,CAAC,CAAC,CAAC,EAAE,CAAC;IAE3G,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAI,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAEhD,IAAI,gBAAgB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,oC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C,CAAC;QAC9C,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CACjF,CAAC;IAEF,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;AACxD,CAAC"}
1
+ {"version":3,"file":"add-theme-to-application-styles.js","sourceRoot":"","sources":["../../../../../../../libs/cli/src/generators/theme/libs/add-theme-to-application-styles.ts"],"names":[],"mappings":";AAAA,gHAAgH;AAChH,kJAAkJ;;AAelJ,kEA4EC;;AAzFD,uCAA6G;AAE7G,uDAAiC;AACjC,qCAAkD;AAUlD,SAAgB,2BAA2B,CAC1C,IAAU,EACV,OAA2C,EAC3C,OAA6B;IAE7B,MAAM,WAAW,GAAG,IAAA,iBAAQ,EAAc,IAAI,EAAE,cAAc,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,GAAG,WAAW,CAAC,eAAe,EAAE,CAAC;IAE7E,IAAI,eAAe,GAAG,CAAC,CAAC;IAExB,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;QAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;QACpC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,cAAc,GAAG,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,sDAAsD,CAAC,CAAC,CAAC,EAAE,CAAC;IAE3G,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,MAAM,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;IAC1D,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAC/B,OAAO,CAAC,KAAK,QAAQ;QACpB,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CACjF,CAAC;IAEF,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;AACxD,CAAC"}
@@ -26,7 +26,7 @@ export class HlmAutocompleteItem {
26
26
  /** The styles to apply */
27
27
  protected readonly _computedClass = computed(() =>
28
28
  hlm(
29
- 'data-[selected]:bg-accent data-[selected=true]:text-accent-foreground [&>ng-icon]:text-muted-foreground outline-hidden relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled]:pointer-events-none data-[hidden]:hidden data-[disabled]:opacity-50 [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon]:text-base',
29
+ 'data-[selected]:bg-accent data-[selected=true]:text-accent-foreground [&>ng-icon]:text-muted-foreground outline-hidden relative flex w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-start text-sm data-[disabled]:pointer-events-none data-[hidden]:hidden data-[disabled]:opacity-50 [&>ng-icon]:pointer-events-none [&>ng-icon]:shrink-0 [&>ng-icon]:text-base',
30
30
  this.userClass(),
31
31
  ),
32
32
  );
@@ -19,7 +19,7 @@ export class HlmAutocompleteSearchInput {
19
19
  /** The styles to apply */
20
20
  protected readonly _computedClass = computed(() =>
21
21
  hlm(
22
- 'placeholder:text-muted-foreground flex h-9 w-full bg-transparent py-1 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
22
+ 'placeholder:text-muted-foreground flex h-full w-full bg-transparent py-1 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
23
23
  this.userClass(),
24
24
  ),
25
25
  );
@@ -1,14 +1,16 @@
1
1
  import { inject, InjectionToken, type ValueProvider } from '@angular/core';
2
2
 
3
- export type TransformValueToString<T> = (value: T) => string;
3
+ export type TransformValueToString<T> = (option: T) => string;
4
4
 
5
5
  export interface HlmAutocompleteConfig<T> {
6
6
  transformValueToSearch: TransformValueToString<T>;
7
+ transformOptionToString: TransformValueToString<T>;
7
8
  }
8
9
 
9
10
  function getDefaultConfig<T>(): HlmAutocompleteConfig<T> {
10
11
  return {
11
- transformValueToSearch: (value: T) => (typeof value === 'string' ? value : String(value)),
12
+ transformValueToSearch: (option: T) => (typeof option === 'string' ? option : String(option)),
13
+ transformOptionToString: (option: T) => (typeof option === 'string' ? option : String(option)),
12
14
  };
13
15
  }
14
16
 
@@ -72,7 +72,11 @@ export const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
72
72
  [closeOnOutsidePointerEvents]="true"
73
73
  >
74
74
  <div brnAutocomplete>
75
- <hlm-autocomplete-search hlmAutocompleteTrigger [disabledTrigger]="!_search()">
75
+ <hlm-autocomplete-search
76
+ hlmAutocompleteTrigger
77
+ [class]="_computedAutocompleteSearchClass()"
78
+ [disabledTrigger]="!_search()"
79
+ >
76
80
  <ng-icon name="lucideSearch" hlm />
77
81
  <input
78
82
  #input
@@ -80,6 +84,7 @@ export const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
80
84
  autocomplete="off"
81
85
  hlm-autocomplete-search-input
82
86
  [id]="inputId()"
87
+ [class]="_computedAutocompleteInputClass()"
83
88
  [placeholder]="searchPlaceholderText()"
84
89
  [disabled]="_disabled()"
85
90
  [value]="_search()"
@@ -111,11 +116,16 @@ export const HLM_AUTOCOMPLETE_VALUE_ACCESSOR = {
111
116
  >
112
117
  <hlm-autocomplete-group>
113
118
  @for (option of filteredOptions(); track option) {
114
- <button hlm-autocomplete-item [value]="option" (selected)="_optionSelected(option)">
119
+ <button
120
+ hlm-autocomplete-item
121
+ [class]="_computedAutocompleteItemClass()"
122
+ [value]="option"
123
+ (selected)="_optionSelected(option)"
124
+ >
115
125
  @if (optionTemplate(); as optionTemplate) {
116
126
  <ng-container *ngTemplateOutlet="optionTemplate; context: { $implicit: option }" />
117
127
  } @else {
118
- {{ option }}
128
+ {{ transformOptionToString()(option) }}
119
129
  }
120
130
  </button>
121
131
  }
@@ -151,10 +161,22 @@ export class HlmAutocomplete<T> implements ControlValueAccessor {
151
161
  public readonly userClass = input<ClassValue>('', { alias: 'class' });
152
162
  protected readonly _computedClass = computed(() => hlm('block w-full', this.userClass()));
153
163
 
164
+ /** Custom class for the autocomplete search container. */
165
+ public readonly autocompleteSearchClass = input<ClassValue>('');
166
+ protected readonly _computedAutocompleteSearchClass = computed(() => hlm('', this.autocompleteSearchClass()));
167
+
168
+ /** Custom class for the autocomplete input. */
169
+ public readonly autocompleteInputClass = input<ClassValue>('');
170
+ protected readonly _computedAutocompleteInputClass = computed(() => hlm('', this.autocompleteInputClass()));
171
+
154
172
  /** Custom class for the autocomplete list. */
155
173
  public readonly autocompleteListClass = input<ClassValue>('');
156
174
  protected readonly _computedAutocompleteListClass = computed(() => hlm('', this.autocompleteListClass()));
157
175
 
176
+ /** Custom class for each autocomplete item. */
177
+ public readonly autocompleteItemClass = input<ClassValue>('');
178
+ protected readonly _computedAutocompleteItemClass = computed(() => hlm('', this.autocompleteItemClass()));
179
+
158
180
  /** Custom class for the empty and loading state container. */
159
181
  public readonly autocompleteEmptyClass = input<ClassValue>('');
160
182
  protected readonly _computedAutocompleteEmptyClass = computed(() => hlm('', this.autocompleteEmptyClass()));
@@ -171,7 +193,10 @@ export class HlmAutocomplete<T> implements ControlValueAccessor {
171
193
  protected readonly _search = linkedSignal(() => this.search() || '');
172
194
 
173
195
  /** Function to transform an option value to a search string. Defaults to identity function for strings. */
174
- public readonly transformValueToSearch = input<(value: T) => string>(this._config.transformValueToSearch);
196
+ public readonly transformValueToSearch = input<(option: T) => string>(this._config.transformValueToSearch);
197
+
198
+ /** Function to transform an option value to a display string. Defaults to identity function for strings. */
199
+ public readonly transformOptionToString = input<(option: T) => string>(this._config.transformOptionToString);
175
200
 
176
201
  /** Optional template for rendering each option. */
177
202
  public readonly optionTemplate = input<TemplateRef<HlmAutocompleteOption<T>>>();
@@ -281,6 +306,6 @@ export class HlmAutocomplete<T> implements ControlValueAccessor {
281
306
  }
282
307
  }
283
308
 
284
- interface HlmAutocompleteOption<T> {
309
+ export interface HlmAutocompleteOption<T> {
285
310
  $implicit: T;
286
311
  }
@@ -3,7 +3,7 @@
3
3
  "internalName": "ui-accordion-helm",
4
4
  "peerDependencies": {
5
5
  "@angular/core": ">=19.0.0",
6
- "@spartan-ng/brain": "0.0.1-alpha.525",
6
+ "@spartan-ng/brain": "0.0.1-alpha.526",
7
7
  "clsx": "^2.1.1",
8
8
  "@ng-icons/core": ">=29.0.0",
9
9
  "@ng-icons/lucide": ">=29.0.0"
@@ -21,7 +21,7 @@
21
21
  "internalName": "ui-alert-dialog-helm",
22
22
  "peerDependencies": {
23
23
  "@angular/core": ">=19.0.0",
24
- "@spartan-ng/brain": "0.0.1-alpha.525",
24
+ "@spartan-ng/brain": "0.0.1-alpha.526",
25
25
  "clsx": "^2.1.1"
26
26
  }
27
27
  },
@@ -38,7 +38,7 @@
38
38
  "peerDependencies": {
39
39
  "@angular/core": ">=19.0.0",
40
40
  "clsx": "^2.1.1",
41
- "@spartan-ng/brain": "0.0.1-alpha.525",
41
+ "@spartan-ng/brain": "0.0.1-alpha.526",
42
42
  "@angular/cdk": ">=19.0.0",
43
43
  "@angular/common": ">=19.0.0",
44
44
  "@angular/forms": ">=19.0.0",
@@ -50,7 +50,7 @@
50
50
  "internalName": "ui-avatar-helm",
51
51
  "peerDependencies": {
52
52
  "@angular/core": ">=19.0.0",
53
- "@spartan-ng/brain": "0.0.1-alpha.525",
53
+ "@spartan-ng/brain": "0.0.1-alpha.526",
54
54
  "clsx": "^2.1.1"
55
55
  }
56
56
  },
@@ -76,7 +76,7 @@
76
76
  "internalName": "ui-button-helm",
77
77
  "peerDependencies": {
78
78
  "@angular/core": ">=19.0.0",
79
- "@spartan-ng/brain": "0.0.1-alpha.525",
79
+ "@spartan-ng/brain": "0.0.1-alpha.526",
80
80
  "class-variance-authority": "^0.7.0",
81
81
  "clsx": "^2.1.1"
82
82
  }
@@ -89,7 +89,7 @@
89
89
  "@angular/core": ">=19.0.0",
90
90
  "@ng-icons/core": ">=29.0.0",
91
91
  "@ng-icons/lucide": ">=29.0.0",
92
- "@spartan-ng/brain": "0.0.1-alpha.525",
92
+ "@spartan-ng/brain": "0.0.1-alpha.526",
93
93
  "clsx": "^2.1.1"
94
94
  }
95
95
  },
@@ -119,7 +119,7 @@
119
119
  "@angular/forms": ">=19.0.0",
120
120
  "@ng-icons/core": ">=29.0.0",
121
121
  "@ng-icons/lucide": ">=29.0.0",
122
- "@spartan-ng/brain": "0.0.1-alpha.525",
122
+ "@spartan-ng/brain": "0.0.1-alpha.526",
123
123
  "clsx": "^2.1.1"
124
124
  }
125
125
  },
@@ -127,7 +127,7 @@
127
127
  "internalName": "ui-command-helm",
128
128
  "peerDependencies": {
129
129
  "@angular/core": ">=19.0.0",
130
- "@spartan-ng/brain": "0.0.1-alpha.525",
130
+ "@spartan-ng/brain": "0.0.1-alpha.526",
131
131
  "clsx": "^2.1.1"
132
132
  }
133
133
  },
@@ -139,7 +139,7 @@
139
139
  "@angular/forms": ">=19.0.0",
140
140
  "@ng-icons/core": ">=29.0.0",
141
141
  "@ng-icons/lucide": ">=29.0.0",
142
- "@spartan-ng/brain": "0.0.1-alpha.525",
142
+ "@spartan-ng/brain": "0.0.1-alpha.526",
143
143
  "clsx": "^2.1.1"
144
144
  }
145
145
  },
@@ -151,7 +151,7 @@
151
151
  "@angular/common": ">=19.0.0",
152
152
  "@ng-icons/core": ">=29.0.0",
153
153
  "@ng-icons/lucide": ">=29.0.0",
154
- "@spartan-ng/brain": "0.0.1-alpha.525",
154
+ "@spartan-ng/brain": "0.0.1-alpha.526",
155
155
  "@angular/cdk": ">=19.0.0"
156
156
  }
157
157
  },
@@ -160,7 +160,7 @@
160
160
  "peerDependencies": {
161
161
  "@angular/core": ">=19.0.0",
162
162
  "@angular/forms": ">=19.0.0",
163
- "@spartan-ng/brain": "0.0.1-alpha.525",
163
+ "@spartan-ng/brain": "0.0.1-alpha.526",
164
164
  "clsx": "^2.1.1"
165
165
  }
166
166
  },
@@ -168,7 +168,7 @@
168
168
  "internalName": "ui-hover-card-helm",
169
169
  "peerDependencies": {
170
170
  "@angular/core": ">=19.0.0",
171
- "@spartan-ng/brain": "0.0.1-alpha.525",
171
+ "@spartan-ng/brain": "0.0.1-alpha.526",
172
172
  "clsx": "^2.1.1"
173
173
  }
174
174
  },
@@ -187,7 +187,7 @@
187
187
  "class-variance-authority": "^0.7.0",
188
188
  "clsx": "^2.1.1",
189
189
  "@angular/forms": ">=19.0.0",
190
- "@spartan-ng/brain": "0.0.1-alpha.525"
190
+ "@spartan-ng/brain": "0.0.1-alpha.526"
191
191
  }
192
192
  },
193
193
  "input-group": {
@@ -195,7 +195,7 @@
195
195
  "peerDependencies": {
196
196
  "@angular/core": ">=19.0.0",
197
197
  "clsx": "^2.1.1",
198
- "@spartan-ng/brain": "0.0.1-alpha.525"
198
+ "@spartan-ng/brain": "0.0.1-alpha.526"
199
199
  }
200
200
  },
201
201
  "input-otp": {
@@ -206,7 +206,7 @@
206
206
  "@ng-icons/core": ">=29.0.0",
207
207
  "@ng-icons/lucide": ">=29.0.0",
208
208
  "@angular/cdk": ">=19.0.0",
209
- "@spartan-ng/brain": "0.0.1-alpha.525"
209
+ "@spartan-ng/brain": "0.0.1-alpha.526"
210
210
  }
211
211
  },
212
212
  "kbd": {
@@ -220,7 +220,7 @@
220
220
  "internalName": "ui-label-helm",
221
221
  "peerDependencies": {
222
222
  "@angular/core": ">=19.0.0",
223
- "@spartan-ng/brain": "0.0.1-alpha.525",
223
+ "@spartan-ng/brain": "0.0.1-alpha.526",
224
224
  "clsx": "^2.1.1"
225
225
  }
226
226
  },
@@ -228,7 +228,7 @@
228
228
  "internalName": "ui-menu-helm",
229
229
  "peerDependencies": {
230
230
  "@angular/core": ">=19.0.0",
231
- "@spartan-ng/brain": "0.0.1-alpha.525",
231
+ "@spartan-ng/brain": "0.0.1-alpha.526",
232
232
  "clsx": "^2.1.1",
233
233
  "@ng-icons/core": ">=29.0.0",
234
234
  "@ng-icons/lucide": ">=29.0.0",
@@ -242,7 +242,7 @@
242
242
  "@angular/cdk": ">=19.0.0",
243
243
  "@angular/core": ">=19.0.0",
244
244
  "@angular/forms": ">=19.0.0",
245
- "@spartan-ng/brain": "0.0.1-alpha.525",
245
+ "@spartan-ng/brain": "0.0.1-alpha.526",
246
246
  "class-variance-authority": "^0.7.0",
247
247
  "clsx": "^2.1.1",
248
248
  "@ng-icons/core": ">=29.0.0",
@@ -255,14 +255,14 @@
255
255
  "peerDependencies": {
256
256
  "@angular/core": ">=19.0.0",
257
257
  "clsx": "^2.1.1",
258
- "@spartan-ng/brain": "0.0.1-alpha.525"
258
+ "@spartan-ng/brain": "0.0.1-alpha.526"
259
259
  }
260
260
  },
261
261
  "progress": {
262
262
  "internalName": "ui-progress-helm",
263
263
  "peerDependencies": {
264
264
  "@angular/core": ">=19.0.0",
265
- "@spartan-ng/brain": "0.0.1-alpha.525",
265
+ "@spartan-ng/brain": "0.0.1-alpha.526",
266
266
  "clsx": "^2.1.1"
267
267
  }
268
268
  },
@@ -270,7 +270,7 @@
270
270
  "internalName": "ui-radio-group-helm",
271
271
  "peerDependencies": {
272
272
  "@angular/core": ">=19.0.0",
273
- "@spartan-ng/brain": "0.0.1-alpha.525",
273
+ "@spartan-ng/brain": "0.0.1-alpha.526",
274
274
  "clsx": "^2.1.1",
275
275
  "@angular/common": ">=19.0.0"
276
276
  }
@@ -287,7 +287,7 @@
287
287
  "peerDependencies": {
288
288
  "@angular/cdk": ">=19.0.0",
289
289
  "@angular/core": ">=19.0.0",
290
- "@spartan-ng/brain": "0.0.1-alpha.525",
290
+ "@spartan-ng/brain": "0.0.1-alpha.526",
291
291
  "clsx": "^2.1.1",
292
292
  "@ng-icons/core": ">=29.0.0",
293
293
  "@ng-icons/lucide": ">=29.0.0",
@@ -298,7 +298,7 @@
298
298
  "internalName": "ui-separator-helm",
299
299
  "peerDependencies": {
300
300
  "@angular/core": ">=19.0.0",
301
- "@spartan-ng/brain": "0.0.1-alpha.525",
301
+ "@spartan-ng/brain": "0.0.1-alpha.526",
302
302
  "clsx": "^2.1.1"
303
303
  }
304
304
  },
@@ -309,7 +309,7 @@
309
309
  "clsx": "^2.1.1",
310
310
  "@ng-icons/core": ">=29.0.0",
311
311
  "@ng-icons/lucide": ">=29.0.0",
312
- "@spartan-ng/brain": "0.0.1-alpha.525",
312
+ "@spartan-ng/brain": "0.0.1-alpha.526",
313
313
  "class-variance-authority": "^0.7.0"
314
314
  }
315
315
  },
@@ -318,7 +318,7 @@
318
318
  "peerDependencies": {
319
319
  "@angular/core": ">=19.0.0",
320
320
  "clsx": "^2.1.1",
321
- "@spartan-ng/brain": "0.0.1-alpha.525",
321
+ "@spartan-ng/brain": "0.0.1-alpha.526",
322
322
  "class-variance-authority": "^0.7.0",
323
323
  "@ng-icons/core": ">=29.0.0",
324
324
  "@ng-icons/lucide": ">=29.0.0",
@@ -336,7 +336,7 @@
336
336
  "internalName": "ui-slider-helm",
337
337
  "peerDependencies": {
338
338
  "@angular/core": ">=19.0.0",
339
- "@spartan-ng/brain": "0.0.1-alpha.525",
339
+ "@spartan-ng/brain": "0.0.1-alpha.526",
340
340
  "clsx": "^2.1.1"
341
341
  }
342
342
  },
@@ -362,7 +362,7 @@
362
362
  "clsx": "^2.1.1",
363
363
  "@angular/cdk": ">=19.0.0",
364
364
  "@angular/forms": ">=19.0.0",
365
- "@spartan-ng/brain": "0.0.1-alpha.525"
365
+ "@spartan-ng/brain": "0.0.1-alpha.526"
366
366
  }
367
367
  },
368
368
  "table": {
@@ -376,7 +376,7 @@
376
376
  "internalName": "ui-tabs-helm",
377
377
  "peerDependencies": {
378
378
  "@angular/core": ">=19.0.0",
379
- "@spartan-ng/brain": "0.0.1-alpha.525",
379
+ "@spartan-ng/brain": "0.0.1-alpha.526",
380
380
  "clsx": "^2.1.1",
381
381
  "class-variance-authority": "^0.7.0",
382
382
  "@angular/cdk": ">=19.0.0",
@@ -405,7 +405,7 @@
405
405
  "internalName": "ui-tooltip-helm",
406
406
  "peerDependencies": {
407
407
  "@angular/core": ">=19.0.0",
408
- "@spartan-ng/brain": "0.0.1-alpha.525"
408
+ "@spartan-ng/brain": "0.0.1-alpha.526"
409
409
  }
410
410
  },
411
411
  "typography": {