@edu-tosel/design 1.0.37 → 1.0.39
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 +4 -3
- package/board/template/ManageBoard.js +6 -2
- package/board/widget/Header.js +4 -4
- package/card/template/InfoCard/Exam.d.ts +16 -2
- package/card/template/InfoCard/Exam.js +11 -4
- package/card/template/InfoCard/Finance.d.ts +6 -1
- package/card/template/InfoCard/Finance.js +5 -1
- package/card/template/InfoCard/Grade.d.ts +16 -2
- package/card/template/InfoCard/Grade.js +1 -1
- package/card/template/InfoCard/PersonalInformation.d.ts +13 -2
- package/card/template/InfoCard/PersonalInformation.js +30 -10
- package/card/template/InfoCard/Student.d.ts +12 -0
- package/card/template/InfoCard/Student.js +28 -0
- package/card/template/InfoCard/index.d.ts +2 -0
- package/card/template/InfoCard/index.js +2 -0
- package/html/design/Label.design.d.ts +1 -1
- package/html/design/Label.design.js +2 -3
- package/html/template/Label.d.ts +3 -1
- package/html/template/Label.js +6 -3
- package/html/widget/Toggle.js +1 -1
- package/interface/Board.d.ts +2 -0
- package/interface/Card.d.ts +0 -29
- package/interface/HTMLElement.d.ts +1 -0
- package/interface/Layout.d.ts +1 -1
- package/interface/Shelf.d.ts +1 -0
- package/interface/Widget.d.ts +1 -0
- package/layout/design/Row.design.js +2 -1
- package/layout/design/Shelf.design.js +3 -2
- package/layout/design/Tab.design.d.ts +2 -1
- package/layout/design/Tab.design.js +7 -2
- package/layout/index.d.ts +1 -0
- package/layout/index.js +1 -0
- package/layout/template/Gallery.d.ts +4 -1
- package/layout/template/Gallery.js +3 -2
- package/layout/template/Row.d.ts +1 -1
- package/layout/template/Row.js +2 -1
- package/layout/template/Shelf.d.ts +1 -1
- package/layout/template/Shelf.js +5 -3
- package/layout/template/Sign.d.ts +13 -0
- package/layout/template/Sign.js +13 -0
- package/layout/widget/dashboard/Header.js +4 -4
- package/layout/widget/sign/Box.d.ts +10 -0
- package/layout/widget/sign/Box.js +15 -0
- package/layout/widget/sign/Button.d.ts +28 -0
- package/layout/widget/sign/Button.js +38 -0
- package/layout/widget/sign/Check.d.ts +15 -0
- package/layout/widget/sign/Check.js +26 -0
- package/layout/widget/sign/Input.d.ts +15 -0
- package/layout/widget/sign/Input.js +33 -0
- package/layout/widget/sign/Layout.d.ts +7 -0
- package/layout/widget/sign/Layout.js +18 -0
- package/navigation/Navigation.js +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +27 -1
- package/util/calculateAge.d.ts +2 -0
- package/util/calculateAge.js +10 -0
- package/util/colors.d.ts +2 -0
- package/util/colors.js +1 -0
- package/version.txt +1 -1
|
@@ -5,9 +5,9 @@ const widthSize = {
|
|
|
5
5
|
xs: "w-20",
|
|
6
6
|
sm: "w-24",
|
|
7
7
|
md: "w-28",
|
|
8
|
-
lg: "w-
|
|
8
|
+
lg: "w-3/10 max-w-135",
|
|
9
9
|
xl: "w-full",
|
|
10
|
-
"2xl": "w-
|
|
10
|
+
"2xl": "w-full max-w-320",
|
|
11
11
|
full: "w-full",
|
|
12
12
|
auto: "w-auto",
|
|
13
13
|
};
|
|
@@ -23,10 +23,11 @@ const heightSize = {
|
|
|
23
23
|
};
|
|
24
24
|
export function Board({ children, widgets, options, debug, buttons, }) {
|
|
25
25
|
const { shows } = widgets ?? {};
|
|
26
|
-
const { width, height, isRounded, className } = options ?? {};
|
|
26
|
+
const { width, height, isRounded, className, noMobile } = options ?? {};
|
|
27
27
|
const container = {
|
|
28
28
|
positions: "relative",
|
|
29
29
|
width: widthSize[width ?? "full"],
|
|
30
|
+
noMobile: noMobile && "hidden xl:block",
|
|
30
31
|
debug: debug && isDebug(`border-2 border-${debug}`),
|
|
31
32
|
};
|
|
32
33
|
const body = {
|
|
@@ -6,7 +6,7 @@ import { cn, sortByOrder } from "../../util";
|
|
|
6
6
|
import { useWidgetStore } from "../../store";
|
|
7
7
|
import { useId } from "react";
|
|
8
8
|
export default function ManageBoard({ header, dataSets, dataField, widgets, options, buttons, }) {
|
|
9
|
-
const { className, noPadding } = options ?? {};
|
|
9
|
+
const { className, noPadding, width, noMobile } = options ?? {};
|
|
10
10
|
const { order } = useWidgetStore();
|
|
11
11
|
const id = useId();
|
|
12
12
|
const orders = order[id] ?? [];
|
|
@@ -16,6 +16,10 @@ export default function ManageBoard({ header, dataSets, dataField, widgets, opti
|
|
|
16
16
|
paddings: `${!noPadding ? "pt-7.5 pb-60 px-2 xs:pl-4 xl:pl-7.5 xl:pb-7.5 " : ""} `,
|
|
17
17
|
styles: "overflow-y-scroll",
|
|
18
18
|
};
|
|
19
|
-
return (_jsxs(Board, { widgets: widgets, buttons: buttons, options: {
|
|
19
|
+
return (_jsxs(Board, { widgets: widgets, buttons: buttons, options: {
|
|
20
|
+
width,
|
|
21
|
+
isRounded: true,
|
|
22
|
+
noMobile,
|
|
23
|
+
}, children: [header && _jsx(BoardHeader, { ...header }), dataField && _jsx(DataField.Board, { id: id, dataField: dataField }), _jsx("div", { className: cn(container), children: _jsx(Events.Replace, { widgets: widgets?.replaces, children: dataSets.map(({ titles, items, renderItem, interaction }, index) => (_jsxs(Shelf.Wrap, { titles: titles, options: { gap: "x" }, className: className, children: [items &&
|
|
20
24
|
sortByOrder({ items, orders })?.map((item) => renderItem(item)), interaction] }, id + index))) }) })] }));
|
|
21
25
|
}
|
package/board/widget/Header.js
CHANGED
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { cn } from "../../util";
|
|
3
3
|
import { Input, Select } from "../../html";
|
|
4
4
|
export default function BoardHeader({ titles, tag, options, }) {
|
|
5
|
-
const { title, icon } = titles ?? {};
|
|
5
|
+
const { title, icon, titleColor } = titles ?? {};
|
|
6
6
|
const { selects, inputs } = tag ?? {};
|
|
7
|
-
const { colors } = options ?? {};
|
|
7
|
+
const { colors, titleBorder } = options ?? {};
|
|
8
8
|
const { bgColor, textColor } = colors ?? {
|
|
9
9
|
bgColor: "white",
|
|
10
10
|
textColor: "black",
|
|
@@ -14,11 +14,11 @@ export default function BoardHeader({ titles, tag, options, }) {
|
|
|
14
14
|
paddings: "px-7.5",
|
|
15
15
|
styles: `${bgColor} ${textColor}`,
|
|
16
16
|
sizes: "w-full h-19",
|
|
17
|
-
border:
|
|
17
|
+
border: `border-b-2 ${titleBorder ?? "border-green-dark"}`,
|
|
18
18
|
};
|
|
19
19
|
const block = {
|
|
20
20
|
displays: "xl:hidden block ",
|
|
21
21
|
sizes: "w-full h-19",
|
|
22
22
|
};
|
|
23
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className:
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [icon && _jsx("img", { src: icon, className: "fill-blue-500" }), _jsx("div", { className: `text-2xl font-pretendard-bold ${titleColor}`, children: title })] }), _jsxs("div", { className: "flex items-center ml-auto gap-4", children: [selects?.map(({ selectOptions, options, state }, index) => (_jsx("div", { className: "flex items-center gap-2", children: _jsx(Select, { options: options, selectOptions: selectOptions, state: state }, title) }, index))), inputs?.map((prop, index) => (_jsx(Input, { ...prop }, index)))] })] }), _jsx("div", { className: cn(block) })] }));
|
|
24
24
|
}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InfoCardProps } from "../../../interface";
|
|
2
|
+
interface Data {
|
|
3
|
+
button: {
|
|
4
|
+
title: string;
|
|
5
|
+
hoverTitle?: string;
|
|
6
|
+
};
|
|
7
|
+
examDate: string;
|
|
8
|
+
endDate: string;
|
|
9
|
+
manager: string;
|
|
10
|
+
isPublic: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ExamProps extends Omit<InfoCardProps, "children"> {
|
|
13
|
+
data: Data;
|
|
14
|
+
}
|
|
15
|
+
export default function Exam({ titles, data, options }: ExamProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -3,16 +3,23 @@ import { Label } from "../../../html";
|
|
|
3
3
|
import { cn } from "../../../util";
|
|
4
4
|
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
5
5
|
import { label } from "./static/label";
|
|
6
|
-
export default function Exam({ titles, data }) {
|
|
7
|
-
const {
|
|
6
|
+
export default function Exam({ titles, data, options }) {
|
|
7
|
+
const { button, isPublic, manager, examDate, endDate } = data;
|
|
8
|
+
const { onClick, titleBorder } = options ?? {};
|
|
8
9
|
const container = {
|
|
9
10
|
positions: "relative",
|
|
10
11
|
displays: "flex flex-col justify-between mt-2.5",
|
|
11
12
|
sizes: "h-19.25 w-full",
|
|
12
13
|
};
|
|
13
14
|
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
14
|
-
titleBorder: "border-red-crimson",
|
|
15
|
+
titleBorder: titleBorder ?? "border-red-crimson",
|
|
15
16
|
width: "sm",
|
|
16
17
|
height: "xs",
|
|
17
|
-
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-pretendard-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title:
|
|
18
|
+
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex gap-4 font-pretendard-bold ", children: [manager, " / ", isPublic ? "공개시험" : "비공개시험"] }), _jsxs("div", { children: [_jsxs("div", { className: "text-xs", children: ["\uC811\uC218\uB9C8\uAC10: ", endDate] }), _jsxs("div", { className: "text-xs", children: ["\uC2DC\uD5D8\uC77C: ", examDate] })] })] }), _jsx(Label.Button, { title: button.title, hoverTitle: button.hoverTitle, onClick: onClick, options: {
|
|
19
|
+
width: "sm",
|
|
20
|
+
height: "xs",
|
|
21
|
+
className: cn(label),
|
|
22
|
+
text: "text-white hover:text-crimson-burgundy",
|
|
23
|
+
background: "bg-crimson-burgundy hover:bg-gray-light",
|
|
24
|
+
} })] }) }));
|
|
18
25
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { DataPackage, InfoCardProps, State } from "../../../interface";
|
|
1
|
+
import { DataPackage, InfoCardProps, OnClick, State } from "../../../interface";
|
|
2
2
|
export interface InfoCardFinanceProps<N, C> extends Omit<InfoCardProps, "children"> {
|
|
3
3
|
data: {
|
|
4
4
|
taxRate: number;
|
|
5
5
|
taxState: State<boolean>;
|
|
6
|
+
result: string;
|
|
7
|
+
download: OnClick;
|
|
8
|
+
latestDownloadDate: string;
|
|
9
|
+
refresh: OnClick;
|
|
10
|
+
lock: State<boolean>;
|
|
6
11
|
dataSets?: {
|
|
7
12
|
title: string;
|
|
8
13
|
sum: number | string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Toggle } from "../../../html";
|
|
2
3
|
import { cn } from "../../../util";
|
|
3
4
|
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
4
5
|
import { useId } from "react";
|
|
@@ -13,7 +14,10 @@ export default function Finance({ titles, data, }) {
|
|
|
13
14
|
titleBorder: "border-green-dark",
|
|
14
15
|
width: "2xl",
|
|
15
16
|
height: "xl",
|
|
16
|
-
}, topRight: _jsxs("div", { className: "flex items-center gap-2.5 text-xs ", children: [_jsx("button", { onClick: () => setTaxOn(!taxOn), className: cn("w-4 h-4 rounded-md", taxOn ? "bg-green-dark" : "border-1") }), _jsxs("div", { children: ["\uC0AC\uC5C5\uC18C\uB4DD\uC138 ", taxRate, "%"] })] }), children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "flex gap-7.5 mt-4.25 border-b-1 border-green-dark pb-2.5 ", children: dataSets?.map(({ title, sum, tax, total, rate, amount, number, result }, index) => (_jsxs("div", { className: "flex flex-col gap-2.5", children: [_jsx("div", { className: "font-pretendard-bold text-green-dark", children: title }), _jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: "flex flex-col justify-between w-20", children: [number && (_jsx(Numbers, { title: number.title, dataSet: number.dataSet, dataField: number.dataField })), _jsx(Result, { title: "\uBE44\uC728", amount: `${rate}%` })] }), amount && (_jsxs("div", { className: "flex flex-col", children: [_jsx(Amount, { title: amount.title, dataSet: amount.dataSet, dataField: amount.dataField }), _jsxs("div", { className: "flex flex-col gap-1.5 mt-2.5", children: [_jsx(Result, { title: "\uD569\uACC4", amount: sum, cnTitle: "text-gray-dim" }), _jsx(Result, { title: "\uC0AC\uC5C5\uC18C\uB4DD\uC138", amount: `${typeof tax === "number" && tax ? "-" : ""}${tax.toLocaleString()}`, cnTitle: "text-gray-dim", cnAmount: "text-crimson-burgundy" }), _jsx(Result, { title: "\uCD1D\uACC4", amount: total, background: "bg-green-dark/10", cnTitle: "font-pretendard-bold" })] }), _jsx(Result, { title: "\uC9C0\uAE09\uBD84", amount: result, background: "bg-green-dark", cnTitle: "font-pretendard-bold text-white", className: "text-white mt-5" })] }))] })] }, id + index))) }), _jsx("div", { className: "flex items-center h-15.5", children: _jsx("div", { className: "w-45 h-10 bg-gray-light rounded-md" }) })
|
|
17
|
+
}, topRight: _jsxs("div", { className: "flex items-center gap-2.5 text-xs ", children: [_jsx("button", { onClick: () => setTaxOn(!taxOn), className: cn("w-4 h-4 rounded-md", taxOn ? "bg-green-dark" : "border-1") }), _jsxs("div", { children: ["\uC0AC\uC5C5\uC18C\uB4DD\uC138 ", taxRate, "%"] })] }), children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "flex gap-7.5 mt-4.25 border-b-1 border-green-dark pb-2.5 ", children: dataSets?.map(({ title, sum, tax, total, rate, amount, number, result }, index) => (_jsxs("div", { className: "flex flex-col gap-2.5", children: [_jsx("div", { className: "font-pretendard-bold text-green-dark", children: title }), _jsxs("div", { className: "flex gap-2.5", children: [_jsxs("div", { className: "flex flex-col justify-between w-20", children: [number && (_jsx(Numbers, { title: number.title, dataSet: number.dataSet, dataField: number.dataField })), _jsx(Result, { title: "\uBE44\uC728", amount: `${rate}%` })] }), amount && (_jsxs("div", { className: "flex flex-col", children: [_jsx(Amount, { title: amount.title, dataSet: amount.dataSet, dataField: amount.dataField }), _jsxs("div", { className: "flex flex-col gap-1.5 mt-2.5", children: [_jsx(Result, { title: "\uD569\uACC4", amount: sum, cnTitle: "text-gray-dim" }), _jsx(Result, { title: "\uC0AC\uC5C5\uC18C\uB4DD\uC138", amount: `${typeof tax === "number" && tax ? "-" : ""}${tax.toLocaleString()}`, cnTitle: "text-gray-dim", cnAmount: "text-crimson-burgundy" }), _jsx(Result, { title: "\uCD1D\uACC4", amount: total, background: "bg-green-dark/10", cnTitle: "font-pretendard-bold" })] }), _jsx(Result, { title: "\uC9C0\uAE09\uBD84", amount: result, background: "bg-green-dark", cnTitle: "font-pretendard-bold text-white", className: "text-white mt-5" })] }))] })] }, id + index))) }), _jsx("div", { className: "flex items-center w-full h-15.5", children: _jsxs("div", { className: "flex w-full justify-between items-end", children: [_jsx("div", { className: "w-45 h-10 bg-gray-light rounded-md flex justify-center items-center text-sm font-pretendard-bold text-green-dark", children: data.result }), _jsxs("div", { className: "flex items-center gap-2.5", children: [_jsxs("div", { className: "text-xs text-gray-dim", children: ["\uB9C8\uC9C0\uB9C9 \uB2E4\uC6B4\uB85C\uB4DC: ", data.latestDownloadDate] }), _jsx("button", { onClick: data.refresh, className: "w-6.25 h-6.25 rounded-md box-shadow flex justify-center items-center", children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: _jsx("path", { d: "M13.3526 7.78995H17.5126L14.8618 5.13745C14.0084 4.28401 12.9453 3.67028 11.7795 3.35795C10.6137 3.04563 9.38616 3.04572 8.22037 3.35822C7.05459 3.67072 5.99162 4.28461 5.13832 5.13817C4.28501 5.99174 3.67145 7.0549 3.35932 8.22078M2.48765 16.3699V12.2099M2.48765 12.2099H6.64765M2.48765 12.2099L5.13765 14.8624C5.99108 15.7159 7.05414 16.3296 8.21997 16.6419C9.3858 16.9543 10.6133 16.9542 11.7791 16.6417C12.9449 16.3292 14.0078 15.7153 14.8611 14.8617C15.7145 14.0082 16.328 12.945 16.6402 11.7791M17.5126 3.62995V7.78828", stroke: "#105652", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("button", { className: "bg-green-dark text-white w-22.5 h-6.25 text-xs rounded-md", onClick: data.download, children: "\uC5D1\uC140 \uB2E4\uC6B4\uB85C\uB4DC" }), _jsx(Toggle, { labels: [
|
|
18
|
+
[true, "잠금"],
|
|
19
|
+
[false, "수정 중"],
|
|
20
|
+
], state: data.lock })] })] }) })] }) }));
|
|
17
21
|
}
|
|
18
22
|
function Numbers({ title, dataSet, dataField, }) {
|
|
19
23
|
const id = useId();
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InfoCardProps } from "../../../interface";
|
|
2
|
+
interface Data {
|
|
3
|
+
position: string;
|
|
4
|
+
age: number;
|
|
5
|
+
level: string;
|
|
6
|
+
levelString: string;
|
|
7
|
+
levelColor: string;
|
|
8
|
+
profileImage: string;
|
|
9
|
+
score: number;
|
|
10
|
+
grade: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GradeProps extends Omit<InfoCardProps, "children"> {
|
|
13
|
+
data: Partial<Data>;
|
|
14
|
+
}
|
|
15
|
+
export default function Grade({ titles, data }: GradeProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -19,7 +19,7 @@ export default function Grade({ titles, data }) {
|
|
|
19
19
|
titleBorder: "border-blue-navy",
|
|
20
20
|
width: "sm",
|
|
21
21
|
height: "xs",
|
|
22
|
-
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-5", children: [_jsx("div", { className: cn(levelBox), children: data.levelString }),
|
|
22
|
+
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex items-center gap-5", children: [_jsx("div", { className: cn(levelBox), children: data.levelString }), _jsxs("span", { className: "text-sm", children: [data.position, ", ", data.age, "\uC138"] })] }), _jsxs("div", { className: "absolute bottom-0 left-0 flex items-end gap-8 text-blue-navy", children: [_jsxs("div", { className: "w-20 h-12 flex justify-end items-end", children: [_jsx("div", { className: "leading-none text-4xl font-pretendard-bold", children: data.score }), _jsx("div", { children: "\uC810" })] }), _jsxs("div", { className: "w-14 h-12 flex justify-end items-end", children: [_jsx("div", { className: "leading-none text-4xl font-pretendard-bold", children: data.grade }), _jsx("div", { children: "\uB4F1\uAE09" })] })] })] }), _jsx(Label.Button, { title: "\uC0C1\uC138\uBCF4\uAE30", onClick: () => { }, options: {
|
|
23
23
|
width: "sm",
|
|
24
24
|
height: "xs",
|
|
25
25
|
text: "text-white hover:text-blue-navy",
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { InfoCardProps } from "../../../interface";
|
|
2
|
+
interface InfoCardPersonalInformationProps extends Omit<InfoCardProps, "children"> {
|
|
3
|
+
theme?: "red" | "blue";
|
|
4
|
+
data: {
|
|
5
|
+
info: string;
|
|
6
|
+
username: string;
|
|
7
|
+
name: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export default function PersonalInformation({ titles, data, theme, }: InfoCardPersonalInformationProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -1,28 +1,48 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { cn, gradient } from "../../../util";
|
|
3
3
|
import { label } from "./static/label";
|
|
4
4
|
import { Label } from "../../..";
|
|
5
5
|
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
6
|
-
|
|
6
|
+
const color = {
|
|
7
|
+
red: "#910023",
|
|
8
|
+
blue: "#173A8B",
|
|
9
|
+
background: {
|
|
10
|
+
red: "bg-crimson-burgundy",
|
|
11
|
+
blue: "bg-blue-navy",
|
|
12
|
+
gradient: {
|
|
13
|
+
red: gradient.bg.greenToRed,
|
|
14
|
+
blue: gradient.bg.lab,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
border: {
|
|
18
|
+
red: "border-crimson-burgundy/30",
|
|
19
|
+
blue: "border-blue-navy/30",
|
|
20
|
+
},
|
|
21
|
+
text: {
|
|
22
|
+
red: "text-crimson-burgundy",
|
|
23
|
+
blue: "text-blue-navy",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export default function PersonalInformation({ titles, data, theme = "red", }) {
|
|
7
27
|
const body = {
|
|
8
28
|
container: "flex flex-col pt-5.75",
|
|
9
|
-
belong:
|
|
29
|
+
belong: color.text[theme],
|
|
10
30
|
username: "text-gray-dim font-pretendard-bold",
|
|
11
|
-
name:
|
|
31
|
+
name: `text-xl font-pretendard-bold ${color.text[theme]}`,
|
|
12
32
|
subInfo: {
|
|
13
33
|
displays: "flex flex-col mt-7.5",
|
|
14
34
|
fonts: "text-xs text-gray-dim",
|
|
15
35
|
},
|
|
16
36
|
};
|
|
17
|
-
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
18
|
-
titleBorder:
|
|
37
|
+
return (_jsx(InfoCardDesign, { titles: titles, topRight: _jsxs("div", { className: "flex items-end gap-2.5", children: [_jsx("div", { className: `text-sm underline leading-none ${color.text[theme]}`, children: "\uC218\uC815\uD558\uAE30" }), _jsxs("svg", { width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsxs("g", { clipPath: "url(#clip0_3677_836)", children: [_jsx("path", { d: "M18.3495 25H1.3316C1.14591 25 1 24.8525 1 24.6647V4.61373C1 4.53326 1.03979 4.43938 1.09285 4.38573L5.33737 0.0938841C5.33737 0.0938841 5.48328 0 5.56286 0H18.3362C18.5219 0 18.6678 0.147532 18.6678 0.3353V9.2677C18.6678 9.45547 18.5219 9.603 18.3362 9.603C18.1505 9.603 18.0046 9.45547 18.0046 9.2677V0.670601H5.70877L1.66321 4.76127V24.3294H18.0179V15.8396C18.0179 15.6518 18.1638 15.5043 18.3495 15.5043C18.5352 15.5043 18.6811 15.6518 18.6811 15.8396V24.6647C18.6811 24.8525 18.5352 25 18.3495 25Z", fill: color[theme] }), _jsx("path", { d: "M1.33158 4.9489C1.252 4.9489 1.15915 4.92208 1.09283 4.85502C0.960187 4.7209 0.960187 4.50631 1.09283 4.3856L5.33735 0.0937542C5.46999 -0.040366 5.68222 -0.040366 5.80159 0.0937542C5.93424 0.227874 5.93424 0.442467 5.80159 0.563175L1.57034 4.85502C1.57034 4.85502 1.42443 4.9489 1.33158 4.9489Z", fill: color[theme] }), _jsx("path", { d: "M5.56286 4.96245H1.3316C1.14591 4.94903 1 4.8015 1 4.61373C1 4.42597 1.14591 4.27843 1.3316 4.27843H5.23126V0.3353C5.23126 0.147532 5.37716 0 5.56286 0C5.74856 0 5.89446 0.147532 5.89446 0.3353V4.62715C5.89446 4.72103 5.85467 4.8015 5.80161 4.86856C5.74856 4.93562 5.65571 4.96245 5.56286 4.96245Z", fill: color[theme] }), _jsx("path", { d: "M13.4019 18.0259C13.3091 18.0259 13.2295 17.9857 13.1632 17.932C13.0836 17.8516 13.0571 17.7443 13.0703 17.637L13.4417 15.719C13.4417 15.719 13.4815 15.5983 13.5346 15.5447L20.233 8.77162C20.233 8.77162 20.3789 8.67773 20.4717 8.67773C20.5646 8.67773 20.6442 8.71797 20.7105 8.77162L22.2491 10.3274C22.3818 10.4615 22.3818 10.6761 22.2491 10.7968L15.5507 17.5699C15.5507 17.5699 15.4446 17.6504 15.3783 17.6638L13.4815 18.0393C13.4815 18.0393 13.4417 18.0393 13.4152 18.0393L13.4019 18.0259ZM14.0784 15.9336L13.8264 17.2614L15.1395 17.0066L21.5328 10.542L20.4717 9.46904L14.0784 15.9336Z", fill: color[theme] }), _jsx("path", { d: "M22.7665 10.1129C22.6736 10.1129 22.594 10.0726 22.5277 10.019L20.9891 8.46318C20.8564 8.32906 20.8564 8.11447 20.9891 7.99376L21.891 7.08174C22.0104 6.96103 22.2359 6.96103 22.3553 7.08174L23.8939 8.63754C23.8939 8.63754 23.9868 8.78507 23.9868 8.87895C23.9868 8.97284 23.947 9.05331 23.8939 9.12037L22.992 10.0324C22.992 10.0324 22.846 10.1263 22.7532 10.1263L22.7665 10.1129ZM21.7053 8.22176L22.7665 9.29472L23.2042 8.85213L22.143 7.77917L21.7053 8.22176Z", fill: color[theme] }), _jsx("path", { d: "M18.4689 12.9026C18.3893 12.9026 18.2964 12.8757 18.2301 12.8087C18.0975 12.6745 18.0975 12.46 18.2301 12.3392L21.0023 9.53614C21.1349 9.40202 21.3472 9.40202 21.4665 9.53614C21.5992 9.67026 21.5992 9.88485 21.4665 10.0056L18.6943 12.8087C18.6943 12.8087 18.5484 12.9026 18.4556 12.9026H18.4689Z", fill: color[theme] }), _jsx("path", { d: "M15.2987 17.6504C15.2192 17.6504 15.1263 17.6235 15.06 17.5565L13.5214 16.0007C13.3887 15.8666 13.3887 15.652 13.5214 15.5313C13.654 15.3971 13.8662 15.3971 13.9856 15.5313L15.5242 17.087C15.6569 17.2212 15.6569 17.4358 15.5242 17.5565C15.4579 17.6235 15.3783 17.6504 15.2855 17.6504H15.2987Z", fill: color[theme] }), _jsx("path", { d: "M15.763 8.30244H3.90485C3.71915 8.30244 3.57324 8.1549 3.57324 7.96714C3.57324 7.77937 3.71915 7.63184 3.90485 7.63184H15.763C15.9487 7.63184 16.0946 7.77937 16.0946 7.96714C16.0946 8.1549 15.9487 8.30244 15.763 8.30244Z", fill: color[theme] }), _jsx("path", { d: "M15.763 11.32H3.90485C3.71915 11.32 3.57324 11.1725 3.57324 10.9847C3.57324 10.7969 3.71915 10.6494 3.90485 10.6494H15.763C15.9487 10.6494 16.0946 10.7969 16.0946 10.9847C16.0946 11.1725 15.9487 11.32 15.763 11.32Z", fill: color[theme] }), _jsx("path", { d: "M13.1102 14.3513H3.90485C3.71915 14.3513 3.57324 14.2037 3.57324 14.016C3.57324 13.8282 3.71915 13.6807 3.90485 13.6807H13.1102C13.2958 13.6807 13.4418 13.8282 13.4418 14.016C13.4418 14.2037 13.2958 14.3513 13.1102 14.3513Z", fill: color[theme] }), _jsx("path", { d: "M11.7837 17.3688H3.90485C3.71915 17.3688 3.57324 17.2213 3.57324 17.0335C3.57324 16.8458 3.71915 16.6982 3.90485 16.6982H11.7837C11.9694 16.6982 12.1153 16.8458 12.1153 17.0335C12.1153 17.2213 11.9694 17.3688 11.7837 17.3688Z", fill: color[theme] }), _jsx("path", { d: "M15.763 20.3864H3.90485C3.71915 20.3864 3.57324 20.2389 3.57324 20.0511C3.57324 19.8634 3.71915 19.7158 3.90485 19.7158H15.763C15.9487 19.7158 16.0946 19.8634 16.0946 20.0511C16.0946 20.2389 15.9487 20.3864 15.763 20.3864Z", fill: color[theme] })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_3677_836", children: _jsx("rect", { width: "25", height: "25", fill: "white" }) }) })] })] }), options: {
|
|
38
|
+
titleBorder: color.border[theme],
|
|
19
39
|
width: "md",
|
|
20
40
|
height: "md",
|
|
21
|
-
background:
|
|
22
|
-
boundary:
|
|
23
|
-
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(body.container), children: [
|
|
41
|
+
background: color.background.gradient[theme],
|
|
42
|
+
boundary: `border-3 ${color.border[theme]}`,
|
|
43
|
+
}, children: _jsxs(_Fragment, { children: [_jsxs("div", { className: cn(body.container), children: [_jsx("div", { className: cn(body.belong), children: data.info }), _jsx("div", { className: cn(body.username), children: data.username }), _jsx("div", { className: cn(body.name), children: data.name }), _jsxs("div", { className: cn(body.subInfo), children: [_jsx("div", { children: data.email }), _jsx("div", { children: data.phone })] })] }), _jsx(Label.Button, { title: "\uD559\uC6D0 \uB4F1\uB85D\uD558\uAE30", onClick: () => { }, options: {
|
|
24
44
|
width: "md",
|
|
25
|
-
background:
|
|
45
|
+
background: color.background[theme],
|
|
26
46
|
text: "text-white",
|
|
27
47
|
className: cn(label),
|
|
28
48
|
} })] }) }));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InfoCardProps, OnClick } from "./../../../interface";
|
|
2
|
+
interface Data {
|
|
3
|
+
belong: string;
|
|
4
|
+
birthday: string;
|
|
5
|
+
profileImage: string;
|
|
6
|
+
}
|
|
7
|
+
interface StudentInfo extends Omit<InfoCardProps, "children"> {
|
|
8
|
+
data: Partial<Data>;
|
|
9
|
+
onClick?: OnClick;
|
|
10
|
+
}
|
|
11
|
+
export default function Student({ titles, data, onClick }: StudentInfo): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Label } from "../../../html";
|
|
3
|
+
import { cn } from "../../../util";
|
|
4
|
+
import { InfoCardDesign } from "../../design/InfoCard.design";
|
|
5
|
+
import { label } from "./static/label";
|
|
6
|
+
export default function Student({ titles, data, onClick }) {
|
|
7
|
+
const container = {
|
|
8
|
+
positions: "relative",
|
|
9
|
+
displays: "flex flex-col justify-between mt-2.5",
|
|
10
|
+
sizes: "h-19.5 w-full",
|
|
11
|
+
};
|
|
12
|
+
const levelBox = {
|
|
13
|
+
displays: "flex justify-center items-center ",
|
|
14
|
+
sizes: "w-22.5 h-6.4",
|
|
15
|
+
styles: "bg-white-off text-sm rounded-md",
|
|
16
|
+
};
|
|
17
|
+
return (_jsx(InfoCardDesign, { titles: titles, options: {
|
|
18
|
+
titleBorder: "border-blue-navy",
|
|
19
|
+
width: "sm",
|
|
20
|
+
height: "xs",
|
|
21
|
+
}, children: _jsxs(_Fragment, { children: [_jsx("div", { className: cn(container), children: _jsx("div", { className: "flex items-center gap-5", children: _jsx("span", { className: "text-sm", children: data.belong }) }) }), _jsx(Label.Button, { title: "\uC0C1\uC138\uBCF4\uAE30", onClick: onClick, options: {
|
|
22
|
+
width: "sm",
|
|
23
|
+
height: "xs",
|
|
24
|
+
text: "text-white hover:text-blue-navy",
|
|
25
|
+
background: "bg-blue-navy hover:bg-gray-light",
|
|
26
|
+
className: cn(label),
|
|
27
|
+
} }), _jsx("div", { className: "absolute right-5 top-5 w-22.5 h-22.5", children: _jsx("div", { className: "relative h-full w-full rounded-md overflow-hidden", children: _jsx("img", { className: "bg-cover rounded-md ", src: data.profileImage }) }) })] }) }));
|
|
28
|
+
}
|
|
@@ -4,6 +4,7 @@ import Grade from "./Grade";
|
|
|
4
4
|
import Item from "./Item";
|
|
5
5
|
import PersonalInformation from "./PersonalInformation";
|
|
6
6
|
import Product from "./Product";
|
|
7
|
+
import Student from "./Student";
|
|
7
8
|
declare const InfoCard: {
|
|
8
9
|
PersonalInformation: typeof PersonalInformation;
|
|
9
10
|
Exam: typeof Exam;
|
|
@@ -15,5 +16,6 @@ declare const InfoCard: {
|
|
|
15
16
|
Product: typeof Product;
|
|
16
17
|
Item: typeof Item;
|
|
17
18
|
Grade: typeof Grade;
|
|
19
|
+
Student: typeof Student;
|
|
18
20
|
};
|
|
19
21
|
export default InfoCard;
|
|
@@ -5,6 +5,7 @@ import Grade from "./Grade";
|
|
|
5
5
|
import Item from "./Item";
|
|
6
6
|
import PersonalInformation from "./PersonalInformation";
|
|
7
7
|
import Product from "./Product";
|
|
8
|
+
import Student from "./Student";
|
|
8
9
|
const InfoCard = {
|
|
9
10
|
PersonalInformation,
|
|
10
11
|
Exam,
|
|
@@ -13,5 +14,6 @@ const InfoCard = {
|
|
|
13
14
|
Product,
|
|
14
15
|
Item,
|
|
15
16
|
Grade,
|
|
17
|
+
Student,
|
|
16
18
|
};
|
|
17
19
|
export default InfoCard;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HTMLLabelElement } from "../../interface";
|
|
2
|
-
export default function LabelDesign({ title, onClick, options, }: HTMLLabelElement): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function LabelDesign({ title, onClick, options, hoverState, }: HTMLLabelElement): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
2
|
import { cn } from "../../util";
|
|
4
3
|
import Obstacle from "../widget/Obstacle";
|
|
5
4
|
const widthSize = {
|
|
@@ -12,8 +11,8 @@ const heightSize = {
|
|
|
12
11
|
xs: "h-6.25",
|
|
13
12
|
sm: "h-11.25",
|
|
14
13
|
};
|
|
15
|
-
export default function LabelDesign({ title, onClick, options, }) {
|
|
16
|
-
const [hover, setHover] =
|
|
14
|
+
export default function LabelDesign({ title, onClick, options, hoverState, }) {
|
|
15
|
+
const [hover, setHover] = hoverState ?? [false, () => { }];
|
|
17
16
|
const { width, height, text, background, className, disabled } = options ?? {};
|
|
18
17
|
const container = {
|
|
19
18
|
positions: "relative z-10",
|
package/html/template/Label.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HTMLLabelElement } from "../../interface";
|
|
2
2
|
declare function Label({ title, options }: Omit<HTMLLabelElement, "onClick">): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Label {
|
|
4
|
-
var Button: ({ title, onClick, options }: HTMLLabelElement
|
|
4
|
+
var Button: ({ title, hoverTitle, onClick, options, }: Omit<HTMLLabelElement, "hoverState"> & {
|
|
5
|
+
hoverTitle?: string | undefined;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
}
|
|
6
8
|
export default Label;
|
package/html/template/Label.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
2
3
|
import LabelDesign from "../design/Label.design";
|
|
3
4
|
function Label({ title, options }) {
|
|
4
|
-
|
|
5
|
+
const [hover, setHover] = useState(false);
|
|
6
|
+
return (_jsx(LabelDesign, { title: title, hoverState: [hover, setHover], options: { ...options, width: "sm", height: "xs" } }));
|
|
5
7
|
}
|
|
6
|
-
function Button({ title, onClick, options }) {
|
|
7
|
-
|
|
8
|
+
function Button({ title, hoverTitle, onClick, options, }) {
|
|
9
|
+
const [hover, setHover] = useState(false);
|
|
10
|
+
return (_jsx(LabelDesign, { title: hoverTitle ? (!hover ? title : hoverTitle) : title, onClick: onClick, hoverState: [hover, setHover], options: {
|
|
8
11
|
...options,
|
|
9
12
|
width: options?.width ?? "md",
|
|
10
13
|
height: options?.height ?? "sm",
|
package/html/widget/Toggle.js
CHANGED
|
@@ -10,5 +10,5 @@ const widthSize = {
|
|
|
10
10
|
};
|
|
11
11
|
export default function Toggle({ state: [chekced, setChecked], labels, options, }) {
|
|
12
12
|
const { disabled } = options ?? {};
|
|
13
|
-
return (_jsxs("div", { className: "w-24 h-6 flex", children: [_jsx("label", { htmlFor: "", className: "inline-flex items-center gap-2 ", children: _jsx("input", { disabled: typeof disabled === "boolean" && disabled, type: "checkbox", className: "toggle bg-red-crimson appearance-none relative rounded-full w-10 h-5 cursor-pointer", checked: chekced, onChange: (e) => setChecked(e.target.checked) }) }), _jsx("div", { className: "ml-2 transition-all", children: labels.map(([status, label]) => (status === chekced ? label : "")) })] }));
|
|
13
|
+
return (_jsxs("div", { className: "w-24 h-6 flex items-center", children: [_jsx("label", { htmlFor: "", className: "inline-flex items-center gap-2 ", children: _jsx("input", { disabled: typeof disabled === "boolean" && disabled, type: "checkbox", className: "toggle bg-red-crimson appearance-none relative rounded-full w-10 h-5 cursor-pointer", checked: chekced, onChange: (e) => setChecked(e.target.checked) }) }), _jsx("div", { className: "ml-2 transition-all text-xs", children: labels.map(([status, label]) => (status === chekced ? label : "")) })] }));
|
|
14
14
|
}
|
package/interface/Board.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ interface OptionsProps {
|
|
|
8
8
|
color?: string;
|
|
9
9
|
isRounded?: boolean;
|
|
10
10
|
noPadding?: boolean;
|
|
11
|
+
noMobile?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export interface BoardProps<B> {
|
|
13
14
|
header?: BoardHeaderProps<B>;
|
|
@@ -26,6 +27,7 @@ export interface BoardHeaderProps<B> {
|
|
|
26
27
|
inputs?: HTMLInputElement[];
|
|
27
28
|
};
|
|
28
29
|
options?: {
|
|
30
|
+
titleBorder?: string;
|
|
29
31
|
colors?: {
|
|
30
32
|
bgColor?: string;
|
|
31
33
|
textColor?: string;
|
package/interface/Card.d.ts
CHANGED
|
@@ -76,25 +76,6 @@ export interface InfoCardProps extends CardProps {
|
|
|
76
76
|
titleBorder?: string;
|
|
77
77
|
} & CardOptions;
|
|
78
78
|
}
|
|
79
|
-
export interface InfoCardPersonalInformationProps extends Omit<InfoCardProps, "children"> {
|
|
80
|
-
data: {
|
|
81
|
-
school: string;
|
|
82
|
-
academy: string;
|
|
83
|
-
username: string;
|
|
84
|
-
name: string;
|
|
85
|
-
email: string;
|
|
86
|
-
phone: string;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
export interface InfoCardExamProps extends Omit<InfoCardProps, "children"> {
|
|
90
|
-
data: {
|
|
91
|
-
status: string;
|
|
92
|
-
examDate: string;
|
|
93
|
-
endDate: string;
|
|
94
|
-
manager: string;
|
|
95
|
-
isPublic: boolean;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
79
|
export interface InfoCardExamDataREGProps extends Omit<InfoCardProps, "children"> {
|
|
99
80
|
data?: {
|
|
100
81
|
scores: number[];
|
|
@@ -120,16 +101,6 @@ export interface InfoCardItemProps extends Omit<InfoCardProps, "children"> {
|
|
|
120
101
|
item: string;
|
|
121
102
|
};
|
|
122
103
|
}
|
|
123
|
-
export interface InfoCardGradeProps extends Omit<InfoCardProps, "children"> {
|
|
124
|
-
data: {
|
|
125
|
-
level?: string;
|
|
126
|
-
levelString?: string;
|
|
127
|
-
levelColor?: string;
|
|
128
|
-
profileImage?: string;
|
|
129
|
-
score?: number;
|
|
130
|
-
grade?: number;
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
104
|
export interface AddCardProps extends Omit<CardProps, "children"> {
|
|
134
105
|
title?: string;
|
|
135
106
|
icon?: string;
|
package/interface/Layout.d.ts
CHANGED
package/interface/Shelf.d.ts
CHANGED
package/interface/Widget.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { useId } from "react";
|
|
|
3
3
|
import { cn } from "../../util";
|
|
4
4
|
import { Label } from "../../html";
|
|
5
5
|
export default function RowDesign({ item, dataField, options, onClick, buttons, }) {
|
|
6
|
-
const { size, padding, text, noHover, className } = options ?? {};
|
|
6
|
+
const { size, padding, text, noHover, className, isPointer } = options ?? {};
|
|
7
7
|
const id = useId();
|
|
8
8
|
const container = {
|
|
9
9
|
positions: "relative",
|
|
@@ -12,6 +12,7 @@ export default function RowDesign({ item, dataField, options, onClick, buttons,
|
|
|
12
12
|
paddings: padding,
|
|
13
13
|
text: text,
|
|
14
14
|
styles: !noHover && "hover:bg-gray-100 duration-100",
|
|
15
|
+
cursor: isPointer && "cursor-pointer",
|
|
15
16
|
};
|
|
16
17
|
const itemBox = {
|
|
17
18
|
styles: "truncate",
|
|
@@ -3,9 +3,10 @@ import { LineBreaks } from "../../text";
|
|
|
3
3
|
import { cn, isDebug } from "../../util";
|
|
4
4
|
export default function Shelf({ children, className, options, titles, debug, }) {
|
|
5
5
|
const { title, titleColor } = titles ?? {};
|
|
6
|
-
const { titleSize, subtitleSize } = options ?? {};
|
|
6
|
+
const { titleSize, subtitleSize, isSize } = options ?? {};
|
|
7
7
|
const container = {
|
|
8
8
|
displays: "flex flex-col gap-6",
|
|
9
|
+
sizes: isSize && "w-full h-full lg:h-auto",
|
|
9
10
|
debug: debug && isDebug(`border-2 border-${debug}`),
|
|
10
11
|
};
|
|
11
12
|
const titleBox = {
|
|
@@ -20,7 +21,7 @@ export default function Shelf({ children, className, options, titles, debug, })
|
|
|
20
21
|
},
|
|
21
22
|
};
|
|
22
23
|
const childrenBox = {
|
|
23
|
-
sizes: "w-full",
|
|
24
|
+
sizes: "w-full h-full",
|
|
24
25
|
className,
|
|
25
26
|
};
|
|
26
27
|
return (_jsxs("div", { className: cn(container), children: [titles && (_jsxs("div", { className: cn(titleBox.container), children: [_jsx("div", { className: cn(titleBox.title), children: title }), _jsx(LineBreaks, { className: cn(titleBox.subtitle), texts: titles?.subtitle })] })), _jsx("div", { className: cn(childrenBox), children: children })] }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { cn } from "../../util";
|
|
4
|
-
export default function Tab({ tabs }) {
|
|
4
|
+
export default function Tab({ tabs, textColor, }) {
|
|
5
5
|
const [tabsSelection, setTabsSelection] = useState(tabs.map((_, i) => i === 0));
|
|
6
6
|
const container = {
|
|
7
7
|
positions: "xl:absolute xl:-bottom-18 xl:left-0 z-5",
|
|
@@ -10,8 +10,13 @@ export default function Tab({ tabs }) {
|
|
|
10
10
|
paddings: "px-2.5",
|
|
11
11
|
styles: "bg-white/30 rounded-xl ",
|
|
12
12
|
};
|
|
13
|
+
const button = {
|
|
14
|
+
styles: "rounded-md duration-500 ",
|
|
15
|
+
sizes: "h-9 w-32 ",
|
|
16
|
+
font: textColor ?? "text-green-dark",
|
|
17
|
+
};
|
|
13
18
|
return (_jsx("div", { className: cn(container), children: tabs.map(([title, onClick], index) => (_jsx("button", { onClick: () => {
|
|
14
19
|
setTabsSelection(tabsSelection.map((_, i) => i === index));
|
|
15
20
|
return onClick();
|
|
16
|
-
}, className:
|
|
21
|
+
}, className: cn(button, `${tabsSelection[index] && "bg-white rounded-2xl"}`), children: title }, title))) }));
|
|
17
22
|
}
|
package/layout/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Events } from "./template/Events";
|
|
2
2
|
export { default as Dashboard } from "./template/Dashboard";
|
|
3
|
+
export { default as Sign } from "./template/Sign";
|
|
3
4
|
export { default as DataField } from "./template/DataField";
|
|
4
5
|
export { default as Gallery } from "./template/Gallery";
|
|
5
6
|
export { default as Row } from "./template/Row";
|
package/layout/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as Events } from "./template/Events";
|
|
2
2
|
export { default as Dashboard } from "./template/Dashboard";
|
|
3
|
+
export { default as Sign } from "./template/Sign";
|
|
3
4
|
export { default as DataField } from "./template/DataField";
|
|
4
5
|
export { default as Gallery } from "./template/Gallery";
|
|
5
6
|
export { default as Row } from "./template/Row";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Button, EventsProps } from "../../interface";
|
|
2
|
-
export default function Gallery({ widgets, children, }: {
|
|
2
|
+
export default function Gallery({ widgets, children, options, }: {
|
|
3
3
|
widgets?: EventsProps & {
|
|
4
4
|
tabs?: Button[];
|
|
5
5
|
};
|
|
6
6
|
children: React.ReactNode;
|
|
7
|
+
options?: {
|
|
8
|
+
tabTextColor?: string;
|
|
9
|
+
};
|
|
7
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Events from "./Events";
|
|
3
3
|
import Tab from "../design/Tab.design";
|
|
4
|
-
export default function Gallery({ widgets, children, }) {
|
|
5
|
-
|
|
4
|
+
export default function Gallery({ widgets, children, options, }) {
|
|
5
|
+
const { tabTextColor } = options ?? {};
|
|
6
|
+
return (_jsxs("div", { className: "relative w-full flex", children: [_jsx(Events.Replace, { widgets: widgets?.replaces, children: _jsx(Events.Show, { widgets: widgets?.shows, children: children }) }), widgets?.tabs && _jsx(Tab, { tabs: widgets?.tabs, textColor: tabTextColor })] }));
|
|
6
7
|
}
|
package/layout/template/Row.d.ts
CHANGED
|
@@ -6,6 +6,6 @@ declare namespace Row {
|
|
|
6
6
|
noPadding?: boolean | undefined;
|
|
7
7
|
noHover?: boolean | undefined;
|
|
8
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
var Board: <T>({ item, dataField, onClick, buttons }: RowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
var Board: <T>({ item, dataField, onClick, buttons, options }: RowProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
}
|
|
11
11
|
export default Row;
|
package/layout/template/Row.js
CHANGED
|
@@ -9,9 +9,10 @@ function Row({ item, dataField, onClick, buttons }) {
|
|
|
9
9
|
className: "text-center",
|
|
10
10
|
} }));
|
|
11
11
|
}
|
|
12
|
-
function Board({ item, dataField, onClick, buttons }) {
|
|
12
|
+
function Board({ item, dataField, onClick, buttons, options }) {
|
|
13
13
|
const id = useId();
|
|
14
14
|
return (_jsx(RowDesign, { onClick: onClick, item: item, dataField: dataField, buttons: buttons, options: {
|
|
15
|
+
...options,
|
|
15
16
|
size: "w-full h-12",
|
|
16
17
|
padding: "px-2 xs:px-4 xl:px-7.5",
|
|
17
18
|
text: "text-xl",
|
|
@@ -3,6 +3,6 @@ declare function Shelf({ titles, debug, children }: ShelfProps<string | number>)
|
|
|
3
3
|
declare namespace Shelf {
|
|
4
4
|
var Wrap: ({ className, titles, children, debug, options, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
var Row: ({ titles, children, debug }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
var Col: ({ titles, children, debug }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
var Col: ({ titles, children, debug, className, }: ShelfProps<string | number>) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export default Shelf;
|
package/layout/template/Shelf.js
CHANGED
|
@@ -9,7 +9,7 @@ const gap = {
|
|
|
9
9
|
};
|
|
10
10
|
function Shelf({ titles, debug, children }) {
|
|
11
11
|
const container = {
|
|
12
|
-
displays: "inline-flex flex-col gap-12
|
|
12
|
+
displays: "inline-flex flex-col gap-12",
|
|
13
13
|
};
|
|
14
14
|
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), debug: debug, children: children }));
|
|
15
15
|
}
|
|
@@ -31,11 +31,13 @@ function Row({ titles, children, debug }) {
|
|
|
31
31
|
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), options: {
|
|
32
32
|
titleSize: "text-lg xl:text-2xl",
|
|
33
33
|
subtitleSize: "text-sm",
|
|
34
|
+
isSize: true,
|
|
34
35
|
}, debug: debug, children: children }));
|
|
35
36
|
}
|
|
36
|
-
function Col({ titles, children, debug }) {
|
|
37
|
+
function Col({ titles, children, debug, className, }) {
|
|
37
38
|
const container = {
|
|
38
|
-
displays: "flex flex-col flex-wrap
|
|
39
|
+
displays: "flex flex-col flex-wrap",
|
|
40
|
+
className: className ?? "gap-y-7.5",
|
|
39
41
|
};
|
|
40
42
|
return (_jsx(ShelfDesign, { titles: titles, className: cn(container), options: {
|
|
41
43
|
titleSize: "text-lg xl:text-2xl",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Box from "../widget/sign/Box";
|
|
2
|
+
import Button from "../widget/sign/Button";
|
|
3
|
+
import Check from "../widget/sign/Check";
|
|
4
|
+
import Input from "../widget/sign/Input";
|
|
5
|
+
import Layout from "../widget/sign/Layout";
|
|
6
|
+
declare const Sign: {
|
|
7
|
+
Box: typeof Box;
|
|
8
|
+
Button: typeof Button;
|
|
9
|
+
Check: typeof Check;
|
|
10
|
+
Input: typeof Input;
|
|
11
|
+
Layout: typeof Layout;
|
|
12
|
+
};
|
|
13
|
+
export default Sign;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Box from "../widget/sign/Box";
|
|
2
|
+
import Button from "../widget/sign/Button";
|
|
3
|
+
import Check from "../widget/sign/Check";
|
|
4
|
+
import Input from "../widget/sign/Input";
|
|
5
|
+
import Layout from "../widget/sign/Layout";
|
|
6
|
+
const Sign = {
|
|
7
|
+
Box,
|
|
8
|
+
Button,
|
|
9
|
+
Check,
|
|
10
|
+
Input,
|
|
11
|
+
Layout,
|
|
12
|
+
};
|
|
13
|
+
export default Sign;
|
|
@@ -6,7 +6,7 @@ import { Events } from "../..";
|
|
|
6
6
|
import Notification from "./Notification";
|
|
7
7
|
export function Header({ title, logo, notification, options, }) {
|
|
8
8
|
const { setView, setIsOwn } = useWidgetStore();
|
|
9
|
-
const { notifications, flag, onClick,
|
|
9
|
+
const { notifications, flag, onClick, color } = notification;
|
|
10
10
|
const { text, background, className } = options ?? {};
|
|
11
11
|
const container = {
|
|
12
12
|
positions: "fixed xl:static top-0 left-0 z-40",
|
|
@@ -17,15 +17,15 @@ export function Header({ title, logo, notification, options, }) {
|
|
|
17
17
|
styles: "px-5 xl:px-8 2xl:px-16 ",
|
|
18
18
|
className,
|
|
19
19
|
};
|
|
20
|
-
return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex h-12 items-center gap-8 xl:gap-24 2xl:gap-26", children: [logo ? (_jsx("a", { href: logo.href, children: _jsx("img", { src: logo.image, alt: "logo"
|
|
20
|
+
return (_jsxs("div", { className: cn(container), children: [_jsxs("div", { className: "flex h-12 items-center gap-8 xl:gap-24 2xl:gap-26", children: [logo ? (_jsx("a", { href: logo.href, children: _jsx("img", { src: logo.image, alt: "logo" }) })) : (_jsx("div", { className: "text-2xl", children: "TOSEL" })), _jsx("div", { className: "text-3xl font-pretendard-bold", children: title })] }), _jsx("div", { className: "relative flex gap-5.25", children: _jsxs(Events.Show, { widgets: [
|
|
21
21
|
["notification", _jsx(Notification, { notifications: notifications })],
|
|
22
22
|
["menu", _jsx(Menu, { image: "/images/hani.png" })],
|
|
23
23
|
], children: [_jsxs("button", { className: "relative", onClick: () => {
|
|
24
24
|
setIsOwn(true);
|
|
25
25
|
onClick && onClick();
|
|
26
26
|
return setView("notification");
|
|
27
|
-
}, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M15.4759 17.7938C17.4168 17.564 19.3237 17.1059 21.1572 16.4292C19.6044 14.7092 18.7465 12.4734 18.7499 10.1562V9.375C18.7499 7.7174 18.0914 6.12769 16.9193 4.95558C15.7472 3.78348 14.1575 3.125 12.4999 3.125C10.8423 3.125 9.25257 3.78348 8.08047 4.95558C6.90837 6.12769 6.24989 7.7174 6.24989 9.375V10.1562C6.25303 12.4736 5.39466 14.7093 3.84155 16.4292C5.64676 17.0958 7.54989 17.5594 9.52384 17.7938M15.4759 17.7938C13.4988 18.0283 11.5009 18.0283 9.52384 17.7938M15.4759 17.7938C15.626 18.2624 15.6634 18.7598 15.5849 19.2455C15.5064 19.7313 15.3143 20.1917 15.0242 20.5891C14.7342 20.9866 14.3544 21.31 13.9157 21.5329C13.4771 21.7559 12.9919 21.8721 12.4999 21.8721C12.0078 21.8721 11.5227 21.7559 11.0841 21.5329C10.6454 21.31 10.2656 20.9866 9.97553 20.5891C9.68548 20.1917 9.49339 19.7313 9.4149 19.2455C9.33641 18.7598 9.37374 18.2624 9.52384 17.7938", stroke:
|
|
27
|
+
}, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M15.4759 17.7938C17.4168 17.564 19.3237 17.1059 21.1572 16.4292C19.6044 14.7092 18.7465 12.4734 18.7499 10.1562V9.375C18.7499 7.7174 18.0914 6.12769 16.9193 4.95558C15.7472 3.78348 14.1575 3.125 12.4999 3.125C10.8423 3.125 9.25257 3.78348 8.08047 4.95558C6.90837 6.12769 6.24989 7.7174 6.24989 9.375V10.1562C6.25303 12.4736 5.39466 14.7093 3.84155 16.4292C5.64676 17.0958 7.54989 17.5594 9.52384 17.7938M15.4759 17.7938C13.4988 18.0283 11.5009 18.0283 9.52384 17.7938M15.4759 17.7938C15.626 18.2624 15.6634 18.7598 15.5849 19.2455C15.5064 19.7313 15.3143 20.1917 15.0242 20.5891C14.7342 20.9866 14.3544 21.31 13.9157 21.5329C13.4771 21.7559 12.9919 21.8721 12.4999 21.8721C12.0078 21.8721 11.5227 21.7559 11.0841 21.5329C10.6454 21.31 10.2656 20.9866 9.97553 20.5891C9.68548 20.1917 9.49339 19.7313 9.4149 19.2455C9.33641 18.7598 9.37374 18.2624 9.52384 17.7938", stroke: color ?? "#910023", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), flag && (_jsxs("div", { className: "absolute top-0 right-0", children: [_jsx("div", { className: "absolute w-2 h-2 rounded-full bg-red-500" }), _jsx("div", { className: " w-2 h-2 rounded-full bg-red-400 animate-ping duration-1000" })] }))] }), _jsx("svg", { className: "cursor-pointer", onClick: () => {
|
|
28
28
|
setIsOwn(true);
|
|
29
29
|
return setView("menu");
|
|
30
|
-
}, xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M18.7313 19.5053C18.0034 18.5416 17.0618 17.7601 15.9804 17.2223C14.8991 16.6846 13.7077 16.4052 12.5 16.4063C11.2924 16.4052 10.101 16.6846 9.01964 17.2223C7.93832 17.7601 6.99664 18.5416 6.26878 19.5053M18.7313 19.5053C20.1516 18.2419 21.1533 16.5767 21.6054 14.7304C22.0576 12.884 21.9378 10.9439 21.262 9.16722C20.5862 7.39055 19.3862 5.86128 17.8213 4.78224C16.2564 3.7032 14.4004 3.12537 12.4995 3.12537C10.5986 3.12537 8.74267 3.7032 7.17775 4.78224C5.61282 5.86128 4.41288 7.39055 3.73705 9.16722C3.06122 10.9439 2.94144 12.884 3.3936 14.7304C3.84575 16.5767 4.84847 18.2419 6.26878 19.5053M18.7313 19.5053C17.0167 21.0346 14.7976 21.8783 12.5 21.8751C10.2021 21.8786 7.98361 21.0349 6.26878 19.5053M15.625 10.1563C15.625 10.9851 15.2958 11.78 14.7097 12.366C14.1237 12.9521 13.3288 13.2813 12.5 13.2813C11.6712 13.2813 10.8764 12.9521 10.2903 12.366C9.70427 11.78 9.37503 10.9851 9.37503 10.1563C9.37503 9.32751 9.70427 8.53265 10.2903 7.9466C10.8764 7.36055 11.6712 7.03131 12.5 7.03131C13.3288 7.03131 14.1237 7.36055 14.7097 7.9466C15.2958 8.53265 15.625 9.32751 15.625 10.1563Z", stroke:
|
|
30
|
+
}, xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: _jsx("path", { d: "M18.7313 19.5053C18.0034 18.5416 17.0618 17.7601 15.9804 17.2223C14.8991 16.6846 13.7077 16.4052 12.5 16.4063C11.2924 16.4052 10.101 16.6846 9.01964 17.2223C7.93832 17.7601 6.99664 18.5416 6.26878 19.5053M18.7313 19.5053C20.1516 18.2419 21.1533 16.5767 21.6054 14.7304C22.0576 12.884 21.9378 10.9439 21.262 9.16722C20.5862 7.39055 19.3862 5.86128 17.8213 4.78224C16.2564 3.7032 14.4004 3.12537 12.4995 3.12537C10.5986 3.12537 8.74267 3.7032 7.17775 4.78224C5.61282 5.86128 4.41288 7.39055 3.73705 9.16722C3.06122 10.9439 2.94144 12.884 3.3936 14.7304C3.84575 16.5767 4.84847 18.2419 6.26878 19.5053M18.7313 19.5053C17.0167 21.0346 14.7976 21.8783 12.5 21.8751C10.2021 21.8786 7.98361 21.0349 6.26878 19.5053M15.625 10.1563C15.625 10.9851 15.2958 11.78 14.7097 12.366C14.1237 12.9521 13.3288 13.2813 12.5 13.2813C11.6712 13.2813 10.8764 12.9521 10.2903 12.366C9.70427 11.78 9.37503 10.9851 9.37503 10.1563C9.37503 9.32751 9.70427 8.53265 10.2903 7.9466C10.8764 7.36055 11.6712 7.03131 12.5 7.03131C13.3288 7.03131 14.1237 7.36055 14.7097 7.9466C15.2958 8.53265 15.625 9.32751 15.625 10.1563Z", stroke: color ?? "#910023", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })] }) })] }));
|
|
31
31
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface BoxProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
sizes?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function Box({ sizes, children, className }: BoxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace Box {
|
|
8
|
+
var Fix: ({ children, className }: Omit<BoxProps, "sizes">) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export default Box;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
function Box({ sizes, children, className }) {
|
|
4
|
+
const container = {
|
|
5
|
+
sizes: sizes ?? "w-112.5 p-5",
|
|
6
|
+
style: "box-shadow bg-white rounded-xl",
|
|
7
|
+
className,
|
|
8
|
+
};
|
|
9
|
+
return _jsx("div", { className: cn(container), children: children });
|
|
10
|
+
}
|
|
11
|
+
function Fix({ children, className }) {
|
|
12
|
+
return (_jsx(Box, { className: className, sizes: "w-112.5 h-67.5 pt-10.25 px-5 pb-5", children: children }));
|
|
13
|
+
}
|
|
14
|
+
Box.Fix = Fix;
|
|
15
|
+
export default Box;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OnClick, State } from "../../../interface";
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
title: string;
|
|
4
|
+
onClick: OnClick;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
size?: string;
|
|
7
|
+
}
|
|
8
|
+
interface SelectButtonProps {
|
|
9
|
+
state: State<string>;
|
|
10
|
+
buttons: {
|
|
11
|
+
type: string;
|
|
12
|
+
icon: string;
|
|
13
|
+
title: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
interface SelectButtonWithTitleProps extends SelectButtonProps {
|
|
17
|
+
title: string;
|
|
18
|
+
}
|
|
19
|
+
declare function Button({ title, onClick, disabled, size }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare namespace Button {
|
|
21
|
+
var Inner: ({ title, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
var Choose: typeof Selection;
|
|
23
|
+
}
|
|
24
|
+
declare function Selection({ buttons, state }: SelectButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare namespace Selection {
|
|
26
|
+
var WithTitle: ({ buttons, title, state }: SelectButtonWithTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export default Button;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn, gradient } from "../../../util";
|
|
3
|
+
function Button({ title, onClick, disabled, size }) {
|
|
4
|
+
const container = {
|
|
5
|
+
sizes: size ?? "w-112.5 h-13.5",
|
|
6
|
+
displays: "flex items-center justify-center",
|
|
7
|
+
backgrounds: !disabled ? gradient.bg.greenToRed : "bg-gray-medium",
|
|
8
|
+
cursors: !disabled ? "cursor-pointer" : "cursor-default",
|
|
9
|
+
styles: "rounded-lgx text-white",
|
|
10
|
+
};
|
|
11
|
+
return (_jsx("div", { onClick: () => {
|
|
12
|
+
if (disabled)
|
|
13
|
+
return;
|
|
14
|
+
return onClick();
|
|
15
|
+
}, className: cn(container), children: title }));
|
|
16
|
+
}
|
|
17
|
+
function Inner({ title, onClick }) {
|
|
18
|
+
return _jsx(Button, { title: title, onClick: onClick, size: "w-102.5 h-13.5" });
|
|
19
|
+
}
|
|
20
|
+
function Selection({ buttons, state }) {
|
|
21
|
+
const [value, setValue] = state;
|
|
22
|
+
const container = (type) => {
|
|
23
|
+
return {
|
|
24
|
+
displays: "flex flex-1 justify-center items-center gap-3",
|
|
25
|
+
sizes: "h-15",
|
|
26
|
+
backgrounds: value === type ? "bg-green-dark/10" : "bg-gray-light",
|
|
27
|
+
styles: "rounded-lgx",
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
return (_jsx("div", { className: "flex gap-2.5", children: buttons.map(({ icon, title, type }) => (_jsxs("button", { className: cn(container(type)), onClick: () => setValue(type), children: [_jsx("img", { src: icon }), _jsx("div", { children: title })] }, type))) }));
|
|
31
|
+
}
|
|
32
|
+
function WithTitle({ buttons, title, state }) {
|
|
33
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Selection, { buttons: buttons, state: state })] }));
|
|
34
|
+
}
|
|
35
|
+
Button.Inner = Inner;
|
|
36
|
+
Button.Choose = Selection;
|
|
37
|
+
Selection.WithTitle = WithTitle;
|
|
38
|
+
export default Button;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { State } from "../../../interface";
|
|
2
|
+
interface CheckProps {
|
|
3
|
+
state: State<boolean>;
|
|
4
|
+
sizes?: string;
|
|
5
|
+
element?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare function Check({ state, sizes, element }: CheckProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare namespace Check {
|
|
9
|
+
var Box: typeof CheckWithBox;
|
|
10
|
+
}
|
|
11
|
+
declare function CheckWithBox({ state, element, }: {
|
|
12
|
+
state: State<boolean>;
|
|
13
|
+
element?: React.ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default Check;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
function Check({ state, sizes, element }) {
|
|
4
|
+
const [value, setValue] = state;
|
|
5
|
+
const container = {
|
|
6
|
+
displays: "flex items-center gap-3",
|
|
7
|
+
sizes: sizes ?? "w-112.5 h-6 pl-5",
|
|
8
|
+
};
|
|
9
|
+
const checkbox = {
|
|
10
|
+
displays: "flex justify-center items-center",
|
|
11
|
+
sizes: "w-6 h-6 ",
|
|
12
|
+
styles: "border-gray-light border-1 rounded-md",
|
|
13
|
+
backgrounds: value ? "bg-green-dark" : "bg-white",
|
|
14
|
+
};
|
|
15
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("button", { onClick: () => setValue(!value), className: cn(checkbox), children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "11", viewBox: "0 0 12 11", fill: "none", children: _jsx("path", { d: "M1 6.14286L4.75 10L11 1", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), _jsx("div", { children: element })] }));
|
|
16
|
+
}
|
|
17
|
+
function CheckWithBox({ state, element, }) {
|
|
18
|
+
const container = {
|
|
19
|
+
displays: "flex items-center",
|
|
20
|
+
sizes: "w-112.5 h-15 pl-5",
|
|
21
|
+
styles: "box-shadow rounded-lgx",
|
|
22
|
+
};
|
|
23
|
+
return (_jsx("div", { className: cn(container), children: _jsx(Check, { state: state, sizes: "h-6", element: element }) }));
|
|
24
|
+
}
|
|
25
|
+
Check.Box = CheckWithBox;
|
|
26
|
+
export default Check;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { State } from "../../../interface";
|
|
2
|
+
interface InputProps {
|
|
3
|
+
state: State<string>;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
flag?: boolean;
|
|
6
|
+
type?: "text" | "password" | "date" | "email" | "phone" | "number";
|
|
7
|
+
}
|
|
8
|
+
interface InputWithTitleProps extends InputProps {
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
declare function Input({ state, placeholder, flag, type }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace Input {
|
|
13
|
+
var WithTitle: ({ title, placeholder, state, flag, type, }: InputWithTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export default Input;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { cn } from "../../../util";
|
|
4
|
+
function Input({ state, placeholder, flag, type }) {
|
|
5
|
+
const [value, setValue] = state;
|
|
6
|
+
const [onFocus, setOnFocus] = useState(false);
|
|
7
|
+
const container = {
|
|
8
|
+
positions: "relative",
|
|
9
|
+
};
|
|
10
|
+
const placeholderBox = {
|
|
11
|
+
positions: "absolute left-5",
|
|
12
|
+
styles: "duration-300",
|
|
13
|
+
fonts: "leading-none text-gray-medium",
|
|
14
|
+
animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
|
|
15
|
+
};
|
|
16
|
+
const inputBox = {
|
|
17
|
+
sizes: "w-102.5 h-13.5 pl-5 pt-3",
|
|
18
|
+
fonts: "text-sm",
|
|
19
|
+
background: flag === true
|
|
20
|
+
? "bg-green-dark/10"
|
|
21
|
+
: flag === false
|
|
22
|
+
? "bg-crimson-burgundy/10 text-crimson-burgundy"
|
|
23
|
+
: "bg-gray-light",
|
|
24
|
+
styles: "bg-gray-light rounded-md outline-none",
|
|
25
|
+
animation: onFocus ? "border-2 border-green-dark box-shadow" : "border-0",
|
|
26
|
+
};
|
|
27
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("div", { className: cn(placeholderBox), children: placeholder }), _jsx("input", { className: cn(inputBox), value: value, onFocus: () => setOnFocus(true), onBlur: () => setOnFocus(false), onChange: (e) => setValue(e.target.value), type: type ?? "text" })] }));
|
|
28
|
+
}
|
|
29
|
+
function WithTitle({ title, placeholder, state, flag, type, }) {
|
|
30
|
+
return (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "leading-none", children: title }), _jsx(Input, { placeholder: placeholder, state: state, flag: flag, type: type })] }));
|
|
31
|
+
}
|
|
32
|
+
Input.WithTitle = WithTitle;
|
|
33
|
+
export default Input;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../../util";
|
|
3
|
+
export default function Layout({ children, steps, script }) {
|
|
4
|
+
const container = {
|
|
5
|
+
positions: "relative",
|
|
6
|
+
sizes: "w-full min-h-screen overflow-hidden",
|
|
7
|
+
displays: "flex flex-col items-center justify-center",
|
|
8
|
+
};
|
|
9
|
+
return (_jsxs("div", { className: cn(container), children: [_jsx("img", { src: "/images/logos/tosel.png", width: 180, height: 40 }), _jsx("div", { className: "mt-12", children: script }), _jsx("div", { className: "flex gap-5 my-5", children: steps?.map((step, index) => (_jsx(Light, { flag: step }, index))) }), children] }));
|
|
10
|
+
}
|
|
11
|
+
function Light({ flag }) {
|
|
12
|
+
const container = {
|
|
13
|
+
sizes: "w-2.5 h-2.5",
|
|
14
|
+
styles: "rounded-full",
|
|
15
|
+
backgrounds: flag ? "bg-green-dark" : "bg-gray-light-super",
|
|
16
|
+
};
|
|
17
|
+
return _jsx("div", { className: cn(container) });
|
|
18
|
+
}
|
package/navigation/Navigation.js
CHANGED
|
@@ -15,7 +15,7 @@ export const buttonClassNames = (href, nowPath, color) => {
|
|
|
15
15
|
? `${bg} ${selectedText}`
|
|
16
16
|
: "bg-white text-black"
|
|
17
17
|
: (!isDark ? "bg-white " : "bg-black ") +
|
|
18
|
-
`xl:bg-transparent xl:hover:bg-white/50
|
|
18
|
+
`xl:bg-transparent xl:hover:bg-white/50 ${text} dark:text-white`;
|
|
19
19
|
return [cn(container), toggle].join(" ");
|
|
20
20
|
};
|
|
21
21
|
export function NavigationContainer({ children, }) {
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -62,6 +62,7 @@ export default {
|
|
|
62
62
|
"blue-pastel": "#CED6E6",
|
|
63
63
|
"violet-light": "#9979F6",
|
|
64
64
|
"gray-light": "#F0F0F0",
|
|
65
|
+
"gray-light-super": "#D9D9D9",
|
|
65
66
|
"gray-medium": "#7F7F7F",
|
|
66
67
|
"gray-dim": "#4C4C4C",
|
|
67
68
|
"silver-lavender": "#E7E9F2",
|
|
@@ -91,10 +92,13 @@ export default {
|
|
|
91
92
|
0.5: "0.125rem",
|
|
92
93
|
1: "0.25rem",
|
|
93
94
|
1.25: "0.3125rem",
|
|
95
|
+
2.125: "0.53125rem",
|
|
94
96
|
2.5: "0.625rem",
|
|
97
|
+
2.625: "0.65625rem",
|
|
95
98
|
3.5: "0.875rem",
|
|
96
99
|
3.75: "0.9375rem",
|
|
97
100
|
4.25: "1.0625rem",
|
|
101
|
+
4.375: "1.09375rem",
|
|
98
102
|
4.5: "1.125rem",
|
|
99
103
|
4.75: "1.1875rem",
|
|
100
104
|
5.25: "1.3125rem",
|
|
@@ -115,6 +119,7 @@ export default {
|
|
|
115
119
|
11.375: "2.84375rem",
|
|
116
120
|
12: "3rem",
|
|
117
121
|
13.25: "3.3125rem",
|
|
122
|
+
13.5: "3.375rem",
|
|
118
123
|
13.75: "3.4375rem",
|
|
119
124
|
14: "3.5rem",
|
|
120
125
|
14.125: "3.53125rem",
|
|
@@ -138,6 +143,7 @@ export default {
|
|
|
138
143
|
23: "5.75rem",
|
|
139
144
|
23.75: "5.9375rem",
|
|
140
145
|
25: "6.25rem",
|
|
146
|
+
25.75: "6.4375rem",
|
|
141
147
|
26: "6.5rem",
|
|
142
148
|
27: "6.75rem",
|
|
143
149
|
27.5: "6.875rem",
|
|
@@ -184,6 +190,7 @@ export default {
|
|
|
184
190
|
96: "24rem",
|
|
185
191
|
98: "24.5rem",
|
|
186
192
|
100: "25rem",
|
|
193
|
+
102.5: "25.625rem",
|
|
187
194
|
104: "26rem",
|
|
188
195
|
106: "26.5rem",
|
|
189
196
|
108: "27rem",
|
|
@@ -271,21 +278,40 @@ export default {
|
|
|
271
278
|
100: "25rem",
|
|
272
279
|
128: "32rem",
|
|
273
280
|
},
|
|
281
|
+
borderRadius: {
|
|
282
|
+
lgx: "0.625rem",
|
|
283
|
+
},
|
|
274
284
|
transitionDelay: {
|
|
285
|
+
450: "450ms",
|
|
286
|
+
600: "600ms",
|
|
275
287
|
750: "750ms",
|
|
288
|
+
800: "800ms",
|
|
276
289
|
900: "900ms",
|
|
277
290
|
1000: "1000ms",
|
|
291
|
+
1050: "1050ms",
|
|
292
|
+
1100: "1100ms",
|
|
293
|
+
1150: "1150ms",
|
|
294
|
+
1200: "1200ms",
|
|
278
295
|
1250: "1250ms",
|
|
279
|
-
|
|
296
|
+
1300: "1300ms",
|
|
297
|
+
1350: "1350ms",
|
|
298
|
+
1400: "1400ms",
|
|
280
299
|
1500: "1500ms",
|
|
281
300
|
1600: "1600ms",
|
|
301
|
+
1650: "1650ms",
|
|
282
302
|
1750: "1750ms",
|
|
283
303
|
1800: "1800ms",
|
|
304
|
+
1950: "1950ms",
|
|
284
305
|
2000: "2000ms",
|
|
285
306
|
2100: "2100ms",
|
|
307
|
+
2200: "2200ms",
|
|
286
308
|
2250: "2250ms",
|
|
309
|
+
2400: "2400ms",
|
|
287
310
|
2500: "2500ms",
|
|
311
|
+
2550: "2550ms",
|
|
312
|
+
2600: "2600ms",
|
|
288
313
|
2700: "2700ms",
|
|
314
|
+
2800: "2800ms",
|
|
289
315
|
3000: "3000ms",
|
|
290
316
|
3300: "3300ms",
|
|
291
317
|
3900: "3900ms",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const calculateAge = (birthDateString) => {
|
|
2
|
+
const birthDate = new Date(birthDateString);
|
|
3
|
+
const today = new Date();
|
|
4
|
+
const thisYear = today.getFullYear();
|
|
5
|
+
const thisYearBirthday = new Date(thisYear, birthDate.getMonth(), birthDate.getDate());
|
|
6
|
+
return today >= thisYearBirthday
|
|
7
|
+
? thisYear - birthDate.getFullYear()
|
|
8
|
+
: thisYear - birthDate.getFullYear() - 1;
|
|
9
|
+
};
|
|
10
|
+
export default calculateAge;
|
package/util/colors.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const colorsByLevel: {
|
|
|
7
7
|
};
|
|
8
8
|
export declare const gradientBackground: {
|
|
9
9
|
lab: string;
|
|
10
|
+
labSoft: string;
|
|
10
11
|
greenToRed: string;
|
|
11
12
|
greenToRedSoft: string;
|
|
12
13
|
};
|
|
@@ -17,6 +18,7 @@ export declare const gradientBorder: {
|
|
|
17
18
|
export declare const gradient: {
|
|
18
19
|
bg: {
|
|
19
20
|
lab: string;
|
|
21
|
+
labSoft: string;
|
|
20
22
|
greenToRed: string;
|
|
21
23
|
greenToRedSoft: string;
|
|
22
24
|
};
|
package/util/colors.js
CHANGED
|
@@ -7,6 +7,7 @@ export const colorsByLevel = {
|
|
|
7
7
|
};
|
|
8
8
|
export const gradientBackground = {
|
|
9
9
|
lab: "bg-gradient-to-br from-violet-light/20 to-blue-sky/40 ",
|
|
10
|
+
labSoft: "bg-gradient-to-br from-[#797EF6]/32 to-[#44C5F3]/20",
|
|
10
11
|
greenToRed: "bg-gradient-to-r from-green-dark to-red-crimson",
|
|
11
12
|
greenToRedSoft: "bg-gradient-to-r from-green-dark/20 to-red-crimson/20",
|
|
12
13
|
};
|
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.39
|