@stackshift-ui/dialog 1.0.0-beta.2 → 1.0.0-beta.4

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.
@@ -0,0 +1,37 @@
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
+ };
@@ -0,0 +1,154 @@
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
+ };
@@ -0,0 +1 @@
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 CHANGED
@@ -1,45 +1,15 @@
1
1
  import * as DialogPrimitive from "@radix-ui/react-dialog";
2
2
  import * as React from "react";
3
- declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
- declare namespace Dialog {
5
- var displayName: string;
6
- }
7
- declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
8
- declare namespace DialogTrigger {
9
- var displayName: string;
10
- }
11
- declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
12
- declare namespace DialogPortal {
13
- var displayName: string;
14
- }
15
- declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
16
- declare namespace DialogClose {
17
- var displayName: string;
18
- }
19
- declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
20
- declare namespace DialogOverlay {
21
- var displayName: string;
22
- }
23
- declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
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"> & {
24
9
  showCloseButton?: boolean;
25
- }): import("react/jsx-runtime").JSX.Element;
26
- declare namespace DialogContent {
27
- var displayName: string;
28
- }
29
- declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
30
- declare namespace DialogHeader {
31
- var displayName: string;
32
- }
33
- declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
34
- declare namespace DialogFooter {
35
- var displayName: string;
36
- }
37
- declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
38
- declare namespace DialogTitle {
39
- var displayName: string;
40
- }
41
- declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
42
- declare namespace DialogDescription {
43
- var displayName: string;
44
- }
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>>;
45
15
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
package/dist/dialog.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var F=Object.create;var r=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var B=(o,t)=>{for(var e in t)r(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _(t))!S.call(o,s)&&s!==e&&r(o,s,{get:()=>t[s],enumerable:!(l=H(t,s))||l.enumerable});return o};var U=(o,t,e)=>(e=o!=null?F(I(o)):{},p(t||!o||!o.__esModule?r(e,"default",{value:o,enumerable:!0}):e,o)),X=o=>p(r({},"__esModule",{value:!0}),o);var j={};B(j,{Dialog:()=>R,DialogClose:()=>T,DialogContent:()=>h,DialogDescription:()=>O,DialogFooter:()=>z,DialogHeader:()=>w,DialogOverlay:()=>m,DialogPortal:()=>d,DialogTitle:()=>k,DialogTrigger:()=>b});module.exports=X(j);var n=U(require("@radix-ui/react-dialog")),g=require("lucide-react"),a=require("@stackshift-ui/system"),i=require("react/jsx-runtime"),c="Dialog",f="DialogTrigger",u="DialogPortal",D="DialogClose",y="DialogOverlay",C="DialogContent",P="DialogHeader",v="DialogFooter",N="DialogTitle",x="DialogDescription";function R({...o}){let{[c]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Root,"data-slot":"dialog",...o})}R.displayName=c;function b({...o}){let{[f]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Trigger,"data-slot":"dialog-trigger",...o})}b.displayName=f;function d({...o}){let{[u]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Portal,"data-slot":"dialog-portal",...o})}d.displayName=u;function T({...o}){let{[D]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Close,"data-slot":"dialog-close",...o})}T.displayName=D;function m({className:o,...t}){let{[y]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Overlay,"data-slot":"dialog-overlay",className:(0,a.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",o),...t})}m.displayName=y;function h({className:o,children:t,showCloseButton:e=!0,...l}){let{[C]:s=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,i.jsx)(m,{}),(0,i.jsxs)(s,{as:n.Content,"data-slot":"dialog-content",className:(0,a.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",o),...l,children:[t,e&&(0,i.jsxs)(n.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"})]})]})]})}h.displayName=C;function w({className:o,...t}){let{[P]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2 text-center sm:text-left",o),...t})}w.displayName=P;function z({className:o,...t}){let{[v]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",o),...t})}z.displayName=v;function k({className:o,...t}){let{[N]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Title,"data-slot":"dialog-title",className:(0,a.cn)("text-lg leading-none font-semibold",o),...t})}k.displayName=N;function O({className:o,...t}){let{[x]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Description,"data-slot":"dialog-description",className:(0,a.cn)("text-muted-foreground text-sm",o),...t})}O.displayName=x;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
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 CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a,b,c,d,e,f,g,h,i,j}from"./chunk-2VQY25ZS.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};
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.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var F=Object.create;var r=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty;var B=(o,t)=>{for(var e in t)r(o,e,{get:t[e],enumerable:!0})},p=(o,t,e,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of _(t))!S.call(o,s)&&s!==e&&r(o,s,{get:()=>t[s],enumerable:!(l=H(t,s))||l.enumerable});return o};var U=(o,t,e)=>(e=o!=null?F(I(o)):{},p(t||!o||!o.__esModule?r(e,"default",{value:o,enumerable:!0}):e,o)),X=o=>p(r({},"__esModule",{value:!0}),o);var j={};B(j,{Dialog:()=>R,DialogClose:()=>T,DialogContent:()=>h,DialogDescription:()=>O,DialogFooter:()=>z,DialogHeader:()=>w,DialogOverlay:()=>m,DialogPortal:()=>d,DialogTitle:()=>k,DialogTrigger:()=>b});module.exports=X(j);var n=U(require("@radix-ui/react-dialog")),g=require("lucide-react"),a=require("@stackshift-ui/system"),i=require("react/jsx-runtime"),c="Dialog",f="DialogTrigger",u="DialogPortal",D="DialogClose",y="DialogOverlay",C="DialogContent",P="DialogHeader",v="DialogFooter",N="DialogTitle",x="DialogDescription";function R({...o}){let{[c]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Root,"data-slot":"dialog",...o})}R.displayName=c;function b({...o}){let{[f]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Trigger,"data-slot":"dialog-trigger",...o})}b.displayName=f;function d({...o}){let{[u]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Portal,"data-slot":"dialog-portal",...o})}d.displayName=u;function T({...o}){let{[D]:t=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(t,{as:n.Close,"data-slot":"dialog-close",...o})}T.displayName=D;function m({className:o,...t}){let{[y]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Overlay,"data-slot":"dialog-overlay",className:(0,a.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",o),...t})}m.displayName=y;function h({className:o,children:t,showCloseButton:e=!0,...l}){let{[C]:s=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsxs)(d,{"data-slot":"dialog-portal",children:[(0,i.jsx)(m,{}),(0,i.jsxs)(s,{as:n.Content,"data-slot":"dialog-content",className:(0,a.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",o),...l,children:[t,e&&(0,i.jsxs)(n.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"})]})]})]})}h.displayName=C;function w({className:o,...t}){let{[P]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2 text-center sm:text-left",o),...t})}w.displayName=P;function z({className:o,...t}){let{[v]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",o),...t})}z.displayName=v;function k({className:o,...t}){let{[N]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Title,"data-slot":"dialog-title",className:(0,a.cn)("text-lg leading-none font-semibold",o),...t})}k.displayName=N;function O({className:o,...t}){let{[x]:e=a.DefaultComponent}=(0,a.useStackShiftUIComponents)();return(0,i.jsx)(e,{as:n.Description,"data-slot":"dialog-description",className:(0,a.cn)("text-muted-foreground text-sm",o),...t})}O.displayName=x;0&&(module.exports={Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger});
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 CHANGED
@@ -1,2 +1,2 @@
1
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-2VQY25ZS.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};
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};