@nanahoshi/mona-ui 0.24.11 → 0.25.1

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 +183 -30
  6. package/fesm2022/nanahoshi-mona-ui-button.mjs +45 -9
  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 +5 -0
  10. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +112 -31
  11. package/fesm2022/nanahoshi-mona-ui-chip.mjs +130 -88
  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 +281 -111
  68. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +126 -36
  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 +2 -2
  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 +472 -84
  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 +166 -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,7 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { computed, input, Directive, Component } from '@angular/core';
2
+ import { effect, inject, ElementRef, computed, HostAttributeToken, input, afterNextRender, isDevMode, Directive, viewChild, booleanAttribute, Component } from '@angular/core';
3
+ import { createElementControlId, MONA_LABEL } from '@nanahoshi/mona-ui/internal';
3
4
  import { twMerge } from 'tailwind-merge';
4
5
  import { cva } from 'class-variance-authority';
6
+ import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
5
7
 
6
8
  const labelComponentThemeVariants = cva(`
7
9
  inline-flex
@@ -36,15 +38,47 @@ function focusLabelTarget(target, event) {
36
38
  if (event.defaultPrevented || target === null || target === undefined || typeof target === "string") {
37
39
  return;
38
40
  }
39
- target.focus();
41
+ if (target.activateFromLabel) {
42
+ target.activateFromLabel();
43
+ }
44
+ else {
45
+ target.focus();
46
+ }
47
+ }
48
+ /**
49
+ * Tells a control bound through `[for]` which element names it.
50
+ */
51
+ function linkLabelTarget(target, labelId) {
52
+ effect(onCleanup => {
53
+ const current = target();
54
+ if (current === null || current === undefined || typeof current === "string" || !current.setLabelledBy) {
55
+ return;
56
+ }
57
+ current.setLabelledBy(labelId());
58
+ onCleanup(() => current.setLabelledBy?.(null));
59
+ });
60
+ }
61
+ /**
62
+ * Warns when a string `for` points at an element a label can't control, such as the host of a mona-switch. The browser
63
+ * says nothing about this, and the control stays unnamed.
64
+ */
65
+ function warnIfTargetNotLabelable(target, label) {
66
+ if (typeof target !== "string" || label.control || !label.ownerDocument.getElementById(target)) {
67
+ return;
68
+ }
69
+ console.warn(`[Mona Label] for="${target}" points at an element a label can't control. Bind the component instead, as ` +
70
+ `[for]="ref", or use the control's inputId.`, label);
40
71
  }
41
72
 
