@uniai-fe/uds-templates 0.1.19 → 0.1.21
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 +58 -9
- package/package.json +7 -3
- package/src/auth/common/container/header/StageHeader.tsx +2 -2
- package/src/auth/login/jotai/user.ts +13 -0
- package/src/auth/login/types/api.ts +229 -0
- package/src/auth/login/types/form.ts +1 -0
- package/src/auth/login/types/index.ts +4 -0
- package/src/auth/signup/markup/VerificationForm.tsx +3 -2
- package/src/cctv/apis/client.ts +61 -0
- package/src/cctv/apis/index.ts +2 -0
- package/src/cctv/apis/server.ts +188 -0
- package/src/cctv/components/Provider.tsx +47 -0
- package/src/cctv/components/__viewer.tsx +99 -0
- package/src/cctv/components/cam-list/Container.tsx +36 -0
- package/src/cctv/components/cam-list/Item.tsx +71 -0
- package/src/cctv/components/cam-list/index.tsx +7 -0
- package/src/cctv/components/index.tsx +13 -0
- package/src/cctv/components/pagination/Container.tsx +26 -0
- package/src/cctv/components/pagination/Control.tsx +29 -0
- package/src/cctv/components/pagination/Provider.tsx +204 -0
- package/src/cctv/components/pagination/buttons/Base.tsx +56 -0
- package/src/cctv/components/pagination/buttons/Next.tsx +34 -0
- package/src/cctv/components/pagination/buttons/Prev.tsx +34 -0
- package/src/cctv/components/pagination/index.tsx +25 -0
- package/src/cctv/components/pagination/list/Carousel.tsx +26 -0
- package/src/cctv/components/pagination/list/Container.tsx +30 -0
- package/src/cctv/components/pagination/list/Item.tsx +81 -0
- package/src/cctv/components/video/Container.tsx +13 -0
- package/src/cctv/components/video/Video.tsx +34 -0
- package/src/cctv/components/video/index.tsx +9 -0
- package/src/cctv/components/video/overlay/Container.tsx +15 -0
- package/src/cctv/components/video/overlay/Title.tsx +28 -0
- package/src/cctv/components/video/overlay/body/Container.tsx +13 -0
- package/src/cctv/components/video/overlay/body/Error.tsx +16 -0
- package/src/cctv/components/video/overlay/footer/Container.tsx +30 -0
- package/src/cctv/components/video/overlay/footer/OpenButton.tsx +19 -0
- package/src/cctv/components/video/overlay/header/CloseButton.tsx +14 -0
- package/src/cctv/components/video/overlay/header/Container.tsx +50 -0
- package/src/cctv/components/video/overlay/header/LiveState.tsx +21 -0
- package/src/cctv/components/video/overlay/index.tsx +24 -0
- package/src/cctv/components/viewer/Container.tsx +13 -0
- package/src/cctv/components/viewer/desktop/Container.tsx +38 -0
- package/src/cctv/components/viewer/desktop/Pagination.tsx +20 -0
- package/src/cctv/components/viewer/desktop/Placeholder.tsx +18 -0
- package/src/cctv/components/viewer/desktop/Video.tsx +83 -0
- package/src/cctv/components/viewer/index.tsx +12 -0
- package/src/cctv/components/viewer/mobile/Container.tsx +13 -0
- package/src/cctv/data/context.ts +22 -0
- package/src/cctv/data/index.ts +1 -0
- package/src/cctv/hooks/index.tsx +5 -0
- package/src/cctv/hooks/useCompanyData.tsx +39 -0
- package/src/cctv/hooks/useContext.ts +150 -0
- package/src/cctv/hooks/useRtcStream.ts +94 -0
- package/src/cctv/img/chevron-left.svg +3 -0
- package/src/cctv/img/chevron-right.svg +3 -0
- package/src/cctv/img/error.svg +4 -0
- package/src/cctv/img/viewer-close.svg +3 -0
- package/src/cctv/img/viewer-open.svg +6 -0
- package/src/cctv/index.scss +1 -0
- package/src/cctv/index.tsx +9 -0
- package/src/cctv/jotai/context.ts +9 -0
- package/src/cctv/jotai/index.ts +1 -0
- package/src/cctv/styles/cam-list.scss +32 -0
- package/src/cctv/styles/index.scss +5 -0
- package/src/cctv/styles/pagination.scss +77 -0
- package/src/cctv/styles/variables.scss +38 -0
- package/src/cctv/styles/video.scss +142 -0
- package/src/cctv/styles/viewer.scss +7 -0
- package/src/cctv/types/api.ts +166 -0
- package/src/cctv/types/carousel.ts +24 -0
- package/src/cctv/types/context.ts +68 -0
- package/src/cctv/types/index.ts +4 -0
- package/src/cctv/types/list.ts +94 -0
- package/src/cctv/utils/data.ts +40 -0
- package/src/cctv/utils/select.ts +62 -0
- package/src/index.scss +0 -2
- package/src/index.tsx +3 -0
- package/src/modal/styles/base.scss +2 -2
- package/src/page-frame/desktop/index.tsx +4 -1
- package/src/page-frame/index.tsx +8 -2
- package/src/page-frame/mobile/{header/PageFrameMobileHeader.tsx → components/header/Header.tsx} +6 -6
- package/src/page-frame/mobile/components/header/index.ts +9 -0
- package/src/page-frame/mobile/components/index.tsx +14 -0
- package/src/page-frame/{navigation/PageFrameNavigation.tsx → mobile/components/navigation/Navigation.tsx} +3 -3
- package/src/page-frame/mobile/components/navigation/index.tsx +8 -0
- package/src/page-frame/mobile/components/page/Container.tsx +29 -0
- package/src/page-frame/mobile/{PageFrameMobile.tsx → components/page/Frame.tsx} +12 -9
- package/src/page-frame/mobile/components/page/index.tsx +11 -0
- package/src/page-frame/mobile/index.scss +3 -17
- package/src/page-frame/mobile/index.tsx +5 -2
- package/src/page-frame/{container/index.scss → mobile/styles/mobile.scss} +25 -7
- package/src/page-frame/mobile/types/index.ts +1 -0
- package/src/page-frame/mobile/types/page.ts +16 -0
- package/src/types/api.ts +43 -0
- package/src/types/index.ts +1 -0
- package/src/auth/login/types.ts +0 -2
- package/src/page-frame/container/PageFrameContainer.tsx +0 -24
- package/src/page-frame/container/index.tsx +0 -4
- package/src/page-frame/container/types.ts +0 -11
- package/src/page-frame/mobile/header/index.ts +0 -4
- package/src/page-frame/mobile/types.ts +0 -6
- package/src/page-frame/navigation/index.tsx +0 -4
- /package/src/page-frame/mobile/{header/page-frame-mobile-header.scss → styles/header.scss} +0 -0
- /package/src/page-frame/{navigation/index.scss → mobile/styles/navigation.scss} +0 -0
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
4
|
+
import { MobileFrameContainer } from "./Container";
|
|
5
|
+
import { MobileFrameNavigation } from "../navigation";
|
|
6
|
+
import type { MobileFrameProps } from "../../types";
|
|
7
7
|
import React, { useCallback } from "react";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* 모바일 전용 Page Frame 래퍼; 공통 컨테이너 위에 모바일 클래스/스타일을 덧입힌다.
|
|
11
11
|
* @component
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {MobileFrameProps} props
|
|
13
13
|
*/
|
|
14
|
-
export function
|
|
14
|
+
export function MobileFrame({
|
|
15
15
|
className,
|
|
16
16
|
header,
|
|
17
17
|
headerClassName,
|
|
@@ -19,17 +19,18 @@ export function PageFrameMobile({
|
|
|
19
19
|
footer,
|
|
20
20
|
footerClassName,
|
|
21
21
|
navigationProps,
|
|
22
|
+
children,
|
|
22
23
|
...rest
|
|
23
|
-
}:
|
|
24
|
+
}: MobileFrameProps) {
|
|
24
25
|
const Footer = useCallback(
|
|
25
26
|
(): React.ReactNode =>
|
|
26
27
|
footer ??
|
|
27
|
-
(navigationProps ? <
|
|
28
|
+
(navigationProps ? <MobileFrameNavigation {...navigationProps} /> : null),
|
|
28
29
|
[footer, navigationProps],
|
|
29
30
|
);
|
|
30
31
|
|
|
31
32
|
return (
|
|
32
|
-
<
|
|
33
|
+
<MobileFrameContainer
|
|
33
34
|
{...rest}
|
|
34
35
|
className={clsx("page-frame-mobile", className)}
|
|
35
36
|
header={header}
|
|
@@ -37,6 +38,8 @@ export function PageFrameMobile({
|
|
|
37
38
|
bodyClassName={clsx("page-frame-mobile-body", bodyClassName)}
|
|
38
39
|
footer={<Footer />}
|
|
39
40
|
footerClassName={clsx("page-frame-mobile-footer", footerClassName)}
|
|
40
|
-
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</MobileFrameContainer>
|
|
41
44
|
);
|
|
42
45
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MobileFrameContainer } from "./Container";
|
|
2
|
+
import { MobileFrame } from "./Frame";
|
|
3
|
+
|
|
4
|
+
const Page = {
|
|
5
|
+
Frame: MobileFrame,
|
|
6
|
+
Container: MobileFrameContainer,
|
|
7
|
+
Shell: MobileFrameContainer,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default Page;
|
|
11
|
+
export { MobileFrameContainer, MobileFrame };
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
min-height: var(--uds-page-frame-height, var(--frame-device-height, 812px));
|
|
5
|
-
max-height: 100dvh;
|
|
6
|
-
background-color: var(--color-common-100, #ffffff);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.page-frame-mobile-header,
|
|
10
|
-
.page-frame-mobile-body,
|
|
11
|
-
.page-frame-mobile-footer {
|
|
12
|
-
width: 100%;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.page-frame-mobile-body {
|
|
16
|
-
background-color: inherit;
|
|
17
|
-
}
|
|
1
|
+
@use "./styles/mobile.scss";
|
|
2
|
+
@use "./styles/header.scss";
|
|
3
|
+
@use "./styles/navigation.scss";
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import "./index.scss";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { MobileFrame } from "./components/page/Frame";
|
|
4
|
+
|
|
5
|
+
export type { MobileFrameProps } from "./types";
|
|
6
|
+
export * from "./components";
|
|
7
|
+
export { MobileFrame };
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
); // PC에선 지정 폭으로 중앙 정렬하고, 모바일에선 100%를 유지
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.page-frame-
|
|
19
|
+
.page-frame-mobile-shell {
|
|
20
20
|
display: grid;
|
|
21
21
|
grid-template-rows: auto 1fr auto;
|
|
22
22
|
width: min(100%, var(--uds-page-frame-max-width));
|
|
@@ -28,21 +28,39 @@
|
|
|
28
28
|
color: inherit;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.page-frame-header,
|
|
32
|
-
.page-frame-body,
|
|
33
|
-
.page-frame-footer {
|
|
31
|
+
.page-frame-mobile-shell-header,
|
|
32
|
+
.page-frame-mobile-shell-body,
|
|
33
|
+
.page-frame-mobile-shell-footer {
|
|
34
34
|
width: 100%;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.page-frame-header {
|
|
37
|
+
.page-frame-mobile-shell-header {
|
|
38
38
|
padding-top: var(--uds-page-frame-header-padding-top);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.page-frame-body {
|
|
41
|
+
.page-frame-mobile-shell-body {
|
|
42
42
|
min-height: 0;
|
|
43
43
|
overflow-y: auto;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.page-frame-footer {
|
|
46
|
+
.page-frame-mobile-shell-footer {
|
|
47
47
|
padding-bottom: var(--uds-page-frame-footer-safe-area);
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
.page-frame-mobile {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
min-height: var(--uds-page-frame-height, var(--frame-device-height, 812px));
|
|
54
|
+
max-height: 100dvh;
|
|
55
|
+
background-color: var(--color-common-100, #ffffff);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.page-frame-mobile-header,
|
|
59
|
+
.page-frame-mobile-body,
|
|
60
|
+
.page-frame-mobile-footer {
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.page-frame-mobile-body {
|
|
65
|
+
background-color: inherit;
|
|
66
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./page";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { MobileFrameNavigationProps } from "../components/navigation";
|
|
3
|
+
|
|
4
|
+
export type MobileFrameContainerProps = {
|
|
5
|
+
className?: string;
|
|
6
|
+
header?: ReactNode;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
bodyClassName?: string;
|
|
9
|
+
footer?: ReactNode;
|
|
10
|
+
footerClassName?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export interface MobileFrameProps extends MobileFrameContainerProps {
|
|
15
|
+
navigationProps?: MobileFrameNavigationProps;
|
|
16
|
+
}
|
package/src/types/api.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API 응답; 에러 정보
|
|
3
|
+
* @property {string} field_name - 에러 필드 이름
|
|
4
|
+
* @property {string} message - 에러 메세지
|
|
5
|
+
*/
|
|
6
|
+
export interface API_Res_Error {
|
|
7
|
+
/**
|
|
8
|
+
* 에러 필드 이름
|
|
9
|
+
*/
|
|
10
|
+
field_name: string;
|
|
11
|
+
/**
|
|
12
|
+
* 에러 메세지
|
|
13
|
+
*/
|
|
14
|
+
message: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* API 응답; 기본 구조
|
|
19
|
+
* - GET, POST, PUT, DELETE 등 모든 API 응답에 공통적으로 사용
|
|
20
|
+
* @property {string} status - 통신 상태
|
|
21
|
+
* - "success": 정상 응답
|
|
22
|
+
* - "fail": 비정상 응답
|
|
23
|
+
* - "timeout": 타임아웃 응답
|
|
24
|
+
* @property {ResultDataType} data - 요청 응답 데이터
|
|
25
|
+
* @property {API_Res_Error[]} errors - 에러 정보
|
|
26
|
+
*/
|
|
27
|
+
export interface API_Res_Base<ResultDataType> {
|
|
28
|
+
/**
|
|
29
|
+
* 통신 상태
|
|
30
|
+
* - "success": 정상 응답
|
|
31
|
+
* - "fail": 비정상 응답
|
|
32
|
+
* - "timeout": 타임아웃 응답
|
|
33
|
+
*/
|
|
34
|
+
status: string;
|
|
35
|
+
/**
|
|
36
|
+
* 요청 응답 데이터
|
|
37
|
+
*/
|
|
38
|
+
data: ResultDataType;
|
|
39
|
+
/**
|
|
40
|
+
* 에러 정보
|
|
41
|
+
*/
|
|
42
|
+
errors: API_Res_Error[];
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type * from "./api";
|
package/src/auth/login/types.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import type { PageFrameContainerProps } from "./types";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* 페이지 공통 컨테이너; header/body/footer 영역을 순서대로 배치한다.
|
|
6
|
-
* @component
|
|
7
|
-
*/
|
|
8
|
-
export function PageFrameContainer({
|
|
9
|
-
className,
|
|
10
|
-
header,
|
|
11
|
-
headerClassName,
|
|
12
|
-
bodyClassName,
|
|
13
|
-
footer,
|
|
14
|
-
footerClassName,
|
|
15
|
-
children,
|
|
16
|
-
}: PageFrameContainerProps) {
|
|
17
|
-
return (
|
|
18
|
-
<div className={clsx("page-frame-container", className)}>
|
|
19
|
-
<div className={clsx("page-frame-header", headerClassName)}>{header}</div>
|
|
20
|
-
<div className={clsx("page-frame-body", bodyClassName)}>{children}</div>
|
|
21
|
-
<div className={clsx("page-frame-footer", footerClassName)}>{footer}</div>
|
|
22
|
-
</div>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
export type PageFrameContainerProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
header?: ReactNode;
|
|
6
|
-
headerClassName?: string;
|
|
7
|
-
bodyClassName?: string;
|
|
8
|
-
footer?: ReactNode;
|
|
9
|
-
footerClassName?: string;
|
|
10
|
-
children: ReactNode;
|
|
11
|
-
};
|
|
File without changes
|
|
File without changes
|