@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,151 +1,181 @@
1
- import * as i0 from '@angular/core';
2
- import { EventEmitter, ElementRef, forwardRef, Output, HostBinding, Input, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
4
- import { IonToggle } from '@ionic/angular/standalone';
5
- import { inheritAriaLabelText, setAccessibleLabel } from '@kirbydesign/designsystem/shared';
6
- import * as i1 from '@kirbydesign/designsystem/helpers';
7
- import { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';
8
-
9
- class ToggleComponent {
10
- get _isDisabled() {
11
- return this.disabled ? 'disabled' : null;
12
- }
13
- constructor(cdr, elementRef, ionicElementPartHelper) {
14
- this.cdr = cdr;
15
- this.elementRef = elementRef;
16
- this.ionicElementPartHelper = ionicElementPartHelper;
17
- this.checked = false;
18
- this.disabled = false;
19
- this.checkedChange = new EventEmitter();
20
- this._justify = 'start';
21
- this._labelPlacement = 'start';
22
- this._pressed = false;
23
- // Initialize default ControlValueAccessor callback functions (noop)
24
- // eslint-disable-next-line no-empty-function
25
- this._onChange = () => { };
26
- // eslint-disable-next-line no-empty-function
27
- this._onTouched = () => { };
28
- }
29
- ngOnInit() {
30
- /**
31
- * We cannot query ion-toggle for slotted content at this point as the slot has not been rendered.
32
- * But we need to know if content is slotted to set justify and labelPlacement BEFORE ion-toggle is rendered.
33
- * So it has to be done by querying an additional wrapper around the default content slot like this.
34
- */
35
- this._hasSlottedContent = this.elementRef.nativeElement
36
- .querySelector('.default-content')
37
- .hasChildNodes();
38
- const slot = this.elementRef.nativeElement.getAttribute('slot');
39
- if (slot === 'end' && this._hasSlottedContent) {
40
- this._justify = 'space-between';
41
- }
42
- if (slot === 'start' && this._hasSlottedContent) {
43
- this._labelPlacement = 'end';
44
- }
45
- }
46
- ngAfterViewInit() {
47
- this.ionicElementPartHelper.setPart('label', this.ionToggleElement, '.toggle-wrapper');
48
- this.ionicElementPartHelper.setPart('label-text-wrapper', this.ionToggleElement, '.label-text-wrapper');
49
- }
50
- ngAfterContentInit() {
51
- this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);
52
- if (!this._labelText && !this._hasSlottedContent) {
53
- // if no label has been set try to find a label in an item and use its text content
54
- this._labelText = setAccessibleLabel(this.elementRef.nativeElement);
55
- }
56
- }
57
- onCheckedChange(checked) {
58
- this.checked = checked;
59
- this._onChange(this.checked);
60
- this.checkedChange.emit(this.checked);
61
- }
62
- _onActive() {
63
- this._pressed = true;
64
- }
65
- _onInactive() {
66
- this._pressed = false;
67
- this._onTouched();
68
- }
69
- /**
70
- * Sets the toggle's value. Part of the ControlValueAccessor interface
71
- * required to integrate with Angular's core forms API.
72
- *
73
- * @param value New value to be written to the model.
74
- */
75
- writeValue(value) {
76
- this.checked = value;
77
- this.cdr.markForCheck();
78
- }
79
- /**
80
- * Saves a callback function to be invoked when the toggle's value
81
- * changes from user input. Part of the ControlValueAccessor interface
82
- * required to integrate with Angular's core forms API.
83
- *
84
- * @param fn Callback to be triggered when the value changes.
85
- */
86
- registerOnChange(fn) {
87
- this._onChange = fn;
88
- }
89
- /**
90
- * Saves a callback function to be invoked when the toggle is blurred
91
- * by the user. Part of the ControlValueAccessor interface required
92
- * to integrate with Angular's core forms API.
93
- *
94
- * @param fn Callback to be triggered when the component has been touched.
95
- */
96
- registerOnTouched(fn) {
97
- this._onTouched = fn;
98
- }
99
- /**
100
- * Disables the toggle. Part of the ControlValueAccessor interface required
101
- * to integrate with Angular's core forms API.
102
- *
103
- * @param isDisabled Sets whether the component is disabled.
104
- */
105
- setDisabledState(isDisabled) {
106
- this.disabled = isDisabled;
107
- this.cdr.markForCheck();
108
- }
109
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ToggleComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1.IonicElementPartHelper }], target: i0.ɵɵFactoryTarget.Component }); }
110
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.18", type: ToggleComponent, isStandalone: true, selector: "kirby-toggle", inputs: { checked: "checked", disabled: "disabled" }, outputs: { checkedChange: "checkedChange" }, host: { properties: { "attr.disabled": "this._isDisabled", "class.has-hidden-label": "this._labelText" } }, providers: [
111
- IonicElementPartHelper,
112
- {
113
- provide: NG_VALUE_ACCESSOR,
114
- useExisting: forwardRef((() => ToggleComponent)),
115
- multi: true,
116
- },
117
- ], viewQueries: [{ propertyName: "ionToggleElement", first: true, predicate: IonToggle, descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}ion-toggle:focus-visible::part(track){transition:box-shadow 80ms linear,background-color 80ms linear;box-shadow:var(--kirby-focus-ring-sm-inset)}ion-toggle{overflow:visible;contain:none}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;height:32px}ion-toggle ::part(label-text-wrapper){line-height:1.5;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"], dependencies: [{ kind: "component", type: IonToggle, selector: "ion-toggle", inputs: ["checked", "color", "disabled", "enableOnOffLabels", "errorText", "helperText", "justify", "labelPlacement", "mode", "name", "value"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
118
- }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: ToggleComponent, decorators: [{
120
- type: Component,
121
- args: [{ imports: [IonToggle], selector: 'kirby-toggle', providers: [
122
- IonicElementPartHelper,
123
- {
124
- provide: NG_VALUE_ACCESSOR,
125
- useExisting: forwardRef((() => ToggleComponent)),
126
- multi: true,
127
- },
128
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n", styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}ion-toggle:focus-visible::part(track){transition:box-shadow 80ms linear,background-color 80ms linear;box-shadow:var(--kirby-focus-ring-sm-inset)}ion-toggle{overflow:visible;contain:none}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(119.28, 119.28, 119.28);--handle-background: rgb(244.8, 244.8, 244.8);--track-background-checked: rgb(45.030660793, 192.689339207, 114.1474889868);--handle-background-checked: rgb(244.8, 244.8, 244.8)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(107.92, 107.92, 107.92);--handle-background: rgb(234.6, 234.6, 234.6);--track-background-checked: rgb(40.7420264317, 174.3379735683, 103.2762995595);--handle-background-checked: rgb(234.6, 234.6, 234.6)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: .2s;--handle-box-shadow: 0 1px 24px 0 rgba(28, 28, 28, .04);--handle-height: 28px;--handle-width: 28px;--border-radius: 16px}ion-toggle::part(track){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;height:32px}ion-toggle ::part(label-text-wrapper){line-height:1.5;white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:1}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"] }]
129
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.IonicElementPartHelper }], propDecorators: { ionToggleElement: [{
130
- type: ViewChild,
131
- args: [IonToggle, { read: ElementRef, static: true }]
132
- }], checked: [{
133
- type: Input
134
- }], disabled: [{
135
- type: Input
136
- }], _isDisabled: [{
137
- type: HostBinding,
138
- args: ['attr.disabled']
139
- }], _labelText: [{
140
- type: HostBinding,
141
- args: ['class.has-hidden-label']
142
- }], checkedChange: [{
143
- type: Output
144
- }] } });
145
-
146
- /**
147
- * Generated bundle index. Do not edit.
148
- */
149
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild, forwardRef } from "@angular/core";
3
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
4
+ import { IonToggle } from "@ionic/angular";
5
+ import { inheritAriaLabelText, setAccessibleLabel } from "@kirbydesign/designsystem/shared";
6
+ import * as i1 from "@kirbydesign/designsystem/helpers";
7
+ import { IonicElementPartHelper } from "@kirbydesign/designsystem/helpers";
8
+ var ToggleComponent = class ToggleComponent {
9
+ get _isDisabled() {
10
+ return this.disabled ? "disabled" : null;
11
+ }
12
+ constructor(cdr, elementRef, ionicElementPartHelper) {
13
+ this.cdr = cdr;
14
+ this.elementRef = elementRef;
15
+ this.ionicElementPartHelper = ionicElementPartHelper;
16
+ this.checked = false;
17
+ this.disabled = false;
18
+ this.checkedChange = new EventEmitter();
19
+ this._justify = "start";
20
+ this._labelPlacement = "start";
21
+ this._pressed = false;
22
+ this._onChange = () => {};
23
+ this._onTouched = () => {};
24
+ }
25
+ ngOnInit() {
26
+ this._hasSlottedContent = this.elementRef.nativeElement.querySelector(".default-content").hasChildNodes();
27
+ const slot = this.elementRef.nativeElement.getAttribute("slot");
28
+ if (slot === "end" && this._hasSlottedContent) this._justify = "space-between";
29
+ if (slot === "start" && this._hasSlottedContent) this._labelPlacement = "end";
30
+ }
31
+ ngAfterViewInit() {
32
+ this.ionicElementPartHelper.setPart("label", this.ionToggleElement, ".toggle-wrapper");
33
+ this.ionicElementPartHelper.setPart("label-text-wrapper", this.ionToggleElement, ".label-text-wrapper");
34
+ }
35
+ ngAfterContentInit() {
36
+ this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);
37
+ if (!this._labelText && !this._hasSlottedContent) this._labelText = setAccessibleLabel(this.elementRef.nativeElement);
38
+ }
39
+ onCheckedChange(checked) {
40
+ this.checked = checked;
41
+ this._onChange(this.checked);
42
+ this.checkedChange.emit(this.checked);
43
+ }
44
+ _onActive() {
45
+ this._pressed = true;
46
+ }
47
+ _onInactive() {
48
+ this._pressed = false;
49
+ this._onTouched();
50
+ }
51
+ writeValue(value) {
52
+ this.checked = value;
53
+ this.cdr.markForCheck();
54
+ }
55
+ registerOnChange(fn) {
56
+ this._onChange = fn;
57
+ }
58
+ registerOnTouched(fn) {
59
+ this._onTouched = fn;
60
+ }
61
+ setDisabledState(isDisabled) {
62
+ this.disabled = isDisabled;
63
+ this.cdr.markForCheck();
64
+ }
65
+ static {
66
+ this.ɵfac = i0.ɵɵngDeclareFactory({
67
+ minVersion: "12.0.0",
68
+ version: "22.2.2",
69
+ ngImport: i0,
70
+ type: ToggleComponent,
71
+ deps: [
72
+ { token: i0.ChangeDetectorRef },
73
+ { token: i0.ElementRef },
74
+ { token: i1.IonicElementPartHelper }
75
+ ],
76
+ target: i0.ɵɵFactoryTarget.Component
77
+ });
78
+ }
79
+ static {
80
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
81
+ minVersion: "17.0.0",
82
+ version: "22.2.2",
83
+ type: ToggleComponent,
84
+ isStandalone: true,
85
+ selector: "kirby-toggle",
86
+ inputs: {
87
+ checked: "checked",
88
+ disabled: "disabled"
89
+ },
90
+ outputs: { checkedChange: "checkedChange" },
91
+ host: { properties: {
92
+ "attr.disabled": "this._isDisabled",
93
+ "class.has-hidden-label": "this._labelText"
94
+ } },
95
+ providers: [IonicElementPartHelper, {
96
+ provide: NG_VALUE_ACCESSOR,
97
+ useExisting: forwardRef((() => ToggleComponent)),
98
+ multi: true
99
+ }],
100
+ viewQueries: [{
101
+ propertyName: "ionToggleElement",
102
+ first: true,
103
+ predicate: IonToggle,
104
+ descendants: true,
105
+ read: ElementRef,
106
+ static: true
107
+ }],
108
+ ngImport: i0,
109
+ template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n",
110
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}ion-toggle:focus-visible::part(track){transition:box-shadow 80ms linear,background-color 80ms linear;box-shadow:var(--kirby-focus-ring-sm-inset)}ion-toggle{overflow:visible;contain:none}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(46.7764705882%, 46.7764705882%, 46.7764705882%);--handle-background: rgb(96%, 96%, 96%);--track-background-checked: rgb(17.6590826639%, 75.5644467479%, 44.7637211713%);--handle-background-checked: rgb(96%, 96%, 96%)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(42.3215686275%, 42.3215686275%, 42.3215686275%);--handle-background: rgb(92%, 92%, 92%);--track-background-checked: rgb(15.9772652673%, 68.3678327719%, 40.5005096312%);--handle-background-checked: rgb(92%, 92%, 92%)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: var(--kirby-transition-duration-quick);--handle-box-shadow: var(--kirby-elevation-2);--handle-height: calc(var(--kirby-spacing-l) - var(--kirby-spacing-xxxxs) * 2);--handle-width: calc(var(--kirby-spacing-l) - var(--kirby-spacing-xxxxs) * 2);--border-radius: calc(var(--kirby-spacing-l) / 2)}ion-toggle::part(track){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;height:var(--kirby-spacing-l)}ion-toggle ::part(label-text-wrapper){line-height:var(--kirby-line-height-n);white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:var(--kirby-z-index-default)}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"],
111
+ dependencies: [{
112
+ kind: "component",
113
+ type: IonToggle,
114
+ selector: "ion-toggle",
115
+ inputs: [
116
+ "checked",
117
+ "color",
118
+ "disabled",
119
+ "enableOnOffLabels",
120
+ "errorText",
121
+ "helperText",
122
+ "justify",
123
+ "labelPlacement",
124
+ "mode",
125
+ "name",
126
+ "value"
127
+ ]
128
+ }],
129
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
130
+ });
131
+ }
132
+ };
133
+ i0.ɵɵngDeclareClassMetadata({
134
+ minVersion: "12.0.0",
135
+ version: "22.2.2",
136
+ ngImport: i0,
137
+ type: ToggleComponent,
138
+ decorators: [{
139
+ type: Component,
140
+ args: [{
141
+ imports: [IonToggle],
142
+ selector: "kirby-toggle",
143
+ providers: [IonicElementPartHelper, {
144
+ provide: NG_VALUE_ACCESSOR,
145
+ useExisting: forwardRef((() => ToggleComponent)),
146
+ multi: true
147
+ }],
148
+ changeDetection: ChangeDetectionStrategy.OnPush,
149
+ template: "<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n",
150
+ styles: [".kirby-line-clamp{display:-webkit-box;-webkit-line-clamp:var(--line-clamp, none);-webkit-box-orient:vertical;overflow:hidden}:host{display:inline-flex}:host:has(ion-toggle.in-item.toggle-justify-space-between){width:100%}:host.has-hidden-label:has(ion-toggle.in-item){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle{position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label){position:initial}:host.has-hidden-label:has(ion-toggle.in-item) ion-toggle::part(label-text-wrapper){margin-inline:0}:host.has-hidden-label[slot=end] ion-toggle{margin-inline-start:12px}:host.has-hidden-label .hidden-label{position:absolute;inset:0;opacity:0}:host[disabled]{color:var(--kirby-text-color-semi-dark)}:host[disabled] ion-toggle{--color: var(--kirby-medium);--color-checked: var(--kirby-medium);opacity:1}:host[disabled] ion-toggle::part(track){opacity:.3}ion-toggle:focus-visible::part(track){transition:box-shadow 80ms linear,background-color 80ms linear;box-shadow:var(--kirby-focus-ring-sm-inset)}ion-toggle{overflow:visible;contain:none}ion-toggle:focus-visible{outline:none}@media(hover:hover){ion-toggle:hover{--state-layer-opacity: .08;--state-layer-background-color: var(--kirby-black);cursor:pointer;--track-background: rgb(46.7764705882%, 46.7764705882%, 46.7764705882%);--handle-background: rgb(96%, 96%, 96%);--track-background-checked: rgb(17.6590826639%, 75.5644467479%, 44.7637211713%);--handle-background-checked: rgb(96%, 96%, 96%)}}ion-toggle:active,ion-toggle.interaction-state-active{--state-layer-opacity: .12;--state-layer-background-color: var(--kirby-black);--track-background: rgb(42.3215686275%, 42.3215686275%, 42.3215686275%);--handle-background: rgb(92%, 92%, 92%);--track-background-checked: rgb(15.9772652673%, 68.3678327719%, 40.5005096312%);--handle-background-checked: rgb(92%, 92%, 92%)}ion-toggle{--track-background: var(--kirby-semi-dark);--handle-background: var(--kirby-white);--track-background-checked: var(--kirby-success);--handle-background-checked: var(--kirby-white);--handle-transition: var(--kirby-transition-duration-quick);--handle-box-shadow: var(--kirby-elevation-2);--handle-height: calc(var(--kirby-spacing-l) - var(--kirby-spacing-xxxxs) * 2);--handle-width: calc(var(--kirby-spacing-l) - var(--kirby-spacing-xxxxs) * 2);--border-radius: calc(var(--kirby-spacing-l) / 2)}ion-toggle::part(track){transition:all 80ms linear 0ms;transition-property:background-color,box-shadow;height:var(--kirby-spacing-l)}ion-toggle ::part(label-text-wrapper){line-height:var(--kirby-line-height-n);white-space:pre-line}ion-toggle.in-item::part(label){align-items:center;padding-inline:0}ion-toggle.in-item::part(label),ion-toggle.in-item::part(label-text-wrapper){margin-block:0}ion-toggle.in-item.toggle-label-placement-start::part(label-text-wrapper){margin-inline:0 12px}ion-toggle.in-item.toggle-label-placement-end::part(label-text-wrapper){margin-inline:12px 0}ion-toggle.in-item.legacy-toggle{padding:0}:host-context(kirby-item){z-index:var(--kirby-z-index-default)}:host-context(kirby-item) ion-toggle{margin:0}:host-context(kirby-item)[slot=start]{margin-inline-end:12px}\n"]
151
+ }]
152
+ }],
153
+ ctorParameters: () => [
154
+ { type: i0.ChangeDetectorRef },
155
+ { type: i0.ElementRef },
156
+ { type: i1.IonicElementPartHelper }
157
+ ],
158
+ propDecorators: {
159
+ ionToggleElement: [{
160
+ type: ViewChild,
161
+ args: [IonToggle, {
162
+ read: ElementRef,
163
+ static: true
164
+ }]
165
+ }],
166
+ checked: [{ type: Input }],
167
+ disabled: [{ type: Input }],
168
+ _isDisabled: [{
169
+ type: HostBinding,
170
+ args: ["attr.disabled"]
171
+ }],
172
+ _labelText: [{
173
+ type: HostBinding,
174
+ args: ["class.has-hidden-label"]
175
+ }],
176
+ checkedChange: [{ type: Output }]
177
+ }
178
+ });
150
179
  export { ToggleComponent };