42
73
  class LabelDirective {
74
+ #hostElementRef;
43
75
  constructor() {
76
+ this.#hostElementRef = inject(ElementRef);
44
77
  this.classes = computed(() => twMerge(labelDirectiveThemeVariants(), this.userClass()), /* @ts-ignore */
45
78
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
46
79
  this.forAttribute = computed(() => getLabelForAttribute(this.for()), /* @ts-ignore */
47
80
  ...(ngDevMode ? [{ debugName: "forAttribute" }] : /* istanbul ignore next */ []));
81
+ this.labelId = inject(new HostAttributeToken("id"), { optional: true }) ?? createElementControlId();
48
82
  /**
49
83
  * @description Associates the label with a native control ID or a target that exposes a public `focus()` method.
50
84
  * String values are reflected as the native `for` attribute. Object targets receive focus when the label is clicked.
@@ -57,12 +91,18 @@ class LabelDirective {
57
91
  * @default ""
58
92
  */
59
93
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
94
+ linkLabelTarget(() => this.for(), () => this.labelId);
95
+ afterNextRender(() => {
96
+ if (isDevMode()) {
97
+ warnIfTargetNotLabelable(this.for(), this.#hostElementRef.nativeElement);
98
+ }
99
+ });
60
100
  }
61
101
  onLabelClick(event) {
62
102
  focusLabelTarget(this.for(), event);
63
103
  }
64
104
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
65
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: LabelDirective, isStandalone: true, selector: "label[monaLabel]", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onLabelClick($event)" }, properties: { "attr.for": "forAttribute()", "class": "classes()" } }, ngImport: i0 }); }
105
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: LabelDirective, isStandalone: true, selector: "label[monaLabel]", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onLabelClick($event)" }, properties: { "attr.for": "forAttribute()", "attr.id": "labelId", "class": "classes()" } }, ngImport: i0 }); }
66
106
  }
67
107
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LabelDirective, decorators: [{
68
108
  type: Directive,
@@ -70,20 +110,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
70
110
  selector: "label[monaLabel]",
71
111
  host: {
72
112
  "[attr.for]": "forAttribute()",
113
+ "[attr.id]": "labelId",
73
114
  "[class]": "classes()",
74
115
  "(click)": "onLabelClick($event)"
75
116
  }
76
117
  }]
77
- }], propDecorators: { for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
118
+ }], ctorParameters: () => [], propDecorators: { for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
119
+
120
+ // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
121
+ // Edit the JSON file and run `npm run generate:locale-catalogs`.
122
+ const LABEL_DEFAULT_MESSAGES = {
123
+ optional: "Optional"
124
+ };
78
125
 
79
126
  class LabelComponent {
127
+ #i18n;
128
+ #wrappedControl;
80
129
  constructor() {
130
+ this.#i18n = inject(MonaI18nService);
131
+ this.#wrappedControl = null;
81
132
  this.captionClasses = labelCaptionThemeVariants();
133
+ this.captionElementId = createElementControlId();
82
134
  this.classes = computed(() => twMerge(labelComponentThemeVariants(), this.userClass()), /* @ts-ignore */
83
135
  ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
84
136
  this.forAttribute = computed(() => getLabelForAttribute(this.for()), /* @ts-ignore */
85
137
  ...(ngDevMode ? [{ debugName: "forAttribute" }] : /* istanbul ignore next */ []));
138
+ this.labelElementId = createElementControlId();
139
+ this.labelRef = viewChild.required("label", /* @ts-ignore */
140
+ ...(ngDevMode ? [{ debugName: "labelRef" }] : /* istanbul ignore next */ []));
141
+ this.messages = this.#i18n.componentMessages("label", LABEL_DEFAULT_MESSAGES);
86
142
  this.optionalClasses = labelOptionalThemeVariants();
143
+ /**
144
+ * @internal
145
+ */
146
+ this.context = {
147
+ captionId: computed(() => (this.text() || this.optional() ? this.captionElementId : null)),
148
+ register: control => {
149
+ this.#wrappedControl = control;
150
+ return () => {
151
+ this.#wrappedControl = null;
152
+ };
153
+ }
154
+ };
87
155
  /**
88
156
  * @description Associates the label with a native control ID or a target that exposes a public `focus()` method.
89
157
  * String values are reflected as the native `for` attribute. Object targets receive focus when the label is clicked.
@@ -95,13 +163,12 @@ class LabelComponent {
95
163
  * @description Whether to display optional-field text next to the caption.
96
164
  * @default false
97
165
  */
98
- this.optional = input(false, /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "optional" }] : /* istanbul ignore next */ []));
166
+ this.optional = input(false, { ...(ngDevMode ? { debugName: "optional" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
100
167
  /**
101
168
  * @description Text displayed when `optional` is enabled.
102
- * @default "Optional"
169
+ * @default the `label.optional` message
103
170
  */
104
- this.optionalText = input("Optional", /* @ts-ignore */
171
+ this.optionalText = input("", /* @ts-ignore */
105
172
  ...(ngDevMode ? [{ debugName: "optionalText" }] : /* istanbul ignore next */ []));
106
173
  /**
107
174
  * @description Visible label caption text.
@@ -114,24 +181,50 @@ class LabelComponent {
114
181
  * @default ""
115
182
  */
116
183
  this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
184
+ // Without a caption of its own, the label's whole content is what names a control it points at.
185
+ linkLabelTarget(() => this.for(), () => this.context.captionId() ?? this.labelElementId);
186
+ afterNextRender(() => {
187
+ if (isDevMode()) {
188
+ this.#warnIfMisassociated();
189
+ }
190
+ });
191
+ }
192
+ #warnIfMisassociated() {
193
+ warnIfTargetNotLabelable(this.for(), this.labelRef().nativeElement);
194
+ if (this.#wrappedControl && !this.for() && !this.context.captionId() && !this.#wrappedControl.named()) {
195
+ console.warn("[Mona Label] A wrapped control takes its name from the text input. Text projected next to it can't " +
196
+ "name it.", this.labelRef().nativeElement);
197
+ }
117
198
  }
118
199
  onLabelClick(event) {
119
- focusLabelTarget(this.for(), event);
200
+ const wrapped = this.#wrappedControl;
201
+ if (!wrapped || this.for()) {
202
+ focusLabelTarget(this.for(), event);
203
+ return;
204
+ }
205
+ if (event.defaultPrevented || (event.target instanceof Node && wrapped.element.contains(event.target))) {
206
+ return;
207
+ }
208
+ // Cancels the browser's own activation, which would otherwise pick the first native input in the control.
209
+ event.preventDefault();
210
+ wrapped.activate();
120
211
  }
121
212
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
122
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: LabelComponent, isStandalone: true, selector: "mona-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", 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 } }, host: { classAttribute: "inline-block" }, ngImport: i0, template: `
213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: LabelComponent, isStandalone: true, selector: "mona-label", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: false, transformFunction: null }, optional: { classPropertyName: "optional", publicName: "optional", isSignal: true, isRequired: false, transformFunction: null }, optionalText: { classPropertyName: "optionalText", publicName: "optionalText", 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 } }, host: { classAttribute: "inline-block" }, providers: [{ provide: MONA_LABEL, useFactory: () => inject(LabelComponent).context }], viewQueries: [{ propertyName: "labelRef", first: true, predicate: ["label"], descendants: true, isSignal: true }], ngImport: i0, template: `
123
214
  <label
215
+ #label
124
216
  [attr.for]="forAttribute()"
217
+ [attr.id]="labelElementId"
125
218
  [class]="classes()"
126
219
  [attr.data-optional]="optional() || null"
127
220
  (click)="onLabelClick($event)">
128
221
  @if (text() || optional()) {
129
- <span [class]="captionClasses">
222
+ <span [attr.id]="captionElementId" [class]="captionClasses">
130
223
  @if (text()) {
131
224
  <span>{{ text() }}</span>
132
225
  }
133
226
  @if (optional()) {
134
- <span [class]="optionalClasses">{{ optionalText() }}</span>
227
+ <span [class]="optionalClasses">{{ optionalText() || messages().optional }}</span>
135
228
  }
136
229
  </span>
137
230
  }
@@ -145,28 +238,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
145
238
  selector: "mona-label",
146
239
  template: `
147
240
  <label
241
+ #label
148
242
  [attr.for]="forAttribute()"
243
+ [attr.id]="labelElementId"
149
244
  [class]="classes()"
150
245
  [attr.data-optional]="optional() || null"
151
246
  (click)="onLabelClick($event)">
152
247
  @if (text() || optional()) {
153
- <span [class]="captionClasses">
248
+ <span [attr.id]="captionElementId" [class]="captionClasses">
154
249
  @if (text()) {
155
250
  <span>{{ text() }}</span>
156
251
  }
157
252
  @if (optional()) {
158
- <span [class]="optionalClasses">{{ optionalText() }}</span>
253
+ <span [class]="optionalClasses">{{ optionalText() || messages().optional }}</span>
159
254
  }
160
255
  </span>
161
256
  }
162
257
  <ng-content></ng-content>
163
258
  </label>
164
259
  `,
260
+ providers: [{ provide: MONA_LABEL, useFactory: () => inject(LabelComponent).context }],
165
261
  host: {
166
262
  class: "inline-block"
167
263
  }
168
264
  }]
