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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) 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 +2321 -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-profile-menu.mjs +295 -0
  138. package/fesm2022/rt-tools-ui-kit-v2-profile-menu.mjs.map +1 -0
  139. package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs +135 -45
  140. package/fesm2022/rt-tools-ui-kit-v2-prompt-suggestion.mjs.map +1 -1
  141. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs +293 -171
  142. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs.map +1 -1
  143. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs +62 -55
  144. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs.map +1 -1
  145. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +3379 -1466
  146. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
  147. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs +114 -116
  148. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs.map +1 -1
  149. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs +406 -299
  150. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs.map +1 -1
  151. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs +137 -36
  152. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs.map +1 -1
  153. package/fesm2022/rt-tools-ui-kit-v2-select.mjs +687 -468
  154. package/fesm2022/rt-tools-ui-kit-v2-select.mjs.map +1 -1
  155. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs +2195 -1569
  156. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs.map +1 -1
  157. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs +187 -48
  158. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs.map +1 -1
  159. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs +242 -122
  160. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs.map +1 -1
  161. package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs +439 -0
  162. package/fesm2022/rt-tools-ui-kit-v2-speed-menu.mjs.map +1 -0
  163. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs +218 -69
  164. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs.map +1 -1
  165. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs +292 -91
  166. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs.map +1 -1
  167. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +225 -138
  168. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -1
  169. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs +150 -116
  170. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs.map +1 -1
  171. package/fesm2022/rt-tools-ui-kit-v2-table.mjs +2462 -1583
  172. package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -1
  173. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +647 -346
  174. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -1
  175. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs +335 -121
  176. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs.map +1 -1
  177. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs +217 -84
  178. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs.map +1 -1
  179. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs +151 -72
  180. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs.map +1 -1
  181. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +697 -226
  182. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -1
  183. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs +92 -38
  184. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs.map +1 -1
  185. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs +752 -338
  186. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs.map +1 -1
  187. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +310 -129
  188. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -1
  189. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs +286 -158
  190. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs.map +1 -1
  191. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +270 -134
  192. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -1
  193. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs +322 -202
  194. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs.map +1 -1
  195. package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs +908 -0
  196. package/fesm2022/rt-tools-ui-kit-v2-tree-selector.mjs.map +1 -0
  197. package/fesm2022/rt-tools-ui-kit-v2-tree.mjs +785 -0
  198. package/fesm2022/rt-tools-ui-kit-v2-tree.mjs.map +1 -0
  199. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs +118 -63
  200. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs.map +1 -1
  201. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +783 -262
  202. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -1
  203. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +633 -294
  204. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -1
  205. package/fesm2022/rt-tools-ui-kit-v2.mjs +100 -103
  206. package/package.json +45 -1
  207. package/src/assets/icons/collapse-all.svg +9 -0
  208. package/src/assets/icons/expand-all.svg +9 -0
  209. package/src/assets/icons-material/collapse-all.fill.svg +5 -0
  210. package/src/assets/icons-material/collapse-all.svg +5 -0
  211. package/src/assets/icons-material/expand-all.fill.svg +5 -0
  212. package/src/assets/icons-material/expand-all.svg +5 -0
  213. package/src/assets/icons-material/undo.fill.svg +5 -0
  214. package/src/assets/icons-material/undo.svg +5 -0
  215. package/src/lib/components/bottom-sheet/CONTEXT.md +20 -2
  216. package/src/lib/components/bottom-sheet/rt-bottom-sheet.component.scss +36 -1
  217. package/src/lib/components/breadcrumbs/CONTEXT.md +37 -0
  218. package/src/lib/components/breadcrumbs/rt-breadcrumbs.component.scss +205 -0
  219. package/src/lib/components/carousel/CONTEXT.md +42 -0
  220. package/src/lib/components/carousel/rt-carousel.component.scss +117 -0
  221. package/src/lib/components/checkbox/CONTEXT.md +3 -0
  222. package/src/lib/components/checkbox/rt-checkbox.component.scss +9 -3
  223. package/src/lib/components/color-palette/CONTEXT.md +49 -0
  224. package/src/lib/components/color-palette/picker/rt-color-picker.component.scss +161 -0
  225. package/src/lib/components/color-palette/rt-color-palette.component.scss +132 -0
  226. package/src/lib/components/draggable-tree/CONTEXT.md +54 -0
  227. package/src/lib/components/draggable-tree/rt-draggable-tree.component.scss +219 -0
  228. package/src/lib/components/hybrid-tree/CONTEXT.md +31 -0
  229. package/src/lib/components/hybrid-tree-selector/CONTEXT.md +25 -0
  230. package/src/lib/components/icon-button/CONTEXT.md +3 -0
  231. package/src/lib/components/inline-edit/CONTEXT.md +41 -0
  232. package/src/lib/components/inline-edit/rt-inline-edit.component.scss +274 -0
  233. package/src/lib/components/popover/CONTEXT.md +3 -0
  234. package/src/lib/components/profile-menu/CONTEXT.md +32 -0
  235. package/src/lib/components/profile-menu/rt-profile-menu.component.scss +104 -0
  236. package/src/lib/components/speed-menu/CONTEXT.md +34 -0
  237. package/src/lib/components/speed-menu/rt-speed-menu.component.scss +118 -0
  238. package/src/lib/components/tag/rt-tag.component.scss +12 -0
  239. package/src/lib/components/thread-list/CONTEXT.md +1 -0
  240. package/src/lib/components/thread-list/rt-thread-list.component.scss +2 -1
  241. package/src/lib/components/toolbar/CONTEXT.md +9 -4
  242. package/src/lib/components/toolbar/rt-toolbar.component.scss +10 -2
  243. package/src/lib/components/tooltip/CONTEXT.md +8 -1
  244. package/src/lib/components/tree/CONTEXT.md +66 -0
  245. package/src/lib/components/tree/rt-tree.component.scss +313 -0
  246. package/src/lib/components/tree-selector/CONTEXT.md +47 -0
  247. package/src/lib/components/tree-selector/rt-tree-selector.component.scss +121 -0
  248. package/src/styles/_primitives.scss +4 -0
  249. package/src/styles/_semantic.scss +5 -0
  250. package/styles/tokens.css +43 -0
  251. package/types/rt-tools-ui-kit-v2-accordion.d.ts +31 -24
  252. package/types/rt-tools-ui-kit-v2-action-bar.d.ts +112 -91
  253. package/types/rt-tools-ui-kit-v2-ai-run-status.d.ts +64 -40
  254. package/types/rt-tools-ui-kit-v2-aside-section.d.ts +13 -10
  255. package/types/rt-tools-ui-kit-v2-aside.d.ts +268 -206
  256. package/types/rt-tools-ui-kit-v2-autocomplete.d.ts +102 -61
  257. package/types/rt-tools-ui-kit-v2-bar-list.d.ts +39 -27
  258. package/types/rt-tools-ui-kit-v2-bottom-sheet.d.ts +31 -20
  259. package/types/rt-tools-ui-kit-v2-breadcrumbs.d.ts +89 -0
  260. package/types/rt-tools-ui-kit-v2-button.d.ts +119 -59
  261. package/types/rt-tools-ui-kit-v2-calendar.d.ts +151 -86
  262. package/types/rt-tools-ui-kit-v2-card.d.ts +42 -21
  263. package/types/rt-tools-ui-kit-v2-carousel.d.ts +76 -0
  264. package/types/rt-tools-ui-kit-v2-checkbox.d.ts +48 -24
  265. package/types/rt-tools-ui-kit-v2-collapsible-text.d.ts +28 -20
  266. package/types/rt-tools-ui-kit-v2-color-palette.d.ts +208 -0
  267. package/types/rt-tools-ui-kit-v2-confirm-popover.d.ts +104 -47
  268. package/types/rt-tools-ui-kit-v2-container.d.ts +278 -221
  269. package/types/rt-tools-ui-kit-v2-copy-value.d.ts +39 -24
  270. package/types/rt-tools-ui-kit-v2-core.d.ts +862 -865
  271. package/types/rt-tools-ui-kit-v2-counter-row.d.ts +20 -12
  272. package/types/rt-tools-ui-kit-v2-counter.d.ts +70 -38
  273. package/types/rt-tools-ui-kit-v2-data-list.d.ts +429 -264
  274. package/types/rt-tools-ui-kit-v2-data-table.d.ts +500 -351
  275. package/types/rt-tools-ui-kit-v2-date-picker.d.ts +164 -138
  276. package/types/rt-tools-ui-kit-v2-date-range.d.ts +102 -84
  277. package/types/rt-tools-ui-kit-v2-delta-view.d.ts +16 -13
  278. package/types/rt-tools-ui-kit-v2-detail-list.d.ts +23 -16
  279. package/types/rt-tools-ui-kit-v2-dialog.d.ts +130 -101
  280. package/types/rt-tools-ui-kit-v2-dot-field.d.ts +10 -13
  281. package/types/rt-tools-ui-kit-v2-download-link.d.ts +22 -17
  282. package/types/rt-tools-ui-kit-v2-draggable-tree.d.ts +132 -0
  283. package/types/rt-tools-ui-kit-v2-dynamic-list.d.ts +185 -96
  284. package/types/rt-tools-ui-kit-v2-dynamic-selector.d.ts +904 -404
  285. package/types/rt-tools-ui-kit-v2-empty-state.d.ts +48 -19
  286. package/types/rt-tools-ui-kit-v2-expansion-panel.d.ts +67 -39
  287. package/types/rt-tools-ui-kit-v2-field.d.ts +90 -49
  288. package/types/rt-tools-ui-kit-v2-file-card.d.ts +115 -75
  289. package/types/rt-tools-ui-kit-v2-file-drop.d.ts +75 -48
  290. package/types/rt-tools-ui-kit-v2-file-input.d.ts +53 -36
  291. package/types/rt-tools-ui-kit-v2-file-list.d.ts +5 -8
  292. package/types/rt-tools-ui-kit-v2-filter-control.d.ts +83 -49
  293. package/types/rt-tools-ui-kit-v2-form-control.d.ts +102 -74
  294. package/types/rt-tools-ui-kit-v2-header.d.ts +40 -22
  295. package/types/rt-tools-ui-kit-v2-hybrid-tree-selector.d.ts +14 -0
  296. package/types/rt-tools-ui-kit-v2-hybrid-tree.d.ts +72 -0
  297. package/types/rt-tools-ui-kit-v2-icon-button.d.ts +190 -90
  298. package/types/rt-tools-ui-kit-v2-icon.d.ts +160 -129
  299. package/types/rt-tools-ui-kit-v2-image-cropper.d.ts +151 -111
  300. package/types/rt-tools-ui-kit-v2-image-upload.d.ts +159 -85
  301. package/types/rt-tools-ui-kit-v2-info-item.d.ts +26 -13
  302. package/types/rt-tools-ui-kit-v2-inline-edit.d.ts +194 -0
  303. package/types/rt-tools-ui-kit-v2-input-number.d.ts +102 -53
  304. package/types/rt-tools-ui-kit-v2-input.d.ts +82 -43
  305. package/types/rt-tools-ui-kit-v2-live-badge.d.ts +30 -17
  306. package/types/rt-tools-ui-kit-v2-logo.d.ts +49 -32
  307. package/types/rt-tools-ui-kit-v2-markdown-text.d.ts +26 -17
  308. package/types/rt-tools-ui-kit-v2-menu.d.ts +272 -155
  309. package/types/rt-tools-ui-kit-v2-message.d.ts +59 -33
  310. package/types/rt-tools-ui-kit-v2-money-list.d.ts +36 -18
  311. package/types/rt-tools-ui-kit-v2-multiselect.d.ts +114 -80
  312. package/types/rt-tools-ui-kit-v2-night-grid.d.ts +34 -25
  313. package/types/rt-tools-ui-kit-v2-note.d.ts +12 -9
  314. package/types/rt-tools-ui-kit-v2-notifications-bell.d.ts +37 -16
  315. package/types/rt-tools-ui-kit-v2-page-header.d.ts +218 -150
  316. package/types/rt-tools-ui-kit-v2-pagination.d.ts +99 -63
  317. package/types/rt-tools-ui-kit-v2-photo-viewer.d.ts +61 -66
  318. package/types/rt-tools-ui-kit-v2-popover.d.ts +116 -55
  319. package/types/rt-tools-ui-kit-v2-profile-menu.d.ts +103 -0
  320. package/types/rt-tools-ui-kit-v2-prompt-suggestion.d.ts +26 -16
  321. package/types/rt-tools-ui-kit-v2-radio-button.d.ts +85 -43
  322. package/types/rt-tools-ui-kit-v2-radius.d.ts +18 -15
  323. package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +931 -590
  324. package/types/rt-tools-ui-kit-v2-ripple.d.ts +28 -25
  325. package/types/rt-tools-ui-kit-v2-scroll-area.d.ts +60 -58
  326. package/types/rt-tools-ui-kit-v2-section-nav.d.ts +32 -22
  327. package/types/rt-tools-ui-kit-v2-select.d.ts +182 -139
  328. package/types/rt-tools-ui-kit-v2-side-menu.d.ts +452 -349
  329. package/types/rt-tools-ui-kit-v2-skeleton-wrapper.d.ts +53 -20
  330. package/types/rt-tools-ui-kit-v2-skeleton.d.ts +55 -26
  331. package/types/rt-tools-ui-kit-v2-speed-menu.d.ts +131 -0
  332. package/types/rt-tools-ui-kit-v2-spinner.d.ts +56 -28
  333. package/types/rt-tools-ui-kit-v2-split-button.d.ts +96 -55
  334. package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +88 -60
  335. package/types/rt-tools-ui-kit-v2-stepper.d.ts +50 -37
  336. package/types/rt-tools-ui-kit-v2-table.d.ts +631 -480
  337. package/types/rt-tools-ui-kit-v2-tabs.d.ts +198 -113
  338. package/types/rt-tools-ui-kit-v2-tag.d.ts +106 -53
  339. package/types/rt-tools-ui-kit-v2-textarea.d.ts +48 -25
  340. package/types/rt-tools-ui-kit-v2-theme-toggle.d.ts +28 -26
  341. package/types/rt-tools-ui-kit-v2-thread-list.d.ts +154 -94
  342. package/types/rt-tools-ui-kit-v2-timeline.d.ts +30 -28
  343. package/types/rt-tools-ui-kit-v2-toast.d.ts +174 -98
  344. package/types/rt-tools-ui-kit-v2-toggle-button-group.d.ts +132 -86
  345. package/types/rt-tools-ui-kit-v2-toggle-switch.d.ts +88 -50
  346. package/types/rt-tools-ui-kit-v2-toolbar.d.ts +30 -27
  347. package/types/rt-tools-ui-kit-v2-tooltip.d.ts +65 -41
  348. package/types/rt-tools-ui-kit-v2-tree-selector.d.ts +257 -0
  349. package/types/rt-tools-ui-kit-v2-tree.d.ts +282 -0
  350. package/types/rt-tools-ui-kit-v2-welcome-dialog.d.ts +21 -24
  351. package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +195 -124
  352. package/types/rt-tools-ui-kit-v2-workspace.d.ts +122 -79
  353. package/types/rt-tools-ui-kit-v2.d.ts +100 -90
  354. package/fesm2022/rt-tools-ui-kit-v2.mjs.map +0 -1
