@jetbrains/ring-ui 7.0.11 → 7.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +8 -14
- package/components/alert/container.js +3 -4
- package/components/alert-service/alert-service.d.ts +1 -1
- package/components/alert-service/alert-service.js +5 -8
- package/components/auth/down-notification.js +4 -12
- package/components/auth/iframe-flow.js +2 -3
- package/components/auth-dialog/auth-dialog.d.ts +1 -1
- package/components/auth-dialog/auth-dialog.js +2 -18
- package/components/auth-dialog-service/auth-dialog-service.js +2 -3
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.js +4 -8
- package/components/avatar/fallback-avatar.d.ts +1 -1
- package/components/avatar/fallback-avatar.js +2 -18
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.js +2 -4
- package/components/button/button.css +52 -39
- package/components/button/button.d.ts +1 -1
- package/components/button/button.js +4 -11
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +2 -5
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-group/caption.js +2 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-set/button-set.js +2 -3
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.js +2 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.js +2 -13
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +5 -8
- package/components/collapse/collapse-content.js +3 -7
- package/components/collapse/collapse-control.js +3 -5
- package/components/collapse/collapse.js +8 -12
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +2 -15
- package/components/confirm-service/confirm-service.js +2 -3
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -6
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/content-layout/sidebar.js +2 -11
- package/components/contenteditable/contenteditable.d.ts +2 -2
- package/components/contenteditable/contenteditable.js +6 -5
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-help/control-help.js +2 -1
- package/components/control-label/control-label.js +3 -5
- package/components/data-list/data-list.d.ts +3 -3
- package/components/data-list/data-list.js +8 -17
- package/components/data-list/data-list.mock.d.ts +1 -1
- package/components/data-list/data-list.mock.js +27 -72
- package/components/data-list/item.d.ts +2 -2
- package/components/data-list/item.js +7 -23
- package/components/data-list/title.d.ts +1 -1
- package/components/data-list/title.js +2 -11
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.d.ts +1 -1
- package/components/date-picker/date-picker.js +11 -23
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -20
- package/components/date-picker/day.d.ts +1 -1
- package/components/date-picker/day.js +3 -4
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +7 -12
- package/components/date-picker/month-slider.d.ts +1 -1
- package/components/date-picker/month-slider.js +3 -4
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/month.js +3 -4
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +5 -8
- package/components/date-picker/weekdays.d.ts +1 -1
- package/components/date-picker/weekdays.js +3 -6
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +5 -8
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +12 -33
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +2 -3
- package/components/dropdown/dropdown.d.ts +1 -1
- package/components/dropdown/dropdown.js +7 -10
- package/components/dropdown-menu/dropdown-menu.js +4 -9
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/editable-heading/editable-heading.js +2 -30
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.js +2 -8
- package/components/error-message/error-message.d.ts +1 -1
- package/components/error-message/error-message.js +2 -10
- package/components/footer/footer.js +7 -14
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/create-stateful-context.js +2 -3
- package/components/global/focus-sensor-hoc.js +2 -1
- package/components/global/react-dom-renderer.d.ts +1 -1
- package/components/global/react-dom-renderer.js +2 -1
- package/components/global/rerender-hoc.js +3 -2
- package/components/global/theme.js +3 -11
- package/components/global/variables.css +3 -4
- package/components/global/variables_dark.css +2 -2
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +2 -3
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +2 -3
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +2 -3
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +2 -3
- package/components/header/header-icon.d.ts +1 -1
- package/components/header/header-icon.js +2 -1
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +3 -4
- package/components/header/links.d.ts +1 -1
- package/components/header/links.js +2 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -3
- package/components/header/profile.d.ts +1 -1
- package/components/header/profile.js +6 -19
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +5 -6
- package/components/header/services.d.ts +1 -1
- package/components/header/services.js +10 -15
- package/components/header/smart-profile.d.ts +1 -1
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.d.ts +1 -1
- package/components/header/smart-services.js +2 -1
- package/components/header/tray.d.ts +1 -1
- package/components/header/tray.js +3 -4
- package/components/heading/heading.js +6 -7
- package/components/i18n/i18n-context.js +2 -1
- package/components/icon/icon.d.ts +1 -1
- package/components/icon/icon.js +2 -3
- package/components/icon/icon__svg.d.ts +1 -1
- package/components/icon/icon__svg.js +3 -2
- package/components/input/input.d.ts +1 -1
- package/components/input/input.js +2 -15
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +2 -5
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +5 -12
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +5 -12
- package/components/island/island.d.ts +3 -3
- package/components/island/island.js +2 -3
- package/components/link/clickableLink.d.ts +1 -1
- package/components/link/clickableLink.js +2 -4
- package/components/link/link.d.ts +4 -4
- package/components/link/link.js +3 -6
- package/components/list/list.d.ts +6 -6
- package/components/list/list.js +18 -38
- package/components/list/list__custom.d.ts +1 -1
- package/components/list/list__custom.js +2 -4
- package/components/list/list__hint.d.ts +1 -1
- package/components/list/list__hint.js +2 -3
- package/components/list/list__item.d.ts +1 -1
- package/components/list/list__item.js +3 -31
- package/components/list/list__link.d.ts +1 -1
- package/components/list/list__link.js +2 -3
- package/components/list/list__separator.d.ts +1 -1
- package/components/list/list__separator.js +2 -3
- package/components/list/list__title.d.ts +1 -1
- package/components/list/list__title.js +2 -8
- package/components/loader/loader.d.ts +1 -1
- package/components/loader/loader.js +2 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-inline/loader-inline.js +3 -5
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +2 -3
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +2 -9
- package/components/login-dialog/service.js +2 -3
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +2 -3
- package/components/message/message.d.ts +1 -1
- package/components/message/message.js +2 -21
- package/components/pager/pager.d.ts +5 -5
- package/components/pager/pager.js +11 -55
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +13 -25
- package/components/popup/popup.target.js +3 -6
- package/components/popup-menu/popup-menu.d.ts +1 -1
- package/components/popup-menu/popup-menu.js +2 -3
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +2 -3
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist.js +7 -45
- package/components/query-assist/query-assist__suggestions.d.ts +1 -1
- package/components/query-assist/query-assist__suggestions.js +5 -10
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio.js +2 -1
- package/components/radio/radio__item.d.ts +1 -1
- package/components/radio/radio__item.js +3 -11
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +3 -2
- package/components/select/select.d.ts +3 -3
- package/components/select/select.js +43 -91
- package/components/select/select__filter.d.ts +1 -1
- package/components/select/select__filter.js +2 -5
- package/components/select/select__popup.d.ts +7 -7
- package/components/select/select__popup.js +13 -43
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts-hoc.js +2 -3
- package/components/slider/slider.js +31 -49
- package/components/tab-trap/tab-trap.js +9 -15
- package/components/table/cell.d.ts +1 -1
- package/components/table/cell.js +2 -3
- package/components/table/disable-hover-hoc.d.ts +2 -2
- package/components/table/disable-hover-hoc.js +2 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +2 -12
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +5 -18
- package/components/table/multitable.d.ts +1 -1
- package/components/table/multitable.js +3 -4
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row-with-focus-sensor.js +2 -1
- package/components/table/row.d.ts +1 -1
- package/components/table/row.js +5 -24
- package/components/table/selection-shortcuts-hoc.js +2 -1
- package/components/table/simple-table.d.ts +1 -1
- package/components/table/simple-table.js +2 -1
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/smart-table.js +2 -1
- package/components/table/table.d.ts +4 -4
- package/components/table/table.js +8 -29
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +6 -13
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tab.js +3 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +2 -10
- package/components/tabs/dumb-tabs.d.ts +2 -3
- package/components/tabs/dumb-tabs.js +3 -9
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +2 -3
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab-link.js +2 -9
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tab.js +2 -3
- package/components/tag/tag.d.ts +5 -5
- package/components/tag/tag.js +15 -23
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +4 -12
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +4 -8
- package/components/text/text.d.ts +1 -1
- package/components/text/text.js +2 -3
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -17
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/tooltip/tooltip.js +2 -11
- package/components/user-agreement/service.js +3 -12
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +2 -29
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -37
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +3 -6
- package/components/user-card/tooltip.d.ts +2 -2
- package/components/user-card/tooltip.js +9 -12
- package/package.json +23 -23
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
|
|
@@ -41,18 +42,6 @@ export default class Checkbox extends PureComponent {
|
|
|
41
42
|
const containerClasses = classNames(styles.checkbox, containerClassName);
|
|
42
43
|
const cellClasses = classNames(styles.cell, cellClassName);
|
|
43
44
|
const labelClasses = classNames(styles.label, labelClassName);
|
|
44
|
-
return (
|
|
45
|
-
<input {...restProps} data-checked={restProps.checked} ref={this.composedInputRef(this.inputRef, inputRef)} type="checkbox" className={classes}/>
|
|
46
|
-
<div className={styles.cellWrapper}>
|
|
47
|
-
<span className={cellClasses}>
|
|
48
|
-
<Icon glyph={checkmarkIcon} className={styles.check}/>
|
|
49
|
-
<Icon glyph={minusIcon} className={styles.minus}/>
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
52
|
-
<span className={labelClasses}>
|
|
53
|
-
{label || children}
|
|
54
|
-
{help && <ControlHelp>{help}</ControlHelp>}
|
|
55
|
-
</span>
|
|
56
|
-
</label>);
|
|
45
|
+
return (_jsxs("label", { className: containerClasses, style: containerStyle, "data-test": "ring-checkbox", children: [_jsx("input", { ...restProps, "data-checked": restProps.checked, ref: this.composedInputRef(this.inputRef, inputRef), type: "checkbox", className: classes }), _jsx("div", { className: styles.cellWrapper, children: _jsxs("span", { className: cellClasses, children: [_jsx(Icon, { glyph: checkmarkIcon, className: styles.check }), _jsx(Icon, { glyph: minusIcon, className: styles.minus })] }) }), _jsxs("span", { className: labelClasses, children: [label || children, help && _jsx(ControlHelp, { children: help })] })] }));
|
|
57
46
|
}
|
|
58
47
|
}
|
|
@@ -25,7 +25,7 @@ export default class Code extends PureComponent<CodeProps> {
|
|
|
25
25
|
highlight(): Promise<void>;
|
|
26
26
|
get codeRef(): HTMLElement | null | undefined;
|
|
27
27
|
get initCodeRef(): import("react").RefObject<HTMLElement> | ((ref: HTMLElement | null) => void);
|
|
28
|
-
render(): import("react").JSX.Element;
|
|
28
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
}
|
|
30
30
|
declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
|
|
31
31
|
export { code, highlight };
|
package/components/code/code.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import highlight from 'highlight.js/lib/core';
|
|
@@ -68,14 +69,10 @@ export default class Code extends PureComponent {
|
|
|
68
69
|
[styles.inline]: inline,
|
|
69
70
|
[styles.softWrap]: softWrap,
|
|
70
71
|
});
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
tabIndex={inline ? -1 : 0} ref={this.initCodeRef} className={highlightStyles.highlightContainer}>
|
|
75
|
-
{normalizeIndent(code)}
|
|
76
|
-
</code>
|
|
77
|
-
</Tag>);
|
|
72
|
+
return (_jsx(Tag, { className: classes, "data-test": "ring-code", children: _jsx("code", {
|
|
73
|
+
// should be focusable because it can be scrollable
|
|
74
|
+
tabIndex: inline ? -1 : 0, ref: this.initCodeRef, className: highlightStyles.highlightContainer, children: normalizeIndent(code) }) }));
|
|
78
75
|
}
|
|
79
76
|
}
|
|
80
|
-
const code = trivialTemplateTag((source) =>
|
|
77
|
+
const code = trivialTemplateTag((source) => _jsx(Code, { code: source }));
|
|
81
78
|
export { code, highlight };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect, useRef, useContext, useMemo } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import dataTests from '../global/data-tests';
|
|
4
5
|
import { getRect } from '../global/dom';
|
|
@@ -70,11 +71,6 @@ export const CollapseContent = ({ children, minHeight = DEFAULT_HEIGHT, 'data-te
|
|
|
70
71
|
}, [duration, height, collapsed, minHeight]);
|
|
71
72
|
const fadeShouldBeVisible = useMemo(() => Boolean(minHeight && showFade), [minHeight, showFade]);
|
|
72
73
|
const shouldRenderContent = disableAnimation ? !collapsed : !shouldHideContent;
|
|
73
|
-
return (
|
|
74
|
-
<div ref={contentRef} data-test={dataTests(COLLAPSE_CONTENT_TEST_ID, dataTest)}>
|
|
75
|
-
{shouldRenderContent ? children : null}
|
|
76
|
-
</div>
|
|
77
|
-
{fadeShouldBeVisible && <div className={styles.fade}/>}
|
|
78
|
-
</div>);
|
|
74
|
+
return (_jsxs("div", { ref: containerRef, id: `collapse-content-${id}`, "data-test": dataTests(COLLAPSE_CONTENT_CONTAINER_TEST_ID), className: classNames(styles.container, { [styles.transition]: !disableAnimation }), style: style, children: [_jsx("div", { ref: contentRef, "data-test": dataTests(COLLAPSE_CONTENT_TEST_ID, dataTest), children: shouldRenderContent ? children : null }), fadeShouldBeVisible && _jsx("div", { className: styles.fade })] }));
|
|
79
75
|
};
|
|
80
76
|
export default CollapseContent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useMemo, useContext, cloneElement } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import dataTests from '../global/data-tests';
|
|
4
4
|
import { CollapseContext } from './collapse-context';
|
|
5
5
|
import { COLLAPSE_CONTROL_TEST_ID } from './consts';
|
|
@@ -14,12 +14,10 @@ export const CollapseControl = ({ children, 'data-test': dataTest }) => {
|
|
|
14
14
|
}
|
|
15
15
|
return children;
|
|
16
16
|
}, [children, collapsed]);
|
|
17
|
-
return (
|
|
18
|
-
{cloneElement(child, {
|
|
17
|
+
return (_jsx("p", { "data-test": dataTests(COLLAPSE_CONTROL_TEST_ID, dataTest), children: cloneElement(child, {
|
|
19
18
|
onClick: setCollapsed,
|
|
20
19
|
'aria-controls': `collapse-content-${id}`,
|
|
21
20
|
'aria-expanded': String(!collapsed),
|
|
22
|
-
})}
|
|
23
|
-
</p>);
|
|
21
|
+
}) }));
|
|
24
22
|
};
|
|
25
23
|
export default CollapseControl;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { useCallback, useId, useMemo, useState } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import { CollapseContext } from './collapse-context';
|
|
4
4
|
import { BASE_ANIMATION_DURATION } from './consts';
|
|
5
5
|
/**
|
|
@@ -13,16 +13,12 @@ export const Collapse = ({ children, duration = BASE_ANIMATION_DURATION, disable
|
|
|
13
13
|
setInnerCollapsed(!finalCollapsedValue);
|
|
14
14
|
onChange(!finalCollapsedValue);
|
|
15
15
|
}, [setInnerCollapsed, onChange, finalCollapsedValue]);
|
|
16
|
-
return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}}>
|
|
24
|
-
{children}
|
|
25
|
-
</CollapseContext.Provider>
|
|
26
|
-
</div>);
|
|
16
|
+
return (_jsx("div", { className: className, children: _jsx(CollapseContext.Provider, { value: {
|
|
17
|
+
collapsed: finalCollapsedValue,
|
|
18
|
+
setCollapsed,
|
|
19
|
+
duration,
|
|
20
|
+
disableAnimation,
|
|
21
|
+
id,
|
|
22
|
+
}, children: children }) }));
|
|
27
23
|
};
|
|
28
24
|
export default Collapse;
|
|
@@ -31,6 +31,6 @@ export default class Confirm extends PureComponent<ConfirmProps> {
|
|
|
31
31
|
onReject: () => void;
|
|
32
32
|
};
|
|
33
33
|
onEscPress: () => void;
|
|
34
|
-
render():
|
|
34
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
}
|
|
36
36
|
export type ConfirmAttributes = JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { PureComponent } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import Dialog from '../dialog/dialog';
|
|
4
4
|
import Button from '../button/button';
|
|
5
5
|
import { Content, Header } from '../island/island';
|
|
@@ -28,19 +28,6 @@ export default class Confirm extends PureComponent {
|
|
|
28
28
|
};
|
|
29
29
|
render() {
|
|
30
30
|
const { show, className, inProgress, cancelIsDefault, text, description, confirmLabel, rejectLabel, onConfirm, onReject, native, } = this.props;
|
|
31
|
-
return (
|
|
32
|
-
{text && <Header>{text}</Header>}
|
|
33
|
-
{description && (<Content>
|
|
34
|
-
<div className={styles.description}>{description}</div>
|
|
35
|
-
</Content>)}
|
|
36
|
-
<Panel>
|
|
37
|
-
<Button data-test="confirm-ok-button" primary={!cancelIsDefault} loader={inProgress} disabled={inProgress} onClick={onConfirm}>
|
|
38
|
-
{confirmLabel}
|
|
39
|
-
</Button>
|
|
40
|
-
<Button data-test="confirm-reject-button" onClick={onReject} disabled={inProgress} primary={cancelIsDefault}>
|
|
41
|
-
{rejectLabel}
|
|
42
|
-
</Button>
|
|
43
|
-
</Panel>
|
|
44
|
-
</Dialog>);
|
|
31
|
+
return (_jsxs(Dialog, { label: text || (typeof description === 'string' ? description : undefined), className: className, onEscPress: this.onEscPress, show: show, trapFocus: true, "data-test": "ring-confirm", native: native, children: [text && _jsx(Header, { children: text }), description && (_jsx(Content, { children: _jsx("div", { className: styles.description, children: description }) })), _jsxs(Panel, { children: [_jsx(Button, { "data-test": "confirm-ok-button", primary: !cancelIsDefault, loader: inProgress, disabled: inProgress, onClick: onConfirm, children: confirmLabel }), _jsx(Button, { "data-test": "confirm-reject-button", onClick: onReject, disabled: inProgress, primary: cancelIsDefault, children: rejectLabel })] })] }));
|
|
45
32
|
}
|
|
46
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createRoot } from 'react-dom/client';
|
|
2
3
|
import Confirm from '../confirm/confirm';
|
|
3
4
|
import { ControlsHeightContext, getGlobalControlsHeight } from '../global/controls-height';
|
|
@@ -8,9 +9,7 @@ export const reactRoot = createRoot(containerElement);
|
|
|
8
9
|
*/
|
|
9
10
|
function renderConfirm(props) {
|
|
10
11
|
const { buttonsHeight = getGlobalControlsHeight(), ...restProps } = props;
|
|
11
|
-
reactRoot.render(
|
|
12
|
-
<Confirm {...restProps}/>
|
|
13
|
-
</ControlsHeightContext.Provider>);
|
|
12
|
+
reactRoot.render(_jsx(ControlsHeightContext.Provider, { value: buttonsHeight, children: _jsx(Confirm, { ...restProps }) }));
|
|
14
13
|
}
|
|
15
14
|
export default function confirm({ text, description, confirmLabel = 'OK', rejectLabel = 'Cancel', cancelIsDefault, onBeforeConfirm, buttonsHeight, }) {
|
|
16
15
|
return new Promise((resolve, reject) => {
|
|
@@ -14,6 +14,6 @@ export default class ContentLayout extends Component<ContentLayoutProps> {
|
|
|
14
14
|
contentNode: null;
|
|
15
15
|
};
|
|
16
16
|
saveContentNode: (contentNode: HTMLElement | null) => void;
|
|
17
|
-
render(): import("react").JSX.Element;
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export { default as Sidebar } from './sidebar';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Children, cloneElement, Component } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Sidebar from './sidebar';
|
|
@@ -28,12 +29,7 @@ export default class ContentLayout extends Component {
|
|
|
28
29
|
contentNode: this.state.contentNode,
|
|
29
30
|
});
|
|
30
31
|
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
31
|
-
return (
|
|
32
|
-
{sidebar}
|
|
33
|
-
<main className={contentClasses} ref={this.saveContentNode}>
|
|
34
|
-
{contentChildren}
|
|
35
|
-
</main>
|
|
36
|
-
</div>);
|
|
32
|
+
return (_jsxs("div", { "data-test": "content-layout", ...restProps, className: classes, children: [sidebar, _jsx("main", { className: contentClasses, ref: this.saveContentNode, children: contentChildren })] }));
|
|
37
33
|
}
|
|
38
34
|
}
|
|
39
35
|
export { default as Sidebar } from './sidebar';
|
|
@@ -18,5 +18,5 @@ export default class Sidebar extends Component<SidebarProps> {
|
|
|
18
18
|
shouldUseFixation(): boolean;
|
|
19
19
|
shouldFixateBottom(): boolean;
|
|
20
20
|
sidebarRef: (node: HTMLElement | null) => void;
|
|
21
|
-
render(): import("react").JSX.Element;
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { Waypoint } from 'react-waypoint';
|
|
@@ -52,16 +53,6 @@ export default class Sidebar extends Component {
|
|
|
52
53
|
const style = {
|
|
53
54
|
maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined,
|
|
54
55
|
};
|
|
55
|
-
return (
|
|
56
|
-
<Waypoint onEnter={this.handleTopWaypoint} onLeave={this.handleTopWaypoint}/>
|
|
57
|
-
|
|
58
|
-
<div {...restProps} style={style} className={classes}>
|
|
59
|
-
{children}
|
|
60
|
-
</div>
|
|
61
|
-
|
|
62
|
-
<div className={styles.bottomMarker}>
|
|
63
|
-
<Waypoint onEnter={this.handleBottomWaypoint} onLeave={this.handleBottomWaypoint}/>
|
|
64
|
-
</div>
|
|
65
|
-
</aside>);
|
|
56
|
+
return (_jsxs("aside", { className: containerClasses, ref: this.sidebarRef, children: [_jsx(Waypoint, { onEnter: this.handleTopWaypoint, onLeave: this.handleTopWaypoint }), _jsx("div", { ...restProps, style: style, className: classes, children: children }), _jsx("div", { className: styles.bottomMarker, children: _jsx(Waypoint, { onEnter: this.handleBottomWaypoint, onLeave: this.handleBottomWaypoint }) })] }));
|
|
66
57
|
}
|
|
67
58
|
}
|
|
@@ -18,9 +18,9 @@ declare class ContentEditableBase extends Component<ContentEditableBaseProps> {
|
|
|
18
18
|
};
|
|
19
19
|
shouldComponentUpdate(nextProps: ContentEditableBaseProps): boolean;
|
|
20
20
|
componentDidUpdate(prevProps: ContentEditableBaseProps): void;
|
|
21
|
-
render(): import("react").JSX.Element;
|
|
21
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
}
|
|
23
23
|
type ContentEditableBaseAttrs = JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
|
|
24
24
|
export type ContentEditableProps = Omit<ContentEditableBaseAttrs, '__html'>;
|
|
25
|
-
declare const ContentEditable: ({ children, ...props }: ContentEditableProps) => import("react").JSX.Element;
|
|
25
|
+
declare const ContentEditable: ({ children, ...props }: ContentEditableProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export default ContentEditable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
3
4
|
/**
|
|
@@ -19,11 +20,11 @@ class ContentEditableBase extends Component {
|
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
22
|
const { __html, onComponentUpdate, disabled, tabIndex, inputRef, ...props } = this.props;
|
|
22
|
-
return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
return (_jsx("div", { ...props, ref: inputRef,
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
disabled: disabled, role: "textbox", tabIndex: disabled ? undefined : tabIndex, contentEditable: !this.props.disabled, dangerouslySetInnerHTML: { __html } }));
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
const ContentEditable = ({ children, ...props }) => (
|
|
29
|
+
const ContentEditable = ({ children, ...props }) => (_jsx(ContentEditableBase, { ...props, __html: renderToStaticMarkup(children) }));
|
|
29
30
|
export default ContentEditable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
type ControlHelpProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
export default function ControlHelp({ className, ...restProps }: ControlHelpProps): import("react").JSX.Element;
|
|
3
|
+
export default function ControlHelp({ className, ...restProps }: ControlHelpProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import styles from './control-help.css';
|
|
3
4
|
export default function ControlHelp({ className, ...restProps }) {
|
|
4
|
-
return
|
|
5
|
+
return _jsx("div", { className: classNames(className, styles.help), ...restProps });
|
|
5
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import styles from './control-label.css';
|
|
4
4
|
export var LabelType;
|
|
@@ -10,9 +10,7 @@ const classNameByType = {
|
|
|
10
10
|
[LabelType.SECONDARY]: styles.secondaryLabel,
|
|
11
11
|
[LabelType.FORM]: styles.formLabel,
|
|
12
12
|
};
|
|
13
|
-
export const ControlLabel = ({ children, type = LabelType.SECONDARY, disabled, ...rest }) => (
|
|
13
|
+
export const ControlLabel = ({ children, type = LabelType.SECONDARY, disabled, ...rest }) => (_jsx("label", { className: classNames(styles.label, classNameByType[type], {
|
|
14
14
|
[styles.disabledLabel]: disabled,
|
|
15
|
-
})
|
|
16
|
-
{children}
|
|
17
|
-
</label>);
|
|
15
|
+
}), ...rest, children: children }));
|
|
18
16
|
export default ControlLabel;
|
|
@@ -29,7 +29,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
29
29
|
componentWillUnmount(): void;
|
|
30
30
|
onMouseMove: () => void;
|
|
31
31
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
32
|
-
render(): import("react").JSX.Element;
|
|
32
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
context: unknown;
|
|
34
34
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
35
35
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -56,7 +56,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
56
56
|
componentWillUnmount(): void;
|
|
57
57
|
onMouseMove: () => void;
|
|
58
58
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
59
|
-
render(): import("react").JSX.Element;
|
|
59
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
60
60
|
context: unknown;
|
|
61
61
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
62
62
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -78,6 +78,6 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
78
78
|
defaultProps: Partial<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>> | undefined;
|
|
79
79
|
contextType?: import("react").Context<any> | undefined;
|
|
80
80
|
};
|
|
81
|
-
render(): import("react").JSX.Element;
|
|
81
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
}
|
|
83
83
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
* @name Data List
|
|
3
4
|
*/
|
|
@@ -66,22 +67,12 @@ class DataList extends PureComponent {
|
|
|
66
67
|
[styles.disabledHover]: disabledHover,
|
|
67
68
|
[styles.multiSelection]: selection.getSelected().size > 0,
|
|
68
69
|
});
|
|
69
|
-
return (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const { id, key, title, items } = item;
|
|
76
|
-
const showMoreLessButton = this.props.itemMoreLessState?.(item);
|
|
77
|
-
return (<Item key={key || id} item={model} title={title} items={items} itemFormatter={itemFormatter} collapsible={item.collapsible} collapsed={item.collapsed} onCollapse={item.onCollapse} onExpand={item.onExpand} showFocus={selection.isFocused(model)} onFocus={this.onItemFocus} selection={selection} selectable={item.selectable} selected={selection.isSelected(model)} onSelect={this.onItemSelect} showMoreLessButton={showMoreLessButton} onItemMoreLess={this.props.onItemMoreLess}/>);
|
|
78
|
-
})}
|
|
79
|
-
</ul>
|
|
80
|
-
|
|
81
|
-
{loading && (<div className={data.length > 0 ? styles.loadingOverlay : undefined}>
|
|
82
|
-
<Loader />
|
|
83
|
-
</div>)}
|
|
84
|
-
</div>);
|
|
70
|
+
return (_jsxs("div", { className: styles.dataListWrapper, "data-test": "ring-data-list", ref: innerRef, children: [focused && _jsx(Shortcuts, { map: shortcutsMap, scope: this.shortcutsScope }), _jsx("ul", { className: classes, children: data.map(model => {
|
|
71
|
+
const item = itemFormatter(model);
|
|
72
|
+
const { id, key, title, items } = item;
|
|
73
|
+
const showMoreLessButton = this.props.itemMoreLessState?.(item);
|
|
74
|
+
return (_jsx(Item, { item: model, title: title, items: items, itemFormatter: itemFormatter, collapsible: item.collapsible, collapsed: item.collapsed, onCollapse: item.onCollapse, onExpand: item.onExpand, showFocus: selection.isFocused(model), onFocus: this.onItemFocus, selection: selection, selectable: item.selectable, selected: selection.isSelected(model), onSelect: this.onItemSelect, showMoreLessButton: showMoreLessButton, onItemMoreLess: this.props.onItemMoreLess }, key || id));
|
|
75
|
+
}) }), loading && (_jsx("div", { className: data.length > 0 ? styles.loadingOverlay : undefined, children: _jsx(Loader, {}) }))] }));
|
|
85
76
|
}
|
|
86
77
|
}
|
|
87
78
|
const getContainer = () => disableHoverHOC(selectionShortcutsHOC(focusSensorHOC(DataList)));
|
|
@@ -90,6 +81,6 @@ export default class DataListContainer extends Component {
|
|
|
90
81
|
// https://stackoverflow.com/a/53882322/6304152
|
|
91
82
|
DataList = getContainer();
|
|
92
83
|
render() {
|
|
93
|
-
return
|
|
84
|
+
return _jsx(this.DataList, { ...this.props });
|
|
94
85
|
}
|
|
95
86
|
}
|