@astral/ui 4.111.0 → 4.113.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.
@@ -1,11 +1,10 @@
1
+ import { HOVER_MEDIA } from '../../constants';
1
2
  import { styled } from '../../styled';
2
3
  import { dataGridClassnames, MIN_ROW_HEIGHT } from '../constants';
3
4
  import { bodyClassnames } from './constants';
4
5
  export const Wrapper = styled.ul `
5
6
  --min-display-rows: 0;
6
7
 
7
- scrollbar-gutter: stable;
8
-
9
8
  overflow-y: auto;
10
9
 
11
10
  width: fit-content;
@@ -17,6 +16,10 @@ export const Wrapper = styled.ul `
17
16
 
18
17
  list-style-type: none;
19
18
 
19
+ ${HOVER_MEDIA} {
20
+ scrollbar-gutter: stable;
21
+ }
22
+
20
23
  &.${bodyClassnames.disableMinHeight} {
21
24
  min-height: unset;
22
25
  }
@@ -28,7 +31,7 @@ export const Wrapper = styled.ul `
28
31
 
29
32
  ${({ theme }) => theme.breakpoints.down('mobile')} {
30
33
  scrollbar-gutter: unset;
31
-
34
+
32
35
  overflow: initial;
33
36
 
34
37
  width: 100%;
@@ -1,4 +1,4 @@
1
- import { SCROLLBAR_SIZE } from '../../constants/scrollbar';
1
+ import { HOVER_MEDIA, SCROLLBAR_SIZE } from '../../constants';
2
2
  import { styled } from '../../styled';
3
3
  export const Wrapper = styled('header', {
4
4
  shouldForwardProp: (prop) => !['$gridColumns'].includes(prop),
@@ -8,10 +8,13 @@ export const Wrapper = styled('header', {
8
8
 
9
9
  width: fit-content;
10
10
  min-width: 100%;
11
- padding-right: ${SCROLLBAR_SIZE};
12
11
 
13
12
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
14
13
 
14
+ ${HOVER_MEDIA} {
15
+ padding-right: ${SCROLLBAR_SIZE};
16
+ }
17
+
15
18
  ${({ theme }) => theme.breakpoints.down('mobile')} {
16
19
  display: none;
17
20
  }
@@ -7,7 +7,9 @@ export const CONDITION_TYPE_ERROR = [
7
7
  {
8
8
  type: ErrorBoundaryTypeError.OutdatedRelease,
9
9
  condition: (error) => error.name === 'ChunkLoadError' ||
10
- error.message.includes('Failed to fetch dynamically imported module'),
10
+ error.message.includes('Failed to fetch dynamically imported module') || // Chrome
11
+ error.message.includes('error loading dynamically imported module') || // Firefox
12
+ error.message.includes('Importing a module script failed'), // Safari
11
13
  },
12
14
  { type: ErrorBoundaryTypeError.Default, condition: () => true },
13
15
  ];
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { Global } from '@emotion/react';
3
3
  import CssBaseline from '@mui/material/CssBaseline';
4
4
  import ScopedCssBaseline from '@mui/material/ScopedCssBaseline';
5
- import { SCROLLBAR_SIZE } from '../constants';
5
+ import { HOVER_MEDIA, SCROLLBAR_SIZE } from '../constants';
6
6
  import { useTheme } from '../theme/hooks/useTheme';
7
7
  export const GlobalStyles = ({ children, withScopedStyles = false, ...props }) => {
8
8
  const theme = useTheme();
@@ -25,20 +25,22 @@ export const GlobalStyles = ({ children, withScopedStyles = false, ...props }) =
25
25
  fontSize: 16,
26
26
  },
27
27
  },
28
- '*::-webkit-scrollbar': {
29
- width: SCROLLBAR_SIZE,
30
- height: SCROLLBAR_SIZE,
31
- backgroundColor: theme.palette.grey[100],
32
- borderRadius: theme.shape.small,
33
- },
34
- '*::-webkit-scrollbar-thumb': {
35
- borderRadius: theme.shape.small,
36
- backgroundColor: theme.palette.grey[400],
37
- },
38
- '@-moz-document url-prefix()': {
39
- '*': {
40
- scrollbarWidth: 'thin',
41
- scrollbarColor: `${theme.palette.grey[400]} ${theme.palette.grey[100]}`,
28
+ [HOVER_MEDIA]: {
29
+ '*::-webkit-scrollbar': {
30
+ width: SCROLLBAR_SIZE,
31
+ height: SCROLLBAR_SIZE,
32
+ backgroundColor: theme.palette.grey[100],
33
+ borderRadius: theme.shape.small,
34
+ },
35
+ '*::-webkit-scrollbar-thumb': {
36
+ borderRadius: theme.shape.small,
37
+ backgroundColor: theme.palette.grey[400],
38
+ },
39
+ '@supports (-moz-appearance: none)': {
40
+ '*': {
41
+ scrollbarWidth: 'thin',
42
+ scrollbarColor: `${theme.palette.grey[400]} ${theme.palette.grey[100]}`,
43
+ },
42
44
  },
43
45
  },
44
46
  } })] }));
@@ -1,6 +1,6 @@
1
1
  import { drawerClasses } from '@mui/material/Drawer';
2
2
  import { bottomDrawerClassnames, OFFSET_TOP_SCREEN, } from '../BottomDrawer/constants';
3
- import { SCROLLBAR_SIZE } from '../constants';
3
+ import { HOVER_MEDIA, SCROLLBAR_SIZE } from '../constants';
4
4
  import { SideDialog } from '../SideDialog';
5
5
  import { SideDialogActions } from '../SideDialogActions';
6
6
  import { SideDialogContent } from '../SideDialogContent';
@@ -24,12 +24,16 @@ export const TabsWrapper = styled(SideDialogContent) `
24
24
  }
