@elicecontents/content-ui 1.0.3-alpha.0 → 1.0.4-alpha.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/components/Modal/Modal.d.ts +9 -0
- package/cjs/components/Modal/Modal.js +58 -0
- package/cjs/components/Modal/index.d.ts +2 -0
- package/cjs/components/Modal/index.js +7 -0
- package/cjs/components/answer-feedback/Correct.js +2 -2
- package/cjs/components/answer-feedback/Incorrect.js +2 -2
- package/cjs/components/chat/Chat.d.ts +4 -2
- package/cjs/components/chat/Chat.js +61 -52
- package/cjs/components/index.d.ts +1 -0
- package/cjs/components/index.js +2 -0
- package/cjs/components/layout/Footer/LayoutFooterPaging.js +23 -24
- package/cjs/components/layout/Footer/LayoutFooterSubmit.d.ts +7 -2
- package/cjs/components/layout/Footer/LayoutFooterSubmit.js +11 -3
- package/cjs/components/layout/Footer/index.d.ts +1 -0
- package/cjs/components/layout/Layout.d.ts +3 -2
- package/cjs/components/layout/Layout.js +7 -5
- package/cjs/components/layout/layout-pagination/LayoutPagination.js +4 -4
- package/cjs/components/pagination-button/PaginationButton.d.ts +1 -0
- package/cjs/components/pagination-button/PaginationButton.js +35 -14
- package/cjs/components/question/Question.js +7 -7
- package/cjs/components/tokenColorTemporary.js +2 -2
- package/cjs/icons/ReadyRecord.d.ts +6 -0
- package/cjs/icons/ReadyRecord.js +33 -0
- package/cjs/icons/RecordPause.d.ts +3 -0
- package/cjs/icons/RecordPause.js +30 -0
- package/cjs/icons/RecordPlay.d.ts +3 -0
- package/cjs/icons/RecordPlay.js +28 -0
- package/cjs/icons/Recording.d.ts +5 -0
- package/cjs/icons/Recording.js +37 -0
- package/cjs/icons/index.d.ts +4 -0
- package/cjs/icons/index.js +8 -0
- package/cjs/index.js +10 -0
- package/cjs/palettes/index.d.ts +2 -2
- package/cjs/palettes/index.js +4 -4
- package/cjs/palettes/type1.d.ts +2 -0
- package/cjs/palettes/{miraeN.js → type1.js} +2 -2
- package/cjs/palettes/type2.d.ts +2 -0
- package/cjs/palettes/{visang.js → type2.js} +2 -2
- package/cjs/palettes/types.d.ts +1 -1
- package/cjs/theme/AIDTTheme.js +6 -6
- package/cjs/theme/createAIDTTheme.d.ts +1 -1
- package/es/components/Modal/Modal.d.ts +9 -0
- package/es/components/Modal/Modal.js +50 -0
- package/es/components/Modal/index.d.ts +2 -0
- package/es/components/Modal/index.js +1 -0
- package/es/components/answer-feedback/Correct.js +2 -2
- package/es/components/answer-feedback/Incorrect.js +2 -2
- package/es/components/chat/Chat.d.ts +4 -2
- package/es/components/chat/Chat.js +61 -52
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/layout/Footer/LayoutFooterPaging.js +24 -25
- package/es/components/layout/Footer/LayoutFooterSubmit.d.ts +7 -2
- package/es/components/layout/Footer/LayoutFooterSubmit.js +11 -3
- package/es/components/layout/Footer/index.d.ts +1 -0
- package/es/components/layout/Layout.d.ts +3 -2
- package/es/components/layout/Layout.js +7 -5
- package/es/components/layout/layout-pagination/LayoutPagination.js +4 -4
- package/es/components/pagination-button/PaginationButton.d.ts +1 -0
- package/es/components/pagination-button/PaginationButton.js +35 -14
- package/es/components/question/Question.js +8 -8
- package/es/components/tokenColorTemporary.js +2 -2
- package/es/icons/ReadyRecord.d.ts +6 -0
- package/es/icons/ReadyRecord.js +29 -0
- package/es/icons/RecordPause.d.ts +3 -0
- package/es/icons/RecordPause.js +26 -0
- package/es/icons/RecordPlay.d.ts +3 -0
- package/es/icons/RecordPlay.js +24 -0
- package/es/icons/Recording.d.ts +5 -0
- package/es/icons/Recording.js +33 -0
- package/es/icons/index.d.ts +4 -0
- package/es/icons/index.js +4 -0
- package/es/index.js +5 -0
- package/es/palettes/index.d.ts +2 -2
- package/es/palettes/index.js +2 -2
- package/es/palettes/type1.d.ts +2 -0
- package/es/palettes/{miraeN.js → type1.js} +2 -2
- package/es/palettes/type2.d.ts +2 -0
- package/es/palettes/{visang.js → type2.js} +2 -2
- package/es/palettes/types.d.ts +1 -1
- package/es/theme/AIDTTheme.js +6 -6
- package/es/theme/createAIDTTheme.d.ts +1 -1
- package/package.json +1 -1
- package/cjs/palettes/miraeN.d.ts +0 -2
- package/cjs/palettes/visang.d.ts +0 -2
- package/es/palettes/miraeN.d.ts +0 -2
- package/es/palettes/visang.d.ts +0 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ModalProps } from '@mui/material';
|
|
2
|
+
export type EliceModalProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
handleClose: () => void;
|
|
5
|
+
iconClose?: boolean;
|
|
6
|
+
fontFamily?: string;
|
|
7
|
+
} & ModalProps;
|
|
8
|
+
declare const EliceModal: (props: EliceModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default EliceModal;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var HighlightOffIcon = require('@mui/icons-material/HighlightOff');
|
|
7
|
+
var material = require('@mui/material');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var HighlightOffIcon__default = /*#__PURE__*/_interopDefaultCompat(HighlightOffIcon);
|
|
12
|
+
|
|
13
|
+
var EliceModal = function EliceModal(props) {
|
|
14
|
+
var open = props.open,
|
|
15
|
+
handleClose = props.handleClose,
|
|
16
|
+
children = props.children,
|
|
17
|
+
_props$iconClose = props.iconClose,
|
|
18
|
+
iconClose = _props$iconClose === void 0 ? false : _props$iconClose;
|
|
19
|
+
return jsxRuntime.jsx(material.Modal, {
|
|
20
|
+
open: open,
|
|
21
|
+
onClose: handleClose,
|
|
22
|
+
"aria-labelledby": "modal-modal-title",
|
|
23
|
+
"aria-describedby": "modal-modal-description",
|
|
24
|
+
children: jsxRuntime.jsxs(material.Box, {
|
|
25
|
+
sx: Object.assign({
|
|
26
|
+
position: 'absolute',
|
|
27
|
+
top: '50%',
|
|
28
|
+
left: '50%',
|
|
29
|
+
transform: 'translate(-50%, -50%)',
|
|
30
|
+
maxWidth: '95vw',
|
|
31
|
+
minWidth: '80vw',
|
|
32
|
+
bgcolor: '#F4F6FF',
|
|
33
|
+
borderRadius: '2.6rem',
|
|
34
|
+
padding: '2.4rem 3.2rem 2.4rem 3.2rem',
|
|
35
|
+
outline: 'none'
|
|
36
|
+
}, props.sx),
|
|
37
|
+
children: [iconClose && jsxRuntime.jsx(material.Stack, {
|
|
38
|
+
display: "flex",
|
|
39
|
+
justifyContent: "flex-end",
|
|
40
|
+
alignItems: "flex-end",
|
|
41
|
+
children: jsxRuntime.jsx(HighlightOffIcon__default.default, {
|
|
42
|
+
onClick: handleClose,
|
|
43
|
+
sx: {
|
|
44
|
+
width: '2.7rem',
|
|
45
|
+
height: '2.7rem',
|
|
46
|
+
cursor: 'pointer'
|
|
47
|
+
},
|
|
48
|
+
color: "secondary"
|
|
49
|
+
})
|
|
50
|
+
}), jsxRuntime.jsx(material.Typography, {
|
|
51
|
+
variant: 'body1',
|
|
52
|
+
children: children
|
|
53
|
+
})]
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.default = EliceModal;
|
|
@@ -21,7 +21,7 @@ var Correct = function Correct() {
|
|
|
21
21
|
fill: "#31A54C"
|
|
22
22
|
}), jsxRuntime.jsx("path", {
|
|
23
23
|
d: "M305 156.143C305 164.614 304.235 172.935 302.836 181.045L135.835 299.693C66.9728 288.285 14.4545 228.363 14.4545 156.143C14.4545 75.7613 79.5038 10.6182 159.727 10.6182C239.951 10.6182 305 75.7614 305 156.143Z",
|
|
24
|
-
stroke: "".concat((_a = theme.palette.primary.main) !== null && _a !== void 0 ? _a : '
|
|
24
|
+
stroke: "".concat((_a = theme.palette.primary.main) !== null && _a !== void 0 ? _a : '#9BCAFF'),
|
|
25
25
|
"stroke-width": "12"
|
|
26
26
|
})]
|
|
27
27
|
}), jsxRuntime.jsx("path", {
|
|
@@ -31,7 +31,7 @@ var Correct = function Correct() {
|
|
|
31
31
|
"stroke-width": "4"
|
|
32
32
|
}), jsxRuntime.jsx("path", {
|
|
33
33
|
d: "M143.208 284.443C166.87 215.233 237.326 174.982 308.673 185.469L223.146 245.734L137.618 306C138.921 298.786 140.756 291.589 143.208 284.443Z",
|
|
34
|
-
fill: "".concat((_b = theme.palette.primary.main) !== null && _b !== void 0 ? _b : '
|
|
34
|
+
fill: "".concat((_b = theme.palette.primary.main) !== null && _b !== void 0 ? _b : '#9BCAFF')
|
|
35
35
|
}), jsxRuntime.jsx("defs", {
|
|
36
36
|
children: jsxRuntime.jsxs("filter", {
|
|
37
37
|
id: "filter0_d_596_8851",
|
|
@@ -21,7 +21,7 @@ var Incorrect = function Incorrect() {
|
|
|
21
21
|
fill: "url(#paint0_linear_596_8855)"
|
|
22
22
|
}), jsxRuntime.jsx("path", {
|
|
23
23
|
d: "M305 156.143C305 164.614 304.235 172.935 302.836 181.045L135.835 299.693C66.9728 288.285 14.4545 228.363 14.4545 156.143C14.4545 75.7613 79.5038 10.6182 159.727 10.6182C239.951 10.6182 305 75.7614 305 156.143Z",
|
|
24
|
-
stroke: "".concat((_a = theme.palette.primary.main) !== null && _a !== void 0 ? _a : '
|
|
24
|
+
stroke: "".concat((_a = theme.palette.primary.main) !== null && _a !== void 0 ? _a : '#9BCAFF'),
|
|
25
25
|
"stroke-width": "12"
|
|
26
26
|
})]
|
|
27
27
|
}), jsxRuntime.jsxs("mask", {
|
|
@@ -54,7 +54,7 @@ var Incorrect = function Incorrect() {
|
|
|
54
54
|
mask: "url(#path-3-outside-1_596_8855)"
|
|
55
55
|
}), jsxRuntime.jsx("path", {
|
|
56
56
|
d: "M143.208 284.443C166.87 215.233 237.326 174.982 308.673 185.469L137.618 306C138.921 298.786 140.756 291.589 143.208 284.443Z",
|
|
57
|
-
fill: "".concat((_b = theme.palette.primary.main) !== null && _b !== void 0 ? _b : '
|
|
57
|
+
fill: "".concat((_b = theme.palette.primary.main) !== null && _b !== void 0 ? _b : '#9BCAFF')
|
|
58
58
|
}), jsxRuntime.jsxs("defs", {
|
|
59
59
|
children: [jsxRuntime.jsxs("filter", {
|
|
60
60
|
id: "filter0_d_596_8855",
|
|
@@ -11,18 +11,20 @@ export interface EliceChatProps {
|
|
|
11
11
|
onChange: (text: string) => void;
|
|
12
12
|
onSend: (text: string) => void;
|
|
13
13
|
onRecord?: () => void;
|
|
14
|
+
height?: string;
|
|
14
15
|
onTranscribingChange?: (value: boolean) => void;
|
|
15
16
|
isLoadingMessage?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const EliceChat: {
|
|
18
|
-
({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, isLoadingMessage, }: EliceChatProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
MessageList({ messages, isLoadingMessage, scrollRef, }: {
|
|
19
|
+
({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, isLoadingMessage, height, }: EliceChatProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
MessageList({ messages, isLoadingMessage, scrollRef, height, }: {
|
|
20
21
|
messages: {
|
|
21
22
|
role: "system" | "user" | "assistant";
|
|
22
23
|
content: string;
|
|
23
24
|
}[];
|
|
24
25
|
isLoadingMessage?: boolean | undefined;
|
|
25
26
|
scrollRef: React.RefObject<HTMLDivElement>;
|
|
27
|
+
height?: string | undefined;
|
|
26
28
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
InputArea({ placeHolder, value, onChange, onSend, onReset, onRecord, onTranscribingChange, }: {
|
|
28
30
|
placeHolder: string;
|
|
@@ -22,67 +22,72 @@ var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
|
22
22
|
|
|
23
23
|
var StyledChatContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
24
24
|
target: "e1i7zt3"
|
|
25
|
-
})("height:fit-content;max-height:100%;
|
|
26
|
-
var
|
|
25
|
+
})("height:fit-content;max-height:100%;height:", function (_ref) {
|
|
26
|
+
var height = _ref.height;
|
|
27
|
+
return height;
|
|
28
|
+
}, ";min-width:30rem;max-width:100%;border:2px solid ", function (_ref2) {
|
|
29
|
+
var theme = _ref2.theme;
|
|
27
30
|
return theme.palette.grey[300];
|
|
28
31
|
}, ";border-radius:1.5rem;padding:1.5rem;gap:1.75rem;");
|
|
29
32
|
var StyledScrollBarStack = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
30
33
|
target: "e1i7zt2"
|
|
31
|
-
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (
|
|
32
|
-
var theme = _ref2.theme;
|
|
33
|
-
return theme.palette.grey[200];
|
|
34
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref3) {
|
|
34
|
+
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref3) {
|
|
35
35
|
var theme = _ref3.theme;
|
|
36
|
-
return theme.palette.
|
|
37
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb
|
|
36
|
+
return theme.palette.grey[200];
|
|
37
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref4) {
|
|
38
38
|
var theme = _ref4.theme;
|
|
39
|
+
return theme.palette.primary.main;
|
|
40
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb:hover{background:", function (_ref5) {
|
|
41
|
+
var theme = _ref5.theme;
|
|
39
42
|
return theme.palette.secondary.main;
|
|
40
43
|
}, ";}");
|
|
41
44
|
var StyledInput = /*#__PURE__*/_styled__default.default(material.Input, {
|
|
42
45
|
target: "e1i7zt1"
|
|
43
|
-
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (
|
|
44
|
-
var theme = _ref5.theme;
|
|
45
|
-
return theme.palette.secondary.main;
|
|
46
|
-
}, ";::placeholder{color:", function (_ref6) {
|
|
46
|
+
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (_ref6) {
|
|
47
47
|
var theme = _ref6.theme;
|
|
48
|
-
return theme.palette.
|
|
49
|
-
}, "
|
|
48
|
+
return theme.palette.secondary.main;
|
|
49
|
+
}, ";::placeholder{color:", function (_ref7) {
|
|
50
50
|
var theme = _ref7.theme;
|
|
51
|
-
return theme.palette.grey[
|
|
52
|
-
}, ";border-
|
|
51
|
+
return theme.palette.grey[300];
|
|
52
|
+
}, ";}::before{border:none;}:hover{::before{border:none;}}::after{border-bottom:none!important;}::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref8) {
|
|
53
53
|
var theme = _ref8.theme;
|
|
54
|
-
return theme.palette.
|
|
55
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb
|
|
54
|
+
return theme.palette.grey[200];
|
|
55
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref9) {
|
|
56
56
|
var theme = _ref9.theme;
|
|
57
|
+
return theme.palette.primary.main;
|
|
58
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb:hover{background:", function (_ref10) {
|
|
59
|
+
var theme = _ref10.theme;
|
|
57
60
|
return theme.palette.secondary.main;
|
|
58
61
|
}, ";}");
|
|
59
62
|
var StyledMessage = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
60
63
|
target: "e1i7zt0"
|
|
61
|
-
})("color:", function (
|
|
62
|
-
var isAssistant =
|
|
63
|
-
theme =
|
|
64
|
+
})("color:", function (_ref11) {
|
|
65
|
+
var isAssistant = _ref11.isAssistant,
|
|
66
|
+
theme = _ref11.theme;
|
|
64
67
|
return isAssistant ? theme.palette.text.secondary : theme.palette.secondary.main;
|
|
65
|
-
}, ";font-size:1rem;font-weight:", function (
|
|
66
|
-
var isAssistant =
|
|
68
|
+
}, ";font-size:1rem;font-weight:", function (_ref12) {
|
|
69
|
+
var isAssistant = _ref12.isAssistant;
|
|
67
70
|
return isAssistant ? 500 : 700;
|
|
68
|
-
}, ";background-color:", function (
|
|
69
|
-
var isAssistant =
|
|
70
|
-
theme =
|
|
71
|
+
}, ";background-color:", function (_ref13) {
|
|
72
|
+
var isAssistant = _ref13.isAssistant,
|
|
73
|
+
theme = _ref13.theme;
|
|
71
74
|
return isAssistant ? theme.palette.grey[50] : theme.palette.primary.light;
|
|
72
|
-
}, ";border-radius:1rem;padding:0.75rem;margin-bottom:16px;");
|
|
73
|
-
var _EliceChat = function EliceChat(
|
|
74
|
-
var
|
|
75
|
-
placeholder =
|
|
76
|
-
|
|
77
|
-
messages =
|
|
78
|
-
|
|
79
|
-
content =
|
|
80
|
-
onReset =
|
|
81
|
-
onSend =
|
|
82
|
-
_onChange =
|
|
83
|
-
onRecord =
|
|
84
|
-
onTranscribingChange =
|
|
85
|
-
isLoadingMessage =
|
|
75
|
+
}, ";border-radius:1rem;white-space:pre-wrap;padding:0.75rem;margin-bottom:16px;");
|
|
76
|
+
var _EliceChat = function EliceChat(_ref14) {
|
|
77
|
+
var _ref14$placeholder = _ref14.placeholder,
|
|
78
|
+
placeholder = _ref14$placeholder === void 0 ? "AI와 대화를 시작해 보세요" : _ref14$placeholder,
|
|
79
|
+
_ref14$messages = _ref14.messages,
|
|
80
|
+
messages = _ref14$messages === void 0 ? [] : _ref14$messages,
|
|
81
|
+
_ref14$content = _ref14.content,
|
|
82
|
+
content = _ref14$content === void 0 ? "" : _ref14$content,
|
|
83
|
+
onReset = _ref14.onReset,
|
|
84
|
+
onSend = _ref14.onSend,
|
|
85
|
+
_onChange = _ref14.onChange,
|
|
86
|
+
onRecord = _ref14.onRecord,
|
|
87
|
+
onTranscribingChange = _ref14.onTranscribingChange,
|
|
88
|
+
isLoadingMessage = _ref14.isLoadingMessage,
|
|
89
|
+
_ref14$height = _ref14.height,
|
|
90
|
+
height = _ref14$height === void 0 ? "100%" : _ref14$height;
|
|
86
91
|
var theme = material.useTheme();
|
|
87
92
|
var _useState = React.useState(content),
|
|
88
93
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
@@ -104,6 +109,7 @@ var _EliceChat = function EliceChat(_ref13) {
|
|
|
104
109
|
};
|
|
105
110
|
return jsxRuntime.jsxs(StyledChatContainer, {
|
|
106
111
|
theme: theme,
|
|
112
|
+
height: height,
|
|
107
113
|
children: [jsxRuntime.jsx(_EliceChat.MessageList, {
|
|
108
114
|
messages: messages,
|
|
109
115
|
isLoadingMessage: isLoadingMessage,
|
|
@@ -123,13 +129,16 @@ var _EliceChat = function EliceChat(_ref13) {
|
|
|
123
129
|
});
|
|
124
130
|
};
|
|
125
131
|
// ✅ 메시지 리스트 컴포넌트
|
|
126
|
-
_EliceChat.MessageList = function (
|
|
127
|
-
var messages =
|
|
128
|
-
isLoadingMessage =
|
|
129
|
-
scrollRef =
|
|
132
|
+
_EliceChat.MessageList = function (_ref15) {
|
|
133
|
+
var messages = _ref15.messages,
|
|
134
|
+
isLoadingMessage = _ref15.isLoadingMessage,
|
|
135
|
+
scrollRef = _ref15.scrollRef,
|
|
136
|
+
_ref15$height = _ref15.height,
|
|
137
|
+
height = _ref15$height === void 0 ? "100%" : _ref15$height;
|
|
130
138
|
var theme = material.useTheme();
|
|
131
139
|
return jsxRuntime.jsx(StyledScrollBarStack, {
|
|
132
140
|
theme: theme,
|
|
141
|
+
height: height,
|
|
133
142
|
children: messages.length === 0 ? jsxRuntime.jsx(material.Typography, {
|
|
134
143
|
color: theme.palette.text.disabled,
|
|
135
144
|
fontSize: "2rem",
|
|
@@ -158,14 +167,14 @@ _EliceChat.MessageList = function (_ref14) {
|
|
|
158
167
|
})
|
|
159
168
|
});
|
|
160
169
|
};
|
|
161
|
-
_EliceChat.InputArea = function (
|
|
162
|
-
var placeHolder =
|
|
163
|
-
value =
|
|
164
|
-
onChange =
|
|
165
|
-
onSend =
|
|
166
|
-
onReset =
|
|
167
|
-
onRecord =
|
|
168
|
-
onTranscribingChange =
|
|
170
|
+
_EliceChat.InputArea = function (_ref16) {
|
|
171
|
+
var placeHolder = _ref16.placeHolder,
|
|
172
|
+
value = _ref16.value,
|
|
173
|
+
onChange = _ref16.onChange,
|
|
174
|
+
onSend = _ref16.onSend,
|
|
175
|
+
onReset = _ref16.onReset,
|
|
176
|
+
onRecord = _ref16.onRecord,
|
|
177
|
+
onTranscribingChange = _ref16.onTranscribingChange;
|
|
169
178
|
var theme = material.useTheme();
|
|
170
179
|
return jsxRuntime.jsxs(material.Stack, {
|
|
171
180
|
direction: "row",
|
package/cjs/components/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var AIDTTypography = require('./AIDTTypography/AIDTTypography.js');
|
|
|
18
18
|
var AdaptiveImage = require('./AdaptiveImage/AdaptiveImage.js');
|
|
19
19
|
var SubtitleButton = require('./subtitle-button/SubtitleButton.js');
|
|
20
20
|
var BaseInput = require('./base-input/BaseInput.js');
|
|
21
|
+
var Modal = require('./Modal/Modal.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
@@ -39,3 +40,4 @@ exports.AIDTTypography = AIDTTypography.default;
|
|
|
39
40
|
exports.EliceImage = AdaptiveImage.default;
|
|
40
41
|
exports.EliceSubButton = SubtitleButton.default;
|
|
41
42
|
exports.BaseInput = BaseInput.default;
|
|
43
|
+
exports.EliceModal = Modal.default;
|
|
@@ -25,50 +25,49 @@ var FooterContainer = /*#__PURE__*/_styled__default.default("div", {
|
|
|
25
25
|
});
|
|
26
26
|
var FooterPagination = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
27
27
|
target: "ecog5a41"
|
|
28
|
-
})("
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} :
|
|
32
|
-
name: "17qwk4",
|
|
33
|
-
styles: "padding:0 32px",
|
|
34
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
35
|
-
});
|
|
28
|
+
})("padding:", function (_ref) {
|
|
29
|
+
var isTablet = _ref.isTablet;
|
|
30
|
+
return isTablet ? "0 10px" : "0 32px";
|
|
31
|
+
}, ";white-space:nowrap;");
|
|
36
32
|
var StyledCurrentPage = /*#__PURE__*/_styled__default.default("span", {
|
|
37
33
|
target: "ecog5a40"
|
|
38
|
-
})("color:", function (
|
|
39
|
-
var fontColor =
|
|
34
|
+
})("color:", function (_ref2) {
|
|
35
|
+
var fontColor = _ref2.fontColor;
|
|
40
36
|
return fontColor;
|
|
41
37
|
}, ";");
|
|
42
|
-
var LayoutFooterPaging = function LayoutFooterPaging(
|
|
43
|
-
var currentPage =
|
|
44
|
-
totalPage =
|
|
45
|
-
onPrev =
|
|
46
|
-
onNext =
|
|
47
|
-
|
|
48
|
-
allowPrev =
|
|
49
|
-
|
|
50
|
-
allowNext =
|
|
38
|
+
var LayoutFooterPaging = function LayoutFooterPaging(_ref3) {
|
|
39
|
+
var currentPage = _ref3.currentPage,
|
|
40
|
+
totalPage = _ref3.totalPage,
|
|
41
|
+
onPrev = _ref3.onPrev,
|
|
42
|
+
onNext = _ref3.onNext,
|
|
43
|
+
_ref3$allowPrev = _ref3.allowPrev,
|
|
44
|
+
allowPrev = _ref3$allowPrev === void 0 ? true : _ref3$allowPrev,
|
|
45
|
+
_ref3$allowNext = _ref3.allowNext,
|
|
46
|
+
allowNext = _ref3$allowNext === void 0 ? true : _ref3$allowNext;
|
|
51
47
|
var theme = material.useTheme();
|
|
52
48
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
53
|
-
|
|
49
|
+
isTablet = _useAIDTMediaQuery.isTablet;
|
|
54
50
|
return jsxRuntime.jsxs(FooterContainer, {
|
|
55
|
-
children: [
|
|
51
|
+
children: [isTablet && jsxRuntime.jsx(PaginationButton.default, {
|
|
56
52
|
left: true,
|
|
57
53
|
onClick: onPrev,
|
|
58
|
-
disabled: !allowPrev
|
|
54
|
+
disabled: !allowPrev,
|
|
55
|
+
size: 28
|
|
59
56
|
}), jsxRuntime.jsxs(FooterPagination, {
|
|
60
57
|
variant: "pagination",
|
|
61
58
|
sx: {
|
|
62
59
|
color: "#D8D8E2"
|
|
63
60
|
},
|
|
61
|
+
isTablet: isTablet,
|
|
64
62
|
children: [jsxRuntime.jsx(StyledCurrentPage, {
|
|
65
63
|
fontColor: theme.palette.primary.main,
|
|
66
64
|
children: currentPage
|
|
67
65
|
}), " ", "/ ", totalPage]
|
|
68
|
-
}),
|
|
66
|
+
}), isTablet && jsxRuntime.jsx(PaginationButton.default, {
|
|
69
67
|
right: true,
|
|
70
68
|
onClick: onNext,
|
|
71
|
-
disabled: !allowNext
|
|
69
|
+
disabled: !allowNext,
|
|
70
|
+
size: 28
|
|
72
71
|
})]
|
|
73
72
|
});
|
|
74
73
|
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface LayoutFooterSubmitProps {
|
|
2
|
+
isRollback?: boolean;
|
|
3
|
+
isSubmit?: boolean;
|
|
4
|
+
onRollback?: () => void;
|
|
5
|
+
onSubmit?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, onSubmit, onRollback, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
8
|
export default LayoutFooterSubmit;
|
|
@@ -6,14 +6,22 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var material = require('@mui/material');
|
|
7
7
|
var Button = require('../../button/Button.js');
|
|
8
8
|
|
|
9
|
-
var LayoutFooterSubmit = function LayoutFooterSubmit() {
|
|
9
|
+
var LayoutFooterSubmit = function LayoutFooterSubmit(_ref) {
|
|
10
|
+
var _ref$isRollback = _ref.isRollback,
|
|
11
|
+
isRollback = _ref$isRollback === void 0 ? false : _ref$isRollback,
|
|
12
|
+
_ref$isSubmit = _ref.isSubmit,
|
|
13
|
+
isSubmit = _ref$isSubmit === void 0 ? false : _ref$isSubmit,
|
|
14
|
+
onSubmit = _ref.onSubmit,
|
|
15
|
+
onRollback = _ref.onRollback;
|
|
10
16
|
return jsxRuntime.jsxs(material.Stack, {
|
|
11
17
|
direction: "row",
|
|
12
18
|
spacing: 1,
|
|
13
|
-
children: [jsxRuntime.jsx(Button.default, {
|
|
19
|
+
children: [isRollback && jsxRuntime.jsx(Button.default, {
|
|
14
20
|
variant: "outlined",
|
|
21
|
+
onClick: onRollback,
|
|
15
22
|
children: "\uB2E4\uC2DC\uD558\uAE30"
|
|
16
|
-
}), jsxRuntime.jsx(Button.default, {
|
|
23
|
+
}), isSubmit && jsxRuntime.jsx(Button.default, {
|
|
24
|
+
onClick: onSubmit,
|
|
17
25
|
children: "\uC81C\uCD9C\uD558\uAE30"
|
|
18
26
|
})]
|
|
19
27
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as LayoutFooterPaging } from './LayoutFooterPaging';
|
|
2
2
|
export { default as LayoutFooterSubmit } from './LayoutFooterSubmit';
|
|
3
3
|
export type { LayoutFooterPagingProps } from './LayoutFooterPaging';
|
|
4
|
+
export type { LayoutFooterSubmitProps } from './LayoutFooterSubmit';
|
|
@@ -7,9 +7,10 @@ export interface EliceLayoutProps {
|
|
|
7
7
|
onNext?: () => void;
|
|
8
8
|
allowPrev?: boolean;
|
|
9
9
|
allowNext?: boolean;
|
|
10
|
+
onlyPage?: boolean;
|
|
10
11
|
}
|
|
11
12
|
type Alignment = "left" | "center" | "right";
|
|
12
|
-
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
|
+
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
13
14
|
HeaderContainer: ({ children }: {
|
|
14
15
|
children: React.ReactNode;
|
|
15
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -32,6 +33,6 @@ declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, b
|
|
|
32
33
|
children: React.ReactNode;
|
|
33
34
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
35
|
FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
35
|
-
FooterSubmit:
|
|
36
|
+
FooterSubmit: ({ isRollback, isSubmit, onSubmit, onRollback, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
37
|
};
|
|
37
38
|
export default EliceLayout;
|
|
@@ -27,13 +27,13 @@ var MainContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
|
27
27
|
})("width:100%;height:100vh;display:flex;flex-direction:column;padding:", function (_ref) {
|
|
28
28
|
var isMiniTablet = _ref.isMiniTablet;
|
|
29
29
|
return isMiniTablet ? "0 20px" : "0 40px";
|
|
30
|
-
}, ";box-sizing:border-box;position:relative;
|
|
30
|
+
}, ";box-sizing:border-box;position:relative;background-image:", function (_ref2) {
|
|
31
31
|
var backgroundImage = _ref2.backgroundImage;
|
|
32
32
|
return backgroundImage ? "url(".concat(backgroundImage, ")") : "none";
|
|
33
33
|
}, ";background-size:cover;background-position:center;background-color:", function (_ref3) {
|
|
34
34
|
var backgroundColor = _ref3.backgroundColor;
|
|
35
|
-
return backgroundColor
|
|
36
|
-
}, ";");
|
|
35
|
+
return backgroundColor !== null && backgroundColor !== void 0 ? backgroundColor : "#fff";
|
|
36
|
+
}, ";overflow-y:hidden;");
|
|
37
37
|
var _HeaderContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
38
38
|
target: "efnp08i5"
|
|
39
39
|
})("production" === "production" ? {
|
|
@@ -110,7 +110,9 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
110
110
|
allowPrev = _ref14.allowPrev,
|
|
111
111
|
allowNext = _ref14.allowNext,
|
|
112
112
|
backgroundImage = _ref14.backgroundImage,
|
|
113
|
-
backgroundColor = _ref14.backgroundColor
|
|
113
|
+
backgroundColor = _ref14.backgroundColor,
|
|
114
|
+
_ref14$onlyPage = _ref14.onlyPage,
|
|
115
|
+
onlyPage = _ref14$onlyPage === void 0 ? false : _ref14$onlyPage;
|
|
114
116
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
115
117
|
isTablet = _useAIDTMediaQuery.isTablet,
|
|
116
118
|
isMiniTablet = _useAIDTMediaQuery.isMiniTablet;
|
|
@@ -127,7 +129,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
127
129
|
isMiniTablet: isMiniTablet,
|
|
128
130
|
backgroundImage: backgroundImage,
|
|
129
131
|
backgroundColor: backgroundColor,
|
|
130
|
-
children: [!isTablet && jsxRuntime.jsx(LayoutPagination.default, {
|
|
132
|
+
children: [!onlyPage && !isTablet && jsxRuntime.jsx(LayoutPagination.default, {
|
|
131
133
|
onPrev: onPrev,
|
|
132
134
|
onNext: onNext,
|
|
133
135
|
allowPrev: allowPrev,
|
|
@@ -14,11 +14,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
var PaginationWrapper = /*#__PURE__*/_styled__default.default("div", {
|
|
15
15
|
target: "e8oep9n0"
|
|
16
16
|
})("production" === "production" ? {
|
|
17
|
-
name: "
|
|
18
|
-
styles: "position:absolute;top:50%;left:10px;width:calc(100% - 20px);display:flex;justify-content:space-between;align-items:center;z-index:100;transform:translateY(-50%)"
|
|
17
|
+
name: "1mp32h2",
|
|
18
|
+
styles: "position:absolute;top:50%;left:10px;width:calc(100% - 20px);display:flex;justify-content:space-between;align-items:center;z-index:100;transform:translateY(-50%);pointer-events:none"
|
|
19
19
|
} : {
|
|
20
|
-
name: "
|
|
21
|
-
styles: "position:absolute;top:50%;left:10px;width:calc(100% - 20px);display:flex;justify-content:space-between;align-items:center;z-index:100;transform:translateY(-50%)",
|
|
20
|
+
name: "1mp32h2",
|
|
21
|
+
styles: "position:absolute;top:50%;left:10px;width:calc(100% - 20px);display:flex;justify-content:space-between;align-items:center;z-index:100;transform:translateY(-50%);pointer-events:none",
|
|
22
22
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
23
|
});
|
|
24
24
|
var LayoutPagination = function LayoutPagination(_ref) {
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var useAIDTMediaQuery = require('../../hooks/useAIDTMediaQuery.js');
|
|
7
8
|
var ArrowLeft = require('../../icons/ArrowLeft.js');
|
|
8
9
|
var ArrowRight = require('../../icons/ArrowRight.js');
|
|
9
10
|
require('tslib');
|
|
@@ -15,26 +16,46 @@ var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
|
15
16
|
|
|
16
17
|
var Button = /*#__PURE__*/_styled__default.default("button", {
|
|
17
18
|
target: "e16dnw7i0"
|
|
18
|
-
})("width:
|
|
19
|
-
var
|
|
19
|
+
})("width:", function (_ref) {
|
|
20
|
+
var size = _ref.size;
|
|
21
|
+
return size ? "".concat(size, "px") : "60px";
|
|
22
|
+
}, ";height:", function (_ref2) {
|
|
23
|
+
var size = _ref2.size;
|
|
24
|
+
return size ? "".concat(size, "px") : "60px";
|
|
25
|
+
}, ";display:flex;align-items:center;justify-content:center;border:none;pointer-events:auto;background-color:", function (_ref3) {
|
|
26
|
+
var disabled = _ref3.disabled;
|
|
20
27
|
return disabled ? "#ddd" : "#fff";
|
|
21
|
-
}, ";border-radius:40px;box-shadow:
|
|
22
|
-
var
|
|
28
|
+
}, ";border-radius:40px;box-shadow:", function (_ref4) {
|
|
29
|
+
var isTablet = _ref4.isTablet;
|
|
30
|
+
return isTablet ? "none" : "0px 0px 1px 0px rgba(0, 0, 0, 0.40), 0px 8px 10px 0px rgba(0, 0, 0, 0.05), 0px 8px 30px 0px rgba(0, 0, 0, 0.12)";
|
|
31
|
+
}, ";cursor:", function (_ref5) {
|
|
32
|
+
var disabled = _ref5.disabled;
|
|
23
33
|
return disabled ? "not-allowed" : "pointer";
|
|
24
|
-
}, ";&:hover{background-color:", function (
|
|
25
|
-
var disabled =
|
|
26
|
-
|
|
34
|
+
}, ";&:hover{background-color:", function (_ref6) {
|
|
35
|
+
var disabled = _ref6.disabled,
|
|
36
|
+
isTablet = _ref6.isTablet;
|
|
37
|
+
return isTablet ? disabled ? "#ddd" : "#e0e0e0" : "none";
|
|
27
38
|
}, ";}");
|
|
28
|
-
var PaginationButton = function PaginationButton(
|
|
29
|
-
var left =
|
|
30
|
-
right =
|
|
31
|
-
onClick =
|
|
32
|
-
|
|
33
|
-
disabled =
|
|
39
|
+
var PaginationButton = function PaginationButton(_ref7) {
|
|
40
|
+
var left = _ref7.left,
|
|
41
|
+
right = _ref7.right,
|
|
42
|
+
onClick = _ref7.onClick,
|
|
43
|
+
_ref7$disabled = _ref7.disabled,
|
|
44
|
+
disabled = _ref7$disabled === void 0 ? false : _ref7$disabled,
|
|
45
|
+
size = _ref7.size;
|
|
46
|
+
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
47
|
+
isTablet = _useAIDTMediaQuery.isTablet;
|
|
48
|
+
console.log(isTablet);
|
|
34
49
|
return jsxRuntime.jsxs(Button, {
|
|
35
50
|
onClick: onClick,
|
|
36
51
|
disabled: disabled,
|
|
37
|
-
|
|
52
|
+
isTablet: isTablet,
|
|
53
|
+
size: size,
|
|
54
|
+
children: [left && jsxRuntime.jsx(ArrowLeft.default, {
|
|
55
|
+
size: size
|
|
56
|
+
}), right && jsxRuntime.jsx(ArrowRight.default, {
|
|
57
|
+
size: size
|
|
58
|
+
})]
|
|
38
59
|
});
|
|
39
60
|
};
|
|
40
61
|
|
|
@@ -15,8 +15,8 @@ var StyledMark = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
|
15
15
|
target: "e7imhnw0"
|
|
16
16
|
})("align-items:center;justify-content:center;flex-shrink:0;width:2.5rem;height:2.5rem;border-radius:50%;border-style:dashed;border-width:0.125rem;border-color:", function (props) {
|
|
17
17
|
var _a;
|
|
18
|
-
return (_a = props.borderColor) !== null && _a !== void 0 ? _a : tokenColorTemporary.
|
|
19
|
-
}, ";position:relative;::before{content:'';position:absolute;width:
|
|
18
|
+
return (_a = props.borderColor) !== null && _a !== void 0 ? _a : tokenColorTemporary.primaryColor;
|
|
19
|
+
}, ";position:relative;::before{content:'';position:absolute;width:1.75rem;height:1.75rem;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:50%;background-color:", function (props) {
|
|
20
20
|
var _a;
|
|
21
21
|
return (_a = props.contentColor) !== null && _a !== void 0 ? _a : tokenColorTemporary.KeyElementaryBg;
|
|
22
22
|
}, ";}");
|
|
@@ -29,12 +29,12 @@ var EliceQuestion = function EliceQuestion(_ref) {
|
|
|
29
29
|
direction: "row",
|
|
30
30
|
gap: "1rem",
|
|
31
31
|
children: [jsxRuntime.jsx(StyledMark, {
|
|
32
|
-
contentColor: theme.palette.
|
|
32
|
+
contentColor: theme.palette.background["default"],
|
|
33
33
|
borderColor: theme.palette.primary.main,
|
|
34
34
|
children: jsxRuntime.jsxs(material.Typography, {
|
|
35
35
|
fontWeight: 800,
|
|
36
|
-
fontSize: "1.
|
|
37
|
-
color:
|
|
36
|
+
fontSize: "1.3rem",
|
|
37
|
+
color: tokenColorTemporary.primaryColor,
|
|
38
38
|
position: "relative",
|
|
39
39
|
children: ["Q", jsxRuntime.jsx("span", {
|
|
40
40
|
style: {
|
|
@@ -44,8 +44,8 @@ var EliceQuestion = function EliceQuestion(_ref) {
|
|
|
44
44
|
})]
|
|
45
45
|
})
|
|
46
46
|
}), jsxRuntime.jsx(material.Typography, {
|
|
47
|
-
color: theme.palette.
|
|
48
|
-
variant: "
|
|
47
|
+
color: theme.palette.grey[900],
|
|
48
|
+
variant: "subtitle1",
|
|
49
49
|
children: question
|
|
50
50
|
})]
|
|
51
51
|
});
|