@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,227 +1,579 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, viewChild, signal, computed, linkedSignal, input, booleanAttribute, numberAttribute, output, DestroyRef, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { WINDOW, BlockDirective, ElemDirective, ModDirective } from '@rt-tools/core';
5
- import { RT_KIT_LABELS } from '@rt-tools/ui-kit-v2/core';
6
- import { RtButtonDirective } from '@rt-tools/ui-kit-v2/button';
7
- import { RtEmptyStateComponent } from '@rt-tools/ui-kit-v2/empty-state';
8
- import { RtFileDropComponent } from '@rt-tools/ui-kit-v2/file-drop';
9
- import { RtIconButtonComponent } from '@rt-tools/ui-kit-v2/icon-button';
10
- import { RT_IMAGE_CROPPER_QUALITY, RtImageCropperComponent } from '@rt-tools/ui-kit-v2/image-cropper';
11
- import { RtSpinnerComponent } from '@rt-tools/ui-kit-v2/spinner';
12
- import { RtTooltipDirective } from '@rt-tools/ui-kit-v2/tooltip';
13
-
14
- /**
15
- * Какое состояние занимает место. Загрузка приложения важнее всего, выбранный исходник важнее
16
- * картинки, картинка важнее зоны загрузки.
17
- */
1
+ import { DOCUMENT } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, booleanAttribute, computed, inject, input, linkedSignal, numberAttribute, output, signal, viewChild } from "@angular/core";
4
+ import { BlockDirective, ElemDirective, ModDirective, WINDOW } from "@rt-tools/core";
5
+ import { RT_KIT_LABELS } from "@rt-tools/ui-kit-v2/core";
6
+ import { RtButtonDirective } from "@rt-tools/ui-kit-v2/button";
7
+ import { RtEmptyStateComponent } from "@rt-tools/ui-kit-v2/empty-state";
8
+ import { RtFileDropComponent } from "@rt-tools/ui-kit-v2/file-drop";
9
+ import { RtIconButtonComponent } from "@rt-tools/ui-kit-v2/icon-button";
10
+ import { RT_IMAGE_CROPPER_QUALITY, RtImageCropperComponent } from "@rt-tools/ui-kit-v2/image-cropper";
11
+ import { RtSpinnerComponent } from "@rt-tools/ui-kit-v2/spinner";
12
+ import { RtTooltipDirective } from "@rt-tools/ui-kit-v2/tooltip";
18
13
  function uploadState(loading, hasSource, image) {
19
- if (loading) {
20
- return 'loading';
21
- }
22
- if (hasSource) {
23
- return 'cropping';
24
- }
25
- return image ? 'image' : 'empty';
14
+ if (loading) return "loading";
15
+ if (hasSource) return "cropping";
16
+ return image ? "image" : "empty";
26
17
  }
