@vitessce/layer-controller 3.5.12 → 3.6.1

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 (48) hide show
  1. package/dist/deflate-BVjbK7jw.js +10 -0
  2. package/dist/{index-d816962c.js → index-33bfVj66.js} +70412 -67894
  3. package/dist/index.js +1 -4
  4. package/dist/{jpeg-f0fc1e44.js → jpeg-BdMUgt4w.js} +20 -4
  5. package/dist/lerc-CDb6hblk.js +2065 -0
  6. package/dist/{lzw-af978121.js → lzw-Bq_A3XVG.js} +1 -4
  7. package/dist/{packbits-48365e34.js → packbits-QWCdXTTY.js} +1 -4
  8. package/dist/{pako.esm-68f84e2a.js → pako.esm-SxljTded.js} +33 -1839
  9. package/dist/{raw-0be8a541.js → raw-O2tds5XZ.js} +1 -4
  10. package/dist/{webimage-0d7dbd51.js → webimage-CfZ_aK6l.js} +1 -4
  11. package/dist-tsc/BitmaskChannelController.d.ts.map +1 -1
  12. package/dist-tsc/BitmaskChannelController.js +2 -3
  13. package/dist-tsc/ChannelOptions.d.ts.map +1 -1
  14. package/dist-tsc/ChannelOptions.js +4 -5
  15. package/dist-tsc/ColorPalette.d.ts.map +1 -1
  16. package/dist-tsc/ColorPalette.js +4 -5
  17. package/dist-tsc/ImageAddButton.d.ts.map +1 -1
  18. package/dist-tsc/ImageAddButton.js +3 -4
  19. package/dist-tsc/LayerController.d.ts.map +1 -1
  20. package/dist-tsc/LayerController.js +12 -19
  21. package/dist-tsc/LayerControllerSubscriber.d.ts.map +1 -1
  22. package/dist-tsc/LayerControllerSubscriber.js +4 -4
  23. package/dist-tsc/LayerOptions.d.ts.map +1 -1
  24. package/dist-tsc/LayerOptions.js +15 -15
  25. package/dist-tsc/RasterChannelController.js +4 -4
  26. package/dist-tsc/VectorLayerController.js +4 -4
  27. package/dist-tsc/VolumeOptions.d.ts.map +1 -1
  28. package/dist-tsc/VolumeOptions.js +7 -7
  29. package/dist-tsc/shared-channel-controls.d.ts.map +1 -1
  30. package/dist-tsc/shared-channel-controls.js +6 -4
  31. package/dist-tsc/styles.d.ts +72 -8
  32. package/dist-tsc/styles.d.ts.map +1 -1
  33. package/dist-tsc/styles.js +31 -16
  34. package/package.json +11 -11
  35. package/src/BitmaskChannelController.js +4 -5
  36. package/src/ChannelOptions.js +4 -5
  37. package/src/ColorPalette.js +4 -5
  38. package/src/ImageAddButton.js +3 -4
  39. package/src/LayerController.js +30 -30
  40. package/src/LayerControllerSubscriber.js +4 -6
  41. package/src/LayerOptions.js +21 -24
  42. package/src/RasterChannelController.js +8 -8
  43. package/src/VectorLayerController.js +7 -7
  44. package/src/VolumeOptions.js +12 -14
  45. package/src/shared-channel-controls.js +8 -6
  46. package/src/styles.js +31 -16
  47. package/dist/deflate-2c798302.js +0 -13
  48. package/dist/lerc-59798e8d.js +0 -2014
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAEA,gHAOI;AAEJ,+HAQI;AAEJ,wHAQI;AAEJ,oKASI;AAEJ,sMAsBI;AAEJ,gIAII;AAEJ,gIAOI;AAEJ,yJAOI"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.js"],"names":[],"mappings":"AAEA;;cAgCM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EAlCd;AAEJ;;cAuBM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EA5Bd;AAEJ;;cAiBM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EAlBd;AAEJ;;cAOM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EAHd;AAEJ;;cARM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EAoCd;AAEJ;;cA/CM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EA0Cd;AAEJ;;cArDM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EAmDd;AAEJ;;cA9DM,CAAC;;;kBAKL,eAGQ;gBAAyB,WAAU;eACrC,WAAU;EA4Dd"}
@@ -1,5 +1,5 @@
1
- import { makeStyles } from '@material-ui/core';
2
- export const useSpanStyles = makeStyles(() => ({
1
+ import { makeStyles } from '@vitessce/styles';
2
+ export const useSpanStyles = makeStyles()(() => ({
3
3
  span: {
4
4
  width: '70px',
5
5
  textAlign: 'center',
@@ -7,35 +7,50 @@ export const useSpanStyles = makeStyles(() => ({
7
7
  paddingRight: '2px',
8
8
  },
9
9
  }));
10
- export const useChannelSliderStyles = makeStyles(theme => ({
10
+ export const useChannelSliderStyles = makeStyles()(() => ({
11
11
  valueLabel: {
12
12
  marginTop: '7px',
13
- '& span': {
14
- color: theme.palette.secondaryForeground, // Change color here
15
- backgroundColor: theme.palette.secondaryBackgroundDim, // Change color here
16
- },
17
13
  },
18
14
  }));
19
- export const useSelectStyles = makeStyles(() => ({
15
+ export const useSelectStyles = makeStyles()(() => ({
20
16
  selectRoot: {
21
17
  padding: 0,
22
18
  height: 'auto',
23
- margin: '4px 0',
24
- fontSize: '14px',
19
+ margin: 0,
20
+ fontSize: '14px !important',
25
21
  width: '100%',
26
22
  },
27
23
  }));
28
- export const useControllerSectionStyles = makeStyles(() => ({
24
+ export const useControllerSectionStyles = makeStyles()(theme => ({
29
25
  layerControllerRoot: {
30
26
  width: '100%',
31
27
  flexDirection: 'column',
32
28
  padding: '0px 8px',
29
+ backgroundColor: theme.palette.paperBackground,
30
+ },
31
+ accordionRoot: {
32
+ backgroundColor: theme.palette.paperBackground,
33
33
  },
34
34
  layerControllerGrid: {
35
35
  marginTop: '10px',
36
36
  },
37
37
  }));
38
- export const useAccordionStyles = makeStyles(theme => ({
38
+ export const useAccordionStyles = makeStyles()(theme => ({
39
+ accordionVisibilityIconBox: {
40
+ margin: 0,
41
+ padding: 0,
42
+ minWidth: 0,
43
+ cursor: 'pointer',
44
+ display: 'inline-flex',
45
+ '&:hover': {
46
+ opacity: 0.8,
47
+ },
48
+ color: theme.palette.primary[500],
49
+ },
50
+ accordionNameBox: {
51
+ marginLeft: '10px',
52
+ fontSize: '14px !important',
53
+ },
39
54
  accordionDetailsRoot: {
40
55
  width: '100%',
41
56
  flexDirection: 'column',
@@ -45,7 +60,7 @@ export const useAccordionStyles = makeStyles(theme => ({
45
60
  padding: '0px 8px',
46
61
  },
47
62
  content: {
48
- margin: '4px 0px',
63
+ margin: '4px 0px !important',
49
64
  minWidth: '0px',
50
65
  },
51
66
  expanded: {
@@ -58,12 +73,12 @@ export const useAccordionStyles = makeStyles(theme => ({
58
73
  },
59
74
  },
60
75
  }));
61
- export const useInputLabelStyles = makeStyles(() => ({
76
+ export const useInputLabelStyles = makeStyles()(() => ({
62
77
  inputLabelRoot: {
63
78
  fontSize: '14px',
64
79
  },
65
80
  }));
66
- export const useOverflowEllipsisGridStyles = makeStyles(() => ({
81
+ export const useOverflowEllipsisGridStyles = makeStyles()(() => ({
67
82
  item: {
68
83
  width: '100%',
69
84
  overflow: 'hidden',
@@ -71,7 +86,7 @@ export const useOverflowEllipsisGridStyles = makeStyles(() => ({
71
86
  textOverflow: 'ellipsis',
72
87
  },
73
88
  }));
74
- export const useSelectionSliderStyles = makeStyles(() => ({
89
+ export const useSelectionSliderStyles = makeStyles()(() => ({
75
90
  selectionSliderRoot: {
76
91
  marginTop: '7px',
77
92
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitessce/layer-controller",
3
- "version": "3.5.12",
3
+ "version": "3.6.1",
4
4
  "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
@@ -16,24 +16,24 @@
16
16
  "dist-tsc"
17
17
  ],
18
18
  "dependencies": {
19
- "@material-ui/core": "~4.12.3",
20
- "@material-ui/icons": "~4.11.2",
21
19
  "lodash-es": "^4.17.21",
22
20
  "math.gl": "^3.5.6",
23
21
  "react-aria": "^3.28.0",
24
- "@vitessce/constants-internal": "3.5.12",
25
- "@vitessce/gl": "3.5.12",
26
- "@vitessce/spatial-utils": "3.5.12",
27
- "@vitessce/utils": "3.5.12",
28
- "@vitessce/vit-s": "3.5.12"
22
+ "@vitessce/styles": "3.6.1",
23
+ "@vitessce/constants-internal": "3.6.1",
24
+ "@vitessce/gl": "3.6.1",
25
+ "@vitessce/spatial-utils": "3.6.1",
26
+ "@vitessce/utils": "3.6.1",
27
+ "@vitessce/vit-s": "3.6.1"
29
28
  },
30
29
  "devDependencies": {
31
30
  "react": "^18.0.0",
32
- "vite": "^4.3.0",
33
- "vitest": "^0.32.2"
31
+ "react-dom": "^18.0.0",
32
+ "vite": "^6.3.5",
33
+ "vitest": "^3.1.4"
34
34
  },
35
35
  "peerDependencies": {
36
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
36
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
37
37
  },
38
38
  "scripts": {
39
39
  "bundle": "pnpm exec vite build -c ../../../scripts/vite.config.js",
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
- import { RemoveCircle as RemoveCircleIcon } from '@material-ui/icons';
3
- import { IconButton, Grid } from '@material-ui/core';
2
+ import { RemoveCircle as RemoveCircleIcon, IconButton, Grid } from '@vitessce/styles';
4
3
  import { ChannelSelectionDropdown, ChannelVisibilityCheckbox } from './shared-channel-controls.js';
5
4
 
6
5
  /**
@@ -35,14 +34,14 @@ function BitmaskChannelController({
35
34
  const createSelection = index => ({ [dimName]: index });
36
35
  return (
37
36
  <Grid container direction="row" justifyContent="space-between">
38
- <Grid item xs={2}>
37
+ <Grid size={2}>
39
38
  <ChannelVisibilityCheckbox
40
39
  color={[220, 220, 220]}
41
40
  checked={visibility}
42
41
  toggle={() => handlePropertyChange('visible', !visibility)}
43
42
  />
44
43
  </Grid>
45
- <Grid item xs={9}>
44
+ <Grid size={9}>
46
45
  <ChannelSelectionDropdown
47
46
  handleChange={v => handlePropertyChange('selection', createSelection(v))}
48
47
  selectionIndex={selectionIndex}
@@ -50,7 +49,7 @@ function BitmaskChannelController({
50
49
  channelOptions={channelOptions}
51
50
  />
52
51
  </Grid>
53
- <Grid item xs={1}>
52
+ <Grid size={1}>
54
53
  <IconButton
55
54
  onClick={handleChannelRemove}
56
55
  style={{ padding: '6px 6px 6px 0px' }}
@@ -1,11 +1,10 @@
1
1
  import React, { useState } from 'react';
2
- import { makeStyles, MenuItem } from '@material-ui/core';
3
- import { MoreVert as MoreVertIcon } from '@material-ui/icons';
2
+ import { makeStyles, MenuItem, MoreVert as MoreVertIcon } from '@vitessce/styles';
4
3
  import { PopperMenu } from '@vitessce/vit-s';
5
4
  import { useSpanStyles } from './styles.js';
6
5
  import ColorPalette from './ColorPalette.js';
7
6
 
8
- const useStyles = makeStyles(() => ({
7
+ const useStyles = makeStyles()(() => ({
9
8
  menuButton: {
10
9
  backgroundColor: 'transparent',
11
10
  },
@@ -20,7 +19,7 @@ const useStyles = makeStyles(() => ({
20
19
 
21
20
  function MuiSpan(props) {
22
21
  const { children } = props;
23
- const classes = useSpanStyles();
22
+ const { classes } = useSpanStyles();
24
23
  return <span className={classes.span}>{children}</span>;
25
24
  }
26
25
 
@@ -33,7 +32,7 @@ function MuiSpan(props) {
33
32
  function ChannelOptions({ handlePropertyChange, handleChannelRemove, handleIQRUpdate }) {
34
33
  const [open, setOpen] = useState(false);
35
34
 
36
- const classes = useStyles();
35
+ const { classes } = useStyles();
37
36
 
38
37
  const handleColorSelect = (color) => {
39
38
  handlePropertyChange('color', color);
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { IconButton, makeStyles } from '@material-ui/core';
3
- import { Lens as LensIcon } from '@material-ui/icons';
2
+ import { IconButton, makeStyles, Lens as LensIcon } from '@vitessce/styles';
4
3
  import { VIEWER_PALETTE } from '@vitessce/utils';
5
4
 
6
- const useStyles = makeStyles(theme => ({
5
+ const useStyles = makeStyles()(theme => ({
7
6
  paletteContainer: {
8
7
  width: '70px',
9
8
  height: '40px',
@@ -20,12 +19,12 @@ const useStyles = makeStyles(theme => ({
20
19
  width: '17px',
21
20
  height: '17px',
22
21
  stroke: theme.palette.action.selected,
23
- 'stroke-width': '1px',
22
+ strokeWidth: '1px',
24
23
  },
25
24
  }));
26
25
 
27
26
  const ColorPalette = ({ handleChange }) => {
28
- const classes = useStyles();
27
+ const { classes } = useStyles();
29
28
  return (
30
29
  <div className={classes.paletteContainer} aria-label="Color swatch">
31
30
  {VIEWER_PALETTE.map(color => (
@@ -1,9 +1,8 @@
1
1
  import React, { useState } from 'react';
2
- import { makeStyles, MenuItem } from '@material-ui/core';
3
- import { Add as AddIcon } from '@material-ui/icons';
2
+ import { makeStyles, MenuItem, Add as AddIcon } from '@vitessce/styles';
4
3
  import { PopperMenu } from '@vitessce/vit-s';
5
4
 
6
- const useStyles = makeStyles(() => ({
5
+ const useStyles = makeStyles()(() => ({
7
6
  addButton: {
8
7
  marginTop: '10px',
9
8
  marginBottom: '10px',
@@ -22,7 +21,7 @@ function ImageAddIcon() {
22
21
 
23
22
  function ImageAddButton({ imageOptions, handleImageAdd }) {
24
23
  const [open, setOpen] = useState(false);
25
- const classes = useStyles();
24
+ const { classes } = useStyles();
26
25
 
27
26
  const handleAdd = (imgData) => {
28
27
  setOpen(prev => !prev);
@@ -12,13 +12,12 @@ import {
12
12
  import {
13
13
  Grid, Button, Slider, Tabs, Tab, InputLabel,
14
14
  Accordion, AccordionDetails, AccordionSummary,
15
- } from '@material-ui/core';
16
- import {
15
+ Box,
17
16
  Add as AddIcon,
18
17
  ExpandMore as ExpandMoreIcon,
19
18
  Visibility as VisibilityIcon,
20
19
  VisibilityOff as VisibilityOffIcon,
21
- } from '@material-ui/icons';
20
+ } from '@vitessce/styles';
22
21
 
23
22
  import LayerOptions from './LayerOptions.js';
24
23
  import VolumeOptions from './VolumeOptions.js';
@@ -398,10 +397,10 @@ export default function LayerController(props) {
398
397
  );
399
398
  }
400
399
 
401
- const controllerSectionClasses = useControllerSectionStyles();
402
- const accordionClasses = useAccordionStyles();
403
- const inputLabelClasses = useInputLabelStyles();
404
- const overflowEllipsisGridClasses = useOverflowEllipsisGridStyles();
400
+ const { classes: controllerSectionClasses } = useControllerSectionStyles();
401
+ const { classes: accordionClasses } = useAccordionStyles();
402
+ const { classes: inputLabelClasses } = useInputLabelStyles();
403
+ const { classes: overflowEllipsisGridClasses } = useOverflowEllipsisGridStyles();
405
404
 
406
405
  const { visible } = layer;
407
406
  const visibleSetting = typeof visible === 'boolean' ? visible : true;
@@ -468,30 +467,36 @@ export default function LayerController(props) {
468
467
  );
469
468
  return (
470
469
  <Accordion
471
- className={controllerSectionClasses.layerControllerRoot}
470
+ slotProps={{
471
+ root: { elevation: 4, className: controllerSectionClasses.accordionRoot },
472
+ }}
472
473
  onChange={(e, expanded) => !disabled
473
474
  && setIsExpanded(
474
475
  expanded && e?.target?.attributes?.role?.value === 'presentation',
475
476
  )
476
477
  }
477
- TransitionProps={{ enter: false }}
478
478
  expanded={!disabled && isExpanded}
479
479
  id={`layer-controls-accordion-${layerControlsId}`}
480
480
  >
481
481
  <AccordionSummary
482
- classes={{
483
- root: accordionClasses.accordionSummaryRoot,
484
- content: accordionClasses.content,
485
- expanded: accordionClasses.expanded,
486
- expandIcon: accordionClasses.expandIcon,
482
+ slotProps={{
483
+ content: { className: accordionClasses.content },
487
484
  }}
488
485
  expandIcon={<ExpandMoreIcon role="presentation" />}
489
486
  aria-controls={`layer-${name}-controls`}
490
487
  aria-expanded={isExpanded}
491
488
  >
492
- <Grid container direction="column" m={1} justifyContent="center">
493
- <Grid item classes={{ item: overflowEllipsisGridClasses.item }}>
494
- <Button
489
+ <Grid container direction="column" justifyContent="center" sx={{ flexGrow: 1 }}>
490
+ <Grid
491
+ container
492
+ size={12}
493
+ direction="row"
494
+ alignItems="flex-start"
495
+ classes={{ item: overflowEllipsisGridClasses.item }}
496
+ >
497
+ <Box
498
+ component="div"
499
+ role="button"
495
500
  aria-label="Toggle layer visibility"
496
501
  onClick={(e) => {
497
502
  if (!disabled) {
@@ -501,25 +506,21 @@ export default function LayerController(props) {
501
506
  setVisible(nextVisible);
502
507
  }
503
508
  }}
504
- style={{
505
- marginRight: 8,
506
- marginBottom: 2,
507
- padding: 0,
508
- minWidth: 0,
509
- }}
509
+ className={accordionClasses.accordionVisibilityIconBox}
510
510
  >
511
511
  <Visibility />
512
- </Button>
513
- {name}
512
+ </Box>
513
+ <Box component="div" className={accordionClasses.accordionNameBox}>
514
+ {name}
515
+ </Box>
514
516
  </Grid>
515
517
  {!disabled && !isExpanded && !use3d && (
516
518
  <Grid
517
519
  container
518
520
  direction="row"
519
- alignItems="center"
520
- justifyContent="center"
521
+ sx={{ justifyContent: 'flex-start', flexGrow: 1 }}
521
522
  >
522
- <Grid item xs={6}>
523
+ <Grid size={5}>
523
524
  <InputLabel
524
525
  htmlFor={`layer-${name}-opacity-closed`}
525
526
  classes={{ root: inputLabelClasses.inputLabelRoot }}
@@ -527,7 +528,7 @@ export default function LayerController(props) {
527
528
  Opacity:
528
529
  </InputLabel>
529
530
  </Grid>
530
- <Grid item xs={6}>
531
+ <Grid size={6}>
531
532
  <Slider
532
533
  id={`layer-${name}-opacity-closed`}
533
534
  value={opacity}
@@ -545,7 +546,6 @@ export default function LayerController(props) {
545
546
  </Grid>
546
547
  </AccordionSummary>
547
548
  <AccordionDetails
548
- classes={{ root: accordionClasses.accordionDetailsRoot }}
549
549
  id={`layer-${name}-controls`}
550
550
  >
551
551
  {useVolumeTabs ? (
@@ -3,7 +3,7 @@
3
3
  import React, {
4
4
  useCallback, useRef, forwardRef,
5
5
  } from 'react';
6
- import { Grid } from '@material-ui/core';
6
+ import { Grid } from '@vitessce/styles';
7
7
  import {
8
8
  TitleInfo,
9
9
  useReady,
@@ -144,8 +144,7 @@ const LayerControllerMemoized = React.memo(
144
144
  <Grid
145
145
  // eslint-disable-next-line react/no-array-index-key
146
146
  key={`${dataset}-raster-${index}-${i}`}
147
- item
148
- style={{ marginTop: '10px' }}
147
+ sx={{ marginTop: '10px' }}
149
148
  >
150
149
  <LayerController
151
150
  name={layerMeta.name}
@@ -226,8 +225,7 @@ const LayerControllerMemoized = React.memo(
226
225
  <Grid
227
226
  // eslint-disable-next-line react/no-array-index-key
228
227
  key={`${dataset}-raster-${index}-${i}`}
229
- item
230
- style={{ marginTop: '10px' }}
228
+ sx={{ marginTop: '10px' }}
231
229
  >
232
230
  <LayerController
233
231
  name={layerMeta.name}
@@ -282,7 +280,7 @@ const LayerControllerMemoized = React.memo(
282
280
  })}
283
281
  {shouldShowImageLayerButton
284
282
  ? (
285
- <Grid item>
283
+ <Grid>
286
284
  <ImageAddButton
287
285
  imageOptions={imageLayerMeta}
288
286
  handleImageAdd={handleImageAdd}
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import { useId } from 'react-aria';
3
3
  import { range } from 'lodash-es';
4
4
  import { Matrix4 } from 'math.gl';
5
- import { Grid, Slider, InputLabel, Select, Checkbox } from '@material-ui/core';
5
+ import { Grid, Slider, InputLabel, NativeSelect, Checkbox } from '@vitessce/styles';
6
6
  import { viv } from '@vitessce/gl';
7
7
  import {
8
8
  getBoundingCube,
@@ -52,7 +52,7 @@ function VolumeDropdown({
52
52
  use3d,
53
53
  modelMatrix,
54
54
  }) {
55
- const classes = useSelectStyles();
55
+ const { classes } = useSelectStyles();
56
56
  const selections = channels.map(i => i.selection);
57
57
  const { data: loader } = loaderWithMeta;
58
58
  const handleChange = async (val) => {
@@ -124,8 +124,7 @@ function VolumeDropdown({
124
124
  const hasZStack = shape[labels.indexOf('z')] > 1;
125
125
  return (
126
126
  <>
127
- <Select
128
- native
127
+ <NativeSelect
129
128
  value={currResolution}
130
129
  onChange={e => handleChange(
131
130
  e.target.value === '2D' ? e.target.value : Number(e.target.value),
@@ -167,7 +166,7 @@ function VolumeDropdown({
167
166
  }
168
167
  return null;
169
168
  })}
170
- </Select>
169
+ </NativeSelect>
171
170
  </>
172
171
  );
173
172
  }
@@ -180,10 +179,9 @@ function VolumeDropdown({
180
179
  * @prop {function} handleChange Callback for every change in colormap.
181
180
  */
182
181
  function ColormapSelect({ value, inputId, handleChange }) {
183
- const classes = useSelectStyles();
182
+ const { classes } = useSelectStyles();
184
183
  return (
185
- <Select
186
- native
184
+ <NativeSelect
187
185
  onChange={e => handleChange(e.target.value === '' ? null : e.target.value)}
188
186
  value={value}
189
187
  inputProps={{ name: 'colormap', id: inputId, 'aria-label': 'Colormap selector' }}
@@ -196,7 +194,7 @@ function ColormapSelect({ value, inputId, handleChange }) {
196
194
  {name}
197
195
  </option>
198
196
  ))}
199
- </Select>
197
+ </NativeSelect>
200
198
  );
201
199
  }
202
200
 
@@ -214,7 +212,7 @@ function TransparentColorCheckbox({ value, inputId, handleChange }) {
214
212
  }}
215
213
  checked={Boolean(value)}
216
214
  id={inputId}
217
- inputProps={{ 'aria-label': 'Enable or disable color transparency' }}
215
+ slotProps={{ input: { 'aria-label': 'Enable or disable color transparency' } }}
218
216
  />
219
217
  );
220
218
  }
@@ -225,11 +223,11 @@ function TransparentColorCheckbox({ value, inputId, handleChange }) {
225
223
  * @prop {function} handleChange Callback for every change in opacity.
226
224
  */
227
225
  function OpacitySlider({ value, inputId, handleChange }) {
228
- const classes = useChannelSliderStyles();
226
+ const { classes } = useChannelSliderStyles();
229
227
 
230
228
  return (
231
229
  <Slider
232
- classes={{ valueLabel: classes.valueLabel }}
230
+ slotProps={{ valueLabel: { className: classes.sliderValueLabel } }}
233
231
  value={value}
234
232
  onChange={(e, v) => handleChange(v)}
235
233
  valueLabelDisplay="auto"
@@ -250,10 +248,9 @@ function OpacitySlider({ value, inputId, handleChange }) {
250
248
  * @prop {function} handleChange Callback for every change in domain.
251
249
  */
252
250
  function SliderDomainSelector({ value, inputId, handleChange }) {
253
- const classes = useSelectStyles();
251
+ const { classes } = useSelectStyles();
254
252
  return (
255
- <Select
256
- native
253
+ <NativeSelect
257
254
  onChange={e => handleChange(e.target.value)}
258
255
  value={value}
259
256
  id={inputId}
@@ -266,7 +263,7 @@ function SliderDomainSelector({ value, inputId, handleChange }) {
266
263
  {name}
267
264
  </option>
268
265
  ))}
269
- </Select>
266
+ </NativeSelect>
270
267
  );
271
268
  }
272
269
 
@@ -284,7 +281,7 @@ function GlobalSelectionSlider({
284
281
  handleChange,
285
282
  possibleValues,
286
283
  }) {
287
- const classes = useSelectionSliderStyles();
284
+ const { classes } = useSelectionSliderStyles();
288
285
  return (
289
286
  <Slider
290
287
  classes={{ root: classes.selectionSliderRoot, markActive: classes.markActive }}
@@ -323,10 +320,10 @@ function GlobalSelectionSlider({
323
320
  function LayerOption({ name, inputId, children }) {
324
321
  return (
325
322
  <Grid container direction="row" alignItems="center" justifyContent="center">
326
- <Grid item xs={6}>
323
+ <Grid size={6}>
327
324
  <InputLabel htmlFor={inputId}>{name}:</InputLabel>
328
325
  </Grid>
329
- <Grid item xs={6}>
326
+ <Grid size={6}>
330
327
  {children}
331
328
  </Grid>
332
329
  </Grid>
@@ -391,7 +388,7 @@ function LayerOptions({
391
388
  const opacitySliderId = useId();
392
389
  const zeroTransparentId = useId();
393
390
  return (
394
- <Grid container direction="column" style={{ width: '100%' }}>
391
+ <Grid container direction="column" sx={{ width: '100%' }}>
395
392
  {hasZStack
396
393
  && !disable3d
397
394
  && hasViewableResolutions
@@ -432,7 +429,7 @@ function LayerOptions({
432
429
  {!disableChannelsIfRgbDetected ? (
433
430
  <>
434
431
  {shouldShowColormap && (
435
- <Grid item>
432
+ <Grid>
436
433
  <LayerOption name="Colormap" inputId={colormapSelectId}>
437
434
  <ColormapSelect
438
435
  value={colormap || ''}
@@ -443,7 +440,7 @@ function LayerOptions({
443
440
  </Grid>
444
441
  )}
445
442
  {shouldShowDomain && (
446
- <Grid item>
443
+ <Grid>
447
444
  <LayerOption name="Domain" inputId={domainSelectorId}>
448
445
  <SliderDomainSelector
449
446
  value={domainType || DEFAULT_RASTER_DOMAIN_TYPE}
@@ -458,7 +455,7 @@ function LayerOptions({
458
455
  </>
459
456
  ) : null}
460
457
  {!use3d && (
461
- <Grid item>
458
+ <Grid>
462
459
  <LayerOption name="Opacity" inputId={opacitySliderId}>
463
460
  <OpacitySlider
464
461
  value={opacity}
@@ -469,7 +466,7 @@ function LayerOptions({
469
466
  </Grid>
470
467
  )}
471
468
  {shouldShowTransparentColor && !use3d && (
472
- <Grid item>
469
+ <Grid>
473
470
  <LayerOption
474
471
  name="Zero Transparent"
475
472
  inputId={zeroTransparentId}
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useState, useEffect } from 'react';
2
2
 
3
- import { Grid, Slider } from '@material-ui/core';
3
+ import { Grid, Slider } from '@vitessce/styles';
4
4
  import { debounce, isEqual } from 'lodash-es';
5
5
 
6
6
  import {
@@ -45,12 +45,12 @@ function ChannelSlider({
45
45
  [handleChange],
46
46
  );
47
47
 
48
- const classes = useChannelSliderStyles();
48
+ const { classes } = useChannelSliderStyles();
49
49
 
50
50
  const step = max - min < 500 && dtype.startsWith('Float') ? (max - min) / 500 : 1;
51
51
  return (
52
52
  <Slider
53
- classes={{ valueLabel: classes.valueLabel }}
53
+ slotProps={{ valueLabel: { className: classes.valueLabel } }}
54
54
  value={slider}
55
55
  valueLabelFormat={abbreviateNumber}
56
56
  onChange={(e, v) => handleChangeDebounced(v)}
@@ -186,9 +186,9 @@ function RasterChannelController({
186
186
  */
187
187
  const createSelection = index => ({ [dimName]: index });
188
188
  return (
189
- <Grid container direction="column" m={1} justifyContent="center">
189
+ <Grid container direction="column" justifyContent="center">
190
190
  <Grid container direction="row" justifyContent="space-between">
191
- <Grid item xs={10}>
191
+ <Grid size={10}>
192
192
  <ChannelSelectionDropdown
193
193
  handleChange={v => handlePropertyChange('selection', createSelection(v))
194
194
  }
@@ -197,7 +197,7 @@ function RasterChannelController({
197
197
  disabled={isLoading}
198
198
  />
199
199
  </Grid>
200
- <Grid item xs={1} style={{ marginTop: '4px' }}>
200
+ <Grid size={1} sx={{ marginTop: '4px' }}>
201
201
  <ChannelOptions
202
202
  handlePropertyChange={handlePropertyChange}
203
203
  handleChannelRemove={handleChannelRemove}
@@ -207,7 +207,7 @@ function RasterChannelController({
207
207
  </Grid>
208
208
  </Grid>
209
209
  <Grid container direction="row" justifyContent="space-between">
210
- <Grid item xs={2}>
210
+ <Grid size={2}>
211
211
  <ChannelVisibilityCheckbox
212
212
  color={rgbColor}
213
213
  checked={visibility}
@@ -215,7 +215,7 @@ function RasterChannelController({
215
215
  disabled={isLoading}
216
216
  />
217
217
  </Grid>
218
- <Grid item xs={9}>
218
+ <Grid size={9}>
219
219
  <ChannelSlider
220
220
  color={rgbColor}
221
221
  slider={slider}