@cashub/ui-elv 1.0.2 → 1.0.4

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 (310) hide show
  1. package/datetimePicker/index.js +2 -37
  2. package/esm/Tab/Tab.js +21 -0
  3. package/esm/Tab/TabList.js +160 -0
  4. package/esm/Tab/TabPanel.js +42 -0
  5. package/esm/Tab/TabTab.js +98 -0
  6. package/esm/Tab/index.js +23 -0
  7. package/esm/Tab/subComponent/TabContext.js +3 -0
  8. package/esm/Tab/subComponent/TabListV2.js +18 -0
  9. package/esm/Tab/subComponent/TabPanelV2.js +45 -0
  10. package/esm/Tab/subComponent/TabTabV2.js +56 -0
  11. package/esm/VerticalTab/TabList.js +20 -0
  12. package/esm/VerticalTab/TabPanel.js +45 -0
  13. package/esm/VerticalTab/TabTab.js +63 -0
  14. package/esm/VerticalTab/VerticalTab.js +34 -0
  15. package/esm/VerticalTab/index.js +9 -0
  16. package/esm/VerticalTab/subComponent/TabContext.js +3 -0
  17. package/esm/alert/Alert.js +22 -0
  18. package/esm/alert/index.js +1 -0
  19. package/esm/animate/Collapse.js +65 -0
  20. package/esm/animate/Loader.js +51 -0
  21. package/esm/animate/NumberCounter.js +45 -0
  22. package/esm/animate/PulseRing.js +26 -0
  23. package/esm/animate/Spinner.js +11 -0
  24. package/esm/animate/index.js +5 -0
  25. package/esm/assets/css/autocomplete.css +16 -0
  26. package/esm/assets/css/font.css +4 -0
  27. package/esm/assets/css/global.css +2 -0
  28. package/esm/assets/font/helvetica/Helvetica.ttf +0 -0
  29. package/esm/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
  30. package/esm/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
  31. package/esm/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
  32. package/esm/assets/icons/app-management.png +0 -0
  33. package/esm/assets/icons/burger-black.png +0 -0
  34. package/esm/assets/icons/burger-white.png +0 -0
  35. package/esm/assets/icons/burger.png +0 -0
  36. package/esm/assets/icons/file.svg +1 -0
  37. package/esm/assets/icons/map_icon1.png +0 -0
  38. package/esm/assets/icons/map_icon4.png +0 -0
  39. package/esm/assets/images/bg-aside.png +0 -0
  40. package/esm/assets/images/bg-chart-circle.png +0 -0
  41. package/esm/assets/images/bg-chart-triangle.png +0 -0
  42. package/esm/assets/images/cashub-logo-only.png +0 -0
  43. package/esm/assets/images/default-user.jpg +0 -0
  44. package/esm/assets/images/logo-cashub.png +0 -0
  45. package/esm/assets/images/map.png +0 -0
  46. package/esm/assets/images/qrcode.png +0 -0
  47. package/esm/backdrop/BaseBackdrop.js +11 -0
  48. package/esm/backdrop/LoadingBackdrop.js +10 -0
  49. package/esm/backdrop/ModalBackdrop.js +8 -0
  50. package/esm/backdrop/index.js +3 -0
  51. package/esm/badge/Badge.js +19 -0
  52. package/esm/badge/BadgeDot.js +11 -0
  53. package/esm/badge/BadgeFill.js +42 -0
  54. package/esm/badge/BadgeFillTriangle.js +138 -0
  55. package/esm/badge/BadgeWithText.js +24 -0
  56. package/esm/badge/index.js +5 -0
  57. package/esm/billing/BarChart.js +45 -0
  58. package/esm/billing/Grid.js +38 -0
  59. package/esm/billing/Header2.js +19 -0
  60. package/esm/billing/Header3.js +31 -0
  61. package/esm/billing/Paragraph.js +27 -0
  62. package/esm/billing/ParagraphGroup.js +16 -0
  63. package/esm/billing/ParagraphText.js +20 -0
  64. package/esm/billing/Section.js +44 -0
  65. package/esm/billing/SectionBody.js +11 -0
  66. package/esm/billing/SectionHeader.js +20 -0
  67. package/esm/billing/__stories__/BarChart.stories.js_bak +46 -0
  68. package/esm/billing/__stories__/Grid.stories.js_bak +57 -0
  69. package/esm/billing/__stories__/Header2.stories.js_bak +62 -0
  70. package/esm/billing/__stories__/Header3.stories.js_bak +69 -0
  71. package/esm/billing/__stories__/Paragraph.stories.js_bak +84 -0
  72. package/esm/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
  73. package/esm/billing/__stories__/ParagraphText.stories.js_bak +64 -0
  74. package/esm/billing/__stories__/Section.stories.js_bak +115 -0
  75. package/esm/billing/__stories__/SectionBody.stories.js_bak +62 -0
  76. package/esm/billing/__stories__/SectionHeader.stories.js-bak +68 -0
  77. package/esm/breadcrumb/Breadcrumb.js +71 -0
  78. package/esm/breadcrumb/index.js +1 -0
  79. package/esm/button/Button.js +145 -0
  80. package/esm/button/ButtonGroup.js +54 -0
  81. package/esm/button/IconButton.js +64 -0
  82. package/esm/button/ScrollToTopButton.js +47 -0
  83. package/esm/button/index.js +4 -0
  84. package/esm/callout/Callout.js +45 -0
  85. package/esm/callout/index.js +1 -0
  86. package/esm/chart/BarChart.js +147 -0
  87. package/esm/chart/DoughnutChart.js +110 -0
  88. package/esm/chart/LineChart.js +140 -0
  89. package/esm/chart/SingleBarChart.js +35 -0
  90. package/esm/chart/index.js +5 -0
  91. package/esm/chart/utils/centerTextPlugin.js +56 -0
  92. package/esm/chart/utils/customTooltip.js +84 -0
  93. package/esm/chart/utils/customTooltipLifecyclePlugin.js +16 -0
  94. package/esm/chart/utils/htmlLegendPlugin.js +83 -0
  95. package/esm/chart/utils/index.js +3 -0
  96. package/esm/chart/utils/padEmptyChartBar.js +47 -0
  97. package/esm/chart/utils/tooltipElement.js +17 -0
  98. package/esm/chart/utils/xAxisLabelTooltipPlugin.js +101 -0
  99. package/esm/chart/utils/yAxisTopTitlePlugin.js +43 -0
  100. package/esm/container/FlexContainer.js +33 -0
  101. package/esm/container/index.js +1 -0
  102. package/esm/cropper/Cropper.js +47 -0
  103. package/esm/cropper/CropperModalHandler.js +34 -0
  104. package/esm/cropper/index.js +2 -0
  105. package/esm/cropper/subComponent/CropImageModal.js +72 -0
  106. package/{datetimePicker/DatetimePicker.js → esm/datetimePicker/DatetimePickerV3.js} +63 -31
  107. package/esm/datetimePicker/TimeInput.js +49 -0
  108. package/esm/datetimePicker/TimePickerStyle.js +58 -0
  109. package/esm/datetimePicker/TimePickerV2.js +199 -0
  110. package/esm/datetimePicker/accordion/Month.js +245 -0
  111. package/esm/datetimePicker/accordion/Year.js +275 -0
  112. package/esm/datetimePicker/index.js +4 -0
  113. package/esm/datetimePicker/provider/constant.js +38 -0
  114. package/esm/datetimePicker/subComponent/DateTimePickerContext.js +3 -0
  115. package/esm/datetimePicker/utils/GMTDate.js +9 -0
  116. package/esm/datetimePicker/utils/pad.js +7 -0
  117. package/esm/datetimePicker/utils/toUTC0.js +7 -0
  118. package/esm/descriptionList/DescriptionDetail.js +21 -0
  119. package/esm/descriptionList/DescriptionList.js +18 -0
  120. package/esm/descriptionList/DescriptionTerm.js +7 -0
  121. package/esm/descriptionList/index.js +3 -0
  122. package/esm/divider/Divider.js +24 -0
  123. package/esm/divider/index.js +1 -0
  124. package/esm/dropdown/Dropdown.js +48 -0
  125. package/esm/dropdown/DropdownButtonOption.js +36 -0
  126. package/esm/dropdown/DropdownContent.js +83 -0
  127. package/esm/dropdown/DropdownDivOption.js +19 -0
  128. package/esm/dropdown/DropdownItem.js +19 -0
  129. package/esm/dropdown/DropdownLinkOption.js +17 -0
  130. package/esm/dropdown/DropdownToggle.js +31 -0
  131. package/esm/dropdown/index.js +11 -0
  132. package/esm/dropdown/subComponent/DropdownContext.js +3 -0
  133. package/esm/dropzone/FileDropzone.js +472 -0
  134. package/esm/dropzone/ImageDropzone.js +327 -0
  135. package/esm/dropzone/index.js +2 -0
  136. package/esm/dropzone/subComponent/Message.js +19 -0
  137. package/esm/figure/IconFigure.js +35 -0
  138. package/esm/figure/ImageFigure.js +31 -0
  139. package/esm/figure/index.js +2 -0
  140. package/esm/file/HiddenFileInput.js +8 -0
  141. package/esm/file/index.js +1 -0
  142. package/esm/form/Checkbox.js +157 -0
  143. package/esm/form/Fieldset.js +11 -0
  144. package/esm/form/FormItem.js +15 -0
  145. package/esm/form/Input.js +59 -0
  146. package/esm/form/Label.js +54 -0
  147. package/esm/form/MutedText.js +14 -0
  148. package/esm/form/PasswordInput.js +40 -0
  149. package/esm/form/RadioButton.js +94 -0
  150. package/esm/form/SearchSelect.js +174 -0
  151. package/esm/form/Searchbox.js +91 -0
  152. package/esm/form/Slider.js +39 -0
  153. package/esm/form/SwitchButton.js +97 -0
  154. package/esm/form/Textarea.js +34 -0
  155. package/esm/form/TreeView.js +66 -0
  156. package/esm/form/index.js +14 -0
  157. package/esm/grid/Column.js +39 -0
  158. package/esm/grid/Grid.js +28 -0
  159. package/esm/grid/index.js +2 -0
  160. package/esm/heading/Heading1.js +14 -0
  161. package/esm/heading/Heading2.js +21 -0
  162. package/esm/heading/Heading3.js +42 -0
  163. package/esm/heading/index.js +3 -0
  164. package/esm/helmet/Helmet.js +17 -0
  165. package/esm/helmet/index.js +3 -0
  166. package/esm/iconbox/ApplicationIconBox.js +74 -0
  167. package/esm/iconbox/IconBox.js +60 -0
  168. package/esm/iconbox/IconBoxV2.js +63 -0
  169. package/esm/iconbox/index.js +3 -0
  170. package/esm/iconbox/subComponent/IconBoxFigure.js +43 -0
  171. package/esm/iconbox/subComponent/IconBoxImage.js +35 -0
  172. package/esm/image/ImageFluid.js +10 -0
  173. package/esm/image/UploadImage.js +243 -0
  174. package/esm/image/index.js +2 -0
  175. package/esm/index.js +47 -0
  176. package/esm/keyframe/Pulse.js +15 -0
  177. package/esm/keyframe/Spin.js +7 -0
  178. package/esm/layout/Aside.js +39 -0
  179. package/esm/layout/AsideHeader.jsx +27 -0
  180. package/esm/layout/Backdrop.js +16 -0
  181. package/esm/layout/Container.js +30 -0
  182. package/esm/layout/Footer.js +36 -0
  183. package/esm/layout/Header.jsx +55 -0
  184. package/esm/layout/Layout.jsx +84 -0
  185. package/esm/layout/Logo.jsx +17 -0
  186. package/esm/layout/MenuIcon.jsx +27 -0
  187. package/esm/layout/Sidebar.jsx +271 -0
  188. package/esm/layout/index.js +1 -0
  189. package/esm/link/LinkSpan.js +62 -0
  190. package/esm/link/index.js +1 -0
  191. package/esm/map/GoogleMap.js +439 -0
  192. package/esm/map/GoogleReverseGeolocation.js +193 -0
  193. package/esm/map/LeafletMap.js +224 -0
  194. package/esm/map/LeafletReverseGeolocation.js +94 -0
  195. package/esm/map/index.js +4 -0
  196. package/esm/map/subComponent/BasicLeafletMap.js +27 -0
  197. package/esm/map/subComponent/GoogleMapContainer.js +22 -0
  198. package/esm/map/subComponent/GoogleMapPopup.js +103 -0
  199. package/esm/map/subComponent/GoogleMapWrapper.js +34 -0
  200. package/esm/map/subComponent/LeafletDrawControl.js +116 -0
  201. package/esm/map/subComponent/LeafletMapContainer.js +166 -0
  202. package/esm/map/subComponent/MapSearchBoxControl.js +47 -0
  203. package/esm/modal/StateModal.js +169 -0
  204. package/esm/modal/TitleModal.js +241 -0
  205. package/esm/modal/index.js +2 -0
  206. package/esm/page/Disclaimer.js +121 -0
  207. package/esm/page/index.js +1 -0
  208. package/esm/paginate/Paginate.js +129 -0
  209. package/esm/paginate/index.js +1 -0
  210. package/esm/popover/Popover.js +82 -0
  211. package/esm/popover/index.js +1 -0
  212. package/esm/qrcode/QRCode.js +51 -0
  213. package/esm/qrcode/QRCodeContainter.js +27 -0
  214. package/esm/qrcode/index.js +2 -0
  215. package/esm/ribbon/Ribbon.js +35 -0
  216. package/esm/ribbon/index.js +1 -0
  217. package/esm/section/Section.js +126 -0
  218. package/esm/section/SectionBody.js +43 -0
  219. package/esm/section/SectionHeader.js +61 -0
  220. package/esm/section/SectionToolbar.js +11 -0
  221. package/esm/section/SectionToolbarItem.js +10 -0
  222. package/esm/section/index.js +5 -0
  223. package/esm/select/InputSelect.js +263 -0
  224. package/esm/select/Select.js +811 -0
  225. package/esm/select/index.js +2 -0
  226. package/esm/select/subComponent/Checkbox.js +40 -0
  227. package/esm/select/subComponent/Footer.js +6 -0
  228. package/esm/select/subComponent/ListBox.js +23 -0
  229. package/esm/select/subComponent/Option.js +37 -0
  230. package/esm/select/subComponent/OptionGroup.js +16 -0
  231. package/esm/select/subComponent/Options.js +25 -0
  232. package/esm/select/subComponent/SearchBox.js +51 -0
  233. package/esm/select/subComponent/SelectedMultipleCount.js +32 -0
  234. package/esm/select/subComponent/SelectedMultipleTags.js +47 -0
  235. package/esm/select/subComponent/SelectedMultipleText.js +63 -0
  236. package/esm/select/subComponent/SelectedSingle.js +10 -0
  237. package/esm/styles/GlobalStyle.js +328 -0
  238. package/esm/styles/config/breakpoint.style.js +7 -0
  239. package/esm/styles/config/header.style.js +4 -0
  240. package/esm/styles/config/sidebar.style.js +11 -0
  241. package/esm/styles/index.js +2 -0
  242. package/esm/styles/mixin/backgroundColor.js +38 -0
  243. package/esm/styles/mixin/borderColor.js +31 -0
  244. package/esm/styles/mixin/color.js +31 -0
  245. package/esm/styles/mixin/colorOnBackground.js +31 -0
  246. package/esm/styles/mixin/inputPlaceholder.js +24 -0
  247. package/esm/styles/mixin/media.js +15 -0
  248. package/esm/styles/mixin/rounded.js +24 -0
  249. package/esm/styles/mixin/scrollbar.js +26 -0
  250. package/esm/styles/theme/dark.theme.js +91 -0
  251. package/esm/styles/theme/light.theme.js +91 -0
  252. package/esm/styles/theme/white.theme.js +91 -0
  253. package/esm/styles/themes.js +9 -0
  254. package/esm/table/GridTable.js +329 -0
  255. package/esm/table/ImageBox.js +38 -0
  256. package/esm/table/InfiniteGridTable.js +396 -0
  257. package/esm/table/PermissionTable.js +57 -0
  258. package/esm/table/SimpleGridTable.js +136 -0
  259. package/esm/table/Table.js +559 -0
  260. package/esm/table/__mock__/columns.js +64 -0
  261. package/esm/table/__mock__/data.js +530 -0
  262. package/esm/table/hooks/index.js +2 -0
  263. package/esm/table/hooks/useCalculateDataRange.js +22 -0
  264. package/esm/table/hooks/useGenerateSort.js +32 -0
  265. package/esm/table/index.js +6 -0
  266. package/esm/table/subComponent/BaseTableHeadCell.js +54 -0
  267. package/esm/table/subComponent/GridTableFooter.js +17 -0
  268. package/esm/table/subComponent/GridTableHeadCell.js +13 -0
  269. package/esm/table/subComponent/Resizer.js +70 -0
  270. package/esm/table/subComponent/TableFooter.js +24 -0
  271. package/esm/table/subComponent/TableFooterInfo.js +6 -0
  272. package/esm/table/subComponent/TableFooterPager.js +26 -0
  273. package/esm/table/subComponent/TableHeadCell.js +12 -0
  274. package/esm/table/subComponent/TableSort.js +31 -0
  275. package/esm/tagify/TagifyStyle.js +54 -0
  276. package/esm/tagify/Tags.js +49 -0
  277. package/esm/tagify/index.js +3 -0
  278. package/esm/tagify/templates/getCreateButtonTemplate.js +12 -0
  279. package/esm/text/Paragraph.js +79 -0
  280. package/esm/text/index.js +1 -0
  281. package/esm/timeline/Timeline.js +132 -0
  282. package/esm/timeline/index.js +1 -0
  283. package/esm/toast/CustomToastContainer.js +38 -0
  284. package/esm/toast/MessageContainer.js +44 -0
  285. package/esm/toast/index.js +3 -0
  286. package/esm/toast/show.js +29 -0
  287. package/esm/toast/style.css +1 -0
  288. package/esm/tooltip/Tooltip.js +133 -0
  289. package/esm/tooltip/index.js +1 -0
  290. package/esm/treeView/TreeViewV2.js +32 -0
  291. package/esm/treeView/TreeflexStyle.js +43 -0
  292. package/esm/treeView/index.js +2 -0
  293. package/esm/wizard/Wizard.js +244 -0
  294. package/esm/wizard/index.js +1 -0
  295. package/helmet/index.js +3 -7
  296. package/index.js +0 -12
  297. package/layout/Sidebar.jsx +1 -1
  298. package/package.json +5 -4
  299. package/datetimePicker/DatePicker.js +0 -363
  300. package/datetimePicker/DatePickerV2.js +0 -407
  301. package/datetimePicker/DatetimePickerV2.js +0 -395
  302. package/datetimePicker/TimePicker.js +0 -317
  303. package/datetimePicker/hooks/index.js +0 -27
  304. package/datetimePicker/hooks/useChangeNumber.js +0 -42
  305. package/datetimePicker/hooks/useDecrease.js +0 -38
  306. package/datetimePicker/hooks/useIncrease.js +0 -38
  307. package/datetimePicker/subComponent/Accordion.js +0 -373
  308. package/datetimePicker/subComponent/CustomTimeInput.js +0 -47
  309. package/jsoneditor/JsonEditor.js +0 -142
  310. package/jsoneditor/index.js +0 -13
