@edu-tosel/design 1.0.266 → 1.0.267

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 (163) hide show
  1. package/asset/SVG.d.ts +4 -0
  2. package/asset/SVG.js +4 -0
  3. package/asset/SVG.tsx +4 -0
  4. package/asset/svg/MiniClose.d.ts +4 -0
  5. package/asset/svg/MiniClose.js +4 -0
  6. package/asset/svg/MiniClose.tsx +19 -0
  7. package/asset/svg/Search.d.ts +1 -0
  8. package/asset/svg/Search.js +4 -0
  9. package/asset/svg/Search.tsx +24 -0
  10. package/board/design/Header.design.d.ts +1 -1
  11. package/board/design/Header.design.js +12 -3
  12. package/globals.css +7 -2
  13. package/interface/Board.d.ts +11 -1
  14. package/layout/design/Shelf.design.js +2 -2
  15. package/layout/index.d.ts +0 -9
  16. package/layout/index.js +0 -9
  17. package/layout/template/home/Promotion.js +1 -0
  18. package/layout/template/home/Service.js +1 -0
  19. package/layout/template/home/layout/Carousel.js +27 -8
  20. package/layout/template/home/layout/Navigation.js +86 -12
  21. package/package.json +2 -2
  22. package/util/createSearch.d.ts +4 -7
  23. package/util/createSearch.js +208 -24
  24. package/util/index.d.ts +1 -1
  25. package/util/index.js +1 -1
  26. package/version.txt +1 -1
  27. package/widget/template/Input/index.js +8 -0
  28. package/layout/template/About/SectionA.d.ts +0 -1
  29. package/layout/template/About/SectionA.js +0 -51
  30. package/layout/template/About/SectionB.d.ts +0 -2
  31. package/layout/template/About/SectionB.js +0 -55
  32. package/layout/template/About/SectionC.d.ts +0 -1
  33. package/layout/template/About/SectionC.js +0 -35
  34. package/layout/template/About/SectionCCards.d.ts +0 -13
  35. package/layout/template/About/SectionCCards.js +0 -13
  36. package/layout/template/About/SectionCD.d.ts +0 -1
  37. package/layout/template/About/SectionCD.js +0 -15
  38. package/layout/template/About/SectionCLeaf.d.ts +0 -15
  39. package/layout/template/About/SectionCLeaf.js +0 -104
  40. package/layout/template/About/SectionD.d.ts +0 -1
  41. package/layout/template/About/SectionD.js +0 -131
  42. package/layout/template/About/SectionE.d.ts +0 -1
  43. package/layout/template/About/SectionE.js +0 -7
  44. package/layout/template/About/SectionECards.d.ts +0 -1
  45. package/layout/template/About/SectionECards.js +0 -79
  46. package/layout/template/About/SectionF.d.ts +0 -1
  47. package/layout/template/About/SectionF.js +0 -4
  48. package/layout/template/About/SectionG.d.ts +0 -10
  49. package/layout/template/About/SectionG.js +0 -27
  50. package/layout/template/About/index.d.ts +0 -19
  51. package/layout/template/About/index.js +0 -19
  52. package/layout/template/Books/Books.layout.d.ts +0 -1
  53. package/layout/template/Books/Books.layout.js +0 -13
  54. package/layout/template/Books/SectionA.d.ts +0 -2
  55. package/layout/template/Books/SectionA.js +0 -430
  56. package/layout/template/Books/index.d.ts +0 -5
  57. package/layout/template/Books/index.js +0 -5
  58. package/layout/template/MonthlyProgressReport/Layout.d.ts +0 -4
  59. package/layout/template/MonthlyProgressReport/Layout.js +0 -52
  60. package/layout/template/MonthlyProgressReport/Report.d.ts +0 -46
  61. package/layout/template/MonthlyProgressReport/Report.js +0 -124
  62. package/layout/template/MonthlyProgressReport/index.d.ts +0 -8
  63. package/layout/template/MonthlyProgressReport/index.js +0 -7
  64. package/layout/template/Olympiad/Banner.d.ts +0 -1
  65. package/layout/template/Olympiad/Banner.js +0 -31
  66. package/layout/template/Olympiad/Conditions.d.ts +0 -1
  67. package/layout/template/Olympiad/Conditions.js +0 -168
  68. package/layout/template/Olympiad/Features.d.ts +0 -1
  69. package/layout/template/Olympiad/Features.js +0 -44
  70. package/layout/template/Olympiad/Olympiad.layout.d.ts +0 -1
  71. package/layout/template/Olympiad/Olympiad.layout.js +0 -19
  72. package/layout/template/Olympiad/Prizes.d.ts +0 -1
  73. package/layout/template/Olympiad/Prizes.js +0 -49
  74. package/layout/template/Olympiad/Sponsors.d.ts +0 -1
  75. package/layout/template/Olympiad/Sponsors.js +0 -31
  76. package/layout/template/Olympiad/Videoset.d.ts +0 -1
  77. package/layout/template/Olympiad/Videoset.js +0 -71
  78. package/layout/template/Olympiad/index.d.ts +0 -15
  79. package/layout/template/Olympiad/index.js +0 -15
  80. package/layout/template/Regexam/Banner.d.ts +0 -1
  81. package/layout/template/Regexam/Banner.js +0 -183
  82. package/layout/template/Regexam/Evaluation.d.ts +0 -3
  83. package/layout/template/Regexam/Evaluation.js +0 -132
  84. package/layout/template/Regexam/OfflineExam.d.ts +0 -4
  85. package/layout/template/Regexam/OfflineExam.js +0 -204
  86. package/layout/template/Regexam/Regexam.layout.d.ts +0 -1
  87. package/layout/template/Regexam/Regexam.layout.js +0 -13
  88. package/layout/template/Regexam/Types.d.ts +0 -1
  89. package/layout/template/Regexam/Types.js +0 -294
  90. package/layout/template/Regexam/index.d.ts +0 -11
  91. package/layout/template/Regexam/index.js +0 -11
  92. package/layout/template/Transcript/Layout.d.ts +0 -6
  93. package/layout/template/Transcript/Layout.js +0 -52
  94. package/layout/template/Transcript/design/Transcript.d.ts +0 -228
  95. package/layout/template/Transcript/design/Transcript.design.d.ts +0 -13
  96. package/layout/template/Transcript/design/Transcript.design.js +0 -58
  97. package/layout/template/Transcript/design/Transcript.js +0 -181
  98. package/layout/template/Transcript/design/TranscriptAdvanced.design.d.ts +0 -5
  99. package/layout/template/Transcript/design/TranscriptAdvanced.design.js +0 -55
  100. package/layout/template/Transcript/design/atom/CardTitle.d.ts +0 -5
  101. package/layout/template/Transcript/design/atom/CardTitle.js +0 -13
  102. package/layout/template/Transcript/design/atom/CardTitleDivided.d.ts +0 -0
  103. package/layout/template/Transcript/design/atom/CardTitleDivided.js +0 -1
  104. package/layout/template/Transcript/design/atom/GetPartDescriptionFromLevel.d.ts +0 -3
  105. package/layout/template/Transcript/design/atom/GetPartDescriptionFromLevel.js +0 -4
  106. package/layout/template/Transcript/design/atom/GetPartTitleFromLevel.d.ts +0 -3
  107. package/layout/template/Transcript/design/atom/GetPartTitleFromLevel.js +0 -4
  108. package/layout/template/Transcript/design/atom/GetStyleFromLevel.d.ts +0 -2
  109. package/layout/template/Transcript/design/atom/GetStyleFromLevel.js +0 -4
  110. package/layout/template/Transcript/design/atom/LevelToPartDescriptionMap.d.ts +0 -6
  111. package/layout/template/Transcript/design/atom/LevelToPartDescriptionMap.js +0 -95
  112. package/layout/template/Transcript/design/atom/LevelToPartTitleMap.d.ts +0 -6
  113. package/layout/template/Transcript/design/atom/LevelToPartTitleMap.js +0 -95
  114. package/layout/template/Transcript/design/atom/LevelToStyleMap.d.ts +0 -6
  115. package/layout/template/Transcript/design/atom/LevelToStyleMap.js +0 -42
  116. package/layout/template/Transcript/design/atom/PrintBoxStyles.d.ts +0 -4
  117. package/layout/template/Transcript/design/atom/PrintBoxStyles.js +0 -4
  118. package/layout/template/Transcript/design/molecule/BarGraph.d.ts +0 -11
  119. package/layout/template/Transcript/design/molecule/BarGraph.js +0 -81
  120. package/layout/template/Transcript/design/molecule/BarGraphDuo.d.ts +0 -10
  121. package/layout/template/Transcript/design/molecule/BarGraphDuo.js +0 -6
  122. package/layout/template/Transcript/design/molecule/BarGraphMulti.d.ts +0 -11
  123. package/layout/template/Transcript/design/molecule/BarGraphMulti.js +0 -9
  124. package/layout/template/Transcript/design/molecule/CircularGauge.d.ts +0 -10
  125. package/layout/template/Transcript/design/molecule/CircularGauge.js +0 -68
  126. package/layout/template/Transcript/design/molecule/LSWRChart.d.ts +0 -11
  127. package/layout/template/Transcript/design/molecule/LSWRChart.js +0 -44
  128. package/layout/template/Transcript/design/molecule/LevelIndex.d.ts +0 -3
  129. package/layout/template/Transcript/design/molecule/LevelIndex.js +0 -14
  130. package/layout/template/Transcript/design/molecule/MIChart.d.ts +0 -1
  131. package/layout/template/Transcript/design/molecule/MIChart.js +0 -51
  132. package/layout/template/Transcript/design/molecule/OCIChart.d.ts +0 -1
  133. package/layout/template/Transcript/design/molecule/OCIChart.js +0 -60
  134. package/layout/template/Transcript/design/molecule/RadarGraph.d.ts +0 -10
  135. package/layout/template/Transcript/design/molecule/RadarGraph.js +0 -5
  136. package/layout/template/Transcript/design/organism/BarCardCol.d.ts +0 -8
  137. package/layout/template/Transcript/design/organism/BarCardCol.js +0 -30
  138. package/layout/template/Transcript/design/organism/BarCardRow.d.ts +0 -8
  139. package/layout/template/Transcript/design/organism/BarCardRow.js +0 -30
  140. package/layout/template/Transcript/design/organism/HonorCard.d.ts +0 -4
  141. package/layout/template/Transcript/design/organism/HonorCard.js +0 -16
  142. package/layout/template/Transcript/design/organism/IdCard.d.ts +0 -8
  143. package/layout/template/Transcript/design/organism/IdCard.js +0 -64
  144. package/layout/template/Transcript/design/organism/IntelligenceCard.d.ts +0 -12
  145. package/layout/template/Transcript/design/organism/IntelligenceCard.js +0 -39
  146. package/layout/template/Transcript/design/organism/NationalPositionCard.d.ts +0 -4
  147. package/layout/template/Transcript/design/organism/NationalPositionCard.js +0 -14
  148. package/layout/template/Transcript/design/organism/OCICard.d.ts +0 -4
  149. package/layout/template/Transcript/design/organism/OCICard.js +0 -17
  150. package/layout/template/Transcript/design/organism/PerformanceCard.d.ts +0 -5
  151. package/layout/template/Transcript/design/organism/PerformanceCard.js +0 -25
  152. package/layout/template/Transcript/design/organism/RadarCard.d.ts +0 -7
  153. package/layout/template/Transcript/design/organism/RadarCard.js +0 -54
  154. package/layout/template/Transcript/design/organism/ResultGaugeCard.d.ts +0 -7
  155. package/layout/template/Transcript/design/organism/ResultGaugeCard.js +0 -19
  156. package/layout/template/Transcript/design/organism/ScoreCard.d.ts +0 -4
  157. package/layout/template/Transcript/design/organism/ScoreCard.js +0 -11
  158. package/layout/template/Transcript/design/organism/SectionRadarCard.d.ts +0 -8
  159. package/layout/template/Transcript/design/organism/SectionRadarCard.js +0 -42
  160. package/layout/template/Transcript/index.d.ts +0 -11
  161. package/layout/template/Transcript/index.js +0 -9
  162. package/layout/template/Transcript/interface.d.ts +0 -50
  163. package/layout/template/Transcript/interface.js +0 -1
