@edu-tosel/design 0.1.4 → 0.1.5

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.
Files changed (45) hide show
  1. package/README.md +32 -31
  2. package/board/index.d.ts +19 -19
  3. package/board/index.js +34 -47
  4. package/card/Card.d.ts +14 -14
  5. package/card/Card.js +19 -32
  6. package/card/ProfileCard.d.ts +14 -14
  7. package/card/ProfileCard.js +8 -20
  8. package/card/index.d.ts +1 -1
  9. package/card/index.js +1 -1
  10. package/deck/index.d.ts +18 -18
  11. package/deck/index.js +16 -28
  12. package/{style.css → globals.css} +40 -41
  13. package/header/index.d.ts +1 -5
  14. package/header/index.js +1 -25
  15. package/layout/dashboard/Header.d.ts +5 -0
  16. package/layout/dashboard/Header.js +15 -0
  17. package/layout/dashboard/index.d.ts +5 -0
  18. package/layout/dashboard/index.js +8 -0
  19. package/layout/index.d.ts +1 -0
  20. package/layout/index.js +1 -0
  21. package/modal/index.d.ts +9 -9
  22. package/modal/index.js +23 -35
  23. package/navigation/index.d.ts +6 -6
  24. package/navigation/index.js +16 -24
  25. package/package.json +5 -31
  26. package/tailwind.config.js +334 -319
  27. package/text/index.d.ts +5 -5
  28. package/text/index.js +6 -18
  29. package/util/classNames.d.ts +1 -1
  30. package/util/classNames.js +4 -8
  31. package/util/colors.d.ts +10 -10
  32. package/util/colors.js +10 -10
  33. package/util/display.d.ts +25 -25
  34. package/util/display.js +25 -55
  35. package/util/displayResponsive.d.ts +3 -3
  36. package/util/displayResponsive.js +15 -15
  37. package/util/index.d.ts +7 -7
  38. package/util/index.js +7 -7
  39. package/util/pattern.d.ts +7 -7
  40. package/util/pattern.js +15 -15
  41. package/util/position.d.ts +14 -14
  42. package/util/position.js +44 -56
  43. package/util/shape.d.ts +1 -1
  44. package/util/shape.js +3 -3
  45. package/version.txt +1 -1
package/README.md CHANGED
@@ -1,32 +1,33 @@
1
- # TOSEL UI Library
2
- TOSEL 통합 디자인 시스템에 맞춘 UI 라이브러리
3
-
4
- ## Tech Stack
5
- - tailwindcss 3.4.0
6
- - React 18
7
-
8
- ## Getting Start
9
- ```bash
10
- # 설치
11
- npm install @edu-tosel/ui@latest
12
-
13
- # 개발환경
14
- npm install # 의존성 설치
15
- npm start # React 환경에서 실행
16
- npm run test # jest 실행
17
- npm run build # 빌드
18
- npm run publish # npm 배포
19
- ```
20
-
21
- ## Folder Structure
22
- ### asset
23
- tailwindcss를 조합한 커스텀 클래스 보관
24
-
25
- ### board
26
- ### card
27
- ### deck
28
- ### header
29
- ### modal
30
- ### navigation
31
- ### text
1
+ # TOSEL Design Library
2
+ TOSEL 통합 디자인 시스템에 맞춘 UI 라이브러리
3
+
4
+ ## Tech Stack
5
+ - tailwindcss 3.4.1
6
+ - React 18
7
+ - Vite 5
8
+
9
+ ## Getting Start
10
+ ```bash
11
+ # 설치
12
+ npm install @edu-tosel/ui@latest
13
+
14
+ # 개발환경
15
+ npm install # 의존성 설치
16
+ npm run dev # 개발자 환경에서 실행
17
+ npm run test # jest 실행
18
+ npm run build # 빌드
19
+ npm run publish # npm 배포
20
+ ```
21
+
22
+ ## Folder Structure
23
+ ### asset
24
+ tailwindcss를 조합한 커스텀 클래스 보관
25
+
26
+ ### board
27
+ ### card
28
+ ### deck
29
+ ### header
30
+ ### modal
31
+ ### navigation
32
+ ### text
32
33
  문자열 조작 컴포넌트 보관
