@kirbydesign/designsystem 11.11.2 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) 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 +98 -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 +407 -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 -891
  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 -296
  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 +1182 -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 +204 -169
  64. package/fesm2022/kirbydesign-designsystem-popover.mjs.map +1 -1
  65. package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +209 -158
  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 -531
  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 -157
  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/icons/svg/person-blocked.svg +3 -0
  115. package/icons/svg/person-check.svg +3 -0
  116. package/icons/svg/person-close.svg +3 -0
  117. package/icons/svg/person-cloud.svg +3 -0
  118. package/icons/svg/person-power.svg +3 -0
  119. package/icons/svg/person-warning.svg +3 -0
  120. package/icons/svg/phone-device-pin.svg +3 -0
  121. package/icons/svg/phone-device.svg +3 -2
  122. package/package.json +11 -11
  123. package/readme.md +37 -0
  124. package/types/kirbydesign-designsystem-accordion.d.ts +72 -39
  125. package/types/kirbydesign-designsystem-accordion.d.ts.map +1 -1
  126. package/types/kirbydesign-designsystem-action-group.d.ts +46 -39
  127. package/types/kirbydesign-designsystem-action-group.d.ts.map +1 -1
  128. package/types/kirbydesign-designsystem-avatar.d.ts +58 -26
  129. package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
  130. package/types/kirbydesign-designsystem-badge.d.ts +30 -19
  131. package/types/kirbydesign-designsystem-badge.d.ts.map +1 -1
  132. package/types/kirbydesign-designsystem-button.d.ts +70 -45
  133. package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
  134. package/types/kirbydesign-designsystem-calendar.d.ts +193 -132
  135. package/types/kirbydesign-designsystem-calendar.d.ts.map +1 -1
  136. package/types/kirbydesign-designsystem-card.d.ts +120 -66
  137. package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
  138. package/types/kirbydesign-designsystem-chart.d.ts +198 -172
  139. package/types/kirbydesign-designsystem-chart.d.ts.map +1 -1
  140. package/types/kirbydesign-designsystem-checkbox.d.ts +96 -68
  141. package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
  142. package/types/kirbydesign-designsystem-config.d.ts +17 -21
  143. package/types/kirbydesign-designsystem-config.d.ts.map +1 -1
  144. package/types/kirbydesign-designsystem-data-table.d.ts +46 -26
  145. package/types/kirbydesign-designsystem-data-table.d.ts.map +1 -1
  146. package/types/kirbydesign-designsystem-divider.d.ts +11 -9
  147. package/types/kirbydesign-designsystem-divider.d.ts.map +1 -1
  148. package/types/kirbydesign-designsystem-dropdown.d.ts +219 -166
  149. package/types/kirbydesign-designsystem-dropdown.d.ts.map +1 -1
  150. package/types/kirbydesign-designsystem-empty-state.d.ts +47 -35
  151. package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
  152. package/types/kirbydesign-designsystem-fab-sheet.d.ts +34 -28
  153. package/types/kirbydesign-designsystem-fab-sheet.d.ts.map +1 -1
  154. package/types/kirbydesign-designsystem-flag.d.ts +18 -13
  155. package/types/kirbydesign-designsystem-flag.d.ts.map +1 -1
  156. package/types/kirbydesign-designsystem-form-field.d.ts +409 -242
  157. package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
  158. package/types/kirbydesign-designsystem-gesture.d.ts +41 -46
  159. package/types/kirbydesign-designsystem-gesture.d.ts.map +1 -1
  160. package/types/kirbydesign-designsystem-header.d.ts +102 -64
  161. package/types/kirbydesign-designsystem-header.d.ts.map +1 -1
  162. package/types/kirbydesign-designsystem-helpers-scss.d.ts +6 -8
  163. package/types/kirbydesign-designsystem-helpers-scss.d.ts.map +1 -1
  164. package/types/kirbydesign-designsystem-helpers.d.ts +83 -97
  165. package/types/kirbydesign-designsystem-helpers.d.ts.map +1 -1
  166. package/types/kirbydesign-designsystem-icon.d.ts +63 -59
  167. package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
  168. package/types/kirbydesign-designsystem-item-group.d.ts +6 -9
  169. package/types/kirbydesign-designsystem-item-group.d.ts.map +1 -1
  170. package/types/kirbydesign-designsystem-item-sliding.d.ts +30 -26
  171. package/types/kirbydesign-designsystem-item-sliding.d.ts.map +1 -1
  172. package/types/kirbydesign-designsystem-item.d.ts +93 -54
  173. package/types/kirbydesign-designsystem-item.d.ts.map +1 -1
  174. package/types/kirbydesign-designsystem-kirby-app.d.ts +18 -19
  175. package/types/kirbydesign-designsystem-kirby-app.d.ts.map +1 -1
  176. package/types/kirbydesign-designsystem-list.d.ts +382 -263
  177. package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
  178. package/types/kirbydesign-designsystem-loading-overlay.d.ts +35 -24
  179. package/types/kirbydesign-designsystem-loading-overlay.d.ts.map +1 -1
  180. package/types/kirbydesign-designsystem-menu.d.ts +119 -69
  181. package/types/kirbydesign-designsystem-menu.d.ts.map +1 -1
  182. package/types/kirbydesign-designsystem-modal.d.ts +577 -455
  183. package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
  184. package/types/kirbydesign-designsystem-page.d.ts +304 -226
  185. package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
  186. package/types/kirbydesign-designsystem-popover.d.ts +48 -40
  187. package/types/kirbydesign-designsystem-popover.d.ts.map +1 -1
  188. package/types/kirbydesign-designsystem-progress-circle.d.ts +59 -61
  189. package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
  190. package/types/kirbydesign-designsystem-radio.d.ts +147 -98
  191. package/types/kirbydesign-designsystem-radio.d.ts.map +1 -1
  192. package/types/kirbydesign-designsystem-range.d.ts +90 -45
  193. package/types/kirbydesign-designsystem-range.d.ts.map +1 -1
  194. package/types/kirbydesign-designsystem-reorder-list.d.ts +44 -32
  195. package/types/kirbydesign-designsystem-reorder-list.d.ts.map +1 -1
  196. package/types/kirbydesign-designsystem-router-outlet.d.ts +23 -18
  197. package/types/kirbydesign-designsystem-router-outlet.d.ts.map +1 -1
  198. package/types/kirbydesign-designsystem-section-header.d.ts +5 -8
  199. package/types/kirbydesign-designsystem-section-header.d.ts.map +1 -1
  200. package/types/kirbydesign-designsystem-segmented-control.d.ts +123 -100
  201. package/types/kirbydesign-designsystem-segmented-control.d.ts.map +1 -1
  202. package/types/kirbydesign-designsystem-shared-floating.d.ts +183 -128
  203. package/types/kirbydesign-designsystem-shared-floating.d.ts.map +1 -1
  204. package/types/kirbydesign-designsystem-shared-portal.d.ts +29 -28
  205. package/types/kirbydesign-designsystem-shared-portal.d.ts.map +1 -1
  206. package/types/kirbydesign-designsystem-shared.d.ts +143 -139
  207. package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
  208. package/types/kirbydesign-designsystem-slide-button.d.ts +43 -34
  209. package/types/kirbydesign-designsystem-slide-button.d.ts.map +1 -1
  210. package/types/kirbydesign-designsystem-slide.d.ts +80 -59
  211. package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
  212. package/types/kirbydesign-designsystem-spinner.d.ts +13 -14
  213. package/types/kirbydesign-designsystem-spinner.d.ts.map +1 -1
  214. package/types/kirbydesign-designsystem-tab-navigation.d.ts +78 -55
  215. package/types/kirbydesign-designsystem-tab-navigation.d.ts.map +1 -1
  216. package/types/kirbydesign-designsystem-tabs.d.ts +50 -45
  217. package/types/kirbydesign-designsystem-tabs.d.ts.map +1 -1
  218. package/types/kirbydesign-designsystem-testing-base.d.ts +2430 -815
  219. package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
  220. package/types/kirbydesign-designsystem-testing-jasmine.d.ts +9 -10
  221. package/types/kirbydesign-designsystem-testing-jasmine.d.ts.map +1 -1
  222. package/types/kirbydesign-designsystem-testing-jest.d.ts +9 -10
  223. package/types/kirbydesign-designsystem-testing-jest.d.ts.map +1 -1
  224. package/types/kirbydesign-designsystem-testing.d.ts +52 -58
  225. package/types/kirbydesign-designsystem-testing.d.ts.map +1 -1
  226. package/types/kirbydesign-designsystem-toast.d.ts +25 -31
  227. package/types/kirbydesign-designsystem-toast.d.ts.map +1 -1
  228. package/types/kirbydesign-designsystem-toggle-button.d.ts +62 -56
  229. package/types/kirbydesign-designsystem-toggle-button.d.ts.map +1 -1
  230. package/types/kirbydesign-designsystem-toggle.d.ts +71 -63
  231. package/types/kirbydesign-designsystem-toggle.d.ts.map +1 -1
  232. package/types/kirbydesign-designsystem-types.d.ts +15 -22
  233. package/types/kirbydesign-designsystem-types.d.ts.map +1 -1
  234. package/types/kirbydesign-designsystem.d.ts +135 -123
  235. package/types/kirbydesign-designsystem.d.ts.map +1 -1
  236. package/accordion/package.json +0 -4
  237. package/action-group/package.json +0 -4
  238. package/avatar/package.json +0 -4
  239. package/badge/package.json +0 -4
  240. package/button/package.json +0 -4
  241. package/calendar/package.json +0 -4
  242. package/card/package.json +0 -4
  243. package/chart/package.json +0 -4
  244. package/checkbox/package.json +0 -4
  245. package/config/package.json +0 -4
  246. package/data-table/package.json +0 -4
  247. package/divider/package.json +0 -4
  248. package/dropdown/package.json +0 -4
  249. package/empty-state/package.json +0 -4
  250. package/fab-sheet/package.json +0 -4
  251. package/flag/package.json +0 -4
  252. package/form-field/package.json +0 -4
  253. package/gesture/package.json +0 -4
  254. package/header/package.json +0 -4
  255. package/helpers/package.json +0 -4
  256. package/helpers/scss/package.json +0 -4
  257. package/icon/package.json +0 -4
  258. package/item/package.json +0 -4
  259. package/item-group/package.json +0 -4
  260. package/item-sliding/package.json +0 -4
  261. package/kirby-app/package.json +0 -4
  262. package/list/package.json +0 -4
  263. package/loading-overlay/package.json +0 -4
  264. package/menu/package.json +0 -4
  265. package/modal/package.json +0 -4
  266. package/page/package.json +0 -4
  267. package/popover/package.json +0 -4
  268. package/progress-circle/package.json +0 -4
  269. package/radio/package.json +0 -4
  270. package/range/package.json +0 -4
  271. package/reorder-list/package.json +0 -4
  272. package/router-outlet/package.json +0 -4
  273. package/section-header/package.json +0 -4
  274. package/segmented-control/package.json +0 -4
  275. package/shared/floating/package.json +0 -4
  276. package/shared/package.json +0 -4
  277. package/shared/portal/package.json +0 -4
  278. package/slide/package.json +0 -4
  279. package/slide-button/package.json +0 -4
  280. package/spinner/package.json +0 -4
  281. package/tab-navigation/package.json +0 -4
  282. package/tabs/package.json +0 -4
  283. package/testing/package.json +0 -4
  284. package/testing-base/package.json +0 -4
  285. package/testing-jasmine/package.json +0 -4
  286. package/testing-jest/package.json +0 -4
  287. package/toast/package.json +0 -4
  288. package/toggle/package.json +0 -4
  289. package/toggle-button/package.json +0 -4
  290. package/types/package.json +0 -4
