@kirbydesign/designsystem 11.11.3-dev-e7cb27f → 12.0.0-dev-67d5287

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 (282) hide show
  1. package/fesm2022/kirbydesign-designsystem-accordion.mjs +246 -135
  2. package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
  3. package/fesm2022/kirbydesign-designsystem-action-group.mjs +229 -134
  4. package/fesm2022/kirbydesign-designsystem-action-group.mjs.map +1 -1
  5. package/fesm2022/kirbydesign-designsystem-avatar.mjs +102 -55
  6. package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
  7. package/fesm2022/kirbydesign-designsystem-badge.mjs +85 -42
  8. package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
  9. package/fesm2022/kirbydesign-designsystem-button.mjs +203 -170
  10. package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
  11. package/fesm2022/kirbydesign-designsystem-calendar.mjs +524 -516
  12. package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
  13. package/fesm2022/kirbydesign-designsystem-card.mjs +439 -205
  14. package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
  15. package/fesm2022/kirbydesign-designsystem-chart.mjs +1388 -1469
  16. package/fesm2022/kirbydesign-designsystem-chart.mjs.map +1 -1
  17. package/fesm2022/kirbydesign-designsystem-checkbox.mjs +215 -176
  18. package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
  19. package/fesm2022/kirbydesign-designsystem-config.mjs +50 -96
  20. package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -1
  21. package/fesm2022/kirbydesign-designsystem-data-table.mjs +180 -83
  22. package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
  23. package/fesm2022/kirbydesign-designsystem-divider.mjs +46 -19
  24. package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
  25. package/fesm2022/kirbydesign-designsystem-dropdown.mjs +878 -752
  26. package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
  27. package/fesm2022/kirbydesign-designsystem-empty-state.mjs +164 -91
  28. package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
  29. package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +213 -85
  30. package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
  31. package/fesm2022/kirbydesign-designsystem-flag.mjs +67 -33
  32. package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
  33. package/fesm2022/kirbydesign-designsystem-form-field.mjs +1260 -901
  34. package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
  35. package/fesm2022/kirbydesign-designsystem-gesture.mjs +38 -23
  36. package/fesm2022/kirbydesign-designsystem-gesture.mjs.map +1 -1
  37. package/fesm2022/kirbydesign-designsystem-header.mjs +422 -182
  38. package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
  39. package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs +16 -14
  40. package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs.map +1 -1
  41. package/fesm2022/kirbydesign-designsystem-helpers.mjs +251 -361
  42. package/fesm2022/kirbydesign-designsystem-helpers.mjs.map +1 -1
  43. package/fesm2022/kirbydesign-designsystem-icon.mjs +881 -303
  44. package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
  45. package/fesm2022/kirbydesign-designsystem-item-group.mjs +52 -23
  46. package/fesm2022/kirbydesign-designsystem-item-group.mjs.map +1 -1
  47. package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +147 -43
  48. package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
  49. package/fesm2022/kirbydesign-designsystem-item.mjs +395 -151
  50. package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
  51. package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +136 -54
  52. package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
  53. package/fesm2022/kirbydesign-designsystem-list.mjs +1185 -697
  54. package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
  55. package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +166 -76
  56. package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
  57. package/fesm2022/kirbydesign-designsystem-menu.mjs +420 -311
  58. package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
  59. package/fesm2022/kirbydesign-designsystem-modal.mjs +2467 -1912
  60. package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
  61. package/fesm2022/kirbydesign-designsystem-page.mjs +1505 -923
  62. package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
  63. package/fesm2022/kirbydesign-designsystem-popover.mjs +203 -183
  64. package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
  65. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +209 -121
  66. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
  67. package/fesm2022/kirbydesign-designsystem-radio.mjs +537 -365
  68. package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
  69. package/fesm2022/kirbydesign-designsystem-range.mjs +207 -150
  70. package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
  71. package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +217 -104
  72. package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
  73. package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +113 -38
  74. package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
  75. package/fesm2022/kirbydesign-designsystem-section-header.mjs +56 -18
  76. package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
  77. package/fesm2022/kirbydesign-designsystem-segmented-control.mjs +276 -232
  78. package/fesm2022/kirbydesign-designsystem-segmented-control.mjs.map +1 -1
  79. package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +319 -382
  80. package/fesm2022/kirbydesign-designsystem-shared-floating.mjs.map +1 -1
  81. package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +73 -84
  82. package/fesm2022/kirbydesign-designsystem-shared-portal.mjs.map +1 -1
  83. package/fesm2022/kirbydesign-designsystem-shared.mjs +665 -529
  84. package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
  85. package/fesm2022/kirbydesign-designsystem-slide-button.mjs +140 -91
  86. package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
  87. package/fesm2022/kirbydesign-designsystem-slide.mjs +360 -158
  88. package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
  89. package/fesm2022/kirbydesign-designsystem-spinner.mjs +90 -32
  90. package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
  91. package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +348 -181
  92. package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
  93. package/fesm2022/kirbydesign-designsystem-tabs.mjs +286 -121
  94. package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
  95. package/fesm2022/kirbydesign-designsystem-testing-base.mjs +6232 -3164
  96. package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
  97. package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +118 -95
  98. package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs.map +1 -1
  99. package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +128 -101
  100. package/fesm2022/kirbydesign-designsystem-testing-jest.mjs.map +1 -1
  101. package/fesm2022/kirbydesign-designsystem-testing.mjs +236 -243
  102. package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
  103. package/fesm2022/kirbydesign-designsystem-toast.mjs +98 -62
  104. package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
  105. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +155 -127
  106. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
  107. package/fesm2022/kirbydesign-designsystem-toggle.mjs +180 -150
  108. package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
  109. package/fesm2022/kirbydesign-designsystem-types.mjs +39 -24
  110. package/fesm2022/kirbydesign-designsystem-types.mjs.map +1 -1
  111. package/fesm2022/kirbydesign-designsystem.mjs +516 -407
  112. package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
  113. package/icons/svg/megaphone.svg +3 -0
  114. package/package.json +10 -10
  115. package/readme.md +37 -0
  116. package/types/kirbydesign-designsystem-accordion.d.ts +72 -39
  117. package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -1
  118. package/types/kirbydesign-designsystem-action-group.d.ts +46 -39
  119. package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -1
  120. package/types/kirbydesign-designsystem-avatar.d.ts +62 -26
  121. package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
  122. package/types/kirbydesign-designsystem-badge.d.ts +30 -19
  123. package/types/kirbydesign-designsystem-badge.d.ts.map +1 -1
  124. package/types/kirbydesign-designsystem-button.d.ts +70 -45
  125. package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
  126. package/types/kirbydesign-designsystem-calendar.d.ts +193 -132
  127. package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
  128. package/types/kirbydesign-designsystem-card.d.ts +130 -66
  129. package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
  130. package/types/kirbydesign-designsystem-chart.d.ts +198 -172
  131. package/types/kirbydesign-designsystem-chart.d.ts.map +1 -1
  132. package/types/kirbydesign-designsystem-checkbox.d.ts +96 -68
  133. package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
  134. package/types/kirbydesign-designsystem-config.d.ts +17 -21
  135. package/types/kirbydesign-designsystem-config.d.ts.map +1 -1
  136. package/types/kirbydesign-designsystem-data-table.d.ts +46 -26
  137. package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -1
  138. package/types/kirbydesign-designsystem-divider.d.ts +11 -9
  139. package/types/kirbydesign-designsystem-divider.d.ts.map +1 -1
  140. package/types/kirbydesign-designsystem-dropdown.d.ts +219 -166
  141. package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
  142. package/types/kirbydesign-designsystem-empty-state.d.ts +47 -35
  143. package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
  144. package/types/kirbydesign-designsystem-fab-sheet.d.ts +34 -28
  145. package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -1
  146. package/types/kirbydesign-designsystem-flag.d.ts +18 -13
  147. package/types/kirbydesign-designsystem-flag.d.ts.map +1 -1
  148. package/types/kirbydesign-designsystem-form-field.d.ts +409 -242
  149. package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
  150. package/types/kirbydesign-designsystem-gesture.d.ts +41 -46
  151. package/types/kirbydesign-designsystem-gesture.d.ts.map +1 -1
  152. package/types/kirbydesign-designsystem-header.d.ts +102 -64
  153. package/types/kirbydesign-designsystem-header.d.ts.map +1 -1
  154. package/types/kirbydesign-designsystem-helpers-scss.d.ts +6 -8
  155. package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -1
  156. package/types/kirbydesign-designsystem-helpers.d.ts +83 -97
  157. package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -1
  158. package/types/kirbydesign-designsystem-icon.d.ts +63 -59
  159. package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
  160. package/types/kirbydesign-designsystem-item-group.d.ts +6 -9
  161. package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -1
  162. package/types/kirbydesign-designsystem-item-sliding.d.ts +30 -26
  163. package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -1
  164. package/types/kirbydesign-designsystem-item.d.ts +93 -54
  165. package/types/kirbydesign-designsystem-item.d.ts.map +1 -1
  166. package/types/kirbydesign-designsystem-kirby-app.d.ts +18 -19
  167. package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -1
  168. package/types/kirbydesign-designsystem-list.d.ts +387 -263
  169. package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
  170. package/types/kirbydesign-designsystem-loading-overlay.d.ts +35 -24
  171. package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -1
  172. package/types/kirbydesign-designsystem-menu.d.ts +119 -69
  173. package/types/kirbydesign-designsystem-menu.d.ts.map +1 -1
  174. package/types/kirbydesign-designsystem-modal.d.ts +577 -455
  175. package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
  176. package/types/kirbydesign-designsystem-page.d.ts +304 -229
  177. package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
  178. package/types/kirbydesign-designsystem-popover.d.ts +48 -40
  179. package/types/kirbydesign-designsystem-popover.d.ts.map +1 -1
  180. package/types/kirbydesign-designsystem-progress-circle.d.ts +60 -38
  181. package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
  182. package/types/kirbydesign-designsystem-radio.d.ts +147 -98
  183. package/types/kirbydesign-designsystem-radio.d.ts.map +1 -1
  184. package/types/kirbydesign-designsystem-range.d.ts +90 -45
  185. package/types/kirbydesign-designsystem-range.d.ts.map +1 -1
  186. package/types/kirbydesign-designsystem-reorder-list.d.ts +44 -32
  187. package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -1
  188. package/types/kirbydesign-designsystem-router-outlet.d.ts +23 -18
  189. package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -1
  190. package/types/kirbydesign-designsystem-section-header.d.ts +5 -8
  191. package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -1
  192. package/types/kirbydesign-designsystem-segmented-control.d.ts +123 -100
  193. package/types/kirbydesign-designsystem-segmented-control.d.ts.map +1 -1
  194. package/types/kirbydesign-designsystem-shared-floating.d.ts +183 -128
  195. package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -1
  196. package/types/kirbydesign-designsystem-shared-portal.d.ts +29 -28
  197. package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -1
  198. package/types/kirbydesign-designsystem-shared.d.ts +143 -139
  199. package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
  200. package/types/kirbydesign-designsystem-slide-button.d.ts +43 -34
  201. package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -1
  202. package/types/kirbydesign-designsystem-slide.d.ts +80 -59
  203. package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
  204. package/types/kirbydesign-designsystem-spinner.d.ts +13 -14
  205. package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -1
  206. package/types/kirbydesign-designsystem-tab-navigation.d.ts +78 -55
  207. package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -1
  208. package/types/kirbydesign-designsystem-tabs.d.ts +50 -45
  209. package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -1
  210. package/types/kirbydesign-designsystem-testing-base.d.ts +2430 -815
  211. package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
  212. package/types/kirbydesign-designsystem-testing-jasmine.d.ts +9 -10
  213. package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -1
  214. package/types/kirbydesign-designsystem-testing-jest.d.ts +9 -10
  215. package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -1
  216. package/types/kirbydesign-designsystem-testing.d.ts +52 -58
  217. package/types/kirbydesign-designsystem-testing.d.ts.map +1 -1
  218. package/types/kirbydesign-designsystem-toast.d.ts +25 -31
  219. package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
  220. package/types/kirbydesign-designsystem-toggle-button.d.ts +62 -56
  221. package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -1
  222. package/types/kirbydesign-designsystem-toggle.d.ts +71 -63
  223. package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -1
  224. package/types/kirbydesign-designsystem-types.d.ts +15 -22
  225. package/types/kirbydesign-designsystem-types.d.ts.map +1 -1
  226. package/types/kirbydesign-designsystem.d.ts +135 -123
  227. package/types/kirbydesign-designsystem.d.ts.map +1 -1
  228. package/accordion/package.json +0 -4
  229. package/action-group/package.json +0 -4
  230. package/avatar/package.json +0 -4
  231. package/badge/package.json +0 -4
  232. package/button/package.json +0 -4
  233. package/calendar/package.json +0 -4
  234. package/card/package.json +0 -4
  235. package/chart/package.json +0 -4
  236. package/checkbox/package.json +0 -4
  237. package/config/package.json +0 -4
  238. package/data-table/package.json +0 -4
  239. package/divider/package.json +0 -4
  240. package/dropdown/package.json +0 -4
  241. package/empty-state/package.json +0 -4
  242. package/fab-sheet/package.json +0 -4
  243. package/flag/package.json +0 -4
  244. package/form-field/package.json +0 -4
  245. package/gesture/package.json +0 -4
  246. package/header/package.json +0 -4
  247. package/helpers/package.json +0 -4
  248. package/helpers/scss/package.json +0 -4
  249. package/icon/package.json +0 -4
  250. package/item/package.json +0 -4
  251. package/item-group/package.json +0 -4
  252. package/item-sliding/package.json +0 -4
  253. package/kirby-app/package.json +0 -4
  254. package/list/package.json +0 -4
  255. package/loading-overlay/package.json +0 -4
  256. package/menu/package.json +0 -4
  257. package/modal/package.json +0 -4
  258. package/page/package.json +0 -4
  259. package/popover/package.json +0 -4
  260. package/progress-circle/package.json +0 -4
  261. package/radio/package.json +0 -4
  262. package/range/package.json +0 -4
  263. package/reorder-list/package.json +0 -4
  264. package/router-outlet/package.json +0 -4
  265. package/section-header/package.json +0 -4
  266. package/segmented-control/package.json +0 -4
  267. package/shared/floating/package.json +0 -4
  268. package/shared/package.json +0 -4
  269. package/shared/portal/package.json +0 -4
  270. package/slide/package.json +0 -4
  271. package/slide-button/package.json +0 -4
  272. package/spinner/package.json +0 -4
  273. package/tab-navigation/package.json +0 -4
  274. package/tabs/package.json +0 -4
  275. package/testing/package.json +0 -4
  276. package/testing-base/package.json +0 -4
  277. package/testing-jasmine/package.json +0 -4
  278. package/testing-jest/package.json +0 -4
  279. package/toast/package.json +0 -4
  280. package/toggle/package.json +0 -4
  281. package/toggle-button/package.json +0 -4
  282. package/types/package.json +0 -4
