@seed-design/stackflow 0.0.1-rc.1 → 0.0.1-rc.3

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 (92) hide show
  1. package/lib/components/AppBar/AppBar.cjs +92 -0
  2. package/lib/components/AppBar/AppBar.d.ts +13 -12
  3. package/lib/components/AppBar/AppBar.js +81 -0
  4. package/lib/components/AppBar/AppBar.namespace.cjs +15 -0
  5. package/lib/components/AppBar/AppBar.namespace.d.ts +2 -2
  6. package/lib/components/AppBar/AppBar.namespace.js +1 -0
  7. package/lib/components/AppBar/index.cjs +17 -0
  8. package/lib/components/AppBar/index.d.ts +3 -3
  9. package/lib/components/AppBar/index.js +3 -0
  10. package/lib/components/AppScreen/AppScreen.cjs +58 -0
  11. package/lib/components/AppScreen/AppScreen.d.ts +8 -7
  12. package/lib/components/AppScreen/AppScreen.js +50 -0
  13. package/lib/components/AppScreen/AppScreen.namespace.cjs +13 -0
  14. package/lib/components/AppScreen/AppScreen.namespace.d.ts +2 -2
  15. package/lib/components/AppScreen/AppScreen.namespace.js +1 -0
  16. package/lib/components/AppScreen/index.cjs +15 -0
  17. package/lib/components/AppScreen/index.d.ts +3 -3
  18. package/lib/components/AppScreen/index.js +3 -0
  19. package/lib/components/index.cjs +25 -0
  20. package/lib/components/index.d.ts +2 -2
  21. package/lib/components/index.js +6 -0
  22. package/lib/index.cjs +29 -0
  23. package/lib/index.d.ts +3 -3
  24. package/lib/index.js +9 -786
  25. package/lib/plugin.cjs +16 -0
  26. package/lib/plugin.d.ts +1 -1
  27. package/lib/plugin.js +12 -0
  28. package/lib/primitive/AppBar/AppBar.cjs +43 -0
  29. package/lib/primitive/AppBar/AppBar.d.ts +7 -6
  30. package/lib/primitive/AppBar/AppBar.js +36 -0
  31. package/lib/primitive/AppBar/AppBar.namespace.cjs +12 -0
  32. package/lib/primitive/AppBar/AppBar.namespace.d.ts +1 -1
  33. package/lib/primitive/AppBar/AppBar.namespace.js +1 -0
  34. package/lib/primitive/AppBar/index.cjs +14 -0
  35. package/lib/primitive/AppBar/index.d.ts +2 -2
  36. package/lib/primitive/AppBar/index.js +3 -0
  37. package/lib/primitive/AppBar/useAppBar.cjs +38 -0
  38. package/lib/primitive/AppBar/useAppBar.d.ts +168 -167
  39. package/lib/primitive/AppBar/useAppBar.js +34 -0
  40. package/lib/primitive/AppBar/useAppBarContext.cjs +20 -0
  41. package/lib/primitive/AppBar/useAppBarContext.d.ts +3 -2
  42. package/lib/primitive/AppBar/useAppBarContext.js +15 -0
  43. package/lib/primitive/AppScreen/AppScreen.cjs +57 -0
  44. package/lib/primitive/AppScreen/AppScreen.d.ts +7 -6
  45. package/lib/primitive/AppScreen/AppScreen.js +50 -0
  46. package/lib/primitive/AppScreen/AppScreen.namespace.cjs +12 -0
  47. package/lib/primitive/AppScreen/AppScreen.namespace.d.ts +1 -1
  48. package/lib/primitive/AppScreen/AppScreen.namespace.js +1 -0
  49. package/lib/primitive/AppScreen/index.cjs +16 -0
  50. package/lib/primitive/AppScreen/index.d.ts +3 -3
  51. package/lib/primitive/AppScreen/index.js +4 -0
  52. package/lib/primitive/AppScreen/useAppScreen.cjs +64 -0
  53. package/lib/primitive/AppScreen/useAppScreen.d.ts +657 -655
  54. package/lib/primitive/AppScreen/useAppScreen.js +60 -0
  55. package/lib/primitive/AppScreen/useAppScreenContext.cjs +20 -0
  56. package/lib/primitive/AppScreen/useAppScreenContext.d.ts +3 -2
  57. package/lib/primitive/AppScreen/useAppScreenContext.js +15 -0
  58. package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +27 -0
  59. package/lib/primitive/GlobalInteraction/GlobalInteraction.d.ts +3 -2
  60. package/lib/primitive/GlobalInteraction/GlobalInteraction.js +23 -0
  61. package/lib/primitive/GlobalInteraction/index.cjs +11 -0
  62. package/lib/primitive/GlobalInteraction/index.d.ts +2 -2
  63. package/lib/primitive/GlobalInteraction/index.js +2 -0
  64. package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +122 -0
  65. package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +5 -4
  66. package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +118 -0
  67. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +20 -0
  68. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.d.ts +3 -2
  69. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +15 -0
  70. package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +57 -0
  71. package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +1 -1
  72. package/lib/primitive/GlobalInteraction/useSwipeBack.js +53 -0
  73. package/lib/primitive/index.cjs +27 -0
  74. package/lib/primitive/index.d.ts +3 -3
  75. package/lib/primitive/index.js +9 -0
  76. package/lib/primitive/private/useElementOffset.cjs +53 -0
  77. package/lib/primitive/private/useElementOffset.js +30 -0
  78. package/lib/primitive/private/useTopActivity.cjs +31 -0
  79. package/lib/primitive/private/useTopActivity.js +27 -0
  80. package/lib/utils/createStyleContext.cjs +76 -0
  81. package/lib/utils/createStyleContext.js +72 -0
  82. package/lib/utils/createWithStateProps.d.ts +2 -1
  83. package/package.json +13 -14
  84. package/src/components/AppScreen/AppScreen.namespace.ts +1 -0
  85. package/src/components/AppScreen/{index.tsx → index.ts} +1 -0
  86. package/src/plugin.tsx +1 -1
  87. package/lib/index.js.map +0 -7
  88. package/lib/index.mjs +0 -759
  89. package/lib/index.mjs.map +0 -7
  90. /package/src/components/AppBar/{index.tsx → index.ts} +0 -0
  91. /package/src/components/{index.tsx → index.ts} +0 -0
  92. /package/src/primitive/{index.tsx → index.ts} +0 -0
