@tipp/ui 1.5.7 → 1.5.8

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.
Files changed (79) hide show
  1. package/dist/app/index.cjs +1 -1
  2. package/dist/app/index.cjs.map +1 -1
  3. package/dist/app/index.js +39 -39
  4. package/dist/app/platform/coach-question-list.js +26 -26
  5. package/dist/app/platform/edit-coaching-time.js +28 -28
  6. package/dist/app/platform/edit-service-type.js +28 -28
  7. package/dist/app/platform/goal-manage-card-edit.js +29 -29
  8. package/dist/app/platform/goal-manage-card-read.js +26 -26
  9. package/dist/app/platform/on-offline-radio-card.js +28 -28
  10. package/dist/app/platform/report-card.js +26 -26
  11. package/dist/app/platform/reservation-card.js +29 -29
  12. package/dist/app/platform/session-card.js +29 -29
  13. package/dist/app/platform/session-review-simple-read.js +26 -26
  14. package/dist/app/platform/userInfos/coaching-customer-info/index.cjs +1 -1
  15. package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
  16. package/dist/app/platform/userInfos/coaching-customer-info/index.js +29 -29
  17. package/dist/app/platform/userInfos/coaching-customer-info/large.js +26 -26
  18. package/dist/app/platform/userInfos/coaching-customer-info/medium.js +26 -26
  19. package/dist/app/platform/userInfos/coaching-customer-info/small.cjs +1 -1
  20. package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
  21. package/dist/app/platform/userInfos/coaching-customer-info/small.js +26 -26
  22. package/dist/app/platform/userInfos/session-user-info-detail.js +25 -25
  23. package/dist/app/platform/userInfos/utils.js +25 -25
  24. package/dist/atoms/index.js +64 -64
  25. package/dist/chunk-3BIESZCA.js +59 -0
  26. package/dist/chunk-3BIESZCA.js.map +1 -0
  27. package/dist/chunk-3LP4EQXB.js +243 -0
  28. package/dist/chunk-3LP4EQXB.js.map +1 -0
  29. package/dist/chunk-5ITTKDJS.js +145 -0
  30. package/dist/chunk-5ITTKDJS.js.map +1 -0
  31. package/dist/chunk-6POW72FZ.js +176 -0
  32. package/dist/chunk-6POW72FZ.js.map +1 -0
  33. package/dist/chunk-7B53ZFJ4.js +30 -0
  34. package/dist/chunk-7B53ZFJ4.js.map +1 -0
  35. package/dist/chunk-7OPEKI24.js +30 -0
  36. package/dist/chunk-7OPEKI24.js.map +1 -0
  37. package/dist/chunk-ADAAUSOW.js +59 -0
  38. package/dist/chunk-ADAAUSOW.js.map +1 -0
  39. package/dist/chunk-CAUI37PO.js +145 -0
  40. package/dist/chunk-CAUI37PO.js.map +1 -0
  41. package/dist/chunk-HZWC2D42.js +57 -0
  42. package/dist/chunk-HZWC2D42.js.map +1 -0
  43. package/dist/chunk-LQIM6OYL.js +163 -0
  44. package/dist/chunk-LQIM6OYL.js.map +1 -0
  45. package/dist/chunk-MVM2SUG6.js +59 -0
  46. package/dist/chunk-MVM2SUG6.js.map +1 -0
  47. package/dist/chunk-PXMZ2IX2.js +145 -0
  48. package/dist/chunk-PXMZ2IX2.js.map +1 -0
  49. package/dist/chunk-Q3Y3VR33.js +60 -0
  50. package/dist/chunk-Q3Y3VR33.js.map +1 -0
  51. package/dist/chunk-QFCBTWC2.js +145 -0
  52. package/dist/chunk-QFCBTWC2.js.map +1 -0
  53. package/dist/chunk-QOXOH3D7.js +243 -0
  54. package/dist/chunk-QOXOH3D7.js.map +1 -0
  55. package/dist/chunk-TH33IQIY.js +350 -0
  56. package/dist/chunk-TH33IQIY.js.map +1 -0
  57. package/dist/chunk-TZ5SCDQF.js +176 -0
  58. package/dist/chunk-TZ5SCDQF.js.map +1 -0
  59. package/dist/chunk-X2BBSDMW.js +192 -0
  60. package/dist/chunk-X2BBSDMW.js.map +1 -0
  61. package/dist/chunk-XZ7LMG6V.js +30 -0
  62. package/dist/chunk-XZ7LMG6V.js.map +1 -0
  63. package/dist/index.cjs +1 -1
  64. package/dist/index.cjs.map +1 -1
  65. package/dist/index.js +85 -85
  66. package/dist/layouts/index.js +25 -25
  67. package/dist/layouts/response-display.js +25 -25
  68. package/dist/molecules/date-picker/date-picker-button.js +25 -25
  69. package/dist/molecules/expand-table/index.js +25 -25
  70. package/dist/molecules/expand-table/row.js +25 -25
  71. package/dist/molecules/index.js +28 -28
  72. package/dist/molecules/learning-post.js +2 -2
  73. package/dist/molecules/navigation.js +25 -25
  74. package/dist/molecules/radio-button-card.js +25 -25
  75. package/dist/molecules/stepper.js +2 -2
  76. package/dist/molecules/tag-selector.js +26 -26
  77. package/dist/molecules/time-select.js +25 -25
  78. package/package.json +1 -1
  79. package/src/app/platform/userInfos/coaching-customer-info/small.tsx +3 -1
