@jetbrains/ring-ui-built 6.0.32 → 6.0.33
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 +567 -1
- package/components/_helpers/anchor.js +6 -7
- package/components/_helpers/button__classes.js +14 -16
- package/components/_helpers/caption.js +20 -14
- package/components/_helpers/card.js +105 -95
- package/components/_helpers/dialog__body-scroll-preventer.js +19 -11
- package/components/_helpers/icon__svg.js +25 -22
- package/components/_helpers/input.js +177 -146
- package/components/_helpers/query-assist__suggestions.js +90 -74
- package/components/_helpers/select__filter.js +69 -48
- package/components/_helpers/services-link.js +37 -29
- package/components/_helpers/sidebar.js +107 -99
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/theme.js +40 -31
- package/components/_helpers/title.js +72 -57
- package/components/alert/alert.js +202 -150
- package/components/alert/container.js +41 -32
- package/components/alert-service/alert-service.js +170 -105
- package/components/analytics/analytics.js +22 -12
- package/components/analytics/analytics__custom-plugin.js +75 -54
- package/components/auth/auth.js +36 -4
- package/components/auth/auth__core.js +1471 -746
- package/components/auth/background-flow.js +127 -87
- package/components/auth/down-notification.js +73 -30
- package/components/auth/iframe-flow.js +133 -75
- package/components/auth/request-builder.js +82 -46
- package/components/auth/response-parser.js +116 -86
- package/components/auth/storage.js +334 -171
- package/components/auth/token-validator.js +242 -137
- package/components/auth/window-flow.js +134 -92
- package/components/auth-dialog/auth-dialog.js +172 -114
- package/components/auth-dialog-service/auth-dialog-service.js +31 -8
- package/components/avatar/avatar-example-datauri.js +1 -23
- package/components/avatar/avatar.js +152 -119
- package/components/avatar/fallback-avatar.js +38 -22
- package/components/badge/badge.js +45 -35
- package/components/button/button.js +107 -86
- package/components/button-group/button-group.js +33 -19
- package/components/button-set/button-set.js +32 -20
- package/components/button-toolbar/button-toolbar.js +31 -19
- package/components/caret/caret.js +220 -186
- package/components/checkbox/checkbox.js +101 -76
- package/components/clipboard/clipboard-fallback.js +10 -10
- package/components/clipboard/clipboard.js +132 -35
- package/components/code/code.js +166 -92
- package/components/collapse/collapse-content.js +64 -42
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +14 -12
- package/components/collapse/collapse.js +17 -11
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +3 -1
- package/components/confirm/confirm.js +104 -66
- package/components/confirm-service/confirm-service.js +59 -37
- package/components/content-layout/content-layout.js +64 -43
- package/components/content-layout/sidebar.js +1 -0
- package/components/contenteditable/contenteditable.js +59 -50
- package/components/control-label/control-label.js +9 -9
- package/components/data-list/data-list.js +182 -129
- package/components/data-list/data-list.mock.js +6 -2
- package/components/data-list/item.js +170 -143
- package/components/data-list/selection.js +136 -76
- package/components/data-list/title.js +12 -1
- package/components/date-picker/consts.js +26 -19
- package/components/date-picker/date-input.js +144 -113
- package/components/date-picker/date-picker.js +282 -227
- package/components/date-picker/date-popup.js +395 -350
- package/components/date-picker/day.js +116 -87
- package/components/date-picker/month-names.js +66 -43
- package/components/date-picker/month-slider.js +76 -51
- package/components/date-picker/month.js +25 -16
- package/components/date-picker/months.js +50 -43
- package/components/date-picker/weekdays.js +22 -12
- package/components/date-picker/years.js +110 -83
- package/components/dialog/dialog.js +190 -142
- package/components/dialog/dialog__body-scroll-preventer.js +4 -0
- package/components/dropdown/anchor.js +9 -0
- package/components/dropdown/dropdown.js +213 -182
- package/components/dropdown-menu/dropdown-menu.js +97 -71
- package/components/editable-heading/editable-heading.js +127 -75
- package/components/error-bubble/error-bubble.js +60 -31
- package/components/error-message/error-message.js +59 -39
- package/components/footer/footer.js +30 -27
- package/components/global/compose.js +10 -1
- package/components/global/composeRefs.js +12 -7
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +15 -15
- package/components/global/data-tests.js +14 -6
- package/components/global/dom.js +86 -47
- package/components/global/focus-sensor-hoc.js +132 -122
- package/components/global/fuzzy-highlight.js +36 -22
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +8 -4
- package/components/global/inject-styles.js +15 -10
- package/components/global/listeners.js +51 -27
- package/components/global/memoize.js +12 -6
- package/components/global/normalize-indent.js +50 -19
- package/components/global/promise-with-timeout.js +8 -6
- package/components/global/prop-types.js +5 -3
- package/components/global/react-dom-renderer.js +44 -28
- package/components/global/react-render-adapter.js +1 -1
- package/components/global/rerender-hoc.js +30 -12
- package/components/global/schedule-raf.js +6 -5
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.js +22 -0
- package/components/global/trivial-template-tag.js +10 -3
- package/components/global/typescript-utils.js +6 -2
- package/components/global/url.js +26 -20
- package/components/global/use-event-callback.js +4 -6
- package/components/grid/col.js +52 -35
- package/components/grid/grid.js +31 -17
- package/components/grid/row.js +47 -35
- package/components/group/group.js +25 -17
- package/components/header/header.js +78 -33
- package/components/header/logo.js +36 -20
- package/components/header/profile.js +199 -166
- package/components/header/services-link.js +4 -0
- package/components/header/services.js +116 -73
- package/components/header/smart-profile.js +203 -111
- package/components/header/smart-services.js +113 -62
- package/components/header/tray-icon.js +37 -21
- package/components/header/tray.js +32 -21
- package/components/heading/heading.js +25 -24
- package/components/http/http.js +353 -203
- package/components/http/http.mock.js +101 -49
- package/components/hub-source/hub-source.js +190 -83
- package/components/hub-source/hub-source__user.js +44 -11
- package/components/hub-source/hub-source__users-groups.js +65 -37
- package/components/i18n/i18n-context.js +10 -7
- package/components/i18n/i18n.js +10 -7
- package/components/icon/icon.js +93 -76
- package/components/icon/icon__svg.js +8 -0
- package/components/icon/index.js +8 -0
- package/components/input/input.js +13 -0
- package/components/island/adaptive-island-hoc.js +43 -30
- package/components/island/content.js +132 -115
- package/components/island/header.js +70 -57
- package/components/island/island.js +40 -28
- package/components/island-legacy/content-legacy.js +25 -17
- package/components/island-legacy/header-legacy.js +27 -19
- package/components/island-legacy/island-legacy.js +25 -17
- package/components/link/clickableLink.js +59 -44
- package/components/link/link.js +68 -57
- package/components/list/consts.js +2 -2
- package/components/list/list.js +698 -611
- package/components/list/list__custom.js +62 -44
- package/components/list/list__hint.js +19 -10
- package/components/list/list__item.js +174 -133
- package/components/list/list__link.js +50 -37
- package/components/list/list__separator.js +24 -14
- package/components/list/list__title.js +32 -22
- package/components/list/list__users-groups-source.js +126 -54
- package/components/loader/loader.js +74 -43
- package/components/loader/loader__core.js +263 -198
- package/components/loader-inline/loader-inline.js +35 -23
- package/components/loader-screen/loader-screen.js +46 -25
- package/components/login-dialog/login-dialog.js +158 -111
- package/components/login-dialog/service.js +34 -8
- package/components/markdown/markdown.js +23 -15
- package/components/message/message.js +203 -161
- package/components/old-browsers-message/old-browsers-message.js +18 -11
- package/components/old-browsers-message/old-browsers-message__stop.js +7 -0
- package/components/old-browsers-message/white-list.js +16 -8
- package/components/pager/pager.js +271 -212
- package/components/panel/panel.js +25 -17
- package/components/permissions/permissions.js +172 -127
- package/components/permissions/permissions__cache.js +224 -194
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +343 -284
- package/components/popup/popup.target.js +8 -9
- package/components/popup/position.js +106 -96
- package/components/popup-menu/popup-menu.js +81 -44
- package/components/progress-bar/progress-bar.js +104 -87
- package/components/query-assist/query-assist.js +916 -838
- package/components/query-assist/query-assist__suggestions.js +30 -1
- package/components/radio/radio.js +34 -19
- package/components/radio/radio__item.js +69 -52
- package/components/select/select.js +957 -852
- package/components/select/select__filter.js +30 -0
- package/components/select/select__popup.js +487 -373
- package/components/shortcuts/core.js +217 -166
- package/components/shortcuts/shortcut-title.js +11 -6
- package/components/shortcuts/shortcuts-hoc.js +45 -19
- package/components/shortcuts/shortcuts.js +75 -50
- package/components/slider/slider.js +122 -99
- package/components/slider/slider.utils.js +24 -14
- package/components/storage/storage.js +33 -4
- package/components/storage/storage__fallback.js +224 -149
- package/components/storage/storage__local.js +153 -90
- package/components/tab-trap/tab-trap.js +153 -122
- package/components/table/cell.js +26 -14
- package/components/table/disable-hover-hoc.js +51 -33
- package/components/table/header-cell.js +89 -64
- package/components/table/header.js +132 -104
- package/components/table/multitable.js +125 -107
- package/components/table/row-with-focus-sensor.js +69 -25
- package/components/table/row.js +216 -175
- package/components/table/selection-adapter.js +3 -1
- package/components/table/selection-shortcuts-hoc.js +181 -180
- package/components/table/selection.js +226 -156
- package/components/table/smart-table.js +88 -50
- package/components/table/table.js +358 -289
- package/components/tabs/collapsible-more.js +79 -46
- package/components/tabs/collapsible-tab.js +38 -31
- package/components/tabs/collapsible-tabs.js +153 -88
- package/components/tabs/custom-item.js +2 -4
- package/components/tabs/dumb-tabs.js +117 -74
- package/components/tabs/smart-tabs.js +69 -29
- package/components/tabs/tab-link.js +5 -1
- package/components/tabs/tab.js +31 -19
- package/components/tabs/tabs.js +31 -0
- package/components/tag/tag.js +173 -133
- package/components/tags-input/tags-input.js +427 -329
- package/components/tags-list/tags-list.js +78 -57
- package/components/text/text.js +39 -28
- package/components/toggle/toggle.js +70 -56
- package/components/tooltip/tooltip.js +190 -146
- package/components/user-agreement/service.js +371 -228
- package/components/user-agreement/toolbox.eula.js +1 -160
- package/components/user-agreement/user-agreement.js +120 -85
- package/components/user-card/card.js +29 -0
- package/components/user-card/smart-user-card-tooltip.js +111 -51
- package/components/user-card/tooltip.js +84 -47
- package/components/user-card/user-card.js +29 -0
- package/package.json +1 -1
@@ -1,4 +1,5 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
2
3
|
import React, { Component } from 'react';
|
3
4
|
import PropTypes from 'prop-types';
|
4
5
|
import classNames from 'classnames';
|
@@ -6,7 +7,8 @@ import { interpolateLinear } from '../global/linear-function.js';
|
|
6
7
|
import { m as modules_e6a056e1 } from '../_helpers/island.js';
|
7
8
|
import { PhaseContext } from './adaptive-island-hoc.js';
|
8
9
|
|
9
|
-
|
10
|
+
var _excluded = ["children", "className", "wrapWithTitle", "border", "phase"];
|
11
|
+
var Start = {
|
10
12
|
FONT_SIZE: 24,
|
11
13
|
LINE_HEIGHT: 28,
|
12
14
|
PADDING_TOP: 24,
|
@@ -15,7 +17,7 @@ const Start = {
|
|
15
17
|
Y: 0,
|
16
18
|
SPACING: 0
|
17
19
|
};
|
18
|
-
|
20
|
+
var End = {
|
19
21
|
FONT_SIZE: 13,
|
20
22
|
LINE_HEIGHT: 20,
|
21
23
|
PADDING_TOP: 16,
|
@@ -25,61 +27,72 @@ const End = {
|
|
25
27
|
Y: 0.1,
|
26
28
|
SPACING: 1.09
|
27
29
|
};
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
border: PropTypes.bool,
|
34
|
-
wrapWithTitle: PropTypes.bool,
|
35
|
-
phase: PropTypes.number
|
36
|
-
};
|
37
|
-
static defaultProps = {
|
38
|
-
wrapWithTitle: true
|
39
|
-
};
|
40
|
-
style(name) {
|
41
|
-
var _this$props$phase;
|
42
|
-
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
|
30
|
+
var BORDER_APPEAR_PHASE = 0.5;
|
31
|
+
var Header = /*#__PURE__*/function (_Component) {
|
32
|
+
function Header() {
|
33
|
+
_classCallCheck(this, Header);
|
34
|
+
return _callSuper(this, Header, arguments);
|
43
35
|
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
36
|
+
_inherits(Header, _Component);
|
37
|
+
return _createClass(Header, [{
|
38
|
+
key: "style",
|
39
|
+
value: function style(name) {
|
40
|
+
var _this$props$phase;
|
41
|
+
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
|
42
|
+
}
|
43
|
+
}, {
|
44
|
+
key: "render",
|
45
|
+
value: function render() {
|
46
|
+
var _this$props = this.props,
|
47
|
+
children = _this$props.children,
|
48
|
+
className = _this$props.className,
|
49
|
+
wrapWithTitle = _this$props.wrapWithTitle,
|
50
|
+
border = _this$props.border,
|
51
|
+
phase = _this$props.phase,
|
52
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
53
|
+
var classes = classNames(modules_e6a056e1.header, className, {
|
54
|
+
[modules_e6a056e1.withBottomBorder]: border || phase != null && phase >= BORDER_APPEAR_PHASE
|
55
|
+
});
|
56
|
+
var headerStyle = phase != null ? {
|
57
|
+
lineHeight: "".concat(this.style('LINE_HEIGHT'), "px"),
|
58
|
+
// need to append px because number is a valid line-height value
|
59
|
+
paddingTop: this.style('PADDING_TOP'),
|
60
|
+
paddingBottom: this.style('PADDING_BOTTOM')
|
61
|
+
} : undefined;
|
62
|
+
var scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
|
63
|
+
var titleStyle = phase != null && phase < 1 ? {
|
64
|
+
fontSize: Start.FONT_SIZE,
|
65
|
+
transform: "translate(".concat(this.style('X'), "px, ").concat(this.style('Y'), "px) scale(").concat(scaleFont, ")"),
|
66
|
+
letterSpacing: this.style('SPACING')
|
67
|
+
} : undefined;
|
68
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
69
|
+
"data-test": "ring-island-header",
|
70
|
+
className: classes,
|
71
|
+
style: headerStyle
|
72
|
+
}), wrapWithTitle && /*#__PURE__*/React.createElement("h2", {
|
73
|
+
className: modules_e6a056e1.title,
|
74
|
+
style: titleStyle
|
75
|
+
}, children), !wrapWithTitle && children);
|
76
|
+
}
|
77
|
+
}]);
|
78
|
+
}(Component);
|
79
|
+
_defineProperty(Header, "propTypes", {
|
80
|
+
children: PropTypes.node,
|
81
|
+
className: PropTypes.string,
|
82
|
+
border: PropTypes.bool,
|
83
|
+
wrapWithTitle: PropTypes.bool,
|
84
|
+
phase: PropTypes.number
|
85
|
+
});
|
86
|
+
_defineProperty(Header, "defaultProps", {
|
87
|
+
wrapWithTitle: true
|
83
88
|
});
|
89
|
+
var HeaderWrapper = function HeaderWrapper(props) {
|
90
|
+
return /*#__PURE__*/React.createElement(PhaseContext.Consumer, null, function (phase) {
|
91
|
+
var addProps = phase != null ? {
|
92
|
+
phase
|
93
|
+
} : {};
|
94
|
+
return /*#__PURE__*/React.createElement(Header, _extends({}, props, addProps));
|
95
|
+
});
|
96
|
+
};
|
84
97
|
|
85
98
|
export { HeaderWrapper as default };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { Component } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -7,40 +7,52 @@ import adaptiveIslandHOC from './adaptive-island-hoc.js';
|
|
7
7
|
import { m as modules_e6a056e1 } from '../_helpers/island.js';
|
8
8
|
export { default as Header } from './header.js';
|
9
9
|
export { default as Content } from './content.js';
|
10
|
+
import 'core-js/modules/es.array.concat.js';
|
11
|
+
import 'core-js/modules/es.array.reduce.js';
|
12
|
+
import 'core-js/modules/es.object.entries.js';
|
13
|
+
import 'core-js/modules/es.object.to-string.js';
|
10
14
|
import '../global/linear-function.js';
|
11
15
|
import 'element-resize-detector';
|
12
16
|
import '../global/schedule-raf.js';
|
13
17
|
|
18
|
+
var _excluded = ["children", "className", "narrow", "withoutPaddings", "data-test"];
|
14
19
|
/**
|
15
20
|
* @name Island
|
16
21
|
*/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
narrow: PropTypes.bool,
|
22
|
-
withoutPaddings: PropTypes.bool,
|
23
|
-
'data-test': PropTypes.string
|
24
|
-
};
|
25
|
-
render() {
|
26
|
-
const {
|
27
|
-
children,
|
28
|
-
className,
|
29
|
-
narrow,
|
30
|
-
withoutPaddings,
|
31
|
-
'data-test': dataTest,
|
32
|
-
...restProps
|
33
|
-
} = this.props;
|
34
|
-
const classes = classNames(modules_e6a056e1.island, className, {
|
35
|
-
[modules_e6a056e1.narrowIsland]: narrow,
|
36
|
-
[modules_e6a056e1.withoutPaddings]: withoutPaddings
|
37
|
-
});
|
38
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
39
|
-
className: classes,
|
40
|
-
"data-test": joinDataTestAttributes('ring-island', dataTest)
|
41
|
-
}), children);
|
22
|
+
var Island = /*#__PURE__*/function (_Component) {
|
23
|
+
function Island() {
|
24
|
+
_classCallCheck(this, Island);
|
25
|
+
return _callSuper(this, Island, arguments);
|
42
26
|
}
|
43
|
-
|
44
|
-
|
27
|
+
_inherits(Island, _Component);
|
28
|
+
return _createClass(Island, [{
|
29
|
+
key: "render",
|
30
|
+
value: function render() {
|
31
|
+
var _this$props = this.props,
|
32
|
+
children = _this$props.children,
|
33
|
+
className = _this$props.className,
|
34
|
+
narrow = _this$props.narrow,
|
35
|
+
withoutPaddings = _this$props.withoutPaddings,
|
36
|
+
dataTest = _this$props['data-test'],
|
37
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
38
|
+
var classes = classNames(modules_e6a056e1.island, className, {
|
39
|
+
[modules_e6a056e1.narrowIsland]: narrow,
|
40
|
+
[modules_e6a056e1.withoutPaddings]: withoutPaddings
|
41
|
+
});
|
42
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
43
|
+
className: classes,
|
44
|
+
"data-test": joinDataTestAttributes('ring-island', dataTest)
|
45
|
+
}), children);
|
46
|
+
}
|
47
|
+
}]);
|
48
|
+
}(Component);
|
49
|
+
_defineProperty(Island, "propTypes", {
|
50
|
+
children: PropTypes.node,
|
51
|
+
className: PropTypes.string,
|
52
|
+
narrow: PropTypes.bool,
|
53
|
+
withoutPaddings: PropTypes.bool,
|
54
|
+
'data-test': PropTypes.string
|
55
|
+
});
|
56
|
+
var AdaptiveIsland = adaptiveIslandHOC(Island);
|
45
57
|
|
46
58
|
export { AdaptiveIsland, Island as default };
|
@@ -1,24 +1,32 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
render() {
|
12
|
-
const {
|
13
|
-
children,
|
14
|
-
className,
|
15
|
-
...restProps
|
16
|
-
} = this.props;
|
17
|
-
const classes = classNames('ring-island__content', className);
|
18
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
19
|
-
className: classes
|
20
|
-
}), children);
|
6
|
+
var _excluded = ["children", "className"];
|
7
|
+
var Content = /*#__PURE__*/function (_PureComponent) {
|
8
|
+
function Content() {
|
9
|
+
_classCallCheck(this, Content);
|
10
|
+
return _callSuper(this, Content, arguments);
|
21
11
|
}
|
22
|
-
|
12
|
+
_inherits(Content, _PureComponent);
|
13
|
+
return _createClass(Content, [{
|
14
|
+
key: "render",
|
15
|
+
value: function render() {
|
16
|
+
var _this$props = this.props,
|
17
|
+
children = _this$props.children,
|
18
|
+
className = _this$props.className,
|
19
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
20
|
+
var classes = classNames('ring-island__content', className);
|
21
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
22
|
+
className: classes
|
23
|
+
}), children);
|
24
|
+
}
|
25
|
+
}]);
|
26
|
+
}(PureComponent);
|
27
|
+
_defineProperty(Content, "propTypes", {
|
28
|
+
className: PropTypes.string,
|
29
|
+
children: PropTypes.node
|
30
|
+
});
|
23
31
|
|
24
32
|
export { Content as default };
|
@@ -1,26 +1,34 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
render() {
|
12
|
-
const {
|
13
|
-
children,
|
14
|
-
className,
|
15
|
-
...restProps
|
16
|
-
} = this.props;
|
17
|
-
const classes = classNames('ring-island__header', className);
|
18
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
19
|
-
className: classes
|
20
|
-
}), /*#__PURE__*/React.createElement("div", {
|
21
|
-
className: "ring-island__title"
|
22
|
-
}, children));
|
6
|
+
var _excluded = ["children", "className"];
|
7
|
+
var Header = /*#__PURE__*/function (_PureComponent) {
|
8
|
+
function Header() {
|
9
|
+
_classCallCheck(this, Header);
|
10
|
+
return _callSuper(this, Header, arguments);
|
23
11
|
}
|
24
|
-
|
12
|
+
_inherits(Header, _PureComponent);
|
13
|
+
return _createClass(Header, [{
|
14
|
+
key: "render",
|
15
|
+
value: function render() {
|
16
|
+
var _this$props = this.props,
|
17
|
+
children = _this$props.children,
|
18
|
+
className = _this$props.className,
|
19
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
20
|
+
var classes = classNames('ring-island__header', className);
|
21
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
22
|
+
className: classes
|
23
|
+
}), /*#__PURE__*/React.createElement("div", {
|
24
|
+
className: "ring-island__title"
|
25
|
+
}, children));
|
26
|
+
}
|
27
|
+
}]);
|
28
|
+
}(PureComponent);
|
29
|
+
_defineProperty(Header, "propTypes", {
|
30
|
+
className: PropTypes.string,
|
31
|
+
children: PropTypes.node
|
32
|
+
});
|
25
33
|
|
26
34
|
export { Header as default };
|
@@ -1,26 +1,34 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
export { default as Header } from './header-legacy.js';
|
6
6
|
export { default as Content } from './content-legacy.js';
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
render() {
|
14
|
-
const {
|
15
|
-
children,
|
16
|
-
className,
|
17
|
-
...restProps
|
18
|
-
} = this.props;
|
19
|
-
const classes = classNames('ring-island', className);
|
20
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
21
|
-
className: classes
|
22
|
-
}), children);
|
8
|
+
var _excluded = ["children", "className"];
|
9
|
+
var Island = /*#__PURE__*/function (_PureComponent) {
|
10
|
+
function Island() {
|
11
|
+
_classCallCheck(this, Island);
|
12
|
+
return _callSuper(this, Island, arguments);
|
23
13
|
}
|
24
|
-
|
14
|
+
_inherits(Island, _PureComponent);
|
15
|
+
return _createClass(Island, [{
|
16
|
+
key: "render",
|
17
|
+
value: function render() {
|
18
|
+
var _this$props = this.props,
|
19
|
+
children = _this$props.children,
|
20
|
+
className = _this$props.className,
|
21
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
22
|
+
var classes = classNames('ring-island', className);
|
23
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
24
|
+
className: classes
|
25
|
+
}), children);
|
26
|
+
}
|
27
|
+
}]);
|
28
|
+
}(PureComponent);
|
29
|
+
_defineProperty(Island, "propTypes", {
|
30
|
+
className: PropTypes.string,
|
31
|
+
children: PropTypes.node
|
32
|
+
});
|
25
33
|
|
26
34
|
export { Island as default };
|
@@ -1,52 +1,67 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
2
3
|
import React, { PureComponent } from 'react';
|
3
4
|
import PropTypes from 'prop-types';
|
4
5
|
|
5
|
-
|
6
|
+
var _excluded = ["onConditionalClick", "onPlainLeftClick", "activeClassName", "href", "children"];
|
7
|
+
var LEFT_BUTTON = 0;
|
6
8
|
// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
};
|
17
|
-
onClick = e => {
|
18
|
-
const {
|
19
|
-
onClick,
|
20
|
-
onConditionalClick,
|
21
|
-
onPlainLeftClick
|
22
|
-
} = this.props;
|
23
|
-
const isPlainLeft = isPlainLeftClick(e);
|
24
|
-
if (onClick) {
|
25
|
-
onClick(e);
|
9
|
+
var isPlainLeftClick = function isPlainLeftClick(e) {
|
10
|
+
return e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
|
11
|
+
};
|
12
|
+
var ClickableLink = /*#__PURE__*/function (_PureComponent) {
|
13
|
+
function ClickableLink() {
|
14
|
+
var _this;
|
15
|
+
_classCallCheck(this, ClickableLink);
|
16
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
17
|
+
args[_key] = arguments[_key];
|
26
18
|
}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
onConditionalClick
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
}, restProps, {
|
47
|
-
onClick: this.onClick
|
48
|
-
}), children);
|
19
|
+
_this = _callSuper(this, ClickableLink, [].concat(args));
|
20
|
+
_defineProperty(_this, "onClick", function (e) {
|
21
|
+
var _this$props = _this.props,
|
22
|
+
onClick = _this$props.onClick,
|
23
|
+
onConditionalClick = _this$props.onConditionalClick,
|
24
|
+
onPlainLeftClick = _this$props.onPlainLeftClick;
|
25
|
+
var isPlainLeft = isPlainLeftClick(e);
|
26
|
+
if (onClick) {
|
27
|
+
onClick(e);
|
28
|
+
}
|
29
|
+
if (onConditionalClick) {
|
30
|
+
onConditionalClick(isPlainLeft, e);
|
31
|
+
}
|
32
|
+
if (onPlainLeftClick && isPlainLeft) {
|
33
|
+
e.preventDefault();
|
34
|
+
onPlainLeftClick(e);
|
35
|
+
}
|
36
|
+
});
|
37
|
+
return _this;
|
49
38
|
}
|
50
|
-
|
39
|
+
_inherits(ClickableLink, _PureComponent);
|
40
|
+
return _createClass(ClickableLink, [{
|
41
|
+
key: "render",
|
42
|
+
value: function render() {
|
43
|
+
var _this$props2 = this.props;
|
44
|
+
_this$props2.onConditionalClick;
|
45
|
+
_this$props2.onPlainLeftClick;
|
46
|
+
_this$props2.activeClassName;
|
47
|
+
var href = _this$props2.href,
|
48
|
+
children = _this$props2.children,
|
49
|
+
restProps = _objectWithoutProperties(_this$props2, _excluded);
|
50
|
+
return /*#__PURE__*/React.createElement("a", _extends({
|
51
|
+
href: href
|
52
|
+
}, restProps, {
|
53
|
+
onClick: this.onClick
|
54
|
+
}), children);
|
55
|
+
}
|
56
|
+
}]);
|
57
|
+
}(PureComponent);
|
58
|
+
_defineProperty(ClickableLink, "propTypes", {
|
59
|
+
onClick: PropTypes.func,
|
60
|
+
onPlainLeftClick: PropTypes.func,
|
61
|
+
onConditionalClick: PropTypes.func,
|
62
|
+
activeClassName: PropTypes.string,
|
63
|
+
href: PropTypes.string.isRequired,
|
64
|
+
children: PropTypes.node.isRequired
|
65
|
+
});
|
51
66
|
|
52
67
|
export { ClickableLink as default };
|
package/components/link/link.js
CHANGED
@@ -1,72 +1,83 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import joinDataTestAttributes from '../global/data-tests.js';
|
6
6
|
import ClickableLink from './clickableLink.js';
|
7
7
|
import { m as modules_607b0772 } from '../_helpers/link.js';
|
8
|
+
import 'core-js/modules/es.array.concat.js';
|
9
|
+
import 'core-js/modules/es.array.reduce.js';
|
10
|
+
import 'core-js/modules/es.object.entries.js';
|
11
|
+
import 'core-js/modules/es.object.to-string.js';
|
8
12
|
|
13
|
+
var _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
|
9
14
|
function linkHOC(ComposedComponent) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
}, props, {
|
15
|
+
var _Link;
|
16
|
+
var isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
|
17
|
+
return _Link = /*#__PURE__*/function (_PureComponent) {
|
18
|
+
function Link() {
|
19
|
+
_classCallCheck(this, Link);
|
20
|
+
return _callSuper(this, Link, arguments);
|
21
|
+
}
|
22
|
+
_inherits(Link, _PureComponent);
|
23
|
+
return _createClass(Link, [{
|
24
|
+
key: "render",
|
25
|
+
value: function render() {
|
26
|
+
var _this$props = this.props,
|
27
|
+
active = _this$props.active,
|
28
|
+
inherit = _this$props.inherit,
|
29
|
+
pseudo = _this$props.pseudo,
|
30
|
+
hover = _this$props.hover,
|
31
|
+
className = _this$props.className,
|
32
|
+
dataTest = _this$props['data-test'],
|
33
|
+
href = _this$props.href,
|
34
|
+
children = _this$props.children,
|
35
|
+
onPlainLeftClick = _this$props.onPlainLeftClick,
|
36
|
+
onClick = _this$props.onClick,
|
37
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
38
|
+
var useButton = pseudo || !isCustom && href == null;
|
39
|
+
var classes = classNames(modules_607b0772.link, className, {
|
40
|
+
[modules_607b0772.active]: active,
|
41
|
+
[modules_607b0772.inherit]: inherit,
|
42
|
+
[modules_607b0772.hover]: hover,
|
43
|
+
[modules_607b0772.pseudo]: useButton
|
44
|
+
});
|
45
|
+
var props = restProps;
|
46
|
+
if (isCustom && !props.activeClassName) {
|
47
|
+
props = _objectSpread2(_objectSpread2({}, props), {}, {
|
48
|
+
activeClassName: modules_607b0772.active
|
49
|
+
});
|
50
|
+
}
|
51
|
+
if (useButton) {
|
52
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
53
|
+
type: "button"
|
54
|
+
}, props, {
|
55
|
+
className: classes,
|
56
|
+
onClick: onClick || onPlainLeftClick,
|
57
|
+
"data-test": joinDataTestAttributes('ring-link', dataTest)
|
58
|
+
}), children);
|
59
|
+
}
|
60
|
+
return /*#__PURE__*/React.createElement(ComposedComponent, _extends({}, props, {
|
61
|
+
href: href,
|
56
62
|
className: classes,
|
57
|
-
onClick: onClick
|
63
|
+
onClick: onClick,
|
64
|
+
onPlainLeftClick: onPlainLeftClick,
|
58
65
|
"data-test": joinDataTestAttributes('ring-link', dataTest)
|
59
66
|
}), children);
|
60
67
|
}
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
68
|
+
}]);
|
69
|
+
}(PureComponent), _defineProperty(_Link, "propTypes", {
|
70
|
+
className: PropTypes.string,
|
71
|
+
active: PropTypes.bool,
|
72
|
+
inherit: PropTypes.bool,
|
73
|
+
pseudo: PropTypes.bool,
|
74
|
+
hover: PropTypes.bool,
|
75
|
+
children: PropTypes.node,
|
76
|
+
'data-test': PropTypes.string,
|
77
|
+
href: PropTypes.string,
|
78
|
+
onPlainLeftClick: PropTypes.func,
|
79
|
+
onClick: PropTypes.func
|
80
|
+
}), _Link;
|
70
81
|
}
|
71
82
|
var Link = linkHOC(ClickableLink);
|
72
83
|
|