@tipp/ui 1.2.13 → 1.2.15
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/badge.cjs +2 -0
- package/dist/atoms/badge.cjs.map +1 -1
- package/dist/atoms/badge.d.cts +2 -2
- package/dist/atoms/badge.d.ts +2 -2
- package/dist/atoms/badge.js +1 -1
- package/dist/atoms/dialog.cjs +24 -58
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +1 -3
- package/dist/atoms/drawer.cjs +7 -50
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.d.cts +1 -1
- package/dist/atoms/drawer.d.ts +1 -1
- package/dist/atoms/drawer.js +1 -4
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs +116 -131
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +46 -47
- package/dist/atoms/pagination.js +2 -2
- package/dist/atoms/toast.cjs +7 -10
- package/dist/atoms/toast.cjs.map +1 -1
- package/dist/atoms/toast.js +1 -2
- package/dist/chunk-2FIAJ3FS.js +59 -0
- package/dist/chunk-2FIAJ3FS.js.map +1 -0
- package/dist/chunk-2QDLO3YM.js +97 -0
- package/dist/chunk-2QDLO3YM.js.map +1 -0
- package/dist/chunk-33YXJNZC.js +39 -0
- package/dist/chunk-33YXJNZC.js.map +1 -0
- package/dist/chunk-3PKH6B5Q.js +90 -0
- package/dist/chunk-3PKH6B5Q.js.map +1 -0
- package/dist/chunk-3QK6FAST.js +88 -0
- package/dist/chunk-3QK6FAST.js.map +1 -0
- package/dist/chunk-4BPB2XGG.js +94 -0
- package/dist/chunk-4BPB2XGG.js.map +1 -0
- package/dist/chunk-4LU6NFEH.js +59 -0
- package/dist/chunk-4LU6NFEH.js.map +1 -0
- package/dist/chunk-4SMYMKD7.js +59 -0
- package/dist/chunk-4SMYMKD7.js.map +1 -0
- package/dist/chunk-5T5OBKU6.js +38 -0
- package/dist/chunk-5T5OBKU6.js.map +1 -0
- package/dist/chunk-6IUPU7DC.js +44 -0
- package/dist/chunk-6IUPU7DC.js.map +1 -0
- package/dist/chunk-6MWBFGPV.js +44 -0
- package/dist/chunk-6MWBFGPV.js.map +1 -0
- package/dist/chunk-7JIZ5JRE.js +97 -0
- package/dist/chunk-7JIZ5JRE.js.map +1 -0
- package/dist/chunk-7MGIYERY.js +340 -0
- package/dist/chunk-7MGIYERY.js.map +1 -0
- package/dist/chunk-7MGKSZWD.js +59 -0
- package/dist/chunk-7MGKSZWD.js.map +1 -0
- package/dist/chunk-7NEEBOE5.js +59 -0
- package/dist/chunk-7NEEBOE5.js.map +1 -0
- package/dist/chunk-7TLF23E7.js +50 -0
- package/dist/chunk-7TLF23E7.js.map +1 -0
- package/dist/chunk-AAAQKCFX.js +39 -0
- package/dist/chunk-AAAQKCFX.js.map +1 -0
- package/dist/chunk-AOUTNRVR.js +94 -0
- package/dist/chunk-AOUTNRVR.js.map +1 -0
- package/dist/chunk-AOY2722L.js +43 -0
- package/dist/chunk-AOY2722L.js.map +1 -0
- package/dist/chunk-CA3KCVF3.js +44 -0
- package/dist/chunk-CA3KCVF3.js.map +1 -0
- package/dist/chunk-DWRAPSVA.js +94 -0
- package/dist/chunk-DWRAPSVA.js.map +1 -0
- package/dist/chunk-E2EF6AJK.js +340 -0
- package/dist/chunk-E2EF6AJK.js.map +1 -0
- package/dist/chunk-EBIISCYP.js +59 -0
- package/dist/chunk-EBIISCYP.js.map +1 -0
- package/dist/chunk-EWD4AO5N.js +49 -0
- package/dist/chunk-EWD4AO5N.js.map +1 -0
- package/dist/chunk-EYP37NAX.js +39 -0
- package/dist/chunk-EYP37NAX.js.map +1 -0
- package/dist/chunk-FLPWMNPQ.js +340 -0
- package/dist/chunk-FLPWMNPQ.js.map +1 -0
- package/dist/chunk-FYQHXVVC.js +39 -0
- package/dist/chunk-FYQHXVVC.js.map +1 -0
- package/dist/chunk-G653JNTD.js +59 -0
- package/dist/chunk-G653JNTD.js.map +1 -0
- package/dist/chunk-G7BR6KSX.js +130 -0
- package/dist/chunk-G7BR6KSX.js.map +1 -0
- package/dist/chunk-GXID5CO5.js +92 -0
- package/dist/chunk-GXID5CO5.js.map +1 -0
- package/dist/chunk-HDIMW26M.js +40 -0
- package/dist/chunk-HDIMW26M.js.map +1 -0
- package/dist/chunk-HJQQMAUB.js +50 -0
- package/dist/chunk-HJQQMAUB.js.map +1 -0
- package/dist/chunk-HMLPXWJ6.js +94 -0
- package/dist/chunk-HMLPXWJ6.js.map +1 -0
- package/dist/chunk-HWJLK6WM.js +39 -0
- package/dist/chunk-HWJLK6WM.js.map +1 -0
- package/dist/chunk-I2PIGNYP.js +97 -0
- package/dist/chunk-I2PIGNYP.js.map +1 -0
- package/dist/chunk-IX7WVKHI.js +59 -0
- package/dist/chunk-IX7WVKHI.js.map +1 -0
- package/dist/chunk-J4DYXLNJ.js +88 -0
- package/dist/chunk-J4DYXLNJ.js.map +1 -0
- package/dist/chunk-JGEN42KT.js +35 -0
- package/dist/chunk-JGEN42KT.js.map +1 -0
- package/dist/chunk-KK5BCWBR.js +42 -0
- package/dist/chunk-KK5BCWBR.js.map +1 -0
- package/dist/chunk-KLOQQGZ3.js +42 -0
- package/dist/chunk-KLOQQGZ3.js.map +1 -0
- package/dist/chunk-KVGCDBJ4.js +42 -0
- package/dist/chunk-KVGCDBJ4.js.map +1 -0
- package/dist/chunk-L3UVJ67X.js +340 -0
- package/dist/chunk-L3UVJ67X.js.map +1 -0
- package/dist/chunk-LS64FVRE.js +59 -0
- package/dist/chunk-LS64FVRE.js.map +1 -0
- package/dist/chunk-LVXTFKVJ.js +49 -0
- package/dist/chunk-LVXTFKVJ.js.map +1 -0
- package/dist/chunk-MFVWAA4Y.js +56 -0
- package/dist/chunk-MFVWAA4Y.js.map +1 -0
- package/dist/chunk-MKYNSWMI.js +340 -0
- package/dist/chunk-MKYNSWMI.js.map +1 -0
- package/dist/chunk-NJTNP47L.js +340 -0
- package/dist/chunk-NJTNP47L.js.map +1 -0
- package/dist/chunk-NUEMI3QO.js +340 -0
- package/dist/chunk-NUEMI3QO.js.map +1 -0
- package/dist/chunk-NY6E6TKU.js +94 -0
- package/dist/chunk-NY6E6TKU.js.map +1 -0
- package/dist/chunk-OJQJLBBK.js +39 -0
- package/dist/chunk-OJQJLBBK.js.map +1 -0
- package/dist/chunk-P7633BEQ.js +340 -0
- package/dist/chunk-P7633BEQ.js.map +1 -0
- package/dist/chunk-P7NBEL7J.js +88 -0
- package/dist/chunk-P7NBEL7J.js.map +1 -0
- package/dist/chunk-PLXOVGG4.js +39 -0
- package/dist/chunk-PLXOVGG4.js.map +1 -0
- package/dist/chunk-PT5CZAR3.js +94 -0
- package/dist/chunk-PT5CZAR3.js.map +1 -0
- package/dist/chunk-PXABCUAT.js +44 -0
- package/dist/chunk-PXABCUAT.js.map +1 -0
- package/dist/chunk-QNYKTW7L.js +45 -0
- package/dist/chunk-QNYKTW7L.js.map +1 -0
- package/dist/chunk-QVQCTPDU.js +130 -0
- package/dist/chunk-QVQCTPDU.js.map +1 -0
- package/dist/chunk-RXCENPRG.js +38 -0
- package/dist/chunk-RXCENPRG.js.map +1 -0
- package/dist/chunk-SSI6JRBA.js +92 -0
- package/dist/chunk-SSI6JRBA.js.map +1 -0
- package/dist/chunk-T2DBM2OA.js +59 -0
- package/dist/chunk-T2DBM2OA.js.map +1 -0
- package/dist/chunk-TAU5LFOR.js +39 -0
- package/dist/chunk-TAU5LFOR.js.map +1 -0
- package/dist/chunk-UFW4DFY5.js +39 -0
- package/dist/chunk-UFW4DFY5.js.map +1 -0
- package/dist/chunk-US7J5XUZ.js +36 -0
- package/dist/chunk-US7J5XUZ.js.map +1 -0
- package/dist/chunk-VPHZV3J2.js +340 -0
- package/dist/chunk-VPHZV3J2.js.map +1 -0
- package/dist/chunk-WZJWP4AC.js +59 -0
- package/dist/chunk-WZJWP4AC.js.map +1 -0
- package/dist/chunk-X2VREBVY.js +39 -0
- package/dist/chunk-X2VREBVY.js.map +1 -0
- package/dist/chunk-X55DKUZS.js +39 -0
- package/dist/chunk-X55DKUZS.js.map +1 -0
- package/dist/chunk-XFPO6ULS.js +39 -0
- package/dist/chunk-XFPO6ULS.js.map +1 -0
- package/dist/chunk-XKOYSFH4.js +43 -0
- package/dist/chunk-XKOYSFH4.js.map +1 -0
- package/dist/chunk-XXKNNYIJ.js +59 -0
- package/dist/chunk-XXKNNYIJ.js.map +1 -0
- package/dist/chunk-Y3L7BYDF.js +169 -0
- package/dist/chunk-Y3L7BYDF.js.map +1 -0
- package/dist/chunk-YA3PXLPU.js +53 -0
- package/dist/chunk-YA3PXLPU.js.map +1 -0
- package/dist/chunk-YAAL4JEU.js +59 -0
- package/dist/chunk-YAAL4JEU.js.map +1 -0
- package/dist/chunk-YESWEUM2.js +1 -0
- package/dist/chunk-YESWEUM2.js.map +1 -0
- package/dist/chunk-YILB2DTL.js +39 -0
- package/dist/chunk-YILB2DTL.js.map +1 -0
- package/dist/chunk-YNVFLDKB.js +92 -0
- package/dist/chunk-YNVFLDKB.js.map +1 -0
- package/dist/chunk-YSBOFKXT.js +39 -0
- package/dist/chunk-YSBOFKXT.js.map +1 -0
- package/dist/chunk-YTYGMU6L.js +169 -0
- package/dist/chunk-YTYGMU6L.js.map +1 -0
- package/dist/chunk-ZC7IMWRE.js +38 -0
- package/dist/chunk-ZC7IMWRE.js.map +1 -0
- package/dist/chunk-ZUUS4QZE.js +59 -0
- package/dist/chunk-ZUUS4QZE.js.map +1 -0
- package/dist/chunk-ZYNW3VYG.js +53 -0
- package/dist/chunk-ZYNW3VYG.js.map +1 -0
- package/dist/index.cjs +244 -252
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +67 -38
- package/dist/index.css.map +1 -1
- package/dist/index.js +72 -72
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +24 -25
- package/dist/molecules/expand-table/row.js +21 -22
- package/dist/molecules/index.cjs +26 -24
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +28 -29
- package/dist/molecules/navigation.js +22 -23
- package/dist/molecules/stepper.js +3 -3
- package/dist/molecules/tag-selector.cjs +2 -0
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +22 -23
- package/package.json +1 -1
- package/src/atoms/badge.tsx +3 -1
- package/src/atoms/dialog.tsx +0 -2
- package/src/atoms/drawer.tsx +8 -14
- package/src/atoms/toast.tsx +12 -19
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider
|
|
3
|
+
} from "./chunk-BVBX6IJ3.js";
|
|
4
|
+
import {
|
|
5
|
+
ToastContainer
|
|
6
|
+
} from "./chunk-PLXOVGG4.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-7NEEBOE5.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"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-N552FDTV.js";
|
|
6
|
+
|
|
7
|
+
// src/atoms/drawer.tsx
|
|
8
|
+
import { useEffect, useRef } from "react";
|
|
9
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
function Root2(props) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
13
|
+
}
|
|
14
|
+
function Content2(props) {
|
|
15
|
+
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
16
|
+
const containerRef = useRef(null);
|
|
17
|
+
useEffect(() => {
|
|
18
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
19
|
+
}, []);
|
|
20
|
+
return /* @__PURE__ */ jsxs(Dialog.Portal, { container: containerRef.current, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Dialog.Content,
|
|
24
|
+
__spreadProps(__spreadValues({
|
|
25
|
+
className: `DrawerContent ${position} ${className || ""}`
|
|
26
|
+
}, rest), {
|
|
27
|
+
children
|
|
28
|
+
})
|
|
29
|
+
)
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
function Trigger2(props) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
34
|
+
}
|
|
35
|
+
var Drawer = {
|
|
36
|
+
Root: Dialog.Root,
|
|
37
|
+
Trigger: Trigger2,
|
|
38
|
+
Content: Content2,
|
|
39
|
+
Close: Dialog.Close,
|
|
40
|
+
Title: Dialog.Title,
|
|
41
|
+
Description: Dialog.Description
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export {
|
|
45
|
+
Root2 as Root,
|
|
46
|
+
Content2 as Content,
|
|
47
|
+
Trigger2 as Trigger,
|
|
48
|
+
Drawer
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=chunk-7TLF23E7.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';\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 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 {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;AAIf,cAiBL,YAjBK;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOO,SAASC,SAAQ,OAAsC;AAC5D,QAA6D,YAArD,aAAW,SAAS,WAAW,SAdzC,IAc+D,IAAT,iBAAS,IAAT,CAA5C,YAAoB,aAAW;AAEvC,QAAM,eAAe,OAAuB,IAAI;AAChD,YAAU,MAAM;AACd,iBAAa,UAAU,SAAS,uBAAuB,cAAc,EAAE,CAAC;AAAA,EAC1E,GAAG,CAAC,CAAC;AAEL,SACE,qBAAQ,eAAP,EAAc,WAAW,aAAa,SAErC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,SACnD,OAFL;AAAA,QAIE;AAAA;AAAA,IACH;AAAA,KAEF;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,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconButton
|
|
3
|
+
} from "./chunk-O3DNDMV3.js";
|
|
4
|
+
import {
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "./chunk-N552FDTV.js";
|
|
7
|
+
|
|
8
|
+
// src/atoms/toast.tsx
|
|
9
|
+
import { Cross1Icon, InfoCircledIcon } from "@radix-ui/react-icons";
|
|
10
|
+
import { toast } from "react-toastify";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
function CloseButton({ closeToast }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
|
|
14
|
+
}
|
|
15
|
+
function ToastContainer(props) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
ToastContainer,
|
|
18
|
+
__spreadValues({
|
|
19
|
+
autoClose: 5e4,
|
|
20
|
+
closeButton: CloseButton,
|
|
21
|
+
closeOnClick: true,
|
|
22
|
+
draggable: true,
|
|
23
|
+
hideProgressBar: true,
|
|
24
|
+
icon: /* @__PURE__ */ jsx(InfoCircledIcon, {}),
|
|
25
|
+
newestOnTop: true,
|
|
26
|
+
pauseOnFocusLoss: true,
|
|
27
|
+
pauseOnHover: true,
|
|
28
|
+
position: "bottom-right",
|
|
29
|
+
rtl: false,
|
|
30
|
+
style: { zIndex: 999999 }
|
|
31
|
+
}, props)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
ToastContainer,
|
|
37
|
+
toast
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chunk-AAAQKCFX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/toast.tsx"],"sourcesContent":["import { Cross1Icon, InfoCircledIcon } from '@radix-ui/react-icons';\nimport {\n ToastContainer,\n type Theme,\n type ToastContainerProps,\n type TypeOptions,\n} from 'react-toastify';\nimport { IconButton } from './icon-button';\n\nexport { toast } from 'react-toastify';\n\ninterface CloseButtonProps {\n closeToast: (e: React.MouseEvent<HTMLElement>) => void;\n type: TypeOptions;\n ariaLabel?: string;\n theme: Theme;\n}\nfunction CloseButton({ closeToast }: CloseButtonProps): React.ReactNode {\n return (\n <IconButton color=\"gray\" onClick={closeToast} variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n );\n}\n\nexport function ToastContainer(props: ToastContainerProps): React.ReactElement {\n return (\n <ToastContainer\n autoClose={50000}\n closeButton={CloseButton}\n closeOnClick\n draggable\n hideProgressBar\n icon={<InfoCircledIcon />}\n newestOnTop\n pauseOnFocusLoss\n pauseOnHover\n position=\"bottom-right\"\n rtl={false}\n style={{ zIndex: 999999 }}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,uBAAuB;AAS5C,SAAS,aAAa;AAWhB;AAHN,SAAS,YAAY,EAAE,WAAW,GAAsC;AACtE,SACE,oBAAC,cAAW,OAAM,QAAO,SAAS,YAAY,SAAQ,SACpD,8BAAC,cAAW,GACd;AAEJ;AAEO,SAAS,eAAe,OAAgD;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAY;AAAA,MACZ,WAAS;AAAA,MACT,iBAAe;AAAA,MACf,MAAM,oBAAC,mBAAgB;AAAA,MACvB,aAAW;AAAA,MACX,kBAAgB;AAAA,MAChB,cAAY;AAAA,MACZ,UAAS;AAAA,MACT,KAAK;AAAA,MACL,OAAO,EAAE,QAAQ,OAAO;AAAA,OACpB;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToastContainer
|
|
3
|
+
} from "./chunk-ZC7IMWRE.js";
|
|
4
|
+
import {
|
|
5
|
+
Button
|
|
6
|
+
} from "./chunk-P3YCIJUP.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/dialog.tsx
|
|
14
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
15
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
16
|
+
import { Flex } from "@radix-ui/themes";
|
|
17
|
+
import { useEffect, useRef } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function Content2(props) {
|
|
20
|
+
const _a = props, {
|
|
21
|
+
children,
|
|
22
|
+
style = {},
|
|
23
|
+
width,
|
|
24
|
+
maxWidth,
|
|
25
|
+
minWidth,
|
|
26
|
+
maxHeight,
|
|
27
|
+
height,
|
|
28
|
+
minHeight
|
|
29
|
+
} = _a, rest = __objRest(_a, [
|
|
30
|
+
"children",
|
|
31
|
+
"style",
|
|
32
|
+
"width",
|
|
33
|
+
"maxWidth",
|
|
34
|
+
"minWidth",
|
|
35
|
+
"maxHeight",
|
|
36
|
+
"height",
|
|
37
|
+
"minHeight"
|
|
38
|
+
]);
|
|
39
|
+
const containerRef = useRef(null);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
42
|
+
}, []);
|
|
43
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsxs(RadixDialog.Overlay, { className: "DialogOverlay", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
RadixDialog.Content,
|
|
46
|
+
__spreadProps(__spreadValues({
|
|
47
|
+
className: "DialogContent",
|
|
48
|
+
style: __spreadValues({
|
|
49
|
+
width,
|
|
50
|
+
maxWidth,
|
|
51
|
+
minWidth,
|
|
52
|
+
maxHeight,
|
|
53
|
+
height,
|
|
54
|
+
minHeight
|
|
55
|
+
}, style)
|
|
56
|
+
}, rest), {
|
|
57
|
+
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", style: { position: "relative" }, children: [
|
|
58
|
+
/* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, { height: "18px", width: "18px" }) }) }),
|
|
59
|
+
children
|
|
60
|
+
] })
|
|
61
|
+
})
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ jsx(ToastContainer, {})
|
|
64
|
+
] }) });
|
|
65
|
+
}
|
|
66
|
+
function Close2(_a) {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
children
|
|
69
|
+
} = _b, rest = __objRest(_b, [
|
|
70
|
+
"children"
|
|
71
|
+
]);
|
|
72
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
73
|
+
}
|
|
74
|
+
function Trigger2(_a) {
|
|
75
|
+
var _b = _a, {
|
|
76
|
+
children
|
|
77
|
+
} = _b, rest = __objRest(_b, [
|
|
78
|
+
"children"
|
|
79
|
+
]);
|
|
80
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
81
|
+
}
|
|
82
|
+
var Dialog = {
|
|
83
|
+
Root: RadixDialog.Root,
|
|
84
|
+
Trigger: Trigger2,
|
|
85
|
+
Content: Content2,
|
|
86
|
+
Close: Close2,
|
|
87
|
+
Description: RadixDialog.Description,
|
|
88
|
+
Title: RadixDialog.Title
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
Dialog
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-AOUTNRVR.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 { Flex } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { Button } from './button';\nimport { ToastContainer } from './toast';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\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={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n <ToastContainer />\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,YAAY;AACrB,SAAS,WAAW,cAAc;AA+CxB,SAGM,KAHN;AAlCV,SAASA,SAAQ,OAAyC;AACxD,QAUI,YATF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAzBJ,IA2BM,IADC,iBACD,IADC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGF,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,+BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA;AAAA,MAAa;AAAA,MAAZ;AAAA,QACC,WAAU;AAAA,QACV,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,WACG;AAAA,SAED,OAXL;AAAA,QAaC,+BAAC,QAAK,WAAU,UAAS,OAAO,EAAE,UAAU,WAAW,GACrD;AAAA,8BAAa,mBAAZ,EAAkB,SAAO,MAAC,WAAU,eACnC,8BAAC,UAAO,OAAM,QAAO,SAAQ,eAC3B,8BAAC,cAAW,QAAO,QAAO,OAAM,QAAO,GACzC,GACF;AAAA,UACC;AAAA,WACH;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,kBAAe;AAAA,KAClB,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EAlEF,IAiEe,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,EA7EF,IA4EiB,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,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconButton
|
|
3
|
+
} from "./chunk-O3DNDMV3.js";
|
|
4
|
+
import {
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "./chunk-N552FDTV.js";
|
|
7
|
+
|
|
8
|
+
// src/atoms/toast.tsx
|
|
9
|
+
import { Cross1Icon, InfoCircledIcon } from "@radix-ui/react-icons";
|
|
10
|
+
import { ToastContainer as ToastifyToastContainer } from "react-toastify";
|
|
11
|
+
import toast from "react-toastify";
|
|
12
|
+
import { toast as toast2 } from "react-toastify";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
toast.Icons.error = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
15
|
+
toast.Icons.warning = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
16
|
+
toast.Icons.success = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
17
|
+
function CloseButton({ closeToast }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
|
|
19
|
+
}
|
|
20
|
+
function ToastContainer(props) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
ToastifyToastContainer,
|
|
23
|
+
__spreadValues({
|
|
24
|
+
autoClose: 5e5,
|
|
25
|
+
closeButton: CloseButton,
|
|
26
|
+
closeOnClick: true,
|
|
27
|
+
draggable: true,
|
|
28
|
+
hideProgressBar: true,
|
|
29
|
+
newestOnTop: true,
|
|
30
|
+
pauseOnFocusLoss: true,
|
|
31
|
+
pauseOnHover: true,
|
|
32
|
+
position: "bottom-right",
|
|
33
|
+
rtl: false,
|
|
34
|
+
style: { zIndex: 999999 }
|
|
35
|
+
}, props)
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
ToastContainer,
|
|
41
|
+
toast2 as toast
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=chunk-AOY2722L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/toast.tsx"],"sourcesContent":["import { Cross1Icon, InfoCircledIcon } from '@radix-ui/react-icons';\nimport type { Theme, ToastContainerProps, TypeOptions } from 'react-toastify';\nimport { ToastContainer as ToastifyToastContainer } from 'react-toastify';\nimport toast from 'react-toastify';\nimport { IconButton } from './icon-button';\n\nexport { toast } from 'react-toastify';\n\ntoast.Icons.error = () => <InfoCircledIcon />;\ntoast.Icons.warning = () => <InfoCircledIcon />;\ntoast.Icons.success = () => <InfoCircledIcon />;\n\ninterface CloseButtonProps {\n closeToast: (e: React.MouseEvent<HTMLElement>) => void;\n type: TypeOptions;\n ariaLabel?: string;\n theme: Theme;\n}\nfunction CloseButton({ closeToast }: CloseButtonProps): React.ReactNode {\n return (\n <IconButton color=\"gray\" onClick={closeToast} variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n );\n}\n\nexport function ToastContainer(props: ToastContainerProps): React.ReactElement {\n return (\n <ToastifyToastContainer\n autoClose={500000}\n closeButton={CloseButton}\n closeOnClick\n draggable\n hideProgressBar\n newestOnTop\n pauseOnFocusLoss\n pauseOnHover\n position=\"bottom-right\"\n rtl={false}\n style={{ zIndex: 999999 }}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,uBAAuB;AAE5C,SAAS,kBAAkB,8BAA8B;AACzD,OAAO,WAAW;AAGlB,SAAS,SAAAA,cAAa;AAEI;AAA1B,MAAM,MAAM,QAAQ,MAAM,oBAAC,mBAAgB;AAC3C,MAAM,MAAM,UAAU,MAAM,oBAAC,mBAAgB;AAC7C,MAAM,MAAM,UAAU,MAAM,oBAAC,mBAAgB;AAQ7C,SAAS,YAAY,EAAE,WAAW,GAAsC;AACtE,SACE,oBAAC,cAAW,OAAM,QAAO,SAAS,YAAY,SAAQ,SACpD,8BAAC,cAAW,GACd;AAEJ;AAEO,SAAS,eAAe,OAAgD;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAY;AAAA,MACZ,WAAS;AAAA,MACT,iBAAe;AAAA,MACf,aAAW;AAAA,MACX,kBAAgB;AAAA,MAChB,cAAY;AAAA,MACZ,UAAS;AAAA,MACT,KAAK;AAAA,MACL,OAAO,EAAE,QAAQ,OAAO;AAAA,OACpB;AAAA,EACN;AAEJ;","names":["toast"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconButton
|
|
3
|
+
} from "./chunk-O3DNDMV3.js";
|
|
4
|
+
import {
|
|
5
|
+
__spreadValues
|
|
6
|
+
} from "./chunk-N552FDTV.js";
|
|
7
|
+
|
|
8
|
+
// src/atoms/toast.tsx
|
|
9
|
+
import { Cross1Icon, InfoCircledIcon } from "@radix-ui/react-icons";
|
|
10
|
+
import Toast, {
|
|
11
|
+
ToastContainer as ToastifyToastContainer
|
|
12
|
+
} from "react-toastify";
|
|
13
|
+
import { toast } from "react-toastify";
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
Toast.Icons.error = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
16
|
+
Toast.Icons.warning = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
17
|
+
Toast.Icons.success = () => /* @__PURE__ */ jsx(InfoCircledIcon, {});
|
|
18
|
+
function CloseButton({ closeToast }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
|
|
20
|
+
}
|
|
21
|
+
function ToastContainer(props) {
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
ToastifyToastContainer,
|
|
24
|
+
__spreadValues({
|
|
25
|
+
autoClose: 5e4,
|
|
26
|
+
closeButton: CloseButton,
|
|
27
|
+
closeOnClick: true,
|
|
28
|
+
draggable: true,
|
|
29
|
+
hideProgressBar: true,
|
|
30
|
+
newestOnTop: true,
|
|
31
|
+
pauseOnFocusLoss: true,
|
|
32
|
+
pauseOnHover: true,
|
|
33
|
+
position: "bottom-right",
|
|
34
|
+
rtl: false,
|
|
35
|
+
style: { zIndex: 999999 }
|
|
36
|
+
}, props)
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export {
|
|
41
|
+
ToastContainer,
|
|
42
|
+
toast
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=chunk-CA3KCVF3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/toast.tsx"],"sourcesContent":["import { Cross1Icon, InfoCircledIcon } from '@radix-ui/react-icons';\nimport type { Theme, ToastContainerProps, TypeOptions } from 'react-toastify';\nimport Toast, {\n ToastContainer as ToastifyToastContainer,\n} from 'react-toastify';\nimport { IconButton } from './icon-button';\n\nexport { toast } from 'react-toastify';\n\nToast.Icons.error = () => <InfoCircledIcon />;\nToast.Icons.warning = () => <InfoCircledIcon />;\nToast.Icons.success = () => <InfoCircledIcon />;\n\ninterface CloseButtonProps {\n closeToast: (e: React.MouseEvent<HTMLElement>) => void;\n type: TypeOptions;\n ariaLabel?: string;\n theme: Theme;\n}\nfunction CloseButton({ closeToast }: CloseButtonProps): React.ReactNode {\n return (\n <IconButton color=\"gray\" onClick={closeToast} variant=\"ghost\">\n <Cross1Icon />\n </IconButton>\n );\n}\n\nexport function ToastContainer(props: ToastContainerProps): React.ReactElement {\n return (\n <ToastifyToastContainer\n autoClose={50000}\n closeButton={CloseButton}\n closeOnClick\n draggable\n hideProgressBar\n newestOnTop\n pauseOnFocusLoss\n pauseOnHover\n position=\"bottom-right\"\n rtl={false}\n style={{ zIndex: 999999 }}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,uBAAuB;AAE5C,OAAO;AAAA,EACL,kBAAkB;AAAA,OACb;AAGP,SAAS,aAAa;AAEI;AAA1B,MAAM,MAAM,QAAQ,MAAM,oBAAC,mBAAgB;AAC3C,MAAM,MAAM,UAAU,MAAM,oBAAC,mBAAgB;AAC7C,MAAM,MAAM,UAAU,MAAM,oBAAC,mBAAgB;AAQ7C,SAAS,YAAY,EAAE,WAAW,GAAsC;AACtE,SACE,oBAAC,cAAW,OAAM,QAAO,SAAS,YAAY,SAAQ,SACpD,8BAAC,cAAW,GACd;AAEJ;AAEO,SAAS,eAAe,OAAgD;AAC7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAY;AAAA,MACZ,WAAS;AAAA,MACT,iBAAe;AAAA,MACf,aAAW;AAAA,MACX,kBAAgB;AAAA,MAChB,cAAY;AAAA,MACZ,UAAS;AAAA,MACT,KAAK;AAAA,MACL,OAAO,EAAE,QAAQ,OAAO;AAAA,OACpB;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToastContainer
|
|
3
|
+
} from "./chunk-RXCENPRG.js";
|
|
4
|
+
import {
|
|
5
|
+
Button
|
|
6
|
+
} from "./chunk-P3YCIJUP.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/dialog.tsx
|
|
14
|
+
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
15
|
+
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
16
|
+
import { Flex } from "@radix-ui/themes";
|
|
17
|
+
import { useEffect, useRef } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function Content2(props) {
|
|
20
|
+
const _a = props, {
|
|
21
|
+
children,
|
|
22
|
+
style = {},
|
|
23
|
+
width,
|
|
24
|
+
maxWidth,
|
|
25
|
+
minWidth,
|
|
26
|
+
maxHeight,
|
|
27
|
+
height,
|
|
28
|
+
minHeight
|
|
29
|
+
} = _a, rest = __objRest(_a, [
|
|
30
|
+
"children",
|
|
31
|
+
"style",
|
|
32
|
+
"width",
|
|
33
|
+
"maxWidth",
|
|
34
|
+
"minWidth",
|
|
35
|
+
"maxHeight",
|
|
36
|
+
"height",
|
|
37
|
+
"minHeight"
|
|
38
|
+
]);
|
|
39
|
+
const containerRef = useRef(null);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
42
|
+
}, []);
|
|
43
|
+
return /* @__PURE__ */ jsx(RadixDialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsxs(RadixDialog.Overlay, { className: "DialogOverlay", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
RadixDialog.Content,
|
|
46
|
+
__spreadProps(__spreadValues({
|
|
47
|
+
className: "DialogContent",
|
|
48
|
+
style: __spreadValues({
|
|
49
|
+
width,
|
|
50
|
+
maxWidth,
|
|
51
|
+
minWidth,
|
|
52
|
+
maxHeight,
|
|
53
|
+
height,
|
|
54
|
+
minHeight
|
|
55
|
+
}, style)
|
|
56
|
+
}, rest), {
|
|
57
|
+
children: /* @__PURE__ */ jsxs(Flex, { direction: "column", style: { position: "relative" }, children: [
|
|
58
|
+
/* @__PURE__ */ jsx(RadixDialog.Close, { asChild: true, className: "DialogClose", children: /* @__PURE__ */ jsx(Button, { color: "gray", variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, { height: "18px", width: "18px" }) }) }),
|
|
59
|
+
children
|
|
60
|
+
] })
|
|
61
|
+
})
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ jsx(ToastContainer, {})
|
|
64
|
+
] }) });
|
|
65
|
+
}
|
|
66
|
+
function Close2(_a) {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
children
|
|
69
|
+
} = _b, rest = __objRest(_b, [
|
|
70
|
+
"children"
|
|
71
|
+
]);
|
|
72
|
+
return /* @__PURE__ */ jsx(RadixDialog.Close, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
73
|
+
}
|
|
74
|
+
function Trigger2(_a) {
|
|
75
|
+
var _b = _a, {
|
|
76
|
+
children
|
|
77
|
+
} = _b, rest = __objRest(_b, [
|
|
78
|
+
"children"
|
|
79
|
+
]);
|
|
80
|
+
return /* @__PURE__ */ jsx(RadixDialog.Trigger, __spreadProps(__spreadValues({ asChild: true }, rest), { children }));
|
|
81
|
+
}
|
|
82
|
+
var Dialog = {
|
|
83
|
+
Root: RadixDialog.Root,
|
|
84
|
+
Trigger: Trigger2,
|
|
85
|
+
Content: Content2,
|
|
86
|
+
Close: Close2,
|
|
87
|
+
Description: RadixDialog.Description,
|
|
88
|
+
Title: RadixDialog.Title
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export {
|
|
92
|
+
Dialog
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=chunk-DWRAPSVA.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 { Flex } from '@radix-ui/themes';\nimport { useEffect, useRef } from 'react';\nimport { Button } from './button';\nimport { ToastContainer } from './toast';\n\ntype ContentProps = RadixDialog.DialogContentProps & {\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n height?: string;\n maxHeight?: string;\n minHeight?: string;\n};\n\nfunction Content(props: ContentProps): React.ReactElement {\n const {\n children,\n style = {},\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...rest\n } = props;\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={{\n width,\n maxWidth,\n minWidth,\n maxHeight,\n height,\n minHeight,\n ...style,\n }}\n {...rest}\n >\n <Flex direction=\"column\" style={{ position: 'relative' }}>\n <RadixDialog.Close asChild className=\"DialogClose\">\n <Button color=\"gray\" variant=\"transparent\">\n <Cross1Icon height=\"18px\" width=\"18px\" />\n </Button>\n </RadixDialog.Close>\n {children}\n </Flex>\n </RadixDialog.Content>\n <ToastContainer />\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,YAAY;AACrB,SAAS,WAAW,cAAc;AA+CxB,SAGM,KAHN;AAlCV,SAASA,SAAQ,OAAyC;AACxD,QAUI,YATF;AAAA;AAAA,IACA,QAAQ,CAAC;AAAA,IACT;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAzBJ,IA2BM,IADC,iBACD,IADC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGF,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,+BAAa,qBAAZ,EAAoB,WAAU,iBAC7B;AAAA;AAAA,MAAa;AAAA,MAAZ;AAAA,QACC,WAAU;AAAA,QACV,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,WACG;AAAA,SAED,OAXL;AAAA,QAaC,+BAAC,QAAK,WAAU,UAAS,OAAO,EAAE,UAAU,WAAW,GACrD;AAAA,8BAAa,mBAAZ,EAAkB,SAAO,MAAC,WAAU,eACnC,8BAAC,UAAO,OAAM,QAAO,SAAQ,eAC3B,8BAAC,cAAW,QAAO,QAAO,OAAM,QAAO,GACzC,GACF;AAAA,UACC;AAAA,WACH;AAAA;AAAA,IACF;AAAA,IACA,oBAAC,kBAAe;AAAA,KAClB,GACF;AAEJ;AAEA,SAASC,OAAM,IAGsC;AAHtC,eACb;AAAA;AAAA,EAlEF,IAiEe,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,EA7EF,IA4EiB,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"]}
|