@@ -7,54 +7,48 @@ import {
7
7
  } from "../../../chunk-7FMKV5I6.js";
8
8
  import "../../../chunk-A6W2ZWYA.js";
9
9
  import "../../../chunk-SRZ6X74X.js";
10
- import "../../../chunk-YJ7ZFOYL.js";
11
- import "../../../chunk-5ZITU5L7.js";
12
- import "../../../chunk-EW6OPYEW.js";
13
10
  import "../../../chunk-VOQU7ZOV.js";
14
- import "../../../chunk-MUNMDHRF.js";
15
- import "../../../chunk-TVDKGMBI.js";
16
- import "../../../chunk-ZZYFULUQ.js";
17
11
  import "../../../chunk-5H3YPCZK.js";
18
12
  import "../../../chunk-FR2GDOU2.js";
19
13
  import "../../../chunk-74DX4CU7.js";
20
14
  import "../../../chunk-OYM4XCHQ.js";
21
- import "../../../chunk-VIFDE6JV.js";
22
- import "../../../chunk-5AVBYDPB.js";
23
- import "../../../chunk-365QMK4D.js";
15
+ import "../../../chunk-YJ7ZFOYL.js";
16
+ import "../../../chunk-5ZITU5L7.js";
17
+ import "../../../chunk-EW6OPYEW.js";
24
18
  import "../../../chunk-YO3BQW6S.js";
25
19
  import "../../../chunk-6IVCARWS.js";
26
20
  import "../../../chunk-6DJOIRMF.js";
27
21
  import "../../../chunk-FPD73OHW.js";
28
22
  import "../../../chunk-ZKZDVS7G.js";
29
- import "../../../chunk-EGEQY3KT.js";
30
- import "../../../chunk-O3T3TM3V.js";
23
+ import "../../../chunk-MUNMDHRF.js";
24
+ import "../../../chunk-TVDKGMBI.js";
25
+ import "../../../chunk-ZZYFULUQ.js";
31
26
  import "../../../chunk-XQOL7UBI.js";
32
27
  import "../../../chunk-TULWX7D6.js";
33
28
  import "../../../chunk-SIM6HKVI.js";
34
- import "../../../chunk-VTJZMOSP.js";
35
- import "../../../chunk-4TXJT55O.js";
36
- import "../../../chunk-CYYWMYE7.js";
37
- import "../../../chunk-HK224ADT.js";
38
- import "../../../chunk-XDZDRPF3.js";
39
- import "../../../chunk-UNTA4JJU.js";
40
- import "../../../chunk-HYITAA4J.js";
41
- import "../../../chunk-O3DNDMV3.js";
29
+ import "../../../chunk-VIFDE6JV.js";
30
+ import "../../../chunk-5AVBYDPB.js";
31
+ import "../../../chunk-365QMK4D.js";
42
32
  import "../../../chunk-4WFMOFN2.js";
43
33
  import "../../../chunk-WKFZ5MMN.js";
44
34
  import "../../../chunk-ACVANQJ4.js";
45
35
  import "../../../chunk-2DZ2Y3JI.js";
46
36
  import "../../../chunk-QDZS4B6A.js";
47
- import "../../../chunk-B6XJN6EC.js";
48
- import "../../../chunk-2ZQK7NTN.js";
49
- import "../../../chunk-MIMJ7LON.js";
37
+ import "../../../chunk-EGEQY3KT.js";
38
+ import "../../../chunk-O3T3TM3V.js";
50
39
  import "../../../chunk-IQEEPHOY.js";
51
40
  import "../../../chunk-LHCDPZ5E.js";
52
41
  import "../../../chunk-OHMOP5PV.js";
53
42
  import "../../../chunk-LZJR77Q2.js";
54
43
  import "../../../chunk-Q37G2GS6.js";
55
- import "../../../chunk-YJCCE5WP.js";
56
- import "../../../chunk-3SSSCLJ5.js";
57
- import "../../../chunk-EWD4AO5N.js";
44
+ import "../../../chunk-VTJZMOSP.js";
45
+ import "../../../chunk-4TXJT55O.js";
46
+ import "../../../chunk-CYYWMYE7.js";
47
+ import "../../../chunk-HK224ADT.js";
48
+ import "../../../chunk-XDZDRPF3.js";
49
+ import "../../../chunk-UNTA4JJU.js";
50
+ import "../../../chunk-HYITAA4J.js";
51
+ import "../../../chunk-O3DNDMV3.js";
58
52
  import "../../../chunk-YGL6SWKN.js";
59
53
  import "../../../chunk-4Y5BEXVN.js";
60
54
  import "../../../chunk-NAL2USH5.js";
@@ -63,9 +57,15 @@ import "../../../chunk-25HMMI7R.js";
63
57
  import "../../../chunk-U7JPP7WJ.js";
64
58
  import "../../../chunk-LQY4RKWI.js";
