@nanahoshi/mona-ui 0.4.0 → 0.5.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.
Files changed (29) hide show
  1. package/collapsible/package.json +4 -0
  2. package/fesm2022/nanahoshi-mona-ui-button.mjs +1 -2
  3. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +304 -0
  4. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +1 -1
  5. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1 -1
  6. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +20 -9
  7. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs} +2 -2
  8. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs} +2 -2
  9. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs → nanahoshi-mona-ui-grid-grid-list.component-n3eQNIza.mjs} +5 -5
  10. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs} +2 -2
  11. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-B4VB3xFw.mjs} +5 -5
  12. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs} +11 -11
  13. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  14. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1 -1
  15. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +18 -16
  16. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2025 -0
  17. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +96 -0
  18. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1 -1
  19. package/fesm2022/nanahoshi-mona-ui-theme.mjs +61 -25
  20. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +49 -2
  21. package/package.json +13 -1
  22. package/sidebar/package.json +4 -0
  23. package/skeleton/package.json +4 -0
  24. package/types/nanahoshi-mona-ui-collapsible.d.ts +92 -0
  25. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +11 -3
  26. package/types/nanahoshi-mona-ui-popup-menu.d.ts +6 -4
  27. package/types/nanahoshi-mona-ui-sidebar.d.ts +695 -0
  28. package/types/nanahoshi-mona-ui-skeleton.d.ts +51 -0
  29. package/types/nanahoshi-mona-ui-theme.d.ts +28 -2
@@ -0,0 +1,4 @@
1
+ {
2
+ "module": "../fesm2022/nanahoshi-mona-ui-collapsible.mjs",
3
+ "typings": "../types/nanahoshi-mona-ui-collapsible.d.ts"
4
+ }
@@ -305,8 +305,7 @@ class ButtonDirective {
305
305
  const size = this.effectiveSize();
306
306
  const selected = this.selected();
307
307
  const userClass = this.userClass();
308
- const variants = buttonThemeVariants;
309
- const variantClasses = variants({ disabled, iconOnly, loading, look, rounded, selected, size });
308
+ const variantClasses = buttonThemeVariants({ disabled, iconOnly, loading, look, rounded, selected, size });
310
309
  return twMerge(variantClasses, userClass);
311
310
  }, /* @ts-ignore */
312
311
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
@@ -0,0 +1,304 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, computed, input, model, forwardRef, Directive, inject, ElementRef, signal, DestroyRef, afterNextRender, effect, untracked } from '@angular/core';
3
+ import { createElementControlId } from '@nanahoshi/mona-ui/internal';
4
+
5
+ const CollapsibleToken = new InjectionToken("MONA_COLLAPSIBLE");
6
+
7
+ /**
8
+ * @description
9
+ * Headless disclosure root. Adds no markup of its own, so it can be applied to any element
10
+ * (`li`, `div`, `section`) and paired with `monaCollapsibleTrigger` and `monaCollapsibleContent`.
11
+ */
12
+ class CollapsibleDirective {
13
+ constructor() {
14
+ this.state = computed(() => (this.expanded() ? "open" : "closed"), /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
16
+ /**
17
+ * @description Enables the height transition applied to the collapsible content.
18
+ * @default true
19
+ */
20
+ this.animate = input(true, /* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "animate" }] : /* istanbul ignore next */ []));
22
+ /**
23
+ * @description Id assigned to the content element and referenced by the trigger through `aria-controls`.
24
+ */
25
+ this.contentId = createElementControlId();
26
+ /**
27
+ * @description Suppresses toggling through the trigger. `expand()` and `collapse()` still apply.
28
+ * @default false
29
+ */
30
+ this.disabled = input(false, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
32
+ /**
33
+ * @description Sets whether the content is expanded. Supports two-way binding.
34
+ * @default false
35
+ */
36
+ this.expanded = model(false, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
38
+ }
39
+ collapse() {
40
+ this.expanded.set(false);
41
+ }
42
+ expand() {
43
+ this.expanded.set(true);
44
+ }
45
+ toggle() {
46
+ if (this.disabled()) {
47
+ return;
48
+ }
49
+ this.expanded.update(expanded => !expanded);
50
+ }
51
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
52
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: CollapsibleDirective, isStandalone: true, selector: "[monaCollapsible]", inputs: { animate: { classPropertyName: "animate", publicName: "animate", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "attr.data-state": "state()" } }, providers: [{ provide: CollapsibleToken, useExisting: forwardRef(() => CollapsibleDirective) }], exportAs: ["monaCollapsible"], ngImport: i0 }); }
53
+ }
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleDirective, decorators: [{
55
+ type: Directive,
56
+ args: [{
57
+ selector: "[monaCollapsible]",
58
+ exportAs: "monaCollapsible",
59
+ host: {
60
+ "[attr.data-state]": "state()"
61
+ },
62
+ providers: [{ provide: CollapsibleToken, useExisting: forwardRef(() => CollapsibleDirective) }]
63
+ }]
64
+ }], propDecorators: { animate: [{ type: i0.Input, args: [{ isSignal: true, alias: "animate", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }] } });
65
+
66
+ const CONTENT_HEIGHT_VARIABLE = "--mona-collapsible-content-height";
67
+ /**
68
+ * @description
69
+ * Animates the height of the collapsible content between `0` and its measured size. Adds no wrapper
70
+ * element, so it can be applied directly to a `ul`, `div` or any other container with any number of children.
71
+ *
72
+ * The measured size is also published on the host as the `--mona-collapsible-content-height` custom
73
+ * property, so consumers can drive their own animation instead (pair it with `[animate]="false"` on the root).
74
+ */
75
+ class CollapsibleContentDirective {
76
+ #element;
77
+ #initialized;
78
+ #reducedMotion;
79
+ #fallbackId;
80
+ constructor() {
81
+ this.#element = inject(ElementRef).nativeElement;
82
+ this.#initialized = signal(false, /* @ts-ignore */
83
+ ...(ngDevMode ? [{ debugName: "#initialized" }] : /* istanbul ignore next */ []));
84
+ this.#reducedMotion = signal(false, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "#reducedMotion" }] : /* istanbul ignore next */ []));
86
+ this.#fallbackId = null;
87
+ this.collapsible = inject(CollapsibleToken);
88
+ this.inert = computed(() => (this.collapsible.expanded() ? null : true), /* @ts-ignore */
89
+ ...(ngDevMode ? [{ debugName: "inert" }] : /* istanbul ignore next */ []));
90
+ this.state = computed(() => (this.collapsible.expanded() ? "open" : "closed"), /* @ts-ignore */
91
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
92
+ const destroyRef = inject(DestroyRef);
93
+ if (typeof window !== "undefined" && typeof window.matchMedia === "function") {
94
+ const query = window.matchMedia("(prefers-reduced-motion: reduce)");
95
+ const onPreferenceChange = (event) => this.#reducedMotion.set(event.matches);
96
+ this.#reducedMotion.set(query.matches);
97
+ query.addEventListener("change", onPreferenceChange);
98
+ destroyRef.onDestroy(() => query.removeEventListener("change", onPreferenceChange));
99
+ }
100
+ const onTransitionEnd = (event) => {
101
+ if (event.propertyName !== "height" || event.target !== this.#element) {
102
+ return;
103
+ }
104
+ this.#settle();
105
+ };
106
+ this.#element.addEventListener("transitionend", onTransitionEnd);
107
+ destroyRef.onDestroy(() => {
108
+ this.#element.removeEventListener("transitionend", onTransitionEnd);
109
+ this.#clearFallback();
110
+ });
111
+ afterNextRender(() => {
112
+ this.#settle();
113
+ this.#initialized.set(true);
114
+ });
115
+ effect(() => {
116
+ const expanded = this.collapsible.expanded();
117
+ untracked(() => {
118
+ if (!this.#initialized()) {
119
+ return;
120
+ }
121
+ this.#animateTo(expanded);
122
+ });
123
+ });
124
+ }
125
+ /** Runs the height transition towards the requested state. */
126
+ #animateTo(expanded) {
127
+ this.#clearFallback();
128
+ if (!this.collapsible.animate() || this.#reducedMotion()) {
129
+ this.#settle();
130
+ return;
131
+ }
132
+ const element = this.#element;
133
+ const contentHeight = element.scrollHeight;
134
+ element.style.setProperty(CONTENT_HEIGHT_VARIABLE, `${contentHeight}px`);
135
+ this.#clip();
136
+ this.#setTransitionEnabled(true);
137
+ if (expanded) {
138
+ element.style.height = "0px";
139
+ void element.offsetHeight; // force a reflow so the browser has a start value to animate from
140
+ element.style.height = `${contentHeight}px`;
141
+ }
142
+ else {
143
+ element.style.height = `${element.offsetHeight}px`;
144
+ void element.offsetHeight;
145
+ element.style.height = "0px";
146
+ }
147
+ this.#scheduleFallback();
148
+ }
149
+ #clearFallback() {
150
+ if (this.#fallbackId !== null) {
151
+ clearTimeout(this.#fallbackId);
152
+ this.#fallbackId = null;
153
+ }
154
+ }
155
+ /**
156
+ * Clips the box so an explicit height is actually honoured. `min-height` matters because a flex item
157
+ * defaults to `min-height: auto`, which would otherwise hold the element open at its content height.
158
+ */
159
+ #clip() {
160
+ this.#element.style.overflow = "hidden";
161
+ this.#element.style.minHeight = "0px";
162
+ }
163
+ /** Reads the resolved transition duration in milliseconds, which comes from a theme custom property. */
164
+ #getTransitionDuration() {
165
+ const declared = getComputedStyle(this.#element).transitionDuration;
166
+ const durations = declared.split(",").map(part => {
167
+ const trimmed = part.trim();
168
+ const parsed = Number.parseFloat(trimmed);
169
+ if (!Number.isFinite(parsed)) {
170
+ return 0;
171
+ }
172
+ return trimmed.endsWith("ms") ? parsed : parsed * 1000;
173
+ });
174
+ return Math.max(0, ...durations);
175
+ }
176
+ /** Guards against a `transitionend` that never arrives, e.g. when an ancestor hides the element mid-flight. */
177
+ #scheduleFallback() {
178
+ this.#fallbackId = setTimeout(() => this.#settle(), this.#getTransitionDuration() + 50);
179
+ }
180
+ #setTransitionEnabled(enabled) {
181
+ const style = this.#element.style;
182
+ if (!enabled) {
183
+ style.transitionProperty = "";
184
+ style.transitionDuration = "";
185
+ style.transitionTimingFunction = "";
186
+ return;
187
+ }
188
+ style.transitionProperty = "height";
189
+ style.transitionDuration = `var(--mona-motion-standard, 300ms)`;
190
+ style.transitionTimingFunction = "ease-out";
191
+ }
192
+ /** Drops the transition and pins the element to the resting representation of the current state. */
193
+ #settle() {
194
+ this.#clearFallback();
195
+ this.#setTransitionEnabled(false);
196
+ const element = this.#element;
197
+ if (this.collapsible.expanded()) {
198
+ element.style.height = "";
199
+ element.style.overflow = "";
200
+ element.style.minHeight = "";
201
+ }
202
+ else {
203
+ element.style.height = "0px";
204
+ this.#clip();
205
+ }
206
+ element.style.setProperty(CONTENT_HEIGHT_VARIABLE, `${element.scrollHeight}px`);
207
+ }
208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
209
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: CollapsibleContentDirective, isStandalone: true, selector: "[monaCollapsibleContent]", host: { properties: { "attr.data-state": "state()", "attr.id": "collapsible.contentId", "attr.inert": "inert()" } }, ngImport: i0 }); }
210
+ }
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleContentDirective, decorators: [{
212
+ type: Directive,
213
+ args: [{
214
+ selector: "[monaCollapsibleContent]",
215
+ host: {
216
+ "[attr.data-state]": "state()",
217
+ "[attr.id]": "collapsible.contentId",
218
+ "[attr.inert]": "inert()"
219
+ }
220
+ }]
221
+ }], ctorParameters: () => [] });
222
+
223
+ /**
224
+ * @description
225
+ * Toggles the closest `monaCollapsible`. Wires `aria-expanded` / `aria-controls` automatically and
226
+ * only adds `role`, `tabindex` and keyboard handling when the host element is not already interactive.
227
+ */
228
+ class CollapsibleTriggerDirective {
229
+ constructor() {
230
+ this.#element = inject(ElementRef).nativeElement;
231
+ this.#nativeAnchor = this.#element.tagName === "A";
232
+ this.#nativeButton = this.#element.tagName === "BUTTON" || this.#element.tagName === "INPUT" || this.#element.tagName === "SUMMARY";
233
+ this.ariaDisabled = computed(() => (this.collapsible.disabled() ? "true" : null), /* @ts-ignore */
234
+ ...(ngDevMode ? [{ debugName: "ariaDisabled" }] : /* istanbul ignore next */ []));
235
+ this.collapsible = inject(CollapsibleToken);
236
+ this.nativeDisabled = computed(() => this.#element.tagName === "BUTTON" && this.collapsible.disabled() ? "" : null, /* @ts-ignore */
237
+ ...(ngDevMode ? [{ debugName: "nativeDisabled" }] : /* istanbul ignore next */ []));
238
+ this.role = this.#nativeButton || this.#nativeAnchor ? null : "button";
239
+ this.state = computed(() => (this.collapsible.expanded() ? "open" : "closed"), /* @ts-ignore */
240
+ ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
241
+ this.tabIndex = computed(() => {
242
+ if (this.#nativeButton || this.#nativeAnchor) {
243
+ return null;
244
+ }
245
+ return this.collapsible.disabled() ? -1 : 0;
246
+ }, /* @ts-ignore */
247
+ ...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
248
+ this.type = this.#element.tagName === "BUTTON" ? "button" : null;
249
+ }
250
+ #element;
251
+ #nativeAnchor;
252
+ #nativeButton;
253
+ onClick() {
254
+ this.collapsible.toggle();
255
+ }
256
+ onEnterKeydown(event) {
257
+ // Buttons and anchors already synthesise a click for Enter.
258
+ if (this.#nativeButton || this.#nativeAnchor) {
259
+ return;
260
+ }
261
+ event.preventDefault();
262
+ this.collapsible.toggle();
263
+ }
264
+ onSpaceKeydown(event) {
265
+ // Buttons already synthesise a click for Space; anchors scroll the page instead.
266
+ if (this.#nativeButton) {
267
+ return;
268
+ }
269
+ event.preventDefault();
270
+ this.collapsible.toggle();
271
+ }
272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
273
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: CollapsibleTriggerDirective, isStandalone: true, selector: "[monaCollapsibleTrigger]", host: { listeners: { "click": "onClick()", "keydown.enter": "onEnterKeydown($event)", "keydown.space": "onSpaceKeydown($event)" }, properties: { "attr.aria-controls": "collapsible.contentId", "attr.aria-disabled": "ariaDisabled()", "attr.aria-expanded": "collapsible.expanded()", "attr.data-state": "state()", "attr.disabled": "nativeDisabled()", "attr.role": "role", "attr.tabindex": "tabIndex()", "attr.type": "type" } }, ngImport: i0 }); }
274
+ }
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CollapsibleTriggerDirective, decorators: [{
276
+ type: Directive,
277
+ args: [{
278
+ selector: "[monaCollapsibleTrigger]",
279
+ host: {
280
+ "[attr.aria-controls]": "collapsible.contentId",
281
+ "[attr.aria-disabled]": "ariaDisabled()",
282
+ "[attr.aria-expanded]": "collapsible.expanded()",
283
+ "[attr.data-state]": "state()",
284
+ "[attr.disabled]": "nativeDisabled()",
285
+ "[attr.role]": "role",
286
+ "[attr.tabindex]": "tabIndex()",
287
+ "[attr.type]": "type",
288
+ "(click)": "onClick()",
289
+ "(keydown.enter)": "onEnterKeydown($event)",
290
+ "(keydown.space)": "onSpaceKeydown($event)"
291
+ }
292
+ }]
293
+ }] });
294
+
295
+ /*
296
+ * Public API Surface of @nanahoshi/mona-ui/collapsible
297
+ */
298
+
299
+ /**
300
+ * Generated bundle index. Do not edit.
301
+ */
302
+
303
+ export { CollapsibleContentDirective, CollapsibleDirective, CollapsibleToken, CollapsibleTriggerDirective };
304
+ //# sourceMappingURL=nanahoshi-mona-ui-collapsible.mjs.map
@@ -269,7 +269,7 @@ class ContextMenuComponent {
269
269
  targetElement.setAttribute("aria-expanded", this.#isMenuOpen().toString());
270
270
  }
271
271
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ContextMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ContextMenuComponent, isStandalone: true, selector: "mona-contextmenu", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuClick: "menuClick" }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ContextMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ContextMenuIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: ContextMenuShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: ContextMenuTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-popup-menu\n [target]=\"target()\"\n [trigger]=\"'contextmenu'\"\n [items]=\"menuItems()\"\n [minWidth]=\"minWidth()\"\n [width]=\"width()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [precise]=\"true\"\n (menuClick)=\"menuClick.emit($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\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 (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }] }); }
272
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ContextMenuComponent, isStandalone: true, selector: "mona-contextmenu", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuClick: "menuClick" }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: ContextMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ContextMenuIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "shortcutTemplate", first: true, predicate: ContextMenuShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: ContextMenuTextTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<mona-popup-menu\n [target]=\"target()\"\n [trigger]=\"'contextmenu'\"\n [items]=\"menuItems()\"\n [minWidth]=\"minWidth()\"\n [width]=\"width()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [precise]=\"true\"\n (menuClick)=\"menuClick.emit($event)\"\n (open)=\"onMenuOpen()\"\n (close)=\"onMenuClose()\"\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 (iconTemplate()) {\n <ng-template monaPopupMenuIconTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (shortcutTemplate()) {\n <ng-template monaPopupMenuShortcutTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"shortcutTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n @if (textTemplate()) {\n <ng-template monaPopupMenuTextTemplate let-item>\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"></ng-container>\n </ng-template>\n }\n</mona-popup-menu>\n", dependencies: [{ kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }] }); }
273
273
  }
