@jetbrains/ring-ui 6.0.34 → 6.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +4 -1
- package/components/alert/alert.css +0 -7
- package/components/alert/alert.d.ts +2 -1
- package/components/alert/alert.js +2 -1
- package/components/alert/container.d.ts +2 -2
- package/components/alert/container.js +1 -1
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +0 -1
- package/components/auth/down-notification.d.ts +1 -1
- package/components/auth/down-notification.js +1 -1
- package/components/auth/iframe-flow.js +0 -1
- package/components/auth-dialog/auth-dialog.d.ts +2 -2
- package/components/auth-dialog/auth-dialog.js +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +0 -1
- package/components/avatar/avatar.d.ts +2 -2
- package/components/avatar/avatar.js +1 -1
- package/components/avatar/fallback-avatar.d.ts +2 -2
- package/components/avatar/fallback-avatar.js +1 -1
- package/components/badge/badge.d.ts +2 -2
- package/components/badge/badge.js +1 -1
- package/components/breadcrumbs/breadcrumbs.css +7 -0
- package/components/breadcrumbs/breadcrumbs.d.ts +6 -0
- package/components/breadcrumbs/breadcrumbs.js +11 -0
- package/components/button/button.d.ts +2 -1
- package/components/button/button.js +2 -1
- package/components/button-group/button-group.css +12 -11
- package/components/button-group/button-group.d.ts +4 -2
- package/components/button-group/button-group.js +9 -3
- package/components/button-group/caption.d.ts +2 -2
- package/components/button-group/caption.js +1 -1
- package/components/button-set/button-set.d.ts +2 -2
- package/components/button-set/button-set.js +1 -1
- package/components/button-toolbar/button-toolbar.d.ts +2 -2
- package/components/button-toolbar/button-toolbar.js +1 -1
- package/components/checkbox/checkbox.css +16 -20
- package/components/checkbox/checkbox.d.ts +3 -2
- package/components/checkbox/checkbox.js +12 -6
- package/components/code/code.d.ts +3 -3
- package/components/code/code.js +1 -1
- package/components/collapse/collapse-content.d.ts +2 -1
- package/components/collapse/collapse-content.js +2 -1
- package/components/collapse/collapse-control.d.ts +1 -1
- package/components/collapse/collapse-control.js +2 -1
- package/components/collapse/collapse.d.ts +2 -1
- package/components/collapse/collapse.js +2 -1
- package/components/confirm/confirm.d.ts +2 -1
- package/components/confirm/confirm.js +2 -1
- package/components/confirm-service/confirm-service.js +0 -1
- package/components/content-layout/content-layout.d.ts +2 -2
- package/components/content-layout/content-layout.js +2 -2
- package/components/content-layout/sidebar.d.ts +2 -2
- package/components/content-layout/sidebar.js +1 -1
- package/components/contenteditable/contenteditable.d.ts +3 -3
- package/components/contenteditable/contenteditable.js +1 -1
- package/components/control-help/control-help.css +8 -0
- package/components/control-help/control-help.d.ts +4 -0
- package/components/control-help/control-help.js +5 -0
- package/components/control-label/control-label.d.ts +2 -1
- package/components/control-label/control-label.js +1 -1
- package/components/data-list/data-list.d.ts +11 -11
- package/components/data-list/data-list.js +1 -1
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +0 -2
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +1 -1
- package/components/data-list/title.d.ts +3 -3
- package/components/data-list/title.js +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +1 -1
- package/components/date-picker/date-picker.d.ts +2 -1
- package/components/date-picker/date-picker.js +2 -1
- package/components/date-picker/date-popup.d.ts +2 -1
- package/components/date-picker/date-popup.js +2 -1
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +1 -1
- package/components/date-picker/month-names.d.ts +2 -2
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +2 -2
- package/components/date-picker/month.js +0 -1
- package/components/date-picker/months.d.ts +2 -2
- package/components/date-picker/months.js +1 -1
- package/components/date-picker/weekdays.d.ts +2 -2
- package/components/date-picker/weekdays.js +0 -1
- package/components/date-picker/years.d.ts +3 -3
- package/components/date-picker/years.js +1 -1
- package/components/dialog/dialog.d.ts +2 -1
- package/components/dialog/dialog.js +2 -1
- package/components/dropdown/anchor.d.ts +3 -3
- package/components/dropdown/anchor.js +1 -1
- package/components/dropdown/dropdown.d.ts +2 -1
- package/components/dropdown/dropdown.js +2 -1
- package/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/components/dropdown-menu/dropdown-menu.js +2 -2
- package/components/editable-heading/editable-heading.d.ts +2 -1
- package/components/editable-heading/editable-heading.js +2 -1
- package/components/error-bubble/error-bubble.d.ts +2 -2
- package/components/error-bubble/error-bubble.js +1 -1
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +1 -1
- package/components/footer/footer.css +1 -1
- package/components/footer/footer.d.ts +2 -2
- package/components/footer/footer.js +1 -1
- package/components/form/form.css +1 -1
- package/components/form/form.stories.js +0 -1
- package/components/global/create-stateful-context.d.ts +5 -5
- package/components/global/create-stateful-context.js +1 -1
- package/components/global/focus-sensor-hoc.js +1 -1
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/react-dom-renderer.d.ts +2 -2
- package/components/global/react-dom-renderer.js +1 -1
- package/components/global/rerender-hoc.d.ts +2 -2
- package/components/global/rerender-hoc.js +1 -1
- package/components/global/theme.d.ts +3 -3
- package/components/global/theme.js +1 -1
- package/components/grid/col.d.ts +2 -2
- package/components/grid/col.js +1 -1
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/grid.js +1 -1
- package/components/grid/row.d.ts +2 -2
- package/components/grid/row.js +1 -1
- package/components/group/group.d.ts +2 -2
- package/components/group/group.js +1 -1
- package/components/header/header.d.ts +2 -2
- package/components/header/header.js +1 -1
- package/components/header/logo.d.ts +2 -2
- package/components/header/logo.js +1 -1
- package/components/header/profile.d.ts +4 -3
- package/components/header/profile.js +2 -1
- package/components/header/services-link.d.ts +2 -2
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +1 -1
- package/components/header/smart-profile.d.ts +2 -2
- package/components/header/smart-profile.js +1 -1
- package/components/header/smart-services.d.ts +2 -2
- package/components/header/smart-services.js +1 -1
- package/components/header/tray-icon.d.ts +2 -2
- package/components/header/tray-icon.js +1 -1
- package/components/header/tray.d.ts +2 -2
- package/components/header/tray.js +1 -1
- package/components/heading/heading.d.ts +6 -6
- package/components/heading/heading.js +1 -1
- package/components/http/http.mock.js +1 -0
- package/components/i18n/i18n-context.d.ts +1 -1
- package/components/i18n/i18n-context.js +2 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +1 -1
- package/components/icon/icon__svg.d.ts +3 -3
- package/components/icon/icon__svg.js +1 -1
- package/components/input/input.css +5 -1
- package/components/input/input.d.ts +3 -2
- package/components/input/input.js +8 -6
- package/components/input-size/input-size.stories.js +0 -1
- package/components/island/adaptive-island-hoc.d.ts +11 -11
- package/components/island/adaptive-island-hoc.js +1 -1
- package/components/island/content.d.ts +3 -3
- package/components/island/content.js +1 -1
- package/components/island/header.d.ts +2 -2
- package/components/island/header.js +1 -1
- package/components/island/island.css +1 -1
- package/components/island/island.d.ts +10 -10
- package/components/island/island.js +1 -1
- package/components/island-legacy/content-legacy.d.ts +2 -2
- package/components/island-legacy/content-legacy.js +1 -1
- package/components/island-legacy/header-legacy.d.ts +2 -2
- package/components/island-legacy/header-legacy.js +1 -1
- package/components/island-legacy/island-legacy.d.ts +2 -2
- package/components/island-legacy/island-legacy.js +1 -1
- package/components/link/clickableLink.d.ts +2 -1
- package/components/link/clickableLink.js +2 -1
- package/components/link/link.d.ts +15 -15
- package/components/link/link.js +1 -1
- package/components/list/consts.d.ts +2 -1
- package/components/list/list.d.ts +10 -10
- package/components/list/list.js +1 -1
- package/components/list/list__custom.d.ts +2 -1
- package/components/list/list__custom.js +2 -1
- package/components/list/list__hint.d.ts +2 -2
- package/components/list/list__hint.js +1 -1
- package/components/list/list__item.d.ts +2 -2
- package/components/list/list__item.js +2 -2
- package/components/list/list__link.d.ts +2 -2
- package/components/list/list__link.js +1 -1
- package/components/list/list__separator.d.ts +2 -2
- package/components/list/list__separator.js +1 -1
- package/components/list/list__title.d.ts +2 -2
- package/components/list/list__title.js +1 -1
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +2 -2
- package/components/loader-inline/loader-inline.js +1 -1
- package/components/loader-screen/loader-screen.d.ts +2 -2
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.d.ts +2 -2
- package/components/login-dialog/login-dialog.js +1 -1
- package/components/login-dialog/service.js +0 -1
- package/components/markdown/markdown.d.ts +2 -2
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.d.ts +2 -2
- package/components/message/message.js +1 -1
- package/components/pager/pager.d.ts +2 -1
- package/components/pager/pager.js +2 -1
- package/components/panel/panel.d.ts +2 -2
- package/components/panel/panel.js +1 -1
- package/components/popup/popup.d.ts +2 -1
- package/components/popup/popup.js +2 -1
- package/components/popup/popup.target.d.ts +3 -3
- package/components/popup/popup.target.js +1 -1
- package/components/popup-menu/popup-menu.d.ts +2 -2
- package/components/popup-menu/popup-menu.js +0 -1
- package/components/progress-bar/progress-bar.d.ts +2 -2
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/query-assist.d.ts +3 -2
- package/components/query-assist/query-assist.js +4 -3
- package/components/query-assist/query-assist__suggestions.d.ts +2 -2
- package/components/query-assist/query-assist__suggestions.js +0 -1
- package/components/radio/radio.d.ts +3 -3
- package/components/radio/radio.js +1 -1
- package/components/radio/radio__item.d.ts +9 -6
- package/components/radio/radio__item.js +10 -6
- package/components/select/select-popup.css +1 -0
- package/components/select/select.css +1 -1
- package/components/select/select.d.ts +5 -2
- package/components/select/select.js +5 -3
- package/components/select/select__filter.d.ts +2 -2
- package/components/select/select__filter.js +1 -1
- package/components/select/select__popup.d.ts +6 -4
- package/components/select/select__popup.js +4 -3
- package/components/shortcuts/core.d.ts +0 -1
- package/components/shortcuts/shortcuts-hoc.d.ts +8 -8
- package/components/shortcuts/shortcuts-hoc.js +2 -2
- package/components/slider/slider.d.ts +2 -1
- package/components/slider/slider.js +2 -1
- package/components/tab-trap/tab-trap.d.ts +2 -1
- package/components/tab-trap/tab-trap.js +2 -1
- package/components/table/cell.d.ts +2 -2
- package/components/table/cell.js +1 -1
- package/components/table/disable-hover-hoc.d.ts +9 -9
- package/components/table/disable-hover-hoc.js +1 -1
- package/components/table/header-cell.d.ts +2 -2
- package/components/table/header-cell.js +1 -1
- package/components/table/header.d.ts +3 -3
- package/components/table/header.js +1 -1
- package/components/table/multitable.d.ts +2 -2
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row-with-focus-sensor.js +1 -1
- package/components/table/row.d.ts +2 -1
- package/components/table/row.js +2 -1
- package/components/table/selection-shortcuts-hoc.js +1 -1
- package/components/table/smart-table.d.ts +44 -44
- package/components/table/smart-table.js +1 -1
- package/components/table/table.d.ts +2 -1
- package/components/table/table.js +2 -1
- package/components/table-legacy/table-legacy.css +1 -1
- package/components/tabs/collapsible-more.d.ts +4 -4
- package/components/tabs/collapsible-more.js +8 -8
- package/components/tabs/collapsible-tab.d.ts +2 -1
- package/components/tabs/collapsible-tab.js +1 -1
- package/components/tabs/collapsible-tabs.d.ts +4 -4
- package/components/tabs/collapsible-tabs.js +14 -14
- package/components/tabs/dumb-tabs.d.ts +2 -1
- package/components/tabs/dumb-tabs.js +2 -1
- package/components/tabs/smart-tabs.d.ts +2 -2
- package/components/tabs/smart-tabs.js +1 -1
- package/components/tabs/tab-link.d.ts +3 -3
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tab.js +1 -1
- package/components/tag/tag.d.ts +2 -1
- package/components/tag/tag.js +2 -1
- package/components/tags-input/tags-input.d.ts +3 -2
- package/components/tags-input/tags-input.js +2 -1
- package/components/tags-list/tags-list.d.ts +2 -1
- package/components/tags-list/tags-list.js +2 -1
- package/components/text/text.d.ts +2 -2
- package/components/text/text.js +1 -1
- package/components/toggle/toggle.d.ts +2 -2
- package/components/toggle/toggle.js +1 -1
- package/components/tooltip/tooltip.d.ts +2 -1
- package/components/tooltip/tooltip.js +2 -1
- package/components/user-agreement/service.js +2 -3
- package/components/user-agreement/user-agreement.d.ts +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/components/user-card/card.d.ts +2 -1
- package/components/user-card/card.js +2 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +3 -3
- package/components/user-card/smart-user-card-tooltip.js +1 -1
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/tooltip.js +1 -1
- package/components/user-card/user-card.css +1 -1
- package/package.json +27 -26
package/babel.config.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
-
@value link from "../link/link.css";
|
|
4
3
|
@value animation-duration: 300ms;
|
|
5
4
|
@value animation-easing: ease-out;
|
|
6
5
|
|
|
@@ -57,12 +56,6 @@
|
|
|
57
56
|
|
|
58
57
|
line-height: 20px;
|
|
59
58
|
|
|
60
|
-
& :global(.ring-link),
|
|
61
|
-
/* This link styles are used in link.css */
|
|
62
|
-
& .link {
|
|
63
|
-
color: var(--ring-main-color);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
59
|
&.withCloseButton {
|
|
67
60
|
margin-right: calc(var(--ring-unit) * 5);
|
|
68
61
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
/**
|
|
4
4
|
* @name Alert Container
|
|
@@ -11,5 +11,5 @@ export default class Alerts extends PureComponent<AlertContainerProps> {
|
|
|
11
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
};
|
|
14
|
-
render():
|
|
14
|
+
render(): import("react").ReactPortal | null;
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Children, cloneElement, PureComponent, isValidElement } from 'react';
|
|
2
2
|
import { createPortal } from 'react-dom';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode, Ref } from 'react';
|
|
2
2
|
import Alert, { AlertProps, AlertType } from '../alert/alert';
|
|
3
3
|
export interface AlertItem extends Partial<Omit<AlertProps, 'children'>> {
|
|
4
4
|
key: string | number;
|
|
@@ -14,7 +14,7 @@ declare class AlertService {
|
|
|
14
14
|
containerElement: HTMLDivElement;
|
|
15
15
|
reactRoot: import("react-dom/client").Root;
|
|
16
16
|
_getShowingAlerts(): AlertItem[];
|
|
17
|
-
renderAlertContainer(alerts: readonly AlertItem[]):
|
|
17
|
+
renderAlertContainer(alerts: readonly AlertItem[]): import("react").JSX.Element;
|
|
18
18
|
/**
|
|
19
19
|
* Renders alert container into virtual node to skip maintaining container
|
|
20
20
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
/**
|
|
4
4
|
* @name Auth Dialog
|
|
@@ -56,5 +56,5 @@ export default class AuthDialog extends Component<AuthDialogProps> {
|
|
|
56
56
|
componentWillUnmount(): void;
|
|
57
57
|
onEscPress: () => void;
|
|
58
58
|
onRetryPress: () => Promise<void>;
|
|
59
|
-
render():
|
|
59
|
+
render(): import("react").JSX.Element;
|
|
60
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, ImgHTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
/**
|
|
4
4
|
* @name Avatar
|
|
@@ -47,6 +47,6 @@ export default class Avatar extends PureComponent<AvatarProps> {
|
|
|
47
47
|
};
|
|
48
48
|
handleError: () => void;
|
|
49
49
|
handleSuccess: () => void;
|
|
50
|
-
render():
|
|
50
|
+
render(): import("react").JSX.Element;
|
|
51
51
|
}
|
|
52
52
|
export type AvatarAttrs = JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Size } from './avatar';
|
|
4
4
|
export interface FallbackAvatarProps {
|
|
@@ -6,7 +6,7 @@ export interface FallbackAvatarProps {
|
|
|
6
6
|
size: Size;
|
|
7
7
|
round: boolean | null | undefined;
|
|
8
8
|
}
|
|
9
|
-
declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps):
|
|
9
|
+
declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps): import("react").JSX.Element;
|
|
10
10
|
declare namespace FallbackAvatar {
|
|
11
11
|
var propTypes: {
|
|
12
12
|
username: PropTypes.Validator<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface BadgeProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
gray?: boolean | null | undefined;
|
|
@@ -20,5 +20,5 @@ export default class Badge extends PureComponent<BadgeProps> {
|
|
|
20
20
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
21
|
'data-test': PropTypes.Requireable<string>;
|
|
22
22
|
};
|
|
23
|
-
render():
|
|
23
|
+
render(): import("react").JSX.Element;
|
|
24
24
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface BreadcrumbsSeparatorAttrs {
|
|
3
|
+
separatorClassName?: string | null | undefined;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export default function Breadcrumbs({ separatorClassName, children }: BreadcrumbsSeparatorAttrs): import("react").JSX.Element[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { Children, Fragment } from 'react';
|
|
3
|
+
import styles from './breadcrumbs.css';
|
|
4
|
+
export default function Breadcrumbs({ separatorClassName, children }) {
|
|
5
|
+
return Children.toArray(children).map((child, index) => (
|
|
6
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
7
|
+
<Fragment key={index}>
|
|
8
|
+
{index > 0 && <span className={classNames(styles.separator, separatorClassName)}>{'/'}</span>}
|
|
9
|
+
{child}
|
|
10
|
+
</Fragment>));
|
|
11
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import { IconProps, IconType, Size } from '../icon/icon';
|
|
4
5
|
import { ClickableLinkProps } from '../link/clickableLink';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRef, PureComponent } from 'react';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import PropTypes from 'prop-types';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import chevronDown from '@jetbrains/icons/chevron-10px';
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
.buttonGroup .button[disabled] {
|
|
41
41
|
--ring-button-group-button-border-color: var(--ring-border-disabled-color);
|
|
42
42
|
|
|
43
|
-
/* stylelint-disable
|
|
43
|
+
/* stylelint-disable selector-max-specificity */
|
|
44
44
|
&::before,
|
|
45
45
|
&::after {
|
|
46
46
|
position: absolute;
|
|
@@ -57,15 +57,14 @@
|
|
|
57
57
|
box-shadow: 0 1px var(--ring-border-disabled-color) inset, 0 -1px var(--ring-border-disabled-color) inset;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
61
60
|
&::before {
|
|
62
61
|
left: calc(var(--ring-border-radius) * -1);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
66
64
|
&::after {
|
|
67
65
|
right: calc(var(--ring-border-radius) * -1);
|
|
68
66
|
}
|
|
67
|
+
/* stylelint-enable */
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
.buttonGroup > .button:first-child,
|
|
@@ -102,36 +101,32 @@
|
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
/* stylelint-disable
|
|
104
|
+
/* stylelint-disable selector-max-specificity */
|
|
106
105
|
.buttonGroup .button.button:hover:not(:disabled),
|
|
107
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
108
106
|
.buttonGroup .button.button:active:not(:disabled) {
|
|
109
107
|
border-radius: var(--ring-border-radius);
|
|
110
108
|
box-shadow: button-shadow var(--ring-border-hover-color);
|
|
111
109
|
}
|
|
112
110
|
|
|
113
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
114
111
|
.buttonGroup .button.button:focus-visible {
|
|
115
112
|
border-radius: var(--ring-border-radius);
|
|
116
113
|
box-shadow: button-shadow var(--ring-border-hover-color), 0 0 0 1px var(--ring-border-hover-color);
|
|
117
114
|
}
|
|
118
115
|
|
|
119
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
120
116
|
.buttonGroup .button.button.active {
|
|
121
117
|
border-radius: var(--ring-border-radius);
|
|
122
118
|
box-shadow: button-shadow var(--ring-main-color);
|
|
123
119
|
}
|
|
124
120
|
|
|
125
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
126
121
|
.buttonGroup .button:focus-visible.active {
|
|
127
122
|
border-radius: var(--ring-border-radius);
|
|
128
123
|
box-shadow: button-shadow var(--ring-main-color), 0 0 0 1px var(--ring-border-hover-color);
|
|
129
124
|
}
|
|
130
125
|
|
|
131
|
-
/* stylelint-disable-next-line selector-max-specificity */
|
|
132
126
|
.buttonGroup .button.active[disabled] {
|
|
133
127
|
box-shadow: button-shadow var(--ring-border-selected-disabled-color);
|
|
134
128
|
}
|
|
129
|
+
/* stylelint-enable */
|
|
135
130
|
|
|
136
131
|
.split {
|
|
137
132
|
composes: common;
|
|
@@ -172,13 +167,14 @@
|
|
|
172
167
|
border-bottom-left-radius: var(--ring-border-radius);
|
|
173
168
|
}
|
|
174
169
|
|
|
175
|
-
/* stylelint-disable
|
|
170
|
+
/* stylelint-disable selector-max-specificity */
|
|
176
171
|
.common > button:first-child > div:first-child,
|
|
177
172
|
.common > .button:first-child > div:first-child,
|
|
178
173
|
.common > :first-child .button > div:first-child {
|
|
179
174
|
border-top-right-radius: 0;
|
|
180
175
|
border-bottom-right-radius: 0;
|
|
181
176
|
}
|
|
177
|
+
/* stylelint-enable */
|
|
182
178
|
|
|
183
179
|
.common > .button:last-child,
|
|
184
180
|
.common > button:last-child,
|
|
@@ -187,13 +183,14 @@
|
|
|
187
183
|
border-bottom-right-radius: var(--ring-border-radius);
|
|
188
184
|
}
|
|
189
185
|
|
|
190
|
-
/* stylelint-disable
|
|
186
|
+
/* stylelint-disable selector-max-specificity */
|
|
191
187
|
.common > .button:last-child > div:first-child,
|
|
192
188
|
.common > button:last-child > div:first-child,
|
|
193
189
|
.common > :last-child .button > div:first-child {
|
|
194
190
|
border-top-left-radius: 0;
|
|
195
191
|
border-bottom-left-radius: 0;
|
|
196
192
|
}
|
|
193
|
+
/* stylelint-enable */
|
|
197
194
|
|
|
198
195
|
.split .primary:not(:last-child) {
|
|
199
196
|
margin-right: 1px;
|
|
@@ -234,3 +231,7 @@
|
|
|
234
231
|
}
|
|
235
232
|
}
|
|
236
233
|
}
|
|
234
|
+
|
|
235
|
+
.help {
|
|
236
|
+
margin-top: calc(var(--ring-unit) * 0.5);
|
|
237
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Caption from './caption';
|
|
4
4
|
export interface ButtonGroupProps extends HTMLAttributes<HTMLElement> {
|
|
5
5
|
split?: boolean | null | undefined;
|
|
6
6
|
'data-test'?: string | null | undefined;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
help?: ReactNode;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* @name Button Group
|
|
@@ -13,6 +15,6 @@ export default class ButtonGroup extends PureComponent<ButtonGroupProps> {
|
|
|
13
15
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
16
|
className: PropTypes.Requireable<string>;
|
|
15
17
|
};
|
|
16
|
-
render():
|
|
18
|
+
render(): import("react").JSX.Element;
|
|
17
19
|
}
|
|
18
20
|
export { Caption };
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import dataTests from '../global/data-tests';
|
|
5
|
+
import ControlLabel from '../control-label/control-label';
|
|
6
|
+
import ControlHelp from '../control-help/control-help';
|
|
5
7
|
import Caption from './caption';
|
|
6
8
|
import styles from './button-group.css';
|
|
7
9
|
/**
|
|
@@ -13,9 +15,13 @@ export default class ButtonGroup extends PureComponent {
|
|
|
13
15
|
className: PropTypes.string
|
|
14
16
|
};
|
|
15
17
|
render() {
|
|
16
|
-
const { className, split, 'data-test': dataTest, ...restProps } = this.props;
|
|
18
|
+
const { className, split, 'data-test': dataTest, label, help, ...restProps } = this.props;
|
|
17
19
|
const classes = classNames(split ? styles.split : styles.buttonGroup, className);
|
|
18
|
-
return (
|
|
20
|
+
return (<>
|
|
21
|
+
{label && <ControlLabel>{label}</ControlLabel>}
|
|
22
|
+
<div {...restProps} data-test={dataTests('ring-button-group', dataTest)} className={classes}/>
|
|
23
|
+
{help && <ControlHelp className={styles.help}>{help}</ControlHelp>}
|
|
24
|
+
</>);
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
export { Caption };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export default class Caption extends PureComponent<HTMLAttributes<HTMLElement>> {
|
|
4
4
|
static propTypes: {
|
|
5
5
|
className: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
6
6
|
};
|
|
7
|
-
render():
|
|
7
|
+
render(): import("react").JSX.Element;
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
'data-test'?: string | null | undefined;
|
|
@@ -12,5 +12,5 @@ export default class ButtonSet extends PureComponent<ButtonSetProps> {
|
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
'data-test': PropTypes.Requireable<string>;
|
|
14
14
|
};
|
|
15
|
-
render():
|
|
15
|
+
render(): import("react").JSX.Element;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
'data-test'?: string | null | undefined;
|
|
@@ -12,5 +12,5 @@ export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
|
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
'data-test': PropTypes.Requireable<string>;
|
|
14
14
|
};
|
|
15
|
-
render():
|
|
15
|
+
render(): import("react").JSX.Element;
|
|
16
16
|
}
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
.checkbox {
|
|
6
6
|
position: relative;
|
|
7
7
|
|
|
8
|
-
display: inline-
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: baseline;
|
|
9
10
|
|
|
10
11
|
text-align: left;
|
|
11
12
|
|
|
@@ -79,28 +80,26 @@
|
|
|
79
80
|
|
|
80
81
|
opacity: 0;
|
|
81
82
|
|
|
82
|
-
/* stylelint-disable
|
|
83
|
-
&:checked + .cell,
|
|
84
|
-
&:indeterminate + .cell {
|
|
83
|
+
/* stylelint-disable selector-max-specificity */
|
|
84
|
+
&:checked + .cellWrapper .cell,
|
|
85
|
+
&:indeterminate + .cellWrapper .cell {
|
|
85
86
|
border-color: transparent;
|
|
86
87
|
background-color: var(--ring-main-color);
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
|
|
90
|
-
&:checked + .cell .check {
|
|
90
|
+
&:checked + .cellWrapper .check {
|
|
91
91
|
opacity: 1;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
&:focus-visible + .cell,
|
|
95
|
-
&.focus + .cell {
|
|
94
|
+
&:focus-visible + .cellWrapper .cell,
|
|
95
|
+
&.focus + .cellWrapper .cell {
|
|
96
96
|
transition: background-color var(--ring-ease);
|
|
97
97
|
|
|
98
98
|
border-color: var(--ring-border-hover-color);
|
|
99
99
|
box-shadow: 0 0 0 1px var(--ring-border-hover-color);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
&:indeterminate + .cell .minus {
|
|
102
|
+
&:indeterminate + .cellWrapper .minus {
|
|
104
103
|
opacity: 1;
|
|
105
104
|
}
|
|
106
105
|
|
|
@@ -108,31 +107,28 @@
|
|
|
108
107
|
pointer-events: none;
|
|
109
108
|
}
|
|
110
109
|
|
|
111
|
-
|
|
112
|
-
&[disabled][disabled] + .cell {
|
|
110
|
+
&[disabled][disabled] + .cellWrapper .cell {
|
|
113
111
|
border-color: var(--ring-border-disabled-color);
|
|
114
112
|
background-color: var(--ring-disabled-background-color);
|
|
115
113
|
}
|
|
116
114
|
|
|
117
|
-
|
|
118
|
-
&[disabled]:
|
|
119
|
-
&[disabled]:indeterminate + .cell {
|
|
115
|
+
&[disabled]:checked + .cellWrapper .cell,
|
|
116
|
+
&[disabled]:indeterminate + .cellWrapper .cell {
|
|
120
117
|
border-color: var(--ring-border-selected-disabled-color);
|
|
121
118
|
background-color: var(--ring-border-selected-disabled-color);
|
|
122
119
|
}
|
|
123
120
|
|
|
124
|
-
|
|
125
|
-
&[disabled]:
|
|
126
|
-
&[disabled]:indeterminate + .cell .minus {
|
|
121
|
+
&[disabled]:checked + .cellWrapper .check,
|
|
122
|
+
&[disabled]:indeterminate + .cellWrapper .minus {
|
|
127
123
|
color: var(--ring-disabled-background-color);
|
|
128
124
|
}
|
|
129
125
|
|
|
130
|
-
|
|
131
|
-
&:indeterminate:indeterminate + .cell .check {
|
|
126
|
+
&:indeterminate:indeterminate + .cellWrapper .check {
|
|
132
127
|
transition: none;
|
|
133
128
|
|
|
134
129
|
opacity: 0;
|
|
135
130
|
}
|
|
131
|
+
/* stylelint-enable */
|
|
136
132
|
|
|
137
133
|
&[disabled] ~ .label {
|
|
138
134
|
color: var(--ring-disabled-color);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent, InputHTMLAttributes, CSSProperties, Ref, ReactNode } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
label?: string | null | undefined;
|
|
@@ -8,6 +8,7 @@ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
8
8
|
labelClassName?: string | null | undefined;
|
|
9
9
|
indeterminate: boolean;
|
|
10
10
|
inputRef?: Ref<HTMLInputElement>;
|
|
11
|
+
help?: ReactNode;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* @name Checkbox
|
|
@@ -41,5 +42,5 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
|
|
|
41
42
|
componentDidUpdate(prevProps: CheckboxProps): void;
|
|
42
43
|
input?: HTMLInputElement | null;
|
|
43
44
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
44
|
-
render():
|
|
45
|
+
render(): import("react").JSX.Element;
|
|
45
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import checkmarkIcon from '@jetbrains/icons/checkmark-12px';
|
|
@@ -6,6 +6,7 @@ import minusIcon from '@jetbrains/icons/remove-12px';
|
|
|
6
6
|
import Icon from '../icon/icon';
|
|
7
7
|
import { refObject } from '../global/prop-types';
|
|
8
8
|
import composeRefs from '../global/composeRefs';
|
|
9
|
+
import ControlHelp from '../control-help/control-help';
|
|
9
10
|
import styles from './checkbox.css';
|
|
10
11
|
/**
|
|
11
12
|
* @name Checkbox
|
|
@@ -55,18 +56,23 @@ export default class Checkbox extends PureComponent {
|
|
|
55
56
|
this.input = el;
|
|
56
57
|
};
|
|
57
58
|
render() {
|
|
58
|
-
const { children, label, className, containerClassName, containerStyle, cellClassName, labelClassName, indeterminate, inputRef, ...restProps } = this.props;
|
|
59
|
+
const { children, label, className, containerClassName, containerStyle, cellClassName, labelClassName, indeterminate, inputRef, help, ...restProps } = this.props;
|
|
59
60
|
const classes = classNames(styles.input, className);
|
|
60
61
|
const containerClasses = classNames(styles.checkbox, containerClassName);
|
|
61
62
|
const cellClasses = classNames(styles.cell, cellClassName);
|
|
62
63
|
const labelClasses = classNames(styles.label, labelClassName);
|
|
63
64
|
return (<label className={containerClasses} style={containerStyle} data-test="ring-checkbox">
|
|
64
65
|
<input {...restProps} data-checked={restProps.checked} ref={composeRefs(this.inputRef, inputRef)} type="checkbox" className={classes}/>
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
|
|
66
|
+
<div className={styles.cellWrapper}>
|
|
67
|
+
<span className={cellClasses}>
|
|
68
|
+
<Icon glyph={checkmarkIcon} className={styles.check}/>
|
|
69
|
+
<Icon glyph={minusIcon} className={styles.minus}/>
|
|
70
|
+
</span>
|
|
71
|
+
</div>
|
|
72
|
+
<span className={labelClasses}>
|
|
73
|
+
{label || children}
|
|
74
|
+
{help && <ControlHelp>{help}</ControlHelp>}
|
|
68
75
|
</span>
|
|
69
|
-
<span className={labelClasses}>{label || children}</span>
|
|
70
76
|
</label>);
|
|
71
77
|
}
|
|
72
78
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="highlight.js" />
|
|
2
|
-
import
|
|
2
|
+
import { PureComponent, Ref } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import highlight from 'highlight.js/lib/core';
|
|
5
5
|
declare function noop(): void;
|
|
@@ -37,8 +37,8 @@ export default class Code extends PureComponent<CodeProps> {
|
|
|
37
37
|
code?: HTMLElement | null;
|
|
38
38
|
highlight(): Promise<void>;
|
|
39
39
|
get codeRef(): HTMLElement | null | undefined;
|
|
40
|
-
get initCodeRef():
|
|
41
|
-
render():
|
|
40
|
+
get initCodeRef(): import("react").RefObject<HTMLElement> | ((ref: HTMLElement | null) => void);
|
|
41
|
+
render(): import("react").JSX.Element;
|
|
42
42
|
}
|
|
43
43
|
declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
|
|
44
44
|
export { code, highlight };
|
package/components/code/code.js
CHANGED