151
- //# sourceMappingURL=kirbydesign-designsystem-toggle.mjs.map
180
+
181
+ //# sourceMappingURL=kirbydesign-designsystem-toggle.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-designsystem-toggle.mjs","sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html","../../toggle/src/kirbydesign-designsystem-toggle.ts"],"sourcesContent":["import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular/standalone';\nimport { inheritAriaLabelText, setAccessibleLabel } from '@kirbydesign/designsystem/shared';\nimport { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';\n\n@Component({\n imports: [IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n IonicElementPartHelper,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent\n implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit\n{\n @ViewChild(IonToggle, { read: ElementRef, static: true })\n private ionToggleElement?: ElementRef<HTMLIonToggleElement>;\n\n @Input() checked: boolean = false;\n\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @HostBinding('class.has-hidden-label') _labelText: string;\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _justify: 'start' | 'end' | 'space-between' = 'start';\n _labelPlacement: 'end' | 'fixed' | 'stacked' | 'start' = 'start';\n _hasSlottedContent: boolean;\n _pressed = false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private elementRef: ElementRef<HTMLElement>,\n private ionicElementPartHelper: IonicElementPartHelper\n ) {}\n\n ngOnInit(): void {\n /**\n * We cannot query ion-toggle for slotted content at this point as the slot has not been rendered.\n * But we need to know if content is slotted to set justify and labelPlacement BEFORE ion-toggle is rendered.\n * So it has to be done by querying an additional wrapper around the default content slot like this.\n */\n this._hasSlottedContent = this.elementRef.nativeElement\n .querySelector('.default-content')\n .hasChildNodes();\n\n const slot = this.elementRef.nativeElement.getAttribute('slot');\n if (slot === 'end' && this._hasSlottedContent) {\n this._justify = 'space-between';\n }\n\n if (slot === 'start' && this._hasSlottedContent) {\n this._labelPlacement = 'end';\n }\n }\n\n ngAfterViewInit(): void {\n this.ionicElementPartHelper.setPart('label', this.ionToggleElement, '.toggle-wrapper');\n this.ionicElementPartHelper.setPart(\n 'label-text-wrapper',\n this.ionToggleElement,\n '.label-text-wrapper'\n );\n }\n\n ngAfterContentInit(): void {\n this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);\n\n if (!this._labelText && !this._hasSlottedContent) {\n // if no label has been set try to find a label in an item and use its text content\n this._labelText = setAccessibleLabel(this.elementRef.nativeElement);\n }\n }\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"kirbydesign-designsystem-toggle.mjs","names":[],"sources":["../../toggle/src/toggle.component.ts","../../toggle/src/toggle.component.html"],"sourcesContent":["import {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n HostBinding,\n Input,\n OnInit,\n Output,\n ViewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { IonToggle } from '@ionic/angular';\nimport { inheritAriaLabelText, setAccessibleLabel } from '@kirbydesign/designsystem/shared';\nimport { IonicElementPartHelper } from '@kirbydesign/designsystem/helpers';\n\n@Component({\n imports: [IonToggle],\n selector: 'kirby-toggle',\n templateUrl: './toggle.component.html',\n styleUrls: ['./toggle.component.scss'],\n providers: [\n IonicElementPartHelper,\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => ToggleComponent),\n multi: true,\n },\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ToggleComponent\n implements ControlValueAccessor, OnInit, AfterViewInit, AfterContentInit\n{\n @ViewChild(IonToggle, { read: ElementRef, static: true })\n private ionToggleElement?: ElementRef<HTMLIonToggleElement>;\n\n @Input() checked: boolean = false;\n\n @Input() disabled: boolean = false;\n @HostBinding('attr.disabled')\n get _isDisabled() {\n return this.disabled ? 'disabled' : null;\n }\n\n @HostBinding('class.has-hidden-label') _labelText: string;\n\n @Output() checkedChange = new EventEmitter<boolean>();\n\n _justify: 'start' | 'end' | 'space-between' = 'start';\n _labelPlacement: 'end' | 'fixed' | 'stacked' | 'start' = 'start';\n _hasSlottedContent: boolean;\n _pressed = false;\n\n constructor(\n private cdr: ChangeDetectorRef,\n private elementRef: ElementRef<HTMLElement>,\n private ionicElementPartHelper: IonicElementPartHelper\n ) {}\n\n ngOnInit(): void {\n /**\n * We cannot query ion-toggle for slotted content at this point as the slot has not been rendered.\n * But we need to know if content is slotted to set justify and labelPlacement BEFORE ion-toggle is rendered.\n * So it has to be done by querying an additional wrapper around the default content slot like this.\n */\n this._hasSlottedContent = this.elementRef.nativeElement\n .querySelector('.default-content')\n .hasChildNodes();\n\n const slot = this.elementRef.nativeElement.getAttribute('slot');\n if (slot === 'end' && this._hasSlottedContent) {\n this._justify = 'space-between';\n }\n\n if (slot === 'start' && this._hasSlottedContent) {\n this._labelPlacement = 'end';\n }\n }\n\n ngAfterViewInit(): void {\n this.ionicElementPartHelper.setPart('label', this.ionToggleElement, '.toggle-wrapper');\n this.ionicElementPartHelper.setPart(\n 'label-text-wrapper',\n this.ionToggleElement,\n '.label-text-wrapper'\n );\n }\n\n ngAfterContentInit(): void {\n this._labelText = inheritAriaLabelText(this.elementRef.nativeElement);\n\n if (!this._labelText && !this._hasSlottedContent) {\n // if no label has been set try to find a label in an item and use its text content\n this._labelText = setAccessibleLabel(this.elementRef.nativeElement);\n }\n }\n\n onCheckedChange(checked: boolean): void {\n this.checked = checked;\n this._onChange(this.checked);\n this.checkedChange.emit(this.checked);\n }\n\n _onActive() {\n this._pressed = true;\n }\n\n _onInactive() {\n this._pressed = false;\n this._onTouched();\n }\n\n // Initialize default ControlValueAccessor callback functions (noop)\n // eslint-disable-next-line no-empty-function\n private _onChange: (value: boolean) => void = () => {};\n // eslint-disable-next-line no-empty-function\n private _onTouched = () => {};\n\n /**\n * Sets the toggle's value. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param value New value to be written to the model.\n */\n writeValue(value: boolean): void {\n this.checked = value;\n this.cdr.markForCheck();\n }\n /**\n * Saves a callback function to be invoked when the toggle's value\n * changes from user input. Part of the ControlValueAccessor interface\n * required to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the value changes.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n /**\n * Saves a callback function to be invoked when the toggle is blurred\n * by the user. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param fn Callback to be triggered when the component has been touched.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n /**\n * Disables the toggle. Part of the ControlValueAccessor interface required\n * to integrate with Angular's core forms API.\n *\n * @param isDisabled Sets whether the component is disabled.\n */\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n}\n","<ion-toggle\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [class.interaction-state-active]=\"_pressed\"\n (keydown.space)=\"_onActive()\"\n (keyup.space)=\"_onInactive()\"\n (blur)=\"_onInactive()\"\n (ionChange)=\"onCheckedChange($event.detail.checked)\"\n [justify]=\"_justify\"\n [labelPlacement]=\"_labelPlacement\"\n>\n @if (_labelText) {\n <span class=\"hidden-label\">{{ _labelText }}</span>\n }\n <span class=\"default-content\" [attr.aria-hidden]=\"_labelText ? true : undefined\">\n <ng-content></ng-content>\n </span>\n</ion-toggle>\n"],"mappings":"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"}
@@ -1,25 +1,40 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, InjectionToken } from '@angular/core';
3
-
4
- class WindowRef {
5
- get nativeWindow() {
6
- return window;
7
- }
8
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: WindowRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9
- /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: WindowRef, providedIn: 'root' }); }
10
- }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.18", ngImport: i0, type: WindowRef, decorators: [{
12
- type: Injectable,
13
- args: [{
14
- providedIn: 'root',
15
- }]
16
- }] });
17
-
18
- const FORM_FIELD_CONTROL = new InjectionToken('FormFieldControl');
19
-
20
- /**
21
- * Generated bundle index. Do not edit.
22
- */
23
-
1
+ import * as i0 from "@angular/core";
2
+ import { Injectable, InjectionToken } from "@angular/core";
3
+ var WindowRef = class WindowRef {
4
+ get nativeWindow() {
5
+ return window;
6
+ }
7
+ static {
8
+ this.ɵfac = i0.ɵɵngDeclareFactory({
9
+ minVersion: "12.0.0",
10
+ version: "22.2.2",
11
+ ngImport: i0,
12
+ type: WindowRef,
13
+ deps: [],
14
+ target: i0.ɵɵFactoryTarget.Injectable
15
+ });
16
+ }
17
+ static {
18
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
19
+ minVersion: "12.0.0",
20
+ version: "22.2.2",
21
+ ngImport: i0,
22
+ type: WindowRef,
23
+ providedIn: "root"
24
+ });
25
+ }
26
+ };
27
+ i0.ɵɵngDeclareClassMetadata({
28
+ minVersion: "12.0.0",
29
+ version: "22.2.2",
30
+ ngImport: i0,
31
+ type: WindowRef,
32
+ decorators: [{
33
+ type: Injectable,
34
+ args: [{ providedIn: "root" }]
35
+ }]
36
+ });
37
+ const FORM_FIELD_CONTROL = new InjectionToken("FormFieldControl");
24
38
  export { FORM_FIELD_CONTROL, WindowRef };
