@tipp/ui 1.1.16 → 1.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/dialog.cjs +94 -1
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.d.cts +16 -1
- package/dist/atoms/dialog.d.ts +16 -1
- package/dist/atoms/dialog.js +1 -1
- package/dist/atoms/drawer.cjs +1 -1
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +1 -1
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +160 -106
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.d.cts +2 -1
- package/dist/atoms/index.d.ts +2 -1
- package/dist/atoms/index.js +54 -54
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-6FOHEAYC.js +130 -0
- package/dist/chunk-6FOHEAYC.js.map +1 -0
- package/dist/chunk-A4DWJXWY.js +91 -0
- package/dist/chunk-A4DWJXWY.js.map +1 -0
- package/dist/chunk-DGSXVSV3.js +67 -0
- package/dist/chunk-DGSXVSV3.js.map +1 -0
- package/dist/chunk-DUR7OGOH.js +67 -0
- package/dist/chunk-DUR7OGOH.js.map +1 -0
- package/dist/chunk-E7MPO4YR.js +123 -0
- package/dist/chunk-E7MPO4YR.js.map +1 -0
- package/dist/chunk-FUMEEFXM.js +67 -0
- package/dist/chunk-FUMEEFXM.js.map +1 -0
- package/dist/chunk-G54PVBQV.js +44 -0
- package/dist/chunk-G54PVBQV.js.map +1 -0
- package/dist/chunk-GPT25Y5H.js +59 -0
- package/dist/chunk-GPT25Y5H.js.map +1 -0
- package/dist/chunk-HMP3DMRR.js +59 -0
- package/dist/chunk-HMP3DMRR.js.map +1 -0
- package/dist/chunk-HRIQWMQV.js +67 -0
- package/dist/chunk-HRIQWMQV.js.map +1 -0
- package/dist/chunk-IIU2TK3X.js +130 -0
- package/dist/chunk-IIU2TK3X.js.map +1 -0
- package/dist/chunk-J36GXXB6.js +130 -0
- package/dist/chunk-J36GXXB6.js.map +1 -0
- package/dist/chunk-KCAEAISO.js +67 -0
- package/dist/chunk-KCAEAISO.js.map +1 -0
- package/dist/chunk-NUOU5BAA.js +63 -0
- package/dist/chunk-NUOU5BAA.js.map +1 -0
- package/dist/chunk-O67MZISK.js +41 -0
- package/dist/chunk-O67MZISK.js.map +1 -0
- package/dist/chunk-OFTAZGRK.js +40 -0
- package/dist/chunk-OFTAZGRK.js.map +1 -0
- package/dist/chunk-OGNKHAGV.js +43 -0
- package/dist/chunk-OGNKHAGV.js.map +1 -0
- package/dist/chunk-WBZ7Y7QK.js +60 -0
- package/dist/chunk-WBZ7Y7QK.js.map +1 -0
- package/dist/chunk-YODYECIW.js +59 -0
- package/dist/chunk-YODYECIW.js.map +1 -0
- package/dist/chunk-ZXFSKIXI.js +60 -0
- package/dist/chunk-ZXFSKIXI.js.map +1 -0
- package/dist/chunk-ZZXCFJOT.js +59 -0
- package/dist/chunk-ZZXCFJOT.js.map +1 -0
- package/dist/index.cjs +251 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +39 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +66 -66
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +24 -24
- package/dist/molecules/expand-table/row.js +23 -23
- package/dist/molecules/index.js +26 -26
- package/dist/molecules/navigation.js +24 -24
- package/dist/utils/index.js +3 -3
- package/package.json +3 -3
- package/src/atoms/dialog.tsx +69 -1
- package/src/atoms/drawer.tsx +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { IconButton } from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n containerRef?: HTMLDivElement;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const { containerRef, children, style = {}, ...rest } = props;\n\n const ref = useMemo(() => {\n return containerRef || document.getElementsByTagName('main')[0];\n }, [containerRef]);\n\n return (\n <RadixDialog.Portal container={ref}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{ ...style, position: 'relative' }}\n {...rest}\n >\n <RadixDialog.Close style={{ position: 'absolute', right: 0, top: 0 }}>\n <IconButton variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n </RadixDialog.Close>\n {children}\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger: RadixDialog.Trigger,\n Content,\n Close: RadixDialog.Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AAgBhB,SAOM,KAPN;AAVR,SAASA,SAAQ,OAAyC;AACxD,QAAwD,YAAhD,gBAAc,UAAU,QAAQ,CAAC,EAV3C,IAU0D,IAAT,iBAAS,IAAT,CAAvC,gBAAc,YAAU;AAEhC,QAAM,MAAM,QAAQ,MAAM;AACxB,WAAO,gBAAgB,SAAS,qBAAqB,MAAM,EAAE,CAAC;AAAA,EAChE,GAAG,CAAC,YAAY,CAAC;AAEjB,SACE,oBAAa,oBAAZ,EAAmB,WAAW,KAC7B,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAU;AAAA,MACV,OAAO,iCAAK,QAAL,EAAY,UAAU,WAAW;AAAA,OACpC,OAHL;AAAA,MAKC;AAAA,4BAAa,mBAAZ,EAAkB,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,KAAK,EAAE,GACjE,8BAAC,cAAW,SAAQ,SAClB,8BAAC,cAAW,GACd,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF,GACF;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAqB;AAAA,EACrB,SAAAA;AAAA,EACA,OAAmB;AAAA,EACnB,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-N552FDTV.js";
|
|
6
|
+
|
|
7
|
+
// src/atoms/dialog.tsx
|
|
8
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
9
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
10
|
+
import { IconButton } from "@radix-ui/themes";
|
|
11
|
+
import { useEffect, useRef } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
function Content2(props) {
|
|
14
|
+
const _a = props, { children, style = {} } = _a, rest = __objRest(_a, ["children", "style"]);
|
|
15
|
+
const containerRef = useRef(null);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
18
|
+
}, []);
|
|
19
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsxs(
|
|
20
|
+
RadixDialog.Content,
|
|
21
|
+
__spreadProps(__spreadValues({
|
|
22
|
+
className: "DialogContent",
|
|
23
|
+
style: __spreadProps(__spreadValues({}, style), { position: "relative" })
|
|
24
|
+
}, rest), {
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(RadixDialog.Close, { style: { position: "absolute", right: 0, top: 0 }, children: /* @__PURE__ */ jsx(IconButton, { variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) }) }),
|
|
27
|
+
children
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
) }) });
|
|
31
|
+
}
|
|
32
|
+
function Close2(_a) {
|
|
33
|
+
var _b = _a, {
|
|
34
|
+
children
|
|
35
|
+
} = _b, rest = __objRest(_b, [
|
|
36
|
+
"children"
|
|
37
|
+
]);
|
|
38
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
39
|
+
}
|
|
40
|
+
function Trigger2(_a) {
|
|
41
|
+
var _b = _a, {
|
|
42
|
+
children
|
|
43
|
+
} = _b, rest = __objRest(_b, [
|
|
44
|
+
"children"
|
|
45
|
+
]);
|
|
46
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
47
|
+
}
|
|
48
|
+
var Dialog = {
|
|
49
|
+
Root: RadixDialog.Root,
|
|
50
|
+
Trigger: Trigger2,
|
|
51
|
+
Content: Content2,
|
|
52
|
+
Close: Close2,
|
|
53
|
+
Description: RadixDialog.Description,
|
|
54
|
+
Title: RadixDialog.Title
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
Dialog
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-WBZ7Y7QK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { IconButton } from '@radix-ui/themes';\nimport { useEffect, useMemo, useRef } from 'react';\n\ntype ContentProps = RadixDialog.DialogContentProps & {};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const { children, style = {}, ...rest } = props;\n\n const containerRef = useRef<Element | null>(null);\n\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes')[0];\n }, []);\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{ ...style, position: 'relative' }}\n {...rest}\n >\n <RadixDialog.Close style={{ position: 'absolute', right: 0, top: 0 }}>\n <IconButton variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n </RadixDialog.Close>\n {children}\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,WAAoB,cAAc;AAgBnC,SAOM,KAPN;AAZR,SAASA,SAAQ,OAAyC;AACxD,QAA0C,YAAlC,YAAU,QAAQ,CAAC,EAR7B,IAQ4C,IAAT,iBAAS,IAAT,CAAzB,YAAU;AAElB,QAAM,eAAe,OAAuB,IAAI;AAEhD,YAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc,EAAE,CAAC;AAAA,EAC1E,GAAG,CAAC,CAAC;AAEL,SACE,oBAAa,oBAAZ,EAAmB,WAAW,aAAa,SAC1C,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAU;AAAA,MACV,OAAO,iCAAK,QAAL,EAAY,UAAU,WAAW;AAAA,OACpC,OAHL;AAAA,MAKC;AAAA,4BAAa,mBAAZ,EAAkB,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,KAAK,EAAE,GACjE,8BAAC,cAAW,SAAQ,SAClB,8BAAC,cAAW,GACd,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EArCF,IAoCe,IAEV,iBAFU,IAEV;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGsC;AAHtC,eACf;AAAA;AAAA,EAhDF,IA+CiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAAA;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content","Close","Trigger"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToastContainer
|
|
3
|
+
} from "./chunk-NJ2U2TVS.js";
|
|
4
|
+
import {
|
|
5
|
+
ThemeProvider
|
|
6
|
+
} from "./chunk-BVBX6IJ3.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/drawer.tsx
|
|
14
|
+
import { useEffect, useRef } from "react";
|
|
15
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function Root2(props) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
19
|
+
}
|
|
20
|
+
function Content2(props) {
|
|
21
|
+
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
22
|
+
const containerRef = useRef(null);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
containerRef.current = document.getElementsByClassName("radix-themes");
|
|
25
|
+
}, []);
|
|
26
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
28
|
+
/* @__PURE__ */ jsxs(
|
|
29
|
+
Dialog.Content,
|
|
30
|
+
__spreadProps(__spreadValues({
|
|
31
|
+
className: `DrawerContent ${position} ${className || ""}`
|
|
32
|
+
}, rest), {
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(ToastContainer, {}),
|
|
35
|
+
children
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
)
|
|
39
|
+
] }) });
|
|
40
|
+
}
|
|
41
|
+
function Trigger2(props) {
|
|
42
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
43
|
+
}
|
|
44
|
+
var Drawer = {
|
|
45
|
+
Root: Dialog.Root,
|
|
46
|
+
Trigger: Trigger2,
|
|
47
|
+
Content: Content2,
|
|
48
|
+
Close: Dialog.Close,
|
|
49
|
+
Title: Dialog.Title,
|
|
50
|
+
Description: Dialog.Description
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
Root2 as Root,
|
|
55
|
+
Content2 as Content,
|
|
56
|
+
Trigger2 as Trigger,
|
|
57
|
+
Drawer
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-YODYECIW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { ThemeProvider } from '../theme/theme-provider';\nimport { ToastContainer } from './toast';\n\nexport function Root(props: Dialog.DialogProps): React.ReactNode {\n return <Dialog.Root {...props} />;\n}\n\ntype ContentProps = Dialog.DialogContentProps & {\n /** Drawer가 붙는 위치, 기본값 right */\n position?: 'left' | 'right' | 'bottom' | 'top';\n};\n\nexport function Content(props: ContentProps): React.ReactNode {\n const { position = 'right', className, children, ...rest } = props;\n\n const containerRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes');\n }, []);\n\n return (\n <Dialog.Portal container={containerRef.current}>\n <ThemeProvider>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n >\n <ToastContainer />\n {children}\n </Dialog.Content>\n </ThemeProvider>\n </Dialog.Portal>\n );\n}\n\nexport function Trigger(props: Dialog.DialogTriggerProps): React.ReactNode {\n return <Dialog.Trigger asChild {...props} />;\n}\n\nexport const Drawer = {\n Root: Dialog.Root,\n Trigger,\n Content,\n Close: Dialog.Close,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAgB,WAAW,cAAc;AACzC,YAAY,YAAY;AAKf,cAqBD,YArBC;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAA6D,YAArD,aAAW,SAAS,WAAW,SAfzC,IAe+D,IAAT,iBAAS,IAAT,CAA5C,YAAoB,aAAW;AAEvC,QAAM,eAAe,OAA2B,IAAI;AAEpD,YAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc;AAAA,EACvE,GAAG,CAAC,CAAC;AAEL,SACE,oBAAQ,eAAP,EAAc,WAAW,aAAa,SACrC,+BAAC,iBACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD,OAFL;AAAA,QAIC;AAAA,8BAAC,kBAAe;AAAA,UACf;AAAA;AAAA;AAAA,IACH;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,oBAAQ,gBAAP,iBAAe,SAAO,QAAK,MAAO;AAC5C;AAEO,IAAM,SAAS;AAAA,EACpB,MAAa;AAAA,EACb,SAAAA;AAAA,EACA,SAAAD;AAAA,EACA,OAAc;AAAA,EACd,OAAc;AAAA,EACd,aAAoB;AACtB;","names":["Root","Content","Trigger"]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-N552FDTV.js";
|
|
6
|
+
|
|
7
|
+
// src/atoms/dialog.tsx
|
|
8
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
9
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
10
|
+
import { IconButton } from "@radix-ui/themes";
|
|
11
|
+
import { useEffect, useRef } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
function Content2(props) {
|
|
14
|
+
const _a = props, { children, style = {} } = _a, rest = __objRest(_a, ["children", "style"]);
|
|
15
|
+
const containerRef = useRef(null);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
18
|
+
}, []);
|
|
19
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsx(RadixDialog.Overlay, { className: "DialogOverlay", children: /* @__PURE__ */ jsxs(
|
|
20
|
+
RadixDialog.Content,
|
|
21
|
+
__spreadProps(__spreadValues({
|
|
22
|
+
className: "DialogContent",
|
|
23
|
+
style: __spreadProps(__spreadValues({}, style), { position: "relative" })
|
|
24
|
+
}, rest), {
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(RadixDialog.Close, { style: { position: "absolute", right: 0, top: 0 }, children: /* @__PURE__ */ jsx(IconButton, { variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) }) }),
|
|
27
|
+
children
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
) }) });
|
|
31
|
+
}
|
|
32
|
+
function Close2(_a) {
|
|
33
|
+
var _b = _a, {
|
|
34
|
+
children
|
|
35
|
+
} = _b, rest = __objRest(_b, [
|
|
36
|
+
"children"
|
|
37
|
+
]);
|
|
38
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
39
|
+
}
|
|
40
|
+
function Trigger2(_a) {
|
|
41
|
+
var _b = _a, {
|
|
42
|
+
children
|
|
43
|
+
} = _b, rest = __objRest(_b, [
|
|
44
|
+
"children"
|
|
45
|
+
]);
|
|
46
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
47
|
+
}
|
|
48
|
+
var Dialog = {
|
|
49
|
+
Root: RadixDialog.Root,
|
|
50
|
+
Trigger: Trigger2,
|
|
51
|
+
Content: Content2,
|
|
52
|
+
Close: Close2,
|
|
53
|
+
Description: RadixDialog.Description,
|
|
54
|
+
Title: RadixDialog.Title
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
Dialog
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=chunk-ZXFSKIXI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/dialog.tsx"],"sourcesContent":["import * as RadixDialog from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { IconButton } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\n\ntype ContentProps = RadixDialog.DialogContentProps & {};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const { children, style = {}, ...rest } = props;\n\n const containerRef = useRef<Element | null>(null);\n\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes')[0];\n }, []);\n\n return (\n <RadixDialog.Portal container={containerRef.current}>\n <RadixDialog.Overlay className=\"DialogOverlay\">\n <RadixDialog.Content\n className=\"DialogContent\"\n style={{ ...style, position: 'relative' }}\n {...rest}\n >\n <RadixDialog.Close style={{ position: 'absolute', right: 0, top: 0 }}>\n <IconButton variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n </RadixDialog.Close>\n {children}\n </RadixDialog.Content>\n </RadixDialog.Overlay>\n </RadixDialog.Portal>\n );\n}\n\nfunction Close({\n children,\n ...rest\n}: RadixDialog.DialogCloseProps): React.ReactElement {\n return (\n <RadixDialog.Close asChild {...rest}>\n {children}\n </RadixDialog.Close>\n );\n}\n\nfunction Trigger({\n children,\n ...rest\n}: RadixDialog.DialogTriggerProps): React.ReactElement {\n return (\n <RadixDialog.Trigger asChild {...rest}>\n {children}\n </RadixDialog.Trigger>\n );\n}\n\nexport const Dialog = {\n Root: RadixDialog.Root,\n Trigger,\n Content,\n Close,\n Description: RadixDialog.Description,\n Title: RadixDialog.Title,\n};\n"],"mappings":";;;;;;;AAAA,YAAY,iBAAiB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,WAAW,cAAc;AAgB1B,SAOM,KAPN;AAZR,SAASA,SAAQ,OAAyC;AACxD,QAA0C,YAAlC,YAAU,QAAQ,CAAC,EAR7B,IAQ4C,IAAT,iBAAS,IAAT,CAAzB,YAAU;AAElB,QAAM,eAAe,OAAuB,IAAI;AAEhD,YAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc,EAAE,CAAC;AAAA,EAC1E,GAAG,CAAC,CAAC;AAEL,SACE,oBAAa,oBAAZ,EAAmB,WAAW,aAAa,SAC1C,8BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA,IAAa;AAAA,IAAZ;AAAA,MACC,WAAU;AAAA,MACV,OAAO,iCAAK,QAAL,EAAY,UAAU,WAAW;AAAA,OACpC,OAHL;AAAA,MAKC;AAAA,4BAAa,mBAAZ,EAAkB,OAAO,EAAE,UAAU,YAAY,OAAO,GAAG,KAAK,EAAE,GACjE,8BAAC,cAAW,SAAQ,SAClB,8BAAC,cAAW,GACd,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH,GACF,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EArCF,IAoCe,IAEV,iBAFU,IAEV;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,mBAAZ,+BAAkB,SAAO,QAAK,OAA9B,EACE,WACH;AAEJ;AAEA,SAASC,SAAQ,IAGsC;AAHtC,eACf;AAAA;AAAA,EAhDF,IA+CiB,IAEZ,iBAFY,IAEZ;AAAA,IADH;AAAA;AAGA,SACE,oBAAa,qBAAZ,+BAAoB,SAAO,QAAK,OAAhC,EACE,WACH;AAEJ;AAEO,IAAM,SAAS;AAAA,EACpB,MAAkB;AAAA,EAClB,SAAAA;AAAA,EACA,SAAAF;AAAA,EACA,OAAAC;AAAA,EACA,aAAyB;AAAA,EACzB,OAAmB;AACrB;","names":["Content","Close","Trigger"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider
|
|
3
|
+
} from "./chunk-BVBX6IJ3.js";
|
|
4
|
+
import {
|
|
5
|
+
ToastContainer
|
|
6
|
+
} from "./chunk-NJ2U2TVS.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/drawer.tsx
|
|
14
|
+
import { useEffect, useRef } from "react";
|
|
15
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function Root2(props) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
19
|
+
}
|
|
20
|
+
function Content2(props) {
|
|
21
|
+
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
22
|
+
const containerRef = useRef(null);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
25
|
+
}, []);
|
|
26
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
28
|
+
/* @__PURE__ */ jsxs(
|
|
29
|
+
Dialog.Content,
|
|
30
|
+
__spreadProps(__spreadValues({
|
|
31
|
+
className: `DrawerContent ${position} ${className || ""}`
|
|
32
|
+
}, rest), {
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx(ToastContainer, {}),
|
|
35
|
+
children
|
|
36
|
+
]
|
|
37
|
+
})
|
|
38
|
+
)
|
|
39
|
+
] }) });
|
|
40
|
+
}
|
|
41
|
+
function Trigger2(props) {
|
|
42
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
43
|
+
}
|
|
44
|
+
var Drawer = {
|
|
45
|
+
Root: Dialog.Root,
|
|
46
|
+
Trigger: Trigger2,
|
|
47
|
+
Content: Content2,
|
|
48
|
+
Close: Dialog.Close,
|
|
49
|
+
Title: Dialog.Title,
|
|
50
|
+
Description: Dialog.Description
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export {
|
|
54
|
+
Root2 as Root,
|
|
55
|
+
Content2 as Content,
|
|
56
|
+
Trigger2 as Trigger,
|
|
57
|
+
Drawer
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=chunk-ZZXCFJOT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { ThemeProvider } from '../theme/theme-provider';\nimport { ToastContainer } from './toast';\n\nexport function Root(props: Dialog.DialogProps): React.ReactNode {\n return <Dialog.Root {...props} />;\n}\n\ntype ContentProps = Dialog.DialogContentProps & {\n /** Drawer가 붙는 위치, 기본값 right */\n position?: 'left' | 'right' | 'bottom' | 'top';\n};\n\nexport function Content(props: ContentProps): React.ReactNode {\n const { position = 'right', className, children, ...rest } = props;\n\n const containerRef = useRef<Element | null>(null);\n\n useEffect(() => {\n containerRef.current = document.getElementsByClassName('radix-themes')[0];\n }, []);\n\n return (\n <Dialog.Portal container={containerRef.current}>\n <ThemeProvider>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n {...rest}\n >\n <ToastContainer />\n {children}\n </Dialog.Content>\n </ThemeProvider>\n </Dialog.Portal>\n );\n}\n\nexport function Trigger(props: Dialog.DialogTriggerProps): React.ReactNode {\n return <Dialog.Trigger asChild {...props} />;\n}\n\nexport const Drawer = {\n Root: Dialog.Root,\n Trigger,\n Content,\n Close: Dialog.Close,\n Title: Dialog.Title,\n Description: Dialog.Description,\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAgB,WAAW,cAAc;AACzC,YAAY,YAAY;AAKf,cAqBD,YArBC;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAA6D,YAArD,aAAW,SAAS,WAAW,SAfzC,IAe+D,IAAT,iBAAS,IAAT,CAA5C,YAAoB,aAAW;AAEvC,QAAM,eAAe,OAAuB,IAAI;AAEhD,YAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc,EAAE,CAAC;AAAA,EAC1E,GAAG,CAAC,CAAC;AAEL,SACE,oBAAQ,eAAP,EAAc,WAAW,aAAa,SACrC,+BAAC,iBACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD,OAFL;AAAA,QAIC;AAAA,8BAAC,kBAAe;AAAA,UACf;AAAA;AAAA;AAAA,IACH;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAmD;AACzE,SAAO,oBAAQ,gBAAP,iBAAe,SAAO,QAAK,MAAO;AAC5C;AAEO,IAAM,SAAS;AAAA,EACpB,MAAa;AAAA,EACb,SAAAA;AAAA,EACA,SAAAD;AAAA,EACA,OAAc;AAAA,EACd,OAAc;AAAA,EACd,aAAoB;AACtB;","names":["Root","Content","Trigger"]}
|