@jetbrains/ring-ui 5.0.0-beta.3 → 5.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -1
- package/babel.config.js +1 -12
- package/components/alert/alert.css +3 -14
- package/components/alert/alert.d.ts +3 -0
- package/components/alert/alert.js +8 -7
- package/components/alert/container.css +0 -2
- package/components/alert-service/alert-service.examples.css +5 -3
- package/components/auth/auth__core.d.ts +3 -1
- package/components/auth/auth__core.js +42 -15
- package/components/auth/down-notification.css +1 -1
- package/components/auth-dialog/auth-dialog.d.ts +11 -0
- package/components/auth-dialog/auth-dialog.js +33 -2
- package/components/autofocus-ng/autofocus-ng.js +1 -1
- package/components/autofocus-ng/autofocus-ng.test.js +1 -1
- package/components/button/button.css +93 -204
- package/components/button/button.d.ts +7 -8
- package/components/button/button.js +6 -8
- package/components/button/button__classes.d.ts +1 -1
- package/components/button/button__classes.js +4 -7
- package/components/button-group/button-group.css +136 -19
- package/components/button-group/button-group.d.ts +4 -1
- package/components/button-group/button-group.js +3 -3
- package/components/button-group-ng/button-group-ng.css +1 -0
- package/components/button-group-ng/button-group-ng.examples.js +1 -1
- package/components/button-ng/button-ng.examples.js +6 -7
- package/components/button-ng/button-ng.js +6 -25
- package/components/button-set/button-set.css +1 -0
- package/components/button-toolbar/button-toolbar.css +2 -0
- package/components/checkbox/checkbox.css +10 -4
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.css +2 -1
- package/components/dialog/dialog.css +10 -3
- package/components/dialog-ng/dialog-ng__template.js +1 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/global/controls-height.d.ts +7 -0
- package/components/global/controls-height.js +8 -0
- package/components/global/theme.d.ts +7 -20
- package/components/global/theme.js +26 -32
- package/components/global/variables.css +30 -25
- package/components/global/variables.d.ts +10 -8
- package/components/global/variables_dark.css +68 -0
- package/components/header/header.css +19 -10
- package/components/header/header.d.ts +7 -69
- package/components/header/header.js +10 -9
- package/components/header/services.css +3 -3
- package/components/header/services.d.ts +5 -0
- package/components/header/services.js +8 -2
- package/components/header/tray-icon.d.ts +18 -575
- package/components/heading/heading.css +4 -1
- package/components/icon/icon.css +1 -1
- package/components/input/input.css +81 -151
- package/components/input/input.d.ts +13 -17
- package/components/input/input.js +28 -32
- package/components/input-ng/input-ng.examples.js +1 -1
- package/components/input-ng/input-ng.js +45 -49
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/adaptive-island-hoc.js +2 -2
- package/components/island/content.js +2 -7
- package/components/island/header.js +7 -4
- package/components/island/island.css +8 -5
- package/components/island/island.d.ts +2 -2
- package/components/island-legacy/island-legacy.css +1 -1
- package/components/list/list.d.ts +1 -1
- package/components/loader-inline/loader-inline.css +14 -0
- package/components/loader-inline/loader-inline.d.ts +4 -41
- package/components/loader-inline/loader-inline.js +3 -11
- package/components/loader-inline-ng/loader-inline-ng.js +1 -17
- package/components/loader-inline-ng/loader-inline-ng.test.js +0 -11
- package/components/markdown/code.d.ts +6 -13
- package/components/markdown/code.js +2 -2
- package/components/markdown/heading.d.ts +5 -9
- package/components/markdown/heading.js +2 -2
- package/components/markdown/link.d.ts +4 -8
- package/components/markdown/link.js +1 -1
- package/components/markdown/markdown.d.ts +2 -3
- package/components/markdown/markdown.js +14 -11
- package/components/message/message.css +7 -3
- package/components/message/message.d.ts +3 -0
- package/components/message/message.js +16 -9
- package/components/pager/pager.js +2 -8
- package/components/popup/popup.css +1 -1
- package/components/popup/popup.target.d.ts +1 -0
- package/components/progress-bar/progress-bar.css +8 -12
- package/components/progress-bar/progress-bar.d.ts +0 -4
- package/components/progress-bar/progress-bar.js +1 -6
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -2
- package/components/query-assist/query-assist.css +48 -64
- package/components/query-assist/query-assist.d.ts +0 -5
- package/components/query-assist/query-assist.js +4 -10
- package/components/radio/radio.css +10 -4
- package/components/select/select.css +19 -37
- package/components/select/select.d.ts +4 -6
- package/components/select/select.js +17 -30
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +1 -2
- package/components/select-ng/select-ng.examples.js +1 -0
- package/components/select-ng/select-ng.js +3 -1
- package/components/select-ng/select-ng.test.js +1 -1
- package/components/select-ng/select-ng__lazy.js +1 -2
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.examples.js +1 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/dumb-tabs.d.ts +4 -107
- package/components/tabs/dumb-tabs.js +5 -9
- package/components/tabs/tab.d.ts +2 -0
- package/components/tabs/tabs.css +8 -28
- package/components/tabs-ng/tabs-ng.examples.js +11 -3
- package/components/tabs-ng/tabs-ng.js +1 -4
- package/components/tabs-ng/tabs-ng__template.js +1 -1
- package/components/tag/tag.css +31 -8
- package/components/tag/tag.d.ts +1 -0
- package/components/tag/tag.js +1 -0
- package/components/tags-input/tags-input.css +10 -4
- package/components/toggle/toggle.css +61 -35
- package/components/toggle/toggle.d.ts +9 -89
- package/components/toggle/toggle.js +7 -7
- package/components/tooltip/tooltip.css +7 -0
- package/components/tooltip/tooltip.d.ts +1 -0
- package/components/tooltip/tooltip.js +3 -2
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/user-agreement.js +1 -1
- package/dist/_helpers/anchor.js +3 -3
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +1 -1
- package/dist/_helpers/button-set.js +1 -1
- package/dist/_helpers/button-toolbar.js +1 -1
- package/dist/_helpers/button__classes.js +5 -8
- package/dist/_helpers/card.js +1 -1
- package/dist/_helpers/checkbox.js +1 -1
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +1 -1
- package/dist/_helpers/error-message.js +1 -1
- package/dist/_helpers/footer.js +1 -1
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +1 -1
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +1 -1
- package/dist/_helpers/input.js +1 -1
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +1 -1
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-inline.js +3 -0
- package/dist/_helpers/loader-screen.js +1 -1
- package/dist/_helpers/panel.js +1 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +1 -1
- package/dist/_helpers/select__filter.js +5 -3
- package/dist/_helpers/services-link.js +1 -1
- package/dist/_helpers/sidebar.js +1 -1
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/theme.js +50 -0
- package/dist/_helpers/title.js +1 -1
- package/dist/alert/alert.d.ts +3 -0
- package/dist/alert/alert.js +21 -19
- package/dist/alert/container.js +1 -1
- package/dist/alert-service/alert-service.js +9 -7
- package/dist/auth/auth.js +9 -9
- package/dist/auth/auth__core.d.ts +3 -1
- package/dist/auth/auth__core.js +58 -26
- package/dist/auth/down-notification.js +8 -8
- package/dist/auth/iframe-flow.js +1 -1
- package/dist/auth/landing.js +9 -9
- package/dist/auth/storage.js +9 -7
- package/dist/auth-dialog/auth-dialog.d.ts +11 -0
- package/dist/auth-dialog/auth-dialog.js +52 -7
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +9 -9
- package/dist/autofocus-ng/autofocus-ng.js +1 -1
- package/dist/avatar/avatar.js +1 -1
- package/dist/avatar-editor-ng/avatar-editor-ng.js +9 -7
- package/dist/breadcrumb-ng/breadcrumb-ng.js +1 -1
- package/dist/button/button.d.ts +7 -8
- package/dist/button/button.js +6 -8
- package/dist/button/button__classes.d.ts +1 -1
- package/dist/button/button__classes.js +0 -3
- package/dist/button-group/button-group.d.ts +4 -1
- package/dist/button-group/button-group.js +5 -3
- package/dist/button-group-ng/button-group-ng.js +1 -1
- package/dist/button-ng/button-ng.js +6 -31
- package/dist/code/code.js +1 -1
- package/dist/confirm/confirm.js +5 -5
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/data-list/data-list.js +2 -7
- package/dist/data-list/item.js +8 -13
- package/dist/data-list-ng/data-list-ng.js +2 -7
- package/dist/date-picker/date-input.js +4 -3
- package/dist/date-picker/date-picker.js +1 -1
- package/dist/date-picker/date-popup.js +1 -1
- package/dist/dialog/dialog.js +3 -3
- package/dist/dialog-ng/dialog-ng.js +3 -3
- package/dist/dialog-ng/dialog-ng__template.js +1 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +1 -1
- package/dist/dropdown/anchor.js +1 -1
- package/dist/dropdown/dropdown.js +1 -1
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/error-bubble/error-bubble.js +1 -1
- package/dist/global/controls-height.d.ts +7 -0
- package/dist/global/controls-height.js +13 -0
- package/dist/global/theme.d.ts +7 -20
- package/dist/global/theme.js +7 -62
- package/dist/global/variables.d.ts +10 -8
- package/dist/header/header.d.ts +7 -69
- package/dist/header/header.js +13 -17
- package/dist/header/profile.js +3 -3
- package/dist/header/services.d.ts +5 -0
- package/dist/header/services.js +11 -3
- package/dist/header/smart-profile.js +10 -14
- package/dist/header/smart-services.js +9 -13
- package/dist/header/tray-icon.d.ts +18 -575
- package/dist/header/tray-icon.js +4 -4
- package/dist/heading/heading.js +1 -1
- package/dist/input/input.d.ts +13 -17
- package/dist/input/input.js +32 -41
- package/dist/input-ng/input-ng.js +46 -49
- package/dist/island/adaptive-island-hoc.d.ts +2 -2
- package/dist/island/adaptive-island-hoc.js +4 -2
- package/dist/island/content.js +2 -9
- package/dist/island/header.js +7 -4
- package/dist/island/island.d.ts +2 -2
- package/dist/list/list.d.ts +1 -1
- package/dist/loader/loader__core.js +1 -1
- package/dist/loader-inline/loader-inline.d.ts +4 -41
- package/dist/loader-inline/loader-inline.js +3 -21
- package/dist/loader-inline-ng/loader-inline-ng.js +2 -30
- package/dist/login-dialog/login-dialog.js +2 -2
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.d.ts +6 -13
- package/dist/markdown/code.js +3 -3
- package/dist/markdown/heading.d.ts +5 -9
- package/dist/markdown/heading.js +2 -2
- package/dist/markdown/link.d.ts +4 -8
- package/dist/markdown/link.js +1 -1
- package/dist/markdown/markdown.d.ts +2 -3
- package/dist/markdown/markdown.js +16 -16
- package/dist/message/message.d.ts +3 -0
- package/dist/message/message.js +18 -10
- package/dist/pager/pager.js +8 -12
- package/dist/pager-ng/pager-ng.js +3 -7
- package/dist/permissions-ng/permissions-ng.js +9 -9
- package/dist/popup/popup.js +1 -1
- package/dist/popup/popup.target.d.ts +1 -0
- package/dist/progress-bar/progress-bar.d.ts +0 -4
- package/dist/progress-bar/progress-bar.js +1 -7
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -1
- package/dist/promised-click-ng/promised-click-ng.js +2 -2
- package/dist/query-assist/query-assist.d.ts +0 -5
- package/dist/query-assist/query-assist.js +10 -26
- package/dist/query-assist-ng/query-assist-ng.js +2 -7
- package/dist/save-field-ng/save-field-ng.js +2 -9
- package/dist/select/select.d.ts +4 -6
- package/dist/select/select.js +35 -58
- package/dist/select/select__filter.js +1 -1
- package/dist/select/select__popup.js +7 -13
- package/dist/select-ng/select-ng.js +5 -9
- package/dist/select-ng/select-ng__lazy.js +7 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +2 -2
- package/dist/sidebar-ng/sidebar-ng.js +2 -2
- package/dist/storage/storage.js +9 -7
- package/dist/storage/storage__local.js +9 -7
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +1 -1
- package/dist/table/row-with-focus-sensor.js +1 -1
- package/dist/table/row.js +5 -5
- package/dist/table/smart-table.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng.js +3 -7
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +3 -7
- package/dist/table-ng/smart-table-ng.js +1 -1
- package/dist/table-ng/table-ng.js +1 -1
- package/dist/tabs/collapsible-more.js +1 -1
- package/dist/tabs/collapsible-tab.js +3 -2
- package/dist/tabs/collapsible-tabs.js +1 -1
- package/dist/tabs/dumb-tabs.d.ts +4 -107
- package/dist/tabs/dumb-tabs.js +6 -12
- package/dist/tabs/smart-tabs.js +3 -3
- package/dist/tabs/tab.d.ts +2 -0
- package/dist/tabs/tabs.js +1 -1
- package/dist/tabs-ng/tabs-ng.js +1 -6
- package/dist/tabs-ng/tabs-ng__template.js +1 -1
- package/dist/tag/tag.d.ts +1 -0
- package/dist/tag/tag.js +5 -4
- package/dist/tags-input/tags-input.js +5 -9
- package/dist/tags-input-ng/tags-input-ng.js +4 -8
- package/dist/tags-list/tags-list.js +1 -1
- package/dist/text/text.js +1 -1
- package/dist/toggle/toggle.d.ts +9 -89
- package/dist/toggle/toggle.js +7 -8
- package/dist/toggle-ng/toggle-ng.js +2 -3
- package/dist/tooltip/tooltip.d.ts +1 -0
- package/dist/tooltip/tooltip.js +6 -3
- package/dist/user-agreement/service.d.ts +2 -2
- package/dist/user-agreement/service.js +9 -13
- package/dist/user-agreement/user-agreement.js +8 -10
- package/dist/user-card/smart-user-card-tooltip.js +6 -11
- package/dist/user-card/tooltip.js +1 -1
- package/dist/user-card/user-card.js +2 -7
- package/dist/user-card-ng/user-card-ng.js +4 -9
- package/package.json +5 -5
- package/webpack.config.js +0 -11
- package/components/global/conic-gradient.d.ts +0 -796
- package/components/global/conic-gradient.js +0 -21
- package/components/global/radial-gradient-mask.d.ts +0 -9
- package/components/global/radial-gradient-mask.js +0 -39
- package/components/global/supports-css.d.ts +0 -2
- package/components/global/supports-css.js +0 -14
- package/components/global/variables_dark.d.ts +0 -3
- package/components/global/variables_dark.js +0 -53
- package/components/loader-inline/inject-styles.d.ts +0 -2
- package/components/loader-inline/inject-styles.js +0 -17
- package/dist/_helpers/inject-styles.js +0 -22
- package/dist/global/conic-gradient.d.ts +0 -796
- package/dist/global/conic-gradient.js +0 -35
- package/dist/global/radial-gradient-mask.d.ts +0 -9
- package/dist/global/radial-gradient-mask.js +0 -49
- package/dist/global/supports-css.d.ts +0 -2
- package/dist/global/supports-css.js +0 -20
- package/dist/global/variables_dark.d.ts +0 -3
- package/dist/global/variables_dark.js +0 -57
- package/dist/loader-inline/inject-styles.d.ts +0 -2
- package/dist/loader-inline/inject-styles.js +0 -11
|
@@ -2,7 +2,6 @@ import React, { PureComponent } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import memoize from '../global/memoize';
|
|
5
|
-
import Theme, { withTheme } from '../global/theme';
|
|
6
5
|
import dataTests from '../global/data-tests';
|
|
7
6
|
import styles from './tabs.css';
|
|
8
7
|
import TabLink from './tab-link';
|
|
@@ -11,7 +10,6 @@ import { CustomItem } from './custom-item';
|
|
|
11
10
|
export { CustomItem };
|
|
12
11
|
class Tabs extends PureComponent {
|
|
13
12
|
static propTypes = {
|
|
14
|
-
theme: PropTypes.string,
|
|
15
13
|
selected: PropTypes.string,
|
|
16
14
|
className: PropTypes.string,
|
|
17
15
|
href: PropTypes.string,
|
|
@@ -23,24 +21,23 @@ class Tabs extends PureComponent {
|
|
|
23
21
|
static defaultProps = {
|
|
24
22
|
onSelect() { }
|
|
25
23
|
};
|
|
26
|
-
static Theme = Theme;
|
|
27
24
|
handleSelect = memoize((key) => () => this.props.onSelect(key));
|
|
28
25
|
getTabTitle = (child, i) => {
|
|
29
26
|
if (child == null || typeof child !== 'object' || child.type === CustomItem) {
|
|
30
27
|
return child;
|
|
31
28
|
}
|
|
32
29
|
const { selected } = this.props;
|
|
33
|
-
const { title, id, disabled, href, className, activeClassName } = child.props;
|
|
30
|
+
const { title, titleProps, id, disabled, href, className, activeClassName } = child.props;
|
|
34
31
|
const key = id || String(i);
|
|
35
32
|
const isSelected = key === selected;
|
|
36
33
|
const titleClasses = classNames(styles.title, className, isSelected && activeClassName, {
|
|
37
34
|
[styles.selected]: isSelected
|
|
38
35
|
});
|
|
39
|
-
return (<TabLink title={title} isSelected={isSelected}
|
|
36
|
+
return (<TabLink title={title} isSelected={isSelected} key={key} href={href} innerClassName={titleClasses} className={titleClasses} disabled={disabled} onPlainLeftClick={this.handleSelect(key)} {...titleProps}/>);
|
|
40
37
|
};
|
|
41
38
|
render() {
|
|
42
|
-
const { className, children, selected,
|
|
43
|
-
const classes = classNames(styles.tabs, className
|
|
39
|
+
const { className, children, selected, autoCollapse, 'data-test': dataTest, ...restProps } = this.props;
|
|
40
|
+
const classes = classNames(styles.tabs, className);
|
|
44
41
|
const childrenArray = React.Children.toArray(children).
|
|
45
42
|
filter(Boolean);
|
|
46
43
|
return (<div className={classes} data-test={dataTests('ring-dumb-tabs', dataTest)}>
|
|
@@ -55,5 +52,4 @@ class Tabs extends PureComponent {
|
|
|
55
52
|
</div>);
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
|
-
|
|
59
|
-
export default ThemedTabs;
|
|
55
|
+
export default Tabs;
|
package/components/tabs/tab.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { PureComponent, ReactNode } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { TabLinkProps } from './tab-link';
|
|
3
4
|
export interface TabProps {
|
|
4
5
|
title?: ReactNode | ((isSelected: boolean, collapsed: boolean | undefined) => ReactNode);
|
|
6
|
+
titleProps?: Partial<TabLinkProps>;
|
|
5
7
|
id?: string | null | undefined;
|
|
6
8
|
className?: string | null | undefined;
|
|
7
9
|
children?: ReactNode;
|
package/components/tabs/tabs.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
@value unit from "../global/global.css";
|
|
4
4
|
@value line-shadow: inset 0 -1px 0 0;
|
|
5
|
-
@value selected-line-shadow: inset 0 -
|
|
5
|
+
@value selected-line-shadow: inset 0 -2px 0 0;
|
|
6
6
|
|
|
7
7
|
.tabs {
|
|
8
8
|
composes: font from "../global/global.css";
|
|
@@ -14,14 +14,10 @@
|
|
|
14
14
|
margin-bottom: calc(unit * 2);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
.titles {
|
|
18
18
|
box-shadow: line-shadow var(--ring-line-color);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.dark .titles {
|
|
22
|
-
box-shadow: line-shadow var(--ring-dark-line-color);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
.title {
|
|
26
22
|
composes: font from "../global/global.css";
|
|
27
23
|
|
|
@@ -58,6 +54,7 @@
|
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
&:global(.focus-visible) {
|
|
57
|
+
color: var(--ring-main-color);
|
|
61
58
|
box-shadow: selected-line-shadow var(--ring-main-color);
|
|
62
59
|
}
|
|
63
60
|
|
|
@@ -75,36 +72,19 @@
|
|
|
75
72
|
margin-left: calc(unit * 3);
|
|
76
73
|
}
|
|
77
74
|
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
color: var(--ring-disabled-color);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.dark .title {
|
|
85
|
-
color: var(--ring-dark-secondary-color);
|
|
86
|
-
|
|
87
|
-
&[disabled] {
|
|
88
|
-
color: var(--ring-text-color);
|
|
89
|
-
}
|
|
75
|
+
.title[disabled] {
|
|
76
|
+
color: var(--ring-disabled-color);
|
|
90
77
|
}
|
|
91
78
|
|
|
92
79
|
.selected {
|
|
93
80
|
cursor: default;
|
|
94
81
|
|
|
95
|
-
|
|
96
|
-
box-shadow: selected-line-shadow var(--ring-text-color);
|
|
82
|
+
color: var(--ring-active-text-color);
|
|
97
83
|
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.dark .selected.selected {
|
|
102
|
-
color: var(--ring-dark-text-color);
|
|
84
|
+
outline: none;
|
|
103
85
|
box-shadow: selected-line-shadow var(--ring-main-color);
|
|
104
|
-
}
|
|
105
86
|
|
|
106
|
-
|
|
107
|
-
color: var(--ring-main-color);
|
|
87
|
+
font-weight: bold;
|
|
108
88
|
}
|
|
109
89
|
|
|
110
90
|
.visible {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
|
|
3
3
|
import angularDecorator, {APP_NAME} from '../../.storybook/angular-decorator';
|
|
4
|
+
import darkStyles from '../global/variables_dark.css';
|
|
4
5
|
|
|
5
6
|
import RingTabs from './tabs-ng';
|
|
6
7
|
|
|
@@ -33,13 +34,15 @@ export const dark = () => {
|
|
|
33
34
|
angular.module(APP_NAME, [RingTabs]);
|
|
34
35
|
|
|
35
36
|
return `
|
|
36
|
-
|
|
37
|
+
<div class="${darkStyles.dark}">
|
|
38
|
+
<rg-tabs class="container container_tabs">
|
|
37
39
|
<rg-tabs-pane x-title="Settings">Settings tab content</rg-tabs-pane>
|
|
38
40
|
<rg-tabs-pane x-title="Access" counter="7">Access tab content</rg-tabs-pane>
|
|
39
41
|
<rg-tabs-pane x-title="Disabled" ng-disabled="true" counter="8">Inaccessible tab content</rg-tabs-pane>
|
|
40
42
|
<rg-tabs-pane x-title="Members">Members tab content</rg-tabs-pane>
|
|
41
43
|
<rg-tabs-pane x-title="Members" counter="666">Members 666 tab content</rg-tabs-pane>
|
|
42
44
|
</rg-tabs>
|
|
45
|
+
</div>
|
|
43
46
|
`;
|
|
44
47
|
};
|
|
45
48
|
|
|
@@ -49,8 +52,13 @@ dark.parameters = {
|
|
|
49
52
|
storyStyles: `
|
|
50
53
|
<style>
|
|
51
54
|
body {
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
margin: 0 !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.container {
|
|
59
|
+
padding: 8px;
|
|
60
|
+
background: var(--ring-content-background-color);
|
|
61
|
+
color: var(--ring-text-color);
|
|
54
62
|
}
|
|
55
63
|
</style>`
|
|
56
64
|
};
|
|
@@ -3,7 +3,6 @@ import angular from 'angular';
|
|
|
3
3
|
import className from 'classnames';
|
|
4
4
|
|
|
5
5
|
import styles from '../tabs/tabs.css';
|
|
6
|
-
import Theme from '../global/theme';
|
|
7
6
|
|
|
8
7
|
import template from './tabs-ng__template';
|
|
9
8
|
|
|
@@ -24,15 +23,13 @@ angularModule.directive('rgTabs', function rgTabsDirective($location, $rootScope
|
|
|
24
23
|
tabParameter: '@',
|
|
25
24
|
tabsClass: '=',
|
|
26
25
|
control: '=?',
|
|
27
|
-
disableLocationChanging: '='
|
|
28
|
-
theme: '@?'
|
|
26
|
+
disableLocationChanging: '='
|
|
29
27
|
},
|
|
30
28
|
|
|
31
29
|
controller: function controller($scope) {
|
|
32
30
|
$scope.panes = [];
|
|
33
31
|
$scope.current = null;
|
|
34
32
|
$scope.styles = styles;
|
|
35
|
-
$scope.theme = $scope.theme || Theme.LIGHT;
|
|
36
33
|
|
|
37
34
|
function getTabIdFromUrl() {
|
|
38
35
|
return $location.search()[$scope.tabParameter];
|
package/components/tag/tag.css
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
3
|
@value unit from "../global/global.css";
|
|
4
|
-
@value background-color: var(--ring-tag-background-color);
|
|
5
4
|
@value max-height: 20px;
|
|
6
5
|
|
|
7
6
|
.tag {
|
|
@@ -19,18 +18,26 @@
|
|
|
19
18
|
margin-bottom: 1px;
|
|
20
19
|
padding: 0 unit;
|
|
21
20
|
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
|
|
22
23
|
vertical-align: top;
|
|
23
24
|
|
|
24
25
|
color: var(--ring-text-color);
|
|
25
26
|
|
|
26
27
|
border: none;
|
|
27
28
|
border-radius: var(--ring-border-radius);
|
|
28
|
-
background-color: background-color;
|
|
29
29
|
|
|
30
30
|
font-size: 12px;
|
|
31
31
|
line-height: var(--ring-line-height);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.tag,
|
|
35
|
+
.tagAngled::before {
|
|
36
|
+
transition: background-color var(--ring-ease);
|
|
37
|
+
|
|
38
|
+
background-color: var(--ring-tag-background-color);
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
.withRemove {
|
|
35
42
|
padding-right: 22px;
|
|
36
43
|
}
|
|
@@ -48,13 +55,24 @@
|
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
.focused,
|
|
51
|
-
.tag:focus {
|
|
58
|
+
.tag:global(.focus-visible) {
|
|
52
59
|
position: relative;
|
|
53
60
|
|
|
54
61
|
outline: none;
|
|
55
62
|
box-shadow: 0 0 0 2px var(--ring-border-hover-color);
|
|
56
63
|
}
|
|
57
64
|
|
|
65
|
+
.focused,
|
|
66
|
+
.focused.tagAngled::before,
|
|
67
|
+
.tag:global(.focus-visible),
|
|
68
|
+
.tagAngled:global(.focus-visible)::before,
|
|
69
|
+
.tag:hover,
|
|
70
|
+
.tagAngled:hover::before {
|
|
71
|
+
transition: none;
|
|
72
|
+
|
|
73
|
+
background-color: var(--ring-tag-hover-background-color);
|
|
74
|
+
}
|
|
75
|
+
|
|
58
76
|
.tagAngled {
|
|
59
77
|
/* it needs to fix vertical alignment broken by "overflow: hidden". Remove this class, when IE11 will be deprecated */
|
|
60
78
|
|
|
@@ -81,8 +99,6 @@
|
|
|
81
99
|
transform-origin: 0 0;
|
|
82
100
|
|
|
83
101
|
border: none;
|
|
84
|
-
|
|
85
|
-
background-color: background-color;
|
|
86
102
|
}
|
|
87
103
|
|
|
88
104
|
&.focused,
|
|
@@ -101,17 +117,24 @@
|
|
|
101
117
|
composes: ellipsis from "../global/global.css";
|
|
102
118
|
}
|
|
103
119
|
|
|
104
|
-
.disabled
|
|
105
|
-
|
|
120
|
+
.disabled.tag,
|
|
121
|
+
.disabled.tagAngled::before {
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
|
|
124
|
+
color: var(--ring-disabled-color);
|
|
125
|
+
background-color: var(--ring-disabled-background-color);
|
|
106
126
|
}
|
|
107
127
|
|
|
108
128
|
.remove {
|
|
109
129
|
position: absolute;
|
|
110
130
|
z-index: 1;
|
|
111
|
-
top:
|
|
131
|
+
top: 1px;
|
|
112
132
|
right: 0;
|
|
113
133
|
|
|
134
|
+
height: auto;
|
|
114
135
|
padding: 0 calc(unit / 2);
|
|
136
|
+
|
|
137
|
+
line-height: calc(unit * 2);
|
|
115
138
|
}
|
|
116
139
|
|
|
117
140
|
.removeIcon.removeIcon {
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React, { HTMLAttributes, PureComponent, ReactNode, RefCallback } from 're
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { IconType } from '../icon/icon';
|
|
4
4
|
export interface TagRenderProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
disabled: boolean;
|
|
5
6
|
ref: RefCallback<HTMLElement>;
|
|
6
7
|
'data-test': string;
|
|
7
8
|
}
|
package/components/tag/tag.js
CHANGED
|
@@ -116,6 +116,7 @@ export default class Tag extends PureComponent {
|
|
|
116
116
|
ref: this.tagRef,
|
|
117
117
|
onClick: this.props.onClick,
|
|
118
118
|
style: { backgroundColor, color: textColor },
|
|
119
|
+
disabled: this.props.disabled,
|
|
119
120
|
children: (<>
|
|
120
121
|
{this.renderAvatar()}
|
|
121
122
|
{this.renderCustomIcon()}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@import "../global/variables.css";
|
|
2
2
|
|
|
3
|
+
@value outerContainer, container, input from "../input/input.css";
|
|
4
|
+
|
|
3
5
|
.tagsInput {
|
|
4
6
|
padding-top: 2px;
|
|
5
7
|
padding-bottom: 2px;
|
|
@@ -30,6 +32,10 @@
|
|
|
30
32
|
|
|
31
33
|
color: var(--ring-disabled-color);
|
|
32
34
|
|
|
35
|
+
& .input {
|
|
36
|
+
background-color: transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
33
39
|
& .underline {
|
|
34
40
|
border-bottom-style: dashed;
|
|
35
41
|
}
|
|
@@ -55,12 +61,12 @@
|
|
|
55
61
|
.tagsSelect {
|
|
56
62
|
margin-bottom: -1px;
|
|
57
63
|
|
|
58
|
-
&
|
|
59
|
-
|
|
64
|
+
& .outerContainer {
|
|
65
|
+
--ring-input-padding-block: 0;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
|
-
&
|
|
63
|
-
|
|
68
|
+
& .container {
|
|
69
|
+
line-height: calc(var(--ring-line-height) - 2px);
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
.toggle {
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
|
|
12
|
-
&:hover {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
&:hover .switch {
|
|
13
|
+
transition: none;
|
|
14
|
+
|
|
15
|
+
background-color: var(--ring-border-hover-color);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
&.disabled {
|
|
@@ -21,42 +21,17 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.label {
|
|
24
|
-
margin-left:
|
|
24
|
+
margin-left: unit;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.leftLabel {
|
|
28
|
-
margin-right:
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.light {
|
|
32
|
-
& .switch {
|
|
33
|
-
background-color: var(--ring-icon-color);
|
|
34
|
-
|
|
35
|
-
&::before {
|
|
36
|
-
background-color: var(--ring-content-background-color);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.dark {
|
|
42
|
-
& .switch {
|
|
43
|
-
background-color: var(--ring-hint-color);
|
|
44
|
-
|
|
45
|
-
&::before {
|
|
46
|
-
background-color: var(--ring-navigation-background-color);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
28
|
+
margin-right: unit;
|
|
49
29
|
}
|
|
50
30
|
|
|
51
31
|
.switchWrapper {
|
|
52
32
|
position: relative;
|
|
53
33
|
|
|
54
34
|
display: inline-block;
|
|
55
|
-
|
|
56
|
-
width: calc(unit * 3);
|
|
57
|
-
height: calc(unit * 2);
|
|
58
|
-
|
|
59
|
-
vertical-align: -3px;
|
|
60
35
|
}
|
|
61
36
|
|
|
62
37
|
.input {
|
|
@@ -82,12 +57,12 @@
|
|
|
82
57
|
|
|
83
58
|
transition: background-color timing-function duration;
|
|
84
59
|
|
|
60
|
+
background-color: var(--ring-icon-color);
|
|
61
|
+
|
|
85
62
|
@nest .input:focus + & {
|
|
86
63
|
box-shadow: inset 0 0 0 1px var(--ring-border-hover-color), 0 0 0 1px var(--ring-border-hover-color);
|
|
87
64
|
}
|
|
88
65
|
|
|
89
|
-
border-radius: unit;
|
|
90
|
-
|
|
91
66
|
&::before {
|
|
92
67
|
position: absolute;
|
|
93
68
|
top: padding;
|
|
@@ -103,6 +78,7 @@
|
|
|
103
78
|
transform: translateX(padding);
|
|
104
79
|
|
|
105
80
|
border-radius: calc(unit * 0.75);
|
|
81
|
+
background-color: var(--ring-content-background-color);
|
|
106
82
|
}
|
|
107
83
|
}
|
|
108
84
|
|
|
@@ -110,8 +86,58 @@
|
|
|
110
86
|
background-color: var(--ring-main-color);
|
|
111
87
|
}
|
|
112
88
|
|
|
113
|
-
|
|
114
|
-
|
|
89
|
+
:checked:hover + .switch {
|
|
90
|
+
background-color: var(--ring-main-hover-color);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.size16 {
|
|
94
|
+
& .switchWrapper {
|
|
95
|
+
width: calc(unit * 3);
|
|
96
|
+
height: calc(unit * 2);
|
|
97
|
+
|
|
98
|
+
vertical-align: -3px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
& .switch {
|
|
102
|
+
border-radius: unit;
|
|
103
|
+
|
|
104
|
+
&::before {
|
|
105
|
+
width: calc(unit * 1.5);
|
|
106
|
+
height: calc(unit * 1.5);
|
|
107
|
+
|
|
108
|
+
border-radius: calc(unit * 0.75);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
113
|
+
& .input:checked + ::before {
|
|
114
|
+
transform: translateX(calc(unit * 1.5 - padding));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.size14 {
|
|
119
|
+
& .switchWrapper {
|
|
120
|
+
width: calc(unit * 3);
|
|
121
|
+
height: 14px;
|
|
122
|
+
|
|
123
|
+
vertical-align: -2px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& .switch {
|
|
127
|
+
border-radius: 7px;
|
|
128
|
+
|
|
129
|
+
&::before {
|
|
130
|
+
width: 10px;
|
|
131
|
+
height: 10px;
|
|
132
|
+
|
|
133
|
+
border-radius: 5px;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* stylelint-disable-next-line selector-max-specificity */
|
|
138
|
+
& .input:checked + ::before {
|
|
139
|
+
transform: translateX(12px);
|
|
140
|
+
}
|
|
115
141
|
}
|
|
116
142
|
|
|
117
143
|
.size20 {
|