@autoguru/overdrive 4.64.0 → 4.64.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.
|
@@ -26,7 +26,7 @@ export const calendarStyle = style([sprinkles({
|
|
|
26
26
|
|
|
27
27
|
export const cellStyle = style([sprinkles({
|
|
28
28
|
alignItems: 'center',
|
|
29
|
-
borderRadius: '
|
|
29
|
+
borderRadius: 'small',
|
|
30
30
|
display: 'flex',
|
|
31
31
|
mx: 'auto',
|
|
32
32
|
justifyContent: 'center',
|
|
@@ -63,7 +63,7 @@ export const cellStyle = style([sprinkles({
|
|
|
63
63
|
export const buttonStyle = style([sprinkles({
|
|
64
64
|
alignItems: 'center',
|
|
65
65
|
borderColor: 'default',
|
|
66
|
-
borderRadius: '
|
|
66
|
+
borderRadius: 'small',
|
|
67
67
|
borderStyle: 'solid',
|
|
68
68
|
borderWidth: '1',
|
|
69
69
|
display: 'flex',
|
|
@@ -85,7 +85,7 @@ export const buttonStyle = style([sprinkles({
|
|
|
85
85
|
},
|
|
86
86
|
[selectors.disabled]: {
|
|
87
87
|
background: tokens.color.background.default,
|
|
88
|
-
borderColor: tokens.
|
|
88
|
+
borderColor: tokens.color.interactive.borderMuted,
|
|
89
89
|
color: tokens.color.gamut.gray['300'],
|
|
90
90
|
cursor: 'not-allowed'
|
|
91
91
|
}
|
|
@@ -2,6 +2,12 @@ import React from 'react';
|
|
|
2
2
|
export interface PortalProps {
|
|
3
3
|
children?: React.ReactNode;
|
|
4
4
|
container?: HTMLElement;
|
|
5
|
+
/**
|
|
6
|
+
* Renders the children with no wrapper element. The wrapper is what carries
|
|
7
|
+
* the theme class and the provider's colour overrides, so opting out of it
|
|
8
|
+
* also opts out of tenant branding — the portalled subtree falls back to
|
|
9
|
+
* base-theme tokens.
|
|
10
|
+
*/
|
|
5
11
|
noThemedWrapper?: boolean;
|
|
6
12
|
}
|
|
7
13
|
declare const _Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLElement | undefined>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAMhF,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../lib/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAMhF,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6DD,QAAA,MAAM,OAAO,6FAAqB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,CAAC"}
|
|
@@ -10,6 +10,7 @@ function Portal({
|
|
|
10
10
|
}, ref) {
|
|
11
11
|
const {
|
|
12
12
|
themeClass,
|
|
13
|
+
overrideStyles,
|
|
13
14
|
portalMountPoint
|
|
14
15
|
} = useTheme();
|
|
15
16
|
const [mountPoint, setMountPoint] = useState(null);
|
|
@@ -41,8 +42,14 @@ function Portal({
|
|
|
41
42
|
};
|
|
42
43
|
}, [ref, mountNode]);
|
|
43
44
|
if (!mountNode) return null;
|
|
45
|
+
|
|
46
|
+
// The wrapper carries the provider's colour overrides as well as its theme
|
|
47
|
+
// class: custom properties inherit down the DOM, and the portal mounts
|
|
48
|
+
// outside the provider div, so without them a branded tenant's drawers,
|
|
49
|
+
// modals, toasts and popovers fall back to base-theme tokens.
|
|
44
50
|
return noThemedWrapper ? /*#__PURE__*/createPortal(children, mountNode) : /*#__PURE__*/createPortal(/*#__PURE__*/_jsx("div", {
|
|
45
51
|
className: themeClass,
|
|
52
|
+
style: overrideStyles,
|
|
46
53
|
children: children
|
|
47
54
|
}), mountNode);
|
|
48
55
|
}
|