@kirbydesign/designsystem 11.11.4 → 12.0.0-dev-286cdc0

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 (291) hide show
  1. package/README.md +7 -0
  2. package/fesm2022/kirbydesign-designsystem-accordion.mjs +246 -135
  3. package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
  4. package/fesm2022/kirbydesign-designsystem-action-group.mjs +229 -134
  5. package/fesm2022/kirbydesign-designsystem-action-group.mjs.map +1 -1
  6. package/fesm2022/kirbydesign-designsystem-avatar.mjs +102 -55
  7. package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
  8. package/fesm2022/kirbydesign-designsystem-badge.mjs +85 -42
  9. package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
  10. package/fesm2022/kirbydesign-designsystem-button.mjs +203 -170
  11. package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
  12. package/fesm2022/kirbydesign-designsystem-calendar.mjs +524 -516
  13. package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
  14. package/fesm2022/kirbydesign-designsystem-card.mjs +439 -205
  15. package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
  16. package/fesm2022/kirbydesign-designsystem-chart.mjs +1388 -1469
  17. package/fesm2022/kirbydesign-designsystem-chart.mjs.map +1 -1
  18. package/fesm2022/kirbydesign-designsystem-checkbox.mjs +223 -176
  19. package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
  20. package/fesm2022/kirbydesign-designsystem-config.mjs +50 -96
  21. package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -1
  22. package/fesm2022/kirbydesign-designsystem-data-table.mjs +180 -83
  23. package/fesm2022/kirbydesign-designsystem-data-table.mjs.map +1 -1
  24. package/fesm2022/kirbydesign-designsystem-divider.mjs +46 -19
  25. package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
  26. package/fesm2022/kirbydesign-designsystem-dropdown.mjs +878 -752
  27. package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
  28. package/fesm2022/kirbydesign-designsystem-empty-state.mjs +175 -91
  29. package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
  30. package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +213 -85
  31. package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
  32. package/fesm2022/kirbydesign-designsystem-flag.mjs +67 -33
  33. package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
  34. package/fesm2022/kirbydesign-designsystem-form-field.mjs +1260 -891
  35. package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
  36. package/fesm2022/kirbydesign-designsystem-gesture.mjs +38 -23
  37. package/fesm2022/kirbydesign-designsystem-gesture.mjs.map +1 -1
  38. package/fesm2022/kirbydesign-designsystem-header.mjs +422 -182
  39. package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
  40. package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs +16 -14
  41. package/fesm2022/kirbydesign-designsystem-helpers-scss.mjs.map +1 -1
  42. package/fesm2022/kirbydesign-designsystem-helpers.mjs +251 -361
  43. package/fesm2022/kirbydesign-designsystem-helpers.mjs.map +1 -1
  44. package/fesm2022/kirbydesign-designsystem-icon.mjs +881 -296
  45. package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
  46. package/fesm2022/kirbydesign-designsystem-item-group.mjs +52 -23
  47. package/fesm2022/kirbydesign-designsystem-item-group.mjs.map +1 -1
  48. package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +147 -43
  49. package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
  50. package/fesm2022/kirbydesign-designsystem-item.mjs +395 -151
  51. package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
  52. package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +136 -54
  53. package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
  54. package/fesm2022/kirbydesign-designsystem-list.mjs +1188 -697
  55. package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
  56. package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +166 -76
  57. package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
  58. package/fesm2022/kirbydesign-designsystem-menu.mjs +420 -311
  59. package/fesm2022/kirbydesign-designsystem-menu.mjs.map +1 -1
  60. package/fesm2022/kirbydesign-designsystem-modal.mjs +2476 -1912
  61. package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
  62. package/fesm2022/kirbydesign-designsystem-page.mjs +1526 -905
  63. package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
  64. package/fesm2022/kirbydesign-designsystem-popover.mjs +204 -169
  65. package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
  66. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +209 -158
  67. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
  68. package/fesm2022/kirbydesign-designsystem-radio.mjs +537 -365
  69. package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
  70. package/fesm2022/kirbydesign-designsystem-range.mjs +207 -150
  71. package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
  72. package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +217 -104
  73. package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
  74. package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +113 -38
  75. package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
  76. package/fesm2022/kirbydesign-designsystem-section-header.mjs +56 -18
  77. package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
  78. package/fesm2022/kirbydesign-designsystem-segmented-control.mjs +276 -232
  79. package/fesm2022/kirbydesign-designsystem-segmented-control.mjs.map +1 -1
  80. package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +328 -382
  81. package/fesm2022/kirbydesign-designsystem-shared-floating.mjs.map +1 -1
  82. package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +73 -84
  83. package/fesm2022/kirbydesign-designsystem-shared-portal.mjs.map +1 -1
  84. package/fesm2022/kirbydesign-designsystem-shared.mjs +665 -531
  85. package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
  86. package/fesm2022/kirbydesign-designsystem-slide-button.mjs +140 -91
  87. package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
  88. package/fesm2022/kirbydesign-designsystem-slide.mjs +360 -158
  89. package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
  90. package/fesm2022/kirbydesign-designsystem-spinner.mjs +90 -32
  91. package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
  92. package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +348 -181
  93. package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
  94. package/fesm2022/kirbydesign-designsystem-tabs.mjs +286 -121
  95. package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
  96. package/fesm2022/kirbydesign-designsystem-testing-base.mjs +6234 -3164
  97. package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
  98. package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +118 -95
  99. package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs.map +1 -1
  100. package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +128 -101
  101. package/fesm2022/kirbydesign-designsystem-testing-jest.mjs.map +1 -1
  102. package/fesm2022/kirbydesign-designsystem-testing.mjs +236 -243
  103. package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
  104. package/fesm2022/kirbydesign-designsystem-toast.mjs +98 -62
  105. package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
  106. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +155 -127
  107. package/fesm2022/kirbydesign-designsystem-toggle-button.mjs.map +1 -1
  108. package/fesm2022/kirbydesign-designsystem-toggle.mjs +180 -150
  109. package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
  110. package/fesm2022/kirbydesign-designsystem-types.mjs +39 -24
  111. package/fesm2022/kirbydesign-designsystem-types.mjs.map +1 -1
  112. package/fesm2022/kirbydesign-designsystem.mjs +516 -407
  113. package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
  114. package/icons/svg/megaphone.svg +3 -0
  115. package/icons/svg/person-blocked.svg +3 -0
  116. package/icons/svg/person-check.svg +3 -0
  117. package/icons/svg/person-close.svg +3 -0
  118. package/icons/svg/person-cloud.svg +3 -0
  119. package/icons/svg/person-power.svg +3 -0
  120. package/icons/svg/person-warning.svg +3 -0
  121. package/icons/svg/phone-device-pin.svg +3 -0
  122. package/icons/svg/phone-device.svg +3 -2
  123. package/package.json +10 -10
  124. package/readme.md +37 -0
  125. package/types/kirbydesign-designsystem-accordion.d.ts +72 -39
  126. package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -1
  127. package/types/kirbydesign-designsystem-action-group.d.ts +46 -39
  128. package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -1
  129. package/types/kirbydesign-designsystem-avatar.d.ts +62 -26
  130. package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
  131. package/types/kirbydesign-designsystem-badge.d.ts +30 -19
  132. package/types/kirbydesign-designsystem-badge.d.ts.map +1 -1
  133. package/types/kirbydesign-designsystem-button.d.ts +70 -45
  134. package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
  135. package/types/kirbydesign-designsystem-calendar.d.ts +193 -132
  136. package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
  137. package/types/kirbydesign-designsystem-card.d.ts +130 -66
  138. package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
  139. package/types/kirbydesign-designsystem-chart.d.ts +198 -172
  140. package/types/kirbydesign-designsystem-chart.d.ts.map +1 -1
  141. package/types/kirbydesign-designsystem-checkbox.d.ts +102 -68
  142. package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
  143. package/types/kirbydesign-designsystem-config.d.ts +17 -21
  144. package/types/kirbydesign-designsystem-config.d.ts.map +1 -1
  145. package/types/kirbydesign-designsystem-data-table.d.ts +46 -26
  146. package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -1
  147. package/types/kirbydesign-designsystem-divider.d.ts +11 -9
  148. package/types/kirbydesign-designsystem-divider.d.ts.map +1 -1
  149. package/types/kirbydesign-designsystem-dropdown.d.ts +219 -166
  150. package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
  151. package/types/kirbydesign-designsystem-empty-state.d.ts +58 -35
  152. package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
  153. package/types/kirbydesign-designsystem-fab-sheet.d.ts +34 -28
  154. package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -1
  155. package/types/kirbydesign-designsystem-flag.d.ts +18 -13
  156. package/types/kirbydesign-designsystem-flag.d.ts.map +1 -1
  157. package/types/kirbydesign-designsystem-form-field.d.ts +409 -242
  158. package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
  159. package/types/kirbydesign-designsystem-gesture.d.ts +41 -46
  160. package/types/kirbydesign-designsystem-gesture.d.ts.map +1 -1
  161. package/types/kirbydesign-designsystem-header.d.ts +102 -64
  162. package/types/kirbydesign-designsystem-header.d.ts.map +1 -1
  163. package/types/kirbydesign-designsystem-helpers-scss.d.ts +6 -8
  164. package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -1
  165. package/types/kirbydesign-designsystem-helpers.d.ts +83 -97
  166. package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -1
  167. package/types/kirbydesign-designsystem-icon.d.ts +63 -59
  168. package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
  169. package/types/kirbydesign-designsystem-item-group.d.ts +6 -9
  170. package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -1
  171. package/types/kirbydesign-designsystem-item-sliding.d.ts +30 -26
  172. package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -1
  173. package/types/kirbydesign-designsystem-item.d.ts +93 -54
  174. package/types/kirbydesign-designsystem-item.d.ts.map +1 -1
  175. package/types/kirbydesign-designsystem-kirby-app.d.ts +18 -19
  176. package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -1
  177. package/types/kirbydesign-designsystem-list.d.ts +392 -263
  178. package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
  179. package/types/kirbydesign-designsystem-loading-overlay.d.ts +35 -24
  180. package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -1
  181. package/types/kirbydesign-designsystem-menu.d.ts +119 -69
  182. package/types/kirbydesign-designsystem-menu.d.ts.map +1 -1
  183. package/types/kirbydesign-designsystem-modal.d.ts +578 -455
  184. package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
  185. package/types/kirbydesign-designsystem-page.d.ts +308 -226
  186. package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
  187. package/types/kirbydesign-designsystem-popover.d.ts +48 -40
  188. package/types/kirbydesign-designsystem-popover.d.ts.map +1 -1
  189. package/types/kirbydesign-designsystem-progress-circle.d.ts +59 -61
  190. package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
  191. package/types/kirbydesign-designsystem-radio.d.ts +147 -98
  192. package/types/kirbydesign-designsystem-radio.d.ts.map +1 -1
  193. package/types/kirbydesign-designsystem-range.d.ts +90 -45
  194. package/types/kirbydesign-designsystem-range.d.ts.map +1 -1
  195. package/types/kirbydesign-designsystem-reorder-list.d.ts +44 -32
  196. package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -1
  197. package/types/kirbydesign-designsystem-router-outlet.d.ts +23 -18
  198. package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -1
  199. package/types/kirbydesign-designsystem-section-header.d.ts +5 -8
  200. package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -1
  201. package/types/kirbydesign-designsystem-segmented-control.d.ts +123 -100
  202. package/types/kirbydesign-designsystem-segmented-control.d.ts.map +1 -1
  203. package/types/kirbydesign-designsystem-shared-floating.d.ts +183 -128
  204. package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -1
  205. package/types/kirbydesign-designsystem-shared-portal.d.ts +29 -28
  206. package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -1
  207. package/types/kirbydesign-designsystem-shared.d.ts +143 -139
  208. package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
  209. package/types/kirbydesign-designsystem-slide-button.d.ts +43 -34
  210. package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -1
  211. package/types/kirbydesign-designsystem-slide.d.ts +80 -59
  212. package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
  213. package/types/kirbydesign-designsystem-spinner.d.ts +13 -14
  214. package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -1
  215. package/types/kirbydesign-designsystem-tab-navigation.d.ts +78 -55
  216. package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -1
  217. package/types/kirbydesign-designsystem-tabs.d.ts +50 -45
  218. package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -1
  219. package/types/kirbydesign-designsystem-testing-base.d.ts +2435 -815
  220. package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
  221. package/types/kirbydesign-designsystem-testing-jasmine.d.ts +9 -10
  222. package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -1
  223. package/types/kirbydesign-designsystem-testing-jest.d.ts +9 -10
  224. package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -1
  225. package/types/kirbydesign-designsystem-testing.d.ts +52 -58
  226. package/types/kirbydesign-designsystem-testing.d.ts.map +1 -1
  227. package/types/kirbydesign-designsystem-toast.d.ts +25 -31
  228. package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
  229. package/types/kirbydesign-designsystem-toggle-button.d.ts +62 -56
  230. package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -1
  231. package/types/kirbydesign-designsystem-toggle.d.ts +71 -63
  232. package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -1
  233. package/types/kirbydesign-designsystem-types.d.ts +15 -22
  234. package/types/kirbydesign-designsystem-types.d.ts.map +1 -1
  235. package/types/kirbydesign-designsystem.d.ts +135 -123
  236. package/types/kirbydesign-designsystem.d.ts.map +1 -1
  237. package/accordion/package.json +0 -4
  238. package/action-group/package.json +0 -4
  239. package/avatar/package.json +0 -4
  240. package/badge/package.json +0 -4
  241. package/button/package.json +0 -4
  242. package/calendar/package.json +0 -4
  243. package/card/package.json +0 -4
  244. package/chart/package.json +0 -4
  245. package/checkbox/package.json +0 -4
  246. package/config/package.json +0 -4
  247. package/data-table/package.json +0 -4
  248. package/divider/package.json +0 -4
  249. package/dropdown/package.json +0 -4
  250. package/empty-state/package.json +0 -4
  251. package/fab-sheet/package.json +0 -4
  252. package/flag/package.json +0 -4
  253. package/form-field/package.json +0 -4
  254. package/gesture/package.json +0 -4
  255. package/header/package.json +0 -4
  256. package/helpers/package.json +0 -4
  257. package/helpers/scss/package.json +0 -4
  258. package/icon/package.json +0 -4
  259. package/item/package.json +0 -4
  260. package/item-group/package.json +0 -4
  261. package/item-sliding/package.json +0 -4
  262. package/kirby-app/package.json +0 -4
  263. package/list/package.json +0 -4
  264. package/loading-overlay/package.json +0 -4
  265. package/menu/package.json +0 -4
  266. package/modal/package.json +0 -4
  267. package/page/package.json +0 -4
  268. package/popover/package.json +0 -4
  269. package/progress-circle/package.json +0 -4
  270. package/radio/package.json +0 -4
  271. package/range/package.json +0 -4
  272. package/reorder-list/package.json +0 -4
  273. package/router-outlet/package.json +0 -4
  274. package/section-header/package.json +0 -4
  275. package/segmented-control/package.json +0 -4
  276. package/shared/floating/package.json +0 -4
  277. package/shared/package.json +0 -4
  278. package/shared/portal/package.json +0 -4
  279. package/slide/package.json +0 -4
  280. package/slide-button/package.json +0 -4
  281. package/spinner/package.json +0 -4
  282. package/tab-navigation/package.json +0 -4
  283. package/tabs/package.json +0 -4
  284. package/testing/package.json +0 -4
  285. package/testing-base/package.json +0 -4
  286. package/testing-jasmine/package.json +0 -4
  287. package/testing-jest/package.json +0 -4
  288. package/toast/package.json +0 -4
  289. package/toggle/package.json +0 -4
  290. package/toggle-button/package.json +0 -4
  291. package/types/package.json +0 -4
