@jetbrains/ring-ui 7.0.62 → 7.0.63

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 (386) hide show
  1. package/components/alert/alert.css +1 -1
  2. package/components/alert/alert.d.ts +1 -1
  3. package/components/alert/alert.js +3 -3
  4. package/components/alert/container.css +2 -2
  5. package/components/alert/container.d.ts +1 -1
  6. package/components/alert/container.js +1 -1
  7. package/components/alert-service/alert-service.d.ts +2 -2
  8. package/components/analytics/{analytics__custom-plugin.d.ts → analytics-custom-plugin.d.ts} +1 -1
  9. package/components/analytics/{analytics__custom-plugin.js → analytics-custom-plugin.js} +2 -2
  10. package/components/auth/{auth__core.d.ts → auth-core.d.ts} +9 -8
  11. package/components/auth/{auth__core.js → auth-core.js} +14 -18
  12. package/components/auth/auth.d.ts +2 -2
  13. package/components/auth/auth.js +2 -2
  14. package/components/auth/background-flow.d.ts +2 -2
  15. package/components/auth/background-flow.js +0 -1
  16. package/components/auth/down-notification.css +1 -1
  17. package/components/auth/down-notification.js +1 -1
  18. package/components/auth/iframe-flow.d.ts +3 -3
  19. package/components/auth/iframe-flow.js +3 -5
  20. package/components/auth/request-builder.d.ts +2 -1
  21. package/components/auth/request-builder.js +1 -2
  22. package/components/auth/storage.d.ts +3 -3
  23. package/components/auth/storage.js +4 -8
  24. package/components/auth/token-validator.d.ts +2 -1
  25. package/components/auth/token-validator.js +6 -1
  26. package/components/auth/window-flow.d.ts +3 -3
  27. package/components/auth/window-flow.js +7 -7
  28. package/components/auth-dialog/auth-dialog.css +2 -2
  29. package/components/auth-dialog/auth-dialog.js +1 -1
  30. package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
  31. package/components/avatar/avatar-info.d.ts +1 -1
  32. package/components/avatar/avatar.css +1 -1
  33. package/components/avatar/avatar.d.ts +1 -1
  34. package/components/avatar/avatar.figma.js +1 -1
  35. package/components/avatar/avatar.js +5 -7
  36. package/components/avatar/fallback-avatar.js +4 -8
  37. package/components/avatar-stack/avatar-stack.css +1 -1
  38. package/components/avatar-stack/avatar-stack.d.ts +3 -3
  39. package/components/avatar-stack/avatar-stack.figma.js +1 -1
  40. package/components/avatar-stack/avatar-stack.js +1 -1
  41. package/components/banner/banner.css +2 -2
  42. package/components/banner/banner.js +1 -1
  43. package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  44. package/components/breadcrumbs/breadcrumbs.figma.js +1 -1
  45. package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
  46. package/components/button/button.css +19 -16
  47. package/components/button/button.d.ts +4 -4
  48. package/components/button/button.figma.js +1 -1
  49. package/components/button/button.js +6 -6
  50. package/components/button-group/button-group.css +6 -6
  51. package/components/button-group/button-group.d.ts +1 -1
  52. package/components/button-group/button-group.js +1 -1
  53. package/components/button-group/caption.d.ts +1 -1
  54. package/components/button-set/button-set.css +2 -2
  55. package/components/button-set/button-set.d.ts +1 -1
  56. package/components/button-toolbar/button-toolbar.css +2 -2
  57. package/components/button-toolbar/button-toolbar.d.ts +1 -1
  58. package/components/caret/caret.js +23 -18
  59. package/components/checkbox/checkbox-group.figma.js +1 -1
  60. package/components/checkbox/checkbox.css +1 -1
  61. package/components/checkbox/checkbox.d.ts +1 -1
  62. package/components/checkbox/checkbox.figma.js +1 -1
  63. package/components/checkbox/checkbox.js +5 -5
  64. package/components/clipboard/clipboard.js +2 -2
  65. package/components/code/code.css +1 -1
  66. package/components/code/code.d.ts +1 -1
  67. package/components/code/code.js +5 -3
  68. package/components/collapse/collapse-content.d.ts +3 -3
  69. package/components/collapse/collapse-control.d.ts +2 -2
  70. package/components/collapse/collapse.css +1 -1
  71. package/components/collapse/collapse.d.ts +3 -3
  72. package/components/confirm/confirm.d.ts +1 -1
  73. package/components/confirm/confirm.js +1 -1
  74. package/components/confirm-service/confirm-service.d.ts +3 -3
  75. package/components/content-layout/content-layout.css +2 -2
  76. package/components/content-layout/content-layout.d.ts +1 -1
  77. package/components/content-layout/content-layout.js +2 -2
  78. package/components/content-layout/sidebar.d.ts +1 -1
  79. package/components/contenteditable/contenteditable.d.ts +1 -1
  80. package/components/contenteditable/contenteditable.js +2 -1
  81. package/components/control-help/control-help.css +1 -1
  82. package/components/control-help/control-help.d.ts +1 -1
  83. package/components/control-label/control-label.d.ts +1 -1
  84. package/components/data-list/data-list.css +1 -1
  85. package/components/data-list/data-list.d.ts +5 -5
  86. package/components/data-list/data-list.js +2 -2
  87. package/components/data-list/data-list.mock.d.ts +2 -2
  88. package/components/data-list/data-list.mock.js +20 -20
  89. package/components/data-list/item.d.ts +3 -3
  90. package/components/data-list/item.js +2 -2
  91. package/components/data-list/selection.d.ts +1 -1
  92. package/components/data-list/selection.js +8 -1
  93. package/components/data-list/title.d.ts +2 -2
  94. package/components/date-picker/consts.d.ts +1 -1
  95. package/components/date-picker/date-input.d.ts +1 -1
  96. package/components/date-picker/date-input.js +2 -2
  97. package/components/date-picker/date-picker.css +15 -15
  98. package/components/date-picker/date-picker.d.ts +5 -5
  99. package/components/date-picker/date-picker.js +17 -19
  100. package/components/date-picker/date-popup.d.ts +1 -1
  101. package/components/date-picker/date-popup.js +5 -3
  102. package/components/date-picker/day.d.ts +2 -2
  103. package/components/date-picker/day.js +4 -5
  104. package/components/date-picker/formats.js +1 -0
  105. package/components/date-picker/month-names.d.ts +1 -1
  106. package/components/date-picker/month-names.js +1 -1
  107. package/components/date-picker/month-slider.d.ts +2 -2
  108. package/components/date-picker/month-slider.js +1 -1
  109. package/components/date-picker/month.d.ts +1 -1
  110. package/components/date-picker/months.d.ts +1 -1
  111. package/components/date-picker/months.js +2 -2
  112. package/components/date-picker/years.d.ts +1 -1
  113. package/components/date-picker/years.js +2 -2
  114. package/components/dialog/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +6 -2
  115. package/components/dialog/dialog.css +5 -5
  116. package/components/dialog/dialog.d.ts +1 -1
  117. package/components/dialog/dialog.js +7 -7
  118. package/components/dropdown/anchor.d.ts +1 -1
  119. package/components/dropdown/dropdown.css +1 -1
  120. package/components/dropdown/dropdown.d.ts +2 -2
  121. package/components/dropdown/dropdown.js +2 -2
  122. package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
  123. package/components/dropdown-menu/dropdown-menu.js +1 -1
  124. package/components/editable-heading/editable-heading.css +6 -8
  125. package/components/editable-heading/editable-heading.d.ts +1 -1
  126. package/components/editable-heading/editable-heading.js +3 -2
  127. package/components/error-bubble/error-bubble-legacy.css +3 -3
  128. package/components/error-bubble/error-bubble.css +5 -5
  129. package/components/error-bubble/error-bubble.d.ts +1 -1
  130. package/components/error-bubble/error-bubble.figma.js +1 -1
  131. package/components/error-bubble/error-bubble.js +2 -2
  132. package/components/error-message/error-message.css +1 -1
  133. package/components/error-message/error-message.d.ts +2 -2
  134. package/components/error-message/error-message.js +2 -2
  135. package/components/error-page/error-page.css +3 -3
  136. package/components/footer/footer.css +2 -2
  137. package/components/footer/footer.d.ts +1 -1
  138. package/components/footer/footer.js +1 -1
  139. package/components/form/form.css +3 -3
  140. package/components/global/compose-refs.d.ts +2 -0
  141. package/components/global/compose-refs.js +14 -0
  142. package/components/global/composeRefs.d.ts +6 -2
  143. package/components/global/composeRefs.js +7 -14
  144. package/components/global/create-stateful-context.d.ts +1 -1
  145. package/components/global/dom.d.ts +1 -1
  146. package/components/global/dom.js +2 -4
  147. package/components/global/focus-sensor-hoc.d.ts +1 -1
  148. package/components/global/focus-sensor-hoc.js +2 -2
  149. package/components/global/fuzzy-highlight.d.ts +2 -2
  150. package/components/global/get-event-key.d.ts +1 -1
  151. package/components/global/global.css +2 -2
  152. package/components/global/memoize.js +1 -1
  153. package/components/global/rerender-hoc.d.ts +1 -1
  154. package/components/global/rerender-hoc.js +2 -2
  155. package/components/global/theme.d.ts +1 -1
  156. package/components/global/theme.js +2 -2
  157. package/components/global/url.js +3 -3
  158. package/components/global/use-event-callback.js +1 -1
  159. package/components/global/variables.css +1 -1
  160. package/components/grid/col.d.ts +1 -1
  161. package/components/grid/col.js +1 -1
  162. package/components/grid/grid.css +4 -4
  163. package/components/grid/grid.d.ts +1 -1
  164. package/components/grid/grid.js +1 -1
  165. package/components/grid/row.d.ts +1 -1
  166. package/components/grid/row.js +1 -1
  167. package/components/group/group.css +1 -1
  168. package/components/group/group.d.ts +1 -1
  169. package/components/group/group.js +1 -1
  170. package/components/header/header-icon.d.ts +2 -2
  171. package/components/header/header.css +4 -4
  172. package/components/header/header.d.ts +1 -1
  173. package/components/header/links.d.ts +1 -1
  174. package/components/header/logo.d.ts +1 -1
  175. package/components/header/profile.d.ts +5 -5
  176. package/components/header/profile.js +3 -3
  177. package/components/header/services-link.d.ts +1 -1
  178. package/components/header/services-link.js +3 -3
  179. package/components/header/services.css +1 -1
  180. package/components/header/services.d.ts +2 -2
  181. package/components/header/services.js +3 -3
  182. package/components/header/smart-profile.d.ts +3 -3
  183. package/components/header/smart-profile.js +2 -1
  184. package/components/header/smart-services.d.ts +3 -3
  185. package/components/header/tray.d.ts +1 -1
  186. package/components/heading/heading.css +2 -2
  187. package/components/heading/heading.d.ts +1 -1
  188. package/components/http/http.mock.d.ts +1 -1
  189. package/components/hub-source/{hub-source__user.d.ts → hub-source-user.d.ts} +3 -2
  190. package/components/hub-source/{hub-source__users-groups.d.ts → hub-source-users-groups.d.ts} +3 -2
  191. package/components/hub-source/hub-source.d.ts +2 -2
  192. package/components/icon/{icon__svg.d.ts → icon-svg.d.ts} +1 -1
  193. package/components/icon/icon.css +5 -5
  194. package/components/icon/icon.d.ts +2 -2
  195. package/components/icon/icon.js +3 -3
  196. package/components/input/input-legacy.css +2 -2
  197. package/components/input/input.css +5 -5
  198. package/components/input/input.d.ts +3 -3
  199. package/components/input/input.figma.js +1 -1
  200. package/components/input/input.js +8 -8
  201. package/components/input-size/input-size.css +1 -1
  202. package/components/island/adaptive-island-hoc.d.ts +1 -1
  203. package/components/island/content.d.ts +1 -1
  204. package/components/island/content.js +2 -2
  205. package/components/island/header.d.ts +1 -1
  206. package/components/island/header.js +4 -4
  207. package/components/island/island.css +3 -3
  208. package/components/island/island.d.ts +1 -1
  209. package/components/line/line.css +1 -1
  210. package/components/link/clickable-link.d.ts +12 -0
  211. package/components/link/clickable-link.js +25 -0
  212. package/components/link/clickableLink.d.ts +11 -12
  213. package/components/link/clickableLink.js +4 -25
  214. package/components/link/link.css +1 -1
  215. package/components/link/link.d.ts +2 -2
  216. package/components/link/link.js +4 -4
  217. package/components/list/consts.d.ts +4 -5
  218. package/components/list/{list__custom.d.ts → list-custom.d.ts} +1 -1
  219. package/components/list/{list__custom.js → list-custom.js} +1 -1
  220. package/components/list/{list__hint.d.ts → list-hint.d.ts} +1 -1
  221. package/components/list/{list__hint.js → list-hint.js} +1 -1
  222. package/components/list/{list__item.d.ts → list-item.d.ts} +2 -2
  223. package/components/list/{list__item.js → list-item.js} +6 -5
  224. package/components/list/{list__separator.d.ts → list-separator.d.ts} +1 -1
  225. package/components/list/{list__separator.js → list-separator.js} +1 -1
  226. package/components/list/{list__title.d.ts → list-title.d.ts} +1 -1
  227. package/components/list/{list__title.js → list-title.js} +1 -1
  228. package/components/list/{list__users-groups-source.d.ts → list-users-groups-source.d.ts} +3 -2
  229. package/components/list/{list__users-groups-source.js → list-users-groups-source.js} +1 -1
  230. package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
  231. package/components/list/list.css +5 -5
  232. package/components/list/list.d.ts +7 -7
  233. package/components/list/list.js +34 -28
  234. package/components/loader/{loader__core.js → loader-core.js} +2 -2
  235. package/components/loader/loader.css +1 -1
  236. package/components/loader/loader.d.ts +2 -2
  237. package/components/loader/loader.js +1 -1
  238. package/components/loader-inline/loader-inline.css +2 -2
  239. package/components/loader-inline/loader-inline.d.ts +1 -1
  240. package/components/loader-screen/loader-screen.css +2 -2
  241. package/components/loader-screen/loader-screen.d.ts +1 -1
  242. package/components/login-dialog/login-dialog.css +2 -2
  243. package/components/login-dialog/login-dialog.d.ts +1 -1
  244. package/components/login-dialog/login-dialog.js +1 -1
  245. package/components/login-dialog/service.d.ts +1 -1
  246. package/components/markdown/markdown.css +3 -3
  247. package/components/markdown/markdown.d.ts +1 -1
  248. package/components/markdown/markdown.js +1 -1
  249. package/components/message/message.css +3 -3
  250. package/components/message/message.d.ts +4 -4
  251. package/components/message/message.js +3 -3
  252. package/components/old-browsers-message/old-browsers-message.css +2 -2
  253. package/components/old-browsers-message/old-browsers-message.js +1 -1
  254. package/components/pager/pager.css +1 -1
  255. package/components/pager/pager.d.ts +2 -2
  256. package/components/pager/pager.js +11 -12
  257. package/components/panel/panel.css +1 -1
  258. package/components/panel/panel.d.ts +1 -1
  259. package/components/panel/panel.js +1 -1
  260. package/components/permissions/{permissions__cache.js → permissions-cache.js} +4 -5
  261. package/components/permissions/permissions.d.ts +2 -2
  262. package/components/permissions/permissions.js +2 -4
  263. package/components/popup/popup.css +3 -3
  264. package/components/popup/popup.d.ts +2 -2
  265. package/components/popup/popup.js +6 -5
  266. package/components/popup/popup.target.d.ts +1 -1
  267. package/components/popup/position-css.js +6 -10
  268. package/components/popup/position.js +10 -10
  269. package/components/popup-menu/popup-menu.d.ts +4 -4
  270. package/components/progress-bar/progress-bar.css +6 -8
  271. package/components/progress-bar/progress-bar.d.ts +1 -1
  272. package/components/progress-bar/progress-bar.js +1 -1
  273. package/components/query-assist/{query-assist__suggestions.d.ts → query-assist-suggestions.d.ts} +1 -1
  274. package/components/query-assist/query-assist.css +11 -11
  275. package/components/query-assist/query-assist.d.ts +4 -4
  276. package/components/query-assist/query-assist.js +11 -11
  277. package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
  278. package/components/radio/{radio__item.js → radio-item.js} +2 -2
  279. package/components/radio/radio.css +2 -2
  280. package/components/radio/radio.d.ts +2 -2
  281. package/components/radio/radio.js +1 -1
  282. package/components/scrollable-section/scrollable-section.d.ts +1 -1
  283. package/components/scrollable-section/scrollable-section.js +1 -1
  284. package/components/select/{select__filter.d.ts → select-filter.d.ts} +2 -2
  285. package/components/select/{select__filter.js → select-filter.js} +1 -1
  286. package/components/select/select-popup.css +5 -5
  287. package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
  288. package/components/select/{select__popup.js → select-popup.js} +11 -7
  289. package/components/select/select.css +10 -9
  290. package/components/select/select.d.ts +6 -6
  291. package/components/select/select.js +27 -25
  292. package/components/shortcuts/core.js +7 -7
  293. package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
  294. package/components/shortcuts/shortcuts.d.ts +1 -1
  295. package/components/sidebar/sidebar.css +1 -1
  296. package/components/slider/slider.css +2 -2
  297. package/components/slider/slider.d.ts +5 -5
  298. package/components/slider/slider.js +5 -5
  299. package/components/slider/slider.utils.d.ts +1 -1
  300. package/components/slider/slider.utils.js +2 -4
  301. package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
  302. package/components/storage/{storage__local.js → storage-local.js} +7 -7
  303. package/components/storage/storage.d.ts +1 -1
  304. package/components/storage/storage.js +1 -1
  305. package/components/tab-trap/tab-trap.css +1 -1
  306. package/components/tab-trap/tab-trap.d.ts +1 -1
  307. package/components/tab-trap/tab-trap.js +2 -5
  308. package/components/table/cell.d.ts +1 -1
  309. package/components/table/disable-hover-hoc.d.ts +1 -1
  310. package/components/table/header-cell.d.ts +1 -1
  311. package/components/table/header-cell.js +1 -1
  312. package/components/table/header.d.ts +2 -2
  313. package/components/table/header.js +2 -2
  314. package/components/table/multitable.d.ts +3 -3
  315. package/components/table/multitable.js +1 -1
  316. package/components/table/row-with-focus-sensor.d.ts +3 -3
  317. package/components/table/row.d.ts +4 -4
  318. package/components/table/row.js +1 -1
  319. package/components/table/selection-adapter.d.ts +2 -1
  320. package/components/table/selection-shortcuts-hoc.d.ts +4 -3
  321. package/components/table/selection-shortcuts-hoc.js +1 -3
  322. package/components/table/selection.js +4 -8
  323. package/components/table/simple-table.d.ts +2 -2
  324. package/components/table/smart-table.d.ts +2 -2
  325. package/components/table/table.css +6 -6
  326. package/components/table/table.d.ts +7 -7
  327. package/components/table/table.js +3 -3
  328. package/components/tabs/collapsible-more.d.ts +3 -3
  329. package/components/tabs/collapsible-more.js +2 -2
  330. package/components/tabs/collapsible-tab.d.ts +2 -2
  331. package/components/tabs/collapsible-tab.js +1 -1
  332. package/components/tabs/collapsible-tabs.d.ts +2 -2
  333. package/components/tabs/collapsible-tabs.js +6 -8
  334. package/components/tabs/custom-item.d.ts +2 -2
  335. package/components/tabs/dumb-tabs.d.ts +3 -3
  336. package/components/tabs/dumb-tabs.js +3 -3
  337. package/components/tabs/smart-tabs.d.ts +1 -1
  338. package/components/tabs/tab-link.d.ts +2 -2
  339. package/components/tabs/tab.d.ts +2 -2
  340. package/components/tabs/tabs.css +6 -6
  341. package/components/tag/tag.css +5 -5
  342. package/components/tag/tag.d.ts +2 -2
  343. package/components/tag/tag.js +2 -2
  344. package/components/tags-input/tags-input.css +3 -3
  345. package/components/tags-input/tags-input.d.ts +8 -8
  346. package/components/tags-input/tags-input.js +13 -7
  347. package/components/tags-list/tags-list.d.ts +2 -2
  348. package/components/tags-list/tags-list.js +1 -1
  349. package/components/text/text.css +1 -1
  350. package/components/text/text.d.ts +1 -1
  351. package/components/toggle/toggle.css +2 -2
  352. package/components/toggle/toggle.d.ts +1 -1
  353. package/components/toggle/toggle.js +1 -1
  354. package/components/tooltip/tooltip.css +1 -1
  355. package/components/tooltip/tooltip.d.ts +2 -2
  356. package/components/tooltip/tooltip.js +1 -1
  357. package/components/upload/upload.css +1 -1
  358. package/components/upload/upload.d.ts +3 -3
  359. package/components/upload/upload.js +2 -2
  360. package/components/user-agreement/service.d.ts +2 -2
  361. package/components/user-agreement/service.js +3 -5
  362. package/components/user-agreement/user-agreement.css +2 -2
  363. package/components/user-agreement/user-agreement.d.ts +1 -1
  364. package/components/user-agreement/user-agreement.js +1 -1
  365. package/components/user-card/card.d.ts +1 -1
  366. package/components/user-card/card.js +3 -2
  367. package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
  368. package/components/user-card/smart-user-card-tooltip.js +1 -1
  369. package/components/user-card/tooltip.d.ts +3 -3
  370. package/components/user-card/user-card.css +1 -1
  371. package/package.json +4 -1
  372. /package/components/button/{button__classes.js → button.classes.js} +0 -0
  373. /package/components/dialog/{dialog__body-scroll-preventer.d.ts → dialog-body-scroll-preventer.d.ts} +0 -0
  374. /package/components/global/{variables.d.ts → variables.interface.d.ts} +0 -0
  375. /package/components/global/{variables.js → variables.interface.js} +0 -0
  376. /package/components/hub-source/{hub-source__user.js → hub-source-user.js} +0 -0
  377. /package/components/hub-source/{hub-source__users-groups.js → hub-source-users-groups.js} +0 -0
  378. /package/components/icon/{icon__svg.js → icon-svg.js} +0 -0
  379. /package/components/icon/{icon__constants.d.ts → icon.constants.d.ts} +0 -0
  380. /package/components/icon/{icon__constants.js → icon.constants.js} +0 -0
  381. /package/components/list/{list__classes.js → list.classes.js} +0 -0
  382. /package/components/loader/{loader__core.d.ts → loader-core.d.ts} +0 -0
  383. /package/components/old-browsers-message/{old-browsers-message__stop.d.ts → old-browsers-message-stop.d.ts} +0 -0
  384. /package/components/old-browsers-message/{old-browsers-message__stop.js → old-browsers-message-stop.js} +0 -0
  385. /package/components/permissions/{permissions__cache.d.ts → permissions-cache.d.ts} +0 -0
  386. /package/components/query-assist/{query-assist__suggestions.js → query-assist-suggestions.js} +0 -0
