@stackflow/plugin-basic-ui 0.21.4-alpha.4 → 1.0.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.
- package/README.md +1 -1
- package/dist/assets/IconBack.d.ts +1 -1
- package/dist/assets/IconClose.d.ts +1 -1
- package/dist/{theme.css.d.ts → basicUIPlugin.css.d.ts} +12 -0
- package/dist/basicUIPlugin.d.ts +4 -4
- package/dist/components/AppBar.d.ts +3 -3
- package/dist/components/AppScreen.d.ts +3 -3
- package/dist/components/BottomSheet.d.ts +2 -2
- package/dist/components/Modal.d.ts +2 -2
- package/dist/hooks/useMaxWidth.d.ts +1 -1
- package/dist/hooks/useStyleEffect.d.ts +1 -1
- package/dist/hooks/useStyleEffectHide.d.ts +1 -1
- package/dist/index.css +150 -143
- package/dist/index.css.map +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +348 -295
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +327 -272
- package/dist/index.mjs.map +4 -4
- package/package.json +8 -8
- package/src/assets/IconBack.tsx +0 -2
- package/src/assets/IconClose.tsx +0 -2
- package/src/{theme.css.ts → basicUIPlugin.css.ts} +27 -9
- package/src/basicUIPlugin.tsx +23 -19
- package/src/components/AppBar.css.ts +2 -2
- package/src/components/AppBar.tsx +4 -4
- package/src/components/AppScreen.css.ts +2 -2
- package/src/components/AppScreen.tsx +8 -5
- package/src/components/BottomSheet.css.ts +1 -1
- package/src/components/BottomSheet.tsx +4 -4
- package/src/components/Modal.css.ts +1 -1
- package/src/components/Modal.tsx +4 -4
- package/src/hooks/useMaxWidth.ts +0 -1
- package/src/hooks/useStyleEffect.ts +0 -1
- package/src/hooks/useStyleEffectHide.ts +0 -2
- package/src/hooks/useStyleEffectOffset.ts +2 -1
- package/src/hooks/useStyleEffectSwipeBack.ts +4 -4
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@ import type { MapLeafNodes } from "@vanilla-extract/private";
|
|
|
2
2
|
export declare const globalVars: MapLeafNodes<{
|
|
3
3
|
backgroundColor: string;
|
|
4
4
|
dimBackgroundColor: string;
|
|
5
|
+
transitionDuration: string;
|
|
5
6
|
appBar: {
|
|
6
7
|
borderColor: string;
|
|
7
8
|
borderSize: string;
|
|
@@ -26,4 +27,15 @@ export declare const rootAndroid = ":root[data-stackflow-plugin-basic-ui-theme=a
|
|
|
26
27
|
export declare const rootCupertino = ":root[data-stackflow-plugin-basic-ui-theme=cupertino]";
|
|
27
28
|
export declare const android: string;
|
|
28
29
|
export declare const cupertino: string;
|
|
30
|
+
export declare const stackWrapper: import("@vanilla-extract/recipes/dist/declarations/src/types").RuntimeFn<{
|
|
31
|
+
theme: {
|
|
32
|
+
android: string;
|
|
33
|
+
cupertino: string;
|
|
34
|
+
};
|
|
35
|
+
loading: {
|
|
36
|
+
true: {
|
|
37
|
+
pointerEvents: "none";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
29
41
|
export {};
|
package/dist/basicUIPlugin.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { StackflowReactPlugin } from "@stackflow/react";
|
|
2
|
-
import
|
|
3
|
-
import * as theme from "./theme.css";
|
|
3
|
+
import * as css from "./basicUIPlugin.css";
|
|
4
4
|
import type { RecursivePartial } from "./utils";
|
|
5
|
-
declare type BasicUIPluginOptions = RecursivePartial<
|
|
5
|
+
declare type BasicUIPluginOptions = RecursivePartial<css.GlobalVars> & {
|
|
6
6
|
theme: "android" | "cupertino";
|
|
7
7
|
rootClassName?: string;
|
|
8
8
|
appBar?: {
|
|
@@ -21,7 +21,7 @@ declare type BasicUIPluginOptions = RecursivePartial<theme.GlobalVars> & {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export declare const GlobalOptionsProvider:
|
|
24
|
+
export declare const GlobalOptionsProvider: import("react").Provider<BasicUIPluginOptions>;
|
|
25
25
|
export declare function useGlobalOptions(): BasicUIPluginOptions;
|
|
26
26
|
export declare const basicUIPlugin: (options: BasicUIPluginOptions) => StackflowReactPlugin;
|
|
27
27
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
declare const AppBar:
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const AppBar: import("react").ForwardRefExoticComponent<Partial<Pick<{
|
|
3
3
|
borderColor: string;
|
|
4
4
|
borderSize: string;
|
|
5
5
|
height: string;
|
|
@@ -31,5 +31,5 @@ declare const AppBar: React.ForwardRefExoticComponent<Partial<Pick<{
|
|
|
31
31
|
border?: boolean | undefined;
|
|
32
32
|
modalPresentationStyle?: "fullScreen" | undefined;
|
|
33
33
|
onTopClick?: ((e: React.MouseEvent) => void) | undefined;
|
|
34
|
-
} &
|
|
34
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
35
|
export default AppBar;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GlobalVars } from "../
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GlobalVars } from "../basicUIPlugin.css";
|
|
3
3
|
import type { PropOf } from "../utils";
|
|
4
4
|
import AppBar from "./AppBar";
|
|
5
5
|
export declare type AppScreenContext = {
|
|
@@ -9,7 +9,7 @@ export declare type AppScreenContext = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare function useAppScreen(): AppScreenContext;
|
|
11
11
|
export declare type AppScreenProps = Partial<Pick<GlobalVars, "backgroundColor" | "dimBackgroundColor">> & {
|
|
12
|
-
appBar?: Omit<PropOf<typeof AppBar>, "theme" | "ref" | "key">;
|
|
12
|
+
appBar?: Omit<PropOf<typeof AppBar>, "theme" | "modalPresentationStyle" | "ref" | "key">;
|
|
13
13
|
preventSwipeBack?: boolean;
|
|
14
14
|
modalPresentationStyle?: "fullScreen";
|
|
15
15
|
children: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GlobalVars } from "../
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GlobalVars } from "../basicUIPlugin.css";
|
|
3
3
|
export declare type BottomSheetProps = Partial<Pick<GlobalVars, "backgroundColor" | "dimBackgroundColor">> & Partial<GlobalVars["bottomSheet"]> & {
|
|
4
4
|
onOutsideClick?: React.MouseEventHandler;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GlobalVars } from "../
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GlobalVars } from "../basicUIPlugin.css";
|
|
3
3
|
export declare type ModalProps = Partial<Pick<GlobalVars, "backgroundColor" | "dimBackgroundColor">> & Partial<GlobalVars["modal"]> & {
|
|
4
4
|
onOutsideClick?: React.MouseEventHandler;
|
|
5
5
|
children: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ActivityTransitionState } from "@stackflow/core";
|
|
2
|
-
import type React from "react";
|
|
3
3
|
export declare function useStyleEffect<T extends HTMLElement>({ styleName, refs, effect, effectDeps, }: {
|
|
4
4
|
styleName: string;
|
|
5
5
|
refs: Array<React.RefObject<T>>;
|