@stackflow/plugin-basic-ui 0.21.4-alpha.4 → 1.0.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/README.md +1 -1
- package/dist/assets/IconBack.d.ts +1 -1
- package/dist/assets/IconClose.d.ts +1 -1
- package/dist/basicUIPlugin.d.ts +2 -2
- package/dist/components/AppBar.d.ts +3 -3
- package/dist/components/AppScreen.d.ts +2 -2
- package/dist/components/BottomSheet.d.ts +1 -1
- package/dist/components/Modal.d.ts +1 -1
- package/dist/hooks/useMaxWidth.d.ts +1 -1
- package/dist/hooks/useStyleEffect.d.ts +1 -1
- package/dist/hooks/useStyleEffectHide.d.ts +1 -1
- package/dist/index.css +9 -5
- package/dist/index.css.map +3 -3
- package/dist/index.js +311 -254
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +289 -226
- package/dist/index.mjs.map +3 -3
- package/dist/theme.css.d.ts +1 -0
- package/package.json +5 -5
- package/src/assets/IconBack.tsx +0 -2
- package/src/assets/IconClose.tsx +0 -2
- package/src/basicUIPlugin.tsx +5 -1
- package/src/components/AppBar.tsx +2 -2
- package/src/components/AppScreen.tsx +6 -3
- package/src/components/BottomSheet.tsx +2 -2
- package/src/components/Modal.tsx +2 -2
- package/src/hooks/useMaxWidth.ts +0 -1
- package/src/hooks/useStyleEffect.ts +0 -1
- package/src/hooks/useStyleEffectHide.ts +0 -2
- package/src/hooks/useStyleEffectOffset.ts +2 -1
- package/src/hooks/useStyleEffectSwipeBack.ts +4 -4
- package/src/theme.css.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __defProps = Object.defineProperties;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
9
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
10
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -34,10 +32,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
34
32
|
}
|
|
35
33
|
return to;
|
|
36
34
|
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
39
|
-
mod
|
|
40
|
-
));
|
|
41
35
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
42
36
|
|
|
43
37
|
// src/index.ts
|
|
@@ -54,7 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
54
48
|
|
|
55
49
|
// src/basicUIPlugin.tsx
|
|
56
50
|
var import_dynamic = require("@vanilla-extract/dynamic");
|
|
57
|
-
var import_react =
|
|
51
|
+
var import_react = require("react");
|
|
58
52
|
|
|
59
53
|
// src/theme.css.ts
|
|
60
54
|
var theme_css_exports = {};
|
|
@@ -67,7 +61,7 @@ __export(theme_css_exports, {
|
|
|
67
61
|
});
|
|
68
62
|
var android = "theme__1coppmz0";
|
|
69
63
|
var cupertino = "theme__1coppmz1";
|
|
70
|
-
var globalVars = { backgroundColor: "var(--stackflow-plugin-basic-ui-background-color)", dimBackgroundColor: "var(--stackflow-plugin-basic-ui-dim-background-color)", appBar: { borderColor: "var(--stackflow-plugin-basic-ui-app-bar-border-color)", borderSize: "var(--stackflow-plugin-basic-ui-app-bar-border-size)", height: "var(--stackflow-plugin-basic-ui-app-bar-height)", heightTransitionDuration: "var(--stackflow-plugin-basic-ui-app-bar-height-transition-duration)", minHeight: "var(--stackflow-plugin-basic-ui-app-bar-min-height)", iconColor: "var(--stackflow-plugin-basic-ui-app-bar-icon-color)", textColor: "var(--stackflow-plugin-basic-ui-app-bar-text-color)", backgroundColor: "var(--stackflow-plugin-basic-ui-app-bar-background-color)", overflow: "var(--stackflow-plugin-basic-ui-app-bar-overflow)" }, bottomSheet: { borderRadius: "var(--stackflow-plugin-basic-ui-bottom-sheet-border-radius)" }, modal: { borderRadius: "var(--stackflow-plugin-basic-ui-bottom-sheet-border-radius)" } };
|
|
64
|
+
var globalVars = { backgroundColor: "var(--stackflow-plugin-basic-ui-background-color)", dimBackgroundColor: "var(--stackflow-plugin-basic-ui-dim-background-color)", transitionDuration: "var(--stackflow-plugin-basic-ui-transition-duration)", appBar: { borderColor: "var(--stackflow-plugin-basic-ui-app-bar-border-color)", borderSize: "var(--stackflow-plugin-basic-ui-app-bar-border-size)", height: "var(--stackflow-plugin-basic-ui-app-bar-height)", heightTransitionDuration: "var(--stackflow-plugin-basic-ui-app-bar-height-transition-duration)", minHeight: "var(--stackflow-plugin-basic-ui-app-bar-min-height)", iconColor: "var(--stackflow-plugin-basic-ui-app-bar-icon-color)", textColor: "var(--stackflow-plugin-basic-ui-app-bar-text-color)", backgroundColor: "var(--stackflow-plugin-basic-ui-app-bar-background-color)", overflow: "var(--stackflow-plugin-basic-ui-app-bar-overflow)" }, bottomSheet: { borderRadius: "var(--stackflow-plugin-basic-ui-bottom-sheet-border-radius)" }, modal: { borderRadius: "var(--stackflow-plugin-basic-ui-bottom-sheet-border-radius)" } };
|
|
71
65
|
var rootAndroid = ":root[data-stackflow-plugin-basic-ui-theme=android]";
|
|
72
66
|
var rootCupertino = ":root[data-stackflow-plugin-basic-ui-theme=cupertino]";
|
|
73
67
|
|
|
@@ -130,6 +124,7 @@ function requestNextFrame(cb) {
|
|
|
130
124
|
}
|
|
131
125
|
|
|
132
126
|
// src/basicUIPlugin.tsx
|
|
127
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
133
128
|
var GlobalOptionsContext = (0, import_react.createContext)({
|
|
134
129
|
theme: "android"
|
|
135
130
|
});
|
|
@@ -141,31 +136,34 @@ var basicUIPlugin = (options) => () => ({
|
|
|
141
136
|
key: "basic-ui",
|
|
142
137
|
wrapStack({ stack }) {
|
|
143
138
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
144
|
-
return /* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GlobalOptionsProvider, { value: options, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
"div",
|
|
141
|
+
{
|
|
142
|
+
className: isBrowser() ? compact([theme_css_exports[options.theme], options.rootClassName]).join(" ") : options.rootClassName,
|
|
143
|
+
style: (0, import_dynamic.assignInlineVars)(
|
|
144
|
+
compactMap({
|
|
145
|
+
[globalVars.backgroundColor]: options.backgroundColor,
|
|
146
|
+
[globalVars.dimBackgroundColor]: options.dimBackgroundColor,
|
|
147
|
+
[globalVars.transitionDuration]: stack.globalTransitionState === "loading" ? `${stack.transitionDuration}ms` : "0ms",
|
|
148
|
+
[globalVars.appBar.borderColor]: (_a = options.appBar) == null ? void 0 : _a.borderColor,
|
|
149
|
+
[globalVars.appBar.borderSize]: (_b = options.appBar) == null ? void 0 : _b.borderSize,
|
|
150
|
+
[globalVars.appBar.height]: (_c = options.appBar) == null ? void 0 : _c.height,
|
|
151
|
+
[globalVars.appBar.iconColor]: (_d = options.appBar) == null ? void 0 : _d.iconColor,
|
|
152
|
+
[globalVars.appBar.textColor]: (_e = options.appBar) == null ? void 0 : _e.textColor,
|
|
153
|
+
[globalVars.bottomSheet.borderRadius]: (_f = options.bottomSheet) == null ? void 0 : _f.borderRadius,
|
|
154
|
+
[globalVars.modal.borderRadius]: (_g = options.modal) == null ? void 0 : _g.borderRadius
|
|
155
|
+
})
|
|
156
|
+
),
|
|
157
|
+
children: stack.render()
|
|
158
|
+
}
|
|
159
|
+
) });
|
|
162
160
|
}
|
|
163
161
|
});
|
|
164
162
|
|
|
165
163
|
// src/components/AppScreen.tsx
|
|
166
|
-
var
|
|
164
|
+
var import_react8 = require("@stackflow/react");
|
|
167
165
|
var import_dynamic3 = require("@vanilla-extract/dynamic");
|
|
168
|
-
var
|
|
166
|
+
var import_react9 = require("react");
|
|
169
167
|
|
|
170
168
|
// src/hooks/useLazy.tsx
|
|
171
169
|
var import_react2 = require("react");
|
|
@@ -343,7 +341,7 @@ function useStyleEffectOffset({
|
|
|
343
341
|
if (!ref.current) {
|
|
344
342
|
return;
|
|
345
343
|
}
|
|
346
|
-
ref.current.style.transition =
|
|
344
|
+
ref.current.style.transition = globalVars.transitionDuration;
|
|
347
345
|
ref.current.style.transform = transform;
|
|
348
346
|
});
|
|
349
347
|
switch (activityTransitionState) {
|
|
@@ -434,15 +432,15 @@ function useStyleEffectSwipeBack({
|
|
|
434
432
|
return new Promise((resolve) => {
|
|
435
433
|
requestAnimationFrame(() => {
|
|
436
434
|
$dim.style.opacity = `${swiped ? 0 : 1}`;
|
|
437
|
-
$dim.style.transition =
|
|
435
|
+
$dim.style.transition = globalVars.transitionDuration;
|
|
438
436
|
$paper.style.overflowY = "hidden";
|
|
439
437
|
$paper.style.transform = `translateX(${swiped ? "100%" : "0"})`;
|
|
440
|
-
$paper.style.transition =
|
|
438
|
+
$paper.style.transition = globalVars.transitionDuration;
|
|
441
439
|
refs.forEach((ref) => {
|
|
442
440
|
if (!ref.current) {
|
|
443
441
|
return;
|
|
444
442
|
}
|
|
445
|
-
ref.current.style.transition =
|
|
443
|
+
ref.current.style.transition = globalVars.transitionDuration;
|
|
446
444
|
ref.current.style.transform = `translate3d(${swiped ? "0" : `-${OFFSET_PX_CUPERTINO / 16}rem`}, 0, 0)`;
|
|
447
445
|
});
|
|
448
446
|
const _cachedRefs = [...cachedRefs];
|
|
@@ -539,41 +537,61 @@ function useStyleEffectSwipeBack({
|
|
|
539
537
|
}
|
|
540
538
|
|
|
541
539
|
// src/components/AppBar.tsx
|
|
542
|
-
var
|
|
540
|
+
var import_react6 = require("@stackflow/react");
|
|
543
541
|
var import_dynamic2 = require("@vanilla-extract/dynamic");
|
|
544
|
-
var
|
|
542
|
+
var import_react7 = require("react");
|
|
545
543
|
|
|
546
544
|
// src/assets/IconBack.tsx
|
|
547
|
-
var
|
|
548
|
-
var IconBack = (props) => /* @__PURE__ */
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
545
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
546
|
+
var IconBack = (props) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
547
|
+
"svg",
|
|
548
|
+
{
|
|
549
|
+
className: props.className,
|
|
550
|
+
width: "24",
|
|
551
|
+
height: "24",
|
|
552
|
+
viewBox: "0 0 24 24",
|
|
553
|
+
fill: "none",
|
|
554
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
556
|
+
"path",
|
|
557
|
+
{
|
|
558
|
+
d: "M11.5659 5.56564C11.8783 5.25322 11.8783 4.74669 11.5659 4.43427C11.2535 4.12185 10.7469 4.12185 10.4345 4.43427L3.43451 11.4343C3.12209 11.7467 3.12209 12.2532 3.43451 12.5656L10.4345 19.5656C10.7469 19.8781 11.2535 19.8781 11.5659 19.5656C11.8783 19.2532 11.8783 18.7467 11.5659 18.4343L5.93157 12.8H20.0002C20.442 12.8 20.8002 12.4418 20.8002 12C20.8002 11.5581 20.442 11.2 20.0002 11.2H5.93157L11.5659 5.56564Z",
|
|
559
|
+
fill: "currentColor"
|
|
560
|
+
}
|
|
561
|
+
)
|
|
562
|
+
}
|
|
563
|
+
);
|
|
559
564
|
var IconBack_default = IconBack;
|
|
560
565
|
|
|
561
566
|
// src/assets/IconClose.tsx
|
|
562
|
-
var
|
|
563
|
-
var IconClose = (props) => /* @__PURE__ */
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
567
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
568
|
+
var IconClose = (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
569
|
+
"svg",
|
|
570
|
+
{
|
|
571
|
+
className: props.className,
|
|
572
|
+
width: "24",
|
|
573
|
+
height: "24",
|
|
574
|
+
viewBox: "0 0 24 24",
|
|
575
|
+
fill: "none",
|
|
576
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
577
|
+
children: [
|
|
578
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
579
|
+
"path",
|
|
580
|
+
{
|
|
581
|
+
d: "M6.56588 5.43433C6.25346 5.12191 5.74693 5.12191 5.43451 5.43433C5.12209 5.74675 5.12209 6.25328 5.43451 6.5657L10.8688 12L5.43451 17.4343C5.12209 17.7467 5.12209 18.2533 5.43451 18.5657C5.74693 18.8781 6.25346 18.8781 6.56588 18.5657L12.0002 13.1314L17.4345 18.5657C17.7469 18.8781 18.2535 18.8781 18.5659 18.5657C18.8783 18.2533 18.8783 17.7467 18.5659 17.4343L13.1316 12L18.5659 6.5657C18.8783 6.25328 18.8783 5.74675 18.5659 5.43433C18.2535 5.12191 17.7469 5.12191 17.4345 5.43433L12.0002 10.8686L6.56588 5.43433Z",
|
|
582
|
+
fill: "currentColor"
|
|
583
|
+
}
|
|
584
|
+
),
|
|
585
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
586
|
+
"path",
|
|
587
|
+
{
|
|
588
|
+
d: "M6.56588 5.43433C6.25346 5.12191 5.74693 5.12191 5.43451 5.43433C5.12209 5.74675 5.12209 6.25328 5.43451 6.5657L10.8688 12L5.43451 17.4343C5.12209 17.7467 5.12209 18.2533 5.43451 18.5657C5.74693 18.8781 6.25346 18.8781 6.56588 18.5657L12.0002 13.1314L17.4345 18.5657C17.7469 18.8781 18.2535 18.8781 18.5659 18.5657C18.8783 18.2533 18.8783 17.7467 18.5659 17.4343L13.1316 12L18.5659 6.5657C18.8783 6.25328 18.8783 5.74675 18.5659 5.43433C18.2535 5.12191 17.7469 5.12191 17.4345 5.43433L12.0002 10.8686L6.56588 5.43433Z",
|
|
589
|
+
fill: "currentColor"
|
|
590
|
+
}
|
|
591
|
+
)
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
);
|
|
577
595
|
var IconClose_default = IconClose;
|
|
578
596
|
|
|
579
597
|
// src/components/AppBar.css.ts
|
|
@@ -599,7 +617,8 @@ var paper = (0, import_createRuntimeFn2.createRuntimeFn)({ defaultClassName: "Ap
|
|
|
599
617
|
var vars = { transitionDuration: "var(--transitionDuration__1dlf4340)", zIndexes: { dim: "var(--zIndexes-dim__1dlf4341)", paper: "var(--zIndexes-paper__1dlf4342)", edge: "var(--zIndexes-edge__1dlf4343)", appBar: "var(--zIndexes-appBar__1dlf4344)" }, appBar: { center: { mainWidth: "var(--appBar-center-mainWidth__1dlf4345)" } } };
|
|
600
618
|
|
|
601
619
|
// src/components/AppBar.tsx
|
|
602
|
-
var
|
|
620
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
621
|
+
var AppBar = (0, import_react7.forwardRef)(
|
|
603
622
|
({
|
|
604
623
|
title,
|
|
605
624
|
appendLeft,
|
|
@@ -620,12 +639,12 @@ var AppBar = import_react9.default.forwardRef(
|
|
|
620
639
|
onTopClick
|
|
621
640
|
}, ref) => {
|
|
622
641
|
var _a, _b;
|
|
623
|
-
const actions = (0,
|
|
642
|
+
const actions = (0, import_react6.useActions)();
|
|
624
643
|
const activity = useNullableActivity();
|
|
625
644
|
const globalOptions = useGlobalOptions();
|
|
626
645
|
const globalCloseButton = (_a = globalOptions.appBar) == null ? void 0 : _a.closeButton;
|
|
627
646
|
const globalBackButton = (_b = globalOptions.appBar) == null ? void 0 : _b.backButton;
|
|
628
|
-
const centerRef = (0,
|
|
647
|
+
const centerRef = (0, import_react7.useRef)(null);
|
|
629
648
|
const { maxWidth } = useMaxWidth({
|
|
630
649
|
outerRef: ref,
|
|
631
650
|
innerRef: centerRef,
|
|
@@ -649,11 +668,15 @@ var AppBar = import_react9.default.forwardRef(
|
|
|
649
668
|
return null;
|
|
650
669
|
}
|
|
651
670
|
if (!backButton2 && !globalBackButton) {
|
|
652
|
-
return /* @__PURE__ */
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
672
|
+
"button",
|
|
673
|
+
{
|
|
674
|
+
type: "button",
|
|
675
|
+
className: backButton,
|
|
676
|
+
onClick: onBackClick,
|
|
677
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconBack_default, {})
|
|
678
|
+
}
|
|
679
|
+
);
|
|
657
680
|
}
|
|
658
681
|
if (backButton2 && "render" in backButton2 && backButton2.render) {
|
|
659
682
|
return (_a2 = backButton2.render) == null ? void 0 : _a2.call(backButton2);
|
|
@@ -661,23 +684,27 @@ var AppBar = import_react9.default.forwardRef(
|
|
|
661
684
|
if (globalBackButton && "render" in globalBackButton && globalBackButton.render) {
|
|
662
685
|
return (_b2 = globalBackButton.render) == null ? void 0 : _b2.call(globalBackButton);
|
|
663
686
|
}
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
688
|
+
"button",
|
|
689
|
+
{
|
|
690
|
+
type: "button",
|
|
691
|
+
className: backButton,
|
|
692
|
+
"aria-label": backButton2 && "ariaLabel" in backButton2 ? backButton2.ariaLabel : globalBackButton && "ariaLabel" in globalBackButton ? globalBackButton.ariaLabel : void 0,
|
|
693
|
+
onClick: onBackClick,
|
|
694
|
+
children: (() => {
|
|
695
|
+
if (backButton2 && "renderIcon" in backButton2 && backButton2.renderIcon) {
|
|
696
|
+
return backButton2.renderIcon();
|
|
697
|
+
}
|
|
698
|
+
if (globalBackButton && "renderIcon" in globalBackButton && globalBackButton.renderIcon) {
|
|
699
|
+
return globalBackButton.renderIcon();
|
|
700
|
+
}
|
|
701
|
+
if (presentModalFullScreen) {
|
|
702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconClose_default, {});
|
|
703
|
+
}
|
|
704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconBack_default, {});
|
|
705
|
+
})()
|
|
678
706
|
}
|
|
679
|
-
|
|
680
|
-
})());
|
|
707
|
+
);
|
|
681
708
|
};
|
|
682
709
|
const onCloseClick = (e) => {
|
|
683
710
|
var _a2;
|
|
@@ -701,73 +728,93 @@ var AppBar = import_react9.default.forwardRef(
|
|
|
701
728
|
if (globalCloseButton && "render" in globalCloseButton && globalCloseButton.render) {
|
|
702
729
|
return globalCloseButton.render();
|
|
703
730
|
}
|
|
704
|
-
return /* @__PURE__ */
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
732
|
+
"button",
|
|
733
|
+
{
|
|
734
|
+
type: "button",
|
|
735
|
+
className: closeButton,
|
|
736
|
+
"aria-label": closeButton2 && "ariaLabel" in closeButton2 ? closeButton2.ariaLabel : globalCloseButton && "ariaLabel" in globalCloseButton ? globalCloseButton.ariaLabel : void 0,
|
|
737
|
+
onClick: onCloseClick,
|
|
738
|
+
children: (() => {
|
|
739
|
+
if (closeButton2 && "renderIcon" in closeButton2 && closeButton2.renderIcon) {
|
|
740
|
+
return closeButton2.renderIcon();
|
|
741
|
+
}
|
|
742
|
+
if (globalCloseButton && "renderIcon" in globalCloseButton && globalCloseButton.renderIcon) {
|
|
743
|
+
return globalCloseButton.renderIcon();
|
|
744
|
+
}
|
|
745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconClose_default, {});
|
|
746
|
+
})()
|
|
715
747
|
}
|
|
716
|
-
|
|
717
|
-
})());
|
|
748
|
+
);
|
|
718
749
|
};
|
|
719
750
|
const hasLeft = !!(closeButtonLocation === "left" && closeButton2 || backButton2 || appendLeft);
|
|
720
|
-
return /* @__PURE__ */
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
752
|
+
"div",
|
|
753
|
+
{
|
|
754
|
+
ref,
|
|
755
|
+
className: appBar({
|
|
756
|
+
border,
|
|
757
|
+
presentModalFullScreen
|
|
758
|
+
}),
|
|
759
|
+
style: (0, import_dynamic2.assignInlineVars)(
|
|
760
|
+
compactMap({
|
|
761
|
+
[globalVars.appBar.iconColor]: iconColor,
|
|
762
|
+
[globalVars.appBar.textColor]: textColor,
|
|
763
|
+
[globalVars.appBar.borderColor]: borderColor,
|
|
764
|
+
[globalVars.appBar.borderSize]: borderSize,
|
|
765
|
+
[globalVars.appBar.height]: height,
|
|
766
|
+
[globalVars.appBar.heightTransitionDuration]: heightTransitionDuration,
|
|
767
|
+
[globalVars.appBar.overflow]: overflow,
|
|
768
|
+
[globalVars.appBar.backgroundColor]: backgroundColor || globalVars.backgroundColor,
|
|
769
|
+
[vars.appBar.center.mainWidth]: `${maxWidth}px`
|
|
770
|
+
})
|
|
771
|
+
),
|
|
772
|
+
children: [
|
|
773
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: safeArea }),
|
|
774
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: container, children: [
|
|
775
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: left, children: [
|
|
776
|
+
closeButtonLocation === "left" && renderCloseButton(),
|
|
777
|
+
renderBackButton(),
|
|
778
|
+
appendLeft == null ? void 0 : appendLeft()
|
|
779
|
+
] }),
|
|
780
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { ref: centerRef, className: center, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
781
|
+
"div",
|
|
782
|
+
{
|
|
783
|
+
className: centerMain({
|
|
784
|
+
hasLeft
|
|
785
|
+
}),
|
|
786
|
+
children: [
|
|
787
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: centerText, children: title }) : title,
|
|
788
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
789
|
+
"button",
|
|
790
|
+
{
|
|
791
|
+
className: centerMainEdge,
|
|
792
|
+
type: "button",
|
|
793
|
+
"aria-hidden": "true",
|
|
794
|
+
onClick: onTopClick
|
|
795
|
+
}
|
|
796
|
+
)
|
|
797
|
+
]
|
|
798
|
+
}
|
|
799
|
+
) }),
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: right, children: [
|
|
801
|
+
appendRight == null ? void 0 : appendRight(),
|
|
802
|
+
closeButtonLocation === "right" && renderCloseButton()
|
|
803
|
+
] })
|
|
804
|
+
] })
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
);
|
|
762
808
|
}
|
|
763
809
|
);
|
|
764
810
|
AppBar.displayName = "AppBar";
|
|
765
811
|
var AppBar_default = AppBar;
|
|
766
812
|
|
|
767
813
|
// src/components/AppScreen.tsx
|
|
768
|
-
var
|
|
814
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
815
|
+
var Context = (0, import_react9.createContext)(null);
|
|
769
816
|
function useAppScreen() {
|
|
770
|
-
return (0,
|
|
817
|
+
return (0, import_react9.useContext)(Context);
|
|
771
818
|
}
|
|
772
819
|
var AppScreen = ({
|
|
773
820
|
backgroundColor,
|
|
@@ -780,12 +827,12 @@ var AppScreen = ({
|
|
|
780
827
|
var _a, _b;
|
|
781
828
|
const globalOptions = useGlobalOptions();
|
|
782
829
|
const activity = useNullableActivity();
|
|
783
|
-
const { pop } = (0,
|
|
784
|
-
const appScreenRef = (0,
|
|
785
|
-
const dimRef = (0,
|
|
786
|
-
const paperRef = (0,
|
|
787
|
-
const edgeRef = (0,
|
|
788
|
-
const appBarRef = (0,
|
|
830
|
+
const { pop } = (0, import_react8.useActions)();
|
|
831
|
+
const appScreenRef = (0, import_react9.useRef)(null);
|
|
832
|
+
const dimRef = (0, import_react9.useRef)(null);
|
|
833
|
+
const paperRef = (0, import_react9.useRef)(null);
|
|
834
|
+
const edgeRef = (0, import_react9.useRef)(null);
|
|
835
|
+
const appBarRef = (0, import_react9.useRef)(null);
|
|
789
836
|
const presentModalFullScreen = modalPresentationStyle === "fullScreen";
|
|
790
837
|
const swipeBackPrevented = preventSwipeBack || presentModalFullScreen;
|
|
791
838
|
useStyleEffectHide({
|
|
@@ -826,63 +873,77 @@ var AppScreen = ({
|
|
|
826
873
|
});
|
|
827
874
|
}
|
|
828
875
|
};
|
|
829
|
-
return /* @__PURE__ */
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
(
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
877
|
+
Context.Provider,
|
|
878
|
+
{
|
|
879
|
+
value: (0, import_react9.useMemo)(
|
|
880
|
+
() => ({
|
|
881
|
+
scroll({ top }) {
|
|
882
|
+
var _a2;
|
|
883
|
+
(_a2 = paperRef == null ? void 0 : paperRef.current) == null ? void 0 : _a2.scroll({
|
|
884
|
+
top,
|
|
885
|
+
behavior: "smooth"
|
|
886
|
+
});
|
|
887
|
+
}
|
|
888
|
+
}),
|
|
889
|
+
[paperRef]
|
|
890
|
+
),
|
|
891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
892
|
+
"div",
|
|
893
|
+
{
|
|
894
|
+
ref: appScreenRef,
|
|
895
|
+
className: appScreen({
|
|
896
|
+
transitionState: transitionState === "enter-done" || transitionState === "exit-done" ? transitionState : lazyTransitionState
|
|
897
|
+
}),
|
|
898
|
+
style: (0, import_dynamic3.assignInlineVars)(
|
|
899
|
+
compactMap({
|
|
900
|
+
[globalVars.backgroundColor]: backgroundColor,
|
|
901
|
+
[globalVars.dimBackgroundColor]: dimBackgroundColor,
|
|
902
|
+
[globalVars.appBar.height]: appBar2 == null ? void 0 : appBar2.height,
|
|
903
|
+
[globalVars.appBar.heightTransitionDuration]: appBar2 == null ? void 0 : appBar2.heightTransitionDuration,
|
|
904
|
+
[vars.zIndexes.dim]: `${zIndexDim}`,
|
|
905
|
+
[vars.zIndexes.paper]: `${zIndexPaper}`,
|
|
906
|
+
[vars.zIndexes.edge]: `${zIndexEdge}`,
|
|
907
|
+
[vars.zIndexes.appBar]: `${zIndexAppBar}`,
|
|
908
|
+
[vars.transitionDuration]: transitionState === "enter-active" || transitionState === "exit-active" ? globalVars.transitionDuration : "0ms"
|
|
909
|
+
})
|
|
910
|
+
),
|
|
911
|
+
children: [
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: dim, ref: dimRef }),
|
|
913
|
+
appBar2 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
914
|
+
AppBar_default,
|
|
915
|
+
__spreadProps(__spreadValues({}, appBar2), {
|
|
916
|
+
ref: appBarRef,
|
|
917
|
+
modalPresentationStyle,
|
|
918
|
+
onTopClick: onAppBarTopClick
|
|
919
|
+
})
|
|
920
|
+
),
|
|
921
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
922
|
+
"div",
|
|
923
|
+
{
|
|
924
|
+
className: paper({
|
|
925
|
+
hasAppBar,
|
|
926
|
+
presentModalFullScreen
|
|
927
|
+
}),
|
|
928
|
+
ref: paperRef,
|
|
929
|
+
children
|
|
930
|
+
},
|
|
931
|
+
activity == null ? void 0 : activity.id
|
|
932
|
+
),
|
|
933
|
+
!(activity == null ? void 0 : activity.isRoot) && globalOptions.theme === "cupertino" && !swipeBackPrevented && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: edge({ hasAppBar }), ref: edgeRef })
|
|
934
|
+
]
|
|
838
935
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
}, /* @__PURE__ */ import_react11.default.createElement("div", {
|
|
843
|
-
ref: appScreenRef,
|
|
844
|
-
className: appScreen({
|
|
845
|
-
transitionState: transitionState === "enter-done" || transitionState === "exit-done" ? transitionState : lazyTransitionState
|
|
846
|
-
}),
|
|
847
|
-
style: (0, import_dynamic3.assignInlineVars)(
|
|
848
|
-
compactMap({
|
|
849
|
-
[globalVars.backgroundColor]: backgroundColor,
|
|
850
|
-
[globalVars.dimBackgroundColor]: dimBackgroundColor,
|
|
851
|
-
[globalVars.appBar.height]: appBar2 == null ? void 0 : appBar2.height,
|
|
852
|
-
[globalVars.appBar.heightTransitionDuration]: appBar2 == null ? void 0 : appBar2.heightTransitionDuration,
|
|
853
|
-
[vars.zIndexes.dim]: `${zIndexDim}`,
|
|
854
|
-
[vars.zIndexes.paper]: `${zIndexPaper}`,
|
|
855
|
-
[vars.zIndexes.edge]: `${zIndexEdge}`,
|
|
856
|
-
[vars.zIndexes.appBar]: `${zIndexAppBar}`,
|
|
857
|
-
[vars.transitionDuration]: transitionState === "enter-active" || transitionState === "exit-active" ? `var(--stackflow-transition-duration)` : "0ms"
|
|
858
|
-
})
|
|
859
|
-
)
|
|
860
|
-
}, /* @__PURE__ */ import_react11.default.createElement("div", {
|
|
861
|
-
className: dim,
|
|
862
|
-
ref: dimRef
|
|
863
|
-
}), appBar2 && /* @__PURE__ */ import_react11.default.createElement(AppBar_default, __spreadProps(__spreadValues({}, appBar2), {
|
|
864
|
-
ref: appBarRef,
|
|
865
|
-
modalPresentationStyle,
|
|
866
|
-
onTopClick: onAppBarTopClick
|
|
867
|
-
})), /* @__PURE__ */ import_react11.default.createElement("div", {
|
|
868
|
-
key: activity == null ? void 0 : activity.id,
|
|
869
|
-
className: paper({
|
|
870
|
-
hasAppBar,
|
|
871
|
-
presentModalFullScreen
|
|
872
|
-
}),
|
|
873
|
-
ref: paperRef
|
|
874
|
-
}, children), !(activity == null ? void 0 : activity.isRoot) && globalOptions.theme === "cupertino" && !swipeBackPrevented && /* @__PURE__ */ import_react11.default.createElement("div", {
|
|
875
|
-
className: edge({ hasAppBar }),
|
|
876
|
-
ref: edgeRef
|
|
877
|
-
})));
|
|
936
|
+
)
|
|
937
|
+
}
|
|
938
|
+
);
|
|
878
939
|
};
|
|
879
940
|
AppScreen.displayName = "AppScreen";
|
|
880
941
|
var AppScreen_default = AppScreen;
|
|
881
942
|
|
|
882
943
|
// src/components/BottomSheet.tsx
|
|
883
|
-
var
|
|
944
|
+
var import_react10 = require("@stackflow/react");
|
|
884
945
|
var import_dynamic4 = require("@vanilla-extract/dynamic");
|
|
885
|
-
var
|
|
946
|
+
var import_react11 = require("react");
|
|
886
947
|
|
|
887
948
|
// src/components/BottomSheet.css.ts
|
|
888
949
|
var import_createRuntimeFn3 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -892,6 +953,7 @@ var paper2 = "BottomSheet__1ht38h0e f__dhthxqc BottomSheet__1ht38h03";
|
|
|
892
953
|
var vars2 = { transitionDuration: "var(--transitionDuration__1ht38h00)", zIndexes: { dim: "var(--zIndexes-dim__1ht38h01)", paper: "var(--zIndexes-paper__1ht38h02)" } };
|
|
893
954
|
|
|
894
955
|
// src/components/BottomSheet.tsx
|
|
956
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
895
957
|
var BottomSheet = ({
|
|
896
958
|
borderRadius = "1rem",
|
|
897
959
|
backgroundColor,
|
|
@@ -901,9 +963,9 @@ var BottomSheet = ({
|
|
|
901
963
|
}) => {
|
|
902
964
|
var _a, _b, _c;
|
|
903
965
|
const activity = useNullableActivity();
|
|
904
|
-
const { pop } = (0,
|
|
905
|
-
const containerRef = (0,
|
|
906
|
-
const paperRef = (0,
|
|
966
|
+
const { pop } = (0, import_react10.useActions)();
|
|
967
|
+
const containerRef = (0, import_react11.useRef)(null);
|
|
968
|
+
const paperRef = (0, import_react11.useRef)(null);
|
|
907
969
|
useStyleEffect({
|
|
908
970
|
styleName: "hide",
|
|
909
971
|
refs: [containerRef]
|
|
@@ -916,7 +978,7 @@ var BottomSheet = ({
|
|
|
916
978
|
styleName: "swipe-back",
|
|
917
979
|
refs: [paperRef]
|
|
918
980
|
});
|
|
919
|
-
const popLock = (0,
|
|
981
|
+
const popLock = (0, import_react11.useRef)(false);
|
|
920
982
|
const onDimClick = (e) => {
|
|
921
983
|
onOutsideClick == null ? void 0 : onOutsideClick(e);
|
|
922
984
|
if (e.defaultPrevented) {
|
|
@@ -934,37 +996,34 @@ var BottomSheet = ({
|
|
|
934
996
|
const zIndexBase = ((_a = activity == null ? void 0 : activity.zIndex) != null ? _a : 0) * 5 + 3;
|
|
935
997
|
const zIndexPaper = ((_b = activity == null ? void 0 : activity.zIndex) != null ? _b : 0) * 5 + 4;
|
|
936
998
|
const transitionState = (_c = activity == null ? void 0 : activity.transitionState) != null ? _c : "enter-done";
|
|
937
|
-
return /* @__PURE__ */
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
className: paper2,
|
|
958
|
-
onClick: onPaperClick
|
|
959
|
-
}, children)));
|
|
999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1000
|
+
"div",
|
|
1001
|
+
{
|
|
1002
|
+
className: container2({
|
|
1003
|
+
transitionState: useLazy(transitionState)
|
|
1004
|
+
}),
|
|
1005
|
+
ref: containerRef,
|
|
1006
|
+
style: (0, import_dynamic4.assignInlineVars)(
|
|
1007
|
+
compactMap({
|
|
1008
|
+
[globalVars.bottomSheet.borderRadius]: borderRadius,
|
|
1009
|
+
[globalVars.backgroundColor]: backgroundColor,
|
|
1010
|
+
[globalVars.dimBackgroundColor]: dimBackgroundColor,
|
|
1011
|
+
[vars2.zIndexes.dim]: `${zIndexBase}`,
|
|
1012
|
+
[vars2.zIndexes.paper]: `${zIndexPaper}`,
|
|
1013
|
+
[vars2.transitionDuration]: transitionState === "enter-active" || transitionState === "exit-active" ? globalVars.transitionDuration : "0ms"
|
|
1014
|
+
})
|
|
1015
|
+
),
|
|
1016
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: dim2, ref: paperRef, onClick: onDimClick, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: paper2, onClick: onPaperClick, children }) })
|
|
1017
|
+
}
|
|
1018
|
+
);
|
|
960
1019
|
};
|
|
961
1020
|
BottomSheet.displayName = "BottomSheet";
|
|
962
1021
|
var BottomSheet_default = BottomSheet;
|
|
963
1022
|
|
|
964
1023
|
// src/components/Modal.tsx
|
|
965
|
-
var
|
|
1024
|
+
var import_react12 = require("@stackflow/react");
|
|
966
1025
|
var import_dynamic5 = require("@vanilla-extract/dynamic");
|
|
967
|
-
var
|
|
1026
|
+
var import_react13 = require("react");
|
|
968
1027
|
|
|
969
1028
|
// src/components/Modal.css.ts
|
|
970
1029
|
var import_createRuntimeFn4 = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
@@ -974,6 +1033,7 @@ var paper3 = "Modal__5ozg8ce f__dhthxqc Modal__5ozg8c3";
|
|
|
974
1033
|
var vars3 = { transitionDuration: "var(--transitionDuration__5ozg8c0)", zIndexes: { dim: "var(--zIndexes-dim__5ozg8c1)", paper: "var(--zIndexes-paper__5ozg8c2)" } };
|
|
975
1034
|
|
|
976
1035
|
// src/components/Modal.tsx
|
|
1036
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
977
1037
|
var Modal = ({
|
|
978
1038
|
backgroundColor,
|
|
979
1039
|
dimBackgroundColor,
|
|
@@ -983,9 +1043,9 @@ var Modal = ({
|
|
|
983
1043
|
}) => {
|
|
984
1044
|
var _a, _b, _c;
|
|
985
1045
|
const activity = useNullableActivity();
|
|
986
|
-
const { pop } = (0,
|
|
987
|
-
const containerRef = (0,
|
|
988
|
-
const paperRef = (0,
|
|
1046
|
+
const { pop } = (0, import_react12.useActions)();
|
|
1047
|
+
const containerRef = (0, import_react13.useRef)(null);
|
|
1048
|
+
const paperRef = (0, import_react13.useRef)(null);
|
|
989
1049
|
useStyleEffect({
|
|
990
1050
|
styleName: "hide",
|
|
991
1051
|
refs: [containerRef]
|
|
@@ -998,7 +1058,7 @@ var Modal = ({
|
|
|
998
1058
|
styleName: "swipe-back",
|
|
999
1059
|
refs: [paperRef]
|
|
1000
1060
|
});
|
|
1001
|
-
const popLock = (0,
|
|
1061
|
+
const popLock = (0, import_react13.useRef)(false);
|
|
1002
1062
|
const onDimClick = (e) => {
|
|
1003
1063
|
onOutsideClick == null ? void 0 : onOutsideClick(e);
|
|
1004
1064
|
if (e.defaultPrevented) {
|
|
@@ -1016,29 +1076,26 @@ var Modal = ({
|
|
|
1016
1076
|
const zIndexBase = ((_a = activity == null ? void 0 : activity.zIndex) != null ? _a : 0) * 5 + 3;
|
|
1017
1077
|
const zIndexPaper = ((_b = activity == null ? void 0 : activity.zIndex) != null ? _b : 0) * 5 + 4;
|
|
1018
1078
|
const transitionState = (_c = activity == null ? void 0 : activity.transitionState) != null ? _c : "enter-done";
|
|
1019
|
-
return /* @__PURE__ */
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
className: paper3,
|
|
1040
|
-
onClick: onPaperClick
|
|
1041
|
-
}, children)));
|
|
1079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1080
|
+
"div",
|
|
1081
|
+
{
|
|
1082
|
+
className: container3({
|
|
1083
|
+
transitionState: useLazy(transitionState)
|
|
1084
|
+
}),
|
|
1085
|
+
ref: containerRef,
|
|
1086
|
+
style: (0, import_dynamic5.assignInlineVars)(
|
|
1087
|
+
compactMap({
|
|
1088
|
+
[globalVars.bottomSheet.borderRadius]: borderRadius,
|
|
1089
|
+
[globalVars.backgroundColor]: backgroundColor,
|
|
1090
|
+
[globalVars.dimBackgroundColor]: dimBackgroundColor,
|
|
1091
|
+
[vars3.zIndexes.dim]: `${zIndexBase}`,
|
|
1092
|
+
[vars3.zIndexes.paper]: `${zIndexPaper}`,
|
|
1093
|
+
[vars3.transitionDuration]: transitionState === "enter-active" || transitionState === "exit-active" ? globalVars.transitionDuration : "0ms"
|
|
1094
|
+
})
|
|
1095
|
+
),
|
|
1096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: dim3, ref: paperRef, onClick: onDimClick, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: paper3, onClick: onPaperClick, children }) })
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1042
1099
|
};
|
|
1043
1100
|
Modal.displayName = "Modal";
|
|
1044
1101
|
var Modal_default = Modal;
|