@rt-tools/ui-kit-v2 0.16.0 → 0.18.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 (321) hide show
  1. package/README.md +25 -0
  2. package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs +79 -0
  3. package/fesm2022/rt-tools-ui-kit-v2-accordion.mjs.map +1 -0
  4. package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs +227 -0
  5. package/fesm2022/rt-tools-ui-kit-v2-action-bar.mjs.map +1 -0
  6. package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs +47 -0
  7. package/fesm2022/rt-tools-ui-kit-v2-aside-section.mjs.map +1 -0
  8. package/fesm2022/rt-tools-ui-kit-v2-aside.mjs +702 -0
  9. package/fesm2022/rt-tools-ui-kit-v2-aside.mjs.map +1 -0
  10. package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs +214 -0
  11. package/fesm2022/rt-tools-ui-kit-v2-autocomplete.mjs.map +1 -0
  12. package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs +53 -0
  13. package/fesm2022/rt-tools-ui-kit-v2-bar-list.mjs.map +1 -0
  14. package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs +88 -0
  15. package/fesm2022/rt-tools-ui-kit-v2-bottom-sheet.mjs.map +1 -0
  16. package/fesm2022/rt-tools-ui-kit-v2-button.mjs +365 -0
  17. package/fesm2022/rt-tools-ui-kit-v2-button.mjs.map +1 -0
  18. package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs +152 -0
  19. package/fesm2022/rt-tools-ui-kit-v2-calendar.mjs.map +1 -0
  20. package/fesm2022/rt-tools-ui-kit-v2-card.mjs +72 -0
  21. package/fesm2022/rt-tools-ui-kit-v2-card.mjs.map +1 -0
  22. package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs +111 -0
  23. package/fesm2022/rt-tools-ui-kit-v2-checkbox.mjs.map +1 -0
  24. package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs +76 -0
  25. package/fesm2022/rt-tools-ui-kit-v2-collapsible-text.mjs.map +1 -0
  26. package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs +255 -0
  27. package/fesm2022/rt-tools-ui-kit-v2-confirm-popover.mjs.map +1 -0
  28. package/fesm2022/rt-tools-ui-kit-v2-container.mjs +1326 -0
  29. package/fesm2022/rt-tools-ui-kit-v2-container.mjs.map +1 -0
  30. package/fesm2022/rt-tools-ui-kit-v2-core.mjs +2590 -0
  31. package/fesm2022/rt-tools-ui-kit-v2-core.mjs.map +1 -0
  32. package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs +45 -0
  33. package/fesm2022/rt-tools-ui-kit-v2-counter-row.mjs.map +1 -0
  34. package/fesm2022/rt-tools-ui-kit-v2-counter.mjs +158 -0
  35. package/fesm2022/rt-tools-ui-kit-v2-counter.mjs.map +1 -0
  36. package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs +894 -0
  37. package/fesm2022/rt-tools-ui-kit-v2-data-list.mjs.map +1 -0
  38. package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs +1217 -0
  39. package/fesm2022/rt-tools-ui-kit-v2-data-table.mjs.map +1 -0
  40. package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs +779 -0
  41. package/fesm2022/rt-tools-ui-kit-v2-date-picker.mjs.map +1 -0
  42. package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs +573 -0
  43. package/fesm2022/rt-tools-ui-kit-v2-date-range.mjs.map +1 -0
  44. package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs +141 -0
  45. package/fesm2022/rt-tools-ui-kit-v2-delta-view.mjs.map +1 -0
  46. package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs +68 -0
  47. package/fesm2022/rt-tools-ui-kit-v2-detail-list.mjs.map +1 -0
  48. package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs +478 -0
  49. package/fesm2022/rt-tools-ui-kit-v2-dialog.mjs.map +1 -0
  50. package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs +183 -0
  51. package/fesm2022/rt-tools-ui-kit-v2-dot-field.mjs.map +1 -0
  52. package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs +44 -0
  53. package/fesm2022/rt-tools-ui-kit-v2-download-link.mjs.map +1 -0
  54. package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs +260 -0
  55. package/fesm2022/rt-tools-ui-kit-v2-dynamic-list.mjs.map +1 -0
  56. package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs +937 -0
  57. package/fesm2022/rt-tools-ui-kit-v2-dynamic-selector.mjs.map +1 -0
  58. package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs +56 -0
  59. package/fesm2022/rt-tools-ui-kit-v2-empty-state.mjs.map +1 -0
  60. package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs +107 -0
  61. package/fesm2022/rt-tools-ui-kit-v2-expansion-panel.mjs.map +1 -0
  62. package/fesm2022/rt-tools-ui-kit-v2-field.mjs +183 -0
  63. package/fesm2022/rt-tools-ui-kit-v2-field.mjs.map +1 -0
  64. package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs +219 -0
  65. package/fesm2022/rt-tools-ui-kit-v2-file-card.mjs.map +1 -0
  66. package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs +214 -0
  67. package/fesm2022/rt-tools-ui-kit-v2-file-drop.mjs.map +1 -0
  68. package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs +117 -0
  69. package/fesm2022/rt-tools-ui-kit-v2-file-input.mjs.map +1 -0
  70. package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs +32 -0
  71. package/fesm2022/rt-tools-ui-kit-v2-file-list.mjs.map +1 -0
  72. package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs +91 -0
  73. package/fesm2022/rt-tools-ui-kit-v2-filter-control.mjs.map +1 -0
  74. package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs +220 -0
  75. package/fesm2022/rt-tools-ui-kit-v2-form-control.mjs.map +1 -0
  76. package/fesm2022/rt-tools-ui-kit-v2-header.mjs +72 -0
  77. package/fesm2022/rt-tools-ui-kit-v2-header.mjs.map +1 -0
  78. package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs +163 -0
  79. package/fesm2022/rt-tools-ui-kit-v2-icon-button.mjs.map +1 -0
  80. package/fesm2022/rt-tools-ui-kit-v2-icon.mjs +674 -0
  81. package/fesm2022/rt-tools-ui-kit-v2-icon.mjs.map +1 -0
  82. package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs +540 -0
  83. package/fesm2022/rt-tools-ui-kit-v2-image-cropper.mjs.map +1 -0
  84. package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs +227 -0
  85. package/fesm2022/rt-tools-ui-kit-v2-image-upload.mjs.map +1 -0
  86. package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs +37 -0
  87. package/fesm2022/rt-tools-ui-kit-v2-info-item.mjs.map +1 -0
  88. package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs +361 -0
  89. package/fesm2022/rt-tools-ui-kit-v2-input-number.mjs.map +1 -0
  90. package/fesm2022/rt-tools-ui-kit-v2-input.mjs +143 -0
  91. package/fesm2022/rt-tools-ui-kit-v2-input.mjs.map +1 -0
  92. package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs +49 -0
  93. package/fesm2022/rt-tools-ui-kit-v2-live-badge.mjs.map +1 -0
  94. package/fesm2022/rt-tools-ui-kit-v2-logo.mjs +97 -0
  95. package/fesm2022/rt-tools-ui-kit-v2-logo.mjs.map +1 -0
  96. package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs +57 -0
  97. package/fesm2022/rt-tools-ui-kit-v2-markdown-text.mjs.map +1 -0
  98. package/fesm2022/rt-tools-ui-kit-v2-menu.mjs +537 -0
  99. package/fesm2022/rt-tools-ui-kit-v2-menu.mjs.map +1 -0
  100. package/fesm2022/rt-tools-ui-kit-v2-message.mjs +105 -0
  101. package/fesm2022/rt-tools-ui-kit-v2-message.mjs.map +1 -0
  102. package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs +71 -0
  103. package/fesm2022/rt-tools-ui-kit-v2-money-list.mjs.map +1 -0
  104. package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs +315 -0
  105. package/fesm2022/rt-tools-ui-kit-v2-multiselect.mjs.map +1 -0
  106. package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs +51 -0
  107. package/fesm2022/rt-tools-ui-kit-v2-night-grid.mjs.map +1 -0
  108. package/fesm2022/rt-tools-ui-kit-v2-note.mjs +44 -0
  109. package/fesm2022/rt-tools-ui-kit-v2-note.mjs.map +1 -0
  110. package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs +54 -0
  111. package/fesm2022/rt-tools-ui-kit-v2-notifications-bell.mjs.map +1 -0
  112. package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs +339 -0
  113. package/fesm2022/rt-tools-ui-kit-v2-page-header.mjs.map +1 -0
  114. package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs +187 -0
  115. package/fesm2022/rt-tools-ui-kit-v2-pagination.mjs.map +1 -0
  116. package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs +170 -0
  117. package/fesm2022/rt-tools-ui-kit-v2-photo-viewer.mjs.map +1 -0
  118. package/fesm2022/rt-tools-ui-kit-v2-popover.mjs +312 -0
  119. package/fesm2022/rt-tools-ui-kit-v2-popover.mjs.map +1 -0
  120. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs +174 -0
  121. package/fesm2022/rt-tools-ui-kit-v2-radio-button.mjs.map +1 -0
  122. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs +56 -0
  123. package/fesm2022/rt-tools-ui-kit-v2-radius.mjs.map +1 -0
  124. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs +96 -41
  125. package/fesm2022/rt-tools-ui-kit-v2-rich-editor.mjs.map +1 -1
  126. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs +118 -0
  127. package/fesm2022/rt-tools-ui-kit-v2-ripple.mjs.map +1 -0
  128. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs +290 -0
  129. package/fesm2022/rt-tools-ui-kit-v2-scroll-area.mjs.map +1 -0
  130. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs +37 -0
  131. package/fesm2022/rt-tools-ui-kit-v2-section-nav.mjs.map +1 -0
  132. package/fesm2022/rt-tools-ui-kit-v2-select.mjs +495 -0
  133. package/fesm2022/rt-tools-ui-kit-v2-select.mjs.map +1 -0
  134. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs +1493 -0
  135. package/fesm2022/rt-tools-ui-kit-v2-side-menu.mjs.map +1 -0
  136. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs +49 -0
  137. package/fesm2022/rt-tools-ui-kit-v2-skeleton-wrapper.mjs.map +1 -0
  138. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs +123 -0
  139. package/fesm2022/rt-tools-ui-kit-v2-skeleton.mjs.map +1 -0
  140. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs +70 -0
  141. package/fesm2022/rt-tools-ui-kit-v2-spinner.mjs.map +1 -0
  142. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs +92 -0
  143. package/fesm2022/rt-tools-ui-kit-v2-split-button.mjs.map +1 -0
  144. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs +147 -0
  145. package/fesm2022/rt-tools-ui-kit-v2-stat-tile.mjs.map +1 -0
  146. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs +117 -0
  147. package/fesm2022/rt-tools-ui-kit-v2-stepper.mjs.map +1 -0
  148. package/fesm2022/rt-tools-ui-kit-v2-table.mjs +1636 -0
  149. package/fesm2022/rt-tools-ui-kit-v2-table.mjs.map +1 -0
  150. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs +350 -0
  151. package/fesm2022/rt-tools-ui-kit-v2-tabs.mjs.map +1 -0
  152. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs +122 -0
  153. package/fesm2022/rt-tools-ui-kit-v2-tag.mjs.map +1 -0
  154. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs +85 -0
  155. package/fesm2022/rt-tools-ui-kit-v2-textarea.mjs.map +1 -0
  156. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs +73 -0
  157. package/fesm2022/rt-tools-ui-kit-v2-theme-toggle.mjs.map +1 -0
  158. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs +196 -0
  159. package/fesm2022/rt-tools-ui-kit-v2-thread-list.mjs.map +1 -0
  160. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs +39 -0
  161. package/fesm2022/rt-tools-ui-kit-v2-timeline.mjs.map +1 -0
  162. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs +338 -0
  163. package/fesm2022/rt-tools-ui-kit-v2-toast.mjs.map +1 -0
  164. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs +132 -0
  165. package/fesm2022/rt-tools-ui-kit-v2-toggle-button-group.mjs.map +1 -0
  166. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs +162 -0
  167. package/fesm2022/rt-tools-ui-kit-v2-toggle-switch.mjs.map +1 -0
  168. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs +135 -0
  169. package/fesm2022/rt-tools-ui-kit-v2-toolbar.mjs.map +1 -0
  170. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs +214 -0
  171. package/fesm2022/rt-tools-ui-kit-v2-tooltip.mjs.map +1 -0
  172. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs +64 -0
  173. package/fesm2022/rt-tools-ui-kit-v2-welcome-dialog.mjs.map +1 -0
  174. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs +263 -0
  175. package/fesm2022/rt-tools-ui-kit-v2-workspace-details.mjs.map +1 -0
  176. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs +296 -0
  177. package/fesm2022/rt-tools-ui-kit-v2-workspace.mjs.map +1 -0
  178. package/fesm2022/rt-tools-ui-kit-v2.mjs +91 -23164
  179. package/fesm2022/rt-tools-ui-kit-v2.mjs.map +1 -1
  180. package/package.json +349 -1
  181. package/rt-tools-ui-kit-v2-0.18.0.tgz +0 -0
  182. package/src/lib/components/action-bar/CONTEXT.md +5 -0
  183. package/src/lib/components/action-bar/rt-action-bar.component.scss +30 -16
  184. package/src/lib/components/aside/CONTEXT.md +9 -1
  185. package/src/lib/components/aside/footer/rt-aside-footer.component.scss +7 -8
  186. package/src/lib/components/aside/header/rt-aside-header.component.scss +16 -1
  187. package/src/lib/components/aside/rt-aside.component.scss +17 -1
  188. package/src/lib/components/button/CONTEXT.md +12 -11
  189. package/src/lib/components/button/rt-button.directive.scss +36 -0
  190. package/src/lib/components/data-list/settings/rt-data-list-settings-aside.component.scss +2 -2
  191. package/src/lib/components/data-table/cell/rt-data-table-cell.component.scss +1 -1
  192. package/src/lib/components/data-table/filter-cell/rt-data-table-filter-cell.component.scss +1 -1
  193. package/src/lib/components/data-table/rt-data-table.component.scss +1 -1
  194. package/src/lib/components/dialog/CONTEXT.md +9 -0
  195. package/src/lib/components/dialog/content/rt-dialog-content.component.scss +20 -0
  196. package/src/lib/components/dialog/footer/rt-dialog-footer.component.scss +18 -2
  197. package/src/lib/components/dialog/header/rt-dialog-header.component.scss +21 -3
  198. package/src/lib/components/dialog/rt-dialog.component.scss +9 -3
  199. package/src/lib/components/dot-field/CONTEXT.md +31 -0
  200. package/src/lib/components/dot-field/rt-dot-field.component.scss +20 -0
  201. package/src/lib/components/dot-field/stories/component/CONTEXT.md +14 -0
  202. package/src/lib/components/dot-field/stories/component/test-dot-field.component.scss +31 -0
  203. package/src/lib/components/dynamic-selector/CONTEXT.md +6 -0
  204. package/src/lib/components/field/CONTEXT.md +18 -2
  205. package/src/lib/components/header/CONTEXT.md +2 -2
  206. package/src/lib/components/icon/CONTEXT.md +11 -7
  207. package/src/lib/components/icon/rt-icon.component.scss +47 -0
  208. package/src/lib/components/icon-button/CONTEXT.md +27 -20
  209. package/src/lib/components/icon-button/rt-icon-button.component.scss +51 -25
  210. package/src/lib/components/image-upload/CONTEXT.md +20 -15
  211. package/src/lib/components/image-upload/rt-image-upload.component.scss +14 -2
  212. package/src/lib/components/pagination/rt-pagination.component.scss +1 -1
  213. package/src/lib/components/scroll-area/CONTEXT.md +2 -0
  214. package/src/lib/components/scroll-area/rt-scroll-area.component.scss +20 -3
  215. package/src/lib/components/select/rt-select.component.scss +4 -0
  216. package/src/lib/components/side-menu/CONTEXT.md +7 -2
  217. package/src/lib/components/spinner/CONTEXT.md +15 -8
  218. package/src/lib/components/spinner/rt-spinner.component.scss +108 -9
  219. package/src/lib/components/tag/rt-tag.component.scss +43 -23
  220. package/src/lib/components/toast/CONTEXT.md +8 -0
  221. package/src/lib/components/toast/rt-toast.component.scss +74 -15
  222. package/src/lib/components/toast/rt-toaster.component.scss +5 -1
  223. package/src/lib/components/toggle-button-group/rt-toggle-button-group.component.scss +35 -37
  224. package/src/lib/components/toggle-switch/CONTEXT.md +11 -3
  225. package/src/lib/components/toggle-switch/rt-toggle-switch.component.scss +53 -14
  226. package/src/lib/components/toolbar/rt-toolbar.component.scss +15 -4
  227. package/src/lib/components/tooltip/CONTEXT.md +5 -5
  228. package/src/rich-editor/lib/components/chat/CONTEXT.md +7 -2
  229. package/src/rich-editor/lib/components/chat/rt-chat.component.scss +25 -0
  230. package/src/styles/_semantic.scss +1 -1
  231. package/styles/tokens.css +43 -8
  232. package/types/rt-tools-ui-kit-v2-accordion.d.ts +30 -0
  233. package/types/rt-tools-ui-kit-v2-action-bar.d.ts +140 -0
  234. package/types/rt-tools-ui-kit-v2-aside-section.d.ts +25 -0
  235. package/types/rt-tools-ui-kit-v2-aside.d.ts +436 -0
  236. package/types/rt-tools-ui-kit-v2-autocomplete.d.ts +78 -0
  237. package/types/rt-tools-ui-kit-v2-bar-list.d.ts +41 -0
  238. package/types/rt-tools-ui-kit-v2-bottom-sheet.d.ts +20 -0
  239. package/types/rt-tools-ui-kit-v2-button.d.ts +76 -0
  240. package/types/rt-tools-ui-kit-v2-calendar.d.ts +96 -0
  241. package/types/rt-tools-ui-kit-v2-card.d.ts +38 -0
  242. package/types/rt-tools-ui-kit-v2-checkbox.d.ts +46 -0
  243. package/types/rt-tools-ui-kit-v2-collapsible-text.d.ts +20 -0
  244. package/types/rt-tools-ui-kit-v2-confirm-popover.d.ts +85 -0
  245. package/types/rt-tools-ui-kit-v2-container.d.ts +425 -0
  246. package/types/rt-tools-ui-kit-v2-core.d.ts +1222 -0
  247. package/types/rt-tools-ui-kit-v2-counter-row.d.ts +22 -0
  248. package/types/rt-tools-ui-kit-v2-counter.d.ts +70 -0
  249. package/types/rt-tools-ui-kit-v2-data-list.d.ts +334 -0
  250. package/types/rt-tools-ui-kit-v2-data-table.d.ts +494 -0
  251. package/types/rt-tools-ui-kit-v2-date-picker.d.ts +181 -0
  252. package/types/rt-tools-ui-kit-v2-date-range.d.ts +98 -0
  253. package/types/rt-tools-ui-kit-v2-delta-view.d.ts +20 -0
  254. package/types/rt-tools-ui-kit-v2-detail-list.d.ts +33 -0
  255. package/types/rt-tools-ui-kit-v2-dialog.d.ts +287 -0
  256. package/types/rt-tools-ui-kit-v2-dot-field.d.ts +17 -0
  257. package/types/rt-tools-ui-kit-v2-download-link.d.ts +17 -0
  258. package/types/rt-tools-ui-kit-v2-dynamic-list.d.ts +139 -0
  259. package/types/rt-tools-ui-kit-v2-dynamic-selector.d.ts +384 -0
  260. package/types/rt-tools-ui-kit-v2-empty-state.d.ts +29 -0
  261. package/types/rt-tools-ui-kit-v2-expansion-panel.d.ts +57 -0
  262. package/types/rt-tools-ui-kit-v2-field.d.ts +82 -0
  263. package/types/rt-tools-ui-kit-v2-file-card.d.ts +114 -0
  264. package/types/rt-tools-ui-kit-v2-file-drop.d.ts +75 -0
  265. package/types/rt-tools-ui-kit-v2-file-input.d.ts +48 -0
  266. package/types/rt-tools-ui-kit-v2-file-list.d.ts +13 -0
  267. package/types/rt-tools-ui-kit-v2-filter-control.d.ts +72 -0
  268. package/types/rt-tools-ui-kit-v2-form-control.d.ts +74 -0
  269. package/types/rt-tools-ui-kit-v2-header.d.ts +40 -0
  270. package/types/rt-tools-ui-kit-v2-icon-button.d.ts +113 -0
  271. package/types/rt-tools-ui-kit-v2-icon.d.ts +238 -0
  272. package/types/rt-tools-ui-kit-v2-image-cropper.d.ts +168 -0
  273. package/types/rt-tools-ui-kit-v2-image-upload.d.ts +102 -0
  274. package/types/rt-tools-ui-kit-v2-info-item.d.ts +13 -0
  275. package/types/rt-tools-ui-kit-v2-input-number.d.ts +67 -0
  276. package/types/rt-tools-ui-kit-v2-input.d.ts +54 -0
  277. package/types/rt-tools-ui-kit-v2-live-badge.d.ts +23 -0
  278. package/types/rt-tools-ui-kit-v2-logo.d.ts +58 -0
  279. package/types/rt-tools-ui-kit-v2-markdown-text.d.ts +30 -0
  280. package/types/rt-tools-ui-kit-v2-menu.d.ts +217 -0
  281. package/types/rt-tools-ui-kit-v2-message.d.ts +56 -0
  282. package/types/rt-tools-ui-kit-v2-money-list.d.ts +34 -0
  283. package/types/rt-tools-ui-kit-v2-multiselect.d.ts +93 -0
  284. package/types/rt-tools-ui-kit-v2-night-grid.d.ts +39 -0
  285. package/types/rt-tools-ui-kit-v2-note.d.ts +21 -0
  286. package/types/rt-tools-ui-kit-v2-notifications-bell.d.ts +23 -0
  287. package/types/rt-tools-ui-kit-v2-page-header.d.ts +173 -0
  288. package/types/rt-tools-ui-kit-v2-pagination.d.ts +64 -0
  289. package/types/rt-tools-ui-kit-v2-photo-viewer.d.ts +98 -0
  290. package/types/rt-tools-ui-kit-v2-popover.d.ts +79 -0
  291. package/types/rt-tools-ui-kit-v2-radio-button.d.ts +61 -0
  292. package/types/rt-tools-ui-kit-v2-radius.d.ts +37 -0
  293. package/types/rt-tools-ui-kit-v2-rich-editor.d.ts +16 -20
  294. package/types/rt-tools-ui-kit-v2-ripple.d.ts +39 -0
  295. package/types/rt-tools-ui-kit-v2-scroll-area.d.ts +91 -0
  296. package/types/rt-tools-ui-kit-v2-section-nav.d.ts +23 -0
  297. package/types/rt-tools-ui-kit-v2-select.d.ts +215 -0
  298. package/types/rt-tools-ui-kit-v2-side-menu.d.ts +483 -0
  299. package/types/rt-tools-ui-kit-v2-skeleton-wrapper.d.ts +32 -0
  300. package/types/rt-tools-ui-kit-v2-skeleton.d.ts +41 -0
  301. package/types/rt-tools-ui-kit-v2-spinner.d.ts +56 -0
  302. package/types/rt-tools-ui-kit-v2-split-button.d.ts +72 -0
  303. package/types/rt-tools-ui-kit-v2-stat-tile.d.ts +81 -0
  304. package/types/rt-tools-ui-kit-v2-stepper.d.ts +51 -0
  305. package/types/rt-tools-ui-kit-v2-table.d.ts +739 -0
  306. package/types/rt-tools-ui-kit-v2-tabs.d.ts +153 -0
  307. package/types/rt-tools-ui-kit-v2-tag.d.ts +70 -0
  308. package/types/rt-tools-ui-kit-v2-textarea.d.ts +36 -0
  309. package/types/rt-tools-ui-kit-v2-theme-toggle.d.ts +43 -0
  310. package/types/rt-tools-ui-kit-v2-thread-list.d.ts +111 -0
  311. package/types/rt-tools-ui-kit-v2-timeline.d.ts +35 -0
  312. package/types/rt-tools-ui-kit-v2-toast.d.ts +103 -0
  313. package/types/rt-tools-ui-kit-v2-toggle-button-group.d.ts +109 -0
  314. package/types/rt-tools-ui-kit-v2-toggle-switch.d.ts +85 -0
  315. package/types/rt-tools-ui-kit-v2-toolbar.d.ts +66 -0
  316. package/types/rt-tools-ui-kit-v2-tooltip.d.ts +74 -0
  317. package/types/rt-tools-ui-kit-v2-welcome-dialog.d.ts +33 -0
  318. package/types/rt-tools-ui-kit-v2-workspace-details.d.ts +128 -0
  319. package/types/rt-tools-ui-kit-v2-workspace.d.ts +84 -0
  320. package/types/rt-tools-ui-kit-v2.d.ts +87 -9290
  321. package/rt-tools-ui-kit-v2-0.16.0.tgz +0 -0
