@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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hurdeniz YENER / MesgFlow
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,200 @@
1
+ # @mesgflow/ui-kit
2
+
3
+ An independent Angular component kit — button, select, dialog, table,
4
+ sidebar, tabs, date-picker, and more — distributed as a real npm package in
5
+ the `PrimeNG`/`ng-zorro-antd` mold: it does **not** bundle Angular/CDK
6
+ (`peerDependencies`), and it does **not** hardcode app-specific things like
7
+ language (injected, see [Internationalization](#internationalization)
8
+ below). Angular 22+, standalone + zoneless, built on signals and a
9
+ Tailwind v4 design token system.
10
+
11
+ - **Docs & live examples**: <https://hurdenizyener.github.io/mesgflow-ui-kit/>
12
+ - **Changelog**: [`CHANGELOG.md`](https://github.com/hurdenizyener/mesgflow-ui-kit/blob/master/CHANGELOG.md)
13
+ - **Contributing**: [`CONTRIBUTING.md`](https://github.com/hurdenizyener/mesgflow-ui-kit/blob/master/CONTRIBUTING.md)
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ npm install @mesgflow/ui-kit
19
+ ```
20
+
21
+ Every primitive also has its own secondary entry point (same pattern as
22
+ `@angular/cdk`), so either of these works:
23
+
24
+ ```ts
25
+ import { Button } from '@mesgflow/ui-kit'; // primary barrel
26
+ import { Button } from '@mesgflow/ui-kit/button'; // standalone
27
+ ```
28
+
29
+ ## Peer dependencies
30
+
31
+ ```
32
+ @angular/core, @angular/common, @angular/forms, @angular/cdk, @angular/aria ^22.1.0
33
+ class-variance-authority ^0.7.1
34
+ clsx ^2.1.1
35
+ date-fns ^4.4.0
36
+ tailwind-merge ^3.6.0
37
+ @material-symbols/font-400 ^0.47.1
38
+ ```
39
+
40
+ Optional peers (only needed if you use the kit's own font stack rather than
41
+ your own):
42
+
43
+ ```
44
+ @fontsource-variable/inter
45
+ @fontsource-variable/space-grotesk
46
+ @fontsource-variable/jetbrains-mono
47
+ ```
48
+
49
+ The project must be standalone + zoneless (it isn't tested with NgModules
50
+ or zone.js).
51
+
52
+ ## Styles
53
+
54
+ In your Tailwind v4 entry stylesheet, **after** the `@import "tailwindcss/theme.css" layer(theme);`
55
+ lines:
56
+
57
+ ```css
58
+ @import '@mesgflow/ui-kit/preset.css';
59
+ ```
60
+
61
+ That one line bundles everything: this kit's design tokens, the official
62
+ `@angular/cdk/overlay` stylesheet (required for Select/Tooltip/DatePicker/
63
+ Sidebar/Table menus to position correctly), Material Symbols (for the
64
+ `Icon` primitive's ligatures), and a `@source` directive so Tailwind's
65
+ scanner picks up this package's own class names from
66
+ `node_modules/@mesgflow/ui-kit/fesm2022/*.mjs` — Tailwind v4's automatic source
67
+ scanning skips `node_modules` by default, so without this the kit renders
68
+ "half-styled" (no hover/disabled/focus states, no width on layout
69
+ primitives) with no build error. If `@source` ever fails to resolve in your
70
+ setup, add it explicitly as a fallback:
71
+
72
+ ```css
73
+ @source '../node_modules/@mesgflow/ui-kit/fesm2022/*.mjs';
74
+ ```
75
+
76
+ If you're using the kit's own font stack, import it too (optional — with no
77
+ font imports the design still works, it just falls back to the browser's
78
+ `system-ui`/`monospace` fonts):
79
+
80
+ ```css
81
+ @import '@fontsource-variable/inter';
82
+ @import '@fontsource-variable/space-grotesk';
83
+ @import '@fontsource-variable/jetbrains-mono';
84
+ ```
85
+
86
+ ### Dark mode
87
+
88
+ Toggling a `.dark` class on the root element (`<html>` or similar) is your
89
+ app's responsibility — every token reacts to it, but the kit ships no theme
90
+ state (localStorage, `prefers-color-scheme` detection, a toggle component,
91
+ etc.). See the docs site's own shell (`shell/theme.service.ts` in this
92
+ repo) for a reference implementation.
93
+
94
+ ## Internationalization
95
+
96
+ Every component's text defaults to English. To provide your own strings
97
+ (and/or a `date-fns` locale for `DatePicker`/`Calendar`), add
98
+ `provideMesgflowUi()` to your `providers`:
99
+
100
+ ```ts
101
+ import { provideMesgflowUi } from '@mesgflow/ui-kit';
102
+ import { mfLabelsTr } from '@mesgflow/ui-kit/i18n/tr';
103
+ import { tr } from 'date-fns/locale';
104
+
105
+ providers: [provideMesgflowUi({ labels: mfLabelsTr, dateLocale: tr })];
106
+ ```
107
+
108
+ `labels` is a deep-partial override — you only need to supply the fields
109
+ you want to change, everything else falls back to the English default. It
110
+ also accepts a reactive `Signal<DeepPartial<MfLabels>>` if your app's
111
+ language can change at runtime. `@mesgflow/ui-kit/i18n/tr` ships a complete
112
+ Turkish translation as a ready-made example (`mfLabelsTr`); it is not
113
+ re-exported from the primary barrel, so it's fully opt-in.
114
+
115
+ `Dialog`/`ConfirmDialog`/`DialogService` previously had their own standalone
116
+ `MF_DIALOG_LABELS` injection token — that still works as an escape hatch if
117
+ you only need to override dialog text, but `provideMesgflowUi()` is the
118
+ recommended entry point for everything now.
119
+
120
+ ## Design tokens
121
+
122
+ All color/elevation/radius/typography/motion tokens live in
123
+ `@mesgflow/ui-kit/tokens.css` (bundled into `preset.css`, so you don't need to
124
+ import it separately unless you want tokens without the rest of the
125
+ preset). Role tokens (`bg-surface`, `text-fg`, `text-fg-muted`,
126
+ `shadow-control`, `border-hairline`, `bg-glass`, `bg-accent-fill`, etc.)
127
+ automatically swap value between light and dark — templates never need a
128
+ `dark:` twin when using them. Every semantic tone (`success`/`warning`/
129
+ `danger`/`info`/`help`, plus `primary`) exposes the same five-token set:
130
+ `bg-X-fill`/`hover:bg-X-fill-hover`/`text-X-fill-fg` for solid blocks, and
131
+ `bg-X-tint`/`text-X-tint-fg` (a `color-mix()`-based soft badge/alert
132
+ background) for tonal marks. The kit is **border-first**: containers
133
+ (card/table/toolbar/popover/menu) use `border-hairline` (a ~16% opaque,
134
+ brand-tinted 1px line) instead of a shadow; `shadow-1` is reserved for
135
+ small contact shadows (segmented pill, slider thumb), and `shadow-glow`
136
+ (primary filled button only) adds a soft emerald glow in dark mode.
137
+ Dialog/Sheet/Drawer panels, Toast items, and the docs site's sticky header
138
+ use a micro glassmorphism surface (`bg-glass` + `backdrop-blur`, falling
139
+ back to a solid surface when `backdrop-filter` isn't supported or the
140
+ visitor prefers reduced transparency). See the docs site's Foundations
141
+ pages (Colors/Typography/Radius/Elevation/Motion) for a live, inspectable
142
+ reference.
143
+
144
+ ## Theming
145
+
146
+ `@mesgflow/ui-kit/theming` (opt-in, not re-exported from the primary barrel —
147
+ same pattern as `@mesgflow/ui-kit/i18n/tr`) lets you swap the accent color,
148
+ radius scale, and neutral tint at **runtime**, with no rebuild:
149
+
150
+ ```ts
151
+ import { applyMfTheme } from '@mesgflow/ui-kit/theming';
152
+
153
+ applyMfTheme({ accent: '#4f46e5', radiusScale: 'soft', neutralTint: 'cool' });
154
+ ```
155
+
156
+ This works because every Tailwind utility the kit generates
157
+ (`bg-accent-fill`, `rounded-md`, …) compiles to a `var(--color-accent-fill)` /
158
+ `var(--radius-md)` reference rather than a baked-in value — `applyMfTheme()`
159
+ overwrites those CSS custom properties on `document.documentElement` (or a
160
+ `target` element you pass), and the whole kit repaints instantly. Passing
161
+ `accent` regenerates all 11 ramp steps (`--color-primary-50..950`) from the
162
+ given `#rgb`/`#rrggbb` hex via OKLCH (hue/chroma preserved, a fixed
163
+ lightness curve per step) and writes three role lines explicitly as
164
+ `light-dark(…)`: a WCAG-safe `--mf-fg-on-accent`, `--mf-accent-fill`, and
165
+ `--mf-accent-fill-hover` — light half from the ramp's own 600/700, dark half
166
+ from 400/500 (the same split the kit's own default ramp uses). `fg-on-accent`
167
+ is computed separately for each half, since a 600-step and a 400-step color
168
+ are usually very different in brightness and may need different text
169
+ colors. The other light/dark role tokens (`--mf-accent`, `--mf-focus-ring`,
170
+ `--mf-primary-tint(-fg)`, `--mf-shadow-glow`, …) already reference the raw
171
+ ramp via `var()`, so they update automatically. Passing `accent: null`
172
+ clears every inline override those calls left behind, reverting to the
173
+ kit's default "Deep Emerald" ramp.
174
+
175
+ `exportMfThemeCss(config)` returns the same result as a static `:root { … }`
176
+ block you can paste into your own stylesheet at build time instead of
177
+ calling `applyMfTheme()` at runtime.
178
+
179
+ `createAccentRamp(hex)` is also exported directly if you only need the 11
180
+ hex values (e.g. to render a preview swatch) without touching the DOM.
181
+
182
+ The five semantic ramps (`--color-success/warning/danger/info/help-50..950`)
183
+ are hand-tuned to the **default** "Deep Emerald" accent and are **not**
184
+ regenerated by `applyMfTheme()`. They're plain `:root`/`.dark` custom
185
+ properties like any other token, so if you pick an accent that collides
186
+ with one of them (e.g. an amber accent next to `warning`), override the
187
+ relevant custom properties yourself after calling `applyMfTheme()`.
188
+
189
+ ## License
190
+
191
+ MIT — see [`LICENSE`](https://github.com/hurdenizyener/mesgflow-ui-kit/blob/master/LICENSE).
192
+
193
+ ---
194
+
195
+ Internal architecture notes for contributors (directive-vs-component
196
+ rules, the `cva`/token conventions, `@angular/aria` composition patterns,
197
+ the i18n system's internals, etc.) live in
198
+ [`docs/tr/mimari.md`](https://github.com/hurdenizyener/mesgflow-ui-kit/blob/master/docs/tr/mimari.md)
199
+ (Turkish) — that content is for people working on this repo, not for
200
+ consumers of the published package.
@@ -0,0 +1,75 @@
1
+ import * as i1 from '@angular/aria/accordion';
2
+ import { AccordionGroup, AccordionTrigger, AccordionPanel, AccordionContent } from '@angular/aria/accordion';
3
+ import * as i0 from '@angular/core';
4
+ import { Component, input, computed } from '@angular/core';
5
+ import { cn } from '@mesgflow/ui-kit/core';
6
+ import { Icon } from '@mesgflow/ui-kit/icon';
7
+ import { cva } from 'class-variance-authority';
8
+
9
+ /**
10
+ * `<mf-accordion multiExpandable><mf-accordion-item summary="...">...</mf-accordion-item></mf-accordion>`
11
+ *
12
+ * Salt bir kapsayıcı — ARIA/klavye/genişletme-modu mantığı `@angular/aria/accordion`'ın
13
+ * `AccordionGroup` pattern'inden `hostDirectives` ile ödünç alınıyor (bkz.
14
+ * `tabs.ts`'teki AYNI desen). `multiExpandable`/`disabled` girdileri
15
+ * `hostDirectives`'in `inputs` listesiyle dışarı açıldı.
16
+ */
17
+ class Accordion {
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Accordion, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.6", type: Accordion, isStandalone: true, selector: "mf-accordion", host: { classAttribute: "block divide-y divide-border overflow-hidden rounded-lg border border-border" }, exportAs: ["mfAccordion"], hostDirectives: [{ directive: i1.AccordionGroup, inputs: ["multiExpandable", "multiExpandable", "disabled", "disabled"] }], ngImport: i0, template: '<ng-content />', isInline: true });
20
+ }
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Accordion, decorators: [{
22
+ type: Component,
23
+ args: [{
24
+ selector: 'mf-accordion',
25
+ exportAs: 'mfAccordion',
26
+ hostDirectives: [{ directive: AccordionGroup, inputs: ['multiExpandable', 'disabled'] }],
27
+ host: { class: 'block divide-y divide-border overflow-hidden rounded-lg border border-border' },
28
+ template: '<ng-content />',
29
+ }]
30
+ }] });
31
+
32
+ const accordionTriggerVariants = cva('flex w-full items-center justify-between gap-2 px-3 py-2.5 text-start text-sm font-medium text-fg transition-colors duration-fast ease-emphasis ' +
33
+ 'hover:bg-surface-alt focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring', {
34
+ variants: {
35
+ disabled: {
36
+ true: 'pointer-events-none opacity-50',
37
+ false: '',
38
+ },
39
+ },
40
+ defaultVariants: { disabled: false },
41
+ });
42
+
43
+ /**
44
+ * `<mf-accordion-item summary="Genel">İçerik…</mf-accordion-item>` —
45
+ * `mf-accordion` içine konur. `ngAccordionTrigger`/`ngAccordionPanel`/
46
+ * `ngAccordionContent` (`@angular/aria/accordion`) doğrudan bu component'in
47
+ * KENDİ template'inde kullanılıyor (`hostDirectives` DEĞİL — `Tab`'ın aksine
48
+ * trigger butonu ve panel div'i İKİ AYRI DOM elemanı, tek host'a sığmıyor;
49
+ * bkz. `Select`'in `cdkOverlayOrigin`/`cdkConnectedOverlay`'i kendi
50
+ * template'inde birleştirme deseniyle AYNI gerekçe).
51
+ *
52
+ * İçerik `ngAccordionContent` sayesinde LAZY — panel ilk açılana kadar hiç
53
+ * oluşturulmaz.
54
+ */
55
+ class AccordionItem {
56
+ summary = input.required(/* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "summary" }] : /* istanbul ignore next */ []));
58
+ disabled = input(false, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
60
+ triggerClasses = computed(() => cn(accordionTriggerVariants({ disabled: this.disabled() })), /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "triggerClasses" }] : /* istanbul ignore next */ []));
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.6", type: AccordionItem, isStandalone: true, selector: "mf-accordion-item", inputs: { summary: { classPropertyName: "summary", publicName: "summary", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block" }, ngImport: i0, template: "<h3 class=\"contents\">\r\n <button\r\n type=\"button\"\r\n ngAccordionTrigger\r\n #trigger=\"ngAccordionTrigger\"\r\n [panel]=\"panel\"\r\n [disabled]=\"disabled()\"\r\n [class]=\"triggerClasses()\"\r\n >\r\n <span class=\"truncate\">{{ summary() }}</span>\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"shrink-0 text-fg-subtle transition-transform duration-fast\"\r\n [class.rotate-180]=\"trigger.expanded()\"\r\n >expand_more</span\r\n >\r\n </button>\r\n</h3>\r\n<!--\r\n `preserveContent` \u2014 i\u00E7erik ilk a\u00E7\u0131l\u0131\u015Ftan SONRA DOM'da kal\u0131c\u0131 olur (bkz.\r\n `@angular/aria`'n\u0131n `DeferredContentAware`/`DeferredContent` \u00E7ifti, panel\r\n varsay\u0131lan\u0131: her kapan\u0131\u015Fta view `destroy()` edilir). Grid-rows ge\u00E7i\u015Finin\r\n (a\u015Fa\u011F\u0131da) animasyonu bir \u015Feyi KISALTMASI i\u00E7in i\u00E7eri\u011Fin h\u00E2l\u00E2 orada olmas\u0131\r\n gerekiyor \u2014 hi\u00E7 a\u00E7\u0131lmam\u0131\u015F bir panel yine de hi\u00E7 render ED\u0130LMEZ (lazy\r\n davran\u0131\u015F korunuyor), sadece \"en az bir kez a\u00E7\u0131lm\u0131\u015F\" panel art\u0131k kapan\u0131\u015Fta\r\n yok edilmiyor.\r\n-->\r\n<div\r\n ngAccordionPanel\r\n #panel=\"ngAccordionPanel\"\r\n [preserveContent]=\"true\"\r\n class=\"grid transition-[grid-template-rows] duration-base ease-emphasis\"\r\n [style.grid-template-rows]=\"trigger.expanded() ? '1fr' : '0fr'\"\r\n>\r\n <div class=\"min-h-0 overflow-hidden\">\r\n <ng-template ngAccordionContent>\r\n <div class=\"px-3 pb-3 text-sm text-fg-subtle\">\r\n <ng-content />\r\n </div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: AccordionTrigger, selector: "[ngAccordionTrigger]", inputs: ["panel", "id", "disabled", "expanded"], outputs: ["expandedChange"], exportAs: ["ngAccordionTrigger"] }, { kind: "directive", type: AccordionPanel, selector: "[ngAccordionPanel]", inputs: ["id"], exportAs: ["ngAccordionPanel"] }, { kind: "directive", type: AccordionContent, selector: "ng-template[ngAccordionContent]" }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }] });
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AccordionItem, decorators: [{
66
+ type: Component,
67
+ args: [{ selector: 'mf-accordion-item', imports: [AccordionTrigger, AccordionPanel, AccordionContent, Icon], host: { class: 'block' }, template: "<h3 class=\"contents\">\r\n <button\r\n type=\"button\"\r\n ngAccordionTrigger\r\n #trigger=\"ngAccordionTrigger\"\r\n [panel]=\"panel\"\r\n [disabled]=\"disabled()\"\r\n [class]=\"triggerClasses()\"\r\n >\r\n <span class=\"truncate\">{{ summary() }}</span>\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"shrink-0 text-fg-subtle transition-transform duration-fast\"\r\n [class.rotate-180]=\"trigger.expanded()\"\r\n >expand_more</span\r\n >\r\n </button>\r\n</h3>\r\n<!--\r\n `preserveContent` \u2014 i\u00E7erik ilk a\u00E7\u0131l\u0131\u015Ftan SONRA DOM'da kal\u0131c\u0131 olur (bkz.\r\n `@angular/aria`'n\u0131n `DeferredContentAware`/`DeferredContent` \u00E7ifti, panel\r\n varsay\u0131lan\u0131: her kapan\u0131\u015Fta view `destroy()` edilir). Grid-rows ge\u00E7i\u015Finin\r\n (a\u015Fa\u011F\u0131da) animasyonu bir \u015Feyi KISALTMASI i\u00E7in i\u00E7eri\u011Fin h\u00E2l\u00E2 orada olmas\u0131\r\n gerekiyor \u2014 hi\u00E7 a\u00E7\u0131lmam\u0131\u015F bir panel yine de hi\u00E7 render ED\u0130LMEZ (lazy\r\n davran\u0131\u015F korunuyor), sadece \"en az bir kez a\u00E7\u0131lm\u0131\u015F\" panel art\u0131k kapan\u0131\u015Fta\r\n yok edilmiyor.\r\n-->\r\n<div\r\n ngAccordionPanel\r\n #panel=\"ngAccordionPanel\"\r\n [preserveContent]=\"true\"\r\n class=\"grid transition-[grid-template-rows] duration-base ease-emphasis\"\r\n [style.grid-template-rows]=\"trigger.expanded() ? '1fr' : '0fr'\"\r\n>\r\n <div class=\"min-h-0 overflow-hidden\">\r\n <ng-template ngAccordionContent>\r\n <div class=\"px-3 pb-3 text-sm text-fg-subtle\">\r\n <ng-content />\r\n </div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n" }]
68
+ }], propDecorators: { summary: [{ type: i0.Input, args: [{ isSignal: true, alias: "summary", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
69
+
70
+ /**
71
+ * Generated bundle index. Do not edit.
72
+ */
73
+
74
+ export { Accordion, AccordionItem, accordionTriggerVariants };
75
+ //# sourceMappingURL=mesgflow-ui-kit-accordion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesgflow-ui-kit-accordion.mjs","sources":["../../../projects/ui-kit/accordion/accordion.ts","../../../projects/ui-kit/accordion/accordion.variants.ts","../../../projects/ui-kit/accordion/accordion-item.ts","../../../projects/ui-kit/accordion/accordion-item.html","../../../projects/ui-kit/accordion/mesgflow-ui-kit-accordion.ts"],"sourcesContent":["import { AccordionGroup as AriaAccordionGroup } from '@angular/aria/accordion';\r\nimport { Component } from '@angular/core';\r\n\r\n/**\r\n * `<mf-accordion multiExpandable><mf-accordion-item summary=\"...\">...</mf-accordion-item></mf-accordion>`\r\n *\r\n * Salt bir kapsayıcı — ARIA/klavye/genişletme-modu mantığı `@angular/aria/accordion`'ın\r\n * `AccordionGroup` pattern'inden `hostDirectives` ile ödünç alınıyor (bkz.\r\n * `tabs.ts`'teki AYNI desen). `multiExpandable`/`disabled` girdileri\r\n * `hostDirectives`'in `inputs` listesiyle dışarı açıldı.\r\n */\r\n@Component({\r\n selector: 'mf-accordion',\r\n exportAs: 'mfAccordion',\r\n hostDirectives: [{ directive: AriaAccordionGroup, inputs: ['multiExpandable', 'disabled'] }],\r\n host: { class: 'block divide-y divide-border overflow-hidden rounded-lg border border-border' },\r\n template: '<ng-content />',\r\n})\r\nexport class Accordion {}\r\n","import { cva } from 'class-variance-authority';\r\n\r\nexport const accordionTriggerVariants = cva(\r\n 'flex w-full items-center justify-between gap-2 px-3 py-2.5 text-start text-sm font-medium text-fg transition-colors duration-fast ease-emphasis ' +\r\n 'hover:bg-surface-alt focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-ring',\r\n {\r\n variants: {\r\n disabled: {\r\n true: 'pointer-events-none opacity-50',\r\n false: '',\r\n },\r\n },\r\n defaultVariants: { disabled: false },\r\n },\r\n);\r\n","import {\r\n AccordionContent,\r\n AccordionPanel as AriaAccordionPanel,\r\n AccordionTrigger as AriaAccordionTrigger,\r\n} from '@angular/aria/accordion';\r\nimport { Component, computed, input } from '@angular/core';\r\nimport { cn } from '@mesgflow/ui-kit/core';\r\nimport { Icon } from '@mesgflow/ui-kit/icon';\r\nimport { accordionTriggerVariants } from './accordion.variants';\r\n\r\n/**\r\n * `<mf-accordion-item summary=\"Genel\">İçerik…</mf-accordion-item>` —\r\n * `mf-accordion` içine konur. `ngAccordionTrigger`/`ngAccordionPanel`/\r\n * `ngAccordionContent` (`@angular/aria/accordion`) doğrudan bu component'in\r\n * KENDİ template'inde kullanılıyor (`hostDirectives` DEĞİL — `Tab`'ın aksine\r\n * trigger butonu ve panel div'i İKİ AYRI DOM elemanı, tek host'a sığmıyor;\r\n * bkz. `Select`'in `cdkOverlayOrigin`/`cdkConnectedOverlay`'i kendi\r\n * template'inde birleştirme deseniyle AYNI gerekçe).\r\n *\r\n * İçerik `ngAccordionContent` sayesinde LAZY — panel ilk açılana kadar hiç\r\n * oluşturulmaz.\r\n */\r\n@Component({\r\n selector: 'mf-accordion-item',\r\n imports: [AriaAccordionTrigger, AriaAccordionPanel, AccordionContent, Icon],\r\n host: { class: 'block' },\r\n templateUrl: './accordion-item.html',\r\n})\r\nexport class AccordionItem {\r\n readonly summary = input.required<string>();\r\n readonly disabled = input(false);\r\n\r\n protected readonly triggerClasses = computed(() =>\r\n cn(accordionTriggerVariants({ disabled: this.disabled() })),\r\n );\r\n}\r\n","<h3 class=\"contents\">\r\n <button\r\n type=\"button\"\r\n ngAccordionTrigger\r\n #trigger=\"ngAccordionTrigger\"\r\n [panel]=\"panel\"\r\n [disabled]=\"disabled()\"\r\n [class]=\"triggerClasses()\"\r\n >\r\n <span class=\"truncate\">{{ summary() }}</span>\r\n <span\r\n mfIcon\r\n [size]=\"18\"\r\n class=\"shrink-0 text-fg-subtle transition-transform duration-fast\"\r\n [class.rotate-180]=\"trigger.expanded()\"\r\n >expand_more</span\r\n >\r\n </button>\r\n</h3>\r\n<!--\r\n `preserveContent` — içerik ilk açılıştan SONRA DOM'da kalıcı olur (bkz.\r\n `@angular/aria`'nın `DeferredContentAware`/`DeferredContent` çifti, panel\r\n varsayılanı: her kapanışta view `destroy()` edilir). Grid-rows geçişinin\r\n (aşağıda) animasyonu bir şeyi KISALTMASI için içeriğin hâlâ orada olması\r\n gerekiyor — hiç açılmamış bir panel yine de hiç render EDİLMEZ (lazy\r\n davranış korunuyor), sadece \"en az bir kez açılmış\" panel artık kapanışta\r\n yok edilmiyor.\r\n-->\r\n<div\r\n ngAccordionPanel\r\n #panel=\"ngAccordionPanel\"\r\n [preserveContent]=\"true\"\r\n class=\"grid transition-[grid-template-rows] duration-base ease-emphasis\"\r\n [style.grid-template-rows]=\"trigger.expanded() ? '1fr' : '0fr'\"\r\n>\r\n <div class=\"min-h-0 overflow-hidden\">\r\n <ng-template ngAccordionContent>\r\n <div class=\"px-3 pb-3 text-sm text-fg-subtle\">\r\n <ng-content />\r\n </div>\r\n </ng-template>\r\n </div>\r\n</div>\r\n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AAmB,EAAA,OAAA,EACpB,CAACD,gBAAoB,EAAEC,cAAkB,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAA,IAAA,EACrE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAA,QAAA,EAAA,6rDAAA,EAAA;;;AEzB1B;;AAEG;;"}
@@ -0,0 +1,165 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, inject, computed, Component } from '@angular/core';
3
+ import { MF_ALERT_LABELS, cn } from '@mesgflow/ui-kit/core';
4
+ import { Button } from '@mesgflow/ui-kit/button';
5
+ import { Icon } from '@mesgflow/ui-kit/icon';
6
+ import { cva } from 'class-variance-authority';
7
+
8
+ /**
9
+ * Badge/Chip/Avatar/StatTile ile AYNI "tonal işaret" dili (bkz.
10
+ * badge.variants.ts'teki gerekçe) — rol token'ı `bg-X-tint text-X-tint-fg`
11
+ * (`color-mix()` ile rampanın kendi basamağının %12 alfası; light çapa 600,
12
+ * dark çapa 400 — "Deep Emerald & Slate v2" spec'inin "Soft Tinting"
13
+ * tekniği). Alert her türlü zeminin üstüne (kart, sayfa, panel) oturabiliyor
14
+ * — `color-mix` sayesinde her zeminde AYRI ayrı doğru karışıyor, eski "düz
15
+ * basamak çifti" (`bg-X-50 dark:bg-X-900`) döneminde zeminden bağımsız
16
+ * garantili kontrast İÇİN gerekliydi, artık `check:contrast` dört yüzeyde
17
+ * (surface/canvas/overlay/surface-alt) `color-mix` sonucunu doğruluyor.
18
+ *
19
+ * Kenarlık `border-X/30` — Button'ın `outlined` görünümüyle AYNI dil (renkli-
20
+ * şeffaf çizgi, düz gri DEĞİL); primary `border-accent/30` kullanır (kendi
21
+ * `X-tint` token'ı yok, `accent`/`primary-tint` çifti aynı işi görür). Geniş
22
+ * bir banner için sadece dolgu yetersiz kalıyordu (kenar tanımı olmadan
23
+ * sayfa zeminiyle karışıyordu, `Badge`'in küçük pilinde bu sorun yoktu).
24
+ */
25
+ const alertVariants = cva('flex items-start gap-3 rounded-lg border p-4 text-sm', {
26
+ variants: {
27
+ tone: {
28
+ neutral: 'border-border bg-surface-alt text-fg',
29
+ primary: 'border-accent/30 bg-primary-tint text-primary-tint-fg',
30
+ success: 'border-success/30 bg-success-tint text-success-tint-fg',
31
+ warning: 'border-warning/30 bg-warning-tint text-warning-tint-fg',
32
+ danger: 'border-danger/30 bg-danger-tint text-danger-tint-fg',
33
+ info: 'border-info/30 bg-info-tint text-info-tint-fg',
34
+ help: 'border-help/30 bg-help-tint text-help-tint-fg',
35
+ },
36
+ },
37
+ defaultVariants: { tone: 'neutral' },
38
+ });
39
+
40
+ const DEFAULT_ICON = {
41
+ neutral: 'info',
42
+ primary: 'info',
43
+ success: 'check_circle',
44
+ warning: 'warning',
45
+ danger: 'error',
46
+ info: 'info',
47
+ help: 'help',
48
+ };
49
+ /**
50
+ * `<mf-alert tone="danger" title="Kayıt başarısız">Ağ bağlantısı koptu.</mf-alert>`
51
+ *
52
+ * İçerik (gövde metni) `<ng-content />` ile projekte edilir. İkon ayrı bir
53
+ * content-projection SLOT'u DEĞİL — `icon` girdisi (bkz. `ConfirmDialog`'un
54
+ * aynı deseni, `dialog/confirm-dialog.ts`): tone'a göre makul bir varsayılanı
55
+ * var, tüketici farklı bir Material Symbol adı geçebilir ya da `icon=""` ile
56
+ * tamamen kapatabilir. Gerçek content-slot algılaması (`@ContentChild` +
57
+ * "sağlandı mı" kontrolü) bu basit vakada gereksiz karmaşıklık.
58
+ *
59
+ * `role`: `danger`/`warning` kullanıcının DİKKATİNİ kesmesi gereken durumlar
60
+ * — `role="alert"` (assertive, ekran okuyucu anında keser). Diğer tonlar
61
+ * `role="status"` (polite, mevcut anonsu beklemeden araya girmez).
62
+ */
63
+ class Alert {
64
+ tone = input('neutral', /* @ts-ignore */
65
+ ...(ngDevMode ? [{ debugName: "tone" }] : /* istanbul ignore next */ []));
66
+ title = input('', /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
68
+ /** `null` (varsayılan) → `tone`'a göre otomatik ikon. Boş string (`''`) → ikon YOK. Başka bir Material Symbol adı → onu kullan. */
69
+ icon = input(null, /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
71
+ dismissible = input(false, /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "dismissible" }] : /* istanbul ignore next */ []));
73
+ dismissLabel = input(/* @ts-ignore */
74
+ ...(ngDevMode ? [undefined, { debugName: "dismissLabel" }] : /* istanbul ignore next */ []));
75
+ dismissed = output();
76
+ injectedLabels = inject(MF_ALERT_LABELS);
77
+ effectiveDismissLabel = computed(() => this.dismissLabel() ?? this.injectedLabels().dismiss, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "effectiveDismissLabel" }] : /* istanbul ignore next */ []));
79
+ containerClasses = computed(() => cn(alertVariants({ tone: this.tone() })), /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "containerClasses" }] : /* istanbul ignore next */ []));
81
+ role = computed(() => {
82
+ const t = this.tone();
83
+ return t === 'danger' || t === 'warning' ? 'alert' : 'status';
84
+ }, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []));
86
+ iconName = computed(() => this.icon() ?? DEFAULT_ICON[this.tone()], /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Alert, deps: [], target: i0.ɵɵFactoryTarget.Component });
89
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: Alert, isStandalone: true, selector: "mf-alert", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, dismissLabel: { classPropertyName: "dismissLabel", publicName: "dismissLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dismissed: "dismissed" }, host: { classAttribute: "block" }, exportAs: ["mfAlert"], ngImport: i0, template: `
90
+ <div [class]="containerClasses()" [attr.role]="role()">
91
+ @if (iconName()) {
92
+ <span mfIcon [size]="20" class="mt-0.5 shrink-0">{{ iconName() }}</span>
93
+ }
94
+ <div class="min-w-0 flex-1">
95
+ @if (title()) {
96
+ <p class="font-semibold">{{ title() }}</p>
97
+ }
98
+ <div [class.mt-0.5]="title()">
99
+ <ng-content />
100
+ </div>
101
+ </div>
102
+ @if (dismissible()) {
103
+ <button
104
+ mfButton
105
+ appearance="text"
106
+ tone="neutral"
107
+ size="icon"
108
+ shape="square"
109
+ type="button"
110
+ class="-mt-1 -me-1 shrink-0"
111
+ [attr.aria-label]="effectiveDismissLabel()"
112
+ (click)="dismissed.emit()"
113
+ >
114
+ <span mfIcon [size]="16">close</span>
115
+ </button>
116
+ }
117
+ </div>
118
+ `, isInline: true, dependencies: [{ kind: "component", type: Button, selector: "button[mfButton], a[mfButton]", inputs: ["tone", "appearance", "size", "shape", "type", "loading", "iconStart", "iconEnd"], exportAs: ["mfButton"] }, { kind: "directive", type: Icon, selector: "span[mfIcon]", inputs: ["size", "filled"] }] });
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: Alert, decorators: [{
121
+ type: Component,
122
+ args: [{
123
+ selector: 'mf-alert',
124
+ exportAs: 'mfAlert',
125
+ imports: [Button, Icon],
126
+ host: { class: 'block' },
127
+ template: `
128
+ <div [class]="containerClasses()" [attr.role]="role()">
129
+ @if (iconName()) {
130
+ <span mfIcon [size]="20" class="mt-0.5 shrink-0">{{ iconName() }}</span>
131
+ }
132
+ <div class="min-w-0 flex-1">
133
+ @if (title()) {
134
+ <p class="font-semibold">{{ title() }}</p>
135
+ }
136
+ <div [class.mt-0.5]="title()">
137
+ <ng-content />
138
+ </div>
139
+ </div>
140
+ @if (dismissible()) {
141
+ <button
142
+ mfButton
143
+ appearance="text"
144
+ tone="neutral"
145
+ size="icon"
146
+ shape="square"
147
+ type="button"
148
+ class="-mt-1 -me-1 shrink-0"
149
+ [attr.aria-label]="effectiveDismissLabel()"
150
+ (click)="dismissed.emit()"
151
+ >
152
+ <span mfIcon [size]="16">close</span>
153
+ </button>
154
+ }
155
+ </div>
156
+ `,
157
+ }]
158
+ }], propDecorators: { tone: [{ type: i0.Input, args: [{ isSignal: true, alias: "tone", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], dismissLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissLabel", required: false }] }], dismissed: [{ type: i0.Output, args: ["dismissed"] }] } });
159
+
160
+ /**
161
+ * Generated bundle index. Do not edit.
162
+ */
163
+
164
+ export { Alert, alertVariants };
165
+ //# sourceMappingURL=mesgflow-ui-kit-alert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesgflow-ui-kit-alert.mjs","sources":["../../../projects/ui-kit/alert/alert.variants.ts","../../../projects/ui-kit/alert/alert.ts","../../../projects/ui-kit/alert/mesgflow-ui-kit-alert.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\r\n\r\n/**\r\n * Badge/Chip/Avatar/StatTile ile AYNI \"tonal işaret\" dili (bkz.\r\n * badge.variants.ts'teki gerekçe) — rol token'ı `bg-X-tint text-X-tint-fg`\r\n * (`color-mix()` ile rampanın kendi basamağının %12 alfası; light çapa 600,\r\n * dark çapa 400 — \"Deep Emerald & Slate v2\" spec'inin \"Soft Tinting\"\r\n * tekniği). Alert her türlü zeminin üstüne (kart, sayfa, panel) oturabiliyor\r\n * — `color-mix` sayesinde her zeminde AYRI ayrı doğru karışıyor, eski \"düz\r\n * basamak çifti\" (`bg-X-50 dark:bg-X-900`) döneminde zeminden bağımsız\r\n * garantili kontrast İÇİN gerekliydi, artık `check:contrast` dört yüzeyde\r\n * (surface/canvas/overlay/surface-alt) `color-mix` sonucunu doğruluyor.\r\n *\r\n * Kenarlık `border-X/30` — Button'ın `outlined` görünümüyle AYNI dil (renkli-\r\n * şeffaf çizgi, düz gri DEĞİL); primary `border-accent/30` kullanır (kendi\r\n * `X-tint` token'ı yok, `accent`/`primary-tint` çifti aynı işi görür). Geniş\r\n * bir banner için sadece dolgu yetersiz kalıyordu (kenar tanımı olmadan\r\n * sayfa zeminiyle karışıyordu, `Badge`'in küçük pilinde bu sorun yoktu).\r\n */\r\nexport const alertVariants = cva('flex items-start gap-3 rounded-lg border p-4 text-sm', {\r\n variants: {\r\n tone: {\r\n neutral: 'border-border bg-surface-alt text-fg',\r\n primary: 'border-accent/30 bg-primary-tint text-primary-tint-fg',\r\n success: 'border-success/30 bg-success-tint text-success-tint-fg',\r\n warning: 'border-warning/30 bg-warning-tint text-warning-tint-fg',\r\n danger: 'border-danger/30 bg-danger-tint text-danger-tint-fg',\r\n info: 'border-info/30 bg-info-tint text-info-tint-fg',\r\n help: 'border-help/30 bg-help-tint text-help-tint-fg',\r\n },\r\n },\r\n defaultVariants: { tone: 'neutral' },\r\n});\r\n\r\nexport type AlertTone = VariantProps<typeof alertVariants>['tone'];\r\n","import { Component, computed, inject, input, output } from '@angular/core';\r\nimport { cn, MF_ALERT_LABELS, type MfTone } from '@mesgflow/ui-kit/core';\r\nimport { Button } from '@mesgflow/ui-kit/button';\r\nimport { Icon } from '@mesgflow/ui-kit/icon';\r\nimport { alertVariants } from './alert.variants';\r\n\r\nconst DEFAULT_ICON: Record<MfTone, string> = {\r\n neutral: 'info',\r\n primary: 'info',\r\n success: 'check_circle',\r\n warning: 'warning',\r\n danger: 'error',\r\n info: 'info',\r\n help: 'help',\r\n};\r\n\r\n/**\r\n * `<mf-alert tone=\"danger\" title=\"Kayıt başarısız\">Ağ bağlantısı koptu.</mf-alert>`\r\n *\r\n * İçerik (gövde metni) `<ng-content />` ile projekte edilir. İkon ayrı bir\r\n * content-projection SLOT'u DEĞİL — `icon` girdisi (bkz. `ConfirmDialog`'un\r\n * aynı deseni, `dialog/confirm-dialog.ts`): tone'a göre makul bir varsayılanı\r\n * var, tüketici farklı bir Material Symbol adı geçebilir ya da `icon=\"\"` ile\r\n * tamamen kapatabilir. Gerçek content-slot algılaması (`@ContentChild` +\r\n * \"sağlandı mı\" kontrolü) bu basit vakada gereksiz karmaşıklık.\r\n *\r\n * `role`: `danger`/`warning` kullanıcının DİKKATİNİ kesmesi gereken durumlar\r\n * — `role=\"alert\"` (assertive, ekran okuyucu anında keser). Diğer tonlar\r\n * `role=\"status\"` (polite, mevcut anonsu beklemeden araya girmez).\r\n */\r\n@Component({\r\n selector: 'mf-alert',\r\n exportAs: 'mfAlert',\r\n imports: [Button, Icon],\r\n host: { class: 'block' },\r\n template: `\r\n <div [class]=\"containerClasses()\" [attr.role]=\"role()\">\r\n @if (iconName()) {\r\n <span mfIcon [size]=\"20\" class=\"mt-0.5 shrink-0\">{{ iconName() }}</span>\r\n }\r\n <div class=\"min-w-0 flex-1\">\r\n @if (title()) {\r\n <p class=\"font-semibold\">{{ title() }}</p>\r\n }\r\n <div [class.mt-0.5]=\"title()\">\r\n <ng-content />\r\n </div>\r\n </div>\r\n @if (dismissible()) {\r\n <button\r\n mfButton\r\n appearance=\"text\"\r\n tone=\"neutral\"\r\n size=\"icon\"\r\n shape=\"square\"\r\n type=\"button\"\r\n class=\"-mt-1 -me-1 shrink-0\"\r\n [attr.aria-label]=\"effectiveDismissLabel()\"\r\n (click)=\"dismissed.emit()\"\r\n >\r\n <span mfIcon [size]=\"16\">close</span>\r\n </button>\r\n }\r\n </div>\r\n `,\r\n})\r\nexport class Alert {\r\n readonly tone = input<MfTone>('neutral');\r\n readonly title = input('');\r\n /** `null` (varsayılan) → `tone`'a göre otomatik ikon. Boş string (`''`) → ikon YOK. Başka bir Material Symbol adı → onu kullan. */\r\n readonly icon = input<string | null>(null);\r\n readonly dismissible = input(false);\r\n readonly dismissLabel = input<string>();\r\n\r\n readonly dismissed = output<void>();\r\n\r\n private readonly injectedLabels = inject(MF_ALERT_LABELS);\r\n protected readonly effectiveDismissLabel = computed(\r\n () => this.dismissLabel() ?? this.injectedLabels().dismiss,\r\n );\r\n protected readonly containerClasses = computed(() => cn(alertVariants({ tone: this.tone() })));\r\n protected readonly role = computed(() => {\r\n const t = this.tone();\r\n return t === 'danger' || t === 'warning' ? 'alert' : 'status';\r\n });\r\n protected readonly iconName = computed(() => this.icon() ?? DEFAULT_ICON[this.tone()]);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAEA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,aAAa,GAAG,GAAG,CAAC,sDAAsD,EAAE;AACvF,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,OAAO,EAAE,sCAAsC;AAC/C,YAAA,OAAO,EAAE,uDAAuD;AAChE,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,OAAO,EAAE,wDAAwD;AACjE,YAAA,MAAM,EAAE,qDAAqD;AAC7D,YAAA,IAAI,EAAE,+CAA+C;AACrD,YAAA,IAAI,EAAE,+CAA+C;AACtD,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;AACrC,CAAA;;AC1BD,MAAM,YAAY,GAA2B;AAC3C,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,OAAO,EAAE,MAAM;AACf,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,MAAM,EAAE,OAAO;AACf,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EA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,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,UAAU;AACpB,oBAAA,QAAQ,EAAE,SAAS;AACnB,oBAAA,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC;AACvB,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;AACxB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,EAAA,CAAA;AACF,iBAAA;;;ACjED;;AAEG;;"}
@@ -0,0 +1,88 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, computed, Component } from '@angular/core';
3
+ import { MF_AVATAR_GROUP_LABELS, cn } from '@mesgflow/ui-kit/core';
4
+ import { Avatar } from '@mesgflow/ui-kit/avatar';
5
+
6
+ /** Avatar'ın KENDİ üç boyutuyla (bkz. avatar.ts `sizeClasses`) birebir eşleşir — "+N" göstergesi görsel olarak bir avatar GİBİ görünmeli. */
7
+ const SIZE_CLASSES = {
8
+ sm: 'h-7 w-7 text-xs',
9
+ md: 'h-9 w-9 text-sm',
10
+ lg: 'h-12 w-12 text-base',
11
+ };
12
+ /**
13
+ * `<mf-avatar-group [items]="teamMembers" [max]="5" />` — üst üste binen
14
+ * (`-space-x-2` + `ring-2 ring-surface` her avatarı komşusundan ayırır)
15
+ * bir avatar yığını. `max`'ı aşan üyeler tek bir "+N" göstergesine
16
+ * TOPLANIR (tıklanabilir değil — sadece özet; tam listeyi göstermek
17
+ * çağıranın kendi tooltip/popover'ına bırakılır).
18
+ */
19
+ class AvatarGroup {
20
+ items = input.required(/* @ts-ignore */
21
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
22
+ max = input(5, /* @ts-ignore */
23
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
24
+ size = input('md', /* @ts-ignore */
25
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
26
+ avatarGroupLabels = inject(MF_AVATAR_GROUP_LABELS);
27
+ effectiveOverflowLabel = computed(() => this.avatarGroupLabels().overflowAriaLabel, /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "effectiveOverflowLabel" }] : /* istanbul ignore next */ []));
29
+ visible = computed(() => this.items().slice(0, this.max()), /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
31
+ overflowCount = computed(() => Math.max(0, this.items().length - this.max()), /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "overflowCount" }] : /* istanbul ignore next */ []));
33
+ overflowClasses = computed(() => cn('inline-flex items-center justify-center rounded-full bg-surface-alt font-medium text-fg-muted ring-2 ring-surface', SIZE_CLASSES[this.size()]), /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "overflowClasses" }] : /* istanbul ignore next */ []));
35
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvatarGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: AvatarGroup, isStandalone: true, selector: "mf-avatar-group", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex items-center -space-x-2" }, exportAs: ["mfAvatarGroup"], ngImport: i0, template: `
37
+ @for (item of visible(); track item.name) {
38
+ <mf-avatar
39
+ [name]="item.name"
40
+ [src]="item.src ?? null"
41
+ [size]="size()"
42
+ class="ring-2 ring-surface"
43
+ />
44
+ }
45
+ @if (overflowCount() > 0) {
46
+ <span
47
+ [class]="overflowClasses()"
48
+ [attr.aria-label]="overflowCount() + ' ' + effectiveOverflowLabel()"
49
+ >
50
+ +{{ overflowCount() }}
51
+ </span>
52
+ }
53
+ `, isInline: true, dependencies: [{ kind: "component", type: Avatar, selector: "mf-avatar", inputs: ["name", "src", "size", "shape", "colorful", "tone"] }] });
54
+ }
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: AvatarGroup, decorators: [{
56
+ type: Component,
57
+ args: [{
58
+ selector: 'mf-avatar-group',
59
+ exportAs: 'mfAvatarGroup',
60
+ imports: [Avatar],
61
+ host: { class: 'flex items-center -space-x-2' },
62
+ template: `
63
+ @for (item of visible(); track item.name) {
64
+ <mf-avatar
65
+ [name]="item.name"
66
+ [src]="item.src ?? null"
67
+ [size]="size()"
68
+ class="ring-2 ring-surface"
69
+ />
70
+ }
71
+ @if (overflowCount() > 0) {
72
+ <span
73
+ [class]="overflowClasses()"
74
+ [attr.aria-label]="overflowCount() + ' ' + effectiveOverflowLabel()"
75
+ >
76
+ +{{ overflowCount() }}
77
+ </span>
78
+ }
79
+ `,
80
+ }]
81
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
82
+
83
+ /**
84
+ * Generated bundle index. Do not edit.
85
+ */
86
+
87
+ export { AvatarGroup };
88
+ //# sourceMappingURL=mesgflow-ui-kit-avatar-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesgflow-ui-kit-avatar-group.mjs","sources":["../../../projects/ui-kit/avatar-group/avatar-group.ts","../../../projects/ui-kit/avatar-group/mesgflow-ui-kit-avatar-group.ts"],"sourcesContent":["import { Component, computed, inject, input } from '@angular/core';\r\nimport { cn, MF_AVATAR_GROUP_LABELS } from '@mesgflow/ui-kit/core';\r\nimport { Avatar } from '@mesgflow/ui-kit/avatar';\r\n\r\nexport interface AvatarGroupItem {\r\n name: string;\r\n src?: string | null;\r\n}\r\n\r\n/** Avatar'ın KENDİ üç boyutuyla (bkz. avatar.ts `sizeClasses`) birebir eşleşir — \"+N\" göstergesi görsel olarak bir avatar GİBİ görünmeli. */\r\nconst SIZE_CLASSES: Record<'sm' | 'md' | 'lg', string> = {\r\n sm: 'h-7 w-7 text-xs',\r\n md: 'h-9 w-9 text-sm',\r\n lg: 'h-12 w-12 text-base',\r\n};\r\n\r\n/**\r\n * `<mf-avatar-group [items]=\"teamMembers\" [max]=\"5\" />` — üst üste binen\r\n * (`-space-x-2` + `ring-2 ring-surface` her avatarı komşusundan ayırır)\r\n * bir avatar yığını. `max`'ı aşan üyeler tek bir \"+N\" göstergesine\r\n * TOPLANIR (tıklanabilir değil — sadece özet; tam listeyi göstermek\r\n * çağıranın kendi tooltip/popover'ına bırakılır).\r\n */\r\n@Component({\r\n selector: 'mf-avatar-group',\r\n exportAs: 'mfAvatarGroup',\r\n imports: [Avatar],\r\n host: { class: 'flex items-center -space-x-2' },\r\n template: `\r\n @for (item of visible(); track item.name) {\r\n <mf-avatar\r\n [name]=\"item.name\"\r\n [src]=\"item.src ?? null\"\r\n [size]=\"size()\"\r\n class=\"ring-2 ring-surface\"\r\n />\r\n }\r\n @if (overflowCount() > 0) {\r\n <span\r\n [class]=\"overflowClasses()\"\r\n [attr.aria-label]=\"overflowCount() + ' ' + effectiveOverflowLabel()\"\r\n >\r\n +{{ overflowCount() }}\r\n </span>\r\n }\r\n `,\r\n})\r\nexport class AvatarGroup {\r\n readonly items = input.required<AvatarGroupItem[]>();\r\n readonly max = input(5);\r\n readonly size = input<'sm' | 'md' | 'lg'>('md');\r\n\r\n private readonly avatarGroupLabels = inject(MF_AVATAR_GROUP_LABELS);\r\n protected readonly effectiveOverflowLabel = computed(\r\n () => this.avatarGroupLabels().overflowAriaLabel,\r\n );\r\n\r\n protected readonly visible = computed(() => this.items().slice(0, this.max()));\r\n protected readonly overflowCount = computed(() => Math.max(0, this.items().length - this.max()));\r\n\r\n protected readonly overflowClasses = computed(() =>\r\n cn(\r\n 'inline-flex items-center justify-center rounded-full bg-surface-alt font-medium text-fg-muted ring-2 ring-surface',\r\n SIZE_CLASSES[this.size()],\r\n ),\r\n );\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AASA;AACA,MAAM,YAAY,GAAuC;AACvD,IAAA,EAAE,EAAE,iBAAiB;AACrB,IAAA,EAAE,EAAE,iBAAiB;AACrB,IAAA,EAAE,EAAE,qBAAqB;CAC1B;AAED;;;;;;AAMG;MAyBU,WAAW,CAAA;IACb,KAAK,GAAG,KAAK,CAAC,QAAQ;8EAAqB;IAC3C,GAAG,GAAG,KAAK,CAAC,CAAC;4EAAC;IACd,IAAI,GAAG,KAAK,CAAqB,IAAI;6EAAC;AAE9B,IAAA,iBAAiB,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAChD,sBAAsB,GAAG,QAAQ,CAClD,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC,iBAAiB;+FACjD;AAEkB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;gFAAC;IAC3D,aAAa,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;sFAAC;AAE7E,IAAA,eAAe,GAAG,QAAQ,CAAC,MAC5C,EAAE,CACA,mHAAmH,EACnH,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAC1B;wFACF;uGAlBU,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA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