@jetbrains/ring-ui 5.0.0-beta.3 → 5.0.0-beta.7

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 (323) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/babel.config.js +1 -12
  3. package/components/alert/alert.css +3 -14
  4. package/components/alert/alert.d.ts +3 -0
  5. package/components/alert/alert.js +8 -7
  6. package/components/alert/container.css +0 -2
  7. package/components/alert-service/alert-service.examples.css +5 -3
  8. package/components/auth/auth__core.d.ts +3 -1
  9. package/components/auth/auth__core.js +42 -15
  10. package/components/auth/down-notification.css +1 -1
  11. package/components/auth-dialog/auth-dialog.d.ts +11 -0
  12. package/components/auth-dialog/auth-dialog.js +33 -2
  13. package/components/autofocus-ng/autofocus-ng.js +1 -1
  14. package/components/autofocus-ng/autofocus-ng.test.js +1 -1
  15. package/components/button/button.css +93 -204
  16. package/components/button/button.d.ts +7 -8
  17. package/components/button/button.js +6 -8
  18. package/components/button/button__classes.d.ts +1 -1
  19. package/components/button/button__classes.js +4 -7
  20. package/components/button-group/button-group.css +136 -19
  21. package/components/button-group/button-group.d.ts +4 -1
  22. package/components/button-group/button-group.js +3 -3
  23. package/components/button-group-ng/button-group-ng.css +1 -0
  24. package/components/button-group-ng/button-group-ng.examples.js +1 -1
  25. package/components/button-ng/button-ng.examples.js +6 -7
  26. package/components/button-ng/button-ng.js +6 -25
  27. package/components/button-set/button-set.css +1 -0
  28. package/components/button-toolbar/button-toolbar.css +2 -0
  29. package/components/checkbox/checkbox.css +10 -4
  30. package/components/date-picker/date-input.js +2 -1
  31. package/components/date-picker/date-picker.css +2 -1
  32. package/components/dialog/dialog.css +10 -3
  33. package/components/dialog-ng/dialog-ng__template.js +1 -0
  34. package/components/error-bubble/error-bubble-legacy.css +1 -1
  35. package/components/error-bubble/error-bubble.css +1 -1
  36. package/components/global/controls-height.d.ts +7 -0
  37. package/components/global/controls-height.js +8 -0
  38. package/components/global/theme.d.ts +7 -20
  39. package/components/global/theme.js +26 -32
  40. package/components/global/variables.css +30 -25
  41. package/components/global/variables.d.ts +10 -8
  42. package/components/global/variables_dark.css +68 -0
  43. package/components/header/header.css +19 -10
  44. package/components/header/header.d.ts +7 -69
  45. package/components/header/header.js +10 -9
  46. package/components/header/services.css +3 -3
  47. package/components/header/services.d.ts +5 -0
  48. package/components/header/services.js +8 -2
  49. package/components/header/tray-icon.d.ts +18 -575
  50. package/components/heading/heading.css +4 -1
  51. package/components/icon/icon.css +1 -1
  52. package/components/input/input.css +81 -151
  53. package/components/input/input.d.ts +13 -17
  54. package/components/input/input.js +28 -32
  55. package/components/input-ng/input-ng.examples.js +1 -1
  56. package/components/input-ng/input-ng.js +45 -49
  57. package/components/island/adaptive-island-hoc.d.ts +2 -2
  58. package/components/island/adaptive-island-hoc.js +2 -2
  59. package/components/island/content.js +2 -7
  60. package/components/island/header.js +7 -4
  61. package/components/island/island.css +8 -5
  62. package/components/island/island.d.ts +2 -2
  63. package/components/island-legacy/island-legacy.css +1 -1
  64. package/components/list/list.d.ts +1 -1
  65. package/components/loader-inline/loader-inline.css +14 -0
  66. package/components/loader-inline/loader-inline.d.ts +4 -41
  67. package/components/loader-inline/loader-inline.js +3 -11
  68. package/components/loader-inline-ng/loader-inline-ng.js +1 -17
  69. package/components/loader-inline-ng/loader-inline-ng.test.js +0 -11
  70. package/components/markdown/code.d.ts +6 -13
  71. package/components/markdown/code.js +2 -2
  72. package/components/markdown/heading.d.ts +5 -9
  73. package/components/markdown/heading.js +2 -2
  74. package/components/markdown/link.d.ts +4 -8
  75. package/components/markdown/link.js +1 -1
  76. package/components/markdown/markdown.d.ts +2 -3
  77. package/components/markdown/markdown.js +14 -11
  78. package/components/message/message.css +7 -3
  79. package/components/message/message.d.ts +3 -0
  80. package/components/message/message.js +16 -9
  81. package/components/pager/pager.js +2 -8
  82. package/components/popup/popup.css +1 -1
  83. package/components/popup/popup.target.d.ts +1 -0
  84. package/components/progress-bar/progress-bar.css +8 -12
  85. package/components/progress-bar/progress-bar.d.ts +0 -4
  86. package/components/progress-bar/progress-bar.js +1 -6
  87. package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -2
  88. package/components/query-assist/query-assist.css +48 -64
  89. package/components/query-assist/query-assist.d.ts +0 -5
  90. package/components/query-assist/query-assist.js +4 -10
  91. package/components/radio/radio.css +10 -4
  92. package/components/select/select.css +19 -37
  93. package/components/select/select.d.ts +4 -6
  94. package/components/select/select.js +17 -30
  95. package/components/select/select__filter.js +2 -1
  96. package/components/select/select__popup.js +1 -2
  97. package/components/select-ng/select-ng.examples.js +1 -0
  98. package/components/select-ng/select-ng.js +3 -1
  99. package/components/select-ng/select-ng.test.js +1 -1
  100. package/components/select-ng/select-ng__lazy.js +1 -2
  101. package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
  102. package/components/shortcuts-hint-ng/shortcuts-hint-ng.examples.js +1 -1
  103. package/components/tabs/collapsible-tab.js +2 -2
  104. package/components/tabs/dumb-tabs.d.ts +4 -107
  105. package/components/tabs/dumb-tabs.js +5 -9
  106. package/components/tabs/tab.d.ts +2 -0
  107. package/components/tabs/tabs.css +8 -28
  108. package/components/tabs-ng/tabs-ng.examples.js +11 -3
  109. package/components/tabs-ng/tabs-ng.js +1 -4
  110. package/components/tabs-ng/tabs-ng__template.js +1 -1
  111. package/components/tag/tag.css +31 -8
  112. package/components/tag/tag.d.ts +1 -0
  113. package/components/tag/tag.js +1 -0
  114. package/components/tags-input/tags-input.css +10 -4
  115. package/components/toggle/toggle.css +61 -35
  116. package/components/toggle/toggle.d.ts +9 -89
  117. package/components/toggle/toggle.js +7 -7
  118. package/components/tooltip/tooltip.css +7 -0
  119. package/components/tooltip/tooltip.d.ts +1 -0
  120. package/components/tooltip/tooltip.js +3 -2
  121. package/components/user-agreement/service.d.ts +2 -2
  122. package/components/user-agreement/user-agreement.js +1 -1
  123. package/dist/_helpers/anchor.js +3 -3
  124. package/dist/_helpers/badge.js +1 -1
  125. package/dist/_helpers/button-group.js +1 -1
  126. package/dist/_helpers/button-set.js +1 -1
  127. package/dist/_helpers/button-toolbar.js +1 -1
  128. package/dist/_helpers/button__classes.js +5 -8
  129. package/dist/_helpers/card.js +1 -1
  130. package/dist/_helpers/checkbox.js +1 -1
  131. package/dist/_helpers/date-picker.js +1 -1
  132. package/dist/_helpers/dialog__body-scroll-preventer.js +1 -1
  133. package/dist/_helpers/error-message.js +1 -1
  134. package/dist/_helpers/footer.js +1 -1
  135. package/dist/_helpers/grid.js +1 -1
  136. package/dist/_helpers/group.js +1 -1
  137. package/dist/_helpers/header.js +1 -1
  138. package/dist/_helpers/icon.js +1 -1
  139. package/dist/_helpers/input.js +1 -1
  140. package/dist/_helpers/island.js +1 -1
  141. package/dist/_helpers/link.js +1 -1
  142. package/dist/_helpers/list.js +1 -1
  143. package/dist/_helpers/loader-inline.js +3 -0
  144. package/dist/_helpers/loader-screen.js +1 -1
  145. package/dist/_helpers/panel.js +1 -1
  146. package/dist/_helpers/query-assist__suggestions.js +1 -1
  147. package/dist/_helpers/radio.js +1 -1
  148. package/dist/_helpers/select__filter.js +5 -3
  149. package/dist/_helpers/services-link.js +1 -1
  150. package/dist/_helpers/sidebar.js +1 -1
  151. package/dist/_helpers/table.js +1 -1
  152. package/dist/_helpers/tabs.js +1 -1
  153. package/dist/_helpers/theme.js +50 -0
  154. package/dist/_helpers/title.js +1 -1
  155. package/dist/alert/alert.d.ts +3 -0
  156. package/dist/alert/alert.js +21 -19
  157. package/dist/alert/container.js +1 -1
  158. package/dist/alert-service/alert-service.js +9 -7
  159. package/dist/auth/auth.js +9 -9
  160. package/dist/auth/auth__core.d.ts +3 -1
  161. package/dist/auth/auth__core.js +58 -26
  162. package/dist/auth/down-notification.js +8 -8
  163. package/dist/auth/iframe-flow.js +1 -1
  164. package/dist/auth/landing.js +9 -9
  165. package/dist/auth/storage.js +9 -7
  166. package/dist/auth-dialog/auth-dialog.d.ts +11 -0
  167. package/dist/auth-dialog/auth-dialog.js +52 -7
  168. package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
  169. package/dist/auth-ng/auth-ng.js +9 -9
  170. package/dist/autofocus-ng/autofocus-ng.js +1 -1
  171. package/dist/avatar/avatar.js +1 -1
  172. package/dist/avatar-editor-ng/avatar-editor-ng.js +9 -7
  173. package/dist/breadcrumb-ng/breadcrumb-ng.js +1 -1
  174. package/dist/button/button.d.ts +7 -8
  175. package/dist/button/button.js +6 -8
  176. package/dist/button/button__classes.d.ts +1 -1
  177. package/dist/button/button__classes.js +0 -3
  178. package/dist/button-group/button-group.d.ts +4 -1
  179. package/dist/button-group/button-group.js +5 -3
  180. package/dist/button-group-ng/button-group-ng.js +1 -1
  181. package/dist/button-ng/button-ng.js +6 -31
  182. package/dist/code/code.js +1 -1
  183. package/dist/confirm/confirm.js +5 -5
  184. package/dist/confirm-ng/confirm-ng.js +1 -1
  185. package/dist/confirm-service/confirm-service.js +1 -1
  186. package/dist/data-list/data-list.js +2 -7
  187. package/dist/data-list/item.js +8 -13
  188. package/dist/data-list-ng/data-list-ng.js +2 -7
  189. package/dist/date-picker/date-input.js +4 -3
  190. package/dist/date-picker/date-picker.js +1 -1
  191. package/dist/date-picker/date-popup.js +1 -1
  192. package/dist/dialog/dialog.js +3 -3
  193. package/dist/dialog-ng/dialog-ng.js +3 -3
  194. package/dist/dialog-ng/dialog-ng__template.js +1 -0
  195. package/dist/docked-panel-ng/docked-panel-ng.js +1 -1
  196. package/dist/dropdown/anchor.js +1 -1
  197. package/dist/dropdown/dropdown.js +1 -1
  198. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  199. package/dist/error-bubble/error-bubble.js +1 -1
  200. package/dist/global/controls-height.d.ts +7 -0
  201. package/dist/global/controls-height.js +13 -0
  202. package/dist/global/theme.d.ts +7 -20
  203. package/dist/global/theme.js +7 -62
  204. package/dist/global/variables.d.ts +10 -8
  205. package/dist/header/header.d.ts +7 -69
  206. package/dist/header/header.js +13 -17
  207. package/dist/header/profile.js +3 -3
  208. package/dist/header/services.d.ts +5 -0
  209. package/dist/header/services.js +11 -3
  210. package/dist/header/smart-profile.js +10 -14
  211. package/dist/header/smart-services.js +9 -13
  212. package/dist/header/tray-icon.d.ts +18 -575
  213. package/dist/header/tray-icon.js +4 -4
  214. package/dist/heading/heading.js +1 -1
  215. package/dist/input/input.d.ts +13 -17
  216. package/dist/input/input.js +32 -41
  217. package/dist/input-ng/input-ng.js +46 -49
  218. package/dist/island/adaptive-island-hoc.d.ts +2 -2
  219. package/dist/island/adaptive-island-hoc.js +4 -2
  220. package/dist/island/content.js +2 -9
  221. package/dist/island/header.js +7 -4
  222. package/dist/island/island.d.ts +2 -2
  223. package/dist/list/list.d.ts +1 -1
  224. package/dist/loader/loader__core.js +1 -1
  225. package/dist/loader-inline/loader-inline.d.ts +4 -41
  226. package/dist/loader-inline/loader-inline.js +3 -21
  227. package/dist/loader-inline-ng/loader-inline-ng.js +2 -30
  228. package/dist/login-dialog/login-dialog.js +2 -2
  229. package/dist/login-dialog/service.js +1 -1
  230. package/dist/markdown/code.d.ts +6 -13
  231. package/dist/markdown/code.js +3 -3
  232. package/dist/markdown/heading.d.ts +5 -9
  233. package/dist/markdown/heading.js +2 -2
  234. package/dist/markdown/link.d.ts +4 -8
  235. package/dist/markdown/link.js +1 -1
  236. package/dist/markdown/markdown.d.ts +2 -3
  237. package/dist/markdown/markdown.js +16 -16
  238. package/dist/message/message.d.ts +3 -0
  239. package/dist/message/message.js +18 -10
  240. package/dist/pager/pager.js +8 -12
  241. package/dist/pager-ng/pager-ng.js +3 -7
  242. package/dist/permissions-ng/permissions-ng.js +9 -9
  243. package/dist/popup/popup.js +1 -1
  244. package/dist/popup/popup.target.d.ts +1 -0
  245. package/dist/progress-bar/progress-bar.d.ts +0 -4
  246. package/dist/progress-bar/progress-bar.js +1 -7
  247. package/dist/progress-bar-ng/progress-bar-ng.js +0 -1
  248. package/dist/promised-click-ng/promised-click-ng.js +2 -2
  249. package/dist/query-assist/query-assist.d.ts +0 -5
  250. package/dist/query-assist/query-assist.js +10 -26
  251. package/dist/query-assist-ng/query-assist-ng.js +2 -7
  252. package/dist/save-field-ng/save-field-ng.js +2 -9
  253. package/dist/select/select.d.ts +4 -6
  254. package/dist/select/select.js +35 -58
  255. package/dist/select/select__filter.js +1 -1
  256. package/dist/select/select__popup.js +7 -13
  257. package/dist/select-ng/select-ng.js +5 -9
  258. package/dist/select-ng/select-ng__lazy.js +7 -11
  259. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +2 -2
  260. package/dist/sidebar-ng/sidebar-ng.js +2 -2
  261. package/dist/storage/storage.js +9 -7
  262. package/dist/storage/storage__local.js +9 -7
  263. package/dist/style.css +1 -1
  264. package/dist/tab-trap/tab-trap.js +1 -1
  265. package/dist/table/row-with-focus-sensor.js +1 -1
  266. package/dist/table/row.js +5 -5
  267. package/dist/table/smart-table.js +1 -1
  268. package/dist/table/table.js +1 -1
  269. package/dist/table-legacy-ng/table-legacy-ng.js +3 -7
  270. package/dist/table-legacy-ng/table-legacy-ng__pager.js +3 -7
  271. package/dist/table-ng/smart-table-ng.js +1 -1
  272. package/dist/table-ng/table-ng.js +1 -1
  273. package/dist/tabs/collapsible-more.js +1 -1
  274. package/dist/tabs/collapsible-tab.js +3 -2
  275. package/dist/tabs/collapsible-tabs.js +1 -1
  276. package/dist/tabs/dumb-tabs.d.ts +4 -107
  277. package/dist/tabs/dumb-tabs.js +6 -12
  278. package/dist/tabs/smart-tabs.js +3 -3
  279. package/dist/tabs/tab.d.ts +2 -0
  280. package/dist/tabs/tabs.js +1 -1
  281. package/dist/tabs-ng/tabs-ng.js +1 -6
  282. package/dist/tabs-ng/tabs-ng__template.js +1 -1
  283. package/dist/tag/tag.d.ts +1 -0
  284. package/dist/tag/tag.js +5 -4
  285. package/dist/tags-input/tags-input.js +5 -9
  286. package/dist/tags-input-ng/tags-input-ng.js +4 -8
  287. package/dist/tags-list/tags-list.js +1 -1
  288. package/dist/text/text.js +1 -1
  289. package/dist/toggle/toggle.d.ts +9 -89
  290. package/dist/toggle/toggle.js +7 -8
  291. package/dist/toggle-ng/toggle-ng.js +2 -3
  292. package/dist/tooltip/tooltip.d.ts +1 -0
  293. package/dist/tooltip/tooltip.js +6 -3
  294. package/dist/user-agreement/service.d.ts +2 -2
  295. package/dist/user-agreement/service.js +9 -13
  296. package/dist/user-agreement/user-agreement.js +8 -10
  297. package/dist/user-card/smart-user-card-tooltip.js +6 -11
  298. package/dist/user-card/tooltip.js +1 -1
  299. package/dist/user-card/user-card.js +2 -7
  300. package/dist/user-card-ng/user-card-ng.js +4 -9
  301. package/package.json +5 -5
  302. package/webpack.config.js +0 -11
  303. package/components/global/conic-gradient.d.ts +0 -796
  304. package/components/global/conic-gradient.js +0 -21
  305. package/components/global/radial-gradient-mask.d.ts +0 -9
  306. package/components/global/radial-gradient-mask.js +0 -39
  307. package/components/global/supports-css.d.ts +0 -2
  308. package/components/global/supports-css.js +0 -14
  309. package/components/global/variables_dark.d.ts +0 -3
  310. package/components/global/variables_dark.js +0 -53
  311. package/components/loader-inline/inject-styles.d.ts +0 -2
  312. package/components/loader-inline/inject-styles.js +0 -17
  313. package/dist/_helpers/inject-styles.js +0 -22
  314. package/dist/global/conic-gradient.d.ts +0 -796
  315. package/dist/global/conic-gradient.js +0 -35
  316. package/dist/global/radial-gradient-mask.d.ts +0 -9
  317. package/dist/global/radial-gradient-mask.js +0 -49
  318. package/dist/global/supports-css.d.ts +0 -2
  319. package/dist/global/supports-css.js +0 -20
  320. package/dist/global/variables_dark.d.ts +0 -3
  321. package/dist/global/variables_dark.js +0 -57
  322. package/dist/loader-inline/inject-styles.d.ts +0 -2
  323. package/dist/loader-inline/inject-styles.js +0 -11
