@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,540 +1,1067 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, TemplateRef, Directive, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, DestroyRef, contentChild, computed, input, booleanAttribute, output, isDevMode, effect, viewChild, signal } from '@angular/core';
3
- import { NgTemplateOutlet } from '@angular/common';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { RouterLink } from '@angular/router';
6
- import { Subject, mergeMap } from 'rxjs';
7
- import { BlockDirective, ElemDirective, ModDirective } from '@rt-tools/core';
8
- import { RT_KIT_LABELS, rtKitLabel, carryThemeScope, materialPresetClassesOf } from '@rt-tools/ui-kit-v2/core';
9
- import { RT_DIALOG_DATA, RtDialogRef, RtDialogComponent, RtDialogService } from '@rt-tools/ui-kit-v2/dialog';
10
- import { materialPairOf, RtIconComponent } from '@rt-tools/ui-kit-v2/icon';
11
- import * as i2 from '@rt-tools/ui-kit-v2/radius';
12
- import { RtRadiusDirective } from '@rt-tools/ui-kit-v2/radius';
13
- import * as i1 from '@rt-tools/ui-kit-v2/tooltip';
14
- import { RtTooltipDirective } from '@rt-tools/ui-kit-v2/tooltip';
15
- import { RtButtonDirective } from '@rt-tools/ui-kit-v2/button';
16
- import { FocusKeyManager } from '@angular/cdk/a11y';
17
- import * as i1$1 from '@angular/cdk/overlay';
18
- import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from '@angular/cdk/overlay';
19
- import { RtIconButtonComponent } from '@rt-tools/ui-kit-v2/icon-button';
20
-
21
- /**
22
- * Помечает `<ng-template>` своего значка пункта меню. Кит ставит содержимое на место значка
23
- * `rt-menu-item__icon` его размером и цветом тона пункта — так приложение рисует значок, которого
24
- * нет ни в наборе кита, ни в перечне имён Material. Свой значок сильнее `icon` и `glyph`.
25
- *
26
- * ```html
27
- * <rt-menu-item label="Сделать активным">
28
- * <ng-template rtMenuItemIcon><svg viewBox="0 0 24 24">…</svg></ng-template>
29
- * </rt-menu-item>
30
- * ```
31
- */
32
- class RtMenuItemIconDirective {
33
- constructor() {
34
- this.templateRef = inject(TemplateRef);
35
- }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuItemIconDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
37
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.6", type: RtMenuItemIconDirective, isStandalone: true, selector: "ng-template[rtMenuItemIcon]", ngImport: i0 }); }
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuItemIconDirective, decorators: [{
40
- type: Directive,
41
- args: [{
42
- selector: 'ng-template[rtMenuItemIcon]',
43
- }]
44
- }] });
45
-
46
- const BEM_BLOCK$2 = 'rt-menu-confirm-dialog';
47
- /**
48
- * Confirm-модалка деструктивного пункта `rt-menu-item`. Открывается через
49
- * `RtDialogService` (центрированный overlay поверх меню), возвращает `true`
50
- * при подтверждении и `false`/`undefined` при отмене.
51
- *
52
- * Модалка (а не popover-под-пунктом) нужна потому, что панель `rt-menu` сама
53
- * живёт в CDK Overlay: вложенный popover-overlay конфликтовал бы с её
54
- * backdrop/закрытием. Внутренний компонент — не экспортируется из `components`, это
55
- * деталь реализации confirm-флоу пункта меню.
56
- */
57
- class RtMenuConfirmDialogComponent {
58
- constructor() {
59
- this.t = inject(RT_KIT_LABELS);
60
- this.data = inject(RT_DIALOG_DATA);
61
- this.#dialogRef = inject(RtDialogRef);
62
- }
63
- #dialogRef;
64
- onConfirm() {
65
- this.#dialogRef.close(true);
66
- }
67
- onCancel() {
68
- this.#dialogRef.close(false);
69
- }
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
71
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtMenuConfirmDialogComponent, isStandalone: true, selector: "rt-menu-confirm-dialog", host: { classAttribute: "rt-menu-confirm-dialog" }, ngImport: i0, template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"], dependencies: [{ kind: "directive", type:
72
- // standalone components / directives
73
- RtButtonDirective, selector: "button[rtButton], a[rtButton]", inputs: ["label", "icon", "iconPos", "theme", "appearance", "size", "loading", "loadingIcon", "loadingLabel", "pressed"] }, { kind: "component", type: RtDialogComponent, selector: "rt-dialog", inputs: ["size", "width", "ariaLabel"] }, { kind: "directive", type: BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuConfirmDialogComponent, decorators: [{
76
- type: Component,
77
- args: [{ selector: 'rt-menu-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
78
- // standalone components / directives
79
- RtButtonDirective,
80
- RtDialogComponent,
81
- BlockDirective,
82
- ElemDirective,
83
- ], host: {
84
- class: BEM_BLOCK$2,
85
- }, template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"] }]
86
- }] });
87
-
88
- /** Значок пункта: свой `icon`, а без него — пара имени Material из перечня кита. */
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, TemplateRef, ViewEncapsulation, booleanAttribute, computed, contentChild, effect, inject, input, isDevMode, output, signal, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { RouterLink } from "@angular/router";
6
+ import { Subject, mergeMap } from "rxjs";
7
+ import { BlockDirective, ElemDirective, ModDirective } from "@rt-tools/core";
8
+ import { RT_KIT_LABELS, carryThemeScope, materialPresetClassesOf, rtKitLabel } from "@rt-tools/ui-kit-v2/core";
9
+ import { RT_DIALOG_DATA, RtDialogComponent, RtDialogRef, RtDialogService } from "@rt-tools/ui-kit-v2/dialog";
10
+ import { RtIconComponent, materialPairOf } from "@rt-tools/ui-kit-v2/icon";
11
+ import * as i2 from "@rt-tools/ui-kit-v2/radius";
12
+ import { RtRadiusDirective } from "@rt-tools/ui-kit-v2/radius";
13
+ import * as i1$1 from "@rt-tools/ui-kit-v2/tooltip";
14
+ import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
15
+ import { RtButtonDirective } from "@rt-tools/ui-kit-v2/button";
16
+ import { FocusKeyManager } from "@angular/cdk/a11y";
17
+ import * as i1 from "@angular/cdk/overlay";
18
+ import { CdkConnectedOverlay, CdkOverlayOrigin, OverlayModule } from "@angular/cdk/overlay";
19
+ import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
20
+ var RtMenuItemIconDirective = class RtMenuItemIconDirective {
21
+ constructor() {
22
+ this.templateRef = inject(TemplateRef);
23
+ }
24
+ static {
25
+ this.ɵfac = i0.ɵɵngDeclareFactory({
26
+ minVersion: "12.0.0",
27
+ version: "22.2.2",
28
+ ngImport: i0,
29
+ type: RtMenuItemIconDirective,
30
+ deps: [],
31
+ target: i0.ɵɵFactoryTarget.Directive
32
+ });
33
+ }
34
+ static {
35
+ this.ɵdir = i0.ɵɵngDeclareDirective({
36
+ minVersion: "14.0.0",
37
+ version: "22.2.2",
38
+ type: RtMenuItemIconDirective,
39
+ isStandalone: true,
40
+ selector: "ng-template[rtMenuItemIcon]",
41
+ ngImport: i0
42
+ });
43
+ }
44
+ };
45
+ i0.ɵɵngDeclareClassMetadata({
46
+ minVersion: "12.0.0",
47
+ version: "22.2.2",
48
+ ngImport: i0,
49
+ type: RtMenuItemIconDirective,
50
+ decorators: [{
51
+ type: Directive,
52
+ args: [{ selector: "ng-template[rtMenuItemIcon]" }]
53
+ }]
54
+ });
55
+ const BEM_BLOCK$2 = "rt-menu-confirm-dialog";
56
+ var RtMenuConfirmDialogComponent = class RtMenuConfirmDialogComponent {
57
+ constructor() {
58
+ this.t = inject(RT_KIT_LABELS);
59
+ this.data = inject(RT_DIALOG_DATA);
60
+ this.#dialogRef = inject(RtDialogRef);
61
+ }
62
+ #dialogRef;
63
+ onConfirm() {
64
+ this.#dialogRef.close(true);
65
+ }
66
+ onCancel() {
67
+ this.#dialogRef.close(false);
68
+ }
69
+ static {
70
+ this.ɵfac = i0.ɵɵngDeclareFactory({
71
+ minVersion: "12.0.0",
72
+ version: "22.2.2",
73
+ ngImport: i0,
74
+ type: RtMenuConfirmDialogComponent,
75
+ deps: [],
76
+ target: i0.ɵɵFactoryTarget.Component
77
+ });
78
+ }
79
+ static {
80
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
81
+ minVersion: "17.0.0",
82
+ version: "22.2.2",
83
+ type: RtMenuConfirmDialogComponent,
84
+ isStandalone: true,
85
+ selector: "rt-menu-confirm-dialog",
86
+ host: { classAttribute: "rt-menu-confirm-dialog" },
87
+ ngImport: i0,
88
+ template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n",
89
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"],
90
+ dependencies: [
91
+ {
92
+ kind: "directive",
93
+ type: RtButtonDirective,
94
+ selector: "button[rtButton], a[rtButton]",
95
+ inputs: [
96
+ "label",
97
+ "icon",
98
+ "iconPos",
99
+ "theme",
100
+ "appearance",
101
+ "size",
102
+ "loading",
103
+ "loadingIcon",
104
+ "loadingLabel",
105
+ "pressed"
106
+ ]
107
+ },
108
+ {
109
+ kind: "component",
110
+ type: RtDialogComponent,
111
+ selector: "rt-dialog",
112
+ inputs: [
113
+ "size",
114
+ "width",
115
+ "ariaLabel"
116
+ ]
117
+ },
118
+ {
119
+ kind: "directive",
120
+ type: BlockDirective,
121
+ selector: "[rtBlock]",
122
+ inputs: ["rtMod"]
123
+ },
124
+ {
125
+ kind: "directive",
126
+ type: ElemDirective,
127
+ selector: "[rtElem]",
128
+ inputs: ["rtMod"]
129
+ }
130
+ ],
131
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
132
+ encapsulation: i0.ViewEncapsulation.None
133
+ });
134
+ }
135
+ };
136
+ i0.ɵɵngDeclareClassMetadata({
137
+ minVersion: "12.0.0",
138
+ version: "22.2.2",
139
+ ngImport: i0,
140
+ type: RtMenuConfirmDialogComponent,
141
+ decorators: [{
142
+ type: Component,
143
+ args: [{
144
+ selector: "rt-menu-confirm-dialog",
145
+ changeDetection: ChangeDetectionStrategy.OnPush,
146
+ encapsulation: ViewEncapsulation.None,
147
+ imports: [
148
+ RtButtonDirective,
149
+ RtDialogComponent,
150
+ BlockDirective,
151
+ ElemDirective
152
+ ],
153
+ host: { class: BEM_BLOCK$2 },
154
+ template: "<rt-dialog width=\"360px\" [ariaLabel]=\"t().uiConfirmAction\">\n <div rtBlock=\"rt-menu-confirm-dialog\">\n <div rtElem=\"text\">\n @if (data.title; as title) {\n <h2 rtElem=\"title\" qa-dataid=\"menu-confirm-title\">{{ title }}</h2>\n }\n <p rtElem=\"message\" qa-dataid=\"menu-confirm-message\">{{ data.message }}</p>\n </div>\n <div rtElem=\"footer\">\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-cancel\"\n type=\"button\"\n appearance=\"text\"\n theme=\"secondary\"\n [label]=\"data.cancelLabel\"\n (click)=\"onCancel()\"></button>\n <!-- eslint-disable-next-line @angular-eslint/template/elements-content -->\n <button\n rtButton\n qa-dataid=\"menu-confirm-accept\"\n type=\"button\"\n appearance=\"filled\"\n [label]=\"data.confirmLabel\"\n [theme]=\"data.tone\"\n (click)=\"onConfirm()\"></button>\n </div>\n </div>\n</rt-dialog>\n",
155
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-confirm-dialog{display:flex;box-sizing:border-box;flex-direction:column;padding:var(--rt-space-xl);gap:var(--rt-space-lg)}.rt-menu-confirm-dialog__text{display:flex;flex-direction:column;gap:var(--rt-space-sm)}.rt-menu-confirm-dialog__title{margin:0;color:var(--rt-color-text-primary);font-size:var(--rt-text-md);font-weight:var(--rt-font-weight-bold)}.rt-menu-confirm-dialog__message{margin:0;color:var(--rt-color-text-muted);font-size:var(--rt-text-sm)}.rt-menu-confirm-dialog__footer{display:flex;justify-content:flex-end;gap:var(--rt-space-sm)}}\n"]
156
+ }]
157
+ }]
158
+ });
89
159
  function menuItemIconName(icon, glyph) {
90
- if (icon !== null) {
91
- return icon;
92
- }
93
- return materialPairOf(glyph);
160
+ if (icon !== null) return icon;
161
+ return materialPairOf(glyph);
94
162
  }
