@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,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import 'core-js/modules/es.array.sort.js';
|
|
3
|
-
import { getRect, isMounted, getDocumentScrollLeft, getDocumentScrollTop, getWindowHeight } from '../global/dom.js';
|
|
1
|
+
import { getRect, isMounted, getDocumentScrollLeft, getDocumentScrollTop } from '../global/dom.js';
|
|
4
2
|
import { MaxHeight, Dimension, Directions, MinWidth } from './popup.consts.js';
|
|
5
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
6
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
3
|
|
|
8
4
|
function getScrollingCoordinates(container) {
|
|
9
5
|
if (container) {
|
|
@@ -80,7 +76,7 @@ function getPositionStyles(popup, anchorRect, anchorLeft, anchorTop, offset) {
|
|
|
80
76
|
};
|
|
81
77
|
}
|
|
82
78
|
function verticalOverflow(styles, scrollingCoordinates, attrs) {
|
|
83
|
-
const containerHeight = attrs.container ? attrs.container.clientHeight :
|
|
79
|
+
const containerHeight = attrs.container ? attrs.container.clientHeight : document.documentElement.clientHeight;
|
|
84
80
|
const viewportMinX = scrollingCoordinates.top + attrs.sidePadding;
|
|
85
81
|
const viewportMaxX = scrollingCoordinates.top + containerHeight - attrs.sidePadding;
|
|
86
82
|
const topOverflow = Math.max(viewportMinX - styles.top, 0);
|
|
@@ -90,7 +86,7 @@ function verticalOverflow(styles, scrollingCoordinates, attrs) {
|
|
|
90
86
|
return topOverflow + bottomOverflow;
|
|
91
87
|
}
|
|
92
88
|
function horizontalOverflow(styles, scrollingCoordinates, attrs) {
|
|
93
|
-
const containerWidth = attrs.container ? attrs.container.clientWidth :
|
|
89
|
+
const containerWidth = attrs.container ? attrs.container.clientWidth : document.documentElement.clientWidth;
|
|
94
90
|
const viewportMinY = scrollingCoordinates.left + attrs.sidePadding;
|
|
95
91
|
const viewportMaxY = scrollingCoordinates.left + containerWidth - attrs.sidePadding;
|
|
96
92
|
const leftOverflow = Math.max(viewportMinY - styles.left, 0);
|
|
@@ -104,16 +100,15 @@ const defaultcontainerRect = {
|
|
|
104
100
|
top: 0,
|
|
105
101
|
left: 0
|
|
106
102
|
};
|
|
107
|
-
function handleTopOffScreen(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
} = _ref;
|
|
103
|
+
function handleTopOffScreen({
|
|
104
|
+
sidePadding,
|
|
105
|
+
styles,
|
|
106
|
+
anchorRect,
|
|
107
|
+
maxHeight,
|
|
108
|
+
popupScrollHeight,
|
|
109
|
+
direction,
|
|
110
|
+
scroll
|
|
111
|
+
}) {
|
|
117
112
|
const BORDER_COMPENSATION = 1;
|
|
118
113
|
const {
|
|
119
114
|
TOP_LEFT,
|
|
@@ -207,9 +202,10 @@ function position(attrs) {
|
|
|
207
202
|
const anchorLeft = anchorRect.left + scroll.left + left - containerRect.left;
|
|
208
203
|
const anchorTop = anchorRect.top + scroll.top + top - containerRect.top;
|
|
209
204
|
if (popup) {
|
|
210
|
-
const overflowAttrs =
|
|
205
|
+
const overflowAttrs = {
|
|
206
|
+
...attrs,
|
|
211
207
|
popup
|
|
212
|
-
}
|
|
208
|
+
};
|
|
213
209
|
const directionsMatrix = getPositionStyles(popup, anchorRect, anchorLeft, anchorTop, offset);
|
|
214
210
|
if (!autoPositioning || directions.length === 1) {
|
|
215
211
|
styles = directionsMatrix[directions[0]];
|
|
@@ -220,13 +216,11 @@ function position(attrs) {
|
|
|
220
216
|
.concat(directions[0]).filter(direction => directionsMatrix[direction]).map(direction => ({
|
|
221
217
|
styles: directionsMatrix[direction],
|
|
222
218
|
direction
|
|
223
|
-
})).sort((
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
styles: stylesB
|
|
229
|
-
} = _ref3;
|
|
219
|
+
})).sort(({
|
|
220
|
+
styles: stylesA
|
|
221
|
+
}, {
|
|
222
|
+
styles: stylesB
|
|
223
|
+
}) => {
|
|
230
224
|
const overflowA = verticalOverflow(stylesA, scroll, overflowAttrs) + horizontalOverflow(stylesA, scroll, overflowAttrs);
|
|
231
225
|
const overflowB = verticalOverflow(stylesB, scroll, overflowAttrs) + horizontalOverflow(stylesB, scroll, overflowAttrs);
|
|
232
226
|
return overflowA - overflowB;
|
|
@@ -255,12 +249,12 @@ function position(attrs) {
|
|
|
255
249
|
anchorRect,
|
|
256
250
|
maxHeight,
|
|
257
251
|
direction: chosenDirection,
|
|
258
|
-
popupScrollHeight: (_popup$scrollHeight = popup
|
|
252
|
+
popupScrollHeight: (_popup$scrollHeight = popup?.scrollHeight) !== null && _popup$scrollHeight !== void 0 ? _popup$scrollHeight : 0,
|
|
259
253
|
scroll
|
|
260
254
|
});
|
|
261
255
|
}
|
|
262
256
|
const newMinWidth = calculateMinWidth(anchorRect.width, minWidth);
|
|
263
|
-
if (newMinWidth) {
|
|
257
|
+
if (newMinWidth !== null) {
|
|
264
258
|
styles.minWidth = newMinWidth;
|
|
265
259
|
}
|
|
266
260
|
return {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { _ as _defineProperty, b as _objectSpread2, a as _objectWithoutProperties } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import Popup from '../popup/popup.js';
|
|
5
3
|
import List from '../list/list.js';
|
|
6
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
7
|
-
import 'core-js/modules/es.string.replace.js';
|
|
8
4
|
import 'react';
|
|
9
5
|
import 'react-dom';
|
|
10
6
|
import 'classnames';
|
|
@@ -20,12 +16,9 @@ import '../global/data-tests.js';
|
|
|
20
16
|
import '../tab-trap/tab-trap.js';
|
|
21
17
|
import '../global/configuration.js';
|
|
22
18
|
import '../popup/position.js';
|
|
23
|
-
import 'core-js/modules/es.array.sort.js';
|
|
24
19
|
import '../popup/popup.consts.js';
|
|
25
20
|
import '../popup/popup.target.js';
|
|
26
21
|
import '../popup/position-css.js';
|
|
27
|
-
import 'core-js/modules/es.symbol.description.js';
|
|
28
|
-
import 'core-js/modules/es.string.trim.js';
|
|
29
22
|
import 'react-virtualized/dist/es/List';
|
|
30
23
|
import 'react-virtualized/dist/es/AutoSizer';
|
|
31
24
|
import 'react-virtualized/dist/es/WindowScroller';
|
|
@@ -60,49 +53,46 @@ import '../list/list-title.js';
|
|
|
60
53
|
import '../list/list-separator.js';
|
|
61
54
|
import '../list/list-hint.js';
|
|
62
55
|
|
|
63
|
-
const _excluded = ["className"];
|
|
64
56
|
/**
|
|
65
57
|
* @name Popup Menu
|
|
66
58
|
*/
|
|
67
59
|
class PopupMenu extends Popup {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
60
|
+
static isItemType = List.isItemType;
|
|
61
|
+
static ListProps = List.ListProps;
|
|
62
|
+
static defaultProps = {
|
|
63
|
+
...List.defaultProps,
|
|
64
|
+
...Popup.defaultProps,
|
|
65
|
+
renderOptimization: false,
|
|
66
|
+
closeOnSelect: false,
|
|
67
|
+
largeBorderRadius: true
|
|
68
|
+
};
|
|
69
|
+
onSelect = (item, event) => {
|
|
70
|
+
if (this.props.closeOnSelect) {
|
|
71
|
+
this._onCloseAttempt(event);
|
|
72
|
+
}
|
|
73
|
+
this.props.onSelect(item, event);
|
|
74
|
+
};
|
|
75
|
+
list;
|
|
76
|
+
listRef = el => {
|
|
77
|
+
this.list = el;
|
|
78
|
+
};
|
|
81
79
|
/** @override */
|
|
82
80
|
getInternalContent() {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
props = _objectWithoutProperties(_this$props, _excluded);
|
|
81
|
+
const {
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
} = this.props;
|
|
88
85
|
return jsx("div", {
|
|
89
|
-
children: jsx(List,
|
|
90
|
-
ref: this.listRef
|
|
91
|
-
|
|
86
|
+
children: jsx(List, {
|
|
87
|
+
ref: this.listRef,
|
|
88
|
+
...props,
|
|
92
89
|
maxHeight: this.popup && parseFloat(this.popup.style.maxHeight),
|
|
93
90
|
shortcuts: this.shouldUseShortcuts(),
|
|
94
91
|
onSelect: this.onSelect
|
|
95
|
-
})
|
|
92
|
+
})
|
|
96
93
|
});
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
|
-
_defineProperty(PopupMenu, "isItemType", List.isItemType);
|
|
100
|
-
_defineProperty(PopupMenu, "ListProps", List.ListProps);
|
|
101
|
-
_defineProperty(PopupMenu, "defaultProps", _objectSpread2(_objectSpread2(_objectSpread2({}, List.defaultProps), Popup.defaultProps), {}, {
|
|
102
|
-
renderOptimization: false,
|
|
103
|
-
closeOnSelect: false,
|
|
104
|
-
largeBorderRadius: true
|
|
105
|
-
}));
|
|
106
96
|
const {
|
|
107
97
|
ListProps
|
|
108
98
|
} = List;
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
1
|
import { jsx } from 'react/jsx-runtime';
|
|
4
2
|
import { PureComponent } from 'react';
|
|
5
3
|
import classNames from 'classnames';
|
|
6
4
|
|
|
7
5
|
var styles = {"progressBar":"ring-progress-bar-progressBar","globalMode":"ring-progress-bar-globalMode","line":"ring-progress-bar-line","progress-bar-animation":"ring-progress-bar-progress-bar-animation","staticLineColor":"ring-progress-bar-staticLineColor"};
|
|
8
6
|
|
|
9
|
-
const _excluded = ["className", "global", "max", "value", "label", "staticColor"];
|
|
10
7
|
/**
|
|
11
8
|
* @name Progress Bar
|
|
12
9
|
*/
|
|
13
10
|
class ProgressBar extends PureComponent {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments);
|
|
16
|
-
_defineProperty(this, "progressbarWrapper", void 0);
|
|
17
|
-
_defineProperty(this, "progressbarWrapperRef", el => {
|
|
18
|
-
this.progressbarWrapper = el;
|
|
19
|
-
});
|
|
20
|
-
_defineProperty(this, "progressbar", void 0);
|
|
21
|
-
_defineProperty(this, "progressbarRef", el => {
|
|
22
|
-
this.progressbar = el;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
11
|
/**
|
|
26
12
|
* @param {number} value The progress task value
|
|
27
13
|
* @param {number} max The maximum value
|
|
@@ -33,23 +19,36 @@ class ProgressBar extends PureComponent {
|
|
|
33
19
|
const percents = value * HUNDRED_PERCENT / max;
|
|
34
20
|
return percents > HUNDRED_PERCENT ? HUNDRED_PERCENT : percents;
|
|
35
21
|
}
|
|
22
|
+
static defaultProps = {
|
|
23
|
+
max: 1.0,
|
|
24
|
+
value: 0,
|
|
25
|
+
label: 'Progress'
|
|
26
|
+
};
|
|
27
|
+
progressbarWrapper;
|
|
28
|
+
progressbarWrapperRef = el => {
|
|
29
|
+
this.progressbarWrapper = el;
|
|
30
|
+
};
|
|
31
|
+
progressbar;
|
|
32
|
+
progressbarRef = el => {
|
|
33
|
+
this.progressbar = el;
|
|
34
|
+
};
|
|
36
35
|
render() {
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const width = value ? "".concat(ProgressBar.toPercent(value, max), "%") : undefined;
|
|
36
|
+
const {
|
|
37
|
+
className,
|
|
38
|
+
global,
|
|
39
|
+
max,
|
|
40
|
+
value,
|
|
41
|
+
label,
|
|
42
|
+
staticColor,
|
|
43
|
+
...otherProps
|
|
44
|
+
} = this.props;
|
|
45
|
+
const width = value ? `${ProgressBar.toPercent(value, max)}%` : undefined;
|
|
48
46
|
const classes = classNames(styles.progressBar, className, {
|
|
49
47
|
[styles.globalMode]: global,
|
|
50
48
|
[styles.staticLineColor]: staticColor
|
|
51
49
|
});
|
|
52
|
-
return jsx("div",
|
|
50
|
+
return jsx("div", {
|
|
51
|
+
...otherProps,
|
|
53
52
|
className: classes,
|
|
54
53
|
ref: this.progressbarWrapperRef,
|
|
55
54
|
children: jsx("div", {
|
|
@@ -64,13 +63,8 @@ class ProgressBar extends PureComponent {
|
|
|
64
63
|
width
|
|
65
64
|
}
|
|
66
65
|
})
|
|
67
|
-
})
|
|
66
|
+
});
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
|
-
_defineProperty(ProgressBar, "defaultProps", {
|
|
71
|
-
max: 1.0,
|
|
72
|
-
value: 0,
|
|
73
|
-
label: 'Progress'
|
|
74
|
-
});
|
|
75
69
|
|
|
76
70
|
export { ProgressBar as default };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import 'core-js/modules/es.symbol.description.js';
|
|
2
1
|
import 'react/jsx-runtime';
|
|
3
2
|
import '../list/list.js';
|
|
4
3
|
export { Q as default } from '../_helpers/query-assist-suggestions.js';
|
|
5
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
|
-
import 'core-js/modules/es.string.trim.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
4
|
import 'react';
|
|
9
5
|
import 'classnames';
|
|
10
6
|
import 'react-virtualized/dist/es/List';
|
|
@@ -18,7 +14,6 @@ import '../global/get-uid.js';
|
|
|
18
14
|
import '../global/schedule-raf.js';
|
|
19
15
|
import '../global/memoize.js';
|
|
20
16
|
import '../global/dom.js';
|
|
21
|
-
import 'core-js/modules/es.regexp.exec.js';
|
|
22
17
|
import '../shortcuts/shortcuts.js';
|
|
23
18
|
import '../shortcuts/core.js';
|
|
24
19
|
import 'combokeys';
|
|
@@ -28,7 +23,6 @@ import '../global/create-stateful-context.js';
|
|
|
28
23
|
import '../list/list-item.js';
|
|
29
24
|
import '../avatar/avatar.js';
|
|
30
25
|
import '../global/url.js';
|
|
31
|
-
import 'core-js/modules/es.string.replace.js';
|
|
32
26
|
import '../_helpers/avatar-info.js';
|
|
33
27
|
import '../avatar/avatar-size.js';
|
|
34
28
|
import '../avatar/fallback-avatar.js';
|