@cashub/ui-elv 1.0.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 (304) hide show
  1. package/Tab/Tab.js +28 -0
  2. package/Tab/TabList.js +167 -0
  3. package/Tab/TabPanel.js +49 -0
  4. package/Tab/TabTab.js +105 -0
  5. package/Tab/index.js +30 -0
  6. package/Tab/subComponent/TabContext.js +9 -0
  7. package/Tab/subComponent/TabListV2.js +25 -0
  8. package/Tab/subComponent/TabPanelV2.js +52 -0
  9. package/Tab/subComponent/TabTabV2.js +63 -0
  10. package/VerticalTab/TabList.js +27 -0
  11. package/VerticalTab/TabPanel.js +52 -0
  12. package/VerticalTab/TabTab.js +70 -0
  13. package/VerticalTab/VerticalTab.js +41 -0
  14. package/VerticalTab/index.js +16 -0
  15. package/VerticalTab/subComponent/TabContext.js +9 -0
  16. package/alert/Alert.js +29 -0
  17. package/alert/index.js +13 -0
  18. package/animate/Collapse.js +71 -0
  19. package/animate/Loader.js +58 -0
  20. package/animate/NumberCounter.js +51 -0
  21. package/animate/PulseRing.js +35 -0
  22. package/animate/Spinner.js +18 -0
  23. package/animate/index.js +41 -0
  24. package/assets/css/autocomplete.css +16 -0
  25. package/assets/css/font.css +4 -0
  26. package/assets/css/global.css +2 -0
  27. package/assets/font/helvetica/Helvetica.ttf +0 -0
  28. package/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
  29. package/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
  30. package/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
  31. package/assets/icons/app-management.png +0 -0
  32. package/assets/icons/burger-black.png +0 -0
  33. package/assets/icons/burger-white.png +0 -0
  34. package/assets/icons/burger.png +0 -0
  35. package/assets/icons/file.svg +1 -0
  36. package/assets/icons/map_icon1.png +0 -0
  37. package/assets/icons/map_icon4.png +0 -0
  38. package/assets/images/bg-aside.png +0 -0
  39. package/assets/images/bg-chart-circle.png +0 -0
  40. package/assets/images/bg-chart-triangle.png +0 -0
  41. package/assets/images/cashub-logo-only.png +0 -0
  42. package/assets/images/default-user.jpg +0 -0
  43. package/assets/images/logo-cashub.png +0 -0
  44. package/assets/images/map.png +0 -0
  45. package/assets/images/qrcode.png +0 -0
  46. package/backdrop/BaseBackdrop.js +18 -0
  47. package/backdrop/LoadingBackdrop.js +17 -0
  48. package/backdrop/ModalBackdrop.js +15 -0
  49. package/backdrop/index.js +27 -0
  50. package/badge/Badge.js +26 -0
  51. package/badge/BadgeDot.js +18 -0
  52. package/badge/BadgeFill.js +49 -0
  53. package/badge/BadgeFillTriangle.js +147 -0
  54. package/badge/BadgeWithText.js +31 -0
  55. package/badge/index.js +41 -0
  56. package/billing/BarChart.js +51 -0
  57. package/billing/Grid.js +45 -0
  58. package/billing/Header2.js +25 -0
  59. package/billing/Header3.js +37 -0
  60. package/billing/Paragraph.js +33 -0
  61. package/billing/ParagraphGroup.js +22 -0
  62. package/billing/ParagraphText.js +26 -0
  63. package/billing/Section.js +50 -0
  64. package/billing/SectionBody.js +17 -0
  65. package/billing/SectionHeader.js +26 -0
  66. package/billing/__stories__/BarChart.stories.js_bak +46 -0
  67. package/billing/__stories__/Grid.stories.js_bak +57 -0
  68. package/billing/__stories__/Header2.stories.js_bak +62 -0
  69. package/billing/__stories__/Header3.stories.js_bak +69 -0
  70. package/billing/__stories__/Paragraph.stories.js_bak +84 -0
  71. package/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
  72. package/billing/__stories__/ParagraphText.stories.js_bak +64 -0
  73. package/billing/__stories__/Section.stories.js_bak +115 -0
  74. package/billing/__stories__/SectionBody.stories.js_bak +62 -0
  75. package/billing/__stories__/SectionHeader.stories.js-bak +68 -0
  76. package/breadcrumb/Breadcrumb.js +78 -0
  77. package/breadcrumb/index.js +13 -0
  78. package/button/Button.js +154 -0
  79. package/button/ButtonGroup.js +61 -0
  80. package/button/IconButton.js +72 -0
  81. package/button/ScrollToTopButton.js +54 -0
  82. package/button/index.js +34 -0
  83. package/callout/Callout.js +52 -0
  84. package/callout/index.js +13 -0
  85. package/chart/BarChart.js +148 -0
  86. package/chart/DoughnutChart.js +118 -0
  87. package/chart/LineChart.js +146 -0
  88. package/chart/SingleBarChart.js +42 -0
  89. package/chart/index.js +52 -0
  90. package/chart/utils/centerTextPlugin.js +62 -0
  91. package/chart/utils/customTooltip.js +94 -0
  92. package/chart/utils/htmlLegendPlugin.js +89 -0
  93. package/chart/utils/index.js +27 -0
  94. package/chart/utils/padEmptyChartBar.js +53 -0
  95. package/chart/utils/yAxisTopTitlePlugin.js +49 -0
  96. package/container/FlexContainer.js +40 -0
  97. package/container/index.js +13 -0
  98. package/cropper/Cropper.js +54 -0
  99. package/cropper/CropperModalHandler.js +41 -0
  100. package/cropper/index.js +20 -0
  101. package/cropper/subComponent/CropImageModal.js +79 -0
  102. package/datetimePicker/DatePicker.js +363 -0
  103. package/datetimePicker/DatePickerV2.js +407 -0
  104. package/datetimePicker/DatetimePicker.js +240 -0
  105. package/datetimePicker/DatetimePickerV2.js +395 -0
  106. package/datetimePicker/DatetimePickerV3.js +279 -0
  107. package/datetimePicker/TimeInput.js +56 -0
  108. package/datetimePicker/TimePicker.js +317 -0
  109. package/datetimePicker/TimePickerStyle.js +64 -0
  110. package/datetimePicker/TimePickerV2.js +208 -0
  111. package/datetimePicker/accordion/Month.js +254 -0
  112. package/datetimePicker/accordion/Year.js +284 -0
  113. package/datetimePicker/hooks/index.js +27 -0
  114. package/datetimePicker/hooks/useChangeNumber.js +42 -0
  115. package/datetimePicker/hooks/useDecrease.js +38 -0
  116. package/datetimePicker/hooks/useIncrease.js +38 -0
  117. package/datetimePicker/index.js +69 -0
  118. package/datetimePicker/provider/constant.js +43 -0
  119. package/datetimePicker/subComponent/Accordion.js +373 -0
  120. package/datetimePicker/subComponent/CustomTimeInput.js +47 -0
  121. package/datetimePicker/subComponent/DateTimePickerContext.js +9 -0
  122. package/datetimePicker/utils/GMTDate.js +15 -0
  123. package/datetimePicker/utils/pad.js +13 -0
  124. package/datetimePicker/utils/toUTC0.js +13 -0
  125. package/descriptionList/DescriptionDetail.js +28 -0
  126. package/descriptionList/DescriptionList.js +25 -0
  127. package/descriptionList/DescriptionTerm.js +14 -0
  128. package/descriptionList/index.js +27 -0
  129. package/divider/Divider.js +31 -0
  130. package/divider/index.js +13 -0
  131. package/dropdown/Dropdown.js +55 -0
  132. package/dropdown/DropdownButtonOption.js +43 -0
  133. package/dropdown/DropdownContent.js +90 -0
  134. package/dropdown/DropdownDivOption.js +26 -0
  135. package/dropdown/DropdownItem.js +26 -0
  136. package/dropdown/DropdownLinkOption.js +24 -0
  137. package/dropdown/DropdownToggle.js +38 -0
  138. package/dropdown/index.js +42 -0
  139. package/dropdown/subComponent/DropdownContext.js +9 -0
  140. package/dropzone/FileDropzone.js +479 -0
  141. package/dropzone/ImageDropzone.js +334 -0
  142. package/dropzone/index.js +20 -0
  143. package/dropzone/subComponent/Message.js +26 -0
  144. package/figure/IconFigure.js +42 -0
  145. package/figure/ImageFigure.js +38 -0
  146. package/figure/index.js +20 -0
  147. package/file/HiddenFileInput.js +15 -0
  148. package/file/index.js +13 -0
  149. package/form/Checkbox.js +166 -0
  150. package/form/Fieldset.js +18 -0
  151. package/form/FormItem.js +22 -0
  152. package/form/Input.js +66 -0
  153. package/form/Label.js +61 -0
  154. package/form/MutedText.js +21 -0
  155. package/form/PasswordInput.js +47 -0
  156. package/form/RadioButton.js +103 -0
  157. package/form/SearchSelect.js +181 -0
  158. package/form/Searchbox.js +98 -0
  159. package/form/Slider.js +46 -0
  160. package/form/SwitchButton.js +105 -0
  161. package/form/Textarea.js +41 -0
  162. package/form/TreeView.js +73 -0
  163. package/form/index.js +104 -0
  164. package/grid/Column.js +46 -0
  165. package/grid/Grid.js +35 -0
  166. package/grid/index.js +20 -0
  167. package/heading/Heading1.js +21 -0
  168. package/heading/Heading2.js +28 -0
  169. package/heading/Heading3.js +49 -0
  170. package/heading/index.js +27 -0
  171. package/helmet/Helmet.js +23 -0
  172. package/helmet/index.js +20 -0
  173. package/iconbox/ApplicationIconBox.js +81 -0
  174. package/iconbox/IconBox.js +67 -0
  175. package/iconbox/IconBoxV2.js +72 -0
  176. package/iconbox/index.js +27 -0
  177. package/iconbox/subComponent/IconBoxFigure.js +50 -0
  178. package/iconbox/subComponent/IconBoxImage.js +42 -0
  179. package/image/ImageFluid.js +17 -0
  180. package/image/UploadImage.js +250 -0
  181. package/image/index.js +20 -0
  182. package/index.js +568 -0
  183. package/jsoneditor/JsonEditor.js +142 -0
  184. package/jsoneditor/index.js +13 -0
  185. package/keyframe/Pulse.js +21 -0
  186. package/keyframe/Spin.js +13 -0
  187. package/layout/Aside.js +48 -0
  188. package/layout/AsideHeader.jsx +27 -0
  189. package/layout/Backdrop.js +23 -0
  190. package/layout/Container.js +39 -0
  191. package/layout/Footer.js +45 -0
  192. package/layout/Header.jsx +55 -0
  193. package/layout/Layout.jsx +84 -0
  194. package/layout/Logo.jsx +17 -0
  195. package/layout/MenuIcon.jsx +27 -0
  196. package/layout/Sidebar.jsx +271 -0
  197. package/layout/index.js +13 -0
  198. package/link/LinkSpan.js +69 -0
  199. package/link/index.js +13 -0
  200. package/map/GoogleMap.js +448 -0
  201. package/map/GoogleReverseGeolocation.js +200 -0
  202. package/map/LeafletMap.js +231 -0
  203. package/map/LeafletReverseGeolocation.js +101 -0
  204. package/map/index.js +34 -0
  205. package/map/subComponent/BasicLeafletMap.js +34 -0
  206. package/map/subComponent/GoogleMapContainer.js +29 -0
  207. package/map/subComponent/GoogleMapPopup.js +109 -0
  208. package/map/subComponent/GoogleMapWrapper.js +40 -0
  209. package/map/subComponent/LeafletDrawControl.js +127 -0
  210. package/map/subComponent/LeafletMapContainer.js +173 -0
  211. package/map/subComponent/MapSearchBoxControl.js +54 -0
  212. package/modal/StateModal.js +178 -0
  213. package/modal/TitleModal.js +250 -0
  214. package/modal/index.js +20 -0
  215. package/package.json +54 -0
  216. package/page/Disclaimer.js +128 -0
  217. package/page/index.js +13 -0
  218. package/paginate/Paginate.js +137 -0
  219. package/paginate/index.js +13 -0
  220. package/popover/Popover.js +91 -0
  221. package/popover/index.js +13 -0
  222. package/qrcode/QRCode.js +58 -0
  223. package/qrcode/QRCodeContainter.js +34 -0
  224. package/qrcode/index.js +20 -0
  225. package/ribbon/Ribbon.js +42 -0
  226. package/ribbon/index.js +13 -0
  227. package/section/Section.js +133 -0
  228. package/section/SectionBody.js +52 -0
  229. package/section/SectionHeader.js +70 -0
  230. package/section/SectionToolbar.js +18 -0
  231. package/section/SectionToolbarItem.js +17 -0
  232. package/section/index.js +41 -0
  233. package/select/InputSelect.js +270 -0
  234. package/select/Select.js +818 -0
  235. package/select/index.js +20 -0
  236. package/select/subComponent/Checkbox.js +48 -0
  237. package/select/subComponent/Footer.js +13 -0
  238. package/select/subComponent/ListBox.js +30 -0
  239. package/select/subComponent/Option.js +45 -0
  240. package/select/subComponent/OptionGroup.js +23 -0
  241. package/select/subComponent/Options.js +32 -0
  242. package/select/subComponent/SearchBox.js +58 -0
  243. package/select/subComponent/SelectedMultipleCount.js +39 -0
  244. package/select/subComponent/SelectedMultipleTags.js +54 -0
  245. package/select/subComponent/SelectedMultipleText.js +70 -0
  246. package/select/subComponent/SelectedSingle.js +17 -0
  247. package/styles/GlobalStyle.js +334 -0
  248. package/styles/config/breakpoint.style.js +13 -0
  249. package/styles/config/header.style.js +10 -0
  250. package/styles/config/sidebar.style.js +17 -0
  251. package/styles/index.js +20 -0
  252. package/styles/mixin/backgroundColor.js +44 -0
  253. package/styles/mixin/borderColor.js +37 -0
  254. package/styles/mixin/color.js +37 -0
  255. package/styles/mixin/colorOnBackground.js +37 -0
  256. package/styles/mixin/inputPlaceholder.js +30 -0
  257. package/styles/mixin/media.js +21 -0
  258. package/styles/mixin/rounded.js +30 -0
  259. package/styles/mixin/scrollbar.js +32 -0
  260. package/styles/theme/dark.theme.js +97 -0
  261. package/styles/theme/light.theme.js +97 -0
  262. package/styles/theme/white.theme.js +97 -0
  263. package/styles/themes.js +16 -0
  264. package/table/GridTable.js +336 -0
  265. package/table/ImageBox.js +45 -0
  266. package/table/InfiniteGridTable.js +403 -0
  267. package/table/PermissionTable.js +64 -0
  268. package/table/SimpleGridTable.js +143 -0
  269. package/table/Table.js +568 -0
  270. package/table/__mock__/columns.js +70 -0
  271. package/table/__mock__/data.js +536 -0
  272. package/table/hooks/index.js +20 -0
  273. package/table/hooks/useCalculateDataRange.js +28 -0
  274. package/table/hooks/useGenerateSort.js +39 -0
  275. package/table/index.js +48 -0
  276. package/table/subComponent/BaseTableHeadCell.js +62 -0
  277. package/table/subComponent/GridTableFooter.js +24 -0
  278. package/table/subComponent/GridTableHeadCell.js +20 -0
  279. package/table/subComponent/Resizer.js +77 -0
  280. package/table/subComponent/TableFooter.js +31 -0
  281. package/table/subComponent/TableFooterInfo.js +13 -0
  282. package/table/subComponent/TableFooterPager.js +33 -0
  283. package/table/subComponent/TableHeadCell.js +19 -0
  284. package/table/subComponent/TableSort.js +38 -0
  285. package/tagify/TagifyStyle.js +60 -0
  286. package/tagify/Tags.js +56 -0
  287. package/tagify/index.js +27 -0
  288. package/tagify/templates/getCreateButtonTemplate.js +18 -0
  289. package/text/Paragraph.js +86 -0
  290. package/text/index.js +13 -0
  291. package/timeline/Timeline.js +139 -0
  292. package/timeline/index.js +13 -0
  293. package/toast/CustomToastContainer.js +45 -0
  294. package/toast/MessageContainer.js +51 -0
  295. package/toast/index.js +36 -0
  296. package/toast/show.js +39 -0
  297. package/toast/style.css +1 -0
  298. package/tooltip/Tooltip.js +140 -0
  299. package/tooltip/index.js +13 -0
  300. package/treeView/TreeViewV2.js +38 -0
  301. package/treeView/TreeflexStyle.js +49 -0
  302. package/treeView/index.js +20 -0
  303. package/wizard/Wizard.js +251 -0
  304. package/wizard/index.js +13 -0
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const Timeline = _styledComponents.default.div`
10
+ position: relative;
11
+
12
+ &:before {
13
+ content: '';
14
+ position: absolute;
15
+ left: 7.8rem;
16
+ width: 0.214rem;
17
+ top: 5px;
18
+ bottom: 5px;
19
+ height: calc(100% - 5px);
20
+ background-color: #e7e9f5;
21
+
22
+ ${_ref => {
23
+ let {
24
+ noTag
25
+ } = _ref;
26
+ return noTag && 'left: 0.8rem;';
27
+ }}
28
+ }
29
+ `;
30
+ const Items = _styledComponents.default.div``;
31
+ const Item = _styledComponents.default.div`
32
+ display: table;
33
+ position: relative;
34
+ margin-bottom: 1.5rem;
35
+
36
+ &:last-child {
37
+ margin-bottom: 0;
38
+ }
39
+ `;
40
+ const ItemTag = _styledComponents.default.span`
41
+ display: table-cell;
42
+ font-size: var(--font-body1);
43
+ font-weight: 500;
44
+ vertical-align: top;
45
+ position: absolute;
46
+ padding-top: 0.5rem;
47
+ color: var(--font-on-background);
48
+ width: 6.5rem;
49
+ text-align: center;
50
+ `;
51
+ const ItemCircle = _styledComponents.default.div`
52
+ border-radius: 50%;
53
+ border: 0.89rem solid #2d2c4c;
54
+ z-index: 1;
55
+ top: 0.2rem;
56
+ left: 7rem;
57
+ position: relative;
58
+
59
+ > svg {
60
+ font-size: 1.5rem;
61
+ top: 0;
62
+ left: 0;
63
+ transform: translate(-50%, -50%);
64
+ position: absolute;
65
+ }
66
+
67
+ ${_ref2 => {
68
+ let {
69
+ noTag
70
+ } = _ref2;
71
+ return noTag && 'left: 0;';
72
+ }}
73
+
74
+ ${_ref3 => {
75
+ let {
76
+ success
77
+ } = _ref3;
78
+ return success && 'color: var(--color-success);';
79
+ }}
80
+
81
+ ${_ref4 => {
82
+ let {
83
+ danger
84
+ } = _ref4;
85
+ return danger && 'color: var(--color-danger);';
86
+ }}
87
+
88
+ ${_ref5 => {
89
+ let {
90
+ warning
91
+ } = _ref5;
92
+ return warning && 'color: var(--color-warning);';
93
+ }}
94
+
95
+ ${_ref6 => {
96
+ let {
97
+ grey
98
+ } = _ref6;
99
+ return grey && 'color: var(--color-grey);';
100
+ }}
101
+ `;
102
+ const ItemDescription = _styledComponents.default.div`
103
+ display: table-cell;
104
+ vertical-align: top;
105
+ font-size: 1rem;
106
+ padding: 0 0 0 8rem;
107
+ color: var(--font-on-background);
108
+
109
+ ${_ref7 => {
110
+ let {
111
+ noTag
112
+ } = _ref7;
113
+ return noTag && 'padding-left: 1rem;';
114
+ }}
115
+ `;
116
+ const ItemTitle = _styledComponents.default.span`
117
+ display: block;
118
+ font-weight: 400;
119
+
120
+ &:last-child {
121
+ margin-top: 8px;
122
+ }
123
+ `;
124
+ const ItemText = _styledComponents.default.span`
125
+ display: block;
126
+ color: var(--font-on-mute);
127
+ margin-top: 8px;
128
+ line-height: 1.25;
129
+ word-break: break-all;
130
+ `;
131
+ var _default = exports.default = Object.assign(Timeline, {
132
+ Items,
133
+ Item,
134
+ ItemTag,
135
+ ItemCircle,
136
+ ItemDescription,
137
+ ItemTitle,
138
+ ItemText
139
+ });
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Timeline", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Timeline.default;
10
+ }
11
+ });
12
+ var _Timeline = _interopRequireDefault(require("./Timeline"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _reactToastify = require("react-toastify");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const CustomToastContainer = (0, _styledComponents.default)(_reactToastify.ToastContainer)`
11
+ width: 360px;
12
+
13
+ .Toastify__toast {
14
+ padding: 15px 15px 15px 50px;
15
+ box-shadow: 0 0 8px #999999;
16
+ background-repeat: no-repeat;
17
+ background-position: 15px center;
18
+
19
+ &.no-background-image {
20
+ background-image: none;
21
+ padding-left: 15px;
22
+ }
23
+ }
24
+
25
+ .Toastify__toast--error {
26
+ background-color: var(--color-danger);
27
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=');
28
+ }
29
+
30
+ .Toastify__toast--success {
31
+ background-color: var(--color-success);
32
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==');
33
+ }
34
+
35
+ .Toastify__toast--warning {
36
+ background-color: var(--color-warning);
37
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==');
38
+ }
39
+
40
+ .Toastify__toast--info {
41
+ background-color: var(--color-primary);
42
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=');
43
+ }
44
+ `;
45
+ var _default = exports.default = CustomToastContainer;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ const MessageContainer = _ref => {
11
+ let {
12
+ title,
13
+ message,
14
+ containHTML = false
15
+ } = _ref;
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
17
+ "data-testid": "messageContainer",
18
+ children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(Title, {
19
+ children: title
20
+ }), containHTML ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Message, {
21
+ dangerouslySetInnerHTML: {
22
+ __html: message
23
+ }
24
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(Message, {
25
+ children: message
26
+ })]
27
+ });
28
+ };
29
+ const Title = _styledComponents.default.div`
30
+ margin: 0;
31
+ margin-bottom: 0.25rem;
32
+ font-size: 1rem;
33
+ line-height: 1.5rem;
34
+ font-weight: 500;
35
+ `;
36
+ const Message = _styledComponents.default.div`
37
+ margin: 0;
38
+ font-size: 0.9rem;
39
+ line-height: 1.2rem;
40
+ word-break: break-word;
41
+ white-space: pre-wrap;
42
+
43
+ ul {
44
+ margin-left: 1rem;
45
+
46
+ li {
47
+ list-style: disc;
48
+ }
49
+ }
50
+ `;
51
+ var _default = exports.default = MessageContainer;
package/toast/index.js ADDED
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ CustomToastContainer: true,
8
+ MessageContainer: true
9
+ };
10
+ Object.defineProperty(exports, "CustomToastContainer", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _CustomToastContainer.default;
14
+ }
15
+ });
16
+ Object.defineProperty(exports, "MessageContainer", {
17
+ enumerable: true,
18
+ get: function () {
19
+ return _MessageContainer.default;
20
+ }
21
+ });
22
+ var _CustomToastContainer = _interopRequireDefault(require("./CustomToastContainer"));
23
+ var _MessageContainer = _interopRequireDefault(require("./MessageContainer"));
24
+ var _show = require("./show");
25
+ Object.keys(_show).forEach(function (key) {
26
+ if (key === "default" || key === "__esModule") return;
27
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
28
+ if (key in exports && exports[key] === _show[key]) return;
29
+ Object.defineProperty(exports, key, {
30
+ enumerable: true,
31
+ get: function () {
32
+ return _show[key];
33
+ }
34
+ });
35
+ });
36
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
package/toast/show.js ADDED
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.showWarningMessage = exports.showSuccessMessage = exports.showInfoMessage = exports.showErrorMessage = void 0;
7
+ var _reactToastify = require("react-toastify");
8
+ var _MessageContainer = _interopRequireDefault(require("./MessageContainer"));
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const showSuccessMessage = props => {
12
+ return showMessage('success', props);
13
+ };
14
+ exports.showSuccessMessage = showSuccessMessage;
15
+ const showErrorMessage = props => {
16
+ return showMessage('error', props);
17
+ };
18
+ exports.showErrorMessage = showErrorMessage;
19
+ const showWarningMessage = props => {
20
+ return showMessage('warning', props);
21
+ };
22
+ exports.showWarningMessage = showWarningMessage;
23
+ const showInfoMessage = props => {
24
+ return showMessage('info', props);
25
+ };
26
+ exports.showInfoMessage = showInfoMessage;
27
+ const showMessage = (type, _ref) => {
28
+ let {
29
+ title,
30
+ message,
31
+ containHTML = false,
32
+ options = {}
33
+ } = _ref;
34
+ return _reactToastify.toast[type](/*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageContainer.default, {
35
+ title: title,
36
+ message: message,
37
+ containHTML: containHTML
38
+ }), options);
39
+ };
@@ -0,0 +1 @@
1
+ @import 'react-toastify/dist/ReactToastify.css';
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
9
+ var _reactOutsideClickHandler = _interopRequireDefault(require("react-outside-click-handler"));
10
+ var _hooks = require("@cashub/hooks");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
14
+ let {
15
+ children,
16
+ id,
17
+ title,
18
+ showArrow = false,
19
+ mode = 'hover',
20
+ fixed,
21
+ inline,
22
+ disabled,
23
+ placement
24
+ } = _ref;
25
+ const [display, setDisplay] = (0, _react.useState)(false);
26
+ const [targetElement, setTargetElement] = (0, _react.useState)(null);
27
+ const [tooltipElement, setTooltipElement] = (0, _react.useState)(null);
28
+ const [arrowElement, setArrowElement] = (0, _react.useState)(null);
29
+ const ownRef = (0, _hooks.useForkRef)(setTargetElement, ref);
30
+ const {
31
+ styles,
32
+ attributes,
33
+ update
34
+ } = (0, _hooks.useCustomPopper)(targetElement, tooltipElement, {
35
+ strategy: fixed ? 'fixed' : 'absolute',
36
+ arrowElement,
37
+ ...(placement && {
38
+ placement
39
+ })
40
+ });
41
+ const handleOpen = (0, _react.useCallback)(() => {
42
+ setDisplay(true);
43
+ update();
44
+ }, [update]);
45
+ const handleClose = (0, _react.useCallback)(() => {
46
+ setDisplay(false);
47
+ update();
48
+ }, [update]);
49
+ const toggle = (0, _react.useCallback)(() => {
50
+ setDisplay(display => !display);
51
+ update();
52
+ }, [update]);
53
+ const wraperProps = (0, _react.useMemo)(() => {
54
+ if (disabled) return;
55
+ if (mode === 'click') {
56
+ return {
57
+ onClick: toggle
58
+ };
59
+ }
60
+ return {
61
+ // mode ==="hover"
62
+ onClick: handleClose,
63
+ onMouseOver: handleOpen,
64
+ onMouseLeave: handleClose
65
+ };
66
+ }, [mode, handleClose, handleOpen, toggle, disabled]);
67
+ const childrenProps = {
68
+ ...children.props,
69
+ ref: ownRef
70
+ };
71
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactOutsideClickHandler.default, {
72
+ onOutsideClick: handleClose,
73
+ display: inline ? 'inline-block' : 'block',
74
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
75
+ ...wraperProps,
76
+ "data-testid": "tooltipWrapper",
77
+ children: [/*#__PURE__*/(0, _react.cloneElement)(children, childrenProps), /*#__PURE__*/(0, _jsxRuntime.jsxs)(TooltipTooltip, {
78
+ id: id,
79
+ $display: display,
80
+ ref: setTooltipElement,
81
+ style: styles.popper,
82
+ ...attributes.popper,
83
+ role: "tooltip",
84
+ children: [title, /*#__PURE__*/(0, _jsxRuntime.jsx)(TooltipArrow, {
85
+ "data-testid": "tooltipArrow",
86
+ ref: setArrowElement,
87
+ style: styles.arrow,
88
+ $display: showArrow
89
+ })]
90
+ })]
91
+ })
92
+ });
93
+ });
94
+ Tooltip.displayName = 'Tooltip';
95
+ const TooltipTooltip = _styledComponents.default.div`
96
+ white-space: pre-line;
97
+ display: ${_ref2 => {
98
+ let {
99
+ $display
100
+ } = _ref2;
101
+ return $display ? 'block' : 'none';
102
+ }};
103
+ border: 1px solid var(--border-color);
104
+ color: var(--font-on-background);
105
+ background: var(--color-background2);
106
+ box-shadow: var(--box-shadow);
107
+ border-radius: calc(var(--border-radius) / 2);
108
+ padding: var(--spacing-xs);
109
+ z-index: 80;
110
+ text-align: left;
111
+ font-size: var(--font-body1);
112
+ font-weight: var(--font-normal);
113
+ line-height: 1.5;
114
+ word-break: break-word;
115
+ max-width: 50vw;
116
+ `;
117
+ const TooltipArrow = _styledComponents.default.div`
118
+ display: ${_ref3 => {
119
+ let {
120
+ $display
121
+ } = _ref3;
122
+ return $display ? 'block' : 'none';
123
+ }};
124
+ top: -0.5rem;
125
+ left: 0;
126
+ width: 1rem;
127
+ height: 1rem;
128
+
129
+ &::before {
130
+ position: absolute;
131
+ display: block;
132
+ content: '';
133
+ border-color: transparent;
134
+ border-style: solid;
135
+ top: 0;
136
+ border-width: 0 0.5rem 0.5rem 0.5rem;
137
+ border-bottom-color: var(--border-color);
138
+ }
139
+ `;
140
+ var _default = exports.default = Tooltip;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Tooltip", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Tooltip.default;
10
+ }
11
+ });
12
+ var _Tooltip = _interopRequireDefault(require("./Tooltip"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ require("treeflex/dist/css/treeflex.css");
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ const TreeViewV2 = _ref => {
10
+ let {
11
+ rootName,
12
+ children
13
+ } = _ref;
14
+ const generateTree = children => {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
16
+ children: children.map(child => {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
18
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
19
+ className: `tf-nc ${child.primary ? 'primary' : ''}`,
20
+ children: child.name
21
+ }), child.children.length > 0 && generateTree(child.children)]
22
+ }, child.id);
23
+ })
24
+ });
25
+ };
26
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
27
+ className: "tf-tree",
28
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
29
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("li", {
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
31
+ className: "tf-nc",
32
+ children: rootName
33
+ }), generateTree(children)]
34
+ })
35
+ })
36
+ });
37
+ };
38
+ var _default = exports.default = TreeViewV2;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _styledComponents = require("styled-components");
8
+ var _scrollbar = _interopRequireDefault(require("../styles/mixin/scrollbar"));
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ // integrate treeflex component
11
+ const TreeflexStyle = (0, _styledComponents.createGlobalStyle)`
12
+ .tf-tree {
13
+ text-align: center;
14
+ color: var(--font-on-background);
15
+
16
+ .tf-nc {
17
+ border: var(--border-width) solid var(--border-color);
18
+ border-radius: 8px;
19
+ min-width: 120px;
20
+
21
+ &.primary {
22
+ border-color: var(--color-primary);
23
+ font-weight: var(--font-bold);
24
+ }
25
+ }
26
+
27
+ ${_scrollbar.default}
28
+ }
29
+
30
+ .tf-tree ul {
31
+ margin-bottom: 2em;
32
+ }
33
+
34
+ .tf-tree li ul {
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .tf-tree li li:before {
39
+ border: var(--border-width) solid var(--border-color);
40
+ }
41
+
42
+ .tf-tree .tf-nc:after,
43
+ .tf-tree .tf-nc:before,
44
+ .tf-tree .tf-node-content:after,
45
+ .tf-tree .tf-node-content:before {
46
+ border: var(--border-width) solid var(--border-color);
47
+ }
48
+ `;
49
+ var _default = exports.default = TreeflexStyle;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "TreeViewV2", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _TreeViewV.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "TreeflexStyle", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _TreeflexStyle.default;
16
+ }
17
+ });
18
+ var _TreeViewV = _interopRequireDefault(require("./TreeViewV2"));
19
+ var _TreeflexStyle = _interopRequireDefault(require("./TreeflexStyle"));
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }