@cashub/ui 0.4.2 → 0.5.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/TabContext.js +12 -0
- package/Tab/TabList.js +47 -0
- package/Tab/TabPanel.js +85 -0
- package/Tab/TabTab.js +63 -0
- package/Tab/index.js +24 -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.png +0 -0
- package/assets/icons/map_icon1.png +0 -0
- package/assets/icons/map_icon4.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/logo-cashub.png +0 -0
- package/assets/images/map.png +0 -0
- package/assets/images/qrcode.png +0 -0
- package/billing/BarChart.js +58 -0
- package/billing/Grid.js +49 -0
- package/billing/Header2.js +28 -0
- package/billing/Header3.js +44 -0
- package/billing/Paragraph.js +39 -0
- package/billing/ParagraphGroup.js +25 -0
- package/billing/ParagraphText.js +31 -0
- package/billing/Section.js +60 -0
- package/billing/SectionBody.js +20 -0
- package/billing/SectionHeader.js +31 -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/callout/Callout.js +36 -0
- package/callout/index.js +15 -0
- package/chart/BarChart.js +130 -0
- package/chart/DoughnutChart.js +59 -0
- package/chart/LineChart.js +121 -0
- package/chart/SingleBarChart.js +31 -0
- package/chart/index.js +39 -0
- package/container/FlexContainer.js +25 -0
- package/container/index.js +15 -0
- package/datetimePicker/Accordion.js +342 -0
- package/datetimePicker/CustomTimeInput.js +77 -0
- package/datetimePicker/DatePicker.js +401 -0
- package/datetimePicker/DatePickerV2.js +432 -0
- package/datetimePicker/DateTimePickerContext.js +12 -0
- package/datetimePicker/DatetimePicker.js +80 -0
- package/datetimePicker/DatetimePickerV2.js +438 -0
- package/datetimePicker/TimeInput.js +37 -0
- package/datetimePicker/TimePicker.js +324 -0
- package/datetimePicker/accordion/Month.js +188 -0
- package/datetimePicker/accordion/Year.js +247 -0
- package/datetimePicker/hooks/index.js +31 -0
- package/datetimePicker/hooks/useChangeNumber.js +55 -0
- package/datetimePicker/hooks/useDecrease.js +54 -0
- package/datetimePicker/hooks/useIncrease.js +54 -0
- package/datetimePicker/index.js +47 -0
- package/datetimePicker/provider/constant.js +44 -0
- package/datetimePicker/utils/pad.js +17 -0
- package/descriptionList/DescriptionDetail.js +22 -0
- package/descriptionList/DescriptionList.js +22 -0
- package/descriptionList/DescriptionTerm.js +19 -0
- package/descriptionList/index.js +31 -0
- package/divider/Divider.js +22 -0
- package/divider/index.js +15 -0
- package/dropdown/Dropdown.js +92 -0
- package/dropdown/DropdownButtonOption.js +19 -0
- package/dropdown/DropdownContent.js +94 -0
- package/dropdown/DropdownContext.js +12 -0
- package/dropdown/DropdownDivOption.js +19 -0
- package/dropdown/DropdownItem.js +32 -0
- package/dropdown/DropdownLinkOption.js +20 -0
- package/dropdown/DropdownToggle.js +58 -0
- package/dropdown/index.js +53 -0
- package/geolocation/MapInteractor.js +41 -0
- package/geolocation/MapSearchBoxControl.js +100 -0
- package/geolocation/ReverseGeolocation.js +160 -0
- package/geolocation/index.js +23 -0
- package/grid/Column.js +33 -0
- package/grid/Grid.js +28 -0
- package/grid/index.js +23 -0
- package/heading/Heading1.js +22 -0
- package/heading/Heading2.js +25 -0
- package/heading/Heading3.js +4 -4
- package/heading/index.js +31 -0
- package/icon/IconFigure.js +36 -0
- package/icon/index.js +15 -0
- package/iconbox/ApplicationIconBox.js +51 -0
- package/iconbox/IconBox.js +56 -0
- package/iconbox/IconBoxFigure.js +37 -0
- package/iconbox/IconBoxImage.js +32 -0
- package/iconbox/IconBoxV2.js +42 -0
- package/iconbox/index.js +31 -0
- package/index.js +377 -0
- package/jsoneditor/JsonEditor.js +53 -0
- package/jsoneditor/index.js +15 -0
- package/layout/Backdrop.js +25 -0
- package/layout/Container.js +34 -0
- package/layout/Footer.js +32 -0
- package/layout/Logo.js +34 -0
- package/layout/MenuIcon.js +43 -0
- package/link/LinkSpan.js +57 -0
- package/link/index.js +15 -0
- package/map/CustomLeafletMapContainer.js +23 -0
- package/map/LeafletMap.js +224 -0
- package/map/index.js +23 -0
- package/module/geolocation/api.js +51 -0
- package/module/message/index.js +59 -0
- package/package.json +16 -1
- package/paginate/Paginate.js +110 -0
- package/paginate/index.js +15 -0
- package/popover/Popover.js +122 -0
- package/popover/index.js +15 -0
- package/qrcode/QRCode.js +57 -0
- package/qrcode/QRCodeContainter.js +34 -0
- package/qrcode/index.js +23 -0
- package/ribbon/Ribbon.js +28 -0
- package/ribbon/index.js +15 -0
- package/section/Section.js +64 -0
- package/section/SectionBody.js +38 -0
- package/section/SectionHeader.js +42 -0
- package/section/SectionToolbar.js +22 -0
- package/section/index.js +50 -0
- package/select/ListBox.js +26 -0
- package/select/Option.js +28 -0
- package/select/OptionGroup.js +20 -0
- package/select/Options.js +25 -0
- package/select/SearchBox.js +52 -0
- package/select/Select.js +625 -0
- package/select/SelectedMultiple.js +34 -0
- package/select/SelectedSingle.js +20 -0
- package/select/index.js +15 -0
- package/services/api/index.js +73 -0
- package/styles/header.style.js +11 -0
- package/styles/sidebar.style.js +18 -0
- package/styles/theme/dark.theme.js +95 -0
- package/styles/theme/index.js +16 -0
- package/table/ImageBox.js +39 -0
- package/table/Logo.js +40 -0
- package/table/PermissionTable.js +42 -0
- package/table/Table.js +377 -0
- package/table/TableFooter.js +19 -0
- package/table/TableFooterInfo.js +19 -0
- package/table/TableFooterPager.js +19 -0
- package/table/TableHeadCell.js +39 -0
- package/table/TableSort.js +34 -0
- package/table/hooks/index.js +31 -0
- package/table/hooks/useLimitChange.js +34 -0
- package/table/hooks/usePageChange.js +33 -0
- package/table/hooks/useSortChange.js +35 -0
- package/table/index.js +31 -0
- package/tagify/Tags.js +55 -0
- package/tagify/index.js +15 -0
- package/text/Paragraph.js +34 -0
- package/text/index.js +15 -0
- package/timeline/Timeline.js +51 -0
- package/timeline/index.js +15 -0
- package/toast/CustomToastContainer.js +20 -0
- package/toast/index.js +23 -0
- package/tooltip/Tooltip.js +154 -0
- package/tooltip/index.js +15 -0
- package/utils/array/generateRange.js +19 -0
- package/utils/chart/customTooltip.js +89 -0
- package/utils/chart/padEmptyChartBar.js +48 -0
- package/utils/format/datetimeFormat.js +71 -0
- package/utils/format/formatDate.js +46 -0
- package/utils/hooks/useCustomPopper.js +50 -0
- package/utils/hooks/useForkRef.js +28 -0
- package/utils/hooks/usePagination.js +86 -0
- package/utils/react/setRef.js +17 -0
- package/utils/regex/check.js +13 -0
- package/wizard/Wizard.js +217 -0
- package/wizard/index.js +15 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _renderer = require("@react-pdf/renderer");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
var BillingSectionHeader = function BillingSectionHeader(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
inline = _ref.inline;
|
|
15
|
+
var styles = {};
|
|
16
|
+
|
|
17
|
+
if (inline) {
|
|
18
|
+
styles.display = 'flex';
|
|
19
|
+
styles.justifyContent = 'space-between';
|
|
20
|
+
styles.flexDirection = 'row';
|
|
21
|
+
styles.alignItems = 'center';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_renderer.View, {
|
|
25
|
+
style: styles,
|
|
26
|
+
children: children
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = BillingSectionHeader;
|
|
31
|
+
exports.default = _default;
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Document,
|
|
3
|
+
Page,
|
|
4
|
+
PDFViewer,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Font,
|
|
8
|
+
} from "@react-pdf/renderer";
|
|
9
|
+
import BillingHeader2 from "../Header2";
|
|
10
|
+
import { useContext } from "react";
|
|
11
|
+
import { ThemeContext } from "styled-components";
|
|
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/header2",
|
|
18
|
+
component: BillingHeader2,
|
|
19
|
+
argTypes: {
|
|
20
|
+
children: {
|
|
21
|
+
description:
|
|
22
|
+
"For displaying text. Supports nesting of other Text or Link components to create inline styling.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Default = (args) => {
|
|
28
|
+
const theme = useContext(ThemeContext);
|
|
29
|
+
Font.register({
|
|
30
|
+
family: "Nanum Gothic",
|
|
31
|
+
fonts: [
|
|
32
|
+
{ src: NanumGothicBold },
|
|
33
|
+
{ src: NanumGothicExtraBold },
|
|
34
|
+
{ src: NanumGothicRegular },
|
|
35
|
+
],
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const styles = StyleSheet.create({
|
|
39
|
+
page: {
|
|
40
|
+
fontFamily: "Nanum Gothic",
|
|
41
|
+
color: "#ffffff",
|
|
42
|
+
backgroundColor: theme.bgColor2,
|
|
43
|
+
padding: 8,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<PDFViewer style={{ width: "100%" }}>
|
|
49
|
+
<Document>
|
|
50
|
+
<Page size="A4" style={styles.page}>
|
|
51
|
+
<View>
|
|
52
|
+
<BillingHeader2 {...args}></BillingHeader2>
|
|
53
|
+
</View>
|
|
54
|
+
</Page>
|
|
55
|
+
</Document>
|
|
56
|
+
</PDFViewer>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
Default.args = {
|
|
61
|
+
children: "BillingHeader2 content",
|
|
62
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Document,
|
|
3
|
+
Page,
|
|
4
|
+
PDFViewer,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Font,
|
|
8
|
+
} from "@react-pdf/renderer";
|
|
9
|
+
import BillingHeader3 from "../Header3";
|
|
10
|
+
import { useContext } from "react";
|
|
11
|
+
import { ThemeContext } from "styled-components";
|
|
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
|
+
export default {
|
|
16
|
+
title: "billing/header3",
|
|
17
|
+
component: BillingHeader3,
|
|
18
|
+
argTypes: {
|
|
19
|
+
children: {
|
|
20
|
+
description:
|
|
21
|
+
"For displaying text. Supports nesting of other Text or Link components to create inline styling.",
|
|
22
|
+
},
|
|
23
|
+
fontWeightNormal: { description: "Style variant" },
|
|
24
|
+
noMarginBottom: { description: "Style variant" },
|
|
25
|
+
paddingBottom: { description: "Style variant" },
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Default = (args) => {
|
|
30
|
+
const theme = useContext(ThemeContext);
|
|
31
|
+
Font.register({
|
|
32
|
+
family: "Nanum Gothic",
|
|
33
|
+
fonts: [
|
|
34
|
+
{ src: NanumGothicBold },
|
|
35
|
+
{ src: NanumGothicExtraBold },
|
|
36
|
+
{ src: NanumGothicRegular },
|
|
37
|
+
],
|
|
38
|
+
});
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
page: {
|
|
41
|
+
fontFamily: "Nanum Gothic",
|
|
42
|
+
color: "#ffffff",
|
|
43
|
+
backgroundColor: theme.bgColor2,
|
|
44
|
+
padding: 8,
|
|
45
|
+
},
|
|
46
|
+
view: {
|
|
47
|
+
border: "1px solid #ffffff",
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<PDFViewer style={{ width: "100%" }}>
|
|
53
|
+
<Document>
|
|
54
|
+
<Page size="A4" style={styles.page}>
|
|
55
|
+
<View style={styles.view}>
|
|
56
|
+
<BillingHeader3 {...args}></BillingHeader3>
|
|
57
|
+
</View>
|
|
58
|
+
</Page>
|
|
59
|
+
</Document>
|
|
60
|
+
</PDFViewer>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
Default.args = {
|
|
65
|
+
children: "BillingHeader3 content",
|
|
66
|
+
fontWeightNormal: false,
|
|
67
|
+
noMarginBottom: false,
|
|
68
|
+
paddingBottom: false,
|
|
69
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Document,
|
|
3
|
+
Page,
|
|
4
|
+
PDFViewer,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Font,
|
|
8
|
+
} from '@react-pdf/renderer';
|
|
9
|
+
import { useContext } from 'react';
|
|
10
|
+
import { ThemeContext } from 'styled-components';
|
|
11
|
+
import BillingParagraphGroup from '../ParagraphGroup';
|
|
12
|
+
import BillingParagraph from '../Paragraph';
|
|
13
|
+
import BillingParagraphText from '../ParagraphText';
|
|
14
|
+
import NanumGothicBold from '../../assets/font/nanumGothic/NanumGothic-Bold.ttf';
|
|
15
|
+
import NanumGothicExtraBold from '../../assets/font/nanumGothic/NanumGothic-ExtraBold.ttf';
|
|
16
|
+
import NanumGothicRegular from '../../assets/font/nanumGothic/NanumGothic-Regular.ttf';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: 'billing/BillingParagraph',
|
|
20
|
+
component: BillingParagraph,
|
|
21
|
+
subComponent: BillingParagraphText,
|
|
22
|
+
argTypes: {
|
|
23
|
+
children: {
|
|
24
|
+
description: 'A BillingParagraphText component must be passed in.',
|
|
25
|
+
},
|
|
26
|
+
marginRight: { description: 'Style variant' },
|
|
27
|
+
justifyContentBetween: { description: 'Style variant' },
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const Default = (args) => {
|
|
32
|
+
const theme = useContext(ThemeContext);
|
|
33
|
+
Font.register({
|
|
34
|
+
family: 'Nanum Gothic',
|
|
35
|
+
fonts: [
|
|
36
|
+
{ src: NanumGothicBold },
|
|
37
|
+
{ src: NanumGothicExtraBold },
|
|
38
|
+
{ src: NanumGothicRegular },
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
page: {
|
|
44
|
+
fontFamily: 'Nanum Gothic',
|
|
45
|
+
color: '#ffffff',
|
|
46
|
+
backgroundColor: theme.bgColor2,
|
|
47
|
+
padding: 8,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<PDFViewer style={{ width: '100%' }}>
|
|
53
|
+
<Document>
|
|
54
|
+
<Page size='A4' style={styles.page}>
|
|
55
|
+
<View>
|
|
56
|
+
<BillingParagraphGroup>
|
|
57
|
+
<BillingParagraph {...args}>
|
|
58
|
+
<BillingParagraphText>Total 01: </BillingParagraphText>
|
|
59
|
+
<BillingParagraphText>10000</BillingParagraphText>
|
|
60
|
+
</BillingParagraph>
|
|
61
|
+
<BillingParagraph {...args}>
|
|
62
|
+
<BillingParagraphText>Available 01: </BillingParagraphText>
|
|
63
|
+
<BillingParagraphText>2000</BillingParagraphText>
|
|
64
|
+
</BillingParagraph>
|
|
65
|
+
</BillingParagraphGroup>
|
|
66
|
+
<BillingParagraph {...args}>
|
|
67
|
+
<BillingParagraphText>Total 02: </BillingParagraphText>
|
|
68
|
+
<BillingParagraphText>10000</BillingParagraphText>
|
|
69
|
+
</BillingParagraph>
|
|
70
|
+
<BillingParagraph {...args}>
|
|
71
|
+
<BillingParagraphText>Available 02: </BillingParagraphText>
|
|
72
|
+
<BillingParagraphText>2000</BillingParagraphText>
|
|
73
|
+
</BillingParagraph>
|
|
74
|
+
</View>
|
|
75
|
+
</Page>
|
|
76
|
+
</Document>
|
|
77
|
+
</PDFViewer>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
Default.args = {
|
|
82
|
+
marginRight: true,
|
|
83
|
+
justifyContentBetween: false,
|
|
84
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Document,
|
|
3
|
+
Page,
|
|
4
|
+
PDFViewer,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Font,
|
|
8
|
+
} from '@react-pdf/renderer';
|
|
9
|
+
import { useContext } from 'react';
|
|
10
|
+
import { ThemeContext } from 'styled-components';
|
|
11
|
+
import BillingParagraph from '../Paragraph';
|
|
12
|
+
import BillingParagraphGroup from '../ParagraphGroup';
|
|
13
|
+
import BillingParagraphText from '../ParagraphText';
|
|
14
|
+
import NanumGothicBold from '../../assets/font/nanumGothic/NanumGothic-Bold.ttf';
|
|
15
|
+
import NanumGothicExtraBold from '../../assets/font/nanumGothic/NanumGothic-ExtraBold.ttf';
|
|
16
|
+
import NanumGothicRegular from '../../assets/font/nanumGothic/NanumGothic-Regular.ttf';
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
title: 'billing/BillingParagraphGroup',
|
|
20
|
+
component: BillingParagraphGroup,
|
|
21
|
+
subComponent: { BillingParagraph },
|
|
22
|
+
argTypes: {
|
|
23
|
+
children: {
|
|
24
|
+
description: 'A BillingParagraph component must be passed in.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Default = (args) => {
|
|
30
|
+
const theme = useContext(ThemeContext);
|
|
31
|
+
Font.register({
|
|
32
|
+
family: 'Nanum Gothic',
|
|
33
|
+
fonts: [
|
|
34
|
+
{ src: NanumGothicBold },
|
|
35
|
+
{ src: NanumGothicExtraBold },
|
|
36
|
+
{ src: NanumGothicRegular },
|
|
37
|
+
],
|
|
38
|
+
});
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
page: {
|
|
41
|
+
fontFamily: 'Nanum Gothic',
|
|
42
|
+
color: '#ffffff',
|
|
43
|
+
backgroundColor: theme.bgColor2,
|
|
44
|
+
padding: 8,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<PDFViewer style={{ width: '100%' }}>
|
|
50
|
+
<Document>
|
|
51
|
+
<Page size='A4' style={styles.page}>
|
|
52
|
+
<View>
|
|
53
|
+
<BillingParagraphGroup {...args}>
|
|
54
|
+
<BillingParagraph marginRight>
|
|
55
|
+
<BillingParagraphText>Total: </BillingParagraphText>
|
|
56
|
+
<BillingParagraphText>10000</BillingParagraphText>
|
|
57
|
+
</BillingParagraph>
|
|
58
|
+
<BillingParagraph marginRight>
|
|
59
|
+
<BillingParagraphText>Total 2: </BillingParagraphText>
|
|
60
|
+
<BillingParagraphText>20000</BillingParagraphText>
|
|
61
|
+
</BillingParagraph>
|
|
62
|
+
</BillingParagraphGroup>
|
|
63
|
+
</View>
|
|
64
|
+
</Page>
|
|
65
|
+
</Document>
|
|
66
|
+
</PDFViewer>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Document,
|
|
3
|
+
Page,
|
|
4
|
+
PDFViewer,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
View,
|
|
7
|
+
Font,
|
|
8
|
+
} from '@react-pdf/renderer';
|
|
9
|
+
import { useContext } from 'react';
|
|
10
|
+
import { ThemeContext } from 'styled-components';
|
|
11
|
+
import BillingParagraphText from '../ParagraphText';
|
|
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/BillingParagraphText',
|
|
18
|
+
component: BillingParagraphText,
|
|
19
|
+
argTypes: {
|
|
20
|
+
children: {
|
|
21
|
+
description:
|
|
22
|
+
'For displaying text. Supports nesting of other Text or Link components to create inline styling.',
|
|
23
|
+
},
|
|
24
|
+
fontWeightBold: { description: 'Style variant' },
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const Default = (args) => {
|
|
29
|
+
const theme = useContext(ThemeContext);
|
|
30
|
+
Font.register({
|
|
31
|
+
family: 'Nanum Gothic',
|
|
32
|
+
fonts: [
|
|
33
|
+
{ src: NanumGothicBold },
|
|
34
|
+
{ src: NanumGothicExtraBold },
|
|
35
|
+
{ src: NanumGothicRegular },
|
|
36
|
+
],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
page: {
|
|
41
|
+
fontFamily: 'Nanum Gothic',
|
|
42
|
+
color: '#ffffff',
|
|
43
|
+
backgroundColor: theme.bgColor2,
|
|
44
|
+
padding: 8,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<PDFViewer style={{ width: '100%' }}>
|
|
50
|
+
<Document>
|
|
51
|
+
<Page size='A4' style={styles.page}>
|
|
52
|
+
<View>
|
|
53
|
+
<BillingParagraphText {...args}></BillingParagraphText>
|
|
54
|
+
</View>
|
|
55
|
+
</Page>
|
|
56
|
+
</Document>
|
|
57
|
+
</PDFViewer>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
Default.args = {
|
|
62
|
+
children: 'BillingParagraphText content',
|
|
63
|
+
fontWeightBold: false,
|
|
64
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { ThemeContext } from 'styled-components';
|
|
3
|
+
import {
|
|
4
|
+
PDFViewer,
|
|
5
|
+
Document,
|
|
6
|
+
Page,
|
|
7
|
+
View,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
Font,
|
|
10
|
+
} from '@react-pdf/renderer';
|
|
11
|
+
import BillingSection from '../Section';
|
|
12
|
+
import BillingSectionHeader from '../SectionHeader';
|
|
13
|
+
import BillingSectionBody from '../SectionBody';
|
|
14
|
+
import BillingHeader3 from '../Header3';
|
|
15
|
+
import BillingParagraph from '../Paragraph';
|
|
16
|
+
import BillingParagraphGroup from '../ParagraphGroup';
|
|
17
|
+
import BillingParagraphText from '../ParagraphText';
|
|
18
|
+
import NanumGothicBold from '../../assets/font/nanumGothic/NanumGothic-Bold.ttf';
|
|
19
|
+
import NanumGothicExtraBold from '../../assets/font/nanumGothic/NanumGothic-ExtraBold.ttf';
|
|
20
|
+
import NanumGothicRegular from '../../assets/font/nanumGothic/NanumGothic-Regular.ttf';
|
|
21
|
+
|
|
22
|
+
export default {
|
|
23
|
+
title: 'billing/BillingSection',
|
|
24
|
+
component: BillingSection,
|
|
25
|
+
subComponent: {
|
|
26
|
+
BillingSectionHeader,
|
|
27
|
+
BillingSectionBody,
|
|
28
|
+
},
|
|
29
|
+
argTypes: {
|
|
30
|
+
children: {
|
|
31
|
+
description:
|
|
32
|
+
'A BillingSectionHeader and BillingSectionBody component must be passed in.',
|
|
33
|
+
},
|
|
34
|
+
theme: { description: 'Provide theme styles for components to use' },
|
|
35
|
+
backgroundReverse: { description: 'Style variant' },
|
|
36
|
+
noPadding: { description: 'Style variant' },
|
|
37
|
+
noMarginBottom: { description: 'Style variant' },
|
|
38
|
+
paddingS: { description: 'Style variant' },
|
|
39
|
+
marginBottomS: { description: 'Style variant' },
|
|
40
|
+
flexGrow: { description: 'Style variant' },
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const Default = (args) => {
|
|
45
|
+
const theme = useContext(ThemeContext);
|
|
46
|
+
Font.register({
|
|
47
|
+
family: 'Nanum Gothic',
|
|
48
|
+
fonts: [
|
|
49
|
+
{ src: NanumGothicBold },
|
|
50
|
+
{ src: NanumGothicExtraBold },
|
|
51
|
+
{ src: NanumGothicRegular },
|
|
52
|
+
],
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
page: {
|
|
57
|
+
fontFamily: 'Nanum Gothic',
|
|
58
|
+
color: '#ffffff',
|
|
59
|
+
backgroundColor: theme.bgColor2,
|
|
60
|
+
padding: 8,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<PDFViewer showToolbar={false} style={{ width: '100%', height: '500px' }}>
|
|
66
|
+
<Document>
|
|
67
|
+
<Page size='A4' style={styles.page}>
|
|
68
|
+
<View>
|
|
69
|
+
<BillingSection {...args} theme={theme}>
|
|
70
|
+
<BillingSectionHeader>
|
|
71
|
+
<BillingHeader3>BillingHeader3</BillingHeader3>
|
|
72
|
+
</BillingSectionHeader>
|
|
73
|
+
<BillingSectionBody>
|
|
74
|
+
<BillingParagraphGroup>
|
|
75
|
+
<BillingParagraph>
|
|
76
|
+
<BillingParagraphText>Used:</BillingParagraphText>
|
|
77
|
+
<BillingParagraphText fontWeightBold>
|
|
78
|
+
200
|
|
79
|
+
</BillingParagraphText>
|
|
80
|
+
</BillingParagraph>
|
|
81
|
+
</BillingParagraphGroup>
|
|
82
|
+
</BillingSectionBody>
|
|
83
|
+
</BillingSection>
|
|
84
|
+
</View>
|
|
85
|
+
<View>
|
|
86
|
+
<BillingSection {...args} theme={theme}>
|
|
87
|
+
<BillingSectionHeader>
|
|
88
|
+
<BillingHeader3>BillingHeader3</BillingHeader3>
|
|
89
|
+
</BillingSectionHeader>
|
|
90
|
+
<BillingSectionBody>
|
|
91
|
+
<BillingParagraphGroup>
|
|
92
|
+
<BillingParagraph>
|
|
93
|
+
<BillingParagraphText>Used:</BillingParagraphText>
|
|
94
|
+
<BillingParagraphText fontWeightBold>
|
|
95
|
+
200
|
|
96
|
+
</BillingParagraphText>
|
|
97
|
+
</BillingParagraph>
|
|
98
|
+
</BillingParagraphGroup>
|
|
99
|
+
</BillingSectionBody>
|
|
100
|
+
</BillingSection>
|
|
101
|
+
</View>
|
|
102
|
+
</Page>
|
|
103
|
+
</Document>
|
|
104
|
+
</PDFViewer>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
Default.args = {
|
|
109
|
+
backgroundReverse: false,
|
|
110
|
+
noPadding: false,
|
|
111
|
+
noMarginBottom: false,
|
|
112
|
+
paddingS: false,
|
|
113
|
+
marginBottomS: false,
|
|
114
|
+
flexGrow: false,
|
|
115
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { ThemeContext } from 'styled-components';
|
|
3
|
+
import {
|
|
4
|
+
PDFViewer,
|
|
5
|
+
Document,
|
|
6
|
+
Page,
|
|
7
|
+
View,
|
|
8
|
+
StyleSheet,
|
|
9
|
+
Text,
|
|
10
|
+
Font,
|
|
11
|
+
} from '@react-pdf/renderer';
|
|
12
|
+
import BillingSectionBody from '../SectionBody';
|
|
13
|
+
import NanumGothicBold from '../../assets/font/nanumGothic/NanumGothic-Bold.ttf';
|
|
14
|
+
import NanumGothicExtraBold from '../../assets/font/nanumGothic/NanumGothic-ExtraBold.ttf';
|
|
15
|
+
import NanumGothicRegular from '../../assets/font/nanumGothic/NanumGothic-Regular.ttf';
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
title: 'billing/BillingSectionBody',
|
|
19
|
+
component: BillingSectionBody,
|
|
20
|
+
argTypes: {
|
|
21
|
+
children: {
|
|
22
|
+
description: 'BillingSectionBody content can have 0 to many children.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const Default = (args) => {
|
|
28
|
+
const theme = useContext(ThemeContext);
|
|
29
|
+
Font.register({
|
|
30
|
+
family: 'Nanum Gothic',
|
|
31
|
+
fonts: [
|
|
32
|
+
{ src: NanumGothicBold },
|
|
33
|
+
{ src: NanumGothicExtraBold },
|
|
34
|
+
{ src: NanumGothicRegular },
|
|
35
|
+
],
|
|
36
|
+
});
|
|
37
|
+
const styles = StyleSheet.create({
|
|
38
|
+
page: {
|
|
39
|
+
family: 'Nanum Gothic',
|
|
40
|
+
color: '#ffffff',
|
|
41
|
+
backgroundColor: theme.bgColor2,
|
|
42
|
+
padding: 8,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<PDFViewer style={{ width: '100%' }}>
|
|
48
|
+
<Document>
|
|
49
|
+
<Page size='A4' style={styles.page}>
|
|
50
|
+
<View>
|
|
51
|
+
<BillingSectionBody {...args}>
|
|
52
|
+
<View>
|
|
53
|
+
<Text>text1</Text>
|
|
54
|
+
</View>
|
|
55
|
+
<Text>text2</Text>
|
|
56
|
+
</BillingSectionBody>
|
|
57
|
+
</View>
|
|
58
|
+
</Page>
|
|
59
|
+
</Document>
|
|
60
|
+
</PDFViewer>
|
|
61
|
+
);
|
|
62
|
+
};
|