25
25
  `;
26
26
  export const ContentWrapper = styled(SideDialogContent) `
27
- scrollbar-gutter: stable;
28
-
29
27
  padding-top: ${({ theme }) => theme.spacing(1)};
30
- padding-right: ${({ theme }) => `calc(${theme.spacing(6)} - ${SCROLLBAR_SIZE})`};
28
+ padding-right: ${({ theme }) => theme.spacing(6)};
31
29
  padding-bottom: ${({ theme }) => theme.spacing(1)};
32
30
 
31
+ ${HOVER_MEDIA} {
32
+ scrollbar-gutter: stable;
33
+
34
+ padding-right: ${({ theme }) => `calc(${theme.spacing(6)} - ${SCROLLBAR_SIZE})`};
35
+ }
36
+
33
37
  ${({ theme }) => theme.breakpoints.down('mobile')} {
34
38
  padding: ${({ theme }) => theme.spacing(0)};
35
39
  }
@@ -1,4 +1,4 @@
1
- import { selfContainedClassname } from '../constants';
1
+ import { HOVER_MEDIA, selfContainedClassname } from '../constants';
2
2
  import { pdfViewerClassnames } from '../PdfViewer/constants';
3
3
  import { styled } from '../styled';
4
4
  import { PAGE_CONTENT_ANIMATION, pageContentClassnames } from './constants';
