@hua-labs/ui 1.0.0 → 1.1.0-alpha.0.2

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 (348) hide show
  1. package/README.md +897 -210
  2. package/dist/ComponentLayout-BxCenSAm.d.mts +73 -0
  3. package/dist/advanced/dashboard.d.ts +7 -0
  4. package/dist/advanced/dashboard.d.ts.map +1 -0
  5. package/dist/advanced/motion.d.ts +2 -0
  6. package/dist/advanced/motion.d.ts.map +1 -0
  7. package/dist/advanced-dashboard.d.mts +4 -0
  8. package/dist/advanced-dashboard.js +2 -0
  9. package/dist/advanced-dashboard.js.map +1 -0
  10. package/dist/advanced-dashboard.mjs +2 -0
  11. package/dist/advanced-dashboard.mjs.map +1 -0
  12. package/dist/advanced-motion.d.mts +93 -0
  13. package/dist/advanced-motion.js +2 -0
  14. package/dist/advanced-motion.js.map +1 -0
  15. package/dist/advanced-motion.mjs +2 -0
  16. package/dist/advanced-motion.mjs.map +1 -0
  17. package/dist/advanced.d.mts +734 -0
  18. package/dist/advanced.d.ts +17 -0
  19. package/dist/advanced.d.ts.map +1 -0
  20. package/dist/advanced.js +2 -0
  21. package/dist/advanced.js.map +1 -0
  22. package/dist/advanced.mjs +2 -0
  23. package/dist/advanced.mjs.map +1 -0
  24. package/dist/chunk-627HOIRV.mjs +2 -0
  25. package/dist/chunk-627HOIRV.mjs.map +1 -0
  26. package/dist/chunk-ACEKLG37.mjs +2 -0
  27. package/dist/chunk-ACEKLG37.mjs.map +1 -0
  28. package/dist/chunk-E5PN4LUS.mjs +2 -0
  29. package/dist/chunk-E5PN4LUS.mjs.map +1 -0
  30. package/dist/chunk-KHEJZ3U4.mjs +2 -0
  31. package/dist/chunk-KHEJZ3U4.mjs.map +1 -0
  32. package/dist/chunk-MXGXBG63.mjs +2 -0
  33. package/dist/chunk-MXGXBG63.mjs.map +1 -0
  34. package/dist/chunk-R5KCFRYV.mjs +2 -0
  35. package/dist/chunk-R5KCFRYV.mjs.map +1 -0
  36. package/dist/chunk-UGSYQDR4.mjs +2 -0
  37. package/dist/chunk-UGSYQDR4.mjs.map +1 -0
  38. package/dist/chunk-UUHAXGMO.mjs +2 -0
  39. package/dist/chunk-UUHAXGMO.mjs.map +1 -0
  40. package/dist/chunk-VU264VFN.mjs +2 -0
  41. package/dist/chunk-VU264VFN.mjs.map +1 -0
  42. package/dist/chunk-ZFS4B5QT.mjs +2 -0
  43. package/dist/chunk-ZFS4B5QT.mjs.map +1 -0
  44. package/dist/components/Accordion.d.ts +109 -1
  45. package/dist/components/Accordion.d.ts.map +1 -1
  46. package/dist/components/Action.d.ts +68 -0
  47. package/dist/components/Action.d.ts.map +1 -0
  48. package/dist/components/ActionToolbar.d.ts +65 -0
  49. package/dist/components/ActionToolbar.d.ts.map +1 -0
  50. package/dist/components/Alert.d.ts +49 -0
  51. package/dist/components/Alert.d.ts.map +1 -1
  52. package/dist/components/Autocomplete.d.ts +88 -0
  53. package/dist/components/Autocomplete.d.ts.map +1 -0
  54. package/dist/components/Avatar.d.ts +71 -1
  55. package/dist/components/Avatar.d.ts.map +1 -1
  56. package/dist/components/Badge.d.ts +32 -2
  57. package/dist/components/Badge.d.ts.map +1 -1
  58. package/dist/components/Bookmark.d.ts +49 -0
  59. package/dist/components/Bookmark.d.ts.map +1 -0
  60. package/dist/components/BottomSheet.d.ts +91 -1
  61. package/dist/components/BottomSheet.d.ts.map +1 -1
  62. package/dist/components/Breadcrumb.d.ts +73 -14
  63. package/dist/components/Breadcrumb.d.ts.map +1 -1
  64. package/dist/components/Button.d.ts +82 -7
  65. package/dist/components/Button.d.ts.map +1 -1
  66. package/dist/components/Card.d.ts +122 -5
  67. package/dist/components/Card.d.ts.map +1 -1
  68. package/dist/components/ChatMessage.d.ts +67 -1
  69. package/dist/components/ChatMessage.d.ts.map +1 -1
  70. package/dist/components/Checkbox.d.ts +48 -2
  71. package/dist/components/Checkbox.d.ts.map +1 -1
  72. package/dist/components/Command.d.ts +82 -1
  73. package/dist/components/Command.d.ts.map +1 -1
  74. package/dist/components/ComponentLayout.d.ts +72 -0
  75. package/dist/components/ComponentLayout.d.ts.map +1 -0
  76. package/dist/components/ConfirmModal.d.ts +66 -1
  77. package/dist/components/ConfirmModal.d.ts.map +1 -1
  78. package/dist/components/Container.d.ts +39 -0
  79. package/dist/components/Container.d.ts.map +1 -1
  80. package/dist/components/ContextMenu.d.ts +51 -1
  81. package/dist/components/ContextMenu.d.ts.map +1 -1
  82. package/dist/components/DatePicker.d.ts +62 -0
  83. package/dist/components/DatePicker.d.ts.map +1 -0
  84. package/dist/components/Divider.d.ts +13 -3
  85. package/dist/components/Divider.d.ts.map +1 -1
  86. package/dist/components/Drawer.d.ts +103 -1
  87. package/dist/components/Drawer.d.ts.map +1 -1
  88. package/dist/components/Dropdown.d.ts +51 -1
  89. package/dist/components/Dropdown.d.ts.map +1 -1
  90. package/dist/components/EmotionAnalysis.d.ts +59 -1
  91. package/dist/components/EmotionAnalysis.d.ts.map +1 -1
  92. package/dist/components/EmotionButton.d.ts +35 -1
  93. package/dist/components/EmotionButton.d.ts.map +1 -1
  94. package/dist/components/EmotionMeter.d.ts +38 -2
  95. package/dist/components/EmotionMeter.d.ts.map +1 -1
  96. package/dist/components/EmotionSelector.d.ts +51 -1
  97. package/dist/components/EmotionSelector.d.ts.map +1 -1
  98. package/dist/components/FeatureCard.d.ts +61 -0
  99. package/dist/components/FeatureCard.d.ts.map +1 -0
  100. package/dist/components/Form.d.ts +114 -0
  101. package/dist/components/Form.d.ts.map +1 -0
  102. package/dist/components/Grid.d.ts +42 -1
  103. package/dist/components/Grid.d.ts.map +1 -1
  104. package/dist/components/HeroSection.d.ts +77 -0
  105. package/dist/components/HeroSection.d.ts.map +1 -0
  106. package/dist/components/Icon/Icon.d.ts +159 -0
  107. package/dist/components/Icon/Icon.d.ts.map +1 -0
  108. package/dist/components/Icon/IconProvider.d.ts +94 -0
  109. package/dist/components/Icon/IconProvider.d.ts.map +1 -0
  110. package/dist/components/Icon/icon-store.d.ts +21 -0
  111. package/dist/components/Icon/icon-store.d.ts.map +1 -0
  112. package/dist/components/Icon/index.d.ts +10 -0
  113. package/dist/components/Icon/index.d.ts.map +1 -0
  114. package/dist/components/InfoCard.d.ts +48 -0
  115. package/dist/components/InfoCard.d.ts.map +1 -0
  116. package/dist/components/Input.d.ts +40 -8
  117. package/dist/components/Input.d.ts.map +1 -1
  118. package/dist/components/Label.d.ts +50 -0
  119. package/dist/components/Label.d.ts.map +1 -0
  120. package/dist/components/LanguageToggle.d.ts +41 -1
  121. package/dist/components/LanguageToggle.d.ts.map +1 -1
  122. package/dist/components/Link.d.ts +52 -0
  123. package/dist/components/Link.d.ts.map +1 -0
  124. package/dist/components/LoadingSpinner.d.ts +44 -5
  125. package/dist/components/LoadingSpinner.d.ts.map +1 -1
  126. package/dist/components/Menu.d.ts +92 -1
  127. package/dist/components/Menu.d.ts.map +1 -1
  128. package/dist/components/Modal.d.ts +67 -5
  129. package/dist/components/Modal.d.ts.map +1 -1
  130. package/dist/components/Navigation.d.ts +72 -0
  131. package/dist/components/Navigation.d.ts.map +1 -0
  132. package/dist/components/PageNavigation.d.ts +48 -0
  133. package/dist/components/PageNavigation.d.ts.map +1 -0
  134. package/dist/components/PageTransition.d.ts +44 -1
  135. package/dist/components/PageTransition.d.ts.map +1 -1
  136. package/dist/components/Pagination.d.ts +52 -1
  137. package/dist/components/Pagination.d.ts.map +1 -1
  138. package/dist/components/Panel.d.ts +99 -0
  139. package/dist/components/Panel.d.ts.map +1 -0
  140. package/dist/components/Popover.d.ts +46 -1
  141. package/dist/components/Popover.d.ts.map +1 -1
  142. package/dist/components/Progress.d.ts +52 -3
  143. package/dist/components/Progress.d.ts.map +1 -1
  144. package/dist/components/Radio.d.ts +44 -2
  145. package/dist/components/Radio.d.ts.map +1 -1
  146. package/dist/components/ScrollArea.d.ts +53 -1
  147. package/dist/components/ScrollArea.d.ts.map +1 -1
  148. package/dist/components/ScrollIndicator.d.ts +43 -1
  149. package/dist/components/ScrollIndicator.d.ts.map +1 -1
  150. package/dist/components/ScrollProgress.d.ts +37 -0
  151. package/dist/components/ScrollProgress.d.ts.map +1 -1
  152. package/dist/components/ScrollToTop.d.ts +48 -11
  153. package/dist/components/ScrollToTop.d.ts.map +1 -1
  154. package/dist/components/SectionHeader.d.ts +42 -0
  155. package/dist/components/SectionHeader.d.ts.map +1 -0
  156. package/dist/components/Select.d.ts +59 -2
  157. package/dist/components/Select.d.ts.map +1 -1
  158. package/dist/components/Skeleton.d.ts +44 -1
  159. package/dist/components/Skeleton.d.ts.map +1 -1
  160. package/dist/components/Slider.d.ts +75 -0
  161. package/dist/components/Slider.d.ts.map +1 -0
  162. package/dist/components/Stack.d.ts +42 -1
  163. package/dist/components/Stack.d.ts.map +1 -1
  164. package/dist/components/StatsPanel.d.ts +72 -0
  165. package/dist/components/StatsPanel.d.ts.map +1 -0
  166. package/dist/components/Switch.d.ts +48 -2
  167. package/dist/components/Switch.d.ts.map +1 -1
  168. package/dist/components/Table.d.ts +206 -0
  169. package/dist/components/Table.d.ts.map +1 -0
  170. package/dist/components/Tabs.d.ts +123 -10
  171. package/dist/components/Tabs.d.ts.map +1 -1
  172. package/dist/components/Textarea.d.ts +48 -2
  173. package/dist/components/Textarea.d.ts.map +1 -1
  174. package/dist/components/ThemeProvider.d.ts +67 -2
  175. package/dist/components/ThemeProvider.d.ts.map +1 -1
  176. package/dist/components/ThemeToggle.d.ts +44 -0
  177. package/dist/components/ThemeToggle.d.ts.map +1 -1
  178. package/dist/components/Toast.d.ts +75 -1
  179. package/dist/components/Toast.d.ts.map +1 -1
  180. package/dist/components/Toggle.d.ts +62 -0
  181. package/dist/components/Toggle.d.ts.map +1 -0
  182. package/dist/components/Tooltip.d.ts +48 -1
  183. package/dist/components/Tooltip.d.ts.map +1 -1
  184. package/dist/components/Upload.d.ts +87 -0
  185. package/dist/components/Upload.d.ts.map +1 -0
  186. package/dist/components/advanced/AdvancedPageTransition.d.ts +25 -0
  187. package/dist/components/advanced/AdvancedPageTransition.d.ts.map +1 -0
  188. package/dist/components/advanced/index.d.ts +4 -0
  189. package/dist/components/advanced/index.d.ts.map +1 -0
  190. package/dist/components/advanced/usePageTransition.d.ts +33 -0
  191. package/dist/components/advanced/usePageTransition.d.ts.map +1 -0
  192. package/dist/components/advanced/usePageTransitionManager.d.ts +44 -0
  193. package/dist/components/advanced/usePageTransitionManager.d.ts.map +1 -0
  194. package/dist/components/dashboard/ActivityFeed.d.ts +87 -0
  195. package/dist/components/dashboard/ActivityFeed.d.ts.map +1 -0
  196. package/dist/components/dashboard/BarChart.d.ts +82 -0
  197. package/dist/components/dashboard/BarChart.d.ts.map +1 -0
  198. package/dist/components/dashboard/DashboardGrid.d.ts +44 -0
  199. package/dist/components/dashboard/DashboardGrid.d.ts.map +1 -0
  200. package/dist/components/dashboard/DashboardSidebar.d.ts +105 -0
  201. package/dist/components/dashboard/DashboardSidebar.d.ts.map +1 -0
  202. package/dist/components/dashboard/DashboardToolbar.d.ts +120 -0
  203. package/dist/components/dashboard/DashboardToolbar.d.ts.map +1 -0
  204. package/dist/components/dashboard/EmptyState.d.ts +61 -0
  205. package/dist/components/dashboard/EmptyState.d.ts.map +1 -0
  206. package/dist/components/dashboard/MembershipBadge.d.ts +45 -0
  207. package/dist/components/dashboard/MembershipBadge.d.ts.map +1 -0
  208. package/dist/components/dashboard/MerchantList.d.ts +98 -0
  209. package/dist/components/dashboard/MerchantList.d.ts.map +1 -0
  210. package/dist/components/dashboard/MetricCard.d.ts +75 -0
  211. package/dist/components/dashboard/MetricCard.d.ts.map +1 -0
  212. package/dist/components/dashboard/MiniBarChart.d.ts +60 -0
  213. package/dist/components/dashboard/MiniBarChart.d.ts.map +1 -0
  214. package/dist/components/dashboard/NotificationCard.d.ts +89 -0
  215. package/dist/components/dashboard/NotificationCard.d.ts.map +1 -0
  216. package/dist/components/dashboard/ProfileCard.d.ts +82 -0
  217. package/dist/components/dashboard/ProfileCard.d.ts.map +1 -0
  218. package/dist/components/dashboard/ProgressCard.d.ts +71 -0
  219. package/dist/components/dashboard/ProgressCard.d.ts.map +1 -0
  220. package/dist/components/dashboard/QuickActionCard.d.ts +63 -0
  221. package/dist/components/dashboard/QuickActionCard.d.ts.map +1 -0
  222. package/dist/components/dashboard/RoutingBreakdownCard.d.ts +88 -0
  223. package/dist/components/dashboard/RoutingBreakdownCard.d.ts.map +1 -0
  224. package/dist/components/dashboard/SettlementTimeline.d.ts +90 -0
  225. package/dist/components/dashboard/SettlementTimeline.d.ts.map +1 -0
  226. package/dist/components/dashboard/StatCard.d.ts +70 -0
  227. package/dist/components/dashboard/StatCard.d.ts.map +1 -0
  228. package/dist/components/dashboard/SummaryCard.d.ts +73 -0
  229. package/dist/components/dashboard/SummaryCard.d.ts.map +1 -0
  230. package/dist/components/dashboard/TransactionDetailDrawer.d.ts +183 -0
  231. package/dist/components/dashboard/TransactionDetailDrawer.d.ts.map +1 -0
  232. package/dist/components/dashboard/TransactionsTable.d.ts +137 -0
  233. package/dist/components/dashboard/TransactionsTable.d.ts.map +1 -0
  234. package/dist/components/dashboard/TrendChart.d.ts +75 -0
  235. package/dist/components/dashboard/TrendChart.d.ts.map +1 -0
  236. package/dist/components/dashboard/index.d.ts +41 -0
  237. package/dist/components/dashboard/index.d.ts.map +1 -0
  238. package/dist/components/scrollbar/scrollbar.d.ts +12 -0
  239. package/dist/components/scrollbar/scrollbar.d.ts.map +1 -0
  240. package/dist/dashboard-QMssHf5j.d.mts +1801 -0
  241. package/dist/feedback.d.mts +103 -0
  242. package/dist/feedback.d.ts +21 -0
  243. package/dist/feedback.d.ts.map +1 -0
  244. package/dist/feedback.js +2 -0
  245. package/dist/feedback.js.map +1 -0
  246. package/dist/feedback.mjs +2 -0
  247. package/dist/feedback.mjs.map +1 -0
  248. package/dist/form.d.mts +803 -0
  249. package/dist/form.d.ts +42 -0
  250. package/dist/form.d.ts.map +1 -0
  251. package/dist/form.js +2 -0
  252. package/dist/form.js.map +1 -0
  253. package/dist/form.mjs +2 -0
  254. package/dist/form.mjs.map +1 -0
  255. package/dist/hooks/useScrollToggle.d.ts +12 -0
  256. package/dist/hooks/useScrollToggle.d.ts.map +1 -0
  257. package/dist/icons-DoSGIez_.d.mts +135 -0
  258. package/dist/index.d.mts +3770 -0
  259. package/dist/index.d.ts +76 -38
  260. package/dist/index.d.ts.map +1 -1
  261. package/dist/index.js +37 -49
  262. package/dist/index.js.map +1 -0
  263. package/dist/index.mjs +37 -0
  264. package/dist/index.mjs.map +1 -0
  265. package/dist/lib/icon-aliases.d.ts +24 -0
  266. package/dist/lib/icon-aliases.d.ts.map +1 -0
  267. package/dist/lib/icon-names.d.ts +47 -0
  268. package/dist/lib/icon-names.d.ts.map +1 -0
  269. package/dist/lib/icon-providers.d.ts +559 -0
  270. package/dist/lib/icon-providers.d.ts.map +1 -0
  271. package/dist/lib/icons.d.ts +113 -24
  272. package/dist/lib/icons.d.ts.map +1 -1
  273. package/dist/lib/phosphor-icons.d.ts +6 -0
  274. package/dist/lib/phosphor-icons.d.ts.map +1 -0
  275. package/dist/lib/styles/colors.d.ts +131 -0
  276. package/dist/lib/styles/colors.d.ts.map +1 -0
  277. package/dist/lib/styles/index.d.ts +8 -0
  278. package/dist/lib/styles/index.d.ts.map +1 -0
  279. package/dist/lib/styles/utils.d.ts +87 -0
  280. package/dist/lib/styles/utils.d.ts.map +1 -0
  281. package/dist/lib/styles/variants.d.ts +79 -0
  282. package/dist/lib/styles/variants.d.ts.map +1 -0
  283. package/dist/lib/types/common.d.ts +80 -0
  284. package/dist/lib/types/common.d.ts.map +1 -0
  285. package/dist/lib/types/index.d.ts +6 -0
  286. package/dist/lib/types/index.d.ts.map +1 -0
  287. package/dist/lib/utils.d.ts +73 -1
  288. package/dist/lib/utils.d.ts.map +1 -1
  289. package/dist/navigation.d.mts +105 -0
  290. package/dist/navigation.d.ts +22 -0
  291. package/dist/navigation.d.ts.map +1 -0
  292. package/dist/navigation.js +2 -0
  293. package/dist/navigation.js.map +1 -0
  294. package/dist/navigation.mjs +2 -0
  295. package/dist/navigation.mjs.map +1 -0
  296. package/package.json +92 -25
  297. package/src/styles/toast.css +23 -0
  298. package/dist/components/Accordion.js +0 -84
  299. package/dist/components/Alert.js +0 -61
  300. package/dist/components/Avatar.js +0 -18
  301. package/dist/components/Badge.js +0 -15
  302. package/dist/components/BottomSheet.js +0 -96
  303. package/dist/components/Breadcrumb.js +0 -47
  304. package/dist/components/Button.js +0 -23
  305. package/dist/components/Card.js +0 -18
  306. package/dist/components/ChatMessage.js +0 -59
  307. package/dist/components/Checkbox.js +0 -30
  308. package/dist/components/Command.js +0 -119
  309. package/dist/components/ConfirmModal.js +0 -53
  310. package/dist/components/Container.js +0 -23
  311. package/dist/components/ContextMenu.js +0 -110
  312. package/dist/components/Divider.js +0 -39
  313. package/dist/components/Drawer.js +0 -79
  314. package/dist/components/Dropdown.js +0 -174
  315. package/dist/components/EmotionAnalysis.js +0 -40
  316. package/dist/components/EmotionButton.js +0 -16
  317. package/dist/components/EmotionMeter.js +0 -21
  318. package/dist/components/EmotionSelector.js +0 -46
  319. package/dist/components/Grid.js +0 -44
  320. package/dist/components/Icon.d.ts +0 -26
  321. package/dist/components/Icon.d.ts.map +0 -1
  322. package/dist/components/Icon.js +0 -48
  323. package/dist/components/Input.js +0 -25
  324. package/dist/components/LanguageToggle.js +0 -61
  325. package/dist/components/LoadingSpinner.js +0 -37
  326. package/dist/components/Menu.js +0 -122
  327. package/dist/components/Modal.js +0 -62
  328. package/dist/components/PageTransition.js +0 -39
  329. package/dist/components/Pagination.js +0 -87
  330. package/dist/components/Popover.js +0 -159
  331. package/dist/components/Progress.js +0 -51
  332. package/dist/components/Radio.js +0 -29
  333. package/dist/components/ScrollArea.js +0 -42
  334. package/dist/components/ScrollIndicator.js +0 -60
  335. package/dist/components/ScrollProgress.js +0 -39
  336. package/dist/components/ScrollToTop.js +0 -46
  337. package/dist/components/Select.js +0 -29
  338. package/dist/components/Skeleton.js +0 -71
  339. package/dist/components/Stack.js +0 -34
  340. package/dist/components/Switch.js +0 -29
  341. package/dist/components/Tabs.js +0 -117
  342. package/dist/components/Textarea.js +0 -31
  343. package/dist/components/ThemeProvider.js +0 -76
  344. package/dist/components/ThemeToggle.js +0 -49
  345. package/dist/components/Toast.js +0 -138
  346. package/dist/components/Tooltip.js +0 -102
  347. package/dist/lib/icons.js +0 -321
  348. package/dist/lib/utils.js +0 -5