@@ -74,11 +74,12 @@
74
74
  opacity: 0;
75
75
 
76
76
  &[disabled] + .circle {
77
- border-color: var(--ring-borders-color);
77
+ border-color: var(--ring-border-unselected-disabled-color);
78
+ background-color: var(--ring-disabled-background-color);
78
79
  }
79
80
 
80
81
  &:checked + .circle {
81
- border-color: var(--ring-border-hover-color);
82
+ border-color: var(--ring-main-color);
82
83
 
83
84
  /* stylelint-disable-next-line selector-max-specificity */
84
85
  &::after {
@@ -101,8 +102,13 @@
101
102
  }
102
103
 
103
104
  /* stylelint-disable-next-line selector-max-specificity */
104
- &[disabled]:checked + .circle::after {
105
- opacity: 0.5;
105
+ &[disabled]:checked + .circle {
106
+ border-color: var(--ring-border-disabled-color);
107
+
108
+ /* stylelint-disable-next-line selector-max-specificity */
109
+ &::after {
110
+ background-color: var(--ring-border-disabled-color);
111
+ }
106
112
  }
107
113
 
108
114
  &[disabled] ~ .label {
@@ -1,6 +1,7 @@
1
1
  @import "../global/variables.css";
2
2
 
3
3
  @value unit from "../global/global.css";
4
+ @value button-shadow from "../button/button.css";
4
5
 
5
6
  .select {
6
7
  position: relative;
@@ -39,8 +40,8 @@
39
40
 
40
41
  .icons {
41
42
  position: absolute;
42
- top: -2px;
43
- right: 0;
43
+ top: -3px;
44
+ right: calc(unit * 1.5);
44
45
 
45
46
  transition: color var(--ring-ease);
46
47
 
@@ -55,15 +56,8 @@
55
56
  }
56
57
 
57
58
  @nest .inputMode & {
58
- top: 12px;
59
-
60
59
  font-size: var(--ring-font-size);
61
60
  }
62
-
63
- @nest .buttonMode & {
64
- top: -4px;
65
- right: unit;
66
- }
67
61
  }
68
62
 
69
63
  .selectedIcon {
@@ -87,10 +81,6 @@
87
81
  vertical-align: -1px;
88
82
  }
89
83
 
90
- .clearIcon.clearIcon > span > span {
91
- color: var(--ring-icon-secondary-color);
92
- }
93
-
94
84
  .sizeS {
95
85
  width: calc(unit * 12);
96
86
  }
@@ -111,8 +101,7 @@
111
101
  max-width: 100%;
112
102
  }
113
103
 
114
- .buttonMode,
115
- .materialMode {
104
+ .buttonMode {
116
105
  position: relative;
117
106
 
118
107
  cursor: pointer;
@@ -168,14 +157,18 @@
168
157
  display: block;
169
158
 
170
159
  width: 100%;
160
+ padding-left: unit;
171
161
 
172
162
  text-align: left;
173
163
  vertical-align: calc(0 - unit);
174
164
  }
175
165
 
176
- .buttonValueOpen {
177
- border-color: var(--ring-selected-background-color);
178
- background-color: var(--ring-selected-background-color);
166
+ .buttonValue:global(.focus-visible) {
167
+ box-shadow: button-shadow var(--ring-main-color);
168
+ }
169
+
170
+ .buttonValueOpen.buttonValueOpen {
171
+ box-shadow: button-shadow var(--ring-main-color);
179
172
  }
180
173
 
181
174
  .label {
@@ -186,6 +179,7 @@
186
179
 
187
180
  .select:hover .value,
188
181
  .select:hover .icons,
182
+ :global(.focus-visible) + .icons,
189
183
  .value:focus,
190
184
  .value:focus + .icons,
191
185
  .open,
@@ -207,23 +201,6 @@
207
201
  }
208
202
  }
209
203
 
210
- .selectedLabel {
211
- position: absolute;
212
- top: calc(unit * -1.5);
213
- left: 0;
214
-
215
- overflow: hidden;
216
-
217
- max-width: 100%;
218
-
219
- text-overflow: ellipsis;
220
-
221
- color: var(--ring-secondary-color);
222
-
223
- font-size: var(--ring-font-size-smaller);
224
- line-height: var(--ring-line-height-lowest);
225
- }
226
-
227
204
  .avatar {
228
205
  margin-right: 4px;
229
206
 
@@ -236,9 +213,10 @@
236
213
  }
237
214
 
238
215
  .chevron.chevron {
239
- padding: 0;
216
+ padding: 0 3px;
240
217
 
241
218
  transition: none;
219
+ vertical-align: -1px;
242
220
 
243
221
  color: inherit;
244
222
  }
@@ -249,6 +227,10 @@
249
227
  color: inherit;
250
228
  }
251
229
 
252
- .avatar {
230
+ .heightS .avatar {
253
231
  vertical-align: -6px;
254
232
  }
233
+
234
+ .heightS .icons {
235
+ top: -5px;
236
+ }
@@ -1,9 +1,9 @@
1
1
  import React, { ButtonHTMLAttributes, Component, CSSProperties, HTMLAttributes, ReactNode, RefCallback, SyntheticEvent } from 'react';
2
2
  import { SelectHandlerParams } from '../list/list';
3
3
  import { Size } from '../input/input';
4
- import Theme from '../global/theme';
5
4
  import { ListDataItem } from '../list/consts';
6
5
  import { Directions } from '../popup/popup.consts';
6
+ import { ControlsHeight } from '../global/controls-height';
7
7
  import SelectPopup, { Filter, FilterFn, Multiple, Tags } from './select__popup';
8
8
  /**
9
9
  * @name Select
@@ -17,7 +17,6 @@ declare enum Type {
17
17
  INPUT = "INPUT",
18
18
  CUSTOM = "CUSTOM",
19
19
  INLINE = "INLINE",
20
- MATERIAL = "MATERIAL",
21
20
  INPUT_WITHOUT_CONTROLS = "INPUT_WITHOUT_CONTROLS"
22
21
  }
23
22
  declare type SelectItemData<T> = T & {
@@ -78,6 +77,7 @@ export interface BaseSelectProps<T = unknown> {
78
77
  onDone: () => void;
79
78
  onReset: () => void;
80
79
  dir: 'ltr' | 'rtl';
80
+ height?: ControlsHeight | undefined;
81
81
  targetElement?: HTMLElement | null | undefined;
82
82
  className?: string | null | undefined;
83
83
  buttonClassName?: string | null | undefined;
@@ -93,7 +93,6 @@ export interface BaseSelectProps<T = unknown> {
93
93
  hint?: ReactNode;
94
94
  add?: Add | null | undefined;
95
95
  compact?: boolean | null | undefined;
96
- theme?: string | null | undefined;
97
96
  customAnchor?: ((props: CustomAnchorProps) => ReactNode) | null | undefined;
98
97
  disableMoveOverflow?: boolean | null | undefined;
99
98
  disableScrollToActive?: boolean | null | undefined;
@@ -188,9 +187,9 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
188
187
  static getDerivedStateFromProps<T = unknown>(nextProps: SelectProps<T>, prevState: SelectState<T>): Partial<SelectState<T>>;
189
188
  state: SelectState<T>;
190
189
  componentDidUpdate(prevProps: SelectProps<T>, prevState: SelectState<T>): void;
190
+ static contextType: React.Context<ControlsHeight>;
191
191
  static Type: typeof Type;
192
192
  static Size: typeof Size;
193
- static Theme: typeof Theme;
194
193
  id: string;
195
194
  shortcutsScope: string;
196
195
  listId: string;
@@ -221,6 +220,7 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
221
220
  filterValue(setValue: string): void;
222
221
  isInputMode(): boolean;
223
222
  _clickHandler: () => void;
223
+ _openPopupIfClosed: () => void;
224
224
  _filterChangeHandler: (e: React.ChangeEvent<HTMLInputElement>) => void;
225
225
  private _setFilter;
226
226
  private _rebuildMultipleMap;
@@ -235,8 +235,6 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
235
235
  _getSelectedString(): string | null;
236
236
  private _getIcons;
237
237
  private _getAvatar;
238
- button?: HTMLElement | null;
239
- buttonRef: (el: HTMLElement | null) => void;
240
238
  filter?: HTMLInputElement | null;
241
239
  filterRef: (el: HTMLInputElement | null) => void;
242
240
  getShortcutsMap(): {
@@ -1,7 +1,7 @@
1
1
  import React, { Component, Fragment } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import PropTypes from 'prop-types';
4
- import chevronDownIcon from '@jetbrains/icons/chevron-10px';
4
+ import chevronDownIcon from '@jetbrains/icons/chevron-down';
5
5
  import closeIcon from '@jetbrains/icons/close';
6
6
  import deepEqual from 'deep-equal';
7
7
  import { Anchor } from '../dropdown/dropdown';
@@ -15,9 +15,9 @@ import dataTests from '../global/data-tests';
15
15
  import getUID from '../global/get-uid';
16
16
  import rerenderHOC from '../global/rerender-hoc';
17
17
  import fuzzyHighlight from '../global/fuzzy-highlight';
18
- import Theme from '../global/theme';
19
18
  import memoize from '../global/memoize';
20
19
  import { isArray } from '../global/typescript-utils';
20
+ import { ControlsHeightContext } from '../global/controls-height';
21
21
  import SelectPopup from './select__popup';
22
22
  import styles from './select.css';
23
23
  /**
@@ -33,12 +33,12 @@ var Type;
33
33
  Type["INPUT"] = "INPUT";
34
34
  Type["CUSTOM"] = "CUSTOM";
35
35
  Type["INLINE"] = "INLINE";
36
- Type["MATERIAL"] = "MATERIAL";
37
36
  Type["INPUT_WITHOUT_CONTROLS"] = "INPUT_WITHOUT_CONTROLS";
38
37
  })(Type || (Type = {}));
38
+ const ICONS_OFFSET = 12;
39
39
  const ICON_WIDTH = 20;
40
40
  const getStyle = memoize((iconsLength) => ({
41
- paddingRight: iconsLength * ICON_WIDTH
41
+ paddingRight: ICONS_OFFSET + iconsLength * ICON_WIDTH
42
42
  }));
43
43
  const isInputMode = (type) => type === Type.INPUT || type === Type.INPUT_WITHOUT_CONTROLS;
44
44
  function getLowerCaseLabel(item) {
@@ -183,7 +183,7 @@ export default class Select extends Component {
183
183
  disabled: false,
184
184
  loadingMessage: 'Loading...',
185
185
  notFoundMessage: 'No options found',
186
- type: Type.MATERIAL,
186
+ type: Type.BUTTON,
187
187
  size: Size.M,
188
188
  targetElement: null,
189
189
  hideSelected: false,
@@ -290,9 +290,9 @@ export default class Select extends Component {
290
290
  onChange(selected);
291
291
  }
292
292
  }
293
+ static contextType = ControlsHeightContext;
293
294
  static Type = Type;
294
295
  static Size = Size;
295
- static Theme = Theme;
296
296
  id = getUID('select-');
297
297
  shortcutsScope = this.id;
298
298
  listId = `${this.id}:list`;
@@ -508,6 +508,13 @@ export default class Select extends Component {
508
508
  }
509
509
  }
510
510
  };
511
+ _openPopupIfClosed = () => {
512
+ if (this.props.disabled || this.state.showPopup) {
513
+ return;
514
+ }
515
+ this.props.onBeforeOpen();
516
+ this._showPopup();
517
+ };
511
518
  _filterChangeHandler = (e) => {
512
519
  this._setFilter(e.currentTarget.value, e);
513
520
  };
@@ -738,10 +745,6 @@ export default class Select extends Component {
738
745
  return !Array.isArray(this.state.selected) &&
739
746
  (this.state.selected?.avatar || this.state.selected?.showGeneratedAvatar) && (<Avatar className={styles.avatar} url={this.state.selected.avatar} username={this.state.selected.username} size={AvatarSize.Size20}/>);
740
747
  }
741
- button;
742
- buttonRef = (el) => {
743
- this.button = el;
744
- };
745
748
  filter;
746
749
  filterRef = (el) => {
747
750
  this.filter = el;
@@ -762,7 +765,7 @@ export default class Select extends Component {
762
765
  renderSelect(activeItemId) {
763
766
  const dataTest = this.props['data-test'];
764
767
  const { shortcutsEnabled } = this.state;
765
- const classes = classNames(styles.select, 'ring-js-shortcuts', this.props.className, {
768
+ const classes = classNames(styles.select, 'ring-js-shortcuts', this.props.className, styles[`height${this.props.height || this.context}`], {
766
769
  [styles[`size${this.props.size}`]]: this.props.type !== Type.INLINE,
767
770
  [styles.disabled]: this.props.disabled
768
771
  });
@@ -779,20 +782,19 @@ export default class Select extends Component {
779
782
  case Type.INPUT_WITHOUT_CONTROLS:
780
783
  case Type.INPUT: return (<div ref={this.nodeRef} className={classNames(classes, styles.inputMode)} data-test={dataTests('ring-select', dataTest)}>
781
784
  {shortcutsEnabled && (<Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>)}
782
- <Input {...ariaProps} autoComplete="off" id={this.props.id} onClick={this._clickHandler} inputRef={this.filterRef} disabled={this.props.disabled} value={this.state.filterValue} borderless={this.props.type === Type.INPUT_WITHOUT_CONTROLS} style={style} size={Size.FULL} onChange={this._filterChangeHandler} onFocus={this._focusHandler} onBlur={this._blurHandler} label={this.props.type === Type.INPUT ? this._getLabel() : null} placeholder={this.props.inputPlaceholder} onKeyDown={this.props.onKeyDown} data-test="ring-select__focus" enableShortcuts={shortcutsEnabled
785
+ <Input {...ariaProps} height={this.props.height} autoComplete="off" id={this.props.id} onClick={this._clickHandler} inputRef={this.filterRef} disabled={this.props.disabled} value={this.state.filterValue} borderless={this.props.type === Type.INPUT_WITHOUT_CONTROLS} style={style} size={Size.FULL} onChange={this._filterChangeHandler} onFocus={this._focusHandler} onBlur={this._blurHandler} label={this.props.type === Type.INPUT ? this._getLabel() : null} placeholder={this.props.inputPlaceholder} onKeyDown={this.props.onKeyDown} data-test="ring-select__focus" enableShortcuts={shortcutsEnabled
783
786
  ? Object.keys({
784
787
  ...this.getShortcutsMap(),
785
788
  ...this._popup?.list?.shortcutsMap
786
789
  })
787
- : undefined}/>
788
- {this.props.type === Type.INPUT && iconsNode}
790
+ : undefined} afterInput={this.props.type === Type.INPUT && iconsNode}/>
789
791
  {this._renderPopup()}
790
792
  </div>);
791
793
  case Type.BUTTON:
792
794
  return (<div ref={this.nodeRef} className={classNames(classes, styles.buttonMode)} data-test={dataTests('ring-select', dataTest)}>
793
795
  {shortcutsEnabled && (<Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>)}
794
796
  <div className={styles.buttonContainer}>
795
- <Button {...ariaProps} id={this.props.id} onClick={this._clickHandler} className={classNames(this.props.buttonClassName, styles.buttonValue, {
797
+ <Button {...ariaProps} height={this.props.height} id={this.props.id} onClick={this._clickHandler} className={classNames(this.props.buttonClassName, styles.buttonValue, {
796
798
  [styles.buttonValueOpen]: this.state.showPopup
797
799
  })} disabled={this.props.disabled} style={style} data-test="ring-select__button ring-select__focus">
798
800
  {this._getAvatar()}
@@ -801,20 +803,6 @@ export default class Select extends Component {
801
803
  {iconsNode}
802
804
  </div>
803
805
  {this._renderPopup()}
804
- </div>);
805
- case Type.MATERIAL:
806
- return (<div ref={this.nodeRef} className={classNames(classes, styles.materialMode)} data-test={dataTests('ring-select', dataTest)}>
807
- {shortcutsEnabled && (<Shortcuts map={this.getShortcutsMap()} scope={this.shortcutsScope}/>)}
808
- {!this._selectionIsEmpty() && this.props.selectedLabel && (<span className={styles.selectedLabel}>{this.props.selectedLabel}</span>)}
809
- <button {...ariaProps} id={this.props.id} onClick={this._clickHandler} type="button" disabled={this.props.disabled} className={classNames(this.props.buttonClassName, styles.value, {
810
- [styles.open]: this.state.showPopup,
811
- [styles.label]: this._selectionIsEmpty()
812
- })} aria-label={this._getLabel()} style={style} data-test="ring-select__focus" ref={this.buttonRef}>
813
- {this._getAvatar()}
814
- {this._selectionIsEmpty() ? this._getLabel() : this._getSelectedString()}
815
- </button>
816
- {iconsNode}
817
- {this._renderPopup()}
818
806
  </div>);
819
807
  case Type.INLINE:
820
808
  return (<div className={classes} ref={this.nodeRef} data-test={dataTests('ring-select', dataTest)}>
@@ -912,7 +900,6 @@ Select.propTypes = {
912
900
  hideArrow: PropTypes.bool,
913
901
  compact: PropTypes.bool,
914
902
  size: PropTypes.oneOf(Object.values(Size)),
915
- theme: PropTypes.string,
916
903
  customAnchor: PropTypes.func,
917
904
  disableMoveOverflow: PropTypes.bool,
918
905
  disableScrollToActive: PropTypes.bool,
@@ -4,6 +4,7 @@ import classNames from 'classnames';
4
4
  import Input from '../input/input';
5
5
  import sniffr from '../global/sniffer';
6
6
  import { ActiveItemContext } from '../list/list';
7
+ import { ControlsHeight } from '../global/controls-height';
7
8
  import styles from './select-popup.css';
8
9
  function noop() { }
9
10
  export default class SelectFilter extends Component {
@@ -34,7 +35,7 @@ export default class SelectFilter extends Component {
34
35
  const { className, listId, ...restProps } = this.props;
35
36
  const classes = classNames(styles.filter, className);
36
37
  return (<ActiveItemContext.ValueContext.Consumer>
37
- {activeItemId => (<Input {...restProps} aria-owns={listId} aria-activedescendant={activeItemId} autoComplete="off" autoFocus borderless inputRef={this.inputRef} className={classes}/>)}
38
+ {activeItemId => (<Input {...restProps} aria-owns={listId} aria-activedescendant={activeItemId} autoComplete="off" autoFocus borderless height={ControlsHeight.L} inputRef={this.inputRef} className={classes}/>)}
38
39
  </ActiveItemContext.ValueContext.Consumer>);
39
40
  }
40
41
  }
@@ -24,7 +24,6 @@ import Text from '../text/text';
24
24
  import { DEFAULT_DIRECTIONS } from '../popup/popup.consts';
25
25
  import SelectFilter from './select__filter';
26
26
  import styles from './select-popup.css';
27
- const INPUT_MARGIN_COMPENSATION = -14;
28
27
  const FILTER_HEIGHT = 35;
29
28
  const TOOLBAR_HEIGHT = 49;
30
29
  function noop() { }
@@ -321,7 +320,7 @@ export default class SelectPopup extends PureComponent {
321
320
  const list = this.getList(this.props.ringPopupTarget || ringPopupTarget);
322
321
  const bottomLine = this.getBottomLine();
323
322
  const hasContent = filterWithTags || selectAll || list || bottomLine || toolbar;
324
- return (<Popup trapFocus={false} ref={this.popupRef} hidden={hidden || !hasContent} attached={isInputMode} className={classes} dontCloseOnAnchorClick anchorElement={anchorElement} minWidth={minWidth} onCloseAttempt={onCloseAttempt} directions={directions} top={top || (isInputMode ? INPUT_MARGIN_COMPENSATION : undefined)} left={left} onMouseDown={this.mouseDownHandler} target={this.props.ringPopupTarget} autoCorrectTopOverflow={false} style={style}>
323
+ return (<Popup trapFocus={false} ref={this.popupRef} hidden={hidden || !hasContent} attached={isInputMode} className={classes} dontCloseOnAnchorClick anchorElement={anchorElement} minWidth={minWidth} onCloseAttempt={onCloseAttempt} directions={directions} top={top} left={left} onMouseDown={this.mouseDownHandler} target={this.props.ringPopupTarget} autoCorrectTopOverflow={false} style={style}>
325
324
  <div dir={dir}>
326
325
  {!hidden && filter &&
327
326
  (<Shortcuts map={this.shortcutsMap} scope={this.shortcutsScope}/>)}
@@ -175,6 +175,7 @@ export const asModelLazy = () => {
175
175
  };
176
176
 
177
177
  asModelLazy.storyName = 'as model lazy';
178
+ asModelLazy.parameters = {storyshots: false};
178
179
 
179
180
  export const withPromise = () => {
180
181
  angular.module(APP_NAME, [SelectNG]).controller('testCtrl', function ctrl($timeout, $q) {
@@ -7,6 +7,8 @@ import getEventKey from '../global/get-event-key';
7
7
  import Select, {RerenderableSelect} from '../select/select';
8
8
  import MessageBundle from '../message-bundle-ng/message-bundle-ng';
9
9
 
10
+ import {ControlsHeight} from '../global/controls-height';
11
+
10
12
  import SelectNgOptions from './select-ng__options';
11
13
  import SelectLazy from './select-ng__lazy';
12
14
 
@@ -23,7 +25,6 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
23
25
  const types = {
24
26
  input: Select.Type.INPUT,
25
27
  button: Select.Type.BUTTON,
26
- material: Select.Type.MATERIAL,
27
28
  dropdown: Select.Type.CUSTOM,
28
29
  suggest: Select.Type.INPUT
29
30
  };
@@ -417,6 +418,7 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
417
418
  notFoundMessage: ctrl.notFoundMessage || RingMessageBundle.select_options_not_found(),
418
419
  targetElement: getType() === 'dropdown' ? element : null,
419
420
  size: getSelectSize(),
421
+ height: ControlsHeight.S,
420
422
  onBeforeOpen: () => {
421
423
  resetMemorizedOptions();
422
424
  ctrl.loadOptionsToSelect(ctrl.query);
@@ -131,7 +131,7 @@ describe('Select Ng', () => {
131
131
 
132
132
  it('Should use default type "Button" if type is not passed', () => {
133
133
  compileTemplate('<rg-select options="item.name for item in items track by item.id" ng-model="selectedItem"></rg-select>');
134
- ctrl.selectInstance.props.type.should.equal(Select.Type.MATERIAL);
134
+ ctrl.selectInstance.props.type.should.equal(Select.Type.BUTTON);
135
135
  });
136
136
 
137
137
  it('Should support type "input"', () => {
@@ -59,11 +59,10 @@ class SelectLazy {
59
59
  this.detachEvents();
60
60
  if (this.type === 'dropdown') {
61
61
  this.ctrl.selectInstance = render(this.reactSelect, this.container);
62
- // In "dropdown" mode we don't click select itself, so need to force click handler
63
- this.ctrl.selectInstance._clickHandler();
64
62
  } else {
65
63
  this.ctrl.selectInstance = hydrate(this.reactSelect, this.container);
66
64
  }
65
+ this.ctrl.selectInstance._openPopupIfClosed();
67
66
  }
68
67
  }
69
68
 
@@ -54,7 +54,7 @@
54
54
 
55
55
  :global(.shortcuts-hint__search-icon) {
56
56
  position: absolute;
57
- top: 18px;
57
+ top: -1px;
58
58
  right: 0;
59
59
 
60
60
  width: calc(unit * 2);
@@ -10,7 +10,7 @@ export default {
10
10
 
11
11
  parameters: {
12
12
  notes: 'Displays a popup listing all registered shortcuts.',
13
- hermione: {captureSelector: '*[data-test~=ring-dialog]'}
13
+ hermione: {captureSelector: '*[data-test~=ring-dialog-container]'}
14
14
  }
15
15
  };
16
16
 
@@ -9,7 +9,7 @@ const TabTitle = React.memo(function TabTitle({ selected, child, handleSelect =
9
9
  if (child == null || typeof child !== 'object' || child.type === CustomItem) {
10
10
  return child;
11
11
  }
12
- const { title, disabled, href, className, activeClassName, collapsedClassName, collapsedActiveClassName } = child.props;
12
+ const { title, titleProps, disabled, href, className, activeClassName, collapsedClassName, collapsedActiveClassName } = child.props;
13
13
  const titleClasses = classNames(styles.title, className, {
14
14
  [styles.selected]: selected,
15
15
  [styles.collapsed]: collapsed,
@@ -17,7 +17,7 @@ const TabTitle = React.memo(function TabTitle({ selected, child, handleSelect =
17
17
  [collapsedClassName ?? '']: collapsed,
18
18
  [collapsedActiveClassName ?? '']: collapsed && selected
19
19
  });
20
- return (<TabLink title={title} isSelected={selected} active href={href} innerClassName={titleClasses} className={titleClasses} disabled={disabled} onPlainLeftClick={handleSelect} tabIndex={tabIndex} collapsed={collapsed}/>);
20
+ return (<TabLink title={title} isSelected={selected} active href={href} innerClassName={titleClasses} className={titleClasses} disabled={disabled} onPlainLeftClick={handleSelect} tabIndex={tabIndex} collapsed={collapsed} {...titleProps}/>);
21
21
  });
22
22
  TabTitle.propTypes = {
23
23
  child: PropTypes.element,
@@ -1,12 +1,11 @@
1
- import React, { ComponentPropsWithRef, PureComponent, ReactElement } from 'react';
1
+ import { PureComponent, ReactElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import Theme, { ThemeProps } from '../global/theme';
4
3
  import { CollapsibleTabsProps } from './collapsible-tabs';
5
4
  import { CustomItem } from './custom-item';
6
5
  import { TabProps } from './tab';
7
6
  export { CustomItem };
8
7
  declare type Children = readonly Children[] | ReactElement<TabProps> | null | boolean;
9
- export interface TabsProps extends ThemeProps, Omit<CollapsibleTabsProps, 'onSelect' | 'children'> {
8
+ export interface TabsProps extends Omit<CollapsibleTabsProps, 'onSelect' | 'children'> {
10
9
  children: Children;
11
10
  onSelect: (key: string) => void;
12
11
  className?: string | null | undefined;
@@ -15,7 +14,6 @@ export interface TabsProps extends ThemeProps, Omit<CollapsibleTabsProps, 'onSel
15
14
  }
16
15
  declare class Tabs extends PureComponent<TabsProps> {
17
16
  static propTypes: {
18
- theme: PropTypes.Requireable<string>;
19
17
  selected: PropTypes.Requireable<string>;
20
18
  className: PropTypes.Requireable<string>;
21
19
  href: PropTypes.Requireable<string>;
@@ -27,110 +25,9 @@ declare class Tabs extends PureComponent<TabsProps> {
27
25
  static defaultProps: {
28
26
  onSelect(): void;
29
27
  };
30
- static Theme: typeof Theme;
31
28
  handleSelect: (arg: string) => () => void;
32
29
  getTabTitle: (child: ReactElement<TabProps>, i: number) => JSX.Element;
33
30
  render(): JSX.Element;
34
31
  }
35
- declare const ThemedTabs: React.NamedExoticComponent<Omit<(Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<{
36
- theme: PropTypes.Requireable<string>;
37
- selected: PropTypes.Requireable<string>;
38
- className: PropTypes.Requireable<string>;
39
- href: PropTypes.Requireable<string>;
40
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
41
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
42
- 'data-test': PropTypes.Requireable<string>;
43
- autoCollapse: PropTypes.Requireable<boolean>;
44
- }>, "href"> & Pick<TabsProps, "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems">, "className" | "href" | "children" | "theme" | "data-test" | "selected" | "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems" | "autoCollapse"> & Partial<Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<{
45
- theme: PropTypes.Requireable<string>;
46
- selected: PropTypes.Requireable<string>;
47
- className: PropTypes.Requireable<string>;
48
- href: PropTypes.Requireable<string>;
49
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
50
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
51
- 'data-test': PropTypes.Requireable<string>;
52
- autoCollapse: PropTypes.Requireable<boolean>;
53
- }>, "href"> & Pick<TabsProps, "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems">, "onSelect">> & Partial<Pick<{
54
- onSelect(): void;
55
- }, never>>) | (Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabsProps> & {
56
- theme: PropTypes.Requireable<string>;
57
- selected: PropTypes.Requireable<string>;
58
- className: PropTypes.Requireable<string>;
59
- href: PropTypes.Requireable<string>;
60
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
61
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
62
- 'data-test': PropTypes.Requireable<string>;
63
- autoCollapse: PropTypes.Requireable<boolean>;
64
- }>, "href"> & Pick<TabsProps, never>, "href"> & Partial<Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabsProps> & {
65
- theme: PropTypes.Requireable<string>;
66
- selected: PropTypes.Requireable<string>;
67
- className: PropTypes.Requireable<string>;
68
- href: PropTypes.Requireable<string>;
69
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
70
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
71
- 'data-test': PropTypes.Requireable<string>;
72
- autoCollapse: PropTypes.Requireable<boolean>;
73
- }>, "href"> & Pick<TabsProps, never>, keyof TabsProps>> & Partial<Pick<Partial<TabsProps> & {
74
- onSelect(): void;
75
- }, never>>), "theme"> & import("../global/theme").ThemeOuterProps & React.RefAttributes<Tabs>> & {
76
- readonly type: React.ForwardRefExoticComponent<Omit<(Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<{
77
- theme: PropTypes.Requireable<string>;
78
- selected: PropTypes.Requireable<string>;
79
- className: PropTypes.Requireable<string>;
80
- href: PropTypes.Requireable<string>;
81
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
82
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
83
- 'data-test': PropTypes.Requireable<string>;
84
- autoCollapse: PropTypes.Requireable<boolean>;
85
- }>, "href"> & Pick<TabsProps, "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems">, "className" | "href" | "children" | "theme" | "data-test" | "selected" | "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems" | "autoCollapse"> & Partial<Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<{
86
- theme: PropTypes.Requireable<string>;
87
- selected: PropTypes.Requireable<string>;
88
- className: PropTypes.Requireable<string>;
89
- href: PropTypes.Requireable<string>;
90
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
91
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
92
- 'data-test': PropTypes.Requireable<string>;
93
- autoCollapse: PropTypes.Requireable<boolean>;
94
- }>, "href"> & Pick<TabsProps, "moreClassName" | "moreActiveClassName" | "morePopupClassName" | "morePopupItemClassName" | "morePopupBeforeEnd" | "initialVisibleItems">, "onSelect">> & Partial<Pick<{
95
- onSelect(): void;
96
- }, never>>) | (Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabsProps> & {
97
- theme: PropTypes.Requireable<string>;
98
- selected: PropTypes.Requireable<string>;
99
- className: PropTypes.Requireable<string>;
100
- href: PropTypes.Requireable<string>;
101
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
102
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
103
- 'data-test': PropTypes.Requireable<string>;
104
- autoCollapse: PropTypes.Requireable<boolean>;
105
- }>, "href"> & Pick<TabsProps, never>, "href"> & Partial<Pick<Pick<TabsProps, keyof TabsProps> & Pick<PropTypes.InferProps<React.WeakValidationMap<TabsProps> & {
106
- theme: PropTypes.Requireable<string>;
107
- selected: PropTypes.Requireable<string>;
108
- className: PropTypes.Requireable<string>;
109
- href: PropTypes.Requireable<string>;
110
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
111
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
112
- 'data-test': PropTypes.Requireable<string>;
113
- autoCollapse: PropTypes.Requireable<boolean>;
114
- }>, "href"> & Pick<TabsProps, never>, keyof TabsProps>> & Partial<Pick<Partial<TabsProps> & {
115
- onSelect(): void;
116
- }, never>>), "theme"> & import("../global/theme").ThemeOuterProps & React.RefAttributes<Tabs>>;
117
- } & {
118
- prototype: Tabs;
119
- propTypes: {
120
- theme: PropTypes.Requireable<string>;
121
- selected: PropTypes.Requireable<string>;
122
- className: PropTypes.Requireable<string>;
123
- href: PropTypes.Requireable<string>;
124
- children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
125
- onSelect: PropTypes.Requireable<(...args: any[]) => any>;
126
- 'data-test': PropTypes.Requireable<string>;
127
- autoCollapse: PropTypes.Requireable<boolean>;
128
- };
129
- defaultProps: {
130
- onSelect(): void;
131
- };
132
- Theme: typeof Theme;
133
- contextType?: React.Context<any> | undefined;
134
- };
135
- export declare type TabsAttrs = ComponentPropsWithRef<typeof ThemedTabs>;
136
- export default ThemedTabs;
32
+ export declare type TabsAttrs = JSX.LibraryManagedAttributes<typeof Tabs, TabsProps>;
33
+ export default Tabs;