@kirbydesign/designsystem 11.11.3 → 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 -905
  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 -226
  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,550 +1,686 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, ElementRef, Input, HostBinding, Directive, LOCALE_ID, Inject } from '@angular/core';
3
- import * as i2 from '@kirbydesign/designsystem/helpers';
4
- import { DesignTokenHelper, ColorHelper, LineClampHelper } from '@kirbydesign/designsystem/helpers';
5
-
6
- /**
7
- * Factory that creates a new ResizeObserver and allows us to stub it out in unit tests.
8
- * @docs-private
9
- */
10
- class ResizeObserverFactory {
11
- create(callback) {
12
- return typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(callback);
13
- }
14
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
15
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverFactory, providedIn: 'root' }); }
16
- }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverFactory, decorators: [{
18
- type: Injectable,
19
- args: [{ providedIn: 'root' }]
20
- }] });
21
-
22
- class ResizeObserverService {
23
- constructor(_resizeObserverFactory) {
24
- this._resizeObserverFactory = _resizeObserverFactory;
25
- this.observedElements = new WeakMap();
26
- this.observer = this._resizeObserverFactory.create((entries) => this.handleResize(entries));
27
- }
28
- observe(elementOrRef, action) {
29
- const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
30
- if (!this.observedElements.has(element)) {
31
- if (this.observer) {
32
- this.observer.observe(element);
33
- }
34
- this.observedElements.set(element, action);
35
- }
36
- }
37
- ngOnDestroy() {
38
- if (this.observer) {
39
- this.observer.disconnect();
40
- }
41
- this.observedElements = null;
42
- }
43
- unobserve(elementOrRef) {
44
- const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
45
- if (this.observedElements.has(element)) {
46
- if (this.observer) {
47
- this.observer.unobserve(element);
48
- }
49
- this.observedElements.delete(element);
50
- }
51
- }
52
- handleResize(entries) {
53
- entries.forEach((entry) => {
54
- const action = this.observedElements.get(entry.target);
55
- if (action) {
56
- action(entry);
57
- }
58
- });
59
- }
60
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverService, deps: [{ token: ResizeObserverFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
61
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverService, providedIn: 'root' }); }
62
- }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ResizeObserverService, decorators: [{
64
- type: Injectable,
65
- args: [{ providedIn: 'root' }]
66
- }], ctorParameters: () => [{ type: ResizeObserverFactory }] });
67
-
1
+ import * as i0 from "@angular/core";
2
+ import { Directive, ElementRef, HostBinding, Inject, Injectable, Input, LOCALE_ID } from "@angular/core";
3
+ import * as i2 from "@kirbydesign/designsystem/helpers";
4
+ import { ColorHelper, DesignTokenHelper, LineClampHelper } from "@kirbydesign/designsystem/helpers";
5
+ var ResizeObserverFactory = class ResizeObserverFactory {
6
+ create(callback) {
7
+ return typeof ResizeObserver === "undefined" ? null : new ResizeObserver(callback);
8
+ }
9
+ static {
10
+ this.ɵfac = i0.ɵɵngDeclareFactory({
11
+ minVersion: "12.0.0",
12
+ version: "22.2.2",
13
+ ngImport: i0,
14
+ type: ResizeObserverFactory,
15
+ deps: [],
16
+ target: i0.ɵɵFactoryTarget.Injectable
17
+ });
18
+ }
19
+ static {
20
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
21
+ minVersion: "12.0.0",
22
+ version: "22.2.2",
23
+ ngImport: i0,
24
+ type: ResizeObserverFactory,
25
+ providedIn: "root"
26
+ });
27
+ }
28
+ };
29
+ i0.ɵɵngDeclareClassMetadata({
30
+ minVersion: "12.0.0",
31
+ version: "22.2.2",
32
+ ngImport: i0,
33
+ type: ResizeObserverFactory,
34
+ decorators: [{
35
+ type: Injectable,
36
+ args: [{ providedIn: "root" }]
37
+ }]
38
+ });
39
+ var ResizeObserverService = class ResizeObserverService {
40
+ constructor(_resizeObserverFactory) {
41
+ this._resizeObserverFactory = _resizeObserverFactory;
42
+ this.observedElements = /* @__PURE__ */ new WeakMap();
43
+ this.observer = this._resizeObserverFactory.create((entries) => this.handleResize(entries));
44
+ }
45
+ observe(elementOrRef, action) {
46
+ const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
47
+ if (!this.observedElements.has(element)) {
48
+ if (this.observer) this.observer.observe(element);
49
+ this.observedElements.set(element, action);
50
+ }
51
+ }
52
+ ngOnDestroy() {
53
+ if (this.observer) this.observer.disconnect();
54
+ }
55
+ unobserve(elementOrRef) {
56
+ const element = elementOrRef instanceof ElementRef ? elementOrRef.nativeElement : elementOrRef;
57
+ if (this.observedElements.has(element)) {
58
+ if (this.observer) this.observer.unobserve(element);
59
+ this.observedElements.delete(element);
60
+ }
61
+ }
62
+ handleResize(entries) {
63
+ entries.forEach((entry) => {
64
+ const action = this.observedElements.get(entry.target);
65
+ if (action) action(entry);
66
+ });
67
+ }
68
+ static {
69
+ this.ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.2",
72
+ ngImport: i0,
73
+ type: ResizeObserverService,
74
+ deps: [{ token: ResizeObserverFactory }],
75
+ target: i0.ɵɵFactoryTarget.Injectable
76
+ });
77
+ }
78
+ static {
79
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.2",
82
+ ngImport: i0,
83
+ type: ResizeObserverService,
84
+ providedIn: "root"
85
+ });
86
+ }
87
+ };
88
+ i0.ɵɵngDeclareClassMetadata({
89
+ minVersion: "12.0.0",
90
+ version: "22.2.2",
91
+ ngImport: i0,
92
+ type: ResizeObserverService,
93
+ decorators: [{
94
+ type: Injectable,
95
+ args: [{ providedIn: "root" }]
96
+ }],
97
+ ctorParameters: () => [{ type: ResizeObserverFactory }]
98
+ });
68
99
  const TEXT_RESIZE_THRESHOLD = parseFloat(DesignTokenHelper.textResizeThreshold());