169
- }], propDecorators: { for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
265
+ }], ctorParameters: () => [], propDecorators: { labelRef: [{ type: i0.ViewChild, args: ["label", { isSignal: true }] }], for: [{ type: i0.Input, args: [{ isSignal: true, alias: "for", required: false }] }], optional: [{ type: i0.Input, args: [{ isSignal: true, alias: "optional", required: false }] }], optionalText: [{ type: i0.Input, args: [{ isSignal: true, alias: "optionalText", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
170
266
 
171
267
  /*
172
268
  * Public API Surface of @nanahoshi/mona-ui/label
@@ -971,7 +971,7 @@ class ListBoxComponent {
971
971
  });
972
972
  }
973
973
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
974
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ListBoxComponent, isStandalone: true, selector: "mona-list-box", 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 }, connectedList: { classPropertyName: "connectedList", publicName: "connectedList", isSignal: true, isRequired: false, transformFunction: null }, disabledBy: { classPropertyName: "disabledBy", publicName: "disabledBy", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selectBy: { classPropertyName: "selectBy", publicName: "selectBy", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, singleSelectionToggleable: { classPropertyName: "singleSelectionToggleable", publicName: "singleSelectionToggleable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, toolbarAriaLabel: { classPropertyName: "toolbarAriaLabel", publicName: "toolbarAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", selectedKeysChange: "selectedKeysChange", selectionChange: "selectionChange" }, host: { listeners: { "keydown": "onHostKeydown($event)" }, properties: { "attr.aria-label": "null", "class": "baseClasses()", "style.height": "listHeight()", "style.width": "listWidth()" } }, providers: [ListService], queries: [{ propertyName: "footerTemplate", first: true, predicate: ListBoxFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ListBoxHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ListBoxItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: ListBoxNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<mona-list-view\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [items]=\"listBoxItems()\"\n [height]=\"'100%'\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [textField]=\"textField()\"\n [width]=\"'100%'\"\n [disabledBy]=\"disabledBy()\"\n [monaListViewNavigable]=\"{ enabled: true, mode: 'select' }\"\n [monaListViewSelectable]=\"selectableOptions()\"\n [selectBy]=\"selectBy()\"\n [selectedKeys]=\"selectedKeys()\"\n (selectedKeysChange)=\"onSelectedKeysChange()\">\n @if (footerTemplate()) {\n <ng-template monaListViewFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListViewHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListViewItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListViewNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n</mona-list-view>\n\n@let buttons = toolbarButtons();\n@if (buttons.length > 0) {\n @let tabStop = toolbarTabStop();\n <div\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\"\n [attr.aria-orientation]=\"toolbarOrientation()\"\n [class]=\"toolbarClasses()\"\n (focusin)=\"onToolbarFocusIn($event)\"\n (keydown)=\"onToolbarKeydown($event)\">\n @for (button of buttons; track button.action) {\n <button\n monaButton\n type=\"button\"\n [attr.data-action]=\"button.action\"\n (click)=\"onActionClick(button.action, $event)\"\n [iconOnly]=\"true\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [title]=\"button.label\"\n [attr.aria-label]=\"button.label\"\n [disabled]=\"!button.enabled\"\n [tabindex]=\"tabStop === button.action ? 0 : -1\">\n @switch (button.action) {\n @case (\"moveUp\") {\n <svg lucideChevronUp [size]=\"16\"></svg>\n }\n @case (\"moveDown\") {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n @case (\"transferFrom\") {\n <svg lucideChevronLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferTo\") {\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferAllFrom\") {\n <svg lucideChevronsLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferAllTo\") {\n <svg lucideChevronsRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"clear\") {\n <svg lucideX [size]=\"16\"></svg>\n }\n @case (\"remove\") {\n <svg lucideTrash2 [size]=\"14\"></svg>\n }\n }\n </button>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: ListViewComponent, selector: "mona-list-view", inputs: ["aria-label", "aria-labelledby", "disabledBy", "height", "items", "listClass", "listItemClass", "listItemStyle", "listStyle", "loading", "maxHeight", "maxWidth", "pagerAriaLabel", "rounded", "size", "textField", "class", "width"], outputs: ["itemActivate", "scrollBottom"] }, { kind: "directive", type: ListViewSelectableDirective, selector: "mona-list-view[monaListViewSelectable]", inputs: ["monaListViewSelectable", "selectBy", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "directive", type: ListViewItemTemplateDirective, selector: "ng-template[monaListViewItemTemplate]", inputs: ["monaListViewItemTemplateOf"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "directive", type: ListViewNavigableDirective, selector: "mona-list-view[monaListViewNavigable]", inputs: ["monaListViewNavigable"] }, { kind: "directive", type: ListViewNoDataTemplateDirective, selector: "ng-template[monaListViewNoDataTemplate]" }, { kind: "directive", type: ListViewFooterTemplateDirective, selector: "ng-template[monaListViewFooterTemplate]" }, { kind: "directive", type: ListViewHeaderTemplateDirective, selector: "ng-template[monaListViewHeaderTemplate]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucideTrash2, selector: "svg[lucideTrash2]" }], viewProviders: [{ provide: LIST_VIEW_HOST_LIST_SERVICE, useExisting: ListService }] }); }
974
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ListBoxComponent, isStandalone: true, selector: "mona-list-box", 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 }, connectedList: { classPropertyName: "connectedList", publicName: "connectedList", isSignal: true, isRequired: false, transformFunction: null }, disabledBy: { classPropertyName: "disabledBy", publicName: "disabledBy", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selectBy: { classPropertyName: "selectBy", publicName: "selectBy", isSignal: true, isRequired: false, transformFunction: null }, selectedKeys: { classPropertyName: "selectedKeys", publicName: "selectedKeys", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, singleSelectionToggleable: { classPropertyName: "singleSelectionToggleable", publicName: "singleSelectionToggleable", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, toolbar: { classPropertyName: "toolbar", publicName: "toolbar", isSignal: true, isRequired: false, transformFunction: null }, toolbarAriaLabel: { classPropertyName: "toolbarAriaLabel", publicName: "toolbarAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionClick: "actionClick", selectedKeysChange: "selectedKeysChange", selectionChange: "selectionChange" }, host: { listeners: { "keydown": "onHostKeydown($event)" }, properties: { "attr.aria-label": "null", "class": "baseClasses()", "style.height": "listHeight()", "style.width": "listWidth()" } }, providers: [ListService], queries: [{ propertyName: "footerTemplate", first: true, predicate: ListBoxFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: ListBoxHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: ListBoxItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: ListBoxNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<mona-list-view\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [items]=\"listBoxItems()\"\n [height]=\"'100%'\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [textField]=\"textField()\"\n [width]=\"'100%'\"\n [disabledBy]=\"disabledBy()\"\n [monaListViewNavigable]=\"{ enabled: true, mode: 'select' }\"\n [monaListViewSelectable]=\"selectableOptions()\"\n [selectBy]=\"selectBy()\"\n [selectedKeys]=\"selectedKeys()\"\n (selectedKeysChange)=\"onSelectedKeysChange()\">\n @if (footerTemplate()) {\n <ng-template monaListViewFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListViewHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListViewItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListViewNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n</mona-list-view>\n\n@let buttons = toolbarButtons();\n@if (buttons.length > 0) {\n @let tabStop = toolbarTabStop();\n <div\n role=\"toolbar\"\n [attr.aria-label]=\"toolbarLabel()\"\n [attr.aria-orientation]=\"toolbarOrientation()\"\n [class]=\"toolbarClasses()\"\n (focusin)=\"onToolbarFocusIn($event)\"\n (keydown)=\"onToolbarKeydown($event)\">\n @for (button of buttons; track button.action) {\n <button\n monaButton\n type=\"button\"\n [attr.data-action]=\"button.action\"\n (click)=\"onActionClick(button.action, $event)\"\n [iconOnly]=\"true\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [title]=\"button.label\"\n [attr.aria-label]=\"button.label\"\n [disabled]=\"!button.enabled\"\n [tabindex]=\"tabStop === button.action ? 0 : -1\">\n @switch (button.action) {\n @case (\"moveUp\") {\n <svg lucideChevronUp [size]=\"16\"></svg>\n }\n @case (\"moveDown\") {\n <svg lucideChevronDown [size]=\"16\"></svg>\n }\n @case (\"transferFrom\") {\n <svg lucideChevronLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferTo\") {\n <svg lucideChevronRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferAllFrom\") {\n <svg lucideChevronsLeft [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"transferAllTo\") {\n <svg lucideChevronsRight [size]=\"16\" class=\"rtl:rotate-180\"></svg>\n }\n @case (\"clear\") {\n <svg lucideX [size]=\"16\"></svg>\n }\n @case (\"remove\") {\n <svg lucideTrash2 [size]=\"14\"></svg>\n }\n }\n </button>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: ListViewComponent, selector: "mona-list-view", inputs: ["aria-label", "aria-labelledby", "disabledBy", "height", "items", "listClass", "listItemClass", "listItemStyle", "listStyle", "loading", "maxHeight", "maxWidth", "pagerAriaLabel", "rounded", "size", "textField", "class", "width"], outputs: ["itemActivate", "scrollBottom"] }, { kind: "directive", type: ListViewSelectableDirective, selector: "mona-list-view[monaListViewSelectable]", inputs: ["monaListViewSelectable", "selectBy", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "directive", type: ListViewItemTemplateDirective, selector: "ng-template[monaListViewItemTemplate]", inputs: ["monaListViewItemTemplateOf"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "directive", type: ListViewNavigableDirective, selector: "mona-list-view[monaListViewNavigable]", inputs: ["monaListViewNavigable"] }, { kind: "directive", type: ListViewNoDataTemplateDirective, selector: "ng-template[monaListViewNoDataTemplate]" }, { kind: "directive", type: ListViewFooterTemplateDirective, selector: "ng-template[monaListViewFooterTemplate]" }, { kind: "directive", type: ListViewHeaderTemplateDirective, selector: "ng-template[monaListViewHeaderTemplate]" }, { kind: "component", type: LucideChevronUp, selector: "svg[lucideChevronUp]" }, { kind: "component", type: LucideChevronDown, selector: "svg[lucideChevronDown]" }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideChevronsLeft, selector: "svg[lucideChevronsLeft]" }, { kind: "component", type: LucideChevronsRight, selector: "svg[lucideChevronsRight]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucideTrash2, selector: "svg[lucideTrash2]" }], viewProviders: [{ provide: LIST_VIEW_HOST_LIST_SERVICE, useExisting: ListService }] }); }
975
975
  }
976
976
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ListBoxComponent, decorators: [{
977
977
  type: Component,
@@ -91,7 +91,7 @@ const listViewBaseThemeVariants = cva(`
91
91
  flex h-full flex-col overflow-hidden
92
92
  bg-surface text-foreground
93
93
  border border-border
94
- outline-none
94
+ outline-none focus-visible:outline-hidden
95
95
  `, {
96
96
  variants: {
97
97
  rounded: {
@@ -14,7 +14,8 @@ const AR_SA_MESSAGES = {
14
14
  clear: "مسح"
15
15
  },
16
16
  breadcrumb: {
17
- breadcrumb: "مسار التنقل"
17
+ breadcrumb: "مسار التنقل",
18
+ showFullPath: "إظهار المسار الكامل"
18
19
  },
19
20
  buttonGroup: {
20
21
  buttonGroup: "مجموعة أزرار"
@@ -149,27 +150,41 @@ const AR_SA_MESSAGES = {
149
150
  removeLabel: (label) => (label ? `حذف ${label}` : "حذف العنصر")
150
151
  },
151
152
  colorGradient: {
153
+ alpha: "قناة ألفا",
154
+ alphaText: (opacity) => `العتامة ${localizeNumber(opacity)}٪`,
152
155
  apply: "تطبيق",
156
+ blue: "الأزرق",
153
157
  cancel: "إلغاء",
154
158
  clearColor: "مسح اللون",
159
+ colorCopied: "تم نسخ اللون",
160
+ colorGradient: "تدرج الألوان",
155
161
  copyAsHex: "نسخ بصيغة HEX",
156
162
  copyAsRgb: "نسخ بصيغة RGB",
157
163
  copyColor: "نسخ اللون",
164
+ copyFailed: "تعذر نسخ اللون",
158
165
  currentColor: "اللون الحالي",
166
+ green: "الأخضر",
167
+ hexColor: "اللون بالنظام الست عشري",
168
+ hue: "درجة اللون",
159
169
  previousColor: "اللون السابق",
170
+ red: "الأحمر",
171
+ saturation: "التشبع",
160
172
  saturationAndValue: "التشبع والقيمة",
161
173
  saturationAndValueText: (saturation, value) => `التشبع ${localizeNumber(saturation)}٪، القيمة ${localizeNumber(value)}٪`,
162
- switchColorMode: "تبديل وضع اللون"
174
+ switchColorMode: "تبديل وضع اللون",
175
+ value: "القيمة"
163
176
  },
164
177
  colorPalette: {
165
178
  color: (color) => `اللون: ${color}`,
166
- colorPalette: "لوحة الألوان"
179
+ colorPalette: "لوحة الألوان",
180
+ namedColor: (name, color) => `${name}، ${color}`
167
181
  },
168
182
  colorPicker: {
169
183
  clearColor: "مسح اللون",
170
184
  colorGradientPicker: "منتقي تدرج الألوان",
171
185
  colorPalettePicker: "منتقي لوحة الألوان",
172
- colorPicker: "منتقي الألوان"
186
+ colorPicker: "منتقي الألوان",
187
+ noColor: "بلا لون"
173
188
  },
174
189
  comboBox: {
175
190
  clear: "مسح"
@@ -359,6 +374,9 @@ const AR_SA_MESSAGES = {
359
374
  sortOrder: (position) => `ترتيب الفرز ${localizeNumber(position)}`,
360
375
  toolbar: "شريط أدوات الجدول"
361
376
  },
377
+ label: {
378
+ optional: "اختياري"
379
+ },
362
380
  list: {
363
381
  filterList: "تصفية القائمة",
364
382
  loading: "جارٍ التحميل",
@@ -424,6 +442,9 @@ const AR_SA_MESSAGES = {
424
442
  previousPageLabel: "الصفحة السابقة",
425
443
  rangeStatus: (start, end, total) => `${localizeNumber(start)}–${localizeNumber(end)} من ${localizeNumber(total)}`
426
444
  },
445
+ progressBar: {
446
+ label: "التقدم"
447
+ },
427
448
  rating: {
428
449
  notRated: "غير مقيّم",
429
450
  valueText: (value, max) => `${localizeNumber(value)} من ${localizeNumber(max)}`
@@ -433,6 +454,7 @@ const AR_SA_MESSAGES = {
433
454
  nextPage: "الصفحة التالية",
434
455
  page: (current) => `الصفحة ${localizeNumber(current)}`,
435
456
  pageOf: (current, total) => `الصفحة ${localizeNumber(current)} من ${localizeNumber(total)}`,
457
+ pages: "الصفحات",
436
458
  previousPage: "الصفحة السابقة",
437
459
  scrollPagerNext: "تمرير مؤشر الصفحات إلى التالي",
438
460
  scrollPagerPrevious: "تمرير مؤشر الصفحات إلى السابق",
@@ -441,6 +463,10 @@ const AR_SA_MESSAGES = {
441
463
  sheet: {
442
464
  closeSheet: "إغلاق اللوحة"
443
465
  },
466
+ sidebar: {
467
+ drawerLabel: "الشريط الجانبي",
468
+ rail: "إظهار الشريط الجانبي أو إخفاؤه"
469
+ },
444
470
  slider: {
445
471
  maximumValue: "الحد الأقصى",
446
472
  minimumValue: "الحد الأدنى",
@@ -463,6 +489,9 @@ const AR_SA_MESSAGES = {
463
489
  resizer: "مقبض تغيير الحجم"
464
490
  },
465
491
  stepper: {
492
+ stepCompleted: "مكتملة",
493
+ stepInvalid: "بها أخطاء",
494
+ stepPosition: (current, total) => `الخطوة ${localizeNumber(current)} من ${localizeNumber(total)}`,
466
495
  stepProgress: "تقدم الخطوات",
467
496
  stepper: "مؤشر الخطوات"
468
497
  },
@@ -14,7 +14,8 @@ const DE_DE_MESSAGES = {
14
14
  clear: "Leeren"
15
15
  },
16
16
  breadcrumb: {
17
- breadcrumb: "Breadcrumb-Navigation"
17
+ breadcrumb: "Breadcrumb-Navigation",
18
+ showFullPath: "Vollständigen Pfad anzeigen"
18
19
  },
19
20
  buttonGroup: {
20
21
  buttonGroup: "Schaltflächengruppe"
@@ -137,27 +138,41 @@ const DE_DE_MESSAGES = {
137
138
  removeLabel: (label) => (label ? `${label} entfernen` : "Element entfernen")
138
139
  },
139
140
  colorGradient: {
141
+ alpha: "Alphakanal",
142
+ alphaText: (opacity) => `Deckkraft ${localizeNumber(opacity)} %`,
140
143
  apply: "Anwenden",
144
+ blue: "Blau",
141
145
  cancel: "Abbrechen",
142
146
  clearColor: "Farbe leeren",
147
+ colorCopied: "Farbe kopiert",
148
+ colorGradient: "Farbverlauf",
143
149
  copyAsHex: "Als HEX kopieren",
144
150
  copyAsRgb: "Als RGB kopieren",
145
151
  copyColor: "Farbe kopieren",
152
+ copyFailed: "Farbe konnte nicht kopiert werden",
146
153
  currentColor: "Aktuelle Farbe",
154
+ green: "Grün",
155
+ hexColor: "Hex-Farbe",
156
+ hue: "Farbton",
147
157
  previousColor: "Vorherige Farbe",
158
+ red: "Rot",
159
+ saturation: "Sättigung",
148
160
  saturationAndValue: "Sättigung und Helligkeit",
149
161
  saturationAndValueText: (saturation, value) => `Sättigung ${localizeNumber(saturation)} %, Helligkeit ${localizeNumber(value)} %`,
150
- switchColorMode: "Farbmodus wechseln"
162
+ switchColorMode: "Farbmodus wechseln",
163
+ value: "Helligkeit"
151
164
  },
152
165
  colorPalette: {
153
166
  color: (color) => `Farbe ${color}`,
154
- colorPalette: "Farbpalette"
167
+ colorPalette: "Farbpalette",
168
+ namedColor: (name, color) => `${name}, ${color}`
155
169
  },
156
170
  colorPicker: {
157
171
  clearColor: "Farbe leeren",
158
172
  colorGradientPicker: "Farbverlaufsauswahl",
159
173
  colorPalettePicker: "Farbpalettenauswahl",
160
- colorPicker: "Farbauswahl"
174
+ colorPicker: "Farbauswahl",
175
+ noColor: "Keine Farbe"
161
176
  },
162
177
  comboBox: {
163
178
  clear: "Leeren"
@@ -347,6 +362,9 @@ const DE_DE_MESSAGES = {
347
362
  sortOrder: (position) => `Sortierreihenfolge ${localizeNumber(position)}`,
348
363
  toolbar: "Tabellen-Symbolleiste"
349
364
  },
365
+ label: {
366
+ optional: "Optional"
367
+ },
350
368
  list: {
351
369
  filterList: "Liste filtern",
352
370
  loading: "Wird geladen",
@@ -420,6 +438,9 @@ const DE_DE_MESSAGES = {
420
438
  ? `${localizeNumber(start)}–${localizeNumber(end)} von ${localizeNumber(total)} Element`
421
439
  : `${localizeNumber(start)}–${localizeNumber(end)} von ${localizeNumber(total)} Elementen`
422
440
  },
441
+ progressBar: {
442
+ label: "Fortschritt"
443
+ },
423
444
  rating: {
424
445
  notRated: "Nicht bewertet",
425
446
  valueText: (value, max) => `${localizeNumber(value)} von ${localizeNumber(max)}`
@@ -429,6 +450,7 @@ const DE_DE_MESSAGES = {
429
450
  nextPage: "Nächste Seite",
430
451
  page: (current) => `Seite ${localizeNumber(current)}`,
431
452
  pageOf: (current, total) => `Seite ${localizeNumber(current)} von ${localizeNumber(total)}`,
453
+ pages: "Seiten",
432
454
  previousPage: "Vorherige Seite",
433
455
  scrollPagerNext: "Seitennavigation vorwärts scrollen",
434
456
  scrollPagerPrevious: "Seitennavigation rückwärts scrollen",
@@ -437,6 +459,10 @@ const DE_DE_MESSAGES = {
437
459
  sheet: {
438
460
  closeSheet: "Bereich schließen"
439
461
  },
462
+ sidebar: {
463
+ drawerLabel: "Seitenleiste",
464
+ rail: "Seitenleiste ein- oder ausblenden"
465
+ },
440
466
  slider: {
441
467
  maximumValue: "Maximalwert",
442
468
  minimumValue: "Minimalwert",
@@ -459,6 +485,9 @@ const DE_DE_MESSAGES = {
459
485
  resizer: "Trennleiste"
460
486
  },
461
487
  stepper: {
488
+ stepCompleted: "Abgeschlossen",
489
+ stepInvalid: "Enthält Fehler",
490
+ stepPosition: (current, total) => `Schritt ${localizeNumber(current)} von ${localizeNumber(total)}`,
462
491
  stepProgress: "Schrittfortschritt",
463
492
  stepper: "Schrittanzeige"
464
493
  },
@@ -14,7 +14,8 @@ const ES_ES_MESSAGES = {
14
14
  clear: "Limpiar"
15
15
  },
16
16
  breadcrumb: {
17
- breadcrumb: "Ruta de navegación"
17
+ breadcrumb: "Ruta de navegación",
18
+ showFullPath: "Mostrar la ruta completa"
18
19
  },
19
20
  buttonGroup: {
20
21
  buttonGroup: "Grupo de botones"
@@ -137,27 +138,41 @@ const ES_ES_MESSAGES = {
137
138
  removeLabel: (label) => (label ? `Quitar ${label}` : "Quitar elemento")
138
139
  },
139
140
  colorGradient: {
141
+ alpha: "Canal alfa",
142
+ alphaText: (opacity) => `Opacidad ${localizeNumber(opacity)}%`,
140
143
  apply: "Aplicar",
144
+ blue: "Azul",
141
145
  cancel: "Cancelar",
142
146
  clearColor: "Limpiar color",
147
+ colorCopied: "Color copiado",
148
+ colorGradient: "Degradado de color",
143
149
  copyAsHex: "Copiar como HEX",
144
150
  copyAsRgb: "Copiar como RGB",
145
151
  copyColor: "Copiar color",
152
+ copyFailed: "No se pudo copiar el color",
146
153
  currentColor: "Color actual",
154
+ green: "Verde",
155
+ hexColor: "Color hexadecimal",
156
+ hue: "Tono",
147
157
  previousColor: "Color anterior",
158
+ red: "Rojo",
159
+ saturation: "Saturación",
148
160
  saturationAndValue: "Saturación y valor del color",
149
161
  saturationAndValueText: (saturation, value) => `Saturación ${localizeNumber(saturation)}%, valor ${localizeNumber(value)}%`,
150
- switchColorMode: "Cambiar modo de color"
162
+ switchColorMode: "Cambiar modo de color",
163
+ value: "Valor"
151
164
  },
152
165
  colorPalette: {
153
166
  color: (color) => `Color ${color}`,
154
- colorPalette: "Paleta de colores"
167
+ colorPalette: "Paleta de colores",
168
+ namedColor: (name, color) => `${name}, ${color}`
155
169
  },
156
170
  colorPicker: {
157
171
  clearColor: "Limpiar color",
158
172
  colorGradientPicker: "Selector de color por degradado",
159
173
  colorPalettePicker: "Selector de color por paleta",
160
- colorPicker: "Selector de color"
174
+ colorPicker: "Selector de color",
175
+ noColor: "Sin color"
161
176
  },
162
177
  comboBox: {
163
178
  clear: "Limpiar"
@@ -347,6 +362,9 @@ const ES_ES_MESSAGES = {
347
362
  sortOrder: (position) => `Orden de clasificación ${localizeNumber(position)}`,
348
363
  toolbar: "Barra de herramientas de la tabla"
349
364
  },
365
+ label: {
366
+ optional: "Opcional"
367
+ },
350
368
  list: {
351
369
  filterList: "Filtrar lista",
352
370
  loading: "Cargando",
@@ -420,6 +438,9 @@ const ES_ES_MESSAGES = {
420
438
  ? `${localizeNumber(start)} - ${localizeNumber(end)} de ${localizeNumber(total)} elemento`
421
439
  : `${localizeNumber(start)} - ${localizeNumber(end)} de ${localizeNumber(total)} elementos`
422
440
  },
441
+ progressBar: {
442
+ label: "Progreso"
443
+ },
423
444
  rating: {
424
445
  notRated: "Sin valoración",
425
446
  valueText: (value, max) => `${localizeNumber(value)} de ${localizeNumber(max)}`
@@ -429,6 +450,7 @@ const ES_ES_MESSAGES = {
429
450
  nextPage: "Página siguiente",
430
451
  page: (current) => `Página ${localizeNumber(current)}`,
431
452
  pageOf: (current, total) => `Página ${localizeNumber(current)} de ${localizeNumber(total)}`,
453
+ pages: "Páginas",
432
454
  previousPage: "Página anterior",
433
455
  scrollPagerNext: "Desplazar la paginación hacia delante",
434
456
  scrollPagerPrevious: "Desplazar la paginación hacia atrás",
@@ -437,6 +459,10 @@ const ES_ES_MESSAGES = {
437
459
  sheet: {
438
460
  closeSheet: "Cerrar panel"
439
461
  },
462
+ sidebar: {
463
+ drawerLabel: "Barra lateral",
464
+ rail: "Mostrar u ocultar la barra lateral"
465
+ },
440
466
  slider: {
441
467
  maximumValue: "Valor máximo",
442
468
  minimumValue: "Valor mínimo",
@@ -459,6 +485,9 @@ const ES_ES_MESSAGES = {
459
485
  resizer: "Separador de paneles"
460
486
  },
461
487
  stepper: {
488
+ stepCompleted: "Completado",
489
+ stepInvalid: "Tiene errores",
490
+ stepPosition: (current, total) => `Paso ${localizeNumber(current)} de ${localizeNumber(total)}`,
462
491
  stepProgress: "Progreso del paso",
463
492
  stepper: "Progreso"
464
493
  },