orbiq-neural-ui-kit 1.1.31 → 1.1.33

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.
@@ -490,7 +490,7 @@ class NeuralButtonComponent {
490
490
  const t = this.theme();
491
491
  const s = this.size();
492
492
  const solidClasses = {
493
- gray: 'text-ink-base bg-surface-gray-10 hover:bg-surface-gray-9 active:bg-surface-gray-8',
493
+ gray: 'text-white bg-gray-800 hover:bg-gray-900 active:bg-surface-gray-8',
494
494
  blue: 'text-ink-base bg-surface-blue-6 hover:bg-surface-blue-7 active:bg-surface-blue-8',
495
495
  green: 'text-ink-base bg-surface-green-7 hover:bg-surface-green-8 active:bg-surface-green-9',
496
496
  red: 'text-ink-base dark:text-ink-red-9 bg-surface-red-7 hover:bg-surface-red-8 active:bg-surface-red-9',
@@ -576,11 +576,11 @@ class NeuralButtonComponent {
576
576
  }, /* @ts-ignore */
577
577
  ...(ngDevMode ? [{ debugName: "computedClasses" }] : /* istanbul ignore next */ []));
578
578
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
579
- 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: `
579
+ 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" }, host: { styleAttribute: "display: inline-block" }, ngImport: i0, template: `
580
580
  <button
581
581
  [type]="type()"
582
582
  [disabled]="isDisabled()"
583
- [class]="computedClasses()"
583
+ [class]="'w-full ' + computedClasses()"
584
584
  (click)="onClick($event)"
585
585
  [attr.aria-busy]="loading() ? 'true' : null"
586
586
  >
@@ -619,11 +619,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
619
619
  selector: 'neural-button',
620
620
  standalone: true,
621
621
  imports: [CommonModule, NeuralIconComponent],
622
+ host: { style: 'display: inline-block' },
622
623
  template: `
623
624
  <button
624
625
  [type]="type()"
625
626
  [disabled]="isDisabled()"
626
- [class]="computedClasses()"
627
+ [class]="'w-full ' + computedClasses()"
627
628
  (click)="onClick($event)"
628
629
  [attr.aria-busy]="loading() ? 'true' : null"
629
630
  >
@@ -8271,8 +8272,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
8271
8272
  }] } });
8272
8273
 
8273
8274
  class NeuralDialogComponent {
8274
- dialog;
8275
- viewContainerRef;
8276
8275
  // ── Public API (sin cambios de compatibilidad) ──────────────────────────────
8277
8276
  openModel = model(false, /* @ts-ignore */
8278
8277
  ...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
@@ -8296,60 +8295,24 @@ class NeuralDialogComponent {
8296
8295
  ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
8297
8296
  bare = input(false, /* @ts-ignore */
8298
8297
  ...(ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []));
8299
- // Mantenidos por compatibilidad con el modo bare=false aunque ya no se usan en bare=true
8300
8298
  hasTitleSlot = input(false, /* @ts-ignore */
8301
8299
  ...(ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []));
8302
8300
  hasActionsSlot = input(false, /* @ts-ignore */
8303
8301
  ...(ngDevMode ? [{ debugName: "hasActionsSlot" }] : /* istanbul ignore next */ []));
8304
8302
  hasDefaultSlot = input(false, /* @ts-ignore */
8305
8303
  ...(ngDevMode ? [{ debugName: "hasDefaultSlot" }] : /* istanbul ignore next */ []));
8306
- dialogTemplate;
8307
- dialogRef = null;
8308
8304
  internalActionsState = {};
8309
- constructor(dialog, viewContainerRef) {
8310
- this.dialog = dialog;
8311
- this.viewContainerRef = viewContainerRef;
8305
+ constructor() {
8312
8306
  effect(() => {
8313
- const isOpen = this.openModel();
8314
- // El CDK Portal SOLO se gestiona en modo bare=false.
8315
- // En bare=true, el @if del template reacciona al signal directamente.
8316
- if (!this.bare()) {
8317
- if (isOpen && !this.dialogRef && this.dialogTemplate) {
8318
- this.openDialog();
8319
- }
8320
- else if (!isOpen && this.dialogRef) {
8321
- this.dialogRef.close();
8322
- this.dialogRef = null;
8323
- }
8324
- }
8325
- });
8326
- }
8327
- openDialog() {
8328
- this.dialogRef = this.dialog.open(this.dialogTemplate, {
8329
- disableClose: !this.dismissible(),
8330
- backdropClass: 'bg-black-overlay-200',
8331
- panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none'],
8332
- hasBackdrop: true,
8333
- viewContainerRef: this.viewContainerRef,
8334
- });
8335
- this.dialogRef.closed.subscribe(() => {
8336
- this.dialogRef = null;
8337
- if (this.openModel()) {
8338
- this.openModel.set(false);
8339
- }
8307
+ // Manejar foco y escape de forma nativa en el futuro si es necesario.
8308
+ // El ngIf maneja el montaje y desmontaje.
8340
8309
  });
8341
8310
  }
8342
- /** Cierra el modal en modo bare=false (CDK) */
8311
+ /** Cierra el modal */
8343
8312
  close() {
8344
- if (this.bare()) {
8345
- // bare=true: simplemente cerramos el signal
8346
- this.openModel.set(false);
8347
- }
8348
- else if (this.dialogRef) {
8349
- this.dialogRef.close();
8350
- }
8313
+ this.openModel.set(false);
8351
8314
  }
8352
- /** Alias para cerrar desde el template bare=true (keydown.escape) */
8315
+ /** Alias para cerrar desde el template */
8353
8316
  closeBare() {
8354
8317
  if (this.dismissible()) {
8355
8318
  this.openModel.set(false);
@@ -8359,15 +8322,13 @@ class NeuralDialogComponent {
8359
8322
  const target = event.target;
8360
8323
  const isOverlay = target.classList.contains('dialog-scroll-container') ||
8361
8324
  target.classList.contains('min-h-screen') ||
8362
- target.classList.contains('dialog-backdrop'); // clic en backdrop manual (bare=true)
8325
+ target.classList.contains('dialog-backdrop');
8363
8326
  if (isOverlay && this.dismissible()) {
8364
8327
  this.close();
8365
8328
  }
8366
8329
  }
8367
8330
  ngOnDestroy() {
8368
- if (this.dialogRef) {
8369
- this.dialogRef.close();
8370
- }
8331
+ this.close();
8371
8332
  }
8372
8333
  // ── Computed ────────────────────────────────────────────────────────────────
8373
8334
  sizeClass = computed(() => {
@@ -8438,16 +8399,6 @@ class NeuralDialogComponent {
8438
8399
  return pt ? { paddingTop: pt } : {};
8439
8400
  }, /* @ts-ignore */
8440
8401
  ...(ngDevMode ? [{ debugName: "dialogPositionStyles" }] : /* istanbul ignore next */ []));
8441
- showHeader = computed(() => {
8442
- if (this.bare())
8443
- return false;
8444
- if (this.hasTitleSlot())
8445
- return true;
8446
- if (this.title())
8447
- return true;
8448
- return false;
8449
- }, /* @ts-ignore */
8450
- ...(ngDevMode ? [{ debugName: "showHeader" }] : /* istanbul ignore next */ []));
8451
8402
  reactiveActions = computed(() => {
8452
8403
  if (this.bare())
8453
8404
  return [];
@@ -8475,283 +8426,150 @@ class NeuralDialogComponent {
8475
8426
  this.internalActionsState[action.label] = false;
8476
8427
  }
8477
8428
  }
8478
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, deps: [{ token: i1$3.Dialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
8479
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralDialogComponent, isStandalone: true, selector: "neural-dialog", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, paddingTop: { classPropertyName: "paddingTop", publicName: "paddingTop", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, bare: { classPropertyName: "bare", publicName: "bare", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasActionsSlot: { classPropertyName: "hasActionsSlot", publicName: "hasActionsSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange" }, viewQueries: [{ propertyName: "dialogTemplate", first: true, predicate: ["dialogTemplate"], descendants: true }], ngImport: i0, template: `
8480
- <!--
8481
- MODO bare=true: Renderizado directo con @if.
8482
- Angular mantiene el árbol de vistas del componente padre, lo que permite que
8483
- <ng-content> proyecte correctamente los nodos del consumidor.
8484
- NOTA: El CDK Dialog Portal crea una EmbeddedView desconectada donde <ng-content>
8485
- no recibe proyección, resultando en height:0. Este modo evita ese bug.
8486
- -->
8487
- @if (bare() && openModel()) {
8488
- <div
8489
- class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container"
8490
- (click)="onContainerClick($event)"
8491
- (keydown.escape)="closeBare()"
8492
- tabindex="-1"
8493
- >
8494
- <!-- Backdrop manual con transición sincronizada -->
8429
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8430
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralDialogComponent, isStandalone: true, selector: "neural-dialog", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, paddingTop: { classPropertyName: "paddingTop", publicName: "paddingTop", isSignal: true, isRequired: false, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, bare: { classPropertyName: "bare", publicName: "bare", isSignal: true, isRequired: false, transformFunction: null }, hasTitleSlot: { classPropertyName: "hasTitleSlot", publicName: "hasTitleSlot", isSignal: true, isRequired: false, transformFunction: null }, hasActionsSlot: { classPropertyName: "hasActionsSlot", publicName: "hasActionsSlot", isSignal: true, isRequired: false, transformFunction: null }, hasDefaultSlot: { classPropertyName: "hasDefaultSlot", publicName: "hasDefaultSlot", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange" }, ngImport: i0, template: `
8431
+ @if (openModel()) {
8432
+ <div class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container" (click)="onContainerClick($event)" (keydown.escape)="closeBare()" tabindex="-1">
8495
8433
  <div class="fixed inset-0 bg-black-overlay-200 transition-opacity duration-150 dialog-backdrop"></div>
8434
+
8435
+ <div class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center" [class]="dialogPositionClasses()" [style]="dialogPositionStyles()">
8436
+ <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none" [class]="sizeClass()">
8437
+
8438
+ <ng-template #defaultContent>
8439
+ <ng-content></ng-content>
8440
+ </ng-template>
8496
8441
 
8497
- <!-- Contenedor posicionado -->
8498
- <div
8499
- class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center"
8500
- [class]="dialogPositionClasses()"
8501
- [style]="dialogPositionStyles()"
8502
- >
8503
- <div
8504
- class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
8505
- [class]="sizeClass()"
8506
- >
8507
- <!-- ng-content proyecta correctamente aquí porque estamos en el árbol de vistas del padre -->
8508
- <ng-content></ng-content>
8509
- </div>
8510
- </div>
8511
- </div>
8512
- }
8513
-
8514
- <!--
8515
- MODO bare=false: CDK Dialog Portal.
8516
- No usa <ng-content> — el contenido se genera desde @Input() (title, message, actions).
8517
- El CDK Portal funciona correctamente aquí porque no hay proyección de nodos externos.
8518
- -->
8519
- @if (!bare()) {
8520
- <ng-template #dialogTemplate>
8521
- <div
8522
- class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container"
8523
- (click)="onContainerClick($event)"
8524
- >
8525
- <div
8526
- class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
8527
- [class]="dialogPositionClasses()"
8528
- [style]="dialogPositionStyles()"
8529
- >
8530
- <div
8531
- class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
8532
- [class]="sizeClass()"
8533
- >
8442
+ @if (bare()) {
8443
+ <ng-container *ngTemplateOutlet="defaultContent"></ng-container>
8444
+ } @else {
8445
+ <!-- Diseño estándar con Header y Body -->
8534
8446
  <div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
8535
8447
  <div class="flex">
8536
- <div class="w-full flex-1">
8537
- @if (showHeader()) {
8538
- <div class="mb-6 flex items-center justify-between">
8539
- <div class="flex items-center space-x-2 flex-1">
8540
- @if (icon()) {
8541
- <div
8542
- class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
8543
- [class]="dialogIconBgClasses()"
8544
- >
8545
- <span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
8546
- </div>
8547
- }
8548
- <header class="flex-1">
8549
- @if (title()) {
8550
- <h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
8551
- {{ title() }}
8552
- </h3>
8553
- }
8554
- </header>
8555
- </div>
8556
- @if (showCloseButton()) {
8557
- <neural-button variant="ghost" label="Close" (click)="close()">
8558
- <span icon class="lucide-x size-4 text-ink-gray-9"></span>
8559
- </neural-button>
8560
- }
8561
- </div>
8562
- }
8563
-
8564
- @if (message()) {
8565
- <p class="text-p-base text-ink-gray-7">
8566
- {{ message() }}
8567
- </p>
8448
+ @if (icon()) {
8449
+ <div class="mx-auto flex size-10 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10" [class]="dialogIconBgClasses()">
8450
+ <span icon [class]="(iconName() || '') + ' size-5 ' + dialogIconClasses()"></span>
8451
+ </div>
8452
+ }
8453
+ <header class="flex-1" [class.ml-4]="icon()">
8454
+ @if (hasTitleSlot()) {
8455
+ <ng-content select="[title]"></ng-content>
8456
+ } @else if (title()) {
8457
+ <h3 class="text-2xl-semibold leading-6 text-ink-gray-8">{{ title() }}</h3>
8568
8458
  }
8569
- </div>
8459
+ </header>
8460
+ @if (showCloseButton()) {
8461
+ <neural-button variant="ghost" [iconOnly]="true" icon="lucide-x" (clicked)="closeBare()" class="-mt-2 -mr-2"></neural-button>
8462
+ }
8463
+ </div>
8464
+
8465
+ <div [class]="icon() ? 'ml-14 mt-2' : 'mt-3'">
8466
+ @if (hasDefaultSlot()) {
8467
+ <ng-container *ngTemplateOutlet="defaultContent"></ng-container>
8468
+ } @else if (message()) {
8469
+ <p class="text-p-base text-ink-gray-7">{{ message() }}</p>
8470
+ }
8570
8471
  </div>
8571
8472
  </div>
8572
-
8573
- @if (reactiveActions().length) {
8574
- <div class="px-4 pb-7 pt-4 sm:px-6">
8575
- <div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
8576
- @for (action of reactiveActions(); track action.label) {
8577
- <neural-button
8578
- class="w-full sm:w-auto"
8579
- [disabled]="action.disabled || false"
8580
- [loading]="action.loading || false"
8581
- [variant]="action.variant || 'solid'"
8582
- [theme]="action.theme || 'gray'"
8583
- (click)="onActionClick(action)"
8584
- >
8585
- {{ action.label }}
8586
- @if (action.icon) {
8587
- <span icon [class]="action.icon + ' size-4'"></span>
8588
- }
8589
- </neural-button>
8590
- }
8591
- </div>
8473
+
8474
+ <!-- Acciones Footer -->
8475
+ @if (reactiveActions().length || hasActionsSlot()) {
8476
+ <div class="px-4 pb-7 pt-4 sm:px-6 bg-surface-gray-1 border-t border-outline-gray-2">
8477
+ @if (hasActionsSlot()) {
8478
+ <ng-content select="[actions]"></ng-content>
8479
+ } @else {
8480
+ <div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
8481
+ @for (action of reactiveActions(); track action.label) {
8482
+ <neural-button class="w-full sm:w-auto" [disabled]="action.disabled || false" [loading]="action.loading || false" [variant]="action.variant || 'solid'" [theme]="action.theme || 'gray'" (clicked)="onActionClick(action)">
8483
+ {{ action.label }}
8484
+ @if (action.icon) { <span icon [class]="action.icon + ' size-4'"></span> }
8485
+ </neural-button>
8486
+ }
8487
+ </div>
8488
+ }
8592
8489
  </div>
8593
8490
  }
8594
-
8595
- @if (showCloseButton() && !showHeader()) {
8596
- <neural-button
8597
- class="absolute right-4 top-4 z-10"
8598
- variant="ghost"
8599
- label="Close"
8600
- (click)="close()"
8601
- >
8602
- <span icon class="lucide-x size-4 text-ink-gray-9"></span>
8603
- </neural-button>
8604
- }
8605
- </div>
8491
+ }
8606
8492
  </div>
8607
8493
  </div>
8608
- </ng-template>
8494
+ </div>
8609
8495
  }
8610
- `, 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"] }] });
8496
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.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"] }] });
8611
8497
  }
8612
8498
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, decorators: [{
8613
8499
  type: Component,
8614
8500
  args: [{
8615
8501
  selector: 'neural-dialog',
8616
8502
  standalone: true,
8617
- imports: [CommonModule, DialogModule, NeuralButtonComponent],
8503
+ imports: [CommonModule, NeuralButtonComponent],
8618
8504
  template: `
8619
- <!--
8620
- MODO bare=true: Renderizado directo con @if.
8621
- Angular mantiene el árbol de vistas del componente padre, lo que permite que
8622
- <ng-content> proyecte correctamente los nodos del consumidor.
8623
- NOTA: El CDK Dialog Portal crea una EmbeddedView desconectada donde <ng-content>
8624
- no recibe proyección, resultando en height:0. Este modo evita ese bug.
8625
- -->
8626
- @if (bare() && openModel()) {
8627
- <div
8628
- class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container"
8629
- (click)="onContainerClick($event)"
8630
- (keydown.escape)="closeBare()"
8631
- tabindex="-1"
8632
- >
8633
- <!-- Backdrop manual con transición sincronizada -->
8505
+ @if (openModel()) {
8506
+ <div class="fixed inset-0 z-[1000] overflow-y-auto dialog-scroll-container" (click)="onContainerClick($event)" (keydown.escape)="closeBare()" tabindex="-1">
8634
8507
  <div class="fixed inset-0 bg-black-overlay-200 transition-opacity duration-150 dialog-backdrop"></div>
8508
+
8509
+ <div class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center" [class]="dialogPositionClasses()" [style]="dialogPositionStyles()">
8510
+ <div class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none" [class]="sizeClass()">
8511
+
8512
+ <ng-template #defaultContent>
8513
+ <ng-content></ng-content>
8514
+ </ng-template>
8635
8515
 
8636
- <!-- Contenedor posicionado -->
8637
- <div
8638
- class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center"
8639
- [class]="dialogPositionClasses()"
8640
- [style]="dialogPositionStyles()"
8641
- >
8642
- <div
8643
- class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
8644
- [class]="sizeClass()"
8645
- >
8646
- <!-- ng-content proyecta correctamente aquí porque estamos en el árbol de vistas del padre -->
8647
- <ng-content></ng-content>
8648
- </div>
8649
- </div>
8650
- </div>
8651
- }
8652
-
8653
- <!--
8654
- MODO bare=false: CDK Dialog Portal.
8655
- No usa <ng-content> — el contenido se genera desde @Input() (title, message, actions).
8656
- El CDK Portal funciona correctamente aquí porque no hay proyección de nodos externos.
8657
- -->
8658
- @if (!bare()) {
8659
- <ng-template #dialogTemplate>
8660
- <div
8661
- class="fixed inset-0 z-50 overflow-y-auto dialog-scroll-container"
8662
- (click)="onContainerClick($event)"
8663
- >
8664
- <div
8665
- class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
8666
- [class]="dialogPositionClasses()"
8667
- [style]="dialogPositionStyles()"
8668
- >
8669
- <div
8670
- class="my-8 inline-block w-full transform overflow-hidden rounded-7 bg-surface-elevation-1 text-start align-middle shadow-xl dialog-content focus-visible:outline-none"
8671
- [class]="sizeClass()"
8672
- >
8516
+ @if (bare()) {
8517
+ <ng-container *ngTemplateOutlet="defaultContent"></ng-container>
8518
+ } @else {
8519
+ <!-- Diseño estándar con Header y Body -->
8673
8520
  <div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
8674
8521
  <div class="flex">
8675
- <div class="w-full flex-1">
8676
- @if (showHeader()) {
8677
- <div class="mb-6 flex items-center justify-between">
8678
- <div class="flex items-center space-x-2 flex-1">
8679
- @if (icon()) {
8680
- <div
8681
- class="flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full"
8682
- [class]="dialogIconBgClasses()"
8683
- >
8684
- <span [class]="iconName() + ' size-4 ' + dialogIconClasses()" aria-hidden="true"></span>
8685
- </div>
8686
- }
8687
- <header class="flex-1">
8688
- @if (title()) {
8689
- <h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
8690
- {{ title() }}
8691
- </h3>
8692
- }
8693
- </header>
8694
- </div>
8695
- @if (showCloseButton()) {
8696
- <neural-button variant="ghost" label="Close" (click)="close()">
8697
- <span icon class="lucide-x size-4 text-ink-gray-9"></span>
8698
- </neural-button>
8699
- }
8700
- </div>
8701
- }
8702
-
8703
- @if (message()) {
8704
- <p class="text-p-base text-ink-gray-7">
8705
- {{ message() }}
8706
- </p>
8522
+ @if (icon()) {
8523
+ <div class="mx-auto flex size-10 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10" [class]="dialogIconBgClasses()">
8524
+ <span icon [class]="(iconName() || '') + ' size-5 ' + dialogIconClasses()"></span>
8525
+ </div>
8526
+ }
8527
+ <header class="flex-1" [class.ml-4]="icon()">
8528
+ @if (hasTitleSlot()) {
8529
+ <ng-content select="[title]"></ng-content>
8530
+ } @else if (title()) {
8531
+ <h3 class="text-2xl-semibold leading-6 text-ink-gray-8">{{ title() }}</h3>
8707
8532
  }
8708
- </div>
8533
+ </header>
8534
+ @if (showCloseButton()) {
8535
+ <neural-button variant="ghost" [iconOnly]="true" icon="lucide-x" (clicked)="closeBare()" class="-mt-2 -mr-2"></neural-button>
8536
+ }
8537
+ </div>
8538
+
8539
+ <div [class]="icon() ? 'ml-14 mt-2' : 'mt-3'">
8540
+ @if (hasDefaultSlot()) {
8541
+ <ng-container *ngTemplateOutlet="defaultContent"></ng-container>
8542
+ } @else if (message()) {
8543
+ <p class="text-p-base text-ink-gray-7">{{ message() }}</p>
8544
+ }
8709
8545
  </div>
8710
8546
  </div>
8711
-
8712
- @if (reactiveActions().length) {
8713
- <div class="px-4 pb-7 pt-4 sm:px-6">
8714
- <div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
8715
- @for (action of reactiveActions(); track action.label) {
8716
- <neural-button
8717
- class="w-full sm:w-auto"
8718
- [disabled]="action.disabled || false"
8719
- [loading]="action.loading || false"
8720
- [variant]="action.variant || 'solid'"
8721
- [theme]="action.theme || 'gray'"
8722
- (click)="onActionClick(action)"
8723
- >
8724
- {{ action.label }}
8725
- @if (action.icon) {
8726
- <span icon [class]="action.icon + ' size-4'"></span>
8727
- }
8728
- </neural-button>
8729
- }
8730
- </div>
8547
+
8548
+ <!-- Acciones Footer -->
8549
+ @if (reactiveActions().length || hasActionsSlot()) {
8550
+ <div class="px-4 pb-7 pt-4 sm:px-6 bg-surface-gray-1 border-t border-outline-gray-2">
8551
+ @if (hasActionsSlot()) {
8552
+ <ng-content select="[actions]"></ng-content>
8553
+ } @else {
8554
+ <div [class]="isSingleActionFullWidth() ? '' : 'flex justify-end gap-2'">
8555
+ @for (action of reactiveActions(); track action.label) {
8556
+ <neural-button class="w-full sm:w-auto" [disabled]="action.disabled || false" [loading]="action.loading || false" [variant]="action.variant || 'solid'" [theme]="action.theme || 'gray'" (clicked)="onActionClick(action)">
8557
+ {{ action.label }}
8558
+ @if (action.icon) { <span icon [class]="action.icon + ' size-4'"></span> }
8559
+ </neural-button>
8560
+ }
8561
+ </div>
8562
+ }
8731
8563
  </div>
8732
8564
  }
8733
-
8734
- @if (showCloseButton() && !showHeader()) {
8735
- <neural-button
8736
- class="absolute right-4 top-4 z-10"
8737
- variant="ghost"
8738
- label="Close"
8739
- (click)="close()"
8740
- >
8741
- <span icon class="lucide-x size-4 text-ink-gray-9"></span>
8742
- </neural-button>
8743
- }
8744
- </div>
8565
+ }
8745
8566
  </div>
8746
8567
  </div>
8747
- </ng-template>
8568
+ </div>
8748
8569
  }
8749
8570
  `
8750
8571
  }]
8751
- }], ctorParameters: () => [{ type: i1$3.Dialog }, { type: i0.ViewContainerRef }], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], paddingTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingTop", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], bare: [{ type: i0.Input, args: [{ isSignal: true, alias: "bare", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasActionsSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasActionsSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }], dialogTemplate: [{
8752
- type: ViewChild,
8753
- args: ['dialogTemplate']
8754
- }] } });
8572
+ }], ctorParameters: () => [], propDecorators: { openModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "openModel", required: false }] }, { type: i0.Output, args: ["openModelChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], paddingTop: [{ type: i0.Input, args: [{ isSignal: true, alias: "paddingTop", required: false }] }], actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], bare: [{ type: i0.Input, args: [{ isSignal: true, alias: "bare", required: false }] }], hasTitleSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasTitleSlot", required: false }] }], hasActionsSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasActionsSlot", required: false }] }], hasDefaultSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDefaultSlot", required: false }] }] } });
8755
8573
 
8756
8574
  class NeuralAwesomeBarComponent {
8757
8575
  searchInput;
@@ -8851,14 +8669,23 @@ class NeuralAwesomeBarComponent {
8851
8669
  (ngModelChange)="onQueryChange($event)"
8852
8670
  (keydown)="handleKeydown($event)"
8853
8671
  />
8854
- @if (query()) {
8855
- <button
8856
- class="flex items-center justify-center size-6 rounded-md hover:bg-surface-gray-2 transition-colors ml-2"
8857
- (click)="clearQuery()"
8858
- >
8859
- <i class="lucide-x size-4 text-ink-gray-5"></i>
8672
+ <div class="flex items-center gap-1 ml-3 text-ink-gray-4">
8673
+ @if (query()) {
8674
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7" (click)="clearQuery()">
8675
+ <i class="lucide-delete size-4"></i>
8676
+ </button>
8677
+ <div class="w-px h-4 bg-outline-gray-2 mx-1"></div>
8678
+ }
8679
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7">
8680
+ <i class="lucide-settings size-4"></i>
8860
8681
  </button>
8861
- }
8682
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7">
8683
+ <i class="lucide-maximize-2 size-4"></i>
8684
+ </button>
8685
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7" (click)="openModel.set(false)">
8686
+ <i class="lucide-x size-4"></i>
8687
+ </button>
8688
+ </div>
8862
8689
  </div>
8863
8690
 
8864
8691
  <!-- Filters (Chips) -->
@@ -8910,12 +8737,17 @@ class NeuralAwesomeBarComponent {
8910
8737
  <!-- Empty State -->
8911
8738
  <div class="flex flex-col items-center justify-center py-16 px-4 text-center">
8912
8739
  <div class="size-16 rounded-full bg-surface-gray-2 flex items-center justify-center mb-4">
8913
- <i class="lucide-search size-8 text-ink-gray-4"></i>
8740
+ <i class="lucide-clipboard-search size-8 text-ink-gray-4"></i>
8914
8741
  </div>
8915
8742
  <h3 class="text-base font-semibold text-ink-gray-9 mb-1">Buscar por cualquier cosa</h3>
8916
- <p class="text-sm text-ink-gray-5 max-w-sm">
8917
- Escribe para buscar a través de módulos, clientes, productos y configuraciones.
8743
+ <p class="text-sm text-ink-gray-5 max-w-sm mb-4">
8744
+ Use ampersand to match multiple terms (ej. Marie&amp;John)
8918
8745
  </p>
8746
+ <div class="flex items-center gap-1.5 text-xs text-ink-gray-5">
8747
+ <kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">⌘</kbd>
8748
+ <kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">K</kbd>
8749
+ <span>to open Awesome Bar</span>
8750
+ </div>
8919
8751
  </div>
8920
8752
  } @else {
8921
8753
  <!-- Results Projection -->
@@ -8971,14 +8803,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
8971
8803
  (ngModelChange)="onQueryChange($event)"
8972
8804
  (keydown)="handleKeydown($event)"
8973
8805
  />
8974
- @if (query()) {
8975
- <button
8976
- class="flex items-center justify-center size-6 rounded-md hover:bg-surface-gray-2 transition-colors ml-2"
8977
- (click)="clearQuery()"
8978
- >
8979
- <i class="lucide-x size-4 text-ink-gray-5"></i>
8806
+ <div class="flex items-center gap-1 ml-3 text-ink-gray-4">
8807
+ @if (query()) {
8808
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7" (click)="clearQuery()">
8809
+ <i class="lucide-delete size-4"></i>
8810
+ </button>
8811
+ <div class="w-px h-4 bg-outline-gray-2 mx-1"></div>
8812
+ }
8813
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7">
8814
+ <i class="lucide-settings size-4"></i>
8980
8815
  </button>
8981
- }
8816
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7">
8817
+ <i class="lucide-maximize-2 size-4"></i>
8818
+ </button>
8819
+ <button class="flex items-center justify-center size-7 rounded hover:bg-surface-gray-2 transition-colors text-ink-gray-5 hover:text-ink-gray-7" (click)="openModel.set(false)">
8820
+ <i class="lucide-x size-4"></i>
8821
+ </button>
8822
+ </div>
8982
8823
  </div>
8983
8824
 
8984
8825
  <!-- Filters (Chips) -->
@@ -9030,12 +8871,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
9030
8871
  <!-- Empty State -->
9031
8872
  <div class="flex flex-col items-center justify-center py-16 px-4 text-center">
9032
8873
  <div class="size-16 rounded-full bg-surface-gray-2 flex items-center justify-center mb-4">
9033
- <i class="lucide-search size-8 text-ink-gray-4"></i>
8874
+ <i class="lucide-clipboard-search size-8 text-ink-gray-4"></i>
9034
8875
  </div>
9035
8876
  <h3 class="text-base font-semibold text-ink-gray-9 mb-1">Buscar por cualquier cosa</h3>
9036
- <p class="text-sm text-ink-gray-5 max-w-sm">
9037
- Escribe para buscar a través de módulos, clientes, productos y configuraciones.
8877
+ <p class="text-sm text-ink-gray-5 max-w-sm mb-4">
8878
+ Use ampersand to match multiple terms (ej. Marie&amp;John)
9038
8879
  </p>
8880
+ <div class="flex items-center gap-1.5 text-xs text-ink-gray-5">
8881
+ <kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">⌘</kbd>
8882
+ <kbd class="px-1.5 py-0.5 rounded border border-outline-gray-3 bg-surface-base font-sans text-[10px] text-ink-gray-7 shadow-sm">K</kbd>
8883
+ <span>to open Awesome Bar</span>
8884
+ </div>
9039
8885
  </div>
9040
8886
  } @else {
9041
8887
  <!-- Results Projection -->