69
- const TEXT_RESIZE_CLASS = 'kirby-trt';
100
+ const TEXT_RESIZE_CLASS = "kirby-trt";
70
101
  const BASE_FONT_SIZE_PX = parseInt(DesignTokenHelper.baseFontSizePx());
71
- /**
72
- * Element width combines both signals: rem scaling (desktop/iOS) and env(preferred-text-scale)
73
- * (Android). On platforms where env() is unsupported, the fallback `1` makes it a no-op multiplier.
74
- */
75
- const OBSERVER_ELEMENT_STYLES = 'position:absolute;width:calc(1rem * env(preferred-text-scale, 1));height:1rem;top:-9999px;visibility:hidden;pointer-events:none';
76
- /**
77
- * Detects when text is resized above a certain threshold in browser/OS settings and toggles a
78
- * `kirby-trt` class on the root html element.
79
- *
80
- * Uses a `ResizeObserver` on a hidden element sized with `calc(1rem * env(preferred-text-scale, 1))`.
81
- * This combines two detections into one element:
82
- *
83
- * - **rem scaling** — on desktop browsers and iOS, changing text size modifies the root font-size,
84
- * which changes `1rem` and triggers the observer.
85
- *
86
- * - **`env(preferred-text-scale)`** — on platforms that support this CSS environment variable
87
- * (e.g. Android Chrome/WebView), the multiplier reflects the OS/browser text scale factor.
88
- * When the user changes font size in system settings, the env value updates and the element resizes.
89
- *
90
- * On platforms where `env(preferred-text-scale)` is not supported, the value falls back to `1`,
91
- * making the width equivalent to `1rem`.
92
- *
93
- * @example
94
- * ```scss
95
- * @include utils.media('<medium') {
96
- * :host-context(.kirby-trt) {
97
- * // Styles for narrow screens with scaled text
98
- * }
99
- * }
100
- * ```
101
- *
102
- * @see https://drafts.csswg.org/css-env-1/#preferred-text-scale
103
- */
104
- class TextResizeObserverService {
105
- constructor() {
106
- this.resizeObserver = null;
107
- this.textResizeObserverElement = null;
108
- this.onObservedResize = () => {
109
- const widthInPx = this.textResizeObserverElement?.offsetWidth ?? BASE_FONT_SIZE_PX;
110
- const scale = widthInPx / BASE_FONT_SIZE_PX;
111
- document.documentElement.classList.toggle(TEXT_RESIZE_CLASS, scale > TEXT_RESIZE_THRESHOLD);
112
- };
113
- }
114
- initialize() {
115
- if (typeof window === 'undefined') {
116
- return;
117
- }
118
- this.textResizeObserverElement = document.createElement('div');
119
- this.textResizeObserverElement.style.cssText = OBSERVER_ELEMENT_STYLES;
120
- document.body.appendChild(this.textResizeObserverElement);
121
- this.resizeObserver = new ResizeObserver(this.onObservedResize);
122
- this.resizeObserver.observe(this.textResizeObserverElement);
123
- this.onObservedResize();
124
- }
125
- ngOnDestroy() {
126
- this.resizeObserver?.disconnect();
127
- this.textResizeObserverElement?.remove();
128
- }
129
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TextResizeObserverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
130
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TextResizeObserverService, providedIn: 'root' }); }
131
- }
132
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TextResizeObserverService, decorators: [{
133
- type: Injectable,
134
- args: [{ providedIn: 'root' }]
135
- }] });
136
-
137
- class ThemeColorDirective {
138
- constructor() {
139
- this._isDefault = true;
140
- }
141
- get isDefault() {
142
- return this._isDefault;
143
- }
144
- get isPrimary() {
145
- return this._isPrimary;
146
- }
147
- get isSecondary() {
148
- return this._isSecondary;
149
- }
150
- get isTertiary() {
151
- return this._isTertiary;
152
- }
153
- get isSuccess() {
154
- return this._isSuccess;
155
- }
156
- get isWarning() {
157
- return this._isWarning;
158
- }
159
- get isDanger() {
160
- return this._isDanger;
161
- }
162
- get isLight() {
163
- return this._isLight;
164
- }
165
- get isMedium() {
166
- return this._isMedium;
167
- }
168
- get isDark() {
169
- return this._isDark;
170
- }
171
- get isWhite() {
172
- return this._isWhite;
173
- }
174
- get isBrightnessWhite() {
175
- return this._isBrightnessWhite;
176
- }
177
- get isBrightnessLight() {
178
- return this._isBrightnessLight;
179
- }
180
- get isBrightnessDark() {
181
- return this._isBrightnessDark;
182
- }
183
- set themeColor(value) {
184
- this._isDefault = !value;
185
- this._isPrimary = value === 'primary';
186
- this._isSecondary = value === 'secondary';
187
- this._isTertiary = value === 'tertiary';
188
- this._isSuccess = value === 'success';
189
- this._isWarning = value === 'warning';
190
- this._isDanger = value === 'danger';
191
- this._isLight = value === 'light';
192
- this._isMedium = value === 'medium';
193
- this._isDark = value === 'dark';
194
- this._isWhite = value === 'white';
195
- const colorBrightness = ColorHelper.getColorBrightness(value);
196
- this._isBrightnessWhite = colorBrightness === 'white';
197
- this._isBrightnessLight = colorBrightness === 'light';
198
- this._isBrightnessDark = colorBrightness === 'dark';
199
- }
200
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ThemeColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
201
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: ThemeColorDirective, isStandalone: true, selector: "kirby-avatar[themeColor],\n kirby-card[themeColor],\n kirby-icon[themeColor],\n kirby-progress-circle-ring[themeColor],\n kirby-modal-footer[themeColor],\n kirby-empty-state[themeColor]", inputs: { themeColor: "themeColor" }, host: { properties: { "class.default": "this.isDefault", "class.primary": "this.isPrimary", "class.secondary": "this.isSecondary", "class.tertiary": "this.isTertiary", "class.success": "this.isSuccess", "class.warning": "this.isWarning", "class.danger": "this.isDanger", "class.light": "this.isLight", "class.medium": "this.isMedium", "class.dark": "this.isDark", "class.white": "this.isWhite", "class.kirby-color-brightness-white": "this.isBrightnessWhite", "class.kirby-color-brightness-light": "this.isBrightnessLight", "class.kirby-color-brightness-dark": "this.isBrightnessDark" } }, ngImport: i0 }); }
202
- }
203
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ThemeColorDirective, decorators: [{
204
- type: Directive,
205
- args: [{
206
- standalone: true,
207
- // eslint-disable-next-line @angular-eslint/directive-selector
208
- selector: `kirby-avatar[themeColor],
102
+ const OBSERVER_ELEMENT_STYLES = "position:absolute;width:calc(1rem * env(preferred-text-scale, 1));height:1rem;top:-9999px;visibility:hidden;pointer-events:none";
103
+ var TextResizeObserverService = class TextResizeObserverService {
104
+ constructor() {
105
+ this.resizeObserver = null;
106
+ this.textResizeObserverElement = null;
107
+ this.onObservedResize = () => {
108
+ const scale = (this.textResizeObserverElement?.offsetWidth ?? BASE_FONT_SIZE_PX) / BASE_FONT_SIZE_PX;
109
+ document.documentElement.classList.toggle(TEXT_RESIZE_CLASS, scale > TEXT_RESIZE_THRESHOLD);
110
+ };
111
+ }
112
+ initialize() {
113
+ if (typeof window === "undefined") return;
114
+ this.textResizeObserverElement = document.createElement("div");
115
+ this.textResizeObserverElement.style.cssText = OBSERVER_ELEMENT_STYLES;
116
+ document.body.appendChild(this.textResizeObserverElement);
117
+ this.resizeObserver = new ResizeObserver(this.onObservedResize);
118
+ this.resizeObserver.observe(this.textResizeObserverElement);
119
+ this.onObservedResize();
120
+ }
121
+ ngOnDestroy() {
122
+ this.resizeObserver?.disconnect();
123
+ this.textResizeObserverElement?.remove();
124
+ }
125
+ static {
126
+ this.ɵfac = i0.ɵɵngDeclareFactory({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.2",
129
+ ngImport: i0,
130
+ type: TextResizeObserverService,
131
+ deps: [],
132
+ target: i0.ɵɵFactoryTarget.Injectable
133
+ });
134
+ }
135
+ static {
136
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
137
+ minVersion: "12.0.0",
138
+ version: "22.2.2",
139
+ ngImport: i0,
140
+ type: TextResizeObserverService,
141
+ providedIn: "root"
142
+ });
143
+ }
144
+ };
145
+ i0.ɵɵngDeclareClassMetadata({
146
+ minVersion: "12.0.0",
147
+ version: "22.2.2",
148
+ ngImport: i0,
149
+ type: TextResizeObserverService,
150
+ decorators: [{
151
+ type: Injectable,
152
+ args: [{ providedIn: "root" }]
153
+ }]
154
+ });
155
+ var ThemeColorDirective = class ThemeColorDirective {
156
+ constructor() {
157
+ this._isDefault = true;
158
+ this._isPrimary = false;
159
+ this._isSecondary = false;
160
+ this._isTertiary = false;
161
+ this._isSuccess = false;
162
+ this._isWarning = false;
163
+ this._isDanger = false;
164
+ this._isLight = false;
165
+ this._isMedium = false;
166
+ this._isDark = false;
167
+ this._isWhite = false;
168
+ this._isBrightnessWhite = false;
169
+ this._isBrightnessLight = false;
170
+ this._isBrightnessDark = false;
171
+ }
172
+ get isDefault() {
173
+ return this._isDefault;
174
+ }
175
+ get isPrimary() {
176
+ return this._isPrimary;
177
+ }
178
+ get isSecondary() {
179
+ return this._isSecondary;
180
+ }
181
+ get isTertiary() {
182
+ return this._isTertiary;
183
+ }
184
+ get isSuccess() {
185
+ return this._isSuccess;
186
+ }
187
+ get isWarning() {
188
+ return this._isWarning;
189
+ }
190
+ get isDanger() {
191
+ return this._isDanger;
192
+ }
193
+ get isLight() {
194
+ return this._isLight;
195
+ }
196
+ get isMedium() {
197
+ return this._isMedium;
198
+ }
199
+ get isDark() {
200
+ return this._isDark;
201
+ }
202
+ get isWhite() {
203
+ return this._isWhite;
204
+ }
205
+ get isBrightnessWhite() {
206
+ return this._isBrightnessWhite;
207
+ }
208
+ get isBrightnessLight() {
209
+ return this._isBrightnessLight;
210
+ }
211
+ get isBrightnessDark() {
212
+ return this._isBrightnessDark;
213
+ }
214
+ set themeColor(value) {
215
+ this._isDefault = !value;
216
+ this._isPrimary = value === "primary";
217
+ this._isSecondary = value === "secondary";
218
+ this._isTertiary = value === "tertiary";
219
+ this._isSuccess = value === "success";
220
+ this._isWarning = value === "warning";
221
+ this._isDanger = value === "danger";
222
+ this._isLight = value === "light";
223
+ this._isMedium = value === "medium";
224
+ this._isDark = value === "dark";
225
+ this._isWhite = value === "white";
226
+ const colorBrightness = ColorHelper.getColorBrightness(value);
227
+ this._isBrightnessWhite = colorBrightness === "white";
228
+ this._isBrightnessLight = colorBrightness === "light";
229
+ this._isBrightnessDark = colorBrightness === "dark";
230
+ }
231
+ static {
232
+ this.ɵfac = i0.ɵɵngDeclareFactory({
233
+ minVersion: "12.0.0",
234
+ version: "22.2.2",
235
+ ngImport: i0,
236
+ type: ThemeColorDirective,
237
+ deps: [],
238
+ target: i0.ɵɵFactoryTarget.Directive
239
+ });
240
+ }
241
+ static {
242
+ this.ɵdir = i0.ɵɵngDeclareDirective({
243
+ minVersion: "14.0.0",
244
+ version: "22.2.2",
245
+ type: ThemeColorDirective,
246
+ isStandalone: true,
247
+ selector: "kirby-avatar[themeColor],\n kirby-card[themeColor],\n kirby-icon[themeColor],\n kirby-progress-circle-ring[themeColor],\n kirby-modal-footer[themeColor],\n kirby-empty-state[themeColor]",
248
+ inputs: { themeColor: "themeColor" },
249
+ host: { properties: {
250
+ "class.default": "this.isDefault",
251
+ "class.primary": "this.isPrimary",
252
+ "class.secondary": "this.isSecondary",
253
+ "class.tertiary": "this.isTertiary",
254
+ "class.success": "this.isSuccess",
255
+ "class.warning": "this.isWarning",
256
+ "class.danger": "this.isDanger",
257
+ "class.light": "this.isLight",
258
+ "class.medium": "this.isMedium",
259
+ "class.dark": "this.isDark",
260
+ "class.white": "this.isWhite",
261
+ "class.kirby-color-brightness-white": "this.isBrightnessWhite",
262
+ "class.kirby-color-brightness-light": "this.isBrightnessLight",
263
+ "class.kirby-color-brightness-dark": "this.isBrightnessDark"
264
+ } },
265
+ ngImport: i0
266
+ });
267
+ }
268
+ };
269
+ i0.ɵɵngDeclareClassMetadata({
270
+ minVersion: "12.0.0",
271
+ version: "22.2.2",
272
+ ngImport: i0,
273
+ type: ThemeColorDirective,
274
+ decorators: [{
275
+ type: Directive,
276
+ args: [{
277
+ standalone: true,
278
+ selector: `kirby-avatar[themeColor],
209
279
  kirby-card[themeColor],
210
280
  kirby-icon[themeColor],
211
281
  kirby-progress-circle-ring[themeColor],
212
282
  kirby-modal-footer[themeColor],
213
- kirby-empty-state[themeColor]`,
214
- }]
215
- }], propDecorators: { isDefault: [{
216
- type: HostBinding,
217
- args: ['class.default']
218
- }], isPrimary: [{
219
- type: HostBinding,
220
- args: ['class.primary']
221
- }], isSecondary: [{
222
- type: HostBinding,
223
- args: ['class.secondary']
224
- }], isTertiary: [{
225
- type: HostBinding,
226
- args: ['class.tertiary']
227
- }], isSuccess: [{
228
- type: HostBinding,
229
- args: ['class.success']
230
- }], isWarning: [{
231
- type: HostBinding,
232
- args: ['class.warning']
233
- }], isDanger: [{
234
- type: HostBinding,
235
- args: ['class.danger']
236
- }], isLight: [{
237
- type: HostBinding,
238
- args: ['class.light']
239
- }], isMedium: [{
240
- type: HostBinding,
241
- args: ['class.medium']
242
- }], isDark: [{
243
- type: HostBinding,
244
- args: ['class.dark']
245
- }], isWhite: [{
246
- type: HostBinding,
247
- args: ['class.white']
248
- }], isBrightnessWhite: [{
249
- type: HostBinding,
250
- args: ['class.kirby-color-brightness-white']
251
- }], isBrightnessLight: [{
252
- type: HostBinding,
253
- args: ['class.kirby-color-brightness-light']
254
- }], isBrightnessDark: [{
255
- type: HostBinding,
256
- args: ['class.kirby-color-brightness-dark']
257
- }], themeColor: [{
258
- type: Input
259
- }] } });
260
-
261
- class ComponentLoaderDirective {
262
- constructor(componentFactoryResolver, viewContainerRef, renderer) {
263
- this.componentFactoryResolver = componentFactoryResolver;
264
- this.viewContainerRef = viewContainerRef;
265
- this.renderer = renderer;
266
- }
267
- ngOnInit() {
268
- this.loadCard();
269
- }
270
- loadCard() {
271
- const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.configuration.component);
272
- this.viewContainerRef.clear();
273
- const componentRef = this.viewContainerRef.createComponent(componentFactory);
274
- if (componentRef && componentRef.location && componentRef.location.nativeElement) {
275
- this.renderer.addClass(componentRef.location.nativeElement, this.cssClass);
276
- }
277
- componentRef.instance.data = this.configuration.data;
278
- }
279
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ComponentLoaderDirective, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
280
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: ComponentLoaderDirective, isStandalone: true, selector: "[kirbyLoadComponent]", inputs: { configuration: ["kirbyLoadComponent", "configuration"], cssClass: "cssClass" }, ngImport: i0 }); }
281
- }
282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: ComponentLoaderDirective, decorators: [{
283
- type: Directive,
284
- args: [{
285
- selector: '[kirbyLoadComponent]',
286
- standalone: true,
287
- }]
288
- }], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }], propDecorators: { configuration: [{
289
- type: Input,
290
- args: ['kirbyLoadComponent']
291
- }], cssClass: [{
292
- type: Input
293
- }] } });
294
-
295
- class FitHeadingDirective {
296
- constructor(elementRef, renderer, resizeObserverService, lineClampHelper) {
297
- this.elementRef = elementRef;
298
- this.renderer = renderer;
299
- this.resizeObserverService = resizeObserverService;
300
- this.lineClampHelper = lineClampHelper;
301
- this.headingSizes = [
302
- {
303
- name: 'h1',
304
- fontSize: 'var(--kirby-font-size-xl)',
305
- lineHeight: 'var(--kirby-line-height-xl)',
306
- },
307
- {
308
- name: 'h2',
309
- fontSize: 'var(--kirby-font-size-l)',
310
- lineHeight: 'var(--kirby-line-height-l)',
311
- },
312
- {
313
- name: 'h3',
314
- fontSize: 'var(--kirby-font-size-m)',
315
- lineHeight: 'var(--kirby-line-height-m)',
316
- },
317
- ];
318
- }
319
- ngOnInit() {
320
- if (this.config && this.config.maxLines) {
321
- this.observeResize();
322
- this.isObservingHostElement = true;
323
- }
324
- }
325
- ngOnDestroy() {
326
- if (this.isObservingHostElement) {
327
- this.resizeObserverService.unobserve(this.elementRef);
328
- if (this.hostElementClone) {
329
- this.renderer.removeChild(this.elementRef.nativeElement, this.hostElementClone);
330
- }
331
- }
332
- }
333
- observeResize() {
334
- this.resizeObserverService.observe(this.elementRef, () => {
335
- /**
336
- * setTimeout is used here to avoid repeated size changes
337
- * while the first size change is still ongoing.
338
- * This would result in the ResizeObserver being called again,
339
- * giving 'ResizeObserver loop limit exceeded' types of errors.
340
- */
341
- setTimeout(() => {
342
- this.scaleHeader();
343
- }, 0);
344
- });
345
- }
346
- scaleHeader() {
347
- if (this.isScalingHeader)
348
- return;
349
- this.isScalingHeader = true;
350
- if (!this.hostElementClone) {
351
- // Capture original CSS size before any scaling
352
- const computed = getComputedStyle(this.elementRef.nativeElement);
353
- this.originalSize = {
354
- name: 'original',
355
- fontSize: computed.fontSize,
356
- lineHeight: computed.lineHeight,
357
- };
358
- // Skip line-clamp for elements with line-height: normal (e.g. key-value) — conflicts with flex layout
359
- if (computed.lineHeight !== 'normal') {
360
- this.lineClampHelper.setMaxLines(this.elementRef.nativeElement, this.config.maxLines);
361
- }
362
- this.hostElementClone = this.generateHostElementClone();
363
- this.renderer.appendChild(this.elementRef.nativeElement.parentElement, this.hostElementClone);
364
- }
365
- // Use parent width to avoid feedback loop from shrink-wrapped element width
366
- const availableWidth = this.elementRef.nativeElement.parentElement.clientWidth;
367
- this.renderer.setStyle(this.hostElementClone, 'width', `${availableWidth}px`);
368
- // Try original CSS size first, then scale down through heading sizes
369
- const candidates = [this.originalSize, ...this.headingSizes];
370
- const fallbackSize = this.headingSizes[this.headingSizes.length - 1];
371
- const fittedSize = candidates.find(this.canFitHeading.bind(this)) || fallbackSize;
372
- this.setSize(this.elementRef.nativeElement, fittedSize);
373
- this.lineClampHelper.setLineHeight(this.elementRef.nativeElement, fittedSize.lineHeight);
374
- this.isScalingHeader = false;
375
- }
376
- canFitHeading(size) {
377
- this.setSize(this.hostElementClone, size);
378
- // Resolve line-height to pixels via getComputedStyle (handles unitless ratios)
379
- const computedLineHeight = parseFloat(getComputedStyle(this.hostElementClone).lineHeight);
380
- // Skip vertical check for line-height: normal (single-line content like values)
381
- const fitsVertically = isNaN(computedLineHeight)
382
- ? true
383
- : Math.round(this.hostElementClone.clientHeight / computedLineHeight) <= this.config.maxLines;
384
- // Check horizontal overflow for non-wrapping content (e.g. numbers)
385
- const fitsHorizontally = this.hostElementClone.scrollWidth <= this.hostElementClone.clientWidth;
386
- return fitsVertically && fitsHorizontally;
387
- }
388
- generateHostElementClone() {
389
- const clone = this.elementRef.nativeElement.cloneNode(true);
390
- this.renderer.setStyle(clone, 'position', 'absolute');
391
- this.renderer.setStyle(clone, 'visibility', 'hidden');
392
- this.lineClampHelper.removeLineClamp(clone);
393
- return clone;
394
- }
395
- setSize(el, size) {
396
- this.renderer.setStyle(el, 'font-size', size.fontSize);
397
- this.renderer.setStyle(el, 'line-height', size.lineHeight);
398
- }
399
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FitHeadingDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: ResizeObserverService }, { token: i2.LineClampHelper }], target: i0.ɵɵFactoryTarget.Directive }); }
400
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.23", type: FitHeadingDirective, isStandalone: true, selector: "h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]", inputs: { config: ["kirbyFitHeading", "config"] }, providers: [LineClampHelper], ngImport: i0 }); }
401
- }
402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: FitHeadingDirective, decorators: [{
403
- type: Directive,
404
- args: [{
405
- standalone: true,
406
- selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]`,
407
- providers: [LineClampHelper],
408
- }]
409
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: ResizeObserverService }, { type: i2.LineClampHelper }], propDecorators: { config: [{
410
- type: Input,
411
- args: ['kirbyFitHeading']
412
- }] } });
413
-
283
+ kirby-empty-state[themeColor]`
284
+ }]
285
+ }],
286
+ propDecorators: {
287
+ isDefault: [{
288
+ type: HostBinding,
289
+ args: ["class.default"]
290
+ }],
291
+ isPrimary: [{
292
+ type: HostBinding,
293
+ args: ["class.primary"]
294
+ }],
295
+ isSecondary: [{
296
+ type: HostBinding,
297
+ args: ["class.secondary"]
298
+ }],
299
+ isTertiary: [{
300
+ type: HostBinding,
301
+ args: ["class.tertiary"]
302
+ }],
303
+ isSuccess: [{
304
+ type: HostBinding,
305
+ args: ["class.success"]
306
+ }],
307
+ isWarning: [{
308
+ type: HostBinding,
309
+ args: ["class.warning"]
310
+ }],
311
+ isDanger: [{
312
+ type: HostBinding,
313
+ args: ["class.danger"]
314
+ }],
315
+ isLight: [{
316
+ type: HostBinding,
317
+ args: ["class.light"]
318
+ }],
319
+ isMedium: [{
320
+ type: HostBinding,
321
+ args: ["class.medium"]
322
+ }],
323
+ isDark: [{
324
+ type: HostBinding,
325
+ args: ["class.dark"]
326
+ }],
327
+ isWhite: [{
328
+ type: HostBinding,
329
+ args: ["class.white"]
330
+ }],
331
+ isBrightnessWhite: [{
332
+ type: HostBinding,
333
+ args: ["class.kirby-color-brightness-white"]
334
+ }],
335
+ isBrightnessLight: [{
336
+ type: HostBinding,
337
+ args: ["class.kirby-color-brightness-light"]
338
+ }],
339
+ isBrightnessDark: [{
340
+ type: HostBinding,
341
+ args: ["class.kirby-color-brightness-dark"]
342
+ }],
343
+ themeColor: [{ type: Input }]
344
+ }
345
+ });
346
+ var ComponentLoaderDirective = class ComponentLoaderDirective {
347
+ constructor(viewContainerRef, renderer) {
348
+ this.viewContainerRef = viewContainerRef;
349
+ this.renderer = renderer;
350
+ this.cssClass = "";
351
+ }
352
+ ngOnInit() {
353
+ this.loadCard();
354
+ }
355
+ loadCard() {
356
+ this.viewContainerRef.clear();
357
+ const componentRef = this.viewContainerRef.createComponent(this.configuration.component);
358
+ if (componentRef && componentRef.location && componentRef.location.nativeElement) this.renderer.addClass(componentRef.location.nativeElement, this.cssClass);
359
+ componentRef.instance.data = this.configuration.data;
360
+ }
361
+ static {
362
+ this.ɵfac = i0.ɵɵngDeclareFactory({
363
+ minVersion: "12.0.0",
364
+ version: "22.2.2",
365
+ ngImport: i0,
366
+ type: ComponentLoaderDirective,
367
+ deps: [{ token: i0.ViewContainerRef }, { token: i0.Renderer2 }],
368
+ target: i0.ɵɵFactoryTarget.Directive
369
+ });
370
+ }
371
+ static {
372
+ this.ɵdir = i0.ɵɵngDeclareDirective({
373
+ minVersion: "14.0.0",
374
+ version: "22.2.2",
375
+ type: ComponentLoaderDirective,
376
+ isStandalone: true,
377
+ selector: "[kirbyLoadComponent]",
378
+ inputs: {
379
+ configuration: ["kirbyLoadComponent", "configuration"],
380
+ cssClass: "cssClass"
381
+ },
382
+ ngImport: i0
383
+ });
384
+ }
385
+ };
386
+ i0.ɵɵngDeclareClassMetadata({
387
+ minVersion: "12.0.0",
388
+ version: "22.2.2",
389
+ ngImport: i0,
390
+ type: ComponentLoaderDirective,
391
+ decorators: [{
392
+ type: Directive,
393
+ args: [{
394
+ selector: "[kirbyLoadComponent]",
395
+ standalone: true
396
+ }]
397
+ }],
398
+ ctorParameters: () => [{ type: i0.ViewContainerRef }, { type: i0.Renderer2 }],
399
+ propDecorators: {
400
+ configuration: [{
401
+ type: Input,
402
+ args: ["kirbyLoadComponent"]
403
+ }],
404
+ cssClass: [{ type: Input }]
405
+ }
406
+ });
407
+ var FitHeadingDirective = class FitHeadingDirective {
408
+ constructor(elementRef, renderer, resizeObserverService, lineClampHelper) {
409
+ this.elementRef = elementRef;
410
+ this.renderer = renderer;
411
+ this.resizeObserverService = resizeObserverService;
412
+ this.lineClampHelper = lineClampHelper;
413
+ this.isObservingHostElement = false;
414
+ this.isScalingHeader = false;
415
+ this.headingSizes = [
416
+ {
417
+ name: "h1",
418
+ fontSize: "var(--kirby-font-size-xl)",
419
+ lineHeight: "var(--kirby-line-height-xl)"
420
+ },
421
+ {
422
+ name: "h2",
423
+ fontSize: "var(--kirby-font-size-l)",
424
+ lineHeight: "var(--kirby-line-height-l)"
425
+ },
426
+ {
427
+ name: "h3",
428
+ fontSize: "var(--kirby-font-size-m)",
429
+ lineHeight: "var(--kirby-line-height-m)"
430
+ }
431
+ ];
432
+ }
433
+ ngOnInit() {
434
+ if (this.config && this.config.maxLines) {
435
+ this.observeResize();
436
+ this.isObservingHostElement = true;
437
+ }
438
+ }
439
+ ngOnDestroy() {
440
+ if (this.isObservingHostElement) {
441
+ this.resizeObserverService.unobserve(this.elementRef);
442
+ if (this.hostElementClone) this.renderer.removeChild(this.elementRef.nativeElement, this.hostElementClone);
443
+ }
444
+ }
445
+ observeResize() {
446
+ this.resizeObserverService.observe(this.elementRef, () => {
447
+ setTimeout(() => {
448
+ this.scaleHeader();
449
+ }, 0);
450
+ });
451
+ }
452
+ scaleHeader() {
453
+ const maxLines = this.config?.maxLines;
454
+ if (!maxLines || this.isScalingHeader) return;
455
+ this.isScalingHeader = true;
456
+ if (!this.hostElementClone) {
457
+ const computed = getComputedStyle(this.elementRef.nativeElement);
458
+ this.originalSize = {
459
+ name: "original",
460
+ fontSize: computed.fontSize,
461
+ lineHeight: computed.lineHeight
462
+ };
463
+ if (computed.lineHeight !== "normal") this.lineClampHelper.setMaxLines(this.elementRef.nativeElement, maxLines);
464
+ this.hostElementClone = this.generateHostElementClone();
465
+ this.renderer.appendChild(this.elementRef.nativeElement.parentElement, this.hostElementClone);
466
+ }
467
+ const availableWidth = this.elementRef.nativeElement.parentElement.clientWidth;
468
+ this.renderer.setStyle(this.hostElementClone, "width", `${availableWidth}px`);
469
+ const candidates = this.originalSize ? [this.originalSize, ...this.headingSizes] : this.headingSizes;
470
+ const fallbackSize = this.headingSizes[this.headingSizes.length - 1];
471
+ const fittedSize = candidates.find(this.canFitHeading.bind(this)) || fallbackSize;
472
+ this.setSize(this.elementRef.nativeElement, fittedSize);
473
+ this.lineClampHelper.setLineHeight(this.elementRef.nativeElement, fittedSize.lineHeight);
474
+ this.isScalingHeader = false;
475
+ }
476
+ canFitHeading(size) {
477
+ const hostElementClone = this.hostElementClone;
478
+ if (!hostElementClone || !this.config) return false;
479
+ this.setSize(hostElementClone, size);
480
+ const computedLineHeight = parseFloat(getComputedStyle(hostElementClone).lineHeight);
481
+ const fitsVertically = isNaN(computedLineHeight) ? true : Math.round(hostElementClone.clientHeight / computedLineHeight) <= this.config.maxLines;
482
+ const fitsHorizontally = hostElementClone.scrollWidth <= hostElementClone.clientWidth;
483
+ return fitsVertically && fitsHorizontally;
484
+ }
485
+ generateHostElementClone() {
486
+ const clone = this.elementRef.nativeElement.cloneNode(true);
487
+ this.renderer.setStyle(clone, "position", "absolute");
488
+ this.renderer.setStyle(clone, "visibility", "hidden");
489
+ this.lineClampHelper.removeLineClamp(clone);
490
+ return clone;
491
+ }
492
+ setSize(el, size) {
493
+ this.renderer.setStyle(el, "font-size", size.fontSize);
494
+ this.renderer.setStyle(el, "line-height", size.lineHeight);
495
+ }
496
+ static {
497
+ this.ɵfac = i0.ɵɵngDeclareFactory({
498
+ minVersion: "12.0.0",
499
+ version: "22.2.2",
500
+ ngImport: i0,
501
+ type: FitHeadingDirective,
502
+ deps: [
503
+ { token: i0.ElementRef },
504
+ { token: i0.Renderer2 },
505
+ { token: ResizeObserverService },
506
+ { token: i2.LineClampHelper }
507
+ ],
508
+ target: i0.ɵɵFactoryTarget.Directive
509
+ });
510
+ }
511
+ static {
512
+ this.ɵdir = i0.ɵɵngDeclareDirective({
513
+ minVersion: "14.0.0",
514
+ version: "22.2.2",
515
+ type: FitHeadingDirective,
516
+ isStandalone: true,
517
+ selector: "h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]",
518
+ inputs: { config: ["kirbyFitHeading", "config"] },
519
+ providers: [LineClampHelper],
520
+ ngImport: i0
521
+ });
522
+ }
523
+ };
524
+ i0.ɵɵngDeclareClassMetadata({
525
+ minVersion: "12.0.0",
526
+ version: "22.2.2",
527
+ ngImport: i0,
528
+ type: FitHeadingDirective,
529
+ decorators: [{
530
+ type: Directive,
531
+ args: [{
532
+ standalone: true,
533
+ selector: `h1[kirbyFitHeading],h2[kirbyFitHeading],h3[kirbyFitHeading],[kirbyFitHeading]`,
534
+ providers: [LineClampHelper]
535
+ }]
536
+ }],
537
+ ctorParameters: () => [
538
+ { type: i0.ElementRef },
539
+ { type: i0.Renderer2 },
540
+ { type: ResizeObserverService },
541
+ { type: i2.LineClampHelper }
542
+ ],
543
+ propDecorators: { config: [{
544
+ type: Input,
545
+ args: ["kirbyFitHeading"]
546
+ }] }
547
+ });
414
548
  function findItemLabel(element) {
415
- const itemEl = element.closest('kirby-item');
416
- if (itemEl) {
417
- return itemEl.querySelector('kirby-label');
418
- }
419
- return null;
549
+ const itemEl = element.closest("kirby-item");
550
+ if (itemEl) return itemEl.querySelector("kirby-label");
551
+ return null;
420
552
  }
421
553
  function setAccessibleLabel(element) {
422
- const label = findItemLabel(element);
423
- if (label) {
424
- label.setAttribute('aria-hidden', 'true');
425
- return label.textContent;
426
- }
554
+ const label = findItemLabel(element);
555
+ if (!label) return "";
556
+ label.setAttribute("aria-hidden", "true");
557
+ return label.textContent ?? "";
427
558
  }
428
559
  function inheritAriaLabelText(element) {
429
- const attribute = 'aria-label';
430
- if (element.hasAttribute(attribute)) {
431
- const value = element.getAttribute(attribute);
432
- element.removeAttribute(attribute);
433
- return value;
434
- }
560
+ const attribute = "aria-label";
561
+ if (!element.hasAttribute(attribute)) return "";
562
+ const value = element.getAttribute(attribute);
563
+ element.removeAttribute(attribute);
564
+ return value ?? "";
435
565
  }
436
- /**
437
- * Forwards specified attributes from a source element to a target element.
438
- *
439
- * @param sourceElement - The HTML element from which attributes will be removed from.
440
- * @param attributes - An array of attribute names to inherit from the source element.
441
- * @param renderer - An instance of Angular's Renderer2.
442
- * @param targetElement - (Optional) The HTML element to which the attributes should be applied.
443
- * If not provided, the attributes will only be removed from the source element.
444
- *
445
- * @returns A record of the inherited attributes and their values. If no attributes are inherited, an empty object is returned.
446
- */
447
566
  function forwardAttributes(sourceElement, attributes, renderer, targetElement) {
448
- const inheritedAttributes = {};
449
- if (!sourceElement || !attributes || attributes.length === 0) {
450
- return inheritedAttributes;
451
- }
452
- attributes.forEach((attribute) => {
453
- if (sourceElement.hasAttribute(attribute)) {
454
- const value = sourceElement.getAttribute(attribute);
455
- inheritedAttributes[attribute] = value;
456
- if (targetElement) {
457
- renderer.setAttribute(targetElement, attribute, value);
458
- }
459
- renderer.removeAttribute(sourceElement, attribute);
460
- }
461
- });
462
- return inheritedAttributes;
567
+ const inheritedAttributes = {};
568
+ if (!sourceElement || !attributes || attributes.length === 0) return inheritedAttributes;
569
+ attributes.forEach((attribute) => {
570
+ if (sourceElement.hasAttribute(attribute)) {
571
+ const value = sourceElement.getAttribute(attribute);
572
+ inheritedAttributes[attribute] = value;
573
+ if (targetElement) renderer.setAttribute(targetElement, attribute, value ?? "");
574
+ renderer.removeAttribute(sourceElement, attribute);
575
+ }
576
+ });
577
+ return inheritedAttributes;
463
578
  }
464
-
465
579
  const da = {
466
- $code: 'da',
467
- back: 'Tilbage',
468
- close: 'Luk',
469
- nextMonth: 'Næste måned',
470
- nextSlide: 'Næste slide',
471
- previousMonth: 'Forrige måned',
472
- previousSlide: 'Forrige slide',
473
- selectYear: 'Vælg år',
474
- readMore: 'Læs mere',
475
- more: 'Mere',
476
- characters: 'Tegn',
477
- outOf: 'af',
478
- entered: 'indtastet',
580
+ $code: "da",
581
+ back: "Tilbage",
582
+ close: "Luk",
583
+ nextMonth: "Næste måned",
584
+ nextSlide: "Næste slide",
585
+ previousMonth: "Forrige måned",
586
+ previousSlide: "Forrige slide",
587
+ selectYear: "Vælg år",
588
+ readMore: "Læs mere",
589
+ more: "Mere",
590
+ characters: "Tegn",
591
+ outOf: "af",
592
+ entered: "indtastet"
479
593
  };
480
-
481
594
  const en = {
482
- $code: 'en',
483
- back: 'Back',
484
- close: 'Close',
485
- nextMonth: 'Next month',
486
- nextSlide: 'Next slide',
487
- previousMonth: 'Previous month',
488
- previousSlide: 'Previous slide',
489
- selectYear: 'Select year',
490
- readMore: 'Read more',
491
- more: 'More',
492
- characters: 'Characters',
493
- outOf: 'out of',
494
- entered: 'entered',
595
+ $code: "en",
596
+ back: "Back",
597
+ close: "Close",
598
+ nextMonth: "Next month",
599
+ nextSlide: "Next slide",
600
+ previousMonth: "Previous month",
601
+ previousSlide: "Previous slide",
602
+ selectYear: "Select year",
603
+ readMore: "Read more",
604
+ more: "More",
605
+ characters: "Characters",
606
+ outOf: "out of",
607
+ entered: "entered"
495
608
  };
496
-
497
609
  const de = {
498
- $code: 'de',
499
- back: 'Zurück',
500
- close: 'Schließen',
501
- nextMonth: 'Nächsten Monat',
502
- nextSlide: 'Zur nächsten Folie',
503
- previousMonth: 'Letzten Monat',
504
- previousSlide: 'Zur vorherigen Folie',
505
- selectYear: 'Jahr auswählen',
506
- readMore: 'Mehr lesen',
507
- more: 'Mehr',
508
- characters: 'Zeichen',
509
- outOf: 'von',
510
- entered: 'eingegeben',
610
+ $code: "de",
611
+ back: "Zurück",
612
+ close: "Schließen",
613
+ nextMonth: "Nächsten Monat",
614
+ nextSlide: "Zur nächsten Folie",
615
+ previousMonth: "Letzten Monat",
616
+ previousSlide: "Zur vorherigen Folie",
617
+ selectYear: "Jahr auswählen",
618
+ readMore: "Mehr lesen",
619
+ more: "Mehr",
620
+ characters: "Zeichen",
621
+ outOf: "von",
622
+ entered: "eingegeben"
511
623
  };
512
-
513
- class TranslationService {
514
- constructor(localeId) {
515
- this.localeId = localeId;
516
- this.activeTranslation = en;
517
- this.translations = { da, en, de };
518
- this.setActiveTranslation(localeId);
519
- }
520
- setActiveTranslation(localeId) {
521
- const baseLocaleId = localeId.split('-')[0];
522
- const translation = this.translations[baseLocaleId];
523
- if (!translation) {
524
- console.warn(`[Kirby] Internal component translations were not found for locale "${this.localeId}", falling back to ${this.get('$code')}`);
525
- return;
526
- }
527
- this.activeTranslation = translation;
528
- }
529
- get(key) {
530
- return this.activeTranslation[key];
531
- }
532
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TranslationService, deps: [{ token: LOCALE_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
533
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TranslationService, providedIn: 'root' }); }
534
- }
535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: TranslationService, decorators: [{
536
- type: Injectable,
537
- args: [{
538
- providedIn: 'root',
539
- }]
540
- }], ctorParameters: () => [{ type: undefined, decorators: [{
541
- type: Inject,
542
- args: [LOCALE_ID]
543
- }] }] });
544
-
545
- /**
546
- * Generated bundle index. Do not edit.
547
- */
548
-
624
+ var TranslationService = class TranslationService {
625
+ constructor(localeId) {
626
+ this.localeId = localeId;
627
+ this.activeTranslation = en;
628
+ this.translations = {
629
+ da,
630
+ en,
631
+ de
632
+ };
633
+ this.setActiveTranslation(localeId);
634
+ }
635
+ setActiveTranslation(localeId) {
636
+ const baseLocaleId = localeId.split("-")[0];
637
+ const translation = this.translations[baseLocaleId];
638
+ if (!translation) {
639
+ console.warn(`[Kirby] Internal component translations were not found for locale "${this.localeId}", falling back to ${this.get("$code")}`);
640
+ return;
641
+ }
642
+ this.activeTranslation = translation;
643
+ }
644
+ get(key) {
645
+ return this.activeTranslation[key];
646
+ }
647
+ static {
648
+ this.ɵfac = i0.ɵɵngDeclareFactory({
649
+ minVersion: "12.0.0",
650
+ version: "22.2.2",
651
+ ngImport: i0,
652
+ type: TranslationService,
653
+ deps: [{ token: LOCALE_ID }],
654
+ target: i0.ɵɵFactoryTarget.Injectable
655
+ });
656
+ }
657
+ static {
658
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
659
+ minVersion: "12.0.0",
660
+ version: "22.2.2",
661
+ ngImport: i0,
662
+ type: TranslationService,
663
+ providedIn: "root"
664
+ });
665
+ }
666
+ };
667
+ i0.ɵɵngDeclareClassMetadata({
668
+ minVersion: "12.0.0",
669
+ version: "22.2.2",
670
+ ngImport: i0,
671
+ type: TranslationService,
672
+ decorators: [{
673
+ type: Injectable,
674
+ args: [{ providedIn: "root" }]
675
+ }],
676
+ ctorParameters: () => [{
677
+ type: void 0,
678
+ decorators: [{
679
+ type: Inject,
680
+ args: [LOCALE_ID]
681
+ }]
682
+ }]
683
+ });
549
684
  export { ComponentLoaderDirective, FitHeadingDirective, ResizeObserverFactory, ResizeObserverService, TextResizeObserverService, ThemeColorDirective, TranslationService, findItemLabel, forwardAttributes, inheritAriaLabelText, setAccessibleLabel };
550
- //# sourceMappingURL=kirbydesign-designsystem-shared.mjs.map
685
+
686
+ //# sourceMappingURL=kirbydesign-designsystem-shared.mjs.map