@mesgflow/ui-kit 0.6.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 (230) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +200 -0
  3. package/fesm2022/mesgflow-ui-kit-accordion.mjs +75 -0
  4. package/fesm2022/mesgflow-ui-kit-accordion.mjs.map +1 -0
  5. package/fesm2022/mesgflow-ui-kit-alert.mjs +165 -0
  6. package/fesm2022/mesgflow-ui-kit-alert.mjs.map +1 -0
  7. package/fesm2022/mesgflow-ui-kit-avatar-group.mjs +88 -0
  8. package/fesm2022/mesgflow-ui-kit-avatar-group.mjs.map +1 -0
  9. package/fesm2022/mesgflow-ui-kit-avatar.mjs +123 -0
  10. package/fesm2022/mesgflow-ui-kit-avatar.mjs.map +1 -0
  11. package/fesm2022/mesgflow-ui-kit-badge.mjs +68 -0
  12. package/fesm2022/mesgflow-ui-kit-badge.mjs.map +1 -0
  13. package/fesm2022/mesgflow-ui-kit-banner.mjs +111 -0
  14. package/fesm2022/mesgflow-ui-kit-banner.mjs.map +1 -0
  15. package/fesm2022/mesgflow-ui-kit-box-input.mjs +78 -0
  16. package/fesm2022/mesgflow-ui-kit-box-input.mjs.map +1 -0
  17. package/fesm2022/mesgflow-ui-kit-brand.mjs +120 -0
  18. package/fesm2022/mesgflow-ui-kit-brand.mjs.map +1 -0
  19. package/fesm2022/mesgflow-ui-kit-breadcrumb.mjs +84 -0
  20. package/fesm2022/mesgflow-ui-kit-breadcrumb.mjs.map +1 -0
  21. package/fesm2022/mesgflow-ui-kit-button-group.mjs +37 -0
  22. package/fesm2022/mesgflow-ui-kit-button-group.mjs.map +1 -0
  23. package/fesm2022/mesgflow-ui-kit-button.mjs +359 -0
  24. package/fesm2022/mesgflow-ui-kit-button.mjs.map +1 -0
  25. package/fesm2022/mesgflow-ui-kit-card.mjs +128 -0
  26. package/fesm2022/mesgflow-ui-kit-card.mjs.map +1 -0
  27. package/fesm2022/mesgflow-ui-kit-chart.mjs +538 -0
  28. package/fesm2022/mesgflow-ui-kit-chart.mjs.map +1 -0
  29. package/fesm2022/mesgflow-ui-kit-checkbox.mjs +45 -0
  30. package/fesm2022/mesgflow-ui-kit-checkbox.mjs.map +1 -0
  31. package/fesm2022/mesgflow-ui-kit-chip.mjs +123 -0
  32. package/fesm2022/mesgflow-ui-kit-chip.mjs.map +1 -0
  33. package/fesm2022/mesgflow-ui-kit-code-block.mjs +71 -0
  34. package/fesm2022/mesgflow-ui-kit-code-block.mjs.map +1 -0
  35. package/fesm2022/mesgflow-ui-kit-collapsible.mjs +89 -0
  36. package/fesm2022/mesgflow-ui-kit-collapsible.mjs.map +1 -0
  37. package/fesm2022/mesgflow-ui-kit-color-picker.mjs +210 -0
  38. package/fesm2022/mesgflow-ui-kit-color-picker.mjs.map +1 -0
  39. package/fesm2022/mesgflow-ui-kit-combobox.mjs +181 -0
  40. package/fesm2022/mesgflow-ui-kit-combobox.mjs.map +1 -0
  41. package/fesm2022/mesgflow-ui-kit-command.mjs +491 -0
  42. package/fesm2022/mesgflow-ui-kit-command.mjs.map +1 -0
  43. package/fesm2022/mesgflow-ui-kit-context-menu.mjs +92 -0
  44. package/fesm2022/mesgflow-ui-kit-context-menu.mjs.map +1 -0
  45. package/fesm2022/mesgflow-ui-kit-copy-button.mjs +167 -0
  46. package/fesm2022/mesgflow-ui-kit-copy-button.mjs.map +1 -0
  47. package/fesm2022/mesgflow-ui-kit-core.mjs +624 -0
  48. package/fesm2022/mesgflow-ui-kit-core.mjs.map +1 -0
  49. package/fesm2022/mesgflow-ui-kit-date-picker.mjs +643 -0
  50. package/fesm2022/mesgflow-ui-kit-date-picker.mjs.map +1 -0
  51. package/fesm2022/mesgflow-ui-kit-description-list.mjs +76 -0
  52. package/fesm2022/mesgflow-ui-kit-description-list.mjs.map +1 -0
  53. package/fesm2022/mesgflow-ui-kit-dialog.mjs +700 -0
  54. package/fesm2022/mesgflow-ui-kit-dialog.mjs.map +1 -0
  55. package/fesm2022/mesgflow-ui-kit-divider.mjs +62 -0
  56. package/fesm2022/mesgflow-ui-kit-divider.mjs.map +1 -0
  57. package/fesm2022/mesgflow-ui-kit-dropzone.mjs +126 -0
  58. package/fesm2022/mesgflow-ui-kit-dropzone.mjs.map +1 -0
  59. package/fesm2022/mesgflow-ui-kit-empty-state.mjs +70 -0
  60. package/fesm2022/mesgflow-ui-kit-empty-state.mjs.map +1 -0
  61. package/fesm2022/mesgflow-ui-kit-field.mjs +42 -0
  62. package/fesm2022/mesgflow-ui-kit-field.mjs.map +1 -0
  63. package/fesm2022/mesgflow-ui-kit-hover-card.mjs +171 -0
  64. package/fesm2022/mesgflow-ui-kit-hover-card.mjs.map +1 -0
  65. package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs +258 -0
  66. package/fesm2022/mesgflow-ui-kit-i18n-tr.mjs.map +1 -0
  67. package/fesm2022/mesgflow-ui-kit-icon.mjs +174 -0
  68. package/fesm2022/mesgflow-ui-kit-icon.mjs.map +1 -0
  69. package/fesm2022/mesgflow-ui-kit-input.mjs +448 -0
  70. package/fesm2022/mesgflow-ui-kit-input.mjs.map +1 -0
  71. package/fesm2022/mesgflow-ui-kit-kbd.mjs +24 -0
  72. package/fesm2022/mesgflow-ui-kit-kbd.mjs.map +1 -0
  73. package/fesm2022/mesgflow-ui-kit-link.mjs +48 -0
  74. package/fesm2022/mesgflow-ui-kit-link.mjs.map +1 -0
  75. package/fesm2022/mesgflow-ui-kit-menu.mjs +105 -0
  76. package/fesm2022/mesgflow-ui-kit-menu.mjs.map +1 -0
  77. package/fesm2022/mesgflow-ui-kit-number-input.mjs +153 -0
  78. package/fesm2022/mesgflow-ui-kit-number-input.mjs.map +1 -0
  79. package/fesm2022/mesgflow-ui-kit-otp-input.mjs +164 -0
  80. package/fesm2022/mesgflow-ui-kit-otp-input.mjs.map +1 -0
  81. package/fesm2022/mesgflow-ui-kit-page-header.mjs +83 -0
  82. package/fesm2022/mesgflow-ui-kit-page-header.mjs.map +1 -0
  83. package/fesm2022/mesgflow-ui-kit-pagination.mjs +99 -0
  84. package/fesm2022/mesgflow-ui-kit-pagination.mjs.map +1 -0
  85. package/fesm2022/mesgflow-ui-kit-password-input.mjs +120 -0
  86. package/fesm2022/mesgflow-ui-kit-password-input.mjs.map +1 -0
  87. package/fesm2022/mesgflow-ui-kit-popover.mjs +213 -0
  88. package/fesm2022/mesgflow-ui-kit-popover.mjs.map +1 -0
  89. package/fesm2022/mesgflow-ui-kit-progress.mjs +82 -0
  90. package/fesm2022/mesgflow-ui-kit-progress.mjs.map +1 -0
  91. package/fesm2022/mesgflow-ui-kit-radio.mjs +123 -0
  92. package/fesm2022/mesgflow-ui-kit-radio.mjs.map +1 -0
  93. package/fesm2022/mesgflow-ui-kit-rating.mjs +116 -0
  94. package/fesm2022/mesgflow-ui-kit-rating.mjs.map +1 -0
  95. package/fesm2022/mesgflow-ui-kit-scroll-area.mjs +84 -0
  96. package/fesm2022/mesgflow-ui-kit-scroll-area.mjs.map +1 -0
  97. package/fesm2022/mesgflow-ui-kit-search-input.mjs +154 -0
  98. package/fesm2022/mesgflow-ui-kit-search-input.mjs.map +1 -0
  99. package/fesm2022/mesgflow-ui-kit-segmented-control.mjs +95 -0
  100. package/fesm2022/mesgflow-ui-kit-segmented-control.mjs.map +1 -0
  101. package/fesm2022/mesgflow-ui-kit-select.mjs +227 -0
  102. package/fesm2022/mesgflow-ui-kit-select.mjs.map +1 -0
  103. package/fesm2022/mesgflow-ui-kit-sidebar.mjs +449 -0
  104. package/fesm2022/mesgflow-ui-kit-sidebar.mjs.map +1 -0
  105. package/fesm2022/mesgflow-ui-kit-skeleton.mjs +74 -0
  106. package/fesm2022/mesgflow-ui-kit-skeleton.mjs.map +1 -0
  107. package/fesm2022/mesgflow-ui-kit-slider.mjs +179 -0
  108. package/fesm2022/mesgflow-ui-kit-slider.mjs.map +1 -0
  109. package/fesm2022/mesgflow-ui-kit-spinner.mjs +67 -0
  110. package/fesm2022/mesgflow-ui-kit-spinner.mjs.map +1 -0
  111. package/fesm2022/mesgflow-ui-kit-splitter.mjs +97 -0
  112. package/fesm2022/mesgflow-ui-kit-splitter.mjs.map +1 -0
  113. package/fesm2022/mesgflow-ui-kit-stat-tile.mjs +98 -0
  114. package/fesm2022/mesgflow-ui-kit-stat-tile.mjs.map +1 -0
  115. package/fesm2022/mesgflow-ui-kit-stepper.mjs +133 -0
  116. package/fesm2022/mesgflow-ui-kit-stepper.mjs.map +1 -0
  117. package/fesm2022/mesgflow-ui-kit-switch.mjs +73 -0
  118. package/fesm2022/mesgflow-ui-kit-switch.mjs.map +1 -0
  119. package/fesm2022/mesgflow-ui-kit-table.mjs +1783 -0
  120. package/fesm2022/mesgflow-ui-kit-table.mjs.map +1 -0
  121. package/fesm2022/mesgflow-ui-kit-tabs.mjs +569 -0
  122. package/fesm2022/mesgflow-ui-kit-tabs.mjs.map +1 -0
  123. package/fesm2022/mesgflow-ui-kit-tag-input.mjs +138 -0
  124. package/fesm2022/mesgflow-ui-kit-tag-input.mjs.map +1 -0
  125. package/fesm2022/mesgflow-ui-kit-theme-switcher.mjs +53 -0
  126. package/fesm2022/mesgflow-ui-kit-theme-switcher.mjs.map +1 -0
  127. package/fesm2022/mesgflow-ui-kit-theming.mjs +1016 -0
  128. package/fesm2022/mesgflow-ui-kit-theming.mjs.map +1 -0
  129. package/fesm2022/mesgflow-ui-kit-time-picker.mjs +138 -0
  130. package/fesm2022/mesgflow-ui-kit-time-picker.mjs.map +1 -0
  131. package/fesm2022/mesgflow-ui-kit-timeline.mjs +91 -0
  132. package/fesm2022/mesgflow-ui-kit-timeline.mjs.map +1 -0
  133. package/fesm2022/mesgflow-ui-kit-toast.mjs +202 -0
  134. package/fesm2022/mesgflow-ui-kit-toast.mjs.map +1 -0
  135. package/fesm2022/mesgflow-ui-kit-toggle.mjs +243 -0
  136. package/fesm2022/mesgflow-ui-kit-toggle.mjs.map +1 -0
  137. package/fesm2022/mesgflow-ui-kit-toolbar.mjs +99 -0
  138. package/fesm2022/mesgflow-ui-kit-toolbar.mjs.map +1 -0
  139. package/fesm2022/mesgflow-ui-kit-tooltip.mjs +160 -0
  140. package/fesm2022/mesgflow-ui-kit-tooltip.mjs.map +1 -0
  141. package/fesm2022/mesgflow-ui-kit-tour.mjs +272 -0
  142. package/fesm2022/mesgflow-ui-kit-tour.mjs.map +1 -0
  143. package/fesm2022/mesgflow-ui-kit-tree-select.mjs +177 -0
  144. package/fesm2022/mesgflow-ui-kit-tree-select.mjs.map +1 -0
  145. package/fesm2022/mesgflow-ui-kit-tree.mjs +82 -0
  146. package/fesm2022/mesgflow-ui-kit-tree.mjs.map +1 -0
  147. package/fesm2022/mesgflow-ui-kit.mjs +12851 -0
  148. package/fesm2022/mesgflow-ui-kit.mjs.map +1 -0
  149. package/package.json +374 -0
  150. package/preset.css +20 -0
  151. package/tokens/color.css +693 -0
  152. package/tokens/contrast.css +68 -0
  153. package/tokens/elevation.css +68 -0
  154. package/tokens/motion.css +277 -0
  155. package/tokens/radius.css +69 -0
  156. package/tokens/typography.css +127 -0
  157. package/tokens.css +41 -0
  158. package/types/mesgflow-ui-kit-accordion.d.ts +42 -0
  159. package/types/mesgflow-ui-kit-alert.d.ts +60 -0
  160. package/types/mesgflow-ui-kit-avatar-group.d.ts +28 -0
  161. package/types/mesgflow-ui-kit-avatar.d.ts +23 -0
  162. package/types/mesgflow-ui-kit-badge.d.ts +39 -0
  163. package/types/mesgflow-ui-kit-banner.d.ts +42 -0
  164. package/types/mesgflow-ui-kit-box-input.d.ts +45 -0
  165. package/types/mesgflow-ui-kit-brand.d.ts +48 -0
  166. package/types/mesgflow-ui-kit-breadcrumb.d.ts +26 -0
  167. package/types/mesgflow-ui-kit-button-group.d.ts +17 -0
  168. package/types/mesgflow-ui-kit-button.d.ts +75 -0
  169. package/types/mesgflow-ui-kit-card.d.ts +71 -0
  170. package/types/mesgflow-ui-kit-chart.d.ts +242 -0
  171. package/types/mesgflow-ui-kit-checkbox.d.ts +17 -0
  172. package/types/mesgflow-ui-kit-chip.d.ts +46 -0
  173. package/types/mesgflow-ui-kit-code-block.d.ts +56 -0
  174. package/types/mesgflow-ui-kit-collapsible.d.ts +39 -0
  175. package/types/mesgflow-ui-kit-color-picker.d.ts +78 -0
  176. package/types/mesgflow-ui-kit-combobox.d.ts +74 -0
  177. package/types/mesgflow-ui-kit-command.d.ts +185 -0
  178. package/types/mesgflow-ui-kit-context-menu.d.ts +40 -0
  179. package/types/mesgflow-ui-kit-copy-button.d.ts +47 -0
  180. package/types/mesgflow-ui-kit-core.d.ts +508 -0
  181. package/types/mesgflow-ui-kit-date-picker.d.ts +215 -0
  182. package/types/mesgflow-ui-kit-description-list.d.ts +23 -0
  183. package/types/mesgflow-ui-kit-dialog.d.ts +342 -0
  184. package/types/mesgflow-ui-kit-divider.d.ts +23 -0
  185. package/types/mesgflow-ui-kit-dropzone.d.ts +47 -0
  186. package/types/mesgflow-ui-kit-empty-state.d.ts +18 -0
  187. package/types/mesgflow-ui-kit-field.d.ts +26 -0
  188. package/types/mesgflow-ui-kit-hover-card.d.ts +52 -0
  189. package/types/mesgflow-ui-kit-i18n-tr.d.ts +14 -0
  190. package/types/mesgflow-ui-kit-icon.d.ts +76 -0
  191. package/types/mesgflow-ui-kit-input.d.ts +186 -0
  192. package/types/mesgflow-ui-kit-kbd.d.ts +9 -0
  193. package/types/mesgflow-ui-kit-link.d.ts +20 -0
  194. package/types/mesgflow-ui-kit-menu.d.ts +53 -0
  195. package/types/mesgflow-ui-kit-number-input.d.ts +55 -0
  196. package/types/mesgflow-ui-kit-otp-input.d.ts +44 -0
  197. package/types/mesgflow-ui-kit-page-header.d.ts +31 -0
  198. package/types/mesgflow-ui-kit-pagination.d.ts +50 -0
  199. package/types/mesgflow-ui-kit-password-input.d.ts +33 -0
  200. package/types/mesgflow-ui-kit-popover.d.ts +62 -0
  201. package/types/mesgflow-ui-kit-progress.d.ts +32 -0
  202. package/types/mesgflow-ui-kit-radio.d.ts +59 -0
  203. package/types/mesgflow-ui-kit-rating.d.ts +56 -0
  204. package/types/mesgflow-ui-kit-scroll-area.d.ts +27 -0
  205. package/types/mesgflow-ui-kit-search-input.d.ts +72 -0
  206. package/types/mesgflow-ui-kit-segmented-control.d.ts +54 -0
  207. package/types/mesgflow-ui-kit-select.d.ts +89 -0
  208. package/types/mesgflow-ui-kit-sidebar.d.ts +224 -0
  209. package/types/mesgflow-ui-kit-skeleton.d.ts +29 -0
  210. package/types/mesgflow-ui-kit-slider.d.ts +40 -0
  211. package/types/mesgflow-ui-kit-spinner.d.ts +31 -0
  212. package/types/mesgflow-ui-kit-splitter.d.ts +40 -0
  213. package/types/mesgflow-ui-kit-stat-tile.d.ts +54 -0
  214. package/types/mesgflow-ui-kit-stepper.d.ts +48 -0
  215. package/types/mesgflow-ui-kit-switch.d.ts +34 -0
  216. package/types/mesgflow-ui-kit-table.d.ts +805 -0
  217. package/types/mesgflow-ui-kit-tabs.d.ts +269 -0
  218. package/types/mesgflow-ui-kit-tag-input.d.ts +33 -0
  219. package/types/mesgflow-ui-kit-theme-switcher.d.ts +27 -0
  220. package/types/mesgflow-ui-kit-theming.d.ts +745 -0
  221. package/types/mesgflow-ui-kit-time-picker.d.ts +54 -0
  222. package/types/mesgflow-ui-kit-timeline.d.ts +27 -0
  223. package/types/mesgflow-ui-kit-toast.d.ts +94 -0
  224. package/types/mesgflow-ui-kit-toggle.d.ts +110 -0
  225. package/types/mesgflow-ui-kit-toolbar.d.ts +52 -0
  226. package/types/mesgflow-ui-kit-tooltip.d.ts +55 -0
  227. package/types/mesgflow-ui-kit-tour.d.ts +66 -0
  228. package/types/mesgflow-ui-kit-tree-select.d.ts +65 -0
  229. package/types/mesgflow-ui-kit-tree.d.ts +44 -0
  230. package/types/mesgflow-ui-kit.d.ts +5444 -0