@@ -0,0 +1,92 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const jsxRuntime = require('react/jsx-runtime');
6
+ const reactSlot = require('@radix-ui/react-slot');
7
+ const domUtils = require('@seed-design/dom-utils');
8
+ const reactPrimitive = require('@seed-design/react-primitive');
9
+ const appBar = require('@seed-design/css/recipes/app-bar');
10
+ const clsx = require('clsx');
11
+ const React = require('react');
12
+ const AppBar = require('../../primitive/AppBar/AppBar.cjs');
13
+ const useAppBarContext = require('../../primitive/AppBar/useAppBarContext.cjs');
14
+ const createStyleContext = require('../../utils/createStyleContext.cjs');
15
+ const appBarMain = require('@seed-design/css/recipes/app-bar-main');
16
+
17
+ const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext.createStyleContext(appBar.appBar);
18
+ const {
19
+ PropsProvider: MainPropsProvider,
20
+ withProvider: withMainProvider,
21
+ withContext: withMainContext
22
+ } = createStyleContext.createStyleContext(appBarMain.appBarMain);
23
+ const AppBarPropsProvider = PropsProvider;
24
+ const AppBarRoot = React.forwardRef((props, ref) => {
25
+ const contextProps = useProps();
26
+ const [variantProps, otherProps] = appBar.appBar.splitVariantProps({ ...contextProps, ...props });
27
+ const classNames = appBar.appBar(variantProps);
28
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
29
+ MainPropsProvider,
30
+ {
31
+ value: {
32
+ theme: variantProps.theme,
33
+ transitionStyle: variantProps.transitionStyle,
34
+ tone: variantProps.tone
35
+ },
36
+ children: /* @__PURE__ */ jsxRuntime.jsx(
37
+ AppBar.AppBarRoot,
38
+ {
39
+ ref,
40
+ ...domUtils.mergeProps({ className: classNames.root }, otherProps)
41
+ }
42
+ )
43
+ }
44
+ ) });
45
+ });
46
+ AppBarRoot.displayName = "AppBarRoot";
47
+ const AppBarLeft = withContext(
48
+ AppBar.AppBarLeft,
49
+ "left"
50
+ );
51
+ const AppBarRight = withContext(
52
+ AppBar.AppBarRight,
53
+ "right"
54
+ );
55
+ const AppBarMain = withMainProvider(
56
+ AppBar.AppBarMain,
57
+ "root"
58
+ );
59
+ const AppBarTitle = withMainContext(
60
+ reactPrimitive.Primitive.span,
61
+ "title"
62
+ );
63
+ const AppBarSubtitle = withMainContext(
64
+ reactPrimitive.Primitive.span,
65
+ "subtitle"
66
+ );
67
+ const AppBarIconButton = React.forwardRef(
68
+ ({ children, className, ...otherProps }, ref) => {
69
+ const { stateProps } = useAppBarContext.useAppBarContext();
70
+ const classNames = useClassNames();
71
+ return /* @__PURE__ */ jsxRuntime.jsx(
72
+ reactPrimitive.Primitive.button,
73
+ {
74
+ ref,
75
+ type: "button",
76
+ className: clsx(classNames.iconButton, className),
77
+ ...domUtils.mergeProps(stateProps, otherProps),
78
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { className: classNames.icon, ...stateProps, children })
79
+ }
80
+ );
81
+ }
82
+ );
83
+ AppBarIconButton.displayName = "IconButton";
84
+
85
+ exports.AppBarIconButton = AppBarIconButton;
86
+ exports.AppBarLeft = AppBarLeft;
87
+ exports.AppBarMain = AppBarMain;
88
+ exports.AppBarPropsProvider = AppBarPropsProvider;
89
+ exports.AppBarRight = AppBarRight;
90
+ exports.AppBarRoot = AppBarRoot;
91
+ exports.AppBarSubtitle = AppBarSubtitle;
92
+ exports.AppBarTitle = AppBarTitle;
@@ -1,29 +1,30 @@
1
- import { type PrimitiveProps } from "@seed-design/react-primitive";
2
- import { type AppBarVariantProps } from "@seed-design/css/recipes/app-bar";
3
- import { AppBar as AppBarPrimitive } from "../../primitive";
4
- import { type AppBarMainVariantProps } from "@seed-design/css/recipes/app-bar-main";
1
+ import { PrimitiveProps } from '@seed-design/react-primitive';
2
+ import { AppBarVariantProps, AppBarVariant } from '@seed-design/css/recipes/app-bar';
3
+ import { AppBar as AppBarPrimitive } from '../../primitive';
4
+ import { AppBarMainVariantProps } from '@seed-design/css/recipes/app-bar-main';
5
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
5
6
  export declare const AppBarPropsProvider: ({ children, value }: {
6
7
  children: React.ReactNode;
7
- value: Partial<import("@seed-design/css/recipes/app-bar").AppBarVariant>;
8
+ value: Partial< AppBarVariant>;
8
9
  }) => import("react/jsx-runtime").JSX.Element;
