@proulr/sdui-components 0.1.50 → 0.1.51
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/package.json
CHANGED
|
@@ -25,34 +25,23 @@ const absoluteFill: ViewStyle = {
|
|
|
25
25
|
type ChromeGlassLayerProps = {
|
|
26
26
|
style?: StyleProp<ViewStyle>;
|
|
27
27
|
pointerEvents?: ViewProps['pointerEvents'];
|
|
28
|
-
/**
|
|
29
|
-
* When false, skip BlurView and keep the solid OLED pill base.
|
|
30
|
-
* Use on Android surfaces that animate (drawer slide) — BlurView + transform
|
|
31
|
-
* over image-heavy screens flashes black.
|
|
32
|
-
*/
|
|
33
|
-
blurEnabled?: boolean;
|
|
34
28
|
};
|
|
35
29
|
|
|
36
30
|
/**
|
|
37
31
|
* Camada de frost única do sistema (igual AppSideDrawer topo/base).
|
|
38
|
-
*
|
|
39
|
-
* never flash pure black. Overlay tint stays transparent (frost limpo).
|
|
32
|
+
* BlurView + `colors.chromeGlassOverlay` — sem cast cinza.
|
|
40
33
|
*/
|
|
41
34
|
export function ChromeGlassLayer({
|
|
42
35
|
style,
|
|
43
36
|
pointerEvents = 'none',
|
|
44
|
-
blurEnabled = true,
|
|
45
37
|
}: ChromeGlassLayerProps) {
|
|
46
38
|
return (
|
|
47
39
|
<View style={[absoluteFill, style]} pointerEvents={pointerEvents}>
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
style={StyleSheet.absoluteFill}
|
|
54
|
-
/>
|
|
55
|
-
) : null}
|
|
40
|
+
<BlurView
|
|
41
|
+
intensity={CHROME_GLASS_BLUR_INTENSITY}
|
|
42
|
+
tint={CHROME_GLASS_BLUR_TINT}
|
|
43
|
+
style={StyleSheet.absoluteFill}
|
|
44
|
+
/>
|
|
56
45
|
<View style={[absoluteFill, styles.tint]} />
|
|
57
46
|
</View>
|
|
58
47
|
);
|
|
@@ -62,31 +51,21 @@ type ChromeGlassShellProps = {
|
|
|
62
51
|
children: ReactNode;
|
|
63
52
|
style?: StyleProp<ViewStyle>;
|
|
64
53
|
contentStyle?: StyleProp<ViewStyle>;
|
|
65
|
-
/** Forwarded to `ChromeGlassLayer` — disable during slide animations on Android. */
|
|
66
|
-
blurEnabled?: boolean;
|
|
67
54
|
};
|
|
68
55
|
|
|
69
56
|
/**
|
|
70
57
|
* Pílula chrome com o mesmo glass do drawer (shell + blur + overlay).
|
|
71
58
|
*/
|
|
72
|
-
export function ChromeGlassShell({
|
|
73
|
-
children,
|
|
74
|
-
style,
|
|
75
|
-
contentStyle,
|
|
76
|
-
blurEnabled = true,
|
|
77
|
-
}: ChromeGlassShellProps) {
|
|
59
|
+
export function ChromeGlassShell({ children, style, contentStyle }: ChromeGlassShellProps) {
|
|
78
60
|
return (
|
|
79
61
|
<View style={[chromePillStyles.shell, styles.shellTransparent, style]}>
|
|
80
|
-
<ChromeGlassLayer
|
|
62
|
+
<ChromeGlassLayer />
|
|
81
63
|
<View style={[styles.content, contentStyle]}>{children}</View>
|
|
82
64
|
</View>
|
|
83
65
|
);
|
|
84
66
|
}
|
|
85
67
|
|
|
86
68
|
const styles = StyleSheet.create({
|
|
87
|
-
solidBase: {
|
|
88
|
-
backgroundColor: colors.chromePillBackground,
|
|
89
|
-
},
|
|
90
69
|
tint: {
|
|
91
70
|
backgroundColor: colors.chromeGlassOverlay,
|
|
92
71
|
},
|