@@ -1,40 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "./Card";
6
- import { Badge } from "./Badge";
7
- import { EmotionMeter } from "./EmotionMeter";
8
- const EmotionAnalysis = React.forwardRef(({ className, primaryEmotion, emotionDistribution = [], keywords = [], intensity = 50, positivity = 70, energy = 60, showMeter = true, showDistribution = true, showKeywords = true, showMetrics = true, layout = "detailed", ...props }, ref) => {
9
- const getIntensityLabel = (value) => {
10
- if (value < 30)
11
- return "약함";
12
- if (value < 70)
13
- return "보통";
14
- return "강함";
15
- };
16
- const getPositivityLabel = (value) => {
17
- if (value < 30)
18
- return "부정적";
19
- if (value < 70)
20
- return "중립적";
21
- return "긍정적";
22
- };
23
- const getEnergyLabel = (value) => {
24
- if (value < 30)
25
- return "낮음";
26
- if (value < 70)
27
- return "보통";
28
- return "높음";
29
- };
30
- if (layout === "compact") {
31
- return (_jsxs("div", { ref: ref, className: cn("space-y-3", className), ...props, children: [primaryEmotion && (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: "\uC8FC\uC694 \uAC10\uC815:" }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs("span", { className: "text-sm text-muted-foreground", children: [primaryEmotion.name, " (", primaryEmotion.intensity, "%)"] }), showMeter && (_jsx(EmotionMeter, { value: primaryEmotion.intensity, size: "sm", color: "blue" }))] })] })), showMetrics && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: "\uAC10\uC815 \uAC15\uB3C4:" }), _jsx("span", { className: "text-sm text-muted-foreground", children: getIntensityLabel(intensity) })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: "\uAE0D\uC815\uC131:" }), _jsx("span", { className: "text-sm text-muted-foreground", children: getPositivityLabel(positivity) })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: "\uC5D0\uB108\uC9C0:" }), _jsx("span", { className: "text-sm text-muted-foreground", children: getEnergyLabel(energy) })] })] })), showKeywords && keywords.length > 0 && (_jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium", children: "\uD0A4\uC6CC\uB4DC:" }), _jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: keywords.map((keyword) => (_jsx(Badge, { variant: "secondary", className: "text-xs", children: keyword }, keyword))) })] }))] }));
32
- }
33
- if (layout === "card") {
34
- return (_jsxs(Card, { ref: ref, className: cn("", className), ...props, children: [_jsxs(CardHeader, { children: [_jsxs(CardTitle, { className: "flex items-center", children: [_jsx("span", { className: "text-2xl mr-2", children: "\u2728" }), "AI \uBD84\uC11D"] }), _jsx(CardDescription, { children: "\uAC10\uC815 \uBD84\uC11D \uACB0\uACFC" })] }), _jsxs(CardContent, { className: "space-y-4", children: [primaryEmotion && (_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: "\uC8FC\uC694 \uAC10\uC815:" }), _jsxs("span", { className: "ml-2 text-muted-foreground", children: [primaryEmotion.name, " (", primaryEmotion.intensity, "%)"] })] }), showMeter && (_jsx("div", { className: "flex justify-center", children: _jsx(EmotionMeter, { value: primaryEmotion.intensity, size: "md", color: "blue" }) }))] })), showMetrics && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: "\uAC10\uC815 \uAC15\uB3C4:" }), _jsx("span", { className: "ml-2 text-muted-foreground", children: getIntensityLabel(intensity) })] }), _jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: "\uAE0D\uC815\uC131:" }), _jsx("span", { className: "ml-2 text-muted-foreground", children: getPositivityLabel(positivity) })] }), _jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: "\uC5D0\uB108\uC9C0:" }), _jsx("span", { className: "ml-2 text-muted-foreground", children: getEnergyLabel(energy) })] })] })), showKeywords && keywords.length > 0 && (_jsxs("div", { className: "text-sm", children: [_jsx("span", { className: "font-medium", children: "\uD0A4\uC6CC\uB4DC:" }), _jsx("div", { className: "flex flex-wrap gap-1 mt-1", children: keywords.map((keyword) => (_jsx(Badge, { variant: "secondary", className: "text-xs", children: keyword }, keyword))) })] }))] })] }));
35
- }
36
- // detailed layout (default)
37
- return (_jsxs("div", { ref: ref, className: cn("space-y-6", className), ...props, children: [primaryEmotion && (_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: "\uC8FC\uC694 \uAC10\uC815" }), _jsxs("div", { className: "flex items-center space-x-4", children: [_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-2xl font-bold text-primary", children: primaryEmotion.name }), _jsxs("div", { className: "text-sm text-muted-foreground", children: [primaryEmotion.intensity, "% \uAC15\uB3C4"] })] }), showMeter && (_jsx(EmotionMeter, { value: primaryEmotion.intensity, size: "lg", color: "blue" }))] })] })), showDistribution && emotionDistribution.length > 0 && (_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: "\uAC10\uC815 \uBD84\uD3EC" }), _jsx("div", { className: "space-y-3", children: emotionDistribution.map((item, index) => (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: item.emotion }), _jsxs("span", { className: "text-sm text-muted-foreground", children: [item.percentage, "%"] })] }), _jsx("div", { className: "w-full bg-muted rounded-full h-2", children: _jsx("div", { className: `${item.color} h-2 rounded-full transition-all duration-300`, style: { width: `${item.percentage}%` } }) })] }, index))) })] })), showMetrics && (_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: "\uBD84\uC11D \uC9C0\uD45C" }), _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-sm font-medium", children: "\uAC10\uC815 \uAC15\uB3C4" }), _jsx("div", { className: "text-2xl font-bold text-primary", children: getIntensityLabel(intensity) }), _jsx("div", { className: "w-full bg-muted rounded-full h-2", children: _jsx("div", { className: "bg-primary h-2 rounded-full transition-all duration-300", style: { width: `${intensity}%` } }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-sm font-medium", children: "\uAE0D\uC815\uC131" }), _jsx("div", { className: "text-2xl font-bold text-green-600", children: getPositivityLabel(positivity) }), _jsx("div", { className: "w-full bg-muted rounded-full h-2", children: _jsx("div", { className: "bg-green-500 h-2 rounded-full transition-all duration-300", style: { width: `${positivity}%` } }) })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("div", { className: "text-sm font-medium", children: "\uC5D0\uB108\uC9C0" }), _jsx("div", { className: "text-2xl font-bold text-orange-600", children: getEnergyLabel(energy) }), _jsx("div", { className: "w-full bg-muted rounded-full h-2", children: _jsx("div", { className: "bg-orange-500 h-2 rounded-full transition-all duration-300", style: { width: `${energy}%` } }) })] })] })] })), showKeywords && keywords.length > 0 && (_jsxs("div", { className: "space-y-4", children: [_jsx("h3", { className: "text-lg font-semibold", children: "\uAC10\uC815 \uD0A4\uC6CC\uB4DC" }), _jsx("div", { className: "flex flex-wrap gap-2", children: keywords.map((keyword) => (_jsx(Badge, { variant: "outline", className: "text-sm", children: keyword }, keyword))) })] }))] }));
38
- });
39
- EmotionAnalysis.displayName = "EmotionAnalysis";
40
- export { EmotionAnalysis };
@@ -1,16 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const EmotionButton = React.forwardRef(({ className, emotion, isSelected = false, size = "md", ...props }, ref) => {
6
- const sizeClasses = {
7
- sm: "w-8 h-8 text-sm",
8
- md: "w-12 h-12 text-lg",
9
- lg: "w-16 h-16 text-xl"
10
- };
11
- return (_jsx("button", { ref: ref, className: cn("rounded-full border-2 transition-all duration-200 hover:scale-105 focus:outline-none focus:ring-2 focus:ring-blue-500", sizeClasses[size], isSelected
12
- ? "border-blue-500 bg-blue-50 dark:bg-blue-900/20"
13
- : "border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-800", className), ...props, children: emotion }));
14
- });
15
- EmotionButton.displayName = "EmotionButton";
16
- export { EmotionButton };
@@ -1,21 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const EmotionMeter = React.forwardRef(({ className, value, max = 100, size = "md", color = "blue", ...props }, ref) => {
6
- const sizeClasses = {
7
- sm: "h-2",
8
- md: "h-3",
9
- lg: "h-4"
10
- };
11
- const colorClasses = {
12
- blue: "bg-blue-500",
13
- green: "bg-green-500",
14
- yellow: "bg-yellow-500",
15
- red: "bg-red-500"
16
- };
17
- const percentage = Math.min(Math.max((value / max) * 100, 0), 100);
18
- return (_jsx("div", { ref: ref, className: cn("w-full bg-gray-200 rounded-full dark:bg-gray-700", sizeClasses[size], className), ...props, children: _jsx("div", { className: cn("h-full rounded-full transition-all duration-300", colorClasses[color]), style: { width: `${percentage}%` } }) }));
19
- });
20
- EmotionMeter.displayName = "EmotionMeter";
21
- export { EmotionMeter };
@@ -1,46 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- import { EmotionButton } from "./EmotionButton";
6
- import { EmotionMeter } from "./EmotionMeter";
7
- const defaultEmotions = [
8
- { key: "joy", label: "기쁨", icon: "smile", color: "yellow" },
9
- { key: "sadness", label: "슬픔", icon: "frown", color: "blue" },
10
- { key: "anger", label: "화남", icon: "angry", color: "red" },
11
- { key: "calm", label: "평온", icon: "heart", color: "green" },
12
- { key: "excitement", label: "설렘", icon: "star", color: "pink" },
13
- { key: "worry", label: "걱정", icon: "meh", color: "gray" },
14
- { key: "gratitude", label: "감사", icon: "heart", color: "purple" },
15
- { key: "loneliness", label: "외로움", icon: "user", color: "indigo" }
16
- ];
17
- const EmotionSelector = React.forwardRef(({ className, selectedEmotion, onEmotionSelect, layout = "grid", showIntensity = false, intensity = 50, onIntensityChange, emotions = defaultEmotions, size = "md", variant = "button", ...props }, ref) => {
18
- const handleEmotionClick = (emotionKey) => {
19
- onEmotionSelect?.(emotionKey);
20
- };
21
- const renderEmotionItem = (emotion) => {
22
- const isSelected = selectedEmotion === emotion.key;
23
- if (variant === "button") {
24
- return (_jsx(EmotionButton, { emotion: emotion.key, isSelected: isSelected, size: size, onClick: () => handleEmotionClick(emotion.key), className: cn("transition-all duration-200", isSelected && "ring-2 ring-offset-2 ring-primary"), children: emotion.label }, emotion.key));
25
- }
26
- if (variant === "card") {
27
- return (_jsx("div", { className: cn("p-4 rounded-lg border-2 cursor-pointer transition-all duration-200 hover:shadow-md", isSelected
28
- ? "border-primary bg-primary/5"
29
- : "border-border hover:border-primary/50"), onClick: () => handleEmotionClick(emotion.key), children: _jsxs("div", { className: "flex items-center space-x-3", children: [_jsx("div", { className: cn("w-8 h-8 rounded-full flex items-center justify-center", isSelected ? "bg-primary text-primary-foreground" : "bg-muted"), children: emotion.icon && (_jsxs("span", { className: "text-lg", children: [emotion.icon === "smile" && "😊", emotion.icon === "frown" && "😢", emotion.icon === "angry" && "😠", emotion.icon === "heart" && "❤️", emotion.icon === "star" && "⭐", emotion.icon === "meh" && "😐", emotion.icon === "user" && "👤"] })) }), _jsx("span", { className: "font-medium", children: emotion.label })] }) }, emotion.key));
30
- }
31
- if (variant === "chip") {
32
- return (_jsx("div", { className: cn("px-3 py-1 rounded-full cursor-pointer transition-all duration-200 text-sm font-medium", isSelected
33
- ? "bg-primary text-primary-foreground"
34
- : "bg-muted hover:bg-muted/80"), onClick: () => handleEmotionClick(emotion.key), children: emotion.label }, emotion.key));
35
- }
36
- return null;
37
- };
38
- const layoutClasses = {
39
- grid: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-2 md:gap-3",
40
- list: "space-y-2",
41
- compact: "flex flex-wrap gap-1"
42
- };
43
- return (_jsxs("div", { ref: ref, className: cn("space-y-4", className), ...props, children: [_jsx("div", { className: layoutClasses[layout], children: emotions.map(renderEmotionItem) }), showIntensity && selectedEmotion && (_jsxs("div", { className: "space-y-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm font-medium", children: "\uAC10\uC815 \uAC15\uB3C4" }), _jsxs("span", { className: "text-sm text-muted-foreground", children: [intensity, "%"] })] }), _jsx("input", { type: "range", min: "0", max: "100", value: intensity, onChange: (e) => onIntensityChange?.(Number(e.target.value)), className: "w-full h-2 bg-muted rounded-lg appearance-none cursor-pointer slider" }), _jsxs("div", { className: "flex justify-between text-xs text-muted-foreground", children: [_jsx("span", { children: "\uC57D\uD568" }), _jsx("span", { children: "\uBCF4\uD1B5" }), _jsx("span", { children: "\uAC15\uD568" })] })] })), selectedEmotion && showIntensity && (_jsx("div", { className: "flex justify-center", children: _jsx(EmotionMeter, { value: intensity, size: "md", color: "blue" }) }))] }));
44
- });
45
- EmotionSelector.displayName = "EmotionSelector";
46
- export { EmotionSelector };
@@ -1,44 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const Grid = React.forwardRef(({ className, cols = 1, gap = "md", gapX, gapY, responsive = true, ...props }, ref) => {
6
- const colsClasses = {
7
- 1: "grid-cols-1",
8
- 2: "grid-cols-1 sm:grid-cols-2",
9
- 3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
10
- 4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",
11
- 5: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",
12
- 6: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-6",
13
- 7: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-7",
14
- 8: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-8",
15
- 9: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-9",
16
- 10: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-10",
17
- 11: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-11",
18
- 12: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-12"
19
- };
20
- const gapClasses = {
21
- none: "gap-0",
22
- sm: "gap-4", // 16px
23
- md: "gap-6", // 24px
24
- lg: "gap-8", // 32px
25
- xl: "gap-12" // 48px
26
- };
27
- const gapXClasses = {
28
- none: "gap-x-0",
29
- sm: "gap-x-4", // 16px
30
- md: "gap-x-6", // 24px
31
- lg: "gap-x-8", // 32px
32
- xl: "gap-x-12" // 48px
33
- };
34
- const gapYClasses = {
35
- none: "gap-y-0",
36
- sm: "gap-y-4", // 16px
37
- md: "gap-y-6", // 24px
38
- lg: "gap-y-8", // 32px
39
- xl: "gap-y-12" // 48px
40
- };
41
- return (_jsx("div", { ref: ref, className: cn("grid", responsive ? colsClasses[cols] : `grid-cols-${cols}`, gapX ? gapXClasses[gapX] : gapClasses[gap], gapY && gapYClasses[gapY], className), ...props }));
42
- });
43
- Grid.displayName = "Grid";
44
- export { Grid };
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import { LucideProps } from 'lucide-react';
3
- import { IconName, emotionIcons, statusIcons } from '../lib/icons';
4
- export interface IconProps extends Omit<LucideProps, 'size'> {
5
- name: IconName;
6
- size?: number | string;
7
- className?: string;
8
- emotion?: keyof typeof emotionIcons;
9
- status?: keyof typeof statusIcons;
10
- animated?: boolean;
11
- pulse?: boolean;
12
- spin?: boolean;
13
- bounce?: boolean;
14
- variant?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'muted';
15
- }
16
- export declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
17
- export declare const EmotionIcon: React.ForwardRefExoticComponent<Omit<Omit<IconProps, "name"> & {
18
- emotion: keyof typeof emotionIcons;
19
- }, "ref"> & React.RefAttributes<SVGSVGElement>>;
20
- export declare const StatusIcon: React.ForwardRefExoticComponent<Omit<Omit<IconProps, "name"> & {
21
- status: keyof typeof statusIcons;
22
- }, "ref"> & React.RefAttributes<SVGSVGElement>>;
23
- export declare const LoadingIcon: React.ForwardRefExoticComponent<Omit<Omit<IconProps, "name" | "status">, "ref"> & React.RefAttributes<SVGSVGElement>>;
24
- export declare const SuccessIcon: React.ForwardRefExoticComponent<Omit<Omit<IconProps, "name" | "status">, "ref"> & React.RefAttributes<SVGSVGElement>>;
25
- export declare const ErrorIcon: React.ForwardRefExoticComponent<Omit<Omit<IconProps, "name" | "status">, "ref"> & React.RefAttributes<SVGSVGElement>>;
26
- //# sourceMappingURL=Icon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/components/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE1C,OAAO,EAAS,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAEzE,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAC1D,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,OAAO,CAAC,EAAE,MAAM,OAAO,YAAY,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,OAAO,WAAW,CAAA;IAEjC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;CAC1F;AAED,eAAO,MAAM,IAAI,8FAyDf,CAAA;AAKF,eAAO,MAAM,WAAW;aAAwE,MAAM,OAAO,YAAY;+CAIxH,CAAA;AAID,eAAO,MAAM,UAAU;YAAuE,MAAM,OAAO,WAAW;+CAIrH,CAAA;AAKD,eAAO,MAAM,WAAW,uHAIvB,CAAA;AAKD,eAAO,MAAM,WAAW,uHAIvB,CAAA;AAKD,eAAO,MAAM,SAAS,uHAIrB,CAAA"}
@@ -1,48 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from 'react';
3
- import { cn } from '../lib/utils';
4
- import { icons, emotionIcons, statusIcons } from '../lib/icons';
5
- export const Icon = React.forwardRef(({ name, size = 24, className, emotion, status, animated = false, pulse = false, spin = false, bounce = false, variant = 'default', ...props }, ref) => {
6
- // 감정이나 상태가 지정되면 해당 아이콘으로 오버라이드
7
- const iconName = emotion ? emotionIcons[emotion] :
8
- status ? statusIcons[status] :
9
- name;
10
- const IconComponent = icons[iconName];
11
- if (!IconComponent) {
12
- console.warn(`Icon "${iconName}" not found`);
13
- return null;
14
- }
15
- // 애니메이션 클래스 생성
16
- const animationClasses = cn({
17
- 'animate-pulse': pulse,
18
- 'animate-spin': spin,
19
- 'animate-bounce': bounce,
20
- 'transition-all duration-200 ease-in-out': animated,
21
- });
22
- // 색상 변형 클래스
23
- const variantClasses = cn({
24
- 'text-gray-900 dark:text-white': variant === 'default',
25
- 'text-blue-600 dark:text-blue-400': variant === 'primary',
26
- 'text-gray-600 dark:text-gray-400': variant === 'secondary',
27
- 'text-green-600 dark:text-green-400': variant === 'success',
28
- 'text-yellow-600 dark:text-yellow-400': variant === 'warning',
29
- 'text-red-600 dark:text-red-400': variant === 'error',
30
- 'text-gray-500 dark:text-gray-500': variant === 'muted',
31
- });
32
- return (_jsx(IconComponent, { ref: ref, size: size, className: cn('inline-block', animationClasses, variantClasses, className), ...props }));
33
- });
34
- Icon.displayName = 'Icon';
35
- // 편의를 위한 특화된 아이콘 컴포넌트들
36
- export const EmotionIcon = React.forwardRef(({ emotion, ...props }, ref) => (_jsx(Icon, { ref: ref, name: "smile", emotion: emotion, ...props })));
37
- EmotionIcon.displayName = 'EmotionIcon';
38
- export const StatusIcon = React.forwardRef(({ status, ...props }, ref) => (_jsx(Icon, { ref: ref, name: "info", status: status, ...props })));
39
- StatusIcon.displayName = 'StatusIcon';
40
- // 로딩 상태 전용 아이콘
41
- export const LoadingIcon = React.forwardRef((props, ref) => (_jsx(Icon, { ref: ref, name: "loader", status: "loading", spin: true, ...props })));
42
- LoadingIcon.displayName = 'LoadingIcon';
43
- // 성공 상태 전용 아이콘
44
- export const SuccessIcon = React.forwardRef((props, ref) => (_jsx(Icon, { ref: ref, name: "check", status: "success", variant: "success", ...props })));
45
- SuccessIcon.displayName = 'SuccessIcon';
46
- // 에러 상태 전용 아이콘
47
- export const ErrorIcon = React.forwardRef((props, ref) => (_jsx(Icon, { ref: ref, name: "alert", status: "error", variant: "error", ...props })));
48
- ErrorIcon.displayName = 'ErrorIcon';
@@ -1,25 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const Input = React.forwardRef(({ className, type, variant = "default", size = "md", error = false, success = false, leftIcon, rightIcon, ...props }, ref) => {
6
- const variantClasses = {
7
- default: "border-gray-300 bg-white text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-800 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400",
8
- outline: "border-2 border-gray-200 bg-transparent text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:ring-blue-400",
9
- filled: "border-transparent bg-gray-50 text-gray-900 placeholder-gray-500 focus:bg-white focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-blue-400 dark:focus:ring-blue-400",
10
- ghost: "border-transparent bg-transparent text-gray-900 placeholder-gray-500 focus:bg-gray-50 focus:border-gray-300 focus:ring-gray-500 dark:text-white dark:placeholder-gray-400 dark:focus:bg-gray-800 dark:focus:border-gray-600 dark:focus:ring-gray-400"
11
- };
12
- const sizeClasses = {
13
- sm: "h-8 px-3 text-sm",
14
- md: "h-10 px-4 text-base",
15
- lg: "h-12 px-4 text-lg"
16
- };
17
- const stateClasses = error
18
- ? "border-red-500 focus:border-red-500 focus:ring-red-500 dark:border-red-400 dark:focus:border-red-400 dark:focus:ring-red-400"
19
- : success
20
- ? "border-green-500 focus:border-green-500 focus:ring-green-500 dark:border-green-400 dark:focus:border-green-400 dark:focus:ring-green-400"
21
- : "";
22
- return (_jsxs("div", { className: "relative", children: [leftIcon && (_jsx("div", { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: leftIcon })), _jsx("input", { type: type, className: cn("flex w-full rounded-md border transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", variantClasses[variant], sizeClasses[size], stateClasses, leftIcon ? "pl-10" : "", rightIcon ? "pr-10" : "", className), ref: ref, ...props }), rightIcon && (_jsx("div", { className: "absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 dark:text-gray-500", children: rightIcon }))] }));
23
- });
24
- Input.displayName = "Input";
25
- export { Input };
@@ -1,61 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const LanguageToggle = React.forwardRef(({ className, size = "md", variant = "button", showLabel = false, languages = [
6
- { code: "ko", name: "한국어", flag: "🇰🇷" },
7
- { code: "en", name: "English", flag: "🇺🇸" },
8
- { code: "ja", name: "日本語", flag: "🇯🇵" },
9
- { code: "zh", name: "中文", flag: "🇨🇳" }
10
- ], currentLanguage = "ko", onLanguageChange, ...props }, ref) => {
11
- const [isOpen, setIsOpen] = React.useState(false);
12
- const dropdownRef = React.useRef(null);
13
- const currentLang = languages.find(lang => lang.code === currentLanguage) || languages[0];
14
- const sizeClasses = {
15
- sm: "h-10 w-10", // 40px - 더 넉넉한 크기
16
- md: "h-12 w-12", // 48px - 더 넉넉한 크기
17
- lg: "h-14 w-14" // 56px - 더 넉넉한 크기
18
- };
19
- const iconSizes = {
20
- sm: 16,
21
- md: 20,
22
- lg: 24
23
- };
24
- // 외부 클릭 시 드롭다운 닫기
25
- React.useEffect(() => {
26
- const handleClickOutside = (event) => {
27
- if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
28
- setIsOpen(false);
29
- }
30
- };
31
- if (isOpen) {
32
- document.addEventListener("mousedown", handleClickOutside);
33
- }
34
- return () => {
35
- document.removeEventListener("mousedown", handleClickOutside);
36
- };
37
- }, [isOpen]);
38
- const handleLanguageChange = (languageCode) => {
39
- onLanguageChange?.(languageCode);
40
- setIsOpen(false);
41
- };
42
- const renderIcon = () => (_jsx("div", { className: "flex items-center justify-center", children: _jsx("span", { className: "text-lg", children: currentLang.flag }) }));
43
- if (variant === "icon") {
44
- return (_jsxs("div", { ref: dropdownRef, className: "relative", children: [_jsx("button", { onClick: () => setIsOpen(!isOpen), className: cn("inline-flex items-center justify-center rounded-lg transition-all duration-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:ring-offset-2", sizeClasses[size], className), ...props, children: renderIcon() }), isOpen && (_jsx("div", { className: "absolute top-full right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 py-2 z-50", children: languages.map((language) => (_jsxs("button", { onClick: () => handleLanguageChange(language.code), className: cn("w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors duration-200 flex items-center gap-3", // 16px, 12px 패딩, 12px 간격
45
- currentLanguage === language.code && "bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"), children: [_jsx("span", { className: "text-lg", children: language.flag }), _jsx("span", { className: "text-sm font-medium", children: language.name })] }, language.code))) }))] }));
46
- }
47
- if (variant === "dropdown") {
48
- return (_jsxs("div", { ref: dropdownRef, className: "relative", children: [_jsxs("button", { onClick: () => setIsOpen(!isOpen), className: cn("inline-flex items-center gap-3 rounded-lg px-4 py-3 text-sm font-medium transition-all duration-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:ring-offset-2", // 12px 간격, 16px, 12px 패딩
49
- className), ...props, children: [_jsx("span", { className: "text-lg", children: currentLang.flag }), showLabel && _jsx("span", { children: currentLang.name }), _jsx("svg", { className: cn("w-4 h-4 transition-transform duration-200", isOpen && "rotate-180"), fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }), isOpen && (_jsx("div", { className: "absolute top-full right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 py-2 z-50", children: languages.map((language) => (_jsxs("button", { onClick: () => handleLanguageChange(language.code), className: cn("w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors duration-200 flex items-center gap-3", // 16px, 12px 패딩, 12px 간격
50
- currentLanguage === language.code && "bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400"), children: [_jsx("span", { className: "text-lg", children: language.flag }), _jsx("span", { className: "text-sm font-medium", children: language.name })] }, language.code))) }))] }));
51
- }
52
- // 기본 버튼 형태
53
- return (_jsxs("button", { onClick: () => {
54
- const currentIndex = languages.findIndex(lang => lang.code === currentLanguage);
55
- const nextIndex = (currentIndex + 1) % languages.length;
56
- onLanguageChange?.(languages[nextIndex].code);
57
- }, className: cn("inline-flex items-center gap-3 rounded-lg px-4 py-3 text-sm font-medium transition-all duration-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/50 focus-visible:ring-offset-2", // 12px 간격, 16px, 12px 패딩
58
- className), ...props, children: [_jsx("span", { className: "text-lg", children: currentLang.flag }), showLabel && _jsx("span", { children: currentLang.name })] }));
59
- });
60
- LanguageToggle.displayName = "LanguageToggle";
61
- export { LanguageToggle };
@@ -1,37 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const LoadingSpinner = React.forwardRef(({ className, size = "md", variant = "default", text, color = "default", ...props }, ref) => {
6
- const sizeClasses = {
7
- sm: "w-6 h-6", // 24px - 더 넉넉한 크기
8
- md: "w-8 h-8", // 32px - 더 넉넉한 크기
9
- lg: "w-12 h-12", // 48px - 더 넉넉한 크기
10
- xl: "w-16 h-16" // 64px - 더 넉넉한 크기
11
- };
12
- const colorClasses = {
13
- default: "border-gray-300 border-t-gray-600 dark:border-gray-600 dark:border-t-gray-300",
14
- primary: "border-blue-300 border-t-blue-600 dark:border-blue-600 dark:border-t-blue-300",
15
- secondary: "border-gray-300 border-t-gray-600 dark:border-gray-600 dark:border-t-gray-300",
16
- success: "border-green-300 border-t-green-600 dark:border-green-600 dark:border-t-green-300",
17
- warning: "border-yellow-300 border-t-yellow-600 dark:border-yellow-600 dark:border-t-yellow-300",
18
- error: "border-red-300 border-t-red-600 dark:border-red-600 dark:border-t-red-300"
19
- };
20
- const renderSpinner = () => {
21
- switch (variant) {
22
- case "dots":
23
- return (_jsxs("div", { className: "flex space-x-1", children: [" ", _jsx("div", { className: "w-2 h-2 bg-current rounded-full animate-bounce" }), _jsx("div", { className: "w-2 h-2 bg-current rounded-full animate-bounce delay-100" }), _jsx("div", { className: "w-2 h-2 bg-current rounded-full animate-bounce delay-200" })] }));
24
- case "bars":
25
- return (_jsxs("div", { className: "flex space-x-1", children: [" ", _jsx("div", { className: "w-1 h-full bg-current animate-pulse" }), _jsx("div", { className: "w-1 h-full bg-current animate-pulse delay-100" }), _jsx("div", { className: "w-1 h-full bg-current animate-pulse delay-200" })] }));
26
- case "ring":
27
- return (_jsx("div", { className: cn("animate-spin rounded-full border-2", colorClasses[color]) }));
28
- case "ripple":
29
- return (_jsxs("div", { className: "relative", children: [_jsx("div", { className: cn("absolute inset-0 rounded-full border-2 animate-ping", colorClasses[color]) }), _jsx("div", { className: cn("rounded-full border-2", colorClasses[color]) })] }));
30
- default:
31
- return (_jsx("div", { className: cn("animate-spin rounded-full border-2", colorClasses[color]) }));
32
- }
33
- };
34
- return (_jsxs("div", { ref: ref, className: cn("flex flex-col items-center justify-center", className), ...props, children: [_jsx("div", { className: cn(sizeClasses[size], "text-gray-600 dark:text-gray-400"), children: renderSpinner() }), text && (_jsxs("p", { className: "mt-3 text-sm text-gray-600 dark:text-gray-400 text-center", children: [" ", text] }))] }));
35
- });
36
- LoadingSpinner.displayName = "LoadingSpinner";
37
- export { LoadingSpinner };
@@ -1,122 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { cn } from "../lib/utils";
5
- const Menu = React.forwardRef(({ className, children, variant = "default", size = "md", ...props }, ref) => {
6
- const getVariantClasses = () => {
7
- switch (variant) {
8
- case "horizontal":
9
- return "flex items-center space-x-1"; // 4px 간격
10
- case "vertical":
11
- return "flex flex-col space-y-1"; // 4px 간격
12
- case "compact":
13
- return "flex flex-col space-y-0.5"; // 2px 간격
14
- default:
15
- return "flex flex-col space-y-1"; // 4px 간격
16
- }
17
- };
18
- const getSizeClasses = () => {
19
- switch (size) {
20
- case "sm":
21
- return "text-sm";
22
- case "lg":
23
- return "text-base";
24
- default:
25
- return "text-sm";
26
- }
27
- };
28
- return (_jsx("div", { ref: ref, className: cn(getVariantClasses(), getSizeClasses(), className), ...props, children: React.Children.map(children, (child) => {
29
- if (React.isValidElement(child)) {
30
- return React.cloneElement(child, {
31
- variant,
32
- size
33
- });
34
- }
35
- return child;
36
- }) }));
37
- });
38
- Menu.displayName = "Menu";
39
- const MenuItem = React.forwardRef(({ className, icon, variant = "default", size = "md", active = false, disabled = false, children, ...props }, ref) => {
40
- const getVariantClasses = () => {
41
- switch (variant) {
42
- case "horizontal":
43
- return cn("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors", // 12px, 8px 패딩
44
- active
45
- ? "bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300"
46
- : "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700");
47
- case "vertical":
48
- return cn("flex items-center gap-3 px-4 py-3 rounded-md text-sm font-medium transition-colors", // 16px, 12px 패딩
49
- active
50
- ? "bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300"
51
- : "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700");
52
- case "compact":
53
- return cn("flex items-center gap-2 px-2 py-1.5 rounded text-sm font-medium transition-colors", // 8px, 6px 패딩
54
- active
55
- ? "bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300"
56
- : "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700");
57
- default:
58
- return cn("flex items-center gap-3 px-4 py-3 rounded-md text-sm font-medium transition-colors", // 16px, 12px 패딩
59
- active
60
- ? "bg-blue-100 dark:bg-blue-900 text-blue-700 dark:text-blue-300"
61
- : "text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700");
62
- }
63
- };
64
- const getSizeClasses = () => {
65
- switch (size) {
66
- case "sm":
67
- return "text-xs";
68
- case "lg":
69
- return "text-base";
70
- default:
71
- return "text-sm";
72
- }
73
- };
74
- return (_jsxs("button", { ref: ref, className: cn(getVariantClasses(), getSizeClasses(), disabled && "opacity-50 cursor-not-allowed", className), disabled: disabled, ...props, children: [icon && (_jsx("div", { className: "flex-shrink-0 w-4 h-4", children: icon })), _jsx("span", { className: "flex-1 text-left", children: children })] }));
75
- });
76
- MenuItem.displayName = "MenuItem";
77
- const MenuSeparator = React.forwardRef(({ className, variant = "default", ...props }, ref) => {
78
- const getVariantClasses = () => {
79
- switch (variant) {
80
- case "horizontal":
81
- return "w-px h-4 bg-gray-200 dark:bg-gray-700 mx-1"; // 4px 여백
82
- case "vertical":
83
- case "compact":
84
- default:
85
- return "h-px bg-gray-200 dark:bg-gray-700 my-2"; // 8px 여백
86
- }
87
- };
88
- return (_jsx("div", { ref: ref, className: cn(getVariantClasses(), className), ...props }));
89
- });
90
- MenuSeparator.displayName = "MenuSeparator";
91
- const MenuLabel = React.forwardRef(({ className, variant = "default", size = "md", children, ...props }, ref) => {
92
- const getVariantClasses = () => {
93
- switch (variant) {
94
- case "horizontal":
95
- return "px-3 py-1 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide"; // 12px, 4px 패딩
96
- case "vertical":
97
- case "compact":
98
- default:
99
- return "px-4 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wide"; // 16px, 8px 패딩
100
- }
101
- };
102
- const getSizeClasses = () => {
103
- switch (size) {
104
- case "sm":
105
- return "text-xs";
106
- case "lg":
107
- return "text-sm";
108
- default:
109
- return "text-xs";
110
- }
111
- };
112
- return (_jsx("div", { ref: ref, className: cn(getVariantClasses(), getSizeClasses(), className), ...props, children: children }));
113
- });
114
- MenuLabel.displayName = "MenuLabel";
115
- // 편의 컴포넌트들
116
- export const MenuHorizontal = React.forwardRef(({ className, ...props }, ref) => (_jsx(Menu, { ref: ref, variant: "horizontal", className: className, ...props })));
117
- MenuHorizontal.displayName = "MenuHorizontal";
118
- export const MenuVertical = React.forwardRef(({ className, ...props }, ref) => (_jsx(Menu, { ref: ref, variant: "vertical", className: className, ...props })));
119
- MenuVertical.displayName = "MenuVertical";
120
- export const MenuCompact = React.forwardRef(({ className, ...props }, ref) => (_jsx(Menu, { ref: ref, variant: "compact", className: className, ...props })));
121
- MenuCompact.displayName = "MenuCompact";
122
- export { Menu, MenuItem, MenuSeparator, MenuLabel };
@@ -1,62 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { createPortal } from "react-dom";
5
- import { cn } from "../lib/utils";
6
- const Modal = React.forwardRef(({ className, isOpen, onClose, children, size = "md", showCloseButton = true, closeOnOverlayClick = true, title, showBackdrop = true, centered = true, ...props }, ref) => {
7
- const modalRef = React.useRef(null);
8
- // ESC 키로 모달 닫기
9
- React.useEffect(() => {
10
- const handleEscape = (e) => {
11
- if (e.key === "Escape") {
12
- onClose();
13
- }
14
- };
15
- if (isOpen) {
16
- document.addEventListener("keydown", handleEscape);
17
- document.body.style.overflow = "hidden";
18
- }
19
- return () => {
20
- document.removeEventListener("keydown", handleEscape);
21
- document.body.style.overflow = "unset";
22
- };
23
- }, [isOpen, onClose]);
24
- // 모달 외부 클릭으로 닫기
25
- const handleOverlayClick = (e) => {
26
- if (closeOnOverlayClick && e.target === e.currentTarget) {
27
- onClose();
28
- }
29
- };
30
- // 모달 크기 클래스 (4의 배수, 8의 배수 스페이싱)
31
- const sizeClasses = {
32
- sm: "w-80 max-w-sm", // 320px
33
- md: "w-96 max-w-md", // 384px
34
- lg: "w-[500px] max-w-lg", // 500px
35
- xl: "w-[600px] max-w-xl", // 600px
36
- "2xl": "w-[800px] max-w-2xl" // 800px
37
- };
38
- if (!isOpen)
39
- return null;
40
- return createPortal(_jsxs("div", { ref: ref, className: cn("fixed inset-0 z-50 flex items-center justify-center p-4", // 16px 패딩
41
- centered ? "items-center" : "items-start pt-16", // 64px 상단 여백
42
- className), onClick: handleOverlayClick, ...props, children: [showBackdrop && (_jsx("div", { className: "absolute inset-0 bg-black/60 backdrop-blur-md transition-opacity duration-300" })), _jsxs("div", { ref: modalRef, className: cn("relative bg-white dark:bg-gray-800 rounded-2xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 mx-4 transform transition-all duration-300 ease-out overflow-hidden", sizeClasses[size]), style: {
43
- animation: "modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1)"
44
- }, children: [_jsx("div", { className: "absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-blue-500 via-purple-500 to-pink-500" }), _jsx("div", { className: "absolute top-0 right-0 w-32 h-32 bg-gradient-to-bl from-blue-400/10 to-transparent rounded-full -translate-y-16 translate-x-16" }), _jsx("div", { className: "absolute bottom-0 left-0 w-24 h-24 bg-gradient-to-tr from-purple-400/10 to-transparent rounded-full translate-y-12 -translate-x-12" }), title && (_jsxs("div", { className: "relative z-10 px-8 pt-8 pb-6 border-b border-gray-200/50 dark:border-gray-700/50", children: [" ", _jsx("h2", { className: "text-xl font-semibold text-gray-900 dark:text-white", children: title })] })), showCloseButton && (_jsx("button", { onClick: onClose, className: "absolute top-6 right-6 p-2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 transition-all duration-200 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 hover:scale-110 z-20" // 24px 여백
45
- , "aria-label": "\uB2EB\uAE30", children: _jsx("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })), _jsx("div", { className: cn("relative z-10", title ? "px-8 py-8" : "p-8" // 32px 여백
46
- ), children: children })] }), _jsx("style", { dangerouslySetInnerHTML: {
47
- __html: `
48
- @keyframes modalSlideIn {
49
- from {
50
- opacity: 0;
51
- transform: scale(0.95) translateY(20px);
52
- }
53
- to {
54
- opacity: 1;
55
- transform: scale(1) translateY(0);
56
- }
57
- }
58
- `
59
- } })] }), document.body);
60
- });
61
- Modal.displayName = "Modal";
62
- export { Modal };