@seed-design/stackflow 1.1.19 → 1.1.21
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/_virtual/_rolldown/runtime.cjs +34 -0
- package/lib/_virtual/_rolldown/runtime.js +14 -0
- package/lib/components/AppBar/AppBar.cjs +88 -87
- package/lib/components/AppBar/AppBar.d.ts +3 -0
- package/lib/components/AppBar/AppBar.js +86 -84
- package/lib/components/AppBar/AppBar.namespace.cjs +20 -15
- package/lib/components/AppBar/AppBar.namespace.d.ts +2 -2
- package/lib/components/AppBar/AppBar.namespace.js +15 -1
- package/lib/components/AppBar/index.cjs +17 -17
- package/lib/components/AppBar/index.d.ts +2 -2
- package/lib/components/AppBar/index.js +3 -3
- package/lib/components/AppScreen/AppScreen.cjs +46 -61
- package/lib/components/AppScreen/AppScreen.js +45 -57
- package/lib/components/AppScreen/AppScreen.namespace.cjs +17 -13
- package/lib/components/AppScreen/AppScreen.namespace.js +12 -1
- package/lib/components/AppScreen/index.cjs +14 -15
- package/lib/components/AppScreen/index.js +3 -3
- package/lib/components/index.cjs +30 -25
- package/lib/components/index.js +5 -6
- package/lib/hooks/index.cjs +3 -9
- package/lib/hooks/index.js +2 -1
- package/lib/hooks/useActivityZIndexBase.cjs +12 -11
- package/lib/hooks/useActivityZIndexBase.js +11 -7
- package/lib/index.cjs +41 -31
- package/lib/index.js +8 -10
- package/lib/plugin.cjs +16 -16
- package/lib/plugin.js +14 -12
- package/lib/primitive/AppBar/AppBar.cjs +41 -33
- package/lib/primitive/AppBar/AppBar.js +40 -29
- package/lib/primitive/AppBar/AppBar.namespace.cjs +16 -12
- package/lib/primitive/AppBar/AppBar.namespace.js +11 -1
- package/lib/primitive/AppBar/anatomy.cjs +18 -0
- package/lib/primitive/AppBar/anatomy.d.ts +15 -0
- package/lib/primitive/AppBar/anatomy.js +18 -0
- package/lib/primitive/AppBar/index.cjs +13 -14
- package/lib/primitive/AppBar/index.js +3 -3
- package/lib/primitive/AppBar/useAppBar.cjs +29 -36
- package/lib/primitive/AppBar/useAppBar.js +28 -32
- package/lib/primitive/AppBar/useAppBarContext.cjs +11 -18
- package/lib/primitive/AppBar/useAppBarContext.js +10 -14
- package/lib/primitive/AppScreen/AppScreen.cjs +49 -52
- package/lib/primitive/AppScreen/AppScreen.js +48 -48
- package/lib/primitive/AppScreen/AppScreen.namespace.cjs +16 -12
- package/lib/primitive/AppScreen/AppScreen.namespace.js +11 -1
- package/lib/primitive/AppScreen/anatomy.cjs +17 -0
- package/lib/primitive/AppScreen/anatomy.d.ts +14 -0
- package/lib/primitive/AppScreen/anatomy.js +17 -0
- package/lib/primitive/AppScreen/index.cjs +15 -16
- package/lib/primitive/AppScreen/index.js +4 -4
- package/lib/primitive/AppScreen/useAppScreen.cjs +60 -63
- package/lib/primitive/AppScreen/useAppScreen.js +59 -59
- package/lib/primitive/AppScreen/useAppScreenContext.cjs +11 -18
- package/lib/primitive/AppScreen/useAppScreenContext.js +10 -14
- package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +21 -26
- package/lib/primitive/GlobalInteraction/GlobalInteraction.js +20 -22
- package/lib/primitive/GlobalInteraction/animation.cjs +303 -0
- package/lib/primitive/GlobalInteraction/animation.d.ts +16 -0
- package/lib/primitive/GlobalInteraction/animation.js +299 -0
- package/lib/primitive/GlobalInteraction/constants.cjs +9 -0
- package/lib/primitive/GlobalInteraction/constants.d.ts +19 -0
- package/lib/primitive/GlobalInteraction/constants.js +8 -0
- package/lib/primitive/GlobalInteraction/dom.cjs +147 -0
- package/lib/primitive/GlobalInteraction/dom.d.ts +44 -0
- package/lib/primitive/GlobalInteraction/dom.js +140 -0
- package/lib/primitive/GlobalInteraction/index.cjs +5 -11
- package/lib/primitive/GlobalInteraction/index.js +3 -2
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +220 -133
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +10 -26
- package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +219 -129
- package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +11 -18
- package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +10 -14
- package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +71 -55
- package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +19 -2
- package/lib/primitive/GlobalInteraction/useSwipeBack.js +70 -51
- package/lib/primitive/index.cjs +55 -27
- package/lib/primitive/index.js +26 -9
- package/lib/primitive/private/useElementOffset.cjs +29 -51
- package/lib/primitive/private/useElementOffset.js +27 -28
- package/lib/primitive/private/useTopActivity.cjs +22 -31
- package/lib/primitive/private/useTopActivity.js +21 -27
- package/lib/utils/createStyleContext.cjs +91 -74
- package/lib/utils/createStyleContext.js +89 -70
- package/lib/utils/styled.cjs +13 -20
- package/lib/utils/styled.js +12 -16
- package/package.json +4 -4
- package/src/components/AppBar/AppBar.namespace.ts +2 -0
- package/src/components/AppBar/AppBar.tsx +29 -3
- package/src/components/AppBar/index.ts +2 -0
- package/src/primitive/AppBar/AppBar.tsx +4 -1
- package/src/primitive/AppBar/anatomy.ts +16 -0
- package/src/primitive/AppBar/useAppBar.tsx +2 -1
- package/src/primitive/AppScreen/anatomy.ts +15 -0
- package/src/primitive/AppScreen/useAppScreen.tsx +5 -4
- package/src/primitive/GlobalInteraction/animation.ts +447 -0
- package/src/primitive/GlobalInteraction/constants.ts +24 -0
- package/src/primitive/GlobalInteraction/dom.ts +211 -0
- package/src/primitive/GlobalInteraction/useGlobalInteraction.ts +302 -129
- package/src/primitive/GlobalInteraction/useSwipeBack.ts +64 -26
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __exportAll = (all, no_symbols) => {
|
|
10
|
+
let target = {};
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get: ((k) => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
29
|
+
value: mod,
|
|
30
|
+
enumerable: true
|
|
31
|
+
}) : target, mod));
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.__exportAll = __exportAll;
|
|
34
|
+
exports.__toESM = __toESM;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __exportAll = (all, no_symbols) => {
|
|
5
|
+
let target = {};
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { __exportAll };
|
|
@@ -1,98 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_anatomy = require("../../primitive/AppBar/anatomy.cjs");
|
|
4
|
+
const require_useAppBarContext = require("../../primitive/AppBar/useAppBarContext.cjs");
|
|
5
|
+
const require_AppBar = require("../../primitive/AppBar/AppBar.cjs");
|
|
6
|
+
const require_useTopActivity = require("../../primitive/private/useTopActivity.cjs");
|
|
7
|
+
const require_createStyleContext = require("../../utils/createStyleContext.cjs");
|
|
8
|
+
const require_styled = require("../../utils/styled.cjs");
|
|
9
|
+
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
10
|
+
let _seed_design_css_recipes_app_bar = require("@seed-design/css/recipes/app-bar");
|
|
11
|
+
let _seed_design_css_recipes_app_bar_main = require("@seed-design/css/recipes/app-bar-main");
|
|
12
|
+
let _seed_design_dom_utils = require("@seed-design/dom-utils");
|
|
13
|
+
let _seed_design_react_primitive = require("@seed-design/react-primitive");
|
|
14
|
+
let clsx = require("clsx");
|
|
15
|
+
clsx = require_runtime.__toESM(clsx);
|
|
16
|
+
let react = require("react");
|
|
17
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
18
|
+
let _stackflow_react = require("@stackflow/react");
|
|
19
|
+
//#region src/components/AppBar/AppBar.tsx
|
|
20
|
+
var { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = require_createStyleContext.createStyleContext(_seed_design_css_recipes_app_bar.appBar);
|
|
21
|
+
var { PropsProvider: MainPropsProvider, withProvider: withMainProvider, withContext: withMainContext } = require_createStyleContext.createStyleContext(_seed_design_css_recipes_app_bar_main.appBarMain);
|
|
22
|
+
var AppBarPropsProvider = PropsProvider;
|
|
23
|
+
var AppBarRoot = (0, react.forwardRef)((props, ref) => {
|
|
24
|
+
const { style: boxStyle, restProps: propsWithoutBoxProps } = require_styled.useBoxBackgroundProps(props);
|
|
25
|
+
const contextProps = useProps();
|
|
26
|
+
const [variantProps, otherProps] = _seed_design_css_recipes_app_bar.appBar.splitVariantProps({
|
|
27
|
+
...contextProps,
|
|
28
|
+
...propsWithoutBoxProps
|
|
29
|
+
});
|
|
30
|
+
const topActivityTransitionStyle = require_useTopActivity.useTopActivity().transitionStyle;
|
|
31
|
+
const resolvedVariantProps = {
|
|
32
|
+
...variantProps,
|
|
33
|
+
...(0, _stackflow_react.useActivity)().isTop === false && { transitionStyle: topActivityTransitionStyle }
|
|
34
|
+
};
|
|
35
|
+
const classNames = (0, _seed_design_css_recipes_app_bar.appBar)(resolvedVariantProps);
|
|
36
|
+
const { children, ...restProps } = otherProps;
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClassNamesProvider, {
|
|
38
|
+
value: classNames,
|
|
39
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MainPropsProvider, {
|
|
40
|
+
value: resolvedVariantProps,
|
|
41
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_AppBar.AppBarRoot, {
|
|
42
|
+
ref,
|
|
43
|
+
...(0, _seed_design_dom_utils.mergeProps)({
|
|
44
|
+
className: classNames.root,
|
|
45
|
+
style: boxStyle
|
|
46
|
+
}, restProps),
|
|
47
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
48
|
+
"aria-hidden": true,
|
|
49
|
+
"data-part": require_anatomy.appBarAnatomy.background,
|
|
50
|
+
className: classNames.background
|
|
51
|
+
}), children]
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
51
55
|
});
|
|
52
56
|
AppBarRoot.displayName = "AppBarRoot";
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
({ children, className, ...otherProps }, ref) => {
|
|
75
|
-
const { stateProps } = useAppBarContext.useAppBarContext();
|
|
76
|
-
const classNames = useClassNames();
|
|
77
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
-
reactPrimitive.Primitive.button,
|
|
79
|
-
{
|
|
80
|
-
ref,
|
|
81
|
-
type: "button",
|
|
82
|
-
className: clsx(classNames.iconButton, className),
|
|
83
|
-
...domUtils.mergeProps(stateProps, otherProps),
|
|
84
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { className: classNames.icon, ...stateProps, children })
|
|
85
|
-
}
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
);
|
|
57
|
+
var AppBarLeft = withContext(require_AppBar.AppBarLeft, "left");
|
|
58
|
+
var AppBarRight = withContext(require_AppBar.AppBarRight, "right");
|
|
59
|
+
var AppBarMain = withMainProvider(require_AppBar.AppBarMain, "root");
|
|
60
|
+
var AppBarTitle = withMainContext(_seed_design_react_primitive.Primitive.span, "title");
|
|
61
|
+
var AppBarSubtitle = withMainContext(_seed_design_react_primitive.Primitive.span, "subtitle");
|
|
62
|
+
var AppBarIconButton = (0, react.forwardRef)(({ children, className, ...otherProps }, ref) => {
|
|
63
|
+
const { stateProps } = require_useAppBarContext.useAppBarContext();
|
|
64
|
+
const classNames = useClassNames();
|
|
65
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_seed_design_react_primitive.Primitive.button, {
|
|
66
|
+
ref,
|
|
67
|
+
type: "button",
|
|
68
|
+
className: (0, clsx.default)(classNames.iconButton, className),
|
|
69
|
+
...(0, _seed_design_dom_utils.mergeProps)(stateProps, otherProps),
|
|
70
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
|
|
71
|
+
className: classNames.icon,
|
|
72
|
+
"data-part": require_anatomy.appBarAnatomy.icon,
|
|
73
|
+
...stateProps,
|
|
74
|
+
children
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
89
78
|
AppBarIconButton.displayName = "IconButton";
|
|
90
|
-
|
|
79
|
+
var AppBarSlot = (0, react.forwardRef)(({ children, className, ...otherProps }, ref) => {
|
|
80
|
+
const { stateProps } = require_useAppBarContext.useAppBarContext();
|
|
81
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slot.Slot, {
|
|
82
|
+
ref,
|
|
83
|
+
className: (0, clsx.default)(useClassNames().custom, className),
|
|
84
|
+
"data-part": require_anatomy.appBarAnatomy.custom,
|
|
85
|
+
...(0, _seed_design_dom_utils.mergeProps)(stateProps, otherProps),
|
|
86
|
+
children
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
AppBarSlot.displayName = "AppBarSlot";
|
|
90
|
+
//#endregion
|
|
91
91
|
exports.AppBarIconButton = AppBarIconButton;
|
|
92
92
|
exports.AppBarLeft = AppBarLeft;
|
|
93
93
|
exports.AppBarMain = AppBarMain;
|
|
94
94
|
exports.AppBarPropsProvider = AppBarPropsProvider;
|
|
95
95
|
exports.AppBarRight = AppBarRight;
|
|
96
96
|
exports.AppBarRoot = AppBarRoot;
|
|
97
|
+
exports.AppBarSlot = AppBarSlot;
|
|
97
98
|
exports.AppBarSubtitle = AppBarSubtitle;
|
|
98
99
|
exports.AppBarTitle = AppBarTitle;
|
|
@@ -29,3 +29,6 @@ export declare const AppBarSubtitle: ForwardRefExoticComponent<AppBarSubtitlePro
|
|
|
29
29
|
export interface AppBarIconButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
30
30
|
}
|
|
31
31
|
export declare const AppBarIconButton: ForwardRefExoticComponent<AppBarIconButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
export interface AppBarSlotProps extends PrimitiveProps, React.HTMLAttributes<HTMLElement> {
|
|
33
|
+
}
|
|
34
|
+
export declare const AppBarSlot: ForwardRefExoticComponent<AppBarSlotProps & RefAttributes<HTMLElement>>;
|
|
@@ -1,87 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} =
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { appBarAnatomy } from "../../primitive/AppBar/anatomy.js";
|
|
3
|
+
import { useAppBarContext } from "../../primitive/AppBar/useAppBarContext.js";
|
|
4
|
+
import { AppBarLeft as AppBarLeft$1, AppBarMain as AppBarMain$1, AppBarRight as AppBarRight$1, AppBarRoot as AppBarRoot$1 } from "../../primitive/AppBar/AppBar.js";
|
|
5
|
+
import { useTopActivity } from "../../primitive/private/useTopActivity.js";
|
|
6
|
+
import { createStyleContext } from "../../utils/createStyleContext.js";
|
|
7
|
+
import { useBoxBackgroundProps } from "../../utils/styled.js";
|
|
8
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
9
|
+
import { appBar } from "@seed-design/css/recipes/app-bar";
|
|
10
|
+
import { appBarMain } from "@seed-design/css/recipes/app-bar-main";
|
|
11
|
+
import { mergeProps } from "@seed-design/dom-utils";
|
|
12
|
+
import { Primitive } from "@seed-design/react-primitive";
|
|
13
|
+
import clsx from "clsx";
|
|
14
|
+
import { forwardRef } from "react";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { useActivity } from "@stackflow/react";
|
|
17
|
+
//#region src/components/AppBar/AppBar.tsx
|
|
18
|
+
var { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext(appBar);
|
|
19
|
+
var { PropsProvider: MainPropsProvider, withProvider: withMainProvider, withContext: withMainContext } = createStyleContext(appBarMain);
|
|
20
|
+
var AppBarPropsProvider = PropsProvider;
|
|
21
|
+
var AppBarRoot = forwardRef((props, ref) => {
|
|
22
|
+
const { style: boxStyle, restProps: propsWithoutBoxProps } = useBoxBackgroundProps(props);
|
|
23
|
+
const contextProps = useProps();
|
|
24
|
+
const [variantProps, otherProps] = appBar.splitVariantProps({
|
|
25
|
+
...contextProps,
|
|
26
|
+
...propsWithoutBoxProps
|
|
27
|
+
});
|
|
28
|
+
const topActivityTransitionStyle = useTopActivity().transitionStyle;
|
|
29
|
+
const resolvedVariantProps = {
|
|
30
|
+
...variantProps,
|
|
31
|
+
...useActivity().isTop === false && { transitionStyle: topActivityTransitionStyle }
|
|
32
|
+
};
|
|
33
|
+
const classNames = appBar(resolvedVariantProps);
|
|
34
|
+
const { children, ...restProps } = otherProps;
|
|
35
|
+
return /* @__PURE__ */ jsx(ClassNamesProvider, {
|
|
36
|
+
value: classNames,
|
|
37
|
+
children: /* @__PURE__ */ jsx(MainPropsProvider, {
|
|
38
|
+
value: resolvedVariantProps,
|
|
39
|
+
children: /* @__PURE__ */ jsxs(AppBarRoot$1, {
|
|
40
|
+
ref,
|
|
41
|
+
...mergeProps({
|
|
42
|
+
className: classNames.root,
|
|
43
|
+
style: boxStyle
|
|
44
|
+
}, restProps),
|
|
45
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
46
|
+
"aria-hidden": true,
|
|
47
|
+
"data-part": appBarAnatomy.background,
|
|
48
|
+
className: classNames.background
|
|
49
|
+
}), children]
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
});
|
|
47
53
|
});
|
|
48
54
|
AppBarRoot.displayName = "AppBarRoot";
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
({ children, className, ...otherProps }, ref) => {
|
|
71
|
-
const { stateProps } = useAppBarContext();
|
|
72
|
-
const classNames = useClassNames();
|
|
73
|
-
return /* @__PURE__ */ jsx(
|
|
74
|
-
Primitive.button,
|
|
75
|
-
{
|
|
76
|
-
ref,
|
|
77
|
-
type: "button",
|
|
78
|
-
className: clsx(classNames.iconButton, className),
|
|
79
|
-
...mergeProps(stateProps, otherProps),
|
|
80
|
-
children: /* @__PURE__ */ jsx(Slot, { className: classNames.icon, ...stateProps, children })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
);
|
|
55
|
+
var AppBarLeft = withContext(AppBarLeft$1, "left");
|
|
56
|
+
var AppBarRight = withContext(AppBarRight$1, "right");
|
|
57
|
+
var AppBarMain = withMainProvider(AppBarMain$1, "root");
|
|
58
|
+
var AppBarTitle = withMainContext(Primitive.span, "title");
|
|
59
|
+
var AppBarSubtitle = withMainContext(Primitive.span, "subtitle");
|
|
60
|
+
var AppBarIconButton = forwardRef(({ children, className, ...otherProps }, ref) => {
|
|
61
|
+
const { stateProps } = useAppBarContext();
|
|
62
|
+
const classNames = useClassNames();
|
|
63
|
+
return /* @__PURE__ */ jsx(Primitive.button, {
|
|
64
|
+
ref,
|
|
65
|
+
type: "button",
|
|
66
|
+
className: clsx(classNames.iconButton, className),
|
|
67
|
+
...mergeProps(stateProps, otherProps),
|
|
68
|
+
children: /* @__PURE__ */ jsx(Slot, {
|
|
69
|
+
className: classNames.icon,
|
|
70
|
+
"data-part": appBarAnatomy.icon,
|
|
71
|
+
...stateProps,
|
|
72
|
+
children
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
});
|
|
85
76
|
AppBarIconButton.displayName = "IconButton";
|
|
86
|
-
|
|
87
|
-
|
|
77
|
+
var AppBarSlot = forwardRef(({ children, className, ...otherProps }, ref) => {
|
|
78
|
+
const { stateProps } = useAppBarContext();
|
|
79
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
80
|
+
ref,
|
|
81
|
+
className: clsx(useClassNames().custom, className),
|
|
82
|
+
"data-part": appBarAnatomy.custom,
|
|
83
|
+
...mergeProps(stateProps, otherProps),
|
|
84
|
+
children
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
AppBarSlot.displayName = "AppBarSlot";
|
|
88
|
+
//#endregion
|
|
89
|
+
export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarPropsProvider, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle };
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
exports
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_AppBar = require("./AppBar.cjs");
|
|
3
|
+
//#region src/components/AppBar/AppBar.namespace.ts
|
|
4
|
+
var AppBar_namespace_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
5
|
+
IconButton: () => require_AppBar.AppBarIconButton,
|
|
6
|
+
Left: () => require_AppBar.AppBarLeft,
|
|
7
|
+
Main: () => require_AppBar.AppBarMain,
|
|
8
|
+
Right: () => require_AppBar.AppBarRight,
|
|
9
|
+
Root: () => require_AppBar.AppBarRoot,
|
|
10
|
+
Slot: () => require_AppBar.AppBarSlot,
|
|
11
|
+
Subtitle: () => require_AppBar.AppBarSubtitle,
|
|
12
|
+
Title: () => require_AppBar.AppBarTitle
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
Object.defineProperty(exports, "AppBar_namespace_exports", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function() {
|
|
18
|
+
return AppBar_namespace_exports;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -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, AppBarSlot as Slot, 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, AppBarSlotProps as SlotProps, AppBarSubtitleProps as SubtitleProps, AppBarTitleProps as TitleProps, } from './AppBar';
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from "./AppBar.js";
|
|
3
|
+
//#region src/components/AppBar/AppBar.namespace.ts
|
|
4
|
+
var AppBar_namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
IconButton: () => AppBarIconButton,
|
|
6
|
+
Left: () => AppBarLeft,
|
|
7
|
+
Main: () => AppBarMain,
|
|
8
|
+
Right: () => AppBarRight,
|
|
9
|
+
Root: () => AppBarRoot,
|
|
10
|
+
Slot: () => AppBarSlot,
|
|
11
|
+
Subtitle: () => AppBarSubtitle,
|
|
12
|
+
Title: () => AppBarTitle
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { AppBar_namespace_exports };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.AppBarIconButton =
|
|
11
|
-
exports.AppBarLeft =
|
|
12
|
-
exports.AppBarMain =
|
|
13
|
-
exports.AppBarRight =
|
|
14
|
-
exports.AppBarRoot =
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_AppBar = require("./AppBar.cjs");
|
|
3
|
+
const require_AppBar_namespace = require("./AppBar.namespace.cjs");
|
|
4
|
+
Object.defineProperty(exports, "AppBar", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return require_AppBar_namespace.AppBar_namespace_exports;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
exports.AppBarIconButton = require_AppBar.AppBarIconButton;
|
|
11
|
+
exports.AppBarLeft = require_AppBar.AppBarLeft;
|
|
12
|
+
exports.AppBarMain = require_AppBar.AppBarMain;
|
|
13
|
+
exports.AppBarRight = require_AppBar.AppBarRight;
|
|
14
|
+
exports.AppBarRoot = require_AppBar.AppBarRoot;
|
|
15
|
+
exports.AppBarSlot = require_AppBar.AppBarSlot;
|
|
16
|
+
exports.AppBarSubtitle = require_AppBar.AppBarSubtitle;
|
|
17
|
+
exports.AppBarTitle = require_AppBar.AppBarTitle;
|
|
@@ -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';
|
|
1
|
+
export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle, } from './AppBar';
|
|
2
|
+
export type { AppBarIconButtonProps, AppBarLeftProps, AppBarMainProps, AppBarProps, AppBarRightProps, AppBarSlotProps, AppBarSubtitleProps, AppBarTitleProps, } from './AppBar';
|
|
3
3
|
export * as AppBar from './AppBar.namespace';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
export {
|
|
1
|
+
import { AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle } from "./AppBar.js";
|
|
2
|
+
import { AppBar_namespace_exports } from "./AppBar.namespace.js";
|
|
3
|
+
export { AppBar_namespace_exports as AppBar, AppBarIconButton, AppBarLeft, AppBarMain, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle };
|