25
- //# sourceMappingURL=kirbydesign-designsystem-types.mjs.map
39
+
40
+ //# sourceMappingURL=kirbydesign-designsystem-types.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kirbydesign-designsystem-types.mjs","sources":["../../types/src/window-ref.ts","../../types/src/form-field-control.ts","../../types/src/kirbydesign-designsystem-types.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowRef {\n get nativeWindow(): any {\n return window;\n }\n}\n","import { EventEmitter, InjectionToken } from '@angular/core';\n\nexport interface FormFieldControl {\n hasError: boolean;\n hasErrorChange: EventEmitter<boolean>;\n /** The focusable/interactive element within the control, used for accessibility attributes and focus management. */\n interactiveElement: HTMLElement;\n}\n\nexport const FORM_FIELD_CONTROL = new InjectionToken<FormFieldControl>('FormFieldControl');\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MAKa,SAAS,CAAA;AACpB,IAAA,IAAI,YAAY,GAAA;AACd,QAAA,OAAO,MAAM;IACf;kIAHW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAT,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,SAAS,cAFR,MAAM,EAAA,CAAA,CAAA;;4FAEP,SAAS,EAAA,UAAA,EAAA,CAAA;kBAHrB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;MCKY,kBAAkB,GAAG,IAAI,cAAc,CAAmB,kBAAkB;;ACTzF;;AAEG;;;;"}
1
+ {"version":3,"file":"kirbydesign-designsystem-types.mjs","names":[],"sources":["../../types/src/window-ref.ts","../../types/src/form-field-control.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowRef {\n get nativeWindow(): any {\n return window;\n }\n}\n","import { EventEmitter, InjectionToken } from '@angular/core';\n\nexport interface FormFieldControl {\n hasError: boolean;\n hasErrorChange: EventEmitter<boolean>;\n /** The focusable/interactive element within the control, used for accessibility attributes and focus management. */\n interactiveElement: HTMLElement;\n}\n\nexport const FORM_FIELD_CONTROL = new InjectionToken<FormFieldControl>('FormFieldControl');\n"],"mappings":";;AAKA,IAAa,YAAb,MAAa,UAAS;CACpB,IAAI,eAAY;EACd,OAAO;CACT;CAHW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAS,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAT;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAS,YAFR;EAAM,CAAA;CAAA;;AAEP,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAS,YAAA,CAAA;EAHrB,MAAA;EAAW,MAAA,CAAA,EACV,YAAY,OACb,CAAA;;;ACKD,MAAa,qBAAqB,IAAI,eAAiC,kBAAkB"}