package/board/index.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
2
- import "../style.css";
3
- export declare function CanvasBoard({ children, options, }: {
4
- children: React.ReactNode;
5
- options?: {
6
- height?: number;
7
- };
8
- }): import("react/jsx-runtime").JSX.Element;
9
- export declare function ListBoard({ children, header, options, }: {
10
- children: React.ReactNode;
11
- header: {
12
- title: string;
13
- colors?: [string, string];
14
- childrens?: React.ReactNode[];
15
- };
16
- options?: {
17
- height?: number;
18
- };
19
- }): import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ import "../globals.css";
3
+ export declare function CanvasBoard({ children, options, }: {
4
+ children: React.ReactNode;
5
+ options?: {
6
+ height?: number;
7
+ };
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ListBoard({ children, header, options, }: {
10
+ children: React.ReactNode;
11
+ header: {
12
+ title: string;
13
+ colors?: [string, string];
14
+ childrens?: React.ReactNode[];
15
+ };
16
+ options?: {
17
+ height?: number;
18
+ };
19
+ }): import("react/jsx-runtime").JSX.Element;
package/board/index.js CHANGED
@@ -1,47 +1,34 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "../style.css";
14
- import { center, between } from "../util";
15
- function Header(_a) {
16
- var title = _a.title, colors = _a.colors, childrens = _a.childrens;
17
- var _b = colors !== null && colors !== void 0 ? colors : ["bg", "text"], bgColor = _b[0], textColor = _b[1];
18
- var headerClassNames = [
19
- center.row + between.row,
20
- "bg-".concat(bgColor || "white-off"),
21
- "text-".concat(textColor || "black"),
22
- "w-full h-22 px-12",
23
- ].join(" ");
24
- return (_jsxs("div", __assign({ className: headerClassNames }, { children: [_jsx("div", __assign({ className: "text-xl font-bold" }, { children: title })), _jsx("div", __assign({ className: "flex" }, { children: childrens === null || childrens === void 0 ? void 0 : childrens.map(function (children) { return children; }) }))] })));
25
- }
26
- function Board(_a) {
27
- var children = _a.children, header = _a.header, options = _a.options;
28
- var height = (options !== null && options !== void 0 ? options : {}).height;
29
- var classNames = [
30
- "h-".concat(height !== null && height !== void 0 ? height : 186, " ").concat(header ? "" : "pt-8"),
31
- "rounded-xl bg-white/80 overflow-hidden relative w-full",
32
- ].join(" ");
33
- return (_jsxs("div", __assign({ className: classNames }, { children: [header ? _jsx(Header, __assign({}, header)) : null, _jsx("div", __assign({ className: "h-full" }, { children: children }))] })));
34
- }
35
- export function CanvasBoard(_a) {
36
- var children = _a.children, options = _a.options;
37
- var height = (options !== null && options !== void 0 ? options : {}).height;
38
- var classNames = ["px-12"].join(" ");
39
- return (_jsx(Board, __assign({ options: { height: height } }, { children: _jsx("div", __assign({ className: classNames }, { children: children })) })));
40
- }
41
- export function ListBoard(_a) {
42
- var children = _a.children, header = _a.header, options = _a.options;
43
- var title = header.title, colors = header.colors, childrens = header.childrens;
44
- var height = (options !== null && options !== void 0 ? options : {}).height;
45
- var classNames = ["scrollbar pt-8 px-12 overflow-y-scroll h-full pb-32"].join(" ");
46
- return (_jsx(Board, __assign({ header: { title: title, colors: colors, childrens: childrens }, options: { height: height } }, { children: _jsx("div", __assign({ className: classNames }, { children: children })) })));
47
- }
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "../globals.css";
3
+ import { center, between } from "../util";
4
+ function Header({ title, colors, childrens, }) {
5
+ const [bgColor, textColor] = colors ?? ["bg", "text"];
6
+ const headerClassNames = [
7
+ center.row + between.row,
8
+ `bg-${bgColor || "white-off"}`,
9
+ `text-${textColor || "black"}`,
10
+ "w-full h-22 px-12",
11
+ ].join(" ");
12
+ return (_jsxs("div", { className: headerClassNames, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx("div", { className: "flex", children: childrens?.map((children) => children) })] }));
13
+ }
14
+ function Board({ children, header, options, }) {
15
+ const { height } = options ?? {};
16
+ const classNames = [
17
+ `h-${height ?? 186} ${header ? "" : "pt-8"}`,
18
+ "rounded-xl bg-white/80 overflow-hidden relative w-full",
19
+ ].join(" ");
20
+ return (_jsxs("div", { className: classNames, children: [header ? _jsx(Header, { ...header }) : null, _jsx("div", { className: "h-full", children: children })] }));
21
+ }
22
+ export function CanvasBoard({ children, options, }) {
23
+ const { height } = options ?? {};
24
+ const classNames = ["px-12"].join(" ");
25
+ return (_jsx(Board, { options: { height }, children: _jsx("div", { className: classNames, children: children }) }));
26
+ }
27
+ export function ListBoard({ children, header, options, }) {
28
+ const { title, colors, childrens } = header;
29
+ const { height } = options ?? {};
30
+ const classNames = [
31
+ "scrollbar pt-8 px-12 overflow-y-scroll h-full pb-32",
32
+ ].join(" ");
33
+ return (_jsx(Board, { header: { title, colors, childrens }, options: { height }, children: _jsx("div", { className: classNames, children: children }) }));
34
+ }
package/card/Card.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
- import "../style.css";
3
- export declare function Card<T extends string | number>({ children, header, options, }: {
4
- children: React.ReactNode;
5
- header?: {
6
- title: string;
7
- bgColor?: string;
8
- childrens?: React.ReactNode[];
9
- };
10
- options?: {
11
- height?: number;
12
- width?: T;
13
- };
14
- }): import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ import "../globals.css";
3
+ export declare function Card<T extends string | number>({ children, header, options, }: {
4
+ children: React.ReactNode;
5
+ header?: {
6
+ title: string;
7
+ bgColor?: string;
8
+ childrens?: React.ReactNode[];
9
+ };
10
+ options?: {
11
+ height?: number;
12
+ width?: T;
13
+ };
14
+ }): import("react/jsx-runtime").JSX.Element;
package/card/Card.js CHANGED
@@ -1,32 +1,19 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "../style.css";
14
- import { center, between } from "../util";
15
- function Header(_a) {
16
- var title = _a.title, bgColor = _a.bgColor, childrens = _a.childrens;
17
- var headerClassNames = [
18
- center.row + between.row,
19
- "".concat(bgColor || "bg-white-off"),
20
- "w-full h-12 px-12",
21
- ].join(" ");
22
- return (_jsxs("div", __assign({ className: headerClassNames }, { children: [_jsx("div", __assign({ className: "text-xl font-bold" }, { children: title })), _jsx("div", __assign({ className: "flex" }, { children: childrens === null || childrens === void 0 ? void 0 : childrens.map(function (children) { return children; }) }))] })));
23
- }
24
- export function Card(_a) {
25
- var children = _a.children, header = _a.header, options = _a.options;
26
- var _b = options !== null && options !== void 0 ? options : {}, height = _b.height, width = _b.width;
27
- var classNames = [
28
- "h-".concat(height !== null && height !== void 0 ? height : 48, " w-").concat(width !== null && width !== void 0 ? width : "full", " p-4 max-w-232 "),
29
- "rounded-xl bg-white/80 overflow-hidden relative box-shadow duration-500",
30
- ].join(" ");
31
- return (_jsxs("div", __assign({ className: classNames }, { children: [header ? _jsx(Header, __assign({}, header)) : null, _jsx("div", __assign({ className: "h-full" }, { children: children }))] })));
32
- }
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "../globals.css";
3
+ import { center, between } from "../util";
4
+ function Header({ title, bgColor, childrens, }) {
5
+ const headerClassNames = [
6
+ center.row + between.row,
7
+ `${bgColor || "bg-white-off"}`,
8
+ "w-full h-12 px-12",
9
+ ].join(" ");
10
+ return (_jsxs("div", { className: headerClassNames, children: [_jsx("div", { className: "text-xl font-bold", children: title }), _jsx("div", { className: "flex", children: childrens?.map((children) => children) })] }));
11
+ }
12
+ export function Card({ children, header, options, }) {
13
+ const { height, width } = options ?? {};
14
+ const classNames = [
15
+ `h-${height ?? 48} w-${width ?? "full"} p-4 max-w-232 `,
16
+ "rounded-xl bg-white/80 overflow-hidden relative box-shadow duration-500",
17
+ ].join(" ");
18
+ return (_jsxs("div", { className: classNames, children: [header ? _jsx(Header, { ...header }) : null, _jsx("div", { className: "h-full", children: children })] }));
19
+ }
@@ -1,14 +1,14 @@
1
- type Level = "PS" | "ST" | "BA" | "JR" | "HJ";
2
- export declare function ProfileCard<T extends string | number>({ info, gradeData, }: {
3
- info: {
4
- name: string;
5
- birthday: string;
6
- image?: string;
7
- };
8
- gradeData?: {
9
- level?: Level;
10
- score?: number;
11
- grade?: number;
12
- };
13
- }): import("react/jsx-runtime").JSX.Element;
14
- export {};
1
+ type Level = "PS" | "ST" | "BA" | "JR" | "HJ";
2
+ export declare function ProfileCard({ info, gradeData, }: {
3
+ info: {
4
+ name: string;
5
+ birthday: string;
6
+ image?: string;
7
+ };
8
+ gradeData?: {
9
+ level?: Level;
10
+ score?: number;
11
+ grade?: number;
12
+ };
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -1,20 +1,8 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { Card } from "./Card";
14
- import { colorsByLevel } from "../util";
15
- export function ProfileCard(_a) {
16
- var info = _a.info, gradeData = _a.gradeData;
17
- var name = info.name, birthday = info.birthday, image = info.image;
18
- var _b = gradeData !== null && gradeData !== void 0 ? gradeData : {}, level = _b.level, score = _b.score, grade = _b.grade;
19
- return (_jsx(Card, __assign({ options: { width: 84 } }, { children: _jsxs("div", __assign({ className: "flex" }, { children: [_jsx("img", { src: image, alt: "profile", className: "h-20 w-20 overflow-hidden rounded-full object-cover " }), _jsxs("div", __assign({ className: "ml-auto flex flex-col gap-4" }, { children: [_jsxs("div", __assign({ className: "flex w-52 items-end gap-2 border-b-2 border-blue-navy pb-2" }, { children: [_jsx("div", __assign({ className: "text-xl font-bold" }, { children: name })), _jsx("div", { children: birthday })] })), _jsxs("div", { children: [_jsx("div", { children: "\uD559\uC6D0\uC0DD" }), _jsx("div", { children: level ? colorsByLevel[level] : "" })] })] }))] })) })));
20
- }
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Card } from "./Card";
3
+ import { colorsByLevel } from "../util";
4
+ export function ProfileCard({ info, gradeData, }) {
5
+ const { name, birthday, image } = info;
6
+ const { level, score, grade } = gradeData ?? {};
7
+ return (_jsx(Card, { options: { width: 84 }, children: _jsxs("div", { className: "flex", children: [_jsx("img", { src: image, alt: "profile", className: "h-20 w-20 overflow-hidden rounded-full object-cover " }), _jsxs("div", { className: "ml-auto flex flex-col gap-4", children: [_jsxs("div", { className: "flex w-52 items-end gap-2 border-b-2 border-blue-navy pb-2", children: [_jsx("div", { className: "text-xl font-bold", children: name }), _jsx("div", { children: birthday })] }), _jsxs("div", { children: [_jsx("div", { children: "\uD559\uC6D0\uC0DD" }), _jsx("div", { children: level ? colorsByLevel[level] : "" })] })] })] }) }));
8
+ }
package/card/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./ProfileCard";
1
+ export * from "./ProfileCard";
package/card/index.js CHANGED
@@ -1 +1 @@
1
- export * from "./ProfileCard";
1
+ export * from "./ProfileCard";
package/deck/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- /// <reference types="react" />
2
- import "../style.css";
3
- export declare function Deck<T extends string | number>({ children, titles, options, }: {
4
- children: React.ReactNode;
5
- titles?: {
6
- title: string;
7
- subTitle?: string;
8
- gapTitle?: number;
9
- };
10
- options?: {
11
- direction?: "row" | "col" | "wrap";
12
- justify?: "start" | "end" | "center" | "between" | "around" | "evenly";
13
- width?: T;
14
- height?: number;
15
- gapX?: number;
16
- gapY?: number;
17
- };
18
- }): import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ import "../globals.css";
3
+ export declare function Deck<T extends string | number>({ children, titles, options, }: {
4
+ children: React.ReactNode;
5
+ titles?: {
6
+ title: string;
7
+ subTitle?: string;
8
+ gapTitle?: number;
9
+ };
10
+ options?: {
11
+ direction?: "row" | "col" | "wrap";
12
+ justify?: "start" | "end" | "center" | "between" | "around" | "evenly";
13
+ width?: T;
14
+ height?: number;
15
+ gapX?: number;
16
+ gapY?: number;
17
+ };
18
+ }): import("react/jsx-runtime").JSX.Element;
package/deck/index.js CHANGED
@@ -1,28 +1,16 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "../style.css";
14
- export function Deck(_a) {
15
- var children = _a.children, titles = _a.titles, options = _a.options;
16
- var _b = titles !== null && titles !== void 0 ? titles : {}, title = _b.title, subTitle = _b.subTitle, gapTitle = _b.gapTitle;
17
- var _c = options !== null && options !== void 0 ? options : {}, direction = _c.direction, height = _c.height, width = _c.width, gapX = _c.gapX, gapY = _c.gapY, justify = _c.justify;
18
- var classNames = [
19
- "flex flex-col",
20
- "h-".concat(height !== null && height !== void 0 ? height : "auto", " w-").concat(width !== null && width !== void 0 ? width : "full", " gap-").concat(gapTitle !== null && gapTitle !== void 0 ? gapTitle : 4, " "),
21
- ].join(" ");
22
- var bodyClassNames = [
23
- "flex-".concat(direction !== null && direction !== void 0 ? direction : "row", " justify-").concat(justify !== null && justify !== void 0 ? justify : "start"),
24
- "gap-x-".concat(gapX !== null && gapX !== void 0 ? gapX : 5, " gap-y-").concat(gapY !== null && gapY !== void 0 ? gapY : 5),
25
- "flex w-full duration-500",
26
- ].join(" ");
27
- return (_jsxs("div", __assign({ className: classNames }, { children: [_jsxs("div", __assign({ className: "pl-1" }, { children: [_jsx("div", __assign({ className: "text-2xl font-bold" }, { children: title })), _jsx("div", __assign({ className: "" }, { children: subTitle }))] })), _jsx("div", __assign({ className: bodyClassNames }, { children: children }))] })));
28
- }
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "../globals.css";
3
+ export function Deck({ children, titles, options, }) {
4
+ const { title, subTitle, gapTitle } = titles ?? {};
5
+ const { direction, height, width, gapX, gapY, justify } = options ?? {};
6
+ const classNames = [
7
+ "flex flex-col",
8
+ `h-${height ?? "auto"} w-${width ?? "full"} gap-${gapTitle ?? 4} `,
9
+ ].join(" ");
10
+ const bodyClassNames = [
11
+ `flex-${direction ?? "row"} justify-${justify ?? "start"}`,
12
+ `gap-x-${gapX ?? 5} gap-y-${gapY ?? 5}`,
13
+ "flex w-full duration-500",
14
+ ].join(" ");
15
+ return (_jsxs("div", { className: classNames, children: [_jsxs("div", { className: "pl-1", children: [_jsx("div", { className: "text-2xl font-bold", children: title }), _jsx("div", { className: "", children: subTitle })] }), _jsx("div", { className: bodyClassNames, children: children })] }));
16
+ }
@@ -1,41 +1,40 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @font-face {
6
- font-family: "Pretendard-Medium";
7
- src: url("../public/fonts/Pretendard-Medium.otf") format("opentype");
8
- }
9
-
10
- @font-face{
11
- font-family: "Kostar";
12
- src: url("../public/fonts/Kostar.ttf") format("truetype");
13
- }
14
-
15
- @font-face{
16
- font-family: "NicoMoji";
17
- src: url("../public/fonts/NicoMoji.ttf") format("truetype");
18
- }
19
-
20
- @font-face{
21
- font-family: "Megrim";
22
- src: url("../public/fonts/Megrim.ttf") format("trueType");
23
- }
24
-
25
- ::-webkit-scrollbar {
26
- width: 8px;
27
- }
28
-
29
- ::-webkit-scrollbar-track {
30
- background-color: transparent;
31
- }
32
- ::-webkit-scrollbar-thumb {
33
- background-color: #173a8b;
34
- opacity: 0.5;
35
- border-radius: 10px;
36
- }
37
-
38
-
39
- .box-shadow {
40
- box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
41
- }
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @font-face {
6
+ font-family: "Pretendard-Medium";
7
+ src: url("/fonts/Pretendard-Medium.otf") format("opentype");
8
+ }
9
+
10
+ @font-face {
11
+ font-family: "Kostar";
12
+ src: url("/fonts/Kostar.ttf") format("truetype");
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "NicoMoji";
17
+ src: url("/fonts/NicoMoji.ttf") format("truetype");
18
+ }
19
+
20
+ @font-face {
21
+ font-family: "Megrim";
22
+ src: url("/fonts/Megrim.ttf") format("trueType");
23
+ }
24
+
25
+ ::-webkit-scrollbar {
26
+ width: 8px;
27
+ }
28
+
29
+ ::-webkit-scrollbar-track {
30
+ background-color: transparent;
31
+ }
32
+ ::-webkit-scrollbar-thumb {
33
+ background-color: #173a8b;
34
+ opacity: 0.5;
35
+ border-radius: 10px;
36
+ }
37
+
38
+ .box-shadow {
39
+ box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.15);
40
+ }
package/header/index.d.ts CHANGED
@@ -1,5 +1 @@
1
- import "../style.css";
2
- export declare function DashboardHeader({ title, image }: {
3
- title: string;
4
- image?: [string, string];
5
- }): import("react/jsx-runtime").JSX.Element;
1
+ import "../globals.css";
package/header/index.js CHANGED
@@ -1,25 +1 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import "../style.css";
14
- import { useState } from "react";
15
- import { circle } from "../util";
16
- function Menu() {
17
- var classNames = ["absolute -left-24 z-40 h-80 w-48 border-2 bg-white "].join(" ");
18
- return (_jsxs("div", __assign({ className: classNames + " fade-in-100 animate-in" }, { children: [_jsx("div", { children: "\u314E\u3147" }), _jsx("div", { children: "\u314E\u3147" })] })));
19
- }
20
- export function DashboardHeader(_a) {
21
- var title = _a.title, image = _a.image;
22
- var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
23
- var _c = image !== null && image !== void 0 ? image : [], src = _c[0], href = _c[1];
24
- return (_jsxs("div", __assign({ className: "relative flex h-20 w-full items-center justify-between bg-white px-19 shadow-black/10 shadow-b-md" }, { children: [_jsxs("div", __assign({ className: "flex h-12 items-center gap-9" }, { children: [src && href ? (_jsx("a", __assign({ href: href }, { children: _jsx("img", { src: src, alt: "logo", className: "h-12" }) }))) : (_jsx("div", { children: "TOSEL Lab" })), _jsx("div", __assign({ className: "text-3xl font-bold" }, { children: title }))] })), _jsxs("div", __assign({ className: "relative" }, { children: [_jsx("button", __assign({ onClick: function () { return setIsOpen(!isOpen); }, className: circle(9) + "border-2" }, { children: "+" })), isOpen ? _jsx(Menu, {}) : null] }))] })));
25
- }
1
+ import "../globals.css";
@@ -0,0 +1,5 @@
1
+ import "../../globals.css";
2
+ export declare function Header({ title, image, }: {
3
+ title: string;
4
+ image?: [string, string];
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import "../../globals.css";
3
+ import { useState } from "react";
4
+ import { circle } from "../../util";
5
+ export function Header({ title, image, }) {
6
+ const [isOpen, setIsOpen] = useState(false);
7
+ const [src, href] = image ?? [];
8
+ return (_jsxs("div", { className: "relative flex h-20 w-full items-center justify-between bg-white px-19 shadow-black/10 shadow-b-md", children: [_jsxs("div", { className: "flex h-12 items-center gap-9", children: [src && href ? (_jsx("a", { href: href, children: _jsx("img", { src: src, alt: "logo", className: "h-12" }) })) : (_jsx("div", { children: "TOSEL Lab" })), _jsx("div", { className: "text-3xl font-bold", children: title })] }), _jsxs("div", { className: "relative", children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: circle(9) + "border-2", children: "+" }), isOpen ? _jsx(Menu, {}) : null] })] }));
9
+ }
10
+ function Menu() {
11
+ const classNames = [
12
+ "absolute -left-24 z-40 h-80 w-48 border-2 bg-white ",
13
+ ].join(" ");
14
+ return (_jsxs("div", { className: classNames + " fade-in-100 animate-in", children: [_jsx("div", { children: "\u314E\u3147" }), _jsx("div", { children: "\u314E\u3147" })] }));
15
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare function DashboardLayout({ navigations, children, }: {
3
+ navigations: React.ReactNode[];
4
+ children: React.ReactNode;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Fragment } from "react";
3
+ import { NavigationContainer } from "../../navigation";
4
+ import { gradient } from "../../util";
5
+ import { Header } from "./Header";
6
+ export function DashboardLayout({ navigations, children, }) {
7
+ return (_jsxs("div", { className: gradient.lab + "min-h-screen font-pretendard-medium", children: [_jsx(Header, { title: "dashboard", image: ["/images/tosel-blue-lab-spiral.png", "https://lab.tosel.co.kr"] }), _jsxs("div", { className: "flex gap-12 px-9 pt-16", children: [_jsx(NavigationContainer, { children: navigations.map((nav, index) => (_jsx(Fragment, { children: nav }, index))) }), children] })] }));
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./dashboard";
@@ -0,0 +1 @@
1
+ export * from "./dashboard";
package/modal/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import "../style.css";
3
- export declare function NoticeModal({ titles, children, buttons, close, }: {
4
- titles?: string[];
5
- children: React.ReactNode;
6
- buttons?: [string, () => unknown | (() => Promise<unknown>)][];
7
- close?: () => void;
8
- }): import("react/jsx-runtime").JSX.Element;
9
- export declare function AlertModal(): import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ import "../globals.css";
3
+ export declare function NoticeModal({ titles, children, buttons, close, }: {
4
+ titles?: string[];
5
+ children: React.ReactNode;
6
+ buttons?: [string, () => unknown | (() => Promise<unknown>)][];
7
+ close?: () => void;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export declare function AlertModal(): import("react/jsx-runtime").JSX.Element;