@jetbrains/ring-ui 5.0.48 → 5.0.50

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.
@@ -26,9 +26,11 @@ export function applyTheme(theme, container) {
26
26
  if (theme === Theme.DARK) {
27
27
  container.classList.remove(defaultStyles.light);
28
28
  container.classList.add(styles.dark);
29
+ container.classList.add('ring-ui-theme-dark');
29
30
  }
30
31
  else {
31
32
  container.classList.remove(styles.dark);
33
+ container.classList.remove('ring-ui-theme-dark');
32
34
  container.classList.add(defaultStyles.light);
33
35
  }
34
36
  }
@@ -778,9 +778,12 @@ export default class Select extends Component {
778
778
  const ariaProps = this.state.showPopup
779
779
  ? {
780
780
  'aria-owns': this.listId,
781
- 'aria-activedescendant': activeItemId
781
+ 'aria-activedescendant': activeItemId,
782
+ 'aria-label': this.props.label ?? undefined
782
783
  }
783
- : {};
784
+ : {
785
+ 'aria-label': this.props.label ?? undefined
786
+ };
784
787
  switch (this.props.type) {
785
788
  case Type.INPUT_WITHOUT_CONTROLS:
786
789
  case Type.INPUT: return (<div ref={this.nodeRef} className={classNames(classes, styles.inputMode)} data-test={dataTests('ring-select', dataTest)}>
@@ -30,8 +30,10 @@ function applyTheme(theme, container) {
30
30
  if (theme === Theme.DARK) {
31
31
  container.classList.remove(modules_6381a4b3.light);
32
32
  container.classList.add(modules_59717246.dark);
33
+ container.classList.add('ring-ui-theme-dark');
33
34
  } else {
34
35
  container.classList.remove(modules_59717246.dark);
36
+ container.classList.remove('ring-ui-theme-dark');
35
37
  container.classList.add(modules_6381a4b3.light);
36
38
  }
37
39
  }
@@ -911,7 +911,7 @@ class Select extends Component {
911
911
  };
912
912
  }
913
913
  renderSelect(activeItemId) {
914
- var _this$_popup5, _this$_popup5$list;
914
+ var _this$props$label2, _this$props$label3, _this$_popup5, _this$_popup5$list;
915
915
  const dataTest = this.props['data-test'];
916
916
  const {
917
917
  shortcutsEnabled
@@ -927,8 +927,11 @@ class Select extends Component {
927
927
  }, icons);
928
928
  const ariaProps = this.state.showPopup ? {
929
929
  'aria-owns': this.listId,
930
- 'aria-activedescendant': activeItemId
931
- } : {};
930
+ 'aria-activedescendant': activeItemId,
931
+ 'aria-label': (_this$props$label2 = this.props.label) !== null && _this$props$label2 !== void 0 ? _this$props$label2 : undefined
932
+ } : {
933
+ 'aria-label': (_this$props$label3 = this.props.label) !== null && _this$props$label3 !== void 0 ? _this$props$label3 : undefined
934
+ };
932
935
  switch (this.props.type) {
933
936
  case Type.INPUT_WITHOUT_CONTROLS:
934
937
  case Type.INPUT:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "5.0.48",
3
+ "version": "5.0.50",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -259,5 +259,5 @@
259
259
  "node": ">=14.0",
260
260
  "npm": ">=6.0.0"
261
261
  },
262
- "gitHead": "ebfc0f32d9882ba00c6c05b5d9a89e0255f1b1c3"
262
+ "gitHead": "f9a86300840ce2acfa803bef4d7b2d554c481a9c"
263
263
  }