@jetbrains/ring-ui 8.0.0-beta.5 → 8.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/babel.config.js +0 -8
- package/components/avatar/avatar-info.js +0 -2
- package/components/avatar/avatar-size.d.ts +0 -4
- package/components/avatar/avatar-size.js +0 -4
- package/components/avatar/avatar.js +0 -6
- package/components/avatar/fallback-avatar.js +0 -28
- package/components/avatar-stack/avatar-stack.js +1 -1
- package/components/banner/banner.css +3 -3
- package/components/button/button.css +4 -4
- package/components/button/button.d.ts +0 -4
- package/components/button/button.js +2 -7
- package/components/collapse/collapse-content.d.ts +7 -0
- package/components/collapse/collapse-content.js +41 -6
- package/components/collapse/collapse-context.d.ts +1 -0
- package/components/collapse/collapse-context.js +1 -0
- package/components/collapse/collapse.d.ts +9 -0
- package/components/collapse/collapse.js +2 -1
- package/components/collapsible-group/collapsible-group.css +6 -0
- package/components/collapsible-group/collapsible-group.d.ts +14 -1
- package/components/collapsible-group/collapsible-group.js +4 -3
- package/components/global/variables.css +18 -28
- package/components/global/variables.interface.d.ts +0 -4
- package/components/global/variables_dark.css +18 -25
- package/components/icon/icon.css +0 -27
- package/components/icon/icon.d.ts +0 -1
- package/components/icon/icon.js +2 -4
- package/components/list/consts.d.ts +0 -1
- package/components/list/consts.js +0 -1
- package/components/list/list.d.ts +0 -4
- package/components/select/select.js +1 -3
- package/components/tag/tag.css +3 -3
- package/package.json +3 -6
- package/components/content-layout/content-layout.css +0 -109
- package/components/content-layout/content-layout.d.ts +0 -20
- package/components/content-layout/content-layout.js +0 -40
- package/components/content-layout/sidebar.d.ts +0 -26
- package/components/content-layout/sidebar.js +0 -71
- package/components/expand/collapsible-group.css +0 -72
- package/components/expand/collapsible-group.d.ts +0 -8
- package/components/expand/collapsible-group.js +0 -14
- package/components/grid/col.d.ts +0 -16
- package/components/grid/col.js +0 -35
- package/components/grid/grid.css +0 -920
- package/components/grid/grid.d.ts +0 -13
- package/components/grid/grid.js +0 -19
- package/components/grid/row.d.ts +0 -21
- package/components/grid/row.js +0 -41
- package/components/old-browsers-message/__mocks__/old-browsers-message.js +0 -1
- package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
- package/components/old-browsers-message/old-browsers-message-stop.js +0 -2
- package/components/old-browsers-message/old-browsers-message.css +0 -26
- package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
- package/components/old-browsers-message/old-browsers-message.js +0 -86
- package/components/old-browsers-message/white-list.d.ts +0 -2
- package/components/old-browsers-message/white-list.js +0 -24
|
@@ -15,8 +15,6 @@
|
|
|
15
15
|
--ring-border-disabled-color: rgb(var(--ring-border-disabled-components)); /* #4E5157 */
|
|
16
16
|
--ring-border-selected-disabled-components: 90, 93, 99;
|
|
17
17
|
--ring-border-selected-disabled-color: rgb(var(--ring-border-selected-disabled-components)); /* #5A5D63 */
|
|
18
|
-
--ring-border-disabled-active-components: var(--ring-border-hover-components);
|
|
19
|
-
--ring-border-disabled-active-color: var(--ring-border-hover-color); /* TODO: remove in 8.0 in favor of --ring-border-hover-color */
|
|
20
18
|
--ring-icon-disabled-components: 111, 115, 122;
|
|
21
19
|
--ring-icon-disabled-color: rgb(var(--ring-icon-disabled-components)); /* #6F737A */
|
|
22
20
|
--ring-border-hover-components: 55, 95, 173;
|
|
@@ -39,18 +37,18 @@
|
|
|
39
37
|
--ring-main-error-color: rgb(var(--ring-main-error-components)); /* #BD5757 */
|
|
40
38
|
--ring-main-error-hover-components: 156, 78, 78;
|
|
41
39
|
--ring-main-error-hover-color: rgb(var(--ring-main-error-hover-components)); /* #9C4E4E */
|
|
42
|
-
--ring-main-warning-components:
|
|
43
|
-
--ring-main-warning-color: rgb(var(--ring-main-warning-components)); /* #
|
|
44
|
-
--ring-main-warning-hover-components:
|
|
45
|
-
--ring-main-warning-hover-color: rgb(var(--ring-main-warning-hover-components)); /* #
|
|
40
|
+
--ring-main-warning-components: 214, 174, 88;
|
|
41
|
+
--ring-main-warning-color: rgb(var(--ring-main-warning-components)); /* #D6AE58 */
|
|
42
|
+
--ring-main-warning-hover-components: 186, 151, 82;
|
|
43
|
+
--ring-main-warning-hover-color: rgb(var(--ring-main-warning-hover-components)); /* #BA9752 */
|
|
46
44
|
--ring-main-purple-components: 149, 90, 224;
|
|
47
45
|
--ring-main-purple-color: rgb(var(--ring-main-purple-components)); /* #955AE0 */
|
|
48
46
|
--ring-main-purple-hover-components: 129, 80, 190;
|
|
49
47
|
--ring-main-purple-hover-color: rgb(var(--ring-main-purple-hover-components)); /* #8150BE */
|
|
50
48
|
--ring-icon-error-components: 227, 119, 116;
|
|
51
49
|
--ring-icon-error-color: rgb(var(--ring-icon-error-components)); /* #E37774 */
|
|
52
|
-
--ring-icon-warning-components:
|
|
53
|
-
--ring-icon-warning-color: rgb(var(--ring-icon-warning-components)); /* #
|
|
50
|
+
--ring-icon-warning-components: 214, 174, 88;
|
|
51
|
+
--ring-icon-warning-color: rgb(var(--ring-icon-warning-components)); /* #D6AE58 */
|
|
54
52
|
--ring-icon-success-components: 95, 173, 101;
|
|
55
53
|
--ring-icon-success-color: rgb(var(--ring-icon-success-components)); /* #5FAD65 */
|
|
56
54
|
--ring-icon-highlight-components: 214, 174, 88;
|
|
@@ -65,10 +63,10 @@
|
|
|
65
63
|
--ring-error-border-color: rgb(var(--ring-error-border-components)); /* #7A4343 */
|
|
66
64
|
--ring-error-border-hover-components: 156, 78, 78;
|
|
67
65
|
--ring-error-border-hover-color: rgb(var(--ring-error-border-hover-components)); /* #9C4E4E */
|
|
68
|
-
--ring-warning-border-components: 130,
|
|
69
|
-
--ring-warning-border-color: rgb(var(--ring-warning-border-components)); /* #
|
|
70
|
-
--ring-warning-border-hover-components:
|
|
71
|
-
--ring-warning-border-hover-color: rgb(var(--ring-warning-border-hover-components)); /* #
|
|
66
|
+
--ring-warning-border-components: 130, 106, 65;
|
|
67
|
+
--ring-warning-border-color: rgb(var(--ring-warning-border-components)); /* #826A41 */
|
|
68
|
+
--ring-warning-border-hover-components: 158, 129, 74;
|
|
69
|
+
--ring-warning-border-hover-color: rgb(var(--ring-warning-border-hover-components)); /* #9E814A */
|
|
72
70
|
--ring-highlight-border-components: 130, 106, 65;
|
|
73
71
|
--ring-highlight-border-color: rgb(var(--ring-highlight-border-components)); /* #826A41 */
|
|
74
72
|
--ring-highlight-border-hover-components: 158, 129, 74;
|
|
@@ -82,8 +80,6 @@
|
|
|
82
80
|
--ring-popup-shadow-color: rgba(0, 0, 0, 0.31);
|
|
83
81
|
--ring-popup-secondary-shadow-color: rgba(0, 0, 0, 0.37);
|
|
84
82
|
--ring-message-shadow-color: rgba(var(--ring-popup-border-components), 0.3);
|
|
85
|
-
--ring-pinned-shadow-components: 0, 0, 0;
|
|
86
|
-
--ring-pinned-shadow-color: rgb(var(--ring-pinned-shadow-components)); /* #000 */ /* TODO remove in 8.0 */
|
|
87
83
|
--ring-button-danger-hover-color: var(--ring-error-color);
|
|
88
84
|
--ring-button-primary-border-components: 153, 187, 255;
|
|
89
85
|
--ring-button-primary-border-color: rgb(var(--ring-button-primary-border-components)); /* #99BBFF */
|
|
@@ -93,16 +89,14 @@
|
|
|
93
89
|
--ring-dialog-shadow: 0 4px 16px var(--ring-popup-shadow-color), 0 2px 6px var(--ring-popup-secondary-shadow-color);
|
|
94
90
|
|
|
95
91
|
/* Text */
|
|
96
|
-
--ring-hint-components: 134, 138, 145;
|
|
97
|
-
--ring-hint-color: rgb(var(--ring-hint-components)); /* #868A91 */ /* TODO: remove in 8.0 */
|
|
98
92
|
--ring-link-components: 153, 187, 255;
|
|
99
93
|
--ring-link-color: rgb(var(--ring-link-components)); /* #99BBFF */
|
|
100
94
|
--ring-link-hover-components: 107, 155, 250;
|
|
101
95
|
--ring-link-hover-color: rgb(var(--ring-link-hover-components)); /* #6B9BFA */
|
|
102
96
|
--ring-error-components: 227, 119, 116;
|
|
103
97
|
--ring-error-color: rgb(var(--ring-error-components)); /* #E37774 */
|
|
104
|
-
--ring-warning-components:
|
|
105
|
-
--ring-warning-color: rgb(var(--ring-warning-components)); /* #
|
|
98
|
+
--ring-warning-components: 242, 197, 92;
|
|
99
|
+
--ring-warning-color: rgb(var(--ring-warning-components)); /* #F2C55C */ /* Prefer using warning icon + regular text color */
|
|
106
100
|
--ring-success-components: 95, 173, 101;
|
|
107
101
|
--ring-success-color: rgb(var(--ring-success-components)); /* #5FAD65 */ /* Prefer using success icon + regular text color */
|
|
108
102
|
--ring-purple-text-components: 181, 137, 236;
|
|
@@ -140,8 +134,8 @@
|
|
|
140
134
|
--ring-tag-hover-background-color: rgb(var(--ring-tag-hover-background-components)); /* #4E5157 */
|
|
141
135
|
--ring-removed-background-components: 94, 56, 56;
|
|
142
136
|
--ring-removed-background-color: rgb(var(--ring-removed-background-components)); /* #5E3838 */
|
|
143
|
-
--ring-warning-background-components:
|
|
144
|
-
--ring-warning-background-color: rgb(var(--ring-warning-background-components)); /* #
|
|
137
|
+
--ring-warning-background-components: 94, 77, 51;
|
|
138
|
+
--ring-warning-background-color: rgb(var(--ring-warning-background-components)); /* #5E4D33 */
|
|
145
139
|
--ring-highlight-background-components: 94, 77, 51;
|
|
146
140
|
--ring-highlight-background-color: rgb(var(--ring-highlight-background-components)); /* #5E4D33 */
|
|
147
141
|
--ring-added-background-components: 55, 82, 57;
|
|
@@ -153,12 +147,11 @@
|
|
|
153
147
|
--ring-disabled-selected-background-components: 67, 69, 74;
|
|
154
148
|
--ring-disabled-selected-background-color: rgb(var(--ring-disabled-selected-background-components)); /* #43454A */
|
|
155
149
|
--ring-button-danger-active-color: var(--ring-error-container-light-color); /* #5E3838 */
|
|
156
|
-
--ring-button-primary-background-color: var(--ring-main-color); /* TODO remove in 8.0 */
|
|
157
150
|
--ring-table-loader-background-color: rgba(var(--ring-content-background-components), 0.5); /* #2B2D3050 */
|
|
158
151
|
--ring-removed-subtle-background-components: 64, 41, 41;
|
|
159
152
|
--ring-removed-subtle-background-color: rgb(var(--ring-removed-subtle-background-components)); /* #402929 */
|
|
160
|
-
--ring-warning-subtle-background-components:
|
|
161
|
-
--ring-warning-subtle-background-color: rgb(var(--ring-warning-subtle-background-components)); /* #
|
|
153
|
+
--ring-warning-subtle-background-components: 61, 50, 35;
|
|
154
|
+
--ring-warning-subtle-background-color: rgb(var(--ring-warning-subtle-background-components)); /* #3D3223 */
|
|
162
155
|
--ring-highlight-subtle-background-components: 61, 50, 35;
|
|
163
156
|
--ring-highlight-subtle-background-color: rgb(var(--ring-highlight-subtle-background-components)); /* #3D3223 */
|
|
164
157
|
--ring-added-subtle-background-components: 37, 54, 39;
|
|
@@ -171,8 +164,8 @@
|
|
|
171
164
|
--ring-success-container-light-color: rgb(var(--ring-success-container-light-components)); /* #222D25 */
|
|
172
165
|
--ring-error-container-light-components: 54, 38, 39;
|
|
173
166
|
--ring-error-container-light-color: rgb(var(--ring-error-container-light-components)); /* #362627 */
|
|
174
|
-
--ring-warning-container-light-components:
|
|
175
|
-
--ring-warning-container-light-color: rgb(var(--ring-warning-container-light-components)); /* #
|
|
167
|
+
--ring-warning-container-light-components: 49, 42, 35;
|
|
168
|
+
--ring-warning-container-light-color: rgb(var(--ring-warning-container-light-components)); /* #312A23 */
|
|
176
169
|
--ring-highlight-container-light-components: 49, 42, 35;
|
|
177
170
|
--ring-highlight-container-light-color: rgb(var(--ring-highlight-container-light-components)); /* #312A23 */
|
|
178
171
|
--ring-grey-container-light-components: 43, 45, 48;
|
package/components/icon/icon.css
CHANGED
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
pointer-events: none;
|
|
13
13
|
|
|
14
|
-
/* TODO remove in 8.0 */
|
|
15
|
-
&[width='10'] {
|
|
16
|
-
vertical-align: -1px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
14
|
&[width='12'] {
|
|
20
15
|
vertical-align: -1px;
|
|
21
16
|
}
|
|
@@ -71,25 +66,3 @@
|
|
|
71
66
|
.white {
|
|
72
67
|
color: var(--ring-white-text-color);
|
|
73
68
|
}
|
|
74
|
-
|
|
75
|
-
.loading {
|
|
76
|
-
animation-name: icon-loading;
|
|
77
|
-
animation-duration: 1200ms;
|
|
78
|
-
animation-iteration-count: infinite;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@keyframes icon-loading {
|
|
82
|
-
0% {
|
|
83
|
-
transform: scale(1);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
50% {
|
|
87
|
-
transform: scale(0.9);
|
|
88
|
-
|
|
89
|
-
opacity: 0.5;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
100% {
|
|
93
|
-
transform: scale(1);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -19,7 +19,6 @@ export interface IconProps extends HTMLAttributes<HTMLElement> {
|
|
|
19
19
|
* @deprecated Use icons with appropriate intrinsic sizes instead
|
|
20
20
|
*/
|
|
21
21
|
width?: number | undefined;
|
|
22
|
-
loading?: boolean | null | undefined;
|
|
23
22
|
suppressSizeWarning?: boolean | null | undefined;
|
|
24
23
|
}
|
|
25
24
|
export default class Icon extends PureComponent<IconProps> {
|
package/components/icon/icon.js
CHANGED
|
@@ -43,13 +43,11 @@ export default class Icon extends PureComponent {
|
|
|
43
43
|
return undefined;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
const { className, size, color,
|
|
46
|
+
const { className, size, color, glyph: Glyph, width, height, suppressSizeWarning, ...restProps } = this.props;
|
|
47
47
|
if (!Glyph) {
|
|
48
48
|
return null;
|
|
49
49
|
}
|
|
50
|
-
const classes = classNames(styles.icon, color && styles[color],
|
|
51
|
-
[styles.loading]: loading,
|
|
52
|
-
}, className);
|
|
50
|
+
const classes = classNames(styles.icon, color && styles[color], className);
|
|
53
51
|
return (<span data-test='ring-icon' {...restProps} className={classes}>
|
|
54
52
|
{typeof Glyph === 'string' ? (<IconSVG src={Glyph} style={this.getStyle()}/>) : (<Glyph className={styles.glyph} style={this.getStyle()}/>)}
|
|
55
53
|
</span>);
|
|
@@ -6,7 +6,6 @@ export var Type;
|
|
|
6
6
|
Type[Type["SEPARATOR"] = 0] = "SEPARATOR";
|
|
7
7
|
Type[Type["LINK"] = 1] = "LINK";
|
|
8
8
|
Type[Type["ITEM"] = 2] = "ITEM";
|
|
9
|
-
Type[Type["HINT"] = 3] = "HINT";
|
|
10
9
|
Type[Type["CUSTOM"] = 4] = "CUSTOM";
|
|
11
10
|
Type[Type["TITLE"] = 5] = "TITLE";
|
|
12
11
|
Type[Type["MARGIN"] = 6] = "MARGIN";
|
|
@@ -43,10 +43,6 @@ export interface ListProps<T = unknown> {
|
|
|
43
43
|
maxHeight?: number | null | undefined;
|
|
44
44
|
activeIndex?: number | null | undefined;
|
|
45
45
|
useMouseUp?: boolean | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated No longer used. Visibility is detected automatically via IntersectionObserver. Will be removed in Ring UI 8.0.
|
|
48
|
-
*/
|
|
49
|
-
visible?: boolean | null | undefined;
|
|
50
46
|
disableMoveOverflow?: boolean | null | undefined;
|
|
51
47
|
compact?: boolean | null | undefined;
|
|
52
48
|
disableScrollToActive?: boolean | null | undefined;
|
|
@@ -47,9 +47,7 @@ const getStyle = memoize((iconsLength) => ({
|
|
|
47
47
|
}));
|
|
48
48
|
const isInputMode = (type) => type === Type.INPUT || type === Type.INPUT_WITHOUT_CONTROLS;
|
|
49
49
|
function getLowerCaseLabel(item) {
|
|
50
|
-
if (List.isItemType(List.ListProps.Type.SEPARATOR, item) ||
|
|
51
|
-
List.isItemType(List.ListProps.Type.HINT, item) ||
|
|
52
|
-
typeof item.label !== 'string') {
|
|
50
|
+
if (List.isItemType(List.ListProps.Type.SEPARATOR, item) || typeof item.label !== 'string') {
|
|
53
51
|
return null;
|
|
54
52
|
}
|
|
55
53
|
return item.label.toLowerCase();
|
package/components/tag/tag.css
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
--ring-tag-container-background-color: var(--ring-added-subtle-background-color);
|
|
94
94
|
--ring-tag-container-hover-background-color: var(--ring-added-background-color);
|
|
95
95
|
--ring-tag-text-color: var(--ring-success-color);
|
|
96
|
-
--ring-tag-icon-color: var(--ring-
|
|
96
|
+
--ring-tag-icon-color: var(--ring-success-color);
|
|
97
97
|
--ring-tag-container-outline-background-color: var(--ring-success-container-light-color);
|
|
98
98
|
--ring-tag-container-outline-hover-background-color: var(--ring-added-subtle-background-color);
|
|
99
99
|
--ring-tag-outline-color: var(--ring-success-border-color);
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
--ring-tag-container-background-color: var(--ring-warning-subtle-background-color);
|
|
105
105
|
--ring-tag-container-hover-background-color: var(--ring-warning-background-color);
|
|
106
106
|
--ring-tag-text-color: var(--ring-warning-color);
|
|
107
|
-
--ring-tag-icon-color: var(--ring-
|
|
107
|
+
--ring-tag-icon-color: var(--ring-warning-color);
|
|
108
108
|
--ring-tag-container-outline-background-color: var(--ring-warning-container-light-color);
|
|
109
109
|
--ring-tag-container-outline-hover-background-color: var(--ring-warning-subtle-background-color);
|
|
110
110
|
--ring-tag-outline-color: var(--ring-warning-border-color);
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
--ring-tag-container-background-color: var(--ring-removed-subtle-background-color);
|
|
116
116
|
--ring-tag-container-hover-background-color: var(--ring-removed-background-color);
|
|
117
117
|
--ring-tag-text-color: var(--ring-error-tag-text-color);
|
|
118
|
-
--ring-tag-icon-color: var(--ring-
|
|
118
|
+
--ring-tag-icon-color: var(--ring-error-tag-text-color);
|
|
119
119
|
--ring-tag-container-outline-background-color: var(--ring-error-container-light-color);
|
|
120
120
|
--ring-tag-container-outline-hover-background-color: var(--ring-removed-subtle-background-color);
|
|
121
121
|
--ring-tag-outline-color: var(--ring-error-border-color);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.7",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
119
119
|
"@rollup/plugin-replace": "^6.0.3",
|
|
120
120
|
"@storybook/addon-a11y": "10.4.6",
|
|
121
|
-
"@storybook/addon-docs": "
|
|
122
|
-
"@storybook/addon-themes": "
|
|
121
|
+
"@storybook/addon-docs": "10.4.6",
|
|
122
|
+
"@storybook/addon-themes": "10.4.6",
|
|
123
123
|
"@storybook/csf": "^0.1.13",
|
|
124
124
|
"@storybook/react-webpack5": "10.4.6",
|
|
125
125
|
"@storybook/test-runner": "^0.24.4",
|
|
@@ -226,8 +226,6 @@
|
|
|
226
226
|
"@types/util-deprecate": "^1.0.4",
|
|
227
227
|
"babel-loader": "10.1.1",
|
|
228
228
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
229
|
-
"babel-plugin-transform-define": "^2.1.4",
|
|
230
|
-
"browserslist": "^4.28.4",
|
|
231
229
|
"change-case": "^4.1.1",
|
|
232
230
|
"classnames": "^2.5.1",
|
|
233
231
|
"combokeys": "^3.0.1",
|
|
@@ -251,7 +249,6 @@
|
|
|
251
249
|
"react-compiler-runtime": "^1.0.0",
|
|
252
250
|
"react-movable": "^3.4.1",
|
|
253
251
|
"react-virtualized": "^9.22.6",
|
|
254
|
-
"react-waypoint": "^10.3.0",
|
|
255
252
|
"scrollbar-width": "^3.1.1",
|
|
256
253
|
"simply-uuid": "^1.0.1",
|
|
257
254
|
"sniffr": "^1.4.0",
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
@import '../global/variables.css';
|
|
2
|
-
|
|
3
|
-
@value extra-small-screen-media, small-screen-media from '../global/global.css';
|
|
4
|
-
|
|
5
|
-
.contentLayout {
|
|
6
|
-
--ring-content-layout-sidebar-width: calc(var(--ring-unit) * 30);
|
|
7
|
-
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-flow: row nowrap;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.contentLayoutContent {
|
|
15
|
-
align-self: flex-start;
|
|
16
|
-
flex-grow: 2;
|
|
17
|
-
|
|
18
|
-
width: 100%; /* without this hack IE11 render contentLayoutContent wider than its container */
|
|
19
|
-
margin: 0 calc(var(--ring-unit) * 4);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.sidebarContainer {
|
|
23
|
-
min-width: var(--ring-content-layout-sidebar-width);
|
|
24
|
-
max-width: var(--ring-content-layout-sidebar-width);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.sidebarContainerRight {
|
|
28
|
-
order: 1;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.sidebar {
|
|
32
|
-
overflow: auto;
|
|
33
|
-
|
|
34
|
-
box-sizing: border-box;
|
|
35
|
-
min-width: var(--ring-content-layout-sidebar-width);
|
|
36
|
-
max-width: var(--ring-content-layout-sidebar-width);
|
|
37
|
-
height: 100%;
|
|
38
|
-
padding-right: calc(var(--ring-unit) * 2);
|
|
39
|
-
padding-left: calc(var(--ring-unit) * 4);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.sidebarRight {
|
|
43
|
-
padding-right: calc(var(--ring-unit) * 4);
|
|
44
|
-
padding-left: calc(var(--ring-unit) * 2);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.sidebarFixedTop {
|
|
48
|
-
top: 0;
|
|
49
|
-
bottom: 0;
|
|
50
|
-
|
|
51
|
-
&.sidebarFixedTop {
|
|
52
|
-
position: fixed;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.sidebarFixedBottom.sidebarFixedBottom {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: auto;
|
|
59
|
-
bottom: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.bottomMarker {
|
|
63
|
-
position: absolute;
|
|
64
|
-
bottom: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.contentLayoutResponsive {
|
|
68
|
-
@media extra-small-screen-media, small-screen-media {
|
|
69
|
-
& .contentLayoutContent {
|
|
70
|
-
margin: 0 16px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
& .sidebar {
|
|
74
|
-
position: absolute;
|
|
75
|
-
top: 0;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
left: 0;
|
|
78
|
-
|
|
79
|
-
box-sizing: content-box;
|
|
80
|
-
padding: 0 16px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
& .sidebarFixedTop {
|
|
84
|
-
position: fixed;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
& .sidebarFixedBottom {
|
|
88
|
-
top: auto;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
& .sidebarRight {
|
|
92
|
-
right: 0;
|
|
93
|
-
left: auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
& .sidebarContainer {
|
|
97
|
-
min-width: 0;
|
|
98
|
-
max-width: 0;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
@media extra-small-screen-media {
|
|
103
|
-
& .sidebar {
|
|
104
|
-
width: 80%;
|
|
105
|
-
min-width: 0;
|
|
106
|
-
max-width: none;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
export interface ContentLayoutProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
-
responsive: boolean;
|
|
4
|
-
contentClassName?: string | null | undefined;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* @name Content Layout
|
|
8
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
9
|
-
*/
|
|
10
|
-
export default class ContentLayout extends Component<ContentLayoutProps> {
|
|
11
|
-
static defaultProps: {
|
|
12
|
-
responsive: boolean;
|
|
13
|
-
};
|
|
14
|
-
state: {
|
|
15
|
-
contentNode: null;
|
|
16
|
-
};
|
|
17
|
-
saveContentNode: (contentNode: HTMLElement | null) => void;
|
|
18
|
-
render(): import("react").JSX.Element;
|
|
19
|
-
}
|
|
20
|
-
export { default as Sidebar } from './sidebar';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Children, cloneElement, Component } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import Sidebar from './sidebar';
|
|
4
|
-
import styles from './content-layout.css';
|
|
5
|
-
/**
|
|
6
|
-
* @name Content Layout
|
|
7
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
8
|
-
*/
|
|
9
|
-
export default class ContentLayout extends Component {
|
|
10
|
-
static defaultProps = {
|
|
11
|
-
responsive: true,
|
|
12
|
-
};
|
|
13
|
-
state = {
|
|
14
|
-
contentNode: null,
|
|
15
|
-
};
|
|
16
|
-
saveContentNode = (contentNode) => {
|
|
17
|
-
this.setState({ contentNode });
|
|
18
|
-
};
|
|
19
|
-
render() {
|
|
20
|
-
const { children, className, contentClassName, responsive, ...restProps } = this.props;
|
|
21
|
-
const classes = classNames(styles.contentLayout, className, {
|
|
22
|
-
[styles.contentLayoutResponsive]: responsive,
|
|
23
|
-
});
|
|
24
|
-
const contentClasses = classNames(styles.contentLayoutContent, contentClassName);
|
|
25
|
-
const childrenArray = Children.toArray(children);
|
|
26
|
-
const sidebarChild = childrenArray.filter((child) => !!child && typeof child === 'object' && 'type' in child && child.type === Sidebar)[0];
|
|
27
|
-
const sidebar = sidebarChild &&
|
|
28
|
-
cloneElement(sidebarChild, {
|
|
29
|
-
contentNode: this.state.contentNode,
|
|
30
|
-
});
|
|
31
|
-
const contentChildren = childrenArray.filter(child => child !== sidebarChild);
|
|
32
|
-
return (<div data-test='content-layout' {...restProps} className={classes}>
|
|
33
|
-
{sidebar}
|
|
34
|
-
<main className={contentClasses} ref={this.saveContentNode}>
|
|
35
|
-
{contentChildren}
|
|
36
|
-
</main>
|
|
37
|
-
</div>);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
export { default as Sidebar } from './sidebar';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
import { Waypoint } from 'react-waypoint';
|
|
3
|
-
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
-
right?: boolean | null | undefined;
|
|
5
|
-
containerClassName?: string | null | undefined;
|
|
6
|
-
fixedClassName?: string | null | undefined;
|
|
7
|
-
contentNode?: HTMLElement | null | undefined;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* @name Sidebar
|
|
11
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
12
|
-
*/
|
|
13
|
-
export default class Sidebar extends Component<SidebarProps> {
|
|
14
|
-
state: {
|
|
15
|
-
topIsOutside: boolean;
|
|
16
|
-
bottomIsOutside: boolean;
|
|
17
|
-
sidebarVisibleHeight: undefined;
|
|
18
|
-
};
|
|
19
|
-
sidebarNode?: HTMLElement | null;
|
|
20
|
-
handleTopWaypoint: ({ currentPosition }: Waypoint.CallbackArgs) => void;
|
|
21
|
-
handleBottomWaypoint: ({ currentPosition, waypointTop }: Waypoint.CallbackArgs) => void;
|
|
22
|
-
shouldUseFixation(): boolean;
|
|
23
|
-
shouldFixateBottom(): boolean;
|
|
24
|
-
sidebarRef: (node: HTMLElement | null) => void;
|
|
25
|
-
render(): import("react").JSX.Element;
|
|
26
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { Waypoint } from 'react-waypoint';
|
|
4
|
-
import styles from './content-layout.css';
|
|
5
|
-
const ABOVE = 'above';
|
|
6
|
-
const INSIDE = 'inside';
|
|
7
|
-
/**
|
|
8
|
-
* @name Sidebar
|
|
9
|
-
* @deprecated Will be removed in Ring UI 8.0.
|
|
10
|
-
*/
|
|
11
|
-
export default class Sidebar extends Component {
|
|
12
|
-
state = {
|
|
13
|
-
topIsOutside: true,
|
|
14
|
-
bottomIsOutside: true,
|
|
15
|
-
sidebarVisibleHeight: undefined,
|
|
16
|
-
};
|
|
17
|
-
sidebarNode;
|
|
18
|
-
handleTopWaypoint = ({ currentPosition }) => {
|
|
19
|
-
this.setState({ topIsOutside: currentPosition === ABOVE });
|
|
20
|
-
};
|
|
21
|
-
handleBottomWaypoint = ({ currentPosition, waypointTop }) => {
|
|
22
|
-
this.setState({
|
|
23
|
-
sidebarVisibleHeight: waypointTop,
|
|
24
|
-
bottomIsOutside: currentPosition !== INSIDE,
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
shouldUseFixation() {
|
|
28
|
-
const { contentNode } = this.props;
|
|
29
|
-
const { sidebarNode } = this;
|
|
30
|
-
if (!contentNode || !sidebarNode) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
return contentNode.offsetHeight >= sidebarNode.offsetHeight;
|
|
34
|
-
}
|
|
35
|
-
shouldFixateBottom() {
|
|
36
|
-
const { topIsOutside, bottomIsOutside } = this.state;
|
|
37
|
-
return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
|
|
38
|
-
}
|
|
39
|
-
sidebarRef = (node) => {
|
|
40
|
-
this.sidebarNode = node;
|
|
41
|
-
};
|
|
42
|
-
render() {
|
|
43
|
-
const { right, children, className, containerClassName, fixedClassName, contentNode, ...restProps } = this.props;
|
|
44
|
-
const { topIsOutside, bottomIsOutside, sidebarVisibleHeight } = this.state;
|
|
45
|
-
const shouldFixateTop = bottomIsOutside && topIsOutside && this.shouldUseFixation();
|
|
46
|
-
const shouldFixateBottom = this.shouldFixateBottom();
|
|
47
|
-
const containerClasses = classNames(styles.sidebarContainer, containerClassName, {
|
|
48
|
-
[styles.sidebarContainerRight]: right,
|
|
49
|
-
});
|
|
50
|
-
const classes = classNames(styles.sidebar, className, {
|
|
51
|
-
[styles.sidebarRight]: right,
|
|
52
|
-
[styles.sidebarFixedTop]: shouldFixateTop,
|
|
53
|
-
[styles.sidebarFixedBottom]: shouldFixateBottom,
|
|
54
|
-
[fixedClassName ?? '']: shouldFixateTop || shouldFixateBottom,
|
|
55
|
-
});
|
|
56
|
-
const style = {
|
|
57
|
-
maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined,
|
|
58
|
-
};
|
|
59
|
-
return (<aside className={containerClasses} ref={this.sidebarRef}>
|
|
60
|
-
<Waypoint onEnter={this.handleTopWaypoint} onLeave={this.handleTopWaypoint}/>
|
|
61
|
-
|
|
62
|
-
<div {...restProps} style={style} className={classes}>
|
|
63
|
-
{children}
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<div className={styles.bottomMarker}>
|
|
67
|
-
<Waypoint onEnter={this.handleBottomWaypoint} onLeave={this.handleBottomWaypoint}/>
|
|
68
|
-
</div>
|
|
69
|
-
</aside>);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/* Deprecated alias of `../collapsible-group/collapsible-group.css` (removed in Ring UI 8.0).
|
|
2
|
-
Class names are forwarded via `composes` so the canonical stylesheet stays the single source of
|
|
3
|
-
the actual rules, while `import styles from '.../components/expand/collapsible-group.css'` keeps
|
|
4
|
-
returning the full token map. */
|
|
5
|
-
|
|
6
|
-
.expand {
|
|
7
|
-
composes: expand from '../collapsible-group/collapsible-group.css';
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.collapseRoot {
|
|
11
|
-
composes: collapseRoot from '../collapsible-group/collapsible-group.css';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.hovered {
|
|
15
|
-
composes: hovered from '../collapsible-group/collapsible-group.css';
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.expanded {
|
|
19
|
-
composes: expanded from '../collapsible-group/collapsible-group.css';
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.focused {
|
|
23
|
-
composes: focused from '../collapsible-group/collapsible-group.css';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.header {
|
|
27
|
-
composes: header from '../collapsible-group/collapsible-group.css';
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.headerButton {
|
|
31
|
-
composes: headerButton from '../collapsible-group/collapsible-group.css';
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.headerStatic {
|
|
35
|
-
composes: headerStatic from '../collapsible-group/collapsible-group.css';
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.headerContent {
|
|
39
|
-
composes: headerContent from '../collapsible-group/collapsible-group.css';
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.avatarGroup {
|
|
43
|
-
composes: avatarGroup from '../collapsible-group/collapsible-group.css';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.title {
|
|
47
|
-
composes: title from '../collapsible-group/collapsible-group.css';
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.subtitleGroup {
|
|
51
|
-
composes: subtitleGroup from '../collapsible-group/collapsible-group.css';
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.subtitle {
|
|
55
|
-
composes: subtitle from '../collapsible-group/collapsible-group.css';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.subtitleChevron {
|
|
59
|
-
composes: subtitleChevron from '../collapsible-group/collapsible-group.css';
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.toggle {
|
|
63
|
-
composes: toggle from '../collapsible-group/collapsible-group.css';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.toggleIcon {
|
|
67
|
-
composes: toggleIcon from '../collapsible-group/collapsible-group.css';
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.body {
|
|
71
|
-
composes: body from '../collapsible-group/collapsible-group.css';
|
|
72
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type CollapsibleGroupProps } from '../collapsible-group/collapsible-group';
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
|
|
4
|
-
* Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
|
|
5
|
-
*/
|
|
6
|
-
declare const DeprecatedCollapsibleGroup: import("react").ForwardRefExoticComponent<Omit<CollapsibleGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export type { CollapsibleGroupProps };
|
|
8
|
-
export default DeprecatedCollapsibleGroup;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
import deprecate from 'util-deprecate';
|
|
3
|
-
import CollapsibleGroup from '../collapsible-group/collapsible-group';
|
|
4
|
-
const warnDeprecation = deprecate(() => { }, '`CollapsibleGroup` from `@jetbrains/ring-ui/components/expand/collapsible-group` is deprecated and will be removed in Ring UI 8.0. Import it from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.');
|
|
5
|
-
/**
|
|
6
|
-
* @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
|
|
7
|
-
* Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
|
|
8
|
-
*/
|
|
9
|
-
const DeprecatedCollapsibleGroup = forwardRef((props, ref) => {
|
|
10
|
-
warnDeprecation();
|
|
11
|
-
return <CollapsibleGroup ref={ref} {...props}/>;
|
|
12
|
-
});
|
|
13
|
-
DeprecatedCollapsibleGroup.displayName = 'CollapsibleGroup';
|
|
14
|
-
export default DeprecatedCollapsibleGroup;
|
package/components/grid/col.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, type HTMLAttributes } from 'react';
|
|
2
|
-
export interface ColProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
-
'data-test'?: string | null | undefined;
|
|
4
|
-
xs?: boolean | number | null | undefined;
|
|
5
|
-
sm?: boolean | number | null | undefined;
|
|
6
|
-
md?: boolean | number | null | undefined;
|
|
7
|
-
lg?: boolean | number | null | undefined;
|
|
8
|
-
xsOffset?: number | null | undefined;
|
|
9
|
-
smOffset?: number | null | undefined;
|
|
10
|
-
mdOffset?: number | null | undefined;
|
|
11
|
-
lgOffset?: number | null | undefined;
|
|
12
|
-
reverse?: boolean | null | undefined;
|
|
13
|
-
}
|
|
14
|
-
export default class Col extends Component<ColProps> {
|
|
15
|
-
render(): import("react").JSX.Element;
|
|
16
|
-
}
|