@@ -1,173 +1,206 @@
1
- import * as i0 from '@angular/core';
2
- import { ElementRef, ContentChild, Input, HostBinding, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { IconComponent } from '@kirbydesign/designsystem/icon';
4
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, HostBinding, Input } from "@angular/core";
3
+ import { IconComponent } from "@kirbydesign/designsystem/icon";
5
4
  var ButtonSize;
6
- (function (ButtonSize) {
7
- ButtonSize["XS"] = "xs";
8
- ButtonSize["SM"] = "sm";
9
- ButtonSize["MD"] = "md";
10
- ButtonSize["LG"] = "lg";
5
+ (function(ButtonSize) {
6
+ ButtonSize["XS"] = "xs";
7
+ ButtonSize["SM"] = "sm";
8
+ ButtonSize["MD"] = "md";
9
+ ButtonSize["LG"] = "lg";
11
10
  })(ButtonSize || (ButtonSize = {}));
12
- class ButtonComponent {
13
- get isButtonFloating() {
14
- return this.isFloating;
15
- }
16
- get isIconOnly() {
17
- return !!this.iconElementRef && this.showIconOnly;
18
- }
19
- get isIconLeft() {
20
- return this._isIconLeft && !this.showIconOnly;
21
- }
22
- get isIconRight() {
23
- return this._isIconRight && !this.showIconOnly;
24
- }
25
- get _cssClass() {
26
- const attentionLevel = this.getAttentionLevelCssClass();
27
- return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);
28
- }
29
- getAttentionLevelCssClass() {
30
- if (this.noDecoration)
31
- return;
32
- const attentionLevelDefault = '1';
33
- return `attention-level${this.attentionLevel || attentionLevelDefault}`;
34
- }
35
- get showIconOnly() {
36
- return this._showIconOnly;
37
- }
38
- set showIconOnly(value) {
39
- if (value) {
40
- // If the button text is supplied as plain text (i.e. as a text node not within an element tag),
41
- // we need to wrap it in an element to be able to target and hide it with css:
42
- this.wrapTextNode(this.iconElementRef?.nativeElement);
43
- }
44
- this._showIconOnly = value;
45
- }
46
- constructor(elementRef, renderer) {
47
- this.elementRef = elementRef;
48
- this.renderer = renderer;
49
- this.noDecoration = false;
50
- this._isIconLeft = false;
51
- this._isIconRight = false;
52
- this.isFloating = false;
53
- this.size = ButtonSize.MD;
54
- this._showIconOnly = false;
55
- this.disposeEventListeners = [];
56
- }
57
- ngOnInit() {
58
- this.setupEventListenerForAriaDisabledHandling();
59
- }
60
- setupEventListenerForAriaDisabledHandling() {
61
- // Prevent event bubbling for aria-disabled buttons using a native event listener.
62
- // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587
63
- ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {
64
- const disposeEventListener = this.renderer.listen(this.elementRef.nativeElement, evt, this.blockEventIfAriaDisabled.bind(this), { capture: true });
65
- this.disposeEventListeners.push(disposeEventListener);
66
- });
67
- }
68
- wrapTextNode(iconElement) {
69
- if (!iconElement) {
70
- return;
71
- }
72
- const ifTextNode = (node) => {
73
- return node?.nodeType === Node.TEXT_NODE ? node : undefined;
74
- };
75
- const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);
76
- if (textNode) {
77
- const placement = textNode === iconElement.previousSibling ? 'before' : 'after';
78
- const textWrapper = this.renderer.createElement('span');
79
- const parent = textNode.parentNode;
80
- this.renderer.removeChild(textNode.parentNode, textNode);
81
- this.renderer.appendChild(textWrapper, textNode);
82
- if (placement === 'before') {
83
- this.renderer.insertBefore(parent, textWrapper, iconElement);
84
- }
85
- else if (placement === 'after') {
86
- this.renderer.appendChild(parent, textWrapper);
87
- }
88
- }
89
- }
90
- ngAfterContentInit() {
91
- const iconElement = this.iconElementRef?.nativeElement;
92
- if (iconElement === undefined) {
93
- // Nothing to do here when there's no icon:
94
- return;
95
- }
96
- // Ensure buttons with icon is always shown as icon only inside the toolbar:
97
- if (this.elementRef.nativeElement.closest('ion-toolbar')) {
98
- this._showIconOnly = true;
99
- }
100
- if (this.showIconOnly) {
101
- // If the button text is supplied as plain text (i.e. as a text node not within an element tag),
102
- // we need to wrap it in an element to be able to target and hide it with css:
103
- this.wrapTextNode(iconElement);
104
- }
105
- const hasText = !!this.elementRef.nativeElement.textContent;
106
- if (!hasText) {
107
- // Button doesn't contain any text, make it round:
108
- this._showIconOnly = true;
109
- }
110
- if (hasText && !this.showIconOnly) {
111
- this._isIconLeft =
112
- this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;
113
- this._isIconRight = !this._isIconLeft;
114
- }
115
- }
116
- blockEventIfAriaDisabled(event) {
117
- if (this.elementRef.nativeElement.ariaDisabled === 'true') {
118
- event.preventDefault();
119
- event.stopImmediatePropagation();
120
- }
121
- }
122
- ngOnDestroy() {
123
- this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());
124
- }
125
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ButtonComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
126
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.18", type: ButtonComponent, isStandalone: true, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: { attentionLevel: "attentionLevel", noDecoration: "noDecoration", themeColor: "themeColor", expand: "expand", isFloating: "isFloating", size: "size", showIconOnly: "showIconOnly" }, host: { properties: { "class.no-decoration": "this.noDecoration", "class.floating": "this.isButtonFloating", "class.icon-only": "this.isIconOnly", "class.icon-left": "this.isIconLeft", "class.icon-right": "this.isIconRight", "class": "this._cssClass" } }, queries: [{ propertyName: "iconElementRef", first: true, predicate: IconComponent, descendants: true, read: ElementRef }], ngImport: i0, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:clamp(12px,.875rem,28px);height:40px;min-width:88px;padding:0;margin:4px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{--kirby-icon-font-size: 16px;font-size:clamp(11px,.75rem,24px);height:max(24px,1rem);min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{width:max(24px,1rem);min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{min-width:44px}:host.sm{--kirby-icon-font-size: 16px;font-size:clamp(11px,.75rem,24px);height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{min-width:88px}:host.lg{font-size:clamp(13px,1rem,32px);height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(kirby-dropdown) .content-layer{min-width:0}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:clamp(12px,.875rem,28px);height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:clamp(13px,1rem,32px);height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
127
- }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ButtonComponent, decorators: [{
129
- type: Component,
130
- args: [{ selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-button-padding-left: 24px;--kirby-button-padding-right: 24px;flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, 1)}:host .state-layer{position:absolute;inset:0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:2}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:999px;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:clamp(12px,.875rem,28px);height:40px;min-width:88px;padding:0;margin:4px;outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: 8px;--kirby-button-padding-left: 12px;--kirby-button-padding-right: 16px;padding:0}:host.icon-right{--kirby-icon-margin-left: 8px;--kirby-button-padding-left: 16px;--kirby-button-padding-right: 12px;padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:40px;padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:32px;min-width:32px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{--kirby-icon-font-size: 16px;font-size:clamp(11px,.75rem,24px);height:max(24px,1rem);min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: 12px;--kirby-button-padding-right: 12px}:host.xs.icon-only{width:max(24px,1rem);min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: 8px;--kirby-icon-margin-right: 4px}:host.xs.icon-right{--kirby-button-padding-right: 8px;--kirby-icon-margin-left: 4px}:host.xs.icon-left,:host.xs.icon-right{min-width:44px}:host.sm{--kirby-icon-font-size: 16px;font-size:clamp(11px,.75rem,24px);height:32px;min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: 16px;--kirby-button-padding-right: 16px}:host.sm.icon-only{width:32px;min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: 12px}:host.sm.icon-right{--kirby-button-padding-right: 12px}:host.sm.icon-left,:host.sm.icon-right{min-width:88px}:host.lg{font-size:clamp(13px,1rem,32px);height:48px;min-width:220px}:host.lg.icon-only{width:48px;min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:0 20px 30px -15px #1c1c1c4d,0 0 5px #1c1c1c14}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:16px 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(kirby-dropdown) .content-layer{min-width:0}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:clamp(12px,.875rem,28px);height:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:40px}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:clamp(13px,1rem,32px);height:48px;min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:48px;min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).success:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).success:active,:host-context(kirby-toggle-button).success.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).warning:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).warning:active,:host-context(kirby-toggle-button).warning.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button).danger:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button).danger:active,:host-context(kirby-toggle-button).danger.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"] }]
131
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }], propDecorators: { attentionLevel: [{
132
- type: Input
133
- }], noDecoration: [{
134
- type: HostBinding,
135
- args: ['class.no-decoration']
136
- }, {
137
- type: Input
138
- }], isButtonFloating: [{
139
- type: HostBinding,
140
- args: ['class.floating']
141
- }], isIconOnly: [{
142
- type: HostBinding,
143
- args: ['class.icon-only']
144
- }], isIconLeft: [{
145
- type: HostBinding,
146
- args: ['class.icon-left']
147
- }], isIconRight: [{
148
- type: HostBinding,
149
- args: ['class.icon-right']
150
- }], _cssClass: [{
151
- type: HostBinding,
152
- args: ['class']
153
- }], themeColor: [{
154
- type: Input
155
- }], expand: [{
156
- type: Input
157
- }], isFloating: [{
158
- type: Input
159
- }], size: [{
160
- type: Input
161
- }], showIconOnly: [{
162
- type: Input
163
- }], iconElementRef: [{
164
- type: ContentChild,
165
- args: [IconComponent, { read: ElementRef }]
166
- }] } });
167
-
168
- /**
169
- * Generated bundle index. Do not edit.
170
- */
171
-
11
+ var ButtonComponent = class ButtonComponent {
12
+ get isButtonFloating() {
13
+ return this.isFloating;
14
+ }
15
+ get isIconOnly() {
16
+ return !!this.iconElementRef && this.showIconOnly;
17
+ }
18
+ get isIconLeft() {
19
+ return this._isIconLeft && !this.showIconOnly;
20
+ }
21
+ get isIconRight() {
22
+ return this._isIconRight && !this.showIconOnly;
23
+ }
24
+ get _cssClass() {
25
+ const attentionLevel = this.getAttentionLevelCssClass();
26
+ return [
27
+ this.themeColor,
28
+ this.size,
29
+ attentionLevel
30
+ ].filter((cssClass) => !!cssClass);
31
+ }
32
+ getAttentionLevelCssClass() {
33
+ if (this.noDecoration) return;
34
+ return `attention-level${this.attentionLevel || "1"}`;
35
+ }
36
+ get showIconOnly() {
37
+ return this._showIconOnly;
38
+ }
39
+ set showIconOnly(value) {
40
+ if (value) this.wrapTextNode(this.iconElementRef?.nativeElement);
41
+ this._showIconOnly = value;
42
+ }
43
+ constructor(elementRef, renderer) {
44
+ this.elementRef = elementRef;
45
+ this.renderer = renderer;
46
+ this.noDecoration = false;
47
+ this._isIconLeft = false;
48
+ this._isIconRight = false;
49
+ this.isFloating = false;
50
+ this.size = ButtonSize.MD;
51
+ this._showIconOnly = false;
52
+ this.disposeEventListeners = [];
53
+ }
54
+ ngOnInit() {
55
+ this.setupEventListenerForAriaDisabledHandling();
56
+ }
57
+ setupEventListenerForAriaDisabledHandling() {
58
+ [
59
+ "click",
60
+ "keydown.enter",
61
+ "keydown.space"
62
+ ].forEach((evt) => {
63
+ const disposeEventListener = this.renderer.listen(this.elementRef.nativeElement, evt, this.blockEventIfAriaDisabled.bind(this), { capture: true });
64
+ this.disposeEventListeners.push(disposeEventListener);
65
+ });
66
+ }
67
+ wrapTextNode(iconElement) {
68
+ if (!iconElement) return;
69
+ const ifTextNode = (node) => {
70
+ return node?.nodeType === Node.TEXT_NODE ? node : void 0;
71
+ };
72
+ const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);
73
+ if (textNode) {
74
+ const placement = textNode === iconElement.previousSibling ? "before" : "after";
75
+ const textWrapper = this.renderer.createElement("span");
76
+ const parent = textNode.parentNode;
77
+ this.renderer.removeChild(textNode.parentNode, textNode);
78
+ this.renderer.appendChild(textWrapper, textNode);
79
+ if (placement === "before") this.renderer.insertBefore(parent, textWrapper, iconElement);
80
+ else if (placement === "after") this.renderer.appendChild(parent, textWrapper);
81
+ }
82
+ }
83
+ ngAfterContentInit() {
84
+ const iconElement = this.iconElementRef?.nativeElement;
85
+ if (iconElement === void 0) return;
86
+ if (this.elementRef.nativeElement.closest("ion-toolbar")) this._showIconOnly = true;
87
+ if (this.showIconOnly) this.wrapTextNode(iconElement);
88
+ const hasText = !!this.elementRef.nativeElement.textContent;
89
+ if (!hasText) this._showIconOnly = true;
90
+ if (hasText && !this.showIconOnly) {
91
+ this._isIconLeft = this.elementRef.nativeElement.querySelector(".content-layer").firstChild === iconElement;
92
+ this._isIconRight = !this._isIconLeft;
93
+ }
94
+ }
95
+ blockEventIfAriaDisabled(event) {
96
+ if (this.elementRef.nativeElement.ariaDisabled === "true") {
97
+ event.preventDefault();
98
+ event.stopImmediatePropagation();
99
+ }
100
+ }
101
+ ngOnDestroy() {
102
+ this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());
103
+ }
104
+ static {
105
+ this.ɵfac = i0.ɵɵngDeclareFactory({
106
+ minVersion: "12.0.0",
107
+ version: "22.2.2",
108
+ ngImport: i0,
109
+ type: ButtonComponent,
110
+ deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }],
111
+ target: i0.ɵɵFactoryTarget.Component
112
+ });
113
+ }
114
+ static {
115
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
116
+ minVersion: "14.0.0",
117
+ version: "22.2.2",
118
+ type: ButtonComponent,
119
+ isStandalone: true,
120
+ selector: "button[kirby-button],Button[kirby-button],a[kirby-button]",
121
+ inputs: {
122
+ attentionLevel: "attentionLevel",
123
+ noDecoration: "noDecoration",
124
+ themeColor: "themeColor",
125
+ expand: "expand",
126
+ isFloating: "isFloating",
127
+ size: "size",
128
+ showIconOnly: "showIconOnly"
129
+ },
130
+ host: { properties: {
131
+ "class.no-decoration": "this.noDecoration",
132
+ "class.floating": "this.isButtonFloating",
133
+ "class.icon-only": "this.isIconOnly",
134
+ "class.icon-left": "this.isIconLeft",
135
+ "class.icon-right": "this.isIconRight",
136
+ "class": "this._cssClass"
137
+ } },
138
+ queries: [{
139
+ propertyName: "iconElementRef",
140
+ first: true,
141
+ predicate: IconComponent,
142
+ descendants: true,
143
+ read: ElementRef
144
+ }],
145
+ ngImport: i0,
146
+ template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n",
147
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-button-padding-left: var(--kirby-spacing-m);--kirby-button-padding-right: var(--kirby-spacing-m);flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, var(--kirby-z-index-default))}:host .state-layer{position:absolute;inset:-0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:calc(var(--kirby-z-index-default) + 1)}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:var(--kirby-border-radius-pill);box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:var(--kirby-font-size-s);height:var(--kirby-spacing-xl);min-width:88px;padding:0;margin:var(--kirby-spacing-xxxs);outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: var(--kirby-spacing-xxs);--kirby-button-padding-left: var(--kirby-spacing-xs);--kirby-button-padding-right: var(--kirby-spacing-s);padding:0}:host.icon-right{--kirby-icon-margin-left: var(--kirby-spacing-xxs);--kirby-button-padding-left: var(--kirby-spacing-s);--kirby-button-padding-right: var(--kirby-spacing-xs);padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:var(--kirby-spacing-xl);padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:calc(var(--kirby-spacing-m) + var(--kirby-spacing-xxxs) * 2);min-width:calc(var(--kirby-spacing-m) + var(--kirby-spacing-xxxs) * 2);width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{--kirby-icon-font-size: var(--kirby-icon-font-size-xs);font-size:var(--kirby-font-size-xs);height:max(var(--kirby-spacing-m),var(--kirby-relative-size-s));min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: var(--kirby-spacing-xs);--kirby-button-padding-right: var(--kirby-spacing-xs)}:host.xs.icon-only{width:max(var(--kirby-spacing-m),var(--kirby-relative-size-s));min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: var(--kirby-spacing-xxs);--kirby-icon-margin-right: var(--kirby-spacing-xxxs)}:host.xs.icon-right{--kirby-button-padding-right: var(--kirby-spacing-xxs);--kirby-icon-margin-left: var(--kirby-spacing-xxxs)}:host.xs.icon-left,:host.xs.icon-right{min-width:44px}:host.sm{--kirby-icon-font-size: var(--kirby-spacing-s);font-size:var(--kirby-font-size-xs);height:var(--kirby-spacing-l);min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: var(--kirby-spacing-s);--kirby-button-padding-right: var(--kirby-spacing-s)}:host.sm.icon-only{width:var(--kirby-spacing-l);min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: var(--kirby-spacing-xs)}:host.sm.icon-right{--kirby-button-padding-right: var(--kirby-spacing-xs)}:host.sm.icon-left,:host.sm.icon-right{min-width:88px}:host.lg{font-size:var(--kirby-font-size-n);height:var(--kirby-spacing-xxl);min-width:220px}:host.lg.icon-only{width:var(--kirby-spacing-xxl);min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:var(--kirby-elevation-8)}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:var(--kirby-spacing-s) 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(kirby-dropdown) .content-layer{min-width:0}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:var(--kirby-font-size-s);height:var(--kirby-spacing-xl)}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:var(--kirby-spacing-xl)}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:var(--kirby-font-size-n);height:var(--kirby-spacing-xxl);min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:var(--kirby-spacing-xxl);min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button):is(.success,.warning,.danger):hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button):is(.success,.warning,.danger):active,:host-context(kirby-toggle-button):is(.success,.warning,.danger).interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"],
148
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
149
+ });
150
+ }
151
+ };
152
+ i0.ɵɵngDeclareClassMetadata({
153
+ minVersion: "12.0.0",
154
+ version: "22.2.2",
155
+ ngImport: i0,
156
+ type: ButtonComponent,
157
+ decorators: [{
158
+ type: Component,
159
+ args: [{
160
+ selector: "button[kirby-button],Button[kirby-button],a[kirby-button]",
161
+ changeDetection: ChangeDetectionStrategy.OnPush,
162
+ template: "<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n",
163
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{--kirby-button-padding-left: var(--kirby-spacing-m);--kirby-button-padding-right: var(--kirby-spacing-m);flex-shrink:0}:host{position:relative}:host:after{content:\"\";position:absolute;min-height:44px;min-width:44px;width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host:focus-visible{transition:all 80ms linear 0ms;box-shadow:var(--kirby-focus-ring-md-inset)}:host{--state-layer-opacity: 0;--state-layer-background-color: var(--kirby-black);position:relative}:host .content-layer{position:relative;z-index:var(--content-layer-z-index, var(--kirby-z-index-default))}:host .state-layer{position:absolute;inset:-0;overflow:hidden;pointer-events:none;border-radius:inherit;z-index:calc(var(--kirby-z-index-default) + 1)}:host .state-layer:before{transition:all 80ms linear 0ms;content:\"\";position:absolute;pointer-events:none;inset:0;border-radius:inherit;opacity:var(--state-layer-opacity, 0);background-color:var(--state-layer-background-color, var(--kirby-black))}@media(hover:hover){:host:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host:active,:host.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black)}:host .content-layer{display:inherit;width:inherit;flex-direction:inherit;align-items:inherit;justify-content:inherit;padding-inline:var(--kirby-button-padding-left) var(--kirby-button-padding-right)}:host{font-family:var(--kirby-font-family);background-color:var(--kirby-button-background-color, initial);color:var(--kirby-button-color, inherit);border-radius:var(--kirby-border-radius-pill);box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap;font-size:var(--kirby-font-size-s);height:var(--kirby-spacing-xl);min-width:88px;padding:0;margin:var(--kirby-spacing-xxxs);outline:none;border:none}:host.no-margin{margin:0}:host.icon-left{--kirby-icon-margin-right: var(--kirby-spacing-xxs);--kirby-button-padding-left: var(--kirby-spacing-xs);--kirby-button-padding-right: var(--kirby-spacing-s);padding:0}:host.icon-right{--kirby-icon-margin-left: var(--kirby-spacing-xxs);--kirby-button-padding-left: var(--kirby-spacing-s);--kirby-button-padding-right: var(--kirby-spacing-xs);padding:0}:host.icon-only{--kirby-button-padding-left: 0;--kirby-button-padding-right: 0;width:var(--kirby-spacing-xl);padding:0;min-width:unset}:host.icon-only .content-layer ::ng-deep>:not(kirby-icon){position:absolute;scale:0}:host.xs{position:relative}:host.xs:after{content:\"\";position:absolute;min-height:calc(var(--kirby-spacing-m) + var(--kirby-spacing-xxxs) * 2);min-width:calc(var(--kirby-spacing-m) + var(--kirby-spacing-xxxs) * 2);width:100%;height:100%;transform:translate(-50%,-50%);left:50%;top:50%}:host.xs{--kirby-icon-font-size: var(--kirby-icon-font-size-xs);font-size:var(--kirby-font-size-xs);height:max(var(--kirby-spacing-m),var(--kirby-relative-size-s));min-width:44px}:host.xs:not(.icon-only){--kirby-button-padding-left: var(--kirby-spacing-xs);--kirby-button-padding-right: var(--kirby-spacing-xs)}:host.xs.icon-only{width:max(var(--kirby-spacing-m),var(--kirby-relative-size-s));min-width:unset}:host.xs.icon-left{--kirby-button-padding-left: var(--kirby-spacing-xxs);--kirby-icon-margin-right: var(--kirby-spacing-xxxs)}:host.xs.icon-right{--kirby-button-padding-right: var(--kirby-spacing-xxs);--kirby-icon-margin-left: var(--kirby-spacing-xxxs)}:host.xs.icon-left,:host.xs.icon-right{min-width:44px}:host.sm{--kirby-icon-font-size: var(--kirby-spacing-s);font-size:var(--kirby-font-size-xs);height:var(--kirby-spacing-l);min-width:44px}:host.sm:not(.icon-only){--kirby-button-padding-left: var(--kirby-spacing-s);--kirby-button-padding-right: var(--kirby-spacing-s)}:host.sm.icon-only{width:var(--kirby-spacing-l);min-width:unset}:host.sm.icon-left{--kirby-button-padding-left: var(--kirby-spacing-xs)}:host.sm.icon-right{--kirby-button-padding-right: var(--kirby-spacing-xs)}:host.sm.icon-left,:host.sm.icon-right{min-width:88px}:host.lg{font-size:var(--kirby-font-size-n);height:var(--kirby-spacing-xxl);min-width:220px}:host.lg.icon-only{width:var(--kirby-spacing-xxl);min-width:unset}:host.no-decoration{--kirby-button-background-color: transparent;--kirby-button-color: var(--kirby-black)}@media(hover:hover){:host.no-decoration:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.no-decoration:active,:host.no-decoration.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level1{--kirby-button-background-color: var(--kirby-primary);--kirby-button-color: var(--kirby-primary-contrast)}:host.attention-level1.destructive{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}:host.attention-level2{--kirby-button-background-color: var(--kirby-black);--kirby-button-color: var(--kirby-black-contrast)}@media(hover:hover){:host.attention-level2:hover{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host.attention-level2:active,:host.attention-level2.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host.attention-level3:active,:host.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host.attention-level3 .state-layer{box-shadow:var(--kirby-inputs-elevation)}:host[expand=block]{width:100%}:host:disabled,:host[aria-disabled=true]{color:var(--kirby-semi-dark-shade);border-color:transparent;pointer-events:none}:host:disabled:not(.no-decoration),:host[aria-disabled=true]:not(.no-decoration){background-color:var(--kirby-semi-light)}:host.floating{width:64px!important;height:64px!important;min-width:unset}:host.floating:not(:disabled){box-shadow:var(--kirby-elevation-8)}:host(a){text-decoration:none}:host-context(.kirby-color-brightness-dark).no-decoration{--kirby-button-color: var(--kirby-white)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).no-decoration:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).no-decoration:active,:host-context(.kirby-color-brightness-dark).no-decoration.interaction-state-active{--state-layer-opacity: .2;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(.kirby-color-brightness-dark).attention-level2{--kirby-button-background-color: var(--kirby-white);--kirby-button-color: var(--kirby-white-contrast)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level2:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level2:active,:host-context(.kirby-color-brightness-dark).attention-level2.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}@media(hover:hover){:host-context(.kirby-color-brightness-dark).attention-level3:hover{--state-layer-opacity: .04;--state-layer-background-color: var(--kirby-black-contrast);cursor:pointer}}:host-context(.kirby-color-brightness-dark).attention-level3:active,:host-context(.kirby-color-brightness-dark).attention-level3.interaction-state-active{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black-contrast)}:host-context(kirby-item)[slot=end]{margin-inline:var(--kirby-spacing-s) 0}:host-context(kirby-dropdown){justify-content:space-between}:host-context(kirby-dropdown) .content-layer{min-width:0}:host-context(ion-toolbar ion-buttons.legacy-actions){font-size:var(--kirby-font-size-s);height:var(--kirby-spacing-xl)}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only{width:var(--kirby-spacing-xl)}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:hover,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.no-decoration.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level1.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level2.interaction-state-active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3:active,:host-context(ion-toolbar ion-buttons.legacy-actions).icon-only.attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(.page-title kirby-page-actions).no-decoration,:host-context(.page-title kirby-page-actions).attention-level1,:host-context(.page-title kirby-page-actions).attention-level2,:host-context(.page-title kirby-page-actions).attention-level3{--kirby-button-background-color: var(--kirby-inputs-background-color);--kirby-button-color: var(--kirby-inputs-color)}@media(hover:hover){:host-context(.page-title kirby-page-actions).no-decoration:hover,:host-context(.page-title kirby-page-actions).attention-level1:hover,:host-context(.page-title kirby-page-actions).attention-level2:hover,:host-context(.page-title kirby-page-actions).attention-level3:hover{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(.page-title kirby-page-actions).no-decoration:active,:host-context(.page-title kirby-page-actions).no-decoration.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level1:active,:host-context(.page-title kirby-page-actions).attention-level1.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level2:active,:host-context(.page-title kirby-page-actions).attention-level2.interaction-state-active,:host-context(.page-title kirby-page-actions).attention-level3:active,:host-context(.page-title kirby-page-actions).attention-level3.interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-empty-state .content){font-size:var(--kirby-font-size-n);height:var(--kirby-spacing-xxl);min-width:220px}:host-context(kirby-empty-state .content).icon-only{width:var(--kirby-spacing-xxl);min-width:unset}:host-context(kirby-toggle-button).success{--kirby-button-background-color: var(--kirby-success);--kirby-button-color: var(--kirby-success-contrast)}:host-context(kirby-toggle-button).warning{--kirby-button-background-color: var(--kirby-warning);--kirby-button-color: var(--kirby-warning-contrast)}:host-context(kirby-toggle-button).danger{--kirby-button-background-color: var(--kirby-danger);--kirby-button-color: var(--kirby-danger-contrast)}@media(hover:hover){:host-context(kirby-toggle-button):is(.success,.warning,.danger):hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer}}:host-context(kirby-toggle-button):is(.success,.warning,.danger):active,:host-context(kirby-toggle-button):is(.success,.warning,.danger).interaction-state-active{--state-layer-opacity: .16;--state-layer-background-color: var(--kirby-black)}:host-context(kirby-page-actions),:host-context(kirby-action-group),:host-context(.kirby-modal ion-header ion-toolbar ion-buttons){margin:0}:host-context(kirby-modal-footer){margin-top:0;margin-bottom:0}:host-context(kirby-modal-footer):first-child{margin-left:0}:host-context(kirby-modal-footer):last-child{margin-right:0}\n"]
164
+ }]
165
+ }],
166
+ ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }],
167
+ propDecorators: {
168
+ attentionLevel: [{ type: Input }],
169
+ noDecoration: [{
170
+ type: HostBinding,
171
+ args: ["class.no-decoration"]
172
+ }, { type: Input }],
173
+ isButtonFloating: [{
174
+ type: HostBinding,
175
+ args: ["class.floating"]
176
+ }],
177
+ isIconOnly: [{
178
+ type: HostBinding,
179
+ args: ["class.icon-only"]
180
+ }],
181
+ isIconLeft: [{
182
+ type: HostBinding,
183
+ args: ["class.icon-left"]
184
+ }],
185
+ isIconRight: [{
186
+ type: HostBinding,
187
+ args: ["class.icon-right"]
188
+ }],
189
+ _cssClass: [{
190
+ type: HostBinding,
191
+ args: ["class"]
192
+ }],
193
+ themeColor: [{ type: Input }],
194
+ expand: [{ type: Input }],
195
+ isFloating: [{ type: Input }],
196
+ size: [{ type: Input }],
197
+ showIconOnly: [{ type: Input }],
198
+ iconElementRef: [{
199
+ type: ContentChild,
200
+ args: [IconComponent, { read: ElementRef }]
201
+ }]
202
+ }
203
+ });
172
204
  export { ButtonComponent, ButtonSize };
