@nanahoshi/mona-ui 0.24.11 → 0.25.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 (163) hide show
  1. package/README.md +9 -0
  2. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -10
  3. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +37 -20
  4. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +239 -47
  5. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +184 -31
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +47 -11
  7. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +17 -13
  8. package/fesm2022/nanahoshi-mona-ui-card.mjs +54 -30
  9. package/fesm2022/nanahoshi-mona-ui-chart.mjs +27 -22
  10. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  11. package/fesm2022/nanahoshi-mona-ui-chip.mjs +131 -89
  12. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +59 -19
  13. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +118 -41
  14. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +243 -212
  15. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +155 -86
  16. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +161 -131
  17. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +12 -11
  18. package/fesm2022/nanahoshi-mona-ui-common.mjs +18 -1
  19. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +10 -9
  20. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +10 -9
  21. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +2 -2
  22. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +2 -2
  23. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +10 -9
  24. package/fesm2022/nanahoshi-mona-ui-editor.mjs +25 -24
  25. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +202 -33
  26. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +31 -10
  27. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
  28. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs} +2 -2
  29. package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs → nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs} +4 -4
  30. package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs → nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs} +7 -7
  31. package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-PNLJFcuH.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BsNfrAHz.mjs} +4 -4
  32. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs} +27 -29
  33. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  34. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +39 -4
  35. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +2 -2
  36. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +1 -1
  37. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +5 -5
  38. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +7 -7
  39. package/fesm2022/nanahoshi-mona-ui-internal.mjs +183 -47
  40. package/fesm2022/nanahoshi-mona-ui-label.mjs +111 -15
  41. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1 -1
  42. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1 -1
  43. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +33 -4
  44. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +33 -4
  45. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +33 -4
  46. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +33 -4
  47. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +33 -4
  48. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +33 -4
  49. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +33 -4
  50. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +33 -4
  51. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +33 -4
  52. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +33 -4
  53. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +33 -4
  54. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +33 -4
  55. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +33 -4
  56. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +2 -2
  57. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +14 -13
  58. package/fesm2022/nanahoshi-mona-ui-notification.mjs +1 -1
  59. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +13 -12
  60. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +192 -56
  61. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1 -1
  62. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +3 -1
  63. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2 -2
  64. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +60 -29
  65. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +334 -37
  66. package/fesm2022/nanahoshi-mona-ui-rating.mjs +84 -30
  67. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +274 -108
  68. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +127 -37
  69. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +2 -2
  70. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +595 -170
  71. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +3 -2
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +323 -166
  73. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +167 -82
  74. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +3 -3
  75. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +273 -165
  76. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +219 -132
  77. package/fesm2022/nanahoshi-mona-ui-switch.mjs +84 -32
  78. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +337 -116
  79. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +10 -12
  80. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +21 -8
  81. package/fesm2022/nanahoshi-mona-ui-theme.mjs +444 -88
  82. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +10 -9
  83. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +15 -14
  84. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +17 -3
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +1 -1
  86. package/i18n/catalogs/en-US.messages.json +33 -4
  87. package/locales/ar-sa/ar-sa.messages.json +33 -4
  88. package/locales/de-de/de-de.messages.json +33 -4
  89. package/locales/es-es/es-es.messages.json +33 -4
  90. package/locales/fr-fr/fr-fr.messages.json +33 -4
  91. package/locales/id-id/id-id.messages.json +33 -4
  92. package/locales/it-it/it-it.messages.json +33 -4
  93. package/locales/ja-jp/ja-jp.messages.json +33 -4
  94. package/locales/ko-kr/ko-kr.messages.json +33 -4
  95. package/locales/pt-br/pt-br.messages.json +33 -4
  96. package/locales/ru-ru/ru-ru.messages.json +33 -4
  97. package/locales/tr-tr/tr-tr.messages.json +33 -4
  98. package/locales/zh-cn/zh-cn.messages.json +33 -4
  99. package/locales/zh-tw/zh-tw.messages.json +33 -4
  100. package/package.json +2 -1
  101. package/styles.css +156 -0
  102. package/types/nanahoshi-mona-ui-auto-complete.d.ts +1 -0
  103. package/types/nanahoshi-mona-ui-avatar.d.ts +18 -11
  104. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +62 -14
  105. package/types/nanahoshi-mona-ui-button-group.d.ts +86 -16
  106. package/types/nanahoshi-mona-ui-button.d.ts +26 -3
  107. package/types/nanahoshi-mona-ui-calendar.d.ts +1 -0
  108. package/types/nanahoshi-mona-ui-card.d.ts +22 -6
  109. package/types/nanahoshi-mona-ui-check-box.d.ts +54 -13
  110. package/types/nanahoshi-mona-ui-chip.d.ts +31 -18
  111. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +21 -5
  112. package/types/nanahoshi-mona-ui-collapsible.d.ts +20 -11
  113. package/types/nanahoshi-mona-ui-color-gradient.d.ts +62 -36
  114. package/types/nanahoshi-mona-ui-color-palette.d.ts +65 -27
  115. package/types/nanahoshi-mona-ui-color-picker.d.ts +64 -23
  116. package/types/nanahoshi-mona-ui-combo-box.d.ts +1 -0
  117. package/types/nanahoshi-mona-ui-common.d.ts +28 -2
  118. package/types/nanahoshi-mona-ui-date-picker.d.ts +1 -0
  119. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +1 -0
  120. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +1 -0
  121. package/types/nanahoshi-mona-ui-editor.d.ts +1 -0
  122. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +51 -7
  123. package/types/nanahoshi-mona-ui-fieldset.d.ts +18 -4
  124. package/types/nanahoshi-mona-ui-grid.d.ts +0 -1
  125. package/types/nanahoshi-mona-ui-i18n.d.ts +38 -3
  126. package/types/nanahoshi-mona-ui-internal.d.ts +95 -14
  127. package/types/nanahoshi-mona-ui-label.d.ts +17 -2
  128. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +29 -0
  129. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +29 -0
  130. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +29 -0
  131. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +29 -0
  132. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +29 -0
  133. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +29 -0
  134. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +29 -0
  135. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +29 -0
  136. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +29 -0
  137. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +29 -0
  138. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +29 -0
  139. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +29 -0
  140. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +29 -0
  141. package/types/nanahoshi-mona-ui-multi-select.d.ts +1 -0
  142. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +1 -0
  143. package/types/nanahoshi-mona-ui-otp-input.d.ts +49 -12
  144. package/types/nanahoshi-mona-ui-placeholder.d.ts +2 -1
  145. package/types/nanahoshi-mona-ui-progress-bar.d.ts +21 -9
  146. package/types/nanahoshi-mona-ui-radio-button.d.ts +165 -20
  147. package/types/nanahoshi-mona-ui-rating.d.ts +21 -6
  148. package/types/nanahoshi-mona-ui-scroll-view.d.ts +59 -27
  149. package/types/nanahoshi-mona-ui-segmented.d.ts +52 -24
  150. package/types/nanahoshi-mona-ui-sidebar.d.ts +104 -41
  151. package/types/nanahoshi-mona-ui-skeleton.d.ts +1 -1
  152. package/types/nanahoshi-mona-ui-slider.d.ts +99 -35
  153. package/types/nanahoshi-mona-ui-spinner.d.ts +9 -5
  154. package/types/nanahoshi-mona-ui-splitter.d.ts +31 -10
  155. package/types/nanahoshi-mona-ui-stepper.d.ts +58 -12
  156. package/types/nanahoshi-mona-ui-switch.d.ts +32 -10
  157. package/types/nanahoshi-mona-ui-tabs.d.ts +75 -20
  158. package/types/nanahoshi-mona-ui-text-area.d.ts +7 -7
  159. package/types/nanahoshi-mona-ui-text-box.d.ts +2 -0
  160. package/types/nanahoshi-mona-ui-theme.d.ts +392 -15
  161. package/types/nanahoshi-mona-ui-time-picker.d.ts +1 -0
  162. package/types/nanahoshi-mona-ui-time-selector.d.ts +1 -0
  163. package/types/nanahoshi-mona-ui-tooltip.d.ts +7 -1
