@jetbrains/ring-ui-built 7.0.0-beta.8 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/anchor.js +4 -4
- package/components/_helpers/button__classes.js +13 -13
- package/components/_helpers/caption.js +3 -3
- package/components/_helpers/card.js +23 -20
- package/components/_helpers/date-picker.js +2 -2
- package/components/_helpers/dialog__body-scroll-preventer.js +4 -4
- package/components/_helpers/grid.js +2 -2
- package/components/_helpers/header.js +2 -2
- package/components/_helpers/heading.js +2 -2
- package/components/_helpers/icon__svg.js +6 -6
- package/components/_helpers/input.js +14 -14
- package/components/_helpers/island.js +2 -2
- package/components/_helpers/link.js +2 -2
- package/components/_helpers/list.js +2 -2
- package/components/_helpers/query-assist__suggestions.js +7 -7
- package/components/_helpers/select__filter.js +3 -3
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/sidebar.js +9 -9
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/table.js +2 -2
- package/components/_helpers/theme.js +18 -12
- package/components/_helpers/title.js +7 -7
- package/components/alert/alert.d.ts +2 -2
- package/components/alert/alert.js +12 -13
- package/components/alert/container.js +4 -4
- package/components/alert-service/alert-service.js +0 -1
- package/components/auth/auth.js +0 -1
- package/components/auth/auth__core.js +1 -2
- package/components/auth/background-flow.js +2 -2
- package/components/auth/down-notification.js +5 -6
- package/components/auth/iframe-flow.js +0 -1
- package/components/auth/storage.js +0 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth-dialog/auth-dialog.js +10 -11
- package/components/auth-dialog-service/auth-dialog-service.js +2 -3
- package/components/avatar/avatar.js +6 -6
- package/components/breadcrumbs/breadcrumbs.js +2 -2
- package/components/button/button.js +4 -4
- package/components/button/button__classes.d.ts +1 -1
- package/components/button-group/button-group.js +3 -4
- package/components/button-set/button-set.js +2 -3
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -3
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +0 -1
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +7 -7
- package/components/collapse/collapse-content.d.ts +1 -2
- package/components/collapse/collapse-content.js +25 -11
- package/components/collapse/collapse-control.js +0 -1
- package/components/confirm/confirm.d.ts +2 -2
- package/components/confirm/confirm.js +3 -4
- package/components/confirm-service/confirm-service.d.ts +1 -1
- package/components/confirm-service/confirm-service.js +1 -2
- package/components/content-layout/content-layout.js +4 -4
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/control-help/control-help.js +2 -2
- package/components/control-label/control-label.js +5 -5
- package/components/data-list/data-list.d.ts +2 -2
- package/components/data-list/data-list.js +6 -7
- package/components/data-list/data-list.mock.js +16 -10
- package/components/data-list/item.js +8 -9
- package/components/date-picker/date-input.js +2 -2
- package/components/date-picker/date-picker.d.ts +2 -1
- package/components/date-picker/date-picker.js +12 -12
- package/components/date-picker/date-popup.js +4 -5
- package/components/date-picker/day.js +15 -15
- package/components/date-picker/month-names.js +5 -5
- package/components/date-picker/month-slider.js +3 -3
- package/components/date-picker/month.js +3 -3
- package/components/date-picker/months.js +3 -3
- package/components/date-picker/weekdays.js +4 -4
- package/components/date-picker/years.js +5 -5
- package/components/dialog/dialog.d.ts +1 -0
- package/components/dialog/dialog.js +22 -18
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +2 -3
- package/components/dropdown-menu/dropdown-menu.js +0 -1
- package/components/editable-heading/editable-heading.js +19 -19
- package/components/error-bubble/error-bubble.js +5 -5
- package/components/error-message/error-message.js +6 -7
- package/components/footer/footer.js +9 -10
- package/components/form/form.js +2 -3
- package/components/global/compose.js +0 -2
- package/components/global/data-tests.js +0 -1
- package/components/global/theme.d.ts +4 -2
- package/components/global/theme.js +1 -2
- package/components/grid/col.js +5 -4
- package/components/grid/grid.js +5 -4
- package/components/grid/row.js +5 -5
- package/components/group/group.js +5 -3
- package/components/header/header-icon.js +4 -4
- package/components/header/header.js +3 -4
- package/components/header/links.js +2 -2
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +2 -2
- package/components/header/profile.js +10 -11
- package/components/header/services-link.js +0 -1
- package/components/header/services.js +7 -8
- package/components/header/smart-profile.js +0 -1
- package/components/header/smart-services.js +0 -1
- package/components/header/tray.js +3 -3
- package/components/heading/heading.js +3 -3
- package/components/http/http.d.ts +3 -3
- package/components/icon/icon.js +8 -6
- package/components/input/input-legacy.js +2 -3
- package/components/input-size/input-size.js +2 -3
- package/components/island/content.js +7 -7
- package/components/island/header.js +4 -4
- package/components/island/island.js +4 -5
- package/components/link/link.js +7 -8
- package/components/list/list.d.ts +1 -1
- package/components/list/list.js +5 -6
- package/components/list/list__custom.js +5 -6
- package/components/list/list__hint.js +2 -2
- package/components/list/list__item.js +22 -23
- package/components/list/list__link.js +5 -6
- package/components/list/list__separator.js +3 -3
- package/components/list/list__title.js +5 -5
- package/components/list/list__users-groups-source.js +0 -1
- package/components/loader/loader.js +0 -1
- package/components/loader/loader__core.js +5 -5
- package/components/loader-inline/loader-inline.js +3 -4
- package/components/loader-screen/loader-screen.js +4 -5
- package/components/login-dialog/login-dialog.js +6 -7
- package/components/login-dialog/service.js +1 -2
- package/components/markdown/markdown.d.ts +2 -2
- package/components/markdown/markdown.js +6 -6
- package/components/message/message.js +9 -10
- package/components/old-browsers-message/old-browsers-message.js +0 -1
- package/components/old-browsers-message/old-browsers-message__stop.js +0 -1
- package/components/old-browsers-message/white-list.js +2 -3
- package/components/pager/pager.js +9 -10
- package/components/panel/panel.js +2 -2
- package/components/permissions/permissions.js +0 -1
- package/components/permissions/permissions__cache.js +2 -3
- package/components/popup/popup.js +6 -7
- package/components/popup/position.js +2 -2
- package/components/popup-menu/popup-menu.js +0 -1
- package/components/progress-bar/progress-bar.d.ts +2 -2
- package/components/progress-bar/progress-bar.js +5 -5
- package/components/query-assist/query-assist.js +27 -28
- package/components/query-assist/query-assist__suggestions.js +0 -1
- package/components/radio/radio__item.js +5 -5
- package/components/scrollable-section/scrollable-section.js +6 -6
- package/components/select/select.d.ts +1 -1
- package/components/select/select.js +25 -25
- package/components/select/select__filter.js +0 -1
- package/components/select/select__popup.js +11 -12
- package/components/shortcuts/core.js +1 -1
- package/components/slider/slider.js +20 -20
- package/components/storage/storage.js +0 -1
- package/components/storage/storage__local.js +0 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +2 -2
- package/components/table/cell.js +2 -3
- package/components/table/header-cell.js +8 -9
- package/components/table/header.d.ts +2 -10
- package/components/table/header.js +7 -14
- package/components/table/row-with-focus-sensor.js +1 -1
- package/components/table/row.d.ts +0 -1
- package/components/table/row.js +12 -18
- package/components/table/selection.d.ts +2 -3
- package/components/table/simple-table.js +3 -3
- package/components/table/smart-table.js +1 -1
- package/components/table/table.d.ts +0 -1
- package/components/table/table.js +18 -20
- package/components/tabs/collapsible-more.d.ts +1 -1
- package/components/tabs/collapsible-more.js +6 -7
- package/components/tabs/collapsible-tab.js +4 -5
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +5 -6
- package/components/tabs/dumb-tabs.js +5 -6
- package/components/tabs/smart-tabs.js +0 -1
- package/components/tabs/tab-link.js +0 -1
- package/components/tabs/tab.js +0 -1
- package/components/tabs/tabs.js +0 -1
- package/components/tag/tag.d.ts +1 -1
- package/components/tag/tag.js +14 -15
- package/components/tags-input/tags-input.js +8 -9
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +2 -2
- package/components/text/text.js +7 -7
- package/components/toggle/toggle.d.ts +2 -2
- package/components/toggle/toggle.js +12 -13
- package/components/tooltip/tooltip.d.ts +4 -1
- package/components/tooltip/tooltip.js +35 -20
- package/components/user-agreement/service.js +1 -2
- package/components/user-agreement/user-agreement.js +7 -8
- package/components/user-card/card.js +3 -2
- package/components/user-card/smart-user-card-tooltip.js +5 -4
- package/components/user-card/tooltip.js +5 -4
- package/components/user-card/user-card.js +3 -2
- package/package.json +7 -6
- package/typings.d.ts +2 -4
- package/components/_helpers/badge.js +0 -3
- package/components/badge/badge.d.ts +0 -14
- package/components/badge/badge.js +0 -47
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +0 -23
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +0 -26
- package/components/island-legacy/island-legacy.d.ts +0 -7
- package/components/island-legacy/island-legacy.js +0 -25
@@ -5,11 +5,10 @@ import { PureComponent } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
6
6
|
import memoize from '../global/memoize.js';
|
7
7
|
import joinDataTestAttributes from '../global/data-tests.js';
|
8
|
-
import {
|
8
|
+
import { s as styles, T as TabLink } from '../_helpers/tab-link.js';
|
9
9
|
import CollapsibleTabs from './collapsible-tabs.js';
|
10
10
|
import { CustomItem } from './custom-item.js';
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
12
|
-
import 'core-js/modules/es.array.reduce.js';
|
13
12
|
import '../link/link.js';
|
14
13
|
import '../link/clickableLink.js';
|
15
14
|
import '../_helpers/link.js';
|
@@ -95,8 +94,8 @@ class Tabs extends PureComponent {
|
|
95
94
|
} = child.props;
|
96
95
|
const key = id || String(i);
|
97
96
|
const isSelected = key === selected;
|
98
|
-
const titleClasses = classNames(
|
99
|
-
[
|
97
|
+
const titleClasses = classNames(styles.title, className, isSelected && activeClassName, {
|
98
|
+
[styles.selected]: isSelected
|
100
99
|
});
|
101
100
|
return /*#__PURE__*/jsx(TabLink, _objectSpread2({
|
102
101
|
title: title,
|
@@ -119,7 +118,7 @@ class Tabs extends PureComponent {
|
|
119
118
|
'data-test': dataTest
|
120
119
|
} = _this$props,
|
121
120
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
122
|
-
const classes = classNames(
|
121
|
+
const classes = classNames(styles.tabs, className);
|
123
122
|
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
124
123
|
return /*#__PURE__*/jsxs("div", {
|
125
124
|
className: classes,
|
@@ -129,7 +128,7 @@ class Tabs extends PureComponent {
|
|
129
128
|
selected: selected,
|
130
129
|
children: childrenArray
|
131
130
|
})) : /*#__PURE__*/jsx("div", {
|
132
|
-
className:
|
131
|
+
className: styles.titles,
|
133
132
|
children: childrenArray.map(this.getTabTitle)
|
134
133
|
}), /*#__PURE__*/jsx("div", {
|
135
134
|
className: classNames(tabContainerClassName),
|
@@ -3,7 +3,6 @@ import { PureComponent } from 'react';
|
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
4
4
|
import Tabs from './dumb-tabs.js';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
|
-
import 'core-js/modules/es.array.reduce.js';
|
7
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
8
7
|
import 'classnames';
|
9
8
|
import '../global/memoize.js';
|
@@ -5,7 +5,6 @@ export { T as default } from '../_helpers/tab-link.js';
|
|
5
5
|
import 'react/jsx-runtime';
|
6
6
|
import 'classnames';
|
7
7
|
import '../global/data-tests.js';
|
8
|
-
import 'core-js/modules/es.array.reduce.js';
|
9
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
10
9
|
import '../link/clickableLink.js';
|
11
10
|
import '../_helpers/link.js';
|
package/components/tabs/tab.js
CHANGED
@@ -2,7 +2,6 @@ import { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
3
3
|
import joinDataTestAttributes from '../global/data-tests.js';
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
5
|
-
import 'core-js/modules/es.array.reduce.js';
|
6
5
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
6
|
|
8
7
|
class Tab extends PureComponent {
|
package/components/tabs/tabs.js
CHANGED
package/components/tag/tag.d.ts
CHANGED
@@ -7,7 +7,7 @@ export interface TagRenderProps extends HTMLAttributes<HTMLElement> {
|
|
7
7
|
'data-test': string;
|
8
8
|
}
|
9
9
|
export interface TagProps {
|
10
|
-
onRemove
|
10
|
+
onRemove?: ((event: React.MouseEvent<HTMLElement>) => void) | null;
|
11
11
|
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
12
12
|
readOnly: boolean;
|
13
13
|
disabled: boolean;
|
package/components/tag/tag.js
CHANGED
@@ -17,7 +17,7 @@ import '@jetbrains/icons/chevron-down';
|
|
17
17
|
import '../link/clickableLink.js';
|
18
18
|
import '../_helpers/button__classes.js';
|
19
19
|
|
20
|
-
var
|
20
|
+
var styles = {"tag":"tag_rui_5765 resetButton_rui_f295","withRemove":"withRemove_rui_5765","container":"container_rui_5765","focused":"focused_rui_5765","content":"content_rui_5765 ellipsis_rui_f295","disabled":"disabled_rui_5765","remove":"remove_rui_5765","removeIcon":"removeIcon_rui_5765","icon":"icon_rui_5765","avatarContainer":"avatarContainer_rui_5765","customIcon":"customIcon_rui_5765","avatarIcon":"avatarIcon_rui_5765"};
|
21
21
|
|
22
22
|
class Tag extends PureComponent {
|
23
23
|
constructor() {
|
@@ -65,7 +65,7 @@ class Tag extends PureComponent {
|
|
65
65
|
renderCustomIcon() {
|
66
66
|
if (this.props.rgTagIcon) {
|
67
67
|
return /*#__PURE__*/jsx(Icon, {
|
68
|
-
className:
|
68
|
+
className: styles.icon,
|
69
69
|
title: this.props.rgTagTitle,
|
70
70
|
glyph: this.props.rgTagIcon
|
71
71
|
});
|
@@ -74,8 +74,8 @@ class Tag extends PureComponent {
|
|
74
74
|
}
|
75
75
|
_renderImageElement(avatarSrc) {
|
76
76
|
const classes = classNames({
|
77
|
-
[
|
78
|
-
[
|
77
|
+
[styles.customIcon]: this.props.icon,
|
78
|
+
[styles.avatarIcon]: avatarSrc
|
79
79
|
});
|
80
80
|
return /*#__PURE__*/jsx("img", {
|
81
81
|
alt: avatarSrc ? 'Avatar' : 'Icon',
|
@@ -92,20 +92,20 @@ class Tag extends PureComponent {
|
|
92
92
|
renderAvatar() {
|
93
93
|
if (this.props.avatar) {
|
94
94
|
return /*#__PURE__*/jsx("span", {
|
95
|
-
className:
|
95
|
+
className: styles.avatarContainer,
|
96
96
|
children: this._renderImageElement(this.props.avatar)
|
97
97
|
});
|
98
98
|
}
|
99
99
|
return null;
|
100
100
|
}
|
101
101
|
renderRemoveIcon() {
|
102
|
-
if (!this.props.readOnly) {
|
102
|
+
if (!this.props.readOnly && this.props.onRemove) {
|
103
103
|
return /*#__PURE__*/jsx(Button, {
|
104
104
|
title: "Remove",
|
105
105
|
icon: closeIcon,
|
106
106
|
"data-test": "ring-tag-remove",
|
107
|
-
className:
|
108
|
-
iconClassName:
|
107
|
+
className: styles.remove,
|
108
|
+
iconClassName: styles.removeIcon,
|
109
109
|
onClick: this.props.onRemove,
|
110
110
|
style: {
|
111
111
|
'--ring-icon-secondary-color': this.props.textColor
|
@@ -116,10 +116,10 @@ class Tag extends PureComponent {
|
|
116
116
|
return null;
|
117
117
|
}
|
118
118
|
render() {
|
119
|
-
const classes = classNames('ring-js-shortcuts',
|
120
|
-
[
|
121
|
-
[
|
122
|
-
[
|
119
|
+
const classes = classNames('ring-js-shortcuts', styles.tag, {
|
120
|
+
[styles.focused]: this.state.focused,
|
121
|
+
[styles.disabled]: this.props.disabled,
|
122
|
+
[styles.withRemove]: !this.props.readOnly && this.props.onRemove
|
123
123
|
}, this.props.className);
|
124
124
|
const {
|
125
125
|
backgroundColor,
|
@@ -127,7 +127,7 @@ class Tag extends PureComponent {
|
|
127
127
|
render
|
128
128
|
} = this.props;
|
129
129
|
return /*#__PURE__*/jsxs("span", {
|
130
|
-
className:
|
130
|
+
className: styles.container,
|
131
131
|
children: [render({
|
132
132
|
'data-test': 'ring-tag',
|
133
133
|
className: classes,
|
@@ -140,7 +140,7 @@ class Tag extends PureComponent {
|
|
140
140
|
disabled: this.props.disabled,
|
141
141
|
children: /*#__PURE__*/jsxs(Fragment, {
|
142
142
|
children: [this.renderAvatar(), this.renderCustomIcon(), this.renderImage(), /*#__PURE__*/jsx("span", {
|
143
|
-
className:
|
143
|
+
className: styles.content,
|
144
144
|
children: this.props.children
|
145
145
|
})]
|
146
146
|
})
|
@@ -149,7 +149,6 @@ class Tag extends PureComponent {
|
|
149
149
|
}
|
150
150
|
}
|
151
151
|
_defineProperty(Tag, "defaultProps", {
|
152
|
-
onRemove: () => {},
|
153
152
|
onClick: () => {},
|
154
153
|
readOnly: false,
|
155
154
|
disabled: false,
|
@@ -8,12 +8,11 @@ import TagsList from '../tags-list/tags-list.js';
|
|
8
8
|
import Caret from '../caret/caret.js';
|
9
9
|
import memoize from '../global/memoize.js';
|
10
10
|
import rerenderHOC from '../global/rerender-hoc.js';
|
11
|
-
import { S as Size,
|
11
|
+
import { S as Size, i as inputStyles } from '../_helpers/input.js';
|
12
12
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
13
13
|
import getUID from '../global/get-uid.js';
|
14
14
|
import { ControlLabel } from '../control-label/control-label.js';
|
15
15
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
16
|
-
import 'core-js/modules/es.array.reduce.js';
|
17
16
|
import 'core-js/modules/es.regexp.exec.js';
|
18
17
|
import 'core-js/modules/es.string.replace.js';
|
19
18
|
import 'core-js/modules/es.string.trim.js';
|
@@ -83,7 +82,7 @@ import '../text/text.js';
|
|
83
82
|
import '../_helpers/select__filter.js';
|
84
83
|
import '../tag/tag.js';
|
85
84
|
|
86
|
-
var
|
85
|
+
var styles = {"outerContainer":"outerContainer_rui_1f0c","container":"container_rui_1f0c","input":"input_rui_1f0c","tagsInput":"tagsInput_rui_2ffe","tagsInputDisabled":"tagsInputDisabled_rui_2ffe","tagsInputFocused":"tagsInputFocused_rui_2ffe","tagsList":"tagsList_rui_2ffe","tagsSelect":"tagsSelect_rui_2ffe"};
|
87
86
|
|
88
87
|
function noop() {}
|
89
88
|
/**
|
@@ -338,9 +337,9 @@ class TagsInput extends PureComponent {
|
|
338
337
|
height = this.context,
|
339
338
|
label
|
340
339
|
} = this.props;
|
341
|
-
const classes = classNames(
|
342
|
-
[
|
343
|
-
[
|
340
|
+
const classes = classNames(styles.tagsInput, [inputStyles["size".concat(size)]], [inputStyles["height".concat(height)]], {
|
341
|
+
[styles.tagsInputDisabled]: disabled,
|
342
|
+
[styles.tagsInputFocused]: focused
|
344
343
|
}, this.props.className);
|
345
344
|
return /*#__PURE__*/jsxs("div", {
|
346
345
|
// it transfers focus to input
|
@@ -360,8 +359,8 @@ class TagsInput extends PureComponent {
|
|
360
359
|
disabled: disabled,
|
361
360
|
canNotBeEmpty: canNotBeEmpty,
|
362
361
|
handleRemove: this.handleRemove,
|
363
|
-
className:
|
364
|
-
tagClassName:
|
362
|
+
className: styles.tagsList,
|
363
|
+
tagClassName: styles.tag,
|
365
364
|
handleClick: this.handleClick,
|
366
365
|
customTagComponent: this.props.customTagComponent,
|
367
366
|
children: /*#__PURE__*/jsx(Select, {
|
@@ -371,7 +370,7 @@ class TagsInput extends PureComponent {
|
|
371
370
|
type: Select.Type.INPUT_WITHOUT_CONTROLS,
|
372
371
|
inputPlaceholder: this.props.placeholder,
|
373
372
|
data: this.state.suggestions,
|
374
|
-
className: classNames(
|
373
|
+
className: classNames(styles.tagsSelect),
|
375
374
|
onSelect: this.addTag,
|
376
375
|
onFocus: this._focusHandler,
|
377
376
|
onBlur: this._blurHandler,
|
@@ -24,8 +24,8 @@ export default class TagsList<T extends TagType> extends Component<TagsListProps
|
|
24
24
|
customTagComponent: null;
|
25
25
|
canNotBeEmpty: boolean;
|
26
26
|
disabled: boolean;
|
27
|
-
handleClick: typeof noop;
|
28
|
-
handleRemove: typeof noop;
|
27
|
+
handleClick: () => typeof noop;
|
28
|
+
handleRemove: () => typeof noop;
|
29
29
|
};
|
30
30
|
renderTag(tag: T, focusTag: boolean): React.JSX.Element;
|
31
31
|
render(): React.JSX.Element;
|
@@ -68,8 +68,8 @@ _defineProperty(TagsList, "defaultProps", {
|
|
68
68
|
customTagComponent: null,
|
69
69
|
canNotBeEmpty: false,
|
70
70
|
disabled: false,
|
71
|
-
handleClick: noop,
|
72
|
-
handleRemove: noop
|
71
|
+
handleClick: () => noop,
|
72
|
+
handleRemove: () => noop
|
73
73
|
});
|
74
74
|
|
75
75
|
export { TagsList as default };
|
package/components/text/text.js
CHANGED
@@ -3,7 +3,7 @@ import { Component } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
5
5
|
|
6
|
-
var
|
6
|
+
var styles = {"text":"text_rui_2f31","sizeS":"sizeS_rui_2f31","sizeM":"sizeM_rui_2f31","sizeL":"sizeL_rui_2f31","info":"info_rui_2f31","bold":"bold_rui_2f31"};
|
7
7
|
|
8
8
|
const _excluded = ["children", "className", "info", "size", "bold"];
|
9
9
|
const TextSize = {
|
@@ -25,12 +25,12 @@ class Text extends Component {
|
|
25
25
|
bold
|
26
26
|
} = _this$props,
|
27
27
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
28
|
-
const classes = classNames(
|
29
|
-
[
|
30
|
-
[
|
31
|
-
[
|
32
|
-
[
|
33
|
-
[
|
28
|
+
const classes = classNames(styles.text, className, {
|
29
|
+
[styles.info]: info,
|
30
|
+
[styles.bold]: bold,
|
31
|
+
[styles.sizeS]: size === Text.Size.S,
|
32
|
+
[styles.sizeM]: size === Text.Size.M,
|
33
|
+
[styles.sizeL]: size === Text.Size.L
|
34
34
|
});
|
35
35
|
return /*#__PURE__*/jsx("span", _objectSpread2(_objectSpread2({
|
36
36
|
className: classes
|
@@ -4,16 +4,15 @@ import classNames from 'classnames';
|
|
4
4
|
import joinDataTestAttributes from '../global/data-tests.js';
|
5
5
|
import ControlHelp from '../control-help/control-help.js';
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
7
|
-
import 'core-js/modules/es.array.reduce.js';
|
8
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
9
8
|
|
10
|
-
var
|
9
|
+
var styles = {"toggle":"toggle_rui_21f9","switch":"switch_rui_21f9","disabled":"disabled_rui_21f9","label":"label_rui_21f9","help":"help_rui_21f9","leftLabel":"leftLabel_rui_21f9","switchWrapper":"switchWrapper_rui_21f9","input":"input_rui_21f9","size16":"size16_rui_21f9","size14":"size14_rui_21f9","size20":"size20_rui_21f9"};
|
11
10
|
|
12
11
|
const _excluded = ["className", "children", "disabled", "title", "leftLabel", "size", "data-test", "help", "onTransitionEnd"];
|
13
12
|
const Size = {
|
14
|
-
Size14:
|
15
|
-
Size16:
|
16
|
-
Size20:
|
13
|
+
Size14: styles.size14,
|
14
|
+
Size16: styles.size16,
|
15
|
+
Size20: styles.size20
|
17
16
|
};
|
18
17
|
class Toggle extends PureComponent {
|
19
18
|
render() {
|
@@ -30,33 +29,33 @@ class Toggle extends PureComponent {
|
|
30
29
|
onTransitionEnd
|
31
30
|
} = _this$props,
|
32
31
|
restProps = _objectWithoutProperties(_this$props, _excluded);
|
33
|
-
const classes = classNames(className, size,
|
32
|
+
const classes = classNames(className, size, styles.toggle, disabled && styles.disabled);
|
34
33
|
return /*#__PURE__*/jsxs("label", {
|
35
34
|
className: classes,
|
36
35
|
title: title,
|
37
36
|
"data-test": joinDataTestAttributes('ring-toggle', dataTest),
|
38
37
|
children: [leftLabel && /*#__PURE__*/jsxs("span", {
|
39
|
-
className:
|
38
|
+
className: styles.leftLabel,
|
40
39
|
children: [leftLabel, help && /*#__PURE__*/jsx(ControlHelp, {
|
41
|
-
className:
|
40
|
+
className: styles.help,
|
42
41
|
children: help
|
43
42
|
})]
|
44
43
|
}), /*#__PURE__*/jsxs("span", {
|
45
|
-
className:
|
44
|
+
className: styles.switchWrapper,
|
46
45
|
children: [/*#__PURE__*/jsx("input", _objectSpread2(_objectSpread2({
|
47
46
|
"data-test": "ring-toggle-input"
|
48
47
|
}, restProps), {}, {
|
49
48
|
type: "checkbox",
|
50
49
|
disabled: disabled,
|
51
|
-
className:
|
50
|
+
className: styles.input
|
52
51
|
})), /*#__PURE__*/jsx("span", {
|
53
|
-
className:
|
52
|
+
className: styles.switch,
|
54
53
|
onTransitionEnd: onTransitionEnd
|
55
54
|
})]
|
56
55
|
}), children && /*#__PURE__*/jsxs("div", {
|
57
|
-
className:
|
56
|
+
className: styles.label,
|
58
57
|
children: [children, help && /*#__PURE__*/jsx(ControlHelp, {
|
59
|
-
className:
|
58
|
+
className: styles.help,
|
60
59
|
children: help
|
61
60
|
})]
|
62
61
|
})]
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { AllHTMLAttributes, Component, ReactNode } from 'react';
|
2
1
|
import * as React from 'react';
|
2
|
+
import { AllHTMLAttributes, Component, ReactNode } from 'react';
|
3
3
|
import Popup, { PopupAttrs } from '../popup/popup';
|
4
4
|
import { Listeners } from '../global/dom';
|
5
|
+
import Theme from '../global/theme';
|
5
6
|
interface Context {
|
6
7
|
onNestedTooltipShow: () => void;
|
7
8
|
onNestedTooltipHide: () => void;
|
@@ -12,6 +13,7 @@ export interface TooltipProps extends Omit<AllHTMLAttributes<HTMLSpanElement>, '
|
|
12
13
|
selfOverflowOnly?: boolean | null | undefined;
|
13
14
|
popupProps?: Partial<PopupAttrs> | null | undefined;
|
14
15
|
title?: ReactNode | null | undefined;
|
16
|
+
theme?: Theme;
|
15
17
|
'data-test'?: string | null | undefined;
|
16
18
|
long?: boolean | null | undefined;
|
17
19
|
}
|
@@ -22,6 +24,7 @@ export default class Tooltip extends Component<TooltipProps> {
|
|
22
24
|
static defaultProps: {
|
23
25
|
title: string;
|
24
26
|
selfOverflowOnly: boolean;
|
27
|
+
theme: Theme;
|
25
28
|
popupProps: {};
|
26
29
|
};
|
27
30
|
state: {
|
@@ -6,6 +6,7 @@ import Popup from '../popup/popup.js';
|
|
6
6
|
import { Listeners } from '../global/dom.js';
|
7
7
|
import joinDataTestAttributes from '../global/data-tests.js';
|
8
8
|
import scheduleRAF from '../global/schedule-raf.js';
|
9
|
+
import { T as Theme, a as ThemeProvider } from '../_helpers/theme.js';
|
9
10
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
10
11
|
import 'core-js/modules/es.regexp.exec.js';
|
11
12
|
import 'core-js/modules/es.string.replace.js';
|
@@ -21,11 +22,10 @@ import '../popup/position.js';
|
|
21
22
|
import 'core-js/modules/es.array.sort.js';
|
22
23
|
import '../popup/popup.consts.js';
|
23
24
|
import '../popup/popup.target.js';
|
24
|
-
import 'core-js/modules/es.array.reduce.js';
|
25
25
|
|
26
|
-
var
|
26
|
+
var styles = {"tooltip":"tooltip_rui_a84d","long":"long_rui_a84d"};
|
27
27
|
|
28
|
-
const _excluded = ["children", "data-test", "title", "delay", "selfOverflowOnly", "popupProps", "long"];
|
28
|
+
const _excluded = ["children", "data-test", "title", "delay", "theme", "selfOverflowOnly", "popupProps", "long"];
|
29
29
|
const scheduleScroll = scheduleRAF();
|
30
30
|
const TooltipContext = /*#__PURE__*/createContext(undefined);
|
31
31
|
/**
|
@@ -125,8 +125,14 @@ class Tooltip extends Component {
|
|
125
125
|
}
|
126
126
|
addListeners() {
|
127
127
|
if (this.containerNode != null) {
|
128
|
-
this.listeners.add(this.containerNode, '
|
129
|
-
this.listeners.add(this.containerNode, '
|
128
|
+
this.listeners.add(this.containerNode, 'mouseenter', this.tryToShowPopup);
|
129
|
+
this.listeners.add(this.containerNode, 'mouseleave', ev => {
|
130
|
+
var _this$popup;
|
131
|
+
if (ev.relatedTarget && (_this$popup = this.popup) !== null && _this$popup !== void 0 && (_this$popup = _this$popup.container) !== null && _this$popup !== void 0 && _this$popup.contains(ev.relatedTarget)) {
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
this.hidePopup();
|
135
|
+
});
|
130
136
|
}
|
131
137
|
this.listeners.add(document, 'scroll', () => scheduleScroll(this.hidePopup), {
|
132
138
|
passive: true
|
@@ -139,6 +145,7 @@ class Tooltip extends Component {
|
|
139
145
|
'data-test': dataTest,
|
140
146
|
title,
|
141
147
|
delay,
|
148
|
+
theme,
|
142
149
|
selfOverflowOnly,
|
143
150
|
popupProps,
|
144
151
|
long
|
@@ -161,21 +168,28 @@ class Tooltip extends Component {
|
|
161
168
|
ref: this.containerRef,
|
162
169
|
"data-test": joinDataTestAttributes('ring-tooltip', dataTest),
|
163
170
|
"data-test-title": typeof title === 'string' ? title : undefined,
|
164
|
-
children: [children, /*#__PURE__*/jsx(
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
171
|
+
children: [children, /*#__PURE__*/jsx(ThemeProvider, {
|
172
|
+
theme: theme,
|
173
|
+
passToPopups: true,
|
174
|
+
WrapperComponent: props => /*#__PURE__*/jsx("span", _objectSpread2({}, props)),
|
175
|
+
children: /*#__PURE__*/jsx(Popup, _objectSpread2(_objectSpread2({
|
176
|
+
trapFocus: false,
|
177
|
+
anchorElement: this.containerNode,
|
178
|
+
hidden: !this.state.showPopup || this.state.showNestedPopup,
|
179
|
+
onCloseAttempt: this.hidePopup,
|
180
|
+
maxHeight: 400,
|
181
|
+
className: classNames(styles.tooltip, {
|
182
|
+
[styles.long]: long
|
183
|
+
}),
|
184
|
+
attached: false,
|
185
|
+
onMouseOut: this.hidePopup,
|
186
|
+
top: 4,
|
187
|
+
dontCloseOnAnchorClick: true,
|
188
|
+
ref: this.popupRef
|
189
|
+
}, popupProps), {}, {
|
190
|
+
children: title
|
191
|
+
}))
|
192
|
+
})]
|
179
193
|
}))
|
180
194
|
});
|
181
195
|
}
|
@@ -183,6 +197,7 @@ class Tooltip extends Component {
|
|
183
197
|
_defineProperty(Tooltip, "defaultProps", {
|
184
198
|
title: '',
|
185
199
|
selfOverflowOnly: false,
|
200
|
+
theme: Theme.DARK,
|
186
201
|
popupProps: {}
|
187
202
|
});
|
188
203
|
_defineProperty(Tooltip, "PopupProps", Popup.PopupProps);
|
@@ -15,7 +15,6 @@ import 'react';
|
|
15
15
|
import 'react-dom';
|
16
16
|
import 'classnames';
|
17
17
|
import '../global/data-tests.js';
|
18
|
-
import 'core-js/modules/es.array.reduce.js';
|
19
18
|
import '../link/clickableLink.js';
|
20
19
|
import '../_helpers/link.js';
|
21
20
|
import '@jetbrains/icons/exception';
|
@@ -260,7 +259,7 @@ class UserAgreementService {
|
|
260
259
|
translations,
|
261
260
|
preview
|
262
261
|
}, restOptions);
|
263
|
-
_this.reactRoot.render(
|
262
|
+
_this.reactRoot.render(/*#__PURE__*/jsx(ControlsHeightContext.Provider, {
|
264
263
|
value: getGlobalControlsHeight(),
|
265
264
|
children: /*#__PURE__*/jsx(UserAgreement, _objectSpread2({}, props))
|
266
265
|
}));
|
@@ -3,8 +3,8 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { PureComponent } from 'react';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import Dialog from '../dialog/dialog.js';
|
6
|
-
import 'core-js/modules/es.array.reduce.js';
|
7
6
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
7
|
+
import '../_helpers/island.js';
|
8
8
|
import HeaderWrapper from '../island/header.js';
|
9
9
|
import ContentWrapper from '../island/content.js';
|
10
10
|
import Panel from '../panel/panel.js';
|
@@ -16,7 +16,6 @@ import '../island/island.js';
|
|
16
16
|
import '../global/data-tests.js';
|
17
17
|
import '../island/adaptive-island-hoc.js';
|
18
18
|
import '../global/linear-function.js';
|
19
|
-
import '../_helpers/island.js';
|
20
19
|
import 'element-resize-detector';
|
21
20
|
import '../global/schedule-raf.js';
|
22
21
|
import '../global/get-uid.js';
|
@@ -43,7 +42,7 @@ import '../global/controls-height.js';
|
|
43
42
|
import '../_helpers/button__classes.js';
|
44
43
|
import '../i18n/i18n.js';
|
45
44
|
|
46
|
-
var
|
45
|
+
var style = {"extra-small-screen-media":"(max-width: 639px)","agreementDialog":"agreementDialog_rui_7e82","dialogContent":"dialogContent_rui_7e82","suggestion":"suggestion_rui_7e82","remindLaterButton":"remindLaterButton_rui_7e82"};
|
47
46
|
|
48
47
|
function noop() {}
|
49
48
|
/**
|
@@ -83,8 +82,8 @@ class UserAgreement extends PureComponent {
|
|
83
82
|
return /*#__PURE__*/jsxs(Dialog, {
|
84
83
|
label: (_translations$userAgr = translations === null || translations === void 0 ? void 0 : translations.userAgreement) !== null && _translations$userAgr !== void 0 ? _translations$userAgr : translate('userAgreement'),
|
85
84
|
show: show,
|
86
|
-
className: classNames(
|
87
|
-
contentClassName:
|
85
|
+
className: classNames(style.agreementDialog, className),
|
86
|
+
contentClassName: style.dialogContent,
|
88
87
|
trapFocus: true,
|
89
88
|
autoFocusFirst: false,
|
90
89
|
"data-test": "user-agreement",
|
@@ -96,7 +95,7 @@ class UserAgreement extends PureComponent {
|
|
96
95
|
children: children
|
97
96
|
}), !preview && /*#__PURE__*/jsxs(Panel, {
|
98
97
|
children: [onRemindLater && !scrolledDown && /*#__PURE__*/jsx("div", {
|
99
|
-
className:
|
98
|
+
className: style.suggestion,
|
100
99
|
children: (_translations$scrollT = translations === null || translations === void 0 ? void 0 : translations.scrollToAccept) !== null && _translations$scrollT !== void 0 ? _translations$scrollT : translate('scrollToAccept')
|
101
100
|
}), /*#__PURE__*/jsx(Button, {
|
102
101
|
primary: true,
|
@@ -110,10 +109,10 @@ class UserAgreement extends PureComponent {
|
|
110
109
|
"data-test": "decline",
|
111
110
|
children: (_translations$decline = translations === null || translations === void 0 ? void 0 : translations.decline) !== null && _translations$decline !== void 0 ? _translations$decline : translate('decline')
|
112
111
|
}), !onRemindLater && !scrolledDown && /*#__PURE__*/jsx("span", {
|
113
|
-
className:
|
112
|
+
className: style.suggestion,
|
114
113
|
children: (_translations$scrollT2 = translations === null || translations === void 0 ? void 0 : translations.scrollToAccept) !== null && _translations$scrollT2 !== void 0 ? _translations$scrollT2 : translate('scrollToAccept')
|
115
114
|
}), onRemindLater && /*#__PURE__*/jsx(Button, {
|
116
|
-
className:
|
115
|
+
className: style.remindLaterButton,
|
117
116
|
onClick: onRemindLater,
|
118
117
|
"data-test": "later",
|
119
118
|
children: (_translations$remindL = translations === null || translations === void 0 ? void 0 : translations.remindLater) !== null && _translations$remindL !== void 0 ? _translations$remindL : translate('remindLater')
|
@@ -6,9 +6,10 @@ import '@jetbrains/icons/copy';
|
|
6
6
|
import '../avatar/avatar.js';
|
7
7
|
import '../link/link.js';
|
8
8
|
import '../clipboard/clipboard.js';
|
9
|
-
import '../
|
9
|
+
import '../tag/tag.js';
|
10
10
|
import '../icon/icon.js';
|
11
11
|
import '../i18n/i18n-context.js';
|
12
|
+
import '../tooltip/tooltip.js';
|
12
13
|
export { U as default } from '../_helpers/card.js';
|
13
14
|
import 'react/jsx-runtime';
|
14
15
|
import '../icon/icon__constants.js';
|
@@ -19,7 +20,6 @@ import '../global/dom.js';
|
|
19
20
|
import '../avatar/fallback-avatar.js';
|
20
21
|
import '../global/get-uid.js';
|
21
22
|
import '../global/data-tests.js';
|
22
|
-
import 'core-js/modules/es.array.reduce.js';
|
23
23
|
import '../link/clickableLink.js';
|
24
24
|
import '../_helpers/link.js';
|
25
25
|
import '../alert-service/alert-service.js';
|
@@ -53,4 +53,5 @@ import 'core-js/modules/es.array.sort.js';
|
|
53
53
|
import '../popup/popup.consts.js';
|
54
54
|
import '../alert/container.js';
|
55
55
|
import '../clipboard/clipboard-fallback.js';
|
56
|
+
import '@jetbrains/icons/close-12px';
|
56
57
|
import '../i18n/i18n.js';
|
@@ -3,11 +3,10 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { Component } from 'react';
|
4
4
|
import LoaderInline from '../loader-inline/loader-inline.js';
|
5
5
|
import UserCardTooltip from './tooltip.js';
|
6
|
-
import {
|
6
|
+
import { s as styles } from '../_helpers/card.js';
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
8
8
|
import 'classnames';
|
9
9
|
import '../global/data-tests.js';
|
10
|
-
import 'core-js/modules/es.array.reduce.js';
|
11
10
|
import '../dropdown/dropdown.js';
|
12
11
|
import '../global/typescript-utils.js';
|
13
12
|
import '../_helpers/anchor.js';
|
@@ -56,9 +55,11 @@ import '@jetbrains/icons/close';
|
|
56
55
|
import '../_helpers/theme.js';
|
57
56
|
import '../alert/container.js';
|
58
57
|
import '../clipboard/clipboard-fallback.js';
|
59
|
-
import '../
|
58
|
+
import '../tag/tag.js';
|
59
|
+
import '@jetbrains/icons/close-12px';
|
60
60
|
import '../i18n/i18n-context.js';
|
61
61
|
import '../i18n/i18n.js';
|
62
|
+
import '../tooltip/tooltip.js';
|
62
63
|
|
63
64
|
const _excluded = ["children", "userDataSource"];
|
64
65
|
class SmartUserCardTooltip extends Component {
|
@@ -89,7 +90,7 @@ class SmartUserCardTooltip extends Component {
|
|
89
90
|
}
|
90
91
|
});
|
91
92
|
_defineProperty(this, "renderNoUser", () => this.state.loading ? /*#__PURE__*/jsx("div", {
|
92
|
-
className:
|
93
|
+
className: styles.userCardSpaced,
|
93
94
|
children: /*#__PURE__*/jsx(LoaderInline, {})
|
94
95
|
}) : '');
|
95
96
|
}
|