@uniai-fe/uds-templates 0.10.3 → 0.11.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/dist/styles.css +194 -21
- package/package.json +15 -15
- package/src/cctv/components/cam-list/Item.tsx +4 -3
- package/src/cctv/components/pagination/Provider.tsx +6 -2
- package/src/cctv/components/pagination/list/Item.tsx +1 -0
- package/src/cctv/components/video/Card.tsx +30 -0
- package/src/cctv/components/video/Container.tsx +3 -0
- package/src/cctv/components/video/Template.tsx +6 -1
- package/src/cctv/components/video/index.tsx +2 -0
- package/src/cctv/components/video/overlay/footer/Container.tsx +2 -0
- package/src/cctv/components/video/overlay/footer/Metric.tsx +22 -0
- package/src/cctv/components/video/overlay/footer/Metrics.tsx +13 -0
- package/src/cctv/components/video/overlay/header/LiveState.tsx +1 -1
- package/src/cctv/components/video/overlay/index.tsx +4 -0
- package/src/cctv/components/viewer/desktop/Container.tsx +35 -4
- package/src/cctv/components/viewer/desktop/Headline.tsx +28 -0
- package/src/cctv/components/viewer/desktop/Overlay.tsx +60 -0
- package/src/cctv/components/viewer/desktop/Video.tsx +17 -5
- package/src/cctv/components/viewer/index.tsx +4 -0
- package/src/cctv/hooks/streamRegistry.ts +69 -30
- package/src/cctv/img/time.svg +4 -0
- package/src/cctv/styles/cam-list.scss +5 -15
- package/src/cctv/styles/pagination.scss +2 -1
- package/src/cctv/styles/variables.scss +18 -1
- package/src/cctv/styles/video.scss +95 -5
- package/src/cctv/styles/viewer.scss +73 -2
- package/src/cctv/types/props.ts +83 -0
|
@@ -1,7 +1,78 @@
|
|
|
1
|
+
.cctv-viewer-desktop-container {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--spacing-gap-6);
|
|
4
|
+
width: min(100%, 1216px);
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.cctv-viewer-desktop-headline {
|
|
9
|
+
min-height: 34px;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
gap: var(--spacing-gap-6);
|
|
14
|
+
|
|
15
|
+
h3 {
|
|
16
|
+
min-width: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
color: var(--color-label-strong);
|
|
20
|
+
font-size: var(--font-heading-medium-size);
|
|
21
|
+
line-height: 1.4;
|
|
22
|
+
font-weight: 700;
|
|
23
|
+
text-overflow: ellipsis;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cctv-viewer-desktop-time {
|
|
29
|
+
display: inline-flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: var(--spacing-gap-3);
|
|
32
|
+
color: var(--color-label-neutral);
|
|
33
|
+
font-size: var(--font-label-small-size);
|
|
34
|
+
line-height: var(--font-label-small-line-height);
|
|
35
|
+
font-weight: var(--font-label-small-weight);
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
}
|
|
38
|
+
|
|
1
39
|
.cctv-viewer-desktop-video-container {
|
|
2
|
-
|
|
40
|
+
--cctv-video-radius: var(--cctv-viewer-video-radius);
|
|
41
|
+
--cctv-overlay-padding-x: var(--cctv-viewer-overlay-padding-x);
|
|
42
|
+
--cctv-overlay-padding-y: var(--cctv-viewer-overlay-padding-y);
|
|
43
|
+
|
|
44
|
+
max-height: var(--cctv-viewer-video-max-height);
|
|
45
|
+
min-height: 0;
|
|
46
|
+
aspect-ratio: 608 / 309;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.cctv-viewer-desktop-overlay-body {
|
|
50
|
+
flex-direction: row;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.cctv-viewer-desktop-move-button.cctv-pagination-move-button {
|
|
55
|
+
width: 42px;
|
|
56
|
+
height: 42px;
|
|
57
|
+
background: var(--cctv-pagination-move-button-active);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.cctv-viewer-desktop-video-container .cctv-video-overlay-footer {
|
|
61
|
+
justify-content: flex-end;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.cctv-visually-hidden {
|
|
65
|
+
position: absolute;
|
|
66
|
+
width: 1px;
|
|
67
|
+
height: 1px;
|
|
68
|
+
padding: 0;
|
|
69
|
+
margin: -1px;
|
|
70
|
+
overflow: hidden;
|
|
71
|
+
clip: rect(0, 0, 0, 0);
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
border: 0;
|
|
3
74
|
}
|
|
4
75
|
|
|
5
76
|
.cctv-viewer-desktop-pagination-container {
|
|
6
|
-
margin-top: var(--spacing-gap-
|
|
77
|
+
margin-top: var(--spacing-gap-2);
|
|
7
78
|
}
|
package/src/cctv/types/props.ts
CHANGED
|
@@ -112,6 +112,10 @@ export interface CctvVideoOverlayHeaderProps {
|
|
|
112
112
|
*/
|
|
113
113
|
export interface CctvVideoOverlayFooterProps {
|
|
114
114
|
className?: string;
|
|
115
|
+
/**
|
|
116
|
+
* 제목/버튼과 함께 배치할 추가 콘텐츠
|
|
117
|
+
*/
|
|
118
|
+
children?: React.ReactNode;
|
|
115
119
|
/**
|
|
116
120
|
* 하단 타이틀 노출 여부
|
|
117
121
|
*/
|
|
@@ -130,6 +134,48 @@ export interface CctvVideoOverlayFooterProps {
|
|
|
130
134
|
isLive?: boolean;
|
|
131
135
|
}
|
|
132
136
|
|
|
137
|
+
/**
|
|
138
|
+
* CCTV; sensor metric 표시 상태
|
|
139
|
+
*/
|
|
140
|
+
export type CctvVideoMetricState = "normal" | "attention" | "unavailable";
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* CCTV; sensor metric props
|
|
144
|
+
* @property {React.ReactNode} children 표시할 센서 값
|
|
145
|
+
* @property {CctvVideoMetricState} [state] state dot 표시 상태
|
|
146
|
+
*/
|
|
147
|
+
export interface CctvVideoMetricProps {
|
|
148
|
+
/**
|
|
149
|
+
* 표시할 센서 값
|
|
150
|
+
*/
|
|
151
|
+
children: React.ReactNode;
|
|
152
|
+
/**
|
|
153
|
+
* state dot 표시 상태
|
|
154
|
+
*/
|
|
155
|
+
state?: CctvVideoMetricState;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* CCTV; Video Card props
|
|
160
|
+
* @property {React.ReactNode} children video/media 영역
|
|
161
|
+
* @property {React.ReactNode} [settings] media 하단 서비스 설정 영역
|
|
162
|
+
* @property {string} [className] 카드 루트 클래스
|
|
163
|
+
*/
|
|
164
|
+
export interface CctvVideoCardProps {
|
|
165
|
+
/**
|
|
166
|
+
* video/media 영역
|
|
167
|
+
*/
|
|
168
|
+
children: React.ReactNode;
|
|
169
|
+
/**
|
|
170
|
+
* media 하단 서비스 설정 영역
|
|
171
|
+
*/
|
|
172
|
+
settings?: React.ReactNode;
|
|
173
|
+
/**
|
|
174
|
+
* 카드 루트 클래스
|
|
175
|
+
*/
|
|
176
|
+
className?: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
133
179
|
/**
|
|
134
180
|
* CCTV; 비디오 상태 관련 props
|
|
135
181
|
* @property {boolean} [isError] 에러 상태 여부
|
|
@@ -169,6 +215,7 @@ export interface CctvVideoStateProps {
|
|
|
169
215
|
/**
|
|
170
216
|
* CCTV; Video Template props
|
|
171
217
|
* @property {string} [className] 루트 컨테이너에 적용할 클래스
|
|
218
|
+
* @property {"card" | "carousel" | "viewer"} [layout] 공용 video layout preset
|
|
172
219
|
* @property {CctvVideoOverlayHeaderProps} [headerOptions] 헤더 구성 옵션
|
|
173
220
|
* @property {CctvVideoOverlayFooterProps} [footerOptions] 푸터 구성 옵션
|
|
174
221
|
* @property {boolean} [isError] 에러 상태 여부
|
|
@@ -183,6 +230,10 @@ export interface CctvVideoTemplateProps extends CctvVideoStateProps {
|
|
|
183
230
|
*/
|
|
184
231
|
cam?: CctvCompanyCameraData;
|
|
185
232
|
className?: string;
|
|
233
|
+
/**
|
|
234
|
+
* 공용 video layout preset
|
|
235
|
+
*/
|
|
236
|
+
layout?: "card" | "carousel" | "viewer";
|
|
186
237
|
/**
|
|
187
238
|
* <CCtvVideoOverlayHeader /> 속성
|
|
188
239
|
*/
|
|
@@ -262,6 +313,18 @@ export interface CctvViewerDesktopVideoProps {
|
|
|
262
313
|
* custom overlay 렌더 함수
|
|
263
314
|
*/
|
|
264
315
|
renderOverlay?: CctvVideoRenderOverlay;
|
|
316
|
+
/**
|
|
317
|
+
* viewer 하단 sensor metric 영역
|
|
318
|
+
*/
|
|
319
|
+
metrics?: React.ReactNode;
|
|
320
|
+
/**
|
|
321
|
+
* 이전 카메라 이동 핸들러
|
|
322
|
+
*/
|
|
323
|
+
onPrev?: () => void;
|
|
324
|
+
/**
|
|
325
|
+
* 다음 카메라 이동 핸들러
|
|
326
|
+
*/
|
|
327
|
+
onNext?: () => void;
|
|
265
328
|
}
|
|
266
329
|
|
|
267
330
|
/**
|
|
@@ -271,6 +334,10 @@ export interface CctvViewerDesktopVideoProps {
|
|
|
271
334
|
* @property {CctvCompanyCameraData} [selectedCam] 외부에서 직접 주입하는 선택 카메라 데이터
|
|
272
335
|
* @property {CctvCompanyCameraData[]} [camList] 외부에서 직접 주입하는 카메라 리스트
|
|
273
336
|
* @property {CctvVideoRenderOverlay} [renderOverlay] viewer video용 custom overlay 렌더 함수
|
|
337
|
+
* @property {React.ReactNode} [time] viewer headline 확인 시각
|
|
338
|
+
* @property {React.ReactNode} [metrics] viewer 하단 sensor metric 영역
|
|
339
|
+
* @property {() => void} [onPrev] 이전 카메라 이동 핸들러
|
|
340
|
+
* @property {() => void} [onNext] 다음 카메라 이동 핸들러
|
|
274
341
|
*/
|
|
275
342
|
export interface CctvViewerDesktopContainerProps {
|
|
276
343
|
/**
|
|
@@ -293,4 +360,20 @@ export interface CctvViewerDesktopContainerProps {
|
|
|
293
360
|
* viewer video용 custom overlay 렌더 함수
|
|
294
361
|
*/
|
|
295
362
|
renderOverlay?: CctvVideoRenderOverlay;
|
|
363
|
+
/**
|
|
364
|
+
* viewer headline 확인 시각
|
|
365
|
+
*/
|
|
366
|
+
time?: React.ReactNode;
|
|
367
|
+
/**
|
|
368
|
+
* viewer 하단 sensor metric 영역
|
|
369
|
+
*/
|
|
370
|
+
metrics?: React.ReactNode;
|
|
371
|
+
/**
|
|
372
|
+
* 이전 카메라 이동 핸들러
|
|
373
|
+
*/
|
|
374
|
+
onPrev?: () => void;
|
|
375
|
+
/**
|
|
376
|
+
* 다음 카메라 이동 핸들러
|
|
377
|
+
*/
|
|
378
|
+
onNext?: () => void;
|
|
296
379
|
}
|