@edu-tosel/design 1.0.276 → 1.0.278

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
@@ -12,6 +12,7 @@ import Print from "./svg/Print";
12
12
  import User from "./svg/User";
13
13
  import Search from "./svg/Search";
14
14
  import MiniClose from "./svg/MiniClose";
15
+ import MiniCheck from "./svg/MiniCheck";
15
16
  declare const SVG: {
16
17
  TOSEL: typeof TOSEL;
17
18
  Close: typeof Close;
@@ -59,6 +60,9 @@ declare const SVG: {
59
60
  Login: {
60
61
  User: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
61
62
  ChekMark: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
63
+ Key: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
64
+ Lock: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
65
+ Refresh: ({ size }: import("./svg/Login").IconProps) => import("react/jsx-runtime").JSX.Element;
62
66
  };
63
67
  Collab: {
64
68
  Naver: ({ color, size }: import("./svg/Collab").IconProps) => import("react/jsx-runtime").JSX.Element;
@@ -68,5 +72,6 @@ declare const SVG: {
68
72
  User: typeof User;
69
73
  Search: typeof Search;
70
74
  MiniClose: typeof MiniClose;
75
+ MiniCheck: typeof MiniCheck;
71
76
  };
72
77
  export default SVG;
package/asset/SVG.js CHANGED
@@ -17,6 +17,7 @@ import Print from "./svg/Print";
17
17
  import User from "./svg/User";
18
18
  import Search from "./svg/Search";
19
19
  import MiniClose from "./svg/MiniClose";
20
+ import MiniCheck from "./svg/MiniCheck";
20
21
  const SVG = {
21
22
  TOSEL,
22
23
  Close,
@@ -37,5 +38,6 @@ const SVG = {
37
38
  User,
38
39
  Search,
39
40
  MiniClose,
41
+ MiniCheck,
40
42
  };
41
43
  export default SVG;
package/asset/SVG.tsx CHANGED
@@ -17,6 +17,7 @@ import Print from "./svg/Print";
17
17
  import User from "./svg/User";
18
18
  import Search from "./svg/Search";
19
19
  import MiniClose from "./svg/MiniClose";
20
+ import MiniCheck from "./svg/MiniCheck";
20
21
 
21
22
  const SVG = {
22
23
  TOSEL,
@@ -38,6 +39,7 @@ const SVG = {
38
39
  User,
39
40
  Search,
40
41
  MiniClose,
42
+ MiniCheck,
41
43
  };
42
44
 
43
45
  export default SVG;
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ export default function MiniCheck({ color: _color }: {
2
+ color?: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export default function MiniCheck({ color: _color }) {
3
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor", className: "size-4", children: _jsx("path", { "fill-rule": "evenodd", d: "M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z", "clip-rule": "evenodd" }) }));
4
+ }
@@ -0,0 +1,16 @@
1
+ export default function MiniCheck({ color: _color }: { color?: string }) {
2
+ return (
3
+ <svg
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ viewBox="0 0 16 16"
6
+ fill="currentColor"
7
+ className="size-4"
8
+ >
9
+ <path
10
+ fill-rule="evenodd"
11
+ d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z"
12
+ clip-rule="evenodd"
13
+ />
14
+ </svg>
15
+ );
16
+ }
@@ -2,13 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../../util";
3
3
  export default function Float({ contents }) {
4
4
  const container = {
5
- displays: "fixed flex flex-col bottom-16 right-16 z-40 overflow-visible",
5
+ displays: "fixed flex flex-col bottom-20 md:bottom-16 right-5 md:right-16 z-40 overflow-visible",
6
6
  spacings: "gap-5",
7
7
  };
8
8
  const buttonBox = (background) => ({
9
9
  displays: "flex flex-col justify-center items-center",
10
- spacings: "p-3",
11
- sizes: "w-16 h-16",
10
+ spacings: "p-1.5 md:p-3",
11
+ sizes: "w-12 h-12 md:w-16 md:h-16",
12
12
  styles: "rounded-full bg-black overflow-hidden",
13
13
  backgrounds: background ?? "bg-white",
14
14
  shadows: "shadow-main",
@@ -3,14 +3,14 @@ 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 = {
12
12
  display: "flex flex-row justify-between items-center",
13
- sizes: "h-15 w-full md:w-112.5",
13
+ sizes: "h-15 shrink-0 w-full md:w-112.5",
14
14
  spacings: "px-5 mb-5",
15
15
  backgorunds: "bg-gradient-to-r from-green-dark to-crimson-burgundy rounded-lg",
16
16
  };
@@ -1,6 +1,3 @@
1
1
  import { InputWidget } from "../../../interface";
2
- interface InputWithTitleProps extends InputWidget {
3
- title: string;
4
- }
5
- declare function WithTitle(props: InputWithTitleProps): import("react/jsx-runtime").JSX.Element;
2
+ declare function WithTitle(props: InputWidget): import("react/jsx-runtime").JSX.Element;
6
3
  export default WithTitle;
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.278",
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.278
@@ -19,9 +19,9 @@ export default function InputForm({ title, state, placeholder, isValid, type, on
19
19
  animation: value || onFocus ? "top-2.625 text-xs" : "top-4.375 text-base",
20
20
  };
21
21
  const styleByFlag = () => {
22
- const gray = "bg-gray-light border-green-dark";
22
+ const gray = "bg-gray-light/50 border-green-dark";
23
23
  const green = "bg-green-dark/10 text-green-dark border-green-dark";
24
- const red = "bg-crimson-burgundy/10 text-crimson-burgundy border-crimson-burgundy";
24
+ const red = "bg-red-50 text-red-400 border-red-500";
25
25
  if (typeof isValid === "undefined")
26
26
  return gray;
27
27
  if (typeof isValid === "function")