@uniai-fe/ui-legacy 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (664) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +3 -0
  3. package/package.json +141 -0
  4. package/src/alternate/components/empty/Cage.tsx +29 -0
  5. package/src/alternate/components/empty/Data.tsx +35 -0
  6. package/src/alternate/components/empty/Table.tsx +38 -0
  7. package/src/alternate/components/index.tsx +19 -0
  8. package/src/alternate/components/loading/Default.tsx +38 -0
  9. package/src/alternate/components/loading/Icon.tsx +26 -0
  10. package/src/alternate/components/loading/Table.tsx +46 -0
  11. package/src/alternate/components/notice/SelectFlock.tsx +21 -0
  12. package/src/alternate/components/notice/SelectLabel.tsx +15 -0
  13. package/src/alternate/index.tsx +3 -0
  14. package/src/alternate/styles/styled/alternate.ts +92 -0
  15. package/src/asset-url.ts +7 -0
  16. package/src/button/button.scss +3 -0
  17. package/src/button/components/array/Add.tsx +39 -0
  18. package/src/button/components/array/Remove.tsx +34 -0
  19. package/src/button/components/base/Default.tsx +76 -0
  20. package/src/button/components/base/Expand.tsx +39 -0
  21. package/src/button/components/base/Link.tsx +40 -0
  22. package/src/button/components/base/Refresh.tsx +43 -0
  23. package/src/button/components/base/Reset.tsx +43 -0
  24. package/src/button/components/base/ResetSelected.tsx +35 -0
  25. package/src/button/components/base/Text.tsx +35 -0
  26. package/src/button/components/base/Tooltip.tsx +35 -0
  27. package/src/button/components/multiple/Container.tsx +70 -0
  28. package/src/button/components/select/SelectBox.tsx +37 -0
  29. package/src/button/icons/Expand.tsx +16 -0
  30. package/src/button/icons/Loading.tsx +20 -0
  31. package/src/button/icons/Refresh.tsx +20 -0
  32. package/src/button/icons/Reset.tsx +20 -0
  33. package/src/button/icons/ResetSelected.tsx +21 -0
  34. package/src/button/index.tsx +29 -0
  35. package/src/button/styled.tsx +12 -0
  36. package/src/button/styles/scss/multiple.scss +17 -0
  37. package/src/button/styles/scss/size.scss +46 -0
  38. package/src/button/styles/scss/theme.scss +36 -0
  39. package/src/button/styles/styled-components/button.ts +311 -0
  40. package/src/button/styles/styled-components/icon.ts +30 -0
  41. package/src/button/styles/styled-components/multiple.ts +75 -0
  42. package/src/button/styles/styled-components/template.ts +43 -0
  43. package/src/chart/chart.scss +11 -0
  44. package/src/chart/components/Contents.tsx +17 -0
  45. package/src/chart/components/control/Button.tsx +39 -0
  46. package/src/chart/components/control/Container.tsx +27 -0
  47. package/src/chart/components/control/Provider.tsx +117 -0
  48. package/src/chart/components/control/index.tsx +12 -0
  49. package/src/chart/components/custom/ActivePieSector.tsx +29 -0
  50. package/src/chart/components/graphs/ArcGauge.tsx +58 -0
  51. package/src/chart/components/graphs/ArcMeter.tsx +112 -0
  52. package/src/chart/components/graphs/Area.tsx +132 -0
  53. package/src/chart/components/graphs/Bar.tsx +179 -0
  54. package/src/chart/components/graphs/Doughnut.tsx +90 -0
  55. package/src/chart/components/graphs/Line.tsx +123 -0
  56. package/src/chart/components/graphs/index.tsx +17 -0
  57. package/src/chart/components/ticks/XAxis.tsx +39 -0
  58. package/src/chart/components/ticks/index.tsx +7 -0
  59. package/src/chart/index.tsx +17 -0
  60. package/src/chart/styled.tsx +3 -0
  61. package/src/chart/styles/scss/arc-gauge.scss +11 -0
  62. package/src/chart/styles/scss/arc-meter.scss +6 -0
  63. package/src/chart/styles/scss/control.scss +34 -0
  64. package/src/chart/styles/scss/filter.scss +0 -0
  65. package/src/chart/styles/scss/graph.scss +3 -0
  66. package/src/chart/styles/scss/legend.scss +35 -0
  67. package/src/chart/styles/scss/level.color.scss +7 -0
  68. package/src/chart/styles/scss/tick.scss +48 -0
  69. package/src/chart/styles/scss/tooltip.scss +70 -0
  70. package/src/chart/styles/styled/arc-gauge.ts +65 -0
  71. package/src/chart/styles/styled/arc-meter.ts +42 -0
  72. package/src/chart/styles/styled/common.ts +14 -0
  73. package/src/chart/styles/styled/control.ts +31 -0
  74. package/src/chart/styles/styled/legend.ts +11 -0
  75. package/src/chart/svg/gauge-track.min.svg +1 -0
  76. package/src/chart/utils/getLevel.ts +23 -0
  77. package/src/chip/chip.scss +1 -0
  78. package/src/chip/components/Default.tsx +40 -0
  79. package/src/chip/index.tsx +5 -0
  80. package/src/chip/styled.tsx +7 -0
  81. package/src/chip/styles/scss/variables.scss +15 -0
  82. package/src/chip/styles/styled/base.ts +41 -0
  83. package/src/components.tsx +42 -0
  84. package/src/delta/components/Rounded.tsx +72 -0
  85. package/src/delta/components/Square.tsx +72 -0
  86. package/src/delta/index.tsx +6 -0
  87. package/src/delta/styles/styled/delta.ts +126 -0
  88. package/src/dot/components/Location.tsx +55 -0
  89. package/src/dot/index.tsx +7 -0
  90. package/src/dot/styles/styled/location.ts +78 -0
  91. package/src/dropdown/components/Container.tsx +36 -0
  92. package/src/dropdown/components/ParentContainer.tsx +32 -0
  93. package/src/dropdown/dropdown.scss +1 -0
  94. package/src/dropdown/index.tsx +9 -0
  95. package/src/dropdown/styled.tsx +3 -0
  96. package/src/dropdown/styles/scss/variables.scss +24 -0
  97. package/src/dropdown/styles/styled-components/dropdown.ts +79 -0
  98. package/src/form/components/Provider.tsx +37 -0
  99. package/src/form/index.tsx +5 -0
  100. package/src/form-field/common/components/item-contents/Container.tsx +51 -0
  101. package/src/form-field/common/components/item-contents/Label.tsx +21 -0
  102. package/src/form-field/common/components/item-contents/Wrapper.tsx +24 -0
  103. package/src/form-field/common/components/item-contents/index.tsx +11 -0
  104. package/src/form-field/common/field.scss +2 -0
  105. package/src/form-field/common/hook.tsx +1 -0
  106. package/src/form-field/common/hooks/index.tsx +13 -0
  107. package/src/form-field/common/hooks/types.ts +16 -0
  108. package/src/form-field/common/hooks/useChangeEvents.ts +171 -0
  109. package/src/form-field/common/hooks/useInputCountdown.ts +115 -0
  110. package/src/form-field/common/hooks/useInputFile.ts +94 -0
  111. package/src/form-field/common/hooks/useInputMask.ts +56 -0
  112. package/src/form-field/common/hooks/useOpenDaumPostCodePopup.tsx +55 -0
  113. package/src/form-field/common/index.tsx +7 -0
  114. package/src/form-field/common/jotai/find-address.ts +4 -0
  115. package/src/form-field/common/jotai/password-hide.ts +6 -0
  116. package/src/form-field/common/styled.tsx +7 -0
  117. package/src/form-field/common/styles/scss/reset.scss +52 -0
  118. package/src/form-field/common/styles/scss/variables.scss +52 -0
  119. package/src/form-field/common/styles/styled-components/item.ts +148 -0
  120. package/src/form-field/input/components/Container.tsx +54 -0
  121. package/src/form-field/input/components/assets/button/ResetButton.tsx +24 -0
  122. package/src/form-field/input/components/assets/calendar/DatePicker.tsx +184 -0
  123. package/src/form-field/input/components/assets/calendar/DateTimePicker.tsx +187 -0
  124. package/src/form-field/input/components/assets/calendar/TimePicker.tsx +163 -0
  125. package/src/form-field/input/components/assets/calendar/custom/ButtonContainer.tsx +15 -0
  126. package/src/form-field/input/components/assets/calendar/custom/TodayButton.tsx +23 -0
  127. package/src/form-field/input/components/assets/icon/CalendarIcon.tsx +14 -0
  128. package/src/form-field/input/components/assets/icon/CheckIcon.tsx +14 -0
  129. package/src/form-field/input/components/assets/icon/ExpandIcon.tsx +14 -0
  130. package/src/form-field/input/components/assets/icon/StatusIcon.tsx +17 -0
  131. package/src/form-field/input/components/assets/util/Countdown.tsx +34 -0
  132. package/src/form-field/input/components/assets/util/StatusNotice.tsx +22 -0
  133. package/src/form-field/input/components/click/Checkbox.tsx +99 -0
  134. package/src/form-field/input/components/click/Radio.tsx +77 -0
  135. package/src/form-field/input/components/click/index.tsx +9 -0
  136. package/src/form-field/input/components/date-time/Date.tsx +74 -0
  137. package/src/form-field/input/components/date-time/DateTime.tsx +72 -0
  138. package/src/form-field/input/components/date-time/Time.tsx +60 -0
  139. package/src/form-field/input/components/file-upload/Container.tsx +117 -0
  140. package/src/form-field/input/components/file-upload/DragAndDrop.tsx +65 -0
  141. package/src/form-field/input/components/text/Box.tsx +134 -0
  142. package/src/form-field/input/components/text/index.tsx +7 -0
  143. package/src/form-field/input/index.tsx +19 -0
  144. package/src/form-field/input/input.scss +2 -0
  145. package/src/form-field/input/styled.tsx +5 -0
  146. package/src/form-field/input/styles/scss/size.scss +39 -0
  147. package/src/form-field/input/styles/scss/theme.scss +39 -0
  148. package/src/form-field/input/styles/styled-components/base.ts +96 -0
  149. package/src/form-field/input/styles/styled-components/calendar.ts +18 -0
  150. package/src/form-field/input/styles/styled-components/click.ts +37 -0
  151. package/src/form-field/input/styles/styled-components/input-file.ts +26 -0
  152. package/src/form-field/input/styles/styled-components/mixin.ts +200 -0
  153. package/src/form-field/input/styles/styled-components/util.ts +47 -0
  154. package/src/form-field/select/components/Default.tsx +222 -0
  155. package/src/form-field/select/components/MultipleCategoryList.tsx +47 -0
  156. package/src/form-field/select/components/MultipleDefault.tsx +63 -0
  157. package/src/form-field/select/components/assets/Container.tsx +40 -0
  158. package/src/form-field/select/components/assets/dropdown/Default.tsx +114 -0
  159. package/src/form-field/select/components/assets/dropdown/MultipleCategoryList.tsx +95 -0
  160. package/src/form-field/select/components/assets/dropdown/MultipleDefault.tsx +149 -0
  161. package/src/form-field/select/components/assets/dropdown/Selected.tsx +48 -0
  162. package/src/form-field/select/index.tsx +13 -0
  163. package/src/form-field/select/select.scss +1 -0
  164. package/src/form-field/select/styled.tsx +5 -0
  165. package/src/form-field/select/styles/scss/variable.scss +14 -0
  166. package/src/form-field/select/styles/styled-components/base.ts +135 -0
  167. package/src/frame/components/breadcrumb/Arrow.tsx +18 -0
  168. package/src/frame/components/breadcrumb/Container.tsx +20 -0
  169. package/src/frame/components/breadcrumb/Dropdown.tsx +28 -0
  170. package/src/frame/components/breadcrumb/Item.tsx +30 -0
  171. package/src/frame/components/breadcrumb/Label.tsx +11 -0
  172. package/src/frame/components/breadcrumb/SelectBox.tsx +48 -0
  173. package/src/frame/components/breadcrumb/SelectItem.tsx +47 -0
  174. package/src/frame/components/breadcrumb/Selected.tsx +25 -0
  175. package/src/frame/components/breadcrumb/index.tsx +15 -0
  176. package/src/frame/components/header/Container.tsx +11 -0
  177. package/src/frame/components/header/Logo.tsx +19 -0
  178. package/src/frame/components/header/index.tsx +27 -0
  179. package/src/frame/components/header/util/Button.tsx +31 -0
  180. package/src/frame/components/header/util/Container.tsx +15 -0
  181. package/src/frame/components/header/util/Item.tsx +16 -0
  182. package/src/frame/components/header/util/logout/Logout.tsx +22 -0
  183. package/src/frame/components/header/util/notify/Container.tsx +57 -0
  184. package/src/frame/components/header/util/notify/Dropdown.tsx +24 -0
  185. package/src/frame/components/header/util/notify/List.tsx +56 -0
  186. package/src/frame/components/header/util/notify/OpenButton.tsx +35 -0
  187. package/src/frame/components/header/util/notify/RefreshButton.tsx +31 -0
  188. package/src/frame/components/header/util/profile/Avatar.tsx +19 -0
  189. package/src/frame/components/header/util/profile/Container.tsx +61 -0
  190. package/src/frame/components/header/util/profile/Dropdown.tsx +30 -0
  191. package/src/frame/components/header/util/profile/DropdownButton.tsx +27 -0
  192. package/src/frame/components/header/util/profile/Selected.tsx +29 -0
  193. package/src/frame/components/header/util/setting/Button.tsx +39 -0
  194. package/src/frame/components/header/util/time/Container.tsx +13 -0
  195. package/src/frame/components/header/util/time/Time.tsx +11 -0
  196. package/src/frame/components/index.tsx +17 -0
  197. package/src/frame/components/nav/Button.tsx +22 -0
  198. package/src/frame/components/nav/Container.tsx +64 -0
  199. package/src/frame/components/nav/Logo.tsx +24 -0
  200. package/src/frame/components/nav/index.tsx +5 -0
  201. package/src/frame/components/page/Container.tsx +11 -0
  202. package/src/frame/components/page/ServiceFrame.tsx +13 -0
  203. package/src/frame/components/page/ServiceMain.tsx +13 -0
  204. package/src/frame/components/page/ServiceMainWrapper.tsx +26 -0
  205. package/src/frame/components/page/index.tsx +14 -0
  206. package/src/frame/components/popup/Container.tsx +21 -0
  207. package/src/frame/components/popup/frame/Body.tsx +17 -0
  208. package/src/frame/components/popup/frame/Container.tsx +20 -0
  209. package/src/frame/components/popup/frame/Header.tsx +27 -0
  210. package/src/frame/components/popup/frame/index.tsx +11 -0
  211. package/src/frame/components/popup/index.tsx +9 -0
  212. package/src/frame/frame.scss +2 -0
  213. package/src/frame/index.tsx +3 -0
  214. package/src/frame/styled.tsx +3 -0
  215. package/src/frame/styles/scss/size.variables.scss +28 -0
  216. package/src/frame/styles/scss/theme.variables.scss +23 -0
  217. package/src/frame/styles/styled-components/breadcrumb/base.ts +126 -0
  218. package/src/frame/styles/styled-components/index.ts +13 -0
  219. package/src/frame/styles/styled-components/page/common.ts +66 -0
  220. package/src/frame/styles/styled-components/page/header.ts +44 -0
  221. package/src/frame/styles/styled-components/page/nav.ts +127 -0
  222. package/src/frame/styles/styled-components/page/util.common.ts +48 -0
  223. package/src/frame/styles/styled-components/page/util.notify.ts +116 -0
  224. package/src/frame/styles/styled-components/page/util.profile.ts +78 -0
  225. package/src/frame/styles/styled-components/popup/popup.ts +66 -0
  226. package/src/icon/components/alternate/Loading.tsx +15 -0
  227. package/src/icon/components/alternate/index.tsx +7 -0
  228. package/src/icon/components/arrow/dropdown/Breadcrumb.tsx +20 -0
  229. package/src/icon/components/arrow/dropdown/Select.tsx +20 -0
  230. package/src/icon/components/arrow/index.tsx +11 -0
  231. package/src/icon/components/button/Close.tsx +20 -0
  232. package/src/icon/components/button/Filter.tsx +19 -0
  233. package/src/icon/components/button/Refresh.tsx +18 -0
  234. package/src/icon/components/button/Reset.tsx +18 -0
  235. package/src/icon/components/button/add/Outline.tsx +23 -0
  236. package/src/icon/components/button/add/Solid.tsx +23 -0
  237. package/src/icon/components/button/add/index.tsx +9 -0
  238. package/src/icon/components/button/index.tsx +17 -0
  239. package/src/icon/components/button/remove/Outline.tsx +23 -0
  240. package/src/icon/components/button/remove/Solid.tsx +23 -0
  241. package/src/icon/components/button/remove/index.tsx +9 -0
  242. package/src/icon/components/cage/Fan.tsx +48 -0
  243. package/src/icon/components/cage/index.tsx +7 -0
  244. package/src/icon/components/chart/Control.tsx +40 -0
  245. package/src/icon/components/chart/index.tsx +7 -0
  246. package/src/icon/components/delta/Delta.tsx +79 -0
  247. package/src/icon/components/delta/index.tsx +3 -0
  248. package/src/icon/components/health-score/HealthScore.tsx +46 -0
  249. package/src/icon/components/health-score/index.tsx +3 -0
  250. package/src/icon/components/input/Checkbox.tsx +33 -0
  251. package/src/icon/components/input/Radio.tsx +17 -0
  252. package/src/icon/components/input/Search.tsx +12 -0
  253. package/src/icon/components/input/index.tsx +11 -0
  254. package/src/icon/components/nav/common/Farm.tsx +12 -0
  255. package/src/icon/components/nav/factory-service/CCTV.tsx +12 -0
  256. package/src/icon/components/nav/factory-service/Dashboard.tsx +12 -0
  257. package/src/icon/components/nav/factory-service/Home.tsx +12 -0
  258. package/src/icon/components/nav/factory-service/Message.tsx +12 -0
  259. package/src/icon/components/nav/factory-service/Productivity.tsx +12 -0
  260. package/src/icon/components/nav/farm-service/Analysis.tsx +12 -0
  261. package/src/icon/components/nav/farm-service/Control.tsx +12 -0
  262. package/src/icon/components/nav/farm-service/Dashboard.tsx +12 -0
  263. package/src/icon/components/nav/farm-service/Eggs.tsx +12 -0
  264. package/src/icon/components/nav/farm-service/Feeding.tsx +12 -0
  265. package/src/icon/components/nav/farm-service/Feeds.tsx +12 -0
  266. package/src/icon/components/nav/farm-service/Flock.tsx +12 -0
  267. package/src/icon/components/nav/farm-service/Medicine.tsx +12 -0
  268. package/src/icon/components/nav/farm-service/Summary.tsx +12 -0
  269. package/src/icon/components/nav/index.tsx +44 -0
  270. package/src/icon/components/page-header/Check.tsx +12 -0
  271. package/src/icon/components/page-header/index.tsx +5 -0
  272. package/src/icon/components/tab-menu/Graph.tsx +12 -0
  273. package/src/icon/components/tab-menu/Table.tsx +12 -0
  274. package/src/icon/components/tab-menu/index.tsx +9 -0
  275. package/src/icon/components/table/index.tsx +9 -0
  276. package/src/icon/components/table/pagination/First.tsx +18 -0
  277. package/src/icon/components/table/pagination/Last.tsx +18 -0
  278. package/src/icon/components/table/pagination/Next.tsx +18 -0
  279. package/src/icon/components/table/pagination/Prev.tsx +18 -0
  280. package/src/icon/components/table/pagination/index.tsx +13 -0
  281. package/src/icon/components/table/sort/Asc.tsx +12 -0
  282. package/src/icon/components/table/sort/Common.tsx +12 -0
  283. package/src/icon/components/table/sort/Desc.tsx +12 -0
  284. package/src/icon/components/table/sort/index.tsx +11 -0
  285. package/src/icon/components/tooltip/Outline.tsx +7 -0
  286. package/src/icon/components/tooltip/Solid.tsx +7 -0
  287. package/src/icon/components/tooltip/index.tsx +9 -0
  288. package/src/icon/icon.scss +5 -0
  289. package/src/icon/index.tsx +31 -0
  290. package/src/icon/styled.tsx +17 -0
  291. package/src/icon/styles/scss/arrow.scss +6 -0
  292. package/src/icon/styles/scss/chart.scss +3 -0
  293. package/src/icon/styles/scss/input.scss +11 -0
  294. package/src/icon/styles/scss/page-header.scss +6 -0
  295. package/src/icon/styles/scss/table.scss +6 -0
  296. package/src/icon/styles/styled/arrow.ts +18 -0
  297. package/src/icon/styles/styled/chart.ts +17 -0
  298. package/src/icon/styles/styled/common.ts +27 -0
  299. package/src/icon/styles/styled/delta.ts +25 -0
  300. package/src/icon/styles/styled/input.ts +76 -0
  301. package/src/icon/styles/styled/page-header.ts +17 -0
  302. package/src/icon/styles/styled/table.ts +19 -0
  303. package/src/icon/svg/arrow/depth.svg +3 -0
  304. package/src/icon/svg/arrow/dropdown/breadcrumb.svg +3 -0
  305. package/src/icon/svg/arrow/dropdown/select.svg +3 -0
  306. package/src/icon/svg/button/add-outline.svg +4 -0
  307. package/src/icon/svg/button/add-solid.svg +3 -0
  308. package/src/icon/svg/button/close.svg +3 -0
  309. package/src/icon/svg/button/filter.svg +5 -0
  310. package/src/icon/svg/button/loading.svg +4 -0
  311. package/src/icon/svg/button/refresh.svg +4 -0
  312. package/src/icon/svg/button/remove-outline.svg +3 -0
  313. package/src/icon/svg/button/remove-solid.svg +3 -0
  314. package/src/icon/svg/button/reset.svg +3 -0
  315. package/src/icon/svg/chart/control/pan-left.svg +4 -0
  316. package/src/icon/svg/chart/control/pan-right.svg +4 -0
  317. package/src/icon/svg/chart/control/zoom-in.svg +4 -0
  318. package/src/icon/svg/chart/control/zoom-out.svg +4 -0
  319. package/src/icon/svg/delta/down-arrow.svg +4 -0
  320. package/src/icon/svg/delta/down-flat.svg +10 -0
  321. package/src/icon/svg/delta/down-rounded.svg +10 -0
  322. package/src/icon/svg/delta/up-arrow.svg +4 -0
  323. package/src/icon/svg/delta/up-flat.svg +10 -0
  324. package/src/icon/svg/delta/up-rounded.svg +10 -0
  325. package/src/icon/svg/input/search.svg +4 -0
  326. package/src/icon/svg/nav/factory-service/cctv.svg +3 -0
  327. package/src/icon/svg/nav/factory-service/dashboard.svg +3 -0
  328. package/src/icon/svg/nav/factory-service/farm.svg +3 -0
  329. package/src/icon/svg/nav/factory-service/home.svg +5 -0
  330. package/src/icon/svg/nav/factory-service/message.svg +3 -0
  331. package/src/icon/svg/nav/farm-service/analysis.svg +3 -0
  332. package/src/icon/svg/nav/farm-service/cctv.svg +3 -0
  333. package/src/icon/svg/nav/farm-service/control.svg +3 -0
  334. package/src/icon/svg/nav/farm-service/dashboard.svg +5 -0
  335. package/src/icon/svg/nav/farm-service/eggs.svg +3 -0
  336. package/src/icon/svg/nav/farm-service/feeds.svg +14 -0
  337. package/src/icon/svg/nav/farm-service/flock.svg +14 -0
  338. package/src/icon/svg/nav/farm-service/medicine.svg +4 -0
  339. package/src/icon/svg/nav/farm-service/summary.svg +7 -0
  340. package/src/icon/svg/nav/farm.svg +3 -0
  341. package/src/icon/svg/nav/grid.svg +3 -0
  342. package/src/icon/svg/nav/lock.svg +1 -0
  343. package/src/icon/svg/page-header/check.svg +3 -0
  344. package/src/icon/svg/tab-menu/graph.svg +3 -0
  345. package/src/icon/svg/tab-menu/table.svg +8 -0
  346. package/src/icon/svg/table/pagination/first.svg +4 -0
  347. package/src/icon/svg/table/pagination/last.svg +4 -0
  348. package/src/icon/svg/table/pagination/next.svg +3 -0
  349. package/src/icon/svg/table/pagination/prev.svg +3 -0
  350. package/src/icon/svg/table/sort/asc.svg +3 -0
  351. package/src/icon/svg/table/sort/common.svg +6 -0
  352. package/src/icon/svg/table/sort/desc.svg +3 -0
  353. package/src/icon/svg/tooltip/outline.svg +5 -0
  354. package/src/icon/svg/tooltip/solid.svg +3 -0
  355. package/src/index.scss +20 -0
  356. package/src/index.tsx +16 -0
  357. package/src/modal/components/assets/alert/MessageBox.tsx +26 -0
  358. package/src/modal/components/assets/alert/index.tsx +7 -0
  359. package/src/modal/components/assets/button/ButtonClose.tsx +34 -0
  360. package/src/modal/components/assets/button/ButtonDialog.tsx +32 -0
  361. package/src/modal/components/assets/button/index.tsx +6 -0
  362. package/src/modal/components/assets/form/ButtonContainer.tsx +18 -0
  363. package/src/modal/components/assets/form/Provider.tsx +12 -0
  364. package/src/modal/components/assets/form/index.tsx +9 -0
  365. package/src/modal/components/assets/layout/Body.tsx +7 -0
  366. package/src/modal/components/assets/layout/Container.tsx +37 -0
  367. package/src/modal/components/assets/layout/Footer.tsx +25 -0
  368. package/src/modal/components/assets/layout/Header.tsx +45 -0
  369. package/src/modal/components/assets/layout/index.tsx +14 -0
  370. package/src/modal/components/basic/Container.tsx +45 -0
  371. package/src/modal/components/basic/Provider.tsx +30 -0
  372. package/src/modal/components/basic/Root.tsx +84 -0
  373. package/src/modal/components/basic/index.tsx +11 -0
  374. package/src/modal/components/draggable/Container.tsx +75 -0
  375. package/src/modal/components/draggable/Provider.tsx +26 -0
  376. package/src/modal/components/draggable/index.tsx +9 -0
  377. package/src/modal/components/index.tsx +17 -0
  378. package/src/modal/hooks/useModal.ts +295 -0
  379. package/src/modal/index.tsx +3 -0
  380. package/src/modal/jotai/modal.ts +18 -0
  381. package/src/modal/modal.scss +2 -0
  382. package/src/modal/styled.tsx +15 -0
  383. package/src/modal/styles/scss/legacy.scss +254 -0
  384. package/src/modal/styles/scss/variables.scss +32 -0
  385. package/src/modal/styles/styled-components/alert.ts +24 -0
  386. package/src/modal/styles/styled-components/basic.ts +41 -0
  387. package/src/modal/styles/styled-components/draggable.ts +35 -0
  388. package/src/modal/styles/styled-components/form.ts +23 -0
  389. package/src/modal/styles/styled-components/layout.ts +106 -0
  390. package/src/modal/util.ts +4 -0
  391. package/src/scrollbar/components/Container.tsx +70 -0
  392. package/src/scrollbar/index.tsx +5 -0
  393. package/src/scrollbar/scrollbar.scss +2 -0
  394. package/src/scrollbar/styled.tsx +3 -0
  395. package/src/scrollbar/styles/scss/reset.scss +59 -0
  396. package/src/scrollbar/styles/scss/size.scss +4 -0
  397. package/src/scrollbar/styles/styled-components/scrollbar.ts +82 -0
  398. package/src/style-base/base.scss +6 -0
  399. package/src/style-base/essentials/calendar.scss +557 -0
  400. package/src/style-base/essentials/colors.scss +195 -0
  401. package/src/style-base/essentials/document.scss +14 -0
  402. package/src/style-base/essentials/fonts.scss +24 -0
  403. package/src/style-base/essentials/icon.scss +11 -0
  404. package/src/style-base/essentials/palette.scss +146 -0
  405. package/src/style-base/essentials/reset.scss +156 -0
  406. package/src/style-base/mantine.css +4 -0
  407. package/src/style-base/responsive.scss +57 -0
  408. package/src/style-config/index.ts +5 -0
  409. package/src/style-config/postcss/postcss-config.ts +9 -0
  410. package/src/styled.components.tsx +31 -0
  411. package/src/styled.template.tsx +5 -0
  412. package/src/tab-menu/components/custom/AddButton.tsx +32 -0
  413. package/src/tab-menu/components/custom/Container.tsx +60 -0
  414. package/src/tab-menu/components/custom/MenuButton.tsx +39 -0
  415. package/src/tab-menu/components/filter/Default.tsx +3 -0
  416. package/src/tab-menu/components/filter/WithData.tsx +36 -0
  417. package/src/tab-menu/components/mode/List.tsx +66 -0
  418. package/src/tab-menu/components/page/List.tsx +88 -0
  419. package/src/tab-menu/components/separated-square/List.tsx +66 -0
  420. package/src/tab-menu/components/text/List.tsx +53 -0
  421. package/src/tab-menu/index.tsx +21 -0
  422. package/src/tab-menu/styled.tsx +21 -0
  423. package/src/tab-menu/styles/scss/mode.scss +5 -0
  424. package/src/tab-menu/styles/scss/page-menu.scss +4 -0
  425. package/src/tab-menu/styles/scss/text-menu.scss +7 -0
  426. package/src/tab-menu/styles/styled-components/custom-menu.ts +80 -0
  427. package/src/tab-menu/styles/styled-components/filter-with-data.ts +72 -0
  428. package/src/tab-menu/styles/styled-components/mode-menu.ts +114 -0
  429. package/src/tab-menu/styles/styled-components/page-menu.ts +90 -0
  430. package/src/tab-menu/styles/styled-components/separated-square.ts +78 -0
  431. package/src/tab-menu/styles/styled-components/tab-menu.ts +21 -0
  432. package/src/tab-menu/styles/styled-components/text-menu.ts +73 -0
  433. package/src/tab-menu/tab-menu.scss +3 -0
  434. package/src/table/components/pagination/Button.tsx +61 -0
  435. package/src/table/components/pagination/Container.tsx +148 -0
  436. package/src/table/components/pagination/Icon.tsx +26 -0
  437. package/src/table/components/sort/Button.tsx +34 -0
  438. package/src/table/components/tables/Container.tsx +41 -0
  439. package/src/table/components/tables/basic/Container.tsx +52 -0
  440. package/src/table/components/tables/basic/index.tsx +13 -0
  441. package/src/table/components/tables/common/Body.tsx +29 -0
  442. package/src/table/components/tables/common/Cell.tsx +32 -0
  443. package/src/table/components/tables/common/CellWrap.tsx +27 -0
  444. package/src/table/components/tables/common/ColGroup.tsx +30 -0
  445. package/src/table/components/tables/common/DefaultTemplate.tsx +37 -0
  446. package/src/table/components/tables/common/Foot.tsx +25 -0
  447. package/src/table/components/tables/common/Head.tsx +25 -0
  448. package/src/table/components/tables/common/HeadDefault.tsx +42 -0
  449. package/src/table/components/tables/common/Row.tsx +36 -0
  450. package/src/table/components/tables/common/TopLine.tsx +11 -0
  451. package/src/table/components/tables/common/index.tsx +37 -0
  452. package/src/table/components/tables/grid/Cell.tsx +25 -0
  453. package/src/table/components/tables/grid/Container.tsx +23 -0
  454. package/src/table/components/tables/grid/Contents.tsx +25 -0
  455. package/src/table/components/tables/grid/index.tsx +19 -0
  456. package/src/table/components/tables/list/Container.tsx +36 -0
  457. package/src/table/components/tables/list/index.tsx +13 -0
  458. package/src/table/components/tables/sheet/Container.tsx +39 -0
  459. package/src/table/components/tables/sheet/index.tsx +13 -0
  460. package/src/table/hooks/index.ts +5 -0
  461. package/src/table/hooks/useTableColumns.ts +24 -0
  462. package/src/table/hooks/useTablePage.ts +150 -0
  463. package/src/table/hooks/useTableRowCheck.ts +112 -0
  464. package/src/table/hooks/useTableSearch.ts +69 -0
  465. package/src/table/hooks/useTableSort.ts +108 -0
  466. package/src/table/index.tsx +37 -0
  467. package/src/table/styled.tsx +3 -0
  468. package/src/table/styles/scss/common.scss +31 -0
  469. package/src/table/styles/scss/pagination.scss +14 -0
  470. package/src/table/styles/scss/reset.scss +7 -0
  471. package/src/table/styles/styled/basic.ts +59 -0
  472. package/src/table/styles/styled/common.ts +123 -0
  473. package/src/table/styles/styled/grid.ts +62 -0
  474. package/src/table/styles/styled/index.ts +20 -0
  475. package/src/table/styles/styled/list.ts +38 -0
  476. package/src/table/styles/styled/pagination.ts +77 -0
  477. package/src/table/styles/styled/sort.ts +25 -0
  478. package/src/table/styles/styled/spreadsheet.ts +86 -0
  479. package/src/table/table.scss +3 -0
  480. package/src/table/util.ts +1 -0
  481. package/src/template/compare/compare.scss +1 -0
  482. package/src/template/compare/components/box/Container.tsx +33 -0
  483. package/src/template/compare/components/box/TextStrong.tsx +15 -0
  484. package/src/template/compare/components/box/TextSub.tsx +15 -0
  485. package/src/template/compare/components/box/index.tsx +11 -0
  486. package/src/template/compare/components/button/Remove.tsx +28 -0
  487. package/src/template/compare/components/button/index.tsx +5 -0
  488. package/src/template/compare/components/chart/Container.tsx +33 -0
  489. package/src/template/compare/components/chart/graph/Container.tsx +15 -0
  490. package/src/template/compare/components/chart/graph/Item.tsx +13 -0
  491. package/src/template/compare/components/chart/index.tsx +16 -0
  492. package/src/template/compare/components/chart/legend/Container.tsx +23 -0
  493. package/src/template/compare/components/chart/legend/Section.tsx +31 -0
  494. package/src/template/compare/components/select-list/Container.tsx +15 -0
  495. package/src/template/compare/components/select-list/Header.tsx +15 -0
  496. package/src/template/compare/components/select-list/Item.tsx +15 -0
  497. package/src/template/compare/components/select-list/List.tsx +18 -0
  498. package/src/template/compare/components/select-list/index.tsx +13 -0
  499. package/src/template/compare/index.tsx +13 -0
  500. package/src/template/compare/styled.tsx +17 -0
  501. package/src/template/compare/styles/scss/variables.scss +17 -0
  502. package/src/template/compare/styles/styled-components/chart/graph.ts +26 -0
  503. package/src/template/compare/styles/styled-components/chart/layout.ts +38 -0
  504. package/src/template/compare/styles/styled-components/chart/legend.ts +64 -0
  505. package/src/template/compare/styles/styled-components/common.ts +57 -0
  506. package/src/template/compare/styles/styled-components/select-list.ts +36 -0
  507. package/src/template/filter/components/Container.tsx +39 -0
  508. package/src/template/filter/components/Group.tsx +100 -0
  509. package/src/template/filter/components/ToggleButton.tsx +27 -0
  510. package/src/template/filter/index.tsx +5 -0
  511. package/src/template/filter/styled.tsx +3 -0
  512. package/src/template/filter/styles/styled-components/filter.ts +66 -0
  513. package/src/template/health-score/components/Chart.tsx +38 -0
  514. package/src/template/health-score/index.tsx +3 -0
  515. package/src/template/health-score/styled.tsx +3 -0
  516. package/src/template/health-score/styles/styled/chart.ts +26 -0
  517. package/src/template.tsx +5 -0
  518. package/src/text-editor/components/Container.tsx +68 -0
  519. package/src/text-editor/components/Contents.tsx +14 -0
  520. package/src/text-editor/components/toolbar/Container.tsx +20 -0
  521. package/src/text-editor/components/toolbar/ControlsGroup.tsx +18 -0
  522. package/src/text-editor/components/toolbar/align/Center.tsx +23 -0
  523. package/src/text-editor/components/toolbar/align/Justify.tsx +23 -0
  524. package/src/text-editor/components/toolbar/align/Left.tsx +23 -0
  525. package/src/text-editor/components/toolbar/align/Right.tsx +23 -0
  526. package/src/text-editor/components/toolbar/index.tsx +35 -0
  527. package/src/text-editor/components/toolbar/list/Bullet.tsx +23 -0
  528. package/src/text-editor/components/toolbar/list/Ordered.tsx +23 -0
  529. package/src/text-editor/components/toolbar/text/Bold.tsx +23 -0
  530. package/src/text-editor/components/toolbar/text/Italic.tsx +23 -0
  531. package/src/text-editor/components/toolbar/text/Strike.tsx +27 -0
  532. package/src/text-editor/components/toolbar/text/Underline.tsx +23 -0
  533. package/src/text-editor/index.tsx +11 -0
  534. package/src/text-editor/styled.tsx +5 -0
  535. package/src/text-editor/styles/scss/style.scss +10 -0
  536. package/src/text-editor/styles/scss/theme.scss +17 -0
  537. package/src/text-editor/styles/styled/editor.ts +73 -0
  538. package/src/text-editor/svg/align/center.svg +6 -0
  539. package/src/text-editor/svg/align/justify.svg +6 -0
  540. package/src/text-editor/svg/align/left.svg +6 -0
  541. package/src/text-editor/svg/align/right.svg +6 -0
  542. package/src/text-editor/svg/list/bullet.svg +8 -0
  543. package/src/text-editor/svg/list/ordered.svg +8 -0
  544. package/src/text-editor/svg/text/bold.svg +4 -0
  545. package/src/text-editor/svg/text/italic.svg +5 -0
  546. package/src/text-editor/svg/text/strikethrough.svg +4 -0
  547. package/src/text-editor/svg/text/underline.svg +4 -0
  548. package/src/text-editor/text-editor.scss +2 -0
  549. package/src/tooltip/components/Help.tsx +38 -0
  550. package/src/tooltip/components/MessageBox.tsx +26 -0
  551. package/src/tooltip/components/Wrapper.tsx +34 -0
  552. package/src/tooltip/index.tsx +11 -0
  553. package/src/tooltip/styled.tsx +9 -0
  554. package/src/tooltip/styles/scss/size.scss +4 -0
  555. package/src/tooltip/styles/styled-components/base.ts +20 -0
  556. package/src/tooltip/styles/styled-components/help.ts +17 -0
  557. package/src/tooltip/styles/styled-components/message-box.ts +74 -0
  558. package/src/tooltip/tooltip.scss +1 -0
  559. package/src/types/button/base.d.ts +91 -0
  560. package/src/types/button/index.d.ts +2 -0
  561. package/src/types/button/multiple.d.ts +6 -0
  562. package/src/types/chart/axis.d.ts +15 -0
  563. package/src/types/chart/control.d.ts +109 -0
  564. package/src/types/chart/data.d.ts +41 -0
  565. package/src/types/chart/dot.d.ts +3 -0
  566. package/src/types/chart/index.d.ts +7 -0
  567. package/src/types/chart/legend.d.ts +124 -0
  568. package/src/types/chart/props.d.ts +271 -0
  569. package/src/types/chart/tick.d.ts +30 -0
  570. package/src/types/chip/index.d.ts +1 -0
  571. package/src/types/chip/props.d.ts +14 -0
  572. package/src/types/common.d.ts +16 -0
  573. package/src/types/delta/index.d.ts +1 -0
  574. package/src/types/delta/option.d.ts +57 -0
  575. package/src/types/form/common/format.d.ts +15 -0
  576. package/src/types/form/common/hook.d.ts +74 -0
  577. package/src/types/form/common/index.d.ts +6 -0
  578. package/src/types/form/common/label.d.ts +11 -0
  579. package/src/types/form/common/props.d.ts +136 -0
  580. package/src/types/form/common/state.d.ts +96 -0
  581. package/src/types/form/common/validation.d.ts +18 -0
  582. package/src/types/form/index.d.ts +5 -0
  583. package/src/types/form/input/index.d.ts +7 -0
  584. package/src/types/form/input/legacy/auto-complete.d.ts +77 -0
  585. package/src/types/form/input/legacy/base.d.ts +159 -0
  586. package/src/types/form/input/legacy/find-address.d.ts +7 -0
  587. package/src/types/form/input/legacy/refer.d.ts +84 -0
  588. package/src/types/form/input/legacy/select.options.d.ts +123 -0
  589. package/src/types/form/input/props.d.ts +156 -0
  590. package/src/types/form/search/index.d.ts +1 -0
  591. package/src/types/form/search/search.d.ts +4 -0
  592. package/src/types/form/select/index.d.ts +2 -0
  593. package/src/types/form/select/option.d.ts +43 -0
  594. package/src/types/form/select/props.d.ts +101 -0
  595. package/src/types/form/util/find-address.d.ts +7 -0
  596. package/src/types/form/util/index.d.ts +1 -0
  597. package/src/types/frame/index.d.ts +2 -0
  598. package/src/types/frame/notify.d.ts +7 -0
  599. package/src/types/frame/sitemap.d.ts +38 -0
  600. package/src/types/icon/delta.d.ts +32 -0
  601. package/src/types/icon/fan.d.ts +17 -0
  602. package/src/types/icon/index.d.ts +2 -0
  603. package/src/types/index.d.ts +15 -0
  604. package/src/types/location/geojson.d.ts +59 -0
  605. package/src/types/location/index.d.ts +2 -0
  606. package/src/types/location/region.d.ts +19 -0
  607. package/src/types/modal/index.d.ts +2 -0
  608. package/src/types/modal/modal.d.ts +88 -0
  609. package/src/types/modal/modal.options.d.ts +33 -0
  610. package/src/types/style-option.d.ts +33 -0
  611. package/src/types/tab-menu/index.d.ts +1 -0
  612. package/src/types/tab-menu/tab-menu.d.ts +37 -0
  613. package/src/types/table/components/pagination.d.ts +7 -0
  614. package/src/types/table/components/props.d.ts +104 -0
  615. package/src/types/table/data/column.d.ts +60 -0
  616. package/src/types/table/data/row.d.ts +26 -0
  617. package/src/types/table/index.d.ts +10 -0
  618. package/src/types/table/layout/grid.d.ts +8 -0
  619. package/src/types/table/layout/layout.d.ts +3 -0
  620. package/src/types/table/utils/row.check.d.ts +37 -0
  621. package/src/types/template/compare/chart.d.ts +8 -0
  622. package/src/types/template/filter.d.ts +39 -0
  623. package/src/types/template/index.d.ts +2 -0
  624. package/src/types/weather/api.d.ts +184 -0
  625. package/src/types/weather/base.d.ts +14 -0
  626. package/src/types/weather/index.d.ts +4 -0
  627. package/src/types/weather/korea.d.ts +163 -0
  628. package/src/types/weather/open-weather-map.d.ts +181 -0
  629. package/src/weather/apis/index.ts +4 -0
  630. package/src/weather/apis/korea/client.ts +93 -0
  631. package/src/weather/apis/korea/server.ts +250 -0
  632. package/src/weather/apis/open-weather-map/client.ts +69 -0
  633. package/src/weather/apis/open-weather-map/server.ts +134 -0
  634. package/src/weather/components/icon/Address.tsx +17 -0
  635. package/src/weather/components/icon/Weather.tsx +33 -0
  636. package/src/weather/components/index.tsx +7 -0
  637. package/src/weather/components/page-header/Address.tsx +21 -0
  638. package/src/weather/components/page-header/Alert.tsx +42 -0
  639. package/src/weather/components/page-header/Container.tsx +14 -0
  640. package/src/weather/components/page-header/Forecast.tsx +23 -0
  641. package/src/weather/components/page-header/NextDays.tsx +34 -0
  642. package/src/weather/components/page-header/Today.tsx +153 -0
  643. package/src/weather/data/alert-regions-meta.json +1286 -0
  644. package/src/weather/data/response.ts +36 -0
  645. package/src/weather/data/weather-regions-meta.json +9833 -0
  646. package/src/weather/hooks/index.ts +4 -0
  647. package/src/weather/hooks/useOpenWeatherMap.ts +31 -0
  648. package/src/weather/hooks/useWeatherKorea.ts +58 -0
  649. package/src/weather/hooks/useWeatherKoreaAlert.ts +22 -0
  650. package/src/weather/index.tsx +4 -0
  651. package/src/weather/jotai/coordinate.ts +16 -0
  652. package/src/weather/jotai/farm-idx.ts +5 -0
  653. package/src/weather/jotai/index.ts +2 -0
  654. package/src/weather/styled.tsx +13 -0
  655. package/src/weather/styles/styled-components/alert.ts +30 -0
  656. package/src/weather/styles/styled-components/base.ts +79 -0
  657. package/src/weather/styles/styled-components/next-days.ts +25 -0
  658. package/src/weather/styles/styled-components/today.ts +40 -0
  659. package/src/weather/utils/alert.ts +30 -0
  660. package/src/weather/utils/date-time.ts +68 -0
  661. package/src/weather/utils/index.ts +4 -0
  662. package/src/weather/utils/location.ts +159 -0
  663. package/src/weather/utils/validate.ts +9 -0
  664. package/src/weather/utils/weather.ts +304 -0
