@ids-group-ltd/ids-design-system 0.11.3 → 0.12.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 (249) hide show
  1. package/CHANGELOG.md +253 -13
  2. package/components/README.md +86 -0
  3. package/components.md +12 -4
  4. package/docs/agent/INDEX.md +1 -0
  5. package/docs/agent/platform/body-scroll-lock-service.md +12 -0
  6. package/docs/agent/platform/toast-service.md +4 -6
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +286 -0
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +235 -0
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +53 -0
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1802 -0
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +547 -0
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
  145. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
  146. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
  147. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +325 -0
  148. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
  149. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +101 -0
  150. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
  151. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
  152. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
  153. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
  154. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
  155. package/fesm2022/ids-group-ltd-ids-design-system.mjs +72 -14030
  156. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  157. package/migrations/0.11.0.json +0 -2
  158. package/migrations/0.11.1.json +2 -1
  159. package/migrations/0.11.2.json +2 -1
  160. package/migrations/0.11.3.json +3 -2
  161. package/migrations/0.11.4.json +247 -0
  162. package/migrations/0.12.0.json +22 -0
  163. package/migrations/0.4.0.json +2 -1
  164. package/migrations/0.7.1.json +2 -1
  165. package/migrations/0.8.0.json +6 -5
  166. package/package.json +573 -1
  167. package/styles/_control-label.scss +18 -0
  168. package/styles/_ds-color.scss +6 -0
  169. package/styles/_focus.scss +16 -0
  170. package/styles/_skeleton-shimmer.scss +10 -26
  171. package/themes/README.md +4 -4
  172. package/themes/_semantic.scss +11 -2
  173. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
  174. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
  175. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
  176. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
  177. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
  178. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
  179. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
  180. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
  181. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
  182. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
  183. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
  184. package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
  185. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
  186. package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
  187. package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
  188. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
  189. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
  190. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
  191. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
  192. package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
  193. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
  194. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
  195. package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
  196. package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
  197. package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
  198. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
  199. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
  200. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
  201. package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
  202. package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
  203. package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
  204. package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +82 -0
  205. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
  206. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
  207. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
  208. package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
  209. package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
  210. package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
  211. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
  212. package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
  213. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
  214. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
  215. package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +106 -0
  216. package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
  217. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
  218. package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
  219. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
  220. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
  221. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
  222. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
  223. package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
  224. package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
  225. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +38 -0
  226. package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
  227. package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
  228. package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
  229. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
  230. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +791 -0
  231. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
  232. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
  233. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
  234. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
  235. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
  236. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
  237. package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
  238. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
  239. package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
  240. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
  241. package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
  242. package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
  243. package/types/ids-group-ltd-ids-design-system-core.d.ts +428 -0
  244. package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
  245. package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
  246. package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
  247. package/types/ids-group-ltd-ids-design-system.d.ts +72 -5544
  248. package/LICENSE +0 -21
  249. package/README.md +0 -73