@@ -1,305 +1,890 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, Inject, Injectable, Input, HostBinding, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { IonIcon } from '@ionic/angular/standalone';
4
- import { ThemeColorDirective } from '@kirbydesign/designsystem/shared';
5
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, HostBinding, Inject, Injectable, InjectionToken, Input, NgModule } from "@angular/core";
3
+ import { IonIcon } from "@ionic/angular";
4
+ import { ThemeColorDirective } from "@kirbydesign/designsystem/shared";
6
5
  const sortIconsByName = (icons) => {
7
- const collator = new Intl.Collator('en');
8
- return icons.sort((a, b) => collator.compare(a.name, b.name));
9
- };
10
- const kirbyIconSettings = {
11
- icons: sortIconsByName([
12
- { name: 'accounts-outline', svg: 'accounts-outline.svg' },
13
- { name: 'accounts', svg: 'accounts.svg' },
14
- { name: 'add', svg: 'add.svg' },
15
- { name: 'remove', svg: 'remove.svg' },
16
- { name: 'unsubscribe', svg: 'unsubscribe.svg' },
17
- { name: 'arrow-back', svg: 'arrow-back.svg' },
18
- { name: 'arrow-down', svg: 'arrow-down.svg' },
19
- { name: 'arrow-more', svg: 'arrow-more.svg' },
20
- { name: 'arrow-up', svg: 'arrow-up.svg' },
21
- { name: 'attach', svg: 'attach.svg' },
22
- { name: 'backspace', svg: 'backspace.svg' },
23
- { name: 'calendar', svg: 'calendar.svg' },
24
- { name: 'camera', svg: 'camera.svg' },
25
- { name: 'car', svg: 'car.svg' },
26
- { name: 'chainlink', svg: 'chainlink.svg' },
27
- { name: 'checkbox-outline', svg: 'checkbox-outline.svg' },
28
- { name: 'checkbox', svg: 'checkbox.svg' },
29
- { name: 'checkmark-selected', svg: 'checkmark-selected.svg' },
30
- { name: 'close', svg: 'close.svg' },
31
- { name: 'cog', svg: 'cog.svg' },
32
- { name: 'coinstack', svg: 'coinstack.svg' },
33
- { name: 'contact', svg: 'contact.svg' },
34
- { name: 'copy', svg: 'copy.svg' },
35
- { name: 'flag', svg: 'flag.svg' },
36
- { name: 'edit', svg: 'edit.svg' },
37
- { name: 'filter', svg: 'filter.svg' },
38
- { name: 'flash-off', svg: 'flash-off.svg' },
39
- { name: 'flash', svg: 'flash.svg' },
40
- { name: 'moneybag', svg: 'moneybag.svg' },
41
- { name: 'help', svg: 'help.svg' },
42
- { name: 'home', svg: 'home.svg' },
43
- { name: 'id-card', svg: 'id-card.svg' },
44
- { name: 'inbox', svg: 'inbox.svg' },
45
- { name: 'inbox-outline', svg: 'inbox-outline.svg' },
46
- { name: 'information', svg: 'information.svg' },
47
- { name: 'insurance', svg: 'insurance.svg' },
48
- { name: 'investment', svg: 'investment.svg' },
49
- { name: 'key', svg: 'key.svg' },
50
- { name: 'kirby', svg: 'kirby.svg' },
51
- { name: 'link', svg: 'link.svg' },
52
- { name: 'log-out', svg: 'log-out.svg' },
53
- { name: 'menu-outline', svg: 'menu-outline.svg' },
54
- { name: 'menu', svg: 'menu.svg' },
55
- { name: 'menu-no-decoration', svg: 'menu-no-decoration.svg' },
56
- { name: 'message-read', svg: 'message-read.svg' },
57
- { name: 'misc', svg: 'misc.svg' },
58
- { name: 'more', svg: 'more.svg' },
59
- { name: 'move', svg: 'move.svg' },
60
- { name: 'note', svg: 'note.svg' },
61
- { name: 'note-create', svg: 'note-create.svg' },
62
- { name: 'payment-card', svg: 'payment-card.svg' },
63
- { name: 'pension', svg: 'pension.svg' },
64
- { name: 'person-outline', svg: 'person-outline.svg' },
65
- { name: 'person', svg: 'person.svg' },
66
- { name: 'qr', svg: 'QR.svg' },
67
- { name: 'recurring', svg: 'recurring.svg' },
68
- { name: 'salary', svg: 'salary.svg' },
69
- { name: 'search', svg: 'search.svg' },
70
- { name: 'share', svg: 'share.svg' },
71
- { name: 'sort', svg: 'sort.svg' },
72
- { name: 'support', svg: 'support.svg' },
73
- { name: 'swap', svg: 'swap.svg' },
74
- { name: 'trash', svg: 'trash.svg' },
75
- { name: 'foreign-payment', svg: 'foreign-payment.svg' },
76
- { name: 'clock', svg: 'clock.svg' },
77
- { name: 'verify', svg: 'verify.svg' },
78
- { name: 'warning', svg: 'warning.svg' },
79
- { name: 'write-message', svg: 'write-message.svg' },
80
- { name: 'reorder', svg: 'reorder.svg' },
81
- { name: 'accident', svg: 'accident.svg' },
82
- { name: 'health', svg: 'health.svg' },
83
- { name: 'illness', svg: 'illness.svg' },
84
- { name: 'incapacity', svg: 'incapacity.svg' },
85
- { name: 'life', svg: 'life.svg' },
86
- { name: 'help-decoration', svg: 'help-decoration.svg' },
87
- { name: 'information-decoration', svg: 'information-decoration.svg' },
88
- { name: 'warning-decoration', svg: 'warning-decoration.svg' },
89
- { name: 'notification', svg: 'notification.svg' },
90
- { name: 'transfer-ownership', svg: 'transfer-ownership.svg' },
91
- { name: 'update', svg: 'update.svg' },
92
- { name: 'user-blocked', svg: 'user-blocked.svg' },
93
- { name: 'add-bank', svg: 'add-bank.svg' },
94
- { name: 'participants', svg: 'participants.svg' },
95
- { name: 'download', svg: 'download.svg' },
96
- { name: 'globe-transfer', svg: 'globe-transfer.svg' },
97
- { name: 'banknotes', svg: 'banknotes.svg' },
98
- { name: 'air-balloon', svg: 'air-balloon.svg' },
99
- { name: 'piggybank', svg: 'piggybank.svg' },
100
- { name: 'business', svg: 'business.svg' },
101
- { name: 'navigation', svg: 'navigation.svg' },
102
- { name: 'phone-device', svg: 'phone-device.svg' },
103
- { name: 'upload', svg: 'upload.svg' },
104
- { name: 'document', svg: 'document.svg' },
105
- { name: 'chat', svg: 'chat.svg' },
106
- { name: 'feedback', svg: 'feedback.svg' },
107
- { name: 'keyboard', svg: 'keyboard.svg' },
108
- { name: 'lock', svg: 'lock.svg' },
109
- { name: 'see', svg: 'see.svg' },
110
- { name: 'overview', svg: 'overview.svg' },
111
- { name: 'overview-outline', svg: 'overview-outline.svg' },
112
- { name: 'arrow-down-fill', svg: 'arrow-down-fill.svg' },
113
- { name: 'arrow-up-fill', svg: 'arrow-up-fill.svg' },
114
- { name: 'calculator', svg: 'calculator.svg' },
115
- { name: 'grid', svg: 'grid.svg' },
116
- { name: 'list', svg: 'list.svg' },
117
- { name: 'adjust', svg: 'adjust.svg' },
118
- { name: 'bs-logo', svg: 'bs-logo.svg' },
119
- { name: 'company', svg: 'company.svg' },
120
- { name: 'budget', svg: 'budget.svg' },
121
- { name: 'history', svg: 'history.svg' },
122
- { name: 'dot', svg: 'dot.svg' },
123
- { name: 'agreement', svg: 'agreement.svg' },
124
- { name: 'sunshine', svg: 'sunshine.svg' },
125
- { name: 'star', svg: 'star.svg' },
126
- { name: 'star-fill', svg: 'star-fill.svg' },
127
- { name: 'payment', svg: 'payment.svg' },
128
- { name: 'revert', svg: 'revert.svg' },
129
- { name: 'fees', svg: 'fees.svg' },
130
- { name: 'crossedeye', svg: 'crossedeye.svg' },
131
- { name: 'common', svg: 'common.svg' },
132
- { name: 'calendar-start', svg: 'calendar-start.svg' },
133
- { name: 'calendar-end', svg: 'calendar-end.svg' },
134
- { name: 'expand', svg: 'expand.svg' },
135
- { name: 'contract', svg: 'contract.svg' },
136
- { name: 'house', svg: 'house.svg' },
137
- { name: 'tractor', svg: 'tractor.svg' },
138
- { name: 'flower', svg: 'flower.svg' },
139
- { name: 'basket', svg: 'basket.svg' },
140
- { name: 'drag-drop', svg: 'drag-drop.svg' },
141
- { name: 'notification-fill', svg: 'notification-fill.svg' },
142
- { name: 'expense', svg: 'expense.svg' },
143
- { name: 'income', svg: 'income.svg' },
144
- { name: 'top-up', svg: 'top-up.svg' },
145
- { name: 'signed-document', svg: 'signed-document.svg' },
146
- { name: 'bank', svg: 'bank.svg' },
147
- { name: 'balloon', svg: 'balloon.svg' },
148
- { name: 'scale', svg: 'scale.svg' },
149
- { name: 'ownership', svg: 'ownership.svg' },
150
- { name: 'maintenance', svg: 'maintenance.svg' },
151
- { name: 'blocked', svg: 'blocked.svg' },
152
- { name: 'checklist', svg: 'checklist.svg' },
153
- { name: 'collection', svg: 'collection.svg' },
154
- { name: 'pause', svg: 'pause.svg' },
155
- { name: 'payment-change', svg: 'payment-change.svg' },
156
- { name: 'pregnancy', svg: 'pregnancy.svg' },
157
- { name: 'send', svg: 'send.svg' },
158
- { name: 'subscription', svg: 'subscription.svg' },
159
- ]),
6
+ const collator = new Intl.Collator("en");
7
+ return icons.sort((a, b) => collator.compare(a.name, b.name));
160
8
  };
