@balena/ui-shared-components 9.4.1 → 9.4.2

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/theme.d.ts CHANGED
@@ -92,6 +92,11 @@ declare module '@mui/material/Typography' {
92
92
  codeSm: true;
93
93
  }
94
94
  }
95
+ declare module '@mui/material/Avatar' {
96
+ interface AvatarOwnProps {
97
+ size?: 'xl' | 'lg' | 'md' | 'sm';
98
+ }
99
+ }
95
100
  declare module '@mui/material/Button' {
96
101
  interface ButtonPropsColorOverrides {
97
102
  customBlue: true;
package/dist/theme.js CHANGED
@@ -334,12 +334,43 @@ export const theme = createTheme({
334
334
  },
335
335
  },
336
336
  MuiAvatar: {
337
+ defaultProps: { size: 'md' },
338
+ variants: [
339
+ {
340
+ props: { size: 'xl' },
341
+ style: {
342
+ width: 64,
343
+ height: 64,
344
+ fontSize: '32px',
345
+ },
346
+ },
347
+ {
348
+ props: { size: 'lg' },
349
+ style: {
350
+ width: 48,
351
+ height: 48,
352
+ fontSize: '24px',
353
+ },
354
+ },
355
+ {
356
+ props: { size: 'sm' },
357
+ style: {
358
+ width: 24,
359
+ height: 24,
360
+ fontSize: '12px',
361
+ },
362
+ },
363
+ ],
337
364
  styleOverrides: {
338
365
  root: {
339
366
  img: {
340
367
  objectFit: 'contain',
341
368
  },
342
369
  },
370
+ colorDefault: {
371
+ backgroundColor: color.bg.subtle.value,
372
+ color: color.text.value,
373
+ },
343
374
  },
344
375
  },
345
376
  MuiDialogTitle: {
@@ -786,7 +817,7 @@ export const theme = createTheme({
786
817
  color: color.text.inverse.value,
787
818
  },
788
819
  '&:not(.Mui-selected):hover': {
789
- backgroundColor: color.bg.value,
820
+ backgroundColor: color.bg.active.value,
790
821
  },
791
822
  '&:focus-visible': {
792
823
  outlineColor: color.bg.strong.value,
@@ -906,6 +937,7 @@ export const theme = createTheme({
906
937
  },
907
938
  styleOverrides: {
908
939
  root: ({ theme }) => ({
940
+ background: 'white',
909
941
  legend: {
910
942
  // We should be able to remove this but there is a css override somewhere that
911
943
  // set the fieldset > legend max-width to 100%, and this invalidate the notched: false rule for some inputs.
@@ -922,6 +954,10 @@ export const theme = createTheme({
922
954
  height: '20px',
923
955
  },
924
956
  }),
957
+ input: {
958
+ paddingTop: '14px',
959
+ paddingBottom: '12px',
960
+ },
925
961
  },
926
962
  },
927
963
  MuiInput: {
@@ -965,6 +1001,16 @@ export const theme = createTheme({
965
1001
  },
966
1002
  },
967
1003
  },
1004
+ MuiAutocomplete: {
1005
+ styleOverrides: {
1006
+ root: ({ theme }) => ({
1007
+ '.MuiOutlinedInput-root .MuiAutocomplete-input': {
1008
+ paddingTop: theme.spacing(1),
1009
+ paddingBottom: theme.spacing(1),
1010
+ },
1011
+ }),
1012
+ },
1013
+ },
968
1014
  MuiLink: {
969
1015
  defaultProps: { underline: 'none' },
970
1016
  styleOverrides: {
@@ -1002,6 +1048,7 @@ export const theme = createTheme({
1002
1048
  },
1003
1049
  styleOverrides: {
1004
1050
  root: {
1051
+ color: color.text.value,
1005
1052
  textTransform: 'none',
1006
1053
  fontSize: '1rem',
1007
1054
  },
@@ -1407,5 +1454,23 @@ export const theme = createTheme({
1407
1454
  }),
1408
1455
  },
1409
1456
  },
1457
+ MuiMenuItem: {
1458
+ styleOverrides: {
1459
+ root: {
1460
+ '&.Mui-selected': {
1461
+ background: color.bg.active.value,
1462
+ '&:hover': {
1463
+ background: color.bg.active.value,
1464
+ },
1465
+ },
1466
+ '&:hover': {
1467
+ background: color.bg.hover.value,
1468
+ },
1469
+ },
1470
+ selected: {
1471
+ background: color.bg.active.value,
1472
+ },
1473
+ },
1474
+ },
1410
1475
  },
1411
1476
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "9.4.1",
3
+ "version": "9.4.2",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -10,7 +10,7 @@
10
10
  "README.md"
11
11
  ],
12
12
  "dependencies": {
13
- "@balena/design-tokens": "^0.9.1",
13
+ "@balena/design-tokens": "^0.10.0",
14
14
  "@emotion/react": "^11.10.6",
15
15
  "@emotion/styled": "^11.10.6",
16
16
  "@fortawesome/free-solid-svg-icons": "^6.5.1",
@@ -110,6 +110,6 @@
110
110
  },
111
111
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
112
112
  "versionist": {
113
- "publishedAt": "2024-10-25T13:12:48.974Z"
113
+ "publishedAt": "2024-10-25T17:16:29.742Z"
114
114
  }
115
115
  }