@jetbrains/ring-ui-built 7.0.65 → 7.0.70
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 +12 -17
- package/components/_helpers/avatar-info.js +4 -5
- package/components/_helpers/button.classes.js +20 -21
- package/components/_helpers/caption.js +3 -3
- package/components/_helpers/card.js +26 -32
- package/components/_helpers/dialog-body-scroll-preventer.js +1 -2
- package/components/_helpers/icon-svg.js +9 -12
- package/components/_helpers/input.js +78 -86
- package/components/_helpers/loader-core.js +260 -0
- package/components/_helpers/query-assist-suggestions.js +0 -1
- package/components/_helpers/select-filter.js +19 -26
- package/components/_helpers/services-link.js +9 -12
- package/components/_helpers/sidebar.js +36 -44
- package/components/_helpers/tab-link.js +9 -11
- package/components/_helpers/theme.js +20 -24
- package/components/_helpers/title.js +12 -17
- package/components/alert/alert.js +41 -49
- package/components/alert/container.js +9 -12
- package/components/alert-service/alert-service.js +23 -32
- package/components/analytics/analytics-custom-plugin.js +12 -17
- package/components/analytics/analytics.js +1 -3
- package/components/auth/auth-core.js +128 -170
- package/components/auth/auth.js +3 -10
- package/components/auth/background-flow.js +5 -8
- package/components/auth/down-notification.js +9 -17
- package/components/auth/iframe-flow.js +13 -19
- package/components/auth/request-builder.js +4 -9
- package/components/auth/response-parser.js +9 -12
- package/components/auth/storage.js +12 -18
- package/components/auth/token-validator.js +19 -30
- package/components/auth/window-flow.js +22 -27
- package/components/auth-dialog/auth-dialog.js +40 -48
- package/components/auth-dialog-service/auth-dialog-service.js +10 -13
- package/components/avatar/avatar.figma.js +6 -6
- package/components/avatar/avatar.js +58 -59
- package/components/avatar/fallback-avatar.js +8 -11
- package/components/avatar-stack/avatar-stack.figma.js +10 -11
- package/components/avatar-stack/avatar-stack.js +25 -31
- package/components/banner/banner.js +0 -6
- package/components/breadcrumbs/breadcrumbs.figma.js +8 -6
- package/components/breadcrumbs/breadcrumbs.js +4 -5
- package/components/button/button.figma.js +15 -10
- package/components/button/button.js +59 -64
- package/components/button-group/button-group.js +11 -15
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.js +9 -12
- package/components/button-toolbar/button-toolbar.js +8 -11
- package/components/caret/caret.js +20 -28
- package/components/checkbox/checkbox-group.figma.js +8 -10
- package/components/checkbox/checkbox.figma.js +5 -5
- package/components/checkbox/checkbox.js +27 -35
- package/components/clipboard/clipboard-fallback.js +3 -3
- package/components/clipboard/clipboard.js +3 -16
- package/components/code/code.js +8 -14
- package/components/collapse/collapse-content.js +10 -15
- package/components/collapse/collapse-control.js +5 -7
- package/components/collapse/collapse.js +9 -11
- package/components/collapse/utils.js +1 -1
- package/components/confirm/confirm.js +17 -26
- package/components/confirm-service/confirm-service.js +30 -31
- package/components/content-layout/content-layout.js +21 -28
- package/components/content-layout/sidebar.js +0 -2
- package/components/contenteditable/contenteditable.js +23 -28
- package/components/control-help/control-help.js +8 -10
- package/components/control-label/control-label.js +12 -17
- package/components/data-list/data-list.js +57 -65
- package/components/data-list/data-list.mock.js +0 -4
- package/components/data-list/item.js +65 -72
- package/components/data-list/selection.js +11 -19
- package/components/data-list/title.js +0 -4
- package/components/date-picker/consts.js +3 -4
- package/components/date-picker/date-input.js +25 -33
- package/components/date-picker/date-picker.js +179 -193
- package/components/date-picker/date-popup.js +135 -127
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +24 -30
- package/components/date-picker/month-names.js +7 -12
- package/components/date-picker/month-slider.js +16 -22
- package/components/date-picker/month.js +3 -5
- package/components/date-picker/months.js +6 -6
- package/components/date-picker/weekdays.js +0 -1
- package/components/date-picker/years.js +20 -26
- package/components/dialog/dialog-body-scroll-preventer.js +0 -1
- package/components/dialog/dialog.js +73 -83
- package/components/dropdown/anchor.js +0 -4
- package/components/dropdown/dropdown.js +98 -114
- package/components/dropdown-menu/dropdown-menu.js +80 -79
- package/components/editable-heading/editable-heading.js +48 -54
- package/components/error-bubble/error-bubble.figma.js +4 -4
- package/components/error-bubble/error-bubble.js +9 -13
- package/components/error-message/error-message.js +1 -6
- package/components/footer/footer.js +11 -15
- package/components/global/compose-refs.js +1 -4
- package/components/global/compose.js +1 -4
- package/components/global/configuration.js +3 -3
- package/components/global/controls-height.js +0 -1
- package/components/global/create-stateful-context.js +10 -14
- package/components/global/data-tests.js +2 -10
- package/components/global/dom.js +6 -19
- package/components/global/focus-sensor-hoc.js +74 -87
- package/components/global/fuzzy-highlight.js +3 -8
- package/components/global/get-uid.js +1 -1
- package/components/global/inject-styles.js +5 -6
- package/components/global/listeners.js +2 -11
- package/components/global/memoize.js +0 -2
- package/components/global/normalize-indent.js +2 -6
- package/components/global/promise-with-timeout.js +4 -5
- package/components/global/react-dom-renderer.js +4 -9
- package/components/global/rerender-hoc.js +8 -11
- package/components/global/schedule-raf.js +1 -2
- package/components/global/theme.js +0 -5
- package/components/global/trivial-template-tag.js +1 -6
- package/components/global/url.js +2 -6
- package/components/global/use-event-callback.js +2 -3
- package/components/grid/col.js +7 -18
- package/components/grid/grid.js +9 -14
- package/components/grid/row.js +7 -11
- package/components/group/group.js +9 -12
- package/components/header/header-icon.js +8 -13
- package/components/header/header.js +16 -27
- package/components/header/links.js +7 -10
- package/components/header/logo.js +12 -16
- package/components/header/profile.js +73 -83
- package/components/header/services-link.js +0 -2
- package/components/header/services.js +32 -43
- package/components/header/smart-profile.js +44 -59
- package/components/header/smart-services.js +33 -45
- package/components/header/tray.js +8 -10
- package/components/heading/heading.js +27 -27
- package/components/http/http.js +120 -125
- package/components/http/http.mock.js +6 -10
- package/components/hub-source/hub-source-user.js +6 -13
- package/components/hub-source/hub-source-users-groups.js +8 -12
- package/components/hub-source/hub-source.js +8 -10
- package/components/i18n/i18n-context.js +4 -7
- package/components/i18n/i18n.js +5 -5
- package/components/icon/icon-svg.js +0 -4
- package/components/icon/icon.js +28 -32
- package/components/icon/index.js +0 -4
- package/components/input/input.figma.js +8 -8
- package/components/input/input.js +0 -4
- package/components/island/adaptive-island-hoc.js +19 -23
- package/components/island/content.js +70 -75
- package/components/island/header.js +21 -21
- package/components/island/island.js +11 -14
- package/components/link/clickable-link.js +30 -37
- package/components/link/link.js +27 -29
- package/components/list/list-custom.js +6 -11
- package/components/list/list-item.js +49 -56
- package/components/list/list-separator.js +0 -1
- package/components/list/list-title.js +0 -1
- package/components/list/list-users-groups-source.js +14 -22
- package/components/list/list.classes.js +8 -9
- package/components/list/list.js +387 -404
- package/components/loader/loader-core.js +2 -265
- package/components/loader/loader.d.ts +8 -0
- package/components/loader/loader.js +43 -29
- package/components/loader-inline/loader-inline.js +9 -12
- package/components/loader-screen/loader-screen.js +10 -14
- package/components/login-dialog/login-dialog.js +46 -54
- package/components/login-dialog/service.js +13 -15
- package/components/message/message.js +65 -79
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -3
- package/components/old-browsers-message/old-browsers-message.js +1 -4
- package/components/old-browsers-message/white-list.js +5 -7
- package/components/pager/pager.js +73 -88
- package/components/panel/panel.js +9 -12
- package/components/permissions/permissions-cache.js +6 -8
- package/components/permissions/permissions.js +19 -21
- package/components/popup/popup.js +136 -145
- package/components/popup/popup.target.js +8 -10
- package/components/popup/position-css.js +19 -27
- package/components/popup/position.js +22 -28
- package/components/popup-menu/popup-menu.js +27 -37
- package/components/progress-bar/progress-bar.js +26 -32
- package/components/query-assist/query-assist-suggestions.js +0 -6
- package/components/query-assist/query-assist.js +432 -468
- package/components/radio/radio-item.js +30 -40
- package/components/radio/radio.js +6 -10
- package/components/scrollable-section/scrollable-section.js +7 -10
- package/components/select/select-filter.js +0 -6
- package/components/select/select-popup.js +155 -174
- package/components/select/select.js +464 -479
- package/components/shortcuts/core.js +40 -45
- package/components/shortcuts/shortcut-title.js +0 -1
- package/components/shortcuts/shortcuts-hoc.js +9 -15
- package/components/shortcuts/shortcuts.js +3 -5
- package/components/slider/slider.js +53 -66
- package/components/slider/slider.utils.js +1 -4
- package/components/storage/storage-local.js +2 -8
- package/components/storage/storage.js +0 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +21 -30
- package/components/table/cell.js +3 -4
- package/components/table/disable-hover-hoc.js +24 -28
- package/components/table/header-cell.js +30 -38
- package/components/table/header.js +20 -28
- package/components/table/multitable.js +81 -101
- package/components/table/row-with-focus-sensor.js +17 -28
- package/components/table/row.js +89 -99
- package/components/table/selection-adapter.js +0 -2
- package/components/table/selection-shortcuts-hoc.js +159 -161
- package/components/table/selection.js +23 -31
- package/components/table/simple-table.js +16 -22
- package/components/table/smart-table.js +19 -26
- package/components/table/table.js +137 -146
- package/components/tabs/collapsible-more.js +34 -47
- package/components/tabs/collapsible-tab.js +28 -33
- package/components/tabs/collapsible-tabs.js +18 -26
- package/components/tabs/custom-item.js +3 -6
- package/components/tabs/dumb-tabs.js +48 -64
- package/components/tabs/smart-tabs.js +14 -23
- package/components/tabs/tab-link.js +0 -2
- package/components/tabs/tab.js +0 -1
- package/components/tabs/tabs.js +0 -7
- package/components/tag/tag.js +30 -35
- package/components/tags-input/tags-input.js +192 -218
- package/components/tags-list/tags-list.js +26 -31
- package/components/text/text.js +16 -19
- package/components/toggle/toggle.js +19 -23
- package/components/tooltip/tooltip.js +110 -121
- package/components/upload/upload.js +19 -28
- package/components/user-agreement/service.js +247 -252
- package/components/user-agreement/toolbox.eula.js +160 -1
- package/components/user-agreement/user-agreement.js +23 -32
- package/components/user-card/card.js +0 -5
- package/components/user-card/smart-user-card-tooltip.js +41 -50
- package/components/user-card/tooltip.js +32 -38
- package/components/user-card/user-card.js +0 -5
- package/package.json +9 -3
- package/components/_helpers/_rollupPluginBabelHelpers.js +0 -72
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { memo } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -6,22 +5,18 @@ import { Button } from '../button/button.js';
|
|
|
6
5
|
|
|
7
6
|
var styles = {"dropdown":"ring-dropdown-dropdown","anchor":"ring-dropdown-anchor"};
|
|
8
7
|
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, restProps), {}, {
|
|
22
|
-
children: children
|
|
23
|
-
}));
|
|
24
|
-
};
|
|
8
|
+
const Anchor = ({
|
|
9
|
+
children,
|
|
10
|
+
className,
|
|
11
|
+
...restProps
|
|
12
|
+
}) => jsx(Button, {
|
|
13
|
+
"data-test-ring-dropdown-anchor": true,
|
|
14
|
+
inline: true,
|
|
15
|
+
dropdown: true,
|
|
16
|
+
className: classNames(styles.anchor, className),
|
|
17
|
+
...restProps,
|
|
18
|
+
children: children
|
|
19
|
+
});
|
|
25
20
|
var Anchor$1 = /*#__PURE__*/memo(Anchor);
|
|
26
21
|
|
|
27
22
|
export { Anchor$1 as A, styles as s };
|
|
@@ -15,11 +15,10 @@ const fontSizes = {
|
|
|
15
15
|
[Size.Size48]: 16,
|
|
16
16
|
[Size.Size56]: 22
|
|
17
17
|
};
|
|
18
|
-
function AvatarInfo(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
18
|
+
function AvatarInfo({
|
|
19
|
+
size,
|
|
20
|
+
children
|
|
21
|
+
}) {
|
|
23
22
|
const fontSize = fontSizes[size];
|
|
24
23
|
return jsx("span", {
|
|
25
24
|
style: {
|
|
@@ -2,30 +2,29 @@ import classNames from 'classnames';
|
|
|
2
2
|
|
|
3
3
|
var styles = {"glyph":"ring-icon-glyph","heightS":"ring-button-heightS","heightM":"ring-button-heightM","heightL":"ring-button-heightL","button":"ring-button-button","block":"ring-button-block","inline":"ring-button-inline","icon":"ring-button-icon","iconRight":"ring-button-iconRight","withNormalIcon":"ring-button-withNormalIcon","active":"ring-button-active","disabled":"ring-button-disabled","danger":"ring-button-danger","flat":"ring-button-flat","whiteText":"ring-button-whiteText","primaryBlock":"ring-button-primaryBlock ring-button-flat ring-button-whiteText","success":"ring-button-success ring-button-flat ring-button-whiteText","error":"ring-button-error ring-button-flat ring-button-whiteText","secondary":"ring-button-secondary ring-button-flat","ghost":"ring-button-ghost ring-button-flat","iconOnly":"ring-button-iconOnly","loader":"ring-button-loader","text-loading":"ring-button-text-loading","loaderBackground":"ring-button-loaderBackground","progress":"ring-button-progress","delayed":"ring-button-delayed","short":"ring-button-short","dropdownIcon":"ring-button-dropdownIcon"};
|
|
4
4
|
|
|
5
|
-
function getButtonClasses(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} = _ref;
|
|
5
|
+
function getButtonClasses({
|
|
6
|
+
className,
|
|
7
|
+
active,
|
|
8
|
+
disabled,
|
|
9
|
+
loader,
|
|
10
|
+
primary,
|
|
11
|
+
success,
|
|
12
|
+
error,
|
|
13
|
+
secondary,
|
|
14
|
+
ghost,
|
|
15
|
+
short,
|
|
16
|
+
inline,
|
|
17
|
+
danger,
|
|
18
|
+
delayed,
|
|
19
|
+
icon,
|
|
20
|
+
iconRight,
|
|
21
|
+
height,
|
|
22
|
+
children
|
|
23
|
+
}) {
|
|
25
24
|
const iconOnly = (icon || iconRight) && !children;
|
|
26
25
|
const primaryBlock = primary && !inline;
|
|
27
26
|
const withNormalIcon = iconOnly && inline && !active && !danger && !primary && !disabled;
|
|
28
|
-
return classNames(styles.button, className, styles[
|
|
27
|
+
return classNames(styles.button, className, styles[`height${height}`], inline ? styles.inline : styles.block, {
|
|
29
28
|
[styles.active]: active,
|
|
30
29
|
[styles.danger]: danger,
|
|
31
30
|
[styles.delayed]: delayed,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { PureComponent } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -11,9 +10,10 @@ class Caption extends PureComponent {
|
|
|
11
10
|
className
|
|
12
11
|
} = this.props;
|
|
13
12
|
const classes = classNames(styles.caption, className);
|
|
14
|
-
return jsx("span",
|
|
13
|
+
return jsx("span", {
|
|
14
|
+
...this.props,
|
|
15
15
|
className: classes
|
|
16
|
-
})
|
|
16
|
+
});
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
2
|
import { PureComponent } from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
@@ -16,38 +14,35 @@ import { Size as Size$1 } from '../icon/icon.constants.js';
|
|
|
16
14
|
|
|
17
15
|
var styles = {"userCardSpaced":"ring-user-card-userCardSpaced","userInformationContainer":"ring-user-card-userInformationContainer","userAvatar":"ring-user-card-userAvatar","userInformation":"ring-user-card-userInformation","userInformationGeneral":"ring-user-card-userInformationGeneral","userNameLine":"ring-user-card-userNameLine","userName":"ring-user-card-userName","userLogin":"ring-user-card-userLogin","userEmail":"ring-user-card-userEmail","userCopyIcon":"ring-user-card-userCopyIcon","userEmailWrapper":"ring-user-card-userEmailWrapper","unverifiedLabel":"ring-user-card-unverifiedLabel","userNameInfo":"ring-user-card-userNameInfo","userActiveStatus":"ring-user-card-userActiveStatus","online":"ring-user-card-online"};
|
|
18
16
|
|
|
19
|
-
const _excluded = ["children", "info", "className", "user", "avatarInfo"];
|
|
20
17
|
class UserCard extends PureComponent {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
31
|
-
}
|
|
18
|
+
static contextType = I18nContext;
|
|
19
|
+
copyEmail = () => {
|
|
20
|
+
var _translations$copiedT, _translations$copingT;
|
|
21
|
+
const {
|
|
22
|
+
translate
|
|
23
|
+
} = this.context;
|
|
24
|
+
const translations = this.props.translations;
|
|
25
|
+
clipboard.copyText(this.props.user.email || '', (_translations$copiedT = translations?.copiedToClipboard) !== null && _translations$copiedT !== void 0 ? _translations$copiedT : translate('copyToClipboard'), (_translations$copingT = translations?.copingToClipboardError) !== null && _translations$copingT !== void 0 ? _translations$copingT : translate('copingToClipboardError'));
|
|
26
|
+
};
|
|
32
27
|
// eslint-disable-next-line complexity
|
|
33
28
|
render() {
|
|
34
29
|
var _translations$online, _translations$offline, _translations$banned, _translations$unverif, _translations$copyToC;
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
|
30
|
+
const {
|
|
31
|
+
children,
|
|
32
|
+
info,
|
|
33
|
+
className,
|
|
34
|
+
user,
|
|
35
|
+
avatarInfo,
|
|
36
|
+
...restProps
|
|
37
|
+
} = this.props;
|
|
44
38
|
const {
|
|
45
39
|
translate
|
|
46
40
|
} = this.context;
|
|
47
41
|
const translations = this.props.translations;
|
|
48
42
|
const classes = classNames(className, {});
|
|
49
43
|
const userActiveStatusClasses = classNames(styles.userActiveStatus, user.online ? styles.online : '');
|
|
50
|
-
return jsx("div",
|
|
44
|
+
return jsx("div", {
|
|
45
|
+
...restProps,
|
|
51
46
|
className: classes,
|
|
52
47
|
children: jsxs("div", {
|
|
53
48
|
className: styles.userInformationContainer,
|
|
@@ -75,7 +70,7 @@ class UserCard extends PureComponent {
|
|
|
75
70
|
children: user.name
|
|
76
71
|
}), typeof user.online === 'boolean' && jsx("span", {
|
|
77
72
|
className: userActiveStatusClasses,
|
|
78
|
-
title: user.online ? (_translations$online = translations
|
|
73
|
+
title: user.online ? (_translations$online = translations?.online) !== null && _translations$online !== void 0 ? _translations$online : translate('online') : (_translations$offline = translations?.offline) !== null && _translations$offline !== void 0 ? _translations$offline : translate('offline')
|
|
79
74
|
}), !!info && jsx("span", {
|
|
80
75
|
className: styles.userNameInfo,
|
|
81
76
|
children: info
|
|
@@ -83,7 +78,7 @@ class UserCard extends PureComponent {
|
|
|
83
78
|
title: user.banReason,
|
|
84
79
|
children: jsx(Tag, {
|
|
85
80
|
tagType: TagType.ERROR,
|
|
86
|
-
children: (_translations$banned = translations
|
|
81
|
+
children: (_translations$banned = translations?.banned) !== null && _translations$banned !== void 0 ? _translations$banned : translate('banned')
|
|
87
82
|
})
|
|
88
83
|
})]
|
|
89
84
|
}), jsx("div", {
|
|
@@ -92,16 +87,16 @@ class UserCard extends PureComponent {
|
|
|
92
87
|
}), user.email && jsxs("span", {
|
|
93
88
|
className: styles.userEmailWrapper,
|
|
94
89
|
children: [jsx(Link, {
|
|
95
|
-
href:
|
|
96
|
-
title:
|
|
90
|
+
href: `mailto:${user.email}`,
|
|
91
|
+
title: `mailto:${user.email}`,
|
|
97
92
|
target: '_blank',
|
|
98
93
|
className: styles.userEmail,
|
|
99
94
|
children: user.email
|
|
100
95
|
}), user.unverifiedEmail && jsx("span", {
|
|
101
96
|
className: styles.unverifiedLabel,
|
|
102
|
-
children: (_translations$unverif = translations
|
|
97
|
+
children: (_translations$unverif = translations?.unverified) !== null && _translations$unverif !== void 0 ? _translations$unverif : translate('unverified')
|
|
103
98
|
}), jsx(Icon, {
|
|
104
|
-
title: (_translations$copyToC = translations
|
|
99
|
+
title: (_translations$copyToC = translations?.copyToClipboard) !== null && _translations$copyToC !== void 0 ? _translations$copyToC : translate('copyToClipboard'),
|
|
105
100
|
className: styles.userCopyIcon,
|
|
106
101
|
onClick: this.copyEmail,
|
|
107
102
|
glyph: copyIcon,
|
|
@@ -112,9 +107,8 @@ class UserCard extends PureComponent {
|
|
|
112
107
|
}), children]
|
|
113
108
|
})]
|
|
114
109
|
})
|
|
115
|
-
})
|
|
110
|
+
});
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
|
-
_defineProperty(UserCard, "contextType", I18nContext);
|
|
119
113
|
|
|
120
114
|
export { UserCard as U, styles as s };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import scrollbarWidth from 'scrollbar-width';
|
|
3
2
|
|
|
4
3
|
var styles = {"header":"ring-island-header","scrollableWrapper":"ring-island-scrollableWrapper","panel":"ring-panel-panel","container":"ring-dialog-container","nativeDialog":"ring-dialog-nativeDialog","innerContainer":"ring-dialog-innerContainer","content":"ring-dialog-content","clickableOverlay":"ring-dialog-clickableOverlay","closeIconOutside":"ring-dialog-closeIconOutside","closeIcon":"ring-dialog-closeIcon","closeButton":"ring-dialog-closeButton","closeButtonOutside":"ring-dialog-closeButtonOutside","closeButtonInside":"ring-dialog-closeButtonInside","documentWithoutScroll":"ring-dialog-documentWithoutScroll","popupTarget":"ring-dialog-popupTarget","dense":"ring-dialog-dense"};
|
|
@@ -22,7 +21,7 @@ const prevent = key => {
|
|
|
22
21
|
const documentHasScrollbarGutter = scrollbarGutter === 'stable' || scrollbarGutter === 'both-edges';
|
|
23
22
|
if (documentHasScroll && scrollWidth !== null && scrollWidth !== undefined && scrollWidth > 0 && !documentHasScrollbarGutter) {
|
|
24
23
|
previousDocumentWidth = document.documentElement.style.width;
|
|
25
|
-
document.documentElement.style.width =
|
|
24
|
+
document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
const reset = key => {
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
1
|
import { jsx } from 'react/jsx-runtime';
|
|
5
2
|
import { memo } from 'react';
|
|
6
3
|
import classNames from 'classnames';
|
|
@@ -8,7 +5,6 @@ import memoize from '../global/memoize.js';
|
|
|
8
5
|
|
|
9
6
|
var styles = {"icon":"ring-icon-icon","glyph":"ring-icon-glyph","compatibilityMode":"ring-icon-compatibilityMode","gray":"ring-icon-gray","hover":"ring-icon-hover","green":"ring-icon-green","magenta":"ring-icon-magenta","red":"ring-icon-red","blue":"ring-icon-blue","white":"ring-icon-white","loading":"ring-icon-loading","icon-loading":"ring-icon-icon-loading"};
|
|
10
7
|
|
|
11
|
-
const _excluded = ["src", "className"];
|
|
12
8
|
function convertReactSVGDOMProperty(str) {
|
|
13
9
|
return str.replace(/[-|:]([a-z])/g, g => g[1].toUpperCase());
|
|
14
10
|
}
|
|
@@ -49,12 +45,11 @@ function isCompatibilityMode(iconSrc) {
|
|
|
49
45
|
const hasHeight = /height=".+"/gi.test(iconSrc);
|
|
50
46
|
return !hasWidth || !hasHeight;
|
|
51
47
|
}
|
|
52
|
-
function IconSVG(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
|
+
function IconSVG({
|
|
49
|
+
src,
|
|
50
|
+
className,
|
|
51
|
+
...rest
|
|
52
|
+
}) {
|
|
58
53
|
const glyphClasses = classNames(styles.glyph, {
|
|
59
54
|
[styles.compatibilityMode]: isCompatibilityMode(src)
|
|
60
55
|
}, className);
|
|
@@ -62,12 +57,14 @@ function IconSVG(_ref) {
|
|
|
62
57
|
props,
|
|
63
58
|
html
|
|
64
59
|
} = getSVGFromSource(src);
|
|
65
|
-
return jsx("svg",
|
|
60
|
+
return jsx("svg", {
|
|
61
|
+
...props,
|
|
62
|
+
...rest,
|
|
66
63
|
className: glyphClasses,
|
|
67
64
|
dangerouslySetInnerHTML: {
|
|
68
65
|
__html: html
|
|
69
66
|
}
|
|
70
|
-
})
|
|
67
|
+
});
|
|
71
68
|
}
|
|
72
69
|
var IconSVG$1 = /*#__PURE__*/memo(IconSVG);
|
|
73
70
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from './_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
2
|
import { PureComponent } from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
@@ -15,7 +13,6 @@ import ControlHelp from '../control-help/control-help.js';
|
|
|
15
13
|
|
|
16
14
|
var inputStyles = {"outerContainer":"ring-input-outerContainer","borderless":"ring-input-borderless","container":"ring-input-container","input":"ring-input-input","error":"ring-input-error","withIcon":"ring-input-withIcon","clearable":"ring-input-clearable","icon":"ring-input-icon","clear":"ring-input-clear","empty":"ring-input-empty","errorText":"ring-input-errorText","helpText":"ring-input-helpText","sizeS":"ring-input-sizeS","sizeM":"ring-input-sizeM","sizeL":"ring-input-sizeL","sizeFULL":"ring-input-sizeFULL","heightS":"ring-input-heightS","heightM":"ring-input-heightM","heightL":"ring-input-heightL"};
|
|
17
15
|
|
|
18
|
-
const _excluded = ["size", "multiline", "borderless", "label", "labelType", "error", "help", "className", "inputClassName", "children", "value", "onClear", "disabled", "inputRef", "onChange", "enableShortcuts", "id", "placeholder", "icon", "translations", "height", "beforeInput", "afterInput", "autogrow"];
|
|
19
16
|
function noop() {}
|
|
20
17
|
/**
|
|
21
18
|
* @name Input
|
|
@@ -29,37 +26,16 @@ var Size;
|
|
|
29
26
|
Size["FULL"] = "FULL";
|
|
30
27
|
})(Size || (Size = {}));
|
|
31
28
|
class Input extends PureComponent {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
_defineProperty(this, "composedInputRef", createComposedRef());
|
|
44
|
-
_defineProperty(this, "clear", e => {
|
|
45
|
-
var _this$props$onClear, _this$props;
|
|
46
|
-
(_this$props$onClear = (_this$props = this.props).onClear) === null || _this$props$onClear === void 0 || _this$props$onClear.call(_this$props, e);
|
|
47
|
-
});
|
|
48
|
-
_defineProperty(this, "handleInputChange", e => {
|
|
49
|
-
if (!this.props.multiline) {
|
|
50
|
-
var _this$props$onChange, _this$props2;
|
|
51
|
-
(_this$props$onChange = (_this$props2 = this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props2, e);
|
|
52
|
-
this.checkValue();
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
_defineProperty(this, "handleTextareaChange", e => {
|
|
56
|
-
if (this.props.multiline) {
|
|
57
|
-
var _this$props$onChange2, _this$props3;
|
|
58
|
-
(_this$props$onChange2 = (_this$props3 = this.props).onChange) === null || _this$props$onChange2 === void 0 || _this$props$onChange2.call(_this$props3, e);
|
|
59
|
-
this.checkValue();
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}
|
|
29
|
+
static defaultProps = {
|
|
30
|
+
size: Size.M,
|
|
31
|
+
onChange: noop,
|
|
32
|
+
inputRef: noop,
|
|
33
|
+
enableShortcuts: ['esc'],
|
|
34
|
+
autogrow: true
|
|
35
|
+
};
|
|
36
|
+
state = {
|
|
37
|
+
empty: true
|
|
38
|
+
};
|
|
63
39
|
componentDidMount() {
|
|
64
40
|
this.frame = requestAnimationFrame(() => this.adapt());
|
|
65
41
|
}
|
|
@@ -71,13 +47,16 @@ class Input extends PureComponent {
|
|
|
71
47
|
cancelAnimationFrame(this.frame);
|
|
72
48
|
}
|
|
73
49
|
}
|
|
50
|
+
static contextType = ControlsHeightContext;
|
|
51
|
+
frame;
|
|
52
|
+
input;
|
|
53
|
+
id = getUID('ring-input-');
|
|
74
54
|
getId() {
|
|
75
55
|
return this.props.id || this.id;
|
|
76
56
|
}
|
|
77
57
|
checkValue() {
|
|
78
|
-
var _this$input;
|
|
79
58
|
this.setState({
|
|
80
|
-
empty: !
|
|
59
|
+
empty: !this.input?.value
|
|
81
60
|
});
|
|
82
61
|
if (this.props.multiline && this.props.autogrow && this.input && this.input.scrollHeight >= this.input.clientHeight) {
|
|
83
62
|
this.stretch(this.input);
|
|
@@ -88,47 +67,65 @@ class Input extends PureComponent {
|
|
|
88
67
|
return;
|
|
89
68
|
}
|
|
90
69
|
el.style.height = '0'; // To know the real scrollHeight
|
|
91
|
-
el.style.height =
|
|
70
|
+
el.style.height = `${el.scrollHeight + 2}px`;
|
|
92
71
|
}
|
|
93
72
|
adapt() {
|
|
94
73
|
this.checkValue();
|
|
95
74
|
}
|
|
75
|
+
inputRef = el => {
|
|
76
|
+
this.input = el;
|
|
77
|
+
};
|
|
78
|
+
composedInputRef = createComposedRef();
|
|
79
|
+
clear = e => {
|
|
80
|
+
this.props.onClear?.(e);
|
|
81
|
+
};
|
|
82
|
+
handleInputChange = e => {
|
|
83
|
+
if (!this.props.multiline) {
|
|
84
|
+
this.props.onChange?.(e);
|
|
85
|
+
this.checkValue();
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
handleTextareaChange = e => {
|
|
89
|
+
if (this.props.multiline) {
|
|
90
|
+
this.props.onChange?.(e);
|
|
91
|
+
this.checkValue();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
96
94
|
render() {
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
restProps = _objectWithoutProperties(_this$props4, _excluded);
|
|
95
|
+
const {
|
|
96
|
+
// Modifiers
|
|
97
|
+
size,
|
|
98
|
+
multiline,
|
|
99
|
+
borderless,
|
|
100
|
+
// Props
|
|
101
|
+
label,
|
|
102
|
+
labelType,
|
|
103
|
+
error,
|
|
104
|
+
help,
|
|
105
|
+
className,
|
|
106
|
+
inputClassName,
|
|
107
|
+
children,
|
|
108
|
+
value,
|
|
109
|
+
onClear,
|
|
110
|
+
disabled,
|
|
111
|
+
inputRef,
|
|
112
|
+
onChange,
|
|
113
|
+
enableShortcuts,
|
|
114
|
+
id,
|
|
115
|
+
placeholder,
|
|
116
|
+
icon,
|
|
117
|
+
translations,
|
|
118
|
+
height = typeof this.context === 'function' ? this.context() : this.context,
|
|
119
|
+
beforeInput,
|
|
120
|
+
afterInput,
|
|
121
|
+
autogrow,
|
|
122
|
+
...restProps
|
|
123
|
+
} = this.props;
|
|
127
124
|
const {
|
|
128
125
|
empty
|
|
129
126
|
} = this.state;
|
|
130
127
|
const clearable = !!onClear;
|
|
131
|
-
const classes = classNames(className, inputStyles.outerContainer, [inputStyles[
|
|
128
|
+
const classes = classNames(className, inputStyles.outerContainer, [inputStyles[`size${size}`]], [inputStyles[`height${height}`]], {
|
|
132
129
|
'ring-js-shortcuts': enableShortcuts === true,
|
|
133
130
|
[inputStyles.error]: error !== null && error !== undefined,
|
|
134
131
|
[inputStyles.empty]: empty,
|
|
@@ -149,11 +146,10 @@ class Input extends PureComponent {
|
|
|
149
146
|
'data-enabled-shortcuts': Array.isArray(enableShortcuts) ? enableShortcuts.join(',') : null
|
|
150
147
|
};
|
|
151
148
|
return jsx(I18nContext.Consumer, {
|
|
152
|
-
children:
|
|
149
|
+
children: ({
|
|
150
|
+
translate
|
|
151
|
+
}) => {
|
|
153
152
|
var _translations$clear;
|
|
154
|
-
let {
|
|
155
|
-
translate
|
|
156
|
-
} = _ref;
|
|
157
153
|
return jsxs("div", {
|
|
158
154
|
className: classes,
|
|
159
155
|
"data-test": 'ring-input',
|
|
@@ -167,13 +163,17 @@ class Input extends PureComponent {
|
|
|
167
163
|
children: [icon && jsx(Icon, {
|
|
168
164
|
glyph: icon,
|
|
169
165
|
className: inputStyles.icon
|
|
170
|
-
}), beforeInput, multiline ? jsx("textarea",
|
|
166
|
+
}), beforeInput, multiline ? jsx("textarea", {
|
|
171
167
|
onChange: this.handleTextareaChange,
|
|
172
|
-
rows: 1
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
168
|
+
rows: 1,
|
|
169
|
+
...commonProps,
|
|
170
|
+
...restProps
|
|
171
|
+
}) : jsx("input", {
|
|
172
|
+
onChange: this.handleInputChange,
|
|
173
|
+
...commonProps,
|
|
174
|
+
...restProps
|
|
175
|
+
}), clearable && !disabled && jsx(Button, {
|
|
176
|
+
title: (_translations$clear = translations?.clear) !== null && _translations$clear !== void 0 ? _translations$clear : translate('clear'),
|
|
177
177
|
"data-test": 'ring-input-clear',
|
|
178
178
|
className: inputStyles.clear,
|
|
179
179
|
icon: closeIcon,
|
|
@@ -191,13 +191,5 @@ class Input extends PureComponent {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
_defineProperty(Input, "defaultProps", {
|
|
195
|
-
size: Size.M,
|
|
196
|
-
onChange: noop,
|
|
197
|
-
inputRef: noop,
|
|
198
|
-
enableShortcuts: ['esc'],
|
|
199
|
-
autogrow: true
|
|
200
|
-
});
|
|
201
|
-
_defineProperty(Input, "contextType", ControlsHeightContext);
|
|
202
194
|
|
|
203
195
|
export { Input as I, Size as S, inputStyles as i };
|