@rt-tools/ui-kit-v2 0.23.3 → 0.23.4

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 (348) hide show
  1. package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs +142 -71
  2. package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs.map +1 -1
  3. package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs +467 -231
  4. package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs.map +1 -1
  5. package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs +260 -91
  6. package/fesm2022/rt-tools-ui-kit-v2-ai-run-status.mjs.map +1 -1
  7. package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs +80 -46
  8. package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs.map +1 -1
  9. package/fesm2022/rt-tools-ui-kit-v2-aside.mjs +984 -697
  10. package/fesm2022/rt-tools-ui-kit-v2-aside.mjs.map +1 -1
  11. package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs +452 -210
  12. package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs.map +1 -1
  13. package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs +143 -52
  14. package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs.map +1 -1
  15. package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs +158 -83
  16. package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs.map +1 -1
  17. package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs +335 -0
  18. package/fesm2022/rt-tools-ui-kit-v2-breadcrumbs.mjs.map +1 -0
  19. package/fesm2022/rt-tools-ui-kit-v2-button.mjs +437 -363
  20. package/fesm2022/rt-tools-ui-kit-v2-button.mjs.map +1 -1
  21. package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs +430 -149
  22. package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs.map +1 -1
  23. package/fesm2022/rt-tools-ui-kit-v2-card.mjs +155 -71
  24. package/fesm2022/rt-tools-ui-kit-v2-card.mjs.map +1 -1
  25. package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs +155 -0
  26. package/fesm2022/rt-tools-ui-kit-v2-carousel.mjs.map +1 -0
  27. package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs +215 -110
  28. package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs.map +1 -1
  29. package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs +158 -75
  30. package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs.map +1 -1
  31. package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs +769 -0
  32. package/fesm2022/rt-tools-ui-kit-v2-color-palette.mjs.map +1 -0
  33. package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs +462 -253
  34. package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs.map +1 -1
  35. package/fesm2022/rt-tools-ui-kit-v2-container.mjs +1276 -1316
  36. package/fesm2022/rt-tools-ui-kit-v2-container.mjs.map +1 -1
  37. package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs +185 -80
  38. package/fesm2022/rt-tools-ui-kit-v2-copy-value.mjs.map +1 -1
  39. package/fesm2022/rt-tools-ui-kit-v2-core.mjs +2309 -2619
  40. package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -1
  41. package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs +100 -44
  42. package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs.map +1 -1
  43. package/fesm2022/rt-tools-ui-kit-v2-counter.mjs +290 -155
  44. package/fesm2022/rt-tools-ui-kit-v2-counter.mjs.map +1 -1
  45. package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +2097 -858
  46. package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -1
  47. package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs +2247 -1176
  48. package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs.map +1 -1
  49. package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +1043 -705
  50. package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -1
  51. package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +810 -525
  52. package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -1
  53. package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs +158 -138
  54. package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs.map +1 -1
  55. package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +177 -67
  56. package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -1
  57. package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs +550 -477
  58. package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs.map +1 -1
  59. package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs +185 -168
  60. package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs.map +1 -1
  61. package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs +116 -43
  62. package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs.map +1 -1
  63. package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs +585 -0
  64. package/fesm2022/rt-tools-ui-kit-v2-draggable-tree.mjs.map +1 -0
  65. package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs +755 -259
  66. package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs.map +1 -1
  67. package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs +3266 -1115
  68. package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs.map +1 -1
  69. package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs +190 -55
  70. package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs.map +1 -1
  71. package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs +283 -103
  72. package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs.map +1 -1
  73. package/fesm2022/rt-tools-ui-kit-v2-field.mjs +393 -177
  74. package/fesm2022/rt-tools-ui-kit-v2-field.mjs.map +1 -1
  75. package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs +399 -207
  76. package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs.map +1 -1
  77. package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs +288 -212
  78. package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs.map +1 -1
  79. package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs +262 -116
  80. package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs.map +1 -1
  81. package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs +57 -31
  82. package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs.map +1 -1
  83. package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs +258 -90
  84. package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs.map +1 -1
  85. package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs +249 -215
  86. package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs.map +1 -1
  87. package/fesm2022/rt-tools-ui-kit-v2-header.mjs +199 -71
  88. package/fesm2022/rt-tools-ui-kit-v2-header.mjs.map +1 -1
  89. package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs +231 -0
  90. package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree-selector.mjs.map +1 -0
  91. package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs +336 -0
  92. package/fesm2022/rt-tools-ui-kit-v2-hybrid-tree.mjs.map +1 -0
  93. package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs +451 -162
  94. package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs.map +1 -1
  95. package/fesm2022/rt-tools-ui-kit-v2-icon.mjs +931 -686
  96. package/fesm2022/rt-tools-ui-kit-v2-icon.mjs.map +1 -1
  97. package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs +664 -491
  98. package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs.map +1 -1
  99. package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs +574 -222
  100. package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs.map +1 -1
  101. package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs +150 -36
  102. package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs.map +1 -1
  103. package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs +606 -0
  104. package/fesm2022/rt-tools-ui-kit-v2-inline-edit.mjs.map +1 -0
  105. package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs +461 -355
  106. package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs.map +1 -1
  107. package/fesm2022/rt-tools-ui-kit-v2-input.mjs +338 -143
  108. package/fesm2022/rt-tools-ui-kit-v2-input.mjs.map +1 -1
  109. package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs +135 -48
  110. package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs.map +1 -1
  111. package/fesm2022/rt-tools-ui-kit-v2-logo.mjs +166 -92
  112. package/fesm2022/rt-tools-ui-kit-v2-logo.mjs.map +1 -1
  113. package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs +118 -56
  114. package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs.map +1 -1
  115. package/fesm2022/rt-tools-ui-kit-v2-menu.mjs +1054 -527
  116. package/fesm2022/rt-tools-ui-kit-v2-menu.mjs.map +1 -1
  117. package/fesm2022/rt-tools-ui-kit-v2-message.mjs +230 -104
  118. package/fesm2022/rt-tools-ui-kit-v2-message.mjs.map +1 -1
  119. package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs +210 -70
  120. package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs.map +1 -1
  121. package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs +532 -311
  122. package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs.map +1 -1
  123. package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs +125 -50
  124. package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs.map +1 -1
  125. package/fesm2022/rt-tools-ui-kit-v2-note.mjs +73 -43
  126. package/fesm2022/rt-tools-ui-kit-v2-note.mjs.map +1 -1
  127. package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs +161 -53
  128. package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs.map +1 -1
  129. package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs +491 -310
  130. package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs.map +1 -1
  131. package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs +374 -174
  132. package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs.map +1 -1
  133. package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs +202 -159
  134. package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs.map +1 -1
  135. package/fesm2022/rt-tools-ui-kit-v2-popover.mjs +438 -309
  136. package/fesm2022/rt-tools-ui-kit-v2-popover.mjs.map +1 -1
  137. package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs +135 -45
  138. package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs.map +1 -1
  139. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs +293 -171
  140. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs.map +1 -1
  141. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs +62 -55
  142. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs.map +1 -1
  143. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +3379 -1466
  144. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
  145. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs +114 -116
  146. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs.map +1 -1
  147. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs +406 -299
  148. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs.map +1 -1
  149. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs +137 -36
  150. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs.map +1 -1
  151. package/fesm2022/rt-tools-ui-kit-v2-select.mjs +687 -468
  152. package/fesm2022/rt-tools-ui-kit-v2-select.mjs.map +1 -1
  153. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs +2195 -1569
  154. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs.map +1 -1
  155. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs +187 -48
  156. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs.map +1 -1
  157. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs +242 -122
  158. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs.map +1 -1
  159. package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs +439 -0
  160. package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs.map +1 -0
  161. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs +218 -69
  162. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs.map +1 -1
  163. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs +292 -91
  164. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs.map +1 -1
  165. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +225 -138
  166. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -1
  167. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs +150 -116
  168. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs.map +1 -1
  169. package/fesm2022/rt-tools-ui-kit-v2-table.mjs +2462 -1583
  170. package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
  171. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +647 -346
  172. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
  173. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs +335 -121
  174. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs.map +1 -1
  175. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs +217 -84
  176. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs.map +1 -1
  177. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs +151 -72
  178. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs.map +1 -1
  179. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +697 -226
  180. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -1
  181. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs +92 -38
  182. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs.map +1 -1
  183. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs +752 -338
  184. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs.map +1 -1
  185. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +310 -129
  186. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -1
  187. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs +286 -158
  188. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs.map +1 -1
  189. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +270 -134
  190. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -1
  191. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs +322 -202
  192. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs.map +1 -1
  193. package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs +908 -0
  194. package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs.map +1 -0
  195. package/fesm2022/rt-tools-ui-kit-v2-tree.mjs +785 -0
  196. package/fesm2022/rt-tools-ui-kit-v2-tree.mjs.map +1 -0
  197. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs +118 -63
  198. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs.map +1 -1
  199. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +783 -262
  200. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
  201. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +633 -294
  202. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
  203. package/fesm2022/rt-tools-ui-kit-v2.mjs +100 -103
  204. package/package.json +41 -1
  205. package/src/assets/icons/collapse-all.svg +9 -0
  206. package/src/assets/icons/expand-all.svg +9 -0
  207. package/src/assets/icons-material/collapse-all.fill.svg +5 -0
  208. package/src/assets/icons-material/collapse-all.svg +5 -0
  209. package/src/assets/icons-material/expand-all.fill.svg +5 -0
  210. package/src/assets/icons-material/expand-all.svg +5 -0
  211. package/src/assets/icons-material/undo.fill.svg +5 -0
  212. package/src/assets/icons-material/undo.svg +5 -0
  213. package/src/lib/components/bottom-sheet/CONTEXT.md +20 -2
  214. package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +35 -1
  215. package/src/lib/components/breadcrumbs/CONTEXT.md +37 -0
  216. package/src/lib/components/breadcrumbs/rt-breadcrumbs.component.scss +205 -0
  217. package/src/lib/components/carousel/CONTEXT.md +42 -0
  218. package/src/lib/components/carousel/rt-carousel.component.scss +117 -0
  219. package/src/lib/components/checkbox/CONTEXT.md +3 -0
  220. package/src/lib/components/checkbox/rt-checkbox.component.scss +9 -3
  221. package/src/lib/components/color-palette/CONTEXT.md +49 -0
  222. package/src/lib/components/color-palette/picker/rt-color-picker.component.scss +161 -0
  223. package/src/lib/components/color-palette/rt-color-palette.component.scss +132 -0
  224. package/src/lib/components/draggable-tree/CONTEXT.md +54 -0
  225. package/src/lib/components/draggable-tree/rt-draggable-tree.component.scss +219 -0
  226. package/src/lib/components/hybrid-tree/CONTEXT.md +31 -0
  227. package/src/lib/components/hybrid-tree-selector/CONTEXT.md +25 -0
  228. package/src/lib/components/icon-button/CONTEXT.md +3 -0
  229. package/src/lib/components/inline-edit/CONTEXT.md +41 -0
  230. package/src/lib/components/inline-edit/rt-inline-edit.component.scss +274 -0
  231. package/src/lib/components/popover/CONTEXT.md +3 -0
  232. package/src/lib/components/speed-menu/CONTEXT.md +34 -0
  233. package/src/lib/components/speed-menu/rt-speed-menu.component.scss +118 -0
  234. package/src/lib/components/tag/rt-tag.component.scss +12 -0
  235. package/src/lib/components/thread-list/CONTEXT.md +1 -0
  236. package/src/lib/components/thread-list/rt-thread-list.component.scss +2 -1
  237. package/src/lib/components/toolbar/CONTEXT.md +9 -4
  238. package/src/lib/components/toolbar/rt-toolbar.component.scss +10 -2
  239. package/src/lib/components/tooltip/CONTEXT.md +8 -1
  240. package/src/lib/components/tree/CONTEXT.md +66 -0
  241. package/src/lib/components/tree/rt-tree.component.scss +313 -0
  242. package/src/lib/components/tree-selector/CONTEXT.md +47 -0
  243. package/src/lib/components/tree-selector/rt-tree-selector.component.scss +121 -0
  244. package/src/styles/_primitives.scss +4 -0
  245. package/styles/tokens.css +3 -0
  246. package/types/rt-tools-ui-kit-v2-accordion.d.ts +31 -24
  247. package/types/rt-tools-ui-kit-v2-action-bar.d.ts +112 -91
  248. package/types/rt-tools-ui-kit-v2-ai-run-status.d.ts +64 -40
  249. package/types/rt-tools-ui-kit-v2-aside-section.d.ts +13 -10
  250. package/types/rt-tools-ui-kit-v2-aside.d.ts +268 -206
  251. package/types/rt-tools-ui-kit-v2-autocomplete.d.ts +102 -61
  252. package/types/rt-tools-ui-kit-v2-bar-list.d.ts +39 -27
  253. package/types/rt-tools-ui-kit-v2-bottom-sheet.d.ts +31 -20
  254. package/types/rt-tools-ui-kit-v2-breadcrumbs.d.ts +89 -0
  255. package/types/rt-tools-ui-kit-v2-button.d.ts +119 -59
  256. package/types/rt-tools-ui-kit-v2-calendar.d.ts +151 -86
  257. package/types/rt-tools-ui-kit-v2-card.d.ts +42 -21
  258. package/types/rt-tools-ui-kit-v2-carousel.d.ts +76 -0
  259. package/types/rt-tools-ui-kit-v2-checkbox.d.ts +48 -24
  260. package/types/rt-tools-ui-kit-v2-collapsible-text.d.ts +28 -20
  261. package/types/rt-tools-ui-kit-v2-color-palette.d.ts +208 -0
  262. package/types/rt-tools-ui-kit-v2-confirm-popover.d.ts +104 -47
  263. package/types/rt-tools-ui-kit-v2-container.d.ts +278 -221
  264. package/types/rt-tools-ui-kit-v2-copy-value.d.ts +39 -24
  265. package/types/rt-tools-ui-kit-v2-core.d.ts +856 -865
  266. package/types/rt-tools-ui-kit-v2-counter-row.d.ts +20 -12
  267. package/types/rt-tools-ui-kit-v2-counter.d.ts +70 -38
  268. package/types/rt-tools-ui-kit-v2-data-list.d.ts +429 -264
  269. package/types/rt-tools-ui-kit-v2-data-table.d.ts +500 -351
  270. package/types/rt-tools-ui-kit-v2-date-picker.d.ts +164 -138
  271. package/types/rt-tools-ui-kit-v2-date-range.d.ts +102 -84
  272. package/types/rt-tools-ui-kit-v2-delta-view.d.ts +16 -13
  273. package/types/rt-tools-ui-kit-v2-detail-list.d.ts +23 -16
  274. package/types/rt-tools-ui-kit-v2-dialog.d.ts +130 -101
  275. package/types/rt-tools-ui-kit-v2-dot-field.d.ts +10 -13
  276. package/types/rt-tools-ui-kit-v2-download-link.d.ts +22 -17
  277. package/types/rt-tools-ui-kit-v2-draggable-tree.d.ts +132 -0
  278. package/types/rt-tools-ui-kit-v2-dynamic-list.d.ts +185 -96
  279. package/types/rt-tools-ui-kit-v2-dynamic-selector.d.ts +904 -404
  280. package/types/rt-tools-ui-kit-v2-empty-state.d.ts +48 -19
  281. package/types/rt-tools-ui-kit-v2-expansion-panel.d.ts +67 -39
  282. package/types/rt-tools-ui-kit-v2-field.d.ts +90 -49
  283. package/types/rt-tools-ui-kit-v2-file-card.d.ts +115 -75
  284. package/types/rt-tools-ui-kit-v2-file-drop.d.ts +75 -48
  285. package/types/rt-tools-ui-kit-v2-file-input.d.ts +53 -36
  286. package/types/rt-tools-ui-kit-v2-file-list.d.ts +5 -8
  287. package/types/rt-tools-ui-kit-v2-filter-control.d.ts +83 -49
  288. package/types/rt-tools-ui-kit-v2-form-control.d.ts +102 -74
  289. package/types/rt-tools-ui-kit-v2-header.d.ts +40 -22
  290. package/types/rt-tools-ui-kit-v2-hybrid-tree-selector.d.ts +14 -0
  291. package/types/rt-tools-ui-kit-v2-hybrid-tree.d.ts +72 -0
  292. package/types/rt-tools-ui-kit-v2-icon-button.d.ts +190 -90
  293. package/types/rt-tools-ui-kit-v2-icon.d.ts +160 -129
  294. package/types/rt-tools-ui-kit-v2-image-cropper.d.ts +151 -111
  295. package/types/rt-tools-ui-kit-v2-image-upload.d.ts +159 -85
  296. package/types/rt-tools-ui-kit-v2-info-item.d.ts +26 -13
  297. package/types/rt-tools-ui-kit-v2-inline-edit.d.ts +194 -0
  298. package/types/rt-tools-ui-kit-v2-input-number.d.ts +102 -53
  299. package/types/rt-tools-ui-kit-v2-input.d.ts +82 -43
  300. package/types/rt-tools-ui-kit-v2-live-badge.d.ts +30 -17
  301. package/types/rt-tools-ui-kit-v2-logo.d.ts +49 -32
  302. package/types/rt-tools-ui-kit-v2-markdown-text.d.ts +26 -17
  303. package/types/rt-tools-ui-kit-v2-menu.d.ts +272 -155
  304. package/types/rt-tools-ui-kit-v2-message.d.ts +59 -33
  305. package/types/rt-tools-ui-kit-v2-money-list.d.ts +36 -18
  306. package/types/rt-tools-ui-kit-v2-multiselect.d.ts +114 -80
  307. package/types/rt-tools-ui-kit-v2-night-grid.d.ts +34 -25
  308. package/types/rt-tools-ui-kit-v2-note.d.ts +12 -9
  309. package/types/rt-tools-ui-kit-v2-notifications-bell.d.ts +37 -16
  310. package/types/rt-tools-ui-kit-v2-page-header.d.ts +218 -150
  311. package/types/rt-tools-ui-kit-v2-pagination.d.ts +99 -63
  312. package/types/rt-tools-ui-kit-v2-photo-viewer.d.ts +61 -66
  313. package/types/rt-tools-ui-kit-v2-popover.d.ts +116 -55
  314. package/types/rt-tools-ui-kit-v2-prompt-suggestion.d.ts +26 -16
  315. package/types/rt-tools-ui-kit-v2-radio-button.d.ts +85 -43
  316. package/types/rt-tools-ui-kit-v2-radius.d.ts +18 -15
  317. package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +931 -590
  318. package/types/rt-tools-ui-kit-v2-ripple.d.ts +28 -25
  319. package/types/rt-tools-ui-kit-v2-scroll-area.d.ts +60 -58
  320. package/types/rt-tools-ui-kit-v2-section-nav.d.ts +32 -22
  321. package/types/rt-tools-ui-kit-v2-select.d.ts +182 -139
  322. package/types/rt-tools-ui-kit-v2-side-menu.d.ts +452 -349
  323. package/types/rt-tools-ui-kit-v2-skeleton-wrapper.d.ts +53 -20
  324. package/types/rt-tools-ui-kit-v2-skeleton.d.ts +55 -26
  325. package/types/rt-tools-ui-kit-v2-speed-menu.d.ts +131 -0
  326. package/types/rt-tools-ui-kit-v2-spinner.d.ts +56 -28
  327. package/types/rt-tools-ui-kit-v2-split-button.d.ts +96 -55
  328. package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +88 -60
  329. package/types/rt-tools-ui-kit-v2-stepper.d.ts +50 -37
  330. package/types/rt-tools-ui-kit-v2-table.d.ts +631 -480
  331. package/types/rt-tools-ui-kit-v2-tabs.d.ts +198 -113
  332. package/types/rt-tools-ui-kit-v2-tag.d.ts +106 -53
  333. package/types/rt-tools-ui-kit-v2-textarea.d.ts +48 -25
  334. package/types/rt-tools-ui-kit-v2-theme-toggle.d.ts +28 -26
  335. package/types/rt-tools-ui-kit-v2-thread-list.d.ts +154 -94
  336. package/types/rt-tools-ui-kit-v2-timeline.d.ts +30 -28
  337. package/types/rt-tools-ui-kit-v2-toast.d.ts +174 -98
  338. package/types/rt-tools-ui-kit-v2-toggle-button-group.d.ts +132 -86
  339. package/types/rt-tools-ui-kit-v2-toggle-switch.d.ts +88 -50
  340. package/types/rt-tools-ui-kit-v2-toolbar.d.ts +30 -27
  341. package/types/rt-tools-ui-kit-v2-tooltip.d.ts +65 -41
  342. package/types/rt-tools-ui-kit-v2-tree-selector.d.ts +257 -0
  343. package/types/rt-tools-ui-kit-v2-tree.d.ts +282 -0
  344. package/types/rt-tools-ui-kit-v2-welcome-dialog.d.ts +21 -24
  345. package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +195 -124
  346. package/types/rt-tools-ui-kit-v2-workspace.d.ts +122 -79
  347. package/types/rt-tools-ui-kit-v2.d.ts +100 -90
  348. package/fesm2022/rt-tools-ui-kit-v2.mjs.map +0 -1
