@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
package/components/grid/col.d.ts
CHANGED
|
@@ -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 styles from './grid.css';
|
|
@@ -28,6 +27,8 @@ export default class Col extends Component {
|
|
|
28
27
|
const classes = classNames(styles.col, className, getClassNames(restProps), {
|
|
29
28
|
[styles.reverse]: reverse,
|
|
30
29
|
});
|
|
31
|
-
return (
|
|
30
|
+
return (<div className={classes} data-test='ring-grid-column'>
|
|
31
|
+
{children}
|
|
32
|
+
</div>);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -3,7 +3,7 @@ import { Component, type HTMLAttributes } from 'react';
|
|
|
3
3
|
* @name Grid
|
|
4
4
|
*/
|
|
5
5
|
export declare class Grid extends Component<HTMLAttributes<HTMLDivElement>> {
|
|
6
|
-
render(): import("react
|
|
6
|
+
render(): import("react").JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export { default as Row } from './row';
|
|
9
9
|
export { default as Col } from './col';
|
|
@@ -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 styles from './grid.css';
|
|
@@ -9,7 +8,9 @@ export class Grid extends Component {
|
|
|
9
8
|
render() {
|
|
10
9
|
const { children, className, ...restProps } = this.props;
|
|
11
10
|
const classes = classNames(styles['container-fluid'], className);
|
|
12
|
-
return (
|
|
11
|
+
return (<div data-test='ring-grid' {...restProps} className={classes}>
|
|
12
|
+
{children}
|
|
13
|
+
</div>);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
export { default as Row } from './row';
|
package/components/grid/row.d.ts
CHANGED
|
@@ -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 styles from './grid.css';
|
|
@@ -34,6 +33,8 @@ export default class Row extends Component {
|
|
|
34
33
|
const classes = classNames(className, styles.row, getModifierClassNames(restProps), {
|
|
35
34
|
[styles.reverse]: reverse,
|
|
36
35
|
});
|
|
37
|
-
return (
|
|
36
|
+
return (<div className={classes} data-test='ring-grid-row'>
|
|
37
|
+
{children}
|
|
38
|
+
</div>);
|
|
38
39
|
}
|
|
39
40
|
}
|
|
@@ -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 styles from './group.css';
|
|
@@ -9,6 +8,8 @@ export default class Group extends Component {
|
|
|
9
8
|
render() {
|
|
10
9
|
const { children, className, ...restProps } = this.props;
|
|
11
10
|
const classes = classNames(styles.group, className);
|
|
12
|
-
return (
|
|
11
|
+
return (<span data-test='ring-group' {...restProps} className={classes}>
|
|
12
|
+
{children}
|
|
13
|
+
</span>);
|
|
13
14
|
}
|
|
14
15
|
}
|
|
@@ -6,5 +6,5 @@ export interface HeaderIconSpecificProps {
|
|
|
6
6
|
rotatable?: boolean | null | undefined;
|
|
7
7
|
}
|
|
8
8
|
export default class HeaderIcon extends Component<ButtonAttrs & HeaderIconSpecificProps> {
|
|
9
|
-
render(): import("react
|
|
9
|
+
render(): import("react").JSX.Element;
|
|
10
10
|
}
|
|
@@ -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 Button from '../button/button';
|
|
@@ -10,6 +9,6 @@ export default class HeaderIcon extends Component {
|
|
|
10
9
|
[styles.rotatable]: rotatable,
|
|
11
10
|
[styles.rotated]: rotatable && restProps.active,
|
|
12
11
|
});
|
|
13
|
-
return
|
|
12
|
+
return <Button {...restProps} className={classes}/>;
|
|
14
13
|
}
|
|
15
14
|
}
|
|
@@ -17,7 +17,7 @@ declare class Header extends Component<HeaderProps> {
|
|
|
17
17
|
theme: Theme;
|
|
18
18
|
vertical: boolean;
|
|
19
19
|
};
|
|
20
|
-
render(): import("react
|
|
20
|
+
render(): import("react").JSX.Element;
|
|
21
21
|
}
|
|
22
22
|
export type HeaderAttrs = React.JSX.LibraryManagedAttributes<typeof Header, HeaderProps>;
|
|
23
23
|
export default 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 Theme, { ThemeProvider } from '../global/theme';
|
|
@@ -21,9 +20,11 @@ class Header extends Component {
|
|
|
21
20
|
[styles.headerSpaced]: spaced && !vertical,
|
|
22
21
|
});
|
|
23
22
|
const overrideOuterTheme = theme !== Theme.LIGHT;
|
|
24
|
-
const header = (
|
|
23
|
+
const header = (<header {...restProps} className={classes}>
|
|
24
|
+
{children}
|
|
25
|
+
</header>);
|
|
25
26
|
if (overrideOuterTheme) {
|
|
26
|
-
return
|
|
27
|
+
return <ThemeProvider theme={theme}>{header}</ThemeProvider>;
|
|
27
28
|
}
|
|
28
29
|
return header;
|
|
29
30
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
|
-
export default function Links({ className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react
|
|
2
|
+
export default function Links({ className, ...restProps }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import classNames from 'classnames';
|
|
3
2
|
import ScrollableSection from '../scrollable-section/scrollable-section';
|
|
4
3
|
import styles from './header.css';
|
|
5
4
|
// currently only supports vertical header
|
|
6
5
|
export default function Links({ className, ...restProps }) {
|
|
7
|
-
return
|
|
6
|
+
return <ScrollableSection {...restProps} className={classNames(styles.links, className)}/>;
|
|
8
7
|
}
|
|
@@ -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 Icon, { Size } from '../icon/icon';
|
|
@@ -12,6 +11,8 @@ export default class Logo extends PureComponent {
|
|
|
12
11
|
render() {
|
|
13
12
|
const { className, ...restProps } = this.props;
|
|
14
13
|
const classes = classNames(styles.logo, className);
|
|
15
|
-
return (
|
|
14
|
+
return (<div className={classes}>
|
|
15
|
+
<Icon {...restProps}/>
|
|
16
|
+
</div>);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Avatar, { Size } from '../avatar/avatar';
|
|
5
5
|
import Button from '../button/button';
|
|
@@ -14,7 +14,13 @@ export default class Profile extends PureComponent {
|
|
|
14
14
|
closeOnSelect: true,
|
|
15
15
|
renderPopupItems: items => items,
|
|
16
16
|
size: Size.Size32,
|
|
17
|
-
renderGuest: ({ loading, onLogin, className, translations }) => (
|
|
17
|
+
renderGuest: ({ loading, onLogin, className, translations }) => (<I18nContext.Consumer>
|
|
18
|
+
{({ translate }) => (<div className={classNames(styles.profileEmpty, className)}>
|
|
19
|
+
<Button primary data-test='ring-header-login-button' disabled={loading} loader={loading} onClick={onLogin}>
|
|
20
|
+
{translations?.login ?? translate('login')}
|
|
21
|
+
</Button>
|
|
22
|
+
</div>)}
|
|
23
|
+
</I18nContext.Consumer>),
|
|
18
24
|
};
|
|
19
25
|
static contextType = I18nContext;
|
|
20
26
|
static Size = Size;
|
|
@@ -22,7 +28,9 @@ export default class Profile extends PureComponent {
|
|
|
22
28
|
const { className, activeClassName, closeOnSelect, hasUpdates, onLogout, user, profileUrl, LinkComponent, onSwitchUser, renderPopupItems, onRevertPostponement, showApplyChangedUser, showName, showLogIn, showLogOut, showSwitchUser, renderGuest, translations, size, round, loading, onLogin, menuProps, onShow, onHide, ...props } = this.props;
|
|
23
29
|
const { translate } = this.context;
|
|
24
30
|
if (!user) {
|
|
25
|
-
return (
|
|
31
|
+
return (<div {...props} className={classNames(styles.profileEmpty, className)}>
|
|
32
|
+
<Avatar size={size} round={round}/>
|
|
33
|
+
</div>);
|
|
26
34
|
}
|
|
27
35
|
if (user.guest) {
|
|
28
36
|
return renderGuest(this.props);
|
|
@@ -30,7 +38,12 @@ export default class Profile extends PureComponent {
|
|
|
30
38
|
const avatarWrapper = classNames(styles.avatarWrapper, {
|
|
31
39
|
[styles.hasUpdates]: hasUpdates,
|
|
32
40
|
});
|
|
33
|
-
const anchor = (
|
|
41
|
+
const anchor = (<button type='button' className={styles.anchorClassName}>
|
|
42
|
+
<span className={avatarWrapper}>
|
|
43
|
+
<Avatar url={user.profile && user.profile.avatar && user.profile.avatar.url} size={size} round={round} username={user.name}/>
|
|
44
|
+
</span>
|
|
45
|
+
{showName && <span>{user.name}</span>}
|
|
46
|
+
</button>);
|
|
34
47
|
const items = [
|
|
35
48
|
showApplyChangedUser && {
|
|
36
49
|
rgItemType,
|
|
@@ -63,12 +76,12 @@ export default class Profile extends PureComponent {
|
|
|
63
76
|
onClick: onLogout,
|
|
64
77
|
},
|
|
65
78
|
].filter(isTruthy);
|
|
66
|
-
return (
|
|
79
|
+
return (<DropdownMenu {...props} onShow={onShow} onHide={onHide} title={user.name} anchor={anchor} data={renderPopupItems(items)} data-test='ring-profile' className={classNames(styles.profile, className)} activeClassName={activeClassName} menuProps={{
|
|
67
80
|
closeOnSelect,
|
|
68
81
|
left: -2,
|
|
69
82
|
top: -8,
|
|
70
83
|
sidePadding: 32,
|
|
71
84
|
...menuProps,
|
|
72
|
-
}
|
|
85
|
+
}}/>);
|
|
73
86
|
}
|
|
74
87
|
}
|
|
@@ -11,5 +11,5 @@ export interface ServicesLinkProps extends Partial<LinkProps> {
|
|
|
11
11
|
service: Service;
|
|
12
12
|
}
|
|
13
13
|
export default class ServicesLink extends PureComponent<ServicesLinkProps> {
|
|
14
|
-
render(): import("react
|
|
14
|
+
render(): import("react").JSX.Element;
|
|
15
15
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
|
+
import Link from '../link/link';
|
|
3
|
+
import styles from './services.css';
|
|
4
|
+
export default class ServicesLink extends PureComponent {
|
|
5
|
+
render() {
|
|
6
|
+
const { service, ...props } = this.props;
|
|
7
|
+
return (<Link target='_self' href={service.homeUrl} {...props}>
|
|
8
|
+
{service.iconUrl
|
|
9
|
+
? [
|
|
10
|
+
<span key='icon' className={styles.itemLogo} style={{ backgroundImage: `url(${service.iconUrl})` }}/>,
|
|
11
|
+
<div key='text'>{service.name}</div>,
|
|
12
|
+
]
|
|
13
|
+
: service.name}
|
|
14
|
+
</Link>);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent } from 'react';
|
|
3
2
|
import servicesIcon from '@jetbrains/icons/services-20px';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import Dropdown from '../dropdown/dropdown';
|
|
6
5
|
import Popup from '../popup/popup';
|
|
7
6
|
import Theme from '../global/theme';
|
|
8
|
-
import darkStyles from '../global/variables_dark.css';
|
|
9
7
|
import HeaderIcon from './header-icon';
|
|
10
8
|
import ServicesLink from './services-link';
|
|
9
|
+
import darkStyles from '../global/variables_dark.css';
|
|
11
10
|
import styles from './services.css';
|
|
12
11
|
const makeAnchor = (loading) => {
|
|
13
|
-
const Anchor = ({ active }) => (
|
|
12
|
+
const Anchor = ({ active }) => (<HeaderIcon loader={loading} active={active} icon={servicesIcon} aria-label='Services'/>);
|
|
14
13
|
return Anchor;
|
|
15
14
|
};
|
|
16
15
|
export default class Services extends PureComponent {
|
|
@@ -27,18 +26,24 @@ export default class Services extends PureComponent {
|
|
|
27
26
|
render() {
|
|
28
27
|
const { clientId, loading, services, initShown, theme, ...props } = this.props;
|
|
29
28
|
if (!services) {
|
|
30
|
-
return
|
|
29
|
+
return <HeaderIcon {...props} loader={loading} active={loading} icon={servicesIcon} aria-label='Services'/>;
|
|
31
30
|
}
|
|
32
31
|
const sortedServices = [...services].sort(Services.sort);
|
|
33
32
|
const servicesWithIcons = sortedServices.filter(service => service.iconUrl && service.homeUrl);
|
|
34
33
|
const servicesWithOutIcons = sortedServices.filter(service => !service.iconUrl && service.homeUrl);
|
|
35
34
|
const separatorIsRequired = servicesWithIcons.length !== 0 && servicesWithOutIcons.length !== 0;
|
|
36
|
-
return (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
return (<Dropdown {...props} anchor={makeAnchor(loading)} initShown={initShown}>
|
|
36
|
+
<Popup className={classNames(styles.services, { [darkStyles.dark]: theme === Theme.DARK })} top={-3}>
|
|
37
|
+
{servicesWithIcons.map(service => {
|
|
38
|
+
const isActive = this.serviceIsActive(service);
|
|
39
|
+
return (<Services.Link active={isActive} className={isActive ? styles.activeItem : styles.item} key={service.id} service={service}/>);
|
|
40
|
+
})}
|
|
41
|
+
{separatorIsRequired && <div className={styles.line} key='separator'/>}
|
|
42
|
+
{servicesWithOutIcons.map(service => {
|
|
43
|
+
const isActive = this.serviceIsActive(service);
|
|
44
|
+
return (<Services.Link active={isActive} className={isActive ? styles.activeItemStacked : styles.itemStacked} key={service.id} service={service}/>);
|
|
45
|
+
})}
|
|
46
|
+
</Popup>
|
|
47
|
+
</Dropdown>);
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -22,6 +22,6 @@ export default class SmartProfile extends PureComponent<SmartProfileProps, Smart
|
|
|
22
22
|
onRevertPostponement: () => void;
|
|
23
23
|
requestUser(): Promise<void>;
|
|
24
24
|
checkUserCertificateMismatch(user: AuthUser): void;
|
|
25
|
-
render(): import("react
|
|
25
|
+
render(): import("react").JSX.Element;
|
|
26
26
|
}
|
|
27
27
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/* eslint-disable no-underscore-dangle */
|
|
3
2
|
import { PureComponent } from 'react';
|
|
4
3
|
import alertService from '../alert-service/alert-service';
|
|
@@ -76,6 +75,6 @@ export default class SmartProfile extends PureComponent {
|
|
|
76
75
|
const { user, loading, isLogoutPostponed, isUserChangePostponed } = this.state;
|
|
77
76
|
const { auth, profileUrl, ...props } = this.props;
|
|
78
77
|
const url = profileUrl || (user ? `${auth.config.serverUri}users/${user.id}` : '');
|
|
79
|
-
return (
|
|
78
|
+
return (<Profile onLogin={this.login} onLogout={this.logout} onSwitchUser={this.switchUser} loading={loading} user={user} profileUrl={url} showApplyChangedUser={isUserChangePostponed} showLogIn={isLogoutPostponed} showLogOut={!isLogoutPostponed} showSwitchUser={auth._canShowDialogs() && !isLogoutPostponed && !isUserChangePostponed} onRevertPostponement={this.onRevertPostponement} {...props}/>);
|
|
80
79
|
}
|
|
81
80
|
}
|
|
@@ -18,5 +18,5 @@ export default class SmartServices extends Component<SmartServicesProps> {
|
|
|
18
18
|
stopLoading: () => void;
|
|
19
19
|
getServicesContent: () => void;
|
|
20
20
|
getServices(fields: string): Promise<Service[]> | undefined;
|
|
21
|
-
render(): import("react
|
|
21
|
+
render(): import("react").JSX.Element | null;
|
|
22
22
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Component } from 'react';
|
|
3
2
|
import HTTP from '../http/http';
|
|
4
3
|
import Services from './services';
|
|
@@ -44,6 +43,6 @@ export default class SmartServices extends Component {
|
|
|
44
43
|
if (!visible) {
|
|
45
44
|
return null;
|
|
46
45
|
}
|
|
47
|
-
return (
|
|
46
|
+
return (<Services {...props} clientId={auth.config.clientId} initShown loading={loading} onClick={this.getServicesContent} services={services}/>);
|
|
48
47
|
}
|
|
49
48
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Children, Component } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import styles from './header.css';
|
|
5
|
-
const wrapChild = (child) => child &&
|
|
4
|
+
const wrapChild = (child) => child && <div className={styles.trayItem}>{child}</div>;
|
|
6
5
|
export default class Tray extends Component {
|
|
7
6
|
render() {
|
|
8
7
|
const { children, className, ...restProps } = this.props;
|
|
9
8
|
const classes = classNames(styles.tray, className);
|
|
10
|
-
return (
|
|
9
|
+
return (<div {...restProps} className={classes}>
|
|
10
|
+
{Children.map(children, wrapChild)}
|
|
11
|
+
</div>);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { memo } from 'react';
|
|
1
|
+
import { memo, useEffect } from 'react';
|
|
3
2
|
import classNames from 'classnames';
|
|
4
3
|
import deprecate from 'util-deprecate';
|
|
5
4
|
import styles from './heading.css';
|
|
@@ -13,26 +12,34 @@ export var Levels;
|
|
|
13
12
|
Levels[Levels["H3"] = 3] = "H3";
|
|
14
13
|
Levels[Levels["H4"] = 4] = "H4";
|
|
15
14
|
})(Levels || (Levels = {}));
|
|
16
|
-
const
|
|
15
|
+
const warnFallbackHeading = deprecate(() => { }, 'Headings of level 5 and higher are replaced with h3');
|
|
17
16
|
const HeadingMemo = memo(function Heading({ children, className, level = Levels.H1, ...restProps }) {
|
|
18
17
|
const classes = classNames(styles.heading, className);
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
const isSupportedLevel = level <= Levels.H4;
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!isSupportedLevel) {
|
|
21
|
+
warnFallbackHeading();
|
|
22
|
+
}
|
|
23
|
+
}, [isSupportedLevel]);
|
|
24
|
+
const Tag = isSupportedLevel ? `h${level}` : 'h3';
|
|
25
|
+
return (<Tag {...restProps} className={classes}>
|
|
26
|
+
{children}
|
|
27
|
+
</Tag>);
|
|
21
28
|
});
|
|
22
29
|
const Heading = HeadingMemo;
|
|
23
30
|
Heading.Levels = Levels;
|
|
24
31
|
export default Heading;
|
|
25
32
|
const H1 = memo(function H1(props) {
|
|
26
|
-
return
|
|
33
|
+
return <Heading {...props} level={Levels.H1}/>;
|
|
27
34
|
});
|
|
28
35
|
const H2 = memo(function H2(props) {
|
|
29
|
-
return
|
|
36
|
+
return <Heading {...props} level={Levels.H2}/>;
|
|
30
37
|
});
|
|
31
38
|
const H3 = memo(function H3(props) {
|
|
32
|
-
return
|
|
39
|
+
return <Heading {...props} level={Levels.H3}/>;
|
|
33
40
|
});
|
|
34
41
|
const H4 = memo(function H4({ className, bold, ...restProps }) {
|
|
35
42
|
const classes = classNames(className, { [styles.bold]: bold });
|
|
36
|
-
return
|
|
43
|
+
return <Heading {...restProps} className={classes} level={Levels.H4}/>;
|
|
37
44
|
});
|
|
38
45
|
export { H1, H2, H3, H4 };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { useEffect } from 'react';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { getTranslations, setTranslations, translate } from './i18n';
|
|
@@ -10,5 +9,5 @@ export const I18nContextHolder = ({ children, messages }) => {
|
|
|
10
9
|
useEffect(() => {
|
|
11
10
|
setTranslations(messages);
|
|
12
11
|
}, [messages]);
|
|
13
|
-
return
|
|
12
|
+
return <I18nContext.Provider value={{ messages, translate }}>{children}</I18nContext.Provider>;
|
|
14
13
|
};
|
|
@@ -2,6 +2,6 @@ import { type SVGAttributes } from 'react';
|
|
|
2
2
|
export interface IconSVGProps extends SVGAttributes<SVGSVGElement> {
|
|
3
3
|
src: string;
|
|
4
4
|
}
|
|
5
|
-
declare function IconSVG({ src, className, ...rest }: IconSVGProps): import("react
|
|
5
|
+
declare function IconSVG({ src, className, ...rest }: IconSVGProps): import("react").JSX.Element;
|
|
6
6
|
declare const _default: import("react").MemoExoticComponent<typeof IconSVG>;
|
|
7
7
|
export default _default;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
// Inspired by https://github.com/sairion/svg-inline-react
|
|
3
2
|
import { memo } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -51,8 +50,8 @@ function IconSVG({ src, className, ...rest }) {
|
|
|
51
50
|
[styles.compatibilityMode]: isCompatibilityMode(src),
|
|
52
51
|
}, className);
|
|
53
52
|
const { props, html } = getSVGFromSource(src);
|
|
54
|
-
return (
|
|
53
|
+
return (<svg {...props} {...rest} className={glyphClasses} dangerouslySetInnerHTML={{
|
|
55
54
|
__html: html,
|
|
56
|
-
}
|
|
55
|
+
}}/>);
|
|
57
56
|
}
|
|
58
57
|
export default memo(IconSVG);
|
|
@@ -38,7 +38,7 @@ export default class Icon extends PureComponent<IconProps> {
|
|
|
38
38
|
width: number | undefined;
|
|
39
39
|
height: number | undefined;
|
|
40
40
|
} | undefined;
|
|
41
|
-
render(): import("react
|
|
41
|
+
render(): import("react").JSX.Element | null;
|
|
42
42
|
}
|
|
43
43
|
export type IconAttrs = React.JSX.LibraryManagedAttributes<typeof Icon, IconProps>;
|
|
44
44
|
export { Color, Size };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/**
|
|
3
2
|
* @name Icon
|
|
4
3
|
*/
|
|
@@ -6,8 +5,8 @@ import { PureComponent } from 'react';
|
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import deprecate from 'util-deprecate';
|
|
8
7
|
import { Color, Size } from './icon.constants';
|
|
9
|
-
import styles from './icon.css';
|
|
10
8
|
import IconSVG from './icon-svg';
|
|
9
|
+
import styles from './icon.css';
|
|
11
10
|
const warnSize = deprecate(() => { }, `\`size\`, \`width\` and \`height\` props are not recommended to use in Ring UI \`Icon\` component. The intrinsic sizes of SVG icon (\`width\` and \`height\` SVG attributes) are used instead.
|
|
12
11
|
|
|
13
12
|
We strongly recommend to use icons handcrafted for particular sizes. If your icon doesn't exist in the desired size, please ask your designer to draw one. "Responsive" checkmark should be unchecked when exporting icon.'`);
|
|
@@ -52,7 +51,9 @@ export default class Icon extends PureComponent {
|
|
|
52
51
|
[styles[color]]: !!color,
|
|
53
52
|
[styles.loading]: loading,
|
|
54
53
|
}, className);
|
|
55
|
-
return (
|
|
54
|
+
return (<span data-test='ring-icon' {...restProps} className={classes}>
|
|
55
|
+
{typeof Glyph === 'string' ? (<IconSVG src={Glyph} style={this.getStyle()}/>) : (<Glyph className={styles.glyph} style={this.getStyle()}/>)}
|
|
56
|
+
</span>);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
export { Color, Size };
|
|
@@ -72,7 +72,7 @@ export declare class Input extends PureComponent<InputProps> {
|
|
|
72
72
|
clear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
73
73
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
74
74
|
handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
75
|
-
render():
|
|
75
|
+
render(): React.JSX.Element;
|
|
76
76
|
}
|
|
77
77
|
export type ContainerProps<P extends InputProps> = React.JSX.LibraryManagedAttributes<typeof Input, P>;
|
|
78
78
|
export type InputSpecificAttrs = ContainerProps<InputSpecificProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
import { PureComponent, } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import closeIcon from '@jetbrains/icons/close-12px';
|
|
5
5
|
import Button from '../button/button';
|
|
@@ -120,7 +120,21 @@ export class Input extends PureComponent {
|
|
|
120
120
|
'aria-label': typeof label === 'string' && label ? label : placeholder,
|
|
121
121
|
'data-enabled-shortcuts': Array.isArray(enableShortcuts) ? enableShortcuts.join(',') : null,
|
|
122
122
|
};
|
|
123
|
-
return (
|
|
123
|
+
return (<I18nContext.Consumer>
|
|
124
|
+
{({ translate }) => (<div className={classes} data-test='ring-input'>
|
|
125
|
+
{label && (<ControlLabel htmlFor={this.getId()} disabled={disabled} type={labelType}>
|
|
126
|
+
{label}
|
|
127
|
+
</ControlLabel>)}
|
|
128
|
+
<div className={styles.container}>
|
|
129
|
+
{icon && <Icon glyph={icon} className={styles.icon}/>}
|
|
130
|
+
{beforeInput}
|
|
131
|
+
{multiline ? (<textarea onChange={this.handleTextareaChange} rows={1} {...commonProps} {...restProps}/>) : (<input onChange={this.handleInputChange} {...commonProps} {...restProps}/>)}
|
|
132
|
+
{clearable && !disabled && (<Button title={translations?.clear ?? translate('clear')} data-test='ring-input-clear' className={styles.clear} icon={closeIcon} onClick={this.clear}/>)}
|
|
133
|
+
{afterInput}
|
|
134
|
+
</div>
|
|
135
|
+
{error ? (<div className={styles.errorText}>{error}</div>) : (help && <ControlHelp className={styles.helpText}>{help}</ControlHelp>)}
|
|
136
|
+
</div>)}
|
|
137
|
+
</I18nContext.Consumer>);
|
|
124
138
|
}
|
|
125
139
|
}
|
|
126
140
|
export default Input;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import { Component, createContext } from 'react';
|
|
3
2
|
import { interpolateLinear } from '../global/linear-function';
|
|
4
3
|
const TITLE_RESIZE_END = 20;
|
|
@@ -18,7 +17,11 @@ export default function adaptiveIslandHOC(ComposedComponent) {
|
|
|
18
17
|
}
|
|
19
18
|
};
|
|
20
19
|
render() {
|
|
21
|
-
return (
|
|
20
|
+
return (<PhaseContext.Provider value={this.state.phase}>
|
|
21
|
+
<ScrollHandlerContext.Provider value={this.onContentScroll}>
|
|
22
|
+
<ComposedComponent {...this.props}/>
|
|
23
|
+
</ScrollHandlerContext.Provider>
|
|
24
|
+
</PhaseContext.Provider>);
|
|
22
25
|
}
|
|
23
26
|
};
|
|
24
27
|
}
|
|
@@ -27,7 +27,7 @@ declare class Content extends Component<IslandContentInnerProps> {
|
|
|
27
27
|
calculateScrollPosition: () => void;
|
|
28
28
|
scrollableNode?: HTMLElement | null;
|
|
29
29
|
setScrollableNodeAndCalculatePosition: (node: HTMLElement | null) => void;
|
|
30
|
-
render(): import("react
|
|
30
|
+
render(): import("react").JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
declare const ContentWrapper: import("react").ForwardRefExoticComponent<IslandContentProps & import("react").RefAttributes<Content>>;
|
|
33
33
|
export default ContentWrapper;
|