@jetbrains/ring-ui-built 7.0.0-beta.2 → 7.0.0-beta.3
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/_rollupPluginBabelHelpers.js +1 -504
- package/components/_helpers/anchor.js +7 -5
- package/components/_helpers/button__classes.js +15 -13
- package/components/_helpers/caption.js +11 -17
- package/components/_helpers/card.js +92 -96
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/icon__svg.js +27 -23
- package/components/_helpers/input.js +150 -171
- package/components/_helpers/query-assist__suggestions.js +78 -93
- package/components/_helpers/select__filter.js +56 -67
- package/components/_helpers/services-link.js +23 -29
- package/components/_helpers/sidebar.js +91 -93
- package/components/_helpers/tab-link.js +8 -6
- package/components/_helpers/theme.js +41 -50
- package/components/_helpers/title.js +59 -69
- package/components/alert/alert.js +112 -156
- package/components/alert/container.js +32 -39
- package/components/alert-service/alert-service.js +104 -161
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -27
- package/components/auth/auth__core.d.ts +1 -1
- package/components/auth/auth__core.js +742 -1428
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +31 -69
- package/components/auth/iframe-flow.js +70 -123
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +160 -318
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.js +99 -150
- package/components/auth-dialog-service/auth-dialog-service.js +6 -26
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.js +94 -123
- package/components/avatar/fallback-avatar.js +20 -34
- package/components/badge/badge.js +32 -38
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.js +67 -80
- package/components/button-group/button-group.js +27 -36
- package/components/button-set/button-set.js +19 -27
- package/components/button-toolbar/button-toolbar.js +17 -25
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.js +69 -86
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -128
- package/components/code/code.js +83 -151
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.js +57 -87
- package/components/confirm-service/confirm-service.js +23 -44
- package/components/content-layout/content-layout.js +41 -56
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.js +38 -46
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -8
- package/components/data-list/data-list.js +113 -156
- package/components/data-list/data-list.mock.js +3 -5
- package/components/data-list/item.js +120 -140
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.js +2 -10
- package/components/date-picker/consts.js +16 -22
- package/components/date-picker/date-input.js +99 -124
- package/components/date-picker/date-picker.js +140 -184
- package/components/date-picker/date-popup.js +280 -327
- package/components/date-picker/day.js +71 -94
- package/components/date-picker/month-names.js +41 -59
- package/components/date-picker/month-slider.js +42 -61
- package/components/date-picker/month.js +17 -24
- package/components/date-picker/months.js +44 -49
- package/components/date-picker/weekdays.js +12 -21
- package/components/date-picker/years.js +77 -98
- package/components/dialog/dialog.js +151 -187
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.js +0 -6
- package/components/dropdown/dropdown.js +134 -154
- package/components/dropdown-menu/dropdown-menu.js +59 -87
- package/components/editable-heading/editable-heading.js +69 -116
- package/components/error-bubble/error-bubble.js +29 -54
- package/components/error-message/error-message.js +34 -49
- package/components/footer/footer.js +27 -28
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +14 -13
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +99 -106
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/prop-types.js +3 -5
- package/components/global/react-dom-renderer.js +29 -40
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.js +1 -18
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.js +27 -39
- package/components/grid/grid.js +18 -27
- package/components/grid/row.js +23 -30
- package/components/group/group.js +16 -22
- package/components/header/header-icon.js +19 -31
- package/components/header/header.d.ts +0 -1
- package/components/header/header.js +30 -64
- package/components/header/links.js +6 -3
- package/components/header/logo.js +15 -26
- package/components/header/profile.js +124 -150
- package/components/header/services-link.js +1 -3
- package/components/header/services.js +64 -97
- package/components/header/smart-profile.js +101 -178
- package/components/header/smart-services.js +55 -90
- package/components/header/tray.js +21 -30
- package/components/heading/heading.js +21 -20
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.js +60 -74
- package/components/icon/icon__svg.js +0 -5
- package/components/icon/index.js +0 -5
- package/components/input/input.js +1 -11
- package/components/island/adaptive-island-hoc.js +29 -37
- package/components/island/content.js +100 -110
- package/components/island/header.js +56 -66
- package/components/island/island.js +25 -33
- package/components/island-legacy/content-legacy.js +16 -22
- package/components/island-legacy/header-legacy.js +19 -25
- package/components/island-legacy/island-legacy.js +16 -22
- package/components/link/clickableLink.js +33 -42
- package/components/link/link.js +47 -55
- package/components/list/consts.js +2 -2
- package/components/list/list.js +399 -486
- package/components/list/list__custom.js +51 -61
- package/components/list/list__hint.js +9 -17
- package/components/list/list__item.js +147 -178
- package/components/list/list__link.js +38 -47
- package/components/list/list__separator.js +15 -24
- package/components/list/list__title.js +25 -34
- package/components/list/list__users-groups-source.js +55 -121
- package/components/loader/loader.js +38 -60
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.js +24 -32
- package/components/loader-screen/loader-screen.js +24 -40
- package/components/login-dialog/login-dialog.js +81 -121
- package/components/login-dialog/service.js +6 -29
- package/components/markdown/markdown.js +16 -24
- package/components/message/message.js +170 -201
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.js +212 -257
- package/components/panel/panel.js +16 -22
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -288
- package/components/popup/popup.target.js +9 -7
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +33 -67
- package/components/progress-bar/progress-bar.js +57 -68
- package/components/query-assist/query-assist.js +583 -652
- package/components/query-assist/query-assist__suggestions.js +2 -26
- package/components/radio/radio.js +15 -27
- package/components/radio/radio__item.js +52 -62
- package/components/scrollable-section/scrollable-section.js +22 -32
- package/components/select/select.js +693 -793
- package/components/select/select__filter.js +1 -26
- package/components/select/select__popup.js +316 -413
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.js +23 -41
- package/components/shortcuts/shortcuts.js +41 -64
- package/components/slider/slider.js +93 -112
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.js +3 -27
- package/components/storage/storage__fallback.js +137 -210
- package/components/storage/storage__local.js +89 -147
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -53
- package/components/table/cell.js +11 -21
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.js +59 -75
- package/components/table/header.js +89 -110
- package/components/table/multitable.js +83 -89
- package/components/table/row-with-focus-sensor.js +25 -57
- package/components/table/row.js +169 -200
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +108 -113
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.js +19 -55
- package/components/table/smart-table.js +42 -76
- package/components/table/table.js +267 -327
- package/components/tabs/collapsible-more.js +47 -73
- package/components/tabs/collapsible-tab.js +32 -36
- package/components/tabs/collapsible-tabs.js +89 -148
- package/components/tabs/custom-item.js +4 -2
- package/components/tabs/dumb-tabs.js +60 -92
- package/components/tabs/smart-tabs.js +29 -61
- package/components/tabs/tab-link.js +1 -3
- package/components/tabs/tab.js +15 -24
- package/components/tabs/tabs.js +1 -26
- package/components/tag/tag.d.ts +0 -2
- package/components/tag/tag.js +120 -162
- package/components/tags-input/tags-input.js +222 -304
- package/components/tags-list/tags-list.js +45 -61
- package/components/text/text.js +28 -37
- package/components/toggle/toggle.js +51 -61
- package/components/tooltip/tooltip.js +109 -141
- package/components/user-agreement/service.js +259 -400
- package/components/user-agreement/user-agreement.js +80 -108
- package/components/user-card/card.js +1 -25
- package/components/user-card/smart-user-card-tooltip.js +52 -103
- package/components/user-card/tooltip.js +35 -65
- package/components/user-card/user-card.js +1 -25
- package/package.json +1 -1
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/tray-icon.d.ts +0 -1
- package/components/header/tray-icon.js +0 -26
@@ -1,5 +1,5 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
2
|
-
import 'core-js/modules/
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import classNames from 'classnames';
|
@@ -15,8 +15,8 @@ import { Size as Size$1 } from '../icon/icon__constants.js';
|
|
15
15
|
|
16
16
|
var modules_a4196c17 = {"light":"light_rui_2ac4","userCardSpaced":"userCardSpaced_rui_6680","userInformationContainer":"userInformationContainer_rui_6680","userAvatar":"userAvatar_rui_6680","userInformation":"userInformation_rui_6680","userInformationGeneral":"userInformationGeneral_rui_6680","userNameLine":"userNameLine_rui_6680","userName":"userName_rui_6680","userLogin":"userLogin_rui_6680","userEmail":"userEmail_rui_6680","userCopyIcon":"userCopyIcon_rui_6680","userEmailWrapper":"userEmailWrapper_rui_6680","unverifiedLabel":"unverifiedLabel_rui_6680","userNameInfo":"userNameInfo_rui_6680","userActiveStatus":"userActiveStatus_rui_6680","online":"online_rui_6680"};
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
const _excluded = ["children", "info", "className", "user", "avatarInfo"];
|
19
|
+
const translationsShape = PropTypes.shape({
|
20
20
|
banned: PropTypes.string.isRequired,
|
21
21
|
online: PropTypes.string.isRequired,
|
22
22
|
offline: PropTypes.string.isRequired,
|
@@ -25,104 +25,100 @@ var translationsShape = PropTypes.shape({
|
|
25
25
|
copingToClipboardError: PropTypes.string,
|
26
26
|
unverified: PropTypes.string
|
27
27
|
});
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
33
|
-
args[_key] = arguments[_key];
|
34
|
-
}
|
35
|
-
_this = _callSuper(this, UserCard, [].concat(args));
|
36
|
-
_defineProperty(_this, "copyEmail", function () {
|
28
|
+
class UserCard extends PureComponent {
|
29
|
+
constructor() {
|
30
|
+
super(...arguments);
|
31
|
+
_defineProperty(this, "copyEmail", () => {
|
37
32
|
var _translations$copiedT, _translations$copingT;
|
38
|
-
|
39
|
-
|
40
|
-
|
33
|
+
const {
|
34
|
+
translate
|
35
|
+
} = this.context;
|
36
|
+
const translations = this.props.translations;
|
37
|
+
clipboard.copyText(this.props.user.email || '', (_translations$copiedT = translations === null || translations === void 0 ? void 0 : translations.copiedToClipboard) !== null && _translations$copiedT !== void 0 ? _translations$copiedT : translate('copyToClipboard'), (_translations$copingT = translations === null || translations === void 0 ? void 0 : translations.copingToClipboardError) !== null && _translations$copingT !== void 0 ? _translations$copingT : translate('copingToClipboardError'));
|
41
38
|
});
|
42
|
-
return _this;
|
43
39
|
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
40
|
+
render() {
|
41
|
+
var _translations$online, _translations$offline, _translations$banned, _translations$unverif, _translations$copyToC;
|
42
|
+
const _this$props = this.props,
|
43
|
+
{
|
44
|
+
children,
|
45
|
+
info,
|
46
|
+
className,
|
47
|
+
user,
|
48
|
+
avatarInfo
|
49
|
+
} = _this$props,
|
50
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
51
|
+
const {
|
52
|
+
translate
|
53
|
+
} = this.context;
|
54
|
+
const translations = this.props.translations;
|
55
|
+
const classes = classNames(className, {});
|
56
|
+
const userActiveStatusClasses = classNames(modules_a4196c17.userActiveStatus, user.online ? modules_a4196c17.online : '');
|
57
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({
|
58
|
+
className: classes
|
59
|
+
}, restProps), {}, {
|
60
|
+
children: /*#__PURE__*/jsxs("div", {
|
61
|
+
className: modules_a4196c17.userInformationContainer,
|
62
|
+
children: [/*#__PURE__*/jsxs("div", {
|
63
|
+
className: modules_a4196c17.userAvatar,
|
64
|
+
children: [/*#__PURE__*/jsx(Avatar, {
|
65
|
+
size: Size.Size56,
|
66
|
+
url: user.avatarUrl,
|
67
|
+
round: true
|
68
|
+
}), !!avatarInfo && avatarInfo]
|
69
|
+
}), /*#__PURE__*/jsxs("div", {
|
70
|
+
className: modules_a4196c17.userInformation,
|
65
71
|
children: [/*#__PURE__*/jsxs("div", {
|
66
|
-
className: modules_a4196c17.
|
67
|
-
children: [/*#__PURE__*/jsx(Avatar, {
|
68
|
-
size: Size.Size56,
|
69
|
-
url: user.avatarUrl,
|
70
|
-
round: true
|
71
|
-
}), !!avatarInfo && avatarInfo]
|
72
|
-
}), /*#__PURE__*/jsxs("div", {
|
73
|
-
className: modules_a4196c17.userInformation,
|
72
|
+
className: modules_a4196c17.userInformationGeneral,
|
74
73
|
children: [/*#__PURE__*/jsxs("div", {
|
75
|
-
className: modules_a4196c17.
|
76
|
-
children: [/*#__PURE__*/
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
title: user.banReason,
|
94
|
-
children: (_translations$banned = translations === null || translations === void 0 ? void 0 : translations.banned) !== null && _translations$banned !== void 0 ? _translations$banned : translate('banned')
|
95
|
-
})]
|
96
|
-
}), /*#__PURE__*/jsx("div", {
|
97
|
-
className: modules_a4196c17.userLogin,
|
98
|
-
children: user.login
|
99
|
-
}), user.email && /*#__PURE__*/jsxs("span", {
|
100
|
-
className: modules_a4196c17.userEmailWrapper,
|
101
|
-
children: [/*#__PURE__*/jsx(Link, {
|
102
|
-
href: "mailto:".concat(user.email),
|
103
|
-
title: "mailto:".concat(user.email),
|
104
|
-
target: "_blank",
|
105
|
-
className: modules_a4196c17.userEmail,
|
106
|
-
children: user.email
|
107
|
-
}), user.unverifiedEmail && /*#__PURE__*/jsx("span", {
|
108
|
-
className: modules_a4196c17.unverifiedLabel,
|
109
|
-
children: (_translations$unverif = translations === null || translations === void 0 ? void 0 : translations.unverified) !== null && _translations$unverif !== void 0 ? _translations$unverif : translate('unverified')
|
110
|
-
}), /*#__PURE__*/jsx(Icon, {
|
111
|
-
title: (_translations$copyToC = translations === null || translations === void 0 ? void 0 : translations.copyToClipboard) !== null && _translations$copyToC !== void 0 ? _translations$copyToC : translate('copyToClipboard'),
|
112
|
-
className: modules_a4196c17.userCopyIcon,
|
113
|
-
onClick: this.copyEmail,
|
114
|
-
glyph: copyIcon,
|
115
|
-
size: Size$1.Size14,
|
116
|
-
suppressSizeWarning: true
|
117
|
-
})]
|
74
|
+
className: modules_a4196c17.userNameLine,
|
75
|
+
children: [user.href && /*#__PURE__*/jsx(Link, {
|
76
|
+
href: user.href,
|
77
|
+
className: modules_a4196c17.userName,
|
78
|
+
children: user.name
|
79
|
+
}), !user.href && /*#__PURE__*/jsx("span", {
|
80
|
+
className: modules_a4196c17.userName,
|
81
|
+
children: user.name
|
82
|
+
}), typeof user.online === 'boolean' && /*#__PURE__*/jsx("span", {
|
83
|
+
className: userActiveStatusClasses,
|
84
|
+
title: user.online ? (_translations$online = translations === null || translations === void 0 ? void 0 : translations.online) !== null && _translations$online !== void 0 ? _translations$online : translate('online') : (_translations$offline = translations === null || translations === void 0 ? void 0 : translations.offline) !== null && _translations$offline !== void 0 ? _translations$offline : translate('offline')
|
85
|
+
}), !!info && /*#__PURE__*/jsx("span", {
|
86
|
+
className: modules_a4196c17.userNameInfo,
|
87
|
+
children: info
|
88
|
+
}), user.banned && /*#__PURE__*/jsx("span", {
|
89
|
+
className: classNames(modules_6c9187df.badge, modules_6c9187df.invalid),
|
90
|
+
title: user.banReason,
|
91
|
+
children: (_translations$banned = translations === null || translations === void 0 ? void 0 : translations.banned) !== null && _translations$banned !== void 0 ? _translations$banned : translate('banned')
|
118
92
|
})]
|
119
|
-
}),
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
93
|
+
}), /*#__PURE__*/jsx("div", {
|
94
|
+
className: modules_a4196c17.userLogin,
|
95
|
+
children: user.login
|
96
|
+
}), user.email && /*#__PURE__*/jsxs("span", {
|
97
|
+
className: modules_a4196c17.userEmailWrapper,
|
98
|
+
children: [/*#__PURE__*/jsx(Link, {
|
99
|
+
href: "mailto:".concat(user.email),
|
100
|
+
title: "mailto:".concat(user.email),
|
101
|
+
target: "_blank",
|
102
|
+
className: modules_a4196c17.userEmail,
|
103
|
+
children: user.email
|
104
|
+
}), user.unverifiedEmail && /*#__PURE__*/jsx("span", {
|
105
|
+
className: modules_a4196c17.unverifiedLabel,
|
106
|
+
children: (_translations$unverif = translations === null || translations === void 0 ? void 0 : translations.unverified) !== null && _translations$unverif !== void 0 ? _translations$unverif : translate('unverified')
|
107
|
+
}), /*#__PURE__*/jsx(Icon, {
|
108
|
+
title: (_translations$copyToC = translations === null || translations === void 0 ? void 0 : translations.copyToClipboard) !== null && _translations$copyToC !== void 0 ? _translations$copyToC : translate('copyToClipboard'),
|
109
|
+
className: modules_a4196c17.userCopyIcon,
|
110
|
+
onClick: this.copyEmail,
|
111
|
+
glyph: copyIcon,
|
112
|
+
size: Size$1.Size14,
|
113
|
+
suppressSizeWarning: true
|
114
|
+
})]
|
115
|
+
})]
|
116
|
+
}), children]
|
117
|
+
})]
|
118
|
+
})
|
119
|
+
}));
|
120
|
+
}
|
121
|
+
}
|
126
122
|
_defineProperty(UserCard, "propTypes", {
|
127
123
|
children: PropTypes.node,
|
128
124
|
info: PropTypes.node,
|
@@ -1,14 +1,11 @@
|
|
1
|
-
import 'core-js/modules/es.array.iterator.js';
|
2
|
-
import 'core-js/modules/es.object.to-string.js';
|
3
|
-
import 'core-js/modules/es.set.js';
|
4
1
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
5
2
|
import scrollbarWidth from 'scrollbar-width';
|
6
3
|
|
7
4
|
var modules_5e9b8c03 = {"header":"header_rui_c019","scrollableWrapper":"scrollableWrapper_rui_c019","light":"light_rui_2ac4","container":"container_rui_027b","nativeDialog":"nativeDialog_rui_027b","innerContainer":"innerContainer_rui_027b","content":"content_rui_027b","panel":"panel_rui_027b","clickableOverlay":"clickableOverlay_rui_027b","closeIcon":"closeIcon_rui_027b","closeButton":"closeButton_rui_027b","closeButtonOutside":"closeButtonOutside_rui_027b","closeButtonInside":"closeButtonInside_rui_027b","documentWithoutScroll":"documentWithoutScroll_rui_027b","popupTarget":"popupTarget_rui_027b","dense":"dense_rui_027b"};
|
8
5
|
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
const isPrevented = new Set();
|
7
|
+
let previousDocumentWidth = null;
|
8
|
+
const prevent = key => {
|
12
9
|
if (isPrevented.has(key)) {
|
13
10
|
return;
|
14
11
|
}
|
@@ -16,15 +13,15 @@ var _prevent = function prevent(key) {
|
|
16
13
|
if (isPrevented.size > 1) {
|
17
14
|
return;
|
18
15
|
}
|
19
|
-
|
16
|
+
const documentHasScroll = document.documentElement.scrollHeight > window.innerHeight || getComputedStyle(document.documentElement).overflowY === 'scroll';
|
20
17
|
document.documentElement.classList.add(modules_5e9b8c03.documentWithoutScroll);
|
21
|
-
|
18
|
+
const scrollWidth = scrollbarWidth();
|
22
19
|
if (documentHasScroll && scrollWidth != null && scrollWidth > 0) {
|
23
20
|
previousDocumentWidth = document.documentElement.style.width;
|
24
21
|
document.documentElement.style.width = "calc(100% - ".concat(scrollWidth, "px)");
|
25
22
|
}
|
26
23
|
};
|
27
|
-
|
24
|
+
const reset = key => {
|
28
25
|
if (isPrevented.size === 0) {
|
29
26
|
return;
|
30
27
|
}
|
@@ -38,15 +35,11 @@ var _reset = function reset(key) {
|
|
38
35
|
previousDocumentWidth = null;
|
39
36
|
}
|
40
37
|
};
|
41
|
-
|
42
|
-
|
38
|
+
const preventerFactory = key => {
|
39
|
+
const preventerKey = key || Math.random();
|
43
40
|
return {
|
44
|
-
prevent:
|
45
|
-
|
46
|
-
},
|
47
|
-
reset: function reset() {
|
48
|
-
return _reset(preventerKey);
|
49
|
-
}
|
41
|
+
prevent: () => prevent(preventerKey),
|
42
|
+
reset: () => reset(preventerKey)
|
50
43
|
};
|
51
44
|
};
|
52
45
|
var dialog__bodyScrollPreventer = preventerFactory('default-preventer');
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import {
|
1
|
+
import { a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/es.regexp.exec.js';
|
3
3
|
import 'core-js/modules/es.string.replace.js';
|
4
|
-
import 'core-js/modules/es.string.starts-with.js';
|
5
4
|
import { memo } from 'react';
|
6
5
|
import classNames from 'classnames';
|
7
6
|
import PropTypes from 'prop-types';
|
@@ -10,17 +9,15 @@ import { jsx } from 'react/jsx-runtime';
|
|
10
9
|
|
11
10
|
var modules_29747b80 = {"light":"light_rui_2ac4","icon":"icon_rui_c997","glyph":"glyph_rui_c997","compatibilityMode":"compatibilityMode_rui_c997","gray":"gray_rui_c997","hover":"hover_rui_c997","green":"green_rui_c997","magenta":"magenta_rui_c997","red":"red_rui_c997","blue":"blue_rui_c997","white":"white_rui_c997","loading":"loading_rui_c997","icon-loading":"icon-loading_rui_c997"};
|
12
11
|
|
13
|
-
|
12
|
+
const _excluded = ["src", "className"];
|
14
13
|
function convertReactSVGDOMProperty(str) {
|
15
|
-
return str.replace(/[-|:]([a-z])/g,
|
16
|
-
return g[1].toUpperCase();
|
17
|
-
});
|
14
|
+
return str.replace(/[-|:]([a-z])/g, g => g[1].toUpperCase());
|
18
15
|
}
|
19
16
|
function serializeAttrs(map) {
|
20
|
-
|
21
|
-
for (
|
22
|
-
|
23
|
-
|
17
|
+
const res = {};
|
18
|
+
for (let i = 0; i < map.length; i++) {
|
19
|
+
const key = map[i].name;
|
20
|
+
let prop = key;
|
24
21
|
if (key === 'class') {
|
25
22
|
prop = 'className';
|
26
23
|
} else if (!key.startsWith('data-')) {
|
@@ -31,34 +28,41 @@ function serializeAttrs(map) {
|
|
31
28
|
return res;
|
32
29
|
}
|
33
30
|
function extractSVGProps(svgNode) {
|
34
|
-
|
31
|
+
const map = svgNode.attributes;
|
35
32
|
return map.length > 0 ? serializeAttrs(map) : null;
|
36
33
|
}
|
37
|
-
|
38
|
-
|
34
|
+
const getSVGFromSource = memoize(src => {
|
35
|
+
const svgContainer = document.createElement('div');
|
39
36
|
svgContainer.innerHTML = src;
|
40
|
-
|
41
|
-
|
37
|
+
const svg = svgContainer.firstElementChild;
|
38
|
+
if (svg.remove) {
|
39
|
+
svg.remove();
|
40
|
+
} else {
|
41
|
+
svgContainer.removeChild(svg);
|
42
|
+
}
|
42
43
|
return {
|
43
44
|
props: extractSVGProps(svg),
|
44
45
|
html: svg.innerHTML
|
45
46
|
};
|
46
47
|
});
|
47
48
|
function isCompatibilityMode(iconSrc) {
|
48
|
-
|
49
|
-
|
49
|
+
const hasWidth = /width="[\d\.]+"/ig.test(iconSrc);
|
50
|
+
const hasHeight = /height="[\d\.]+"/ig.test(iconSrc);
|
50
51
|
return !hasWidth || !hasHeight;
|
51
52
|
}
|
52
53
|
function IconSVG(_ref) {
|
53
|
-
|
54
|
-
|
54
|
+
let {
|
55
|
+
src,
|
56
|
+
className
|
57
|
+
} = _ref,
|
55
58
|
rest = _objectWithoutProperties(_ref, _excluded);
|
56
|
-
|
59
|
+
const glyphClasses = classNames(modules_29747b80.glyph, {
|
57
60
|
[modules_29747b80.compatibilityMode]: isCompatibilityMode(src)
|
58
61
|
}, className);
|
59
|
-
|
60
|
-
props
|
61
|
-
html
|
62
|
+
const {
|
63
|
+
props,
|
64
|
+
html
|
65
|
+
} = getSVGFromSource(src);
|
62
66
|
return /*#__PURE__*/jsx("svg", _objectSpread2(_objectSpread2(_objectSpread2({}, props), rest), {}, {
|
63
67
|
className: glyphClasses,
|
64
68
|
dangerouslySetInnerHTML: {
|