@jetbrains/ring-ui-built 7.0.30 → 7.0.32

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.
@@ -50,6 +50,7 @@ export interface TableProps<T extends SelectionItem> extends FocusSensorAddProps
50
50
  stickyHeaderOffset?: string | undefined;
51
51
  renderEmpty?: (() => ReactNode) | null | undefined;
52
52
  RowComponent: typeof Row;
53
+ customLoader?: ((loaderClassName?: string) => ReactNode) | null | undefined;
53
54
  }
54
55
  /**
55
56
  * Interactive table with selection and keyboard navigation support.
@@ -199,7 +199,8 @@ class Table extends PureComponent {
199
199
  onItemDoubleClick,
200
200
  onItemClick,
201
201
  renderEmpty,
202
- RowComponent
202
+ RowComponent,
203
+ customLoader
203
204
  } = this.props;
204
205
  // NOTE: Do not construct new object per render because it causes all rows rerendering
205
206
  const columnsArray = typeof columns === 'function' ? columns(null) : columns;
@@ -327,7 +328,7 @@ class Table extends PureComponent {
327
328
  })
328
329
  }), loading && jsx("div", {
329
330
  className: style.loadingOverlay,
330
- children: jsx(Loader, {
331
+ children: customLoader ? customLoader(loaderClassName) : jsx(Loader, {
331
332
  className: loaderClassName
332
333
  })
333
334
  })]
@@ -13,7 +13,7 @@ export interface TooltipProps extends Omit<AllHTMLAttributes<HTMLSpanElement>, '
13
13
  selfOverflowOnly?: boolean | null | undefined;
14
14
  popupProps?: Partial<PopupAttrs> | null | undefined;
15
15
  title?: ReactNode | null | undefined;
16
- theme?: Theme;
16
+ theme?: Theme | 'inherit';
17
17
  'data-test'?: string | null | undefined;
18
18
  long?: boolean | null | undefined;
19
19
  }
@@ -28,7 +28,7 @@ import '../popup/popup.consts.js';
28
28
  import 'core-js/modules/es.string.split.js';
29
29
  import '../popup/popup.target.js';
30
30
 
31
- var styles = {"tooltip":"tooltip_rui_64ba","long":"long_rui_64ba"};
31
+ var styles = {"tooltip":"tooltip_rui_64ba","inheritedTheme":"inheritedTheme_rui_64ba","long":"long_rui_64ba"};
32
32
 
33
33
  const _excluded = ["children", "data-test", "title", "delay", "theme", "selfOverflowOnly", "popupProps", "long"];
34
34
  const scheduleScroll = scheduleRAF();
@@ -171,6 +171,24 @@ class Tooltip extends Component {
171
171
  onNestedTooltipShow,
172
172
  onNestedTooltipHide
173
173
  } = this;
174
+ const popup = jsx(Popup, _objectSpread2(_objectSpread2({
175
+ trapFocus: false,
176
+ anchorElement: this.containerNode,
177
+ hidden: !this.state.showPopup || this.state.showNestedPopup,
178
+ onCloseAttempt: this.hidePopup,
179
+ maxHeight: 400,
180
+ attached: false,
181
+ onMouseOut: this.hideIfMovedOutsidePopup,
182
+ top: 4,
183
+ dontCloseOnAnchorClick: true,
184
+ ref: this.popupRef
185
+ }, popupProps), {}, {
186
+ className: classNames(styles.tooltip, {
187
+ [styles.long]: long,
188
+ [styles.inheritedTheme]: theme === 'inherit'
189
+ }, popupProps === null || popupProps === void 0 ? void 0 : popupProps.className),
190
+ children: title
191
+ }));
174
192
  return jsx(TooltipContext.Provider, {
175
193
  value: {
176
194
  onNestedTooltipShow,
@@ -180,27 +198,11 @@ class Tooltip extends Component {
180
198
  ref: this.containerRef,
181
199
  "data-test": joinDataTestAttributes('ring-tooltip', dataTest),
182
200
  "data-test-title": typeof title === 'string' ? title : undefined,
183
- children: [children, jsx(ThemeProvider, {
201
+ children: [children, theme === 'inherit' ? popup : jsx(ThemeProvider, {
184
202
  theme: theme,
185
203
  passToPopups: true,
186
204
  WrapperComponent: props => jsx("span", _objectSpread2({}, props)),
187
- children: jsx(Popup, _objectSpread2(_objectSpread2({
188
- trapFocus: false,
189
- anchorElement: this.containerNode,
190
- hidden: !this.state.showPopup || this.state.showNestedPopup,
191
- onCloseAttempt: this.hidePopup,
192
- maxHeight: 400,
193
- attached: false,
194
- onMouseOut: this.hideIfMovedOutsidePopup,
195
- top: 4,
196
- dontCloseOnAnchorClick: true,
197
- ref: this.popupRef
198
- }, popupProps), {}, {
199
- className: classNames(styles.tooltip, {
200
- [styles.long]: long
201
- }, popupProps === null || popupProps === void 0 ? void 0 : popupProps.className),
202
- children: title
203
- }))
205
+ children: popup
204
206
  })]
205
207
  }))
206
208
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui-built",
3
- "version": "7.0.30",
3
+ "version": "7.0.32",
4
4
  "description": "JetBrains UI library",
5
5
  "author": {
6
6
  "name": "JetBrains"
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,73 +0,0 @@
1
- import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
3
- import figma from '@figma/code-connect';
4
- import chevronDownIcon from '@jetbrains/icons/chevron-down';
5
- import { Button } from '../button/button.js';
6
- import { ControlsHeight } from '../global/controls-height.js';
7
- import ButtonGroup from './button-group.js';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
- import 'react';
10
- import 'classnames';
11
- import '@jetbrains/icons/chevron-12px-down';
12
- import 'util-deprecate';
13
- import '../icon/icon.js';
14
- import '../icon/icon__constants.js';
15
- import '../_helpers/icon__svg.js';
16
- import 'core-js/modules/es.regexp.exec.js';
17
- import 'core-js/modules/es.string.replace.js';
18
- import 'core-js/modules/es.string.starts-with.js';
19
- import '../global/memoize.js';
20
- import 'core-js/modules/es.weak-map.js';
21
- import '../link/clickableLink.js';
22
- import '../_helpers/button__classes.js';
23
- import 'core-js/modules/es.promise.js';
24
- import 'core-js/modules/es.string.split.js';
25
- import '../global/data-tests.js';
26
- import '../control-label/control-label.js';
27
- import '../control-help/control-help.js';
28
- import '../_helpers/caption.js';
29
-
30
- figma.connect(ButtonGroup, 'https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=9954%3A528', {
31
- props: {
32
- height: figma.enum('Size', {
33
- S: ControlsHeight.S,
34
- M: ControlsHeight.M,
35
- L: ControlsHeight.L
36
- }),
37
- disabled: figma.enum('State', {
38
- Disabled: true
39
- }),
40
- primary: figma.enum('Variant', {
41
- Main: true
42
- }),
43
- success: figma.enum('Variant', {
44
- Green: true
45
- }),
46
- error: figma.enum('Variant', {
47
- 'Red solid': true
48
- }),
49
- secondary: figma.enum('Variant', {
50
- Gray: true
51
- }),
52
- danger: figma.enum('Variant', {
53
- 'Red outlined': true
54
- }),
55
- ghost: figma.enum('Variant', {
56
- Ghost: true
57
- }),
58
- inline: figma.enum('Variant', {
59
- Text: true
60
- })
61
- },
62
- variant: {
63
- Type: 'Split'
64
- },
65
- example: props => jsxs(ButtonGroup, {
66
- children: [jsx(Button, _objectSpread2(_objectSpread2({}, props), {}, {
67
- children: 'Button'
68
- })), jsx(Button, _objectSpread2(_objectSpread2({}, props), {}, {
69
- icon: chevronDownIcon
70
- }))]
71
- }),
72
- imports: ['import Button from "@jetbrains/ring-ui/components/button/button"', 'import {ControlsHeight} from "@jetbrains/ring-ui/components/global/controls-height"', 'import chevronDownIcon from "@jetbrains/icons/chevron-down"']
73
- });