@@ -50,7 +50,7 @@ export default class DatePicker extends PureComponent {
50
50
  onChange() { },
51
51
  applyTimeInput(date, timeString) {
52
52
  const [hours, minutes] = timeString?.split(':').map(Number) ?? [];
53
- return minutes != null ? set(date, { hours, minutes }) : date;
53
+ return minutes !== null && minutes !== undefined ? set(date, { hours, minutes }) : date;
54
54
  },
55
55
  parseDateInput(string) {
56
56
  if (!string) {
@@ -69,7 +69,9 @@ export default class DatePicker extends PureComponent {
69
69
  static contextType = I18nContext;
70
70
  handleChange = (change) => {
71
71
  const { onChange, withTime, applyTimeInput } = this.props;
72
- const adjustedChange = withTime && !(change instanceof Date) && change?.date != null ? applyTimeInput(change.date, change.time) : change;
72
+ const adjustedChange = withTime && !(change instanceof Date) && change?.date !== null && change?.date !== undefined
73
+ ? applyTimeInput(change.date, change.time)
74
+ : change;
73
75
  onChange(adjustedChange);
74
76
  };
75
77
  clear = () => {
@@ -84,6 +86,7 @@ export default class DatePicker extends PureComponent {
84
86
  this.popup = el;
85
87
  };
86
88
  closePopup = () => {
89
+ // eslint-disable-next-line no-underscore-dangle
87
90
  this.popup?._onCloseAttempt();
88
91
  };
89
92
  parse = memoize((date) => {
@@ -99,11 +102,12 @@ export default class DatePicker extends PureComponent {
99
102
  formatTime() {
100
103
  const { displayTimeFormat, locale } = this.props;
101
104
  const date = this.parse(this.props.date);
102
- if (date != null) {
105
+ if (date !== null && date !== undefined) {
103
106
  return displayTimeFormat(date, locale);
104
107
  }
105
108
  return null;
106
109
  }
110
+ // eslint-disable-next-line complexity
107
111
  getAnchorText = () => {
108
112
  const { range, datePlaceholder, dateTimePlaceholder, rangePlaceholder, withTime, displayFormat, displayMonthFormat, displayDayFormat, translations, locale, } = this.props;
109
113
  const { translate } = this.context;
@@ -114,37 +118,31 @@ export default class DatePicker extends PureComponent {
114
118
  if (!range && !withTime) {
115
119
  return date ? displayFormat(date, locale) : (datePlaceholder ?? translations?.setDate ?? translate('setDate'));
116
120
  }
117
- else if (!range && withTime) {
121
+ if (!range && withTime) {
118
122
  if (!date && !time) {
119
123
  return dateTimePlaceholder ?? translations?.setDateTime ?? translate('setDateTime');
120
124
  }
121
- else {
122
- return `${(date && displayFormat(date, locale)) || '—'}, ${time || '—'}`;
123
- }
125
+ return `${(date && displayFormat(date, locale)) || '—'}, ${time || '—'}`;
124
126
  }
125
- else if (from && to) {
127
+ if (from && to) {
126
128
  if (!isSameYear(from, to)) {
127
129
  return `${displayFormat(from, locale)} — ${displayFormat(to, locale)}`;
128
130
  }
129
- else if (!isSameMonth(from, to)) {
131
+ if (!isSameMonth(from, to)) {
130
132
  return `${displayMonthFormat(from, locale)} — ${displayFormat(to, locale)}`;
131
133
  }
132
- else if (!isSameDay(from, to)) {
134
+ if (!isSameDay(from, to)) {
133
135
  return `${displayDayFormat(from, locale)} — ${displayFormat(to, locale)}`;
134
136
  }
135
- else {
136
- return `${displayFormat(to, locale)}`;
137
- }
137
+ return `${displayFormat(to, locale)}`;
138
138
  }
139
- else if (from) {
139
+ if (from) {
140
140
  return `${displayFormat(from, locale)} —`;
141
141
  }
142
- else if (to) {
142
+ if (to) {
143
143
  return `— ${displayFormat(to, locale)}`;
144
144
  }
145
- else {
146
- return rangePlaceholder ?? translations?.setPeriod ?? translate('setPeriod');
147
- }
145
+ return rangePlaceholder ?? translations?.setPeriod ?? translate('setPeriod');
148
146
  };
149
147
  render() {
150
148
  const anchorContent = (_jsxs("div", { className: styles.anchorContent, children: [_jsx(Icon, { glyph: calendarIcon, className: styles.calendarIcon }), this.getAnchorText(), _jsx(Icon, { glyph: chevronDownIcon, className: styles.chevronDownIcon })] }));
@@ -152,7 +150,7 @@ export default class DatePicker extends PureComponent {
152
150
  const classes = classNames(styles.datePicker, className, styles[`size${this.props.size}`], {
153
151
  [styles.inline]: inline,
154
152
  });
155
- return (_jsx(Dropdown, { className: classes, disabled: this.props.disabled, "data-test": "ring-date-picker", anchor: inline ? (_jsx(Link, { "data-test-ring-dropdown-anchor": true, className: styles.anchor, disabled: this.props.disabled ?? false, pseudo: true, children: this.getAnchorText() })) : (_jsx(Button, { "data-test-ring-dropdown-anchor": true, className: styles.anchor, inline: false, disabled: this.props.disabled ?? false, ...this.props.buttonAttributes, children: anchorContent })), ...dropdownProps, children: _jsx(PopupComponent, { className: popupClassName, popupRef: this.popupRef, onClear: clear ? this.clear : null, datePopupProps: {
153
+ return (_jsx(Dropdown, { className: classes, disabled: this.props.disabled, "data-test": 'ring-date-picker', anchor: inline ? (_jsx(Link, { "data-test-ring-dropdown-anchor": true, className: styles.anchor, disabled: this.props.disabled ?? false, pseudo: true, children: this.getAnchorText() })) : (_jsx(Button, { "data-test-ring-dropdown-anchor": true, className: styles.anchor, inline: false, disabled: this.props.disabled ?? false, ...this.props.buttonAttributes, children: anchorContent })), ...dropdownProps, children: _jsx(PopupComponent, { className: popupClassName, popupRef: this.popupRef, onClear: clear ? this.clear : null, datePopupProps: {
156
154
  ...datePopupProps,
157
155
  translations,
158
156
  onChange: this.handleChange,
@@ -1,6 +1,6 @@
1
1
  import { Component } from 'react';
2
2
  import * as React from 'react';
3
- import { DatePickerChange, DatePopupBaseProps, DateSpecificPopupProps, DatePopupState, RangeSpecificPopupProps, TimeSpecificPopupProps, Field } from './consts';
3
+ import { type DatePickerChange, type DatePopupBaseProps, type DateSpecificPopupProps, type DatePopupState, type RangeSpecificPopupProps, type TimeSpecificPopupProps, type Field } from './consts';
4
4
  export type DatePopupProps = DatePopupBaseProps & (DateSpecificPopupProps | TimeSpecificPopupProps | RangeSpecificPopupProps);
5
5
  export default class DatePopup extends Component<DatePopupProps, DatePopupState> {
6
6
  static sameDay(next: Date | number | null, prev: Date | number | null): boolean;
@@ -1,5 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
2
  import { createElement as _createElement } from "react";
3
+ /* eslint-disable max-lines */
3
4
  import { Component } from 'react';
4
5
  import * as React from 'react';
5
6
  import { isAfter } from 'date-fns/isAfter';
@@ -244,6 +245,7 @@ export default class DatePopup extends Component {
244
245
  this.props.onClear?.(e);
245
246
  this.componentRef.current?.querySelector('input')?.focus();
246
247
  };
248
+ // eslint-disable-next-line complexity
247
249
  render() {
248
250
  const { range, withTime, locale } = this.props;
249
251
  const { from, to, date, time, ...restProps } = this.props;
@@ -258,7 +260,7 @@ export default class DatePopup extends Component {
258
260
  };
259
261
  }, {});
260
262
  const activeDate = this.state.active !== 'time'
261
- ? this.state.hoverDate || (this.state.text != null ? this.parse(this.state.text, 'date') : null)
263
+ ? this.state.hoverDate || (this.state.text ? this.parse(this.state.text, 'date') : null)
262
264
  : this.state.hoverDate || null;
263
265
  const currentRange = (range && dates.from && dates.to && [dates.from, dates.to]) || null;
264
266
  let activeRange = null;
@@ -298,12 +300,12 @@ export default class DatePopup extends Component {
298
300
  onScrollChange: this.scrollTo,
299
301
  };
300
302
  const clearable = Boolean(this.props.onClear);
301
- return (_jsxs("div", { className: styles.datePopup, "data-test": "ring-date-popup", ref: this.componentRef, children: [_jsxs("div", { className: styles.filterWrapper, children: [names.map(name => {
303
+ return (_jsxs("div", { className: styles.datePopup, "data-test": 'ring-date-popup', ref: this.componentRef, children: [_jsxs("div", { className: styles.filterWrapper, children: [names.map(name => {
302
304
  let onClear;
303
305
  if (clearable && name !== 'from' && !this.isInTimeMode()) {
304
306
  onClear = this.onClear.bind(this);
305
307
  }
306
- return (_createElement(DateInput, { ...this.props, ...this.state, divider: name === 'from' && (dates[name] != null || parsedTo != null), name: name, key: name, date: dates[name], active: this.state.active === name, onActivate: this.handleActivate(name), onInput: this.handleInput, onConfirm: this.handleConfirm(name), onClear: onClear, locale: locale }));
308
+ return (_createElement(DateInput, { ...this.props, ...this.state, divider: name === 'from' && (!!dates[name] || !!parsedTo), name: name, key: name, date: dates[name], active: this.state.active === name, onActivate: this.handleActivate(name), onInput: this.handleInput, onConfirm: this.handleConfirm(name), onClear: onClear, locale: locale }));
307
309
  }), this.isInTimeMode() ? (_createElement(DateInput, { ...this.props, text: this.state.text, divider: !!parsedDate, hoverDate: null, name: 'time', key: 'time', date: null, time: time, active: this.state.active === 'time', onActivate: this.handleActivate('time'), onInput: this.handleInput, onConfirm: this.handleConfirm('time'), onClear: (clearable && this.onClear) || undefined, locale: locale })) : ('')] }), _jsx(Weekdays, { locale: locale }), _jsxs("div", { className: styles.calendar, children: [_jsx(Months, { ...calendarProps, onHover: this.hoverHandler, onSelect: this.selectHandler, locale: locale }), _jsx(Years, { ...calendarProps })] }), this.props.renderAfterCalendar && this.props.renderAfterCalendar(this.state)] }));
308
310
  }
309
311
  }
@@ -1,5 +1,5 @@
1
1
  import { Component } from 'react';
2
- import { MonthsProps } from './consts';
2
+ import { type MonthsProps } from './consts';
3
3
  export interface DayProps extends MonthsProps {
4
4
  day: Date;
5
5
  empty: boolean;
@@ -11,7 +11,7 @@ export default class Day extends Component<DayProps> {
11
11
  isDay: (date: Date) => boolean;
12
12
  is: (name: "date" | "from" | "to" | "activeDate") => boolean;
13
13
  inRange: (range: [Date, Date] | null) => boolean | null;
14
- isDisabled: (date: Date) => boolean;
14
+ isDisabled: (date: Date) => boolean | null;
15
15
  parse(text: string | null | undefined): Date | null;
16
16
  render(): import("react/jsx-runtime").JSX.Element;
17
17
  }
@@ -28,7 +28,7 @@ export default class Day extends Component {
28
28
  isDay = (date) => isSameDay(this.props.day, date);
29
29
  is = (name) => {
30
30
  const value = this.props[name];
31
- return value != null && this.isDay(value);
31
+ return !!value && this.isDay(value);
32
32
  };
33
33
  inRange = (range) => range &&
34
34
  isAfter(startOfDay(this.props.day), startOfDay(range[0])) &&
@@ -36,8 +36,7 @@ export default class Day extends Component {
36
36
  isDisabled = (date) => {
37
37
  const min = this.parse(this.props.minDate);
38
38
  const max = this.parse(this.props.maxDate);
39
- return ((min != null && isBefore(startOfDay(date), startOfDay(min))) ||
40
- (max != null && isAfter(startOfDay(date), startOfDay(max))));
39
+ return (min && isBefore(startOfDay(date), startOfDay(min))) || (max && isAfter(startOfDay(date), startOfDay(max)));
41
40
  };
42
41
  parse(text) {
43
42
  return this.props.parseDateInput(text);
@@ -50,11 +49,11 @@ export default class Day extends Component {
50
49
  return range && [range[0], addDays(range[1], 1)];
51
50
  }
52
51
  const spreadRange = makeSpreadRange(currentRange);
53
- const disabled = this.isDisabled(day);
52
+ const disabled = !!this.isDisabled(day);
54
53
  const activeSpreadRange = makeSpreadRange(activeRange);
55
54
  return (
56
55
  // TODO make keyboard navigation actually work
57
- _jsx("button", { type: "button", className: classNames(styles.day, styles[`Day${dayInWeek}`], {
56
+ _jsx("button", { type: 'button', className: classNames(styles.day, styles[`Day${dayInWeek}`], {
58
57
  [styles.current]: ['date', 'from', 'to'].some(this.is),
59
58
  [styles.active]: !disabled && this.is('activeDate'),
60
59
  [styles.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-lines */
1
2
  export default [
2
3
  'd M',
3
4
  'dd M',
@@ -1,2 +1,2 @@
1
- import { MonthsProps } from './consts';
1
+ import { type MonthsProps } from './consts';
2
2
  export default function MonthNames(props: MonthsProps): import("react/jsx-runtime").JSX.Element;
@@ -18,7 +18,7 @@ class MonthName extends PureComponent {
18
18
  };
19
19
  render() {
20
20
  const { month, locale } = this.props;
21
- return (_jsx("button", { type: "button", className: classNames(styles.monthName, {
21
+ return (_jsx("button", { type: 'button', className: classNames(styles.monthName, {
22
22
  [styles.today]: isThisMonth(month),
23
23
  }), onClick: this.handleClick, children: format(month, 'LLL', { locale }) }));
24
24
  }
@@ -1,6 +1,6 @@
1
1
  import { PureComponent } from 'react';
2
- import { LinearFunction } from '../global/linear-function';
3
- import { MonthsProps } from './consts';
2
+ import { type LinearFunction } from '../global/linear-function';
3
+ import { type MonthsProps } from './consts';
4
4
  export interface MonthSliderProps extends MonthsProps {
5
5
  pxToDate: LinearFunction;
6
6
  }
@@ -39,7 +39,7 @@ export default class MonthSlider extends PureComponent {
39
39
  years.push(year);
40
40
  }
41
41
  const classes = classNames(styles.monthSlider, { [styles.dragging]: this.state.dragging });
42
- return (_jsx("div", { children: years.map(date => (_jsx("button", { type: "button", className: classes, style: {
42
+ return (_jsx("div", { children: years.map(date => (_jsx("button", { type: 'button', className: classes, style: {
43
43
  top: Math.floor(this.props.pxToDate.x(Number(date)) - units.cellSize),
44
44
  }, onMouseDown: this.onMouseDown }, +date))) }));
45
45
  }
@@ -1,4 +1,4 @@
1
- import { MonthsProps } from './consts';
1
+ import { type MonthsProps } from './consts';
2
2
  export interface MonthProps extends MonthsProps {
3
3
  month: Date;
4
4
  }
@@ -1,2 +1,2 @@
1
- import { MonthsProps } from './consts';
1
+ import { type MonthsProps } from './consts';
2
2
  export default function Months(props: MonthsProps): import("react/jsx-runtime").JSX.Element;
@@ -74,11 +74,11 @@ export default function Months(props) {
74
74
  });
75
75
  useEffect(() => {
76
76
  const current = componentRef.current;
77
- if (current !== null) {
77
+ if (current) {
78
78
  current.addEventListener('wheel', handleWheel, { passive: false });
79
79
  }
80
80
  return () => {
81
- if (current !== null) {
81
+ if (current) {
82
82
  current.removeEventListener('wheel', handleWheel);
83
83
  }
84
84
  };
@@ -1,5 +1,5 @@
1
1
  import { PureComponent } from 'react';
2
- import { CalendarProps } from './consts';
2
+ import { type CalendarProps } from './consts';
3
3
  interface YearsState {
4
4
  scrollDate: Date | null;
5
5
  }
@@ -24,7 +24,7 @@ export default class Years extends PureComponent {
24
24
  }
25
25
  }
26
26
  componentDidUpdate(prevProps, prevState) {
27
- this.stoppedScrolling = prevState.scrollDate != null && !this.state.scrollDate;
27
+ this.stoppedScrolling = !!prevState.scrollDate && !this.state.scrollDate;
28
28
  }
29
29
  componentWillUnmount() {
30
30
  if (this.componentRef.current) {
@@ -68,7 +68,7 @@ export default class Years extends PureComponent {
68
68
  return (_jsx("div", { className: styles.years, ref: this.componentRef, style: {
69
69
  transition: this.stoppedScrolling ? 'top .2s ease-out 0s' : 'none',
70
70
  top: Math.floor(calHeight * HALF - pxToDate.x(Number(date))),
71
- }, children: years.map(item => (_jsx("button", { type: "button", className: classNames(styles.year, {
71
+ }, children: years.map(item => (_jsx("button", { type: 'button', className: classNames(styles.year, {
72
72
  [styles.currentYear]: isSameYear(item, date),
73
73
  [styles.today]: isThisYear(item),
74
74
  }), onClick: function handleClick() {
@@ -16,7 +16,11 @@ const prevent = (key) => {
16
16
  const scrollWidth = scrollbarWidth();
17
17
  const { scrollbarGutter } = getComputedStyle(document.documentElement);
18
18
  const documentHasScrollbarGutter = scrollbarGutter === 'stable' || scrollbarGutter === 'both-edges';
19
- if (documentHasScroll && scrollWidth != null && scrollWidth > 0 && !documentHasScrollbarGutter) {
19
+ if (documentHasScroll &&
20
+ scrollWidth !== null &&
21
+ scrollWidth !== undefined &&
22
+ scrollWidth > 0 &&
23
+ !documentHasScrollbarGutter) {
20
24
  previousDocumentWidth = document.documentElement.style.width;
21
25
  document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
22
26
  }
@@ -30,7 +34,7 @@ const reset = (key) => {
30
34
  return;
31
35
  }
32
36
  document.documentElement.classList.remove(styles.documentWithoutScroll);
33
- if (previousDocumentWidth !== null) {
37
+ if (previousDocumentWidth !== null && previousDocumentWidth !== undefined) {
34
38
  document.documentElement.style.width = previousDocumentWidth;
35
39
  previousDocumentWidth = null;
36
40
  }
@@ -1,7 +1,7 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
- @value header, scrollableWrapper from "../island/island.css";
4
- @value panel from "../panel/panel.css";
3
+ @value header, scrollableWrapper from '../island/island.css';
4
+ @value panel from '../panel/panel.css';
5
5
 
6
6
  .container {
7
7
  position: fixed;
@@ -24,7 +24,7 @@
24
24
 
25
25
  padding: 0;
26
26
 
27
- border: none;
27
+ border: 0;
28
28
  background: transparent;
29
29
  }
30
30
 
@@ -58,7 +58,7 @@
58
58
  margin-top: 0;
59
59
  padding: calc(var(--ring-unit) * 2) calc(var(--ring-unit) * 4) calc(var(--ring-unit) * 4);
60
60
 
61
- border-top: none;
61
+ border-top: 0;
62
62
 
63
63
  background-color: transparent;
64
64
  }
@@ -1,6 +1,6 @@
1
1
  import { PureComponent } from 'react';
2
2
  import * as React from 'react';
3
- import TabTrap, { TabTrapProps } from '../tab-trap/tab-trap';
3
+ import TabTrap, { type TabTrapProps } from '../tab-trap/tab-trap';
4
4
  import type { ShortcutsScopeOptions } from '../shortcuts/core';
5
5
  export interface DialogProps extends Partial<TabTrapProps> {
6
6
  show: boolean;
@@ -11,7 +11,7 @@ import TabTrap from '../tab-trap/tab-trap';
11
11
  import Button from '../button/button';
12
12
  import { PopupTarget, PopupTargetContext } from '../popup/popup.target';
13
13
  import { getPopupContainer } from '../popup/popup';
14
- import { preventerFactory as scrollPreventerFactory } from './dialog__body-scroll-preventer';
14
+ import { preventerFactory as scrollPreventerFactory } from './dialog-body-scroll-preventer';
15
15
  import styles from './dialog.css';
16
16
  /**
17
17
  * @name Dialog
@@ -58,7 +58,7 @@ export default class Dialog extends PureComponent {
58
58
  uid = getUID('dialog-');
59
59
  toggleNativeDialog() {
60
60
  const { show, modal } = this.props;
61
- if (this.nativeDialog.current != null) {
61
+ if (this.nativeDialog.current) {
62
62
  if (show) {
63
63
  this.nativeDialog.current.removeAttribute('open');
64
64
  if (modal) {
@@ -114,9 +114,9 @@ export default class Dialog extends PureComponent {
114
114
  const shortcutsMap = this.getShortcutsMap();
115
115
  const content = (_jsxs(_Fragment, { children: [_jsx(Shortcuts, { map: shortcutsMap, scope: this.state.shortcutsScope, options: this.props.shortcutOptions }), (onOverlayClick !== noop || onCloseAttempt !== noop) && (_jsx("div", {
116
116
  // click handler is duplicated in close button
117
- role: "presentation", className: styles.clickableOverlay, onClick: this.handleClick, "data-test": "ring-dialog-overlay" })), _jsx("div", { className: styles.innerContainer, children: _jsxs(AdaptiveIsland, { className: classNames(styles.content, contentClassName, {
117
+ role: 'presentation', className: styles.clickableOverlay, onClick: this.handleClick, "data-test": 'ring-dialog-overlay' })), _jsx("div", { className: styles.innerContainer, children: _jsxs(AdaptiveIsland, { className: classNames(styles.content, contentClassName, {
118
118
  [styles.dense]: dense,
119
- }), "data-test": "ring-dialog", role: "dialog", "aria-label": label, children: [children, showCloseButton && (_jsx(Button, { icon: closeIcon, "data-test": "ring-dialog-close-button", className: classNames(styles.closeButton, {
119
+ }), "data-test": 'ring-dialog', role: 'dialog', "aria-label": label, children: [children, showCloseButton && (_jsx(Button, { icon: closeIcon, "data-test": 'ring-dialog-close-button', className: classNames(styles.closeButton, {
120
120
  [styles.closeButtonOutside]: !closeButtonInside,
121
121
  [styles.closeButtonInside]: closeButtonInside,
122
122
  }), iconClassName: classNames(styles.closeIcon, {
@@ -131,13 +131,13 @@ export default class Dialog extends PureComponent {
131
131
  if (portalTarget instanceof HTMLElement) {
132
132
  targetElement = portalTarget;
133
133
  }
134
- else if (contextTarget != null) {
134
+ else if (contextTarget) {
135
135
  const container = getPopupContainer(contextTarget);
136
- if (container != null) {
136
+ if (container) {
137
137
  targetElement = container;
138
138
  }
139
139
  }
140
- return createPortal(_jsx(PopupTarget, { id: this.uid, className: styles.popupTarget, children: target => (_jsxs(TabTrap, { trapDisabled: !trapFocus, "data-test": dataTests('ring-dialog-container', dataTest), "data-rg-modal-dialog-container": "", ref: this.dialogRef, className: classes, role: "presentation", ...restProps, children: [content, target] })) }), targetElement);
140
+ return createPortal(_jsx(PopupTarget, { id: this.uid, className: styles.popupTarget, children: target => (_jsxs(TabTrap, { trapDisabled: !trapFocus, "data-test": dataTests('ring-dialog-container', dataTest), "data-rg-modal-dialog-container": '', ref: this.dialogRef, className: classes, role: 'presentation', ...restProps, children: [content, target] })) }), targetElement);
141
141
  } })));
142
142
  }
143
143
  }
@@ -1,3 +1,3 @@
1
- import { ButtonAttrs } from '../button/button';
1
+ import { type ButtonAttrs } from '../button/button';
2
2
  declare const _default: import("react").MemoExoticComponent<({ children, className, ...restProps }: ButtonAttrs) => import("react/jsx-runtime").JSX.Element>;
3
3
  export default _default;
@@ -1,4 +1,4 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
3
  .dropdown {
4
4
  display: inline-block;
@@ -1,6 +1,6 @@
1
- import { Component, HTMLAttributes, ReactNode, ReactElement } from 'react';
1
+ import { Component, type HTMLAttributes, type ReactNode, type ReactElement } from 'react';
2
2
  import * as React from 'react';
3
- import { PopupAttrs } from '../popup/popup';
3
+ import { type PopupAttrs } from '../popup/popup';
4
4
  import Anchor from './anchor';
5
5
  export interface AnchorProps {
6
6
  active: boolean;
@@ -99,7 +99,7 @@ export default class Dropdown extends Component {
99
99
  const { show, pinned } = this.state;
100
100
  const { initShown, onShow, onHide, hoverShowTimeOut, hoverHideTimeOut, children, anchor, className, activeClassName, hoverMode, clickMode, 'data-test': dataTest, disabled, ...restProps } = this.props;
101
101
  const classes = classNames(styles.dropdown, className, {
102
- [activeClassName ?? '']: activeClassName != null && show,
102
+ [activeClassName ?? '']: activeClassName && show,
103
103
  });
104
104
  let anchorElement;
105
105
  const active = hoverMode ? pinned : show;
@@ -127,7 +127,7 @@ export default class Dropdown extends Component {
127
127
  };
128
128
  return (_jsxs("div", { "data-test": dataTests('ring-dropdown', dataTest), ...restProps, onClick: clickMode ? this.onClick : undefined,
129
129
  // anchorElement should be a `button` or an `a`
130
- role: "presentation", onMouseEnter: hoverMode ? this.onMouseEnter : undefined, onMouseLeave: hoverMode ? this.onMouseLeave : undefined, className: classes, children: [anchorElement, typeof children === 'function'
130
+ role: 'presentation', onMouseEnter: hoverMode ? this.onMouseEnter : undefined, onMouseLeave: hoverMode ? this.onMouseLeave : undefined, className: classes, children: [anchorElement, typeof children === 'function'
131
131
  ? children(childProps)
132
132
  : cloneElement(children, childProps)] }));
133
133
  }
@@ -1,8 +1,8 @@
1
- import { ReactElement, HTMLAttributes, SyntheticEvent, Ref, ReactNode } from 'react';
2
- import { SelectHandlerParams } from '../list/list';
3
- import { AnchorProps, DropdownAttrs, DropdownChildrenFunction } from '../dropdown/dropdown';
4
- import PopupMenu, { PopupMenuAttrs } from '../popup-menu/popup-menu';
5
- import { ListDataItem } from '../list/consts';
1
+ import { type ReactElement, type HTMLAttributes, type SyntheticEvent, type Ref, type ReactNode } from 'react';
2
+ import { type SelectHandlerParams } from '../list/list';
3
+ import { type AnchorProps, type DropdownAttrs, type DropdownChildrenFunction } from '../dropdown/dropdown';
4
+ import PopupMenu, { type PopupMenuAttrs } from '../popup-menu/popup-menu';
5
+ import { type ListDataItem } from '../list/consts';
6
6
  export interface DropdownAnchorWrapperProps extends AnchorProps {
7
7
  anchor: ReactElement | ReactNode[] | string | ((props: AnchorProps, ariaProps: HTMLAttributes<HTMLElement>) => ReactElement | null);
8
8
  activeListItemId?: string | null | undefined;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { forwardRef, useMemo, cloneElement } from 'react';
2
+ import { forwardRef, useMemo, cloneElement, } from 'react';
3
3
  import List, { ActiveItemContext } from '../list/list';
4
4
  import Dropdown from '../dropdown/dropdown';
5
5
  import PopupMenu from '../popup-menu/popup-menu';
@@ -26,7 +26,7 @@
26
26
 
27
27
  color: inherit;
28
28
 
29
- border: none;
29
+ border: 0;
30
30
  border-radius: var(--ring-border-radius);
31
31
  outline: none;
32
32
  background: inherit;
@@ -95,7 +95,7 @@
95
95
  color: var(--ring-heading-color);
96
96
  caret-color: var(--ring-main-color);
97
97
 
98
- border: none;
98
+ border: 0;
99
99
  border-bottom: 1px solid var(--ring-borders-color);
100
100
  outline: none;
101
101
  background-color: transparent;
@@ -143,14 +143,12 @@
143
143
  width: 100%;
144
144
  height: 30px;
145
145
 
146
- content: "";
146
+ content: '';
147
147
  pointer-events: none;
148
148
 
149
- background: linear-gradient(
150
- to bottom,
151
- rgba(var(--ring-content-background-components), 0),
152
- rgba(var(--ring-content-background-components), 1)
153
- );
149
+ background: linear-gradient(to bottom,
150
+ rgba(var(--ring-content-background-components), 0),
151
+ rgba(var(--ring-content-background-components), 1));
154
152
  }
155
153
 
156
154
  .textareaWrapper {
@@ -1,4 +1,4 @@
1
- import { InputHTMLAttributes } from 'react';
1
+ import { type InputHTMLAttributes } from 'react';
2
2
  import * as React from 'react';
3
3
  import { Levels } from '../heading/heading';
4
4
  import { Size } from '../input/input';
@@ -12,6 +12,7 @@ import styles from './editable-heading.css';
12
12
  export { Levels };
13
13
  export { Size };
14
14
  function noop() { }
15
+ // eslint-disable-next-line complexity
15
16
  export const EditableHeading = (props) => {
16
17
  const { level = Levels.H1, className, headingClassName, inputClassName, children, isEditing = false, isSavingPossible = false, isSaving = false, embedded = false, size = Size.L, onEdit = noop, onSave = noop, onCancel = noop, autoFocus = true, 'data-test': dataTest, error, disabled, multiline = false, renderMenu = () => null, onFocus, onBlur, onChange, onScroll, maxInputRows, translations = {
17
18
  save: 'Save',
@@ -57,7 +58,7 @@ export const EditableHeading = (props) => {
57
58
  el.style.height = `${el.scrollHeight - parseFloat(paddingTop) - parseFloat(paddingBottom)}px`;
58
59
  }, []);
59
60
  const checkValue = useCallback((el) => {
60
- if (multiline && el != null && el.scrollHeight >= el.clientHeight) {
61
+ if (multiline && el && el.scrollHeight >= el.clientHeight) {
61
62
  stretch(el);
62
63
  }
63
64
  }, [stretch, multiline]);
@@ -111,6 +112,6 @@ export const EditableHeading = (props) => {
111
112
  window.removeEventListener('mouseup', onMouseUp);
112
113
  };
113
114
  }, [onMouseMove, onMouseUp]);
114
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classes, children: [!disabled && isEditing ? (_jsxs(_Fragment, { children: [_jsx(Shortcuts, { map: shortcutsMap, scope: shortcutsScope, disabled: isShortcutsDisabled }), !multiline ? (_jsx("input", { className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur })) : (_jsxs("div", { className: classNames(styles.textareaWrapper, inputStyles[`size${size}`]), children: [_jsx("textarea", { ref: textAreaRef, className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onInputChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur, onScroll: onInputScroll, style: { maxHeight: maxInputRows ? `${maxInputRows}lh` : '' } }), !isScrolledToBottom && _jsx("div", { className: styles.textareaFade })] }))] })) : (_jsx("button", { type: "button", className: styles.headingWrapperButton, onMouseDown: onHeadingMouseDown, children: _jsx(Heading, { className: headingClasses, level: level, "data-test": dataTest, children: children }) })), !isEditing && renderMenu(), isEditing && !embedded && (_jsxs(_Fragment, { children: [_jsx(Button, { className: styles.button, primary: true, disabled: isSaveDisabled, loader: isSaving, onClick: onSave, children: translations.save }), _jsx(Button, { className: styles.button, disabled: isCancelDisabled, onClick: onCancel, children: translations.cancel })] }))] }), isEditing && error && _jsx("div", { className: classNames(styles.errorText, inputStyles[`size${size}`]), children: error })] }));
115
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classes, children: [!disabled && isEditing ? (_jsxs(_Fragment, { children: [_jsx(Shortcuts, { map: shortcutsMap, scope: shortcutsScope, disabled: isShortcutsDisabled }), !multiline ? (_jsx("input", { className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur })) : (_jsxs("div", { className: classNames(styles.textareaWrapper, inputStyles[`size${size}`]), children: [_jsx("textarea", { ref: textAreaRef, className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onInputChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur, onScroll: onInputScroll, style: { maxHeight: maxInputRows ? `${maxInputRows}lh` : '' } }), !isScrolledToBottom && _jsx("div", { className: styles.textareaFade })] }))] })) : (_jsx("button", { type: 'button', className: styles.headingWrapperButton, onMouseDown: onHeadingMouseDown, children: _jsx(Heading, { className: headingClasses, level: level, "data-test": dataTest, children: children }) })), !isEditing && renderMenu(), isEditing && !embedded && (_jsxs(_Fragment, { children: [_jsx(Button, { className: styles.button, primary: true, disabled: isSaveDisabled, loader: isSaving, onClick: onSave, children: translations.save }), _jsx(Button, { className: styles.button, disabled: isCancelDisabled, onClick: onCancel, children: translations.cancel })] }))] }), isEditing && error && _jsx("div", { className: classNames(styles.errorText, inputStyles[`size${size}`]), children: error })] }));
115
116
  };
116
117
  export default React.memo(EditableHeading);
@@ -44,12 +44,12 @@
44
44
  width: var(--ring-unit);
45
45
  height: var(--ring-unit);
46
46
 
47
- content: "";
47
+ content: '';
48
48
  transform: rotate(45deg);
49
49
 
50
50
  border: 1px solid var(--ring-popup-border-color);
51
- border-top: none;
52
- border-right: none;
51
+ border-top: 0;
52
+ border-right: 0;
53
53
 
54
54
  background: var(--ring-error-bubble-background-color);
55
55
  }
@@ -1,4 +1,4 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
3
  :root,
4
4
  :host {
@@ -14,7 +14,7 @@
14
14
 
15
15
  margin-left: 2px;
16
16
 
17
- border: none;
17
+ border: 0;
18
18
 
19
19
  box-shadow: none;
20
20
  }
@@ -52,11 +52,11 @@
52
52
  width: var(--ring-unit);
53
53
  height: var(--ring-unit);
54
54
 
55
- content: "";
55
+ content: '';
56
56
  transform: rotate(45deg);
57
57
 
58
58
  border: 1px solid var(--ring-popup-border-color);
59
- border-top: none;
60
- border-right: none;
59
+ border-top: 0;
60
+ border-right: 0;
61
61
  background: var(--ring-error-bubble-background-color);
62
62
  }
@@ -1,4 +1,4 @@
1
- import { PureComponent, ReactElement } from 'react';
1
+ import { PureComponent, type ReactElement } from 'react';
2
2
  export type ErrorBubbleProps<P> = Partial<P> & {
3
3
  className?: string | null | undefined;
4
4
  children?: ReactElement<P> | ReactElement<P>[];
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=1228-2869
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
  const error = instance.findLayers(() => true)[0].textContent;
@@ -11,7 +11,7 @@ export default class ErrorBubble extends PureComponent {
11
11
  render() {
12
12
  const { children, className, ...restProps } = this.props;
13
13
  const errorBubbleClasses = classNames(styles.errorBubble, className);
14
- return (_jsxs("div", { className: styles.errorBubbleWrapper, "data-test": "ring-error-bubble-wrapper", children: [children &&
15
- Children.map(children, (child) => cloneElement(child, { ...child.props, ...restProps })), restProps.error && (_jsx(Popup, { trapFocus: false, className: styles.errorBubblePopup, hidden: false, attached: false, directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP], children: _jsx("div", { className: errorBubbleClasses, "data-test": "ring-error-bubble", children: restProps.error }) }))] }));
14
+ return (_jsxs("div", { className: styles.errorBubbleWrapper, "data-test": 'ring-error-bubble-wrapper', children: [children &&
15
+ Children.map(children, (child) => cloneElement(child, { ...child.props, ...restProps })), restProps.error && (_jsx(Popup, { trapFocus: false, className: styles.errorBubblePopup, hidden: false, attached: false, directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP], children: _jsx("div", { className: errorBubbleClasses, "data-test": 'ring-error-bubble', children: restProps.error }) }))] }));
16
16
  }
17
17
  }