@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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/IconBack.d.ts +1 -1
  3. package/dist/assets/IconClose.d.ts +1 -1
  4. package/dist/{theme.css.d.ts → basicUIPlugin.css.d.ts} +12 -0
  5. package/dist/basicUIPlugin.d.ts +4 -4
  6. package/dist/components/AppBar.d.ts +3 -3
  7. package/dist/components/AppScreen.d.ts +3 -3
  8. package/dist/components/BottomSheet.d.ts +2 -2
  9. package/dist/components/Modal.d.ts +2 -2
  10. package/dist/hooks/useMaxWidth.d.ts +1 -1
  11. package/dist/hooks/useStyleEffect.d.ts +1 -1
  12. package/dist/hooks/useStyleEffectHide.d.ts +1 -1
  13. package/dist/index.css +150 -143
  14. package/dist/index.css.map +3 -3
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +348 -295
  17. package/dist/index.js.map +4 -4
  18. package/dist/index.mjs +327 -272
  19. package/dist/index.mjs.map +4 -4
  20. package/package.json +8 -8
  21. package/src/assets/IconBack.tsx +0 -2
  22. package/src/assets/IconClose.tsx +0 -2
  23. package/src/{theme.css.ts → basicUIPlugin.css.ts} +27 -9
  24. package/src/basicUIPlugin.tsx +23 -19
  25. package/src/components/AppBar.css.ts +2 -2
  26. package/src/components/AppBar.tsx +4 -4
  27. package/src/components/AppScreen.css.ts +2 -2
  28. package/src/components/AppScreen.tsx +8 -5
  29. package/src/components/BottomSheet.css.ts +1 -1
  30. package/src/components/BottomSheet.tsx +4 -4
  31. package/src/components/Modal.css.ts +1 -1
  32. package/src/components/Modal.tsx +4 -4
  33. package/src/hooks/useMaxWidth.ts +0 -1
  34. package/src/hooks/useStyleEffect.ts +0 -1
  35. package/src/hooks/useStyleEffectHide.ts +0 -2
  36. package/src/hooks/useStyleEffectOffset.ts +2 -1
  37. package/src/hooks/useStyleEffectSwipeBack.ts +4 -4
  38. package/src/index.ts +1 -1
package/README.md CHANGED
@@ -51,7 +51,7 @@ const Something: React.FC = () => {
51
51
  ```tsx
52
52
  import { BottomSheet } from "@stackflow/plugin-basic-ui";
53
53
 
54
- const Something: React.FC = () => {
54
+ const Something = () => {
55
55
  return (
56
56
  <BottomSheet>
57
57
  <div>Hello, World</div>
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  declare const IconBack: React.FC<{
3
3
  className?: string;
4
4
  }>;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ /// <reference types="react" />
2
2
  declare const IconClose: React.FC<{
3
3
  className?: string;
4
4
  }>;
@@ -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 {};
@@ -1,8 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import type { StackflowReactPlugin } from "@stackflow/react";
2
- import React from "react";
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<theme.GlobalVars> & {
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: React.Provider<BasicUIPluginOptions>;
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
- import React from "react";
2
- declare const AppBar: React.ForwardRefExoticComponent<Partial<Pick<{
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
- } & React.RefAttributes<HTMLDivElement>>;
34
+ } & import("react").RefAttributes<HTMLDivElement>>;
35
35
  export default AppBar;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import type { GlobalVars } from "../theme.css";
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
- import React from "react";
2
- import type { GlobalVars } from "../theme.css";
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
- import React from "react";
2
- import type { GlobalVars } from "../theme.css";
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,4 +1,4 @@
1
- import type React from "react";
1
+ /// <reference types="react" />
2
2
  export declare function useMaxWidth({ outerRef, innerRef, enable, }: {
3
3
  outerRef: React.ForwardedRef<any>;
4
4
  innerRef: React.MutableRefObject<any>;
@@ -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>>;
@@ -1,4 +1,4 @@
1
- import type React from "react";
1
+ /// <reference types="react" />
2
2
  export declare function useStyleEffectHide({ refs, hasEffect, }: {
3
3
  refs: Array<React.RefObject<any>>;
4
4
  hasEffect?: boolean;