orbiq-neural-ui-kit 1.1.30 → 1.1.31
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.
|
@@ -8273,6 +8273,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8273
8273
|
class NeuralDialogComponent {
|
|
8274
8274
|
dialog;
|
|
8275
8275
|
viewContainerRef;
|
|
8276
|
+
// ── Public API (sin cambios de compatibilidad) ──────────────────────────────
|
|
8276
8277
|
openModel = model(false, /* @ts-ignore */
|
|
8277
8278
|
...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
|
|
8278
8279
|
title = input(/* @ts-ignore */
|
|
@@ -8295,6 +8296,7 @@ class NeuralDialogComponent {
|
|
|
8295
8296
|
...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
|
|
8296
8297
|
bare = input(false, /* @ts-ignore */
|
|
8297
8298
|
...(ngDevMode ? [{ debugName: "bare" }] : /* istanbul ignore next */ []));
|
|
8299
|
+
// Mantenidos por compatibilidad con el modo bare=false aunque ya no se usan en bare=true
|
|
8298
8300
|
hasTitleSlot = input(false, /* @ts-ignore */
|
|
8299
8301
|
...(ngDevMode ? [{ debugName: "hasTitleSlot" }] : /* istanbul ignore next */ []));
|
|
8300
8302
|
hasActionsSlot = input(false, /* @ts-ignore */
|
|
@@ -8303,25 +8305,29 @@ class NeuralDialogComponent {
|
|
|
8303
8305
|
...(ngDevMode ? [{ debugName: "hasDefaultSlot" }] : /* istanbul ignore next */ []));
|
|
8304
8306
|
dialogTemplate;
|
|
8305
8307
|
dialogRef = null;
|
|
8306
|
-
internalActionsState = {};
|
|
8308
|
+
internalActionsState = {};
|
|
8307
8309
|
constructor(dialog, viewContainerRef) {
|
|
8308
8310
|
this.dialog = dialog;
|
|
8309
8311
|
this.viewContainerRef = viewContainerRef;
|
|
8310
8312
|
effect(() => {
|
|
8311
8313
|
const isOpen = this.openModel();
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
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
|
+
}
|
|
8318
8324
|
}
|
|
8319
8325
|
});
|
|
8320
8326
|
}
|
|
8321
8327
|
openDialog() {
|
|
8322
8328
|
this.dialogRef = this.dialog.open(this.dialogTemplate, {
|
|
8323
8329
|
disableClose: !this.dismissible(),
|
|
8324
|
-
backdropClass: 'bg-black-overlay-200',
|
|
8330
|
+
backdropClass: 'bg-black-overlay-200',
|
|
8325
8331
|
panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none'],
|
|
8326
8332
|
hasBackdrop: true,
|
|
8327
8333
|
viewContainerRef: this.viewContainerRef,
|
|
@@ -8333,18 +8339,29 @@ class NeuralDialogComponent {
|
|
|
8333
8339
|
}
|
|
8334
8340
|
});
|
|
8335
8341
|
}
|
|
8342
|
+
/** Cierra el modal en modo bare=false (CDK) */
|
|
8336
8343
|
close() {
|
|
8337
|
-
if (this.
|
|
8344
|
+
if (this.bare()) {
|
|
8345
|
+
// bare=true: simplemente cerramos el signal
|
|
8346
|
+
this.openModel.set(false);
|
|
8347
|
+
}
|
|
8348
|
+
else if (this.dialogRef) {
|
|
8338
8349
|
this.dialogRef.close();
|
|
8339
8350
|
}
|
|
8340
8351
|
}
|
|
8352
|
+
/** Alias para cerrar desde el template bare=true (keydown.escape) */
|
|
8353
|
+
closeBare() {
|
|
8354
|
+
if (this.dismissible()) {
|
|
8355
|
+
this.openModel.set(false);
|
|
8356
|
+
}
|
|
8357
|
+
}
|
|
8341
8358
|
onContainerClick(event) {
|
|
8342
8359
|
const target = event.target;
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8360
|
+
const isOverlay = target.classList.contains('dialog-scroll-container') ||
|
|
8361
|
+
target.classList.contains('min-h-screen') ||
|
|
8362
|
+
target.classList.contains('dialog-backdrop'); // clic en backdrop manual (bare=true)
|
|
8363
|
+
if (isOverlay && this.dismissible()) {
|
|
8364
|
+
this.close();
|
|
8348
8365
|
}
|
|
8349
8366
|
}
|
|
8350
8367
|
ngOnDestroy() {
|
|
@@ -8352,6 +8369,7 @@ class NeuralDialogComponent {
|
|
|
8352
8369
|
this.dialogRef.close();
|
|
8353
8370
|
}
|
|
8354
8371
|
}
|
|
8372
|
+
// ── Computed ────────────────────────────────────────────────────────────────
|
|
8355
8373
|
sizeClass = computed(() => {
|
|
8356
8374
|
const map = {
|
|
8357
8375
|
xs: 'max-w-xs',
|
|
@@ -8433,12 +8451,10 @@ class NeuralDialogComponent {
|
|
|
8433
8451
|
reactiveActions = computed(() => {
|
|
8434
8452
|
if (this.bare())
|
|
8435
8453
|
return [];
|
|
8436
|
-
return this.actions().map(action => {
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
};
|
|
8441
|
-
});
|
|
8454
|
+
return this.actions().map(action => ({
|
|
8455
|
+
...action,
|
|
8456
|
+
loading: this.internalActionsState[action.label] || false
|
|
8457
|
+
}));
|
|
8442
8458
|
}, /* @ts-ignore */
|
|
8443
8459
|
...(ngDevMode ? [{ debugName: "reactiveActions" }] : /* istanbul ignore next */ []));
|
|
8444
8460
|
isSingleActionFullWidth = computed(() => {
|
|
@@ -8452,10 +8468,6 @@ class NeuralDialogComponent {
|
|
|
8452
8468
|
return;
|
|
8453
8469
|
}
|
|
8454
8470
|
this.internalActionsState[action.label] = true;
|
|
8455
|
-
// trigger change detection by recreating the reference since it's a signal reading internalState
|
|
8456
|
-
// Or we could just use a separate mechanism. Let's mutate and trust Angular template binding if we update state.
|
|
8457
|
-
// In signal components, we might need a signal for internalActionsState
|
|
8458
|
-
// For now, let's just await
|
|
8459
8471
|
try {
|
|
8460
8472
|
await action.onClick({ close: () => this.close() });
|
|
8461
8473
|
}
|
|
@@ -8465,13 +8477,26 @@ class NeuralDialogComponent {
|
|
|
8465
8477
|
}
|
|
8466
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 });
|
|
8467
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: `
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
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"
|
|
8471
8490
|
(click)="onContainerClick($event)"
|
|
8491
|
+
(keydown.escape)="closeBare()"
|
|
8492
|
+
tabindex="-1"
|
|
8472
8493
|
>
|
|
8494
|
+
<!-- Backdrop manual con transición sincronizada -->
|
|
8495
|
+
<div class="fixed inset-0 bg-black-overlay-200 transition-opacity duration-150 dialog-backdrop"></div>
|
|
8496
|
+
|
|
8497
|
+
<!-- Contenedor posicionado -->
|
|
8473
8498
|
<div
|
|
8474
|
-
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8499
|
+
class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8475
8500
|
[class]="dialogPositionClasses()"
|
|
8476
8501
|
[style]="dialogPositionStyles()"
|
|
8477
8502
|
>
|
|
@@ -8479,9 +8504,33 @@ class NeuralDialogComponent {
|
|
|
8479
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"
|
|
8480
8505
|
[class]="sizeClass()"
|
|
8481
8506
|
>
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
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
|
+
>
|
|
8485
8534
|
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
8486
8535
|
<div class="flex">
|
|
8487
8536
|
<div class="w-full flex-1">
|
|
@@ -8497,9 +8546,7 @@ class NeuralDialogComponent {
|
|
|
8497
8546
|
</div>
|
|
8498
8547
|
}
|
|
8499
8548
|
<header class="flex-1">
|
|
8500
|
-
@if (
|
|
8501
|
-
<ng-content select="[title]"></ng-content>
|
|
8502
|
-
} @else if (title()) {
|
|
8549
|
+
@if (title()) {
|
|
8503
8550
|
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
8504
8551
|
{{ title() }}
|
|
8505
8552
|
</h3>
|
|
@@ -8514,9 +8561,7 @@ class NeuralDialogComponent {
|
|
|
8514
8561
|
</div>
|
|
8515
8562
|
}
|
|
8516
8563
|
|
|
8517
|
-
@if (
|
|
8518
|
-
<ng-content></ng-content>
|
|
8519
|
-
} @else if (message()) {
|
|
8564
|
+
@if (message()) {
|
|
8520
8565
|
<p class="text-p-base text-ink-gray-7">
|
|
8521
8566
|
{{ message() }}
|
|
8522
8567
|
</p>
|
|
@@ -8525,47 +8570,43 @@ class NeuralDialogComponent {
|
|
|
8525
8570
|
</div>
|
|
8526
8571
|
</div>
|
|
8527
8572
|
|
|
8528
|
-
@if (reactiveActions().length
|
|
8573
|
+
@if (reactiveActions().length) {
|
|
8529
8574
|
<div class="px-4 pb-7 pt-4 sm:px-6">
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
</neural-button>
|
|
8548
|
-
}
|
|
8549
|
-
</div>
|
|
8550
|
-
}
|
|
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>
|
|
8551
8592
|
</div>
|
|
8552
8593
|
}
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
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>
|
|
8565
8606
|
</div>
|
|
8566
8607
|
</div>
|
|
8567
|
-
</
|
|
8568
|
-
|
|
8608
|
+
</ng-template>
|
|
8609
|
+
}
|
|
8569
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"] }] });
|
|
8570
8611
|
}
|
|
8571
8612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDialogComponent, decorators: [{
|
|
@@ -8575,13 +8616,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8575
8616
|
standalone: true,
|
|
8576
8617
|
imports: [CommonModule, DialogModule, NeuralButtonComponent],
|
|
8577
8618
|
template: `
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
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"
|
|
8581
8629
|
(click)="onContainerClick($event)"
|
|
8630
|
+
(keydown.escape)="closeBare()"
|
|
8631
|
+
tabindex="-1"
|
|
8582
8632
|
>
|
|
8633
|
+
<!-- Backdrop manual con transición sincronizada -->
|
|
8634
|
+
<div class="fixed inset-0 bg-black-overlay-200 transition-opacity duration-150 dialog-backdrop"></div>
|
|
8635
|
+
|
|
8636
|
+
<!-- Contenedor posicionado -->
|
|
8583
8637
|
<div
|
|
8584
|
-
class="flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8638
|
+
class="relative flex min-h-screen flex-col items-center px-4 py-4 text-center"
|
|
8585
8639
|
[class]="dialogPositionClasses()"
|
|
8586
8640
|
[style]="dialogPositionStyles()"
|
|
8587
8641
|
>
|
|
@@ -8589,9 +8643,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8589
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"
|
|
8590
8644
|
[class]="sizeClass()"
|
|
8591
8645
|
>
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
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
|
+
>
|
|
8595
8673
|
<div class="bg-surface-elevation-1 px-4 pb-6 pt-5 sm:px-6">
|
|
8596
8674
|
<div class="flex">
|
|
8597
8675
|
<div class="w-full flex-1">
|
|
@@ -8607,9 +8685,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8607
8685
|
</div>
|
|
8608
8686
|
}
|
|
8609
8687
|
<header class="flex-1">
|
|
8610
|
-
@if (
|
|
8611
|
-
<ng-content select="[title]"></ng-content>
|
|
8612
|
-
} @else if (title()) {
|
|
8688
|
+
@if (title()) {
|
|
8613
8689
|
<h3 class="text-2xl-semibold leading-6 text-ink-gray-8">
|
|
8614
8690
|
{{ title() }}
|
|
8615
8691
|
</h3>
|
|
@@ -8624,9 +8700,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8624
8700
|
</div>
|
|
8625
8701
|
}
|
|
8626
8702
|
|
|
8627
|
-
@if (
|
|
8628
|
-
<ng-content></ng-content>
|
|
8629
|
-
} @else if (message()) {
|
|
8703
|
+
@if (message()) {
|
|
8630
8704
|
<p class="text-p-base text-ink-gray-7">
|
|
8631
8705
|
{{ message() }}
|
|
8632
8706
|
</p>
|
|
@@ -8635,47 +8709,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
|
|
|
8635
8709
|
</div>
|
|
8636
8710
|
</div>
|
|
8637
8711
|
|
|
8638
|
-
@if (reactiveActions().length
|
|
8712
|
+
@if (reactiveActions().length) {
|
|
8639
8713
|
<div class="px-4 pb-7 pt-4 sm:px-6">
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
</neural-button>
|
|
8658
|
-
}
|
|
8659
|
-
</div>
|
|
8660
|
-
}
|
|
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>
|
|
8661
8731
|
</div>
|
|
8662
8732
|
}
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
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>
|
|
8675
8745
|
</div>
|
|
8676
8746
|
</div>
|
|
8677
|
-
</
|
|
8678
|
-
|
|
8747
|
+
</ng-template>
|
|
8748
|
+
}
|
|
8679
8749
|
`
|
|
8680
8750
|
}]
|
|
8681
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: [{
|