@edu-tosel/design 0.1.0 → 0.1.1

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/index.js CHANGED
@@ -40,6 +40,6 @@ export function ListBoard(_a) {
40
40
  var children = _a.children, header = _a.header, options = _a.options;
41
41
  var title = header.title, bgColor = header.bgColor, childrens = header.childrens;
42
42
  var height = (options !== null && options !== void 0 ? options : {}).height;
43
- var classNames = ["pt-8 px-12 overflow-y-scroll h-full pb-32"].join(" ");
43
+ var classNames = ["scrollbar pt-8 px-12 overflow-y-scroll h-full pb-32"].join(" ");
44
44
  return (_jsx(Board, __assign({ header: { title: title, bgColor: bgColor, childrens: childrens }, options: { height: height } }, { children: _jsx("div", __assign({ className: classNames }, { children: children })) })));
45
45
  }
package/modal/index.d.ts CHANGED
@@ -6,4 +6,4 @@ export declare function NoticeModal({ titles, children, buttons, close, }: {
6
6
  buttons?: [string, () => unknown | (() => Promise<unknown>)][];
7
7
  close?: () => void;
8
8
  }): import("react/jsx-runtime").JSX.Element;
9
- export declare function Alert(): import("react/jsx-runtime").JSX.Element;
9
+ export declare function AlertModal(): import("react/jsx-runtime").JSX.Element;
package/modal/index.js CHANGED
@@ -28,9 +28,9 @@ export function NoticeModal(_a) {
28
28
  var buttonClassNames = ["rounded-2xl bg-black px-8 py-2 text-lg font-bold text-white"].join(" ");
29
29
  return (_jsxs(Modal, { children: [_jsxs("div", __assign({ className: col(3) + "px-25 pt-18 h-full pb-12" }, { children: [_jsxs("div", __assign({ className: col(6) }, { children: [_jsx("div", __assign({ className: "text-3xl font-bold" }, { children: title })), _jsx("div", { className: "h-2 w-14 rounded-full bg-pale-lavender" }), _jsx("div", __assign({ className: "text-xl font-bold" }, { children: subTitle }))] })), _jsx("div", { children: children }), buttons ? (_jsx("div", __assign({ className: "mt-auto flex justify-end gap-4" }, { children: buttons.map(function (_a) {
30
30
  var text = _a[0], onClick = _a[1];
31
- return (_jsx("button", __assign({ className: buttonClassNames, onClick: onClick }, { children: text })));
31
+ return (_jsx("button", __assign({ className: buttonClassNames, onClick: onClick }, { children: text }), text));
32
32
  }) }))) : null] })), _jsx("button", { className: absolute.tl(5, 7) + "bg-black rounded-full h-9 w-9", onClick: close })] }));
33
33
  }
