@jetbrains/ring-ui 5.0.127 → 5.0.129
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/alert/alert.js +2 -1
- package/components/alert/container.js +2 -1
- package/components/auth/auth__core.js +2 -1
- package/components/auth/request-builder.js +2 -1
- package/components/auth/response-parser.js +2 -1
- package/components/auth/token-validator.js +2 -1
- package/components/auth-dialog/auth-dialog.js +2 -1
- package/components/avatar/avatar.js +2 -1
- package/components/badge/badge.js +2 -1
- package/components/button/button.js +2 -1
- package/components/button-group/button-group.js +2 -1
- package/components/button-group/caption.js +2 -1
- package/components/button-set/button-set.js +2 -1
- package/components/button-toolbar/button-toolbar.js +2 -1
- package/components/caret/caret.js +2 -1
- package/components/checkbox/checkbox.js +2 -1
- package/components/code/code.js +2 -1
- package/components/confirm/confirm.js +2 -1
- package/components/content-layout/content-layout.js +2 -1
- package/components/content-layout/sidebar.js +2 -1
- package/components/data-list/data-list.js +2 -1
- package/components/data-list/item.js +2 -1
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.js +2 -1
- package/components/date-picker/date-popup.js +2 -1
- package/components/date-picker/day.js +2 -1
- package/components/date-picker/month-slider.js +2 -1
- package/components/date-picker/years.js +2 -1
- package/components/dialog/dialog.d.ts +4 -16
- package/components/dialog/dialog.js +6 -3
- package/components/dropdown/dropdown.js +2 -1
- package/components/error-bubble/error-bubble.js +2 -1
- package/components/error-message/error-message.js +2 -1
- package/components/footer/footer.js +1 -0
- package/components/global/react-dom-renderer.js +2 -1
- package/components/grid/col.js +2 -1
- package/components/grid/grid.js +2 -1
- package/components/grid/row.js +2 -1
- package/components/group/group.js +2 -1
- package/components/header/logo.js +2 -1
- package/components/header/profile.js +2 -1
- package/components/header/services-link.js +2 -1
- package/components/header/services.js +2 -1
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.js +2 -1
- package/components/header/tray-icon.js +2 -1
- package/components/header/tray.js +2 -1
- package/components/hub-source/hub-source.js +2 -1
- package/components/icon/icon.js +2 -1
- package/components/input/input.js +2 -1
- package/components/island/island.js +2 -1
- package/components/island-legacy/content-legacy.js +2 -1
- package/components/island-legacy/header-legacy.js +2 -1
- package/components/island-legacy/island-legacy.js +2 -1
- package/components/link/clickableLink.js +2 -1
- package/components/list/list.js +2 -1
- package/components/list/list__hint.js +2 -1
- package/components/list/list__users-groups-source.js +2 -1
- package/components/loader/loader.js +2 -1
- package/components/loader/loader__core.js +2 -1
- package/components/loader-screen/loader-screen.js +2 -1
- package/components/login-dialog/login-dialog.js +2 -1
- package/components/message/message.js +2 -1
- package/components/pager/pager.js +2 -1
- package/components/panel/panel.js +2 -1
- package/components/permissions/permissions.js +2 -1
- package/components/permissions/permissions__cache.js +2 -1
- package/components/popup/popup.js +2 -1
- package/components/popup-menu/popup-menu.js +2 -1
- package/components/progress-bar/progress-bar.js +2 -1
- package/components/query-assist/query-assist.js +4 -3
- package/components/radio/radio.js +2 -1
- package/components/radio/radio__item.js +2 -1
- package/components/select/select.js +2 -1
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +4 -2
- package/components/shortcuts/shortcuts.js +2 -1
- package/components/storage/storage__fallback.js +2 -1
- package/components/tab-trap/tab-trap.js +2 -1
- package/components/table/cell.js +2 -1
- package/components/table/header-cell.js +2 -1
- package/components/table/header.js +2 -1
- package/components/table/multitable.js +2 -1
- package/components/table/row.d.ts +1 -0
- package/components/table/row.js +6 -4
- package/components/table/smart-table.d.ts +1 -0
- package/components/table/table.d.ts +2 -0
- package/components/table/table.js +8 -4
- package/components/tabs/smart-tabs.js +2 -1
- package/components/tabs/tab.js +2 -1
- package/components/tag/tag.js +2 -1
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +3 -2
- package/components/tags-list/tags-list.js +2 -1
- package/components/text/text.js +2 -1
- package/components/tooltip/tooltip.js +2 -1
- package/components/user-agreement/user-agreement.js +2 -1
- package/components/user-card/card.js +2 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.js +2 -1
- package/components/user-card/tooltip.js +2 -1
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
- package/dist/_helpers/anchor.js +1 -1
- package/dist/_helpers/card.js +44 -47
- package/dist/_helpers/footer.js +1 -0
- package/dist/_helpers/select__filter.js +10 -13
- package/dist/_helpers/services-link.js +10 -10
- package/dist/_helpers/sidebar.js +34 -37
- package/dist/_helpers/theme.js +1 -1
- package/dist/_helpers/title.js +12 -16
- package/dist/alert/alert.js +63 -66
- package/dist/alert/container.js +5 -5
- package/dist/alert-service/alert-service.js +5 -7
- package/dist/analytics/analytics.js +1 -2
- package/dist/analytics/analytics__custom-plugin.js +6 -8
- package/dist/auth/auth.js +1 -1
- package/dist/auth/auth__core.js +26 -26
- package/dist/auth/background-flow.js +4 -5
- package/dist/auth/iframe-flow.js +12 -12
- package/dist/auth/landing.js +1 -1
- package/dist/auth/request-builder.js +3 -5
- package/dist/auth/response-parser.js +5 -6
- package/dist/auth/storage.js +12 -12
- package/dist/auth/token-validator.js +13 -16
- package/dist/auth/window-flow.js +18 -19
- package/dist/auth-dialog/auth-dialog.js +54 -57
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +1 -1
- package/dist/avatar/avatar.js +30 -33
- package/dist/avatar-ng/avatar-ng.js +1 -1
- package/dist/badge/badge.js +10 -10
- package/dist/badge-ng/badge-ng.js +1 -1
- package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
- package/dist/button/button.js +24 -27
- package/dist/button-group/button-group.js +5 -5
- package/dist/button-group/caption.js +4 -4
- package/dist/button-ng/button-ng.js +68 -69
- package/dist/button-set/button-set.js +6 -6
- package/dist/button-toolbar/button-toolbar.js +6 -6
- package/dist/caret/caret.js +2 -4
- package/dist/checkbox/checkbox.js +27 -30
- package/dist/checkbox-ng/checkbox-ng.js +0 -1
- package/dist/code/code.js +17 -21
- package/dist/confirm/confirm.js +31 -34
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/content-layout/content-layout.js +17 -20
- package/dist/contenteditable/contenteditable.js +11 -11
- package/dist/data-list/data-list.js +49 -55
- package/dist/data-list/item.js +64 -67
- package/dist/data-list/selection.js +0 -1
- package/dist/data-list/title.js +1 -1
- package/dist/data-list-ng/data-list-ng.js +1 -1
- package/dist/date-picker/date-input.js +39 -42
- package/dist/date-picker/date-picker.js +162 -165
- package/dist/date-picker/date-popup.js +119 -119
- package/dist/date-picker/day.js +34 -38
- package/dist/date-picker/month-names.js +11 -14
- package/dist/date-picker/month-slider.js +24 -28
- package/dist/date-picker/month.js +1 -1
- package/dist/date-picker/months.js +1 -1
- package/dist/date-picker/years.js +9 -13
- package/dist/dialog/dialog.d.ts +4 -16
- package/dist/dialog/dialog.js +68 -65
- package/dist/dialog-ng/dialog-ng.js +21 -22
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
- package/dist/dropdown/dropdown.js +101 -104
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/editable-heading/editable-heading.js +1 -1
- package/dist/error-bubble/error-bubble.js +6 -6
- package/dist/error-message/error-message.js +10 -10
- package/dist/error-message-ng/error-message-ng.js +0 -1
- package/dist/footer-ng/footer-ng.js +19 -21
- package/dist/global/angular-component-factory.js +2 -3
- package/dist/global/dom.js +1 -5
- package/dist/global/focus-sensor-hoc.js +58 -61
- package/dist/global/listeners.js +1 -5
- package/dist/global/react-dom-renderer.js +8 -12
- package/dist/global/rerender-hoc.js +1 -5
- package/dist/global/ring-angular-component.js +1 -3
- package/dist/grid/col.js +13 -14
- package/dist/grid/grid.js +5 -5
- package/dist/grid/row.js +16 -17
- package/dist/group/group.js +5 -5
- package/dist/header/header.js +10 -10
- package/dist/header/logo.js +9 -9
- package/dist/header/profile.js +58 -58
- package/dist/header/services.js +19 -22
- package/dist/header/smart-profile.js +40 -43
- package/dist/header/smart-services.js +28 -31
- package/dist/header/tray-icon.js +6 -6
- package/dist/header/tray.js +5 -5
- package/dist/heading/heading.js +1 -1
- package/dist/heading-ng/heading-ng.js +1 -1
- package/dist/http/http.js +111 -107
- package/dist/http/http.mock.js +3 -4
- package/dist/hub-source/hub-source.js +7 -9
- package/dist/hub-source/hub-source__user.js +0 -1
- package/dist/hub-source/hub-source__users-groups.js +4 -5
- package/dist/icon/icon.js +18 -18
- package/dist/icon/icon__svg.js +1 -1
- package/dist/icon-ng/icon-ng.js +0 -1
- package/dist/input/input.js +35 -38
- package/dist/input-ng/input-ng.js +25 -26
- package/dist/island/adaptive-island-hoc.js +21 -25
- package/dist/island/content.js +62 -65
- package/dist/island/header.js +11 -11
- package/dist/island/island.js +8 -8
- package/dist/island-legacy/content-legacy.js +5 -5
- package/dist/island-legacy/header-legacy.js +5 -5
- package/dist/island-legacy/island-legacy.js +5 -5
- package/dist/link/clickableLink.js +27 -30
- package/dist/link/link.js +16 -16
- package/dist/list/list.js +389 -391
- package/dist/list/list__custom.js +6 -10
- package/dist/list/list__hint.js +3 -4
- package/dist/list/list__item.js +4 -7
- package/dist/list/list__link.js +1 -1
- package/dist/list/list__users-groups-source.js +3 -3
- package/dist/loader/loader.js +16 -19
- package/dist/loader/loader__core.js +62 -62
- package/dist/loader-inline/loader-inline.js +6 -6
- package/dist/loader-ng/loader-ng.js +3 -4
- package/dist/loader-screen/loader-screen.js +6 -6
- package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
- package/dist/login-dialog/login-dialog.js +55 -58
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.js +0 -1
- package/dist/markdown/markdown.js +1 -1
- package/dist/message/message.js +22 -25
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/pager/pager.js +55 -58
- package/dist/pager-ng/pager-ng.js +1 -1
- package/dist/panel/panel.js +5 -5
- package/dist/panel-ng/panel-ng.js +0 -1
- package/dist/permissions/permissions.js +14 -16
- package/dist/permissions/permissions__cache.js +4 -6
- package/dist/permissions-ng/permissions-ng.js +1 -1
- package/dist/place-under-ng/place-under-ng.js +0 -1
- package/dist/popup/popup.js +118 -121
- package/dist/popup/popup.target.js +1 -1
- package/dist/popup/position.js +0 -1
- package/dist/popup-menu/popup-menu.js +19 -22
- package/dist/progress-bar/progress-bar.js +41 -44
- package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
- package/dist/promised-click-ng/promised-click-ng.js +0 -1
- package/dist/query-assist/query-assist.js +507 -501
- package/dist/query-assist/query-assist__suggestions.js +1 -1
- package/dist/query-assist-ng/query-assist-ng.js +1 -1
- package/dist/radio/radio.js +10 -13
- package/dist/radio/radio__item.js +19 -22
- package/dist/select/select.js +350 -349
- package/dist/select/select__popup.js +148 -152
- package/dist/select-ng/select-ng.js +1 -1
- package/dist/select-ng/select-ng__lazy.js +4 -4
- package/dist/select-ng/select-ng__options.js +14 -15
- package/dist/shortcuts/core.js +35 -36
- package/dist/shortcuts/shortcuts-hoc.js +7 -11
- package/dist/shortcuts/shortcuts.js +10 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
- package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
- package/dist/sidebar-ng/sidebar-ng.js +0 -1
- package/dist/storage/storage.js +1 -1
- package/dist/storage/storage__fallback.js +8 -10
- package/dist/storage/storage__local.js +2 -2
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +84 -86
- package/dist/table/cell.js +6 -6
- package/dist/table/disable-hover-hoc.js +23 -25
- package/dist/table/header-cell.js +28 -31
- package/dist/table/header.js +58 -61
- package/dist/table/multitable.js +91 -95
- package/dist/table/row-with-focus-sensor.js +15 -18
- package/dist/table/row.d.ts +1 -0
- package/dist/table/row.js +54 -55
- package/dist/table/selection-shortcuts-hoc.js +145 -147
- package/dist/table/selection.js +7 -9
- package/dist/table/smart-table.d.ts +1 -0
- package/dist/table/smart-table.js +21 -24
- package/dist/table/table.d.ts +2 -0
- package/dist/table/table.js +107 -109
- package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
- package/dist/table-ng/smart-table-ng.js +1 -1
- package/dist/table-ng/table-ng.js +1 -1
- package/dist/tabs/collapsible-more.js +1 -1
- package/dist/tabs/collapsible-tab.js +1 -1
- package/dist/tabs/dumb-tabs.js +46 -49
- package/dist/tabs/smart-tabs.js +10 -10
- package/dist/tabs/tab.js +7 -8
- package/dist/tag/tag.js +42 -45
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/tags-input/tags-input.js +214 -213
- package/dist/tags-input-ng/tags-input-ng.js +1 -1
- package/dist/tags-list/tags-list.js +20 -20
- package/dist/template-ng/template-ng.js +25 -26
- package/dist/text/text.js +6 -6
- package/dist/toggle/toggle.js +19 -19
- package/dist/toggle-ng/toggle-ng.js +1 -1
- package/dist/tooltip/tooltip.js +86 -89
- package/dist/tooltip-ng/tooltip-ng.js +1 -1
- package/dist/user-agreement/service.js +207 -205
- package/dist/user-agreement/user-agreement.js +39 -42
- package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/dist/user-card/smart-user-card-tooltip.js +32 -35
- package/dist/user-card/tooltip.js +26 -26
- package/dist/user-card-ng/user-card-ng.js +1 -1
- package/package.json +17 -17
package/dist/island/content.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { Component, forwardRef } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -12,55 +12,25 @@ const scheduleScrollAction = scheduleRAF();
|
|
|
12
12
|
const noop = () => {};
|
|
13
13
|
const END_DISTANCE = 16;
|
|
14
14
|
class Content extends Component {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
scrollableNode
|
|
35
|
-
} = this;
|
|
36
|
-
if (!scrollableNode) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
this.props.onScroll(scrollableNode);
|
|
40
|
-
const {
|
|
41
|
-
scrollTop,
|
|
42
|
-
scrollHeight,
|
|
43
|
-
offsetHeight
|
|
44
|
-
} = scrollableNode;
|
|
45
|
-
const scrolledToTop = scrollTop === 0;
|
|
46
|
-
const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
|
|
47
|
-
if (scrolledToBottom) {
|
|
48
|
-
this.props.onScrollToBottom?.();
|
|
49
|
-
}
|
|
50
|
-
this.setState({
|
|
51
|
-
scrolledToTop,
|
|
52
|
-
scrolledToBottom
|
|
53
|
-
});
|
|
54
|
-
}));
|
|
55
|
-
_defineProperty(this, "scrollableNode", void 0);
|
|
56
|
-
_defineProperty(this, "setScrollableNodeAndCalculatePosition", node => {
|
|
57
|
-
if (!node) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
this.scrollableNode = node;
|
|
61
|
-
this.calculateScrollPosition();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
15
|
+
static propTypes = {
|
|
16
|
+
children: PropTypes.node,
|
|
17
|
+
className: PropTypes.string,
|
|
18
|
+
scrollableWrapperClassName: PropTypes.string,
|
|
19
|
+
fade: PropTypes.bool,
|
|
20
|
+
bottomBorder: PropTypes.bool,
|
|
21
|
+
onScroll: PropTypes.func,
|
|
22
|
+
onScrollToBottom: PropTypes.func
|
|
23
|
+
};
|
|
24
|
+
static defaultProps = {
|
|
25
|
+
fade: true,
|
|
26
|
+
bottomBorder: false,
|
|
27
|
+
onScroll: noop,
|
|
28
|
+
onScrollToBottom: noop
|
|
29
|
+
};
|
|
30
|
+
state = {
|
|
31
|
+
scrolledToTop: true,
|
|
32
|
+
scrolledToBottom: false
|
|
33
|
+
};
|
|
64
34
|
componentWillUnmount() {
|
|
65
35
|
this.scrollableNode = null;
|
|
66
36
|
if (!this.wrapperNode) {
|
|
@@ -68,6 +38,48 @@ class Content extends Component {
|
|
|
68
38
|
}
|
|
69
39
|
this.resizeDetector.removeAllListeners(this.wrapperNode);
|
|
70
40
|
}
|
|
41
|
+
resizeDetector = createResizeDetector({
|
|
42
|
+
strategy: 'scroll'
|
|
43
|
+
});
|
|
44
|
+
wrapperNode;
|
|
45
|
+
setWrapper = node => {
|
|
46
|
+
if (!node) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.wrapperNode = node;
|
|
50
|
+
this.resizeDetector.listenTo(node, this.calculateScrollPosition);
|
|
51
|
+
};
|
|
52
|
+
calculateScrollPosition = () => scheduleScrollAction(() => {
|
|
53
|
+
const {
|
|
54
|
+
scrollableNode
|
|
55
|
+
} = this;
|
|
56
|
+
if (!scrollableNode) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this.props.onScroll(scrollableNode);
|
|
60
|
+
const {
|
|
61
|
+
scrollTop,
|
|
62
|
+
scrollHeight,
|
|
63
|
+
offsetHeight
|
|
64
|
+
} = scrollableNode;
|
|
65
|
+
const scrolledToTop = scrollTop === 0;
|
|
66
|
+
const scrolledToBottom = offsetHeight + scrollTop >= scrollHeight - END_DISTANCE;
|
|
67
|
+
if (scrolledToBottom) {
|
|
68
|
+
this.props.onScrollToBottom?.();
|
|
69
|
+
}
|
|
70
|
+
this.setState({
|
|
71
|
+
scrolledToTop,
|
|
72
|
+
scrolledToBottom
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
scrollableNode;
|
|
76
|
+
setScrollableNodeAndCalculatePosition = node => {
|
|
77
|
+
if (!node) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.scrollableNode = node;
|
|
81
|
+
this.calculateScrollPosition();
|
|
82
|
+
};
|
|
71
83
|
render() {
|
|
72
84
|
const {
|
|
73
85
|
children,
|
|
@@ -106,21 +118,6 @@ class Content extends Component {
|
|
|
106
118
|
}, children), !fade && children));
|
|
107
119
|
}
|
|
108
120
|
}
|
|
109
|
-
_defineProperty(Content, "propTypes", {
|
|
110
|
-
children: PropTypes.node,
|
|
111
|
-
className: PropTypes.string,
|
|
112
|
-
scrollableWrapperClassName: PropTypes.string,
|
|
113
|
-
fade: PropTypes.bool,
|
|
114
|
-
bottomBorder: PropTypes.bool,
|
|
115
|
-
onScroll: PropTypes.func,
|
|
116
|
-
onScrollToBottom: PropTypes.func
|
|
117
|
-
});
|
|
118
|
-
_defineProperty(Content, "defaultProps", {
|
|
119
|
-
fade: true,
|
|
120
|
-
bottomBorder: false,
|
|
121
|
-
onScroll: noop,
|
|
122
|
-
onScrollToBottom: noop
|
|
123
|
-
});
|
|
124
121
|
const ContentWrapper = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/React.createElement(ScrollHandlerContext.Consumer, null, onScroll => {
|
|
125
122
|
const addProps = onScroll != null ? {
|
|
126
123
|
onScroll,
|
package/dist/island/header.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -27,6 +27,16 @@ const End = {
|
|
|
27
27
|
};
|
|
28
28
|
const BORDER_APPEAR_PHASE = 0.5;
|
|
29
29
|
class Header extends Component {
|
|
30
|
+
static propTypes = {
|
|
31
|
+
children: PropTypes.node,
|
|
32
|
+
className: PropTypes.string,
|
|
33
|
+
border: PropTypes.bool,
|
|
34
|
+
wrapWithTitle: PropTypes.bool,
|
|
35
|
+
phase: PropTypes.number
|
|
36
|
+
};
|
|
37
|
+
static defaultProps = {
|
|
38
|
+
wrapWithTitle: true
|
|
39
|
+
};
|
|
30
40
|
style(name) {
|
|
31
41
|
var _this$props$phase;
|
|
32
42
|
return interpolateLinear(Start[name], End[name], (_this$props$phase = this.props.phase) !== null && _this$props$phase !== void 0 ? _this$props$phase : 0);
|
|
@@ -64,16 +74,6 @@ class Header extends Component {
|
|
|
64
74
|
}, children), !wrapWithTitle && children);
|
|
65
75
|
}
|
|
66
76
|
}
|
|
67
|
-
_defineProperty(Header, "propTypes", {
|
|
68
|
-
children: PropTypes.node,
|
|
69
|
-
className: PropTypes.string,
|
|
70
|
-
border: PropTypes.bool,
|
|
71
|
-
wrapWithTitle: PropTypes.bool,
|
|
72
|
-
phase: PropTypes.number
|
|
73
|
-
});
|
|
74
|
-
_defineProperty(Header, "defaultProps", {
|
|
75
|
-
wrapWithTitle: true
|
|
76
|
-
});
|
|
77
77
|
const HeaderWrapper = props => /*#__PURE__*/React.createElement(PhaseContext.Consumer, null, phase => {
|
|
78
78
|
const addProps = phase != null ? {
|
|
79
79
|
phase
|
package/dist/island/island.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -15,6 +15,13 @@ import '../global/schedule-raf.js';
|
|
|
15
15
|
* @name Island
|
|
16
16
|
*/
|
|
17
17
|
class Island extends Component {
|
|
18
|
+
static propTypes = {
|
|
19
|
+
children: PropTypes.node,
|
|
20
|
+
className: PropTypes.string,
|
|
21
|
+
narrow: PropTypes.bool,
|
|
22
|
+
withoutPaddings: PropTypes.bool,
|
|
23
|
+
'data-test': PropTypes.string
|
|
24
|
+
};
|
|
18
25
|
render() {
|
|
19
26
|
const {
|
|
20
27
|
children,
|
|
@@ -34,13 +41,6 @@ class Island extends Component {
|
|
|
34
41
|
}), children);
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
|
-
_defineProperty(Island, "propTypes", {
|
|
38
|
-
children: PropTypes.node,
|
|
39
|
-
className: PropTypes.string,
|
|
40
|
-
narrow: PropTypes.bool,
|
|
41
|
-
withoutPaddings: PropTypes.bool,
|
|
42
|
-
'data-test': PropTypes.string
|
|
43
|
-
});
|
|
44
44
|
const AdaptiveIsland = adaptiveIslandHOC(Island);
|
|
45
45
|
|
|
46
46
|
export { AdaptiveIsland, Island as default };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } 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
6
|
class Content extends PureComponent {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
className: PropTypes.string,
|
|
9
|
+
children: PropTypes.node
|
|
10
|
+
};
|
|
7
11
|
render() {
|
|
8
12
|
const {
|
|
9
13
|
children,
|
|
@@ -16,9 +20,5 @@ class Content extends PureComponent {
|
|
|
16
20
|
}), children);
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
|
-
_defineProperty(Content, "propTypes", {
|
|
20
|
-
className: PropTypes.string,
|
|
21
|
-
children: PropTypes.node
|
|
22
|
-
});
|
|
23
23
|
|
|
24
24
|
export { Content as default };
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } 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
6
|
class Header extends PureComponent {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
className: PropTypes.string,
|
|
9
|
+
children: PropTypes.node
|
|
10
|
+
};
|
|
7
11
|
render() {
|
|
8
12
|
const {
|
|
9
13
|
children,
|
|
@@ -18,9 +22,5 @@ class Header extends PureComponent {
|
|
|
18
22
|
}, children));
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
|
-
_defineProperty(Header, "propTypes", {
|
|
22
|
-
className: PropTypes.string,
|
|
23
|
-
children: PropTypes.node
|
|
24
|
-
});
|
|
25
25
|
|
|
26
26
|
export { Header as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -6,6 +6,10 @@ export { default as Header } from './header-legacy.js';
|
|
|
6
6
|
export { default as Content } from './content-legacy.js';
|
|
7
7
|
|
|
8
8
|
class Island extends PureComponent {
|
|
9
|
+
static propTypes = {
|
|
10
|
+
className: PropTypes.string,
|
|
11
|
+
children: PropTypes.node
|
|
12
|
+
};
|
|
9
13
|
render() {
|
|
10
14
|
const {
|
|
11
15
|
children,
|
|
@@ -18,9 +22,5 @@ class Island extends PureComponent {
|
|
|
18
22
|
}), children);
|
|
19
23
|
}
|
|
20
24
|
}
|
|
21
|
-
_defineProperty(Island, "propTypes", {
|
|
22
|
-
className: PropTypes.string,
|
|
23
|
-
children: PropTypes.node
|
|
24
|
-
});
|
|
25
25
|
|
|
26
26
|
export { Island as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
@@ -6,27 +6,32 @@ const LEFT_BUTTON = 0;
|
|
|
6
6
|
// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
|
|
7
7
|
const isPlainLeftClick = e => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
|
|
8
8
|
class ClickableLink extends PureComponent {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
static propTypes = {
|
|
10
|
+
onClick: PropTypes.func,
|
|
11
|
+
onPlainLeftClick: PropTypes.func,
|
|
12
|
+
onConditionalClick: PropTypes.func,
|
|
13
|
+
activeClassName: PropTypes.string,
|
|
14
|
+
href: PropTypes.string.isRequired,
|
|
15
|
+
children: PropTypes.node.isRequired
|
|
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);
|
|
26
|
+
}
|
|
27
|
+
if (onConditionalClick) {
|
|
28
|
+
onConditionalClick(isPlainLeft, e);
|
|
29
|
+
}
|
|
30
|
+
if (onPlainLeftClick && isPlainLeft) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
onPlainLeftClick(e);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
30
35
|
render() {
|
|
31
36
|
const {
|
|
32
37
|
onConditionalClick,
|
|
@@ -43,13 +48,5 @@ class ClickableLink extends PureComponent {
|
|
|
43
48
|
}), children);
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
|
-
_defineProperty(ClickableLink, "propTypes", {
|
|
47
|
-
onClick: PropTypes.func,
|
|
48
|
-
onPlainLeftClick: PropTypes.func,
|
|
49
|
-
onConditionalClick: PropTypes.func,
|
|
50
|
-
activeClassName: PropTypes.string,
|
|
51
|
-
href: PropTypes.string.isRequired,
|
|
52
|
-
children: PropTypes.node.isRequired
|
|
53
|
-
});
|
|
54
51
|
|
|
55
52
|
export { ClickableLink as default };
|
package/dist/link/link.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import 'focus-visible';
|
|
3
3
|
import React, { PureComponent, memo } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -33,9 +33,21 @@ const makeWrapText = memoize(innerClassName => {
|
|
|
33
33
|
return /*#__PURE__*/memo(WrapText);
|
|
34
34
|
});
|
|
35
35
|
function linkHOC(ComposedComponent) {
|
|
36
|
-
var _class;
|
|
37
36
|
const isCustom = typeof ComposedComponent !== 'string' && ComposedComponent !== ClickableLink;
|
|
38
|
-
return
|
|
37
|
+
return class Link extends PureComponent {
|
|
38
|
+
static propTypes = {
|
|
39
|
+
className: PropTypes.string,
|
|
40
|
+
innerClassName: PropTypes.string,
|
|
41
|
+
active: PropTypes.bool,
|
|
42
|
+
inherit: PropTypes.bool,
|
|
43
|
+
pseudo: PropTypes.bool,
|
|
44
|
+
hover: PropTypes.bool,
|
|
45
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
46
|
+
'data-test': PropTypes.string,
|
|
47
|
+
href: PropTypes.string,
|
|
48
|
+
onPlainLeftClick: PropTypes.func,
|
|
49
|
+
onClick: PropTypes.func
|
|
50
|
+
};
|
|
39
51
|
getChildren() {
|
|
40
52
|
const {
|
|
41
53
|
children,
|
|
@@ -92,19 +104,7 @@ function linkHOC(ComposedComponent) {
|
|
|
92
104
|
"data-test": joinDataTestAttributes('ring-link', dataTest)
|
|
93
105
|
}), this.getChildren());
|
|
94
106
|
}
|
|
95
|
-
}
|
|
96
|
-
className: PropTypes.string,
|
|
97
|
-
innerClassName: PropTypes.string,
|
|
98
|
-
active: PropTypes.bool,
|
|
99
|
-
inherit: PropTypes.bool,
|
|
100
|
-
pseudo: PropTypes.bool,
|
|
101
|
-
hover: PropTypes.bool,
|
|
102
|
-
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
|
|
103
|
-
'data-test': PropTypes.string,
|
|
104
|
-
href: PropTypes.string,
|
|
105
|
-
onPlainLeftClick: PropTypes.func,
|
|
106
|
-
onClick: PropTypes.func
|
|
107
|
-
}), _class;
|
|
107
|
+
};
|
|
108
108
|
}
|
|
109
109
|
var Link = linkHOC(ClickableLink);
|
|
110
110
|
|