@designa8/vibedesign-stripe-deepseek-85ea 0.2.0 → 0.2.1
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/index.cjs +26 -20
- package/dist/index.js +26 -20
- package/dist/styles.css +4 -0
- package/package.json +1 -1
- package/src/atoms/Drawer/Drawer.tsx +45 -22
- package/src/atoms/Modal/Modal.tsx +11 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-stripe-deepseek-85ea
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.2.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.2.1**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -6995,6 +6995,19 @@ var Drawer = React35.forwardRef(
|
|
|
6995
6995
|
}, [open, autoFocusNote]);
|
|
6996
6996
|
const accessibleName = ariaLabel ?? (typeof title === "string" ? title : void 0);
|
|
6997
6997
|
const noteIsDisabled = noteDisabled ?? actionDisabled;
|
|
6998
|
+
const body = children === void 0 ? null : children;
|
|
6999
|
+
const hasCustomBody = children !== void 0;
|
|
7000
|
+
const footerNode = footer === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
7001
|
+
Button,
|
|
7002
|
+
{
|
|
7003
|
+
variant: "primary",
|
|
7004
|
+
size: "lg",
|
|
7005
|
+
fullWidth: true,
|
|
7006
|
+
disabled: actionDisabled,
|
|
7007
|
+
onClick: onAction,
|
|
7008
|
+
children: actionLabel
|
|
7009
|
+
}
|
|
7010
|
+
) : footer;
|
|
6998
7011
|
const panel = !mounted || typeof document === "undefined" ? null : ReactDOM5.createPortal(
|
|
6999
7012
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
7000
7013
|
"div",
|
|
@@ -7010,8 +7023,9 @@ var Drawer = React35.forwardRef(
|
|
|
7010
7023
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
7011
7024
|
className: cn28(
|
|
7012
7025
|
"fixed inset-0 flex overflow-hidden",
|
|
7026
|
+
"transition-[visibility] duration-200 ease-out",
|
|
7013
7027
|
side === "right" ? "justify-end" : "justify-start",
|
|
7014
|
-
open ? "" : "pointer-events-none"
|
|
7028
|
+
open ? "visible" : "invisible pointer-events-none"
|
|
7015
7029
|
),
|
|
7016
7030
|
...rest,
|
|
7017
7031
|
children: [
|
|
@@ -7023,7 +7037,7 @@ var Drawer = React35.forwardRef(
|
|
|
7023
7037
|
className: cn28(
|
|
7024
7038
|
"absolute inset-0 bg-scrim/40",
|
|
7025
7039
|
"transition-opacity duration-200 ease-out",
|
|
7026
|
-
"
|
|
7040
|
+
open ? "opacity-100" : "opacity-0"
|
|
7027
7041
|
)
|
|
7028
7042
|
}
|
|
7029
7043
|
),
|
|
@@ -7034,8 +7048,11 @@ var Drawer = React35.forwardRef(
|
|
|
7034
7048
|
"data-state": open ? "open" : "closed",
|
|
7035
7049
|
className: cn28(
|
|
7036
7050
|
"relative flex h-full w-full flex-col overflow-hidden bg-surface shadow-overlay",
|
|
7037
|
-
"
|
|
7038
|
-
|
|
7051
|
+
"transition-transform duration-200 ease-out",
|
|
7052
|
+
open ? "translate-x-0" : "",
|
|
7053
|
+
!open && side === "right" ? "translate-x-full" : "",
|
|
7054
|
+
!open && side === "left" ? "-translate-x-full" : "",
|
|
7055
|
+
side === "right" ? "sm:rounded-l-lg" : "sm:rounded-r-lg",
|
|
7039
7056
|
"sm:w-[var(--container-drawer,360px)]",
|
|
7040
7057
|
className
|
|
7041
7058
|
),
|
|
@@ -7061,7 +7078,7 @@ var Drawer = React35.forwardRef(
|
|
|
7061
7078
|
}
|
|
7062
7079
|
)
|
|
7063
7080
|
] }),
|
|
7064
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children:
|
|
7081
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children: hasCustomBody ? body : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-xl", children: [
|
|
7065
7082
|
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex flex-col gap-lg", children: [
|
|
7066
7083
|
status ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
7067
7084
|
Badge,
|
|
@@ -7098,17 +7115,7 @@ var Drawer = React35.forwardRef(
|
|
|
7098
7115
|
}
|
|
7099
7116
|
) : null
|
|
7100
7117
|
] }) }),
|
|
7101
|
-
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "shrink-0 px-xl pt-md pb-xl", children:
|
|
7102
|
-
Button,
|
|
7103
|
-
{
|
|
7104
|
-
variant: "primary",
|
|
7105
|
-
size: "lg",
|
|
7106
|
-
fullWidth: true,
|
|
7107
|
-
disabled: actionDisabled,
|
|
7108
|
-
onClick: onAction,
|
|
7109
|
-
children: actionLabel
|
|
7110
|
-
}
|
|
7111
|
-
) })
|
|
7118
|
+
footerNode ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "shrink-0 px-xl pt-md pb-xl", children: footerNode }) : null
|
|
7112
7119
|
]
|
|
7113
7120
|
}
|
|
7114
7121
|
)
|
|
@@ -9637,8 +9644,7 @@ var Modal = React50.forwardRef(
|
|
|
9637
9644
|
contained ? "max-h-full" : placement === "top" ? "max-h-[calc(88dvh-1rem)]" : "max-h-[calc(100dvh-2rem)]",
|
|
9638
9645
|
"rounded-lg border border-hairline bg-surface shadow-overlay",
|
|
9639
9646
|
"transition duration-200 ease-out",
|
|
9640
|
-
"
|
|
9641
|
-
"data-[state=closed]:translate-y-2 data-[state=closed]:scale-[0.98] data-[state=closed]:opacity-0",
|
|
9647
|
+
isOpen ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 opacity-0",
|
|
9642
9648
|
className
|
|
9643
9649
|
),
|
|
9644
9650
|
...rest,
|
|
@@ -9745,7 +9751,7 @@ var Modal = React50.forwardRef(
|
|
|
9745
9751
|
contained ? "absolute inset-0" : "fixed inset-0",
|
|
9746
9752
|
placement === "top" ? "items-start px-base pt-[12dvh]" : "items-center p-base",
|
|
9747
9753
|
"transition duration-200 ease-out",
|
|
9748
|
-
"
|
|
9754
|
+
isOpen ? "visible" : "invisible pointer-events-none"
|
|
9749
9755
|
),
|
|
9750
9756
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
9751
9757
|
children: [
|
|
@@ -9762,7 +9768,7 @@ var Modal = React50.forwardRef(
|
|
|
9762
9768
|
style: scrimStyle(contained),
|
|
9763
9769
|
className: cn41(
|
|
9764
9770
|
"transition-opacity duration-200 ease-out",
|
|
9765
|
-
"
|
|
9771
|
+
isOpen ? "opacity-100" : "opacity-0"
|
|
9766
9772
|
)
|
|
9767
9773
|
}
|
|
9768
9774
|
),
|
package/dist/index.js
CHANGED
|
@@ -6858,6 +6858,19 @@ var Drawer = React35.forwardRef(
|
|
|
6858
6858
|
}, [open, autoFocusNote]);
|
|
6859
6859
|
const accessibleName = ariaLabel ?? (typeof title === "string" ? title : void 0);
|
|
6860
6860
|
const noteIsDisabled = noteDisabled ?? actionDisabled;
|
|
6861
|
+
const body = children === void 0 ? null : children;
|
|
6862
|
+
const hasCustomBody = children !== void 0;
|
|
6863
|
+
const footerNode = footer === void 0 ? /* @__PURE__ */ jsx35(
|
|
6864
|
+
Button,
|
|
6865
|
+
{
|
|
6866
|
+
variant: "primary",
|
|
6867
|
+
size: "lg",
|
|
6868
|
+
fullWidth: true,
|
|
6869
|
+
disabled: actionDisabled,
|
|
6870
|
+
onClick: onAction,
|
|
6871
|
+
children: actionLabel
|
|
6872
|
+
}
|
|
6873
|
+
) : footer;
|
|
6861
6874
|
const panel = !mounted || typeof document === "undefined" ? null : ReactDOM5.createPortal(
|
|
6862
6875
|
/* @__PURE__ */ jsxs32(
|
|
6863
6876
|
"div",
|
|
@@ -6873,8 +6886,9 @@ var Drawer = React35.forwardRef(
|
|
|
6873
6886
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
6874
6887
|
className: cn28(
|
|
6875
6888
|
"fixed inset-0 flex overflow-hidden",
|
|
6889
|
+
"transition-[visibility] duration-200 ease-out",
|
|
6876
6890
|
side === "right" ? "justify-end" : "justify-start",
|
|
6877
|
-
open ? "" : "pointer-events-none"
|
|
6891
|
+
open ? "visible" : "invisible pointer-events-none"
|
|
6878
6892
|
),
|
|
6879
6893
|
...rest,
|
|
6880
6894
|
children: [
|
|
@@ -6886,7 +6900,7 @@ var Drawer = React35.forwardRef(
|
|
|
6886
6900
|
className: cn28(
|
|
6887
6901
|
"absolute inset-0 bg-scrim/40",
|
|
6888
6902
|
"transition-opacity duration-200 ease-out",
|
|
6889
|
-
"
|
|
6903
|
+
open ? "opacity-100" : "opacity-0"
|
|
6890
6904
|
)
|
|
6891
6905
|
}
|
|
6892
6906
|
),
|
|
@@ -6897,8 +6911,11 @@ var Drawer = React35.forwardRef(
|
|
|
6897
6911
|
"data-state": open ? "open" : "closed",
|
|
6898
6912
|
className: cn28(
|
|
6899
6913
|
"relative flex h-full w-full flex-col overflow-hidden bg-surface shadow-overlay",
|
|
6900
|
-
"
|
|
6901
|
-
|
|
6914
|
+
"transition-transform duration-200 ease-out",
|
|
6915
|
+
open ? "translate-x-0" : "",
|
|
6916
|
+
!open && side === "right" ? "translate-x-full" : "",
|
|
6917
|
+
!open && side === "left" ? "-translate-x-full" : "",
|
|
6918
|
+
side === "right" ? "sm:rounded-l-lg" : "sm:rounded-r-lg",
|
|
6902
6919
|
"sm:w-[var(--container-drawer,360px)]",
|
|
6903
6920
|
className
|
|
6904
6921
|
),
|
|
@@ -6924,7 +6941,7 @@ var Drawer = React35.forwardRef(
|
|
|
6924
6941
|
}
|
|
6925
6942
|
)
|
|
6926
6943
|
] }),
|
|
6927
|
-
/* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children:
|
|
6944
|
+
/* @__PURE__ */ jsx35("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl", children: hasCustomBody ? body : /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-xl", children: [
|
|
6928
6945
|
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-lg", children: [
|
|
6929
6946
|
status ? /* @__PURE__ */ jsx35(
|
|
6930
6947
|
Badge,
|
|
@@ -6961,17 +6978,7 @@ var Drawer = React35.forwardRef(
|
|
|
6961
6978
|
}
|
|
6962
6979
|
) : null
|
|
6963
6980
|
] }) }),
|
|
6964
|
-
/* @__PURE__ */ jsx35("div", { className: "shrink-0 px-xl pt-md pb-xl", children:
|
|
6965
|
-
Button,
|
|
6966
|
-
{
|
|
6967
|
-
variant: "primary",
|
|
6968
|
-
size: "lg",
|
|
6969
|
-
fullWidth: true,
|
|
6970
|
-
disabled: actionDisabled,
|
|
6971
|
-
onClick: onAction,
|
|
6972
|
-
children: actionLabel
|
|
6973
|
-
}
|
|
6974
|
-
) })
|
|
6981
|
+
footerNode ? /* @__PURE__ */ jsx35("div", { className: "shrink-0 px-xl pt-md pb-xl", children: footerNode }) : null
|
|
6975
6982
|
]
|
|
6976
6983
|
}
|
|
6977
6984
|
)
|
|
@@ -9500,8 +9507,7 @@ var Modal = React50.forwardRef(
|
|
|
9500
9507
|
contained ? "max-h-full" : placement === "top" ? "max-h-[calc(88dvh-1rem)]" : "max-h-[calc(100dvh-2rem)]",
|
|
9501
9508
|
"rounded-lg border border-hairline bg-surface shadow-overlay",
|
|
9502
9509
|
"transition duration-200 ease-out",
|
|
9503
|
-
"
|
|
9504
|
-
"data-[state=closed]:translate-y-2 data-[state=closed]:scale-[0.98] data-[state=closed]:opacity-0",
|
|
9510
|
+
isOpen ? "translate-y-0 scale-100 opacity-100" : "translate-y-2 opacity-0",
|
|
9505
9511
|
className
|
|
9506
9512
|
),
|
|
9507
9513
|
...rest,
|
|
@@ -9608,7 +9614,7 @@ var Modal = React50.forwardRef(
|
|
|
9608
9614
|
contained ? "absolute inset-0" : "fixed inset-0",
|
|
9609
9615
|
placement === "top" ? "items-start px-base pt-[12dvh]" : "items-center p-base",
|
|
9610
9616
|
"transition duration-200 ease-out",
|
|
9611
|
-
"
|
|
9617
|
+
isOpen ? "visible" : "invisible pointer-events-none"
|
|
9612
9618
|
),
|
|
9613
9619
|
style: { zIndex: "var(--z-modal, 1200)" },
|
|
9614
9620
|
children: [
|
|
@@ -9625,7 +9631,7 @@ var Modal = React50.forwardRef(
|
|
|
9625
9631
|
style: scrimStyle(contained),
|
|
9626
9632
|
className: cn41(
|
|
9627
9633
|
"transition-opacity duration-200 ease-out",
|
|
9628
|
-
"
|
|
9634
|
+
isOpen ? "opacity-100" : "opacity-0"
|
|
9629
9635
|
)
|
|
9630
9636
|
}
|
|
9631
9637
|
),
|
package/dist/styles.css
CHANGED
|
@@ -1114,6 +1114,10 @@
|
|
|
1114
1114
|
--tw-translate-y: calc(1 / 2 * 100%);
|
|
1115
1115
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1116
1116
|
}
|
|
1117
|
+
.translate-y-2 {
|
|
1118
|
+
--tw-translate-y: calc(var(--spacing) * 2);
|
|
1119
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1120
|
+
}
|
|
1117
1121
|
.translate-y-px {
|
|
1118
1122
|
--tw-translate-y: 1px;
|
|
1119
1123
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
package/package.json
CHANGED
|
@@ -62,9 +62,15 @@ export interface DrawerProps
|
|
|
62
62
|
actionDisabled?: boolean;
|
|
63
63
|
/** Fires when the primary action is pressed. */
|
|
64
64
|
onAction?: () => void;
|
|
65
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Replaces the pinned action footer. Pass `null` to render no footer at all;
|
|
67
|
+
* the default action only appears when the prop is left `undefined`.
|
|
68
|
+
*/
|
|
66
69
|
footer?: React.ReactNode;
|
|
67
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Replaces the default payment body. Pass `null` to render an empty body;
|
|
72
|
+
* the default fixture only appears when the prop is left `undefined`.
|
|
73
|
+
*/
|
|
68
74
|
children?: React.ReactNode;
|
|
69
75
|
/** Accessible name of the close control. */
|
|
70
76
|
closeLabel?: string;
|
|
@@ -77,6 +83,11 @@ export interface DrawerProps
|
|
|
77
83
|
* `translate-x`, and only the body between the pinned heading and footer
|
|
78
84
|
* scrolls.
|
|
79
85
|
*
|
|
86
|
+
* The closed state is expressed with plain utilities (`invisible`,
|
|
87
|
+
* `pointer-events-none`, the travel offset) rather than `data-[state=closed]:*`
|
|
88
|
+
* variants, so the panel is never painted, never focusable, and never swallows
|
|
89
|
+
* pointer events even in a build that emits no data-state rules.
|
|
90
|
+
*
|
|
80
91
|
* The `role="dialog"` element is the full-viewport stage, not the travelling
|
|
81
92
|
* surface: the box the user reads stays put while the sheet inside it slides, so
|
|
82
93
|
* a closed drawer never parks itself outside the viewport.
|
|
@@ -157,6 +168,24 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
157
168
|
ariaLabel ?? (typeof title === "string" ? title : undefined);
|
|
158
169
|
const noteIsDisabled = noteDisabled ?? actionDisabled;
|
|
159
170
|
|
|
171
|
+
/* `undefined` means "not supplied" — `null` is an explicit "render nothing". */
|
|
172
|
+
const body = children === undefined ? null : children;
|
|
173
|
+
const hasCustomBody = children !== undefined;
|
|
174
|
+
const footerNode =
|
|
175
|
+
footer === undefined ? (
|
|
176
|
+
<Button
|
|
177
|
+
variant="primary"
|
|
178
|
+
size="lg"
|
|
179
|
+
fullWidth
|
|
180
|
+
disabled={actionDisabled}
|
|
181
|
+
onClick={onAction}
|
|
182
|
+
>
|
|
183
|
+
{actionLabel}
|
|
184
|
+
</Button>
|
|
185
|
+
) : (
|
|
186
|
+
footer
|
|
187
|
+
);
|
|
188
|
+
|
|
160
189
|
const panel =
|
|
161
190
|
!mounted || typeof document === "undefined"
|
|
162
191
|
? null
|
|
@@ -173,8 +202,9 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
173
202
|
style={{ zIndex: "var(--z-modal, 1200)" }}
|
|
174
203
|
className={cn(
|
|
175
204
|
"fixed inset-0 flex overflow-hidden",
|
|
205
|
+
"transition-[visibility] duration-200 ease-out",
|
|
176
206
|
side === "right" ? "justify-end" : "justify-start",
|
|
177
|
-
open ? "" : "pointer-events-none",
|
|
207
|
+
open ? "visible" : "invisible pointer-events-none",
|
|
178
208
|
)}
|
|
179
209
|
{...rest}
|
|
180
210
|
>
|
|
@@ -186,7 +216,7 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
186
216
|
className={cn(
|
|
187
217
|
"absolute inset-0 bg-scrim/40",
|
|
188
218
|
"transition-opacity duration-200 ease-out",
|
|
189
|
-
"
|
|
219
|
+
open ? "opacity-100" : "opacity-0",
|
|
190
220
|
)}
|
|
191
221
|
/>
|
|
192
222
|
|
|
@@ -195,10 +225,11 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
195
225
|
data-state={open ? "open" : "closed"}
|
|
196
226
|
className={cn(
|
|
197
227
|
"relative flex h-full w-full flex-col overflow-hidden bg-surface shadow-overlay",
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
228
|
+
"transition-transform duration-200 ease-out",
|
|
229
|
+
open ? "translate-x-0" : "",
|
|
230
|
+
!open && side === "right" ? "translate-x-full" : "",
|
|
231
|
+
!open && side === "left" ? "-translate-x-full" : "",
|
|
232
|
+
side === "right" ? "sm:rounded-l-lg" : "sm:rounded-r-lg",
|
|
202
233
|
"sm:w-[var(--container-drawer,360px)]",
|
|
203
234
|
className,
|
|
204
235
|
)}
|
|
@@ -221,7 +252,9 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
221
252
|
</div>
|
|
222
253
|
|
|
223
254
|
<div className="min-h-0 flex-1 overflow-y-auto overscroll-contain px-xl pb-xl">
|
|
224
|
-
{
|
|
255
|
+
{hasCustomBody ? (
|
|
256
|
+
body
|
|
257
|
+
) : (
|
|
225
258
|
<div className="flex flex-col gap-xl">
|
|
226
259
|
<div className="flex flex-col gap-lg">
|
|
227
260
|
{status ? (
|
|
@@ -269,19 +302,9 @@ export const Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(
|
|
|
269
302
|
)}
|
|
270
303
|
</div>
|
|
271
304
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
variant="primary"
|
|
276
|
-
size="lg"
|
|
277
|
-
fullWidth
|
|
278
|
-
disabled={actionDisabled}
|
|
279
|
-
onClick={onAction}
|
|
280
|
-
>
|
|
281
|
-
{actionLabel}
|
|
282
|
-
</Button>
|
|
283
|
-
)}
|
|
284
|
-
</div>
|
|
305
|
+
{footerNode ? (
|
|
306
|
+
<div className="shrink-0 px-xl pt-md pb-xl">{footerNode}</div>
|
|
307
|
+
) : null}
|
|
285
308
|
</div>
|
|
286
309
|
</div>,
|
|
287
310
|
document.body,
|
|
@@ -150,6 +150,12 @@ export interface ModalProps
|
|
|
150
150
|
* the body portals its listbox to `document.body` at `--z-popover`, above this
|
|
151
151
|
* dialog's `--z-modal`, so opening it can never grow the panel or paint
|
|
152
152
|
* underneath it.
|
|
153
|
+
*
|
|
154
|
+
* The closed state is expressed with plain utilities (`invisible`,
|
|
155
|
+
* `pointer-events-none`, `opacity-0`, the resting offset) instead of
|
|
156
|
+
* `data-[state=closed]:*` variants, so the dialog is hidden, unfocusable, and
|
|
157
|
+
* click-through even in a build that emits no data-state rules. `data-state`
|
|
158
|
+
* is still published for consumers that style it.
|
|
153
159
|
*/
|
|
154
160
|
export const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
155
161
|
(
|
|
@@ -387,8 +393,9 @@ export const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
|
387
393
|
: "max-h-[calc(100dvh-2rem)]",
|
|
388
394
|
"rounded-lg border border-hairline bg-surface shadow-overlay",
|
|
389
395
|
"transition duration-200 ease-out",
|
|
390
|
-
|
|
391
|
-
|
|
396
|
+
isOpen
|
|
397
|
+
? "translate-y-0 scale-100 opacity-100"
|
|
398
|
+
: "translate-y-2 opacity-0",
|
|
392
399
|
className,
|
|
393
400
|
)}
|
|
394
401
|
{...rest}
|
|
@@ -510,7 +517,7 @@ export const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
|
510
517
|
? "items-start px-base pt-[12dvh]"
|
|
511
518
|
: "items-center p-base",
|
|
512
519
|
"transition duration-200 ease-out",
|
|
513
|
-
"
|
|
520
|
+
isOpen ? "visible" : "invisible pointer-events-none",
|
|
514
521
|
)}
|
|
515
522
|
style={{ zIndex: "var(--z-modal, 1200)" }}
|
|
516
523
|
>
|
|
@@ -526,7 +533,7 @@ export const Modal = React.forwardRef<HTMLDivElement, ModalProps>(
|
|
|
526
533
|
style={scrimStyle(contained)}
|
|
527
534
|
className={cn(
|
|
528
535
|
"transition-opacity duration-200 ease-out",
|
|
529
|
-
"
|
|
536
|
+
isOpen ? "opacity-100" : "opacity-0",
|
|
530
537
|
)}
|
|
531
538
|
/>
|
|
532
539
|
|