9
+ const kirbyIconSettings = { icons: sortIconsByName([
10
+ {
11
+ name: "accounts-outline",
12
+ svg: "accounts-outline.svg"
13
+ },
14
+ {
15
+ name: "accounts",
16
+ svg: "accounts.svg"
17
+ },
18
+ {
19
+ name: "add",
20
+ svg: "add.svg"
21
+ },
22
+ {
23
+ name: "remove",
24
+ svg: "remove.svg"
25
+ },
26
+ {
27
+ name: "unsubscribe",
28
+ svg: "unsubscribe.svg"
29
+ },
30
+ {
31
+ name: "arrow-back",
32
+ svg: "arrow-back.svg"
33
+ },
34
+ {
35
+ name: "arrow-down",
36
+ svg: "arrow-down.svg"
37
+ },
38
+ {
39
+ name: "arrow-more",
40
+ svg: "arrow-more.svg"
41
+ },
42
+ {
43
+ name: "arrow-up",
44
+ svg: "arrow-up.svg"
45
+ },
46
+ {
47
+ name: "attach",
48
+ svg: "attach.svg"
49
+ },
50
+ {
51
+ name: "backspace",
52
+ svg: "backspace.svg"
53
+ },
54
+ {
55
+ name: "calendar",
56
+ svg: "calendar.svg"
57
+ },
58
+ {
59
+ name: "camera",
60
+ svg: "camera.svg"
61
+ },
62
+ {
63
+ name: "car",
64
+ svg: "car.svg"
65
+ },
66
+ {
67
+ name: "chainlink",
68
+ svg: "chainlink.svg"
69
+ },
70
+ {
71
+ name: "checkbox-outline",
72
+ svg: "checkbox-outline.svg"
73
+ },
74
+ {
75
+ name: "checkbox",
76
+ svg: "checkbox.svg"
77
+ },
78
+ {
79
+ name: "checkmark-selected",
80
+ svg: "checkmark-selected.svg"
81
+ },
82
+ {
83
+ name: "close",
84
+ svg: "close.svg"
85
+ },
86
+ {
87
+ name: "cog",
88
+ svg: "cog.svg"
89
+ },
90
+ {
91
+ name: "coinstack",
92
+ svg: "coinstack.svg"
93
+ },
94
+ {
95
+ name: "contact",
96
+ svg: "contact.svg"
97
+ },
98
+ {
99
+ name: "copy",
100
+ svg: "copy.svg"
101
+ },
102
+ {
103
+ name: "flag",
104
+ svg: "flag.svg"
105
+ },
106
+ {
107
+ name: "edit",
108
+ svg: "edit.svg"
109
+ },
110
+ {
111
+ name: "filter",
112
+ svg: "filter.svg"
113
+ },
114
+ {
115
+ name: "flash-off",
116
+ svg: "flash-off.svg"
117
+ },
118
+ {
119
+ name: "flash",
120
+ svg: "flash.svg"
121
+ },
122
+ {
123
+ name: "moneybag",
124
+ svg: "moneybag.svg"
125
+ },
126
+ {
127
+ name: "help",
128
+ svg: "help.svg"
129
+ },
130
+ {
131
+ name: "home",
132
+ svg: "home.svg"
133
+ },
134
+ {
135
+ name: "id-card",
136
+ svg: "id-card.svg"
137
+ },
138
+ {
139
+ name: "inbox",
140
+ svg: "inbox.svg"
141
+ },
142
+ {
143
+ name: "inbox-outline",
144
+ svg: "inbox-outline.svg"
145
+ },
146
+ {
147
+ name: "information",
148
+ svg: "information.svg"
149
+ },
150
+ {
151
+ name: "insurance",
152
+ svg: "insurance.svg"
153
+ },
154
+ {
155
+ name: "investment",
156
+ svg: "investment.svg"
157
+ },
158
+ {
159
+ name: "key",
160
+ svg: "key.svg"
161
+ },
162
+ {
163
+ name: "kirby",
164
+ svg: "kirby.svg"
165
+ },
166
+ {
167
+ name: "link",
168
+ svg: "link.svg"
169
+ },
170
+ {
171
+ name: "log-out",
172
+ svg: "log-out.svg"
173
+ },
174
+ {
175
+ name: "menu-outline",
176
+ svg: "menu-outline.svg"
177
+ },
178
+ {
179
+ name: "menu",
180
+ svg: "menu.svg"
181
+ },
182
+ {
183
+ name: "menu-no-decoration",
184
+ svg: "menu-no-decoration.svg"
185
+ },
186
+ {
187
+ name: "megaphone",
188
+ svg: "megaphone.svg"
189
+ },
190
+ {
191
+ name: "message-read",
192
+ svg: "message-read.svg"
193
+ },
194
+ {
195
+ name: "misc",
196
+ svg: "misc.svg"
197
+ },
198
+ {
199
+ name: "more",
200
+ svg: "more.svg"
201
+ },
202
+ {
203
+ name: "move",
204
+ svg: "move.svg"
205
+ },
206
+ {
207
+ name: "note",
208
+ svg: "note.svg"
209
+ },
210
+ {
211
+ name: "note-create",
212
+ svg: "note-create.svg"
213
+ },
214
+ {
215
+ name: "payment-card",
216
+ svg: "payment-card.svg"
217
+ },
218
+ {
219
+ name: "pension",
220
+ svg: "pension.svg"
221
+ },
222
+ {
223
+ name: "person-outline",
224
+ svg: "person-outline.svg"
225
+ },
226
+ {
227
+ name: "person",
228
+ svg: "person.svg"
229
+ },
230
+ {
231
+ name: "person-blocked",
232
+ svg: "person-blocked.svg"
233
+ },
234
+ {
235
+ name: "person-check",
236
+ svg: "person-check.svg"
237
+ },
238
+ {
239
+ name: "person-close",
240
+ svg: "person-close.svg"
241
+ },
242
+ {
243
+ name: "person-power",
244
+ svg: "person-power.svg"
245
+ },
246
+ {
247
+ name: "person-cloud",
248
+ svg: "person-cloud.svg"
249
+ },
250
+ {
251
+ name: "person-warning",
252
+ svg: "person-warning.svg"
253
+ },
254
+ {
255
+ name: "phone-device-pin",
256
+ svg: "phone-device-pin.svg"
257
+ },
258
+ {
259
+ name: "qr",
260
+ svg: "QR.svg"
261
+ },
262
+ {
263
+ name: "recurring",
264
+ svg: "recurring.svg"
265
+ },
266
+ {
267
+ name: "salary",
268
+ svg: "salary.svg"
269
+ },
270
+ {
271
+ name: "search",
272
+ svg: "search.svg"
273
+ },
274
+ {
275
+ name: "share",
276
+ svg: "share.svg"
277
+ },
278
+ {
279
+ name: "sort",
280
+ svg: "sort.svg"
281
+ },
282
+ {
283
+ name: "support",
284
+ svg: "support.svg"
285
+ },
286
+ {
287
+ name: "swap",
288
+ svg: "swap.svg"
289
+ },
290
+ {
291
+ name: "trash",
292
+ svg: "trash.svg"
293
+ },
294
+ {
295
+ name: "foreign-payment",
296
+ svg: "foreign-payment.svg"
297
+ },
298
+ {
299
+ name: "clock",
300
+ svg: "clock.svg"
301
+ },
302
+ {
303
+ name: "verify",
304
+ svg: "verify.svg"
305
+ },
306
+ {
307
+ name: "warning",
308
+ svg: "warning.svg"
309
+ },
310
+ {
311
+ name: "write-message",
312
+ svg: "write-message.svg"
313
+ },
314
+ {
315
+ name: "reorder",
316
+ svg: "reorder.svg"
317
+ },
318
+ {
319
+ name: "accident",
320
+ svg: "accident.svg"
321
+ },
322
+ {
323
+ name: "health",
324
+ svg: "health.svg"
325
+ },
326
+ {
327
+ name: "illness",
328
+ svg: "illness.svg"
329
+ },
330
+ {
331
+ name: "incapacity",
332
+ svg: "incapacity.svg"
333
+ },
334
+ {
335
+ name: "life",
336
+ svg: "life.svg"
337
+ },
338
+ {
339
+ name: "help-decoration",
340
+ svg: "help-decoration.svg"
341
+ },
342
+ {
343
+ name: "information-decoration",
344
+ svg: "information-decoration.svg"
345
+ },
346
+ {
347
+ name: "warning-decoration",
348
+ svg: "warning-decoration.svg"
349
+ },
350
+ {
351
+ name: "notification",
352
+ svg: "notification.svg"
353
+ },
354
+ {
355
+ name: "transfer-ownership",
356
+ svg: "transfer-ownership.svg"
357
+ },
358
+ {
359
+ name: "update",
360
+ svg: "update.svg"
361
+ },
362
+ {
363
+ name: "user-blocked",
364
+ svg: "user-blocked.svg"
365
+ },
366
+ {
367
+ name: "add-bank",
368
+ svg: "add-bank.svg"
369
+ },
370
+ {
371
+ name: "participants",
372
+ svg: "participants.svg"
373
+ },
374
+ {
375
+ name: "download",
376
+ svg: "download.svg"
377
+ },
378
+ {
379
+ name: "globe-transfer",
380
+ svg: "globe-transfer.svg"
381
+ },
382
+ {
383
+ name: "banknotes",
384
+ svg: "banknotes.svg"
385
+ },
386
+ {
387
+ name: "air-balloon",
388
+ svg: "air-balloon.svg"
389
+ },
390
+ {
391
+ name: "piggybank",
392
+ svg: "piggybank.svg"
393
+ },
394
+ {
395
+ name: "business",
396
+ svg: "business.svg"
397
+ },
398
+ {
399
+ name: "navigation",
400
+ svg: "navigation.svg"
401
+ },
402
+ {
403
+ name: "phone-device",
404
+ svg: "phone-device.svg"
405
+ },
406
+ {
407
+ name: "upload",
408
+ svg: "upload.svg"
409
+ },
410
+ {
411
+ name: "document",
412
+ svg: "document.svg"
413
+ },
414
+ {
415
+ name: "chat",
416
+ svg: "chat.svg"
417
+ },
418
+ {
419
+ name: "feedback",
420
+ svg: "feedback.svg"
421
+ },
422
+ {
423
+ name: "keyboard",
424
+ svg: "keyboard.svg"
425
+ },
426
+ {
427
+ name: "lock",
428
+ svg: "lock.svg"
429
+ },
430
+ {
431
+ name: "see",
432
+ svg: "see.svg"
433
+ },
434
+ {
435
+ name: "overview",
436
+ svg: "overview.svg"
437
+ },
438
+ {
439
+ name: "overview-outline",
440
+ svg: "overview-outline.svg"
441
+ },
442
+ {
443
+ name: "arrow-down-fill",
444
+ svg: "arrow-down-fill.svg"
445
+ },
446
+ {
447
+ name: "arrow-up-fill",
448
+ svg: "arrow-up-fill.svg"
449
+ },
450
+ {
451
+ name: "calculator",
452
+ svg: "calculator.svg"
453
+ },
454
+ {
455
+ name: "grid",
456
+ svg: "grid.svg"
457
+ },
458
+ {
459
+ name: "list",
460
+ svg: "list.svg"
461
+ },
462
+ {
463
+ name: "adjust",
464
+ svg: "adjust.svg"
465
+ },
466
+ {
467
+ name: "bs-logo",
468
+ svg: "bs-logo.svg"
469
+ },
470
+ {
471
+ name: "company",
472
+ svg: "company.svg"
473
+ },
474
+ {
475
+ name: "budget",
476
+ svg: "budget.svg"
477
+ },
478
+ {
479
+ name: "history",
480
+ svg: "history.svg"
481
+ },
482
+ {
483
+ name: "dot",
484
+ svg: "dot.svg"
485
+ },
486
+ {
487
+ name: "agreement",
488
+ svg: "agreement.svg"
489
+ },
490
+ {
491
+ name: "sunshine",
492
+ svg: "sunshine.svg"
493
+ },
494
+ {
495
+ name: "star",
496
+ svg: "star.svg"
497
+ },
498
+ {
499
+ name: "star-fill",
500
+ svg: "star-fill.svg"
501
+ },
502
+ {
503
+ name: "payment",
504
+ svg: "payment.svg"
505
+ },
506
+ {
507
+ name: "revert",
508
+ svg: "revert.svg"
509
+ },
510
+ {
511
+ name: "fees",
512
+ svg: "fees.svg"
513
+ },
514
+ {
515
+ name: "crossedeye",
516
+ svg: "crossedeye.svg"
517
+ },
518
+ {
519
+ name: "common",
520
+ svg: "common.svg"
521
+ },
522
+ {
523
+ name: "calendar-start",
524
+ svg: "calendar-start.svg"
525
+ },
526
+ {
527
+ name: "calendar-end",
528
+ svg: "calendar-end.svg"
529
+ },
530
+ {
531
+ name: "expand",
532
+ svg: "expand.svg"
533
+ },
534
+ {
535
+ name: "contract",
536
+ svg: "contract.svg"
537
+ },
538
+ {
539
+ name: "house",
540
+ svg: "house.svg"
541
+ },
542
+ {
543
+ name: "tractor",
544
+ svg: "tractor.svg"
545
+ },
546
+ {
547
+ name: "flower",
548
+ svg: "flower.svg"
549
+ },
550
+ {
551
+ name: "basket",
552
+ svg: "basket.svg"
553
+ },
554
+ {
555
+ name: "drag-drop",
556
+ svg: "drag-drop.svg"
557
+ },
558
+ {
559
+ name: "notification-fill",
560
+ svg: "notification-fill.svg"
561
+ },
562
+ {
563
+ name: "expense",
564
+ svg: "expense.svg"
565
+ },
566
+ {
567
+ name: "income",
568
+ svg: "income.svg"
569
+ },
570
+ {
571
+ name: "top-up",
572
+ svg: "top-up.svg"
573
+ },
574
+ {
575
+ name: "signed-document",
576
+ svg: "signed-document.svg"
577
+ },
578
+ {
579
+ name: "bank",
580
+ svg: "bank.svg"
581
+ },
582
+ {
583
+ name: "balloon",
584
+ svg: "balloon.svg"
585
+ },
586
+ {
587
+ name: "scale",
588
+ svg: "scale.svg"
589
+ },
590
+ {
591
+ name: "ownership",
592
+ svg: "ownership.svg"
593
+ },
594
+ {
595
+ name: "maintenance",
596
+ svg: "maintenance.svg"
597
+ },
598
+ {
599
+ name: "blocked",
600
+ svg: "blocked.svg"
601
+ },
602
+ {
603
+ name: "checklist",
604
+ svg: "checklist.svg"
605
+ },
606
+ {
607
+ name: "collection",
608
+ svg: "collection.svg"
609
+ },
610
+ {
611
+ name: "pause",
612
+ svg: "pause.svg"
613
+ },
614
+ {
615
+ name: "payment-change",
616
+ svg: "payment-change.svg"
617
+ },
618
+ {
619
+ name: "pregnancy",
620
+ svg: "pregnancy.svg"
621
+ },
622
+ {
623
+ name: "send",
624
+ svg: "send.svg"
625
+ },
626
+ {
627
+ name: "subscription",
628
+ svg: "subscription.svg"
629
+ }
630
+ ]) };
161
631
  const defaultIcons = kirbyIconSettings.icons.map((icon) => icon.name);
162
-
163
- const DEFAULT_BUILT_IN_ICONS_URL = 'assets/kirby/icons/svg/';
164
- /**
165
- * Token used to configure base URL for path to built-in icons. Default is 'assets/kirby/icons/svg'.
166
- */
167
- const BUILT_IN_ICONS_URL = new InjectionToken('BUILT_IN_ICONS_URL', {
168
- factory: () => DEFAULT_BUILT_IN_ICONS_URL,
632
+ const DEFAULT_BUILT_IN_ICONS_URL = "assets/kirby/icons/svg/";
633
+ const BUILT_IN_ICONS_URL = new InjectionToken("BUILT_IN_ICONS_URL", { factory: () => DEFAULT_BUILT_IN_ICONS_URL });
634
+ var IconRegistryService = class IconRegistryService {
635
+ constructor(builtInIconsUrl) {
636
+ this.builtInIconsUrl = builtInIconsUrl;
637
+ this.iconRegistry = /* @__PURE__ */ new Map();
638
+ this.addDefaultIcons();
639
+ }
640
+ addIcon(iconName, svgPath) {
641
+ if (!this.iconRegistry.has(iconName)) this.iconRegistry.set(iconName, svgPath);
642
+ else console.warn(`Icon with name: "${iconName}" already exists`);
643
+ }
644
+ addIcons(icons) {
645
+ if (!icons) {
646
+ console.error("Icons not defined");
647
+ return;
648
+ }
649
+ icons.forEach((icon) => {
650
+ if (icon.name && icon.svg) this.addIcon(icon.name, icon.svg);
651
+ });
652
+ }
653
+ addDefaultIcons() {
654
+ const baseUrl = this.builtInIconsUrl ?? "assets/kirby/icons/svg/";
655
+ const baseUrlWithSlash = baseUrl.endsWith("/") ? baseUrl : baseUrl + "/";
656
+ this.addIcons(kirbyIconSettings.icons.map((icon) => ({
657
+ name: icon.name,
658
+ svg: baseUrlWithSlash + icon.svg
659
+ })));
660
+ }
661
+ getIcons() {
662
+ return Array.from(this.iconRegistry.keys()).map((key) => this.getIcon(key)).filter((icon) => !!icon);
663
+ }
664
+ getIcon(name) {
665
+ const svg = this.iconRegistry.get(name);
666
+ return svg ? {
667
+ name,
668
+ svg
669
+ } : void 0;
670
+ }
671
+ static {
672
+ this.ɵfac = i0.ɵɵngDeclareFactory({
673
+ minVersion: "12.0.0",
674
+ version: "22.2.3",
675
+ ngImport: i0,
676
+ type: IconRegistryService,
677
+ deps: [{ token: BUILT_IN_ICONS_URL }],
678
+ target: i0.ɵɵFactoryTarget.Injectable
679
+ });
680
+ }
681
+ static {
682
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
683
+ minVersion: "12.0.0",
684
+ version: "22.2.3",
685
+ ngImport: i0,
686
+ type: IconRegistryService,
687
+ providedIn: "root"
688
+ });
689
+ }
690
+ };
691
+ i0.ɵɵngDeclareClassMetadata({
692
+ minVersion: "12.0.0",
693
+ version: "22.2.3",
694
+ ngImport: i0,
695
+ type: IconRegistryService,
696
+ decorators: [{
697
+ type: Injectable,
698
+ args: [{ providedIn: "root" }]
699
+ }],
700
+ ctorParameters: () => [{
701
+ type: void 0,
702
+ decorators: [{
703
+ type: Inject,
704
+ args: [BUILT_IN_ICONS_URL]
705
+ }]
706
+ }]
169
707
  });