@@ -0,0 +1,538 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, Component, booleanAttribute, inject, ElementRef, signal, DestroyRef, afterNextRender } from '@angular/core';
3
+ import { MF_CHART_LABELS, focusRecipe, overlaySurface } from '@mesgflow/ui-kit/core';
4
+
5
+ /**
6
+ * Kategorik grafik renkleri — `color.css`'in `--mf-chart-1..8` rol token'larına SABİT sıralı
7
+ * referans (dataviz doktrini: "Assign categorical hues in fixed order, never cycled"). Sekiz
8
+ * slotun sırası CVD güvenlik mekanizmasıdır (bkz. color.css yorumu — `validate_palette.js` ile
9
+ * iki modda doğrulandı); 9. ve sonraki seriler ASLA döngüye girip 1. seriyle aynı rengi almaz,
10
+ * nötr "Diğer" (`chart-other`) rengine düşer — tüketici o serileri tek bir "Diğer"de toplamalı
11
+ * veya küçük çoklulara bölmeli.
12
+ *
13
+ * Renk VARLIĞI izler, sırasını DEĞİL: bir filtre seri sayısını değiştirdiğinde kalan seriler
14
+ * yeniden boyanmasın diye tüketici `slot`'u varlığa bağlı SABİT bir değerden türetmeli (ör. seri
15
+ * tanımındaki `colorIndex`), o anki dizideki pozisyondan değil.
16
+ *
17
+ * Class isimleri TAM/LİTERAL string — Tailwind'in JIT tarayıcısı çalışma zamanında birleştirilen
18
+ * (`` `fill-chart-${n}` ``) isimleri göremez. Tema utility'leri (`fill-chart-1`) değeri
19
+ * `var(--mf-chart-1)` olarak GÖMER — `--color-chart-*` takma adının `:root`'tan budanmasından
20
+ * etkilenmez (bkz. color.css / `docs/tr/mimari.md` "@theme inline" notu).
21
+ */
22
+ const MF_CHART_SLOT_COUNT = 8;
23
+ const FILL = [
24
+ 'fill-chart-1',
25
+ 'fill-chart-2',
26
+ 'fill-chart-3',
27
+ 'fill-chart-4',
28
+ 'fill-chart-5',
29
+ 'fill-chart-6',
30
+ 'fill-chart-7',
31
+ 'fill-chart-8',
32
+ ];
33
+ const STROKE = [
34
+ 'stroke-chart-1',
35
+ 'stroke-chart-2',
36
+ 'stroke-chart-3',
37
+ 'stroke-chart-4',
38
+ 'stroke-chart-5',
39
+ 'stroke-chart-6',
40
+ 'stroke-chart-7',
41
+ 'stroke-chart-8',
42
+ ];
43
+ const BG = [
44
+ 'bg-chart-1',
45
+ 'bg-chart-2',
46
+ 'bg-chart-3',
47
+ 'bg-chart-4',
48
+ 'bg-chart-5',
49
+ 'bg-chart-6',
50
+ 'bg-chart-7',
51
+ 'bg-chart-8',
52
+ ];
53
+ function slotClass(classes, other, slot) {
54
+ return Number.isInteger(slot) && slot >= 0 && slot < classes.length ? classes[slot] : other;
55
+ }
56
+ /** SVG dolgu (bar/alan/nokta). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
57
+ function chartFillClass(slot) {
58
+ return slotClass(FILL, 'fill-chart-other', slot);
59
+ }
60
+ /** SVG çizgi (line/sparkline). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
61
+ function chartStrokeClass(slot) {
62
+ return slotClass(STROKE, 'stroke-chart-other', slot);
63
+ }
64
+ /** HTML zemin (lejant/tooltip anahtarı, BarList çubuğu). `slot` 0 tabanlı; 0-7 dışı → "Diğer". */
65
+ function chartBgClass(slot) {
66
+ return slotClass(BG, 'bg-chart-other', slot);
67
+ }
68
+
69
+ /**
70
+ * "Temiz" eksen işaretleri — dataviz: y ekseni işaretleri yuvarlak sayılara oturur (0 / 250 /
71
+ * 500, asla 0 / 237 / 474). Heckbert'in "nice numbers" algoritması: aralığı 1/2/5 × 10^n
72
+ * adımlarına yuvarlar, dönen ilk/son işaret ölçeğin alt/üst sınırı olur (veri onların İÇİNDE).
73
+ * Tüm değerler aynıysa (ör. hepsi 0) ölçek çökmesin diye aralık 1 birim açılır.
74
+ */
75
+ function niceTicks(min, max, count = 4) {
76
+ if (!Number.isFinite(min) || !Number.isFinite(max))
77
+ return [0, 1];
78
+ if (min === max) {
79
+ if (min === 0)
80
+ return [0, 1];
81
+ min = Math.min(0, min);
82
+ max = Math.max(0, max);
83
+ }
84
+ const span = niceNumber(max - min, false);
85
+ const step = niceNumber(span / Math.max(1, count), true);
86
+ const start = Math.floor(min / step) * step;
87
+ const end = Math.ceil(max / step) * step;
88
+ const ticks = [];
89
+ for (let value = start; value <= end + step / 2; value += step) {
90
+ // Kayan nokta birikimini temizle (0.30000000000000004 → 0.3).
91
+ ticks.push(Number(value.toPrecision(12)));
92
+ }
93
+ return ticks;
94
+ }
95
+ function niceNumber(range, round) {
96
+ const exponent = Math.floor(Math.log10(range));
97
+ const fraction = range / 10 ** exponent;
98
+ let nice;
99
+ if (round) {
100
+ nice = fraction < 1.5 ? 1 : fraction < 3 ? 2 : fraction < 7 ? 5 : 10;
101
+ }
102
+ else {
103
+ nice = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;
104
+ }
105
+ return nice * 10 ** exponent;
106
+ }
107
+
108
+ const PLOT_WIDTH = 300;
109
+ const PLOT_HEIGHT = 80;
110
+ const BASELINE_Y = 96;
111
+ const VIEW_HEIGHT = 132;
112
+ const MAX_BAR_WIDTH = 24;
113
+ /** dataviz "4px rounded data-end, square at the baseline" — üstü yuvarlak tam boy dikdörtgen + tabana yapışık düz bir dikdörtgen üst üste, alt köşeleri KARELER. */
114
+ const SQUARE_FOOT = 4;
115
+ /**
116
+ * `<mf-bar-chart [points]="monthly" [ariaLabel]="'Son 6 ayda katılan üyeler'" />`
117
+ *
118
+ * Tek seri, elle yazılmış inline SVG — grafik kütüphanesi eklenmedi (bu kitin
119
+ * "npm paketi olmayan, kaynağı elinde" doktrini). Tek seri olduğu için LEJANT yok (dataviz doktrini: "a single
120
+ * series needs no legend box"), değerler her çubuğun tepesinde DOĞRUDAN etiketlenir (6 nokta —
121
+ * "her noktayı etiketleme" uyarısının kapsamı yoğun serilere yönelik, 6 noktada tamamı okunabilir).
122
+ */
123
+ class BarChart {
124
+ points = input.required(/* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "points" }] : /* istanbul ignore next */ []));
126
+ ariaLabel = input('', /* @ts-ignore */
127
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
128
+ valueFormatter = input((value) => `${value}`, /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []));
130
+ viewBox = `0 0 ${PLOT_WIDTH} ${VIEW_HEIGHT}`;
131
+ baselineY = BASELINE_Y;
132
+ fillClass = chartFillClass(0);
133
+ bars = computed(() => {
134
+ const points = this.points();
135
+ if (points.length === 0)
136
+ return [];
137
+ const max = Math.max(1, ...points.map((point) => point.value));
138
+ const slotWidth = PLOT_WIDTH / points.length;
139
+ const width = Math.min(MAX_BAR_WIDTH, slotWidth * 0.5);
140
+ return points.map((point, index) => {
141
+ const height = (point.value / max) * PLOT_HEIGHT;
142
+ const squareFootHeight = Math.min(height, SQUARE_FOOT);
143
+ return {
144
+ ...point,
145
+ width,
146
+ x: index * slotWidth + (slotWidth - width) / 2,
147
+ y: BASELINE_Y - height,
148
+ height,
149
+ squareFootY: BASELINE_Y - squareFootHeight,
150
+ squareFootHeight,
151
+ labelY: BASELINE_Y - height - 6,
152
+ };
153
+ });
154
+ }, /* @ts-ignore */
155
+ ...(ngDevMode ? [{ debugName: "bars" }] : /* istanbul ignore next */ []));
156
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
157
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: BarChart, isStandalone: true, selector: "mf-bar-chart", inputs: { points: { classPropertyName: "points", publicName: "points", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, valueFormatter: { classPropertyName: "valueFormatter", publicName: "valueFormatter", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: "@if (bars().length > 0) {\r\n <svg\r\n [attr.viewBox]=\"viewBox\"\r\n class=\"h-auto w-full\"\r\n role=\"img\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n preserveAspectRatio=\"xMidYMid meet\"\r\n >\r\n <title>{{ ariaLabel() }}</title>\r\n\r\n <line\r\n x1=\"0\"\r\n [attr.y1]=\"baselineY\"\r\n [attr.x2]=\"300\"\r\n [attr.y2]=\"baselineY\"\r\n class=\"stroke-border\"\r\n stroke-width=\"1\"\r\n />\r\n\r\n @for (bar of bars(); track bar.label) {\r\n <g>\r\n <title>{{ bar.label }}: {{ valueFormatter()(bar.value) }}</title>\r\n <rect\r\n [attr.x]=\"bar.x\"\r\n [attr.y]=\"bar.y\"\r\n [attr.width]=\"bar.width\"\r\n [attr.height]=\"bar.height\"\r\n rx=\"4\"\r\n [class]=\"fillClass\"\r\n />\r\n <rect\r\n [attr.x]=\"bar.x\"\r\n [attr.y]=\"bar.squareFootY\"\r\n [attr.width]=\"bar.width\"\r\n [attr.height]=\"bar.squareFootHeight\"\r\n [class]=\"fillClass\"\r\n />\r\n <text\r\n [attr.x]=\"bar.x + bar.width / 2\"\r\n [attr.y]=\"bar.labelY\"\r\n text-anchor=\"middle\"\r\n class=\"fill-fg-subtle text-[9px] font-mono tabular-nums\"\r\n >\r\n {{ valueFormatter()(bar.value) }}\r\n </text>\r\n <text\r\n [attr.x]=\"bar.x + bar.width / 2\"\r\n y=\"118\"\r\n text-anchor=\"middle\"\r\n class=\"fill-fg-subtle text-[9px]\"\r\n >\r\n {{ bar.label }}\r\n </text>\r\n </g>\r\n }\r\n </svg>\r\n} @else {\r\n <p class=\"text-sm text-fg-subtle\">\u2014</p>\r\n}\r\n" });
158
+ }
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarChart, decorators: [{
160
+ type: Component,
161
+ args: [{ selector: 'mf-bar-chart', host: { class: 'block' }, template: "@if (bars().length > 0) {\r\n <svg\r\n [attr.viewBox]=\"viewBox\"\r\n class=\"h-auto w-full\"\r\n role=\"img\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n preserveAspectRatio=\"xMidYMid meet\"\r\n >\r\n <title>{{ ariaLabel() }}</title>\r\n\r\n <line\r\n x1=\"0\"\r\n [attr.y1]=\"baselineY\"\r\n [attr.x2]=\"300\"\r\n [attr.y2]=\"baselineY\"\r\n class=\"stroke-border\"\r\n stroke-width=\"1\"\r\n />\r\n\r\n @for (bar of bars(); track bar.label) {\r\n <g>\r\n <title>{{ bar.label }}: {{ valueFormatter()(bar.value) }}</title>\r\n <rect\r\n [attr.x]=\"bar.x\"\r\n [attr.y]=\"bar.y\"\r\n [attr.width]=\"bar.width\"\r\n [attr.height]=\"bar.height\"\r\n rx=\"4\"\r\n [class]=\"fillClass\"\r\n />\r\n <rect\r\n [attr.x]=\"bar.x\"\r\n [attr.y]=\"bar.squareFootY\"\r\n [attr.width]=\"bar.width\"\r\n [attr.height]=\"bar.squareFootHeight\"\r\n [class]=\"fillClass\"\r\n />\r\n <text\r\n [attr.x]=\"bar.x + bar.width / 2\"\r\n [attr.y]=\"bar.labelY\"\r\n text-anchor=\"middle\"\r\n class=\"fill-fg-subtle text-[9px] font-mono tabular-nums\"\r\n >\r\n {{ valueFormatter()(bar.value) }}\r\n </text>\r\n <text\r\n [attr.x]=\"bar.x + bar.width / 2\"\r\n y=\"118\"\r\n text-anchor=\"middle\"\r\n class=\"fill-fg-subtle text-[9px]\"\r\n >\r\n {{ bar.label }}\r\n </text>\r\n </g>\r\n }\r\n </svg>\r\n} @else {\r\n <p class=\"text-sm text-fg-subtle\">\u2014</p>\r\n}\r\n" }]
162
+ }], propDecorators: { points: [{ type: i0.Input, args: [{ isSignal: true, alias: "points", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], valueFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormatter", required: false }] }] } });
163
+
164
+ /**
165
+ * `<mf-bar-list [items]="roleDistribution" />`
166
+ *
167
+ * Yatay oranlı liste — TEK bir ölçünün nominal kategorileri: kimliği METİN etiketi, büyüklüğü bar
168
+ * uzunluğu + sayı taşır. Bu yüzden bütün çubuklar TEK serinin rengini (slot 0) alır — dataviz
169
+ * doktrini: nominal çubukları sıraya/değere göre renklendirmek, uzunluğun zaten gösterdiğini
170
+ * renkle tekrar kodlar ve "renk varlığı izler, sırasını değil" kuralını çiğner (eskiden
171
+ * pozisyona göre boyanıyordu — veri sırası değişince aynı rol başka renge bürünüyordu).
172
+ * Varlığa kalıcı bir renk bağlamak için öğe başına `colorIndex`.
173
+ */
174
+ class BarList {
175
+ items = input.required(/* @ts-ignore */
176
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
177
+ valueFormatter = input((value) => `${value}`, /* @ts-ignore */
178
+ ...(ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []));
179
+ rows = computed(() => {
180
+ const items = this.items();
181
+ const max = Math.max(1, ...items.map((item) => item.value));
182
+ return items.map((item) => ({
183
+ ...item,
184
+ percent: Math.round((item.value / max) * 100),
185
+ colorClass: chartBgClass(item.colorIndex ?? 0),
186
+ }));
187
+ }, /* @ts-ignore */
188
+ ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
189
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarList, deps: [], target: i0.ɵɵFactoryTarget.Component });
190
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: BarList, isStandalone: true, selector: "mf-bar-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, valueFormatter: { classPropertyName: "valueFormatter", publicName: "valueFormatter", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: `
191
+ <ul class="m-0 flex list-none flex-col gap-3 p-0">
192
+ @for (row of rows(); track row.label) {
193
+ <li class="flex items-center gap-3">
194
+ <span class="min-w-0 flex-1 truncate text-sm text-fg-muted">{{ row.label }}</span>
195
+ <div class="h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-surface-alt">
196
+ <div
197
+ class="h-full rounded-full"
198
+ [class]="row.colorClass"
199
+ [style.width.%]="row.percent"
200
+ ></div>
201
+ </div>
202
+ <span class="w-8 shrink-0 text-end font-mono text-xs tabular-nums text-fg-subtle">{{
203
+ valueFormatter()(row.value)
204
+ }}</span>
205
+ </li>
206
+ } @empty {
207
+ <li class="text-sm text-fg-subtle">—</li>
208
+ }
209
+ </ul>
210
+ `, isInline: true });
211
+ }
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: BarList, decorators: [{
213
+ type: Component,
214
+ args: [{
215
+ selector: 'mf-bar-list',
216
+ host: { class: 'block' },
217
+ template: `
218
+ <ul class="m-0 flex list-none flex-col gap-3 p-0">
219
+ @for (row of rows(); track row.label) {
220
+ <li class="flex items-center gap-3">
221
+ <span class="min-w-0 flex-1 truncate text-sm text-fg-muted">{{ row.label }}</span>
222
+ <div class="h-1.5 w-20 shrink-0 overflow-hidden rounded-full bg-surface-alt">
223
+ <div
224
+ class="h-full rounded-full"
225
+ [class]="row.colorClass"
226
+ [style.width.%]="row.percent"
227
+ ></div>
228
+ </div>
229
+ <span class="w-8 shrink-0 text-end font-mono text-xs tabular-nums text-fg-subtle">{{
230
+ valueFormatter()(row.value)
231
+ }}</span>
232
+ </li>
233
+ } @empty {
234
+ <li class="text-sm text-fg-subtle">—</li>
235
+ }
236
+ </ul>
237
+ `,
238
+ }]
239
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], valueFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormatter", required: false }] }] } });
240
+
241
+ const PAD_TOP = 12;
242
+ const PAD_BOTTOM = 28;
243
+ const PAD_LEFT = 44;
244
+ const PAD_RIGHT = 16;
245
+ /** Tek seride uç değer etiketi çizginin SAĞINA yazıldığı için ek boşluk. */
246
+ const PAD_RIGHT_END_LABEL = 52;
247
+ /** `ResizeObserver` gelene kadar (SSR/jsdom/ilk kare) kullanılan genişlik. */
248
+ const FALLBACK_WIDTH = 600;
249
+ /** X ekseni etiketleri arasındaki en küçük boşluk — sığmıyorsa etiketler seyreltilir. */
250
+ const X_LABEL_MIN_GAP = 56;
251
+ const defaultFormatter = (value) => new Intl.NumberFormat().format(value);
252
+ /**
253
+ * `<mf-line-chart [labels]="months" [series]="series" ariaLabel="Aylık aktif kullanıcı" area />`
254
+ *
255
+ * Çok serili çizgi / alan grafiği — elle yazılmış SVG, grafik kütüphanesi YOK (kitin bağımlılık
256
+ * politikası). Dataviz metoduna göre:
257
+ * - 2px çizgi, yuvarlak birleşim; uç noktada ≥8px işaret + 2px yüzey halkası; alan dolgusu
258
+ * serinin %10'u (doygun blok değil, "yıkama").
259
+ * - Y ekseni temiz sayılara (`niceTicks`), ızgara 1px düz hairline; TEK eksen (çift y ekseni yok).
260
+ * - ≥2 seride lejant HER ZAMAN var; tek seride lejant yok (başlık seriyi adlandırır), uç değer
261
+ * çizginin ucunda doğrudan etiketlenir. Metin ASLA seri rengini taşımaz.
262
+ * - Hover katmanı varsayılan: crosshair en yakın X'e oturur, TEK tooltip o X'teki TÜM serileri
263
+ * listeler (değer önde/güçlü, seri adı ikincil, çizgi anahtarı). Klavyede aynı bilgi: odakta
264
+ * ←/→/Home/End, `aria-live` ile okunur.
265
+ * - Tooltip hiçbir değeri KAPILAMAZ: "Tablo olarak göster" ile aynı veri HTML tablosu olarak.
266
+ *
267
+ * Genişlik kapsayıcıdan (`ResizeObserver`) okunur ve çizim gerçek piksellerle yapılır — sabit
268
+ * `viewBox` ölçeklemesinin aksine etiketler dar kartta küçülmez, çizgiler kalınlaşmaz.
269
+ */
270
+ class LineChart {
271
+ labels = input.required(/* @ts-ignore */
272
+ ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
273
+ series = input.required(/* @ts-ignore */
274
+ ...(ngDevMode ? [{ debugName: "series" }] : /* istanbul ignore next */ []));
275
+ ariaLabel = input.required(/* @ts-ignore */
276
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
277
+ area = input(false, { ...(ngDevMode ? { debugName: "area" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
278
+ height = input(220, /* @ts-ignore */
279
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
280
+ valueFormatter = input(defaultFormatter, /* @ts-ignore */
281
+ ...(ngDevMode ? [{ debugName: "valueFormatter" }] : /* istanbul ignore next */ []));
282
+ i18n = inject(MF_CHART_LABELS);
283
+ focusRecipe = focusRecipe;
284
+ tooltipSurface = overlaySurface;
285
+ elementRef = inject(ElementRef);
286
+ width = signal(FALLBACK_WIDTH, /* @ts-ignore */
287
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
288
+ activeIndex = signal(null, /* @ts-ignore */
289
+ ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
290
+ tableView = signal(false, /* @ts-ignore */
291
+ ...(ngDevMode ? [{ debugName: "tableView" }] : /* istanbul ignore next */ []));
292
+ single = computed(() => this.series().length === 1, /* @ts-ignore */
293
+ ...(ngDevMode ? [{ debugName: "single" }] : /* istanbul ignore next */ []));
294
+ padRight = computed(() => (this.single() ? PAD_RIGHT_END_LABEL : PAD_RIGHT), /* @ts-ignore */
295
+ ...(ngDevMode ? [{ debugName: "padRight" }] : /* istanbul ignore next */ []));
296
+ plotBottom = computed(() => this.height() - PAD_BOTTOM, /* @ts-ignore */
297
+ ...(ngDevMode ? [{ debugName: "plotBottom" }] : /* istanbul ignore next */ []));
298
+ plotLeft = PAD_LEFT;
299
+ plotRight = computed(() => this.width() - this.padRight(), /* @ts-ignore */
300
+ ...(ngDevMode ? [{ debugName: "plotRight" }] : /* istanbul ignore next */ []));
301
+ domain = computed(() => {
302
+ const all = this.series().flatMap((s) => s.values);
303
+ if (all.length === 0)
304
+ return [0, 1];
305
+ return niceTicks(Math.min(0, ...all), Math.max(...all));
306
+ }, /* @ts-ignore */
307
+ ...(ngDevMode ? [{ debugName: "domain" }] : /* istanbul ignore next */ []));
308
+ scaleY = computed(() => {
309
+ const ticks = this.domain();
310
+ const min = ticks[0];
311
+ const max = ticks[ticks.length - 1];
312
+ const top = PAD_TOP;
313
+ const bottom = this.plotBottom();
314
+ return (value) => bottom - ((value - min) / (max - min)) * (bottom - top);
315
+ }, /* @ts-ignore */
316
+ ...(ngDevMode ? [{ debugName: "scaleY" }] : /* istanbul ignore next */ []));
317
+ scaleX = computed(() => {
318
+ const count = this.labels().length;
319
+ const left = PAD_LEFT;
320
+ const plotWidth = Math.max(0, this.plotRight() - left);
321
+ if (count <= 1)
322
+ return () => left + plotWidth / 2;
323
+ return (index) => left + (index * plotWidth) / (count - 1);
324
+ }, /* @ts-ignore */
325
+ ...(ngDevMode ? [{ debugName: "scaleX" }] : /* istanbul ignore next */ []));
326
+ yTicks = computed(() => {
327
+ const y = this.scaleY();
328
+ const format = this.valueFormatter();
329
+ return this.domain().map((value) => ({ value, y: y(value), label: format(value) }));
330
+ }, /* @ts-ignore */
331
+ ...(ngDevMode ? [{ debugName: "yTicks" }] : /* istanbul ignore next */ []));
332
+ xLabels = computed(() => {
333
+ const labels = this.labels();
334
+ const x = this.scaleX();
335
+ const count = labels.length;
336
+ const plotWidth = this.plotRight() - PAD_LEFT;
337
+ const fit = Math.max(1, Math.floor(plotWidth / X_LABEL_MIN_GAP));
338
+ const step = Math.max(1, Math.ceil(count / fit));
339
+ return labels.flatMap((text, index) => {
340
+ if (index % step !== 0)
341
+ return [];
342
+ const anchor = count > 1 && index === 0 ? 'start' : count > 1 && index === count - 1 ? 'end' : 'middle';
343
+ return [{ x: x(index), text, anchor }];
344
+ });
345
+ }, /* @ts-ignore */
346
+ ...(ngDevMode ? [{ debugName: "xLabels" }] : /* istanbul ignore next */ []));
347
+ /** Alan dolgusunun ve eksen çizgisinin oturduğu taban — 0 ölçekteyse 0, değilse alt sınır. */
348
+ baselineY = computed(() => {
349
+ const ticks = this.domain();
350
+ const zero = ticks[0] <= 0 && ticks[ticks.length - 1] >= 0 ? 0 : ticks[0];
351
+ return this.scaleY()(zero);
352
+ }, /* @ts-ignore */
353
+ ...(ngDevMode ? [{ debugName: "baselineY" }] : /* istanbul ignore next */ []));
354
+ plotSeries = computed(() => {
355
+ const x = this.scaleX();
356
+ const y = this.scaleY();
357
+ const base = this.baselineY();
358
+ return this.series().map((s, index) => {
359
+ const slot = s.colorIndex ?? index;
360
+ const points = s.values.map((value, i) => ({ x: x(i), y: y(value) }));
361
+ const path = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x} ${p.y}`).join(' ');
362
+ const first = points[0];
363
+ const last = points[points.length - 1];
364
+ const areaPath = points.length > 1 ? `${path} L${last.x} ${base} L${first.x} ${base} Z` : '';
365
+ return {
366
+ name: s.name,
367
+ values: s.values,
368
+ points,
369
+ path,
370
+ areaPath,
371
+ strokeClass: chartStrokeClass(slot),
372
+ fillClass: chartFillClass(slot),
373
+ keyClass: chartBgClass(slot),
374
+ };
375
+ });
376
+ }, /* @ts-ignore */
377
+ ...(ngDevMode ? [{ debugName: "plotSeries" }] : /* istanbul ignore next */ []));
378
+ activeX = computed(() => {
379
+ const index = this.activeIndex();
380
+ return index === null ? null : this.scaleX()(index);
381
+ }, /* @ts-ignore */
382
+ ...(ngDevMode ? [{ debugName: "activeX" }] : /* istanbul ignore next */ []));
383
+ /** Tooltip crosshair'in sağında; grafiğin sağ yarısındaysa taşmasın diye solunda. */
384
+ tooltipStyle = computed(() => {
385
+ const x = this.activeX();
386
+ if (x === null)
387
+ return null;
388
+ return x > this.width() / 2 ? { right: `${this.width() - x + 12}px` } : { left: `${x + 12}px` };
389
+ }, /* @ts-ignore */
390
+ ...(ngDevMode ? [{ debugName: "tooltipStyle" }] : /* istanbul ignore next */ []));
391
+ readout = computed(() => {
392
+ const index = this.activeIndex();
393
+ if (index === null)
394
+ return null;
395
+ const format = this.valueFormatter();
396
+ return {
397
+ label: this.labels()[index] ?? '',
398
+ rows: this.plotSeries().map((s) => ({
399
+ name: s.name,
400
+ keyClass: s.keyClass,
401
+ value: s.values[index] === undefined ? '—' : format(s.values[index]),
402
+ })),
403
+ };
404
+ }, /* @ts-ignore */
405
+ ...(ngDevMode ? [{ debugName: "readout" }] : /* istanbul ignore next */ []));
406
+ liveText = computed(() => {
407
+ const readout = this.readout();
408
+ if (!readout)
409
+ return '';
410
+ return `${readout.label}: ${readout.rows.map((r) => `${r.name} ${r.value}`).join(', ')}`;
411
+ }, /* @ts-ignore */
412
+ ...(ngDevMode ? [{ debugName: "liveText" }] : /* istanbul ignore next */ []));
413
+ tableRows = computed(() => {
414
+ const format = this.valueFormatter();
415
+ return this.labels().map((label, index) => ({
416
+ label,
417
+ values: this.series().map((s) => s.values[index] === undefined ? '—' : format(s.values[index])),
418
+ }));
419
+ }, /* @ts-ignore */
420
+ ...(ngDevMode ? [{ debugName: "tableRows" }] : /* istanbul ignore next */ []));
421
+ constructor() {
422
+ const destroyRef = inject(DestroyRef);
423
+ afterNextRender(() => {
424
+ const host = this.elementRef.nativeElement;
425
+ if (host.clientWidth > 0)
426
+ this.width.set(host.clientWidth);
427
+ if (typeof ResizeObserver === 'undefined')
428
+ return;
429
+ const observer = new ResizeObserver(([entry]) => {
430
+ const next = Math.round(entry.contentRect.width);
431
+ if (next > 0)
432
+ this.width.set(next);
433
+ });
434
+ observer.observe(host);
435
+ destroyRef.onDestroy(() => observer.disconnect());
436
+ });
437
+ }
438
+ toggleTable() {
439
+ this.activeIndex.set(null);
440
+ this.tableView.update((value) => !value);
441
+ }
442
+ onPointerMove(event) {
443
+ const count = this.labels().length;
444
+ if (count === 0)
445
+ return;
446
+ const rect = event.currentTarget.getBoundingClientRect();
447
+ const plotWidth = this.plotRight() - PAD_LEFT;
448
+ const ratio = count <= 1 ? 0 : (event.clientX - rect.left - PAD_LEFT) / plotWidth;
449
+ this.activeIndex.set(clamp(Math.round(ratio * (count - 1)), 0, count - 1));
450
+ }
451
+ onFocus() {
452
+ if (this.activeIndex() === null && this.labels().length > 0) {
453
+ this.activeIndex.set(this.labels().length - 1);
454
+ }
455
+ }
456
+ onKeydown(event) {
457
+ const count = this.labels().length;
458
+ if (count === 0)
459
+ return;
460
+ const current = this.activeIndex() ?? count - 1;
461
+ const next = {
462
+ ArrowLeft: clamp(current - 1, 0, count - 1),
463
+ ArrowRight: clamp(current + 1, 0, count - 1),
464
+ Home: 0,
465
+ End: count - 1,
466
+ Escape: null,
467
+ };
468
+ if (!(event.key in next))
469
+ return;
470
+ event.preventDefault();
471
+ this.activeIndex.set(next[event.key]);
472
+ }
473
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: LineChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
474
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: LineChart, isStandalone: true, selector: "mf-line-chart", inputs: { labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: true, transformFunction: null }, series: { classPropertyName: "series", publicName: "series", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: true, transformFunction: null }, area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, valueFormatter: { classPropertyName: "valueFormatter", publicName: "valueFormatter", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, exportAs: ["mfLineChart"], ngImport: i0, template: "<figure class=\"m-0 flex flex-col gap-3\">\r\n <div class=\"flex flex-wrap items-center justify-between gap-x-4 gap-y-2\">\r\n @if (plotSeries().length > 1) {\r\n <ul class=\"m-0 flex list-none flex-wrap gap-x-4 gap-y-1 p-0\">\r\n @for (s of plotSeries(); track s.name) {\r\n <li class=\"flex items-center gap-1.5 text-xs text-fg-muted\">\r\n <span class=\"h-0.5 w-3 shrink-0 rounded-full\" [class]=\"s.keyClass\"></span>\r\n {{ s.name }}\r\n </li>\r\n }\r\n </ul>\r\n } @else {\r\n <span></span>\r\n }\r\n <button\r\n type=\"button\"\r\n [class]=\"\r\n 'rounded-sm text-xs text-fg-muted underline-offset-2 transition-colors duration-fast ease-emphasis hover:text-fg hover:underline ' +\r\n focusRecipe\r\n \"\r\n (click)=\"toggleTable()\"\r\n >\r\n {{ tableView() ? i18n().showChart : i18n().showTable }}\r\n </button>\r\n </div>\r\n\r\n @if (tableView()) {\r\n <div class=\"overflow-x-auto\">\r\n <table class=\"w-full border-collapse text-sm\">\r\n <caption class=\"sr-only\">\r\n {{\r\n ariaLabel()\r\n }}\r\n </caption>\r\n <thead>\r\n <tr class=\"border-b border-border\">\r\n <th scope=\"col\" class=\"py-2 pe-4 text-start text-eyebrow text-fg-subtle\">\r\n {{ i18n().category }}\r\n </th>\r\n @for (s of series(); track s.name) {\r\n <th scope=\"col\" class=\"py-2 ps-4 text-end text-eyebrow text-fg-subtle\">\r\n {{ s.name }}\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (row of tableRows(); track $index) {\r\n <tr class=\"border-b border-border-subtle last:border-b-0\">\r\n <th scope=\"row\" class=\"py-2 pe-4 text-start font-normal text-fg-muted\">\r\n {{ row.label }}\r\n </th>\r\n @for (value of row.values; track $index) {\r\n <td class=\"py-2 ps-4 text-end tabular-nums text-fg\">{{ value }}</td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n } @else {\r\n <div\r\n tabindex=\"0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [class]=\"'relative touch-pan-y rounded-sm ' + focusRecipe\"\r\n [style.height.px]=\"height()\"\r\n (pointermove)=\"onPointerMove($event)\"\r\n (pointerleave)=\"activeIndex.set(null)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"activeIndex.set(null)\"\r\n (keydown)=\"onKeydown($event)\"\r\n >\r\n <svg\r\n [attr.width]=\"width()\"\r\n [attr.height]=\"height()\"\r\n class=\"block overflow-visible\"\r\n aria-hidden=\"true\"\r\n >\r\n @for (tick of yTicks(); track tick.value) {\r\n <line\r\n [attr.x1]=\"plotLeft\"\r\n [attr.x2]=\"plotRight()\"\r\n [attr.y1]=\"tick.y\"\r\n [attr.y2]=\"tick.y\"\r\n class=\"stroke-border\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n <text\r\n [attr.x]=\"plotLeft - 8\"\r\n [attr.y]=\"tick.y\"\r\n text-anchor=\"end\"\r\n dominant-baseline=\"middle\"\r\n class=\"fill-fg-subtle text-caption tabular-nums\"\r\n >\r\n {{ tick.label }}\r\n </text>\r\n }\r\n\r\n <line\r\n [attr.x1]=\"plotLeft\"\r\n [attr.x2]=\"plotRight()\"\r\n [attr.y1]=\"baselineY()\"\r\n [attr.y2]=\"baselineY()\"\r\n class=\"stroke-border-strong\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n\r\n @for (label of xLabels(); track $index) {\r\n <text\r\n [attr.x]=\"label.x\"\r\n [attr.y]=\"plotBottom() + 18\"\r\n [attr.text-anchor]=\"label.anchor\"\r\n class=\"fill-fg-subtle text-caption\"\r\n >\r\n {{ label.text }}\r\n </text>\r\n }\r\n\r\n @if (area()) {\r\n @for (s of plotSeries(); track s.name) {\r\n <path [attr.d]=\"s.areaPath\" [class]=\"s.fillClass\" fill-opacity=\"0.1\" />\r\n }\r\n }\r\n\r\n @for (s of plotSeries(); track s.name) {\r\n <path\r\n [attr.d]=\"s.path\"\r\n fill=\"none\"\r\n [class]=\"s.strokeClass\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n />\r\n }\r\n\r\n @if (activeX() !== null) {\r\n <line\r\n [attr.x1]=\"activeX()\"\r\n [attr.x2]=\"activeX()\"\r\n [attr.y1]=\"12\"\r\n [attr.y2]=\"plotBottom()\"\r\n class=\"stroke-border-strong\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n }\r\n\r\n @for (s of plotSeries(); track s.name) {\r\n @let point = activeIndex() !== null ? s.points[activeIndex()!] : s.points.at(-1);\r\n @if (point) {\r\n <circle\r\n [attr.cx]=\"point.x\"\r\n [attr.cy]=\"point.y\"\r\n r=\"4\"\r\n [class]=\"s.fillClass + ' stroke-surface'\"\r\n stroke-width=\"2\"\r\n />\r\n }\r\n }\r\n\r\n @if (single() && activeIndex() === null) {\r\n @let last = plotSeries()[0].points.at(-1);\r\n @if (last) {\r\n <text\r\n [attr.x]=\"last.x + 10\"\r\n [attr.y]=\"last.y\"\r\n dominant-baseline=\"middle\"\r\n class=\"fill-fg text-caption font-medium tabular-nums\"\r\n >\r\n {{ valueFormatter()(plotSeries()[0].values.at(-1)!) }}\r\n </text>\r\n }\r\n }\r\n </svg>\r\n\r\n @if (readout(); as r) {\r\n <div\r\n aria-hidden=\"true\"\r\n [class]=\"tooltipSurface + ' pointer-events-none absolute top-0 z-10 min-w-32 px-3 py-2'\"\r\n [style.left]=\"tooltipStyle()?.left\"\r\n [style.right]=\"tooltipStyle()?.right\"\r\n >\r\n <p class=\"mb-1.5 text-caption text-fg-subtle\">{{ r.label }}</p>\r\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0\">\r\n @for (row of r.rows; track row.name) {\r\n <li class=\"flex items-center gap-2 text-xs\">\r\n <span class=\"h-0.5 w-3 shrink-0 rounded-full\" [class]=\"row.keyClass\"></span>\r\n <span class=\"font-medium tabular-nums text-fg\">{{ row.value }}</span>\r\n <span class=\"text-fg-muted\">{{ row.name }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n <div class=\"sr-only\" aria-live=\"polite\">{{ liveText() }}</div>\r\n </div>\r\n }\r\n</figure>\r\n" });
475
+ }
476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: LineChart, decorators: [{
477
+ type: Component,
478
+ args: [{ selector: 'mf-line-chart', exportAs: 'mfLineChart', host: { class: 'block' }, template: "<figure class=\"m-0 flex flex-col gap-3\">\r\n <div class=\"flex flex-wrap items-center justify-between gap-x-4 gap-y-2\">\r\n @if (plotSeries().length > 1) {\r\n <ul class=\"m-0 flex list-none flex-wrap gap-x-4 gap-y-1 p-0\">\r\n @for (s of plotSeries(); track s.name) {\r\n <li class=\"flex items-center gap-1.5 text-xs text-fg-muted\">\r\n <span class=\"h-0.5 w-3 shrink-0 rounded-full\" [class]=\"s.keyClass\"></span>\r\n {{ s.name }}\r\n </li>\r\n }\r\n </ul>\r\n } @else {\r\n <span></span>\r\n }\r\n <button\r\n type=\"button\"\r\n [class]=\"\r\n 'rounded-sm text-xs text-fg-muted underline-offset-2 transition-colors duration-fast ease-emphasis hover:text-fg hover:underline ' +\r\n focusRecipe\r\n \"\r\n (click)=\"toggleTable()\"\r\n >\r\n {{ tableView() ? i18n().showChart : i18n().showTable }}\r\n </button>\r\n </div>\r\n\r\n @if (tableView()) {\r\n <div class=\"overflow-x-auto\">\r\n <table class=\"w-full border-collapse text-sm\">\r\n <caption class=\"sr-only\">\r\n {{\r\n ariaLabel()\r\n }}\r\n </caption>\r\n <thead>\r\n <tr class=\"border-b border-border\">\r\n <th scope=\"col\" class=\"py-2 pe-4 text-start text-eyebrow text-fg-subtle\">\r\n {{ i18n().category }}\r\n </th>\r\n @for (s of series(); track s.name) {\r\n <th scope=\"col\" class=\"py-2 ps-4 text-end text-eyebrow text-fg-subtle\">\r\n {{ s.name }}\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (row of tableRows(); track $index) {\r\n <tr class=\"border-b border-border-subtle last:border-b-0\">\r\n <th scope=\"row\" class=\"py-2 pe-4 text-start font-normal text-fg-muted\">\r\n {{ row.label }}\r\n </th>\r\n @for (value of row.values; track $index) {\r\n <td class=\"py-2 ps-4 text-end tabular-nums text-fg\">{{ value }}</td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n } @else {\r\n <div\r\n tabindex=\"0\"\r\n role=\"group\"\r\n [attr.aria-label]=\"ariaLabel()\"\r\n [class]=\"'relative touch-pan-y rounded-sm ' + focusRecipe\"\r\n [style.height.px]=\"height()\"\r\n (pointermove)=\"onPointerMove($event)\"\r\n (pointerleave)=\"activeIndex.set(null)\"\r\n (focus)=\"onFocus()\"\r\n (blur)=\"activeIndex.set(null)\"\r\n (keydown)=\"onKeydown($event)\"\r\n >\r\n <svg\r\n [attr.width]=\"width()\"\r\n [attr.height]=\"height()\"\r\n class=\"block overflow-visible\"\r\n aria-hidden=\"true\"\r\n >\r\n @for (tick of yTicks(); track tick.value) {\r\n <line\r\n [attr.x1]=\"plotLeft\"\r\n [attr.x2]=\"plotRight()\"\r\n [attr.y1]=\"tick.y\"\r\n [attr.y2]=\"tick.y\"\r\n class=\"stroke-border\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n <text\r\n [attr.x]=\"plotLeft - 8\"\r\n [attr.y]=\"tick.y\"\r\n text-anchor=\"end\"\r\n dominant-baseline=\"middle\"\r\n class=\"fill-fg-subtle text-caption tabular-nums\"\r\n >\r\n {{ tick.label }}\r\n </text>\r\n }\r\n\r\n <line\r\n [attr.x1]=\"plotLeft\"\r\n [attr.x2]=\"plotRight()\"\r\n [attr.y1]=\"baselineY()\"\r\n [attr.y2]=\"baselineY()\"\r\n class=\"stroke-border-strong\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n\r\n @for (label of xLabels(); track $index) {\r\n <text\r\n [attr.x]=\"label.x\"\r\n [attr.y]=\"plotBottom() + 18\"\r\n [attr.text-anchor]=\"label.anchor\"\r\n class=\"fill-fg-subtle text-caption\"\r\n >\r\n {{ label.text }}\r\n </text>\r\n }\r\n\r\n @if (area()) {\r\n @for (s of plotSeries(); track s.name) {\r\n <path [attr.d]=\"s.areaPath\" [class]=\"s.fillClass\" fill-opacity=\"0.1\" />\r\n }\r\n }\r\n\r\n @for (s of plotSeries(); track s.name) {\r\n <path\r\n [attr.d]=\"s.path\"\r\n fill=\"none\"\r\n [class]=\"s.strokeClass\"\r\n stroke-width=\"2\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n />\r\n }\r\n\r\n @if (activeX() !== null) {\r\n <line\r\n [attr.x1]=\"activeX()\"\r\n [attr.x2]=\"activeX()\"\r\n [attr.y1]=\"12\"\r\n [attr.y2]=\"plotBottom()\"\r\n class=\"stroke-border-strong\"\r\n stroke-width=\"1\"\r\n shape-rendering=\"crispEdges\"\r\n />\r\n }\r\n\r\n @for (s of plotSeries(); track s.name) {\r\n @let point = activeIndex() !== null ? s.points[activeIndex()!] : s.points.at(-1);\r\n @if (point) {\r\n <circle\r\n [attr.cx]=\"point.x\"\r\n [attr.cy]=\"point.y\"\r\n r=\"4\"\r\n [class]=\"s.fillClass + ' stroke-surface'\"\r\n stroke-width=\"2\"\r\n />\r\n }\r\n }\r\n\r\n @if (single() && activeIndex() === null) {\r\n @let last = plotSeries()[0].points.at(-1);\r\n @if (last) {\r\n <text\r\n [attr.x]=\"last.x + 10\"\r\n [attr.y]=\"last.y\"\r\n dominant-baseline=\"middle\"\r\n class=\"fill-fg text-caption font-medium tabular-nums\"\r\n >\r\n {{ valueFormatter()(plotSeries()[0].values.at(-1)!) }}\r\n </text>\r\n }\r\n }\r\n </svg>\r\n\r\n @if (readout(); as r) {\r\n <div\r\n aria-hidden=\"true\"\r\n [class]=\"tooltipSurface + ' pointer-events-none absolute top-0 z-10 min-w-32 px-3 py-2'\"\r\n [style.left]=\"tooltipStyle()?.left\"\r\n [style.right]=\"tooltipStyle()?.right\"\r\n >\r\n <p class=\"mb-1.5 text-caption text-fg-subtle\">{{ r.label }}</p>\r\n <ul class=\"m-0 flex list-none flex-col gap-1 p-0\">\r\n @for (row of r.rows; track row.name) {\r\n <li class=\"flex items-center gap-2 text-xs\">\r\n <span class=\"h-0.5 w-3 shrink-0 rounded-full\" [class]=\"row.keyClass\"></span>\r\n <span class=\"font-medium tabular-nums text-fg\">{{ row.value }}</span>\r\n <span class=\"text-fg-muted\">{{ row.name }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </div>\r\n }\r\n\r\n <div class=\"sr-only\" aria-live=\"polite\">{{ liveText() }}</div>\r\n </div>\r\n }\r\n</figure>\r\n" }]
479
+ }], ctorParameters: () => [], propDecorators: { labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: true }] }], series: [{ type: i0.Input, args: [{ isSignal: true, alias: "series", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: true }] }], area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], valueFormatter: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueFormatter", required: false }] }] } });
480
+ function clamp(value, min, max) {
481
+ return Math.min(max, Math.max(min, value));
482
+ }
483
+
484
+ const INSET = 4;
485
+ /**
486
+ * `<mf-sparkline [values]="last12" ariaLabel="Son 12 ay: 120'den 184'e" />`
487
+ *
488
+ * Eksensiz, etkileşimsiz trend glifi — StatTile'ın "trend" satırı (dataviz figür sözleşmesi:
489
+ * çizgi geri planda kalan tonla, GÜNCEL dönem vurgu renginde). Değerin kendisi yanındaki metinde
490
+ * yazdığı için hover katmanı YOK; `ariaLabel` verilmezse süs sayılır (`aria-hidden`).
491
+ * Gerçek piksellerle çizilir (sabit `width`/`height`) — `viewBox` ölçeklemesi uç noktayı
492
+ * elipse çevirirdi.
493
+ */
494
+ class Sparkline {
495
+ values = input.required(/* @ts-ignore */
496
+ ...(ngDevMode ? [{ debugName: "values" }] : /* istanbul ignore next */ []));
497
+ ariaLabel = input('', /* @ts-ignore */
498
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
499
+ width = input(96, /* @ts-ignore */
500
+ ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
501
+ height = input(28, /* @ts-ignore */
502
+ ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
503
+ area = input(false, { ...(ngDevMode ? { debugName: "area" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
504
+ geometry = computed(() => {
505
+ const values = this.values();
506
+ const width = this.width();
507
+ const height = this.height();
508
+ if (values.length === 0)
509
+ return { line: '', area: '', end: null };
510
+ const min = Math.min(...values);
511
+ const max = Math.max(...values);
512
+ const span = max - min || 1;
513
+ const stepX = values.length > 1 ? (width - INSET * 2) / (values.length - 1) : 0;
514
+ const points = values.map((value, index) => ({
515
+ x: values.length > 1 ? INSET + index * stepX : width / 2,
516
+ y: height - INSET - ((value - min) / span) * (height - INSET * 2),
517
+ }));
518
+ const line = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x} ${p.y}`).join(' ');
519
+ const first = points[0];
520
+ const end = points[points.length - 1];
521
+ const area = points.length > 1 ? `${line} L${end.x} ${height} L${first.x} ${height} Z` : '';
522
+ return { line, area, end };
523
+ }, /* @ts-ignore */
524
+ ...(ngDevMode ? [{ debugName: "geometry" }] : /* istanbul ignore next */ []));
525
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Sparkline, deps: [], target: i0.ɵɵFactoryTarget.Component });
526
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: Sparkline, isStandalone: true, selector: "mf-sparkline", inputs: { values: { classPropertyName: "values", publicName: "values", isSignal: true, isRequired: true, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, area: { classPropertyName: "area", publicName: "area", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "inline-block align-middle leading-none" }, ngImport: i0, template: "<svg\r\n [attr.width]=\"width()\"\r\n [attr.height]=\"height()\"\r\n class=\"block overflow-visible\"\r\n [attr.role]=\"ariaLabel() ? 'img' : null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-hidden]=\"ariaLabel() ? null : 'true'\"\r\n>\r\n @if (area() && geometry().area) {\r\n <path [attr.d]=\"geometry().area\" class=\"fill-chart-1\" fill-opacity=\"0.1\" />\r\n }\r\n <path\r\n [attr.d]=\"geometry().line\"\r\n fill=\"none\"\r\n class=\"stroke-chart-other\"\r\n stroke-width=\"1.5\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n />\r\n @if (geometry().end; as end) {\r\n <circle\r\n [attr.cx]=\"end.x\"\r\n [attr.cy]=\"end.y\"\r\n r=\"3\"\r\n class=\"fill-chart-1 stroke-surface\"\r\n stroke-width=\"1.5\"\r\n />\r\n }\r\n</svg>\r\n" });
527
+ }
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Sparkline, decorators: [{
529
+ type: Component,
530
+ args: [{ selector: 'mf-sparkline', host: { class: 'inline-block align-middle leading-none' }, template: "<svg\r\n [attr.width]=\"width()\"\r\n [attr.height]=\"height()\"\r\n class=\"block overflow-visible\"\r\n [attr.role]=\"ariaLabel() ? 'img' : null\"\r\n [attr.aria-label]=\"ariaLabel() || null\"\r\n [attr.aria-hidden]=\"ariaLabel() ? null : 'true'\"\r\n>\r\n @if (area() && geometry().area) {\r\n <path [attr.d]=\"geometry().area\" class=\"fill-chart-1\" fill-opacity=\"0.1\" />\r\n }\r\n <path\r\n [attr.d]=\"geometry().line\"\r\n fill=\"none\"\r\n class=\"stroke-chart-other\"\r\n stroke-width=\"1.5\"\r\n stroke-linejoin=\"round\"\r\n stroke-linecap=\"round\"\r\n />\r\n @if (geometry().end; as end) {\r\n <circle\r\n [attr.cx]=\"end.x\"\r\n [attr.cy]=\"end.y\"\r\n r=\"3\"\r\n class=\"fill-chart-1 stroke-surface\"\r\n stroke-width=\"1.5\"\r\n />\r\n }\r\n</svg>\r\n" }]
531
+ }], propDecorators: { values: [{ type: i0.Input, args: [{ isSignal: true, alias: "values", required: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], area: [{ type: i0.Input, args: [{ isSignal: true, alias: "area", required: false }] }] } });
532
+
533
+ /**
534
+ * Generated bundle index. Do not edit.
535
+ */
536
+
537
+ export { BarChart, BarList, LineChart, MF_CHART_SLOT_COUNT, Sparkline, chartBgClass, chartFillClass, chartStrokeClass, niceTicks };
538
+ //# sourceMappingURL=mesgflow-ui-kit-chart.mjs.map