@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.
- package/Tab/Tab.js +28 -0
- package/Tab/TabList.js +167 -0
- package/Tab/TabPanel.js +49 -0
- package/Tab/TabTab.js +105 -0
- package/Tab/index.js +30 -0
- package/Tab/subComponent/TabContext.js +9 -0
- package/Tab/subComponent/TabListV2.js +25 -0
- package/Tab/subComponent/TabPanelV2.js +52 -0
- package/Tab/subComponent/TabTabV2.js +63 -0
- package/VerticalTab/TabList.js +27 -0
- package/VerticalTab/TabPanel.js +52 -0
- package/VerticalTab/TabTab.js +70 -0
- package/VerticalTab/VerticalTab.js +41 -0
- package/VerticalTab/index.js +16 -0
- package/VerticalTab/subComponent/TabContext.js +9 -0
- package/alert/Alert.js +29 -0
- package/alert/index.js +13 -0
- package/animate/Collapse.js +71 -0
- package/animate/Loader.js +58 -0
- package/animate/NumberCounter.js +51 -0
- package/animate/PulseRing.js +35 -0
- package/animate/Spinner.js +18 -0
- package/animate/index.js +41 -0
- package/assets/css/autocomplete.css +16 -0
- package/assets/css/font.css +4 -0
- package/assets/css/global.css +2 -0
- package/assets/font/helvetica/Helvetica.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Bold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-ExtraBold.ttf +0 -0
- package/assets/font/nanumGothic/NanumGothic-Regular.ttf +0 -0
- package/assets/icons/app-management.png +0 -0
- package/assets/icons/burger-black.png +0 -0
- package/assets/icons/burger-white.png +0 -0
- package/assets/icons/burger.png +0 -0
- package/assets/icons/file.svg +1 -0
- package/assets/icons/map_icon1.png +0 -0
- package/assets/icons/map_icon4.png +0 -0
- package/assets/images/bg-aside.png +0 -0
- package/assets/images/bg-chart-circle.png +0 -0
- package/assets/images/bg-chart-triangle.png +0 -0
- package/assets/images/cashub-logo-only.png +0 -0
- package/assets/images/default-user.jpg +0 -0
- package/assets/images/logo-cashub.png +0 -0
- package/assets/images/map.png +0 -0
- package/assets/images/qrcode.png +0 -0
- package/backdrop/BaseBackdrop.js +18 -0
- package/backdrop/LoadingBackdrop.js +17 -0
- package/backdrop/ModalBackdrop.js +15 -0
- package/backdrop/index.js +27 -0
- package/badge/Badge.js +26 -0
- package/badge/BadgeDot.js +18 -0
- package/badge/BadgeFill.js +49 -0
- package/badge/BadgeFillTriangle.js +147 -0
- package/badge/BadgeWithText.js +31 -0
- package/badge/index.js +41 -0
- package/billing/BarChart.js +51 -0
- package/billing/Grid.js +45 -0
- package/billing/Header2.js +25 -0
- package/billing/Header3.js +37 -0
- package/billing/Paragraph.js +33 -0
- package/billing/ParagraphGroup.js +22 -0
- package/billing/ParagraphText.js +26 -0
- package/billing/Section.js +50 -0
- package/billing/SectionBody.js +17 -0
- package/billing/SectionHeader.js +26 -0
- package/billing/__stories__/BarChart.stories.js_bak +46 -0
- package/billing/__stories__/Grid.stories.js_bak +57 -0
- package/billing/__stories__/Header2.stories.js_bak +62 -0
- package/billing/__stories__/Header3.stories.js_bak +69 -0
- package/billing/__stories__/Paragraph.stories.js_bak +84 -0
- package/billing/__stories__/ParagraphGroup.stories.js_bak +68 -0
- package/billing/__stories__/ParagraphText.stories.js_bak +64 -0
- package/billing/__stories__/Section.stories.js_bak +115 -0
- package/billing/__stories__/SectionBody.stories.js_bak +62 -0
- package/billing/__stories__/SectionHeader.stories.js-bak +68 -0
- package/breadcrumb/Breadcrumb.js +78 -0
- package/breadcrumb/index.js +13 -0
- package/button/Button.js +154 -0
- package/button/ButtonGroup.js +61 -0
- package/button/IconButton.js +72 -0
- package/button/ScrollToTopButton.js +54 -0
- package/button/index.js +34 -0
- package/callout/Callout.js +52 -0
- package/callout/index.js +13 -0
- package/chart/BarChart.js +148 -0
- package/chart/DoughnutChart.js +118 -0
- package/chart/LineChart.js +146 -0
- package/chart/SingleBarChart.js +42 -0
- package/chart/index.js +52 -0
- package/chart/utils/centerTextPlugin.js +62 -0
- package/chart/utils/customTooltip.js +94 -0
- package/chart/utils/htmlLegendPlugin.js +89 -0
- package/chart/utils/index.js +27 -0
- package/chart/utils/padEmptyChartBar.js +53 -0
- package/chart/utils/yAxisTopTitlePlugin.js +49 -0
- package/container/FlexContainer.js +40 -0
- package/container/index.js +13 -0
- package/cropper/Cropper.js +54 -0
- package/cropper/CropperModalHandler.js +41 -0
- package/cropper/index.js +20 -0
- package/cropper/subComponent/CropImageModal.js +79 -0
- package/datetimePicker/DatePicker.js +363 -0
- package/datetimePicker/DatePickerV2.js +407 -0
- package/datetimePicker/DatetimePicker.js +240 -0
- package/datetimePicker/DatetimePickerV2.js +395 -0
- package/datetimePicker/DatetimePickerV3.js +279 -0
- package/datetimePicker/TimeInput.js +56 -0
- package/datetimePicker/TimePicker.js +317 -0
- package/datetimePicker/TimePickerStyle.js +64 -0
- package/datetimePicker/TimePickerV2.js +208 -0
- package/datetimePicker/accordion/Month.js +254 -0
- package/datetimePicker/accordion/Year.js +284 -0
- package/datetimePicker/hooks/index.js +27 -0
- package/datetimePicker/hooks/useChangeNumber.js +42 -0
- package/datetimePicker/hooks/useDecrease.js +38 -0
- package/datetimePicker/hooks/useIncrease.js +38 -0
- package/datetimePicker/index.js +69 -0
- package/datetimePicker/provider/constant.js +43 -0
- package/datetimePicker/subComponent/Accordion.js +373 -0
- package/datetimePicker/subComponent/CustomTimeInput.js +47 -0
- package/datetimePicker/subComponent/DateTimePickerContext.js +9 -0
- package/datetimePicker/utils/GMTDate.js +15 -0
- package/datetimePicker/utils/pad.js +13 -0
- package/datetimePicker/utils/toUTC0.js +13 -0
- package/descriptionList/DescriptionDetail.js +28 -0
- package/descriptionList/DescriptionList.js +25 -0
- package/descriptionList/DescriptionTerm.js +14 -0
- package/descriptionList/index.js +27 -0
- package/divider/Divider.js +31 -0
- package/divider/index.js +13 -0
- package/dropdown/Dropdown.js +55 -0
- package/dropdown/DropdownButtonOption.js +43 -0
- package/dropdown/DropdownContent.js +90 -0
- package/dropdown/DropdownDivOption.js +26 -0
- package/dropdown/DropdownItem.js +26 -0
- package/dropdown/DropdownLinkOption.js +24 -0
- package/dropdown/DropdownToggle.js +38 -0
- package/dropdown/index.js +42 -0
- package/dropdown/subComponent/DropdownContext.js +9 -0
- package/dropzone/FileDropzone.js +479 -0
- package/dropzone/ImageDropzone.js +334 -0
- package/dropzone/index.js +20 -0
- package/dropzone/subComponent/Message.js +26 -0
- package/figure/IconFigure.js +42 -0
- package/figure/ImageFigure.js +38 -0
- package/figure/index.js +20 -0
- package/file/HiddenFileInput.js +15 -0
- package/file/index.js +13 -0
- package/form/Checkbox.js +166 -0
- package/form/Fieldset.js +18 -0
- package/form/FormItem.js +22 -0
- package/form/Input.js +66 -0
- package/form/Label.js +61 -0
- package/form/MutedText.js +21 -0
- package/form/PasswordInput.js +47 -0
- package/form/RadioButton.js +103 -0
- package/form/SearchSelect.js +181 -0
- package/form/Searchbox.js +98 -0
- package/form/Slider.js +46 -0
- package/form/SwitchButton.js +105 -0
- package/form/Textarea.js +41 -0
- package/form/TreeView.js +73 -0
- package/form/index.js +104 -0
- package/grid/Column.js +46 -0
- package/grid/Grid.js +35 -0
- package/grid/index.js +20 -0
- package/heading/Heading1.js +21 -0
- package/heading/Heading2.js +28 -0
- package/heading/Heading3.js +49 -0
- package/heading/index.js +27 -0
- package/helmet/Helmet.js +23 -0
- package/helmet/index.js +20 -0
- package/iconbox/ApplicationIconBox.js +81 -0
- package/iconbox/IconBox.js +67 -0
- package/iconbox/IconBoxV2.js +72 -0
- package/iconbox/index.js +27 -0
- package/iconbox/subComponent/IconBoxFigure.js +50 -0
- package/iconbox/subComponent/IconBoxImage.js +42 -0
- package/image/ImageFluid.js +17 -0
- package/image/UploadImage.js +250 -0
- package/image/index.js +20 -0
- package/index.js +568 -0
- package/jsoneditor/JsonEditor.js +142 -0
- package/jsoneditor/index.js +13 -0
- package/keyframe/Pulse.js +21 -0
- package/keyframe/Spin.js +13 -0
- package/layout/Aside.js +48 -0
- package/layout/AsideHeader.jsx +27 -0
- package/layout/Backdrop.js +23 -0
- package/layout/Container.js +39 -0
- package/layout/Footer.js +45 -0
- package/layout/Header.jsx +55 -0
- package/layout/Layout.jsx +84 -0
- package/layout/Logo.jsx +17 -0
- package/layout/MenuIcon.jsx +27 -0
- package/layout/Sidebar.jsx +271 -0
- package/layout/index.js +13 -0
- package/link/LinkSpan.js +69 -0
- package/link/index.js +13 -0
- package/map/GoogleMap.js +448 -0
- package/map/GoogleReverseGeolocation.js +200 -0
- package/map/LeafletMap.js +231 -0
- package/map/LeafletReverseGeolocation.js +101 -0
- package/map/index.js +34 -0
- package/map/subComponent/BasicLeafletMap.js +34 -0
- package/map/subComponent/GoogleMapContainer.js +29 -0
- package/map/subComponent/GoogleMapPopup.js +109 -0
- package/map/subComponent/GoogleMapWrapper.js +40 -0
- package/map/subComponent/LeafletDrawControl.js +127 -0
- package/map/subComponent/LeafletMapContainer.js +173 -0
- package/map/subComponent/MapSearchBoxControl.js +54 -0
- package/modal/StateModal.js +178 -0
- package/modal/TitleModal.js +250 -0
- package/modal/index.js +20 -0
- package/package.json +54 -0
- package/page/Disclaimer.js +128 -0
- package/page/index.js +13 -0
- package/paginate/Paginate.js +137 -0
- package/paginate/index.js +13 -0
- package/popover/Popover.js +91 -0
- package/popover/index.js +13 -0
- package/qrcode/QRCode.js +58 -0
- package/qrcode/QRCodeContainter.js +34 -0
- package/qrcode/index.js +20 -0
- package/ribbon/Ribbon.js +42 -0
- package/ribbon/index.js +13 -0
- package/section/Section.js +133 -0
- package/section/SectionBody.js +52 -0
- package/section/SectionHeader.js +70 -0
- package/section/SectionToolbar.js +18 -0
- package/section/SectionToolbarItem.js +17 -0
- package/section/index.js +41 -0
- package/select/InputSelect.js +270 -0
- package/select/Select.js +818 -0
- package/select/index.js +20 -0
- package/select/subComponent/Checkbox.js +48 -0
- package/select/subComponent/Footer.js +13 -0
- package/select/subComponent/ListBox.js +30 -0
- package/select/subComponent/Option.js +45 -0
- package/select/subComponent/OptionGroup.js +23 -0
- package/select/subComponent/Options.js +32 -0
- package/select/subComponent/SearchBox.js +58 -0
- package/select/subComponent/SelectedMultipleCount.js +39 -0
- package/select/subComponent/SelectedMultipleTags.js +54 -0
- package/select/subComponent/SelectedMultipleText.js +70 -0
- package/select/subComponent/SelectedSingle.js +17 -0
- package/styles/GlobalStyle.js +334 -0
- package/styles/config/breakpoint.style.js +13 -0
- package/styles/config/header.style.js +10 -0
- package/styles/config/sidebar.style.js +17 -0
- package/styles/index.js +20 -0
- package/styles/mixin/backgroundColor.js +44 -0
- package/styles/mixin/borderColor.js +37 -0
- package/styles/mixin/color.js +37 -0
- package/styles/mixin/colorOnBackground.js +37 -0
- package/styles/mixin/inputPlaceholder.js +30 -0
- package/styles/mixin/media.js +21 -0
- package/styles/mixin/rounded.js +30 -0
- package/styles/mixin/scrollbar.js +32 -0
- package/styles/theme/dark.theme.js +97 -0
- package/styles/theme/light.theme.js +97 -0
- package/styles/theme/white.theme.js +97 -0
- package/styles/themes.js +16 -0
- package/table/GridTable.js +336 -0
- package/table/ImageBox.js +45 -0
- package/table/InfiniteGridTable.js +403 -0
- package/table/PermissionTable.js +64 -0
- package/table/SimpleGridTable.js +143 -0
- package/table/Table.js +568 -0
- package/table/__mock__/columns.js +70 -0
- package/table/__mock__/data.js +536 -0
- package/table/hooks/index.js +20 -0
- package/table/hooks/useCalculateDataRange.js +28 -0
- package/table/hooks/useGenerateSort.js +39 -0
- package/table/index.js +48 -0
- package/table/subComponent/BaseTableHeadCell.js +62 -0
- package/table/subComponent/GridTableFooter.js +24 -0
- package/table/subComponent/GridTableHeadCell.js +20 -0
- package/table/subComponent/Resizer.js +77 -0
- package/table/subComponent/TableFooter.js +31 -0
- package/table/subComponent/TableFooterInfo.js +13 -0
- package/table/subComponent/TableFooterPager.js +33 -0
- package/table/subComponent/TableHeadCell.js +19 -0
- package/table/subComponent/TableSort.js +38 -0
- package/tagify/TagifyStyle.js +60 -0
- package/tagify/Tags.js +56 -0
- package/tagify/index.js +27 -0
- package/tagify/templates/getCreateButtonTemplate.js +18 -0
- package/text/Paragraph.js +86 -0
- package/text/index.js +13 -0
- package/timeline/Timeline.js +139 -0
- package/timeline/index.js +13 -0
- package/toast/CustomToastContainer.js +45 -0
- package/toast/MessageContainer.js +51 -0
- package/toast/index.js +36 -0
- package/toast/show.js +39 -0
- package/toast/style.css +1 -0
- package/tooltip/Tooltip.js +140 -0
- package/tooltip/index.js +13 -0
- package/treeView/TreeViewV2.js +38 -0
- package/treeView/TreeflexStyle.js +49 -0
- package/treeView/index.js +20 -0
- package/wizard/Wizard.js +251 -0
- package/wizard/index.js +13 -0
|
@@ -0,0 +1,147 @@
|
|
|
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 = _interopRequireWildcard(require("styled-components"));
|
|
9
|
+
var _colorOnBackground = _interopRequireDefault(require("../styles/mixin/colorOnBackground"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const fillColor = (0, _styledComponents.css)`
|
|
15
|
+
${_ref => {
|
|
16
|
+
let {
|
|
17
|
+
primary
|
|
18
|
+
} = _ref;
|
|
19
|
+
return primary && 'fill: var(--color-primary);';
|
|
20
|
+
}}
|
|
21
|
+
|
|
22
|
+
${_ref2 => {
|
|
23
|
+
let {
|
|
24
|
+
success
|
|
25
|
+
} = _ref2;
|
|
26
|
+
return success && 'fill: var(--color-success);';
|
|
27
|
+
}}
|
|
28
|
+
|
|
29
|
+
${_ref3 => {
|
|
30
|
+
let {
|
|
31
|
+
warning
|
|
32
|
+
} = _ref3;
|
|
33
|
+
return warning && 'fill: var(--color-warning);';
|
|
34
|
+
}}
|
|
35
|
+
|
|
36
|
+
${_ref4 => {
|
|
37
|
+
let {
|
|
38
|
+
danger
|
|
39
|
+
} = _ref4;
|
|
40
|
+
return danger && 'fill: var(--color-danger);';
|
|
41
|
+
}}
|
|
42
|
+
|
|
43
|
+
${_ref5 => {
|
|
44
|
+
let {
|
|
45
|
+
grey
|
|
46
|
+
} = _ref5;
|
|
47
|
+
return grey && 'fill: var(--color-grey);';
|
|
48
|
+
}}
|
|
49
|
+
`;
|
|
50
|
+
const Wrapper = _styledComponents.default.span`
|
|
51
|
+
position: relative;
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
height: 2rem;
|
|
56
|
+
width: 2rem;
|
|
57
|
+
font-size: 1rem;
|
|
58
|
+
margin: 0;
|
|
59
|
+
color: var(--font-on-background);
|
|
60
|
+
|
|
61
|
+
${_colorOnBackground.default}
|
|
62
|
+
|
|
63
|
+
${_ref6 => {
|
|
64
|
+
let {
|
|
65
|
+
extraSmall
|
|
66
|
+
} = _ref6;
|
|
67
|
+
return extraSmall && 'height: 1rem; width: 1rem; font-size: 0.62rem;';
|
|
68
|
+
}}
|
|
69
|
+
|
|
70
|
+
${_ref7 => {
|
|
71
|
+
let {
|
|
72
|
+
small
|
|
73
|
+
} = _ref7;
|
|
74
|
+
return small && 'height: 1.5rem; width: 1.5rem;';
|
|
75
|
+
}}
|
|
76
|
+
|
|
77
|
+
${_ref8 => {
|
|
78
|
+
let {
|
|
79
|
+
large
|
|
80
|
+
} = _ref8;
|
|
81
|
+
return large && 'height: 3rem; width: 3rem; font-size: 1.75rem;';
|
|
82
|
+
}}
|
|
83
|
+
`;
|
|
84
|
+
const TriangleSvg = _styledComponents.default.svg`
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
height: 100%;
|
|
89
|
+
width: 100%;
|
|
90
|
+
`;
|
|
91
|
+
const TrianglePath = _styledComponents.default.path`
|
|
92
|
+
${fillColor}
|
|
93
|
+
`;
|
|
94
|
+
const Content = _styledComponents.default.span`
|
|
95
|
+
position: relative;
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
transform: translateY(0.2rem);
|
|
98
|
+
|
|
99
|
+
${_ref9 => {
|
|
100
|
+
let {
|
|
101
|
+
extraSmall
|
|
102
|
+
} = _ref9;
|
|
103
|
+
return extraSmall && 'transform: translateY(0.1rem);';
|
|
104
|
+
}}
|
|
105
|
+
|
|
106
|
+
${_ref10 => {
|
|
107
|
+
let {
|
|
108
|
+
small
|
|
109
|
+
} = _ref10;
|
|
110
|
+
return small && 'transform: translateY(0.15rem);';
|
|
111
|
+
}}
|
|
112
|
+
|
|
113
|
+
${_ref11 => {
|
|
114
|
+
let {
|
|
115
|
+
large
|
|
116
|
+
} = _ref11;
|
|
117
|
+
return large && 'transform: translateY(0.3rem);';
|
|
118
|
+
}}
|
|
119
|
+
`;
|
|
120
|
+
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';
|
|
121
|
+
const BadgeFillTriangle = /*#__PURE__*/(0, _react.forwardRef)((_ref12, ref) => {
|
|
122
|
+
let {
|
|
123
|
+
children,
|
|
124
|
+
primary = true,
|
|
125
|
+
...rest
|
|
126
|
+
} = _ref12;
|
|
127
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Wrapper, {
|
|
128
|
+
ref: ref,
|
|
129
|
+
primary: primary,
|
|
130
|
+
...rest,
|
|
131
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TriangleSvg, {
|
|
132
|
+
viewBox: "1.7 2 20.6 19",
|
|
133
|
+
"aria-hidden": "true",
|
|
134
|
+
focusable: "false",
|
|
135
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TrianglePath, {
|
|
136
|
+
primary: primary,
|
|
137
|
+
...rest,
|
|
138
|
+
d: TRIANGLE_PATH
|
|
139
|
+
})
|
|
140
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Content, {
|
|
141
|
+
...rest,
|
|
142
|
+
children: children
|
|
143
|
+
})]
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
BadgeFillTriangle.displayName = 'BadgeFillTriangle';
|
|
147
|
+
var _default = exports.default = BadgeFillTriangle;
|
|
@@ -0,0 +1,31 @@
|
|
|
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 BadgeWithText = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children
|
|
13
|
+
} = _ref;
|
|
14
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Wrapper, {
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const Wrapper = _styledComponents.default.span`
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
margin-bottom: var(--spacing-s);
|
|
22
|
+
|
|
23
|
+
:not(:last-child) {
|
|
24
|
+
margin-right: var(--spacing-s);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
> :first-child {
|
|
28
|
+
margin-right: var(--spacing-xs);
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
var _default = exports.default = BadgeWithText;
|
package/badge/index.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Badge", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Badge.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "BadgeDot", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _BadgeDot.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "BadgeFill", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _BadgeFill.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "BadgeFillTriangle", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _BadgeFillTriangle.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "BadgeWithText", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _BadgeWithText.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
var _Badge = _interopRequireDefault(require("./Badge"));
|
|
37
|
+
var _BadgeDot = _interopRequireDefault(require("./BadgeDot"));
|
|
38
|
+
var _BadgeFill = _interopRequireDefault(require("./BadgeFill"));
|
|
39
|
+
var _BadgeFillTriangle = _interopRequireDefault(require("./BadgeFillTriangle"));
|
|
40
|
+
var _BadgeWithText = _interopRequireDefault(require("./BadgeWithText"));
|
|
41
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingBarChart = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
theme,
|
|
12
|
+
percentage,
|
|
13
|
+
success,
|
|
14
|
+
warning,
|
|
15
|
+
danger
|
|
16
|
+
} = _ref;
|
|
17
|
+
const styles = {
|
|
18
|
+
chart: {
|
|
19
|
+
position: 'relative',
|
|
20
|
+
width: '100%',
|
|
21
|
+
height: 16,
|
|
22
|
+
borderRadius: 16,
|
|
23
|
+
backgroundColor: theme.bgColor3,
|
|
24
|
+
marginTop: 8
|
|
25
|
+
},
|
|
26
|
+
bar: {
|
|
27
|
+
position: 'absolute',
|
|
28
|
+
width: `${percentage}%`,
|
|
29
|
+
borderRadius: 16,
|
|
30
|
+
top: 0,
|
|
31
|
+
bottom: 0,
|
|
32
|
+
backgroundColor: theme.colorPrimary
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
if (success) {
|
|
36
|
+
styles.bar.backgroundColor = theme.colorSuccess;
|
|
37
|
+
}
|
|
38
|
+
if (warning) {
|
|
39
|
+
styles.bar.backgroundColor = theme.colorWarning;
|
|
40
|
+
}
|
|
41
|
+
if (danger) {
|
|
42
|
+
styles.bar.backgroundColor = theme.colorDanger;
|
|
43
|
+
}
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
45
|
+
style: styles.chart,
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
47
|
+
style: styles.bar
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var _default = exports.default = BillingBarChart;
|
package/billing/Grid.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BillingGrid = exports.BillingColumn = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingGrid = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
const styles = {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexWrap: 'wrap',
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
margin: '0 -8'
|
|
18
|
+
};
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
20
|
+
style: styles,
|
|
21
|
+
children: children
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.BillingGrid = BillingGrid;
|
|
25
|
+
const BillingColumn = _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
children,
|
|
28
|
+
flex
|
|
29
|
+
} = _ref2;
|
|
30
|
+
const styles = {
|
|
31
|
+
padding: '0 8',
|
|
32
|
+
width: '50%'
|
|
33
|
+
};
|
|
34
|
+
if (flex) {
|
|
35
|
+
styles.display = 'flex';
|
|
36
|
+
styles.alignContent = 'stretch';
|
|
37
|
+
styles.alignItems = 'stretch';
|
|
38
|
+
styles.flexDirection = 'column';
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
41
|
+
style: styles,
|
|
42
|
+
children: children
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
exports.BillingColumn = BillingColumn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingHeader2 = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
const styles = {
|
|
14
|
+
fontSize: 20,
|
|
15
|
+
wordBreak: 'break-word',
|
|
16
|
+
textAlign: 'center',
|
|
17
|
+
margin: 0,
|
|
18
|
+
marginBottom: 12
|
|
19
|
+
};
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.Text, {
|
|
21
|
+
style: styles,
|
|
22
|
+
children: children
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var _default = exports.default = BillingHeader2;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingHeader3 = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
fontWeightNormal,
|
|
13
|
+
noMarginBottom,
|
|
14
|
+
paddingBottom
|
|
15
|
+
} = _ref;
|
|
16
|
+
const styles = {
|
|
17
|
+
fontSize: 14,
|
|
18
|
+
lineHeight: 1.25,
|
|
19
|
+
wordBreak: 'break-word',
|
|
20
|
+
fontWeight: 'bold',
|
|
21
|
+
marginBottom: 8
|
|
22
|
+
};
|
|
23
|
+
if (fontWeightNormal) {
|
|
24
|
+
styles.fontWeight = 'normal';
|
|
25
|
+
}
|
|
26
|
+
if (noMarginBottom) {
|
|
27
|
+
styles.marginBottom = 0;
|
|
28
|
+
}
|
|
29
|
+
if (paddingBottom) {
|
|
30
|
+
styles.paddingBottom = 8;
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.Text, {
|
|
33
|
+
style: styles,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var _default = exports.default = BillingHeader3;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingParagraph = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
marginRight,
|
|
13
|
+
justifyContentBetween
|
|
14
|
+
} = _ref;
|
|
15
|
+
const styles = {
|
|
16
|
+
margin: 0,
|
|
17
|
+
display: 'flex',
|
|
18
|
+
flexDirection: 'row',
|
|
19
|
+
wordBreak: 'break-word',
|
|
20
|
+
overflowWrap: 'break-word'
|
|
21
|
+
};
|
|
22
|
+
if (marginRight) {
|
|
23
|
+
styles.marginRight = 16;
|
|
24
|
+
}
|
|
25
|
+
if (justifyContentBetween) {
|
|
26
|
+
styles.justifyContent = 'space-between';
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
29
|
+
style: styles,
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
var _default = exports.default = BillingParagraph;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingParagraphGroup = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
const styles = {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'row'
|
|
16
|
+
};
|
|
17
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
18
|
+
style: styles,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
var _default = exports.default = BillingParagraphGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingParagraphText = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
fontWeightBold
|
|
13
|
+
} = _ref;
|
|
14
|
+
const styles = {
|
|
15
|
+
fontSize: 12,
|
|
16
|
+
lineHeight: 1.5
|
|
17
|
+
};
|
|
18
|
+
if (fontWeightBold) {
|
|
19
|
+
styles.fontWeight = 'bold';
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.Text, {
|
|
22
|
+
style: styles,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = BillingParagraphText;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingSection = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
theme,
|
|
13
|
+
backgroundReverse,
|
|
14
|
+
noPadding,
|
|
15
|
+
noMarginBottom,
|
|
16
|
+
paddingS,
|
|
17
|
+
marginBottomS,
|
|
18
|
+
flexGrow
|
|
19
|
+
} = _ref;
|
|
20
|
+
const styles = {
|
|
21
|
+
backgroundColor: theme.bgColor1,
|
|
22
|
+
borderRadius: 16,
|
|
23
|
+
color: theme.fontOnBg,
|
|
24
|
+
padding: 12,
|
|
25
|
+
marginBottom: 16
|
|
26
|
+
};
|
|
27
|
+
if (backgroundReverse) {
|
|
28
|
+
styles.backgroundColor = theme.bgColor2;
|
|
29
|
+
}
|
|
30
|
+
if (noPadding) {
|
|
31
|
+
styles.padding = 0;
|
|
32
|
+
}
|
|
33
|
+
if (noMarginBottom) {
|
|
34
|
+
styles.marginBottom = 0;
|
|
35
|
+
}
|
|
36
|
+
if (paddingS) {
|
|
37
|
+
styles.padding = 8;
|
|
38
|
+
}
|
|
39
|
+
if (marginBottomS) {
|
|
40
|
+
styles.marginBottom = 12;
|
|
41
|
+
}
|
|
42
|
+
if (flexGrow) {
|
|
43
|
+
styles.flexGrow = 1;
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
46
|
+
style: styles,
|
|
47
|
+
children: children
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var _default = exports.default = BillingSection;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingSectionBody = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children
|
|
12
|
+
} = _ref;
|
|
13
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
14
|
+
children: children
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
var _default = exports.default = BillingSectionBody;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _renderer = require("@react-pdf/renderer");
|
|
8
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const BillingSectionHeader = _ref => {
|
|
10
|
+
let {
|
|
11
|
+
children,
|
|
12
|
+
inline
|
|
13
|
+
} = _ref;
|
|
14
|
+
const styles = {};
|
|
15
|
+
if (inline) {
|
|
16
|
+
styles.display = 'flex';
|
|
17
|
+
styles.justifyContent = 'space-between';
|
|
18
|
+
styles.flexDirection = 'row';
|
|
19
|
+
styles.alignItems = 'center';
|
|
20
|
+
}
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
22
|
+
style: styles,
|
|
23
|
+
children: children
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = BillingSectionHeader;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { Document, Page, PDFViewer, StyleSheet } from '@react-pdf/renderer';
|
|
3
|
+
import { ThemeContext } from 'styled-components';
|
|
4
|
+
import BillingBarChart from '../BarChart';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'billing/BillingBarChart',
|
|
8
|
+
component: BillingBarChart,
|
|
9
|
+
argTypes: {
|
|
10
|
+
theme: { description: 'Provide theme styles for components to use' },
|
|
11
|
+
percentage: {
|
|
12
|
+
description: 'Affects the width of the bar, the maximum value is 100',
|
|
13
|
+
},
|
|
14
|
+
success: { description: 'Affects the backgroundColor of the bar' },
|
|
15
|
+
warning: { description: 'Affects the backgroundColor of the bar' },
|
|
16
|
+
danger: { description: 'Affects the backgroundColor of the bar' },
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const Default = (args) => {
|
|
21
|
+
const theme = useContext(ThemeContext);
|
|
22
|
+
|
|
23
|
+
const styles = StyleSheet.create({
|
|
24
|
+
page: {
|
|
25
|
+
backgroundColor: theme.bgColor2,
|
|
26
|
+
padding: 8,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<PDFViewer showToolbar={false}>
|
|
32
|
+
<Document>
|
|
33
|
+
<Page size='A4' style={styles.page}>
|
|
34
|
+
<BillingBarChart {...args} theme={theme} marginTop />
|
|
35
|
+
</Page>
|
|
36
|
+
</Document>
|
|
37
|
+
</PDFViewer>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
Default.args = {
|
|
42
|
+
success: true,
|
|
43
|
+
warning: false,
|
|
44
|
+
danger: false,
|
|
45
|
+
percentage: 100,
|
|
46
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PDFViewer,
|
|
3
|
+
Document,
|
|
4
|
+
Page,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Text,
|
|
7
|
+
Font,
|
|
8
|
+
} from '@react-pdf/renderer';
|
|
9
|
+
import { useContext } from 'react';
|
|
10
|
+
import { ThemeContext } from 'styled-components';
|
|
11
|
+
import { BillingGrid, BillingColumn } from '../Grid';
|
|
12
|
+
import NanumGothicBold from '../../assets/font/nanumGothic/NanumGothic-Bold.ttf';
|
|
13
|
+
import NanumGothicExtraBold from '../../assets/font/nanumGothic/NanumGothic-ExtraBold.ttf';
|
|
14
|
+
import NanumGothicRegular from '../../assets/font/nanumGothic/NanumGothic-Regular.ttf';
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
title: 'billing/BillingGrid',
|
|
18
|
+
component: BillingGrid,
|
|
19
|
+
subComponent: BillingColumn,
|
|
20
|
+
argTypes: {
|
|
21
|
+
children: { description: 'A BillingColumn component must be passed in.' },
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const Default = (args) => {
|
|
26
|
+
const theme = useContext(ThemeContext);
|
|
27
|
+
Font.register({
|
|
28
|
+
family: 'Nanum Gothic',
|
|
29
|
+
fonts: [
|
|
30
|
+
{ src: NanumGothicBold },
|
|
31
|
+
{ src: NanumGothicExtraBold },
|
|
32
|
+
{ src: NanumGothicRegular },
|
|
33
|
+
],
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
page: {
|
|
38
|
+
fontFamily: 'Nanum Gothic',
|
|
39
|
+
color: '#ffffff',
|
|
40
|
+
backgroundColor: theme.bgColor2,
|
|
41
|
+
padding: 8,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return (
|
|
45
|
+
<PDFViewer style={{ width: '100%' }}>
|
|
46
|
+
<Document>
|
|
47
|
+
<Page size='A4' style={styles.page}>
|
|
48
|
+
<BillingGrid {...args}>
|
|
49
|
+
<BillingColumn>
|
|
50
|
+
<Text>children content</Text>
|
|
51
|
+
</BillingColumn>
|
|
52
|
+
</BillingGrid>
|
|
53
|
+
</Page>
|
|
54
|
+
</Document>
|
|
55
|
+
</PDFViewer>
|
|
56
|
+
);
|
|
57
|
+
};
|