@elicecontents/content-ui 1.0.12 → 1.0.13
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.js +3 -1
- package/cjs/components/button/Button.d.ts +2 -0
- package/cjs/components/button/Button.js +7 -3
- 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 +60 -0
- package/cjs/types/theme.types.d.ts +67 -0
- 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/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 +60 -0
- package/es/types/theme.types.d.ts +67 -0
- package/package.json +1 -1
|
@@ -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, {
|
|
@@ -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,60 @@
|
|
|
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
|
+
pagination: true;
|
|
58
|
+
buttoninput: true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -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;
|
|
@@ -28,10 +28,12 @@ var EliceModal = function EliceModal(props) {
|
|
|
28
28
|
}, props.sx),
|
|
29
29
|
children: [iconClose && jsx(Stack, {
|
|
30
30
|
display: "flex",
|
|
31
|
+
position: "relative",
|
|
31
32
|
justifyContent: "flex-end",
|
|
33
|
+
zIndex: 1200,
|
|
32
34
|
alignItems: "flex-end",
|
|
35
|
+
onClick: handleClose,
|
|
33
36
|
children: jsx(HighlightOffIcon, {
|
|
34
|
-
onClick: handleClose,
|
|
35
37
|
sx: {
|
|
36
38
|
width: '2.7rem',
|
|
37
39
|
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;
|
|
@@ -9,10 +9,14 @@ var EliceButton = forwardRef(function (_a, ref) {
|
|
|
9
9
|
_a$variant = _a.variant,
|
|
10
10
|
variant = _a$variant === void 0 ? 'contained' : _a$variant,
|
|
11
11
|
disabled = _a.disabled,
|
|
12
|
-
|
|
12
|
+
textColor = _a.textColor,
|
|
13
|
+
bgColor = _a.bgColor,
|
|
14
|
+
rest = __rest(_a, ["children", "variant", "disabled", "textColor", "bgColor"]);
|
|
13
15
|
var theme = useTheme();
|
|
14
16
|
var _useAIDTMediaQuery = useAIDTMediaQuery(),
|
|
15
17
|
isMiniTablet = _useAIDTMediaQuery.isMiniTablet;
|
|
18
|
+
var resolvedColor = textColor !== null && textColor !== void 0 ? textColor : disabled ? theme.palette.text.disabled : variant === 'outlined' ? theme.palette.primary.main : theme.palette.common.white;
|
|
19
|
+
var resolvedBgColor = bgColor !== null && bgColor !== void 0 ? bgColor : variant === 'outlined' ? theme.palette.common.white : disabled ? theme.palette.grey[300] : theme.palette.primary.main;
|
|
16
20
|
return jsx(Button, Object.assign({
|
|
17
21
|
ref: ref,
|
|
18
22
|
variant: variant,
|
|
@@ -22,8 +26,8 @@ var EliceButton = forwardRef(function (_a, ref) {
|
|
|
22
26
|
height: isMiniTablet ? '42px' : '56px',
|
|
23
27
|
borderRadius: isMiniTablet ? '12px' : '16px',
|
|
24
28
|
padding: isMiniTablet ? '8px 12px' : '12px 20px',
|
|
25
|
-
color:
|
|
26
|
-
backgroundColor:
|
|
29
|
+
color: resolvedColor,
|
|
30
|
+
backgroundColor: resolvedBgColor,
|
|
27
31
|
fontFamily: 'inherit'
|
|
28
32
|
}
|
|
29
33
|
}, rest, {
|
|
@@ -8,11 +8,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
var FooterContainer = /*#__PURE__*/_styled(Stack, {
|
|
9
9
|
target: "ecog5a42"
|
|
10
10
|
})("production" === "production" ? {
|
|
11
|
-
name: "
|
|
12
|
-
styles: "display:flex;align-items:center;justify-content:center;gap:12px"
|
|
11
|
+
name: "z2w5c4",
|
|
12
|
+
styles: "display:flex;align-items:center;justify-content:center;white-space:nowrap;flex-direction:row;gap:12px"
|
|
13
13
|
} : {
|
|
14
|
-
name: "
|
|
15
|
-
styles: "display:flex;align-items:center;justify-content:center;gap:12px",
|
|
14
|
+
name: "z2w5c4",
|
|
15
|
+
styles: "display:flex;align-items:center;justify-content:center;white-space:nowrap;flex-direction:row;gap:12px",
|
|
16
16
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
17
17
|
});
|
|
18
18
|
var FooterPagination = /*#__PURE__*/_styled(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;
|
|
@@ -19,6 +19,10 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
19
19
|
onRecord = _ref.onRecord,
|
|
20
20
|
_ref$type = _ref.type,
|
|
21
21
|
type = _ref$type === void 0 ? "notNeed" : _ref$type,
|
|
22
|
+
_ref$isReadyVisual = _ref.isReadyVisual,
|
|
23
|
+
isReadyVisual = _ref$isReadyVisual === void 0 ? false : _ref$isReadyVisual,
|
|
24
|
+
onResume = _ref.onResume,
|
|
25
|
+
onPause = _ref.onPause,
|
|
22
26
|
onTranscribingChange = _ref.onTranscribingChange,
|
|
23
27
|
forcedStep = _ref.forcedStep,
|
|
24
28
|
closeRecorder = _ref.closeRecorder;
|
|
@@ -59,9 +63,11 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
59
63
|
};
|
|
60
64
|
}();
|
|
61
65
|
var handlePause = function handlePause() {
|
|
66
|
+
onPause === null || onPause === void 0 ? void 0 : onPause();
|
|
62
67
|
pauseRecording();
|
|
63
68
|
};
|
|
64
69
|
var handleResume = function handleResume() {
|
|
70
|
+
onResume === null || onResume === void 0 ? void 0 : onResume();
|
|
65
71
|
resumeRecording();
|
|
66
72
|
};
|
|
67
73
|
var handleStop = function handleStop() {
|
|
@@ -89,7 +95,7 @@ var EliceRecorderStep = function EliceRecorderStep(_ref) {
|
|
|
89
95
|
variant: visualType,
|
|
90
96
|
onClickRecord: handleStart
|
|
91
97
|
}) : jsxs(StyledVisualizerBox, {
|
|
92
|
-
children: [jsx(SoundVisualizer, {
|
|
98
|
+
children: [!isReadyVisual && jsx(SoundVisualizer, {
|
|
93
99
|
analyser: recorderState.analyser,
|
|
94
100
|
variant: visualType,
|
|
95
101
|
bgColor: theme.palette.common.white
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as useAIDTMediaQuery } from './useAIDTMediaQuery';
|
package/es/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export { default as useAIDTMediaQuery } from './useAIDTMediaQuery.js';
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@mui/material/styles';
|
|
1
2
|
export { default as EliceAIFeedback } from './components/AI-feedback/AIFeedback.js';
|
|
2
3
|
export { default as EliceBadge } from './components/badge/Badge.js';
|
|
3
4
|
export { default as EliceButton } from './components/button/Button.js';
|
|
@@ -42,6 +43,7 @@ export { default as Recording } from './icons/Recording.js';
|
|
|
42
43
|
export { default as ReadyRecord } from './icons/ReadyRecord.js';
|
|
43
44
|
export { default as RecordPlay } from './icons/RecordPlay.js';
|
|
44
45
|
export { default as SendArrow } from './icons/SendArrow.js';
|
|
46
|
+
export { default as useAIDTMediaQuery } from './hooks/useAIDTMediaQuery.js';
|
|
45
47
|
export { RecorderProvider } from './components/recorder-step/RecorderContext.js';
|
|
46
48
|
export { createAIDTTheme } from './theme/createAIDTTheme.js';
|
|
47
49
|
export { mint } from './tokens/colors/mint.js';
|
|
@@ -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 };
|
|
@@ -5,9 +5,6 @@ import { getThemeColors } from './AIDTTheme.js';
|
|
|
5
5
|
import { AIDTBreakpoints } from '../breakpoints/breakpoints.js';
|
|
6
6
|
import { common } from '../tokens/colors/common.js';
|
|
7
7
|
|
|
8
|
-
/**
|
|
9
|
-
* Create AIDT Theme according to PaletteName, pallettPublisher, pallettSubject, pallettLevel
|
|
10
|
-
**/
|
|
11
8
|
var createAIDTTheme = function createAIDTTheme(_ref) {
|
|
12
9
|
var _ref$paletteMode = _ref.paletteMode,
|
|
13
10
|
paletteMode = _ref$paletteMode === void 0 ? 'light' : _ref$paletteMode,
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
pagination: true;
|
|
58
|
+
buttoninput: true;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -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;
|