@vitessce/vit-s 3.5.11 → 3.6.0
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/dist/index.js +27266 -23266
- package/dist-tsc/DebugWindow.js +1 -1
- package/dist-tsc/LoadingIndicator.js +3 -3
- package/dist-tsc/TitleInfo.d.ts.map +1 -1
- package/dist-tsc/TitleInfo.js +8 -9
- package/dist-tsc/VitS.d.ts +3 -0
- package/dist-tsc/VitS.d.ts.map +1 -1
- package/dist-tsc/VitS.js +11 -6
- package/dist-tsc/VitessceGrid.d.ts.map +1 -1
- package/dist-tsc/VitessceGrid.js +5 -5
- package/dist-tsc/VitessceGrid.test.js +2 -6
- package/dist-tsc/Warning.js +1 -1
- package/dist-tsc/mui-utils.d.ts.map +1 -1
- package/dist-tsc/mui-utils.js +2 -0
- package/dist-tsc/shared-mui/components.d.ts.map +1 -1
- package/dist-tsc/shared-mui/components.js +5 -5
- package/dist-tsc/shared-mui/container.d.ts +10 -1
- package/dist-tsc/shared-mui/container.d.ts.map +1 -1
- package/dist-tsc/shared-mui/container.js +199 -190
- package/dist-tsc/shared-mui/styles.d.ts +3 -3
- package/dist-tsc/shared-mui/styles.js +9 -6
- package/dist-tsc/shared-plot-options/CellColorEncodingOption.js +2 -2
- package/dist-tsc/shared-plot-options/OptionSelect.d.ts.map +1 -1
- package/dist-tsc/shared-plot-options/OptionSelect.js +3 -3
- package/dist-tsc/shared-plot-options/OptionsContainer.js +2 -2
- package/dist-tsc/shared-plot-options/styles.d.ts +9 -1
- package/dist-tsc/shared-plot-options/styles.d.ts.map +1 -1
- package/dist-tsc/shared-plot-options/styles.js +4 -3
- package/dist-tsc/shared-warning-styles.d.ts +9 -1
- package/dist-tsc/shared-warning-styles.d.ts.map +1 -1
- package/dist-tsc/shared-warning-styles.js +2 -2
- package/dist-tsc/title-styles.d.ts +9 -1
- package/dist-tsc/title-styles.d.ts.map +1 -1
- package/dist-tsc/title-styles.js +2 -2
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.d.ts +0 -6
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.js +1 -5
- package/dist-tsc/vitessce-grid-layout/VitessceGridLayout.test.js +2 -6
- package/package.json +17 -17
- package/src/DebugWindow.js +1 -1
- package/src/LoadingIndicator.js +3 -3
- package/src/TitleInfo.js +9 -10
- package/src/VitS.js +19 -11
- package/src/VitessceGrid.js +7 -3
- package/src/VitessceGrid.test.jsx +3 -8
- package/src/Warning.js +1 -1
- package/src/mui-utils.js +2 -0
- package/src/shared-mui/components.js +11 -8
- package/src/shared-mui/container.js +206 -190
- package/src/shared-mui/styles.js +9 -7
- package/src/shared-plot-options/CellColorEncodingOption.js +2 -2
- package/src/shared-plot-options/OptionSelect.js +3 -4
- package/src/shared-plot-options/OptionsContainer.js +2 -2
- package/src/shared-plot-options/styles.js +4 -3
- package/src/shared-warning-styles.js +2 -2
- package/src/title-styles.js +2 -2
- package/src/vitessce-grid-layout/VitessceGridLayout.js +1 -6
- package/src/vitessce-grid-layout/VitessceGridLayout.test.jsx +2 -7
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react-refresh/only-export-components */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { makeStyles, ScopedGlobalStyles } from '@vitessce/styles';
|
|
2
4
|
|
|
3
|
-
export const useVitessceContainerStyles = makeStyles(theme => ({
|
|
5
|
+
export const useVitessceContainerStyles = makeStyles()(theme => ({
|
|
4
6
|
vitessceContainer: {
|
|
5
7
|
position: 'relative',
|
|
6
8
|
margin: '0',
|
|
@@ -20,193 +22,207 @@ export const useVitessceContainerStyles = makeStyles(theme => ({
|
|
|
20
22
|
'& *, ::after, ::before': {
|
|
21
23
|
boxSizing: 'border-box',
|
|
22
24
|
},
|
|
23
|
-
// Manually converted styles from 'react-grid-layout/css/styles.css',
|
|
24
|
-
// using https://cssinjs.org/jss-plugin-global/?v=v10.9.2
|
|
25
|
-
// so that no CSS or SCSS import is required.
|
|
26
|
-
'@global .react-grid-layout': {
|
|
27
|
-
transition: 'height 200ms ease',
|
|
28
|
-
// Custom
|
|
29
|
-
height: 'auto',
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
width: '100%',
|
|
32
|
-
},
|
|
33
|
-
'@global .react-grid-item': {
|
|
34
|
-
transition: 'all 200ms ease',
|
|
35
|
-
transitionProperty: 'left, top',
|
|
36
|
-
// Custom
|
|
37
|
-
flexDirection: 'column!important',
|
|
38
|
-
display: 'flex!important',
|
|
39
|
-
/* So the resize handle position looks correct: */
|
|
40
|
-
paddingRight: '10px',
|
|
41
|
-
},
|
|
42
|
-
'@global .react-grid-item img': {
|
|
43
|
-
pointerEvents: 'none',
|
|
44
|
-
userSelect: 'none',
|
|
45
|
-
},
|
|
46
|
-
'@global .react-grid-item.cssTransforms': {
|
|
47
|
-
transitionProperty: 'transform',
|
|
48
|
-
},
|
|
49
|
-
'@global .react-grid-item.resizing': {
|
|
50
|
-
zIndex: '1',
|
|
51
|
-
willChange: 'width, height',
|
|
52
|
-
},
|
|
53
|
-
'@global .react-grid-item.react-draggable-dragging': {
|
|
54
|
-
transition: 'none',
|
|
55
|
-
zIndex: '3',
|
|
56
|
-
willChange: 'transform',
|
|
57
|
-
},
|
|
58
|
-
'@global .react-grid-item.dropping': {
|
|
59
|
-
visibility: 'hidden',
|
|
60
|
-
},
|
|
61
|
-
'@global .react-grid-item.react-grid-placeholder': {
|
|
62
|
-
background: 'red',
|
|
63
|
-
opacity: '0.2',
|
|
64
|
-
transitionDuration: '100ms',
|
|
65
|
-
zIndex: '2',
|
|
66
|
-
userSelect: 'none',
|
|
67
|
-
},
|
|
68
|
-
'@global .react-grid-item > .react-resizable-handle': {
|
|
69
|
-
position: 'absolute',
|
|
70
|
-
width: '20px',
|
|
71
|
-
height: '20px',
|
|
72
|
-
},
|
|
73
|
-
'@global .react-grid-item > .react-resizable-handle::after': {
|
|
74
|
-
content: '""',
|
|
75
|
-
position: 'absolute',
|
|
76
|
-
right: '3px',
|
|
77
|
-
bottom: '3px',
|
|
78
|
-
width: '5px',
|
|
79
|
-
height: '5px',
|
|
80
|
-
borderRight: '2px solid rgba(0, 0, 0, 0.4)',
|
|
81
|
-
borderBottom: '2px solid rgba(0, 0, 0, 0.4)',
|
|
82
|
-
},
|
|
83
|
-
'@global .react-resizable-hide > .react-resizable-handle': {
|
|
84
|
-
display: 'none',
|
|
85
|
-
},
|
|
86
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-sw': {
|
|
87
|
-
bottom: '0',
|
|
88
|
-
left: '0',
|
|
89
|
-
cursor: 'sw-resize',
|
|
90
|
-
transform: 'rotate(90deg)',
|
|
91
|
-
},
|
|
92
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-se': {
|
|
93
|
-
bottom: '0',
|
|
94
|
-
right: '0',
|
|
95
|
-
cursor: 'se-resize',
|
|
96
|
-
},
|
|
97
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-nw': {
|
|
98
|
-
top: '0',
|
|
99
|
-
left: '0',
|
|
100
|
-
cursor: 'nw-resize',
|
|
101
|
-
transform: 'rotate(180deg)',
|
|
102
|
-
},
|
|
103
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-ne': {
|
|
104
|
-
top: '0',
|
|
105
|
-
right: '0',
|
|
106
|
-
cursor: 'ne-resize',
|
|
107
|
-
transform: 'rotate(270deg)',
|
|
108
|
-
},
|
|
109
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-w': {
|
|
110
|
-
top: '50%',
|
|
111
|
-
marginTop: '-10px',
|
|
112
|
-
cursor: 'ew-resize',
|
|
113
|
-
left: '0',
|
|
114
|
-
transform: 'rotate(135deg)',
|
|
115
|
-
},
|
|
116
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-e': {
|
|
117
|
-
top: '50%',
|
|
118
|
-
marginTop: '-10px',
|
|
119
|
-
cursor: 'ew-resize',
|
|
120
|
-
right: '0',
|
|
121
|
-
transform: 'rotate(315deg)',
|
|
122
|
-
},
|
|
123
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-n': {
|
|
124
|
-
left: '50%',
|
|
125
|
-
marginLeft: '-10px',
|
|
126
|
-
cursor: 'ns-resize',
|
|
127
|
-
top: '0',
|
|
128
|
-
transform: 'rotate(225deg)',
|
|
129
|
-
},
|
|
130
|
-
'@global .react-grid-item > .react-resizable-handle.react-resizable-handle-s': {
|
|
131
|
-
left: '50%',
|
|
132
|
-
marginLeft: '-10px',
|
|
133
|
-
cursor: 'ns-resize',
|
|
134
|
-
bottom: '0',
|
|
135
|
-
transform: 'rotate(45deg)',
|
|
136
|
-
},
|
|
137
|
-
// Manually converted styles from 'react-resizable/css/styles.css',
|
|
138
|
-
'@global .react-resizable': {
|
|
139
|
-
position: 'relative',
|
|
140
|
-
},
|
|
141
|
-
'@global .react-resizable-handle': {
|
|
142
|
-
position: 'absolute',
|
|
143
|
-
width: '20px',
|
|
144
|
-
height: '20px',
|
|
145
|
-
backgroundRepeat: 'no-repeat',
|
|
146
|
-
backgroundOrigin: 'content-box',
|
|
147
|
-
boxSizing: 'border-box',
|
|
148
|
-
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+')",
|
|
149
|
-
backgroundPosition: 'bottom right',
|
|
150
|
-
padding: '0 3px 3px 0',
|
|
151
|
-
},
|
|
152
|
-
'@global .react-resizable-handle-sw': {
|
|
153
|
-
bottom: '0',
|
|
154
|
-
left: '0',
|
|
155
|
-
cursor: 'sw-resize',
|
|
156
|
-
transform: 'rotate(90deg)',
|
|
157
|
-
},
|
|
158
|
-
'@global .react-resizable-handle-se': {
|
|
159
|
-
bottom: '0',
|
|
160
|
-
right: '0',
|
|
161
|
-
cursor: 'se-resize',
|
|
162
|
-
},
|
|
163
|
-
'@global .react-resizable-handle-nw': {
|
|
164
|
-
top: '0',
|
|
165
|
-
left: '0',
|
|
166
|
-
cursor: 'nw-resize',
|
|
167
|
-
transform: 'rotate(180deg)',
|
|
168
|
-
},
|
|
169
|
-
'@global .react-resizable-handle-ne': {
|
|
170
|
-
top: '0',
|
|
171
|
-
right: '0',
|
|
172
|
-
cursor: 'ne-resize',
|
|
173
|
-
transform: 'rotate(270deg)',
|
|
174
|
-
},
|
|
175
|
-
'@global .react-resizable-handle-w': {
|
|
176
|
-
top: '50%',
|
|
177
|
-
marginTop: '-10px',
|
|
178
|
-
cursor: 'ew-resize',
|
|
179
|
-
left: '0',
|
|
180
|
-
transform: 'rotate(135deg)',
|
|
181
|
-
},
|
|
182
|
-
'@global .react-resizable-handle-e': {
|
|
183
|
-
top: '50%',
|
|
184
|
-
marginTop: '-10px',
|
|
185
|
-
cursor: 'ew-resize',
|
|
186
|
-
right: '0',
|
|
187
|
-
transform: 'rotate(315deg)',
|
|
188
|
-
},
|
|
189
|
-
'@global .react-resizable-handle-n': {
|
|
190
|
-
left: '50%',
|
|
191
|
-
marginLeft: '-10px',
|
|
192
|
-
cursor: 'ns-resize',
|
|
193
|
-
top: '0',
|
|
194
|
-
transform: 'rotate(225deg)',
|
|
195
|
-
},
|
|
196
|
-
'@global .react-resizable-handle-s': {
|
|
197
|
-
left: '50%',
|
|
198
|
-
marginLeft: '-10px',
|
|
199
|
-
cursor: 'ns-resize',
|
|
200
|
-
bottom: '0',
|
|
201
|
-
transform: 'rotate(45deg)',
|
|
202
|
-
},
|
|
203
|
-
// Custom
|
|
204
|
-
'@global .react-draggable-transparent-selection .react-grid-item': {
|
|
205
|
-
/* These styles prevent text selection during resize drag interactions.
|
|
206
|
-
The react-draggable-transparent-selection class is added to the body
|
|
207
|
-
element during resizing and removed after resizing has finished.
|
|
208
|
-
Not part of mixin because acts outside of .vitessce-container. */
|
|
209
|
-
userSelect: 'none !important',
|
|
210
|
-
},
|
|
211
25
|
},
|
|
212
26
|
}));
|
|
27
|
+
|
|
28
|
+
const gridLayoutStyles = {
|
|
29
|
+
// Manually converted styles from 'react-grid-layout/css/styles.css',
|
|
30
|
+
// using https://cssinjs.org/jss-plugin-global/?v=v10.9.2
|
|
31
|
+
// so that no CSS or SCSS import is required.
|
|
32
|
+
'.react-grid-layout': {
|
|
33
|
+
transition: 'height 200ms ease',
|
|
34
|
+
// Custom
|
|
35
|
+
height: 'auto',
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
width: '100%',
|
|
38
|
+
},
|
|
39
|
+
'.react-grid-item': {
|
|
40
|
+
transition: 'all 200ms ease',
|
|
41
|
+
transitionProperty: 'left, top',
|
|
42
|
+
// Custom
|
|
43
|
+
flexDirection: 'column!important',
|
|
44
|
+
display: 'flex!important',
|
|
45
|
+
/* So the resize handle position looks correct: */
|
|
46
|
+
paddingRight: '10px',
|
|
47
|
+
},
|
|
48
|
+
'.react-grid-item img': {
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
userSelect: 'none',
|
|
51
|
+
},
|
|
52
|
+
'.react-grid-item.cssTransforms': {
|
|
53
|
+
transitionProperty: 'transform',
|
|
54
|
+
},
|
|
55
|
+
'.react-grid-item.resizing': {
|
|
56
|
+
zIndex: '1',
|
|
57
|
+
willChange: 'width, height',
|
|
58
|
+
},
|
|
59
|
+
'.react-grid-item.react-draggable-dragging': {
|
|
60
|
+
transition: 'none',
|
|
61
|
+
zIndex: '3',
|
|
62
|
+
willChange: 'transform',
|
|
63
|
+
},
|
|
64
|
+
'.react-grid-item.dropping': {
|
|
65
|
+
visibility: 'hidden',
|
|
66
|
+
},
|
|
67
|
+
'.react-grid-item.react-grid-placeholder': {
|
|
68
|
+
background: 'red',
|
|
69
|
+
opacity: '0.2',
|
|
70
|
+
transitionDuration: '100ms',
|
|
71
|
+
zIndex: '2',
|
|
72
|
+
userSelect: 'none',
|
|
73
|
+
},
|
|
74
|
+
'.react-grid-item > .react-resizable-handle': {
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
width: '20px',
|
|
77
|
+
height: '20px',
|
|
78
|
+
},
|
|
79
|
+
'.react-grid-item > .react-resizable-handle::after': {
|
|
80
|
+
content: '""',
|
|
81
|
+
position: 'absolute',
|
|
82
|
+
right: '3px',
|
|
83
|
+
bottom: '3px',
|
|
84
|
+
width: '5px',
|
|
85
|
+
height: '5px',
|
|
86
|
+
borderRight: '2px solid rgba(0, 0, 0, 0.4)',
|
|
87
|
+
borderBottom: '2px solid rgba(0, 0, 0, 0.4)',
|
|
88
|
+
},
|
|
89
|
+
'.react-resizable-hide > .react-resizable-handle': {
|
|
90
|
+
display: 'none',
|
|
91
|
+
},
|
|
92
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-sw': {
|
|
93
|
+
bottom: '0',
|
|
94
|
+
left: '0',
|
|
95
|
+
cursor: 'sw-resize',
|
|
96
|
+
transform: 'rotate(90deg)',
|
|
97
|
+
},
|
|
98
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-se': {
|
|
99
|
+
bottom: '0',
|
|
100
|
+
right: '0',
|
|
101
|
+
cursor: 'se-resize',
|
|
102
|
+
},
|
|
103
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-nw': {
|
|
104
|
+
top: '0',
|
|
105
|
+
left: '0',
|
|
106
|
+
cursor: 'nw-resize',
|
|
107
|
+
transform: 'rotate(180deg)',
|
|
108
|
+
},
|
|
109
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-ne': {
|
|
110
|
+
top: '0',
|
|
111
|
+
right: '0',
|
|
112
|
+
cursor: 'ne-resize',
|
|
113
|
+
transform: 'rotate(270deg)',
|
|
114
|
+
},
|
|
115
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-w': {
|
|
116
|
+
top: '50%',
|
|
117
|
+
marginTop: '-10px',
|
|
118
|
+
cursor: 'ew-resize',
|
|
119
|
+
left: '0',
|
|
120
|
+
transform: 'rotate(135deg)',
|
|
121
|
+
},
|
|
122
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-e': {
|
|
123
|
+
top: '50%',
|
|
124
|
+
marginTop: '-10px',
|
|
125
|
+
cursor: 'ew-resize',
|
|
126
|
+
right: '0',
|
|
127
|
+
transform: 'rotate(315deg)',
|
|
128
|
+
},
|
|
129
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-n': {
|
|
130
|
+
left: '50%',
|
|
131
|
+
marginLeft: '-10px',
|
|
132
|
+
cursor: 'ns-resize',
|
|
133
|
+
top: '0',
|
|
134
|
+
transform: 'rotate(225deg)',
|
|
135
|
+
},
|
|
136
|
+
'.react-grid-item > .react-resizable-handle.react-resizable-handle-s': {
|
|
137
|
+
left: '50%',
|
|
138
|
+
marginLeft: '-10px',
|
|
139
|
+
cursor: 'ns-resize',
|
|
140
|
+
bottom: '0',
|
|
141
|
+
transform: 'rotate(45deg)',
|
|
142
|
+
},
|
|
143
|
+
// Manually converted styles from 'react-resizable/css/styles.css',
|
|
144
|
+
'.react-resizable': {
|
|
145
|
+
position: 'relative',
|
|
146
|
+
},
|
|
147
|
+
'.react-resizable-handle': {
|
|
148
|
+
position: 'absolute',
|
|
149
|
+
width: '20px',
|
|
150
|
+
height: '20px',
|
|
151
|
+
backgroundRepeat: 'no-repeat',
|
|
152
|
+
backgroundOrigin: 'content-box',
|
|
153
|
+
boxSizing: 'border-box',
|
|
154
|
+
backgroundImage: "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+')",
|
|
155
|
+
backgroundPosition: 'bottom right',
|
|
156
|
+
padding: '0 3px 3px 0',
|
|
157
|
+
},
|
|
158
|
+
'.react-resizable-handle-sw': {
|
|
159
|
+
bottom: '0',
|
|
160
|
+
left: '0',
|
|
161
|
+
cursor: 'sw-resize',
|
|
162
|
+
transform: 'rotate(90deg)',
|
|
163
|
+
},
|
|
164
|
+
'.react-resizable-handle-se': {
|
|
165
|
+
bottom: '0',
|
|
166
|
+
right: '0',
|
|
167
|
+
cursor: 'se-resize',
|
|
168
|
+
},
|
|
169
|
+
'.react-resizable-handle-nw': {
|
|
170
|
+
top: '0',
|
|
171
|
+
left: '0',
|
|
172
|
+
cursor: 'nw-resize',
|
|
173
|
+
transform: 'rotate(180deg)',
|
|
174
|
+
},
|
|
175
|
+
'.react-resizable-handle-ne': {
|
|
176
|
+
top: '0',
|
|
177
|
+
right: '0',
|
|
178
|
+
cursor: 'ne-resize',
|
|
179
|
+
transform: 'rotate(270deg)',
|
|
180
|
+
},
|
|
181
|
+
'.react-resizable-handle-w': {
|
|
182
|
+
top: '50%',
|
|
183
|
+
marginTop: '-10px',
|
|
184
|
+
cursor: 'ew-resize',
|
|
185
|
+
left: '0',
|
|
186
|
+
transform: 'rotate(135deg)',
|
|
187
|
+
},
|
|
188
|
+
'.react-resizable-handle-e': {
|
|
189
|
+
top: '50%',
|
|
190
|
+
marginTop: '-10px',
|
|
191
|
+
cursor: 'ew-resize',
|
|
192
|
+
right: '0',
|
|
193
|
+
transform: 'rotate(315deg)',
|
|
194
|
+
},
|
|
195
|
+
'.react-resizable-handle-n': {
|
|
196
|
+
left: '50%',
|
|
197
|
+
marginLeft: '-10px',
|
|
198
|
+
cursor: 'ns-resize',
|
|
199
|
+
top: '0',
|
|
200
|
+
transform: 'rotate(225deg)',
|
|
201
|
+
},
|
|
202
|
+
'.react-resizable-handle-s': {
|
|
203
|
+
left: '50%',
|
|
204
|
+
marginLeft: '-10px',
|
|
205
|
+
cursor: 'ns-resize',
|
|
206
|
+
bottom: '0',
|
|
207
|
+
transform: 'rotate(45deg)',
|
|
208
|
+
},
|
|
209
|
+
// Custom
|
|
210
|
+
'.react-draggable-transparent-selection .react-grid-item': {
|
|
211
|
+
/* These styles prevent text selection during resize drag interactions.
|
|
212
|
+
The react-draggable-transparent-selection class is added to the body
|
|
213
|
+
element during resizing and removed after resizing has finished.
|
|
214
|
+
Not part of mixin because acts outside of .vitessce-container. */
|
|
215
|
+
userSelect: 'none !important',
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
export function GridLayoutGlobalStyles(props) {
|
|
220
|
+
const { classes } = props;
|
|
221
|
+
|
|
222
|
+
return (
|
|
223
|
+
<ScopedGlobalStyles
|
|
224
|
+
parentClassName={classes.vitessceContainer}
|
|
225
|
+
styles={gridLayoutStyles}
|
|
226
|
+
/>
|
|
227
|
+
);
|
|
228
|
+
}
|
package/src/shared-mui/styles.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { createTheme,
|
|
2
|
-
|
|
3
|
-
const { grey } = colors;
|
|
1
|
+
import { createTheme, grey } from '@vitessce/styles';
|
|
4
2
|
|
|
5
3
|
const globalColors = {
|
|
6
4
|
white: '#FFFFFF',
|
|
@@ -50,15 +48,17 @@ const sharedThemeOptions = {
|
|
|
50
48
|
fontSize: '12px',
|
|
51
49
|
},
|
|
52
50
|
},
|
|
53
|
-
|
|
51
|
+
components: {
|
|
54
52
|
MuiButtonBase: {
|
|
55
|
-
|
|
53
|
+
defaultProps: {
|
|
54
|
+
disableRipple: true,
|
|
55
|
+
},
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
const lightPalette = {
|
|
61
|
-
|
|
61
|
+
mode: 'light',
|
|
62
62
|
primary: grey,
|
|
63
63
|
secondary: grey,
|
|
64
64
|
primaryBackground: '#F1F1F1',
|
|
@@ -76,6 +76,7 @@ const lightPalette = {
|
|
|
76
76
|
secondaryBackgroundDim: '#C0C0C0',
|
|
77
77
|
secondaryForeground: '#222222',
|
|
78
78
|
gridLayoutBackground: '#FFFFFF',
|
|
79
|
+
paperBackground: '#FFFFFF',
|
|
79
80
|
cardBorder: 'rgba(241, 241, 241, 0.125)',
|
|
80
81
|
tooltipText: 'rgba(0, 0, 0, 0.87)',
|
|
81
82
|
};
|
|
@@ -83,7 +84,7 @@ const lightPalette = {
|
|
|
83
84
|
export const muiTheme = {
|
|
84
85
|
dark: createTheme({
|
|
85
86
|
palette: {
|
|
86
|
-
|
|
87
|
+
mode: 'dark',
|
|
87
88
|
primary: grey,
|
|
88
89
|
secondary: grey,
|
|
89
90
|
primaryBackground: '#222222',
|
|
@@ -101,6 +102,7 @@ export const muiTheme = {
|
|
|
101
102
|
secondaryBackgroundDim: '#444444',
|
|
102
103
|
secondaryForeground: '#D3D3D3',
|
|
103
104
|
gridLayoutBackground: '#333333',
|
|
105
|
+
paperBackground: '#2b2b2b',
|
|
104
106
|
cardBorder: 'rgba(0, 0, 0, 0.125)',
|
|
105
107
|
tooltipText: '#FFFFFF',
|
|
106
108
|
...globalColors,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useId } from 'react-aria';
|
|
3
|
-
import { TableCell, TableRow } from '@
|
|
3
|
+
import { TableCell, TableRow } from '@vitessce/styles';
|
|
4
4
|
import { capitalize } from '@vitessce/utils';
|
|
5
5
|
import OptionSelect from './OptionSelect.js';
|
|
6
6
|
import { useStyles } from './styles.js';
|
|
@@ -12,7 +12,7 @@ export default function CellColorEncodingOption(props) {
|
|
|
12
12
|
setCellColorEncoding,
|
|
13
13
|
} = props;
|
|
14
14
|
|
|
15
|
-
const classes = useStyles();
|
|
15
|
+
const { classes } = useStyles();
|
|
16
16
|
|
|
17
17
|
const cellColorEncodingId = useId();
|
|
18
18
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NativeSelect } from '@vitessce/styles';
|
|
3
3
|
import { useStyles } from './styles.js';
|
|
4
4
|
|
|
5
5
|
export default function OptionSelect(props) {
|
|
6
6
|
const { classes: classesProp = {} } = props;
|
|
7
|
-
const classes = useStyles();
|
|
7
|
+
const { classes } = useStyles();
|
|
8
8
|
return (
|
|
9
|
-
<
|
|
10
|
-
native
|
|
9
|
+
<NativeSelect
|
|
11
10
|
disableUnderline
|
|
12
11
|
{...props}
|
|
13
12
|
classes={{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Box, Table, TableBody, TableContainer } from '@
|
|
2
|
+
import { Box, Table, TableBody, TableContainer } from '@vitessce/styles';
|
|
3
3
|
import { useStyles } from './styles.js';
|
|
4
4
|
|
|
5
5
|
export default function OptionsContainer(props) {
|
|
@@ -7,7 +7,7 @@ export default function OptionsContainer(props) {
|
|
|
7
7
|
children,
|
|
8
8
|
} = props;
|
|
9
9
|
|
|
10
|
-
const classes = useStyles();
|
|
10
|
+
const { classes } = useStyles();
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<Box className={classes.box}>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeStyles } from '@
|
|
1
|
+
import { makeStyles } from '@vitessce/styles';
|
|
2
2
|
|
|
3
|
-
export const useStyles = makeStyles(theme => ({
|
|
3
|
+
export const useStyles = makeStyles()(theme => ({
|
|
4
4
|
box: {
|
|
5
5
|
boxSizing: 'border-box',
|
|
6
6
|
},
|
|
@@ -17,7 +17,8 @@ export const useStyles = makeStyles(theme => ({
|
|
|
17
17
|
slider: {
|
|
18
18
|
color: theme.palette.primaryForeground,
|
|
19
19
|
minWidth: '60px',
|
|
20
|
-
padding:
|
|
20
|
+
padding: 0,
|
|
21
|
+
margin: '14px 0 8px 0',
|
|
21
22
|
},
|
|
22
23
|
sliderValueLabel: {
|
|
23
24
|
'& span': {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeStyles } from '@
|
|
1
|
+
import { makeStyles } from '@vitessce/styles';
|
|
2
2
|
|
|
3
|
-
export const useStyles = makeStyles(theme => ({
|
|
3
|
+
export const useStyles = makeStyles()(theme => ({
|
|
4
4
|
warningLayout: {
|
|
5
5
|
backgroundColor: theme.palette.gridLayoutBackground,
|
|
6
6
|
position: 'absolute',
|
package/src/title-styles.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeStyles } from '@
|
|
1
|
+
import { makeStyles } from '@vitessce/styles';
|
|
2
2
|
|
|
3
|
-
export const useTitleStyles = makeStyles(theme => ({
|
|
3
|
+
export const useTitleStyles = makeStyles()(theme => ({
|
|
4
4
|
title: {
|
|
5
5
|
color: theme.palette.primaryForeground,
|
|
6
6
|
overflowX: 'hidden',
|
|
@@ -20,7 +20,7 @@ export function VitessceGridLayout(props) {
|
|
|
20
20
|
const {
|
|
21
21
|
layout,
|
|
22
22
|
viewTypes, coordinationTypes, fileTypes, stores,
|
|
23
|
-
padding, margin: marginProp, draggableHandle: draggableHandleClass,
|
|
23
|
+
padding = 10, margin: marginProp = 10, draggableHandle: draggableHandleClass,
|
|
24
24
|
onResize, onResizeStop, rowHeight, theme, height,
|
|
25
25
|
onRemoveComponent, onLayoutChange: onLayoutChangeProp,
|
|
26
26
|
isBounded,
|
|
@@ -216,8 +216,3 @@ export function VitessceGridLayout(props) {
|
|
|
216
216
|
</>
|
|
217
217
|
)));
|
|
218
218
|
}
|
|
219
|
-
|
|
220
|
-
VitessceGridLayout.defaultProps = {
|
|
221
|
-
padding: 10,
|
|
222
|
-
margin: 10,
|
|
223
|
-
};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { describe, it, expect
|
|
2
|
-
import '@testing-library/
|
|
3
|
-
import { cleanup, render, screen } from '@testing-library/react';
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
4
3
|
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import { PluginViewType } from '@vitessce/plugins';
|
|
7
6
|
import { VitessceGridLayout } from './VitessceGridLayout.js';
|
|
8
7
|
|
|
9
|
-
afterEach(() => {
|
|
10
|
-
cleanup();
|
|
11
|
-
});
|
|
12
|
-
|
|
13
8
|
function FakeComponent(props) {
|
|
14
9
|
const { text } = props;
|
|
15
10
|
return <span>{text}</span>;
|