@seed-design/stackflow 1.0.5 → 1.1.0
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/lib/components/AppBar/AppBar.cjs +2 -2
- package/lib/components/AppBar/AppBar.d.ts +2 -2
- package/lib/components/AppBar/AppBar.js +2 -2
- package/lib/components/AppScreen/AppScreen.cjs +3 -3
- package/lib/components/AppScreen/AppScreen.d.ts +4 -0
- package/lib/components/AppScreen/AppScreen.js +3 -3
- package/lib/primitive/AppBar/AppBar.cjs +2 -2
- package/lib/primitive/AppBar/AppBar.js +2 -2
- package/lib/primitive/AppScreen/AppScreen.cjs +1 -1
- package/lib/primitive/AppScreen/AppScreen.js +1 -1
- package/package.json +3 -3
- package/src/components/AppBar/AppBar.tsx +2 -3
- package/src/components/AppScreen/AppScreen.tsx +9 -4
- package/src/primitive/AppBar/AppBar.tsx +2 -2
- package/src/primitive/AppScreen/AppScreen.tsx +1 -1
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const reactSlot = require('@radix-ui/react-slot');
|
|
8
|
+
const appBar = require('@seed-design/css/recipes/app-bar');
|
|
9
|
+
const appBarMain = require('@seed-design/css/recipes/app-bar-main');
|
|
8
10
|
const domUtils = require('@seed-design/dom-utils');
|
|
9
11
|
const reactPrimitive = require('@seed-design/react-primitive');
|
|
10
|
-
const appBar = require('@seed-design/css/recipes/app-bar');
|
|
11
12
|
const clsx = require('clsx');
|
|
12
13
|
const React = require('react');
|
|
13
14
|
const AppBar = require('../../primitive/AppBar/AppBar.cjs');
|
|
14
15
|
const useAppBarContext = require('../../primitive/AppBar/useAppBarContext.cjs');
|
|
15
16
|
const createStyleContext = require('../../utils/createStyleContext.cjs');
|
|
16
|
-
const appBarMain = require('@seed-design/css/recipes/app-bar-main');
|
|
17
17
|
|
|
18
18
|
const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext.createStyleContext(appBar.appBar);
|
|
19
19
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
2
1
|
import { AppBarVariantProps, AppBarVariant } from '@seed-design/css/recipes/app-bar';
|
|
3
|
-
import { AppBar as AppBarPrimitive } from '../../primitive';
|
|
4
2
|
import { AppBarMainVariantProps } from '@seed-design/css/recipes/app-bar-main';
|
|
3
|
+
import { PrimitiveProps } from '@seed-design/react-primitive';
|
|
4
|
+
import { AppBar as AppBarPrimitive } from '../../primitive';
|
|
5
5
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
6
6
|
export declare const AppBarPropsProvider: ({ children, value }: {
|
|
7
7
|
children: React.ReactNode;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
+
import { appBar } from '@seed-design/css/recipes/app-bar';
|
|
5
|
+
import { appBarMain } from '@seed-design/css/recipes/app-bar-main';
|
|
4
6
|
import { mergeProps } from '@seed-design/dom-utils';
|
|
5
7
|
import { Primitive } from '@seed-design/react-primitive';
|
|
6
|
-
import { appBar } from '@seed-design/css/recipes/app-bar';
|
|
7
8
|
import clsx from 'clsx';
|
|
8
9
|
import { forwardRef } from 'react';
|
|
9
10
|
import { AppBarLeft as AppBarLeft$1, AppBarMain as AppBarMain$1, AppBarRight as AppBarRight$1, AppBarRoot as AppBarRoot$1 } from '../../primitive/AppBar/AppBar.js';
|
|
10
11
|
import { useAppBarContext } from '../../primitive/AppBar/useAppBarContext.js';
|
|
11
12
|
import { createStyleContext } from '../../utils/createStyleContext.js';
|
|
12
|
-
import { appBarMain } from '@seed-design/css/recipes/app-bar-main';
|
|
13
13
|
|
|
14
14
|
const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext(appBar);
|
|
15
15
|
const {
|
|
@@ -5,11 +5,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const appScreen = require('@seed-design/css/recipes/app-screen');
|
|
8
|
+
const domUtils = require('@seed-design/dom-utils');
|
|
8
9
|
const React = require('react');
|
|
9
10
|
const AppScreen = require('../../primitive/AppScreen/AppScreen.cjs');
|
|
10
11
|
const createStyleContext = require('../../utils/createStyleContext.cjs');
|
|
11
12
|
const AppBar = require('../AppBar/AppBar.cjs');
|
|
12
|
-
const domUtils = require('@seed-design/dom-utils');
|
|
13
13
|
|
|
14
14
|
const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext.createStyleContext(appScreen.appScreen);
|
|
15
15
|
const AppScreenPropsProvider = PropsProvider;
|
|
@@ -25,8 +25,8 @@ const AppScreenRoot = React.forwardRef((props, ref) => {
|
|
|
25
25
|
AppBar.AppBarPropsProvider,
|
|
26
26
|
{
|
|
27
27
|
value: React.useMemo(
|
|
28
|
-
() => ({ theme: variantProps.theme, transitionStyle }),
|
|
29
|
-
[variantProps.theme, transitionStyle]
|
|
28
|
+
() => ({ theme: variantProps.theme, transitionStyle, tone: variantProps.tone }),
|
|
29
|
+
[variantProps.theme, transitionStyle, variantProps.tone]
|
|
30
30
|
),
|
|
31
31
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
32
|
AppScreen.AppScreenRoot,
|
|
@@ -6,6 +6,10 @@ export declare const AppScreenPropsProvider: ({ children, value }: {
|
|
|
6
6
|
value: Partial< AppScreenVariant>;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export interface AppScreenRootProps extends AppScreenVariantProps, AppScreenPrimitive.RootProps {
|
|
9
|
+
/**
|
|
10
|
+
* @default "layer"
|
|
11
|
+
*/
|
|
12
|
+
tone?: "layer" | "transparent";
|
|
9
13
|
}
|
|
10
14
|
export declare const AppScreenRoot: ForwardRefExoticComponent<AppScreenRootProps & RefAttributes<HTMLDivElement>>;
|
|
11
15
|
export interface AppScreenDimProps extends AppScreenPrimitive.DimProps {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { appScreen } from '@seed-design/css/recipes/app-screen';
|
|
4
|
+
import { mergeProps } from '@seed-design/dom-utils';
|
|
4
5
|
import { forwardRef, useMemo } from 'react';
|
|
5
6
|
import { AppScreenDim as AppScreenDim$1, AppScreenEdge as AppScreenEdge$1, AppScreenLayer as AppScreenLayer$1, AppScreenRoot as AppScreenRoot$1 } from '../../primitive/AppScreen/AppScreen.js';
|
|
6
7
|
import { createStyleContext } from '../../utils/createStyleContext.js';
|
|
7
8
|
import { AppBarPropsProvider } from '../AppBar/AppBar.js';
|
|
8
|
-
import { mergeProps } from '@seed-design/dom-utils';
|
|
9
9
|
|
|
10
10
|
const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);
|
|
11
11
|
const AppScreenPropsProvider = PropsProvider;
|
|
@@ -21,8 +21,8 @@ const AppScreenRoot = forwardRef((props, ref) => {
|
|
|
21
21
|
AppBarPropsProvider,
|
|
22
22
|
{
|
|
23
23
|
value: useMemo(
|
|
24
|
-
() => ({ theme: variantProps.theme, transitionStyle }),
|
|
25
|
-
[variantProps.theme, transitionStyle]
|
|
24
|
+
() => ({ theme: variantProps.theme, transitionStyle, tone: variantProps.tone }),
|
|
25
|
+
[variantProps.theme, transitionStyle, variantProps.tone]
|
|
26
26
|
),
|
|
27
27
|
children: /* @__PURE__ */ jsx(
|
|
28
28
|
AppScreenRoot$1,
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const reactComposeRefs = require('@radix-ui/react-compose-refs');
|
|
8
|
+
const domUtils = require('@seed-design/dom-utils');
|
|
7
9
|
const reactPrimitive = require('@seed-design/react-primitive');
|
|
8
10
|
const React = require('react');
|
|
9
11
|
const useAppBar = require('./useAppBar.cjs');
|
|
10
12
|
const useAppBarContext = require('./useAppBarContext.cjs');
|
|
11
|
-
const domUtils = require('@seed-design/dom-utils');
|
|
12
|
-
const reactComposeRefs = require('@radix-ui/react-compose-refs');
|
|
13
13
|
|
|
14
14
|
const AppBarRoot = React.forwardRef((props, ref) => {
|
|
15
15
|
const { ...otherProps } = props;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { composeRefs } from '@radix-ui/react-compose-refs';
|
|
4
|
+
import { mergeProps } from '@seed-design/dom-utils';
|
|
3
5
|
import { Primitive } from '@seed-design/react-primitive';
|
|
4
6
|
import { forwardRef } from 'react';
|
|
5
7
|
import { useAppBar } from './useAppBar.js';
|
|
6
8
|
import { useAppBarContext, AppBarProvider } from './useAppBarContext.js';
|
|
7
|
-
import { mergeProps } from '@seed-design/dom-utils';
|
|
8
|
-
import { composeRefs } from '@radix-ui/react-compose-refs';
|
|
9
9
|
|
|
10
10
|
const AppBarRoot = forwardRef((props, ref) => {
|
|
11
11
|
const { ...otherProps } = props;
|
|
@@ -7,10 +7,10 @@ const jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
const reactComposeRefs = require('@radix-ui/react-compose-refs');
|
|
8
8
|
const domUtils = require('@seed-design/dom-utils');
|
|
9
9
|
const reactPrimitive = require('@seed-design/react-primitive');
|
|
10
|
+
const reactUiCore = require('@stackflow/react-ui-core');
|
|
10
11
|
const React = require('react');
|
|
11
12
|
const useAppScreen = require('./useAppScreen.cjs');
|
|
12
13
|
const useAppScreenContext = require('./useAppScreenContext.cjs');
|
|
13
|
-
const reactUiCore = require('@stackflow/react-ui-core');
|
|
14
14
|
|
|
15
15
|
const AppScreenRoot = React.forwardRef((props, ref) => {
|
|
16
16
|
const {
|
|
@@ -3,10 +3,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { composeRefs } from '@radix-ui/react-compose-refs';
|
|
4
4
|
import { mergeProps } from '@seed-design/dom-utils';
|
|
5
5
|
import { Primitive } from '@seed-design/react-primitive';
|
|
6
|
+
import { usePreventTouchDuringTransition } from '@stackflow/react-ui-core';
|
|
6
7
|
import { forwardRef, useRef } from 'react';
|
|
7
8
|
import { useAppScreen } from './useAppScreen.js';
|
|
8
9
|
import { useAppScreenContext, AppScreenProvider } from './useAppScreenContext.js';
|
|
9
|
-
import { usePreventTouchDuringTransition } from '@stackflow/react-ui-core';
|
|
10
10
|
|
|
11
11
|
const AppScreenRoot = forwardRef((props, ref) => {
|
|
12
12
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/stackflow",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"clsx": "^2.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@seed-design/css": "1.0
|
|
38
|
+
"@seed-design/css": "1.1.0",
|
|
39
39
|
"@stackflow/core": "^1.2.0",
|
|
40
40
|
"@stackflow/react": "^1.5.1",
|
|
41
41
|
"@stackflow/react-ui-core": "^1.3.2",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"vite-plugin-dts": "^4.5.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@seed-design/css": ">=1.0
|
|
52
|
+
"@seed-design/css": ">=1.1.0",
|
|
53
53
|
"@stackflow/core": ">=1.1.0",
|
|
54
54
|
"@stackflow/react": ">=1.4.1",
|
|
55
55
|
"@stackflow/react-ui-core": ">=1.3.2",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { appBar, type AppBarVariantProps } from "@seed-design/css/recipes/app-bar";
|
|
3
|
+
import { appBarMain, type AppBarMainVariantProps } from "@seed-design/css/recipes/app-bar-main";
|
|
2
4
|
import { mergeProps } from "@seed-design/dom-utils";
|
|
3
5
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
4
|
-
import { type AppBarVariantProps, appBar } from "@seed-design/css/recipes/app-bar";
|
|
5
6
|
import clsx from "clsx";
|
|
6
7
|
import { forwardRef } from "react";
|
|
7
8
|
import { AppBar as AppBarPrimitive } from "../../primitive";
|
|
8
9
|
import { useAppBarContext } from "../../primitive/AppBar/useAppBarContext";
|
|
9
10
|
import { createStyleContext } from "../../utils/createStyleContext";
|
|
10
|
-
import { appBarMain, type AppBarMainVariantProps } from "@seed-design/css/recipes/app-bar-main";
|
|
11
11
|
|
|
12
12
|
const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } =
|
|
13
13
|
createStyleContext(appBar);
|
|
@@ -24,7 +24,6 @@ export interface AppBarProps extends AppBarVariantProps, AppBarPrimitive.RootPro
|
|
|
24
24
|
export const AppBarRoot = forwardRef<HTMLDivElement, AppBarProps>((props, ref) => {
|
|
25
25
|
const contextProps = useProps();
|
|
26
26
|
const [variantProps, otherProps] = appBar.splitVariantProps({ ...contextProps, ...props });
|
|
27
|
-
|
|
28
27
|
const classNames = appBar(variantProps);
|
|
29
28
|
|
|
30
29
|
return (
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { appScreen, type AppScreenVariantProps } from "@seed-design/css/recipes/app-screen";
|
|
2
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
2
3
|
import { forwardRef, useMemo } from "react";
|
|
3
4
|
import { AppScreen as AppScreenPrimitive } from "../../primitive";
|
|
4
5
|
import { createStyleContext } from "../../utils/createStyleContext";
|
|
5
6
|
import { AppBarPropsProvider } from "../AppBar/AppBar";
|
|
6
|
-
import { mergeProps } from "@seed-design/dom-utils";
|
|
7
7
|
|
|
8
8
|
const { ClassNamesProvider, PropsProvider, withContext, useProps } = createStyleContext(appScreen);
|
|
9
9
|
|
|
10
10
|
export const AppScreenPropsProvider = PropsProvider;
|
|
11
11
|
|
|
12
|
-
export interface AppScreenRootProps extends AppScreenVariantProps, AppScreenPrimitive.RootProps {
|
|
12
|
+
export interface AppScreenRootProps extends AppScreenVariantProps, AppScreenPrimitive.RootProps {
|
|
13
|
+
/**
|
|
14
|
+
* @default "layer"
|
|
15
|
+
*/
|
|
16
|
+
tone?: "layer" | "transparent";
|
|
17
|
+
}
|
|
13
18
|
|
|
14
19
|
export const AppScreenRoot = forwardRef<HTMLDivElement, AppScreenRootProps>((props, ref) => {
|
|
15
20
|
const contextProps = useProps();
|
|
@@ -29,8 +34,8 @@ export const AppScreenRoot = forwardRef<HTMLDivElement, AppScreenRootProps>((pro
|
|
|
29
34
|
<ClassNamesProvider value={classNames}>
|
|
30
35
|
<AppBarPropsProvider
|
|
31
36
|
value={useMemo(
|
|
32
|
-
() => ({ theme: variantProps.theme, transitionStyle }),
|
|
33
|
-
[variantProps.theme, transitionStyle],
|
|
37
|
+
() => ({ theme: variantProps.theme, transitionStyle, tone: variantProps.tone }),
|
|
38
|
+
[variantProps.theme, transitionStyle, variantProps.tone],
|
|
34
39
|
)}
|
|
35
40
|
>
|
|
36
41
|
<AppScreenPrimitive.Root
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
2
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
1
3
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
4
|
import { forwardRef } from "react";
|
|
3
5
|
import { useAppBar, type UseAppBarProps } from "./useAppBar";
|
|
4
6
|
import { AppBarProvider, useAppBarContext } from "./useAppBarContext";
|
|
5
|
-
import { mergeProps } from "@seed-design/dom-utils";
|
|
6
|
-
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
7
7
|
|
|
8
8
|
export interface AppBarRootProps
|
|
9
9
|
extends PrimitiveProps,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { composeRefs } from "@radix-ui/react-compose-refs";
|
|
2
2
|
import { mergeProps } from "@seed-design/dom-utils";
|
|
3
3
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
4
|
+
import { usePreventTouchDuringTransition } from "@stackflow/react-ui-core";
|
|
4
5
|
import { forwardRef, useRef } from "react";
|
|
5
6
|
import { useAppScreen, type UseAppScreenProps } from "./useAppScreen";
|
|
6
7
|
import { AppScreenProvider, useAppScreenContext } from "./useAppScreenContext";
|
|
7
|
-
import { usePreventTouchDuringTransition } from "@stackflow/react-ui-core";
|
|
8
8
|
|
|
9
9
|
export interface AppScreenRootProps
|
|
10
10
|
extends PrimitiveProps,
|