@@ -1,31 +1,166 @@
1
1
  import { getChoseong } from "es-hangul";
2
- const record = {
3
- "/": ["새로운 소식", "공지사항", "서비스"],
4
- "/about": ["리더십", "위원장", "총재", "언론", "학회"],
5
- "/exams": [
6
- "시험 종류",
7
- "Cocoon",
2
+ const defaultRecord = {
3
+ //소개 페이지
4
+ "/about": ["About TOSEL", "About", "토셀소개"],
5
+ "/about#leadership": [
6
+ "리더십",
7
+ "임원",
8
+ "위원장",
9
+ "총재",
10
+ "출제위원장",
11
+ "이기수",
12
+ "김임득",
13
+ "leadership",
14
+ "board",
15
+ ],
16
+ "/about#mission": ["Our Mission", "비전", "목표", "미션", "철학", "가치관"],
17
+ "/about#history": ["연혁", "역사", "history", "설립연도"],
18
+ "/about#area": ["분야", "사업분야", "비즈니스", "bussiness"],
19
+ "/about#partner": [
20
+ "협업",
21
+ "파트너",
22
+ "인증",
23
+ "고려대학교",
24
+ "학회인증",
25
+ "partner",
26
+ "이용기관",
27
+ ],
28
+ "/about#media": ["보도자료", "미디어", "media", "뉴스", "언론 속의 토셀"],
29
+ //시험소개
30
+ "/exams": ["시험소개", "레벨", "TOSEL"],
31
+ "/exams#evaluation": [
32
+ "평가방식",
33
+ "연령별 인지단계",
34
+ "평가 기준",
35
+ "CALP",
36
+ "BICS",
37
+ "언어능력 평가",
38
+ "PBT",
39
+ "레벨",
40
+ "Level",
41
+ ],
42
+ "/exams#offlineExam": [
43
+ "정기시험 안내",
44
+ "시험 구성",
45
+ "연간 일정",
46
+ "당일 일정",
8
47
  "Pre-Starter",
9
48
  "Starter",
10
49
  "Basic",
11
50
  "Junior",
12
51
  "High Junior",
13
- "고사장 정기시험",
52
+ "PS",
53
+ "ST",
54
+ "BA",
55
+ "JR",
56
+ "HJ",
57
+ "프리스타터",
58
+ "스타터",
59
+ "베이직",
60
+ "주니어",
61
+ "하이주니어",
62
+ ],
63
+ "/exams#types": [
64
+ "시험 종류",
65
+ "고사장시험",
14
66
  "가정시험",
15
- "토셀 랩 특별시험",
67
+ "학원정기",
68
+ "특별기관시험",
69
+ "기관시험",
70
+ "랩 특별시험",
71
+ ],
72
+ //게시판
73
+ "/events": ["이벤트", "새로운 소식"],
74
+ "/books": ["교재", "교재안내"],
75
+ //토셀 북스
76
+ "https://smartstore.naver.com/tosel": [
77
+ "토셀북스",
78
+ "책 구매",
79
+ "TOSEL Books",
80
+ "북스토어",
81
+ "교재구입",
82
+ "교재몰",
83
+ "쇼핑",
84
+ "스마트스토어",
85
+ "네이버스토어",
86
+ "구매하기",
87
+ "문제집",
16
88
  ],
17
- "/books": ["교재", "교재몰"],
18
- "https://labentry.tosel.co.kr/": ["토셀 랩", "토셀 랩 심사신청"],
89
+ //토셀북스-시험대비교재
90
+ "https://smartstore.naver.com/tosel/category/3345d808450940f3a81077bb29b95e55?cp=1": ["시험대비교재"],
91
+ "https://smartstore.naver.com/tosel/category/00590516c9ea4041b17bcea6527850ed?cp=1": ["유형분석집"],
92
+ "https://smartstore.naver.com/tosel/category/263ed55441ee47fc994b7e2e7d77c37f?cp=1": ["예상문제집"],
93
+ "https://smartstore.naver.com/tosel/category/50ea23099a1344d99b0902bfb65305aa?cp=1": ["실전문제집"],
94
+ "https://smartstore.naver.com/tosel/category/f3c92dd261b7497aace96620f760aacd?cp=1": ["심화문제집"],
95
+ "https://smartstore.naver.com/tosel/category/20990897bf944d82861c8a4600b56d82?cp=1": ["기출", "기출연습", "기출세트"],
96
+ //토셀북스-학습교재
97
+ "https://smartstore.naver.com/tosel/category/6099b9ce3fec4f2a8111cb5a2fa153c2?cp=1": ["학습교재", "개념학습"],
98
+ "https://smartstore.naver.com/tosel/category/bde68e05417e4db99a86ebbd4aa3e925?cp=1": ["Reading Series", "리딩", "읽기"],
99
+ "https://smartstore.naver.com/tosel/category/2f11488810464cb5bbe77b004965f4ae?cp=1": ["Listening Series", "리스닝", "듣기"],
100
+ "https://smartstore.naver.com/tosel/category/28dc52dc67a3443ea010812d40accb69?cp=1": ["Speaking Series", "스피킹", "말하기"],
101
+ "https://smartstore.naver.com/tosel/category/78551dca50de4636bc212c46543d4137?cp=1": ["VOCA Series", "보카", "영단어", "단어학습"],
102
+ "https://smartstore.naver.com/tosel/category/c88067049a904b8e8d78ada305b2779b?cp=1": ["Grammar Series", "그래머", "영문법", "문법"],
103
+ "https://smartstore.naver.com/tosel/category/cd8df3ab036942f7a3ea6e14a7ab3a9a?cp=1": ["Story Series", "스토리", "읽기"],
104
+ //토셀북스-레벨별교재
105
+ "https://smartstore.naver.com/tosel/category/637c92ebd5af435b98c89926ebdcf4d5?cp=1": ["Cocoon 교재", "Cocoon", "코쿤"],
106
+ "https://smartstore.naver.com/tosel/category/b0fc9b0937854a8baffb9a2bd8c35d0f?cp=1": ["Pre-Starter 교재", "Pre-Starter", "프리스타터", "PS", "초등"],
107
+ "https://smartstore.naver.com/tosel/category/3db386ace57846d2a52bb95b21b47954?cp=1": ["Starter 교재", "Starter", "스타터", "ST", "초등"],
108
+ "https://smartstore.naver.com/tosel/category/cd2d05f9b3014ead8b6da998eff17c9b?cp=1": ["Basic 교재", "Basic", "베이직", "BA", "초등"],
109
+ "https://smartstore.naver.com/tosel/category/52cdb446f4ae45c7a865401f14d3cd6b?cp=1": ["Junior 교재", "Junior", "주니어", "JR", "중등"],
110
+ "https://smartstore.naver.com/tosel/category/abb1a40e47754d8ebd229daa3d7a0fe9?cp=1": ["High Junior 교재", "하이주니어", "HJ", "고등"],
111
+ "https://smartstore.naver.com/tosel/category/216102719f724819a9d55f40ab032be5?cp=1": ["Advanced 교재", "어드밴스트", "성인"],
112
+ //토셀북스-굿즈
113
+ "https://smartstore.naver.com/tosel/category/19e0ceb5c1d84b09a3b4b8110edb1803?cp=1": ["굿즈", "책받침", "볼펜", "다이어리", "캘린더", "오답노트", "단어장"],
114
+ // 올림피아드 랜딩페이지
115
+ "/olympiad": ["올림피아드", "보카", "VOCA", "단어"],
116
+ "/olympiad#features": [
117
+ "올림피아드 특징",
118
+ "특징",
119
+ "올림피아드",
120
+ "보카",
121
+ "VOCA",
122
+ ],
123
+ // 토셀랩 랜딩페이지
124
+ "https://labentry.tosel.co.kr/": ["토셀 랩", "토셀 랩 심사신청", "Lab", "랩"],
19
125
  "/dashboard/academy/students": [
20
- "학생",
21
126
  "학생 관리",
22
127
  "학생 추가",
23
- "원생 관리",
128
+ "원생관리",
24
129
  "원생 삭제",
25
130
  "원생 아이디",
26
131
  ],
132
+ // 고객센터
133
+ "https://connect.tosel.co.kr/": [
134
+ "고객센터",
135
+ "CS",
136
+ "홈",
137
+ "Customer",
138
+ "문의하기",
139
+ ],
140
+ "https://connect.tosel.co.kr/agencies": [
141
+ "지역본부 정보",
142
+ "본부장",
143
+ "영업코드",
144
+ "전화",
145
+ ],
146
+ "https://tosel-faq.notion.site/": [
147
+ "TOSEL 이용 가이드",
148
+ "FAQ",
149
+ "Q&A",
150
+ "질문",
151
+ "help center",
152
+ "헬프 센터",
153
+ "안내",
154
+ "도움말",
155
+ ],
156
+ "https://tosel-faq.notion.site/150de6b860e280f4a30fe49d8c300584": [
157
+ "정기시험 관리규정",
158
+ ],
159
+ "/dashboard/user/applications": ["접수하기", "정기시험"],
160
+ "http://localhost:5174/olympiad#features": ["올림피아드 안내"],
27
161
  };
28
- export default function createSearch({ record, }) {
162
+ function createSearch({ record, } = {}) {
163
+ record = record ?? defaultRecord;
29
164
  const recordEntries = Object.entries(record);
30
165
  const isHangul = (str) => /[ㄱ-ㅎ|ㅏ-ㅣ|가-힣]/.test(str);
31
166
  const entries = recordEntries
@@ -33,19 +168,68 @@ export default function createSearch({ record, }) {
33
168
  .flat();
34
169
  const choseongEntries = entries.map(([key, value]) => [
35
170
  key,
36
- isHangul(value) ? getChoseong(value).replace(/ /g, "") : value,
171
+ isHangul(value)
172
+ ? getChoseong(value).replace(/ /g, "")
173
+ : value.toLowerCase(),
37
174
  ]);
175
+ const calculateMatchScore = (value, query) => {
176
+ const queryIndex = value.indexOf(query);
177
+ if (queryIndex === -1)
178
+ return 0;
179
+ // 일치율 = (검색어 길이 / 전체 단어 길이) * 100
180
+ const matchRatio = (query.length / value.length) * 100;
181
+ // 점수 계산: 앞에 있을수록 + 검색어 비율이 높을수록 가산점
182
+ return 100 - queryIndex * 5 + matchRatio * 2;
183
+ };
38
184
  const search = (query) => {
39
- const entireMatch = entries.filter(([_, value]) => value.includes(query));
40
- const queryChoseong = getChoseong(query);
41
- const choseongIndexes = choseongEntries
42
- .map((value, index) => ({ index, value }))
43
- .filter(({ value: [_, value] }) => value.includes(queryChoseong))
44
- .map(({ index }) => index);
45
- const choseongMatch = choseongIndexes.map((index) => entries[index]);
46
- return { entireMatch, choseongMatch };
185
+ const lowerQuery = query.toLowerCase();
186
+ const isHangulQuery = isHangul(query);
187
+ const queryChoseong = isHangulQuery ? getChoseong(query) : "";
188
+ // **정확한 일치 (Exact Match)**
189
+ const entireMatch = entries
190
+ .filter(([_, value]) => {
191
+ const normalizedValue = value.toLowerCase();
192
+ return (normalizedValue === lowerQuery ||
193
+ new RegExp(`\\b${lowerQuery}`).test(normalizedValue));
194
+ })
195
+ .map(([key, value]) => [
196
+ key,
197
+ record[key]?.[0] ?? value, // 첫 번째 키워드가 없을 경우 value를 기본값으로 사용
198
+ value,
199
+ ]);
200
+ // **초성 매칭 (Choseong Match)**
201
+ const choseongMatch = isHangulQuery
202
+ ? choseongEntries
203
+ .map((value, index) => ({ index, value }))
204
+ .filter(({ value: [_, value] }) => value.includes(queryChoseong))
205
+ .map(({ index }) => {
206
+ const key = entries[index][0];
207
+ return [
208
+ key,
209
+ record[key]?.[0] ?? entries[index][1], // 첫 번째 키워드가 없을 경우 대체
210
+ entries[index][1],
211
+ ];
212
+ })
213
+ : [];
214
+ // **중복 제거 (EntireMatch에 포함된 키 제거)**
215
+ const entireMatchKeys = new Set(entireMatch.map(([key]) => key));
216
+ const filteredChoseongMatch = choseongMatch.filter(([key]) => !entireMatchKeys.has(key));
217
+ // **가장 유사한 결과를 먼저 정렬**
218
+ const sortResults = (results) => {
219
+ return results
220
+ .map((item) => ({
221
+ data: item,
222
+ score: calculateMatchScore(item[2], query), // 검색어 포함도 계산
223
+ }))
224
+ .sort((a, b) => b.score - a.score) // 높은 점수순으로 정렬
225
+ .map((item) => item.data);
226
+ };
227
+ return {
228
+ entireMatch: sortResults(entireMatch),
229
+ choseongMatch: sortResults(filteredChoseongMatch),
230
+ };
47
231
  };
48
232
  return { search };
49
233
  }
50
- const { search } = createSearch({ record });
51
- console.log(search("관리"));
234
+ const { search } = createSearch();
235
+ export default search;
package/util/index.d.ts CHANGED
@@ -11,7 +11,7 @@ export { default as copyToClipboard } from "./copyToClipboard";
11
11
  export { default as createRecord } from "./createRecord";
12
12
  export { default as formatMobileNum } from "./formatPhoneNumberToE164";
13
13
  export { default as formatKorPhoneNum } from "./formatKoreanPhoneNumber";
14
- export { default as createSearch } from "./createSearch";
14
+ export { default as search } from "./createSearch";
15
15
  export * from "../style/colors";
16
16
  export * from "./pattern";
17
17
  export * from "./shape";
package/util/index.js CHANGED
@@ -11,7 +11,7 @@ export { default as copyToClipboard } from "./copyToClipboard";
11
11
  export { default as createRecord } from "./createRecord";
12
12
  export { default as formatMobileNum } from "./formatPhoneNumberToE164";
13
13
  export { default as formatKorPhoneNum } from "./formatKoreanPhoneNumber";
14
- export { default as createSearch } from "./createSearch";
14
+ export { default as search } from "./createSearch";
15
15
  export * from "../style/colors";
16
16
  export * from "./pattern";
17
17
  export * from "./shape";
package/version.txt CHANGED
@@ -1 +1 @@
1
- 1.0.266
1
+ 1.0.267
@@ -3,6 +3,8 @@ import { useId, useRef, useState } from "react";
3
3
  import { cn } from "../../../util";
4
4
  import Obstacle from "../Obstacle";
5
5
  import Form from "./Form";
6
+ import { useResponsive } from "../../../hook";
7
+ import Label from "../Label";
6
8
  const widthSize = {
7
9
  xs: "w-28",
8
10
  sm: "w-48",
@@ -13,6 +15,7 @@ const widthSize = {
13
15
  full: "w-full",
14
16
  };
15
17
  function Input({ state, onKeyDown, placeholder, option }) {
18
+ const isSm = useResponsive("sm");
16
19
  const { width, disabled } = option ?? {};
17
20
  const [value, setValue] = state;
18
21
  const ref = useRef(null);
@@ -42,6 +45,11 @@ function Input({ state, onKeyDown, placeholder, option }) {
42
45
  styles: "focus:outline-none bg-transparent",
43
46
  pointers: "cursor-default",
44
47
  };
48
+ if (!isSm)
49
+ return (_jsx(Label.Button, { title: "\uAC80\uC0C9", option: {
50
+ width: "3xs",
51
+ height: "2xs",
52
+ } }));
45
53
  return (_jsx("div", { className: cn(container), children: _jsxs("div", { className: cn(body), onClick: () => ref.current?.focus(), 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: "M21.8758 21.8748L16.4623 16.4613M16.4623 16.4613C17.9275 14.9961 18.7506 13.0089 18.7506 10.9368C18.7506 8.86474 17.9275 6.87752 16.4623 5.41234C14.9971 3.94715 13.0099 3.12402 10.9378 3.12402C8.86571 3.12402 6.8785 3.94715 5.41331 5.41234C3.94813 6.87752 3.125 8.86474 3.125 10.9368C3.125 13.0089 3.94813 14.9961 5.41331 16.4613C6.8785 17.9265 8.86571 18.7496 10.9378 18.7496C13.0099 18.7496 14.9971 17.9265 16.4623 16.4613Z", stroke: "#105652", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }) }), _jsx("input", { id: id, ref: ref, className: cn(inputBox), type: "text", value: value, onFocus: () => setIsFocus(true), onBlur: () => setIsFocus(false), placeholder: typeof placeholder === "function"
46
54
  ? placeholder()
47
55
  : placeholder ?? "입력해주세요", onKeyDown: onKeyDown && ((e) => onKeyDown(e, value ?? "")), onChange: (e) => setValue(e.target.value) }), _jsx(Obstacle, { disabled: disabled })] }) }));
@@ -1 +0,0 @@
1
- export default function SectionA(): import("react/jsx-runtime").JSX.Element;
@@ -1,51 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState, useEffect } from "react";
3
- import { cn } from "../../../util";
4
- import { useVisibilityObserver } from "../../../hook";
5
- export default function SectionA() {
6
- const [isHidden, setIsHidden] = useState(false);
7
- useEffect(() => {
8
- const handleScroll = () => {
9
- if (window.scrollY > 50) {
10
- setIsHidden(true);
11
- }
12
- else {
13
- setIsHidden(false);
14
- }
15
- };
16
- window.addEventListener("scroll", handleScroll);
17
- return () => {
18
- window.removeEventListener("scroll", handleScroll);
19
- };
20
- }, []);
21
- const handleScroll = () => {
22
- window.scrollBy({
23
- top: window.innerHeight,
24
- behavior: "smooth",
25
- });
26
- };
27
- const scrollGuideWrapper = {
28
- display: "absolute hidden md:flex flex-col justify-center items-center z-10",
29
- sizes: "w-full",
30
- spacings: "bottom-0 mb-10",
31
- scrollAction: `transition-opacity duration-500 ${isHidden ? "opacity-0" : "opacity-100"}`,
32
- };
33
- const scrollGuideText = {
34
- sizes: "w-full",
35
- textstyles: "font-medium text-white text-base",
36
- spacings: "text-center",
37
- };
38
- const scrollGuideButton = {
39
- sizes: "w-10 h-10 mt-10",
40
- other: "animate-bounce p-1 w-10 h-10 ring-1 ring-slate-900/5 shadow-lg rounded-full flex items-center justify-center",
41
- };
42
- const titleWrapper = {
43
- displays: "flex flex-col justify-center items-center md:items-start",
44
- sizes: "w-[1200px] h-full",
45
- spacings: "gap-8",
46
- textstyles: "text-white",
47
- animation: "transform transition-all duration-1000 delay-0 ease-in-out",
48
- };
49
- const { isVisible, elementRef } = useVisibilityObserver(0.1, true);
50
- return (_jsxs("div", { className: "relative w-full h-screen bg-[url('/images/aboutus/bg/img-aboutus-cover-min.png')] flex py-55 justify-center bg-cover bg-center px-5 z-0", children: [_jsxs("div", { className: cn(scrollGuideWrapper), children: [_jsx("div", { className: cn(scrollGuideText), children: "\uC790\uC138\uD55C \uB0B4\uC6A9\uC744 \uBCF4\uB824\uBA74 \uC544\uB798\uB85C \uC2A4\uD06C\uB864 \uD574\uBCF4\uC138\uC694" }), _jsx("div", { className: cn(scrollGuideButton), onClick: handleScroll, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", className: "size-6 text-white", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "m19.5 8.25-7.5 7.5-7.5-7.5" }) }) })] }), _jsx("div", { className: "absolute h-screen w-full bg-gradient-to-b from-black/0 to-black z-0 top-0" }), _jsxs("div", { className: cn(titleWrapper, isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"), children: [_jsx("div", { className: "text-lg md:text-xl z-10", ref: elementRef, children: "30,000\uC5EC\uAC1C\uC758 \uD559\uAD50\uC640 \uD559\uC6D0\uC758 \uC120\uD0DD" }), _jsxs("div", { className: "text-[32px] md:text-6xl font-bold text-center md:text-left z-10", children: ["\uB300\uD55C\uBBFC\uAD6D\uC744 \uB300\uD45C\uD558\uB294", _jsx("br", {}), "\uC601\uC5B4\uC778\uC99D\uC2DC\uD5D8"] }), _jsx("img", { src: "/images/aboutus/p1-min.png", alt: "", className: "object-fit w-70 z-10" })] })] }));
51
- }
@@ -1,2 +0,0 @@
1
- export default function SectionB(): import("react/jsx-runtime").JSX.Element;
2
- export declare function StatBoxComponent(): import("react/jsx-runtime").JSX.Element;
@@ -1,55 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../../../util";
3
- import { useVisibilityObserver } from "../../../hook";
4
- const stats = [
5
- {
6
- id: 1,
7
- label: "누적 정기시험 응시자",
8
- value: "83.1만 +",
9
- },
10
- {
11
- id: 2,
12
- label: "지필고사 개최",
13
- value: "1.4천회",
14
- },
15
- {
16
- id: 3,
17
- label: "누적 이용기관 수",
18
- value: "2.9만 +",
19
- },
20
- {
21
- id: 4,
22
- label: "선별된 성적 데이터",
23
- value: "39.3만 개 +",
24
- },
25
- ];
26
- export default function SectionB() {
27
- return (_jsx("div", { className: "break-keep w-full h-screen py-[200px] md:py-0 md:min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionb-bg-min.png')] flex items-center justify-center bg-cover bg-center flex-col", children: _jsxs("div", { className: "w-full max-w-[1200px] h-full flex flex-col text-white px-5 justify-center", children: [_jsxs("div", { className: "flex flex-col gap-2 mb-16", children: [_jsx("div", { className: "text-2xl font-bold", children: "\uC218\uBC31\uB9CC \uB204\uC801 \uC751\uC2DC\uC790\uAC00 \uBCF4\uB0B4\uB294 \uC2E0\uB8B0" }), _jsxs("div", { className: "text-sm", children: ["\uD1A0\uC140\uC740 20\uB144\uC774 \uB118\uB294 \uC2DC\uAC04\uB3D9\uC548 \uD55C\uAD6D\uD615 \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB97C \uC5F0\uAD6C\uD574\uC654\uACE0,", _jsx("br", {}), "\uD604\uC7AC 80\uB9CC\uBA85\uC774 \uB118\uB294 \uC751\uC2DC\uC790\uB97C \uBC30\uCD9C\uD55C \uB300\uD55C\uBBFC\uAD6D \uB300\uD45C \uC601\uC5B4\uC778\uC99D\uD3C9\uAC00\uB85C \uAC70\uB4ED\uB0AC\uC2B5\uB2C8\uB2E4."] })] }), _jsx(StatBoxComponent, {}), _jsx("div", { className: "text-xs", children: "2014\uB144 8\uC6D4 \uAE30\uC900" })] }) }));
28
- }
29
- export function StatBoxComponent() {
30
- const statBoxWrapper = {
31
- displays: "flex flex-wrap justify-start align-start max-w-[935px] w-full",
32
- spacings: "gap-y-5 gap-x-5 md:gap-x-12 mb-5",
33
- };
34
- const statBox = {
35
- displays: "flex flex-col items-start",
36
- sizes: "w-60 md:w-80",
37
- animations: "transform transition-all duration-1000 delay-0 ease-in-out",
38
- };
39
- const labelText = {
40
- textStyles: "font-bold text-base md:text-lg",
41
- colors: "text-white/80",
42
- spacings: "leading-normal",
43
- };
44
- const valueText = {
45
- textStyles: "font-bold text-[40px] md:text-[64px]",
46
- colors: "text-white",
47
- spacings: "leading-normal",
48
- };
49
- return (_jsx("div", { className: cn(statBoxWrapper), children: stats.map((item) => {
50
- const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
51
- return (_jsxs("div", { ref: elementRef, className: cn(statBox, isVisible
52
- ? "opacity-100 translate-y-0"
53
- : "opacity-0 translate-y-10"), children: [_jsx("div", { className: cn(labelText), children: item.label }), _jsx("div", { className: cn(valueText), children: item.value })] }, item.id));
54
- }) }));
55
- }
@@ -1 +0,0 @@
1
- export default function SectionC(): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import SectionCLeaf from "./SectionCLeaf";
4
- import SectionCCards from "./SectionCCards";
5
- export default function SectionC() {
6
- const [isOpen, setIsOpen] = useState(false);
7
- const members = [
8
- {
9
- imgSource: "/images/aboutus/section-c/img-aboutus-board-LKS-min.jpg",
10
- name: "이기수",
11
- position: "명예총재",
12
- description: "17대 고려대학교 총장",
13
- },
14
- // {
15
- // imgSource: "/images/aboutus/section-c/img-aboutus-board-LHY-min.png",
16
- // name: "이호열",
17
- // position: "위원장",
18
- // description: "국제토셀위원회 위원장",
19
- // },
20
- {
21
- imgSource: "/images/aboutus/section-c/img-aboutus-board-KID-min.png",
22
- name: "김임득",
23
- position: "출제위원장",
24
- description: "초대 수능출제위원장",
25
- },
26
- ];
27
- const [selectedCard, setSelectedCard] = useState(members[0]);
28
- const handleCardClick = (card) => {
29
- setSelectedCard(card);
30
- setIsOpen(true);
31
- };
32
- return (_jsxs(_Fragment, { children: [_jsx("div", { className: "w-full min-h-[900px] bg-white flex items-center justify-center px-5 py-8", children: _jsxs("div", { className: "max-w-[1200px] h-full flex flex-col text-crimson-burgundy gap-8 w-full", children: [_jsx("div", { className: "text-center text-3xl font-bold", children: "Leadership" }), _jsx("div", { className: "text-center text-sm font-light w-full pb-2 border-b-[1px] border-crimson-burgundy", children: "Board Members" }), _jsx("div", { className: "w-full flex items-center justify-center gap-8 flex-wrap", children: members.map((member, index) => {
33
- return (_jsx(SectionCCards, { imgSource: member.imgSource, name: member.name, position: member.position, description: member.description, handleClick: () => handleCardClick(member), delay: index * 100 }, index));
34
- }) })] }) }), _jsx(SectionCLeaf, { isOpenState: [isOpen, setIsOpen], selectedData: [selectedCard, setSelectedCard] })] }));
35
- }
@@ -1,13 +0,0 @@
1
- import { StateAction } from "../../../interface";
2
- type FunctionProps = {
3
- handleClick: StateAction<boolean>;
4
- delay: number;
5
- };
6
- interface CardProps {
7
- imgSource: string;
8
- name: string;
9
- position: string;
10
- description: string;
11
- }
12
- export default function Card({ imgSource, name, position, description, handleClick, delay, }: CardProps & FunctionProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useVisibilityObserver, useResponsive } from "../../../hook";
3
- import { cn } from "../../../util";
4
- export default function Card({ imgSource, name, position, description, handleClick, delay, }) {
5
- const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
6
- const isXM = useResponsive("xm");
7
- const cardContainer = {
8
- displays: "max-w-[270px] flex flex-col gap-3",
9
- animations: "transform transition-all duration-1000 ease-in-out",
10
- delay: isXM ? `delay-${delay}` : "delay-0",
11
- };
12
- return (_jsxs("div", { ref: elementRef, className: cn(cardContainer, isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"), onClick: () => handleClick(true), children: [_jsx("div", { className: "w-[270px] h-90 overflow-hidden rounded-3xl cursor-pointer", children: _jsx("img", { src: imgSource, alt: name, className: "w-full h-full object-cover hover:scale-105 transition-all duration-500" }) }), _jsxs("div", { className: "flex gap-3", children: [_jsx("div", { className: "text-gray-dark font-bold text-2xl", children: name }), _jsx("div", { className: "text-gray-medium font-semibold text-2xl", children: position })] }), _jsx("div", { className: "text-sm text-gray-medium", children: description })] }));
13
- }
@@ -1 +0,0 @@
1
- export default function SectionCD(): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useVisibilityObserver } from "../../../hook";
3
- import { cn } from "../../../util";
4
- export default function SectionCD() {
5
- const { isVisible, elementRef } = useVisibilityObserver(0.1, false);
6
- const blackBox = {
7
- displays: "flex flex-col",
8
- sizes: "w-full max-w-[1200px] h-fit rounded-xl",
9
- spacings: "py-12 px-8 gap-2.5 z-10",
10
- backgrounds: "bg-black/30 backdrop-blur-2xl",
11
- textstyles: "text-center break-keep",
12
- animations: "transform transition-all duration-1000 delay-0 ease-in-out",
13
- };
14
- return (_jsx("div", { className: "w-full min-h-screen bg-[url('/images/aboutus/bg/img-aboutus-sectionc2-bg-min.jpg')] flex justify-center items-end pb-24 bg-cover bg-center px-5", children: _jsxs("div", { ref: elementRef, className: cn(blackBox, isVisible ? "translate-y-0 opacity-100" : "translate-y-10 opacity-0"), children: [_jsx("div", { className: "text-3xl md:text-4xl text-white/50", children: "Our Mission" }), _jsxs("div", { className: "text-white text-base md:text-2xl font-bold", children: ["\uD1A0\uC140\uC740 \uC5F0\uB839\uBCC4 \uC778\uC9C0\uB2E8\uACC4\uB97C \uACE0\uB824\uD558\uC5EC \uC5B8\uC5B4\uB2A5\uB825\uC744 \uAC00\uC7A5 \uCE5C\uBC00\uD558\uAC8C \uD3C9\uAC00\uD569\uB2C8\uB2E4.", " ", _jsx("br", {}), "\uBE44\uC601\uC5B4\uAD8C \uD559\uC0DD\uB4E4\uC5D0\uAC8C \uC54C\uB9DE\uC740 \uD3C9\uAC00\uC81C\uB3C4\uB97C \uD1B5\uD574,", _jsx("br", {}), "\uB204\uAD6C\uB098 \uC601\uC5B4\uB97C \uB3C4\uC804\uD560 \uC218 \uC788\uAC8C \uB9CC\uB4DC\uB294 \uAC83\uC774 \uD1A0\uC140\uC758 \uC874\uC7AC \uC774\uC720\uC785\uB2C8\uB2E4."] })] }) }));
15
- }
@@ -1,15 +0,0 @@
1
- import { ShowAction, State } from "../../../interface";
2
- interface CardProps {
3
- imgSource: string;
4
- name: string;
5
- position: string;
6
- description: string;
7
- }
8
- interface SelectedDataProps {
9
- showAction?: ShowAction;
10
- selectedData: State<CardProps>;
11
- }
12
- export default function SectionCLeaf({ selectedData, isOpenState: [isOpen, setIsOpen], }: SelectedDataProps & {
13
- isOpenState: State<boolean>;
14
- }): import("react/jsx-runtime").JSX.Element;
15
- export {};