@jetbrains/ring-ui 5.0.89 → 5.0.91

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.
Files changed (66) hide show
  1. package/components/button/button.css +1 -0
  2. package/components/button-group/button-group.css +3 -3
  3. package/components/button-ng/button-ng.examples.js +0 -3
  4. package/components/checkbox/checkbox.css +6 -11
  5. package/components/checkbox/checkbox.js +1 -1
  6. package/components/global/theme.d.ts +8 -1
  7. package/components/global/theme.js +22 -8
  8. package/components/global/variables.css +5 -3
  9. package/components/global/variables_dark.css +11 -9
  10. package/components/header/header.css +2 -1
  11. package/components/loader-inline/loader-inline.css +2 -1
  12. package/components/message/message.js +13 -11
  13. package/components/place-under-ng/place-under-ng.examples.js +3 -4
  14. package/components/popup/position.js +5 -3
  15. package/components/progress-bar/progress-bar.css +2 -1
  16. package/components/progress-bar-ng/progress-bar-ng.examples.js +0 -4
  17. package/components/radio/radio.css +3 -3
  18. package/components/table-legacy-ng/table-legacy-ng.examples.js +0 -5
  19. package/components/tabs/tabs.css +2 -1
  20. package/components/tabs-ng/tabs-ng.examples.js +0 -34
  21. package/dist/_helpers/theme.js +29 -10
  22. package/dist/checkbox/checkbox.js +1 -1
  23. package/dist/data-list/data-list.js +1 -1
  24. package/dist/data-list/item.js +1 -1
  25. package/dist/data-list/title.js +1 -1
  26. package/dist/data-list-ng/data-list-ng.js +1 -1
  27. package/dist/dropdown-menu/dropdown-menu.js +1 -1
  28. package/dist/global/theme.d.ts +8 -1
  29. package/dist/global/theme.js +1 -1
  30. package/dist/header/header.js +1 -1
  31. package/dist/header/profile.js +1 -1
  32. package/dist/header/smart-profile.js +1 -1
  33. package/dist/list/list.js +1 -1
  34. package/dist/list/list__item.js +1 -1
  35. package/dist/list/list__users-groups-source.js +1 -1
  36. package/dist/message/message.js +6 -4
  37. package/dist/pager/pager.js +1 -1
  38. package/dist/pager-ng/pager-ng.js +1 -1
  39. package/dist/popup/position.js +7 -3
  40. package/dist/popup-menu/popup-menu.js +1 -1
  41. package/dist/query-assist/query-assist.js +1 -1
  42. package/dist/query-assist/query-assist__suggestions.js +1 -1
  43. package/dist/query-assist-ng/query-assist-ng.js +1 -1
  44. package/dist/select/select.js +1 -1
  45. package/dist/select/select__filter.js +1 -1
  46. package/dist/select/select__popup.js +1 -1
  47. package/dist/select-ng/select-ng.js +1 -1
  48. package/dist/select-ng/select-ng__lazy.js +1 -1
  49. package/dist/style.css +1 -1
  50. package/dist/table/header.js +1 -1
  51. package/dist/table/row-with-focus-sensor.js +1 -1
  52. package/dist/table/row.js +1 -1
  53. package/dist/table/smart-table.js +1 -1
  54. package/dist/table/table.js +1 -1
  55. package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
  56. package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
  57. package/dist/table-ng/smart-table-ng.js +1 -1
  58. package/dist/table-ng/table-ng.js +1 -1
  59. package/dist/tabs/collapsible-more.js +1 -1
  60. package/dist/tabs/collapsible-tabs.js +1 -1
  61. package/dist/tabs/dumb-tabs.js +1 -1
  62. package/dist/tabs/smart-tabs.js +1 -1
  63. package/dist/tabs/tabs.js +1 -1
  64. package/dist/tags-input/tags-input.js +1 -1
  65. package/dist/tags-input-ng/tags-input-ng.js +1 -1
  66. package/package.json +12 -11
@@ -86,6 +86,7 @@
86
86
 
87
87
  &[disabled].active {
88
88
  background-color: var(--ring-disabled-selected-background-color);
89
+ box-shadow: button-shadow var(--ring-border-selected-disabled-color);
89
90
  }
90
91
 