27
- /** Берётся только файл изображения: брошенный файл другого типа загрузчик пропускает */
28
18
  function isImageFile(file) {
29
- return !!file && file.type.startsWith('image/');
30
- }
31
-
32
- const BEM_BLOCK = 'rt-image-upload';
33
- /**
34
- * Загрузчик одного изображения: одно место, в котором по очереди стоят зона загрузки, обрезка и
35
- * сама картинка. Файл выбирают кнопкой зоны или бросают на неё; выбранный открывает обрезку, а
36
- * «Применить» ставит результат на место картинки и отдаёт файл приложению. Нажатие на картинку
37
- * выбирает другой файл.
38
- *
39
- * Картинка — адрес: приложение даёт свой, а адрес применённого файла загрузчик делает сам и
40
- * отпускает его, когда картинку сменили или компонент ушёл. Файл приложение получает в
41
- * `imageChanged`.
42
- */
43
- class RtImageUploadComponent {
44
- #window;
45
- #document;
46
- /** Адрес, сделанный загрузчиком под применённый файл: его и только его он отпускает */
47
- #ownUrl;
48
- constructor() {
49
- this.#window = inject(WINDOW);
50
- this.#document = inject(DOCUMENT);
51
- /** Адрес, сделанный загрузчиком под применённый файл: его и только его он отпускает */
52
- this.#ownUrl = null;
53
- this.picker = viewChild.required('picker', /* @ts-ignore */
54
- ...(ngDevMode ? [{ debugName: "picker" }] : /* istanbul ignore next */ []));
55
- this.t = inject(RT_KIT_LABELS);
56
- /** Выбранный файл, который сейчас режет обрезка */
57
- this.source = signal(null, /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []));
59
- /** Последний результат обрезки — его берёт «Применить» */
60
- this.result = signal(null, /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []));
62
- /** Что сейчас стоит в месте загрузчика */
63
- this.state = computed(() => uploadState(this.loading(), this.source() !== null, this.image()), /* @ts-ignore */
64
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
65
- /** Подсказка над картинкой: своя приложения или подпись кита */
66
- this.hint = computed(() => this.tooltip() || this.t().uiImageUploadChange, /* @ts-ignore */
67
- ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
68
- /** Круглая ли кнопка скачивания: подложка под размытием повторяет её скругление */
69
- this.downloadRound = computed(() => this.downloadShape() === 'circle', /* @ts-ignore */
70
- ...(ngDevMode ? [{ debugName: "downloadRound" }] : /* istanbul ignore next */ []));
71
- /** Шаг скругления кнопки скачивания: круг — полный шаг, квадрат — скругление кнопки по умолчанию */
72
- this.downloadRadius = computed(() => (this.downloadRound() ? 'full' : null), /* @ts-ignore */
73
- ...(ngDevMode ? [{ debugName: "downloadRadius" }] : /* istanbul ignore next */ []));
74
- /**
75
- * Адрес текущей картинки: данный приложением или сделанный под применённый файл. Новый адрес от
76
- * приложения снова берёт верх над применённым.
77
- */
78
- this.image = linkedSignal(() => this.imageUrl(), /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []));
80
- /** Адрес картинки от приложения */
81
- this.imageUrl = input(null, /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []));
83
- /** Имя файла, под которым картинку скачивают и отдают приложению */
84
- this.fileName = input('image', /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []));
86
- /** Подсказка над картинкой; пустая — подпись кита */
87
- this.tooltip = input('', /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []));
89
- /** Кнопка скачивания рядом с картинкой */
90
- this.downloadable = input(false, { ...(ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
91
- /** Форма кнопки скачивания; она заходит за правый верхний угол картинки при любой форме */
92
- this.downloadShape = input('circle', /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "downloadShape" }] : /* istanbul ignore next */ []));
94
- /** Размер значка кнопки скачивания; пусто — от размера кнопки */
95
- this.downloadIconSize = input(null, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "downloadIconSize" }] : /* istanbul ignore next */ []));
97
- /** Вид кнопки выбора файла в пустом загрузчике */
98
- this.chooseAppearance = input('outlined', /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "chooseAppearance" }] : /* istanbul ignore next */ []));
100
- /** Значок кнопки выбора файла; пусто — кнопка без значка */
101
- this.chooseIcon = input('ico-upload', /* @ts-ignore */
102
- ...(ngDevMode ? [{ debugName: "chooseIcon" }] : /* istanbul ignore next */ []));
103
- /** Без кнопок «Отмена» и «Применить»: каждый результат обрезки применяется сразу */
104
- this.autoApply = input(false, { ...(ngDevMode ? { debugName: "autoApply" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
105
- /** Приложение загружает картинку: на месте стоит индикатор */
106
- this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
107
- /** Недоступный загрузчик не берёт файлов и не отзывается на нажатие картинки */
108
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
109
- /** Соотношение рамки обрезки; пусто — свободная рамка */
110
- this.ratio = input(null, { ...(ngDevMode ? { debugName: "ratio" } : /* istanbul ignore next */ {}), transform: (value) => (value === null || value === '' ? null : numberAttribute(value, 0) || null) });
111
- /** Круглая маска обрезки для аватара */
112
- this.round = input(false, { ...(ngDevMode ? { debugName: "round" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
113
- /** Формат результата; пусто — формат исходника */
114
- this.format = input(null, /* @ts-ignore */
115
- ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
116
- /** Качество результата, от 0 до 100 */
117
- this.quality = input(RT_IMAGE_CROPPER_QUALITY, { ...(ngDevMode ? { debugName: "quality" } : /* istanbul ignore next */ {}), transform: (value) => numberAttribute(value, RT_IMAGE_CROPPER_QUALITY) });
118
- /** Применённый файл — его приложение отправляет, куда ему надо */
119
- this.imageChanged = output();
120
- /** Картинку скачали */
121
- this.downloaded = output();
122
- inject(DestroyRef).onDestroy(() => this.#release());
123
- }
124
- /** Открывает выбор файла, если загрузчик доступен */
125
- pick() {
126
- if (!this.disabled()) {
127
- this.picker().nativeElement.click();
128
- }
129
- }
130
- /** Файл выбран кнопкой или брошен: изображение открывает обрезку, остальное пропускается */
131
- choose(file) {
132
- if (this.disabled() || !isImageFile(file)) {
133
- return;
134
- }
135
- this.result.set(null);
136
- this.source.set(file);
137
- }
138
- onPicked(event) {
139
- const input = event.target;
140
- this.choose(input.files?.[0]);
141
- // Тот же файл, выбранный второй раз, иначе не даёт события
142
- input.value = '';
143
- }
144
- onSpace(event) {
145
- event.preventDefault();
146
- this.pick();
147
- }
148
- onCropped(result) {
149
- this.result.set(result);
150
- if (this.autoApply()) {
151
- this.#applyResult(result, false);
152
- }
153
- }
154
- apply() {
155
- const result = this.result();
156
- if (result !== null) {
157
- this.#applyResult(result, true);
158
- }
159
- }
160
- cancel() {
161
- this.source.set(null);
162
- this.result.set(null);
163
- }
164
- download() {
165
- const url = this.image();
166
- if (url === null) {
167
- return;
168
- }
169
- const link = this.#document.createElement('a');
170
- link.href = url;
171
- link.download = this.fileName();
172
- this.#document.body.appendChild(link);
173
- link.click();
174
- link.remove();
175
- this.downloaded.emit();
176
- }
177
- /** Результат становится картинкой; `close` убирает обрезку — при автоприменении она остаётся */
178
- #applyResult(result, close) {
179
- const file = new File([result.file], this.fileName(), { type: result.file.type });
180
- this.#release();
181
- this.#ownUrl = this.#window.URL.createObjectURL(file);
182
- this.image.set(this.#ownUrl);
183
- this.imageChanged.emit(file);
184
- if (close) {
185
- this.cancel();
186
- }
187
- }
188
- #release() {
189
- if (this.#ownUrl !== null) {
190
- this.#window.URL.revokeObjectURL(this.#ownUrl);
191
- this.#ownUrl = null;
192
- }
193
- }
194
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtImageUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
195
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtImageUploadComponent, isStandalone: true, selector: "rt-image-upload", inputs: { imageUrl: { classPropertyName: "imageUrl", publicName: "imageUrl", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, downloadable: { classPropertyName: "downloadable", publicName: "downloadable", isSignal: true, isRequired: false, transformFunction: null }, downloadShape: { classPropertyName: "downloadShape", publicName: "downloadShape", isSignal: true, isRequired: false, transformFunction: null }, downloadIconSize: { classPropertyName: "downloadIconSize", publicName: "downloadIconSize", isSignal: true, isRequired: false, transformFunction: null }, chooseAppearance: { classPropertyName: "chooseAppearance", publicName: "chooseAppearance", isSignal: true, isRequired: false, transformFunction: null }, chooseIcon: { classPropertyName: "chooseIcon", publicName: "chooseIcon", isSignal: true, isRequired: false, transformFunction: null }, autoApply: { classPropertyName: "autoApply", publicName: "autoApply", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: false, transformFunction: null }, round: { classPropertyName: "round", publicName: "round", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imageChanged: "imageChanged", downloaded: "downloaded" }, host: { properties: { "class.rt-image-upload--disabled": "disabled()" }, classAttribute: "rt-image-upload" }, viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container rtBlock=\"rt-image-upload\">\n <input\n #picker\n hidden\n type=\"file\"\n accept=\"image/*\"\n qa-dataid=\"image-upload-native\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\" />\n\n @switch (state()) {\n @case ('loading') {\n <div rtElem=\"loading\" qa-dataid=\"image-upload-loading\">\n <rt-spinner />\n </div>\n }\n @case ('cropping') {\n <rt-image-cropper\n qa-dataid=\"image-upload-cropper\"\n [file]=\"source()\"\n [ratio]=\"ratio()\"\n [round]=\"round()\"\n [format]=\"format()\"\n [quality]=\"quality()\"\n (cropped)=\"onCropped($event)\"\n (loadFailed)=\"cancel()\" />\n\n @if (!autoApply()) {\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"image-upload-cancel\"\n [label]=\"t().uiImageUploadCancel\"\n [attr.aria-label]=\"t().uiImageUploadCancel\"\n (click)=\"cancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-apply\"\n [label]=\"t().uiImageUploadApply\"\n [attr.aria-label]=\"t().uiImageUploadApply\"\n [disabled]=\"!result()\"\n (click)=\"apply()\"></button>\n </div>\n }\n }\n @case ('image') {\n <rt-file-drop accept=\"image/*\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <div rtElem=\"preview\">\n <img\n rtElem=\"image\"\n role=\"button\"\n qa-dataid=\"image-upload-image\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.alt]=\"t().uiImageUploadImage\"\n [rtTooltip]=\"disabled() ? '' : hint()\"\n [rtMod]=\"{ active: !disabled() }\"\n [src]=\"image()\"\n (click)=\"pick()\"\n (keydown.enter)=\"pick()\"\n (keydown.space)=\"onSpace($event)\" />\n\n @if (downloadable()) {\n <rt-icon-button\n rtElem=\"download\"\n icon=\"ico-download\"\n qa-dataid=\"image-upload-download\"\n [radius]=\"downloadRadius()\"\n [iconSize]=\"downloadIconSize()\"\n [rtMod]=\"{ round: downloadRound() }\"\n [ariaLabel]=\"t().uiDownload\"\n [tooltip]=\"t().uiDownload\"\n (click)=\"download()\" />\n }\n </div>\n </rt-file-drop>\n }\n @default {\n <rt-file-drop accept=\"image/*\" qa-dataid=\"image-upload-drop\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <rt-empty-state framed icon=\"cloud-upload\" [title]=\"t().uiImageUploadDrop\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-choose\"\n [appearance]=\"chooseAppearance()\"\n [icon]=\"chooseIcon()\"\n [label]=\"t().uiImageUploadChoose\"\n [attr.aria-label]=\"t().uiImageUploadChoose\"\n [disabled]=\"disabled()\"\n (click)=\"pick()\"></button>\n </rt-empty-state>\n </rt-file-drop>\n }\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-upload{--rt-image-upload-image-max-height: var(--rt-size-100);--rt-image-upload-image-radius: var(--rt-radius-md);--rt-image-upload-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-upload-hover-opacity: .85;--rt-image-upload-download-overhang: var(--rt-space-sm);--rt-image-upload-download-bg: color-mix(in srgb, var(--rt-color-bg-surface) 75%, transparent);--rt-image-upload-download-radius: var(--rt-radius-md);--rt-image-upload-download-blur: 8px;--rt-image-upload-download-size: var(--rt-control-height-md);display:block;width:100%}.rt-image-upload__loading{display:flex;align-items:center;justify-content:center;padding:var(--rt-space-xl)}.rt-image-upload__actions{display:flex;justify-content:flex-end;margin-top:var(--rt-space-sm);gap:var(--rt-space-sm)}.rt-image-upload__preview{position:relative;display:inline-block;max-width:100%;box-sizing:border-box;padding:var(--rt-image-upload-download-overhang);vertical-align:top}.rt-image-upload__download{position:absolute;top:0;right:0;border-radius:var(--rt-image-upload-download-radius);-webkit-backdrop-filter:blur(var(--rt-image-upload-download-blur));backdrop-filter:blur(var(--rt-image-upload-download-blur));background:var(--rt-image-upload-download-bg)}.rt-image-upload__download--round{--rt-image-upload-download-radius: var(--rt-radius-full)}.rt-image-upload__download .rt-icon-button{--rt-icon-button-size-step: var(--rt-image-upload-download-size)}.rt-image-upload__image{display:block;max-width:100%;max-height:var(--rt-image-upload-image-max-height);border-radius:var(--rt-image-upload-image-radius);object-fit:contain}.rt-image-upload__image--active{cursor:pointer}.rt-image-upload__image--active:hover{opacity:var(--rt-image-upload-hover-opacity)}.rt-image-upload__image--active:focus-visible{box-shadow:var(--rt-image-upload-focus-shadow);outline:none}}\n"], dependencies: [{ kind: "directive", type:
196
- // directives
197
- BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type: ModDirective, selector: "[rtMod]" }, { kind: "directive", type: RtButtonDirective, selector: "button[rtButton], a[rtButton]", inputs: ["label", "icon", "iconPos", "theme", "appearance", "size", "loading", "loadingIcon", "loadingLabel", "pressed"] }, { kind: "directive", type: RtTooltipDirective, selector: "[rtTooltip]", inputs: ["rtTooltip", "rtTooltipPlacement", "rtTooltipWhenTruncated"], exportAs: ["rtTooltip"] }, { kind: "component", type:
198
- // components
199
- RtEmptyStateComponent, selector: "rt-empty-state", inputs: ["icon", "glyph", "title", "description", "framed"] }, { kind: "component", type: RtFileDropComponent, selector: "rt-file-drop", inputs: ["disabled", "overlayLabel", "zones", "accept"], outputs: ["filesDropped", "zoneFilesDropped", "draggingChange"] }, { kind: "component", type: RtIconButtonComponent, selector: "rt-icon-button", inputs: ["icon", "glyph", "ariaLabel", "variant", "iconColor", "iconFill", "size", "iconSize", "type", "tooltip", "tabIndex", "loading", "disabled", "active", "indicator"], outputs: ["clicked"] }, { kind: "component", type: RtImageCropperComponent, selector: "rt-image-cropper", inputs: ["placeholder", "file", "ratio", "round", "minSize", "format", "quality", "disabled"], outputs: ["cropped", "loadFailed"] }, { kind: "component", type: RtSpinnerComponent, selector: "rt-spinner", inputs: ["diameter", "color", "appearance", "overlay", "backdrop", "plate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
19
+ return !!file && file.type.startsWith("image/");
200
20
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtImageUploadComponent, decorators: [{
202
- type: Component,
203
- args: [{ selector: 'rt-image-upload', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
204
- // directives
205
- BlockDirective,
206
- ElemDirective,
207
- ModDirective,
208
- RtButtonDirective,
209
- RtTooltipDirective,
210
- // components
211
- RtEmptyStateComponent,
212
- RtFileDropComponent,
213
- RtIconButtonComponent,
214
- RtImageCropperComponent,
215
- RtSpinnerComponent,
216
- ], host: {
217
- class: BEM_BLOCK,
218
- '[class.rt-image-upload--disabled]': 'disabled()',
219
- }, template: "<ng-container rtBlock=\"rt-image-upload\">\n <input\n #picker\n hidden\n type=\"file\"\n accept=\"image/*\"\n qa-dataid=\"image-upload-native\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\" />\n\n @switch (state()) {\n @case ('loading') {\n <div rtElem=\"loading\" qa-dataid=\"image-upload-loading\">\n <rt-spinner />\n </div>\n }\n @case ('cropping') {\n <rt-image-cropper\n qa-dataid=\"image-upload-cropper\"\n [file]=\"source()\"\n [ratio]=\"ratio()\"\n [round]=\"round()\"\n [format]=\"format()\"\n [quality]=\"quality()\"\n (cropped)=\"onCropped($event)\"\n (loadFailed)=\"cancel()\" />\n\n @if (!autoApply()) {\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"image-upload-cancel\"\n [label]=\"t().uiImageUploadCancel\"\n [attr.aria-label]=\"t().uiImageUploadCancel\"\n (click)=\"cancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-apply\"\n [label]=\"t().uiImageUploadApply\"\n [attr.aria-label]=\"t().uiImageUploadApply\"\n [disabled]=\"!result()\"\n (click)=\"apply()\"></button>\n </div>\n }\n }\n @case ('image') {\n <rt-file-drop accept=\"image/*\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <div rtElem=\"preview\">\n <img\n rtElem=\"image\"\n role=\"button\"\n qa-dataid=\"image-upload-image\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.alt]=\"t().uiImageUploadImage\"\n [rtTooltip]=\"disabled() ? '' : hint()\"\n [rtMod]=\"{ active: !disabled() }\"\n [src]=\"image()\"\n (click)=\"pick()\"\n (keydown.enter)=\"pick()\"\n (keydown.space)=\"onSpace($event)\" />\n\n @if (downloadable()) {\n <rt-icon-button\n rtElem=\"download\"\n icon=\"ico-download\"\n qa-dataid=\"image-upload-download\"\n [radius]=\"downloadRadius()\"\n [iconSize]=\"downloadIconSize()\"\n [rtMod]=\"{ round: downloadRound() }\"\n [ariaLabel]=\"t().uiDownload\"\n [tooltip]=\"t().uiDownload\"\n (click)=\"download()\" />\n }\n </div>\n </rt-file-drop>\n }\n @default {\n <rt-file-drop accept=\"image/*\" qa-dataid=\"image-upload-drop\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <rt-empty-state framed icon=\"cloud-upload\" [title]=\"t().uiImageUploadDrop\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-choose\"\n [appearance]=\"chooseAppearance()\"\n [icon]=\"chooseIcon()\"\n [label]=\"t().uiImageUploadChoose\"\n [attr.aria-label]=\"t().uiImageUploadChoose\"\n [disabled]=\"disabled()\"\n (click)=\"pick()\"></button>\n </rt-empty-state>\n </rt-file-drop>\n }\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-upload{--rt-image-upload-image-max-height: var(--rt-size-100);--rt-image-upload-image-radius: var(--rt-radius-md);--rt-image-upload-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-upload-hover-opacity: .85;--rt-image-upload-download-overhang: var(--rt-space-sm);--rt-image-upload-download-bg: color-mix(in srgb, var(--rt-color-bg-surface) 75%, transparent);--rt-image-upload-download-radius: var(--rt-radius-md);--rt-image-upload-download-blur: 8px;--rt-image-upload-download-size: var(--rt-control-height-md);display:block;width:100%}.rt-image-upload__loading{display:flex;align-items:center;justify-content:center;padding:var(--rt-space-xl)}.rt-image-upload__actions{display:flex;justify-content:flex-end;margin-top:var(--rt-space-sm);gap:var(--rt-space-sm)}.rt-image-upload__preview{position:relative;display:inline-block;max-width:100%;box-sizing:border-box;padding:var(--rt-image-upload-download-overhang);vertical-align:top}.rt-image-upload__download{position:absolute;top:0;right:0;border-radius:var(--rt-image-upload-download-radius);-webkit-backdrop-filter:blur(var(--rt-image-upload-download-blur));backdrop-filter:blur(var(--rt-image-upload-download-blur));background:var(--rt-image-upload-download-bg)}.rt-image-upload__download--round{--rt-image-upload-download-radius: var(--rt-radius-full)}.rt-image-upload__download .rt-icon-button{--rt-icon-button-size-step: var(--rt-image-upload-download-size)}.rt-image-upload__image{display:block;max-width:100%;max-height:var(--rt-image-upload-image-max-height);border-radius:var(--rt-image-upload-image-radius);object-fit:contain}.rt-image-upload__image--active{cursor:pointer}.rt-image-upload__image--active:hover{opacity:var(--rt-image-upload-hover-opacity)}.rt-image-upload__image--active:focus-visible{box-shadow:var(--rt-image-upload-focus-shadow);outline:none}}\n"] }]
220
- }], ctorParameters: () => [], propDecorators: { picker: [{ type: i0.ViewChild, args: ['picker', { isSignal: true }] }], imageUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageUrl", required: false }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }], tooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "tooltip", required: false }] }], downloadable: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadable", required: false }] }], downloadShape: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadShape", required: false }] }], downloadIconSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadIconSize", required: false }] }], chooseAppearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseAppearance", required: false }] }], chooseIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "chooseIcon", required: false }] }], autoApply: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoApply", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ratio: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratio", required: false }] }], round: [{ type: i0.Input, args: [{ isSignal: true, alias: "round", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], quality: [{ type: i0.Input, args: [{ isSignal: true, alias: "quality", required: false }] }], imageChanged: [{ type: i0.Output, args: ["imageChanged"] }], downloaded: [{ type: i0.Output, args: ["downloaded"] }] } });
221
-
222
- /**
223
- * Generated bundle index. Do not edit.
224
- */
225
-
21
+ const BEM_BLOCK = "rt-image-upload";
22
+ var RtImageUploadComponent = class RtImageUploadComponent {
23
+ #window;
24
+ #document;
25
+ #ownUrl;
26
+ constructor() {
27
+ this.#window = inject(WINDOW);
28
+ this.#document = inject(DOCUMENT);
29
+ this.#ownUrl = null;
30
+ this.picker = viewChild.required("picker", ...ngDevMode ? [{ debugName: "picker" }] : /* istanbul ignore next */ []);
31
+ this.t = inject(RT_KIT_LABELS);
32
+ this.source = signal(null, ...ngDevMode ? [{ debugName: "source" }] : /* istanbul ignore next */ []);
33
+ this.result = signal(null, ...ngDevMode ? [{ debugName: "result" }] : /* istanbul ignore next */ []);
34
+ this.state = computed(() => uploadState(this.loading(), this.source() !== null, this.image()), ...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
35
+ this.hint = computed(() => this.tooltip() || this.t().uiImageUploadChange, ...ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []);
36
+ this.downloadRound = computed(() => this.downloadShape() === "circle", ...ngDevMode ? [{ debugName: "downloadRound" }] : /* istanbul ignore next */ []);
37
+ this.downloadRadius = computed(() => this.downloadRound() ? "full" : null, ...ngDevMode ? [{ debugName: "downloadRadius" }] : /* istanbul ignore next */ []);
38
+ this.image = linkedSignal(() => this.imageUrl(), ...ngDevMode ? [{ debugName: "image" }] : /* istanbul ignore next */ []);
39
+ this.imageUrl = input(null, ...ngDevMode ? [{ debugName: "imageUrl" }] : /* istanbul ignore next */ []);
40
+ this.fileName = input("image", ...ngDevMode ? [{ debugName: "fileName" }] : /* istanbul ignore next */ []);
41
+ this.tooltip = input("", ...ngDevMode ? [{ debugName: "tooltip" }] : /* istanbul ignore next */ []);
42
+ this.downloadable = input(false, {
43
+ ...ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {},
44
+ transform: booleanAttribute
45
+ });
46
+ this.downloadShape = input("circle", ...ngDevMode ? [{ debugName: "downloadShape" }] : /* istanbul ignore next */ []);
47
+ this.downloadIconSize = input(null, ...ngDevMode ? [{ debugName: "downloadIconSize" }] : /* istanbul ignore next */ []);
48
+ this.chooseAppearance = input("outlined", ...ngDevMode ? [{ debugName: "chooseAppearance" }] : /* istanbul ignore next */ []);
49
+ this.chooseIcon = input("ico-upload", ...ngDevMode ? [{ debugName: "chooseIcon" }] : /* istanbul ignore next */ []);
50
+ this.autoApply = input(false, {
51
+ ...ngDevMode ? { debugName: "autoApply" } : /* istanbul ignore next */ {},
52
+ transform: booleanAttribute
53
+ });
54
+ this.loading = input(false, {
55
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
56
+ transform: booleanAttribute
57
+ });
58
+ this.disabled = input(false, {
59
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
60
+ transform: booleanAttribute
61
+ });
62
+ this.ratio = input(null, {
63
+ ...ngDevMode ? { debugName: "ratio" } : /* istanbul ignore next */ {},
64
+ transform: (value) => value === null || value === "" ? null : numberAttribute(value, 0) || null
65
+ });
66
+ this.round = input(false, {
67
+ ...ngDevMode ? { debugName: "round" } : /* istanbul ignore next */ {},
68
+ transform: booleanAttribute
69
+ });
70
+ this.format = input(null, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
71
+ this.quality = input(RT_IMAGE_CROPPER_QUALITY, {
72
+ ...ngDevMode ? { debugName: "quality" } : /* istanbul ignore next */ {},
73
+ transform: (value) => numberAttribute(value, RT_IMAGE_CROPPER_QUALITY)
74
+ });
75
+ this.imageChanged = output();
76
+ this.downloaded = output();
77
+ inject(DestroyRef).onDestroy(() => this.#release());
78
+ }
79
+ pick() {
80
+ if (!this.disabled()) this.picker().nativeElement.click();
81
+ }
82
+ choose(file) {
83
+ if (this.disabled() || !isImageFile(file)) return;
84
+ this.result.set(null);
85
+ this.source.set(file);
86
+ }
87
+ onPicked(event) {
88
+ const input = event.target;
89
+ this.choose(input.files?.[0]);
90
+ input.value = "";
91
+ }
92
+ onSpace(event) {
93
+ event.preventDefault();
94
+ this.pick();
95
+ }
96
+ onCropped(result) {
97
+ this.result.set(result);
98
+ if (this.autoApply()) this.#applyResult(result, false);
99
+ }
100
+ apply() {
101
+ const result = this.result();
102
+ if (result !== null) this.#applyResult(result, true);
103
+ }
104
+ cancel() {
105
+ this.source.set(null);
106
+ this.result.set(null);
107
+ }
108
+ download() {
109
+ const url = this.image();
110
+ if (url === null) return;
111
+ const link = this.#document.createElement("a");
112
+ link.href = url;
113
+ link.download = this.fileName();
114
+ this.#document.body.appendChild(link);
115
+ link.click();
116
+ link.remove();
117
+ this.downloaded.emit();
118
+ }
119
+ #applyResult(result, close) {
120
+ const file = new File([result.file], this.fileName(), { type: result.file.type });
121
+ this.#release();
122
+ this.#ownUrl = this.#window.URL.createObjectURL(file);
123
+ this.image.set(this.#ownUrl);
124
+ this.imageChanged.emit(file);
125
+ if (close) this.cancel();
126
+ }
127
+ #release() {
128
+ if (this.#ownUrl !== null) {
129
+ this.#window.URL.revokeObjectURL(this.#ownUrl);
130
+ this.#ownUrl = null;
131
+ }
132
+ }
133
+ static {
134
+ this.ɵfac = i0.ɵɵngDeclareFactory({
135
+ minVersion: "12.0.0",
136
+ version: "22.2.2",
137
+ ngImport: i0,
138
+ type: RtImageUploadComponent,
139
+ deps: [],
140
+ target: i0.ɵɵFactoryTarget.Component
141
+ });
142
+ }
143
+ static {
144
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
145
+ minVersion: "17.0.0",
146
+ version: "22.2.2",
147
+ type: RtImageUploadComponent,
148
+ isStandalone: true,
149
+ selector: "rt-image-upload",
150
+ inputs: {
151
+ imageUrl: {
152
+ classPropertyName: "imageUrl",
153
+ publicName: "imageUrl",
154
+ isSignal: true,
155
+ isRequired: false,
156
+ transformFunction: null
157
+ },
158
+ fileName: {
159
+ classPropertyName: "fileName",
160
+ publicName: "fileName",
161
+ isSignal: true,
162
+ isRequired: false,
163
+ transformFunction: null
164
+ },
165
+ tooltip: {
166
+ classPropertyName: "tooltip",
167
+ publicName: "tooltip",
168
+ isSignal: true,
169
+ isRequired: false,
170
+ transformFunction: null
171
+ },
172
+ downloadable: {
173
+ classPropertyName: "downloadable",
174
+ publicName: "downloadable",
175
+ isSignal: true,
176
+ isRequired: false,
177
+ transformFunction: null
178
+ },
179
+ downloadShape: {
180
+ classPropertyName: "downloadShape",
181
+ publicName: "downloadShape",
182
+ isSignal: true,
183
+ isRequired: false,
184
+ transformFunction: null
185
+ },
186
+ downloadIconSize: {
187
+ classPropertyName: "downloadIconSize",
188
+ publicName: "downloadIconSize",
189
+ isSignal: true,
190
+ isRequired: false,
191
+ transformFunction: null
192
+ },
193
+ chooseAppearance: {
194
+ classPropertyName: "chooseAppearance",
195
+ publicName: "chooseAppearance",
196
+ isSignal: true,
197
+ isRequired: false,
198
+ transformFunction: null
199
+ },
200
+ chooseIcon: {
201
+ classPropertyName: "chooseIcon",
202
+ publicName: "chooseIcon",
203
+ isSignal: true,
204
+ isRequired: false,
205
+ transformFunction: null
206
+ },
207
+ autoApply: {
208
+ classPropertyName: "autoApply",
209
+ publicName: "autoApply",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ },
214
+ loading: {
215
+ classPropertyName: "loading",
216
+ publicName: "loading",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ disabled: {
222
+ classPropertyName: "disabled",
223
+ publicName: "disabled",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ },
228
+ ratio: {
229
+ classPropertyName: "ratio",
230
+ publicName: "ratio",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ round: {
236
+ classPropertyName: "round",
237
+ publicName: "round",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ format: {
243
+ classPropertyName: "format",
244
+ publicName: "format",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ quality: {
250
+ classPropertyName: "quality",
251
+ publicName: "quality",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ }
256
+ },
257
+ outputs: {
258
+ imageChanged: "imageChanged",
259
+ downloaded: "downloaded"
260
+ },
261
+ host: {
262
+ properties: { "class.rt-image-upload--disabled": "disabled()" },
263
+ classAttribute: "rt-image-upload"
264
+ },
265
+ viewQueries: [{
266
+ propertyName: "picker",
267
+ first: true,
268
+ predicate: ["picker"],
269
+ descendants: true,
270
+ isSignal: true
271
+ }],
272
+ ngImport: i0,
273
+ template: "<ng-container rtBlock=\"rt-image-upload\">\n <input\n #picker\n hidden\n type=\"file\"\n accept=\"image/*\"\n qa-dataid=\"image-upload-native\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\" />\n\n @switch (state()) {\n @case ('loading') {\n <div rtElem=\"loading\" qa-dataid=\"image-upload-loading\">\n <rt-spinner />\n </div>\n }\n @case ('cropping') {\n <rt-image-cropper\n qa-dataid=\"image-upload-cropper\"\n [file]=\"source()\"\n [ratio]=\"ratio()\"\n [round]=\"round()\"\n [format]=\"format()\"\n [quality]=\"quality()\"\n (cropped)=\"onCropped($event)\"\n (loadFailed)=\"cancel()\" />\n\n @if (!autoApply()) {\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"image-upload-cancel\"\n [label]=\"t().uiImageUploadCancel\"\n [attr.aria-label]=\"t().uiImageUploadCancel\"\n (click)=\"cancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-apply\"\n [label]=\"t().uiImageUploadApply\"\n [attr.aria-label]=\"t().uiImageUploadApply\"\n [disabled]=\"!result()\"\n (click)=\"apply()\"></button>\n </div>\n }\n }\n @case ('image') {\n <rt-file-drop accept=\"image/*\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <div rtElem=\"preview\">\n <img\n rtElem=\"image\"\n role=\"button\"\n qa-dataid=\"image-upload-image\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.alt]=\"t().uiImageUploadImage\"\n [rtTooltip]=\"disabled() ? '' : hint()\"\n [rtMod]=\"{ active: !disabled() }\"\n [src]=\"image()\"\n (click)=\"pick()\"\n (keydown.enter)=\"pick()\"\n (keydown.space)=\"onSpace($event)\" />\n\n @if (downloadable()) {\n <rt-icon-button\n rtElem=\"download\"\n icon=\"ico-download\"\n qa-dataid=\"image-upload-download\"\n [radius]=\"downloadRadius()\"\n [iconSize]=\"downloadIconSize()\"\n [rtMod]=\"{ round: downloadRound() }\"\n [ariaLabel]=\"t().uiDownload\"\n [tooltip]=\"t().uiDownload\"\n (click)=\"download()\" />\n }\n </div>\n </rt-file-drop>\n }\n @default {\n <rt-file-drop accept=\"image/*\" qa-dataid=\"image-upload-drop\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <rt-empty-state framed icon=\"cloud-upload\" [title]=\"t().uiImageUploadDrop\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-choose\"\n [appearance]=\"chooseAppearance()\"\n [icon]=\"chooseIcon()\"\n [label]=\"t().uiImageUploadChoose\"\n [attr.aria-label]=\"t().uiImageUploadChoose\"\n [disabled]=\"disabled()\"\n (click)=\"pick()\"></button>\n </rt-empty-state>\n </rt-file-drop>\n }\n }\n</ng-container>\n",
274
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-upload{--rt-image-upload-image-max-height: var(--rt-size-100);--rt-image-upload-image-radius: var(--rt-radius-md);--rt-image-upload-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-upload-hover-opacity: .85;--rt-image-upload-download-overhang: var(--rt-space-sm);--rt-image-upload-download-bg: color-mix(in srgb, var(--rt-color-bg-surface) 75%, transparent);--rt-image-upload-download-radius: var(--rt-radius-md);--rt-image-upload-download-blur: 8px;--rt-image-upload-download-size: var(--rt-control-height-md);display:block;width:100%}.rt-image-upload__loading{display:flex;align-items:center;justify-content:center;padding:var(--rt-space-xl)}.rt-image-upload__actions{display:flex;justify-content:flex-end;margin-top:var(--rt-space-sm);gap:var(--rt-space-sm)}.rt-image-upload__preview{position:relative;display:inline-block;max-width:100%;box-sizing:border-box;padding:var(--rt-image-upload-download-overhang);vertical-align:top}.rt-image-upload__download{position:absolute;top:0;right:0;border-radius:var(--rt-image-upload-download-radius);-webkit-backdrop-filter:blur(var(--rt-image-upload-download-blur));backdrop-filter:blur(var(--rt-image-upload-download-blur));background:var(--rt-image-upload-download-bg)}.rt-image-upload__download--round{--rt-image-upload-download-radius: var(--rt-radius-full)}.rt-image-upload__download .rt-icon-button{--rt-icon-button-size-step: var(--rt-image-upload-download-size)}.rt-image-upload__image{display:block;max-width:100%;max-height:var(--rt-image-upload-image-max-height);border-radius:var(--rt-image-upload-image-radius);object-fit:contain}.rt-image-upload__image--active{cursor:pointer}.rt-image-upload__image--active:hover{opacity:var(--rt-image-upload-hover-opacity)}.rt-image-upload__image--active:focus-visible{box-shadow:var(--rt-image-upload-focus-shadow);outline:none}}\n"],
275
+ dependencies: [
276
+ {
277
+ kind: "directive",
278
+ type: BlockDirective,
279
+ selector: "[rtBlock]",
280
+ inputs: ["rtMod"]
281
+ },
282
+ {
283
+ kind: "directive",
284
+ type: ElemDirective,
285
+ selector: "[rtElem]",
286
+ inputs: ["rtMod"]
287
+ },
288
+ {
289
+ kind: "directive",
290
+ type: ModDirective,
291
+ selector: "[rtMod]"
292
+ },
293
+ {
294
+ kind: "directive",
295
+ type: RtButtonDirective,
296
+ selector: "button[rtButton], a[rtButton]",
297
+ inputs: [
298
+ "label",
299
+ "icon",
300
+ "iconPos",
301
+ "theme",
302
+ "appearance",
303
+ "size",
304
+ "loading",
305
+ "loadingIcon",
306
+ "loadingLabel",
307
+ "pressed"
308
+ ]
309
+ },
310
+ {
311
+ kind: "directive",
312
+ type: RtTooltipDirective,
313
+ selector: "[rtTooltip]",
314
+ inputs: [
315
+ "rtTooltip",
316
+ "rtTooltipPlacement",
317
+ "rtTooltipWhenTruncated",
318
+ "rtTooltipHideOnClick"
319
+ ],
320
+ exportAs: ["rtTooltip"]
321
+ },
322
+ {
323
+ kind: "component",
324
+ type: RtEmptyStateComponent,
325
+ selector: "rt-empty-state",
326
+ inputs: [
327
+ "icon",
328
+ "glyph",
329
+ "title",
330
+ "description",
331
+ "framed"
332
+ ]
333
+ },
334
+ {
335
+ kind: "component",
336
+ type: RtFileDropComponent,
337
+ selector: "rt-file-drop",
338
+ inputs: [
339
+ "disabled",
340
+ "overlayLabel",
341
+ "zones",
342
+ "accept"
343
+ ],
344
+ outputs: [
345
+ "filesDropped",
346
+ "zoneFilesDropped",
347
+ "draggingChange"
348
+ ]
349
+ },
350
+ {
351
+ kind: "component",
352
+ type: RtIconButtonComponent,
353
+ selector: "rt-icon-button",
354
+ inputs: [
355
+ "icon",
356
+ "glyph",
357
+ "ariaLabel",
358
+ "variant",
359
+ "iconColor",
360
+ "iconFill",
361
+ "size",
362
+ "iconSize",
363
+ "type",
364
+ "tooltip",
365
+ "tooltipHideOnClick",
366
+ "tabIndex",
367
+ "loading",
368
+ "disabled",
369
+ "active",
370
+ "expanded",
371
+ "indicator"
372
+ ],
373
+ outputs: ["clicked"]
374
+ },
375
+ {
376
+ kind: "component",
377
+ type: RtImageCropperComponent,
378
+ selector: "rt-image-cropper",
379
+ inputs: [
380
+ "placeholder",
381
+ "file",
382
+ "ratio",
383
+ "round",
384
+ "minSize",
385
+ "format",
386
+ "quality",
387
+ "disabled"
388
+ ],
389
+ outputs: ["cropped", "loadFailed"]
390
+ },
391
+ {
392
+ kind: "component",
393
+ type: RtSpinnerComponent,
394
+ selector: "rt-spinner",
395
+ inputs: [
396
+ "diameter",
397
+ "color",
398
+ "appearance",
399
+ "overlay",
400
+ "backdrop",
401
+ "plate"
402
+ ]
403
+ }
404
+ ],
405
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
406
+ encapsulation: i0.ViewEncapsulation.None
407
+ });
408
+ }
409
+ };
410
+ i0.ɵɵngDeclareClassMetadata({
411
+ minVersion: "12.0.0",
412
+ version: "22.2.2",
413
+ ngImport: i0,
414
+ type: RtImageUploadComponent,
415
+ decorators: [{
416
+ type: Component,
417
+ args: [{
418
+ selector: "rt-image-upload",
419
+ changeDetection: ChangeDetectionStrategy.OnPush,
420
+ encapsulation: ViewEncapsulation.None,
421
+ imports: [
422
+ BlockDirective,
423
+ ElemDirective,
424
+ ModDirective,
425
+ RtButtonDirective,
426
+ RtTooltipDirective,
427
+ RtEmptyStateComponent,
428
+ RtFileDropComponent,
429
+ RtIconButtonComponent,
430
+ RtImageCropperComponent,
431
+ RtSpinnerComponent
432
+ ],
433
+ host: {
434
+ class: BEM_BLOCK,
435
+ "[class.rt-image-upload--disabled]": "disabled()"
436
+ },
437
+ template: "<ng-container rtBlock=\"rt-image-upload\">\n <input\n #picker\n hidden\n type=\"file\"\n accept=\"image/*\"\n qa-dataid=\"image-upload-native\"\n [disabled]=\"disabled()\"\n (change)=\"onPicked($event)\" />\n\n @switch (state()) {\n @case ('loading') {\n <div rtElem=\"loading\" qa-dataid=\"image-upload-loading\">\n <rt-spinner />\n </div>\n }\n @case ('cropping') {\n <rt-image-cropper\n qa-dataid=\"image-upload-cropper\"\n [file]=\"source()\"\n [ratio]=\"ratio()\"\n [round]=\"round()\"\n [format]=\"format()\"\n [quality]=\"quality()\"\n (cropped)=\"onCropped($event)\"\n (loadFailed)=\"cancel()\" />\n\n @if (!autoApply()) {\n <div rtElem=\"actions\">\n <button\n rtButton\n appearance=\"text\"\n type=\"button\"\n qa-dataid=\"image-upload-cancel\"\n [label]=\"t().uiImageUploadCancel\"\n [attr.aria-label]=\"t().uiImageUploadCancel\"\n (click)=\"cancel()\"></button>\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-apply\"\n [label]=\"t().uiImageUploadApply\"\n [attr.aria-label]=\"t().uiImageUploadApply\"\n [disabled]=\"!result()\"\n (click)=\"apply()\"></button>\n </div>\n }\n }\n @case ('image') {\n <rt-file-drop accept=\"image/*\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <div rtElem=\"preview\">\n <img\n rtElem=\"image\"\n role=\"button\"\n qa-dataid=\"image-upload-image\"\n [attr.tabindex]=\"disabled() ? -1 : 0\"\n [attr.aria-disabled]=\"disabled()\"\n [attr.alt]=\"t().uiImageUploadImage\"\n [rtTooltip]=\"disabled() ? '' : hint()\"\n [rtMod]=\"{ active: !disabled() }\"\n [src]=\"image()\"\n (click)=\"pick()\"\n (keydown.enter)=\"pick()\"\n (keydown.space)=\"onSpace($event)\" />\n\n @if (downloadable()) {\n <rt-icon-button\n rtElem=\"download\"\n icon=\"ico-download\"\n qa-dataid=\"image-upload-download\"\n [radius]=\"downloadRadius()\"\n [iconSize]=\"downloadIconSize()\"\n [rtMod]=\"{ round: downloadRound() }\"\n [ariaLabel]=\"t().uiDownload\"\n [tooltip]=\"t().uiDownload\"\n (click)=\"download()\" />\n }\n </div>\n </rt-file-drop>\n }\n @default {\n <rt-file-drop accept=\"image/*\" qa-dataid=\"image-upload-drop\" [disabled]=\"disabled()\" (filesDropped)=\"choose($event[0])\">\n <rt-empty-state framed icon=\"cloud-upload\" [title]=\"t().uiImageUploadDrop\">\n <button\n rtButton\n type=\"button\"\n qa-dataid=\"image-upload-choose\"\n [appearance]=\"chooseAppearance()\"\n [icon]=\"chooseIcon()\"\n [label]=\"t().uiImageUploadChoose\"\n [attr.aria-label]=\"t().uiImageUploadChoose\"\n [disabled]=\"disabled()\"\n (click)=\"pick()\"></button>\n </rt-empty-state>\n </rt-file-drop>\n }\n }\n</ng-container>\n",
438
+ styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-image-upload{--rt-image-upload-image-max-height: var(--rt-size-100);--rt-image-upload-image-radius: var(--rt-radius-md);--rt-image-upload-focus-shadow: var(--rt-shadow-focus-ring);--rt-image-upload-hover-opacity: .85;--rt-image-upload-download-overhang: var(--rt-space-sm);--rt-image-upload-download-bg: color-mix(in srgb, var(--rt-color-bg-surface) 75%, transparent);--rt-image-upload-download-radius: var(--rt-radius-md);--rt-image-upload-download-blur: 8px;--rt-image-upload-download-size: var(--rt-control-height-md);display:block;width:100%}.rt-image-upload__loading{display:flex;align-items:center;justify-content:center;padding:var(--rt-space-xl)}.rt-image-upload__actions{display:flex;justify-content:flex-end;margin-top:var(--rt-space-sm);gap:var(--rt-space-sm)}.rt-image-upload__preview{position:relative;display:inline-block;max-width:100%;box-sizing:border-box;padding:var(--rt-image-upload-download-overhang);vertical-align:top}.rt-image-upload__download{position:absolute;top:0;right:0;border-radius:var(--rt-image-upload-download-radius);-webkit-backdrop-filter:blur(var(--rt-image-upload-download-blur));backdrop-filter:blur(var(--rt-image-upload-download-blur));background:var(--rt-image-upload-download-bg)}.rt-image-upload__download--round{--rt-image-upload-download-radius: var(--rt-radius-full)}.rt-image-upload__download .rt-icon-button{--rt-icon-button-size-step: var(--rt-image-upload-download-size)}.rt-image-upload__image{display:block;max-width:100%;max-height:var(--rt-image-upload-image-max-height);border-radius:var(--rt-image-upload-image-radius);object-fit:contain}.rt-image-upload__image--active{cursor:pointer}.rt-image-upload__image--active:hover{opacity:var(--rt-image-upload-hover-opacity)}.rt-image-upload__image--active:focus-visible{box-shadow:var(--rt-image-upload-focus-shadow);outline:none}}\n"]
439
+ }]
440
+ }],
441
+ ctorParameters: () => [],
442
+ propDecorators: {
443
+ picker: [{
444
+ type: i0.ViewChild,
445
+ args: ["picker", { isSignal: true }]
446
+ }],
447
+ imageUrl: [{
448
+ type: i0.Input,
449
+ args: [{
450
+ isSignal: true,
451
+ alias: "imageUrl",
452
+ required: false
453
+ }]
454
+ }],
455
+ fileName: [{
456
+ type: i0.Input,
457
+ args: [{
458
+ isSignal: true,
459
+ alias: "fileName",
460
+ required: false
461
+ }]
462
+ }],
463
+ tooltip: [{
464
+ type: i0.Input,
465
+ args: [{
466
+ isSignal: true,
467
+ alias: "tooltip",
468
+ required: false
469
+ }]
470
+ }],
471
+ downloadable: [{
472
+ type: i0.Input,
473
+ args: [{
474
+ isSignal: true,
475
+ alias: "downloadable",
476
+ required: false
477
+ }]
478
+ }],
479
+ downloadShape: [{
480
+ type: i0.Input,
481
+ args: [{
482
+ isSignal: true,
483
+ alias: "downloadShape",
484
+ required: false
485
+ }]
486
+ }],
487
+ downloadIconSize: [{
488
+ type: i0.Input,
489
+ args: [{
490
+ isSignal: true,
491
+ alias: "downloadIconSize",
492
+ required: false
493
+ }]
494
+ }],
495
+ chooseAppearance: [{
496
+ type: i0.Input,
497
+ args: [{
498
+ isSignal: true,
499
+ alias: "chooseAppearance",
500
+ required: false
501
+ }]
502
+ }],
503
+ chooseIcon: [{
504
+ type: i0.Input,
505
+ args: [{
506
+ isSignal: true,
507
+ alias: "chooseIcon",
508
+ required: false
509
+ }]
510
+ }],
511
+ autoApply: [{
512
+ type: i0.Input,
513
+ args: [{
514
+ isSignal: true,
515
+ alias: "autoApply",
516
+ required: false
517
+ }]
518
+ }],
519
+ loading: [{
520
+ type: i0.Input,
521
+ args: [{
522
+ isSignal: true,
523
+ alias: "loading",
524
+ required: false
525
+ }]
526
+ }],
527
+ disabled: [{
528
+ type: i0.Input,
529
+ args: [{
530
+ isSignal: true,
531
+ alias: "disabled",
532
+ required: false
533
+ }]
534
+ }],
535
+ ratio: [{
536
+ type: i0.Input,
537
+ args: [{
538
+ isSignal: true,
539
+ alias: "ratio",
540
+ required: false
541
+ }]
542
+ }],
543
+ round: [{
544
+ type: i0.Input,
545
+ args: [{
546
+ isSignal: true,
547
+ alias: "round",
548
+ required: false
549
+ }]
550
+ }],
551
+ format: [{
552
+ type: i0.Input,
553
+ args: [{
554
+ isSignal: true,
555
+ alias: "format",
556
+ required: false
557
+ }]
558
+ }],
559
+ quality: [{
560
+ type: i0.Input,
561
+ args: [{
562
+ isSignal: true,
563
+ alias: "quality",
564
+ required: false
565
+ }]
566
+ }],
567
+ imageChanged: [{
568
+ type: i0.Output,
569
+ args: ["imageChanged"]
570
+ }],
571
+ downloaded: [{
572
+ type: i0.Output,
573
+ args: ["downloaded"]
574
+ }]
575
+ }
576
+ });
226
577
  export { RtImageUploadComponent, isImageFile, uploadState };
227
- //# sourceMappingURL=rt-tools-ui-kit-v2-image-upload.mjs.map
578
+
579
+ //# sourceMappingURL=rt-tools-ui-kit-v2-image-upload.mjs.map