@ids-group-ltd/ids-design-system 0.11.4 → 0.12.1

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 (266) hide show
  1. package/CHANGELOG.md +373 -53
  2. package/components/README.md +86 -0
  3. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +85 -0
  4. package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -0
  5. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +70 -0
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -0
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +573 -0
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -0
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +86 -0
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -0
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +615 -0
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs +30 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar-group.mjs.map +1 -0
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +188 -0
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -0
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +59 -0
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -0
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +92 -0
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -0
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +204 -0
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -0
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +100 -0
  24. package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -0
  25. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +23 -0
  26. package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -0
  27. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +180 -0
  28. package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -0
  29. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +78 -0
  30. package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs.map +1 -0
  31. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs +49 -0
  32. package/fesm2022/ids-group-ltd-ids-design-system-components-card.mjs.map +1 -0
  33. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +73 -0
  34. package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -0
  35. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +397 -0
  36. package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -0
  37. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +1231 -0
  38. package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -0
  39. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +51 -0
  40. package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -0
  41. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs +35 -0
  42. package/fesm2022/ids-group-ltd-ids-design-system-components-divider.mjs.map +1 -0
  43. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +109 -0
  44. package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -0
  45. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +111 -0
  46. package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -0
  47. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +52 -0
  48. package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -0
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +92 -0
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -0
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs +62 -0
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-field-message.mjs.map +1 -0
  53. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs +164 -0
  54. package/fesm2022/ids-group-ltd-ids-design-system-components-filter-bar.mjs.map +1 -0
  55. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +85 -0
  56. package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -0
  57. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +223 -0
  58. package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -0
  59. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs +63 -0
  60. package/fesm2022/ids-group-ltd-ids-design-system-components-layout.mjs.map +1 -0
  61. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +53 -0
  62. package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -0
  63. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs +43 -0
  64. package/fesm2022/ids-group-ltd-ids-design-system-components-loading-overlay.mjs.map +1 -0
  65. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +293 -0
  66. package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -0
  67. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +329 -0
  68. package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -0
  69. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +612 -0
  70. package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -0
  71. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +69 -0
  72. package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -0
  73. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +191 -0
  74. package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -0
  75. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs +23 -0
  76. package/fesm2022/ids-group-ltd-ids-design-system-components-page-footer.mjs.map +1 -0
  77. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +43 -0
  78. package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -0
  79. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +85 -0
  80. package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -0
  81. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs +95 -0
  82. package/fesm2022/ids-group-ltd-ids-design-system-components-password-rules.mjs.map +1 -0
  83. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs +240 -0
  84. package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -0
  85. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +41 -0
  86. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +1 -0
  87. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +248 -0
  88. package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -0
  89. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs +62 -0
  90. package/fesm2022/ids-group-ltd-ids-design-system-components-reserve-messages.mjs.map +1 -0
  91. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +173 -0
  92. package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -0
  93. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +123 -0
  94. package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -0
  95. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +461 -0
  96. package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -0
  97. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +107 -0
  98. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -0
  99. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +185 -0
  100. package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -0
  101. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +32 -0
  102. package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -0
  103. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +204 -0
  104. package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -0
  105. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs +25 -0
  106. package/fesm2022/ids-group-ltd-ids-design-system-components-spinner.mjs.map +1 -0
  107. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +63 -0
  108. package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -0
  109. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +99 -0
  110. package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -0
  111. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs +26 -0
  112. package/fesm2022/ids-group-ltd-ids-design-system-components-status-dot.mjs.map +1 -0
  113. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +74 -0
  114. package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -0
  115. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +76 -0
  116. package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -0
  117. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +440 -0
  118. package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -0
  119. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs +186 -0
  120. package/fesm2022/ids-group-ltd-ids-design-system-components-table-export.mjs.map +1 -0
  121. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs +227 -0
  122. package/fesm2022/ids-group-ltd-ids-design-system-components-table-resize.mjs.map +1 -0
  123. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +1593 -0
  124. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -0
  125. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +381 -0
  126. package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -0
  127. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +44 -0
  128. package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -0
  129. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +158 -0
  130. package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -0
  131. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +671 -0
  132. package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -0
  133. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +41 -0
  134. package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -0
  135. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +549 -0
  136. package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -0
  137. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +34 -0
  138. package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -0
  139. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +218 -0
  140. package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -0
  141. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs +18 -0
  142. package/fesm2022/ids-group-ltd-ids-design-system-components-topbar.mjs.map +1 -0
  143. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +153 -0
  144. package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -0
  145. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +48 -0
  146. package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -0
  147. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +1338 -0
  148. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -0
  149. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +333 -0
  150. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -0
  151. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs +65 -0
  152. package/fesm2022/ids-group-ltd-ids-design-system-icons.mjs.map +1 -0
  153. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs +56 -0
  154. package/fesm2022/ids-group-ltd-ids-design-system-overlay.mjs.map +1 -0
  155. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs +37 -0
  156. package/fesm2022/ids-group-ltd-ids-design-system-theme.mjs.map +1 -0
  157. package/fesm2022/ids-group-ltd-ids-design-system.mjs +75 -14267
  158. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  159. package/migrations/0.10.0.json +1 -1
  160. package/migrations/0.10.1.json +1 -1
  161. package/migrations/0.10.2.json +1 -30
  162. package/migrations/0.11.0.json +0 -2
  163. package/migrations/0.11.1.json +2 -24
  164. package/migrations/0.11.2.json +2 -1
  165. package/migrations/0.11.3.json +3 -2
  166. package/migrations/0.11.4.json +32 -6
  167. package/migrations/0.12.0.json +22 -0
  168. package/migrations/0.12.1.json +215 -0
  169. package/migrations/0.4.0.json +2 -1
  170. package/migrations/0.5.0.json +0 -54
  171. package/migrations/0.5.1.json +3 -1
  172. package/migrations/0.7.0.json +0 -11
  173. package/migrations/0.7.1.json +2 -1
  174. package/migrations/0.9.0.json +22 -3
  175. package/migrations/0.9.1.json +1 -1
  176. package/package.json +597 -1
  177. package/styles/_check-box.scss +84 -0
  178. package/styles/_check-mark.scss +59 -0
  179. package/styles/_dropdown-overlay.scss +12 -2
  180. package/styles/_field-group-segment.scss +4 -1
  181. package/styles/_focus.scss +103 -50
  182. package/styles/_link.scss +4 -2
  183. package/styles/_tokens.scss +20 -0
  184. package/styles/_typography.scss +6 -0
  185. package/themes/README.md +4 -4
  186. package/themes/_semantic.scss +7 -8
  187. package/types/ids-group-ltd-ids-design-system-components-accordion.d.ts +48 -0
  188. package/types/ids-group-ltd-ids-design-system-components-alert.d.ts +32 -0
  189. package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +260 -0
  190. package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +75 -0
  191. package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +226 -0
  192. package/types/ids-group-ltd-ids-design-system-components-avatar-group.d.ts +13 -0
  193. package/types/ids-group-ltd-ids-design-system-components-avatar.d.ts +99 -0
  194. package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +25 -0
  195. package/types/ids-group-ltd-ids-design-system-components-banner.d.ts +41 -0
  196. package/types/ids-group-ltd-ids-design-system-components-bottom-sheet.d.ts +61 -0
  197. package/types/ids-group-ltd-ids-design-system-components-breadcrumbs.d.ts +66 -0
  198. package/types/ids-group-ltd-ids-design-system-components-button-group.d.ts +10 -0
  199. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +90 -0
  200. package/types/ids-group-ltd-ids-design-system-components-calendar-day.d.ts +41 -0
  201. package/types/ids-group-ltd-ids-design-system-components-card.d.ts +24 -0
  202. package/types/ids-group-ltd-ids-design-system-components-checkbox.d.ts +41 -0
  203. package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +79 -0
  204. package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +251 -0
  205. package/types/ids-group-ltd-ids-design-system-components-description-list.d.ts +25 -0
  206. package/types/ids-group-ltd-ids-design-system-components-divider.d.ts +22 -0
  207. package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +38 -0
  208. package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +45 -0
  209. package/types/ids-group-ltd-ids-design-system-components-empty-state.d.ts +22 -0
  210. package/types/ids-group-ltd-ids-design-system-components-field-group.d.ts +73 -0
  211. package/types/ids-group-ltd-ids-design-system-components-field-message.d.ts +36 -0
  212. package/types/ids-group-ltd-ids-design-system-components-filter-bar.d.ts +83 -0
  213. package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +56 -0
  214. package/types/ids-group-ltd-ids-design-system-components-input.d.ts +121 -0
  215. package/types/ids-group-ltd-ids-design-system-components-layout.d.ts +39 -0
  216. package/types/ids-group-ltd-ids-design-system-components-list.d.ts +29 -0
  217. package/types/ids-group-ltd-ids-design-system-components-loading-overlay.d.ts +31 -0
  218. package/types/ids-group-ltd-ids-design-system-components-menu.d.ts +85 -0
  219. package/types/ids-group-ltd-ids-design-system-components-modal.d.ts +124 -0
  220. package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +213 -0
  221. package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +31 -0
  222. package/types/ids-group-ltd-ids-design-system-components-otp-input.d.ts +52 -0
  223. package/types/ids-group-ltd-ids-design-system-components-page-footer.d.ts +13 -0
  224. package/types/ids-group-ltd-ids-design-system-components-page-header.d.ts +21 -0
  225. package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +32 -0
  226. package/types/ids-group-ltd-ids-design-system-components-password-rules.d.ts +80 -0
  227. package/types/ids-group-ltd-ids-design-system-components-popover.d.ts +48 -0
  228. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +22 -0
  229. package/types/ids-group-ltd-ids-design-system-components-radio-group.d.ts +110 -0
  230. package/types/ids-group-ltd-ids-design-system-components-reserve-messages.d.ts +33 -0
  231. package/types/ids-group-ltd-ids-design-system-components-search.d.ts +82 -0
  232. package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +40 -0
  233. package/types/ids-group-ltd-ids-design-system-components-select.d.ts +152 -0
  234. package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +92 -0
  235. package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +131 -0
  236. package/types/ids-group-ltd-ids-design-system-components-skeleton.d.ts +16 -0
  237. package/types/ids-group-ltd-ids-design-system-components-slider.d.ts +51 -0
  238. package/types/ids-group-ltd-ids-design-system-components-spinner.d.ts +11 -0
  239. package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +39 -0
  240. package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +44 -0
  241. package/types/ids-group-ltd-ids-design-system-components-status-dot.d.ts +12 -0
  242. package/types/ids-group-ltd-ids-design-system-components-stepper.d.ts +32 -0
  243. package/types/ids-group-ltd-ids-design-system-components-switch.d.ts +40 -0
  244. package/types/ids-group-ltd-ids-design-system-components-table-columns.d.ts +43 -0
  245. package/types/ids-group-ltd-ids-design-system-components-table-export.d.ts +48 -0
  246. package/types/ids-group-ltd-ids-design-system-components-table-resize.d.ts +79 -0
  247. package/types/ids-group-ltd-ids-design-system-components-table.d.ts +815 -0
  248. package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +118 -0
  249. package/types/ids-group-ltd-ids-design-system-components-tag.d.ts +26 -0
  250. package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +85 -0
  251. package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +188 -0
  252. package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +24 -0
  253. package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +167 -0
  254. package/types/ids-group-ltd-ids-design-system-components-toggle-button.d.ts +18 -0
  255. package/types/ids-group-ltd-ids-design-system-components-tooltip.d.ts +66 -0
  256. package/types/ids-group-ltd-ids-design-system-components-topbar.d.ts +8 -0
  257. package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +46 -0
  258. package/types/ids-group-ltd-ids-design-system-components-w3w.d.ts +18 -0
  259. package/types/ids-group-ltd-ids-design-system-components.d.ts +604 -0
  260. package/types/ids-group-ltd-ids-design-system-core.d.ts +436 -0
  261. package/types/ids-group-ltd-ids-design-system-icons.d.ts +52 -0
  262. package/types/ids-group-ltd-ids-design-system-overlay.d.ts +32 -0
  263. package/types/ids-group-ltd-ids-design-system-theme.d.ts +29 -0
  264. package/types/ids-group-ltd-ids-design-system.d.ts +75 -5594
  265. package/LICENSE +0 -21
  266. package/README.md +0 -73
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-autocomplete.mjs","sources":["../../../src/lib/components/autocomplete/autocomplete.component.ts","../../../src/lib/components/autocomplete/autocomplete.component.html","../../../src/lib/components/autocomplete/ids-group-ltd-ids-design-system-components-autocomplete.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ElementRef,\n type OnDestroy,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal,\n contentChild,\n viewChild,\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n closeOnOutsidePointer,\n closeOnScroll,\n disposeWithLeave,\n type DsOverlayCloseCause,\n forwardOverlayTokens,\n dropdownOverlay,\n prepareOverlayEnter,\n} from '@ids-group-ltd/ids-design-system/components';\nimport { chipFit } from '@ids-group-ltd/ids-design-system/components';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { SpinnerComponent } from '@ids-group-ltd/ids-design-system/components/spinner';\nimport { TagComponent } from '@ids-group-ltd/ids-design-system/components/tag';\nimport { DsControlValueAccessor } from '@ids-group-ltd/ids-design-system/components';\nimport { FieldMessageComponent } from '@ids-group-ltd/ids-design-system/components/field-message';\nimport {\n resolveFieldMessage,\n trimmedText,\n} from '@ids-group-ltd/ids-design-system/components';\nimport type {\n AutocompleteItem,\n AutocompleteOption,\n AutocompleteOptionGroup,\n AutocompleteValueOverflow,\n AutocompleteWidth,\n} from './autocomplete.types';\nimport {\n flattenDsOptions,\n isDsOptionGroup,\n} from '@ids-group-ltd/ids-design-system/core';\nimport {\n firstEnabledIndex as firstEnabledOf,\n lastEnabledIndex as lastEnabledOf,\n nextEnabledIndex,\n} from '@ids-group-ltd/ids-design-system/core';\nimport { scrollActiveOptionIntoView } from '@ids-group-ltd/ids-design-system/components';\nimport { announceOptionCount } from '@ids-group-ltd/ids-design-system/components';\nimport { DsOptionTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsChipTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPickerTriggerDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsEmptyTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelHeaderTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsPanelFooterTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsGroupLabelTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport { DsCreateTemplateDirective } from '@ids-group-ltd/ids-design-system/components';\nimport type { DsSize } from '@ids-group-ltd/ids-design-system/core';\nimport { inFieldGroup } from '@ids-group-ltd/ids-design-system/components/field-group';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-autocomplete',\n standalone: true,\n imports: [\n IconComponent,\n SpinnerComponent,\n TagComponent,\n FieldMessageComponent,\n NgTemplateOutlet,\n ],\n templateUrl: './autocomplete.component.html',\n styleUrl: './autocomplete.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-field-state]': 'controlState()',\n '[class.in-group]': 'inGroup',\n '[class.content-width]': \"width() === 'content'\",\n '[class.value-wraps]': \"valueOverflow() === 'wrap'\",\n },\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutocompleteComponent),\n multi: true,\n },\n ],\n})\nexport class AutocompleteComponent<T = unknown>\n extends DsControlValueAccessor<T | readonly T[] | null>\n implements OnDestroy\n{\n /** Segment of a ds-field-group: the group owns the border, radius and focus\n * ring, so .in-group strips this control back to its bare contents. */\n protected readonly inGroup = inFieldGroup();\n\n private readonly overlay = inject(Overlay);\n private readonly vcr = inject(ViewContainerRef);\n private readonly host = inject(ElementRef<HTMLElement>);\n /** Public panel tokens forwarded onto the portaled overlay pane on open so\n * a consumer's `ds-autocomplete { --ds-autocomplete-panel-*: … }` reaches it. */\n private readonly panelTokens = [\n '--ds-dropdown-panel-bg-color',\n '--ds-dropdown-panel-radius',\n '--ds-dropdown-panel-minw',\n '--ds-dropdown-panel-maxw',\n '--ds-option-selected-bg-color',\n '--ds-option-selected-label-color',\n '--ds-option-selected-bg-color-hover',\n '--ds-option-check-color',\n ];\n\n /** Options, groups, or both mixed — rendered in the order given. */\n readonly options = input<readonly AutocompleteItem<T>[]>([]);\n /** Selected value, or an array of values when `multiple`. */\n readonly value = model<T | readonly T[] | null>(null);\n /** Allows selecting more than one option, shown as removable tags. */\n readonly multiple = input(false, { transform: booleanAttribute });\n /** Draws the trailing chevron. Turn it off for a search field, where an arrow\n * invites a click that would list everything instead of searching. */\n readonly showChevron = input(true, { transform: booleanAttribute });\n /** How the chips collapse when they outgrow one line. `\"fit\"` (the default)\n * measures and shows as many as the trigger is wide, the rest behind \"+N more\".\n * A NUMBER is a CEILING, not a promise: the row still measures, so you get at\n * most that many and fewer when the trigger is narrow. `\"all\"` shows every chip and\n * lets the trigger grow a line per selection.\n *\n * Unset (`null`) means \"not deciding\", as it does on every other input in the\n * library — it resolves to `\"fit\"`. It does NOT mean \"show all\": that is\n * `\"all\"`, which is the loudest of the three modes and has to be asked for. */\n readonly maxVisibleChips = input<number | 'fit' | 'all' | null>(null, {\n transform: (raw: unknown) => {\n if (raw === 'fit' || raw === 'all') {\n return raw;\n }\n\n return raw == null ? null : numberAttribute(raw);\n },\n });\n /** Trigger height — sm/md/lg.\n * Unset falls back to `DS_CONFIG.control.size`, then `'md'`. */\n readonly size = input<DsSize | null>(null);\n readonly sizeResolved = resolveWithConfig(\n this.size,\n (config) => config.control?.size,\n 'md' as DsSize,\n );\n /** Trigger width — `fill` stretches to the container, `content` hugs the value. */\n readonly width = input<AutocompleteWidth>('fill');\n /** What a settled single value does when it is wider than the trigger. Defaults\n * to `ellipsis`; `wrap` restores the pre-0.12 behaviour, where the value broke\n * onto a second line and pushed the chevron onto a third. Multi mode is\n * unaffected — its chips have their own measured cap. */\n readonly valueOverflow = input<AutocompleteValueOverflow>('ellipsis');\n /** Placeholder shown in the input when empty. */\n readonly placeholder = input<string>('Select…');\n /** Disables the trigger and blocks all interaction. */\n readonly disabled = input(false, { transform: booleanAttribute });\n /** Confirmation text, shown when there is no error or warning — and it paints\n * the field's success border. A string like `warning`: the text IS the state. */\n readonly success = input<string, string | null | undefined>('', {\n transform: trimmedText,\n });\n /** Shows a \"Create «text»\" row when the typed text matches no option. */\n readonly allowCreate = input(false, { transform: booleanAttribute });\n /** Field label above the control — the same meaning it has on the other two pickers. */\n readonly label = input<string>('');\n /** How two values are decided to be the same one. The default is `===`, which\n * is reference identity — so with object values a re-fetch that returns equal\n * data as NEW objects loses the selection. Pass a comparator keyed on whatever\n * identifies the value: `(a, b) => a?.id === b?.id`. */\n readonly compareWith = input<(a: T | null, b: T | null) => boolean>(\n (a, b) => a === b,\n );\n\n /** Native `name` attribute forwarded to the trigger. */\n readonly name = input<string | null>(null);\n /** Prevents opening the panel while still allowing focus. */\n readonly readOnly = input(false, { transform: booleanAttribute });\n /**\n * The contract spelling of `readOnly`, a second input because signal forms binds\n * by NAME — a `readonly()` rule was reaching nothing before this existed.\n */\n readonly readonlyBinding = input(false, {\n // eslint-disable-next-line @angular-eslint/no-input-rename\n alias: 'readonly',\n transform: booleanAttribute,\n });\n /** Shows a clear affordance once there is something to clear. */\n readonly clearable = input(false, { transform: booleanAttribute });\n /** Placeholder while the field is being typed in, when a value is already\n * settled — `placeholder` is the empty-field caption and cannot be both.\n * Empty (the default) keeps `placeholder` doing both jobs, as before. */\n readonly searchPlaceholder = input<string>('');\n\n /** How the typed query narrows the list.\n *\n * The default matches a case-insensitive substring of `label`. Pass a predicate\n * to match on anything else — a second field, ignoring diacritics, a fuzzy score.\n * Pass `'none'` when the list arrives already filtered, which is what a\n * server-side search needs: the query is reported through `filterChange` and\n * every option given is rendered.\n */\n readonly filterWith = input<\n ((option: AutocompleteOption<T>, query: string) => boolean) | 'none'\n >((option, query) => option.label.toLowerCase().includes(query));\n /** The query the user typed, on every change. The input for a server-side search;\n * pair it with `filterWith=\"none\"` so the list is not narrowed twice. */\n readonly filterChange = output<string>();\n /** Options are still being fetched. The panel shows a spinner instead of the\n * empty row — which would otherwise claim there are no matches — and the list\n * reports `aria-busy`. */\n readonly loading = input(false, { transform: booleanAttribute });\n /** The panel opened. The moment to fetch options for a picker whose list is\n * loaded on demand. */\n readonly opened = output<void>();\n /** The panel closed, for any reason — a pick, Escape, an outside click, a scroll. */\n readonly closed = output<void>();\n /** Scrolls the keyboard cursor's row into view. On by default: a list longer\n * than the panel otherwise walks the cursor out of sight. Set `false` only if\n * you are driving the scroll position yourself. */\n readonly scrollActiveIntoView = input(true, { transform: booleanAttribute });\n /** Marks the field required: a `*` beside the label and `aria-required` on the input. */\n readonly required = input(false, { transform: booleanAttribute });\n /** Marks the field optional in words, for a form where most fields are required. */\n readonly optional = input(false, { transform: booleanAttribute });\n /** Accessible name for the input. */\n readonly ariaLabel = input<string | null>(null);\n\n /** Fires with the typed text when the user picks the create-new option. */\n readonly create = output<string>();\n\n protected readonly isDisabled = computed(\n () => this.disabled() || this.formDisabled(),\n );\n protected readonly hintId = computed(() =>\n this.message().text ? `${this.uid}-hint` : null,\n );\n private readonly fieldMessage = resolveFieldMessage({\n hint: this.hint,\n warning: this.warning,\n error: this.error,\n errors: this.errors,\n invalid: this.invalid,\n success: this.success,\n touchedSelf: this.touchedSelf,\n touched: this.touched,\n });\n protected readonly message = this.fieldMessage.message;\n protected readonly controlState = this.fieldMessage.controlState;\n protected readonly invalidResolved = this.fieldMessage.invalid;\n\n protected readonly optionTemplate = contentChild(DsOptionTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly chipTemplate = contentChild(DsChipTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly pickerTrigger = contentChild(DsPickerTriggerDirective, {\n read: TemplateRef,\n });\n protected readonly panelHeaderTemplate = contentChild(\n DsPanelHeaderTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly panelFooterTemplate = contentChild(\n DsPanelFooterTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly groupLabelTemplate = contentChild(\n DsGroupLabelTemplateDirective,\n { read: TemplateRef },\n );\n protected readonly emptyTemplate = contentChild(DsEmptyTemplateDirective, {\n read: TemplateRef,\n });\n protected readonly createTemplate = contentChild(DsCreateTemplateDirective, {\n read: TemplateRef,\n });\n\n protected readonly query = signal('');\n protected readonly isOpen = signal(false);\n protected readonly activeIndex = signal(-1);\n protected readonly trigger =\n viewChild.required<ElementRef<HTMLElement>>('trigger');\n protected readonly filterInput =\n viewChild.required<ElementRef<HTMLInputElement>>('filter');\n protected readonly panelTpl =\n viewChild.required<TemplateRef<unknown>>('panel');\n private readonly chipRow = viewChild<ElementRef<HTMLElement>>('chipRow');\n private overlayRef: OverlayRef | null = null;\n\n protected readonly uid = `ds-autocomplete-${++nextId}`;\n protected readonly listboxId = `${this.uid}-listbox`;\n protected readonly labelId = `${this.uid}-label`;\n protected optionId(index: number): string {\n return `${this.uid}-opt-${index}`;\n }\n protected readonly activeDescendant = computed(() => {\n const index = this.activeIndex();\n\n return this.isOpen() && index >= 0 ? this.optionId(index) : null;\n });\n\n protected readonly allOptions = computed<readonly AutocompleteOption<T>[]>(\n () => flattenDsOptions(this.options()),\n );\n\n protected readonly filteredItems = computed<AutocompleteItem<T>[]>(() => {\n const query = this.query().toLowerCase().trim();\n const filter = this.filterWith();\n const matches = (option: AutocompleteOption<T>): boolean =>\n !query || filter === 'none' || filter(option, query);\n\n const kept: AutocompleteItem<T>[] = [];\n for (const item of this.options()) {\n if (!isDsOptionGroup(item)) {\n if (matches(item)) {\n kept.push(item);\n }\n continue;\n }\n // A disabled group disables its options HERE, not only in the flattened\n // list: the template renders these objects, so a group left to inherit\n // later would paint enabled rows that refuse to be picked.\n const options = item.options\n .filter(matches)\n .map((option) =>\n item.disabled ? { ...option, disabled: true } : option,\n );\n if (options.length > 0) {\n kept.push({ ...item, options });\n }\n }\n\n return kept;\n });\n\n protected readonly filteredOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => flattenDsOptions(this.filteredItems()));\n\n protected isGroup(\n item: AutocompleteItem<T>,\n ): item is AutocompleteOptionGroup<T> {\n return isDsOptionGroup(item);\n }\n\n protected readonly showCreateRow = computed<boolean>(() => {\n if (!this.allowCreate()) {\n return false;\n }\n const text = this.query().trim();\n if (!text) {\n return false;\n }\n const lowerText = text.toLowerCase();\n\n return !this.allOptions().some(\n (option) => option.label.toLowerCase() === lowerText,\n );\n });\n\n protected readonly visibleOptions = computed<\n readonly AutocompleteOption<T>[]\n >(() => this.filteredOptions());\n\n /** The visible label wins the accessible name when there is one — otherwise the\n * placeholder would announce over it, and `placeholder` always carries a default. */\n protected readonly resolvedAriaLabel = computed(() =>\n this.label() ? null : this.ariaLabel() || this.placeholder() || null,\n );\n\n protected readonly selectedTags = computed(() => {\n if (!this.multiple()) {\n return [];\n }\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n\n return this.allOptions().filter((option) =>\n selectedValues.some((selected) => same(selected, option.value)),\n );\n });\n\n private readonly chipsMode = computed(() => this.maxVisibleChips() ?? 'fit');\n private readonly showsEveryChip = computed(() => this.chipsMode() === 'all');\n /** True for a number as well as `'fit'`: a number is a ceiling, not a promise,\n * so the row still measures. */\n protected readonly fitsChipsToWidth = computed(() => !this.showsEveryChip());\n /** How many chips the row is ASKED to render before measuring. It has to be the\n * ceiling and not the selection: the measurement caches chip widths from a\n * render that holds them all, so with a numeric cap that render never happens,\n * the cache never fills, and the fit silently falls back to showing them all. */\n private readonly chipBudget = computed(() => {\n const max = this.chipsMode();\n const total = this.selectedTags().length;\n\n return typeof max === 'number' ? Math.min(Math.max(max, 0), total) : total;\n });\n private readonly chipsThatFit = chipFit(\n this.chipBudget,\n this.chipRow,\n this.fitsChipsToWidth,\n computed(() => this.selectedTags().length),\n );\n\n /** What the trigger renders. Separate from `selectedTags`, which stays the\n * full selection: Backspace removes the last SELECTED chip, and capping the\n * list it reads would silently make it remove the last VISIBLE one instead. */\n protected readonly visibleTags = computed(() => {\n const tags = this.selectedTags();\n\n return this.showsEveryChip() ? tags : tags.slice(0, this.chipsThatFit());\n });\n\n protected readonly overflowCount = computed<number>(\n () => this.selectedTags().length - this.visibleTags().length,\n );\n\n protected readonly selectedOption = computed<AutocompleteOption<T> | null>(\n () => {\n if (this.multiple()) {\n return null;\n }\n const currentValue = this.value() as T | null;\n if (currentValue === null) {\n return null;\n }\n\n return (\n this.allOptions().find((option) =>\n this.compareWith()(option.value, currentValue),\n ) ?? null\n );\n },\n );\n\n protected readonly displayLabel = computed(\n () => this.selectedOption()?.label ?? '',\n );\n protected readonly hasSingleValue = computed(\n () => this.selectedOption() !== null,\n );\n\n protected readonly triggerSelection = computed(() =>\n this.multiple() ? this.selectedTags() : this.selectedOption(),\n );\n\n protected readonly placeholderText = computed(() => {\n if (this.multiple()) {\n return '';\n }\n if (this.displayLabel()) {\n return this.searchPlaceholder();\n }\n\n return this.placeholder();\n });\n\n protected isSelected(option: AutocompleteOption<T>): boolean {\n if (this.multiple()) {\n const selectedValues = (this.value() as readonly T[] | null) ?? [];\n\n const same = this.compareWith();\n\n return selectedValues.some((selected) => same(selected, option.value));\n }\n\n return this.compareWith()(this.value() as T | null, option.value);\n }\n\n protected optionClass(option: AutocompleteOption<T>): string {\n const parts = ['option'];\n if (this.multiple()) {\n parts.push('multi');\n }\n if (option.disabled) {\n parts.push('is-disabled');\n }\n // The shared panel partial paints the selected row off this class, not off\n // `aria-selected`, so a picker that only set the attribute went unpainted.\n if (this.isSelected(option)) {\n parts.push('is-selected');\n }\n\n return parts.join(' ');\n }\n\n /** -1 when nothing is pickable and there is no create row to fall back on. */\n private firstEnabledIndex(): number {\n const index = this.visibleOptions().findIndex((option) => !option.disabled);\n if (index >= 0) {\n return index;\n }\n\n // With nothing pickable the create row IS the list; a -1 cursor would leave\n // Enter doing nothing after typing a new name, until an ArrowDown nobody knows\n // to press.\n return this.showCreateRow() ? this.visibleOptions().length : -1;\n }\n\n /** Steps OVER a disabled option rather than landing on it. `step` is +1/-1; the\n * create row (past the last option) is always reachable, and -1 comes back when\n * every option is disabled. */\n private nextEnabledIndex(from: number, step: number, slots: number): number {\n if (!slots) {\n return -1;\n }\n const options = this.visibleOptions();\n for (let hop = 1; hop <= slots; hop++) {\n const candidate = (from + step * hop + slots * hop) % slots;\n const option = options[candidate];\n if (!option || !option.disabled) {\n return candidate;\n }\n }\n\n return -1;\n }\n\n protected flatIndexOf(option: AutocompleteOption<T>): number {\n return this.visibleOptions().findIndex((opt) => opt === option);\n }\n\n constructor() {\n super();\n scrollActiveOptionIntoView(\n this.activeDescendant,\n this.scrollActiveIntoView,\n this.cursorFromKeyboard,\n );\n announceOptionCount(\n computed(() => this.filteredOptions().length),\n this.isOpen,\n );\n }\n\n private setOpen(next: boolean): void {\n if (this.isOpen() === next) {\n return;\n }\n this.isOpen.set(next);\n (next ? this.opened : this.closed).emit();\n }\n\n protected readonly isReadOnly = computed(\n () => this.readOnly() || this.readonlyBinding(),\n );\n\n protected readonly cursorFromKeyboard = signal(false);\n\n /** How far PageUp and PageDown move. Ten rows is the native `<select>` step and\n * the APG listbox example's — a fixed number rather than a measured screenful,\n * so the jump is the same wherever the panel happens to be clipped. */\n private static readonly pageStep = 10;\n\n private cursorList() {\n const options = this.visibleOptions();\n\n return {\n length: options.length,\n isEnabled: (index: number) => !options[index].disabled,\n };\n }\n\n protected onTriggerClick(): void {\n if (this.isDisabled()) {\n return;\n }\n this.filterInput().nativeElement.focus();\n if (!this.overlayRef) {\n this.openPanel();\n }\n }\n\n protected togglePanel(event: MouseEvent): void {\n if (this.isDisabled()) {\n return;\n }\n event.stopPropagation();\n if (this.overlayRef) {\n this.close();\n } else {\n this.filterInput().nativeElement.focus();\n this.openPanel();\n }\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n this.cursorFromKeyboard.set(true);\n if (this.isDisabled()) {\n return;\n }\n const visibleCount = this.visibleOptions().length;\n const totalSlots = visibleCount + (this.showCreateRow() ? 1 : 0);\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), 1, totalSlots),\n );\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (!this.overlayRef) {\n this.openPanel();\n\n return;\n }\n this.activeIndex.set(\n this.nextEnabledIndex(this.activeIndex(), -1, totalSlots),\n );\n break;\n case 'Enter': {\n const index = this.activeIndex();\n if (this.showCreateRow() && index === visibleCount) {\n event.preventDefault();\n this.onCreateNew();\n break;\n }\n const opt = this.visibleOptions()[index];\n if (opt) {\n event.preventDefault();\n this.onPick(opt);\n }\n break;\n }\n case 'PageDown':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'PageUp':\n event.preventDefault();\n this.activeIndex.set(\n nextEnabledIndex(\n this.cursorList(),\n this.activeIndex(),\n -AutocompleteComponent.pageStep,\n ),\n );\n break;\n case 'Home':\n event.preventDefault();\n this.activeIndex.set(firstEnabledOf(this.cursorList()));\n break;\n case 'End':\n event.preventDefault();\n this.activeIndex.set(lastEnabledOf(this.cursorList()));\n break;\n case 'Escape':\n if (this.overlayRef) {\n event.preventDefault();\n this.close('dismiss');\n }\n break;\n case 'Tab':\n // Close the panel but let Tab move focus naturally (no preventDefault),\n // else the open overlay panel lingers behind the moved focus.\n if (this.overlayRef) {\n this.close();\n }\n break;\n case 'Backspace':\n if (this.multiple() && !this.query()) {\n const tags = this.selectedTags();\n const last = tags[tags.length - 1];\n if (last) {\n this.remove(last.value);\n }\n }\n break;\n }\n }\n\n protected openPanel(): void {\n if (this.isReadOnly()) {\n return;\n }\n if (this.overlayRef) {\n return;\n }\n const triggerElement = this.trigger().nativeElement;\n const { positionStrategy, config: overlayConfig } = dropdownOverlay(\n this.overlay,\n triggerElement,\n );\n const triggerWidth = triggerElement.getBoundingClientRect().width;\n if (this.width() === 'content') {\n overlayConfig.minWidth = triggerWidth;\n } else {\n overlayConfig.width = triggerWidth;\n }\n this.overlayRef = this.overlay.create(overlayConfig);\n prepareOverlayEnter(\n this.overlayRef,\n this.host.nativeElement,\n positionStrategy,\n );\n forwardOverlayTokens(\n this.overlayRef,\n this.host.nativeElement,\n this.panelTokens,\n );\n closeOnOutsidePointer(\n this.overlayRef,\n (target) => this.trigger().nativeElement.contains(target),\n () => this.close('dismiss'),\n );\n const removeScrollClose = closeOnScroll(this.overlayRef, () =>\n this.close('dismiss'),\n );\n const detaching = this.overlayRef;\n this.overlayRef.detachments().subscribe(() => {\n removeScrollClose();\n // A deferred dispose can outlive a re-open, and then this fires for the\n // PREVIOUS panel: clearing state here would strand the live one.\n if (this.overlayRef !== detaching) {\n return;\n }\n this.overlayRef = null;\n this.setOpen(false);\n });\n this.overlayRef.attach(new TemplatePortal(this.panelTpl(), this.vcr));\n this.setOpen(true);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected close(cause: DsOverlayCloseCause = 'select'): void {\n disposeWithLeave(this.overlayRef, cause);\n this.overlayRef = null;\n this.setOpen(false);\n this.activeIndex.set(-1);\n // The input collapses to zero width whenever a label is on display, so\n // anything left in `query` goes INVISIBLE while it still narrows the next\n // open. Never in multi mode, where the input keeps its width and the text\n // stays honest.\n if (this.displayLabel()) {\n this.query.set('');\n }\n this.markTouched();\n }\n\n protected clearValue(event: MouseEvent): void {\n event.stopPropagation();\n this.clear();\n this.markTouched();\n }\n\n /**\n * Empties the field — both the selected value and the text the user typed.\n *\n * `value.set(null)` alone is not enough from outside: the typed query is\n * component state with no input bound to it, so the text stays on screen after\n * the value goes.\n *\n * Deliberately does NOT move focus — the caller may be navigating away, and\n * stealing focus back into a field they just left is worse than leaving it.\n */\n clear(): void {\n this.value.set(this.multiple() ? [] : null);\n this.query.set('');\n if (this.isOpen()) {\n this.close('dismiss');\n }\n }\n\n ngOnDestroy(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n }\n\n protected onFilter(event: Event): void {\n const typed = (event.target as HTMLInputElement).value;\n this.query.set(typed);\n this.filterChange.emit(typed);\n this.activeIndex.set(this.firstEnabledIndex());\n }\n\n protected onPick(option: AutocompleteOption<T>): void {\n if (option.disabled) {\n return;\n }\n if (this.multiple()) {\n const current = (this.value() as readonly T[] | null) ?? [];\n const same = this.compareWith();\n const next = current.some((entry) => same(entry, option.value))\n ? current.filter((existing) => existing !== option.value)\n : [...current, option.value];\n this.value.set(next);\n } else {\n this.value.set(option.value);\n this.close();\n }\n }\n\n protected onCreateNew(): void {\n const text = this.query().trim();\n if (!text) {\n return;\n }\n this.create.emit(text);\n this.query.set('');\n this.close();\n }\n\n protected remove(target: T): void {\n if (!this.multiple()) {\n return;\n }\n const current = (this.value() as readonly T[] | null) ?? [];\n this.value.set(current.filter((existing) => existing !== target));\n }\n}\n","@if (label()) {\n <span\n class=\"label\"\n [id]=\"labelId\">\n {{ label() }}\n @if (required()) {\n <span\n class=\"req\"\n aria-hidden=\"true\">\n *\n </span>\n } @else if (optional()) {\n <span\n class=\"optional-marker\"\n aria-hidden=\"true\">\n (optional)\n </span>\n }\n </span>\n}\n\n<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- click opens/focuses; keyboard runs through the inner <input role=\"combobox\"> (type/arrows/Enter/Esc) -->\n<div\n #trigger\n class=\"autocomplete-trigger\"\n [class]=\"sizeResolved()\"\n [class.open]=\"isOpen()\"\n [class.disabled]=\"isDisabled()\"\n [class.error]=\"invalidResolved()\"\n (click)=\"onTriggerClick()\">\n <span class=\"addon-slot prefix\">\n <ng-content select=\"[dsAutocompletePrefix]\"></ng-content>\n </span>\n\n @if (pickerTrigger(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: triggerSelection(),\n selected: triggerSelection(),\n count: multiple() ? selectedTags().length : hasSingleValue() ? 1 : 0,\n open: isOpen(),\n disabled: isDisabled(),\n }\" />\n } @else if (multiple()) {\n <span\n #chipRow\n class=\"chip-row\"\n [class.fit]=\"fitsChipsToWidth()\">\n @for (selectedOption of visibleTags(); track selectedOption.value) {\n <ds-tag\n data-chip\n [closable]=\"true\"\n [closeLabel]=\"'Remove ' + selectedOption.label\"\n (closed)=\"remove(selectedOption.value)\">\n @if (chipTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: selectedOption,\n option: selectedOption,\n }\" />\n } @else {\n {{ selectedOption.label }}\n }\n </ds-tag>\n }\n\n @if (overflowCount() > 0) {\n <span\n class=\"overflow\"\n data-chip-overflow>\n +{{ overflowCount() }} more\n </span>\n }\n </span>\n } @else if (displayLabel()) {\n <span\n class=\"autocomplete-value\"\n [attr.title]=\"valueOverflow() === 'ellipsis' ? displayLabel() : null\">\n {{ displayLabel() }}\n </span>\n }\n\n <input\n #filter\n type=\"text\"\n class=\"autocomplete-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [class.collapsed]=\"displayLabel() && !isOpen()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"listboxId\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-labelledby]=\"label() ? labelId : null\"\n [attr.aria-label]=\"resolvedAriaLabel()\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"isReadOnly() ? 'true' : null\"\n [attr.name]=\"name()\"\n [attr.aria-invalid]=\"invalidResolved() ? 'true' : null\"\n [attr.aria-describedby]=\"hintId()\"\n [disabled]=\"isDisabled()\"\n [value]=\"query()\"\n [placeholder]=\"placeholderText()\"\n (input)=\"onFilter($event)\"\n (focus)=\"openPanel()\"\n (blur)=\"markTouched()\"\n (keydown)=\"onKeydown($event)\" />\n\n <span class=\"addon-slot suffix\">\n <ng-content select=\"[dsAutocompleteSuffix]\"></ng-content>\n </span>\n\n @if (\n clearable() &&\n hasSingleValue() &&\n !isDisabled() &&\n !isReadOnly()\n ) {\n <button\n type=\"button\"\n class=\"clear-btn\"\n aria-label=\"Clear selection\"\n (click)=\"clearValue($event)\">\n <ds-icon\n name=\"x\"\n [size]=\"14\" />\n </button>\n }\n\n @if (showChevron()) {\n <ds-icon\n name=\"chevronDown\"\n class=\"autocomplete-chevron\"\n aria-hidden=\"true\"\n [size]=\"16\"\n (click)=\"togglePanel($event)\" />\n }\n</div>\n\n<ds-field-message\n [icon]=\"messageIcon()\"\n [text]=\"message().text\"\n [state]=\"message().state\"\n [messageId]=\"hintId()\"\n [reserve]=\"reserveMessageResolved()\" />\n\n<ng-template #panel>\n <div class=\"dropdown-panel\">\n @if (panelHeaderTemplate(); as tpl) {\n <div class=\"panel-header\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n\n <ul\n class=\"dropdown-list\"\n role=\"listbox\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [id]=\"listboxId\"\n [attr.aria-multiselectable]=\"multiple() ? 'true' : null\">\n @for (item of filteredItems(); track $index; let itemIdx = $index) {\n @if (isGroup(item)) {\n <li\n class=\"optgroup\"\n role=\"group\"\n [attr.aria-label]=\"item.label\">\n <span\n class=\"optgroup-label\"\n [class.is-first]=\"itemIdx === 0\">\n @if (groupLabelTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: item,\n group: item,\n count: item.options.length,\n }\" />\n } @else {\n {{ item.label }}\n }\n </span>\n\n @for (option of item.options; track option.value) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <div\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </div>\n }\n </li>\n } @else {\n @let option = item;\n\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n role=\"option\"\n [class]=\"optionClass(option)\"\n [id]=\"optionId(flatIndexOf(option))\"\n [class.is-active]=\"flatIndexOf(option) === activeIndex()\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"option.disabled ? 'true' : null\"\n (click)=\"onPick(option)\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n option.disabled || activeIndex.set(flatIndexOf(option))\n \">\n @if (multiple()) {\n <span\n class=\"check-box\"\n [class.checked]=\"isSelected(option)\">\n <span class=\"tick\"></span>\n </span>\n }\n\n @if (option.icon) {\n <ds-icon\n class=\"option-icon\"\n [name]=\"option.icon\"\n [size]=\"16\" />\n }\n\n <span class=\"option-label\">\n @if (optionTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: option,\n option: option,\n }\" />\n } @else {\n {{ option.label }}\n }\n </span>\n\n @if (!multiple()) {\n <span\n class=\"option-check\"\n [class.is-shown]=\"isSelected(option)\">\n </span>\n }\n </li>\n }\n }\n\n @if (loading()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n <ds-spinner size=\"sm\" />\n </li>\n } @else if (filteredOptions().length === 0 && !showCreateRow()) {\n <li\n class=\"empty t-s\"\n role=\"presentation\">\n @if (emptyTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query(),\n query: query(),\n }\" />\n } @else {\n No matches\n }\n </li>\n }\n\n @if (showCreateRow()) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- listbox option; activated via the combobox input + aria-activedescendant, options aren't individually focusable -->\n <li\n class=\"option create-row\"\n role=\"option\"\n [id]=\"optionId(visibleOptions().length)\"\n [class.is-active]=\"activeIndex() === visibleOptions().length\"\n [attr.aria-selected]=\"false\"\n (click)=\"onCreateNew()\"\n (mouseenter)=\"\n cursorFromKeyboard.set(false);\n activeIndex.set(visibleOptions().length)\n \">\n <ds-icon\n name=\"plus\"\n class=\"create-icon\"\n [size]=\"16\" />\n\n <span class=\"option-label\">\n @if (createTemplate(); as tpl) {\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n $implicit: query().trim(),\n query: query().trim(),\n }\" />\n } @else {\n Create «{{ query().trim() }}»\n }\n </span>\n </li>\n }\n </ul>\n\n @if (panelFooterTemplate(); as tpl) {\n <div class=\"panel-footer\">\n <ng-container\n [ngTemplateOutlet]=\"tpl\"\n [ngTemplateOutletContext]=\"{\n count: filteredOptions().length,\n total: allOptions().length,\n query: query(),\n }\" />\n </div>\n }\n </div>\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["firstEnabledOf","lastEnabledOf"],"mappings":";;;;;;;;;;;;;;AAwEA,IAAI,MAAM,GAAG,CAAC;AA6BR,MAAO,qBACX,SAAQ,sBAA+C,CAAA;AAGvD;AACwE;IACrD,OAAO,GAAG,YAAY,EAAE;AAE1B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC9B,IAAA,IAAI,GAAG,MAAM,EAAC,UAAuB,EAAC;AACvD;AACkF;AACjE,IAAA,WAAW,GAAG;QAC7B,8BAA8B;QAC9B,4BAA4B;QAC5B,0BAA0B;QAC1B,0BAA0B;QAC1B,+BAA+B;QAC/B,kCAAkC;QAClC,qCAAqC;QACrC,yBAAyB;KAC1B;;AAGQ,IAAA,OAAO,GAAG,KAAK,CAAiC,EAAE,8EAAC;;AAEnD,IAAA,KAAK,GAAG,KAAK,CAA0B,IAAI,4EAAC;;IAE5C,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACjE;AACuE;IAC9D,WAAW,GAAG,KAAK,CAAC,IAAI,mFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACnE;;;;;;;;AAQgF;IACvE,eAAe,GAAG,KAAK,CAAgC,IAAI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A,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEJ,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAEhB,OAAO,iEACY,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9SzE;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ViewEncapsulation, Component } from '@angular/core';
3
+
4
+ class AvatarGroupComponent {
5
+ /** Maximum avatars shown before the rest collapse into an overflow chip. */
6
+ max = input(4, ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
7
+ /** Total avatar count driving the `+N` overflow; null counts the projected children. */
8
+ total = input(null, ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
9
+ overflow = computed(() => {
10
+ const total = this.total();
11
+ const max = this.max();
12
+ if (total === null) {
13
+ return null;
14
+ }
15
+ return total > max ? total - max : null;
16
+ }, ...(ngDevMode ? [{ debugName: "overflow" }] : /* istanbul ignore next */ []));
17
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
18
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarGroupComponent, isStandalone: true, selector: "ds-avatar-group", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, total: { classPropertyName: "total", publicName: "total", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"overflow() + ' more'\">\n +{{ overflow() }}\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] });
19
+ }
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarGroupComponent, decorators: [{
21
+ type: Component,
22
+ args: [{ selector: 'ds-avatar-group', standalone: true, encapsulation: ViewEncapsulation.Emulated, template: "<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"overflow() + ' more'\">\n +{{ overflow() }}\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{--_avatar-group-overlap: var(--ds-avatar-group-overlap, calc(-1 * var(--space-2)));--_avatar-group-ring: var(--ds-avatar-group-ring, var(--surface-default));--_avatar-group-overflow-bg-color: var(--ds-avatar-group-overflow-bg-color, var(--accent-muted));--_avatar-group-overflow-label-color: var(--ds-avatar-group-overflow-label-color, var(--accent-strong));display:inline-flex}:host>::ng-deep *:not(.avatar-overflow){border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}:host>::ng-deep *:not(.avatar-overflow):first-child{margin-left:0}.avatar-overflow{display:inline-grid;place-items:center;width:var(--avatar-md);height:var(--avatar-md);border-radius:var(--radius-pill);background:var(--_avatar-group-overflow-bg-color);color:var(--_avatar-group-overflow-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;border:var(--avatar-bw-group) solid var(--_avatar-group-ring);margin-left:var(--_avatar-group-overlap)}\n"] }]
23
+ }], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], total: [{ type: i0.Input, args: [{ isSignal: true, alias: "total", required: false }] }] } });
24
+
25
+ /**
26
+ * Generated bundle index. Do not edit.
27
+ */
28
+
29
+ export { AvatarGroupComponent };
30
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-avatar-group.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar-group.mjs","sources":["../../../src/lib/components/avatar-group/avatar-group.component.ts","../../../src/lib/components/avatar-group/avatar-group.component.html","../../../src/lib/components/avatar-group/ids-group-ltd-ids-design-system-components-avatar-group.ts"],"sourcesContent":["import { Component, ViewEncapsulation, computed, input } from '@angular/core';\n\n@Component({\n selector: 'ds-avatar-group',\n standalone: true,\n templateUrl: './avatar-group.component.html',\n styleUrl: './avatar-group.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AvatarGroupComponent {\n /** Maximum avatars shown before the rest collapse into an overflow chip. */\n readonly max = input<number>(4);\n /** Total avatar count driving the `+N` overflow; null counts the projected children. */\n readonly total = input<number | null>(null);\n\n protected readonly overflow = computed<number | null>(() => {\n const total = this.total();\n const max = this.max();\n if (total === null) {\n return null;\n }\n\n return total > max ? total - max : null;\n });\n}\n","<ng-content></ng-content>\n\n@if (overflow() !== null) {\n <span\n class=\"avatar-overflow\"\n [attr.aria-label]=\"overflow() + ' more'\">\n +{{ overflow() }}\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MASa,oBAAoB,CAAA;;AAEtB,IAAA,GAAG,GAAG,KAAK,CAAS,CAAC,0EAAC;;AAEtB,IAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;AAExB,IAAA,QAAQ,GAAG,QAAQ,CAAgB,MAAK;AACzD,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;AAC1B,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;AACtB,QAAA,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,OAAO,IAAI;QACb;AAEA,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,IAAI;AACzC,IAAA,CAAC,+EAAC;wGAdS,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,iUCTjC,0LASA,EAAA,MAAA,EAAA,CAAA,2kCAAA,CAAA,EAAA,CAAA;;4FDAa,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,aAAA,EAGD,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,0LAAA,EAAA,MAAA,EAAA,CAAA,2kCAAA,CAAA,EAAA;;;AEP3C;;AAEG;;;;"}
@@ -0,0 +1,188 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, computed, ViewEncapsulation, Component } from '@angular/core';
3
+ import { IconComponent } from '@ids-group-ltd/ids-design-system/icons';
4
+ import { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';
5
+
6
+ /** Deterministic `{ bg, fg }` tint for a seed string (an email, a name), so the
7
+ * same person always gets the same colour.
8
+ *
9
+ * The background is `hsl(H 50% 62%)` and the text is always WHITE. HSL lightness is
10
+ * not perceptually even, so the set reads bright — at the cost of contrast: white on
11
+ * the lighter hues measures as little as 1.65:1, under the 4.5:1 WCAG AA asks of
12
+ * text. Where the initials are the only identifier, pass your own `lightness`
13
+ * (about 50) and keep white, which measures 5.3-6.6:1.
14
+ *
15
+ * Pass to `ds-avatar`'s `tint`, or let the component derive it via `seed`. */
16
+ function avatarTint(seed, options) {
17
+ const lightness = options?.lightness ?? 62;
18
+ const saturation = options?.saturation ?? 50;
19
+ const hue = pickHue(hashSeed(seed), options?.avoidHues ?? []);
20
+ return {
21
+ bg: `hsl(${hue} ${saturation}% ${lightness}%)`,
22
+ fg: options?.foreground ?? '#fff',
23
+ };
24
+ }
25
+ /** Uppercased initials from the first two words. Accepts `(first, last)` parts or
26
+ * a single full name (`initialsFrom('Ada Lovelace')` → `AL`); a lone name gives
27
+ * one letter, `?` when empty.
28
+ *
29
+ * A deliberately naive Latin-script guess, and the library's ONLY naming rule.
30
+ * Reading a name is a cultural convention, not a UI decision — "María José
31
+ * García López" wants MG from a Spanish reader and "Blue Cross Blue Shield" wants
32
+ * BC from an insurer — so an app with a real rule passes its own through
33
+ * `DS_CONFIG.avatar.initials` or `ds-avatar`'s `initialsRule` rather than asking
34
+ * this to grow modes it cannot get right. */
35
+ function initialsFrom(first, last) {
36
+ const words = last === undefined
37
+ ? (first ?? '').trim().split(/\s+/).filter(Boolean)
38
+ : [first ?? '', last ?? ''];
39
+ const firstInitial = (words[0] ?? '').trim()[0] ?? '';
40
+ const lastInitial = (words[1] ?? '').trim()[0] ?? '';
41
+ return `${firstInitial}${lastInitial}`.toUpperCase() || '?';
42
+ }
43
+ // Java String.hashCode shape (hash*31 + charCode); the `<< 5` keeps hash in int range.
44
+ function hashSeed(seed) {
45
+ let hash = 0;
46
+ for (let index = 0; index < seed.length; index++) {
47
+ hash = seed.charCodeAt(index) + ((hash << 5) - hash);
48
+ }
49
+ return hash;
50
+ }
51
+ // Distribute the hash evenly across 0–360 minus the excluded arcs, so the result
52
+ // can never fall inside one.
53
+ function pickHue(hash, avoidHues) {
54
+ const excluded = normalizeArcs(avoidHues);
55
+ const excludedDegrees = excluded.reduce((sum, [start, end]) => sum + (end - start), 0);
56
+ const allowedDegrees = Math.max(1, 360 - excludedDegrees);
57
+ let position = ((hash % allowedDegrees) + allowedDegrees) % allowedDegrees;
58
+ let cursor = 0;
59
+ for (const [start, end] of excluded) {
60
+ const gap = start - cursor;
61
+ if (position < gap) {
62
+ return cursor + position;
63
+ }
64
+ position -= gap;
65
+ cursor = end;
66
+ }
67
+ return cursor + position;
68
+ }
69
+ // Clamp to 0–360, drop empties, sort, merge overlaps → clean non-overlapping arcs.
70
+ function normalizeArcs(arcs) {
71
+ const clamped = arcs
72
+ .map(([start, end]) => [
73
+ Math.max(0, Math.min(360, start)),
74
+ Math.max(0, Math.min(360, end)),
75
+ ])
76
+ .filter(([start, end]) => end > start)
77
+ .sort((left, right) => left[0] - right[0]);
78
+ const merged = [];
79
+ for (const [start, end] of clamped) {
80
+ const previous = merged[merged.length - 1];
81
+ if (previous && start <= previous[1]) {
82
+ previous[1] = Math.max(previous[1], end);
83
+ }
84
+ else {
85
+ merged.push([start, end]);
86
+ }
87
+ }
88
+ return merged;
89
+ }
90
+
91
+ const STATUS_ARIA_LABELS = {
92
+ online: 'Online',
93
+ offline: 'Offline',
94
+ away: 'Away',
95
+ busy: 'Busy',
96
+ };
97
+ class AvatarComponent {
98
+ /** Diameter — xs/sm/lg apply a size class; md is the default. */
99
+ size = input('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
100
+ /** Fallback text shown when there's no `imageUrl`. Wins over anything derived
101
+ * from `name`, so a caller that already has the letters keeps passing them. */
102
+ initials = input('', ...(ngDevMode ? [{ debugName: "initials" }] : /* istanbul ignore next */ []));
103
+ /** The person or thing this avatar stands for — one binding drives both the
104
+ * initials and the seed the tint hashes.
105
+ *
106
+ * The tint keys on the NAME, never on the initials — two letters collide
107
+ * wholesale, so every Alice Brown and Adam Bell would share one colour. */
108
+ name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
109
+ /** Replaces the built-in rule for turning `name` into initials, for one avatar
110
+ * or one table of them. Falls back to `DS_CONFIG.avatar.initials`, then to
111
+ * `initialsFrom` — first two words, a Latin-script guess the library does not
112
+ * pretend is universal. */
113
+ initialsRule = input(null, ...(ngDevMode ? [{ debugName: "initialsRule" }] : /* istanbul ignore next */ []));
114
+ /** Image source; shown before `initials` or `fallbackIcon` when set. */
115
+ imageUrl = input(null, ...(ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []));
116
+ /** Accessible name. When omitted, the avatar is treated as decorative
117
+ * (hidden from AT) — correct when a visible name sits beside it. */
118
+ ariaLabel = input(null, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
119
+ /** Off-token color tint. Accepts a `{ bg, fg }` pair for arbitrary palettes,
120
+ * the literal `'neutral'` for the neutral overflow-chip treatment, or null
121
+ * for the default brand-subtle tones from avatar.scss. */
122
+ tint = input(null, ...(ngDevMode ? [{ debugName: "tint" }] : /* istanbul ignore next */ []));
123
+ /** Presence indicator shown as a colored dot in the bottom-right corner. */
124
+ status = input(null, ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
125
+ /** Icon rendered when there is no imageUrl and no initials. */
126
+ fallbackIcon = input(null, ...(ngDevMode ? [{ debugName: "fallbackIcon" }] : /* istanbul ignore next */ []));
127
+ /** Seed for a deterministic tint (e.g. an email) used when no explicit `tint` is
128
+ * set — the same seed always yields the same colour. Defaults to `name`; set it
129
+ * explicitly when identity is an id or an email rather than the display name. */
130
+ seed = input(null, ...(ngDevMode ? [{ debugName: "seed" }] : /* istanbul ignore next */ []));
131
+ /** Hue arcs `[start, end]` (0–360°) the seeded tint must avoid, e.g. a brand
132
+ * hue: `[[310, 360], [0, 20]]`. Only applies when `seed` drives the tint. */
133
+ avoidHues = input([], ...(ngDevMode ? [{ debugName: "avoidHues" }] : /* istanbul ignore next */ []));
134
+ config = inject(DS_CONFIG);
135
+ initialsText = computed(() => {
136
+ const explicit = this.initials();
137
+ if (explicit) {
138
+ return explicit;
139
+ }
140
+ const name = this.name();
141
+ if (!name) {
142
+ return '';
143
+ }
144
+ const rule = this.initialsRule() ?? this.config.avatar?.initials;
145
+ return rule ? rule(name) : initialsFrom(name);
146
+ }, ...(ngDevMode ? [{ debugName: "initialsText" }] : /* istanbul ignore next */ []));
147
+ tintStyle = computed(() => {
148
+ const value = this.tint();
149
+ if (value === 'neutral') {
150
+ return { bg: null, fg: null };
151
+ }
152
+ if (value) {
153
+ return { bg: value.bg, fg: value.fg };
154
+ }
155
+ const seed = this.seed() ?? this.name();
156
+ if (seed) {
157
+ return avatarTint(seed, { avoidHues: this.avoidHues() });
158
+ }
159
+ return { bg: null, fg: null };
160
+ }, ...(ngDevMode ? [{ debugName: "tintStyle" }] : /* istanbul ignore next */ []));
161
+ statusAriaLabel = computed(() => {
162
+ const value = this.status();
163
+ return value ? STATUS_ARIA_LABELS[value] : null;
164
+ }, ...(ngDevMode ? [{ debugName: "statusAriaLabel" }] : /* istanbul ignore next */ []));
165
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
166
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: AvatarComponent, isStandalone: true, selector: "ds-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, initials: { classPropertyName: "initials", publicName: "initials", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, initialsRule: { classPropertyName: "initialsRule", publicName: "initialsRule", isSignal: true, isRequired: false, transformFunction: null }, imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, tint: { classPropertyName: "tint", publicName: "tint", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, fallbackIcon: { classPropertyName: "fallbackIcon", publicName: "fallbackIcon", isSignal: true, isRequired: false, transformFunction: null }, seed: { classPropertyName: "seed", publicName: "seed", isSignal: true, isRequired: false, transformFunction: null }, avoidHues: { classPropertyName: "avoidHues", publicName: "avoidHues", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.xs": "size() === 'xs'", "class.sm": "size() === 'sm'", "class.lg": "size() === 'lg'", "class.neutral": "tint() === 'neutral'", "style.--ds-avatar-bg-color": "tintStyle().bg", "style.--ds-avatar-label-color": "tintStyle().fg", "attr.role": "ariaLabel() ? 'img' : null", "attr.aria-label": "ariaLabel()", "attr.aria-hidden": "ariaLabel() ? null : true" } }, ngImport: i0, template: "@if (imageUrl()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
167
+ }
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AvatarComponent, decorators: [{
169
+ type: Component,
170
+ args: [{ selector: 'ds-avatar', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, host: {
171
+ '[class.xs]': "size() === 'xs'",
172
+ '[class.sm]': "size() === 'sm'",
173
+ '[class.lg]': "size() === 'lg'",
174
+ '[class.neutral]': "tint() === 'neutral'",
175
+ '[style.--ds-avatar-bg-color]': 'tintStyle().bg',
176
+ '[style.--ds-avatar-label-color]': 'tintStyle().fg',
177
+ '[attr.role]': "ariaLabel() ? 'img' : null",
178
+ '[attr.aria-label]': 'ariaLabel()',
179
+ '[attr.aria-hidden]': 'ariaLabel() ? null : true',
180
+ }, template: "@if (imageUrl()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n", styles: ["@charset \"UTF-8\";:host{--_avatar-size: var(--ds-avatar-size, var(--avatar-md));--_avatar-bg-color: var(--ds-avatar-bg-color, var(--accent-muted));--_avatar-label-color: var(--ds-avatar-label-color, var(--accent-strong));--_avatar-radius: var(--ds-avatar-radius, var(--ds-radius-pill));--_avatar-ring-width: var(--ds-avatar-ring-width, var(--avatar-bw-group));--_avatar-status-size: var(--ds-avatar-status-size, 10px);display:inline-grid;place-items:center;width:var(--_avatar-size);height:var(--_avatar-size);border-radius:var(--_avatar-radius);background-color:var(--_avatar-bg-color);color:var(--_avatar-label-color);font:var(--font-weight-bold) var(--font-size-xs)/var(--line-height-flat) var(--font-sans);letter-spacing:var(--letter-spacing-wide);flex-shrink:0;overflow:visible;position:relative}img{width:100%;height:100%;object-fit:cover;border-radius:inherit;overflow:hidden}:host(.xs){--_avatar-size: var(--ds-avatar-size, var(--avatar-xs));font-size:var(--font-size-4xs)}:host(.sm){--_avatar-size: var(--ds-avatar-size, var(--avatar-sm));font-size:var(--font-size-3xs)}:host(.lg){--_avatar-size: var(--ds-avatar-size, var(--avatar-lg));font-size:var(--font-size-s)}:host(.neutral){--_avatar-bg-color: var(--ds-avatar-bg-color, var(--surface-secondary));--_avatar-label-color: var(--ds-avatar-label-color, var(--text-secondary))}.status-dot{position:absolute;bottom:-1px;right:-1px;width:var(--_avatar-status-size);height:var(--_avatar-status-size);border-radius:var(--radius-pill);border:var(--border-width-strong) solid var(--surface-default)}.status-dot--online{background-color:var(--success)}.status-dot--busy{background-color:var(--error)}.status-dot--away{background-color:var(--warning)}.status-dot--offline{background-color:var(--text-tertiary)}\n"] }]
181
+ }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], initials: [{ type: i0.Input, args: [{ isSignal: true, alias: "initials", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], initialsRule: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialsRule", required: false }] }], imageUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUrl", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], tint: [{ type: i0.Input, args: [{ isSignal: true, alias: "tint", required: false }] }], status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], fallbackIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackIcon", required: false }] }], seed: [{ type: i0.Input, args: [{ isSignal: true, alias: "seed", required: false }] }], avoidHues: [{ type: i0.Input, args: [{ isSignal: true, alias: "avoidHues", required: false }] }] } });
182
+
183
+ /**
184
+ * Generated bundle index. Do not edit.
185
+ */
186
+
187
+ export { AvatarComponent, avatarTint, initialsFrom };
188
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-avatar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-avatar.mjs","sources":["../../../src/lib/components/avatar/avatar-tint.ts","../../../src/lib/components/avatar/avatar.component.ts","../../../src/lib/components/avatar/avatar.component.html","../../../src/lib/components/avatar/ids-group-ltd-ids-design-system-components-avatar.ts"],"sourcesContent":["/** Options for {@link avatarTint}. */\nexport interface AvatarTintOptions {\n /** Hue arcs (degrees, `[start, end]` with `start < end`, within 0–360) the\n * derived hue must never land in — e.g. `[[310, 360], [0, 20]]` to skip a\n * pink brand hue and reds. An arc crossing 0° must be given as two arcs.\n * Default: none (full 0–360 range). */\n avoidHues?: readonly (readonly [number, number])[];\n /** HSL lightness percentage. Default 62. */\n lightness?: number;\n /** HSL saturation percentage. Default 50. */\n saturation?: number;\n /** Text colour paired with the background. Default `#fff`. */\n foreground?: string;\n}\n\n/** Deterministic `{ bg, fg }` tint for a seed string (an email, a name), so the\n * same person always gets the same colour.\n *\n * The background is `hsl(H 50% 62%)` and the text is always WHITE. HSL lightness is\n * not perceptually even, so the set reads bright — at the cost of contrast: white on\n * the lighter hues measures as little as 1.65:1, under the 4.5:1 WCAG AA asks of\n * text. Where the initials are the only identifier, pass your own `lightness`\n * (about 50) and keep white, which measures 5.3-6.6:1.\n *\n * Pass to `ds-avatar`'s `tint`, or let the component derive it via `seed`. */\nexport function avatarTint(\n seed: string,\n options?: AvatarTintOptions,\n): { bg: string; fg: string } {\n const lightness = options?.lightness ?? 62;\n const saturation = options?.saturation ?? 50;\n const hue = pickHue(hashSeed(seed), options?.avoidHues ?? []);\n\n return {\n bg: `hsl(${hue} ${saturation}% ${lightness}%)`,\n fg: options?.foreground ?? '#fff',\n };\n}\n\n/** Uppercased initials from the first two words. Accepts `(first, last)` parts or\n * a single full name (`initialsFrom('Ada Lovelace')` → `AL`); a lone name gives\n * one letter, `?` when empty.\n *\n * A deliberately naive Latin-script guess, and the library's ONLY naming rule.\n * Reading a name is a cultural convention, not a UI decision — \"María José\n * García López\" wants MG from a Spanish reader and \"Blue Cross Blue Shield\" wants\n * BC from an insurer — so an app with a real rule passes its own through\n * `DS_CONFIG.avatar.initials` or `ds-avatar`'s `initialsRule` rather than asking\n * this to grow modes it cannot get right. */\nexport function initialsFrom(first?: string, last?: string): string {\n const words =\n last === undefined\n ? (first ?? '').trim().split(/\\s+/).filter(Boolean)\n : [first ?? '', last ?? ''];\n const firstInitial = (words[0] ?? '').trim()[0] ?? '';\n const lastInitial = (words[1] ?? '').trim()[0] ?? '';\n\n return `${firstInitial}${lastInitial}`.toUpperCase() || '?';\n}\n\n// Java String.hashCode shape (hash*31 + charCode); the `<< 5` keeps hash in int range.\nfunction hashSeed(seed: string): number {\n let hash = 0;\n for (let index = 0; index < seed.length; index++) {\n hash = seed.charCodeAt(index) + ((hash << 5) - hash);\n }\n\n return hash;\n}\n\n// Distribute the hash evenly across 0–360 minus the excluded arcs, so the result\n// can never fall inside one.\nfunction pickHue(\n hash: number,\n avoidHues: readonly (readonly [number, number])[],\n): number {\n const excluded = normalizeArcs(avoidHues);\n const excludedDegrees = excluded.reduce(\n (sum, [start, end]) => sum + (end - start),\n 0,\n );\n const allowedDegrees = Math.max(1, 360 - excludedDegrees);\n let position = ((hash % allowedDegrees) + allowedDegrees) % allowedDegrees;\n\n let cursor = 0;\n for (const [start, end] of excluded) {\n const gap = start - cursor;\n if (position < gap) {\n return cursor + position;\n }\n position -= gap;\n cursor = end;\n }\n\n return cursor + position;\n}\n\n// Clamp to 0–360, drop empties, sort, merge overlaps → clean non-overlapping arcs.\nfunction normalizeArcs(\n arcs: readonly (readonly [number, number])[],\n): [number, number][] {\n const clamped = arcs\n .map(\n ([start, end]) =>\n [\n Math.max(0, Math.min(360, start)),\n Math.max(0, Math.min(360, end)),\n ] as [number, number],\n )\n .filter(([start, end]) => end > start)\n .sort((left, right) => left[0] - right[0]);\n\n const merged: [number, number][] = [];\n for (const [start, end] of clamped) {\n const previous = merged[merged.length - 1];\n if (previous && start <= previous[1]) {\n previous[1] = Math.max(previous[1], end);\n } else {\n merged.push([start, end]);\n }\n }\n\n return merged;\n}\n","import {\n Component,\n ViewEncapsulation,\n computed,\n inject,\n input,\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 { avatarTint, initialsFrom } from './avatar-tint';\nimport type { AvatarSize, AvatarStatus } from './avatar.types';\nimport { DS_CONFIG } from '@ids-group-ltd/ids-design-system/core';\n\nconst STATUS_ARIA_LABELS: Record<AvatarStatus, string> = {\n online: 'Online',\n offline: 'Offline',\n away: 'Away',\n busy: 'Busy',\n};\n\n@Component({\n selector: 'ds-avatar',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './avatar.component.html',\n styleUrl: './avatar.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[class.xs]': \"size() === 'xs'\",\n '[class.sm]': \"size() === 'sm'\",\n '[class.lg]': \"size() === 'lg'\",\n '[class.neutral]': \"tint() === 'neutral'\",\n '[style.--ds-avatar-bg-color]': 'tintStyle().bg',\n '[style.--ds-avatar-label-color]': 'tintStyle().fg',\n '[attr.role]': \"ariaLabel() ? 'img' : null\",\n '[attr.aria-label]': 'ariaLabel()',\n '[attr.aria-hidden]': 'ariaLabel() ? null : true',\n },\n})\nexport class AvatarComponent {\n /** Diameter — xs/sm/lg apply a size class; md is the default. */\n readonly size = input<AvatarSize>('md');\n /** Fallback text shown when there's no `imageUrl`. Wins over anything derived\n * from `name`, so a caller that already has the letters keeps passing them. */\n readonly initials = input<string>('');\n /** The person or thing this avatar stands for — one binding drives both the\n * initials and the seed the tint hashes.\n *\n * The tint keys on the NAME, never on the initials — two letters collide\n * wholesale, so every Alice Brown and Adam Bell would share one colour. */\n readonly name = input<string>('');\n /** Replaces the built-in rule for turning `name` into initials, for one avatar\n * or one table of them. Falls back to `DS_CONFIG.avatar.initials`, then to\n * `initialsFrom` — first two words, a Latin-script guess the library does not\n * pretend is universal. */\n readonly initialsRule = input<((name: string) => string) | null>(null);\n /** Image source; shown before `initials` or `fallbackIcon` when set. */\n readonly imageUrl = input<string | null>(null);\n /** Accessible name. When omitted, the avatar is treated as decorative\n * (hidden from AT) — correct when a visible name sits beside it. */\n readonly ariaLabel = input<string | null>(null);\n /** Off-token color tint. Accepts a `{ bg, fg }` pair for arbitrary palettes,\n * the literal `'neutral'` for the neutral overflow-chip treatment, or null\n * for the default brand-subtle tones from avatar.scss. */\n readonly tint = input<{ bg: string; fg: string } | 'neutral' | null>(null);\n /** Presence indicator shown as a colored dot in the bottom-right corner. */\n readonly status = input<AvatarStatus | null>(null);\n /** Icon rendered when there is no imageUrl and no initials. */\n readonly fallbackIcon = input<IconName | null>(null);\n /** Seed for a deterministic tint (e.g. an email) used when no explicit `tint` is\n * set — the same seed always yields the same colour. Defaults to `name`; set it\n * explicitly when identity is an id or an email rather than the display name. */\n readonly seed = input<string | null>(null);\n /** Hue arcs `[start, end]` (0–360°) the seeded tint must avoid, e.g. a brand\n * hue: `[[310, 360], [0, 20]]`. Only applies when `seed` drives the tint. */\n readonly avoidHues = input<readonly (readonly [number, number])[]>([]);\n\n private readonly config = inject(DS_CONFIG);\n\n protected readonly initialsText = computed(() => {\n const explicit = this.initials();\n if (explicit) {\n return explicit;\n }\n const name = this.name();\n if (!name) {\n return '';\n }\n const rule = this.initialsRule() ?? this.config.avatar?.initials;\n\n return rule ? rule(name) : initialsFrom(name);\n });\n\n protected readonly tintStyle = computed(() => {\n const value = this.tint();\n if (value === 'neutral') {\n return { bg: null as string | null, fg: null as string | null };\n }\n if (value) {\n return { bg: value.bg, fg: value.fg };\n }\n\n const seed = this.seed() ?? this.name();\n if (seed) {\n return avatarTint(seed, { avoidHues: this.avoidHues() });\n }\n\n return { bg: null as string | null, fg: null as string | null };\n });\n\n protected readonly statusAriaLabel = computed(() => {\n const value = this.status();\n\n return value ? STATUS_ARIA_LABELS[value] : null;\n });\n}\n","@if (imageUrl()) {\n <img\n alt=\"\"\n [src]=\"imageUrl()\" />\n} @else if (initialsText()) {\n {{ initialsText() }}\n} @else if (fallbackIcon()) {\n <ds-icon\n [name]=\"fallbackIcon()!\"\n [size]=\"16\" />\n}\n\n@if (status()) {\n <span\n role=\"img\"\n [class]=\"'status-dot status-dot--' + status()\"\n [attr.aria-label]=\"statusAriaLabel()\">\n </span>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAeA;;;;;;;;;AAS+E;AACzE,SAAU,UAAU,CACxB,IAAY,EACZ,OAA2B,EAAA;A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EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECvC5B,qYAmBA,EAAA,MAAA,EAAA,CAAA,wuDAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDIY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAgBZ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAnB3B,SAAS;+BACE,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,aAAA,EAGT,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,YAAY,EAAE,iBAAiB;AAC/B,wBAAA,iBAAiB,EAAE,sBAAsB;AACzC,wBAAA,8BAA8B,EAAE,gBAAgB;AAChD,wBAAA,iCAAiC,EAAE,gBAAgB;AACnD,wBAAA,aAAa,EAAE,4BAA4B;AAC3C,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,oBAAoB,EAAE,2BAA2B;AAClD,qBAAA,EAAA,QAAA,EAAA,qYAAA,EAAA,MAAA,EAAA,CAAA,wuDAAA,CAAA,EAAA;;;AErCH;;AAEG;;;;"}
@@ -0,0 +1,59 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, booleanAttribute, numberAttribute, computed, ViewEncapsulation, Component } from '@angular/core';
3
+ import { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';
4
+
5
+ class BadgeComponent {
6
+ /** Consumer-defined status key; colours are wired via styles/status. Unset → neutral. */
7
+ status = input(...(ngDevMode ? [undefined, { debugName: "status" }] : /* istanbul ignore next */ []));
8
+ /** Leading status dot, rendered only while `count` is unset — a count replaces the
9
+ * badge's whole content. Unset falls back to `DS_CONFIG.badge.withDot`, then `false`. */
10
+ withDot = input(null, { ...(ngDevMode ? { debugName: "withDot" } : /* istanbul ignore next */ {}), transform: (value) => (value == null ? null : booleanAttribute(value)) });
11
+ withDotResolved = resolveWithConfig(this.withDot, (config) => config.badge?.withDot, false);
12
+ /** Solid accent fill instead of the default subtle background. */
13
+ solid = input(false, { ...(ngDevMode ? { debugName: "solid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
14
+ /** Numeric count to display; overrides projected content when set. */
15
+ count = input(null, ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
16
+ /** Count is capped at this value, shown as `"max+"` beyond it. */
17
+ max = input(99, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: numberAttribute });
18
+ /** Noun used in the count's accessible label — set for non-notification counts (cart, results, …). */
19
+ countLabel = input('notifications', ...(ngDevMode ? [{ debugName: "countLabel" }] : /* istanbul ignore next */ []));
20
+ countDisplay = computed(() => {
21
+ const value = this.count();
22
+ if (value === null) {
23
+ return null;
24
+ }
25
+ return value > this.max() ? `${this.max()}+` : String(value);
26
+ }, ...(ngDevMode ? [{ debugName: "countDisplay" }] : /* istanbul ignore next */ []));
27
+ classes = computed(() => {
28
+ const parts = [
29
+ 'badge',
30
+ this.count() !== null ? 'count' : '',
31
+ this.solid() ? 'solid' : '',
32
+ ];
33
+ return parts.filter(Boolean).join(' ');
34
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
35
+ countAriaLabel = computed(() => {
36
+ const value = this.count();
37
+ if (value === null) {
38
+ return null;
39
+ }
40
+ return value > this.max()
41
+ ? `More than ${this.max()} ${this.countLabel()}`
42
+ : `${value} ${this.countLabel()}`;
43
+ }, ...(ngDevMode ? [{ debugName: "countAriaLabel" }] : /* istanbul ignore next */ []));
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
45
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: BadgeComponent, isStandalone: true, selector: "ds-badge", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, withDot: { classPropertyName: "withDot", publicName: "withDot", isSignal: true, isRequired: false, transformFunction: null }, solid: { classPropertyName: "solid", publicName: "solid", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, countLabel: { classPropertyName: "countLabel", publicName: "countLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-status": "status() || null" } }, ngImport: i0, template: "<span\n [class]=\"classes()\"\n [attr.role]=\"countAriaLabel() ? 'img' : null\"\n [attr.aria-label]=\"countAriaLabel()\">\n @if (count() !== null) {\n {{ countDisplay() }}\n } @else {\n @if (withDotResolved()) {\n <span class=\"dot\"></span>\n }\n\n <ng-content></ng-content>\n }\n</span>\n", styles: [":host{display:inline-flex}.badge{--_badge-bg-color: var(--ds-badge-bg-color, var(--surface-secondary));--_badge-label-color: var(--ds-badge-label-color, var(--text-secondary));--_badge-radius: var(--ds-badge-radius, var(--ds-radius-pill));--_badge-pad-x: var(--ds-badge-pad-x, var(--badge-pad-x));--_badge-pad-y: var(--ds-badge-pad-y, var(--badge-pad-y));--_badge-font-weight: var(--ds-badge-font-weight, var(--font-weight-bold));--_badge-white-space: var(--ds-badge-white-space, nowrap);display:inline-flex;align-items:center;gap:var(--badge-gap);padding:var(--_badge-pad-y) var(--_badge-pad-x);border-radius:var(--_badge-radius);font:var(--_badge-font-weight) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wide);white-space:var(--_badge-white-space);background-color:var(--_badge-bg-color);color:var(--_badge-label-color)}.badge .dot{width:var(--badge-dot-size);height:var(--badge-dot-size);border-radius:var(--radius-pill);background:currentcolor}.badge.solid{--_badge-bg-color: var(--ds-badge-bg-color, var(--accent));--_badge-label-color: var(--ds-badge-label-color, var(--accent-on))}.badge.count{min-width:var(--badge-count-size);height:var(--badge-count-size);padding:0 var(--space-1-5);display:inline-grid;place-items:center;font-size:var(--font-size-2xs)}\n"] });
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: BadgeComponent, decorators: [{
48
+ type: Component,
49
+ args: [{ selector: 'ds-badge', standalone: true, encapsulation: ViewEncapsulation.Emulated, host: {
50
+ '[attr.data-status]': 'status() || null',
51
+ }, template: "<span\n [class]=\"classes()\"\n [attr.role]=\"countAriaLabel() ? 'img' : null\"\n [attr.aria-label]=\"countAriaLabel()\">\n @if (count() !== null) {\n {{ countDisplay() }}\n } @else {\n @if (withDotResolved()) {\n <span class=\"dot\"></span>\n }\n\n <ng-content></ng-content>\n }\n</span>\n", styles: [":host{display:inline-flex}.badge{--_badge-bg-color: var(--ds-badge-bg-color, var(--surface-secondary));--_badge-label-color: var(--ds-badge-label-color, var(--text-secondary));--_badge-radius: var(--ds-badge-radius, var(--ds-radius-pill));--_badge-pad-x: var(--ds-badge-pad-x, var(--badge-pad-x));--_badge-pad-y: var(--ds-badge-pad-y, var(--badge-pad-y));--_badge-font-weight: var(--ds-badge-font-weight, var(--font-weight-bold));--_badge-white-space: var(--ds-badge-white-space, nowrap);display:inline-flex;align-items:center;gap:var(--badge-gap);padding:var(--_badge-pad-y) var(--_badge-pad-x);border-radius:var(--_badge-radius);font:var(--_badge-font-weight) var(--font-size-xs)/var(--line-height-base) var(--font-sans);letter-spacing:var(--letter-spacing-wide);white-space:var(--_badge-white-space);background-color:var(--_badge-bg-color);color:var(--_badge-label-color)}.badge .dot{width:var(--badge-dot-size);height:var(--badge-dot-size);border-radius:var(--radius-pill);background:currentcolor}.badge.solid{--_badge-bg-color: var(--ds-badge-bg-color, var(--accent));--_badge-label-color: var(--ds-badge-label-color, var(--accent-on))}.badge.count{min-width:var(--badge-count-size);height:var(--badge-count-size);padding:0 var(--space-1-5);display:inline-grid;place-items:center;font-size:var(--font-size-2xs)}\n"] }]
52
+ }], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], withDot: [{ type: i0.Input, args: [{ isSignal: true, alias: "withDot", required: false }] }], solid: [{ type: i0.Input, args: [{ isSignal: true, alias: "solid", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], countLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "countLabel", required: false }] }] } });
53
+
54
+ /**
55
+ * Generated bundle index. Do not edit.
56
+ */
57
+
58
+ export { BadgeComponent };
59
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-badge.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-badge.mjs","sources":["../../../src/lib/components/badge/badge.component.ts","../../../src/lib/components/badge/badge.component.html","../../../src/lib/components/badge/ids-group-ltd-ids-design-system-components-badge.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n computed,\n input,\n numberAttribute,\n} from '@angular/core';\nimport type { DsStatusKey } from '@ids-group-ltd/ids-design-system/core';\nimport { resolveWithConfig } from '@ids-group-ltd/ids-design-system/core';\n\n@Component({\n selector: 'ds-badge',\n standalone: true,\n templateUrl: './badge.component.html',\n styleUrl: './badge.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n '[attr.data-status]': 'status() || null',\n },\n})\nexport class BadgeComponent {\n /** Consumer-defined status key; colours are wired via styles/status. Unset → neutral. */\n readonly status = input<DsStatusKey>();\n /** Leading status dot, rendered only while `count` is unset — a count replaces the\n * badge's whole content. Unset falls back to `DS_CONFIG.badge.withDot`, then `false`. */\n readonly withDot = input<boolean | null, unknown>(null, {\n transform: (value) => (value == null ? null : booleanAttribute(value)),\n });\n readonly withDotResolved = resolveWithConfig(\n this.withDot,\n (config) => config.badge?.withDot,\n false,\n );\n /** Solid accent fill instead of the default subtle background. */\n readonly solid = input(false, { transform: booleanAttribute });\n /** Numeric count to display; overrides projected content when set. */\n readonly count = input<number | null>(null);\n /** Count is capped at this value, shown as `\"max+\"` beyond it. */\n readonly max = input(99, { transform: numberAttribute });\n /** Noun used in the count's accessible label — set for non-notification counts (cart, results, …). */\n readonly countLabel = input('notifications');\n\n protected readonly countDisplay = computed(() => {\n const value = this.count();\n if (value === null) {\n return null;\n }\n\n return value > this.max() ? `${this.max()}+` : String(value);\n });\n\n protected readonly classes = computed(() => {\n const parts = [\n 'badge',\n this.count() !== null ? 'count' : '',\n this.solid() ? 'solid' : '',\n ];\n\n return parts.filter(Boolean).join(' ');\n });\n\n protected readonly countAriaLabel = computed(() => {\n const value = this.count();\n if (value === null) {\n return null;\n }\n\n return value > this.max()\n ? `More than ${this.max()} ${this.countLabel()}`\n : `${value} ${this.countLabel()}`;\n });\n}\n","<span\n [class]=\"classes()\"\n [attr.role]=\"countAriaLabel() ? 'img' : null\"\n [attr.aria-label]=\"countAriaLabel()\">\n @if (count() !== null) {\n {{ countDisplay() }}\n } @else {\n @if (withDotResolved()) {\n <span class=\"dot\"></span>\n }\n\n <ng-content></ng-content>\n }\n</span>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAqBa,cAAc,CAAA;;IAEhB,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAe;AACtC;AAC0F;AACjF,IAAA,OAAO,GAAG,KAAK,CAA0B,IAAI,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,SAAA,EAAA,8BAAA,EAAA,CAAA,EACpD,SAAS,EAAE,CAAC,KAAK,MAAM,KAAK,IAAI,IAAI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