65
59
  import "../../../chunk-ZD7MNMED.js";
60
+ import "../../../chunk-B6XJN6EC.js";
61
+ import "../../../chunk-2ZQK7NTN.js";
62
+ import "../../../chunk-MIMJ7LON.js";
66
63
  import "../../../chunk-OXXF2CUB.js";
67
64
  import "../../../chunk-J242TTFH.js";
68
65
  import "../../../chunk-EAXUQEO5.js";
66
+ import "../../../chunk-YJCCE5WP.js";
67
+ import "../../../chunk-3SSSCLJ5.js";
68
+ import "../../../chunk-EWD4AO5N.js";
69
69
  import "../../../chunk-N552FDTV.js";
70
70
  export {
71
71
  CopyButton,
@@ -2,27 +2,9 @@ import "../chunk-A6W2ZWYA.js";
2
2
  import {
3
3
  Form
4
4
  } from "../chunk-SRZ6X74X.js";
5
- import {
6
- TabNav
7
- } from "../chunk-YJ7ZFOYL.js";
8
- import {
9
- Tabs
10
- } from "../chunk-5ZITU5L7.js";
11
- import {
12
- TextArea
13
- } from "../chunk-EW6OPYEW.js";
14
5
  import {
15
6
  TextField
16
7
  } from "../chunk-VOQU7ZOV.js";
17
- import {
18
- Section
19
- } from "../chunk-MUNMDHRF.js";
20
- import {
21
- SegmentedControl
22
- } from "../chunk-TVDKGMBI.js";
23
- import {
24
- Select
25
- } from "../chunk-ZZYFULUQ.js";
26
8
  import {
27
9
  Skeleton
28
10
  } from "../chunk-5H3YPCZK.js";
@@ -36,14 +18,14 @@ import {
36
18
  Switch
37
19
  } from "../chunk-OYM4XCHQ.js";
38
20
  import {
39
- Pagination
40
- } from "../chunk-VIFDE6JV.js";
21
+ TabNav
22
+ } from "../chunk-YJ7ZFOYL.js";
41
23
  import {
42
- Popover
43
- } from "../chunk-5AVBYDPB.js";
24
+ Tabs
25
+ } from "../chunk-5ZITU5L7.js";
44
26
  import {
45
- Progress
46
- } from "../chunk-365QMK4D.js";
27
+ TextArea
28
+ } from "../chunk-EW6OPYEW.js";
47
29
  import {
48
30
  Quote
49
31
  } from "../chunk-YO3BQW6S.js";
@@ -60,11 +42,14 @@ import {
60
42
  ScrollArea
61
43
  } from "../chunk-ZKZDVS7G.js";
62
44
  import {
63
- Grid
64
- } from "../chunk-EGEQY3KT.js";
45
+ Section
46
+ } from "../chunk-MUNMDHRF.js";
65
47
  import {
66
- HoverCard
67
- } from "../chunk-O3T3TM3V.js";
48
+ SegmentedControl
49
+ } from "../chunk-TVDKGMBI.js";
50
+ import {
51
+ Select
52
+ } from "../chunk-ZZYFULUQ.js";
68
53
  import {
69
54
  Inset
70
55
  } from "../chunk-XQOL7UBI.js";
@@ -75,31 +60,14 @@ import {
75
60
  Link
76
61
  } from "../chunk-SIM6HKVI.js";
77
62
  import {
78
- DataList
79
- } from "../chunk-VTJZMOSP.js";
80
- import {
81
- Dialog
82
- } from "../chunk-4TXJT55O.js";
83
- import {
84
- ToastContainer,
85
- toast
86
- } from "../chunk-CYYWMYE7.js";
87
- import {
88
- Heading
89
- } from "../chunk-HK224ADT.js";
90
- import {
91
- Content,
92
- Drawer,
93
- Root,
94
- Trigger
95
- } from "../chunk-XDZDRPF3.js";
96
- import "../chunk-UNTA4JJU.js";
63
+ Pagination
64
+ } from "../chunk-VIFDE6JV.js";
97
65
  import {
98
- Separator
99
- } from "../chunk-HYITAA4J.js";
66
+ Popover
67
+ } from "../chunk-5AVBYDPB.js";
100
68
  import {
101
- IconButton
102
- } from "../chunk-O3DNDMV3.js";
69
+ Progress
70
+ } from "../chunk-365QMK4D.js";
103
71
  import {
104
72
  DropdownMenu
105
73
  } from "../chunk-4WFMOFN2.js";
@@ -116,14 +84,11 @@ import {
116
84
  FieldErrorWrapper
117
85
  } from "../chunk-QDZS4B6A.js";
118
86
  import {
119
- Callout
120
- } from "../chunk-B6XJN6EC.js";
121
- import {
122
- Card
123
- } from "../chunk-2ZQK7NTN.js";
87
+ Grid
88
+ } from "../chunk-EGEQY3KT.js";
124
89
  import {
125
- CheckboxCards
126
- } from "../chunk-MIMJ7LON.js";
90
+ HoverCard
91
+ } from "../chunk-O3T3TM3V.js";
127
92
  import {
128
93
  CheckboxGroup
129
94
  } from "../chunk-IQEEPHOY.js";
