@manhphi1309/dialog 0.3.6 → 0.3.7
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/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -152,7 +152,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
152
152
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
153
153
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(radix_ui.Dialog.Content, {
|
|
154
154
|
"data-slot": "dialog-content",
|
|
155
|
-
className: (0, _manhphi1309_utils.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover
|
|
155
|
+
className: (0, _manhphi1309_utils.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
156
156
|
...props,
|
|
157
157
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Close, {
|
|
158
158
|
"data-slot": "dialog-close",
|
|
@@ -184,7 +184,7 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
184
184
|
function DialogHeader({ className, ...props }) {
|
|
185
185
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
186
186
|
"data-slot": "dialog-header",
|
|
187
|
-
className: (0, _manhphi1309_utils.cn)("flex flex-col gap-2", className),
|
|
187
|
+
className: (0, _manhphi1309_utils.cn)("flex flex-col gap-2 px-4 pt-4", className),
|
|
188
188
|
...props
|
|
189
189
|
});
|
|
190
190
|
}
|
|
@@ -205,7 +205,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
205
205
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
206
206
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
207
207
|
"data-slot": "dialog-footer",
|
|
208
|
-
className: (0, _manhphi1309_utils.cn)("
|
|
208
|
+
className: (0, _manhphi1309_utils.cn)("flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className),
|
|
209
209
|
...props,
|
|
210
210
|
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Dialog.Close, {
|
|
211
211
|
asChild: true,
|
package/dist/index.mjs
CHANGED
|
@@ -128,7 +128,7 @@ function DialogOverlay({ className, ...props }) {
|
|
|
128
128
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
129
129
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
|
|
130
130
|
"data-slot": "dialog-content",
|
|
131
|
-
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover
|
|
131
|
+
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
132
132
|
...props,
|
|
133
133
|
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
134
134
|
"data-slot": "dialog-close",
|
|
@@ -160,7 +160,7 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
160
160
|
function DialogHeader({ className, ...props }) {
|
|
161
161
|
return /* @__PURE__ */ jsx("div", {
|
|
162
162
|
"data-slot": "dialog-header",
|
|
163
|
-
className: cn("flex flex-col gap-2", className),
|
|
163
|
+
className: cn("flex flex-col gap-2 px-4 pt-4", className),
|
|
164
164
|
...props
|
|
165
165
|
});
|
|
166
166
|
}
|
|
@@ -181,7 +181,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
181
181
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
182
182
|
return /* @__PURE__ */ jsxs("div", {
|
|
183
183
|
"data-slot": "dialog-footer",
|
|
184
|
-
className: cn("
|
|
184
|
+
className: cn("flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", className),
|
|
185
185
|
...props,
|
|
186
186
|
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
187
187
|
asChild: true,
|