274
274
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ContextMenuComponent, decorators: [{
275
275
  type: Component,
@@ -271,7 +271,7 @@ class DropdownButtonComponent {
271
271
  });
272
272
  }
273
273
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
274
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DropdownButtonComponent, isStandalone: true, selector: "mona-dropdown-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClick: "menuItemClick" }, host: { properties: { "class": "userClass()" } }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: DropdownButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemIconTemplate", first: true, predicate: DropdownButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemShortcutTemplate", first: true, predicate: DropdownButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemTextTemplate", first: true, predicate: DropdownButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: DropdownButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["dropdownButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n monaButton\n [look]=\"look()\"\n [size]=\"size()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [rounded]=\"rounded()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabelledby() ? null : dropdownButtonAriaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-haspopup]=\"'menu'\"\n [attr.aria-expanded]=\"isMenuOpen()\"\n [attr.aria-controls]=\"menuId\"\n #dropdownButton>\n @if (textTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: text() }\"></ng-container>\n } @else {\n {{ text() }}\n }\n</button>\n\n<mona-popup-menu\n #popupMenu\n (close)=\"onMenuClose()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n [anchorConnectionPoint]=\"'bottomcenter'\"\n [id]=\"menuId\"\n [items]=\"menuItems()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topcenter'\"\n [size]=\"size()\"\n [target]=\"dropdownButton\"\n [trigger]=\"'click'\">\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", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
274
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DropdownButtonComponent, isStandalone: true, selector: "mona-dropdown-button", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuItemClick: "menuItemClick" }, host: { properties: { "class": "userClass()" } }, queries: [{ propertyName: "menuItemComponents", predicate: PopupMenuToken, isSignal: true }, { propertyName: "groupTemplate", first: true, predicate: DropdownButtonMenuGroupTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemIconTemplate", first: true, predicate: DropdownButtonMenuItemIconTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemShortcutTemplate", first: true, predicate: DropdownButtonMenuItemShortcutTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "menuItemTextTemplate", first: true, predicate: DropdownButtonMenuItemTextTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "textTemplate", first: true, predicate: DropdownButtonTextTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["dropdownButton"], descendants: true, isSignal: true }, { propertyName: "popupMenuRef", first: true, predicate: ["popupMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<button\n monaButton\n [look]=\"look()\"\n [size]=\"size()\"\n [iconOnly]=\"iconOnly()\"\n [loading]=\"loading()\"\n [rounded]=\"rounded()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabelledby() ? null : dropdownButtonAriaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledby() || null\"\n [attr.aria-haspopup]=\"'menu'\"\n [attr.aria-expanded]=\"isMenuOpen()\"\n [attr.aria-controls]=\"menuId\"\n #dropdownButton>\n @if (textTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"textTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: text() }\"></ng-container>\n } @else {\n {{ text() }}\n }\n</button>\n\n<mona-popup-menu\n #popupMenu\n (close)=\"onMenuClose()\"\n (menuClick)=\"onMenuItemClick($event)\"\n (open)=\"onMenuOpen()\"\n [anchorConnectionPoint]=\"'bottomcenter'\"\n [id]=\"menuId\"\n [items]=\"menuItems()\"\n [offset]=\"{ horizontal: 0, vertical: 2 }\"\n [popupConnectionPoint]=\"'topcenter'\"\n [size]=\"size()\"\n [target]=\"dropdownButton\"\n [trigger]=\"'click'\">\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", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "directive", type: PopupMenuGroupTemplateDirective, selector: "ng-template[monaPopupMenuGroupTemplate]" }, { kind: "directive", type: PopupMenuIconTemplateDirective, selector: "ng-template[monaPopupMenuIconTemplate]" }, { kind: "directive", type: PopupMenuShortcutTemplateDirective, selector: "ng-template[monaPopupMenuShortcutTemplate]" }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
275
275
  }
