@elicecontents/content-ui 0.0.0
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/cjs/_virtual/_rollupPluginBabelHelpers.js +95 -0
- package/cjs/assets/AIAvatar.png.js +7 -0
- package/cjs/breakpoints/breakpoints.d.ts +21 -0
- package/cjs/breakpoints/breakpoints.js +20 -0
- package/cjs/breakpoints/index.d.ts +1 -0
- package/cjs/breakpoints/index.js +7 -0
- package/cjs/components/AI-feedback/AIFeedback.d.ts +4 -0
- package/cjs/components/AI-feedback/AIFeedback.js +36 -0
- package/cjs/components/AI-feedback/index.d.ts +1 -0
- package/cjs/components/AI-feedback/index.js +7 -0
- package/cjs/components/AIDTTypography/AIDTTypography.d.ts +11 -0
- package/cjs/components/AIDTTypography/AIDTTypography.js +30 -0
- package/cjs/components/AIDTTypography/index.d.ts +1 -0
- package/cjs/components/AIDTTypography/index.js +7 -0
- package/cjs/components/AdaptiveImage/AdaptiveImage.d.ts +11 -0
- package/cjs/components/AdaptiveImage/AdaptiveImage.js +64 -0
- package/cjs/components/AdaptiveImage/index.d.ts +1 -0
- package/cjs/components/AdaptiveImage/index.js +7 -0
- package/cjs/components/answer-feedback/AnswerFeedback.d.ts +5 -0
- package/cjs/components/answer-feedback/AnswerFeedback.js +25 -0
- package/cjs/components/answer-feedback/Correct.d.ts +2 -0
- package/cjs/components/answer-feedback/Correct.js +77 -0
- package/cjs/components/answer-feedback/Incorrect.d.ts +2 -0
- package/cjs/components/answer-feedback/Incorrect.js +114 -0
- package/cjs/components/answer-feedback/index.d.ts +2 -0
- package/cjs/components/answer-feedback/index.js +7 -0
- package/cjs/components/badge/Badge.d.ts +7 -0
- package/cjs/components/badge/Badge.js +33 -0
- package/cjs/components/badge/index.d.ts +2 -0
- package/cjs/components/badge/index.js +7 -0
- package/cjs/components/button/Button.d.ts +7 -0
- package/cjs/components/button/Button.js +37 -0
- package/cjs/components/button/index.d.ts +2 -0
- package/cjs/components/button/index.js +7 -0
- package/cjs/components/chat/AssistantAvatar.d.ts +2 -0
- package/cjs/components/chat/AssistantAvatar.js +162 -0
- package/cjs/components/chat/Chat.d.ts +14 -0
- package/cjs/components/chat/Chat.js +168 -0
- package/cjs/components/chat/UserAvatar.d.ts +2 -0
- package/cjs/components/chat/UserAvatar.js +173 -0
- package/cjs/components/chat/index.d.ts +2 -0
- package/cjs/components/chat/index.js +7 -0
- package/cjs/components/dialog/Dialog.d.ts +11 -0
- package/cjs/components/dialog/Dialog.js +117 -0
- package/cjs/components/dialog/index.d.ts +2 -0
- package/cjs/components/dialog/index.js +7 -0
- package/cjs/components/dotted-pagination/DottedPagination.d.ts +8 -0
- package/cjs/components/dotted-pagination/DottedPagination.js +67 -0
- package/cjs/components/dotted-pagination/index.d.ts +2 -0
- package/cjs/components/dotted-pagination/index.js +7 -0
- package/cjs/components/icon-button/IconButton.d.ts +7 -0
- package/cjs/components/icon-button/IconButton.js +31 -0
- package/cjs/components/icon-button/index.d.ts +2 -0
- package/cjs/components/icon-button/index.js +7 -0
- package/cjs/components/index.d.ts +18 -0
- package/cjs/components/index.js +37 -0
- package/cjs/components/layout/Layout.d.ts +16 -0
- package/cjs/components/layout/Layout.js +197 -0
- package/cjs/components/layout/bg_pattern.png.js +7 -0
- package/cjs/components/layout/index.d.ts +2 -0
- package/cjs/components/layout/index.js +7 -0
- package/cjs/components/question/Question.d.ts +7 -0
- package/cjs/components/question/Question.js +54 -0
- package/cjs/components/question/index.d.ts +2 -0
- package/cjs/components/question/index.js +7 -0
- package/cjs/components/selection/Selection.d.ts +13 -0
- package/cjs/components/selection/Selection.js +111 -0
- package/cjs/components/selection/index.d.ts +2 -0
- package/cjs/components/selection/index.js +7 -0
- package/cjs/components/table/Table.d.ts +11 -0
- package/cjs/components/table/Table.js +155 -0
- package/cjs/components/table/index.d.ts +2 -0
- package/cjs/components/table/index.js +7 -0
- package/cjs/components/textarea/Textarea.d.ts +3 -0
- package/cjs/components/textarea/Textarea.js +58 -0
- package/cjs/components/textarea/index.d.ts +1 -0
- package/cjs/components/textarea/index.js +7 -0
- package/cjs/components/tokenColorTemporary.d.ts +23 -0
- package/cjs/components/tokenColorTemporary.js +40 -0
- package/cjs/components/tooltip/Tooltip.d.ts +11 -0
- package/cjs/components/tooltip/Tooltip.js +128 -0
- package/cjs/components/tooltip/index.d.ts +2 -0
- package/cjs/components/tooltip/index.js +7 -0
- package/cjs/icons/ArrowLeft.d.ts +6 -0
- package/cjs/icons/ArrowLeft.js +28 -0
- package/cjs/icons/ArrowRight.d.ts +6 -0
- package/cjs/icons/ArrowRight.js +35 -0
- package/cjs/icons/Close.d.ts +6 -0
- package/cjs/icons/Close.js +28 -0
- package/cjs/icons/Micro.d.ts +6 -0
- package/cjs/icons/Micro.js +44 -0
- package/cjs/icons/Reset.d.ts +6 -0
- package/cjs/icons/Reset.js +28 -0
- package/cjs/icons/SelectedCheckbox.d.ts +4 -0
- package/cjs/icons/SelectedCheckbox.js +25 -0
- package/cjs/icons/SelectedRadio.d.ts +4 -0
- package/cjs/icons/SelectedRadio.js +23 -0
- package/cjs/icons/Send.d.ts +6 -0
- package/cjs/icons/Send.js +31 -0
- package/cjs/icons/UnselectedCheckbox.d.ts +4 -0
- package/cjs/icons/UnselectedCheckbox.js +25 -0
- package/cjs/icons/UnselectedRadio.d.ts +4 -0
- package/cjs/icons/UnselectedRadio.js +23 -0
- package/cjs/icons/index.d.ts +10 -0
- package/cjs/icons/index.js +25 -0
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +63 -0
- package/cjs/palettes/_typing.d.ts +9 -0
- package/cjs/palettes/eliceDefault.d.ts +2 -0
- package/cjs/palettes/eliceDefault.js +154 -0
- package/cjs/palettes/index.d.ts +3 -0
- package/cjs/palettes/index.js +11 -0
- package/cjs/palettes/miraeN.d.ts +2 -0
- package/cjs/palettes/miraeN.js +154 -0
- package/cjs/palettes/types.d.ts +21 -0
- package/cjs/palettes/visang.d.ts +2 -0
- package/cjs/palettes/visang.js +154 -0
- package/cjs/theme/AIDTTheme.d.ts +3 -0
- package/cjs/theme/AIDTTheme.js +29 -0
- package/cjs/theme/_base.d.ts +2 -0
- package/cjs/theme/_base.js +20 -0
- package/cjs/theme/createAIDTTheme.d.ts +25 -0
- package/cjs/theme/createAIDTTheme.js +49 -0
- package/cjs/theme/index.d.ts +1 -0
- package/cjs/theme/index.js +7 -0
- package/cjs/tokens/breakpoints/breakpoints.d.ts +10 -0
- package/cjs/tokens/breakpoints/breakpoints.js +14 -0
- package/cjs/tokens/breakpoints/index.d.ts +1 -0
- package/cjs/tokens/breakpoints/index.js +7 -0
- package/cjs/tokens/colors/_typing.d.ts +7 -0
- package/cjs/tokens/colors/bluepurple.d.ts +2 -0
- package/cjs/tokens/colors/bluepurple.js +18 -0
- package/cjs/tokens/colors/bluesky.d.ts +2 -0
- package/cjs/tokens/colors/bluesky.js +18 -0
- package/cjs/tokens/colors/common.d.ts +9 -0
- package/cjs/tokens/colors/common.js +15 -0
- package/cjs/tokens/colors/gray.d.ts +2 -0
- package/cjs/tokens/colors/gray.js +18 -0
- package/cjs/tokens/colors/green.d.ts +2 -0
- package/cjs/tokens/colors/green.js +18 -0
- package/cjs/tokens/colors/index.d.ts +10 -0
- package/cjs/tokens/colors/index.js +25 -0
- package/cjs/tokens/colors/mint.d.ts +2 -0
- package/cjs/tokens/colors/mint.js +18 -0
- package/cjs/tokens/colors/orange.d.ts +2 -0
- package/cjs/tokens/colors/orange.js +18 -0
- package/cjs/tokens/colors/pink.d.ts +2 -0
- package/cjs/tokens/colors/pink.js +18 -0
- package/cjs/tokens/colors/purple.d.ts +2 -0
- package/cjs/tokens/colors/purple.js +18 -0
- package/cjs/tokens/colors/yellow.d.ts +2 -0
- package/cjs/tokens/colors/yellow.js +18 -0
- package/cjs/tokens/index.d.ts +4 -0
- package/cjs/tokens/index.js +29 -0
- package/cjs/typography/index.d.ts +2 -0
- package/cjs/typography/index.js +9 -0
- package/cjs/typography/typography.d.ts +165 -0
- package/cjs/typography/typography.js +184 -0
- package/cjs/typography/typographyFontFamily.d.ts +5 -0
- package/cjs/typography/typographyFontFamily.js +8 -0
- package/es/_virtual/_rollupPluginBabelHelpers.js +81 -0
- package/es/assets/AIAvatar.png.js +3 -0
- package/es/breakpoints/breakpoints.d.ts +21 -0
- package/es/breakpoints/breakpoints.js +18 -0
- package/es/breakpoints/index.d.ts +1 -0
- package/es/breakpoints/index.js +1 -0
- package/es/components/AI-feedback/AIFeedback.d.ts +4 -0
- package/es/components/AI-feedback/AIFeedback.js +32 -0
- package/es/components/AI-feedback/index.d.ts +1 -0
- package/es/components/AI-feedback/index.js +1 -0
- package/es/components/AIDTTypography/AIDTTypography.d.ts +11 -0
- package/es/components/AIDTTypography/AIDTTypography.js +26 -0
- package/es/components/AIDTTypography/index.d.ts +1 -0
- package/es/components/AIDTTypography/index.js +1 -0
- package/es/components/AdaptiveImage/AdaptiveImage.d.ts +11 -0
- package/es/components/AdaptiveImage/AdaptiveImage.js +56 -0
- package/es/components/AdaptiveImage/index.d.ts +1 -0
- package/es/components/AdaptiveImage/index.js +1 -0
- package/es/components/answer-feedback/AnswerFeedback.d.ts +5 -0
- package/es/components/answer-feedback/AnswerFeedback.js +21 -0
- package/es/components/answer-feedback/Correct.d.ts +2 -0
- package/es/components/answer-feedback/Correct.js +73 -0
- package/es/components/answer-feedback/Incorrect.d.ts +2 -0
- package/es/components/answer-feedback/Incorrect.js +110 -0
- package/es/components/answer-feedback/index.d.ts +2 -0
- package/es/components/answer-feedback/index.js +1 -0
- package/es/components/badge/Badge.d.ts +7 -0
- package/es/components/badge/Badge.js +29 -0
- package/es/components/badge/index.d.ts +2 -0
- package/es/components/badge/index.js +1 -0
- package/es/components/button/Button.d.ts +7 -0
- package/es/components/button/Button.js +33 -0
- package/es/components/button/index.d.ts +2 -0
- package/es/components/button/index.js +1 -0
- package/es/components/chat/AssistantAvatar.d.ts +2 -0
- package/es/components/chat/AssistantAvatar.js +158 -0
- package/es/components/chat/Chat.d.ts +14 -0
- package/es/components/chat/Chat.js +160 -0
- package/es/components/chat/UserAvatar.d.ts +2 -0
- package/es/components/chat/UserAvatar.js +169 -0
- package/es/components/chat/index.d.ts +2 -0
- package/es/components/chat/index.js +1 -0
- package/es/components/dialog/Dialog.d.ts +11 -0
- package/es/components/dialog/Dialog.js +113 -0
- package/es/components/dialog/index.d.ts +2 -0
- package/es/components/dialog/index.js +1 -0
- package/es/components/dotted-pagination/DottedPagination.d.ts +8 -0
- package/es/components/dotted-pagination/DottedPagination.js +63 -0
- package/es/components/dotted-pagination/index.d.ts +2 -0
- package/es/components/dotted-pagination/index.js +1 -0
- package/es/components/icon-button/IconButton.d.ts +7 -0
- package/es/components/icon-button/IconButton.js +27 -0
- package/es/components/icon-button/index.d.ts +2 -0
- package/es/components/icon-button/index.js +1 -0
- package/es/components/index.d.ts +18 -0
- package/es/components/index.js +16 -0
- package/es/components/layout/Layout.d.ts +16 -0
- package/es/components/layout/Layout.js +188 -0
- package/es/components/layout/bg_pattern.png.js +3 -0
- package/es/components/layout/index.d.ts +2 -0
- package/es/components/layout/index.js +1 -0
- package/es/components/question/Question.d.ts +7 -0
- package/es/components/question/Question.js +46 -0
- package/es/components/question/index.d.ts +2 -0
- package/es/components/question/index.js +1 -0
- package/es/components/selection/Selection.d.ts +13 -0
- package/es/components/selection/Selection.js +103 -0
- package/es/components/selection/index.d.ts +2 -0
- package/es/components/selection/index.js +1 -0
- package/es/components/table/Table.d.ts +11 -0
- package/es/components/table/Table.js +147 -0
- package/es/components/table/index.d.ts +2 -0
- package/es/components/table/index.js +1 -0
- package/es/components/textarea/Textarea.d.ts +3 -0
- package/es/components/textarea/Textarea.js +50 -0
- package/es/components/textarea/index.d.ts +1 -0
- package/es/components/textarea/index.js +1 -0
- package/es/components/tokenColorTemporary.d.ts +23 -0
- package/es/components/tokenColorTemporary.js +22 -0
- package/es/components/tooltip/Tooltip.d.ts +11 -0
- package/es/components/tooltip/Tooltip.js +120 -0
- package/es/components/tooltip/index.d.ts +2 -0
- package/es/components/tooltip/index.js +1 -0
- package/es/icons/ArrowLeft.d.ts +6 -0
- package/es/icons/ArrowLeft.js +24 -0
- package/es/icons/ArrowRight.d.ts +6 -0
- package/es/icons/ArrowRight.js +31 -0
- package/es/icons/Close.d.ts +6 -0
- package/es/icons/Close.js +24 -0
- package/es/icons/Micro.d.ts +6 -0
- package/es/icons/Micro.js +40 -0
- package/es/icons/Reset.d.ts +6 -0
- package/es/icons/Reset.js +24 -0
- package/es/icons/SelectedCheckbox.d.ts +4 -0
- package/es/icons/SelectedCheckbox.js +21 -0
- package/es/icons/SelectedRadio.d.ts +4 -0
- package/es/icons/SelectedRadio.js +19 -0
- package/es/icons/Send.d.ts +6 -0
- package/es/icons/Send.js +27 -0
- package/es/icons/UnselectedCheckbox.d.ts +4 -0
- package/es/icons/UnselectedCheckbox.js +21 -0
- package/es/icons/UnselectedRadio.d.ts +4 -0
- package/es/icons/UnselectedRadio.js +19 -0
- package/es/icons/index.d.ts +10 -0
- package/es/icons/index.js +10 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +30 -0
- package/es/palettes/_typing.d.ts +9 -0
- package/es/palettes/eliceDefault.d.ts +2 -0
- package/es/palettes/eliceDefault.js +152 -0
- package/es/palettes/index.d.ts +3 -0
- package/es/palettes/index.js +3 -0
- package/es/palettes/miraeN.d.ts +2 -0
- package/es/palettes/miraeN.js +152 -0
- package/es/palettes/types.d.ts +21 -0
- package/es/palettes/visang.d.ts +2 -0
- package/es/palettes/visang.js +152 -0
- package/es/theme/AIDTTheme.d.ts +3 -0
- package/es/theme/AIDTTheme.js +27 -0
- package/es/theme/_base.d.ts +2 -0
- package/es/theme/_base.js +18 -0
- package/es/theme/createAIDTTheme.d.ts +25 -0
- package/es/theme/createAIDTTheme.js +47 -0
- package/es/theme/index.d.ts +1 -0
- package/es/theme/index.js +1 -0
- package/es/tokens/breakpoints/breakpoints.d.ts +10 -0
- package/es/tokens/breakpoints/breakpoints.js +12 -0
- package/es/tokens/breakpoints/index.d.ts +1 -0
- package/es/tokens/breakpoints/index.js +1 -0
- package/es/tokens/colors/_typing.d.ts +7 -0
- package/es/tokens/colors/bluepurple.d.ts +2 -0
- package/es/tokens/colors/bluepurple.js +16 -0
- package/es/tokens/colors/bluesky.d.ts +2 -0
- package/es/tokens/colors/bluesky.js +16 -0
- package/es/tokens/colors/common.d.ts +9 -0
- package/es/tokens/colors/common.js +13 -0
- package/es/tokens/colors/gray.d.ts +2 -0
- package/es/tokens/colors/gray.js +16 -0
- package/es/tokens/colors/green.d.ts +2 -0
- package/es/tokens/colors/green.js +16 -0
- package/es/tokens/colors/index.d.ts +10 -0
- package/es/tokens/colors/index.js +10 -0
- package/es/tokens/colors/mint.d.ts +2 -0
- package/es/tokens/colors/mint.js +16 -0
- package/es/tokens/colors/orange.d.ts +2 -0
- package/es/tokens/colors/orange.js +16 -0
- package/es/tokens/colors/pink.d.ts +2 -0
- package/es/tokens/colors/pink.js +16 -0
- package/es/tokens/colors/purple.d.ts +2 -0
- package/es/tokens/colors/purple.js +16 -0
- package/es/tokens/colors/yellow.d.ts +2 -0
- package/es/tokens/colors/yellow.js +16 -0
- package/es/tokens/index.d.ts +4 -0
- package/es/tokens/index.js +13 -0
- package/es/typography/index.d.ts +2 -0
- package/es/typography/index.js +2 -0
- package/es/typography/typography.d.ts +165 -0
- package/es/typography/typography.js +182 -0
- package/es/typography/typographyFontFamily.d.ts +5 -0
- package/es/typography/typographyFontFamily.js +6 -0
- package/package.json +58 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Stack, Dialog, DialogTitle, Typography, DialogContent, DialogActions } from '@mui/material';
|
|
5
|
+
import { textPrimaryColor, textSecondaryColor } from '../tokenColorTemporary.js';
|
|
6
|
+
import EliceButton from '../button/Button.js';
|
|
7
|
+
|
|
8
|
+
var EliceDialog = function EliceDialog(_ref) {
|
|
9
|
+
var anchorElement = _ref.anchorElement,
|
|
10
|
+
title = _ref.title,
|
|
11
|
+
content = _ref.content,
|
|
12
|
+
_ref$type = _ref.type,
|
|
13
|
+
type = _ref$type === void 0 ? 'OK' : _ref$type,
|
|
14
|
+
onConfirm = _ref.onConfirm,
|
|
15
|
+
onAgree = _ref.onAgree,
|
|
16
|
+
onDisagree = _ref.onDisagree;
|
|
17
|
+
var _useState = useState(false),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
open = _useState2[0],
|
|
20
|
+
setOpen = _useState2[1];
|
|
21
|
+
return jsxs(Fragment, {
|
|
22
|
+
children: [jsx(Stack, {
|
|
23
|
+
onClick: function onClick() {
|
|
24
|
+
return setOpen(true);
|
|
25
|
+
},
|
|
26
|
+
children: anchorElement
|
|
27
|
+
}), jsxs(Dialog, {
|
|
28
|
+
open: open,
|
|
29
|
+
onClose: function onClose() {
|
|
30
|
+
return setOpen(false);
|
|
31
|
+
},
|
|
32
|
+
PaperProps: {
|
|
33
|
+
style: {
|
|
34
|
+
minWidth: '40rem',
|
|
35
|
+
padding: '1.25rem 1.5rem',
|
|
36
|
+
gap: '1rem'
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
children: [jsx(DialogTitle, {
|
|
40
|
+
style: {
|
|
41
|
+
fontSize: '1.375rem',
|
|
42
|
+
fontWeight: 700,
|
|
43
|
+
padding: 0,
|
|
44
|
+
color: textPrimaryColor
|
|
45
|
+
},
|
|
46
|
+
children: jsx(Typography, {
|
|
47
|
+
variant: "subtitle1",
|
|
48
|
+
children: title
|
|
49
|
+
})
|
|
50
|
+
}), jsx(DialogContent, {
|
|
51
|
+
style: {
|
|
52
|
+
padding: 0
|
|
53
|
+
},
|
|
54
|
+
children: jsx(Stack, {
|
|
55
|
+
mb: "1.25rem",
|
|
56
|
+
fontSize: "1.375rem",
|
|
57
|
+
color: textSecondaryColor,
|
|
58
|
+
children: jsx(Typography, {
|
|
59
|
+
variant: "body1",
|
|
60
|
+
children: content
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
}), jsxs(DialogActions, {
|
|
64
|
+
style: {
|
|
65
|
+
padding: 0
|
|
66
|
+
},
|
|
67
|
+
children: [type === 'OK' && jsx(EliceButton, {
|
|
68
|
+
style: {
|
|
69
|
+
width: '100%'
|
|
70
|
+
},
|
|
71
|
+
onClick: function onClick() {
|
|
72
|
+
if (onConfirm) {
|
|
73
|
+
onConfirm();
|
|
74
|
+
}
|
|
75
|
+
setOpen(false);
|
|
76
|
+
},
|
|
77
|
+
children: "\uB2EB\uAE30"
|
|
78
|
+
}), type === 'YesOrNo' && jsxs(Stack, {
|
|
79
|
+
direction: "row",
|
|
80
|
+
gap: "0.625rem",
|
|
81
|
+
width: "100%",
|
|
82
|
+
children: [jsx(EliceButton, {
|
|
83
|
+
variant: "contained",
|
|
84
|
+
style: {
|
|
85
|
+
flexGrow: 1
|
|
86
|
+
},
|
|
87
|
+
onClick: function onClick() {
|
|
88
|
+
if (onAgree) {
|
|
89
|
+
onAgree();
|
|
90
|
+
}
|
|
91
|
+
setOpen(false);
|
|
92
|
+
},
|
|
93
|
+
children: "\uD655\uC778"
|
|
94
|
+
}), jsx(EliceButton, {
|
|
95
|
+
variant: "outlined",
|
|
96
|
+
style: {
|
|
97
|
+
flexGrow: 1
|
|
98
|
+
},
|
|
99
|
+
onClick: function onClick() {
|
|
100
|
+
if (onDisagree) {
|
|
101
|
+
onDisagree();
|
|
102
|
+
}
|
|
103
|
+
setOpen(false);
|
|
104
|
+
},
|
|
105
|
+
children: "\uCDE8\uC18C"
|
|
106
|
+
})]
|
|
107
|
+
})]
|
|
108
|
+
})]
|
|
109
|
+
})]
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { EliceDialog as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EliceDialog } from './Dialog.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DottedPaginationProps {
|
|
2
|
+
currentPage?: number;
|
|
3
|
+
totalPage?: number;
|
|
4
|
+
onPrev?: VoidFunction;
|
|
5
|
+
onNext?: VoidFunction;
|
|
6
|
+
}
|
|
7
|
+
declare const EliceDottedPagination: (props: DottedPaginationProps) => import("react/jsx-runtime").JSX.Element | "Total page is at most 10";
|
|
8
|
+
export default EliceDottedPagination;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTheme, Stack } from '@mui/material';
|
|
3
|
+
import { gray300Color } from '../tokenColorTemporary.js';
|
|
4
|
+
import ArrowLeft from '../../icons/ArrowLeft.js';
|
|
5
|
+
import ArrowRight from '../../icons/ArrowRight.js';
|
|
6
|
+
|
|
7
|
+
var EliceDottedPagination = function EliceDottedPagination(props) {
|
|
8
|
+
var _props$currentPage = props.currentPage,
|
|
9
|
+
currentPage = _props$currentPage === void 0 ? 1 : _props$currentPage,
|
|
10
|
+
_props$totalPage = props.totalPage,
|
|
11
|
+
totalPage = _props$totalPage === void 0 ? 1 : _props$totalPage,
|
|
12
|
+
onNext = props.onNext,
|
|
13
|
+
onPrev = props.onPrev;
|
|
14
|
+
var isPrevAble = currentPage > 1;
|
|
15
|
+
var isNextAble = currentPage < totalPage;
|
|
16
|
+
var theme = useTheme();
|
|
17
|
+
if (totalPage > 10 || currentPage > 10) return 'Total page is at most 10';
|
|
18
|
+
return jsxs(Stack, {
|
|
19
|
+
direction: "row",
|
|
20
|
+
gap: "1rem",
|
|
21
|
+
children: [jsx(ArrowLeft, {
|
|
22
|
+
size: 24,
|
|
23
|
+
color: isPrevAble ? theme.palette.primary.main : gray300Color,
|
|
24
|
+
style: {
|
|
25
|
+
cursor: 'pointer'
|
|
26
|
+
},
|
|
27
|
+
onClick: function onClick() {
|
|
28
|
+
if (onPrev && isPrevAble) {
|
|
29
|
+
onPrev();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}), jsx(Stack, {
|
|
33
|
+
direction: "row",
|
|
34
|
+
gap: "0.375rem",
|
|
35
|
+
alignItems: "center",
|
|
36
|
+
children: Array.from({
|
|
37
|
+
length: totalPage
|
|
38
|
+
}, function (i) {
|
|
39
|
+
return i;
|
|
40
|
+
}).map(function (_, index) {
|
|
41
|
+
return jsx(Stack, {
|
|
42
|
+
borderRadius: "0.3rem",
|
|
43
|
+
height: "0.75rem",
|
|
44
|
+
width: "0.75rem",
|
|
45
|
+
bgcolor: currentPage === index + 1 ? theme.palette.primary.main : gray300Color
|
|
46
|
+
}, index);
|
|
47
|
+
})
|
|
48
|
+
}), jsx(ArrowRight, {
|
|
49
|
+
size: 24,
|
|
50
|
+
color: isNextAble ? theme.palette.primary.main : gray300Color,
|
|
51
|
+
style: {
|
|
52
|
+
cursor: 'pointer'
|
|
53
|
+
},
|
|
54
|
+
onClick: function onClick() {
|
|
55
|
+
if (onNext && isNextAble) {
|
|
56
|
+
onNext();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
})]
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export { EliceDottedPagination as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EliceDottedPagination } from './DottedPagination.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type IconButtonProps } from '@mui/material';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface EliceIconButtonProps extends IconButtonProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const EliceIconButton: ({ children, disabled, ...rest }: EliceIconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default EliceIconButton;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest } from 'tslib';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTheme, IconButton } from '@mui/material';
|
|
4
|
+
import { gray400Color, gray300Color } from '../tokenColorTemporary.js';
|
|
5
|
+
|
|
6
|
+
var EliceIconButton = function EliceIconButton(_a) {
|
|
7
|
+
var children = _a.children,
|
|
8
|
+
disabled = _a.disabled,
|
|
9
|
+
rest = __rest(_a, ["children", "disabled"]);
|
|
10
|
+
var theme = useTheme();
|
|
11
|
+
return jsx(IconButton, Object.assign({
|
|
12
|
+
disabled: disabled,
|
|
13
|
+
style: {
|
|
14
|
+
flexShrink: 0,
|
|
15
|
+
height: '3.5rem',
|
|
16
|
+
width: '3.5rem',
|
|
17
|
+
boxSizing: 'border-box',
|
|
18
|
+
backgroundColor: disabled ? gray300Color : theme.palette.primary.main,
|
|
19
|
+
borderRadius: '1rem',
|
|
20
|
+
color: disabled ? gray400Color : theme.palette.primary.light
|
|
21
|
+
}
|
|
22
|
+
}, rest, {
|
|
23
|
+
children: children
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { EliceIconButton as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EliceIconButton } from './IconButton.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from './AI-feedback';
|
|
2
|
+
export * from './badge';
|
|
3
|
+
export * from './button';
|
|
4
|
+
export * from './chat';
|
|
5
|
+
export * from './dialog';
|
|
6
|
+
export * from './dotted-pagination';
|
|
7
|
+
export * from './layout';
|
|
8
|
+
export * from './question';
|
|
9
|
+
export * from './dotted-pagination';
|
|
10
|
+
export * from './selection';
|
|
11
|
+
export * from './icon-button';
|
|
12
|
+
export * from './answer-feedback';
|
|
13
|
+
export * from './dotted-pagination';
|
|
14
|
+
export * from './table';
|
|
15
|
+
export * from './textarea';
|
|
16
|
+
export * from './tooltip';
|
|
17
|
+
export * from './AIDTTypography';
|
|
18
|
+
export * from './AdaptiveImage';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { default as EliceAIFeedback } from './AI-feedback/AIFeedback.js';
|
|
2
|
+
export { default as EliceBadge } from './badge/Badge.js';
|
|
3
|
+
export { default as EliceButton } from './button/Button.js';
|
|
4
|
+
export { default as EliceChat } from './chat/Chat.js';
|
|
5
|
+
export { default as EliceDialog } from './dialog/Dialog.js';
|
|
6
|
+
export { default as EliceDottedPagination } from './dotted-pagination/DottedPagination.js';
|
|
7
|
+
export { default as EliceLayout } from './layout/Layout.js';
|
|
8
|
+
export { default as EliceQuestion } from './question/Question.js';
|
|
9
|
+
export { default as EliceSelection } from './selection/Selection.js';
|
|
10
|
+
export { default as EliceIconButton } from './icon-button/IconButton.js';
|
|
11
|
+
export { default as EliceAnswerFeedback } from './answer-feedback/AnswerFeedback.js';
|
|
12
|
+
export { default as EliceTable } from './table/Table.js';
|
|
13
|
+
export { default as EliceTextarea } from './textarea/Textarea.js';
|
|
14
|
+
export { default as EliceTooltip } from './tooltip/Tooltip.js';
|
|
15
|
+
export { default as AIDTTypography } from './AIDTTypography/AIDTTypography.js';
|
|
16
|
+
export { default as EliceImage } from './AdaptiveImage/AdaptiveImage.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface EliceLayoutProps {
|
|
3
|
+
levelKey?: 'elementary' | 'middle' | 'high';
|
|
4
|
+
title: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
sideChildren?: ReactNode;
|
|
7
|
+
currentPage: number;
|
|
8
|
+
totalPage: number;
|
|
9
|
+
onReset?: VoidFunction;
|
|
10
|
+
onPrev?: VoidFunction;
|
|
11
|
+
onNext?: VoidFunction;
|
|
12
|
+
allowPre?: boolean;
|
|
13
|
+
allowNext?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const EliceLayout: (props: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export default EliceLayout;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useIsomorphicLayoutEffect } from 'react-use';
|
|
4
|
+
import LoopIcon from '@mui/icons-material/Loop';
|
|
5
|
+
import { Stack, Typography, useTheme } from '@mui/material';
|
|
6
|
+
import { secondaryColor, gray200Color, main300Color, main400Color, KeyElementaryBg, KeyMiddleBg, KeyHighBg } from '../tokenColorTemporary.js';
|
|
7
|
+
import img from './bg_pattern.png.js';
|
|
8
|
+
import ArrowLeft from '../../icons/ArrowLeft.js';
|
|
9
|
+
import ArrowRight from '../../icons/ArrowRight.js';
|
|
10
|
+
|
|
11
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
12
|
+
var StyledContainer = /*#__PURE__*/_styled(Stack, {
|
|
13
|
+
target: "efnp08i6"
|
|
14
|
+
})("production" === "production" ? {
|
|
15
|
+
name: "14skuem",
|
|
16
|
+
styles: "display:flex;flex-direction:column;height:100%;width:100%;min-height:10rem;max-height:calc(100vh - 3.5rem);box-sizing:border-box;position:relative;padding:1.5rem 3.125rem"
|
|
17
|
+
} : {
|
|
18
|
+
name: "14skuem",
|
|
19
|
+
styles: "display:flex;flex-direction:column;height:100%;width:100%;min-height:10rem;max-height:calc(100vh - 3.5rem);box-sizing:border-box;position:relative;padding:1.5rem 3.125rem",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
});
|
|
22
|
+
var StyledContentContainer = /*#__PURE__*/_styled(Stack, {
|
|
23
|
+
target: "efnp08i5"
|
|
24
|
+
})("production" === "production" ? {
|
|
25
|
+
name: "1p0a3is",
|
|
26
|
+
styles: "display:flex;flex-direction:column;flex-grow:1;gap:0px;position:relative;z-index:2;border-radius:2rem;background-color:rgb(255, 255, 255);overflow:hidden"
|
|
27
|
+
} : {
|
|
28
|
+
name: "1p0a3is",
|
|
29
|
+
styles: "display:flex;flex-direction:column;flex-grow:1;gap:0px;position:relative;z-index:2;border-radius:2rem;background-color:rgb(255, 255, 255);overflow:hidden",
|
|
30
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
|
+
});
|
|
32
|
+
var StyledTitleContainer = /*#__PURE__*/_styled(Stack, {
|
|
33
|
+
target: "efnp08i4"
|
|
34
|
+
})("background-color:", function (props) {
|
|
35
|
+
return props.backgroundColor ? props.backgroundColor : 'rgb(93, 107, 179)';
|
|
36
|
+
}, ";z-index:500;flex-shrink:0;height:4.625rem;width:fit-content;min-width:20.875rem;position:relative;top:auto;left:3.125rem;border-radius:0px 0px 1.625rem 1.625rem;padding-top:1rem;box-sizing:border-box;");
|
|
37
|
+
var StyledTitle = /*#__PURE__*/_styled(Typography, {
|
|
38
|
+
target: "efnp08i3"
|
|
39
|
+
})("production" === "production" ? {
|
|
40
|
+
name: "1gsf9d8",
|
|
41
|
+
styles: "border-top:0.125rem dashed rgb(255, 255, 255);height:100%;min-width:100%;text-align:center;font-size:1.375rem;font-weight:700;color:rgb(255, 255, 255);display:flex;align-items:center;justify-content:center"
|
|
42
|
+
} : {
|
|
43
|
+
name: "1gsf9d8",
|
|
44
|
+
styles: "border-top:0.125rem dashed rgb(255, 255, 255);height:100%;min-width:100%;text-align:center;font-size:1.375rem;font-weight:700;color:rgb(255, 255, 255);display:flex;align-items:center;justify-content:center",
|
|
45
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
46
|
+
});
|
|
47
|
+
var StyledScrollBarStack = /*#__PURE__*/_styled(Stack, {
|
|
48
|
+
target: "efnp08i2"
|
|
49
|
+
})("flex-grow:1;position:relative;max-height:100%;overflow-y:scroll;box-sizing:border-box;::-webkit-scrollbar{width:0.5rem;}::-webkit-scrollbar-track{background:", gray200Color, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", main300Color, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb:hover{background:", main400Color, ";}");
|
|
50
|
+
var StyledStepSwitcherContainerStack = /*#__PURE__*/_styled(Stack, {
|
|
51
|
+
target: "efnp08i1"
|
|
52
|
+
})("production" === "production" ? {
|
|
53
|
+
name: "8mh45e",
|
|
54
|
+
styles: "flex-direction:row;width:100%;height:4.25rem;justify-content:space-between;align-items:center;padding-left:1.5rem;padding-right:1.5rem;box-sizing:border-box;flex-shrink:0"
|
|
55
|
+
} : {
|
|
56
|
+
name: "8mh45e",
|
|
57
|
+
styles: "flex-direction:row;width:100%;height:4.25rem;justify-content:space-between;align-items:center;padding-left:1.5rem;padding-right:1.5rem;box-sizing:border-box;flex-shrink:0",
|
|
58
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
59
|
+
});
|
|
60
|
+
var StyledSwitchStepButton = /*#__PURE__*/_styled(Typography, {
|
|
61
|
+
target: "efnp08i0"
|
|
62
|
+
})("production" === "production" ? {
|
|
63
|
+
name: "9f748q",
|
|
64
|
+
styles: "cursor:pointer;font-size:1.625rem;font-weight:700;height:2.5rem;display:flex;align-items:center"
|
|
65
|
+
} : {
|
|
66
|
+
name: "9f748q",
|
|
67
|
+
styles: "cursor:pointer;font-size:1.625rem;font-weight:700;height:2.5rem;display:flex;align-items:center",
|
|
68
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
69
|
+
});
|
|
70
|
+
var EliceLayout = function EliceLayout(props) {
|
|
71
|
+
var _a;
|
|
72
|
+
var _props$levelKey = props.levelKey,
|
|
73
|
+
levelKey = _props$levelKey === void 0 ? 'middle' : _props$levelKey,
|
|
74
|
+
children = props.children,
|
|
75
|
+
sideChildren = props.sideChildren,
|
|
76
|
+
_props$title = props.title,
|
|
77
|
+
title = _props$title === void 0 ? 'The title' : _props$title,
|
|
78
|
+
currentPage = props.currentPage,
|
|
79
|
+
totalPage = props.totalPage,
|
|
80
|
+
allowNext = props.allowNext,
|
|
81
|
+
allowPre = props.allowPre,
|
|
82
|
+
onNext = props.onNext,
|
|
83
|
+
onPrev = props.onPrev,
|
|
84
|
+
onReset = props.onReset;
|
|
85
|
+
var theme = useTheme();
|
|
86
|
+
var renderBgColorByLevelKey = function renderBgColorByLevelKey() {
|
|
87
|
+
if (levelKey === 'elementary') {
|
|
88
|
+
return KeyElementaryBg;
|
|
89
|
+
} else if (levelKey === 'middle') {
|
|
90
|
+
return KeyMiddleBg;
|
|
91
|
+
} else {
|
|
92
|
+
return KeyHighBg;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
useIsomorphicLayoutEffect(function () {
|
|
96
|
+
document.documentElement.style.fontSize = '16px';
|
|
97
|
+
}, []);
|
|
98
|
+
return jsx(StyledContainer, {
|
|
99
|
+
style: {
|
|
100
|
+
background: "url(".concat(img, ")\n 100vw top repeat,\n ").concat((_a = theme.palette.background["default"]) !== null && _a !== void 0 ? _a : renderBgColorByLevelKey(), " left top repeat")
|
|
101
|
+
},
|
|
102
|
+
children: jsxs(StyledContentContainer, {
|
|
103
|
+
children: [jsx(StyledTitleContainer, {
|
|
104
|
+
backgroundColor: theme.palette.primary.main,
|
|
105
|
+
children: jsx(StyledTitle, {
|
|
106
|
+
children: title
|
|
107
|
+
})
|
|
108
|
+
}), !!onReset && jsx(Stack, {
|
|
109
|
+
style: {
|
|
110
|
+
position: 'absolute',
|
|
111
|
+
top: 0,
|
|
112
|
+
right: 0,
|
|
113
|
+
height: '3.5rem',
|
|
114
|
+
width: '3.5rem',
|
|
115
|
+
transform: 'scaleX(-1)'
|
|
116
|
+
},
|
|
117
|
+
alignItems: "center",
|
|
118
|
+
justifyContent: "center",
|
|
119
|
+
children: jsx(LoopIcon, {
|
|
120
|
+
onClick: onReset,
|
|
121
|
+
style: {
|
|
122
|
+
transform: 'rotate(135deg)',
|
|
123
|
+
color: secondaryColor,
|
|
124
|
+
cursor: 'pointer'
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
}), jsxs(Stack, {
|
|
128
|
+
direction: "row",
|
|
129
|
+
gap: "2rem",
|
|
130
|
+
width: "100%",
|
|
131
|
+
padding: "0px 3.125rem",
|
|
132
|
+
margin: "2rem 0px 1.625rem",
|
|
133
|
+
boxSizing: "border-box",
|
|
134
|
+
flexGrow: 1,
|
|
135
|
+
overflow: "hidden",
|
|
136
|
+
children: [jsx(StyledScrollBarStack, {
|
|
137
|
+
children: sideChildren
|
|
138
|
+
}), jsx(StyledScrollBarStack, {
|
|
139
|
+
children: children
|
|
140
|
+
})]
|
|
141
|
+
}), jsxs(StyledStepSwitcherContainerStack, {
|
|
142
|
+
children: [jsxs(StyledSwitchStepButton, {
|
|
143
|
+
color: allowPre ? '#0A379B' : '#8F8F8F',
|
|
144
|
+
onClick: function onClick() {
|
|
145
|
+
if (!allowPre || !onPrev) return;
|
|
146
|
+
onPrev();
|
|
147
|
+
},
|
|
148
|
+
children: [jsx(ArrowLeft, {
|
|
149
|
+
size: 24
|
|
150
|
+
}), '이전']
|
|
151
|
+
}), jsxs(Stack, {
|
|
152
|
+
direction: "row",
|
|
153
|
+
gap: 0,
|
|
154
|
+
alignItems: "center",
|
|
155
|
+
children: [jsx(Typography, {
|
|
156
|
+
color: "#5D6BB3",
|
|
157
|
+
fontSize: "2rem",
|
|
158
|
+
fontWeight: 900,
|
|
159
|
+
children: currentPage
|
|
160
|
+
}), jsx(Stack, {
|
|
161
|
+
style: {
|
|
162
|
+
border: '0.125rem solid #D8D8E2',
|
|
163
|
+
width: '2rem',
|
|
164
|
+
height: 0,
|
|
165
|
+
transform: 'rotate(-69deg)'
|
|
166
|
+
}
|
|
167
|
+
}), jsx(Typography, {
|
|
168
|
+
color: "#D8D8E2",
|
|
169
|
+
fontSize: "2rem",
|
|
170
|
+
fontWeight: 900,
|
|
171
|
+
children: totalPage
|
|
172
|
+
})]
|
|
173
|
+
}), jsxs(StyledSwitchStepButton, {
|
|
174
|
+
color: allowNext ? '#0A379B' : '#8F8F8F',
|
|
175
|
+
onClick: function onClick() {
|
|
176
|
+
if (!allowNext || !onNext) return;
|
|
177
|
+
onNext();
|
|
178
|
+
},
|
|
179
|
+
children: ['다음', jsx(ArrowRight, {
|
|
180
|
+
size: 24
|
|
181
|
+
})]
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
})
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export { EliceLayout as default };
|