@jetbrains/ring-ui 7.0.62 → 7.0.64

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 +10 -8
  342. package/components/tag/tag.d.ts +5 -3
  343. package/components/tag/tag.js +5 -3
  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
@@ -162,17 +162,13 @@ function extractLetters(name) {
162
162
  if (names.length >= 2) {
163
163
  return names[0][0].toUpperCase() + names[1][0].toUpperCase();
164
164
  }
165
- else if (names.length === 1) {
165
+ if (names.length === 1) {
166
166
  if (names[0].length >= 2) {
167
167
  return names[0].slice(0, 2).join('').toUpperCase();
168
168
  }
169
- else {
170
- return `${names[0][0].toUpperCase()}X`;
171
- }
172
- }
173
- else {
174
- return 'XX';
169
+ return `${names[0][0].toUpperCase()}X`;
175
170
  }
171
+ return 'XX';
176
172
  }
177
173
  // https://gist.github.com/hyamamoto/fd435505d29ebfa3d9716fd2be8d42f0#gistcomment-2775538
178
174
  const BASE = 32;
@@ -190,5 +186,5 @@ export default function FallbackAvatar({ username, size, round }) {
190
186
  const underscore = sizes.underscore;
191
187
  const radius = round ? '50%' : sizes.radius;
192
188
  const gradientId = useMemo(() => getUID('gradient-'), []);
193
- return (_jsxs("svg", { viewBox: `0 0 ${size} ${size}`, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("defs", { children: _jsxs("linearGradient", { id: gradientId, x1: "1", y1: "1", x2: "0", y2: "0", children: [_jsx("stop", { stopColor: fromColor, offset: "0" }), _jsx("stop", { stopColor: toColor, offset: "0.8" })] }) }), _jsxs("g", { children: [_jsx("rect", { fill: `url(#${gradientId})`, x: "0", y: "0", width: size, height: size, rx: radius, ry: radius }), _jsx("text", { x: sizes.text.x, y: sizes.text.y, fontFamily: "var(--ring-font-family, 'Arial, Helvetica, sans-serif')", fontSize: sizes.fontSize, fontWeight: "600", letterSpacing: sizes.letterSpacing, fill: "#FFFFFF", dominantBaseline: sizes.dominantBaseline, textAnchor: sizes.textAnchor, cursor: "default", children: _jsx("tspan", { children: extractLetters(username) }) }), underscore && (_jsx("rect", { fill: "#FFFFFF", x: underscore.x, y: underscore.y, width: underscore.width, height: underscore.height })), _jsx("title", { children: username })] })] }));
189
+ return (_jsxs("svg", { viewBox: `0 0 ${size} ${size}`, xmlns: 'http://www.w3.org/2000/svg', children: [_jsx("defs", { children: _jsxs("linearGradient", { id: gradientId, x1: '1', y1: '1', x2: '0', y2: '0', children: [_jsx("stop", { stopColor: fromColor, offset: '0' }), _jsx("stop", { stopColor: toColor, offset: '0.8' })] }) }), _jsxs("g", { children: [_jsx("rect", { fill: `url(#${gradientId})`, x: '0', y: '0', width: size, height: size, rx: radius, ry: radius }), _jsx("text", { x: sizes.text.x, y: sizes.text.y, fontFamily: "var(--ring-font-family, 'Arial, Helvetica, sans-serif')", fontSize: sizes.fontSize, fontWeight: '600', letterSpacing: sizes.letterSpacing, fill: '#FFFFFF', dominantBaseline: sizes.dominantBaseline, textAnchor: sizes.textAnchor, cursor: 'default', children: _jsx("tspan", { children: extractLetters(username) }) }), underscore && (_jsx("rect", { fill: '#FFFFFF', x: underscore.x, y: underscore.y, width: underscore.width, height: underscore.height })), _jsx("title", { children: username })] })] }));
194
190
  }
@@ -71,7 +71,7 @@
71
71
  }
72
72
 
