@nanahoshi/mona-ui 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/auto-complete/package.json +4 -0
- package/avatar/package.json +4 -0
- package/breadcrumb/package.json +4 -0
- package/button/package.json +4 -0
- package/button-group/package.json +4 -0
- package/calendar/package.json +4 -0
- package/check-box/package.json +4 -0
- package/chip/package.json +4 -0
- package/circular-progress-bar/package.json +4 -0
- package/color-gradient/package.json +4 -0
- package/color-palette/package.json +4 -0
- package/color-picker/package.json +4 -0
- package/combo-box/package.json +4 -0
- package/common/package.json +4 -0
- package/contextmenu/package.json +4 -0
- package/date-input/package.json +4 -0
- package/date-picker/package.json +4 -0
- package/datetime-picker/package.json +4 -0
- package/dialog/package.json +4 -0
- package/dropdown-button/package.json +4 -0
- package/dropdown-list/package.json +4 -0
- package/dropdowns/package.json +4 -0
- package/editor/package.json +4 -0
- package/expansion-panel/package.json +4 -0
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +38 -53
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +19 -53
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +15 -26
- package/fesm2022/nanahoshi-mona-ui-button.mjs +67 -68
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +53 -149
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +48 -95
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +35 -45
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +9 -23
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +26 -77
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +16 -38
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +41 -46
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +32 -52
- package/fesm2022/nanahoshi-mona-ui-date-input.mjs +9 -12
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +40 -27
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +51 -51
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +40 -153
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +32 -53
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +7 -12
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +59 -219
- package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +24 -75
- package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +11 -44
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +11 -41
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B2ETh-uI.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DZk18LJC.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-C7WKhhig.mjs → nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs} +9 -16
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-BRiY0CDX.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +15 -44
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-BrYpFMyF.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs} +11 -20
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-T9Bj98kl.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +109 -393
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +26 -56
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +31 -122
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +4 -26
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +5 -18
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +48 -154
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +35 -62
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +24 -108
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +37 -63
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +21 -73
- package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +8 -30
- package/fesm2022/nanahoshi-mona-ui-popover.mjs +29 -50
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +36 -108
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +19 -60
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +47 -92
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +53 -144
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +54 -110
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +7 -20
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +15 -50
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +28 -91
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +37 -58
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +35 -107
- package/fesm2022/nanahoshi-mona-ui-text-area.mjs +22 -30
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +40 -61
- package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +41 -27
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +35 -99
- package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +13 -41
- package/fesm2022/nanahoshi-mona-ui-window.mjs +29 -108
- package/fieldset/package.json +4 -0
- package/filter/package.json +4 -0
- package/grid/package.json +4 -0
- package/internal/filter-input/package.json +4 -0
- package/internal/indicator-icon/package.json +4 -0
- package/internal/list/package.json +4 -0
- package/internal/package.json +4 -0
- package/internal/tree/package.json +4 -0
- package/list/package.json +4 -0
- package/list-box/package.json +4 -0
- package/list-view/package.json +4 -0
- package/menubar/package.json +4 -0
- package/multi-select/package.json +4 -0
- package/notification/package.json +4 -0
- package/numeric-text-box/package.json +4 -0
- package/package.json +2 -1
- package/pager/package.json +4 -0
- package/placeholder/package.json +4 -0
- package/popover/package.json +4 -0
- package/popup/package.json +4 -0
- package/popup-menu/package.json +4 -0
- package/progress-bar/package.json +4 -0
- package/query/package.json +4 -0
- package/radio-button/package.json +4 -0
- package/scroll-view/package.json +4 -0
- package/slider/package.json +4 -0
- package/split-button/package.json +4 -0
- package/splitter/package.json +4 -0
- package/stepper/package.json +4 -0
- package/switch/package.json +4 -0
- package/tabs/package.json +4 -0
- package/text-area/package.json +4 -0
- package/text-box/package.json +4 -0
- package/theme/package.json +4 -0
- package/time-picker/package.json +4 -0
- package/time-selector/package.json +4 -0
- package/tooltip/package.json +4 -0
- package/tree-view/package.json +4 -0
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
- package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
- package/types/nanahoshi-mona-ui-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
- package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
- package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
- package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
- package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
- package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -5
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
- package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
- package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-dialog.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
- package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
- package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
- package/types/nanahoshi-mona-ui-filter.d.ts +2 -3
- package/types/nanahoshi-mona-ui-grid.d.ts +14 -15
- package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
- package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
- package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
- package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
- package/types/nanahoshi-mona-ui-menubar.d.ts +6 -7
- package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
- package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
- package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
- package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
- package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
- package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
- package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
- package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
- package/types/nanahoshi-mona-ui-stepper.d.ts +12 -13
- package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
- package/types/nanahoshi-mona-ui-tabs.d.ts +14 -16
- package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
- package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
- package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
- package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
- package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
- package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
- package/types/nanahoshi-mona-ui-window.d.ts +16 -17
- package/window/package.json +4 -0
|
@@ -2,14 +2,13 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Directive, inject, DestroyRef, DOCUMENT, ElementRef, NgZone, input, afterNextRender, Pipe, ApplicationRef, Injector, signal, ViewContainerRef, computed, viewChild, TemplateRef, createComponent, Component, forwardRef, Injectable, contentChild, output, model, effect, untracked } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { fromEvent, Subject, asapScheduler, map, take } from 'rxjs';
|
|
5
|
-
import { createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
|
|
5
|
+
import { themeOverlaySurfaceClasses, createElementControlId, focusElement, setWindowStyles } from '@nanahoshi/mona-ui/internal';
|
|
6
6
|
import { PopupDataInjectionToken, PopupCloseEvent, PopupCloseSource, PopupService } from '@nanahoshi/mona-ui/popup';
|
|
7
7
|
import * as i1 from '@angular/cdk/a11y';
|
|
8
8
|
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
|
9
9
|
import { NgTemplateOutlet } from '@angular/common';
|
|
10
10
|
import { LucideMinimize, LucideMaximize, LucideMinus, LucideDynamicIcon, LucideX } from '@lucide/angular';
|
|
11
11
|
import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
12
|
-
import { ThemeService } from '@nanahoshi/mona-ui/theme';
|
|
13
12
|
import { cva } from 'class-variance-authority';
|
|
14
13
|
|
|
15
14
|
class WindowActionTemplateDirective {
|
|
@@ -432,9 +431,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
432
431
|
}]
|
|
433
432
|
}], ctorParameters: () => [], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: true }] }], maxHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxHeight", required: false }] }], maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], windowRef: [{ type: i0.Input, args: [{ isSignal: true, alias: "windowRef", required: true }] }] } });
|
|
434
433
|
|
|
435
|
-
const
|
|
436
|
-
flex
|
|
437
|
-
|
|
434
|
+
const windowBaseThemeVariants = cva(`
|
|
435
|
+
flex h-full w-full flex-col
|
|
436
|
+
${themeOverlaySurfaceClasses} text-foreground
|
|
438
437
|
`, {
|
|
439
438
|
variants: {
|
|
440
439
|
rounded: {
|
|
@@ -448,11 +447,10 @@ const windowBaseVariants = cva(`
|
|
|
448
447
|
rounded: "medium"
|
|
449
448
|
}
|
|
450
449
|
});
|
|
451
|
-
const
|
|
452
|
-
flex flex-col
|
|
453
|
-
relative w-full h-full
|
|
450
|
+
const windowContentContainerThemeVariants = cva(`
|
|
451
|
+
relative flex h-full w-full flex-col
|
|
454
452
|
border border-border
|
|
455
|
-
shadow-
|
|
453
|
+
shadow-(--shadow-overlay)
|
|
456
454
|
`, {
|
|
457
455
|
variants: {
|
|
458
456
|
rounded: {
|
|
@@ -463,10 +461,11 @@ const windowContentContainerVariants = cva(`
|
|
|
463
461
|
}
|
|
464
462
|
}
|
|
465
463
|
});
|
|
466
|
-
const
|
|
464
|
+
const windowContentThemeVariants = cva(`
|
|
467
465
|
flex-1 overflow-auto
|
|
466
|
+
[scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
|
|
468
467
|
`);
|
|
469
|
-
const
|
|
468
|
+
const windowResizerThemeVariants = cva(`
|
|
470
469
|
absolute flex
|
|
471
470
|
`, {
|
|
472
471
|
variants: {
|
|
@@ -482,17 +481,17 @@ const windowResizerVariants = cva(`
|
|
|
482
481
|
}
|
|
483
482
|
}
|
|
484
483
|
});
|
|
485
|
-
const
|
|
486
|
-
flex items-center
|
|
484
|
+
const windowTitleBarActionThemeVariants = cva(`
|
|
485
|
+
flex items-center justify-evenly
|
|
487
486
|
`);
|
|
488
|
-
const
|
|
487
|
+
const windowTitleBarThemeVariants = cva(`
|
|
489
488
|
flex items-center justify-start
|
|
490
|
-
px-2 py-1 text-sm
|
|
491
|
-
border-b border-border
|
|
489
|
+
overflow-hidden px-2 py-1 text-sm
|
|
490
|
+
border-b border-border-subtle
|
|
492
491
|
`, {
|
|
493
492
|
variants: {
|
|
494
493
|
look: {
|
|
495
|
-
default: "bg-
|
|
494
|
+
default: "bg-surface-muted text-foreground",
|
|
496
495
|
primary: "bg-primary text-primary-foreground"
|
|
497
496
|
},
|
|
498
497
|
rounded: {
|
|
@@ -503,14 +502,12 @@ const windowTitleBarVariants = cva(`
|
|
|
503
502
|
}
|
|
504
503
|
}
|
|
505
504
|
});
|
|
506
|
-
const
|
|
507
|
-
flex items-center
|
|
508
|
-
|
|
509
|
-
overflow-hidden text-ellipsis
|
|
505
|
+
const windowTitleContainerThemeVariants = cva(`
|
|
506
|
+
flex h-full flex-1 items-center overflow-hidden
|
|
507
|
+
cursor-default select-none text-ellipsis
|
|
510
508
|
`);
|
|
511
|
-
const
|
|
512
|
-
font-semibold
|
|
513
|
-
overflow-hidden text-ellipsis whitespace-nowrap
|
|
509
|
+
const windowTitleThemeVariants = cva(`
|
|
510
|
+
overflow-hidden text-ellipsis whitespace-nowrap font-semibold
|
|
514
511
|
`, {
|
|
515
512
|
variants: {
|
|
516
513
|
look: {
|
|
@@ -520,79 +517,12 @@ const windowTitleVariants = cva(`
|
|
|
520
517
|
}
|
|
521
518
|
});
|
|
522
519
|
|
|
523
|
-
const windowBaseThemeVariants = (theme) => {
|
|
524
|
-
switch (theme) {
|
|
525
|
-
case "mona":
|
|
526
|
-
return windowBaseVariants;
|
|
527
|
-
default:
|
|
528
|
-
return windowBaseVariants;
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
const windowContentContainerThemeVariants = (theme) => {
|
|
532
|
-
switch (theme) {
|
|
533
|
-
case "mona":
|
|
534
|
-
return windowContentContainerVariants;
|
|
535
|
-
default:
|
|
536
|
-
return windowContentContainerVariants;
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
const windowContentThemeVariants = (theme) => {
|
|
540
|
-
switch (theme) {
|
|
541
|
-
case "mona":
|
|
542
|
-
return windowContentVariants;
|
|
543
|
-
default:
|
|
544
|
-
return windowContentVariants;
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
const windowResizerThemeVariants = (theme) => {
|
|
548
|
-
switch (theme) {
|
|
549
|
-
case "mona":
|
|
550
|
-
return windowResizerVariants;
|
|
551
|
-
default:
|
|
552
|
-
return windowResizerVariants;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
const windowTitleBarActionThemeVariants = (theme) => {
|
|
556
|
-
switch (theme) {
|
|
557
|
-
case "mona":
|
|
558
|
-
return windowTitleBarActionVariants;
|
|
559
|
-
default:
|
|
560
|
-
return windowTitleBarActionVariants;
|
|
561
|
-
}
|
|
562
|
-
};
|
|
563
|
-
const windowTitleBarThemeVariants = (theme) => {
|
|
564
|
-
switch (theme) {
|
|
565
|
-
case "mona":
|
|
566
|
-
return windowTitleBarVariants;
|
|
567
|
-
default:
|
|
568
|
-
return windowTitleBarVariants;
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
const windowTitleContainerThemeVariants = (theme) => {
|
|
572
|
-
switch (theme) {
|
|
573
|
-
case "mona":
|
|
574
|
-
return windowTitleContainerVariants;
|
|
575
|
-
default:
|
|
576
|
-
return windowTitleContainerVariants;
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
const windowTitleThemeVariants = (theme) => {
|
|
580
|
-
switch (theme) {
|
|
581
|
-
case "mona":
|
|
582
|
-
return windowTitleVariants;
|
|
583
|
-
default:
|
|
584
|
-
return windowTitleVariants;
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
|
|
588
520
|
class ResizePositionPipe {
|
|
589
|
-
#themeService = inject(ThemeService);
|
|
590
521
|
transform(position) {
|
|
591
522
|
if (!position) {
|
|
592
523
|
return null;
|
|
593
524
|
}
|
|
594
|
-
|
|
595
|
-
return windowResizerThemeVariants(theme)({ position });
|
|
525
|
+
return windowResizerThemeVariants({ position });
|
|
596
526
|
}
|
|
597
527
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ResizePositionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
598
528
|
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.6", ngImport: i0, type: ResizePositionPipe, isStandalone: true, name: "monaResizePosition" }); }
|
|
@@ -611,7 +541,6 @@ class WindowContentComponent {
|
|
|
611
541
|
#injector;
|
|
612
542
|
#sizeBeforeMaximize;
|
|
613
543
|
#sizeBeforeMinimize;
|
|
614
|
-
#themeService;
|
|
615
544
|
#trapFocus;
|
|
616
545
|
#viewContainerRef;
|
|
617
546
|
constructor() {
|
|
@@ -623,25 +552,21 @@ class WindowContentComponent {
|
|
|
623
552
|
...(ngDevMode ? [{ debugName: "#sizeBeforeMaximize" }] : /* istanbul ignore next */ []));
|
|
624
553
|
this.#sizeBeforeMinimize = signal(0, /* @ts-ignore */
|
|
625
554
|
...(ngDevMode ? [{ debugName: "#sizeBeforeMinimize" }] : /* istanbul ignore next */ []));
|
|
626
|
-
this.#themeService = inject(ThemeService);
|
|
627
555
|
this.#trapFocus = inject(CdkTrapFocus);
|
|
628
556
|
this.#viewContainerRef = inject(ViewContainerRef);
|
|
629
557
|
this.baseClass = computed(() => {
|
|
630
|
-
const theme = this.#themeService.theme();
|
|
631
558
|
const rounded = this.windowData.rounded;
|
|
632
|
-
return windowBaseThemeVariants(
|
|
559
|
+
return windowBaseThemeVariants({ rounded });
|
|
633
560
|
}, /* @ts-ignore */
|
|
634
561
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
635
562
|
this.componentAnchor = viewChild.required("componentAnchor", { ...(ngDevMode ? { debugName: "componentAnchor" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
|
|
636
563
|
this.contentClass = computed(() => {
|
|
637
|
-
|
|
638
|
-
return windowContentThemeVariants(theme)();
|
|
564
|
+
return windowContentThemeVariants();
|
|
639
565
|
}, /* @ts-ignore */
|
|
640
566
|
...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
|
|
641
567
|
this.contentContainerClass = computed(() => {
|
|
642
|
-
const theme = this.#themeService.theme();
|
|
643
568
|
const rounded = this.windowData.rounded;
|
|
644
|
-
return windowContentContainerThemeVariants(
|
|
569
|
+
return windowContentContainerThemeVariants({ rounded });
|
|
645
570
|
}, /* @ts-ignore */
|
|
646
571
|
...(ngDevMode ? [{ debugName: "contentContainerClass" }] : /* istanbul ignore next */ []));
|
|
647
572
|
this.contentTemplate = computed(() => {
|
|
@@ -661,26 +586,22 @@ class WindowContentComponent {
|
|
|
661
586
|
this.minimized = signal(false, /* @ts-ignore */
|
|
662
587
|
...(ngDevMode ? [{ debugName: "minimized" }] : /* istanbul ignore next */ []));
|
|
663
588
|
this.titleBarActionClass = computed(() => {
|
|
664
|
-
|
|
665
|
-
return windowTitleBarActionThemeVariants(theme)();
|
|
589
|
+
return windowTitleBarActionThemeVariants();
|
|
666
590
|
}, /* @ts-ignore */
|
|
667
591
|
...(ngDevMode ? [{ debugName: "titleBarActionClass" }] : /* istanbul ignore next */ []));
|
|
668
592
|
this.titleBarClass = computed(() => {
|
|
669
|
-
const theme = this.#themeService.theme();
|
|
670
593
|
const look = this.windowData.look;
|
|
671
594
|
const rounded = this.windowData.rounded;
|
|
672
|
-
return windowTitleBarThemeVariants(
|
|
595
|
+
return windowTitleBarThemeVariants({ look, rounded });
|
|
673
596
|
}, /* @ts-ignore */
|
|
674
597
|
...(ngDevMode ? [{ debugName: "titleBarClass" }] : /* istanbul ignore next */ []));
|
|
675
598
|
this.titleClass = computed(() => {
|
|
676
|
-
const theme = this.#themeService.theme();
|
|
677
599
|
const look = this.windowData.look;
|
|
678
|
-
return windowTitleThemeVariants(
|
|
600
|
+
return windowTitleThemeVariants({ look });
|
|
679
601
|
}, /* @ts-ignore */
|
|
680
602
|
...(ngDevMode ? [{ debugName: "titleClass" }] : /* istanbul ignore next */ []));
|
|
681
603
|
this.titleContainerClass = computed(() => {
|
|
682
|
-
|
|
683
|
-
return windowTitleContainerThemeVariants(theme)();
|
|
604
|
+
return windowTitleContainerThemeVariants();
|
|
684
605
|
}, /* @ts-ignore */
|
|
685
606
|
...(ngDevMode ? [{ debugName: "titleContainerClass" }] : /* istanbul ignore next */ []));
|
|
686
607
|
this.windowData = inject(PopupDataInjectionToken);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nanahoshi/mona-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "A very light Angular UI framework",
|
|
5
5
|
"author": "Nanahoshi",
|
|
6
6
|
"repository": {
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@lucide/angular": "^1.21.0",
|
|
45
45
|
"@mirei/ts-collections": "^17.5.6",
|
|
46
46
|
"class-variance-authority": "^0.7.1",
|
|
47
|
+
"culori": "^4.0.2",
|
|
47
48
|
"luxon": "^3.7.2",
|
|
48
49
|
"remixicon": "^4.9.1",
|
|
49
50
|
"tailwind-merge": "^3.6.0",
|
|
@@ -9,10 +9,9 @@ import { PopupCloseEvent } from '@nanahoshi/mona-ui/popup';
|
|
|
9
9
|
import { Subject } from 'rxjs';
|
|
10
10
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
11
11
|
import { VariantProps } from 'class-variance-authority';
|
|
12
|
-
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
13
12
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
14
13
|
|
|
15
|
-
declare const autoCompleteBaseThemeVariants: (
|
|
14
|
+
declare const autoCompleteBaseThemeVariants: (props?: ({
|
|
16
15
|
disabled?: boolean | null | undefined;
|
|
17
16
|
expanded?: boolean | null | undefined;
|
|
18
17
|
focused?: boolean | null | undefined;
|
|
@@ -20,15 +19,15 @@ declare const autoCompleteBaseThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
|
20
19
|
rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
|
21
20
|
size?: "small" | "medium" | "large" | null | undefined;
|
|
22
21
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
23
|
-
declare const autoCompleteTextInputThemeVariants: (
|
|
22
|
+
declare const autoCompleteTextInputThemeVariants: (props?: ({
|
|
24
23
|
rounded?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
|
25
24
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
26
|
-
declare const autoCompleteAffixContainerThemeVariants: (
|
|
27
|
-
type AutoCompleteBaseVariantProps = VariantProps<
|
|
25
|
+
declare const autoCompleteAffixContainerThemeVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
26
|
+
type AutoCompleteBaseVariantProps = VariantProps<typeof autoCompleteBaseThemeVariants>;
|
|
28
27
|
type AutoCompleteBaseVariantInput = VariantInputs<AutoCompleteBaseVariantProps>;
|
|
29
|
-
type AutoCompleteTextInputVariantProps = VariantProps<
|
|
28
|
+
type AutoCompleteTextInputVariantProps = VariantProps<typeof autoCompleteTextInputThemeVariants>;
|
|
30
29
|
type AutoCompleteTextInputVariantInput = VariantInputs<AutoCompleteTextInputVariantProps>;
|
|
31
|
-
type AutoCompleteAffixContainerVariantProps = VariantProps<
|
|
30
|
+
type AutoCompleteAffixContainerVariantProps = VariantProps<typeof autoCompleteAffixContainerThemeVariants>;
|
|
32
31
|
type AutoCompleteAffixContainerVariantInput = VariantInputs<AutoCompleteAffixContainerVariantProps>;
|
|
33
32
|
type AutoCompleteVariantInput = Omit<AutoCompleteBaseVariantInput, "expanded" | "focused" | "invalid"> & AutoCompleteTextInputVariantInput & AutoCompleteAffixContainerVariantInput;
|
|
34
33
|
|
|
@@ -2,19 +2,18 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { TemplateRef } from '@angular/core';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
6
5
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
7
6
|
|
|
8
|
-
declare const breadcrumbListThemeVariants: (
|
|
7
|
+
declare const breadcrumbListThemeVariants: (props?: ({
|
|
9
8
|
disabled?: boolean | null | undefined;
|
|
10
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
-
declare const breadcrumbListItemThemeVariants: (
|
|
10
|
+
declare const breadcrumbListItemThemeVariants: (props?: ({
|
|
12
11
|
disabled?: boolean | null | undefined;
|
|
13
12
|
listDisabled?: boolean | null | undefined;
|
|
14
13
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
-
type BreadcrumbListVariantProps = VariantProps<
|
|
14
|
+
type BreadcrumbListVariantProps = VariantProps<typeof breadcrumbListThemeVariants>;
|
|
16
15
|
type BreadcrumbListVariantInput = VariantInputs<BreadcrumbListVariantProps>;
|
|
17
|
-
type BreadcrumbListItemVariantProps = VariantProps<
|
|
16
|
+
type BreadcrumbListItemVariantProps = VariantProps<typeof breadcrumbListItemThemeVariants>;
|
|
18
17
|
type BreadcrumbListItemVariantInput = VariantInputs<BreadcrumbListItemVariantProps>;
|
|
19
18
|
type BreadcrumbVariantInput = BreadcrumbListVariantInput & Omit<BreadcrumbListItemVariantInput, "listDisabled">;
|
|
20
19
|
|
|
@@ -36,7 +35,6 @@ declare class BreadcrumbItemComponent {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
declare class BreadcrumbComponent implements BreadcrumbVariantInput {
|
|
39
|
-
#private;
|
|
40
38
|
protected readonly itemComponents: _angular_core.Signal<readonly BreadcrumbItemComponent[]>;
|
|
41
39
|
protected readonly currentItemClass: _angular_core.Signal<string>;
|
|
42
40
|
protected readonly listClass: _angular_core.Signal<string>;
|
|
@@ -3,15 +3,14 @@ import { ButtonDirective } from '@nanahoshi/mona-ui/button';
|
|
|
3
3
|
import { SelectionMode } from '@nanahoshi/mona-ui/common';
|
|
4
4
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
6
|
-
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
7
6
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
8
7
|
|
|
9
|
-
declare const buttonGroupThemeVariants: (
|
|
8
|
+
declare const buttonGroupThemeVariants: (props?: ({
|
|
10
9
|
look?: "default" | "error" | "ghost" | "info" | "outline" | "primary" | "secondary" | "success" | "warning" | null | undefined;
|
|
11
10
|
rounded?: "full" | "large" | "medium" | "none" | "small" | null | undefined;
|
|
12
11
|
size?: "large" | "medium" | "small" | null | undefined;
|
|
13
12
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
-
type ButtonGroupVariantProps = VariantProps<
|
|
13
|
+
type ButtonGroupVariantProps = VariantProps<typeof buttonGroupThemeVariants>;
|
|
15
14
|
type ButtonGroupVariantsInput = VariantInputs<ButtonGroupVariantProps>;
|
|
16
15
|
|
|
17
16
|
declare class ButtonGroupComponent implements ButtonGroupVariantsInput {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
3
|
import { VariantInputs } from '@nanahoshi/mona-ui/internal';
|
|
4
|
-
import { ThemeStyle } from '@nanahoshi/mona-ui/theme';
|
|
5
4
|
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { Subject } from 'rxjs';
|
|
7
6
|
|
|
8
|
-
declare const buttonThemeVariants: (
|
|
7
|
+
declare const buttonThemeVariants: (props?: ({
|
|
9
8
|
disabled?: boolean | null | undefined;
|
|
10
9
|
iconOnly?: boolean | null | undefined;
|
|
11
10
|
loading?: boolean | null | undefined;
|
|
@@ -14,7 +13,7 @@ declare const buttonThemeVariants: (theme: ThemeStyle) => (props?: ({
|
|
|
14
13
|
size?: "large" | "medium" | "small" | null | undefined;
|
|
15
14
|
selected?: boolean | null | undefined;
|
|
16
15
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
-
type ButtonVariantProps = VariantProps<
|
|
16
|
+
type ButtonVariantProps = VariantProps<typeof buttonThemeVariants>;
|
|
18
17
|
type ButtonVariantsInput = VariantInputs<ButtonVariantProps>;
|
|
19
18
|
|
|
20
19
|
declare class ButtonDirective implements ButtonVariantsInput {
|