@@ -0,0 +1,36 @@
1
+ :root {
2
+ --button-primary-solid: var(--color-light-blue-600);
3
+ --button-primary-solid-text: white;
4
+ --button-primary-outline: var(--color-light-blue-600);
5
+ --button-primary-outline-text: var(--color-light-blue-600);
6
+
7
+ --button-secondary-solid: #000;
8
+ --button-secondary-solid-text: white;
9
+ --button-secondary-outline: #000;
10
+ --button-secondary-outline-text: #000;
11
+
12
+ --button-neutral-solid: var(--color-blue-gray-100);
13
+ --button-neutral-solid-text: var(--color_60);
14
+ --button-neutral-outline: var(--color-blue-gray-400);
15
+ --button-neutral-outline-text: var(--color-blue-gray-600);
16
+
17
+ --button-pale-solid: var(--color_30);
18
+ --button-pale-solid-text: var(--color_80);
19
+ --button-pale-outline: var(--color_30);
20
+ --button-pale-outline-text: var(--color_60);
21
+
22
+ --button-readonly-cover: rgba(255, 255, 255, 0.6);
23
+
24
+ --button-border-style: solid;
25
+
26
+ &.dark-mode {
27
+ --button-readonly-cover: rgba(0, 0, 0, 0.5);
28
+
29
+ --button-neutral-solid: #1c242e;
30
+ --button-neutral-outline: #484f56;
31
+ --button-neutral-outline-text: var(--color-blue-gray-300);
32
+
33
+ --button-secondary-outline-text: #fff;
34
+ --button-secondary-outline: #66707a;
35
+ }
36
+ }
@@ -0,0 +1,311 @@
1
+ "use client";
2
+
3
+ import Link from "next/link";
4
+ import { styled, css, keyframes } from "styled-components";
5
+ import { styleBaseSize } from "@uniai-fe/util-functions";
6
+ import type {
7
+ ButtonFillType,
8
+ ButtonPriorityType,
9
+ ButtonSizeType,
10
+ ButtonStateType,
11
+ ButtonWidthType,
12
+ } from "../../../types";
13
+
14
+ const buttonAttr = {
15
+ shouldForwardProp: (attr: string) =>
16
+ attr.includes("-") ||
17
+ attr.startsWith("on") ||
18
+ ["readonly", "disabled", "children", "className"].includes(attr),
19
+ };
20
+
21
+ export type ButtonColorProps = {
22
+ $priority: ButtonPriorityType;
23
+ $fill: ButtonFillType;
24
+ };
25
+
26
+ export type ButtonStyledProps = ButtonColorProps & {
27
+ $size: ButtonSizeType;
28
+ $state: ButtonStateType;
29
+ $width: ButtonWidthType | string | number;
30
+ };
31
+
32
+ const base = css`
33
+ display: flex;
34
+ align-items: center;
35
+ margin: var(--button-margin-vertical) var(--button-margin-horizontal);
36
+ border-top-left-radius: var(--button-top-radius);
37
+ border-top-right-radius: var(--button-top-radius);
38
+ border-bottom-left-radius: var(--button-bottom-radius);
39
+ border-bottom-right-radius: var(--button-bottom-radius);
40
+ border-width: var(--button-border-width);
41
+ border-style: var(--button-border-style);
42
+ transition: width 0.3s;
43
+ font-weight: 600;
44
+ span {
45
+ white-space: nowrap;
46
+ user-select: none;
47
+ }
48
+ &:first-child {
49
+ margin-left: 0;
50
+ }
51
+ &:last-child {
52
+ margin-right: 0;
53
+ }
54
+ `;
55
+
56
+ const size = (sizeType: ButtonSizeType) => {
57
+ const branch = () => {
58
+ switch (sizeType) {
59
+ case "large":
60
+ return css``;
61
+ case "medium":
62
+ return css``;
63
+ case "small":
64
+ return css``;
65
+ case "modal":
66
+ return css`
67
+ width: 10rem;
68
+ justify-content: center;
69
+ `;
70
+ case "chip":
71
+ return css`
72
+ --button-top-radius: 1.6rem;
73
+ --button-bottom-radius: 1.6rem;
74
+ &:before {
75
+ border-radius: 1.6rem;
76
+ }
77
+ `;
78
+ default:
79
+ return css``;
80
+ }
81
+ };
82
+ return css`
83
+ /* width: auto; */
84
+ height: var(--button-height-${sizeType});
85
+ padding: 0 var(--button-padding-${sizeType});
86
+
87
+ .loading-icon {
88
+ width: var(--button-loading-size-${sizeType});
89
+ height: var(--button-loading-size-${sizeType});
90
+
91
+ svg {
92
+ width: 100%;
93
+ height: 100%;
94
+ object-fit: contain;
95
+ }
96
+ }
97
+
98
+ span {
99
+ font-size: var(--button-name-size-${sizeType});
100
+ }
101
+
102
+ ${branch()}
103
+ `;
104
+ };
105
+
106
+ const color = (priority: ButtonPriorityType, fill: ButtonFillType) => {
107
+ const branch = () => {
108
+ switch (fill) {
109
+ case "solid":
110
+ return css`
111
+ background-color: var(--button-${priority}-solid);
112
+ `;
113
+ default:
114
+ return css`
115
+ background-color: var(--color_0);
116
+ `;
117
+ }
118
+ };
119
+
120
+ return css`
121
+ /* 테두리 */
122
+ border-color: var(--button-${priority}-${fill});
123
+ /* 텍스트 */
124
+ color: var(--button-${priority}-${fill}-text);
125
+ ${branch()}
126
+ span {
127
+ color: var(--button-${priority}-${fill}-text);
128
+ }
129
+ /* 로딩 아이콘 컬러 */
130
+ .loading-icon {
131
+ svg path {
132
+ fill: var(--button-${priority}-${fill}-text);
133
+ }
134
+ }
135
+ `;
136
+ };
137
+
138
+ const mouse = css`
139
+ position: relative;
140
+ &:before {
141
+ content: "마우스 오버";
142
+ display: block;
143
+ width: calc(
144
+ 100% + var(--button-border-width) * 2
145
+ ); /* border-left, border-right */
146
+ height: calc(
147
+ 100% + var(--button-border-width) * 2
148
+ ); /* border-top, border-bottom */
149
+ /* border-radius: 0.4rem; */
150
+ border-top-left-radius: var(--button-top-radius);
151
+ border-top-right-radius: var(--button-top-radius);
152
+ border-bottom-left-radius: var(--button-bottom-radius);
153
+ border-bottom-right-radius: var(--button-bottom-radius);
154
+ font-size: 0 !important;
155
+ position: absolute;
156
+ top: calc(var(--button-border-width) * -1); /* border-top */
157
+ left: calc(var(--button-border-width) * -1); /* border-left */
158
+ z-index: 10;
159
+ }
160
+ &:hover {
161
+ &:before {
162
+ background: rgba(0, 0, 0, 0.06);
163
+ }
164
+ }
165
+ &:active {
166
+ &:before {
167
+ background: rgba(0, 0, 0, 0.12);
168
+ }
169
+ }
170
+ &[readonly],
171
+ &[disabled],
172
+ &[button-state="loading"] {
173
+ cursor: default;
174
+ &:before {
175
+ background: var(--button-readonly-cover);
176
+ border-radius: inherit;
177
+ }
178
+ }
179
+ `;
180
+
181
+ const fetching = keyframes`
182
+ 0% {
183
+ transform: rotate(0deg);
184
+ }
185
+ 100% {
186
+ transform: rotate(360deg);
187
+ }`;
188
+
189
+ const basicStyle = ({
190
+ $size,
191
+ $priority,
192
+ $fill,
193
+ $width,
194
+ $state,
195
+ }: ButtonStyledProps) => css`
196
+ ${base}
197
+ ${mouse}
198
+ ${size($size)}
199
+ ${color($priority, $fill)}
200
+ ${$width === "wide" &&
201
+ css`
202
+ width: 100%;
203
+ justify-content: center;
204
+ `}
205
+ ${$state === "loading" &&
206
+ css`
207
+ span {
208
+ display: none;
209
+ }
210
+ .loading-icon {
211
+ display: block;
212
+ animation: ${fetching} 1s linear infinite;
213
+ }
214
+ `}
215
+ &.fetching {
216
+ .fetching-icon {
217
+ animation: ${fetching} 1s linear infinite;
218
+ }
219
+ }
220
+ /* .expand-icon {
221
+ margin-left: 16px;
222
+ } */
223
+ ${((typeof $width == "string" &&
224
+ !["fit", "wide", "normal"].includes($width)) ||
225
+ typeof $width === "number") &&
226
+ css`
227
+ width: ${styleBaseSize("rem", $width)};
228
+ `}
229
+ `;
230
+
231
+ const basic = styled.button.withConfig(buttonAttr)<ButtonStyledProps>`
232
+ ${basicStyle}
233
+
234
+ &.button-reset {
235
+ span {
236
+ margin-left: 0.4rem;
237
+ }
238
+ }
239
+ `;
240
+
241
+ const link = styled(Link)<ButtonStyledProps>`
242
+ ${basicStyle}
243
+ `;
244
+
245
+ const expand = styled.button`
246
+ width: fit-content;
247
+ height: fit-content;
248
+ margin-left: auto;
249
+ display: flex;
250
+ align-items: center;
251
+ span {
252
+ font-size: 1.6rem;
253
+ color: var(--color_60);
254
+ white-space: nowrap;
255
+ }
256
+ /* &[expand-state="open"] {
257
+ figure {
258
+ transform: rotate(180deg);
259
+ }
260
+ } */
261
+ `;
262
+
263
+ // const icon = styled.figure`
264
+ // width: fit-content;
265
+ // height: fit-content;
266
+ // margin: 0 4px;
267
+ // display: flex;
268
+ // align-items: center;
269
+ // justify-content: center;
270
+ // &:first-child {
271
+ // margin-left: 0;
272
+ // }
273
+ // &:last-child {
274
+ // margin-right: 0;
275
+ // }
276
+ // `;
277
+
278
+ const tooltip = styled.button.withConfig(buttonAttr)<
279
+ ButtonColorProps & { $size: number }
280
+ >`
281
+ width: ${({ $size }) => $size / 10}rem;
282
+ height: ${({ $size }) => $size / 10}rem;
283
+ display: flex;
284
+ align-items: center;
285
+ justify-content: center;
286
+ figure {
287
+ width: 100%;
288
+ height: 100%;
289
+ }
290
+ svg {
291
+ width: 100%;
292
+ height: 100%;
293
+ object-fit: contain;
294
+ path {
295
+ fill: var(
296
+ --button-${({ $priority }) => $priority}-${({ $fill }) => $fill}
297
+ );
298
+ }
299
+ }
300
+ `;
301
+
302
+ const StyledButtonBase = {
303
+ color,
304
+ mouse,
305
+ basic,
306
+ link,
307
+ expand,
308
+ tooltip,
309
+ };
310
+
311
+ export default StyledButtonBase;
@@ -0,0 +1,30 @@
1
+ "use client";
2
+
3
+ import { styled } from "styled-components";
4
+
5
+ const resetSelected = styled.figure`
6
+ width: 2rem;
7
+ min-width: 2rem;
8
+ height: 2rem;
9
+ min-height: 2rem;
10
+ border-radius: 1rem;
11
+ margin-left: 0.6rem;
12
+
13
+ background-color: var(--color-blue-gray-400);
14
+
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+
19
+ .icon-wrapper {
20
+ width: 1rem;
21
+ height: 1.1rem;
22
+ position: relative;
23
+ }
24
+ `;
25
+
26
+ const StyledButtonIcon = {
27
+ resetSelected,
28
+ };
29
+
30
+ export default StyledButtonIcon;
@@ -0,0 +1,75 @@
1
+ "use client";
2
+
3
+ import { styled, css } from "styled-components";
4
+
5
+ type StyledMultipleContainerProps = Partial<{
6
+ $empty: boolean;
7
+ }>;
8
+ const container = styled.div<StyledMultipleContainerProps>`
9
+ width: 100%;
10
+ ${({ $empty }) =>
11
+ $empty &&
12
+ css`
13
+ height: 100%;
14
+ `}
15
+ `;
16
+
17
+ type StyledMultipleListProps = Partial<{
18
+ $columnLength: number;
19
+ }>;
20
+ const list = styled.ul<StyledMultipleListProps>`
21
+ width: 100%;
22
+ ${({ $columnLength }) =>
23
+ $columnLength
24
+ ? css`
25
+ display: grid;
26
+ grid-template-columns: repeat(${$columnLength}, 1fr);
27
+ gap: var(--button-multiple-list-gap-horizontal)
28
+ var(--button-multiple-list-gap-vertical);
29
+ `
30
+ : css`
31
+ height: 100%;
32
+ `}
33
+ `;
34
+ type StyledMultipleItemProps = Partial<{
35
+ $isAlternate: boolean;
36
+ }>;
37
+ const item = styled.li<StyledMultipleItemProps>`
38
+ height: ${({ $isAlternate }) =>
39
+ $isAlternate ? "100%" : "var(--button-multiple-item-height)"};
40
+ font-size: var(--button-multiple-text-size);
41
+ color: var(--button-multiple-text-color-default);
42
+ `;
43
+ const button = styled.button<{ $selected: boolean }>`
44
+ width: 100%;
45
+ height: 100%;
46
+ padding: var(--button-multiple-item-padding-vertical)
47
+ var(--button-multiple-item-padding-horizontal);
48
+
49
+ display: flex;
50
+ align-items: var(--button-multiple-align-items);
51
+ justify-content: var(--button-multiple-justify-content);
52
+
53
+ ${({ $selected }) =>
54
+ $selected &&
55
+ css`
56
+ background: var(--button-multiple-item-bg-selected);
57
+ `}
58
+
59
+ span {
60
+ font-size: var(--button-multiple-text-size);
61
+ color: var(
62
+ --button-multiple-text-color-${({ $selected }) =>
63
+ $selected ? "selected" : "default"}
64
+ );
65
+ }
66
+ `;
67
+
68
+ const StyledButtonMultiple = {
69
+ container,
70
+ list,
71
+ item,
72
+ button,
73
+ };
74
+
75
+ export default StyledButtonMultiple;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+
3
+ import { styled } from "styled-components";
4
+ import { styleBaseSize } from "@uniai-fe/util-functions";
5
+
6
+ export type StyledButtonTextProps = Partial<{
7
+ $color: string;
8
+ $state: string;
9
+ $size: number | string;
10
+ }>;
11
+ const textButton = styled.button<StyledButtonTextProps>`
12
+ width: fit-content;
13
+ height: fit-content;
14
+ max-width: 100%;
15
+
16
+ display: flex;
17
+ align-items: center;
18
+
19
+ span {
20
+ width: fit-content;
21
+ font-size: ${({ $size }) => styleBaseSize("rem", $size, 14)};
22
+ color: ${({ $color }) => $color || `var(--color_60)`};
23
+ font-weight: 500;
24
+ line-height: 1.2em;
25
+ white-space: nowrap;
26
+ overflow: hidden;
27
+ text-overflow: ellipsis;
28
+ }
29
+ &:hover {
30
+ span {
31
+ text-decoration: underline;
32
+ }
33
+ }
34
+ `;
35
+
36
+ const resetSelected = styled(textButton)``;
37
+
38
+ const StyledButtonTemplate = {
39
+ textButton,
40
+ resetSelected,
41
+ };
42
+
43
+ export default StyledButtonTemplate;
@@ -0,0 +1,11 @@
1
+ @use "./styles/scss/level.color.scss";
2
+
3
+ @use "./styles/scss/tick.scss";
4
+ @use "./styles/scss/graph.scss";
5
+ @use "./styles/scss/legend.scss";
6
+ @use "./styles/scss/tooltip.scss";
7
+ @use "./styles/scss/control.scss";
8
+ @use "./styles/scss/filter.scss";
9
+
10
+ @use "./styles/scss/arc-gauge.scss";
11
+ @use "./styles/scss/arc-meter.scss";
@@ -0,0 +1,17 @@
1
+ "use client";
2
+
3
+ import StyledChartCommon from "../styles/styled/common";
4
+
5
+ export default function ChartContents({
6
+ className,
7
+ children,
8
+ }: {
9
+ className?: string;
10
+ children: React.ReactNode;
11
+ }) {
12
+ return (
13
+ <StyledChartCommon.container className={className}>
14
+ {children}
15
+ </StyledChartCommon.container>
16
+ );
17
+ }
@@ -0,0 +1,39 @@
1
+ "use client";
2
+
3
+ import { clsx } from "clsx";
4
+ import StyledChartControl from "../../styles/styled/control";
5
+ import Icon from "../../../icon";
6
+
7
+ /**
8
+ * 차트 인터렉션 컨트롤 버튼
9
+ * @component
10
+ * @property {"zoom-in" | "zoom-out" | "pan-left" | "pan-right"} role - 버튼 역할
11
+ * @property {Function} clickEvent - 클릭 이벤트 핸들러
12
+ * @property {string} [className] - 추가 클래스 이름
13
+ * @property {React.ReactNode} [children] - 버튼 내부에 렌더링
14
+ */
15
+ export default function ChartControlButton({
16
+ className,
17
+ role,
18
+ clickEvent,
19
+ children,
20
+ disabled,
21
+ }: {
22
+ role: "zoom-in" | "zoom-out" | "pan-left" | "pan-right";
23
+ clickEvent: () => void;
24
+ } & Partial<{
25
+ className: string;
26
+ children: React.ReactNode;
27
+ disabled: boolean;
28
+ }>) {
29
+ return (
30
+ <StyledChartControl.button
31
+ type="button"
32
+ className={clsx("chart-control-button", className)}
33
+ disabled={disabled}
34
+ onClick={!disabled ? clickEvent : undefined}
35
+ >
36
+ {children || <Icon.Chart.Control {...{ role, width: 20, height: 20 }} />}
37
+ </StyledChartControl.button>
38
+ );
39
+ }
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import { clsx } from "clsx";
4
+ import StyledChartControl from "../../styles/styled/control";
5
+
6
+ /**
7
+ * 차트 인터렉션 컨트롤 컨테이너
8
+ * @component
9
+ * @property {string} [className] - 추가 클래스 이름
10
+ * @property {React.ReactNode} children - 자식 컴포넌트
11
+ */
12
+ export default function ChartControlContainer({
13
+ className,
14
+ children,
15
+ }: {
16
+ children: React.ReactNode;
17
+ } & Partial<{
18
+ className: string;
19
+ }>) {
20
+ return (
21
+ <StyledChartControl.container
22
+ className={clsx("chart-control-container", className)}
23
+ >
24
+ {children}
25
+ </StyledChartControl.container>
26
+ );
27
+ }
@@ -0,0 +1,117 @@
1
+ "use client";
2
+
3
+ import {
4
+ createContext,
5
+ useContext,
6
+ useLayoutEffect,
7
+ useRef,
8
+ useState,
9
+ } from "react";
10
+ import type { ChartControlContext, ChartControlRange } from "../../../types";
11
+
12
+ /**
13
+ * 차트 컨트롤을 위한 데이터 컨텍스트
14
+ * @context
15
+ * @desc
16
+ * - {object[]} originData 원본 차트 데이터
17
+ * - {{ start: number; end: number; }} indexRange 현재 X축 인덱스 범위
18
+ * - {function} setRange X축 범위 업데이트 함수
19
+ */
20
+ const ChartControlContext = createContext<ChartControlContext>({
21
+ originData: [],
22
+ indexRange: { start: 0, end: 0 },
23
+ setIndexRange: () => {},
24
+ });
25
+
26
+ /**
27
+ * 차트 컨트롤을 위한 데이터 컨텍스트 공급자
28
+ * @component
29
+ * @param {object} props
30
+ * @param {object[]} props.originData 원본 차트 데이터
31
+ * @param {React.ReactNode} props.children
32
+ */
33
+ export default function ChartControlProvider<
34
+ ChartData extends object = object,
35
+ >({
36
+ originData,
37
+ children,
38
+ }: {
39
+ /**
40
+ * 원본 차트 데이터
41
+ * @type {object[]}
42
+ */
43
+ originData: ChartData[];
44
+ children: React.ReactNode;
45
+ }) {
46
+ const [indexRange, setIndexRange] = useState<ChartControlRange>({
47
+ start: 0,
48
+ end: originData.length > 1 ? originData.length - 1 : 0,
49
+ });
50
+
51
+ // 초기 데이터 로딩 시(0 -> N) 전체 범위로 동기 업데이트하여 깜빡임 방지
52
+ const prevLenRef = useRef<number>(originData.length);
53
+ useLayoutEffect(() => {
54
+ const prev = prevLenRef.current;
55
+ const next = originData.length;
56
+ if (prev === 0 && next > 0) {
57
+ setIndexRange({ start: 0, end: Math.max(0, next - 1) });
58
+ }
59
+ prevLenRef.current = next;
60
+ }, [originData.length]);
61
+
62
+ // 데이터 길이가 변할 때 현재 indexRange를 데이터 범위에 맞춰 정돈
63
+ useLayoutEffect(() => {
64
+ const total = originData.length;
65
+ if (total < 0) return;
66
+ const maxEnd = Math.max(0, total - 1);
67
+
68
+ // 비어있는 경우 0,0 고정
69
+ if (total === 0) {
70
+ if (indexRange.start !== 0 || indexRange.end !== 0)
71
+ setIndexRange({ start: 0, end: 0 });
72
+ return;
73
+ }
74
+
75
+ // 현재 윈도우 길이 보존 시도
76
+ const length = Math.max(1, indexRange.end - indexRange.start + 1);
77
+
78
+ // 범위를 넘어가면 오른쪽 끝에 맞춰 재정렬
79
+ if (indexRange.end > maxEnd || indexRange.start > maxEnd) {
80
+ const newEnd = maxEnd;
81
+ const newStart = Math.max(0, newEnd - Math.min(length, total) + 1);
82
+ if (newStart !== indexRange.start || newEnd !== indexRange.end)
83
+ setIndexRange({ start: newStart, end: newEnd });
84
+ }
85
+ }, [originData.length, indexRange.start, indexRange.end]);
86
+
87
+ return (
88
+ <ChartControlContext.Provider
89
+ value={{
90
+ originData,
91
+ indexRange,
92
+ setIndexRange,
93
+ }}
94
+ >
95
+ {children}
96
+ </ChartControlContext.Provider>
97
+ );
98
+ }
99
+
100
+ /**
101
+ * 차트 컨트롤 데이터 컨텍스트를 사용하기 위한 커스텀 훅
102
+ * @hook
103
+ * @desc
104
+ * - {object[]} originData 원본 차트 데이터
105
+ * - {{ start: number; end: number; }} indexRange 현재 X축 인덱스 범위
106
+ * - {function} setIndexRange X축 범위 업데이트 함수
107
+ * @return {ChartControlContext} { originData, indexRange, setIndexRange }
108
+ */
109
+ export function useChartContext<
110
+ ChartData extends object,
111
+ >(): ChartControlContext<ChartData> {
112
+ const context = useContext(ChartControlContext);
113
+ if (!context) {
114
+ throw new Error("차트 데이터에 대한 컨텍스트를 찾을 수 없습니다.");
115
+ }
116
+ return context as ChartControlContext<ChartData>;
117
+ }