@lotte-innovate/ui-component-test 0.2.79 → 0.2.81
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/globals.css +2 -2
- package/dist/lib/components/AlertDialog/AlertDialogContent.js +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogContent.mjs +1 -1
- package/dist/lib/components/Calendar/index.d.ts +6 -2
- package/dist/lib/components/Calendar/index.js +17 -4
- package/dist/lib/components/Calendar/index.mjs +1 -1
- package/dist/lib/components/Datepicker/index.d.ts +3 -2
- package/dist/lib/components/Datepicker/index.js +4 -4
- package/dist/lib/components/Datepicker/index.mjs +1 -1
- package/dist/lib/components/DatetimePicker/index.d.ts +25 -0
- package/dist/lib/components/DatetimePicker/index.js +86 -0
- package/dist/lib/components/DatetimePicker/index.mjs +3 -0
- package/dist/lib/components/DatetimePicker/index.mjs.map +1 -0
- package/dist/lib/components/Editor/index.d.ts +1 -0
- package/dist/lib/components/Editor/index.js +15 -10
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/components/Grid/index.js +5 -2
- package/dist/lib/components/Grid/index.mjs +1 -1
- package/dist/lib/components/Grid/useGrid.js +15 -8
- package/dist/lib/components/Grid/useGrid.mjs +1 -1
- package/dist/lib/components/Modal/ModalAction.js +1 -1
- package/dist/lib/components/Modal/ModalAction.mjs +1 -1
- package/dist/lib/components/Modal/ModalContent.js +2 -2
- package/dist/lib/components/Modal/ModalContent.mjs +1 -1
- package/dist/lib/components/Modal/ModalOverlay.d.ts +3 -0
- package/dist/lib/components/Modal/ModalOverlay.js +31 -0
- package/dist/lib/components/Modal/ModalOverlay.mjs +2 -0
- package/dist/lib/components/Modal/ModalOverlay.mjs.map +1 -0
- package/dist/lib/components/Modal/ModalPortal.d.ts +6 -0
- package/dist/lib/components/Modal/ModalPortal.js +29 -0
- package/dist/lib/components/Modal/ModalPortal.mjs +2 -0
- package/dist/lib/components/Modal/ModalPortal.mjs.map +1 -0
- package/dist/lib/components/Modal/index.d.ts +5 -0
- package/dist/lib/components/Modal/index.js +4 -0
- package/dist/lib/components/Modal/index.mjs +1 -1
- package/dist/lib/components/Modal/index.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverContent.js +2 -1
- package/dist/lib/components/Popover/PopoverContent.mjs +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.js +1 -0
- package/dist/lib/index.mjs +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
@@ -47,6 +47,6 @@ export var alertDialogContentVariants = cva("fixed max-h-[85vh] top-[50%] left-[
|
|
47
47
|
export var AlertDialogContent = forwardRef(function (_a, ref) {
|
48
48
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
49
49
|
var _b = useAlertDialogContext(), radius = _b.radius, size = _b.size, scaling = _b.scaling;
|
50
|
-
return (_jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogPrimitive.Overlay, { className: "fixed inset-0 data-[state=open]:animate-overlayShow" }), _jsx(AlertDialogPrimitive.Content, __assign({ className: cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className), ref: ref }, props, { children: children }))] }));
|
50
|
+
return (_jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogPrimitive.Overlay, { style: { backgroundColor: '#00000066' }, className: "fixed inset-0 data-[state=open]:animate-overlayShow" }), _jsx(AlertDialogPrimitive.Content, __assign({ className: cn(alertDialogContentVariants({ radius: radius, size: size, scaling: scaling }), className), ref: ref }, props, { children: children }))] }));
|
51
51
|
});
|
52
52
|
AlertDialogContent.displayName = 'AlertDialog.Content';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as
|
2
|
+
import{jsxs as r,jsx as t}from"react/jsx-runtime";import{forwardRef as a}from"react";import*as e from"@radix-ui/react-alert-dialog";import{cva as o}from"class-variance-authority";import{cn as n}from"../../utils/utils.mjs";import{scalingVariants as i,radiusVariants as l}from"../../constants.mjs";import{useAlertDialogContext as s}from"./AlertDialogRoot.mjs";var p=function(){return p=Object.assign||function(r){for(var t,a=1,e=arguments.length;a<e;a++)for(var o in t=arguments[a])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},p.apply(this,arguments)},c=function(r,t){var a={};for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&t.indexOf(e)<0&&(a[e]=r[e]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(r);o<e.length;o++)t.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(r,e[o])&&(a[e[o]]=r[e[o]])}return a},m=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:{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),radius:p({},l["extra-large"])},defaultVariants:{radius:"large",size:"large"}}),f=a((function(a,o){var i=a.className,l=a.children,f=c(a,["className","children"]),u=s(),x=u.radius,d=u.size,g=u.scaling;return r(e.Portal,{children:[t(e.Overlay,{style:{backgroundColor:"#00000066"},className:"fixed inset-0 data-[state=open]:animate-overlayShow"}),t(e.Content,p({className:n(m({radius:x,size:d,scaling:g}),i),ref:o},f,{children:l}))]})}));f.displayName="AlertDialog.Content";export{f as AlertDialogContent,m as alertDialogContentVariants};
|
3
3
|
//# sourceMappingURL=AlertDialogContent.mjs.map
|
@@ -1,11 +1,15 @@
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
1
2
|
import { ComponentPropsWithoutRef } from 'react';
|
2
3
|
import { DayPicker } from 'react-day-picker';
|
3
4
|
import { IColor } from '../../../lib/types';
|
4
|
-
export interface CalendarProps {
|
5
|
+
export interface CalendarProps extends VariantProps<typeof calendarVariants> {
|
5
6
|
color?: IColor;
|
6
7
|
}
|
8
|
+
declare const calendarVariants: (props?: ({
|
9
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
10
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
7
11
|
export declare const Calendar: {
|
8
|
-
({ className, classNames, showOutsideDays, color, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & CalendarProps): import("react/jsx-runtime").JSX.Element;
|
12
|
+
({ className, classNames, showOutsideDays, color, radius, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & CalendarProps): import("react/jsx-runtime").JSX.Element;
|
9
13
|
displayName: string;
|
10
14
|
};
|
11
15
|
export default Calendar;
|
@@ -23,17 +23,30 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
};
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
25
25
|
import { ChevronLeftIcon, ChevronRightIcon } from '@radix-ui/react-icons';
|
26
|
+
import { cva } from 'class-variance-authority';
|
26
27
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
28
|
+
import { radiusVariants } from '../../../lib/constants';
|
27
29
|
import { DayPicker } from 'react-day-picker';
|
28
30
|
import { cn } from '../../../lib/utils/utils';
|
29
31
|
import { ko } from 'date-fns/locale';
|
30
32
|
import { useTheme } from '../../../lib/theme';
|
33
|
+
var calendarVariants = cva('', {
|
34
|
+
variants: {
|
35
|
+
radius: __assign({}, radiusVariants['base']),
|
36
|
+
},
|
37
|
+
defaultVariants: {
|
38
|
+
radius: 'medium',
|
39
|
+
},
|
40
|
+
});
|
31
41
|
export var Calendar = function (_a) {
|
32
|
-
var _b;
|
33
|
-
var className = _a.className, classNames = _a.classNames,
|
42
|
+
var _b, _c;
|
43
|
+
var className = _a.className, classNames = _a.classNames, _d = _a.showOutsideDays, showOutsideDays = _d === void 0 ? true : _d, color = _a.color, radius = _a.radius, props = __rest(_a, ["className", "classNames", "showOutsideDays", "color", "radius"]);
|
34
44
|
var theme = useTheme().theme;
|
35
|
-
|
36
|
-
|
45
|
+
var contextValue = {
|
46
|
+
radius: (_b = radius !== null && radius !== void 0 ? radius : theme.themeRadius) !== null && _b !== void 0 ? _b : 'medium',
|
47
|
+
color: (_c = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _c !== void 0 ? _c : MAIN_COLOR,
|
48
|
+
};
|
49
|
+
return (_jsx(DayPicker, __assign({ locale: ko, showOutsideDays: showOutsideDays, className: cn('w-[280px] p-3 text-slate-12 dark:text-slateDark-12', className), classNames: __assign({ months: 'flex flex-row space-y-4 sm:space-x-4 sm:space-y-0 place-content-center', month: 'space-y-4', caption: 'flex justify-center pt-1 relative items-center', caption_label: 'text-sm font-semibold', nav: 'space-x-1 flex items-center', nav_button: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input h-10 px-4 py-2 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100", nav_button_previous: 'absolute left-1 hover:bg-slateA-3 dark:hover:bg-slateDarkA-3', nav_button_next: 'absolute right-1 hover:bg-slateA-3 dark:hover:bg-slateDarkA-3', table: 'w-full border-collapse space-y-1', head_row: 'flex', head_cell: 'text-slateA-10 dark:text-slateDarkA-10 rounded-md w-9 font-normal text-[0.8rem]', row: 'flex w-full mt-2', cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20', day: "inline-flex items-center justify-center gap-2 whitespace-nowrap ".concat(calendarVariants(contextValue), " text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-").concat(contextValue.color, "A-3 dark:hover:bg-").concat(contextValue.color, "DarkA-3 h-10 px-4 py-2 h-9 w-9 p-0 font-medium aria-selected:opacity-100 aria-selected:bg-").concat(contextValue.color, "-9 dark:aria-selected:bg-").concat(contextValue.color, "Dark-9 aria-selected:hover:bg-").concat(contextValue.color, "-9 dark:aria-selected:hover:bg-").concat(contextValue.color, "Dark-9"), day_range_end: 'day-range-end', day_selected: "bg-".concat(contextValue.color, "-9 dark:bg-").concat(contextValue.color, "Dark-9 text-white"), day_today: "bg-".concat(contextValue.color, "A-3 dark:bg-").concat(contextValue.color, "DarkA-3"), day_outside: "cursor-default text-slateA-10 dark:text-slateDarkA-10 hover:bg-transparent", day_disabled: 'text-slateA-10 dark:text-slateDarkA-10 opacity-50', day_hidden: 'invisible' }, classNames), components: {
|
37
50
|
IconLeft: function (_a) {
|
38
51
|
var props = __rest(_a, []);
|
39
52
|
return _jsx(ChevronLeftIcon, { className: "h-4 w-4" });
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{ChevronLeftIcon as t,ChevronRightIcon as
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{ChevronLeftIcon as t,ChevronRightIcon as r}from"@radix-ui/react-icons";import{cva as a}from"class-variance-authority";import{MAIN_COLOR as o}from"../../color/constants.mjs";import{radiusVariants as s}from"../../constants.mjs";import{DayPicker as n}from"react-day-picker";import{cn as i}from"../../utils/utils.mjs";import{useTheme as l}from"../../theme/ThemeProvider.mjs";import c from"../../node_modules/date-fns/esm/locale/ko/index.mjs";var d=function(){return d=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},d.apply(this,arguments)},m=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)t.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(r[a[o]]=e[a[o]])}return r},u=a("",{variants:{radius:d({},s.base)},defaultVariants:{radius:"medium"}}),p=function(a){var s,p,f=a.className,b=a.classNames,v=a.showOutsideDays,h=void 0===v||v,g=a.color,y=a.radius,x=m(a,["className","classNames","showOutsideDays","color","radius"]),k=l().theme,w={radius:null!==(s=null!=y?y:k.themeRadius)&&void 0!==s?s:"medium",color:null!==(p=null!=g?g:k.themeColor)&&void 0!==p?p:o};return e(n,d({locale:c,showOutsideDays:h,className:i("w-[280px] p-3 text-slate-12 dark:text-slateDark-12",f),classNames:d({months:"flex flex-row space-y-4 sm:space-x-4 sm:space-y-0 place-content-center",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-semibold",nav:"space-x-1 flex items-center",nav_button:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input h-10 px-4 py-2 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 hover:bg-slateA-3 dark:hover:bg-slateDarkA-3",nav_button_next:"absolute right-1 hover:bg-slateA-3 dark:hover:bg-slateDarkA-3",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-slateA-10 dark:text-slateDarkA-10 rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"inline-flex items-center justify-center gap-2 whitespace-nowrap ".concat(u(w)," text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-").concat(w.color,"A-3 dark:hover:bg-").concat(w.color,"DarkA-3 h-10 px-4 py-2 h-9 w-9 p-0 font-medium aria-selected:opacity-100 aria-selected:bg-").concat(w.color,"-9 dark:aria-selected:bg-").concat(w.color,"Dark-9 aria-selected:hover:bg-").concat(w.color,"-9 dark:aria-selected:hover:bg-").concat(w.color,"Dark-9"),day_range_end:"day-range-end",day_selected:"bg-".concat(w.color,"-9 dark:bg-").concat(w.color,"Dark-9 text-white"),day_today:"bg-".concat(w.color,"A-3 dark:bg-").concat(w.color,"DarkA-3"),day_outside:"cursor-default text-slateA-10 dark:text-slateDarkA-10 hover:bg-transparent",day_disabled:"text-slateA-10 dark:text-slateDarkA-10 opacity-50",day_hidden:"invisible"},b),components:{IconLeft:function(r){return m(r,[]),e(t,{className:"h-4 w-4"})},IconRight:function(t){return m(t,[]),e(r,{className:"h-4 w-4"})}}},x))};p.displayName="Calendar";export{p as Calendar,p as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ComponentPropsWithoutRef, Dispatch, SetStateAction } from 'react';
|
2
2
|
import { DayPicker, DateRange } from 'react-day-picker';
|
3
|
-
import { IColor, IScaling } from '../../../lib/types';
|
3
|
+
import { IColor, IScaling, IRadius } from '../../../lib/types';
|
4
4
|
export interface DatepickerProps {
|
5
5
|
mode?: 'single' | 'range';
|
6
6
|
color?: IColor;
|
7
7
|
scaling?: IScaling;
|
8
|
+
radius?: IRadius;
|
8
9
|
isOpen?: boolean;
|
9
10
|
setIsOpen?: Dispatch<SetStateAction<boolean>>;
|
10
11
|
placeholder?: string;
|
@@ -12,7 +13,7 @@ export interface DatepickerProps {
|
|
12
13
|
onSelect?: any;
|
13
14
|
}
|
14
15
|
export declare const Datepicker: {
|
15
|
-
({ className, classNames, isOpen, setIsOpen, selected, onSelect, showOutsideDays, placeholder, scaling, color, mode, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & DatepickerProps): import("react/jsx-runtime").JSX.Element;
|
16
|
+
({ className, classNames, isOpen, setIsOpen, selected, onSelect, showOutsideDays, placeholder, scaling, radius, color, mode, ...props }: ComponentPropsWithoutRef<typeof DayPicker> & DatepickerProps): import("react/jsx-runtime").JSX.Element;
|
16
17
|
displayName: string;
|
17
18
|
};
|
18
19
|
export default Datepicker;
|
@@ -23,14 +23,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
};
|
24
24
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
25
25
|
import { CalendarIcon } from '@radix-ui/react-icons';
|
26
|
-
import Button from '../../../lib/components/Button';
|
27
|
-
import Popover from '../../../lib/components/Popover';
|
28
26
|
import Calendar from '../../../lib/components/Calendar';
|
27
|
+
import Popover from '../../../lib/components/Popover';
|
28
|
+
import Button from '../../../lib/components/Button';
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
30
30
|
import { format } from 'date-fns';
|
31
31
|
export var Datepicker = function (_a) {
|
32
|
-
var className = _a.className, classNames = _a.classNames, isOpen = _a.isOpen, setIsOpen = _a.setIsOpen, selected = _a.selected, onSelect = _a.onSelect, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '날짜를 선택해주세요' : _c, scaling = _a.scaling, color = _a.color, mode = _a.mode, props = __rest(_a, ["className", "classNames", "isOpen", "setIsOpen", "selected", "onSelect", "showOutsideDays", "placeholder", "scaling", "color", "mode"]);
|
33
|
-
return mode === 'range' ? (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, children: [_jsx(Popover.Trigger, { className: cn('w-[280px] text-slateA-9 dark:text-slateDarkA-9', className), children: _jsxs(Button, { color: color, scaling: scaling,
|
32
|
+
var className = _a.className, classNames = _a.classNames, isOpen = _a.isOpen, setIsOpen = _a.setIsOpen, selected = _a.selected, onSelect = _a.onSelect, _b = _a.showOutsideDays, showOutsideDays = _b === void 0 ? true : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '날짜를 선택해주세요' : _c, scaling = _a.scaling, radius = _a.radius, color = _a.color, mode = _a.mode, props = __rest(_a, ["className", "classNames", "isOpen", "setIsOpen", "selected", "onSelect", "showOutsideDays", "placeholder", "scaling", "radius", "color", "mode"]);
|
33
|
+
return mode === 'range' ? (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, radius: radius, children: [_jsx(Popover.Trigger, { className: cn('w-[280px] text-slateA-9 dark:text-slateDarkA-9', className), children: _jsxs(Button, { appearance: 'outline', color: color, scaling: scaling, radius: radius, className: cn('justify-start gap-2 text-left font-normal'), children: [_jsx(CalendarIcon, {}), (selected === null || selected === void 0 ? void 0 : selected.from) ? (selected.to ? (_jsxs(_Fragment, { children: [format(selected.from, 'yyyy-MM-dd'), " - ", format(selected.to, 'yyyy-MM-dd')] })) : (format(selected.from, 'yyyy-MM-dd'))) : (placeholder)] }) }), _jsx(Popover.Content, { className: "w-auto max-w-[600px] p-0", align: "start", children: _jsx(Calendar, __assign({ mode: "range", color: color, radius: radius, selected: selected, onSelect: onSelect, numberOfMonths: 2, defaultMonth: selected === null || selected === void 0 ? void 0 : selected.from, showOutsideDays: showOutsideDays, className: 'w-full', classNames: classNames }, props)) })] })) : (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, radius: radius, children: [_jsx(Popover.Trigger, { className: cn('w-[280px] text-slateA-9 dark:text-slateDarkA-9', className), children: _jsxs(Button, { color: color, radius: radius, scaling: scaling, appearance: 'outline', className: cn('justify-start gap-2 text-left font-normal'), children: [_jsx(CalendarIcon, {}), selected ? format(selected, 'yyyy-MM-dd') : placeholder] }) }), _jsx(Popover.Content, { className: "w-auto p-0", children: _jsx(Calendar, __assign({ mode: mode, color: color, radius: radius, selected: selected, onSelect: onSelect, defaultMonth: selected, showOutsideDays: showOutsideDays, className: 'w-full', classNames: classNames }, props)) })] }));
|
34
34
|
};
|
35
35
|
Datepicker.displayName = 'Datepicker';
|
36
36
|
export default Datepicker;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{CalendarIcon as
|
2
|
+
import{jsxs as e,jsx as t,Fragment as a}from"react/jsx-runtime";import{CalendarIcon as r}from"@radix-ui/react-icons";import{Calendar as o}from"../Calendar/index.mjs";import s from"../Popover/index.mjs";import{Button as l}from"../Button/index.mjs";import{cn as n}from"../../utils/utils.mjs";import{format as i}from"date-fns";var c=function(){return c=Object.assign||function(e){for(var t,a=1,r=arguments.length;a<r;a++)for(var o in t=arguments[a])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c.apply(this,arguments)},d=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(a[r[o]]=e[r[o]])}return a},m=function(m){var p=m.className,u=m.classNames,f=m.isOpen,y=m.setIsOpen,h=m.selected,O=m.onSelect,g=m.showOutsideDays,x=void 0===g||g,w=m.placeholder,N=void 0===w?"날짜를 선택해주세요":w,j=m.scaling,v=m.radius,M=m.color,b=m.mode,D=d(m,["className","classNames","isOpen","setIsOpen","selected","onSelect","showOutsideDays","placeholder","scaling","radius","color","mode"]);return e(s.Root,"range"===b?{open:f,onOpenChange:y,scaling:j,radius:v,children:[t(s.Trigger,{className:n("w-[280px] text-slateA-9 dark:text-slateDarkA-9",p),children:e(l,{appearance:"outline",color:M,scaling:j,radius:v,className:n("justify-start gap-2 text-left font-normal"),children:[t(r,{}),(null==h?void 0:h.from)?h.to?e(a,{children:[i(h.from,"yyyy-MM-dd")," - ",i(h.to,"yyyy-MM-dd")]}):i(h.from,"yyyy-MM-dd"):N]})}),t(s.Content,{className:"w-auto max-w-[600px] p-0",align:"start",children:t(o,c({mode:"range",color:M,radius:v,selected:h,onSelect:O,numberOfMonths:2,defaultMonth:null==h?void 0:h.from,showOutsideDays:x,className:"w-full",classNames:u},D))})]}:{open:f,onOpenChange:y,scaling:j,radius:v,children:[t(s.Trigger,{className:n("w-[280px] text-slateA-9 dark:text-slateDarkA-9",p),children:e(l,{color:M,radius:v,scaling:j,appearance:"outline",className:n("justify-start gap-2 text-left font-normal"),children:[t(r,{}),h?i(h,"yyyy-MM-dd"):N]})}),t(s.Content,{className:"w-auto p-0",children:t(o,c({mode:b,color:M,radius:v,selected:h,onSelect:O,defaultMonth:h,showOutsideDays:x,className:"w-full",classNames:u},D))})]})};m.displayName="Datepicker";export{m as Datepicker,m as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { Dispatch, SetStateAction, ComponentPropsWithoutRef } from 'react';
|
2
|
+
import { IColor, IScaling, IRadius } from '../../../lib/types';
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import { DtPicker, Day, Range } from 'react-calendar-datetime-picker';
|
5
|
+
export interface DatetimepickerProps extends VariantProps<typeof datetimepickerVariants> {
|
6
|
+
type?: 'single' | 'range';
|
7
|
+
color?: IColor;
|
8
|
+
scaling?: IScaling;
|
9
|
+
radius?: IRadius;
|
10
|
+
isOpen?: boolean;
|
11
|
+
setIsOpen?: Dispatch<SetStateAction<boolean>>;
|
12
|
+
placeholder?: string;
|
13
|
+
selected?: Day | Range | undefined;
|
14
|
+
onChange?: any;
|
15
|
+
headerClass?: string;
|
16
|
+
className?: string;
|
17
|
+
}
|
18
|
+
declare const datetimepickerVariants: (props?: ({
|
19
|
+
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
20
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
21
|
+
export declare const Datetimepicker: {
|
22
|
+
({ className, onChange, placeholder, isOpen, setIsOpen, selected, scaling, radius, color, type, headerClass, calenderModalClass, ...props }: ComponentPropsWithoutRef<typeof DtPicker> & DatetimepickerProps): import("react/jsx-runtime").JSX.Element;
|
23
|
+
displayName: string;
|
24
|
+
};
|
25
|
+
export default Datetimepicker;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
'use client';
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
3
|
+
__assign = Object.assign || function(t) {
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5
|
+
s = arguments[i];
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7
|
+
t[p] = s[p];
|
8
|
+
}
|
9
|
+
return t;
|
10
|
+
};
|
11
|
+
return __assign.apply(this, arguments);
|
12
|
+
};
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
14
|
+
var t = {};
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
16
|
+
t[p] = s[p];
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
20
|
+
t[p[i]] = s[p[i]];
|
21
|
+
}
|
22
|
+
return t;
|
23
|
+
};
|
24
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
25
|
+
import { useEffect } from 'react';
|
26
|
+
import { cva } from 'class-variance-authority';
|
27
|
+
import { DtCalendar } from 'react-calendar-datetime-picker';
|
28
|
+
import { CalendarIcon } from '@radix-ui/react-icons';
|
29
|
+
import { MAIN_COLOR } from '../../../lib/color/constants';
|
30
|
+
import Popover from '../../../lib/components/Popover';
|
31
|
+
import Button from '../../../lib/components/Button';
|
32
|
+
import { Theme } from '@radix-ui/themes';
|
33
|
+
import { useTheme } from '../../../lib/theme';
|
34
|
+
import { cn } from '../../../lib/utils/utils';
|
35
|
+
import { format } from 'date-fns';
|
36
|
+
var datetimepickerVariants = cva('', {
|
37
|
+
variants: {
|
38
|
+
radius: {
|
39
|
+
none: 'rounded-none',
|
40
|
+
small: 'rounded-[3px]',
|
41
|
+
medium: 'rounded',
|
42
|
+
large: 'rounded-md',
|
43
|
+
full: 'rounded-md',
|
44
|
+
},
|
45
|
+
},
|
46
|
+
defaultVariants: {
|
47
|
+
radius: 'medium',
|
48
|
+
},
|
49
|
+
});
|
50
|
+
var BorderRadius = {
|
51
|
+
none: '0px',
|
52
|
+
small: '3px',
|
53
|
+
medium: '4px',
|
54
|
+
large: '6px',
|
55
|
+
full: '9999px',
|
56
|
+
};
|
57
|
+
export var Datetimepicker = function (_a) {
|
58
|
+
var _b, _c;
|
59
|
+
var className = _a.className, onChange = _a.onChange, _d = _a.placeholder, placeholder = _d === void 0 ? '날짜를 선택해주세요' : _d, isOpen = _a.isOpen, setIsOpen = _a.setIsOpen, selected = _a.selected, scaling = _a.scaling, radius = _a.radius, color = _a.color, type = _a.type, headerClass = _a.headerClass, calenderModalClass = _a.calenderModalClass, props = __rest(_a, ["className", "onChange", "placeholder", "isOpen", "setIsOpen", "selected", "scaling", "radius", "color", "type", "headerClass", "calenderModalClass"]);
|
60
|
+
var theme = useTheme().theme;
|
61
|
+
var contextValue = {
|
62
|
+
radius: (_b = radius !== null && radius !== void 0 ? radius : theme.themeRadius) !== null && _b !== void 0 ? _b : 'medium',
|
63
|
+
color: (_c = color !== null && color !== void 0 ? color : theme.themeColor) !== null && _c !== void 0 ? _c : MAIN_COLOR,
|
64
|
+
};
|
65
|
+
useEffect(function () {
|
66
|
+
document.documentElement.style.setProperty('--day-border-radius', BorderRadius[contextValue.radius]);
|
67
|
+
}, [contextValue.radius]);
|
68
|
+
var convertIDayToDate = function (iDay) {
|
69
|
+
if (!iDay)
|
70
|
+
return null;
|
71
|
+
var year = iDay.year, month = iDay.month, day = iDay.day, hour = iDay.hour, minute = iDay.minute;
|
72
|
+
return format(new Date(year, month - 1, day, hour || 0, minute || 0), 'yyyy-MM-dd HH:mm');
|
73
|
+
};
|
74
|
+
var formatDate = function (date) {
|
75
|
+
if (!date)
|
76
|
+
return '';
|
77
|
+
if (date.to && date.from) {
|
78
|
+
var formattedStartDate = convertIDayToDate(date.from);
|
79
|
+
var formattedEndDate = convertIDayToDate(date.to);
|
80
|
+
return "".concat(formattedStartDate, " ~ ").concat(formattedEndDate);
|
81
|
+
}
|
82
|
+
};
|
83
|
+
return (_jsx(Theme, { accentColor: contextValue.color, children: type === 'range' ? (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, radius: radius, children: [_jsx(Popover.Trigger, { className: cn('w-[310px] text-slateA-9 dark:text-slateDarkA-9', className), children: _jsxs(Button, { color: color, radius: radius, scaling: scaling, appearance: 'outline', className: cn('justify-start gap-2 text-left font-normal'), children: [_jsx(CalendarIcon, {}), selected ? formatDate(selected) : placeholder] }) }), _jsx(Popover.Content, { className: "w-auto p-0", children: _jsx(DtCalendar, __assign({ type: "range", withTime: true, showTimeInput: true, initValue: selected, onChange: onChange, calenderModalClass: cn("".concat(datetimepickerVariants(contextValue)), calenderModalClass), headerClass: cn("flex bg-".concat(contextValue.color, "-9 dark:bg-").concat(contextValue.color, "Dark-9"), headerClass) }, props)) })] })) : (_jsxs(Popover.Root, { open: isOpen, onOpenChange: setIsOpen, scaling: scaling, radius: radius, children: [_jsx(Popover.Trigger, { className: cn('w-[310px] text-slateA-9 dark:text-slateDarkA-9', className), children: _jsxs(Button, { color: color, radius: radius, scaling: scaling, appearance: 'outline', className: cn('justify-start gap-2 text-left font-normal'), children: [_jsx(CalendarIcon, {}), selected ? convertIDayToDate(selected) : placeholder] }) }), _jsx(Popover.Content, { className: "w-auto p-0", children: _jsx(DtCalendar, __assign({ withTime: true, showTimeInput: true, initValue: selected, onChange: onChange, calenderModalClass: cn("".concat(datetimepickerVariants(contextValue)), calenderModalClass), headerClass: cn("flex bg-".concat(contextValue.color, "-9 dark:bg-").concat(contextValue.color, "Dark-9"), headerClass) }, props)) })] })) }));
|
84
|
+
};
|
85
|
+
Datetimepicker.displayName = 'DatetimePicker';
|
86
|
+
export default Datetimepicker;
|
@@ -0,0 +1,3 @@
|
|
1
|
+
"use client";
|
2
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useEffect as a}from"react";import{cva as t}from"class-variance-authority";import{DtCalendar as o}from"react-calendar-datetime-picker";import{CalendarIcon as n}from"@radix-ui/react-icons";import{MAIN_COLOR as l}from"../../color/constants.mjs";import i from"../Popover/index.mjs";import{Button as s}from"../Button/index.mjs";import{Theme as c}from"@radix-ui/themes";import{useTheme as d}from"../../theme/ThemeProvider.mjs";import{cn as m}from"../../utils/utils.mjs";import{format as u}from"date-fns";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)},f=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},h=t("",{variants:{radius:{none:"rounded-none",small:"rounded-[3px]",medium:"rounded",large:"rounded-md",full:"rounded-md"}},defaultVariants:{radius:"medium"}}),g={none:"0px",small:"3px",medium:"4px",large:"6px",full:"9999px"},y=function(t){var y,x,C=t.className,O=t.onChange,v=t.placeholder,b=void 0===v?"날짜를 선택해주세요":v,j=t.isOpen,w=t.setIsOpen,k=t.selected,N=t.scaling,P=t.radius,T=t.color,D=t.type,M=t.headerClass,I=t.calenderModalClass,A=f(t,["className","onChange","placeholder","isOpen","setIsOpen","selected","scaling","radius","color","type","headerClass","calenderModalClass"]),V=d().theme,E={radius:null!==(y=null!=P?P:V.themeRadius)&&void 0!==y?y:"medium",color:null!==(x=null!=T?T:V.themeColor)&&void 0!==x?x:l};a((function(){document.documentElement.style.setProperty("--day-border-radius",g[E.radius])}),[E.radius]);var H=function(e){if(!e)return null;var r=e.year,a=e.month,t=e.day,o=e.hour,n=e.minute;return u(new Date(r,a-1,t,o||0,n||0),"yyyy-MM-dd HH:mm")};return e(c,{accentColor:E.color,children:r(i.Root,"range"===D?{open:j,onOpenChange:w,scaling:N,radius:P,children:[e(i.Trigger,{className:m("w-[310px] text-slateA-9 dark:text-slateDarkA-9",C),children:r(s,{color:T,radius:P,scaling:N,appearance:"outline",className:m("justify-start gap-2 text-left font-normal"),children:[e(n,{}),k?function(e){if(!e)return"";if(e.to&&e.from){var r=H(e.from),a=H(e.to);return"".concat(r," ~ ").concat(a)}}(k):b]})}),e(i.Content,{className:"w-auto p-0",children:e(o,p({type:"range",withTime:!0,showTimeInput:!0,initValue:k,onChange:O,calenderModalClass:m("".concat(h(E)),I),headerClass:m("flex bg-".concat(E.color,"-9 dark:bg-").concat(E.color,"Dark-9"),M)},A))})]}:{open:j,onOpenChange:w,scaling:N,radius:P,children:[e(i.Trigger,{className:m("w-[310px] text-slateA-9 dark:text-slateDarkA-9",C),children:r(s,{color:T,radius:P,scaling:N,appearance:"outline",className:m("justify-start gap-2 text-left font-normal"),children:[e(n,{}),k?H(k):b]})}),e(i.Content,{className:"w-auto p-0",children:e(o,p({withTime:!0,showTimeInput:!0,initValue:k,onChange:O,calenderModalClass:m("".concat(h(E)),I),headerClass:m("flex bg-".concat(E.color,"-9 dark:bg-").concat(E.color,"Dark-9"),M)},A))})]})})};y.displayName="DatetimePicker";export{y as Datetimepicker,y as default};
|
3
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -4,6 +4,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
import 'tinymce/skins/ui/oxide/skin.css';
|
5
5
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
6
6
|
language?: 'ko_KR' | 'zh_CN' | 'ja' | 'it' | 'vi';
|
7
|
+
containerId?: string;
|
7
8
|
}
|
8
9
|
declare const editorVariants: (props?: ({
|
9
10
|
radius?: "none" | "small" | "medium" | "large" | "full" | null | undefined;
|
@@ -50,7 +50,7 @@ var editorVariants = cva('', {
|
|
50
50
|
},
|
51
51
|
});
|
52
52
|
export var Editor = forwardRef(function (_a, ref) {
|
53
|
-
var className = _a.className, size = _a.size, scaling = _a.scaling, radius = _a.radius, init = _a.init, _b = _a.language, language = _b === void 0 ? 'en' : _b, props = __rest(_a, ["className", "size", "scaling", "radius", "init", "language"]);
|
53
|
+
var className = _a.className, size = _a.size, scaling = _a.scaling, radius = _a.radius, init = _a.init, _b = _a.language, language = _b === void 0 ? 'en' : _b, containerId = _a.containerId, props = __rest(_a, ["className", "size", "scaling", "radius", "init", "language", "containerId"]);
|
54
54
|
var _c = useState(false), isClient = _c[0], setIsClient = _c[1];
|
55
55
|
var editorRef = useRef(null);
|
56
56
|
var theme = useTheme().theme;
|
@@ -85,6 +85,20 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
85
85
|
return null;
|
86
86
|
}
|
87
87
|
return (_jsx("div", { className: cn(editorVariants(editorStyle), className), ref: ref, children: _jsx(EditorUI, __assign({ onInit: function (evt, editor) { return (editorRef.current = editor); }, init: __assign({ language: language, width: '100%', height: '100%', promotion: false, plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion', menubar: 'file edit view insert format tools table', toolbar: 'undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl', autosave_ask_before_unload: true, autosave_interval: '30s', autosave_restore_when_empty: false, autosave_retention: '2m', image_advtab: true, image_caption: true, quickbars_selection_toolbar: '', toolbar_mode: 'sliding', skin: false, content_css: false, content_style: "".concat(contentUiSkinCss, "\n").concat(contentCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"), setup: function (editor) {
|
88
|
+
editor.on('init', function () {
|
89
|
+
editor.formatter.register('code', {
|
90
|
+
inline: 'code',
|
91
|
+
remove: 'all',
|
92
|
+
});
|
93
|
+
editor.getContainer().style.borderRadius = radiusTheme;
|
94
|
+
if (containerId) {
|
95
|
+
var content = document.getElementById(containerId);
|
96
|
+
var auxContainer = document.querySelector('.tox-tinymce-aux');
|
97
|
+
if (content && auxContainer) {
|
98
|
+
content.appendChild(auxContainer);
|
99
|
+
}
|
100
|
+
}
|
101
|
+
});
|
88
102
|
editor.ui.registry.addButton('inlinecode', {
|
89
103
|
icon: 'sourcecode',
|
90
104
|
tooltip: 'Inline code',
|
@@ -92,12 +106,6 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
92
106
|
editor.formatter.toggle('code');
|
93
107
|
},
|
94
108
|
});
|
95
|
-
editor.on('init', function () {
|
96
|
-
editor.formatter.register('code', {
|
97
|
-
inline: 'code',
|
98
|
-
remove: 'all',
|
99
|
-
});
|
100
|
-
});
|
101
109
|
editor.ui.registry.addButton('markdown', {
|
102
110
|
text: 'Markdown',
|
103
111
|
onAction: function () {
|
@@ -106,9 +114,6 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
106
114
|
editor.setContent(html);
|
107
115
|
},
|
108
116
|
});
|
109
|
-
editor.on('init', function () {
|
110
|
-
editor.getContainer().style.borderRadius = radiusTheme;
|
111
|
-
});
|
112
117
|
} }, init) }, props)) }));
|
113
118
|
});
|
114
119
|
Editor.displayName = 'Editor';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as n,useRef as i,useEffect as o}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinymce as s}from"../../utils/useLoadTinyMCE.mjs";import{radiusVariants as l,scalingVariants as c}from"../../constants.mjs";import{cn as u}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{marked as d}from"marked";import"tinymce/skins/ui/oxide/skin.css";import p from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import f from"!!raw-loader!tinymce/skins/content/default/content.css";var g=function(){return g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as t,useState as n,useRef as i,useEffect as o}from"react";import{Editor as r}from"@tinymce/tinymce-react";import{cva as a}from"class-variance-authority";import{loadTinymce as s}from"../../utils/useLoadTinyMCE.mjs";import{radiusVariants as l,scalingVariants as c}from"../../constants.mjs";import{cn as u}from"../../utils/utils.mjs";import{useTheme as m}from"../../theme/ThemeProvider.mjs";import{marked as d}from"marked";import"tinymce/skins/ui/oxide/skin.css";import p from"!!raw-loader!tinymce/skins/ui/oxide/content.css";import f from"!!raw-loader!tinymce/skins/content/default/content.css";var g=function(){return g=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},g.apply(this,arguments)},v=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n},y=a("",{variants:{radius:g({},l.base),scaling:g({},c),size:{small:"w-[650px] h-[350px]",medium:"w-[700px] h-[400px]",large:"w-[750px] h-[450px]"}},defaultVariants:{radius:"medium",scaling:"100%",size:"medium"}}),h=t((function(t,a){var l=t.className,c=t.size,h=t.scaling,b=t.radius,x=t.init,k=t.language,w=void 0===k?"en":k,_=t.containerId,O=v(t,["className","size","scaling","radius","init","language","containerId"]),j=n(!1),N=j[0],z=j[1],C=i(null),I=m().theme,S={radius:null!=b?b:I.themeRadius,scaling:null!=h?h:I.themeScaling,size:c},E="8px";return"none"===S.radius&&(E="0px"),"small"===S.radius&&(E="4px"),"large"===S.radius&&(E="12px"),"full"===S.radius&&(E="16px"),o((function(){s().then((function(){z(!0)}))}),[]),o((function(){if(C.current){var e=C.current.getContainer();e&&(e.style.borderRadius="".concat(E))}}),[E]),N?e("div",{className:u(y(S),l),ref:a,children:e(r,g({onInit:function(e,t){return C.current=t},init:g({language:w,width:"100%",height:"100%",promotion:!1,plugins:"preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount charmap accordion",menubar:"file edit view insert format tools table",toolbar:"undo redo | accordion accordionremove | blocks fontfamily fontsize | bold italic underline strikethrough | align numlist bullist | link image | table media | lineheight outdent indent| forecolor backcolor removeformat | charmap | code fullscreen preview | save print | pagebreak anchor codesample | ltr rtl",autosave_ask_before_unload:!0,autosave_interval:"30s",autosave_restore_when_empty:!1,autosave_retention:"2m",image_advtab:!0,image_caption:!0,quickbars_selection_toolbar:"",toolbar_mode:"sliding",skin:!1,content_css:!1,content_style:"".concat(p,"\n").concat(f,"\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }"),setup:function(e){e.on("init",(function(){if(e.formatter.register("code",{inline:"code",remove:"all"}),e.getContainer().style.borderRadius=E,_){var t=document.getElementById(_),n=document.querySelector(".tox-tinymce-aux");t&&n&&t.appendChild(n)}})),e.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),n=d(t);e.setContent(n)}})}},x)},O))}):null}));h.displayName="Editor";export{h as Editor,h as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -65,9 +65,12 @@ function Grid(_a) {
|
|
65
65
|
}) }, headerGroup.id));
|
66
66
|
}) }), _jsx(Table.Body, { className: "border-b border-b-slateA-5 dark:border-b-slateDarkA-5", children: table
|
67
67
|
.getRowModel()
|
68
|
-
.rows.map(function (row) { return (_jsx(Table.Row, { onClick: function () {
|
68
|
+
.rows.map(function (row) { return (_jsx(Table.Row, { onClick: function () {
|
69
|
+
row.toggleSelected();
|
70
|
+
table.options.onRowClick && table.options.onRowClick(row);
|
71
|
+
}, onDoubleClick: function () {
|
69
72
|
return table.options.onRowDoubleClick && table.options.onRowDoubleClick(row);
|
70
|
-
}, className: "hover:bg-slateA-3 dark:hover:bg-slateDarkA-3 ".concat(row.getIsSelected() ? 'bg-gray-200' : ''), children: row.getVisibleCells().map(function (cell, index) {
|
73
|
+
}, className: "hover:bg-slateA-3 dark:hover:bg-slateDarkA-3 ".concat(row.getIsSelected() ? 'bg-gray-200 dark:bg-gray-700' : ''), children: row.getVisibleCells().map(function (cell, index) {
|
71
74
|
var _a, _b;
|
72
75
|
return (_jsx(Table.Cell, __assign({ style: {
|
73
76
|
width: cell.column.getSize(),
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as o,Fragment as t}from"react/jsx-runtime";import{flexRender as n}from"@tanstack/react-table";import r from"../Table/index.mjs";import{ChevronUpIcon as l,ChevronDownIcon as i}from"@radix-ui/react-icons";import{cn as a}from"../../utils/utils.mjs";import{bgColorStyle as s,radiusVariants as c}from"../../constants.mjs";import{cva as d}from"class-variance-authority";import u from"./NumberingPagination.mjs";var m=function(){return m=Object.assign||function(e){for(var o,t=1,n=arguments.length;t<n;t++)for(var r in o=arguments[t])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},m.apply(this,arguments)},
|
2
|
+
import{jsxs as e,jsx as o,Fragment as t}from"react/jsx-runtime";import{flexRender as n}from"@tanstack/react-table";import r from"../Table/index.mjs";import{ChevronUpIcon as l,ChevronDownIcon as i}from"@radix-ui/react-icons";import{cn as a}from"../../utils/utils.mjs";import{bgColorStyle as s,radiusVariants as c}from"../../constants.mjs";import{cva as d}from"class-variance-authority";import u from"./NumberingPagination.mjs";var m=function(){return m=Object.assign||function(e){for(var o,t=1,n=arguments.length;t<n;t++)for(var r in o=arguments[t])Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r]);return e},m.apply(this,arguments)},g=d("",{variants:{color:s(),radius:m({},c.large)},defaultVariants:{radius:"medium"}});function p(s){var c,d,p,f,b=s.table;return e("div",{style:{direction:b.options.columnResizeDirection},children:[e(r.Root,{size:null===(c=b.options)||void 0===c?void 0:c.size,appearance:null===(d=b.options)||void 0===d?void 0:d.appearance,radius:b.options.radius,className:a("",null===(p=b.options)||void 0===p?void 0:p.tableRootClassName),children:[o(r.Header,{children:b.getHeaderGroups().map((function(t){return o(r.Row,{children:t.headers.map((function(t,s){var c;return e(r.ColumnHeaderCell,{colSpan:t.colSpan,style:{width:t.getSize(),borderLeftWidth:0===s?0:1},className:"border-l-slateA-5 dark:border-l-slateDarkA-5",children:[t.isPlaceholder?null:e("div",{className:t.column.getCanSort()?"flex cursor-pointer select-none items-center justify-between":"h-full w-full flex-1",onClick:t.column.getToggleSortingHandler(),title:t.column.getCanSort()?"asc"===t.column.getNextSortingOrder()?"Sort ascending":"desc"===t.column.getNextSortingOrder()?"Sort descending":"Clear sort":void 0,children:[n(t.column.columnDef.header,t.getContext()),"asc"==t.column.getIsSorted()?o(l,{}):"desc"==t.column.getIsSorted()?o(i,{}):null]}),o("div",{onDoubleClick:function(){return t.column.resetSize()},onMouseDown:t.getResizeHandler(),onTouchStart:t.getResizeHandler(),className:a("absolute top-0 h-full w-[3px] bg-slateA-3 cursor-col-resize select-none touch-none right-0 opacity-0 hover:opacity-100",b.options.columnResizeDirection,t.column.getIsResizing()?g({color:b.options.color}):""),style:{transform:t.column.getIsResizing()?"translateX(".concat(("rtl"===b.options.columnResizeDirection?-1:1)*(null!==(c=b.getState().columnSizingInfo.deltaOffset)&&void 0!==c?c:0),"px)"):""}})]},t.id)}))},t.id)}))}),o(r.Body,{className:"border-b border-b-slateA-5 dark:border-b-slateDarkA-5",children:b.getRowModel().rows.map((function(e){return o(r.Row,{onClick:function(){e.toggleSelected(),b.options.onRowClick&&b.options.onRowClick(e)},onDoubleClick:function(){return b.options.onRowDoubleClick&&b.options.onRowDoubleClick(e)},className:"hover:bg-slateA-3 dark:hover:bg-slateDarkA-3 ".concat(e.getIsSelected()?"bg-gray-200 dark:bg-gray-700":""),children:e.getVisibleCells().map((function(e,t){var l,i;return o(r.Cell,m({style:{width:e.column.getSize(),borderLeftWidth:0===t?0:1}},e.column.columnDef.meta,{className:a("border-l-slateA-5 dark:border-l-slateDarkA-5",null!==(i=null===(l=e.column.columnDef.meta)||void 0===l?void 0:l.className)&&void 0!==i?i:""),children:n(e.column.columnDef.cell,e.getContext())}),e.id)}))},e.id)}))})]}),(null===(f=b.options)||void 0===f?void 0:f.enableRowPagination)&&o(t,{children:o("div",{className:a("py-[6px]"),children:o(u,{table:b})})})]})}export{g as GridVariants,p as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -39,12 +39,12 @@ function IndeterminateCheckbox(_a) {
|
|
39
39
|
return (_jsx(Checkbox, { ref: ref, id: "checkbox", checked: checked, disabled: disabled, size: size, onCheckedChange: function (v) { return onChange && onChange({ target: { value: v } }); }, indeterminate: indeterminate, className: "mr-0", color: color, radius: radius }));
|
40
40
|
}
|
41
41
|
export var useGrid = function (_a) {
|
42
|
-
var _b, _c, _d;
|
42
|
+
var _b, _c, _d, _e;
|
43
43
|
var props = __rest(_a, []);
|
44
44
|
var theme = useTheme().theme;
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
45
|
+
var _f = React.useState([]), sorting = _f[0], setSorting = _f[1];
|
46
|
+
var _g = React.useState({}), defaultExpanded = _g[0], setDefaultExpanded = _g[1];
|
47
|
+
var _h = React.useState({}), defaultRowSelection = _h[0], setDefaultRowSelection = _h[1];
|
48
48
|
var columnHelper = createColumnHelper();
|
49
49
|
var columnsData = (_b = props === null || props === void 0 ? void 0 : props.columns) === null || _b === void 0 ? void 0 : _b.map(function (el) {
|
50
50
|
return columnHelper.accessor(el.id, __assign({}, el));
|
@@ -53,17 +53,17 @@ export var useGrid = function (_a) {
|
|
53
53
|
var firstcell_1 = columnsData[0].cell;
|
54
54
|
columnsData[0] = __assign(__assign({}, columnsData[0]), { cell: function (props) {
|
55
55
|
var _a;
|
56
|
-
return (_jsxs("div", { className: "flex cursor-pointer items-center", style: { paddingLeft: "".concat(props.row.depth *
|
56
|
+
return (_jsxs("div", { className: "flex cursor-pointer items-center", style: { paddingLeft: "".concat(props.row.depth * 20, "px") }, onClick: props.row.getToggleExpandedHandler(), children: [props.row.getCanExpand() ? (_jsx(IconButton, { appearance: "ghost", size: "small", className: "mr-1 h-3 w-3", color: (_a = props.color) !== null && _a !== void 0 ? _a : theme.themeColor, children: props.row.getIsExpanded() ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) })) : (_jsx("div", { className: "mr-2" })), _jsx("div", { children: firstcell_1 ? firstcell_1(props) : props.getValue() })] }));
|
57
57
|
} });
|
58
58
|
}
|
59
59
|
if (props.enableIndexing && !props.enableExpanding) {
|
60
60
|
columnsData === null || columnsData === void 0 ? void 0 : columnsData.unshift({
|
61
61
|
id: 'index',
|
62
62
|
size: 50,
|
63
|
-
header:
|
63
|
+
header: function () { return _jsx("div", { className: "flex justify-center", children: "NO" }); },
|
64
64
|
cell: function (_a) {
|
65
65
|
var row = _a.row;
|
66
|
-
return _jsx("div", { children: row.index + 1 });
|
66
|
+
return _jsx("div", { className: "flex justify-center", children: row.index + 1 });
|
67
67
|
},
|
68
68
|
});
|
69
69
|
}
|
@@ -93,7 +93,14 @@ export var useGrid = function (_a) {
|
|
93
93
|
},
|
94
94
|
});
|
95
95
|
}
|
96
|
-
var reactTableProps = __assign(__assign({ state: {
|
96
|
+
var reactTableProps = __assign(__assign({ state: {
|
97
|
+
sorting: sorting,
|
98
|
+
rowSelection: (_c = props.rowSelection) !== null && _c !== void 0 ? _c : defaultRowSelection,
|
99
|
+
expanded: (_d = props.expanded) !== null && _d !== void 0 ? _d : defaultExpanded,
|
100
|
+
} }, props), { data: props.data, columns: columnsData, color: (_e = props.color) !== null && _e !== void 0 ? _e : theme.themeColor, paginateExpandedRows: true, enableExpanding: !!props.enableExpanding, enableMultiRowSelection: !!props.enableRowSelection, getSubRows: function (row) { return row.subRows; }, onExpandedChange: function (e) {
|
101
|
+
setDefaultExpanded(e);
|
102
|
+
props.onExpandedChange && props.onExpandedChange(e);
|
103
|
+
}, onSortingChange: setSorting, onRowSelectionChange: function (e) {
|
97
104
|
setDefaultRowSelection(e);
|
98
105
|
props.onChangeRowSelection && props.onChangeRowSelection(e);
|
99
106
|
}, getSortedRowModel: getSortedRowModel(), getCoreRowModel: getCoreRowModel(), getExpandedRowModel: getExpandedRowModel(), manualPagination: false });
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{createColumnHelper as o,getSortedRowModel as t,getCoreRowModel as l,getExpandedRowModel as r,getPaginationRowModel as i,useReactTable as a}from"@tanstack/react-table";import d,{useRef as c}from"react";import{IconButton as s}from"../IconButton/index.mjs";import{ChevronDownIcon as u,ChevronRightIcon as m}from"@radix-ui/react-icons";import{Checkbox as g}from"../Checkbox/index.mjs";import{useTheme as f}from"../../theme/ThemeProvider.mjs";var h=function(){return h=Object.assign||function(e){for(var n,o=1,t=arguments.length;o<t;o++)for(var l in n=arguments[o])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},h.apply(this,arguments)},p=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)n.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(o[t[l]]=e[t[l]])}return o};function v(e){var o=e.indeterminate,t=e.checked,l=e.disabled,r=e.onChange,i=e.size,a=e.color,s=e.radius,u=c();return d.useEffect((function(){"boolean"==typeof o&&(u.current.indeterminate=t&&o)}),[u,o]),n(g,{ref:u,id:"checkbox",checked:t,disabled:l,size:i,onCheckedChange:function(e){return r&&r({target:{value:e}})},indeterminate:o,className:"mr-0",color:a,radius:s})}var
|
2
|
+
import{jsxs as e,jsx as n}from"react/jsx-runtime";import{createColumnHelper as o,getSortedRowModel as t,getCoreRowModel as l,getExpandedRowModel as r,getPaginationRowModel as i,useReactTable as a}from"@tanstack/react-table";import d,{useRef as c}from"react";import{IconButton as s}from"../IconButton/index.mjs";import{ChevronDownIcon as u,ChevronRightIcon as m}from"@radix-ui/react-icons";import{Checkbox as g}from"../Checkbox/index.mjs";import{useTheme as f}from"../../theme/ThemeProvider.mjs";var h=function(){return h=Object.assign||function(e){for(var n,o=1,t=arguments.length;o<t;o++)for(var l in n=arguments[o])Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l]);return e},h.apply(this,arguments)},p=function(e,n){var o={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(o[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(t=Object.getOwnPropertySymbols(e);l<t.length;l++)n.indexOf(t[l])<0&&Object.prototype.propertyIsEnumerable.call(e,t[l])&&(o[t[l]]=e[t[l]])}return o};function v(e){var o=e.indeterminate,t=e.checked,l=e.disabled,r=e.onChange,i=e.size,a=e.color,s=e.radius,u=c();return d.useEffect((function(){"boolean"==typeof o&&(u.current.indeterminate=t&&o)}),[u,o]),n(g,{ref:u,id:"checkbox",checked:t,disabled:l,size:i,onCheckedChange:function(e){return r&&r({target:{value:e}})},indeterminate:o,className:"mr-0",color:a,radius:s})}var x=function(c){var g,x,w,S,b=p(c,[]),R=f().theme,C=d.useState([]),y=C[0],j=C[1],E=d.useState({}),O=E[0],I=E[1],z=d.useState({}),k=z[0],N=z[1],P=o(),M=null===(g=null==b?void 0:b.columns)||void 0===g?void 0:g.map((function(e){return P.accessor(e.id,h({},e))}));if(b.enableExpanding){var A=M[0].cell;M[0]=h(h({},M[0]),{cell:function(o){var t;return e("div",{className:"flex cursor-pointer items-center",style:{paddingLeft:"".concat(20*o.row.depth,"px")},onClick:o.row.getToggleExpandedHandler(),children:[o.row.getCanExpand()?n(s,{appearance:"ghost",size:"small",className:"mr-1 h-3 w-3",color:null!==(t=o.color)&&void 0!==t?t:R.themeColor,children:o.row.getIsExpanded()?n(u,{}):n(m,{})}):n("div",{className:"mr-2"}),n("div",{children:A?A(o):o.getValue()})]})}})}b.enableIndexing&&!b.enableExpanding&&(null==M||M.unshift({id:"index",size:50,header:function(){return n("div",{className:"flex justify-center",children:"NO"})},cell:function(e){var o=e.row;return n("div",{className:"flex justify-center",children:o.index+1})}})),b.enableRowSelection&&(null==M||M.unshift({id:"select",size:20,header:function(e){var o,t,l=e.table;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:l.getIsAllRowsSelected()||l.getIsSomeRowsSelected(),indeterminate:l.getIsSomeRowsSelected(),onChange:l.getToggleAllRowsSelectedHandler(),size:"x-small"==(null==b?void 0:b.size)?"small":null==b?void 0:b.size,color:null!==(o=b.color)&&void 0!==o?o:R.themeColor,radius:null!==(t=b.radius)&&void 0!==t?t:R.themeRadius})})},cell:function(e){var o,t,l=e.row;return n("div",{className:"flex h-full w-full items-center justify-center px-1",children:n(v,{checked:l.getIsSelected()||l.getIsSomeSelected()||l.getIsAllSubRowsSelected(),indeterminate:l.getIsSomeSelected()&&!l.getIsAllSubRowsSelected(),onChange:l.getToggleSelectedHandler(),size:"x-small"==(null==b?void 0:b.size)?"small":null==b?void 0:b.size,color:null!==(o=b.color)&&void 0!==o?o:R.themeColor,radius:null!==(t=b.radius)&&void 0!==t?t:R.themeRadius})})}}));var T=h(h({state:{sorting:y,rowSelection:null!==(x=b.rowSelection)&&void 0!==x?x:k,expanded:null!==(w=b.expanded)&&void 0!==w?w:O}},b),{data:b.data,columns:M,color:null!==(S=b.color)&&void 0!==S?S:R.themeColor,paginateExpandedRows:!0,enableExpanding:!!b.enableExpanding,enableMultiRowSelection:!!b.enableRowSelection,getSubRows:function(e){return e.subRows},onExpandedChange:function(e){I(e),b.onExpandedChange&&b.onExpandedChange(e)},onSortingChange:j,onRowSelectionChange:function(e){N(e),b.onChangeRowSelection&&b.onChangeRowSelection(e)},getSortedRowModel:t(),getCoreRowModel:l(),getExpandedRowModel:r(),manualPagination:!1});return b.enableRowPagination&&(T.getPaginationRowModel=i()),a(T)};export{x as useGrid};
|
3
3
|
//# sourceMappingURL=useGrid.mjs.map
|
@@ -29,7 +29,7 @@ import { primaryColorStyle } from '../../../lib/constants';
|
|
29
29
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
30
30
|
import { ModalContext } from './ModalRoot';
|
31
31
|
import { cn } from '../../../lib/utils/utils';
|
32
|
-
export var modalActionVariants = cva(
|
32
|
+
export var modalActionVariants = cva("rounded-md inline-flex font-medium items-center justify-center px-[15px] hover:cursor-pointer \n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8", {
|
33
33
|
variants: {
|
34
34
|
radius: {
|
35
35
|
none: 'rounded-none',
|
@@ -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 t}from"react";import*as o from"@radix-ui/react-dialog";import{cva as a}from"class-variance-authority";import{primaryColorStyle as n}from"../../constants.mjs";import{MAIN_COLOR as i}from"../../color/constants.mjs";import{ModalContext as l}from"./ModalRoot.mjs";import{cn as s}from"../../utils/utils.mjs";var m=function(){return m=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var a in e=arguments[t])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},m.apply(this,arguments)},d=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 a=0;for(o=Object.getOwnPropertySymbols(r);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(r,o[a])&&(t[o[a]]=r[o[a]])}return t},p=a("rounded-md inline-flex font-medium items-center justify-center px-[15px] hover:cursor-pointer \n disabled:cursor-not-allowed disabled:bg-slate-3 disabled:text-slate-8",{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:i}}),c=e((function(e,a){var n=e.children,i=e.className,c=d(e,["children","className"]),u=t(l),f=u.radius,x=u.size,y=u.color,b=s(p({radius:f,size:x,color:y}),i);return r(o.Close,m({ref:a,className:b},c,{children:n}))}));c.displayName="Modal.Action";export{c as ModalAction,p as modalActionVariants};
|
3
3
|
//# sourceMappingURL=ModalAction.mjs.map
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
21
21
|
}
|
22
22
|
return t;
|
23
23
|
};
|
24
|
-
import { jsx as _jsx
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
25
25
|
import { forwardRef, useContext } from 'react';
|
26
26
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
27
27
|
import { cva } from 'class-variance-authority';
|
@@ -56,6 +56,6 @@ export var ModalContent = forwardRef(function (_a, ref) {
|
|
56
56
|
var ModalStyle = {
|
57
57
|
'--max-width': '1200px',
|
58
58
|
};
|
59
|
-
return (
|
59
|
+
return (_jsx(DialogPrimitive.Content, __assign({ ref: ref, "aria-describedby": ariaDescribedby !== undefined ? ariaDescribedby : undefined, className: cn(modalContentVariants({ radius: radius, size: size, scaling: scaling }), className), style: ModalStyle }, props, { children: children })));
|
60
60
|
});
|
61
61
|
ModalContent.displayName = 'Modal.Content';
|