91
92
  &[disabled],
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  .buttonGroup .button[disabled] {
42
- --ring-button-group-button-border-color: var(--ring-border-unselected-disabled-color);
42
+ --ring-button-group-button-border-color: var(--ring-border-disabled-color);
43
43
 
44
44
  /* stylelint-disable-next-line selector-max-specificity */
45
45
  &::before,
@@ -55,7 +55,7 @@
55
55
 
56
56
  background-color: var(--ring-disabled-background-color);
57
57
 
58
- box-shadow: 0 1px var(--ring-border-unselected-disabled-color) inset, 0 -1px var(--ring-border-unselected-disabled-color) inset;
58
+ box-shadow: 0 1px var(--ring-border-disabled-color) inset, 0 -1px var(--ring-border-disabled-color) inset;
59
59
  }
60
60
 
61
61
  /* stylelint-disable-next-line selector-max-specificity */
@@ -130,7 +130,7 @@
130
130
 
131
131
  /* stylelint-disable-next-line selector-max-specificity */
132
132
  .buttonGroup .button.active[disabled] {
133
- box-shadow: button-shadow var(--ring-border-disabled-color);
133
+ box-shadow: button-shadow var(--ring-border-selected-disabled-color);
134
134
  }
135
135
 
136
136
  .split {
@@ -8,7 +8,6 @@ import angularDecorator, {APP_NAME} from '../../.storybook/angular-decorator';
8
8
  import IconNG from '../icon-ng/icon-ng';
9
9
  import CheckboxNG from '../checkbox-ng/checkbox-ng';
10
10
  import Theme from '../global/theme';
11
- import styles from '../global/variables_dark.css';
12
11
 
13
12
  import ButtonNG from './button-ng';
14
13
 
@@ -87,8 +86,6 @@ export const basic = () => {
87
86
  return `
88
87
  <div ng-controller="testCtrl">
89
88
  <div class="buttons">${renderAllButtons()}</div>
90
-
91
- <div class="buttons ${styles.dark}">${renderAllButtons()}</div>
92
89
  </div>
93
90
  `;
94
91
 
@@ -43,6 +43,9 @@
43
43
  .icon.icon {
44
44
  position: absolute;
45
45
 
46
+ top: -1px;
47
+ left: -1px;
48
+
46
49
  width: calc(unit * 2);
47
50
  height: calc(unit * 2);
48
51
 
@@ -58,18 +61,10 @@
58
61
 
59
62
  .check {
60
63
  composes: icon;
61
-
62
- top: -1px;
63
- left: -1px;
64
64
  }
65
65
 
66
66
  .minus {
67
67
  composes: icon;
68
-
69
- top: 1px;
70
- left: 2px;
71
-
72
- opacity: 0;
73
68
  }
74
69
 
75
70
  .input {
@@ -116,20 +111,20 @@
116
111
 
117
112
  /* stylelint-disable-next-line selector-max-specificity */
118
113
  &[disabled][disabled] + .cell {
119
- border-color: var(--ring-border-unselected-disabled-color);
114
+ border-color: var(--ring-border-disabled-color);
120
115
  background-color: var(--ring-disabled-background-color);
121
116
  }
122
117
 
123
118
  /* stylelint-disable-next-line selector-max-specificity */
124
119
  &[disabled]:checked + .cell,
125
120
  &[disabled]:indeterminate + .cell {
126
- border-color: var(--ring-border-disabled-color);
121
+ border-color: var(--ring-border-selected-disabled-color);
127
122
  }
128
123
 
129
124
  /* stylelint-disable-next-line selector-max-specificity */
130
125
  &[disabled]:checked + .cell .check,
131
126
  &[disabled]:indeterminate + .cell .minus {
132
- color: var(--ring-border-disabled-color);
127
+ color: var(--ring-border-selected-disabled-color);
133
128
  }
134
129
 
135
130
  /* stylelint-disable-next-line selector-max-specificity */
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import checkmarkIcon from '@jetbrains/icons/checkmark-14px';
5
- import minusIcon from '@jetbrains/icons/remove-10px';
5
+ import minusIcon from '@jetbrains/icons/remove-14px';
6
6
  import Icon from '../icon/icon';
7
7
  import { refObject } from '../global/prop-types';
8
8
  import composeRefs from '../global/composeRefs';
@@ -1,14 +1,21 @@
1
- import React, { HTMLAttributes } from 'react';
1
+ import React, { HTMLAttributes, ReactElement } from 'react';
2
2
  declare enum Theme {
3
3
  AUTO = "auto",
4
4
  LIGHT = "light",
5
5
  DARK = "dark"
6
6
  }
7
7
  export declare function useTheme(): Theme.LIGHT | Theme.DARK;
8
+ export declare function useThemeClasses(theme: Theme): string;
9
+ export interface WithThemeClassesProps {
10
+ theme: Theme;
11
+ children: (classes: string) => ReactElement;
12
+ }
13
+ export declare function WithThemeClasses({ theme, children }: WithThemeClassesProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
8
14
  export declare function applyTheme(theme: Theme.DARK | Theme.LIGHT, container: HTMLElement): void;
9
15
  export interface ThemeProviderProps extends HTMLAttributes<HTMLDivElement> {
10
16
  theme?: Theme;
11
17
  passToPopups?: boolean;
18
+ target?: HTMLElement;
12
19
  }
13
20
  export declare const ThemeProvider: React.ForwardRefExoticComponent<ThemeProviderProps & React.RefAttributes<HTMLDivElement>>;
14
21
  export default Theme;
@@ -22,6 +22,18 @@ export function useTheme() {
22
22
  }, []);
23
23
  return dark ? Theme.DARK : Theme.LIGHT;
24
24
  }
25
+ export function useThemeClasses(theme) {
26
+ const systemTheme = useTheme();
27
+ const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
28
+ return classNames({
29
+ [styles.dark]: resolvedTheme === Theme.DARK,
30
+ [defaultStyles.light]: resolvedTheme === Theme.LIGHT
31
+ });
32
+ }
33
+ export function WithThemeClasses({ theme, children }) {
34
+ const themeClasses = useThemeClasses(theme);
35
+ return children(themeClasses);
36
+ }
25
37
  export function applyTheme(theme, container) {
26
38
  if (theme === Theme.DARK) {
27
39
  container.classList.remove(defaultStyles.light);
@@ -34,20 +46,22 @@ export function applyTheme(theme, container) {
34
46
  container.classList.add(defaultStyles.light);
35
47
  }
36
48
  }
37
- export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.AUTO, className, passToPopups, children, ...restProps }, ref) {
49
+ export const ThemeProvider = forwardRef(function ThemeProvider({ theme = Theme.AUTO, className, passToPopups, children, target, ...restProps }, ref) {
38
50
  const systemTheme = useTheme();
39
51
  const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
40
52
  const id = useMemo(() => getUID('popups-with-theme-'), []);
41
- const themeClasses = classNames({
42
- [styles.dark]: resolvedTheme === Theme.DARK,
43
- [defaultStyles.light]: resolvedTheme === Theme.LIGHT
44
- });
53
+ useEffect(() => {
54
+ if (target != null) {
55
+ applyTheme(resolvedTheme, target);
56
+ }
57
+ }, [resolvedTheme, target]);
58
+ const themeClasses = useThemeClasses(theme);
45
59
  const parentTarget = useContext(PopupTargetContext);
46
- return (<div ref={ref} className={classNames(className, themeClasses)} {...restProps}>{passToPopups
60
+ return (<div ref={ref} className={target != null ? undefined : classNames(className, themeClasses)} {...restProps}>{passToPopups
47
61
  ? (<PopupTarget id={id}>
48
- {target => (<>
62
+ {popupTarget => (<>
49
63
  {children}
50
- {createPortal(<div className={themeClasses}>{target}</div>, parentTarget && getPopupContainer(parentTarget) || document.body)}
64
+ {createPortal(<div className={themeClasses}>{popupTarget}</div>, parentTarget && getPopupContainer(parentTarget) || document.body)}
51
65
  </>)}
52
66
  </PopupTarget>)
53
67
  : children}
@@ -13,10 +13,12 @@
13
13
  --ring-icon-color: rgb(var(--ring-icon-components)); /* #b8d1e5 */
14
14
  --ring-icon-secondary-components: 153, 153, 153;
15
15
  --ring-icon-secondary-color: rgb(var(--ring-icon-secondary-components)); /* #999 */
16
- --ring-border-disabled-components: 212, 212, 212;
17
- --ring-border-disabled-color: rgb(var(--ring-border-disabled-components)); /* #d4d4d4 */
16
+ --ring-border-disabled-components: 232, 232, 232;
17
+ --ring-border-disabled-color: rgb(var(--ring-border-disabled-components)); /* #e8e8e8 */
18
+ --ring-border-selected-disabled-components: 212, 212, 212;
19
+ --ring-border-selected-disabled-color: rgb(var(--ring-border-selected-disabled-components)); /* #d4d4d4 */
18
20
  --ring-border-unselected-disabled-components: 232, 232, 232;
19
- --ring-border-unselected-disabled-color: rgb(var(--ring-border-unselected-disabled-components)); /* #e8e8e8 */
21
+ --ring-border-unselected-disabled-color: rgb(var(--ring-border-unselected-disabled-components)); /* #e8e8e8 */ /* TODO remove in 6.0 */
20
22
  --ring-icon-disabled-components: 212, 212, 212;
21
23
  --ring-icon-disabled-color: rgb(var(--ring-icon-disabled-components)); /* #d4d4d4 */
22
24
  --ring-border-hover-components: 128, 198, 255;
@@ -11,10 +11,12 @@
11
11
  --ring-icon-color: rgb(var(--ring-icon-components)); /* #80929d */
12
12
  --ring-icon-secondary-components: 128, 146, 157;
13
13
  --ring-icon-secondary-color: rgb(var(--ring-icon-secondary-components)); /* #80929d */
14
- --ring-border-disabled-components: 71, 81, 89;
15
- --ring-border-disabled-color: rgb(var(--ring-border-disabled-components)); /* #475159 */
14
+ --ring-border-disabled-components: 54, 54, 54;
15
+ --ring-border-disabled-color: rgb(var(--ring-border-disabled-components)); /* #363636 */
16
+ --ring-border-selected-disabled-components: 54, 54, 54;
17
+ --ring-border-selected-disabled-color: rgb(var(--ring-border-selected-disabled-components)); /* #363636 */
16
18
  --ring-border-unselected-disabled-components: 54, 54, 54;
17
- --ring-border-unselected-disabled-color: rgb(var(--ring-border-unselected-disabled-components)); /* #363636 */
19
+ --ring-border-unselected-disabled-color: rgb(var(--ring-border-unselected-disabled-components)); /* #363636 */ /* TODO remove in 6.0 */
18
20
  --ring-icon-disabled-components: 80, 82, 83;
19
21
  --ring-icon-disabled-color: rgb(var(--ring-icon-disabled-components)); /* #505253 */
20
22
  --ring-border-hover-components: 112, 177, 230;
@@ -59,8 +61,8 @@
59
61
  --ring-heading-color: var(--ring-text-color);
60
62
  --ring-secondary-components: 128, 146, 157;
61
63
  --ring-secondary-color: rgb(var(--ring-secondary-components)); /* #80929d */
62
- --ring-disabled-components: 128, 146, 157;
63
- --ring-disabled-color: rgb(var(--ring-disabled-components)); /* #80929d */
64
+ --ring-disabled-components: 81, 95, 104;
65
+ --ring-disabled-color: rgb(var(--ring-disabled-components)); /* #515F68 */
64
66
 
65
67
  /* Background */
66
68
  --ring-content-background-components: 35, 39, 43;
@@ -85,10 +87,10 @@
85
87
  --ring-warning-background-color: rgb(var(--ring-warning-background-components)); /* #593d01 */
86
88
  --ring-added-background-components: 54, 89, 71;
87
89
  --ring-added-background-color: rgb(var(--ring-added-background-components)); /* #365947 */
88
- --ring-disabled-background-components: 48, 48, 48;
89
- --ring-disabled-background-color: rgb(var(--ring-disabled-background-components)); /* #303030 */
90
- --ring-disabled-selected-background-components: 54, 54, 54;
91
- --ring-disabled-selected-background-color: rgb(var(--ring-disabled-selected-background-components)); /* #363636 */
90
+ --ring-disabled-background-components: 54, 54, 54;
91
+ --ring-disabled-background-color: rgb(var(--ring-disabled-background-components)); /* #363636 */
92
+ --ring-disabled-selected-background-components: 44, 47, 51;
93
+ --ring-disabled-selected-background-color: rgb(var(--ring-disabled-selected-background-components)); /* #2C2F33 */
92
94
  --ring-button-danger-active-components: 38, 8, 10;
93
95
  --ring-button-danger-active-color: rgb(var(--ring-button-danger-active-components)); /* #26080a */
94
96
  --ring-button-primary-background-components: 0, 126, 229;
@@ -11,7 +11,8 @@
11
11
  --ring-header-link-color: var(--ring-link-color);
12
12
  }
13
13
 
14
- .dark {
14
+ .dark,
15
+ :global(.ring-ui-theme-dark) {
15
16
  --ring-header-link-color: var(--ring-text-color);
16
17
  }
17
18
 
@@ -8,7 +8,8 @@
8
8
  --ring-loader-inline-stops: #ff00eb, #bd3bff, #008eff, #58ba00, #f48700, #ff00eb;
9
9
  }
10
10
 
11
- .dark {
11
+ .dark,
12
+ :global(.ring-ui-theme-dark) {
12
13
  /* stylelint-disable-next-line color-no-hex */
13
14
  --ring-loader-inline-stops: #ff2eef, #d178ff, #289fff, #88d444, #ffe000, #ff2eef;
14
15
  }
@@ -6,7 +6,7 @@ import Popup from '../popup/popup';
6
6
  import { Directions } from '../popup/popup.consts';
7
7
  import Icon from '../icon/icon';
8
8
  import Button from '../button/button';
9
- import Theme, { ThemeProvider } from '../global/theme';
9
+ import Theme, { ThemeProvider, WithThemeClasses } from '../global/theme';
10
10
  import darkStyles from '../global/variables_dark.css';
11
11
  import styles from './message.css';
12
12
  /**
@@ -96,17 +96,19 @@ export default class Message extends Component {
96
96
  ? [this.props.direction]
97
97
  : this.props.directions;
98
98
  const { direction } = this.state;
99
- return (<Popup ref={this.popupRef} hidden={false} directions={popupDirections} className={classes} offset={UNIT * 2} onDirectionChange={this._onDirectionChange} {...popupProps}>
100
- <ThemeProvider theme={theme} passToPopups>
101
- {direction && (<div className={tailClasses} style={getTailOffsets(this.getTailOffset())[direction]}/>)}
99
+ return (<WithThemeClasses theme={theme}>
100
+ {themeClasses => (<Popup ref={this.popupRef} hidden={false} directions={popupDirections} className={classNames(classes, themeClasses)} offset={UNIT * 2} onDirectionChange={this._onDirectionChange} {...popupProps}>
101
+ <ThemeProvider theme={theme} passToPopups>
102
+ {direction && (<div className={tailClasses} style={getTailOffsets(this.getTailOffset())[direction]}/>)}
102
103
 
103
- {icon && <Icon className={styles.icon} glyph={icon}/>}
104
- {title && <h1 data-test="rgMessageTitle" className={styles.title}>{title}</h1>}
105
- {children && <div className={styles.description}>{children}</div>}
106
- {(onClose || buttonProps) && (<Button className={styles.button} onClick={onClose} primary {...buttonProps}>{translations.gotIt}</Button>)}
107
- {onDismiss && <Button onClick={onDismiss} text>{translations.dismiss}</Button>}
108
- </ThemeProvider>
109
- </Popup>);
104
+ {icon && <Icon className={styles.icon} glyph={icon}/>}
105
+ {title && <h1 data-test="rgMessageTitle" className={styles.title}>{title}</h1>}
106
+ {children && <div className={styles.description}>{children}</div>}
107
+ {(onClose || buttonProps) && (<Button className={styles.button} onClick={onClose} primary {...buttonProps}>{translations.gotIt}</Button>)}
108
+ {onDismiss && <Button onClick={onDismiss} text>{translations.dismiss}</Button>}
109
+ </ThemeProvider>
110
+ </Popup>)}
111
+ </WithThemeClasses>);
110
112
  }
111
113
  }
112
114
  Message.propTypes = {
@@ -68,8 +68,7 @@ basic.parameters = {
68
68
  right: 0;
69
69
  width: 50%;
70
70
  padding: 16px;
71
- background-color: #666;
72
- color: #fff;
71
+ background-color: var(--ring-selected-background-color);
73
72
  }
74
73
 
75
74
  .head {
@@ -81,14 +80,14 @@ basic.parameters = {
81
80
  top: 0;
82
81
  width: 100%;
83
82
  padding: 16px;
84
- background-color: #CCC;
83
+ background-color: var(--ring-hover-background-color);
85
84
  }
86
85
 
87
86
  .scrollable {
88
87
  height: 1000px;
89
88
  padding: 16px;
90
89
  padding-top: 64px;
91
- background-color: #EEE;
90
+ background-color: var(--ring-sidebar-background-color);
92
91
  }
93
92
  </style>
94
93
  `
@@ -46,7 +46,9 @@ function verticalOverflow(styles, scrollingCoordinates, attrs) {
46
46
  const viewportMinX = scrollingCoordinates.top + attrs.sidePadding;
47
47
  const viewportMaxX = scrollingCoordinates.top + containerHeight - attrs.sidePadding;
48
48
  const topOverflow = Math.max(viewportMinX - styles.top, 0);
49
- const popupHeight = attrs.popup.clientHeight;
49
+ const popupHeight = attrs.maxHeight && typeof attrs.maxHeight === 'number'
50
+ ? Math.min(attrs.popup.scrollHeight, attrs.maxHeight)
51
+ : attrs.popup.scrollHeight;
50
52
  const verticalDiff = styles.top + popupHeight - viewportMaxX;
51
53
  const bottomOverflow = Math.max(verticalDiff, 0);
52
54
  return topOverflow + bottomOverflow;
@@ -128,7 +130,7 @@ export default function position(attrs) {
128
130
  const overflowAttrs = { ...attrs, popup };
129
131
  const directionsMatrix = getPositionStyles(popup, anchorRect, anchorLeft, anchorTop, offset);
130
132
  if (!autoPositioning || directions.length === 1) {
131
- styles = directionsMatrix[directions[0]];
133
+ styles = { ...directionsMatrix[directions[0]] };
132
134
  chosenDirection = directions[0];
133
135
  }
134
136
  else {
@@ -143,7 +145,7 @@ export default function position(attrs) {
143
145
  horizontalOverflow(stylesB, scroll, overflowAttrs);
144
146
  return overflowA - overflowB;
145
147
  });
146
- styles = sortedByIncreasingOverflow[0].styles;
148
+ styles = { ...sortedByIncreasingOverflow[0].styles };
147
149
  chosenDirection = sortedByIncreasingOverflow[0].direction;
148
150
  }
149
151
  // because of the anchor negative margin top and left also may become negative
@@ -8,7 +8,8 @@
8
8
  --ring-progress-bar-line-background-color: rgba(255, 255, 255, 0.6);
9
9
  }
10
10
 
11
- .dark {
11
+ .dark,
12
+ :global(.ring-ui-theme-dark) {
12
13
  --ring-progress-bar-background-color: rgba(255, 255, 255, 0.3);
13
14
  --ring-progress-bar-line-background-color: rgba(255, 255, 255, 0.4);
14
15
  }
@@ -1,7 +1,6 @@
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';
5
4
 
6
5
  import RingProgressBar from './progress-bar-ng';
7
6
 
@@ -34,9 +33,6 @@ export const basic = () => {
34
33
  <div style="height: 25px; padding-top: 25px;">
35
34
  <rg-progress-bar label="'Progress'" value="ctrl.value" class="example-progress"></rg-progress-bar>
36
35
  </div>
37
- <div class="${darkStyles.dark}" style="height: 25px; background: var(--ring-content-background-color); padding-top: 25px;">
38
- <rg-progress-bar label="'Progress'" value="ctrl.value" class="example-progress"></rg-progress-bar>
39
- </div>
40
36
  <div style="height: 25px; background: #F0F0F0; padding-top: 25px;">
41
37
  <rg-progress-bar label="'Progress'" value="ctrl.value" class="example-progress"></rg-progress-bar>
42
38
  </div>
@@ -76,7 +76,7 @@
76
76
  opacity: 0;
77
77
 
78
78
  &[disabled] + .circle {
79
- border-color: var(--ring-border-unselected-disabled-color);
79
+ border-color: var(--ring-border-disabled-color);
80
80
  background-color: var(--ring-disabled-background-color);
81
81
  }
82
82
 
@@ -105,11 +105,11 @@
105
105
 
106
106
  /* stylelint-disable-next-line selector-max-specificity */
107
107
  &[disabled]:checked + .circle {
108
- border-color: var(--ring-border-disabled-color);
108
+ border-color: var(--ring-border-selected-disabled-color);
109
109
 
110
110
  /* stylelint-disable-next-line selector-max-specificity */
111
111
  &::after {
112
- background-color: var(--ring-border-disabled-color);
112
+ background-color: var(--ring-border-selected-disabled-color);
113
113
  }
114
114
  }
115
115
 
@@ -173,7 +173,6 @@ export const withSidebar = () => {
173
173
  <rg-legacy-table-title>Avatar</rg-legacy-table-title>
174
174
  <rg-legacy-table-title>Check</rg-legacy-table-title>
175
175
  <rg-legacy-table-title active>Name</rg-legacy-table-title>
176
- <rg-legacy-table-title></rg-legacy-table-title>
177
176
  </rg-legacy-table-header>
178
177
 
179
178
  <rg-legacy-table-row row-item="item" ng-repeat="item in ctrl.itemsArray">
@@ -183,10 +182,6 @@ export const withSidebar = () => {
183
182
  </rg-legacy-table-column>
184
183
  <rg-legacy-table-checkbox-cell aria-label="Toggle row checked state"></rg-legacy-table-checkbox-cell>
185
184
  <rg-legacy-table-column limited>{{::item.name }}</rg-legacy-table-column>
186
- <rg-legacy-table-column>
187
- <rg-sidebar-toggle-button ng-show="item.active"
188
- model="ctrl.isShowSideBar"></rg-sidebar-toggle-button>
189
- </rg-legacy-table-column>
190
185
  </rg-legacy-table-row>
191
186
  </rg-legacy-table>
192
187
  </div>
@@ -9,7 +9,8 @@
9
9
  --ring-selected-tab-color: var(--ring-text-color);
10
10
  }
11
11
 
12
- .dark {
12
+ .dark,
13
+ :global(.ring-ui-theme-dark) {
13
14
  --ring-selected-tab-color: var(--ring-main-color);
14
15
  }
15
16
 
@@ -1,7 +1,6 @@
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';
5
4
 
6
5
  import RingTabs from './tabs-ng';
7
6
 
@@ -29,36 +28,3 @@ export const basic = () => {
29
28
  };
30
29
 
31
30
  basic.storyName = 'basic';
32
-
33
- export const dark = () => {
34
- angular.module(APP_NAME, [RingTabs]);
35
-
36
- return `
37
- <div class="${darkStyles.dark}">
38
- <rg-tabs class="container container_tabs">
39
- <rg-tabs-pane x-title="Settings">Settings tab content</rg-tabs-pane>
40
- <rg-tabs-pane x-title="Access" counter="7">Access tab content</rg-tabs-pane>
41
- <rg-tabs-pane x-title="Disabled" ng-disabled="true" counter="8">Inaccessible tab content</rg-tabs-pane>
42
- <rg-tabs-pane x-title="Members">Members tab content</rg-tabs-pane>
43
- <rg-tabs-pane x-title="Members" counter="666">Members 666 tab content</rg-tabs-pane>
44
- </rg-tabs>
45
- </div>
46
- `;
47
- };
48
-
49
- dark.storyName = 'dark';
50
-
51
- dark.parameters = {
52
- storyStyles: `
53
- <style>
54
- body {
55
- margin: 0 !important;
56
- }
57
-
58
- .container {
59
- padding: 8px;
60
- background: var(--ring-content-background-color);
61
- color: var(--ring-text-color);
62
- }
63
- </style>`
64
- };
@@ -26,6 +26,22 @@ function useTheme() {
26
26
  }, []);
27
27
  return dark ? Theme.DARK : Theme.LIGHT;
28
28
  }
29
+ function useThemeClasses(theme) {
30
+ const systemTheme = useTheme();
31
+ const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
32
+ return classNames({
33
+ [modules_59717246.dark]: resolvedTheme === Theme.DARK,
34
+ [modules_6381a4b3.light]: resolvedTheme === Theme.LIGHT
35
+ });
36
+ }
37
+ function WithThemeClasses(_ref) {
38
+ let {
39
+ theme,
40
+ children
41
+ } = _ref;
42
+ const themeClasses = useThemeClasses(theme);
43
+ return children(themeClasses);
44
+ }
29
45
  function applyTheme(theme, container) {
30
46
  if (theme === Theme.DARK) {
31
47
  container.classList.remove(modules_6381a4b3.light);
@@ -37,31 +53,34 @@ function applyTheme(theme, container) {
37
53
  container.classList.add(modules_6381a4b3.light);
38
54
  }
39
55
  }
40
- const ThemeProvider = /*#__PURE__*/forwardRef(function ThemeProvider(_ref, ref) {
56
+ const ThemeProvider = /*#__PURE__*/forwardRef(function ThemeProvider(_ref2, ref) {
41
57
  let {
42
58
  theme = Theme.AUTO,
43
59
  className,
44
60
  passToPopups,
45
61
  children,
62
+ target,
46
63
  ...restProps
47
- } = _ref;
64
+ } = _ref2;
48
65
  const systemTheme = useTheme();
49
66
  const resolvedTheme = theme === Theme.AUTO ? systemTheme : theme;
50
67
  const id = useMemo(() => getUID('popups-with-theme-'), []);
51
- const themeClasses = classNames({
52
- [modules_59717246.dark]: resolvedTheme === Theme.DARK,
53
- [modules_6381a4b3.light]: resolvedTheme === Theme.LIGHT
54
- });
68
+ useEffect(() => {
69
+ if (target != null) {
70
+ applyTheme(resolvedTheme, target);
71
+ }
72
+ }, [resolvedTheme, target]);
73
+ const themeClasses = useThemeClasses(theme);
55
74
  const parentTarget = useContext(PopupTargetContext);
56
75
  return /*#__PURE__*/React.createElement("div", _extends({
57
76
  ref: ref,
58
- className: classNames(className, themeClasses)
77
+ className: target != null ? undefined : classNames(className, themeClasses)
59
78
  }, restProps), passToPopups ? /*#__PURE__*/React.createElement(PopupTarget, {
60
79
  id: id
61
- }, target => /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
80
+ }, popupTarget => /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement("div", {
62
81
  className: themeClasses
63
- }, target), parentTarget && getPopupContainer(parentTarget) || document.body))) : children);
82
+ }, popupTarget), parentTarget && getPopupContainer(parentTarget) || document.body))) : children);
64
83
  });
65
84
  var Theme$1 = Theme;
66
85
 
67
- export { Theme$1 as T, ThemeProvider as a, applyTheme as b, modules_59717246 as m, useTheme as u };
86
+ export { Theme$1 as T, WithThemeClasses as W, ThemeProvider as a, useThemeClasses as b, applyTheme as c, modules_59717246 as m, useTheme as u };
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import checkmarkIcon from '@jetbrains/icons/checkmark-14px';
6
- import minusIcon from '@jetbrains/icons/remove-10px';
6
+ import minusIcon from '@jetbrains/icons/remove-14px';
7
7
  import Icon from '../icon/icon.js';
8
8
  import { refObject } from '../global/prop-types.js';
9
9
  import composeRefs from '../global/composeRefs.js';
@@ -42,7 +42,7 @@ import '../global/controls-height.js';
42
42
  import '../_helpers/button__classes.js';
43
43
  import '../checkbox/checkbox.js';
44
44
  import '@jetbrains/icons/checkmark-14px';
45
- import '@jetbrains/icons/remove-10px';
45
+ import '@jetbrains/icons/remove-14px';
46
46
  import '../_helpers/checkbox.js';
47
47
 
48
48
  class DataList extends PureComponent {
@@ -29,7 +29,7 @@ import '../global/prop-types.js';
29
29
  import '../global/composeRefs.js';
30
30
  import '../checkbox/checkbox.js';
31
31
  import '@jetbrains/icons/checkmark-14px';
32
- import '@jetbrains/icons/remove-10px';
32
+ import '@jetbrains/icons/remove-14px';
33
33
  import '../_helpers/checkbox.js';
34
34
  import '../global/get-uid.js';
35
35
 
@@ -9,7 +9,7 @@ import '../global/prop-types.js';
9
9
  export { T as default } from '../_helpers/title.js';
10
10
  import '../global/composeRefs.js';
11
11
  import '@jetbrains/icons/checkmark-14px';
12
- import '@jetbrains/icons/remove-10px';
12
+ import '@jetbrains/icons/remove-14px';
13
13
  import '../icon/icon.js';
14
14
  import 'util-deprecate';
15
15
  import '../icon/icon__constants.js';
@@ -48,7 +48,7 @@ import '../_helpers/button__classes.js';
48
48
  import '../_helpers/title.js';
49
49
  import '../checkbox/checkbox.js';
50
50
  import '@jetbrains/icons/checkmark-14px';
51
- import '@jetbrains/icons/remove-10px';
51
+ import '@jetbrains/icons/remove-14px';
52
52
  import '../_helpers/checkbox.js';
53
53
  import '../data-list/selection.js';
54
54
 
@@ -36,7 +36,7 @@ import '../global/url.js';
36
36
  import '../avatar/fallback-avatar.js';
37
37
  import '../checkbox/checkbox.js';
38
38
  import '@jetbrains/icons/checkmark-14px';
39
- import '@jetbrains/icons/remove-10px';
39
+ import '@jetbrains/icons/remove-14px';
40
40
  import '../icon/icon.js';
41
41
  import '../icon/icon__constants.js';
42
42
  import '../_helpers/icon.js';