@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,186 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, ViewEncapsulation, Component, inject, booleanAttribute, signal, effect, DestroyRef, Directive } from '@angular/core';
3
+ import { DsTableLayout } from '@ids-group-ltd/ids-design-system/components/table';
4
+ import { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';
5
+
6
+ /**
7
+ * The toolbar control `DsTableExport` renders for itself.
8
+ *
9
+ * It exists as a component rather than a `createComponent(ButtonComponent)` call with
10
+ * `setInput` per binding, so the button's markup stays ordinary template code instead of a
11
+ * hand-rolled imperative copy that drifts from `ds-button`'s own API.
12
+ *
13
+ * @internal Not API — created by the directive, never written in a consumer's template.
14
+ */
15
+ class TableExportButtonComponent {
16
+ busy = input(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
17
+ pressed = output();
18
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableExportButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
19
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: TableExportButtonComponent, isStandalone: true, selector: "ds-table-export-button", inputs: { busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressed" }, ngImport: i0, template: `
20
+ <ds-button
21
+ color="neutral"
22
+ variant="outline"
23
+ size="sm"
24
+ [disabled]="busy()"
25
+ (pressed)="pressed.emit()">
26
+ {{ busy() ? 'Preparing…' : 'Export CSV' }}
27
+ </ds-button>
28
+ `, isInline: true, dependencies: [{ kind: "component", type: ButtonComponent, selector: "ds-button", inputs: ["color", "variant", "size", "type", "disabled", "loading", "fullWidth", "ariaLabel", "icon", "trailingIcon", "ariaHasPopup", "ariaExpanded", "ariaControls", "disabledReason", "ariaDescribedBy"], outputs: ["pressed"] }], encapsulation: i0.ViewEncapsulation.None });
29
+ }
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: TableExportButtonComponent, decorators: [{
31
+ type: Component,
32
+ args: [{
33
+ selector: 'ds-table-export-button',
34
+ standalone: true,
35
+ encapsulation: ViewEncapsulation.None,
36
+ imports: [ButtonComponent],
37
+ template: `
38
+ <ds-button
39
+ color="neutral"
40
+ variant="outline"
41
+ size="sm"
42
+ [disabled]="busy()"
43
+ (pressed)="pressed.emit()">
44
+ {{ busy() ? 'Preparing…' : 'Export CSV' }}
45
+ </ds-button>
46
+ `,
47
+ }]
48
+ }], propDecorators: { busy: [{ type: i0.Input, args: [{ isSignal: true, alias: "busy", required: false }] }], pressed: [{ type: i0.Output, args: ["pressed"] }] } });
49
+
50
+ /**
51
+ * CSV export for `<ds-table>`, as a directive so a table that does not export never carries the
52
+ * code. Put it on the table and the toolbar grows the button:
53
+ *
54
+ * ```html
55
+ * <ds-table dsTableExport [columns]="cols" [data]="rows" />
56
+ * ```
57
+ *
58
+ * On a server-paged table the table holds one page, so give it the whole set:
59
+ *
60
+ * ```html
61
+ * <ds-table dsTableExport [exportFetcher]="fetchAll" (exportFailed)="report($event)" />
62
+ * ```
63
+ *
64
+ * `table.runExport()` and `table.exporting()` keep working — they delegate to whichever export
65
+ * directive is present, so a button of your own in `[toolbar]` or a page header still drives it.
66
+ * Pass `[dsTableExport]="false"` to keep the code and drop the built-in button.
67
+ */
68
+ class DsTableExport {
69
+ layout = inject(DsTableLayout);
70
+ /** Renders the built-in toolbar button. `false` keeps the feature and hides the control, for a
71
+ * table whose export is driven from somewhere else on the page. */
72
+ dsTableExport = input(true, { ...(ngDevMode ? { debugName: "dsTableExport" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
73
+ exportFilename = input('table.csv', ...(ngDevMode ? [{ debugName: "exportFilename" }] : /* istanbul ignore next */ []));
74
+ /** Fetches the rows to export. Without it the export serialises what the table holds, which on
75
+ * a server-paged table is one page. */
76
+ exportFetcher = input(null, ...(ngDevMode ? [{ debugName: "exportFetcher" }] : /* istanbul ignore next */ []));
77
+ /** Without it a rejected `exportFetcher` is silent. */
78
+ exportFailed = output();
79
+ busy = signal(false, ...(ngDevMode ? [{ debugName: "busy" }] : /* istanbul ignore next */ []));
80
+ exporting = this.busy.asReadonly();
81
+ announcement = signal('', ...(ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []));
82
+ constructor() {
83
+ this.layout.setExport({
84
+ run: () => this.runExport(),
85
+ csv: (filename, rows) => this.exportCsv(filename, rows),
86
+ exporting: this.exporting,
87
+ });
88
+ this.layout.addStatusFragment(this.announcement.asReadonly());
89
+ const anchor = this.layout.view().anchor('toolbar');
90
+ let created = null;
91
+ effect(() => {
92
+ const host = anchor();
93
+ const wanted = this.dsTableExport();
94
+ if (!host || !wanted || created) {
95
+ return;
96
+ }
97
+ created = host.createComponent(TableExportButtonComponent);
98
+ created.setInput('busy', this.busy());
99
+ created.instance.pressed.subscribe(() => void this.runExport());
100
+ });
101
+ // The button is a separate view, so it is not reached by the host's change detection: its
102
+ // input has to be written when the state moves.
103
+ effect(() => {
104
+ created?.setInput('busy', this.busy());
105
+ });
106
+ inject(DestroyRef).onDestroy(() => created?.destroy());
107
+ }
108
+ /** Without `exportFetcher` this serialises only what the table holds, which on a server-paged
109
+ * table is one page. */
110
+ async runExport() {
111
+ const fetcher = this.exportFetcher();
112
+ if (!fetcher) {
113
+ this.exportCsv(this.exportFilename());
114
+ return;
115
+ }
116
+ this.busy.set(true);
117
+ this.announcement.set('Preparing export…');
118
+ try {
119
+ const result = await fetcher();
120
+ if (typeof result === 'string' || result instanceof Blob) {
121
+ this.downloadFile(result, this.exportFilename());
122
+ }
123
+ else {
124
+ this.exportCsv(this.exportFilename(), result);
125
+ }
126
+ this.announcement.set('Export ready');
127
+ }
128
+ catch (error) {
129
+ this.announcement.set('Export failed');
130
+ this.exportFailed.emit(error);
131
+ }
132
+ finally {
133
+ this.busy.set(false);
134
+ }
135
+ }
136
+ /** Serialises the table's visible columns as a CSV download. Pass `rows` to serialise a set you
137
+ * fetched yourself. */
138
+ exportCsv(filename = 'table.csv', rows) {
139
+ if (typeof document === 'undefined') {
140
+ return;
141
+ }
142
+ const view = this.layout.view();
143
+ const columns = view.visibleColumns();
144
+ const escapeCell = (value) => /[",\r\n]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
145
+ const cells = (row) => columns.map((column) => escapeCell(view.cellText(row, column)));
146
+ // Leading BOM so Excel reads UTF-8 (accented labels and values) correctly.
147
+ const csv = '' +
148
+ [
149
+ columns.map((column) => escapeCell(column.label)),
150
+ ...(rows ?? view.sortedRows()).map(cells),
151
+ ]
152
+ .map((row) => row.join(','))
153
+ .join('\r\n');
154
+ this.downloadFile(new Blob([csv], { type: 'text/csv;charset=utf-8;' }), filename);
155
+ }
156
+ /** Only a Blob gets its object URL revoked — a URL the caller supplied is theirs to manage. */
157
+ downloadFile(source, filename) {
158
+ if (typeof document === 'undefined') {
159
+ return;
160
+ }
161
+ const url = source instanceof Blob ? URL.createObjectURL(source) : source;
162
+ const link = document.createElement('a');
163
+ link.href = url;
164
+ link.download = filename;
165
+ link.click();
166
+ if (source instanceof Blob) {
167
+ URL.revokeObjectURL(url);
168
+ }
169
+ }
170
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableExport, deps: [], target: i0.ɵɵFactoryTarget.Directive });
171
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.22", type: DsTableExport, isStandalone: true, selector: "[dsTableExport]", inputs: { dsTableExport: { classPropertyName: "dsTableExport", publicName: "dsTableExport", isSignal: true, isRequired: false, transformFunction: null }, exportFilename: { classPropertyName: "exportFilename", publicName: "exportFilename", isSignal: true, isRequired: false, transformFunction: null }, exportFetcher: { classPropertyName: "exportFetcher", publicName: "exportFetcher", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { exportFailed: "exportFailed" }, ngImport: i0 });
172
+ }
173
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableExport, decorators: [{
174
+ type: Directive,
175
+ args: [{
176
+ selector: '[dsTableExport]',
177
+ standalone: true,
178
+ }]
179
+ }], ctorParameters: () => [], propDecorators: { dsTableExport: [{ type: i0.Input, args: [{ isSignal: true, alias: "dsTableExport", required: false }] }], exportFilename: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFilename", required: false }] }], exportFetcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "exportFetcher", required: false }] }], exportFailed: [{ type: i0.Output, args: ["exportFailed"] }] } });
180
+
181
+ /**
182
+ * Generated bundle index. Do not edit.
183
+ */
184
+
185
+ export { DsTableExport };
186
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-table-export.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-table-export.mjs","sources":["../../../src/lib/components/table-export/table-export-button.component.ts","../../../src/lib/components/table-export/table-export.directive.ts","../../../src/lib/components/table-export/ids-group-ltd-ids-design-system-components-table-export.ts"],"sourcesContent":["import { Component, ViewEncapsulation, input, output } from '@angular/core';\nimport { ButtonComponent } from '@ids-group-ltd/ids-design-system/components/button';\n\n/**\n * The toolbar control `DsTableExport` renders for itself.\n *\n * It exists as a component rather than a `createComponent(ButtonComponent)` call with\n * `setInput` per binding, so the button's markup stays ordinary template code instead of a\n * hand-rolled imperative copy that drifts from `ds-button`'s own API.\n *\n * @internal Not API — created by the directive, never written in a consumer's template.\n */\n@Component({\n selector: 'ds-table-export-button',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [ButtonComponent],\n template: `\n <ds-button\n color=\"neutral\"\n variant=\"outline\"\n size=\"sm\"\n [disabled]=\"busy()\"\n (pressed)=\"pressed.emit()\">\n {{ busy() ? 'Preparing…' : 'Export CSV' }}\n </ds-button>\n `,\n})\nexport class TableExportButtonComponent {\n readonly busy = input(false);\n readonly pressed = output<void>();\n}\n","import {\n type ComponentRef,\n DestroyRef,\n Directive,\n booleanAttribute,\n effect,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {\n DsTableLayout,\n type TableColumn,\n} from '@ids-group-ltd/ids-design-system/components/table';\nimport { TableExportButtonComponent } from './table-export-button.component';\n\n/**\n * CSV export for `<ds-table>`, as a directive so a table that does not export never carries the\n * code. Put it on the table and the toolbar grows the button:\n *\n * ```html\n * <ds-table dsTableExport [columns]=\"cols\" [data]=\"rows\" />\n * ```\n *\n * On a server-paged table the table holds one page, so give it the whole set:\n *\n * ```html\n * <ds-table dsTableExport [exportFetcher]=\"fetchAll\" (exportFailed)=\"report($event)\" />\n * ```\n *\n * `table.runExport()` and `table.exporting()` keep working — they delegate to whichever export\n * directive is present, so a button of your own in `[toolbar]` or a page header still drives it.\n * Pass `[dsTableExport]=\"false\"` to keep the code and drop the built-in button.\n */\n@Directive({\n selector: '[dsTableExport]',\n standalone: true,\n})\nexport class DsTableExport<T extends object> {\n private readonly layout = inject<DsTableLayout<T>>(DsTableLayout);\n\n /** Renders the built-in toolbar button. `false` keeps the feature and hides the control, for a\n * table whose export is driven from somewhere else on the page. */\n readonly dsTableExport = input(true, { transform: booleanAttribute });\n\n readonly exportFilename = input<string>('table.csv');\n\n /** Fetches the rows to export. Without it the export serialises what the table holds, which on\n * a server-paged table is one page. */\n readonly exportFetcher = input<\n (() => Promise<readonly T[] | Blob | string>) | null\n >(null);\n\n /** Without it a rejected `exportFetcher` is silent. */\n readonly exportFailed = output<unknown>();\n\n private readonly busy = signal(false);\n readonly exporting = this.busy.asReadonly();\n\n private readonly announcement = signal('');\n\n constructor() {\n this.layout.setExport({\n run: () => this.runExport(),\n csv: (filename, rows) => this.exportCsv(filename, rows),\n exporting: this.exporting,\n });\n this.layout.addStatusFragment(this.announcement.asReadonly());\n\n const anchor = this.layout.view().anchor('toolbar');\n let created: ComponentRef<TableExportButtonComponent> | null = null;\n effect(() => {\n const host = anchor();\n const wanted = this.dsTableExport();\n if (!host || !wanted || created) {\n return;\n }\n created = host.createComponent(TableExportButtonComponent);\n created.setInput('busy', this.busy());\n created.instance.pressed.subscribe(() => void this.runExport());\n });\n // The button is a separate view, so it is not reached by the host's change detection: its\n // input has to be written when the state moves.\n effect(() => {\n created?.setInput('busy', this.busy());\n });\n inject(DestroyRef).onDestroy(() => created?.destroy());\n }\n\n /** Without `exportFetcher` this serialises only what the table holds, which on a server-paged\n * table is one page. */\n async runExport(): Promise<void> {\n const fetcher = this.exportFetcher();\n if (!fetcher) {\n this.exportCsv(this.exportFilename());\n\n return;\n }\n this.busy.set(true);\n this.announcement.set('Preparing export…');\n try {\n const result = await fetcher();\n if (typeof result === 'string' || result instanceof Blob) {\n this.downloadFile(result, this.exportFilename());\n } else {\n this.exportCsv(this.exportFilename(), result);\n }\n this.announcement.set('Export ready');\n } catch (error) {\n this.announcement.set('Export failed');\n this.exportFailed.emit(error);\n } finally {\n this.busy.set(false);\n }\n }\n\n /** Serialises the table's visible columns as a CSV download. Pass `rows` to serialise a set you\n * fetched yourself. */\n exportCsv(filename = 'table.csv', rows?: readonly T[]): void {\n if (typeof document === 'undefined') {\n return;\n }\n const view = this.layout.view();\n const columns = view.visibleColumns();\n const escapeCell = (value: string): string =>\n /[\",\\r\\n]/.test(value) ? `\"${value.replace(/\"/g, '\"\"')}\"` : value;\n const cells = (row: T): readonly string[] =>\n columns.map((column: TableColumn<T>) =>\n escapeCell(view.cellText(row, column)),\n );\n // Leading BOM so Excel reads UTF-8 (accented labels and values) correctly.\n const csv =\n '' +\n [\n columns.map((column: TableColumn<T>) => escapeCell(column.label)),\n ...(rows ?? view.sortedRows()).map(cells),\n ]\n .map((row) => row.join(','))\n .join('\\r\\n');\n this.downloadFile(\n new Blob([csv], { type: 'text/csv;charset=utf-8;' }),\n filename,\n );\n }\n\n /** Only a Blob gets its object URL revoked — a URL the caller supplied is theirs to manage. */\n private downloadFile(source: Blob | string, filename: string): void {\n if (typeof document === 'undefined') {\n return;\n }\n const url = source instanceof Blob ? URL.createObjectURL(source) : source;\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n link.click();\n if (source instanceof Blob) {\n URL.revokeObjectURL(url);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;;;AAQG;MAiBU,0BAA0B,CAAA;AAC5B,IAAA,IAAI,GAAG,KAAK,CAAC,KAAK,2EAAC;IACnB,OAAO,GAAG,MAAM,EAAQ;wGAFtB,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAX3B;;;;;;;;;AAST,EAAA,CAAA,EAAA,QAAA,EAAA,I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AA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACtCD;;AAEG;;;;"}
@@ -0,0 +1,227 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, signal, Directive } from '@angular/core';
3
+ import { DsTableLayout } from '@ids-group-ltd/ids-design-system/components/table';
4
+
5
+ const MIN_COLUMN_WIDTH = 48;
6
+ const RESIZE_STEP = 16;
7
+ const RESIZE_PAGE = 64;
8
+ /**
9
+ * Column resizing for `<ds-table>`, as a directive so a table with fixed columns never carries
10
+ * the drag, the keyboard range widget or the width buttons in the column panel:
11
+ *
12
+ * ```html
13
+ * <ds-table dsTableResize [columns]="cols" [data]="rows" />
14
+ * ```
15
+ *
16
+ * The bare attribute is the whole switch: there is no input to bind, so resizing cannot be toggled
17
+ * by an expression. Seed a width through the column's own `width`, read the live ones through
18
+ * `viewChild(DsTableResize)`, and let `persistLayout` on the table carry them across a reload.
19
+ *
20
+ * The handle's MARKUP stays in the table's header, gated on this directive being present, and so
21
+ * does the width template the column panel renders. Two reasons: a per-column
22
+ * `ViewContainerRef` would cost every header cell of every table a container to save seventeen
23
+ * lines of template, and a directive has no view of its own to declare an `ng-template` in. The
24
+ * bytes here are in the logic, and the logic is all here.
25
+ */
26
+ class DsTableResize {
27
+ layout = inject(DsTableLayout);
28
+ /** Per-column pixel widths, keyed by column key. Seeded from `column.width` where unset. */
29
+ columnWidths = signal(new Map(), ...(ngDevMode ? [{ debugName: "columnWidths" }] : /* istanbul ignore next */ []));
30
+ resizeState = null;
31
+ resizeFocus = signal(null, ...(ngDevMode ? [{ debugName: "resizeFocus" }] : /* istanbul ignore next */ []));
32
+ constructor() {
33
+ this.layout.addPersistedSlice({
34
+ key: 'widths',
35
+ read: () => [...this.columnWidths()],
36
+ write: (value) => this.columnWidths.set(new Map(value)),
37
+ reset: () => this.columnWidths.set(new Map()),
38
+ });
39
+ this.layout.setResize({
40
+ widthOverride: (key) => this.columnWidths().get(key),
41
+ range: (column) => this.resizeRange(column),
42
+ onStart: (column, event) => this.onResizeStart(column, event),
43
+ onMove: (event) => this.onResizeMove(event),
44
+ onEnd: () => this.onResizeEnd(),
45
+ onFocus: (column, event) => this.onResizeFocus(column, event),
46
+ onBlur: () => this.resizeFocus.set(null),
47
+ onKey: (column, event) => this.onResizeKey(column, event),
48
+ step: (column, delta) => this.stepColumnWidth(column, delta, null),
49
+ });
50
+ }
51
+ /** `'content'` is not a pixel value — it is carried by a class instead, see `fitsContent`. */
52
+ columnWidth(column) {
53
+ const dragged = this.columnWidths().get(column.key);
54
+ if (dragged !== undefined) {
55
+ return dragged;
56
+ }
57
+ return typeof column.width === 'number' ? column.width : null;
58
+ }
59
+ viewport() {
60
+ return this.layout.view().scrollViewport() ?? null;
61
+ }
62
+ /**
63
+ * The widest a single column may be dragged: the scroll viewport.
64
+ *
65
+ * A column wider than the viewport can never be seen whole, and long text has its own
66
+ * affordance here — `truncate` clips it and the clip popover shows the rest — so nothing is lost
67
+ * by stopping at the edge. The ceiling exists at all because `aria-valuemax` has to be TRUE: a
68
+ * focusable `role="separator"` is a range widget, and announcing a bound that neither resize
69
+ * path applies is worse than announcing none.
70
+ */
71
+ columnWidthCeiling() {
72
+ return Math.max(MIN_COLUMN_WIDTH, this.viewport()?.clientWidth ?? 0);
73
+ }
74
+ clampColumnWidth(width) {
75
+ return Math.min(this.columnWidthCeiling(), Math.max(MIN_COLUMN_WIDTH, width));
76
+ }
77
+ onResizeStart(column, event) {
78
+ event.preventDefault();
79
+ event.stopPropagation();
80
+ const header = event.target.closest('th');
81
+ if (!header) {
82
+ return;
83
+ }
84
+ this.lockMeasuredWidths(header);
85
+ this.resizeState = {
86
+ key: column.key,
87
+ startX: event.clientX,
88
+ startWidth: header.offsetWidth,
89
+ };
90
+ event.target.setPointerCapture(event.pointerId);
91
+ }
92
+ /**
93
+ * Freeze the columns at what they currently measure, once, before the first drag moves
94
+ * anything.
95
+ *
96
+ * Without it only the dragged column has a width and the rest are still auto-sized, so the
97
+ * browser redistributes the remainder across them and columns the reader never touched visibly
98
+ * jump. Measuring first means the drag changes one column and leaves the others where they
99
+ * were. Reads the header row that is actually on screen rather than assuming a column order.
100
+ */
101
+ lockMeasuredWidths(from) {
102
+ const columns = this.layout.view().visibleColumns();
103
+ if (columns.every((column) => this.columnWidth(column) !== null)) {
104
+ return;
105
+ }
106
+ const headerRow = from.parentElement;
107
+ if (!headerRow) {
108
+ return;
109
+ }
110
+ const widths = new Map(this.columnWidths());
111
+ for (const column of columns) {
112
+ if (this.columnWidth(column) !== null) {
113
+ continue;
114
+ }
115
+ const cell = headerRow.querySelector(`th[data-col-key="${CSS.escape(column.key)}"]`);
116
+ if (cell) {
117
+ widths.set(column.key, Math.max(MIN_COLUMN_WIDTH, cell.offsetWidth));
118
+ }
119
+ }
120
+ this.columnWidths.set(widths);
121
+ }
122
+ onResizeMove(event) {
123
+ if (!this.resizeState) {
124
+ return;
125
+ }
126
+ const width = this.clampColumnWidth(this.resizeState.startWidth + (event.clientX - this.resizeState.startX));
127
+ const next = new Map(this.columnWidths());
128
+ next.set(this.resizeState.key, Math.round(width));
129
+ this.columnWidths.set(next);
130
+ }
131
+ onResizeEnd() {
132
+ this.resizeState = null;
133
+ }
134
+ onResizeFocus(column, event) {
135
+ const target = event.target;
136
+ this.resizeFocus.set({
137
+ key: column.key,
138
+ measured: this.resolvedColumnWidth(column, target),
139
+ max: this.columnWidthCeiling(),
140
+ });
141
+ }
142
+ /**
143
+ * The separator's range, and only while it holds focus — that is when a range widget is
144
+ * announced, and an auto-sized column has no width to report until something measures one.
145
+ * Measuring on every change detection to fill an attribute nothing is reading would force
146
+ * layout once per resizable column.
147
+ *
148
+ * `now` prefers the known width, which the first arrow key makes known and keeps live; the
149
+ * focus measurement only covers the moment before that.
150
+ */
151
+ resizeRange(column) {
152
+ const focused = this.resizeFocus();
153
+ if (focused?.key !== column.key) {
154
+ return null;
155
+ }
156
+ return {
157
+ now: this.columnWidth(column) ?? focused.measured,
158
+ min: MIN_COLUMN_WIDTH,
159
+ max: focused.max,
160
+ };
161
+ }
162
+ resolvedColumnWidth(column, from) {
163
+ const known = this.columnWidth(column);
164
+ if (known !== null) {
165
+ return known;
166
+ }
167
+ return from?.closest('th')?.offsetWidth ?? MIN_COLUMN_WIDTH;
168
+ }
169
+ onResizeKey(column, event) {
170
+ const target = event.target;
171
+ const delta = event.key === 'ArrowLeft'
172
+ ? -RESIZE_STEP
173
+ : event.key === 'ArrowRight'
174
+ ? RESIZE_STEP
175
+ : event.key === 'PageDown'
176
+ ? -RESIZE_PAGE
177
+ : event.key === 'PageUp'
178
+ ? RESIZE_PAGE
179
+ : event.key === 'Home'
180
+ ? 'auto'
181
+ : null;
182
+ if (delta === null) {
183
+ return;
184
+ }
185
+ event.preventDefault();
186
+ this.stepColumnWidth(column, delta, target.closest('th'));
187
+ }
188
+ /**
189
+ * The header cell is passed when the caller has it — the column panel does not, so it is looked
190
+ * up by `data-col-key`, and the measurement matters: stepping an auto-sized column has to start
191
+ * from what it currently RENDERS, not from the minimum.
192
+ */
193
+ stepColumnWidth(column, delta, from) {
194
+ const header = from ?? this.headerCellFor(column);
195
+ if (header) {
196
+ this.lockMeasuredWidths(header);
197
+ }
198
+ const widths = new Map(this.columnWidths());
199
+ if (delta === 'auto') {
200
+ widths.delete(column.key);
201
+ }
202
+ else {
203
+ const current = this.resolvedColumnWidth(column, header ?? undefined);
204
+ widths.set(column.key, this.clampColumnWidth(Math.round(current + delta)));
205
+ }
206
+ this.columnWidths.set(widths);
207
+ }
208
+ headerCellFor(column) {
209
+ return (this.viewport()?.querySelector(`th[data-col-key="${CSS.escape(column.key)}"]`) ?? null);
210
+ }
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableResize, deps: [], target: i0.ɵɵFactoryTarget.Directive });
212
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.22", type: DsTableResize, isStandalone: true, selector: "[dsTableResize]", ngImport: i0 });
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: DsTableResize, decorators: [{
215
+ type: Directive,
216
+ args: [{
217
+ selector: '[dsTableResize]',
218
+ standalone: true,
219
+ }]
220
+ }], ctorParameters: () => [] });
221
+
222
+ /**
223
+ * Generated bundle index. Do not edit.
224
+ */
225
+
226
+ export { DsTableResize };
227
+ //# sourceMappingURL=ids-group-ltd-ids-design-system-components-table-resize.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ids-group-ltd-ids-design-system-components-table-resize.mjs","sources":["../../../src/lib/components/table-resize/table-resize.directive.ts","../../../src/lib/components/table-resize/ids-group-ltd-ids-design-system-components-table-resize.ts"],"sourcesContent":["import { Directive, inject, signal } from '@angular/core';\nimport {\n DsTableLayout,\n type TableColumn,\n} from '@ids-group-ltd/ids-design-system/components/table';\n\nconst MIN_COLUMN_WIDTH = 48;\nconst RESIZE_STEP = 16;\nconst RESIZE_PAGE = 64;\n\n/**\n * Column resizing for `<ds-table>`, as a directive so a table with fixed columns never carries\n * the drag, the keyboard range widget or the width buttons in the column panel:\n *\n * ```html\n * <ds-table dsTableResize [columns]=\"cols\" [data]=\"rows\" />\n * ```\n *\n * The bare attribute is the whole switch: there is no input to bind, so resizing cannot be toggled\n * by an expression. Seed a width through the column's own `width`, read the live ones through\n * `viewChild(DsTableResize)`, and let `persistLayout` on the table carry them across a reload.\n *\n * The handle's MARKUP stays in the table's header, gated on this directive being present, and so\n * does the width template the column panel renders. Two reasons: a per-column\n * `ViewContainerRef` would cost every header cell of every table a container to save seventeen\n * lines of template, and a directive has no view of its own to declare an `ng-template` in. The\n * bytes here are in the logic, and the logic is all here.\n */\n@Directive({\n selector: '[dsTableResize]',\n standalone: true,\n})\nexport class DsTableResize<T extends object> {\n private readonly layout = inject<DsTableLayout<T>>(DsTableLayout);\n\n /** Per-column pixel widths, keyed by column key. Seeded from `column.width` where unset. */\n readonly columnWidths = signal<Map<string, number>>(new Map());\n\n private resizeState: {\n key: string;\n startX: number;\n startWidth: number;\n } | null = null;\n\n private readonly resizeFocus = signal<{\n key: string;\n measured: number;\n max: number;\n } | null>(null);\n\n constructor() {\n this.layout.addPersistedSlice({\n key: 'widths',\n read: () => [...this.columnWidths()],\n write: (value) =>\n this.columnWidths.set(new Map(value as [string, number][])),\n reset: () => this.columnWidths.set(new Map()),\n });\n this.layout.setResize({\n widthOverride: (key) => this.columnWidths().get(key),\n range: (column) => this.resizeRange(column),\n onStart: (column, event) => this.onResizeStart(column, event),\n onMove: (event) => this.onResizeMove(event),\n onEnd: () => this.onResizeEnd(),\n onFocus: (column, event) => this.onResizeFocus(column, event),\n onBlur: () => this.resizeFocus.set(null),\n onKey: (column, event) => this.onResizeKey(column, event),\n step: (column, delta) => this.stepColumnWidth(column, delta, null),\n });\n }\n\n /** `'content'` is not a pixel value — it is carried by a class instead, see `fitsContent`. */\n private columnWidth(column: TableColumn<T>): number | null {\n const dragged = this.columnWidths().get(column.key);\n if (dragged !== undefined) {\n return dragged;\n }\n\n return typeof column.width === 'number' ? column.width : null;\n }\n\n private viewport(): HTMLElement | null {\n return this.layout.view().scrollViewport() ?? null;\n }\n\n /**\n * The widest a single column may be dragged: the scroll viewport.\n *\n * A column wider than the viewport can never be seen whole, and long text has its own\n * affordance here — `truncate` clips it and the clip popover shows the rest — so nothing is lost\n * by stopping at the edge. The ceiling exists at all because `aria-valuemax` has to be TRUE: a\n * focusable `role=\"separator\"` is a range widget, and announcing a bound that neither resize\n * path applies is worse than announcing none.\n */\n private columnWidthCeiling(): number {\n return Math.max(MIN_COLUMN_WIDTH, this.viewport()?.clientWidth ?? 0);\n }\n\n private clampColumnWidth(width: number): number {\n return Math.min(\n this.columnWidthCeiling(),\n Math.max(MIN_COLUMN_WIDTH, width),\n );\n }\n\n private onResizeStart(column: TableColumn<T>, event: PointerEvent): void {\n event.preventDefault();\n event.stopPropagation();\n const header = (event.target as HTMLElement).closest('th');\n if (!header) {\n return;\n }\n this.lockMeasuredWidths(header);\n this.resizeState = {\n key: column.key,\n startX: event.clientX,\n startWidth: header.offsetWidth,\n };\n (event.target as HTMLElement).setPointerCapture(event.pointerId);\n }\n\n /**\n * Freeze the columns at what they currently measure, once, before the first drag moves\n * anything.\n *\n * Without it only the dragged column has a width and the rest are still auto-sized, so the\n * browser redistributes the remainder across them and columns the reader never touched visibly\n * jump. Measuring first means the drag changes one column and leaves the others where they\n * were. Reads the header row that is actually on screen rather than assuming a column order.\n */\n private lockMeasuredWidths(from: HTMLElement): void {\n const columns = this.layout.view().visibleColumns();\n if (columns.every((column) => this.columnWidth(column) !== null)) {\n return;\n }\n const headerRow = from.parentElement;\n if (!headerRow) {\n return;\n }\n const widths = new Map(this.columnWidths());\n for (const column of columns) {\n if (this.columnWidth(column) !== null) {\n continue;\n }\n const cell = headerRow.querySelector<HTMLElement>(\n `th[data-col-key=\"${CSS.escape(column.key)}\"]`,\n );\n if (cell) {\n widths.set(column.key, Math.max(MIN_COLUMN_WIDTH, cell.offsetWidth));\n }\n }\n this.columnWidths.set(widths);\n }\n\n private onResizeMove(event: PointerEvent): void {\n if (!this.resizeState) {\n return;\n }\n const width = this.clampColumnWidth(\n this.resizeState.startWidth + (event.clientX - this.resizeState.startX),\n );\n const next = new Map(this.columnWidths());\n next.set(this.resizeState.key, Math.round(width));\n this.columnWidths.set(next);\n }\n\n private onResizeEnd(): void {\n this.resizeState = null;\n }\n\n private onResizeFocus(column: TableColumn<T>, event: FocusEvent): void {\n const target = event.target as HTMLElement;\n this.resizeFocus.set({\n key: column.key,\n measured: this.resolvedColumnWidth(column, target),\n max: this.columnWidthCeiling(),\n });\n }\n\n /**\n * The separator's range, and only while it holds focus — that is when a range widget is\n * announced, and an auto-sized column has no width to report until something measures one.\n * Measuring on every change detection to fill an attribute nothing is reading would force\n * layout once per resizable column.\n *\n * `now` prefers the known width, which the first arrow key makes known and keeps live; the\n * focus measurement only covers the moment before that.\n */\n private resizeRange(\n column: TableColumn<T>,\n ): { now: number; min: number; max: number } | null {\n const focused = this.resizeFocus();\n if (focused?.key !== column.key) {\n return null;\n }\n\n return {\n now: this.columnWidth(column) ?? focused.measured,\n min: MIN_COLUMN_WIDTH,\n max: focused.max,\n };\n }\n\n private resolvedColumnWidth(\n column: TableColumn<T>,\n from?: HTMLElement,\n ): number {\n const known = this.columnWidth(column);\n if (known !== null) {\n return known;\n }\n\n return from?.closest('th')?.offsetWidth ?? MIN_COLUMN_WIDTH;\n }\n\n private onResizeKey(column: TableColumn<T>, event: KeyboardEvent): void {\n const target = event.target as HTMLElement;\n const delta: number | 'auto' | null =\n event.key === 'ArrowLeft'\n ? -RESIZE_STEP\n : event.key === 'ArrowRight'\n ? RESIZE_STEP\n : event.key === 'PageDown'\n ? -RESIZE_PAGE\n : event.key === 'PageUp'\n ? RESIZE_PAGE\n : event.key === 'Home'\n ? 'auto'\n : null;\n if (delta === null) {\n return;\n }\n event.preventDefault();\n this.stepColumnWidth(column, delta, target.closest('th'));\n }\n\n /**\n * The header cell is passed when the caller has it — the column panel does not, so it is looked\n * up by `data-col-key`, and the measurement matters: stepping an auto-sized column has to start\n * from what it currently RENDERS, not from the minimum.\n */\n private stepColumnWidth(\n column: TableColumn<T>,\n delta: number | 'auto',\n from: HTMLElement | null,\n ): void {\n const header = from ?? this.headerCellFor(column);\n if (header) {\n this.lockMeasuredWidths(header);\n }\n const widths = new Map(this.columnWidths());\n if (delta === 'auto') {\n widths.delete(column.key);\n } else {\n const current = this.resolvedColumnWidth(column, header ?? undefined);\n widths.set(\n column.key,\n this.clampColumnWidth(Math.round(current + delta)),\n );\n }\n this.columnWidths.set(widths);\n }\n\n private headerCellFor(column: TableColumn<T>): HTMLElement | null {\n return (\n this.viewport()?.querySelector<HTMLElement>(\n `th[data-col-key=\"${CSS.escape(column.key)}\"]`,\n ) ?? null\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAMA,MAAM,gBAAgB,GAAG,EAAE;AAC3B,MAAM,WAAW,GAAG,EAAE;AACtB,MAAM,WAAW,GAAG,EAAE;AAEtB;;;;;;;;;;;;;;;;;AAiBG;MAKU,aAAa,CAAA;AACP,IAAA,MAAM,GAAG,MAAM,CAAmB,aAAa,CAAC;;AAGxD,IAAA,YAAY,GAAG,MAAM,CAAsB,IAAI,GAAG,EAAE,mFAAC;IAEtD,WAAW,GAIR,IAAI;AAEE,IAAA,WAAW,GAAG,MAAM,CAI3B,IAAI,kFAAC;AAEf,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;AAC5B,YAAA,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,MAAM,CAAC,GAAG,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