9
10
  export interface AppBarProps extends AppBarVariantProps, AppBarPrimitive.RootProps {
10
11
  }
11
- export declare const AppBarRoot: import("react").ForwardRefExoticComponent<AppBarProps & import("react").RefAttributes<HTMLDivElement>>;
12
+ export declare const AppBarRoot: ForwardRefExoticComponent<AppBarProps & RefAttributes<HTMLDivElement>>;
12
13
  export interface AppBarLeftProps extends AppBarPrimitive.LeftProps {
13
14
  }
14
- export declare const AppBarLeft: import("react").ForwardRefExoticComponent<AppBarLeftProps & import("react").RefAttributes<HTMLDivElement>>;
15
+ export declare const AppBarLeft: ForwardRefExoticComponent<AppBarLeftProps & RefAttributes<HTMLDivElement>>;
15
16
  export interface AppBarRightProps extends AppBarPrimitive.RightProps {
16
17
  }
17
- export declare const AppBarRight: import("react").ForwardRefExoticComponent<AppBarRightProps & import("react").RefAttributes<HTMLDivElement>>;
18
+ export declare const AppBarRight: ForwardRefExoticComponent<AppBarRightProps & RefAttributes<HTMLDivElement>>;
18
19
  export interface AppBarMainProps extends AppBarMainVariantProps, AppBarPrimitive.MainProps {
19
20
  }
20
- export declare const AppBarMain: import("react").ForwardRefExoticComponent<AppBarMainProps & import("react").RefAttributes<HTMLDivElement>>;
21
+ export declare const AppBarMain: ForwardRefExoticComponent<AppBarMainProps & RefAttributes<HTMLDivElement>>;
21
22
  export interface AppBarTitleProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
22
23
  }
