@elicecontents/content-ui 1.0.6 → 1.0.7
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/audio/Audio.d.ts +5 -0
- package/cjs/components/audio/Audio.js +91 -0
- package/cjs/components/audio/Pause.d.ts +5 -0
- package/cjs/components/audio/Pause.js +97 -0
- package/cjs/components/audio/Play.d.ts +5 -0
- package/cjs/components/audio/Play.js +95 -0
- package/cjs/components/audio/index.d.ts +2 -0
- package/cjs/components/audio/index.js +7 -0
- package/cjs/components/base-input/BaseInput.d.ts +4 -2
- package/cjs/components/base-input/BaseInput.js +27 -20
- package/cjs/components/index.d.ts +3 -0
- package/cjs/components/index.js +6 -0
- package/cjs/components/recorder/Recorder.d.ts +6 -0
- package/cjs/components/recorder/Recorder.js +218 -0
- package/cjs/components/recorder/index.d.ts +2 -0
- package/cjs/components/recorder/index.js +7 -0
- package/cjs/components/video/VideoPlayer.d.ts +21 -0
- package/cjs/components/video/VideoPlayer.js +90 -0
- package/cjs/components/video/index.d.ts +2 -0
- package/cjs/components/video/index.js +7 -0
- package/cjs/icons/NumbersIcon.d.ts +3 -1
- package/cjs/icons/NumbersIcon.js +23 -3
- package/cjs/index.js +6 -0
- package/cjs/typography/typography.d.ts +11 -0
- package/cjs/typography/typography.js +9 -0
- package/es/components/audio/Audio.d.ts +5 -0
- package/es/components/audio/Audio.js +83 -0
- package/es/components/audio/Pause.d.ts +5 -0
- package/es/components/audio/Pause.js +89 -0
- package/es/components/audio/Play.d.ts +5 -0
- package/es/components/audio/Play.js +87 -0
- package/es/components/audio/index.d.ts +2 -0
- package/es/components/audio/index.js +1 -0
- package/es/components/base-input/BaseInput.d.ts +4 -2
- package/es/components/base-input/BaseInput.js +27 -20
- package/es/components/index.d.ts +3 -0
- package/es/components/index.js +3 -0
- package/es/components/recorder/Recorder.d.ts +6 -0
- package/es/components/recorder/Recorder.js +209 -0
- package/es/components/recorder/index.d.ts +2 -0
- package/es/components/recorder/index.js +1 -0
- package/es/components/video/VideoPlayer.d.ts +21 -0
- package/es/components/video/VideoPlayer.js +86 -0
- package/es/components/video/index.d.ts +2 -0
- package/es/components/video/index.js +1 -0
- package/es/icons/NumbersIcon.d.ts +3 -1
- package/es/icons/NumbersIcon.js +23 -3
- package/es/index.js +3 -0
- package/es/typography/typography.d.ts +11 -0
- package/es/typography/typography.js +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface EliceVideoPlayerProps {
|
|
3
|
+
source: string;
|
|
4
|
+
autoPlay?: boolean;
|
|
5
|
+
onPlay?: () => void;
|
|
6
|
+
onPause?: () => void;
|
|
7
|
+
onEnded?: () => void;
|
|
8
|
+
onProgress?: (seconds: number) => void;
|
|
9
|
+
tracks?: {
|
|
10
|
+
src: string;
|
|
11
|
+
kind: string;
|
|
12
|
+
srclang: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
sx?: React.CSSProperties;
|
|
16
|
+
height?: string;
|
|
17
|
+
pageKey?: string;
|
|
18
|
+
videoKey?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const EliceVideoPlayer: ({ source, autoPlay, onPlay, onPause, onEnded, onProgress, tracks, sx, height, videoKey, }: EliceVideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default EliceVideoPlayer;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var material = require('@mui/material');
|
|
8
|
+
|
|
9
|
+
var EliceVideoPlayer = function EliceVideoPlayer(_ref) {
|
|
10
|
+
var source = _ref.source,
|
|
11
|
+
_ref$autoPlay = _ref.autoPlay,
|
|
12
|
+
autoPlay = _ref$autoPlay === void 0 ? false : _ref$autoPlay,
|
|
13
|
+
onPlay = _ref.onPlay,
|
|
14
|
+
onPause = _ref.onPause,
|
|
15
|
+
onEnded = _ref.onEnded,
|
|
16
|
+
onProgress = _ref.onProgress,
|
|
17
|
+
tracks = _ref.tracks,
|
|
18
|
+
sx = _ref.sx,
|
|
19
|
+
_ref$height = _ref.height,
|
|
20
|
+
height = _ref$height === void 0 ? 'auto' : _ref$height,
|
|
21
|
+
videoKey = _ref.videoKey;
|
|
22
|
+
var videoRef = React.useRef(null);
|
|
23
|
+
var lastTime = React.useRef(videoKey ? Number(localStorage.getItem(videoKey)) || 0 : 0);
|
|
24
|
+
React.useEffect(function () {
|
|
25
|
+
var video = videoRef.current;
|
|
26
|
+
if (!video) return;
|
|
27
|
+
video.currentTime = lastTime.current;
|
|
28
|
+
var handlePlay = function handlePlay() {
|
|
29
|
+
return onPlay === null || onPlay === void 0 ? void 0 : onPlay();
|
|
30
|
+
};
|
|
31
|
+
var handlePause = function handlePause() {
|
|
32
|
+
return onPause === null || onPause === void 0 ? void 0 : onPause();
|
|
33
|
+
};
|
|
34
|
+
var handleEnded = function handleEnded() {
|
|
35
|
+
return onEnded === null || onEnded === void 0 ? void 0 : onEnded();
|
|
36
|
+
};
|
|
37
|
+
var handleTimeUpdate = function handleTimeUpdate() {
|
|
38
|
+
var seconds = video.currentTime;
|
|
39
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(seconds);
|
|
40
|
+
if (videoKey) {
|
|
41
|
+
localStorage.setItem(videoKey, seconds.toString());
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
video.addEventListener('play', handlePlay);
|
|
45
|
+
video.addEventListener('pause', handlePause);
|
|
46
|
+
video.addEventListener('ended', handleEnded);
|
|
47
|
+
video.addEventListener('timeupdate', handleTimeUpdate);
|
|
48
|
+
return function () {
|
|
49
|
+
video.removeEventListener('play', handlePlay);
|
|
50
|
+
video.removeEventListener('pause', handlePause);
|
|
51
|
+
video.removeEventListener('ended', handleEnded);
|
|
52
|
+
video.removeEventListener('timeupdate', handleTimeUpdate);
|
|
53
|
+
};
|
|
54
|
+
}, [videoKey, onPlay, onPause, onEnded, onProgress]);
|
|
55
|
+
return jsxRuntime.jsx(material.Stack, {
|
|
56
|
+
width: "100%",
|
|
57
|
+
height: height,
|
|
58
|
+
borderRadius: "1rem",
|
|
59
|
+
overflow: "hidden",
|
|
60
|
+
border: "1px solid #e0e0e0",
|
|
61
|
+
sx: Object.assign({
|
|
62
|
+
video: {
|
|
63
|
+
width: '100%',
|
|
64
|
+
height: '100%',
|
|
65
|
+
borderRadius: '1rem',
|
|
66
|
+
objectFit: 'cover'
|
|
67
|
+
}
|
|
68
|
+
}, sx),
|
|
69
|
+
children: jsxRuntime.jsxs("video", {
|
|
70
|
+
ref: videoRef,
|
|
71
|
+
controls: true,
|
|
72
|
+
autoPlay: autoPlay,
|
|
73
|
+
width: "100%",
|
|
74
|
+
crossOrigin: "anonymous",
|
|
75
|
+
children: [jsxRuntime.jsx("source", {
|
|
76
|
+
src: source,
|
|
77
|
+
type: "video/mp4"
|
|
78
|
+
}), tracks === null || tracks === void 0 ? void 0 : tracks.map(function (track, i) {
|
|
79
|
+
return jsxRuntime.jsx("track", {
|
|
80
|
+
src: track.src,
|
|
81
|
+
kind: track.kind,
|
|
82
|
+
srcLang: track.srclang,
|
|
83
|
+
label: track.label
|
|
84
|
+
}, i);
|
|
85
|
+
}), "Your browser does not support the video tag."]
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports.default = EliceVideoPlayer;
|
|
@@ -4,6 +4,8 @@ interface NumbersIconProps {
|
|
|
4
4
|
color?: string;
|
|
5
5
|
textColor?: string;
|
|
6
6
|
pathColor?: string;
|
|
7
|
+
customBackgroundPath?: string;
|
|
8
|
+
type?: 'default' | 'spark';
|
|
7
9
|
}
|
|
8
|
-
declare const NumbersIcon: ({ value, size, color, textColor, pathColor, }: NumbersIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const NumbersIcon: ({ value, size, type, color, textColor, pathColor, customBackgroundPath, }: NumbersIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
11
|
export default NumbersIcon;
|
package/cjs/icons/NumbersIcon.js
CHANGED
|
@@ -5,6 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var material = require('@mui/material');
|
|
7
7
|
|
|
8
|
+
var backgroundPaths = {
|
|
9
|
+
spark: "M60 42.4274C60 42.4274 46.7999 45.2863 42.4263 60C42.4263 60 31.0711 52.6884 17.5737 60C17.5737 60 14.7148 46.7999 0 42.4263C0 42.4263 7.31164 31.0711 0 17.5737C0 17.5737 13.2001 14.7148 17.5737 0C17.5737 0 28.9289 7.31164 42.4263 0C42.4263 0 45.2852 13.2001 60 17.5737C60 17.5737 52.6884 28.9289 60 42.4263V42.4274Z"
|
|
10
|
+
// 추가 배경이 있다면 여기에 계속 추가
|
|
11
|
+
};
|
|
8
12
|
// ✅ 숫자 및 문자별 `path` 값을 정적으로 저장
|
|
9
13
|
var numberPaths = {
|
|
10
14
|
"1": "M25.7758 31.16H21.3838V16.376L16.9678 19.064V14.84L22.1038 11.864H25.7758V31.16Z",
|
|
@@ -26,19 +30,35 @@ var NumbersIcon = function NumbersIcon(_ref) {
|
|
|
26
30
|
var value = _ref.value,
|
|
27
31
|
_ref$size = _ref.size,
|
|
28
32
|
size = _ref$size === void 0 ? 45 : _ref$size,
|
|
33
|
+
_ref$type = _ref.type,
|
|
34
|
+
type = _ref$type === void 0 ? 'default' : _ref$type,
|
|
29
35
|
color = _ref.color,
|
|
30
36
|
textColor = _ref.textColor,
|
|
31
37
|
_ref$pathColor = _ref.pathColor,
|
|
32
|
-
pathColor = _ref$pathColor === void 0 ? "#fff" : _ref$pathColor
|
|
38
|
+
pathColor = _ref$pathColor === void 0 ? "#fff" : _ref$pathColor,
|
|
39
|
+
customBackgroundPath = _ref.customBackgroundPath;
|
|
33
40
|
var theme = material.useTheme();
|
|
34
41
|
var path = numberPaths[value.toString()];
|
|
42
|
+
var fillColor = color || theme.palette.primary.main;
|
|
43
|
+
var textFill = textColor || theme.palette.text.primary;
|
|
44
|
+
var resolvedBackgroundPath = customBackgroundPath || (type !== "default" ? backgroundPaths[type] : undefined);
|
|
35
45
|
return jsxRuntime.jsxs("svg", {
|
|
36
46
|
width: size,
|
|
37
47
|
height: size,
|
|
38
48
|
viewBox: "0 0 45 45",
|
|
39
49
|
fill: "none",
|
|
40
50
|
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
-
children: [jsxRuntime.jsx("
|
|
51
|
+
children: [resolvedBackgroundPath ? jsxRuntime.jsx("svg", {
|
|
52
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
+
width: size,
|
|
54
|
+
height: size,
|
|
55
|
+
viewBox: "0 0 60 60",
|
|
56
|
+
fill: "none",
|
|
57
|
+
children: jsxRuntime.jsx("path", {
|
|
58
|
+
d: resolvedBackgroundPath,
|
|
59
|
+
fill: fillColor
|
|
60
|
+
})
|
|
61
|
+
}) : jsxRuntime.jsx("circle", {
|
|
42
62
|
cx: "22.5",
|
|
43
63
|
cy: "22.5",
|
|
44
64
|
r: "22.5",
|
|
@@ -52,7 +72,7 @@ var NumbersIcon = function NumbersIcon(_ref) {
|
|
|
52
72
|
dominantBaseline: "middle",
|
|
53
73
|
textAnchor: "middle",
|
|
54
74
|
fontSize: size * 0.5,
|
|
55
|
-
fill:
|
|
75
|
+
fill: textFill,
|
|
56
76
|
fontFamily: "Arial, sans-serif",
|
|
57
77
|
fontWeight: "bold",
|
|
58
78
|
children: value
|
package/cjs/index.js
CHANGED
|
@@ -20,6 +20,9 @@ var SubtitleButton = require('./components/subtitle-button/SubtitleButton.js');
|
|
|
20
20
|
var BaseInput = require('./components/base-input/BaseInput.js');
|
|
21
21
|
var Modal = require('./components/Modal/Modal.js');
|
|
22
22
|
var RecorderChat = require('./components/recorder-chat/RecorderChat.js');
|
|
23
|
+
var VideoPlayer = require('./components/video/VideoPlayer.js');
|
|
24
|
+
var Recorder = require('./components/recorder/Recorder.js');
|
|
25
|
+
var Audio = require('./components/audio/Audio.js');
|
|
23
26
|
var createAIDTTheme = require('./theme/createAIDTTheme.js');
|
|
24
27
|
var index = require('./tokens/colors/index.js');
|
|
25
28
|
var breakpoints = require('./tokens/breakpoints/breakpoints.js');
|
|
@@ -75,6 +78,9 @@ exports.EliceSubButton = SubtitleButton.default;
|
|
|
75
78
|
exports.BaseInput = BaseInput.default;
|
|
76
79
|
exports.EliceModal = Modal.default;
|
|
77
80
|
exports.EliceRecorderChat = RecorderChat.default;
|
|
81
|
+
exports.EliceVideoPlayer = VideoPlayer.default;
|
|
82
|
+
exports.EliceRecorder = Recorder.default;
|
|
83
|
+
exports.EliceAudioPlayer = Audio.default;
|
|
78
84
|
exports.createAIDTTheme = createAIDTTheme.createAIDTTheme;
|
|
79
85
|
exports.colors = index;
|
|
80
86
|
exports.breakpoints = breakpoints.breakpoints;
|
|
@@ -41,6 +41,17 @@ export declare const createAIDTTypography: (fontFamily: keyof typeof TYPOGRAPHY_
|
|
|
41
41
|
fontSize: string;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
+
subtitle3: {
|
|
45
|
+
fontSize: string;
|
|
46
|
+
fontWeight: number;
|
|
47
|
+
lineHeight: string;
|
|
48
|
+
"@media (max-width:1200px)": {
|
|
49
|
+
fontSize: string;
|
|
50
|
+
};
|
|
51
|
+
"@media (max-width:512px)": {
|
|
52
|
+
fontSize: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
44
55
|
body1: {
|
|
45
56
|
fontSize: string;
|
|
46
57
|
fontWeight: number;
|
|
@@ -62,6 +62,15 @@ var createAIDTTypography = function createAIDTTypography(fontFamily) {
|
|
|
62
62
|
fontSize: '22px'
|
|
63
63
|
}),
|
|
64
64
|
subtitle2: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({
|
|
65
|
+
fontSize: '24px',
|
|
66
|
+
fontWeight: 700,
|
|
67
|
+
lineHeight: '160%'
|
|
68
|
+
}, "@media (max-width:1200px)", {
|
|
69
|
+
fontSize: '24px'
|
|
70
|
+
}), "@media (max-width:512px)", {
|
|
71
|
+
fontSize: '18px'
|
|
72
|
+
}),
|
|
73
|
+
subtitle3: _rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({
|
|
65
74
|
fontSize: '20px',
|
|
66
75
|
fontWeight: 700,
|
|
67
76
|
lineHeight: '140%'
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import _styled from '@emotion/styled/base';
|
|
3
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { useRef, useState, useEffect } from 'react';
|
|
5
|
+
import { Stack, LinearProgress } from '@mui/material';
|
|
6
|
+
import PauseIcon from './Pause.js';
|
|
7
|
+
import PlayIcon from './Play.js';
|
|
8
|
+
|
|
9
|
+
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)."; }
|
|
10
|
+
var PlayerButton = /*#__PURE__*/_styled("button", {
|
|
11
|
+
target: "e90no0w0"
|
|
12
|
+
})("production" === "production" ? {
|
|
13
|
+
name: "thmcur",
|
|
14
|
+
styles: "display:flex;background-color:transparent!important;border:none"
|
|
15
|
+
} : {
|
|
16
|
+
name: "thmcur",
|
|
17
|
+
styles: "display:flex;background-color:transparent!important;border:none",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
});
|
|
20
|
+
var EliceAudioPlayer = function EliceAudioPlayer(_ref) {
|
|
21
|
+
var src = _ref.src;
|
|
22
|
+
var audioRef = useRef(null);
|
|
23
|
+
var _useState = useState(false),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
isPlaying = _useState2[0],
|
|
26
|
+
setIsPlaying = _useState2[1];
|
|
27
|
+
var _useState3 = useState(0),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
progress = _useState4[0],
|
|
30
|
+
setProgress = _useState4[1];
|
|
31
|
+
var togglePlay = function togglePlay() {
|
|
32
|
+
var audio = audioRef.current;
|
|
33
|
+
if (!audio) return;
|
|
34
|
+
if (isPlaying) {
|
|
35
|
+
audio.pause();
|
|
36
|
+
} else {
|
|
37
|
+
audio.play();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
useEffect(function () {
|
|
41
|
+
var audio = audioRef.current;
|
|
42
|
+
if (!audio) return;
|
|
43
|
+
var handlePlay = function handlePlay() {
|
|
44
|
+
return setIsPlaying(true);
|
|
45
|
+
};
|
|
46
|
+
var handlePause = function handlePause() {
|
|
47
|
+
return setIsPlaying(false);
|
|
48
|
+
};
|
|
49
|
+
var handleTimeUpdate = function handleTimeUpdate() {
|
|
50
|
+
var percent = audio.currentTime / audio.duration * 100;
|
|
51
|
+
setProgress(percent);
|
|
52
|
+
};
|
|
53
|
+
audio.addEventListener('play', handlePlay);
|
|
54
|
+
audio.addEventListener('pause', handlePause);
|
|
55
|
+
audio.addEventListener('timeupdate', handleTimeUpdate);
|
|
56
|
+
return function () {
|
|
57
|
+
audio.removeEventListener('play', handlePlay);
|
|
58
|
+
audio.removeEventListener('pause', handlePause);
|
|
59
|
+
audio.removeEventListener('timeupdate', handleTimeUpdate);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return jsxs(Stack, {
|
|
63
|
+
spacing: 1,
|
|
64
|
+
alignItems: "center",
|
|
65
|
+
direction: "row",
|
|
66
|
+
children: [jsx("audio", {
|
|
67
|
+
ref: audioRef,
|
|
68
|
+
src: src,
|
|
69
|
+
preload: "auto"
|
|
70
|
+
}), jsx(PlayerButton, {
|
|
71
|
+
onClick: togglePlay,
|
|
72
|
+
children: isPlaying ? jsx(PauseIcon, {}) : jsx(PlayIcon, {})
|
|
73
|
+
}), jsx(LinearProgress, {
|
|
74
|
+
variant: "determinate",
|
|
75
|
+
value: progress,
|
|
76
|
+
sx: {
|
|
77
|
+
width: '200px'
|
|
78
|
+
}
|
|
79
|
+
})]
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { EliceAudioPlayer as default };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
var IconWrapper = /*#__PURE__*/_styled("button", {
|
|
7
|
+
target: "e1qsg1m10"
|
|
8
|
+
})("production" === "production" ? {
|
|
9
|
+
name: "6skc8s",
|
|
10
|
+
styles: "padding:0;border:none;background:transparent;cursor:pointer;&:active svg rect{fill:#7c85b8;}&:active svg path{fill:#f0f0f0;}"
|
|
11
|
+
} : {
|
|
12
|
+
name: "6skc8s",
|
|
13
|
+
styles: "padding:0;border:none;background:transparent;cursor:pointer;&:active svg rect{fill:#7c85b8;}&:active svg path{fill:#f0f0f0;}",
|
|
14
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
15
|
+
});
|
|
16
|
+
var PauseIcon = function PauseIcon(_ref) {
|
|
17
|
+
var _ref$width = _ref.width,
|
|
18
|
+
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
19
|
+
_ref$height = _ref.height,
|
|
20
|
+
height = _ref$height === void 0 ? 40 : _ref$height;
|
|
21
|
+
var theme = useTheme();
|
|
22
|
+
return jsx(IconWrapper, {
|
|
23
|
+
pressColor: theme.palette.secondary.main,
|
|
24
|
+
children: jsxs("svg", {
|
|
25
|
+
width: width,
|
|
26
|
+
height: height,
|
|
27
|
+
viewBox: "0 0 54 54",
|
|
28
|
+
fill: "none",
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
children: [jsx("g", {
|
|
31
|
+
filter: "url(#filter0_i_593_3904)",
|
|
32
|
+
children: jsx("rect", {
|
|
33
|
+
width: "54",
|
|
34
|
+
height: "54",
|
|
35
|
+
rx: "16",
|
|
36
|
+
fill: theme.palette.primary.main
|
|
37
|
+
})
|
|
38
|
+
}), jsx("path", {
|
|
39
|
+
fillRule: "evenodd",
|
|
40
|
+
clipRule: "evenodd",
|
|
41
|
+
d: "M20 17.75H22C23.2426 17.75 24.25 18.7574 24.25 20V34C24.25 35.2426 23.2426 36.25 22 36.25H20C18.7574 36.25 17.75 35.2426 17.75 34V20C17.75 18.7574 18.7574 17.75 20 17.75ZM16 20C16 17.7909 17.7909 16 20 16H22C24.2091 16 26 17.7909 26 20V34C26 36.2091 24.2091 38 22 38H20C17.7909 38 16 36.2091 16 34V20ZM32 17.75H34C35.2426 17.75 36.25 18.7574 36.25 20V34C36.25 35.2427 35.2426 36.25 34 36.25H32C30.7573 36.25 29.75 35.2427 29.75 34V20C29.75 18.7574 30.7573 17.75 32 17.75ZM28 20C28 17.7909 29.7908 16 32 16H34C36.2091 16 38 17.7909 38 20V34C38 36.2092 36.2091 38 34 38H32C29.7908 38 28 36.2092 28 34V20Z",
|
|
42
|
+
fill: "white"
|
|
43
|
+
}), jsx("defs", {
|
|
44
|
+
children: jsxs("filter", {
|
|
45
|
+
id: "filter0_i_593_3904",
|
|
46
|
+
x: "0",
|
|
47
|
+
y: "0",
|
|
48
|
+
width: "55",
|
|
49
|
+
height: "55",
|
|
50
|
+
filterUnits: "userSpaceOnUse",
|
|
51
|
+
colorInterpolationFilters: "sRGB",
|
|
52
|
+
children: [jsx("feFlood", {
|
|
53
|
+
floodOpacity: "0",
|
|
54
|
+
result: "BackgroundImageFix"
|
|
55
|
+
}), jsx("feBlend", {
|
|
56
|
+
mode: "normal",
|
|
57
|
+
"in": "SourceGraphic",
|
|
58
|
+
in2: "BackgroundImageFix",
|
|
59
|
+
result: "shape"
|
|
60
|
+
}), jsx("feColorMatrix", {
|
|
61
|
+
"in": "SourceAlpha",
|
|
62
|
+
type: "matrix",
|
|
63
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
64
|
+
result: "hardAlpha"
|
|
65
|
+
}), jsx("feOffset", {
|
|
66
|
+
dx: "1",
|
|
67
|
+
dy: "1"
|
|
68
|
+
}), jsx("feGaussianBlur", {
|
|
69
|
+
stdDeviation: "3.3"
|
|
70
|
+
}), jsx("feComposite", {
|
|
71
|
+
in2: "hardAlpha",
|
|
72
|
+
operator: "arithmetic",
|
|
73
|
+
k2: "-1",
|
|
74
|
+
k3: "1"
|
|
75
|
+
}), jsx("feColorMatrix", {
|
|
76
|
+
type: "matrix",
|
|
77
|
+
values: "0 0 0 0 0.912047 0 0 0 0 0.912047 0 0 0 0 0.940267 0 0 0 1 0"
|
|
78
|
+
}), jsx("feBlend", {
|
|
79
|
+
mode: "normal",
|
|
80
|
+
in2: "shape",
|
|
81
|
+
result: "effect1_innerShadow_593_3904"
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
})]
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { PauseIcon as default };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTheme } from '@mui/material';
|
|
4
|
+
|
|
5
|
+
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)."; }
|
|
6
|
+
var IconWrapper = /*#__PURE__*/_styled("button", {
|
|
7
|
+
target: "e15psp4j0"
|
|
8
|
+
})("production" === "production" ? {
|
|
9
|
+
name: "6skc8s",
|
|
10
|
+
styles: "padding:0;border:none;background:transparent;cursor:pointer;&:active svg rect{fill:#7c85b8;}&:active svg path{fill:#f0f0f0;}"
|
|
11
|
+
} : {
|
|
12
|
+
name: "6skc8s",
|
|
13
|
+
styles: "padding:0;border:none;background:transparent;cursor:pointer;&:active svg rect{fill:#7c85b8;}&:active svg path{fill:#f0f0f0;}",
|
|
14
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
15
|
+
});
|
|
16
|
+
var PlayIcon = function PlayIcon(_ref) {
|
|
17
|
+
var _ref$width = _ref.width,
|
|
18
|
+
width = _ref$width === void 0 ? 40 : _ref$width,
|
|
19
|
+
_ref$height = _ref.height,
|
|
20
|
+
height = _ref$height === void 0 ? 40 : _ref$height;
|
|
21
|
+
var theme = useTheme();
|
|
22
|
+
return jsx(IconWrapper, {
|
|
23
|
+
pressColor: theme.palette.secondary.main,
|
|
24
|
+
children: jsxs("svg", {
|
|
25
|
+
width: width,
|
|
26
|
+
height: height,
|
|
27
|
+
viewBox: "0 0 54 54",
|
|
28
|
+
fill: "none",
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
children: [jsx("g", {
|
|
31
|
+
filter: "url(#filter0_i_274_7284)",
|
|
32
|
+
children: jsx("rect", {
|
|
33
|
+
width: "54",
|
|
34
|
+
height: "54",
|
|
35
|
+
rx: "16",
|
|
36
|
+
fill: theme.palette.primary.main
|
|
37
|
+
})
|
|
38
|
+
}), jsx("path", {
|
|
39
|
+
d: "M37.1161 29.0649C37.5038 28.8516 37.8228 28.5325 38.0361 28.1448C38.6571 27.0157 38.2452 25.5969 37.1161 24.9759L20.9578 16.0888C20.6133 15.8993 20.2265 15.8 19.8333 15.8C18.5447 15.8 17.5 16.8447 17.5 18.1333V35.9074C17.5 36.3006 17.5994 36.6874 17.7888 37.0319C18.4099 38.161 19.8287 38.5729 20.9578 37.9519L37.1161 29.0649ZM19.5417 17.6317L36.5963 27.0133L19.5417 36.3942V17.6317Z",
|
|
40
|
+
fill: "white"
|
|
41
|
+
}), jsx("defs", {
|
|
42
|
+
children: jsxs("filter", {
|
|
43
|
+
id: "filter0_i_274_7284",
|
|
44
|
+
x: "0",
|
|
45
|
+
y: "0",
|
|
46
|
+
width: "55",
|
|
47
|
+
height: "55",
|
|
48
|
+
filterUnits: "userSpaceOnUse",
|
|
49
|
+
colorInterpolationFilters: "sRGB",
|
|
50
|
+
children: [jsx("feFlood", {
|
|
51
|
+
floodOpacity: "0",
|
|
52
|
+
result: "BackgroundImageFix"
|
|
53
|
+
}), jsx("feBlend", {
|
|
54
|
+
mode: "normal",
|
|
55
|
+
"in": "SourceGraphic",
|
|
56
|
+
in2: "BackgroundImageFix",
|
|
57
|
+
result: "shape"
|
|
58
|
+
}), jsx("feColorMatrix", {
|
|
59
|
+
"in": "SourceAlpha",
|
|
60
|
+
type: "matrix",
|
|
61
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
62
|
+
result: "hardAlpha"
|
|
63
|
+
}), jsx("feOffset", {
|
|
64
|
+
dx: "1",
|
|
65
|
+
dy: "1"
|
|
66
|
+
}), jsx("feGaussianBlur", {
|
|
67
|
+
stdDeviation: "3.3"
|
|
68
|
+
}), jsx("feComposite", {
|
|
69
|
+
in2: "hardAlpha",
|
|
70
|
+
operator: "arithmetic",
|
|
71
|
+
k2: "-1",
|
|
72
|
+
k3: "1"
|
|
73
|
+
}), jsx("feColorMatrix", {
|
|
74
|
+
type: "matrix",
|
|
75
|
+
values: "0 0 0 0 0.912047 0 0 0 0 0.912047 0 0 0 0 0.940267 0 0 0 1 0"
|
|
76
|
+
}), jsx("feBlend", {
|
|
77
|
+
mode: "normal",
|
|
78
|
+
in2: "shape",
|
|
79
|
+
result: "effect1_innerShadow_274_7284"
|
|
80
|
+
})]
|
|
81
|
+
})
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export { PlayIcon as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EliceAudioPlayer } from './Audio.js';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export type BaseInputType = "normal" | "area";
|
|
2
3
|
export interface BaseInputProps {
|
|
3
4
|
value: string;
|
|
4
5
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
6
|
placeholder?: string;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
|
-
isDisabled
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
inputType: BaseInputType;
|
|
8
10
|
}
|
|
9
|
-
declare const BaseInput: (({ value, onChange, placeholder, children, isDisabled, }: BaseInputProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
11
|
+
declare const BaseInput: (({ value, onChange, placeholder, children, isDisabled, inputType, }: BaseInputProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
10
12
|
LeftElement: ({ children }: {
|
|
11
13
|
children?: React.ReactNode;
|
|
12
14
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,14 +5,17 @@ import { useTheme } from '@mui/material';
|
|
|
5
5
|
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)."; }
|
|
6
6
|
var BaseInputContainer = /*#__PURE__*/_styled("div", {
|
|
7
7
|
target: "e8c2rcu3"
|
|
8
|
-
})("
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
8
|
+
})("display:flex;align-items:center;gap:8px;width:100%;border:", function (_ref) {
|
|
9
|
+
var type = _ref.type,
|
|
10
|
+
borderColor = _ref.borderColor;
|
|
11
|
+
return type !== "normal" ? "1px solid ".concat(borderColor) : "none";
|
|
12
|
+
}, ";border-radius:", function (_ref2) {
|
|
13
|
+
var type = _ref2.type;
|
|
14
|
+
return type !== "normal" ? "1.5rem" : "none";
|
|
15
|
+
}, ";padding:", function (_ref3) {
|
|
16
|
+
var type = _ref3.type;
|
|
17
|
+
return type !== "normal" ? "1.375rem 1.5rem" : "none";
|
|
18
|
+
}, ";");
|
|
16
19
|
var BaseInputContent = /*#__PURE__*/_styled("div", {
|
|
17
20
|
target: "e8c2rcu2"
|
|
18
21
|
})("production" === "production" ? {
|
|
@@ -35,21 +38,25 @@ var InputText = /*#__PURE__*/_styled("input", {
|
|
|
35
38
|
});
|
|
36
39
|
var UnderLineDivider = /*#__PURE__*/_styled("div", {
|
|
37
40
|
target: "e8c2rcu0"
|
|
38
|
-
})("width:100%;height:2px;background-color:", function (
|
|
39
|
-
var theme =
|
|
41
|
+
})("width:100%;height:2px;background-color:", function (_ref4) {
|
|
42
|
+
var theme = _ref4.theme;
|
|
40
43
|
return theme.palette.primary.main;
|
|
41
44
|
}, ";");
|
|
42
45
|
// ✅ 합성 컴포넌트 패턴 적용
|
|
43
|
-
var BaseInput = Object.assign(function (
|
|
44
|
-
var value =
|
|
45
|
-
onChange =
|
|
46
|
-
|
|
47
|
-
placeholder =
|
|
48
|
-
children =
|
|
49
|
-
|
|
50
|
-
isDisabled =
|
|
46
|
+
var BaseInput = Object.assign(function (_ref5) {
|
|
47
|
+
var value = _ref5.value,
|
|
48
|
+
onChange = _ref5.onChange,
|
|
49
|
+
_ref5$placeholder = _ref5.placeholder,
|
|
50
|
+
placeholder = _ref5$placeholder === void 0 ? "Enter text..." : _ref5$placeholder,
|
|
51
|
+
children = _ref5.children,
|
|
52
|
+
_ref5$isDisabled = _ref5.isDisabled,
|
|
53
|
+
isDisabled = _ref5$isDisabled === void 0 ? false : _ref5$isDisabled,
|
|
54
|
+
_ref5$inputType = _ref5.inputType,
|
|
55
|
+
inputType = _ref5$inputType === void 0 ? "normal" : _ref5$inputType;
|
|
51
56
|
var theme = useTheme();
|
|
52
57
|
return jsxs(BaseInputContainer, {
|
|
58
|
+
type: inputType,
|
|
59
|
+
borderColor: theme.palette.secondary.main,
|
|
53
60
|
children: [children && jsx("div", {
|
|
54
61
|
children: children
|
|
55
62
|
}), " ", jsxs(BaseInputContent, {
|
|
@@ -64,8 +71,8 @@ var BaseInput = Object.assign(function (_ref2) {
|
|
|
64
71
|
})]
|
|
65
72
|
});
|
|
66
73
|
}, {
|
|
67
|
-
LeftElement: function LeftElement(
|
|
68
|
-
var children =
|
|
74
|
+
LeftElement: function LeftElement(_ref6) {
|
|
75
|
+
var children = _ref6.children;
|
|
69
76
|
return jsx(Fragment, {
|
|
70
77
|
children: children
|
|
71
78
|
});
|
package/es/components/index.d.ts
CHANGED
package/es/components/index.js
CHANGED
|
@@ -18,3 +18,6 @@ export { default as EliceSubButton } from './subtitle-button/SubtitleButton.js';
|
|
|
18
18
|
export { default as BaseInput } from './base-input/BaseInput.js';
|
|
19
19
|
export { default as EliceModal } from './Modal/Modal.js';
|
|
20
20
|
export { default as EliceRecorderChat } from './recorder-chat/RecorderChat.js';
|
|
21
|
+
export { default as EliceVideoPlayer } from './video/VideoPlayer.js';
|
|
22
|
+
export { default as EliceRecorder } from './recorder/Recorder.js';
|
|
23
|
+
export { default as EliceAudioPlayer } from './audio/Audio.js';
|