@stackshift-ui/dialog 1.0.0-beta.4 → 1.0.0-beta.5
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/package.json +6 -6
- package/src/dialog.tsx +1 -1
- package/dist/chunk-3EYN2AKU.mjs +0 -1
- package/dist/chunk-6DZX6EAA.mjs +0 -37
- package/dist/chunk-UQAQSADE.mjs +0 -154
- package/dist/chunk-X66CH5UC.mjs +0 -1
- package/dist/dialog.d.ts +0 -15
- package/dist/dialog.js +0 -2
- package/dist/dialog.mjs +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/index.mjs +0 -2
- package/dist/setupTests.d.ts +0 -2
- package/dist/setupTests.js +0 -47
- package/dist/setupTests.mjs +0 -47
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackshift-ui/dialog",
|
|
3
3
|
"description": "A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.5",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"typescript": "^5.6.2",
|
|
32
32
|
"vite-tsconfig-paths": "^5.0.1",
|
|
33
33
|
"vitest": "^2.1.1",
|
|
34
|
-
"@stackshift-ui/
|
|
35
|
-
"@stackshift-ui/
|
|
34
|
+
"@stackshift-ui/eslint-config": "6.0.10",
|
|
35
|
+
"@stackshift-ui/typescript-config": "6.0.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
39
39
|
"classnames": "^2.5.1",
|
|
40
40
|
"lucide-react": "^0.468.0",
|
|
41
|
-
"@stackshift-ui/
|
|
42
|
-
"@stackshift-ui/
|
|
41
|
+
"@stackshift-ui/scripts": "7.0.0-beta.3",
|
|
42
|
+
"@stackshift-ui/system": "7.0.0-beta.4"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@stackshift-ui/system": ">=
|
|
45
|
+
"@stackshift-ui/system": ">=7.0.0-beta.4",
|
|
46
46
|
"@types/react": "16.8 - 19",
|
|
47
47
|
"next": "10 - 14",
|
|
48
48
|
"react": "16.8 - 19",
|
package/src/dialog.tsx
CHANGED
|
@@ -102,7 +102,7 @@ const DialogContent = React.forwardRef<
|
|
|
102
102
|
{showCloseButton && (
|
|
103
103
|
<DialogPrimitive.Close
|
|
104
104
|
data-slot="dialog-close"
|
|
105
|
-
className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">
|
|
105
|
+
className="ring-offset-background focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4">
|
|
106
106
|
<XIcon />
|
|
107
107
|
<span className="sr-only">Close</span>
|
|
108
108
|
</DialogPrimitive.Close>
|
package/dist/chunk-3EYN2AKU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var g=Object.create;var f=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(a,{get:(b,c)=>(typeof require!="undefined"?require:b)[c]}):a)(function(a){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var l=(a,b,c,e)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&f(a,d,{get:()=>b[d],enumerable:!(e=h(b,d))||e.enumerable});return a};var o=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c};
|
package/dist/chunk-6DZX6EAA.mjs
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
14
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
|
-
};
|
|
16
|
-
var __copyProps = (to, from, except, desc) => {
|
|
17
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
-
for (let key of __getOwnPropNames(from))
|
|
19
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
20
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
21
|
-
}
|
|
22
|
-
return to;
|
|
23
|
-
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
30
|
-
mod
|
|
31
|
-
));
|
|
32
|
-
|
|
33
|
-
export {
|
|
34
|
-
__require,
|
|
35
|
-
__commonJS,
|
|
36
|
-
__toESM
|
|
37
|
-
};
|
package/dist/chunk-UQAQSADE.mjs
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
// src/dialog.tsx
|
|
2
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
-
import { XIcon } from "lucide-react";
|
|
4
|
-
import * as React from "react";
|
|
5
|
-
import { cn, DefaultComponent, useStackShiftUIComponents } from "@stackshift-ui/system";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
var displayName = "Dialog";
|
|
8
|
-
var displayNameTrigger = "DialogTrigger";
|
|
9
|
-
var displayNamePortal = "DialogPortal";
|
|
10
|
-
var displayNameClose = "DialogClose";
|
|
11
|
-
var displayNameOverlay = "DialogOverlay";
|
|
12
|
-
var displayNameContent = "DialogContent";
|
|
13
|
-
var displayNameHeader = "DialogHeader";
|
|
14
|
-
var displayNameFooter = "DialogFooter";
|
|
15
|
-
var displayNameTitle = "DialogTitle";
|
|
16
|
-
var displayNameDescription = "DialogDescription";
|
|
17
|
-
var Dialog = React.forwardRef(({ ...props }, ref) => {
|
|
18
|
-
const { [displayName]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
19
|
-
return /* @__PURE__ */ jsx(Component, { as: DialogPrimitive.Root, ref, "data-slot": "dialog", ...props });
|
|
20
|
-
});
|
|
21
|
-
Dialog.displayName = displayName;
|
|
22
|
-
var DialogTrigger = React.forwardRef(({ ...props }, ref) => {
|
|
23
|
-
const { [displayNameTrigger]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
24
|
-
return /* @__PURE__ */ jsx(Component, { as: DialogPrimitive.Trigger, ref, "data-slot": "dialog-trigger", ...props });
|
|
25
|
-
});
|
|
26
|
-
DialogTrigger.displayName = displayNameTrigger;
|
|
27
|
-
var DialogPortal = React.forwardRef(({ ...props }, ref) => {
|
|
28
|
-
const { [displayNamePortal]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
29
|
-
return /* @__PURE__ */ jsx(Component, { as: DialogPrimitive.Portal, ref, "data-slot": "dialog-portal", ...props });
|
|
30
|
-
});
|
|
31
|
-
DialogPortal.displayName = displayNamePortal;
|
|
32
|
-
var DialogClose = React.forwardRef(({ ...props }, ref) => {
|
|
33
|
-
const { [displayNameClose]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
34
|
-
return /* @__PURE__ */ jsx(Component, { as: DialogPrimitive.Close, ref, "data-slot": "dialog-close", ...props });
|
|
35
|
-
});
|
|
36
|
-
DialogClose.displayName = displayNameClose;
|
|
37
|
-
var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => {
|
|
38
|
-
const { [displayNameOverlay]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
40
|
-
Component,
|
|
41
|
-
{
|
|
42
|
-
as: DialogPrimitive.Overlay,
|
|
43
|
-
ref,
|
|
44
|
-
"data-slot": "dialog-overlay",
|
|
45
|
-
className: cn(
|
|
46
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
47
|
-
className
|
|
48
|
-
),
|
|
49
|
-
...props
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
});
|
|
53
|
-
DialogOverlay.displayName = displayNameOverlay;
|
|
54
|
-
var DialogContent = React.forwardRef(({ className, children, showCloseButton = true, ...props }, ref) => {
|
|
55
|
-
const { [displayNameContent]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
56
|
-
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
57
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
58
|
-
/* @__PURE__ */ jsxs(
|
|
59
|
-
Component,
|
|
60
|
-
{
|
|
61
|
-
as: DialogPrimitive.Content,
|
|
62
|
-
ref,
|
|
63
|
-
"data-slot": "dialog-content",
|
|
64
|
-
className: cn(
|
|
65
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
66
|
-
className
|
|
67
|
-
),
|
|
68
|
-
...props,
|
|
69
|
-
children: [
|
|
70
|
-
children,
|
|
71
|
-
showCloseButton && /* @__PURE__ */ jsxs(
|
|
72
|
-
DialogPrimitive.Close,
|
|
73
|
-
{
|
|
74
|
-
"data-slot": "dialog-close",
|
|
75
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ jsx(XIcon, {}),
|
|
78
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
] });
|
|
86
|
-
});
|
|
87
|
-
DialogContent.displayName = displayNameContent;
|
|
88
|
-
var DialogHeader = React.forwardRef(({ className, ...props }, ref) => {
|
|
89
|
-
const { [displayNameHeader]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
90
|
-
return /* @__PURE__ */ jsx(
|
|
91
|
-
Component,
|
|
92
|
-
{
|
|
93
|
-
ref,
|
|
94
|
-
"data-slot": "dialog-header",
|
|
95
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
});
|
|
100
|
-
DialogHeader.displayName = displayNameHeader;
|
|
101
|
-
var DialogFooter = React.forwardRef(({ className, ...props }, ref) => {
|
|
102
|
-
const { [displayNameFooter]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
103
|
-
return /* @__PURE__ */ jsx(
|
|
104
|
-
Component,
|
|
105
|
-
{
|
|
106
|
-
ref,
|
|
107
|
-
"data-slot": "dialog-footer",
|
|
108
|
-
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
109
|
-
...props
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
});
|
|
113
|
-
DialogFooter.displayName = displayNameFooter;
|
|
114
|
-
var DialogTitle = React.forwardRef(({ className, ...props }, ref) => {
|
|
115
|
-
const { [displayNameTitle]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
116
|
-
return /* @__PURE__ */ jsx(
|
|
117
|
-
Component,
|
|
118
|
-
{
|
|
119
|
-
as: DialogPrimitive.Title,
|
|
120
|
-
ref,
|
|
121
|
-
"data-slot": "dialog-title",
|
|
122
|
-
className: cn("text-lg leading-none font-semibold", className),
|
|
123
|
-
...props
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
});
|
|
127
|
-
DialogTitle.displayName = displayNameTitle;
|
|
128
|
-
var DialogDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
129
|
-
const { [displayNameDescription]: Component = DefaultComponent } = useStackShiftUIComponents();
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
131
|
-
Component,
|
|
132
|
-
{
|
|
133
|
-
as: DialogPrimitive.Description,
|
|
134
|
-
ref,
|
|
135
|
-
"data-slot": "dialog-description",
|
|
136
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
137
|
-
...props
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
});
|
|
141
|
-
DialogDescription.displayName = displayNameDescription;
|
|
142
|
-
|
|
143
|
-
export {
|
|
144
|
-
Dialog,
|
|
145
|
-
DialogTrigger,
|
|
146
|
-
DialogPortal,
|
|
147
|
-
DialogClose,
|
|
148
|
-
DialogOverlay,
|
|
149
|
-
DialogContent,
|
|
150
|
-
DialogHeader,
|
|
151
|
-
DialogFooter,
|
|
152
|
-
DialogTitle,
|
|
153
|
-
DialogDescription
|
|
154
|
-
};
|
package/dist/chunk-X66CH5UC.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as a from"@radix-ui/react-dialog";import{XIcon as w}from"lucide-react";import*as n from"react";import{cn as m,DefaultComponent as s,useStackShiftUIComponents as r}from"@stackshift-ui/system";import{jsx as i,jsxs as d}from"react/jsx-runtime";var c="Dialog",p="DialogTrigger",f="DialogPortal",g="DialogClose",R="DialogOverlay",D="DialogContent",y="DialogHeader",u="DialogFooter",v="DialogTitle",P="DialogDescription",T=n.forwardRef(({...e},t)=>{let{[c]:o=s}=r();return i(o,{as:a.Root,ref:t,"data-slot":"dialog",...e})});T.displayName=c;var b=n.forwardRef(({...e},t)=>{let{[p]:o=s}=r();return i(o,{as:a.Trigger,ref:t,"data-slot":"dialog-trigger",...e})});b.displayName=p;var C=n.forwardRef(({...e},t)=>{let{[f]:o=s}=r();return i(o,{as:a.Portal,ref:t,"data-slot":"dialog-portal",...e})});C.displayName=f;var E=n.forwardRef(({...e},t)=>{let{[g]:o=s}=r();return i(o,{as:a.Close,ref:t,"data-slot":"dialog-close",...e})});E.displayName=g;var N=n.forwardRef(({className:e,...t},o)=>{let{[R]:l=s}=r();return i(l,{as:a.Overlay,ref:o,"data-slot":"dialog-overlay",className:m("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})});N.displayName=R;var W=n.forwardRef(({className:e,children:t,showCloseButton:o=!0,...l},h)=>{let{[D]:x=s}=r();return d(C,{"data-slot":"dialog-portal",children:[i(N,{}),d(x,{as:a.Content,ref:h,"data-slot":"dialog-content",className:m("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...l,children:[t,o&&d(a.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[i(w,{}),i("span",{className:"sr-only",children:"Close"})]})]})]})});W.displayName=D;var z=n.forwardRef(({className:e,...t},o)=>{let{[y]:l=s}=r();return i(l,{ref:o,"data-slot":"dialog-header",className:m("flex flex-col gap-2 text-center sm:text-left",e),...t})});z.displayName=y;var O=n.forwardRef(({className:e,...t},o)=>{let{[u]:l=s}=r();return i(l,{ref:o,"data-slot":"dialog-footer",className:m("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})});O.displayName=u;var k=n.forwardRef(({className:e,...t},o)=>{let{[v]:l=s}=r();return i(l,{as:a.Title,ref:o,"data-slot":"dialog-title",className:m("text-lg leading-none font-semibold",e),...t})});k.displayName=v;var F=n.forwardRef(({className:e,...t},o)=>{let{[P]:l=s}=r();return i(l,{as:a.Description,ref:o,"data-slot":"dialog-description",className:m("text-muted-foreground text-sm",e),...t})});F.displayName=P;export{T as a,b,C as c,E as d,N as e,W as f,z as g,O as h,k as i,F as j};
|
package/dist/dialog.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
declare const Dialog: React.ForwardRefExoticComponent<DialogPrimitive.DialogProps & React.RefAttributes<never>>;
|
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DialogPortal: React.ForwardRefExoticComponent<DialogPrimitive.DialogPortalProps & React.RefAttributes<never>>;
|
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
-
showCloseButton?: boolean;
|
|
10
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const DialogHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const DialogFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
15
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
package/dist/dialog.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var H=Object.create;var m=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var U=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},p=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of I(t))!B.call(e,r)&&r!==a&&m(e,r,{get:()=>t[r],enumerable:!(n=_(t,r))||n.enumerable});return e};var f=(e,t,a)=>(a=e!=null?H(S(e)):{},p(t||!e||!e.__esModule?m(a,"default",{value:e,enumerable:!0}):a,e)),X=e=>p(m({},"__esModule",{value:!0}),e);var j={};U(j,{Dialog:()=>w,DialogClose:()=>b,DialogContent:()=>E,DialogDescription:()=>k,DialogFooter:()=>z,DialogHeader:()=>W,DialogOverlay:()=>c,DialogPortal:()=>d,DialogTitle:()=>O,DialogTrigger:()=>T});module.exports=X(j);var l=f(require("@radix-ui/react-dialog")),g=require("lucide-react"),s=f(require("react")),o=require("@stackshift-ui/system"),i=require("react/jsx-runtime"),R="Dialog",D="DialogTrigger",y="DialogPortal",u="DialogClose",v="DialogOverlay",P="DialogContent",C="DialogHeader",N="DialogFooter",h="DialogTitle",x="DialogDescription",w=s.forwardRef(({...e},t)=>{let{[R]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Root,ref:t,"data-slot":"dialog",...e})});w.displayName=R;var T=s.forwardRef(({...e},t)=>{let{[D]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Trigger,ref:t,"data-slot":"dialog-trigger",...e})});T.displayName=D;var d=s.forwardRef(({...e},t)=>{let{[y]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Portal,ref:t,"data-slot":"dialog-portal",...e})});d.displayName=y;var b=s.forwardRef(({...e},t)=>{let{[u]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Close,ref:t,"data-slot":"dialog-close",...e})});b.displayName=u;var c=s.forwardRef(({className:e,...t},a)=>{let{[v]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Overlay,ref:a,"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})});c.displayName=v;var E=s.forwardRef(({className:e,children:t,showCloseButton:a=!0,...n},r)=>{let{[P]:F=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,i.jsx)(c,{}),(0,i.jsxs)(F,{as:l.Content,ref:r,"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,a&&(0,i.jsxs)(l.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,i.jsx)(g.XIcon,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});E.displayName=P;var W=s.forwardRef(({className:e,...t},a)=>{let{[C]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{ref:a,"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})});W.displayName=C;var z=s.forwardRef(({className:e,...t},a)=>{let{[N]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{ref:a,"data-slot":"dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})});z.displayName=N;var O=s.forwardRef(({className:e,...t},a)=>{let{[h]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Title,ref:a,"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",e),...t})});O.displayName=h;var k=s.forwardRef(({className:e,...t},a)=>{let{[x]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Description,ref:a,"data-slot":"dialog-description",className:(0,o.cn)("text-muted-foreground text-sm",e),...t})});k.displayName=x;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
|
package/dist/dialog.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";import{a,b,c,d,e,f,g,h,i,j}from"./chunk-X66CH5UC.mjs";import"./chunk-3EYN2AKU.mjs";export{a as Dialog,d as DialogClose,f as DialogContent,j as DialogDescription,h as DialogFooter,g as DialogHeader,e as DialogOverlay,c as DialogPortal,i as DialogTitle,b as DialogTrigger};
|
package/dist/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dialog";
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";var H=Object.create;var m=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,B=Object.prototype.hasOwnProperty;var U=(e,t)=>{for(var a in t)m(e,a,{get:t[a],enumerable:!0})},p=(e,t,a,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of I(t))!B.call(e,s)&&s!==a&&m(e,s,{get:()=>t[s],enumerable:!(n=_(t,s))||n.enumerable});return e};var f=(e,t,a)=>(a=e!=null?H(S(e)):{},p(t||!e||!e.__esModule?m(a,"default",{value:e,enumerable:!0}):a,e)),X=e=>p(m({},"__esModule",{value:!0}),e);var j={};U(j,{Dialog:()=>w,DialogClose:()=>b,DialogContent:()=>E,DialogDescription:()=>k,DialogFooter:()=>z,DialogHeader:()=>W,DialogOverlay:()=>c,DialogPortal:()=>d,DialogTitle:()=>O,DialogTrigger:()=>T});module.exports=X(j);var l=f(require("@radix-ui/react-dialog")),g=require("lucide-react"),r=f(require("react")),o=require("@stackshift-ui/system"),i=require("react/jsx-runtime"),R="Dialog",D="DialogTrigger",y="DialogPortal",u="DialogClose",v="DialogOverlay",P="DialogContent",C="DialogHeader",N="DialogFooter",h="DialogTitle",x="DialogDescription",w=r.forwardRef(({...e},t)=>{let{[R]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Root,ref:t,"data-slot":"dialog",...e})});w.displayName=R;var T=r.forwardRef(({...e},t)=>{let{[D]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Trigger,ref:t,"data-slot":"dialog-trigger",...e})});T.displayName=D;var d=r.forwardRef(({...e},t)=>{let{[y]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Portal,ref:t,"data-slot":"dialog-portal",...e})});d.displayName=y;var b=r.forwardRef(({...e},t)=>{let{[u]:a=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(a,{as:l.Close,ref:t,"data-slot":"dialog-close",...e})});b.displayName=u;var c=r.forwardRef(({className:e,...t},a)=>{let{[v]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Overlay,ref:a,"data-slot":"dialog-overlay",className:(0,o.cn)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})});c.displayName=v;var E=r.forwardRef(({className:e,children:t,showCloseButton:a=!0,...n},s)=>{let{[P]:F=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,i.jsx)(c,{}),(0,i.jsxs)(F,{as:l.Content,ref:s,"data-slot":"dialog-content",className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,a&&(0,i.jsxs)(l.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,i.jsx)(g.XIcon,{}),(0,i.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});E.displayName=P;var W=r.forwardRef(({className:e,...t},a)=>{let{[C]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{ref:a,"data-slot":"dialog-header",className:(0,o.cn)("flex flex-col gap-2 text-center sm:text-left",e),...t})});W.displayName=C;var z=r.forwardRef(({className:e,...t},a)=>{let{[N]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{ref:a,"data-slot":"dialog-footer",className:(0,o.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})});z.displayName=N;var O=r.forwardRef(({className:e,...t},a)=>{let{[h]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Title,ref:a,"data-slot":"dialog-title",className:(0,o.cn)("text-lg leading-none font-semibold",e),...t})});O.displayName=h;var k=r.forwardRef(({className:e,...t},a)=>{let{[x]:n=o.DefaultComponent}=(0,o.useStackShiftUIComponents)();return(0,i.jsx)(n,{as:l.Description,ref:a,"data-slot":"dialog-description",className:(0,o.cn)("text-muted-foreground text-sm",e),...t})});k.displayName=x;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
|
package/dist/index.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";import{a as e,b as o,c as r,d as t,e as c,f,g as i,h as l,i as m,j as n}from"./chunk-X66CH5UC.mjs";import"./chunk-3EYN2AKU.mjs";export{e as Dialog,t as DialogClose,f as DialogContent,n as DialogDescription,l as DialogFooter,i as DialogHeader,c as DialogOverlay,r as DialogPortal,m as DialogTitle,o as DialogTrigger};
|
package/dist/setupTests.d.ts
DELETED