173
- //# sourceMappingURL=kirbydesign-designsystem-button.mjs.map
205
+
206
+ //# sourceMappingURL=kirbydesign-designsystem-button.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-designsystem-button.mjs","sources":["../../button/src/button.component.ts","../../button/src/button.component.html","../../button/src/kirbydesign-designsystem-button.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft =\n this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;IAkBY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;MAgBT,eAAe,CAAA;AAO1B,IAAA,IACW,gBAAgB,GAAA;QACzB,OAAO,IAAI,CAAC,UAAU;IACxB;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY;IACnD;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY;IAC/C;AAEA,IAAA,IACW,WAAW,GAAA;QACpB,OAAO,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY;IAChD;AAEA,IAAA,IACI,SAAS,GAAA;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE;QACvD,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;IACtF;IAEQ,yBAAyB,GAAA;QAC/B,IAAI,IAAI,CAAC,YAAY;YAAE;QACvB,MA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designsystem-button.mjs","names":[],"sources":["../../button/src/button.component.ts","../../button/src/button.component.html"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft =\n this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n"],"mappings":";;;AAkBA,IAAY;CAAZ,SAAY,YAAU;CACpB,WAAA,QAAA;CACA,WAAA,QAAA;CACA,WAAA,QAAA;CACA,WAAA,QAAA;AACF,EAAA,CALY,eAAA,aAAU,CAAA,EAAA;AAgBtB,IAAa,kBAAb,MAAa,gBAAe;CAO1B,IACW,mBAAgB;EACzB,OAAO,KAAK;CACd;CAEA,IACW,aAAU;EACnB,OAAO,CAAC,CAAC,KAAK,kBAAkB,KAAK;CACvC;CAEA,IACW,aAAU;EACnB,OAAO,KAAK,eAAe,CAAC,KAAK;CACnC;CAEA,IACW,cAAW;EACpB,OAAO,KAAK,gBAAgB,CAAC,KAAK;CACpC;CAEA,IACI,YAAS;EACX,MAAM,iBAAiB,KAAK,0BAAyB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