@jetbrains/ring-ui 5.0.0-beta.3 → 5.0.0-beta.7
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/CHANGELOG.md +49 -1
- package/babel.config.js +1 -12
- package/components/alert/alert.css +3 -14
- package/components/alert/alert.d.ts +3 -0
- package/components/alert/alert.js +8 -7
- package/components/alert/container.css +0 -2
- package/components/alert-service/alert-service.examples.css +5 -3
- package/components/auth/auth__core.d.ts +3 -1
- package/components/auth/auth__core.js +42 -15
- package/components/auth/down-notification.css +1 -1
- package/components/auth-dialog/auth-dialog.d.ts +11 -0
- package/components/auth-dialog/auth-dialog.js +33 -2
- package/components/autofocus-ng/autofocus-ng.js +1 -1
- package/components/autofocus-ng/autofocus-ng.test.js +1 -1
- package/components/button/button.css +93 -204
- package/components/button/button.d.ts +7 -8
- package/components/button/button.js +6 -8
- package/components/button/button__classes.d.ts +1 -1
- package/components/button/button__classes.js +4 -7
- package/components/button-group/button-group.css +136 -19
- package/components/button-group/button-group.d.ts +4 -1
- package/components/button-group/button-group.js +3 -3
- package/components/button-group-ng/button-group-ng.css +1 -0
- package/components/button-group-ng/button-group-ng.examples.js +1 -1
- package/components/button-ng/button-ng.examples.js +6 -7
- package/components/button-ng/button-ng.js +6 -25
- package/components/button-set/button-set.css +1 -0
- package/components/button-toolbar/button-toolbar.css +2 -0
- package/components/checkbox/checkbox.css +10 -4
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.css +2 -1
- package/components/dialog/dialog.css +10 -3
- package/components/dialog-ng/dialog-ng__template.js +1 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/global/controls-height.d.ts +7 -0
- package/components/global/controls-height.js +8 -0
- package/components/global/theme.d.ts +7 -20
- package/components/global/theme.js +26 -32
- package/components/global/variables.css +30 -25
- package/components/global/variables.d.ts +10 -8
- package/components/global/variables_dark.css +68 -0
- package/components/header/header.css +19 -10
- package/components/header/header.d.ts +7 -69
- package/components/header/header.js +10 -9
- package/components/header/services.css +3 -3
- package/components/header/services.d.ts +5 -0
- package/components/header/services.js +8 -2
- package/components/header/tray-icon.d.ts +18 -575
- package/components/heading/heading.css +4 -1
- package/components/icon/icon.css +1 -1
- package/components/input/input.css +81 -151
- package/components/input/input.d.ts +13 -17
- package/components/input/input.js +28 -32
- package/components/input-ng/input-ng.examples.js +1 -1
- package/components/input-ng/input-ng.js +45 -49
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +2 -2
- package/components/island/content.js +2 -7
- package/components/island/header.js +7 -4
- package/components/island/island.css +8 -5
- package/components/island/island.d.ts +2 -2
- package/components/island-legacy/island-legacy.css +1 -1
- package/components/list/list.d.ts +1 -1
- package/components/loader-inline/loader-inline.css +14 -0
- package/components/loader-inline/loader-inline.d.ts +4 -41
- package/components/loader-inline/loader-inline.js +3 -11
- package/components/loader-inline-ng/loader-inline-ng.js +1 -17
- package/components/loader-inline-ng/loader-inline-ng.test.js +0 -11
- package/components/markdown/code.d.ts +6 -13
- package/components/markdown/code.js +2 -2
- package/components/markdown/heading.d.ts +5 -9
- package/components/markdown/heading.js +2 -2
- package/components/markdown/link.d.ts +4 -8
- package/components/markdown/link.js +1 -1
- package/components/markdown/markdown.d.ts +2 -3
- package/components/markdown/markdown.js +14 -11
- package/components/message/message.css +7 -3
- package/components/message/message.d.ts +3 -0
- package/components/message/message.js +16 -9
- package/components/pager/pager.js +2 -8
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.target.d.ts +1 -0
- package/components/progress-bar/progress-bar.css +8 -12
- package/components/progress-bar/progress-bar.d.ts +0 -4
- package/components/progress-bar/progress-bar.js +1 -6
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -2
- package/components/query-assist/query-assist.css +48 -64
- package/components/query-assist/query-assist.d.ts +0 -5
- package/components/query-assist/query-assist.js +4 -10
- package/components/radio/radio.css +10 -4
- package/components/select/select.css +19 -37
- package/components/select/select.d.ts +4 -6
- package/components/select/select.js +17 -30
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +1 -2
- package/components/select-ng/select-ng.examples.js +1 -0
- package/components/select-ng/select-ng.js +3 -1
- package/components/select-ng/select-ng.test.js +1 -1
- package/components/select-ng/select-ng__lazy.js +1 -2
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.examples.js +1 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/dumb-tabs.d.ts +4 -107
- package/components/tabs/dumb-tabs.js +5 -9
- package/components/tabs/tab.d.ts +2 -0
- package/components/tabs/tabs.css +8 -28
- package/components/tabs-ng/tabs-ng.examples.js +11 -3
- package/components/tabs-ng/tabs-ng.js +1 -4
- package/components/tabs-ng/tabs-ng__template.js +1 -1
- package/components/tag/tag.css +31 -8
- package/components/tag/tag.d.ts +1 -0
- package/components/tag/tag.js +1 -0
- package/components/tags-input/tags-input.css +10 -4
- package/components/toggle/toggle.css +61 -35
- package/components/toggle/toggle.d.ts +9 -89
- package/components/toggle/toggle.js +7 -7
- package/components/tooltip/tooltip.css +7 -0
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +3 -2
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/dist/_helpers/anchor.js +3 -3
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +1 -1
- package/dist/_helpers/button-set.js +1 -1
- package/dist/_helpers/button-toolbar.js +1 -1
- package/dist/_helpers/button__classes.js +5 -8
- package/dist/_helpers/card.js +1 -1
- package/dist/_helpers/checkbox.js +1 -1
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +1 -1
- package/dist/_helpers/error-message.js +1 -1
- package/dist/_helpers/footer.js +1 -1
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +1 -1
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +1 -1
- package/dist/_helpers/input.js +1 -1
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +1 -1
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-inline.js +3 -0
- package/dist/_helpers/loader-screen.js +1 -1
- package/dist/_helpers/panel.js +1 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +1 -1
- package/dist/_helpers/select__filter.js +5 -3
- package/dist/_helpers/services-link.js +1 -1
- package/dist/_helpers/sidebar.js +1 -1
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/theme.js +50 -0
- package/dist/_helpers/title.js +1 -1
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +21 -19
- package/dist/alert/container.js +1 -1
- package/dist/alert-service/alert-service.js +9 -7
- package/dist/auth/auth.js +9 -9
- package/dist/auth/auth__core.d.ts +3 -1
- package/dist/auth/auth__core.js +58 -26
- package/dist/auth/down-notification.js +8 -8
- package/dist/auth/iframe-flow.js +1 -1
- package/dist/auth/landing.js +9 -9
- package/dist/auth/storage.js +9 -7
- package/dist/auth-dialog/auth-dialog.d.ts +11 -0
- package/dist/auth-dialog/auth-dialog.js +52 -7
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +9 -9
- package/dist/autofocus-ng/autofocus-ng.js +1 -1
- package/dist/avatar/avatar.js +1 -1
- package/dist/avatar-editor-ng/avatar-editor-ng.js +9 -7
- package/dist/breadcrumb-ng/breadcrumb-ng.js +1 -1
- package/dist/button/button.d.ts +7 -8
- package/dist/button/button.js +6 -8
- package/dist/button/button__classes.d.ts +1 -1
- package/dist/button/button__classes.js +0 -3
- package/dist/button-group/button-group.d.ts +4 -1
- package/dist/button-group/button-group.js +5 -3
- package/dist/button-group-ng/button-group-ng.js +1 -1
- package/dist/button-ng/button-ng.js +6 -31
- package/dist/code/code.js +1 -1
- package/dist/confirm/confirm.js +5 -5
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/data-list/data-list.js +2 -7
- package/dist/data-list/item.js +8 -13
- package/dist/data-list-ng/data-list-ng.js +2 -7
- package/dist/date-picker/date-input.js +4 -3
- package/dist/date-picker/date-picker.js +1 -1
- package/dist/date-picker/date-popup.js +1 -1
- package/dist/dialog/dialog.js +3 -3
- package/dist/dialog-ng/dialog-ng.js +3 -3
- package/dist/dialog-ng/dialog-ng__template.js +1 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +1 -1
- package/dist/dropdown/anchor.js +1 -1
- package/dist/dropdown/dropdown.js +1 -1
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/error-bubble/error-bubble.js +1 -1
- package/dist/global/controls-height.d.ts +7 -0
- package/dist/global/controls-height.js +13 -0
- package/dist/global/theme.d.ts +7 -20
- package/dist/global/theme.js +7 -62
- package/dist/global/variables.d.ts +10 -8
- package/dist/header/header.d.ts +7 -69
- package/dist/header/header.js +13 -17
- package/dist/header/profile.js +3 -3
- package/dist/header/services.d.ts +5 -0
- package/dist/header/services.js +11 -3
- package/dist/header/smart-profile.js +10 -14
- package/dist/header/smart-services.js +9 -13
- package/dist/header/tray-icon.d.ts +18 -575
- package/dist/header/tray-icon.js +4 -4
- package/dist/heading/heading.js +1 -1
- package/dist/input/input.d.ts +13 -17
- package/dist/input/input.js +32 -41
- package/dist/input-ng/input-ng.js +46 -49
- package/dist/island/adaptive-island-hoc.d.ts +2 -2
- package/dist/island/adaptive-island-hoc.js +4 -2
- package/dist/island/content.js +2 -9
- package/dist/island/header.js +7 -4
- package/dist/island/island.d.ts +2 -2
- package/dist/list/list.d.ts +1 -1
- package/dist/loader/loader__core.js +1 -1
- package/dist/loader-inline/loader-inline.d.ts +4 -41
- package/dist/loader-inline/loader-inline.js +3 -21
- package/dist/loader-inline-ng/loader-inline-ng.js +2 -30
- package/dist/login-dialog/login-dialog.js +2 -2
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.d.ts +6 -13
- package/dist/markdown/code.js +3 -3
- package/dist/markdown/heading.d.ts +5 -9
- package/dist/markdown/heading.js +2 -2
- package/dist/markdown/link.d.ts +4 -8
- package/dist/markdown/link.js +1 -1
- package/dist/markdown/markdown.d.ts +2 -3
- package/dist/markdown/markdown.js +16 -16
- package/dist/message/message.d.ts +3 -0
- package/dist/message/message.js +18 -10
- package/dist/pager/pager.js +8 -12
- package/dist/pager-ng/pager-ng.js +3 -7
- package/dist/permissions-ng/permissions-ng.js +9 -9
- package/dist/popup/popup.js +1 -1
- package/dist/popup/popup.target.d.ts +1 -0
- package/dist/progress-bar/progress-bar.d.ts +0 -4
- package/dist/progress-bar/progress-bar.js +1 -7
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -1
- package/dist/promised-click-ng/promised-click-ng.js +2 -2
- package/dist/query-assist/query-assist.d.ts +0 -5
- package/dist/query-assist/query-assist.js +10 -26
- package/dist/query-assist-ng/query-assist-ng.js +2 -7
- package/dist/save-field-ng/save-field-ng.js +2 -9
- package/dist/select/select.d.ts +4 -6
- package/dist/select/select.js +35 -58
- package/dist/select/select__filter.js +1 -1
- package/dist/select/select__popup.js +7 -13
- package/dist/select-ng/select-ng.js +5 -9
- package/dist/select-ng/select-ng__lazy.js +7 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +2 -2
- package/dist/sidebar-ng/sidebar-ng.js +2 -2
- package/dist/storage/storage.js +9 -7
- package/dist/storage/storage__local.js +9 -7
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +1 -1
- package/dist/table/row-with-focus-sensor.js +1 -1
- package/dist/table/row.js +5 -5
- package/dist/table/smart-table.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng.js +3 -7
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +3 -7
- 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 +3 -2
- package/dist/tabs/collapsible-tabs.js +1 -1
- package/dist/tabs/dumb-tabs.d.ts +4 -107
- package/dist/tabs/dumb-tabs.js +6 -12
- package/dist/tabs/smart-tabs.js +3 -3
- package/dist/tabs/tab.d.ts +2 -0
- package/dist/tabs/tabs.js +1 -1
- package/dist/tabs-ng/tabs-ng.js +1 -6
- package/dist/tabs-ng/tabs-ng__template.js +1 -1
- package/dist/tag/tag.d.ts +1 -0
- package/dist/tag/tag.js +5 -4
- package/dist/tags-input/tags-input.js +5 -9
- package/dist/tags-input-ng/tags-input-ng.js +4 -8
- package/dist/tags-list/tags-list.js +1 -1
- package/dist/text/text.js +1 -1
- package/dist/toggle/toggle.d.ts +9 -89
- package/dist/toggle/toggle.js +7 -8
- package/dist/toggle-ng/toggle-ng.js +2 -3
- package/dist/tooltip/tooltip.d.ts +1 -0
- package/dist/tooltip/tooltip.js +6 -3
- package/dist/user-agreement/service.d.ts +2 -2
- package/dist/user-agreement/service.js +9 -13
- package/dist/user-agreement/user-agreement.js +8 -10
- package/dist/user-card/smart-user-card-tooltip.js +6 -11
- package/dist/user-card/tooltip.js +1 -1
- package/dist/user-card/user-card.js +2 -7
- package/dist/user-card-ng/user-card-ng.js +4 -9
- package/package.json +5 -5
- package/webpack.config.js +0 -11
- package/components/global/conic-gradient.d.ts +0 -796
- package/components/global/conic-gradient.js +0 -21
- package/components/global/radial-gradient-mask.d.ts +0 -9
- package/components/global/radial-gradient-mask.js +0 -39
- package/components/global/supports-css.d.ts +0 -2
- package/components/global/supports-css.js +0 -14
- package/components/global/variables_dark.d.ts +0 -3
- package/components/global/variables_dark.js +0 -53
- package/components/loader-inline/inject-styles.d.ts +0 -2
- package/components/loader-inline/inject-styles.js +0 -17
- package/dist/_helpers/inject-styles.js +0 -22
- package/dist/global/conic-gradient.d.ts +0 -796
- package/dist/global/conic-gradient.js +0 -35
- package/dist/global/radial-gradient-mask.d.ts +0 -9
- package/dist/global/radial-gradient-mask.js +0 -49
- package/dist/global/supports-css.d.ts +0 -2
- package/dist/global/supports-css.js +0 -20
- package/dist/global/variables_dark.d.ts +0 -3
- package/dist/global/variables_dark.js +0 -57
- package/dist/loader-inline/inject-styles.d.ts +0 -2
- package/dist/loader-inline/inject-styles.js +0 -11
package/dist/header/tray-icon.js
CHANGED
|
@@ -2,7 +2,7 @@ import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBa
|
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import
|
|
5
|
+
import { Button } from '../button/button.js';
|
|
6
6
|
import { m as modules_47759f5e } from '../_helpers/header.js';
|
|
7
7
|
import 'focus-visible';
|
|
8
8
|
import '@jetbrains/icons/chevron-10px';
|
|
@@ -12,8 +12,8 @@ import '../icon/icon__constants.js';
|
|
|
12
12
|
import '../_helpers/icon.js';
|
|
13
13
|
import '../icon/icon__svg.js';
|
|
14
14
|
import '../global/memoize.js';
|
|
15
|
-
import '../global/theme.js';
|
|
16
15
|
import '../link/clickableLink.js';
|
|
16
|
+
import '../global/controls-height.js';
|
|
17
17
|
import '../_helpers/button__classes.js';
|
|
18
18
|
|
|
19
19
|
class TrayIcon extends Component {
|
|
@@ -27,14 +27,14 @@ class TrayIcon extends Component {
|
|
|
27
27
|
[modules_47759f5e.rotatable]: rotatable,
|
|
28
28
|
[modules_47759f5e.rotated]: rotatable && restProps.active
|
|
29
29
|
});
|
|
30
|
-
return /*#__PURE__*/React.createElement(
|
|
30
|
+
return /*#__PURE__*/React.createElement(Button, _extends({}, restProps, {
|
|
31
31
|
className: classes
|
|
32
32
|
}));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
_defineProperty(TrayIcon, "propTypes", { ...
|
|
37
|
+
_defineProperty(TrayIcon, "propTypes", { ...Button.propTypes,
|
|
38
38
|
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]).isRequired,
|
|
39
39
|
rotatable: PropTypes.bool
|
|
40
40
|
});
|
package/dist/heading/heading.js
CHANGED
|
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import deprecate from 'util-deprecate';
|
|
6
6
|
|
|
7
|
-
var modules_901b77ec = {"heading":"
|
|
7
|
+
var modules_901b77ec = {"heading":"heading_rui_ecbc font_rui_750f","caps":"caps_rui_ecbc"};
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @name Heading
|
package/dist/input/input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PureComponent, Ref, ComponentType, InputHTMLAttributes, TextareaHTMLAttributes, ReactNode
|
|
2
|
-
import
|
|
1
|
+
import React, { PureComponent, Ref, ComponentType, InputHTMLAttributes, TextareaHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ControlsHeight } from '../global/controls-height';
|
|
3
3
|
declare function noop(): void;
|
|
4
4
|
/**
|
|
5
5
|
* @name Input
|
|
@@ -11,20 +11,20 @@ declare enum Size {
|
|
|
11
11
|
L = "L",
|
|
12
12
|
FULL = "FULL"
|
|
13
13
|
}
|
|
14
|
-
export interface InputBaseProps
|
|
14
|
+
export interface InputBaseProps {
|
|
15
15
|
size: Size;
|
|
16
16
|
enableShortcuts: boolean | string[];
|
|
17
|
-
renderUnderline: (underlineRef: Ref<HTMLDivElement>, errorText: ReactNode) => ReactNode;
|
|
18
17
|
children?: string | undefined;
|
|
19
18
|
inputClassName?: string | null | undefined;
|
|
20
19
|
label?: ReactNode;
|
|
21
20
|
active?: boolean | null | undefined;
|
|
22
|
-
|
|
23
|
-
error?: string | null | undefined;
|
|
21
|
+
error?: ReactNode | null | undefined;
|
|
24
22
|
borderless?: boolean | null | undefined;
|
|
25
23
|
onClear?: ((e: React.MouseEvent<HTMLButtonElement>) => void) | null | undefined;
|
|
26
24
|
loading?: boolean | null | undefined;
|
|
27
25
|
icon?: string | ComponentType | null | undefined;
|
|
26
|
+
height?: ControlsHeight | undefined;
|
|
27
|
+
afterInput?: ReactNode;
|
|
28
28
|
}
|
|
29
29
|
declare type Override<D, S> = Omit<D, keyof S> & S;
|
|
30
30
|
export declare type InputSpecificProps = Override<InputHTMLAttributes<HTMLInputElement>, InputBaseProps> & {
|
|
@@ -42,32 +42,28 @@ export declare class Input extends PureComponent<InputProps> {
|
|
|
42
42
|
onChange: typeof noop;
|
|
43
43
|
inputRef: typeof noop;
|
|
44
44
|
enableShortcuts: string[];
|
|
45
|
-
renderUnderline: (underlineRef: Ref<HTMLDivElement>, errorText: ReactNode) => JSX.Element;
|
|
46
45
|
};
|
|
47
46
|
state: {
|
|
48
47
|
empty: boolean;
|
|
49
48
|
};
|
|
50
49
|
componentDidMount(): void;
|
|
51
50
|
componentDidUpdate(): void;
|
|
51
|
+
componentWillUnmount(): void;
|
|
52
|
+
static contextType: React.Context<ControlsHeight>;
|
|
53
|
+
frame?: number;
|
|
52
54
|
input?: HTMLInputElement | HTMLTextAreaElement | null;
|
|
53
|
-
underlineNode?: HTMLElement | null;
|
|
54
55
|
id: string;
|
|
55
56
|
getId(): string;
|
|
56
57
|
checkValue(): void;
|
|
57
58
|
stretch(el: HTMLElement | null | undefined): void;
|
|
58
59
|
adapt(): void;
|
|
59
|
-
underlineRef: (el: HTMLDivElement | null) => void;
|
|
60
60
|
inputRef: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;
|
|
61
61
|
clear: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
62
62
|
handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
63
63
|
handleTextareaChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
64
64
|
render(): JSX.Element;
|
|
65
65
|
}
|
|
66
|
-
export declare type ContainerProps<P> =
|
|
67
|
-
declare type
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
export declare type InputAttrs = ComponentProps<typeof ThemedInput>;
|
|
72
|
-
export default ThemedInput;
|
|
73
|
-
export { Size, Theme };
|
|
66
|
+
export declare type ContainerProps<P extends InputProps> = JSX.LibraryManagedAttributes<typeof Input, P>;
|
|
67
|
+
export declare type InputAttrs = ContainerProps<InputProps>;
|
|
68
|
+
export default Input;
|
|
69
|
+
export { Size };
|
package/dist/input/input.js
CHANGED
|
@@ -3,13 +3,12 @@ import React, { PureComponent } from 'react';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import closeIcon from '@jetbrains/icons/close';
|
|
6
|
-
import Theme, { withTheme } from '../global/theme.js';
|
|
7
|
-
export { default as Theme } from '../global/theme.js';
|
|
8
6
|
import { refObject } from '../global/prop-types.js';
|
|
9
|
-
import
|
|
7
|
+
import { Button } from '../button/button.js';
|
|
10
8
|
import getUID from '../global/get-uid.js';
|
|
11
9
|
import Icon from '../icon/icon.js';
|
|
12
10
|
import composeRefs from '../global/composeRefs.js';
|
|
11
|
+
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
13
12
|
import { m as modules_88cfaf40 } from '../_helpers/input.js';
|
|
14
13
|
import 'focus-visible';
|
|
15
14
|
import '@jetbrains/icons/chevron-10px';
|
|
@@ -45,16 +44,12 @@ class Input extends PureComponent {
|
|
|
45
44
|
empty: true
|
|
46
45
|
});
|
|
47
46
|
|
|
48
|
-
_defineProperty(this, "
|
|
47
|
+
_defineProperty(this, "frame", void 0);
|
|
49
48
|
|
|
50
|
-
_defineProperty(this, "
|
|
49
|
+
_defineProperty(this, "input", void 0);
|
|
51
50
|
|
|
52
51
|
_defineProperty(this, "id", getUID('ring-input-'));
|
|
53
52
|
|
|
54
|
-
_defineProperty(this, "underlineRef", el => {
|
|
55
|
-
this.underlineNode = el;
|
|
56
|
-
});
|
|
57
|
-
|
|
58
53
|
_defineProperty(this, "inputRef", el => {
|
|
59
54
|
this.input = el;
|
|
60
55
|
});
|
|
@@ -83,13 +78,19 @@ class Input extends PureComponent {
|
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
componentDidMount() {
|
|
86
|
-
this.adapt();
|
|
81
|
+
this.frame = requestAnimationFrame(() => this.adapt());
|
|
87
82
|
}
|
|
88
83
|
|
|
89
84
|
componentDidUpdate() {
|
|
90
85
|
this.adapt();
|
|
91
86
|
}
|
|
92
87
|
|
|
88
|
+
componentWillUnmount() {
|
|
89
|
+
if (this.frame != null) {
|
|
90
|
+
cancelAnimationFrame(this.frame);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
93
94
|
getId() {
|
|
94
95
|
return this.props.id || this.id;
|
|
95
96
|
}
|
|
@@ -111,23 +112,20 @@ class Input extends PureComponent {
|
|
|
111
112
|
return;
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
el.style.height = `${el.scrollHeight}px`;
|
|
115
|
+
el.style.height = `${el.scrollHeight + 2}px`;
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
adapt() {
|
|
118
119
|
this.checkValue();
|
|
119
|
-
this.stretch(this.underlineNode);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
render() {
|
|
123
123
|
const {
|
|
124
124
|
// Modifiers
|
|
125
|
-
theme,
|
|
126
125
|
size,
|
|
127
126
|
active,
|
|
128
127
|
multiline,
|
|
129
128
|
borderless,
|
|
130
|
-
compact,
|
|
131
129
|
// Props
|
|
132
130
|
label,
|
|
133
131
|
error,
|
|
@@ -143,15 +141,15 @@ class Input extends PureComponent {
|
|
|
143
141
|
id,
|
|
144
142
|
placeholder,
|
|
145
143
|
icon,
|
|
146
|
-
|
|
144
|
+
height = this.context,
|
|
145
|
+
afterInput,
|
|
147
146
|
...restProps
|
|
148
147
|
} = this.props;
|
|
149
|
-
const minimizeMargins = compact || borderless;
|
|
150
148
|
const {
|
|
151
149
|
empty
|
|
152
150
|
} = this.state;
|
|
153
151
|
const clearable = !!onClear;
|
|
154
|
-
const classes = classNames(modules_88cfaf40.
|
|
152
|
+
const classes = classNames(className, modules_88cfaf40.outerContainer, [modules_88cfaf40[`size${size}`]], [modules_88cfaf40[`height${height}`]], {
|
|
155
153
|
'ring-js-shortcuts': enableShortcuts === true,
|
|
156
154
|
[modules_88cfaf40.active]: active,
|
|
157
155
|
[modules_88cfaf40.error]: error != null,
|
|
@@ -159,7 +157,7 @@ class Input extends PureComponent {
|
|
|
159
157
|
[modules_88cfaf40.noLabel]: !this.props.label,
|
|
160
158
|
[modules_88cfaf40.withIcon]: icon != null,
|
|
161
159
|
[modules_88cfaf40.clearable]: clearable,
|
|
162
|
-
[modules_88cfaf40.
|
|
160
|
+
[modules_88cfaf40.borderless]: borderless
|
|
163
161
|
});
|
|
164
162
|
const inputClasses = classNames(modules_88cfaf40.input, inputClassName);
|
|
165
163
|
const text = value != null ? value : children;
|
|
@@ -176,6 +174,13 @@ class Input extends PureComponent {
|
|
|
176
174
|
return /*#__PURE__*/React.createElement("div", {
|
|
177
175
|
className: classes,
|
|
178
176
|
"data-test": "ring-input"
|
|
177
|
+
}, label && /*#__PURE__*/React.createElement("label", {
|
|
178
|
+
htmlFor: this.getId(),
|
|
179
|
+
className: classNames(modules_88cfaf40.label, {
|
|
180
|
+
[modules_88cfaf40.disabledLabel]: disabled
|
|
181
|
+
})
|
|
182
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
className: modules_88cfaf40.container
|
|
179
184
|
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
|
180
185
|
glyph: icon,
|
|
181
186
|
className: modules_88cfaf40.icon
|
|
@@ -184,22 +189,15 @@ class Input extends PureComponent {
|
|
|
184
189
|
rows: 1
|
|
185
190
|
}, commonProps, restProps)) : /*#__PURE__*/React.createElement("input", _extends({
|
|
186
191
|
onChange: this.handleInputChange
|
|
187
|
-
}, commonProps, restProps)), clearable && !disabled && /*#__PURE__*/React.createElement(
|
|
192
|
+
}, commonProps, restProps)), clearable && !disabled && /*#__PURE__*/React.createElement(Button, {
|
|
188
193
|
title: "Clear input",
|
|
189
194
|
"data-test": "ring-input-clear",
|
|
190
195
|
className: modules_88cfaf40.clear,
|
|
191
196
|
icon: closeIcon,
|
|
192
197
|
onClick: this.clear
|
|
193
|
-
}),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}, label), !borderless && /*#__PURE__*/React.createElement("div", {
|
|
197
|
-
className: modules_88cfaf40.underline
|
|
198
|
-
}), !borderless && /*#__PURE__*/React.createElement("div", {
|
|
199
|
-
className: modules_88cfaf40.focusUnderline
|
|
200
|
-
}), !minimizeMargins && /*#__PURE__*/React.createElement("div", {
|
|
201
|
-
className: modules_88cfaf40.errorUnderline
|
|
202
|
-
}), !minimizeMargins && renderUnderline(this.underlineRef, error));
|
|
198
|
+
}), afterInput), error && /*#__PURE__*/React.createElement("div", {
|
|
199
|
+
className: modules_88cfaf40.errorText
|
|
200
|
+
}, error));
|
|
203
201
|
}
|
|
204
202
|
|
|
205
203
|
}
|
|
@@ -208,16 +206,13 @@ _defineProperty(Input, "defaultProps", {
|
|
|
208
206
|
size: Size.M,
|
|
209
207
|
onChange: noop,
|
|
210
208
|
inputRef: noop,
|
|
211
|
-
enableShortcuts: ['esc']
|
|
212
|
-
renderUnderline: (underlineRef, errorText) => /*#__PURE__*/React.createElement("div", {
|
|
213
|
-
className: modules_88cfaf40.errorText,
|
|
214
|
-
ref: underlineRef
|
|
215
|
-
}, errorText)
|
|
209
|
+
enableShortcuts: ['esc']
|
|
216
210
|
});
|
|
217
211
|
|
|
212
|
+
_defineProperty(Input, "contextType", ControlsHeightContext);
|
|
213
|
+
|
|
218
214
|
Input.propTypes = {
|
|
219
215
|
value: PropTypes.string,
|
|
220
|
-
theme: PropTypes.oneOf(Object.values(Theme)),
|
|
221
216
|
className: PropTypes.string,
|
|
222
217
|
inputClassName: PropTypes.string,
|
|
223
218
|
size: PropTypes.oneOf(Object.values(Size)).isRequired,
|
|
@@ -225,8 +220,6 @@ Input.propTypes = {
|
|
|
225
220
|
active: PropTypes.bool,
|
|
226
221
|
error: PropTypes.string,
|
|
227
222
|
multiline: PropTypes.bool,
|
|
228
|
-
borderless: PropTypes.bool,
|
|
229
|
-
compact: PropTypes.bool,
|
|
230
223
|
onChange: PropTypes.func,
|
|
231
224
|
onClear: PropTypes.func,
|
|
232
225
|
inputRef: PropTypes.oneOfType([PropTypes.func, refObject(PropTypes.instanceOf(HTMLInputElement)), refObject(PropTypes.instanceOf(HTMLTextAreaElement))]),
|
|
@@ -235,9 +228,7 @@ Input.propTypes = {
|
|
|
235
228
|
disabled: PropTypes.bool,
|
|
236
229
|
id: PropTypes.string,
|
|
237
230
|
placeholder: PropTypes.string,
|
|
238
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType])
|
|
239
|
-
renderUnderline: PropTypes.func
|
|
231
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType])
|
|
240
232
|
};
|
|
241
|
-
const ThemedInput = withTheme()(Input);
|
|
242
233
|
|
|
243
|
-
export { Input, Size,
|
|
234
|
+
export { Input, Size, Input as default };
|
|
@@ -4,15 +4,15 @@ import classNames from 'classnames';
|
|
|
4
4
|
import closeIcon from '@jetbrains/icons/close';
|
|
5
5
|
import RingAngularComponent from '../global/ring-angular-component.js';
|
|
6
6
|
import { m as modules_88cfaf40 } from '../_helpers/input.js';
|
|
7
|
-
import Theme from '../global/theme.js';
|
|
8
7
|
import ButtonNG from '../button-ng/button-ng.js';
|
|
9
|
-
import 'react';
|
|
10
8
|
import '../global/dom.js';
|
|
11
9
|
import '../icon-ng/icon-ng.js';
|
|
12
10
|
import '../icon/icon__constants.js';
|
|
13
11
|
import '../template-ng/template-ng.js';
|
|
14
12
|
import '../_helpers/icon.js';
|
|
15
13
|
import '../_helpers/button__classes.js';
|
|
14
|
+
import '../global/controls-height.js';
|
|
15
|
+
import 'react';
|
|
16
16
|
|
|
17
17
|
var modules_c40fa551 = {"errorText":"errorText_rui_e22b","clear":"clear_rui_e22b"};
|
|
18
18
|
|
|
@@ -62,7 +62,7 @@ class RingInputComponent extends RingAngularComponent {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
getContainerClasses() {
|
|
65
|
-
return classNames(modules_88cfaf40.
|
|
65
|
+
return classNames(modules_88cfaf40.outerContainer, this.size ? [modules_88cfaf40[`size${this.size}`]] : null, modules_88cfaf40.heightS, {
|
|
66
66
|
[modules_88cfaf40.active]: this.active,
|
|
67
67
|
[modules_88cfaf40.error]: this.error != null,
|
|
68
68
|
[modules_88cfaf40.empty]: !this.value,
|
|
@@ -91,7 +91,6 @@ _defineProperty(RingInputComponent, "bindings", {
|
|
|
91
91
|
label: '@',
|
|
92
92
|
hint: '@',
|
|
93
93
|
size: '@',
|
|
94
|
-
theme: '@',
|
|
95
94
|
disabled: '@',
|
|
96
95
|
active: '<',
|
|
97
96
|
error: '@',
|
|
@@ -106,56 +105,54 @@ _defineProperty(RingInputComponent, "template", `
|
|
|
106
105
|
data-test="ring-input-container"
|
|
107
106
|
ng-class="$ctrl.getContainerClasses()"
|
|
108
107
|
>
|
|
109
|
-
<input
|
|
110
|
-
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
111
|
-
type="text"
|
|
112
|
-
data-test="ring-input"
|
|
113
|
-
class="${modules_88cfaf40.input}"
|
|
114
|
-
name="{{$ctrl.name}}"
|
|
115
|
-
ng-if="!$ctrl.multiline"
|
|
116
|
-
placeholder="{{$ctrl.placeholder}}"
|
|
117
|
-
ng-model="$ctrl.value"
|
|
118
|
-
ng-required="$ctrl.required"
|
|
119
|
-
ng-disabled="$ctrl.disabled"
|
|
120
|
-
ng-minlength="$ctrl.ngMinlength"
|
|
121
|
-
ng-maxlength="$ctrl.ngMaxlength"
|
|
122
|
-
ng-change="$ctrl.onInputChange()"
|
|
123
|
-
ng-keyup="$ctrl.onKeyUp()"
|
|
124
|
-
/>
|
|
125
|
-
|
|
126
|
-
<textarea
|
|
127
|
-
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
128
|
-
data-test="ring-input"
|
|
129
|
-
ng-if="$ctrl.multiline"
|
|
130
|
-
class="${modules_88cfaf40.input}"
|
|
131
|
-
rows="1"
|
|
132
|
-
name="{{$ctrl.name}}"
|
|
133
|
-
placeholder="{{$ctrl.placeholder}}"
|
|
134
|
-
ng-model="$ctrl.value"
|
|
135
|
-
ng-required="$ctrl.required"
|
|
136
|
-
ng-disabled="$ctrl.disabled"
|
|
137
|
-
ng-minlength="$ctrl.ngMinlength"
|
|
138
|
-
ng-maxlength="$ctrl.ngMaxlength"
|
|
139
|
-
ng-change="$ctrl.onInputChange()"
|
|
140
|
-
ng-keyup="$ctrl.onKeyUp()"
|
|
141
|
-
></textarea>
|
|
142
|
-
|
|
143
|
-
<rg-button
|
|
144
|
-
ng-if="$ctrl.clearable"
|
|
145
|
-
data-test="ring-input-clear"
|
|
146
|
-
class="${modules_88cfaf40.clear} ${modules_c40fa551.clear}"
|
|
147
|
-
icon="{{:: $ctrl.closeIcon}}"
|
|
148
|
-
ng-click="$ctrl.onClear()"
|
|
149
|
-
></rg-button>
|
|
150
|
-
|
|
151
108
|
<label
|
|
152
109
|
ng-if="!$ctrl.borderless"
|
|
153
110
|
class="${modules_88cfaf40.label}"
|
|
154
111
|
>{{$ctrl.label}}</label>
|
|
112
|
+
<div class="${modules_88cfaf40.container}">
|
|
113
|
+
<input
|
|
114
|
+
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
115
|
+
type="text"
|
|
116
|
+
data-test="ring-input"
|
|
117
|
+
class="${modules_88cfaf40.input}"
|
|
118
|
+
name="{{$ctrl.name}}"
|
|
119
|
+
ng-if="!$ctrl.multiline"
|
|
120
|
+
placeholder="{{$ctrl.placeholder}}"
|
|
121
|
+
ng-model="$ctrl.value"
|
|
122
|
+
ng-required="$ctrl.required"
|
|
123
|
+
ng-disabled="$ctrl.disabled"
|
|
124
|
+
ng-minlength="$ctrl.ngMinlength"
|
|
125
|
+
ng-maxlength="$ctrl.ngMaxlength"
|
|
126
|
+
ng-change="$ctrl.onInputChange()"
|
|
127
|
+
ng-keyup="$ctrl.onKeyUp()"
|
|
128
|
+
/>
|
|
129
|
+
|
|
130
|
+
<textarea
|
|
131
|
+
aria-label="{{$ctrl.label || $ctrl.placeholder}}"
|
|
132
|
+
data-test="ring-input"
|
|
133
|
+
ng-if="$ctrl.multiline"
|
|
134
|
+
class="${modules_88cfaf40.input}"
|
|
135
|
+
rows="1"
|
|
136
|
+
name="{{$ctrl.name}}"
|
|
137
|
+
placeholder="{{$ctrl.placeholder}}"
|
|
138
|
+
ng-model="$ctrl.value"
|
|
139
|
+
ng-required="$ctrl.required"
|
|
140
|
+
ng-disabled="$ctrl.disabled"
|
|
141
|
+
ng-minlength="$ctrl.ngMinlength"
|
|
142
|
+
ng-maxlength="$ctrl.ngMaxlength"
|
|
143
|
+
ng-change="$ctrl.onInputChange()"
|
|
144
|
+
ng-keyup="$ctrl.onKeyUp()"
|
|
145
|
+
></textarea>
|
|
146
|
+
|
|
147
|
+
<rg-button
|
|
148
|
+
ng-if="$ctrl.clearable"
|
|
149
|
+
data-test="ring-input-clear"
|
|
150
|
+
class="${modules_88cfaf40.clear} ${modules_c40fa551.clear}"
|
|
151
|
+
icon="{{:: $ctrl.closeIcon}}"
|
|
152
|
+
ng-click="$ctrl.onClear()"
|
|
153
|
+
></rg-button>
|
|
154
|
+
</div>
|
|
155
155
|
|
|
156
|
-
<div ng-if="!$ctrl.borderless" class="${modules_88cfaf40.underline}"></div>
|
|
157
|
-
<div ng-if="!$ctrl.borderless" class="${modules_88cfaf40.focusUnderline}"></div>
|
|
158
|
-
<div ng-if="!$ctrl.borderless" class="${modules_88cfaf40.errorUnderline}"></div>
|
|
159
156
|
<div ng-if="!$ctrl.borderless && $ctrl.error" class="${modules_88cfaf40.errorText} ${modules_c40fa551.errorText}">{{$ctrl.error}}</div>
|
|
160
157
|
</div>
|
|
161
158
|
`);
|
|
@@ -5,7 +5,7 @@ export declare const ScrollHandlerContext: React.Context<ScrollHandler | null>;
|
|
|
5
5
|
export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>): {
|
|
6
6
|
new (props: P | Readonly<P>): {
|
|
7
7
|
state: {
|
|
8
|
-
phase:
|
|
8
|
+
phase: null;
|
|
9
9
|
};
|
|
10
10
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
11
11
|
render(): JSX.Element;
|
|
@@ -33,7 +33,7 @@ export default function adaptiveIslandHOC<P>(ComposedComponent: ComponentType<P>
|
|
|
33
33
|
};
|
|
34
34
|
new (props: P, context: any): {
|
|
35
35
|
state: {
|
|
36
|
-
phase:
|
|
36
|
+
phase: null;
|
|
37
37
|
};
|
|
38
38
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
39
39
|
render(): JSX.Element;
|
|
@@ -14,17 +14,19 @@ function adaptiveIslandHOC(ComposedComponent) {
|
|
|
14
14
|
super(...arguments);
|
|
15
15
|
|
|
16
16
|
_defineProperty(this, "state", {
|
|
17
|
-
phase:
|
|
17
|
+
phase: null
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
_defineProperty(this, "onContentScroll", _ref => {
|
|
21
|
+
var _this$state$phase;
|
|
22
|
+
|
|
21
23
|
let {
|
|
22
24
|
scrollTop,
|
|
23
25
|
scrollHeight,
|
|
24
26
|
clientHeight
|
|
25
27
|
} = _ref;
|
|
26
28
|
|
|
27
|
-
if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, this.state.phase)) {
|
|
29
|
+
if (scrollHeight - clientHeight >= interpolateLinear(TITLE_RESIZE_THRESHOLD, TITLE_RESIZE_END, (_this$state$phase = this.state.phase) !== null && _this$state$phase !== void 0 ? _this$state$phase : 0)) {
|
|
28
30
|
const phase = Math.min(1, scrollTop / TITLE_RESIZE_END);
|
|
29
31
|
this.setState({
|
|
30
32
|
phase
|
package/dist/island/content.js
CHANGED
|
@@ -47,6 +47,7 @@ class Content extends Component {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
this.props.onScroll(scrollableNode);
|
|
50
51
|
const {
|
|
51
52
|
scrollTop,
|
|
52
53
|
scrollHeight,
|
|
@@ -67,14 +68,6 @@ class Content extends Component {
|
|
|
67
68
|
});
|
|
68
69
|
}));
|
|
69
70
|
|
|
70
|
-
_defineProperty(this, "onScroll", () => {
|
|
71
|
-
if (this.scrollableNode != null) {
|
|
72
|
-
this.props.onScroll(this.scrollableNode);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
this.calculateScrollPosition();
|
|
76
|
-
});
|
|
77
|
-
|
|
78
71
|
_defineProperty(this, "scrollableNode", void 0);
|
|
79
72
|
|
|
80
73
|
_defineProperty(this, "setScrollableNodeAndCalculatePosition", node => {
|
|
@@ -129,7 +122,7 @@ class Content extends Component {
|
|
|
129
122
|
"data-scrollable-container": true,
|
|
130
123
|
className: scrollableWrapperClasses,
|
|
131
124
|
ref: this.setScrollableNodeAndCalculatePosition,
|
|
132
|
-
onScroll: fade ? this.
|
|
125
|
+
onScroll: fade ? this.calculateScrollPosition : noop
|
|
133
126
|
}, fade && /*#__PURE__*/React.createElement("div", {
|
|
134
127
|
ref: this.setWrapper
|
|
135
128
|
}, children), !fade && children));
|
package/dist/island/header.js
CHANGED
|
@@ -9,15 +9,17 @@ import { PhaseContext } from './adaptive-island-hoc.js';
|
|
|
9
9
|
const Start = {
|
|
10
10
|
FONT_SIZE: 24,
|
|
11
11
|
LINE_HEIGHT: 28,
|
|
12
|
-
|
|
12
|
+
PADDING_TOP: 24,
|
|
13
|
+
PADDING_BOTTOM: 0,
|
|
13
14
|
X: 0,
|
|
14
15
|
Y: 0,
|
|
15
16
|
SPACING: 0
|
|
16
17
|
};
|
|
17
18
|
const End = {
|
|
18
19
|
FONT_SIZE: 13,
|
|
19
|
-
LINE_HEIGHT:
|
|
20
|
-
|
|
20
|
+
LINE_HEIGHT: 20,
|
|
21
|
+
PADDING_TOP: 16,
|
|
22
|
+
PADDING_BOTTOM: 8,
|
|
21
23
|
// Compensation
|
|
22
24
|
X: 0.4,
|
|
23
25
|
Y: 0.1,
|
|
@@ -46,7 +48,8 @@ class Header extends Component {
|
|
|
46
48
|
});
|
|
47
49
|
const headerStyle = phase != null ? {
|
|
48
50
|
lineHeight: `${this.style('LINE_HEIGHT')}px`,
|
|
49
|
-
paddingTop: this.style('
|
|
51
|
+
paddingTop: this.style('PADDING_TOP'),
|
|
52
|
+
paddingBottom: this.style('PADDING_BOTTOM')
|
|
50
53
|
} : undefined;
|
|
51
54
|
const scaleFont = phase != null && this.style('FONT_SIZE') / Start.FONT_SIZE;
|
|
52
55
|
const titleStyle = phase != null && phase < 1 ? {
|
package/dist/island/island.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export default class Island extends Component<IslandProps> {
|
|
|
21
21
|
export declare const AdaptiveIsland: {
|
|
22
22
|
new (props: IslandProps | Readonly<IslandProps>): {
|
|
23
23
|
state: {
|
|
24
|
-
phase:
|
|
24
|
+
phase: null;
|
|
25
25
|
};
|
|
26
26
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
27
27
|
render(): JSX.Element;
|
|
@@ -49,7 +49,7 @@ export declare const AdaptiveIsland: {
|
|
|
49
49
|
};
|
|
50
50
|
new (props: IslandProps, context: any): {
|
|
51
51
|
state: {
|
|
52
|
-
phase:
|
|
52
|
+
phase: null;
|
|
53
53
|
};
|
|
54
54
|
onContentScroll: ({ scrollTop, scrollHeight, clientHeight }: Element) => void;
|
|
55
55
|
render(): JSX.Element;
|
package/dist/list/list.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { WindowScrollerChildProps } from 'react-virtualized/dist/es/WindowScroll
|
|
|
9
9
|
import { ShortcutsMap } from '../shortcuts/core';
|
|
10
10
|
import ListHint from './list__hint';
|
|
11
11
|
import { Dimension, ListDataItem, ListDataItemProps, Type } from './consts';
|
|
12
|
+
export type { ListDataItem };
|
|
12
13
|
declare function noop(): void;
|
|
13
14
|
/**
|
|
14
15
|
* @param {Type} listItemType
|
|
@@ -188,4 +189,3 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
|
|
|
188
189
|
render(): JSX.Element;
|
|
189
190
|
}
|
|
190
191
|
export declare type ListAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof List, ListProps<T>>;
|
|
191
|
-
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { getPixelRatio } from '../global/dom.js';
|
|
3
3
|
|
|
4
|
-
var modules_00b5ad26 = {"unit":"8px","canvas":"
|
|
4
|
+
var modules_00b5ad26 = {"unit":"8px","canvas":"canvas_rui_e88a","animate":"animate_rui_e88a","rotation-keyframes":"rotationKeyframes_rui_e88a","text":"text_rui_e88a"};
|
|
5
5
|
|
|
6
6
|
const INITIAL_TICKS = 100;
|
|
7
7
|
|