@tipp/ui 2.3.39 → 2.3.41
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 +7 -7
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +7 -7
- package/dist/app/platform/contents-card.cjs +7 -7
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +1 -1
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +6 -6
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +6 -6
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +6 -6
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +6 -6
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +6 -6
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +6 -6
- package/dist/{chunk-YC5XSFKC.js → chunk-OYJ7HJIE.js} +7 -7
- package/dist/{chunk-BXRTYDSY.js → chunk-VY4J3FLW.js} +8 -8
- package/dist/chunk-VY4J3FLW.js.map +1 -0
- package/dist/{chunk-MLAQDU6U.js → chunk-XLKJYRFY.js} +37 -7
- package/dist/{chunk-MLAQDU6U.js.map → chunk-XLKJYRFY.js.map} +1 -1
- package/dist/index.cjs +43 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -13
- package/dist/molecules/dynamic-form-editor.js +2 -2
- package/dist/molecules/index.cjs +36 -6
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +9 -9
- package/dist/molecules/training-info-guideline.cjs +36 -6
- package/dist/molecules/training-info-guideline.cjs.map +1 -1
- package/dist/molecules/training-info-guideline.js +1 -1
- package/package.json +1 -1
- package/src/app/platform/contents-card.tsx +5 -5
- package/src/molecules/training-info-guideline.tsx +28 -7
- package/dist/chunk-BXRTYDSY.js.map +0 -1
- /package/dist/{chunk-YC5XSFKC.js.map → chunk-OYJ7HJIE.js.map} +0 -0
|
@@ -39,7 +39,6 @@ import "../../chunk-K3Q4XLCN.js";
|
|
|
39
39
|
import "../../chunk-Q7KT3UPO.js";
|
|
40
40
|
import "../../chunk-OE2AVQED.js";
|
|
41
41
|
import "../../chunk-2ISIAPFS.js";
|
|
42
|
-
import "../../chunk-JRT6KTBG.js";
|
|
43
42
|
import "../../chunk-LE6CNJWH.js";
|
|
44
43
|
import "../../chunk-CSKNBWPB.js";
|
|
45
44
|
import "../../chunk-QNJ2H7J4.js";
|
|
@@ -50,26 +49,27 @@ import "../../chunk-NWJSLIQ3.js";
|
|
|
50
49
|
import "../../chunk-BXX3B3E4.js";
|
|
51
50
|
import "../../chunk-NRPDVI76.js";
|
|
52
51
|
import "../../chunk-2BPFXK4L.js";
|
|
53
|
-
import "../../chunk-
|
|
54
|
-
import "../../chunk-
|
|
52
|
+
import "../../chunk-XLKJYRFY.js";
|
|
53
|
+
import "../../chunk-OYJ7HJIE.js";
|
|
55
54
|
import "../../chunk-77H5BUYO.js";
|
|
56
55
|
import "../../chunk-K7LTEKQS.js";
|
|
57
56
|
import "../../chunk-EWFZXCMV.js";
|
|
58
57
|
import "../../chunk-5JQOU3IR.js";
|
|
59
58
|
import "../../chunk-SACH3XVV.js";
|
|
60
59
|
import "../../chunk-7FKRQQYK.js";
|
|
61
|
-
import "../../chunk-
|
|
62
|
-
import "../../chunk-ADAQSPUA.js";
|
|
60
|
+
import "../../chunk-JRT6KTBG.js";
|
|
63
61
|
import "../../chunk-IJOOKMKQ.js";
|
|
64
62
|
import "../../chunk-OHNBVT52.js";
|
|
65
63
|
import "../../chunk-2REWQIZJ.js";
|
|
66
64
|
import "../../chunk-6UXCNYVO.js";
|
|
67
|
-
import "../../chunk-Z7WNKARH.js";
|
|
68
65
|
import "../../chunk-MIATMZDP.js";
|
|
69
66
|
import "../../chunk-JRSZNGFD.js";
|
|
70
67
|
import "../../chunk-KCAOUZCT.js";
|
|
71
68
|
import "../../chunk-MPZJH3PI.js";
|
|
69
|
+
import "../../chunk-Z7WNKARH.js";
|
|
72
70
|
import "../../chunk-LSDD4TAP.js";
|
|
71
|
+
import "../../chunk-HYMODLGE.js";
|
|
72
|
+
import "../../chunk-ADAQSPUA.js";
|
|
73
73
|
import "../../chunk-4U6DFH7Z.js";
|
|
74
74
|
import "../../chunk-HBF6IIVZ.js";
|
|
75
75
|
import "../../chunk-QDC3LFHS.js";
|
|
@@ -4,6 +4,12 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
DynamicFormEditorFieldListPanel
|
|
6
6
|
} from "./chunk-6UXCNYVO.js";
|
|
7
|
+
import {
|
|
8
|
+
DynamicFormEditorIssuesPanel
|
|
9
|
+
} from "./chunk-MIATMZDP.js";
|
|
10
|
+
import {
|
|
11
|
+
DynamicFormEditorPreviewPanel
|
|
12
|
+
} from "./chunk-JRSZNGFD.js";
|
|
7
13
|
import {
|
|
8
14
|
createDefaultField,
|
|
9
15
|
createUniqueFieldName,
|
|
@@ -16,12 +22,6 @@ import {
|
|
|
16
22
|
updateSchemaFields,
|
|
17
23
|
validateDynamicFormSchema
|
|
18
24
|
} from "./chunk-Z7WNKARH.js";
|
|
19
|
-
import {
|
|
20
|
-
DynamicFormEditorIssuesPanel
|
|
21
|
-
} from "./chunk-MIATMZDP.js";
|
|
22
|
-
import {
|
|
23
|
-
DynamicFormEditorPreviewPanel
|
|
24
|
-
} from "./chunk-JRSZNGFD.js";
|
|
25
25
|
import {
|
|
26
26
|
Flex
|
|
27
27
|
} from "./chunk-25HMMI7R.js";
|
|
@@ -227,4 +227,4 @@ function DynamicFormEditor(props) {
|
|
|
227
227
|
export {
|
|
228
228
|
DynamicFormEditor
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-OYJ7HJIE.js.map
|
|
@@ -54,25 +54,25 @@ var ContentsCard = forwardRef(
|
|
|
54
54
|
height: "100%",
|
|
55
55
|
width: "100%",
|
|
56
56
|
display: "grid",
|
|
57
|
-
cursor: "pointer"
|
|
58
|
-
maxHeight: "450px"
|
|
57
|
+
cursor: "pointer"
|
|
59
58
|
},
|
|
60
59
|
children: [
|
|
61
60
|
/* @__PURE__ */ jsx(Inset, { clip: "padding-box", pb: "0", side: "top", children: /* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(
|
|
62
61
|
Box,
|
|
63
62
|
{
|
|
64
|
-
height: "210px",
|
|
65
63
|
style: {
|
|
64
|
+
aspectRatio: "704 / 407",
|
|
66
65
|
backgroundImage: `url(${imageSrc})`,
|
|
67
66
|
backgroundSize: "cover",
|
|
68
|
-
backgroundPosition: "center"
|
|
67
|
+
backgroundPosition: "center",
|
|
68
|
+
backgroundRepeat: "no-repeat"
|
|
69
69
|
},
|
|
70
70
|
width: "100%"
|
|
71
71
|
}
|
|
72
72
|
) }) }),
|
|
73
|
-
/* @__PURE__ */ jsxs(Flex, { direction: "column",
|
|
73
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", pb: "4", px: "3", py: "4", children: [
|
|
74
74
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
75
|
-
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Heading, {
|
|
75
|
+
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Heading, { variant: "heading5", children: title }) }),
|
|
76
76
|
/* @__PURE__ */ jsx(Skeleton, { loading: isLoading, children: /* @__PURE__ */ jsx(Typo, { as: "p", variant: "caption", children: description }) })
|
|
77
77
|
] }),
|
|
78
78
|
/* @__PURE__ */ jsxs(
|
|
@@ -81,7 +81,7 @@ var ContentsCard = forwardRef(
|
|
|
81
81
|
align: "center",
|
|
82
82
|
columns: "1fr auto",
|
|
83
83
|
justify: "between",
|
|
84
|
-
pt: "
|
|
84
|
+
pt: "4",
|
|
85
85
|
style: { marginTop: "auto" },
|
|
86
86
|
width: "100%",
|
|
87
87
|
children: [
|
|
@@ -114,4 +114,4 @@ ContentsCard.displayName = "ContentsCard";
|
|
|
114
114
|
export {
|
|
115
115
|
ContentsCard
|
|
116
116
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
117
|
+
//# sourceMappingURL=chunk-VY4J3FLW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/app/platform/contents-card.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { Heading } from '@/atoms/heading';\nimport { Button } from '@/atoms/button';\nimport { DropdownMenu } from '@/atoms/dropdown-menu';\nimport { Box } from '@/atoms/box';\nimport { Flex } from '@/atoms/flex';\nimport { Grid } from '@/atoms/grid';\nimport { Skeleton } from '@/atoms/skeleton';\nimport { Typo } from '@/atoms/typo';\nimport { DotsVerticalIcon } from '@/icon';\nimport { Card, Inset } from '@/atoms';\n\nexport interface ContentsCardProps {\n title?: React.ReactNode;\n description?: string;\n id?: string;\n imageSrc?: string | null;\n imageAlt?: string;\n footer?: React.ReactNode;\n dropdownItems?: {\n label: string;\n onClick: () => void;\n }[];\n onClickCard?: () => void;\n isLoading?: boolean;\n}\n\nexport const ContentsCard = forwardRef<HTMLDivElement, ContentsCardProps>(\n (\n {\n title,\n description,\n imageSrc,\n footer,\n dropdownItems,\n onClickCard,\n isLoading = false,\n },\n ref\n ): React.ReactNode => {\n return (\n <Card\n onClick={onClickCard}\n ref={ref}\n style={{\n height: '100%',\n width: '100%',\n display: 'grid',\n cursor: 'pointer',\n }}\n >\n {/* 섬네일 */}\n <Inset clip=\"padding-box\" pb=\"0\" side=\"top\">\n <Skeleton loading={isLoading}>\n <Box\n style={{\n aspectRatio: '704 / 407',\n backgroundImage: `url(${imageSrc})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n }}\n width=\"100%\"\n />\n </Skeleton>\n </Inset>\n {/* 제목, 설명 */}\n <Flex direction=\"column\" pb=\"4\" px=\"3\" py=\"4\">\n <Box>\n <Skeleton loading={isLoading}>\n <Heading variant=\"heading5\">\n {title}\n </Heading>\n </Skeleton>\n <Skeleton loading={isLoading}>\n <Typo as=\"p\" variant=\"caption\">\n {description}\n </Typo>\n </Skeleton>\n </Box>\n <Grid\n align=\"center\"\n columns=\"1fr auto\"\n justify=\"between\"\n pt=\"4\"\n style={{ marginTop: 'auto' }}\n width=\"100%\"\n >\n <Skeleton loading={isLoading}>\n <Flex gap=\"3\" overflow=\"hidden\">\n {footer}\n </Flex>\n </Skeleton>\n {Boolean(dropdownItems?.length) && (\n <DropdownMenu.Root>\n <DropdownMenu.Trigger>\n <Button size=\"large\" variant=\"transparent\">\n <DotsVerticalIcon color=\"gray\" height=\"20px\" width=\"20px\" />\n </Button>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content>\n {dropdownItems?.map((item) => (\n <DropdownMenu.Item\n key={item.label}\n onClick={(e) => {\n e.stopPropagation();\n item.onClick();\n }}\n >\n {item.label}\n </DropdownMenu.Item>\n ))}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n )}\n </Grid>\n </Flex>\n </Card>\n );\n }\n);\nContentsCard.displayName = 'ContentsCard';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,kBAAkB;AAsDtB,cAcF,YAdE;AA3BL,IAAM,eAAe;AAAA,EAC1B,CACE;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,EACd,GACA,QACoB;AACpB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT;AAAA,QACA,OAAO;AAAA,UACL,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,SAAS;AAAA,UACT,QAAQ;AAAA,QACV;AAAA,QAGA;AAAA,8BAAC,SAAM,MAAK,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AAA;AAAA,YAEJ;AAAA,aACF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;","names":[]}
|
|
@@ -156,14 +156,44 @@ function TrainingInfoGuidelineButton({
|
|
|
156
156
|
Button,
|
|
157
157
|
{
|
|
158
158
|
onClick,
|
|
159
|
-
style: {
|
|
159
|
+
style: {
|
|
160
|
+
width: "100%",
|
|
161
|
+
height: "auto",
|
|
162
|
+
minHeight: "48px",
|
|
163
|
+
textAlign: "left",
|
|
164
|
+
paddingTop: 8,
|
|
165
|
+
paddingBottom: 8
|
|
166
|
+
},
|
|
160
167
|
variant: "outline",
|
|
161
168
|
children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", width: "100%", children: [
|
|
162
|
-
icon,
|
|
163
|
-
/* @__PURE__ */ jsx(Separator, { orientation: "vertical", size: "2" }),
|
|
164
|
-
/* @__PURE__ */ jsxs(Box, { children: [
|
|
165
|
-
/* @__PURE__ */ jsx(
|
|
166
|
-
|
|
169
|
+
/* @__PURE__ */ jsx(Flex, { align: "center", flexShrink: "0", children: icon }),
|
|
170
|
+
/* @__PURE__ */ jsx(Separator, { orientation: "vertical", size: "2", style: { flexShrink: 0 } }),
|
|
171
|
+
/* @__PURE__ */ jsxs(Box, { flexGrow: "1", style: { minWidth: 0 }, children: [
|
|
172
|
+
/* @__PURE__ */ jsx(
|
|
173
|
+
Typo,
|
|
174
|
+
{
|
|
175
|
+
as: "div",
|
|
176
|
+
style: {
|
|
177
|
+
whiteSpace: "normal",
|
|
178
|
+
wordBreak: "break-word",
|
|
179
|
+
overflowWrap: "anywhere"
|
|
180
|
+
},
|
|
181
|
+
children: title
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
typeof description === "string" && description !== "" ? /* @__PURE__ */ jsx(
|
|
185
|
+
Typo,
|
|
186
|
+
{
|
|
187
|
+
style: {
|
|
188
|
+
display: "block",
|
|
189
|
+
whiteSpace: "normal",
|
|
190
|
+
wordBreak: "break-word",
|
|
191
|
+
overflowWrap: "anywhere"
|
|
192
|
+
},
|
|
193
|
+
variant: "caption",
|
|
194
|
+
children: description
|
|
195
|
+
}
|
|
196
|
+
) : null
|
|
167
197
|
] })
|
|
168
198
|
] })
|
|
169
199
|
}
|
|
@@ -173,4 +203,4 @@ function TrainingInfoGuidelineButton({
|
|
|
173
203
|
export {
|
|
174
204
|
TrainingInfoGuideline
|
|
175
205
|
};
|
|
176
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# sourceMappingURL=chunk-XLKJYRFY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { AspectRatio } from '@/atoms/aspect-ratio';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Spinner } from '@/atoms/spinner';\nimport { Box } from '@/atoms/box';\nimport { Separator } from '@/atoms/separator';\nimport { Typo } from '@/atoms/typo';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <>\n {values.map((value) => (\n <TrainingInfoGuidelineItem\n key={getItemKey(value)}\n onClickFileDownload={onClickFileDownload}\n value={value}\n />\n ))}\n </>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n const [isLoading, setIsLoading] = useState(true);\n\n if (value.type === 'file') {\n return (\n <TrainingInfoGuidelineButton\n description=\"파일 다운로드\"\n icon={<FileTextIcon />}\n onClick={() => {\n onClickFileDownload({ url: value.url, filename: value.filename });\n }}\n title={value.downloadButtonName}\n />\n );\n }\n\n if (value.type === 'youtube-shorts') {\n return (\n <TrainingInfoGuidelineButton\n description=\"TIPP 쇼츠 보기\"\n icon={<VideoIcon />}\n onClick={() => {\n window.open(value.url, '_blank');\n }}\n title={value.title}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <TrainingInfoGuidelineButton\n description=\"영상 자료\"\n icon={<VideoIcon />}\n title={value.videoTitle}\n />\n </Dialog.Trigger>\n <Dialog.Content\n height=\"100%\"\n maxHeight=\"500px\"\n maxWidth=\"800px\"\n title={value.videoTitle}\n width=\"100%\"\n >\n <AspectRatio ratio={16 / 9} style={{ width: '100%' }}>\n <Flex\n align=\"center\"\n justify=\"center\"\n style={{\n width: '100%',\n height: '100%',\n backgroundColor: 'black',\n position: 'relative',\n }}\n >\n {isLoading ? (\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n position=\"absolute\"\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n color: 'white',\n }}\n width=\"100%\"\n >\n <Spinner size=\"3\" style={{ width: 48, height: 48 }} />\n </Flex>\n ) : null}\n\n <iframe\n allowFullScreen\n onError={() => {\n setIsLoading(false);\n }} // 필요시 에러 메시지로 대체\n onLoad={() => {\n setIsLoading(false);\n }}\n src={`${value.url}?theme=light`}\n style={{ width: '100%', height: '100%', border: 'none' }}\n title=\"Curriculum Video\"\n />\n </Flex>\n </AspectRatio>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n\ninterface TrainingInfoGuidelineButtonProps {\n icon: React.ReactNode;\n title: string;\n description?: string;\n onClick?: () => void;\n}\n\nfunction TrainingInfoGuidelineButton({\n icon,\n title,\n description,\n onClick,\n}: TrainingInfoGuidelineButtonProps): React.ReactElement {\n return (\n <Button\n onClick={onClick}\n style={{
|
|
1
|
+
{"version":3,"sources":["../src/molecules/training-info-guideline.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { FileTextIcon, VideoIcon } from '@radix-ui/react-icons';\nimport { AspectRatio } from '@/atoms/aspect-ratio';\nimport { Button } from '@/atoms/button';\nimport type { TrainingInfoGuidelineContents } from '@/types/training-info-guideline-schema-generated';\nimport { Dialog } from '@/atoms/dialog';\nimport { Spinner } from '@/atoms/spinner';\nimport { Box } from '@/atoms/box';\nimport { Separator } from '@/atoms/separator';\nimport { Typo } from '@/atoms/typo';\nimport { Flex } from '../atoms/flex';\n\nexport interface TrainingInfoGuidelineProps {\n values: TrainingInfoGuidelineContents['values'];\n onClickFileDownload: (args: { url: string; filename: string }) => void;\n}\n\nexport function TrainingInfoGuideline({\n values,\n onClickFileDownload,\n}: TrainingInfoGuidelineProps): React.ReactElement {\n return (\n <>\n {values.map((value) => (\n <TrainingInfoGuidelineItem\n key={getItemKey(value)}\n onClickFileDownload={onClickFileDownload}\n value={value}\n />\n ))}\n </>\n );\n}\n\ntype TrainingInfoGuidelineValue =\n TrainingInfoGuidelineContents['values'][number];\n\nfunction getItemKey(value: TrainingInfoGuidelineValue): string {\n return value.url;\n}\n\ninterface TrainingInfoGuidelineItemProps {\n value: TrainingInfoGuidelineValue;\n onClickFileDownload: TrainingInfoGuidelineProps['onClickFileDownload'];\n}\n\nfunction TrainingInfoGuidelineItem({\n value,\n onClickFileDownload,\n}: TrainingInfoGuidelineItemProps): React.ReactElement | null {\n const [isLoading, setIsLoading] = useState(true);\n\n if (value.type === 'file') {\n return (\n <TrainingInfoGuidelineButton\n description=\"파일 다운로드\"\n icon={<FileTextIcon />}\n onClick={() => {\n onClickFileDownload({ url: value.url, filename: value.filename });\n }}\n title={value.downloadButtonName}\n />\n );\n }\n\n if (value.type === 'youtube-shorts') {\n return (\n <TrainingInfoGuidelineButton\n description=\"TIPP 쇼츠 보기\"\n icon={<VideoIcon />}\n onClick={() => {\n window.open(value.url, '_blank');\n }}\n title={value.title}\n />\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- 차후 다른 타입 추가 시 사용\n if (value.type === 'video') {\n return (\n <Dialog.Root>\n <Dialog.Trigger>\n <TrainingInfoGuidelineButton\n description=\"영상 자료\"\n icon={<VideoIcon />}\n title={value.videoTitle}\n />\n </Dialog.Trigger>\n <Dialog.Content\n height=\"100%\"\n maxHeight=\"500px\"\n maxWidth=\"800px\"\n title={value.videoTitle}\n width=\"100%\"\n >\n <AspectRatio ratio={16 / 9} style={{ width: '100%' }}>\n <Flex\n align=\"center\"\n justify=\"center\"\n style={{\n width: '100%',\n height: '100%',\n backgroundColor: 'black',\n position: 'relative',\n }}\n >\n {isLoading ? (\n <Flex\n align=\"center\"\n height=\"100%\"\n justify=\"center\"\n position=\"absolute\"\n style={{\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n color: 'white',\n }}\n width=\"100%\"\n >\n <Spinner size=\"3\" style={{ width: 48, height: 48 }} />\n </Flex>\n ) : null}\n\n <iframe\n allowFullScreen\n onError={() => {\n setIsLoading(false);\n }} // 필요시 에러 메시지로 대체\n onLoad={() => {\n setIsLoading(false);\n }}\n src={`${value.url}?theme=light`}\n style={{ width: '100%', height: '100%', border: 'none' }}\n title=\"Curriculum Video\"\n />\n </Flex>\n </AspectRatio>\n </Dialog.Content>\n </Dialog.Root>\n );\n }\n return null;\n}\n\ninterface TrainingInfoGuidelineButtonProps {\n icon: React.ReactNode;\n title: string;\n description?: string;\n onClick?: () => void;\n}\n\nfunction TrainingInfoGuidelineButton({\n icon,\n title,\n description,\n onClick,\n}: TrainingInfoGuidelineButtonProps): React.ReactElement {\n return (\n <Button\n onClick={onClick}\n style={{\n width: '100%',\n height: 'auto',\n minHeight: '48px',\n textAlign: 'left',\n paddingTop: 8,\n paddingBottom: 8,\n }}\n variant=\"outline\"\n >\n <Flex align=\"center\" gap=\"2\" width=\"100%\">\n <Flex align=\"center\" flexShrink=\"0\">{icon}</Flex>\n <Separator orientation=\"vertical\" size=\"2\" style={{ flexShrink: 0 }} />\n <Box flexGrow=\"1\" style={{ minWidth: 0 }}>\n <Typo\n as=\"div\"\n style={{\n whiteSpace: 'normal',\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n }}\n >\n {title}\n </Typo>\n {typeof description === 'string' && description !== '' ? (\n <Typo\n style={{\n display: 'block',\n whiteSpace: 'normal',\n wordBreak: 'break-word',\n overflowWrap: 'anywhere',\n }}\n variant=\"caption\"\n >\n {description}\n </Typo>\n ) : null}\n </Box>\n </Flex>\n </Button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAgB,gBAAgB;AAChC,SAAS,cAAc,iBAAiB;AAqBpC,mBAEI,KAyEI,YA3ER;AALG,SAAS,sBAAsB;AAAA,EACpC;AAAA,EACA;AACF,GAAmD;AACjD,SACE,gCACG,iBAAO,IAAI,CAAC,UACX;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA;AAAA;AAAA,IAFK,WAAW,KAAK;AAAA,EAGvB,CACD,GACH;AAEJ;AAKA,SAAS,WAAW,OAA2C;AAC7D,SAAO,MAAM;AACf;AAOA,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AACF,GAA8D;AAC5D,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,IAAI;AAE/C,MAAI,MAAM,SAAS,QAAQ;AACzB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,aAAY;AAAA,QACZ,MAAM,oBAAC,gBAAa;AAAA,QACpB,SAAS,MAAM;AACb,8BAAoB,EAAE,KAAK,MAAM,KAAK,UAAU,MAAM,SAAS,CAAC;AAAA,QA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AA,cACA,SAAQ;AAAA,cAEP;AAAA;AAAA,UACH,IACE;AAAA,WACN;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -6527,14 +6527,44 @@ function TrainingInfoGuidelineButton({
|
|
|
6527
6527
|
Button,
|
|
6528
6528
|
{
|
|
6529
6529
|
onClick,
|
|
6530
|
-
style: {
|
|
6530
|
+
style: {
|
|
6531
|
+
width: "100%",
|
|
6532
|
+
height: "auto",
|
|
6533
|
+
minHeight: "48px",
|
|
6534
|
+
textAlign: "left",
|
|
6535
|
+
paddingTop: 8,
|
|
6536
|
+
paddingBottom: 8
|
|
6537
|
+
},
|
|
6531
6538
|
variant: "outline",
|
|
6532
6539
|
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_themes22.Flex, { align: "center", gap: "2", width: "100%", children: [
|
|
6533
|
-
icon,
|
|
6534
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes39.Separator, { orientation: "vertical", size: "2" }),
|
|
6535
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_themes6.Box, { children: [
|
|
6536
|
-
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6537
|
-
|
|
6540
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes22.Flex, { align: "center", flexShrink: "0", children: icon }),
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_themes39.Separator, { orientation: "vertical", size: "2", style: { flexShrink: 0 } }),
|
|
6542
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_themes6.Box, { flexGrow: "1", style: { minWidth: 0 }, children: [
|
|
6543
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6544
|
+
Typo,
|
|
6545
|
+
{
|
|
6546
|
+
as: "div",
|
|
6547
|
+
style: {
|
|
6548
|
+
whiteSpace: "normal",
|
|
6549
|
+
wordBreak: "break-word",
|
|
6550
|
+
overflowWrap: "anywhere"
|
|
6551
|
+
},
|
|
6552
|
+
children: title
|
|
6553
|
+
}
|
|
6554
|
+
),
|
|
6555
|
+
typeof description === "string" && description !== "" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
6556
|
+
Typo,
|
|
6557
|
+
{
|
|
6558
|
+
style: {
|
|
6559
|
+
display: "block",
|
|
6560
|
+
whiteSpace: "normal",
|
|
6561
|
+
wordBreak: "break-word",
|
|
6562
|
+
overflowWrap: "anywhere"
|
|
6563
|
+
},
|
|
6564
|
+
variant: "caption",
|
|
6565
|
+
children: description
|
|
6566
|
+
}
|
|
6567
|
+
) : null
|
|
6538
6568
|
] })
|
|
6539
6569
|
] })
|
|
6540
6570
|
}
|
|
@@ -9281,25 +9311,25 @@ var ContentsCard = (0, import_react59.forwardRef)(
|
|
|
9281
9311
|
height: "100%",
|
|
9282
9312
|
width: "100%",
|
|
9283
9313
|
display: "grid",
|
|
9284
|
-
cursor: "pointer"
|
|
9285
|
-
maxHeight: "450px"
|
|
9314
|
+
cursor: "pointer"
|
|
9286
9315
|
},
|
|
9287
9316
|
children: [
|
|
9288
9317
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_themes25.Inset, { clip: "padding-box", pb: "0", side: "top", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_themes40.Skeleton, { loading: isLoading, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9289
9318
|
import_themes6.Box,
|
|
9290
9319
|
{
|
|
9291
|
-
height: "210px",
|
|
9292
9320
|
style: {
|
|
9321
|
+
aspectRatio: "704 / 407",
|
|
9293
9322
|
backgroundImage: `url(${imageSrc})`,
|
|
9294
9323
|
backgroundSize: "cover",
|
|
9295
|
-
backgroundPosition: "center"
|
|
9324
|
+
backgroundPosition: "center",
|
|
9325
|
+
backgroundRepeat: "no-repeat"
|
|
9296
9326
|
},
|
|
9297
9327
|
width: "100%"
|
|
9298
9328
|
}
|
|
9299
9329
|
) }) }),
|
|
9300
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_themes22.Flex, { direction: "column",
|
|
9330
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_themes22.Flex, { direction: "column", pb: "4", px: "3", py: "4", children: [
|
|
9301
9331
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_themes6.Box, { children: [
|
|
9302
|
-
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_themes40.Skeleton, { loading: isLoading, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Heading2, {
|
|
9332
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_themes40.Skeleton, { loading: isLoading, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Heading2, { variant: "heading5", children: title }) }),
|
|
9303
9333
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_themes40.Skeleton, { loading: isLoading, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Typo, { as: "p", variant: "caption", children: description }) })
|
|
9304
9334
|
] }),
|
|
9305
9335
|
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
@@ -9308,7 +9338,7 @@ var ContentsCard = (0, import_react59.forwardRef)(
|
|
|
9308
9338
|
align: "center",
|
|
9309
9339
|
columns: "1fr auto",
|
|
9310
9340
|
justify: "between",
|
|
9311
|
-
pt: "
|
|
9341
|
+
pt: "4",
|
|
9312
9342
|
style: { marginTop: "auto" },
|
|
9313
9343
|
width: "100%",
|
|
9314
9344
|
children: [
|