@@ -1,135 +1,230 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, ElementRef, HostBinding, ViewChild, ContentChildren, Input, Optional, Inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { ButtonComponent } from '@kirbydesign/designsystem/button';
4
- import { ItemComponent } from '@kirbydesign/designsystem/item';
5
- import { MenuComponent } from '@kirbydesign/designsystem/menu';
6
-
7
- const ACTIONGROUP_CONFIG = new InjectionToken('action-group.config');
8
- class ActionGroupComponent {
9
- get _align() {
10
- return 'align-' + this.align;
11
- }
12
- constructor(elementRef, renderer, config) {
13
- this.elementRef = elementRef;
14
- this.renderer = renderer;
15
- this.config = config;
16
- this.align = 'end';
17
- this._collapsedActions = [];
18
- this.collapseThreshold = 2;
19
- }
20
- ngAfterContentInit() {
21
- // Ensure we collapse according to visibleActions if lower than our default threshold (2).
22
- // I.e. if there are 2 buttons and visibleActions = 1 we'll collapse the 2nd button into the menu:
23
- if (this.visibleActions < this.collapseThreshold) {
24
- this.collapseThreshold = this.visibleActions;
25
- }
26
- this.initializeFromConfig();
27
- if (this.visibleActions !== undefined) {
28
- this.initializeCollapsing();
29
- }
30
- }
31
- ngOnChanges(changes) {
32
- if (changes.visibleActions && !changes.visibleActions.firstChange) {
33
- const satifiesMaxVisibleActions = this.config?.maxVisibleActions === undefined ||
34
- this.config?.maxVisibleActions === null ||
35
- changes.visibleActions.currentValue <= this.config?.maxVisibleActions;
36
- if (satifiesMaxVisibleActions) {
37
- this.initializeCollapsing();
38
- }
39
- }
40
- }
41
- onActionSelect(action) {
42
- const event = new PointerEvent('click', {
43
- bubbles: true,
44
- cancelable: true,
45
- view: window,
46
- });
47
- action.button.dispatchEvent(event);
48
- }
49
- initializeFromConfig() {
50
- if (!this.config)
51
- return;
52
- if (this.visibleActions === undefined && this.config.defaultVisibleActions !== undefined) {
53
- this.visibleActions = this.config.defaultVisibleActions;
54
- }
55
- if (this.config.maxVisibleActions !== undefined) {
56
- // Don't overwrite visibleActions value if configured lower than maxVisibleActions:
57
- if (!(this.visibleActions < this.config.maxVisibleActions)) {
58
- this.visibleActions = this.config.maxVisibleActions;
59
- }
60
- }
61
- if (this.config.isCondensed) {
62
- this.buttons?.forEach((button) => (button.showIconOnly = true));
63
- }
64
- }
65
- initializeCollapsing() {
66
- if (this.buttonElements.length <= this.collapseThreshold)
67
- return;
68
- this.moveButtons();
69
- this.populateMenu();
70
- this.toggleMenu();
71
- }
72
- moveButtons() {
73
- const buttonsToShow = [...this.buttonElements]
74
- .slice(0, this.visibleActions)
75
- .filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement);
76
- buttonsToShow.forEach((button) => {
77
- this.renderer.insertBefore(this.elementRef.nativeElement, button.nativeElement, this.menuElement.nativeElement);
78
- });
79
- const buttonsToHide = [...this.buttonElements].slice(this.visibleActions);
80
- buttonsToHide.forEach((button) => {
81
- this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);
82
- });
83
- }
84
- toggleMenu() {
85
- const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;
86
- this._isCollapsed = hasHiddenButtons;
87
- }
88
- populateMenu() {
89
- const hiddenButtons = Array.from(this.hiddenLayer.nativeElement.children);
90
- this._collapsedActions = hiddenButtons.map((button) => ({
91
- button,
92
- text: button.textContent.trim(),
93
- }));
94
- }
95
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ActionGroupComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ACTIONGROUP_CONFIG, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
96
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: ActionGroupComponent, isStandalone: true, selector: "kirby-action-group", inputs: { visibleActions: "visibleActions", align: "align" }, host: { properties: { "class.is-collapsed": "this._isCollapsed", "class": "this._align" } }, queries: [{ propertyName: "buttonElements", predicate: ButtonComponent, read: ElementRef }, { propertyName: "buttons", predicate: ButtonComponent }], viewQueries: [{ propertyName: "hiddenLayer", first: true, predicate: ["hiddenLayer"], descendants: true, read: ElementRef, static: true }, { propertyName: "menuElement", first: true, predicate: MenuComponent, descendants: true, read: ElementRef, static: true }], usesOnChanges: true, ngImport: i0, template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex;flex-wrap:wrap;position:relative;gap:var(--kirby-spacing-xxs)}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}@media(max-width:767px){:host-context(kirby-header .actions.emphasize){justify-content:flex-start}}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"], dependencies: [{ kind: "component", type: ItemComponent, selector: "kirby-item", inputs: ["disabled", "selected", "disclosure", "selectable", "reorderable", "size", "href", "rotateIcon"] }, { kind: "component", type: MenuComponent, selector: "kirby-menu", inputs: ["isDisabled", "buttonSize", "placement", "attentionLevel", "triggers", "DOMPortalOutlet", "portalOutletConfig", "autoPlacement", "closeOnSelect", "closeOnEscapeKey", "closeOnBackdrop", "shift", "minWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
97
- }
98
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ActionGroupComponent, decorators: [{
99
- type: Component,
100
- args: [{ selector: 'kirby-action-group', imports: [ItemComponent, MenuComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex;flex-wrap:wrap;position:relative;gap:var(--kirby-spacing-xxs)}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}@media(max-width:767px){:host-context(kirby-header .actions.emphasize){justify-content:flex-start}}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"] }]
101
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
102
- type: Optional
103
- }, {
104
- type: Inject,
105
- args: [ACTIONGROUP_CONFIG]
106
- }] }], propDecorators: { visibleActions: [{
107
- type: Input
108
- }], align: [{
109
- type: Input
110
- }], buttonElements: [{
111
- type: ContentChildren,
112
- args: [ButtonComponent, { read: ElementRef }]
113
- }], buttons: [{
114
- type: ContentChildren,
115
- args: [ButtonComponent]
116
- }], hiddenLayer: [{
117
- type: ViewChild,
118
- args: ['hiddenLayer', { read: ElementRef, static: true }]
119
- }], menuElement: [{
120
- type: ViewChild,
121
- args: [MenuComponent, { read: ElementRef, static: true }]
122
- }], _isCollapsed: [{
123
- type: HostBinding,
124
- args: ['class.is-collapsed']
125
- }], _align: [{
126
- type: HostBinding,
127
- args: ['class']
128
- }] } });
129
-
130
- /**
131
- * Generated bundle index. Do not edit.
132
- */
133
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ContentChildren, ElementRef, HostBinding, Inject, InjectionToken, Input, Optional, ViewChild } from "@angular/core";
3
+ import { ButtonComponent } from "@kirbydesign/designsystem/button";
4
+ import { ItemComponent } from "@kirbydesign/designsystem/item";
5
+ import { MenuComponent } from "@kirbydesign/designsystem/menu";
6
+ const ACTIONGROUP_CONFIG = new InjectionToken("action-group.config");
7
+ var ActionGroupComponent = class ActionGroupComponent {
8
+ get _align() {
9
+ return "align-" + this.align;
10
+ }
11
+ constructor(elementRef, renderer, config) {
12
+ this.elementRef = elementRef;
13
+ this.renderer = renderer;
14
+ this.config = config;
15
+ this.align = "end";
16
+ this._collapsedActions = [];
17
+ this.collapseThreshold = 2;
18
+ }
19
+ ngAfterContentInit() {
20
+ if (this.visibleActions < this.collapseThreshold) this.collapseThreshold = this.visibleActions;
21
+ this.initializeFromConfig();
22
+ if (this.visibleActions !== void 0) this.initializeCollapsing();
23
+ }
24
+ ngOnChanges(changes) {
25
+ if (changes.visibleActions && !changes.visibleActions.firstChange) {
26
+ if (this.config?.maxVisibleActions === void 0 || this.config?.maxVisibleActions === null || changes.visibleActions.currentValue <= this.config?.maxVisibleActions) this.initializeCollapsing();
27
+ }
28
+ }
29
+ onActionSelect(action) {
30
+ const event = new PointerEvent("click", {
31
+ bubbles: true,
32
+ cancelable: true,
33
+ view: window
34
+ });
35
+ action.button.dispatchEvent(event);
36
+ }
37
+ initializeFromConfig() {
38
+ if (!this.config) return;
39
+ if (this.visibleActions === void 0 && this.config.defaultVisibleActions !== void 0) this.visibleActions = this.config.defaultVisibleActions;
40
+ if (this.config.maxVisibleActions !== void 0) {
41
+ if (!(this.visibleActions < this.config.maxVisibleActions)) this.visibleActions = this.config.maxVisibleActions;
42
+ }
43
+ if (this.config.isCondensed) this.buttons?.forEach((button) => button.showIconOnly = true);
44
+ }
45
+ initializeCollapsing() {
46
+ if (this.buttonElements.length <= this.collapseThreshold) return;
47
+ this.moveButtons();
48
+ this.populateMenu();
49
+ this.toggleMenu();
50
+ }
51
+ moveButtons() {
52
+ [...this.buttonElements].slice(0, this.visibleActions).filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement).forEach((button) => {
53
+ this.renderer.insertBefore(this.elementRef.nativeElement, button.nativeElement, this.menuElement.nativeElement);
54
+ });
55
+ [...this.buttonElements].slice(this.visibleActions).forEach((button) => {
56
+ this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);
57
+ });
58
+ }
59
+ toggleMenu() {
60
+ const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;
61
+ this._isCollapsed = hasHiddenButtons;
62
+ }
63
+ populateMenu() {
64
+ const hiddenButtons = Array.from(this.hiddenLayer.nativeElement.children);
65
+ this._collapsedActions = hiddenButtons.map((button) => ({
66
+ button,
67
+ text: button.textContent.trim()
68
+ }));
69
+ }
70
+ static {
71
+ this.ɵfac = i0.ɵɵngDeclareFactory({
72
+ minVersion: "12.0.0",
73
+ version: "22.2.2",
74
+ ngImport: i0,
75
+ type: ActionGroupComponent,
76
+ deps: [
77
+ { token: i0.ElementRef },
78
+ { token: i0.Renderer2 },
79
+ {
80
+ token: ACTIONGROUP_CONFIG,
81
+ optional: true
82
+ }
83
+ ],
84
+ target: i0.ɵɵFactoryTarget.Component
85
+ });
86
+ }
87
+ static {
88
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
89
+ minVersion: "17.0.0",
90
+ version: "22.2.2",
91
+ type: ActionGroupComponent,
92
+ isStandalone: true,
93
+ selector: "kirby-action-group",
94
+ inputs: {
95
+ visibleActions: "visibleActions",
96
+ align: "align"
97
+ },
98
+ host: { properties: {
99
+ "class.is-collapsed": "this._isCollapsed",
100
+ "class": "this._align"
101
+ } },
102
+ queries: [{
103
+ propertyName: "buttonElements",
104
+ predicate: ButtonComponent,
105
+ read: ElementRef
106
+ }, {
107
+ propertyName: "buttons",
108
+ predicate: ButtonComponent
109
+ }],
110
+ viewQueries: [{
111
+ propertyName: "hiddenLayer",
112
+ first: true,
113
+ predicate: ["hiddenLayer"],
114
+ descendants: true,
115
+ read: ElementRef,
116
+ static: true
117
+ }, {
118
+ propertyName: "menuElement",
119
+ first: true,
120
+ predicate: MenuComponent,
121
+ descendants: true,
122
+ read: ElementRef,
123
+ static: true
124
+ }],
125
+ usesOnChanges: true,
126
+ ngImport: i0,
127
+ template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n",
128
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex;flex-wrap:wrap;position:relative;gap:var(--kirby-spacing-xxs)}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}@media(max-width:767px){:host-context(kirby-header .actions.emphasize){justify-content:flex-start}}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"],
129
+ dependencies: [{
130
+ kind: "component",
131
+ type: ItemComponent,
132
+ selector: "kirby-item",
133
+ inputs: [
134
+ "disabled",
135
+ "selected",
136
+ "disclosure",
137
+ "selectable",
138
+ "reorderable",
139
+ "size",
140
+ "href",
141
+ "rotateIcon"
142
+ ]
143
+ }, {
144
+ kind: "component",
145
+ type: MenuComponent,
146
+ selector: "kirby-menu",
147
+ inputs: [
148
+ "isDisabled",
149
+ "buttonSize",
150
+ "placement",
151
+ "attentionLevel",
152
+ "triggers",
153
+ "DOMPortalOutlet",
154
+ "portalOutletConfig",
155
+ "autoPlacement",
156
+ "closeOnSelect",
157
+ "closeOnEscapeKey",
158
+ "closeOnBackdrop",
159
+ "shift",
160
+ "minWidth"
161
+ ]
162
+ }],
163
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
164
+ });
165
+ }
166
+ };
167
+ i0.ɵɵngDeclareClassMetadata({
168
+ minVersion: "12.0.0",
169
+ version: "22.2.2",
170
+ ngImport: i0,
171
+ type: ActionGroupComponent,
172
+ decorators: [{
173
+ type: Component,
174
+ args: [{
175
+ selector: "kirby-action-group",
176
+ imports: [ItemComponent, MenuComponent],
177
+ changeDetection: ChangeDetectionStrategy.OnPush,
178
+ template: "<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n",
179
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:flex;flex-wrap:wrap;position:relative;gap:var(--kirby-spacing-xxs)}:host(.align-end){justify-content:flex-end}:host(.align-end) .hidden-layer{order:-1}@media(max-width:767px){:host-context(kirby-header .actions.emphasize){justify-content:flex-start}}.hidden-layer{display:none;visibility:hidden}kirby-menu{display:none;z-index:1}:host(.is-collapsed) kirby-menu{display:inline-block}\n"]
180
+ }]
181
+ }],
182
+ ctorParameters: () => [
183
+ { type: i0.ElementRef },
184
+ { type: i0.Renderer2 },
185
+ {
186
+ type: void 0,
187
+ decorators: [{ type: Optional }, {
188
+ type: Inject,
189
+ args: [ACTIONGROUP_CONFIG]
190
+ }]
191
+ }
192
+ ],
193
+ propDecorators: {
194
+ visibleActions: [{ type: Input }],
195
+ align: [{ type: Input }],
196
+ buttonElements: [{
197
+ type: ContentChildren,
198
+ args: [ButtonComponent, { read: ElementRef }]
199
+ }],
200
+ buttons: [{
201
+ type: ContentChildren,
202
+ args: [ButtonComponent]
203
+ }],
204
+ hiddenLayer: [{
205
+ type: ViewChild,
206
+ args: ["hiddenLayer", {
207
+ read: ElementRef,
208
+ static: true
209
+ }]
210
+ }],
211
+ menuElement: [{
212
+ type: ViewChild,
213
+ args: [MenuComponent, {
214
+ read: ElementRef,
215
+ static: true
216
+ }]
217
+ }],
218
+ _isCollapsed: [{
219
+ type: HostBinding,
220
+ args: ["class.is-collapsed"]
221
+ }],
222
+ _align: [{
223
+ type: HostBinding,
224
+ args: ["class"]
225
+ }]
226
+ }
227
+ });
134
228
  export { ACTIONGROUP_CONFIG, ActionGroupComponent };
