@cashub/ui 0.48.30 → 0.49.0-beta.0

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 (897) hide show
  1. package/dist/assets/images/bg-aside.png +0 -0
  2. package/dist/assets/images/bg-main-vivid.png +0 -0
  3. package/dist/assets/images/bg-main.png +0 -0
  4. package/dist/button/IconButton.js +70 -0
  5. package/dist/icon/assets/android.jsx +10 -0
  6. package/dist/icon/assets/app-management.jsx +10 -0
  7. package/dist/icon/assets/appStore.jsx +6 -0
  8. package/dist/icon/assets/battery.jsx +15 -0
  9. package/dist/icon/assets/bill.jsx +10 -0
  10. package/dist/icon/assets/campaign.jsx +9 -0
  11. package/dist/icon/assets/casstore.jsx +8 -0
  12. package/dist/icon/assets/dashboard.jsx +6 -0
  13. package/dist/icon/assets/enterprise.jsx +15 -0
  14. package/dist/icon/assets/firmware.jsx +8 -0
  15. package/dist/icon/assets/folder.jsx +8 -0
  16. package/dist/icon/assets/group.jsx +18 -0
  17. package/dist/icon/assets/heartbeats.jsx +9 -0
  18. package/dist/icon/assets/invite-user.jsx +9 -0
  19. package/dist/icon/assets/log.jsx +9 -0
  20. package/dist/icon/assets/manufacturer.jsx +7 -0
  21. package/dist/icon/assets/merchant.jsx +16 -0
  22. package/dist/icon/assets/package-collection.jsx +8 -0
  23. package/dist/icon/assets/report.jsx +11 -0
  24. package/dist/icon/assets/resource.jsx +9 -0
  25. package/dist/icon/assets/role.jsx +7 -0
  26. package/dist/icon/assets/shield-lock.jsx +202 -0
  27. package/dist/icon/assets/shield-no-signal.jsx +195 -0
  28. package/dist/icon/assets/shield-unsafe.jsx +191 -0
  29. package/dist/icon/assets/shield.jsx +186 -0
  30. package/dist/icon/assets/statistics.jsx +9 -0
  31. package/dist/icon/assets/tag.jsx +14 -0
  32. package/dist/icon/assets/template-management.jsx +8 -0
  33. package/dist/icon/assets/terminal.jsx +7 -0
  34. package/dist/icon/assets/tradeye.jsx +7 -0
  35. package/dist/icon/registry.js +70 -0
  36. package/dist/iconbox/IconBox.js +103 -0
  37. package/dist/iconbox/assets/bg-enterprise.png +0 -0
  38. package/dist/iconbox/assets/bg-merchant.png +0 -0
  39. package/dist/iconbox/assets/bg-terminal.png +0 -0
  40. package/dist/iconbox/assets/bg-user.png +0 -0
  41. package/dist/iconbox/bgImageRegistry.js +18 -0
  42. package/dist/iconbox/subComponent/IconBoxImage.js +85 -0
  43. package/dist/layout/Aside.js +58 -0
  44. package/dist/layout/Container.js +56 -0
  45. package/dist/layout/Header.jsx +48 -0
  46. package/dist/layout/Layout.jsx +69 -0
  47. package/dist/layout/Logo.jsx +17 -0
  48. package/dist/layout/MenuIcon.jsx +45 -0
  49. package/dist/layout/Sidebar.jsx +261 -0
  50. package/dist/layout/assets/burger-modern.jsx +9 -0
  51. package/dist/layout/bgMainRegistry.js +14 -0
  52. package/dist/package.json +55 -0
  53. package/dist/styles/GlobalStyle.js +356 -0
  54. package/dist/styles/theme/dark.theme.js +99 -0
  55. package/dist/styles/theme/ember.theme.js +100 -0
  56. package/dist/styles/theme/midnight.theme.js +99 -0
  57. package/dist/styles/theme/white.theme.js +101 -0
  58. package/dist/styles/themes.js +20 -0
  59. package/package.json +64 -55
  60. package/setupTests.js +9 -0
  61. package/src/Tab/Tab.js +11 -0
  62. package/src/Tab/TabList.js +159 -0
  63. package/src/Tab/TabPanel.js +35 -0
  64. package/src/Tab/TabTab.js +99 -0
  65. package/src/Tab/__stories__/Tab.stories.js +55 -0
  66. package/src/Tab/__stories__/TabList.stories.js +49 -0
  67. package/src/Tab/__stories__/TabPanel.stories.js +45 -0
  68. package/src/Tab/__stories__/TabTab.stories.js +30 -0
  69. package/src/Tab/__stories__/TabV2.stories.js +47 -0
  70. package/src/Tab/__test__/Tab.test.js +43 -0
  71. package/src/Tab/__test__/TabList.test.js +22 -0
  72. package/src/Tab/__test__/TabPanel.test.js +27 -0
  73. package/src/Tab/__test__/TabTab.test.js +58 -0
  74. package/src/Tab/index.js +22 -0
  75. package/src/Tab/subComponent/TabContext.js +5 -0
  76. package/src/Tab/subComponent/TabListV2.js +16 -0
  77. package/src/Tab/subComponent/TabPanelV2.js +38 -0
  78. package/src/Tab/subComponent/TabTabV2.js +47 -0
  79. package/src/VerticalTab/TabList.js +18 -0
  80. package/src/VerticalTab/TabPanel.js +38 -0
  81. package/src/VerticalTab/TabTab.js +54 -0
  82. package/src/VerticalTab/VerticalTab.js +20 -0
  83. package/src/VerticalTab/index.js +10 -0
  84. package/src/VerticalTab/subComponent/TabContext.js +5 -0
  85. package/src/VerticalTab/subComponent/VerticalTab.stories.js +82 -0
  86. package/src/alert/Alert.js +15 -0
  87. package/src/alert/__stories__/Alert.stories.js +18 -0
  88. package/src/alert/index.js +1 -0
  89. package/src/animate/Collapse.js +68 -0
  90. package/src/animate/Loader.js +36 -0
  91. package/src/animate/NumberCounter.js +49 -0
  92. package/src/animate/PulseRing.js +25 -0
  93. package/src/animate/Spinner.js +13 -0
  94. package/src/animate/__stories__/Collapse.stories.js +60 -0
  95. package/src/animate/__stories__/Loader.stories.js +33 -0
  96. package/src/animate/__stories__/NumberCounter.stories.js +29 -0
  97. package/src/animate/__stories__/PulseRing.stories.js +17 -0
  98. package/src/animate/__stories__/Spinner.stories.js +13 -0
  99. package/src/animate/__test__/Collapse.test.js +125 -0
  100. package/src/animate/__test__/Loader.test.js +42 -0
  101. package/src/animate/__test__/NumberCounter.test.js +71 -0
  102. package/src/animate/__test__/PulseRing.test.js +37 -0
  103. package/src/animate/__test__/Spinner.test.js +18 -0
  104. package/src/animate/index.js +5 -0
  105. package/src/assets/css/autocomplete.css +16 -0
  106. package/src/assets/css/font.css +4 -0
  107. package/src/assets/css/global.css +2 -0
  108. package/src/assets/font/helvetica/Helvetica.ttf +0 -0
  109. package/src/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
  110. package/src/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
  111. package/src/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
  112. package/src/assets/icons/app-management.png +0 -0
  113. package/src/assets/icons/burger-black.png +0 -0
  114. package/src/assets/icons/burger-white.png +0 -0
  115. package/src/assets/icons/burger.png +0 -0
  116. package/src/assets/icons/file.svg +1 -0
  117. package/src/assets/icons/map_icon1.png +0 -0
  118. package/src/assets/icons/map_icon4.png +0 -0
  119. package/src/assets/images/bg-aside.png +0 -0
  120. package/src/assets/images/bg-chart-circle.png +0 -0
  121. package/src/assets/images/bg-chart-triangle.png +0 -0
  122. package/src/assets/images/bg-main-vivid.png +0 -0
  123. package/src/assets/images/bg-main.png +0 -0
  124. package/src/assets/images/cashub-logo-only.png +0 -0
  125. package/src/assets/images/default-user.jpg +0 -0
  126. package/src/assets/images/logo-cashub.png +0 -0
  127. package/src/assets/images/map.png +0 -0
  128. package/src/assets/images/qrcode.png +0 -0
  129. package/src/backdrop/BaseBackdrop.js +13 -0
  130. package/src/backdrop/LoadingBackdrop.js +12 -0
  131. package/src/backdrop/ModalBackdrop.js +10 -0
  132. package/src/backdrop/__test__/BaseBackdrop.test.js +10 -0
  133. package/src/backdrop/__test__/LoadingBackdrop.test.js +9 -0
  134. package/src/backdrop/__test__/ModalBackdrop.test.js +8 -0
  135. package/src/backdrop/index.js +3 -0
  136. package/src/badge/Badge.js +21 -0
  137. package/src/badge/BadgeDot.js +13 -0
  138. package/src/badge/BadgeFill.js +29 -0
  139. package/src/badge/BadgeFillTriangle.js +76 -0
  140. package/src/badge/BadgeWithText.js +21 -0
  141. package/src/badge/__stories__/Badge.stories.js +47 -0
  142. package/src/badge/__stories__/BadgeDot.stories.js +23 -0
  143. package/src/badge/__stories__/BadgeFill.stories.js +29 -0
  144. package/src/badge/__stories__/BadgeFillTriangle.stories.js +29 -0
  145. package/src/badge/__stories__/BadgeWithText.stories.js +26 -0
  146. package/src/badge/__test__/Badge.test.js +32 -0
  147. package/src/badge/__test__/BadgeDot.test.js +22 -0
  148. package/src/badge/__test__/BadgeFill.test.js +41 -0
  149. package/src/badge/__test__/BadgeWithText.test.js +22 -0
  150. package/src/badge/index.js +5 -0
  151. package/src/billing/BarChart.js +42 -0
  152. package/src/billing/Grid.js +30 -0
  153. package/src/billing/Header2.js +15 -0
  154. package/src/billing/Header3.js +32 -0
  155. package/src/billing/Paragraph.js +27 -0
  156. package/src/billing/ParagraphGroup.js +12 -0
  157. package/src/billing/ParagraphText.js +16 -0
  158. package/src/billing/Section.js +48 -0
  159. package/src/billing/SectionBody.js +7 -0
  160. package/src/billing/SectionHeader.js +16 -0
  161. package/src/billing/__stories__/BarChart.stories.js_bak +46 -0
  162. package/src/billing/__stories__/Grid.stories.js_bak +57 -0
  163. package/src/billing/__stories__/Header2.stories.js_bak +62 -0
  164. package/src/billing/__stories__/Header3.stories.js_bak +69 -0
  165. package/src/billing/__stories__/Paragraph.stories.js_bak +84 -0
  166. package/src/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
  167. package/src/billing/__stories__/ParagraphText.stories.js_bak +64 -0
  168. package/src/billing/__stories__/Section.stories.js_bak +115 -0
  169. package/src/billing/__stories__/SectionBody.stories.js_bak +62 -0
  170. package/src/billing/__stories__/SectionHeader.stories.js-bak +68 -0
  171. package/src/breadcrumb/Breadcrumb.js +66 -0
  172. package/src/breadcrumb/__stories__/Breadcrumb.stories.js +31 -0
  173. package/src/breadcrumb/__test__/breadcrumb.test.js +27 -0
  174. package/src/breadcrumb/index.js +1 -0
  175. package/src/button/Button.js +110 -0
  176. package/src/button/ButtonGroup.js +33 -0
  177. package/src/button/IconButton.js +35 -0
  178. package/src/button/ScrollToTopButton.js +48 -0
  179. package/src/button/__stories__/Button.stories.js +104 -0
  180. package/src/button/__stories__/ButtonGroup.stories.js +48 -0
  181. package/src/button/__stories__/IconButton.stories.js +30 -0
  182. package/src/button/__stories__/ScrollToTopButton.stories.js +22 -0
  183. package/src/button/__test__/Button.test.js +32 -0
  184. package/src/button/__test__/ButtonGroup.test.js +25 -0
  185. package/src/button/__test__/IconButton.test.js +34 -0
  186. package/src/button/__test__/ScrollToTopButton.test.js +19 -0
  187. package/src/button/index.js +4 -0
  188. package/src/callout/Callout.js +52 -0
  189. package/src/callout/__stories__/Callout.stories.js +23 -0
  190. package/src/callout/__test__/Callout.test.js +29 -0
  191. package/src/callout/index.js +1 -0
  192. package/src/chart/BarChart.js +158 -0
  193. package/src/chart/DoughnutChart.js +118 -0
  194. package/src/chart/LineChart.js +151 -0
  195. package/src/chart/SingleBarChart.js +27 -0
  196. package/src/chart/__stories__/BarChart.stories.js +56 -0
  197. package/src/chart/__stories__/DoughnutChart.stories.js +63 -0
  198. package/src/chart/__stories__/LineChart.stories.js +75 -0
  199. package/src/chart/__stories__/SingleBarChart.stories.js +22 -0
  200. package/src/chart/index.js +5 -0
  201. package/src/chart/utils/centerTextPlugin.js +51 -0
  202. package/src/chart/utils/customTooltip.js +116 -0
  203. package/src/chart/utils/htmlLegendPlugin.js +98 -0
  204. package/src/chart/utils/index.js +3 -0
  205. package/src/chart/utils/padEmptyChartBar.js +41 -0
  206. package/src/chart/utils/yAxisTopTitlePlugin.js +38 -0
  207. package/src/container/FlexContainer.js +15 -0
  208. package/src/container/__stories__/FlexContainer.stories.js +39 -0
  209. package/src/container/__test__/FlexContainer.test.js +21 -0
  210. package/src/container/index.js +1 -0
  211. package/src/cropper/Cropper.js +49 -0
  212. package/src/cropper/CropperModalHandler.js +36 -0
  213. package/src/cropper/__stories__/Cropper.stories.js +32 -0
  214. package/src/cropper/__test__/Cropper.test.js +90 -0
  215. package/src/cropper/index.js +2 -0
  216. package/src/cropper/subComponent/CropImageModal.js +84 -0
  217. package/src/datetimePicker/DatePicker.js +493 -0
  218. package/src/datetimePicker/DatePickerV2.js +500 -0
  219. package/src/datetimePicker/DatetimePicker.js +235 -0
  220. package/src/datetimePicker/DatetimePickerV2.js +512 -0
  221. package/src/datetimePicker/DatetimePickerV3.js +292 -0
  222. package/src/datetimePicker/TimeInput.js +45 -0
  223. package/src/datetimePicker/TimePicker.js +318 -0
  224. package/src/datetimePicker/TimePickerStyle.js +59 -0
  225. package/src/datetimePicker/TimePickerV2.js +222 -0
  226. package/src/datetimePicker/__stories__/DatePicker.stories.js +51 -0
  227. package/src/datetimePicker/__stories__/DatePickerV2.stories.js +73 -0
  228. package/src/datetimePicker/__stories__/DatetimePicker.stories.js +74 -0
  229. package/src/datetimePicker/__stories__/DatetimePickerV2.stories.js +91 -0
  230. package/src/datetimePicker/__stories__/DatetimePickerV3.stories.js +80 -0
  231. package/src/datetimePicker/__stories__/TimeInput.stories.js +67 -0
  232. package/src/datetimePicker/__stories__/TimePicker.stories.js +29 -0
  233. package/src/datetimePicker/__stories__/TimePickerV2.stories.js +22 -0
  234. package/src/datetimePicker/__test__/CustomTimeInput.test.js +25 -0
  235. package/src/datetimePicker/__test__/DatetimePicker.test.js +121 -0
  236. package/src/datetimePicker/__test__/TimeInput.test.js +22 -0
  237. package/src/datetimePicker/accordion/Month.js +258 -0
  238. package/src/datetimePicker/accordion/Year.js +307 -0
  239. package/src/datetimePicker/hooks/index.js +3 -0
  240. package/src/datetimePicker/hooks/useChangeNumber.js +42 -0
  241. package/src/datetimePicker/hooks/useDecrease.js +31 -0
  242. package/src/datetimePicker/hooks/useIncrease.js +31 -0
  243. package/src/datetimePicker/index.js +9 -0
  244. package/src/datetimePicker/provider/constant.js +16 -0
  245. package/src/datetimePicker/subComponent/Accordion.js +407 -0
  246. package/src/datetimePicker/subComponent/CustomTimeInput.js +48 -0
  247. package/src/datetimePicker/subComponent/DateTimePickerContext.js +5 -0
  248. package/src/datetimePicker/utils/GMTDate.js +13 -0
  249. package/src/datetimePicker/utils/pad.js +9 -0
  250. package/src/datetimePicker/utils/toUTC0.js +10 -0
  251. package/src/descriptionList/DescriptionDetail.js +18 -0
  252. package/src/descriptionList/DescriptionList.js +15 -0
  253. package/src/descriptionList/DescriptionTerm.js +9 -0
  254. package/src/descriptionList/__stories__/DescriptionDetail.stories.js +39 -0
  255. package/src/descriptionList/__stories__/DescriptionList.stories.js +39 -0
  256. package/src/descriptionList/__stories__/DescriptionTerm.stories.js +13 -0
  257. package/src/descriptionList/__test__/DescriptionDetail.test.js +13 -0
  258. package/src/descriptionList/__test__/DescriptionList.test.js +12 -0
  259. package/src/descriptionList/__test__/DescriptionTerm.test.js +7 -0
  260. package/src/descriptionList/index.js +3 -0
  261. package/src/divider/Divider.js +21 -0
  262. package/src/divider/__stories__/Divider.stories.js +23 -0
  263. package/src/divider/__test__/Divider.test.js +24 -0
  264. package/src/divider/index.js +1 -0
  265. package/src/dropdown/Dropdown.js +50 -0
  266. package/src/dropdown/DropdownButtonOption.js +25 -0
  267. package/src/dropdown/DropdownContent.js +78 -0
  268. package/src/dropdown/DropdownDivOption.js +21 -0
  269. package/src/dropdown/DropdownItem.js +17 -0
  270. package/src/dropdown/DropdownLinkOption.js +19 -0
  271. package/src/dropdown/DropdownToggle.js +26 -0
  272. package/src/dropdown/__stories__/Dropdown.stories.js +46 -0
  273. package/src/dropdown/__stories__/DropdownButtonOption.stories.js +33 -0
  274. package/src/dropdown/__stories__/DropdownContent.stories.js +34 -0
  275. package/src/dropdown/__stories__/DropdownDivOption.stories.js +27 -0
  276. package/src/dropdown/__stories__/DropdownItem.stories.js +48 -0
  277. package/src/dropdown/__stories__/DropdownLinkOption.stories.js +63 -0
  278. package/src/dropdown/__stories__/DropdownToggle.stories.js +40 -0
  279. package/src/dropdown/__test__/Dropdown.test.js +132 -0
  280. package/src/dropdown/__test__/DropdownButtonOption.test.js +8 -0
  281. package/src/dropdown/__test__/DropdownContent.test.js +85 -0
  282. package/src/dropdown/__test__/DropdownDivOption.test.js +8 -0
  283. package/src/dropdown/__test__/DropdownItem.test.js +55 -0
  284. package/src/dropdown/__test__/DropdownLinkOption.test.js +14 -0
  285. package/src/dropdown/__test__/DropdownToggle.test.js +53 -0
  286. package/src/dropdown/index.js +12 -0
  287. package/src/dropdown/subComponent/DropdownContext.js +5 -0
  288. package/src/dropzone/FileDropzone.js +541 -0
  289. package/src/dropzone/ImageDropzone.js +365 -0
  290. package/src/dropzone/__stories__/FileDropzone.stories.js +148 -0
  291. package/src/dropzone/__stories__/ImageDropzone.stories.js +101 -0
  292. package/src/dropzone/__test__/FileDropzone.test.js +382 -0
  293. package/src/dropzone/__test__/ImageDropzone.test.js +290 -0
  294. package/src/dropzone/__test__/Message.test.js +14 -0
  295. package/src/dropzone/index.js +2 -0
  296. package/src/dropzone/subComponent/Message.js +16 -0
  297. package/src/figure/IconFigure.js +31 -0
  298. package/src/figure/ImageFigure.js +25 -0
  299. package/src/figure/__stories__/IconFigure.stories.js +25 -0
  300. package/src/figure/__stories__/ImageFigure.stories.js +26 -0
  301. package/src/figure/__test__/IconFigure.test.js +28 -0
  302. package/src/figure/__test__/ImageFigure.test.js +38 -0
  303. package/src/figure/index.js +2 -0
  304. package/src/file/HiddenFileInput.js +10 -0
  305. package/src/file/index.js +1 -0
  306. package/src/form/Checkbox.js +138 -0
  307. package/src/form/Fieldset.js +13 -0
  308. package/src/form/FormItem.js +12 -0
  309. package/src/form/Input.js +42 -0
  310. package/src/form/Label.js +35 -0
  311. package/src/form/MutedText.js +11 -0
  312. package/src/form/PasswordInput.js +40 -0
  313. package/src/form/RadioButton.js +82 -0
  314. package/src/form/SearchSelect.js +198 -0
  315. package/src/form/Searchbox.js +95 -0
  316. package/src/form/Slider.js +34 -0
  317. package/src/form/SwitchButton.js +86 -0
  318. package/src/form/Textarea.js +36 -0
  319. package/src/form/TreeView.js +77 -0
  320. package/src/form/__stories__/Checkbox.stories.js +87 -0
  321. package/src/form/__stories__/FormItem.stories.js +33 -0
  322. package/src/form/__stories__/Input.stories.js +30 -0
  323. package/src/form/__stories__/Label.stories.js +38 -0
  324. package/src/form/__stories__/MutedText.stories.js +27 -0
  325. package/src/form/__stories__/PasswordInput.stories.js +16 -0
  326. package/src/form/__stories__/RadioButton.stories.js +48 -0
  327. package/src/form/__stories__/SearchSelect.stories.js +99 -0
  328. package/src/form/__stories__/Searchbox.stories.js +24 -0
  329. package/src/form/__stories__/Slider.stories.js +46 -0
  330. package/src/form/__stories__/SwitchButton.stories.js +48 -0
  331. package/src/form/__stories__/Textarea.stories.js +19 -0
  332. package/src/form/__stories__/TreeView.stories.js +76 -0
  333. package/src/form/__test__/Checkbox.test.js +68 -0
  334. package/src/form/__test__/FormItem.test.js +8 -0
  335. package/src/form/__test__/Input.test.js +28 -0
  336. package/src/form/__test__/Label.test.js +33 -0
  337. package/src/form/__test__/MutedText.test.js +18 -0
  338. package/src/form/__test__/RadioButton.test.js +57 -0
  339. package/src/form/__test__/Searchbox.test.js +50 -0
  340. package/src/form/__test__/Textarea.test.js +25 -0
  341. package/src/form/index.js +14 -0
  342. package/src/grid/Column.js +36 -0
  343. package/src/grid/Grid.js +15 -0
  344. package/src/grid/__stories__/Grid.stories.js +38 -0
  345. package/src/grid/__test__/Grid.test.js +44 -0
  346. package/src/grid/index.js +2 -0
  347. package/src/heading/Heading1.js +11 -0
  348. package/src/heading/Heading2.js +13 -0
  349. package/src/heading/Heading3.js +21 -0
  350. package/src/heading/__stories__/Heading1.stories.js +24 -0
  351. package/src/heading/__stories__/Heading2.stories.js +24 -0
  352. package/src/heading/__stories__/Heading3.stories.js +24 -0
  353. package/src/heading/__test__/Heading1.test.js +21 -0
  354. package/src/heading/__test__/Heading2.test.js +34 -0
  355. package/src/heading/__test__/Heading3.test.js +46 -0
  356. package/src/heading/index.js +3 -0
  357. package/src/helmet/Helmet.js +12 -0
  358. package/src/helmet/__test__/Helmet.test.js +38 -0
  359. package/src/helmet/index.js +2 -0
  360. package/src/icon/assets/android.jsx +10 -0
  361. package/src/icon/assets/app-management.jsx +10 -0
  362. package/src/icon/assets/appStore.jsx +6 -0
  363. package/src/icon/assets/battery.jsx +15 -0
  364. package/src/icon/assets/bill.jsx +10 -0
  365. package/src/icon/assets/campaign.jsx +9 -0
  366. package/src/icon/assets/casstore.jsx +8 -0
  367. package/src/icon/assets/dashboard.jsx +6 -0
  368. package/src/icon/assets/enterprise.jsx +15 -0
  369. package/src/icon/assets/firmware.jsx +8 -0
  370. package/src/icon/assets/folder.jsx +8 -0
  371. package/src/icon/assets/group.jsx +18 -0
  372. package/src/icon/assets/heartbeats.jsx +9 -0
  373. package/src/icon/assets/invite-user.jsx +9 -0
  374. package/src/icon/assets/log.jsx +9 -0
  375. package/src/icon/assets/manufacturer.jsx +7 -0
  376. package/src/icon/assets/merchant.jsx +16 -0
  377. package/src/icon/assets/package-collection.jsx +8 -0
  378. package/src/icon/assets/report.jsx +11 -0
  379. package/src/icon/assets/resource.jsx +9 -0
  380. package/src/icon/assets/role.jsx +7 -0
  381. package/src/icon/assets/shield-lock.jsx +202 -0
  382. package/src/icon/assets/shield-no-signal.jsx +195 -0
  383. package/src/icon/assets/shield-unsafe.jsx +191 -0
  384. package/src/icon/assets/shield.jsx +186 -0
  385. package/src/icon/assets/statistics.jsx +9 -0
  386. package/src/icon/assets/tag.jsx +14 -0
  387. package/src/icon/assets/template-management.jsx +8 -0
  388. package/src/icon/assets/terminal.jsx +7 -0
  389. package/src/icon/assets/tradeye.jsx +7 -0
  390. package/src/icon/registry.js +65 -0
  391. package/src/iconbox/ApplicationIconBox.js +62 -0
  392. package/src/iconbox/IconBox.js +85 -0
  393. package/src/iconbox/IconBoxV2.js +61 -0
  394. package/src/iconbox/__stories__/ApplicationIconBox.stories.js +53 -0
  395. package/src/iconbox/__stories__/IconBox.stories.js +34 -0
  396. package/src/iconbox/__stories__/IconBoxFigure.stories.js +67 -0
  397. package/src/iconbox/__stories__/IconBoxFigure.stories_V2.stories.js +41 -0
  398. package/src/iconbox/__stories__/IconBoxImage.stories.js +32 -0
  399. package/src/iconbox/__stories__/IconBoxV2.stories.js +66 -0
  400. package/src/iconbox/__test__/ApplicationIconBox.test.js +77 -0
  401. package/src/iconbox/__test__/IconBox.test.js +22 -0
  402. package/src/iconbox/__test__/IconBoxFigure.test.js +37 -0
  403. package/src/iconbox/__test__/IconBoxImage.test.js +32 -0
  404. package/src/iconbox/__test__/IconBoxV2.test.js +51 -0
  405. package/src/iconbox/assets/bg-enterprise.png +0 -0
  406. package/src/iconbox/assets/bg-merchant.png +0 -0
  407. package/src/iconbox/assets/bg-terminal.png +0 -0
  408. package/src/iconbox/assets/bg-user.png +0 -0
  409. package/src/iconbox/bgImageRegistry.js +13 -0
  410. package/src/iconbox/index.js +3 -0
  411. package/src/iconbox/subComponent/IconBoxFigure.js +16 -0
  412. package/src/iconbox/subComponent/IconBoxImage.js +52 -0
  413. package/src/image/ImageFluid.js +12 -0
  414. package/src/image/UploadImage.js +287 -0
  415. package/src/image/__stories__/ImageFluid.stories.js +25 -0
  416. package/src/image/__stories__/UploadImage.stories.js +56 -0
  417. package/src/image/__test__/ImageFluid.test.js +44 -0
  418. package/src/image/__test__/UploadImage.test.js +315 -0
  419. package/src/image/index.js +2 -0
  420. package/src/index.js +49 -0
  421. package/src/jsoneditor/JsonEditor.js +132 -0
  422. package/src/jsoneditor/__stories__/JsonEditor.stories.js +55 -0
  423. package/src/jsoneditor/__test__/JsonEditor.test.js +52 -0
  424. package/src/jsoneditor/index.js +1 -0
  425. package/src/keyframe/Pulse.js +17 -0
  426. package/src/keyframe/Spin.js +9 -0
  427. package/src/layout/Aside.js +47 -0
  428. package/src/layout/AsideHeader.jsx +27 -0
  429. package/src/layout/Backdrop.js +13 -0
  430. package/src/layout/Container.js +48 -0
  431. package/src/layout/Footer.js +32 -0
  432. package/src/layout/Header.jsx +48 -0
  433. package/src/layout/Layout.jsx +69 -0
  434. package/src/layout/Logo.jsx +17 -0
  435. package/src/layout/MenuIcon.jsx +45 -0
  436. package/src/layout/Sidebar.jsx +261 -0
  437. package/src/layout/assets/burger-modern.jsx +9 -0
  438. package/src/layout/bgMainRegistry.js +9 -0
  439. package/src/layout/index.js +1 -0
  440. package/src/link/LinkSpan.js +44 -0
  441. package/src/link/__stories__/LinkSpan.stories.js +27 -0
  442. package/src/link/__test__/LinkSpan.test.js +52 -0
  443. package/src/link/index.js +1 -0
  444. package/src/map/GoogleMap.js +489 -0
  445. package/src/map/GoogleReverseGeolocation.js +197 -0
  446. package/src/map/LeafletMap.js +264 -0
  447. package/src/map/LeafletReverseGeolocation.js +89 -0
  448. package/src/map/__stories__/GoogleMap.stories.js +139 -0
  449. package/src/map/__stories__/GoogleReverseGeolocation.stories.js +95 -0
  450. package/src/map/__stories__/LeafletMap.stories.js +136 -0
  451. package/src/map/__stories__/LeafletReverseGeolocation.stories.js +91 -0
  452. package/src/map/__test__/LeafletReverseGeolocation.test.js +245 -0
  453. package/src/map/__test__/MapSearchBoxControl.test.js +89 -0
  454. package/src/map/index.js +4 -0
  455. package/src/map/subComponent/BasicLeafletMap.js +33 -0
  456. package/src/map/subComponent/GoogleMapContainer.js +19 -0
  457. package/src/map/subComponent/GoogleMapPopup.js +115 -0
  458. package/src/map/subComponent/GoogleMapWrapper.js +27 -0
  459. package/src/map/subComponent/LeafletDrawControl.js +133 -0
  460. package/src/map/subComponent/LeafletMapContainer.js +163 -0
  461. package/src/map/subComponent/MapSearchBoxControl.js +43 -0
  462. package/src/modal/StateModal.js +182 -0
  463. package/src/modal/TitleModal.js +244 -0
  464. package/src/modal/__stories__/StateModal.stories.js +119 -0
  465. package/src/modal/__stories__/TitleModal.stories.js +56 -0
  466. package/src/modal/__test__/StateModal.test.js +144 -0
  467. package/src/modal/index.js +2 -0
  468. package/src/page/Disclaimer.js +123 -0
  469. package/src/page/index.js +1 -0
  470. package/src/paginate/Paginate.js +132 -0
  471. package/src/paginate/__stories__/Paginate.stories.js +49 -0
  472. package/src/paginate/__test__/Paginate.test.js +124 -0
  473. package/src/paginate/index.js +1 -0
  474. package/src/popover/Popover.js +82 -0
  475. package/src/popover/__stories__/Popover.stories.js +44 -0
  476. package/src/popover/index.js +1 -0
  477. package/src/qrcode/QRCode.js +54 -0
  478. package/src/qrcode/QRCodeContainter.js +25 -0
  479. package/src/qrcode/__stories__/QRCode.stories.js +36 -0
  480. package/src/qrcode/__stories__/QRCodeContainter.stories.js +28 -0
  481. package/src/qrcode/index.js +2 -0
  482. package/src/ribbon/Ribbon.js +38 -0
  483. package/src/ribbon/__stories__/Ribbon.stories.js +25 -0
  484. package/src/ribbon/index.js +1 -0
  485. package/src/section/Section.js +66 -0
  486. package/src/section/SectionBody.js +34 -0
  487. package/src/section/SectionHeader.js +41 -0
  488. package/src/section/SectionToolbar.js +13 -0
  489. package/src/section/SectionToolbarItem.js +12 -0
  490. package/src/section/__stories__/Section.stories.js +52 -0
  491. package/src/section/__stories__/SectionBody.stories.js +40 -0
  492. package/src/section/__stories__/SectionHeader.stories.js +67 -0
  493. package/src/section/__stories__/SectionToolbar.stories.js +43 -0
  494. package/src/section/__test__/Section.test.js +98 -0
  495. package/src/section/__test__/SectionBody.test.js +89 -0
  496. package/src/section/__test__/SectionHeader.test.js +35 -0
  497. package/src/section/__test__/SectionToolbar.test.js +17 -0
  498. package/src/section/index.js +5 -0
  499. package/src/select/InputSelect.js +314 -0
  500. package/src/select/Select.js +935 -0
  501. package/src/select/__stories__/InputSelect.stories.js +60 -0
  502. package/src/select/__stories__/Select.stories.js +236 -0
  503. package/src/select/__test__/Select.test.js +219 -0
  504. package/src/select/index.js +2 -0
  505. package/src/select/subComponent/Checkbox.js +33 -0
  506. package/src/select/subComponent/Footer.js +8 -0
  507. package/src/select/subComponent/ListBox.js +15 -0
  508. package/src/select/subComponent/Option.js +30 -0
  509. package/src/select/subComponent/OptionGroup.js +18 -0
  510. package/src/select/subComponent/Options.js +24 -0
  511. package/src/select/subComponent/SearchBox.js +53 -0
  512. package/src/select/subComponent/SelectedMultipleCount.js +42 -0
  513. package/src/select/subComponent/SelectedMultipleTags.js +41 -0
  514. package/src/select/subComponent/SelectedMultipleText.js +61 -0
  515. package/src/select/subComponent/SelectedSingle.js +12 -0
  516. package/src/styles/GlobalStyle.js +110 -0
  517. package/src/styles/config/breakpoint.style.js +8 -0
  518. package/src/styles/config/header.style.js +5 -0
  519. package/src/styles/config/sidebar.style.js +12 -0
  520. package/src/styles/index.js +2 -0
  521. package/src/styles/mixin/backgroundColor.js +15 -0
  522. package/src/styles/mixin/borderColor.js +15 -0
  523. package/src/styles/mixin/color.js +15 -0
  524. package/src/styles/mixin/colorOnBackground.js +13 -0
  525. package/src/styles/mixin/inputPlaceholder.js +26 -0
  526. package/src/styles/mixin/media.js +14 -0
  527. package/src/styles/mixin/rounded.js +12 -0
  528. package/src/styles/mixin/scrollbar.js +26 -0
  529. package/src/styles/theme/dark.theme.js +101 -0
  530. package/src/styles/theme/ember.theme.js +94 -0
  531. package/src/styles/theme/light.theme.js +99 -0
  532. package/src/styles/theme/midnight.theme.js +93 -0
  533. package/src/styles/theme/white.theme.js +103 -0
  534. package/src/styles/themes.js +15 -0
  535. package/src/table/GridTable.js +333 -0
  536. package/src/table/ImageBox.js +37 -0
  537. package/src/table/InfiniteGridTable.js +424 -0
  538. package/src/table/PermissionTable.js +36 -0
  539. package/src/table/SimpleGridTable.js +135 -0
  540. package/src/table/Table.js +553 -0
  541. package/src/table/__mock__/columns.js +67 -0
  542. package/src/table/__mock__/data.js +456 -0
  543. package/src/table/__stories__/GridTable.stories.js +129 -0
  544. package/src/table/__stories__/ImageBox.stories.js +27 -0
  545. package/src/table/__stories__/InfiniteGridTable.stories.js +120 -0
  546. package/src/table/__stories__/PermissionTable.stories.js +52 -0
  547. package/src/table/__stories__/SimpleGridTable.stories.js +58 -0
  548. package/src/table/__stories__/Table.stories.js +158 -0
  549. package/src/table/hooks/index.js +2 -0
  550. package/src/table/hooks/useCalculateDataRange.js +26 -0
  551. package/src/table/hooks/useGenerateSort.js +37 -0
  552. package/src/table/index.js +6 -0
  553. package/src/table/subComponent/BaseTableHeadCell.js +48 -0
  554. package/src/table/subComponent/GridTableFooter.js +18 -0
  555. package/src/table/subComponent/GridTableHeadCell.js +14 -0
  556. package/src/table/subComponent/Resizer.js +81 -0
  557. package/src/table/subComponent/TableFooter.js +19 -0
  558. package/src/table/subComponent/TableFooterInfo.js +8 -0
  559. package/src/table/subComponent/TableFooterPager.js +26 -0
  560. package/src/table/subComponent/TableHeadCell.js +14 -0
  561. package/src/table/subComponent/TableSort.js +25 -0
  562. package/src/tagify/TagifyStyle.js +55 -0
  563. package/src/tagify/Tags.js +49 -0
  564. package/src/tagify/__stories__/Tags.stories.js +59 -0
  565. package/src/tagify/index.js +3 -0
  566. package/src/tagify/templates/getCreateButtonTemplate.js +12 -0
  567. package/src/text/Paragraph.js +52 -0
  568. package/src/text/__stories__/Paragraph.stories.js +40 -0
  569. package/src/text/index.js +1 -0
  570. package/src/timeline/Timeline.js +106 -0
  571. package/src/timeline/__stories__/Timeline.stories.js +55 -0
  572. package/src/timeline/index.js +1 -0
  573. package/src/toast/CustomToastContainer.js +40 -0
  574. package/src/toast/MessageContainer.js +40 -0
  575. package/src/toast/__stories__/MessageContainer.stories.js +47 -0
  576. package/src/toast/index.js +3 -0
  577. package/src/toast/show.js +39 -0
  578. package/src/toast/style.css +1 -0
  579. package/src/tooltip/Tooltip.js +149 -0
  580. package/src/tooltip/__stories__/Tooltip.stories.js +72 -0
  581. package/src/tooltip/__test__/tooltip.test.js +130 -0
  582. package/src/tooltip/index.js +1 -0
  583. package/src/treeView/TreeViewV2.js +33 -0
  584. package/src/treeView/TreeflexStyle.js +44 -0
  585. package/src/treeView/index.js +2 -0
  586. package/src/wizard/Wizard.js +276 -0
  587. package/src/wizard/__stories__/Wizard.stories.js +81 -0
  588. package/src/wizard/__test__/Wizard.test.js +173 -0
  589. package/src/wizard/index.js +1 -0
  590. package/src/xmleditor/XmlEditor.js +25 -0
  591. package/src/xmleditor/index.js +1 -0
  592. package/transformer/fileTransformer.js +9 -0
  593. package/assets/images/bg-aside.png +0 -0
  594. package/button/IconButton.js +0 -72
  595. package/iconbox/IconBox.js +0 -67
  596. package/iconbox/subComponent/IconBoxImage.js +0 -42
  597. package/layout/Aside.js +0 -48
  598. package/layout/Container.js +0 -39
  599. package/layout/Header.jsx +0 -55
  600. package/layout/Layout.jsx +0 -84
  601. package/layout/Logo.jsx +0 -17
  602. package/layout/MenuIcon.jsx +0 -27
  603. package/layout/Sidebar.jsx +0 -271
  604. package/styles/GlobalStyle.js +0 -334
  605. package/styles/theme/dark.theme.js +0 -97
  606. package/styles/theme/white.theme.js +0 -97
  607. package/styles/themes.js +0 -16
  608. /package/{Tab → dist/Tab}/Tab.js +0 -0
  609. /package/{Tab → dist/Tab}/TabList.js +0 -0
  610. /package/{Tab → dist/Tab}/TabPanel.js +0 -0
  611. /package/{Tab → dist/Tab}/TabTab.js +0 -0
  612. /package/{Tab → dist/Tab}/index.js +0 -0
  613. /package/{Tab → dist/Tab}/subComponent/TabContext.js +0 -0
  614. /package/{Tab → dist/Tab}/subComponent/TabListV2.js +0 -0
  615. /package/{Tab → dist/Tab}/subComponent/TabPanelV2.js +0 -0
  616. /package/{Tab → dist/Tab}/subComponent/TabTabV2.js +0 -0
  617. /package/{VerticalTab → dist/VerticalTab}/TabList.js +0 -0
  618. /package/{VerticalTab → dist/VerticalTab}/TabPanel.js +0 -0
  619. /package/{VerticalTab → dist/VerticalTab}/TabTab.js +0 -0
  620. /package/{VerticalTab → dist/VerticalTab}/VerticalTab.js +0 -0
  621. /package/{VerticalTab → dist/VerticalTab}/index.js +0 -0
  622. /package/{VerticalTab → dist/VerticalTab}/subComponent/TabContext.js +0 -0
  623. /package/{alert → dist/alert}/Alert.js +0 -0
  624. /package/{alert → dist/alert}/index.js +0 -0
  625. /package/{animate → dist/animate}/Collapse.js +0 -0
  626. /package/{animate → dist/animate}/Loader.js +0 -0
  627. /package/{animate → dist/animate}/NumberCounter.js +0 -0
  628. /package/{animate → dist/animate}/PulseRing.js +0 -0
  629. /package/{animate → dist/animate}/Spinner.js +0 -0
  630. /package/{animate → dist/animate}/index.js +0 -0
  631. /package/{assets → dist/assets}/css/autocomplete.css +0 -0
  632. /package/{assets → dist/assets}/css/font.css +0 -0
  633. /package/{assets → dist/assets}/css/global.css +0 -0
  634. /package/{assets → dist/assets}/font/helvetica/Helvetica.ttf +0 -0
  635. /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
  636. /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
  637. /package/{assets → dist/assets}/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
  638. /package/{assets → dist/assets}/icons/app-management.png +0 -0
  639. /package/{assets → dist/assets}/icons/burger-black.png +0 -0
  640. /package/{assets → dist/assets}/icons/burger-white.png +0 -0
  641. /package/{assets → dist/assets}/icons/burger.png +0 -0
  642. /package/{assets → dist/assets}/icons/file.svg +0 -0
  643. /package/{assets → dist/assets}/icons/map_icon1.png +0 -0
  644. /package/{assets → dist/assets}/icons/map_icon4.png +0 -0
  645. /package/{assets → dist/assets}/images/bg-chart-circle.png +0 -0
  646. /package/{assets → dist/assets}/images/bg-chart-triangle.png +0 -0
  647. /package/{assets → dist/assets}/images/cashub-logo-only.png +0 -0
  648. /package/{assets → dist/assets}/images/default-user.jpg +0 -0
  649. /package/{assets → dist/assets}/images/logo-cashub.png +0 -0
  650. /package/{assets → dist/assets}/images/map.png +0 -0
  651. /package/{assets → dist/assets}/images/qrcode.png +0 -0
  652. /package/{backdrop → dist/backdrop}/BaseBackdrop.js +0 -0
  653. /package/{backdrop → dist/backdrop}/LoadingBackdrop.js +0 -0
  654. /package/{backdrop → dist/backdrop}/ModalBackdrop.js +0 -0
  655. /package/{backdrop → dist/backdrop}/index.js +0 -0
  656. /package/{badge → dist/badge}/Badge.js +0 -0
  657. /package/{badge → dist/badge}/BadgeDot.js +0 -0
  658. /package/{badge → dist/badge}/BadgeFill.js +0 -0
  659. /package/{badge → dist/badge}/BadgeFillTriangle.js +0 -0
  660. /package/{badge → dist/badge}/BadgeWithText.js +0 -0
  661. /package/{badge → dist/badge}/index.js +0 -0
  662. /package/{billing → dist/billing}/BarChart.js +0 -0
  663. /package/{billing → dist/billing}/Grid.js +0 -0
  664. /package/{billing → dist/billing}/Header2.js +0 -0
  665. /package/{billing → dist/billing}/Header3.js +0 -0
  666. /package/{billing → dist/billing}/Paragraph.js +0 -0
  667. /package/{billing → dist/billing}/ParagraphGroup.js +0 -0
  668. /package/{billing → dist/billing}/ParagraphText.js +0 -0
  669. /package/{billing → dist/billing}/Section.js +0 -0
  670. /package/{billing → dist/billing}/SectionBody.js +0 -0
  671. /package/{billing → dist/billing}/SectionHeader.js +0 -0
  672. /package/{billing → dist/billing}/__stories__/BarChart.stories.js_bak +0 -0
  673. /package/{billing → dist/billing}/__stories__/Grid.stories.js_bak +0 -0
  674. /package/{billing → dist/billing}/__stories__/Header2.stories.js_bak +0 -0
  675. /package/{billing → dist/billing}/__stories__/Header3.stories.js_bak +0 -0
  676. /package/{billing → dist/billing}/__stories__/Paragraph.stories.js_bak +0 -0
  677. /package/{billing → dist/billing}/__stories__/ParagraphGroup.stories.js_bak +0 -0
  678. /package/{billing → dist/billing}/__stories__/ParagraphText.stories.js_bak +0 -0
  679. /package/{billing → dist/billing}/__stories__/Section.stories.js_bak +0 -0
  680. /package/{billing → dist/billing}/__stories__/SectionBody.stories.js_bak +0 -0
  681. /package/{billing → dist/billing}/__stories__/SectionHeader.stories.js-bak +0 -0
  682. /package/{breadcrumb → dist/breadcrumb}/Breadcrumb.js +0 -0
  683. /package/{breadcrumb → dist/breadcrumb}/index.js +0 -0
  684. /package/{button → dist/button}/Button.js +0 -0
  685. /package/{button → dist/button}/ButtonGroup.js +0 -0
  686. /package/{button → dist/button}/ScrollToTopButton.js +0 -0
  687. /package/{button → dist/button}/index.js +0 -0
  688. /package/{callout → dist/callout}/Callout.js +0 -0
  689. /package/{callout → dist/callout}/index.js +0 -0
  690. /package/{chart → dist/chart}/BarChart.js +0 -0
  691. /package/{chart → dist/chart}/DoughnutChart.js +0 -0
  692. /package/{chart → dist/chart}/LineChart.js +0 -0
  693. /package/{chart → dist/chart}/SingleBarChart.js +0 -0
  694. /package/{chart → dist/chart}/index.js +0 -0
  695. /package/{chart → dist/chart}/utils/centerTextPlugin.js +0 -0
  696. /package/{chart → dist/chart}/utils/customTooltip.js +0 -0
  697. /package/{chart → dist/chart}/utils/htmlLegendPlugin.js +0 -0
  698. /package/{chart → dist/chart}/utils/index.js +0 -0
  699. /package/{chart → dist/chart}/utils/padEmptyChartBar.js +0 -0
  700. /package/{chart → dist/chart}/utils/yAxisTopTitlePlugin.js +0 -0
  701. /package/{container → dist/container}/FlexContainer.js +0 -0
  702. /package/{container → dist/container}/index.js +0 -0
  703. /package/{cropper → dist/cropper}/Cropper.js +0 -0
  704. /package/{cropper → dist/cropper}/CropperModalHandler.js +0 -0
  705. /package/{cropper → dist/cropper}/index.js +0 -0
  706. /package/{cropper → dist/cropper}/subComponent/CropImageModal.js +0 -0
  707. /package/{datetimePicker → dist/datetimePicker}/DatePicker.js +0 -0
  708. /package/{datetimePicker → dist/datetimePicker}/DatePickerV2.js +0 -0
  709. /package/{datetimePicker → dist/datetimePicker}/DatetimePicker.js +0 -0
  710. /package/{datetimePicker → dist/datetimePicker}/DatetimePickerV2.js +0 -0
  711. /package/{datetimePicker → dist/datetimePicker}/DatetimePickerV3.js +0 -0
  712. /package/{datetimePicker → dist/datetimePicker}/TimeInput.js +0 -0
  713. /package/{datetimePicker → dist/datetimePicker}/TimePicker.js +0 -0
  714. /package/{datetimePicker → dist/datetimePicker}/TimePickerStyle.js +0 -0
  715. /package/{datetimePicker → dist/datetimePicker}/TimePickerV2.js +0 -0
  716. /package/{datetimePicker → dist/datetimePicker}/accordion/Month.js +0 -0
  717. /package/{datetimePicker → dist/datetimePicker}/accordion/Year.js +0 -0
  718. /package/{datetimePicker → dist/datetimePicker}/hooks/index.js +0 -0
  719. /package/{datetimePicker → dist/datetimePicker}/hooks/useChangeNumber.js +0 -0
  720. /package/{datetimePicker → dist/datetimePicker}/hooks/useDecrease.js +0 -0
  721. /package/{datetimePicker → dist/datetimePicker}/hooks/useIncrease.js +0 -0
  722. /package/{datetimePicker → dist/datetimePicker}/index.js +0 -0
  723. /package/{datetimePicker → dist/datetimePicker}/provider/constant.js +0 -0
  724. /package/{datetimePicker → dist/datetimePicker}/subComponent/Accordion.js +0 -0
  725. /package/{datetimePicker → dist/datetimePicker}/subComponent/CustomTimeInput.js +0 -0
  726. /package/{datetimePicker → dist/datetimePicker}/subComponent/DateTimePickerContext.js +0 -0
  727. /package/{datetimePicker → dist/datetimePicker}/utils/GMTDate.js +0 -0
  728. /package/{datetimePicker → dist/datetimePicker}/utils/pad.js +0 -0
  729. /package/{datetimePicker → dist/datetimePicker}/utils/toUTC0.js +0 -0
  730. /package/{descriptionList → dist/descriptionList}/DescriptionDetail.js +0 -0
  731. /package/{descriptionList → dist/descriptionList}/DescriptionList.js +0 -0
  732. /package/{descriptionList → dist/descriptionList}/DescriptionTerm.js +0 -0
  733. /package/{descriptionList → dist/descriptionList}/index.js +0 -0
  734. /package/{divider → dist/divider}/Divider.js +0 -0
  735. /package/{divider → dist/divider}/index.js +0 -0
  736. /package/{dropdown → dist/dropdown}/Dropdown.js +0 -0
  737. /package/{dropdown → dist/dropdown}/DropdownButtonOption.js +0 -0
  738. /package/{dropdown → dist/dropdown}/DropdownContent.js +0 -0
  739. /package/{dropdown → dist/dropdown}/DropdownDivOption.js +0 -0
  740. /package/{dropdown → dist/dropdown}/DropdownItem.js +0 -0
  741. /package/{dropdown → dist/dropdown}/DropdownLinkOption.js +0 -0
  742. /package/{dropdown → dist/dropdown}/DropdownToggle.js +0 -0
  743. /package/{dropdown → dist/dropdown}/index.js +0 -0
  744. /package/{dropdown → dist/dropdown}/subComponent/DropdownContext.js +0 -0
  745. /package/{dropzone → dist/dropzone}/FileDropzone.js +0 -0
  746. /package/{dropzone → dist/dropzone}/ImageDropzone.js +0 -0
  747. /package/{dropzone → dist/dropzone}/index.js +0 -0
  748. /package/{dropzone → dist/dropzone}/subComponent/Message.js +0 -0
  749. /package/{figure → dist/figure}/IconFigure.js +0 -0
  750. /package/{figure → dist/figure}/ImageFigure.js +0 -0
  751. /package/{figure → dist/figure}/index.js +0 -0
  752. /package/{file → dist/file}/HiddenFileInput.js +0 -0
  753. /package/{file → dist/file}/index.js +0 -0
  754. /package/{form → dist/form}/Checkbox.js +0 -0
  755. /package/{form → dist/form}/Fieldset.js +0 -0
  756. /package/{form → dist/form}/FormItem.js +0 -0
  757. /package/{form → dist/form}/Input.js +0 -0
  758. /package/{form → dist/form}/Label.js +0 -0
  759. /package/{form → dist/form}/MutedText.js +0 -0
  760. /package/{form → dist/form}/PasswordInput.js +0 -0
  761. /package/{form → dist/form}/RadioButton.js +0 -0
  762. /package/{form → dist/form}/SearchSelect.js +0 -0
  763. /package/{form → dist/form}/Searchbox.js +0 -0
  764. /package/{form → dist/form}/Slider.js +0 -0
  765. /package/{form → dist/form}/SwitchButton.js +0 -0
  766. /package/{form → dist/form}/Textarea.js +0 -0
  767. /package/{form → dist/form}/TreeView.js +0 -0
  768. /package/{form → dist/form}/index.js +0 -0
  769. /package/{grid → dist/grid}/Column.js +0 -0
  770. /package/{grid → dist/grid}/Grid.js +0 -0
  771. /package/{grid → dist/grid}/index.js +0 -0
  772. /package/{heading → dist/heading}/Heading1.js +0 -0
  773. /package/{heading → dist/heading}/Heading2.js +0 -0
  774. /package/{heading → dist/heading}/Heading3.js +0 -0
  775. /package/{heading → dist/heading}/index.js +0 -0
  776. /package/{helmet → dist/helmet}/Helmet.js +0 -0
  777. /package/{helmet → dist/helmet}/index.js +0 -0
  778. /package/{iconbox → dist/iconbox}/ApplicationIconBox.js +0 -0
  779. /package/{iconbox → dist/iconbox}/IconBoxV2.js +0 -0
  780. /package/{iconbox → dist/iconbox}/index.js +0 -0
  781. /package/{iconbox → dist/iconbox}/subComponent/IconBoxFigure.js +0 -0
  782. /package/{image → dist/image}/ImageFluid.js +0 -0
  783. /package/{image → dist/image}/UploadImage.js +0 -0
  784. /package/{image → dist/image}/index.js +0 -0
  785. /package/{index.js → dist/index.js} +0 -0
  786. /package/{jsoneditor → dist/jsoneditor}/JsonEditor.js +0 -0
  787. /package/{jsoneditor → dist/jsoneditor}/index.js +0 -0
  788. /package/{keyframe → dist/keyframe}/Pulse.js +0 -0
  789. /package/{keyframe → dist/keyframe}/Spin.js +0 -0
  790. /package/{layout → dist/layout}/AsideHeader.jsx +0 -0
  791. /package/{layout → dist/layout}/Backdrop.js +0 -0
  792. /package/{layout → dist/layout}/Footer.js +0 -0
  793. /package/{layout → dist/layout}/index.js +0 -0
  794. /package/{link → dist/link}/LinkSpan.js +0 -0
  795. /package/{link → dist/link}/index.js +0 -0
  796. /package/{map → dist/map}/GoogleMap.js +0 -0
  797. /package/{map → dist/map}/GoogleReverseGeolocation.js +0 -0
  798. /package/{map → dist/map}/LeafletMap.js +0 -0
  799. /package/{map → dist/map}/LeafletReverseGeolocation.js +0 -0
  800. /package/{map → dist/map}/index.js +0 -0
  801. /package/{map → dist/map}/subComponent/BasicLeafletMap.js +0 -0
  802. /package/{map → dist/map}/subComponent/GoogleMapContainer.js +0 -0
  803. /package/{map → dist/map}/subComponent/GoogleMapPopup.js +0 -0
  804. /package/{map → dist/map}/subComponent/GoogleMapWrapper.js +0 -0
  805. /package/{map → dist/map}/subComponent/LeafletDrawControl.js +0 -0
  806. /package/{map → dist/map}/subComponent/LeafletMapContainer.js +0 -0
  807. /package/{map → dist/map}/subComponent/MapSearchBoxControl.js +0 -0
  808. /package/{modal → dist/modal}/StateModal.js +0 -0
  809. /package/{modal → dist/modal}/TitleModal.js +0 -0
  810. /package/{modal → dist/modal}/index.js +0 -0
  811. /package/{page → dist/page}/Disclaimer.js +0 -0
  812. /package/{page → dist/page}/index.js +0 -0
  813. /package/{paginate → dist/paginate}/Paginate.js +0 -0
  814. /package/{paginate → dist/paginate}/index.js +0 -0
  815. /package/{popover → dist/popover}/Popover.js +0 -0
  816. /package/{popover → dist/popover}/index.js +0 -0
  817. /package/{qrcode → dist/qrcode}/QRCode.js +0 -0
  818. /package/{qrcode → dist/qrcode}/QRCodeContainter.js +0 -0
  819. /package/{qrcode → dist/qrcode}/index.js +0 -0
  820. /package/{ribbon → dist/ribbon}/Ribbon.js +0 -0
  821. /package/{ribbon → dist/ribbon}/index.js +0 -0
  822. /package/{section → dist/section}/Section.js +0 -0
  823. /package/{section → dist/section}/SectionBody.js +0 -0
  824. /package/{section → dist/section}/SectionHeader.js +0 -0
  825. /package/{section → dist/section}/SectionToolbar.js +0 -0
  826. /package/{section → dist/section}/SectionToolbarItem.js +0 -0
  827. /package/{section → dist/section}/index.js +0 -0
  828. /package/{select → dist/select}/InputSelect.js +0 -0
  829. /package/{select → dist/select}/Select.js +0 -0
  830. /package/{select → dist/select}/index.js +0 -0
  831. /package/{select → dist/select}/subComponent/Checkbox.js +0 -0
  832. /package/{select → dist/select}/subComponent/Footer.js +0 -0
  833. /package/{select → dist/select}/subComponent/ListBox.js +0 -0
  834. /package/{select → dist/select}/subComponent/Option.js +0 -0
  835. /package/{select → dist/select}/subComponent/OptionGroup.js +0 -0
  836. /package/{select → dist/select}/subComponent/Options.js +0 -0
  837. /package/{select → dist/select}/subComponent/SearchBox.js +0 -0
  838. /package/{select → dist/select}/subComponent/SelectedMultipleCount.js +0 -0
  839. /package/{select → dist/select}/subComponent/SelectedMultipleTags.js +0 -0
  840. /package/{select → dist/select}/subComponent/SelectedMultipleText.js +0 -0
  841. /package/{select → dist/select}/subComponent/SelectedSingle.js +0 -0
  842. /package/{styles → dist/styles}/config/breakpoint.style.js +0 -0
  843. /package/{styles → dist/styles}/config/header.style.js +0 -0
  844. /package/{styles → dist/styles}/config/sidebar.style.js +0 -0
  845. /package/{styles → dist/styles}/index.js +0 -0
  846. /package/{styles → dist/styles}/mixin/backgroundColor.js +0 -0
  847. /package/{styles → dist/styles}/mixin/borderColor.js +0 -0
  848. /package/{styles → dist/styles}/mixin/color.js +0 -0
  849. /package/{styles → dist/styles}/mixin/colorOnBackground.js +0 -0
  850. /package/{styles → dist/styles}/mixin/inputPlaceholder.js +0 -0
  851. /package/{styles → dist/styles}/mixin/media.js +0 -0
  852. /package/{styles → dist/styles}/mixin/rounded.js +0 -0
  853. /package/{styles → dist/styles}/mixin/scrollbar.js +0 -0
  854. /package/{styles → dist/styles}/theme/light.theme.js +0 -0
  855. /package/{table → dist/table}/GridTable.js +0 -0
  856. /package/{table → dist/table}/ImageBox.js +0 -0
  857. /package/{table → dist/table}/InfiniteGridTable.js +0 -0
  858. /package/{table → dist/table}/PermissionTable.js +0 -0
  859. /package/{table → dist/table}/SimpleGridTable.js +0 -0
  860. /package/{table → dist/table}/Table.js +0 -0
  861. /package/{table → dist/table}/__mock__/columns.js +0 -0
  862. /package/{table → dist/table}/__mock__/data.js +0 -0
  863. /package/{table → dist/table}/hooks/index.js +0 -0
  864. /package/{table → dist/table}/hooks/useCalculateDataRange.js +0 -0
  865. /package/{table → dist/table}/hooks/useGenerateSort.js +0 -0
  866. /package/{table → dist/table}/index.js +0 -0
  867. /package/{table → dist/table}/subComponent/BaseTableHeadCell.js +0 -0
  868. /package/{table → dist/table}/subComponent/GridTableFooter.js +0 -0
  869. /package/{table → dist/table}/subComponent/GridTableHeadCell.js +0 -0
  870. /package/{table → dist/table}/subComponent/Resizer.js +0 -0
  871. /package/{table → dist/table}/subComponent/TableFooter.js +0 -0
  872. /package/{table → dist/table}/subComponent/TableFooterInfo.js +0 -0
  873. /package/{table → dist/table}/subComponent/TableFooterPager.js +0 -0
  874. /package/{table → dist/table}/subComponent/TableHeadCell.js +0 -0
  875. /package/{table → dist/table}/subComponent/TableSort.js +0 -0
  876. /package/{tagify → dist/tagify}/TagifyStyle.js +0 -0
  877. /package/{tagify → dist/tagify}/Tags.js +0 -0
  878. /package/{tagify → dist/tagify}/index.js +0 -0
  879. /package/{tagify → dist/tagify}/templates/getCreateButtonTemplate.js +0 -0
  880. /package/{text → dist/text}/Paragraph.js +0 -0
  881. /package/{text → dist/text}/index.js +0 -0
  882. /package/{timeline → dist/timeline}/Timeline.js +0 -0
  883. /package/{timeline → dist/timeline}/index.js +0 -0
  884. /package/{toast → dist/toast}/CustomToastContainer.js +0 -0
  885. /package/{toast → dist/toast}/MessageContainer.js +0 -0
  886. /package/{toast → dist/toast}/index.js +0 -0
  887. /package/{toast → dist/toast}/show.js +0 -0
  888. /package/{toast → dist/toast}/style.css +0 -0
  889. /package/{tooltip → dist/tooltip}/Tooltip.js +0 -0
  890. /package/{tooltip → dist/tooltip}/index.js +0 -0
  891. /package/{treeView → dist/treeView}/TreeViewV2.js +0 -0
  892. /package/{treeView → dist/treeView}/TreeflexStyle.js +0 -0
  893. /package/{treeView → dist/treeView}/index.js +0 -0
  894. /package/{wizard → dist/wizard}/Wizard.js +0 -0
  895. /package/{wizard → dist/wizard}/index.js +0 -0
  896. /package/{xmleditor → dist/xmleditor}/XmlEditor.js +0 -0
  897. /package/{xmleditor → dist/xmleditor}/index.js +0 -0
