@edu-tosel/design 1.0.263 → 1.0.266
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/board/design/Board.design.js +7 -1
- package/board/template/CanvasBoard.js +2 -2
- package/globals.css +7 -0
- package/interface/Board.d.ts +1 -0
- package/interface/Shelf.d.ts +1 -0
- package/interface/domain/Tag.d.ts +1 -1
- package/interface/domain/Tag.js +2 -1
- package/interface/widget/Carousel.d.ts +1 -1
- package/layout/design/Shelf.design.js +1 -1
- package/layout/template/Gallery.js +11 -7
- package/layout/template/GalleryContext.d.ts +4 -0
- package/layout/template/GalleryContext.js +8 -0
- package/layout/template/MonthlyProgressReport/Layout.js +2 -2
- package/layout/template/Regexam/OfflineExam.js +1 -1
- package/layout/template/Regexam/Types.js +3 -3
- package/layout/template/Ticket/Extension.js +2 -2
- package/layout/template/dashboard/Navigation.js +0 -6
- package/layout/template/home/layout/Navigation.js +32 -11
- package/package.json +1 -1
- package/util/createSearch.d.ts +8 -0
- package/util/createSearch.js +51 -0
- package/util/formatKoreanPhoneNumber.d.ts +1 -0
- package/util/formatKoreanPhoneNumber.js +23 -0
- package/util/handlePrint.d.ts +1 -1
- package/util/handlePrint.js +1 -1
- package/util/index.d.ts +2 -0
- package/util/index.js +2 -0
- package/version.txt +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn, isDebug } from "../../util";
|
|
3
3
|
import { Action, Label } from "../..";
|
|
4
|
+
import { useGalleryContext } from "../../layout/template/GalleryContext";
|
|
4
5
|
const widthSize = {
|
|
5
6
|
xs: "w-20",
|
|
6
7
|
sm: "w-24",
|
|
@@ -22,6 +23,7 @@ const heightSize = {
|
|
|
22
23
|
auto: "h-auto",
|
|
23
24
|
};
|
|
24
25
|
export function Board({ children, action, option, debug, buttons, }) {
|
|
26
|
+
const isUnderGallery = useGalleryContext();
|
|
25
27
|
const { shows } = action ?? {};
|
|
26
28
|
const { width, height, isRounded, className, noMobile, background, boundary, } = option ?? {};
|
|
27
29
|
const container = {
|
|
@@ -29,7 +31,11 @@ export function Board({ children, action, option, debug, buttons, }) {
|
|
|
29
31
|
width: widthSize[width ?? "full"],
|
|
30
32
|
noMobile: noMobile && "hidden xl:block",
|
|
31
33
|
debug: debug && isDebug(`border-2 border-${debug}`),
|
|
32
|
-
height:
|
|
34
|
+
height: isUnderGallery
|
|
35
|
+
? "h-full xl:h-[calc(100%-30px)]"
|
|
36
|
+
: buttons
|
|
37
|
+
? "h-full xl:h-[calc(100%-100px)]"
|
|
38
|
+
: "h-full xl:h-[calc(100%-30px)]",
|
|
33
39
|
};
|
|
34
40
|
const body = {
|
|
35
41
|
positions: "relative",
|
|
@@ -9,9 +9,9 @@ export default function CanvasBoard({ header, children, action, buttons, option,
|
|
|
9
9
|
};
|
|
10
10
|
const body = {
|
|
11
11
|
displays: "flex flex-col lg:flex-row lg:flex-wrap gap-7.5",
|
|
12
|
-
sizes: "h-[calc(100%-60px)]",
|
|
12
|
+
sizes: header ? "h-[calc(100%-60px)]" : "h-full",
|
|
13
13
|
paddings: `${header ? "pb-5" : "pb-36 xl:pb-6"} px-2 xs:px-4 xl:px-7.5 pt-2 xs:pt-4 xl:pt-7.5`,
|
|
14
|
-
scrollStyles: "overflow-
|
|
14
|
+
scrollStyles: "overflow-scroll scrollbar-hidden ",
|
|
15
15
|
classNames: option?.className,
|
|
16
16
|
};
|
|
17
17
|
return (_jsxs(Board, { action: action, buttons: buttons, option: { ...option, className: "", isRounded: true }, children: [header && _jsx(BoardHeader, { ...header }), _jsx(Action.Replace, { actions: action?.replaces, children: _jsx("div", { className: cn(body), children: children }) })] }));
|
package/globals.css
CHANGED
|
@@ -267,3 +267,10 @@ input[type="date"]::-webkit-calendar-picker-indicator {
|
|
|
267
267
|
-webkit-background-clip: text;
|
|
268
268
|
-webkit-text-fill-color: transparent;
|
|
269
269
|
}
|
|
270
|
+
|
|
271
|
+
/* related to font rendering in safari engine */
|
|
272
|
+
* {
|
|
273
|
+
font-synthesis: none !important;
|
|
274
|
+
-webkit-font-smoothing: antialiased;
|
|
275
|
+
-moz-osx-font-smoothing: grayscale;
|
|
276
|
+
}
|
package/interface/Board.d.ts
CHANGED
package/interface/Shelf.d.ts
CHANGED
package/interface/domain/Tag.js
CHANGED
|
@@ -6,7 +6,7 @@ export default function Shelf({ children, className, option, titles, debug, }) {
|
|
|
6
6
|
const { titleSize, subtitleSize, isSize, width, height } = option ?? {};
|
|
7
7
|
const container = {
|
|
8
8
|
displays: "flex flex-col gap-6",
|
|
9
|
-
optionHeight: width ?? "w-
|
|
9
|
+
optionHeight: width ?? "w-auto",
|
|
10
10
|
optionWidth: height ?? "h-fit",
|
|
11
11
|
sizes: isSize && "w-full h-fit",
|
|
12
12
|
debug: debug && isDebug(`border-2 ${debug}`),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { GalleryProvider } from "./GalleryContext";
|
|
2
3
|
import Action from "./Action";
|
|
3
4
|
import Tab from "./Tab";
|
|
4
5
|
import { cn } from "../../util";
|
|
@@ -8,12 +9,15 @@ export default function Gallery({ action, children, option, }) {
|
|
|
8
9
|
const container = {
|
|
9
10
|
displays: "relative flex flex-col-reverse xl:flex-col",
|
|
10
11
|
position: "top-0 justify-end xl:justify-start",
|
|
11
|
-
sizes: "
|
|
12
|
+
sizes: "w-full",
|
|
13
|
+
heightOption: action?.tabs
|
|
14
|
+
? "h-[calc(100%-56px)] xl:h-[calc(100%-76px)]"
|
|
15
|
+
: "h-[calc(100%-76px)]",
|
|
12
16
|
};
|
|
13
|
-
return (_jsxs("div", { className: cn(container), children: [_jsx(Action.Replace, { actions: action?.replaces, children: _jsx(Action.Show, { actions: action?.shows, children: children }) }), action?.tabs && (_jsx(Tab, { tabs: action?.tabs, option: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
return (_jsx(GalleryProvider, { children: _jsxs("div", { className: cn(container), children: [_jsx(Action.Replace, { actions: action?.replaces, children: _jsx(Action.Show, { actions: action?.shows, children: children }) }), action?.tabs && (_jsx(Tab, { tabs: action?.tabs, option: {
|
|
18
|
+
className: cn(tabBox),
|
|
19
|
+
text,
|
|
20
|
+
background,
|
|
21
|
+
boundary,
|
|
22
|
+
} }))] }) }));
|
|
19
23
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
3
|
+
const GalleryContext = createContext(null);
|
|
4
|
+
export const useGalleryContext = () => {
|
|
5
|
+
const context = useContext(GalleryContext);
|
|
6
|
+
return context ?? false; // 기본값으로 false 반환
|
|
7
|
+
};
|
|
8
|
+
export const GalleryProvider = ({ children, }) => (_jsx(GalleryContext.Provider, { value: true, children: children }));
|
|
@@ -20,7 +20,7 @@ export default function Layout({ props }) {
|
|
|
20
20
|
};
|
|
21
21
|
const ref = useRef(null);
|
|
22
22
|
const handlePrint = useReactToPrint({
|
|
23
|
-
|
|
23
|
+
contentRef: ref,
|
|
24
24
|
});
|
|
25
25
|
return (_jsx("div", { className: cn(container), children: _jsxs(Action.Show, { actions: [
|
|
26
26
|
[
|
|
@@ -48,5 +48,5 @@ export default function Layout({ props }) {
|
|
|
48
48
|
height: "xs",
|
|
49
49
|
background: "bg-blue-navy",
|
|
50
50
|
text: "text-white",
|
|
51
|
-
}, onClick: handlePrint })] }), _jsx(MonthlyProgressReport.Report, { ref: ref, props: props })] }) }));
|
|
51
|
+
}, onClick: () => handlePrint() })] }), _jsx(MonthlyProgressReport.Report, { ref: ref, props: props })] }) }));
|
|
52
52
|
}
|
|
@@ -200,5 +200,5 @@ export function AnnualTableComponent() {
|
|
|
200
200
|
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden rounded-lg", children: _jsxs("div", { className: "min-w-[480px] w-full", children: [_jsxs("div", { className: "flex bg-gradient-to-r from-green-dark to-crimson-burgundy text-white font-semibold text-sm", children: [_jsx("div", { className: "sticky left-0 bg-green-dark p-2 flex-[1] shadow-main", children: "\uD68C\uCC28" }), _jsx("div", { className: "p-2 flex-[2]", children: "\uC2DC\uD5D8\uC77C\uC790" }), _jsx("div", { className: "p-2 flex-[3]", children: "\uC811\uC218\uAE30\uAC04" }), _jsx("div", { className: "p-2 flex-[2]", children: "\uC131\uC801\uBC1C\uD45C" })] }), data.map((item) => (_jsxs("div", { className: "flex bg-white/60 font-medium text-sm text-gray-medium ", children: [_jsxs("div", { className: "sticky left-0 bg-white/90 p-2 flex-[1] text-gray-dark border-green-dark border-r-1", children: [item.examNumber, "\uD68C"] }), _jsx("div", { className: "p-2 flex-[2] text-green-dark font-bold", children: item.dDay }), _jsxs("div", { className: "p-2 flex-[3] flex-col", children: [item.regStartDay, " ~ ", item.regEndDay] }), _jsx("div", { className: "p-2 flex-[2]", children: item.resultDay })] }, item.examNumber)))] }) }));
|
|
201
201
|
}
|
|
202
202
|
export function TimeTableComponent() {
|
|
203
|
-
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden", children: _jsxs("div", { className: "min-w-[600px] w-full", children: [_jsxs("div", { className: "flex text-green-dark font-bold text-xs", children: [_jsx("div", { className: "sticky left-0 rounded-md p-2 flex-[2] text-xs" }), _jsx("div", { className: "p-2 flex-[1]" }), _jsx("div", { className: "p-2 flex-[4]", children: "13:10" }), _jsx("div", { className: "p-2 flex-[1]", children: "13:35" }), _jsx("div", { className: "p-2 flex-[2]", children: "13:40" }), _jsx("div", { className: "p-2 flex-[1]", children: "14:20" })] }), _jsxs("div", { className: "flex bg-white/50 text-gray-dark font-semibold text-xs rounded-md", children: [_jsxs("div", { className: "sticky left-0 bg-white/90 rounded-md p-2 flex-[2]", children: ["Pre-Starter ", _jsx("br", {}), " Starter"] }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uC785\uC2E4" }), _jsx("div", { className: "p-2 flex-[4] border-green-dark border-r-1 border-dashed", children: "\uC2DC\uD5D8\uC9C0 \uBC30\uBD80" }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uB300\uAE30" }), _jsx("div", { className: "p-2 flex-[2] border-green-dark border-r-1 border-dashed bg-green-light text-green-dark", children: "\uC2DC\uD5D8\uC9C4\uD589 / 40\uBD84" }), _jsx("div", { className: "p-2 flex-[1]" })] }), _jsxs("div", { className: "flex text-green-dark font-bold text-xs mt-4", children: [_jsx("div", { className: "sticky left-0 rounded-md p-2 flex-[2] text-lg" }), _jsx("div", { className: "p-2 flex-[1]" }), _jsx("div", { className: "p-2 flex-[2]", children: "13:10" }), _jsx("div", { className: "p-2 flex-[1]", children: "13:25" }), _jsx("div", { className: "p-2 flex-[4]", children: "13:30" }), _jsx("div", { className: "p-2 flex-[1]", children: "14:20" })] }), _jsxs("div", { className: "flex bg-white/50 text-gray-dark font-semibold text-xs rounded-md", children: [_jsxs("div", { className: "sticky left-0 bg-white/90 rounded-md p-2 flex-[2]", children: ["
|
|
203
|
+
return (_jsx("div", { className: "overflow-auto w-full scrollbar-hidden", children: _jsxs("div", { className: "min-w-[600px] w-full", children: [_jsxs("div", { className: "flex text-green-dark font-bold text-xs", children: [_jsx("div", { className: "sticky left-0 rounded-md p-2 flex-[2] text-xs" }), _jsx("div", { className: "p-2 flex-[1]" }), _jsx("div", { className: "p-2 flex-[4]", children: "13:10" }), _jsx("div", { className: "p-2 flex-[1]", children: "13:35" }), _jsx("div", { className: "p-2 flex-[2]", children: "13:40" }), _jsx("div", { className: "p-2 flex-[1]", children: "14:20" })] }), _jsxs("div", { className: "flex bg-white/50 text-gray-dark font-semibold text-xs rounded-md", children: [_jsxs("div", { className: "sticky left-0 bg-white/90 rounded-md p-2 flex-[2]", children: ["Pre-Starter ", _jsx("br", {}), " Starter"] }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uC785\uC2E4" }), _jsx("div", { className: "p-2 flex-[4] border-green-dark border-r-1 border-dashed", children: "\uC2DC\uD5D8\uC9C0 \uBC30\uBD80" }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uB300\uAE30" }), _jsx("div", { className: "p-2 flex-[2] border-green-dark border-r-1 border-dashed bg-green-light text-green-dark", children: "\uC2DC\uD5D8\uC9C4\uD589 / 40\uBD84" }), _jsx("div", { className: "p-2 flex-[1]" })] }), _jsxs("div", { className: "flex text-green-dark font-bold text-xs mt-4", children: [_jsx("div", { className: "sticky left-0 rounded-md p-2 flex-[2] text-lg" }), _jsx("div", { className: "p-2 flex-[1]" }), _jsx("div", { className: "p-2 flex-[2]", children: "13:10" }), _jsx("div", { className: "p-2 flex-[1]", children: "13:25" }), _jsx("div", { className: "p-2 flex-[4]", children: "13:30" }), _jsx("div", { className: "p-2 flex-[1]", children: "14:20" })] }), _jsxs("div", { className: "flex bg-white/50 text-gray-dark font-semibold text-xs rounded-md", children: [_jsxs("div", { className: "sticky left-0 bg-white/90 rounded-md p-2 flex-[2]", children: ["Basic ", _jsx("br", {}), " Junior"] }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uC785\uC2E4" }), _jsx("div", { className: "p-2 flex-[2] border-green-dark border-r-1 border-dashed", children: "\uC2DC\uD5D8\uC9C0 \uBC30\uBD80" }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uB300\uAE30" }), _jsx("div", { className: "p-2 flex-[4] border-green-dark border-r-1 border-dashed bg-green-light text-green-dark", children: "\uC2DC\uD5D8\uC9C4\uD589 / 50\uBD84" }), _jsx("div", { className: "p-2 flex-[1] bg" })] }), _jsxs("div", { className: "flex text-green-dark font-bold text-xs mt-4", children: [_jsx("div", { className: "sticky left-0 rounded-md p-2 flex-[2] text-lg" }), _jsx("div", { className: "p-2 flex-[1]" }), _jsx("div", { className: "p-2 flex-[2]", children: "13:10" }), _jsx("div", { className: "p-2 flex-[1]", children: "13:25" }), _jsx("div", { className: "p-2 flex-[4]", children: "13:30" }), _jsx("div", { className: "p-2 flex-[1] text-right", children: "14:30" })] }), _jsxs("div", { className: "flex bg-white/50 text-gray-dark font-semibold text-xs rounded-md", children: [_jsx("div", { className: "sticky left-0 bg-white/90 rounded-md p-2 flex-[2]", children: "High-Junior" }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uC785\uC2E4" }), _jsx("div", { className: "p-2 flex-[2] border-green-dark border-r-1 border-dashed", children: "\uC2DC\uD5D8\uC9C0 \uBC30\uBD80" }), _jsx("div", { className: "p-2 flex-[1] border-green-dark border-r-1 border-dashed", children: "\uB300\uAE30" }), _jsx("div", { className: "p-2 flex-[4] bg-green-light text-green-dark", children: "\uC2DC\uD5D8\uC9C4\uD589 / 60\uBD84" }), _jsx("div", { className: "p-2 flex-[1] bg-green-light border-green-dark border-r-1 border-dashed" })] })] }) }));
|
|
204
204
|
}
|
|
@@ -130,15 +130,15 @@ const examStyles = {
|
|
|
130
130
|
nrgGrpOrganization: {
|
|
131
131
|
id: "5",
|
|
132
132
|
type: "단체접수",
|
|
133
|
-
name: "
|
|
133
|
+
name: "특별기관시험",
|
|
134
134
|
place: "기관에서 비정기적으로 실시하는 시험",
|
|
135
135
|
isHallofFame: false,
|
|
136
136
|
report: "기본제공",
|
|
137
|
-
certificate: "
|
|
137
|
+
certificate: "기본제공",
|
|
138
138
|
link: urlAsset.homepage("/events/28"),
|
|
139
139
|
majorColor: "text-green-dark bg-green-dark",
|
|
140
140
|
imgSrc: urlAsset.resource("/images/img-buidling-academy.png"),
|
|
141
|
-
buttonText: "
|
|
141
|
+
buttonText: "특별기관시험 신청하기",
|
|
142
142
|
mainPrice: "33,000원",
|
|
143
143
|
subPrice: "39,000원",
|
|
144
144
|
cocoonPrice: "29,000원",
|
|
@@ -17,9 +17,9 @@ export default function TicketExtension({ props, option }) {
|
|
|
17
17
|
};
|
|
18
18
|
const ref = useRef(null);
|
|
19
19
|
const handlePrint = useReactToPrint({
|
|
20
|
-
|
|
20
|
+
contentRef: ref,
|
|
21
21
|
});
|
|
22
|
-
return (_jsxs("div", { className: cn(body), children: [_jsx(Ticket, { ref: ref, props: props }), _jsxs("div", { className: "relative w-48 flex flex-row md:flex-col md:h-[700px] gap-4 h-full justify-start mt-5 items-center", children: [!noPrint && (_jsx("div", { className: "md:flex hidden", children: _jsx(Label.Button, { title: "\uC218\uD5D8\uD45C \uCD9C\uB825\uD558\uAE30", onClick: handlePrint, option: {
|
|
22
|
+
return (_jsxs("div", { className: cn(body), children: [_jsx(Ticket, { ref: ref, props: props }), _jsxs("div", { className: "relative w-48 flex flex-row md:flex-col md:h-[700px] gap-4 h-full justify-start mt-5 items-center", children: [!noPrint && (_jsx("div", { className: "md:flex hidden", children: _jsx(Label.Button, { title: "\uC218\uD5D8\uD45C \uCD9C\uB825\uD558\uAE30", onClick: () => handlePrint(), option: {
|
|
23
23
|
width: "md",
|
|
24
24
|
height: "sm",
|
|
25
25
|
background: "bg-white shadow-main",
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
import { useActionStore } from "../../../store";
|
|
4
2
|
import { cn } from "../../../util";
|
|
5
3
|
import Action from "../Action";
|
|
6
4
|
import { useResponsive } from "../../../hook";
|
|
7
5
|
function Container({ children }) {
|
|
8
|
-
const { events } = useActionStore();
|
|
9
6
|
const isMmd = useResponsive("mmd");
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
console.log(events);
|
|
12
|
-
}, [events]);
|
|
13
7
|
return (_jsx(Action.Show, { actions: [[isMmd || "dashboardMenu", _jsx(Contents, { children: children })]], children: null }));
|
|
14
8
|
}
|
|
15
9
|
function Contents({ children, showAction, }) {
|
|
@@ -14,15 +14,31 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
14
14
|
displays: "flex flex-row md:flex-col justify-center gap-x-8 sm:gap-x-12 gap-y-5 items-center",
|
|
15
15
|
sizes: !isOpen ? "h-16 md:h-80 md:rounded-r-xl" : "h-16 md:h-screen",
|
|
16
16
|
widths: !isHidden
|
|
17
|
-
? "w-screen md:w-[56px] duration-
|
|
17
|
+
? "w-screen md:w-[56px] duration-300"
|
|
18
18
|
: "w-0 duration-100",
|
|
19
19
|
backgrounds: "bg-gradient-to-r md:bg-gradient-to-b from-green-dark to-crimson-burgundy",
|
|
20
20
|
};
|
|
21
21
|
const overlayCoverTransition = useTransition(isHidden, {
|
|
22
22
|
from: { width: "0%" },
|
|
23
23
|
enter: { width: "100%" },
|
|
24
|
-
config: { duration:
|
|
24
|
+
config: { duration: 100 },
|
|
25
25
|
});
|
|
26
|
+
// Scroll Lock 처리
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const preventScroll = (e) => e.preventDefault();
|
|
29
|
+
if (isOpen) {
|
|
30
|
+
document.body.style.overflow = "hidden";
|
|
31
|
+
document.addEventListener("touchmove", preventScroll, { passive: false });
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
document.body.style.overflow = "";
|
|
35
|
+
document.removeEventListener("touchmove", preventScroll);
|
|
36
|
+
}
|
|
37
|
+
return () => {
|
|
38
|
+
document.body.style.overflow = "";
|
|
39
|
+
document.removeEventListener("touchmove", preventScroll);
|
|
40
|
+
};
|
|
41
|
+
}, [isOpen]);
|
|
26
42
|
useEffect(() => {
|
|
27
43
|
if (isHidden) {
|
|
28
44
|
const timer = setTimeout(() => {
|
|
@@ -42,16 +58,20 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
42
58
|
return setIsOpen(true);
|
|
43
59
|
};
|
|
44
60
|
const itemContainer = {
|
|
45
|
-
positions: "fixed
|
|
46
|
-
sizes: "h-screen w-
|
|
61
|
+
positions: "fixed inset-0 z-40",
|
|
62
|
+
sizes: "h-screen w-full",
|
|
47
63
|
boundaries: "md:pl-[56px]",
|
|
48
|
-
styles: "bg-black/20
|
|
49
|
-
shadows: "shadow-main
|
|
64
|
+
styles: "bg-black/20 backdrop-blur-sm",
|
|
65
|
+
shadows: "shadow-main",
|
|
66
|
+
animation: isOpen
|
|
67
|
+
? "opacity-100 pointer-events-auto"
|
|
68
|
+
: "opacity-0 pointer-events-none",
|
|
50
69
|
};
|
|
51
70
|
const itemBody = {
|
|
52
71
|
positions: "absolute bottom-16 md:static md:bottom-auto md:flex md:flex-col",
|
|
53
72
|
sizes: "w-full md:w-[400px] h-fit md:h-screen min-h-50",
|
|
54
73
|
styles: "bg-white",
|
|
74
|
+
animation: "duration-300",
|
|
55
75
|
};
|
|
56
76
|
const iconWrapper = {
|
|
57
77
|
displays: "flex justify-center items-center",
|
|
@@ -60,10 +80,11 @@ export default function Navigation({ browser, calendar, notice, event, }) {
|
|
|
60
80
|
};
|
|
61
81
|
const isMobile = useResponsive("md");
|
|
62
82
|
const overlayPopTransition = useTransition(!isHidden && isOpen, {
|
|
63
|
-
from: { width: "
|
|
64
|
-
enter: { width: "100%" },
|
|
65
|
-
leave: { width: "
|
|
66
|
-
config: { duration:
|
|
83
|
+
from: { width: "100%", opacity: 0, pointerEvent: "none" },
|
|
84
|
+
enter: { width: "100%", opacity: 1, pointerEvent: "auto" },
|
|
85
|
+
leave: { width: "100%", opacity: 0, pointerEvent: "none" },
|
|
86
|
+
config: { duration: 100 },
|
|
87
|
+
delay: 100,
|
|
67
88
|
});
|
|
68
89
|
const scrollTitleWrapper = {
|
|
69
90
|
displays: "w-full h-fit",
|
|
@@ -83,7 +104,7 @@ const navigationTypeString = {
|
|
|
83
104
|
function NavigationItem({ type, calendar, notice, event, }) {
|
|
84
105
|
//scroll action
|
|
85
106
|
const container = {
|
|
86
|
-
displays: "relative h-
|
|
107
|
+
displays: "relative h-fit overflow-hidden duration-300",
|
|
87
108
|
};
|
|
88
109
|
const scrollWrapper = {
|
|
89
110
|
displays: "flex flex-row md:flex-col",
|
package/package.json
CHANGED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { getChoseong } from "es-hangul";
|
|
2
|
+
const record = {
|
|
3
|
+
"/": ["새로운 소식", "공지사항", "서비스"],
|
|
4
|
+
"/about": ["리더십", "위원장", "총재", "언론", "학회"],
|
|
5
|
+
"/exams": [
|
|
6
|
+
"시험 종류",
|
|
7
|
+
"Cocoon",
|
|
8
|
+
"Pre-Starter",
|
|
9
|
+
"Starter",
|
|
10
|
+
"Basic",
|
|
11
|
+
"Junior",
|
|
12
|
+
"High Junior",
|
|
13
|
+
"고사장 정기시험",
|
|
14
|
+
"가정시험",
|
|
15
|
+
"토셀 랩 특별시험",
|
|
16
|
+
],
|
|
17
|
+
"/books": ["교재", "교재몰"],
|
|
18
|
+
"https://labentry.tosel.co.kr/": ["토셀 랩", "토셀 랩 심사신청"],
|
|
19
|
+
"/dashboard/academy/students": [
|
|
20
|
+
"학생",
|
|
21
|
+
"학생 관리",
|
|
22
|
+
"학생 추가",
|
|
23
|
+
"원생 관리",
|
|
24
|
+
"원생 삭제",
|
|
25
|
+
"원생 아이디",
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
export default function createSearch({ record, }) {
|
|
29
|
+
const recordEntries = Object.entries(record);
|
|
30
|
+
const isHangul = (str) => /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(str);
|
|
31
|
+
const entries = recordEntries
|
|
32
|
+
.map(([key, values]) => values.map((value) => [key, value]))
|
|
33
|
+
.flat();
|
|
34
|
+
const choseongEntries = entries.map(([key, value]) => [
|
|
35
|
+
key,
|
|
36
|
+
isHangul(value) ? getChoseong(value).replace(/ /g, "") : value,
|
|
37
|
+
]);
|
|
38
|
+
const search = (query) => {
|
|
39
|
+
const entireMatch = entries.filter(([_, value]) => value.includes(query));
|
|
40
|
+
const queryChoseong = getChoseong(query);
|
|
41
|
+
const choseongIndexes = choseongEntries
|
|
42
|
+
.map((value, index) => ({ index, value }))
|
|
43
|
+
.filter(({ value: [_, value] }) => value.includes(queryChoseong))
|
|
44
|
+
.map(({ index }) => index);
|
|
45
|
+
const choseongMatch = choseongIndexes.map((index) => entries[index]);
|
|
46
|
+
return { entireMatch, choseongMatch };
|
|
47
|
+
};
|
|
48
|
+
return { search };
|
|
49
|
+
}
|
|
50
|
+
const { search } = createSearch({ record });
|
|
51
|
+
console.log(search("관리"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function formatKoreanPhoneNumber(phoneNumber: string): string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default function formatKoreanPhoneNumber(phoneNumber) {
|
|
2
|
+
const cleanedNumber = phoneNumber.replace(/[^\d]/g, "");
|
|
3
|
+
if (/^02\d{7,8}$/.test(cleanedNumber)) {
|
|
4
|
+
return cleanedNumber.length === 9
|
|
5
|
+
? `${cleanedNumber.slice(0, 2)}-${cleanedNumber.slice(2, 5)}-${cleanedNumber.slice(5)}`
|
|
6
|
+
: `${cleanedNumber.slice(0, 2)}-${cleanedNumber.slice(2, 6)}-${cleanedNumber.slice(6)}`;
|
|
7
|
+
}
|
|
8
|
+
else if (/^0[3-9]\d{8}$/.test(cleanedNumber)) {
|
|
9
|
+
return `${cleanedNumber.slice(0, 3)}-${cleanedNumber.slice(3, 7)}-${cleanedNumber.slice(7)}`;
|
|
10
|
+
}
|
|
11
|
+
else if (/^010\d{8}$/.test(cleanedNumber)) {
|
|
12
|
+
return `${cleanedNumber.slice(0, 3)}-${cleanedNumber.slice(3, 7)}-${cleanedNumber.slice(7)}`;
|
|
13
|
+
}
|
|
14
|
+
else if (/^1\d{4,9}$/.test(cleanedNumber)) {
|
|
15
|
+
return `${cleanedNumber.slice(0, 4)}-${cleanedNumber.slice(4)}`;
|
|
16
|
+
}
|
|
17
|
+
return phoneNumber;
|
|
18
|
+
}
|
|
19
|
+
// console.log(formatKoreanPhoneNumber("01012345678")); // 010-1234-5678
|
|
20
|
+
// console.log(formatKoreanPhoneNumber("0212345678")); // 02-123-4567
|
|
21
|
+
// console.log(formatKoreanPhoneNumber("0311234567")); // 031-123-4567
|
|
22
|
+
// console.log(formatKoreanPhoneNumber("15881234")); // 1588-1234
|
|
23
|
+
// console.log(formatKoreanPhoneNumber("03011123456")); // 030-111-23456
|
package/util/handlePrint.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const handlePrint: (ref: React.RefObject<HTMLDivElement>) => (
|
|
1
|
+
declare const handlePrint: (ref: React.RefObject<HTMLDivElement>) => import("react-to-print").UseReactToPrintFn;
|
|
2
2
|
export default handlePrint;
|
package/util/handlePrint.js
CHANGED
package/util/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { default as convertDateToString } from "./convertDateToString";
|
|
|
10
10
|
export { default as copyToClipboard } from "./copyToClipboard";
|
|
11
11
|
export { default as createRecord } from "./createRecord";
|
|
12
12
|
export { default as formatMobileNum } from "./formatPhoneNumberToE164";
|
|
13
|
+
export { default as formatKorPhoneNum } from "./formatKoreanPhoneNumber";
|
|
14
|
+
export { default as createSearch } from "./createSearch";
|
|
13
15
|
export * from "../style/colors";
|
|
14
16
|
export * from "./pattern";
|
|
15
17
|
export * from "./shape";
|
package/util/index.js
CHANGED
|
@@ -10,6 +10,8 @@ export { default as convertDateToString } from "./convertDateToString";
|
|
|
10
10
|
export { default as copyToClipboard } from "./copyToClipboard";
|
|
11
11
|
export { default as createRecord } from "./createRecord";
|
|
12
12
|
export { default as formatMobileNum } from "./formatPhoneNumberToE164";
|
|
13
|
+
export { default as formatKorPhoneNum } from "./formatKoreanPhoneNumber";
|
|
14
|
+
export { default as createSearch } from "./createSearch";
|
|
13
15
|
export * from "../style/colors";
|
|
14
16
|
export * from "./pattern";
|
|
15
17
|
export * from "./shape";
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.266
|