73
73
  .extraButton {
74
- composes: resetButton from "../global/global.css";
74
+ composes: resetButton from '../global/global.css';
75
75
 
76
76
  cursor: pointer;
77
77
 
@@ -1,6 +1,6 @@
1
- import { HTMLAttributes } from 'react';
2
- import { ListDataItem } from '../list/consts';
3
- import { DropdownMenuProps } from '../dropdown-menu/dropdown-menu';
1
+ import { type HTMLAttributes } from 'react';
2
+ import { type ListDataItem } from '../list/consts';
3
+ import { type DropdownMenuProps } from '../dropdown-menu/dropdown-menu';
4
4
  import { Size } from '../avatar/avatar';
5
5
  declare module 'csstype' {
6
6
  interface Properties {
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-752
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
  const sizeString = instance.getString('Size');
@@ -14,5 +14,5 @@ export default function AvatarStack({ children, className, size = Size.Size20, e
14
14
  height: size,
15
15
  '--ring-avatar-stack-index': Children.count(children),
16
16
  fontSize: fontSizes[size],
17
- }, anchor: _jsx("button", { type: "button", className: styles.extraButton, children: _jsx(Avatar, { size: size, info: _jsx("span", { className: styles.extraText, children: `+${extraItems.length}` }) }) }), data: extraItems, menuProps: { offset: 4, ...dropdownMenuProps?.menuProps }, ...dropdownMenuProps })) : null] }));
17
+ }, anchor: (_jsx("button", { type: 'button', className: styles.extraButton, children: _jsx(Avatar, { size: size, info: _jsx("span", { className: styles.extraText, children: `+${extraItems.length}` }) }) })), data: extraItems, menuProps: { offset: 4, ...dropdownMenuProps?.menuProps }, ...dropdownMenuProps })) : null] }));
18
18
  }
@@ -13,8 +13,8 @@
13
13
  gap: var(--ring-unit);
14
14
 
15
15
  &.inline {
16
- border-right: none;
17
- border-left: none;
16
+ border-right: 0;
17
+ border-left: 0;
18
18
  border-radius: 0;
19
19
  }
20
20
 
@@ -33,6 +33,6 @@ export function Banner(props) {
33
33
  [styles.warning]: mode === 'warning',
34
34
  [styles.purple]: mode === 'purple',
35
35
  [styles.grey]: mode === 'grey',
36
- }, className), "data-test": dataTest, children: [withIcon && _jsx(Icon, { glyph: icon, className: styles.icon }), _jsxs("div", { children: [title && _jsx("div", { className: styles.title, children: title }), _jsx("div", { className: styles.description, children: children })] }), onClose && (_jsx(Tooltip, { title: closeButtonTitle ?? translations.close, className: styles.closeButtonWrapper, children: _jsx(Link, { className: styles.closeButton, pseudo: true, onClick: onClose, "aria-label": "Close", children: _jsx(Icon, { glyph: closeIcon }) }) }))] }));
36
+ }, className), "data-test": dataTest, children: [withIcon && _jsx(Icon, { glyph: icon, className: styles.icon }), _jsxs("div", { children: [title && _jsx("div", { className: styles.title, children: title }), _jsx("div", { className: styles.description, children: children })] }), onClose && (_jsx(Tooltip, { title: closeButtonTitle ?? translations.close, className: styles.closeButtonWrapper, children: _jsx(Link, { className: styles.closeButton, pseudo: true, onClick: onClose, "aria-label": 'Close', children: _jsx(Icon, { glyph: closeIcon }) }) }))] }));
37
37
  }
38
38
  export default React.memo(Banner);
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { type ReactNode } from 'react';
2
2
  export interface BreadcrumbsSeparatorAttrs {
3
3
  separatorClassName?: string | null | undefined;
4
4
  children?: ReactNode;
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=460%3A2730
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
 
@@ -1,2 +1,2 @@
1
- import { ButtonProps } from './button';
1
+ import { type ButtonProps } from './button';
2
2
  export declare function getButtonClasses({ className, active, disabled, loader, primary, success, error, secondary, ghost, short, inline, danger, delayed, icon, iconRight, height, children, }: ButtonProps): string;
@@ -1,6 +1,6 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
- @value glyph from "../icon/icon.css";
3
+ @value glyph from '../icon/icon.css';
4
4
 
5
5
  :root,
6
6
  :host {
@@ -11,6 +11,8 @@
11
11
  --ring-button-loader-components: var(--ring-main-components);
12
12
  --ring-button-white-text-disabled-color: var(--ring-white-text-color);
13
13
  --ring-button-icon-line-height: calc(var(--ring-unit) * 2);
14
+
15
+
14
16
  }
15
17
 
16
18
  :global(.ring-ui-theme-dark) {
@@ -25,6 +27,9 @@
25
27
  --ring-button-line-height: var(--ring-line-height-lowest);
26
28
  }
27
29
 
30
+
31
+
32
+
28
33
  .heightM {
29
34
  --ring-button-height: calc(var(--ring-unit) * 3.5);
30
35
  --ring-button-padding-block: calc(var(--ring-unit) * 0.5);
@@ -282,7 +287,7 @@
282
287
 
283
288
  &.inline {
284
289
  &:hover {
285
- --ring-button-background-color: var(--ring-tag-background-color);
290
+ --ring-button-background-color: var(--ring-tag-background-color);
286
291
  }
287
292
 
288
293
  &:active {
@@ -374,15 +379,13 @@
374
379
  width: calc(100% + var(--ring-button-loader-width));
375
380
  height: 100%;
376
381
 
377
- content: "";
382
+ content: '';
378
383
  animation: progress 1s linear infinite;
379
384
 
380
- background-image: linear-gradient(
381
- to right,
382
- transparent,
383
- rgba(var(--ring-button-loader-components), 0.4) 40%,
384
- transparent 80%
385
- );
385
+ background-image: linear-gradient(to right,
386
+ transparent,
387
+ rgba(var(--ring-button-loader-components), 0.4) 40%,
388
+ transparent 80%);
386
389
 
387
390
  background-repeat: repeat;
388
391
  background-size: var(--ring-button-loader-width);
@@ -390,16 +393,16 @@
390
393
  }
391
394
 
392
395
  .flat .loaderBackground {
393
- top: 0;
394
- right: 0;
395
- bottom: 0;
396
- left: 0;
396
+ top: 0;
397
+ right: 0;
398
+ bottom: 0;
399
+ left: 0;
397
400
 
398
- border-radius: var(--ring-border-radius);
401
+ border-radius: var(--ring-border-radius);
399
402
  }
400
403
 
401
404
  .delayed::after {
402
- content: "";
405
+ content: '';
403
406
  }
404
407
 
405
408
  .short {
@@ -1,8 +1,8 @@
1
- import { PureComponent, ButtonHTMLAttributes } from 'react';
1
+ import { PureComponent, type ButtonHTMLAttributes } from 'react';
2
2
  import * as React from 'react';
3
- import { IconProps, IconType, Size } from '../icon/icon';
4
- import { ClickableLinkProps } from '../link/clickableLink';
5
- import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
3
+ import { type IconProps, type IconType, Size } from '../icon/icon';
4
+ import { type ClickableLinkProps } from '../link/clickable-link';
5
+ import { type ControlsHeight, ControlsHeightContext } from '../global/controls-height';
6
6
  export interface ButtonBaseProps {
7
7
  height?: ControlsHeight | undefined;
8
8
  active?: boolean | null | undefined;
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=9954-528
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
 
@@ -5,10 +5,10 @@ import chevronDown from '@jetbrains/icons/chevron-down';
5
5
  import chevron12pxDown from '@jetbrains/icons/chevron-12px-down';
6
6
  import deprecate from 'util-deprecate';
7
7
  import Icon, { Size } from '../icon/icon';
8
- import ClickableLink from '../link/clickableLink';
8
+ import ClickableLink from '../link/clickable-link';
9
9
  import { ControlsHeightContext } from '../global/controls-height';
10
10
  import styles from './button.css';
11
- import { getButtonClasses } from './button__classes';
11
+ import { getButtonClasses } from './button.classes';
12
12
  const warnText = deprecate(() => { }, 'Button: "text" prop is deprecated and will be removed in 8.0. Use inline instead.');
13
13
  function removeLinkProps(props) {
14
14
  const { download, href, hrefLang, media, ping, target, type, referrerPolicy, onConditionalClick, onPlainLeftClick, activeClassName, ...restProps } = props;
@@ -33,8 +33,8 @@ export class Button extends PureComponent {
33
33
  active, danger, delayed, loader, primary, success, error, secondary, ghost, short, text, dropdown, height,
34
34
  // Props
35
35
  icon, iconRight, iconSize, iconClassName, iconRightClassName, iconSuppressSizeWarning, className, children, inline, disabled, ...props } = this.props;
36
- const isInline = inline ?? text ?? icon != null;
37
- if (text != null) {
36
+ const isInline = inline ?? text ?? !!icon;
37
+ if (text) {
38
38
  warnText();
39
39
  }
40
40
  const classes = getButtonClasses({
@@ -45,11 +45,11 @@ export class Button extends PureComponent {
45
45
  const content = (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { className: classNames(styles.icon, iconClassName), glyph: icon, size: iconSize, suppressSizeWarning: iconSuppressSizeWarning })), children, iconRight && _jsx(Icon, { className: classNames(styles.iconRight, iconRightClassName), glyph: iconRight }), dropdown && _jsx(Icon, { glyph: isInline ? chevron12pxDown : chevronDown, className: styles.dropdownIcon })] }));
46
46
  const isDisabled = disabled || loader || undefined;
47
47
  const commonProps = {
48
- ...(props.href != null && isDisabled ? removeLinkProps(props) : props),
48
+ ...(props.href !== undefined && isDisabled ? removeLinkProps(props) : props),
49
49
  className: classes,
50
50
  children: (_jsxs(_Fragment, { children: [loader && !isInline && _jsx("div", { className: styles.loaderBackground }), content] })),
51
51
  };
52
- return commonProps.href != null ? (_jsx(ClickableLink, { ...commonProps })) : (_jsx("button", { ref: this.buttonRef, type: "button", disabled: isDisabled, ...commonProps }));
52
+ return 'href' in this.props && this.props.href !== undefined ? (_jsx(ClickableLink, { ...commonProps })) : (_jsx("button", { ref: this.buttonRef, type: 'button', disabled: isDisabled, ...commonProps }));
53
53
  }
54
54
  }
55
55
  export { Size as IconSize };
@@ -1,6 +1,6 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
- @value button, active, flat from "../button/button.css";
3
+ @value button, active, flat from '../button/button.css';
4
4
 
5
5
  :root,
6
6
  :host {
@@ -24,7 +24,7 @@
24
24
  --ring-button-group-button-border-color: var(--ring-borders-color);
25
25
 
26
26
  composes: common;
27
- composes: buttonGroup from "../button-toolbar/button-toolbar.css";
27
+ composes: buttonGroup from '../button-toolbar/button-toolbar.css';
28
28
 
29
29
  border-radius: var(--ring-border-radius);
30
30
 
@@ -58,7 +58,7 @@
58
58
 
59
59
  width: var(--ring-border-radius);
60
60
 
61
- content: "";
61
+ content: '';
62
62
 
63
63
  box-shadow:
64
64
  0 1px var(--ring-button-group-button-border-color) inset,
@@ -148,7 +148,7 @@
148
148
 
149
149
  .split {
150
150
  composes: common;
151
- composes: buttonGroup from "../button-toolbar/button-toolbar.css";
151
+ composes: buttonGroup from '../button-toolbar/button-toolbar.css';
152
152
  }
153
153
 
154
154
  .common button,
@@ -162,7 +162,7 @@
162
162
  }
163
163
 
164
164
  .caption {
165
- composes: font from "../global/global.css";
165
+ composes: font from '../global/global.css';
166
166
 
167
167
  margin-right: var(--ring-unit);
168
168
 
@@ -1,4 +1,4 @@
1
- import { PureComponent, HTMLAttributes, ReactNode } from 'react';
1
+ import { PureComponent, type HTMLAttributes, type ReactNode } from 'react';
2
2
  import Caption from './caption';
3
3
  export interface ButtonGroupProps extends HTMLAttributes<HTMLElement> {
4
4
  split?: boolean | null | undefined;
@@ -13,7 +13,7 @@ export default class ButtonGroup extends PureComponent {
13
13
  render() {
14
14
  const { className, split, 'data-test': dataTest, label, help, ...restProps } = this.props;
15
15
  const classes = classNames(split ? styles.split : styles.buttonGroup, className, {
16
- [styles.disabled]: Children.toArray(this.props.children).every(child => child != null &&
16
+ [styles.disabled]: Children.toArray(this.props.children).every(child => !!child &&
17
17
  typeof child === 'object' &&
18
18
  'props' in child &&
19
19
  child.props.disabled),
@@ -1,4 +1,4 @@
1
- import { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, type HTMLAttributes } from 'react';
2
2
  export default class Caption extends PureComponent<HTMLAttributes<HTMLElement>> {
3
3
  render(): import("react/jsx-runtime").JSX.Element;
4
4
  }
@@ -1,6 +1,6 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
- @value button from "../button/button.css";
3
+ @value button from '../button/button.css';
4
4
 
5
5
  .buttonSet {
6
6
  position: relative;
@@ -1,4 +1,4 @@
1
- import { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, type HTMLAttributes } from 'react';
2
2
  export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
3
3
  'data-test'?: string | null | undefined;
4
4
  }
@@ -1,6 +1,6 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
- @value button from "../button/button.css";
3
+ @value button from '../button/button.css';
4
4
 
5
5
  .buttonToolbar {
6
6
  display: inline-block;
@@ -1,4 +1,4 @@
1
- import { PureComponent, HTMLAttributes } from 'react';
1
+ import { PureComponent, type HTMLAttributes } from 'react';
2
2
  export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
3
3
  'data-test'?: string | null | undefined;
4
4
  }
@@ -38,9 +38,10 @@ export default class Caret {
38
38
  * @return {number}
39
39
  */
40
40
  getAbsolutePosition(node) {
41
+ // eslint-disable-next-line no-underscore-dangle
41
42
  let _curNode = node;
42
43
  let curPos = 0;
43
- while (_curNode != null && _curNode !== this.target) {
44
+ while (_curNode && _curNode !== this.target) {
44
45
  while (_curNode.previousSibling) {
45
46
  curPos += _curNode.previousSibling.textContent?.length ?? 0;
46
47
  _curNode = _curNode.previousSibling;
@@ -68,14 +69,17 @@ export default class Caret {
68
69
  const range2 = range1.cloneRange();
69
70
  range2.selectNodeContents(this.target);
70
71
  range2.setEnd(range1.endContainer, range1.endOffset);
72
+ // eslint-disable-next-line no-underscore-dangle
71
73
  const _curNode = range1.startContainer;
72
74
  if (this.target === _curNode) {
73
- return range1.startOffset === 0 || _curNode.textContent == null ? 0 : _curNode.textContent.length;
75
+ return range1.startOffset === 0 || _curNode.textContent === null || _curNode.textContent === undefined
76
+ ? 0
77
+ : _curNode.textContent.length;
74
78
  }
75
- else if (!this.target.contains(_curNode)) {
79
+ if (!this.target.contains(_curNode)) {
76
80
  return -1;
77
81
  }
78
- else if (!_curNode) {
82
+ if (!_curNode) {
79
83
  return ('selectionStart' in this.target && this.target.selectionStart) || -1;
80
84
  }
81
85
  const curPos = this.getAbsolutePosition(_curNode);
@@ -83,20 +87,16 @@ export default class Caret {
83
87
  if (range1.startOffset === range1.endOffset) {
84
88
  return curPos + range1.startOffset;
85
89
  }
86
- else {
87
- return {
88
- startOffset: curPos + range1.startOffset,
89
- endOffset: curPos + range1.endOffset,
90
- position: range2.toString().length,
91
- };
92
- }
93
- }
94
- else {
95
- const startOffset = curPos + range1.startOffset;
96
- const endPos = this.getAbsolutePosition(range1.endContainer);
97
- const endOffset = endPos + range1.endOffset;
98
- return { startOffset, endOffset, position: range2.toString().length };
90
+ return {
91
+ startOffset: curPos + range1.startOffset,
92
+ endOffset: curPos + range1.endOffset,
93
+ position: range2.toString().length,
94
+ };
99
95
  }
96
+ const startOffset = curPos + range1.startOffset;
97
+ const endPos = this.getAbsolutePosition(range1.endContainer);
98
+ const endOffset = endPos + range1.endOffset;
99
+ return { startOffset, endOffset, position: range2.toString().length };
100
100
  }
101
101
  return ('selectionStart' in this.target && this.target.selectionStart) || -1;
102
102
  }
@@ -108,6 +108,7 @@ export default class Caret {
108
108
  */
109
109
  getRelativePosition(curNode, position) {
110
110
  let curPos = 0;
111
+ // eslint-disable-next-line no-underscore-dangle
111
112
  let _curNode = curNode;
112
113
  const nodeTypeText = 3;
113
114
  if (!_curNode) {
@@ -117,6 +118,7 @@ export default class Caret {
117
118
  while (_curNode.nodeType !== nodeTypeText) {
118
119
  _curNode = _curNode.childNodes[0];
119
120
  }
121
+ // eslint-disable-next-line no-underscore-dangle
120
122
  const _correctedPosition = position;
121
123
  return { _curNode, _correctedPosition };
122
124
  }
@@ -124,7 +126,7 @@ export default class Caret {
124
126
  if (_curNode && _curNode.nodeType !== undefined) {
125
127
  while (curPos < position && _curNode.nodeType !== nodeTypeText) {
126
128
  i++;
127
- if (_curNode.childNodes[i] != null) {
129
+ if (_curNode.childNodes[i]) {
128
130
  curPos += _curNode.childNodes[i].textContent?.length ?? 0;
129
131
  if (curPos >= position) {
130
132
  _curNode = _curNode.childNodes[i];
@@ -137,6 +139,7 @@ export default class Caret {
137
139
  }
138
140
  }
139
141
  }
142
+ // eslint-disable-next-line no-underscore-dangle
140
143
  const _correctedPosition = position - curPos;
141
144
  return { _curNode, _correctedPosition };
142
145
  }
@@ -153,8 +156,10 @@ export default class Caret {
153
156
  if (typeof position === 'object') {
154
157
  const range = new Range();
155
158
  const start = this.getRelativePosition(curNode, position.startOffset);
159
+ // eslint-disable-next-line no-underscore-dangle
156
160
  range.setStart(start._curNode, start._correctedPosition);
157
161
  const end = this.getRelativePosition(curNode, position.endOffset);
162
+ // eslint-disable-next-line no-underscore-dangle
158
163
  range.setEnd(end._curNode, end._correctedPosition);
159
164
  correctedPosition = range;
160
165
  }
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=226-2666
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
  const labelType = instance.getString('Label');
@@ -1,4 +1,4 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
3
  :root,
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import { PureComponent, InputHTMLAttributes, CSSProperties, Ref, ReactNode } from 'react';
1
+ import { PureComponent, type InputHTMLAttributes, type CSSProperties, type Ref, type ReactNode } from 'react';
2
2
  export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
3
3
  label?: string | null | undefined;
4
4
  containerClassName?: string | null | undefined;
@@ -1,5 +1,5 @@
1
1
  // url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=224%3A1943
2
- const figma = require('figma');
2
+ import figma from '@figma/code-connect';
3
3
 
4
4
  const instance = figma.selectedInstance;
5
5
  const selected = instance.getString('Selected');
@@ -4,7 +4,7 @@ import classNames from 'classnames';
4
4
  import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
5
5
  import minusIcon from '@jetbrains/icons/remove-12px';
6
6
  import Icon from '../icon/icon';
7
- import { createComposedRef } from '../global/composeRefs';
7
+ import { createComposedRef } from '../global/compose-refs';
8
8
  import ControlHelp from '../control-help/control-help';
9
9
  import styles from './checkbox.css';
10
10
  /**
@@ -18,19 +18,19 @@ export default class Checkbox extends PureComponent {
18
18
  indeterminate: false,
19
19
  };
20
20
  componentDidMount() {
21
- if (this.input != null) {
21
+ if (this.input) {
22
22
  this.input.indeterminate = this.props.indeterminate;
23
23
  }
24
24
  }
25
25
  componentDidUpdate(prevProps) {
26
26
  const { indeterminate } = this.props;
27
- if (this.input != null && indeterminate !== prevProps.indeterminate) {
27
+ if (this.input && indeterminate !== prevProps.indeterminate) {
28
28
  this.input.indeterminate = this.props.indeterminate;
29
29
  }
30
30
  }
31
31
  input;
32
32
  inputRef = (el) => {
33
- if (el != null) {
33
+ if (el) {
34
34
  el.indeterminate = this.props.indeterminate;
35
35
  }
36
36
  this.input = el;
@@ -42,6 +42,6 @@ export default class Checkbox extends PureComponent {
42
42
  const containerClasses = classNames(styles.checkbox, containerClassName);
43
43
  const cellClasses = classNames(styles.cell, cellClassName);
44
44
  const labelClasses = classNames(styles.label, labelClassName);
45
- return (_jsxs("label", { className: containerClasses, style: containerStyle, "data-test": "ring-checkbox", children: [_jsx("input", { ...restProps, "data-checked": restProps.checked, ref: this.composedInputRef(this.inputRef, inputRef), type: "checkbox", className: classes }), _jsx("div", { className: styles.cellWrapper, children: _jsxs("span", { className: cellClasses, children: [_jsx(Icon, { glyph: checkmarkIcon, className: styles.check }), _jsx(Icon, { glyph: minusIcon, className: styles.minus })] }) }), _jsxs("span", { className: labelClasses, children: [label || children, help && _jsx(ControlHelp, { children: help })] })] }));
45
+ return (_jsxs("label", { className: containerClasses, style: containerStyle, "data-test": 'ring-checkbox', children: [_jsx("input", { ...restProps, "data-checked": restProps.checked, ref: this.composedInputRef(this.inputRef, inputRef), type: 'checkbox', className: classes }), _jsx("div", { className: styles.cellWrapper, children: _jsxs("span", { className: cellClasses, children: [_jsx(Icon, { glyph: checkmarkIcon, className: styles.check }), _jsx(Icon, { glyph: minusIcon, className: styles.minus })] }) }), _jsxs("span", { className: labelClasses, children: [label || children, help && _jsx(ControlHelp, { children: help })] })] }));
46
46
  }
47
47
  }
@@ -35,7 +35,7 @@ async function copy(text, successMessage, errorMessage, delay = ALERT_DELAY, isH
35
35
  }
36
36
  }
37
37
  const clipboard = {
38
- copyText: async (text, successMessage, errorMessage, delay = ALERT_DELAY) => await copy(text, successMessage, errorMessage, delay),
39
- copyHTML: async (html, successMessage, errorMessage, delay = ALERT_DELAY) => await copy(html, successMessage, errorMessage, delay, true),
38
+ copyText: (text, successMessage, errorMessage, delay = ALERT_DELAY) => copy(text, successMessage, errorMessage, delay),
39
+ copyHTML: (html, successMessage, errorMessage, delay = ALERT_DELAY) => copy(html, successMessage, errorMessage, delay, true),
40
40
  };
41
41
  export default clipboard;
@@ -1,4 +1,4 @@
1
- @import "../global/variables.css";
1
+ @import '../global/variables.css';
2
2
 
3
3
  .code {
4
4
  margin: calc(var(--ring-unit) * 2) 0;
@@ -1,4 +1,4 @@
1
- import { PureComponent, Ref } from 'react';
1
+ import { PureComponent, type Ref } from 'react';
2
2
  import highlight from 'highlight.js/lib/core';
3
3
  declare function noop(): void;
4
4
  export interface CodeProps {
@@ -32,12 +32,14 @@ export default class Code extends PureComponent {
32
32
  code;
33
33
  async highlight() {
34
34
  const codeRef = this.codeRef;
35
- if (codeRef == null) {
35
+ if (!codeRef) {
36
36
  return;
37
37
  }
38
38
  const { language, inline, replacer } = this.props;
39
39
  if (!inline) {
40
- if (language != null && highlight.getLanguage(language) == null) {
40
+ if (language !== null &&
41
+ language !== undefined &&
42
+ (highlight.getLanguage(language) === null || highlight.getLanguage(language) === undefined)) {
41
43
  await registerLanguage(language);
42
44
  }
43
45
  // @ts-expect-error https://github.com/highlightjs/highlight.js/issues/2945
@@ -69,7 +71,7 @@ export default class Code extends PureComponent {
69
71
  [styles.inline]: inline,
70
72
  [styles.softWrap]: softWrap,
71
73
  });
72
- return (_jsx(Tag, { className: classes, "data-test": "ring-code", children: _jsx("code", {
74
+ return (_jsx(Tag, { className: classes, "data-test": 'ring-code', children: _jsx("code", {
73
75
  // should be focusable because it can be scrollable
74
76
  tabIndex: inline ? -1 : 0, ref: this.initCodeRef, className: highlightStyles.highlightContainer, children: normalizeIndent(code) }) }));
75
77
  }
@@ -1,9 +1,9 @@
1
- import React, { PropsWithChildren } from 'react';
2
- type Props = {
1
+ import React, { type PropsWithChildren } from 'react';
2
+ interface Props {
3
3
  minHeight?: number;
4
4
  className?: string;
5
5
  'data-test'?: string | null | undefined;
6
- };
6
+ }
7
7
  /**
8
8
  * @name CollapseContent
9
9
  */
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  type ChildrenFunction = (collapsed: boolean) => React.ReactElement<any>;
3
- type Props = {
3
+ interface Props {
4
4
  children: ChildrenFunction | React.ReactElement<any>;
5
5
  'data-test'?: string | null | undefined;
6
- };
6
+ }
7
7
  /**
8
8
  * @name CollapseControl
9
9
  */
@@ -20,7 +20,7 @@
20
20
  .trigger {
21
21
  cursor: pointer;
22
22
 
23
- border: none;
23
+ border: 0;
24
24
  outline: none;
25
25
  background: transparent;
26
26
  }