@@ -0,0 +1,51 @@
1
+ import { defaults } from 'react-chartjs-2';
2
+
3
+ const centerTextPlugin = {
4
+ id: 'centerText',
5
+ beforeDraw: (chart) => {
6
+ const { options, data } = chart.config;
7
+
8
+ const config = options.plugins.centerText;
9
+ if (!config || !config.display) {
10
+ return;
11
+ }
12
+
13
+ const {
14
+ ctx,
15
+ chartArea: { top, width, height },
16
+ } = chart;
17
+ ctx.save();
18
+
19
+ // calculate center position
20
+ const centerX = width / 2;
21
+ const centerY = height / 2 + top;
22
+
23
+ // font settings
24
+ const { font, color } = defaults;
25
+ const { family, size, lineHeight } = font;
26
+ const offset = (size * lineHeight) / 2;
27
+ ctx.textAlign = 'center';
28
+ ctx.textBaseline = 'middle';
29
+ ctx.fillStyle = color;
30
+
31
+ const { title } = config;
32
+ if (title) {
33
+ ctx.font = `bold ${size}px ${family}`;
34
+ ctx.fillText(title, centerX, centerY - offset);
35
+ }
36
+
37
+ const total = data.datasets[0].data.reduce((total, current) => {
38
+ return total + current;
39
+ }, 0);
40
+ ctx.font = `${size}px ${family}`;
41
+ ctx.fillText(
42
+ total.toLocaleString(),
43
+ centerX,
44
+ centerY + (title ? offset : 0),
45
+ );
46
+
47
+ ctx.restore();
48
+ },
49
+ };
50
+
51
+ export default centerTextPlugin;
@@ -0,0 +1,116 @@
1
+ const customTooltip = (theme) => {
2
+ // optimize: render in react way
3
+ return function (context) {
4
+ // Tooltip Element
5
+ let tooltipEl = document.getElementById('chartjs-tooltip');
6
+
7
+ // Create element on first render
8
+ if (!tooltipEl) {
9
+ tooltipEl = document.createElement('div');
10
+ tooltipEl.id = 'chartjs-tooltip';
11
+ tooltipEl.innerHTML = '<table></table>';
12
+ document.body.appendChild(tooltipEl);
13
+ }
14
+
15
+ // Hide tooltip, if no tooltip or no data
16
+ const tooltipModel = context.tooltip;
17
+ if (
18
+ !tooltipModel ||
19
+ !tooltipModel.dataPoints ||
20
+ !tooltipModel.dataPoints[0] ||
21
+ tooltipModel.opacity === 0
22
+ ) {
23
+ tooltipEl.style.display = 'none';
24
+ return;
25
+ }
26
+
27
+ // Set caret Position
28
+ tooltipEl.classList.remove('above', 'below', 'no-transform');
29
+ if (tooltipModel.yAlign) {
30
+ tooltipEl.classList.add(tooltipModel.yAlign);
31
+ } else {
32
+ tooltipEl.classList.add('no-transform');
33
+ }
34
+
35
+ // Set Text
36
+ if (tooltipModel.body) {
37
+ const titleLines = tooltipModel.title || [];
38
+
39
+ const bodyLines = tooltipModel.body.map((bodyItem) => {
40
+ return bodyItem.lines || [];
41
+ });
42
+
43
+ let innerHtml = '<thead>';
44
+ titleLines.forEach((title) => {
45
+ innerHtml += `<tr><th>${title}</th></tr>`;
46
+ });
47
+ innerHtml += '</thead><tbody>';
48
+
49
+ bodyLines.forEach((body) => {
50
+ if (Array.isArray(body)) {
51
+ body.forEach((line) => {
52
+ innerHtml += `<tr><td>${line}</td></tr>`;
53
+ });
54
+ } else {
55
+ innerHtml += `<tr><td>${body}</td></tr>`;
56
+ }
57
+ });
58
+
59
+ innerHtml += '</tbody>';
60
+
61
+ const tableRoot = tooltipEl.querySelector('table');
62
+ tableRoot.innerHTML = innerHtml;
63
+ }
64
+
65
+ // `this` will be the overall tooltip
66
+ const position = context.chart.canvas.getBoundingClientRect();
67
+
68
+ // Display, position, and set styles for font
69
+ tooltipEl.style.fontFamily = theme.fontFamily;
70
+ tooltipEl.style.fontSize = theme.fontBody1;
71
+ tooltipEl.style.display = 'block';
72
+ tooltipEl.style.position = 'absolute';
73
+ tooltipEl.style.boxShadow = theme.boxShadow;
74
+
75
+ [tooltipEl.style.color] = tooltipModel.labelTextColors;
76
+ tooltipEl.style.background = tooltipModel.labelColors[0].backgroundColor;
77
+ tooltipEl.style.borderRadius = theme.borderRadius;
78
+ tooltipEl.style.textAlign = 'center';
79
+ tooltipEl.style.padding = `${theme.spacerXS} ${theme.spacerS}`;
80
+ tooltipEl.style.pointerEvents = 'none';
81
+
82
+ // determine position is left or right
83
+ if (tooltipModel.caretX + tooltipEl.offsetWidth <= this._chart.width) {
84
+ tooltipEl.style.borderTopLeftRadius = 0;
85
+ tooltipEl.style.left = `${
86
+ position.left + window.pageXOffset + tooltipModel.caretX + 8
87
+ }px`;
88
+ } else {
89
+ tooltipEl.style.borderTopRightRadius = 0;
90
+ tooltipEl.style.left = `${
91
+ position.left +
92
+ window.pageXOffset +
93
+ tooltipModel.caretX -
94
+ tooltipModel.width -
95
+ 16 * 2
96
+ }px`;
97
+ }
98
+
99
+ // determine position is top or bottom
100
+ if (tooltipModel.caretY + tooltipEl.offsetHeight <= this._chart.height) {
101
+ tooltipEl.style.top = `${
102
+ position.top + window.pageYOffset + tooltipModel.caretY + 8
103
+ }px`;
104
+ } else {
105
+ tooltipEl.style.top = `${
106
+ position.top +
107
+ window.pageYOffset +
108
+ tooltipModel.caretY -
109
+ tooltipModel.width -
110
+ 16 * 2
111
+ }px`;
112
+ }
113
+ };
114
+ };
115
+
116
+ export default customTooltip;
@@ -0,0 +1,98 @@
1
+ import { defaults } from 'react-chartjs-2';
2
+
3
+ const htmlLegendPlugin = {
4
+ id: 'htmlLegend',
5
+ afterUpdate(chart, args, options) {
6
+ const ul = getOrCreateLegendList(chart, options.containerID);
7
+
8
+ // Remove old legend items
9
+ while (ul.firstChild) {
10
+ ul.firstChild.remove();
11
+ }
12
+
13
+ // Reuse the built-in legendItems generator
14
+ const items = chart.options.plugins.legend.labels.generateLabels(chart);
15
+
16
+ items.forEach((item) => {
17
+ const li = document.createElement('li');
18
+ li.style.alignItems = 'center';
19
+ li.style.cursor = 'pointer';
20
+ li.style.display = 'flex';
21
+ li.style.flexDirection = 'row';
22
+ li.style.marginLeft = '16px';
23
+ li.style.marginTop = '16px';
24
+ li.style.color = defaults.color;
25
+
26
+ const [dataset] = chart.data.datasets;
27
+ const description = dataset.descriptions
28
+ ? dataset.descriptions[item.index]
29
+ : '';
30
+
31
+ if (description) {
32
+ li.setAttribute('data-tooltip', description);
33
+ li.classList.add('custom-legend-tooltip');
34
+ }
35
+
36
+ li.onclick = () => {
37
+ const { type } = chart.config;
38
+ if (type === 'pie' || type === 'doughnut') {
39
+ // Pie and doughnut charts only have a single dataset and visibility is per item
40
+ chart.toggleDataVisibility(item.index);
41
+ } else {
42
+ chart.setDatasetVisibility(
43
+ item.datasetIndex,
44
+ !chart.isDatasetVisible(item.datasetIndex),
45
+ );
46
+ }
47
+ chart.update();
48
+ };
49
+
50
+ // Color box
51
+ const boxSpan = document.createElement('span');
52
+ boxSpan.style.background = item.fillStyle;
53
+ boxSpan.style.borderColor = item.strokeStyle;
54
+ boxSpan.style.borderWidth = `${item.lineWidth}px`;
55
+ boxSpan.style.borderStyle = 'solid';
56
+ boxSpan.style.display = 'inline-block';
57
+ boxSpan.style.height = '16px';
58
+ boxSpan.style.marginRight = '8px';
59
+ boxSpan.style.width = '32px';
60
+
61
+ // Text
62
+ const textContainer = document.createElement('p');
63
+ textContainer.style.color = item.fontColor;
64
+ textContainer.style.margin = 0;
65
+ textContainer.style.padding = 0;
66
+ textContainer.style.wordBreak = 'break-all';
67
+ textContainer.style.textDecoration = item.hidden ? 'line-through' : '';
68
+
69
+ const text = document.createTextNode(item.text);
70
+ textContainer.appendChild(text);
71
+
72
+ li.appendChild(boxSpan);
73
+ li.appendChild(textContainer);
74
+ ul.appendChild(li);
75
+ });
76
+ },
77
+ };
78
+
79
+ const getOrCreateLegendList = (chart, id) => {
80
+ const legendContainer = document.getElementById(id);
81
+ let listContainer = legendContainer.querySelector('ul');
82
+
83
+ if (!listContainer) {
84
+ listContainer = document.createElement('ul');
85
+ listContainer.style.display = 'flex';
86
+ listContainer.style.flexDirection = 'row';
87
+ listContainer.style.flexWrap = 'wrap';
88
+ listContainer.style.justifyContent = 'center';
89
+ listContainer.style.margin = 0;
90
+ listContainer.style.padding = 0;
91
+
92
+ legendContainer.appendChild(listContainer);
93
+ }
94
+
95
+ return listContainer;
96
+ };
97
+
98
+ export default htmlLegendPlugin;
@@ -0,0 +1,3 @@
1
+ export { default as customTooltip } from './customTooltip';
2
+ export { default as padEmptyChartBar } from './padEmptyChartBar';
3
+ export { default as htmlLegendPlugin } from './htmlLegendPlugin';
@@ -0,0 +1,41 @@
1
+ // make chart bar seem like align left by pad empty bar at the end
2
+ const padEmptyChartBar = {
3
+ id: 'padEmptyChartBar',
4
+ length: -1,
5
+
6
+ // pad empty chart bar when data less than max bar number
7
+ beforeUpdate(chart) {
8
+ this.length = -1;
9
+ const { data, options } = chart.config._config;
10
+ const validLabels = data.labels.filter((label) => label !== null);
11
+ const { maxBarNumber } = options.plugins.padEmptyChartBar;
12
+ for (let index = validLabels.length; index < maxBarNumber; index += 1) {
13
+ this.length = this.length === -1 ? index : this.length;
14
+ data.labels[index] = null;
15
+
16
+ const [datasets] = data.datasets;
17
+ if (datasets) {
18
+ datasets.data[index] = 0;
19
+ }
20
+ }
21
+ },
22
+
23
+ // prevent padded empty chart bar to be drawn
24
+ afterUpdate(chart) {
25
+ const { data, options } = chart.config._config;
26
+ const { maxBarNumber } = options.plugins.padEmptyChartBar;
27
+ if (this.length === -1) {
28
+ // restore draw function
29
+ for (let index = 0; index < maxBarNumber; index += 1) {
30
+ // delete data.datasets[0]._meta[data.index].data[i].draw;
31
+ }
32
+ } else {
33
+ // prevents new charts to be drawn
34
+ for (let index = this.length; index < data.maxBarNumber; index += 1) {
35
+ data.datasets[0]._meta[data.index].data[index].draw = () => {};
36
+ }
37
+ }
38
+ },
39
+ };
40
+
41
+ export default padEmptyChartBar;
@@ -0,0 +1,38 @@
1
+ import { defaults } from 'react-chartjs-2';
2
+
3
+ const yAxisTopTitlePlugin = {
4
+ id: 'yAxisTopTitle',
5
+ afterDraw(chart) {
6
+ const { options } = chart.config;
7
+
8
+ const config = options.plugins.yAxisTopTitle;
9
+ if (!config || !config.title) {
10
+ return;
11
+ }
12
+
13
+ const { title } = config;
14
+ const { ctx, chartArea, scales } = chart;
15
+ const yScale = scales.y;
16
+
17
+ if (!yScale) {
18
+ return;
19
+ }
20
+ ctx.save();
21
+
22
+ const { font, color } = defaults;
23
+ const { family, size } = font;
24
+ ctx.font = `bold ${size}px ${family}`;
25
+ ctx.fillStyle = color;
26
+ ctx.textAlign = 'left';
27
+ ctx.textBaseline = 'middle';
28
+
29
+ const x = yScale.left;
30
+ const y = chartArea.top - 24;
31
+
32
+ ctx.fillText(title, x, y);
33
+
34
+ ctx.restore();
35
+ },
36
+ };
37
+
38
+ export default yAxisTopTitlePlugin;
@@ -0,0 +1,15 @@
1
+ import styled from 'styled-components';
2
+
3
+ const FlexContainer = styled.div`
4
+ display: flex;
5
+
6
+ ${({ marginBottom }) => marginBottom && 'margin-bottom: var(--spacing-l)'};
7
+
8
+ ${({ wrap }) => wrap && 'flex-wrap: wrap'};
9
+
10
+ ${({ alignCenter }) => alignCenter && 'align-items: center;'}
11
+
12
+ ${({ spaceBetween }) => spaceBetween && 'justify-content: space-between;'}
13
+ `;
14
+
15
+ export default FlexContainer;
@@ -0,0 +1,39 @@
1
+ import FlexContainer from '../FlexContainer';
2
+
3
+ const metadata = {
4
+ title: 'Container/FlexContainer',
5
+ component: FlexContainer,
6
+ decorators: [
7
+ (Story) => (
8
+ <div style={{ border: '1px solid #000', width: '300px' }}>
9
+ <Story />
10
+ </div>
11
+ ),
12
+ ],
13
+ argTypes: {
14
+ marginBottom: {
15
+ description: 'margin-bottom:32px',
16
+ },
17
+ wrap: {
18
+ description: 'flex wrap',
19
+ },
20
+ },
21
+ };
22
+
23
+ const Template = (args) => (
24
+ <FlexContainer {...args}>
25
+ <p style={{ background: '#222143', width: '300px', color: '#fff' }}>Text</p>
26
+ <p style={{ background: '#222143', width: '300px', color: '#fff' }}>Text</p>
27
+ <p style={{ background: '#222143', width: '300px', color: '#fff' }}>Text</p>
28
+ <p style={{ background: '#222143', width: '300px', color: '#fff' }}>Text</p>
29
+ </FlexContainer>
30
+ );
31
+
32
+ const Default = Template.bind({});
33
+ Default.args = {
34
+ marginBottom: false,
35
+ wrap: false,
36
+ };
37
+
38
+ export default metadata;
39
+ export { Default };
@@ -0,0 +1,21 @@
1
+ import { render } from '@testing-library/react';
2
+ import FlexContainer from '../FlexContainer';
3
+ import 'jest-styled-components';
4
+
5
+ test('render FlexContainer', () => {
6
+ const { container } = render(
7
+ <FlexContainer wrap marginBottom>
8
+ <div>Version</div>
9
+ <div>UpdatedTime</div>
10
+ <div>Size</div>
11
+ </FlexContainer>
12
+ );
13
+
14
+ const flexContainer = container.firstChild;
15
+
16
+ expect(flexContainer).toBeInTheDocument();
17
+ expect(flexContainer).toHaveStyle({
18
+ flexWrap: 'wrap',
19
+ });
20
+ expect(flexContainer).toHaveStyleRule('margin-bottom', 'var(--spacing-l)');
21
+ });
@@ -0,0 +1 @@
1
+ export { default as FlexContainer } from './FlexContainer';
@@ -0,0 +1,49 @@
1
+ import { useRef, useEffect } from 'react';
2
+ import 'cropperjs/dist/cropper.css';
3
+ import Cropper from 'cropperjs';
4
+
5
+ const CropperWrapper = ({
6
+ src,
7
+ alt = 'picture',
8
+ width,
9
+ height,
10
+ cropBoxResizable = false,
11
+ onInitialized,
12
+ dragMode = 'move',
13
+ }) => {
14
+ const imageRef = useRef(null);
15
+
16
+ useEffect(() => {
17
+ const node = imageRef.current;
18
+
19
+ if (node !== null) {
20
+ const cropper = new Cropper(node, {
21
+ dragMode,
22
+ viewMode: 1,
23
+ initialAspectRatio: 9 / 16,
24
+ background: true,
25
+ cropBoxResizable,
26
+ data: {
27
+ width,
28
+ height,
29
+ },
30
+ });
31
+
32
+ if (onInitialized) {
33
+ onInitialized(cropper);
34
+ }
35
+ }
36
+
37
+ return () => {
38
+ node?.cropper?.destroy();
39
+ };
40
+ }, [onInitialized, dragMode, width, height, cropBoxResizable]);
41
+
42
+ return (
43
+ <div>
44
+ <img src={src} alt={alt} ref={imageRef} crossOrigin='anonymous' />
45
+ </div>
46
+ );
47
+ };
48
+
49
+ export default CropperWrapper;
@@ -0,0 +1,36 @@
1
+ import TitleModal from '../modal/TitleModal';
2
+ import CropImageModal from './subComponent/CropImageModal';
3
+
4
+ const CropperModalHandler = ({
5
+ src,
6
+ file,
7
+ width,
8
+ height,
9
+ cropBoxResizable = false,
10
+ onCrop,
11
+ onClose,
12
+ }) => {
13
+ TitleModal({
14
+ size: 'normal',
15
+ children: (
16
+ <CropImageModal
17
+ src={src}
18
+ mime={file.type}
19
+ alt={file.name}
20
+ file={file}
21
+ width={width}
22
+ height={height}
23
+ cropBoxResizable={cropBoxResizable}
24
+ onCrop={onCrop}
25
+ onClose={onClose}
26
+ />
27
+ ),
28
+ onClose: (dismiss) => {
29
+ if (dismiss === true && onClose) {
30
+ onClose();
31
+ }
32
+ },
33
+ });
34
+ };
35
+
36
+ export default CropperModalHandler;
@@ -0,0 +1,32 @@
1
+ import Cropper from '../Cropper';
2
+ import Picture from '../../assets/images/default-user.jpg';
3
+
4
+ const metadata = {
5
+ title: 'Cropper/Cropper',
6
+ component: Cropper,
7
+ argTypes: {
8
+ src: {
9
+ description: 'image',
10
+ control: { type: 'file', accept: '.png,.jpg,.jpeg,.bmp' },
11
+ },
12
+ onInitialized: {
13
+ description: 'it is a function',
14
+ action: 'onInitialized',
15
+ },
16
+ },
17
+ };
18
+
19
+ const Template = (args) => {
20
+ return <Cropper {...args} src={args.src[0]} />;
21
+ };
22
+
23
+ const Default = Template.bind({});
24
+ Default.args = {
25
+ src: [`${Picture}`],
26
+ width: 160,
27
+ height: 160,
28
+ cropBoxResizable: false,
29
+ };
30
+
31
+ export default metadata;
32
+ export { Default };
@@ -0,0 +1,90 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import 'jest-styled-components';
3
+ import Cropper from '../Cropper';
4
+ import Picture from '../../assets/images/default-user.jpg';
5
+
6
+ jest.mock('cropperjs', () => {
7
+ const React = require('react');
8
+ const imageRef = React.useRef(null);
9
+ const node = imageRef.current;
10
+ const Cropper = require('cropperjs');
11
+
12
+ return ({ dragMode, width, height, onInitialized }) => {
13
+ // 應該是模擬元件傳 props 給套件這個部分,至於套件有沒有收到,單元測試要在驗證
14
+ if (node !== null) {
15
+ // 好像不用在 call 套件?
16
+ const cropper = new Cropper(node, {
17
+ dragMode,
18
+ viewMode: 1,
19
+ initialAspectRatio: 9 / 16,
20
+ background: true,
21
+ cropBoxResizable: false,
22
+ data: {
23
+ width,
24
+ height,
25
+ },
26
+ });
27
+
28
+ if (onInitialized) {
29
+ onInitialized(cropper);
30
+ }
31
+
32
+ return cropper;
33
+ }
34
+
35
+ return () => {
36
+ node?.cropper?.destroy();
37
+ };
38
+ };
39
+ });
40
+
41
+ describe('Test Cropper Component', () => {
42
+ test('render Cropper', () => {
43
+ render(<Cropper src={Picture} alt='picture' width={160} height={160} />);
44
+
45
+ const cropperImages = screen.getByAltText('picture');
46
+ expect(cropperImages).toBeInTheDocument();
47
+
48
+ expect(cropperImages).toHaveAttribute('src', 'default-user.jpg');
49
+ expect(cropperImages).toHaveStyle({ width: '160 px' });
50
+ expect(cropperImages).toHaveStyle({ height: '160 px' });
51
+ });
52
+
53
+ test('onInitialized function', () => {
54
+ const handleInitialized = jest.fn();
55
+ render(
56
+ <Cropper
57
+ src={Picture}
58
+ alt='picture'
59
+ width={160}
60
+ height={160}
61
+ onInitialized={handleInitialized}
62
+ />,
63
+ );
64
+
65
+ const cropperImages = screen.getByAltText('picture');
66
+ expect(cropperImages).toBeInTheDocument();
67
+
68
+ expect(handleInitialized).toHaveBeenCalledTimes(1);
69
+ });
70
+
71
+ // 驗證元件傳的props 給套件,套件有收到,至於套件做了甚麼事情不管
72
+ // test('cropper', () => {
73
+ // const handleInitialized = jest.fn();
74
+ // render(
75
+ // <Cropper
76
+ // src={Picture}
77
+ // alt='picture'
78
+ // width={160}
79
+ // height={160}
80
+ // onInitialized={handleInitialized}
81
+ // />,
82
+ // );
83
+
84
+ // const cropperImages = screen.getByAltText('picture');
85
+ // expect(cropperImages).toBeInTheDocument();
86
+ // expect(cropperImages.cropper).toBeInTheDocument();
87
+
88
+ // // expect(handleInitialized).toHaveBeenCalledTimes(1);
89
+ // });
90
+ });
@@ -0,0 +1,2 @@
1
+ export { default as Cropper } from './Cropper';
2
+ export { default as CropperModalHandler } from './CropperModalHandler';