@seed-design/stackflow 1.1.20 → 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.
Files changed (93) hide show
  1. package/lib/_virtual/_rolldown/runtime.cjs +34 -0
  2. package/lib/_virtual/_rolldown/runtime.js +14 -0
  3. package/lib/components/AppBar/AppBar.cjs +86 -102
  4. package/lib/components/AppBar/AppBar.js +84 -98
  5. package/lib/components/AppBar/AppBar.namespace.cjs +20 -16
  6. package/lib/components/AppBar/AppBar.namespace.js +15 -1
  7. package/lib/components/AppBar/index.cjs +17 -18
  8. package/lib/components/AppBar/index.js +3 -3
  9. package/lib/components/AppScreen/AppScreen.cjs +46 -61
  10. package/lib/components/AppScreen/AppScreen.js +45 -57
  11. package/lib/components/AppScreen/AppScreen.namespace.cjs +17 -13
  12. package/lib/components/AppScreen/AppScreen.namespace.js +12 -1
  13. package/lib/components/AppScreen/index.cjs +14 -15
  14. package/lib/components/AppScreen/index.js +3 -3
  15. package/lib/components/index.cjs +30 -26
  16. package/lib/components/index.js +5 -6
  17. package/lib/hooks/index.cjs +3 -9
  18. package/lib/hooks/index.js +2 -1
  19. package/lib/hooks/useActivityZIndexBase.cjs +12 -11
  20. package/lib/hooks/useActivityZIndexBase.js +11 -7
  21. package/lib/index.cjs +41 -32
  22. package/lib/index.js +8 -10
  23. package/lib/plugin.cjs +16 -16
  24. package/lib/plugin.js +14 -12
  25. package/lib/primitive/AppBar/AppBar.cjs +41 -33
  26. package/lib/primitive/AppBar/AppBar.js +40 -29
  27. package/lib/primitive/AppBar/AppBar.namespace.cjs +16 -12
  28. package/lib/primitive/AppBar/AppBar.namespace.js +11 -1
  29. package/lib/primitive/AppBar/anatomy.cjs +18 -0
  30. package/lib/primitive/AppBar/anatomy.d.ts +15 -0
  31. package/lib/primitive/AppBar/anatomy.js +18 -0
  32. package/lib/primitive/AppBar/index.cjs +13 -14
  33. package/lib/primitive/AppBar/index.js +3 -3
  34. package/lib/primitive/AppBar/useAppBar.cjs +29 -36
  35. package/lib/primitive/AppBar/useAppBar.js +28 -32
  36. package/lib/primitive/AppBar/useAppBarContext.cjs +11 -18
  37. package/lib/primitive/AppBar/useAppBarContext.js +10 -14
  38. package/lib/primitive/AppScreen/AppScreen.cjs +49 -52
  39. package/lib/primitive/AppScreen/AppScreen.js +48 -48
  40. package/lib/primitive/AppScreen/AppScreen.namespace.cjs +16 -12
  41. package/lib/primitive/AppScreen/AppScreen.namespace.js +11 -1
  42. package/lib/primitive/AppScreen/anatomy.cjs +17 -0
  43. package/lib/primitive/AppScreen/anatomy.d.ts +14 -0
  44. package/lib/primitive/AppScreen/anatomy.js +17 -0
  45. package/lib/primitive/AppScreen/index.cjs +15 -16
  46. package/lib/primitive/AppScreen/index.js +4 -4
  47. package/lib/primitive/AppScreen/useAppScreen.cjs +60 -63
  48. package/lib/primitive/AppScreen/useAppScreen.js +59 -59
  49. package/lib/primitive/AppScreen/useAppScreenContext.cjs +11 -18
  50. package/lib/primitive/AppScreen/useAppScreenContext.js +10 -14
  51. package/lib/primitive/GlobalInteraction/GlobalInteraction.cjs +21 -26
  52. package/lib/primitive/GlobalInteraction/GlobalInteraction.js +20 -22
  53. package/lib/primitive/GlobalInteraction/animation.cjs +303 -0
  54. package/lib/primitive/GlobalInteraction/animation.d.ts +16 -0
  55. package/lib/primitive/GlobalInteraction/animation.js +299 -0
  56. package/lib/primitive/GlobalInteraction/constants.cjs +9 -0
  57. package/lib/primitive/GlobalInteraction/constants.d.ts +19 -0
  58. package/lib/primitive/GlobalInteraction/constants.js +8 -0
  59. package/lib/primitive/GlobalInteraction/dom.cjs +147 -0
  60. package/lib/primitive/GlobalInteraction/dom.d.ts +44 -0
  61. package/lib/primitive/GlobalInteraction/dom.js +140 -0
  62. package/lib/primitive/GlobalInteraction/index.cjs +5 -11
  63. package/lib/primitive/GlobalInteraction/index.js +3 -2
  64. package/lib/primitive/GlobalInteraction/useGlobalInteraction.cjs +220 -133
  65. package/lib/primitive/GlobalInteraction/useGlobalInteraction.d.ts +10 -26
  66. package/lib/primitive/GlobalInteraction/useGlobalInteraction.js +219 -129
  67. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.cjs +11 -18
  68. package/lib/primitive/GlobalInteraction/useGlobalInteractionContext.js +10 -14
  69. package/lib/primitive/GlobalInteraction/useSwipeBack.cjs +71 -55
  70. package/lib/primitive/GlobalInteraction/useSwipeBack.d.ts +19 -2
  71. package/lib/primitive/GlobalInteraction/useSwipeBack.js +70 -51
  72. package/lib/primitive/index.cjs +55 -27
  73. package/lib/primitive/index.js +26 -9
  74. package/lib/primitive/private/useElementOffset.cjs +29 -51
  75. package/lib/primitive/private/useElementOffset.js +27 -28
  76. package/lib/primitive/private/useTopActivity.cjs +22 -31
  77. package/lib/primitive/private/useTopActivity.js +21 -27
  78. package/lib/utils/createStyleContext.cjs +91 -74
  79. package/lib/utils/createStyleContext.js +89 -70
  80. package/lib/utils/styled.cjs +13 -20
  81. package/lib/utils/styled.js +12 -16
  82. package/package.json +4 -4
  83. package/src/components/AppBar/AppBar.tsx +9 -3
  84. package/src/primitive/AppBar/AppBar.tsx +4 -1
  85. package/src/primitive/AppBar/anatomy.ts +16 -0
  86. package/src/primitive/AppBar/useAppBar.tsx +2 -1
  87. package/src/primitive/AppScreen/anatomy.ts +15 -0
  88. package/src/primitive/AppScreen/useAppScreen.tsx +5 -4
  89. package/src/primitive/GlobalInteraction/animation.ts +447 -0
  90. package/src/primitive/GlobalInteraction/constants.ts +24 -0
  91. package/src/primitive/GlobalInteraction/dom.ts +211 -0
  92. package/src/primitive/GlobalInteraction/useGlobalInteraction.ts +302 -129
  93. 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,109 +1,93 @@
