orbiq-neural-ui-kit 0.0.5 → 0.0.7

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,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, computed, Component, signal, model, effect, ViewChild, Directive, EventEmitter, ContentChild, Output, HostListener, Input, InjectionToken, Optional, Inject, ContentChildren, ViewChildren, inject, forwardRef, Injectable, ViewContainerRef, ElementRef } from '@angular/core';
2
+ import { input, computed, Component, output, signal, model, effect, ViewChild, Directive, EventEmitter, ContentChild, Output, HostListener, Input, InjectionToken, Optional, Inject, ContentChildren, ViewChildren, inject, forwardRef, Injectable, ViewContainerRef, ElementRef } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i1$1 from '@angular/cdk/overlay';
@@ -20,6 +20,58 @@ import { Editor } from '@tiptap/core';
20
20
  import StarterKit from '@tiptap/starter-kit';
21
21
  import { Placeholder } from '@tiptap/extensions';
22
22
 
23
+ class NeuralIconComponent {
24
+ name = input.required(/* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
26
+ isLucideIcon = computed(() => {
27
+ const val = this.name();
28
+ return typeof val === 'string' && val.startsWith('lucide-');
29
+ }, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "isLucideIcon" }] : /* istanbul ignore next */ []));
31
+ isEmojiIcon = computed(() => {
32
+ const val = this.name();
33
+ if (typeof val !== 'string')
34
+ return false;
35
+ // Very simple emoji detection
36
+ const emojiRegex = /[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u;
37
+ return emojiRegex.test(val);
38
+ }, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "isEmojiIcon" }] : /* istanbul ignore next */ []));
40
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralIconComponent, isStandalone: true, selector: "neural-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
42
+ @if (isLucideIcon()) {
43
+ <span [class]="name()" aria-hidden="true"></span>
44
+ } @else if (isEmojiIcon()) {
45
+ <span class="inline-flex items-center justify-center leading-none" aria-hidden="true">
46
+ {{ name() }}
47
+ </span>
48
+ } @else {
49
+ <!-- Fallback or custom SVG component handled by ng-content if not string -->
50
+ <ng-content></ng-content>
51
+ }
52
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralIconComponent, decorators: [{
55
+ type: Component,
56
+ args: [{
57
+ selector: 'neural-icon',
58
+ standalone: true,
59
+ imports: [CommonModule],
60
+ template: `
61
+ @if (isLucideIcon()) {
62
+ <span [class]="name()" aria-hidden="true"></span>
63
+ } @else if (isEmojiIcon()) {
64
+ <span class="inline-flex items-center justify-center leading-none" aria-hidden="true">
65
+ {{ name() }}
66
+ </span>
67
+ } @else {
68
+ <!-- Fallback or custom SVG component handled by ng-content if not string -->
69
+ <ng-content></ng-content>
70
+ }
71
+ `
72
+ }]
73
+ }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
74
+
23
75
  class NeuralButtonComponent {
24
76
  // Inputs
25
77
  variant = input('subtle', /* @ts-ignore */
@@ -35,6 +87,8 @@ class NeuralButtonComponent {
35
87
  loading = input(false, /* @ts-ignore */
36
88
  ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
37
89
  // Modifiers
90
+ icon = input(/* @ts-ignore */
91
+ ...(ngDevMode ? [undefined, { debugName: "icon" }] : /* istanbul ignore next */ []));
38
92
  iconLeft = input(false, /* @ts-ignore */
39
93
  ...(ngDevMode ? [{ debugName: "iconLeft" }] : /* istanbul ignore next */ []));
40
94
  iconRight = input(false, /* @ts-ignore */
@@ -59,6 +113,10 @@ class NeuralButtonComponent {
59
113
  }[this.size()];
60
114
  }, /* @ts-ignore */
61
115
  ...(ngDevMode ? [{ debugName: "spinnerClasses" }] : /* istanbul ignore next */ []));
116
+ iconClasses = computed(() => {
117
+ return this.spinnerClasses();
118
+ }, /* @ts-ignore */
119
+ ...(ngDevMode ? [{ debugName: "iconClasses" }] : /* istanbul ignore next */ []));
62
120
  computedClasses = computed(() => {
63
121
  const v = this.variant();
64
122
  const t = this.theme();
@@ -143,7 +201,7 @@ class NeuralButtonComponent {
143
201
  }, /* @ts-ignore */
144
202
  ...(ngDevMode ? [{ debugName: "computedClasses" }] : /* istanbul ignore next */ []));
145
203
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
146
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralButtonComponent, isStandalone: true, selector: "neural-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: `
204
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralButtonComponent, isStandalone: true, selector: "neural-button", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconLeft: { classPropertyName: "iconLeft", publicName: "iconLeft", isSignal: true, isRequired: false, transformFunction: null }, iconRight: { classPropertyName: "iconRight", publicName: "iconRight", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: `
147
205
  <button
148
206
  [type]="type()"
149
207
  [disabled]="isDisabled()"
@@ -156,26 +214,36 @@ class NeuralButtonComponent {
156
214
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
157
215
  <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
158
216
  </svg>
159
- } @else if (iconLeft()) {
160
- <ng-content select="[left-icon]"></ng-content>
217
+ } @else if (iconLeft() || (icon() && !iconRight() && !iconOnly())) {
218
+ @if (icon()) {
219
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
220
+ } @else {
221
+ <ng-content select="[left-icon]"></ng-content>
222
+ }
223
+ } @else if (iconOnly() && icon()) {
224
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
161
225
  }
162
226
 
163
227
  <span class="truncate" [class.sr-only]="iconOnly()">
164
228
  <ng-content></ng-content>
165
229
  </span>
166
230
 
167
- @if (!loading() && iconRight()) {
168
- <ng-content select="[right-icon]"></ng-content>
231
+ @if (!loading() && (iconRight() || (icon() && iconRight() && !iconOnly()))) {
232
+ @if (icon()) {
233
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
234
+ } @else {
235
+ <ng-content select="[right-icon]"></ng-content>
236
+ }
169
237
  }
170
238
  </button>
171
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
239
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralIconComponent, selector: "neural-icon", inputs: ["name"] }] });
172
240
  }
173
241
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralButtonComponent, decorators: [{
174
242
  type: Component,
175
243
  args: [{
176
244
  selector: 'neural-button',
177
245
  standalone: true,
178
- imports: [CommonModule],
246
+ imports: [CommonModule, NeuralIconComponent],
179
247
  template: `
180
248
  <button
181
249
  [type]="type()"
@@ -189,21 +257,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
189
257
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
190
258
  <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
191
259
  </svg>
192
- } @else if (iconLeft()) {
193
- <ng-content select="[left-icon]"></ng-content>
260
+ } @else if (iconLeft() || (icon() && !iconRight() && !iconOnly())) {
261
+ @if (icon()) {
262
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
263
+ } @else {
264
+ <ng-content select="[left-icon]"></ng-content>
265
+ }
266
+ } @else if (iconOnly() && icon()) {
267
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
194
268
  }
195
269
 
196
270
  <span class="truncate" [class.sr-only]="iconOnly()">
197
271
  <ng-content></ng-content>
198
272
  </span>
199
273
 
200
- @if (!loading() && iconRight()) {
201
- <ng-content select="[right-icon]"></ng-content>
274
+ @if (!loading() && (iconRight() || (icon() && iconRight() && !iconOnly()))) {
275
+ @if (icon()) {
276
+ <neural-icon [name]="icon()!" [class]="iconClasses()"></neural-icon>
277
+ } @else {
278
+ <ng-content select="[right-icon]"></ng-content>
279
+ }
202
280
  }
203
281
  </button>
204
282
  `
205
283
  }]
206
- }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
284
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconLeft: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconLeft", required: false }] }], iconRight: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconRight", required: false }] }], iconOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconOnly", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
207
285
 
208
286
  class NeuralAlertComponent {
209
287
  title = input(/* @ts-ignore */
@@ -479,7 +557,7 @@ class NeuralAlertComponent {
479
557
  <svg [class]="iconColorClass()" class="size-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path d="M8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1ZM10.8535 5.14648C10.6583 4.95122 10.3417 4.95122 10.1465 5.14648L8 7.29297L5.85352 5.14648C5.65825 4.95122 5.34175 4.95122 5.14648 5.14648C4.95122 5.34175 4.95122 5.65825 5.14648 5.85352L7.29297 8L5.14648 10.1465C4.95122 10.3417 4.95122 10.6583 5.14648 10.8535C5.34175 11.0488 5.65825 11.0488 5.85352 10.8535L8 8.70703L10.1465 10.8535C10.3417 11.0488 10.6583 11.0488 10.8535 10.8535C11.0488 10.6583 11.0488 10.3417 10.8535 10.1465L8.70703 8L10.8535 5.85352C11.0488 5.65825 11.0488 5.34175 10.8535 5.14648Z" fill="currentColor"/></svg>
480
558
  }
481
559
  </ng-template>
482
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
560
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
483
561
  }
484
562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralAlertComponent, decorators: [{
485
563
  type: Component,
@@ -1766,6 +1844,8 @@ class NeuralDropdownComponent {
1766
1844
  hasTriggerSlot = input(false, /* @ts-ignore */
1767
1845
  ...(ngDevMode ? [{ debugName: "hasTriggerSlot" }] : /* istanbul ignore next */ []));
1768
1846
  handleItemClick(option, event, popover) {
1847
+ if ('separator' in option)
1848
+ return;
1769
1849
  if (option.disabled)
1770
1850
  return;
1771
1851
  if (option.onClick) {
@@ -1788,40 +1868,44 @@ class NeuralDropdownComponent {
1788
1868
  @if (options().length === 0) {
1789
1869
  <div class="p-2 text-sm text-ink-gray-5">No options</div>
1790
1870
  } @else {
1791
- @for (option of options(); track option.label) {
1792
- @if (option.route) {
1793
- <a
1794
- [routerLink]="option.route"
1795
- (click)="handleItemClick(option, $event, popover)"
1796
- class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
1797
- [class.opacity-50]="option.disabled"
1798
- [class.pointer-events-none]="option.disabled"
1799
- >
1800
- @if (option.icon) {
1801
- <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1802
- }
1803
- {{ option.label }}
1804
- </a>
1871
+ @for (option of options(); track $index) {
1872
+ @if ('separator' in option) {
1873
+ <div class="h-px bg-outline-gray-2 my-1 mx-1"></div>
1805
1874
  } @else {
1806
- <button
1807
- (click)="handleItemClick(option, $event, popover)"
1808
- class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
1809
- [disabled]="option.disabled"
1810
- [class.opacity-50]="option.disabled"
1811
- [class.cursor-not-allowed]="option.disabled"
1812
- >
1813
- @if (option.icon) {
1814
- <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1815
- }
1816
- {{ option.label }}
1817
- </button>
1875
+ @if (option.route) {
1876
+ <a
1877
+ [routerLink]="option.route"
1878
+ (click)="handleItemClick(option, $event, popover)"
1879
+ class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
1880
+ [class.opacity-50]="option.disabled"
1881
+ [class.pointer-events-none]="option.disabled"
1882
+ >
1883
+ @if (option.icon) {
1884
+ <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1885
+ }
1886
+ {{ option.label }}
1887
+ </a>
1888
+ } @else {
1889
+ <button
1890
+ (click)="handleItemClick(option, $event, popover)"
1891
+ class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
1892
+ [disabled]="option.disabled"
1893
+ [class.opacity-50]="option.disabled"
1894
+ [class.cursor-not-allowed]="option.disabled"
1895
+ >
1896
+ @if (option.icon) {
1897
+ <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1898
+ }
1899
+ {{ option.label }}
1900
+ </button>
1901
+ }
1818
1902
  }
1819
1903
  }
1820
1904
  }
1821
1905
  </neural-popover-panel>
1822
1906
  </ng-template>
1823
1907
  </neural-popover>
1824
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NeuralPopoverComponent, selector: "neural-popover", inputs: ["side", "align", "offset", "bare"], outputs: ["openChange"] }, { kind: "directive", type: NeuralPopoverTriggerDirective, selector: "[neuralPopoverTrigger]" }, { kind: "directive", type: NeuralPopoverContentDirective, selector: "[neuralPopoverContent]" }, { kind: "component", type: NeuralPopoverPanelComponent, selector: "neural-popover-panel" }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
1908
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NeuralPopoverComponent, selector: "neural-popover", inputs: ["side", "align", "offset", "bare"], outputs: ["openChange"] }, { kind: "directive", type: NeuralPopoverTriggerDirective, selector: "[neuralPopoverTrigger]" }, { kind: "directive", type: NeuralPopoverContentDirective, selector: "[neuralPopoverContent]" }, { kind: "component", type: NeuralPopoverPanelComponent, selector: "neural-popover-panel" }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
1825
1909
  }
1826
1910
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDropdownComponent, decorators: [{
1827
1911
  type: Component,
@@ -1843,33 +1927,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
1843
1927
  @if (options().length === 0) {
1844
1928
  <div class="p-2 text-sm text-ink-gray-5">No options</div>
1845
1929
  } @else {
1846
- @for (option of options(); track option.label) {
1847
- @if (option.route) {
1848
- <a
1849
- [routerLink]="option.route"
1850
- (click)="handleItemClick(option, $event, popover)"
1851
- class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
1852
- [class.opacity-50]="option.disabled"
1853
- [class.pointer-events-none]="option.disabled"
1854
- >
1855
- @if (option.icon) {
1856
- <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1857
- }
1858
- {{ option.label }}
1859
- </a>
1930
+ @for (option of options(); track $index) {
1931
+ @if ('separator' in option) {
1932
+ <div class="h-px bg-outline-gray-2 my-1 mx-1"></div>
1860
1933
  } @else {
1861
- <button
1862
- (click)="handleItemClick(option, $event, popover)"
1863
- class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
1864
- [disabled]="option.disabled"
1865
- [class.opacity-50]="option.disabled"
1866
- [class.cursor-not-allowed]="option.disabled"
1867
- >
1868
- @if (option.icon) {
1869
- <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1870
- }
1871
- {{ option.label }}
1872
- </button>
1934
+ @if (option.route) {
1935
+ <a
1936
+ [routerLink]="option.route"
1937
+ (click)="handleItemClick(option, $event, popover)"
1938
+ class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors"
1939
+ [class.opacity-50]="option.disabled"
1940
+ [class.pointer-events-none]="option.disabled"
1941
+ >
1942
+ @if (option.icon) {
1943
+ <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1944
+ }
1945
+ {{ option.label }}
1946
+ </a>
1947
+ } @else {
1948
+ <button
1949
+ (click)="handleItemClick(option, $event, popover)"
1950
+ class="flex items-center gap-2 px-2 py-1.5 text-sm rounded-4 text-ink-gray-9 hover:bg-surface-gray-2 cursor-pointer transition-colors text-left w-full"
1951
+ [disabled]="option.disabled"
1952
+ [class.opacity-50]="option.disabled"
1953
+ [class.cursor-not-allowed]="option.disabled"
1954
+ >
1955
+ @if (option.icon) {
1956
+ <i [class]="option.icon" class="size-4 text-ink-gray-5"></i>
1957
+ }
1958
+ {{ option.label }}
1959
+ </button>
1960
+ }
1873
1961
  }
1874
1962
  }
1875
1963
  }
@@ -2013,7 +2101,7 @@ class NeuralBreadcrumbsComponent {
2013
2101
  }
2014
2102
  </div>
2015
2103
  </div>
2016
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NeuralDropdownComponent, selector: "neural-dropdown", inputs: ["options", "side", "align", "offset", "buttonLabel", "hasTriggerSlot"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
2104
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NeuralDropdownComponent, selector: "neural-dropdown", inputs: ["options", "side", "align", "offset", "buttonLabel", "hasTriggerSlot"] }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
2017
2105
  }
2018
2106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralBreadcrumbsComponent, decorators: [{
2019
2107
  type: Component,
@@ -3695,58 +3783,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
3695
3783
  }]
3696
3784
  }], propDecorators: { valueModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueModel", required: false }] }, { type: i0.Output, args: ["valueModelChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], padded: [{ type: i0.Input, args: [{ isSignal: true, alias: "padded", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], controlPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlPosition", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], hasLabelSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasLabelSlot", required: false }] }], hasDescriptionSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDescriptionSlot", required: false }] }] } });
3697
3785
 
3698
- class NeuralIconComponent {
3699
- name = input.required(/* @ts-ignore */
3700
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
3701
- isLucideIcon = computed(() => {
3702
- const val = this.name();
3703
- return typeof val === 'string' && val.startsWith('lucide-');
3704
- }, /* @ts-ignore */
3705
- ...(ngDevMode ? [{ debugName: "isLucideIcon" }] : /* istanbul ignore next */ []));
3706
- isEmojiIcon = computed(() => {
3707
- const val = this.name();
3708
- if (typeof val !== 'string')
3709
- return false;
3710
- // Very simple emoji detection
3711
- const emojiRegex = /[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u;
3712
- return emojiRegex.test(val);
3713
- }, /* @ts-ignore */
3714
- ...(ngDevMode ? [{ debugName: "isEmojiIcon" }] : /* istanbul ignore next */ []));
3715
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3716
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralIconComponent, isStandalone: true, selector: "neural-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
3717
- @if (isLucideIcon()) {
3718
- <span [class]="name()" aria-hidden="true"></span>
3719
- } @else if (isEmojiIcon()) {
3720
- <span class="inline-flex items-center justify-center leading-none" aria-hidden="true">
3721
- {{ name() }}
3722
- </span>
3723
- } @else {
3724
- <!-- Fallback or custom SVG component handled by ng-content if not string -->
3725
- <ng-content></ng-content>
3726
- }
3727
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }] });
3728
- }
3729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralIconComponent, decorators: [{
3730
- type: Component,
3731
- args: [{
3732
- selector: 'neural-icon',
3733
- standalone: true,
3734
- imports: [CommonModule],
3735
- template: `
3736
- @if (isLucideIcon()) {
3737
- <span [class]="name()" aria-hidden="true"></span>
3738
- } @else if (isEmojiIcon()) {
3739
- <span class="inline-flex items-center justify-center leading-none" aria-hidden="true">
3740
- {{ name() }}
3741
- </span>
3742
- } @else {
3743
- <!-- Fallback or custom SVG component handled by ng-content if not string -->
3744
- <ng-content></ng-content>
3745
- }
3746
- `
3747
- }]
3748
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }] } });
3749
-
3750
3786
  class NeuralSpinnerComponent {
3751
3787
  size = input(/* @ts-ignore */
3752
3788
  ...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
@@ -3921,7 +3957,7 @@ class NeuralDividerComponent {
3921
3957
  } @else {
3922
3958
  <hr class="border-0 border-outline-gray-2" [class]="dividerClasses()" />
3923
3959
  }
3924
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
3960
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
3925
3961
  }
3926
3962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDividerComponent, decorators: [{
3927
3963
  type: Component,
@@ -4433,7 +4469,7 @@ class NeuralDialogComponent {
4433
4469
  </div>
4434
4470
  </div>
4435
4471
  </ng-template>
4436
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
4472
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }] });
4437
4473
  }
4438
4474
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, decorators: [{
4439
4475
  type: Component,
@@ -7392,7 +7428,7 @@ class NeuralFileUploaderComponent {
7392
7428
  </div>
7393
7429
  }
7394
7430
  </div>
7395
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }, { kind: "component", type: NeuralErrorMessageComponent, selector: "neural-error-message", inputs: ["message"] }] });
7431
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: NeuralButtonComponent, selector: "neural-button", inputs: ["variant", "theme", "size", "type", "disabled", "loading", "icon", "iconLeft", "iconRight", "iconOnly"], outputs: ["clicked"] }, { kind: "component", type: NeuralErrorMessageComponent, selector: "neural-error-message", inputs: ["message"] }] });
7396
7432
  }
7397
7433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralFileUploaderComponent, decorators: [{
7398
7434
  type: Component,