23
- export declare const AppBarTitle: import("react").ForwardRefExoticComponent<AppBarTitleProps & import("react").RefAttributes<HTMLSpanElement>>;
24
+ export declare const AppBarTitle: ForwardRefExoticComponent<AppBarTitleProps & RefAttributes<HTMLSpanElement>>;
24
25
  export interface AppBarSubtitleProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
25
26
  }
26
- export declare const AppBarSubtitle: import("react").ForwardRefExoticComponent<AppBarSubtitleProps & import("react").RefAttributes<HTMLSpanElement>>;
27
+ export declare const AppBarSubtitle: ForwardRefExoticComponent<AppBarSubtitleProps & RefAttributes<HTMLSpanElement>>;
27
28
  export interface AppBarIconButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
28
29
  }
29
- export declare const AppBarIconButton: import("react").ForwardRefExoticComponent<AppBarIconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
30
+ export declare const AppBarIconButton: ForwardRefExoticComponent<AppBarIconButtonProps & RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,81 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { mergeProps } from '@seed-design/dom-utils';
4
+ import { Primitive } from '@seed-design/react-primitive';
5
+ import { appBar } from '@seed-design/css/recipes/app-bar';
6
+ import clsx from 'clsx';
7
+ import { forwardRef } from 'react';
8
+ import { AppBarLeft as AppBarLeft$1, AppBarMain as AppBarMain$1, AppBarRight as AppBarRight$1, AppBarRoot as AppBarRoot$1 } from '../../primitive/AppBar/AppBar.js';
9
+ import { useAppBarContext } from '../../primitive/AppBar/useAppBarContext.js';
10
+ import { createStyleContext } from '../../utils/createStyleContext.js';
11
+ import { appBarMain } from '@seed-design/css/recipes/app-bar-main';
12
+
13
+ const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext(appBar);
14
+ const {
15
+ PropsProvider: MainPropsProvider,
16
+ withProvider: withMainProvider,
17
+ withContext: withMainContext
18
+ } = createStyleContext(appBarMain);
19
+ const AppBarPropsProvider = PropsProvider;
20
+ const AppBarRoot = forwardRef((props, ref) => {
21
+ const contextProps = useProps();
22
+ const [variantProps, otherProps] = appBar.splitVariantProps({ ...contextProps, ...props });
23
+ const classNames = appBar(variantProps);
24
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
25
+ MainPropsProvider,
26
+ {
27
+ value: {
28
+ theme: variantProps.theme,
29
+ transitionStyle: variantProps.transitionStyle,
30
+ tone: variantProps.tone
31
+ },
32
+ children: /* @__PURE__ */ jsx(
33
+ AppBarRoot$1,
34
+ {
35
+ ref,
36
+ ...mergeProps({ className: classNames.root }, otherProps)
37
+ }
38
+ )
39
+ }
40
+ ) });
41
+ });
42
+ AppBarRoot.displayName = "AppBarRoot";
43
+ const AppBarLeft = withContext(
44
+ AppBarLeft$1,
45
+ "left"
46
+ );
47
+ const AppBarRight = withContext(
48
+ AppBarRight$1,
49
+ "right"
50
+ );
51
+ const AppBarMain = withMainProvider(
52
+ AppBarMain$1,
53
+ "root"
54
+ );
55
+ const AppBarTitle = withMainContext(
56
+ Primitive.span,
57
+ "title"
58
+ );
59
+ const AppBarSubtitle = withMainContext(
60
+ Primitive.span,
61
+ "subtitle"
62
+ );
63
+ const AppBarIconButton = forwardRef(
64
+ ({ children, className, ...otherProps }, ref) => {
65
+ const { stateProps } = useAppBarContext();
66
+ const classNames = useClassNames();
67
+ return /* @__PURE__ */ jsx(
68
+ Primitive.button,
69
+ {
70
+ ref,
71
+ type: "button",
72
+ className: clsx(classNames.iconButton, className),
73
+ ...mergeProps(stateProps, otherProps),
74
+ children: /* @__PURE__ */ jsx(Slot, { className: classNames.icon, ...stateProps, children })
75
+ }
76
+ );
77
+ }
78
+ );
79
+ AppBarIconButton.displayName = "IconButton";
80
+
81
+ export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarPropsProvider, AppBarRight, AppBarRoot, AppBarSubtitle, AppBarTitle };
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const AppBar = require('./AppBar.cjs');
6
+
7
+
8
+
9
+ exports.IconButton = AppBar.AppBarIconButton;
10
+ exports.Left = AppBar.AppBarLeft;
11
+ exports.Main = AppBar.AppBarMain;
12
+ exports.Right = AppBar.AppBarRight;
13
+ exports.Root = AppBar.AppBarRoot;
14
+ exports.Subtitle = AppBar.AppBarSubtitle;
15
+ exports.Title = AppBar.AppBarTitle;
@@ -1,2 +1,2 @@
1
- export { AppBarIconButton as IconButton, AppBarLeft as Left, AppBarMain as Main, AppBarRight as Right, AppBarRoot as Root, AppBarSubtitle as Subtitle, AppBarTitle as Title, } from "./AppBar";
2
- export type { AppBarIconButtonProps as IconButtonProps, AppBarLeftProps as LeftProps, AppBarMainProps as MainProps, AppBarRightProps as RightProps, AppBarProps as RootProps, AppBarSubtitleProps as SubtitleProps, AppBarTitleProps as TitleProps, } from "./AppBar";
1
+ export { AppBarIconButton as IconButton, AppBarLeft as Left, AppBarMain as Main, AppBarRight as Right, AppBarRoot as Root, AppBarSubtitle as Subtitle, AppBarTitle as Title, } from './AppBar';
2
+ export type { AppBarIconButtonProps as IconButtonProps, AppBarLeftProps as LeftProps, AppBarMainProps as MainProps, AppBarRightProps as RightProps, AppBarProps as RootProps, AppBarSubtitleProps as SubtitleProps, AppBarTitleProps as TitleProps, } from './AppBar';
@@ -0,0 +1 @@
1
+ export { AppBarIconButton as IconButton, AppBarLeft as Left, AppBarMain as Main, AppBarRight as Right, AppBarRoot as Root, AppBarSubtitle as Subtitle, AppBarTitle as Title } from './AppBar.js';
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const AppBar = require('./AppBar.cjs');
6
+ const AppBar_namespace = require('./AppBar.namespace.cjs');
7
+
8
+
9
+
10
+ exports.AppBarIconButton = AppBar.AppBarIconButton;
11
+ exports.AppBarLeft = AppBar.AppBarLeft;
12
+ exports.AppBarMain = AppBar.AppBarMain;
13
+ exports.AppBarRight = AppBar.AppBarRight;
14
+ exports.AppBarRoot = AppBar.AppBarRoot;
15
+ exports.AppBarSubtitle = AppBar.AppBarSubtitle;
16
+ exports.AppBarTitle = AppBar.AppBarTitle;
17
+ exports.AppBar = AppBar_namespace;
@@ -1,3 +1,3 @@
1
- export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSubtitle, AppBarTitle, } from "./AppBar";
2
- export type { AppBarIconButtonProps, AppBarLeftProps, AppBarMainProps, AppBarProps, AppBarRightProps, AppBarSubtitleProps, AppBarTitleProps, } from "./AppBar";
3
- export * as AppBar from "./AppBar.namespace";
1
+ export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSubtitle, AppBarTitle, } from './AppBar';
2
+ export type { AppBarIconButtonProps, AppBarLeftProps, AppBarMainProps, AppBarProps, AppBarRightProps, AppBarSubtitleProps, AppBarTitleProps, } from './AppBar';
3
+ export * as AppBar from './AppBar.namespace';
@@ -0,0 +1,3 @@
1
+ export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSubtitle, AppBarTitle } from './AppBar.js';
2
+ import * as AppBar_namespace from './AppBar.namespace.js';
3
+ export { AppBar_namespace as AppBar };
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const jsxRuntime = require('react/jsx-runtime');
6
+ const appScreen = require('@seed-design/css/recipes/app-screen');
7
+ const React = require('react');
8
+ const AppScreen = require('../../primitive/AppScreen/AppScreen.cjs');
9
+ const createStyleContext = require('../../utils/createStyleContext.cjs');
10
+ const AppBar = require('../AppBar/AppBar.cjs');
11
+ const domUtils = require('@seed-design/dom-utils');
12
+
13
+ const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext.createStyleContext(appScreen.appScreen);
14
+ const AppScreenPropsProvider = PropsProvider;
15
+ const AppScreenRoot = React.forwardRef((props, ref) => {
16
+ const contextProps = useProps();
17
+ const [variantProps, otherProps] = appScreen.appScreen.splitVariantProps({ ...contextProps, ...props });
18
+ const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
19
+ const classNames = appScreen.appScreen({
20
+ ...variantProps,
21
+ transitionStyle
22
+ });
23
+ return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(
24
+ AppBar.AppBarPropsProvider,
25
+ {
26
+ value: React.useMemo(
27
+ () => ({ theme: variantProps.theme, transitionStyle }),
28
+ [variantProps.theme, transitionStyle]
29
+ ),
30
+ children: /* @__PURE__ */ jsxRuntime.jsx(
31
+ AppScreen.AppScreenRoot,
32
+ {
33
+ ref,
34
+ ...domUtils.mergeProps({ className: classNames.root }, otherProps)
35
+ }
36
+ )
37
+ }
38
+ ) });
39
+ });
40
+ AppScreenRoot.displayName = "AppScreenRoot";
41
+ const AppScreenDim = withContext(
42
+ AppScreen.AppScreenDim,
43
+ "dim"
44
+ );
45
+ const AppScreenEdge = withContext(
46
+ AppScreen.AppScreenEdge,
47
+ "edge"
48
+ );
49
+ const AppScreenLayer = withContext(
50
+ AppScreen.AppScreenLayer,
51
+ "layer"
52
+ );
53
+
54
+ exports.AppScreenDim = AppScreenDim;
55
+ exports.AppScreenEdge = AppScreenEdge;
56
+ exports.AppScreenLayer = AppScreenLayer;
57
+ exports.AppScreenPropsProvider = AppScreenPropsProvider;
58
+ exports.AppScreenRoot = AppScreenRoot;
@@ -1,18 +1,19 @@
1
- import { type AppScreenVariantProps } from "@seed-design/css/recipes/app-screen";
2
- import { AppScreen as AppScreenPrimitive } from "../../primitive";
1
+ import { AppScreenVariantProps, AppScreenVariant } from '@seed-design/css/recipes/app-screen';
2
+ import { AppScreen as AppScreenPrimitive } from '../../primitive';
3
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
4
  export declare const AppScreenPropsProvider: ({ children, value }: {
4
5
  children: React.ReactNode;
5
- value: Partial<import("@seed-design/css/recipes/app-screen").AppScreenVariant>;
6
+ value: Partial< AppScreenVariant>;
6
7
  }) => import("react/jsx-runtime").JSX.Element;