95
- /**
96
- * Имя Material, о котором пункт должен предупредить: у него нет пары в перечне кита, а ни `icon`,
97
- * ни своего значка нет. Тогда пункт рисуется без значка, и без предупреждения пропуск не заметен.
98
- * `null` — предупреждать не о чем.
99
- */
100
163
  function unpairedGlyph(icon, glyph, hasOwnIcon) {
101
- if (!glyph || hasOwnIcon || menuItemIconName(icon, glyph) !== null) {
102
- return null;
103
- }
104
- return glyph;
164
+ if (!glyph || hasOwnIcon || menuItemIconName(icon, glyph) !== null) return null;
165
+ return glyph;
105
166
  }
106
-
107
- /**
108
- * Имя DOM-события, которое `rt-menu-item` всплывающе диспатчит при выборе пункта.
109
- * `rt-menu` слушает его на панели и закрывается. DOM-событие (а не DI/output)
110
- * нужно потому, что пункты проецируются в overlay-панель — всплытие через DOM
111
- * переживает границы content-projection и overlay-контейнера.
112
- */
113
- const RT_MENU_SELECT_EVENT = 'rtMenuSelect';
114
-
115
- const BEM_BLOCK$1 = 'rt-menu-item';
116
- /**
117
- * Пункт меню `rt-menu`: иконка (опц.) + лейбл. Кликабелен и активируется с
118
- * клавиатуры (Enter/Space). Выбор пункта эмитит `(selected)` для потребителя
119
- * и всплывающе диспатчит DOM-событие `rtMenuSelect`, по которому `rt-menu`
120
- * закрывается. `disabled` блокирует и `(selected)`, и закрытие.
121
- *
122
- * Tooltip — через host-директиву `RtTooltipDirective` (`tooltip` маппится в
123
- * `rtTooltip`): полезно показать причину недоступности на `disabled`-пункте.
124
- *
125
- * Деструктивный пункт может требовать подтверждения: задайте `confirmMessage`
126
- * (опц. `confirmTitle` / `confirmLabel` / `confirmTone`) — тогда по выбору
127
- * сперва открывается центрированная confirm-модалка, и `(selected)` эмитится
128
- * только после подтверждения. Модалка (а не popover) нужна потому, что панель
129
- * `rt-menu` сама в CDK Overlay; меню остаётся открытым под backdrop'ом, пока
130
- * пользователь решает.
131
- *
132
- * `ViewEncapsulation.None`; стили префиксованы `.rt-menu-item`. Host несёт
133
- * BEM-класс блока (template-`<ng-container rtBlock>` даёт контекст для `rtElem`,
134
- * но класс на comment-node не вешает — см. host-class паттерн rt-icon-button).
135
- */
136
- class RtMenuItemComponent {
137
- #elementRef;
138
- #dialogService;
139
- #destroyRef;
140
- #confirmRequestSource;
141
- #t_uiConfirm;
142
- #t_uiCancel;
143
- constructor() {
144
- this.#elementRef = inject(ElementRef);
145
- this.#dialogService = inject(RtDialogService);
146
- this.#destroyRef = inject(DestroyRef);
147
- this.#confirmRequestSource = new Subject();
148
- this.#t_uiConfirm = rtKitLabel('uiConfirm');
149
- this.#t_uiCancel = rtKitLabel('uiCancel');
150
- /** Свой значок приложения — `<ng-template rtMenuItemIcon>` внутри пункта. */
151
- this.ownIcon = contentChild(RtMenuItemIconDirective, /* @ts-ignore */
152
- ...(ngDevMode ? [{ debugName: "ownIcon" }] : /* istanbul ignore next */ []));
153
- /** Значок пункта: свой `icon`, а без него — пара имени Material из перечня кита. */
154
- this.iconName = computed(() => menuItemIconName(this.icon(), this.glyph()), /* @ts-ignore */
155
- ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
156
- /** Пункт — ссылка: задан `link`. Роль пункта меню и фокус тогда несёт ссылка внутри. */
157
- this.isLink = computed(() => this.link() !== null, /* @ts-ignore */
158
- ...(ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []));
159
- /** Адрес для ссылки: у недоступного пункта его нет, и ссылка не переходит. */
160
- this.linkTarget = computed(() => this.disabled() ? null : this.link(), /* @ts-ignore */
161
- ...(ngDevMode ? [{ debugName: "linkTarget" }] : /* istanbul ignore next */ []));
162
- /** Иконка слева от лейбла. `null` — без иконки. */
163
- this.icon = input(null, /* @ts-ignore */
164
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
165
- /** Текст пункта. */
166
- this.label = input('', /* @ts-ignore */
167
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
168
- /** Деструктивный пункт (например «Удалить») — красный текст/иконка. */
169
- this.danger = input(false, { ...(ngDevMode ? { debugName: "danger" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
170
- /** Пункт-согласие (например «Принять») — зелёный текст и иконка, как тон `success` пунктов первого кита. */
171
- this.success = input(false, { ...(ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
172
- /**
173
- * Имя значка Material, как его пишет пункт меню первого кита (`check_circle`). Рисует его набор
174
- * кита через перечень соответствий; `icon` сильнее, а имя без пары рисует пункт без значка.
175
- */
176
- this.glyph = input(null, /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "glyph" }] : /* istanbul ignore next */ []));
178
- /**
179
- * Залитый значок вместо контурного — как значки пунктов меню первого кита. Уходит в `fill`
180
- * значка: действует в материальном наборе, свой набор рисует значок одним рисунком. Свой
181
- * значок `rtMenuItemIcon` приложение рисует само, и заливка его не касается.
182
- */
183
- this.fill = input(false, { ...(ngDevMode ? { debugName: "fill" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
184
- /** Пункт — нынешнее значение выбора, который открыл меню: подсвечен фоном и объявлен скринридеру. */
185
- this.current = input(false, { ...(ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
186
- /** Недоступный пункт — приглушён, не эмитит `(selected)` и не закрывает меню. */
187
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
188
- /**
189
- * Текст confirm-модалки. Непустое значение включает подтверждение: по выбору
190
- * пункта открывается модалка, и `(selected)` эмитится только после согласия.
191
- */
192
- this.confirmMessage = input('', /* @ts-ignore */
193
- ...(ngDevMode ? [{ debugName: "confirmMessage" }] : /* istanbul ignore next */ []));
194
- /** Заголовок confirm-модалки (опц.). */
195
- this.confirmTitle = input(null, /* @ts-ignore */
196
- ...(ngDevMode ? [{ debugName: "confirmTitle" }] : /* istanbul ignore next */ []));
197
- /** Лейбл подтверждающей кнопки в модалке. */
198
- /** Пусто — берётся переведённая подпись по умолчанию */
199
- this.confirmLabel = input('', /* @ts-ignore */
200
- ...(ngDevMode ? [{ debugName: "confirmLabel" }] : /* istanbul ignore next */ []));
201
- /** Лейбл кнопки отмены в модалке. */
202
- this.confirmCancelLabel = input('', /* @ts-ignore */
203
- ...(ngDevMode ? [{ debugName: "confirmCancelLabel" }] : /* istanbul ignore next */ []));
204
- /** Тон подтверждающей кнопки в модалке. */
205
- this.confirmTone = input('danger', /* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "confirmTone" }] : /* istanbul ignore next */ []));
207
- /**
208
- * Команды маршрута приложения, как у `routerLink`. Задан — пункт рисует ссылку с `href`: Enter и
209
- * клик переходят по ней, а Ctrl/Cmd-click, Shift-click и средняя кнопка открывают новую вкладку
210
- * или окно силами браузера. Меню закрывается во всех этих случаях; подтверждение не спрашивается.
211
- */
212
- this.link = input(null, /* @ts-ignore */
213
- ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
214
- /** Пункт выбран (клик/Enter/Space и не `disabled`; после подтверждения, если задано). */
215
- this.selected = output();
216
- // Имя Material без пары рисует пункт без значка, и пропуск без предупреждения не заметен.
217
- if (isDevMode()) {
218
- effect(() => {
219
- const glyph = unpairedGlyph(this.icon(), this.glyph(), this.ownIcon() !== undefined);
220
- if (glyph !== null) {
221
- // eslint-disable-next-line no-console -- предупреждение разработчику приложения: другого канала у кита нет
222
- console.warn(`rt-menu-item «${this.label()}»: у значка Material «${glyph}» нет пары в перечне кита. ` +
223
- 'Задайте icon или свой значок через <ng-template rtMenuItemIcon>.');
224
- }
225
- });
226
- }
227
- // Подписка на результат confirm-модалки объявлена один раз: #openConfirm
228
- // эмитит данные модалки, mergeMap открывает её и ждёт afterClosed()
229
- // (одноразовый стрим — комплитится при закрытии модалки).
230
- this.#confirmRequestSource
231
- .pipe(mergeMap((data) => this.#dialogService
232
- .open(RtMenuConfirmDialogComponent, { data })
233
- .afterClosed()), takeUntilDestroyed(this.#destroyRef))
234
- .subscribe((confirmed = false) => {
235
- if (confirmed === true) {
236
- this.#commitSelection();
237
- }
238
- });
239
- }
240
- onActivate(event) {
241
- if (this.disabled()) {
242
- // Гасим, чтобы клик по disabled-пункту не «протёк» наружу.
243
- event.stopPropagation();
244
- event.preventDefault();
245
- return;
246
- }
247
- const message = this.confirmMessage().trim();
248
- if (message !== '' && !this.isLink()) {
249
- // Не закрываем меню сразу: оно остаётся открытым под backdrop'ом
250
- // модалки, чтобы пункт пережил решение пользователя (отмена → меню
251
- // снова видно). Подтверждение коммитит выбор.
252
- this.#openConfirm(message);
253
- return;
254
- }
255
- this.#commitSelection();
256
- }
257
- onKey(event) {
258
- if (this.isLink()) {
259
- this.#onLinkKey(event);
260
- return;
261
- }
262
- // Space иначе проскроллит страницу — гасим дефолт перед активацией.
263
- event.preventDefault();
264
- this.onActivate(event);
265
- }
266
- /** Средняя кнопка не даёт `click`: вкладку открывает браузер, а меню закрываем сами. */
267
- onAuxClick(event) {
268
- if (this.isLink() && event.button === 1 && !this.disabled()) {
269
- this.#commitSelection();
270
- }
271
- }
272
- /**
273
- * Enter на ссылке браузер сам превращает в `click`, и переход делает `routerLink`. Пробел ссылка
274
- * не нажимает — его переводим в тот же `click`, погасив прокрутку страницы.
275
- */
276
- #onLinkKey(event) {
277
- if (event instanceof KeyboardEvent && event.key === ' ') {
278
- event.preventDefault();
279
- this.#elementRef.nativeElement.querySelector('a')?.click();
280
- }
281
- }
282
- #openConfirm(message) {
283
- const data = {
284
- message,
285
- title: this.confirmTitle(),
286
- confirmLabel: this.confirmLabel() || this.#t_uiConfirm(),
287
- cancelLabel: this.confirmCancelLabel() || this.#t_uiCancel(),
288
- tone: this.confirmTone(),
289
- };
290
- // Открытие модалки и подписка на результат — в конструкторном стриме
291
- // (см. #confirmRequestSource); здесь только эмит данных модалки.
292
- this.#confirmRequestSource.next(data);
293
- }
294
- #commitSelection() {
295
- this.selected.emit();
296
- // Закрыть родительское меню: событие всплывает к панели rt-menu в overlay.
297
- this.#elementRef.nativeElement.dispatchEvent(new CustomEvent(RT_MENU_SELECT_EVENT, { bubbles: true }));
298
- }
299
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
300
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtMenuItemComponent, isStandalone: true, selector: "rt-menu-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, danger: { classPropertyName: "danger", publicName: "danger", isSignal: true, isRequired: false, transformFunction: null }, success: { classPropertyName: "success", publicName: "success", isSignal: true, isRequired: false, transformFunction: null }, glyph: { classPropertyName: "glyph", publicName: "glyph", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, confirmMessage: { classPropertyName: "confirmMessage", publicName: "confirmMessage", isSignal: true, isRequired: false, transformFunction: null }, confirmTitle: { classPropertyName: "confirmTitle", publicName: "confirmTitle", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmCancelLabel: { classPropertyName: "confirmCancelLabel", publicName: "confirmCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmTone: { classPropertyName: "confirmTone", publicName: "confirmTone", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { listeners: { "click": "onActivate($event)", "auxclick": "onAuxClick($event)", "keydown.enter": "onKey($event)", "keydown.space": "onKey($event)" }, properties: { "attr.role": "isLink() ? 'none' : 'menuitem'", "class.rt-menu-item--danger": "danger()", "class.rt-menu-item--success": "success()", "class.rt-menu-item--disabled": "disabled()", "class.rt-menu-item--current": "current()", "class.rt-menu-item--link": "isLink()", "attr.aria-current": "current() && !isLink() ? 'true' : null", "attr.aria-disabled": "disabled() && !isLink() ? 'true' : null", "attr.tabindex": "disabled() || isLink() ? null : 0" }, classAttribute: "rt-menu-item" }, queries: [{ propertyName: "ownIcon", first: true, predicate: RtMenuItemIconDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.RtTooltipDirective, inputs: ["rtTooltip", "tooltip"] }, { directive: i2.RtRadiusDirective, inputs: ["radius", "radius"] }], ngImport: i0, template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"], dependencies: [{ kind: "component", type:
301
- // standalone components / directives
302
- RtIconComponent, selector: "rt-icon", inputs: ["name", "glyph", "glyphStrategy", "size", "color", "fill", "spin", "rotate"] }, { kind: "directive", type: BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: ModDirective, selector: "[rtMod]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
303
- }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuItemComponent, decorators: [{
305
- type: Component,
306
- args: [{ selector: 'rt-menu-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
307
- // standalone components / directives
308
- RtIconComponent,
309
- BlockDirective,
310
- ElemDirective,
311
- ModDirective,
312
- NgTemplateOutlet,
313
- RouterLink,
314
- ], hostDirectives: [
315
- {
316
- directive: RtTooltipDirective,
317
- inputs: ['rtTooltip: tooltip'],
318
- },
319
- { directive: RtRadiusDirective, inputs: ['radius'] },
320
- ], host: {
321
- class: BEM_BLOCK$1,
322
- '[attr.role]': "isLink() ? 'none' : 'menuitem'",
323
- '[class.rt-menu-item--danger]': 'danger()',
324
- '[class.rt-menu-item--success]': 'success()',
325
- '[class.rt-menu-item--disabled]': 'disabled()',
326
- '[class.rt-menu-item--current]': 'current()',
327
- '[class.rt-menu-item--link]': 'isLink()',
328
- '[attr.aria-current]': "current() && !isLink() ? 'true' : null",
329
- '[attr.aria-disabled]': "disabled() && !isLink() ? 'true' : null",
330
- '[attr.tabindex]': 'disabled() || isLink() ? null : 0',
331
- '(click)': 'onActivate($event)',
332
- '(auxclick)': 'onAuxClick($event)',
333
- '(keydown.enter)': 'onKey($event)',
334
- '(keydown.space)': 'onKey($event)',
335
- }, template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"] }]
336
- }], ctorParameters: () => [], propDecorators: { ownIcon: [{ type: i0.ContentChild, args: [i0.forwardRef(() => RtMenuItemIconDirective), { isSignal: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], danger: [{ type: i0.Input, args: [{ isSignal: true, alias: "danger", required: false }] }], success: [{ type: i0.Input, args: [{ isSignal: true, alias: "success", required: false }] }], glyph: [{ type: i0.Input, args: [{ isSignal: true, alias: "glyph", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], confirmMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmMessage", required: false }] }], confirmTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmTitle", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], confirmCancelLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmCancelLabel", required: false }] }], confirmTone: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmTone", required: false }] }], link: [{ type: i0.Input, args: [{ isSignal: true, alias: "link", required: false }] }], selected: [{ type: i0.Output, args: ["selected"] }] } });
337
-
338
- const BEM_BLOCK = 'rt-menu';
167
+ const RT_MENU_SELECT_EVENT = "rtMenuSelect";
168
+ const BEM_BLOCK$1 = "rt-menu-item";
169
+ var RtMenuItemComponent = class RtMenuItemComponent {
170
+ #elementRef;
171
+ #dialogService;
172
+ #destroyRef;
173
+ #confirmRequestSource;
174
+ #t_uiConfirm;
175
+ #t_uiCancel;
176
+ constructor() {
177
+ this.#elementRef = inject(ElementRef);
178
+ this.#dialogService = inject(RtDialogService);
179
+ this.#destroyRef = inject(DestroyRef);
180
+ this.#confirmRequestSource = new Subject();
181
+ this.#t_uiConfirm = rtKitLabel("uiConfirm");
182
+ this.#t_uiCancel = rtKitLabel("uiCancel");
183
+ this.ownIcon = contentChild(RtMenuItemIconDirective, ...ngDevMode ? [{ debugName: "ownIcon" }] : /* istanbul ignore next */ []);
184
+ this.iconName = computed(() => menuItemIconName(this.icon(), this.glyph()), ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
185
+ this.isLink = computed(() => this.link() !== null, ...ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []);
186
+ this.linkTarget = computed(() => this.disabled() ? null : this.link(), ...ngDevMode ? [{ debugName: "linkTarget" }] : /* istanbul ignore next */ []);
187
+ this.icon = input(null, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
188
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
189
+ this.danger = input(false, {
190
+ ...ngDevMode ? { debugName: "danger" } : /* istanbul ignore next */ {},
191
+ transform: booleanAttribute
192
+ });
193
+ this.success = input(false, {
194
+ ...ngDevMode ? { debugName: "success" } : /* istanbul ignore next */ {},
195
+ transform: booleanAttribute
196
+ });
197
+ this.glyph = input(null, ...ngDevMode ? [{ debugName: "glyph" }] : /* istanbul ignore next */ []);
198
+ this.fill = input(false, {
199
+ ...ngDevMode ? { debugName: "fill" } : /* istanbul ignore next */ {},
200
+ transform: booleanAttribute
201
+ });
202
+ this.current = input(false, {
203
+ ...ngDevMode ? { debugName: "current" } : /* istanbul ignore next */ {},
204
+ transform: booleanAttribute
205
+ });
206
+ this.disabled = input(false, {
207
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
208
+ transform: booleanAttribute
209
+ });
210
+ this.confirmMessage = input("", ...ngDevMode ? [{ debugName: "confirmMessage" }] : /* istanbul ignore next */ []);
211
+ this.confirmTitle = input(null, ...ngDevMode ? [{ debugName: "confirmTitle" }] : /* istanbul ignore next */ []);
212
+ this.confirmLabel = input("", ...ngDevMode ? [{ debugName: "confirmLabel" }] : /* istanbul ignore next */ []);
213
+ this.confirmCancelLabel = input("", ...ngDevMode ? [{ debugName: "confirmCancelLabel" }] : /* istanbul ignore next */ []);
214
+ this.confirmTone = input("danger", ...ngDevMode ? [{ debugName: "confirmTone" }] : /* istanbul ignore next */ []);
215
+ this.link = input(null, ...ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []);
216
+ this.selected = output();
217
+ if (isDevMode()) effect(() => {
218
+ const glyph = unpairedGlyph(this.icon(), this.glyph(), this.ownIcon() !== void 0);
219
+ if (glyph !== null) console.warn(`rt-menu-item «${this.label()}»: у значка Material «${glyph}» нет пары в перечне кита. Задайте icon или свой значок через <ng-template rtMenuItemIcon>.`);
220
+ });
221
+ this.#confirmRequestSource.pipe(mergeMap((data) => this.#dialogService.open(RtMenuConfirmDialogComponent, { data }).afterClosed()), takeUntilDestroyed(this.#destroyRef)).subscribe((confirmed = false) => {
222
+ if (confirmed === true) this.#commitSelection();
223
+ });
224
+ }
225
+ onActivate(event) {
226
+ if (this.disabled()) {
227
+ event.stopPropagation();
228
+ event.preventDefault();
229
+ return;
230
+ }
231
+ const message = this.confirmMessage().trim();
232
+ if (message !== "" && !this.isLink()) {
233
+ this.#openConfirm(message);
234
+ return;
235
+ }
236
+ this.#commitSelection();
237
+ }
238
+ onKey(event) {
239
+ if (this.isLink()) {
240
+ this.#onLinkKey(event);
241
+ return;
242
+ }
243
+ event.preventDefault();
244
+ this.onActivate(event);
245
+ }
246
+ onAuxClick(event) {
247
+ if (this.isLink() && event.button === 1 && !this.disabled()) this.#commitSelection();
248
+ }
249
+ #onLinkKey(event) {
250
+ if (event instanceof KeyboardEvent && event.key === " ") {
251
+ event.preventDefault();
252
+ this.#elementRef.nativeElement.querySelector("a")?.click();
253
+ }
254
+ }
255
+ #openConfirm(message) {
256
+ const data = {
257
+ message,
258
+ title: this.confirmTitle(),
259
+ confirmLabel: this.confirmLabel() || this.#t_uiConfirm(),
260
+ cancelLabel: this.confirmCancelLabel() || this.#t_uiCancel(),
261
+ tone: this.confirmTone()
262
+ };
263
+ this.#confirmRequestSource.next(data);
264
+ }
265
+ #commitSelection() {
266
+ this.selected.emit();
267
+ this.#elementRef.nativeElement.dispatchEvent(new CustomEvent(RT_MENU_SELECT_EVENT, { bubbles: true }));
268
+ }
269
+ static {
270
+ this.ɵfac = i0.ɵɵngDeclareFactory({
271
+ minVersion: "12.0.0",
272
+ version: "22.2.2",
273
+ ngImport: i0,
274
+ type: RtMenuItemComponent,
275
+ deps: [],
276
+ target: i0.ɵɵFactoryTarget.Component
277
+ });
278
+ }
279
+ static {
280
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
281
+ minVersion: "17.0.0",
282
+ version: "22.2.2",
283
+ type: RtMenuItemComponent,
284
+ isStandalone: true,
285
+ selector: "rt-menu-item",
286
+ inputs: {
287
+ icon: {
288
+ classPropertyName: "icon",
289
+ publicName: "icon",
290
+ isSignal: true,
291
+ isRequired: false,
292
+ transformFunction: null
293
+ },
294
+ label: {
295
+ classPropertyName: "label",
296
+ publicName: "label",
297
+ isSignal: true,
298
+ isRequired: false,
299
+ transformFunction: null
300
+ },
301
+ danger: {
302
+ classPropertyName: "danger",
303
+ publicName: "danger",
304
+ isSignal: true,
305
+ isRequired: false,
306
+ transformFunction: null
307
+ },
308
+ success: {
309
+ classPropertyName: "success",
310
+ publicName: "success",
311
+ isSignal: true,
312
+ isRequired: false,
313
+ transformFunction: null
314
+ },
315
+ glyph: {
316
+ classPropertyName: "glyph",
317
+ publicName: "glyph",
318
+ isSignal: true,
319
+ isRequired: false,
320
+ transformFunction: null
321
+ },
322
+ fill: {
323
+ classPropertyName: "fill",
324
+ publicName: "fill",
325
+ isSignal: true,
326
+ isRequired: false,
327
+ transformFunction: null
328
+ },
329
+ current: {
330
+ classPropertyName: "current",
331
+ publicName: "current",
332
+ isSignal: true,
333
+ isRequired: false,
334
+ transformFunction: null
335
+ },
336
+ disabled: {
337
+ classPropertyName: "disabled",
338
+ publicName: "disabled",
339
+ isSignal: true,
340
+ isRequired: false,
341
+ transformFunction: null
342
+ },
343
+ confirmMessage: {
344
+ classPropertyName: "confirmMessage",
345
+ publicName: "confirmMessage",
346
+ isSignal: true,
347
+ isRequired: false,
348
+ transformFunction: null
349
+ },
350
+ confirmTitle: {
351
+ classPropertyName: "confirmTitle",
352
+ publicName: "confirmTitle",
353
+ isSignal: true,
354
+ isRequired: false,
355
+ transformFunction: null
356
+ },
357
+ confirmLabel: {
358
+ classPropertyName: "confirmLabel",
359
+ publicName: "confirmLabel",
360
+ isSignal: true,
361
+ isRequired: false,
362
+ transformFunction: null
363
+ },
364
+ confirmCancelLabel: {
365
+ classPropertyName: "confirmCancelLabel",
366
+ publicName: "confirmCancelLabel",
367
+ isSignal: true,
368
+ isRequired: false,
369
+ transformFunction: null
370
+ },
371
+ confirmTone: {
372
+ classPropertyName: "confirmTone",
373
+ publicName: "confirmTone",
374
+ isSignal: true,
375
+ isRequired: false,
376
+ transformFunction: null
377
+ },
378
+ link: {
379
+ classPropertyName: "link",
380
+ publicName: "link",
381
+ isSignal: true,
382
+ isRequired: false,
383
+ transformFunction: null
384
+ }
385
+ },
386
+ outputs: { selected: "selected" },
387
+ host: {
388
+ listeners: {
389
+ "click": "onActivate($event)",
390
+ "auxclick": "onAuxClick($event)",
391
+ "keydown.enter": "onKey($event)",
392
+ "keydown.space": "onKey($event)"
393
+ },
394
+ properties: {
395
+ "attr.role": "isLink() ? 'none' : 'menuitem'",
396
+ "class.rt-menu-item--danger": "danger()",
397
+ "class.rt-menu-item--success": "success()",
398
+ "class.rt-menu-item--disabled": "disabled()",
399
+ "class.rt-menu-item--current": "current()",
400
+ "class.rt-menu-item--link": "isLink()",
401
+ "attr.aria-current": "current() && !isLink() ? 'true' : null",
402
+ "attr.aria-disabled": "disabled() && !isLink() ? 'true' : null",
403
+ "attr.tabindex": "disabled() || isLink() ? null : 0"
404
+ },
405
+ classAttribute: "rt-menu-item"
406
+ },
407
+ queries: [{
408
+ propertyName: "ownIcon",
409
+ first: true,
410
+ predicate: RtMenuItemIconDirective,
411
+ descendants: true,
412
+ isSignal: true
413
+ }],
414
+ hostDirectives: [{
415
+ directive: i1$1.RtTooltipDirective,
416
+ inputs: ["rtTooltip", "tooltip"]
417
+ }, {
418
+ directive: i2.RtRadiusDirective,
419
+ inputs: ["radius", "radius"]
420
+ }],
421
+ ngImport: i0,
422
+ template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n",
423
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"],
424
+ dependencies: [
425
+ {
426
+ kind: "component",
427
+ type: RtIconComponent,
428
+ selector: "rt-icon",
429
+ inputs: [
430
+ "name",
431
+ "glyph",
432
+ "glyphStrategy",
433
+ "size",
434
+ "color",
435
+ "fill",
436
+ "spin",
437
+ "rotate"
438
+ ]
439
+ },
440
+ {
441
+ kind: "directive",
442
+ type: BlockDirective,
443
+ selector: "[rtBlock]",
444
+ inputs: ["rtMod"]
445
+ },
446
+ {
447
+ kind: "directive",
448
+ type: ElemDirective,
449
+ selector: "[rtElem]",
450
+ inputs: ["rtMod"]
451
+ },
452
+ {
453
+ kind: "directive",
454
+ type: ModDirective,
455
+ selector: "[rtMod]"
456
+ },
457
+ {
458
+ kind: "directive",
459
+ type: NgTemplateOutlet,
460
+ selector: "[ngTemplateOutlet]",
461
+ inputs: [
462
+ "ngTemplateOutletContext",
463
+ "ngTemplateOutlet",
464
+ "ngTemplateOutletInjector"
465
+ ]
466
+ },
467
+ {
468
+ kind: "directive",
469
+ type: RouterLink,
470
+ selector: "[routerLink]",
471
+ inputs: [
472
+ "target",
473
+ "queryParams",
474
+ "fragment",
475
+ "queryParamsHandling",
476
+ "state",
477
+ "info",
478
+ "relativeTo",
479
+ "preserveFragment",
480
+ "skipLocationChange",
481
+ "replaceUrl",
482
+ "browserUrl",
483
+ "routerLink"
484
+ ]
485
+ }
486
+ ],
487
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
488
+ encapsulation: i0.ViewEncapsulation.None
489
+ });
490
+ }
491
+ };
492
+ i0.ɵɵngDeclareClassMetadata({
493
+ minVersion: "12.0.0",
494
+ version: "22.2.2",
495
+ ngImport: i0,
496
+ type: RtMenuItemComponent,
497
+ decorators: [{
498
+ type: Component,
499
+ args: [{
500
+ selector: "rt-menu-item",
501
+ changeDetection: ChangeDetectionStrategy.OnPush,
502
+ encapsulation: ViewEncapsulation.None,
503
+ imports: [
504
+ RtIconComponent,
505
+ BlockDirective,
506
+ ElemDirective,
507
+ ModDirective,
508
+ NgTemplateOutlet,
509
+ RouterLink
510
+ ],
511
+ hostDirectives: [{
512
+ directive: RtTooltipDirective,
513
+ inputs: ["rtTooltip: tooltip"]
514
+ }, {
515
+ directive: RtRadiusDirective,
516
+ inputs: ["radius"]
517
+ }],
518
+ host: {
519
+ class: BEM_BLOCK$1,
520
+ "[attr.role]": "isLink() ? 'none' : 'menuitem'",
521
+ "[class.rt-menu-item--danger]": "danger()",
522
+ "[class.rt-menu-item--success]": "success()",
523
+ "[class.rt-menu-item--disabled]": "disabled()",
524
+ "[class.rt-menu-item--current]": "current()",
525
+ "[class.rt-menu-item--link]": "isLink()",
526
+ "[attr.aria-current]": "current() && !isLink() ? 'true' : null",
527
+ "[attr.aria-disabled]": "disabled() && !isLink() ? 'true' : null",
528
+ "[attr.tabindex]": "disabled() || isLink() ? null : 0",
529
+ "(click)": "onActivate($event)",
530
+ "(auxclick)": "onAuxClick($event)",
531
+ "(keydown.enter)": "onKey($event)",
532
+ "(keydown.space)": "onKey($event)"
533
+ },
534
+ template: "<ng-container rtBlock=\"rt-menu-item\">\n @if (isLink()) {\n <a\n rtElem=\"link\"\n role=\"menuitem\"\n qa-dataid=\"menu-item-link\"\n [routerLink]=\"linkTarget()\"\n [attr.aria-current]=\"current() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.tabindex]=\"disabled() ? null : 0\">\n <ng-container [ngTemplateOutlet]=\"content\" />\n </a>\n } @else {\n <ng-container [ngTemplateOutlet]=\"content\" />\n }\n\n <ng-template #content>\n @if (ownIcon(); as own) {\n <span rtElem=\"icon\" qa-dataid=\"menu-item-own-icon\" aria-hidden=\"true\" [rtMod]=\"{ own: true }\">\n <ng-container [ngTemplateOutlet]=\"own.templateRef\" />\n </span>\n } @else if (iconName(); as name) {\n <rt-icon rtElem=\"icon\" size=\"sm\" [name]=\"name\" [fill]=\"fill()\" />\n }\n\n <span rtElem=\"label\" qa-dataid=\"menu-item-label\">{{ label() }}</span>\n </ng-template>\n</ng-container>\n",
535
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu-item{--rt-menu-item-radius: var(--rt-radius-sm);--rt-menu-item-transition-duration: var(--rt-duration-fast);--rt-menu-item-weight: var(--rt-overlay-menu-item-weight);--rt-menu-item-danger-color: var(--rt-overlay-menu-danger-color);--rt-menu-item-current-bg: var(--rt-overlay-menu-current-bg);--rt-menu-item-min-height: var(--rt-overlay-menu-item-min-height);--rt-menu-item-padding-y: var(--rt-overlay-menu-item-padding-y);--rt-menu-item-padding-x: var(--rt-overlay-menu-item-padding-x);--rt-menu-item-icon-size: var(--rt-overlay-menu-item-icon-size);--rt-menu-item-danger-label-color: var(--rt-overlay-menu-danger-label-color);--rt-menu-item-success-color: var(--rt-color-state-success-text);display:flex;width:100%;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:var(--rt-color-text-primary);cursor:pointer;font-size:var(--rt-text-sm);font-weight:var(--rt-menu-item-weight);gap:var(--rt-space-sm);text-align:start;transition:background-color var(--rt-menu-item-transition-duration) ease}.rt-menu-item:hover{background:var(--rt-color-bg-hover)}.rt-menu-item:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item__icon{min-width:var(--rt-menu-item-icon-size);max-width:var(--rt-menu-item-icon-size);min-height:var(--rt-menu-item-icon-size);max-height:var(--rt-menu-item-icon-size);flex-shrink:0;color:var(--rt-color-text-muted)}.rt-menu-item__icon--own{display:inline-flex;width:var(--rt-menu-item-icon-size);height:var(--rt-menu-item-icon-size);align-items:center;justify-content:center;font-size:var(--rt-menu-item-icon-size);line-height:1}.rt-menu-item__icon--own>*{max-width:100%;max-height:100%}.rt-menu-item__label{flex:1 1 auto;white-space:nowrap}.rt-menu-item--link{padding:0}.rt-menu-item__link{display:flex;min-width:0;min-height:var(--rt-menu-item-min-height);box-sizing:border-box;flex:1 1 auto;align-items:center;padding:var(--rt-menu-item-padding-y) var(--rt-menu-item-padding-x);border-radius:var(--rt-menu-item-radius);color:inherit;gap:var(--rt-space-sm);text-decoration:none}.rt-menu-item__link:focus-visible{background:var(--rt-color-bg-hover);outline:none}.rt-menu-item--current{background:var(--rt-menu-item-current-bg)}.rt-menu-item--danger{color:var(--rt-menu-item-danger-label-color)}.rt-menu-item--danger .rt-menu-item__icon{color:var(--rt-menu-item-danger-color)}.rt-menu-item--success,.rt-menu-item--success .rt-menu-item__icon{color:var(--rt-menu-item-success-color)}.rt-menu-item--disabled{color:var(--rt-color-text-muted);cursor:default;opacity:.5}.rt-menu-item--disabled:hover{background:transparent}.rt-menu-item[data-rt-radius=none]{--rt-menu-item-radius: var(--rt-radius-none)}.rt-menu-item[data-rt-radius=xs]{--rt-menu-item-radius: var(--rt-radius-xs)}.rt-menu-item[data-rt-radius=sm]{--rt-menu-item-radius: var(--rt-radius-sm)}.rt-menu-item[data-rt-radius=ms]{--rt-menu-item-radius: var(--rt-radius-ms)}.rt-menu-item[data-rt-radius=md]{--rt-menu-item-radius: var(--rt-radius-md)}.rt-menu-item[data-rt-radius=lg]{--rt-menu-item-radius: var(--rt-radius-lg)}.rt-menu-item[data-rt-radius=xl]{--rt-menu-item-radius: var(--rt-radius-xl)}.rt-menu-item[data-rt-radius=\"2xl\"]{--rt-menu-item-radius: var(--rt-radius-2xl)}.rt-menu-item[data-rt-radius=full]{--rt-menu-item-radius: var(--rt-radius-full)}}\n"]
536
+ }]
537
+ }],
538
+ ctorParameters: () => [],
539
+ propDecorators: {
540
+ ownIcon: [{
541
+ type: i0.ContentChild,
542
+ args: [i0.forwardRef(() => RtMenuItemIconDirective), { isSignal: true }]
543
+ }],
544
+ icon: [{
545
+ type: i0.Input,
546
+ args: [{
547
+ isSignal: true,
548
+ alias: "icon",
549
+ required: false
550
+ }]
551
+ }],
552
+ label: [{
553
+ type: i0.Input,
554
+ args: [{
555
+ isSignal: true,
556
+ alias: "label",
557
+ required: false
558
+ }]
559
+ }],
560
+ danger: [{
561
+ type: i0.Input,
562
+ args: [{
563
+ isSignal: true,
564
+ alias: "danger",
565
+ required: false
566
+ }]
567
+ }],
568
+ success: [{
569
+ type: i0.Input,
570
+ args: [{
571
+ isSignal: true,
572
+ alias: "success",
573
+ required: false
574
+ }]
575
+ }],
576
+ glyph: [{
577
+ type: i0.Input,
578
+ args: [{
579
+ isSignal: true,
580
+ alias: "glyph",
581
+ required: false
582
+ }]
583
+ }],
584
+ fill: [{
585
+ type: i0.Input,
586
+ args: [{
587
+ isSignal: true,
588
+ alias: "fill",
589
+ required: false
590
+ }]
591
+ }],
592
+ current: [{
593
+ type: i0.Input,
594
+ args: [{
595
+ isSignal: true,
596
+ alias: "current",
597
+ required: false
598
+ }]
599
+ }],
600
+ disabled: [{
601
+ type: i0.Input,
602
+ args: [{
603
+ isSignal: true,
604
+ alias: "disabled",
605
+ required: false
606
+ }]
607
+ }],
608
+ confirmMessage: [{
609
+ type: i0.Input,
610
+ args: [{
611
+ isSignal: true,
612
+ alias: "confirmMessage",
613
+ required: false
614
+ }]
615
+ }],
616
+ confirmTitle: [{
617
+ type: i0.Input,
618
+ args: [{
619
+ isSignal: true,
620
+ alias: "confirmTitle",
621
+ required: false
622
+ }]
623
+ }],
624
+ confirmLabel: [{
625
+ type: i0.Input,
626
+ args: [{
627
+ isSignal: true,
628
+ alias: "confirmLabel",
629
+ required: false
630
+ }]
631
+ }],
632
+ confirmCancelLabel: [{
633
+ type: i0.Input,
634
+ args: [{
635
+ isSignal: true,
636
+ alias: "confirmCancelLabel",
637
+ required: false
638
+ }]
639
+ }],
640
+ confirmTone: [{
641
+ type: i0.Input,
642
+ args: [{
643
+ isSignal: true,
644
+ alias: "confirmTone",
645
+ required: false
646
+ }]
647
+ }],
648
+ link: [{
649
+ type: i0.Input,
650
+ args: [{
651
+ isSignal: true,
652
+ alias: "link",
653
+ required: false
654
+ }]
655
+ }],
656
+ selected: [{
657
+ type: i0.Output,
658
+ args: ["selected"]
659
+ }]
660
+ }
661
+ });
662
+ const BEM_BLOCK = "rt-menu";
339
663
  const POSITION_BELOW_END = {
340
- originX: 'end',
341
- originY: 'bottom',
342
- overlayX: 'end',
343
- overlayY: 'top',
344
- offsetY: 4,
664
+ originX: "end",
665
+ originY: "bottom",
666
+ overlayX: "end",
667
+ overlayY: "top",
668
+ offsetY: 4
345
669
  };
346
670
  const POSITION_ABOVE_END = {
347
- originX: 'end',
348
- originY: 'top',
349
- overlayX: 'end',
350
- overlayY: 'bottom',
351
- offsetY: -4,
671
+ originX: "end",
672
+ originY: "top",
673
+ overlayX: "end",
674
+ overlayY: "bottom",
675
+ offsetY: -4
352
676
  };
353
677
  const POSITION_BELOW_START = {
354
- originX: 'start',
355
- originY: 'bottom',
356
- overlayX: 'start',
357
- overlayY: 'top',
358
- offsetY: 4,
678
+ originX: "start",
679
+ originY: "bottom",
680
+ overlayX: "start",
681
+ overlayY: "top",
682
+ offsetY: 4
359
683
  };
360
684
  const POSITION_ABOVE_START = {
361
- originX: 'start',
362
- originY: 'top',
363
- overlayX: 'start',
364
- overlayY: 'bottom',
365
- offsetY: -4,
685
+ originX: "start",
686
+ originY: "top",
687
+ overlayX: "start",
688
+ overlayY: "bottom",
689
+ offsetY: -4
366
690
  };
367
- /**
368
- * Dropdown-меню действий: icon-only триггер «…» + плавающая панель с пунктами
369
- * `rt-menu-item`, спроецированными через `<ng-content>`. Типовое применение —
370
- * per-row действия в конце строки `rt-table` (см. `[showRowActions]`).
371
- *
372
- * Движок — CDK `cdkConnectedOverlay` с прозрачным backdrop: авто-flip у края
373
- * viewport (4 fallback-позиции), backdrop-click и `(detach)` закрывают, Escape
374
- * закрывает через `(overlayKeydown)`. Панель не режется `overflow: hidden`
375
- * предками (таблицы, карточки), т.к. рендерится в overlay-контейнере.
376
- *
377
- * Выбор пункта закрывает меню: `rt-menu-item` всплывающе диспатчит DOM-событие
378
- * `rtMenuSelect`, которое панель ловит, — это переживает content-projection.
379
- *
380
- * @example
381
- * ```html
382
- * <rt-menu ariaLabel="Действия">
383
- * <rt-menu-item icon="ico-edit" label="Редактировать" (selected)="edit()" />
384
- * <rt-menu-item icon="ico-trash" label="Удалить" danger (selected)="remove()" />
385
- * </rt-menu>
386
- * ```
387
- */
388
- class RtMenuComponent {
389
- constructor() {
390
- this.#host = inject(ElementRef);
391
- this.#t_uiActions = rtKitLabel('uiActions');
392
- /** Ход стрелками по пунктам открытой панели; у закрытой его нет. */
393
- this.#keyManager = null;
394
- this.overlay = viewChild.required(CdkConnectedOverlay, /* @ts-ignore */
395
- ...(ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []));
396
- this.trigger = viewChild.required(CdkOverlayOrigin, /* @ts-ignore */
397
- ...(ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []));
398
- this.isOpen = signal(false, /* @ts-ignore */
399
- ...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
400
- /** Класс набора, найденный над меню при открытии: панель лежит вне контейнера с признаком. */
401
- this.presetClasses = signal([], /* @ts-ignore */
402
- ...(ngDevMode ? [{ debugName: "presetClasses" }] : /* istanbul ignore next */ []));
403
- /** Классы панели: заданные входом и класс набора. */
404
- this.panelClasses = computed(() => {
405
- const own = this.panelClass();
406
- return [...(Array.isArray(own) ? own : own.split(/\s+/).filter(Boolean)), ...this.presetClasses()];
407
- }, /* @ts-ignore */
408
- ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
409
- this.ariaText = computed(() => this.ariaLabel() || this.#t_uiActions(), /* @ts-ignore */
410
- ...(ngDevMode ? [{ debugName: "ariaText" }] : /* istanbul ignore next */ []));
411
- /** Fallback-цепочка позиций панели: первой идёт сторона по `align`. */
412
- this.overlayPositions = computed(() => this.align() === 'end'
413
- ? [POSITION_BELOW_END, POSITION_ABOVE_END, POSITION_BELOW_START, POSITION_ABOVE_START]
414
- : [POSITION_BELOW_START, POSITION_ABOVE_START, POSITION_BELOW_END, POSITION_ABOVE_END], /* @ts-ignore */
415
- ...(ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []));
416
- /** Иконка триггера. Default `ellipsis-h` («…» — три точки в конце строки). */
417
- this.icon = input('ellipsis-h', /* @ts-ignore */
418
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
419
- /** ARIA-метка триггера (icon-only кнопка) + текст tooltip'а. */
420
- /** Пусто — берётся переведённая подпись по умолчанию */
421
- this.ariaLabel = input('', /* @ts-ignore */
422
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
423
- /** Сторона раскрытия панели относительно триггера. */
424
- this.align = input('end', /* @ts-ignore */
425
- ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
426
- /**
427
- * Классы панели. Панель живёт поверх страницы, вне хоста меню, и признаки вида над хостом до неё
428
- * не доходят: семья, нарисованная своим набором, отдаёт его панели этим входом.
429
- */
430
- this.panelClass = input([], /* @ts-ignore */
431
- ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
432
- /** Размер кнопки-триггера: мельче `md` — в плотной строке рядом с другими действиями строки. */
433
- this.triggerSize = input('md', /* @ts-ignore */
434
- ...(ngDevMode ? [{ debugName: "triggerSize" }] : /* istanbul ignore next */ []));
435
- /** Размер панели: компактная — у меню действий строки таблицы. */
436
- this.size = input('md', /* @ts-ignore */
437
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
438
- /** Триггер отключён — меню не открыть. */
439
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
440
- /** Панель открылась (`true`) или закрылась (`false`); повтор того же состояния не приходит. */
441
- this.openedChange = output();
442
- }
443
- #host;
444
- #t_uiActions;
445
- /** Ход стрелками по пунктам открытой панели; у закрытой его нет. */
446
- #keyManager;
447
- toggle(event) {
448
- // Клик по триггеру не должен активировать строку таблицы под ним.
449
- event.stopPropagation();
450
- this.#setOpen(!this.isOpen());
451
- }
452
- close() {
453
- this.#setOpen(false);
454
- }
455
- /**
456
- * Панель легла на страницу — фокус уходит на первый пункт, как у меню Material. Пункты берутся
457
- * из разметки панели, а не запросом компонентов: таблица кладёт их шаблоном приложения, и
458
- * запрос содержимого меню их не видит.
459
- */
460
- onAttach() {
461
- const pane = this.overlay().overlayRef.overlayElement;
462
- // Тема куска `rtTheme` вокруг меню едет на коробку панели, как у поповера и подсказки:
463
- // панель лежит в конце страницы, и без этого меню из тёмной карточки рисовалось темой
464
- // страницы. Зовётся на каждом открытии — кусок вокруг кнопки мог смениться.
465
- carryThemeScope(pane, this.trigger().elementRef.nativeElement);
466
- const nodes = Array.from(pane.querySelectorAll('[role="menuitem"]'));
467
- const focusables = nodes.map((node) => ({
468
- disabled: node.getAttribute('aria-disabled') === 'true',
469
- focus: () => node.focus(),
470
- }));
471
- this.#keyManager = new FocusKeyManager(focusables).withWrap().withHomeAndEnd();
472
- this.#keyManager.setFirstItemActive();
473
- }
474
- /** Выбранный пункт закрывает панель и возвращает фокус кнопке, откуда меню открыли. */
475
- onSelect() {
476
- this.close();
477
- this.#focusTrigger();
478
- }
479
- onKeydown(event) {
480
- if (event.key === 'Escape') {
481
- this.close();
482
- this.#focusTrigger();
483
- return;
484
- }
485
- if (event.key === 'Tab') {
486
- // Tab уводит фокус дальше по порядку — панель за ним не остаётся. Панель лежит в конце
487
- // страницы, и без возврата Tab ушёл бы с неё в никуда: фокус ставится на кнопку, а
488
- // умолчание клавиши не отменяется — браузер ведёт его от кнопки к следующему, как у
489
- // меню Material.
490
- this.close();
491
- this.#focusTrigger();
492
- return;
493
- }
494
- this.#keyManager?.onKeydown(event);
495
- }
496
- #focusTrigger() {
497
- this.trigger().elementRef.nativeElement.querySelector('button')?.focus();
498
- }
499
- #setOpen(open) {
500
- if (open !== this.isOpen()) {
501
- if (!open) {
502
- this.#keyManager?.destroy();
503
- this.#keyManager = null;
504
- }
505
- if (open) {
506
- this.presetClasses.set(materialPresetClassesOf(this.#host.nativeElement));
507
- }
508
- this.isOpen.set(open);
509
- this.openedChange.emit(open);
510
- }
511
- }
512
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
513
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.6", type: RtMenuComponent, isStandalone: true, selector: "rt-menu", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, triggerSize: { classPropertyName: "triggerSize", publicName: "triggerSize", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openedChange: "openedChange" }, host: { properties: { "class.rt-menu--open": "isOpen()" }, classAttribute: "rt-menu" }, viewQueries: [{ propertyName: "overlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "trigger", first: true, predicate: CdkOverlayOrigin, descendants: true, isSignal: true }], ngImport: i0, template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"], dependencies: [{ kind: "ngmodule", type:
514
- // @angular/cdk
515
- OverlayModule }, { kind: "directive", type: i1$1.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i1$1.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type:
516
- // standalone components / directives
517
- RtIconButtonComponent, selector: "rt-icon-button", inputs: ["icon", "glyph", "ariaLabel", "variant", "iconColor", "iconFill", "size", "iconSize", "type", "tooltip", "tabIndex", "loading", "disabled", "active", "indicator"], outputs: ["clicked"] }, { 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 }); }
518
- }
519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtMenuComponent, decorators: [{
520
- type: Component,
521
- args: [{ selector: 'rt-menu', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
522
- // @angular/cdk
523
- OverlayModule,
524
- // standalone components / directives
525
- RtIconButtonComponent,
526
- BlockDirective,
527
- ElemDirective,
528
- ModDirective,
529
- ], host: {
530
- class: BEM_BLOCK,
531
- '[class.rt-menu--open]': 'isOpen()',
532
- }, template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"] }]
533
- }], propDecorators: { overlay: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }] }], trigger: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], triggerSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggerSize", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], openedChange: [{ type: i0.Output, args: ["openedChange"] }] } });
534
-
535
- /**
536
- * Generated bundle index. Do not edit.
537
- */
538
-
691
+ var RtMenuComponent = class RtMenuComponent {
692
+ constructor() {
693
+ this.#host = inject(ElementRef);
694
+ this.#t_uiActions = rtKitLabel("uiActions");
695
+ this.#keyManager = null;
696
+ this.overlay = viewChild.required(CdkConnectedOverlay, ...ngDevMode ? [{ debugName: "overlay" }] : /* istanbul ignore next */ []);
697
+ this.trigger = viewChild.required(CdkOverlayOrigin, ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
698
+ this.isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
699
+ this.presetClasses = signal([], ...ngDevMode ? [{ debugName: "presetClasses" }] : /* istanbul ignore next */ []);
700
+ this.panelClasses = computed(() => {
701
+ const own = this.panelClass();
702
+ return [...Array.isArray(own) ? own : own.split(/\s+/).filter(Boolean), ...this.presetClasses()];
703
+ }, ...ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []);
704
+ this.ariaText = computed(() => this.ariaLabel() || this.#t_uiActions(), ...ngDevMode ? [{ debugName: "ariaText" }] : /* istanbul ignore next */ []);
705
+ this.overlayPositions = computed(() => this.align() === "end" ? [
706
+ POSITION_BELOW_END,
707
+ POSITION_ABOVE_END,
708
+ POSITION_BELOW_START,
709
+ POSITION_ABOVE_START
710
+ ] : [
711
+ POSITION_BELOW_START,
712
+ POSITION_ABOVE_START,
713
+ POSITION_BELOW_END,
714
+ POSITION_ABOVE_END
715
+ ], ...ngDevMode ? [{ debugName: "overlayPositions" }] : /* istanbul ignore next */ []);
716
+ this.icon = input("ellipsis-h", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
717
+ this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
718
+ this.align = input("end", ...ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []);
719
+ this.panelClass = input([], ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
720
+ this.triggerSize = input("md", ...ngDevMode ? [{ debugName: "triggerSize" }] : /* istanbul ignore next */ []);
721
+ this.size = input("md", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
722
+ this.disabled = input(false, {
723
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
724
+ transform: booleanAttribute
725
+ });
726
+ this.openedChange = output();
727
+ }
728
+ #host;
729
+ #t_uiActions;
730
+ #keyManager;
731
+ toggle(event) {
732
+ event.stopPropagation();
733
+ this.#setOpen(!this.isOpen());
734
+ }
735
+ close() {
736
+ this.#setOpen(false);
737
+ }
738
+ onAttach() {
739
+ const pane = this.overlay().overlayRef.overlayElement;
740
+ carryThemeScope(pane, this.trigger().elementRef.nativeElement);
741
+ const focusables = Array.from(pane.querySelectorAll("[role=\"menuitem\"]")).map((node) => ({
742
+ disabled: node.getAttribute("aria-disabled") === "true",
743
+ focus: () => node.focus()
744
+ }));
745
+ this.#keyManager = new FocusKeyManager(focusables).withWrap().withHomeAndEnd();
746
+ this.#keyManager.setFirstItemActive();
747
+ }
748
+ onSelect() {
749
+ this.close();
750
+ this.#focusTrigger();
751
+ }
752
+ onKeydown(event) {
753
+ if (event.key === "Escape") {
754
+ this.close();
755
+ this.#focusTrigger();
756
+ return;
757
+ }
758
+ if (event.key === "Tab") {
759
+ this.close();
760
+ this.#focusTrigger();
761
+ return;
762
+ }
763
+ this.#keyManager?.onKeydown(event);
764
+ }
765
+ #focusTrigger() {
766
+ this.trigger().elementRef.nativeElement.querySelector("button")?.focus();
767
+ }
768
+ #setOpen(open) {
769
+ if (open !== this.isOpen()) {
770
+ if (!open) {
771
+ this.#keyManager?.destroy();
772
+ this.#keyManager = null;
773
+ }
774
+ if (open) this.presetClasses.set(materialPresetClassesOf(this.#host.nativeElement));
775
+ this.isOpen.set(open);
776
+ this.openedChange.emit(open);
777
+ }
778
+ }
779
+ static {
780
+ this.ɵfac = i0.ɵɵngDeclareFactory({
781
+ minVersion: "12.0.0",
782
+ version: "22.2.2",
783
+ ngImport: i0,
784
+ type: RtMenuComponent,
785
+ deps: [],
786
+ target: i0.ɵɵFactoryTarget.Component
787
+ });
788
+ }
789
+ static {
790
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
791
+ minVersion: "17.2.0",
792
+ version: "22.2.2",
793
+ type: RtMenuComponent,
794
+ isStandalone: true,
795
+ selector: "rt-menu",
796
+ inputs: {
797
+ icon: {
798
+ classPropertyName: "icon",
799
+ publicName: "icon",
800
+ isSignal: true,
801
+ isRequired: false,
802
+ transformFunction: null
803
+ },
804
+ ariaLabel: {
805
+ classPropertyName: "ariaLabel",
806
+ publicName: "ariaLabel",
807
+ isSignal: true,
808
+ isRequired: false,
809
+ transformFunction: null
810
+ },
811
+ align: {
812
+ classPropertyName: "align",
813
+ publicName: "align",
814
+ isSignal: true,
815
+ isRequired: false,
816
+ transformFunction: null
817
+ },
818
+ panelClass: {
819
+ classPropertyName: "panelClass",
820
+ publicName: "panelClass",
821
+ isSignal: true,
822
+ isRequired: false,
823
+ transformFunction: null
824
+ },
825
+ triggerSize: {
826
+ classPropertyName: "triggerSize",
827
+ publicName: "triggerSize",
828
+ isSignal: true,
829
+ isRequired: false,
830
+ transformFunction: null
831
+ },
832
+ size: {
833
+ classPropertyName: "size",
834
+ publicName: "size",
835
+ isSignal: true,
836
+ isRequired: false,
837
+ transformFunction: null
838
+ },
839
+ disabled: {
840
+ classPropertyName: "disabled",
841
+ publicName: "disabled",
842
+ isSignal: true,
843
+ isRequired: false,
844
+ transformFunction: null
845
+ }
846
+ },
847
+ outputs: { openedChange: "openedChange" },
848
+ host: {
849
+ properties: { "class.rt-menu--open": "isOpen()" },
850
+ classAttribute: "rt-menu"
851
+ },
852
+ viewQueries: [{
853
+ propertyName: "overlay",
854
+ first: true,
855
+ predicate: CdkConnectedOverlay,
856
+ descendants: true,
857
+ isSignal: true
858
+ }, {
859
+ propertyName: "trigger",
860
+ first: true,
861
+ predicate: CdkOverlayOrigin,
862
+ descendants: true,
863
+ isSignal: true
864
+ }],
865
+ ngImport: i0,
866
+ template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n",
867
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"],
868
+ dependencies: [
869
+ {
870
+ kind: "ngmodule",
871
+ type: OverlayModule
872
+ },
873
+ {
874
+ kind: "directive",
875
+ type: i1.CdkConnectedOverlay,
876
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
877
+ inputs: [
878
+ "cdkConnectedOverlayOrigin",
879
+ "cdkConnectedOverlayPositions",
880
+ "cdkConnectedOverlayPositionStrategy",
881
+ "cdkConnectedOverlayOffsetX",
882
+ "cdkConnectedOverlayOffsetY",
883
+ "cdkConnectedOverlayWidth",
884
+ "cdkConnectedOverlayHeight",
885
+ "cdkConnectedOverlayMinWidth",
886
+ "cdkConnectedOverlayMinHeight",
887
+ "cdkConnectedOverlayBackdropClass",
888
+ "cdkConnectedOverlayPanelClass",
889
+ "cdkConnectedOverlayViewportMargin",
890
+ "cdkConnectedOverlayScrollStrategy",
891
+ "cdkConnectedOverlayOpen",
892
+ "cdkConnectedOverlayDisableClose",
893
+ "cdkConnectedOverlayTransformOriginOn",
894
+ "cdkConnectedOverlayHasBackdrop",
895
+ "cdkConnectedOverlayLockPosition",
896
+ "cdkConnectedOverlayFlexibleDimensions",
897
+ "cdkConnectedOverlayGrowAfterOpen",
898
+ "cdkConnectedOverlayPush",
899
+ "cdkConnectedOverlayDisposeOnNavigation",
900
+ "cdkConnectedOverlayUsePopover",
901
+ "cdkConnectedOverlayMatchWidth",
902
+ "cdkConnectedOverlay"
903
+ ],
904
+ outputs: [
905
+ "backdropClick",
906
+ "positionChange",
907
+ "attach",
908
+ "detach",
909
+ "overlayKeydown",
910
+ "overlayOutsideClick"
911
+ ],
912
+ exportAs: ["cdkConnectedOverlay"]
913
+ },
914
+ {
915
+ kind: "directive",
916
+ type: i1.CdkOverlayOrigin,
917
+ selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
918
+ exportAs: ["cdkOverlayOrigin"]
919
+ },
920
+ {
921
+ kind: "component",
922
+ type: RtIconButtonComponent,
923
+ selector: "rt-icon-button",
924
+ inputs: [
925
+ "icon",
926
+ "glyph",
927
+ "ariaLabel",
928
+ "variant",
929
+ "iconColor",
930
+ "iconFill",
931
+ "size",
932
+ "iconSize",
933
+ "type",
934
+ "tooltip",
935
+ "tooltipHideOnClick",
936
+ "tabIndex",
937
+ "loading",
938
+ "disabled",
939
+ "active",
940
+ "expanded",
941
+ "indicator"
942
+ ],
943
+ outputs: ["clicked"]
944
+ },
945
+ {
946
+ kind: "directive",
947
+ type: BlockDirective,
948
+ selector: "[rtBlock]",
949
+ inputs: ["rtMod"]
950
+ },
951
+ {
952
+ kind: "directive",
953
+ type: ElemDirective,
954
+ selector: "[rtElem]",
955
+ inputs: ["rtMod"]
956
+ },
957
+ {
958
+ kind: "directive",
959
+ type: ModDirective,
960
+ selector: "[rtMod]"
961
+ }
962
+ ],
963
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
964
+ encapsulation: i0.ViewEncapsulation.None
965
+ });
966
+ }
967
+ };
968
+ i0.ɵɵngDeclareClassMetadata({
969
+ minVersion: "12.0.0",
970
+ version: "22.2.2",
971
+ ngImport: i0,
972
+ type: RtMenuComponent,
973
+ decorators: [{
974
+ type: Component,
975
+ args: [{
976
+ selector: "rt-menu",
977
+ changeDetection: ChangeDetectionStrategy.OnPush,
978
+ encapsulation: ViewEncapsulation.None,
979
+ imports: [
980
+ OverlayModule,
981
+ RtIconButtonComponent,
982
+ BlockDirective,
983
+ ElemDirective,
984
+ ModDirective
985
+ ],
986
+ host: {
987
+ class: BEM_BLOCK,
988
+ "[class.rt-menu--open]": "isOpen()"
989
+ },
990
+ template: "<rt-icon-button\n cdkOverlayOrigin\n qa-dataid=\"menu-trigger\"\n #trigger=\"cdkOverlayOrigin\"\n variant=\"ghost\"\n [size]=\"triggerSize()\"\n [icon]=\"icon()\"\n [ariaLabel]=\"ariaText()\"\n [tooltip]=\"ariaText()\"\n [disabled]=\"disabled()\"\n (clicked)=\"toggle($event)\" />\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"cdk-overlay-transparent-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"isOpen()\"\n [cdkConnectedOverlayPositions]=\"overlayPositions()\"\n [cdkConnectedOverlayPanelClass]=\"panelClasses()\"\n (backdropClick)=\"close()\"\n (attach)=\"onAttach()\"\n (detach)=\"close()\"\n (overlayKeydown)=\"onKeydown($event)\">\n <ng-container rtBlock=\"rt-menu\">\n <div rtElem=\"panel\" qa-dataid=\"menu-panel\" role=\"menu\" [rtMod]=\"{ size: size() }\" (rtMenuSelect)=\"onSelect()\">\n <ng-content />\n </div>\n </ng-container>\n</ng-template>\n",
991
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-menu{display:inline-flex;align-items:center;justify-content:center}.rt-menu__panel{--rt-menu-panel-radius: var(--rt-overlay-menu-radius);--rt-menu-panel-border-width: var(--rt-border-width-thin);--rt-menu-panel-shadow: var(--rt-overlay-menu-shadow);--rt-menu-panel-bg: var(--rt-overlay-menu-bg);--rt-menu-panel-padding-y: var(--rt-overlay-menu-padding-y);--rt-menu-panel-min-width: var(--rt-overlay-menu-min-width);display:flex;min-width:var(--rt-menu-panel-min-width);flex-direction:column;padding:var(--rt-menu-panel-padding-y) var(--rt-space-xs);border:var(--rt-menu-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-menu-panel-radius);background:var(--rt-menu-panel-bg);box-shadow:var(--rt-menu-panel-shadow)}.rt-menu__panel--size--sm{--rt-overlay-menu-item-min-height: var(--rt-overlay-menu-sm-item-min-height);--rt-overlay-menu-item-icon-size: var(--rt-overlay-menu-sm-item-icon-size)}}\n"]
992
+ }]
993
+ }],
994
+ propDecorators: {
995
+ overlay: [{
996
+ type: i0.ViewChild,
997
+ args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }]
998
+ }],
999
+ trigger: [{
1000
+ type: i0.ViewChild,
1001
+ args: [i0.forwardRef(() => CdkOverlayOrigin), { isSignal: true }]
1002
+ }],
1003
+ icon: [{
1004
+ type: i0.Input,
1005
+ args: [{
1006
+ isSignal: true,
1007
+ alias: "icon",
1008
+ required: false
1009
+ }]
1010
+ }],
1011
+ ariaLabel: [{
1012
+ type: i0.Input,
1013
+ args: [{
1014
+ isSignal: true,
1015
+ alias: "ariaLabel",
1016
+ required: false
1017
+ }]
1018
+ }],
1019
+ align: [{
1020
+ type: i0.Input,
1021
+ args: [{
1022
+ isSignal: true,
1023
+ alias: "align",
1024
+ required: false
1025
+ }]
1026
+ }],
1027
+ panelClass: [{
1028
+ type: i0.Input,
1029
+ args: [{
1030
+ isSignal: true,
1031
+ alias: "panelClass",
1032
+ required: false
1033
+ }]
1034
+ }],
1035
+ triggerSize: [{
1036
+ type: i0.Input,
1037
+ args: [{
1038
+ isSignal: true,
1039
+ alias: "triggerSize",
1040
+ required: false
1041
+ }]
1042
+ }],
1043
+ size: [{
1044
+ type: i0.Input,
1045
+ args: [{
1046
+ isSignal: true,
1047
+ alias: "size",
1048
+ required: false
1049
+ }]
1050
+ }],
1051
+ disabled: [{
1052
+ type: i0.Input,
1053
+ args: [{
1054
+ isSignal: true,
1055
+ alias: "disabled",
1056
+ required: false
1057
+ }]
1058
+ }],
1059
+ openedChange: [{
1060
+ type: i0.Output,
1061
+ args: ["openedChange"]
1062
+ }]
1063
+ }
1064
+ });
539
1065
  export { RT_MENU_SELECT_EVENT, RtMenuComponent, RtMenuItemComponent, RtMenuItemIconDirective };
540
- //# sourceMappingURL=rt-tools-ui-kit-v2-menu.mjs.map
1066
+
1067
+ //# sourceMappingURL=rt-tools-ui-kit-v2-menu.mjs.map