@lotte-innovate/ui-component-test 0.2.75 → 0.2.77

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,6 +53,6 @@ export var dialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[50%]
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 (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 bg-black/40 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 }))] }));
56
+ return (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { style: { backgroundColor: '#00000066' }, className: "fixed inset-0 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{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-black/40 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};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as a,useContext as t}from"react";import{cva as o}from"class-variance-authority";import*as n 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 o in r=arguments[a])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);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 o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(a[t[o]]=e[t[o]])}return a},d=o("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,o){var i=a.children,c=a.className,u=m(a,["children","className"]),f=t(l),x=f.radius,y=f.size,g=f.scaling;return e(n.Portal,{children:[r(n.Overlay,{style:{backgroundColor:"#00000066"},className:"fixed inset-0 data-[state=open]:animate-overlayShow"}),r(n.Content,p({ref:o,"aria-describedby":void 0,className:s(d({radius:x,scaling:g,size:y}),c)},u,{children:i}))]})}));c.displayName="Dialog.Content";export{c as DialogContent,d as dialogContentVariants};
3
3
  //# sourceMappingURL=DialogContent.mjs.map
@@ -1,4 +1,4 @@
1
- import React, { ComponentPropsWithoutRef } from '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,7 +22,7 @@ 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';
25
+ import { forwardRef, createContext } from 'react';
26
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';
@@ -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(DialogContext.Provider, { value: contextValue, children: _jsx(DialogPrimitive.Root, __assign({}, props, { children: children })) }));
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*as o from"@radix-ui/react-dialog";import{useTheme as t}from"../../theme/ThemeProvider.mjs";import{MAIN_COLOR as i}from"../../color/constants.mjs";var n=function(){return n=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},n.apply(this,arguments)},l=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},a=e({size:"medium",scaling:"100%",color:i,radius:"medium"}),c=function(e){var i=e.children,c=e.radius,s=e.size,m=e.scaling,u=e.color,p=l(e,["children","radius","size","scaling","color"]),d=t().theme,f={radius:null!=c?c:d.themeRadius,scaling:null!=m?m:d.themeScaling,color:null!=u?u:d.themeColor,size:s};return r(a.Provider,{value:f,children:r(o.Root,n({},p,{children:i}))})};c.displayName="Dialog.Root";export{a as DialogContext,c as DialogRoot};
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,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const Dialog: {
3
- Root: {
4
- ({ children, radius, size, scaling, color, ...props }: import("@radix-ui/react-dialog").DialogProps & import("./DialogRoot").DialogProps): import("react/jsx-runtime").JSX.Element;
5
- displayName: string;
6
- };
3
+ Root: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogProps & import("./DialogRoot").DialogProps & import("react").RefAttributes<never>>;
7
4
  Trigger: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
8
5
  Content: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("./DialogContent").DialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
9
6
  Title: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("./DialogTitle").DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;