@jetbrains/ring-ui 5.0.65 → 5.0.66

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.
@@ -4,6 +4,8 @@
4
4
  display: flex;
5
5
  align-items: center;
6
6
 
7
+ max-width: 100%;
8
+
7
9
  &.fullSize {
8
10
  width: 100%;
9
11
  }
@@ -13,13 +15,8 @@
13
15
  }
14
16
  }
15
17
 
16
- .heading.heading {
17
- margin-bottom: 0;
18
-
19
- line-height: 28px;
20
- }
21
-
22
18
  .headingWrapperButton {
19
+ max-width: 100%;
23
20
  margin: 0;
24
21
  padding: 0;
25
22
 
@@ -43,10 +40,15 @@
43
40
  }
44
41
 
45
42
  .heading {
43
+ overflow: hidden;
44
+
46
45
  padding: 6px 0;
47
46
 
48
47
  cursor: pointer;
49
48
 
49
+ white-space: nowrap;
50
+ text-overflow: ellipsis;
51
+
50
52
  border-radius: var(--ring-border-radius);
51
53
 
52
54
  &:hover {
@@ -60,6 +62,12 @@
60
62
  }
61
63
  }
62
64
 
65
+ .heading.heading {
66
+ margin-bottom: 0;
67
+
68
+ line-height: 28px;
69
+ }
70
+
63
71
  .input {
64
72
  margin-bottom: 2px;
65
73
  padding: 0;
@@ -125,3 +133,19 @@
125
133
  .level3 {
126
134
  font-size: 14px;
127
135
  }
136
+
137
+ .sizeS {
138
+ max-width: calc(unit * 12);
139
+ }
140
+
141
+ .sizeM {
142
+ max-width: calc(unit * 30);
143
+ }
144
+
145
+ .sizeL {
146
+ max-width: calc(unit * 50);
147
+ }
148
+
149
+ .sizeFULL {
150
+ max-width: 100%;
151
+ }
@@ -26,12 +26,12 @@ export const EditableHeading = (props) => {
26
26
  esc: isCancelDisabled ? noop : onCancel
27
27
  }), [isSaveDisabled, isCancelDisabled, onSave, onCancel]);
28
28
  const classes = classNames(styles.editableHeading, className, {
29
- [styles.fullSize]: size === Size.FULL,
29
+ [styles.fullSize]: isEditing && size === Size.FULL,
30
30
  [styles.isEditing]: isEditing,
31
31
  [styles.error]: hasError,
32
32
  [styles.disabled]: disabled
33
33
  });
34
- const headingClasses = classNames(styles.heading, headingClassName);
34
+ const headingClasses = classNames(styles.heading, headingClassName, styles[`size${size}`]);
35
35
  const inputClasses = classNames('ring-js-shortcuts', styles.input, inputStyles[`size${size}`], styles[`level${level}`], inputClassName);
36
36
  const onHeadingClick = React.useCallback(() => {
37
37
  if (disabled) {
@@ -906,7 +906,7 @@ Select.propTypes = {
906
906
  left: PropTypes.number,
907
907
  renderOptimization: PropTypes.bool,
908
908
  ringPopupTarget: PropTypes.string,
909
- error: PropTypes.bool,
909
+ error: PropTypes.string,
910
910
  hint: List.ListHint.propTypes.label,
911
911
  add: PropTypes.object,
912
912
  type: PropTypes.oneOf(Object.values(Type)),
@@ -30,7 +30,7 @@ import 'combokeys';
30
30
  import '../global/sniffer.js';
31
31
  import 'sniffr';
32
32
 
33
- var modules_6e69b0fe = {"unit":"8px","editableHeading":"editableHeading_rui_0870","fullSize":"fullSize_rui_0870","isEditing":"isEditing_rui_0870","heading":"heading_rui_0870","headingWrapperButton":"headingWrapperButton_rui_0870","disabled":"disabled_rui_0870","input":"input_rui_0870","error":"error_rui_0870","button":"button_rui_0870","errorText":"errorText_rui_0870","level1":"level1_rui_0870","level2":"level2_rui_0870","level3":"level3_rui_0870"};
33
+ var modules_6e69b0fe = {"unit":"8px","editableHeading":"editableHeading_rui_0870","fullSize":"fullSize_rui_0870","isEditing":"isEditing_rui_0870","headingWrapperButton":"headingWrapperButton_rui_0870","disabled":"disabled_rui_0870","heading":"heading_rui_0870","input":"input_rui_0870","error":"error_rui_0870","button":"button_rui_0870","errorText":"errorText_rui_0870","level1":"level1_rui_0870","level2":"level2_rui_0870","level3":"level3_rui_0870","sizeS":"sizeS_rui_0870","sizeM":"sizeM_rui_0870","sizeL":"sizeL_rui_0870","sizeFULL":"sizeFULL_rui_0870"};
34
34
 
35
35
  function noop() {}
36
36
  const EditableHeading = props => {
@@ -70,12 +70,12 @@ const EditableHeading = props => {
70
70
  esc: isCancelDisabled ? noop : onCancel
71
71
  }), [isSaveDisabled, isCancelDisabled, onSave, onCancel]);
72
72
  const classes = classNames(modules_6e69b0fe.editableHeading, className, {
73
- [modules_6e69b0fe.fullSize]: size === Size.FULL,
73
+ [modules_6e69b0fe.fullSize]: isEditing && size === Size.FULL,
74
74
  [modules_6e69b0fe.isEditing]: isEditing,
75
75
  [modules_6e69b0fe.error]: hasError,
76
76
  [modules_6e69b0fe.disabled]: disabled
77
77
  });
78
- const headingClasses = classNames(modules_6e69b0fe.heading, headingClassName);
78
+ const headingClasses = classNames(modules_6e69b0fe.heading, headingClassName, modules_6e69b0fe[`size${size}`]);
79
79
  const inputClasses = classNames('ring-js-shortcuts', modules_6e69b0fe.input, modules_88cfaf40[`size${size}`], modules_6e69b0fe[`level${level}`], inputClassName);
80
80
  const onHeadingClick = React.useCallback(() => {
81
81
  if (disabled) {
@@ -1134,7 +1134,7 @@ Select.propTypes = {
1134
1134
  left: PropTypes.number,
1135
1135
  renderOptimization: PropTypes.bool,
1136
1136
  ringPopupTarget: PropTypes.string,
1137
- error: PropTypes.bool,
1137
+ error: PropTypes.string,
1138
1138
  hint: List.ListHint.propTypes.label,
1139
1139
  add: PropTypes.object,
1140
1140
  type: PropTypes.oneOf(Object.values(Type)),