@@ -0,0 +1,9 @@
1
+ import VerticalTab from './VerticalTab';
2
+ import TabList from './TabList';
3
+ import TabTab from './TabTab';
4
+ import TabPanel from './TabPanel';
5
+ export default Object.assign(VerticalTab, {
6
+ List: TabList,
7
+ Tab: TabTab,
8
+ Panel: TabPanel
9
+ });
@@ -0,0 +1,3 @@
1
+ import { createContext } from 'react';
2
+ const TabContext = /*#__PURE__*/createContext(null);
3
+ export default TabContext;
@@ -0,0 +1,22 @@
1
+ import styled from 'styled-components';
2
+ const Alert = styled.div`
3
+ background: var(--color-background1);
4
+ border-radius: var(--border-radius);
5
+ color: var(--font-on-background);
6
+ padding: var(--spacing);
7
+
8
+ ${_ref => {
9
+ let {
10
+ backgroundReverse
11
+ } = _ref;
12
+ return backgroundReverse && 'background: var(--color-background2);';
13
+ }}
14
+
15
+ ${_ref2 => {
16
+ let {
17
+ marginBottom
18
+ } = _ref2;
19
+ return marginBottom && 'margin-bottom: var(--spacing);';
20
+ }}
21
+ `;
22
+ export default Alert;
@@ -0,0 +1 @@
1
+ export { default as Alert } from './Alert';
@@ -0,0 +1,65 @@
1
+ import { useMemo, cloneElement, useRef, useState, useEffect } from 'react';
2
+ import { Transition } from 'react-transition-group';
3
+ import { jsx as _jsx } from "react/jsx-runtime";
4
+ const Collapse = _ref => {
5
+ let {
6
+ in: inProp,
7
+ duration = 1000,
8
+ children,
9
+ onEntered,
10
+ onExit,
11
+ onExited
12
+ } = _ref;
13
+ const childRef = useRef(null);
14
+ const [state, setState] = useState({
15
+ show: inProp,
16
+ height: 0
17
+ });
18
+ const defaultStyle = useMemo(() => {
19
+ const style = {
20
+ transition: `height ${duration}ms ease-in-out`,
21
+ height: state.height,
22
+ overflow: 'hidden'
23
+ };
24
+ return style;
25
+ }, [duration, state.height]);
26
+ const transitionStyles = useMemo(() => {
27
+ return {
28
+ entering: {
29
+ height: state.height
30
+ },
31
+ entered: {
32
+ height: state.height
33
+ },
34
+ exiting: {
35
+ height: 0
36
+ },
37
+ exited: {
38
+ height: 0
39
+ }
40
+ };
41
+ }, [state.height]);
42
+ useEffect(() => {
43
+ setState({
44
+ show: inProp,
45
+ height: childRef.current.clientHeight
46
+ });
47
+ }, [inProp]);
48
+ return /*#__PURE__*/_jsx(Transition, {
49
+ in: state.show,
50
+ timeout: duration,
51
+ onEntered: onEntered,
52
+ onExit: onExit,
53
+ onExited: onExited,
54
+ children: state => /*#__PURE__*/_jsx("div", {
55
+ style: {
56
+ ...defaultStyle,
57
+ ...transitionStyles[state]
58
+ },
59
+ children: /*#__PURE__*/cloneElement(children, {
60
+ ref: childRef
61
+ })
62
+ })
63
+ });
64
+ };
65
+ export default Collapse;
@@ -0,0 +1,51 @@
1
+ import styled from 'styled-components';
2
+ import LoadingBackdrop from '../backdrop/LoadingBackdrop';
3
+ import Spinner from './Spinner';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const Loader = _ref => {
6
+ let {
7
+ transparent,
8
+ backgroundFill,
9
+ $loading = true,
10
+ text
11
+ } = _ref;
12
+ return /*#__PURE__*/_jsxs(Wrapper, {
13
+ transparent: transparent,
14
+ backgroundFill: backgroundFill,
15
+ $loading: $loading,
16
+ children: [/*#__PURE__*/_jsx(Spinner, {}), text && /*#__PURE__*/_jsx(Text, {
17
+ children: text
18
+ })]
19
+ });
20
+ };
21
+ const Wrapper = styled(LoadingBackdrop)`
22
+ z-index: 200;
23
+
24
+ ${_ref2 => {
25
+ let {
26
+ transparent
27
+ } = _ref2;
28
+ return transparent && 'background: transparent;';
29
+ }}
30
+
31
+ ${_ref3 => {
32
+ let {
33
+ backgroundFill
34
+ } = _ref3;
35
+ return backgroundFill && 'background: var(--color-background1);';
36
+ }}
37
+
38
+ ${_ref4 => {
39
+ let {
40
+ $loading
41
+ } = _ref4;
42
+ return !$loading && 'display: none;';
43
+ }}
44
+ `;
45
+ const Text = styled.p`
46
+ white-space: pre-line;
47
+ margin: var(--spacing) 0;
48
+ font-size: var(--font-h2);
49
+ text-align: center;
50
+ `;
51
+ export default Loader;
@@ -0,0 +1,45 @@
1
+ import { useState, useEffect } from 'react';
2
+ const MINIMUM_STEP_TIME = 100;
3
+ const NumberCounter = _ref => {
4
+ let {
5
+ start,
6
+ end,
7
+ duration
8
+ } = _ref;
9
+ const [number, setNumber] = useState(start || 0);
10
+ useEffect(() => {
11
+ // invalid value
12
+ if (end === null || end === undefined) return;
13
+
14
+ // same value no need do counter
15
+ if (start === end) return;
16
+ let current = start;
17
+ const range = end - start;
18
+ let increment = end > start ? 1 : -1;
19
+ let stepTime = duration / range;
20
+
21
+ // use minimum step time instead if step time too small
22
+ // prevent too much render cause long time render
23
+ if (stepTime < MINIMUM_STEP_TIME) {
24
+ const gap = MINIMUM_STEP_TIME - stepTime;
25
+ const multiple = gap / stepTime;
26
+ stepTime = MINIMUM_STEP_TIME;
27
+ increment = Math.floor(1 + 1 * multiple);
28
+ }
29
+ const timer = setInterval(() => {
30
+ current += increment;
31
+ if (current > end) {
32
+ current = end;
33
+ }
34
+ setNumber(current);
35
+ if (current === end) {
36
+ clearInterval(timer);
37
+ }
38
+ }, stepTime);
39
+ return () => {
40
+ clearInterval(timer);
41
+ };
42
+ }, [start, end, duration]);
43
+ return number;
44
+ };
45
+ export default NumberCounter;
@@ -0,0 +1,26 @@
1
+ import styled, { css } from 'styled-components';
2
+ import Pulse from '../keyframe/Pulse';
3
+ const PulseRing = styled.span.attrs(() => ({
4
+ role: 'presentation'
5
+ }))`
6
+ display: block;
7
+ border-radius: var(--border-radius-round);
8
+ height: 40px;
9
+ width: 40px;
10
+ position: absolute;
11
+ top: 0;
12
+ z-index: -1;
13
+ opacity: 0;
14
+ border: 4px solid var(--color-primary);
15
+
16
+ ${_ref => {
17
+ let {
18
+ play
19
+ } = _ref;
20
+ return play && css`
21
+ animation: ${Pulse} 3.5s ease-out;
22
+ animation-iteration-count: infinite;
23
+ `;
24
+ }}
25
+ `;
26
+ export default PulseRing;
@@ -0,0 +1,11 @@
1
+ import styled from 'styled-components';
2
+ import Spin from '../keyframe/Spin';
3
+ const Spinner = styled.div`
4
+ width: 40px;
5
+ height: 40px;
6
+ border-radius: 50%;
7
+ border: 0.3rem solid var(--color-background2);
8
+ border-top-color: var(--color-primary);
9
+ animation: 1s ${Spin} infinite linear;
10
+ `;
11
+ export default Spinner;
@@ -0,0 +1,5 @@
1
+ export { default as Collapse } from './Collapse';
2
+ export { default as Loader } from './Loader';
3
+ export { default as NumberCounter } from './NumberCounter';
4
+ export { default as PulseRing } from './PulseRing';
5
+ export { default as Spinner } from './Spinner';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Fix autocomplete style
3
+ */
4
+ input:-webkit-autofill,
5
+ input:-webkit-autofill:hover,
6
+ input:-webkit-autofill:focus,
7
+ textarea:-webkit-autofill,
8
+ textarea:-webkit-autofill:hover,
9
+ textarea:-webkit-autofill:focus,
10
+ select:-webkit-autofill,
11
+ select:-webkit-autofill:hover,
12
+ select:-webkit-autofill:focus {
13
+ transition: color 5000s ease-in-out 0s, background-color 5000s ease-in-out 0s;
14
+ box-shadow: 0 0 0px 100px var(--color-background2) inset;
15
+ -webkit-text-fill-color: var(--font-on-background);
16
+ }
@@ -0,0 +1,4 @@
1
+ @font-face {
2
+ font-family: 'Helvetica';
3
+ src: url('../font/helvetica/Helvetica.ttf');
4
+ }
@@ -0,0 +1,2 @@
1
+ @import './font.css';
2
+ @import './autocomplete.css';
Binary file
@@ -0,0 +1 @@
1
+ <svg height="512pt" viewBox="-56 0 512 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m352.402344 64.265625h-176.734375c-3.980469 0-7.792969 1.582031-10.605469 4.394531l-96.402344 96.402344c-2.8125 2.8125-4.394531 6.625-4.394531 10.605469v289.199219c0 25.988281 21.144531 47.132812 47.132813 47.132812h241c25.992187 0 47.132812-21.144531 47.132812-47.132812v-353.46875c.003906-25.988282-21.140625-47.132813-47.128906-47.132813zm0 0" fill="#3ab4fb"/><path d="m399.535156 111.398438v353.472656c0 25.988281-21.148437 47.128906-47.136718 47.128906h-152.632813v-447.730469h152.632813c25.988281 0 47.136718 21.140625 47.136718 47.128907zm0 0" fill="#1d9cfd"/><path d="m288.132812 0h-176.730468c-3.980469 0-7.792969 1.582031-10.605469 4.394531l-96.402344 96.398438c-2.8125 2.8125-4.394531 6.628906-4.394531 10.605469v289.203124c0 25.988282 21.144531 47.132813 47.132812 47.132813h241c25.988282 0 47.132813-21.144531 47.132813-47.132813v-353.46875c0-25.988281-21.144531-47.132812-47.132813-47.132812zm0 0" fill="#eff6fe"/><g fill="#d9e4ef"><path d="m95.335938 351.332031h80.332031c8.28125 0 15-6.714843 15-15 0-8.28125-6.71875-15-15-15h-80.332031c-8.285157 0-15 6.71875-15 15 0 8.285157 6.714843 15 15 15zm0 0"/><path d="m335.265625 47.128906v353.472656c0 25.988282-21.136719 47.128907-47.128906 47.128907h-88.371094v-447.730469h88.371094c25.992187 0 47.128906 21.140625 47.128906 47.128906zm0 0"/><path d="m95.335938 222.800781h144.597656c8.285156 0 15-6.714843 15-15 0-8.285156-6.714844-15-15-15h-144.597656c-8.285157 0-15 6.714844-15 15 0 8.285157 6.714843 15 15 15zm0 0"/><path d="m95.335938 287.066406h144.597656c8.285156 0 15-6.714844 15-15s-6.714844-15-15-15h-144.597656c-8.285157 0-15 6.714844-15 15s6.714843 15 15 15zm0 0"/></g><path d="m254.9375 207.800781c0 8.277344-6.71875 15-15 15h-40.171875v-30h40.171875c8.28125 0 15 6.71875 15 15zm0 0" fill="#c1cedb"/><path d="m254.9375 272.070312c0 8.28125-6.71875 15-15 15h-40.171875v-30h40.171875c8.28125 0 15 6.710938 15 15zm0 0" fill="#c1cedb"/><path d="m95.335938 112.46875c9.445312 0 17.132812-7.6875 17.132812-17.132812v-95.335938h-1.070312c-3.976563 0-7.792969 1.582031-10.605469 4.394531l-96.398438 96.398438c-2.8125 2.8125-4.394531 6.628906-4.394531 10.605469v1.070312zm0 0" fill="#d9e4ef"/></svg>
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,11 @@
1
+ import styled from 'styled-components';
2
+ const BaseBackdrop = styled.div`
3
+ position: fixed;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ background: var(--color-backdrop);
9
+ z-index: 50;
10
+ `;
11
+ export default BaseBackdrop;
@@ -0,0 +1,10 @@
1
+ import styled from 'styled-components';
2
+ import BaseBackdrop from './BaseBackdrop';
3
+ const LoadingBackdrop = styled(BaseBackdrop)`
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ justify-content: center;
8
+ color: var(--color-primary);
9
+ `;
10
+ export default LoadingBackdrop;
@@ -0,0 +1,8 @@
1
+ import styled from 'styled-components';
2
+ import BaseBackdrop from './BaseBackdrop';
3
+ const ModalBackdrop = styled(BaseBackdrop)`
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ `;
8
+ export default ModalBackdrop;
@@ -0,0 +1,3 @@
1
+ export { default as BaseBackdrop } from './BaseBackdrop';
2
+ export { default as LoadingBackdrop } from './LoadingBackdrop';
3
+ export { default as ModalBackdrop } from './ModalBackdrop';
@@ -0,0 +1,19 @@
1
+ import styled from 'styled-components';
2
+ import color from '../styles/mixin/color';
3
+ import borderColor from '../styles/mixin/borderColor';
4
+ const Badge = styled.span`
5
+ display: inline-flex;
6
+ justify-content: center;
7
+ align-items: center;
8
+ height: auto;
9
+ width: auto;
10
+ font-size: inherit;
11
+ padding: 0.25rem 0.5rem;
12
+ margin: 0 var(--spacing-xs) var(--spacing-xs) 0;
13
+ border: var(--border-width) solid var(--border-color);
14
+ border-radius: var(--border-radius-l);
15
+
16
+ ${color}
17
+ ${borderColor}
18
+ `;
19
+ export default Badge;
@@ -0,0 +1,11 @@
1
+ import styled from 'styled-components';
2
+ import backgroundColor from '../styles/mixin/backgroundColor';
3
+ const BadgeDot = styled.span`
4
+ display: inline-block;
5
+ height: 8px;
6
+ width: 8px;
7
+ border-radius: var(--border-radius);
8
+
9
+ ${backgroundColor}
10
+ `;
11
+ export default BadgeDot;
@@ -0,0 +1,42 @@
1
+ import styled from 'styled-components';
2
+ import backgroundColor from '../styles/mixin/backgroundColor';
3
+ import colorOnBackground from '../styles/mixin/colorOnBackground';
4
+ const BadgeFill = styled.span.attrs(() => ({
5
+ primary: true
6
+ }))`
7
+ display: inline-flex;
8
+ justify-content: center;
9
+ align-items: center;
10
+ height: auto;
11
+ width: auto;
12
+ border-radius: var(--border-radius-l);
13
+ font-size: 1rem;
14
+ padding: 0.5rem;
15
+ margin: 0;
16
+ color: var(--font-on-background);
17
+
18
+ ${backgroundColor}
19
+ ${colorOnBackground}
20
+
21
+ ${_ref => {
22
+ let {
23
+ extraSmall
24
+ } = _ref;
25
+ return extraSmall && 'font-size: 0.75rem; padding: 0.125rem;';
26
+ }}
27
+
28
+ ${_ref2 => {
29
+ let {
30
+ small
31
+ } = _ref2;
32
+ return small && 'font-size: 1rem; padding: 0.25rem;';
33
+ }}
34
+
35
+ ${_ref3 => {
36
+ let {
37
+ large
38
+ } = _ref3;
39
+ return large && 'font-size: 2rem;';
40
+ }}
41
+ `;
42
+ export default BadgeFill;
@@ -0,0 +1,138 @@
1
+ import { forwardRef } from 'react';
2
+ import styled, { css } from 'styled-components';
3
+ import colorOnBackground from '../styles/mixin/colorOnBackground';
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ const fillColor = css`
6
+ ${_ref => {
7
+ let {
8
+ primary
9
+ } = _ref;
10
+ return primary && 'fill: var(--color-primary);';
11
+ }}
12
+
13
+ ${_ref2 => {
14
+ let {
15
+ success
16
+ } = _ref2;
17
+ return success && 'fill: var(--color-success);';
18
+ }}
19
+
20
+ ${_ref3 => {
21
+ let {
22
+ warning
23
+ } = _ref3;
24
+ return warning && 'fill: var(--color-warning);';
25
+ }}
26
+
27
+ ${_ref4 => {
28
+ let {
29
+ danger
30
+ } = _ref4;
31
+ return danger && 'fill: var(--color-danger);';
32
+ }}
33
+
34
+ ${_ref5 => {
35
+ let {
36
+ grey
37
+ } = _ref5;
38
+ return grey && 'fill: var(--color-grey);';
39
+ }}
40
+ `;
41
+ const Wrapper = styled.span`
42
+ position: relative;
43
+ display: inline-flex;
44
+ justify-content: center;
45
+ align-items: center;
46
+ height: 2rem;
47
+ width: 2rem;
48
+ font-size: 1rem;
49
+ margin: 0;
50
+ color: var(--font-on-background);
51
+
52
+ ${colorOnBackground}
53
+
54
+ ${_ref6 => {
55
+ let {
56
+ extraSmall
57
+ } = _ref6;
58
+ return extraSmall && 'height: 1rem; width: 1rem; font-size: 0.62rem;';
59
+ }}
60
+
61
+ ${_ref7 => {
62
+ let {
63
+ small
64
+ } = _ref7;
65
+ return small && 'height: 1.5rem; width: 1.5rem;';
66
+ }}
67
+
68
+ ${_ref8 => {
69
+ let {
70
+ large
71
+ } = _ref8;
72
+ return large && 'height: 3rem; width: 3rem; font-size: 1.75rem;';
73
+ }}
74
+ `;
75
+ const TriangleSvg = styled.svg`
76
+ position: absolute;
77
+ top: 0;
78
+ left: 0;
79
+ height: 100%;
80
+ width: 100%;
81
+ `;
82
+ const TrianglePath = styled.path`
83
+ ${fillColor}
84
+ `;
85
+ const Content = styled.span`
86
+ position: relative;
87
+ display: inline-flex;
88
+ transform: translateY(0.2rem);
89
+
90
+ ${_ref9 => {
91
+ let {
92
+ extraSmall
93
+ } = _ref9;
94
+ return extraSmall && 'transform: translateY(0.1rem);';
95
+ }}
96
+
97
+ ${_ref10 => {
98
+ let {
99
+ small
100
+ } = _ref10;
101
+ return small && 'transform: translateY(0.15rem);';
102
+ }}
103
+
104
+ ${_ref11 => {
105
+ let {
106
+ large
107
+ } = _ref11;
108
+ return large && 'transform: translateY(0.3rem);';
109
+ }}
110
+ `;
111
+ const TRIANGLE_PATH = 'M12 2 C12.7 2 13.3 2.4 13.7 3 L22 18 C22.8 19.5 21.7 21 20 21 H4 C2.3 21 1.2 19.5 2 18 L10.3 3 C10.7 2.4 11.3 2 12 2Z';
112
+ const BadgeFillTriangle = /*#__PURE__*/forwardRef((_ref12, ref) => {
113
+ let {
114
+ children,
115
+ primary = true,
116
+ ...rest
117
+ } = _ref12;
118
+ return /*#__PURE__*/_jsxs(Wrapper, {
119
+ ref: ref,
120
+ primary: primary,
121
+ ...rest,
122
+ children: [/*#__PURE__*/_jsx(TriangleSvg, {
123
+ viewBox: "1.7 2 20.6 19",
124
+ "aria-hidden": "true",
125
+ focusable: "false",
126
+ children: /*#__PURE__*/_jsx(TrianglePath, {
127
+ primary: primary,
128
+ ...rest,
129
+ d: TRIANGLE_PATH
130
+ })
131
+ }), /*#__PURE__*/_jsx(Content, {
132
+ ...rest,
133
+ children: children
134
+ })]
135
+ });
136
+ });
137
+ BadgeFillTriangle.displayName = 'BadgeFillTriangle';
138
+ export default BadgeFillTriangle;
@@ -0,0 +1,24 @@
1
+ import styled from 'styled-components';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ const BadgeWithText = _ref => {
4
+ let {
5
+ children
6
+ } = _ref;
7
+ return /*#__PURE__*/_jsx(Wrapper, {
8
+ children: children
9
+ });
10
+ };
11
+ const Wrapper = styled.span`
12
+ display: inline-flex;
13
+ align-items: center;
14
+ margin-bottom: var(--spacing-s);
15
+
16
+ :not(:last-child) {
17
+ margin-right: var(--spacing-s);
18
+ }
19
+
20
+ > :first-child {
21
+ margin-right: var(--spacing-xs);
22
+ }
23
+ `;
24
+ export default BadgeWithText;
@@ -0,0 +1,5 @@
1
+ export { default as Badge } from './Badge';
2
+ export { default as BadgeDot } from './BadgeDot';
3
+ export { default as BadgeFill } from './BadgeFill';
4
+ export { default as BadgeFillTriangle } from './BadgeFillTriangle';
5
+ export { default as BadgeWithText } from './BadgeWithText';
@@ -0,0 +1,45 @@
1
+ import { View } from '@react-pdf/renderer';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ const BillingBarChart = _ref => {
4
+ let {
5
+ theme,
6
+ percentage,
7
+ success,
8
+ warning,
9
+ danger
10
+ } = _ref;
11
+ const styles = {
12
+ chart: {
13
+ position: 'relative',
14
+ width: '100%',
15
+ height: 16,
16
+ borderRadius: 16,
17
+ backgroundColor: theme.bgColor3,
18
+ marginTop: 8
19
+ },
20
+ bar: {
21
+ position: 'absolute',
22
+ width: `${percentage}%`,
23
+ borderRadius: 16,
24
+ top: 0,
25
+ bottom: 0,
26
+ backgroundColor: theme.colorPrimary
27
+ }
28
+ };
29
+ if (success) {
30
+ styles.bar.backgroundColor = theme.colorSuccess;
31
+ }
32
+ if (warning) {
33
+ styles.bar.backgroundColor = theme.colorWarning;
34
+ }
35
+ if (danger) {
36
+ styles.bar.backgroundColor = theme.colorDanger;
37
+ }
38
+ return /*#__PURE__*/_jsx(View, {
39
+ style: styles.chart,
40
+ children: /*#__PURE__*/_jsx(View, {
41
+ style: styles.bar
42
+ })
43
+ });
44
+ };
45
+ export default BillingBarChart;