7
8
  export interface AppScreenRootProps extends AppScreenVariantProps, AppScreenPrimitive.RootProps {
8
9
  }
9
- export declare const AppScreenRoot: import("react").ForwardRefExoticComponent<AppScreenRootProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ export declare const AppScreenRoot: ForwardRefExoticComponent<AppScreenRootProps & RefAttributes<HTMLDivElement>>;
10
11
  export interface AppScreenDimProps extends AppScreenPrimitive.DimProps {
11
12
  }
12
- export declare const AppScreenDim: import("react").ForwardRefExoticComponent<AppScreenDimProps & import("react").RefAttributes<HTMLDivElement>>;
13
+ export declare const AppScreenDim: ForwardRefExoticComponent<AppScreenDimProps & RefAttributes<HTMLDivElement>>;
13
14
  export interface AppScreenEdgeProps extends AppScreenPrimitive.EdgeProps {
14
15
  }
15
- export declare const AppScreenEdge: import("react").ForwardRefExoticComponent<AppScreenEdgeProps & import("react").RefAttributes<HTMLDivElement>>;
16
+ export declare const AppScreenEdge: ForwardRefExoticComponent<AppScreenEdgeProps & RefAttributes<HTMLDivElement>>;
16
17
  export interface AppScreenLayerProps extends AppScreenPrimitive.LayerProps {
17
18
  }