135
- //# sourceMappingURL=kirbydesign-designsystem-action-group.mjs.map
229
+
230
+ //# sourceMappingURL=kirbydesign-designsystem-action-group.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-designsystem-action-group.mjs","sources":["../../action-group/src/action-group.component.ts","../../action-group/src/action-group.component.html","../../action-group/src/kirbydesign-designsystem-action-group.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n Optional,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { ItemComponent } from '@kirbydesign/designsystem/item';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\n\nexport type ActionGroupConfig = {\n isCondensed?: boolean;\n defaultVisibleActions?: number;\n maxVisibleActions?: number;\n};\nexport const ACTIONGROUP_CONFIG = new InjectionToken<ActionGroupConfig>('action-group.config');\n\ntype CollapsedAction = { button: HTMLButtonElement; text: string };\n\n@Component({\n selector: 'kirby-action-group',\n imports: [ItemComponent, MenuComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './action-group.component.html',\n styleUrls: ['./action-group.component.scss'],\n})\nexport class ActionGroupComponent implements AfterContentInit, OnChanges {\n @Input() visibleActions?: number;\n\n @Input()\n align: 'start' | 'end' = 'end';\n\n @ContentChildren(ButtonComponent, { read: ElementRef }) private buttonElements?: QueryList<\n ElementRef<HTMLButtonElement>\n >;\n @ContentChildren(ButtonComponent) private buttons?: QueryList<ButtonComponent>;\n @ViewChild('hiddenLayer', { read: ElementRef, static: true })\n private hiddenLayer!: ElementRef<HTMLElement>;\n\n @ViewChild(MenuComponent, { read: ElementRef, static: true })\n private menuElement!: ElementRef<HTMLElement>;\n\n @HostBinding('class.is-collapsed')\n _isCollapsed: boolean;\n _collapsedActions: CollapsedAction[] = [];\n\n @HostBinding('class')\n get _align() {\n return 'align-' + this.align;\n }\n\n private collapseThreshold = 2;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n @Optional() @Inject(ACTIONGROUP_CONFIG) private config: ActionGroupConfig\n ) {}\n\n ngAfterContentInit(): void {\n // Ensure we collapse according to visibleActions if lower than our default threshold (2).\n // I.e. if there are 2 buttons and visibleActions = 1 we'll collapse the 2nd button into the menu:\n if (this.visibleActions < this.collapseThreshold) {\n this.collapseThreshold = this.visibleActions;\n }\n\n this.initializeFromConfig();\n\n if (this.visibleActions !== undefined) {\n this.initializeCollapsing();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.visibleActions && !changes.visibleActions.firstChange) {\n const satifiesMaxVisibleActions =\n this.config?.maxVisibleActions === undefined ||\n this.config?.maxVisibleActions === null ||\n changes.visibleActions.currentValue <= this.config?.maxVisibleActions;\n if (satifiesMaxVisibleActions) {\n this.initializeCollapsing();\n }\n }\n }\n\n onActionSelect(action: CollapsedAction) {\n const event = new PointerEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n\n action.button.dispatchEvent(event);\n }\n\n private initializeFromConfig() {\n if (!this.config) return;\n\n if (this.visibleActions === undefined && this.config.defaultVisibleActions !== undefined) {\n this.visibleActions = this.config.defaultVisibleActions;\n }\n\n if (this.config.maxVisibleActions !== undefined) {\n // Don't overwrite visibleActions value if configured lower than maxVisibleActions:\n if (!(this.visibleActions < this.config.maxVisibleActions)) {\n this.visibleActions = this.config.maxVisibleActions;\n }\n }\n\n if (this.config.isCondensed) {\n this.buttons?.forEach((button) => (button.showIconOnly = true));\n }\n }\n\n private initializeCollapsing() {\n if (this.buttonElements.length <= this.collapseThreshold) return;\n\n this.moveButtons();\n this.populateMenu();\n this.toggleMenu();\n }\n\n private moveButtons() {\n const buttonsToShow = [...this.buttonElements]\n .slice(0, this.visibleActions)\n .filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement);\n buttonsToShow.forEach((button) => {\n this.renderer.insertBefore(\n this.elementRef.nativeElement,\n button.nativeElement,\n this.menuElement.nativeElement\n );\n });\n\n const buttonsToHide = [...this.buttonElements].slice(this.visibleActions);\n buttonsToHide.forEach((button) => {\n this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);\n });\n }\n\n private toggleMenu() {\n const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;\n this._isCollapsed = hasHiddenButtons;\n }\n\n private populateMenu() {\n const hiddenButtons = Array.from(\n this.hiddenLayer.nativeElement.children\n ) as HTMLButtonElement[];\n\n this._collapsedActions = hiddenButtons.map((button) => ({\n button,\n text: button.textContent.trim(),\n }));\n }\n}\n","<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MA0Ba,kBAAkB,GAAG,IAAI,cAAc,CAAoB,qBAAqB;MAWhF,oBAAoB,CAAA;AAoB/B,IAAA,IACI,MAAM,GAAA;AACR,QAAA,OAAO,QAAQ,GAAG,IAAI,CAAC,KAAK;IAC9B;AAIA,IAAA,WAAA,CACU,UAAmC,EACnC,QAAmB,EACqB,MAAyB,EAAA;QAFjE,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,C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AU,EAAE;;sBAGrD,eAAe;uBAAC,eAAe;;sBAC/B,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,SAAS;uBAAC,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE;;sBAG3D,WAAW;uBAAC,oBAAoB;;sBAIhC,WAAW;uBAAC,OAAO;;;AEzDtB;;AAEG;;;;"}
1
+ {"version":3,"file":"kirbydesign-designsystem-action-group.mjs","names":[],"sources":["../../action-group/src/action-group.component.ts","../../action-group/src/action-group.component.html"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n OnChanges,\n Optional,\n QueryList,\n Renderer2,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { ItemComponent } from '@kirbydesign/designsystem/item';\nimport { MenuComponent } from '@kirbydesign/designsystem/menu';\n\nexport type ActionGroupConfig = {\n isCondensed?: boolean;\n defaultVisibleActions?: number;\n maxVisibleActions?: number;\n};\nexport const ACTIONGROUP_CONFIG = new InjectionToken<ActionGroupConfig>('action-group.config');\n\ntype CollapsedAction = { button: HTMLButtonElement; text: string };\n\n@Component({\n selector: 'kirby-action-group',\n imports: [ItemComponent, MenuComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './action-group.component.html',\n styleUrls: ['./action-group.component.scss'],\n})\nexport class ActionGroupComponent implements AfterContentInit, OnChanges {\n @Input() visibleActions?: number;\n\n @Input()\n align: 'start' | 'end' = 'end';\n\n @ContentChildren(ButtonComponent, { read: ElementRef }) private buttonElements?: QueryList<\n ElementRef<HTMLButtonElement>\n >;\n @ContentChildren(ButtonComponent) private buttons?: QueryList<ButtonComponent>;\n @ViewChild('hiddenLayer', { read: ElementRef, static: true })\n private hiddenLayer!: ElementRef<HTMLElement>;\n\n @ViewChild(MenuComponent, { read: ElementRef, static: true })\n private menuElement!: ElementRef<HTMLElement>;\n\n @HostBinding('class.is-collapsed')\n _isCollapsed: boolean;\n _collapsedActions: CollapsedAction[] = [];\n\n @HostBinding('class')\n get _align() {\n return 'align-' + this.align;\n }\n\n private collapseThreshold = 2;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2,\n @Optional() @Inject(ACTIONGROUP_CONFIG) private config: ActionGroupConfig\n ) {}\n\n ngAfterContentInit(): void {\n // Ensure we collapse according to visibleActions if lower than our default threshold (2).\n // I.e. if there are 2 buttons and visibleActions = 1 we'll collapse the 2nd button into the menu:\n if (this.visibleActions < this.collapseThreshold) {\n this.collapseThreshold = this.visibleActions;\n }\n\n this.initializeFromConfig();\n\n if (this.visibleActions !== undefined) {\n this.initializeCollapsing();\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.visibleActions && !changes.visibleActions.firstChange) {\n const satifiesMaxVisibleActions =\n this.config?.maxVisibleActions === undefined ||\n this.config?.maxVisibleActions === null ||\n changes.visibleActions.currentValue <= this.config?.maxVisibleActions;\n if (satifiesMaxVisibleActions) {\n this.initializeCollapsing();\n }\n }\n }\n\n onActionSelect(action: CollapsedAction) {\n const event = new PointerEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n });\n\n action.button.dispatchEvent(event);\n }\n\n private initializeFromConfig() {\n if (!this.config) return;\n\n if (this.visibleActions === undefined && this.config.defaultVisibleActions !== undefined) {\n this.visibleActions = this.config.defaultVisibleActions;\n }\n\n if (this.config.maxVisibleActions !== undefined) {\n // Don't overwrite visibleActions value if configured lower than maxVisibleActions:\n if (!(this.visibleActions < this.config.maxVisibleActions)) {\n this.visibleActions = this.config.maxVisibleActions;\n }\n }\n\n if (this.config.isCondensed) {\n this.buttons?.forEach((button) => (button.showIconOnly = true));\n }\n }\n\n private initializeCollapsing() {\n if (this.buttonElements.length <= this.collapseThreshold) return;\n\n this.moveButtons();\n this.populateMenu();\n this.toggleMenu();\n }\n\n private moveButtons() {\n const buttonsToShow = [...this.buttonElements]\n .slice(0, this.visibleActions)\n .filter((btn) => btn.nativeElement.parentElement === this.hiddenLayer.nativeElement);\n buttonsToShow.forEach((button) => {\n this.renderer.insertBefore(\n this.elementRef.nativeElement,\n button.nativeElement,\n this.menuElement.nativeElement\n );\n });\n\n const buttonsToHide = [...this.buttonElements].slice(this.visibleActions);\n buttonsToHide.forEach((button) => {\n this.renderer.appendChild(this.hiddenLayer.nativeElement, button.nativeElement);\n });\n }\n\n private toggleMenu() {\n const hasHiddenButtons = this.hiddenLayer.nativeElement.childElementCount > 0;\n this._isCollapsed = hasHiddenButtons;\n }\n\n private populateMenu() {\n const hiddenButtons = Array.from(\n this.hiddenLayer.nativeElement.children\n ) as HTMLButtonElement[];\n\n this._collapsedActions = hiddenButtons.map((button) => ({\n button,\n text: button.textContent.trim(),\n }));\n }\n}\n","<ng-content select=\"button[kirby-button]\"></ng-content>\n\n<kirby-menu [placement]=\"'bottom-end'\">\n @for (action of _collapsedActions; track action.text) {\n <kirby-item\n [selectable]=\"true\"\n [disabled]=\"action.button?.disabled\"\n (click)=\"onActionSelect(action)\"\n >\n {{ action.text }}\n </kirby-item>\n }\n</kirby-menu>\n\n<div class=\"hidden-layer\" #hiddenLayer></div>\n"],"mappings":";;;;;AA0BA,MAAa,qBAAqB,IAAI,eAAkC,qBAAqB;AAW7F,IAAa,uBAAb,MAAa,qBAAoB;CAoB/B,IACI,SAAM;EACR,OAAO,WAAW,KAAK;CACzB;CAIA,YACU,YACA,UACwC,QAAyB;EAFjE,KAAA,aAAA;EACA,KAAA,WAAA;EACwC,KAAA,SAAA;EA1BlD,KAAA,QAAyB;EAczB,KAAA,oBAAuC,CAAA;EAO/B,KAAA,oBAAoB;CAMzB;CAEH,qBAAkB;EAGhB,IAAI,KAAK,iBAAiB,KAAK,mBAC7B,KAAK,oBAAoB,KAAK;EAGhC,KAAK,qBAAo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KAAA;IAAA;GAAA,GAAA;IAAA,MAAA;IAAA,MAAE;IAAa,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAK3B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAPhC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,SACrB,CAAC,eAAe,aAAa;GAAC,iBACtB,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,6gBAAA;EAAA,CAAA;;;;;;;GAkC5C,YAAA,CAAA,EAAA,MAAA,SAAA,GAAA;IAAY,MAAA;IAAO,MAAA,CAAA,kBAAkB;;;;;EA7BvC,gBAAA,CAAA,EAAA,MAAA,MAAA,CAAA;EAEA,OAAA,CAAA,EAAA,MAAA,MAAA,CAAA;;GAGA,MAAA;GAAgB,MAAA,CAAA,iBAAiB,EAAE,MAAM,WAAU,CAAE;;;GAGrD,MAAA;GAAgB,MAAA,CAAA,eAAe;;;GAC/B,MAAA;GAAU,MAAA,CAAA,eAAe;IAAE,MAAM;IAAY,QAAQ;GAAI,CAAE;;;GAG3D,MAAA;GAAU,MAAA,CAAA,eAAe;IAAE,MAAM;IAAY,QAAQ;GAAI,CAAE;;;GAG3D,MAAA;GAAY,MAAA,CAAA,oBAAoB;;;GAIhC,MAAA;GAAY,MAAA,CAAA,OAAO"}
@@ -1,58 +1,105 @@
1
- import * as i1 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { EventEmitter, HostBinding, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
5
-
1
+ import * as i1 from "@angular/common";
2
+ import { CommonModule } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, Output } from "@angular/core";
6
5
  var AvatarSize;
7
- (function (AvatarSize) {
8
- AvatarSize["XS"] = "xs";
9
- AvatarSize["SM"] = "sm";
10
- AvatarSize["MD"] = "md";
11
- AvatarSize["LG"] = "lg";
6
+ (function(AvatarSize) {
7
+ AvatarSize["XS"] = "xs";
8
+ AvatarSize["SM"] = "sm";
9
+ AvatarSize["MD"] = "md";
10
+ AvatarSize["LG"] = "lg";
12
11
  })(AvatarSize || (AvatarSize = {}));
13
- class AvatarComponent {
14
- constructor() {
15
- this.size = AvatarSize.SM;
16
- this.imageError = new EventEmitter();
17
- }
18
- get _cssClass() {
19
- return [this.themeColor, this.size].filter((cssClass) => !!cssClass);
20
- }
21
- onImageError($event) {
22
- this.imageError.emit($event);
23
- }
24
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: AvatarComponent, isStandalone: true, selector: "kirby-avatar", inputs: { imageSrc: "imageSrc", imageLoading: "imageLoading", altText: "altText", stroke: "stroke", text: "text", overlay: "overlay", size: "size", themeColor: "themeColor" }, outputs: { imageError: "imageError" }, host: { properties: { "class": "this._cssClass" } }, ngImport: i0, template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-badge-position: absolute;--kirby-badge-right: calc(6px - .5rem) ;--kirby-badge-top: calc(6px - .5rem) ;--kirby-badge-z-index: var(--kirby-z-index-avatar-badge);position:relative}.avatar{width:40px;height:40px;border-radius:var(--kirby-border-radius-circle);overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-avatar-background-color, var(--kirby-white));color:var(--kirby-avatar-color, var(--kirby-light-contrast))}.avatar.stroke{border:1px solid var(--kirby-semi-light)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{--kirby-icon-font-size: 24px;width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{--kirby-icon-font-size: 24px;width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: calc(8px - .5rem) ;--kirby-badge-top: calc(8px - .5rem) }:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{--kirby-icon-font-size: 32px;width:56px;height:56px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:var(--kirby-font-size-m)}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: calc(14px - .5rem) ;--kirby-badge-top: calc(14px - .5rem) }:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{--kirby-icon-font-size: 56px;width:96px;height:96px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:var(--kirby-font-size-xl)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xs)}:host-context(kirby-item)[slot=start].xs{margin-inline-end:var(--kirby-spacing-s)}:host(.primary){--kirby-avatar-background-color: var(--kirby-primary);--kirby-avatar-color: var(--kirby-primary-contrast)}:host(.secondary){--kirby-avatar-background-color: var(--kirby-secondary);--kirby-avatar-color: var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-avatar-background-color: var(--kirby-tertiary);--kirby-avatar-color: var(--kirby-tertiary-contrast)}:host(.success){--kirby-avatar-background-color: var(--kirby-success);--kirby-avatar-color: var(--kirby-success-contrast)}:host(.warning){--kirby-avatar-background-color: var(--kirby-warning);--kirby-avatar-color: var(--kirby-warning-contrast)}:host(.danger){--kirby-avatar-background-color: var(--kirby-danger);--kirby-avatar-color: var(--kirby-danger-contrast)}:host(.white-overlay){--kirby-avatar-background-color: var(--kirby-white-overlay);--kirby-avatar-color: var(--kirby-white-overlay-contrast)}:host(.light){--kirby-avatar-background-color: var(--kirby-light);--kirby-avatar-color: var(--kirby-light-contrast)}:host(.medium){--kirby-avatar-background-color: var(--kirby-medium);--kirby-avatar-color: var(--kirby-medium-contrast)}:host(.dark){--kirby-avatar-background-color: var(--kirby-dark);--kirby-avatar-color: var(--kirby-dark-contrast)}:host(.dark-overlay){--kirby-avatar-background-color: var(--kirby-dark-overlay);--kirby-avatar-color: var(--kirby-dark-overlay-contrast)}:host(.white){--kirby-avatar-background-color: var(--kirby-white);--kirby-avatar-color: var(--kirby-white-contrast)}:host(.semi-light){--kirby-avatar-background-color: var(--kirby-semi-light);--kirby-avatar-color: var(--kirby-semi-light-contrast)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: AvatarComponent, decorators: [{
28
- type: Component,
29
- args: [{ imports: [CommonModule], selector: 'kirby-avatar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay, stroke: stroke }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-badge-position: absolute;--kirby-badge-right: calc(6px - .5rem) ;--kirby-badge-top: calc(6px - .5rem) ;--kirby-badge-z-index: var(--kirby-z-index-avatar-badge);position:relative}.avatar{width:40px;height:40px;border-radius:var(--kirby-border-radius-circle);overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-avatar-background-color, var(--kirby-white));color:var(--kirby-avatar-color, var(--kirby-light-contrast))}.avatar.stroke{border:1px solid var(--kirby-semi-light)}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{--kirby-icon-font-size: 24px;width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{--kirby-icon-font-size: 24px;width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: calc(8px - .5rem) ;--kirby-badge-top: calc(8px - .5rem) }:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{--kirby-icon-font-size: 32px;width:56px;height:56px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:var(--kirby-font-size-m)}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: calc(14px - .5rem) ;--kirby-badge-top: calc(14px - .5rem) }:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{--kirby-icon-font-size: 56px;width:96px;height:96px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:var(--kirby-font-size-xl)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xs)}:host-context(kirby-item)[slot=start].xs{margin-inline-end:var(--kirby-spacing-s)}:host(.primary){--kirby-avatar-background-color: var(--kirby-primary);--kirby-avatar-color: var(--kirby-primary-contrast)}:host(.secondary){--kirby-avatar-background-color: var(--kirby-secondary);--kirby-avatar-color: var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-avatar-background-color: var(--kirby-tertiary);--kirby-avatar-color: var(--kirby-tertiary-contrast)}:host(.success){--kirby-avatar-background-color: var(--kirby-success);--kirby-avatar-color: var(--kirby-success-contrast)}:host(.warning){--kirby-avatar-background-color: var(--kirby-warning);--kirby-avatar-color: var(--kirby-warning-contrast)}:host(.danger){--kirby-avatar-background-color: var(--kirby-danger);--kirby-avatar-color: var(--kirby-danger-contrast)}:host(.white-overlay){--kirby-avatar-background-color: var(--kirby-white-overlay);--kirby-avatar-color: var(--kirby-white-overlay-contrast)}:host(.light){--kirby-avatar-background-color: var(--kirby-light);--kirby-avatar-color: var(--kirby-light-contrast)}:host(.medium){--kirby-avatar-background-color: var(--kirby-medium);--kirby-avatar-color: var(--kirby-medium-contrast)}:host(.dark){--kirby-avatar-background-color: var(--kirby-dark);--kirby-avatar-color: var(--kirby-dark-contrast)}:host(.dark-overlay){--kirby-avatar-background-color: var(--kirby-dark-overlay);--kirby-avatar-color: var(--kirby-dark-overlay-contrast)}:host(.white){--kirby-avatar-background-color: var(--kirby-white);--kirby-avatar-color: var(--kirby-white-contrast)}:host(.semi-light){--kirby-avatar-background-color: var(--kirby-semi-light);--kirby-avatar-color: var(--kirby-semi-light-contrast)}\n"] }]
30
- }], propDecorators: { imageSrc: [{
31
- type: Input
32
- }], imageLoading: [{
33
- type: Input
34
- }], altText: [{
35
- type: Input
36
- }], stroke: [{
37
- type: Input
38
- }], text: [{
39
- type: Input
40
- }], overlay: [{
41
- type: Input
42
- }], size: [{
43
- type: Input
44
- }], themeColor: [{
45
- type: Input
46
- }], imageError: [{
47
- type: Output
48
- }], _cssClass: [{
49
- type: HostBinding,
50
- args: ['class']
51
- }] } });
52
-
53
- /**
54
- * Generated bundle index. Do not edit.
55
- */
56
-
12
+ var AvatarComponent = class AvatarComponent {
13
+ constructor() {
14
+ this.size = AvatarSize.SM;
15
+ this.imageError = new EventEmitter();
16
+ }
17
+ set stroke(_value) {
18
+ console.warn(`[Kirby Avatar] The 'stroke' input is deprecated and no longer has any effect.
19
+ The avatar now always has an outline. This input will be removed in a future major version.`);
20
+ }
21
+ get _cssClass() {
22
+ return [this.themeColor, this.size].filter((cssClass) => !!cssClass);
23
+ }
24
+ onImageError($event) {
25
+ this.imageError.emit($event);
26
+ }
27
+ static {
28
+ this.ɵfac = i0.ɵɵngDeclareFactory({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.2",
31
+ ngImport: i0,
32
+ type: AvatarComponent,
33
+ deps: [],
34
+ target: i0.ɵɵFactoryTarget.Component
35
+ });
36
+ }
37
+ static {
38
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
39
+ minVersion: "17.0.0",
40
+ version: "22.2.2",
41
+ type: AvatarComponent,
42
+ isStandalone: true,
43
+ selector: "kirby-avatar",
44
+ inputs: {
45
+ imageSrc: "imageSrc",
46
+ imageLoading: "imageLoading",
47
+ altText: "altText",
48
+ stroke: "stroke",
49
+ text: "text",
50
+ overlay: "overlay",
51
+ size: "size",
52
+ themeColor: "themeColor"
53
+ },
54
+ outputs: { imageError: "imageError" },
55
+ host: { properties: { "class": "this._cssClass" } },
56
+ ngImport: i0,
57
+ template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n",
58
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-badge-position: absolute;--kirby-badge-right: calc(6px - .5rem) ;--kirby-badge-top: calc(6px - .5rem) ;--kirby-badge-z-index: var(--kirby-z-index-avatar-badge);position:relative}.avatar{width:40px;height:40px;border:1px solid var(--kirby-color-border-raised-quiet);border-radius:var(--kirby-border-radius-circle);box-sizing:border-box;overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-avatar-background-color, var(--kirby-color-fill-raised));color:var(--kirby-avatar-color, var(--kirby-color-content-raised))}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{--kirby-icon-font-size: 24px;width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{--kirby-icon-font-size: 24px;width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: calc(8px - .5rem) ;--kirby-badge-top: calc(8px - .5rem) }:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{--kirby-icon-font-size: 32px;width:56px;height:56px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:var(--kirby-font-size-m)}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: calc(14px - .5rem) ;--kirby-badge-top: calc(14px - .5rem) }:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{--kirby-icon-font-size: 56px;width:96px;height:96px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:var(--kirby-font-size-xl)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xs)}:host-context(kirby-item)[slot=start].xs{margin-inline-end:var(--kirby-spacing-s)}:host(.primary){--kirby-avatar-background-color: var(--kirby-primary);--kirby-avatar-color: var(--kirby-primary-contrast)}:host(.secondary){--kirby-avatar-background-color: var(--kirby-secondary);--kirby-avatar-color: var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-avatar-background-color: var(--kirby-tertiary);--kirby-avatar-color: var(--kirby-tertiary-contrast)}:host(.success){--kirby-avatar-background-color: var(--kirby-success);--kirby-avatar-color: var(--kirby-success-contrast)}:host(.warning){--kirby-avatar-background-color: var(--kirby-warning);--kirby-avatar-color: var(--kirby-warning-contrast)}:host(.danger){--kirby-avatar-background-color: var(--kirby-danger);--kirby-avatar-color: var(--kirby-danger-contrast)}:host(.white-overlay){--kirby-avatar-background-color: var(--kirby-white-overlay);--kirby-avatar-color: var(--kirby-white-overlay-contrast)}:host(.light){--kirby-avatar-background-color: var(--kirby-color-fill-raised);--kirby-avatar-color: var(--kirby-color-content-raised)}:host(.medium){--kirby-avatar-background-color: var(--kirby-medium);--kirby-avatar-color: var(--kirby-medium-contrast)}:host(.dark){--kirby-avatar-background-color: var(--kirby-dark);--kirby-avatar-color: var(--kirby-dark-contrast)}:host(.dark-overlay){--kirby-avatar-background-color: var(--kirby-dark-overlay);--kirby-avatar-color: var(--kirby-dark-overlay-contrast)}:host(.white){--kirby-avatar-background-color: var(--kirby-color-fill-raised);--kirby-avatar-color: var(--kirby-color-content-raised)}:host(.semi-light){--kirby-avatar-background-color: var(--kirby-semi-light);--kirby-avatar-color: var(--kirby-semi-light-contrast)}\n"],
59
+ dependencies: [{
60
+ kind: "ngmodule",
61
+ type: CommonModule
62
+ }, {
63
+ kind: "directive",
64
+ type: i1.NgClass,
65
+ selector: "[ngClass]",
66
+ inputs: ["class", "ngClass"]
67
+ }],
68
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
69
+ });
70
+ }
71
+ };
72
+ i0.ɵɵngDeclareClassMetadata({
73
+ minVersion: "12.0.0",
74
+ version: "22.2.2",
75
+ ngImport: i0,
76
+ type: AvatarComponent,
77
+ decorators: [{
78
+ type: Component,
79
+ args: [{
80
+ imports: [CommonModule],
81
+ selector: "kirby-avatar",
82
+ changeDetection: ChangeDetectionStrategy.OnPush,
83
+ template: "<div class=\"avatar\" [ngClass]=\"{ overlay: overlay }\">\n @if (imageSrc) {\n <img\n [src]=\"imageSrc\"\n [attr.alt]=\"altText\"\n [attr.loading]=\"imageLoading\"\n (error)=\"onImageError($event)\"\n />\n }\n @if (!text) {\n <ng-content select=\"kirby-icon\"></ng-content>\n }\n @if (text) {\n <span class=\"avatar-text\">{{ text }}</span>\n }\n</div>\n<ng-content select=\"kirby-badge\"></ng-content>\n",
84
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-badge-position: absolute;--kirby-badge-right: calc(6px - .5rem) ;--kirby-badge-top: calc(6px - .5rem) ;--kirby-badge-z-index: var(--kirby-z-index-avatar-badge);position:relative}.avatar{width:40px;height:40px;border:1px solid var(--kirby-color-border-raised-quiet);border-radius:var(--kirby-border-radius-circle);box-sizing:border-box;overflow:hidden;position:relative;z-index:1;display:flex;justify-content:center;align-items:center;background-color:var(--kirby-avatar-background-color, var(--kirby-color-fill-raised));color:var(--kirby-avatar-color, var(--kirby-color-content-raised))}.avatar.overlay:before{content:\"\";background-color:var(--kirby-black);opacity:.05;width:100%;height:100%;position:absolute;top:0;left:0}.avatar img{object-fit:cover;max-width:100%;height:100%;width:100%}:host(.xs) .avatar{--kirby-icon-font-size: 24px;width:32px;height:32px;border-radius:8px}:host(.xs) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.sm) .avatar,:host(.sm) .avatar{--kirby-icon-font-size: 24px;width:40px;height:40px}:host-context(kirby-progress-circle.sm) .avatar .avatar-text,:host(.sm) .avatar .avatar-text{font-size:var(--kirby-font-size-s)}:host-context(kirby-progress-circle.md),:host(.md){--kirby-badge-right: calc(8px - .5rem) ;--kirby-badge-top: calc(8px - .5rem) }:host-context(kirby-progress-circle.md) .avatar,:host(.md) .avatar{--kirby-icon-font-size: 32px;width:56px;height:56px}:host-context(kirby-progress-circle.md) .avatar .avatar-text,:host(.md) .avatar .avatar-text{font-size:var(--kirby-font-size-m)}:host-context(kirby-progress-circle.lg),:host(.lg){--kirby-badge-right: calc(14px - .5rem) ;--kirby-badge-top: calc(14px - .5rem) }:host-context(kirby-progress-circle.lg) .avatar,:host(.lg) .avatar{--kirby-icon-font-size: 56px;width:96px;height:96px}:host-context(kirby-progress-circle.lg) .avatar .avatar-text,:host(.lg) .avatar .avatar-text{font-size:var(--kirby-font-size-xl)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xs)}:host-context(kirby-item)[slot=start].xs{margin-inline-end:var(--kirby-spacing-s)}:host(.primary){--kirby-avatar-background-color: var(--kirby-primary);--kirby-avatar-color: var(--kirby-primary-contrast)}:host(.secondary){--kirby-avatar-background-color: var(--kirby-secondary);--kirby-avatar-color: var(--kirby-secondary-contrast)}:host(.tertiary){--kirby-avatar-background-color: var(--kirby-tertiary);--kirby-avatar-color: var(--kirby-tertiary-contrast)}:host(.success){--kirby-avatar-background-color: var(--kirby-success);--kirby-avatar-color: var(--kirby-success-contrast)}:host(.warning){--kirby-avatar-background-color: var(--kirby-warning);--kirby-avatar-color: var(--kirby-warning-contrast)}:host(.danger){--kirby-avatar-background-color: var(--kirby-danger);--kirby-avatar-color: var(--kirby-danger-contrast)}:host(.white-overlay){--kirby-avatar-background-color: var(--kirby-white-overlay);--kirby-avatar-color: var(--kirby-white-overlay-contrast)}:host(.light){--kirby-avatar-background-color: var(--kirby-color-fill-raised);--kirby-avatar-color: var(--kirby-color-content-raised)}:host(.medium){--kirby-avatar-background-color: var(--kirby-medium);--kirby-avatar-color: var(--kirby-medium-contrast)}:host(.dark){--kirby-avatar-background-color: var(--kirby-dark);--kirby-avatar-color: var(--kirby-dark-contrast)}:host(.dark-overlay){--kirby-avatar-background-color: var(--kirby-dark-overlay);--kirby-avatar-color: var(--kirby-dark-overlay-contrast)}:host(.white){--kirby-avatar-background-color: var(--kirby-color-fill-raised);--kirby-avatar-color: var(--kirby-color-content-raised)}:host(.semi-light){--kirby-avatar-background-color: var(--kirby-semi-light);--kirby-avatar-color: var(--kirby-semi-light-contrast)}\n"]
85
+ }]
86
+ }],
87
+ propDecorators: {
88
+ imageSrc: [{ type: Input }],
89
+ imageLoading: [{ type: Input }],
90
+ altText: [{ type: Input }],
91
+ stroke: [{ type: Input }],
92
+ text: [{ type: Input }],
93
+ overlay: [{ type: Input }],
94
+ size: [{ type: Input }],
95
+ themeColor: [{ type: Input }],
96
+ imageError: [{ type: Output }],
97
+ _cssClass: [{
98
+ type: HostBinding,
99
+ args: ["class"]
100
+ }]
101
+ }
102
+ });
57
103
  export { AvatarComponent, AvatarSize };
58
- //# sourceMappingURL=kirbydesign-designsystem-avatar.mjs.map
104
+
105
+ //# sourceMappingURL=kirbydesign-designsystem-avatar.mjs.map