@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,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as _createElement } from "react";
|
|
1
3
|
import { useEffect, useMemo, useRef } from 'react';
|
|
2
4
|
import { addMonths } from 'date-fns/addMonths';
|
|
3
5
|
import { getDay } from 'date-fns/getDay';
|
|
@@ -81,12 +83,7 @@ export default function Months(props) {
|
|
|
81
83
|
}
|
|
82
84
|
};
|
|
83
85
|
}, [handleWheel]);
|
|
84
|
-
return (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}} className={styles.days}>
|
|
88
|
-
{months.map(date => (<Month {...props} month={date} key={+date}/>))}
|
|
89
|
-
</div>
|
|
90
|
-
<MonthNames {...props}/>
|
|
91
|
-
</div>);
|
|
86
|
+
return (_jsxs("div", { className: styles.months, ref: componentRef, children: [_jsx("div", { style: {
|
|
87
|
+
top: Math.floor(calHeight * HALF - monthHeight(months[0]) - monthHeight(months[1]) + offset),
|
|
88
|
+
}, className: styles.days, children: months.map(date => (_createElement(Month, { ...props, month: date, key: +date }))) }), _jsx(MonthNames, { ...props })] }));
|
|
92
89
|
}
|
|
@@ -2,5 +2,5 @@ import type { Locale } from 'date-fns';
|
|
|
2
2
|
interface WeekdaysProps {
|
|
3
3
|
locale: Locale | undefined;
|
|
4
4
|
}
|
|
5
|
-
export default function Weekdays(props: WeekdaysProps): import("react").JSX.Element;
|
|
5
|
+
export default function Weekdays(props: WeekdaysProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import classNames from 'classnames';
|
|
2
3
|
import { getDay } from 'date-fns/getDay';
|
|
3
4
|
import { format } from 'date-fns/format';
|
|
@@ -8,11 +9,7 @@ import styles from './date-picker.css';
|
|
|
8
9
|
export default function Weekdays(props) {
|
|
9
10
|
const days = shiftWeekArray(Object.values(weekdays), getWeekStartsOn(props.locale)).map(value => startOfDay(setDay(new Date(), value)));
|
|
10
11
|
const { locale } = props;
|
|
11
|
-
return (
|
|
12
|
-
{days.map(day => (<span className={classNames(styles.weekday, {
|
|
12
|
+
return (_jsx("div", { className: styles.weekdays, children: days.map(day => (_jsx("span", { className: classNames(styles.weekday, {
|
|
13
13
|
[styles.weekend]: [weekdays.SA, weekdays.SU].includes(getDay(day)),
|
|
14
|
-
})}
|
|
15
|
-
{format(day, 'EEEEEE', { locale })}
|
|
16
|
-
</span>))}
|
|
17
|
-
</div>);
|
|
14
|
+
}), children: format(day, 'EEEEEE', { locale }) }, +day))) }));
|
|
18
15
|
}
|
|
@@ -14,6 +14,6 @@ export default class Years extends PureComponent<CalendarProps> {
|
|
|
14
14
|
setYear(date: number): void;
|
|
15
15
|
componentRef: import("react").RefObject<HTMLDivElement>;
|
|
16
16
|
handleWheel: (e: WheelEvent) => void;
|
|
17
|
-
render(): import("react").JSX.Element;
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createRef, PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { addYears } from 'date-fns/addYears';
|
|
@@ -64,18 +65,14 @@ export default class Years extends PureComponent {
|
|
|
64
65
|
years.push(year);
|
|
65
66
|
}
|
|
66
67
|
const pxToDate = linearFunction(0, Number(years[0]), yearDuration / yearHeight);
|
|
67
|
-
return (
|
|
68
|
+
return (_jsx("div", { className: styles.years, ref: this.componentRef, style: {
|
|
68
69
|
transition: this.stoppedScrolling ? 'top .2s ease-out 0s' : 'none',
|
|
69
70
|
top: Math.floor(calHeight * HALF - pxToDate.x(Number(date))),
|
|
70
|
-
}
|
|
71
|
-
{years.map(item => (<button type="button" key={+item} className={classNames(styles.year, {
|
|
71
|
+
}, children: years.map(item => (_jsx("button", { type: "button", className: classNames(styles.year, {
|
|
72
72
|
[styles.currentYear]: isSameYear(item, date),
|
|
73
73
|
[styles.today]: isThisYear(item),
|
|
74
|
-
})
|
|
74
|
+
}), onClick: function handleClick() {
|
|
75
75
|
onScrollChange(Number(setYear(scrollDate, getYear(item))));
|
|
76
|
-
}}
|
|
77
|
-
{format(item, 'yyyy')}
|
|
78
|
-
</button>))}
|
|
79
|
-
</div>);
|
|
76
|
+
}, children: format(item, 'yyyy') }, +item))) }));
|
|
80
77
|
}
|
|
81
78
|
}
|
|
@@ -45,6 +45,6 @@ export default class Dialog extends PureComponent<DialogProps> {
|
|
|
45
45
|
dialog?: HTMLElement | null;
|
|
46
46
|
dialogRef: (tabTrap: TabTrap | null) => void;
|
|
47
47
|
nativeDialog: React.RefObject<HTMLDialogElement>;
|
|
48
|
-
render(): false |
|
|
48
|
+
render(): false | import("react/jsx-runtime").JSX.Element;
|
|
49
49
|
}
|
|
50
50
|
export type DialogAttrs = JSX.LibraryManagedAttributes<typeof Dialog, DialogProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { createRef, PureComponent } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import closeIcon from '@jetbrains/icons/close';
|
|
@@ -111,40 +111,19 @@ export default class Dialog extends PureComponent {
|
|
|
111
111
|
const { show, showCloseButton, onOverlayClick, onCloseAttempt, onEscPress, onCloseClick, children, className, contentClassName, trapFocus, 'data-test': dataTest, closeButtonInside, portalTarget, label, closeButtonTitle, dense, shortcutOptions, native, modal, preventBodyScroll, ...restProps } = this.props;
|
|
112
112
|
const classes = classNames(styles.container, className);
|
|
113
113
|
const shortcutsMap = this.getShortcutsMap();
|
|
114
|
-
const content = (
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
[styles.closeButtonOutside]: !closeButtonInside,
|
|
124
|
-
[styles.closeButtonInside]: closeButtonInside,
|
|
125
|
-
})} iconClassName={classNames(styles.closeIcon, {
|
|
126
|
-
[styles.closeIconOutside]: !closeButtonInside,
|
|
127
|
-
[styles.closeIconInside]: closeButtonInside,
|
|
128
|
-
})} onClick={this.onCloseClick} title={closeButtonTitle} aria-label={closeButtonTitle || 'close dialog'}/>)}
|
|
129
|
-
</AdaptiveIsland>
|
|
130
|
-
</div>
|
|
131
|
-
</>);
|
|
114
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(Shortcuts, { map: shortcutsMap, scope: this.state.shortcutsScope, options: this.props.shortcutOptions }), (onOverlayClick !== noop || onCloseAttempt !== noop) && (_jsx("div", {
|
|
115
|
+
// click handler is duplicated in close button
|
|
116
|
+
role: "presentation", className: styles.clickableOverlay, onClick: this.handleClick, "data-test": "ring-dialog-overlay" })), _jsx("div", { className: styles.innerContainer, children: _jsxs(AdaptiveIsland, { className: classNames(styles.content, contentClassName, { [styles.dense]: dense }), "data-test": "ring-dialog", role: "dialog", "aria-label": label, children: [children, showCloseButton && (_jsx(Button, { icon: closeIcon, "data-test": "ring-dialog-close-button", className: classNames(styles.closeButton, {
|
|
117
|
+
[styles.closeButtonOutside]: !closeButtonInside,
|
|
118
|
+
[styles.closeButtonInside]: closeButtonInside,
|
|
119
|
+
}), iconClassName: classNames(styles.closeIcon, {
|
|
120
|
+
[styles.closeIconOutside]: !closeButtonInside,
|
|
121
|
+
[styles.closeIconInside]: closeButtonInside,
|
|
122
|
+
}), onClick: this.onCloseClick, title: closeButtonTitle, "aria-label": closeButtonTitle || 'close dialog' }))] }) })] }));
|
|
132
123
|
if (native) {
|
|
133
|
-
return (
|
|
134
|
-
<PopupTarget id={this.uid} className={styles.popupTarget}>
|
|
135
|
-
{target => (<>
|
|
136
|
-
{content}
|
|
137
|
-
{target}
|
|
138
|
-
</>)}
|
|
139
|
-
</PopupTarget>
|
|
140
|
-
</dialog>);
|
|
124
|
+
return (_jsx("dialog", { className: classNames(styles.nativeDialog, className), ref: this.nativeDialog, children: _jsx(PopupTarget, { id: this.uid, className: styles.popupTarget, children: target => (_jsxs(_Fragment, { children: [content, target] })) }) }));
|
|
141
125
|
}
|
|
142
126
|
return (show &&
|
|
143
|
-
createPortal(
|
|
144
|
-
{target => (<TabTrap trapDisabled={!trapFocus} data-test={dataTests('ring-dialog-container', dataTest)} ref={this.dialogRef} className={classes} role="presentation" {...restProps}>
|
|
145
|
-
{content}
|
|
146
|
-
{target}
|
|
147
|
-
</TabTrap>)}
|
|
148
|
-
</PopupTarget>, portalTarget instanceof HTMLElement ? portalTarget : document.body));
|
|
127
|
+
createPortal(_jsx(PopupTarget, { id: this.uid, className: styles.popupTarget, children: target => (_jsxs(TabTrap, { trapDisabled: !trapFocus, "data-test": dataTests('ring-dialog-container', dataTest), ref: this.dialogRef, className: classes, role: "presentation", ...restProps, children: [content, target] })) }), portalTarget instanceof HTMLElement ? portalTarget : document.body));
|
|
149
128
|
}
|
|
150
129
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ButtonAttrs } from '../button/button';
|
|
2
|
-
declare const _default: import("react").MemoExoticComponent<({ children, className, ...restProps }: ButtonAttrs) => import("react").JSX.Element>;
|
|
2
|
+
declare const _default: import("react").MemoExoticComponent<({ children, className, ...restProps }: ButtonAttrs) => import("react/jsx-runtime").JSX.Element>;
|
|
3
3
|
export default _default;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { memo } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Button from '../button/button';
|
|
4
5
|
import styles from './dropdown.css';
|
|
5
|
-
const Anchor = ({ children, className, ...restProps }) => (
|
|
6
|
-
{children}
|
|
7
|
-
</Button>);
|
|
6
|
+
const Anchor = ({ children, className, ...restProps }) => (_jsx(Button, { "data-test-ring-dropdown-anchor": true, inline: true, dropdown: true, className: classNames(styles.anchor, className), ...restProps, children: children }));
|
|
8
7
|
export default memo(Anchor);
|
|
@@ -64,7 +64,7 @@ export default class Dropdown extends Component<DropdownProps, DropdownState> {
|
|
|
64
64
|
toggle(show?: boolean): void;
|
|
65
65
|
_toggle(show: boolean, pinned?: boolean): void;
|
|
66
66
|
_clearTimer(): void;
|
|
67
|
-
render():
|
|
67
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
68
68
|
}
|
|
69
69
|
export type DropdownAttrs = JSX.LibraryManagedAttributes<typeof Dropdown, DropdownProps>;
|
|
70
70
|
export { Anchor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { cloneElement, Component } from 'react';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import dataTests from '../global/data-tests';
|
|
5
5
|
import { isArray } from '../global/typescript-utils';
|
|
@@ -105,7 +105,7 @@ export default class Dropdown extends Component {
|
|
|
105
105
|
const active = hoverMode ? pinned : show;
|
|
106
106
|
switch (typeof anchor) {
|
|
107
107
|
case 'string':
|
|
108
|
-
anchorElement =
|
|
108
|
+
anchorElement = _jsx(Anchor, { active: active, children: anchor });
|
|
109
109
|
break;
|
|
110
110
|
case 'function':
|
|
111
111
|
anchorElement = anchor({ active: show, pinned });
|
|
@@ -125,14 +125,11 @@ export default class Dropdown extends Component {
|
|
|
125
125
|
onContextMenu: hoverMode ? this.handlePopupInteraction : undefined,
|
|
126
126
|
dontCloseOnAnchorClick: true,
|
|
127
127
|
};
|
|
128
|
-
return (
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
? children(childProps)
|
|
134
|
-
: cloneElement(children, childProps)}
|
|
135
|
-
</div>);
|
|
128
|
+
return (_jsxs("div", { "data-test": dataTests('ring-dropdown', dataTest), ...restProps, onClick: clickMode ? this.onClick : undefined,
|
|
129
|
+
// anchorElement should be a `button` or an `a`
|
|
130
|
+
role: "presentation", onMouseEnter: hoverMode ? this.onMouseEnter : undefined, onMouseLeave: hoverMode ? this.onMouseLeave : undefined, className: classes, children: [anchorElement, typeof children === 'function'
|
|
131
|
+
? children(childProps)
|
|
132
|
+
: cloneElement(children, childProps)] }));
|
|
136
133
|
}
|
|
137
134
|
}
|
|
138
135
|
export { Anchor };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { forwardRef, useMemo, cloneElement, } from 'react';
|
|
2
3
|
import List, { ActiveItemContext } from '../list/list';
|
|
3
4
|
import Dropdown from '../dropdown/dropdown';
|
|
@@ -15,7 +16,7 @@ function DropdownAnchorWrapper({ anchor, pinned, active, activeListItemId, listI
|
|
|
15
16
|
const anchorProps = useMemo(() => ({ active, pinned, ...restProps, ...anchorAriaProps }), [pinned, active, restProps, anchorAriaProps]);
|
|
16
17
|
const anchorComponentProps = useMemo(() => ({ ...anchorProps, pinned: `${anchorProps.pinned}` }), [anchorProps]);
|
|
17
18
|
if (typeof anchor === 'string') {
|
|
18
|
-
return
|
|
19
|
+
return _jsx(Anchor, { ...anchorComponentProps, children: anchor });
|
|
19
20
|
}
|
|
20
21
|
if (typeof anchor === 'function') {
|
|
21
22
|
return anchor({ active, pinned, ...restProps }, anchorAriaProps);
|
|
@@ -23,16 +24,10 @@ function DropdownAnchorWrapper({ anchor, pinned, active, activeListItemId, listI
|
|
|
23
24
|
if (!isArray(anchor)) {
|
|
24
25
|
return cloneElement(anchor, typeof anchor.type === 'string' ? anchorAriaProps : anchorComponentProps);
|
|
25
26
|
}
|
|
26
|
-
return
|
|
27
|
+
return _jsx("div", { ...anchorAriaProps, children: anchor });
|
|
27
28
|
}
|
|
28
29
|
const DropdownMenu = forwardRef(function DropdownMenu({ id, anchor, ariaLabel, data, onSelect, menuProps, ...restDropdownProps }, forwardedRef) {
|
|
29
30
|
const listId = useMemo(() => id || getUID('dropdown-menu-list'), [id]);
|
|
30
|
-
return (
|
|
31
|
-
<Dropdown anchor={({ pinned, active, ...restAnchorProps }) => (<ActiveItemContext.ValueContext.Consumer>
|
|
32
|
-
{activeItemId => (<DropdownAnchorWrapper anchor={anchor} pinned={pinned} active={active} activeListItemId={activeItemId} listId={listId} {...restAnchorProps}/>)}
|
|
33
|
-
</ActiveItemContext.ValueContext.Consumer>)} {...restDropdownProps}>
|
|
34
|
-
<PopupMenu ref={forwardedRef} id={listId} ariaLabel={ariaLabel || defaultAriaLabel} closeOnSelect activateFirstItem data={data} onSelect={onSelect} {...menuProps}/>
|
|
35
|
-
</Dropdown>
|
|
36
|
-
</ActiveItemContext.Provider>);
|
|
31
|
+
return (_jsx(ActiveItemContext.Provider, { children: _jsx(Dropdown, { anchor: ({ pinned, active, ...restAnchorProps }) => (_jsx(ActiveItemContext.ValueContext.Consumer, { children: activeItemId => (_jsx(DropdownAnchorWrapper, { anchor: anchor, pinned: pinned, active: active, activeListItemId: activeItemId, listId: listId, ...restAnchorProps })) })), ...restDropdownProps, children: _jsx(PopupMenu, { ref: forwardedRef, id: listId, ariaLabel: ariaLabel || defaultAriaLabel, closeOnSelect: true, activateFirstItem: true, data: data, onSelect: onSelect, ...menuProps }) }) }));
|
|
37
32
|
});
|
|
38
33
|
export default Object.assign(DropdownMenu, { ListProps: List.ListProps });
|
|
@@ -28,6 +28,6 @@ export type EditableHeadingProps = Omit<InputHTMLAttributes<HTMLInputElement | H
|
|
|
28
28
|
renderMenu?: () => React.ReactNode;
|
|
29
29
|
translations?: EditableHeadingTranslations;
|
|
30
30
|
};
|
|
31
|
-
export declare const EditableHeading: (props: EditableHeadingProps) =>
|
|
32
|
-
declare const _default: React.MemoExoticComponent<(props: EditableHeadingProps) =>
|
|
31
|
+
export declare const EditableHeading: (props: EditableHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare const _default: React.MemoExoticComponent<(props: EditableHeadingProps) => import("react/jsx-runtime").JSX.Element>;
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import { useCallback, useEffect } from 'react';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
@@ -110,35 +111,6 @@ export const EditableHeading = (props) => {
|
|
|
110
111
|
window.removeEventListener('mouseup', onMouseUp);
|
|
111
112
|
};
|
|
112
113
|
}, [onMouseMove, onMouseUp]);
|
|
113
|
-
return (
|
|
114
|
-
<div className={classes}>
|
|
115
|
-
{!disabled && isEditing ? (<>
|
|
116
|
-
<Shortcuts map={shortcutsMap} scope={shortcutsScope} disabled={isShortcutsDisabled}/>
|
|
117
|
-
|
|
118
|
-
{!multiline ? (<input className={inputClasses} value={children} autoFocus={autoFocus} data-test={dataTest} disabled={isSaving} onChange={onChange} {...restProps} onFocus={onInputFocus} onBlur={onInputBlur}/>) : (<div className={classNames(styles.textareaWrapper, inputStyles[`size${size}`])}>
|
|
119
|
-
<textarea ref={textAreaRef} className={inputClasses} value={children} autoFocus={autoFocus} data-test={dataTest} disabled={isSaving} onChange={onInputChange} {...restProps} onFocus={onInputFocus} onBlur={onInputBlur} onScroll={onInputScroll} style={{ maxHeight: maxInputRows ? `${maxInputRows}lh` : '' }}/>
|
|
120
|
-
{!isScrolledToBottom && <div className={styles.textareaFade}/>}
|
|
121
|
-
</div>)}
|
|
122
|
-
</>) : (<button type="button" className={styles.headingWrapperButton} onMouseDown={onHeadingMouseDown}>
|
|
123
|
-
<Heading className={headingClasses} level={level} data-test={dataTest}>
|
|
124
|
-
{children}
|
|
125
|
-
</Heading>
|
|
126
|
-
</button>)}
|
|
127
|
-
|
|
128
|
-
{!isEditing && renderMenu()}
|
|
129
|
-
|
|
130
|
-
{isEditing && !embedded && (<>
|
|
131
|
-
<Button className={styles.button} primary disabled={isSaveDisabled} loader={isSaving} onClick={onSave}>
|
|
132
|
-
{translations.save}
|
|
133
|
-
</Button>
|
|
134
|
-
|
|
135
|
-
<Button className={styles.button} disabled={isCancelDisabled} onClick={onCancel}>
|
|
136
|
-
{translations.cancel}
|
|
137
|
-
</Button>
|
|
138
|
-
</>)}
|
|
139
|
-
</div>
|
|
140
|
-
|
|
141
|
-
{isEditing && error && <div className={classNames(styles.errorText, inputStyles[`size${size}`])}>{error}</div>}
|
|
142
|
-
</>);
|
|
114
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classes, children: [!disabled && isEditing ? (_jsxs(_Fragment, { children: [_jsx(Shortcuts, { map: shortcutsMap, scope: shortcutsScope, disabled: isShortcutsDisabled }), !multiline ? (_jsx("input", { className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur })) : (_jsxs("div", { className: classNames(styles.textareaWrapper, inputStyles[`size${size}`]), children: [_jsx("textarea", { ref: textAreaRef, className: inputClasses, value: children, autoFocus: autoFocus, "data-test": dataTest, disabled: isSaving, onChange: onInputChange, ...restProps, onFocus: onInputFocus, onBlur: onInputBlur, onScroll: onInputScroll, style: { maxHeight: maxInputRows ? `${maxInputRows}lh` : '' } }), !isScrolledToBottom && _jsx("div", { className: styles.textareaFade })] }))] })) : (_jsx("button", { type: "button", className: styles.headingWrapperButton, onMouseDown: onHeadingMouseDown, children: _jsx(Heading, { className: headingClasses, level: level, "data-test": dataTest, children: children }) })), !isEditing && renderMenu(), isEditing && !embedded && (_jsxs(_Fragment, { children: [_jsx(Button, { className: styles.button, primary: true, disabled: isSaveDisabled, loader: isSaving, onClick: onSave, children: translations.save }), _jsx(Button, { className: styles.button, disabled: isCancelDisabled, onClick: onCancel, children: translations.cancel })] }))] }), isEditing && error && _jsx("div", { className: classNames(styles.errorText, inputStyles[`size${size}`]), children: error })] }));
|
|
143
115
|
};
|
|
144
116
|
export default React.memo(EditableHeading);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Children, cloneElement, PureComponent } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import Popup from '../popup/popup';
|
|
@@ -10,13 +11,6 @@ export default class ErrorBubble extends PureComponent {
|
|
|
10
11
|
render() {
|
|
11
12
|
const { children, className, ...restProps } = this.props;
|
|
12
13
|
const errorBubbleClasses = classNames(styles.errorBubble, className);
|
|
13
|
-
return (
|
|
14
|
-
{Children.map(children, (child) => cloneElement(child, { ...child.props, ...restProps }))}
|
|
15
|
-
{restProps.error && (<Popup trapFocus={false} className={styles.errorBubblePopup} hidden={false} attached={false} directions={[Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP]}>
|
|
16
|
-
<div className={errorBubbleClasses} data-test="ring-error-bubble">
|
|
17
|
-
{restProps.error}
|
|
18
|
-
</div>
|
|
19
|
-
</Popup>)}
|
|
20
|
-
</div>);
|
|
14
|
+
return (_jsxs("div", { className: styles.errorBubbleWrapper, "data-test": "ring-error-bubble-wrapper", children: [Children.map(children, (child) => cloneElement(child, { ...child.props, ...restProps })), restProps.error && (_jsx(Popup, { trapFocus: false, className: styles.errorBubblePopup, hidden: false, attached: false, directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP], children: _jsx("div", { className: errorBubbleClasses, "data-test": "ring-error-bubble", children: restProps.error }) }))] }));
|
|
21
15
|
}
|
|
22
16
|
}
|
|
@@ -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 Icon from '../icon/icon';
|
|
@@ -11,15 +12,6 @@ export default class ErrorMessage extends Component {
|
|
|
11
12
|
render() {
|
|
12
13
|
const { className, icon, code, message, description, children, 'data-test': dataTest } = this.props;
|
|
13
14
|
const classes = classNames(styles.errorMessage, className);
|
|
14
|
-
return (
|
|
15
|
-
{icon && <Icon className={styles.icon} glyph={icon} size={Size.Size64} suppressSizeWarning/>}
|
|
16
|
-
<div className={styles.content}>
|
|
17
|
-
<div className={styles.title} data-test="ring-error-message-title">
|
|
18
|
-
{code && `${code}:`} {message}
|
|
19
|
-
</div>
|
|
20
|
-
{description && <div className={styles.description}>{description}</div>}
|
|
21
|
-
{children}
|
|
22
|
-
</div>
|
|
23
|
-
</div>);
|
|
15
|
+
return (_jsxs("div", { className: classes, "data-test": dataTests('ring-error-message', dataTest), children: [icon && _jsx(Icon, { className: styles.icon, glyph: icon, size: Size.Size64, suppressSizeWarning: true }), _jsxs("div", { className: styles.content, children: [_jsxs("div", { className: styles.title, "data-test": "ring-error-message-title", children: [code && `${code}:`, " ", message] }), description && _jsx("div", { className: styles.description, children: description }), children] })] }));
|
|
24
16
|
}
|
|
25
17
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
/**
|
|
2
3
|
* @name Footer
|
|
3
4
|
*/
|
|
@@ -11,9 +12,7 @@ const FooterColumn = memo(function FooterColumn({ position, children }) {
|
|
|
11
12
|
[styles.columnCenter]: position === 'center',
|
|
12
13
|
[styles.columnRight]: position === 'right',
|
|
13
14
|
});
|
|
14
|
-
return (
|
|
15
|
-
<ul className={styles.columnItem}>{children}</ul>
|
|
16
|
-
</div>);
|
|
15
|
+
return (_jsx("div", { className: classes, children: _jsx("ul", { className: styles.columnItem, children: children }) }));
|
|
17
16
|
});
|
|
18
17
|
/**
|
|
19
18
|
* Return copyright string
|
|
@@ -45,30 +44,24 @@ const FooterLine = memo(function FooterLine(props) {
|
|
|
45
44
|
}
|
|
46
45
|
const element = (item.copyright ? copyright(item.copyright) : '') + (item.label || item);
|
|
47
46
|
if (item.url) {
|
|
48
|
-
return (
|
|
49
|
-
{element}
|
|
50
|
-
</Link>);
|
|
47
|
+
return (_jsx(Link, { href: item.url, target: item.target, title: item.title, children: element }, item.url + item.title));
|
|
51
48
|
}
|
|
52
49
|
return element;
|
|
53
50
|
}
|
|
54
|
-
return
|
|
51
|
+
return _jsx("li", { className: styles.line, children: items.map(renderItem) });
|
|
55
52
|
});
|
|
56
53
|
const Footer = memo(function Footer({ floating, className, left, center, right }) {
|
|
57
54
|
function content(elements, position) {
|
|
58
55
|
if (!elements) {
|
|
59
56
|
return false;
|
|
60
57
|
}
|
|
61
|
-
return (
|
|
62
|
-
{elements.map((item, idx) => (<FooterLine
|
|
58
|
+
return (_jsx(FooterColumn, { position: position, children: elements.map((item, idx) => (_jsx(FooterLine
|
|
63
59
|
// eslint-disable-next-line react/no-array-index-key
|
|
64
|
-
|
|
65
|
-
</FooterColumn>);
|
|
60
|
+
, { item: item }, idx))) }, position));
|
|
66
61
|
}
|
|
67
62
|
const classes = classNames(styles.footer, className, {
|
|
68
63
|
[styles.footerFloating]: floating,
|
|
69
64
|
});
|
|
70
|
-
return (
|
|
71
|
-
{[content(left, 'left'), content(center, 'center'), content(right, 'right')]}
|
|
72
|
-
</footer>);
|
|
65
|
+
return (_jsx("footer", { className: classes, "data-test": "ring-footer", children: [content(left, 'left'), content(center, 'center'), content(right, 'right')] }));
|
|
73
66
|
});
|
|
74
67
|
export default Footer;
|
|
@@ -11,7 +11,7 @@ export default function createStatefulContext<T>(initialValue: T, name?: string)
|
|
|
11
11
|
ValueContext: import("react").Context<T>;
|
|
12
12
|
UpdateContext: import("react").Context<Update<T>>;
|
|
13
13
|
Provider: {
|
|
14
|
-
({ children }: ProviderProps): import("react").JSX.Element;
|
|
14
|
+
({ children }: ProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
displayName: string;
|
|
16
16
|
};
|
|
17
17
|
useUpdate: (value: T, skipUpdate?: boolean) => void;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createContext, memo, useContext, useEffect, useState } from 'react';
|
|
2
3
|
export default function createStatefulContext(initialValue, name = '') {
|
|
3
4
|
const ValueContext = createContext(initialValue);
|
|
4
5
|
const UpdateContext = createContext(() => { });
|
|
5
6
|
function Provider({ children }) {
|
|
6
7
|
const [value, update] = useState(initialValue);
|
|
7
|
-
return (
|
|
8
|
-
<UpdateContext.Provider value={update}>{children}</UpdateContext.Provider>
|
|
9
|
-
</ValueContext.Provider>);
|
|
8
|
+
return (_jsx(ValueContext.Provider, { value: value, children: _jsx(UpdateContext.Provider, { value: update, children: children }) }));
|
|
10
9
|
}
|
|
11
10
|
Provider.displayName = `${name}Provider`;
|
|
12
11
|
function useUpdate(value, skipUpdate) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import { createComposedRef } from './composeRefs';
|
|
3
4
|
export default function focusSensorHOC(ComposedComponent) {
|
|
@@ -70,7 +71,7 @@ export default function focusSensorHOC(ComposedComponent) {
|
|
|
70
71
|
};
|
|
71
72
|
render() {
|
|
72
73
|
const { autofocus, focused, onFocus, onBlur, innerRef, scrollOnTableFocus, ...rest } = this.props;
|
|
73
|
-
return (
|
|
74
|
+
return (_jsx(ComposedComponent, { ...rest, innerRef: this.composedRef(innerRef, this.onRefUpdate), focused: this.state.focused, onFocusReset: this.onFocusReset, onFocusRestore: this.onFocusRestore }));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
FocusSensor.defaultProps = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
export default class Renderer extends Component {
|
|
3
4
|
componentDidMount() {
|
|
@@ -14,6 +15,6 @@ export default class Renderer extends Component {
|
|
|
14
15
|
};
|
|
15
16
|
render() {
|
|
16
17
|
const { className } = this.props;
|
|
17
|
-
return
|
|
18
|
+
return _jsx("div", { className: className, ref: this.nodeRef });
|
|
18
19
|
}
|
|
19
20
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component, forwardRef } from 'react';
|
|
2
3
|
import { createComposedRef } from './composeRefs';
|
|
3
4
|
export default function rerenderHOC(ComposedComponent) {
|
|
@@ -6,10 +7,10 @@ export default function rerenderHOC(ComposedComponent) {
|
|
|
6
7
|
composedRef = createComposedRef();
|
|
7
8
|
render() {
|
|
8
9
|
const ref = this.composedRef(this.props.forwardedRef);
|
|
9
|
-
return (
|
|
10
|
+
return (_jsx(ComposedComponent, { ...this.state, ref: instance => ref(instance != null ? { ...instance, rerender: this.setState.bind(this) } : null) }));
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
return forwardRef(function RerendererForwardRef(props, ref) {
|
|
13
|
-
return
|
|
14
|
+
return _jsx(Rerenderer, { props: props, forwardedRef: ref });
|
|
14
15
|
});
|
|
15
16
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { useMemo, useState, useEffect, forwardRef, useContext, createContext, } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import { createPortal } from 'react-dom';
|
|
@@ -50,7 +51,7 @@ export function applyTheme(theme, container) {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
const DefaultWrapper = forwardRef(function Wrapper(props, ref) {
|
|
53
|
-
return
|
|
54
|
+
return _jsx("div", { ...props, ref: ref });
|
|
54
55
|
});
|
|
55
56
|
export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.AUTO, className, passToPopups, children, WrapperComponent = DefaultWrapper, target, ...restProps }, ref) {
|
|
56
57
|
const systemTheme = useTheme();
|
|
@@ -64,15 +65,6 @@ export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.A
|
|
|
64
65
|
}, [resolvedTheme, target]);
|
|
65
66
|
const themeClasses = useThemeClasses(theme);
|
|
66
67
|
const parentTarget = useContext(PopupTargetContext);
|
|
67
|
-
return (
|
|
68
|
-
<WrapperComponent ref={ref} className={target != null ? undefined : classNames(className, themeClasses)} {...restProps}>
|
|
69
|
-
{passToPopups ? (<PopupTarget id={id}>
|
|
70
|
-
{popupTarget => (<>
|
|
71
|
-
{children}
|
|
72
|
-
{createPortal(<div className={themeClasses}>{popupTarget}</div>, (parentTarget && getPopupContainer(parentTarget)) || document.body)}
|
|
73
|
-
</>)}
|
|
74
|
-
</PopupTarget>) : (children)}
|
|
75
|
-
</WrapperComponent>
|
|
76
|
-
</ThemeContext.Provider>);
|
|
68
|
+
return (_jsx(ThemeContext.Provider, { value: themeValue, children: _jsx(WrapperComponent, { ref: ref, className: target != null ? undefined : classNames(className, themeClasses), ...restProps, children: passToPopups ? (_jsx(PopupTarget, { id: id, children: popupTarget => (_jsxs(_Fragment, { children: [children, createPortal(_jsx("div", { className: themeClasses, children: popupTarget }), (parentTarget && getPopupContainer(parentTarget)) || document.body)] })) })) : (children) }) }));
|
|
77
69
|
});
|
|
78
70
|
export default Theme;
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
--ring-pinned-shadow-color: rgb(var(--ring-pinned-shadow-components)); /* #6C707E */
|
|
52
52
|
--ring-button-danger-hover-components: var(--ring-icon-error-color);
|
|
53
53
|
--ring-button-danger-hover-color: var(--ring-icon-error-color);
|
|
54
|
-
--ring-button-primary-border-components:
|
|
55
|
-
--ring-button-primary-border-color: rgb(var(--ring-button-primary-border-components)); /* #
|
|
54
|
+
--ring-button-primary-border-components: 46, 85, 163;
|
|
55
|
+
--ring-button-primary-border-color: rgb(var(--ring-button-primary-border-components)); /* #2E55A3 */
|
|
56
56
|
--ring-dialog-overlay-components: 0, 0, 0;
|
|
57
57
|
--ring-dialog-overlay-opacity: 0.4;
|
|
58
58
|
--ring-popup-shadow: 0 2px 8px var(--ring-popup-shadow-color), 0 1px 2px var(--ring-popup-secondary-shadow-color);
|
|
@@ -115,8 +115,7 @@
|
|
|
115
115
|
--ring-disabled-selected-background-color: rgb(var(--ring-disabled-selected-background-components)); /* #EBECF0 */
|
|
116
116
|
--ring-button-danger-active-components: 250, 212, 216;
|
|
117
117
|
--ring-button-danger-active-color: rgb(var(--ring-button-danger-active-components)); /* #FAD4D8 */
|
|
118
|
-
--ring-button-loader-background-components
|
|
119
|
-
--ring-button-loader-background: rgb(var(--ring-button-loader-background-components)); /* #4682FA */
|
|
118
|
+
--ring-button-loader-background: rgba(var(--ring-white-text-components), 0.4);
|
|
120
119
|
--ring-button-primary-background-components: 53, 116, 240;
|
|
121
120
|
--ring-button-primary-background-color: rgb(var(--ring-button-primary-background-components)); /* #3574F0 */
|
|
122
121
|
--ring-table-loader-background-color: rgba(var(--ring-content-background-components), 0.5); /* #FFFFFF50 */
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
--ring-pinned-shadow-components: 0, 0, 0;
|
|
42
42
|
--ring-pinned-shadow-color: rgb(var(--ring-pinned-shadow-components)); /* #000 */
|
|
43
43
|
--ring-button-danger-hover-color: var(--ring-error-color);
|
|
44
|
-
--ring-button-primary-border-components:
|
|
45
|
-
--ring-button-primary-border-color: rgb(var(--ring-button-primary-border-components)); /* #
|
|
44
|
+
--ring-button-primary-border-components: 153, 187, 255;
|
|
45
|
+
--ring-button-primary-border-color: rgb(var(--ring-button-primary-border-components)); /* #99BBFF */
|
|
46
46
|
--ring-dialog-overlay-components: 0, 0, 0;
|
|
47
47
|
--ring-dialog-overlay-opacity: 0.7;
|
|
48
48
|
--ring-popup-shadow: 0 2px 8px var(--ring-popup-shadow-color), 0 1px 2px var(--ring-popup-secondary-shadow-color);
|
package/components/grid/col.d.ts
CHANGED
package/components/grid/col.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { Component } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import styles from './grid.css';
|
|
@@ -27,8 +28,6 @@ export default class Col extends Component {
|
|
|
27
28
|
const classes = classNames(styles.col, className, getClassNames(restProps), {
|
|
28
29
|
[styles.reverse]: reverse,
|
|
29
30
|
});
|
|
30
|
-
return (
|
|
31
|
-
{children}
|
|
32
|
-
</div>);
|
|
31
|
+
return (_jsx("div", { className: classes, "data-test": "ring-grid-column", children: children }));
|
|
33
32
|
}
|
|
34
33
|
}
|
|
@@ -3,7 +3,7 @@ import { Component, HTMLAttributes } from 'react';
|
|
|
3
3
|
* @name Grid
|
|
4
4
|
*/
|
|
5
5
|
export declare class Grid extends Component<HTMLAttributes<HTMLDivElement>> {
|
|
6
|
-
render(): import("react").JSX.Element;
|
|
6
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export { default as Row } from './row';
|
|
9
9
|
export { default as Col } from './col';
|