@jetbrains/ring-ui-built 7.0.0-beta.2 → 7.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/_helpers/_rollupPluginBabelHelpers.js +1 -504
- package/components/_helpers/anchor.js +7 -5
- package/components/_helpers/button__classes.js +15 -13
- package/components/_helpers/caption.js +11 -17
- package/components/_helpers/card.js +92 -96
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/icon__svg.js +27 -23
- package/components/_helpers/input.js +150 -171
- package/components/_helpers/query-assist__suggestions.js +78 -93
- package/components/_helpers/select__filter.js +56 -67
- package/components/_helpers/services-link.js +23 -29
- package/components/_helpers/sidebar.js +91 -93
- package/components/_helpers/tab-link.js +8 -6
- package/components/_helpers/theme.js +41 -50
- package/components/_helpers/title.js +59 -69
- package/components/alert/alert.js +112 -156
- package/components/alert/container.js +32 -39
- package/components/alert-service/alert-service.js +104 -161
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -27
- package/components/auth/auth__core.d.ts +1 -1
- package/components/auth/auth__core.js +742 -1428
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +31 -69
- package/components/auth/iframe-flow.js +70 -123
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +160 -318
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.js +99 -150
- package/components/auth-dialog-service/auth-dialog-service.js +6 -26
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.js +94 -123
- package/components/avatar/fallback-avatar.js +20 -34
- package/components/badge/badge.js +32 -38
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.js +67 -80
- package/components/button-group/button-group.js +27 -36
- package/components/button-set/button-set.js +19 -27
- package/components/button-toolbar/button-toolbar.js +17 -25
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.js +69 -86
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -128
- package/components/code/code.js +83 -151
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.js +57 -87
- package/components/confirm-service/confirm-service.js +23 -44
- package/components/content-layout/content-layout.js +41 -56
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.js +38 -46
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -8
- package/components/data-list/data-list.js +113 -156
- package/components/data-list/data-list.mock.js +3 -5
- package/components/data-list/item.js +120 -140
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.js +2 -10
- package/components/date-picker/consts.js +16 -22
- package/components/date-picker/date-input.js +99 -124
- package/components/date-picker/date-picker.js +140 -184
- package/components/date-picker/date-popup.js +280 -327
- package/components/date-picker/day.js +71 -94
- package/components/date-picker/month-names.js +41 -59
- package/components/date-picker/month-slider.js +42 -61
- package/components/date-picker/month.js +17 -24
- package/components/date-picker/months.js +44 -49
- package/components/date-picker/weekdays.js +12 -21
- package/components/date-picker/years.js +77 -98
- package/components/dialog/dialog.js +151 -187
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.js +0 -6
- package/components/dropdown/dropdown.js +134 -154
- package/components/dropdown-menu/dropdown-menu.js +59 -87
- package/components/editable-heading/editable-heading.js +69 -116
- package/components/error-bubble/error-bubble.js +29 -54
- package/components/error-message/error-message.js +34 -49
- package/components/footer/footer.js +27 -28
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +14 -13
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +99 -106
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/prop-types.js +3 -5
- package/components/global/react-dom-renderer.js +29 -40
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.js +1 -18
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.js +27 -39
- package/components/grid/grid.js +18 -27
- package/components/grid/row.js +23 -30
- package/components/group/group.js +16 -22
- package/components/header/header-icon.js +19 -31
- package/components/header/header.d.ts +0 -1
- package/components/header/header.js +30 -64
- package/components/header/links.js +6 -3
- package/components/header/logo.js +15 -26
- package/components/header/profile.js +124 -150
- package/components/header/services-link.js +1 -3
- package/components/header/services.js +64 -97
- package/components/header/smart-profile.js +101 -178
- package/components/header/smart-services.js +55 -90
- package/components/header/tray.js +21 -30
- package/components/heading/heading.js +21 -20
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.js +60 -74
- package/components/icon/icon__svg.js +0 -5
- package/components/icon/index.js +0 -5
- package/components/input/input.js +1 -11
- package/components/island/adaptive-island-hoc.js +29 -37
- package/components/island/content.js +100 -110
- package/components/island/header.js +56 -66
- package/components/island/island.js +25 -33
- package/components/island-legacy/content-legacy.js +16 -22
- package/components/island-legacy/header-legacy.js +19 -25
- package/components/island-legacy/island-legacy.js +16 -22
- package/components/link/clickableLink.js +33 -42
- package/components/link/link.js +47 -55
- package/components/list/consts.js +2 -2
- package/components/list/list.js +399 -486
- package/components/list/list__custom.js +51 -61
- package/components/list/list__hint.js +9 -17
- package/components/list/list__item.js +147 -178
- package/components/list/list__link.js +38 -47
- package/components/list/list__separator.js +15 -24
- package/components/list/list__title.js +25 -34
- package/components/list/list__users-groups-source.js +55 -121
- package/components/loader/loader.js +38 -60
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.js +24 -32
- package/components/loader-screen/loader-screen.js +24 -40
- package/components/login-dialog/login-dialog.js +81 -121
- package/components/login-dialog/service.js +6 -29
- package/components/markdown/markdown.js +16 -24
- package/components/message/message.js +170 -201
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.js +212 -257
- package/components/panel/panel.js +16 -22
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -288
- package/components/popup/popup.target.js +9 -7
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +33 -67
- package/components/progress-bar/progress-bar.js +57 -68
- package/components/query-assist/query-assist.js +583 -652
- package/components/query-assist/query-assist__suggestions.js +2 -26
- package/components/radio/radio.js +15 -27
- package/components/radio/radio__item.js +52 -62
- package/components/scrollable-section/scrollable-section.js +22 -32
- package/components/select/select.js +693 -793
- package/components/select/select__filter.js +1 -26
- package/components/select/select__popup.js +316 -413
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.js +23 -41
- package/components/shortcuts/shortcuts.js +41 -64
- package/components/slider/slider.js +93 -112
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.js +3 -27
- package/components/storage/storage__fallback.js +137 -210
- package/components/storage/storage__local.js +89 -147
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -53
- package/components/table/cell.js +11 -21
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.js +59 -75
- package/components/table/header.js +89 -110
- package/components/table/multitable.js +83 -89
- package/components/table/row-with-focus-sensor.js +25 -57
- package/components/table/row.js +169 -200
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +108 -113
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.js +19 -55
- package/components/table/smart-table.js +42 -76
- package/components/table/table.js +267 -327
- package/components/tabs/collapsible-more.js +47 -73
- package/components/tabs/collapsible-tab.js +32 -36
- package/components/tabs/collapsible-tabs.js +89 -148
- package/components/tabs/custom-item.js +4 -2
- package/components/tabs/dumb-tabs.js +60 -92
- package/components/tabs/smart-tabs.js +29 -61
- package/components/tabs/tab-link.js +1 -3
- package/components/tabs/tab.js +15 -24
- package/components/tabs/tabs.js +1 -26
- package/components/tag/tag.d.ts +0 -2
- package/components/tag/tag.js +120 -162
- package/components/tags-input/tags-input.js +222 -304
- package/components/tags-list/tags-list.js +45 -61
- package/components/text/text.js +28 -37
- package/components/toggle/toggle.js +51 -61
- package/components/tooltip/tooltip.js +109 -141
- package/components/user-agreement/service.js +259 -400
- package/components/user-agreement/user-agreement.js +80 -108
- package/components/user-card/card.js +1 -25
- package/components/user-card/smart-user-card-tooltip.js +52 -103
- package/components/user-card/tooltip.js +35 -65
- package/components/user-card/user-card.js +1 -25
- package/package.json +1 -1
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/tray-icon.d.ts +0 -1
- package/components/header/tray-icon.js +0 -26
@@ -1,15 +1,15 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
2
|
-
import 'core-js/modules/es.array.concat.js';
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
3
2
|
import { Component } from 'react';
|
4
3
|
import PropTypes from 'prop-types';
|
5
4
|
import classNames from 'classnames';
|
6
5
|
import { interpolateLinear } from '../global/linear-function.js';
|
7
6
|
import { m as modules_e6a056e1 } from '../_helpers/island.js';
|
8
7
|
import { PhaseContext } from './adaptive-island-hoc.js';
|
9
|
-
import {
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
9
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
const _excluded = ["children", "className", "wrapWithTitle", "border", "phase"];
|
12
|
+
const Start = {
|
13
13
|
FONT_SIZE: 24,
|
14
14
|
LINE_HEIGHT: 28,
|
15
15
|
PADDING_TOP: 24,
|
@@ -18,7 +18,7 @@ var Start = {
|
|
18
18
|
Y: 0,
|
19
19
|
SPACING: 0
|
20
20
|
};
|
21
|
-
|
21
|
+
const End = {
|
22
22
|
FONT_SIZE: 13,
|
23
23
|
LINE_HEIGHT: 20,
|
24
24
|
PADDING_TOP: 16,
|
@@ -28,57 +28,49 @@ var End = {
|
|
28
28
|
Y: 0.1,
|
29
29
|
SPACING: 1.09
|
30
30
|
};
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
return
|
31
|
+
const BORDER_APPEAR_PHASE = 0.5;
|
32
|
+
class Header extends Component {
|
33
|
+
style(name) {
|
34
|
+
var _this$props$phase;
|
35
|
+
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
|
36
36
|
}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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
|
-
className: modules_e6a056e1.title,
|
75
|
-
style: titleStyle,
|
76
|
-
children: children
|
77
|
-
}), !wrapWithTitle && children]
|
78
|
-
}));
|
79
|
-
}
|
80
|
-
}]);
|
81
|
-
}(Component);
|
37
|
+
render() {
|
38
|
+
const _this$props = this.props,
|
39
|
+
{
|
40
|
+
children,
|
41
|
+
className,
|
42
|
+
wrapWithTitle,
|
43
|
+
border,
|
44
|
+
phase
|
45
|
+
} = _this$props,
|
46
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
47
|
+
const classes = classNames(modules_e6a056e1.header, className, {
|
48
|
+
[modules_e6a056e1.withBottomBorder]: border || phase != null && phase >= BORDER_APPEAR_PHASE
|
49
|
+
});
|
50
|
+
const headerStyle = phase != null ? {
|
51
|
+
lineHeight: "".concat(this.style('LINE_HEIGHT'), "px"),
|
52
|
+
// need to append px because number is a valid line-height value
|
53
|
+
paddingTop: this.style('PADDING_TOP'),
|
54
|
+
paddingBottom: this.style('PADDING_BOTTOM')
|
55
|
+
} : undefined;
|
56
|
+
const scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
|
57
|
+
const titleStyle = phase != null && phase < 1 ? {
|
58
|
+
fontSize: Start.FONT_SIZE,
|
59
|
+
transform: "translate(".concat(this.style('X'), "px, ").concat(this.style('Y'), "px) scale(").concat(scaleFont, ")"),
|
60
|
+
letterSpacing: this.style('SPACING')
|
61
|
+
} : undefined;
|
62
|
+
return /*#__PURE__*/jsxs("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
63
|
+
"data-test": "ring-island-header",
|
64
|
+
className: classes,
|
65
|
+
style: headerStyle,
|
66
|
+
children: [wrapWithTitle && /*#__PURE__*/jsx("h2", {
|
67
|
+
className: modules_e6a056e1.title,
|
68
|
+
style: titleStyle,
|
69
|
+
children: children
|
70
|
+
}), !wrapWithTitle && children]
|
71
|
+
}));
|
72
|
+
}
|
73
|
+
}
|
82
74
|
_defineProperty(Header, "propTypes", {
|
83
75
|
children: PropTypes.node,
|
84
76
|
className: PropTypes.string,
|
@@ -89,15 +81,13 @@ _defineProperty(Header, "propTypes", {
|
|
89
81
|
_defineProperty(Header, "defaultProps", {
|
90
82
|
wrapWithTitle: true
|
91
83
|
});
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
});
|
101
|
-
};
|
84
|
+
const HeaderWrapper = props => /*#__PURE__*/jsx(PhaseContext.Consumer, {
|
85
|
+
children: phase => {
|
86
|
+
const addProps = phase != null ? {
|
87
|
+
phase
|
88
|
+
} : {};
|
89
|
+
return /*#__PURE__*/jsx(Header, _objectSpread2(_objectSpread2({}, props), addProps));
|
90
|
+
}
|
91
|
+
});
|
102
92
|
|
103
93
|
export { HeaderWrapper as default };
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { Component } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -8,43 +8,35 @@ import { m as modules_e6a056e1 } from '../_helpers/island.js';
|
|
8
8
|
import { jsx } from 'react/jsx-runtime';
|
9
9
|
export { default as Header } from './header.js';
|
10
10
|
export { default as Content } from './content.js';
|
11
|
-
import 'core-js/modules/es.array.concat.js';
|
12
11
|
import 'core-js/modules/es.array.reduce.js';
|
13
|
-
import 'core-js/modules/
|
14
|
-
import 'core-js/modules/es.object.to-string.js';
|
12
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
15
13
|
import '../global/linear-function.js';
|
16
14
|
import 'element-resize-detector';
|
17
15
|
import '../global/schedule-raf.js';
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
const _excluded = ["children", "className", "narrow", "withoutPaddings", "data-test"];
|
18
|
+
class Island extends Component {
|
19
|
+
render() {
|
20
|
+
const _this$props = this.props,
|
21
|
+
{
|
22
|
+
children,
|
23
|
+
className,
|
24
|
+
narrow,
|
25
|
+
withoutPaddings,
|
26
|
+
'data-test': dataTest
|
27
|
+
} = _this$props,
|
28
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
29
|
+
const classes = classNames(modules_e6a056e1.island, className, {
|
30
|
+
[modules_e6a056e1.narrowIsland]: narrow,
|
31
|
+
[modules_e6a056e1.withoutPaddings]: withoutPaddings
|
32
|
+
});
|
33
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
34
|
+
className: classes,
|
35
|
+
"data-test": joinDataTestAttributes('ring-island', dataTest),
|
36
|
+
children: children
|
37
|
+
}));
|
24
38
|
}
|
25
|
-
|
26
|
-
return _createClass(Island, [{
|
27
|
-
key: "render",
|
28
|
-
value: function render() {
|
29
|
-
var _this$props = this.props,
|
30
|
-
children = _this$props.children,
|
31
|
-
className = _this$props.className,
|
32
|
-
narrow = _this$props.narrow,
|
33
|
-
withoutPaddings = _this$props.withoutPaddings,
|
34
|
-
dataTest = _this$props['data-test'],
|
35
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
36
|
-
var classes = classNames(modules_e6a056e1.island, className, {
|
37
|
-
[modules_e6a056e1.narrowIsland]: narrow,
|
38
|
-
[modules_e6a056e1.withoutPaddings]: withoutPaddings
|
39
|
-
});
|
40
|
-
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
41
|
-
className: classes,
|
42
|
-
"data-test": joinDataTestAttributes('ring-island', dataTest),
|
43
|
-
children: children
|
44
|
-
}));
|
45
|
-
}
|
46
|
-
}]);
|
47
|
-
}(Component);
|
39
|
+
}
|
48
40
|
_defineProperty(Island, "propTypes", {
|
49
41
|
children: PropTypes.node,
|
50
42
|
className: PropTypes.string,
|
@@ -52,6 +44,6 @@ _defineProperty(Island, "propTypes", {
|
|
52
44
|
withoutPaddings: PropTypes.bool,
|
53
45
|
'data-test': PropTypes.string
|
54
46
|
});
|
55
|
-
|
47
|
+
const AdaptiveIsland = adaptiveIslandHOC(Island);
|
56
48
|
|
57
49
|
export { AdaptiveIsland, Island as default };
|
@@ -1,31 +1,25 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
const _excluded = ["children", "className"];
|
8
|
+
class Content extends PureComponent {
|
9
|
+
render() {
|
10
|
+
const _this$props = this.props,
|
11
|
+
{
|
12
|
+
children,
|
13
|
+
className
|
14
|
+
} = _this$props,
|
15
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
16
|
+
const classes = classNames('ring-island__content', className);
|
17
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
18
|
+
className: classes,
|
19
|
+
children: children
|
20
|
+
}));
|
12
21
|
}
|
13
|
-
|
14
|
-
return _createClass(Content, [{
|
15
|
-
key: "render",
|
16
|
-
value: function render() {
|
17
|
-
var _this$props = this.props,
|
18
|
-
children = _this$props.children,
|
19
|
-
className = _this$props.className,
|
20
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
21
|
-
var classes = classNames('ring-island__content', className);
|
22
|
-
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
23
|
-
className: classes,
|
24
|
-
children: children
|
25
|
-
}));
|
26
|
-
}
|
27
|
-
}]);
|
28
|
-
}(PureComponent);
|
22
|
+
}
|
29
23
|
_defineProperty(Content, "propTypes", {
|
30
24
|
className: PropTypes.string,
|
31
25
|
children: PropTypes.node
|
@@ -1,34 +1,28 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
const _excluded = ["children", "className"];
|
8
|
+
class Header extends PureComponent {
|
9
|
+
render() {
|
10
|
+
const _this$props = this.props,
|
11
|
+
{
|
12
|
+
children,
|
13
|
+
className
|
14
|
+
} = _this$props,
|
15
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
16
|
+
const classes = classNames('ring-island__header', className);
|
17
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
18
|
+
className: classes,
|
19
|
+
children: /*#__PURE__*/jsx("div", {
|
20
|
+
className: "ring-island__title",
|
21
|
+
children: children
|
22
|
+
})
|
23
|
+
}));
|
12
24
|
}
|
13
|
-
|
14
|
-
return _createClass(Header, [{
|
15
|
-
key: "render",
|
16
|
-
value: function render() {
|
17
|
-
var _this$props = this.props,
|
18
|
-
children = _this$props.children,
|
19
|
-
className = _this$props.className,
|
20
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
21
|
-
var classes = classNames('ring-island__header', className);
|
22
|
-
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
23
|
-
className: classes,
|
24
|
-
children: /*#__PURE__*/jsx("div", {
|
25
|
-
className: "ring-island__title",
|
26
|
-
children: children
|
27
|
-
})
|
28
|
-
}));
|
29
|
-
}
|
30
|
-
}]);
|
31
|
-
}(PureComponent);
|
25
|
+
}
|
32
26
|
_defineProperty(Header, "propTypes", {
|
33
27
|
className: PropTypes.string,
|
34
28
|
children: PropTypes.node
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -6,28 +6,22 @@ import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
export { default as Header } from './header-legacy.js';
|
7
7
|
export { default as Content } from './content-legacy.js';
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
const _excluded = ["children", "className"];
|
10
|
+
class Island extends PureComponent {
|
11
|
+
render() {
|
12
|
+
const _this$props = this.props,
|
13
|
+
{
|
14
|
+
children,
|
15
|
+
className
|
16
|
+
} = _this$props,
|
17
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
18
|
+
const classes = classNames('ring-island', className);
|
19
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
20
|
+
className: classes,
|
21
|
+
children: children
|
22
|
+
}));
|
14
23
|
}
|
15
|
-
|
16
|
-
return _createClass(Island, [{
|
17
|
-
key: "render",
|
18
|
-
value: function render() {
|
19
|
-
var _this$props = this.props,
|
20
|
-
children = _this$props.children,
|
21
|
-
className = _this$props.className,
|
22
|
-
restProps = _objectWithoutProperties(_this$props, _excluded);
|
23
|
-
var classes = classNames('ring-island', className);
|
24
|
-
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, restProps), {}, {
|
25
|
-
className: classes,
|
26
|
-
children: children
|
27
|
-
}));
|
28
|
-
}
|
29
|
-
}]);
|
30
|
-
}(PureComponent);
|
24
|
+
}
|
31
25
|
_defineProperty(Island, "propTypes", {
|
32
26
|
className: PropTypes.string,
|
33
27
|
children: PropTypes.node
|
@@ -1,29 +1,23 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
2
|
-
import 'core-js/modules/
|
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
3
|
import { PureComponent } from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
const _excluded = ["onConditionalClick", "onPlainLeftClick", "activeClassName", "href", "children"];
|
8
|
+
const LEFT_BUTTON = 0;
|
9
9
|
// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
_defineProperty(_this, "onClick", function (e) {
|
22
|
-
var _this$props = _this.props,
|
23
|
-
onClick = _this$props.onClick,
|
24
|
-
onConditionalClick = _this$props.onConditionalClick,
|
25
|
-
onPlainLeftClick = _this$props.onPlainLeftClick;
|
26
|
-
var isPlainLeft = isPlainLeftClick(e);
|
10
|
+
const isPlainLeftClick = e => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
|
11
|
+
class ClickableLink extends PureComponent {
|
12
|
+
constructor() {
|
13
|
+
super(...arguments);
|
14
|
+
_defineProperty(this, "onClick", e => {
|
15
|
+
const {
|
16
|
+
onClick,
|
17
|
+
onConditionalClick,
|
18
|
+
onPlainLeftClick
|
19
|
+
} = this.props;
|
20
|
+
const isPlainLeft = isPlainLeftClick(e);
|
27
21
|
if (onClick) {
|
28
22
|
onClick(e);
|
29
23
|
}
|
@@ -35,28 +29,25 @@ var ClickableLink = /*#__PURE__*/function (_PureComponent) {
|
|
35
29
|
onPlainLeftClick(e);
|
36
30
|
}
|
37
31
|
});
|
38
|
-
return _this;
|
39
32
|
}
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}]);
|
59
|
-
}(PureComponent);
|
33
|
+
render() {
|
34
|
+
const _this$props = this.props,
|
35
|
+
{
|
36
|
+
onConditionalClick,
|
37
|
+
onPlainLeftClick,
|
38
|
+
activeClassName,
|
39
|
+
href,
|
40
|
+
children
|
41
|
+
} = _this$props,
|
42
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
43
|
+
return /*#__PURE__*/jsx("a", _objectSpread2(_objectSpread2({
|
44
|
+
href: href
|
45
|
+
}, restProps), {}, {
|
46
|
+
onClick: this.onClick,
|
47
|
+
children: children
|
48
|
+
}));
|
49
|
+
}
|
50
|
+
}
|
60
51
|
_defineProperty(ClickableLink, "propTypes", {
|
61
52
|
onClick: PropTypes.func,
|
62
53
|
onPlainLeftClick: PropTypes.func,
|
package/components/link/link.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { _ as _defineProperty, a as
|
1
|
+
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
@@ -6,70 +6,62 @@ 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
8
|
import { jsx } from 'react/jsx-runtime';
|
9
|
-
import 'core-js/modules/es.array.concat.js';
|
10
9
|
import 'core-js/modules/es.array.reduce.js';
|
11
|
-
import 'core-js/modules/
|
12
|
-
import 'core-js/modules/es.object.to-string.js';
|
10
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
13
11
|
|
14
|
-
|
12
|
+
const _excluded = ["active", "inherit", "pseudo", "hover", "className", "data-test", "href", "children", "onPlainLeftClick", "onClick"];
|
15
13
|
function linkHOC(ComposedComponent) {
|
16
14
|
var _Link;
|
17
|
-
|
18
|
-
return _Link =
|
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
|
-
|
15
|
+
const isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
|
16
|
+
return _Link = class Link extends PureComponent {
|
17
|
+
render() {
|
18
|
+
const _this$props = this.props,
|
19
|
+
{
|
20
|
+
active,
|
21
|
+
inherit,
|
22
|
+
pseudo,
|
23
|
+
hover,
|
24
|
+
className,
|
25
|
+
'data-test': dataTest,
|
26
|
+
href,
|
27
|
+
children,
|
28
|
+
onPlainLeftClick,
|
29
|
+
onClick
|
30
|
+
} = _this$props,
|
31
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
32
|
+
const useButton = pseudo || !isCustom && href == null;
|
33
|
+
const classes = classNames(modules_607b0772.link, className, {
|
34
|
+
[modules_607b0772.active]: active,
|
35
|
+
[modules_607b0772.inherit]: inherit,
|
36
|
+
[modules_607b0772.hover]: hover,
|
37
|
+
[modules_607b0772.pseudo]: useButton
|
38
|
+
});
|
39
|
+
let props = restProps;
|
40
|
+
if (isCustom && !props.activeClassName) {
|
41
|
+
props = _objectSpread2(_objectSpread2({}, props), {}, {
|
42
|
+
activeClassName: modules_607b0772.active
|
45
43
|
});
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
}
|
52
|
-
if (useButton) {
|
53
|
-
return /*#__PURE__*/jsx("button", _objectSpread2(_objectSpread2({
|
54
|
-
type: "button"
|
55
|
-
}, props), {}, {
|
56
|
-
className: classes,
|
57
|
-
onClick: onClick || onPlainLeftClick,
|
58
|
-
"data-test": joinDataTestAttributes('ring-link', dataTest),
|
59
|
-
children: children
|
60
|
-
}));
|
61
|
-
}
|
62
|
-
return /*#__PURE__*/jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, props), {}, {
|
63
|
-
href: href,
|
44
|
+
}
|
45
|
+
if (useButton) {
|
46
|
+
return /*#__PURE__*/jsx("button", _objectSpread2(_objectSpread2({
|
47
|
+
type: "button"
|
48
|
+
}, props), {}, {
|
64
49
|
className: classes,
|
65
|
-
onClick: onClick,
|
66
|
-
onPlainLeftClick: onPlainLeftClick,
|
50
|
+
onClick: onClick || onPlainLeftClick,
|
67
51
|
"data-test": joinDataTestAttributes('ring-link', dataTest),
|
68
52
|
children: children
|
69
53
|
}));
|
70
54
|
}
|
71
|
-
|
72
|
-
|
55
|
+
return /*#__PURE__*/jsx(ComposedComponent, _objectSpread2(_objectSpread2({}, props), {}, {
|
56
|
+
href: href,
|
57
|
+
className: classes,
|
58
|
+
onClick: onClick,
|
59
|
+
onPlainLeftClick: onPlainLeftClick,
|
60
|
+
"data-test": joinDataTestAttributes('ring-link', dataTest),
|
61
|
+
children: children
|
62
|
+
}));
|
63
|
+
}
|
64
|
+
}, _defineProperty(_Link, "propTypes", {
|
73
65
|
className: PropTypes.string,
|
74
66
|
active: PropTypes.bool,
|
75
67
|
inherit: PropTypes.bool,
|
@@ -11,7 +11,7 @@ var Type;
|
|
11
11
|
Type[Type["TITLE"] = 5] = "TITLE";
|
12
12
|
Type[Type["MARGIN"] = 6] = "MARGIN";
|
13
13
|
})(Type || (Type = {}));
|
14
|
-
|
14
|
+
const Dimension = {
|
15
15
|
ITEM_PADDING: 16,
|
16
16
|
ITEM_HEIGHT: 32,
|
17
17
|
COMPACT_ITEM_HEIGHT: 24,
|
@@ -22,6 +22,6 @@ var Dimension = {
|
|
22
22
|
INNER_PADDING: 8,
|
23
23
|
MARGIN: 8
|
24
24
|
};
|
25
|
-
|
25
|
+
const DEFAULT_ITEM_TYPE = Type.ITEM;
|
26
26
|
|
27
27
|
export { DEFAULT_ITEM_TYPE, Dimension, Type };
|