@elicecontents/content-ui 1.0.12 → 1.0.14
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/AI-feedback/AIFeedback.d.ts +5 -2
- package/cjs/components/AI-feedback/AIFeedback.js +6 -5
- package/cjs/components/Modal/Modal.js +3 -1
- package/cjs/components/button/Button.d.ts +2 -0
- package/cjs/components/button/Button.js +7 -3
- package/cjs/components/chat/Chat.d.ts +4 -2
- package/cjs/components/chat/Chat.js +49 -39
- package/cjs/components/layout/Footer/LayoutFooterPaging.js +4 -4
- package/cjs/components/recorder-step/RecorderStep.d.ts +4 -1
- package/cjs/components/recorder-step/RecorderStep.js +7 -1
- package/cjs/hooks/index.d.ts +1 -1
- package/cjs/hooks/index.js +4 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +3 -1
- package/cjs/theme/createAIDTTheme.d.ts +2 -79
- package/cjs/theme/createAIDTTheme.js +0 -3
- package/cjs/tokens/colors/common.js +2 -1
- package/cjs/types/theme-augmentation.d.ts +61 -0
- package/cjs/types/theme.types.d.ts +67 -0
- package/es/components/AI-feedback/AIFeedback.d.ts +5 -2
- package/es/components/AI-feedback/AIFeedback.js +7 -6
- package/es/components/Modal/Modal.js +3 -1
- package/es/components/button/Button.d.ts +2 -0
- package/es/components/button/Button.js +7 -3
- package/es/components/chat/Chat.d.ts +4 -2
- package/es/components/chat/Chat.js +49 -39
- package/es/components/layout/Footer/LayoutFooterPaging.js +4 -4
- package/es/components/recorder-step/RecorderStep.d.ts +4 -1
- package/es/components/recorder-step/RecorderStep.js +7 -1
- package/es/hooks/index.d.ts +1 -1
- package/es/hooks/index.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -0
- package/es/theme/createAIDTTheme.d.ts +2 -79
- package/es/theme/createAIDTTheme.js +0 -3
- package/es/tokens/colors/common.js +2 -1
- package/es/types/theme-augmentation.d.ts +61 -0
- package/es/types/theme.types.d.ts +67 -0
- package/package.json +1 -1
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { EliceTooltipProps } from '../tooltip';
|
|
2
|
-
export type EliceAIFeedbackProps = Omit<EliceTooltipProps, 'children'
|
|
3
|
-
|
|
3
|
+
export type EliceAIFeedbackProps = Omit<EliceTooltipProps, 'children'> & {
|
|
4
|
+
CustomAvatar?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const EliceAIFeedback: ({ title, placement, CustomAvatar, ...rest }: EliceAIFeedbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
export default EliceAIFeedback;
|
|
@@ -12,23 +12,24 @@ var EliceAIFeedback = function EliceAIFeedback(_a) {
|
|
|
12
12
|
var title = _a.title,
|
|
13
13
|
_a$placement = _a.placement,
|
|
14
14
|
placement = _a$placement === void 0 ? 'left' : _a$placement,
|
|
15
|
-
|
|
15
|
+
CustomAvatar = _a.CustomAvatar,
|
|
16
|
+
rest = tslib.__rest(_a, ["title", "placement", "CustomAvatar"]);
|
|
16
17
|
return jsxRuntime.jsx(Tooltip.default, Object.assign({
|
|
17
18
|
title: title,
|
|
18
19
|
placement: placement
|
|
19
20
|
}, rest, {
|
|
20
21
|
isControl: true,
|
|
21
22
|
triggerAction: "click",
|
|
22
|
-
children: jsxRuntime.
|
|
23
|
+
children: jsxRuntime.jsxs(material.Stack, {
|
|
23
24
|
position: "relative",
|
|
24
25
|
width: "fit-content",
|
|
25
26
|
height: "fit-content",
|
|
26
27
|
maxWidth: "100%",
|
|
27
28
|
maxHeight: "100%",
|
|
28
|
-
children: jsxRuntime.jsx("img", {
|
|
29
|
+
children: [CustomAvatar !== null && CustomAvatar !== void 0 ? CustomAvatar : jsxRuntime.jsx("img", {
|
|
29
30
|
src: AIAvatar.default,
|
|
30
|
-
alt: ""
|
|
31
|
-
})
|
|
31
|
+
alt: "AI Avatar"
|
|
32
|
+
}), " "]
|
|
32
33
|
})
|
|
33
34
|
}));
|
|
34
35
|
};
|
|
@@ -36,10 +36,12 @@ var EliceModal = function EliceModal(props) {
|
|
|
36
36
|
}, props.sx),
|
|
37
37
|
children: [iconClose && jsxRuntime.jsx(material.Stack, {
|
|
38
38
|
display: "flex",
|
|
39
|
+
position: "relative",
|
|
39
40
|
justifyContent: "flex-end",
|
|
41
|
+
zIndex: 1200,
|
|
40
42
|
alignItems: "flex-end",
|
|
43
|
+
onClick: handleClose,
|
|
41
44
|
children: jsxRuntime.jsx(HighlightOffIcon__default.default, {
|
|
42
|
-
onClick: handleClose,
|
|
43
45
|
sx: {
|
|
44
46
|
width: '2.7rem',
|
|
45
47
|
height: '2.7rem',
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { type ButtonProps } from '@mui/material';
|
|
3
3
|
export interface EliceButtonProps extends ButtonProps {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
textColor?: string;
|
|
6
|
+
bgColor?: string;
|
|
5
7
|
}
|
|
6
8
|
declare const EliceButton: React.ForwardRefExoticComponent<Omit<EliceButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
9
|
export default EliceButton;
|
|
@@ -13,10 +13,14 @@ var EliceButton = React.forwardRef(function (_a, ref) {
|
|
|
13
13
|
_a$variant = _a.variant,
|
|
14
14
|
variant = _a$variant === void 0 ? 'contained' : _a$variant,
|
|
15
15
|
disabled = _a.disabled,
|
|
16
|
-
|
|
16
|
+
textColor = _a.textColor,
|
|
17
|
+
bgColor = _a.bgColor,
|
|
18
|
+
rest = tslib.__rest(_a, ["children", "variant", "disabled", "textColor", "bgColor"]);
|
|
17
19
|
var theme = material.useTheme();
|
|
18
20
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
19
21
|
isMiniTablet = _useAIDTMediaQuery.isMiniTablet;
|
|
22
|
+
var resolvedColor = textColor !== null && textColor !== void 0 ? textColor : disabled ? theme.palette.text.disabled : variant === 'outlined' ? theme.palette.primary.main : theme.palette.common.white;
|
|
23
|
+
var resolvedBgColor = bgColor !== null && bgColor !== void 0 ? bgColor : variant === 'outlined' ? theme.palette.common.white : disabled ? theme.palette.grey[300] : theme.palette.primary.main;
|
|
20
24
|
return jsxRuntime.jsx(material.Button, Object.assign({
|
|
21
25
|
ref: ref,
|
|
22
26
|
variant: variant,
|
|
@@ -26,8 +30,8 @@ var EliceButton = React.forwardRef(function (_a, ref) {
|
|
|
26
30
|
height: isMiniTablet ? '42px' : '56px',
|
|
27
31
|
borderRadius: isMiniTablet ? '12px' : '16px',
|
|
28
32
|
padding: isMiniTablet ? '8px 12px' : '12px 20px',
|
|
29
|
-
color:
|
|
30
|
-
backgroundColor:
|
|
33
|
+
color: resolvedColor,
|
|
34
|
+
backgroundColor: resolvedBgColor,
|
|
31
35
|
fontFamily: 'inherit'
|
|
32
36
|
}
|
|
33
37
|
}, rest, {
|
|
@@ -20,13 +20,14 @@ export interface EliceChatProps {
|
|
|
20
20
|
isDisabled?: boolean;
|
|
21
21
|
backgroundImage?: string;
|
|
22
22
|
CustomAssistantAvatar?: React.ReactNode;
|
|
23
|
+
CustomUserAvatar?: React.ReactNode;
|
|
23
24
|
type?: string;
|
|
24
25
|
recorderType?: RecorderType;
|
|
25
26
|
isOnlyRecord: boolean;
|
|
26
27
|
}
|
|
27
28
|
declare const EliceChat: {
|
|
28
29
|
(props: React.ComponentProps<typeof EliceChatContainer>): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
MessageList({ messages, isLoadingMessage, scrollRef, height, CustomAssistantAvatar, }: {
|
|
30
|
+
MessageList({ messages, isLoadingMessage, scrollRef, height, CustomAssistantAvatar, CustomUserAvatar, }: {
|
|
30
31
|
messages: {
|
|
31
32
|
role: "system" | "user" | "assistant";
|
|
32
33
|
content: string;
|
|
@@ -35,6 +36,7 @@ declare const EliceChat: {
|
|
|
35
36
|
scrollRef: React.RefObject<HTMLDivElement>;
|
|
36
37
|
height?: string | undefined;
|
|
37
38
|
CustomAssistantAvatar: React.ReactNode;
|
|
39
|
+
CustomUserAvatar: React.ReactNode;
|
|
38
40
|
}): import("react/jsx-runtime").JSX.Element;
|
|
39
41
|
InputArea({ placeHolder, value, isDisabled, onChange, onSend, onReset, onRecord, onTranscribingChange, isOnlyRecord, }: {
|
|
40
42
|
placeHolder: string;
|
|
@@ -51,5 +53,5 @@ declare const EliceChat: {
|
|
|
51
53
|
isOnlyRecord: boolean;
|
|
52
54
|
}): import("react/jsx-runtime").JSX.Element;
|
|
53
55
|
};
|
|
54
|
-
declare const EliceChatContainer: ({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, setAudioFile, onTransform, isLoadingMessage, CustomAssistantAvatar, isDisabled, backgroundImage, height, recorderType, isOnlyRecord }: EliceChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
declare const EliceChatContainer: ({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, setAudioFile, onTransform, isLoadingMessage, CustomAssistantAvatar, CustomUserAvatar, isDisabled, backgroundImage, height, recorderType, isOnlyRecord }: EliceChatProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
57
|
export default EliceChat;
|
|
@@ -6,6 +6,7 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
|
6
6
|
var _styled = require('@emotion/styled/base');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
|
+
var useAIDTMediaQuery = require('../../hooks/useAIDTMediaQuery.js');
|
|
9
10
|
var material = require('@mui/material');
|
|
10
11
|
require('tslib');
|
|
11
12
|
var Micro = require('../../icons/Micro.js');
|
|
@@ -46,6 +47,7 @@ var EliceChatContainer = function EliceChatContainer(_ref) {
|
|
|
46
47
|
onTransform = _ref.onTransform,
|
|
47
48
|
isLoadingMessage = _ref.isLoadingMessage,
|
|
48
49
|
CustomAssistantAvatar = _ref.CustomAssistantAvatar,
|
|
50
|
+
CustomUserAvatar = _ref.CustomUserAvatar,
|
|
49
51
|
_ref$isDisabled = _ref.isDisabled,
|
|
50
52
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
51
53
|
backgroundImage = _ref.backgroundImage,
|
|
@@ -56,6 +58,8 @@ var EliceChatContainer = function EliceChatContainer(_ref) {
|
|
|
56
58
|
_ref$isOnlyRecord = _ref.isOnlyRecord,
|
|
57
59
|
isOnlyRecord = _ref$isOnlyRecord === void 0 ? false : _ref$isOnlyRecord;
|
|
58
60
|
var theme = material.useTheme();
|
|
61
|
+
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
62
|
+
isTablet = _useAIDTMediaQuery.isTablet;
|
|
59
63
|
var _useState = React.useState(content),
|
|
60
64
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
61
65
|
inputValue = _useState2[0],
|
|
@@ -84,6 +88,7 @@ var EliceChatContainer = function EliceChatContainer(_ref) {
|
|
|
84
88
|
}
|
|
85
89
|
};
|
|
86
90
|
return jsxRuntime.jsxs(StyledChatContainer, {
|
|
91
|
+
isTablet: isTablet,
|
|
87
92
|
theme: theme,
|
|
88
93
|
height: height,
|
|
89
94
|
backgroundImage: backgroundImage,
|
|
@@ -108,7 +113,8 @@ var EliceChatContainer = function EliceChatContainer(_ref) {
|
|
|
108
113
|
messages: messages,
|
|
109
114
|
isLoadingMessage: isLoadingMessage,
|
|
110
115
|
scrollRef: scrollRef,
|
|
111
|
-
CustomAssistantAvatar: CustomAssistantAvatar
|
|
116
|
+
CustomAssistantAvatar: CustomAssistantAvatar,
|
|
117
|
+
CustomUserAvatar: CustomUserAvatar
|
|
112
118
|
}), jsxRuntime.jsx(EliceChat.InputArea, {
|
|
113
119
|
placeHolder: placeholder,
|
|
114
120
|
value: inputValue,
|
|
@@ -135,7 +141,8 @@ EliceChat.MessageList = function (_ref2) {
|
|
|
135
141
|
scrollRef = _ref2.scrollRef,
|
|
136
142
|
_ref2$height = _ref2.height,
|
|
137
143
|
height = _ref2$height === void 0 ? "100%" : _ref2$height,
|
|
138
|
-
CustomAssistantAvatar = _ref2.CustomAssistantAvatar
|
|
144
|
+
CustomAssistantAvatar = _ref2.CustomAssistantAvatar,
|
|
145
|
+
CustomUserAvatar = _ref2.CustomUserAvatar;
|
|
139
146
|
var theme = material.useTheme();
|
|
140
147
|
return jsxRuntime.jsx(StyledScrollBarStack, {
|
|
141
148
|
theme: theme,
|
|
@@ -159,7 +166,7 @@ EliceChat.MessageList = function (_ref2) {
|
|
|
159
166
|
alignItems: "center",
|
|
160
167
|
children: [jsxRuntime.jsx(material.Stack, {
|
|
161
168
|
flexShrink: 0,
|
|
162
|
-
children: isAssistant ? CustomAssistantAvatar !== null && CustomAssistantAvatar !== void 0 ? CustomAssistantAvatar : jsxRuntime.jsx(AssistantAvatar.default, {}) : jsxRuntime.jsx(UserAvatar.default, {})
|
|
169
|
+
children: isAssistant ? CustomAssistantAvatar !== null && CustomAssistantAvatar !== void 0 ? CustomAssistantAvatar : jsxRuntime.jsx(AssistantAvatar.default, {}) : CustomUserAvatar !== null && CustomUserAvatar !== void 0 ? CustomUserAvatar : jsxRuntime.jsx(UserAvatar.default, {})
|
|
163
170
|
}), jsxRuntime.jsx(StyledMessage, {
|
|
164
171
|
isAssistant: isAssistant,
|
|
165
172
|
theme: theme,
|
|
@@ -245,55 +252,58 @@ var StyledChatContainer = /*#__PURE__*/_styled__default.default(material.Stack,
|
|
|
245
252
|
})("position:relative;max-height:100%;height:", function (_ref4) {
|
|
246
253
|
var height = _ref4.height;
|
|
247
254
|
return height !== null && height !== void 0 ? height : 'fit-content';
|
|
248
|
-
}, ";min-width:
|
|
249
|
-
var
|
|
255
|
+
}, ";min-width:", function (_ref5) {
|
|
256
|
+
var isTablet = _ref5.isTablet;
|
|
257
|
+
return isTablet ? '0' : '30rem';
|
|
258
|
+
}, ";max-width:100%;border:2px solid ", function (_ref6) {
|
|
259
|
+
var theme = _ref6.theme;
|
|
250
260
|
return theme.palette.grey[300];
|
|
251
|
-
}, ";border-radius:1.5rem;padding:1.5rem;gap:1.75rem;", function (
|
|
252
|
-
var backgroundImage =
|
|
261
|
+
}, ";border-radius:1.5rem;padding:1.5rem;gap:1.75rem;", function (_ref7) {
|
|
262
|
+
var backgroundImage = _ref7.backgroundImage;
|
|
253
263
|
return backgroundImage && "\n background-image: url(".concat(backgroundImage, ");\n background-size: cover;\n background-position: center;\n ");
|
|
254
264
|
}, ";");
|
|
255
265
|
var StyledScrollBarStack = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
256
266
|
target: "e1i7zt7"
|
|
257
|
-
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (
|
|
258
|
-
var theme = _ref7.theme;
|
|
259
|
-
return theme.palette.grey[200];
|
|
260
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref8) {
|
|
267
|
+
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref8) {
|
|
261
268
|
var theme = _ref8.theme;
|
|
262
|
-
return theme.palette.
|
|
263
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb
|
|
269
|
+
return theme.palette.grey[200];
|
|
270
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref9) {
|
|
264
271
|
var theme = _ref9.theme;
|
|
272
|
+
return theme.palette.primary.main;
|
|
273
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb:hover{background:", function (_ref10) {
|
|
274
|
+
var theme = _ref10.theme;
|
|
265
275
|
return theme.palette.secondary.main;
|
|
266
276
|
}, ";}");
|
|
267
277
|
var StyledInput = /*#__PURE__*/_styled__default.default(material.Input, {
|
|
268
278
|
target: "e1i7zt6"
|
|
269
|
-
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (
|
|
270
|
-
var theme = _ref10.theme;
|
|
271
|
-
return theme.palette.secondary.main;
|
|
272
|
-
}, ";::placeholder{color:", function (_ref11) {
|
|
279
|
+
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (_ref11) {
|
|
273
280
|
var theme = _ref11.theme;
|
|
274
|
-
return theme.palette.
|
|
275
|
-
}, "
|
|
281
|
+
return theme.palette.secondary.main;
|
|
282
|
+
}, ";::placeholder{color:", function (_ref12) {
|
|
276
283
|
var theme = _ref12.theme;
|
|
277
|
-
return theme.palette.grey[
|
|
278
|
-
}, ";border-
|
|
284
|
+
return theme.palette.grey[300];
|
|
285
|
+
}, ";}::before{border:none;}:hover{::before{border:none;}}::after{border-bottom:none!important;}::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref13) {
|
|
279
286
|
var theme = _ref13.theme;
|
|
280
|
-
return theme.palette.
|
|
281
|
-
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb
|
|
287
|
+
return theme.palette.grey[200];
|
|
288
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb{background:", function (_ref14) {
|
|
282
289
|
var theme = _ref14.theme;
|
|
290
|
+
return theme.palette.primary.main;
|
|
291
|
+
}, ";border-radius:0.5rem;}::-webkit-scrollbar-thumb:hover{background:", function (_ref15) {
|
|
292
|
+
var theme = _ref15.theme;
|
|
283
293
|
return theme.palette.secondary.main;
|
|
284
294
|
}, ";}");
|
|
285
295
|
var StyledMessage = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
286
296
|
target: "e1i7zt5"
|
|
287
|
-
})("color:", function (
|
|
288
|
-
var isAssistant =
|
|
289
|
-
theme =
|
|
297
|
+
})("color:", function (_ref16) {
|
|
298
|
+
var isAssistant = _ref16.isAssistant,
|
|
299
|
+
theme = _ref16.theme;
|
|
290
300
|
return isAssistant ? theme.palette.text.secondary : theme.palette.secondary.main;
|
|
291
|
-
}, ";font-size:1rem;font-weight:", function (
|
|
292
|
-
var isAssistant =
|
|
301
|
+
}, ";font-size:1rem;font-weight:", function (_ref17) {
|
|
302
|
+
var isAssistant = _ref17.isAssistant;
|
|
293
303
|
return isAssistant ? 500 : 700;
|
|
294
|
-
}, ";background-color:", function (
|
|
295
|
-
var isAssistant =
|
|
296
|
-
theme =
|
|
304
|
+
}, ";background-color:", function (_ref18) {
|
|
305
|
+
var isAssistant = _ref18.isAssistant,
|
|
306
|
+
theme = _ref18.theme;
|
|
297
307
|
return isAssistant ? theme.palette.grey[50] : theme.palette.primary.light;
|
|
298
308
|
}, ";border-radius:1rem;white-space:pre-wrap;padding:0.75rem;margin-bottom:16px;");
|
|
299
309
|
var EmptyMessageContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
@@ -338,17 +348,17 @@ var OverlayContent = /*#__PURE__*/_styled__default.default(material.Box, {
|
|
|
338
348
|
});
|
|
339
349
|
var OnlyRecordButton = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
340
350
|
target: "e1i7zt0"
|
|
341
|
-
})("color:", function (
|
|
342
|
-
var theme = _ref18.theme;
|
|
343
|
-
return theme.palette.common.white;
|
|
344
|
-
}, ";background:", function (_ref19) {
|
|
351
|
+
})("color:", function (_ref19) {
|
|
345
352
|
var theme = _ref19.theme;
|
|
346
|
-
return theme.palette.common.
|
|
347
|
-
}, "
|
|
353
|
+
return theme.palette.common.white;
|
|
354
|
+
}, ";background:", function (_ref20) {
|
|
348
355
|
var theme = _ref20.theme;
|
|
349
|
-
return theme.palette.common.red[
|
|
350
|
-
}, "
|
|
356
|
+
return theme.palette.common.red[900];
|
|
357
|
+
}, ";&:hover{background:", function (_ref21) {
|
|
351
358
|
var theme = _ref21.theme;
|
|
359
|
+
return theme.palette.common.red[600];
|
|
360
|
+
}, ";color:", function (_ref22) {
|
|
361
|
+
var theme = _ref22.theme;
|
|
352
362
|
return theme.palette.common.red[900];
|
|
353
363
|
}, ";}");
|
|
354
364
|
|
|
@@ -16,11 +16,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
16
16
|
var FooterContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
17
17
|
target: "ecog5a42"
|
|
18
18
|
})("production" === "production" ? {
|
|
19
|
-
name: "
|
|
20
|
-
styles: "display:flex;align-items:center;justify-content:center;gap:12px"
|
|
19
|
+
name: "z2w5c4",
|
|
20
|
+
styles: "display:flex;align-items:center;justify-content:center;white-space:nowrap;flex-direction:row;gap:12px"
|
|
21
21
|
} : {
|
|
22
|
-
name: "
|
|
23
|
-
styles: "display:flex;align-items:center;justify-content:center;gap:12px",
|
|
22
|
+
name: "z2w5c4",
|
|
23
|
+
styles: "display:flex;align-items:center;justify-content:center;white-space:nowrap;flex-direction:row;gap:12px",
|
|
24
24
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
25
|
});
|
|
26
26
|
var FooterPagination = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
@@ -6,11 +6,14 @@ export interface EliceRecorderStepProps {
|
|
|
6
6
|
onTransform?: () => void;
|
|
7
7
|
type?: RecorderType;
|
|
8
8
|
visualType?: SoundVisualizerVariant;
|
|
9
|
+
isReadyVisual?: boolean;
|
|
9
10
|
onRecord?: () => void;
|
|
11
|
+
onResume?: () => void;
|
|
12
|
+
onPause?: () => void;
|
|
10
13
|
closeRecorder?: () => void;
|
|
11
14
|
onTranscribingChange?: (value: boolean) => void;
|
|
12
15
|
isLoadingMessage?: boolean;
|
|
13
16
|
forcedStep?: RecorderStep;
|
|
14
17
|
}
|
|
15
|
-
declare const EliceRecorderStep: ({ onAudioReady, onTransform, visualType, onRecord, type, onTranscribingChange, forcedStep, closeRecorder, }: EliceRecorderStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare const EliceRecorderStep: ({ onAudioReady, onTransform, visualType, onRecord, type, isReadyVisual, onResume, onPause, onTranscribingChange, forcedStep, closeRecorder, }: EliceRecorderStepProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
19
|
export default EliceRecorderStep;
|
|
@@ -28,6 +28,10 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
28
28
|
onRecord = _ref.onRecord,
|
|
29
29
|
_ref$type = _ref.type,
|
|
30
30
|
type = _ref$type === void 0 ? "notNeed" : _ref$type,
|
|
31
|
+
_ref$isReadyVisual = _ref.isReadyVisual,
|
|
32
|
+
isReadyVisual = _ref$isReadyVisual === void 0 ? false : _ref$isReadyVisual,
|
|
33
|
+
onResume = _ref.onResume,
|
|
34
|
+
onPause = _ref.onPause,
|
|
31
35
|
onTranscribingChange = _ref.onTranscribingChange,
|
|
32
36
|
forcedStep = _ref.forcedStep,
|
|
33
37
|
closeRecorder = _ref.closeRecorder;
|
|
@@ -68,9 +72,11 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
68
72
|
};
|
|
69
73
|
}();
|
|
70
74
|
var handlePause = function handlePause() {
|
|
75
|
+
onPause === null || onPause === void 0 ? void 0 : onPause();
|
|
71
76
|
pauseRecording();
|
|
72
77
|
};
|
|
73
78
|
var handleResume = function handleResume() {
|
|
79
|
+
onResume === null || onResume === void 0 ? void 0 : onResume();
|
|
74
80
|
resumeRecording();
|
|
75
81
|
};
|
|
76
82
|
var handleStop = function handleStop() {
|
|
@@ -98,7 +104,7 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
98
104
|
variant: visualType,
|
|
99
105
|
onClickRecord: handleStart
|
|
100
106
|
}) : jsxRuntime.jsxs(StyledVisualizerBox, {
|
|
101
|
-
children: [jsxRuntime.jsx(SoundVisualizer.SoundVisualizer, {
|
|
107
|
+
children: [!isReadyVisual && jsxRuntime.jsx(SoundVisualizer.SoundVisualizer, {
|
|
102
108
|
analyser: recorderState.analyser,
|
|
103
109
|
variant: visualType,
|
|
104
110
|
bgColor: theme.palette.common.white
|
package/cjs/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as useAIDTMediaQuery } from './useAIDTMediaQuery';
|
package/cjs/hooks/index.js
CHANGED
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('@mui/material/styles');
|
|
3
4
|
var AIFeedback = require('./components/AI-feedback/AIFeedback.js');
|
|
4
5
|
var Badge = require('./components/badge/Badge.js');
|
|
5
6
|
var Button = require('./components/button/Button.js');
|
|
@@ -48,7 +49,7 @@ var Recording = require('./icons/Recording.js');
|
|
|
48
49
|
var ReadyRecord = require('./icons/ReadyRecord.js');
|
|
49
50
|
var RecordPlay = require('./icons/RecordPlay.js');
|
|
50
51
|
var SendArrow = require('./icons/SendArrow.js');
|
|
51
|
-
require('
|
|
52
|
+
var useAIDTMediaQuery = require('./hooks/useAIDTMediaQuery.js');
|
|
52
53
|
var mint = require('./tokens/colors/mint.js');
|
|
53
54
|
var bluepurple = require('./tokens/colors/bluepurple.js');
|
|
54
55
|
var gray = require('./tokens/colors/gray.js');
|
|
@@ -110,6 +111,7 @@ exports.Recording = Recording.default;
|
|
|
110
111
|
exports.ReadyRecord = ReadyRecord.default;
|
|
111
112
|
exports.RecordPlay = RecordPlay.default;
|
|
112
113
|
exports.SendArrow = SendArrow.default;
|
|
114
|
+
exports.useAIDTMediaQuery = useAIDTMediaQuery.default;
|
|
113
115
|
exports.mint = mint.mint;
|
|
114
116
|
exports.bluepurple = bluepurple.bluepurple;
|
|
115
117
|
exports.gray = gray.gray;
|
|
@@ -1,80 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import type { TypographyFontFamilyType } from '../typography';
|
|
4
|
-
declare module '@mui/material/styles' {
|
|
5
|
-
interface TypographyVariants {
|
|
6
|
-
pagination: React.CSSProperties;
|
|
7
|
-
buttoninput: React.CSSProperties;
|
|
8
|
-
}
|
|
9
|
-
interface CommonColors {
|
|
10
|
-
white: string;
|
|
11
|
-
black: string;
|
|
12
|
-
text: {
|
|
13
|
-
primary: string;
|
|
14
|
-
secondary: string;
|
|
15
|
-
teritary: string;
|
|
16
|
-
inverse: string;
|
|
17
|
-
};
|
|
18
|
-
point: {
|
|
19
|
-
point1: string;
|
|
20
|
-
point2: string;
|
|
21
|
-
point3: string;
|
|
22
|
-
point4: string;
|
|
23
|
-
};
|
|
24
|
-
red: {
|
|
25
|
-
50: string;
|
|
26
|
-
100: string;
|
|
27
|
-
200: string;
|
|
28
|
-
600: string;
|
|
29
|
-
900: string;
|
|
30
|
-
};
|
|
31
|
-
green: {
|
|
32
|
-
50: string;
|
|
33
|
-
100: string;
|
|
34
|
-
200: string;
|
|
35
|
-
600: string;
|
|
36
|
-
900: string;
|
|
37
|
-
opacity: {
|
|
38
|
-
15: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
yellow: {
|
|
42
|
-
200: string;
|
|
43
|
-
900: string;
|
|
44
|
-
opacity: {
|
|
45
|
-
'200-30': string;
|
|
46
|
-
'900-30': string;
|
|
47
|
-
'900-60': string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
declare module '@mui/material/Typography' {
|
|
53
|
-
interface TypographyPropsVariantOverrides {
|
|
54
|
-
pagination: true;
|
|
55
|
-
buttoninput: true;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
export interface MuiPalette {
|
|
59
|
-
light: PaletteOptions;
|
|
60
|
-
dark: PaletteOptions;
|
|
61
|
-
}
|
|
62
|
-
export type AIDTPalettePublisher = 'elice' | 'type1' | 'type2';
|
|
63
|
-
export type AIDTPaletteSubject = 'korean' | 'computerScience' | 'english' | 'socialStudy' | 'math' | 'science';
|
|
64
|
-
export type AIDTPaletteLevel = 'elementary' | 'middle' | 'high';
|
|
65
|
-
export interface SurfaceColor {
|
|
66
|
-
border: string;
|
|
67
|
-
}
|
|
68
|
-
export interface CreateAIDTThemeProps {
|
|
69
|
-
paletteMode?: PaletteMode;
|
|
70
|
-
palettePublisher?: AIDTPalettePublisher;
|
|
71
|
-
paletteSubject?: AIDTPaletteSubject;
|
|
72
|
-
paletteLevel?: AIDTPaletteLevel;
|
|
73
|
-
typographyFontFamily: TypographyFontFamilyType;
|
|
74
|
-
}
|
|
75
|
-
export type CreateAIDTTheme = (props?: CreateAIDTThemeProps) => Theme;
|
|
76
|
-
/**
|
|
77
|
-
* Create AIDT Theme according to PaletteName, pallettPublisher, pallettSubject, pallettLevel
|
|
78
|
-
**/
|
|
79
|
-
declare const createAIDTTheme: ({ paletteMode, palettePublisher, paletteSubject, paletteLevel, typographyFontFamily, }: CreateAIDTThemeProps) => Theme;
|
|
1
|
+
import type { CreateAIDTThemeProps } from '../types/theme.types';
|
|
2
|
+
declare const createAIDTTheme: ({ paletteMode, palettePublisher, paletteSubject, paletteLevel, typographyFontFamily, }: CreateAIDTThemeProps) => import("@mui/material").Theme;
|
|
80
3
|
export { createAIDTTheme };
|
|
@@ -7,9 +7,6 @@ var _base = require('./_base.js');
|
|
|
7
7
|
var AIDTTheme = require('./AIDTTheme.js');
|
|
8
8
|
var breakpoints = require('../breakpoints/breakpoints.js');
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* Create AIDT Theme according to PaletteName, pallettPublisher, pallettSubject, pallettLevel
|
|
12
|
-
**/
|
|
13
10
|
var createAIDTTheme = function createAIDTTheme(_ref) {
|
|
14
11
|
var _ref$paletteMode = _ref.paletteMode,
|
|
15
12
|
paletteMode = _ref$paletteMode === void 0 ? 'light' : _ref$paletteMode,
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import '@mui/material/styles';
|
|
3
|
+
declare module '@mui/material/styles' {
|
|
4
|
+
interface TypographyVariants {
|
|
5
|
+
pagination: React.CSSProperties;
|
|
6
|
+
buttoninput: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
interface TypographyVariantsOptions {
|
|
9
|
+
pagination?: React.CSSProperties;
|
|
10
|
+
buttoninput?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
interface CommonColors {
|
|
13
|
+
white: string;
|
|
14
|
+
black: string;
|
|
15
|
+
text: {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
teritary: string;
|
|
19
|
+
inverse: string;
|
|
20
|
+
};
|
|
21
|
+
point: {
|
|
22
|
+
point1: string;
|
|
23
|
+
point2: string;
|
|
24
|
+
point3: string;
|
|
25
|
+
point4: string;
|
|
26
|
+
};
|
|
27
|
+
red: {
|
|
28
|
+
50: string;
|
|
29
|
+
100: string;
|
|
30
|
+
200: string;
|
|
31
|
+
600: string;
|
|
32
|
+
900: string;
|
|
33
|
+
};
|
|
34
|
+
green: {
|
|
35
|
+
50: string;
|
|
36
|
+
100: string;
|
|
37
|
+
200: string;
|
|
38
|
+
600: string;
|
|
39
|
+
900: string;
|
|
40
|
+
opacity: {
|
|
41
|
+
15: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
yellow: {
|
|
45
|
+
200: string;
|
|
46
|
+
900: string;
|
|
47
|
+
opacity: {
|
|
48
|
+
'200-30': string;
|
|
49
|
+
'900-30': string;
|
|
50
|
+
'900-60': string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
declare module '@mui/material/Typography' {
|
|
56
|
+
interface TypographyPropsVariantOverrides {
|
|
57
|
+
subtitle3: true;
|
|
58
|
+
pagination: true;
|
|
59
|
+
buttoninput: true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PaletteMode, PaletteOptions, Theme } from '@mui/material';
|
|
3
|
+
import type { TypographyFontFamilyType } from '../typography';
|
|
4
|
+
export interface TypographyVariantsExtension {
|
|
5
|
+
pagination: React.CSSProperties;
|
|
6
|
+
buttoninput: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export interface CommonColors {
|
|
9
|
+
white: string;
|
|
10
|
+
black: string;
|
|
11
|
+
text: {
|
|
12
|
+
primary: string;
|
|
13
|
+
secondary: string;
|
|
14
|
+
teritary: string;
|
|
15
|
+
inverse: string;
|
|
16
|
+
};
|
|
17
|
+
point: {
|
|
18
|
+
point1: string;
|
|
19
|
+
point2: string;
|
|
20
|
+
point3: string;
|
|
21
|
+
point4: string;
|
|
22
|
+
};
|
|
23
|
+
red: {
|
|
24
|
+
50: string;
|
|
25
|
+
100: string;
|
|
26
|
+
200: string;
|
|
27
|
+
600: string;
|
|
28
|
+
900: string;
|
|
29
|
+
};
|
|
30
|
+
green: {
|
|
31
|
+
50: string;
|
|
32
|
+
100: string;
|
|
33
|
+
200: string;
|
|
34
|
+
600: string;
|
|
35
|
+
900: string;
|
|
36
|
+
opacity: {
|
|
37
|
+
15: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
yellow: {
|
|
41
|
+
200: string;
|
|
42
|
+
900: string;
|
|
43
|
+
opacity: {
|
|
44
|
+
'200-30': string;
|
|
45
|
+
'900-30': string;
|
|
46
|
+
'900-60': string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export interface MuiPalette {
|
|
51
|
+
light: PaletteOptions;
|
|
52
|
+
dark: PaletteOptions;
|
|
53
|
+
}
|
|
54
|
+
export type AIDTPalettePublisher = 'elice' | 'type1' | 'type2';
|
|
55
|
+
export type AIDTPaletteSubject = 'korean' | 'computerScience' | 'english' | 'socialStudy' | 'math' | 'science';
|
|
56
|
+
export type AIDTPaletteLevel = 'elementary' | 'middle' | 'high';
|
|
57
|
+
export interface SurfaceColor {
|
|
58
|
+
border: string;
|
|
59
|
+
}
|
|
60
|
+
export interface CreateAIDTThemeProps {
|
|
61
|
+
paletteMode?: PaletteMode;
|
|
62
|
+
palettePublisher?: AIDTPalettePublisher;
|
|
63
|
+
paletteSubject?: AIDTPaletteSubject;
|
|
64
|
+
paletteLevel?: AIDTPaletteLevel;
|
|
65
|
+
typographyFontFamily: TypographyFontFamilyType;
|
|
66
|
+
}
|
|
67
|
+
export type CreateAIDTTheme = (props?: CreateAIDTThemeProps) => Theme;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { EliceTooltipProps } from '../tooltip';
|
|
2
|
-
export type EliceAIFeedbackProps = Omit<EliceTooltipProps, 'children'
|
|
3
|
-
|
|
3
|
+
export type EliceAIFeedbackProps = Omit<EliceTooltipProps, 'children'> & {
|
|
4
|
+
CustomAvatar?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
declare const EliceAIFeedback: ({ title, placement, CustomAvatar, ...rest }: EliceAIFeedbackProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
export default EliceAIFeedback;
|