@tipp/ui 1.6.30 → 1.6.32
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.map +1 -1
- package/dist/app/index.js +53 -53
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +27 -27
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +27 -27
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +38 -38
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +39 -39
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +38 -38
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +27 -27
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +38 -38
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +26 -26
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +39 -39
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +41 -41
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +30 -30
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +27 -27
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +27 -27
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +26 -26
- package/dist/atoms/auto-sizing-input.cjs.map +1 -1
- package/dist/atoms/auto-sizing-input.js +1 -1
- package/dist/atoms/badge.d.cts +1 -1
- package/dist/atoms/badge.d.ts +1 -1
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/collapse.cjs.map +1 -1
- package/dist/atoms/collapse.d.cts +1 -1
- package/dist/atoms/collapse.d.ts +1 -1
- package/dist/atoms/collapse.js +1 -1
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.d.cts +1 -1
- package/dist/atoms/drawer.d.ts +1 -1
- package/dist/atoms/drawer.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +50 -50
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.d.cts +1 -1
- package/dist/atoms/pagination.d.ts +1 -1
- package/dist/atoms/pagination.js +4 -4
- package/dist/charts/horizontal-bar-chart.cjs.map +1 -1
- package/dist/charts/horizontal-bar-chart.d.cts +1 -1
- package/dist/charts/horizontal-bar-chart.d.ts +1 -1
- package/dist/charts/horizontal-bar-chart.js +1 -1
- package/dist/charts/index.cjs.map +1 -1
- package/dist/charts/index.js +3 -3
- package/dist/chunk-2NOXG2W2.js +194 -0
- package/dist/chunk-2NOXG2W2.js.map +1 -0
- package/dist/chunk-2QSTK3Y7.js +194 -0
- package/dist/chunk-2QSTK3Y7.js.map +1 -0
- package/dist/chunk-2S7WG777.js +57 -0
- package/dist/chunk-2S7WG777.js.map +1 -0
- package/dist/chunk-3CXAT6RH.js +357 -0
- package/dist/chunk-3CXAT6RH.js.map +1 -0
- package/dist/chunk-4ARBKOGR.js +174 -0
- package/dist/chunk-4ARBKOGR.js.map +1 -0
- package/dist/chunk-4H4QYQFF.js +80 -0
- package/dist/chunk-4H4QYQFF.js.map +1 -0
- package/dist/chunk-4HZKUO4A.js +284 -0
- package/dist/chunk-4HZKUO4A.js.map +1 -0
- package/dist/chunk-4TKWXDNQ.js +180 -0
- package/dist/chunk-4TKWXDNQ.js.map +1 -0
- package/dist/chunk-4ZBD77WE.js +58 -0
- package/dist/chunk-4ZBD77WE.js.map +1 -0
- package/dist/chunk-52JHLCMQ.js +82 -0
- package/dist/chunk-52JHLCMQ.js.map +1 -0
- package/dist/chunk-5YSQLR6F.js +357 -0
- package/dist/chunk-5YSQLR6F.js.map +1 -0
- package/dist/chunk-6DZ4VE36.js +165 -0
- package/dist/chunk-6DZ4VE36.js.map +1 -0
- package/dist/chunk-6L7KJ4UK.js +174 -0
- package/dist/chunk-6L7KJ4UK.js.map +1 -0
- package/dist/chunk-7BJI7SLD.js +192 -0
- package/dist/chunk-7BJI7SLD.js.map +1 -0
- package/dist/chunk-7OMAHOKN.js +213 -0
- package/dist/chunk-7OMAHOKN.js.map +1 -0
- package/dist/chunk-AEZGO2IM.js +194 -0
- package/dist/chunk-AEZGO2IM.js.map +1 -0
- package/dist/chunk-AMJDCPWB.js +165 -0
- package/dist/chunk-AMJDCPWB.js.map +1 -0
- package/dist/chunk-AOOAWRH6.js +117 -0
- package/dist/chunk-AOOAWRH6.js.map +1 -0
- package/dist/chunk-CLTHW7V2.js +64 -0
- package/dist/chunk-CLTHW7V2.js.map +1 -0
- package/dist/chunk-DPCBR6P3.js +165 -0
- package/dist/chunk-DPCBR6P3.js.map +1 -0
- package/dist/chunk-E2X4TL7Q.js +26 -0
- package/dist/chunk-E2X4TL7Q.js.map +1 -0
- package/dist/chunk-EKDAZLCF.js +357 -0
- package/dist/chunk-EKDAZLCF.js.map +1 -0
- package/dist/chunk-FG7YGBIF.js +164 -0
- package/dist/chunk-FG7YGBIF.js.map +1 -0
- package/dist/chunk-GDK6PQPJ.js +70 -0
- package/dist/chunk-GDK6PQPJ.js.map +1 -0
- package/dist/chunk-GFP2V4TL.js +128 -0
- package/dist/chunk-GFP2V4TL.js.map +1 -0
- package/dist/chunk-GPY63QSD.js +194 -0
- package/dist/chunk-GPY63QSD.js.map +1 -0
- package/dist/chunk-GWJ6Q6TZ.js +74 -0
- package/dist/chunk-GWJ6Q6TZ.js.map +1 -0
- package/dist/chunk-GZEVDUCD.js +284 -0
- package/dist/chunk-GZEVDUCD.js.map +1 -0
- package/dist/chunk-JRQ4OLKU.js +192 -0
- package/dist/chunk-JRQ4OLKU.js.map +1 -0
- package/dist/chunk-KNK5RG7Y.js +192 -0
- package/dist/chunk-KNK5RG7Y.js.map +1 -0
- package/dist/chunk-KSS4FSJI.js +1 -0
- package/dist/chunk-KSS4FSJI.js.map +1 -0
- package/dist/chunk-L4BQZ63D.js +357 -0
- package/dist/chunk-L4BQZ63D.js.map +1 -0
- package/dist/chunk-LF2ZIBTQ.js +74 -0
- package/dist/chunk-LF2ZIBTQ.js.map +1 -0
- package/dist/chunk-M5SS2RDT.js +117 -0
- package/dist/chunk-M5SS2RDT.js.map +1 -0
- package/dist/chunk-NHPARWLK.js +194 -0
- package/dist/chunk-NHPARWLK.js.map +1 -0
- package/dist/chunk-NMCNC3JV.js +357 -0
- package/dist/chunk-NMCNC3JV.js.map +1 -0
- package/dist/chunk-NNE23OE4.js +99 -0
- package/dist/chunk-NNE23OE4.js.map +1 -0
- package/dist/chunk-NXVN7AKI.js +81 -0
- package/dist/chunk-NXVN7AKI.js.map +1 -0
- package/dist/chunk-NZLCJ725.js +192 -0
- package/dist/chunk-NZLCJ725.js.map +1 -0
- package/dist/chunk-OT6P5O5I.js +145 -0
- package/dist/chunk-OT6P5O5I.js.map +1 -0
- package/dist/chunk-PBHO6GZ3.js +30 -0
- package/dist/chunk-PBHO6GZ3.js.map +1 -0
- package/dist/chunk-PP32ABL5.js +45 -0
- package/dist/chunk-PP32ABL5.js.map +1 -0
- package/dist/chunk-PP6SOBTJ.js +128 -0
- package/dist/chunk-PP6SOBTJ.js.map +1 -0
- package/dist/chunk-PPBWRWZS.js +194 -0
- package/dist/chunk-PPBWRWZS.js.map +1 -0
- package/dist/chunk-PTARPAKT.js +192 -0
- package/dist/chunk-PTARPAKT.js.map +1 -0
- package/dist/chunk-QO6HADNE.js +91 -0
- package/dist/chunk-QO6HADNE.js.map +1 -0
- package/dist/chunk-RBWZWZQ4.js +194 -0
- package/dist/chunk-RBWZWZQ4.js.map +1 -0
- package/dist/chunk-RJTKRIDJ.js +194 -0
- package/dist/chunk-RJTKRIDJ.js.map +1 -0
- package/dist/chunk-RYOOMWGK.js +192 -0
- package/dist/chunk-RYOOMWGK.js.map +1 -0
- package/dist/chunk-SQVTAH25.js +54 -0
- package/dist/chunk-SQVTAH25.js.map +1 -0
- package/dist/chunk-THLNVRBV.js +30 -0
- package/dist/chunk-THLNVRBV.js.map +1 -0
- package/dist/chunk-TLAYZCP6.js +57 -0
- package/dist/chunk-TLAYZCP6.js.map +1 -0
- package/dist/chunk-TNYJRBQW.js +84 -0
- package/dist/chunk-TNYJRBQW.js.map +1 -0
- package/dist/chunk-TR5G6YMG.js +63 -0
- package/dist/chunk-TR5G6YMG.js.map +1 -0
- package/dist/chunk-TXCJQUKM.js +357 -0
- package/dist/chunk-TXCJQUKM.js.map +1 -0
- package/dist/chunk-U25467SQ.js +64 -0
- package/dist/chunk-U25467SQ.js.map +1 -0
- package/dist/chunk-U2YCUMSH.js +64 -0
- package/dist/chunk-U2YCUMSH.js.map +1 -0
- package/dist/chunk-UV5ZQZZJ.js +164 -0
- package/dist/chunk-UV5ZQZZJ.js.map +1 -0
- package/dist/chunk-V5SFOM4G.js +213 -0
- package/dist/chunk-V5SFOM4G.js.map +1 -0
- package/dist/chunk-WCX5NKJS.js +84 -0
- package/dist/chunk-WCX5NKJS.js.map +1 -0
- package/dist/chunk-Y7FODBWF.js +27 -0
- package/dist/chunk-Y7FODBWF.js.map +1 -0
- package/dist/chunk-YEDHMMNL.js +165 -0
- package/dist/chunk-YEDHMMNL.js.map +1 -0
- package/dist/chunk-Z4DPEN2X.js +30 -0
- package/dist/chunk-Z4DPEN2X.js.map +1 -0
- package/dist/chunk-ZHH6XNVH.js +145 -0
- package/dist/chunk-ZHH6XNVH.js.map +1 -0
- package/dist/chunk-ZLRO6VGF.js +63 -0
- package/dist/chunk-ZLRO6VGF.js.map +1 -0
- package/dist/chunk-ZMISEDZ6.js +145 -0
- package/dist/chunk-ZMISEDZ6.js.map +1 -0
- package/dist/chunk-ZWQVRMSE.js +195 -0
- package/dist/chunk-ZWQVRMSE.js.map +1 -0
- package/dist/icon.js +6 -6
- package/dist/icons/index.js +6 -6
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.js +94 -94
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +27 -27
- package/dist/molecules/date-picker/index.js +2 -2
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/expand-table/expand-table2.cjs +1402 -0
- package/dist/molecules/expand-table/expand-table2.cjs.map +1 -0
- package/dist/molecules/expand-table/expand-table2.js +79 -0
- package/dist/molecules/expand-table/expand-table2.js.map +1 -0
- package/dist/molecules/expand-table/index.cjs +1 -1
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.d.cts +3 -3
- package/dist/molecules/expand-table/index.d.ts +3 -3
- package/dist/molecules/expand-table/index.js +28 -28
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.d.cts +1 -1
- package/dist/molecules/expand-table/row.d.ts +1 -1
- package/dist/molecules/expand-table/row.js +27 -27
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +2 -2
- package/dist/molecules/index.cjs +1 -1
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +37 -37
- package/dist/molecules/learning-post.js +3 -3
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.d.cts +1 -1
- package/dist/molecules/navigation.d.ts +1 -1
- package/dist/molecules/navigation.js +27 -27
- package/dist/molecules/radio-button-card.cjs.map +1 -1
- package/dist/molecules/radio-button-card.js +27 -27
- package/dist/molecules/stepper.js +5 -5
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +27 -27
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +26 -26
- package/package.json +1 -1
- package/src/atoms/auto-sizing-input.tsx +1 -1
- package/src/atoms/collapse.tsx +1 -1
- package/src/atoms/drawer.tsx +1 -1
- package/src/atoms/pagination.tsx +1 -1
- package/src/charts/horizontal-bar-chart.tsx +1 -1
- package/src/molecules/expand-table/index.tsx +4 -4
- package/src/molecules/expand-table/row.tsx +1 -1
- package/src/molecules/navigation.tsx +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OnOfflineRadioCard
|
|
3
|
+
} from "./chunk-4ZBD77WE.js";
|
|
4
|
+
import {
|
|
5
|
+
Dialog
|
|
6
|
+
} from "./chunk-3XQUC7TK.js";
|
|
7
|
+
import {
|
|
8
|
+
Typo
|
|
9
|
+
} from "./chunk-52MVZ6AN.js";
|
|
10
|
+
import {
|
|
11
|
+
Button
|
|
12
|
+
} from "./chunk-Q5AFRGVP.js";
|
|
13
|
+
import {
|
|
14
|
+
Box
|
|
15
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
16
|
+
import {
|
|
17
|
+
Flex
|
|
18
|
+
} from "./chunk-25HMMI7R.js";
|
|
19
|
+
|
|
20
|
+
// src/app/platform/edit-service-type.tsx
|
|
21
|
+
import { useCallback, useState } from "react";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
function EditServiceType(props) {
|
|
24
|
+
const { defaultServiceType, onClickCancel } = props;
|
|
25
|
+
const [sessionType, setSessionType] = useState(
|
|
26
|
+
defaultServiceType
|
|
27
|
+
);
|
|
28
|
+
const onClickSave = useCallback(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = props.onClickSave) == null ? void 0 : _a.call(props, sessionType);
|
|
31
|
+
}, [props, sessionType]);
|
|
32
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
33
|
+
/* @__PURE__ */ jsx(
|
|
34
|
+
Typo,
|
|
35
|
+
{
|
|
36
|
+
as: "p",
|
|
37
|
+
color: "gray",
|
|
38
|
+
mb: { initial: "5", xs: "3" },
|
|
39
|
+
variant: "caption",
|
|
40
|
+
children: "\uC138\uC158 \uC720\uD615\uC5D0 \uB530\uB77C \uCC45\uC815\uB418\uB294 \uCF54\uCE6D \uAE08\uC561\uC774 \uB2EC\uB77C\uC9C0\uBBC0\uB85C, \uC815\uD655\uD558\uAC8C \uC120\uD0DD\uD574\uC8FC\uC138\uC694"
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(OnOfflineRadioCard, { onValueChange: setSessionType, value: sessionType }),
|
|
44
|
+
/* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "end", mt: { initial: "6", xs: "3" }, children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { color: "gray", onClick: onClickCancel, variant: "outline", children: "\uCDE8\uC18C\uD558\uAE30" }) }),
|
|
46
|
+
/* @__PURE__ */ jsx(Dialog.Close, { children: /* @__PURE__ */ jsx(Button, { onClick: onClickSave, children: "\uC800\uC7A5\uD558\uAE30" }) })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export {
|
|
52
|
+
EditServiceType
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-SQVTAH25.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/edit-service-type.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Box, Button, Dialog, Flex, Typo } from '@/atoms';\nimport type { ServiceType } from '@/types/biz.type';\nimport { OnOfflineRadioCard } from './on-offline-radio-card';\n\nexport interface EditServiceTypeProps {\n defaultServiceType?: ServiceType;\n onClickSave?: (serviceType: ServiceType) => void;\n onClickCancel?: () => void;\n}\n\nexport function EditServiceType(\n props: EditServiceTypeProps\n): React.ReactElement {\n const { defaultServiceType, onClickCancel } = props;\n const [sessionType, setSessionType] = useState<string | undefined>(\n defaultServiceType\n );\n\n const onClickSave = useCallback(() => {\n props.onClickSave?.(sessionType as ServiceType);\n }, [props, sessionType]);\n\n return (\n <Box>\n <Typo\n as=\"p\"\n color=\"gray\"\n mb={{ initial: '5', xs: '3' }}\n variant=\"caption\"\n >\n 세션 유형에 따라 책정되는 코칭 금액이 달라지므로, 정확하게 선택해주세요\n </Typo>\n <OnOfflineRadioCard onValueChange={setSessionType} value={sessionType} />\n <Flex gap=\"3\" justify=\"end\" mt={{ initial: '6', xs: '3' }}>\n <Dialog.Close>\n <Button color=\"gray\" onClick={onClickCancel} variant=\"outline\">\n 취소하기\n </Button>\n </Dialog.Close>\n <Dialog.Close>\n <Button onClick={onClickSave}>저장하기</Button>\n </Dialog.Close>\n </Flex>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,gBAAgB;AAyBvC,cASA,YATA;AAdC,SAAS,gBACd,OACoB;AACpB,QAAM,EAAE,oBAAoB,cAAc,IAAI;AAC9C,QAAM,CAAC,aAAa,cAAc,IAAI;AAAA,IACpC;AAAA,EACF;AAEA,QAAM,cAAc,YAAY,MAAM;AAnBxC;AAoBI,gBAAM,gBAAN,+BAAoB;AAAA,EACtB,GAAG,CAAC,OAAO,WAAW,CAAC;AAEvB,SACE,qBAAC,OACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH,OAAM;AAAA,QACN,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI;AAAA,QAC5B,SAAQ;AAAA,QACT;AAAA;AAAA,IAED;AAAA,IACA,oBAAC,sBAAmB,eAAe,gBAAgB,OAAO,aAAa;AAAA,IACvE,qBAAC,QAAK,KAAI,KAAI,SAAQ,OAAM,IAAI,EAAE,SAAS,KAAK,IAAI,IAAI,GACtD;AAAA,0BAAC,OAAO,OAAP,EACC,8BAAC,UAAO,OAAM,QAAO,SAAS,eAAe,SAAQ,WAAU,sCAE/D,GACF;AAAA,MACA,oBAAC,OAAO,OAAP,EACC,8BAAC,UAAO,SAAS,aAAa,sCAAI,GACpC;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CoachingCustomerInfoLarge
|
|
3
|
+
} from "./chunk-U25467SQ.js";
|
|
4
|
+
import {
|
|
5
|
+
CoachingCustomerInfoMedium
|
|
6
|
+
} from "./chunk-LF2ZIBTQ.js";
|
|
7
|
+
import {
|
|
8
|
+
CoachingCustomerInfoSmall
|
|
9
|
+
} from "./chunk-ON6X4DAK.js";
|
|
10
|
+
import {
|
|
11
|
+
Box
|
|
12
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
13
|
+
import {
|
|
14
|
+
__spreadValues
|
|
15
|
+
} from "./chunk-N552FDTV.js";
|
|
16
|
+
|
|
17
|
+
// src/app/platform/userInfos/coaching-customer-info/index.tsx
|
|
18
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
function CoachingCustomerInfo(props) {
|
|
20
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "block", sm: "none", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoSmall, __spreadValues({}, props)) }),
|
|
22
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "block", md: "none" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoMedium, __spreadValues({}, props)) }),
|
|
23
|
+
/* @__PURE__ */ jsx(Box, { display: { initial: "none", sm: "none", md: "block" }, children: /* @__PURE__ */ jsx(CoachingCustomerInfoLarge, __spreadValues({}, props)) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
CoachingCustomerInfo
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=chunk-THLNVRBV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/index.tsx"],"sourcesContent":["import React from 'react';\nimport { Box } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\nimport { CoachingCustomerInfoSmall } from './small';\nimport { CoachingCustomerInfoMedium } from './medium';\nimport { CoachingCustomerInfoLarge } from './large';\n\nexport {\n CoachingCustomerInfoLarge,\n CoachingCustomerInfoMedium,\n CoachingCustomerInfoSmall,\n};\n\nexport { type CoachingCustomerInfoProps };\n\nexport function CoachingCustomerInfo(\n props: CoachingCustomerInfoProps\n): React.ReactElement {\n return (\n <>\n <Box display={{ initial: 'block', sm: 'none', md: 'none' }}>\n <CoachingCustomerInfoSmall {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'block', md: 'none' }}>\n <CoachingCustomerInfoMedium {...props} />\n </Box>\n <Box display={{ initial: 'none', sm: 'none', md: 'block' }}>\n <CoachingCustomerInfoLarge {...props} />\n </Box>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAmBI,mBAEI,KAFJ;AAJG,SAAS,qBACd,OACoB;AACpB,SACE,iCACE;AAAA,wBAAC,OAAI,SAAS,EAAE,SAAS,SAAS,IAAI,QAAQ,IAAI,OAAO,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,SAAS,IAAI,OAAO,GACvD,8BAAC,+CAA+B,MAAO,GACzC;AAAA,IACA,oBAAC,OAAI,SAAS,EAAE,SAAS,QAAQ,IAAI,QAAQ,IAAI,QAAQ,GACvD,8BAAC,8CAA8B,MAAO,GACxC;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
infoList,
|
|
3
|
+
renderDataListItem,
|
|
4
|
+
sessionList
|
|
5
|
+
} from "./chunk-QUHTO7MY.js";
|
|
6
|
+
import {
|
|
7
|
+
Heading
|
|
8
|
+
} from "./chunk-HJB3AASV.js";
|
|
9
|
+
import {
|
|
10
|
+
Separator
|
|
11
|
+
} from "./chunk-HYITAA4J.js";
|
|
12
|
+
import {
|
|
13
|
+
Grid
|
|
14
|
+
} from "./chunk-EGEQY3KT.js";
|
|
15
|
+
import {
|
|
16
|
+
DataList
|
|
17
|
+
} from "./chunk-VTJZMOSP.js";
|
|
18
|
+
import {
|
|
19
|
+
Box
|
|
20
|
+
} from "./chunk-4Y5BEXVN.js";
|
|
21
|
+
import {
|
|
22
|
+
Flex
|
|
23
|
+
} from "./chunk-25HMMI7R.js";
|
|
24
|
+
|
|
25
|
+
// src/app/platform/userInfos/session-user-info-detail.tsx
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
function SectionWrapper({
|
|
28
|
+
title,
|
|
29
|
+
children
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
32
|
+
/* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto 1fr", gap: "3", mb: "5", children: [
|
|
33
|
+
/* @__PURE__ */ jsx(Heading, { variant: "heading5", children: title }),
|
|
34
|
+
/* @__PURE__ */ jsx(Separator, { size: "4" })
|
|
35
|
+
] }),
|
|
36
|
+
children
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
function SessionUserInfoDetail({
|
|
40
|
+
customer,
|
|
41
|
+
session,
|
|
42
|
+
onClickCopy
|
|
43
|
+
}) {
|
|
44
|
+
return /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "6", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(SectionWrapper, { title: "\uC138\uC158 \uC815\uBCF4", children: /* @__PURE__ */ jsx(DataList.Root, { children: sessionList.map(
|
|
46
|
+
(info) => renderDataListItem({ info, data: session, onClickCopy })
|
|
47
|
+
) }) }),
|
|
48
|
+
/* @__PURE__ */ jsx(SectionWrapper, { title: "\uD68C\uC6D0 \uC815\uBCF4", children: /* @__PURE__ */ jsx(DataList.Root, { children: infoList.map(
|
|
49
|
+
(info) => renderDataListItem({ info, data: customer, onClickCopy })
|
|
50
|
+
) }) })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
SessionUserInfoDetail
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=chunk-TLAYZCP6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/userInfos/session-user-info-detail.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, DataList, Flex, Grid, Heading, Separator } from '../../../atoms';\nimport type { Customer, Session } from './utils';\nimport { infoList, renderDataListItem, sessionList } from './utils';\n\nexport interface SessionUserInfoDetailProps {\n customer: Customer;\n session: Session;\n onClickCopy: (value: string) => void;\n}\n\nfunction SectionWrapper({\n title,\n children,\n}: {\n title: string;\n children: React.ReactElement;\n}): JSX.Element {\n return (\n <Box>\n <Grid align=\"center\" columns=\"auto 1fr\" gap=\"3\" mb=\"5\">\n <Heading variant=\"heading5\">{title}</Heading>\n\n <Separator size=\"4\" />\n </Grid>\n {children}\n </Box>\n );\n}\n\nexport function SessionUserInfoDetail({\n customer,\n session,\n onClickCopy,\n}: SessionUserInfoDetailProps): React.ReactElement {\n return (\n <Flex direction=\"column\" gap=\"6\">\n <SectionWrapper title=\"세션 정보\">\n <DataList.Root>\n {sessionList.map((info) =>\n renderDataListItem({ info, data: session, onClickCopy })\n )}\n </DataList.Root>\n </SectionWrapper>\n\n <SectionWrapper title=\"회원 정보\">\n <DataList.Root>\n {infoList.map((info) =>\n renderDataListItem({ info, data: customer, onClickCopy })\n )}\n </DataList.Root>\n </SectionWrapper>\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoBM,SACE,KADF;AATN,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AACF,GAGgB;AACd,SACE,qBAAC,OACC;AAAA,yBAAC,QAAK,OAAM,UAAS,SAAQ,YAAW,KAAI,KAAI,IAAG,KACjD;AAAA,0BAAC,WAAQ,SAAQ,YAAY,iBAAM;AAAA,MAEnC,oBAAC,aAAU,MAAK,KAAI;AAAA,OACtB;AAAA,IACC;AAAA,KACH;AAEJ;AAEO,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AACF,GAAmD;AACjD,SACE,qBAAC,QAAK,WAAU,UAAS,KAAI,KAC3B;AAAA,wBAAC,kBAAe,OAAM,6BACpB,8BAAC,SAAS,MAAT,EACE,sBAAY;AAAA,MAAI,CAAC,SAChB,mBAAmB,EAAE,MAAM,MAAM,SAAS,YAAY,CAAC;AAAA,IACzD,GACF,GACF;AAAA,IAEA,oBAAC,kBAAe,OAAM,6BACpB,8BAAC,SAAS,MAAT,EACE,mBAAS;AAAA,MAAI,CAAC,SACb,mBAAmB,EAAE,MAAM,MAAM,UAAU,YAAY,CAAC;AAAA,IAC1D,GACF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ClosePanelArrowIcon
|
|
3
|
+
} from "./chunk-UNTA4JJU.js";
|
|
4
|
+
import {
|
|
5
|
+
Separator
|
|
6
|
+
} from "./chunk-HYITAA4J.js";
|
|
7
|
+
import {
|
|
8
|
+
usePortalContainer
|
|
9
|
+
} from "./chunk-TD45ZF7D.js";
|
|
10
|
+
import {
|
|
11
|
+
IconButton
|
|
12
|
+
} from "./chunk-O3DNDMV3.js";
|
|
13
|
+
import {
|
|
14
|
+
Flex
|
|
15
|
+
} from "./chunk-25HMMI7R.js";
|
|
16
|
+
import {
|
|
17
|
+
__objRest,
|
|
18
|
+
__spreadProps,
|
|
19
|
+
__spreadValues
|
|
20
|
+
} from "./chunk-N552FDTV.js";
|
|
21
|
+
|
|
22
|
+
// src/atoms/drawer.tsx
|
|
23
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
|
24
|
+
import { Grid, Theme } from "@radix-ui/themes";
|
|
25
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
|
+
function Root2(props) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Dialog.Root, __spreadValues({}, props));
|
|
28
|
+
}
|
|
29
|
+
var preventDefault = (e) => {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
};
|
|
32
|
+
function Content2(props) {
|
|
33
|
+
const _a = props, { position = "right", className, children } = _a, rest = __objRest(_a, ["position", "className", "children"]);
|
|
34
|
+
const mobileHeaderSize = 48;
|
|
35
|
+
const desktopHeaderSize = 64;
|
|
36
|
+
const separatorSize = 1;
|
|
37
|
+
const { drawerContainerRef } = usePortalContainer();
|
|
38
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { container: drawerContainerRef.current, children: /* @__PURE__ */ jsxs(Theme, { children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Dialog.Overlay, { className: "DrawerOverlay" }),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
Dialog.Content,
|
|
42
|
+
__spreadProps(__spreadValues({
|
|
43
|
+
className: `DrawerContent ${position} ${className || ""}`,
|
|
44
|
+
onPointerDownOutside: preventDefault
|
|
45
|
+
}, rest), {
|
|
46
|
+
children: /* @__PURE__ */ jsxs(
|
|
47
|
+
Grid,
|
|
48
|
+
{
|
|
49
|
+
height: "100%",
|
|
50
|
+
overflow: "hidden",
|
|
51
|
+
rows: {
|
|
52
|
+
initial: `${mobileHeaderSize}px ${separatorSize}px calc(100% - ${mobileHeaderSize + separatorSize}px)`,
|
|
53
|
+
sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/* @__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, {}) }) }) }),
|
|
57
|
+
/* @__PURE__ */ jsx(Separator, { orientation: "horizontal", size: "4" }),
|
|
58
|
+
children
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
})
|
|
63
|
+
)
|
|
64
|
+
] }) });
|
|
65
|
+
}
|
|
66
|
+
function Trigger2(props) {
|
|
67
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, __spreadValues({ asChild: true }, props));
|
|
68
|
+
}
|
|
69
|
+
var Drawer = {
|
|
70
|
+
Root: Dialog.Root,
|
|
71
|
+
Trigger: Trigger2,
|
|
72
|
+
Content: Content2,
|
|
73
|
+
Close: Dialog.Close,
|
|
74
|
+
Title: Dialog.Title,
|
|
75
|
+
Description: Dialog.Description
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
Root2 as Root,
|
|
80
|
+
Content2 as Content,
|
|
81
|
+
Trigger2 as Trigger,
|
|
82
|
+
Drawer
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=chunk-TNYJRBQW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/atoms/drawer.tsx"],"sourcesContent":["import React from 'react';\nimport * as Dialog from '@radix-ui/react-dialog';\nimport { Grid, Theme } from '@radix-ui/themes';\nimport { usePortalContainer } from '@/theme/portal-provider';\nimport { ClosePanelArrowIcon } from '../icons/close-panel-arrow';\nimport { Flex } from './flex';\nimport { Separator } from './separator';\nimport { IconButton } from './icon-button';\n\nexport function Root(props: Dialog.DialogProps): React.ReactElement {\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 mobileHeaderSize = 48;\n const desktopHeaderSize = 64;\n const separatorSize = 1;\n const { drawerContainerRef } = usePortalContainer();\n\n return (\n <Dialog.Portal container={drawerContainerRef.current}>\n <Theme>\n <Dialog.Overlay className=\"DrawerOverlay\" />\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":";;;;;;;;;;;;;;;;;;;;;;AACA,YAAY,YAAY;AACxB,SAAS,MAAM,aAAa;AAQnB,cA+BC,YA/BD;AADF,SAASA,MAAK,OAA+C;AAClE,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,mBAAmB;AACzB,QAAM,oBAAoB;AAC1B,QAAM,gBAAgB;AACtB,QAAM,EAAE,mBAAmB,IAAI,mBAAmB;AAElD,SACE,oBAAQ,eAAP,EAAc,WAAW,mBAAmB,SAC3C,+BAAC,SACC;AAAA,wBAAQ,gBAAP,EAAe,WAAU,iBAAgB;AAAA,IAC1C;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-TR5G6YMG.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.ReactElement {\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,GAAwC;AACtC,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,357 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Popover
|
|
3
|
+
} from "./chunk-5AVBYDPB.js";
|
|
4
|
+
import {
|
|
5
|
+
ScrollArea
|
|
6
|
+
} from "./chunk-MUPK4L3U.js";
|
|
7
|
+
import {
|
|
8
|
+
Grid
|
|
9
|
+
} from "./chunk-EGEQY3KT.js";
|
|
10
|
+
import {
|
|
11
|
+
AutoSizingInput
|
|
12
|
+
} from "./chunk-77UKVVEP.js";
|
|
13
|
+
import {
|
|
14
|
+
Badge
|
|
15
|
+
} from "./chunk-EWD4AO5N.js";
|
|
16
|
+
import {
|
|
17
|
+
Typo
|
|
18
|
+
} from "./chunk-52MVZ6AN.js";
|
|
19
|
+
import {
|
|
20
|
+
Flex
|
|
21
|
+
} from "./chunk-25HMMI7R.js";
|
|
22
|
+
import {
|
|
23
|
+
Button
|
|
24
|
+
} from "./chunk-Q5AFRGVP.js";
|
|
25
|
+
import {
|
|
26
|
+
CheckIcon
|
|
27
|
+
} from "./chunk-HLFG5ZTU.js";
|
|
28
|
+
|
|
29
|
+
// src/molecules/tag-selector.tsx
|
|
30
|
+
import {
|
|
31
|
+
useCallback,
|
|
32
|
+
useEffect,
|
|
33
|
+
useMemo,
|
|
34
|
+
useRef,
|
|
35
|
+
useState
|
|
36
|
+
} from "react";
|
|
37
|
+
import {
|
|
38
|
+
ChevronRightIcon,
|
|
39
|
+
Cross1Icon,
|
|
40
|
+
MagnifyingGlassIcon
|
|
41
|
+
} from "@radix-ui/react-icons";
|
|
42
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
43
|
+
var OPTION_HEIGHT = 32;
|
|
44
|
+
var DefaultDropdownContainer = (props) => {
|
|
45
|
+
return props.children;
|
|
46
|
+
};
|
|
47
|
+
function TagSelector(props) {
|
|
48
|
+
const {
|
|
49
|
+
options = [],
|
|
50
|
+
tagRender,
|
|
51
|
+
placeholder,
|
|
52
|
+
maxCount = 0,
|
|
53
|
+
DropdownContainer = DefaultDropdownContainer,
|
|
54
|
+
size = "medium",
|
|
55
|
+
readOnly,
|
|
56
|
+
error,
|
|
57
|
+
open: propsOpen,
|
|
58
|
+
dropdownItemRender
|
|
59
|
+
} = props;
|
|
60
|
+
const [_selected, _setSelected] = useState(props.selected || []);
|
|
61
|
+
const selected = props.selected || _selected;
|
|
62
|
+
const setSelected = props.onChange || _setSelected;
|
|
63
|
+
const [value, setValue] = useState("");
|
|
64
|
+
const [focusIndex, setFocusIndex] = useState(null);
|
|
65
|
+
const [open, setOpen] = useState(false);
|
|
66
|
+
const [focus, setFocus] = useState(false);
|
|
67
|
+
const fieldRef = useRef(null);
|
|
68
|
+
const scrollRef = useRef(null);
|
|
69
|
+
const closeRef = useRef();
|
|
70
|
+
const onFocus = useCallback(() => {
|
|
71
|
+
clearTimeout(closeRef.current);
|
|
72
|
+
setFocus(true);
|
|
73
|
+
setOpen(true);
|
|
74
|
+
}, []);
|
|
75
|
+
const onBlur = useCallback(() => {
|
|
76
|
+
closeRef.current = setTimeout(() => {
|
|
77
|
+
setFocus(false);
|
|
78
|
+
setOpen(false);
|
|
79
|
+
setTimeout(() => {
|
|
80
|
+
setValue("");
|
|
81
|
+
}, 100);
|
|
82
|
+
}, 300);
|
|
83
|
+
}, []);
|
|
84
|
+
const onChangeValue = useCallback(
|
|
85
|
+
(e) => {
|
|
86
|
+
setValue(e.target.value);
|
|
87
|
+
},
|
|
88
|
+
[]
|
|
89
|
+
);
|
|
90
|
+
const filteredOptions = useMemo(() => {
|
|
91
|
+
return options.filter((option) => {
|
|
92
|
+
return option.name.includes(value);
|
|
93
|
+
});
|
|
94
|
+
}, [options, value]);
|
|
95
|
+
const selectedItem = useMemo(() => {
|
|
96
|
+
const result = [];
|
|
97
|
+
selected.forEach((id) => {
|
|
98
|
+
const maybeItem = options.find((option) => option.id === id);
|
|
99
|
+
if (maybeItem)
|
|
100
|
+
result.push(maybeItem);
|
|
101
|
+
});
|
|
102
|
+
return result;
|
|
103
|
+
}, [options, selected]);
|
|
104
|
+
const onDelete = useCallback(
|
|
105
|
+
(id) => {
|
|
106
|
+
setSelected(selected.filter((el) => el !== id));
|
|
107
|
+
},
|
|
108
|
+
[selected, setSelected]
|
|
109
|
+
);
|
|
110
|
+
const onSelect = useCallback(
|
|
111
|
+
(id) => {
|
|
112
|
+
if (maxCount && selected.length + 1 > maxCount)
|
|
113
|
+
return;
|
|
114
|
+
setSelected([...selected, id]);
|
|
115
|
+
},
|
|
116
|
+
[maxCount, selected, setSelected]
|
|
117
|
+
);
|
|
118
|
+
const toggleItem = useCallback(
|
|
119
|
+
(id) => {
|
|
120
|
+
if (selected.includes(id)) {
|
|
121
|
+
onDelete(id);
|
|
122
|
+
} else {
|
|
123
|
+
onSelect(id);
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
[onDelete, onSelect, selected]
|
|
127
|
+
);
|
|
128
|
+
const setScroll = useCallback((index) => {
|
|
129
|
+
if (scrollRef.current) {
|
|
130
|
+
const scrollTop = scrollRef.current.scrollTop;
|
|
131
|
+
const clientHeight = scrollRef.current.clientHeight;
|
|
132
|
+
const focusTop = index * OPTION_HEIGHT;
|
|
133
|
+
if (focusTop < scrollTop) {
|
|
134
|
+
scrollRef.current.scrollTop = focusTop;
|
|
135
|
+
} else if (focusTop + OPTION_HEIGHT > scrollTop + clientHeight) {
|
|
136
|
+
scrollRef.current.scrollTop = focusTop + OPTION_HEIGHT - clientHeight;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, []);
|
|
140
|
+
const handleKeyDown = useCallback(
|
|
141
|
+
(e) => {
|
|
142
|
+
var _a;
|
|
143
|
+
const key = e.key;
|
|
144
|
+
switch (key) {
|
|
145
|
+
case "ArrowDown": {
|
|
146
|
+
e.preventDefault();
|
|
147
|
+
let newFocus = 0;
|
|
148
|
+
if (typeof focusIndex === "number") {
|
|
149
|
+
newFocus = focusIndex + 1 >= options.length ? 0 : focusIndex + 1;
|
|
150
|
+
}
|
|
151
|
+
setFocusIndex(newFocus);
|
|
152
|
+
setScroll(newFocus);
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case "ArrowUp": {
|
|
156
|
+
e.preventDefault();
|
|
157
|
+
let newFocus = 0;
|
|
158
|
+
if (typeof focusIndex === "number") {
|
|
159
|
+
newFocus = focusIndex - 1 < 0 ? options.length - 1 : focusIndex - 1;
|
|
160
|
+
}
|
|
161
|
+
setFocusIndex(newFocus);
|
|
162
|
+
setScroll(newFocus);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
case "Enter":
|
|
166
|
+
setValue("");
|
|
167
|
+
if (focusIndex !== null) {
|
|
168
|
+
toggleItem((_a = filteredOptions[focusIndex]) == null ? void 0 : _a.id);
|
|
169
|
+
}
|
|
170
|
+
break;
|
|
171
|
+
case "Backspace":
|
|
172
|
+
if (value.length === 0) {
|
|
173
|
+
setSelected(selected.slice(0, -1));
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
case "Escape":
|
|
177
|
+
setOpen(false);
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
[
|
|
182
|
+
focusIndex,
|
|
183
|
+
value.length,
|
|
184
|
+
setScroll,
|
|
185
|
+
options.length,
|
|
186
|
+
toggleItem,
|
|
187
|
+
filteredOptions,
|
|
188
|
+
setSelected,
|
|
189
|
+
selected
|
|
190
|
+
]
|
|
191
|
+
);
|
|
192
|
+
const placeholderVisible = useMemo(() => {
|
|
193
|
+
if (selectedItem.length)
|
|
194
|
+
return false;
|
|
195
|
+
if (value)
|
|
196
|
+
return false;
|
|
197
|
+
if (focus)
|
|
198
|
+
return false;
|
|
199
|
+
return true;
|
|
200
|
+
}, [focus, selectedItem.length, value]);
|
|
201
|
+
useEffect(() => {
|
|
202
|
+
setFocusIndex(null);
|
|
203
|
+
}, [open]);
|
|
204
|
+
useEffect(() => {
|
|
205
|
+
setFocusIndex(0);
|
|
206
|
+
}, [filteredOptions]);
|
|
207
|
+
const badgeSize = useMemo(() => {
|
|
208
|
+
switch (size) {
|
|
209
|
+
case "large":
|
|
210
|
+
return "large";
|
|
211
|
+
case "medium":
|
|
212
|
+
case "small":
|
|
213
|
+
default:
|
|
214
|
+
return "small";
|
|
215
|
+
}
|
|
216
|
+
}, [size]);
|
|
217
|
+
const placeholderVariant = useMemo(() => {
|
|
218
|
+
switch (size) {
|
|
219
|
+
case "large":
|
|
220
|
+
return "subtitle";
|
|
221
|
+
case "medium":
|
|
222
|
+
default:
|
|
223
|
+
return "body";
|
|
224
|
+
}
|
|
225
|
+
}, [size]);
|
|
226
|
+
const focusClassName = focus ? " focused" : "";
|
|
227
|
+
const readOnlyClassName = readOnly ? " read-only" : "";
|
|
228
|
+
const errorClassName = error ? " error" : "";
|
|
229
|
+
const readonlyContent = /* @__PURE__ */ jsx(Flex, { gap: "1", children: selectedItem.map((item) => {
|
|
230
|
+
return tagRender ? tagRender(item) : /* @__PURE__ */ jsx(Badge, { size: badgeSize, children: item.name }, item.id);
|
|
231
|
+
}) });
|
|
232
|
+
const editContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
233
|
+
/* @__PURE__ */ jsxs(
|
|
234
|
+
Flex,
|
|
235
|
+
{
|
|
236
|
+
align: "center",
|
|
237
|
+
gap: "1",
|
|
238
|
+
maxWidth: "100%",
|
|
239
|
+
overflow: "hidden",
|
|
240
|
+
wrap: "wrap",
|
|
241
|
+
children: [
|
|
242
|
+
selectedItem.map((item) => {
|
|
243
|
+
return tagRender ? tagRender(item, () => {
|
|
244
|
+
onDelete(item.id);
|
|
245
|
+
}) : /* @__PURE__ */ jsxs(Badge, { size: badgeSize, children: [
|
|
246
|
+
item.name,
|
|
247
|
+
/* @__PURE__ */ jsx(
|
|
248
|
+
Button,
|
|
249
|
+
{
|
|
250
|
+
onClick: () => {
|
|
251
|
+
onDelete(item.id);
|
|
252
|
+
},
|
|
253
|
+
variant: "transparent",
|
|
254
|
+
children: /* @__PURE__ */ jsx(Cross1Icon, {})
|
|
255
|
+
}
|
|
256
|
+
)
|
|
257
|
+
] }, item.id);
|
|
258
|
+
}),
|
|
259
|
+
placeholderVisible ? /* @__PURE__ */ jsx(Typo, { color: "gray", variant: placeholderVariant, children: placeholder }) : null,
|
|
260
|
+
/* @__PURE__ */ jsx(
|
|
261
|
+
AutoSizingInput,
|
|
262
|
+
{
|
|
263
|
+
onBlur,
|
|
264
|
+
onChange: onChangeValue,
|
|
265
|
+
onFocus,
|
|
266
|
+
onKeyDown: handleKeyDown,
|
|
267
|
+
ref: fieldRef,
|
|
268
|
+
value
|
|
269
|
+
}
|
|
270
|
+
)
|
|
271
|
+
]
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
focus ? /* @__PURE__ */ jsx(MagnifyingGlassIcon, {}) : /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
275
|
+
] });
|
|
276
|
+
return /* @__PURE__ */ jsxs(Popover.Root, { open: Boolean(filteredOptions.length) && propsOpen || open, children: [
|
|
277
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { style: { position: "relative" }, children: /* @__PURE__ */ jsx(
|
|
278
|
+
Grid,
|
|
279
|
+
{
|
|
280
|
+
align: "center",
|
|
281
|
+
className: `tag-selector ${size} ${focusClassName}${readOnlyClassName}${errorClassName}`,
|
|
282
|
+
columns: "1fr auto",
|
|
283
|
+
gap: "1",
|
|
284
|
+
onClick: () => {
|
|
285
|
+
var _a;
|
|
286
|
+
return !readOnly && ((_a = fieldRef.current) == null ? void 0 : _a.focus());
|
|
287
|
+
},
|
|
288
|
+
children: readOnly ? readonlyContent : editContent
|
|
289
|
+
}
|
|
290
|
+
) }),
|
|
291
|
+
/* @__PURE__ */ jsx(
|
|
292
|
+
Popover.Content,
|
|
293
|
+
{
|
|
294
|
+
onOpenAutoFocus: preventDefault,
|
|
295
|
+
onTouchMove: stopPropagationTouch,
|
|
296
|
+
onWheel: stopPropagationWheel,
|
|
297
|
+
sticky: "always",
|
|
298
|
+
children: /* @__PURE__ */ jsx(
|
|
299
|
+
DropdownContainer,
|
|
300
|
+
{
|
|
301
|
+
currentItem: filteredOptions[focusIndex || 0],
|
|
302
|
+
items: filteredOptions,
|
|
303
|
+
children: /* @__PURE__ */ jsx(
|
|
304
|
+
ScrollArea,
|
|
305
|
+
{
|
|
306
|
+
ref: scrollRef,
|
|
307
|
+
scrollbars: "vertical",
|
|
308
|
+
style: { height: OPTION_HEIGHT * 8 },
|
|
309
|
+
type: "auto",
|
|
310
|
+
children: /* @__PURE__ */ jsx(Flex, { direction: "column", children: filteredOptions.map((item, i) => {
|
|
311
|
+
const isSelected = Boolean(
|
|
312
|
+
selected.find((el) => el === item.id)
|
|
313
|
+
);
|
|
314
|
+
const isFocus = i === focusIndex;
|
|
315
|
+
return /* @__PURE__ */ jsx(
|
|
316
|
+
Button,
|
|
317
|
+
{
|
|
318
|
+
className: `tag-selector-button ${isFocus ? "focused" : ""}`,
|
|
319
|
+
onClick: () => {
|
|
320
|
+
var _a;
|
|
321
|
+
toggleItem(item.id);
|
|
322
|
+
(_a = fieldRef.current) == null ? void 0 : _a.focus();
|
|
323
|
+
},
|
|
324
|
+
onMouseEnter: () => {
|
|
325
|
+
setFocusIndex(i);
|
|
326
|
+
},
|
|
327
|
+
variant: isSelected ? "soft" : "outline",
|
|
328
|
+
children: /* @__PURE__ */ jsxs(Flex, { justify: "between", width: "100%", children: [
|
|
329
|
+
dropdownItemRender ? dropdownItemRender(item) : item.name,
|
|
330
|
+
isSelected ? /* @__PURE__ */ jsx(CheckIcon, {}) : null
|
|
331
|
+
] })
|
|
332
|
+
},
|
|
333
|
+
item.id
|
|
334
|
+
);
|
|
335
|
+
}) })
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
}
|
|
341
|
+
)
|
|
342
|
+
] });
|
|
343
|
+
}
|
|
344
|
+
var stopPropagationTouch = (e) => {
|
|
345
|
+
e.stopPropagation();
|
|
346
|
+
};
|
|
347
|
+
var stopPropagationWheel = (e) => {
|
|
348
|
+
e.stopPropagation();
|
|
349
|
+
};
|
|
350
|
+
var preventDefault = (e) => {
|
|
351
|
+
e.preventDefault();
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
export {
|
|
355
|
+
TagSelector
|
|
356
|
+
};
|
|
357
|
+
//# sourceMappingURL=chunk-TXCJQUKM.js.map
|