@@ -0,0 +1,92 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, output, computed, HostBinding, ViewEncapsulation, Component } from '@angular/core';
3
+ import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
4
+
5
+ class BannerComponent {
6
+ /** Severity — drives colour, the default icon and the ARIA role/live. */
7
+ variant = input('info', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
8
+ /** Optional bold heading above the message. */
9
+ title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
10
+ /** Show a close button that emits `closed`. */
11
+ dismissible = input(false, { ...(ngDevMode ? { debugName: "dismissible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
12
+ /** Override the variant's default icon. */
13
+ icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
14
+ /** Tighter padding, centred items, single-line title. */
15
+ compact = input(false, { ...(ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
16
+ /** `'stacked'` wraps actions onto their own line; `'row'` keeps them inline. */
17
+ layout = input('stacked', ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
18
+ /** Coloured accent rail on the leading edge; set false to hide it. */
19
+ accentRail = input(true, { ...(ngDevMode ? { debugName: "accentRail" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
20
+ /** Fires when the user dismisses the banner. */
21
+ closed = output();
22
+ get noRail() {
23
+ return !this.accentRail();
24
+ }
25
+ /** Announce this banner to a screen reader when it appears.
26
+ *
27
+ * Off by default: an `alert` region fires on INSERTION, so a banner that is page
28
+ * furniture would interrupt the reader on every route into the page. Turn it on for
29
+ * one the app raises in response to an event; for anything transient prefer
30
+ * `ToastService`, which owns a live region built for the purpose. */
31
+ announce = input(false, { ...(ngDevMode ? { debugName: "announce" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
32
+ get ariaRole() {
33
+ if (!this.announce()) {
34
+ return null;
35
+ }
36
+ const value = this.variant();
37
+ return value === 'error' || value === 'warning' || value === 'severe'
38
+ ? 'alert'
39
+ : 'status';
40
+ }
41
+ get ariaLive() {
42
+ if (!this.announce()) {
43
+ return null;
44
+ }
45
+ return this.ariaRole === 'alert' ? 'assertive' : 'polite';
46
+ }
47
+ classes = computed(() => {
48
+ const parts = ['banner', this.variant(), `layout-${this.layout()}`];
49
+ if (this.compact()) {
50
+ parts.push('compact');
51
+ }
52
+ return parts.join(' ');
53
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
54
+ defaultIcon = computed(() => {
55
+ const variant = this.variant();
56
+ if (variant === 'success') {
57
+ return 'success';
58
+ }
59
+ if (variant === 'warning' || variant === 'severe') {
60
+ return 'warn';
61
+ }
62
+ if (variant === 'error') {
63
+ return 'error';
64
+ }
65
+ return 'info';
66
+ }, ...(ngDevMode ? [{ debugName: "defaultIcon" }] : /* istanbul ignore next */ []));
67
+ onDismiss() {
68
+ this.closed.emit();
69
+ }
70
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
71
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BannerComponent, isStandalone: true, selector: "ds-banner", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, accentRail: { classPropertyName: "accentRail", publicName: "accentRail", isSignal: true, isRequired: false, transformFunction: null }, announce: { classPropertyName: "announce", publicName: "announce", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { properties: { "class.no-rail": "this.noRail", "attr.role": "this.ariaRole", "attr.aria-live": "this.ariaLive" } }, ngImport: i0, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BannerComponent, decorators: [{
74
+ type: Component,
75
+ args: [{ selector: 'ds-banner', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" \u2014 projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x\"\n [size]=\"16\"\n >\n </ds-icon>\n </button>\n }\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;min-width:0}.banner{--_banner-bg-color: var(--ds-banner-bg-color, var(--info-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--info-text));--_banner-bar: var(--ds-banner-bar, var(--info));--_banner-pad-y: var(--ds-banner-pad-y, var(--space-3));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-4));--_banner-radius: var(--ds-banner-radius, var(--ds-radius-control));--_banner-bar-width: var(--ds-banner-bar-width, var(--banner-bar-w));--_banner-title-text-color: var(--ds-banner-title-text-color, var(--text-primary));--_banner-body-font-size: var(--ds-banner-body-font-size, var(--font-size-s));--_banner-close-icon-color: var(--ds-banner-close-icon-color, var(--icon-default));--_banner-close-icon-color-hover: var(--ds-banner-close-icon-color-hover, var(--icon-strong));--_banner-enter-keyframes: var(--ds-banner-enter-keyframes, ds-slide-in);--_banner-enter-duration: var(--ds-banner-enter-duration, var(--ds-motion-enter-surface-duration));--_banner-enter-easing: var(--ds-banner-enter-easing, var(--ds-motion-enter-surface-easing));--_banner-enter-offset: var(--ds-banner-enter-offset, 4px);--_ds-enter-y: calc(-1 * var(--_banner-enter-offset));--_ds-enter-scale: var(--ds-banner-enter-scale, .96);display:flex;gap:var(--space-3);text-align:start;padding:var(--_banner-pad-y) var(--_banner-pad-x);border-radius:var(--_banner-radius);background-color:var(--_banner-bg-color);color:var(--_banner-text-color);animation-name:var(--_banner-enter-keyframes);animation-duration:var(--_banner-enter-duration);animation-timing-function:var(--_banner-enter-easing)}@media(prefers-reduced-motion:reduce){.banner{--_banner-enter-duration: 0ms}}:host(:not(.no-rail)) .banner{border-left:var(--_banner-bar-width) solid var(--_banner-bar)}.banner.success{--_banner-bar: var(--ds-banner-bar, var(--success));--_banner-bg-color: var(--ds-banner-bg-color, var(--success-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--success-text))}.banner.warning{--_banner-bar: var(--ds-banner-bar, var(--warning));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.severe{--_banner-bar: var(--ds-banner-bar, var(--warning-hover));--_banner-bg-color: var(--ds-banner-bg-color, var(--warning-muted));--_banner-text-color: var(--ds-banner-text-color, var(--warning-text))}.banner.error{--_banner-bar: var(--ds-banner-bar, var(--error));--_banner-bg-color: var(--ds-banner-bg-color, var(--error-subtitle));--_banner-text-color: var(--ds-banner-text-color, var(--error-text))}.banner.neutral{--_banner-bar: var(--ds-banner-bar, var(--border-strong));--_banner-bg-color: var(--ds-banner-bg-color, var(--surface-secondary));--_banner-text-color: var(--ds-banner-text-color, var(--text-secondary))}.banner .icon{flex-shrink:0;color:inherit;align-self:center}.banner .body{flex:1;min-width:0}.banner .title{font:var(--font-weight-bold) var(--font-size-s)/var(--line-height-base) var(--font-sans);color:var(--_banner-title-text-color);margin:0}.banner .text:not(:empty){display:block;margin-top:var(--space-1);font-size:var(--_banner-body-font-size)}.banner .close{background:none;border:0;cursor:pointer;color:var(--_banner-close-icon-color)}.banner .close:hover{color:var(--_banner-close-icon-color-hover)}.banner .close:active:not(:disabled,[disabled],.is-disabled){filter:brightness(var(--ds-press-brightness, .9));transform:scale(var(--ds-press-scale, .97))}.banner .actions{display:flex;gap:var(--space-2)}.banner .actions:empty{display:none}.banner.layout-stacked{flex-wrap:wrap;align-items:flex-start}.banner.layout-stacked .actions{flex-basis:100%;margin-top:var(--space-2);padding-left:calc(var(--icon-lg) + var(--space-3))}.banner.layout-row{align-items:center}.banner.layout-row .body{flex:1;min-width:0}.banner.layout-row .actions{flex-shrink:0}.banner.compact{align-items:center;--_banner-pad-y: var(--ds-banner-pad-y, var(--space-2));--_banner-pad-x: var(--ds-banner-pad-x, var(--space-3))}.banner.compact .title{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap}\n"] }]
76
+ }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dismissible: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissible", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], accentRail: [{ type: i0.Input, args: [{ isSignal: true, alias: "accentRail", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], noRail: [{
77
+ type: HostBinding,
78
+ args: ['class.no-rail']
79
+ }], announce: [{ type: i0.Input, args: [{ isSignal: true, alias: "announce", required: false }] }], ariaRole: [{
80
+ type: HostBinding,
81
+ args: ['attr.role']
82
+ }], ariaLive: [{
83
+ type: HostBinding,
84
+ args: ['attr.aria-live']
85
+ }] } });
86
+
87
+ /**
88
+ * Generated bundle index. Do not edit.
89
+ */
90
+
91
+ export { BannerComponent };
92
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-banner.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-banner.mjs","sources":["../../../src/lib/components/banner/banner.component.ts","../../../src/lib/components/banner/banner.component.html","../../../src/lib/components/banner/ids-group-ltd-ids-design-system-components-banner.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n output,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport type { BannerVariant } from './banner.types';\n\n@Component({\n selector: 'ds-banner',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './banner.component.html',\n styleUrl: './banner.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BannerComponent {\n /** Severity — drives colour, the default icon and the ARIA role/live. */\n readonly variant = input<BannerVariant>('info');\n /** Optional bold heading above the message. */\n readonly title = input<string>('');\n /** Show a close button that emits `closed`. */\n readonly dismissible = input(false, { transform: booleanAttribute });\n /** Override the variant's default icon. */\n readonly icon = input<IconName | null>(null);\n /** Tighter padding, centred items, single-line title. */\n readonly compact = input(false, { transform: booleanAttribute });\n /** `'stacked'` wraps actions onto their own line; `'row'` keeps them inline. */\n readonly layout = input<'stacked' | 'row'>('stacked');\n /** Coloured accent rail on the leading edge; set false to hide it. */\n readonly accentRail = input(true, { transform: booleanAttribute });\n /** Fires when the user dismisses the banner. */\n readonly closed = output<void>();\n\n @HostBinding('class.no-rail')\n protected get noRail(): boolean {\n return !this.accentRail();\n }\n\n /** Announce this banner to a screen reader when it appears.\n *\n * Off by default: an `alert` region fires on INSERTION, so a banner that is page\n * furniture would interrupt the reader on every route into the page. Turn it on for\n * one the app raises in response to an event; for anything transient prefer\n * `ToastService`, which owns a live region built for the purpose. */\n readonly announce = input(false, { transform: booleanAttribute });\n\n @HostBinding('attr.role')\n protected get ariaRole(): 'alert' | 'status' | null {\n if (!this.announce()) {\n return null;\n }\n const value = this.variant();\n\n return value === 'error' || value === 'warning' || value === 'severe'\n ? 'alert'\n : 'status';\n }\n\n @HostBinding('attr.aria-live')\n protected get ariaLive(): 'assertive' | 'polite' | null {\n if (!this.announce()) {\n return null;\n }\n\n return this.ariaRole === 'alert' ? 'assertive' : 'polite';\n }\n\n protected readonly classes = computed(() => {\n const parts = ['banner', this.variant(), `layout-${this.layout()}`];\n if (this.compact()) {\n parts.push('compact');\n }\n\n return parts.join(' ');\n });\n\n protected readonly defaultIcon = computed<IconName>(() => {\n const variant = this.variant();\n if (variant === 'success') {\n return 'success';\n }\n if (variant === 'warning' || variant === 'severe') {\n return 'warn';\n }\n if (variant === 'error') {\n return 'error';\n }\n\n return 'info';\n });\n\n protected onDismiss(): void {\n this.closed.emit();\n }\n}\n","<div [class]=\"classes()\">\n <ds-icon\n class=\"icon\"\n [name]=\"icon() ?? defaultIcon()\"\n [size]=\"20\"\n >\n </ds-icon>\n\n <div class=\"body\">\n @if (title()) {\n <div class=\"title\">\n {{ title() }}\n </div>\n }\n\n <!-- Wrapped so `:empty` can answer \"is there a body?\" — projected content is\n usually a bare text node, which no selector can otherwise tell from\n nothing at all. -->\n <span class=\"text\">\n <ng-content></ng-content>\n </span>\n </div>\n\n <div class=\"actions\">\n <ng-content select=\"[actions]\"></ng-content>\n </div>\n\n @if (dismissible()) {\n <button\n class=\"close\"\n type=\"button\"\n aria-label=\"Dismiss\"\n (click)=\"onDismiss()\"\n >\n <ds-icon\n name=\"x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A,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED1BY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAR3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,u4BAAA,EAAA,MAAA,EAAA,CAAA,qkIAAA,CAAA,EAAA;;sBAoBxC,WAAW;uBAAC,eAAe;;sBAa3B,WAAW;uBAAC,WAAW;;sBAYvB,WAAW;uBAAC,gBAAgB;;;AEhE/B;;AAEG;;;;"}
@@ -0,0 +1,204 @@
1
+ import * as i0 from '@angular/core';
2
+ import { model, input, output, inject, DOCUMENT, viewChild, signal, computed, effect, ViewEncapsulation, Component } from '@angular/core';
3
+ import * as i1 from '@angular/cdk/a11y';
4
+ import { A11yModule } from '@angular/cdk/a11y';
5
+ import { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';
6
+ import { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';
7
+
8
+ let nextId = 0;
9
+ /** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim
10
+ * tap, Escape, or a downward drag on the grab strip. While open it locks
11
+ * body scroll. On wide viewports the panel is capped by
12
+ * --ds-bottom-sheet-maxw and centred; prefer ds-modal / ds-drawer for
13
+ * desktop-first layouts. position: fixed resolves against the nearest
14
+ * ancestor containing block, so framed hosts contain the sheet. */
15
+ class BottomSheetComponent {
16
+ /** Open state, two-way bound. */
17
+ open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
18
+ /** Sheet title, shown in the header and used for `aria-labelledby`. */
19
+ title = input.required(...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
20
+ /** Fires once the close (leave) animation finishes. */
21
+ closed = output();
22
+ titleId = `ds-bottom-sheet-title-${++nextId}`;
23
+ /**
24
+ * Snap-point heights as fractions of viewport height (0–1), ascending.
25
+ * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;
26
+ * dragging snaps to the nearest point; dragging below the lowest closes.
27
+ * When empty (default) the original single-height behavior is preserved.
28
+ */
29
+ snapPoints = input([], ...(ngDevMode ? [{ debugName: "snapPoints" }] : /* istanbul ignore next */ []));
30
+ doc = inject(DOCUMENT);
31
+ scrollLock = inject(BodyScrollLockService);
32
+ sheetRef = viewChild('sheet', ...(ngDevMode ? [{ debugName: "sheetRef" }] : /* istanbul ignore next */ []));
33
+ dragOffset = signal(null, ...(ngDevMode ? [{ debugName: "dragOffset" }] : /* istanbul ignore next */ []));
34
+ /** Sheet is in the DOM (kept true through the leave animation). */
35
+ rendered = signal(false, ...(ngDevMode ? [{ debugName: "rendered" }] : /* istanbul ignore next */ []));
36
+ /** Playing the slide-down + scrim-fade leave animation. */
37
+ closing = signal(false, ...(ngDevMode ? [{ debugName: "closing" }] : /* istanbul ignore next */ []));
38
+ /** Index of the currently active snap point (only used when snapPoints is non-empty). */
39
+ activeSnapIndex = signal(0, ...(ngDevMode ? [{ debugName: "activeSnapIndex" }] : /* istanbul ignore next */ []));
40
+ /** CSS height string derived from the active snap point, or null when snapPoints is empty. */
41
+ snapHeight = computed(() => {
42
+ const points = this.snapPoints();
43
+ if (points.length === 0) {
44
+ return null;
45
+ }
46
+ const index = Math.min(this.activeSnapIndex(), points.length - 1);
47
+ return `${points[index] * 100}vh`;
48
+ }, ...(ngDevMode ? [{ debugName: "snapHeight" }] : /* istanbul ignore next */ []));
49
+ dragStartY = 0;
50
+ lastMoveY = 0;
51
+ lastMoveTime = 0;
52
+ velocity = 0;
53
+ wasOpen = false;
54
+ closeFallbackTimer = null;
55
+ constructor() {
56
+ // open → DOM lifecycle. Opening renders immediately; closing keeps the
57
+ // sheet mounted and flips `closing` so the leave animation can play —
58
+ // teardown happens in onLeaveEnd() once animationend fires.
59
+ effect(() => {
60
+ const isOpen = this.open();
61
+ if (isOpen) {
62
+ this.closing.set(false);
63
+ this.rendered.set(true);
64
+ clearTimeout(this.closeFallbackTimer ?? undefined);
65
+ this.closeFallbackTimer = null;
66
+ if (this.snapPoints().length > 0) {
67
+ this.activeSnapIndex.set(0);
68
+ }
69
+ }
70
+ else if (this.wasOpen) {
71
+ this.closing.set(true);
72
+ // Chrome freezes CSS animations on a backgrounded tab, so animationend
73
+ // may never fire — this synthetic fallback guarantees teardown anyway.
74
+ clearTimeout(this.closeFallbackTimer ?? undefined);
75
+ this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);
76
+ }
77
+ this.wasOpen = isOpen;
78
+ });
79
+ // Ref-counted body-scroll lock, shared with modal/drawer so stacked
80
+ // overlays don't unlock each other. The cleanup fires on the rendered→false
81
+ // transition and on destroy, keeping lock/unlock paired.
82
+ effect((onCleanup) => {
83
+ if (!this.rendered()) {
84
+ return;
85
+ }
86
+ this.scrollLock.lock();
87
+ onCleanup(() => this.scrollLock.unlock());
88
+ });
89
+ }
90
+ ngOnDestroy() {
91
+ clearTimeout(this.closeFallbackTimer ?? undefined);
92
+ this.closeFallbackTimer = null;
93
+ }
94
+ close() {
95
+ this.dragOffset.set(null);
96
+ this.open.set(false);
97
+ }
98
+ onLeaveEnd(event) {
99
+ // The animated element is the one with the handler, so its OWN animationend is
100
+ // the signal; anything bubbling from inside is not. This replaces matching the
101
+ // keyframes NAME, which is what made the exit un-overridable.
102
+ if (event.target !== event.currentTarget) {
103
+ return;
104
+ }
105
+ this.finishClose();
106
+ }
107
+ finishClose() {
108
+ if (!this.closing()) {
109
+ return;
110
+ }
111
+ clearTimeout(this.closeFallbackTimer ?? undefined);
112
+ this.closeFallbackTimer = null;
113
+ this.closing.set(false);
114
+ this.rendered.set(false);
115
+ this.closed.emit();
116
+ }
117
+ onEscape() {
118
+ if (this.open()) {
119
+ this.close();
120
+ }
121
+ }
122
+ backdropPress = backdropDismiss();
123
+ onBackdropRelease(event) {
124
+ if (this.backdropPress.shouldDismiss(event)) {
125
+ this.close();
126
+ }
127
+ }
128
+ onGrabStart(event) {
129
+ event.target.setPointerCapture(event.pointerId);
130
+ this.dragStartY = event.clientY;
131
+ this.lastMoveY = event.clientY;
132
+ this.lastMoveTime = event.timeStamp;
133
+ this.velocity = 0;
134
+ this.dragOffset.set(0);
135
+ }
136
+ onGrabMove(event) {
137
+ if (this.dragOffset() === null) {
138
+ return;
139
+ }
140
+ const deltaTime = event.timeStamp - this.lastMoveTime;
141
+ if (deltaTime > 0) {
142
+ this.velocity = (event.clientY - this.lastMoveY) / deltaTime;
143
+ }
144
+ this.lastMoveY = event.clientY;
145
+ this.lastMoveTime = event.timeStamp;
146
+ this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));
147
+ }
148
+ onGrabEnd() {
149
+ const offset = this.dragOffset();
150
+ if (offset === null) {
151
+ return;
152
+ }
153
+ const points = this.snapPoints();
154
+ if (points.length === 0) {
155
+ // Original single-height behavior.
156
+ const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;
157
+ const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;
158
+ const flicked = this.velocity > 0.5;
159
+ if (pastThreshold || flicked) {
160
+ this.close();
161
+ }
162
+ else {
163
+ this.dragOffset.set(null);
164
+ }
165
+ return;
166
+ }
167
+ // Snap-point behavior: determine which snap point to land on.
168
+ const viewportHeight = this.doc.defaultView?.innerHeight ?? window.innerHeight;
169
+ const currentIndex = this.activeSnapIndex();
170
+ const currentHeightPx = points[currentIndex] * viewportHeight;
171
+ // Positive offset = dragged downward.
172
+ const targetHeightPx = currentHeightPx - offset;
173
+ const flicked = this.velocity > 0.5;
174
+ if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {
175
+ // Dragged below lowest snap point or flicked down → close.
176
+ this.close();
177
+ return;
178
+ }
179
+ let nearestIndex = 0;
180
+ let smallestDelta = Infinity;
181
+ for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {
182
+ const delta = Math.abs(points[pointIndex] * viewportHeight - targetHeightPx);
183
+ if (delta < smallestDelta) {
184
+ smallestDelta = delta;
185
+ nearestIndex = pointIndex;
186
+ }
187
+ }
188
+ this.dragOffset.set(null);
189
+ this.activeSnapIndex.set(nearestIndex);
190
+ }
191
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
192
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BottomSheetComponent, isStandalone: true, selector: "ds-bottom-sheet", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, snapPoints: { classPropertyName: "snapPoints", publicName: "snapPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, viewQueries: [{ propertyName: "sheetRef", first: true, predicate: ["sheet"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\"\n >\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-maxw));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-maxh);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] });
193
+ }
194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BottomSheetComponent, decorators: [{
195
+ type: Component,
196
+ args: [{ selector: 'ds-bottom-sheet', standalone: true, imports: [A11yModule], encapsulation: ViewEncapsulation.Emulated, template: "@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\"\n >\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n", styles: [":host{--_bottom-sheet-maxw: var(--ds-bottom-sheet-maxw, 480px);--_bottom-sheet-maxh: var(--ds-bottom-sheet-maxh, 80%);--_bottom-sheet-radius: var(--ds-bottom-sheet-radius, var(--ds-radius-panel));--_bottom-sheet-bg-color: var(--ds-bottom-sheet-bg-color, var(--surface-default));--_bottom-sheet-scrim-color: var(--ds-bottom-sheet-scrim-color, var(--surface-scrim));--_bottom-sheet-title-text-color: var(--ds-bottom-sheet-title-text-color, var(--text-primary));--_bottom-sheet-enter-keyframes: var(--ds-bottom-sheet-enter-keyframes, ds-slide-edge-in);--_bottom-sheet-leave-keyframes: var(--ds-bottom-sheet-leave-keyframes, ds-slide-edge-out);--_bottom-sheet-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-surface-duration));--_bottom-sheet-enter-easing: var(--ds-bottom-sheet-enter-easing, var(--ds-motion-enter-surface-easing));--_bottom-sheet-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-large-duration));--_bottom-sheet-leave-easing: var(--ds-bottom-sheet-leave-easing, var(--ds-motion-exit-large-easing));--_bottom-sheet-scrim-enter-duration: var(--ds-bottom-sheet-enter-duration, var(--ds-motion-enter-panel-duration));--_bottom-sheet-scrim-leave-duration: var(--ds-bottom-sheet-leave-duration, var(--ds-motion-exit-duration));--_ds-enter-scale: var(--ds-bottom-sheet-enter-scale, .96);display:contents}@media(prefers-reduced-motion:reduce){:host{--_bottom-sheet-enter-duration: 0ms;--_bottom-sheet-leave-duration: 0ms;--_bottom-sheet-scrim-enter-duration: 0ms;--_bottom-sheet-scrim-leave-duration: 0ms}}.sheet-overlay{position:fixed;inset:0;z-index:var(--layer-modal);background:var(--_bottom-sheet-scrim-color);display:flex;flex-direction:column;justify-content:flex-end;overflow:clip;animation-name:ds-fade-in;animation-duration:var(--_bottom-sheet-scrim-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing)}.sheet-overlay.closing{animation-name:ds-fade-out;animation-duration:var(--_bottom-sheet-scrim-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.sheet{--_ds-enter-y: 100%;position:relative;width:min(100%,var(--_bottom-sheet-maxw));margin-inline:auto;background:var(--_bottom-sheet-bg-color);border-radius:var(--_bottom-sheet-radius) var(--_bottom-sheet-radius) 0 0;padding:0 var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom,0px));animation-name:var(--_bottom-sheet-enter-keyframes);animation-duration:var(--_bottom-sheet-enter-duration);animation-timing-function:var(--_bottom-sheet-enter-easing);max-height:var(--_bottom-sheet-maxh);display:flex;flex-direction:column;transition:transform var(--duration-base) var(--ease-decelerate)}.sheet.dragging{transition:none}.sheet.snapping{transition:transform var(--duration-base) var(--ease-decelerate),height var(--duration-base) var(--ease-decelerate)}@media(prefers-reduced-motion:reduce){.sheet.snapping{transition:none}}.sheet.closing{animation-name:var(--_bottom-sheet-leave-keyframes);animation-duration:var(--_bottom-sheet-leave-duration);animation-timing-function:var(--_bottom-sheet-leave-easing);animation-fill-mode:forwards}.grab{padding:var(--space-3) 0;margin:0 calc(var(--space-4) * -1);cursor:grab;touch-action:none}.sheet-handle{width:var(--bottom-sheet-handle-w);height:var(--bottom-sheet-handle-h);background:var(--border-strong);border-radius:var(--radius-pill);margin:0 auto}.sheet-title{font:var(--font-weight-semibold) var(--font-size-l)/var(--line-height-snug) var(--font-sans);color:var(--_bottom-sheet-title-text-color);margin:0 0 var(--space-3)}.sheet-body{display:flex;flex-direction:column;gap:var(--space-2);overflow-y:auto;min-height:0;padding:var(--space-1);margin:calc(var(--space-1) * -1)}.sheet-actions{display:flex;flex-direction:column;gap:var(--space-2)}.sheet-actions:not(:empty){margin-top:var(--space-3)}\n"] }]
197
+ }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], closed: [{ type: i0.Output, args: ["closed"] }], snapPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "snapPoints", required: false }] }], sheetRef: [{ type: i0.ViewChild, args: ['sheet', { isSignal: true }] }] } });
198
+
199
+ /**
200
+ * Generated bundle index. Do not edit.
201
+ */
202
+
203
+ export { BottomSheetComponent };
204
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-bottom-sheet.mjs","sources":["../../../src/lib/components/bottom-sheet/bottom-sheet.component.ts","../../../src/lib/components/bottom-sheet/bottom-sheet.component.html","../../../src/lib/components/bottom-sheet/ids-group-ltd-ids-design-system-components-bottom-sheet.ts"],"sourcesContent":["import {\n Component,\n DOCUMENT,\n ElementRef,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BodyScrollLockService } from '@ids-group-ltd/ids-design-system/overlay';\nimport { backdropDismiss } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n/** Bottom-anchored sheet — the mobile sibling of ds-drawer. Closes on scrim\n * tap, Escape, or a downward drag on the grab strip. While open it locks\n * body scroll. On wide viewports the panel is capped by\n * --ds-bottom-sheet-maxw and centred; prefer ds-modal / ds-drawer for\n * desktop-first layouts. position: fixed resolves against the nearest\n * ancestor containing block, so framed hosts contain the sheet. */\n@Component({\n selector: 'ds-bottom-sheet',\n standalone: true,\n imports: [A11yModule],\n templateUrl: './bottom-sheet.component.html',\n styleUrl: './bottom-sheet.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BottomSheetComponent implements OnDestroy {\n /** Open state, two-way bound. */\n readonly open = model<boolean>(false);\n /** Sheet title, shown in the header and used for `aria-labelledby`. */\n readonly title = input.required<string>();\n /** Fires once the close (leave) animation finishes. */\n readonly closed = output<void>();\n\n protected readonly titleId = `ds-bottom-sheet-title-${++nextId}`;\n /**\n * Snap-point heights as fractions of viewport height (0–1), ascending.\n * e.g. [0.4, 0.9]. When provided the sheet opens at the first snap point;\n * dragging snaps to the nearest point; dragging below the lowest closes.\n * When empty (default) the original single-height behavior is preserved.\n */\n readonly snapPoints = input<readonly number[]>([]);\n\n private readonly doc = inject(DOCUMENT);\n private readonly scrollLock = inject(BodyScrollLockService);\n private readonly sheetRef = viewChild<ElementRef<HTMLElement>>('sheet');\n\n protected readonly dragOffset = signal<number | null>(null);\n /** Sheet is in the DOM (kept true through the leave animation). */\n protected readonly rendered = signal(false);\n /** Playing the slide-down + scrim-fade leave animation. */\n protected readonly closing = signal(false);\n /** Index of the currently active snap point (only used when snapPoints is non-empty). */\n protected readonly activeSnapIndex = signal(0);\n\n /** CSS height string derived from the active snap point, or null when snapPoints is empty. */\n protected readonly snapHeight = computed(() => {\n const points = this.snapPoints();\n if (points.length === 0) {\n return null;\n }\n const index = Math.min(this.activeSnapIndex(), points.length - 1);\n\n return `${points[index] * 100}vh`;\n });\n\n private dragStartY = 0;\n private lastMoveY = 0;\n private lastMoveTime = 0;\n private velocity = 0;\n private wasOpen = false;\n private closeFallbackTimer: ReturnType<typeof setTimeout> | null = null;\n\n constructor() {\n // open → DOM lifecycle. Opening renders immediately; closing keeps the\n // sheet mounted and flips `closing` so the leave animation can play —\n // teardown happens in onLeaveEnd() once animationend fires.\n effect(() => {\n const isOpen = this.open();\n if (isOpen) {\n this.closing.set(false);\n this.rendered.set(true);\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n if (this.snapPoints().length > 0) {\n this.activeSnapIndex.set(0);\n }\n } else if (this.wasOpen) {\n this.closing.set(true);\n // Chrome freezes CSS animations on a backgrounded tab, so animationend\n // may never fire — this synthetic fallback guarantees teardown anyway.\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = setTimeout(() => this.finishClose(), 300);\n }\n this.wasOpen = isOpen;\n });\n\n // Ref-counted body-scroll lock, shared with modal/drawer so stacked\n // overlays don't unlock each other. The cleanup fires on the rendered→false\n // transition and on destroy, keeping lock/unlock paired.\n effect((onCleanup) => {\n if (!this.rendered()) {\n return;\n }\n this.scrollLock.lock();\n onCleanup(() => this.scrollLock.unlock());\n });\n }\n\n ngOnDestroy(): void {\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n }\n\n protected close(): void {\n this.dragOffset.set(null);\n this.open.set(false);\n }\n\n protected onLeaveEnd(event: AnimationEvent): void {\n // The animated element is the one with the handler, so its OWN animationend is\n // the signal; anything bubbling from inside is not. This replaces matching the\n // keyframes NAME, which is what made the exit un-overridable.\n if (event.target !== event.currentTarget) {\n return;\n }\n this.finishClose();\n }\n\n private finishClose(): void {\n if (!this.closing()) {\n return;\n }\n clearTimeout(this.closeFallbackTimer ?? undefined);\n this.closeFallbackTimer = null;\n this.closing.set(false);\n this.rendered.set(false);\n this.closed.emit();\n }\n\n protected onEscape(): void {\n if (this.open()) {\n this.close();\n }\n }\n\n protected readonly backdropPress = backdropDismiss();\n\n protected onBackdropRelease(event: PointerEvent): void {\n if (this.backdropPress.shouldDismiss(event)) {\n this.close();\n }\n }\n\n protected onGrabStart(event: PointerEvent): void {\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n this.dragStartY = event.clientY;\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.velocity = 0;\n this.dragOffset.set(0);\n }\n\n protected onGrabMove(event: PointerEvent): void {\n if (this.dragOffset() === null) {\n return;\n }\n const deltaTime = event.timeStamp - this.lastMoveTime;\n if (deltaTime > 0) {\n this.velocity = (event.clientY - this.lastMoveY) / deltaTime;\n }\n this.lastMoveY = event.clientY;\n this.lastMoveTime = event.timeStamp;\n this.dragOffset.set(Math.max(0, event.clientY - this.dragStartY));\n }\n\n protected onGrabEnd(): void {\n const offset = this.dragOffset();\n if (offset === null) {\n return;\n }\n\n const points = this.snapPoints();\n\n if (points.length === 0) {\n // Original single-height behavior.\n const sheetHeight = this.sheetRef()?.nativeElement.offsetHeight ?? 0;\n const pastThreshold = sheetHeight > 0 && offset > sheetHeight * 0.3;\n const flicked = this.velocity > 0.5;\n if (pastThreshold || flicked) {\n this.close();\n } else {\n this.dragOffset.set(null);\n }\n\n return;\n }\n\n // Snap-point behavior: determine which snap point to land on.\n const viewportHeight =\n this.doc.defaultView?.innerHeight ?? window.innerHeight;\n const currentIndex = this.activeSnapIndex();\n const currentHeightPx = points[currentIndex] * viewportHeight;\n // Positive offset = dragged downward.\n const targetHeightPx = currentHeightPx - offset;\n const flicked = this.velocity > 0.5;\n\n if (flicked || targetHeightPx < points[0] * viewportHeight * 0.7) {\n // Dragged below lowest snap point or flicked down → close.\n this.close();\n\n return;\n }\n\n let nearestIndex = 0;\n let smallestDelta = Infinity;\n for (let pointIndex = 0; pointIndex < points.length; pointIndex++) {\n const delta = Math.abs(\n points[pointIndex] * viewportHeight - targetHeightPx,\n );\n if (delta < smallestDelta) {\n smallestDelta = delta;\n nearestIndex = pointIndex;\n }\n }\n\n this.dragOffset.set(null);\n this.activeSnapIndex.set(nearestIndex);\n }\n}\n","@if (rendered()) {\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- backdrop; keyboard dismissal is (keydown.escape) on this element, a backdrop isn't a tabbable control -->\n <div\n class=\"sheet-overlay\"\n [class.closing]=\"closing()\"\n (pointerdown)=\"backdropPress.down($event)\"\n (pointerup)=\"onBackdropRelease($event)\"\n (keydown.escape)=\"onEscape()\"\n >\n <div\n #sheet\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n class=\"sheet\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"title() ? titleId : null\"\n [class.dragging]=\"dragOffset() !== null\"\n [class.closing]=\"closing()\"\n [class.snapping]=\"snapPoints().length > 0 && dragOffset() === null\"\n [style.transform]=\"\n dragOffset() ? 'translateY(' + dragOffset() + 'px)' : null\n \"\n [style.height]=\"snapHeight()\"\n [style.maxHeight]=\"snapHeight() ? snapHeight() : null\"\n (animationend)=\"onLeaveEnd($event)\"\n >\n <div\n class=\"grab\"\n (pointerdown)=\"onGrabStart($event)\"\n (pointermove)=\"onGrabMove($event)\"\n (pointerup)=\"onGrabEnd()\"\n (pointercancel)=\"onGrabEnd()\"\n >\n <div class=\"sheet-handle\"></div>\n </div>\n\n @if (title()) {\n <h3\n class=\"sheet-title\"\n [id]=\"titleId\"\n >\n {{ title() }}\n </h3>\n }\n\n <div class=\"sheet-body\">\n <ng-content />\n </div>\n\n <div class=\"sheet-actions\">\n <ng-content select=\"[actions]\" />\n </div>\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAmBA,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;AAKmE;MAStD,oBAAoB,CAAA;;AAEtB,IAAA,IAAI,GAAG,KAAK,CAAU,KAAK,2EAAC;;AAE5B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;IAEhC,MAAM,GAAG,MAAM,EAAQ;AAEb,IAAA,OAAO,GAAG,CAAA,sBAAA,EAAyB,EAAE,MAAM,EAAE;AAChE;;;;;AAKG;AACM,IAAA,UAAU,GAAG,KAAK,CAAoB,EAAE,iFAAC;AAEjC,IAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC1C,IAAA,QAAQ,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A,EAAA,IAAA,EAAA,YAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECnCjC,ypDAwDA,EAAA,MAAA,EAAA,CAAA,oxHAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED1BY,UAAU,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,yBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKT,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,CAAC,EAAA,aAAA,EAGN,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,ypDAAA,EAAA,MAAA,EAAA,CAAA,oxHAAA,CAAA,EAAA;idAqBsB,OAAO,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtDxE;;AAEG;;;;"}
@@ -0,0 +1,100 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, Injectable, inject, input, numberAttribute, output, computed, ViewEncapsulation, Component } from '@angular/core';
3
+ import { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';
4
+ import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
5
+
6
+ /**
7
+ * Library-level breadcrumb state. Apps push items either programmatically
8
+ * (page constructor / effect) or via a router-data driver (see app docs).
9
+ * `<ds-breadcrumbs>` reads from here when no `[items]` input is provided.
10
+ */
11
+ class BreadcrumbsService {
12
+ _items = signal([], ...(ngDevMode ? [{ debugName: "_items" }] : /* istanbul ignore next */ []));
13
+ items = this._items.asReadonly();
14
+ set(items) {
15
+ this._items.set(items);
16
+ }
17
+ push(item) {
18
+ this._items.update((arr) => [...arr, item]);
19
+ }
20
+ pop() {
21
+ this._items.update((arr) => arr.slice(0, -1));
22
+ }
23
+ replaceLast(item) {
24
+ this._items.update((arr) => arr.length ? [...arr.slice(0, -1), item] : [item]);
25
+ }
26
+ clear() {
27
+ this._items.set([]);
28
+ }
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
30
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsService, providedIn: 'root' });
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsService, decorators: [{
33
+ type: Injectable,
34
+ args: [{ providedIn: 'root' }]
35
+ }] });
36
+
37
+ class BreadcrumbsComponent {
38
+ cfg = inject(DS_CONFIG);
39
+ svc = inject(BreadcrumbsService);
40
+ /**
41
+ * When omitted, the component reads from `BreadcrumbsService.items`.
42
+ * Pass an explicit array to opt out of the service (per-page override).
43
+ */
44
+ items = input(null, ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
45
+ /** Icon between crumbs; falls back to `DS_CONFIG.breadcrumbs.separator`, then `chevronRight`. */
46
+ separator = input(null, ...(ngDevMode ? [{ debugName: "separator" }] : /* istanbul ignore next */ []));
47
+ /** Whether crumbs render as links; falls back to `DS_CONFIG.breadcrumbs.clickable`, then `true`. */
48
+ clickable = input(null, ...(ngDevMode ? [{ debugName: "clickable" }] : /* istanbul ignore next */ []));
49
+ /**
50
+ * Caps how many crumbs render, collapsing the middle into an ellipsis — the
51
+ * first and the LAST always survive. Null (default) renders every crumb.
52
+ *
53
+ * Worth setting on any trail that can get deep: the row is `nowrap` with
54
+ * `overflow: hidden`, so without a cap an overlong trail is clipped from the
55
+ * END, which is the current page — the one crumb the reader needs most.
56
+ */
57
+ maxItems = input(null, { ...(ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {}), transform: (raw) => (raw == null ? null : numberAttribute(raw)) });
58
+ /** Fires when a clickable crumb with `href` is activated; default navigation is always prevented. */
59
+ navigate = output();
60
+ allItems = computed(() => this.items() ?? this.svc.items(), ...(ngDevMode ? [{ debugName: "allItems" }] : /* istanbul ignore next */ []));
61
+ /**
62
+ * What renders. The collapsed crumb carries no `href`, so it is inert rather
63
+ * than a link to nowhere; its label is the count, which tells the reader how
64
+ * much is hidden instead of just that something is.
65
+ */
66
+ resolvedItems = computed(() => {
67
+ const items = this.allItems();
68
+ const max = this.maxItems();
69
+ if (!max || max < 2 || items.length <= max) {
70
+ return items;
71
+ }
72
+ // max - 2, not max - 1: the collapsed crumb occupies one of the slots too,
73
+ // so counting only the first would render one crumb more than asked for.
74
+ const tail = items.slice(items.length - (max - 2));
75
+ return [items[0], { label: `… ${items.length - max + 1} more` }, ...tail];
76
+ }, ...(ngDevMode ? [{ debugName: "resolvedItems" }] : /* istanbul ignore next */ []));
77
+ effectiveSeparator = computed(() => this.separator() ?? this.cfg.breadcrumbs?.separator ?? 'chevronRight', ...(ngDevMode ? [{ debugName: "effectiveSeparator" }] : /* istanbul ignore next */ []));
78
+ effectiveClickable = computed(() => this.clickable() ?? this.cfg.breadcrumbs?.clickable ?? true, ...(ngDevMode ? [{ debugName: "effectiveClickable" }] : /* istanbul ignore next */ []));
79
+ onNav(event, item) {
80
+ if (!item.href || !this.effectiveClickable()) {
81
+ event.preventDefault();
82
+ return;
83
+ }
84
+ event.preventDefault();
85
+ this.navigate.emit(item);
86
+ }
87
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
88
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BreadcrumbsComponent, isStandalone: true, selector: "ds-breadcrumbs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, separator: { classPropertyName: "separator", publicName: "separator", isSignal: true, isRequired: false, transformFunction: null }, clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate" }, ngImport: i0, template: "<nav\n class=\"breadcrumbs\"\n aria-label=\"Breadcrumb\"\n [class.is-static]=\"!effectiveClickable()\"\n>\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n (click)=\"onNav($event, item)\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-current]=\"last ? 'page' : null\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\"\n >\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\"\n />\n </span>\n }\n }\n</nav>\n", styles: [":host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-focus-shadow: var(--ds-breadcrumbs-focus-shadow, var(--ds-control-focus-shadow));display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a:focus-visible{outline:none;box-shadow:var(--_breadcrumbs-focus-shadow);border-radius:var(--radius-sm)}.breadcrumbs.is-static a,.breadcrumbs.is-static .current{cursor:default}.breadcrumbs .sep{color:var(--_breadcrumbs-separator-icon-color);display:inline-flex;align-items:center}.breadcrumbs .current{color:var(--_breadcrumbs-current-label-color);font-weight:var(--font-weight-bold)}.breadcrumbs .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;max-width:16ch}.breadcrumbs .current .label{max-width:32ch}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
89
+ }
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BreadcrumbsComponent, decorators: [{
91
+ type: Component,
92
+ args: [{ selector: 'ds-breadcrumbs', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<nav\n class=\"breadcrumbs\"\n aria-label=\"Breadcrumb\"\n [class.is-static]=\"!effectiveClickable()\"\n>\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n (click)=\"onNav($event, item)\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-current]=\"last ? 'page' : null\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\"\n >\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\"\n />\n </span>\n }\n }\n</nav>\n", styles: [":host{--_breadcrumbs-label-color: var(--ds-breadcrumbs-label-color, var(--text-tertiary));--_breadcrumbs-label-color-hover: var(--ds-breadcrumbs-label-color-hover, var(--accent));--_breadcrumbs-separator-icon-color: var(--ds-breadcrumbs-separator-icon-color, var(--icon-muted));--_breadcrumbs-current-label-color: var(--ds-breadcrumbs-current-label-color, var(--text-primary));--_breadcrumbs-focus-shadow: var(--ds-breadcrumbs-focus-shadow, var(--ds-control-focus-shadow));display:inline-flex;min-width:0;max-width:100%}.breadcrumbs{display:inline-flex;align-items:center;gap:var(--space-2);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_breadcrumbs-label-color);min-width:0;max-width:100%;flex-wrap:nowrap;overflow:hidden}.breadcrumbs a,.breadcrumbs .current{display:inline-flex;align-items:center;gap:var(--space-1)}.breadcrumbs a{color:var(--_breadcrumbs-label-color);text-decoration:none;cursor:pointer;transition:color var(--duration-fast) var(--ease-standard)}.breadcrumbs a:hover{color:var(--_breadcrumbs-label-color-hover);text-decoration:underline;text-underline-offset:var(--breadcrumbs-link-uloff)}.breadcrumbs a:focus-visible{outline:none;box-shadow:var(--_breadcrumbs-focus-shadow);border-radius:var(--radius-sm)}.breadcrumbs.is-static a,.breadcrumbs.is-static .current{cursor:default}.breadcrumbs .sep{color:var(--_breadcrumbs-separator-icon-color);display:inline-flex;align-items:center}.breadcrumbs .current{color:var(--_breadcrumbs-current-label-color);font-weight:var(--font-weight-bold)}.breadcrumbs .label{overflow:clip;overflow-clip-margin:var(--space-1);text-overflow:ellipsis;white-space:nowrap;max-width:16ch}.breadcrumbs .current .label{max-width:32ch}\n"] }]
93
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], separator: [{ type: i0.Input, args: [{ isSignal: true, alias: "separator", required: false }] }], clickable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clickable", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }] } });
94
+
95
+ /**
96
+ * Generated bundle index. Do not edit.
97
+ */
98
+
99
+ export { BreadcrumbsComponent, BreadcrumbsService };
100
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-breadcrumbs.mjs","sources":["../../../src/lib/components/breadcrumbs/breadcrumbs.service.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.ts","../../../src/lib/components/breadcrumbs/breadcrumbs.component.html","../../../src/lib/components/breadcrumbs/ids-group-ltd-ids-design-system-components-breadcrumbs.ts"],"sourcesContent":["import { Injectable, type Signal, signal } from '@angular/core';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\n/**\n * Library-level breadcrumb state. Apps push items either programmatically\n * (page constructor / effect) or via a router-data driver (see app docs).\n * `<ds-breadcrumbs>` reads from here when no `[items]` input is provided.\n */\n@Injectable({ providedIn: 'root' })\nexport class BreadcrumbsService {\n private readonly _items = signal<BreadcrumbItem[]>([]);\n readonly items: Signal<BreadcrumbItem[]> = this._items.asReadonly();\n\n set(items: BreadcrumbItem[]): void {\n this._items.set(items);\n }\n\n push(item: BreadcrumbItem): void {\n this._items.update((arr) => [...arr, item]);\n }\n\n pop(): void {\n this._items.update((arr) => arr.slice(0, -1));\n }\n\n replaceLast(item: BreadcrumbItem): void {\n this._items.update((arr) =>\n arr.length ? [...arr.slice(0, -1), item] : [item],\n );\n }\n\n clear(): void {\n this._items.set([]);\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\n numberAttribute,\n output,\n} from '@angular/core';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport type { IconName } from '@ids-group-ltd/ids-design-system/core';\nimport { BreadcrumbsService } from './breadcrumbs.service';\nimport type { BreadcrumbItem } from './breadcrumbs.types';\n\n@Component({\n selector: 'ds-breadcrumbs',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './breadcrumbs.component.html',\n styleUrl: './breadcrumbs.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class BreadcrumbsComponent {\n private readonly cfg = inject(DS_CONFIG);\n private readonly svc = inject(BreadcrumbsService);\n\n /**\n * When omitted, the component reads from `BreadcrumbsService.items`.\n * Pass an explicit array to opt out of the service (per-page override).\n */\n readonly items = input<BreadcrumbItem[] | null>(null);\n /** Icon between crumbs; falls back to `DS_CONFIG.breadcrumbs.separator`, then `chevronRight`. */\n readonly separator = input<IconName | null>(null);\n /** Whether crumbs render as links; falls back to `DS_CONFIG.breadcrumbs.clickable`, then `true`. */\n readonly clickable = input<boolean | null>(null);\n /**\n * Caps how many crumbs render, collapsing the middle into an ellipsis — the\n * first and the LAST always survive. Null (default) renders every crumb.\n *\n * Worth setting on any trail that can get deep: the row is `nowrap` with\n * `overflow: hidden`, so without a cap an overlong trail is clipped from the\n * END, which is the current page — the one crumb the reader needs most.\n */\n readonly maxItems = input<number | null>(null, {\n transform: (raw: unknown) => (raw == null ? null : numberAttribute(raw)),\n });\n /** Fires when a clickable crumb with `href` is activated; default navigation is always prevented. */\n readonly navigate = output<BreadcrumbItem>();\n\n private readonly allItems = computed<BreadcrumbItem[]>(\n () => this.items() ?? this.svc.items(),\n );\n\n /**\n * What renders. The collapsed crumb carries no `href`, so it is inert rather\n * than a link to nowhere; its label is the count, which tells the reader how\n * much is hidden instead of just that something is.\n */\n protected readonly resolvedItems = computed<BreadcrumbItem[]>(() => {\n const items = this.allItems();\n const max = this.maxItems();\n if (!max || max < 2 || items.length <= max) {\n return items;\n }\n // max - 2, not max - 1: the collapsed crumb occupies one of the slots too,\n // so counting only the first would render one crumb more than asked for.\n const tail = items.slice(items.length - (max - 2));\n\n return [items[0], { label: `… ${items.length - max + 1} more` }, ...tail];\n });\n protected readonly effectiveSeparator = computed<IconName>(\n () => this.separator() ?? this.cfg.breadcrumbs?.separator ?? 'chevronRight',\n );\n protected readonly effectiveClickable = computed<boolean>(\n () => this.clickable() ?? this.cfg.breadcrumbs?.clickable ?? true,\n );\n\n protected onNav(event: Event, item: BreadcrumbItem): void {\n if (!item.href || !this.effectiveClickable()) {\n event.preventDefault();\n\n return;\n }\n event.preventDefault();\n this.navigate.emit(item);\n }\n}\n","<nav\n class=\"breadcrumbs\"\n aria-label=\"Breadcrumb\"\n [class.is-static]=\"!effectiveClickable()\"\n>\n @for (item of resolvedItems(); track $index; let last = $last) {\n @if (\n item.href &&\n !last &&\n effectiveClickable()\n ) {\n <a\n [href]=\"item.href\"\n (click)=\"onNav($event, item)\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </a>\n } @else {\n <span\n [class.current]=\"last\"\n [attr.aria-current]=\"last ? 'page' : null\"\n >\n @if (item.icon) {\n <ds-icon\n [name]=\"item.icon\"\n [size]=\"14\"\n />\n }\n\n @if (item.label) {\n <span class=\"label\">\n {{ item.label }}\n </span>\n }\n </span>\n }\n\n @if (!last) {\n <span\n class=\"sep\"\n aria-hidden=\"true\"\n >\n <ds-icon\n [name]=\"effectiveSeparator()\"\n [size]=\"12\"\n />\n </span>\n }\n }\n</nav>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;AAIG;MAEU,kBAAkB,CAAA;AACZ,IAAA,MAAM,GAAG,MAAM,CAAmB,EAAE,6EAAC;AAC7C,IAAA,KAAK,GAA6B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;AAEnE,IAAA,GAAG,CAAC,KAAuB,EAAA;AACzB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;IACxB;AAEA,IAAA,IAAI,CAAC,IAAoB,EAAA;AACvB,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;IAC7C;IAEA,GAAG,GAAA;QACD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/C;AAEA,IAAA,WAAW,CAAC,IAAoB,EAAA;AAC9B,QAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,KACrB,GAAG,CAAC,MAAM,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAClD;IACH;IAEA,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACrB;wGAxBW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA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,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvBjC,gvCA6DA,EAAA,MAAA,EAAA,CAAA,2sDAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED3CY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAKZ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBARhC,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,gvCAAA,EAAA,MAAA,EAAA,CAAA,2sDAAA,CAAA,EAAA;;;AErB3C;;AAEG;;;;"}
@@ -0,0 +1,23 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, ViewEncapsulation, Component } from '@angular/core';
3
+
4
+ class ButtonGroupComponent {
5
+ /** Accessible name for the group, set as `aria-label` on the `role="group"` host. */
6
+ ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
7
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: ButtonGroupComponent, isStandalone: true, selector: "ds-button-group", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "ariaLabel()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["@charset \"UTF-8\";:host{display:inline-flex}:host>::ng-deep *:not(:first-child){margin-left:var(--btn-group-overlap)}:host>::ng-deep * .button{border-radius:var(--radius-flat)}:host>::ng-deep *:first-child .button{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}:host>::ng-deep *:last-child .button{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}:host>::ng-deep * .button:focus-visible{z-index:var(--btn-group-focus-z)}\n"] });
9
+ }
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: ButtonGroupComponent, decorators: [{
11
+ type: Component,
12
+ args: [{ selector: 'ds-button-group', standalone: true, template: '<ng-content></ng-content>', encapsulation: ViewEncapsulation.Emulated, host: {
13
+ role: 'group',
14
+ '[attr.aria-label]': 'ariaLabel()',
15
+ }, styles: ["@charset \"UTF-8\";:host{display:inline-flex}:host>::ng-deep *:not(:first-child){margin-left:var(--btn-group-overlap)}:host>::ng-deep * .button{border-radius:var(--radius-flat)}:host>::ng-deep *:first-child .button{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}:host>::ng-deep *:last-child .button{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}:host>::ng-deep * .button:focus-visible{z-index:var(--btn-group-focus-z)}\n"] }]
16
+ }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
17
+
18
+ /**
19
+ * Generated bundle index. Do not edit.
20
+ */
21
+
22
+ export { ButtonGroupComponent };
23
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-button-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-button-group.mjs","sources":["../../../src/lib/components/button-group/button-group.component.ts","../../../src/lib/components/button-group/ids-group-ltd-ids-design-system-components-button-group.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input } from '@angular/core';\n\n@Component({\n selector: 'ds-button-group',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './button-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n role: 'group',\n '[attr.aria-label]': 'ariaLabel()',\n },\n})\nexport class ButtonGroupComponent {\n /** Accessible name for the group, set as `aria-label` on the `role=\"group\"` host. */\n readonly ariaLabel = input<string | null>(null);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAaa,oBAAoB,CAAA;;AAEtB,IAAA,SAAS,GAAG,KAAK,CAAgB,IAAI,gFAAC;wGAFpC,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,oBAAoB,wTARrB,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,ifAAA,CAAA,EAAA,CAAA;;4FAQ1B,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAXhC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,QAAA,EACN,2BAA2B,iBAEtB,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,mBAAmB,EAAE,aAAa;AACnC,qBAAA,EAAA,MAAA,EAAA,CAAA,ifAAA,CAAA,EAAA;;;ACXH;;AAEG;;;;"}