@stackflow/plugin-basic-ui 0.21.3 → 0.21.4-alpha.4
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/components/AppBar.d.ts +2 -1
- package/dist/hooks/useStyleEffect.d.ts +3 -3
- package/dist/index.css +49 -42
- package/dist/index.css.map +3 -3
- package/dist/index.js +35 -30
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +35 -30
- package/dist/index.mjs.map +3 -3
- package/dist/theme.css.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/isBrowser.d.ts +5 -0
- package/dist/utils/isServer.d.ts +5 -0
- package/package.json +2 -2
- package/src/basicUIPlugin.tsx +2 -2
- package/src/components/AppBar.css.ts +9 -6
- package/src/components/AppBar.tsx +6 -0
- package/src/hooks/useStyleEffect.ts +8 -7
- package/src/hooks/useStyleEffectHide.ts +2 -1
- package/src/hooks/useStyleEffectOffset.ts +4 -4
- package/src/hooks/useStyleEffectSwipeBack.ts +3 -3
- package/src/theme.css.ts +2 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/isBrowser.ts +9 -0
- package/src/utils/isServer.ts +7 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type React from "react";
|
|
4
4
|
|
|
5
|
+
import { noop } from "../utils";
|
|
5
6
|
import { useStyleEffect } from "./useStyleEffect";
|
|
6
7
|
|
|
7
8
|
export function useStyleEffectHide({
|
|
@@ -45,7 +46,7 @@ export function useStyleEffectHide({
|
|
|
45
46
|
default: {
|
|
46
47
|
cleanup();
|
|
47
48
|
|
|
48
|
-
return
|
|
49
|
+
return noop;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
|
|
3
|
-
import { listenOnce, requestNextFrame } from "../utils";
|
|
3
|
+
import { listenOnce, noop, requestNextFrame } from "../utils";
|
|
4
4
|
import { useStyleEffect } from "./useStyleEffect";
|
|
5
5
|
|
|
6
6
|
export const OFFSET_PX_ANDROID = 32;
|
|
@@ -62,7 +62,7 @@ export function useStyleEffectOffset({
|
|
|
62
62
|
};
|
|
63
63
|
case "enter-active":
|
|
64
64
|
default:
|
|
65
|
-
return
|
|
65
|
+
return noop;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
case "exit-active":
|
|
@@ -71,10 +71,10 @@ export function useStyleEffectOffset({
|
|
|
71
71
|
cleanup();
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
-
return
|
|
74
|
+
return noop;
|
|
75
75
|
}
|
|
76
76
|
default: {
|
|
77
|
-
return
|
|
77
|
+
return noop;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
2
|
|
|
3
|
-
import { listenOnce } from "../utils";
|
|
3
|
+
import { listenOnce, noop } from "../utils";
|
|
4
4
|
import { useStyleEffect } from "./useStyleEffect";
|
|
5
5
|
import { OFFSET_PX_CUPERTINO } from "./useStyleEffectOffset";
|
|
6
6
|
|
|
@@ -27,11 +27,11 @@ export function useStyleEffectSwipeBack({
|
|
|
27
27
|
effect: hasEffect
|
|
28
28
|
? ({ refs }) => {
|
|
29
29
|
if (theme !== "cupertino") {
|
|
30
|
-
return
|
|
30
|
+
return noop;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
if (!dimRef.current || !edgeRef.current || !paperRef.current) {
|
|
34
|
-
return
|
|
34
|
+
return noop;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
const $dim = dimRef.current;
|
package/src/theme.css.ts
CHANGED
|
@@ -18,6 +18,7 @@ export const globalVars = createGlobalThemeContract(
|
|
|
18
18
|
iconColor: "app-bar-icon-color",
|
|
19
19
|
textColor: "app-bar-text-color",
|
|
20
20
|
backgroundColor: "app-bar-background-color",
|
|
21
|
+
overflow: "app-bar-overflow",
|
|
21
22
|
},
|
|
22
23
|
bottomSheet: {
|
|
23
24
|
borderRadius: "bottom-sheet-border-radius",
|
|
@@ -44,6 +45,7 @@ const defaultVars = {
|
|
|
44
45
|
iconColor: "#212124",
|
|
45
46
|
textColor: "#212124",
|
|
46
47
|
backgroundColor: "#fff",
|
|
48
|
+
overflow: "hidden",
|
|
47
49
|
},
|
|
48
50
|
bottomSheet: {
|
|
49
51
|
borderRadius: "1rem",
|
package/src/utils/index.ts
CHANGED