170
- class IconRegistryService {
171
- constructor(builtInIconsUrl) {
172
- this.builtInIconsUrl = builtInIconsUrl;
173
- this.iconRegistry = new Map();
174
- this.addDefaultIcons();
175
- }
176
- addIcon(iconName, svgPath) {
177
- if (!this.iconRegistry.has(iconName)) {
178
- this.iconRegistry.set(iconName, svgPath);
179
- }
180
- else {
181
- console.warn(`Icon with name: "${iconName}" already exists`);
182
- }
183
- }
184
- addIcons(icons) {
185
- if (!icons) {
186
- console.error('Icons not defined');
187
- return;
188
- }
189
- icons.forEach((icon) => {
190
- this.addIcon(icon.name, icon.svg);
191
- });
192
- }
193
- addDefaultIcons() {
194
- const baseUrl = this.builtInIconsUrl ?? DEFAULT_BUILT_IN_ICONS_URL;
195
- const baseUrlWithSlash = baseUrl.endsWith('/') ? baseUrl : baseUrl + '/';
196
- this.addIcons(kirbyIconSettings.icons.map((icon) => ({ name: icon.name, svg: baseUrlWithSlash + icon.svg })));
197
- }
198
- getIcons() {
199
- return Array.from(this.iconRegistry.keys()).map((key) => this.getIcon(key));
200
- }
201
- getIcon(name) {
202
- const svg = this.iconRegistry.get(name);
203
- return svg ? { name, svg } : undefined;
204
- }
205
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconRegistryService, deps: [{ token: BUILT_IN_ICONS_URL }], target: i0.ɵɵFactoryTarget.Injectable }); }
206
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconRegistryService, providedIn: 'root' }); }
207
- }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconRegistryService, decorators: [{
209
- type: Injectable,
210
- args: [{
211
- providedIn: 'root',
212
- }]
213
- }], ctorParameters: () => [{ type: undefined, decorators: [{
214
- type: Inject,
215
- args: [BUILT_IN_ICONS_URL]
216
- }] }] });
217
-
218
708
  var IconSize;