@@ -140,14 +105,31 @@ import {
140
105
  Container
141
106
  } from "../chunk-Q37G2GS6.js";
142
107
  import {
143
- AutoSizingInput
144
- } from "../chunk-YJCCE5WP.js";
108
+ DataList
109
+ } from "../chunk-VTJZMOSP.js";
145
110
  import {
146
- Avatar
147
- } from "../chunk-3SSSCLJ5.js";
111
+ Dialog
112
+ } from "../chunk-4TXJT55O.js";
148
113
  import {
149
- Badge
150
- } from "../chunk-EWD4AO5N.js";
114
+ ToastContainer,
115
+ toast
116
+ } from "../chunk-CYYWMYE7.js";
117
+ import {
118
+ Heading
119
+ } from "../chunk-HK224ADT.js";
120
+ import {
121
+ Content,
122
+ Drawer,
123
+ Root,
124
+ Trigger
125
+ } from "../chunk-XDZDRPF3.js";
126
+ import "../chunk-UNTA4JJU.js";
127
+ import {
128
+ Separator
129
+ } from "../chunk-HYITAA4J.js";
130
+ import {
131
+ IconButton
132
+ } from "../chunk-O3DNDMV3.js";
151
133
  import {
152
134
  Blockquote
153
135
  } from "../chunk-YGL6SWKN.js";
@@ -168,6 +150,15 @@ import {
168
150
  } from "../chunk-U7JPP7WJ.js";
169
151
  import "../chunk-LQY4RKWI.js";
170
152
  import "../chunk-ZD7MNMED.js";
153
+ import {
154
+ Callout
155
+ } from "../chunk-B6XJN6EC.js";
156
+ import {
157
+ Card
158
+ } from "../chunk-2ZQK7NTN.js";
159
+ import {
160
+ CheckboxCards
161
+ } from "../chunk-MIMJ7LON.js";
171
162
  import "../chunk-OXXF2CUB.js";