@@ -1,350 +1,651 @@
1
- import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, TemplateRef, input, booleanAttribute, computed, Directive, contentChildren, signal, viewChild, output, afterNextRender, DestroyRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { fromEvent, debounceTime } from 'rxjs';
6
- import { BlockDirective, ElemDirective, ModDirective } from '@rt-tools/core';
7
- import { RtIconComponent } from '@rt-tools/ui-kit-v2/icon';
8
- import { RtTooltipDirective } from '@rt-tools/ui-kit-v2/tooltip';
9
- import { rtKitLabel } from '@rt-tools/ui-kit-v2/core';
10
-
11
- /**
12
- * Декларирует одну вкладку `<rt-tabs>`. Ставится на `<ng-template>`: контент
13
- * шаблона становится телом панели и рендерится только когда вкладка активна.
14
- *
15
- * Метаданные (label, icon, disabled, badge, invalid) — signal-inputs, поэтому
16
- * шапка вкладки реагирует на их изменение без ручной перерегистрации. Сам
17
- * список вкладок `rt-tabs` собирает через `contentChildren`.
18
- */
19
- class RtTabDirective {
20
- constructor() {
21
- this.#t_uiTabInvalid = rtKitLabel('uiTabInvalid');
22
- /** Шаблон тела панели — рендерится в области контента при активной вкладке. */
23
- this.templateRef = inject(TemplateRef);
24
- /** Стабильный идентификатор вкладки (значение атрибута `rtTab`). */
25
- this.id = input('', { ...(ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {}), alias: 'rtTab' });
26
- /** Текстовый заголовок. Игнорируется, если задан `titleTemplate`. */
27
- this.label = input('', /* @ts-ignore */
28
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
29
- /** Кастомный шаблон заголовка — замещает `label`. */
30
- this.titleTemplate = input(null, /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "titleTemplate" }] : /* istanbul ignore next */ []));
32
- /** Иконка слева от заголовка. */
33
- this.icon = input(null, /* @ts-ignore */
34
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
35
- /** Семантический цвет иконки заголовка. */
36
- this.iconColor = input('current', /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "iconColor" }] : /* istanbul ignore next */ []));
38
- /** Значение бейджа справа от заголовка (число/строка). `null` — без бейджа. */
39
- this.badge = input(null, /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
41
- /**
42
- * Подсказка при наведении на бейдж. Подсказка самой кнопки занята неверной вкладкой,
43
- * поэтому у бейджа своя. Пусто — подсказки нет.
44
- */
45
- this.badgeTitle = input('', /* @ts-ignore */
46
- ...(ngDevMode ? [{ debugName: "badgeTitle" }] : /* istanbul ignore next */ []));
47
- /**
48
- * Подпись бейджа для чтения с экрана: точка или число сами по себе не говорят, что значат.
49
- * Пусто — атрибут не ставится, и озвучивается значение бейджа как есть.
50
- */
51
- this.badgeAriaLabel = input('', /* @ts-ignore */
52
- ...(ngDevMode ? [{ debugName: "badgeAriaLabel" }] : /* istanbul ignore next */ []));
53
- /** Заблокированная вкладка: не выбирается и не получает фокус. */
54
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
55
- /** Скрытая вкладка: не рендерится ни в шапке, ни в контенте. */
56
- this.hidden = input(false, { ...(ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
- /** Вкладка с ошибками: подсвечивается danger-цветом. */
58
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
59
- /** Подсказка для невалидной вкладки. Пусто — берётся переведённое умолчание. */
60
- this.invalidMessage = input('', /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "invalidMessage" }] : /* istanbul ignore next */ []));
62
- /** Готовый текст подсказки: своя формулировка важнее умолчания. */
63
- this.invalidTitle = computed(() => this.invalidMessage() || this.#t_uiTabInvalid(), /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "invalidTitle" }] : /* istanbul ignore next */ []));
65
- }
66
- #t_uiTabInvalid;
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
68
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: RtTabDirective, isStandalone: true, selector: "[rtTab]", inputs: { id: { classPropertyName: "id", publicName: "rtTab", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, titleTemplate: { classPropertyName: "titleTemplate", publicName: "titleTemplate", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconColor: { classPropertyName: "iconColor", publicName: "iconColor", isSignal: true, isRequired: false, transformFunction: null }, badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, badgeTitle: { classPropertyName: "badgeTitle", publicName: "badgeTitle", isSignal: true, isRequired: false, transformFunction: null }, badgeAriaLabel: { classPropertyName: "badgeAriaLabel", publicName: "badgeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, invalidMessage: { classPropertyName: "invalidMessage", publicName: "invalidMessage", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
69
- }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabDirective, decorators: [{
71
- type: Directive,
72
- args: [{
73
- selector: '[rtTab]',
74
- }]
75
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtTab", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], titleTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleTemplate", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], iconColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconColor", required: false }] }], badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], badgeTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeTitle", required: false }] }], badgeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "badgeAriaLabel", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], hidden: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidden", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], invalidMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalidMessage", required: false }] }] } });
76
-
77
- /**
78
- * Декларирует header-контрол `<rt-tabs>` — произвольный шаблон (кнопка, фильтр),
79
- * который рендерится слева или справа от полосы вкладок. Ставится на
80
- * `<ng-template>`; `rt-tabs` собирает контролы через `contentChildren` и
81
- * раскладывает по сторонам согласно `side`.
82
- */
83
- class RtTabsControlDirective {
84
- constructor() {
85
- /** Шаблон контрола, выводимый в header-слоте. */
86
- this.templateRef = inject(TemplateRef);
87
- /**
88
- * Сторона размещения относительно полосы вкладок.
89
- *
90
- * Пустое значение приводится к правой стороне: `<ng-template rtTabsControl>` без значения
91
- * задаёт входу пустую строку, а не умолчание, и такой контрол не попадал ни в левый слот,
92
- * ни в правый — он пропадал из шапки вовсе.
93
- */
94
- this.side = input('right', { ...(ngDevMode ? { debugName: "side" } : /* istanbul ignore next */ {}), alias: 'rtTabsControl',
95
- transform: (value) => (value === '' ? 'right' : value) });
96
- }
97
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabsControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
98
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.6", type: RtTabsControlDirective, isStandalone: true, selector: "[rtTabsControl]", inputs: { side: { classPropertyName: "side", publicName: "rtTabsControl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
99
- }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabsControlDirective, decorators: [{
101
- type: Directive,
102
- args: [{
103
- selector: '[rtTabsControl]',
104
- }]
105
- }], propDecorators: { side: [{ type: i0.Input, args: [{ isSignal: true, alias: "rtTabsControl", required: false }] }] } });
106
-
107
- /** Шаг ручной прокрутки полосы вкладок за один тик удержания стрелки (px). */
1
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, TemplateRef, ViewEncapsulation, afterNextRender, booleanAttribute, computed, contentChildren, inject, input, output, signal, viewChild } from "@angular/core";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { debounceTime, fromEvent } from "rxjs";
6
+ import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
7
+ import { RtIconComponent } from "@rt-tools/ui-kit-v2/icon";
8
+ import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
9
+ import { rtKitLabel } from "@rt-tools/ui-kit-v2/core";
10
+ var RtTabDirective = class RtTabDirective {
11
+ constructor() {
12
+ this.#t_uiTabInvalid = rtKitLabel("uiTabInvalid");
13
+ this.templateRef = inject(TemplateRef);
14
+ this.id = input("", {
15
+ ...ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {},
16
+ alias: "rtTab"
17
+ });
18
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
19
+ this.titleTemplate = input(null, ...ngDevMode ? [{ debugName: "titleTemplate" }] : /* istanbul ignore next */ []);
20
+ this.icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
21
+ this.iconColor = input("current", ...ngDevMode ? [{ debugName: "iconColor" }] : /* istanbul ignore next */ []);
22
+ this.badge = input(null, ...ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []);
23
+ this.badgeTitle = input("", ...ngDevMode ? [{ debugName: "badgeTitle" }] : /* istanbul ignore next */ []);
24
+ this.badgeAriaLabel = input("", ...ngDevMode ? [{ debugName: "badgeAriaLabel" }] : /* istanbul ignore next */ []);
25
+ this.disabled = input(false, {
26
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
27
+ transform: booleanAttribute
28
+ });
29
+ this.hidden = input(false, {
30
+ ...ngDevMode ? { debugName: "hidden" } : /* istanbul ignore next */ {},
31
+ transform: booleanAttribute
32
+ });
33
+ this.invalid = input(false, {
34
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
35
+ transform: booleanAttribute
36
+ });
37
+ this.invalidMessage = input("", ...ngDevMode ? [{ debugName: "invalidMessage" }] : /* istanbul ignore next */ []);
38
+ this.invalidTitle = computed(() => this.invalidMessage() || this.#t_uiTabInvalid(), ...ngDevMode ? [{ debugName: "invalidTitle" }] : /* istanbul ignore next */ []);
39
+ }
40
+ #t_uiTabInvalid;
41
+ static {
42
+ this.ɵfac = i0.ɵɵngDeclareFactory({
43
+ minVersion: "12.0.0",
44
+ version: "22.2.2",
45
+ ngImport: i0,
46
+ type: RtTabDirective,
47
+ deps: [],
48
+ target: i0.ɵɵFactoryTarget.Directive
49
+ });
50
+ }
51
+ static {
52
+ this.ɵdir = i0.ɵɵngDeclareDirective({
53
+ minVersion: "17.1.0",
54
+ version: "22.2.2",
55
+ type: RtTabDirective,
56
+ isStandalone: true,
57
+ selector: "[rtTab]",
58
+ inputs: {
59
+ id: {
60
+ classPropertyName: "id",
61
+ publicName: "rtTab",
62
+ isSignal: true,
63
+ isRequired: false,
64
+ transformFunction: null
65
+ },
66
+ label: {
67
+ classPropertyName: "label",
68
+ publicName: "label",
69
+ isSignal: true,
70
+ isRequired: false,
71
+ transformFunction: null
72
+ },
73
+ titleTemplate: {
74
+ classPropertyName: "titleTemplate",
75
+ publicName: "titleTemplate",
76
+ isSignal: true,
77
+ isRequired: false,
78
+ transformFunction: null
79
+ },
80
+ icon: {
81
+ classPropertyName: "icon",
82
+ publicName: "icon",
83
+ isSignal: true,
84
+ isRequired: false,
85
+ transformFunction: null
86
+ },
87
+ iconColor: {
88
+ classPropertyName: "iconColor",
89
+ publicName: "iconColor",
90
+ isSignal: true,
91
+ isRequired: false,
92
+ transformFunction: null
93
+ },
94
+ badge: {
95
+ classPropertyName: "badge",
96
+ publicName: "badge",
97
+ isSignal: true,
98
+ isRequired: false,
99
+ transformFunction: null
100
+ },
101
+ badgeTitle: {
102
+ classPropertyName: "badgeTitle",
103
+ publicName: "badgeTitle",
104
+ isSignal: true,
105
+ isRequired: false,
106
+ transformFunction: null
107
+ },
108
+ badgeAriaLabel: {
109
+ classPropertyName: "badgeAriaLabel",
110
+ publicName: "badgeAriaLabel",
111
+ isSignal: true,
112
+ isRequired: false,
113
+ transformFunction: null
114
+ },
115
+ disabled: {
116
+ classPropertyName: "disabled",
117
+ publicName: "disabled",
118
+ isSignal: true,
119
+ isRequired: false,
120
+ transformFunction: null
121
+ },
122
+ hidden: {
123
+ classPropertyName: "hidden",
124
+ publicName: "hidden",
125
+ isSignal: true,
126
+ isRequired: false,
127
+ transformFunction: null
128
+ },
129
+ invalid: {
130
+ classPropertyName: "invalid",
131
+ publicName: "invalid",
132
+ isSignal: true,
133
+ isRequired: false,
134
+ transformFunction: null
135
+ },
136
+ invalidMessage: {
137
+ classPropertyName: "invalidMessage",
138
+ publicName: "invalidMessage",
139
+ isSignal: true,
140
+ isRequired: false,
141
+ transformFunction: null
142
+ }
143
+ },
144
+ ngImport: i0
145
+ });
146
+ }
147
+ };
148
+ i0.ɵɵngDeclareClassMetadata({
149
+ minVersion: "12.0.0",
150
+ version: "22.2.2",
151
+ ngImport: i0,
152
+ type: RtTabDirective,
153
+ decorators: [{
154
+ type: Directive,
155
+ args: [{ selector: "[rtTab]" }]
156
+ }],
157
+ propDecorators: {
158
+ id: [{
159
+ type: i0.Input,
160
+ args: [{
161
+ isSignal: true,
162
+ alias: "rtTab",
163
+ required: false
164
+ }]
165
+ }],
166
+ label: [{
167
+ type: i0.Input,
168
+ args: [{
169
+ isSignal: true,
170
+ alias: "label",
171
+ required: false
172
+ }]
173
+ }],
174
+ titleTemplate: [{
175
+ type: i0.Input,
176
+ args: [{
177
+ isSignal: true,
178
+ alias: "titleTemplate",
179
+ required: false
180
+ }]
181
+ }],
182
+ icon: [{
183
+ type: i0.Input,
184
+ args: [{
185
+ isSignal: true,
186
+ alias: "icon",
187
+ required: false
188
+ }]
189
+ }],
190
+ iconColor: [{
191
+ type: i0.Input,
192
+ args: [{
193
+ isSignal: true,
194
+ alias: "iconColor",
195
+ required: false
196
+ }]
197
+ }],
198
+ badge: [{
199
+ type: i0.Input,
200
+ args: [{
201
+ isSignal: true,
202
+ alias: "badge",
203
+ required: false
204
+ }]
205
+ }],
206
+ badgeTitle: [{
207
+ type: i0.Input,
208
+ args: [{
209
+ isSignal: true,
210
+ alias: "badgeTitle",
211
+ required: false
212
+ }]
213
+ }],
214
+ badgeAriaLabel: [{
215
+ type: i0.Input,
216
+ args: [{
217
+ isSignal: true,
218
+ alias: "badgeAriaLabel",
219
+ required: false
220
+ }]
221
+ }],
222
+ disabled: [{
223
+ type: i0.Input,
224
+ args: [{
225
+ isSignal: true,
226
+ alias: "disabled",
227
+ required: false
228
+ }]
229
+ }],
230
+ hidden: [{
231
+ type: i0.Input,
232
+ args: [{
233
+ isSignal: true,
234
+ alias: "hidden",
235
+ required: false
236
+ }]
237
+ }],
238
+ invalid: [{
239
+ type: i0.Input,
240
+ args: [{
241
+ isSignal: true,
242
+ alias: "invalid",
243
+ required: false
244
+ }]
245
+ }],
246
+ invalidMessage: [{
247
+ type: i0.Input,
248
+ args: [{
249
+ isSignal: true,
250
+ alias: "invalidMessage",
251
+ required: false
252
+ }]
253
+ }]
254
+ }
255
+ });
256
+ var RtTabsControlDirective = class RtTabsControlDirective {
257
+ constructor() {
258
+ this.templateRef = inject(TemplateRef);
259
+ this.side = input("right", {
260
+ ...ngDevMode ? { debugName: "side" } : /* istanbul ignore next */ {},
261
+ alias: "rtTabsControl",
262
+ transform: (value) => value === "" ? "right" : value
263
+ });
264
+ }
265
+ static {
266
+ this.ɵfac = i0.ɵɵngDeclareFactory({
267
+ minVersion: "12.0.0",
268
+ version: "22.2.2",
269
+ ngImport: i0,
270
+ type: RtTabsControlDirective,
271
+ deps: [],
272
+ target: i0.ɵɵFactoryTarget.Directive
273
+ });
274
+ }
275
+ static {
276
+ this.ɵdir = i0.ɵɵngDeclareDirective({
277
+ minVersion: "17.1.0",
278
+ version: "22.2.2",
279
+ type: RtTabsControlDirective,
280
+ isStandalone: true,
281
+ selector: "[rtTabsControl]",
282
+ inputs: { side: {
283
+ classPropertyName: "side",
284
+ publicName: "rtTabsControl",
285
+ isSignal: true,
286
+ isRequired: false,
287
+ transformFunction: null
288
+ } },
289
+ ngImport: i0
290
+ });
291
+ }
292
+ };
293
+ i0.ɵɵngDeclareClassMetadata({
294
+ minVersion: "12.0.0",
295
+ version: "22.2.2",
296
+ ngImport: i0,
297
+ type: RtTabsControlDirective,
298
+ decorators: [{
299
+ type: Directive,
300
+ args: [{ selector: "[rtTabsControl]" }]
301
+ }],
302
+ propDecorators: { side: [{
303
+ type: i0.Input,
304
+ args: [{
305
+ isSignal: true,
306
+ alias: "rtTabsControl",
307
+ required: false
308
+ }]
309
+ }] }
310
+ });
108
311
  const SCROLL_STEP = 12;
109
- /** Интервал тика прокрутки при зажатой стрелке (мс). */
110
312
  const SCROLL_TICK_MS = 15;
111
- /** Дебаунс пересчёта видимости стрелок прокрутки на resize/scroll (мс). */
112
313
  const REST_DEBOUNCE_MS = 50;
113
- const BEM_BLOCK = 'rt-tabs';
114
- /**
115
- * Полоса вкладок с проекцией контента. Вкладки декларируются через
116
- * `<ng-template rtTab="id" label="…">…</ng-template>` (см. {@link RtTabDirective}),
117
- * собираются `contentChildren` и рендерятся как header-кнопки + активная панель.
118
- * Опциональные header-контролы — через `[rtTabsControl]`.
119
- *
120
- * Компонент "controlled-ish": активная вкладка берётся из `activeId` (если
121
- * задан), иначе — из внутреннего выбора, иначе — первая доступная. Клик/клавиша
122
- * эмиттят `activeIdChange`; синхронизацию `activeId` оставляем потребителю.
123
- *
124
- * Горизонтальная полоса при переполнении прячет вкладки под скролл и показывает
125
- * стрелки-«хвосты» (`__rest`) с прокруткой по удержанию. Вертикальная ориентация
126
- * раскладывает вкладки в колонку без стрелок.
127
- *
128
- * Доступность: `role="tablist"`/`role="tab"`/`role="tabpanel"`, `aria-selected`,
129
- * roving `tabindex`, навигация стрелками + Home/End.
130
- */
131
- class RtTabsComponent {
132
- /** `Window` через `DOCUMENT` (SSR-safe: `defaultView` может быть `null`). */
133
- #win;
134
- /** Внутренний выбор (uncontrolled-ветка). */
135
- #internalId;
136
- /** Хэндл интервала прокрутки по удержанию стрелки. */
137
- #scrollIntervalId;
138
- constructor() {
139
- /** `Window` через `DOCUMENT` (SSR-safe: `defaultView` может быть `null`). */
140
- this.#win = inject(DOCUMENT).defaultView;
141
- /** Все задекларированные вкладки (включая скрытые). */
142
- this.tabs = contentChildren(RtTabDirective, /* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
144
- /** Все header-контролы. */
145
- this.controls = contentChildren(RtTabsControlDirective, /* @ts-ignore */
146
- ...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
147
- /** Видимые вкладки (без `hidden`). */
148
- this.visibleTabs = computed(() => this.tabs().filter((tab) => !tab.hidden()), /* @ts-ignore */
149
- ...(ngDevMode ? [{ debugName: "visibleTabs" }] : /* istanbul ignore next */ []));
150
- this.leftControls = computed(() => this.controls().filter((c) => c.side() === 'left'), /* @ts-ignore */
151
- ...(ngDevMode ? [{ debugName: "leftControls" }] : /* istanbul ignore next */ []));
152
- this.rightControls = computed(() => this.controls().filter((c) => c.side() === 'right'), /* @ts-ignore */
153
- ...(ngDevMode ? [{ debugName: "rightControls" }] : /* istanbul ignore next */ []));
154
- /**
155
- * Эффективный id активной вкладки. Приоритет: контролируемый `activeId` →
156
- * внутренний выбор → первая доступная. Кандидат валидируется по множеству
157
- * видимых незаблокированных вкладок, поэтому корректно реагирует на
158
- * асинхронную загрузку/смену набора вкладок.
159
- */
160
- this.selectedId = computed(() => {
161
- const enabled = this.visibleTabs().filter((tab) => !tab.disabled());
162
- const candidate = this.activeId() ?? this.#internalId();
163
- const candidateValid = candidate !== null && enabled.some((tab) => tab.id() === candidate);
164
- let result;
165
- if (candidateValid) {
166
- result = candidate;
167
- }
168
- else if (enabled.length) {
169
- result = enabled[0].id();
170
- }
171
- else {
172
- result = null;
173
- }
174
- return result;
175
- }, /* @ts-ignore */
176
- ...(ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []));
177
- /** Активная вкладка целиком (для рендера панели). */
178
- this.activeTab = computed(() => this.visibleTabs().find((tab) => tab.id() === this.selectedId()) ?? null, /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
180
- /** Видны ли стрелки прокрутки слева/справа (только горизонтальная полоса). */
181
- this.restBeforeVisible = signal(false, /* @ts-ignore */
182
- ...(ngDevMode ? [{ debugName: "restBeforeVisible" }] : /* istanbul ignore next */ []));
183
- this.restAfterVisible = signal(false, /* @ts-ignore */
184
- ...(ngDevMode ? [{ debugName: "restAfterVisible" }] : /* istanbul ignore next */ []));
185
- this.tabListRef = viewChild('tabList', /* @ts-ignore */
186
- ...(ngDevMode ? [{ debugName: "tabListRef" }] : /* istanbul ignore next */ []));
187
- /** Контролируемый активный id. `null` — компонент сам выбирает первую вкладку. */
188
- this.activeId = input(null, /* @ts-ignore */
189
- ...(ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []));
190
- /** Ориентация полосы. */
191
- this.direction = input('horizontal', /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []));
193
- /** Растягивать вкладки на всю ширину полосы. */
194
- this.stretch = input(false, { ...(ngDevMode ? { debugName: "stretch" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
195
- /** Скроллить область контента при переполнении. */
196
- this.contentScrollable = input(true, { ...(ngDevMode ? { debugName: "contentScrollable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
197
- /** Эмиттит id вкладки при её выборе (клик/клавиатура). */
198
- this.activeIdChange = output();
199
- /** Внутренний выбор (uncontrolled-ветка). */
200
- this.#internalId = signal(null, /* @ts-ignore */
201
- ...(ngDevMode ? [{ debugName: "#internalId" }] : /* istanbul ignore next */ []));
202
- /** Хэндл интервала прокрутки по удержанию стрелки. */
203
- this.#scrollIntervalId = null;
204
- if (this.#win) {
205
- fromEvent(this.#win, 'resize')
206
- .pipe(debounceTime(REST_DEBOUNCE_MS), takeUntilDestroyed())
207
- .subscribe(() => this.#updateRestVisibility());
208
- }
209
- afterNextRender(() => this.#updateRestVisibility());
210
- // Снимаем hold-scroll интервал при уничтожении: если компонент разрушить
211
- // с зажатой стрелкой (pointerdown без pointerup), интервал остался бы жив.
212
- inject(DestroyRef).onDestroy(() => this.#clearScrollInterval());
213
- }
214
- selectTab(id) {
215
- const target = this.visibleTabs().find((tab) => tab.id() === id);
216
- if (!target || target.disabled()) {
217
- return;
218
- }
219
- this.#internalId.set(id);
220
- this.activeIdChange.emit(id);
221
- this.#scrollTabIntoView(id);
222
- }
223
- /** Навигация по вкладкам с клавиатуры (automatic activation). */
224
- onTabKeydown(event) {
225
- const enabled = this.visibleTabs().filter((tab) => !tab.disabled());
226
- if (!enabled.length) {
227
- return;
228
- }
229
- const isVertical = this.direction() === 'vertical';
230
- const nextKey = isVertical ? 'ArrowDown' : 'ArrowRight';
231
- const prevKey = isVertical ? 'ArrowUp' : 'ArrowLeft';
232
- const currentIndex = enabled.findIndex((tab) => tab.id() === this.selectedId());
233
- // Карта клавиша → целевой индекс (без if/else-if цепочки).
234
- const moveByKey = new Map([
235
- [nextKey, (currentIndex + 1) % enabled.length],
236
- [prevKey, (currentIndex - 1 + enabled.length) % enabled.length],
237
- ['Home', 0],
238
- ['End', enabled.length - 1],
239
- ]);
240
- const targetIndex = moveByKey.get(event.key);
241
- if (targetIndex === undefined) {
242
- return;
243
- }
244
- event.preventDefault();
245
- const targetId = enabled[targetIndex].id();
246
- this.selectTab(targetId);
247
- this.#focusTab(targetId);
248
- }
249
- /** Старт прокрутки полосы по удержанию ЛКМ на стрелке. */
250
- onRestPointerDown(direction, event) {
251
- if (event.button !== 0 || this.#scrollIntervalId !== null || !this.#win) {
252
- return;
253
- }
254
- this.#scrollIntervalId = this.#win.setInterval(() => {
255
- this.#scrollStep(direction);
256
- this.#updateRestVisibility();
257
- }, SCROLL_TICK_MS);
258
- }
259
- onRestPointerUp() {
260
- this.#clearScrollInterval();
261
- }
262
- onTabListScroll() {
263
- this.#updateRestVisibility();
264
- }
265
- #clearScrollInterval() {
266
- if (this.#win && this.#scrollIntervalId !== null) {
267
- this.#win.clearInterval(this.#scrollIntervalId);
268
- this.#scrollIntervalId = null;
269
- }
270
- }
271
- #scrollStep(direction) {
272
- const list = this.tabListRef()?.nativeElement;
273
- if (!list) {
274
- return;
275
- }
276
- const scrolledLeft = list.scrollLeft;
277
- const scrolledRight = list.scrollWidth - list.scrollLeft - list.clientWidth;
278
- const remaining = direction === 'before' ? scrolledLeft : scrolledRight;
279
- if (remaining > 0) {
280
- list.scrollBy(direction === 'before' ? -SCROLL_STEP : SCROLL_STEP, 0);
281
- }
282
- if (remaining - SCROLL_STEP <= 0) {
283
- this.#clearScrollInterval();
284
- }
285
- }
286
- #updateRestVisibility() {
287
- const list = this.tabListRef()?.nativeElement;
288
- if (!list || this.direction() !== 'horizontal') {
289
- this.restBeforeVisible.set(false);
290
- this.restAfterVisible.set(false);
291
- return;
292
- }
293
- const scrolledRight = list.scrollWidth - list.scrollLeft - list.clientWidth;
294
- this.restBeforeVisible.set(list.scrollLeft > 0);
295
- // 1px — погрешность субпиксельного scrollWidth
296
- this.restAfterVisible.set(scrolledRight > 1);
297
- }
298
- #scrollTabIntoView(id) {
299
- const list = this.tabListRef()?.nativeElement;
300
- const tab = list?.querySelector(`[data-tabid="${id}"]`);
301
- if (!list || !tab) {
302
- return;
303
- }
304
- const viewLeft = list.scrollLeft;
305
- const viewRight = list.scrollLeft + list.clientWidth;
306
- if (tab.offsetLeft < viewLeft) {
307
- list.scrollTo({ left: tab.offsetLeft });
308
- }
309
- else if (tab.offsetLeft + tab.offsetWidth > viewRight) {
310
- list.scrollTo({ left: tab.offsetLeft + tab.offsetWidth - list.clientWidth });
311
- }
312
- else {
313
- // вкладка целиком в зоне видимости — прокрутка не нужна
314
- }
315
- }
316
- #focusTab(id) {
317
- const list = this.tabListRef()?.nativeElement;
318
- list?.querySelector(`[data-tabid="${id}"]`)?.focus();
319
- }
320
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
321
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtTabsComponent, isStandalone: true, selector: "rt-tabs", inputs: { activeId: { classPropertyName: "activeId", publicName: "activeId", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, stretch: { classPropertyName: "stretch", publicName: "stretch", isSignal: true, isRequired: false, transformFunction: null }, contentScrollable: { classPropertyName: "contentScrollable", publicName: "contentScrollable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeIdChange: "activeIdChange" }, host: { properties: { "class.rt-tabs--direction--horizontal": "direction() === 'horizontal'", "class.rt-tabs--direction--vertical": "direction() === 'vertical'" }, classAttribute: "rt-tabs" }, queries: [{ propertyName: "tabs", predicate: RtTabDirective, isSignal: true }, { propertyName: "controls", predicate: RtTabsControlDirective, isSignal: true }], viewQueries: [{ propertyName: "tabListRef", first: true, predicate: ["tabList"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container rtBlock=\"rt-tabs\">\n <div rtElem=\"header\">\n @if (leftControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ before: true }\">\n @for (control of leftControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n\n <div rtElem=\"tab-list-wrapper\">\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-prev\"\n [rtMod]=\"{ before: true, visible: restBeforeVisible() }\"\n (mousedown)=\"onRestPointerDown('before', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-left\" color=\"current\" size=\"sm\" />\n </div>\n\n <div\n #tabList\n rtElem=\"tab-list\"\n qa-dataid=\"tabs-tab-list\"\n role=\"tablist\"\n [rtMod]=\"{ stretch: stretch(), direction: direction() }\"\n [attr.aria-orientation]=\"direction()\"\n (scroll)=\"onTabListScroll()\">\n @for (tab of visibleTabs(); track tab.id()) {\n <button\n rtBlock=\"rt-tab-item\"\n qa-dataid=\"tabs-tab\"\n type=\"button\"\n role=\"tab\"\n [rtMod]=\"{\n selected: tab.id() === selectedId(),\n disabled: tab.disabled(),\n invalid: tab.invalid(),\n stretch: stretch(),\n }\"\n [id]=\"'rt-tab-' + tab.id()\"\n [disabled]=\"tab.disabled()\"\n [attr.data-tabid]=\"tab.id()\"\n [attr.aria-selected]=\"tab.id() === selectedId()\"\n [attr.aria-controls]=\"'rt-tabpanel-' + tab.id()\"\n [attr.tabindex]=\"tab.id() === selectedId() ? 0 : -1\"\n [rtTooltip]=\"tab.invalid() ? tab.invalidTitle() : ''\"\n (click)=\"selectTab(tab.id())\"\n (keydown)=\"onTabKeydown($event)\">\n @if (tab.icon(); as icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"icon\" [color]=\"tab.iconColor()\" />\n }\n\n @if (tab.titleTemplate(); as titleTpl) {\n <ng-container [ngTemplateOutlet]=\"titleTpl\" />\n } @else {\n <span rtElem=\"title\">{{ tab.label() }}</span>\n }\n\n @if (tab.badge() !== null) {\n <!-- \u0412 \u043E\u0434\u043D\u0443 \u0441\u0442\u0440\u043E\u043A\u0443: \u043F\u0435\u0440\u0435\u043D\u043E\u0441 \u0432\u043D\u0443\u0442\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u043B \u0431\u044B \u043F\u0440\u043E\u0431\u0435\u043B \u0432 \u0442\u0435\u043A\u0441\u0442 \u043A\u043D\u043E\u043F\u043A\u0438. -->\n <!-- prettier-ignore -->\n <span rtElem=\"badge\" [rtTooltip]=\"tab.badgeTitle()\" [attr.aria-label]=\"tab.badgeAriaLabel() || null\">{{ tab.badge() }}</span>\n }\n </button>\n }\n </div>\n\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-next\"\n [rtMod]=\"{ after: true, visible: restAfterVisible() }\"\n (mousedown)=\"onRestPointerDown('after', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-right\" color=\"current\" size=\"sm\" />\n </div>\n </div>\n\n @if (rightControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ after: true }\">\n @for (control of rightControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n </div>\n\n @if (activeTab(); as tab) {\n <div\n rtElem=\"content\"\n qa-dataid=\"tabs-panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [rtMod]=\"{ scrollable: contentScrollable() }\"\n [id]=\"'rt-tabpanel-' + tab.id()\"\n [attr.aria-labelledby]=\"'rt-tab-' + tab.id()\">\n <ng-container [ngTemplateOutlet]=\"tab.templateRef\" />\n </div>\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-tabs{--rt-tabs-border-width: var(--rt-border-width-thin);--rt-tabs-transition-duration: var(--rt-duration-fast);display:flex;-webkit-tap-highlight-color:transparent}.rt-tabs--direction--horizontal{flex-direction:column}.rt-tabs--direction--vertical{flex-direction:row}.rt-tabs__header{display:flex;align-items:center}.rt-tabs__tab-list-wrapper{position:relative;display:flex;overflow:hidden;flex:1 1 auto;align-items:center}.rt-tabs__tab-list{display:flex;border-bottom:var(--rt-tabs-border-width) solid var(--rt-color-border-default);margin:0;-ms-overflow-style:none;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.rt-tabs__tab-list::-webkit-scrollbar{display:none}.rt-tabs__tab-list--direction--horizontal{width:100%;flex-direction:row}.rt-tabs__tab-list--direction--vertical{flex-direction:column;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default);border-bottom:0}.rt-tabs__tab-list--stretch{justify-content:space-between}.rt-tabs__rest{position:absolute;z-index:1;top:0;bottom:0;display:flex;width:var(--rt-control-height-lg);align-items:center;justify-content:center;background-color:var(--rt-color-bg-surface);color:var(--rt-color-text-muted);cursor:pointer;transition:color var(--rt-tabs-transition-duration) linear;visibility:hidden}.rt-tabs__rest:hover{color:var(--rt-color-text-primary)}.rt-tabs__rest--before{left:0;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--after{right:0;border-left:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--visible{visibility:visible}.rt-tabs__controls{display:flex;flex-shrink:0;align-items:center}.rt-tabs__controls--before{padding-right:var(--rt-space-md)}.rt-tabs__controls--after{padding-left:var(--rt-space-md)}.rt-tabs__content{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;padding-top:var(--rt-space-md);gap:var(--rt-space-md);line-height:var(--rt-leading-relaxed)}.rt-tabs__content--scrollable{overflow:auto}.rt-tab-item{--rt-tab-item-border-width: var(--rt-border-width-thin);--rt-tab-item-badge-radius: var(--rt-radius-full);--rt-tab-item-transition-duration: var(--rt-duration-fast);position:relative;display:inline-flex;align-items:center;justify-content:center;padding:var(--rt-space-2) var(--rt-space-4);border:0;margin:0;background-color:transparent;color:var(--rt-color-text-muted);cursor:pointer;font-family:inherit;font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-semibold);gap:var(--rt-space-sm);line-height:var(--rt-leading-none);transition:color var(--rt-tab-item-transition-duration) linear,background-color var(--rt-tab-item-transition-duration) linear;white-space:nowrap}.rt-tab-item:after{position:absolute;bottom:calc(-1 * var(--rt-tab-item-border-width));height:2px;background-color:transparent;content:\"\";inset-inline:0;pointer-events:none}.rt-tab-item:hover:not(.rt-tab-item--disabled,.rt-tab-item--selected){background-color:var(--rt-color-bg-hover);color:var(--rt-color-text-primary)}.rt-tab-item:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-3px}.rt-tab-item__title{overflow:hidden;max-width:200px;text-overflow:ellipsis}.rt-tab-item__icon{flex-shrink:0}.rt-tab-item__badge{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 var(--rt-space-2);border-radius:var(--rt-tab-item-badge-radius);background-color:var(--rt-color-bg-surface-subtle);color:var(--rt-color-text-muted);font-size:var(--rt-text-xs);font-weight:var(--rt-font-weight-medium);line-height:var(--rt-leading-none)}.rt-tab-item--selected{color:var(--rt-color-action-primary);cursor:default}.rt-tab-item--selected:after{background-color:var(--rt-color-action-primary)}.rt-tab-item--selected .rt-tab-item__badge{background-color:var(--rt-color-action-primary-soft);color:var(--rt-color-action-primary)}.rt-tab-item--invalid{color:var(--rt-color-state-danger)}.rt-tab-item--invalid:after{background-color:var(--rt-color-state-danger)}.rt-tab-item--disabled{color:var(--rt-color-text-disabled);cursor:not-allowed}.rt-tab-item--stretch{max-width:100%;flex:1 1 auto}}\n"], dependencies: [{ kind: "directive", type:
322
- // angular
323
- NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type:
324
- // standalone components / directives
325
- RtIconComponent, selector: "rt-icon", inputs: ["name", "glyph", "glyphStrategy", "size", "color", "fill", "spin", "rotate"] }, { kind: "directive", type: RtTooltipDirective, selector: "[rtTooltip]", inputs: ["rtTooltip", "rtTooltipPlacement", "rtTooltipWhenTruncated"], exportAs: ["rtTooltip"] }, { kind: "directive", type: BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: ModDirective, selector: "[rtMod]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
326
- }
327
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtTabsComponent, decorators: [{
328
- type: Component,
329
- args: [{ selector: 'rt-tabs', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
330
- // angular
331
- NgTemplateOutlet,
332
- // standalone components / directives
333
- RtIconComponent,
334
- RtTooltipDirective,
335
- BlockDirective,
336
- ElemDirective,
337
- ModDirective,
338
- ], host: {
339
- class: BEM_BLOCK,
340
- '[class.rt-tabs--direction--horizontal]': "direction() === 'horizontal'",
341
- '[class.rt-tabs--direction--vertical]': "direction() === 'vertical'",
342
- }, template: "<ng-container rtBlock=\"rt-tabs\">\n <div rtElem=\"header\">\n @if (leftControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ before: true }\">\n @for (control of leftControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n\n <div rtElem=\"tab-list-wrapper\">\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-prev\"\n [rtMod]=\"{ before: true, visible: restBeforeVisible() }\"\n (mousedown)=\"onRestPointerDown('before', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-left\" color=\"current\" size=\"sm\" />\n </div>\n\n <div\n #tabList\n rtElem=\"tab-list\"\n qa-dataid=\"tabs-tab-list\"\n role=\"tablist\"\n [rtMod]=\"{ stretch: stretch(), direction: direction() }\"\n [attr.aria-orientation]=\"direction()\"\n (scroll)=\"onTabListScroll()\">\n @for (tab of visibleTabs(); track tab.id()) {\n <button\n rtBlock=\"rt-tab-item\"\n qa-dataid=\"tabs-tab\"\n type=\"button\"\n role=\"tab\"\n [rtMod]=\"{\n selected: tab.id() === selectedId(),\n disabled: tab.disabled(),\n invalid: tab.invalid(),\n stretch: stretch(),\n }\"\n [id]=\"'rt-tab-' + tab.id()\"\n [disabled]=\"tab.disabled()\"\n [attr.data-tabid]=\"tab.id()\"\n [attr.aria-selected]=\"tab.id() === selectedId()\"\n [attr.aria-controls]=\"'rt-tabpanel-' + tab.id()\"\n [attr.tabindex]=\"tab.id() === selectedId() ? 0 : -1\"\n [rtTooltip]=\"tab.invalid() ? tab.invalidTitle() : ''\"\n (click)=\"selectTab(tab.id())\"\n (keydown)=\"onTabKeydown($event)\">\n @if (tab.icon(); as icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"icon\" [color]=\"tab.iconColor()\" />\n }\n\n @if (tab.titleTemplate(); as titleTpl) {\n <ng-container [ngTemplateOutlet]=\"titleTpl\" />\n } @else {\n <span rtElem=\"title\">{{ tab.label() }}</span>\n }\n\n @if (tab.badge() !== null) {\n <!-- \u0412 \u043E\u0434\u043D\u0443 \u0441\u0442\u0440\u043E\u043A\u0443: \u043F\u0435\u0440\u0435\u043D\u043E\u0441 \u0432\u043D\u0443\u0442\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u043B \u0431\u044B \u043F\u0440\u043E\u0431\u0435\u043B \u0432 \u0442\u0435\u043A\u0441\u0442 \u043A\u043D\u043E\u043F\u043A\u0438. -->\n <!-- prettier-ignore -->\n <span rtElem=\"badge\" [rtTooltip]=\"tab.badgeTitle()\" [attr.aria-label]=\"tab.badgeAriaLabel() || null\">{{ tab.badge() }}</span>\n }\n </button>\n }\n </div>\n\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-next\"\n [rtMod]=\"{ after: true, visible: restAfterVisible() }\"\n (mousedown)=\"onRestPointerDown('after', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-right\" color=\"current\" size=\"sm\" />\n </div>\n </div>\n\n @if (rightControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ after: true }\">\n @for (control of rightControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n </div>\n\n @if (activeTab(); as tab) {\n <div\n rtElem=\"content\"\n qa-dataid=\"tabs-panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [rtMod]=\"{ scrollable: contentScrollable() }\"\n [id]=\"'rt-tabpanel-' + tab.id()\"\n [attr.aria-labelledby]=\"'rt-tab-' + tab.id()\">\n <ng-container [ngTemplateOutlet]=\"tab.templateRef\" />\n </div>\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-tabs{--rt-tabs-border-width: var(--rt-border-width-thin);--rt-tabs-transition-duration: var(--rt-duration-fast);display:flex;-webkit-tap-highlight-color:transparent}.rt-tabs--direction--horizontal{flex-direction:column}.rt-tabs--direction--vertical{flex-direction:row}.rt-tabs__header{display:flex;align-items:center}.rt-tabs__tab-list-wrapper{position:relative;display:flex;overflow:hidden;flex:1 1 auto;align-items:center}.rt-tabs__tab-list{display:flex;border-bottom:var(--rt-tabs-border-width) solid var(--rt-color-border-default);margin:0;-ms-overflow-style:none;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.rt-tabs__tab-list::-webkit-scrollbar{display:none}.rt-tabs__tab-list--direction--horizontal{width:100%;flex-direction:row}.rt-tabs__tab-list--direction--vertical{flex-direction:column;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default);border-bottom:0}.rt-tabs__tab-list--stretch{justify-content:space-between}.rt-tabs__rest{position:absolute;z-index:1;top:0;bottom:0;display:flex;width:var(--rt-control-height-lg);align-items:center;justify-content:center;background-color:var(--rt-color-bg-surface);color:var(--rt-color-text-muted);cursor:pointer;transition:color var(--rt-tabs-transition-duration) linear;visibility:hidden}.rt-tabs__rest:hover{color:var(--rt-color-text-primary)}.rt-tabs__rest--before{left:0;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--after{right:0;border-left:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--visible{visibility:visible}.rt-tabs__controls{display:flex;flex-shrink:0;align-items:center}.rt-tabs__controls--before{padding-right:var(--rt-space-md)}.rt-tabs__controls--after{padding-left:var(--rt-space-md)}.rt-tabs__content{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;padding-top:var(--rt-space-md);gap:var(--rt-space-md);line-height:var(--rt-leading-relaxed)}.rt-tabs__content--scrollable{overflow:auto}.rt-tab-item{--rt-tab-item-border-width: var(--rt-border-width-thin);--rt-tab-item-badge-radius: var(--rt-radius-full);--rt-tab-item-transition-duration: var(--rt-duration-fast);position:relative;display:inline-flex;align-items:center;justify-content:center;padding:var(--rt-space-2) var(--rt-space-4);border:0;margin:0;background-color:transparent;color:var(--rt-color-text-muted);cursor:pointer;font-family:inherit;font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-semibold);gap:var(--rt-space-sm);line-height:var(--rt-leading-none);transition:color var(--rt-tab-item-transition-duration) linear,background-color var(--rt-tab-item-transition-duration) linear;white-space:nowrap}.rt-tab-item:after{position:absolute;bottom:calc(-1 * var(--rt-tab-item-border-width));height:2px;background-color:transparent;content:\"\";inset-inline:0;pointer-events:none}.rt-tab-item:hover:not(.rt-tab-item--disabled,.rt-tab-item--selected){background-color:var(--rt-color-bg-hover);color:var(--rt-color-text-primary)}.rt-tab-item:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-3px}.rt-tab-item__title{overflow:hidden;max-width:200px;text-overflow:ellipsis}.rt-tab-item__icon{flex-shrink:0}.rt-tab-item__badge{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 var(--rt-space-2);border-radius:var(--rt-tab-item-badge-radius);background-color:var(--rt-color-bg-surface-subtle);color:var(--rt-color-text-muted);font-size:var(--rt-text-xs);font-weight:var(--rt-font-weight-medium);line-height:var(--rt-leading-none)}.rt-tab-item--selected{color:var(--rt-color-action-primary);cursor:default}.rt-tab-item--selected:after{background-color:var(--rt-color-action-primary)}.rt-tab-item--selected .rt-tab-item__badge{background-color:var(--rt-color-action-primary-soft);color:var(--rt-color-action-primary)}.rt-tab-item--invalid{color:var(--rt-color-state-danger)}.rt-tab-item--invalid:after{background-color:var(--rt-color-state-danger)}.rt-tab-item--disabled{color:var(--rt-color-text-disabled);cursor:not-allowed}.rt-tab-item--stretch{max-width:100%;flex:1 1 auto}}\n"] }]
343
- }], ctorParameters: () => [], propDecorators: { tabs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RtTabDirective), { isSignal: true }] }], controls: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => RtTabsControlDirective), { isSignal: true }] }], tabListRef: [{ type: i0.ViewChild, args: ['tabList', { isSignal: true }] }], activeId: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeId", required: false }] }], direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], stretch: [{ type: i0.Input, args: [{ isSignal: true, alias: "stretch", required: false }] }], contentScrollable: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentScrollable", required: false }] }], activeIdChange: [{ type: i0.Output, args: ["activeIdChange"] }] } });
344
-
345
- /**
346
- * Generated bundle index. Do not edit.
347
- */
348
-
314
+ const BEM_BLOCK = "rt-tabs";
315
+ var RtTabsComponent = class RtTabsComponent {
316
+ #win;
317
+ #internalId;
318
+ #scrollIntervalId;
319
+ constructor() {
320
+ this.#win = inject(DOCUMENT).defaultView;
321
+ this.tabs = contentChildren(RtTabDirective, ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
322
+ this.controls = contentChildren(RtTabsControlDirective, ...ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []);
323
+ this.visibleTabs = computed(() => this.tabs().filter((tab) => !tab.hidden()), ...ngDevMode ? [{ debugName: "visibleTabs" }] : /* istanbul ignore next */ []);
324
+ this.leftControls = computed(() => this.controls().filter((c) => c.side() === "left"), ...ngDevMode ? [{ debugName: "leftControls" }] : /* istanbul ignore next */ []);
325
+ this.rightControls = computed(() => this.controls().filter((c) => c.side() === "right"), ...ngDevMode ? [{ debugName: "rightControls" }] : /* istanbul ignore next */ []);
326
+ this.selectedId = computed(() => {
327
+ const enabled = this.visibleTabs().filter((tab) => !tab.disabled());
328
+ const candidate = this.activeId() ?? this.#internalId();
329
+ const candidateValid = candidate !== null && enabled.some((tab) => tab.id() === candidate);
330
+ let result;
331
+ if (candidateValid) result = candidate;
332
+ else if (enabled.length) result = enabled[0].id();
333
+ else result = null;
334
+ return result;
335
+ }, ...ngDevMode ? [{ debugName: "selectedId" }] : /* istanbul ignore next */ []);
336
+ this.activeTab = computed(() => this.visibleTabs().find((tab) => tab.id() === this.selectedId()) ?? null, ...ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []);
337
+ this.restBeforeVisible = signal(false, ...ngDevMode ? [{ debugName: "restBeforeVisible" }] : /* istanbul ignore next */ []);
338
+ this.restAfterVisible = signal(false, ...ngDevMode ? [{ debugName: "restAfterVisible" }] : /* istanbul ignore next */ []);
339
+ this.tabListRef = viewChild("tabList", ...ngDevMode ? [{ debugName: "tabListRef" }] : /* istanbul ignore next */ []);
340
+ this.activeId = input(null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
341
+ this.direction = input("horizontal", ...ngDevMode ? [{ debugName: "direction" }] : /* istanbul ignore next */ []);
342
+ this.stretch = input(false, {
343
+ ...ngDevMode ? { debugName: "stretch" } : /* istanbul ignore next */ {},
344
+ transform: booleanAttribute
345
+ });
346
+ this.contentScrollable = input(true, {
347
+ ...ngDevMode ? { debugName: "contentScrollable" } : /* istanbul ignore next */ {},
348
+ transform: booleanAttribute
349
+ });
350
+ this.activeIdChange = output();
351
+ this.#internalId = signal(null, ...ngDevMode ? [{ debugName: "#internalId" }] : /* istanbul ignore next */ []);
352
+ this.#scrollIntervalId = null;
353
+ if (this.#win) fromEvent(this.#win, "resize").pipe(debounceTime(REST_DEBOUNCE_MS), takeUntilDestroyed()).subscribe(() => this.#updateRestVisibility());
354
+ afterNextRender(() => this.#updateRestVisibility());
355
+ inject(DestroyRef).onDestroy(() => this.#clearScrollInterval());
356
+ }
357
+ selectTab(id) {
358
+ const target = this.visibleTabs().find((tab) => tab.id() === id);
359
+ if (!target || target.disabled()) return;
360
+ this.#internalId.set(id);
361
+ this.activeIdChange.emit(id);
362
+ this.#scrollTabIntoView(id);
363
+ }
364
+ onTabKeydown(event) {
365
+ const enabled = this.visibleTabs().filter((tab) => !tab.disabled());
366
+ if (!enabled.length) return;
367
+ const isVertical = this.direction() === "vertical";
368
+ const nextKey = isVertical ? "ArrowDown" : "ArrowRight";
369
+ const prevKey = isVertical ? "ArrowUp" : "ArrowLeft";
370
+ const currentIndex = enabled.findIndex((tab) => tab.id() === this.selectedId());
371
+ const targetIndex = (/* @__PURE__ */ new Map([
372
+ [nextKey, (currentIndex + 1) % enabled.length],
373
+ [prevKey, (currentIndex - 1 + enabled.length) % enabled.length],
374
+ ["Home", 0],
375
+ ["End", enabled.length - 1]
376
+ ])).get(event.key);
377
+ if (targetIndex === void 0) return;
378
+ event.preventDefault();
379
+ const targetId = enabled[targetIndex].id();
380
+ this.selectTab(targetId);
381
+ this.#focusTab(targetId);
382
+ }
383
+ onRestPointerDown(direction, event) {
384
+ if (event.button !== 0 || this.#scrollIntervalId !== null || !this.#win) return;
385
+ this.#scrollIntervalId = this.#win.setInterval(() => {
386
+ this.#scrollStep(direction);
387
+ this.#updateRestVisibility();
388
+ }, SCROLL_TICK_MS);
389
+ }
390
+ onRestPointerUp() {
391
+ this.#clearScrollInterval();
392
+ }
393
+ onTabListScroll() {
394
+ this.#updateRestVisibility();
395
+ }
396
+ #clearScrollInterval() {
397
+ if (this.#win && this.#scrollIntervalId !== null) {
398
+ this.#win.clearInterval(this.#scrollIntervalId);
399
+ this.#scrollIntervalId = null;
400
+ }
401
+ }
402
+ #scrollStep(direction) {
403
+ const list = this.tabListRef()?.nativeElement;
404
+ if (!list) return;
405
+ const scrolledLeft = list.scrollLeft;
406
+ const scrolledRight = list.scrollWidth - list.scrollLeft - list.clientWidth;
407
+ const remaining = direction === "before" ? scrolledLeft : scrolledRight;
408
+ if (remaining > 0) list.scrollBy(direction === "before" ? -12 : SCROLL_STEP, 0);
409
+ if (remaining - SCROLL_STEP <= 0) this.#clearScrollInterval();
410
+ }
411
+ #updateRestVisibility() {
412
+ const list = this.tabListRef()?.nativeElement;
413
+ if (!list || this.direction() !== "horizontal") {
414
+ this.restBeforeVisible.set(false);
415
+ this.restAfterVisible.set(false);
416
+ return;
417
+ }
418
+ const scrolledRight = list.scrollWidth - list.scrollLeft - list.clientWidth;
419
+ this.restBeforeVisible.set(list.scrollLeft > 0);
420
+ this.restAfterVisible.set(scrolledRight > 1);
421
+ }
422
+ #scrollTabIntoView(id) {
423
+ const list = this.tabListRef()?.nativeElement;
424
+ const tab = list?.querySelector(`[data-tabid="${id}"]`);
425
+ if (!list || !tab) return;
426
+ const viewLeft = list.scrollLeft;
427
+ const viewRight = list.scrollLeft + list.clientWidth;
428
+ if (tab.offsetLeft < viewLeft) list.scrollTo({ left: tab.offsetLeft });
429
+ else if (tab.offsetLeft + tab.offsetWidth > viewRight) list.scrollTo({ left: tab.offsetLeft + tab.offsetWidth - list.clientWidth });
430
+ }
431
+ #focusTab(id) {
432
+ (this.tabListRef()?.nativeElement)?.querySelector(`[data-tabid="${id}"]`)?.focus();
433
+ }
434
+ static {
435
+ this.ɵfac = i0.ɵɵngDeclareFactory({
436
+ minVersion: "12.0.0",
437
+ version: "22.2.2",
438
+ ngImport: i0,
439
+ type: RtTabsComponent,
440
+ deps: [],
441
+ target: i0.ɵɵFactoryTarget.Component
442
+ });
443
+ }
444
+ static {
445
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
446
+ minVersion: "17.0.0",
447
+ version: "22.2.2",
448
+ type: RtTabsComponent,
449
+ isStandalone: true,
450
+ selector: "rt-tabs",
451
+ inputs: {
452
+ activeId: {
453
+ classPropertyName: "activeId",
454
+ publicName: "activeId",
455
+ isSignal: true,
456
+ isRequired: false,
457
+ transformFunction: null
458
+ },
459
+ direction: {
460
+ classPropertyName: "direction",
461
+ publicName: "direction",
462
+ isSignal: true,
463
+ isRequired: false,
464
+ transformFunction: null
465
+ },
466
+ stretch: {
467
+ classPropertyName: "stretch",
468
+ publicName: "stretch",
469
+ isSignal: true,
470
+ isRequired: false,
471
+ transformFunction: null
472
+ },
473
+ contentScrollable: {
474
+ classPropertyName: "contentScrollable",
475
+ publicName: "contentScrollable",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ }
480
+ },
481
+ outputs: { activeIdChange: "activeIdChange" },
482
+ host: {
483
+ properties: {
484
+ "class.rt-tabs--direction--horizontal": "direction() === 'horizontal'",
485
+ "class.rt-tabs--direction--vertical": "direction() === 'vertical'"
486
+ },
487
+ classAttribute: "rt-tabs"
488
+ },
489
+ queries: [{
490
+ propertyName: "tabs",
491
+ predicate: RtTabDirective,
492
+ isSignal: true
493
+ }, {
494
+ propertyName: "controls",
495
+ predicate: RtTabsControlDirective,
496
+ isSignal: true
497
+ }],
498
+ viewQueries: [{
499
+ propertyName: "tabListRef",
500
+ first: true,
501
+ predicate: ["tabList"],
502
+ descendants: true,
503
+ isSignal: true
504
+ }],
505
+ ngImport: i0,
506
+ template: "<ng-container rtBlock=\"rt-tabs\">\n <div rtElem=\"header\">\n @if (leftControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ before: true }\">\n @for (control of leftControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n\n <div rtElem=\"tab-list-wrapper\">\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-prev\"\n [rtMod]=\"{ before: true, visible: restBeforeVisible() }\"\n (mousedown)=\"onRestPointerDown('before', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-left\" color=\"current\" size=\"sm\" />\n </div>\n\n <div\n #tabList\n rtElem=\"tab-list\"\n qa-dataid=\"tabs-tab-list\"\n role=\"tablist\"\n [rtMod]=\"{ stretch: stretch(), direction: direction() }\"\n [attr.aria-orientation]=\"direction()\"\n (scroll)=\"onTabListScroll()\">\n @for (tab of visibleTabs(); track tab.id()) {\n <button\n rtBlock=\"rt-tab-item\"\n qa-dataid=\"tabs-tab\"\n type=\"button\"\n role=\"tab\"\n [rtMod]=\"{\n selected: tab.id() === selectedId(),\n disabled: tab.disabled(),\n invalid: tab.invalid(),\n stretch: stretch(),\n }\"\n [id]=\"'rt-tab-' + tab.id()\"\n [disabled]=\"tab.disabled()\"\n [attr.data-tabid]=\"tab.id()\"\n [attr.aria-selected]=\"tab.id() === selectedId()\"\n [attr.aria-controls]=\"'rt-tabpanel-' + tab.id()\"\n [attr.tabindex]=\"tab.id() === selectedId() ? 0 : -1\"\n [rtTooltip]=\"tab.invalid() ? tab.invalidTitle() : ''\"\n (click)=\"selectTab(tab.id())\"\n (keydown)=\"onTabKeydown($event)\">\n @if (tab.icon(); as icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"icon\" [color]=\"tab.iconColor()\" />\n }\n\n @if (tab.titleTemplate(); as titleTpl) {\n <ng-container [ngTemplateOutlet]=\"titleTpl\" />\n } @else {\n <span rtElem=\"title\">{{ tab.label() }}</span>\n }\n\n @if (tab.badge() !== null) {\n <!-- В одну строку: перенос внутри добавил бы пробел в текст кнопки. -->\n <!-- prettier-ignore -->\n <span rtElem=\"badge\" [rtTooltip]=\"tab.badgeTitle()\" [attr.aria-label]=\"tab.badgeAriaLabel() || null\">{{ tab.badge() }}</span>\n }\n </button>\n }\n </div>\n\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-next\"\n [rtMod]=\"{ after: true, visible: restAfterVisible() }\"\n (mousedown)=\"onRestPointerDown('after', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-right\" color=\"current\" size=\"sm\" />\n </div>\n </div>\n\n @if (rightControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ after: true }\">\n @for (control of rightControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n </div>\n\n @if (activeTab(); as tab) {\n <div\n rtElem=\"content\"\n qa-dataid=\"tabs-panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [rtMod]=\"{ scrollable: contentScrollable() }\"\n [id]=\"'rt-tabpanel-' + tab.id()\"\n [attr.aria-labelledby]=\"'rt-tab-' + tab.id()\">\n <ng-container [ngTemplateOutlet]=\"tab.templateRef\" />\n </div>\n }\n</ng-container>\n",
507
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-tabs{--rt-tabs-border-width: var(--rt-border-width-thin);--rt-tabs-transition-duration: var(--rt-duration-fast);display:flex;-webkit-tap-highlight-color:transparent}.rt-tabs--direction--horizontal{flex-direction:column}.rt-tabs--direction--vertical{flex-direction:row}.rt-tabs__header{display:flex;align-items:center}.rt-tabs__tab-list-wrapper{position:relative;display:flex;overflow:hidden;flex:1 1 auto;align-items:center}.rt-tabs__tab-list{display:flex;border-bottom:var(--rt-tabs-border-width) solid var(--rt-color-border-default);margin:0;-ms-overflow-style:none;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.rt-tabs__tab-list::-webkit-scrollbar{display:none}.rt-tabs__tab-list--direction--horizontal{width:100%;flex-direction:row}.rt-tabs__tab-list--direction--vertical{flex-direction:column;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default);border-bottom:0}.rt-tabs__tab-list--stretch{justify-content:space-between}.rt-tabs__rest{position:absolute;z-index:1;top:0;bottom:0;display:flex;width:var(--rt-control-height-lg);align-items:center;justify-content:center;background-color:var(--rt-color-bg-surface);color:var(--rt-color-text-muted);cursor:pointer;transition:color var(--rt-tabs-transition-duration) linear;visibility:hidden}.rt-tabs__rest:hover{color:var(--rt-color-text-primary)}.rt-tabs__rest--before{left:0;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--after{right:0;border-left:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--visible{visibility:visible}.rt-tabs__controls{display:flex;flex-shrink:0;align-items:center}.rt-tabs__controls--before{padding-right:var(--rt-space-md)}.rt-tabs__controls--after{padding-left:var(--rt-space-md)}.rt-tabs__content{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;padding-top:var(--rt-space-md);gap:var(--rt-space-md);line-height:var(--rt-leading-relaxed)}.rt-tabs__content--scrollable{overflow:auto}.rt-tab-item{--rt-tab-item-border-width: var(--rt-border-width-thin);--rt-tab-item-badge-radius: var(--rt-radius-full);--rt-tab-item-transition-duration: var(--rt-duration-fast);position:relative;display:inline-flex;align-items:center;justify-content:center;padding:var(--rt-space-2) var(--rt-space-4);border:0;margin:0;background-color:transparent;color:var(--rt-color-text-muted);cursor:pointer;font-family:inherit;font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-semibold);gap:var(--rt-space-sm);line-height:var(--rt-leading-none);transition:color var(--rt-tab-item-transition-duration) linear,background-color var(--rt-tab-item-transition-duration) linear;white-space:nowrap}.rt-tab-item:after{position:absolute;bottom:calc(-1 * var(--rt-tab-item-border-width));height:2px;background-color:transparent;content:\"\";inset-inline:0;pointer-events:none}.rt-tab-item:hover:not(.rt-tab-item--disabled,.rt-tab-item--selected){background-color:var(--rt-color-bg-hover);color:var(--rt-color-text-primary)}.rt-tab-item:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-3px}.rt-tab-item__title{overflow:hidden;max-width:200px;text-overflow:ellipsis}.rt-tab-item__icon{flex-shrink:0}.rt-tab-item__badge{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 var(--rt-space-2);border-radius:var(--rt-tab-item-badge-radius);background-color:var(--rt-color-bg-surface-subtle);color:var(--rt-color-text-muted);font-size:var(--rt-text-xs);font-weight:var(--rt-font-weight-medium);line-height:var(--rt-leading-none)}.rt-tab-item--selected{color:var(--rt-color-action-primary);cursor:default}.rt-tab-item--selected:after{background-color:var(--rt-color-action-primary)}.rt-tab-item--selected .rt-tab-item__badge{background-color:var(--rt-color-action-primary-soft);color:var(--rt-color-action-primary)}.rt-tab-item--invalid{color:var(--rt-color-state-danger)}.rt-tab-item--invalid:after{background-color:var(--rt-color-state-danger)}.rt-tab-item--disabled{color:var(--rt-color-text-disabled);cursor:not-allowed}.rt-tab-item--stretch{max-width:100%;flex:1 1 auto}}\n"],
508
+ dependencies: [
509
+ {
510
+ kind: "directive",
511
+ type: NgTemplateOutlet,
512
+ selector: "[ngTemplateOutlet]",
513
+ inputs: [
514
+ "ngTemplateOutletContext",
515
+ "ngTemplateOutlet",
516
+ "ngTemplateOutletInjector"
517
+ ]
518
+ },
519
+ {
520
+ kind: "component",
521
+ type: RtIconComponent,
522
+ selector: "rt-icon",
523
+ inputs: [
524
+ "name",
525
+ "glyph",
526
+ "glyphStrategy",
527
+ "size",
528
+ "color",
529
+ "fill",
530
+ "spin",
531
+ "rotate"
532
+ ]
533
+ },
534
+ {
535
+ kind: "directive",
536
+ type: RtTooltipDirective,
537
+ selector: "[rtTooltip]",
538
+ inputs: [
539
+ "rtTooltip",
540
+ "rtTooltipPlacement",
541
+ "rtTooltipWhenTruncated",
542
+ "rtTooltipHideOnClick"
543
+ ],
544
+ exportAs: ["rtTooltip"]
545
+ },
546
+ {
547
+ kind: "directive",
548
+ type: BlockDirective,
549
+ selector: "[rtBlock]",
550
+ inputs: ["rtMod"]
551
+ },
552
+ {
553
+ kind: "directive",
554
+ type: ElemDirective,
555
+ selector: "[rtElem]",
556
+ inputs: ["rtMod"]
557
+ },
558
+ {
559
+ kind: "directive",
560
+ type: ModDirective,
561
+ selector: "[rtMod]"
562
+ }
563
+ ],
564
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
565
+ encapsulation: i0.ViewEncapsulation.None
566
+ });
567
+ }
568
+ };
569
+ i0.ɵɵngDeclareClassMetadata({
570
+ minVersion: "12.0.0",
571
+ version: "22.2.2",
572
+ ngImport: i0,
573
+ type: RtTabsComponent,
574
+ decorators: [{
575
+ type: Component,
576
+ args: [{
577
+ selector: "rt-tabs",
578
+ changeDetection: ChangeDetectionStrategy.OnPush,
579
+ encapsulation: ViewEncapsulation.None,
580
+ imports: [
581
+ NgTemplateOutlet,
582
+ RtIconComponent,
583
+ RtTooltipDirective,
584
+ BlockDirective,
585
+ ElemDirective,
586
+ ModDirective
587
+ ],
588
+ host: {
589
+ class: BEM_BLOCK,
590
+ "[class.rt-tabs--direction--horizontal]": "direction() === 'horizontal'",
591
+ "[class.rt-tabs--direction--vertical]": "direction() === 'vertical'"
592
+ },
593
+ template: "<ng-container rtBlock=\"rt-tabs\">\n <div rtElem=\"header\">\n @if (leftControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ before: true }\">\n @for (control of leftControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n\n <div rtElem=\"tab-list-wrapper\">\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-prev\"\n [rtMod]=\"{ before: true, visible: restBeforeVisible() }\"\n (mousedown)=\"onRestPointerDown('before', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-left\" color=\"current\" size=\"sm\" />\n </div>\n\n <div\n #tabList\n rtElem=\"tab-list\"\n qa-dataid=\"tabs-tab-list\"\n role=\"tablist\"\n [rtMod]=\"{ stretch: stretch(), direction: direction() }\"\n [attr.aria-orientation]=\"direction()\"\n (scroll)=\"onTabListScroll()\">\n @for (tab of visibleTabs(); track tab.id()) {\n <button\n rtBlock=\"rt-tab-item\"\n qa-dataid=\"tabs-tab\"\n type=\"button\"\n role=\"tab\"\n [rtMod]=\"{\n selected: tab.id() === selectedId(),\n disabled: tab.disabled(),\n invalid: tab.invalid(),\n stretch: stretch(),\n }\"\n [id]=\"'rt-tab-' + tab.id()\"\n [disabled]=\"tab.disabled()\"\n [attr.data-tabid]=\"tab.id()\"\n [attr.aria-selected]=\"tab.id() === selectedId()\"\n [attr.aria-controls]=\"'rt-tabpanel-' + tab.id()\"\n [attr.tabindex]=\"tab.id() === selectedId() ? 0 : -1\"\n [rtTooltip]=\"tab.invalid() ? tab.invalidTitle() : ''\"\n (click)=\"selectTab(tab.id())\"\n (keydown)=\"onTabKeydown($event)\">\n @if (tab.icon(); as icon) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"icon\" [color]=\"tab.iconColor()\" />\n }\n\n @if (tab.titleTemplate(); as titleTpl) {\n <ng-container [ngTemplateOutlet]=\"titleTpl\" />\n } @else {\n <span rtElem=\"title\">{{ tab.label() }}</span>\n }\n\n @if (tab.badge() !== null) {\n <!-- В одну строку: перенос внутри добавил бы пробел в текст кнопки. -->\n <!-- prettier-ignore -->\n <span rtElem=\"badge\" [rtTooltip]=\"tab.badgeTitle()\" [attr.aria-label]=\"tab.badgeAriaLabel() || null\">{{ tab.badge() }}</span>\n }\n </button>\n }\n </div>\n\n <div\n rtElem=\"rest\"\n qa-dataid=\"tabs-scroll-next\"\n [rtMod]=\"{ after: true, visible: restAfterVisible() }\"\n (mousedown)=\"onRestPointerDown('after', $event)\"\n (mouseup)=\"onRestPointerUp()\"\n (mouseleave)=\"onRestPointerUp()\">\n <rt-icon name=\"chevron-right\" color=\"current\" size=\"sm\" />\n </div>\n </div>\n\n @if (rightControls().length) {\n <div rtElem=\"controls\" [rtMod]=\"{ after: true }\">\n @for (control of rightControls(); track $index) {\n <ng-container [ngTemplateOutlet]=\"control.templateRef\" />\n }\n </div>\n }\n </div>\n\n @if (activeTab(); as tab) {\n <div\n rtElem=\"content\"\n qa-dataid=\"tabs-panel\"\n role=\"tabpanel\"\n tabindex=\"0\"\n [rtMod]=\"{ scrollable: contentScrollable() }\"\n [id]=\"'rt-tabpanel-' + tab.id()\"\n [attr.aria-labelledby]=\"'rt-tab-' + tab.id()\">\n <ng-container [ngTemplateOutlet]=\"tab.templateRef\" />\n </div>\n }\n</ng-container>\n",
594
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-tabs{--rt-tabs-border-width: var(--rt-border-width-thin);--rt-tabs-transition-duration: var(--rt-duration-fast);display:flex;-webkit-tap-highlight-color:transparent}.rt-tabs--direction--horizontal{flex-direction:column}.rt-tabs--direction--vertical{flex-direction:row}.rt-tabs__header{display:flex;align-items:center}.rt-tabs__tab-list-wrapper{position:relative;display:flex;overflow:hidden;flex:1 1 auto;align-items:center}.rt-tabs__tab-list{display:flex;border-bottom:var(--rt-tabs-border-width) solid var(--rt-color-border-default);margin:0;-ms-overflow-style:none;overflow-x:auto;scrollbar-width:none;white-space:nowrap}.rt-tabs__tab-list::-webkit-scrollbar{display:none}.rt-tabs__tab-list--direction--horizontal{width:100%;flex-direction:row}.rt-tabs__tab-list--direction--vertical{flex-direction:column;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default);border-bottom:0}.rt-tabs__tab-list--stretch{justify-content:space-between}.rt-tabs__rest{position:absolute;z-index:1;top:0;bottom:0;display:flex;width:var(--rt-control-height-lg);align-items:center;justify-content:center;background-color:var(--rt-color-bg-surface);color:var(--rt-color-text-muted);cursor:pointer;transition:color var(--rt-tabs-transition-duration) linear;visibility:hidden}.rt-tabs__rest:hover{color:var(--rt-color-text-primary)}.rt-tabs__rest--before{left:0;border-right:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--after{right:0;border-left:var(--rt-tabs-border-width) solid var(--rt-color-border-default)}.rt-tabs__rest--visible{visibility:visible}.rt-tabs__controls{display:flex;flex-shrink:0;align-items:center}.rt-tabs__controls--before{padding-right:var(--rt-space-md)}.rt-tabs__controls--after{padding-left:var(--rt-space-md)}.rt-tabs__content{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;padding-top:var(--rt-space-md);gap:var(--rt-space-md);line-height:var(--rt-leading-relaxed)}.rt-tabs__content--scrollable{overflow:auto}.rt-tab-item{--rt-tab-item-border-width: var(--rt-border-width-thin);--rt-tab-item-badge-radius: var(--rt-radius-full);--rt-tab-item-transition-duration: var(--rt-duration-fast);position:relative;display:inline-flex;align-items:center;justify-content:center;padding:var(--rt-space-2) var(--rt-space-4);border:0;margin:0;background-color:transparent;color:var(--rt-color-text-muted);cursor:pointer;font-family:inherit;font-size:var(--rt-text-sm);font-weight:var(--rt-font-weight-semibold);gap:var(--rt-space-sm);line-height:var(--rt-leading-none);transition:color var(--rt-tab-item-transition-duration) linear,background-color var(--rt-tab-item-transition-duration) linear;white-space:nowrap}.rt-tab-item:after{position:absolute;bottom:calc(-1 * var(--rt-tab-item-border-width));height:2px;background-color:transparent;content:\"\";inset-inline:0;pointer-events:none}.rt-tab-item:hover:not(.rt-tab-item--disabled,.rt-tab-item--selected){background-color:var(--rt-color-bg-hover);color:var(--rt-color-text-primary)}.rt-tab-item:focus-visible{outline:2px solid var(--rt-color-action-primary);outline-offset:-3px}.rt-tab-item__title{overflow:hidden;max-width:200px;text-overflow:ellipsis}.rt-tab-item__icon{flex-shrink:0}.rt-tab-item__badge{display:inline-flex;min-width:18px;height:18px;align-items:center;justify-content:center;padding:0 var(--rt-space-2);border-radius:var(--rt-tab-item-badge-radius);background-color:var(--rt-color-bg-surface-subtle);color:var(--rt-color-text-muted);font-size:var(--rt-text-xs);font-weight:var(--rt-font-weight-medium);line-height:var(--rt-leading-none)}.rt-tab-item--selected{color:var(--rt-color-action-primary);cursor:default}.rt-tab-item--selected:after{background-color:var(--rt-color-action-primary)}.rt-tab-item--selected .rt-tab-item__badge{background-color:var(--rt-color-action-primary-soft);color:var(--rt-color-action-primary)}.rt-tab-item--invalid{color:var(--rt-color-state-danger)}.rt-tab-item--invalid:after{background-color:var(--rt-color-state-danger)}.rt-tab-item--disabled{color:var(--rt-color-text-disabled);cursor:not-allowed}.rt-tab-item--stretch{max-width:100%;flex:1 1 auto}}\n"]
595
+ }]
596
+ }],
597
+ ctorParameters: () => [],
598
+ propDecorators: {
599
+ tabs: [{
600
+ type: i0.ContentChildren,
601
+ args: [i0.forwardRef(() => RtTabDirective), { isSignal: true }]
602
+ }],
603
+ controls: [{
604
+ type: i0.ContentChildren,
605
+ args: [i0.forwardRef(() => RtTabsControlDirective), { isSignal: true }]
606
+ }],
607
+ tabListRef: [{
608
+ type: i0.ViewChild,
609
+ args: ["tabList", { isSignal: true }]
610
+ }],
611
+ activeId: [{
612
+ type: i0.Input,
613
+ args: [{
614
+ isSignal: true,
615
+ alias: "activeId",
616
+ required: false
617
+ }]
618
+ }],
619
+ direction: [{
620
+ type: i0.Input,
621
+ args: [{
622
+ isSignal: true,
623
+ alias: "direction",
624
+ required: false
625
+ }]
626
+ }],
627
+ stretch: [{
628
+ type: i0.Input,
629
+ args: [{
630
+ isSignal: true,
631
+ alias: "stretch",
632
+ required: false
633
+ }]
634
+ }],
635
+ contentScrollable: [{
636
+ type: i0.Input,
637
+ args: [{
638
+ isSignal: true,
639
+ alias: "contentScrollable",
640
+ required: false
641
+ }]
642
+ }],
643
+ activeIdChange: [{
644
+ type: i0.Output,
645
+ args: ["activeIdChange"]
646
+ }]
647
+ }
648
+ });
349
649
  export { RtTabDirective, RtTabsComponent, RtTabsControlDirective };
350
- //# sourceMappingURL=rt-tools-ui-kit-v2-tabs.mjs.map
650
+
651
+ //# sourceMappingURL=rt-tools-ui-kit-v2-tabs.mjs.map