orbiq-neural-ui-kit 1.1.2 → 1.1.5

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.
@@ -11470,6 +11470,160 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
11470
11470
  }]
11471
11471
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], description: [{ type: i0.Input, args: [{ isSignal: true, alias: "description", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], hasLabelSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasLabelSlot", required: false }] }], hasDescriptionSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasDescriptionSlot", required: false }] }] } });
11472
11472
 
11473
+ class NeuralDrawerComponent {
11474
+ dialog;
11475
+ openModel = model(false, /* @ts-ignore */
11476
+ ...(ngDevMode ? [{ debugName: "openModel" }] : /* istanbul ignore next */ []));
11477
+ title = input('Información', /* @ts-ignore */
11478
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
11479
+ position = input('right', /* @ts-ignore */
11480
+ ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
11481
+ size = input('md', /* @ts-ignore */
11482
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
11483
+ showCloseButton = input(true, /* @ts-ignore */
11484
+ ...(ngDevMode ? [{ debugName: "showCloseButton" }] : /* istanbul ignore next */ []));
11485
+ dismissible = input(true, /* @ts-ignore */
11486
+ ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
11487
+ onClose = new EventEmitter();
11488
+ drawerTemplate;
11489
+ dialogRef = null;
11490
+ constructor(dialog) {
11491
+ this.dialog = dialog;
11492
+ effect(() => {
11493
+ const isOpen = this.openModel();
11494
+ if (isOpen && !this.dialogRef && this.drawerTemplate) {
11495
+ this.openDrawer();
11496
+ }
11497
+ else if (!isOpen && this.dialogRef) {
11498
+ this.dialogRef.close();
11499
+ this.dialogRef = null;
11500
+ }
11501
+ });
11502
+ }
11503
+ openDrawer() {
11504
+ this.dialogRef = this.dialog.open(this.drawerTemplate, {
11505
+ disableClose: !this.dismissible(),
11506
+ backdropClass: 'bg-black-overlay-200',
11507
+ panelClass: ['w-full', 'h-full', 'bg-transparent', 'shadow-none', 'outline-none', 'pointer-events-none'],
11508
+ hasBackdrop: true,
11509
+ });
11510
+ this.dialogRef.closed.subscribe(() => {
11511
+ this.dialogRef = null;
11512
+ if (this.openModel()) {
11513
+ this.openModel.set(false);
11514
+ }
11515
+ this.onClose.emit();
11516
+ });
11517
+ }
11518
+ close() {
11519
+ if (this.dialogRef) {
11520
+ this.dialogRef.close();
11521
+ }
11522
+ }
11523
+ ngOnDestroy() {
11524
+ if (this.dialogRef) {
11525
+ this.dialogRef.close();
11526
+ }
11527
+ }
11528
+ sizeClass = computed(() => {
11529
+ const map = {
11530
+ sm: 'w-64', // 256px
11531
+ md: 'w-80', // 320px
11532
+ lg: 'w-96', // 384px
11533
+ xl: 'w-[400px]', // 400px
11534
+ full: 'w-screen'
11535
+ };
11536
+ return map[this.size()] || 'w-80';
11537
+ }, /* @ts-ignore */
11538
+ ...(ngDevMode ? [{ debugName: "sizeClass" }] : /* istanbul ignore next */ []));
11539
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDrawerComponent, deps: [{ token: i1$3.Dialog }], target: i0.ɵɵFactoryTarget.Component });
11540
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.4", type: NeuralDrawerComponent, isStandalone: true, selector: "neural-drawer", inputs: { openModel: { classPropertyName: "openModel", publicName: "openModel", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openModel: "openModelChange", onClose: "onClose" }, viewQueries: [{ propertyName: "drawerTemplate", first: true, predicate: ["drawerTemplate"], descendants: true }], ngImport: i0, template: `
11541
+ <ng-template #drawerTemplate>
11542
+ <div class="fixed inset-0 z-50 flex" [ngClass]="position() === 'right' ? 'justify-end' : 'justify-start'">
11543
+ <div
11544
+ class="h-full bg-white shadow-2xl flex flex-col outline-none border-outline-gray-2 pointer-events-auto"
11545
+ [class.border-l]="position() === 'right'"
11546
+ [class.border-r]="position() === 'left'"
11547
+ [class]="sizeClass()"
11548
+ >
11549
+ <!-- Header -->
11550
+ <div class="flex items-center justify-between px-6 py-4 border-b border-outline-gray-2 shrink-0">
11551
+ <h2 class="text-lg font-semibold text-ink-gray-9">{{ title() }}</h2>
11552
+ @if (showCloseButton()) {
11553
+ <button
11554
+ class="flex items-center justify-center size-8 rounded-md hover:bg-surface-gray-2 text-ink-gray-5 hover:text-ink-gray-9 transition-colors"
11555
+ (click)="close()"
11556
+ title="Cerrar"
11557
+ >
11558
+ <i class="lucide-x size-[18px]" style="stroke-width: 1.5px;"></i>
11559
+ </button>
11560
+ }
11561
+ </div>
11562
+
11563
+ <!-- Body -->
11564
+ <div class="flex-1 overflow-y-auto p-6 text-sm font-normal text-ink-gray-7">
11565
+ <ng-content></ng-content>
11566
+ </div>
11567
+
11568
+ <!-- Footer (Optional) -->
11569
+ <div class="shrink-0">
11570
+ <ng-content select="[footer]"></ng-content>
11571
+ </div>
11572
+ </div>
11573
+ </div>
11574
+ </ng-template>
11575
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DialogModule }] });
11576
+ }
11577
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NeuralDrawerComponent, decorators: [{
11578
+ type: Component,
11579
+ args: [{
11580
+ selector: 'neural-drawer',
11581
+ standalone: true,
11582
+ imports: [CommonModule, DialogModule],
11583
+ template: `
11584
+ <ng-template #drawerTemplate>
11585
+ <div class="fixed inset-0 z-50 flex" [ngClass]="position() === 'right' ? 'justify-end' : 'justify-start'">
11586
+ <div
11587
+ class="h-full bg-white shadow-2xl flex flex-col outline-none border-outline-gray-2 pointer-events-auto"
11588
+ [class.border-l]="position() === 'right'"
11589
+ [class.border-r]="position() === 'left'"
11590
+ [class]="sizeClass()"
11591
+ >
11592
+ <!-- Header -->
11593
+ <div class="flex items-center justify-between px-6 py-4 border-b border-outline-gray-2 shrink-0">
11594
+ <h2 class="text-lg font-semibold text-ink-gray-9">{{ title() }}</h2>
11595
+ @if (showCloseButton()) {
11596
+ <button
11597
+ class="flex items-center justify-center size-8 rounded-md hover:bg-surface-gray-2 text-ink-gray-5 hover:text-ink-gray-9 transition-colors"
11598
+ (click)="close()"
11599
+ title="Cerrar"
11600
+ >
11601
+ <i class="lucide-x size-[18px]" style="stroke-width: 1.5px;"></i>
11602
+ </button>
11603
+ }
11604
+ </div>
11605
+
11606
+ <!-- Body -->
11607
+ <div class="flex-1 overflow-y-auto p-6 text-sm font-normal text-ink-gray-7">
11608
+ <ng-content></ng-content>
11609
+ </div>
11610
+
11611
+ <!-- Footer (Optional) -->
11612
+ <div class="shrink-0">
11613
+ <ng-content select="[footer]"></ng-content>
11614
+ </div>
11615
+ </div>
11616
+ </div>
11617
+ </ng-template>
11618
+ `
11619
+ }]
11620
+ }], ctorParameters: () => [{ type: i1$3.Dialog }], 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 }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], showCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showCloseButton", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], onClose: [{
11621
+ type: Output
11622
+ }], drawerTemplate: [{
11623
+ type: ViewChild,
11624
+ args: ['drawerTemplate']
11625
+ }] } });
11626
+
11473
11627
  class NeuralFileUploaderComponent {
11474
11628
  fileTypes = input('', /* @ts-ignore */
11475
11629
  ...(ngDevMode ? [{ debugName: "fileTypes" }] : /* istanbul ignore next */ []));
@@ -15143,5 +15297,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImpor
15143
15297
  * Generated bundle index. Do not edit.
15144
15298
  */
15145
15299
 
15146
- export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDataTableComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralEntityFormComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFilterBuilderComponent, NeuralFloatingWindowComponent, NeuralFooterComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralKeyboardShortcutsDialogComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNotificationCenterComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSearchTriggerComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSubGridComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
15300
+ export { NeuralAccordionComponent, NeuralAlertComponent, NeuralAvatarComponent, NeuralAxisChartComponent, NeuralBadgeComponent, NeuralBottomSheetComponent, NeuralBreadcrumbsComponent, NeuralButtonComponent, NeuralCalendarComponent, NeuralCheckboxComponent, NeuralCodeEditorComponent, NeuralCodePreviewComponent, NeuralComboboxComponent, NeuralCommandPaletteComponent, NeuralContextMenuComponent, NeuralDataTableComponent, NeuralDatePickerComponent, NeuralDesktopShellComponent, NeuralDialogComponent, NeuralDividerComponent, NeuralDonutChartComponent, NeuralDrawerComponent, NeuralDropdownComponent, NeuralDurationComponent, NeuralEChartsComponent, NeuralEntityFormComponent, NeuralErrorMessageComponent, NeuralFileUploaderComponent, NeuralFilterBuilderComponent, NeuralFloatingWindowComponent, NeuralFooterComponent, NeuralFormControlComponent, NeuralFormLabelComponent, NeuralFunnelChartComponent, NeuralHoverCardComponent, NeuralIconComponent, NeuralInputDescriptionComponent, NeuralInputErrorComponent, NeuralInputLabelComponent, NeuralItemListRowComponent, NeuralKeyboardShortcutComponent, NeuralKeyboardShortcutsDialogComponent, NeuralLabelingWrapperComponent, NeuralListViewComponent, NeuralLoadingIndicatorComponent, NeuralLoadingTextComponent, NeuralMenuComponent, NeuralMobileNavComponent, NeuralMobileNavItemComponent, NeuralMobileShellComponent, NeuralMultiEmailInputComponent, NeuralMultiSelectComponent, NeuralNotificationCenterComponent, NeuralNumberChartComponent, NeuralPageHeaderComponent, NeuralPasswordComponent, NeuralPopoverComponent, NeuralPopoverContentDirective, NeuralPopoverPanelComponent, NeuralPopoverTriggerDirective, NeuralProgressComponent, NeuralRadioComponent, NeuralRadioGroupComponent, NeuralRailComponent, NeuralRailItemComponent, NeuralRatingComponent, NeuralRequiredIndicatorComponent, NeuralScrollAreaComponent, NeuralSearchTriggerComponent, NeuralSelectComponent, NeuralSettingsContentComponent, NeuralSettingsDialogComponent, NeuralSettingsNavItemComponent, NeuralSettingsPanelComponent, NeuralSettingsSidebarComponent, NeuralSidebarComponent, NeuralSidebarItemComponent, NeuralSkeletonComponent, NeuralSliderComponent, NeuralSpinnerComponent, NeuralSubGridComponent, NeuralSwitchComponent, NeuralTabComponent, NeuralTabPanelComponent, NeuralTabsComponent, NeuralTextEditorComponent, NeuralTextInputComponent, NeuralTextareaComponent, NeuralThemeSwitcherComponent, NeuralTimePickerComponent, NeuralToastComponent, NeuralTooltipComponent, NeuralTreeComponent, NeuralTreeItemComponent, RADIO_GROUP, TABS_ROOT, ToastService, formatDuration, parseDuration };
15147
15301
  //# sourceMappingURL=orbiq-neural-ui-kit.mjs.map