@tipp/ui 1.2.12 → 1.2.14
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 +20 -20
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +1 -1
- package/dist/atoms/index.cjs +22 -20
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +2 -2
- package/dist/chunk-2QDLO3YM.js +97 -0
- package/dist/chunk-2QDLO3YM.js.map +1 -0
- package/dist/chunk-4AACT3BJ.js +97 -0
- package/dist/chunk-4AACT3BJ.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-AOUTNRVR.js +94 -0
- package/dist/chunk-AOUTNRVR.js.map +1 -0
- package/dist/chunk-C5NYMJVC.js +63 -0
- package/dist/chunk-C5NYMJVC.js.map +1 -0
- package/dist/chunk-DKN47ZVZ.js +94 -0
- package/dist/chunk-DKN47ZVZ.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-EWD4AO5N.js +49 -0
- package/dist/chunk-EWD4AO5N.js.map +1 -0
- package/dist/chunk-FZAYTBCB.js +169 -0
- package/dist/chunk-FZAYTBCB.js.map +1 -0
- package/dist/chunk-G653JNTD.js +59 -0
- package/dist/chunk-G653JNTD.js.map +1 -0
- package/dist/chunk-HMLPXWJ6.js +94 -0
- package/dist/chunk-HMLPXWJ6.js.map +1 -0
- package/dist/chunk-IX7WVKHI.js +59 -0
- package/dist/chunk-IX7WVKHI.js.map +1 -0
- package/dist/chunk-J7XYWBOK.js +340 -0
- package/dist/chunk-J7XYWBOK.js.map +1 -0
- package/dist/chunk-L3UVJ67X.js +340 -0
- package/dist/chunk-L3UVJ67X.js.map +1 -0
- package/dist/chunk-LVXTFKVJ.js +49 -0
- package/dist/chunk-LVXTFKVJ.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-PT5CZAR3.js +94 -0
- package/dist/chunk-PT5CZAR3.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-RJMSUTBQ.js +130 -0
- package/dist/chunk-RJMSUTBQ.js.map +1 -0
- package/dist/chunk-RXCENPRG.js +38 -0
- package/dist/chunk-RXCENPRG.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-Y3L7BYDF.js +169 -0
- package/dist/chunk-Y3L7BYDF.js.map +1 -0
- package/dist/chunk-YAAL4JEU.js +59 -0
- package/dist/chunk-YAAL4JEU.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/index.cjs +22 -20
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/molecules/expand-table/index.js +2 -2
- package/dist/molecules/expand-table/row.js +2 -2
- package/dist/molecules/index.cjs +2 -0
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +3 -3
- package/dist/molecules/navigation.js +2 -2
- package/dist/molecules/tag-selector.cjs +2 -0
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +3 -3
- package/package.json +3 -3
- package/src/atoms/badge.tsx +3 -1
- package/src/atoms/dialog.tsx +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/date-picker/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any -- ReactPicker의 렌더러가 object를 return함 버그를 해결하기 위해 강제 assertion 사용 */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access -- ReactPicker의 렌더러가 object를 return함 버그를 해결하기 위해 강제 assertion 사용 */\nimport type { ElementRef } from 'react';\nimport React, { forwardRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport * as RDP from 'react-datepicker';\nimport { registerLocale, setDefaultLocale } from 'react-datepicker';\nimport { ko as fnKo } from 'date-fns/locale';\nimport { IconButton } from '../../atoms/icon-button';\nimport { Flex } from '../../atoms/flex';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icon';\nimport { Heading } from '../../atoms/heading';\n\nregisterLocale('ko', fnKo);\nsetDefaultLocale('ko');\n\nexport type DatePickerProps = ReactDatePickerProps & {\n size?: 'small' | 'medium' | 'large';\n};\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>;\n\nconst ReactDatePicker = ((RDP.default as any).default ||\n (RDP.default as any) ||\n (RDP as any)) as typeof RDP.default;\n\nexport const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props, ref): React.ReactElement => {\n const { size = 'medium', ...rest } = props;\n return (\n <ReactDatePicker\n dateFormat=\"YYYY/MM/dd\"\n nextMonthButtonLabel=\"다음 달\"\n placeholderText=\"YYYY/mm/dd\"\n previousMonthButtonLabel=\"이전 달\"\n ref={ref}\n renderCustomHeader={renderCustomHeader}\n showPopperArrow={false}\n timeIntervals={10}\n {...rest}\n calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}\n timeCaption=\"시간\"\n wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}\n />\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\nconst renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (\n props\n) => {\n const {\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n } = props;\n\n const year = date.getFullYear();\n const month = date.getMonth();\n\n return (\n <Flex align=\"center\" justify=\"between\" pb=\"2\" pl=\"2\" pr=\"2\">\n <IconButton\n disabled={prevMonthButtonDisabled}\n onClick={decreaseMonth}\n variant=\"ghost\"\n >\n <ChevronLeftIcon />\n </IconButton>\n <Flex gap=\"3\">\n <Heading variant=\"heading4\" weight=\"regular\">\n {year}년\n </Heading>\n <Heading variant=\"heading4\" weight=\"regular\">\n {month + 1}월\n </Heading>\n </Flex>\n\n <IconButton\n disabled={nextMonthButtonDisabled}\n onClick={increaseMonth}\n variant=\"ghost\"\n >\n <ChevronRightIcon />\n </IconButton>\n </Flex>\n );\n};\n\n// DatePicker.displayName = 'DatePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,SAAgB,kBAAkB;AAElC,YAAY,SAAS;AACrB,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,MAAM,YAAY;AAsBrB,cA4CE,YA5CF;AAhBN,eAAe,MAAM,IA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AER,8BAAC,oBAAiB;AAAA;AAAA,IACpB;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Heading
|
|
3
|
+
} from "./chunk-HK224ADT.js";
|
|
4
|
+
import {
|
|
5
|
+
IconButton
|
|
6
|
+
} from "./chunk-O3DNDMV3.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
import {
|
|
11
|
+
ChevronLeftIcon,
|
|
12
|
+
ChevronRightIcon
|
|
13
|
+
} from "./chunk-66C4U3BG.js";
|
|
14
|
+
import {
|
|
15
|
+
__objRest,
|
|
16
|
+
__spreadProps,
|
|
17
|
+
__spreadValues
|
|
18
|
+
} from "./chunk-N552FDTV.js";
|
|
19
|
+
|
|
20
|
+
// src/molecules/date-picker/index.tsx
|
|
21
|
+
import { forwardRef } from "react";
|
|
22
|
+
import * as RDP from "react-datepicker";
|
|
23
|
+
import { registerLocale, setDefaultLocale } from "react-datepicker";
|
|
24
|
+
import { ko as fnKo } from "date-fns/locale";
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
registerLocale("ko", fnKo);
|
|
27
|
+
setDefaultLocale("ko");
|
|
28
|
+
var ReactDatePicker = RDP.default.default || RDP.default || RDP;
|
|
29
|
+
var DatePicker = forwardRef(
|
|
30
|
+
(props, ref) => {
|
|
31
|
+
const _a = props, { size = "medium" } = _a, rest = __objRest(_a, ["size"]);
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
ReactDatePicker,
|
|
34
|
+
__spreadProps(__spreadValues({
|
|
35
|
+
dateFormat: "YYYY/MM/dd",
|
|
36
|
+
nextMonthButtonLabel: "\uB2E4\uC74C \uB2EC",
|
|
37
|
+
placeholderText: "YYYY/mm/dd",
|
|
38
|
+
previousMonthButtonLabel: "\uC774\uC804 \uB2EC",
|
|
39
|
+
ref,
|
|
40
|
+
renderCustomHeader,
|
|
41
|
+
showPopperArrow: false,
|
|
42
|
+
timeIntervals: 10
|
|
43
|
+
}, rest), {
|
|
44
|
+
calendarClassName: `tipp_datePicker_calendar ${rest.calendarClassName || ""}`,
|
|
45
|
+
timeCaption: "\uC2DC\uAC04",
|
|
46
|
+
wrapperClassName: `tipp_datePicker ${size} ${rest.wrapperClassName || ""}`
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
DatePicker.displayName = "DatePicker";
|
|
52
|
+
var renderCustomHeader = (props) => {
|
|
53
|
+
const {
|
|
54
|
+
date,
|
|
55
|
+
decreaseMonth,
|
|
56
|
+
increaseMonth,
|
|
57
|
+
prevMonthButtonDisabled,
|
|
58
|
+
nextMonthButtonDisabled
|
|
59
|
+
} = props;
|
|
60
|
+
const year = date.getFullYear();
|
|
61
|
+
const month = date.getMonth();
|
|
62
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", justify: "between", pb: "2", pl: "2", pr: "2", children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
IconButton,
|
|
65
|
+
{
|
|
66
|
+
disabled: prevMonthButtonDisabled,
|
|
67
|
+
onClick: decreaseMonth,
|
|
68
|
+
variant: "ghost",
|
|
69
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", children: [
|
|
73
|
+
/* @__PURE__ */ jsxs(Heading, { variant: "heading4", weight: "regular", children: [
|
|
74
|
+
year,
|
|
75
|
+
"\uB144"
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ jsxs(Heading, { variant: "heading4", weight: "regular", children: [
|
|
78
|
+
month + 1,
|
|
79
|
+
"\uC6D4"
|
|
80
|
+
] })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
IconButton,
|
|
84
|
+
{
|
|
85
|
+
disabled: nextMonthButtonDisabled,
|
|
86
|
+
onClick: increaseMonth,
|
|
87
|
+
variant: "ghost",
|
|
88
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
DatePicker
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=chunk-4AACT3BJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/date-picker/index.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any -- ReactPicker의 렌더러가 object를 return함 버그를 해결하기 위해 강제 assertion 사용 */\n/* eslint-disable @typescript-eslint/no-unsafe-member-access -- ReactPicker의 렌더러가 object를 return함 버그를 해결하기 위해 강제 assertion 사용 */\nimport type { ElementRef } from 'react';\nimport React, { forwardRef } from 'react';\nimport type { DatePickerProps as ReactDatePickerProps } from 'react-datepicker';\nimport * as RDP from 'react-datepicker';\nimport { registerLocale, setDefaultLocale } from 'react-datepicker';\nimport { ko as fnKo } from 'date-fns/locale';\nimport { IconButton } from '../../atoms/icon-button';\nimport { Flex } from '../../atoms/flex';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icon';\nimport { Heading } from '../../atoms/heading';\n\nregisterLocale('ko', fnKo);\nsetDefaultLocale('ko');\n\nexport type DatePickerProps = ReactDatePickerProps & {\n size?: 'small' | 'medium' | 'large';\n};\ntype DatePickerRef = ElementRef<typeof ReactDatePicker>;\n\nconst ReactDatePicker = ((RDP.default as any).default ||\n (RDP.default as any) ||\n (RDP as any)) as typeof RDP.default;\n\nexport const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(\n (props, ref): React.ReactElement => {\n const { size = 'medium', ...rest } = props;\n return (\n <ReactDatePicker\n dateFormat=\"YYYY/MM/dd\"\n nextMonthButtonLabel=\"다음 달\"\n placeholderText=\"YYYY/mm/dd\"\n previousMonthButtonLabel=\"이전 달\"\n ref={ref}\n renderCustomHeader={renderCustomHeader}\n showPopperArrow={false}\n timeIntervals={10}\n {...rest}\n calendarClassName={`tipp_datePicker_calendar ${rest.calendarClassName || ''}`}\n timeCaption=\"시간\"\n wrapperClassName={`tipp_datePicker ${size} ${rest.wrapperClassName || ''}`}\n />\n );\n }\n);\n\nDatePicker.displayName = 'DatePicker';\n\nconst renderCustomHeader: ReactDatePickerProps['renderCustomHeader'] = (\n props\n) => {\n const {\n date,\n decreaseMonth,\n increaseMonth,\n prevMonthButtonDisabled,\n nextMonthButtonDisabled,\n } = props;\n\n const year = date.getFullYear();\n const month = date.getMonth();\n\n return (\n <Flex align=\"center\" justify=\"between\" pb=\"2\" pl=\"2\" pr=\"2\">\n <IconButton\n disabled={prevMonthButtonDisabled}\n onClick={decreaseMonth}\n variant=\"ghost\"\n >\n <ChevronLeftIcon />\n </IconButton>\n <Flex gap=\"3\">\n <Heading variant=\"heading4\" weight=\"regular\">\n {year}년\n </Heading>\n <Heading variant=\"heading4\" weight=\"regular\">\n {month + 1}월\n </Heading>\n </Flex>\n\n <IconButton\n disabled={nextMonthButtonDisabled}\n onClick={increaseMonth}\n variant=\"ghost\"\n >\n <ChevronRightIcon />\n </IconButton>\n </Flex>\n );\n};\n\n// DatePicker.displayName = 'DatePicker';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,SAAgB,kBAAkB;AAElC,YAAY,SAAS;AACrB,SAAS,gBAAgB,wBAAwB;AACjD,SAAS,MAAM,YAAY;AAsBrB,cA4CE,YA5CF;AAhBN,eAAe,MAAM,IAAI;AACzB,iBAAiB,IAAI;AAOrB,IAAM,kBAAwB,YAAgB,WACvC,eACJ;AAEI,IAAM,aAAa;AAAA,EACxB,CAAC,OAAO,QAA4B;AAClC,UAAqC,YAA7B,SAAO,SA3BnB,IA2ByC,IAAT,iBAAS,IAAT,CAApB;AACR,WACE;AAAA,MAAC;AAAA;AAAA,QACC,YAAW;AAAA,QACX,sB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
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-4BPB2XGG.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,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AAA,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-OJQJLBBK.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-4LU6NFEH.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,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider
|
|
3
|
+
} from "./chunk-BVBX6IJ3.js";
|
|
4
|
+
import {
|
|
5
|
+
ToastContainer
|
|
6
|
+
} from "./chunk-5T5OBKU6.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-4SMYMKD7.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,38 @@
|
|
|
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 } from "@radix-ui/react-icons";
|
|
10
|
+
import { ToastContainer as ToastifyToastContainer } from "react-toastify";
|
|
11
|
+
import { toast } from "react-toastify";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
function CloseButton({ closeToast }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(IconButton, { color: "gray", onClick: closeToast, variant: "ghost", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
|
|
15
|
+
}
|
|
16
|
+
function ToastContainer(props) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
ToastifyToastContainer,
|
|
19
|
+
__spreadValues({
|
|
20
|
+
autoClose: 5e3,
|
|
21
|
+
closeButton: CloseButton,
|
|
22
|
+
closeOnClick: true,
|
|
23
|
+
draggable: true,
|
|
24
|
+
hideProgressBar: true,
|
|
25
|
+
newestOnTop: true,
|
|
26
|
+
pauseOnFocusLoss: true,
|
|
27
|
+
pauseOnHover: true,
|
|
28
|
+
position: "top-center",
|
|
29
|
+
rtl: false
|
|
30
|
+
}, props)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
ToastContainer,
|
|
36
|
+
toast
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=chunk-5T5OBKU6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/toast.tsx"],"sourcesContent":["import { Cross1Icon } from '@radix-ui/react-icons';\nimport type { Theme, ToastContainerProps, TypeOptions } from 'react-toastify';\nimport { ToastContainer as ToastifyToastContainer } 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 <ToastifyToastContainer\n autoClose={5000}\n closeButton={CloseButton}\n closeOnClick\n draggable\n hideProgressBar\n newestOnTop\n pauseOnFocusLoss\n pauseOnHover\n position=\"top-center\"\n rtl={false}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,kBAAkB,8BAA8B;AAGzD,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,aAAW;AAAA,MACX,kBAAgB;AAAA,MAChB,cAAY;AAAA,MACZ,UAAS;AAAA,MACT,KAAK;AAAA,OACD;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,u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
|
6
|
+
} from "./chunk-52MVZ6AN.js";
|
|
7
|
+
import {
|
|
8
|
+
Flex
|
|
9
|
+
} from "./chunk-25HMMI7R.js";
|
|
10
|
+
|
|
11
|
+
// src/molecules/navigation.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
function Navigation({
|
|
14
|
+
items,
|
|
15
|
+
fontColor,
|
|
16
|
+
backgroundColor,
|
|
17
|
+
activeKey
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
Flex,
|
|
21
|
+
{
|
|
22
|
+
direction: "column",
|
|
23
|
+
gap: "4",
|
|
24
|
+
pr: "3",
|
|
25
|
+
style: {
|
|
26
|
+
color: fontColor || "var(--white-a12)",
|
|
27
|
+
backgroundColor: backgroundColor || "var(--black-a12)"
|
|
28
|
+
},
|
|
29
|
+
children: items == null ? void 0 : items.map((item) => {
|
|
30
|
+
const { key, title, icon, itemRender, onClick, children } = item;
|
|
31
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", onClick, children: [
|
|
32
|
+
itemRender ? itemRender(item) : /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "3", height: "36px", pl: "4", pr: "4", children: [
|
|
33
|
+
icon,
|
|
34
|
+
/* @__PURE__ */ jsx(Typo, { variant: "subtitle", children: title })
|
|
35
|
+
] }),
|
|
36
|
+
children == null ? void 0 : children.map((menu) => {
|
|
37
|
+
return menu.itemRender ? menu.itemRender(menu) : /* @__PURE__ */ jsx(
|
|
38
|
+
Button,
|
|
39
|
+
{
|
|
40
|
+
className: `tipp-navigation-button ${activeKey === menu.key ? "active" : ""}`,
|
|
41
|
+
ml: "37px",
|
|
42
|
+
onClick: menu.onClick,
|
|
43
|
+
size: "large",
|
|
44
|
+
style: {
|
|
45
|
+
color: "var(--white-a12)",
|
|
46
|
+
height: "32px",
|
|
47
|
+
paddingLeft: "var(--space-2)"
|
|
48
|
+
},
|
|
49
|
+
children: menu.title
|
|
50
|
+
},
|
|
51
|
+
menu.key
|
|
52
|
+
);
|
|
53
|
+
})
|
|
54
|
+
] }, key);
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export {
|
|
61
|
+
Navigation
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-C5NYMJVC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/navigation.tsx"],"sourcesContent":["import React from 'react';\nimport { Button, Flex, Typo } from '../atoms';\n\ninterface Item {\n itemRender?: (item: Item) => React.ReactNode;\n key: string;\n onClick?: () => void;\n title: string;\n icon?: React.ReactNode;\n children?: Item[];\n}\n\nexport interface NavigationProps {\n items?: Item[];\n fontColor?: string;\n backgroundColor?: string;\n activeKey?: string;\n}\n\nexport function Navigation({\n items,\n fontColor,\n backgroundColor,\n activeKey,\n}: NavigationProps): React.ReactNode {\n return (\n <Flex\n direction=\"column\"\n gap=\"4\"\n pr=\"3\"\n style={{\n color: fontColor || 'var(--white-a12)',\n backgroundColor: backgroundColor || 'var(--black-a12)',\n }}\n >\n {items?.map((item) => {\n const { key, title, icon, itemRender, onClick, children } = item;\n return (\n <Flex direction=\"column\" key={key} onClick={onClick}>\n {itemRender ? (\n itemRender(item)\n ) : (\n <Flex align=\"center\" gap=\"3\" height=\"36px\" pl=\"4\" pr=\"4\">\n {icon}\n <Typo variant=\"subtitle\">{title}</Typo>\n </Flex>\n )}\n {children?.map((menu) => {\n return menu.itemRender ? (\n menu.itemRender(menu)\n ) : (\n <Button\n className={`tipp-navigation-button ${activeKey === menu.key ? 'active' : ''}`}\n key={menu.key}\n ml=\"37px\"\n onClick={menu.onClick}\n size=\"large\"\n style={{\n color: 'var(--white-a12)',\n height: '32px',\n paddingLeft: 'var(--space-2)',\n }}\n >\n {menu.title}\n </Button>\n );\n })}\n </Flex>\n );\n })}\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;AA0Cc,SAEE,KAFF;AAvBP,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAqC;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,KAAI;AAAA,MACJ,IAAG;AAAA,MACH,OAAO;AAAA,QACL,OAAO,aAAa;AAAA,QACpB,iBAAiB,mBAAmB;AAAA,MACtC;AAAA,MAEC,yCAAO,IAAI,CAAC,SAAS;AACpB,cAAM,EAAE,KAAK,OAAO,MAAM,YAAY,SAAS,SAAS,IAAI;AAC5D,eACE,qBAAC,QAAK,WAAU,UAAmB,SAChC;AAAA,uBACC,WAAW,IAAI,IAEf,qBAAC,QAAK,OAAM,UAAS,KAAI,KAAI,QAAO,QAAO,IAAG,KAAI,IAAG,KAClD;AAAA;AAAA,YACD,oBAAC,QAAK,SAAQ,YAAY,iBAAM;AAAA,aAClC;AAAA,UAED,qCAAU,IAAI,CAAC,SAAS;AACvB,mBAAO,KAAK,aACV,KAAK,WAAW,IAAI,IAEpB;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW,0BAA0B,cAAc,KAAK,MAAM,WAAW,EAAE;AAAA,gBAE3E,IAAG;AAAA,gBACH,SAAS,KAAK;AAAA,gBACd,MAAK;AAAA,gBACL,OAAO;AAAA,kBACL,OAAO;AAAA,kBACP,QAAQ;AAAA,kBACR,aAAa;AAAA,gBACf;AAAA,gBAEC,eAAK;AAAA;AAAA,cAVD,KAAK;AAAA,YAWZ;AAAA,UAEJ;AAAA,aA5B4B,GA6B9B;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;","names":[]}
|