@@ -1,312 +1,441 @@
1
- import { Overlay, ScrollStrategyOptions, OverlayConfig } from '@angular/cdk/overlay';
2
- import { TemplatePortal } from '@angular/cdk/portal';
3
- import * as i0 from '@angular/core';
4
- import { inject, ElementRef, ViewContainerRef, DestroyRef, signal, input, booleanAttribute, numberAttribute, output, Directive } from '@angular/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { Subject, switchMap, merge, map } from 'rxjs';
7
- import { carryThemeScope, materialPresetClassesOf } from '@rt-tools/ui-kit-v2/core';
8
-
1
+ import { Overlay, OverlayConfig, ScrollStrategyOptions } from "@angular/cdk/overlay";
2
+ import { TemplatePortal } from "@angular/cdk/portal";
3
+ import * as i0 from "@angular/core";
4
+ import { DestroyRef, Directive, ElementRef, ViewContainerRef, booleanAttribute, inject, input, numberAttribute, output, signal } from "@angular/core";
5
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
+ import { Subject, map, merge, switchMap } from "rxjs";
7
+ import { carryThemeScope, materialPresetClassesOf } from "@rt-tools/ui-kit-v2/core";
9
8
  const HOVER_CLOSE_DELAY_MS = 100;
10
- /**
11
- * Высота, ниже которой ужимать панель под вьюпорт бессмысленно: в такой полосе не
12
- * видно и одного пункта. Нужна только режиму `fitViewport` — по ней CDK решает,
13
- * что свободного места под триггером хватает.
14
- */
15
9
  const FIT_VIEWPORT_MIN_HEIGHT_PX = 120;
