@nanahoshi/mona-ui 0.27.2 → 0.28.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 (208) hide show
  1. package/docs/api/chart.md +2 -2
  2. package/docs/api/popup.md +1 -1
  3. package/docs/api/theme.md +2 -2
  4. package/docs/chart.md +14 -0
  5. package/docs/editor.md +2 -0
  6. package/docs/installation.md +147 -15
  7. package/docs/introduction.md +37 -15
  8. package/docs/theming-built-in-themes.md +67 -0
  9. package/docs/theming-custom-colors.md +274 -0
  10. package/docs/theming-custom-themes.md +168 -0
  11. package/docs/theming.md +164 -248
  12. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
  13. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
  14. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
  15. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
  16. package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
  17. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
  18. package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
  19. package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
  20. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
  21. package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
  22. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
  23. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
  24. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
  25. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
  26. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
  27. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
  28. package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
  29. package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
  30. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
  31. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
  32. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
  33. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
  34. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
  35. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
  36. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
  37. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
  38. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
  39. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
  40. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
  41. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
  42. package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
  43. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
  44. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
  45. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
  46. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
  47. package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
  48. package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
  49. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
  50. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
  51. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
  52. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
  53. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
  54. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
  55. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
  56. package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
  57. package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
  60. package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
  61. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
  62. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
  63. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
  64. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
  65. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
  66. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
  67. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
  68. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
  69. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
  70. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
  71. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
  72. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
  73. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
  74. package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
  75. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
  76. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
  77. package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
  78. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
  79. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
  80. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
  81. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
  82. package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
  83. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
  84. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
  85. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
  86. package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
  87. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
  88. package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
  89. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
  90. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
  91. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
  92. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
  93. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
  94. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
  95. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
  96. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
  97. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
  98. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
  99. package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
  100. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
  101. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
  102. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
  103. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
  104. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
  105. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
  106. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
  107. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
  108. package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
  109. package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
  110. package/llms.txt +6 -2
  111. package/package.json +62 -23
  112. package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
  113. package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
  114. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
  115. package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
  116. package/types/nanahoshi-mona-ui-button.d.ts +227 -166
  117. package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
  118. package/types/nanahoshi-mona-ui-card.d.ts +125 -111
  119. package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
  120. package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
  121. package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
  122. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
  123. package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
  124. package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
  125. package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
  126. package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
  127. package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
  128. package/types/nanahoshi-mona-ui-command.d.ts +279 -191
  129. package/types/nanahoshi-mona-ui-common.d.ts +354 -385
  130. package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
  131. package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
  132. package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
  133. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
  134. package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
  135. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
  136. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
  137. package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
  138. package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
  139. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
  140. package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
  141. package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
  142. package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
  143. package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
  144. package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
  145. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
  147. package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
  148. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
  149. package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
  150. package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
  151. package/types/nanahoshi-mona-ui-label.d.ts +108 -78
  152. package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
  153. package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
  154. package/types/nanahoshi-mona-ui-list.d.ts +2 -1
  155. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
  156. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
  157. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
  158. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
  159. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
  160. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
  161. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
  162. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
  163. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
  164. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
  165. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
  166. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
  167. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
  168. package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
  169. package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
  170. package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
  171. package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
  172. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
  173. package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
  174. package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
  175. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
  176. package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
  177. package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
  178. package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
  179. package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
  180. package/types/nanahoshi-mona-ui-query.d.ts +82 -88
  181. package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
  182. package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
  183. package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
  184. package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
  185. package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
  186. package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
  187. package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
  188. package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
  189. package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
  190. package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
  191. package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
  192. package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
  193. package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
  194. package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
  195. package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
  196. package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
  197. package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
  198. package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
  199. package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
  200. package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
  201. package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
  202. package/types/nanahoshi-mona-ui-window.d.ts +494 -399
  203. package/types/nanahoshi-mona-ui.d.ts +1 -2
  204. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
  205. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
  206. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
  207. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
  208. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
@@ -1,37 +1,22 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { computed, input, Directive, InjectionToken, inject, ElementRef, booleanAttribute, output, contentChild, viewChild, TemplateRef, forwardRef, Component, Injector, linkedSignal, contentChildren, afterNextRender } from '@angular/core';
4
- import { LucideChevronRight, LucideEllipsis } from '@lucide/angular';
5
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
6
- import { twMerge } from 'tailwind-merge';
7
- import { cva } from 'class-variance-authority';
8
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
- import { fromEvent } from 'rxjs';
10
-
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, ElementRef, InjectionToken, Injector, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, forwardRef, inject, input, linkedSignal, output, viewChild } from "@angular/core";
4
+ import { LucideChevronRight, LucideEllipsis } from "@lucide/angular";
5
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
6
+ import { twMerge } from "tailwind-merge";
7
+ import { cva } from "class-variance-authority";
8
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
9
+ import { fromEvent } from "rxjs";
11
10
  const breadcrumbListThemeVariants = cva(`
12
11
  flex list-none items-center gap-1 overflow-hidden px-2 py-1
13
- `, {
14
- variants: {
15
- disabled: {
16
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
17
- false: ""
18
- }
19
- }
20
- });
21
- /**
22
- * `min-w-0`, or a flex item never gets narrower than its text, and nothing inside it ever truncates. The other items
23
- * shrink faster than the current page, so it's the one that stays readable. The current page keeps a factor of 1 rather
24
- * than a fraction, because flexbox only takes that fraction of the overflow once it's the last item left to shrink.
25
- */
26
- const breadcrumbListItemWrapperThemeVariants = cva(`flex min-w-0 items-center`, {
27
- variants: {
28
- current: {
29
- true: "",
30
- false: "shrink-[10]"
31
- }
32
- }
33
- });
34
- /** Inset focus, because the list clips anything outside it. */
12
+ `, { variants: { disabled: {
13
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
14
+ false: ""
15
+ } } });
16
+ const breadcrumbListItemWrapperThemeVariants = cva(`flex min-w-0 items-center`, { variants: { current: {
17
+ true: "",
18
+ false: "shrink-[10]"
19
+ } } });
35
20
  const breadcrumbListItemThemeVariants = cva(`
36
21
  flex h-full max-w-full min-w-0 items-center px-1
37
22
  cursor-pointer
@@ -39,358 +24,660 @@ const breadcrumbListItemThemeVariants = cva(`
39
24
  transition-colors duration-100 ease-in-out
40
25
  focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-indicator
41
26
  `, {
42
- variants: {
43
- disabled: {
44
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
45
- false: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
46
- }
47
- },
48
- defaultVariants: {
49
- disabled: false
50
- }
27
+ variants: { disabled: {
28
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
29
+ false: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
30
+ } },
31
+ defaultVariants: { disabled: false }
51
32
  });
52
- /** Text in a flex item only truncates from a block of its own, and an icon beside it has to stay on the same line. */
53
33
  const breadcrumbItemContentThemeVariants = cva(`min-w-0 truncate [&_svg]:inline`);
54
34
  const breadcrumbLinkThemeVariants = cva(`
55
35
  block max-w-full min-w-0 truncate rounded-sm px-1 [&_svg]:inline
56
36
  transition-colors duration-100 ease-in-out
57
37
  focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-indicator
58
38
  `, {
59
- variants: {
60
- current: {
61
- true: "font-medium text-foreground",
62
- false: ""
63
- },
64
- disabled: {
65
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
66
- false: ""
67
- }
68
- },
69
- compoundVariants: [
70
- {
71
- current: false,
72
- disabled: false,
73
- class: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
74
- }
75
- ],
76
- defaultVariants: {
77
- current: false,
78
- disabled: false
79
- }
39
+ variants: {
40
+ current: {
41
+ true: "font-medium text-foreground",
42
+ false: ""
43
+ },
44
+ disabled: {
45
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
46
+ false: ""
47
+ }
48
+ },
49
+ compoundVariants: [{
50
+ current: false,
51
+ disabled: false,
52
+ class: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
53
+ }],
54
+ defaultVariants: {
55
+ current: false,
56
+ disabled: false
57
+ }
80
58
  });
81
59
  const breadcrumbCurrentItemThemeVariants = cva(`block min-w-0 cursor-default truncate font-medium text-foreground [&_svg]:inline`);