34
- export function Alert() {
34
+ export function AlertModal() {
35
35
  return (_jsx("div", { children: _jsx("div", {}) }));
36
36
  }
@@ -1 +1,2 @@
1
+ import "../style.css";
1
2
  export default function Navigation(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,49 @@
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
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ import "../style.css";
14
+ import { useState } from "react";
15
+ import { center } from "../asset/display";
16
+ var contents = [
17
+ {
18
+ title: "홈",
19
+ href: "/",
20
+ icon: "",
21
+ },
22
+ {
23
+ title: "접수",
24
+ href: "/receipt",
25
+ icon: "",
26
+ },
27
+ {
28
+ title: "성적확인",
29
+ href: "https://lab.tosel.co.kr",
30
+ icon: "",
31
+ },
32
+ ];
2
33
  export default function Navigation() {
3
- return (_jsx("div", { children: _jsx("div", {}) }));
34
+ var pathname = window.location.pathname;
35
+ var _a = useState(pathname), nowPath = _a[0], setNowPath = _a[1];
36
+ var bgColor = function (href) {
37
+ if (nowPath === href)
38
+ return "bg-white ";
39
+ return "bg-transparent ";
40
+ };
41
+ var buttonClassNames = [center.row(6), "w-50 h-11 rounded-2xl pl-5 h"].join(" ");
42
+ return (_jsx("div", __assign({ className: center.col() + "w-54" }, { children: contents.map(function (_a) {
43
+ var title = _a.title, href = _a.href;
44
+ return (_jsx("button", __assign({ onClick: function () {
45
+ setNowPath(href);
46
+ window.history.pushState({ data: href }, "", href);
47
+ }, className: bgColor(href) + buttonClassNames }, { children: title }), href));
48
+ }) })));
4
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
package/style.css CHANGED
@@ -2,6 +2,19 @@
2
2
  @tailwind components;
3
3
  @tailwind utilities;
4
4
 
5
+ ::-webkit-scrollbar {
6
+ width: 8px;
7
+ }
8
+
9
+ ::-webkit-scrollbar-track {
10
+ background-color: transparent;
11
+ }
12
+ ::-webkit-scrollbar-thumb {
13
+ background-color: #173a8b;
14
+ opacity: 0.5;
15
+ border-radius: 10px;
16
+ }
17
+
5
18
  .box-shadow {
6
19
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
7
- }
20
+ }
@@ -3,6 +3,9 @@ module.exports = {
3
3
  content: ["./node_modules/tw-elements/dist/js/**/*.js", "./src/**/*.{js,jsx,ts,tsx}"],
4
4
  theme: {
5
5
  extend: {
6
+ fontFamily: {
7
+ "pretendard-medium": ["pretendard-medium"],
8
+ },
6
9
  screens: {
7
10
  xxxs: "332px",
8
11
  xxs: "393px",
@@ -41,9 +44,44 @@ module.exports = {
41
44
  "hj-blue": "#385EAB",
42
45
  "hj-blue-light": "#A8BFE5",
43
46
  },
47
+ width: {
48
+ "2/3": "66.6666667%",
49
+ "1/7": "14.2857143%",
50
+ "2/7": "28.5714286%",
51
+ "3/7": "42.8571429%",
52
+ "4/7": "57.1428571%",
53
+ "1/8": "12.5%",
54
+ "3/10": "30%",
55
+ "1/10": "10%",
56
+ "4/10": "40%",
57
+ "6/10": "60%",
58
+ "7/10": "70%",
59
+ "9/10": "90%",
60
+ "12/100": "12%",
61
+ "15/100": "15%",
62
+ "35/100": "35%",
63
+ "45/100": "45%",
64
+ "55/100": "55%",
65
+ "65/100": "65%",
66
+ "85/100": "85%",
67
+ 176: "44rem",
68
+ 478: "478px",
69
+ },
70
+ height: {
71
+ "4/7": "57.1428571%",
72
+ "3/7": "42.8571429%",
73
+ "5/12": "41.6666667%",
74
+ "1/10": "10%",
75
+ "3/10": "30%",
76
+ "4/10": "40%",
77
+ "6/10": "60%",
78
+ "7/10": "70%",
79
+ "9/10": "90%",
80
+ },
44
81
  spacing: {
45
82
  1: "0.25rem",
46
83
  7: "1.75rem",
84
+ 11: "2.75rem",
47
85
  12: "3rem",
48
86
  15: "3.75rem",
49
87
  18: "4.5rem",
@@ -92,6 +130,9 @@ module.exports = {
92
130
  144: "36rem",
93
131
  148: "37rem",
94
132
  160: "40rem",
133
+ 164: "41rem",
134
+ 168: "42rem",
135
+ 172: "43rem",
95
136
  176: "44rem",
96
137
  180: "45rem",
97
138
  182: "45.5rem",
@@ -107,6 +148,44 @@ module.exports = {
107
148
  260: "65rem",
108
149
  272: "68rem",
109
150
  280: "70rem",
151
+ 288: "72rem",
152
+ 300: "75rem",
153
+ 312: "78rem",
154
+ 320: "80rem",
155
+ 360: "90rem",
156
+ 386: "96.5rem",
157
+ 480: "120rem",
158
+ 520: "140rem",
159
+ },
160
+ backgroundSize: {
161
+ auto: "auto",
162
+ cover: "cover",
163
+ contain: "contain",
164
+ 16: "4rem",
165
+ 64: "16rem",
166
+ 80: "20rem",
167
+ 88: "22rem",
168
+ 92: "23rem",
169
+ 96: "24rem",
170
+ 100: "25rem",
171
+ 128: "32rem",
172
+ },
173
+ scale: {
174
+ 101: "1.01",
175
+ 200: "2",
176
+ },
177
+ skew: {
178
+ 20: "20deg",
179
+ 30: "30deg",
180
+ 39: "39deg",
181
+ 45: "45deg",
182
+ 60: "60deg",
183
+ },
184
+ brightness: {
185
+ 10: ".1",
186
+ 20: ".2",
187
+ 30: ".3",
188
+ 40: ".4",
110
189
  },
111
190
  },
112
191
  },
package/text/index.js CHANGED
@@ -14,5 +14,5 @@ import "../style.css";
14
14
  import { col } from "../asset/display";
15
15
  export function LineBreaks(_a) {
16
16
  var texts = _a.texts, gap = _a.gap;
17
- return (_jsx("div", __assign({ className: col(gap) }, { children: texts.map(function (text) { return (_jsx("div", { children: text })); }) })));
17
+ return (_jsx("div", __assign({ className: col(gap) }, { children: texts.map(function (text, index) { return (_jsx("div", { children: text }, index)); }) })));
18
18
  }
package/version.txt CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1