@tipp/ui 1.1.12 → 1.1.13
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/index.js +39 -39
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-3ML54TPS.js +130 -0
- package/dist/chunk-3ML54TPS.js.map +1 -0
- package/dist/chunk-BHFREV7Y.js +63 -0
- package/dist/chunk-BHFREV7Y.js.map +1 -0
- package/dist/chunk-I4JHOCV3.js +34 -0
- package/dist/chunk-I4JHOCV3.js.map +1 -0
- package/dist/chunk-LLDWXALX.js +34 -0
- package/dist/chunk-LLDWXALX.js.map +1 -0
- package/dist/chunk-MY4C7VHR.js +34 -0
- package/dist/chunk-MY4C7VHR.js.map +1 -0
- package/dist/chunk-OI2YZXJT.js +63 -0
- package/dist/chunk-OI2YZXJT.js.map +1 -0
- package/dist/chunk-VS2M6MCO.js +28 -0
- package/dist/chunk-VS2M6MCO.js.map +1 -0
- package/dist/chunk-XIQSSPSX.js +91 -0
- package/dist/chunk-XIQSSPSX.js.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +65 -65
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/expand-table/index.js +16 -16
- package/dist/molecules/expand-table/row.js +16 -16
- package/dist/molecules/index.js +20 -20
- package/dist/molecules/navigation.js +17 -17
- package/package.json +3 -3
package/dist/atoms/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import "../chunk-2ANGYYEV.js";
|
|
2
|
-
import {
|
|
3
|
-
TextField
|
|
4
|
-
} from "../chunk-JPIZP2PZ.js";
|
|
5
|
-
import {
|
|
6
|
-
Separator
|
|
7
|
-
} from "../chunk-HYITAA4J.js";
|
|
8
|
-
import {
|
|
9
|
-
Skeleton
|
|
10
|
-
} from "../chunk-5H3YPCZK.js";
|
|
11
2
|
import {
|
|
12
3
|
Spinner
|
|
13
4
|
} from "../chunk-FR2GDOU2.js";
|
|
@@ -27,11 +18,8 @@ import {
|
|
|
27
18
|
TextArea
|
|
28
19
|
} from "../chunk-ILRUXI2E.js";
|
|
29
20
|
import {
|
|
30
|
-
|
|
31
|
-
} from "../chunk-
|
|
32
|
-
import {
|
|
33
|
-
RadioCards
|
|
34
|
-
} from "../chunk-6IVCARWS.js";
|
|
21
|
+
TextField
|
|
22
|
+
} from "../chunk-JPIZP2PZ.js";
|
|
35
23
|
import {
|
|
36
24
|
RadioGroup
|
|
37
25
|
} from "../chunk-6DJOIRMF.js";
|
|
@@ -50,6 +38,12 @@ import {
|
|
|
50
38
|
import {
|
|
51
39
|
Select
|
|
52
40
|
} from "../chunk-3JRNKBMN.js";
|
|
41
|
+
import {
|
|
42
|
+
Separator
|
|
43
|
+
} from "../chunk-HYITAA4J.js";
|
|
44
|
+
import {
|
|
45
|
+
Skeleton
|
|
46
|
+
} from "../chunk-5H3YPCZK.js";
|
|
53
47
|
import {
|
|
54
48
|
Inset
|
|
55
49
|
} from "../chunk-XQOL7UBI.js";
|
|
@@ -61,7 +55,7 @@ import {
|
|
|
61
55
|
} from "../chunk-XQOZWYUA.js";
|
|
62
56
|
import {
|
|
63
57
|
Pagination
|
|
64
|
-
} from "../chunk-
|
|
58
|
+
} from "../chunk-3ML54TPS.js";
|
|
65
59
|
import {
|
|
66
60
|
Popover
|
|
67
61
|
} from "../chunk-5AVBYDPB.js";
|
|
@@ -69,23 +63,14 @@ import {
|
|
|
69
63
|
Progress
|
|
70
64
|
} from "../chunk-365QMK4D.js";
|
|
71
65
|
import {
|
|
72
|
-
|
|
73
|
-
} from "../chunk-
|
|
74
|
-
import {
|
|
75
|
-
Tooltip
|
|
76
|
-
} from "../chunk-ACVANQJ4.js";
|
|
66
|
+
Quote
|
|
67
|
+
} from "../chunk-YO3BQW6S.js";
|
|
77
68
|
import {
|
|
78
|
-
|
|
79
|
-
} from "../chunk-
|
|
69
|
+
RadioCards
|
|
70
|
+
} from "../chunk-6IVCARWS.js";
|
|
80
71
|
import {
|
|
81
72
|
FieldErrorWrapper
|
|
82
73
|
} from "../chunk-CNQ7RNNY.js";
|
|
83
|
-
import {
|
|
84
|
-
Typo
|
|
85
|
-
} from "../chunk-O3XTRD7R.js";
|
|
86
|
-
import {
|
|
87
|
-
Flex
|
|
88
|
-
} from "../chunk-25HMMI7R.js";
|
|
89
74
|
import {
|
|
90
75
|
Form
|
|
91
76
|
} from "../chunk-2CVXGGI5.js";
|
|
@@ -98,12 +83,6 @@ import {
|
|
|
98
83
|
import {
|
|
99
84
|
HoverCard
|
|
100
85
|
} from "../chunk-O3T3TM3V.js";
|
|
101
|
-
import {
|
|
102
|
-
Checkbox
|
|
103
|
-
} from "../chunk-JEHDCZQU.js";
|
|
104
|
-
import {
|
|
105
|
-
Code
|
|
106
|
-
} from "../chunk-OHMOP5PV.js";
|
|
107
86
|
import {
|
|
108
87
|
Collapse
|
|
109
88
|
} from "../chunk-KGLIAFTI.js";
|
|
@@ -134,11 +113,17 @@ import {
|
|
|
134
113
|
DropdownMenu
|
|
135
114
|
} from "../chunk-4WFMOFN2.js";
|
|
136
115
|
import {
|
|
137
|
-
|
|
138
|
-
} from "../chunk-
|
|
116
|
+
EllipsisTooltip
|
|
117
|
+
} from "../chunk-4IKPNQV5.js";
|
|
139
118
|
import {
|
|
140
|
-
|
|
141
|
-
} from "../chunk-
|
|
119
|
+
Tooltip
|
|
120
|
+
} from "../chunk-ACVANQJ4.js";
|
|
121
|
+
import {
|
|
122
|
+
Typo
|
|
123
|
+
} from "../chunk-O3XTRD7R.js";
|
|
124
|
+
import {
|
|
125
|
+
Em
|
|
126
|
+
} from "../chunk-2DZ2Y3JI.js";
|
|
142
127
|
import {
|
|
143
128
|
Box
|
|
144
129
|
} from "../chunk-4Y5BEXVN.js";
|
|
@@ -157,7 +142,12 @@ import {
|
|
|
157
142
|
import {
|
|
158
143
|
CheckboxGroup
|
|
159
144
|
} from "../chunk-IQEEPHOY.js";
|
|
160
|
-
import
|
|
145
|
+
import {
|
|
146
|
+
Checkbox
|
|
147
|
+
} from "../chunk-JEHDCZQU.js";
|
|
148
|
+
import {
|
|
149
|
+
Code
|
|
150
|
+
} from "../chunk-OHMOP5PV.js";
|
|
161
151
|
import {
|
|
162
152
|
AlertDialog
|
|
163
153
|
} from "../chunk-J242TTFH.js";
|
|
@@ -167,6 +157,16 @@ import {
|
|
|
167
157
|
import {
|
|
168
158
|
Avatar
|
|
169
159
|
} from "../chunk-CZEGRZBK.js";
|
|
160
|
+
import {
|
|
161
|
+
Badge
|
|
162
|
+
} from "../chunk-5JJ3GWKF.js";
|
|
163
|
+
import {
|
|
164
|
+
Blockquote
|
|
165
|
+
} from "../chunk-YGL6SWKN.js";
|
|
166
|
+
import "../chunk-RC25EWE2.js";
|
|
167
|
+
import {
|
|
168
|
+
Flex
|
|
169
|
+
} from "../chunk-25HMMI7R.js";
|
|
170
170
|
import "../chunk-N552FDTV.js";
|
|
171
171
|
export {
|
|
172
172
|
AlertDialog,
|
package/dist/atoms/pagination.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Pagination
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-O3XTRD7R.js";
|
|
5
|
-
import "../chunk-25HMMI7R.js";
|
|
3
|
+
} from "../chunk-3ML54TPS.js";
|
|
6
4
|
import "../chunk-O3DNDMV3.js";
|
|
5
|
+
import "../chunk-O3XTRD7R.js";
|
|
7
6
|
import "../chunk-RC25EWE2.js";
|
|
7
|
+
import "../chunk-25HMMI7R.js";
|
|
8
8
|
import "../chunk-N552FDTV.js";
|
|
9
9
|
export {
|
|
10
10
|
Pagination
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IconButton
|
|
3
|
+
} from "./chunk-O3DNDMV3.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-O3XTRD7R.js";
|
|
7
|
+
import {
|
|
8
|
+
ChevronLeftIcon,
|
|
9
|
+
ChevronRightIcon,
|
|
10
|
+
DoubleArrowLeftIcon,
|
|
11
|
+
DoubleArrowRightIcon
|
|
12
|
+
} from "./chunk-RC25EWE2.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
__spreadProps,
|
|
18
|
+
__spreadValues
|
|
19
|
+
} from "./chunk-N552FDTV.js";
|
|
20
|
+
|
|
21
|
+
// src/atoms/pagination.tsx
|
|
22
|
+
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
23
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
function Pagination(props) {
|
|
25
|
+
const { onChange, count = 0, siblingCount = 2 } = props;
|
|
26
|
+
const [page, setPage] = useState(() => props.page || props.defaultPage || 1);
|
|
27
|
+
const visibleItems = useMemo(() => {
|
|
28
|
+
let start = Math.max(1, page - siblingCount);
|
|
29
|
+
let end = Math.min(count, page + siblingCount);
|
|
30
|
+
if (page - siblingCount <= 0 && end < count) {
|
|
31
|
+
end = Math.min(count, end + Math.abs(page - siblingCount) + 1);
|
|
32
|
+
} else if (page + siblingCount > count && start > 1) {
|
|
33
|
+
start = Math.max(1, start - (page + siblingCount - count));
|
|
34
|
+
}
|
|
35
|
+
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
|
36
|
+
}, [count, page, siblingCount]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
onChange == null ? void 0 : onChange(page);
|
|
39
|
+
}, [onChange, page]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
if (props.page) {
|
|
42
|
+
setPage(props.page);
|
|
43
|
+
}
|
|
44
|
+
}, [props.page]);
|
|
45
|
+
const prev = useMemo(() => {
|
|
46
|
+
const p = page - 1;
|
|
47
|
+
return p < 1 ? void 0 : p;
|
|
48
|
+
}, [page]);
|
|
49
|
+
const next = useMemo(() => {
|
|
50
|
+
const n = page + 1;
|
|
51
|
+
return n > count ? void 0 : n;
|
|
52
|
+
}, [count, page]);
|
|
53
|
+
const onClickPrev = useCallback(() => {
|
|
54
|
+
prev && setPage(prev);
|
|
55
|
+
}, [prev]);
|
|
56
|
+
const onClickNext = useCallback(() => {
|
|
57
|
+
next && setPage(next);
|
|
58
|
+
}, [next]);
|
|
59
|
+
const doublePrev = useMemo(() => {
|
|
60
|
+
if (!visibleItems.length)
|
|
61
|
+
return;
|
|
62
|
+
return Math.max(0, visibleItems[0] - 1);
|
|
63
|
+
}, [visibleItems]);
|
|
64
|
+
const onClickDoublePrev = useCallback(() => {
|
|
65
|
+
doublePrev && setPage(doublePrev);
|
|
66
|
+
}, [doublePrev]);
|
|
67
|
+
const doubleNext = useMemo(() => {
|
|
68
|
+
if (!visibleItems.length)
|
|
69
|
+
return;
|
|
70
|
+
const n = visibleItems[visibleItems.length - 1] + 1;
|
|
71
|
+
if (n > count)
|
|
72
|
+
return;
|
|
73
|
+
return Math.min(count, n);
|
|
74
|
+
}, [count, visibleItems]);
|
|
75
|
+
const onClickDoubleNext = useCallback(() => {
|
|
76
|
+
doubleNext && setPage(doubleNext);
|
|
77
|
+
}, [doubleNext]);
|
|
78
|
+
const iconSize = {
|
|
79
|
+
height: 24,
|
|
80
|
+
width: 24
|
|
81
|
+
};
|
|
82
|
+
const moveButtonProps = {
|
|
83
|
+
variant: "ghost",
|
|
84
|
+
size: "3",
|
|
85
|
+
style: { borderRadius: "50%" }
|
|
86
|
+
};
|
|
87
|
+
if (!page)
|
|
88
|
+
return null;
|
|
89
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", className: "tipp-pagination", gap: "4", children: [
|
|
90
|
+
/* @__PURE__ */ jsx(
|
|
91
|
+
IconButton,
|
|
92
|
+
__spreadProps(__spreadValues({
|
|
93
|
+
disabled: !doublePrev,
|
|
94
|
+
onClick: onClickDoublePrev
|
|
95
|
+
}, moveButtonProps), {
|
|
96
|
+
children: /* @__PURE__ */ jsx(DoubleArrowLeftIcon, __spreadValues({}, iconSize))
|
|
97
|
+
})
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsx(IconButton, __spreadProps(__spreadValues({ disabled: !prev, onClick: onClickPrev }, moveButtonProps), { children: /* @__PURE__ */ jsx(ChevronLeftIcon, __spreadValues({}, iconSize)) })),
|
|
100
|
+
/* @__PURE__ */ jsx(Flex, { gap: "1", children: visibleItems.map((item) => {
|
|
101
|
+
return /* @__PURE__ */ jsx(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
className: `page-button ${item === page ? "active" : ""}`,
|
|
105
|
+
onClick: () => {
|
|
106
|
+
setPage(item);
|
|
107
|
+
},
|
|
108
|
+
type: "button",
|
|
109
|
+
children: /* @__PURE__ */ jsx(Typo, { variant: "body", children: item })
|
|
110
|
+
},
|
|
111
|
+
item
|
|
112
|
+
);
|
|
113
|
+
}) }),
|
|
114
|
+
/* @__PURE__ */ jsx(IconButton, __spreadProps(__spreadValues({ disabled: !next, onClick: onClickNext }, moveButtonProps), { children: /* @__PURE__ */ jsx(ChevronRightIcon, __spreadValues({}, iconSize)) })),
|
|
115
|
+
/* @__PURE__ */ jsx(
|
|
116
|
+
IconButton,
|
|
117
|
+
__spreadProps(__spreadValues({
|
|
118
|
+
disabled: !doubleNext,
|
|
119
|
+
onClick: onClickDoubleNext
|
|
120
|
+
}, moveButtonProps), {
|
|
121
|
+
children: /* @__PURE__ */ jsx(DoubleArrowRightIcon, __spreadValues({}, iconSize))
|
|
122
|
+
})
|
|
123
|
+
)
|
|
124
|
+
] });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
Pagination
|
|
129
|
+
};
|
|
130
|
+
//# sourceMappingURL=chunk-3ML54TPS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/pagination.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n} from '../icon';\nimport type { IconButtonProps } from './icon-button';\nimport { IconButton } from './icon-button';\nimport { Flex } from './flex';\nimport { Typo } from './typo';\n\nexport interface PaginationProps {\n /** 현재 선택된 페이지 */\n page?: number;\n /** 기본 선택 페이지, page보다 낮은 우선 순위를 갖는다 */\n defaultPage?: number;\n /** 선택한 페이지 변경 이벤트 cb */\n onChange?: (page: number) => void;\n /** 전체 페이지의 수 */\n count?: number;\n siblingCount?: number;\n}\n\nexport function Pagination(props: PaginationProps): React.ReactNode {\n const { onChange, count = 0, siblingCount = 2 } = props;\n\n const [page, setPage] = useState(() => props.page || props.defaultPage || 1);\n\n const visibleItems = useMemo(() => {\n let start = Math.max(1, page - siblingCount);\n let end = Math.min(count, page + siblingCount);\n if (page - siblingCount <= 0 && end < count) {\n end = Math.min(count, end + Math.abs(page - siblingCount) + 1);\n } else if (page + siblingCount > count && start > 1) {\n start = Math.max(1, start - (page + siblingCount - count));\n }\n\n return Array.from({ length: end - start + 1 }, (_, i) => i + start);\n }, [count, page, siblingCount]);\n\n useEffect(() => {\n onChange?.(page);\n }, [onChange, page]);\n\n useEffect(() => {\n if (props.page) {\n setPage(props.page);\n }\n }, [props.page]);\n\n const prev = useMemo<number | undefined>(() => {\n const p = page - 1;\n return p < 1 ? undefined : p;\n }, [page]);\n\n const next = useMemo<number | undefined>(() => {\n const n = page + 1;\n return n > count ? undefined : n;\n }, [count, page]);\n\n const onClickPrev = useCallback(() => {\n prev && setPage(prev);\n }, [prev]);\n\n const onClickNext = useCallback(() => {\n next && setPage(next);\n }, [next]);\n\n const doublePrev = useMemo<number | undefined>(() => {\n if (!visibleItems.length) return;\n return Math.max(0, visibleItems[0] - 1);\n }, [visibleItems]);\n\n const onClickDoublePrev = useCallback(() => {\n doublePrev && setPage(doublePrev);\n }, [doublePrev]);\n\n const doubleNext = useMemo<number | undefined>(() => {\n if (!visibleItems.length) return;\n const n = visibleItems[visibleItems.length - 1] + 1;\n if (n > count) return;\n return Math.min(count, n);\n }, [count, visibleItems]);\n\n const onClickDoubleNext = useCallback(() => {\n doubleNext && setPage(doubleNext);\n }, [doubleNext]);\n\n const iconSize = {\n height: 24,\n width: 24,\n };\n\n const moveButtonProps: IconButtonProps = {\n variant: 'ghost',\n size: '3',\n style: { borderRadius: '50%' },\n };\n\n if (!page) return null;\n\n return (\n <Flex align=\"center\" className=\"tipp-pagination\" gap=\"4\">\n <IconButton\n disabled={!doublePrev}\n onClick={onClickDoublePrev}\n {...moveButtonProps}\n >\n <DoubleArrowLeftIcon {...iconSize} />\n </IconButton>\n <IconButton disabled={!prev} onClick={onClickPrev} {...moveButtonProps}>\n <ChevronLeftIcon {...iconSize} />\n </IconButton>\n <Flex gap=\"1\">\n {visibleItems.map((item) => {\n return (\n <button\n className={`page-button ${item === page ? 'active' : ''}`}\n key={item}\n onClick={() => {\n setPage(item);\n }}\n type=\"button\"\n >\n <Typo variant=\"body\">{item}</Typo>\n </button>\n );\n })}\n </Flex>\n <IconButton disabled={!next} onClick={onClickNext} {...moveButtonProps}>\n <ChevronRightIcon {...iconSize} />\n </IconButton>\n <IconButton\n disabled={!doubleNext}\n onClick={onClickDoubleNext}\n {...moveButtonProps}\n >\n <DoubleArrowRightIcon {...iconSize} />\n </IconButton>\n </Flex>\n );\n}\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Typo
|
|
3
|
+
} from "./chunk-O3XTRD7R.js";
|
|
4
|
+
import {
|
|
5
|
+
Button
|
|
6
|
+
} from "./chunk-DZMZGZZO.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-BHFREV7Y.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":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Radio
|
|
3
|
+
} from "./chunk-FPD73OHW.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/radio-cards.tsx
|
|
14
|
+
import { RadioCards as RadixRadioCards } from "@radix-ui/themes";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function Item(props) {
|
|
17
|
+
const _a = props, { children, radioBtnVisible } = _a, rest = __objRest(_a, ["children", "radioBtnVisible"]);
|
|
18
|
+
if (radioBtnVisible) {
|
|
19
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsxs(Flex, { justify: "between", children: [
|
|
20
|
+
children,
|
|
21
|
+
/* @__PURE__ */ jsx(Radio, { value: rest.value })
|
|
22
|
+
] }) }));
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children }));
|
|
25
|
+
}
|
|
26
|
+
var RadioCards = __spreadProps(__spreadValues({}, RadixRadioCards), {
|
|
27
|
+
Item
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
Item,
|
|
32
|
+
RadioCards
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-I4JHOCV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/radio-cards.tsx"],"sourcesContent":["import { RadioCards as RadixRadioCards } from '@radix-ui/themes';\nimport { Flex } from './flex';\nimport { Radio } from './radio';\n\ninterface CardItemProps extends RadixRadioCards.ItemProps {\n radioBtnVisible?: boolean;\n}\nexport function Item(props: CardItemProps): React.ReactElement {\n const { children, radioBtnVisible, ...rest } = props;\n if (radioBtnVisible) {\n return (\n <RadixRadioCards.Item {...rest}>\n <Flex justify=\"between\">\n {children}\n <Radio value={rest.value} />\n </Flex>\n </RadixRadioCards.Item>\n );\n }\n return <RadixRadioCards.Item {...rest}>{children}</RadixRadioCards.Item>;\n}\n\nexport const RadioCards = {\n ...RadixRadioCards,\n Item,\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,cAAc,uBAAuB;AAYtC,SAEE,KAFF;AALD,SAAS,KAAK,OAA0C;AAC7D,QAA+C,YAAvC,YAAU,gBARpB,IAQiD,IAAT,iBAAS,IAAT,CAA9B,YAAU;AAClB,MAAI,iBAAiB;AACnB,WACE,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EACC,+BAAC,QAAK,SAAQ,WACX;AAAA;AAAA,MACD,oBAAC,SAAM,OAAO,KAAK,OAAO;AAAA,OAC5B,IACF;AAAA,EAEJ;AACA,SAAO,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EAAgC,WAAS;AACnD;AAEO,IAAM,aAAa,iCACrB,kBADqB;AAAA,EAExB;AACF;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Radio
|
|
3
|
+
} from "./chunk-FPD73OHW.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/radio-cards.tsx
|
|
14
|
+
import { RadioCards as RadixRadioCards } from "@radix-ui/themes";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function Item(props) {
|
|
17
|
+
const _a = props, { children, withRadioBtn } = _a, rest = __objRest(_a, ["children", "withRadioBtn"]);
|
|
18
|
+
if (withRadioBtn) {
|
|
19
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsxs(Flex, { justify: "between", children: [
|
|
20
|
+
children,
|
|
21
|
+
/* @__PURE__ */ jsx(Radio, {})
|
|
22
|
+
] }) }));
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children }));
|
|
25
|
+
}
|
|
26
|
+
var RadioCards = __spreadProps(__spreadValues({}, RadixRadioCards), {
|
|
27
|
+
Item
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
Item,
|
|
32
|
+
RadioCards
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-LLDWXALX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/radio-cards.tsx"],"sourcesContent":["import { RadioCards as RadixRadioCards } from '@radix-ui/themes';\nimport { Flex } from './flex';\nimport { Radio } from './radio';\n\ninterface CardItemProps extends RadixRadioCards.ItemProps {\n withRadioBtn?: boolean;\n}\nexport function Item(props: CardItemProps): React.ReactElement {\n const { children, withRadioBtn, ...rest } = props;\n if (withRadioBtn) {\n return (\n <RadixRadioCards.Item {...rest}>\n <Flex justify=\"between\">\n {children}\n <Radio />\n </Flex>\n </RadixRadioCards.Item>\n );\n }\n return <RadixRadioCards.Item {...rest}>{children}</RadixRadioCards.Item>;\n}\n\nexport const RadioCards = {\n ...RadixRadioCards,\n Item,\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,cAAc,uBAAuB;AAYtC,SAEE,KAFF;AALD,SAAS,KAAK,OAA0C;AAC7D,QAA4C,YAApC,YAAU,aARpB,IAQ8C,IAAT,iBAAS,IAAT,CAA3B,YAAU;AAClB,MAAI,cAAc;AAChB,WACE,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EACC,+BAAC,QAAK,SAAQ,WACX;AAAA;AAAA,MACD,oBAAC,SAAM;AAAA,OACT,IACF;AAAA,EAEJ;AACA,SAAO,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EAAgC,WAAS;AACnD;AAEO,IAAM,aAAa,iCACrB,kBADqB;AAAA,EAExB;AACF;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Radio
|
|
3
|
+
} from "./chunk-FPD73OHW.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/atoms/radio-cards.tsx
|
|
14
|
+
import { RadioCards as RadixRadioCards } from "@radix-ui/themes";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function Item(props) {
|
|
17
|
+
const _a = props, { children, withRadioBtn } = _a, rest = __objRest(_a, ["children", "withRadioBtn"]);
|
|
18
|
+
if (withRadioBtn) {
|
|
19
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsxs(Flex, { justify: "between", children: [
|
|
20
|
+
children,
|
|
21
|
+
/* @__PURE__ */ jsx(Radio, { value: rest.value })
|
|
22
|
+
] }) }));
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children }));
|
|
25
|
+
}
|
|
26
|
+
var RadioCards = __spreadProps(__spreadValues({}, RadixRadioCards), {
|
|
27
|
+
Item
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
Item,
|
|
32
|
+
RadioCards
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-MY4C7VHR.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/radio-cards.tsx"],"sourcesContent":["import { RadioCards as RadixRadioCards } from '@radix-ui/themes';\nimport { Flex } from './flex';\nimport { Radio } from './radio';\n\ninterface CardItemProps extends RadixRadioCards.ItemProps {\n withRadioBtn?: boolean;\n}\nexport function Item(props: CardItemProps): React.ReactElement {\n const { children, withRadioBtn, ...rest } = props;\n if (withRadioBtn) {\n return (\n <RadixRadioCards.Item {...rest}>\n <Flex justify=\"between\">\n {children}\n <Radio value={rest.value} />\n </Flex>\n </RadixRadioCards.Item>\n );\n }\n return <RadixRadioCards.Item {...rest}>{children}</RadixRadioCards.Item>;\n}\n\nexport const RadioCards = {\n ...RadixRadioCards,\n Item,\n};\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,cAAc,uBAAuB;AAYtC,SAEE,KAFF;AALD,SAAS,KAAK,OAA0C;AAC7D,QAA4C,YAApC,YAAU,aARpB,IAQ8C,IAAT,iBAAS,IAAT,CAA3B,YAAU;AAClB,MAAI,cAAc;AAChB,WACE,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EACC,+BAAC,QAAK,SAAQ,WACX;AAAA;AAAA,MACD,oBAAC,SAAM,OAAO,KAAK,OAAO;AAAA,OAC5B,IACF;AAAA,EAEJ;AACA,SAAO,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EAAgC,WAAS;AACnD;AAEO,IAAM,aAAa,iCACrB,kBADqB;AAAA,EAExB;AACF;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-O3XTRD7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-DZMZGZZO.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-OI2YZXJT.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":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
import {
|
|
5
|
+
__objRest,
|
|
6
|
+
__spreadProps,
|
|
7
|
+
__spreadValues
|
|
8
|
+
} from "./chunk-N552FDTV.js";
|
|
9
|
+
|
|
10
|
+
// src/atoms/radio-cards.tsx
|
|
11
|
+
import { RadioCards as RadixRadioCards } from "@radix-ui/themes";
|
|
12
|
+
import { jsx } from "react/jsx-runtime";
|
|
13
|
+
function Item(props) {
|
|
14
|
+
const _a = props, { children, withRadioBtn } = _a, rest = __objRest(_a, ["children", "withRadioBtn"]);
|
|
15
|
+
if (withRadioBtn) {
|
|
16
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children: /* @__PURE__ */ jsx(Flex, { justify: "between", children }) }));
|
|
17
|
+
}
|
|
18
|
+
return /* @__PURE__ */ jsx(RadixRadioCards.Item, __spreadProps(__spreadValues({}, rest), { children }));
|
|
19
|
+
}
|
|
20
|
+
var RadioCards = __spreadProps(__spreadValues({}, RadixRadioCards), {
|
|
21
|
+
Item
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
Item,
|
|
26
|
+
RadioCards
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-VS2M6MCO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/radio-cards.tsx"],"sourcesContent":["import { RadioCards as RadixRadioCards } from '@radix-ui/themes';\nimport { Flex } from './flex';\n\ninterface CardItemProps extends RadixRadioCards.ItemProps {\n withRadioBtn?: boolean;\n}\nexport function Item(props: CardItemProps): React.ReactElement {\n const { children, withRadioBtn, ...rest } = props;\n if (withRadioBtn) {\n return (\n <RadixRadioCards.Item {...rest}>\n <Flex justify=\"between\">{children}</Flex>\n </RadixRadioCards.Item>\n );\n }\n return <RadixRadioCards.Item {...rest}>{children}</RadixRadioCards.Item>;\n}\n\nexport const RadioCards = {\n ...RadixRadioCards,\n Item,\n};\n"],"mappings":";;;;;;;;;;AAAA,SAAS,cAAc,uBAAuB;AAWtC;AALD,SAAS,KAAK,OAA0C;AAC7D,QAA4C,YAApC,YAAU,aAPpB,IAO8C,IAAT,iBAAS,IAAT,CAA3B,YAAU;AAClB,MAAI,cAAc;AAChB,WACE,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EACC,8BAAC,QAAK,SAAQ,WAAW,UAAS,IACpC;AAAA,EAEJ;AACA,SAAO,oBAAC,gBAAgB,MAAhB,iCAAyB,OAAzB,EAAgC,WAAS;AACnD;AAEO,IAAM,aAAa,iCACrB,kBADqB;AAAA,EAExB;AACF;","names":[]}
|