@@ -1,12 +1,107 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { Directive, contentChildren, TemplateRef, computed, contentChild, input, model, forwardRef, Component } from '@angular/core';
2
+ import { InjectionToken, signal, input, booleanAttribute, effect, untracked, forwardRef, Component, Directive, inject, ElementRef, computed, contentChildren, TemplateRef, contentChild, viewChild, model, DestroyRef, isDevMode, afterNextRender } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
4
  import { LucideMinus, LucidePlus } from '@lucide/angular';
5
- import { CollapsibleTriggerDirective, CollapsibleToken } from '@nanahoshi/mona-ui/collapsible';
5
+ import { CollapsibleTriggerDirective, COLLAPSIBLE_CONFIG } from '@nanahoshi/mona-ui/collapsible';
6
6
  import { createElementControlId } from '@nanahoshi/mona-ui/internal';
7
7
  import { twMerge } from 'tailwind-merge';
8
8
  import { cva } from 'class-variance-authority';
9
9
 
10
+ /**
11
+ * Lets a panel join the nearest accordion, wherever its template is. A nested accordion's panels find the inner one, so
12
+ * they aren't counted as the outer one's.
13
+ */
14
+ const EXPANSION_PANEL_ACCORDION = new InjectionToken("EXPANSION_PANEL_ACCORDION");
15
+
16
+ /**
17
+ * @description
18
+ * Groups `mona-expansion-panel` elements: only one is open at a time unless `multiple` is set, and Up, Down, Home and End
19
+ * move between their headers. Adds no role of its own, as the pattern asks: each panel brings its heading and region.
20
+ */
21
+ class AccordionComponent {
22
+ #registered;
23
+ #openPanels;
24
+ constructor() {
25
+ this.#registered = signal([], /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "#registered" }] : /* istanbul ignore next */ []));
27
+ this.#openPanels = [];
28
+ /**
29
+ * @description Lets several panels stay open. Without it, opening a panel closes the others, however it was opened.
30
+ * @default false
31
+ */
32
+ this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
33
+ effect(() => {
34
+ const open = this.#inDocumentOrder().filter(panel => panel.expanded());
35
+ const multiple = this.multiple();
36
+ untracked(() => this.#enforceSingleOpen(open, multiple));
37
+ });
38
+ }
39
+ /**
40
+ * @internal
41
+ */
42
+ register(panel) {
43
+ this.#registered.update(panels => [...panels, panel]);
44
+ return () => this.#registered.update(panels => panels.filter(other => other !== panel));
45
+ }
46
+ onKeydown(event) {
47
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
48
+ return;
49
+ }
50
+ const panels = this.#inDocumentOrder().filter(panel => !panel.disabled());
51
+ const current = panels.findIndex(panel => panel.ownsTrigger(event.target));
52
+ if (current === -1) {
53
+ return;
54
+ }
55
+ const target = this.#targetFor(event.key, panels, current);
56
+ if (target) {
57
+ event.preventDefault();
58
+ target.focus();
59
+ }
60
+ }
61
+ /** The panel opened last is the one that stays, so a panel opened by a binding wins just as a clicked one does. */
62
+ #enforceSingleOpen(open, multiple) {
63
+ const previous = this.#openPanels;
64
+ this.#openPanels = open;
65
+ if (multiple || open.length < 2) {
66
+ return;
67
+ }
68
+ const keep = open.filter(panel => !previous.includes(panel)).at(-1) ?? open[0];
69
+ open.filter(panel => panel !== keep).forEach(panel => panel.collapse());
70
+ }
71
+ /** Worked out each time, because a panel can be moved without anything registering. */
72
+ #inDocumentOrder() {
73
+ return [...this.#registered()].sort((first, second) => first.compareDocumentOrder(second));
74
+ }
75
+ #targetFor(key, panels, current) {
76
+ switch (key) {
77
+ case "ArrowDown":
78
+ return panels[(current + 1) % panels.length];
79
+ case "ArrowUp":
80
+ return panels[(current - 1 + panels.length) % panels.length];
81
+ case "Home":
82
+ return panels[0];
83
+ case "End":
84
+ return panels[panels.length - 1];
85
+ default:
86
+ return undefined;
87
+ }
88
+ }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: AccordionComponent, isStandalone: true, selector: "mona-accordion", inputs: { multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown": "onKeydown($event)" }, classAttribute: "block w-full" }, providers: [{ provide: EXPANSION_PANEL_ACCORDION, useExisting: forwardRef(() => AccordionComponent) }], ngImport: i0, template: ` <ng-content></ng-content> `, isInline: true }); }
91
+ }
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AccordionComponent, decorators: [{
93
+ type: Component,
94
+ args: [{
95
+ selector: "mona-accordion",
96
+ template: ` <ng-content></ng-content> `,
97
+ host: {
98
+ class: "block w-full",
99
+ "(keydown)": "onKeydown($event)"
100
+ },
101
+ providers: [{ provide: EXPANSION_PANEL_ACCORDION, useExisting: forwardRef(() => AccordionComponent) }]
102
+ }]
103
+ }], ctorParameters: () => [], propDecorators: { multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }] } });
104
+
10
105
  class ExpansionPanelActionsTemplateDirective {
11
106
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelActionsTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
107
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ExpansionPanelActionsTemplateDirective, isStandalone: true, selector: "ng-template[monaExpansionPanelActionsTemplate]", ngImport: i0 }); }
@@ -54,31 +149,42 @@ const expansionPanelBaseThemeVariants = cva(`
54
149
  }
55
150
  }
56
151
  });
152
+ /**
153
+ * Three columns: title, actions, icon. The heading and its button span them all through subgrid and put the title and
154
+ * icon in the outer two, so the button fills the row while the actions, its sibling, sit in the middle one above it.
155
+ */
57
156
  const expansionPanelHeaderThemeVariants = cva(`
58
- relative flex w-full items-center justify-between
59
- px-2 py-2
60
- cursor-pointer
61
- select-none
62
- font-medium text-foreground
157
+ relative grid w-full grid-cols-[minmax(0,1fr)_auto_auto] items-stretch
63
158
  bg-surface-muted
64
- transition-colors duration-(--mona-motion-fast)
65
- hover:bg-hover active:bg-active
66
- focus-visible:z-10 focus-visible:outline-none
67
- focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-indicator/35
68
159
  `, {
69
160
  variants: {
70
161
  collapsed: {
71
162
  true: "border-b-transparent",
72
163
  false: "border-0 border-b border-border-subtle"
73
- },
164
+ }
165
+ }
166
+ });
167
+ const expansionPanelHeadingThemeVariants = cva(`col-span-full row-start-1 grid grid-cols-subgrid`);
168
+ /** Inset focus, because the panel clips anything outside it. */
169
+ const expansionPanelTriggerThemeVariants = cva(`
170
+ col-span-full grid grid-cols-subgrid items-center
171
+ px-2 py-2
172
+ text-start font-medium
173
+ select-none
174
+ bg-transparent
175
+ transition-colors duration-(--mona-motion-fast) motion-reduce:transition-none
176
+ focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-indicator
177
+ `, {
178
+ variants: {
74
179
  disabled: {
75
- true: "pointer-events-none cursor-not-allowed select-none bg-disabled-background text-disabled-foreground",
76
- false: ""
180
+ true: "cursor-not-allowed bg-disabled-background text-disabled-foreground",
181
+ false: "cursor-pointer text-foreground hover:bg-hover active:bg-active"
77
182
  }
78
183
  }
79
184
  });
80
- const expansionPanelHeaderTitleThemeVariants = cva(`flex-1`);
81
- const expansionPanelIconContainerThemeVariants = cva(``, {
185
+ const expansionPanelActionsThemeVariants = cva(`relative z-10 col-start-2 row-start-1 flex items-center self-center`);
186
+ const expansionPanelHeaderTitleThemeVariants = cva(`col-start-1 row-start-1 min-w-0`);
187
+ const expansionPanelIconContainerThemeVariants = cva(`col-start-3 row-start-1`, {
82
188
  variants: {
83
189
  hasTemplate: {
84
190
  true: "",
@@ -89,7 +195,7 @@ const expansionPanelIconContainerThemeVariants = cva(``, {
89
195
  const expansionPanelContentThemeVariants = cva(`
90
196
  text-foreground
91
197
  grid
92
- transition-[grid-template-rows] duration-(--mona-motion-standard) ease-out
198
+ transition-[grid-template-rows] duration-(--mona-motion-standard) ease-out motion-reduce:transition-none
93
199
  [&>div]:overflow-hidden
94
200
  `, {
95
201
  variants: {
@@ -100,8 +206,24 @@ const expansionPanelContentThemeVariants = cva(`
100
206
  }