@@ -52,13 +52,16 @@ export const Wrapper = styled('article', {
52
52
  `;
53
53
  export const Content = styled.div `
54
54
  scroll-behavior: smooth;
55
- scrollbar-gutter: stable;
56
55
 
57
56
  overflow: auto;
58
57
  flex-grow: 1;
59
58
 
60
59
  padding: ${({ theme }) => theme.spacing(0, 6, 4)};
61
60
 
61
+ ${HOVER_MEDIA} {
62
+ scrollbar-gutter: stable;
63
+ }
64
+
62
65
  &.${pageContentClassnames.contentHasHeader}, &.${pageContentClassnames.hasAside} {
63
66
  padding: ${({ theme }) => theme.spacing(4, 6, 4)};
64
67
  }
@@ -75,7 +78,7 @@ export const Content = styled.div `
75
78
 
76
79
  ${({ theme }) => theme.breakpoints.down('mobile')} {
77
80
  scrollbar-gutter: unset;
78
-
81
+
79
82
  overflow: hidden;
80
83
 
81
84
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
@@ -1,3 +1,4 @@
1
+ import { HOVER_MEDIA } from '../constants';
1
2
  import { styled } from '../styled';
2
3
  import { RESERVED_CONTROL_BAR_SPACE } from './constants';
3
4
  export const Wrapper = styled.div `
@@ -14,12 +15,15 @@ export const PDFViewerContainer = styled.div `
14
15
  }
15
16
  `;
16
17
  export const ScrollContainer = styled.div `
17
- scrollbar-gutter: stable;
18
18
 
19
19
  overflow: ${({ $isViewerLite, $enabledZoom }) => $isViewerLite || !$enabledZoom ? 'unset' : 'auto'};
20
20
 
21
21
  height: 100%;
22
-
22
+
23
+ ${HOVER_MEDIA} {
24
+ scrollbar-gutter: stable;
25
+ }
26
+
23
27
  ${({ theme }) => theme.breakpoints.down('mobile')} {
24
28
  scrollbar-gutter: unset;
25
29
  }
@@ -1,3 +1,4 @@
1
+ import { HOVER_MEDIA } from '../../components/constants';
1
2
  import { PageContent, pageContentClassnames, } from '../../components/PageContent';
2
3
  import { PageHeader, pageHeaderClassnames } from '../../components/PageHeader';
3
4
  import { styled } from '../../components/styled';
@@ -17,13 +18,15 @@ export const MobileAlertWrapper = styled.div `
17
18
  }
18
19
  `;
19
20
  export const StyledPageContent = styled(PageContent) `
20
- scrollbar-gutter: stable;
21
21
 
22
22
  overflow: auto;
23
23
 
24
24
  padding-top: ${({ theme }) => theme.spacing(4)};
25
25
 
26
26
  border-top: 1px solid ${({ theme }) => theme.palette.grey[300]};
27
+ ${HOVER_MEDIA} {
28
+ scrollbar-gutter: stable;
29
+ }
27
30
 
28
31
  ${({ theme }) => theme.breakpoints.up('mobile')} {
29
32
  .${pageContentClassnames.content} {
@@ -1,37 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wrapper = void 0;
4
+ const constants_1 = require("../../constants");
4
5
  const styled_1 = require("../../styled");
5
- const constants_1 = require("../constants");
6
- const constants_2 = require("./constants");
6
+ const constants_2 = require("../constants");
7
+ const constants_3 = require("./constants");
7
8
  exports.Wrapper = styled_1.styled.ul `
8
9
  --min-display-rows: 0;
9
10
 
10
- scrollbar-gutter: stable;
11
-
12
11
  overflow-y: auto;
13
12
 
14
13
  width: fit-content;
15
14
  min-width: 100%;
16
15
  height: 100%;
17
- min-height: calc(var(--min-display-rows) * ${constants_1.MIN_ROW_HEIGHT}px);
16
+ min-height: calc(var(--min-display-rows) * ${constants_2.MIN_ROW_HEIGHT}px);
18
17
  margin: 0;
19
18
  padding: 0;
20
19
 
21
20
  list-style-type: none;
22
21
 
23
- &.${constants_2.bodyClassnames.disableMinHeight} {
22
+ ${constants_1.HOVER_MEDIA} {
23
+ scrollbar-gutter: stable;
24
+ }
25
+
26
+ &.${constants_3.bodyClassnames.disableMinHeight} {
24
27
  min-height: unset;
25
28
  }
26
29
 
27
- &.${constants_1.dataGridClassnames.bodyEmpty} {
30
+ &.${constants_2.dataGridClassnames.bodyEmpty} {
28
31
  display: flex;
29
32
  align-items: center;
30
33
  }
31
34
 
32
35
  ${({ theme }) => theme.breakpoints.down('mobile')} {
33
36
  scrollbar-gutter: unset;
34
-
37
+
35
38
  overflow: initial;
36
39
 
37
40
  width: 100%;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wrapper = void 0;
4
- const scrollbar_1 = require("../../constants/scrollbar");
4
+ const constants_1 = require("../../constants");
5
5
  const styled_1 = require("../../styled");
6
6
  exports.Wrapper = (0, styled_1.styled)('header', {
7
7
  shouldForwardProp: (prop) => !['$gridColumns'].includes(prop),
@@ -11,10 +11,13 @@ exports.Wrapper = (0, styled_1.styled)('header', {
11
11
 
12
12
  width: fit-content;
13
13
  min-width: 100%;
14
- padding-right: ${scrollbar_1.SCROLLBAR_SIZE};
15
14
 
16
15
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
17
16
 
17
+ ${constants_1.HOVER_MEDIA} {
18
+ padding-right: ${constants_1.SCROLLBAR_SIZE};
19
+ }
20
+
18
21
  ${({ theme }) => theme.breakpoints.down('mobile')} {
19
22
  display: none;
20
23
  }
@@ -10,7 +10,9 @@ exports.CONDITION_TYPE_ERROR = [
10
10
  {
11
11
  type: enums_1.ErrorBoundaryTypeError.OutdatedRelease,
12
12
  condition: (error) => error.name === 'ChunkLoadError' ||
13
- error.message.includes('Failed to fetch dynamically imported module'),
13
+ error.message.includes('Failed to fetch dynamically imported module') || // Chrome
14
+ error.message.includes('error loading dynamically imported module') || // Firefox
15
+ error.message.includes('Importing a module script failed'), // Safari
14
16
  },
15
17
  { type: enums_1.ErrorBoundaryTypeError.Default, condition: () => true },
16
18
  ];
@@ -31,20 +31,22 @@ const GlobalStyles = ({ children, withScopedStyles = false, ...props }) => {
31
31
  fontSize: 16,
32
32
  },
33
33
  },
34
- '*::-webkit-scrollbar': {
35
- width: constants_1.SCROLLBAR_SIZE,
36
- height: constants_1.SCROLLBAR_SIZE,
37
- backgroundColor: theme.palette.grey[100],
38
- borderRadius: theme.shape.small,
39
- },
40
- '*::-webkit-scrollbar-thumb': {
41
- borderRadius: theme.shape.small,
42
- backgroundColor: theme.palette.grey[400],
43
- },
44
- '@-moz-document url-prefix()': {
45
- '*': {
46
- scrollbarWidth: 'thin',
47
- scrollbarColor: `${theme.palette.grey[400]} ${theme.palette.grey[100]}`,
34
+ [constants_1.HOVER_MEDIA]: {
35
+ '*::-webkit-scrollbar': {
36
+ width: constants_1.SCROLLBAR_SIZE,
37
+ height: constants_1.SCROLLBAR_SIZE,
38
+ backgroundColor: theme.palette.grey[100],
39
+ borderRadius: theme.shape.small,
40
+ },
41
+ '*::-webkit-scrollbar-thumb': {
42
+ borderRadius: theme.shape.small,
43
+ backgroundColor: theme.palette.grey[400],
44
+ },
45
+ '@supports (-moz-appearance: none)': {
46
+ '*': {
47
+ scrollbarWidth: 'thin',
48
+ scrollbarColor: `${theme.palette.grey[400]} ${theme.palette.grey[100]}`,
49
+ },
48
50
  },
49
51
  },
50
52
  } })] }));
@@ -27,12 +27,16 @@ exports.TabsWrapper = (0, styled_1.styled)(SideDialogContent_1.SideDialogContent
27
27
  }
28
28
  `;
29
29
  exports.ContentWrapper = (0, styled_1.styled)(SideDialogContent_1.SideDialogContent) `
30
- scrollbar-gutter: stable;
31
-
32
30
  padding-top: ${({ theme }) => theme.spacing(1)};
33
- padding-right: ${({ theme }) => `calc(${theme.spacing(6)} - ${constants_2.SCROLLBAR_SIZE})`};
31
+ padding-right: ${({ theme }) => theme.spacing(6)};
34
32
  padding-bottom: ${({ theme }) => theme.spacing(1)};
35
33
 
34
+ ${constants_2.HOVER_MEDIA} {
35
+ scrollbar-gutter: stable;
36
+
37
+ padding-right: ${({ theme }) => `calc(${theme.spacing(6)} - ${constants_2.SCROLLBAR_SIZE})`};
38
+ }
39
+
36
40
  ${({ theme }) => theme.breakpoints.down('mobile')} {
37
41
  padding: ${({ theme }) => theme.spacing(0)};
38
42
  }
@@ -55,13 +55,16 @@ exports.Wrapper = (0, styled_1.styled)('article', {
55
55
  `;
56
56
  exports.Content = styled_1.styled.div `
57
57
  scroll-behavior: smooth;
58
- scrollbar-gutter: stable;
59
58
 
60
59
  overflow: auto;
61
60
  flex-grow: 1;
62
61
 
63
62
  padding: ${({ theme }) => theme.spacing(0, 6, 4)};
64
63
 
64
+ ${constants_1.HOVER_MEDIA} {
65
+ scrollbar-gutter: stable;
66
+ }
67
+
65
68
  &.${constants_3.pageContentClassnames.contentHasHeader}, &.${constants_3.pageContentClassnames.hasAside} {
66
69
  padding: ${({ theme }) => theme.spacing(4, 6, 4)};
67
70
  }
@@ -78,7 +81,7 @@ exports.Content = styled_1.styled.div `
78
81
 
79
82
  ${({ theme }) => theme.breakpoints.down('mobile')} {
80
83
  scrollbar-gutter: unset;
81
-
84
+
82
85
  overflow: hidden;
83
86
 
84
87
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ScrollContainer = exports.PDFViewerContainer = exports.Wrapper = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const styled_1 = require("../styled");
5
- const constants_1 = require("./constants");
6
+ const constants_2 = require("./constants");
6
7
  exports.Wrapper = styled_1.styled.div `
7
8
  position: relative;
8
9
 
@@ -10,19 +11,22 @@ exports.Wrapper = styled_1.styled.div `
10
11
  `;
11
12
  exports.PDFViewerContainer = styled_1.styled.div `
12
13
  height: 100%;
13
- padding-right: ${({ $isViewerLite, $enabledZoom }) => $isViewerLite || !$enabledZoom ? '0' : `${constants_1.RESERVED_CONTROL_BAR_SPACE}px`};
14
+ padding-right: ${({ $isViewerLite, $enabledZoom }) => $isViewerLite || !$enabledZoom ? '0' : `${constants_2.RESERVED_CONTROL_BAR_SPACE}px`};
14
15
 
15
16
  ${({ theme }) => theme.breakpoints.down('mobile')} {
16
17
  padding-right: 0;
17
18
  }
18
19
  `;
19
20
  exports.ScrollContainer = styled_1.styled.div `
20
- scrollbar-gutter: stable;
21
21
 
22
22
  overflow: ${({ $isViewerLite, $enabledZoom }) => $isViewerLite || !$enabledZoom ? 'unset' : 'auto'};
23
23
 
24
24
  height: 100%;
25
-
25
+
26
+ ${constants_1.HOVER_MEDIA} {
27
+ scrollbar-gutter: stable;
28
+ }
29
+
26
30
  ${({ theme }) => theme.breakpoints.down('mobile')} {
27
31
  scrollbar-gutter: unset;
28
32
  }
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledPageHeader = exports.StyledPageContent = exports.MobileAlertWrapper = exports.DesktopAlertWrapper = void 0;
4
+ const constants_1 = require("../../components/constants");
4
5
  const PageContent_1 = require("../../components/PageContent");
5
6
  const PageHeader_1 = require("../../components/PageHeader");
6
7
  const styled_1 = require("../../components/styled");
7
- const constants_1 = require("./constants");
8
+ const constants_2 = require("./constants");
8
9
  exports.DesktopAlertWrapper = styled_1.styled.div `
9
10
  display: block;
10
11
 
@@ -20,13 +21,15 @@ exports.MobileAlertWrapper = styled_1.styled.div `
20
21
  }
21
22
  `;
22
23
  exports.StyledPageContent = (0, styled_1.styled)(PageContent_1.PageContent) `
23
- scrollbar-gutter: stable;
24
24
 
25
25
  overflow: auto;
26
26
 
27
27
  padding-top: ${({ theme }) => theme.spacing(4)};
28
28
 
29
29
  border-top: 1px solid ${({ theme }) => theme.palette.grey[300]};
30
+ ${constants_1.HOVER_MEDIA} {
31
+ scrollbar-gutter: stable;
32
+ }
30
33
 
31
34
  ${({ theme }) => theme.breakpoints.up('mobile')} {
32
35
  .${PageContent_1.pageContentClassnames.content} {
@@ -45,10 +48,10 @@ exports.StyledPageContent = (0, styled_1.styled)(PageContent_1.PageContent) `
45
48
  margin-bottom: ${({ theme }) => theme.spacing(20)};
46
49
  padding-top: 0;
47
50
 
48
- &.${constants_1.formPageContentClassnames.formPageContentSecondaryActions} {
51
+ &.${constants_2.formPageContentClassnames.formPageContentSecondaryActions} {
49
52
  margin-bottom: ${({ theme }) => theme.spacing(32)};
50
53
 
51
- &.${constants_1.formPageContentClassnames.formWizardPageContentActions} {
54
+ &.${constants_2.formPageContentClassnames.formWizardPageContentActions} {
52
55
  margin-bottom: ${({ theme }) => theme.spacing(50)};
53
56
  }
54
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.111.0",
3
+ "version": "4.113.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {