@edu-tosel/design 1.0.276 → 1.0.277

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/asset/SVG.d.ts CHANGED
@@ -59,6 +59,9 @@ declare const SVG: {
59
59
  Login: {
60
60
  User: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
61
61
  ChekMark: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
62
+ Key: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
63
+ Lock: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
64
+ Refresh: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
62
65
  };
63
66
  Collab: {
64
67
  Naver: ({ color, size }: import("./svg/Collab").IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,7 +5,13 @@ export interface IconProps {
5
5
  declare const Login: {
6
6
  User: typeof User;
7
7
  ChekMark: typeof ChekMark;
8
+ Key: typeof Key;
9
+ Lock: typeof Lock;
10
+ Refresh: typeof Refresh;
8
11
  };
9
12
  export default Login;
10
13
  declare function User({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
11
14
  declare function ChekMark({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function Key({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
16
+ declare function Lock({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function Refresh({ size }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  const Login = {
3
3
  User,
4
4
  ChekMark,
5
+ Key,
6
+ Lock,
7
+ Refresh,
5
8
  };
6
9
  export default Login;
7
10
  function User({ size = "md" }) {
@@ -10,3 +13,12 @@ function User({ size = "md" }) {
10
13
  function ChekMark({ size = "md" }) {
11
14
  return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" }) }));
12
15
  }
16
+ function Key({ size = "md" }) {
17
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z" }) }));
18
+ }
19
+ function Lock({ size = "md" }) {
20
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z" }) }));
21
+ }
22
+ function Refresh({ size = "md" }) {
23
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", width: size === "lg" ? 36 : 24, height: size === "lg" ? 36 : 24, children: _jsx("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" }) }));
24
+ }
@@ -8,6 +8,9 @@ export interface IconProps {
8
8
  const Login = {
9
9
  User,
10
10
  ChekMark,
11
+ Key,
12
+ Lock,
13
+ Refresh,
11
14
  };
12
15
 
13
16
  export default Login;
@@ -51,3 +54,63 @@ function ChekMark({ size = "md" }: IconProps) {
51
54
  </svg>
52
55
  );
53
56
  }
57
+
58
+ function Key({ size = "md" }: IconProps) {
59
+ return (
60
+ <svg
61
+ xmlns="http://www.w3.org/2000/svg"
62
+ fill="none"
63
+ viewBox="0 0 24 24"
64
+ stroke-width="1.5"
65
+ stroke="currentColor"
66
+ width={size === "lg" ? 36 : 24}
67
+ height={size === "lg" ? 36 : 24}
68
+ >
69
+ <path
70
+ stroke-linecap="round"
71
+ stroke-linejoin="round"
72
+ d="M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"
73
+ />
74
+ </svg>
75
+ );
76
+ }
77
+
78
+ function Lock({ size = "md" }: IconProps) {
79
+ return (
80
+ <svg
81
+ xmlns="http://www.w3.org/2000/svg"
82
+ fill="none"
83
+ viewBox="0 0 24 24"
84
+ stroke-width="1.5"
85
+ stroke="currentColor"
86
+ width={size === "lg" ? 36 : 24}
87
+ height={size === "lg" ? 36 : 24}
88
+ >
89
+ <path
90
+ stroke-linecap="round"
91
+ stroke-linejoin="round"
92
+ d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"
93
+ />
94
+ </svg>
95
+ );
96
+ }
97
+
98
+ function Refresh({ size = "md" }: IconProps) {
99
+ return (
100
+ <svg
101
+ xmlns="http://www.w3.org/2000/svg"
102
+ fill="none"
103
+ viewBox="0 0 24 24"
104
+ stroke-width="1.5"
105
+ stroke="currentColor"
106
+ width={size === "lg" ? 36 : 24}
107
+ height={size === "lg" ? 36 : 24}
108
+ >
109
+ <path
110
+ stroke-linecap="round"
111
+ stroke-linejoin="round"
112
+ d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
113
+ />
114
+ </svg>
115
+ );
116
+ }
@@ -3,9 +3,9 @@ import { cn } from "../../../util";
3
3
  export default function Layout({ children, steps, script, title, }) {
4
4
  const container = {
5
5
  positions: "relative",
6
- sizes: "w-full min-h-screen overflow-hidden",
7
- displays: "flex flex-col items-center justify-center",
8
- spacings: "px-3 xs:px-5",
6
+ sizes: "w-full min-h-screen h-screen md:h-fit overflow-hidden",
7
+ displays: "flex flex-col items-center md:justify-center",
8
+ spacings: "px-3 xs:px-5 py-3 xs:py-5 md:py-0",
9
9
  other: "bg-gray-50",
10
10
  };
11
11
  const headerBox = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edu-tosel/design",
3
- "version": "1.0.276",
3
+ "version": "1.0.277",
4
4
  "description": "UI components for International TOSEL Committee",
5
5
  "keywords": [
6
6
  "jsx",
@@ -1 +1 @@
1
- export default function formatDateToString(date: Date): string;
1
+ export default function formatDateToString(date: Date, formatType?: "dash" | "dot" | "koreanYYMM"): string;
@@ -1,6 +1,13 @@
1
- export default function formatDateToString(date) {
2
- const year = date.getFullYear();
3
- const month = (date.getMonth() + 1).toString().padStart(2, "0"); // 월은 0부터 시작하므로 +1
4
- const day = date.getDate().toString().padStart(2, "0"); // 날짜를 두 자리로 맞춤
5
- return `${year}-${month}-${day}`;
1
+ export default function formatDateToString(date, formatType) {
2
+ const fullYear = date.getFullYear();
3
+ const shortYear = fullYear % 100; // 자리 연도
4
+ const month = (date.getMonth() + 1).toString().padStart(2, "0");
5
+ const day = date.getDate().toString().padStart(2, "0");
6
+ if (formatType === "dot") {
7
+ return `${shortYear}.${month}.${day}`; // YY.MM.DD 형식
8
+ }
9
+ if (formatType === "koreanYYMM") {
10
+ return `${shortYear}년 ${month}월`; // YY년 MM월 형식
11
+ }
12
+ return `${fullYear}-${month}-${day}`; // 기본: YYYY-MM-DD
6
13
  }
@@ -207,32 +207,40 @@ function createSearch({ record, } = {}) {
207
207
  const lowerQuery = query.toLowerCase();
208
208
  const isHangulQuery = isHangul(query);
209
209
  const queryChoseong = isHangulQuery ? getChoseong(query) : "";
210
- // **정확한 일치 (Exact Match)**
211
- const entireMatch = entries
212
- .filter(([_, value]) => {
213
- const normalizedValue = value.toLowerCase();
214
- return (normalizedValue === lowerQuery ||
215
- new RegExp(`\\b${lowerQuery}`).test(normalizedValue));
216
- })
217
- .map(([key, value]) => [
218
- key,
219
- record[key]?.[0] ?? value, // 첫 번째 키워드가 없을 경우 value를 기본값으로 사용
220
- value,
221
- ]);
222
- // **초성 매칭 (Choseong Match)**
223
- const choseongMatch = isHangulQuery
224
- ? choseongEntries
225
- .map((value, index) => ({ index, value }))
226
- .filter(({ value: [_, value] }) => value.includes(queryChoseong))
227
- .map(({ index }) => {
228
- const key = entries[index][0];
229
- return [
230
- key,
231
- record[key]?.[0] ?? entries[index][1], // 첫 번째 키워드가 없을 경우 대체
232
- entries[index][1],
233
- ];
210
+ const isChoseong = getConstantVowel(lowerQuery[0] ?? "");
211
+ // console.log(`${lowerQuery[0]}: ${isChoseong}`);
212
+ let entireMatch = [];
213
+ if (!isChoseong) {
214
+ // **정확한 일치 (Exact Match)**
215
+ entireMatch = entries
216
+ .filter(([_, value]) => {
217
+ const normalizedValue = value.toLowerCase();
218
+ return (normalizedValue === lowerQuery || value.includes(lowerQuery) ||
219
+ new RegExp(`\\b${lowerQuery}`).test(normalizedValue));
234
220
  })
235
- : [];
221
+ .map(([key, value]) => [
222
+ key,
223
+ record[key]?.[0] ?? value, // 첫 번째 키워드가 없을 경우 value를 기본값으로 사용
224
+ value,
225
+ ]);
226
+ }
227
+ let choseongMatch = [];
228
+ if (isChoseong) {
229
+ // **초성 매칭 (Choseong Match)**
230
+ choseongMatch = isHangulQuery
231
+ ? choseongEntries
232
+ .map((value, index) => ({ index, value }))
233
+ .filter(({ value: [_, value] }) => value.includes(queryChoseong))
234
+ .map(({ index }) => {
235
+ const key = entries[index][0];
236
+ return [
237
+ key,
238
+ record[key]?.[0] ?? entries[index][1], // 첫 번째 키워드가 없을 경우 대체
239
+ entries[index][1],
240
+ ];
241
+ })
242
+ : [];
243
+ }
236
244
  // **중복 제거 (EntireMatch에 포함된 키 제거)**
237
245
  const entireMatchKeys = new Set(entireMatch.map(([key]) => key));
238
246
  const filteredChoseongMatch = choseongMatch.filter(([key]) => !entireMatchKeys.has(key));
@@ -253,5 +261,14 @@ function createSearch({ record, } = {}) {
253
261
  };
254
262
  return { search };
255
263
  }
264
+ const getConstantVowel = (kor) => {
265
+ const ga = 44032;
266
+ let uni = kor.charCodeAt(0);
267
+ uni = uni - ga;
268
+ let fn = Math.floor(uni / 588);
269
+ // let sn = Math.floor((uni - (fn * 588)) / 28);
270
+ // let tn = uni % 28;
271
+ return fn < 0;
272
+ };
256
273
  const { search } = createSearch();
257
274
  export default search;
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.276
1
+ 1.0.277