82
-
83
- class BreadcrumbItemDirective {
84
- constructor() {
85
- this.baseClass = computed(() => {
86
- const disabled = this.disabled();
87
- const userClass = this.userClass();
88
- return twMerge(breadcrumbListItemThemeVariants({ disabled }), userClass);
89
- }, /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
91
- /**
92
- * @description Renders this item with reduced visual emphasis and removes pointer interaction.
93
- * @default false
94
- */
95
- this.disabled = input(false, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
97
- /**
98
- * @description Additional CSS classes merged onto the breadcrumb item via `tailwind-merge`.
99
- * @default ""
100
- */
101
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
102
- }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
104
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: BreadcrumbItemDirective, isStandalone: true, selector: "button[monaBreadcrumbItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "disabled": "disabled()" } }, ngImport: i0 }); }
105
- }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemDirective, decorators: [{
107
- type: Directive,
108
- args: [{
109
- selector: "button[monaBreadcrumbItem]",
110
- host: {
111
- "[class]": "baseClass()",
112
- "[disabled]": "disabled()"
113
- }
114
- }]
115
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
116
-
117
- /**
118
- * Apply to an `<ng-template>` directly inside `<mona-breadcrumb>` to replace the default `ChevronRight` separator. One
119
- * directive per breadcrumb — the first match is used.
120
- */
121
- class BreadcrumbSeparatorTemplateDirective {
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbSeparatorTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
123
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: BreadcrumbSeparatorTemplateDirective, isStandalone: true, selector: "ng-template[monaBreadcrumbSeparatorTemplate]", ngImport: i0 }); }
124
- }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbSeparatorTemplateDirective, decorators: [{
126
- type: Directive,
127
- args: [{
128
- selector: "ng-template[monaBreadcrumbSeparatorTemplate]"
129
- }]
130
- }] });
131
-
132
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
133
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
60
+ var BreadcrumbItemDirective = class BreadcrumbItemDirective {
61
+ constructor() {
62
+ this.baseClass = computed(() => {
63
+ const disabled = this.disabled();
64
+ const userClass = this.userClass();
65
+ return twMerge(breadcrumbListItemThemeVariants({ disabled }), userClass);
66
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
67
+ this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
68
+ this.userClass = input("", {
69
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
70
+ alias: "class"
71
+ });
72
+ }
73
+ static {
74
+ this.ɵfac = i0.ɵɵngDeclareFactory({
75
+ minVersion: "12.0.0",
76
+ version: "22.2.6",
77
+ ngImport: i0,
78
+ type: BreadcrumbItemDirective,
79
+ deps: [],
80
+ target: i0.ɵɵFactoryTarget.Directive
81
+ });
82
+ }
83
+ static {
84
+ this.ɵdir = i0.ɵɵngDeclareDirective({
85
+ minVersion: "17.1.0",
86
+ version: "22.2.6",
87
+ type: BreadcrumbItemDirective,
88
+ isStandalone: true,
89
+ selector: "button[monaBreadcrumbItem]",
90
+ inputs: {
91
+ disabled: {
92
+ classPropertyName: "disabled",
93
+ publicName: "disabled",
94
+ isSignal: true,
95
+ isRequired: false,
96
+ transformFunction: null
97
+ },
98
+ userClass: {
99
+ classPropertyName: "userClass",
100
+ publicName: "class",
101
+ isSignal: true,
102
+ isRequired: false,
103
+ transformFunction: null
104
+ }
105
+ },
106
+ host: { properties: {
107
+ "class": "baseClass()",
108
+ "disabled": "disabled()"
109
+ } },
110
+ ngImport: i0
111
+ });
112
+ }
113
+ };
114
+ i0.ɵɵngDeclareClassMetadata({
115
+ minVersion: "12.0.0",
116
+ version: "22.2.6",
117
+ ngImport: i0,
118
+ type: BreadcrumbItemDirective,
119
+ decorators: [{
120
+ type: Directive,
121
+ args: [{
122
+ selector: "button[monaBreadcrumbItem]",
123
+ host: {
124
+ "[class]": "baseClass()",
125
+ "[disabled]": "disabled()"
126
+ }
127
+ }]
128
+ }],
129
+ propDecorators: {
130
+ disabled: [{
131
+ type: i0.Input,
132
+ args: [{
133
+ isSignal: true,
134
+ alias: "disabled",
135
+ required: false
136
+ }]
137
+ }],
138
+ userClass: [{
139
+ type: i0.Input,
140
+ args: [{
141
+ isSignal: true,
142
+ alias: "class",
143
+ required: false
144
+ }]
145
+ }]
146
+ }
147
+ });
148
+ var BreadcrumbSeparatorTemplateDirective = class BreadcrumbSeparatorTemplateDirective {
149
+ static {
150
+ this.ɵfac = i0.ɵɵngDeclareFactory({
151
+ minVersion: "12.0.0",
152
+ version: "22.2.6",
153
+ ngImport: i0,
154
+ type: BreadcrumbSeparatorTemplateDirective,
155
+ deps: [],
156
+ target: i0.ɵɵFactoryTarget.Directive
157
+ });
158
+ }
159
+ static {
160
+ this.ɵdir = i0.ɵɵngDeclareDirective({
161
+ minVersion: "14.0.0",
162
+ version: "22.2.6",
163
+ type: BreadcrumbSeparatorTemplateDirective,
164
+ isStandalone: true,
165
+ selector: "ng-template[monaBreadcrumbSeparatorTemplate]",
166
+ ngImport: i0
167
+ });
168
+ }
169
+ };
170
+ i0.ɵɵngDeclareClassMetadata({
171
+ minVersion: "12.0.0",
172
+ version: "22.2.6",
173
+ ngImport: i0,
174
+ type: BreadcrumbSeparatorTemplateDirective,
175
+ decorators: [{
176
+ type: Directive,
177
+ args: [{ selector: "ng-template[monaBreadcrumbSeparatorTemplate]" }]
178
+ }]
179
+ });
134
180
  const BREADCRUMB_DEFAULT_MESSAGES = {
135
- breadcrumb: "Breadcrumb",
136
- showFullPath: "Show full path"
181
+ breadcrumb: "Breadcrumb",
182
+ showFullPath: "Show full path"
137
183
  };
138
-
139
184
  const BREADCRUMB_CONTEXT = new InjectionToken("MONA_BREADCRUMB_CONTEXT");
140
185
  const BREADCRUMB_ITEM_CONTEXT = new InjectionToken("MONA_BREADCRUMB_ITEM_CONTEXT");
141
-
142
- /**
143
- * Makes a projected anchor the item's link, so the browser and the router treat it as one: ctrl-click, copy link, `href`,
144
- * `routerLink`, `target`. The item then renders no button around it.
145
- */
146
- class BreadcrumbLinkDirective {
147
- #item;
148
- constructor() {
149
- this.#item = inject(BREADCRUMB_ITEM_CONTEXT, { optional: true });
150
- this.current = computed(() => this.#item?.current() ?? false, /* @ts-ignore */
151
- ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
152
- this.disabled = computed(() => this.#item?.effectiveDisabled() ?? false, /* @ts-ignore */
153
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
154
- this.linkClass = computed(() => {
155
- const variantClass = breadcrumbLinkThemeVariants({ current: this.current(), disabled: this.disabled() });
156
- return twMerge(variantClass, this.userClass());
157
- }, /* @ts-ignore */
158
- ...(ngDevMode ? [{ debugName: "linkClass" }] : /* istanbul ignore next */ []));
159
- /**
160
- * @description Additional CSS classes merged onto the link via `tailwind-merge`.
161
- * @default ""
162
- */
163
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
164
- const host = inject(ElementRef).nativeElement;
165
- // In the capture phase, so a disabled link stops a click before `routerLink`'s own listener can act on it.
166
- fromEvent(host, "click", { capture: true })
167
- .pipe(takeUntilDestroyed())
168
- .subscribe(event => {
169
- if (this.disabled()) {
170
- event.preventDefault();
171
- event.stopImmediatePropagation();
172
- }
173
- else if (!this.current()) {
174
- this.#item?.itemClick.emit(event);
175
- }
176
- });
177
- }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
179
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: BreadcrumbLinkDirective, isStandalone: true, selector: "a[monaBreadcrumbLink]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-current": "current() ? 'page' : null", "attr.aria-disabled": "disabled() ? true : null", "attr.tabindex": "disabled() ? -1 : null", "class": "linkClass()" } }, ngImport: i0 }); }
180
- }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbLinkDirective, decorators: [{
182
- type: Directive,
183
- args: [{
184
- selector: "a[monaBreadcrumbLink]",
185
- host: {
186
- "[attr.aria-current]": "current() ? 'page' : null",
187
- "[attr.aria-disabled]": "disabled() ? true : null",
188
- "[attr.tabindex]": "disabled() ? -1 : null",
189
- "[class]": "linkClass()"
190
- }
191
- }]
192
- }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
193
-
194
- /**
195
- * Use as a direct child of `<mona-breadcrumb>`. Project any Angular content — text, icons, or elements — into the
196
- * default slot.
197
- */
198
- class BreadcrumbItemComponent {
199
- constructor() {
200
- this.#breadcrumb = inject(BREADCRUMB_CONTEXT, { optional: true });
201
- /**
202
- * @internal
203
- */
204
- this.current = computed(() => this.#breadcrumb?.currentItem() === this, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
206
- /**
207
- * @description Renders this item with reduced visual emphasis and removes pointer interaction.
208
- * Has no visual effect when the parent breadcrumb is also disabled.
209
- * @default false
210
- */
211
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
212
- /**
213
- * @internal
214
- */
215
- this.effectiveDisabled = computed(() => !!this.#breadcrumb?.disabled() || this.disabled(), /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
217
- /**
218
- * @description Emitted with the click when the item is clicked or activated via keyboard.
219
- * Not emitted when this is the current-page item or when the item is disabled.
220
- */
221
- this.itemClick = output();
222
- /**
223
- * @internal
224
- */
225
- this.link = contentChild(BreadcrumbLinkDirective, /* @ts-ignore */
226
- ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
227
- /**
228
- * @internal
229
- */
230
- this.templateRef = viewChild.required(TemplateRef, /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
232
- }
233
- #breadcrumb;
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
235
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: BreadcrumbItemComponent, isStandalone: true, selector: "mona-breadcrumb-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, providers: [{ provide: BREADCRUMB_ITEM_CONTEXT, useExisting: forwardRef(() => BreadcrumbItemComponent) }], queries: [{ propertyName: "link", first: true, predicate: BreadcrumbLinkDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }); }
236
- }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
238
- type: Component,
239
- args: [{ selector: "mona-breadcrumb-item", providers: [{ provide: BREADCRUMB_ITEM_CONTEXT, useExisting: forwardRef(() => BreadcrumbItemComponent) }], template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
240
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], link: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BreadcrumbLinkDirective), { isSignal: true }] }], templateRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
241
-
186
+ var BreadcrumbLinkDirective = class BreadcrumbLinkDirective {
187
+ #item;
188
+ constructor() {
189
+ this.#item = inject(BREADCRUMB_ITEM_CONTEXT, { optional: true });
190
+ this.current = computed(() => this.#item?.current() ?? false, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
191
+ this.disabled = computed(() => this.#item?.effectiveDisabled() ?? false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
192
+ this.linkClass = computed(() => {
193
+ const variantClass = breadcrumbLinkThemeVariants({
194
+ current: this.current(),
195
+ disabled: this.disabled()
196
+ });
197
+ return twMerge(variantClass, this.userClass());
198
+ }, ...ngDevMode ? [{ debugName: "linkClass" }] : /* istanbul ignore next */ []);
199
+ this.userClass = input("", {
200
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
201
+ alias: "class"
202
+ });
203
+ const host = inject(ElementRef).nativeElement;
204
+ fromEvent(host, "click", { capture: true }).pipe(takeUntilDestroyed()).subscribe((event) => {
205
+ if (this.disabled()) {
206
+ event.preventDefault();
207
+ event.stopImmediatePropagation();
208
+ } else if (!this.current()) this.#item?.itemClick.emit(event);
209
+ });
210
+ }
211
+ static {
212
+ this.ɵfac = i0.ɵɵngDeclareFactory({
213
+ minVersion: "12.0.0",
214
+ version: "22.2.6",
215
+ ngImport: i0,
216
+ type: BreadcrumbLinkDirective,
217
+ deps: [],
218
+ target: i0.ɵɵFactoryTarget.Directive
219
+ });
220
+ }
221
+ static {
222
+ this.ɵdir = i0.ɵɵngDeclareDirective({
223
+ minVersion: "17.1.0",
224
+ version: "22.2.6",
225
+ type: BreadcrumbLinkDirective,
226
+ isStandalone: true,
227
+ selector: "a[monaBreadcrumbLink]",
228
+ inputs: { userClass: {
229
+ classPropertyName: "userClass",
230
+ publicName: "class",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ } },
235
+ host: { properties: {
236
+ "attr.aria-current": "current() ? 'page' : null",
237
+ "attr.aria-disabled": "disabled() ? true : null",
238
+ "attr.tabindex": "disabled() ? -1 : null",
239
+ "class": "linkClass()"
240
+ } },
241
+ ngImport: i0
242
+ });
243
+ }
244
+ };
245
+ i0.ɵɵngDeclareClassMetadata({
246
+ minVersion: "12.0.0",
247
+ version: "22.2.6",
248
+ ngImport: i0,
249
+ type: BreadcrumbLinkDirective,
250
+ decorators: [{
251
+ type: Directive,
252
+ args: [{
253
+ selector: "a[monaBreadcrumbLink]",
254
+ host: {
255
+ "[attr.aria-current]": "current() ? 'page' : null",
256
+ "[attr.aria-disabled]": "disabled() ? true : null",
257
+ "[attr.tabindex]": "disabled() ? -1 : null",
258
+ "[class]": "linkClass()"
259
+ }
260
+ }]
261
+ }],
262
+ ctorParameters: () => [],
263
+ propDecorators: { userClass: [{
264
+ type: i0.Input,
265
+ args: [{
266
+ isSignal: true,
267
+ alias: "class",
268
+ required: false
269
+ }]
270
+ }] }
271
+ });
272
+ var BreadcrumbItemComponent = class BreadcrumbItemComponent {
273
+ constructor() {
274
+ this.#breadcrumb = inject(BREADCRUMB_CONTEXT, { optional: true });
275
+ this.current = computed(() => this.#breadcrumb?.currentItem() === this, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
276
+ this.disabled = input(false, {
277
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
278
+ transform: booleanAttribute
279
+ });
280
+ this.effectiveDisabled = computed(() => !!this.#breadcrumb?.disabled() || this.disabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
281
+ this.itemClick = output();
282
+ this.link = contentChild(BreadcrumbLinkDirective, ...ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []);
283
+ this.templateRef = viewChild.required(TemplateRef, ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
284
+ }
285
+ #breadcrumb;
286
+ static {
287
+ this.ɵfac = i0.ɵɵngDeclareFactory({
288
+ minVersion: "12.0.0",
289
+ version: "22.2.6",
290
+ ngImport: i0,
291
+ type: BreadcrumbItemComponent,
292
+ deps: [],
293
+ target: i0.ɵɵFactoryTarget.Component
294
+ });
295
+ }
296
+ static {
297
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
298
+ minVersion: "17.2.0",
299
+ version: "22.2.6",
300
+ type: BreadcrumbItemComponent,
301
+ isStandalone: true,
302
+ selector: "mona-breadcrumb-item",
303
+ inputs: { disabled: {
304
+ classPropertyName: "disabled",
305
+ publicName: "disabled",
306
+ isSignal: true,
307
+ isRequired: false,
308
+ transformFunction: null
309
+ } },
310
+ outputs: { itemClick: "itemClick" },
311
+ providers: [{
312
+ provide: BREADCRUMB_ITEM_CONTEXT,
313
+ useExisting: forwardRef(() => BreadcrumbItemComponent)
314
+ }],
315
+ queries: [{
316
+ propertyName: "link",
317
+ first: true,
318
+ predicate: BreadcrumbLinkDirective,
319
+ descendants: true,
320
+ isSignal: true
321
+ }],
322
+ viewQueries: [{
323
+ propertyName: "templateRef",
324
+ first: true,
325
+ predicate: TemplateRef,
326
+ descendants: true,
327
+ isSignal: true
328
+ }],
329
+ ngImport: i0,
330
+ template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n"
331
+ });
332
+ }
333
+ };
334
+ i0.ɵɵngDeclareClassMetadata({
335
+ minVersion: "12.0.0",
336
+ version: "22.2.6",
337
+ ngImport: i0,
338
+ type: BreadcrumbItemComponent,
339
+ decorators: [{
340
+ type: Component,
341
+ args: [{
342
+ selector: "mona-breadcrumb-item",
343
+ providers: [{
344
+ provide: BREADCRUMB_ITEM_CONTEXT,
345
+ useExisting: forwardRef(() => BreadcrumbItemComponent)
346
+ }],
347
+ template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n"
348
+ }]
349
+ }],
350
+ propDecorators: {
351
+ disabled: [{
352
+ type: i0.Input,
353
+ args: [{
354
+ isSignal: true,
355
+ alias: "disabled",
356
+ required: false
357
+ }]
358
+ }],
359
+ itemClick: [{
360
+ type: i0.Output,
361
+ args: ["itemClick"]
362
+ }],
363
+ link: [{
364
+ type: i0.ContentChild,
365
+ args: [i0.forwardRef(() => BreadcrumbLinkDirective), { isSignal: true }]
366
+ }],
367
+ templateRef: [{
368
+ type: i0.ViewChild,
369
+ args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
370
+ }]
371
+ }
372
+ });
242
373
  function numberOrNull(value) {
243
- if (value == null || value === "") {
244
- return null;
245
- }
246
- const parsed = Number(value);
247
- return Number.isNaN(parsed) ? null : parsed;
374
+ if (value == null || value === "") return null;
375
+ const parsed = Number(value);
376
+ return Number.isNaN(parsed) ? null : parsed;
248
377
  }
249
- class BreadcrumbComponent {
250
- constructor() {
251
- this.#i18n = inject(MonaI18nService);
252
- this.#injector = inject(Injector);
253
- this.currentItemClass = computed(() => {
254
- return breadcrumbCurrentItemThemeVariants();
255
- }, /* @ts-ignore */
256
- ...(ngDevMode ? [{ debugName: "currentItemClass" }] : /* istanbul ignore next */ []));
257
- this.entries = computed(() => {
258
- const items = this.itemComponents();
259
- const hidden = this.hiddenCount();
260
- const entries = [];
261
- items.forEach((item, index) => {
262
- if (hidden > 0 && index === 1) {
263
- entries.push({ index: hidden, item: null, key: "expand" });
264
- }
265
- if (hidden === 0 || index === 0 || index > hidden) {
266
- entries.push({ index, item, key: item });
267
- }
268
- });
269
- return entries;
270
- }, /* @ts-ignore */
271
- ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
272
- this.expanded = linkedSignal({ ...(ngDevMode ? { debugName: "expanded" } : /* istanbul ignore next */ {}), source: () => this.itemComponents(), computation: () => false });
273
- this.hasItems = computed(() => this.itemComponents().length > 0, /* @ts-ignore */
274
- ...(ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []));
275
- this.hiddenCount = computed(() => {
276
- const maxItems = this.maxItems();
277
- const count = this.itemComponents().length;
278
- if (maxItems === null || this.expanded()) {
279
- return 0;
280
- }
281
- // The first and last items are always kept, so nothing lower than two means anything.
282
- return Math.max(count - Math.max(Math.trunc(maxItems), 2), 0);
283
- }, /* @ts-ignore */
284
- ...(ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []));
285
- this.itemComponents = contentChildren(BreadcrumbItemComponent, /* @ts-ignore */
286
- ...(ngDevMode ? [{ debugName: "itemComponents" }] : /* istanbul ignore next */ []));
287
- this.itemContentClass = computed(() => {
288
- return breadcrumbItemContentThemeVariants();
289
- }, /* @ts-ignore */
290
- ...(ngDevMode ? [{ debugName: "itemContentClass" }] : /* istanbul ignore next */ []));
291
- this.listClass = computed(() => {
292
- const disabled = this.disabled();
293
- const userClass = this.userClass();
294
- const variantClass = breadcrumbListThemeVariants({ disabled });
295
- return twMerge(variantClass, userClass);
296
- }, /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
298
- this.listElement = viewChild("list", /* @ts-ignore */
299
- ...(ngDevMode ? [{ debugName: "listElement" }] : /* istanbul ignore next */ []));
300
- this.messages = this.#i18n.componentMessages("breadcrumb", BREADCRUMB_DEFAULT_MESSAGES);
301
- this.separatorTemplate = contentChild(BreadcrumbSeparatorTemplateDirective, { ...(ngDevMode ? { debugName: "separatorTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
302
- /**
303
- * @description Accessible name for the breadcrumb navigation landmark.
304
- * Override when multiple breadcrumb components appear on the same page.
305
- * @default ""
306
- */
307
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
308
- /**
309
- * @internal
310
- */
311
- this.currentItem = computed(() => {
312
- return this.lastItemCurrent() ? (this.itemComponents().at(-1) ?? null) : null;
313
- }, /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []));
315
- /**
316
- * @description Renders the entire breadcrumb with reduced visual emphasis and removes pointer interaction from all items.
317
- * @default false
318
- */
319
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
320
- /**
321
- * @description Treats the last item as the current page: not a button, and marked `aria-current="page"`. Turn it off
322
- * for a trail that ends before the page you're on.
323
- * @default true
324
- */
325
- this.lastItemCurrent = input(true, { ...(ngDevMode ? { debugName: "lastItemCurrent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
326
- /**
327
- * @description The most items to show before the middle of the trail collapses behind a button that shows it again.
328
- * The first and last items always stay, so anything below 2 counts as 2. `null` never collapses.
329
- * @default null
330
- */
331
- this.maxItems = input(null, { ...(ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {}), transform: numberOrNull });
332
- /**
333
- * @description Additional CSS classes merged onto the breadcrumb list via `tailwind-merge`.
334
- * @default ""
335
- */
336
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
337
- }
338
- #i18n;
339
- #injector;
340
- /**
341
- * Shows the whole trail. The button that was just activated goes away, so focus moves to the first item it revealed.
342
- */
343
- expand() {
344
- const firstRevealed = 1;
345
- const lastRevealed = this.hiddenCount();
346
- this.expanded.set(true);
347
- afterNextRender({
348
- read: () => {
349
- const list = this.listElement()?.nativeElement;
350
- for (let index = firstRevealed; index <= lastRevealed; index++) {
351
- const target = list
352
- ?.querySelector(`li[data-item-index="${index}"]`)
353
- ?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)");
354
- if (target) {
355
- target.focus();
356
- return;
357
- }
358
- }
359
- list?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)")?.focus();
360
- }
361
- }, { injector: this.#injector });
362
- }
363
- listItemClass(current) {
364
- return breadcrumbListItemWrapperThemeVariants({ current });
365
- }
366
- onItemClick(item, event) {
367
- if (!item.effectiveDisabled()) {
368
- item.itemClick.emit(event);
369
- }
370
- }
371
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
372
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: BreadcrumbComponent, isStandalone: true, selector: "mona-breadcrumb", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lastItemCurrent: { classPropertyName: "lastItemCurrent", publicName: "lastItemCurrent", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "hasItems() ? ariaLabel() || messages().breadcrumb : null", "attr.role": "hasItems() ? 'navigation' : null" }, classAttribute: "block max-w-full min-w-0" }, providers: [{ provide: BREADCRUMB_CONTEXT, useExisting: forwardRef(() => BreadcrumbComponent) }], queries: [{ propertyName: "itemComponents", predicate: BreadcrumbItemComponent, isSignal: true }, { propertyName: "separatorTemplate", first: true, predicate: BreadcrumbSeparatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "listElement", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BreadcrumbItemDirective, selector: "button[monaBreadcrumbItem]", inputs: ["disabled", "class"] }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }] }); }
373
- }
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbComponent, decorators: [{
375
- type: Component,
376
- args: [{ selector: "mona-breadcrumb", imports: [NgTemplateOutlet, BreadcrumbItemDirective, LucideChevronRight, LucideEllipsis], providers: [{ provide: BREADCRUMB_CONTEXT, useExisting: forwardRef(() => BreadcrumbComponent) }], host: {
377
- "[attr.aria-label]": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
378
- "[attr.role]": "hasItems() ? 'navigation' : null",
379
- // In a flex parent the host is the flex item, and it would otherwise never get narrower than the trail's text:
380
- // min-w-0 for one that shrinks along its row, max-w-full for one sized to fit across a column.
381
- class: "block max-w-full min-w-0"
382
- }, template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n" }]
383
- }], propDecorators: { itemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BreadcrumbItemComponent), { isSignal: true }] }], listElement: [{ type: i0.ViewChild, args: ["list", { isSignal: true }] }], separatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BreadcrumbSeparatorTemplateDirective), { ...{
384
- read: TemplateRef
385
- }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], lastItemCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastItemCurrent", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
386
-
387
- /*
388
- * Public API Surface of @nanahoshi/mona-ui/breadcrumb
389
- */
390
-
391
- /**
392
- * Generated bundle index. Do not edit.
393
- */
394
-
378
+ var BreadcrumbComponent = class BreadcrumbComponent {
379
+ constructor() {
380
+ this.#i18n = inject(MonaI18nService);
381
+ this.#injector = inject(Injector);
382
+ this.currentItemClass = computed(() => {
383
+ return breadcrumbCurrentItemThemeVariants();
384
+ }, ...ngDevMode ? [{ debugName: "currentItemClass" }] : /* istanbul ignore next */ []);
385
+ this.entries = computed(() => {
386
+ const items = this.itemComponents();
387
+ const hidden = this.hiddenCount();
388
+ const entries = [];
389
+ items.forEach((item, index) => {
390
+ if (hidden > 0 && index === 1) entries.push({
391
+ index: hidden,
392
+ item: null,
393
+ key: "expand"
394
+ });
395
+ if (hidden === 0 || index === 0 || index > hidden) entries.push({
396
+ index,
397
+ item,
398
+ key: item
399
+ });
400
+ });
401
+ return entries;
402
+ }, ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
403
+ this.expanded = linkedSignal({
404
+ ...ngDevMode ? { debugName: "expanded" } : /* istanbul ignore next */ {},
405
+ source: () => this.itemComponents(),
406
+ computation: () => false
407
+ });
408
+ this.hasItems = computed(() => this.itemComponents().length > 0, ...ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []);
409
+ this.hiddenCount = computed(() => {
410
+ const maxItems = this.maxItems();
411
+ const count = this.itemComponents().length;
412
+ if (maxItems === null || this.expanded()) return 0;
413
+ return Math.max(count - Math.max(Math.trunc(maxItems), 2), 0);
414
+ }, ...ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []);
415
+ this.itemComponents = contentChildren(BreadcrumbItemComponent, ...ngDevMode ? [{ debugName: "itemComponents" }] : /* istanbul ignore next */ []);
416
+ this.itemContentClass = computed(() => {
417
+ return breadcrumbItemContentThemeVariants();
418
+ }, ...ngDevMode ? [{ debugName: "itemContentClass" }] : /* istanbul ignore next */ []);
419
+ this.listClass = computed(() => {
420
+ const disabled = this.disabled();
421
+ const userClass = this.userClass();
422
+ const variantClass = breadcrumbListThemeVariants({ disabled });
423
+ return twMerge(variantClass, userClass);
424
+ }, ...ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []);
425
+ this.listElement = viewChild("list", ...ngDevMode ? [{ debugName: "listElement" }] : /* istanbul ignore next */ []);
426
+ this.messages = this.#i18n.componentMessages("breadcrumb", BREADCRUMB_DEFAULT_MESSAGES);
427
+ this.separatorTemplate = contentChild(BreadcrumbSeparatorTemplateDirective, {
428
+ ...ngDevMode ? { debugName: "separatorTemplate" } : /* istanbul ignore next */ {},
429
+ read: TemplateRef
430
+ });
431
+ this.ariaLabel = input("", {
432
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
433
+ alias: "aria-label"
434
+ });
435
+ this.currentItem = computed(() => {
436
+ return this.lastItemCurrent() ? this.itemComponents().at(-1) ?? null : null;
437
+ }, ...ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []);
438
+ this.disabled = input(false, {
439
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
440
+ transform: booleanAttribute
441
+ });
442
+ this.lastItemCurrent = input(true, {
443
+ ...ngDevMode ? { debugName: "lastItemCurrent" } : /* istanbul ignore next */ {},
444
+ transform: booleanAttribute
445
+ });
446
+ this.maxItems = input(null, {
447
+ ...ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {},
448
+ transform: numberOrNull
449
+ });
450
+ this.userClass = input("", {
451
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
452
+ alias: "class"
453
+ });
454
+ }
455
+ #i18n;
456
+ #injector;
457
+ expand() {
458
+ const firstRevealed = 1;
459
+ const lastRevealed = this.hiddenCount();
460
+ this.expanded.set(true);
461
+ afterNextRender({ read: () => {
462
+ const list = this.listElement()?.nativeElement;
463
+ for (let index = firstRevealed; index <= lastRevealed; index++) {
464
+ const target = list?.querySelector(`li[data-item-index="${index}"]`)?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)");
465
+ if (target) {
466
+ target.focus();
467
+ return;
468
+ }
469
+ }
470
+ list?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)")?.focus();
471
+ } }, { injector: this.#injector });
472
+ }
473
+ listItemClass(current) {
474
+ return breadcrumbListItemWrapperThemeVariants({ current });
475
+ }
476
+ onItemClick(item, event) {
477
+ if (!item.effectiveDisabled()) item.itemClick.emit(event);
478
+ }
479
+ static {
480
+ this.ɵfac = i0.ɵɵngDeclareFactory({
481
+ minVersion: "12.0.0",
482
+ version: "22.2.6",
483
+ ngImport: i0,
484
+ type: BreadcrumbComponent,
485
+ deps: [],
486
+ target: i0.ɵɵFactoryTarget.Component
487
+ });
488
+ }
489
+ static {
490
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
491
+ minVersion: "17.0.0",
492
+ version: "22.2.6",
493
+ type: BreadcrumbComponent,
494
+ isStandalone: true,
495
+ selector: "mona-breadcrumb",
496
+ inputs: {
497
+ ariaLabel: {
498
+ classPropertyName: "ariaLabel",
499
+ publicName: "aria-label",
500
+ isSignal: true,
501
+ isRequired: false,
502
+ transformFunction: null
503
+ },
504
+ disabled: {
505
+ classPropertyName: "disabled",
506
+ publicName: "disabled",
507
+ isSignal: true,
508
+ isRequired: false,
509
+ transformFunction: null
510
+ },
511
+ lastItemCurrent: {
512
+ classPropertyName: "lastItemCurrent",
513
+ publicName: "lastItemCurrent",
514
+ isSignal: true,
515
+ isRequired: false,
516
+ transformFunction: null
517
+ },
518
+ maxItems: {
519
+ classPropertyName: "maxItems",
520
+ publicName: "maxItems",
521
+ isSignal: true,
522
+ isRequired: false,
523
+ transformFunction: null
524
+ },
525
+ userClass: {
526
+ classPropertyName: "userClass",
527
+ publicName: "class",
528
+ isSignal: true,
529
+ isRequired: false,
530
+ transformFunction: null
531
+ }
532
+ },
533
+ host: {
534
+ properties: {
535
+ "attr.aria-label": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
536
+ "attr.role": "hasItems() ? 'navigation' : null"
537
+ },
538
+ classAttribute: "block max-w-full min-w-0"
539
+ },
540
+ providers: [{
541
+ provide: BREADCRUMB_CONTEXT,
542
+ useExisting: forwardRef(() => BreadcrumbComponent)
543
+ }],
544
+ queries: [{
545
+ propertyName: "itemComponents",
546
+ predicate: BreadcrumbItemComponent,
547
+ isSignal: true
548
+ }, {
549
+ propertyName: "separatorTemplate",
550
+ first: true,
551
+ predicate: BreadcrumbSeparatorTemplateDirective,
552
+ descendants: true,
553
+ read: TemplateRef,
554
+ isSignal: true
555
+ }],
556
+ viewQueries: [{
557
+ propertyName: "listElement",
558
+ first: true,
559
+ predicate: ["list"],
560
+ descendants: true,
561
+ isSignal: true
562
+ }],
563
+ ngImport: i0,
564
+ template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n",
565
+ dependencies: [
566
+ {
567
+ kind: "directive",
568
+ type: NgTemplateOutlet,
569
+ selector: "[ngTemplateOutlet]",
570
+ inputs: [
571
+ "ngTemplateOutletContext",
572
+ "ngTemplateOutlet",
573
+ "ngTemplateOutletInjector"
574
+ ]
575
+ },
576
+ {
577
+ kind: "directive",
578
+ type: BreadcrumbItemDirective,
579
+ selector: "button[monaBreadcrumbItem]",
580
+ inputs: ["disabled", "class"]
581
+ },
582
+ {
583
+ kind: "component",
584
+ type: LucideChevronRight,
585
+ selector: "svg[lucideChevronRight]"
586
+ },
587
+ {
588
+ kind: "component",
589
+ type: LucideEllipsis,
590
+ selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]"
591
+ }
592
+ ]
593
+ });
594
+ }
595
+ };
596
+ i0.ɵɵngDeclareClassMetadata({
597
+ minVersion: "12.0.0",
598
+ version: "22.2.6",
599
+ ngImport: i0,
600
+ type: BreadcrumbComponent,
601
+ decorators: [{
602
+ type: Component,
603
+ args: [{
604
+ selector: "mona-breadcrumb",
605
+ imports: [
606
+ NgTemplateOutlet,
607
+ BreadcrumbItemDirective,
608
+ LucideChevronRight,
609
+ LucideEllipsis
610
+ ],
611
+ providers: [{
612
+ provide: BREADCRUMB_CONTEXT,
613
+ useExisting: forwardRef(() => BreadcrumbComponent)
614
+ }],
615
+ host: {
616
+ "[attr.aria-label]": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
617
+ "[attr.role]": "hasItems() ? 'navigation' : null",
618
+ class: "block max-w-full min-w-0"
619
+ },
620
+ template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n"
621
+ }]
622
+ }],
623
+ propDecorators: {
624
+ itemComponents: [{
625
+ type: i0.ContentChildren,
626
+ args: [i0.forwardRef(() => BreadcrumbItemComponent), { isSignal: true }]
627
+ }],
628
+ listElement: [{
629
+ type: i0.ViewChild,
630
+ args: ["list", { isSignal: true }]
631
+ }],
632
+ separatorTemplate: [{
633
+ type: i0.ContentChild,
634
+ args: [i0.forwardRef(() => BreadcrumbSeparatorTemplateDirective), {
635
+ read: TemplateRef,
636
+ isSignal: true
637
+ }]
638
+ }],
639
+ ariaLabel: [{
640
+ type: i0.Input,
641
+ args: [{
642
+ isSignal: true,
643
+ alias: "aria-label",
644
+ required: false
645
+ }]
646
+ }],
647
+ disabled: [{
648
+ type: i0.Input,
649
+ args: [{
650
+ isSignal: true,
651
+ alias: "disabled",
652
+ required: false
653
+ }]
654
+ }],
655
+ lastItemCurrent: [{
656
+ type: i0.Input,
657
+ args: [{
658
+ isSignal: true,
659
+ alias: "lastItemCurrent",
660
+ required: false
661
+ }]
662
+ }],
663
+ maxItems: [{
664
+ type: i0.Input,
665
+ args: [{
666
+ isSignal: true,
667
+ alias: "maxItems",
668
+ required: false
669
+ }]
670
+ }],
671
+ userClass: [{
672
+ type: i0.Input,
673
+ args: [{
674
+ isSignal: true,
675
+ alias: "class",
676
+ required: false
677
+ }]
678
+ }]
679
+ }
680
+ });
395
681
  export { BREADCRUMB_DEFAULT_MESSAGES, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbLinkDirective, BreadcrumbSeparatorTemplateDirective };
396
- //# sourceMappingURL=nanahoshi-mona-ui-breadcrumb.mjs.map
682
+
683
+ //# sourceMappingURL=nanahoshi-mona-ui-breadcrumb.mjs.map