1
- 'use client';
2
- 'use strict';
3
-
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
-
6
- const jsxRuntime = require('react/jsx-runtime');
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');
10
- const domUtils = require('@seed-design/dom-utils');
11
- const reactPrimitive = require('@seed-design/react-primitive');
12
- const clsx = require('clsx');
13
- const React = require('react');
14
- const AppBar = require('../../primitive/AppBar/AppBar.cjs');
15
- const useAppBarContext = require('../../primitive/AppBar/useAppBarContext.cjs');
16
- const createStyleContext = require('../../utils/createStyleContext.cjs');
17
- const useTopActivity = require('../../primitive/private/useTopActivity.cjs');
18
- const react = require('@stackflow/react');
19
- const styled = require('../../utils/styled.cjs');
20
-
21
- const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext.createStyleContext(appBar.appBar);
22
- const {
23
- PropsProvider: MainPropsProvider,
24
- withProvider: withMainProvider,
25
- withContext: withMainContext
26
- } = createStyleContext.createStyleContext(appBarMain.appBarMain);
27
- const AppBarPropsProvider = PropsProvider;
28
- const AppBarRoot = React.forwardRef((props, ref) => {
29
- const { style: boxStyle, restProps: propsWithoutBoxProps } = styled.useBoxBackgroundProps(props);
30
- const contextProps = useProps();
31
- const [variantProps, otherProps] = appBar.appBar.splitVariantProps({
32
- ...contextProps,
33
- ...propsWithoutBoxProps
34
- });
35
- const topActivityTransitionStyle = useTopActivity.useTopActivity().transitionStyle;
36
- const resolvedVariantProps = {
37
- // this includes the default transitionStyle decided by theme, from contextProps or props
38
- ...variantProps,
39
- ...react.useActivity().isTop === false && {
40
- transitionStyle: topActivityTransitionStyle
41
- }
42
- };
43
- const classNames = appBar.appBar(resolvedVariantProps);
44
- return /* @__PURE__ */ jsxRuntime.jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsxRuntime.jsx(MainPropsProvider, { value: resolvedVariantProps, children: /* @__PURE__ */ jsxRuntime.jsx(
45
- AppBar.AppBarRoot,
46
- {
47
- ref,
48
- ...domUtils.mergeProps({ className: classNames.root, style: boxStyle }, otherProps)
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
- const AppBarLeft = withContext(
54
- AppBar.AppBarLeft,
55
- "left"
56
- );
57
- const AppBarRight = withContext(
58
- AppBar.AppBarRight,
59
- "right"
60
- );
61
- const AppBarMain = withMainProvider(
62
- AppBar.AppBarMain,
63
- "root"
64
- );
65
- const AppBarTitle = withMainContext(
66
- reactPrimitive.Primitive.span,
67
- "title"
68
- );
69
- const AppBarSubtitle = withMainContext(
70
- reactPrimitive.Primitive.span,
71
- "subtitle"
72
- );
73
- const AppBarIconButton = React.forwardRef(
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
- const AppBarSlot = React.forwardRef(
91
- ({ children, className, ...otherProps }, ref) => {
92
- const { stateProps } = useAppBarContext.useAppBarContext();
93
- const classNames = useClassNames();
94
- return /* @__PURE__ */ jsxRuntime.jsx(
95
- reactSlot.Slot,
96
- {
97
- ref,
98
- className: clsx(classNames.custom, className),
99
- ...domUtils.mergeProps(stateProps, otherProps),
100
- children
101
- }
102
- );
103
- }
104
- );
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
+ });
105
89
  AppBarSlot.displayName = "AppBarSlot";
106
-
90
+ //#endregion
107
91
  exports.AppBarIconButton = AppBarIconButton;
108
92
  exports.AppBarLeft = AppBarLeft;
109
93
  exports.AppBarMain = AppBarMain;
@@ -1,103 +1,89 @@
1
- 'use client';
2
- import { jsx } from 'react/jsx-runtime';
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';
6
- import { mergeProps } from '@seed-design/dom-utils';
7
- import { Primitive } from '@seed-design/react-primitive';
8
- import clsx from 'clsx';
9
- import { forwardRef } from 'react';
10
- import { AppBarLeft as AppBarLeft$1, AppBarMain as AppBarMain$1, AppBarRight as AppBarRight$1, AppBarRoot as AppBarRoot$1 } from '../../primitive/AppBar/AppBar.js';
11
- import { useAppBarContext } from '../../primitive/AppBar/useAppBarContext.js';
12
- import { createStyleContext } from '../../utils/createStyleContext.js';
13
- import { useTopActivity } from '../../primitive/private/useTopActivity.js';
14
- import { useActivity } from '@stackflow/react';
15
- import { useBoxBackgroundProps } from '../../utils/styled.js';
16
-
17
- const { PropsProvider, ClassNamesProvider, useProps, withContext, useClassNames } = createStyleContext(appBar);
18
- const {
19
- PropsProvider: MainPropsProvider,
20
- withProvider: withMainProvider,
21
- withContext: withMainContext
22
- } = createStyleContext(appBarMain);
23
- const AppBarPropsProvider = PropsProvider;
24
- const AppBarRoot = forwardRef((props, ref) => {
25
- const { style: boxStyle, restProps: propsWithoutBoxProps } = useBoxBackgroundProps(props);
26
- const contextProps = useProps();
27
- const [variantProps, otherProps] = appBar.splitVariantProps({
28
- ...contextProps,
29
- ...propsWithoutBoxProps
30
- });
31
- const topActivityTransitionStyle = useTopActivity().transitionStyle;
32
- const resolvedVariantProps = {
33
- // this includes the default transitionStyle decided by theme, from contextProps or props
34
- ...variantProps,
35
- ...useActivity().isTop === false && {
36
- transitionStyle: topActivityTransitionStyle
37
- }
38
- };
39
- const classNames = appBar(resolvedVariantProps);
40
- return /* @__PURE__ */ jsx(ClassNamesProvider, { value: classNames, children: /* @__PURE__ */ jsx(MainPropsProvider, { value: resolvedVariantProps, children: /* @__PURE__ */ jsx(
41
- AppBarRoot$1,
42
- {
43
- ref,
44
- ...mergeProps({ className: classNames.root, style: boxStyle }, otherProps)
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
- const AppBarLeft = withContext(
50
- AppBarLeft$1,
51
- "left"
52
- );
53
- const AppBarRight = withContext(
54
- AppBarRight$1,
55
- "right"
56
- );
57
- const AppBarMain = withMainProvider(
58
- AppBarMain$1,
59
- "root"
60
- );
61
- const AppBarTitle = withMainContext(
62
- Primitive.span,
63
- "title"
64
- );
65
- const AppBarSubtitle = withMainContext(
66
- Primitive.span,
67
- "subtitle"
68
- );
69
- const AppBarIconButton = forwardRef(
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
- const AppBarSlot = forwardRef(
87
- ({ children, className, ...otherProps }, ref) => {
88
- const { stateProps } = useAppBarContext();
89
- const classNames = useClassNames();
90
- return /* @__PURE__ */ jsx(
91
- Slot,
92
- {
93
- ref,
94
- className: clsx(classNames.custom, className),
95
- ...mergeProps(stateProps, otherProps),
96
- children
97
- }
98
- );
99
- }
100
- );
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
+ });
101
87
  AppBarSlot.displayName = "AppBarSlot";
102
-
88
+ //#endregion
103
89
  export { AppBarIconButton, AppBarLeft, AppBarMain, AppBarPropsProvider, AppBarRight, AppBarRoot, AppBarSlot, AppBarSubtitle, AppBarTitle };
@@ -1,16 +1,20 @@
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.Slot = AppBar.AppBarSlot;
15
- exports.Subtitle = AppBar.AppBarSubtitle;
16
- exports.Title = AppBar.AppBarTitle;
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 +1,15 @@
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.js';
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,18 +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.AppBarSlot = AppBar.AppBarSlot;
16
- exports.AppBarSubtitle = AppBar.AppBarSubtitle;
17
- exports.AppBarTitle = AppBar.AppBarTitle;
18
- exports.AppBar = AppBar_namespace;
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, AppBarSlot, AppBarSubtitle, AppBarTitle } from './AppBar.js';
2
- import * as AppBar_namespace from './AppBar.namespace.js';
3
- export { AppBar_namespace as AppBar };
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 };