@nanahoshi/mona-ui 0.46.0 → 0.48.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/docs/api/button.json +1 -1
- package/docs/api/button.md +1 -0
- package/docs/api/check-box.json +1 -1
- package/docs/api/check-box.md +1 -0
- package/docs/api/chip.json +1 -1
- package/docs/api/chip.md +1 -0
- package/docs/api/common.json +1 -1
- package/docs/api/common.md +1 -1
- package/docs/api/grid.json +1 -1
- package/docs/api/grid.md +18 -0
- package/docs/api/index.json +1 -1
- package/docs/api/radio-button.json +1 -1
- package/docs/api/radio-button.md +1 -0
- package/docs/api/ripple.json +1 -0
- package/docs/api/ripple.md +75 -0
- package/docs/api/sidebar.json +1 -1
- package/docs/api/sidebar.md +1 -0
- package/docs/api/switch.json +1 -1
- package/docs/api/switch.md +1 -0
- package/docs/grid-rows.md +36 -0
- package/docs/grid-server.md +6 -0
- package/docs/grid.md +3 -2
- package/docs/manifest.json +1 -1
- package/docs/ripple.md +360 -0
- package/docs/sidebar-menus.md +8 -0
- package/fesm2022/{grid-colgroup.component-B4jx10Yi.mjs → grid-colgroup.component-BFbiAvkG.mjs} +2 -2
- package/fesm2022/{grid-footer-row.component-CVUltI39.mjs → grid-footer-row.component-DpSu7jvG.mjs} +3 -2
- package/fesm2022/{grid-list.component-Cv1KB5VQ.mjs → grid-list.component-B-F4bvFL.mjs} +5 -5
- package/fesm2022/{grid-row.component-BauMmps5.mjs → grid-row.component-CuCQ_Z5F.mjs} +37 -9
- package/fesm2022/{grid-virtual-list.component-DNjoZfHq.mjs → grid-virtual-list.component-rIz5AUOU.mjs} +31 -12
- package/fesm2022/{grid.styles-BJHVTT_v.mjs → grid.styles-D6jP3vwD.mjs} +110 -35
- package/fesm2022/nanahoshi-mona-ui-button.mjs +20 -2
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +11 -3
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +30 -5
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +16 -20
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +9 -1
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +9 -3
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +12 -4
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +11 -3
- package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +27 -3
- package/fesm2022/nanahoshi-mona-ui-ripple.mjs +196 -0
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +9 -3
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +21 -1
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +5 -1
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +28 -3
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +7 -1
- package/llms.txt +3 -1
- package/package.json +5 -1
- package/ripple/package.json +5 -0
- package/types/nanahoshi-mona-ui-button.d.ts +8 -1
- package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
- package/types/nanahoshi-mona-ui-check-box.d.ts +10 -1
- package/types/nanahoshi-mona-ui-chip.d.ts +8 -1
- package/types/nanahoshi-mona-ui-grid.d.ts +35 -4
- package/types/nanahoshi-mona-ui-radio-button.d.ts +9 -1
- package/types/nanahoshi-mona-ui-ripple.d.ts +72 -0
- package/types/nanahoshi-mona-ui-sidebar.d.ts +12 -0
- package/types/nanahoshi-mona-ui-switch.d.ts +10 -2
|
@@ -6,6 +6,8 @@ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
|
6
6
|
import { themeControlSurfaceClasses, themeSelectionBorderClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
7
|
import { IndicatorIconComponent } from "@nanahoshi/mona-ui/internal/indicator-icon";
|
|
8
8
|
import { Subject, fromEvent, takeWhile } from "rxjs";
|
|
9
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
10
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
9
11
|
var ButtonService = class ButtonService {
|
|
10
12
|
constructor() {
|
|
11
13
|
this.#members = signal(null, ...ngDevMode ? [{ debugName: "#members" }] : /* istanbul ignore next */ []);
|
|
@@ -50,7 +52,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
50
52
|
decorators: [{ type: Injectable }]
|
|
51
53
|
});
|
|
52
54
|
const buttonThemeVariants = cva(`
|
|
53
|
-
inline-flex items-center justify-center gap-2
|
|
55
|
+
relative inline-flex items-center justify-center gap-2
|
|
54
56
|
cursor-pointer whitespace-nowrap
|
|
55
57
|
text-sm font-medium
|
|
56
58
|
transition-colors duration-100 ease-in-out
|
|
@@ -287,6 +289,8 @@ var ButtonDirective = class ButtonDirective {
|
|
|
287
289
|
#hostElementRef;
|
|
288
290
|
#injector;
|
|
289
291
|
#renderer;
|
|
292
|
+
#ripple;
|
|
293
|
+
#rippleSuppressed;
|
|
290
294
|
#loaderComponentRef;
|
|
291
295
|
#toggleSubscription;
|
|
292
296
|
constructor() {
|
|
@@ -297,6 +301,11 @@ var ButtonDirective = class ButtonDirective {
|
|
|
297
301
|
this.#hostElementRef = inject(ElementRef);
|
|
298
302
|
this.#injector = inject(Injector);
|
|
299
303
|
this.#renderer = inject(Renderer2);
|
|
304
|
+
this.#ripple = inject(RippleDirective, { self: true });
|
|
305
|
+
this.#rippleSuppressed = computed(() => {
|
|
306
|
+
const look = this.effectiveLook();
|
|
307
|
+
return look === "link" || look === "clear";
|
|
308
|
+
}, ...ngDevMode ? [{ debugName: "#rippleSuppressed" }] : /* istanbul ignore next */ []);
|
|
300
309
|
this.#loaderComponentRef = null;
|
|
301
310
|
this.#toggleSubscription = null;
|
|
302
311
|
this.baseClass = computed(() => {
|
|
@@ -366,6 +375,7 @@ var ButtonDirective = class ButtonDirective {
|
|
|
366
375
|
alias: "class"
|
|
367
376
|
});
|
|
368
377
|
this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
|
|
378
|
+
this.#ripple.setHostDisabled(this.#rippleSuppressed);
|
|
369
379
|
effect(() => {
|
|
370
380
|
if (this.effectiveToggleable()) untracked(() => this.#setToggleableEvent());
|
|
371
381
|
});
|
|
@@ -580,6 +590,10 @@ var ButtonDirective = class ButtonDirective {
|
|
|
580
590
|
"attr.type": "type()",
|
|
581
591
|
"class": "baseClass()"
|
|
582
592
|
} },
|
|
593
|
+
hostDirectives: [{
|
|
594
|
+
directive: i1.RippleDirective,
|
|
595
|
+
inputs: ["monaRippleDisabled", "monaRippleDisabled"]
|
|
596
|
+
}],
|
|
583
597
|
ngImport: i0
|
|
584
598
|
});
|
|
585
599
|
}
|
|
@@ -604,7 +618,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
604
618
|
"[attr.tabindex]": "effectiveDisabled() ? -1 : tabindex()",
|
|
605
619
|
"[attr.type]": "type()",
|
|
606
620
|
"[class]": "baseClass()"
|
|
607
|
-
}
|
|
621
|
+
},
|
|
622
|
+
hostDirectives: [{
|
|
623
|
+
directive: RippleDirective,
|
|
624
|
+
inputs: ["monaRippleDisabled"]
|
|
625
|
+
}]
|
|
608
626
|
}]
|
|
609
627
|
}],
|
|
610
628
|
ctorParameters: () => [],
|
|
@@ -10,6 +10,8 @@ import { cva } from "class-variance-authority";
|
|
|
10
10
|
import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
|
|
11
11
|
import { createElementControlId, injectEffectiveDisabled, rxTimeout, themeRaisedBackdropClasses } from "@nanahoshi/mona-ui/internal";
|
|
12
12
|
import { fromEvent, skip } from "rxjs";
|
|
13
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
14
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
13
15
|
import { firstOrDefault, index, lastOrDefault, range, select } from "@mirei/ts-collections";
|
|
14
16
|
import { CalendarService } from "@nanahoshi/mona-ui/date-input";
|
|
15
17
|
import { DateTime } from "luxon";
|
|
@@ -166,7 +168,7 @@ const calendarHeaderThemeVariants = cva(`
|
|
|
166
168
|
[&>button:nth-of-type(4)]:rounded-es-none
|
|
167
169
|
`);
|
|
168
170
|
const calendarMonthViewDayThemeVariants = cva(`
|
|
169
|
-
cursor-pointer
|
|
171
|
+
relative cursor-pointer
|
|
170
172
|
hover:bg-hover active:bg-active
|
|
171
173
|
`, {
|
|
172
174
|
variants: {
|
|
@@ -217,7 +219,7 @@ const calendarYearViewGridThemeVariants = cva(`
|
|
|
217
219
|
[&>div]:items-center [&>div]:justify-center
|
|
218
220
|
`);
|
|
219
221
|
const calendarYearViewCellThemeVariants = cva(`
|
|
220
|
-
cursor-pointer py-2
|
|
222
|
+
relative cursor-pointer py-2
|
|
221
223
|
hover:bg-hover active:bg-active
|
|
222
224
|
`, { variants: {
|
|
223
225
|
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
@@ -235,7 +237,7 @@ const calendarDecadeViewGridThemeVariants = cva(`
|
|
|
235
237
|
[&>div]:items-center [&>div]:justify-center
|
|
236
238
|
`);
|
|
237
239
|
const calendarDecadeViewCellThemeVariants = cva(`
|
|
238
|
-
cursor-pointer py-2
|
|
240
|
+
relative cursor-pointer py-2
|
|
239
241
|
hover:bg-hover active:bg-active
|
|
240
242
|
`, { variants: {
|
|
241
243
|
focused: { true: "bg-hover outline-none focus-visible:outline-hidden ring-(length:--mona-focus-ring-width,2px) ring-inset ring-focus-indicator/(--mona-focus-ring-opacity,35%)" },
|
|
@@ -344,6 +346,7 @@ var DecadeYearDirective = class DecadeYearDirective {
|
|
|
344
346
|
"class": "baseClass()"
|
|
345
347
|
}
|
|
346
348
|
},
|
|
349
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
347
350
|
ngImport: i0
|
|
348
351
|
});
|
|
349
352
|
}
|
|
@@ -357,6 +360,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
357
360
|
type: Directive,
|
|
358
361
|
args: [{
|
|
359
362
|
selector: "[monaDecadeYear]",
|
|
363
|
+
hostDirectives: [RippleDirective],
|
|
360
364
|
host: {
|
|
361
365
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
362
366
|
"[attr.aria-current]": "isCurrent() ? 'true' : null",
|
|
@@ -632,6 +636,7 @@ var MonthDayDirective = class MonthDayDirective {
|
|
|
632
636
|
"class": "baseClass()"
|
|
633
637
|
}
|
|
634
638
|
},
|
|
639
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
635
640
|
ngImport: i0
|
|
636
641
|
});
|
|
637
642
|
}
|
|
@@ -645,6 +650,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
645
650
|
type: Directive,
|
|
646
651
|
args: [{
|
|
647
652
|
selector: "[monaMonthDay]",
|
|
653
|
+
hostDirectives: [RippleDirective],
|
|
648
654
|
host: {
|
|
649
655
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
650
656
|
"[attr.aria-current]": "isToday() ? 'date' : null",
|
|
@@ -857,6 +863,7 @@ var YearMonthDirective = class YearMonthDirective {
|
|
|
857
863
|
"class": "baseClass()"
|
|
858
864
|
}
|
|
859
865
|
},
|
|
866
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
860
867
|
ngImport: i0
|
|
861
868
|
});
|
|
862
869
|
}
|
|
@@ -870,6 +877,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
870
877
|
type: Directive,
|
|
871
878
|
args: [{
|
|
872
879
|
selector: "[monaYearMonth]",
|
|
880
|
+
hostDirectives: [RippleDirective],
|
|
873
881
|
host: {
|
|
874
882
|
"[attr.tabindex]": "focused() && !disabled() ? 0 : -1",
|
|
875
883
|
"[attr.aria-current]": "isCurrent() ? 'date' : null",
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { NgTemplateOutlet } from "@angular/common";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import { Component, Directive, booleanAttribute, computed, input, linkedSignal, model, output, viewChild } from "@angular/core";
|
|
3
|
+
import { Component, Directive, booleanAttribute, computed, inject, input, linkedSignal, model, output, viewChild } from "@angular/core";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
7
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
8
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
7
9
|
const checkboxInputThemeVariants = cva(`sr-only appearance-none outline-none focus-visible:outline-hidden peer`);
|
|
8
10
|
const checkmarkThemeVariants = cva(`
|
|
9
11
|
relative flex items-center justify-center
|
|
10
12
|
h-4.5 w-4.5 ps-0.25
|
|
11
|
-
cursor-pointer
|
|
13
|
+
cursor-pointer
|
|
12
14
|
${themeControlSurfaceClasses}
|
|
13
15
|
border border-input-border
|
|
14
16
|
outline-none focus-visible:outline-hidden
|
|
@@ -104,6 +106,7 @@ const checkboxDirectiveThemeVariants = cva(`
|
|
|
104
106
|
small: "rounded-sm"
|
|
105
107
|
} } });
|
|
106
108
|
var CheckBoxComponent = class CheckBoxComponent {
|
|
109
|
+
#label;
|
|
107
110
|
constructor() {
|
|
108
111
|
this.#label = injectLabelAssociation({
|
|
109
112
|
ariaDescribedBy: () => this.ariaDescribedBy(),
|
|
@@ -119,6 +122,7 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
119
122
|
const rounded = this.rounded();
|
|
120
123
|
return checkmarkThemeVariants({ rounded });
|
|
121
124
|
}, ...ngDevMode ? [{ debugName: "checkMarkClasses" }] : /* istanbul ignore next */ []);
|
|
125
|
+
this.checkMarkRef = viewChild("checkMark", ...ngDevMode ? [{ debugName: "checkMarkRef" }] : /* istanbul ignore next */ []);
|
|
122
126
|
this.containerLabelClasses = computed(() => {
|
|
123
127
|
const labelSize = this.labelSize();
|
|
124
128
|
const classes = this.userClass();
|
|
@@ -184,8 +188,10 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
184
188
|
...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
|
|
185
189
|
alias: "class"
|
|
186
190
|
});
|
|
191
|
+
const ripple = inject(RippleDirective, { self: true });
|
|
192
|
+
ripple.setHostDisabled(computed(() => this.effectiveDisabled() || this.readonly()));
|
|
193
|
+
ripple.setHalo(() => this.checkMarkRef()?.nativeElement);
|
|
187
194
|
}
|
|
188
|
-
#label;
|
|
189
195
|
activateFromLabel() {
|
|
190
196
|
const input = this.inputRef().nativeElement;
|
|
191
197
|
input.focus();
|
|
@@ -378,14 +384,24 @@ var CheckBoxComponent = class CheckBoxComponent {
|
|
|
378
384
|
"attr.data-indeterminate": "indeterminateState()"
|
|
379
385
|
} },
|
|
380
386
|
viewQueries: [{
|
|
387
|
+
propertyName: "checkMarkRef",
|
|
388
|
+
first: true,
|
|
389
|
+
predicate: ["checkMark"],
|
|
390
|
+
descendants: true,
|
|
391
|
+
isSignal: true
|
|
392
|
+
}, {
|
|
381
393
|
propertyName: "inputRef",
|
|
382
394
|
first: true,
|
|
383
395
|
predicate: ["checkBox"],
|
|
384
396
|
descendants: true,
|
|
385
397
|
isSignal: true
|
|
386
398
|
}],
|
|
399
|
+
hostDirectives: [{
|
|
400
|
+
directive: i1.RippleDirective,
|
|
401
|
+
inputs: ["monaRippleDisabled", "monaRippleDisabled"]
|
|
402
|
+
}],
|
|
387
403
|
ngImport: i0,
|
|
388
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
404
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\" #checkMark>\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n",
|
|
389
405
|
dependencies: [{
|
|
390
406
|
kind: "directive",
|
|
391
407
|
type: NgTemplateOutlet,
|
|
@@ -408,6 +424,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
408
424
|
type: Component,
|
|
409
425
|
args: [{
|
|
410
426
|
selector: "mona-check-box",
|
|
427
|
+
hostDirectives: [{
|
|
428
|
+
directive: RippleDirective,
|
|
429
|
+
inputs: ["monaRippleDisabled"]
|
|
430
|
+
}],
|
|
411
431
|
imports: [NgTemplateOutlet],
|
|
412
432
|
host: {
|
|
413
433
|
"[attr.aria-describedby]": "null",
|
|
@@ -419,10 +439,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
419
439
|
"[attr.data-disabled]": "effectiveDisabled()",
|
|
420
440
|
"[attr.data-indeterminate]": "indeterminateState()"
|
|
421
441
|
},
|
|
422
|
-
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\">\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
442
|
+
template: "<label\n [class]=\"containerLabelClasses()\"\n [attr.data-disabled]=\"effectiveDisabled()\"\n [attr.data-readonly]=\"readonly() || null\">\n @if (labelPosition() === \"before\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n\n <input\n type=\"checkbox\"\n [id]=\"inputId()\"\n [name]=\"name()\"\n [disabled]=\"effectiveDisabled()\"\n [indeterminate]=\"indeterminateState()\"\n [required]=\"required()\"\n [checked]=\"checked()\"\n [tabindex]=\"effectiveDisabled() ? -1 : tabIndex()\"\n [class]=\"checkBoxClasses()\"\n [attr.aria-checked]=\"indeterminateState() ? 'mixed' : null\"\n [attr.aria-invalid]=\"invalidState() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || label() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"describedBy()\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #checkBox />\n\n <span [class]=\"checkMarkClasses()\" [attr.data-invalid]=\"invalidState() || null\" aria-hidden=\"true\" #checkMark>\n @if (checked() && !indeterminateState()) {\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"lucide lucide-check stroke-primary-foreground forced-colors:stroke-[CanvasText]\">\n <path d=\"M18 6 9 17l-5-5\" />\n </svg>\n }\n </span>\n @if (labelPosition() === \"after\") {\n <ng-container [ngTemplateOutlet]=\"labelTemplate\"></ng-container>\n }\n</label>\n\n<ng-template #labelTemplate>\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</ng-template>\n"
|
|
423
443
|
}]
|
|
424
444
|
}],
|
|
445
|
+
ctorParameters: () => [],
|
|
425
446
|
propDecorators: {
|
|
447
|
+
checkMarkRef: [{
|
|
448
|
+
type: i0.ViewChild,
|
|
449
|
+
args: ["checkMark", { isSignal: true }]
|
|
450
|
+
}],
|
|
426
451
|
inputRef: [{
|
|
427
452
|
type: i0.ViewChild,
|
|
428
453
|
args: ["checkBox", { isSignal: true }]
|
|
@@ -9,6 +9,8 @@ import { cva } from "class-variance-authority";
|
|
|
9
9
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
10
10
|
import { themeRaisedSurfaceClasses, themeSelectionBorderClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
11
|
import { fromEvent } from "rxjs";
|
|
12
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
13
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
12
14
|
import { RouterLink } from "@angular/router";
|
|
13
15
|
const CHIP_DEFAULT_MESSAGES = { removeLabel: (label) => label ? `Remove, ${label}` : "Remove, item" };
|
|
14
16
|
var ChipPrefixTemplateDirective = class ChipPrefixTemplateDirective {
|
|
@@ -333,11 +335,13 @@ var ChipComponent = class ChipComponent {
|
|
|
333
335
|
#destroyRef;
|
|
334
336
|
#elementRef;
|
|
335
337
|
#i18n;
|
|
338
|
+
#ripple;
|
|
336
339
|
#routerLink;
|
|
337
340
|
constructor() {
|
|
338
341
|
this.#destroyRef = inject(DestroyRef);
|
|
339
342
|
this.#elementRef = inject(ElementRef);
|
|
340
343
|
this.#i18n = inject(MonaI18nService);
|
|
344
|
+
this.#ripple = inject(RippleDirective, { self: true });
|
|
341
345
|
this.#routerLink = inject(RouterLink, { optional: true });
|
|
342
346
|
this.ariaChecked = computed(() => {
|
|
343
347
|
if (!this.toggleable()) return;
|
|
@@ -423,6 +427,7 @@ var ChipComponent = class ChipComponent {
|
|
|
423
427
|
alias: "class"
|
|
424
428
|
});
|
|
425
429
|
this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
|
|
430
|
+
this.#ripple.setHostDisabled(computed(() => !this.bodyInteractive()));
|
|
426
431
|
afterNextRender({ read: () => {
|
|
427
432
|
this.#setSubscriptions();
|
|
428
433
|
this.#warnIfRemoveHasNoName();
|
|
@@ -617,6 +622,10 @@ var ChipComponent = class ChipComponent {
|
|
|
617
622
|
descendants: true,
|
|
618
623
|
isSignal: true
|
|
619
624
|
}],
|
|
625
|
+
hostDirectives: [{
|
|
626
|
+
directive: i1.RippleDirective,
|
|
627
|
+
inputs: ["monaRippleDisabled", "monaRippleDisabled"]
|
|
628
|
+
}],
|
|
620
629
|
ngImport: i0,
|
|
621
630
|
template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n",
|
|
622
631
|
dependencies: [
|
|
@@ -682,6 +691,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
682
691
|
"[attr.aria-checked]": "split() ? null : ariaChecked()",
|
|
683
692
|
"[attr.aria-label]": "split() ? null : ariaLabel() || null"
|
|
684
693
|
},
|
|
694
|
+
hostDirectives: [{
|
|
695
|
+
directive: RippleDirective,
|
|
696
|
+
inputs: ["monaRippleDisabled"]
|
|
697
|
+
}],
|
|
685
698
|
template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n"
|
|
686
699
|
}]
|
|
687
700
|
}],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as getGridCellText, A as gridHeaderThemeVariants, C as gridHeaderGroupTableRowThemeVariants, D as gridHeaderTableColumnWrapThemeVariants, E as gridHeaderTableColumnTitleThemeVariants, F as gridNoDataThemeVariants, G as observeGridCellTabStops, H as GridLogicalCellDirective, J as getColumnGroupDepth, K as GridLockedCellDirective, O as gridHeaderTableRowThemeVariants, R as gridSelectAllCellThemeVariants, S as gridHeaderGroupSpacerCellThemeVariants, T as gridHeaderTableCellThemeVariants, W as isKeyboardEntryElement, X as getColumnStepTarget, Y as getColumnGroups, Z as getSiblingRuns, _ as gridFooterThemeVariants, at as GridEditEvent, c as gridColumnActionsThemeVariants, ct as RowEditEvent, d as gridColumnResizerThemeVariants, et as RowReorderEvent, f as gridFilterRowCellThemeVariants, g as gridFooterTableThemeVariants, it as GridRemoveEvent, k as gridHeaderTableThemeVariants, l as gridColumnDragPreviewThemeVariants, lt as CellEditEvent, nt as GRID_DEFAULT_MESSAGES, ot as GridCancelEvent, p as gridFilterRowHeaderCellThemeVariants, q as GridService, rt as GridSaveEvent, st as GridAddEvent, t as gridBaseThemeVariants, tt as GridNavigationService, u as gridColumnDropHintThemeVariants, v as gridGroupPanelPlaceholderThemeVariants, w as gridHeaderGroupTitleThemeVariants, x as gridHeaderGroupCellThemeVariants, y as gridGroupPanelThemeVariants } from "./grid.styles-
|
|
2
|
-
import { n as removeGridRow, t as GridColgroupComponent } from "./grid-colgroup.component-
|
|
1
|
+
import { $ as getGridCellText, A as gridHeaderThemeVariants, C as gridHeaderGroupTableRowThemeVariants, D as gridHeaderTableColumnWrapThemeVariants, E as gridHeaderTableColumnTitleThemeVariants, F as gridNoDataThemeVariants, G as observeGridCellTabStops, H as GridLogicalCellDirective, J as getColumnGroupDepth, K as GridLockedCellDirective, O as gridHeaderTableRowThemeVariants, R as gridSelectAllCellThemeVariants, S as gridHeaderGroupSpacerCellThemeVariants, T as gridHeaderTableCellThemeVariants, W as isKeyboardEntryElement, X as getColumnStepTarget, Y as getColumnGroups, Z as getSiblingRuns, _ as gridFooterThemeVariants, at as GridEditEvent, c as gridColumnActionsThemeVariants, ct as RowEditEvent, d as gridColumnResizerThemeVariants, et as RowReorderEvent, f as gridFilterRowCellThemeVariants, g as gridFooterTableThemeVariants, it as GridRemoveEvent, k as gridHeaderTableThemeVariants, l as gridColumnDragPreviewThemeVariants, lt as CellEditEvent, nt as GRID_DEFAULT_MESSAGES, ot as GridCancelEvent, p as gridFilterRowHeaderCellThemeVariants, q as GridService, rt as GridSaveEvent, st as GridAddEvent, t as gridBaseThemeVariants, tt as GridNavigationService, u as gridColumnDropHintThemeVariants, v as gridGroupPanelPlaceholderThemeVariants, w as gridHeaderGroupTitleThemeVariants, x as gridHeaderGroupCellThemeVariants, y as gridGroupPanelThemeVariants } from "./grid.styles-D6jP3vwD.mjs";
|
|
2
|
+
import { n as removeGridRow, t as GridColgroupComponent } from "./grid-colgroup.component-BFbiAvkG.mjs";
|
|
3
3
|
import { DOCUMENT, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
import { Component, DOCUMENT as DOCUMENT$1, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, LOCALE_ID, PLATFORM_ID, Pipe, TemplateRef, afterEveryRender, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, effect, forwardRef, inject, input, isDevMode, linkedSignal, model, output, signal, untracked, viewChild, viewChildren } from "@angular/core";
|
|
@@ -5975,7 +5975,6 @@ var GridComponent = class GridComponent {
|
|
|
5975
5975
|
#registeredFooterScrollElement;
|
|
5976
5976
|
#dragCancelled;
|
|
5977
5977
|
#dragKeySubscription;
|
|
5978
|
-
#resizeObserver;
|
|
5979
5978
|
#toolbarActiveItem;
|
|
5980
5979
|
#toolbarActiveItemIndex;
|
|
5981
5980
|
constructor() {
|
|
@@ -5991,7 +5990,6 @@ var GridComponent = class GridComponent {
|
|
|
5991
5990
|
this.#registeredFooterScrollElement = signal(null, ...ngDevMode ? [{ debugName: "#registeredFooterScrollElement" }] : /* istanbul ignore next */ []);
|
|
5992
5991
|
this.#dragCancelled = false;
|
|
5993
5992
|
this.#dragKeySubscription = null;
|
|
5994
|
-
this.#resizeObserver = null;
|
|
5995
5993
|
this.#toolbarActiveItem = null;
|
|
5996
5994
|
this.#toolbarActiveItemIndex = 0;
|
|
5997
5995
|
this.columnDefinitions = contentChildren(GRID_COLUMN_DEFINITION, {
|
|
@@ -6158,6 +6156,7 @@ var GridComponent = class GridComponent {
|
|
|
6158
6156
|
transform: booleanAttribute
|
|
6159
6157
|
});
|
|
6160
6158
|
this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
|
|
6159
|
+
this.rowActivate = output();
|
|
6161
6160
|
this.rowClass = input(null, ...ngDevMode ? [{ debugName: "rowClass" }] : /* istanbul ignore next */ []);
|
|
6162
6161
|
this.rowKey = input(null, ...ngDevMode ? [{ debugName: "rowKey" }] : /* istanbul ignore next */ []);
|
|
6163
6162
|
this.skip = model(0, ...ngDevMode ? [{ debugName: "skip" }] : /* istanbul ignore next */ []);
|
|
@@ -6170,6 +6169,7 @@ var GridComponent = class GridComponent {
|
|
|
6170
6169
|
untracked(() => this.gridService.setColumnDefinitions(columns));
|
|
6171
6170
|
});
|
|
6172
6171
|
effect(() => this.gridService.rowClass.set(this.rowClass()));
|
|
6172
|
+
this.gridService.rowActivate$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => this.rowActivate.emit(event));
|
|
6173
6173
|
this.setPageSizeEffect();
|
|
6174
6174
|
this.setPagingEffects();
|
|
6175
6175
|
this.setGridDetailEffect();
|
|
@@ -6188,11 +6188,9 @@ var GridComponent = class GridComponent {
|
|
|
6188
6188
|
this.setInitialCalculatedWidthOfColumns();
|
|
6189
6189
|
this.#fitViewInitialScrollbarGutterWidth.set(this.gridService.scrollbarGutterWidth());
|
|
6190
6190
|
this.gridWidthSet.set(true);
|
|
6191
|
-
this.setResizeObserver();
|
|
6192
6191
|
const stopObservingTabStops = observeGridCellTabStops(this.#hostElementRef.nativeElement);
|
|
6193
6192
|
this.#destroyRef.onDestroy(stopObservingTabStops);
|
|
6194
6193
|
} });
|
|
6195
|
-
this.#destroyRef.onDestroy(() => this.#resizeObserver?.disconnect());
|
|
6196
6194
|
}
|
|
6197
6195
|
isColumnDragDisabled(column) {
|
|
6198
6196
|
return column.locked || !this.gridService.reorderableOptions().enabled && !this.groupable();
|
|
@@ -6630,14 +6628,6 @@ var GridComponent = class GridComponent {
|
|
|
6630
6628
|
});
|
|
6631
6629
|
});
|
|
6632
6630
|
}
|
|
6633
|
-
setResizeObserver() {
|
|
6634
|
-
if (typeof ResizeObserver === "undefined") return;
|
|
6635
|
-
this.#resizeObserver = new ResizeObserver(() => {
|
|
6636
|
-
const rect = this.#hostElementRef.nativeElement.getBoundingClientRect();
|
|
6637
|
-
this.gridService.virtualGridMinBuffer.set(rect.height);
|
|
6638
|
-
});
|
|
6639
|
-
this.#resizeObserver.observe(this.#hostElementRef.nativeElement);
|
|
6640
|
-
}
|
|
6641
6631
|
syncToolbarFocusTargets() {
|
|
6642
6632
|
const targets = this.getToolbarFocusTargets();
|
|
6643
6633
|
if (targets.length === 0) return;
|
|
@@ -6765,6 +6755,7 @@ var GridComponent = class GridComponent {
|
|
|
6765
6755
|
expandedKeys: "expandedKeysChange",
|
|
6766
6756
|
pageChange: "pageChange",
|
|
6767
6757
|
pageSize: "pageSizeChange",
|
|
6758
|
+
rowActivate: "rowActivate",
|
|
6768
6759
|
skip: "skipChange"
|
|
6769
6760
|
},
|
|
6770
6761
|
host: { properties: {
|
|
@@ -7114,6 +7105,7 @@ var GridComponent = class GridComponent {
|
|
|
7114
7105
|
"treeCell"
|
|
7115
7106
|
],
|
|
7116
7107
|
outputs: [
|
|
7108
|
+
"activate",
|
|
7117
7109
|
"edit",
|
|
7118
7110
|
"menuOpen",
|
|
7119
7111
|
"toggleExpand"
|
|
@@ -7207,9 +7199,9 @@ var GridComponent = class GridComponent {
|
|
|
7207
7199
|
deferBlockDependencies: [() => [
|
|
7208
7200
|
NgTemplateOutlet,
|
|
7209
7201
|
GridColgroupComponent,
|
|
7210
|
-
import("./grid-footer-row.component-
|
|
7211
|
-
import("./grid-list.component-
|
|
7212
|
-
import("./grid-virtual-list.component-
|
|
7202
|
+
import("./grid-footer-row.component-DpSu7jvG.mjs").then((m) => m.GridFooterRowComponent),
|
|
7203
|
+
import("./grid-list.component-B-F4bvFL.mjs").then((m) => m.GridListComponent),
|
|
7204
|
+
import("./grid-virtual-list.component-rIz5AUOU.mjs").then((m) => m.GridVirtualListComponent),
|
|
7213
7205
|
import("@nanahoshi/mona-ui/spinner").then((m) => m.SpinnerComponent)
|
|
7214
7206
|
]]
|
|
7215
7207
|
});
|
|
@@ -7221,9 +7213,9 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
7221
7213
|
ngImport: i0,
|
|
7222
7214
|
type: GridComponent,
|
|
7223
7215
|
resolveDeferredDeps: () => [
|
|
7224
|
-
import("./grid-footer-row.component-
|
|
7225
|
-
import("./grid-list.component-
|
|
7226
|
-
import("./grid-virtual-list.component-
|
|
7216
|
+
import("./grid-footer-row.component-DpSu7jvG.mjs").then((m) => m.GridFooterRowComponent),
|
|
7217
|
+
import("./grid-list.component-B-F4bvFL.mjs").then((m) => m.GridListComponent),
|
|
7218
|
+
import("./grid-virtual-list.component-rIz5AUOU.mjs").then((m) => m.GridVirtualListComponent),
|
|
7227
7219
|
import("@nanahoshi/mona-ui/spinner").then((m) => m.SpinnerComponent)
|
|
7228
7220
|
],
|
|
7229
7221
|
resolveMetadata: (GridFooterRowComponent, GridListComponent, GridVirtualListComponent, SpinnerComponent) => ({
|
|
@@ -7414,6 +7406,10 @@ i0.ɵɵngDeclareClassMetadataAsync({
|
|
|
7414
7406
|
required: false
|
|
7415
7407
|
}]
|
|
7416
7408
|
}],
|
|
7409
|
+
rowActivate: [{
|
|
7410
|
+
type: i0.Output,
|
|
7411
|
+
args: ["rowActivate"]
|
|
7412
|
+
}],
|
|
7417
7413
|
rowClass: [{
|
|
7418
7414
|
type: i0.Input,
|
|
7419
7415
|
args: [{
|
|
@@ -7,6 +7,8 @@ import { cva } from "class-variance-authority";
|
|
|
7
7
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
8
8
|
import { createElementControlId, isTypeaheadKey, setupTypeahead, themeSelectionBarClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
9
|
import { ReplaySubject, Subject, asyncScheduler, filter, fromEvent, tap } from "rxjs";
|
|
10
|
+
import * as i1 from "@nanahoshi/mona-ui/ripple";
|
|
11
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
10
12
|
import { ImmutableList, ImmutableSet, from as from$1, toImmutableSet } from "@mirei/ts-collections";
|
|
11
13
|
import { FilterInputComponent } from "@nanahoshi/mona-ui/internal/filter-input";
|
|
12
14
|
import { PlaceholderComponent } from "@nanahoshi/mona-ui/placeholder";
|
|
@@ -899,6 +901,10 @@ var ListItemDirective = class ListItemDirective {
|
|
|
899
901
|
return twMerge(classes, selectAll ? LIST_SELECT_ALL_ITEM_CLASSES : "");
|
|
900
902
|
}, ...ngDevMode ? [{ debugName: "textClasses" }] : /* istanbul ignore next */ []);
|
|
901
903
|
this.item = input.required(...ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []);
|
|
904
|
+
inject(RippleDirective, { self: true }).setHostDisabled(computed(() => {
|
|
905
|
+
const interactive = this.#listService.selectableOptions().enabled || this.#listService.navigableOptions().enabled;
|
|
906
|
+
return this.disabled() || !interactive;
|
|
907
|
+
}));
|
|
902
908
|
fromEvent(inject(ElementRef).nativeElement, "focusout").pipe(takeUntilDestroyed()).subscribe(() => this.#listService.itemFocusOut$.next(this.item()));
|
|
903
909
|
}
|
|
904
910
|
static {
|
|
@@ -938,6 +944,7 @@ var ListItemDirective = class ListItemDirective {
|
|
|
938
944
|
"attr.tabindex": "rovingTabIndex()",
|
|
939
945
|
"class": "textClasses()"
|
|
940
946
|
} },
|
|
947
|
+
hostDirectives: [{ directive: i1.RippleDirective }],
|
|
941
948
|
ngImport: i0
|
|
942
949
|
});
|
|
943
950
|
}
|
|
@@ -963,7 +970,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
963
970
|
"[attr.role]": "isOption() ? 'option' : 'listitem'",
|
|
964
971
|
"[attr.tabindex]": "rovingTabIndex()",
|
|
965
972
|
"[class]": "textClasses()"
|
|
966
|
-
}
|
|
973
|
+
},
|
|
974
|
+
hostDirectives: [RippleDirective]
|
|
967
975
|
}]
|
|
968
976
|
}],
|
|
969
977
|
ctorParameters: () => [],
|
|
@@ -9,6 +9,7 @@ import { cva } from "class-variance-authority";
|
|
|
9
9
|
import { takeUntilDestroyed, toObservable, toSignal } from "@angular/core/rxjs-interop";
|
|
10
10
|
import { isTypeaheadKey, setupTypeahead, themeOverlaySurfaceClasses, themeSelectionBarClasses } from "@nanahoshi/mona-ui/internal";
|
|
11
11
|
import { BehaviorSubject, Observable, ReplaySubject, Subject, asapScheduler, distinctUntilChanged, filter, fromEvent, map, merge, switchMap, take, takeWhile, tap } from "rxjs";
|
|
12
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
12
13
|
import { EnumerableSet, ImmutableSet, List, forEach, from as from$1, sequenceEqual } from "@mirei/ts-collections";
|
|
13
14
|
import { FocusMonitor } from "@angular/cdk/a11y";
|
|
14
15
|
import * as i1 from "@angular/forms";
|
|
@@ -1535,7 +1536,7 @@ var TreeNodeComponent = class TreeNodeComponent {
|
|
|
1535
1536
|
}
|
|
1536
1537
|
},
|
|
1537
1538
|
ngImport: i0,
|
|
1538
|
-
template: "<div
|
|
1539
|
+
template: "<div\n monaRipple\n [monaRippleDisabled]=\"disabled()\"\n [class]=\"baseClass()\"\n (click)=\"onNodeClick($event)\"\n (contextmenu)=\"onNodeContextMenu()\"\n #element>\n @if (treeService.nodeTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"treeService.nodeTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: node()?.data,\n element: element.parentElement\n }\"></ng-container>\n } @else {\n <span class=\"truncate\">{{ nodeText() }}</span>\n }\n</div>\n",
|
|
1539
1540
|
dependencies: [{
|
|
1540
1541
|
kind: "directive",
|
|
1541
1542
|
type: NgTemplateOutlet,
|
|
@@ -1545,6 +1546,11 @@ var TreeNodeComponent = class TreeNodeComponent {
|
|
|
1545
1546
|
"ngTemplateOutlet",
|
|
1546
1547
|
"ngTemplateOutletInjector"
|
|
1547
1548
|
]
|
|
1549
|
+
}, {
|
|
1550
|
+
kind: "directive",
|
|
1551
|
+
type: RippleDirective,
|
|
1552
|
+
selector: "[monaRipple]",
|
|
1553
|
+
inputs: ["monaRippleDisabled"]
|
|
1548
1554
|
}]
|
|
1549
1555
|
});
|
|
1550
1556
|
}
|
|
@@ -1558,8 +1564,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1558
1564
|
type: Component,
|
|
1559
1565
|
args: [{
|
|
1560
1566
|
selector: "mona-tree-node",
|
|
1561
|
-
imports: [NgTemplateOutlet],
|
|
1562
|
-
template: "<div
|
|
1567
|
+
imports: [NgTemplateOutlet, RippleDirective],
|
|
1568
|
+
template: "<div\n monaRipple\n [monaRippleDisabled]=\"disabled()\"\n [class]=\"baseClass()\"\n (click)=\"onNodeClick($event)\"\n (contextmenu)=\"onNodeContextMenu()\"\n #element>\n @if (treeService.nodeTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"treeService.nodeTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: node()?.data,\n element: element.parentElement\n }\"></ng-container>\n } @else {\n <span class=\"truncate\">{{ nodeText() }}</span>\n }\n</div>\n"
|
|
1563
1569
|
}]
|
|
1564
1570
|
}],
|
|
1565
1571
|
ctorParameters: () => [],
|
|
@@ -7,6 +7,7 @@ import { cva } from "class-variance-authority";
|
|
|
7
7
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
8
8
|
import { createElementControlId, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
|
|
9
9
|
import { Subject, tap } from "rxjs";
|
|
10
|
+
import { RippleDirective } from "@nanahoshi/mona-ui/ripple";
|
|
10
11
|
import { any, zip } from "@mirei/ts-collections";
|
|
11
12
|
import { PopupMenuCheckboxItemComponent, PopupMenuComponent, PopupMenuGroupComponent, PopupMenuGroupTemplateDirective, PopupMenuIconTemplateDirective, PopupMenuItemComponent, PopupMenuRadioGroupComponent, PopupMenuRadioItemComponent, PopupMenuSeparatorComponent, PopupMenuShortcutTemplateDirective, PopupMenuTextTemplateDirective } from "@nanahoshi/mona-ui/popup-menu";
|
|
12
13
|
import { PopupMenuGroupTemplateToken, PopupMenuIconTemplateToken, PopupMenuItemType, PopupMenuOrigin, PopupMenuRadioItemToken, PopupMenuShortcutTemplateToken, PopupMenuTemplateOrigin, PopupMenuTemplateType, PopupMenuTextTemplateToken, PopupMenuToken, ensurePopupComponentTypes, ensurePopupTemplateTypes, preparePopupMenuItems } from "@nanahoshi/mona-ui/internal/popup-menu";
|
|
@@ -836,7 +837,7 @@ const menubarBaseThemeVariants = cva(`
|
|
|
836
837
|
}
|
|
837
838
|
} });
|
|
838
839
|
const menubarListItemThemeVariants = cva(`
|
|
839
|
-
flex h-full items-center justify-center px-2 py-1.5
|
|
840
|
+
relative flex h-full items-center justify-center px-2 py-1.5
|
|
840
841
|
cursor-pointer text-foreground outline-none focus-visible:outline-hidden
|
|
841
842
|
hover:bg-[var(--mona-menu-item-hover-background,var(--color-hover))] hover:text-foreground
|
|
842
843
|
focus-within:bg-[var(--mona-menu-item-hover-background,var(--color-hover))]
|
|
@@ -1248,7 +1249,7 @@ var MenubarComponent = class MenubarComponent {
|
|
|
1248
1249
|
isSignal: true
|
|
1249
1250
|
}],
|
|
1250
1251
|
ngImport: i0,
|
|
1251
|
-
template: "<ul\n [class]=\"listClasses()\"\n role=\"menubar\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\">\n @for (item of menuList(); track item; let i = $index) {\n @let menuIconTemplate = item.iconTemplate() ?? iconTemplate() ?? null;\n @let menuTextTemplate = item.textTemplate() ?? textTemplate() ?? null;\n @let menuId = item.uid + \"-menu\";\n @let hasItems = item.menuItems().length > 0;\n @let isOpen = currentPopupMenu() !== null && currentPopupMenu() === item.popupMenu;\n <li\n [class]=\"listItemClasses()\"\n [attr.data-disabled]=\"disabled() || item.disabled()\"\n [attr.data-active]=\"isOpen\"\n [attr.data-mid]=\"item.uid\"\n [id]=\"item.uid + '-item'\"\n [attr.tabindex]=\"disabled() ? -1 : i === activeIndex() ? 0 : -1\"\n [attr.role]=\"'menuitem'\"\n [attr.aria-haspopup]=\"hasItems ? 'menu' : null\"\n [attr.aria-expanded]=\"hasItems ? (isOpen ? 'true' : 'false') : null\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-disabled]=\"disabled() || item.disabled()\"\n (pointerenter)=\"onMenuPointerEnter(item, popupMenu)\"\n (keydown)=\"onMenuKeyDown($event, item, popupMenu)\"\n (click)=\"onMenuClick($event, item)\"\n (focus)=\"onMenuFocus(i)\"\n #listItemElement>\n @if (menuIconTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"menuIconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\"></ng-container>\n }\n @if (!menuTextTemplate) {\n <span>{{ item.text() }}</span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuTextTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\">\n </ng-container>\n }\n <mona-popup-menu\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [target]=\"listItemElement\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n (menuClick)=\"onMenuItemClick($event)\"\n (navigate)=\"navigate$.next($event)\"\n [trigger]=\"hasItems && !item.disabled() && !disabled() ? 'click' : 'none'\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n (close)=\"onPopupMenuClose()\"\n (open)=\"onPopupMenuOpen(popupMenu)\"\n [items]=\"item.menuItems()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n </mona-popup-menu>\n </li>\n }\n</ul>\n",
|
|
1252
|
+
template: "<ul\n [class]=\"listClasses()\"\n role=\"menubar\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\">\n @for (item of menuList(); track item; let i = $index) {\n @let menuIconTemplate = item.iconTemplate() ?? iconTemplate() ?? null;\n @let menuTextTemplate = item.textTemplate() ?? textTemplate() ?? null;\n @let menuId = item.uid + \"-menu\";\n @let hasItems = item.menuItems().length > 0;\n @let isOpen = currentPopupMenu() !== null && currentPopupMenu() === item.popupMenu;\n <li\n [class]=\"listItemClasses()\"\n [attr.data-disabled]=\"disabled() || item.disabled()\"\n [attr.data-active]=\"isOpen\"\n [attr.data-mid]=\"item.uid\"\n [id]=\"item.uid + '-item'\"\n monaRipple\n [attr.tabindex]=\"disabled() ? -1 : i === activeIndex() ? 0 : -1\"\n [attr.role]=\"'menuitem'\"\n [attr.aria-haspopup]=\"hasItems ? 'menu' : null\"\n [attr.aria-expanded]=\"hasItems ? (isOpen ? 'true' : 'false') : null\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-disabled]=\"disabled() || item.disabled()\"\n (pointerenter)=\"onMenuPointerEnter(item, popupMenu)\"\n (keydown)=\"onMenuKeyDown($event, item, popupMenu)\"\n (click)=\"onMenuClick($event, item)\"\n (focus)=\"onMenuFocus(i)\"\n #listItemElement>\n @if (menuIconTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"menuIconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\"></ng-container>\n }\n @if (!menuTextTemplate) {\n <span>{{ item.text() }}</span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuTextTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\">\n </ng-container>\n }\n <mona-popup-menu\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [target]=\"listItemElement\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n (menuClick)=\"onMenuItemClick($event)\"\n (navigate)=\"navigate$.next($event)\"\n [trigger]=\"hasItems && !item.disabled() && !disabled() ? 'click' : 'none'\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n (close)=\"onPopupMenuClose()\"\n (open)=\"onPopupMenuOpen(popupMenu)\"\n [items]=\"item.menuItems()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n </mona-popup-menu>\n </li>\n }\n</ul>\n",
|
|
1252
1253
|
dependencies: [
|
|
1253
1254
|
{
|
|
1254
1255
|
kind: "directive",
|
|
@@ -1308,6 +1309,12 @@ var MenubarComponent = class MenubarComponent {
|
|
|
1308
1309
|
kind: "directive",
|
|
1309
1310
|
type: PopupMenuGroupTemplateDirective,
|
|
1310
1311
|
selector: "ng-template[monaPopupMenuGroupTemplate]"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
kind: "directive",
|
|
1315
|
+
type: RippleDirective,
|
|
1316
|
+
selector: "[monaRipple]",
|
|
1317
|
+
inputs: ["monaRippleDisabled"]
|
|
1311
1318
|
}
|
|
1312
1319
|
]
|
|
1313
1320
|
});
|
|
@@ -1328,7 +1335,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1328
1335
|
PopupMenuTextTemplateDirective,
|
|
1329
1336
|
PopupMenuIconTemplateDirective,
|
|
1330
1337
|
PopupMenuShortcutTemplateDirective,
|
|
1331
|
-
PopupMenuGroupTemplateDirective
|
|
1338
|
+
PopupMenuGroupTemplateDirective,
|
|
1339
|
+
RippleDirective
|
|
1332
1340
|
],
|
|
1333
1341
|
host: {
|
|
1334
1342
|
"[attr.aria-label]": "null",
|
|
@@ -1336,7 +1344,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1336
1344
|
"[class]": "baseClasses()",
|
|
1337
1345
|
"[attr.data-disabled]": "disabled()"
|
|
1338
1346
|
},
|
|
1339
|
-
template: "<ul\n [class]=\"listClasses()\"\n role=\"menubar\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\">\n @for (item of menuList(); track item; let i = $index) {\n @let menuIconTemplate = item.iconTemplate() ?? iconTemplate() ?? null;\n @let menuTextTemplate = item.textTemplate() ?? textTemplate() ?? null;\n @let menuId = item.uid + \"-menu\";\n @let hasItems = item.menuItems().length > 0;\n @let isOpen = currentPopupMenu() !== null && currentPopupMenu() === item.popupMenu;\n <li\n [class]=\"listItemClasses()\"\n [attr.data-disabled]=\"disabled() || item.disabled()\"\n [attr.data-active]=\"isOpen\"\n [attr.data-mid]=\"item.uid\"\n [id]=\"item.uid + '-item'\"\n [attr.tabindex]=\"disabled() ? -1 : i === activeIndex() ? 0 : -1\"\n [attr.role]=\"'menuitem'\"\n [attr.aria-haspopup]=\"hasItems ? 'menu' : null\"\n [attr.aria-expanded]=\"hasItems ? (isOpen ? 'true' : 'false') : null\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-disabled]=\"disabled() || item.disabled()\"\n (pointerenter)=\"onMenuPointerEnter(item, popupMenu)\"\n (keydown)=\"onMenuKeyDown($event, item, popupMenu)\"\n (click)=\"onMenuClick($event, item)\"\n (focus)=\"onMenuFocus(i)\"\n #listItemElement>\n @if (menuIconTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"menuIconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\"></ng-container>\n }\n @if (!menuTextTemplate) {\n <span>{{ item.text() }}</span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuTextTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\">\n </ng-container>\n }\n <mona-popup-menu\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [target]=\"listItemElement\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n (menuClick)=\"onMenuItemClick($event)\"\n (navigate)=\"navigate$.next($event)\"\n [trigger]=\"hasItems && !item.disabled() && !disabled() ? 'click' : 'none'\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n (close)=\"onPopupMenuClose()\"\n (open)=\"onPopupMenuOpen(popupMenu)\"\n [items]=\"item.menuItems()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n </mona-popup-menu>\n </li>\n }\n</ul>\n"
|
|
1347
|
+
template: "<ul\n [class]=\"listClasses()\"\n role=\"menubar\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\">\n @for (item of menuList(); track item; let i = $index) {\n @let menuIconTemplate = item.iconTemplate() ?? iconTemplate() ?? null;\n @let menuTextTemplate = item.textTemplate() ?? textTemplate() ?? null;\n @let menuId = item.uid + \"-menu\";\n @let hasItems = item.menuItems().length > 0;\n @let isOpen = currentPopupMenu() !== null && currentPopupMenu() === item.popupMenu;\n <li\n [class]=\"listItemClasses()\"\n [attr.data-disabled]=\"disabled() || item.disabled()\"\n [attr.data-active]=\"isOpen\"\n [attr.data-mid]=\"item.uid\"\n [id]=\"item.uid + '-item'\"\n monaRipple\n [attr.tabindex]=\"disabled() ? -1 : i === activeIndex() ? 0 : -1\"\n [attr.role]=\"'menuitem'\"\n [attr.aria-haspopup]=\"hasItems ? 'menu' : null\"\n [attr.aria-expanded]=\"hasItems ? (isOpen ? 'true' : 'false') : null\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-disabled]=\"disabled() || item.disabled()\"\n (pointerenter)=\"onMenuPointerEnter(item, popupMenu)\"\n (keydown)=\"onMenuKeyDown($event, item, popupMenu)\"\n (click)=\"onMenuClick($event, item)\"\n (focus)=\"onMenuFocus(i)\"\n #listItemElement>\n @if (menuIconTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"menuIconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\"></ng-container>\n }\n @if (!menuTextTemplate) {\n <span>{{ item.text() }}</span>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"menuTextTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item.text(), items: item.menuItems() }\">\n </ng-container>\n }\n <mona-popup-menu\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [target]=\"listItemElement\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n (menuClick)=\"onMenuItemClick($event)\"\n (navigate)=\"navigate$.next($event)\"\n [trigger]=\"hasItems && !item.disabled() && !disabled() ? 'click' : 'none'\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n (close)=\"onPopupMenuClose()\"\n (open)=\"onPopupMenuOpen(popupMenu)\"\n [items]=\"item.menuItems()\"\n [id]=\"menuId\"\n #popupMenu>\n @if (groupTemplate()) {\n <ng-template monaPopupMenuGroupTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (menuItemIconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemIconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemShortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemShortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (menuItemTextTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"menuItemTextTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n </mona-popup-menu>\n </li>\n }\n</ul>\n"
|
|
1340
1348
|
}]
|
|
1341
1349
|
}],
|
|
1342
1350
|
ctorParameters: () => [],
|