172
163
  import {
173
164
  AlertDialog
@@ -175,6 +166,15 @@ import {
175
166
  import {
176
167
  AspectRatio
177
168
  } from "../chunk-EAXUQEO5.js";
169
+ import {
170
+ AutoSizingInput
171
+ } from "../chunk-YJCCE5WP.js";
172
+ import {
173
+ Avatar
174
+ } from "../chunk-3SSSCLJ5.js";
175
+ import {
176
+ Badge
177
+ } from "../chunk-EWD4AO5N.js";
178
178
  import "../chunk-N552FDTV.js";
179
179
  export {
180
180
  AlertDialog,
@@ -0,0 +1,59 @@
1
+ import {
2
+ Grid
3
+ } from "./chunk-EGEQY3KT.js";
4
+ import {
5
+ Heading
6
+ } from "./chunk-HK224ADT.js";
7
+ import {
8
+ Box
9
+ } from "./chunk-4Y5BEXVN.js";
10
+ import {
11
+ Typo
12
+ } from "./chunk-52MVZ6AN.js";
13
+ import {
14
+ Flex
15
+ } from "./chunk-25HMMI7R.js";
16
+ import {
17
+ Badge
18
+ } from "./chunk-EWD4AO5N.js";
19
+
20
+ // src/app/platform/userInfos/coaching-customer-info/small.tsx
21
+ import { useMemo } from "react";
22
+ import {
23
+ getColorFromProjectState,
24
+ getTextFromProjectState
25
+ } from "@tipp/biz-utils";
26
+ import { jsx, jsxs } from "react/jsx-runtime";
27
+ function CoachingCustomerInfoSmall({
28
+ customer,
29
+ session,
30
+ children
31
+ }) {
32
+ const badgeColor = useMemo(() => {
33
+ return getColorFromProjectState(session == null ? void 0 : session.state);
34
+ }, [session == null ? void 0 : session.state]);
35
+ const sessionText = useMemo(() => {
36
+ return getTextFromProjectState(session == null ? void 0 : session.state);
37
+ }, [session == null ? void 0 : session.state]);
38
+ return /* @__PURE__ */ jsxs(
39
+ Flex,
40
+ {
41
+ direction: { initial: "column", xs: "row" },
42
+ gap: "3",
43
+ justify: "between",
44
+ children: [
45
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Grid, { align: "center", columns: "auto auto 1fr", gapX: "3", children: [
46
+ /* @__PURE__ */ jsx(Heading, { variant: "heading3", children: (customer == null ? void 0 : customer.username) || "\uC774\uB984 \uC5C6\uC74C" }),
47
+ /* @__PURE__ */ jsx(Typo, { color: "gray", truncate: true, variant: "body", children: customer == null ? void 0 : customer.company }),
48
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Badge, { color: badgeColor, children: sessionText }) })
49
+ ] }) }),
50
+ children
51
+ ]
52
+ }
53
+ );
54
+ }
55
+
56
+ export {
57
+ CoachingCustomerInfoSmall
58
+ };
59
+ //# sourceMappingURL=chunk-3BIESZCA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/app/platform/userInfos/coaching-customer-info/small.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport {\n getColorFromProjectState,\n getTextFromProjectState,\n} from '@tipp/biz-utils';\nimport { Badge, Box, Flex, Grid, Heading, Typo } from '../../../../atoms';\nimport type { CoachingCustomerInfoProps } from '../utils';\n\nexport function CoachingCustomerInfoSmall({\n customer,\n session,\n children,\n}: CoachingCustomerInfoProps): React.ReactElement {\n const badgeColor = useMemo(() => {\n return getColorFromProjectState(session?.state);\n }, [session?.state]);\n\n const sessionText = useMemo(() => {\n return getTextFromProjectState(session?.state);\n }, [session?.state]);\n\n return (\n <Flex\n direction={{ initial: 'column', xs: 'row' }}\n gap=\"3\"\n justify=\"between\"\n >\n {/* 이름, 사명 */}\n <Box>\n <Grid align=\"center\" columns=\"auto auto 1fr\" gapX=\"3\">\n <Heading variant=\"heading3\">\n {customer?.username || '이름 없음'}\n </Heading>\n <Typo color=\"gray\" truncate variant=\"body\">\n {customer?.company}\n </Typo>\n <Box>\n <Badge color={badgeColor}>{sessionText}</Badge>\n </Box>\n </Grid>\n </Box>\n {children}\n </Flex>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,eAAe;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAyBC,SACE,KADF;AArBD,SAAS,0BAA0B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACF,GAAkD;AAChD,QAAM,aAAa,QAAQ,MAAM;AAC/B,WAAO,yBAAyB,mCAAS,KAAK;AAAA,EAChD,GAAG,CAAC,mCAAS,KAAK,CAAC;AAEnB,QAAM,cAAc,QAAQ,MAAM;AAChC,WAAO,wBAAwB,mCAAS,KAAK;AAAA,EAC/C,GAAG,CAAC,mCAAS,KAAK,CAAC;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,SAAS,UAAU,IAAI,MAAM;AAAA,MAC1C,KAAI;AAAA,MACJ,SAAQ;AAAA,MAGR;AAAA,4BAAC,OACC,+BAAC,QAAK,OAAM,UAAS,SAAQ,iBAAgB,MAAK,KAChD;AAAA,8BAAC,WAAQ,SAAQ,YACd,gDAAU,aAAY,6BACzB;AAAA,UACA,oBAAC,QAAK,OAAM,QAAO,UAAQ,MAAC,SAAQ,QACjC,+CAAU,SACb;AAAA,UACA,oBAAC,OACC,8BAAC,SAAM,OAAO,YAAa,uBAAY,GACzC;AAAA,WACF,GACF;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -0,0 +1,243 @@
1
+ import {
2
+ OnOfflineRadioCard
3
+ } from "./chunk-S4V3F26V.js";
4
+ import {
5
+ DatePickerButton
6
+ } from "./chunk-HZWC2D42.js";
7
+ import {
8
+ TimeSelect
9
+ } from "./chunk-K55LGP5B.js";
10
+ import {
11
+ getTimeOption,
12
+ parseTimeOption
13
+ } from "./chunk-VAXB7NV2.js";
14
+ import {
15
+ Inset
16
+ } from "./chunk-XQOL7UBI.js";
17
+ import {
18
+ Card
19
+ } from "./chunk-2ZQK7NTN.js";
20
+ import {
21
+ BulletText
22
+ } from "./chunk-IWW6ST7Q.js";
23
+ import {
24
+ Grid
25
+ } from "./chunk-EGEQY3KT.js";
26
+ import {
27
+ Button
28
+ } from "./chunk-U7JPP7WJ.js";
29
+ import {
30
+ Badge
31
+ } from "./chunk-EWD4AO5N.js";
32
+ import {
33
+ Box
34
+ } from "./chunk-4Y5BEXVN.js";
35
+ import {
36
+ Flex
37
+ } from "./chunk-25HMMI7R.js";
38
+ import {
39
+ Form
40
+ } from "./chunk-SRZ6X74X.js";
41
+ import {
42
+ Heading
43
+ } from "./chunk-HK224ADT.js";
44
+ import {
45
+ Typo
46
+ } from "./chunk-52MVZ6AN.js";
47
+ import {
48
+ ArrowRightIcon,
49
+ Cross1Icon
50
+ } from "./chunk-OXXF2CUB.js";
51
+ import {
52
+ __spreadProps,
53
+ __spreadValues
54
+ } from "./chunk-N552FDTV.js";
55
+
56
+ // src/app/platform/reservation-card.tsx
57
+ import { useCallback, useMemo, useState } from "react";
58
+ import { setHours, setMinutes } from "date-fns";
59
+ import { jsx, jsxs } from "react/jsx-runtime";
60
+ function ReservationCard(props) {
61
+ const {
62
+ sessionNumber,
63
+ customerName,
64
+ readonly,
65
+ defaultTime,
66
+ defaultType,
67
+ error,
68
+ onClickReserve,
69
+ onClickCancel,
70
+ onClickCompleteSession
71
+ } = props;
72
+ const [editValues, setEditValues] = useState({
73
+ date: props.defaultTime,
74
+ type: props.defaultType
75
+ });
76
+ const date = readonly ? defaultTime : editValues.date;
77
+ const type = readonly ? defaultType : editValues.type;
78
+ const time = date && getTimeOption(date);
79
+ const onClickSave = useCallback(() => {
80
+ var _a;
81
+ (_a = props.onClickSave) == null ? void 0 : _a.call(props, editValues);
82
+ }, [editValues, props]);
83
+ const onClickReset = useCallback(() => {
84
+ setEditValues({
85
+ date: defaultTime,
86
+ type: defaultType
87
+ });
88
+ }, [defaultTime, defaultType]);
89
+ const ActionButtons = useMemo(() => {
90
+ if (readonly) {
91
+ return /* @__PURE__ */ jsx(Button, { onClick: onClickReserve, size: "small", variant: "surface", children: defaultTime && defaultType ? "\uC608\uC57D \uC218\uC815\uD558\uAE30" : "\uC608\uC57D\uD558\uAE30" });
92
+ }
93
+ return /* @__PURE__ */ jsx(Button, { color: "gray", onClick: onClickCancel, variant: "transparent", children: /* @__PURE__ */ jsx(Cross1Icon, {}) });
94
+ }, [defaultTime, defaultType, onClickCancel, onClickReserve, readonly]);
95
+ const onChangeDate = useCallback(
96
+ (newDate) => {
97
+ if (!newDate)
98
+ return;
99
+ const { hour = 0, minute = 0 } = time ? parseTimeOption(time) : {};
100
+ setEditValues((prev) => {
101
+ return __spreadProps(__spreadValues({}, prev), {
102
+ date: setMinutes(setHours(newDate, hour), minute)
103
+ });
104
+ });
105
+ },
106
+ [time]
107
+ );
108
+ const onChangeType = useCallback((newType) => {
109
+ setEditValues((prev) => {
110
+ return __spreadProps(__spreadValues({}, prev), {
111
+ type: newType
112
+ });
113
+ });
114
+ }, []);
115
+ const onChangeTime = useCallback(
116
+ (v) => {
117
+ const { hour, minute } = parseTimeOption(v);
118
+ setEditValues((prev) => {
119
+ return __spreadProps(__spreadValues({}, prev), {
120
+ date: setMinutes(setHours(date || /* @__PURE__ */ new Date(), hour), minute)
121
+ });
122
+ });
123
+ },
124
+ [date]
125
+ );
126
+ return /* @__PURE__ */ jsxs(
127
+ Card,
128
+ {
129
+ error: Boolean(error),
130
+ size: "3",
131
+ style: { overflow: "visible", contain: "initial" },
132
+ children: [
133
+ /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "3", justify: "between", mb: "5", children: [
134
+ /* @__PURE__ */ jsxs(
135
+ Grid,
136
+ {
137
+ align: "center",
138
+ columns: { initial: "1", xs: "auto 1fr" },
139
+ gapY: "2",
140
+ children: [
141
+ /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
142
+ /* @__PURE__ */ jsxs(Heading, { variant: "heading4", children: [
143
+ customerName || "-",
144
+ "\uB2D8 ",
145
+ sessionNumber || "-",
146
+ "\uD68C\uCC28 \uC138\uC158"
147
+ ] }),
148
+ /* @__PURE__ */ jsx(Badge, { ml: "2", children: "\uB2E4\uC74C \uC138\uC158" })
149
+ ] }),
150
+ error ? /* @__PURE__ */ jsx(BulletText, { color: "red", variant: "caption", children: error }) : null
151
+ ]
152
+ }
153
+ ),
154
+ /* @__PURE__ */ jsx(Flex, { children: ActionButtons })
155
+ ] }),
156
+ /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
157
+ Form.Root,
158
+ {
159
+ onSubmit: (e) => {
160
+ e.preventDefault();
161
+ },
162
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: "5", children: [
163
+ /* @__PURE__ */ jsx(Form.Field, { name: "date", children: /* @__PURE__ */ jsxs(Form.Label, { asChild: true, children: [
164
+ /* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading5", weight: "regular", children: "\uC138\uC158 \uC77C\uC790\uC640 \uC2DC\uAC01" }),
165
+ /* @__PURE__ */ jsxs(Grid, { columns: "1fr auto", gap: "4", children: [
166
+ /* @__PURE__ */ jsx(
167
+ DatePickerButton,
168
+ {
169
+ disabled: readonly,
170
+ onChange: onChangeDate,
171
+ placeholder: "\uC77C\uC790\uB97C \uC120\uD0DD\uD574\uC8FC\uC138\uC694",
172
+ selected: date,
173
+ size: "large"
174
+ }
175
+ ),
176
+ /* @__PURE__ */ jsx(
177
+ TimeSelect,
178
+ {
179
+ disabled: readonly,
180
+ onValueChange: onChangeTime,
181
+ size: "3",
182
+ value: time
183
+ }
184
+ )
185
+ ] })
186
+ ] }) }),
187
+ /* @__PURE__ */ jsxs(Form.Field, { name: "type", children: [
188
+ /* @__PURE__ */ jsx(Form.Label, { asChild: true, children: /* @__PURE__ */ jsx(Heading, { mb: "2", variant: "heading5", weight: "regular", children: "\uC628/\uC624\uD504\uB77C\uC778 \uC9C4\uD589 \uC5EC\uBD80" }) }),
189
+ /* @__PURE__ */ jsx(Form.Control, { asChild: true, children: /* @__PURE__ */ jsx(
190
+ OnOfflineRadioCard,
191
+ {
192
+ disabled: readonly,
193
+ onValueChange: onChangeType,
194
+ size: "1",
195
+ value: type
196
+ }
197
+ ) })
198
+ ] }),
199
+ readonly ? null : /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "3", justify: "end", children: [
200
+ /* @__PURE__ */ jsx(
201
+ Button,
202
+ {
203
+ color: "gray",
204
+ onClick: onClickReset,
205
+ size: "small",
206
+ variant: "transparent",
207
+ children: "\uCD08\uAE30\uD654\uD558\uAE30"
208
+ }
209
+ ),
210
+ /* @__PURE__ */ jsx(Button, { onClick: onClickSave, size: "small", children: "\uC800\uC7A5\uD558\uAE30" })
211
+ ] })
212
+ ] })
213
+ }
214
+ ) }),
215
+ readonly ? /* @__PURE__ */ jsx(Inset, { clip: "border-box", side: "bottom", children: /* @__PURE__ */ jsx(
216
+ Box,
217
+ {
218
+ mt: "5",
219
+ px: "5",
220
+ py: "4",
221
+ style: { backgroundColor: "var(--accent-a3)" },
222
+ width: "100%",
223
+ children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "4", justify: "center", children: [
224
+ /* @__PURE__ */ jsxs(Typo, { children: [
225
+ sessionNumber || "-",
226
+ "\uD68C\uCC28 \uC138\uC158\uC744 \uC644\uB8CC\uD558\uC168\uB098\uC694?"
227
+ ] }),
228
+ /* @__PURE__ */ jsxs(Button, { onClick: onClickCompleteSession, size: "small", children: [
229
+ "\uC138\uC158 \uC885\uB8CC\uD558\uAE30",
230
+ /* @__PURE__ */ jsx(ArrowRightIcon, {})
231
+ ] })
232
+ ] })
233
+ }
234
+ ) }) : null
235
+ ]
236
+ }
237
+ );
238
+ }
239
+
240
+ export {
241
+ ReservationCard
242
+ };
243
+ //# sourceMappingURL=chunk-3LP4EQXB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/app/platform/reservation-card.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { setHours, setMinutes } from 'date-fns';\nimport {\n Badge,\n Box,\n BulletText,\n Button,\n Card,\n Flex,\n Form,\n Grid,\n Heading,\n Inset,\n Typo,\n} from '../../atoms';\nimport { ArrowRightIcon, Cross1Icon } from '../../icon';\nimport { DatePickerButton, TimeSelect } from '../../molecules';\nimport { getTimeOption, parseTimeOption } from '../../utils';\nimport { OnOfflineRadioCard } from './on-offline-radio-card';\n\ntype Type = 'onlineCoaching' | 'offlineCoaching';\n\ninterface Values {\n date?: Date;\n type?: Type;\n}\n\nexport interface ReservationCardProps {\n sessionNumber?: number;\n readonly?: boolean;\n defaultTime?: Date;\n defaultType?: Type;\n customerName?: string;\n error?: string;\n onClickCompleteSession?: () => void;\n onClickReserve?: () => void;\n onClickSave?: (values: Values) => void;\n onClickCancel?: () => void;\n}\n\nexport function ReservationCard(\n props: ReservationCardProps\n): React.ReactElement {\n const {\n sessionNumber,\n customerName,\n readonly,\n defaultTime,\n defaultType,\n error,\n onClickReserve,\n onClickCancel,\n onClickCompleteSession,\n } = props;\n\n const [editValues, setEditValues] = useState<Values>({\n date: props.defaultTime,\n type: props.defaultType,\n });\n\n const date = readonly ? defaultTime : editValues.date;\n const type = readonly ? defaultType : editValues.type;\n const time = date && getTimeOption(date);\n\n const onClickSave = useCallback(() => {\n props.onClickSave?.(editValues);\n }, [editValues, props]);\n\n const onClickReset = useCallback(() => {\n setEditValues({\n date: defaultTime,\n type: defaultType,\n });\n }, [defaultTime, defaultType]);\n\n const ActionButtons = useMemo(() => {\n if (readonly) {\n return (\n <Button onClick={onClickReserve} size=\"small\" variant=\"surface\">\n {defaultTime && defaultType ? '예약 수정하기' : '예약하기'}\n </Button>\n );\n }\n return (\n <Button color=\"gray\" onClick={onClickCancel} variant=\"transparent\">\n <Cross1Icon />\n </Button>\n );\n }, [defaultTime, defaultType, onClickCancel, onClickReserve, readonly]);\n\n const onChangeDate = useCallback(\n (newDate: Date | null) => {\n if (!newDate) return;\n const { hour = 0, minute = 0 } = time ? parseTimeOption(time) : {};\n setEditValues((prev) => {\n return {\n ...prev,\n date: setMinutes(setHours(newDate, hour), minute),\n };\n });\n },\n [time]\n );\n\n const onChangeType = useCallback((newType: string) => {\n setEditValues((prev) => {\n return {\n ...prev,\n type: newType as Type,\n };\n });\n }, []);\n\n const onChangeTime = useCallback(\n (v: string) => {\n const { hour, minute } = parseTimeOption(v);\n setEditValues((prev) => {\n return {\n ...prev,\n date: setMinutes(setHours(date || new Date(), hour), minute),\n };\n });\n },\n [date]\n );\n\n return (\n <Card\n error={Boolean(error)}\n size=\"3\"\n style={{ overflow: 'visible', contain: 'initial' }}\n >\n <Flex align=\"center\" gap=\"3\" justify=\"between\" mb=\"5\">\n <Grid\n align=\"center\"\n columns={{ initial: '1', xs: 'auto 1fr' }}\n gapY=\"2\"\n >\n <Flex align=\"center\">\n <Heading variant=\"heading4\">\n {customerName || '-'}님 {sessionNumber || '-'}회차 세션\n </Heading>\n <Badge ml=\"2\">다음 세션</Badge>\n </Flex>\n {error ? (\n <BulletText color=\"red\" variant=\"caption\">\n {error}\n </BulletText>\n ) : null}\n </Grid>\n <Flex>{ActionButtons}</Flex>\n </Flex>\n\n <Box>\n <Form.Root\n onSubmit={(e) => {\n e.preventDefault();\n }}\n >\n <Flex direction=\"column\" gap=\"5\">\n <Form.Field name=\"date\">\n <Form.Label asChild>\n <Heading mb=\"2\" variant=\"heading5\" weight=\"regular\">\n 세션 일자와 시각\n </Heading>\n <Grid columns=\"1fr auto\" gap=\"4\">\n <DatePickerButton\n disabled={readonly}\n onChange={onChangeDate}\n placeholder=\"일자를 선택해주세요\"\n selected={date}\n size=\"large\"\n />\n <TimeSelect\n disabled={readonly}\n onValueChange={onChangeTime}\n size=\"3\"\n value={time}\n />\n </Grid>\n </Form.Label>\n </Form.Field>\n\n <Form.Field name=\"type\">\n <Form.Label asChild>\n <Heading mb=\"2\" variant=\"heading5\" weight=\"regular\">\n 온/오프라인 진행 여부\n </Heading>\n </Form.Label>\n <Form.Control asChild>\n <OnOfflineRadioCard\n disabled={readonly}\n onValueChange={onChangeType}\n size=\"1\"\n value={type}\n />\n </Form.Control>\n </Form.Field>\n\n {readonly ? null : (\n <Flex align=\"center\" gap=\"3\" justify=\"end\">\n <Button\n color=\"gray\"\n onClick={onClickReset}\n size=\"small\"\n variant=\"transparent\"\n >\n 초기화하기\n </Button>\n <Button onClick={onClickSave} size=\"small\">\n 저장하기\n </Button>\n </Flex>\n )}\n </Flex>\n </Form.Root>\n </Box>\n\n {readonly ? (\n <Inset clip=\"border-box\" side=\"bottom\">\n <Box\n mt=\"5\"\n px=\"5\"\n py=\"4\"\n style={{ backgroundColor: 'var(--accent-a3)' }}\n width=\"100%\"\n >\n <Flex align=\"center\" gap=\"4\" justify=\"center\">\n <Typo>{sessionNumber || '-'}회차 세션을 완료하셨나요?</Typo>\n <Button onClick={onClickCompleteSession} size=\"small\">\n 세션 종료하기\n <ArrowRightIcon />\n </Button>\n </Flex>\n </Box>\n </Inset>\n ) : null}\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,aAAa,SAAS,gBAAgB;AACtD,SAAS,UAAU,kBAAkB;AA6E7B,cA6DI,YA7DJ;AAtCD,SAAS,gBACd,OACoB;AACpB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,CAAC,YAAY,aAAa,IAAI,SAAiB;AAAA,IACnD,MAAM,MAAM;AAAA,IACZ,MAAM,MAAM;AAAA,EACd,CAAC;AAED,QAAM,OAAO,WAAW,cAAc,WAAW;AACjD,QAAM,OAAO,WAAW,cAAc,WAAW;AACjD,QAAM,OAAO,QAAQ,cAAc,IAAI;AAEvC,QAAM,cAAc,YAAY,MAAM;AAhExC;AAiEI,gBAAM,gBAAN,+BAAoB;AAAA,EACtB,GAAG,CAAC,YAAY,KAAK,CAAC;AAEtB,QAAM,eAAe,YAAY,MAAM;AACrC,kBAAc;AAAA,MACZ,MAAM;AAAA,MACN,MAAM;AAAA,IACR,CAAC;AAAA,EACH,GAAG,CAAC,aAAa,WAAW,CAAC;AAE7B,QAAM,gBAAgB,QAAQ,MAAM;AAClC,QAAI,UAAU;AACZ,aACE,oBAAC,UAAO,SAAS,gBAAgB,MAAK,SAAQ,SAAQ,WACnD,yBAAe,cAAc,0CAAY,4BAC5C;AAAA,IAEJ;A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