@elicecontents/content-ui 1.0.9 → 1.0.10-rc.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/chat/Chat.js +45 -14
- package/cjs/components/layout/Footer/LayoutFooterPaging.d.ts +2 -0
- package/cjs/components/layout/Footer/LayoutFooterPaging.js +4 -2
- package/cjs/components/layout/Footer/LayoutFooterSubmit.d.ts +3 -1
- package/cjs/components/layout/Footer/LayoutFooterSubmit.js +3 -1
- package/cjs/components/layout/Header/LayoutHeaderSubTitle.d.ts +3 -1
- package/cjs/components/layout/Header/LayoutHeaderSubTitle.js +3 -1
- package/cjs/components/layout/Header/LayoutHeaderTitle.d.ts +3 -1
- package/cjs/components/layout/Header/LayoutHeaderTitle.js +3 -1
- package/cjs/components/layout/Layout.d.ts +16 -9
- package/cjs/components/layout/Layout.js +19 -10
- package/cjs/icons/SendArrow.d.ts +4 -0
- package/cjs/icons/SendArrow.js +32 -0
- package/cjs/icons/index.d.ts +1 -0
- package/cjs/icons/index.js +2 -0
- package/cjs/index.js +2 -0
- package/es/components/chat/Chat.js +46 -15
- package/es/components/layout/Footer/LayoutFooterPaging.d.ts +2 -0
- package/es/components/layout/Footer/LayoutFooterPaging.js +5 -3
- package/es/components/layout/Footer/LayoutFooterSubmit.d.ts +3 -1
- package/es/components/layout/Footer/LayoutFooterSubmit.js +3 -1
- package/es/components/layout/Header/LayoutHeaderSubTitle.d.ts +3 -1
- package/es/components/layout/Header/LayoutHeaderSubTitle.js +3 -1
- package/es/components/layout/Header/LayoutHeaderTitle.d.ts +3 -1
- package/es/components/layout/Header/LayoutHeaderTitle.js +3 -1
- package/es/components/layout/Layout.d.ts +16 -9
- package/es/components/layout/Layout.js +20 -11
- package/es/icons/SendArrow.d.ts +4 -0
- package/es/icons/SendArrow.js +28 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +1 -0
- package/es/index.js +1 -0
- package/package.json +1 -1
|
@@ -10,8 +10,9 @@ var material = require('@mui/material');
|
|
|
10
10
|
require('tslib');
|
|
11
11
|
var Micro = require('../../icons/Micro.js');
|
|
12
12
|
var Reset = require('../../icons/Reset.js');
|
|
13
|
-
var
|
|
13
|
+
var SendArrow = require('../../icons/SendArrow.js');
|
|
14
14
|
var IconButton = require('../icon-button/IconButton.js');
|
|
15
|
+
var AIAvatar = require('../../assets/AIAvatar.png.js');
|
|
15
16
|
var AssistantAvatar = require('./AssistantAvatar.js');
|
|
16
17
|
var UserAvatar = require('./UserAvatar.js');
|
|
17
18
|
var TypingIndicator = require('./TypingIndicator.js');
|
|
@@ -23,7 +24,7 @@ var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
|
23
24
|
|
|
24
25
|
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)."; }
|
|
25
26
|
var StyledChatContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
26
|
-
target: "
|
|
27
|
+
target: "e1i7zt6"
|
|
27
28
|
})("position:relative;max-height:100%;height:", function (_ref) {
|
|
28
29
|
var height = _ref.height;
|
|
29
30
|
return height !== null && height !== void 0 ? height : 'fit-content';
|
|
@@ -35,7 +36,7 @@ var StyledChatContainer = /*#__PURE__*/_styled__default.default(material.Stack,
|
|
|
35
36
|
return backgroundImage && "\n background-image: url(".concat(backgroundImage, ");\n background-size: cover;\n background-position: center;\n ");
|
|
36
37
|
}, ";");
|
|
37
38
|
var StyledScrollBarStack = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
38
|
-
target: "
|
|
39
|
+
target: "e1i7zt5"
|
|
39
40
|
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref4) {
|
|
40
41
|
var theme = _ref4.theme;
|
|
41
42
|
return theme.palette.grey[200];
|
|
@@ -47,7 +48,7 @@ var StyledScrollBarStack = /*#__PURE__*/_styled__default.default(material.Stack,
|
|
|
47
48
|
return theme.palette.secondary.main;
|
|
48
49
|
}, ";}");
|
|
49
50
|
var StyledInput = /*#__PURE__*/_styled__default.default(material.Input, {
|
|
50
|
-
target: "
|
|
51
|
+
target: "e1i7zt4"
|
|
51
52
|
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (_ref7) {
|
|
52
53
|
var theme = _ref7.theme;
|
|
53
54
|
return theme.palette.secondary.main;
|
|
@@ -65,7 +66,7 @@ var StyledInput = /*#__PURE__*/_styled__default.default(material.Input, {
|
|
|
65
66
|
return theme.palette.secondary.main;
|
|
66
67
|
}, ";}");
|
|
67
68
|
var StyledMessage = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
68
|
-
target: "
|
|
69
|
+
target: "e1i7zt3"
|
|
69
70
|
})("color:", function (_ref12) {
|
|
70
71
|
var isAssistant = _ref12.isAssistant,
|
|
71
72
|
theme = _ref12.theme;
|
|
@@ -79,7 +80,7 @@ var StyledMessage = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
|
79
80
|
return isAssistant ? theme.palette.grey[50] : theme.palette.primary.light;
|
|
80
81
|
}, ";border-radius:1rem;white-space:pre-wrap;padding:0.75rem;margin-bottom:16px;");
|
|
81
82
|
var RecordingOverlay = /*#__PURE__*/_styled__default.default("div", {
|
|
82
|
-
target: "
|
|
83
|
+
target: "e1i7zt2"
|
|
83
84
|
})("production" === "production" ? {
|
|
84
85
|
name: "1805g3a",
|
|
85
86
|
styles: "position:absolute;top:0;left:24px;width:calc(100% - 48px);height:calc(100% - 24px);background-color:rgba(0, 0, 0, 0.4);z-index:999;backdrop-filter:blur(1px);border-radius:0 0 1.125rem 1.125rem"
|
|
@@ -88,6 +89,26 @@ var RecordingOverlay = /*#__PURE__*/_styled__default.default("div", {
|
|
|
88
89
|
styles: "position:absolute;top:0;left:24px;width:calc(100% - 48px);height:calc(100% - 24px);background-color:rgba(0, 0, 0, 0.4);z-index:999;backdrop-filter:blur(1px);border-radius:0 0 1.125rem 1.125rem",
|
|
89
90
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
90
91
|
});
|
|
92
|
+
var EmptyMessageContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
93
|
+
target: "e1i7zt1"
|
|
94
|
+
})("production" === "production" ? {
|
|
95
|
+
name: "1bdo6l4",
|
|
96
|
+
styles: "display:flex;justify-content:center;align-items:center;height:100%;gap:1rem"
|
|
97
|
+
} : {
|
|
98
|
+
name: "1bdo6l4",
|
|
99
|
+
styles: "display:flex;justify-content:center;align-items:center;height:100%;gap:1rem",
|
|
100
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
101
|
+
});
|
|
102
|
+
var AIAvatarImage = /*#__PURE__*/_styled__default.default("img", {
|
|
103
|
+
target: "e1i7zt0"
|
|
104
|
+
})("production" === "production" ? {
|
|
105
|
+
name: "1l4h0oe",
|
|
106
|
+
styles: "width:120px;height:120px;flex-shrink:0"
|
|
107
|
+
} : {
|
|
108
|
+
name: "1l4h0oe",
|
|
109
|
+
styles: "width:120px;height:120px;flex-shrink:0",
|
|
110
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
111
|
+
});
|
|
91
112
|
var _EliceChat = function EliceChat(_ref15) {
|
|
92
113
|
var _ref15$placeholder = _ref15.placeholder,
|
|
93
114
|
placeholder = _ref15$placeholder === void 0 ? "AI와 대화를 시작해 보세요" : _ref15$placeholder,
|
|
@@ -188,11 +209,15 @@ _EliceChat.MessageList = function (_ref16) {
|
|
|
188
209
|
height: height,
|
|
189
210
|
children: [isRecord && jsxRuntime.jsx(RecordingOverlay, {
|
|
190
211
|
onClick: setIsRecord
|
|
191
|
-
}), messages.length === 0 ? jsxRuntime.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
212
|
+
}), messages.length === 0 ? jsxRuntime.jsxs(EmptyMessageContainer, {
|
|
213
|
+
children: [jsxRuntime.jsx(AIAvatarImage, {
|
|
214
|
+
src: AIAvatar.default,
|
|
215
|
+
alt: "Ai-avatar"
|
|
216
|
+
}), jsxRuntime.jsx(material.Typography, {
|
|
217
|
+
color: theme.palette.text.disabled,
|
|
218
|
+
variant: "subtitle1",
|
|
219
|
+
children: "AI\uC640 \uB300\uD654\uB97C \uC2DC\uC791\uD574 \uBCF4\uC138\uC694"
|
|
220
|
+
})]
|
|
196
221
|
}) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
197
222
|
children: [messages.map(function (msg, index) {
|
|
198
223
|
if (msg.role === "system") return null;
|
|
@@ -267,14 +292,20 @@ _EliceChat.InputArea = function (_ref17) {
|
|
|
267
292
|
onRecord();
|
|
268
293
|
onTranscribingChange === null || onTranscribingChange === void 0 ? void 0 : onTranscribingChange(true);
|
|
269
294
|
},
|
|
270
|
-
children: jsxRuntime.jsx(Micro.default, {
|
|
295
|
+
children: jsxRuntime.jsx(Micro.default, {
|
|
296
|
+
color: theme.palette.secondary.main
|
|
297
|
+
})
|
|
271
298
|
}), jsxRuntime.jsx(IconButton.default, {
|
|
272
299
|
onClick: onReset,
|
|
273
|
-
children: jsxRuntime.jsx(Reset.default, {
|
|
300
|
+
children: jsxRuntime.jsx(Reset.default, {
|
|
301
|
+
color: theme.palette.secondary.main
|
|
302
|
+
})
|
|
274
303
|
}), jsxRuntime.jsx(IconButton.default, {
|
|
275
304
|
onClick: onSend,
|
|
276
305
|
disabled: !value.trim(),
|
|
277
|
-
children: jsxRuntime.jsx(
|
|
306
|
+
children: jsxRuntime.jsx(SendArrow.default, {
|
|
307
|
+
color: theme.palette.secondary.main
|
|
308
|
+
})
|
|
278
309
|
})]
|
|
279
310
|
})
|
|
280
311
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutFooterPagingProps {
|
|
3
4
|
currentPage: number;
|
|
4
5
|
totalPage: number;
|
|
@@ -6,6 +7,7 @@ export interface LayoutFooterPagingProps {
|
|
|
6
7
|
onNext?: () => void;
|
|
7
8
|
allowPrev?: boolean;
|
|
8
9
|
allowNext?: boolean;
|
|
10
|
+
sx?: SxProps<Theme>;
|
|
9
11
|
}
|
|
10
12
|
declare const LayoutFooterPaging: React.FC<LayoutFooterPagingProps>;
|
|
11
13
|
export default LayoutFooterPaging;
|
|
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
14
14
|
|
|
15
15
|
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)."; }
|
|
16
|
-
var FooterContainer = /*#__PURE__*/_styled__default.default(
|
|
16
|
+
var FooterContainer = /*#__PURE__*/_styled__default.default(material.Stack, {
|
|
17
17
|
target: "ecog5a42"
|
|
18
18
|
})("production" === "production" ? {
|
|
19
19
|
name: "vw5qh8",
|
|
@@ -43,11 +43,13 @@ var LayoutFooterPaging = function LayoutFooterPaging(_ref3) {
|
|
|
43
43
|
_ref3$allowPrev = _ref3.allowPrev,
|
|
44
44
|
allowPrev = _ref3$allowPrev === void 0 ? true : _ref3$allowPrev,
|
|
45
45
|
_ref3$allowNext = _ref3.allowNext,
|
|
46
|
-
allowNext = _ref3$allowNext === void 0 ? true : _ref3$allowNext
|
|
46
|
+
allowNext = _ref3$allowNext === void 0 ? true : _ref3$allowNext,
|
|
47
|
+
sx = _ref3.sx;
|
|
47
48
|
var theme = material.useTheme();
|
|
48
49
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
49
50
|
isTablet = _useAIDTMediaQuery.isTablet;
|
|
50
51
|
return jsxRuntime.jsxs(FooterContainer, {
|
|
52
|
+
sx: sx,
|
|
51
53
|
children: [isTablet && jsxRuntime.jsx(PaginationButton.default, {
|
|
52
54
|
left: true,
|
|
53
55
|
onClick: onPrev,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps, Theme } from "@mui/material";
|
|
1
2
|
export interface LayoutFooterSubmitProps {
|
|
2
3
|
isRollback?: boolean;
|
|
3
4
|
isSubmit?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface LayoutFooterSubmitProps {
|
|
|
7
8
|
rollbackText?: string;
|
|
8
9
|
onRollback?: () => void;
|
|
9
10
|
onSubmit?: () => void;
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
10
12
|
}
|
|
11
|
-
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, sx, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default LayoutFooterSubmit;
|
|
@@ -18,10 +18,12 @@ var LayoutFooterSubmit = function LayoutFooterSubmit(_ref) {
|
|
|
18
18
|
submitText = _ref.submitText,
|
|
19
19
|
rollbackText = _ref.rollbackText,
|
|
20
20
|
onSubmit = _ref.onSubmit,
|
|
21
|
-
onRollback = _ref.onRollback
|
|
21
|
+
onRollback = _ref.onRollback,
|
|
22
|
+
sx = _ref.sx;
|
|
22
23
|
return jsxRuntime.jsxs(material.Stack, {
|
|
23
24
|
direction: "row",
|
|
24
25
|
spacing: 1,
|
|
26
|
+
sx: sx,
|
|
25
27
|
children: [isRollback && jsxRuntime.jsx(Button.default, {
|
|
26
28
|
disabled: disableRollback,
|
|
27
29
|
variant: "outlined",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutHeaderSubTitleProps {
|
|
3
4
|
children: React.ReactNode;
|
|
5
|
+
sx?: SxProps<Theme>;
|
|
4
6
|
}
|
|
5
|
-
declare const LayoutHeaderSubTitle: ({ children }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
7
|
+
declare const LayoutHeaderSubTitle: ({ children, sx }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
6
8
|
export default LayoutHeaderSubTitle;
|
|
@@ -22,7 +22,8 @@ var StyledPopup = material.styled(menu.Menu.Popup)(_templateObject || (_template
|
|
|
22
22
|
var StyledMenuItem = material.styled(menu.Menu.Item)(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: column;\n"])));
|
|
23
23
|
var StyledMoreTrigger = material.styled(menu.Menu.Trigger)(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n border: none;\n background-color: #fff;\n padding: 0;\n"])));
|
|
24
24
|
var LayoutHeaderSubTitle = function LayoutHeaderSubTitle(_ref) {
|
|
25
|
-
var children = _ref.children
|
|
25
|
+
var children = _ref.children,
|
|
26
|
+
sx = _ref.sx;
|
|
26
27
|
var _useState = React.useState(false),
|
|
27
28
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
28
29
|
menuOpen = _useState2[0],
|
|
@@ -33,6 +34,7 @@ var LayoutHeaderSubTitle = function LayoutHeaderSubTitle(_ref) {
|
|
|
33
34
|
direction: "row",
|
|
34
35
|
spacing: 2,
|
|
35
36
|
alignItems: "center",
|
|
37
|
+
sx: sx,
|
|
36
38
|
children: isTablet ? jsxRuntime.jsxs(menu.Menu.Root, {
|
|
37
39
|
open: menuOpen,
|
|
38
40
|
onOpenChange: setMenuOpen,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutHeaderTitleProps {
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
titleComponent?: React.ReactNode;
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
5
7
|
}
|
|
6
|
-
declare const LayoutHeaderTitle: ({ children, titleComponent }: LayoutHeaderTitleProps) => JSX.Element;
|
|
8
|
+
declare const LayoutHeaderTitle: ({ children, titleComponent, sx }: LayoutHeaderTitleProps) => JSX.Element;
|
|
7
9
|
export default LayoutHeaderTitle;
|
|
@@ -29,7 +29,8 @@ var Title = /*#__PURE__*/_styled__default.default(material.Typography, {
|
|
|
29
29
|
});
|
|
30
30
|
var LayoutHeaderTitle = function LayoutHeaderTitle(_ref2) {
|
|
31
31
|
var children = _ref2.children,
|
|
32
|
-
titleComponent = _ref2.titleComponent
|
|
32
|
+
titleComponent = _ref2.titleComponent,
|
|
33
|
+
sx = _ref2.sx;
|
|
33
34
|
var theme = material.useTheme();
|
|
34
35
|
if (titleComponent) {
|
|
35
36
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
@@ -38,6 +39,7 @@ var LayoutHeaderTitle = function LayoutHeaderTitle(_ref2) {
|
|
|
38
39
|
}
|
|
39
40
|
return jsxRuntime.jsx(StyledTitle, {
|
|
40
41
|
bgColor: theme.palette.secondary.main,
|
|
42
|
+
sx: sx,
|
|
41
43
|
children: typeof children === "string" ? jsxRuntime.jsx(Title, {
|
|
42
44
|
variant: "h1",
|
|
43
45
|
children: children
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface EliceLayoutProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
backgroundImage?: string;
|
|
@@ -8,31 +9,37 @@ export interface EliceLayoutProps {
|
|
|
8
9
|
allowPrev?: boolean;
|
|
9
10
|
allowNext?: boolean;
|
|
10
11
|
onlyPage?: boolean;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
11
13
|
}
|
|
12
14
|
type Alignment = "left" | "center" | "right";
|
|
13
|
-
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
14
|
-
HeaderContainer: ({ children }: {
|
|
15
|
+
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage, sx }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
HeaderContainer: ({ children, sx }: {
|
|
15
17
|
children: React.ReactNode;
|
|
18
|
+
sx?: SxProps<Theme> | undefined;
|
|
16
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
HeaderTitle: ({ children, titleComponent }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
18
|
-
HeaderSubTitle: ({ children }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
19
|
-
ContentContainer: ({ children }: {
|
|
20
|
+
HeaderTitle: ({ children, titleComponent, sx }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
21
|
+
HeaderSubTitle: ({ children, sx }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
22
|
+
ContentContainer: ({ children, sx }: {
|
|
20
23
|
children: React.ReactNode;
|
|
24
|
+
sx?: SxProps<Theme> | undefined;
|
|
21
25
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
Subtitle: ({ children, alignment, justifyContent }: {
|
|
26
|
+
Subtitle: ({ children, alignment, justifyContent, sx }: {
|
|
23
27
|
children: React.ReactNode;
|
|
24
28
|
alignment?: Alignment | undefined;
|
|
25
29
|
justifyContent?: string | undefined;
|
|
30
|
+
sx?: SxProps<Theme> | undefined;
|
|
26
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
Content: ({ children, alignment, justifyContent }: {
|
|
32
|
+
Content: ({ children, alignment, justifyContent, sx, }: {
|
|
28
33
|
children: React.ReactNode;
|
|
29
34
|
alignment?: Alignment | undefined;
|
|
30
35
|
justifyContent?: string | undefined;
|
|
36
|
+
sx?: SxProps<Theme> | undefined;
|
|
31
37
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
FooterContainer: ({ children }: {
|
|
38
|
+
FooterContainer: ({ children, sx }: {
|
|
33
39
|
children: React.ReactNode;
|
|
40
|
+
sx?: SxProps<Theme> | undefined;
|
|
34
41
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
42
|
FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
36
|
-
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, sx, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
44
|
};
|
|
38
45
|
export default EliceLayout;
|
|
@@ -112,7 +112,8 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
112
112
|
backgroundImage = _ref14.backgroundImage,
|
|
113
113
|
backgroundColor = _ref14.backgroundColor,
|
|
114
114
|
_ref14$onlyPage = _ref14.onlyPage,
|
|
115
|
-
onlyPage = _ref14$onlyPage === void 0 ? false : _ref14$onlyPage
|
|
115
|
+
onlyPage = _ref14$onlyPage === void 0 ? false : _ref14$onlyPage,
|
|
116
|
+
sx = _ref14.sx;
|
|
116
117
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
117
118
|
isTablet = _useAIDTMediaQuery.isTablet,
|
|
118
119
|
isMiniTablet = _useAIDTMediaQuery.isMiniTablet;
|
|
@@ -129,6 +130,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
129
130
|
isMiniTablet: isMiniTablet,
|
|
130
131
|
backgroundImage: backgroundImage,
|
|
131
132
|
backgroundColor: backgroundColor,
|
|
133
|
+
sx: sx,
|
|
132
134
|
children: [!onlyPage && !isTablet && jsxRuntime.jsx(LayoutPagination.default, {
|
|
133
135
|
onPrev: onPrev,
|
|
134
136
|
onNext: onNext,
|
|
@@ -139,15 +141,18 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
139
141
|
});
|
|
140
142
|
}, {
|
|
141
143
|
HeaderContainer: function HeaderContainer(_ref15) {
|
|
142
|
-
var children = _ref15.children
|
|
144
|
+
var children = _ref15.children,
|
|
145
|
+
sx = _ref15.sx;
|
|
143
146
|
return jsxRuntime.jsx(_HeaderContainer, {
|
|
147
|
+
sx: sx,
|
|
144
148
|
children: children
|
|
145
149
|
});
|
|
146
150
|
},
|
|
147
151
|
HeaderTitle: LayoutHeaderTitle.default,
|
|
148
152
|
HeaderSubTitle: LayoutHeaderSubTitle.default,
|
|
149
153
|
ContentContainer: function ContentContainer(_ref16) {
|
|
150
|
-
var children = _ref16.children
|
|
154
|
+
var children = _ref16.children,
|
|
155
|
+
sx = _ref16.sx;
|
|
151
156
|
var theme = material.useTheme();
|
|
152
157
|
var contentRef = React__default.default.useRef(null);
|
|
153
158
|
var context = React__default.default.useContext(EliceLayoutContext);
|
|
@@ -189,6 +194,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
189
194
|
return jsxRuntime.jsxs(_ContentContainer, {
|
|
190
195
|
ref: contentRef,
|
|
191
196
|
theme: theme,
|
|
197
|
+
sx: sx,
|
|
192
198
|
children: [children, hasScroll && !isScrollActive && jsxRuntime.jsx(ScrollMoreButton, {
|
|
193
199
|
children: jsxRuntime.jsx(ScrollMoreIcon.default, {
|
|
194
200
|
size: 32,
|
|
@@ -203,7 +209,8 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
203
209
|
_ref17$alignment = _ref17.alignment,
|
|
204
210
|
alignment = _ref17$alignment === void 0 ? "left" : _ref17$alignment,
|
|
205
211
|
_ref17$justifyContent = _ref17.justifyContent,
|
|
206
|
-
justifyContent = _ref17$justifyContent === void 0 ? "flex-start" : _ref17$justifyContent
|
|
212
|
+
justifyContent = _ref17$justifyContent === void 0 ? "flex-start" : _ref17$justifyContent,
|
|
213
|
+
sx = _ref17.sx;
|
|
207
214
|
var context = React__default.default.useContext(EliceLayoutContext);
|
|
208
215
|
if (!context) {
|
|
209
216
|
throw new Error("EliceLayout components must be used within an EliceLayout provider.");
|
|
@@ -213,6 +220,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
213
220
|
isSticky: isScrollActive,
|
|
214
221
|
alignment: alignment,
|
|
215
222
|
justifyContent: justifyContent,
|
|
223
|
+
sx: sx,
|
|
216
224
|
children: children
|
|
217
225
|
});
|
|
218
226
|
},
|
|
@@ -221,19 +229,20 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
221
229
|
_ref18$alignment = _ref18.alignment,
|
|
222
230
|
alignment = _ref18$alignment === void 0 ? "left" : _ref18$alignment,
|
|
223
231
|
_ref18$justifyContent = _ref18.justifyContent,
|
|
224
|
-
justifyContent = _ref18$justifyContent === void 0 ? "flex-start" : _ref18$justifyContent
|
|
232
|
+
justifyContent = _ref18$justifyContent === void 0 ? "flex-start" : _ref18$justifyContent,
|
|
233
|
+
sx = _ref18.sx;
|
|
225
234
|
return jsxRuntime.jsx(_Content, {
|
|
226
235
|
alignment: alignment,
|
|
227
236
|
justifyContent: justifyContent,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
children: children
|
|
231
|
-
})
|
|
237
|
+
sx: sx,
|
|
238
|
+
children: children
|
|
232
239
|
});
|
|
233
240
|
},
|
|
234
241
|
FooterContainer: function FooterContainer(_ref19) {
|
|
235
|
-
var children = _ref19.children
|
|
242
|
+
var children = _ref19.children,
|
|
243
|
+
sx = _ref19.sx;
|
|
236
244
|
return jsxRuntime.jsx(_FooterContainer, {
|
|
245
|
+
sx: sx,
|
|
237
246
|
children: children
|
|
238
247
|
});
|
|
239
248
|
},
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var SendArrow = function SendArrow(_ref) {
|
|
8
|
+
var _ref$color = _ref.color,
|
|
9
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color;
|
|
10
|
+
return jsxRuntime.jsx("svg", {
|
|
11
|
+
width: "22",
|
|
12
|
+
height: "23",
|
|
13
|
+
viewBox: "0 0 22 23",
|
|
14
|
+
fill: "none",
|
|
15
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
16
|
+
children: jsxRuntime.jsxs("g", {
|
|
17
|
+
children: [jsxRuntime.jsx("path", {
|
|
18
|
+
d: "M1.69775 11.3023L11.0001 2L20.3024 11.3023",
|
|
19
|
+
stroke: color,
|
|
20
|
+
strokeWidth: "2",
|
|
21
|
+
strokeLinecap: "round"
|
|
22
|
+
}), jsxRuntime.jsx("path", {
|
|
23
|
+
d: "M11 22L11 3.39535",
|
|
24
|
+
stroke: color,
|
|
25
|
+
strokeWidth: "2",
|
|
26
|
+
strokeLinecap: "round"
|
|
27
|
+
})]
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.default = SendArrow;
|
package/cjs/icons/index.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export { default as RecordPause } from './RecordPause';
|
|
|
16
16
|
export { default as Recording } from './Recording';
|
|
17
17
|
export { default as ReadyRecord } from './ReadyRecord';
|
|
18
18
|
export { default as RecordPlay } from './RecordPlay';
|
|
19
|
+
export { default as SendArrow } from './SendArrow';
|
package/cjs/icons/index.js
CHANGED
|
@@ -18,6 +18,7 @@ var RecordPause = require('./RecordPause.js');
|
|
|
18
18
|
var Recording = require('./Recording.js');
|
|
19
19
|
var ReadyRecord = require('./ReadyRecord.js');
|
|
20
20
|
var RecordPlay = require('./RecordPlay.js');
|
|
21
|
+
var SendArrow = require('./SendArrow.js');
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
|
|
@@ -39,3 +40,4 @@ exports.RecordPause = RecordPause.default;
|
|
|
39
40
|
exports.Recording = Recording.default;
|
|
40
41
|
exports.ReadyRecord = ReadyRecord.default;
|
|
41
42
|
exports.RecordPlay = RecordPlay.default;
|
|
43
|
+
exports.SendArrow = SendArrow.default;
|
package/cjs/index.js
CHANGED
|
@@ -44,6 +44,7 @@ var RecordPause = require('./icons/RecordPause.js');
|
|
|
44
44
|
var Recording = require('./icons/Recording.js');
|
|
45
45
|
var ReadyRecord = require('./icons/ReadyRecord.js');
|
|
46
46
|
var RecordPlay = require('./icons/RecordPlay.js');
|
|
47
|
+
var SendArrow = require('./icons/SendArrow.js');
|
|
47
48
|
require('@mui/material');
|
|
48
49
|
var mint = require('./tokens/colors/mint.js');
|
|
49
50
|
var bluepurple = require('./tokens/colors/bluepurple.js');
|
|
@@ -102,6 +103,7 @@ exports.RecordPause = RecordPause.default;
|
|
|
102
103
|
exports.Recording = Recording.default;
|
|
103
104
|
exports.ReadyRecord = ReadyRecord.default;
|
|
104
105
|
exports.RecordPlay = RecordPlay.default;
|
|
106
|
+
exports.SendArrow = SendArrow.default;
|
|
105
107
|
exports.mint = mint.mint;
|
|
106
108
|
exports.bluepurple = bluepurple.bluepurple;
|
|
107
109
|
exports.gray = gray.gray;
|
|
@@ -2,7 +2,8 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import _styled from '@emotion/styled/base';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useRef, useEffect } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { Stack, useTheme, Typography, Input } from '@mui/material';
|
|
6
|
+
import img from '../../assets/AIAvatar.png.js';
|
|
6
7
|
import AssistantAvatar from './AssistantAvatar.js';
|
|
7
8
|
import UserAvatar from './UserAvatar.js';
|
|
8
9
|
import TypingIndicator from './TypingIndicator.js';
|
|
@@ -10,11 +11,11 @@ import EliceRecorder from '../recorder/Recorder.js';
|
|
|
10
11
|
import EliceIconButton from '../icon-button/IconButton.js';
|
|
11
12
|
import Micro from '../../icons/Micro.js';
|
|
12
13
|
import Reset from '../../icons/Reset.js';
|
|
13
|
-
import
|
|
14
|
+
import SendArrow from '../../icons/SendArrow.js';
|
|
14
15
|
|
|
15
16
|
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)."; }
|
|
16
17
|
var StyledChatContainer = /*#__PURE__*/_styled(Stack, {
|
|
17
|
-
target: "
|
|
18
|
+
target: "e1i7zt6"
|
|
18
19
|
})("position:relative;max-height:100%;height:", function (_ref) {
|
|
19
20
|
var height = _ref.height;
|
|
20
21
|
return height !== null && height !== void 0 ? height : 'fit-content';
|
|
@@ -26,7 +27,7 @@ var StyledChatContainer = /*#__PURE__*/_styled(Stack, {
|
|
|
26
27
|
return backgroundImage && "\n background-image: url(".concat(backgroundImage, ");\n background-size: cover;\n background-position: center;\n ");
|
|
27
28
|
}, ";");
|
|
28
29
|
var StyledScrollBarStack = /*#__PURE__*/_styled(Stack, {
|
|
29
|
-
target: "
|
|
30
|
+
target: "e1i7zt5"
|
|
30
31
|
})("flex:1;overflow-y:auto;border-radius:1.125rem;padding-right:1rem;::-webkit-scrollbar{width:0.25rem;}::-webkit-scrollbar-track{background:", function (_ref4) {
|
|
31
32
|
var theme = _ref4.theme;
|
|
32
33
|
return theme.palette.grey[200];
|
|
@@ -38,7 +39,7 @@ var StyledScrollBarStack = /*#__PURE__*/_styled(Stack, {
|
|
|
38
39
|
return theme.palette.secondary.main;
|
|
39
40
|
}, ";}");
|
|
40
41
|
var StyledInput = /*#__PURE__*/_styled(Input, {
|
|
41
|
-
target: "
|
|
42
|
+
target: "e1i7zt4"
|
|
42
43
|
})("width:100%;height:100%;border:none!important;background-color:transparent;font-size:1.375rem;font-weight:700;outline:none;resize:none;color:", function (_ref7) {
|
|
43
44
|
var theme = _ref7.theme;
|
|
44
45
|
return theme.palette.secondary.main;
|
|
@@ -56,7 +57,7 @@ var StyledInput = /*#__PURE__*/_styled(Input, {
|
|
|
56
57
|
return theme.palette.secondary.main;
|
|
57
58
|
}, ";}");
|
|
58
59
|
var StyledMessage = /*#__PURE__*/_styled(Typography, {
|
|
59
|
-
target: "
|
|
60
|
+
target: "e1i7zt3"
|
|
60
61
|
})("color:", function (_ref12) {
|
|
61
62
|
var isAssistant = _ref12.isAssistant,
|
|
62
63
|
theme = _ref12.theme;
|
|
@@ -70,7 +71,7 @@ var StyledMessage = /*#__PURE__*/_styled(Typography, {
|
|
|
70
71
|
return isAssistant ? theme.palette.grey[50] : theme.palette.primary.light;
|
|
71
72
|
}, ";border-radius:1rem;white-space:pre-wrap;padding:0.75rem;margin-bottom:16px;");
|
|
72
73
|
var RecordingOverlay = /*#__PURE__*/_styled("div", {
|
|
73
|
-
target: "
|
|
74
|
+
target: "e1i7zt2"
|
|
74
75
|
})("production" === "production" ? {
|
|
75
76
|
name: "1805g3a",
|
|
76
77
|
styles: "position:absolute;top:0;left:24px;width:calc(100% - 48px);height:calc(100% - 24px);background-color:rgba(0, 0, 0, 0.4);z-index:999;backdrop-filter:blur(1px);border-radius:0 0 1.125rem 1.125rem"
|
|
@@ -79,6 +80,26 @@ var RecordingOverlay = /*#__PURE__*/_styled("div", {
|
|
|
79
80
|
styles: "position:absolute;top:0;left:24px;width:calc(100% - 48px);height:calc(100% - 24px);background-color:rgba(0, 0, 0, 0.4);z-index:999;backdrop-filter:blur(1px);border-radius:0 0 1.125rem 1.125rem",
|
|
80
81
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
81
82
|
});
|
|
83
|
+
var EmptyMessageContainer = /*#__PURE__*/_styled(Stack, {
|
|
84
|
+
target: "e1i7zt1"
|
|
85
|
+
})("production" === "production" ? {
|
|
86
|
+
name: "1bdo6l4",
|
|
87
|
+
styles: "display:flex;justify-content:center;align-items:center;height:100%;gap:1rem"
|
|
88
|
+
} : {
|
|
89
|
+
name: "1bdo6l4",
|
|
90
|
+
styles: "display:flex;justify-content:center;align-items:center;height:100%;gap:1rem",
|
|
91
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
92
|
+
});
|
|
93
|
+
var AIAvatarImage = /*#__PURE__*/_styled("img", {
|
|
94
|
+
target: "e1i7zt0"
|
|
95
|
+
})("production" === "production" ? {
|
|
96
|
+
name: "1l4h0oe",
|
|
97
|
+
styles: "width:120px;height:120px;flex-shrink:0"
|
|
98
|
+
} : {
|
|
99
|
+
name: "1l4h0oe",
|
|
100
|
+
styles: "width:120px;height:120px;flex-shrink:0",
|
|
101
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
102
|
+
});
|
|
82
103
|
var _EliceChat = function EliceChat(_ref15) {
|
|
83
104
|
var _ref15$placeholder = _ref15.placeholder,
|
|
84
105
|
placeholder = _ref15$placeholder === void 0 ? "AI와 대화를 시작해 보세요" : _ref15$placeholder,
|
|
@@ -179,11 +200,15 @@ _EliceChat.MessageList = function (_ref16) {
|
|
|
179
200
|
height: height,
|
|
180
201
|
children: [isRecord && jsx(RecordingOverlay, {
|
|
181
202
|
onClick: setIsRecord
|
|
182
|
-
}), messages.length === 0 ?
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
203
|
+
}), messages.length === 0 ? jsxs(EmptyMessageContainer, {
|
|
204
|
+
children: [jsx(AIAvatarImage, {
|
|
205
|
+
src: img,
|
|
206
|
+
alt: "Ai-avatar"
|
|
207
|
+
}), jsx(Typography, {
|
|
208
|
+
color: theme.palette.text.disabled,
|
|
209
|
+
variant: "subtitle1",
|
|
210
|
+
children: "AI\uC640 \uB300\uD654\uB97C \uC2DC\uC791\uD574 \uBCF4\uC138\uC694"
|
|
211
|
+
})]
|
|
187
212
|
}) : jsxs(Fragment, {
|
|
188
213
|
children: [messages.map(function (msg, index) {
|
|
189
214
|
if (msg.role === "system") return null;
|
|
@@ -258,14 +283,20 @@ _EliceChat.InputArea = function (_ref17) {
|
|
|
258
283
|
onRecord();
|
|
259
284
|
onTranscribingChange === null || onTranscribingChange === void 0 ? void 0 : onTranscribingChange(true);
|
|
260
285
|
},
|
|
261
|
-
children: jsx(Micro, {
|
|
286
|
+
children: jsx(Micro, {
|
|
287
|
+
color: theme.palette.secondary.main
|
|
288
|
+
})
|
|
262
289
|
}), jsx(EliceIconButton, {
|
|
263
290
|
onClick: onReset,
|
|
264
|
-
children: jsx(Reset, {
|
|
291
|
+
children: jsx(Reset, {
|
|
292
|
+
color: theme.palette.secondary.main
|
|
293
|
+
})
|
|
265
294
|
}), jsx(EliceIconButton, {
|
|
266
295
|
onClick: onSend,
|
|
267
296
|
disabled: !value.trim(),
|
|
268
|
-
children: jsx(
|
|
297
|
+
children: jsx(SendArrow, {
|
|
298
|
+
color: theme.palette.secondary.main
|
|
299
|
+
})
|
|
269
300
|
})]
|
|
270
301
|
})
|
|
271
302
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutFooterPagingProps {
|
|
3
4
|
currentPage: number;
|
|
4
5
|
totalPage: number;
|
|
@@ -6,6 +7,7 @@ export interface LayoutFooterPagingProps {
|
|
|
6
7
|
onNext?: () => void;
|
|
7
8
|
allowPrev?: boolean;
|
|
8
9
|
allowNext?: boolean;
|
|
10
|
+
sx?: SxProps<Theme>;
|
|
9
11
|
}
|
|
10
12
|
declare const LayoutFooterPaging: React.FC<LayoutFooterPagingProps>;
|
|
11
13
|
export default LayoutFooterPaging;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useTheme, Typography } from '@mui/material';
|
|
3
|
+
import { Stack, useTheme, Typography } from '@mui/material';
|
|
4
4
|
import useAIDTMediaQuery from '../../../hooks/useAIDTMediaQuery.js';
|
|
5
5
|
import PaginationButton from '../../pagination-button/PaginationButton.js';
|
|
6
6
|
|
|
7
7
|
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)."; }
|
|
8
|
-
var FooterContainer = /*#__PURE__*/_styled(
|
|
8
|
+
var FooterContainer = /*#__PURE__*/_styled(Stack, {
|
|
9
9
|
target: "ecog5a42"
|
|
10
10
|
})("production" === "production" ? {
|
|
11
11
|
name: "vw5qh8",
|
|
@@ -35,11 +35,13 @@ var LayoutFooterPaging = function LayoutFooterPaging(_ref3) {
|
|
|
35
35
|
_ref3$allowPrev = _ref3.allowPrev,
|
|
36
36
|
allowPrev = _ref3$allowPrev === void 0 ? true : _ref3$allowPrev,
|
|
37
37
|
_ref3$allowNext = _ref3.allowNext,
|
|
38
|
-
allowNext = _ref3$allowNext === void 0 ? true : _ref3$allowNext
|
|
38
|
+
allowNext = _ref3$allowNext === void 0 ? true : _ref3$allowNext,
|
|
39
|
+
sx = _ref3.sx;
|
|
39
40
|
var theme = useTheme();
|
|
40
41
|
var _useAIDTMediaQuery = useAIDTMediaQuery(),
|
|
41
42
|
isTablet = _useAIDTMediaQuery.isTablet;
|
|
42
43
|
return jsxs(FooterContainer, {
|
|
44
|
+
sx: sx,
|
|
43
45
|
children: [isTablet && jsx(PaginationButton, {
|
|
44
46
|
left: true,
|
|
45
47
|
onClick: onPrev,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SxProps, Theme } from "@mui/material";
|
|
1
2
|
export interface LayoutFooterSubmitProps {
|
|
2
3
|
isRollback?: boolean;
|
|
3
4
|
isSubmit?: boolean;
|
|
@@ -7,6 +8,7 @@ export interface LayoutFooterSubmitProps {
|
|
|
7
8
|
rollbackText?: string;
|
|
8
9
|
onRollback?: () => void;
|
|
9
10
|
onSubmit?: () => void;
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
10
12
|
}
|
|
11
|
-
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, sx, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default LayoutFooterSubmit;
|
|
@@ -14,10 +14,12 @@ var LayoutFooterSubmit = function LayoutFooterSubmit(_ref) {
|
|
|
14
14
|
submitText = _ref.submitText,
|
|
15
15
|
rollbackText = _ref.rollbackText,
|
|
16
16
|
onSubmit = _ref.onSubmit,
|
|
17
|
-
onRollback = _ref.onRollback
|
|
17
|
+
onRollback = _ref.onRollback,
|
|
18
|
+
sx = _ref.sx;
|
|
18
19
|
return jsxs(Stack, {
|
|
19
20
|
direction: "row",
|
|
20
21
|
spacing: 1,
|
|
22
|
+
sx: sx,
|
|
21
23
|
children: [isRollback && jsx(EliceButton, {
|
|
22
24
|
disabled: disableRollback,
|
|
23
25
|
variant: "outlined",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutHeaderSubTitleProps {
|
|
3
4
|
children: React.ReactNode;
|
|
5
|
+
sx?: SxProps<Theme>;
|
|
4
6
|
}
|
|
5
|
-
declare const LayoutHeaderSubTitle: ({ children }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
7
|
+
declare const LayoutHeaderSubTitle: ({ children, sx }: LayoutHeaderSubTitleProps) => JSX.Element;
|
|
6
8
|
export default LayoutHeaderSubTitle;
|
|
@@ -13,7 +13,8 @@ var StyledPopup = styled(Menu.Popup)(_templateObject || (_templateObject = _tagg
|
|
|
13
13
|
var StyledMenuItem = styled(Menu.Item)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-direction: column;\n"])));
|
|
14
14
|
var StyledMoreTrigger = styled(Menu.Trigger)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: none;\n background-color: #fff;\n padding: 0;\n"])));
|
|
15
15
|
var LayoutHeaderSubTitle = function LayoutHeaderSubTitle(_ref) {
|
|
16
|
-
var children = _ref.children
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
sx = _ref.sx;
|
|
17
18
|
var _useState = useState(false),
|
|
18
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
20
|
menuOpen = _useState2[0],
|
|
@@ -24,6 +25,7 @@ var LayoutHeaderSubTitle = function LayoutHeaderSubTitle(_ref) {
|
|
|
24
25
|
direction: "row",
|
|
25
26
|
spacing: 2,
|
|
26
27
|
alignItems: "center",
|
|
28
|
+
sx: sx,
|
|
27
29
|
children: isTablet ? jsxs(Menu.Root, {
|
|
28
30
|
open: menuOpen,
|
|
29
31
|
onOpenChange: setMenuOpen,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface LayoutHeaderTitleProps {
|
|
3
4
|
children?: React.ReactNode;
|
|
4
5
|
titleComponent?: React.ReactNode;
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
5
7
|
}
|
|
6
|
-
declare const LayoutHeaderTitle: ({ children, titleComponent }: LayoutHeaderTitleProps) => JSX.Element;
|
|
8
|
+
declare const LayoutHeaderTitle: ({ children, titleComponent, sx }: LayoutHeaderTitleProps) => JSX.Element;
|
|
7
9
|
export default LayoutHeaderTitle;
|
|
@@ -21,7 +21,8 @@ var Title = /*#__PURE__*/_styled(Typography, {
|
|
|
21
21
|
});
|
|
22
22
|
var LayoutHeaderTitle = function LayoutHeaderTitle(_ref2) {
|
|
23
23
|
var children = _ref2.children,
|
|
24
|
-
titleComponent = _ref2.titleComponent
|
|
24
|
+
titleComponent = _ref2.titleComponent,
|
|
25
|
+
sx = _ref2.sx;
|
|
25
26
|
var theme = useTheme();
|
|
26
27
|
if (titleComponent) {
|
|
27
28
|
return jsx(Fragment, {
|
|
@@ -30,6 +31,7 @@ var LayoutHeaderTitle = function LayoutHeaderTitle(_ref2) {
|
|
|
30
31
|
}
|
|
31
32
|
return jsx(StyledTitle, {
|
|
32
33
|
bgColor: theme.palette.secondary.main,
|
|
34
|
+
sx: sx,
|
|
33
35
|
children: typeof children === "string" ? jsx(Title, {
|
|
34
36
|
variant: "h1",
|
|
35
37
|
children: children
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material";
|
|
2
3
|
export interface EliceLayoutProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
backgroundImage?: string;
|
|
@@ -8,31 +9,37 @@ export interface EliceLayoutProps {
|
|
|
8
9
|
allowPrev?: boolean;
|
|
9
10
|
allowNext?: boolean;
|
|
10
11
|
onlyPage?: boolean;
|
|
12
|
+
sx?: SxProps<Theme>;
|
|
11
13
|
}
|
|
12
14
|
type Alignment = "left" | "center" | "right";
|
|
13
|
-
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
14
|
-
HeaderContainer: ({ children }: {
|
|
15
|
+
declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, backgroundImage, backgroundColor, onlyPage, sx }: EliceLayoutProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
HeaderContainer: ({ children, sx }: {
|
|
15
17
|
children: React.ReactNode;
|
|
18
|
+
sx?: SxProps<Theme> | undefined;
|
|
16
19
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
HeaderTitle: ({ children, titleComponent }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
18
|
-
HeaderSubTitle: ({ children }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
19
|
-
ContentContainer: ({ children }: {
|
|
20
|
+
HeaderTitle: ({ children, titleComponent, sx }: import("./Header").LayoutHeaderTitleProps) => JSX.Element;
|
|
21
|
+
HeaderSubTitle: ({ children, sx }: import("./Header").LayoutHeaderSubTitleProps) => JSX.Element;
|
|
22
|
+
ContentContainer: ({ children, sx }: {
|
|
20
23
|
children: React.ReactNode;
|
|
24
|
+
sx?: SxProps<Theme> | undefined;
|
|
21
25
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
Subtitle: ({ children, alignment, justifyContent }: {
|
|
26
|
+
Subtitle: ({ children, alignment, justifyContent, sx }: {
|
|
23
27
|
children: React.ReactNode;
|
|
24
28
|
alignment?: Alignment | undefined;
|
|
25
29
|
justifyContent?: string | undefined;
|
|
30
|
+
sx?: SxProps<Theme> | undefined;
|
|
26
31
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
Content: ({ children, alignment, justifyContent }: {
|
|
32
|
+
Content: ({ children, alignment, justifyContent, sx, }: {
|
|
28
33
|
children: React.ReactNode;
|
|
29
34
|
alignment?: Alignment | undefined;
|
|
30
35
|
justifyContent?: string | undefined;
|
|
36
|
+
sx?: SxProps<Theme> | undefined;
|
|
31
37
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
FooterContainer: ({ children }: {
|
|
38
|
+
FooterContainer: ({ children, sx }: {
|
|
33
39
|
children: React.ReactNode;
|
|
40
|
+
sx?: SxProps<Theme> | undefined;
|
|
34
41
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
42
|
FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
36
|
-
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, sx, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
44
|
};
|
|
38
45
|
export default EliceLayout;
|
|
@@ -2,7 +2,7 @@ import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBab
|
|
|
2
2
|
import _styled from '@emotion/styled/base';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { Stack, Button,
|
|
5
|
+
import { Stack, Button, useTheme } from '@mui/material';
|
|
6
6
|
import useAIDTMediaQuery from '../../hooks/useAIDTMediaQuery.js';
|
|
7
7
|
import ScrollMoreIcon from '../../icons/ScrollMoreIcon.js';
|
|
8
8
|
import LayoutPagination from './layout-pagination/LayoutPagination.js';
|
|
@@ -103,7 +103,8 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
103
103
|
backgroundImage = _ref14.backgroundImage,
|
|
104
104
|
backgroundColor = _ref14.backgroundColor,
|
|
105
105
|
_ref14$onlyPage = _ref14.onlyPage,
|
|
106
|
-
onlyPage = _ref14$onlyPage === void 0 ? false : _ref14$onlyPage
|
|
106
|
+
onlyPage = _ref14$onlyPage === void 0 ? false : _ref14$onlyPage,
|
|
107
|
+
sx = _ref14.sx;
|
|
107
108
|
var _useAIDTMediaQuery = useAIDTMediaQuery(),
|
|
108
109
|
isTablet = _useAIDTMediaQuery.isTablet,
|
|
109
110
|
isMiniTablet = _useAIDTMediaQuery.isMiniTablet;
|
|
@@ -120,6 +121,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
120
121
|
isMiniTablet: isMiniTablet,
|
|
121
122
|
backgroundImage: backgroundImage,
|
|
122
123
|
backgroundColor: backgroundColor,
|
|
124
|
+
sx: sx,
|
|
123
125
|
children: [!onlyPage && !isTablet && jsx(LayoutPagination, {
|
|
124
126
|
onPrev: onPrev,
|
|
125
127
|
onNext: onNext,
|
|
@@ -130,15 +132,18 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
130
132
|
});
|
|
131
133
|
}, {
|
|
132
134
|
HeaderContainer: function HeaderContainer(_ref15) {
|
|
133
|
-
var children = _ref15.children
|
|
135
|
+
var children = _ref15.children,
|
|
136
|
+
sx = _ref15.sx;
|
|
134
137
|
return jsx(_HeaderContainer, {
|
|
138
|
+
sx: sx,
|
|
135
139
|
children: children
|
|
136
140
|
});
|
|
137
141
|
},
|
|
138
142
|
HeaderTitle: LayoutHeaderTitle,
|
|
139
143
|
HeaderSubTitle: LayoutHeaderSubTitle,
|
|
140
144
|
ContentContainer: function ContentContainer(_ref16) {
|
|
141
|
-
var children = _ref16.children
|
|
145
|
+
var children = _ref16.children,
|
|
146
|
+
sx = _ref16.sx;
|
|
142
147
|
var theme = useTheme();
|
|
143
148
|
var contentRef = React.useRef(null);
|
|
144
149
|
var context = React.useContext(EliceLayoutContext);
|
|
@@ -180,6 +185,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
180
185
|
return jsxs(_ContentContainer, {
|
|
181
186
|
ref: contentRef,
|
|
182
187
|
theme: theme,
|
|
188
|
+
sx: sx,
|
|
183
189
|
children: [children, hasScroll && !isScrollActive && jsx(ScrollMoreButton, {
|
|
184
190
|
children: jsx(ScrollMoreIcon, {
|
|
185
191
|
size: 32,
|
|
@@ -194,7 +200,8 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
194
200
|
_ref17$alignment = _ref17.alignment,
|
|
195
201
|
alignment = _ref17$alignment === void 0 ? "left" : _ref17$alignment,
|
|
196
202
|
_ref17$justifyContent = _ref17.justifyContent,
|
|
197
|
-
justifyContent = _ref17$justifyContent === void 0 ? "flex-start" : _ref17$justifyContent
|
|
203
|
+
justifyContent = _ref17$justifyContent === void 0 ? "flex-start" : _ref17$justifyContent,
|
|
204
|
+
sx = _ref17.sx;
|
|
198
205
|
var context = React.useContext(EliceLayoutContext);
|
|
199
206
|
if (!context) {
|
|
200
207
|
throw new Error("EliceLayout components must be used within an EliceLayout provider.");
|
|
@@ -204,6 +211,7 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
204
211
|
isSticky: isScrollActive,
|
|
205
212
|
alignment: alignment,
|
|
206
213
|
justifyContent: justifyContent,
|
|
214
|
+
sx: sx,
|
|
207
215
|
children: children
|
|
208
216
|
});
|
|
209
217
|
},
|
|
@@ -212,19 +220,20 @@ var EliceLayout = Object.assign(function (_ref14) {
|
|
|
212
220
|
_ref18$alignment = _ref18.alignment,
|
|
213
221
|
alignment = _ref18$alignment === void 0 ? "left" : _ref18$alignment,
|
|
214
222
|
_ref18$justifyContent = _ref18.justifyContent,
|
|
215
|
-
justifyContent = _ref18$justifyContent === void 0 ? "flex-start" : _ref18$justifyContent
|
|
223
|
+
justifyContent = _ref18$justifyContent === void 0 ? "flex-start" : _ref18$justifyContent,
|
|
224
|
+
sx = _ref18.sx;
|
|
216
225
|
return jsx(_Content, {
|
|
217
226
|
alignment: alignment,
|
|
218
227
|
justifyContent: justifyContent,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
children: children
|
|
222
|
-
})
|
|
228
|
+
sx: sx,
|
|
229
|
+
children: children
|
|
223
230
|
});
|
|
224
231
|
},
|
|
225
232
|
FooterContainer: function FooterContainer(_ref19) {
|
|
226
|
-
var children = _ref19.children
|
|
233
|
+
var children = _ref19.children,
|
|
234
|
+
sx = _ref19.sx;
|
|
227
235
|
return jsx(_FooterContainer, {
|
|
236
|
+
sx: sx,
|
|
228
237
|
children: children
|
|
229
238
|
});
|
|
230
239
|
},
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
var SendArrow = function SendArrow(_ref) {
|
|
4
|
+
var _ref$color = _ref.color,
|
|
5
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color;
|
|
6
|
+
return jsx("svg", {
|
|
7
|
+
width: "22",
|
|
8
|
+
height: "23",
|
|
9
|
+
viewBox: "0 0 22 23",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
children: jsxs("g", {
|
|
13
|
+
children: [jsx("path", {
|
|
14
|
+
d: "M1.69775 11.3023L11.0001 2L20.3024 11.3023",
|
|
15
|
+
stroke: color,
|
|
16
|
+
strokeWidth: "2",
|
|
17
|
+
strokeLinecap: "round"
|
|
18
|
+
}), jsx("path", {
|
|
19
|
+
d: "M11 22L11 3.39535",
|
|
20
|
+
stroke: color,
|
|
21
|
+
strokeWidth: "2",
|
|
22
|
+
strokeLinecap: "round"
|
|
23
|
+
})]
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { SendArrow as default };
|
package/es/icons/index.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export { default as RecordPause } from './RecordPause';
|
|
|
16
16
|
export { default as Recording } from './Recording';
|
|
17
17
|
export { default as ReadyRecord } from './ReadyRecord';
|
|
18
18
|
export { default as RecordPlay } from './RecordPlay';
|
|
19
|
+
export { default as SendArrow } from './SendArrow';
|
package/es/icons/index.js
CHANGED
|
@@ -16,3 +16,4 @@ export { default as RecordPause } from './RecordPause.js';
|
|
|
16
16
|
export { default as Recording } from './Recording.js';
|
|
17
17
|
export { default as ReadyRecord } from './ReadyRecord.js';
|
|
18
18
|
export { default as RecordPlay } from './RecordPlay.js';
|
|
19
|
+
export { default as SendArrow } from './SendArrow.js';
|
package/es/index.js
CHANGED
|
@@ -39,6 +39,7 @@ export { default as RecordPause } from './icons/RecordPause.js';
|
|
|
39
39
|
export { default as Recording } from './icons/Recording.js';
|
|
40
40
|
export { default as ReadyRecord } from './icons/ReadyRecord.js';
|
|
41
41
|
export { default as RecordPlay } from './icons/RecordPlay.js';
|
|
42
|
+
export { default as SendArrow } from './icons/SendArrow.js';
|
|
42
43
|
export { createAIDTTheme } from './theme/createAIDTTheme.js';
|
|
43
44
|
export { mint } from './tokens/colors/mint.js';
|
|
44
45
|
export { bluepurple } from './tokens/colors/bluepurple.js';
|