@jetbrains/ring-ui-built 7.0.0-beta.5 → 7.0.0-beta.6
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/button__classes.js +11 -10
- package/components/_helpers/input.js +1 -1
- package/components/_helpers/query-assist__suggestions.js +1 -1
- package/components/auth/iframe-flow.js +1 -1
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +1 -1
- package/components/button/button.js +30 -32
- package/components/button/button__classes.d.ts +1 -1
- package/components/confirm/confirm.js +1 -1
- package/components/confirm-service/confirm-service.js +1 -1
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/item.js +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-popup.js +1 -1
- package/components/dialog/dialog.js +1 -1
- package/components/header/header-icon.js +1 -1
- package/components/header/profile.js +1 -1
- package/components/input/input.js +1 -1
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.js +1 -1
- package/components/message/message.js +2 -2
- package/components/old-browsers-message/white-list.js +2 -2
- package/components/pager/pager.js +16 -15
- package/components/select/select.d.ts +3 -0
- package/components/select/select.js +13 -2
- package/components/select/select__filter.js +1 -1
- package/components/style.css +1 -1
- package/components/toggle/toggle.js +1 -1
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.js +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import classNames from 'classnames';
|
2
2
|
|
3
|
-
var modules_e81895c9 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","light":"light_rui_2ac4","heightS":"heightS_rui_6ad6","heightM":"heightM_rui_6ad6","heightL":"heightL_rui_6ad6","button":"button_rui_6ad6","
|
3
|
+
var modules_e81895c9 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","light":"light_rui_2ac4","heightS":"heightS_rui_6ad6","heightM":"heightM_rui_6ad6","heightL":"heightL_rui_6ad6","button":"button_rui_6ad6","block":"block_rui_6ad6","inline":"inline_rui_6ad6","icon":"icon_rui_6ad6","withNormalIcon":"withNormalIcon_rui_6ad6","active":"active_rui_6ad6","primaryBlock":"primaryBlock_rui_6ad6","disabled":"disabled_rui_6ad6","loader":"loader_rui_6ad6","loaderBackground":"loaderBackground_rui_6ad6","danger":"danger_rui_6ad6","iconOnly":"iconOnly_rui_6ad6","text-loading":"text-loading_rui_6ad6","progress":"progress_rui_6ad6","delayed":"delayed_rui_6ad6","short":"short_rui_6ad6","dropdownIcon":"dropdownIcon_rui_6ad6","primary":"primary_rui_6ad6"};
|
4
4
|
|
5
5
|
function getButtonClasses(_ref) {
|
6
6
|
let {
|
@@ -10,26 +10,27 @@ function getButtonClasses(_ref) {
|
|
10
10
|
loader,
|
11
11
|
primary,
|
12
12
|
short,
|
13
|
-
text,
|
14
13
|
inline,
|
15
14
|
danger,
|
16
15
|
delayed,
|
17
16
|
icon,
|
18
|
-
height
|
17
|
+
height,
|
18
|
+
children
|
19
19
|
} = _ref;
|
20
|
-
const
|
21
|
-
|
20
|
+
const iconOnly = icon && !children;
|
21
|
+
const primaryBlock = primary && !inline;
|
22
|
+
const withNormalIcon = icon && !active && !danger && !primary && !disabled && (!inline || iconOnly);
|
23
|
+
return classNames(modules_e81895c9.button, className, modules_e81895c9["height".concat(height)], inline ? modules_e81895c9.inline : modules_e81895c9.block, {
|
22
24
|
[modules_e81895c9.active]: active,
|
23
25
|
[modules_e81895c9.danger]: danger,
|
24
26
|
[modules_e81895c9.delayed]: delayed,
|
25
|
-
[modules_e81895c9.withIcon]: icon,
|
26
27
|
[modules_e81895c9.withNormalIcon]: withNormalIcon,
|
27
|
-
[modules_e81895c9.
|
28
|
-
[modules_e81895c9.loader]: loader && !icon,
|
28
|
+
[modules_e81895c9.loader]: loader,
|
29
29
|
[modules_e81895c9.primary]: primary,
|
30
|
+
[modules_e81895c9.primaryBlock]: primaryBlock,
|
30
31
|
[modules_e81895c9.short]: short,
|
31
|
-
[modules_e81895c9.
|
32
|
-
[modules_e81895c9.
|
32
|
+
[modules_e81895c9.disabled]: disabled,
|
33
|
+
[modules_e81895c9.iconOnly]: iconOnly
|
33
34
|
});
|
34
35
|
}
|
35
36
|
|
@@ -13,7 +13,7 @@ import { ControlLabel } from '../control-label/control-label.js';
|
|
13
13
|
import ControlHelp from '../control-help/control-help.js';
|
14
14
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
15
15
|
|
16
|
-
var modules_88cfaf40 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","light":"light_rui_2ac4","heightS":"heightS_rui_1f0c","heightM":"heightM_rui_1f0c","heightL":"heightL_rui_1f0c","button":"button_rui_1f0c","
|
16
|
+
var modules_88cfaf40 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","light":"light_rui_2ac4","heightS":"heightS_rui_1f0c","heightM":"heightM_rui_1f0c","heightL":"heightL_rui_1f0c","button":"button_rui_1f0c","block":"block_rui_1f0c","inline":"inline_rui_1f0c","icon":"icon_rui_1f0c","withNormalIcon":"withNormalIcon_rui_1f0c","active":"active_rui_1f0c","primaryBlock":"primaryBlock_rui_1f0c","disabled":"disabled_rui_1f0c","loader":"loader_rui_1f0c","loaderBackground":"loaderBackground_rui_1f0c","danger":"danger_rui_1f0c","iconOnly":"iconOnly_rui_1f0c","text-loading":"text-loading_rui_1f0c","progress":"progress_rui_1f0c","delayed":"delayed_rui_1f0c","short":"short_rui_1f0c","dropdownIcon":"dropdownIcon_rui_1f0c","primary":"primary_rui_1f0c","outerContainer":"outerContainer_rui_1f0c","borderless":"borderless_rui_1f0c","container":"container_rui_1f0c","input":"input_rui_1f0c","error":"error_rui_1f0c","withIcon":"withIcon_rui_1f0c","clearable":"clearable_rui_1f0c","clear":"clear_rui_1f0c","empty":"empty_rui_1f0c","errorText":"errorText_rui_1f0c","helpText":"helpText_rui_1f0c","sizeS":"sizeS_rui_1f0c","sizeM":"sizeM_rui_1f0c","sizeL":"sizeL_rui_1f0c","sizeFULL":"sizeFULL_rui_1f0c"};
|
17
17
|
|
18
18
|
const _excluded = ["size", "multiline", "borderless", "label", "labelType", "error", "help", "className", "inputClassName", "children", "value", "onClear", "disabled", "inputRef", "onChange", "enableShortcuts", "id", "placeholder", "icon", "translations", "height", "afterInput"];
|
19
19
|
function noop() {}
|
@@ -2,7 +2,7 @@ import 'core-js/modules/es.symbol.description.js';
|
|
2
2
|
import List from '../list/list.js';
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
4
4
|
|
5
|
-
var modules_da7ab055 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","overInputZIndex":"2","inputGap":"calc(var(--ring-unit)*3)","light":"light_rui_2ac4","heightS":"heightS_rui_0eb8","heightM":"heightM_rui_0eb8","heightL":"heightL_rui_0eb8","button":"button_rui_0eb8","
|
5
|
+
var modules_da7ab055 = {"button-shadow":"inset 0 0 0 1px","loaderWidth":"calc(var(--ring-unit)*8)","overInputZIndex":"2","inputGap":"calc(var(--ring-unit)*3)","light":"light_rui_2ac4","heightS":"heightS_rui_0eb8","heightM":"heightM_rui_0eb8","heightL":"heightL_rui_0eb8","button":"button_rui_0eb8","block":"block_rui_0eb8","inline":"inline_rui_0eb8","icon":"icon_rui_0eb8","withNormalIcon":"withNormalIcon_rui_0eb8","active":"active_rui_0eb8","primaryBlock":"primaryBlock_rui_0eb8","disabled":"disabled_rui_0eb8","loader":"loader_rui_0eb8","loaderBackground":"loaderBackground_rui_0eb8","danger":"danger_rui_0eb8","iconOnly":"iconOnly_rui_0eb8","text-loading":"text-loading_rui_0eb8","progress":"progress_rui_0eb8","delayed":"delayed_rui_0eb8","short":"short_rui_0eb8","dropdownIcon":"dropdownIcon_rui_0eb8","primary":"primary_rui_0eb8","queryAssist":"queryAssist_rui_0eb8","error":"error_rui_0eb8","queryAssistDisabled":"queryAssistDisabled_rui_0eb8","huge":"huge_rui_0eb8","actions":"actions_rui_0eb8","input":"input_rui_0eb8","letter-text":"letter-text_rui_0eb8","letterDefault":"letterDefault_rui_0eb8","letter-field-name":"letter-field-name_rui_0eb8","letter-field-value":"letter-field-value_rui_0eb8","letter-operator":"letter-operator_rui_0eb8","letter-error":"letter-error_rui_0eb8","highlight":"highlight_rui_0eb8","service":"service_rui_0eb8","placeholder":"placeholder_rui_0eb8 resetButton_rui_f295","hugePlaceholder":"hugePlaceholder_rui_0eb8","letter":"letter_rui_0eb8","rightSearchButton":"rightSearchButton_rui_0eb8","clear":"clear_rui_0eb8","withoutGlass":"withoutGlass_rui_0eb8","loaderActive":"loaderActive_rui_0eb8","loaderOnTheRight":"loaderOnTheRight_rui_0eb8","inputRevertOrder":"inputRevertOrder_rui_0eb8"};
|
6
6
|
|
7
7
|
const ICON_ID_LENGTH = 44;
|
8
8
|
class QueryAssistSuggestions {
|
@@ -33,8 +33,8 @@ import '../tab-trap/tab-trap.js';
|
|
33
33
|
import '../global/dom.js';
|
34
34
|
import '../button/button.js';
|
35
35
|
import '@jetbrains/icons/chevron-down';
|
36
|
-
import '../icon/icon.js';
|
37
36
|
import 'util-deprecate';
|
37
|
+
import '../icon/icon.js';
|
38
38
|
import '../icon/icon__constants.js';
|
39
39
|
import '../_helpers/icon__svg.js';
|
40
40
|
import 'core-js/modules/es.string.replace.js';
|
@@ -32,8 +32,8 @@ import '../popup/popup.target.js';
|
|
32
32
|
import '../_helpers/dialog__body-scroll-preventer.js';
|
33
33
|
import 'scrollbar-width';
|
34
34
|
import '@jetbrains/icons/chevron-down';
|
35
|
-
import '../icon/icon.js';
|
36
35
|
import 'util-deprecate';
|
36
|
+
import '../icon/icon.js';
|
37
37
|
import '../icon/icon__constants.js';
|
38
38
|
import '../_helpers/icon__svg.js';
|
39
39
|
import '../global/memoize.js';
|
@@ -31,8 +31,8 @@ import '../tab-trap/tab-trap.js';
|
|
31
31
|
import '../global/dom.js';
|
32
32
|
import '../button/button.js';
|
33
33
|
import '@jetbrains/icons/chevron-down';
|
34
|
-
import '../icon/icon.js';
|
35
34
|
import 'util-deprecate';
|
35
|
+
import '../icon/icon.js';
|
36
36
|
import '../icon/icon__constants.js';
|
37
37
|
import '../_helpers/icon__svg.js';
|
38
38
|
import '../global/memoize.js';
|
@@ -3,25 +3,33 @@ import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
3
|
import { PureComponent, createRef } from 'react';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
6
|
+
import deprecate from 'util-deprecate';
|
6
7
|
import Icon from '../icon/icon.js';
|
7
8
|
import ClickableLink from '../link/clickableLink.js';
|
8
9
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
9
10
|
import { g as getButtonClasses, m as modules_e81895c9 } from '../_helpers/button__classes.js';
|
10
|
-
import { jsxs,
|
11
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
11
12
|
import { Size } from '../icon/icon__constants.js';
|
12
|
-
import 'util-deprecate';
|
13
13
|
import '../_helpers/icon__svg.js';
|
14
14
|
import 'core-js/modules/es.regexp.exec.js';
|
15
15
|
import 'core-js/modules/es.string.replace.js';
|
16
16
|
import '../global/memoize.js';
|
17
17
|
|
18
|
-
const _excluded = ["active", "danger", "delayed", "loader", "primary", "short", "text", "
|
18
|
+
const _excluded = ["active", "danger", "delayed", "loader", "primary", "short", "text", "dropdown", "height", "icon", "iconSize", "iconClassName", "iconSuppressSizeWarning", "className", "children", "inline"];
|
19
|
+
const warnText = deprecate(() => {}, 'Button: "text" prop is deprecated and will be removed in 8.0. Use inline instead.');
|
20
|
+
/**
|
21
|
+
* @name Button
|
22
|
+
*/
|
23
|
+
/**
|
24
|
+
* A component for displaying variously styled buttons.
|
25
|
+
*/
|
19
26
|
class Button extends PureComponent {
|
20
27
|
constructor() {
|
21
28
|
super(...arguments);
|
22
29
|
_defineProperty(this, "buttonRef", /*#__PURE__*/createRef());
|
23
30
|
}
|
24
31
|
render() {
|
32
|
+
var _ref;
|
25
33
|
const _this$props = this.props,
|
26
34
|
{
|
27
35
|
// Modifiers
|
@@ -32,44 +40,34 @@ class Button extends PureComponent {
|
|
32
40
|
primary,
|
33
41
|
short,
|
34
42
|
text,
|
35
|
-
inline,
|
36
43
|
dropdown,
|
37
|
-
height
|
44
|
+
height,
|
38
45
|
// Props
|
39
46
|
icon,
|
40
47
|
iconSize,
|
41
48
|
iconClassName,
|
42
49
|
iconSuppressSizeWarning,
|
43
50
|
className,
|
44
|
-
children
|
51
|
+
children,
|
52
|
+
inline
|
45
53
|
} = _this$props,
|
46
54
|
props = _objectWithoutProperties(_this$props, _excluded);
|
47
|
-
const
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
inline,
|
58
|
-
height
|
59
|
-
});
|
60
|
-
const content = /*#__PURE__*/jsxs("span", {
|
61
|
-
className: modules_e81895c9.content,
|
62
|
-
children: [icon && /*#__PURE__*/jsx("span", {
|
55
|
+
const isInline = (_ref = inline !== null && inline !== void 0 ? inline : text) !== null && _ref !== void 0 ? _ref : icon != null;
|
56
|
+
if (text != null) {
|
57
|
+
warnText();
|
58
|
+
}
|
59
|
+
const classes = getButtonClasses(_objectSpread2(_objectSpread2({}, this.props), {}, {
|
60
|
+
inline: isInline,
|
61
|
+
height: height !== null && height !== void 0 ? height : this.context
|
62
|
+
}));
|
63
|
+
const content = /*#__PURE__*/jsxs(Fragment, {
|
64
|
+
children: [icon && /*#__PURE__*/jsx(Icon, {
|
63
65
|
className: classNames(modules_e81895c9.icon, iconClassName),
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
})
|
70
|
-
}), children && /*#__PURE__*/jsx("span", {
|
71
|
-
children: children
|
72
|
-
}), dropdown && /*#__PURE__*/jsx(Icon, {
|
66
|
+
glyph: icon,
|
67
|
+
size: iconSize,
|
68
|
+
loading: loader && isInline,
|
69
|
+
suppressSizeWarning: iconSuppressSizeWarning
|
70
|
+
}), children, dropdown && /*#__PURE__*/jsx(Icon, {
|
73
71
|
glyph: chevronDownIcon,
|
74
72
|
className: modules_e81895c9.dropdownIcon
|
75
73
|
})]
|
@@ -79,7 +77,7 @@ class Button extends PureComponent {
|
|
79
77
|
}, props), {}, {
|
80
78
|
className: classes,
|
81
79
|
children: /*#__PURE__*/jsxs(Fragment, {
|
82
|
-
children: [loader && !
|
80
|
+
children: [loader && !isInline && /*#__PURE__*/jsx("div", {
|
83
81
|
className: modules_e81895c9.loaderBackground
|
84
82
|
}), content]
|
85
83
|
})
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { ButtonProps } from './button';
|
2
|
-
export declare function getButtonClasses({ className, active, disabled, loader, primary, short,
|
2
|
+
export declare function getButtonClasses({ className, active, disabled, loader, primary, short, inline, danger, delayed, icon, height, children }: ButtonProps): string;
|
@@ -32,8 +32,8 @@ import '../popup/popup.target.js';
|
|
32
32
|
import '../_helpers/dialog__body-scroll-preventer.js';
|
33
33
|
import 'scrollbar-width';
|
34
34
|
import '@jetbrains/icons/chevron-down';
|
35
|
-
import '../icon/icon.js';
|
36
35
|
import 'util-deprecate';
|
36
|
+
import '../icon/icon.js';
|
37
37
|
import '../icon/icon__constants.js';
|
38
38
|
import '../_helpers/icon__svg.js';
|
39
39
|
import 'core-js/modules/es.string.replace.js';
|
@@ -31,8 +31,8 @@ import '../tab-trap/tab-trap.js';
|
|
31
31
|
import '../global/dom.js';
|
32
32
|
import '../button/button.js';
|
33
33
|
import '@jetbrains/icons/chevron-down';
|
34
|
-
import '../icon/icon.js';
|
35
34
|
import 'util-deprecate';
|
35
|
+
import '../icon/icon.js';
|
36
36
|
import '../icon/icon__constants.js';
|
37
37
|
import '../_helpers/icon__svg.js';
|
38
38
|
import 'core-js/modules/es.string.replace.js';
|
@@ -30,8 +30,8 @@ import '../_helpers/link.js';
|
|
30
30
|
import '../text/text.js';
|
31
31
|
import '../loader-inline/loader-inline.js';
|
32
32
|
import '../button/button.js';
|
33
|
-
import '../icon/icon.js';
|
34
33
|
import 'util-deprecate';
|
34
|
+
import '../icon/icon.js';
|
35
35
|
import '../icon/icon__constants.js';
|
36
36
|
import '../_helpers/icon__svg.js';
|
37
37
|
import 'core-js/modules/es.string.replace.js';
|
@@ -14,8 +14,8 @@ import '../global/data-tests.js';
|
|
14
14
|
import 'core-js/modules/es.array.reduce.js';
|
15
15
|
import '../link/clickableLink.js';
|
16
16
|
import '../_helpers/link.js';
|
17
|
-
import '../icon/icon.js';
|
18
17
|
import 'util-deprecate';
|
18
|
+
import '../icon/icon.js';
|
19
19
|
import '../icon/icon__constants.js';
|
20
20
|
import '../_helpers/icon__svg.js';
|
21
21
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -12,8 +12,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
12
12
|
import '@jetbrains/icons/close-12px';
|
13
13
|
import '../button/button.js';
|
14
14
|
import '@jetbrains/icons/chevron-down';
|
15
|
-
import '../icon/icon.js';
|
16
15
|
import 'util-deprecate';
|
16
|
+
import '../icon/icon.js';
|
17
17
|
import '../icon/icon__constants.js';
|
18
18
|
import '../_helpers/icon__svg.js';
|
19
19
|
import '../global/memoize.js';
|
@@ -23,8 +23,8 @@ import '../_helpers/input.js';
|
|
23
23
|
import '@jetbrains/icons/close-12px';
|
24
24
|
import '../button/button.js';
|
25
25
|
import '@jetbrains/icons/chevron-down';
|
26
|
-
import '../icon/icon.js';
|
27
26
|
import 'util-deprecate';
|
27
|
+
import '../icon/icon.js';
|
28
28
|
import '../icon/icon__constants.js';
|
29
29
|
import '../_helpers/icon__svg.js';
|
30
30
|
import '../link/clickableLink.js';
|
@@ -28,8 +28,8 @@ import '../global/sniffer.js';
|
|
28
28
|
import 'sniffr';
|
29
29
|
import '../global/dom.js';
|
30
30
|
import '@jetbrains/icons/chevron-down';
|
31
|
-
import '../icon/icon.js';
|
32
31
|
import 'util-deprecate';
|
32
|
+
import '../icon/icon.js';
|
33
33
|
import '../icon/icon__constants.js';
|
34
34
|
import '../_helpers/icon__svg.js';
|
35
35
|
import 'core-js/modules/es.string.replace.js';
|
@@ -6,8 +6,8 @@ import { m as modules_47759f5e } from '../_helpers/header.js';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
7
7
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
8
8
|
import '@jetbrains/icons/chevron-down';
|
9
|
-
import '../icon/icon.js';
|
10
9
|
import 'util-deprecate';
|
10
|
+
import '../icon/icon.js';
|
11
11
|
import '../icon/icon__constants.js';
|
12
12
|
import '../_helpers/icon__svg.js';
|
13
13
|
import 'core-js/modules/es.regexp.exec.js';
|
@@ -17,8 +17,8 @@ import '../global/dom.js';
|
|
17
17
|
import '../avatar/fallback-avatar.js';
|
18
18
|
import '../global/get-uid.js';
|
19
19
|
import '@jetbrains/icons/chevron-down';
|
20
|
-
import '../icon/icon.js';
|
21
20
|
import 'util-deprecate';
|
21
|
+
import '../icon/icon.js';
|
22
22
|
import '../icon/icon__constants.js';
|
23
23
|
import '../_helpers/icon__svg.js';
|
24
24
|
import '../global/memoize.js';
|
@@ -14,10 +14,10 @@ import '../control-help/control-help.js';
|
|
14
14
|
export { I as Input, S as Size, I as default } from '../_helpers/input.js';
|
15
15
|
import 'react/jsx-runtime';
|
16
16
|
import '@jetbrains/icons/chevron-down';
|
17
|
+
import 'util-deprecate';
|
17
18
|
import '../link/clickableLink.js';
|
18
19
|
import '../_helpers/button__classes.js';
|
19
20
|
import '../icon/icon__constants.js';
|
20
|
-
import 'util-deprecate';
|
21
21
|
import '../_helpers/icon__svg.js';
|
22
22
|
import 'core-js/modules/es.regexp.exec.js';
|
23
23
|
import 'core-js/modules/es.string.replace.js';
|
@@ -29,8 +29,8 @@ import '../tab-trap/tab-trap.js';
|
|
29
29
|
import '../global/dom.js';
|
30
30
|
import '../button/button.js';
|
31
31
|
import '@jetbrains/icons/chevron-down';
|
32
|
-
import '../icon/icon.js';
|
33
32
|
import 'util-deprecate';
|
33
|
+
import '../icon/icon.js';
|
34
34
|
import '../icon/icon__constants.js';
|
35
35
|
import '../_helpers/icon__svg.js';
|
36
36
|
import 'core-js/modules/es.string.replace.js';
|
@@ -30,8 +30,8 @@ import '../tab-trap/tab-trap.js';
|
|
30
30
|
import '../global/dom.js';
|
31
31
|
import '../button/button.js';
|
32
32
|
import '@jetbrains/icons/chevron-down';
|
33
|
-
import '../icon/icon.js';
|
34
33
|
import 'util-deprecate';
|
34
|
+
import '../icon/icon.js';
|
35
35
|
import '../icon/icon__constants.js';
|
36
36
|
import '../_helpers/icon__svg.js';
|
37
37
|
import 'core-js/modules/es.string.replace.js';
|
@@ -38,7 +38,7 @@ import '../global/controls-height.js';
|
|
38
38
|
import '../_helpers/button__classes.js';
|
39
39
|
import '../i18n/i18n.js';
|
40
40
|
|
41
|
-
var modules_8b837449 = {"light":"light_rui_2ac4","container":"container_rui_a216","message":"message_rui_a216","icon":"icon_rui_a216","title":"title_rui_a216 font-lower_rui_f295 font_rui_f295","description":"description_rui_a216","
|
41
|
+
var modules_8b837449 = {"light":"light_rui_2ac4","container":"container_rui_a216","message":"message_rui_a216","icon":"icon_rui_a216","title":"title_rui_a216 font-lower_rui_f295 font_rui_f295","description":"description_rui_a216","gotIt":"gotIt_rui_a216","tail":"tail_rui_a216"};
|
42
42
|
|
43
43
|
const UNIT = 8;
|
44
44
|
const TAIL_SIZE = 11;
|
@@ -198,7 +198,7 @@ class Message extends Component {
|
|
198
198
|
className: modules_8b837449.description,
|
199
199
|
children: children
|
200
200
|
}), (onClose || buttonProps) && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
201
|
-
className: modules_8b837449.
|
201
|
+
className: modules_8b837449.gotIt,
|
202
202
|
onClick: onClose,
|
203
203
|
primary: true
|
204
204
|
}, buttonProps), {}, {
|
@@ -9,11 +9,11 @@ const MAJOR_VERSION_INDEX = 0;
|
|
9
9
|
/**
|
10
10
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
11
11
|
*/
|
12
|
-
if (!["and_chr
|
12
|
+
if (!["and_chr 128", "and_uc 15.5", "chrome 128", "chrome 127", "chrome 126", "chrome 109", "edge 127", "firefox 129", "ios_saf 17.6", "ios_saf 17.5", "op_mob 80", "safari 17.5", "samsung 25"]) {
|
13
13
|
// eslint-disable-next-line no-console
|
14
14
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
15
15
|
}
|
16
|
-
const SUPPORTED = ["and_chr
|
16
|
+
const SUPPORTED = ["and_chr 128", "and_uc 15.5", "chrome 128", "chrome 127", "chrome 126", "chrome 109", "edge 127", "firefox 129", "ios_saf 17.6", "ios_saf 17.5", "op_mob 80", "safari 17.5", "samsung 25"] || [];
|
17
17
|
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
18
18
|
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
19
19
|
var _item$match;
|
@@ -14,11 +14,11 @@ import Icon from '../icon/icon.js';
|
|
14
14
|
import { I18nContext } from '../i18n/i18n-context.js';
|
15
15
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
16
16
|
import '@jetbrains/icons/chevron-down';
|
17
|
+
import 'util-deprecate';
|
17
18
|
import '../link/clickableLink.js';
|
18
19
|
import '../global/controls-height.js';
|
19
20
|
import '../_helpers/button__classes.js';
|
20
21
|
import '../icon/icon__constants.js';
|
21
|
-
import 'util-deprecate';
|
22
22
|
import '../_helpers/icon__svg.js';
|
23
23
|
import 'core-js/modules/es.regexp.exec.js';
|
24
24
|
import 'core-js/modules/es.string.replace.js';
|
@@ -88,7 +88,7 @@ import '../text/text.js';
|
|
88
88
|
import '../_helpers/select__filter.js';
|
89
89
|
import '../i18n/i18n.js';
|
90
90
|
|
91
|
-
var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65"};
|
91
|
+
var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65","actions":"actions_rui_ad65","pageSize":"pageSize_rui_ad65"};
|
92
92
|
|
93
93
|
class Pager extends PureComponent {
|
94
94
|
constructor() {
|
@@ -189,9 +189,7 @@ class Pager extends PureComponent {
|
|
189
189
|
const selectOptions = this.getSelectOptions();
|
190
190
|
return !this.props.disablePageSizeSelector && /*#__PURE__*/jsx("div", {
|
191
191
|
"data-test": "ring-pager-page-size-selector",
|
192
|
-
|
193
|
-
float: 'right'
|
194
|
-
},
|
192
|
+
className: modules_1a5f0d42.pageSize,
|
195
193
|
children: /*#__PURE__*/jsx(Select, {
|
196
194
|
data: selectOptions.data,
|
197
195
|
selected: selectOptions.selected,
|
@@ -301,16 +299,19 @@ class Pager extends PureComponent {
|
|
301
299
|
}
|
302
300
|
const lastPageButtonAvailable = !this.props.disableLastPageButton && end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
|
303
301
|
return /*#__PURE__*/jsxs("div", {
|
304
|
-
children: [this.getPagerLinks(), /*#__PURE__*/jsxs(
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
302
|
+
children: [this.getPagerLinks(), /*#__PURE__*/jsxs("div", {
|
303
|
+
className: modules_1a5f0d42.actions,
|
304
|
+
children: [/*#__PURE__*/jsxs(ButtonToolbar, {
|
305
|
+
children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
|
306
|
+
children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
307
|
+
href: this.generateHref(end + 1),
|
308
|
+
disabled: this.props.loader
|
309
|
+
}, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
|
310
|
+
children: '...'
|
311
|
+
}))]
|
312
|
+
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === void 0 ? void 0 : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== void 0 ? _this$props$translati9 : translate('lastPage'))]
|
313
|
+
}), this.getPageSizeSelector()]
|
314
|
+
})]
|
314
315
|
});
|
315
316
|
}
|
316
317
|
render() {
|
@@ -213,6 +213,9 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
213
213
|
shortcutsScope: string;
|
214
214
|
listId: string;
|
215
215
|
private _focusHandler;
|
216
|
+
isClickingSelect: boolean;
|
217
|
+
mouseDownHandler: () => void;
|
218
|
+
mouseUpHandler: () => void;
|
216
219
|
private _blurHandler;
|
217
220
|
node?: HTMLElement | null;
|
218
221
|
nodeRef: (el: HTMLElement | null) => void;
|
@@ -82,7 +82,7 @@ import '../caret/caret.js';
|
|
82
82
|
import '../text/text.js';
|
83
83
|
import '../_helpers/select__filter.js';
|
84
84
|
|
85
|
-
var modules_9d0de074 = {"button-shadow":"i__const_button_shadow_0","select":"select_rui_e9c2","value":"value_rui_e9c2 ellipsis_rui_f295 font_rui_f295","icons":"icons_rui_e9c2","light":"light_rui_2ac4","toolbar":"toolbar_rui_e9c2","button":"button_rui_e9c2","buttonSpaced":"buttonSpaced_rui_e9c2","inputMode":"inputMode_rui_e9c2","selectedIcon":"selectedIcon_rui_e9c2 resetButton_rui_f295","clearIcon":"clearIcon_rui_e9c2","sizeS":"sizeS_rui_e9c2","sizeM":"sizeM_rui_e9c2","sizeL":"sizeL_rui_e9c2","sizeFULL":"sizeFULL_rui_e9c2","sizeAUTO":"sizeAUTO_rui_e9c2","buttonMode":"buttonMode_rui_e9c2","open":"open_rui_e9c2","buttonContainer":"buttonContainer_rui_e9c2","buttonValue":"buttonValue_rui_e9c2 ellipsis_rui_f295","buttonValueOpen":"buttonValueOpen_rui_e9c2","buttonValueEmpty":"buttonValueEmpty_rui_e9c2","
|
85
|
+
var modules_9d0de074 = {"button-shadow":"i__const_button_shadow_0","select":"select_rui_e9c2","value":"value_rui_e9c2 ellipsis_rui_f295 font_rui_f295","icons":"icons_rui_e9c2","light":"light_rui_2ac4","toolbar":"toolbar_rui_e9c2","button":"button_rui_e9c2","buttonSpaced":"buttonSpaced_rui_e9c2","inputMode":"inputMode_rui_e9c2","heightS":"heightS_rui_e9c2","heightL":"heightL_rui_e9c2","selectedIcon":"selectedIcon_rui_e9c2 resetButton_rui_f295","clearIcon":"clearIcon_rui_e9c2","sizeS":"sizeS_rui_e9c2","sizeM":"sizeM_rui_e9c2","sizeL":"sizeL_rui_e9c2","sizeFULL":"sizeFULL_rui_e9c2","sizeAUTO":"sizeAUTO_rui_e9c2","buttonMode":"buttonMode_rui_e9c2","open":"open_rui_e9c2","buttonContainer":"buttonContainer_rui_e9c2","buttonValue":"buttonValue_rui_e9c2 ellipsis_rui_f295","buttonValueOpen":"buttonValueOpen_rui_e9c2","buttonValueEmpty":"buttonValueEmpty_rui_e9c2","label":"label_rui_e9c2","disabled":"disabled_rui_e9c2","avatar":"avatar_rui_e9c2","popup":"popup_rui_e9c2","chevron":"chevron_rui_e9c2","chevronIcon":"chevronIcon_rui_e9c2"};
|
86
86
|
|
87
87
|
function noop() {}
|
88
88
|
/**
|
@@ -260,10 +260,17 @@ class Select extends Component {
|
|
260
260
|
focused: true
|
261
261
|
});
|
262
262
|
});
|
263
|
+
_defineProperty(this, "isClickingSelect", false);
|
264
|
+
_defineProperty(this, "mouseDownHandler", () => {
|
265
|
+
this.isClickingSelect = true;
|
266
|
+
});
|
267
|
+
_defineProperty(this, "mouseUpHandler", () => {
|
268
|
+
this.isClickingSelect = false;
|
269
|
+
});
|
263
270
|
_defineProperty(this, "_blurHandler", () => {
|
264
271
|
var _this$_popup;
|
265
272
|
this.props.onBlur();
|
266
|
-
if (this._popup && this._popup.isVisible() && !this._popup.isClickingPopup) {
|
273
|
+
if (this._popup && this._popup.isVisible() && !this._popup.isClickingPopup && !this.isClickingSelect) {
|
267
274
|
window.setTimeout(() => {
|
268
275
|
this.setState({
|
269
276
|
showPopup: false
|
@@ -979,6 +986,10 @@ class Select extends Component {
|
|
979
986
|
ref: this.nodeRef,
|
980
987
|
className: classNames(classes, modules_9d0de074.inputMode),
|
981
988
|
"data-test": joinDataTestAttributes('ring-select', dataTest),
|
989
|
+
role: "presentation" // has interactive elements inside
|
990
|
+
,
|
991
|
+
onMouseDown: this.mouseDownHandler,
|
992
|
+
onMouseUp: this.mouseUpHandler,
|
982
993
|
children: [shortcutsEnabled && /*#__PURE__*/jsx(Shortcuts, {
|
983
994
|
map: this.getShortcutsMap(),
|
984
995
|
scope: this.shortcutsScope
|
@@ -11,8 +11,8 @@ import 'react/jsx-runtime';
|
|
11
11
|
import '@jetbrains/icons/close-12px';
|
12
12
|
import '../button/button.js';
|
13
13
|
import '@jetbrains/icons/chevron-down';
|
14
|
-
import '../icon/icon.js';
|
15
14
|
import 'util-deprecate';
|
15
|
+
import '../icon/icon.js';
|
16
16
|
import '../icon/icon__constants.js';
|
17
17
|
import '../_helpers/icon__svg.js';
|
18
18
|
import 'core-js/modules/es.regexp.exec.js';
|