18
- export declare const AppScreenLayer: import("react").ForwardRefExoticComponent<AppScreenLayerProps & import("react").RefAttributes<HTMLDivElement>>;
19
+ export declare const AppScreenLayer: ForwardRefExoticComponent<AppScreenLayerProps & RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,50 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { appScreen } from '@seed-design/css/recipes/app-screen';
3
+ import { forwardRef, useMemo } from 'react';
4
+ import { AppScreenDim as AppScreenDim$1, AppScreenEdge as AppScreenEdge$1, AppScreenLayer as AppScreenLayer$1, AppScreenRoot as AppScreenRoot$1 } from '../../primitive/AppScreen/AppScreen.js';
5
+ import { createStyleContext } from '../../utils/createStyleContext.js';
6
+ import { AppBarPropsProvider } from '../AppBar/AppBar.js';
7
+ import { mergeProps } from '@seed-design/dom-utils';
8
+
9
+ const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);
10
+ const AppScreenPropsProvider = PropsProvider;
11
+ const AppScreenRoot = forwardRef((props, ref) => {
12
+ const contextProps = useProps();
13
+ const [variantProps, otherProps] = appScreen.splitVariantProps({ ...contextProps, ...props });
14
+ const transitionStyle = variantProps.transitionStyle ?? (variantProps.theme === "cupertino" ? "slideFromRightIOS" : "fadeFromBottomAndroid");
15
+ const classNames = appScreen({
16
+ ...variantProps,
17
+ transitionStyle
18
+ });
19
+ return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(
20
+ AppBarPropsProvider,
21
+ {
22
+ value: useMemo(
23
+ () => ({ theme: variantProps.theme, transitionStyle }),
24
+ [variantProps.theme, transitionStyle]
25
+ ),
26
+ children: /* @__PURE__ */ jsx(
27
+ AppScreenRoot$1,
28
+ {
29
+ ref,
30
+ ...mergeProps({ className: classNames.root }, otherProps)
31
+ }
32
+ )
33
+ }
34
+ ) });
35
+ });
36
+ AppScreenRoot.displayName = "AppScreenRoot";
37
+ const AppScreenDim = withContext(
38
+ AppScreenDim$1,
39
+ "dim"
40
+ );
41
+ const AppScreenEdge = withContext(
42
+ AppScreenEdge$1,
43
+ "edge"
44
+ );
45
+ const AppScreenLayer = withContext(
46
+ AppScreenLayer$1,
47
+ "layer"
48
+ );
49
+
50
+ export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const AppScreen = require('./AppScreen.cjs');
6
+
7
+
8
+
9
+ exports.Dim = AppScreen.AppScreenDim;
10
+ exports.Edge = AppScreen.AppScreenEdge;
11
+ exports.Layer = AppScreen.AppScreenLayer;
12
+ exports.PropsProvider = AppScreen.AppScreenPropsProvider;
13
+ exports.Root = AppScreen.AppScreenRoot;
@@ -1,2 +1,2 @@
1
- export { AppScreenDim as Dim, AppScreenEdge as Edge, AppScreenLayer as Layer, AppScreenRoot as Root, } from "./AppScreen";
2
- export type { AppScreenDimProps as DimProps, AppScreenEdgeProps as EdgeProps, AppScreenLayerProps as LayerProps, AppScreenRootProps as RootProps, } from "./AppScreen";
1
+ export { AppScreenDim as Dim, AppScreenEdge as Edge, AppScreenLayer as Layer, AppScreenRoot as Root, AppScreenPropsProvider as PropsProvider, } from './AppScreen';
2
+ export type { AppScreenDimProps as DimProps, AppScreenEdgeProps as EdgeProps, AppScreenLayerProps as LayerProps, AppScreenRootProps as RootProps, } from './AppScreen';
@@ -0,0 +1 @@
1
+ export { AppScreenDim as Dim, AppScreenEdge as Edge, AppScreenLayer as Layer, AppScreenPropsProvider as PropsProvider, AppScreenRoot as Root } from './AppScreen.js';
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const AppScreen = require('./AppScreen.cjs');
6
+ const AppScreen_namespace = require('./AppScreen.namespace.cjs');
7
+
8
+
9
+
10
+ exports.AppScreenDim = AppScreen.AppScreenDim;
11
+ exports.AppScreenEdge = AppScreen.AppScreenEdge;
12
+ exports.AppScreenLayer = AppScreen.AppScreenLayer;
13
+ exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
14
+ exports.AppScreenRoot = AppScreen.AppScreenRoot;
15
+ exports.AppScreen = AppScreen_namespace;
@@ -1,3 +1,3 @@
1
- export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenRoot, } from "./AppScreen";
2
- export type { AppScreenDimProps, AppScreenEdgeProps, AppScreenLayerProps, AppScreenRootProps, } from "./AppScreen";
3
- export * as AppScreen from "./AppScreen.namespace";
1
+ export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenRoot, AppScreenPropsProvider, } from './AppScreen';
2
+ export type { AppScreenDimProps, AppScreenEdgeProps, AppScreenLayerProps, AppScreenRootProps, } from './AppScreen';
3
+ export * as AppScreen from './AppScreen.namespace';
@@ -0,0 +1,3 @@
1
+ export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from './AppScreen.js';
2
+ import * as AppScreen_namespace from './AppScreen.namespace.js';
3
+ export { AppScreen_namespace as AppScreen };
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const AppBar = require('./AppBar/AppBar.cjs');
6
+ const AppBar_namespace = require('./AppBar/AppBar.namespace.cjs');
7
+ const AppScreen = require('./AppScreen/AppScreen.cjs');
8
+ const AppScreen_namespace = require('./AppScreen/AppScreen.namespace.cjs');
9
+
10
+
11
+
12
+ exports.AppBarIconButton = AppBar.AppBarIconButton;
13
+ exports.AppBarLeft = AppBar.AppBarLeft;
14
+ exports.AppBarMain = AppBar.AppBarMain;
15
+ exports.AppBarRight = AppBar.AppBarRight;
16
+ exports.AppBarRoot = AppBar.AppBarRoot;
17
+ exports.AppBarSubtitle = AppBar.AppBarSubtitle;
18
+ exports.AppBarTitle = AppBar.AppBarTitle;
19
+ exports.AppBar = AppBar_namespace;
20
+ exports.AppScreenDim = AppScreen.AppScreenDim;
21
+ exports.AppScreenEdge = AppScreen.AppScreenEdge;
22
+ exports.AppScreenLayer = AppScreen.AppScreenLayer;
23
+ exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
24
+ exports.AppScreenRoot = AppScreen.AppScreenRoot;
25
+ exports.AppScreen = AppScreen_namespace;
@@ -1,2 +1,2 @@
1
- export * from "./AppBar";
2
- export * from "./AppScreen";
1
+ export * from './AppBar';
2
+ export * from './AppScreen';
@@ -0,0 +1,6 @@
1
+ export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSubtitle, AppBarTitle } from './AppBar/AppBar.js';
2
+ import * as AppBar_namespace from './AppBar/AppBar.namespace.js';
3
+ export { AppBar_namespace as AppBar };
4
+ export { AppScreenDim, AppScreenEdge, AppScreenLayer, AppScreenPropsProvider, AppScreenRoot } from './AppScreen/AppScreen.js';
5
+ import * as AppScreen_namespace from './AppScreen/AppScreen.namespace.js';
6
+ export { AppScreen_namespace as AppScreen };
package/lib/index.cjs ADDED
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const plugin = require('./plugin.cjs');
6
+ const AppBar = require('./components/AppBar/AppBar.cjs');
7
+ const AppBar_namespace = require('./components/AppBar/AppBar.namespace.cjs');
8
+ const AppScreen = require('./components/AppScreen/AppScreen.cjs');
9
+ const AppScreen_namespace = require('./components/AppScreen/AppScreen.namespace.cjs');
10
+ const index = require('./primitive/index.cjs');
11
+
12
+
13
+
14
+ exports.seedPlugin = plugin.seedPlugin;
15
+ exports.AppBarIconButton = AppBar.AppBarIconButton;
16
+ exports.AppBarLeft = AppBar.AppBarLeft;
17
+ exports.AppBarMain = AppBar.AppBarMain;
18
+ exports.AppBarRight = AppBar.AppBarRight;
19
+ exports.AppBarRoot = AppBar.AppBarRoot;
20
+ exports.AppBarSubtitle = AppBar.AppBarSubtitle;
21
+ exports.AppBarTitle = AppBar.AppBarTitle;
22
+ exports.AppBar = AppBar_namespace;
23
+ exports.AppScreenDim = AppScreen.AppScreenDim;
24
+ exports.AppScreenEdge = AppScreen.AppScreenEdge;
25
+ exports.AppScreenLayer = AppScreen.AppScreenLayer;
26
+ exports.AppScreenPropsProvider = AppScreen.AppScreenPropsProvider;
27
+ exports.AppScreenRoot = AppScreen.AppScreenRoot;
28
+ exports.AppScreen = AppScreen_namespace;
29
+ exports.Primitive = index;
package/lib/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export { seedPlugin, type SeedPluginOptions } from "./plugin";
2
- export * from "./components";
3
- export * as Primitive from "./primitive";
1
+ export { seedPlugin, type SeedPluginOptions } from './plugin';
2
+ export * from './components';
3
+ export * as Primitive from './primitive';