@jetbrains/ring-ui 7.0.71 → 7.0.73
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/babel.config.js +14 -8
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/{alert.js → alert.jsx} +14 -8
- package/components/alert/{container.js → container.jsx} +4 -3
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/{alert-service.js → alert-service.jsx} +8 -5
- package/components/auth/auth-core.js +6 -7
- package/components/auth/{down-notification.js → down-notification.jsx} +12 -4
- package/components/auth/{iframe-flow.js → iframe-flow.jsx} +6 -5
- package/components/auth/storage.js +1 -1
- package/components/auth/token-validator.js +1 -1
- package/components/auth/window-flow.js +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/{auth-dialog.js → auth-dialog.jsx} +18 -2
- package/components/auth-dialog-service/{auth-dialog-service.js → auth-dialog-service.jsx} +3 -2
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/{avatar-info.js → avatar-info.jsx} +4 -3
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/{avatar.js → avatar.jsx} +11 -6
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/{fallback-avatar.js → fallback-avatar.jsx} +16 -2
- package/components/avatar-stack/avatar-stack.d.ts +1 -1
- package/components/avatar-stack/avatar-stack.jsx +24 -0
- package/components/banner/banner.d.ts +1 -1
- package/components/banner/{banner.js → banner.jsx} +15 -3
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/{breadcrumbs.js → breadcrumbs.jsx} +4 -2
- package/components/button/button.d.ts +1 -1
- package/components/button/{button.js → button.jsx} +13 -5
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/{button-group.js → button-group.jsx} +5 -2
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/{caption.js → caption.jsx} +1 -2
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/{button-set.js → button-set.jsx} +3 -2
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/{button-toolbar.js → button-toolbar.jsx} +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/{checkbox.js → checkbox.jsx} +13 -2
- package/components/code/code.d.ts +1 -1
- package/components/code/{code.js → code.jsx} +8 -5
- package/components/collapse/collapse-content.jsx +65 -0
- package/components/collapse/{collapse-control.js → collapse-control.jsx} +6 -3
- package/components/collapse/{collapse.js → collapse.jsx} +12 -8
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/{confirm.js → confirm.jsx} +13 -2
- package/components/confirm-service/{confirm-service.js → confirm-service.jsx} +3 -2
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/{content-layout.js → content-layout.jsx} +6 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/{sidebar.js → sidebar.jsx} +11 -2
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/{contenteditable.js → contenteditable.jsx} +5 -6
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/{control-help.js → control-help.jsx} +1 -2
- package/components/control-label/{control-label.js → control-label.jsx} +5 -3
- package/components/data-list/data-list.d.ts +1 -1
- package/components/data-list/{data-list.js → data-list.jsx} +17 -8
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.jsx +215 -0
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/{item.js → item.jsx} +23 -7
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/{title.js → title.jsx} +11 -2
- package/components/date-picker/consts.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/{date-input.js → date-input.jsx} +1 -2
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/{date-picker.js → date-picker.jsx} +24 -12
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/{date-popup.js → date-popup.jsx} +20 -9
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/{day.js → day.jsx} +4 -3
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/{month-names.js → month-names.jsx} +12 -7
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/{month-slider.js → month-slider.jsx} +4 -3
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/{month.js → month.jsx} +4 -3
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/{months.js → months.jsx} +9 -6
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/{weekdays.js → weekdays.jsx} +6 -3
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/{years.js → years.jsx} +9 -6
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/{dialog.js → dialog.jsx} +39 -16
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.jsx +8 -0
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/{dropdown.js → dropdown.jsx} +10 -7
- package/components/dropdown-menu/{dropdown-menu.js → dropdown-menu.jsx} +10 -5
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/{editable-heading.js → editable-heading.jsx} +31 -3
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.jsx +23 -0
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.jsx +25 -0
- package/components/footer/{footer.js → footer.jsx} +14 -7
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/{create-stateful-context.js → create-stateful-context.jsx} +3 -2
- package/components/global/{focus-sensor-hoc.js → focus-sensor-hoc.jsx} +1 -2
- package/components/global/get-uid.js +1 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/{react-dom-renderer.js → react-dom-renderer.jsx} +1 -2
- package/components/global/{rerender-hoc.js → rerender-hoc.jsx} +2 -3
- package/components/global/{theme.js → theme.jsx} +12 -4
- package/components/grid/col.d.ts +1 -1
- package/components/grid/{col.js → col.jsx} +3 -2
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/{grid.js → grid.jsx} +3 -2
- package/components/grid/row.d.ts +1 -1
- package/components/grid/{row.js → row.jsx} +3 -2
- package/components/group/group.d.ts +1 -1
- package/components/group/{group.js → group.jsx} +3 -2
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/{header-icon.js → header-icon.jsx} +1 -2
- package/components/header/header.d.ts +1 -1
- package/components/header/{header.js → header.jsx} +4 -3
- package/components/header/links.d.ts +1 -1
- package/components/header/{links.js → links.jsx} +1 -2
- package/components/header/logo.d.ts +1 -1
- package/components/header/{logo.js → logo.jsx} +3 -2
- package/components/header/{profile.js → profile.jsx} +19 -6
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.jsx +16 -0
- package/components/header/services.d.ts +1 -1
- package/components/header/{services.js → services.jsx} +16 -11
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/{smart-profile.js → smart-profile.jsx} +1 -2
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/{smart-services.js → smart-services.jsx} +1 -2
- package/components/header/tray.d.ts +1 -1
- package/components/header/{tray.js → tray.jsx} +4 -3
- package/components/heading/{heading.js → heading.jsx} +16 -9
- package/components/i18n/{i18n-context.js → i18n-context.jsx} +1 -2
- package/components/icon/icon-svg.d.ts +1 -1
- package/components/icon/{icon-svg.js → icon-svg.jsx} +2 -3
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/{icon.js → icon.jsx} +4 -3
- package/components/input/input.d.ts +1 -1
- package/components/input/{input.js → input.jsx} +16 -2
- package/components/island/{adaptive-island-hoc.js → adaptive-island-hoc.jsx} +5 -2
- package/components/island/content.d.ts +1 -1
- package/components/island/{content.js → content.jsx} +13 -6
- package/components/island/header.d.ts +1 -1
- package/components/island/{header.js → header.jsx} +13 -6
- package/components/island/island.d.ts +1 -1
- package/components/island/{island.js → island.jsx} +3 -2
- package/components/link/clickable-link.d.ts +1 -1
- package/components/link/{clickable-link.js → clickable-link.jsx} +4 -2
- package/components/link/{link.js → link.jsx} +6 -3
- package/components/list/list-custom.d.ts +1 -1
- package/components/list/{list-custom.js → list-custom.jsx} +4 -2
- package/components/list/list-hint.d.ts +1 -1
- package/components/list/{list-hint.js → list-hint.jsx} +3 -2
- package/components/list/list-item.d.ts +1 -1
- package/components/list/{list-item.js → list-item.jsx} +33 -5
- package/components/list/list-separator.d.ts +1 -1
- package/components/list/{list-separator.js → list-separator.jsx} +3 -2
- package/components/list/list-title.d.ts +1 -1
- package/components/list/list-title.jsx +19 -0
- package/components/list/list-users-groups-source.js +1 -1
- package/components/list/list.classes.js +1 -1
- package/components/list/list.d.ts +6 -6
- package/components/list/{list.js → list.jsx} +45 -23
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/{loader.js → loader.jsx} +12 -6
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/{loader-inline.js → loader-inline.jsx} +5 -3
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/{loader-screen.js → loader-screen.jsx} +3 -2
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/{login-dialog.js → login-dialog.jsx} +9 -2
- package/components/login-dialog/{service.js → service.jsx} +3 -2
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/{markdown.js → markdown.jsx} +3 -2
- package/components/message/message.d.ts +1 -1
- package/components/message/{message.js → message.jsx} +21 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/{pager.js → pager.jsx} +56 -12
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/{panel.js → panel.jsx} +3 -2
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/{popup.js → popup.jsx} +26 -14
- package/components/popup/popup.target.jsx +10 -0
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/{popup-menu.js → popup-menu.jsx} +3 -2
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/{progress-bar.js → progress-bar.jsx} +3 -2
- package/components/query-assist/query-assist-suggestions.d.ts +1 -1
- package/components/query-assist/{query-assist-suggestions.js → query-assist-suggestions.jsx} +10 -5
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/{query-assist.js → query-assist.jsx} +46 -8
- package/components/radio/radio-item.d.ts +1 -1
- package/components/radio/{radio-item.js → radio-item.jsx} +11 -3
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/{radio.js → radio.jsx} +1 -2
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/{scrollable-section.js → scrollable-section.jsx} +2 -3
- package/components/select/select-filter.d.ts +1 -1
- package/components/select/{select-filter.js → select-filter.jsx} +5 -2
- package/components/select/select-popup.d.ts +7 -7
- package/components/select/{select-popup.js → select-popup.jsx} +43 -13
- package/components/select/select.css +3 -0
- package/components/select/select.d.ts +3 -3
- package/components/select/{select.js → select.jsx} +92 -44
- package/components/shortcuts/{shortcuts-hoc.js → shortcuts-hoc.jsx} +3 -2
- package/components/slider/{slider.js → slider.jsx} +50 -32
- package/components/tab-trap/{tab-trap.js → tab-trap.jsx} +39 -33
- package/components/table/cell.d.ts +1 -1
- package/components/table/{cell.js → cell.jsx} +3 -2
- package/components/table/{disable-hover-hoc.js → disable-hover-hoc.jsx} +2 -3
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/{header-cell.js → header-cell.jsx} +12 -2
- package/components/table/header.d.ts +2 -2
- package/components/table/{header.js → header.jsx} +19 -6
- package/components/table/multitable.d.ts +1 -1
- package/components/table/{multitable.js → multitable.jsx} +4 -3
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/{row-with-focus-sensor.js → row-with-focus-sensor.jsx} +1 -2
- package/components/table/row.d.ts +1 -1
- package/components/table/{row.js → row.jsx} +24 -5
- package/components/table/{selection-shortcuts-hoc.js → selection-shortcuts-hoc.jsx} +1 -2
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/{simple-table.js → simple-table.jsx} +2 -3
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/{smart-table.js → smart-table.jsx} +1 -2
- package/components/table/table.d.ts +2 -2
- package/components/table/{table.js → table.jsx} +30 -9
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/{collapsible-more.js → collapsible-more.jsx} +14 -7
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/{collapsible-tab.js → collapsible-tab.jsx} +3 -4
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/{collapsible-tabs.js → collapsible-tabs.jsx} +11 -3
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/{dumb-tabs.js → dumb-tabs.jsx} +10 -4
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/{smart-tabs.js → smart-tabs.jsx} +3 -2
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.jsx +16 -0
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/{tab.js → tab.jsx} +3 -2
- package/components/tabs/tabs.css +1 -0
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/{tag.js → tag.jsx} +24 -16
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/{tags-input.js → tags-input.jsx} +13 -5
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/{tags-list.js → tags-list.jsx} +8 -4
- package/components/text/text.d.ts +1 -1
- package/components/text/{text.js → text.jsx} +3 -2
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.jsx +37 -0
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/{tooltip.js → tooltip.jsx} +12 -3
- package/components/upload/{upload.js → upload.jsx} +7 -4
- package/components/user-agreement/{service.js → service.jsx} +13 -4
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.jsx +61 -0
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.jsx +64 -0
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/{smart-user-card-tooltip.js → smart-user-card-tooltip.jsx} +6 -3
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/{tooltip.js → tooltip.jsx} +12 -9
- package/package.json +28 -33
- package/components/avatar-stack/avatar-stack.js +0 -18
- package/components/collapse/collapse-content.js +0 -76
- package/components/data-list/data-list.mock.js +0 -170
- package/components/dropdown/anchor.js +0 -7
- package/components/error-bubble/error-bubble.js +0 -17
- package/components/error-message/error-message.js +0 -17
- package/components/header/services-link.js +0 -15
- package/components/list/list-title.js +0 -13
- package/components/popup/popup.target.js +0 -7
- package/components/tabs/tab-link.js +0 -9
- package/components/toggle/toggle.js +0 -22
- package/components/user-agreement/user-agreement.js +0 -33
- package/components/user-card/card.js +0 -31
- /package/components/global/{controls-height.js → controls-height.jsx} +0 -0
- /package/components/link/{clickableLink.js → clickableLink.jsx} +0 -0
- /package/components/tabs/{custom-item.js → custom-item.jsx} +0 -0
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { forwardRef, Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import createResizeDetector from 'element-resize-detector';
|
|
5
4
|
import scheduleRAF from '../global/schedule-raf';
|
|
6
|
-
import styles from './island.css';
|
|
7
5
|
import { ScrollHandlerContext } from './adaptive-island-hoc';
|
|
6
|
+
import styles from './island.css';
|
|
8
7
|
const scheduleScrollAction = scheduleRAF();
|
|
9
8
|
const noop = () => { };
|
|
10
9
|
const END_DISTANCE = 16;
|
|
@@ -67,12 +66,20 @@ class Content extends Component {
|
|
|
67
66
|
[styles.withBottomBorder]: bottomBorder && !scrolledToBottom,
|
|
68
67
|
});
|
|
69
68
|
const scrollableWrapperClasses = classNames(styles.scrollableWrapper, scrollableWrapperClassName);
|
|
70
|
-
return (
|
|
69
|
+
return (<div {...restProps} data-test='ring-island-content' className={classes}>
|
|
70
|
+
<div tabIndex={tabIndex} className={scrollableWrapperClasses} ref={this.setScrollableNodeAndCalculatePosition} onScroll={fade ? this.calculateScrollPosition : noop}>
|
|
71
|
+
{fade && <div ref={this.setWrapper}>{children}</div>}
|
|
72
|
+
|
|
73
|
+
{!fade && children}
|
|
74
|
+
</div>
|
|
75
|
+
</div>);
|
|
71
76
|
}
|
|
72
77
|
}
|
|
73
|
-
const ContentWrapper = forwardRef((props, ref) => (
|
|
78
|
+
const ContentWrapper = forwardRef((props, ref) => (<ScrollHandlerContext.Consumer>
|
|
79
|
+
{onScroll => {
|
|
74
80
|
const addProps = onScroll ? { onScroll, bottomBorder: true } : {};
|
|
75
|
-
return
|
|
76
|
-
}
|
|
81
|
+
return <Content {...props} {...addProps} ref={ref}/>;
|
|
82
|
+
}}
|
|
83
|
+
</ScrollHandlerContext.Consumer>));
|
|
77
84
|
ContentWrapper.displayName = 'ContentWrapper';
|
|
78
85
|
export default ContentWrapper;
|
|
@@ -4,5 +4,5 @@ export interface IslandHeaderProps extends HTMLAttributes<HTMLElement> {
|
|
|
4
4
|
border?: boolean | null | undefined;
|
|
5
5
|
phase?: number | undefined;
|
|
6
6
|
}
|
|
7
|
-
declare const HeaderWrapper: (props: IslandHeaderProps) => import("react
|
|
7
|
+
declare const HeaderWrapper: (props: IslandHeaderProps) => import("react").JSX.Element;
|
|
8
8
|
export default HeaderWrapper;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import { interpolateLinear } from '../global/linear-function';
|
|
5
|
-
import styles from './island.css';
|
|
6
4
|
import { PhaseContext } from './adaptive-island-hoc';
|
|
5
|
+
import styles from './island.css';
|
|
7
6
|
const Start = {
|
|
8
7
|
FONT_SIZE: 24,
|
|
9
8
|
LINE_HEIGHT: 28,
|
|
@@ -57,11 +56,19 @@ class Header extends Component {
|
|
|
57
56
|
}
|
|
58
57
|
: undefined;
|
|
59
58
|
const titleStyle = this.getTitleStyle(phase);
|
|
60
|
-
return (
|
|
59
|
+
return (<div {...restProps} data-test='ring-island-header' className={classes} style={headerStyle}>
|
|
60
|
+
{wrapWithTitle && (<h2 className={styles.title} style={titleStyle}>
|
|
61
|
+
{children}
|
|
62
|
+
</h2>)}
|
|
63
|
+
|
|
64
|
+
{!wrapWithTitle && children}
|
|
65
|
+
</div>);
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
|
-
const HeaderWrapper = (props) => (
|
|
68
|
+
const HeaderWrapper = (props) => (<PhaseContext.Consumer>
|
|
69
|
+
{phase => {
|
|
64
70
|
const addProps = phase !== null && phase !== undefined ? { phase } : {};
|
|
65
|
-
return
|
|
66
|
-
}
|
|
71
|
+
return <Header {...props} {...addProps}/>;
|
|
72
|
+
}}
|
|
73
|
+
</PhaseContext.Consumer>);
|
|
67
74
|
export default HeaderWrapper;
|
|
@@ -8,7 +8,7 @@ export interface IslandProps extends HTMLAttributes<HTMLElement> {
|
|
|
8
8
|
* @name Island
|
|
9
9
|
*/
|
|
10
10
|
export default class Island extends Component<IslandProps> {
|
|
11
|
-
render(): import("react
|
|
11
|
+
render(): import("react").JSX.Element;
|
|
12
12
|
}
|
|
13
13
|
export declare const AdaptiveIsland: import("react").ComponentClass<IslandProps, any>;
|
|
14
14
|
export { default as Header } from './header';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import dataTests from '../global/data-tests';
|
|
@@ -14,7 +13,9 @@ export default class Island extends Component {
|
|
|
14
13
|
[styles.narrowIsland]: narrow,
|
|
15
14
|
[styles.withoutPaddings]: withoutPaddings,
|
|
16
15
|
});
|
|
17
|
-
return (
|
|
16
|
+
return (<div {...restProps} className={classes} data-test={dataTests('ring-island', dataTest)}>
|
|
17
|
+
{children}
|
|
18
|
+
</div>);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
export const AdaptiveIsland = adaptiveIslandHOC(Island);
|
|
@@ -8,5 +8,5 @@ export interface ClickableLinkProps extends AnchorHTMLAttributes<HTMLAnchorEleme
|
|
|
8
8
|
}
|
|
9
9
|
export default class ClickableLink extends PureComponent<ClickableLinkProps> {
|
|
10
10
|
onClick: (e: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
11
|
-
render():
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
const LEFT_BUTTON = 0;
|
|
4
4
|
// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behaviour. Same applies to non-left clicks
|
|
5
5
|
const isPlainLeftClick = (e) => e.button === LEFT_BUTTON && !e.altKey && !e.ctrlKey && !e.metaKey && !e.shiftKey;
|
|
@@ -20,6 +20,8 @@ export default class ClickableLink extends PureComponent {
|
|
|
20
20
|
};
|
|
21
21
|
render() {
|
|
22
22
|
const { onConditionalClick, onPlainLeftClick, activeClassName, href, children, ...restProps } = this.props;
|
|
23
|
-
return (
|
|
23
|
+
return (<a href={href} {...restProps} onClick={this.onClick}>
|
|
24
|
+
{children}
|
|
25
|
+
</a>);
|
|
24
26
|
}
|
|
25
27
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent, } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import dataTests from '../global/data-tests';
|
|
@@ -21,9 +20,13 @@ export function linkHOC(ComposedComponent) {
|
|
|
21
20
|
props = { ...props, activeClassName: styles.active };
|
|
22
21
|
}
|
|
23
22
|
if (useButton) {
|
|
24
|
-
return (
|
|
23
|
+
return (<button type='button' {...props} className={classes} onClick={(onClick || onPlainLeftClick)} data-test={dataTests('ring-link', dataTest)}>
|
|
24
|
+
{children}
|
|
25
|
+
</button>);
|
|
25
26
|
}
|
|
26
|
-
return (
|
|
27
|
+
return (<ComposedComponent {...props} href={href} className={classes} onClick={onClick} {...(typeof ComposedComponent !== 'string' ? { onPlainLeftClick } : {})} data-test={dataTests('ring-link', dataTest)}>
|
|
28
|
+
{children}
|
|
29
|
+
</ComposedComponent>);
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
32
|
}
|
|
@@ -3,5 +3,5 @@ import * as React from 'react';
|
|
|
3
3
|
import { type ListDataItemProps } from './consts';
|
|
4
4
|
export default class ListCustom<T> extends PureComponent<ListDataItemProps<T>> {
|
|
5
5
|
handleKeyPress: (event: React.KeyboardEvent) => void;
|
|
6
|
-
render():
|
|
6
|
+
render(): React.JSX.Element;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import dataTests from '../global/data-tests';
|
|
4
4
|
import getEventKey from '../global/get-event-key';
|
|
5
5
|
import { getListClasses } from './list.classes';
|
|
@@ -18,6 +18,8 @@ export default class ListCustom extends PureComponent {
|
|
|
18
18
|
}, this.props['data-test']);
|
|
19
19
|
const content = typeof template === 'function' ? template(this.props) : template;
|
|
20
20
|
const TagName = tagName || 'span';
|
|
21
|
-
return (
|
|
21
|
+
return (<TagName role={role || 'button'} aria-disabled={disabled} tabIndex={tabIndex} onClick={onClick} onKeyPress={this.handleKeyPress} onMouseOver={onMouseOver} onFocus={onMouseOver} onMouseUp={onMouseUp} className={classes} data-test={dataTest}>
|
|
22
|
+
{content}
|
|
23
|
+
</TagName>);
|
|
22
24
|
}
|
|
23
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classnames from 'classnames';
|
|
4
3
|
import styles from './list.css';
|
|
@@ -8,6 +7,8 @@ import styles from './list.css';
|
|
|
8
7
|
*/
|
|
9
8
|
export default class ListHint extends PureComponent {
|
|
10
9
|
render() {
|
|
11
|
-
return (
|
|
10
|
+
return (<span className={classnames(styles.item, styles.hint)} data-test='ring-list-hint'>
|
|
11
|
+
{this.props.label}
|
|
12
|
+
</span>);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import dataTests from '../global/data-tests';
|
|
@@ -7,9 +6,9 @@ import Checkbox from '../checkbox/checkbox';
|
|
|
7
6
|
import Icon from '../icon/icon';
|
|
8
7
|
import getUID from '../global/get-uid';
|
|
9
8
|
import Link, { linkHOC } from '../link/link';
|
|
10
|
-
import styles from './list.css';
|
|
11
9
|
import { Type } from './consts';
|
|
12
10
|
import { getListClasses } from './list.classes';
|
|
11
|
+
import styles from './list.css';
|
|
13
12
|
/**
|
|
14
13
|
* @constructor
|
|
15
14
|
* @extends {ReactComponent}
|
|
@@ -54,7 +53,9 @@ export default class ListItem extends PureComponent {
|
|
|
54
53
|
'ring-list-item-selected': checkbox,
|
|
55
54
|
'ring-list-link': isLink,
|
|
56
55
|
}, dataTest);
|
|
57
|
-
const labelElement = (
|
|
56
|
+
const labelElement = (<span className={styles.label} title={computedTitle} data-test='ring-list-item-label'>
|
|
57
|
+
{label ?? children}
|
|
58
|
+
</span>);
|
|
58
59
|
const commonProps = {
|
|
59
60
|
id: this.id,
|
|
60
61
|
tabIndex,
|
|
@@ -66,9 +67,36 @@ export default class ListItem extends PureComponent {
|
|
|
66
67
|
className: classes,
|
|
67
68
|
style,
|
|
68
69
|
disabled,
|
|
69
|
-
children: (
|
|
70
|
+
children: (<>
|
|
71
|
+
<div className={styles.top} onMouseOut={this.stopBubbling} onBlur={this.stopBubbling}>
|
|
72
|
+
{!showCheckbox && (<div className={styles.left}>
|
|
73
|
+
{leftNodes}
|
|
74
|
+
{glyph && (<Icon className={styles.glyph} glyph={glyph} size={this.props.iconSize} suppressSizeWarning={this.props.suppressSizeWarning}/>)}
|
|
75
|
+
{(avatar || shouldShowGeneratedAvatar) && (<Avatar className={styles.avatar} url={avatar} size={AvatarSize.Size20} subavatar={subavatar} username={username}/>)}
|
|
76
|
+
</div>)}
|
|
77
|
+
|
|
78
|
+
{labelWrapper ? labelWrapper(labelElement) : labelElement}
|
|
79
|
+
|
|
80
|
+
{description && (<span className={styles.description} data-test='ring-list-item-description'>
|
|
81
|
+
{description}
|
|
82
|
+
</span>)}
|
|
83
|
+
|
|
84
|
+
<div className={styles.right}>
|
|
85
|
+
{rightGlyph && (<Icon className={styles.rightGlyph} glyph={rightGlyph} suppressSizeWarning={this.props.suppressSizeWarning} size={this.props.iconSize}/>)}
|
|
86
|
+
{icon && <div className={styles.icon} style={{ backgroundImage: `url("${icon}")` }}/>}
|
|
87
|
+
{rightNodes}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
{details && <div className={detailsClasses}>{details}</div>}
|
|
92
|
+
</>),
|
|
70
93
|
};
|
|
71
94
|
const LinkComponentToUse = LinkComponent ? linkHOC(LinkComponent) : Link;
|
|
72
|
-
return (
|
|
95
|
+
return (<div className={styles.itemContainer} data-test={combinedDataTest}>
|
|
96
|
+
{showCheckbox && (<div className={styles.checkboxContainer}>
|
|
97
|
+
<Checkbox aria-labelledby={this.id} checked={checkbox} disabled={disabled} onChange={onCheckboxChange} onClick={this.stopBubbling}/>
|
|
98
|
+
</div>)}
|
|
99
|
+
{isLink ? (<LinkComponentToUse pseudo={!restLinkProps.href} {...commonProps} {...restLinkProps}/>) : (<button type='button' {...commonProps}/>)}
|
|
100
|
+
</div>);
|
|
73
101
|
}
|
|
74
102
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { type ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListSeparator<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
|
-
render(): import("react
|
|
4
|
+
render(): import("react").JSX.Element;
|
|
5
5
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import styles from './list.css';
|
|
@@ -8,6 +7,8 @@ export default class ListSeparator extends PureComponent {
|
|
|
8
7
|
const classes = classNames(styles.separator, className, {
|
|
9
8
|
[styles.separator_first]: isFirst,
|
|
10
9
|
});
|
|
11
|
-
return (
|
|
10
|
+
return (<span data-test='ring-list-separator' className={classes}>
|
|
11
|
+
{description}
|
|
12
|
+
</span>);
|
|
12
13
|
}
|
|
13
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
2
|
import { type ListDataItemProps } from './consts';
|
|
3
3
|
export default class ListTitle<T> extends PureComponent<ListDataItemProps<T>> {
|
|
4
|
-
render(): import("react
|
|
4
|
+
render(): import("react").JSX.Element;
|
|
5
5
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
import styles from './list.css';
|
|
4
|
+
export default class ListTitle extends PureComponent {
|
|
5
|
+
render() {
|
|
6
|
+
const { className, description, label, isFirst } = this.props;
|
|
7
|
+
const classes = classnames(styles.title, className, {
|
|
8
|
+
[styles.title_first]: isFirst,
|
|
9
|
+
});
|
|
10
|
+
return (<span className={classes} data-test='ring-list-title'>
|
|
11
|
+
<span className={classnames(styles.label, styles.text)} data-test='ring-list-title-label'>
|
|
12
|
+
{label}
|
|
13
|
+
</span>
|
|
14
|
+
<div className={styles.description} data-test='ring-list-title-description'>
|
|
15
|
+
{description}
|
|
16
|
+
</div>
|
|
17
|
+
</span>);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -7,7 +7,7 @@ const defaultOptions = {
|
|
|
7
7
|
UsersTitle: 'Users',
|
|
8
8
|
NoUsersTitle: 'No users',
|
|
9
9
|
getPluralForUserCount: count => {
|
|
10
|
-
// eslint-disable-next-line
|
|
10
|
+
// eslint-disable-next-line no-magic-numbers
|
|
11
11
|
const plural = count % 10 !== 1 || count % 100 === 11;
|
|
12
12
|
return `${count} member${plural ? 's' : ''}`;
|
|
13
13
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import globalStyles from '../global/global.css';
|
|
3
2
|
import { Type } from './consts';
|
|
3
|
+
import globalStyles from '../global/global.css';
|
|
4
4
|
import styles from './list.css';
|
|
5
5
|
export function getListClasses({ className, disabled, hover, compact, scrolling, rgItemType, }) {
|
|
6
6
|
return classNames(styles.item, globalStyles.resetButton, className, {
|
|
@@ -50,7 +50,7 @@ export declare const ActiveItemContext: {
|
|
|
50
50
|
ValueContext: import("react").Context<string | undefined>;
|
|
51
51
|
UpdateContext: import("react").Context<(value: string | undefined) => void>;
|
|
52
52
|
Provider: {
|
|
53
|
-
({ children }: import("../global/create-stateful-context").ProviderProps): import("react
|
|
53
|
+
({ children }: import("../global/create-stateful-context").ProviderProps): import("react").JSX.Element;
|
|
54
54
|
displayName: string;
|
|
55
55
|
};
|
|
56
56
|
useUpdate: (value: string | undefined, skipUpdate?: boolean) => void;
|
|
@@ -151,19 +151,19 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
|
|
|
151
151
|
getVisibleListHeight(maxHeight: number): number;
|
|
152
152
|
private _deprecatedGenerateKeyFromContent;
|
|
153
153
|
getId(item: ListDataItem<T> | null): string | undefined;
|
|
154
|
-
renderItem: ({ index, style, isScrolling, parent, key }: Partial<ListRowProps>) => import("react
|
|
154
|
+
renderItem: ({ index, style, isScrolling, parent, key }: Partial<ListRowProps>) => import("react").JSX.Element;
|
|
155
155
|
addItemDataTestToProp: (props: ListDataItemProps<T>) => ListDataItemProps<T>;
|
|
156
156
|
virtualizedListRef: (el: VirtualizedList | null) => void;
|
|
157
157
|
containerRef: (el: HTMLElement | null) => void;
|
|
158
158
|
private _inner?;
|
|
159
159
|
get inner(): HTMLElement | null | undefined;
|
|
160
|
-
renderVirtualizedInner({ height, maxHeight, autoHeight, rowCount, isScrolling, onChildScroll, scrollTop, registerChild, }: RenderVirtualizedInnerParams): import("react
|
|
161
|
-
renderVirtualized(maxHeight: number | null | undefined, rowCount: number): import("react
|
|
162
|
-
renderSimple(maxHeight: number | null | undefined, rowCount: number): import("react
|
|
160
|
+
renderVirtualizedInner({ height, maxHeight, autoHeight, rowCount, isScrolling, onChildScroll, scrollTop, registerChild, }: RenderVirtualizedInnerParams): import("react").JSX.Element;
|
|
161
|
+
renderVirtualized(maxHeight: number | null | undefined, rowCount: number): import("react").JSX.Element;
|
|
162
|
+
renderSimple(maxHeight: number | null | undefined, rowCount: number): import("react").JSX.Element;
|
|
163
163
|
id: string;
|
|
164
164
|
shortcutsScope: string;
|
|
165
165
|
shortcutsMap: ShortcutsMap;
|
|
166
166
|
/** @override */
|
|
167
|
-
render(): import("react
|
|
167
|
+
render(): import("react").JSX.Element;
|
|
168
168
|
}
|
|
169
169
|
export type ListAttrs<T = unknown> = React.JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { createElement as _createElement } from "react";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
1
|
/* eslint-disable max-lines */
|
|
4
2
|
/**
|
|
5
3
|
* @name List
|
|
@@ -149,7 +147,7 @@ export default class List extends Component {
|
|
|
149
147
|
virtualizedList;
|
|
150
148
|
unmounted;
|
|
151
149
|
container;
|
|
152
|
-
// eslint-disable-next-line
|
|
150
|
+
// eslint-disable-next-line no-magic-numbers
|
|
153
151
|
_bufferSize = 10; // keep X items above and below of the visible area
|
|
154
152
|
// reuse size cache for similar items
|
|
155
153
|
sizeCacheKey = (index) => {
|
|
@@ -360,7 +358,7 @@ export default class List extends Component {
|
|
|
360
358
|
// top and bottom margins
|
|
361
359
|
if (index === 0 || index === this.props.data.length + 1 || item.rgItemType === Type.MARGIN) {
|
|
362
360
|
itemKey = key || `${Type.MARGIN}_${index}`;
|
|
363
|
-
el =
|
|
361
|
+
el = <div style={{ height: Dimension.MARGIN }}/>;
|
|
364
362
|
}
|
|
365
363
|
else {
|
|
366
364
|
// Hack around SelectNG implementation
|
|
@@ -416,9 +414,15 @@ export default class List extends Component {
|
|
|
416
414
|
default:
|
|
417
415
|
throw new Error(`Unknown menu element type: ${itemProps.rgItemType}`);
|
|
418
416
|
}
|
|
419
|
-
el =
|
|
417
|
+
el = <ItemComponent {...itemProps} key={itemProps.key}/>;
|
|
420
418
|
}
|
|
421
|
-
return parent ? (
|
|
419
|
+
return parent ? (<CellMeasurer cache={this._cache} key={itemKey} parent={parent} rowIndex={index} columnIndex={0}>
|
|
420
|
+
{({ registerChild }) => (<div ref={registerChild} style={style} role='row' aria-selected={isActive} id={itemId}>
|
|
421
|
+
<div role='cell'>{el}</div>
|
|
422
|
+
</div>)}
|
|
423
|
+
</CellMeasurer>) : (<div role='row' aria-selected={isActive} id={itemId} key={itemKey}>
|
|
424
|
+
<div role='cell'>{el}</div>
|
|
425
|
+
</div>);
|
|
422
426
|
};
|
|
423
427
|
addItemDataTestToProp = (props) => {
|
|
424
428
|
props['data-test'] = dataTests('ring-list-item', props['data-test']);
|
|
@@ -439,24 +443,30 @@ export default class List extends Component {
|
|
|
439
443
|
}
|
|
440
444
|
renderVirtualizedInner({ height, maxHeight, autoHeight = false, rowCount, isScrolling, onChildScroll = noop, scrollTop, registerChild, }) {
|
|
441
445
|
const dirOverride = { direction: 'inherit' }; // Virtualized sets "direction: ltr" by default https://github.com/bvaughn/react-virtualized/issues/457
|
|
442
|
-
return (
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
446
|
+
return (<AutoSizer disableHeight onResize={this.props.onResize}>
|
|
447
|
+
{({ width }) => (<div ref={registerChild}>
|
|
448
|
+
<VirtualizedList aria-label={this.props.ariaLabel} ref={this.virtualizedListRef} className={classNames('ring-list__i', { [styles.overscrollNone]: this.props.preventListOverscroll })} autoHeight={autoHeight} style={maxHeight ? { maxHeight, height: 'auto', ...dirOverride } : dirOverride} autoContainerWidth height={height} width={width} isScrolling={isScrolling} onScroll={e => {
|
|
449
|
+
onChildScroll(e);
|
|
450
|
+
this.scrollEndHandler();
|
|
451
|
+
}} scrollTop={scrollTop} rowCount={rowCount} estimatedRowSize={this.defaultItemHeight()} rowHeight={this._cache.rowHeight} rowRenderer={this.renderItem} overscanRowCount={this._bufferSize}
|
|
452
|
+
// ensure rerendering
|
|
453
|
+
noop={() => { }} scrollToIndex={!this.props.disableScrollToActive &&
|
|
454
|
+
this.state.needScrollToActive &&
|
|
455
|
+
this.state.activeIndex !== null &&
|
|
456
|
+
this.state.activeIndex !== undefined
|
|
457
|
+
? this.state.activeIndex + 1
|
|
458
|
+
: undefined} scrollToAlignment='center' deferredMeasurementCache={this._cache} onRowsRendered={this.checkOverflow} containerRole='none' // row role is set by rowRenderer
|
|
459
|
+
/>
|
|
460
|
+
</div>)}
|
|
461
|
+
</AutoSizer>);
|
|
454
462
|
}
|
|
455
463
|
renderVirtualized(maxHeight, rowCount) {
|
|
456
464
|
if (maxHeight) {
|
|
457
465
|
return this.renderVirtualizedInner({ height: maxHeight, maxHeight, rowCount });
|
|
458
466
|
}
|
|
459
|
-
return (
|
|
467
|
+
return (<WindowScrollerComponent>
|
|
468
|
+
{props => this.renderVirtualizedInner({ ...props, rowCount, autoHeight: true })}
|
|
469
|
+
</WindowScrollerComponent>);
|
|
460
470
|
}
|
|
461
471
|
renderSimple(maxHeight, rowCount) {
|
|
462
472
|
const items = [];
|
|
@@ -466,7 +476,11 @@ export default class List extends Component {
|
|
|
466
476
|
isScrolling: this.state.scrolling,
|
|
467
477
|
}));
|
|
468
478
|
}
|
|
469
|
-
return (
|
|
479
|
+
return (<div className={classNames('ring-list__i', styles.simpleInner)} onScroll={this.scrollHandler} onMouseMove={this.mouseHandler}>
|
|
480
|
+
<div aria-label={this.props.ariaLabel} role='grid' style={maxHeight ? { maxHeight: this.getVisibleListHeight(maxHeight) } : undefined}>
|
|
481
|
+
{items}
|
|
482
|
+
</div>
|
|
483
|
+
</div>);
|
|
470
484
|
}
|
|
471
485
|
id = getUID('list-');
|
|
472
486
|
shortcutsScope = this.id;
|
|
@@ -488,8 +502,16 @@ export default class List extends Component {
|
|
|
488
502
|
const rowCount = this.props.data.length + 2;
|
|
489
503
|
const maxHeight = this.props.maxHeight && this.getVisibleListHeight(this.props.maxHeight);
|
|
490
504
|
const classes = classNames(styles.list, this.props.className);
|
|
491
|
-
return (
|
|
492
|
-
|
|
493
|
-
|
|
505
|
+
return (<>
|
|
506
|
+
<ActiveItemContext.Updater value={this.getId(this.state.activeItem)} skipUpdate={this.props.hidden || !isActivatable(this.state.activeItem)}/>
|
|
507
|
+
<div id={this.props.id} ref={this.containerRef} className={classes} onMouseOut={this.props.onMouseOut} onBlur={this.props.onMouseOut} data-test='ring-list'>
|
|
508
|
+
{this.props.shortcuts && (<Shortcuts map={this.props.shortcutsMap ? { ...this.shortcutsMap, ...this.props.shortcutsMap } : this.shortcutsMap} scope={this.shortcutsScope}/>)}
|
|
509
|
+
{this.props.renderOptimization
|
|
510
|
+
? this.renderVirtualized(maxHeight, rowCount)
|
|
511
|
+
: this.renderSimple(maxHeight, rowCount)}
|
|
512
|
+
{this.state.hasOverflow && !this.state.scrolledToBottom && <div className={styles.fade} style={fadeStyles}/>}
|
|
513
|
+
{hint && <ListHint label={hint}/>}
|
|
514
|
+
</div>
|
|
515
|
+
</>);
|
|
494
516
|
}
|
|
495
517
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import LoaderCore from './loader-core';
|
|
@@ -31,10 +30,17 @@ export default class Loader extends PureComponent {
|
|
|
31
30
|
};
|
|
32
31
|
render() {
|
|
33
32
|
const { message, size, colors, 'data-test': dataTest, stop, deterministic, squares, ...restProps } = this.props;
|
|
34
|
-
return squares ? (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
return squares ? (<div {...restProps}>
|
|
34
|
+
<div className={classNames(styles.canvas, styles.squares)} style={{
|
|
35
|
+
'--ring-loader-color-1': colors?.[0] ? `rgb(${colors[0].r}, ${colors[0].g}, ${colors[0].b})` : undefined,
|
|
36
|
+
'--ring-loader-color-2': colors?.[1] ? `rgb(${colors[1].r}, ${colors[1].g}, ${colors[1].b})` : undefined,
|
|
37
|
+
'--ring-loader-color-3': colors?.[2] ? `rgb(${colors[2].r}, ${colors[2].g}, ${colors[2].b})` : undefined,
|
|
38
|
+
}}>
|
|
39
|
+
<div className={classNames(styles.square, styles.outer)}/>
|
|
40
|
+
<div className={classNames(styles.square, styles.middle)}/>
|
|
41
|
+
<div className={classNames(styles.square, styles.inner)}/>
|
|
42
|
+
</div>
|
|
43
|
+
{message && <div className={styles.text}>{message}</div>}
|
|
44
|
+
</div>) : (<div {...restProps} ref={this.initLoader}/>);
|
|
39
45
|
}
|
|
40
46
|
}
|
|
@@ -6,7 +6,7 @@ export interface LoaderInlineProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
* @name Loader Inline
|
|
7
7
|
*/
|
|
8
8
|
declare class LoaderInline extends PureComponent<LoaderInlineProps> {
|
|
9
|
-
render(): import("react
|
|
9
|
+
render(): import("react").JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export type LoaderInlineAtrrs = React.JSX.LibraryManagedAttributes<typeof LoaderInline, LoaderInlineProps>;
|
|
12
12
|
export default LoaderInline;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import dataTests from '../global/data-tests';
|
|
@@ -10,8 +9,11 @@ class LoaderInline extends PureComponent {
|
|
|
10
9
|
render() {
|
|
11
10
|
const { className, 'data-test': dataTest, children, ...restProps } = this.props;
|
|
12
11
|
const classes = classNames(styles.loader, className);
|
|
13
|
-
const loader =
|
|
14
|
-
return children ? (
|
|
12
|
+
const loader = <div {...restProps} data-test={dataTests('ring-loader-inline', dataTest)} className={classes}/>;
|
|
13
|
+
return children ? (<>
|
|
14
|
+
{loader}
|
|
15
|
+
<span className={styles.children}>{children}</span>
|
|
16
|
+
</>) : (loader);
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
export default LoaderInline;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import Loader from '../loader/loader';
|
|
@@ -13,6 +12,8 @@ export default class LoaderScreen extends PureComponent {
|
|
|
13
12
|
const loaderClasses = classNames(className, styles.loader, {
|
|
14
13
|
[styles.loaderWithoutSpacing]: !message,
|
|
15
14
|
});
|
|
16
|
-
return (
|
|
15
|
+
return (<div className={containerClasses}>
|
|
16
|
+
<Loader {...restProps} message={message} className={loaderClasses}/>
|
|
17
|
+
</div>);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -31,6 +31,6 @@ export default class LoginDialog extends Component<LoginDialogProps> {
|
|
|
31
31
|
showFallbackTimout?: number;
|
|
32
32
|
startFallbackCountdown(): void;
|
|
33
33
|
onMessage: (event: MessageEvent) => void;
|
|
34
|
-
render(): import("react
|
|
34
|
+
render(): import("react").JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export type LoginDialogAttrs = React.JSX.LibraryManagedAttributes<typeof LoginDialog, LoginDialogProps>;
|