219
- (function (IconSize) {
220
- IconSize["XS"] = "xs";
221
- IconSize["SM"] = "sm";
222
- IconSize["MD"] = "md";
223
- IconSize["LG"] = "lg";
709
+ (function(IconSize) {
710
+ IconSize["XS"] = "xs";
711
+ IconSize["SM"] = "sm";
712
+ IconSize["MD"] = "md";
713
+ IconSize["LG"] = "lg";
224
714
  })(IconSize || (IconSize = {}));
225
- class IconComponent {
226
- get icon() {
227
- return this._icon;
228
- }
229
- set icon(icon) {
230
- // If icon are not found, set default icon
231
- if (!icon && this.name) {
232
- this.warnAboutMissingIcon();
233
- icon = this.defaultIcon;
234
- // If default icon are not found
235
- if (!icon) {
236
- console.warn('Default icon was not found.');
237
- return;
238
- }
239
- }
240
- // Set icon if it's found
241
- if (icon) {
242
- this._icon = icon;
243
- }
244
- }
245
- warnAboutMissingIcon() {
246
- console.warn(`Icon with name "${this.name}" was not found.
715
+ var IconComponent = class IconComponent {
716
+ get icon() {
717
+ return this._icon;
718
+ }
719
+ set icon(icon) {
720
+ if (!icon && this.name) {
721
+ this.warnAboutMissingIcon();
722
+ icon = this.defaultIcon;
723
+ if (!icon) {
724
+ console.warn("Default icon was not found.");
725
+ return;
726
+ }
727
+ }
728
+ if (icon) this._icon = icon;
729
+ }
730
+ warnAboutMissingIcon() {
731
+ console.warn(`Icon with name "${this.name}" was not found.
247
732
  Do you have a typo in 'name' for a built-in icon or
248
733
  forgot to configure the custom icon through the 'IconRegistryService'?`);
249
- }
250
- constructor(iconRegistryService, elementRef, renderer) {
251
- this.iconRegistryService = iconRegistryService;
252
- this.elementRef = elementRef;
253
- this.renderer = renderer;
254
- this.defaultIcon = this.iconRegistryService.getIcon('cog');
255
- this._icon = (this.icon = this.defaultIcon);
256
- this.element = this.elementRef.nativeElement;
257
- }
258
- ngOnChanges(changes) {
259
- if (changes.name && changes.name.currentValue) {
260
- this.icon = this.iconRegistryService.getIcon(changes.name.currentValue);
261
- // This will always run on first init - and again later if name is changed
262
- // If name changes a new aria-label might have been added, so we need to check again.
263
- this.setAriaHiddenIfNoLabel();
264
- }
265
- }
266
- setAriaHiddenIfNoLabel() {
267
- const existingAriaLabel = this.element.hasAttribute('aria-label');
268
- if (!existingAriaLabel) {
269
- this.renderer.setAttribute(this.element, 'aria-hidden', 'true');
270
- }
271
- }
272
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconComponent, deps: [{ token: IconRegistryService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
273
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: IconComponent, isStandalone: true, selector: "kirby-icon", inputs: { size: "size", name: "name" }, host: { properties: { "class.kirby-icon": "true", "class": "this.size" } }, usesOnChanges: true, ngImport: i0, template: "<ion-icon [src]=\"icon?.svg\"></ion-icon>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex;align-items:center;justify-content:center;font-size:var(--kirby-icon-font-size, 24px);margin-left:var(--kirby-icon-margin-left, unset);margin-right:var(--kirby-icon-margin-right, unset)}:host svg path{fill:currentcolor;stroke:currentcolor}:host(.xs){--kirby-icon-font-size: 16px}:host(.sm){--kirby-icon-font-size: 24px}:host(.md){--kirby-icon-font-size: 32px}:host(.lg){--kirby-icon-font-size: 56px}:host(.primary){color:var(--kirby-primary)}:host(.secondary){color:var(--kirby-secondary)}:host(.tertiary){color:var(--kirby-tertiary)}:host(.success){color:var(--kirby-success)}:host(.warning){color:var(--kirby-warning)}:host(.danger){color:var(--kirby-danger)}:host(.white-overlay){color:var(--kirby-white-overlay)}:host(.light){color:var(--kirby-light)}:host(.medium){color:var(--kirby-medium)}:host(.dark){color:var(--kirby-dark)}:host(.dark-overlay){color:var(--kirby-dark-overlay)}:host-context(kirby-item)[slot=start]{margin-inline-end:8px}:host-context(kirby-item)[slot=end]{margin-inline-start:8px}:host-context(ion-tab-button){pointer-events:none}\n"], dependencies: [{ kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
274
- }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconComponent, decorators: [{
276
- type: Component,
277
- args: [{ selector: 'kirby-icon', host: { '[class.kirby-icon]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [IonIcon], template: "<ion-icon [src]=\"icon?.svg\"></ion-icon>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex;align-items:center;justify-content:center;font-size:var(--kirby-icon-font-size, 24px);margin-left:var(--kirby-icon-margin-left, unset);margin-right:var(--kirby-icon-margin-right, unset)}:host svg path{fill:currentcolor;stroke:currentcolor}:host(.xs){--kirby-icon-font-size: 16px}:host(.sm){--kirby-icon-font-size: 24px}:host(.md){--kirby-icon-font-size: 32px}:host(.lg){--kirby-icon-font-size: 56px}:host(.primary){color:var(--kirby-primary)}:host(.secondary){color:var(--kirby-secondary)}:host(.tertiary){color:var(--kirby-tertiary)}:host(.success){color:var(--kirby-success)}:host(.warning){color:var(--kirby-warning)}:host(.danger){color:var(--kirby-danger)}:host(.white-overlay){color:var(--kirby-white-overlay)}:host(.light){color:var(--kirby-light)}:host(.medium){color:var(--kirby-medium)}:host(.dark){color:var(--kirby-dark)}:host(.dark-overlay){color:var(--kirby-dark-overlay)}:host-context(kirby-item)[slot=start]{margin-inline-end:8px}:host-context(kirby-item)[slot=end]{margin-inline-start:8px}:host-context(ion-tab-button){pointer-events:none}\n"] }]
278
- }], ctorParameters: () => [{ type: IconRegistryService }, { type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { size: [{
279
- type: HostBinding,
280
- args: ['class']
281
- }, {
282
- type: Input
283
- }], name: [{
284
- type: Input
285
- }] } });
286
-
287
- class IconModule {
288
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
289
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.18", ngImport: i0, type: IconModule, imports: [ThemeColorDirective, IonIcon, IconComponent], exports: [IconComponent, ThemeColorDirective] }); }
290
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconModule, imports: [IonIcon, IconComponent] }); }
291
- }
292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: IconModule, decorators: [{
293
- type: NgModule,
294
- args: [{
295
- imports: [ThemeColorDirective, IonIcon, IconComponent],
296
- exports: [IconComponent, ThemeColorDirective],
297
- }]
298
- }] });
299
-
300
- /**
301
- * Generated bundle index. Do not edit.
302
- */
303
-
734
+ }
735
+ constructor(iconRegistryService, elementRef, renderer) {
736
+ this.iconRegistryService = iconRegistryService;
737
+ this.elementRef = elementRef;
738
+ this.renderer = renderer;
739
+ this.defaultIcon = this.iconRegistryService.getIcon("cog");
740
+ this._icon = this.icon = this.defaultIcon;
741
+ this.element = this.elementRef.nativeElement;
742
+ }
743
+ ngOnChanges(changes) {
744
+ if (changes.name && changes.name.currentValue) {
745
+ this.icon = this.iconRegistryService.getIcon(changes.name.currentValue);
746
+ this.setAriaHiddenIfNoLabel();
747
+ }
748
+ }
749
+ setAriaHiddenIfNoLabel() {
750
+ if (!this.element.hasAttribute("aria-label")) this.renderer.setAttribute(this.element, "aria-hidden", "true");
751
+ }
752
+ static {
753
+ this.ɵfac = i0.ɵɵngDeclareFactory({
754
+ minVersion: "12.0.0",
755
+ version: "22.2.3",
756
+ ngImport: i0,
757
+ type: IconComponent,
758
+ deps: [
759
+ { token: IconRegistryService },
760
+ { token: i0.ElementRef },
761
+ { token: i0.Renderer2 }
762
+ ],
763
+ target: i0.ɵɵFactoryTarget.Component
764
+ });
765
+ }
766
+ static {
767
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
768
+ minVersion: "14.0.0",
769
+ version: "22.2.3",
770
+ type: IconComponent,
771
+ isStandalone: true,
772
+ selector: "kirby-icon",
773
+ inputs: {
774
+ size: "size",
775
+ name: "name"
776
+ },
777
+ host: { properties: {
778
+ "class.kirby-icon": "true",
779
+ "class": "this.size"
780
+ } },
781
+ usesOnChanges: true,
782
+ ngImport: i0,
783
+ template: "<ion-icon [src]=\"icon?.svg\"></ion-icon>\n",
784
+ styles: [":host{display:inline-flex;align-items:center;justify-content:center;font-size:var(--kirby-icon-font-size, var(--kirby-icon-font-size-sm));margin-left:var(--kirby-icon-margin-left, unset);margin-right:var(--kirby-icon-margin-right, unset)}:host svg path{fill:currentcolor;stroke:currentcolor}:host(.xs){--kirby-icon-font-size: var(--kirby-icon-font-size-xs)}:host(.sm){--kirby-icon-font-size: var(--kirby-icon-font-size-sm)}:host(.md){--kirby-icon-font-size: var(--kirby-icon-font-size-md)}:host(.lg){--kirby-icon-font-size: var(--kirby-icon-font-size-lg)}:host(.primary){color:var(--kirby-primary)}:host(.secondary){color:var(--kirby-secondary)}:host(.tertiary){color:var(--kirby-tertiary)}:host(.success){color:var(--kirby-color-fill-success-loud)}:host(.warning){color:var(--kirby-color-fill-warning-loud)}:host(.danger){color:var(--kirby-color-fill-danger-loud)}:host(.white-overlay){color:var(--kirby-white-overlay)}:host(.light){color:var(--kirby-light)}:host(.medium){color:var(--kirby-color-content-base-quiet)}:host(.dark){color:var(--kirby-dark)}:host(.dark-overlay){color:var(--kirby-dark-overlay)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xxs)}:host-context(kirby-item)[slot=end]{margin-inline-start:var(--kirby-spacing-xxs)}:host-context(ion-tab-button){pointer-events:none}\n"],
785
+ dependencies: [{
786
+ kind: "component",
787
+ type: IonIcon,
788
+ selector: "ion-icon",
789
+ inputs: [
790
+ "color",
791
+ "flipRtl",
792
+ "icon",
793
+ "ios",
794
+ "lazy",
795
+ "md",
796
+ "mode",
797
+ "name",
798
+ "sanitize",
799
+ "size",
800
+ "src"
801
+ ]
802
+ }],
803
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
804
+ });
805
+ }
806
+ };
807
+ i0.ɵɵngDeclareClassMetadata({
808
+ minVersion: "12.0.0",
809
+ version: "22.2.3",
810
+ ngImport: i0,
811
+ type: IconComponent,
812
+ decorators: [{
813
+ type: Component,
814
+ args: [{
815
+ selector: "kirby-icon",
816
+ host: { "[class.kirby-icon]": "true" },
817
+ changeDetection: ChangeDetectionStrategy.OnPush,
818
+ imports: [IonIcon],
819
+ template: "<ion-icon [src]=\"icon?.svg\"></ion-icon>\n",
820
+ styles: [":host{display:inline-flex;align-items:center;justify-content:center;font-size:var(--kirby-icon-font-size, var(--kirby-icon-font-size-sm));margin-left:var(--kirby-icon-margin-left, unset);margin-right:var(--kirby-icon-margin-right, unset)}:host svg path{fill:currentcolor;stroke:currentcolor}:host(.xs){--kirby-icon-font-size: var(--kirby-icon-font-size-xs)}:host(.sm){--kirby-icon-font-size: var(--kirby-icon-font-size-sm)}:host(.md){--kirby-icon-font-size: var(--kirby-icon-font-size-md)}:host(.lg){--kirby-icon-font-size: var(--kirby-icon-font-size-lg)}:host(.primary){color:var(--kirby-primary)}:host(.secondary){color:var(--kirby-secondary)}:host(.tertiary){color:var(--kirby-tertiary)}:host(.success){color:var(--kirby-color-fill-success-loud)}:host(.warning){color:var(--kirby-color-fill-warning-loud)}:host(.danger){color:var(--kirby-color-fill-danger-loud)}:host(.white-overlay){color:var(--kirby-white-overlay)}:host(.light){color:var(--kirby-light)}:host(.medium){color:var(--kirby-color-content-base-quiet)}:host(.dark){color:var(--kirby-dark)}:host(.dark-overlay){color:var(--kirby-dark-overlay)}:host-context(kirby-item)[slot=start]{margin-inline-end:var(--kirby-spacing-xxs)}:host-context(kirby-item)[slot=end]{margin-inline-start:var(--kirby-spacing-xxs)}:host-context(ion-tab-button){pointer-events:none}\n"]
821
+ }]
822
+ }],
823
+ ctorParameters: () => [
824
+ { type: IconRegistryService },
825
+ { type: i0.ElementRef },
826
+ { type: i0.Renderer2 }
827
+ ],
828
+ propDecorators: {
829
+ size: [{
830
+ type: HostBinding,
831
+ args: ["class"]
832
+ }, { type: Input }],
833
+ name: [{ type: Input }]
834
+ }
835
+ });
836
+ var IconModule = class IconModule {
837
+ static {
838
+ this.ɵfac = i0.ɵɵngDeclareFactory({
839
+ minVersion: "12.0.0",
840
+ version: "22.2.3",
841
+ ngImport: i0,
842
+ type: IconModule,
843
+ deps: [],
844
+ target: i0.ɵɵFactoryTarget.NgModule
845
+ });
846
+ }
847
+ static {
848
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
849
+ minVersion: "14.0.0",
850
+ version: "22.2.3",
851
+ ngImport: i0,
852
+ type: IconModule,
853
+ imports: [
854
+ ThemeColorDirective,
855
+ IonIcon,
856
+ IconComponent
857
+ ],
858
+ exports: [IconComponent, ThemeColorDirective]
859
+ });
860
+ }
861
+ static {
862
+ this.ɵinj = i0.ɵɵngDeclareInjector({
863
+ minVersion: "12.0.0",
864
+ version: "22.2.3",
865
+ ngImport: i0,
866
+ type: IconModule,
867
+ imports: [IonIcon, IconComponent]
868
+ });
869
+ }
870
+ };
871
+ i0.ɵɵngDeclareClassMetadata({
872
+ minVersion: "12.0.0",
873
+ version: "22.2.3",
874
+ ngImport: i0,
875
+ type: IconModule,
876
+ decorators: [{
877
+ type: NgModule,
878
+ args: [{
879
+ imports: [
880
+ ThemeColorDirective,
881
+ IonIcon,
882
+ IconComponent
883
+ ],
884
+ exports: [IconComponent, ThemeColorDirective]
885
+ }]
886
+ }]
887
+ });
304
888
  export { BUILT_IN_ICONS_URL, DEFAULT_BUILT_IN_ICONS_URL, IconComponent, IconModule, IconRegistryService, IconSize, defaultIcons, kirbyIconSettings };
305
- //# sourceMappingURL=kirbydesign-designsystem-icon.mjs.map
889
+
890
+ //# sourceMappingURL=kirbydesign-designsystem-icon.mjs.map