101
207
  });
102
208
 
209
+ /** A level from 1 to 6, `null` for no heading at all, and the default for anything else. */
210
+ function toHeadingLevel(value) {
211
+ if (value === null) {
212
+ return null;
213
+ }
214
+ const level = Number(value);
215
+ return Number.isInteger(level) && level >= 1 && level <= 6 ? level : 3;
216
+ }
217
+ /** `Node.DOCUMENT_POSITION_FOLLOWING`, written out because `Node` isn't a global on the server. */
218
+ const DOCUMENT_POSITION_FOLLOWING = 4;
103
219
  class ExpansionPanelComponent {
220
+ #host;
104
221
  constructor() {
222
+ this.#host = inject(ElementRef).nativeElement;
223
+ this.actionsClass = computed(() => {
224
+ return expansionPanelActionsThemeVariants();
225
+ }, /* @ts-ignore */
226
+ ...(ngDevMode ? [{ debugName: "actionsClass" }] : /* istanbul ignore next */ []));
105
227
  this.actionsTemplateList = contentChildren(ExpansionPanelActionsTemplateDirective, { ...(ngDevMode ? { debugName: "actionsTemplateList" } : /* istanbul ignore next */ {}), read: TemplateRef });
106
228
  this.baseClass = computed(() => {
107
229
  const rounded = this.rounded();
@@ -115,15 +237,17 @@ class ExpansionPanelComponent {
115
237
  }, /* @ts-ignore */
116
238
  ...(ngDevMode ? [{ debugName: "contentClass" }] : /* istanbul ignore next */ []));
117
239
  this.headerClass = computed(() => {
118
- const collapsed = !this.expanded();
119
- const disabled = this.disabled();
120
- return expansionPanelHeaderThemeVariants({ collapsed, disabled });
240
+ return expansionPanelHeaderThemeVariants({ collapsed: !this.expanded() });
121
241
  }, /* @ts-ignore */
122
242
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
123
243
  this.headerTitleClass = computed(() => {
124
244
  return expansionPanelHeaderTitleThemeVariants();
125
245
  }, /* @ts-ignore */
126
246
  ...(ngDevMode ? [{ debugName: "headerTitleClass" }] : /* istanbul ignore next */ []));
247
+ this.headingClass = computed(() => {
248
+ return expansionPanelHeadingThemeVariants();
249
+ }, /* @ts-ignore */
250
+ ...(ngDevMode ? [{ debugName: "headingClass" }] : /* istanbul ignore next */ []));
127
251
  this.iconContainerClass = computed(() => {
128
252
  const hasTemplate = !!this.iconTemplate();
129
253
  return expansionPanelIconContainerThemeVariants({ hasTemplate });
@@ -131,6 +255,13 @@ class ExpansionPanelComponent {
131
255
  ...(ngDevMode ? [{ debugName: "iconContainerClass" }] : /* istanbul ignore next */ []));
132
256
  this.iconTemplate = contentChild(ExpansionPanelIconTemplateDirective, { ...(ngDevMode ? { debugName: "iconTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
133
257
  this.titleTemplate = contentChild(ExpansionPanelTitleTemplateDirective, { ...(ngDevMode ? { debugName: "titleTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
258
+ this.triggerClass = computed(() => {
259
+ return expansionPanelTriggerThemeVariants({ disabled: this.disabled() });
260
+ }, /* @ts-ignore */
261
+ ...(ngDevMode ? [{ debugName: "triggerClass" }] : /* istanbul ignore next */ []));
262
+ this.triggerElement = viewChild.required("trigger", /* @ts-ignore */
263
+ ...(ngDevMode ? [{ debugName: "triggerElement" }] : /* istanbul ignore next */ []));
264
+ this.triggerId = createElementControlId();
134
265
  /**
135
266
  * @description Always enabled. Satisfies the `CollapsibleConfig` contract for `monaCollapsibleTrigger`;
136
267
  * this component doesn't use `monaCollapsibleContent`, so no animation ever consults it.
@@ -139,17 +270,22 @@ class ExpansionPanelComponent {
139
270
  ...(ngDevMode ? [{ debugName: "animate" }] : /* istanbul ignore next */ []));
140
271
  this.contentId = createElementControlId();
141
272
  /**
142
- * @description Disables header interaction, suppressing click and keyboard toggling.
273
+ * @description Disables the header: toggling by click or key, and the actions in it.
143
274
  * @default false
144
275
  */
145
- this.disabled = input(false, /* @ts-ignore */
146
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
276
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
147
277
  /**
148
278
  * @description Sets whether the expansion panel is expanded or collapsed.
149
279
  * @default false
150
280
  */
151
281
  this.expanded = model(false, /* @ts-ignore */
152
282
  ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
283
+ /**
284
+ * @description The level of the heading around the header's button, from 1 to 6. Set it to fit the page's outline, or
285
+ * to `null` for no heading.
286
+ * @default 3
287
+ */
288
+ this.headingLevel = input(3, { ...(ngDevMode ? { debugName: "headingLevel" } : /* istanbul ignore next */ {}), transform: toHeadingLevel });
153
289
  /**
154
290
  * @description Sets the border radius of the expansion panel.
155
291
  * @default "medium"
@@ -157,7 +293,7 @@ class ExpansionPanelComponent {
157
293
  this.rounded = input("medium", /* @ts-ignore */
158
294
  ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
159
295
  /**
160
- * @description Sets the title of the expansion panel.
296
+ * @description Sets the title of the expansion panel, which also names its button and region.
161
297
  * @default ""
162
298
  */
163
299
  this.title = input("", /* @ts-ignore */
@@ -166,15 +302,46 @@ class ExpansionPanelComponent {
166
302
  * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
167
303
  * @default ""
168
304
  */
169
- this.userClass = input("", /* @ts-ignore */
170
- ...(ngDevMode ? [{ debugName: "userClass" }] : /* istanbul ignore next */ []));
305
+ this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
306
+ const accordion = inject(EXPANSION_PANEL_ACCORDION, { optional: true });
307
+ if (accordion) {
308
+ inject(DestroyRef).onDestroy(accordion.register(this));
309
+ }
310
+ if (isDevMode()) {
311
+ afterNextRender({
312
+ read: () => {
313
+ const trigger = this.triggerElement().nativeElement;
314
+ if (!trigger.textContent?.trim() && !trigger.querySelector("[aria-label], img[alt]")) {
315
+ console.warn("mona-expansion-panel: a panel needs a title, or its button has no name.");
316
+ }
317
+ }
318
+ });
319
+ }
171
320
  }
172
321
  collapse() {
173
322
  this.expanded.set(false);
174
323
  }
324
+ /**
325
+ * @internal
326
+ */
327
+ compareDocumentOrder(other) {
328
+ return this.#host.compareDocumentPosition(other.#host) & DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
329
+ }
175
330
  expand() {
176
331
  this.expanded.set(true);
177
332
  }
333
+ /**
334
+ * Moves focus to the panel's header button.
335
+ */
336
+ focus() {
337
+ this.triggerElement().nativeElement.focus();
338
+ }
339
+ /**
340
+ * @internal
341
+ */
342
+ ownsTrigger(element) {
343
+ return this.triggerElement().nativeElement === element;
344
+ }
178
345
  toggle() {
179
346
  if (this.disabled()) {
180
347
  return;
@@ -182,16 +349,18 @@ class ExpansionPanelComponent {
182
349
  this.expanded.update(expanded => !expanded);
183
350
  }
184
351
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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]" }] }); }
352
+ 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 }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", 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: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "class": "baseClass()", "attr.title": "null" } }, providers: [{ provide: COLLAPSIBLE_CONFIG, 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 }], viewQueries: [{ propertyName: "triggerElement", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <!-- The button fills the row, so all of it toggles. The actions sit over it as its sibling, never inside it. -->\n <div\n [class]=\"headingClass()\"\n [attr.role]=\"headingLevel() === null ? null : 'heading'\"\n [attr.aria-level]=\"headingLevel()\">\n <button #trigger monaCollapsibleTrigger [id]=\"triggerId\" [class]=\"triggerClass()\">\n <span [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </span>\n <span [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\" aria-hidden=\"true\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\" aria-hidden=\"true\"></svg>\n }\n }\n </span>\n </button>\n </div>\n @if (actionsTemplateList().length > 0) {\n <div [class]=\"actionsClass()\" [attr.inert]=\"disabled() ? true : null\">\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n }\n</div>\n<div\n [id]=\"contentId\"\n role=\"region\"\n [class]=\"contentClass()\"\n [attr.aria-labelledby]=\"triggerId\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n", 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]" }] }); }
186
353
  }
187
354
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ExpansionPanelComponent, decorators: [{
188
355
  type: Component,
189
356
  args: [{ selector: "mona-expansion-panel", imports: [NgTemplateOutlet, LucideMinus, LucidePlus, CollapsibleTriggerDirective], host: {
190
- "[class]": "baseClass()"
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" }]
192
- }], propDecorators: { actionsTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ExpansionPanelActionsTemplateDirective), { ...{
357
+ "[class]": "baseClass()",
358
+ // A plain `title` attribute would stay on the host as a tooltip over the whole panel.
359
+ "[attr.title]": "null"
360
+ }, providers: [{ provide: COLLAPSIBLE_CONFIG, useExisting: forwardRef(() => ExpansionPanelComponent) }], template: "<div [class]=\"headerClass()\">\n <!-- The button fills the row, so all of it toggles. The actions sit over it as its sibling, never inside it. -->\n <div\n [class]=\"headingClass()\"\n [attr.role]=\"headingLevel() === null ? null : 'heading'\"\n [attr.aria-level]=\"headingLevel()\">\n <button #trigger monaCollapsibleTrigger [id]=\"triggerId\" [class]=\"triggerClass()\">\n <span [class]=\"headerTitleClass()\">\n @if (titleTemplate()) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate()\"></ng-container>\n } @else {\n {{ title() }}\n }\n </span>\n <span [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\" aria-hidden=\"true\"></svg>\n } @else {\n <svg lucidePlus [size]=\"14\" aria-hidden=\"true\"></svg>\n }\n }\n </span>\n </button>\n </div>\n @if (actionsTemplateList().length > 0) {\n <div [class]=\"actionsClass()\" [attr.inert]=\"disabled() ? true : null\">\n @for (action of actionsTemplateList(); track $index) {\n <ng-container [ngTemplateOutlet]=\"action\"></ng-container>\n }\n </div>\n }\n</div>\n<div\n [id]=\"contentId\"\n role=\"region\"\n [class]=\"contentClass()\"\n [attr.aria-labelledby]=\"triggerId\"\n [attr.aria-hidden]=\"!expanded()\"\n [attr.inert]=\"!expanded() ? true : undefined\">\n <div>\n <ng-content></ng-content>\n </div>\n</div>\n" }]
361
+ }], ctorParameters: () => [], propDecorators: { actionsTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ExpansionPanelActionsTemplateDirective), { ...{
193
362
  read: TemplateRef
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 }] }] } });
363
+ }, 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 }] }], triggerElement: [{ type: i0.ViewChild, args: ["trigger", { 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"] }], headingLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "headingLevel", required: false }] }], 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: "class", required: false }] }] } });
195
364
 
196
365
  /*
197
366
  * Public API Surface of @nanahoshi/mona-ui/expansion-panel
@@ -201,5 +370,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
201
370
  * Generated bundle index. Do not edit.
202
371
  */
203
372
 
204
- export { ExpansionPanelActionsTemplateDirective, ExpansionPanelComponent, ExpansionPanelIconTemplateDirective, ExpansionPanelTitleTemplateDirective };
373
+ export { AccordionComponent, ExpansionPanelActionsTemplateDirective, ExpansionPanelComponent, ExpansionPanelIconTemplateDirective, ExpansionPanelTitleTemplateDirective };
205
374
  //# sourceMappingURL=nanahoshi-mona-ui-expansion-panel.mjs.map
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, computed, contentChild, TemplateRef, input, Component } from '@angular/core';
2
+ import { Directive, inject, computed, contentChild, TemplateRef, input, booleanAttribute, Component } from '@angular/core';
3
3
  import { NgTemplateOutlet } from '@angular/common';
4
+ import { MONA_FIELDSET_DISABLED } from '@nanahoshi/mona-ui/internal';
4
5
  import { twMerge } from 'tailwind-merge';
5
6
  import { cva } from 'class-variance-authority';
6
7
 
@@ -61,13 +62,14 @@ const fieldsetLegendThemeVariants = cva(`
61
62
 
62
63
  class FieldsetComponent {
63
64
  constructor() {
65
+ this.#parentDisabled = inject(MONA_FIELDSET_DISABLED, { optional: true, skipSelf: true });
64
66
  this.baseClass = computed(() => {
65
67
  return fieldsetBaseThemeVariants();
66
68
  }, /* @ts-ignore */
67
69
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
68
70
  this.fieldsetClass = computed(() => {
69
71
  const rounded = this.rounded();
70
- const disabled = this.disabled();
72
+ const disabled = this.effectiveDisabled();
71
73
  const userClass = this.userClass();
72
74
  return twMerge(fieldsetThemeVariants({ rounded, disabled }), userClass);
73
75
  }, /* @ts-ignore */
@@ -84,12 +86,27 @@ class FieldsetComponent {
84
86
  }, /* @ts-ignore */
85
87
  ...(ngDevMode ? [{ debugName: "legendVisible" }] : /* istanbul ignore next */ []));
86
88
  /**
87
- * @description Whether the fieldset and its projected form controls are disabled.
88
- * Reflected as the native `disabled` attribute on the rendered `<fieldset>`.
89
+ * @description Accessible name of the fieldset when it has no legend.
90
+ * @default ""
91
+ */
92
+ this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
93
+ /**
94
+ * @description Id of the element that labels the fieldset when it has no legend.
95
+ * @default ""
96
+ */
97
+ this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
98
+ /**
99
+ * @description Whether the fieldset and the Mona UI form controls inside it are disabled, including nested fieldsets.
100
+ * Reflected as the native `disabled` attribute on the rendered `<fieldset>`, which also covers native controls.
101
+ * A signal form field inside stays enabled in the form model, so its validation keeps running.
89
102
  * @default false
90
103
  */
91
- this.disabled = input(false, /* @ts-ignore */
92
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
104
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
105
+ /**
106
+ * @internal
107
+ */
108
+ this.effectiveDisabled = computed(() => this.disabled() || (this.#parentDisabled?.() ?? false), /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
93
110
  /**
94
111
  * @description The legend text of the fieldset. Shown in the top border as a labelled notch.
95
112
  * Ignored when `monaFieldsetLegendTemplate` is provided.
@@ -115,15 +132,19 @@ class FieldsetComponent {
115
132
  */
116
133
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
117
134
  }
135
+ #parentDisabled;
118
136
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
119
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: FieldsetComponent, isStandalone: true, selector: "mona-fieldset", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, queries: [{ propertyName: "legendTemplate", first: true, predicate: FieldsetLegendTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<fieldset [class]=\"fieldsetClass()\" [disabled]=\"disabled()\" [attr.name]=\"name()\">\n @if (legendVisible()) {\n <legend [class]=\"legendClass()\">\n @if (legendTemplate()) {\n <ng-container [ngTemplateOutlet]=\"legendTemplate()\"></ng-container>\n } @else {\n <span>{{ legend() }}</span>\n }\n </legend>\n }\n <ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
137
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: FieldsetComponent, isStandalone: true, selector: "mona-fieldset", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "null", "attr.aria-labelledby": "null", "class": "baseClass()" } }, providers: [{ provide: MONA_FIELDSET_DISABLED, useFactory: () => inject(FieldsetComponent).effectiveDisabled }], queries: [{ propertyName: "legendTemplate", first: true, predicate: FieldsetLegendTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<fieldset\n [class]=\"fieldsetClass()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.name]=\"name()\">\n @if (legendVisible()) {\n <legend [class]=\"legendClass()\">\n @if (legendTemplate()) {\n <ng-container [ngTemplateOutlet]=\"legendTemplate()\"></ng-container>\n } @else {\n <span>{{ legend() }}</span>\n }\n </legend>\n }\n <ng-content></ng-content>\n</fieldset>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
120
138
  }
121
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FieldsetComponent, decorators: [{
122
140
  type: Component,
123
- args: [{ selector: "mona-fieldset", imports: [NgTemplateOutlet], host: {
141
+ args: [{ selector: "mona-fieldset", imports: [NgTemplateOutlet], providers: [{ provide: MONA_FIELDSET_DISABLED, useFactory: () => inject(FieldsetComponent).effectiveDisabled }], host: {
142
+ // The ARIA inputs below are applied to the native fieldset, so the host must not keep the static attributes.
143
+ "[attr.aria-label]": "null",
144
+ "[attr.aria-labelledby]": "null",
124
145
  "[class]": "baseClass()"
125
- }, template: "<fieldset [class]=\"fieldsetClass()\" [disabled]=\"disabled()\" [attr.name]=\"name()\">\n @if (legendVisible()) {\n <legend [class]=\"legendClass()\">\n @if (legendTemplate()) {\n <ng-container [ngTemplateOutlet]=\"legendTemplate()\"></ng-container>\n } @else {\n <span>{{ legend() }}</span>\n }\n </legend>\n }\n <ng-content></ng-content>\n</fieldset>\n" }]
126
- }], propDecorators: { legendTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FieldsetLegendTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
146
+ }, template: "<fieldset\n [class]=\"fieldsetClass()\"\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || null\"\n [attr.name]=\"name()\">\n @if (legendVisible()) {\n <legend [class]=\"legendClass()\">\n @if (legendTemplate()) {\n <ng-container [ngTemplateOutlet]=\"legendTemplate()\"></ng-container>\n } @else {\n <span>{{ legend() }}</span>\n }\n </legend>\n }\n <ng-content></ng-content>\n</fieldset>\n" }]
147
+ }], propDecorators: { legendTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => FieldsetLegendTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
127
148
 
128
149
  /*
129
150
  * Public API Surface of @nanahoshi/mona-ui/fieldset
@@ -707,7 +707,7 @@ class FilterMenuComponent {
707
707
  this.selectedConnectorItem.set(selectedConnectorItem);
708
708
  }
709
709
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FilterMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
710
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: FilterMenuComponent, isStandalone: true, selector: "mona-filter-menu", inputs: { dateOptions: { classPropertyName: "dateOptions", publicName: "dateOptions", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, operators: { classPropertyName: "operators", publicName: "operators", 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 }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apply: "apply", value: "valueChange" }, host: { properties: { "class": "baseClass()" } }, providers: [FilterService], ngImport: i0, template: "<div [class]=\"filterMenuItemClass()\">\n <mona-dropdown-list\n [data]=\"operatorItems()\"\n textField=\"text\"\n valueField=\"value\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().operator\"\n [ngModel]=\"selectedFilterMenuDataItemList()[0]\"\n (ngModelChange)=\"onFilterOperatorChange(0, $event)\"></mona-dropdown-list>\n @switch (type()) {\n @case (\"string\") {\n <mona-text-box\n [ngModel]=\"stringFilterValues()[0]\"\n (ngModelChange)=\"stringFilterValues.set([$event, stringFilterValues()[1]])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [ngModel]=\"numberFilterValues()[0]\"\n (ngModelChange)=\"numberFilterValues.set([$event, numberFilterValues()[1]])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-numeric-text-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [ngModel]=\"dateFilterValues()[0]\"\n (ngModelChange)=\"dateFilterValues.set([$event, dateFilterValues()[1]])\"\n [format]=\"dateOptions().format ?? null\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-date-picker>\n }\n }\n</div>\n@if (firstFilterValid()) {\n <div [class]=\"filterMenuItemClass()\">\n <mona-button-group\n selection=\"single\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().logic\"\n [disabled]=\"!firstFilterValid()\">\n @for (item of connectorDataItems(); track item.value) {\n <button\n monaButton\n [selected]=\"item.value === selectedConnectorItem()?.value\"\n (selectedChange)=\"onConnectorChange(item, $event)\">\n {{ item.text }}\n </button>\n }\n </mona-button-group>\n </div>\n}\n@if (!!selectedConnectorItem()) {\n <div [class]=\"filterMenuItemClass()\">\n <mona-dropdown-list\n [data]=\"operatorItems()\"\n textField=\"text\"\n valueField=\"value\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondOperator\"\n [ngModel]=\"selectedFilterMenuDataItemList()[1]\"\n (ngModelChange)=\"onFilterOperatorChange(1, $event)\"></mona-dropdown-list>\n @switch (type()) {\n @case (\"string\") {\n <mona-text-box\n [ngModel]=\"stringFilterValues()[1]\"\n (ngModelChange)=\"stringFilterValues.set([stringFilterValues()[0], $event])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [ngModel]=\"numberFilterValues()[1]\"\n (ngModelChange)=\"numberFilterValues.set([numberFilterValues()[0], $event])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-numeric-text-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [ngModel]=\"dateFilterValues()[1]\"\n (ngModelChange)=\"dateFilterValues.set([dateFilterValues()[0], $event])\"\n [format]=\"dateOptions().format ?? null\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-date-picker>\n }\n }\n </div>\n}\n<div [class]=\"`${filterMenuItemClass()} ${filterMenuActionsClass()}`\">\n <button\n monaButton\n (click)=\"onFilterApply()\"\n [look]=\"'primary'\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [disabled]=\"applyDisabled()\">\n {{ messages().apply }}\n </button>\n <button monaButton (click)=\"onFilterClear()\" [look]=\"'default'\" [size]=\"size()\" [rounded]=\"rounded()\">\n {{ messages().clear }}\n </button>\n</div>\n", dependencies: [{ kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "clearButton", "disabled", "inputAttributes", "inputClass", "inputId", "inputStyle", "invalid", "maxLength", "minLength", "name", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DatePickerComponent, selector: "mona-date-picker", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "disabled", "disabledDates", "firstDay", "format", "inputId", "invalid", "max", "min", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "readonlyInput", "required", "rounded", "showClearButton", "size", "touched", "class", "value", "weekNumber"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "disabled", "look", "rounded", "selection", "size", "class"], outputs: ["buttonClick", "disabledChange", "selectionChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class"], outputs: ["lookChange", "selectedChange"] }, { kind: "pipe", type: ValuelessOperatorPipe, name: "valuelessOperator" }] }); }
710
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: FilterMenuComponent, isStandalone: true, selector: "mona-filter-menu", inputs: { dateOptions: { classPropertyName: "dateOptions", publicName: "dateOptions", isSignal: true, isRequired: false, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, operators: { classPropertyName: "operators", publicName: "operators", 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 }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { apply: "apply", value: "valueChange" }, host: { properties: { "class": "baseClass()" } }, providers: [FilterService], ngImport: i0, template: "<div [class]=\"filterMenuItemClass()\">\n <mona-dropdown-list\n [data]=\"operatorItems()\"\n textField=\"text\"\n valueField=\"value\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().operator\"\n [ngModel]=\"selectedFilterMenuDataItemList()[0]\"\n (ngModelChange)=\"onFilterOperatorChange(0, $event)\"></mona-dropdown-list>\n @switch (type()) {\n @case (\"string\") {\n <mona-text-box\n [ngModel]=\"stringFilterValues()[0]\"\n (ngModelChange)=\"stringFilterValues.set([$event, stringFilterValues()[1]])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [ngModel]=\"numberFilterValues()[0]\"\n (ngModelChange)=\"numberFilterValues.set([$event, numberFilterValues()[1]])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-numeric-text-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [ngModel]=\"dateFilterValues()[0]\"\n (ngModelChange)=\"dateFilterValues.set([$event, dateFilterValues()[1]])\"\n [format]=\"dateOptions().format ?? null\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().value\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[0]?.value | valuelessOperator\"></mona-date-picker>\n }\n }\n</div>\n@if (firstFilterValid()) {\n <div [class]=\"filterMenuItemClass()\">\n <mona-button-group\n selection=\"single\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().logic\"\n [disabled]=\"!firstFilterValid()\">\n @for (item of connectorDataItems(); track item.value) {\n <button\n monaButton\n [selected]=\"item.value === selectedConnectorItem()?.value\"\n (selectedChange)=\"onConnectorChange(item, $event)\">\n {{ item.text }}\n </button>\n }\n </mona-button-group>\n </div>\n}\n@if (!!selectedConnectorItem()) {\n <div [class]=\"filterMenuItemClass()\">\n <mona-dropdown-list\n [data]=\"operatorItems()\"\n textField=\"text\"\n valueField=\"value\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondOperator\"\n [ngModel]=\"selectedFilterMenuDataItemList()[1]\"\n (ngModelChange)=\"onFilterOperatorChange(1, $event)\"></mona-dropdown-list>\n @switch (type()) {\n @case (\"string\") {\n <mona-text-box\n [ngModel]=\"stringFilterValues()[1]\"\n (ngModelChange)=\"stringFilterValues.set([stringFilterValues()[0], $event])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [ngModel]=\"numberFilterValues()[1]\"\n (ngModelChange)=\"numberFilterValues.set([numberFilterValues()[0], $event])\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-numeric-text-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [ngModel]=\"dateFilterValues()[1]\"\n (ngModelChange)=\"dateFilterValues.set([dateFilterValues()[0], $event])\"\n [format]=\"dateOptions().format ?? null\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [aria-label]=\"messages().secondValue\"\n (keydown)=\"onValueKeydown($event)\"\n [disabled]=\"selectedFilterMenuDataItemList()[1]?.value | valuelessOperator\"></mona-date-picker>\n }\n }\n </div>\n}\n<div [class]=\"`${filterMenuItemClass()} ${filterMenuActionsClass()}`\">\n <button\n monaButton\n (click)=\"onFilterApply()\"\n [look]=\"'primary'\"\n [size]=\"size()\"\n [rounded]=\"rounded()\"\n [disabled]=\"applyDisabled()\">\n {{ messages().apply }}\n </button>\n <button monaButton (click)=\"onFilterClear()\" [look]=\"'default'\" [size]=\"size()\" [rounded]=\"rounded()\">\n {{ messages().clear }}\n </button>\n</div>\n", dependencies: [{ kind: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "data", "disabled", "invalid", "itemDisabled", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "value", "valueField", "valuePrimitive"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "clearButton", "disabled", "inputAttributes", "inputClass", "inputId", "inputStyle", "invalid", "maxLength", "minLength", "name", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["formatter", "maxValue", "minValue", "step", "value"], outputs: ["valueChange"] }, { kind: "component", type: DatePickerComponent, selector: "mona-date-picker", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "disabled", "disabledDates", "firstDay", "format", "inputId", "invalid", "max", "min", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "readonlyInput", "required", "rounded", "showClearButton", "size", "touched", "class", "value", "weekNumber"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "component", type: ButtonGroupComponent, selector: "mona-button-group", inputs: ["allowEmpty", "aria-label", "aria-labelledby", "disabled", "invalid", "look", "readonly", "rounded", "selection", "size", "touched", "class", "value"], outputs: ["buttonClick", "touch", "valueChange"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "pipe", type: ValuelessOperatorPipe, name: "valuelessOperator" }] }); }
711
711
  }
712
712
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FilterMenuComponent, decorators: [{
713
713
  type: Component,
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, computed, input, Directive, Component } from '@angular/core';
3
- import { G as GridService, w as gridFooterTableCellThemeVariants, x as gridFooterTableRowThemeVariants, a as GridLockedCellDirective, k as GridLogicalCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs';
3
+ import { G as GridService, w as gridFooterTableCellThemeVariants, x as gridFooterTableRowThemeVariants, a as GridLockedCellDirective, k as GridLogicalCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs';
4
4
  import { NgTemplateOutlet } from '@angular/common';
5
5
  import { ImmutableDictionary } from '@mirei/ts-collections';
6
6
 
@@ -178,4 +178,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
178
178
  }], propDecorators: { ariaLevel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLevel", required: false }] }], ariaRowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRowIndex", required: false }] }], groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }], rowIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowIndex", required: false }] }], section: [{ type: i0.Input, args: [{ isSignal: true, alias: "section", required: false }] }] } });
179
179
 
180
180
  export { GridFooterRowComponent };
181
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs.map
181
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs.map
@@ -4,11 +4,11 @@ import * as i0 from '@angular/core';
4
4
  import { computed, inject, input, Component, DestroyRef, ElementRef, viewChild, effect, untracked, afterNextRender, afterRenderEffect } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { ImmutableList } from '@mirei/ts-collections';
7
- import { G as GridService, a as GridLockedCellDirective, g as gridListBaseThemeVariants, b as gridRowDragPreviewThemeVariants, c as gridListTableThemeVariants, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BO19AVwC.mjs';
7
+ import { G as GridService, a as GridLockedCellDirective, g as gridListBaseThemeVariants, b as gridRowDragPreviewThemeVariants, c as gridListTableThemeVariants, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CEfVa7eo.mjs';
8
8
  import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
9
- import { G as GridCellDirective, a as GridAddRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-HQ1Kv6R9.mjs';
9
+ import { G as GridCellDirective, a as GridAddRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-C_kCaA5b.mjs';
10
10
  import { NgTemplateOutlet } from '@angular/common';
11
- import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-DhKLnW06.mjs';
11
+ import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-2tVhD2hK.mjs';
12
12
 
13
13
  /**
14
14
  * The expanded master-detail row below a data row. Leading layout columns get empty indent cells,
@@ -205,4 +205,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
205
205
  }], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
206
206
 
207
207
  export { GridListComponent };
208
- //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-voGbKOiB.mjs.map
208
+ //# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-BAN70Wcn.mjs.map