@balena/ui-shared-components 5.5.1 → 5.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.d.ts CHANGED
@@ -56,5 +56,6 @@ export type { IconButtonWithTrackingProps } from './components/IconButtonWithTra
56
56
  export { AnalyticsContextProvider, useAnalyticsContext, AnalyticsStoreActions, } from './contexts/AnalyticsContext';
57
57
  export * as Material from '@mui/material';
58
58
  export * as MaterialLab from '@mui/lab';
59
+ export * as MaterialDataGrid from '@mui/x-data-grid';
59
60
  export { enqueueSnackbar, closeSnackbar } from 'notistack';
60
61
  export * as designTokens from '@balena/design-tokens';
package/dist/index.js CHANGED
@@ -29,5 +29,6 @@ export { IconButtonWithTracking } from './components/IconButtonWithTracking';
29
29
  export { AnalyticsContextProvider, useAnalyticsContext, AnalyticsStoreActions, } from './contexts/AnalyticsContext';
30
30
  export * as Material from '@mui/material';
31
31
  export * as MaterialLab from '@mui/lab';
32
+ export * as MaterialDataGrid from '@mui/x-data-grid';
32
33
  export { enqueueSnackbar, closeSnackbar } from 'notistack';
33
34
  export * as designTokens from '@balena/design-tokens';
package/dist/theme.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { createTheme, } from '@mui/material';
2
+ import { createTheme, tableCellClasses, } from '@mui/material';
3
3
  import { color } from '@balena/design-tokens';
4
4
  export const theme = createTheme({
5
5
  typography: {
@@ -587,6 +587,84 @@ export const theme = createTheme({
587
587
  },
588
588
  },
589
589
  },
590
+ MuiTableRow: {
591
+ styleOverrides: {
592
+ root: {
593
+ '&:nth-of-type(even)': { backgroundColor: color.bg.value },
594
+ },
595
+ },
596
+ },
597
+ MuiTableCell: {
598
+ styleOverrides: {
599
+ root: ({ theme }) => ({
600
+ padding: `14px ${theme.spacing(2)}`,
601
+ fontSize: '1rem',
602
+ borderBottom: 'none',
603
+ [`&.${tableCellClasses.head}`]: {
604
+ backgroundColor: color.bg.value,
605
+ padding: `10px ${theme.spacing(2)}`,
606
+ borderBottom: `1px solid ${color.border.subtle.value}`,
607
+ fontWeight: 'bold',
608
+ },
609
+ }),
610
+ },
611
+ },
612
+ MuiTableBody: {
613
+ styleOverrides: {
614
+ root: {
615
+ borderBottom: `1px solid ${color.border.subtle.value}`,
616
+ },
617
+ },
618
+ },
619
+ MuiDataGrid: {
620
+ defaultProps: {
621
+ columnHeaderHeight: 42,
622
+ rowHeight: 50,
623
+ autoHeight: true,
624
+ },
625
+ styleOverrides: {
626
+ root: {
627
+ '--DataGrid-rowBorderColor': color.border.subtle.value,
628
+ '--DataGrid-containerBackground': '#f2f4fa',
629
+ border: 'none',
630
+ fontSize: '1rem',
631
+ '.MuiDataGrid-columnHeaderTitle': {
632
+ fontWeight: 'bold',
633
+ },
634
+ '.MuiDataGrid-columnSeparator': {
635
+ color: color.border.strong.value,
636
+ },
637
+ '.MuiDataGrid-main > *:first-of-type': { borderRadius: 0 },
638
+ '.MuiDataGrid-row': {
639
+ '&:hover': {
640
+ backgroundColor: `${color.bg.accent.value} !important`,
641
+ },
642
+ '&:not(.Mui-selected)': {
643
+ '&:nth-of-type(odd)': {
644
+ backgroundColor: 'white',
645
+ },
646
+ '&:nth-of-type(even)': {
647
+ backgroundColor: color.bg.value,
648
+ },
649
+ },
650
+ },
651
+ '.MuiDataGrid-cell': {
652
+ borderTop: 'none',
653
+ },
654
+ '.MuiDataGrid-columnHeader, .MuiDataGrid-cell:not(.MuiDataGrid-cell--editable)': {
655
+ '&:focus,& :focus-within': {
656
+ outline: 'none',
657
+ },
658
+ '&:focus-visible': {
659
+ outline: `1px solid ${color.border.accent.value}`,
660
+ },
661
+ },
662
+ '.MuiDataGrid-bottomContainer': {
663
+ borderBottom: `1px solid ${color.border.subtle.value}`,
664
+ },
665
+ },
666
+ },
667
+ },
590
668
  MuiFormControl: {
591
669
  defaultProps: {
592
670
  variant: 'outlined',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balena/ui-shared-components",
3
- "version": "5.5.1",
3
+ "version": "5.6.0",
4
4
  "main": "./dist/index.js",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -18,6 +18,7 @@
18
18
  "@mui/lab": "^5.0.0-alpha.165",
19
19
  "@mui/material": "^5.12.0",
20
20
  "@mui/styled-engine-sc": "^5.12.0",
21
+ "@mui/x-data-grid": "^7.1.0",
21
22
  "@react-google-maps/api": "^2.18.1",
22
23
  "@rjsf/core": "^5.13.0",
23
24
  "@rjsf/mui": "^5.13.0",
@@ -110,6 +111,6 @@
110
111
  },
111
112
  "homepage": "https://github.com/balena-io/ui-shared-components#readme",
112
113
  "versionist": {
113
- "publishedAt": "2024-04-23T10:36:13.213Z"
114
+ "publishedAt": "2024-04-23T14:09:14.943Z"
114
115
  }
115
116
  }