276
276
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownButtonComponent, decorators: [{
277
277
  type: Component,
@@ -1,7 +1,8 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Directive, contentChildren, TemplateRef, computed, contentChild, input, model, Component } from '@angular/core';
3
+ import { Directive, contentChildren, TemplateRef, computed, contentChild, input, model, forwardRef, Component } from '@angular/core';
4
4
  import { LucideMinus, LucidePlus } from '@lucide/angular';
5
+ import { CollapsibleTriggerDirective, CollapsibleToken } from '@nanahoshi/mona-ui/collapsible';
5
6
  import { createElementControlId } from '@nanahoshi/mona-ui/internal';
6
7
  import { twMerge } from 'tailwind-merge';
7
8
  import { cva } from 'class-variance-authority';
@@ -55,7 +56,7 @@ const expansionPanelBaseThemeVariants = cva(`
55
56
  });
56
57
  const expansionPanelHeaderThemeVariants = cva(`
57
58
  relative flex w-full items-center justify-between
58
- px-2 py-1
59
+ px-2 py-2
59
60
  cursor-pointer
60
61
  select-none
61
62
  font-medium text-foreground
@@ -76,9 +77,7 @@ const expansionPanelHeaderThemeVariants = cva(`
76
77
  }
77
78
  }
78
79
  });
79
- const expansionPanelHeaderTitleThemeVariants = cva(`
80
- p-1 flex-1
81
- `);
80
+ const expansionPanelHeaderTitleThemeVariants = cva(`flex-1`);
82
81
  const expansionPanelIconContainerThemeVariants = cva(``, {
83
82
  variants: {
84
83
  hasTemplate: {
@@ -115,7 +114,6 @@ class ExpansionPanelComponent {
115
114
  return expansionPanelContentThemeVariants({ expanded });
116
115
  }, /* @ts-ignore */
117
116
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
118
- this.contentId = createElementControlId();
119
117
  this.headerClass = computed(() => {
120
118
  const collapsed = !this.expanded();
121
119
  const disabled = this.disabled();
@@ -133,6 +131,13 @@ class ExpansionPanelComponent {
133
131
  ...(ngDevMode ? [{ debugName: "iconContainerClass" }] : /* istanbul ignore next */ []));
134
132
  this.iconTemplate = contentChild(ExpansionPanelIconTemplateDirective, { ...(ngDevMode ? { debugName: "iconTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
135
133
  this.titleTemplate = contentChild(ExpansionPanelTitleTemplateDirective, { ...(ngDevMode ? { debugName: "titleTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
134
+ /**
135
+ * @description Always enabled. Satisfies the `CollapsibleConfig` contract for `monaCollapsibleTrigger`;
136
+ * this component doesn't use `monaCollapsibleContent`, so no animation ever consults it.
137
+ */
138
+ this.animate = computed(() => true, /* @ts-ignore */
139
+ ...(ngDevMode ? [{ debugName: "animate" }] : /* istanbul ignore next */ []));
140
+ this.contentId = createElementControlId();
136
141
  /**
137
142
  * @description Disables header interaction, suppressing click and keyboard toggling.
138
143
  * @default false
@@ -164,6 +169,12 @@ class ExpansionPanelComponent {
164
169
  this.userClass = input("", /* @ts-ignore */
165
170
  ...(ngDevMode ? [{ debugName: "userClass" }] : /* istanbul ignore next */ []));
166
171
  }
172
+ collapse() {
173
+ this.expanded.set(false);
174
+ }
175
+ expand() {
176
+ this.expanded.set(true);
177
+ }
167
178
  toggle() {
168
179
  if (this.disabled()) {
169
180
  return;
@@ -171,13 +182,13 @@ class ExpansionPanelComponent {
171
182
  this.expanded.update(expanded => !expanded);
172
183
  }
173
184
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
174
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ExpansionPanelComponent, isStandalone: true, selector: "mona-expansion-panel", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "userClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "actionsTemplateList", predicate: ExpansionPanelActionsTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ExpansionPanelIconTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "titleTemplate", first: true, predicate: ExpansionPanelTitleTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<div\n [class]=\"headerClass()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"contentId\"\n [attr.aria-disabled]=\"disabled() ? 'true' : undefined\"\n (click)=\"toggle()\"\n (keydown.enter)=\"$event.preventDefault(); toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\">\n <div [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </div>\n <div>\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n <div [class]=\"iconContainerClass()\">\n @if (iconTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: expanded() }\"></ng-container>\n } @else {\n @if (expanded()) {\n <svg lucideMinus [size]=\"14\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\"></svg>\n }\n }\n </div>\n</div>\n<div\n [id]=\"contentId\"\n [class]=\"contentClass()\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucidePlus, selector: "svg[lucidePlus]" }] }); }
185
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ExpansionPanelComponent, isStandalone: true, selector: "mona-expansion-panel", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "userClass", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class": "baseClass()" } }, providers: [{ provide: CollapsibleToken, useExisting: forwardRef(() => ExpansionPanelComponent) }], queries: [{ propertyName: "actionsTemplateList", predicate: ExpansionPanelActionsTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "iconTemplate", first: true, predicate: ExpansionPanelIconTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "titleTemplate", first: true, predicate: ExpansionPanelTitleTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<div monaCollapsibleTrigger [class]=\"headerClass()\">\n <div [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </div>\n <div>\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n <div [class]=\"iconContainerClass()\">\n @if (iconTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: expanded() }\"></ng-container>\n } @else {\n @if (expanded()) {\n <svg lucideMinus [size]=\"14\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\"></svg>\n }\n }\n </div>\n</div>\n<div\n [id]=\"contentId\"\n [class]=\"contentClass()\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideMinus, selector: "svg[lucideMinus]" }, { kind: "component", type: LucidePlus, selector: "svg[lucidePlus]" }, { kind: "directive", type: CollapsibleTriggerDirective, selector: "[monaCollapsibleTrigger]" }] }); }
175
186
  }
176
187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelComponent, decorators: [{
177
188
  type: Component,
178
- args: [{ selector: "mona-expansion-panel", imports: [NgTemplateOutlet, LucideMinus, LucidePlus], host: {
189
+ args: [{ selector: "mona-expansion-panel", imports: [NgTemplateOutlet, LucideMinus, LucidePlus, CollapsibleTriggerDirective], host: {
179
190
  "[class]": "baseClass()"
180
- }, template: "<div\n [class]=\"headerClass()\"\n role=\"button\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"contentId\"\n [attr.aria-disabled]=\"disabled() ? 'true' : undefined\"\n (click)=\"toggle()\"\n (keydown.enter)=\"$event.preventDefault(); toggle()\"\n (keydown.space)=\"$event.preventDefault(); toggle()\">\n <div [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </div>\n <div>\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n <div [class]=\"iconContainerClass()\">\n @if (iconTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: expanded() }\"></ng-container>\n } @else {\n @if (expanded()) {\n <svg lucideMinus [size]=\"14\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\"></svg>\n }\n }\n </div>\n</div>\n<div\n [id]=\"contentId\"\n [class]=\"contentClass()\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
191
+ }, providers: [{ provide: CollapsibleToken, useExisting: forwardRef(() => ExpansionPanelComponent) }], template: "<div monaCollapsibleTrigger [class]=\"headerClass()\">\n <div [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </div>\n <div>\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n <div [class]=\"iconContainerClass()\">\n @if (iconTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"iconTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: expanded() }\"></ng-container>\n } @else {\n @if (expanded()) {\n <svg lucideMinus [size]=\"14\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\"></svg>\n }\n }\n </div>\n</div>\n<div\n [id]=\"contentId\"\n [class]=\"contentClass()\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
181
192
  }], propDecorators: { actionsTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ExpansionPanelActionsTemplateDirective), { ...{
182
193
  read: TemplateRef
183
194
  }, isSignal: true }] }], iconTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ExpansionPanelIconTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], titleTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ExpansionPanelTitleTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "userClass", required: false }] }] } });
@@ -2,7 +2,7 @@ import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { inject, computed, input, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { ImmutableDictionary } from '@mirei/ts-collections';
5
- import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
5
+ import { c as GridService } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs';
6
6
 
7
7
  class GridFooterCellComponent {
8
8
  constructor() {
@@ -102,4 +102,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
102
102
  }], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], columnIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnIndex", required: true }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
103
103
 
104
104
  export { GridFooterCellComponent };
105
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs.map
105
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { computed, input, Directive } from '@angular/core';
3
- import { v as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
3
+ import { v as gridFooterTableCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs';
4
4
 
5
5
  class GridFooterTableCellDirective {
6
6
  constructor() {
@@ -35,4 +35,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
35
35
  }], propDecorators: { footerCellMinWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellMinWidth", required: false }] }], footerCellWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerCellWidth", required: false }] }], footerColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "footerColumn", required: false }] }] } });
36
36
 
37
37
  export { GridFooterTableCellDirective };
38
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs.map
38
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs.map
@@ -6,10 +6,10 @@ import { ImmutableList, ImmutableSet, span } from '@mirei/ts-collections';
6
6
  import { SlicePipe } from '@nanahoshi/mona-ui/common';
7
7
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
8
8
  import { fromEvent } from 'rxjs';
9
- import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs';
10
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs';
11
- import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
12
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs';
9
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs';
10
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs';
11
+ import { G as GridNavigationService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, b as gridFooterTableRowThemeVariants, c as GridService, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs';
12
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs';
13
13
 
14
14
  class GridListComponent {
15
15
  #destroyRef;
@@ -118,4 +118,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
118
118
  }], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
119
119
 
120
120
  export { GridListComponent };
121
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs.map
121
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-n3eQNIza.mjs.map
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { computed, input, Directive, inject, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, LOCALE_ID, model } from '@angular/core';
3
- import { k as gridListTableCellThemeVariants, l as gridDetailContentCellThemeVariants, m as gridDetailIndentCellThemeVariants, n as gridDetailRowThemeVariants, c as GridService, o as gridListTableRowThemeVariants, p as gridCellEditorBaseThemeVariants, q as gridCellEditorInputThemeVariants, h as GridLockedCellDirective, f as GridLogicalCellDirective, r as gridCellBaseThemeVariants, s as gridCellContainerThemeVariants, t as gridCellDirtyIndicatorThemeVariants, u as gridCellTextThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
3
+ import { k as gridListTableCellThemeVariants, l as gridDetailContentCellThemeVariants, m as gridDetailIndentCellThemeVariants, n as gridDetailRowThemeVariants, c as GridService, o as gridListTableRowThemeVariants, p as gridCellEditorBaseThemeVariants, q as gridCellEditorInputThemeVariants, h as GridLockedCellDirective, f as GridLogicalCellDirective, r as gridCellBaseThemeVariants, s as gridCellContainerThemeVariants, t as gridCellDirtyIndicatorThemeVariants, u as gridCellTextThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs';
4
4
  import { ImmutableList } from '@mirei/ts-collections';
5
5
  import * as i1 from '@angular/cdk/a11y';
6
6
  import { A11yModule } from '@angular/cdk/a11y';
@@ -741,4 +741,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
741
741
  }], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: true }] }, { type: i0.Output, args: ["expandedChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }] } });
742
742
 
743
743
  export { GridAddRowComponent as G, GridCellComponent as a, GridRowDirective as b, GridCellDirective as c, GridDetailRowDirective as d, GridDetailIndentCellDirective as e, GridDetailContentCellDirective as f, GridToggleComponent as g };
744
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs.map
744
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs.map
@@ -8,10 +8,10 @@ import { SlicePipe } from '@nanahoshi/mona-ui/common';
8
8
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
9
9
  import { rxTimeout } from '@nanahoshi/mona-ui/internal';
10
10
  import { fromEvent } from 'rxjs';
11
- import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs';
12
- import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs';
13
- import { G as GridNavigationService, c as GridService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, i as gridFooterThemeVariants, j as gridFooterTableThemeVariants, b as gridFooterTableRowThemeVariants, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs';
14
- import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs';
11
+ import { G as GridAddRowComponent, a as GridCellComponent, b as GridRowDirective, c as GridCellDirective, d as GridDetailRowDirective, e as GridDetailIndentCellDirective, f as GridDetailContentCellDirective, g as GridToggleComponent } from './nanahoshi-mona-ui-grid-grid-toggle.component-BhS7c7rW.mjs';
12
+ import { GridFooterTableCellDirective } from './nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-7zwgl7u1.mjs';
13
+ import { G as GridNavigationService, c as GridService, a as GridRowFlattenerService, g as gridListBaseThemeVariants, i as gridFooterThemeVariants, j as gridFooterTableThemeVariants, b as gridFooterTableRowThemeVariants, d as gridGroupRowThemeVariants, e as gridListTableThemeVariants, f as GridLogicalCellDirective, h as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-A6Cq2a4Q.mjs';
14
+ import { GridFooterCellComponent } from './nanahoshi-mona-ui-grid-grid-footer-cell.component-D-JCCvYJ.mjs';
15
15
 
16
16
  class GridVirtualListComponent {
17
17
  #destroyRef;
@@ -228,4 +228,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
228
228
  }], ctorParameters: () => [], propDecorators: { addRowScrollElementRef: [{ type: i0.ViewChild, args: ["addRowScrollElement", { isSignal: true }] }], bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], footerScrollElementRef: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
229
229
 
230
230
  export { GridVirtualListComponent };
231
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs.map
231
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-B4VB3xFw.mjs.map