@tipp/ui 1.6.22 → 1.6.24
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/app/index.cjs +389 -398
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +19 -18
- package/dist/app/platform/coach-question-list.cjs +78 -72
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +4 -3
- package/dist/app/platform/contents-card.cjs +63 -56
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +5 -4
- package/dist/app/platform/edit-coaching-time.cjs +155 -165
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +8 -7
- package/dist/app/platform/edit-service-type.cjs +148 -158
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +8 -7
- package/dist/app/platform/goal-manage-card-edit.cjs +124 -118
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +7 -6
- package/dist/app/platform/goal-manage-card-read.cjs +112 -106
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +4 -3
- package/dist/app/platform/on-offline-radio-card.cjs +108 -102
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +7 -6
- package/dist/app/platform/report-card.cjs +79 -73
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +4 -3
- package/dist/app/platform/reservation-card.cjs +150 -144
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +8 -7
- package/dist/app/platform/session-card.cjs +200 -210
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +10 -9
- package/dist/app/platform/session-review-simple-read.cjs +79 -73
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +4 -3
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs +112 -106
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +8 -7
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs +89 -83
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +4 -3
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs +92 -86
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +4 -3
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs +78 -72
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +4 -3
- package/dist/app/platform/userInfos/session-user-info-detail.cjs +88 -82
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +4 -3
- package/dist/app/platform/userInfos/utils.cjs +80 -74
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +4 -3
- package/dist/atoms/dialog.cjs +41 -56
- package/dist/atoms/dialog.cjs.map +1 -1
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/drawer.cjs +23 -41
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +2 -2
- package/dist/atoms/index.cjs +159 -151
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +7 -6
- package/dist/chunk-2NQ4PYPH.js +145 -0
- package/dist/chunk-2NQ4PYPH.js.map +1 -0
- package/dist/chunk-36BWVY4R.js +30 -0
- package/dist/chunk-36BWVY4R.js.map +1 -0
- package/dist/chunk-3F6KWGBZ.js +89 -0
- package/dist/chunk-3F6KWGBZ.js.map +1 -0
- package/dist/chunk-3FNXJ35I.js +54 -0
- package/dist/chunk-3FNXJ35I.js.map +1 -0
- package/dist/chunk-3TWYP5FO.js +57 -0
- package/dist/chunk-3TWYP5FO.js.map +1 -0
- package/dist/chunk-3WEXXGSP.js +53 -0
- package/dist/chunk-3WEXXGSP.js.map +1 -0
- package/dist/chunk-3X6SIK3W.js +106 -0
- package/dist/chunk-3X6SIK3W.js.map +1 -0
- package/dist/chunk-3XMCL5X4.js +106 -0
- package/dist/chunk-3XMCL5X4.js.map +1 -0
- package/dist/chunk-42MNZ5HL.js +54 -0
- package/dist/chunk-42MNZ5HL.js.map +1 -0
- package/dist/chunk-43TEFEIM.js +63 -0
- package/dist/chunk-43TEFEIM.js.map +1 -0
- package/dist/chunk-4TI72EQY.js +54 -0
- package/dist/chunk-4TI72EQY.js.map +1 -0
- package/dist/chunk-4VRGGFOT.js +54 -0
- package/dist/chunk-4VRGGFOT.js.map +1 -0
- package/dist/chunk-57F5B7FE.js +84 -0
- package/dist/chunk-57F5B7FE.js.map +1 -0
- package/dist/chunk-5F7NVKMI.js +74 -0
- package/dist/chunk-5F7NVKMI.js.map +1 -0
- package/dist/chunk-5JJVLL2A.js +30 -0
- package/dist/chunk-5JJVLL2A.js.map +1 -0
- package/dist/chunk-5QCIYLYC.js +70 -0
- package/dist/chunk-5QCIYLYC.js.map +1 -0
- package/dist/chunk-5RXSBHAF.js +284 -0
- package/dist/chunk-5RXSBHAF.js.map +1 -0
- package/dist/chunk-64UUNUIF.js +74 -0
- package/dist/chunk-64UUNUIF.js.map +1 -0
- package/dist/chunk-6ERCSTEP.js +357 -0
- package/dist/chunk-6ERCSTEP.js.map +1 -0
- package/dist/chunk-6HY2JAC2.js +145 -0
- package/dist/chunk-6HY2JAC2.js.map +1 -0
- package/dist/chunk-6X3CZMIC.js +174 -0
- package/dist/chunk-6X3CZMIC.js.map +1 -0
- package/dist/chunk-7SWVQEY6.js +73 -0
- package/dist/chunk-7SWVQEY6.js.map +1 -0
- package/dist/chunk-7ZXUG6W4.js +145 -0
- package/dist/chunk-7ZXUG6W4.js.map +1 -0
- package/dist/chunk-APHK52I3.js +164 -0
- package/dist/chunk-APHK52I3.js.map +1 -0
- package/dist/chunk-AQXVWKH6.js +19 -0
- package/dist/chunk-AQXVWKH6.js.map +1 -0
- package/dist/chunk-B7P4NYMW.js +164 -0
- package/dist/chunk-B7P4NYMW.js.map +1 -0
- package/dist/chunk-BNB3AEFM.js +70 -0
- package/dist/chunk-BNB3AEFM.js.map +1 -0
- package/dist/chunk-BUPPCVDT.js +30 -0
- package/dist/chunk-BUPPCVDT.js.map +1 -0
- package/dist/chunk-BVNUNZXK.js +30 -0
- package/dist/chunk-BVNUNZXK.js.map +1 -0
- package/dist/chunk-CBVIUEJB.js +117 -0
- package/dist/chunk-CBVIUEJB.js.map +1 -0
- package/dist/chunk-CC7CR4NT.js +174 -0
- package/dist/chunk-CC7CR4NT.js.map +1 -0
- package/dist/chunk-CXPOD6VX.js +58 -0
- package/dist/chunk-CXPOD6VX.js.map +1 -0
- package/dist/chunk-D2GFXT7B.js +164 -0
- package/dist/chunk-D2GFXT7B.js.map +1 -0
- package/dist/chunk-DEJVT5GM.js +58 -0
- package/dist/chunk-DEJVT5GM.js.map +1 -0
- package/dist/chunk-DEQLZ43V.js +117 -0
- package/dist/chunk-DEQLZ43V.js.map +1 -0
- package/dist/chunk-DJN2IEY6.js +23 -0
- package/dist/chunk-DJN2IEY6.js.map +1 -0
- package/dist/chunk-DSVS6ALA.js +174 -0
- package/dist/chunk-DSVS6ALA.js.map +1 -0
- package/dist/chunk-E2B4MIBN.js +60 -0
- package/dist/chunk-E2B4MIBN.js.map +1 -0
- package/dist/chunk-E3YG43CK.js +70 -0
- package/dist/chunk-E3YG43CK.js.map +1 -0
- package/dist/chunk-F5JCHRHO.js +102 -0
- package/dist/chunk-F5JCHRHO.js.map +1 -0
- package/dist/chunk-FF2PTPBU.js +145 -0
- package/dist/chunk-FF2PTPBU.js.map +1 -0
- package/dist/chunk-FJP2F6IC.js +39 -0
- package/dist/chunk-FJP2F6IC.js.map +1 -0
- package/dist/chunk-FX7FMZ2U.js +15 -0
- package/dist/chunk-FX7FMZ2U.js.map +1 -0
- package/dist/chunk-G2JN23PG.js +64 -0
- package/dist/chunk-G2JN23PG.js.map +1 -0
- package/dist/chunk-GDSTYYNT.js +106 -0
- package/dist/chunk-GDSTYYNT.js.map +1 -0
- package/dist/chunk-GDZ3OYPF.js +70 -0
- package/dist/chunk-GDZ3OYPF.js.map +1 -0
- package/dist/chunk-H76H7C6P.js +284 -0
- package/dist/chunk-H76H7C6P.js.map +1 -0
- package/dist/chunk-HQSSAZHP.js +84 -0
- package/dist/chunk-HQSSAZHP.js.map +1 -0
- package/dist/chunk-HRAIZGAV.js +164 -0
- package/dist/chunk-HRAIZGAV.js.map +1 -0
- package/dist/chunk-IWW6ST7Q.js +30 -0
- package/dist/chunk-IWW6ST7Q.js.map +1 -0
- package/dist/chunk-IYJ77DVE.js +63 -0
- package/dist/chunk-IYJ77DVE.js.map +1 -0
- package/dist/chunk-IZUCJFWS.js +357 -0
- package/dist/chunk-IZUCJFWS.js.map +1 -0
- package/dist/chunk-J5675IX6.js +145 -0
- package/dist/chunk-J5675IX6.js.map +1 -0
- package/dist/chunk-JAJC7VPU.js +117 -0
- package/dist/chunk-JAJC7VPU.js.map +1 -0
- package/dist/chunk-JPKBLDEX.js +174 -0
- package/dist/chunk-JPKBLDEX.js.map +1 -0
- package/dist/chunk-K2PTIGO7.js +54 -0
- package/dist/chunk-K2PTIGO7.js.map +1 -0
- package/dist/chunk-K7ITFD4P.js +45 -0
- package/dist/chunk-K7ITFD4P.js.map +1 -0
- package/dist/chunk-LCGQYQ2Y.js +145 -0
- package/dist/chunk-LCGQYQ2Y.js.map +1 -0
- package/dist/chunk-LGF7FERG.js +23 -0
- package/dist/chunk-LGF7FERG.js.map +1 -0
- package/dist/chunk-LSYQLE32.js +19 -0
- package/dist/chunk-LSYQLE32.js.map +1 -0
- package/dist/chunk-MEA2GIR7.js +192 -0
- package/dist/chunk-MEA2GIR7.js.map +1 -0
- package/dist/chunk-MMNUPVIX.js +128 -0
- package/dist/chunk-MMNUPVIX.js.map +1 -0
- package/dist/chunk-MRSCXF6Z.js +70 -0
- package/dist/chunk-MRSCXF6Z.js.map +1 -0
- package/dist/chunk-NHOR6XDA.js +30 -0
- package/dist/chunk-NHOR6XDA.js.map +1 -0
- package/dist/chunk-NVZTJG7X.js +57 -0
- package/dist/chunk-NVZTJG7X.js.map +1 -0
- package/dist/chunk-NWF4LV6Z.js +30 -0
- package/dist/chunk-NWF4LV6Z.js.map +1 -0
- package/dist/chunk-O33F7L7R.js +165 -0
- package/dist/chunk-O33F7L7R.js.map +1 -0
- package/dist/chunk-O5EI5UQD.js +102 -0
- package/dist/chunk-O5EI5UQD.js.map +1 -0
- package/dist/chunk-OFBTS6ZD.js +145 -0
- package/dist/chunk-OFBTS6ZD.js.map +1 -0
- package/dist/chunk-ON6X4DAK.js +45 -0
- package/dist/chunk-ON6X4DAK.js.map +1 -0
- package/dist/chunk-OWSYPSKK.js +84 -0
- package/dist/chunk-OWSYPSKK.js.map +1 -0
- package/dist/chunk-Q6Q7AOOQ.js +174 -0
- package/dist/chunk-Q6Q7AOOQ.js.map +1 -0
- package/dist/chunk-QC63I2BG.js +89 -0
- package/dist/chunk-QC63I2BG.js.map +1 -0
- package/dist/chunk-QIBROLOP.js +169 -0
- package/dist/chunk-QIBROLOP.js.map +1 -0
- package/dist/chunk-QIY5KHBO.js +64 -0
- package/dist/chunk-QIY5KHBO.js.map +1 -0
- package/dist/chunk-R23QFNIZ.js +84 -0
- package/dist/chunk-R23QFNIZ.js.map +1 -0
- package/dist/chunk-RFD5H6F6.js +174 -0
- package/dist/chunk-RFD5H6F6.js.map +1 -0
- package/dist/chunk-RNGCQ6Q5.js +54 -0
- package/dist/chunk-RNGCQ6Q5.js.map +1 -0
- package/dist/chunk-S2P3RYT2.js +174 -0
- package/dist/chunk-S2P3RYT2.js.map +1 -0
- package/dist/chunk-S4UCJELU.js +64 -0
- package/dist/chunk-S4UCJELU.js.map +1 -0
- package/dist/chunk-SM5ETU3K.js +284 -0
- package/dist/chunk-SM5ETU3K.js.map +1 -0
- package/dist/chunk-SMZIRKPK.js +70 -0
- package/dist/chunk-SMZIRKPK.js.map +1 -0
- package/dist/chunk-SNHJQ4GS.js +64 -0
- package/dist/chunk-SNHJQ4GS.js.map +1 -0
- package/dist/chunk-T23U4R7A.js +84 -0
- package/dist/chunk-T23U4R7A.js.map +1 -0
- package/dist/chunk-TD45ZF7D.js +31 -0
- package/dist/chunk-TD45ZF7D.js.map +1 -0
- package/dist/chunk-TTGSVKIG.js +99 -0
- package/dist/chunk-TTGSVKIG.js.map +1 -0
- package/dist/chunk-UB44BWD3.js +54 -0
- package/dist/chunk-UB44BWD3.js.map +1 -0
- package/dist/chunk-UL52QKAX.js +106 -0
- package/dist/chunk-UL52QKAX.js.map +1 -0
- package/dist/chunk-ULK3LVLV.js +145 -0
- package/dist/chunk-ULK3LVLV.js.map +1 -0
- package/dist/chunk-UQVTXKJY.js +30 -0
- package/dist/chunk-UQVTXKJY.js.map +1 -0
- package/dist/chunk-URCFWXSS.js +145 -0
- package/dist/chunk-URCFWXSS.js.map +1 -0
- package/dist/chunk-USAO24JU.js +164 -0
- package/dist/chunk-USAO24JU.js.map +1 -0
- package/dist/chunk-V3LWCHYU.js +101 -0
- package/dist/chunk-V3LWCHYU.js.map +1 -0
- package/dist/chunk-VEHJL7YX.js +145 -0
- package/dist/chunk-VEHJL7YX.js.map +1 -0
- package/dist/chunk-VGA7OYBC.js +165 -0
- package/dist/chunk-VGA7OYBC.js.map +1 -0
- package/dist/chunk-VHFAY5XN.js +146 -0
- package/dist/chunk-VHFAY5XN.js.map +1 -0
- package/dist/chunk-W3WQTY36.js +99 -0
- package/dist/chunk-W3WQTY36.js.map +1 -0
- package/dist/chunk-WL6DTHGM.js +164 -0
- package/dist/chunk-WL6DTHGM.js.map +1 -0
- package/dist/chunk-WLQ43ESH.js +89 -0
- package/dist/chunk-WLQ43ESH.js.map +1 -0
- package/dist/chunk-WNEXIUQ7.js +63 -0
- package/dist/chunk-WNEXIUQ7.js.map +1 -0
- package/dist/chunk-WW753CRQ.js +145 -0
- package/dist/chunk-WW753CRQ.js.map +1 -0
- package/dist/chunk-X3Z66RK2.js +85 -0
- package/dist/chunk-X3Z66RK2.js.map +1 -0
- package/dist/chunk-XD7T627Q.js +174 -0
- package/dist/chunk-XD7T627Q.js.map +1 -0
- package/dist/chunk-Y6WM6YGH.js +117 -0
- package/dist/chunk-Y6WM6YGH.js.map +1 -0
- package/dist/chunk-YFWG4PQ3.js +39 -0
- package/dist/chunk-YFWG4PQ3.js.map +1 -0
- package/dist/chunk-ZIB6X7QU.js +284 -0
- package/dist/chunk-ZIB6X7QU.js.map +1 -0
- package/dist/chunk-ZWYM5QVI.js +63 -0
- package/dist/chunk-ZWYM5QVI.js.map +1 -0
- package/dist/index.cjs +612 -590
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +120 -75
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -23
- package/dist/molecules/date-picker/date-picker-button.cjs +86 -80
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +4 -3
- package/dist/molecules/expand-table/index.cjs +112 -106
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +4 -3
- package/dist/molecules/expand-table/row.cjs +82 -76
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +4 -3
- package/dist/molecules/ghost-post.cjs.map +1 -1
- package/dist/molecules/ghost-post.js +2 -2
- package/dist/molecules/index.cjs +237 -231
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +7 -6
- package/dist/molecules/learning-post.cjs.map +1 -1
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/navigation.cjs +78 -72
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.js +4 -3
- package/dist/molecules/radio-button-card.cjs +76 -70
- package/dist/molecules/radio-button-card.cjs.map +1 -1
- package/dist/molecules/radio-button-card.js +4 -3
- package/dist/molecules/tag-selector.cjs +77 -71
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +4 -3
- package/dist/molecules/time-select.cjs +77 -71
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +4 -3
- package/dist/theme/portal-provider.cjs +56 -0
- package/dist/theme/portal-provider.cjs.map +1 -0
- package/dist/theme/portal-provider.d.cts +13 -0
- package/dist/theme/portal-provider.d.ts +13 -0
- package/dist/theme/portal-provider.js +12 -0
- package/dist/theme/portal-provider.js.map +1 -0
- package/dist/theme/theme-provider.cjs.map +1 -1
- package/dist/theme/theme-provider.d.cts +1 -1
- package/dist/theme/theme-provider.d.ts +1 -1
- package/dist/theme/theme-provider.js +1 -1
- package/package.json +4 -4
- package/src/app/platform/contents-card.tsx +1 -0
- package/src/atoms/dialog.tsx +3 -3
- package/src/atoms/drawer.tsx +4 -9
- package/src/index.ts +1 -0
- package/src/theme/portal-provider.tsx +38 -0
- package/src/theme/theme-provider.tsx +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Typo
|
|
3
|
+
} from "./chunk-52MVZ6AN.js";
|
|
4
|
+
import {
|
|
5
|
+
Heading
|
|
6
|
+
} from "./chunk-HJB3AASV.js";
|
|
7
|
+
import {
|
|
8
|
+
__objRest,
|
|
9
|
+
__spreadProps,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-N552FDTV.js";
|
|
12
|
+
|
|
13
|
+
// src/molecules/form/form.tsx
|
|
14
|
+
import * as RadixForm from "@radix-ui/react-form";
|
|
15
|
+
import { createContext, forwardRef, useContext, useMemo } from "react";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var Root2 = forwardRef(
|
|
18
|
+
(_a, ref) => {
|
|
19
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
RadixForm.Root,
|
|
22
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
23
|
+
className: `FormRoot ${className || ""}`,
|
|
24
|
+
ref,
|
|
25
|
+
children
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
Root2.displayName = "FORM_ROOT";
|
|
31
|
+
var FieldContext = createContext({
|
|
32
|
+
name: ""
|
|
33
|
+
});
|
|
34
|
+
var Field2 = forwardRef(
|
|
35
|
+
(_a, ref) => {
|
|
36
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
RadixForm.Field,
|
|
39
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
40
|
+
className: `FormField ${className || ""}`,
|
|
41
|
+
ref,
|
|
42
|
+
children: /* @__PURE__ */ jsx(FieldContext.Provider, { value: rest, children })
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
Field2.displayName = "FORM_FIELD";
|
|
48
|
+
function HeadingLabel(props) {
|
|
49
|
+
return /* @__PURE__ */ jsx(Heading, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
|
|
50
|
+
}
|
|
51
|
+
function CaptionLabel(props) {
|
|
52
|
+
return /* @__PURE__ */ jsx(Typo, __spreadProps(__spreadValues({ color: "gray", variant: "caption" }, props), { children: props.children }));
|
|
53
|
+
}
|
|
54
|
+
var Label2 = forwardRef(
|
|
55
|
+
(_a, ref) => {
|
|
56
|
+
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
57
|
+
const Comp = useMemo(() => {
|
|
58
|
+
switch (variant) {
|
|
59
|
+
case "title":
|
|
60
|
+
return HeadingLabel;
|
|
61
|
+
case "caption":
|
|
62
|
+
return CaptionLabel;
|
|
63
|
+
case "body":
|
|
64
|
+
default:
|
|
65
|
+
return Typo;
|
|
66
|
+
}
|
|
67
|
+
}, [variant]);
|
|
68
|
+
const fieldProps = useContext(FieldContext);
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
RadixForm.Label,
|
|
71
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
72
|
+
asChild: true,
|
|
73
|
+
className: `FormLabel ${className || ""}`,
|
|
74
|
+
ref,
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Comp, { children: [
|
|
76
|
+
children,
|
|
77
|
+
fieldProps.required ? /* @__PURE__ */ jsx(Typo, { as: "span", color: "tomato", children: ` *` }) : null
|
|
78
|
+
] })
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
Label2.displayName = "FORM_Label";
|
|
84
|
+
var Message2 = forwardRef(
|
|
85
|
+
(_a, ref) => {
|
|
86
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
88
|
+
RadixForm.Message,
|
|
89
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
90
|
+
asChild: true,
|
|
91
|
+
className: `FormMessage ${className || ""}`,
|
|
92
|
+
ref,
|
|
93
|
+
children: /* @__PURE__ */ jsx(Typo, { color: "red", children })
|
|
94
|
+
})
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
Message2.displayName = "FORM_Message";
|
|
99
|
+
var Control2 = forwardRef(
|
|
100
|
+
(_a, ref) => {
|
|
101
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
102
|
+
const fieldProps = useContext(FieldContext);
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
RadixForm.Control,
|
|
105
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
106
|
+
className: `FormControl ${className || ""}`,
|
|
107
|
+
ref,
|
|
108
|
+
required: fieldProps.required
|
|
109
|
+
})
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
Control2.displayName = "FORM_Control";
|
|
114
|
+
function FormItem(_a) {
|
|
115
|
+
var _b = _a, {
|
|
116
|
+
label,
|
|
117
|
+
labelVariant,
|
|
118
|
+
children,
|
|
119
|
+
errorMessage
|
|
120
|
+
} = _b, fieldProps = __objRest(_b, [
|
|
121
|
+
"label",
|
|
122
|
+
"labelVariant",
|
|
123
|
+
"children",
|
|
124
|
+
"errorMessage"
|
|
125
|
+
]);
|
|
126
|
+
return /* @__PURE__ */ jsxs(Form.Field, __spreadProps(__spreadValues({}, fieldProps), { children: [
|
|
127
|
+
/* @__PURE__ */ jsx(Form.Label, { variant: labelVariant, children: label }),
|
|
128
|
+
children,
|
|
129
|
+
/* @__PURE__ */ jsx(Form.Message, { forceMatch: Boolean(errorMessage), children: errorMessage })
|
|
130
|
+
] }));
|
|
131
|
+
}
|
|
132
|
+
var Form = {
|
|
133
|
+
Root: Root2,
|
|
134
|
+
Field: Field2,
|
|
135
|
+
Label: Label2,
|
|
136
|
+
Message: Message2,
|
|
137
|
+
Control: RadixForm.Control,
|
|
138
|
+
Submit: RadixForm.Submit,
|
|
139
|
+
FormItem
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export {
|
|
143
|
+
FormItem,
|
|
144
|
+
Form
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=chunk-VHFAY5XN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/form/form.tsx"],"sourcesContent":["import * as RadixForm from '@radix-ui/react-form';\nimport { createContext, forwardRef, useContext, useMemo } from 'react';\nimport type { HeadingProps } from '@radix-ui/themes';\nimport { Heading } from '../../atoms/heading';\nimport type { TypoProps } from '../../atoms/typo';\nimport { Typo } from '../../atoms/typo';\n\nconst Root = forwardRef<HTMLFormElement, RadixForm.FormProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Root\n {...rest}\n className={`FormRoot ${className || ''}`}\n ref={ref}\n >\n {children}\n </RadixForm.Root>\n );\n }\n);\n\nRoot.displayName = 'FORM_ROOT';\n\nexport type FormFieldProps = RadixForm.FormFieldProps & { required?: boolean };\n\nconst FieldContext = createContext<FormFieldProps>({\n name: '',\n});\n\nconst Field = forwardRef<HTMLDivElement, FormFieldProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Field\n {...rest}\n className={`FormField ${className || ''}`}\n ref={ref}\n >\n <FieldContext.Provider value={rest}>{children}</FieldContext.Provider>\n </RadixForm.Field>\n );\n }\n);\nField.displayName = 'FORM_FIELD';\n\nexport type FormLabelProps = RadixForm.FormLabelProps & {\n /** label의 타입을 지정 */\n variant?: 'title' | 'body' | 'caption';\n};\n\nfunction HeadingLabel(props: HeadingProps): React.ReactElement {\n return (\n <Heading variant=\"heading5\" {...props}>\n {props.children}\n </Heading>\n );\n}\n\nfunction CaptionLabel(props: TypoProps): React.ReactElement {\n return (\n <Typo color=\"gray\" variant=\"caption\" {...props}>\n {props.children}\n </Typo>\n );\n}\n\nconst Label = forwardRef<HTMLLabelElement, FormLabelProps>(\n ({ children, className, variant, ...rest }, ref) => {\n const Comp = useMemo(() => {\n switch (variant) {\n case 'title':\n return HeadingLabel;\n case 'caption':\n return CaptionLabel;\n case 'body':\n default:\n return Typo;\n }\n }, [variant]);\n\n const fieldProps = useContext(FieldContext);\n return (\n <RadixForm.Label\n {...rest}\n asChild\n className={`FormLabel ${className || ''}`}\n ref={ref}\n >\n <Comp>\n {children}\n {fieldProps.required ? (\n <Typo as=\"span\" color=\"tomato\">\n {` *`}\n </Typo>\n ) : null}\n </Comp>\n </RadixForm.Label>\n );\n }\n);\nLabel.displayName = 'FORM_Label';\n\nconst Message = forwardRef<HTMLSpanElement, RadixForm.FormMessageProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Message\n {...rest}\n asChild\n className={`FormMessage ${className || ''}`}\n ref={ref}\n >\n <Typo color=\"red\">{children}</Typo>\n </RadixForm.Message>\n );\n }\n);\nMessage.displayName = 'FORM_Message';\n\ntype ControlProps = Omit<RadixForm.FormControlProps, 'required'>;\nconst Control = forwardRef<HTMLInputElement, ControlProps>(\n ({ className, ...rest }, ref) => {\n const fieldProps = useContext(FieldContext);\n return (\n <RadixForm.Control\n {...rest}\n className={`FormControl ${className || ''}`}\n ref={ref}\n required={fieldProps.required}\n />\n );\n }\n);\nControl.displayName = 'FORM_Control';\n\ninterface FormItemProps extends FormFieldProps {\n children: React.ReactElement;\n label: string;\n labelVariant?: FormLabelProps['variant'];\n errorMessage?: string;\n}\n\nexport function FormItem({\n label,\n labelVariant,\n children,\n errorMessage,\n ...fieldProps\n}: FormItemProps): React.JSX.Element {\n return (\n <Form.Field {...fieldProps}>\n <Form.Label variant={labelVariant}>{label}</Form.Label>\n {children}\n <Form.Message forceMatch={Boolean(errorMessage)}>\n {errorMessage}\n </Form.Message>\n </Form.Field>\n );\n}\n\nexport const Form = {\n Root,\n Field,\n Label,\n Message,\n Control: RadixForm.Control,\n Submit: RadixForm.Submit,\n FormItem,\n};\n"],"mappings":"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","names":["Root","Field","Label","Message","Control"]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Separator
|
|
3
|
+
} from "./chunk-HYITAA4J.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Badge
|
|
9
|
+
} from "./chunk-EWD4AO5N.js";
|
|
10
|
+
import {
|
|
11
|
+
Typo
|
|
12
|
+
} from "./chunk-52MVZ6AN.js";
|
|
13
|
+
import {
|
|
14
|
+
Heading
|
|
15
|
+
} from "./chunk-HJB3AASV.js";
|
|
16
|
+
import {
|
|
17
|
+
Box
|
|
18
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
ArrowRightIcon,
|
|
24
|
+
TimerIcon
|
|
25
|
+
} from "./chunk-HLFG5ZTU.js";
|
|
26
|
+
|
|
27
|
+
// src/app/platform/curriculum-card.tsx
|
|
28
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
29
|
+
function CurriculumCard(props) {
|
|
30
|
+
const {
|
|
31
|
+
title,
|
|
32
|
+
imgTitle,
|
|
33
|
+
imgSrc,
|
|
34
|
+
description,
|
|
35
|
+
runningTime,
|
|
36
|
+
bgColor,
|
|
37
|
+
onClick
|
|
38
|
+
} = props;
|
|
39
|
+
return /* @__PURE__ */ jsxs(
|
|
40
|
+
Grid,
|
|
41
|
+
{
|
|
42
|
+
columns: { initial: "1", sm: "275px 1fr" },
|
|
43
|
+
gapX: "5",
|
|
44
|
+
gapY: "2",
|
|
45
|
+
onClick,
|
|
46
|
+
style: { cursor: "pointer" },
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Box,
|
|
50
|
+
{
|
|
51
|
+
height: "165px",
|
|
52
|
+
p: "3",
|
|
53
|
+
style: {
|
|
54
|
+
backgroundImage: `url(${imgSrc})`,
|
|
55
|
+
backgroundColor: bgColor,
|
|
56
|
+
backgroundPositionX: "right",
|
|
57
|
+
backgroundPositionY: "bottom",
|
|
58
|
+
backgroundRepeat: "no-repeat",
|
|
59
|
+
backgroundSize: "contain",
|
|
60
|
+
backgroundAttachment: "local"
|
|
61
|
+
},
|
|
62
|
+
width: "100%",
|
|
63
|
+
children: /* @__PURE__ */ jsx(Heading, { style: { whiteSpace: "break-spaces" }, variant: "heading3", children: imgTitle })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "3", children: [
|
|
67
|
+
/* @__PURE__ */ jsxs(Grid, { columns: { initial: "1", xs: "1fr auto" }, gapY: "3", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading4", children: title }),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Badge,
|
|
71
|
+
{
|
|
72
|
+
size: "medium",
|
|
73
|
+
style: { justifySelf: "flex-start" },
|
|
74
|
+
variant: "outline",
|
|
75
|
+
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "1", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(TimerIcon, {}),
|
|
77
|
+
runningTime
|
|
78
|
+
] })
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ jsx(Box, { style: { marginBottom: "auto" }, children: /* @__PURE__ */ jsx("ul", { style: { margin: 0, paddingLeft: 20 }, children: description == null ? void 0 : description.map((el) => {
|
|
83
|
+
return /* @__PURE__ */ jsx("li", { style: { marginBottom: 8 }, children: /* @__PURE__ */ jsx(Heading, { truncate: true, variant: "heading5", weight: "regular", children: el }) }, el);
|
|
84
|
+
}) }) }),
|
|
85
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" }),
|
|
86
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", justify: "end", children: [
|
|
87
|
+
/* @__PURE__ */ jsx(Typo, { color: "gray", children: "\uAC15\uC758 \uB4E3\uACE0 \uCF54\uCE58\uB2D8\uACFC \uBB34\uC81C\uD55C Q&A" }),
|
|
88
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { color: "gray" })
|
|
89
|
+
] })
|
|
90
|
+
] })
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export {
|
|
97
|
+
CurriculumCard
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=chunk-W3WQTY36.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/curriculum-card.tsx"],"sourcesContent":["import React from 'react';\nimport { Badge } from '@/atoms/badge';\nimport { Box } from '@/atoms/box';\nimport { Grid } from '@/atoms/grid';\nimport { Heading } from '@/atoms/heading';\nimport { Typo } from '@/atoms/typo';\nimport { Separator } from '@/atoms/separator';\nimport { Flex } from '@/atoms/flex';\nimport { ArrowRightIcon, TimerIcon } from '@/icon';\n\nexport interface CurriculumCardProps {\n title?: string;\n imgTitle?: string;\n imgSrc?: string;\n description?: string[];\n runningTime?: string;\n bgColor?: string;\n onClick?: () => void;\n}\n\nexport function CurriculumCard(props: CurriculumCardProps): React.ReactElement {\n const {\n title,\n imgTitle,\n imgSrc,\n description,\n runningTime,\n bgColor,\n onClick,\n } = props;\n return (\n <Grid\n columns={{ initial: '1', sm: '275px 1fr' }}\n gapX=\"5\"\n gapY=\"2\"\n onClick={onClick}\n style={{ cursor: 'pointer' }}\n >\n {/* 섬네일 */}\n <Box\n height=\"165px\"\n p=\"3\"\n style={{\n backgroundImage: `url(${imgSrc})`,\n backgroundColor: bgColor,\n backgroundPositionX: 'right',\n backgroundPositionY: 'bottom',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'contain',\n backgroundAttachment: 'local',\n }}\n width=\"100%\"\n >\n <Heading style={{ whiteSpace: 'break-spaces' }} variant=\"heading3\">\n {imgTitle}\n </Heading>\n </Box>\n {/* 텍스트 */}\n <Flex direction=\"column\" gap=\"3\">\n {/* 제목 */}\n <Grid columns={{ initial: '1', xs: '1fr auto' }} gapY=\"3\">\n <Heading variant=\"heading4\">{title}</Heading>\n <Badge\n size=\"medium\"\n style={{ justifySelf: 'flex-start' }}\n variant=\"outline\"\n >\n <Flex align=\"center\" gap=\"1\">\n <TimerIcon />\n {runningTime}\n </Flex>\n </Badge>\n </Grid>\n {/* 설명 */}\n <Box style={{ marginBottom: 'auto' }}>\n <ul style={{ margin: 0, paddingLeft: 20 }}>\n {description?.map((el) => {\n return (\n <li key={el} style={{ marginBottom: 8 }}>\n <Heading truncate variant=\"heading5\" weight=\"regular\">\n {el}\n </Heading>\n </li>\n );\n })}\n </ul>\n </Box>\n <Separator size=\"4\" />\n <Flex align=\"center\" gap=\"2\" justify=\"end\">\n <Typo color=\"gray\">강의 듣고 코치님과 무제한 Q&A</Typo>\n <ArrowRightIcon color=\"gray\" />\n </Flex>\n </Flex>\n </Grid>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDQ,cAcI,YAdJ;AAjCD,SAAS,eAAe,OAAgD;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS,EAAE,SAAS,KAAK,IAAI,YAAY;AAAA,MACzC,MAAK;AAAA,MACL,MAAK;AAAA,MACL;AAAA,MACA,OAAO,EAAE,QAAQ,UAAU;AAAA,MAG3B;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,QAAO;AAAA,YACP,GAAE;AAAA,YACF,OAAO;AAAA,cACL,iBAAiB,OAAO,MAAM;AAAA,cAC9B,iBAAiB;AAAA,cACjB,qBAAqB;AAAA,cACrB,qBAAqB;AAAA,cACrB,kBAAkB;AAAA,cAClB,gBAAgB;AAAA,cAChB,sBAAsB;AAAA,YACxB;AAAA,YACA,OAAM;AAAA,YAEN,8BAAC,WAAQ,OAAO,EAAE,YAAY,eAAe,GAAG,SAAQ,YACrD,oBACH;AAAA;AAAA,QACF;AAAA,QAEA,qBAAC,QAAK,WAAU,UAAS,KAAI,KAE3B;AAAA,+BAAC,QAAK,SAAS,EAAE,SAAS,KAAK,IAAI,WAAW,GAAG,MAAK,KACpD;AAAA,gCAAC,WAAQ,SAAQ,YAAY,iBAAM;AAAA,YACnC;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,OAAO,EAAE,aAAa,aAAa;AAAA,gBACnC,SAAQ;AAAA,gBAER,+BAAC,QAAK,OAAM,UAAS,KAAI,KACvB;AAAA,sCAAC,aAAU;AAAA,kBACV;AAAA,mBACH;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UAEA,oBAAC,OAAI,OAAO,EAAE,cAAc,OAAO,GACjC,8BAAC,QAAG,OAAO,EAAE,QAAQ,GAAG,aAAa,GAAG,GACrC,qDAAa,IAAI,CAAC,OAAO;AACxB,mBACE,oBAAC,QAAY,OAAO,EAAE,cAAc,EAAE,GACpC,8BAAC,WAAQ,UAAQ,MAAC,SAAQ,YAAW,QAAO,WACzC,cACH,KAHO,EAIT;AAAA,UAEJ,IACF,GACF;AAAA,UACA,oBAAC,aAAU,MAAK,KAAI;AAAA,UACpB,qBAAC,QAAK,OAAM,UAAS,KAAI,KAAI,SAAQ,OACnC;AAAA,gCAAC,QAAK,OAAM,QAAO,uFAAkB;AAAA,YACrC,oBAAC,kBAAe,OAAM,QAAO;AAAA,aAC/B;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ThemeProvider
|
|
3
|
+
} from "./chunk-BVNXAZ4W.js";
|
|
4
|
+
import {
|
|
5
|
+
Grid
|
|
6
|
+
} from "./chunk-EGEQY3KT.js";
|
|
7
|
+
import {
|
|
8
|
+
Badge
|
|
9
|
+
} from "./chunk-EWD4AO5N.js";
|
|
10
|
+
import {
|
|
11
|
+
AspectRatio
|
|
12
|
+
} from "./chunk-EAXUQEO5.js";
|
|
13
|
+
import {
|
|
14
|
+
Typo
|
|
15
|
+
} from "./chunk-52MVZ6AN.js";
|
|
16
|
+
import {
|
|
17
|
+
Heading
|
|
18
|
+
} from "./chunk-HJB3AASV.js";
|
|
19
|
+
import {
|
|
20
|
+
Box
|
|
21
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-Q5AFRGVP.js";
|
|
25
|
+
import {
|
|
26
|
+
Flex
|
|
27
|
+
} from "./chunk-25HMMI7R.js";
|
|
28
|
+
import {
|
|
29
|
+
__spreadProps,
|
|
30
|
+
__spreadValues
|
|
31
|
+
} from "./chunk-N552FDTV.js";
|
|
32
|
+
|
|
33
|
+
// src/molecules/learning-post.tsx
|
|
34
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
+
function LearningPost(props) {
|
|
36
|
+
const {
|
|
37
|
+
defaultThemeProps,
|
|
38
|
+
html,
|
|
39
|
+
tags,
|
|
40
|
+
title,
|
|
41
|
+
metaDescription,
|
|
42
|
+
imageComp,
|
|
43
|
+
onPageBack,
|
|
44
|
+
children
|
|
45
|
+
} = props;
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
ThemeProvider,
|
|
48
|
+
__spreadProps(__spreadValues({}, defaultThemeProps), {
|
|
49
|
+
accentColor: "iris",
|
|
50
|
+
scaling: "110%",
|
|
51
|
+
style: {},
|
|
52
|
+
children: html ? /* @__PURE__ */ jsxs(
|
|
53
|
+
Grid,
|
|
54
|
+
{
|
|
55
|
+
columns: { initial: "1", md: "130px 1fr 130px" },
|
|
56
|
+
gap: { initial: "2", md: "5" },
|
|
57
|
+
height: "100%",
|
|
58
|
+
justify: "center",
|
|
59
|
+
pb: "160px",
|
|
60
|
+
position: "relative",
|
|
61
|
+
px: "4",
|
|
62
|
+
width: "100%",
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx("div", {}),
|
|
65
|
+
/* @__PURE__ */ jsxs(
|
|
66
|
+
Flex,
|
|
67
|
+
{
|
|
68
|
+
align: "center",
|
|
69
|
+
direction: "column",
|
|
70
|
+
maxWidth: "880px",
|
|
71
|
+
mt: { initial: "3", md: "8" },
|
|
72
|
+
overflow: "hidden",
|
|
73
|
+
width: "100%",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ jsxs(Grid, { align: "start", columns: { initial: "1", sm: "2" }, gap: "2", children: [
|
|
76
|
+
/* @__PURE__ */ jsxs(
|
|
77
|
+
Grid,
|
|
78
|
+
{
|
|
79
|
+
gap: "3",
|
|
80
|
+
mb: { initial: "4", sm: "0" },
|
|
81
|
+
style: { alignSelf: "flex-start" },
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsx(
|
|
84
|
+
Heading,
|
|
85
|
+
{
|
|
86
|
+
style: {
|
|
87
|
+
fontSize: "2.4rem",
|
|
88
|
+
lineHeight: 1.25,
|
|
89
|
+
wordBreak: "keep-all"
|
|
90
|
+
},
|
|
91
|
+
variant: "heading1",
|
|
92
|
+
children: title
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsx(Typo, { children: metaDescription }),
|
|
96
|
+
/* @__PURE__ */ jsx(Flex, { gap: "1", wrap: "wrap", children: tags == null ? void 0 : tags.map((el) => {
|
|
97
|
+
var _a;
|
|
98
|
+
if ((_a = el.name) == null ? void 0 : _a.startsWith("filter"))
|
|
99
|
+
return;
|
|
100
|
+
return /* @__PURE__ */ jsx(Badge, { size: "large", variant: "solid", children: el.name }, el.id);
|
|
101
|
+
}) })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
AspectRatio,
|
|
107
|
+
{
|
|
108
|
+
ratio: 5 / 3,
|
|
109
|
+
style: {
|
|
110
|
+
overflow: "hidden",
|
|
111
|
+
borderRadius: "var(--radius-4)",
|
|
112
|
+
objectFit: "cover"
|
|
113
|
+
},
|
|
114
|
+
children: imageComp
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }),
|
|
118
|
+
/* @__PURE__ */ jsx(Box, { mt: "5", width: "100%", children: /* @__PURE__ */ jsx(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
className: "gh-content",
|
|
122
|
+
dangerouslySetInnerHTML: { __html: html }
|
|
123
|
+
}
|
|
124
|
+
) })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
children
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
) : /* @__PURE__ */ jsxs(
|
|
132
|
+
Flex,
|
|
133
|
+
{
|
|
134
|
+
align: "center",
|
|
135
|
+
direction: "column",
|
|
136
|
+
gap: "6",
|
|
137
|
+
height: "100%",
|
|
138
|
+
justify: "center",
|
|
139
|
+
width: "100%",
|
|
140
|
+
children: [
|
|
141
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading1", children: "\uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." }),
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
Heading,
|
|
144
|
+
{
|
|
145
|
+
align: "center",
|
|
146
|
+
color: "gray",
|
|
147
|
+
variant: "heading4",
|
|
148
|
+
weight: "regular",
|
|
149
|
+
children: `\uC694\uCCAD\uD558\uC2E0 \uCF58\uD150\uCE20\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
150
|
+
\uC7A0\uC2DC \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694.`
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ jsx(Button, { onClick: onPageBack, size: "large", children: "\uB4A4\uB85C\uAC00\uAE30" })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
})
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export {
|
|
162
|
+
LearningPost
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=chunk-WL6DTHGM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/learning-post.tsx"],"sourcesContent":["import React from 'react';\nimport type { ThemeProviderProps } from '../theme/theme-provider';\nimport { ThemeProvider } from '../theme/theme-provider';\nimport { Grid } from '../atoms/grid';\nimport { Flex } from '../atoms/flex';\nimport { Heading } from '../atoms/heading';\nimport { Typo } from '../atoms/typo';\nimport { AspectRatio } from '../atoms/aspect-ratio';\nimport { Badge } from '../atoms/badge';\nimport { Box } from '../atoms/box';\nimport { Button } from '../atoms/button';\n\ninterface Tag {\n name?: string;\n id: string;\n}\nexport interface LearningPostProps {\n defaultThemeProps?: Partial<ThemeProviderProps>;\n html?: string;\n title?: string;\n metaDescription?: string;\n /** 섬네일에 해당하는 이미지 컴포넌트 */\n imageComp?: React.ReactElement;\n tags?: Tag[];\n children?: React.ReactElement;\n onPageBack?: () => void;\n}\n\nexport function LearningPost(props: LearningPostProps): React.ReactElement {\n const {\n defaultThemeProps,\n html,\n tags,\n title,\n metaDescription,\n imageComp,\n onPageBack,\n children,\n } = props;\n return (\n <ThemeProvider\n {...defaultThemeProps}\n accentColor=\"iris\"\n scaling=\"110%\"\n style={{}}\n >\n {html ? (\n <Grid\n columns={{ initial: '1', md: '130px 1fr 130px' }}\n gap={{ initial: '2', md: '5' }}\n height=\"100%\"\n justify=\"center\"\n pb=\"160px\"\n position=\"relative\"\n px=\"4\"\n width=\"100%\"\n >\n <div />\n <Flex\n align=\"center\"\n direction=\"column\"\n maxWidth=\"880px\"\n mt={{ initial: '3', md: '8' }}\n overflow=\"hidden\"\n width=\"100%\"\n >\n <Grid align=\"start\" columns={{ initial: '1', sm: '2' }} gap=\"2\">\n <Grid\n gap=\"3\"\n mb={{ initial: '4', sm: '0' }}\n style={{ alignSelf: 'flex-start' }}\n >\n <Heading\n style={{\n fontSize: '2.4rem',\n lineHeight: 1.25,\n wordBreak: 'keep-all',\n }}\n variant=\"heading1\"\n >\n {title}\n </Heading>\n <Typo>{metaDescription}</Typo>\n <Flex gap=\"1\" wrap=\"wrap\">\n {tags?.map((el) => {\n if (el.name?.startsWith('filter')) return;\n return (\n <Badge key={el.id} size=\"large\" variant=\"solid\">\n {el.name}\n </Badge>\n );\n })}\n </Flex>\n </Grid>\n\n <AspectRatio\n ratio={5 / 3}\n style={{\n overflow: 'hidden',\n borderRadius: 'var(--radius-4)',\n objectFit: 'cover',\n }}\n >\n {imageComp}\n </AspectRatio>\n </Grid>\n\n <Box mt=\"5\" width=\"100%\">\n <div\n className=\"gh-content\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n </Box>\n </Flex>\n {children}\n </Grid>\n ) : (\n <Flex\n align=\"center\"\n direction=\"column\"\n gap=\"6\"\n height=\"100%\"\n justify=\"center\"\n width=\"100%\"\n >\n <Heading variant=\"heading1\">콘텐츠를 찾을 수 없습니다.</Heading>\n <Heading\n align=\"center\"\n color=\"gray\"\n variant=\"heading4\"\n weight=\"regular\"\n >\n {`요청하신 콘텐츠를 찾을 수 없습니다.\n 잠시 후 다시 시도해주세요.`}\n </Heading>\n <Button onClick={onPageBack} size=\"large\">\n 뒤로가기\n </Button>\n </Flex>\n )}\n </ThemeProvider>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDU,cAUI,YAVJ;AA7BH,SAAS,aAAa,OAA8C;AACzE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,SACE;AAAA,IAAC;AAAA,qCACK,oBADL;AAAA,MAEC,aAAY;AAAA,MACZ,SAAQ;AAAA,MACR,OAAO,CAAC;AAAA,MAEP,iBACC;AAAA,QAAC;AAAA;AAAA,UACC,SAAS,EAAE,SAAS,KAAK,IAAI,kBAAkB;AAAA,UAC/C,KAAK,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,UAC7B,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,IAAG;AAAA,UACH,UAAS;AAAA,UACT,IAAG;AAAA,UACH,OAAM;AAAA,UAEN;AAAA,gCAAC,SAAI;AAAA,YACL;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,UAAS;AAAA,gBACT,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,gBAC5B,UAAS;AAAA,gBACT,OAAM;AAAA,gBAEN;AAAA,uCAAC,QAAK,OAAM,SAAQ,SAAS,EAAE,SAAS,KAAK,IAAI,IAAI,GAAG,KAAI,KAC1D;AAAA;AAAA,sBAAC;AAAA;AAAA,wBACC,KAAI;AAAA,wBACJ,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,wBAC5B,OAAO,EAAE,WAAW,aAAa;AAAA,wBAEjC;AAAA;AAAA,4BAAC;AAAA;AAAA,8BACC,OAAO;AAAA,gCACL,UAAU;AAAA,gCACV,YAAY;AAAA,gCACZ,WAAW;AAAA,8BACb;AAAA,8BACA,SAAQ;AAAA,8BAEP;AAAA;AAAA,0BACH;AAAA,0BACA,oBAAC,QAAM,2BAAgB;AAAA,0BACvB,oBAAC,QAAK,KAAI,KAAI,MAAK,QAChB,uCAAM,IAAI,CAAC,OAAO;AApFrC;AAqFoB,iCAAI,QAAG,SAAH,mBAAS,WAAW;AAAW;AACnC,mCACE,oBAAC,SAAkB,MAAK,SAAQ,SAAQ,SACrC,aAAG,QADM,GAAG,EAEf;AAAA,0BAEJ,IACF;AAAA;AAAA;AAAA,oBACF;AAAA,oBAEA;AAAA,sBAAC;AAAA;AAAA,wBACC,OAAO,IAAI;AAAA,wBACX,OAAO;AAAA,0BACL,UAAU;AAAA,0BACV,cAAc;AAAA,0BACd,WAAW;AAAA,wBACb;AAAA,wBAEC;AAAA;AAAA,oBACH;AAAA,qBACF;AAAA,kBAEA,oBAAC,OAAI,IAAG,KAAI,OAAM,QAChB;AAAA,oBAAC;AAAA;AAAA,sBACC,WAAU;AAAA,sBACV,yBAAyB,EAAE,QAAQ,KAAK;AAAA;AAAA,kBAC1C,GACF;AAAA;AAAA;AAAA,YACF;AAAA,YACC;AAAA;AAAA;AAAA,MACH,IAEA;AAAA,QAAC;AAAA;AAAA,UACC,OAAM;AAAA,UACN,WAAU;AAAA,UACV,KAAI;AAAA,UACJ,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,OAAM;AAAA,UAEN;AAAA,gCAAC,WAAQ,SAAQ,YAAW,oFAAe;AAAA,YAC3C;AAAA,cAAC;AAAA;AAAA,gBACC,OAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,QAAO;AAAA,gBAEN;AAAA;AAAA;AAAA,YAEH;AAAA,YACA,oBAAC,UAAO,SAAS,YAAY,MAAK,SAAQ,sCAE1C;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToastContainer
|
|
3
|
+
} from "./chunk-CYYWMYE7.js";
|
|
4
|
+
import {
|
|
5
|
+
Separator
|
|
6
|
+
} from "./chunk-HYITAA4J.js";
|
|
7
|
+
import {
|
|
8
|
+
IconButton
|
|
9
|
+
} from "./chunk-O3DNDMV3.js";
|
|
10
|
+
import {
|
|
11
|
+
Flex
|
|
12
|
+
} from "./chunk-25HMMI7R.js";
|
|
13
|
+
import {
|
|
14
|
+
ClosePanelArrowIcon
|
|
15
|
+
} from "./chunk-UNTA4JJU.js";
|
|
16
|
+
import {
|
|
17
|
+
__objRest,
|
|
18
|
+
__spreadProps,
|
|
19
|
+
__spreadValues
|
|
20
|
+
} from "./chunk-N552FDTV.js";
|
|
21
|
+
|
|
22
|
+
// src/atoms/drawer.tsx
|
|
23
|
+
import { useEffect, useRef } from "react";
|
|
24
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
25
|
+
import { Grid, Theme } from "@radix-ui/themes";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function Root2(props) {
|
|
28
|
+
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
29
|
+
}
|
|
30
|
+
var preventDefault = (e) => {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
};
|
|
33
|
+
function Content2(props) {
|
|
34
|
+
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
35
|
+
const containerRef = useRef(null);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
containerRef.current = document.getElementsByClassName("radix-themes")[0];
|
|
38
|
+
}, []);
|
|
39
|
+
const mobileHeaderSize = 48;
|
|
40
|
+
const desktopHeaderSize = 64;
|
|
41
|
+
const separatorSize = 1;
|
|
42
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { container: containerRef.current, children: /* @__PURE__ */ jsxs(Theme, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
44
|
+
/* @__PURE__ */ jsx(ToastContainer, {}),
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Dialog.Content,
|
|
47
|
+
__spreadProps(__spreadValues({
|
|
48
|
+
className: `DrawerContent ${position} ${className || ""}`,
|
|
49
|
+
onPointerDownOutside: preventDefault
|
|
50
|
+
}, rest), {
|
|
51
|
+
children: /* @__PURE__ */ jsxs(
|
|
52
|
+
Grid,
|
|
53
|
+
{
|
|
54
|
+
height: "100%",
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
rows: {
|
|
57
|
+
initial: `${mobileHeaderSize}px ${separatorSize}px calc(100% - ${mobileHeaderSize + separatorSize}px)`,
|
|
58
|
+
sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Flex, { align: "center", px: { initial: "4", md: "6" }, children: /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { color: "gray", variant: "outline", children: /* @__PURE__ */ jsx(ClosePanelArrowIcon, {}) }) }) }),
|
|
62
|
+
/* @__PURE__ */ jsx(Separator, { orientation: "horizontal", size: "4" }),
|
|
63
|
+
children
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
)
|
|
69
|
+
] }) });
|
|
70
|
+
}
|
|
71
|
+
function Trigger2(props) {
|
|
72
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
73
|
+
}
|
|
74
|
+
var Drawer = {
|
|
75
|
+
Root: Dialog.Root,
|
|
76
|
+
Trigger: Trigger2,
|
|
77
|
+
Content: Content2,
|
|
78
|
+
Close: Dialog.Close,
|
|
79
|
+
Title: Dialog.Title,
|
|
80
|
+
Description: Dialog.Description
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
Root2 as Root,
|
|
85
|
+
Content2 as Content,
|
|
86
|
+
Trigger2 as Trigger,
|
|
87
|
+
Drawer
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=chunk-WLQ43ESH.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 { Grid, Theme } from '@radix-ui/themes';\nimport { ClosePanelArrowIcon } from '../icons/close-panel-arrow';\nimport { Flex } from './flex';\nimport { Separator } from './separator';\nimport { IconButton } from './icon-button';\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\nconst preventDefault: Dialog.DialogContentProps['onPointerDownOutside'] = (\n e\n) => {\n e.preventDefault();\n};\n\nexport function Content(props: ContentProps): React.ReactElement {\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 const mobileHeaderSize = 48;\n const desktopHeaderSize = 64;\n const separatorSize = 1;\n\n return (\n <Dialog.Portal container={containerRef.current}>\n <Theme>\n <Dialog.Overlay className=\"DrawerOverlay\" />\n <ToastContainer />\n <Dialog.Content\n className={`DrawerContent ${position} ${className || ''}`}\n onPointerDownOutside={preventDefault}\n {...rest}\n >\n <Grid\n height=\"100%\"\n overflow=\"hidden\"\n rows={{\n initial: `${mobileHeaderSize}px ${separatorSize}px calc(100% - ${mobileHeaderSize + separatorSize}px)`,\n sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`,\n }}\n >\n <Flex align=\"center\" px={{ initial: '4', md: '6' }}>\n <Dialog.Close asChild>\n <IconButton color=\"gray\" variant=\"outline\">\n <ClosePanelArrowIcon />\n </IconButton>\n </Dialog.Close>\n </Flex>\n <Separator orientation=\"horizontal\" size=\"4\" />\n {children}\n </Grid>\n </Dialog.Content>\n </Theme>\n </Dialog.Portal>\n );\n}\n\nexport function Trigger(props: Dialog.DialogTriggerProps): React.ReactElement {\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;AACxB,SAAS,MAAM,aAAa;AAQnB,cAoCC,YApCD;AADF,SAASA,MAAK,OAA4C;AAC/D,SAAO,oBAAQ,aAAP,mBAAgB,MAAO;AACjC;AAOA,IAAM,iBAAoE,CACxE,MACG;AACH,IAAE,eAAe;AACnB;AAEO,SAASC,SAAQ,OAAyC;AAC/D,QAA6D,YAArD,aAAW,SAAS,WAAW,SAzBzC,IAyB+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,QAAM,mBAAmB;AACzB,QAAM,oBAAoB;AAC1B,QAAM,gBAAgB;AAEtB,SACE,oBAAQ,eAAP,EAAc,WAAW,aAAa,SACrC,+BAAC,SACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C,oBAAC,kBAAe;AAAA,IAChB;AAAA,MAAQ;AAAA,MAAP;AAAA,QACC,WAAW,iBAAiB,QAAQ,IAAI,aAAa,EAAE;AAAA,QACvD,sBAAsB;AAAA,SAClB,OAHL;AAAA,QAKC;AAAA,UAAC;AAAA;AAAA,YACC,QAAO;AAAA,YACP,UAAS;AAAA,YACT,MAAM;AAAA,cACJ,SAAS,GAAG,gBAAgB,MAAM,aAAa,kBAAkB,mBAAmB,aAAa;AAAA,cACjG,IAAI,GAAG,iBAAiB,MAAM,aAAa,kBAAkB,oBAAoB,aAAa;AAAA,YAChG;AAAA,YAEA;AAAA,kCAAC,QAAK,OAAM,UAAS,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI,GAC/C,8BAAQ,cAAP,EAAa,SAAO,MACnB,8BAAC,cAAW,OAAM,QAAO,SAAQ,WAC/B,8BAAC,uBAAoB,GACvB,GACF,GACF;AAAA,cACA,oBAAC,aAAU,aAAY,cAAa,MAAK,KAAI;AAAA,cAC5C;AAAA;AAAA;AAAA,QACH;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;AAEO,SAASC,SAAQ,OAAsD;AAC5E,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,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Flex
|
|
3
|
+
} from "./chunk-25HMMI7R.js";
|
|
4
|
+
import {
|
|
5
|
+
Typo
|
|
6
|
+
} from "./chunk-52MVZ6AN.js";
|
|
7
|
+
import {
|
|
8
|
+
Button
|
|
9
|
+
} from "./chunk-Q5AFRGVP.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-WNEXIUQ7.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":[]}
|