@@ -0,0 +1,779 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, computed, viewChildren, signal, linkedSignal, input, numberAttribute, booleanAttribute, output, afterRenderEffect, ViewEncapsulation, ChangeDetectionStrategy, Component, viewChild, forwardRef } from '@angular/core';
3
+ import { BlockDirective, ElemDirective, ModDirective } from '@rt-tools/core';
4
+ import { RT_KIT_LOCALE, RT_KIT_LABELS, BreakpointsService } from '@rt-tools/ui-kit-v2/core';
5
+ import { RtBottomSheetComponent } from '@rt-tools/ui-kit-v2/bottom-sheet';
6
+ import { RtFormControlBase } from '@rt-tools/ui-kit-v2/form-control';
7
+ import { RtIconButtonComponent } from '@rt-tools/ui-kit-v2/icon-button';
8
+ import { RtPopoverDirective } from '@rt-tools/ui-kit-v2/popover';
9
+ import * as i1 from '@rt-tools/ui-kit-v2/radius';
10
+ import { RtRadiusDirective } from '@rt-tools/ui-kit-v2/radius';
11
+ import { RtButtonDirective } from '@rt-tools/ui-kit-v2/button';
12
+ import { ERtCalendarDayState, RtCalendarComponent } from '@rt-tools/ui-kit-v2/calendar';
13
+ import { RtToggleButtonGroupComponent } from '@rt-tools/ui-kit-v2/toggle-button-group';
14
+
15
+ /**
16
+ * Чистая логика панели rt-date-picker: чтение и запись значения, месяц, границы, колонки времени
17
+ * и клавиши сетки. Текущий момент приходит параметром — компонент читает часы на своей границе.
18
+ *
19
+ * Значения — строки формы нативного input'а: `YYYY-MM-DD`, `HH:mm`, `YYYY-MM-DDTHH:mm`. Строки
20
+ * одной формы сравниваются как текст, поэтому границы сравниваются обрезанными до длины значения.
21
+ */
22
+ const DAY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
23
+ const TIME_RE = /^(\d{2}):(\d{2})$/;
24
+ const DAY_LENGTH_MS = 86_400_000;
25
+ const WEEK = 7;
26
+ const DAY_LEN = 10;
27
+ const MONTH_LEN$1 = 7;
28
+ const TIME_LEN = 5;
29
+ /** Числа строки даты или времени: `2026-09-29` → `[2026, 9, 29]`. */
30
+ function nums(text) {
31
+ return text.split(/\D/).map(Number);
32
+ }
33
+ /**
34
+ * Строка формы значения как число: `2026-09-29T10:05` → `202609291005`. Строки одной формы
35
+ * сравниваются по этому числу так же, как по порядку дат.
36
+ */
37
+ function rank(text) {
38
+ return Number(text.replace(/\D/g, ''));
39
+ }
40
+ function pad(value) {
41
+ return String(value).padStart(2, '0');
42
+ }
43
+ function dayToMs(day) {
44
+ const [y, m, d] = nums(day);
45
+ return Date.UTC(y, m - 1, d);
46
+ }
47
+ function msToDay(ms) {
48
+ const date = new Date(ms);
49
+ return `${date.getUTCFullYear()}-${pad(date.getUTCMonth() + 1)}-${pad(date.getUTCDate())}`;
50
+ }
51
+ function daysInMonth(year, month) {
52
+ return new Date(Date.UTC(year, month, 0)).getUTCDate();
53
+ }
54
+ function isDay(text) {
55
+ const match = DAY_RE.exec(text);
56
+ if (match === null) {
57
+ return false;
58
+ }
59
+ const month = Number(match[2]);
60
+ const day = Number(match[3]);
61
+ return month >= 1 && month <= 12 && day >= 1 && day <= daysInMonth(Number(match[1]), month);
62
+ }
63
+ function isTime(text) {
64
+ const match = TIME_RE.exec(text);
65
+ return match !== null && Number(match[1]) < 24 && Number(match[2]) < 60;
66
+ }
67
+ /** Время `HH:mm` из часа и минуты. */
68
+ function rtDateTime(hour, minute) {
69
+ return `${pad(hour)}:${pad(minute)}`;
70
+ }
71
+ /** Первый день недели локали: 1 — понедельник … 7 — воскресенье. */
72
+ function rtDateFirstDay(locale) {
73
+ const info = new Intl.Locale(locale);
74
+ return (info.getWeekInfo?.() ?? info.weekInfo)?.firstDay ?? 1;
75
+ }
76
+ /** Читает текст формы значения; `null` — текст не значение этого типа. */
77
+ function rtDateRead(text, type) {
78
+ const value = text.trim();
79
+ if (type === 'date') {
80
+ return isDay(value) ? value : null;
81
+ }
82
+ if (type === 'time') {
83
+ return isTime(value) ? value : null;
84
+ }
85
+ const parts = value.split('T');
86
+ return parts.length === 2 && isDay(parts[0]) && isTime(parts[1]) ? value : null;
87
+ }
88
+ /** Собирает значение типа из дня и времени; без нужной части — пустая строка. */
89
+ function rtDateWrite(type, day, time) {
90
+ if (type === 'date') {
91
+ return day ?? '';
92
+ }
93
+ if (type === 'time') {
94
+ return time ?? '';
95
+ }
96
+ return day !== null && time !== null ? `${day}T${time}` : '';
97
+ }
98
+ /** Разбирает значение на день и время; недостающая часть — `null`. */
99
+ function rtDateSplit(value, type) {
100
+ if (value === '') {
101
+ return { day: null, time: null };
102
+ }
103
+ if (type === 'time') {
104
+ return { day: null, time: value };
105
+ }
106
+ return { day: value.slice(0, DAY_LEN), time: type === 'date' ? null : value.slice(DAY_LEN + 1) };
107
+ }
108
+ /** Лежит ли значение в границах; граница обрезается до длины значения, `null` — открыта. */
109
+ function rtDateInBounds(value, min, max) {
110
+ const low = min === null ? null : min.slice(0, value.length);
111
+ const high = max === null ? null : max.slice(0, value.length);
112
+ return (low === null || rank(value) >= rank(low)) && (high === null || rank(value) <= rank(high));
113
+ }
114
+ /** Текущий момент: день и время, округлённое вниз до шага минут. */
115
+ function rtDateNow(now, step) {
116
+ const minute = Math.floor(now.getMinutes() / step) * step;
117
+ return {
118
+ day: `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`,
119
+ time: `${pad(now.getHours())}:${pad(minute)}`,
120
+ };
121
+ }
122
+ /** Сдвигает месяц `YYYY-MM` на `delta` месяцев. */
123
+ function rtDateAddMonths(month, delta) {
124
+ const [y, m] = nums(month);
125
+ const date = new Date(Date.UTC(y, m - 1 + delta, 1));
126
+ return `${date.getUTCFullYear()}-${pad(date.getUTCMonth() + 1)}`;
127
+ }
128
+ /** Можно ли листать от месяца на `delta`: соседний месяц не лежит за границей. */
129
+ function rtDateCanPage(month, delta, min, max) {
130
+ return rtDateInBounds(rtDateAddMonths(month, delta), min, max);
131
+ }
132
+ function monthTitle(month, locale) {
133
+ const [y, m] = nums(month);
134
+ const name = new Intl.DateTimeFormat(locale, { month: 'long', timeZone: 'UTC' }).format(Date.UTC(y, m - 1, 1));
135
+ return `${name.charAt(0).toLocaleUpperCase(locale)}${name.slice(1)} ${y}`;
136
+ }
137
+ function dayCell(day, ctx) {
138
+ return {
139
+ key: day,
140
+ dayOfMonth: Number(day.slice(8)),
141
+ sublabel: '',
142
+ state: day === ctx.chosen ? ERtCalendarDayState.Chosen : ERtCalendarDayState.Free,
143
+ disabled: !rtDateInBounds(day, ctx.min, ctx.max),
144
+ today: day === ctx.today,
145
+ };
146
+ }
147
+ /** Месяц `YYYY-MM` для календаря: подпись по локали, пустые ячейки до первого дня, дни. */
148
+ function rtDateMonth(month, ctx) {
149
+ const [y, m] = nums(month);
150
+ const first = Date.UTC(y, m - 1, 1);
151
+ const weekday = new Date(first).getUTCDay() || WEEK;
152
+ const blanks = (weekday - rtDateFirstDay(ctx.locale) + WEEK) % WEEK;
153
+ const days = Array.from({ length: daysInMonth(y, m) }, (_, i) => dayCell(msToDay(first + i * DAY_LENGTH_MS), ctx));
154
+ const leadingBlanks = Array.from({ length: blanks }, (_, i) => i);
155
+ return { key: month, label: monthTitle(month, ctx.locale), leadingBlanks, days };
156
+ }
157
+ /** Короткие имена дней недели по локали, начиная с её первого дня. */
158
+ function rtDateWeekdays(locale) {
159
+ const format = new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' });
160
+ // 2024-01-01 — понедельник.
161
+ const monday = Date.UTC(2024, 0, 1);
162
+ const shift = rtDateFirstDay(locale) - 1;
163
+ return Array.from({ length: WEEK }, (_, i) => format.format(monday + ((i + shift) % WEEK) * DAY_LENGTH_MS));
164
+ }
165
+ /** Двенадцать месяцев года для выбора месяца; месяц за границей выключен. */
166
+ function rtDateMonths(year, locale, min, max) {
167
+ const format = new Intl.DateTimeFormat(locale, { month: 'short', timeZone: 'UTC' });
168
+ return Array.from({ length: 12 }, (_, i) => {
169
+ const key = `${year}-${pad(i + 1)}`;
170
+ return { key, label: format.format(Date.UTC(year, i, 1)), disabled: !rtDateInBounds(key, min, max) };
171
+ });
172
+ }
173
+ /** Граница времени для дня: у даты со временем действует только в день самой границы. */
174
+ function timeBound(bound, day) {
175
+ if (bound === null || bound.length <= TIME_LEN) {
176
+ return bound;
177
+ }
178
+ return day === bound.slice(0, DAY_LEN) ? bound.slice(DAY_LEN + 1) : null;
179
+ }
180
+ /** Колонки часов и минут: минуты идут с шагом, время за границей выключено. */
181
+ function rtDateTimeColumns(ctx) {
182
+ const low = timeBound(ctx.min, ctx.day);
183
+ const high = timeBound(ctx.max, ctx.day);
184
+ const hours = Array.from({ length: 24 }, (_, h) => ({
185
+ value: h,
186
+ label: pad(h),
187
+ disabled: (low !== null && rank(`${pad(h)}:59`) < rank(low)) || (high !== null && rank(`${pad(h)}:00`) > rank(high)),
188
+ }));
189
+ const step = Math.max(1, Math.floor(ctx.step));
190
+ const minutes = Array.from({ length: Math.ceil(60 / step) }, (_, i) => {
191
+ const minute = i * step;
192
+ const time = `${pad(ctx.hour ?? 0)}:${pad(minute)}`;
193
+ return { value: minute, label: pad(minute), disabled: ctx.hour !== null && !rtDateInBounds(time, low, high) };
194
+ });
195
+ return { hours, minutes };
196
+ }
197
+ function shiftMonth(day, delta) {
198
+ const target = rtDateAddMonths(day.slice(0, MONTH_LEN$1), delta);
199
+ const [y, m] = nums(target);
200
+ return `${target}-${pad(Math.min(Number(day.slice(8)), daysInMonth(y, m)))}`;
201
+ }
202
+ /** Клавиши, что двигают фокус на число дней. */
203
+ const DAY_KEYS = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -WEEK, ArrowDown: WEEK };
204
+ /** Клавиши, что двигают фокус на месяц. */
205
+ const MONTH_KEYS = { PageUp: -1, PageDown: 1 };
206
+ function keyTarget(key, day, firstDay) {
207
+ const ms = dayToMs(day);
208
+ if (key in DAY_KEYS) {
209
+ return msToDay(ms + DAY_KEYS[key] * DAY_LENGTH_MS);
210
+ }
211
+ if (key in MONTH_KEYS) {
212
+ return shiftMonth(day, MONTH_KEYS[key]);
213
+ }
214
+ const offset = ((new Date(ms).getUTCDay() || WEEK) - firstDay + WEEK) % WEEK;
215
+ if (key === 'Home') {
216
+ return msToDay(ms - offset * DAY_LENGTH_MS);
217
+ }
218
+ return key === 'End' ? msToDay(ms + (WEEK - 1 - offset) * DAY_LENGTH_MS) : null;
219
+ }
220
+ /**
221
+ * Куда клавиша переводит фокус с дня; `null` — клавиша не сеточная. День за границей не
222
+ * достаётся: фокус встаёт на ближний день в границах.
223
+ */
224
+ function rtDateGridKey(key, day, firstDay, min, max) {
225
+ const target = keyTarget(key, day, firstDay);
226
+ if (target === null) {
227
+ return null;
228
+ }
229
+ const low = min === null ? null : min.slice(0, DAY_LEN);
230
+ const high = max === null ? null : max.slice(0, DAY_LEN);
231
+ if (low !== null && rank(target) < rank(low)) {
232
+ return low;
233
+ }
234
+ return high !== null && rank(target) > rank(high) ? high : target;
235
+ }
236
+
237
+ const BEM_BLOCK$1 = 'rt-date-panel';
238
+ const MONTH_LEN = 7;
239
+ const YEAR_LEN$1 = 4;
240
+ /**
241
+ * Панель rt-date-picker: месяц с листанием и выбором месяца и года, колонки часов и минут,
242
+ * подвал с «Сегодня», «Сейчас», «Готово» или «Применить» — по типу значения.
243
+ *
244
+ * Панель не пишет в форму: готовое значение уходит событием `picked`, просьба закрыться —
245
+ * `closed`. Черновик живёт, пока панель открыта; поле создаёт её заново на каждое открытие.
246
+ * Вся арифметика дат — в `rt-date-panel.logic`.
247
+ */
248
+ class RtDatePanelComponent {
249
+ /** Локаль кита: названия месяцев, дней недели и первый день недели идут по ней. */
250
+ #locale;
251
+ /** Минута открытия панели: от неё считается «сегодня», когда вход `now` не задан. */
252
+ #openedAt;
253
+ #firstDay;
254
+ constructor() {
255
+ /** Локаль кита: названия месяцев, дней недели и первый день недели идут по ней. */
256
+ this.#locale = inject(RT_KIT_LOCALE);
257
+ /** Минута открытия панели: от неё считается «сегодня», когда вход `now` не задан. */
258
+ this.#openedAt = new Date();
259
+ this.#firstDay = computed(() => rtDateFirstDay(this.#locale()), /* @ts-ignore */
260
+ ...(ngDevMode ? [{ debugName: "#firstDay" }] : /* istanbul ignore next */ []));
261
+ this.t = inject(RT_KIT_LABELS);
262
+ this.weekdays = computed(() => rtDateWeekdays(this.#locale()), /* @ts-ignore */
263
+ ...(ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []));
264
+ this.timeCells = viewChildren('timeCell', /* @ts-ignore */
265
+ ...(ngDevMode ? [{ debugName: "timeCells" }] : /* istanbul ignore next */ []));
266
+ this.view = signal('days', /* @ts-ignore */
267
+ ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
268
+ this.tab = signal('date', /* @ts-ignore */
269
+ ...(ngDevMode ? [{ debugName: "tab" }] : /* istanbul ignore next */ []));
270
+ this.activeKey = signal(null, /* @ts-ignore */
271
+ ...(ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []));
272
+ this.today = computed(() => rtDateNow(this.now() ?? this.#openedAt, 1).day, /* @ts-ignore */
273
+ ...(ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []));
274
+ this.draftDay = linkedSignal(() => rtDateSplit(this.value(), this.type()).day, /* @ts-ignore */
275
+ ...(ngDevMode ? [{ debugName: "draftDay" }] : /* istanbul ignore next */ []));
276
+ this.draftTime = linkedSignal(() => rtDateSplit(this.value(), this.type()).time, /* @ts-ignore */
277
+ ...(ngDevMode ? [{ debugName: "draftTime" }] : /* istanbul ignore next */ []));
278
+ this.shownMonth = linkedSignal(() => (this.draftDay() ?? this.today()).slice(0, MONTH_LEN), /* @ts-ignore */
279
+ ...(ngDevMode ? [{ debugName: "shownMonth" }] : /* istanbul ignore next */ []));
280
+ this.year = linkedSignal(() => Number(this.shownMonth().slice(0, YEAR_LEN$1)), /* @ts-ignore */
281
+ ...(ngDevMode ? [{ debugName: "year" }] : /* istanbul ignore next */ []));
282
+ this.split = computed(() => this.sheet() && this.type() === 'datetime-local', /* @ts-ignore */
283
+ ...(ngDevMode ? [{ debugName: "split" }] : /* istanbul ignore next */ []));
284
+ this.showDate = computed(() => this.type() !== 'time' && !(this.split() && this.tab() === 'time'), /* @ts-ignore */
285
+ ...(ngDevMode ? [{ debugName: "showDate" }] : /* istanbul ignore next */ []));
286
+ this.showTime = computed(() => this.type() !== 'date' && !(this.split() && this.tab() === 'date'), /* @ts-ignore */
287
+ ...(ngDevMode ? [{ debugName: "showTime" }] : /* istanbul ignore next */ []));
288
+ this.months = computed(() => [
289
+ rtDateMonth(this.shownMonth(), {
290
+ locale: this.#locale(),
291
+ today: this.today(),
292
+ chosen: this.draftDay(),
293
+ min: this.min(),
294
+ max: this.max(),
295
+ }),
296
+ ], /* @ts-ignore */
297
+ ...(ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []));
298
+ this.canPrev = computed(() => rtDateCanPage(this.shownMonth(), -1, this.min(), this.max()), /* @ts-ignore */
299
+ ...(ngDevMode ? [{ debugName: "canPrev" }] : /* istanbul ignore next */ []));
300
+ this.canNext = computed(() => rtDateCanPage(this.shownMonth(), 1, this.min(), this.max()), /* @ts-ignore */
301
+ ...(ngDevMode ? [{ debugName: "canNext" }] : /* istanbul ignore next */ []));
302
+ this.monthCells = computed(() => rtDateMonths(this.year(), this.#locale(), this.min(), this.max()), /* @ts-ignore */
303
+ ...(ngDevMode ? [{ debugName: "monthCells" }] : /* istanbul ignore next */ []));
304
+ this.canPrevYear = computed(() => rtDateInBounds(String(this.year() - 1), this.min(), this.max()), /* @ts-ignore */
305
+ ...(ngDevMode ? [{ debugName: "canPrevYear" }] : /* istanbul ignore next */ []));
306
+ this.canNextYear = computed(() => rtDateInBounds(String(this.year() + 1), this.min(), this.max()), /* @ts-ignore */
307
+ ...(ngDevMode ? [{ debugName: "canNextYear" }] : /* istanbul ignore next */ []));
308
+ this.draftHour = computed(() => this.#part(0), /* @ts-ignore */
309
+ ...(ngDevMode ? [{ debugName: "draftHour" }] : /* istanbul ignore next */ []));
310
+ this.draftMinute = computed(() => this.#part(1), /* @ts-ignore */
311
+ ...(ngDevMode ? [{ debugName: "draftMinute" }] : /* istanbul ignore next */ []));
312
+ this.columns = computed(() => rtDateTimeColumns({ step: this.minuteStep(), hour: this.draftHour(), day: this.draftDay(), min: this.min(), max: this.max() }), /* @ts-ignore */
313
+ ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
314
+ this.todayOff = computed(() => !rtDateInBounds(this.today(), this.min(), this.max()), /* @ts-ignore */
315
+ ...(ngDevMode ? [{ debugName: "todayOff" }] : /* istanbul ignore next */ []));
316
+ /** Черновик собирается в значение и лежит в границах. */
317
+ this.canApply = computed(() => this.#draftValue() !== '', /* @ts-ignore */
318
+ ...(ngDevMode ? [{ debugName: "canApply" }] : /* istanbul ignore next */ []));
319
+ this.tabs = computed(() => [
320
+ { value: 'date', label: this.t().uiDate },
321
+ { value: 'time', label: this.t().uiTime },
322
+ ], /* @ts-ignore */
323
+ ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
324
+ /** Тип значения: дата, время или дата со временем. */
325
+ this.type = input.required(/* @ts-ignore */
326
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
327
+ /** Значение поля в форме нативного input'а; пустая строка — пусто. */
328
+ this.value = input('', /* @ts-ignore */
329
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
330
+ this.min = input(null, /* @ts-ignore */
331
+ ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
332
+ this.max = input(null, /* @ts-ignore */
333
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
334
+ /** Шаг колонки минут. */
335
+ this.minuteStep = input(5, { ...(ngDevMode ? { debugName: "minuteStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
336
+ /** Раскладка нижней шторки: дни под палец, у даты со временем — переключатель «Дата | Время». */
337
+ this.sheet = input(false, { ...(ngDevMode ? { debugName: "sheet" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
338
+ /**
339
+ * Момент, от которого считаются «сегодня» и «Сейчас». Поле его не задаёт — панель читает часы
340
+ * сама; задаёт витрина, чтобы кадр не менялся день ото дня.
341
+ */
342
+ this.now = input(null, /* @ts-ignore */
343
+ ...(ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []));
344
+ /** Готовое значение: панель просит поле его записать. */
345
+ this.picked = output();
346
+ /** Панель просит закрыть себя. */
347
+ this.closed = output();
348
+ // Колонки времени прокручены так, что выбранный час и минута стоят посередине. Прокрутка
349
+ // задаётся самой колонке: `scrollIntoView` двигал бы и страницу под поповером.
350
+ afterRenderEffect(() => {
351
+ for (const cell of this.timeCells()) {
352
+ const node = cell.nativeElement;
353
+ const column = node.parentElement;
354
+ if (column !== null && node.getAttribute('aria-pressed') === 'true') {
355
+ column.scrollTop = node.offsetTop - (column.clientHeight - node.offsetHeight) / 2;
356
+ }
357
+ }
358
+ });
359
+ }
360
+ pickDay(day) {
361
+ this.activeKey.set(day.key);
362
+ if (this.type() === 'date') {
363
+ this.#emit(day.key);
364
+ return;
365
+ }
366
+ this.draftDay.set(day.key);
367
+ }
368
+ pickToday() {
369
+ if (!this.todayOff()) {
370
+ this.#emit(this.today());
371
+ }
372
+ }
373
+ pickNow() {
374
+ const now = rtDateNow(this.now() ?? new Date(), this.minuteStep());
375
+ this.draftTime.set(now.time);
376
+ if (this.type() === 'datetime-local') {
377
+ this.draftDay.set(now.day);
378
+ }
379
+ }
380
+ pickHour(hour) {
381
+ this.draftTime.set(rtDateTime(hour, this.draftMinute() ?? 0));
382
+ }
383
+ pickMinute(minute) {
384
+ this.draftTime.set(rtDateTime(this.draftHour() ?? 0, minute));
385
+ }
386
+ onGridKey(event) {
387
+ const next = rtDateGridKey(event.key, event.day.key, this.#firstDay(), this.min(), this.max());
388
+ if (next !== null) {
389
+ this.shownMonth.set(next.slice(0, MONTH_LEN));
390
+ this.activeKey.set(next);
391
+ }
392
+ }
393
+ page(delta) {
394
+ this.shownMonth.set(rtDateAddMonths(this.shownMonth(), delta));
395
+ }
396
+ openMonths() {
397
+ this.year.set(Number(this.shownMonth().slice(0, YEAR_LEN$1)));
398
+ this.view.set('months');
399
+ }
400
+ pageYear(delta) {
401
+ this.year.update((year) => year + delta);
402
+ }
403
+ pickMonth(cell) {
404
+ this.shownMonth.set(cell.key);
405
+ this.view.set('days');
406
+ }
407
+ /** «Готово» и «Применить»: черновик уходит значением, панель закрывается. */
408
+ apply() {
409
+ const value = this.#draftValue();
410
+ if (value !== '') {
411
+ this.#emit(value);
412
+ }
413
+ }
414
+ #emit(value) {
415
+ this.picked.emit(value);
416
+ this.closed.emit();
417
+ }
418
+ #draftValue() {
419
+ const value = rtDateWrite(this.type(), this.draftDay(), this.draftTime());
420
+ return value !== '' && rtDateInBounds(value, this.min(), this.max()) ? value : '';
421
+ }
422
+ #part(index) {
423
+ const time = this.draftTime();
424
+ return time === null ? null : Number(time.split(':')[index]);
425
+ }
426
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtDatePanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
427
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtDatePanelComponent, isStandalone: true, selector: "rt-date-panel", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null }, sheet: { classPropertyName: "sheet", publicName: "sheet", isSignal: true, isRequired: false, transformFunction: null }, now: { classPropertyName: "now", publicName: "now", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { picked: "picked", closed: "closed" }, host: { listeners: { "keydown.escape": "closed.emit()" }, properties: { "class.rt-date-panel--sheet": "sheet()", "class.rt-date-panel--with-time": "type() !== 'date'" }, classAttribute: "rt-date-panel" }, viewQueries: [{ propertyName: "timeCells", predicate: ["timeCell"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container rtBlock=\"rt-date-panel\">\n @if (split()) {\n <rt-toggle-button-group\n rtElem=\"tabs\"\n qa-dataid=\"date-panel-tabs\"\n fullWidth\n [ariaLabel]=\"t().uiDate + ' | ' + t().uiTime\"\n [options]=\"tabs()\"\n [value]=\"tab()\"\n (valueChange)=\"tab.set($event)\" />\n }\n\n <div rtElem=\"body\">\n @if (showDate()) {\n @if (view() === 'days') {\n <rt-calendar\n rtElem=\"calendar\"\n qa-dataid=\"date-panel-calendar\"\n grid\n titleAction\n headerTitle\n [months]=\"months()\"\n [weekdayLabels]=\"weekdays()\"\n [canPrev]=\"canPrev()\"\n [canNext]=\"canNext()\"\n [activeKey]=\"activeKey()\"\n [prevAriaLabel]=\"t().uiPrevMonth\"\n [nextAriaLabel]=\"t().uiNextMonth\"\n (prevMonth)=\"page(-1)\"\n (nextMonth)=\"page(1)\"\n (dayClick)=\"pickDay($event)\"\n (gridKey)=\"onGridKey($event)\"\n (titleClick)=\"openMonths()\" />\n } @else {\n <div rtElem=\"months\" qa-dataid=\"date-panel-months\" role=\"group\" [attr.aria-label]=\"t().uiChooseMonth\">\n <div rtElem=\"months-header\">\n <rt-icon-button\n qa-dataid=\"date-panel-prev-year\"\n icon=\"chevron-left\"\n variant=\"secondary\"\n radius=\"full\"\n [ariaLabel]=\"t().uiPrevYear\"\n [disabled]=\"!canPrevYear()\"\n (clicked)=\"pageYear(-1)\" />\n <span rtElem=\"year\" qa-dataid=\"date-panel-year\">{{ year() }}</span>\n <rt-icon-button\n qa-dataid=\"date-panel-next-year\"\n icon=\"chevron-right\"\n variant=\"secondary\"\n radius=\"full\"\n [ariaLabel]=\"t().uiNextYear\"\n [disabled]=\"!canNextYear()\"\n (clicked)=\"pageYear(1)\" />\n </div>\n <div rtElem=\"month-grid\">\n @for (cell of monthCells(); track cell.key) {\n <button\n rtElem=\"cell\"\n qa-dataid=\"date-panel-month\"\n type=\"button\"\n [attr.data-key]=\"cell.key\"\n [attr.aria-pressed]=\"cell.key === shownMonth()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickMonth(cell)\">\n {{ cell.label }}\n </button>\n }\n </div>\n </div>\n }\n }\n\n @if (showTime()) {\n <div rtElem=\"time\" qa-dataid=\"date-panel-time\">\n <div rtElem=\"column\" qa-dataid=\"date-panel-hours\" role=\"group\" [attr.aria-label]=\"t().uiHours\">\n @for (cell of columns().hours; track cell.value) {\n <button\n #timeCell\n rtElem=\"cell\"\n qa-dataid=\"date-panel-hour\"\n type=\"button\"\n [attr.aria-pressed]=\"cell.value === draftHour()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickHour(cell.value)\">\n {{ cell.label }}\n </button>\n }\n </div>\n <div rtElem=\"column\" qa-dataid=\"date-panel-minutes\" role=\"group\" [attr.aria-label]=\"t().uiMinutes\">\n @for (cell of columns().minutes; track cell.value) {\n <button\n #timeCell\n rtElem=\"cell\"\n qa-dataid=\"date-panel-minute\"\n type=\"button\"\n [attr.aria-pressed]=\"cell.value === draftMinute()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickMinute(cell.value)\">\n {{ cell.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n <div rtElem=\"footer\">\n @switch (type()) {\n @case ('date') {\n <button\n rtButton\n qa-dataid=\"date-panel-today\"\n theme=\"secondary\"\n appearance=\"text\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiToday\"\n [attr.aria-label]=\"t().uiToday\"\n [disabled]=\"todayOff()\"\n (click)=\"pickToday()\"></button>\n }\n @case ('time') {\n <button\n rtButton\n qa-dataid=\"date-panel-now\"\n theme=\"secondary\"\n appearance=\"text\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiNow\"\n [attr.aria-label]=\"t().uiNow\"\n (click)=\"pickNow()\"></button>\n <button\n rtButton\n qa-dataid=\"date-panel-done\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiDone\"\n [attr.aria-label]=\"t().uiDone\"\n [disabled]=\"!canApply()\"\n (click)=\"apply()\"></button>\n }\n @default {\n <button\n rtButton\n qa-dataid=\"date-panel-apply\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiApply\"\n [attr.aria-label]=\"t().uiApply\"\n [disabled]=\"!canApply()\"\n (click)=\"apply()\"></button>\n }\n }\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-date-panel{--rt-date-panel-cell-size: var(--rt-control-height-sm);--rt-date-panel-cell-radius: var(--rt-radius-md);--rt-date-panel-divider-width: var(--rt-border-width-thin);--rt-date-panel-column-height: calc(var(--rt-date-panel-cell-size) * 7 + var(--rt-space-0-5) * 6);display:flex;flex-direction:column;padding:var(--rt-space-4);gap:var(--rt-space-4)}.rt-date-panel__body{display:flex;align-items:flex-start;gap:var(--rt-space-4)}.rt-date-panel .rt-date-panel__calendar{--rt-calendar-month-count: 1;--rt-calendar-day-justify: center}.rt-date-panel__calendar,.rt-date-panel__months{flex:1 1 auto;min-inline-size:calc(var(--rt-size-10) * 7)}.rt-date-panel__months-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--rt-space-4)}.rt-date-panel__year{color:var(--rt-color-text-primary);font-weight:var(--rt-font-weight-semibold)}.rt-date-panel__month-grid{display:grid;gap:var(--rt-space-1);grid-template-columns:repeat(3,1fr)}.rt-date-panel__time{display:flex;gap:var(--rt-space-1)}.rt-date-panel__column{position:relative;display:flex;flex-direction:column;gap:var(--rt-space-0-5);max-block-size:var(--rt-date-panel-column-height);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.rt-date-panel__cell{flex:0 0 auto;padding:0 var(--rt-space-2);border:none;border-radius:var(--rt-date-panel-cell-radius);background:none;color:var(--rt-color-text-primary);cursor:pointer;font:inherit;font-size:var(--rt-text-sm);font-variant-numeric:tabular-nums;min-block-size:var(--rt-date-panel-cell-size);min-inline-size:var(--rt-control-height-md)}.rt-date-panel__cell:hover:not(:disabled,[aria-pressed=true]){background:var(--rt-color-bg-subtle)}.rt-date-panel__cell:focus-visible{outline:var(--rt-focus-ring-width) solid var(--rt-focus-ring-color);outline-offset:var(--rt-focus-ring-offset)}.rt-date-panel__cell[aria-pressed=true]{background:var(--rt-color-action-primary);color:var(--rt-color-action-on-primary)}.rt-date-panel__cell:disabled{color:var(--rt-color-text-muted);cursor:not-allowed;opacity:.45}.rt-date-panel__footer{display:flex;justify-content:flex-end;padding-top:var(--rt-space-2);border-top:var(--rt-date-panel-divider-width) solid var(--rt-color-border-subtle);gap:var(--rt-space-2)}.rt-date-panel:not(.rt-date-panel--with-time) .rt-date-panel__footer{justify-content:center}.rt-date-panel--sheet{--rt-date-panel-cell-size: calc(var(--rt-size-10) + var(--rt-size-1));padding-inline:0}.rt-date-panel--sheet .rt-date-panel__calendar{--rt-calendar-day-size: var(--rt-date-panel-cell-size)}.rt-date-panel--sheet .rt-date-panel__body{flex-direction:column;align-items:stretch}.rt-date-panel--sheet .rt-date-panel__calendar,.rt-date-panel--sheet .rt-date-panel__months{min-inline-size:0}.rt-date-panel--sheet .rt-date-panel__time{justify-content:center}.rt-date-panel--sheet .rt-date-panel__column{flex:1 1 0}}\n"], dependencies: [{ kind: "directive", type:
428
+ // rt-tools
429
+ BlockDirective, selector: "[rtBlock]", inputs: ["rtMod"] }, { kind: "directive", type: ElemDirective, selector: "[rtElem]", inputs: ["rtMod"] }, { kind: "directive", type:
430
+ // components
431
+ RtButtonDirective, selector: "button[rtButton], a[rtButton]", inputs: ["label", "icon", "iconPos", "theme", "appearance", "size", "loading", "loadingIcon", "loadingLabel", "pressed"] }, { kind: "component", type: RtCalendarComponent, selector: "rt-calendar", inputs: ["months", "weekdayLabels", "canPrev", "canNext", "prevAriaLabel", "nextAriaLabel", "sublabelsLoading", "grid", "activeKey", "titleAction", "headerTitle"], outputs: ["prevMonth", "nextMonth", "dayClick", "gridKey", "titleClick", "dayHover"] }, { 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: RtToggleButtonGroupComponent, selector: "rt-toggle-button-group", inputs: ["options", "value", "multiple", "values", "ariaLabel", "size", "disabled", "fullWidth"], outputs: ["valueChange", "valuesChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
432
+ }
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtDatePanelComponent, decorators: [{
434
+ type: Component,
435
+ args: [{ selector: 'rt-date-panel', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
436
+ // rt-tools
437
+ BlockDirective,
438
+ ElemDirective,
439
+ // components
440
+ RtButtonDirective,
441
+ RtCalendarComponent,
442
+ RtIconButtonComponent,
443
+ RtToggleButtonGroupComponent,
444
+ ], host: {
445
+ class: BEM_BLOCK$1,
446
+ '[class.rt-date-panel--sheet]': 'sheet()',
447
+ '[class.rt-date-panel--with-time]': "type() !== 'date'",
448
+ '(keydown.escape)': 'closed.emit()',
449
+ }, template: "<ng-container rtBlock=\"rt-date-panel\">\n @if (split()) {\n <rt-toggle-button-group\n rtElem=\"tabs\"\n qa-dataid=\"date-panel-tabs\"\n fullWidth\n [ariaLabel]=\"t().uiDate + ' | ' + t().uiTime\"\n [options]=\"tabs()\"\n [value]=\"tab()\"\n (valueChange)=\"tab.set($event)\" />\n }\n\n <div rtElem=\"body\">\n @if (showDate()) {\n @if (view() === 'days') {\n <rt-calendar\n rtElem=\"calendar\"\n qa-dataid=\"date-panel-calendar\"\n grid\n titleAction\n headerTitle\n [months]=\"months()\"\n [weekdayLabels]=\"weekdays()\"\n [canPrev]=\"canPrev()\"\n [canNext]=\"canNext()\"\n [activeKey]=\"activeKey()\"\n [prevAriaLabel]=\"t().uiPrevMonth\"\n [nextAriaLabel]=\"t().uiNextMonth\"\n (prevMonth)=\"page(-1)\"\n (nextMonth)=\"page(1)\"\n (dayClick)=\"pickDay($event)\"\n (gridKey)=\"onGridKey($event)\"\n (titleClick)=\"openMonths()\" />\n } @else {\n <div rtElem=\"months\" qa-dataid=\"date-panel-months\" role=\"group\" [attr.aria-label]=\"t().uiChooseMonth\">\n <div rtElem=\"months-header\">\n <rt-icon-button\n qa-dataid=\"date-panel-prev-year\"\n icon=\"chevron-left\"\n variant=\"secondary\"\n radius=\"full\"\n [ariaLabel]=\"t().uiPrevYear\"\n [disabled]=\"!canPrevYear()\"\n (clicked)=\"pageYear(-1)\" />\n <span rtElem=\"year\" qa-dataid=\"date-panel-year\">{{ year() }}</span>\n <rt-icon-button\n qa-dataid=\"date-panel-next-year\"\n icon=\"chevron-right\"\n variant=\"secondary\"\n radius=\"full\"\n [ariaLabel]=\"t().uiNextYear\"\n [disabled]=\"!canNextYear()\"\n (clicked)=\"pageYear(1)\" />\n </div>\n <div rtElem=\"month-grid\">\n @for (cell of monthCells(); track cell.key) {\n <button\n rtElem=\"cell\"\n qa-dataid=\"date-panel-month\"\n type=\"button\"\n [attr.data-key]=\"cell.key\"\n [attr.aria-pressed]=\"cell.key === shownMonth()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickMonth(cell)\">\n {{ cell.label }}\n </button>\n }\n </div>\n </div>\n }\n }\n\n @if (showTime()) {\n <div rtElem=\"time\" qa-dataid=\"date-panel-time\">\n <div rtElem=\"column\" qa-dataid=\"date-panel-hours\" role=\"group\" [attr.aria-label]=\"t().uiHours\">\n @for (cell of columns().hours; track cell.value) {\n <button\n #timeCell\n rtElem=\"cell\"\n qa-dataid=\"date-panel-hour\"\n type=\"button\"\n [attr.aria-pressed]=\"cell.value === draftHour()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickHour(cell.value)\">\n {{ cell.label }}\n </button>\n }\n </div>\n <div rtElem=\"column\" qa-dataid=\"date-panel-minutes\" role=\"group\" [attr.aria-label]=\"t().uiMinutes\">\n @for (cell of columns().minutes; track cell.value) {\n <button\n #timeCell\n rtElem=\"cell\"\n qa-dataid=\"date-panel-minute\"\n type=\"button\"\n [attr.aria-pressed]=\"cell.value === draftMinute()\"\n [disabled]=\"cell.disabled\"\n (click)=\"pickMinute(cell.value)\">\n {{ cell.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n <div rtElem=\"footer\">\n @switch (type()) {\n @case ('date') {\n <button\n rtButton\n qa-dataid=\"date-panel-today\"\n theme=\"secondary\"\n appearance=\"text\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiToday\"\n [attr.aria-label]=\"t().uiToday\"\n [disabled]=\"todayOff()\"\n (click)=\"pickToday()\"></button>\n }\n @case ('time') {\n <button\n rtButton\n qa-dataid=\"date-panel-now\"\n theme=\"secondary\"\n appearance=\"text\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiNow\"\n [attr.aria-label]=\"t().uiNow\"\n (click)=\"pickNow()\"></button>\n <button\n rtButton\n qa-dataid=\"date-panel-done\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiDone\"\n [attr.aria-label]=\"t().uiDone\"\n [disabled]=\"!canApply()\"\n (click)=\"apply()\"></button>\n }\n @default {\n <button\n rtButton\n qa-dataid=\"date-panel-apply\"\n size=\"sm\"\n type=\"button\"\n [label]=\"t().uiApply\"\n [attr.aria-label]=\"t().uiApply\"\n [disabled]=\"!canApply()\"\n (click)=\"apply()\"></button>\n }\n }\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-date-panel{--rt-date-panel-cell-size: var(--rt-control-height-sm);--rt-date-panel-cell-radius: var(--rt-radius-md);--rt-date-panel-divider-width: var(--rt-border-width-thin);--rt-date-panel-column-height: calc(var(--rt-date-panel-cell-size) * 7 + var(--rt-space-0-5) * 6);display:flex;flex-direction:column;padding:var(--rt-space-4);gap:var(--rt-space-4)}.rt-date-panel__body{display:flex;align-items:flex-start;gap:var(--rt-space-4)}.rt-date-panel .rt-date-panel__calendar{--rt-calendar-month-count: 1;--rt-calendar-day-justify: center}.rt-date-panel__calendar,.rt-date-panel__months{flex:1 1 auto;min-inline-size:calc(var(--rt-size-10) * 7)}.rt-date-panel__months-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--rt-space-4)}.rt-date-panel__year{color:var(--rt-color-text-primary);font-weight:var(--rt-font-weight-semibold)}.rt-date-panel__month-grid{display:grid;gap:var(--rt-space-1);grid-template-columns:repeat(3,1fr)}.rt-date-panel__time{display:flex;gap:var(--rt-space-1)}.rt-date-panel__column{position:relative;display:flex;flex-direction:column;gap:var(--rt-space-0-5);max-block-size:var(--rt-date-panel-column-height);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.rt-date-panel__cell{flex:0 0 auto;padding:0 var(--rt-space-2);border:none;border-radius:var(--rt-date-panel-cell-radius);background:none;color:var(--rt-color-text-primary);cursor:pointer;font:inherit;font-size:var(--rt-text-sm);font-variant-numeric:tabular-nums;min-block-size:var(--rt-date-panel-cell-size);min-inline-size:var(--rt-control-height-md)}.rt-date-panel__cell:hover:not(:disabled,[aria-pressed=true]){background:var(--rt-color-bg-subtle)}.rt-date-panel__cell:focus-visible{outline:var(--rt-focus-ring-width) solid var(--rt-focus-ring-color);outline-offset:var(--rt-focus-ring-offset)}.rt-date-panel__cell[aria-pressed=true]{background:var(--rt-color-action-primary);color:var(--rt-color-action-on-primary)}.rt-date-panel__cell:disabled{color:var(--rt-color-text-muted);cursor:not-allowed;opacity:.45}.rt-date-panel__footer{display:flex;justify-content:flex-end;padding-top:var(--rt-space-2);border-top:var(--rt-date-panel-divider-width) solid var(--rt-color-border-subtle);gap:var(--rt-space-2)}.rt-date-panel:not(.rt-date-panel--with-time) .rt-date-panel__footer{justify-content:center}.rt-date-panel--sheet{--rt-date-panel-cell-size: calc(var(--rt-size-10) + var(--rt-size-1));padding-inline:0}.rt-date-panel--sheet .rt-date-panel__calendar{--rt-calendar-day-size: var(--rt-date-panel-cell-size)}.rt-date-panel--sheet .rt-date-panel__body{flex-direction:column;align-items:stretch}.rt-date-panel--sheet .rt-date-panel__calendar,.rt-date-panel--sheet .rt-date-panel__months{min-inline-size:0}.rt-date-panel--sheet .rt-date-panel__time{justify-content:center}.rt-date-panel--sheet .rt-date-panel__column{flex:1 1 0}}\n"] }]
450
+ }], ctorParameters: () => [], propDecorators: { timeCells: [{ type: i0.ViewChildren, args: ['timeCell', { isSignal: true }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }], sheet: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheet", required: false }] }], now: [{ type: i0.Input, args: [{ isSignal: true, alias: "now", required: false }] }], picked: [{ type: i0.Output, args: ["picked"] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
451
+
452
+ /**
453
+ * Чистая логика текста в поле даты: как значение пишется по локали и как набранный текст
454
+ * читается обратно. Значение формы — строка ISO (`YYYY-MM-DD`, `HH:mm`, `YYYY-MM-DDTHH:mm`);
455
+ * текст — дата в порядке языка интерфейса (`01.08.2026` под `ru`), время всегда `HH:mm`.
456
+ */
457
+ /** День, в котором день, месяц и год различимы: по нему `Intl` называет порядок частей. */
458
+ const SAMPLE_DAY = new Date(2026, 0, 31);
459
+ const DEFAULT_LAYOUT = { order: ['day', 'month', 'year'], separator: '.' };
460
+ const YEAR_LEN = 4;
461
+ const PART_MAX_LEN = 2;
462
+ const DAY_GROUPS = 3;
463
+ const TIME_GROUPS = 2;
464
+ /** Знаки, которые встречаются в тексте даты любой локали, кроме цифр. */
465
+ const TEXT_RE = /^[\d\s.,/:\-T]+$/;
466
+ function isDatePart(type) {
467
+ return type === 'day' || type === 'month' || type === 'year';
468
+ }
469
+ function dayText(day, layout) {
470
+ const [year, month, date] = day.split('-');
471
+ const parts = { day: date, month, year };
472
+ return layout.order.map((part) => parts[part]).join(layout.separator);
473
+ }
474
+ /** День ISO из трёх групп цифр в порядке локали; `null` — группы не складываются в день. */
475
+ function readDay(groups, layout) {
476
+ const parts = {};
477
+ layout.order.forEach((part, index) => {
478
+ parts[part] = groups[index];
479
+ });
480
+ const { day, month, year } = parts;
481
+ if (day === undefined || month === undefined || year?.length !== YEAR_LEN) {
482
+ return null;
483
+ }
484
+ if (day.length > PART_MAX_LEN || month.length > PART_MAX_LEN) {
485
+ return null;
486
+ }
487
+ return `${year}-${month.padStart(PART_MAX_LEN, '0')}-${day.padStart(PART_MAX_LEN, '0')}`;
488
+ }
489
+ /** Время ISO из двух групп цифр: часы в один или два знака, минуты — ровно два. */
490
+ function readTime(groups) {
491
+ if (groups.length !== TIME_GROUPS) {
492
+ return null;
493
+ }
494
+ const [hour, minute] = groups;
495
+ if (minute.length !== PART_MAX_LEN || hour.length > PART_MAX_LEN) {
496
+ return null;
497
+ }
498
+ return `${hour.padStart(PART_MAX_LEN, '0')}:${minute}`;
499
+ }
500
+ /** Значение типа из групп цифр текста; `null` — группы не складываются в значение. */
501
+ function readGroups(groups, type, layout) {
502
+ if (type === 'time') {
503
+ return readTime(groups);
504
+ }
505
+ if (type === 'date') {
506
+ return groups.length === DAY_GROUPS ? readDay(groups, layout) : null;
507
+ }
508
+ if (groups.length !== DAY_GROUPS + TIME_GROUPS) {
509
+ return null;
510
+ }
511
+ const day = readDay(groups.slice(0, DAY_GROUPS), layout);
512
+ const time = readTime(groups.slice(DAY_GROUPS));
513
+ return day === null || time === null ? null : `${day}T${time}`;
514
+ }
515
+ /** Порядок дня, месяца и года и знак между ними — по локали. */
516
+ function rtDateLayout(locale) {
517
+ const parts = new Intl.DateTimeFormat(locale, {
518
+ day: '2-digit',
519
+ month: '2-digit',
520
+ year: 'numeric',
521
+ }).formatToParts(SAMPLE_DAY);
522
+ const order = parts
523
+ .map((part) => part.type)
524
+ .filter((type) => isDatePart(type));
525
+ const separator = parts.find((part) => part.type === 'literal')?.value.trim() ?? '';
526
+ if (order.length !== DAY_GROUPS || separator === '') {
527
+ return DEFAULT_LAYOUT;
528
+ }
529
+ return { order, separator };
530
+ }
531
+ /**
532
+ * Текст поля для значения ISO; пустое значение — пустой текст. Строка, которая не читается как
533
+ * значение этого типа, показывается как есть: она пришла из формы мимо поля и не должна пропасть.
534
+ */
535
+ function rtDateText(value, type, layout) {
536
+ if (type === 'time' || rtDateRead(value, type) === null) {
537
+ return value;
538
+ }
539
+ if (type === 'date') {
540
+ return dayText(value, layout);
541
+ }
542
+ const [day, time] = value.split('T');
543
+ return `${dayText(day, layout)} ${time}`;
544
+ }
545
+ /** Подсказка формы текста в буквах кита: `дд.мм.гггг`, `чч:мм`, `дд.мм.гггг чч:мм`. */
546
+ function rtDateShape(type, layout, letters) {
547
+ const time = `${letters.hour}:${letters.minute}`;
548
+ if (type === 'time') {
549
+ return time;
550
+ }
551
+ const day = layout.order.map((part) => letters[part]).join(layout.separator);
552
+ return type === 'date' ? day : `${day} ${time}`;
553
+ }
554
+ /**
555
+ * Читает набранный текст в значение ISO; `null` — текст не значение этого типа. Читается и
556
+ * порядок локали, и сама форма значения: вставленная `2026-08-01` тоже становится значением.
557
+ */
558
+ function rtDateParse(text, type, layout) {
559
+ const iso = rtDateRead(text, type);
560
+ if (iso !== null) {
561
+ return iso;
562
+ }
563
+ const value = text.trim();
564
+ if (!TEXT_RE.test(value)) {
565
+ return null;
566
+ }
567
+ const candidate = readGroups(value.match(/\d+/g) ?? [], type, layout);
568
+ // Кандидат проверяется той же формой значения: 31.02.2026 складывается в строку, но не в день.
569
+ return candidate === null ? null : rtDateRead(candidate, type);
570
+ }
571
+
572
+ const BEM_BLOCK = 'rt-date-picker';
573
+ /**
574
+ * Поле даты, времени или даты со временем со своей панелью кита, визуально и по токенам
575
+ * идентичное rt-input (host — box `--rt-input-*`, input — прозрачный `__field`). Кнопка в конце
576
+ * поля открывает `rt-date-panel`: на широком экране в поповере, на узком — в нижней шторке.
577
+ * CVA через общий `RtFormControlBase`: clearable, авто-подсветка invalid, read-only
578
+ * представление (значение форматируется через Intl).
579
+ *
580
+ * `value` — строка формы нативного input'а (`YYYY-MM-DD`, `YYYY-MM-DDTHH:mm`, `HH:mm`). Текст в
581
+ * поле — дата в порядке языка интерфейса (`01.08.2026` под `ru`), время `HH:mm`; набирается так же,
582
+ * вставленная форма значения тоже читается. Нечитаемый или лежащий за границами текст оставляет
583
+ * значение прежним и помечает поле ошибкой.
584
+ */
585
+ class RtDatePickerComponent extends RtFormControlBase {
586
+ constructor() {
587
+ super(...arguments);
588
+ /** Локаль кита: приложение, меняющее язык на ходу, меняет её, и текст поля пересчитывается. */
589
+ this.#locale = inject(RT_KIT_LOCALE);
590
+ /** Порядок дня, месяца и года в тексте поля — по локали кита. */
591
+ this.#layout = computed(() => rtDateLayout(this.#locale()), /* @ts-ignore */
592
+ ...(ngDevMode ? [{ debugName: "#layout" }] : /* istanbul ignore next */ []));
593
+ this.t = inject(RT_KIT_LABELS);
594
+ /** Узкий экран: панель открывается в нижней шторке, а не в поповере. */
595
+ this.narrow = inject(BreakpointsService).narrow;
596
+ this.fieldEl = viewChild('fieldEl', /* @ts-ignore */
597
+ ...(ngDevMode ? [{ debugName: "fieldEl" }] : /* istanbul ignore next */ []));
598
+ this.popover = viewChild(RtPopoverDirective, /* @ts-ignore */
599
+ ...(ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []));
600
+ /** Набранный текст не читается как значение в границах: поле помечено ошибкой. */
601
+ this.textInvalid = signal(false, /* @ts-ignore */
602
+ ...(ngDevMode ? [{ debugName: "textInvalid" }] : /* istanbul ignore next */ []));
603
+ this.sheetOpen = signal(false, /* @ts-ignore */
604
+ ...(ngDevMode ? [{ debugName: "sheetOpen" }] : /* istanbul ignore next */ []));
605
+ /** Подсказка формы текста буквами кита: `дд.мм.гггг` под русскими метками. */
606
+ this.shape = computed(() => {
607
+ const labels = this.t();
608
+ return rtDateShape(this.type(), this.#layout(), {
609
+ day: labels.uiShapeDay,
610
+ month: labels.uiShapeMonth,
611
+ year: labels.uiShapeYear,
612
+ hour: labels.uiShapeHour,
613
+ minute: labels.uiShapeMinute,
614
+ });
615
+ }, /* @ts-ignore */
616
+ ...(ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []));
617
+ /**
618
+ * Текст в поле — значение в порядке языка интерфейса. Не строку форма кладёт мимо контракта
619
+ * (например `Date`), и поле показывает её пустой, как показывало браузерное.
620
+ */
621
+ this.text = computed(() => this.#text(this.value()), /* @ts-ignore */
622
+ ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
623
+ this.openIcon = computed(() => this.type() === 'time' ? 'ico-time' : 'ico-calendar', /* @ts-ignore */
624
+ ...(ngDevMode ? [{ debugName: "openIcon" }] : /* istanbul ignore next */ []));
625
+ this.hasValue = computed(() => this.value() !== '', /* @ts-ignore */
626
+ ...(ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []));
627
+ /**
628
+ * Ширина поля в знаках — по длине формы значения. Без неё текстовое поле берёт от браузера
629
+ * двадцать знаков и в строке отборов потребителя занимает место вдвое шире значения.
630
+ */
631
+ this.fieldSize = computed(() => this.shape().length, /* @ts-ignore */
632
+ ...(ngDevMode ? [{ debugName: "fieldSize" }] : /* istanbul ignore next */ []));
633
+ /** Подсказка обрезается многоточием в узком поле, поэтому шаблон целиком виден при наведении. */
634
+ this.shapeTitle = computed(() => (this.hasValue() ? null : this.shape()), /* @ts-ignore */
635
+ ...(ngDevMode ? [{ debugName: "shapeTitle" }] : /* istanbul ignore next */ []));
636
+ /** Вид рамки: `outline` — рамка со всех сторон, `fill` — залитое поле с чертой снизу. */
637
+ this.appearance = input('outline', /* @ts-ignore */
638
+ ...(ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []));
639
+ this.displayText = computed(() => this.#format(this.value(), this.type()), /* @ts-ignore */
640
+ ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
641
+ this.type = input('date', /* @ts-ignore */
642
+ ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
643
+ this.min = input(null, /* @ts-ignore */
644
+ ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
645
+ this.max = input(null, /* @ts-ignore */
646
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
647
+ /** Шаг колонки минут в панели. */
648
+ this.minuteStep = input(5, { ...(ngDevMode ? { debugName: "minuteStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
649
+ }
650
+ /** Локаль кита: приложение, меняющее язык на ходу, меняет её, и текст поля пересчитывается. */
651
+ #locale;
652
+ /** Порядок дня, месяца и года в тексте поля — по локали кита. */
653
+ #layout;
654
+ /** Значение из формы снимает ошибку набора: в поле теперь стоит оно. */
655
+ writeValue(value) {
656
+ super.writeValue(value);
657
+ this.textInvalid.set(false);
658
+ }
659
+ getEmptyValue() {
660
+ return '';
661
+ }
662
+ focusAfterClear() {
663
+ this.fieldEl()?.nativeElement.focus();
664
+ }
665
+ clearValue() {
666
+ super.clearValue();
667
+ this.#accept('');
668
+ }
669
+ /** Набор текста: значение меняется, только когда текст читается как значение в границах. */
670
+ onTyped(event) {
671
+ const text = event.target.value;
672
+ if (text.trim() === '') {
673
+ this.#commit('');
674
+ return;
675
+ }
676
+ const read = rtDateParse(text, this.type(), this.#layout());
677
+ if (read === null || !rtDateInBounds(read, this.min(), this.max())) {
678
+ this.textInvalid.set(true);
679
+ return;
680
+ }
681
+ this.#commit(read);
682
+ }
683
+ /** Кнопка в конце поля: на узком экране открывает шторку, на широком поповер открывает сам. */
684
+ openPanel() {
685
+ if (this.narrow() && !this.isDisabled()) {
686
+ this.sheetOpen.set(true);
687
+ }
688
+ }
689
+ closePanel() {
690
+ this.sheetOpen.set(false);
691
+ this.popover()?.close();
692
+ }
693
+ onPicked(value) {
694
+ this.#commit(value);
695
+ this.markTouched();
696
+ }
697
+ onBlur() {
698
+ this.markTouched();
699
+ }
700
+ #commit(value) {
701
+ this.value.set(value);
702
+ this.emitChange(value);
703
+ this.#accept(value);
704
+ }
705
+ /** Текст в поле — принятое значение, ошибки набора нет. */
706
+ #accept(value) {
707
+ this.textInvalid.set(false);
708
+ const node = this.fieldEl()?.nativeElement;
709
+ if (node !== undefined) {
710
+ node.value = this.#text(value);
711
+ }
712
+ }
713
+ #text(value) {
714
+ return typeof value === 'string' ? rtDateText(value, this.type(), this.#layout()) : '';
715
+ }
716
+ /**
717
+ * Форматирует ISO-значение нативного input'а в локализованный текст для
718
+ * read-only. Для `time` форматируем как сегодняшнюю дату с временем (нужен
719
+ * валидный Date), показывая только часы/минуты.
720
+ */
721
+ #format(value, type) {
722
+ if (value === '') {
723
+ return '';
724
+ }
725
+ const parsed = Date.parse(type === 'time' ? `1970-01-01T${value}` : value);
726
+ if (Number.isNaN(parsed)) {
727
+ return value;
728
+ }
729
+ return new Intl.DateTimeFormat(this.#locale(), this.#formatOptions(type)).format(new Date(parsed));
730
+ }
731
+ #formatOptions(type) {
732
+ if (type === 'time') {
733
+ return { hour: '2-digit', minute: '2-digit' };
734
+ }
735
+ if (type === 'datetime-local') {
736
+ return { dateStyle: 'medium', timeStyle: 'short' };
737
+ }
738
+ return { dateStyle: 'medium' };
739
+ }
740
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtDatePickerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
741
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: RtDatePickerComponent, isStandalone: true, selector: "rt-date-picker", inputs: { appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minuteStep: { classPropertyName: "minuteStep", publicName: "minuteStep", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.rt-date-picker--disabled": "isDisabled()", "class.rt-date-picker--invalid": "isInvalid() || textInvalid()", "class.rt-date-picker--readonly": "isReadonly()", "class.rt-date-picker--borderless": "!bordered()", "class.rt-date-picker--appearance--fill": "appearance() === 'fill'", "class.rt-date-picker--size--sm": "size() === 'sm'", "class.rt-date-picker--size--lg": "size() === 'lg'" }, classAttribute: "rt-date-picker" }, providers: [
742
+ // Алиас базового токена — для contentChild(RtFormControlBase) в rt-field.
743
+ { provide: RtFormControlBase, useExisting: forwardRef(() => RtDatePickerComponent) },
744
+ ], viewQueries: [{ propertyName: "fieldEl", first: true, predicate: ["fieldEl"], descendants: true, isSignal: true }, { propertyName: "popover", first: true, predicate: RtPopoverDirective, descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.RtRadiusDirective, inputs: ["radius", "radius"] }], ngImport: i0, template: "<ng-container rtBlock=\"rt-date-picker\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"date-picker-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '\u2014' }}</span>\n } @else {\n <input\n #fieldEl\n rtElem=\"field\"\n qa-dataid=\"date-picker-control\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [disabled]=\"isDisabled()\"\n [attr.placeholder]=\"shape()\"\n [attr.title]=\"shapeTitle()\"\n [attr.size]=\"fieldSize()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"isInvalid() || textInvalid() || null\"\n (input)=\"onTyped($event)\"\n (blur)=\"onBlur()\" />\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"date-picker-clear\"\n icon=\"ico-close\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n [ariaLabel]=\"t().uiClear\"\n [tabIndex]=\"-1\"\n (clicked)=\"clear($event)\" />\n }\n <rt-icon-button\n rtElem=\"open\"\n qa-dataid=\"date-picker-open\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n rtPopoverAlign=\"end\"\n [icon]=\"openIcon()\"\n [ariaLabel]=\"t().uiOpenCalendar\"\n [disabled]=\"isDisabled()\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"narrow() || isDisabled()\"\n (clicked)=\"openPanel()\" />\n\n <ng-template #panelTpl>\n <div rtElem=\"popup\" qa-dataid=\"date-picker-popup\">\n <rt-date-panel\n [type]=\"type()\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [minuteStep]=\"minuteStep()\"\n (picked)=\"onPicked($event)\"\n (closed)=\"closePanel()\" />\n </div>\n </ng-template>\n\n @if (narrow()) {\n <rt-bottom-sheet qa-dataid=\"date-picker-sheet\" [open]=\"sheetOpen()\" (openChange)=\"sheetOpen.set($event)\">\n @if (sheetOpen()) {\n <rt-date-panel\n sheet\n [type]=\"type()\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [minuteStep]=\"minuteStep()\"\n (picked)=\"onPicked($event)\"\n (closed)=\"closePanel()\" />\n }\n </rt-bottom-sheet>\n }\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-date-picker{--rt-date-picker-radius: var(--rt-input-radius);--rt-date-picker-fill-radius: var(--rt-radius-sm);position:relative;display:inline-flex;width:100%;min-height:var(--rt-input-height);box-sizing:border-box;align-items:center;padding:var(--rt-input-padding-y) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-date-picker-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:text;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);transition:var(--rt-input-transition)}.rt-date-picker:focus-within{border-color:var(--rt-input-color-border-focus);box-shadow:var(--rt-input-focus-shadow);outline:2px solid transparent;outline-offset:var(--rt-input-focus-outline-offset)}.rt-date-picker--borderless{border-color:transparent}.rt-date-picker--appearance--fill{border-color:transparent;border-radius:var(--rt-date-picker-fill-radius) var(--rt-date-picker-fill-radius) 0 0;border-bottom-color:var(--rt-color-field-fill-underline);background-color:var(--rt-color-bg-surface-subtle-2)}.rt-date-picker--invalid{border-color:var(--rt-input-color-border-error)}.rt-date-picker--invalid:focus-within{box-shadow:var(--rt-input-focus-shadow-error)}.rt-date-picker--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-date-picker--size--sm{min-height:var(--rt-input-height-sm)}.rt-date-picker--size--lg{min-height:var(--rt-input-height-lg)}.rt-date-picker--readonly{padding-right:0;padding-left:0;border-color:transparent;background-color:transparent;cursor:default}.rt-date-picker__readonly{color:var(--rt-field-value-color);font-size:var(--rt-field-value-font-size)}.rt-date-picker__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-date-picker__field{min-width:0;flex:1 1 auto;padding:0;border:none;background:transparent;color:inherit;font:inherit;outline:none;text-overflow:ellipsis}.rt-date-picker__field:disabled{cursor:not-allowed}.rt-date-picker__clear,.rt-date-picker__open{flex-shrink:0}.rt-date-picker__popup{border:var(--rt-overlay-select-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-overlay-select-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-overlay-select-shadow)}.rt-date-picker[data-rt-radius=none]{--rt-date-picker-radius: var(--rt-radius-none)}.rt-date-picker[data-rt-radius=xs]{--rt-date-picker-radius: var(--rt-radius-xs)}.rt-date-picker[data-rt-radius=sm]{--rt-date-picker-radius: var(--rt-radius-sm)}.rt-date-picker[data-rt-radius=ms]{--rt-date-picker-radius: var(--rt-radius-ms)}.rt-date-picker[data-rt-radius=md]{--rt-date-picker-radius: var(--rt-radius-md)}.rt-date-picker[data-rt-radius=lg]{--rt-date-picker-radius: var(--rt-radius-lg)}.rt-date-picker[data-rt-radius=xl]{--rt-date-picker-radius: var(--rt-radius-xl)}.rt-date-picker[data-rt-radius=\"2xl\"]{--rt-date-picker-radius: var(--rt-radius-2xl)}.rt-date-picker[data-rt-radius=full]{--rt-date-picker-radius: var(--rt-radius-full)}}\n"], dependencies: [{ kind: "component", type:
745
+ // standalone components / directives
746
+ RtBottomSheetComponent, selector: "rt-bottom-sheet", inputs: ["open"], outputs: ["openChange"] }, { kind: "component", type: RtDatePanelComponent, selector: "rt-date-panel", inputs: ["type", "value", "min", "max", "minuteStep", "sheet", "now"], outputs: ["picked", "closed"] }, { 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: "directive", type: RtPopoverDirective, selector: "[rtPopover]", inputs: ["rtPopover", "rtPopoverTrigger", "rtPopoverWidth", "rtPopoverAlign", "rtPopoverFitViewport", "rtPopoverContext", "rtPopoverPanelClass", "rtPopoverDisabled", "rtPopoverOffsetY", "rtPopoverOffsetX"], outputs: ["rtPopoverOpened", "rtPopoverClosed"], exportAs: ["rtPopover"] }, { 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 }); }
747
+ }
748
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: RtDatePickerComponent, decorators: [{
749
+ type: Component,
750
+ args: [{ selector: 'rt-date-picker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
751
+ // standalone components / directives
752
+ RtBottomSheetComponent,
753
+ RtDatePanelComponent,
754
+ RtIconButtonComponent,
755
+ RtPopoverDirective,
756
+ BlockDirective,
757
+ ElemDirective,
758
+ ModDirective,
759
+ ], providers: [
760
+ // Алиас базового токена — для contentChild(RtFormControlBase) в rt-field.
761
+ { provide: RtFormControlBase, useExisting: forwardRef(() => RtDatePickerComponent) },
762
+ ], hostDirectives: [{ directive: RtRadiusDirective, inputs: ['radius'] }], host: {
763
+ class: BEM_BLOCK,
764
+ '[class.rt-date-picker--disabled]': 'isDisabled()',
765
+ '[class.rt-date-picker--invalid]': 'isInvalid() || textInvalid()',
766
+ '[class.rt-date-picker--readonly]': 'isReadonly()',
767
+ '[class.rt-date-picker--borderless]': '!bordered()',
768
+ '[class.rt-date-picker--appearance--fill]': "appearance() === 'fill'",
769
+ '[class.rt-date-picker--size--sm]': "size() === 'sm'",
770
+ '[class.rt-date-picker--size--lg]': "size() === 'lg'",
771
+ }, template: "<ng-container rtBlock=\"rt-date-picker\">\n @if (isReadonly()) {\n <span rtElem=\"readonly\" qa-dataid=\"date-picker-readonly\" [rtMod]=\"{ empty: !displayText() }\">{{ displayText() || '\u2014' }}</span>\n } @else {\n <input\n #fieldEl\n rtElem=\"field\"\n qa-dataid=\"date-picker-control\"\n type=\"text\"\n inputmode=\"numeric\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [value]=\"text()\"\n [disabled]=\"isDisabled()\"\n [attr.placeholder]=\"shape()\"\n [attr.title]=\"shapeTitle()\"\n [attr.size]=\"fieldSize()\"\n [attr.id]=\"effectiveControlId()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-invalid]=\"isInvalid() || textInvalid() || null\"\n (input)=\"onTyped($event)\"\n (blur)=\"onBlur()\" />\n @if (showClearButton()) {\n <rt-icon-button\n rtElem=\"clear\"\n qa-dataid=\"date-picker-clear\"\n icon=\"ico-close\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n [ariaLabel]=\"t().uiClear\"\n [tabIndex]=\"-1\"\n (clicked)=\"clear($event)\" />\n }\n <rt-icon-button\n rtElem=\"open\"\n qa-dataid=\"date-picker-open\"\n size=\"sm\"\n variant=\"ghost\"\n iconColor=\"muted\"\n rtPopoverAlign=\"end\"\n [icon]=\"openIcon()\"\n [ariaLabel]=\"t().uiOpenCalendar\"\n [disabled]=\"isDisabled()\"\n [rtPopover]=\"panelTpl\"\n [rtPopoverDisabled]=\"narrow() || isDisabled()\"\n (clicked)=\"openPanel()\" />\n\n <ng-template #panelTpl>\n <div rtElem=\"popup\" qa-dataid=\"date-picker-popup\">\n <rt-date-panel\n [type]=\"type()\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [minuteStep]=\"minuteStep()\"\n (picked)=\"onPicked($event)\"\n (closed)=\"closePanel()\" />\n </div>\n </ng-template>\n\n @if (narrow()) {\n <rt-bottom-sheet qa-dataid=\"date-picker-sheet\" [open]=\"sheetOpen()\" (openChange)=\"sheetOpen.set($event)\">\n @if (sheetOpen()) {\n <rt-date-panel\n sheet\n [type]=\"type()\"\n [value]=\"value()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [minuteStep]=\"minuteStep()\"\n (picked)=\"onPicked($event)\"\n (closed)=\"closePanel()\" />\n }\n </rt-bottom-sheet>\n }\n }\n</ng-container>\n", styles: ["@charset \"UTF-8\";@layer rt-kit.components{.rt-date-picker{--rt-date-picker-radius: var(--rt-input-radius);--rt-date-picker-fill-radius: var(--rt-radius-sm);position:relative;display:inline-flex;width:100%;min-height:var(--rt-input-height);box-sizing:border-box;align-items:center;padding:var(--rt-input-padding-y) var(--rt-input-padding-x);border:var(--rt-input-border-width) solid var(--rt-input-color-border);border-radius:var(--rt-date-picker-radius);background-color:var(--rt-input-color-bg);color:var(--rt-input-color-text);cursor:text;font-size:var(--rt-input-font-size);gap:var(--rt-space-sm);line-height:var(--rt-input-line-height);transition:var(--rt-input-transition)}.rt-date-picker:focus-within{border-color:var(--rt-input-color-border-focus);box-shadow:var(--rt-input-focus-shadow);outline:2px solid transparent;outline-offset:var(--rt-input-focus-outline-offset)}.rt-date-picker--borderless{border-color:transparent}.rt-date-picker--appearance--fill{border-color:transparent;border-radius:var(--rt-date-picker-fill-radius) var(--rt-date-picker-fill-radius) 0 0;border-bottom-color:var(--rt-color-field-fill-underline);background-color:var(--rt-color-bg-surface-subtle-2)}.rt-date-picker--invalid{border-color:var(--rt-input-color-border-error)}.rt-date-picker--invalid:focus-within{box-shadow:var(--rt-input-focus-shadow-error)}.rt-date-picker--disabled{cursor:not-allowed;opacity:var(--rt-input-disabled-opacity)}.rt-date-picker--size--sm{min-height:var(--rt-input-height-sm)}.rt-date-picker--size--lg{min-height:var(--rt-input-height-lg)}.rt-date-picker--readonly{padding-right:0;padding-left:0;border-color:transparent;background-color:transparent;cursor:default}.rt-date-picker__readonly{color:var(--rt-field-value-color);font-size:var(--rt-field-value-font-size)}.rt-date-picker__readonly--empty{color:var(--rt-field-value-empty-color)}.rt-date-picker__field{min-width:0;flex:1 1 auto;padding:0;border:none;background:transparent;color:inherit;font:inherit;outline:none;text-overflow:ellipsis}.rt-date-picker__field:disabled{cursor:not-allowed}.rt-date-picker__clear,.rt-date-picker__open{flex-shrink:0}.rt-date-picker__popup{border:var(--rt-overlay-select-panel-border-width) solid var(--rt-color-border-subtle);border-radius:var(--rt-overlay-select-radius);background-color:var(--rt-color-bg-surface);box-shadow:var(--rt-overlay-select-shadow)}.rt-date-picker[data-rt-radius=none]{--rt-date-picker-radius: var(--rt-radius-none)}.rt-date-picker[data-rt-radius=xs]{--rt-date-picker-radius: var(--rt-radius-xs)}.rt-date-picker[data-rt-radius=sm]{--rt-date-picker-radius: var(--rt-radius-sm)}.rt-date-picker[data-rt-radius=ms]{--rt-date-picker-radius: var(--rt-radius-ms)}.rt-date-picker[data-rt-radius=md]{--rt-date-picker-radius: var(--rt-radius-md)}.rt-date-picker[data-rt-radius=lg]{--rt-date-picker-radius: var(--rt-radius-lg)}.rt-date-picker[data-rt-radius=xl]{--rt-date-picker-radius: var(--rt-radius-xl)}.rt-date-picker[data-rt-radius=\"2xl\"]{--rt-date-picker-radius: var(--rt-radius-2xl)}.rt-date-picker[data-rt-radius=full]{--rt-date-picker-radius: var(--rt-radius-full)}}\n"] }]
772
+ }], propDecorators: { fieldEl: [{ type: i0.ViewChild, args: ['fieldEl', { isSignal: true }] }], popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => RtPopoverDirective), { isSignal: true }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], minuteStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "minuteStep", required: false }] }] } });
773
+
774
+ /**
775
+ * Generated bundle index. Do not edit.
776
+ */
777
+
778
+ export { RtDatePickerComponent, rtDateAddMonths, rtDateCanPage, rtDateFirstDay, rtDateGridKey, rtDateInBounds, rtDateLayout, rtDateMonth, rtDateMonths, rtDateNow, rtDateParse, rtDateRead, rtDateShape, rtDateSplit, rtDateText, rtDateTime, rtDateTimeColumns, rtDateWeekdays, rtDateWrite };
779
+ //# sourceMappingURL=rt-tools-ui-kit-v2-date-picker.mjs.map