16
- /**
17
- * Переиспользуемый popover-примитив поверх CDK Overlay. Привязывает плавающую
18
- * панель (`<ng-template>`) к host-элементу. Движок — CDK Overlay
19
- * (`flexibleConnectedTo`): авто-flip у края viewport, reposition при скролле,
20
- * outside-click и Escape закрытие из коробки — без ручного `position: absolute`
21
- * в `:host` (тот резался `overflow: hidden` предками: таблицы, aside, карточки).
22
- *
23
- * Триггеры:
24
- * - `click` (default) — toggle по клику на host; outside-click закрывает.
25
- * - `hover` — открытие на `mouseenter`, закрытие с grace-периодом на `mouseleave`
26
- * (наведение на панель удерживает её открытой).
27
- * - `manual` — авто-listener'ы не вешаются; host сам зовёт `open()/close()`.
28
- * Используется form-control'ами с собственным жестом (autocomplete — открытие
29
- * по набору текста).
30
- *
31
- * `open()/close()/toggle()/isOpen()` публичны во ВСЕХ режимах — `trigger` лишь
32
- * определяет авто-listener'ы. `width: 'trigger'` синхронизирует ширину панели с
33
- * host'ом (dropdown'ы), `'trigger-min'` не даёт панели стать уже host'а и дальше пускает
34
- * её по содержимому, `'auto'` — content-sized (тултипы).
35
- */
36
- class RtPopoverDirective {
37
- #overlay;
38
- #elementRef;
39
- #viewContainerRef;
40
- #scrollStrategies;
41
- #destroyRef;
42
- #overlayCreatedSource;
43
- #overlayRef;
44
- #hoverCloseTimer;
45
- constructor() {
46
- this.#overlay = inject(Overlay);
47
- this.#elementRef = inject(ElementRef);
48
- this.#viewContainerRef = inject(ViewContainerRef);
49
- this.#scrollStrategies = inject(ScrollStrategyOptions);
50
- this.#destroyRef = inject(DestroyRef);
51
- this.#overlayCreatedSource = new Subject();
52
- this.#overlayRef = null;
53
- this.#hoverCloseTimer = null;
54
- this.isOpenState = signal(false, /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "isOpenState" }] : /* istanbul ignore next */ []));
56
- this.template = input(null, { ...(ngDevMode ? { debugName: "template" } : /* istanbul ignore next */ {}), alias: 'rtPopover' });
57
- this.trigger = input('click', { ...(ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {}), alias: 'rtPopoverTrigger' });
58
- this.width = input('auto', { ...(ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {}), alias: 'rtPopoverWidth' });
59
- /** `end` — панель прижата к правому краю host'а (триггеры у правого края viewport). */
60
- this.align = input('start', { ...(ngDevMode ? { debugName: "align" } : /* istanbul ignore next */ {}), alias: 'rtPopoverAlign' });
61
- /**
62
- * Панель обязана уместиться во вьюпорт: не влезающая по ширине сдвигается от
63
- * края экрана внутрь, не влезающая по высоте ужимается до свободного места под
64
- * триггером, и содержимое в ней прокручивается.
65
- *
66
- * По умолчанию выключено: панель стоит ровно там, куда её ставит привязка к
67
- * триггеру, даже если часть её ушла за экран. Включать там, где панель широкая
68
- * или высокая настолько, что привязка сама по себе её не удерживает, — иначе
69
- * пункты навигации остаются за краем экрана и недостижимы.
70
- */
71
- this.fitViewport = input(false, { ...(ngDevMode ? { debugName: "fitViewport" } : /* istanbul ignore next */ {}), alias: 'rtPopoverFitViewport',
72
- transform: booleanAttribute });
73
- this.context = input(null, { ...(ngDevMode ? { debugName: "context" } : /* istanbul ignore next */ {}), alias: 'rtPopoverContext' });
74
- this.panelClass = input('', { ...(ngDevMode ? { debugName: "panelClass" } : /* istanbul ignore next */ {}), alias: 'rtPopoverPanelClass' });
75
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), alias: 'rtPopoverDisabled',
76
- transform: booleanAttribute });
77
- this.offsetY = input(4, { ...(ngDevMode ? { debugName: "offsetY" } : /* istanbul ignore next */ {}), alias: 'rtPopoverOffsetY',
78
- transform: numberAttribute });
79
- this.offsetX = input(0, { ...(ngDevMode ? { debugName: "offsetX" } : /* istanbul ignore next */ {}), alias: 'rtPopoverOffsetX',
80
- transform: numberAttribute });
81
- this.opened = output({ alias: 'rtPopoverOpened' });
82
- this.closed = output({ alias: 'rtPopoverClosed' });
83
- this.isOpen = this.isOpenState.asReadonly();
84
- // Outside-click / ESC подписки на единожды создаваемый overlay живут в
85
- // одном конструкторном стриме: #ensureOverlay эмитит OverlayRef после
86
- // создания (ровно один раз за жизнь директивы), стрим живёт до destroy.
87
- this.#overlayCreatedSource
88
- .pipe(switchMap((overlayRef) => merge(overlayRef.outsidePointerEvents().pipe(map((event) => () => {
89
- // Клик по host в режиме click обрабатывает onHostClick (toggle) —
90
- // не закрываем здесь, иначе двойной toggle (close + open).
91
- if (this.#elementRef.nativeElement.contains(event.target)) {
92
- return;
93
- }
94
- // Клик по вложенной панели — не клик снаружи: закрытие
95
- // разрушило бы её вместе с нашей до того, как выбор
96
- // дойдёт до обработчика
97
- if (this.#isNestedOverlay(event.target)) {
98
- return;
99
- }
100
- this.close();
101
- })), overlayRef.keydownEvents().pipe(map((event) => () => {
102
- if (event.key === 'Escape') {
103
- event.preventDefault();
104
- this.close();
105
- }
106
- })))), takeUntilDestroyed(this.#destroyRef))
107
- .subscribe((handleCloseIntent) => handleCloseIntent());
108
- }
109
- ngOnDestroy() {
110
- this.#clearHoverTimer();
111
- this.#disposeOverlay();
112
- }
113
- open() {
114
- if (this.disabled() || this.isOpenState() || this.template() === null) {
115
- return;
116
- }
117
- const overlayRef = this.#ensureOverlay();
118
- const hostWidth = this.#elementRef.nativeElement.offsetWidth;
119
- const sizeByWidth = {
120
- trigger: { width: hostWidth },
121
- 'trigger-min': { minWidth: hostWidth },
122
- auto: {},
123
- };
124
- overlayRef.updateSize(sizeByWidth[this.width()]);
125
- // Тема куска `rtTheme` вокруг host'а едет на коробку панели: панель лежит в конце
126
- // страницы, и без этого список из тёмной карточки рисовался темой страницы.
127
- carryThemeScope(overlayRef.overlayElement, this.#elementRef.nativeElement);
128
- const portal = new TemplatePortal(this.template(), this.#viewContainerRef, {
129
- $implicit: this.context(),
130
- });
131
- overlayRef.attach(portal);
132
- this.isOpenState.set(true);
133
- this.opened.emit();
134
- }
135
- close() {
136
- if (!this.isOpenState()) {
137
- return;
138
- }
139
- this.#overlayRef?.detach();
140
- this.isOpenState.set(false);
141
- this.closed.emit();
142
- }
143
- toggle() {
144
- if (this.isOpenState()) {
145
- this.close();
146
- }
147
- else {
148
- this.open();
149
- }
150
- }
151
- // --- авто-triggers (HostListener'ы навешиваются на host безусловно, но
152
- // проверяют активный режим — это дешевле, чем условная подписка) ---
153
- onHostClick() {
154
- if (this.trigger() !== 'click' || this.disabled()) {
155
- return;
156
- }
157
- this.toggle();
158
- }
159
- onHostMouseEnter() {
160
- if (this.trigger() !== 'hover') {
161
- return;
162
- }
163
- this.#clearHoverTimer();
164
- this.open();
165
- }
166
- onHostMouseLeave(event) {
167
- if (this.trigger() !== 'hover') {
168
- return;
169
- }
170
- if (this.#isNestedOverlay(event.relatedTarget)) {
171
- return;
172
- }
173
- this.#scheduleHoverClose();
174
- }
175
- #ensureOverlay() {
176
- if (this.#overlayRef !== null) {
177
- return this.#overlayRef;
178
- }
179
- const alignX = this.align();
180
- const positions = [
181
- {
182
- originX: alignX,
183
- originY: 'bottom',
184
- overlayX: alignX,
185
- overlayY: 'top',
186
- offsetX: this.offsetX(),
187
- offsetY: this.offsetY(),
188
- },
189
- {
190
- originX: alignX,
191
- originY: 'top',
192
- overlayX: alignX,
193
- overlayY: 'bottom',
194
- offsetX: this.offsetX(),
195
- offsetY: -this.offsetY(),
196
- },
197
- ];
198
- // Сдвиг к краю экрана и ужатие по высоте включаются только по просьбе
199
- // потребителя: панель, которая и так помещается, обязана стоять у своего
200
- // триггера — меню строки таблицы, подтверждение, меню профиля.
201
- const fitViewport = this.fitViewport();
202
- const positionStrategy = this.#overlay
203
- .position()
204
- .flexibleConnectedTo(this.#elementRef)
205
- .withPush(fitViewport)
206
- .withFlexibleDimensions(fitViewport)
207
- // Отступ от края экрана равен отступу от триггера: свободное место
208
- // считается без него, и ужатая по высоте панель свисала бы за нижний
209
- // край ровно на этот отступ — вместе со своей рамкой.
210
- .withViewportMargin(fitViewport ? Math.abs(this.offsetY()) : 0)
211
- .withPositions(positions);
212
- const config = new OverlayConfig({
213
- positionStrategy,
214
- scrollStrategy: this.#scrollStrategies.reposition(),
215
- hasBackdrop: false,
216
- panelClass: this.#resolvePanelClasses(),
217
- // Порог, ниже которого свободного места под триггером считается
218
- // недостаточно и панель не ужимается, а сдвигается целиком.
219
- minHeight: fitViewport ? FIT_VIEWPORT_MIN_HEIGHT_PX : undefined,
220
- });
221
- const overlayRef = this.#overlay.create(config);
222
- // Hover-bridge: при переходе курсора с host'а на панель отложенный close
223
- // (grace-период) гасится; уход с панели планирует его заново. Без этого
224
- // hover-popover закрывался бы по таймеру, как только мышь покидает host.
225
- // Listeners живут на overlay-элементе и умирают вместе с ним в dispose().
226
- overlayRef.overlayElement.addEventListener('mouseenter', () => {
227
- if (this.trigger() === 'hover') {
228
- this.#clearHoverTimer();
229
- }
230
- });
231
- overlayRef.overlayElement.addEventListener('mouseleave', (event) => {
232
- if (this.trigger() === 'hover' && !this.#isNestedOverlay(event.relatedTarget)) {
233
- this.#scheduleHoverClose();
234
- }
235
- });
236
- // Outside-click / ESC подписки объявлены один раз в конструкторе —
237
- // здесь только эмит созданного OverlayRef (см. #overlayCreatedSource-стрим).
238
- this.#overlayCreatedSource.next(overlayRef);
239
- this.#overlayRef = overlayRef;
240
- return overlayRef;
241
- }
242
- /**
243
- * Панель, открытая из нашей — список `rt-select`, календарь, вложенное меню.
244
- *
245
- * В DOM она лежит не внутри нашей панели, а рядом, отдельным оверлеем CDK.
246
- * Поэтому и уход курсора на неё, и клик по ней выглядят как «ушёл наружу»:
247
- * меню профиля закрывалось прямо под рукой, стоило потянуться к списку
248
- * языков, а выбранное значение до обработчика не доходило — панель со
249
- * `rt-select` разрушалась раньше.
250
- *
251
- * Вложенность определяется порядком в контейнере оверлеев: CDK добавляет их
252
- * по мере открытия, поэтому панель, открытая из нашей, всегда следует за
253
- * нашей. Соседний оверлей, открытый до нас, этой проверкой не удерживается —
254
- * клик по нему закрывает попап, как и любой клик снаружи.
255
- */
256
- #isNestedOverlay(target) {
257
- const panel = this.#overlayRef?.overlayElement;
258
- if (!panel || !(target instanceof Element)) {
259
- return false;
260
- }
261
- const nested = target.closest('.cdk-overlay-pane');
262
- const container = panel.parentElement;
263
- if (nested === null || nested === panel || container === null) {
264
- return false;
265
- }
266
- // `querySelectorAll` отдаёт узлы в порядке документа — им и меряется,
267
- // какая панель открыта позже
268
- const panes = Array.from(container.querySelectorAll('.cdk-overlay-pane'));
269
- return panes.indexOf(nested) > panes.indexOf(panel);
270
- }
271
- #resolvePanelClasses() {
272
- const base = 'rt-popover-panel';
273
- const extra = this.panelClass().trim();
274
- const preset = materialPresetClassesOf(this.#elementRef.nativeElement);
275
- return extra ? [base, ...extra.split(/\s+/), ...preset] : [base, ...preset];
276
- }
277
- #scheduleHoverClose() {
278
- this.#clearHoverTimer();
279
- this.#hoverCloseTimer = setTimeout(() => this.close(), HOVER_CLOSE_DELAY_MS);
280
- }
281
- #clearHoverTimer() {
282
- if (this.#hoverCloseTimer !== null) {
283
- clearTimeout(this.#hoverCloseTimer);
284
- this.#hoverCloseTimer = null;
285
- }
286
- }
287
- #disposeOverlay() {
288
- this.#overlayRef?.dispose();
289
- this.#overlayRef = null;
290
- }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
292
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: RtPopoverDirective, isStandalone: true, selector: "[rtPopover]", inputs: { template: { classPropertyName: "template", publicName: "rtPopover", isSignal: true, isRequired: false, transformFunction: null }, trigger: { classPropertyName: "trigger", publicName: "rtPopoverTrigger", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "rtPopoverWidth", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "rtPopoverAlign", isSignal: true, isRequired: false, transformFunction: null }, fitViewport: { classPropertyName: "fitViewport", publicName: "rtPopoverFitViewport", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "rtPopoverContext", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "rtPopoverPanelClass", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "rtPopoverDisabled", isSignal: true, isRequired: false, transformFunction: null }, offsetY: { classPropertyName: "offsetY", publicName: "rtPopoverOffsetY", isSignal: true, isRequired: false, transformFunction: null }, offsetX: { classPropertyName: "offsetX", publicName: "rtPopoverOffsetX", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { opened: "rtPopoverOpened", closed: "rtPopoverClosed" }, host: { listeners: { "click": "onHostClick()", "mouseenter": "onHostMouseEnter()", "mouseleave": "onHostMouseLeave($event)" } }, exportAs: ["rtPopover"], ngImport: i0 }); }
293
- }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtPopoverDirective, decorators: [{
295
- type: Directive,
296
- args: [{
297
- selector: '[rtPopover]',
298
- exportAs: 'rtPopover',
299
- host: {
300
- '(click)': 'onHostClick()',
301
- '(mouseenter)': 'onHostMouseEnter()',
302
- '(mouseleave)': 'onHostMouseLeave($event)',
303
- },
304
- }]
305
- }], ctorParameters: () => [], propDecorators: { template: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopover", required: false }] }], trigger: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverTrigger", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverWidth", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverAlign", required: false }] }], fitViewport: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverFitViewport", required: false }] }], context: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverContext", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverPanelClass", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverDisabled", required: false }] }], offsetY: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverOffsetY", required: false }] }], offsetX: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtPopoverOffsetX", required: false }] }], opened: [{ type: i0.Output, args: ["rtPopoverOpened"] }], closed: [{ type: i0.Output, args: ["rtPopoverClosed"] }] } });
306
-
307
- /**
308
- * Generated bundle index. Do not edit.
309
- */
310
-
10
+ var RtPopoverDirective = class RtPopoverDirective {
11
+ #overlay;
12
+ #elementRef;
13
+ #viewContainerRef;
14
+ #scrollStrategies;
15
+ #destroyRef;
16
+ #overlayCreatedSource;
17
+ #overlayRef;
18
+ #positionStrategy;
19
+ #hoverCloseTimer;
20
+ constructor() {
21
+ this.#overlay = inject(Overlay);
22
+ this.#elementRef = inject(ElementRef);
23
+ this.#viewContainerRef = inject(ViewContainerRef);
24
+ this.#scrollStrategies = inject(ScrollStrategyOptions);
25
+ this.#destroyRef = inject(DestroyRef);
26
+ this.#overlayCreatedSource = new Subject();
27
+ this.#overlayRef = null;
28
+ this.#positionStrategy = null;
29
+ this.#hoverCloseTimer = null;
30
+ this.isOpenState = signal(false, ...ngDevMode ? [{ debugName: "isOpenState" }] : /* istanbul ignore next */ []);
31
+ this.template = input(null, {
32
+ ...ngDevMode ? { debugName: "template" } : /* istanbul ignore next */ {},
33
+ alias: "rtPopover"
34
+ });
35
+ this.trigger = input("click", {
36
+ ...ngDevMode ? { debugName: "trigger" } : /* istanbul ignore next */ {},
37
+ alias: "rtPopoverTrigger"
38
+ });
39
+ this.width = input("auto", {
40
+ ...ngDevMode ? { debugName: "width" } : /* istanbul ignore next */ {},
41
+ alias: "rtPopoverWidth"
42
+ });
43
+ this.align = input("start", {
44
+ ...ngDevMode ? { debugName: "align" } : /* istanbul ignore next */ {},
45
+ alias: "rtPopoverAlign"
46
+ });
47
+ this.fitViewport = input(false, {
48
+ ...ngDevMode ? { debugName: "fitViewport" } : /* istanbul ignore next */ {},
49
+ alias: "rtPopoverFitViewport",
50
+ transform: booleanAttribute
51
+ });
52
+ this.context = input(null, {
53
+ ...ngDevMode ? { debugName: "context" } : /* istanbul ignore next */ {},
54
+ alias: "rtPopoverContext"
55
+ });
56
+ this.panelClass = input("", {
57
+ ...ngDevMode ? { debugName: "panelClass" } : /* istanbul ignore next */ {},
58
+ alias: "rtPopoverPanelClass"
59
+ });
60
+ this.disabled = input(false, {
61
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
62
+ alias: "rtPopoverDisabled",
63
+ transform: booleanAttribute
64
+ });
65
+ this.offsetY = input(4, {
66
+ ...ngDevMode ? { debugName: "offsetY" } : /* istanbul ignore next */ {},
67
+ alias: "rtPopoverOffsetY",
68
+ transform: numberAttribute
69
+ });
70
+ this.offsetX = input(0, {
71
+ ...ngDevMode ? { debugName: "offsetX" } : /* istanbul ignore next */ {},
72
+ alias: "rtPopoverOffsetX",
73
+ transform: numberAttribute
74
+ });
75
+ this.positions = input(null, {
76
+ ...ngDevMode ? { debugName: "positions" } : /* istanbul ignore next */ {},
77
+ alias: "rtPopoverPositions"
78
+ });
79
+ this.opened = output({ alias: "rtPopoverOpened" });
80
+ this.closed = output({ alias: "rtPopoverClosed" });
81
+ this.isOpen = this.isOpenState.asReadonly();
82
+ this.#overlayCreatedSource.pipe(switchMap((overlayRef) => merge(overlayRef.outsidePointerEvents().pipe(map((event) => () => {
83
+ if (this.#elementRef.nativeElement.contains(event.target)) return;
84
+ if (this.#isNestedOverlay(event.target)) return;
85
+ this.close();
86
+ })), overlayRef.keydownEvents().pipe(map((event) => () => {
87
+ if (event.key === "Escape") {
88
+ event.preventDefault();
89
+ this.close();
90
+ }
91
+ })))), takeUntilDestroyed(this.#destroyRef)).subscribe((handleCloseIntent) => handleCloseIntent());
92
+ }
93
+ ngOnDestroy() {
94
+ this.#clearHoverTimer();
95
+ this.#disposeOverlay();
96
+ }
97
+ open() {
98
+ if (this.disabled() || this.isOpenState() || this.template() === null) return;
99
+ const overlayRef = this.#ensureOverlay();
100
+ const positions = this.positions();
101
+ if (positions !== null) this.#positionStrategy?.withPositions([...positions]);
102
+ const hostWidth = this.#elementRef.nativeElement.offsetWidth;
103
+ const sizeByWidth = {
104
+ trigger: { width: hostWidth },
105
+ "trigger-min": { minWidth: hostWidth },
106
+ auto: {}
107
+ };
108
+ overlayRef.updateSize(sizeByWidth[this.width()]);
109
+ carryThemeScope(overlayRef.overlayElement, this.#elementRef.nativeElement);
110
+ const portal = new TemplatePortal(this.template(), this.#viewContainerRef, { $implicit: this.context() });
111
+ overlayRef.attach(portal);
112
+ this.isOpenState.set(true);
113
+ this.opened.emit();
114
+ }
115
+ close() {
116
+ if (!this.isOpenState()) return;
117
+ this.#overlayRef?.detach();
118
+ this.isOpenState.set(false);
119
+ this.closed.emit();
120
+ }
121
+ toggle() {
122
+ if (this.isOpenState()) this.close();
123
+ else this.open();
124
+ }
125
+ onHostClick() {
126
+ if (this.trigger() !== "click" || this.disabled()) return;
127
+ this.toggle();
128
+ }
129
+ onHostMouseEnter() {
130
+ if (this.trigger() !== "hover") return;
131
+ this.#clearHoverTimer();
132
+ this.open();
133
+ }
134
+ onHostMouseLeave(event) {
135
+ if (this.trigger() !== "hover") return;
136
+ if (this.#isNestedOverlay(event.relatedTarget)) return;
137
+ this.#scheduleHoverClose();
138
+ }
139
+ #ensureOverlay() {
140
+ if (this.#overlayRef !== null) return this.#overlayRef;
141
+ const alignX = this.align();
142
+ const positions = [{
143
+ originX: alignX,
144
+ originY: "bottom",
145
+ overlayX: alignX,
146
+ overlayY: "top",
147
+ offsetX: this.offsetX(),
148
+ offsetY: this.offsetY()
149
+ }, {
150
+ originX: alignX,
151
+ originY: "top",
152
+ overlayX: alignX,
153
+ overlayY: "bottom",
154
+ offsetX: this.offsetX(),
155
+ offsetY: -this.offsetY()
156
+ }];
157
+ const fitViewport = this.fitViewport();
158
+ const positionStrategy = this.#overlay.position().flexibleConnectedTo(this.#elementRef).withPush(fitViewport).withFlexibleDimensions(fitViewport).withViewportMargin(fitViewport ? Math.abs(this.offsetY()) : 0).withPositions(positions);
159
+ this.#positionStrategy = positionStrategy;
160
+ const config = new OverlayConfig({
161
+ positionStrategy,
162
+ scrollStrategy: this.#scrollStrategies.reposition(),
163
+ hasBackdrop: false,
164
+ panelClass: this.#resolvePanelClasses(),
165
+ minHeight: fitViewport ? FIT_VIEWPORT_MIN_HEIGHT_PX : void 0
166
+ });
167
+ const overlayRef = this.#overlay.create(config);
168
+ overlayRef.overlayElement.addEventListener("mouseenter", () => {
169
+ if (this.trigger() === "hover") this.#clearHoverTimer();
170
+ });
171
+ overlayRef.overlayElement.addEventListener("mouseleave", (event) => {
172
+ if (this.trigger() === "hover" && !this.#isNestedOverlay(event.relatedTarget)) this.#scheduleHoverClose();
173
+ });
174
+ this.#overlayCreatedSource.next(overlayRef);
175
+ this.#overlayRef = overlayRef;
176
+ return overlayRef;
177
+ }
178
+ #isNestedOverlay(target) {
179
+ const panel = this.#overlayRef?.overlayElement;
180
+ if (!panel || !(target instanceof Element)) return false;
181
+ const nested = target.closest(".cdk-overlay-pane");
182
+ const container = panel.parentElement;
183
+ if (nested === null || nested === panel || container === null) return false;
184
+ const panes = Array.from(container.querySelectorAll(".cdk-overlay-pane"));
185
+ return panes.indexOf(nested) > panes.indexOf(panel);
186
+ }
187
+ #resolvePanelClasses() {
188
+ const base = "rt-popover-panel";
189
+ const extra = this.panelClass().trim();
190
+ const preset = materialPresetClassesOf(this.#elementRef.nativeElement);
191
+ return extra ? [
192
+ base,
193
+ ...extra.split(/\s+/),
194
+ ...preset
195
+ ] : [base, ...preset];
196
+ }
197
+ #scheduleHoverClose() {
198
+ this.#clearHoverTimer();
199
+ this.#hoverCloseTimer = setTimeout(() => this.close(), HOVER_CLOSE_DELAY_MS);
200
+ }
201
+ #clearHoverTimer() {
202
+ if (this.#hoverCloseTimer !== null) {
203
+ clearTimeout(this.#hoverCloseTimer);
204
+ this.#hoverCloseTimer = null;
205
+ }
206
+ }
207
+ #disposeOverlay() {
208
+ this.#overlayRef?.dispose();
209
+ this.#overlayRef = null;
210
+ this.#positionStrategy = null;
211
+ }
212
+ static {
213
+ this.ɵfac = i0.ɵɵngDeclareFactory({
214
+ minVersion: "12.0.0",
215
+ version: "22.2.2",
216
+ ngImport: i0,
217
+ type: RtPopoverDirective,
218
+ deps: [],
219
+ target: i0.ɵɵFactoryTarget.Directive
220
+ });
221
+ }
222
+ static {
223
+ this.ɵdir = i0.ɵɵngDeclareDirective({
224
+ minVersion: "17.1.0",
225
+ version: "22.2.2",
226
+ type: RtPopoverDirective,
227
+ isStandalone: true,
228
+ selector: "[rtPopover]",
229
+ inputs: {
230
+ template: {
231
+ classPropertyName: "template",
232
+ publicName: "rtPopover",
233
+ isSignal: true,
234
+ isRequired: false,
235
+ transformFunction: null
236
+ },
237
+ trigger: {
238
+ classPropertyName: "trigger",
239
+ publicName: "rtPopoverTrigger",
240
+ isSignal: true,
241
+ isRequired: false,
242
+ transformFunction: null
243
+ },
244
+ width: {
245
+ classPropertyName: "width",
246
+ publicName: "rtPopoverWidth",
247
+ isSignal: true,
248
+ isRequired: false,
249
+ transformFunction: null
250
+ },
251
+ align: {
252
+ classPropertyName: "align",
253
+ publicName: "rtPopoverAlign",
254
+ isSignal: true,
255
+ isRequired: false,
256
+ transformFunction: null
257
+ },
258
+ fitViewport: {
259
+ classPropertyName: "fitViewport",
260
+ publicName: "rtPopoverFitViewport",
261
+ isSignal: true,
262
+ isRequired: false,
263
+ transformFunction: null
264
+ },
265
+ context: {
266
+ classPropertyName: "context",
267
+ publicName: "rtPopoverContext",
268
+ isSignal: true,
269
+ isRequired: false,
270
+ transformFunction: null
271
+ },
272
+ panelClass: {
273
+ classPropertyName: "panelClass",
274
+ publicName: "rtPopoverPanelClass",
275
+ isSignal: true,
276
+ isRequired: false,
277
+ transformFunction: null
278
+ },
279
+ disabled: {
280
+ classPropertyName: "disabled",
281
+ publicName: "rtPopoverDisabled",
282
+ isSignal: true,
283
+ isRequired: false,
284
+ transformFunction: null
285
+ },
286
+ offsetY: {
287
+ classPropertyName: "offsetY",
288
+ publicName: "rtPopoverOffsetY",
289
+ isSignal: true,
290
+ isRequired: false,
291
+ transformFunction: null
292
+ },
293
+ offsetX: {
294
+ classPropertyName: "offsetX",
295
+ publicName: "rtPopoverOffsetX",
296
+ isSignal: true,
297
+ isRequired: false,
298
+ transformFunction: null
299
+ },
300
+ positions: {
301
+ classPropertyName: "positions",
302
+ publicName: "rtPopoverPositions",
303
+ isSignal: true,
304
+ isRequired: false,
305
+ transformFunction: null
306
+ }
307
+ },
308
+ outputs: {
309
+ opened: "rtPopoverOpened",
310
+ closed: "rtPopoverClosed"
311
+ },
312
+ host: { listeners: {
313
+ "click": "onHostClick()",
314
+ "mouseenter": "onHostMouseEnter()",
315
+ "mouseleave": "onHostMouseLeave($event)"
316
+ } },
317
+ exportAs: ["rtPopover"],
318
+ ngImport: i0
319
+ });
320
+ }
321
+ };
322
+ i0.ɵɵngDeclareClassMetadata({
323
+ minVersion: "12.0.0",
324
+ version: "22.2.2",
325
+ ngImport: i0,
326
+ type: RtPopoverDirective,
327
+ decorators: [{
328
+ type: Directive,
329
+ args: [{
330
+ selector: "[rtPopover]",
331
+ exportAs: "rtPopover",
332
+ host: {
333
+ "(click)": "onHostClick()",
334
+ "(mouseenter)": "onHostMouseEnter()",
335
+ "(mouseleave)": "onHostMouseLeave($event)"
336
+ }
337
+ }]
338
+ }],
339
+ ctorParameters: () => [],
340
+ propDecorators: {
341
+ template: [{
342
+ type: i0.Input,
343
+ args: [{
344
+ isSignal: true,
345
+ alias: "rtPopover",
346
+ required: false
347
+ }]
348
+ }],
349
+ trigger: [{
350
+ type: i0.Input,
351
+ args: [{
352
+ isSignal: true,
353
+ alias: "rtPopoverTrigger",
354
+ required: false
355
+ }]
356
+ }],
357
+ width: [{
358
+ type: i0.Input,
359
+ args: [{
360
+ isSignal: true,
361
+ alias: "rtPopoverWidth",
362
+ required: false
363
+ }]
364
+ }],
365
+ align: [{
366
+ type: i0.Input,
367
+ args: [{
368
+ isSignal: true,
369
+ alias: "rtPopoverAlign",
370
+ required: false
371
+ }]
372
+ }],
373
+ fitViewport: [{
374
+ type: i0.Input,
375
+ args: [{
376
+ isSignal: true,
377
+ alias: "rtPopoverFitViewport",
378
+ required: false
379
+ }]
380
+ }],
381
+ context: [{
382
+ type: i0.Input,
383
+ args: [{
384
+ isSignal: true,
385
+ alias: "rtPopoverContext",
386
+ required: false
387
+ }]
388
+ }],
389
+ panelClass: [{
390
+ type: i0.Input,
391
+ args: [{
392
+ isSignal: true,
393
+ alias: "rtPopoverPanelClass",
394
+ required: false
395
+ }]
396
+ }],
397
+ disabled: [{
398
+ type: i0.Input,
399
+ args: [{
400
+ isSignal: true,
401
+ alias: "rtPopoverDisabled",
402
+ required: false
403
+ }]
404
+ }],
405
+ offsetY: [{
406
+ type: i0.Input,
407
+ args: [{
408
+ isSignal: true,
409
+ alias: "rtPopoverOffsetY",
410
+ required: false
411
+ }]
412
+ }],
413
+ offsetX: [{
414
+ type: i0.Input,
415
+ args: [{
416
+ isSignal: true,
417
+ alias: "rtPopoverOffsetX",
418
+ required: false
419
+ }]
420
+ }],
421
+ positions: [{
422
+ type: i0.Input,
423
+ args: [{
424
+ isSignal: true,
425
+ alias: "rtPopoverPositions",
426
+ required: false
427
+ }]
428
+ }],
429
+ opened: [{
430
+ type: i0.Output,
431
+ args: ["rtPopoverOpened"]
432
+ }],
433
+ closed: [{
434
+ type: i0.Output,
435
+ args: ["rtPopoverClosed"]
436
+ }]
437
+ }
438
+ });
311
439
  export { RtPopoverDirective };
312
- //# sourceMappingURL=rt-tools-ui-kit-v2-popover.mjs.map
440
+
441
+ //# sourceMappingURL=rt-tools-ui-kit-v2-popover.mjs.map