@lotte-innovate/ui-component-test 0.2.74 → 0.2.76
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/globals.css +1 -1
- package/dist/lib/components/Dialog/DialogAction.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogAction.js +2 -3
- package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
- package/dist/lib/components/Dialog/DialogCancel.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogCancel.js +2 -2
- package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
- package/dist/lib/components/Dialog/DialogContent.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogContent.js +8 -8
- package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
- package/dist/lib/components/Dialog/DialogDescription.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogDescription.js +2 -2
- package/dist/lib/components/Dialog/DialogDescription.mjs +1 -1
- package/dist/lib/components/Dialog/DialogRoot.d.ts +2 -5
- package/dist/lib/components/Dialog/DialogRoot.js +5 -5
- package/dist/lib/components/Dialog/DialogRoot.mjs +1 -1
- package/dist/lib/components/Dialog/DialogTitle.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogTitle.js +2 -2
- package/dist/lib/components/Dialog/DialogTitle.mjs +1 -1
- package/dist/lib/components/Dialog/DialogTrigger.d.ts +2 -2
- package/dist/lib/components/Dialog/DialogTrigger.js +2 -2
- package/dist/lib/components/Dialog/DialogTrigger.mjs +1 -1
- package/dist/lib/components/Dialog/index.d.ts +7 -10
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
export interface DialogActionProps extends VariantProps<typeof dialogActionVariants> {
|
|
5
5
|
}
|
|
@@ -8,4 +8,4 @@ export declare const dialogActionVariants: (props?: ({
|
|
|
8
8
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
|
9
9
|
color?: string | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
export declare const DialogAction: React.ForwardRefExoticComponent<Omit<
|
|
11
|
+
export declare const DialogAction: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & DialogActionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -23,12 +23,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef, useContext } from 'react';
|
|
26
|
-
import
|
|
26
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
27
27
|
import { cva } from 'class-variance-authority';
|
|
28
28
|
import { primaryColorStyle } from '../../../lib/constants';
|
|
29
29
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
|
30
30
|
import { DialogContext } from './DialogRoot';
|
|
31
|
-
import Text from '../../../lib/Typography/Text';
|
|
32
31
|
import { cn } from '../../../lib/utils/utils';
|
|
33
32
|
export var dialogActionVariants = cva('rounded-md inline-flex font-medium items-center justify-center px-[15px] hover:cursor-pointer', {
|
|
34
33
|
variants: {
|
|
@@ -57,6 +56,6 @@ export var DialogAction = forwardRef(function (_a, ref) {
|
|
|
57
56
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
58
57
|
var _b = useContext(DialogContext), radius = _b.radius, size = _b.size, color = _b.color;
|
|
59
58
|
var buttonClassName = cn(dialogActionVariants({ radius: radius, size: size, color: color }), className);
|
|
60
|
-
return (_jsx(
|
|
59
|
+
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: buttonClassName }, props, { children: children })));
|
|
61
60
|
});
|
|
62
61
|
DialogAction.displayName = 'Dialog.Action';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,useContext as
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,useContext as o}from"react";import*as t from"@radix-ui/react-dialog";import{cva as i}from"class-variance-authority";import{primaryColorStyle as n}from"../../constants.mjs";import{MAIN_COLOR as a}from"../../color/constants.mjs";import{DialogContext as l}from"./DialogRoot.mjs";import{cn as s}from"../../utils/utils.mjs";var m=function(){return m=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},m.apply(this,arguments)},p=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},c=i("rounded-md inline-flex font-medium items-center justify-center px-[15px] hover:cursor-pointer",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-full"},size:{small:"text-xs w-[52px] h-[24px] px-2",medium:"text-sm w-[66px] h-[32px] px-3",large:"text-base w-[72px] h-[32px] px-3","x-large":"text-lg w-[86px] h-[40px] px-6"},color:n()},defaultVariants:{radius:"medium",size:"medium",color:a}}),u=e((function(e,i){var n=e.children,a=e.className,u=p(e,["children","className"]),d=o(l),f=d.radius,x=d.size,y=d.color,h=s(c({radius:f,size:x,color:y}),a);return r(t.Close,m({ref:i,className:h},u,{children:n}))}));u.displayName="Dialog.Action";export{u as DialogAction,c as dialogActionVariants};
|
|
3
3
|
//# sourceMappingURL=DialogAction.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
export interface DialogCancelProps extends VariantProps<typeof dialogCancelVariants> {
|
|
5
5
|
}
|
|
@@ -7,4 +7,4 @@ export declare const dialogCancelVariants: (props?: ({
|
|
|
7
7
|
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
|
8
8
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
10
|
-
export declare const DialogCancel: React.ForwardRefExoticComponent<Omit<
|
|
10
|
+
export declare const DialogCancel: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & DialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef, useContext } from 'react';
|
|
26
|
-
import
|
|
26
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
27
27
|
import { cva } from 'class-variance-authority';
|
|
28
28
|
import { DialogContext } from './DialogRoot';
|
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
|
@@ -52,6 +52,6 @@ export var dialogCancelVariants = cva("rounded-md font-medium inline-flex justif
|
|
|
52
52
|
export var DialogCancel = forwardRef(function (_a, ref) {
|
|
53
53
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
54
54
|
var _b = useContext(DialogContext), radius = _b.radius, size = _b.size;
|
|
55
|
-
return (_jsx(
|
|
55
|
+
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: cn(dialogCancelVariants({ radius: radius, size: size }), className) }, props, { children: typeof children === 'string' ? _jsx(Text, { children: children }) : children })));
|
|
56
56
|
});
|
|
57
57
|
DialogCancel.displayName = 'Dialog.Cancel';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as r,useContext as t}from"react";import
|
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as r,useContext as t}from"react";import*as o from"@radix-ui/react-dialog";import{cva as a}from"class-variance-authority";import{DialogContext as n}from"./DialogRoot.mjs";import{cn as i}from"../../utils/utils.mjs";import{Text as l}from"../../Typography/Text/index.mjs";var s=function(){return s=Object.assign||function(e){for(var r,t=1,o=arguments.length;t<o;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},s.apply(this,arguments)},m=function(e,r){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)r.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},p=a("rounded-md font-medium inline-flex justify-center items-center text-slate-11 bg-slate-3 outline-none border-none\n dark:text-slateDark-11 dark:bg-slateDark-3 dark:hover:bg-slateDarkA-4\n active:border-none hover:cursor-pointer hover:bg-slateA-4",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-full"},size:{small:"text-xs w-[52px] h-[24px] px-2 mr-2",medium:"text-sm w-[66px] h-[32px] px-3 mr-2",large:"text-base w-[72px] h-[32px] px-3 mr-3","x-large":"text-lg w-[86px] h-[40px] px-6 mr-4"}},defaultVariants:{radius:"medium",size:"medium"}}),d=r((function(r,a){var d=r.children,u=r.className,c=m(r,["children","className"]),x=t(n),f=x.radius,g=x.size;return e(o.Close,s({ref:a,className:i(p({radius:f,size:g}),u)},c,{children:"string"==typeof d?e(l,{children:d}):d}))}));d.displayName="Dialog.Cancel";export{d as DialogCancel,p as dialogCancelVariants};
|
|
3
3
|
//# sourceMappingURL=DialogCancel.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
export interface DialogContentProps extends VariantProps<typeof dialogContentVariants> {
|
|
5
5
|
}
|
|
6
6
|
export declare const dialogContentVariants: (props?: ({
|
|
@@ -8,4 +8,4 @@ export declare const dialogContentVariants: (props?: ({
|
|
|
8
8
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
|
9
9
|
scaling?: "90%" | "95%" | "100%" | "105%" | "110%" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
11
|
-
export declare const DialogContent: React.ForwardRefExoticComponent<Omit<
|
|
11
|
+
export declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & DialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -21,14 +21,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
}
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef, useContext } from 'react';
|
|
26
26
|
import { cva } from 'class-variance-authority';
|
|
27
|
-
import
|
|
27
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
28
28
|
import { scalingVariants } from '../../../lib/constants';
|
|
29
29
|
import { DialogContext } from './DialogRoot';
|
|
30
30
|
import { cn } from '../../../lib/utils/utils';
|
|
31
|
-
export var dialogContentVariants = cva("
|
|
31
|
+
export var dialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[50%] focus:outline-none\n translate-x-[-50%] translate-y-[-50%] data-[state=open]:animate-contentShow bg-white dark:bg-slateDark-1 \n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px]", {
|
|
32
32
|
variants: {
|
|
33
33
|
radius: {
|
|
34
34
|
none: 'rounded-none',
|
|
@@ -38,10 +38,10 @@ export var dialogContentVariants = cva("rounded-md focus:outline-none bg-white d
|
|
|
38
38
|
full: 'rounded-xl',
|
|
39
39
|
},
|
|
40
40
|
size: {
|
|
41
|
-
small: 'w-[300px]',
|
|
42
|
-
medium: 'w-[400px]',
|
|
43
|
-
large: 'w-[500px]',
|
|
44
|
-
'x-large': 'w-[600px]',
|
|
41
|
+
small: 'p-3 w-[300px]',
|
|
42
|
+
medium: 'p-4 w-[400px]',
|
|
43
|
+
large: 'p-5 w-[500px]',
|
|
44
|
+
'x-large': 'p-6 w-[600px]',
|
|
45
45
|
},
|
|
46
46
|
scaling: __assign({}, scalingVariants),
|
|
47
47
|
},
|
|
@@ -53,6 +53,6 @@ export var dialogContentVariants = cva("rounded-md focus:outline-none bg-white d
|
|
|
53
53
|
export var DialogContent = forwardRef(function (_a, forwardedRef) {
|
|
54
54
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
55
55
|
var _b = useContext(DialogContext), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
|
56
|
-
return (_jsx(
|
|
56
|
+
return (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 bg-[#00000066] data-[state=open]:animate-overlayShow" }), _jsx(DialogPrimitive.Content, __assign({ ref: forwardedRef, "aria-describedby": undefined, className: cn(dialogContentVariants({ radius: radius, scaling: scaling, size: size }), className) }, props, { children: children }))] }));
|
|
57
57
|
});
|
|
58
58
|
DialogContent.displayName = 'Dialog.Content';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as
|
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a,useContext as t}from"react";import{cva as n}from"class-variance-authority";import*as o from"@radix-ui/react-dialog";import{scalingVariants as i}from"../../constants.mjs";import{DialogContext as l}from"./DialogRoot.mjs";import{cn as s}from"../../utils/utils.mjs";var p=function(){return p=Object.assign||function(e){for(var r,a=1,t=arguments.length;a<t;a++)for(var n in r=arguments[a])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},p.apply(this,arguments)},m=function(e,r){var a={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(a[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)r.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(a[t[n]]=e[t[n]])}return a},d=n("fixed max-h-[85vh] top-[50%] left-[50%] focus:outline-none\n translate-x-[-50%] translate-y-[-50%] data-[state=open]:animate-contentShow bg-white dark:bg-slateDark-1 \n shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px]",{variants:{radius:{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-xl"},size:{small:"p-3 w-[300px]",medium:"p-4 w-[400px]",large:"p-5 w-[500px]","x-large":"p-6 w-[600px]"},scaling:p({},i)},defaultVariants:{radius:"medium",size:"medium"}}),c=a((function(a,n){var i=a.children,c=a.className,u=m(a,["children","className"]),f=t(l),x=f.radius,g=f.size,h=f.scaling;return e(o.Portal,{children:[r(o.Overlay,{className:"fixed inset-0 bg-[#00000066] data-[state=open]:animate-overlayShow"}),r(o.Content,p({ref:n,"aria-describedby":void 0,className:s(d({radius:x,scaling:h,size:g}),c)},u,{children:i}))]})}));c.displayName="Dialog.Content";export{c as DialogContent,d as dialogContentVariants};
|
|
3
3
|
//# sourceMappingURL=DialogContent.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import
|
|
3
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
export interface DialogDescriptionProps extends VariantProps<typeof dialogDescriptionVariants> {
|
|
5
5
|
}
|
|
6
6
|
export declare const dialogDescriptionVariants: (props?: ({
|
|
7
7
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
|
-
export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<
|
|
9
|
+
export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -24,7 +24,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef, useContext } from 'react';
|
|
26
26
|
import { cva } from 'class-variance-authority';
|
|
27
|
-
import
|
|
27
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
28
28
|
import { DialogContext } from './DialogRoot';
|
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
|
30
30
|
export var dialogDescriptionVariants = cva('font-normal text-slate-12 dark:text-slateDark-12', {
|
|
@@ -43,6 +43,6 @@ export var dialogDescriptionVariants = cva('font-normal text-slate-12 dark:text-
|
|
|
43
43
|
export var DialogDescription = forwardRef(function (_a, ref) {
|
|
44
44
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
45
45
|
var size = useContext(DialogContext).size;
|
|
46
|
-
return (_jsx(
|
|
46
|
+
return (_jsx(DialogPrimitive.Description, __assign({ ref: ref, className: cn(dialogDescriptionVariants({ size: size }), className) }, props, { children: children })));
|
|
47
47
|
});
|
|
48
48
|
DialogDescription.displayName = 'Dialog.Description';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useContext as e}from"react";import{cva as a}from"class-variance-authority";import
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useContext as e}from"react";import{cva as a}from"class-variance-authority";import*as o from"@radix-ui/react-dialog";import{DialogContext as i}from"./DialogRoot.mjs";import{cn as n}from"../../utils/utils.mjs";var s=function(){return s=Object.assign||function(t){for(var r,e=1,a=arguments.length;e<a;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},s.apply(this,arguments)},l=function(t,r){var e={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(e[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(t);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(e[a[o]]=t[a[o]])}return e},m=a("font-normal text-slate-12 dark:text-slateDark-12",{variants:{size:{small:"text-xs mb-3",medium:"text-sm mb-4",large:"text-base mb-5","x-large":"text-lg mb-6"}},defaultVariants:{size:"medium"}}),c=r((function(r,a){var c=r.children,p=r.className,f=l(r,["children","className"]),u=e(i).size;return t(o.Description,s({ref:a,className:n(m({size:u}),p)},f,{children:c}))}));c.displayName="Dialog.Description";export{c as DialogDescription,m as dialogDescriptionVariants};
|
|
3
3
|
//# sourceMappingURL=DialogDescription.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import { dialogContentVariants } from './DialogContent';
|
|
@@ -7,7 +7,4 @@ export interface DialogProps extends VariantProps<typeof dialogContentVariants>
|
|
|
7
7
|
color?: IColor;
|
|
8
8
|
}
|
|
9
9
|
export declare const DialogContext: React.Context<DialogProps>;
|
|
10
|
-
export declare const DialogRoot:
|
|
11
|
-
({ children, radius, size, scaling, color, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Root> & DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
displayName: string;
|
|
13
|
-
};
|
|
10
|
+
export declare const DialogRoot: React.ForwardRefExoticComponent<DialogPrimitive.DialogProps & DialogProps & React.RefAttributes<never>>;
|
|
@@ -22,8 +22,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
return t;
|
|
23
23
|
};
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
|
-
import { createContext } from 'react';
|
|
26
|
-
import
|
|
25
|
+
import { forwardRef, createContext } from 'react';
|
|
26
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
27
27
|
import { useTheme } from '../../../lib/theme';
|
|
28
28
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
|
29
29
|
export var DialogContext = createContext({
|
|
@@ -32,7 +32,7 @@ export var DialogContext = createContext({
|
|
|
32
32
|
color: MAIN_COLOR,
|
|
33
33
|
radius: 'medium',
|
|
34
34
|
});
|
|
35
|
-
export var DialogRoot = function (_a) {
|
|
35
|
+
export var DialogRoot = forwardRef(function (_a, ref) {
|
|
36
36
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, ["children", "radius", "size", "scaling", "color"]);
|
|
37
37
|
var theme = useTheme().theme;
|
|
38
38
|
var contextValue = {
|
|
@@ -41,6 +41,6 @@ export var DialogRoot = function (_a) {
|
|
|
41
41
|
color: color !== null && color !== void 0 ? color : theme.themeColor,
|
|
42
42
|
size: size,
|
|
43
43
|
};
|
|
44
|
-
return (_jsx(
|
|
45
|
-
};
|
|
44
|
+
return (_jsx(DialogContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(DialogPrimitive.Root, __assign({}, props, { children: children })) }) }));
|
|
45
|
+
});
|
|
46
46
|
DialogRoot.displayName = 'Dialog.Root';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{createContext as e}from"react";import
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{createContext as e,forwardRef as o}from"react";import*as t from"@radix-ui/react-dialog";import{useTheme as i}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as n}from"../../color/constants.mjs";var l=function(){return l=Object.assign||function(r){for(var e,o=1,t=arguments.length;o<t;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},l.apply(this,arguments)},a=function(r,e){var o={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(o[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(r);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(o[t[i]]=r[t[i]])}return o},c=e({size:"medium",scaling:"100%",color:n,radius:"medium"}),s=o((function(e,o){var n=e.children,s=e.radius,m=e.size,u=e.scaling,p=e.color,d=a(e,["children","radius","size","scaling","color"]),f=i().theme,h={radius:null!=s?s:f.themeRadius,scaling:null!=u?u:f.themeScaling,color:null!=p?p:f.themeColor,size:m};return r(c.Provider,{value:h,children:r("div",{ref:o,children:r(t.Root,l({},d,{children:n}))})})}));s.displayName="Dialog.Root";export{c as DialogContext,s as DialogRoot};
|
|
3
3
|
//# sourceMappingURL=DialogRoot.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
|
4
4
|
export interface DialogTitleProps extends VariantProps<typeof dialogTitleVariants> {
|
|
5
5
|
}
|
|
6
6
|
export declare const dialogTitleVariants: (props?: ({
|
|
7
7
|
size?: "small" | "medium" | "large" | "x-large" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
9
|
-
export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<
|
|
9
|
+
export declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef, useContext } from 'react';
|
|
26
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
26
27
|
import { cva } from 'class-variance-authority';
|
|
27
|
-
import { Dialog as DialogTheme } from '@radix-ui/themes';
|
|
28
28
|
import { DialogContext } from './DialogRoot';
|
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
|
30
30
|
export var dialogTitleVariants = cva('font-bold text-slate-12 dark:text-slateDark-12', {
|
|
@@ -43,6 +43,6 @@ export var dialogTitleVariants = cva('font-bold text-slate-12 dark:text-slateDar
|
|
|
43
43
|
export var DialogTitle = forwardRef(function (_a, ref) {
|
|
44
44
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
45
45
|
var size = useContext(DialogContext).size;
|
|
46
|
-
return (_jsx(
|
|
46
|
+
return (_jsx(DialogPrimitive.Title, __assign({ ref: ref, className: cn(dialogTitleVariants({ size: size }), className) }, props, { children: children })));
|
|
47
47
|
});
|
|
48
48
|
DialogTitle.displayName = 'Dialog.Title';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useContext as e}from"react";import
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{forwardRef as r,useContext as e}from"react";import*as a from"@radix-ui/react-dialog";import{cva as o}from"class-variance-authority";import{DialogContext as i}from"./DialogRoot.mjs";import{cn as l}from"../../utils/utils.mjs";var n=function(){return n=Object.assign||function(t){for(var r,e=1,a=arguments.length;e<a;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},n.apply(this,arguments)},s=function(t,r){var e={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(e[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(t);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(e[a[o]]=t[a[o]])}return e},m=o("font-bold text-slate-12 dark:text-slateDark-12",{variants:{size:{small:"text-sm",medium:"text-lg",large:"text-xl","x-large":"text-2xl"}},defaultVariants:{size:"medium"}}),c=r((function(r,o){var c=r.children,p=r.className,f=s(r,["children","className"]),u=e(i).size;return t(a.Title,n({ref:o,className:l(m({size:u}),p)},f,{children:c}))}));c.displayName="Dialog.Title";export{c as DialogTitle,m as dialogTitleVariants};
|
|
3
3
|
//# sourceMappingURL=DialogTitle.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -23,9 +23,9 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
};
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
import { forwardRef } from 'react';
|
|
26
|
-
import
|
|
26
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
27
27
|
export var DialogTrigger = forwardRef(function (_a, ref) {
|
|
28
28
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
|
29
|
-
return (_jsx(
|
|
29
|
+
return (_jsx(DialogPrimitive.Trigger, __assign({ ref: ref, className: className }, props, { children: children })));
|
|
30
30
|
});
|
|
31
31
|
DialogTrigger.displayName = 'Dialog.Trigger';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import
|
|
2
|
+
import{jsx as r}from"react/jsx-runtime";import{forwardRef as e}from"react";import*as t from"@radix-ui/react-dialog";var o=function(){return o=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},o.apply(this,arguments)},n=function(r,e){var t={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(t[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(r);n<o.length;n++)e.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(r,o[n])&&(t[o[n]]=r[o[n]])}return t},a=e((function(e,a){var i=e.children,c=e.className,l=n(e,["children","className"]);return r(t.Trigger,o({ref:a,className:c},l,{children:i}))}));a.displayName="Dialog.Trigger";export{a as DialogTrigger};
|
|
3
3
|
//# sourceMappingURL=DialogTrigger.mjs.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const Dialog: {
|
|
3
|
-
Root:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Content: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/dialog").ContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./DialogContent").DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
-
Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/dialog").TitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("./DialogTitle").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
10
|
-
Description: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/themes/dist/cjs/components/dialog").DescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("./DialogDescription").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
3
|
+
Root: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogProps & import("./DialogRoot").DialogProps & import("react").RefAttributes<never>>;
|
|
4
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
Content: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./DialogContent").DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("./DialogTitle").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("./DialogDescription").DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
11
8
|
Slot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("./DialogSlot").DialogSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
-
Cancel: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/
|
|
13
|
-
Action: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/
|
|
9
|
+
Cancel: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./DialogCancel").DialogCancelProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
Action: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("./DialogAction").DialogActionProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
14
11
|
};
|
|
15
12
|
export default Dialog;
|