@lotte-innovate/ui-component-test 0.2.76 → 0.2.78
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/Dialog/DialogCancel.js +1 -2
- package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
- package/dist/lib/components/Dialog/DialogContent.js +1 -1
- package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
- package/dist/lib/components/Editor/index.d.ts +1 -0
- package/dist/lib/components/Editor/index.js +27 -105
- package/dist/lib/components/Editor/index.mjs +1 -1
- package/dist/lib/components/Grid/index.js +2 -1
- package/dist/lib/components/Grid/index.mjs +1 -1
- package/dist/lib/components/Modal/ModalAction.d.ts +2 -2
- package/dist/lib/components/Modal/ModalAction.js +2 -2
- package/dist/lib/components/Modal/ModalAction.mjs +1 -1
- package/dist/lib/components/Modal/ModalCancel.d.ts +2 -2
- package/dist/lib/components/Modal/ModalCancel.js +2 -2
- package/dist/lib/components/Modal/ModalCancel.mjs +1 -1
- package/dist/lib/components/Modal/ModalContent.d.ts +2 -2
- package/dist/lib/components/Modal/ModalContent.js +4 -4
- package/dist/lib/components/Modal/ModalContent.mjs +1 -1
- package/dist/lib/components/Modal/ModalRoot.d.ts +3 -6
- package/dist/lib/components/Modal/ModalRoot.js +5 -5
- package/dist/lib/components/Modal/ModalRoot.mjs +1 -1
- package/dist/lib/components/Modal/ModalTitle.js +3 -3
- package/dist/lib/components/Modal/ModalTitle.mjs +1 -1
- package/dist/lib/components/Modal/ModalTrigger.d.ts +2 -2
- package/dist/lib/components/Modal/ModalTrigger.js +2 -2
- package/dist/lib/components/Modal/ModalTrigger.mjs +1 -1
- package/dist/lib/components/Modal/ModalTrigger.mjs.map +1 -1
- package/dist/lib/components/Modal/index.d.ts +5 -8
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/lib/utils/classPrefixes.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -27,7 +27,6 @@ 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';
|
30
|
-
import Text from '../../../lib/Typography/Text';
|
31
30
|
export var dialogCancelVariants = cva("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", {
|
32
31
|
variants: {
|
33
32
|
radius: {
|
@@ -52,6 +51,6 @@ export var dialogCancelVariants = cva("rounded-md font-medium inline-flex justif
|
|
52
51
|
export var DialogCancel = forwardRef(function (_a, ref) {
|
53
52
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
54
53
|
var _b = useContext(DialogContext), radius = _b.radius, size = _b.size;
|
55
|
-
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: cn(dialogCancelVariants({ radius: radius, size: size }), className) }, props, { children:
|
54
|
+
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: cn(dialogCancelVariants({ radius: radius, size: size }), className) }, props, { children: children })));
|
56
55
|
});
|
57
56
|
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*as
|
2
|
+
import{jsx as e}from"react/jsx-runtime";import{forwardRef as r,useContext as t}from"react";import*as a from"@radix-ui/react-dialog";import{cva as o}from"class-variance-authority";import{DialogContext as n}from"./DialogRoot.mjs";import{cn as i}from"../../utils/utils.mjs";var l=function(){return l=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},l.apply(this,arguments)},s=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},m=o("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,o){var d=r.children,p=r.className,u=s(r,["children","className"]),c=t(n),x=c.radius,f=c.size;return e(a.Close,l({ref:o,className:i(m({radius:x,size:f}),p)},u,{children:d}))}));d.displayName="Dialog.Cancel";export{d as DialogCancel,m as dialogCancelVariants};
|
3
3
|
//# sourceMappingURL=DialogCancel.mjs.map
|
@@ -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
|
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
|
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,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { IAllProps } from '@tinymce/tinymce-react';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import 'tinymce/skins/ui/oxide/skin.css';
|
4
5
|
export interface EditorProps extends VariantProps<typeof editorVariants> {
|
5
6
|
language?: 'ko_KR' | 'zh_CN' | 'ja' | 'it' | 'vi';
|
6
7
|
}
|
@@ -10,42 +10,6 @@ var __assign = (this && this.__assign) || function () {
|
|
10
10
|
};
|
11
11
|
return __assign.apply(this, arguments);
|
12
12
|
};
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
20
|
-
});
|
21
|
-
};
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
26
|
-
function step(op) {
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
31
|
-
switch (op[0]) {
|
32
|
-
case 0: case 1: t = op; break;
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
36
|
-
default:
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
41
|
-
if (t[2]) _.ops.pop();
|
42
|
-
_.trys.pop(); continue;
|
43
|
-
}
|
44
|
-
op = body.call(thisArg, _);
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
47
|
-
}
|
48
|
-
};
|
49
13
|
var __rest = (this && this.__rest) || function (s, e) {
|
50
14
|
var t = {};
|
51
15
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
@@ -57,23 +21,18 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
57
21
|
}
|
58
22
|
return t;
|
59
23
|
};
|
60
|
-
import { jsx as _jsx
|
24
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
61
25
|
import { useState, forwardRef, useEffect, useRef, } from 'react';
|
62
26
|
import { Editor as EditorUI } from '@tinymce/tinymce-react';
|
63
27
|
import { cva } from 'class-variance-authority';
|
64
28
|
import { loadTinymce } from '../../../lib/utils/useLoadTinyMCE';
|
65
|
-
import { useDarkMode } from '../../../lib/utils/useDarkMode';
|
66
29
|
import { scalingVariants, radiusVariants } from '../../../lib/constants';
|
67
|
-
import { Spinner } from '../../../lib/components/Spinner/index';
|
68
30
|
import { cn } from '../../../lib/utils/utils';
|
69
31
|
import { useTheme } from '../../../lib/theme';
|
70
32
|
import { marked } from 'marked';
|
71
|
-
|
72
|
-
// import 'tinymce/skins/ui/oxide-dark/skin.css';
|
33
|
+
import 'tinymce/skins/ui/oxide/skin.css';
|
73
34
|
import contentUiSkinCss from '!!raw-loader!tinymce/skins/ui/oxide/content.css';
|
74
35
|
import contentCss from '!!raw-loader!tinymce/skins/content/default/content.css';
|
75
|
-
import contentUiDarkSkinCss from '!!raw-loader!tinymce/skins/ui/oxide-dark/content.css';
|
76
|
-
import contentDarkCss from '!!raw-loader!tinymce/skins/content/dark/content.css';
|
77
36
|
var editorVariants = cva('', {
|
78
37
|
variants: {
|
79
38
|
radius: __assign({}, radiusVariants['base']),
|
@@ -93,45 +52,13 @@ var editorVariants = cva('', {
|
|
93
52
|
export var Editor = forwardRef(function (_a, ref) {
|
94
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"]);
|
95
54
|
var _c = useState(false), isClient = _c[0], setIsClient = _c[1];
|
96
|
-
var _d = useDarkMode(), isDark = _d[0], defaultScales = _d[1];
|
97
55
|
var editorRef = useRef(null);
|
98
|
-
var _e = useState(0), editorKey = _e[0], setEditorKey = _e[1];
|
99
|
-
var _f = useState(true), isLoading = _f[0], setIsLoading = _f[1];
|
100
|
-
var _g = useState(false), isEditorInit = _g[0], setIsEditorInit = _g[1];
|
101
56
|
var theme = useTheme().theme;
|
102
57
|
var editorStyle = {
|
103
58
|
radius: radius !== null && radius !== void 0 ? radius : theme.themeRadius,
|
104
59
|
scaling: scaling !== null && scaling !== void 0 ? scaling : theme.themeScaling,
|
105
60
|
size: size,
|
106
61
|
};
|
107
|
-
useEffect(function () {
|
108
|
-
var loadSkin = function () { return __awaiter(void 0, void 0, void 0, function () {
|
109
|
-
return __generator(this, function (_a) {
|
110
|
-
switch (_a.label) {
|
111
|
-
case 0:
|
112
|
-
if (!isDark) return [3 /*break*/, 2];
|
113
|
-
return [4 /*yield*/, import('tinymce/skins/ui/oxide-dark/skin.css')];
|
114
|
-
case 1:
|
115
|
-
_a.sent();
|
116
|
-
return [3 /*break*/, 4];
|
117
|
-
case 2: return [4 /*yield*/, import('tinymce/skins/ui/oxide/skin.css')];
|
118
|
-
case 3:
|
119
|
-
_a.sent();
|
120
|
-
_a.label = 4;
|
121
|
-
case 4:
|
122
|
-
// 에디터를 다시 로드하기 위해 key 변경
|
123
|
-
setEditorKey(function (prevKey) { return prevKey + 1; });
|
124
|
-
return [2 /*return*/];
|
125
|
-
}
|
126
|
-
});
|
127
|
-
}); };
|
128
|
-
loadSkin();
|
129
|
-
}, [isDark]);
|
130
|
-
var getContentStyle = function () {
|
131
|
-
var baseStyle = "".concat(contentUiSkinCss, "\n").concat(contentCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }");
|
132
|
-
var darkStyle = "".concat(contentUiDarkSkinCss, "\n").concat(contentDarkCss, "\n body { font-family:Noto Sans KR, sans-serif, Nunito Sans, Helvetica Neue, Helvetica }");
|
133
|
-
return isDark ? baseStyle : baseStyle;
|
134
|
-
};
|
135
62
|
var radiusTheme = '8px';
|
136
63
|
if (editorStyle.radius === 'none')
|
137
64
|
radiusTheme = '0px';
|
@@ -157,37 +84,32 @@ export var Editor = forwardRef(function (_a, ref) {
|
|
157
84
|
if (!isClient) {
|
158
85
|
return null;
|
159
86
|
}
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
});
|
173
|
-
editor.on('init', function () {
|
174
|
-
editor.formatter.register('code', {
|
175
|
-
inline: 'code',
|
176
|
-
remove: 'all',
|
177
|
-
});
|
178
|
-
});
|
179
|
-
editor.ui.registry.addButton('markdown', {
|
180
|
-
text: 'Markdown',
|
181
|
-
onAction: function () {
|
182
|
-
var content = editor.getContent({ format: 'text' });
|
183
|
-
var html = marked(content);
|
184
|
-
editor.setContent(html);
|
185
|
-
},
|
186
|
-
});
|
187
|
-
editor.on('init', function () {
|
188
|
-
editor.getContainer().style.borderRadius = radiusTheme;
|
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.ui.registry.addButton('inlinecode', {
|
89
|
+
icon: 'sourcecode',
|
90
|
+
tooltip: 'Inline code',
|
91
|
+
onAction: function () {
|
92
|
+
editor.formatter.toggle('code');
|
93
|
+
},
|
94
|
+
});
|
95
|
+
editor.on('init', function () {
|
96
|
+
editor.formatter.register('code', {
|
97
|
+
inline: 'code',
|
98
|
+
remove: 'all',
|
189
99
|
});
|
190
|
-
}
|
100
|
+
});
|
101
|
+
editor.ui.registry.addButton('markdown', {
|
102
|
+
text: 'Markdown',
|
103
|
+
onAction: function () {
|
104
|
+
var content = editor.getContent({ format: 'text' });
|
105
|
+
var html = marked(content);
|
106
|
+
editor.setContent(html);
|
107
|
+
},
|
108
|
+
});
|
109
|
+
editor.on('init', function () {
|
110
|
+
editor.getContainer().style.borderRadius = radiusTheme;
|
111
|
+
});
|
112
|
+
} }, init) }, props)) }));
|
191
113
|
});
|
192
114
|
Editor.displayName = 'Editor';
|
193
115
|
export default Editor;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{
|
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},b=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,y=t.radius,k=t.init,x=t.language,w=void 0===x?"en":x,_=v(t,["className","size","scaling","radius","init","language"]),O=n(!1),j=O[0],N=O[1],z=i(null),C=m().theme,P={radius:null!=y?y:C.themeRadius,scaling:null!=h?h:C.themeScaling,size:c},S="8px";return"none"===P.radius&&(S="0px"),"small"===P.radius&&(S="4px"),"large"===P.radius&&(S="12px"),"full"===P.radius&&(S="16px"),o((function(){s().then((function(){N(!0)}))}),[]),o((function(){if(z.current){var e=z.current.getContainer();e&&(e.style.borderRadius="".concat(S))}}),[S]),j?e("div",{className:u(b(P),l),ref:a,children:e(r,g({onInit:function(e,t){return z.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.ui.registry.addButton("inlinecode",{icon:"sourcecode",tooltip:"Inline code",onAction:function(){e.formatter.toggle("code")}}),e.on("init",(function(){e.formatter.register("code",{inline:"code",remove:"all"})})),e.ui.registry.addButton("markdown",{text:"Markdown",onAction:function(){var t=e.getContent({format:"text"}),n=d(t);e.setContent(n)}}),e.on("init",(function(){e.getContainer().style.borderRadius=S}))}},k)},_))}):null}));h.displayName="Editor";export{h as Editor,h as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -68,10 +68,11 @@ function Grid(_a) {
|
|
68
68
|
.rows.map(function (row) { return (_jsx(Table.Row, { onClick: function () { return table.options.onRowClick && table.options.onRowClick(row); }, onDoubleClick: function () {
|
69
69
|
return table.options.onRowDoubleClick && table.options.onRowDoubleClick(row);
|
70
70
|
}, className: "hover:bg-slateA-3 dark:hover:bg-slateDarkA-3 ".concat(row.getIsSelected() ? 'bg-gray-200' : ''), children: row.getVisibleCells().map(function (cell, index) {
|
71
|
+
var _a, _b;
|
71
72
|
return (_jsx(Table.Cell, __assign({ style: {
|
72
73
|
width: cell.column.getSize(),
|
73
74
|
borderLeftWidth: index === 0 ? 0 : 1,
|
74
|
-
}, className:
|
75
|
+
} }, cell.column.columnDef.meta, { className: cn('border-l-slateA-5 dark:border-l-slateDarkA-5', (_b = (_a = cell.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.className) !== null && _b !== void 0 ? _b : ''), children: flexRender(cell.column.columnDef.cell, cell.getContext()) }), cell.id));
|
75
76
|
}) }, row.id)); }) })] }), ((_e = table.options) === null || _e === void 0 ? void 0 : _e.enableRowPagination) && (_jsx(_Fragment, { children: _jsx("div", { className: cn('py-[6px]'), children: _jsx(NumberingPagination, { table: table }) }) }))] }));
|
76
77
|
}
|
77
78
|
export default Grid;
|
@@ -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)},p=d("",{variants:{color:s(),radius:m({},c.large)},defaultVariants:{radius:"medium"}});function g(s){var c,d,g,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===(g=b.options)||void 0===g?void 0:g.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()?p({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(){return 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":""),children:e.getVisibleCells().map((function(e,t){return o(r.Cell,m({style:{width:e.column.getSize(),borderLeftWidth:0===t?0:1},className:"border-l-slateA-5 dark:border-l-slateDarkA-5"
|
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)},p=d("",{variants:{color:s(),radius:m({},c.large)},defaultVariants:{radius:"medium"}});function g(s){var c,d,g,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===(g=b.options)||void 0===g?void 0:g.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()?p({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(){return 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":""),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{p as GridVariants,g as default};
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
@@ -1,6 +1,6 @@
|
|
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 ModalActionProps extends VariantProps<typeof modalActionVariants> {
|
5
5
|
}
|
6
6
|
export declare const modalActionVariants: (props?: ({
|
@@ -8,4 +8,4 @@ export declare const modalActionVariants: (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 ModalAction: React.ForwardRefExoticComponent<Omit<
|
11
|
+
export declare const ModalAction: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & ModalActionProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -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 { primaryColorStyle } from '../../../lib/constants';
|
29
29
|
import { MAIN_COLOR } from '../../../lib/color/constants';
|
30
30
|
import { ModalContext } from './ModalRoot';
|
@@ -56,6 +56,6 @@ export var ModalAction = forwardRef(function (_a, ref) {
|
|
56
56
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
57
57
|
var _b = useContext(ModalContext), radius = _b.radius, size = _b.size, color = _b.color;
|
58
58
|
var buttonClassName = cn(modalActionVariants({ radius: radius, size: size, color: color }), className);
|
59
|
-
return (_jsx(
|
59
|
+
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: buttonClassName }, props, { children: children })));
|
60
60
|
});
|
61
61
|
ModalAction.displayName = 'Modal.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 n}from"class-variance-authority";import{primaryColorStyle as i}from"../../constants.mjs";import{MAIN_COLOR as a}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,o=1,t=arguments.length;o<t;o++)for(var n in e=arguments[o])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);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 n=0;for(t=Object.getOwnPropertySymbols(r);n<t.length;n++)e.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(r,t[n])&&(o[t[n]]=r[t[n]])}return o},c=n("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:i()},defaultVariants:{radius:"medium",size:"medium",color:a}}),u=e((function(e,n){var i=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:n,className:h},u,{children:i}))}));u.displayName="Modal.Action";export{u as ModalAction,c as modalActionVariants};
|
3
3
|
//# sourceMappingURL=ModalAction.mjs.map
|
@@ -1,10 +1,10 @@
|
|
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 ModalCancelProps extends VariantProps<typeof modalCancelVariants> {
|
5
5
|
}
|
6
6
|
export declare const modalCancelVariants: (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 ModalCancel: React.ForwardRefExoticComponent<Omit<
|
10
|
+
export declare const ModalCancel: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & ModalCancelProps & React.RefAttributes<HTMLButtonElement>>;
|
@@ -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 { ModalContext } from './ModalRoot';
|
29
29
|
import { cn } from '../../../lib/utils/utils';
|
30
30
|
export var modalCancelVariants = cva("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", {
|
@@ -52,6 +52,6 @@ export var ModalCancel = forwardRef(function (_a, ref) {
|
|
52
52
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
53
53
|
var _b = useContext(ModalContext), radius = _b.radius, size = _b.size;
|
54
54
|
var buttonClassName = cn(modalCancelVariants({ radius: radius, size: size }), className);
|
55
|
-
return (_jsx(
|
55
|
+
return (_jsx(DialogPrimitive.Close, __assign({ ref: ref, className: buttonClassName }, props, { children: children })));
|
56
56
|
});
|
57
57
|
ModalCancel.displayName = 'Modal.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 a from"@radix-ui/react-dialog";import{cva as o}from"class-variance-authority";import{ModalContext as n}from"./ModalRoot.mjs";import{cn as i}from"../../utils/utils.mjs";var l=function(){return l=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e},l.apply(this,arguments)},s=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(a=Object.getOwnPropertySymbols(e);o<a.length;o++)r.indexOf(a[o])<0&&Object.prototype.propertyIsEnumerable.call(e,a[o])&&(t[a[o]]=e[a[o]])}return t},m=o("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,o){var d=r.children,p=r.className,u=s(r,["children","className"]),c=t(n),x=c.radius,f=c.size,b=i(m({radius:x,size:f}),p);return e(a.Close,l({ref:o,className:b},u,{children:d}))}));d.displayName="Modal.Cancel";export{d as ModalCancel,m as modalCancelVariants};
|
3
3
|
//# sourceMappingURL=ModalCancel.mjs.map
|
@@ -1,6 +1,6 @@
|
|
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 ModalContentProps extends VariantProps<typeof modalContentVariants> {
|
5
5
|
}
|
6
6
|
export declare const modalContentVariants: (props?: ({
|
@@ -8,4 +8,4 @@ export declare const modalContentVariants: (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 ModalContent: React.ForwardRefExoticComponent<Omit<
|
11
|
+
export declare const ModalContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & ModalContentProps & 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
|
+
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 { scalingVariants } from '../../../lib/constants';
|
29
29
|
import { ModalContext } from './ModalRoot';
|
30
30
|
import { cn } from '../../../lib/utils/utils';
|
31
|
-
export var modalContentVariants = cva("
|
31
|
+
export var modalContentVariants = 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] z-50", {
|
32
32
|
variants: {
|
33
33
|
radius: {
|
34
34
|
none: 'rounded-none',
|
@@ -56,6 +56,6 @@ export var ModalContent = forwardRef(function (_a, ref) {
|
|
56
56
|
var ModalStyle = {
|
57
57
|
'--max-width': '1200px',
|
58
58
|
};
|
59
|
-
return (_jsx(
|
59
|
+
return (_jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { style: { backgroundColor: '#00000066' }, className: "fixed inset-0 z-40 data-[state=open]:animate-overlayShow" }), _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';
|
@@ -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*as o from"@radix-ui/react-dialog";import{cva as n}from"class-variance-authority";import{scalingVariants as i}from"../../constants.mjs";import{ModalContext as l}from"./ModalRoot.mjs";import{cn as s}from"../../utils/utils.mjs";var d=function(){return d=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},d.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},p=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] z-50",{variants:{radius:{none:"rounded-none",small:"rounded",medium:"rounded-lg",large:"rounded-xl",full:"rounded-xl"},size:{small:"w-[600px]",medium:"w-[800px]",large:"w-[1000px]","x-large":"w-[1200px]"},scaling:d({},i)},defaultVariants:{radius:"medium",size:"medium"}}),c=a((function(a,n){var i=a.children,c=a.className,u=a["aria-describedby"],f=m(a,["children","className","aria-describedby"]),x=t(l),y=x.radius,h=x.size,b=x.scaling;return e(o.Portal,{children:[r(o.Overlay,{style:{backgroundColor:"#00000066"},className:"fixed inset-0 z-40 data-[state=open]:animate-overlayShow"}),r(o.Content,d({ref:n,"aria-describedby":void 0!==u?u:void 0,className:s(p({radius:y,size:h,scaling:b}),c),style:{"--max-width":"1200px"}},f,{children:i}))]})}));c.displayName="Modal.Content";export{c as ModalContent,p as modalContentVariants};
|
3
3
|
//# sourceMappingURL=ModalContent.mjs.map
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import React
|
2
|
-
import
|
1
|
+
import React from 'react';
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
4
4
|
import { modalContentVariants } from './ModalContent';
|
5
5
|
import { IColor, IRadius, IScaling, ISize } from '../../../lib/types';
|
@@ -10,7 +10,4 @@ export interface ModalRootProps extends VariantProps<typeof modalContentVariants
|
|
10
10
|
radius?: IRadius;
|
11
11
|
}
|
12
12
|
export declare const ModalContext: React.Context<ModalRootProps>;
|
13
|
-
export declare const ModalRoot:
|
14
|
-
({ children, radius, size, scaling, color, ...props }: ComponentPropsWithoutRef<typeof DialogTheme.Root> & ModalRootProps): import("react/jsx-runtime").JSX.Element;
|
15
|
-
displayName: string;
|
16
|
-
};
|
13
|
+
export declare const ModalRoot: React.ForwardRefExoticComponent<DialogPrimitive.DialogProps & ModalRootProps & React.RefAttributes<never>>;
|
@@ -22,13 +22,13 @@ 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
|
export var ModalContext = createContext({
|
29
29
|
size: 'medium',
|
30
30
|
});
|
31
|
-
export var ModalRoot = function (_a) {
|
31
|
+
export var ModalRoot = forwardRef(function (_a, ref) {
|
32
32
|
var children = _a.children, radius = _a.radius, size = _a.size, scaling = _a.scaling, color = _a.color, props = __rest(_a, ["children", "radius", "size", "scaling", "color"]);
|
33
33
|
var theme = useTheme().theme;
|
34
34
|
var contextValue = {
|
@@ -37,6 +37,6 @@ export var ModalRoot = function (_a) {
|
|
37
37
|
color: color !== null && color !== void 0 ? color : theme.themeColor,
|
38
38
|
size: size,
|
39
39
|
};
|
40
|
-
return (_jsx(
|
41
|
-
};
|
40
|
+
return (_jsx(ModalContext.Provider, { value: contextValue, children: _jsx("div", { ref: ref, children: _jsx(DialogPrimitive.Root, __assign({}, props, { children: children })) }) }));
|
41
|
+
});
|
42
42
|
ModalRoot.displayName = 'Modal.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";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"}),c=o((function(e,o){var c=e.children,s=e.radius,m=e.size,u=e.scaling,p=e.color,d=l(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(a.Provider,{value:h,children:r("div",{ref:o,children:r(t.Root,n({},d,{children:c}))})})}));c.displayName="Modal.Root";export{a as ModalContext,c as ModalRoot};
|
3
3
|
//# sourceMappingURL=ModalRoot.mjs.map
|
@@ -23,8 +23,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
23
23
|
};
|
24
24
|
import { jsx as _jsx, jsxs as _jsxs } 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 IconButton from '../../../lib/components/IconButton';
|
29
29
|
import { Cross2Icon } from '@radix-ui/react-icons';
|
30
30
|
import { ModalContext } from './ModalRoot';
|
@@ -42,7 +42,7 @@ export var modalTitleVariants = cva('m-0', {
|
|
42
42
|
size: 'medium',
|
43
43
|
},
|
44
44
|
});
|
45
|
-
export var modalCloseVariants = cva("inline-flex items-center justify-center bg-transparent text-slate-11 outline-none hover:cursor-pointer hover:bg-transparent active:border-none active:bg-transparent dark:bg-transparent dark:text-slateDark-11 dark:hover:bg-transparent dark:active:bg-transparent", {
|
45
|
+
export var modalCloseVariants = cva("p-0 hover:text-slate-12 dark:hover:text-slateDark-12 inline-flex items-center justify-center bg-transparent text-slate-11 outline-none hover:cursor-pointer hover:bg-transparent active:border-none active:bg-transparent dark:bg-transparent dark:text-slateDark-11 dark:hover:bg-transparent dark:active:bg-transparent", {
|
46
46
|
variants: {
|
47
47
|
size: {
|
48
48
|
small: 'w-[24px] h-[24px]',
|
@@ -58,6 +58,6 @@ export var modalCloseVariants = cva("inline-flex items-center justify-center bg-
|
|
58
58
|
export var ModalTitle = forwardRef(function (_a, ref) {
|
59
59
|
var children = _a.children, className = _a.className, props = __rest(_a, ["children", "className"]);
|
60
60
|
var size = useContext(ModalContext).size;
|
61
|
-
return (_jsxs("div", __assign({ ref: ref, className: "flex items-center justify-between border border-slate-5 p-4 font-bold text-slate-12 dark:border-slateDark-5 dark:text-slateDark-12" }, props, { children: [_jsx(
|
61
|
+
return (_jsxs("div", __assign({ ref: ref, className: "flex items-center justify-between border-b border-slate-5 p-4 font-bold text-slate-12 dark:border-slateDark-5 dark:text-slateDark-12" }, props, { children: [_jsx(DialogPrimitive.Title, { className: cn(modalTitleVariants({ size: size }), className), children: children }), _jsx(DialogPrimitive.Close, { children: _jsx(IconButton, { "aria-label": "Close", className: cn(modalCloseVariants({ size: size })), size: size, children: _jsx(Cross2Icon, {}) }) })] })));
|
62
62
|
});
|
63
63
|
ModalTitle.displayName = 'Modal.Title';
|
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useContext as a}from"react";import
|
2
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{forwardRef as t,useContext as a}from"react";import*as i from"@radix-ui/react-dialog";import{cva as n}from"class-variance-authority";import{IconButton as o}from"../IconButton/index.mjs";import{Cross2Icon as s}from"@radix-ui/react-icons";import{ModalContext as l}from"./ModalRoot.mjs";import{cn as m}from"../../utils/utils.mjs";var p=function(){return p=Object.assign||function(e){for(var r,t=1,a=arguments.length;t<a;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},p.apply(this,arguments)},c=function(e,r){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)r.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t},d=n("m-0",{variants:{size:{small:"text-sm",medium:"text-lg",large:"text-xl","x-large":"text-2xl"}},defaultVariants:{size:"medium"}}),x=n("p-0 hover:text-slate-12 dark:hover:text-slateDark-12 inline-flex items-center justify-center bg-transparent text-slate-11 outline-none hover:cursor-pointer hover:bg-transparent active:border-none active:bg-transparent dark:bg-transparent dark:text-slateDark-11 dark:hover:bg-transparent dark:active:bg-transparent",{variants:{size:{small:"w-[24px] h-[24px]",medium:"w-[32px] h-[32px]",large:"w-[32px] h-[32px]","x-large":"w-[40px] h-[40px]"}},defaultVariants:{size:"medium"}}),f=t((function(t,n){var f=t.children,u=t.className,b=c(t,["children","className"]),h=a(l).size;return e("div",p({ref:n,className:"flex items-center justify-between border-b border-slate-5 p-4 font-bold text-slate-12 dark:border-slateDark-5 dark:text-slateDark-12"},b,{children:[r(i.Title,{className:m(d({size:h}),u),children:f}),r(i.Close,{children:r(o,{"aria-label":"Close",className:m(x({size:h})),size:h,children:r(s,{})})})]}))}));f.displayName="Modal.Title";export{f as ModalTitle,x as modalCloseVariants,d as modalTitleVariants};
|
3
3
|
//# sourceMappingURL=ModalTitle.mjs.map
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import
|
3
|
-
export declare const ModalTrigger: React.ForwardRefExoticComponent<Omit<
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
3
|
+
export declare const ModalTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|