@cashub/ui-elv 1.0.7 → 1.0.8

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 (41) hide show
  1. package/package.json +6 -7
  2. package/billing/BarChart.js +0 -51
  3. package/billing/Grid.js +0 -45
  4. package/billing/Header2.js +0 -25
  5. package/billing/Header3.js +0 -37
  6. package/billing/Paragraph.js +0 -33
  7. package/billing/ParagraphGroup.js +0 -22
  8. package/billing/ParagraphText.js +0 -26
  9. package/billing/Section.js +0 -50
  10. package/billing/SectionBody.js +0 -17
  11. package/billing/SectionHeader.js +0 -26
  12. package/billing/__stories__/BarChart.stories.js_bak +0 -46
  13. package/billing/__stories__/Grid.stories.js_bak +0 -57
  14. package/billing/__stories__/Header2.stories.js_bak +0 -62
  15. package/billing/__stories__/Header3.stories.js_bak +0 -69
  16. package/billing/__stories__/Paragraph.stories.js_bak +0 -84
  17. package/billing/__stories__/ParagraphGroup.stories.js_bak +0 -68
  18. package/billing/__stories__/ParagraphText.stories.js_bak +0 -64
  19. package/billing/__stories__/Section.stories.js_bak +0 -115
  20. package/billing/__stories__/SectionBody.stories.js_bak +0 -62
  21. package/billing/__stories__/SectionHeader.stories.js-bak +0 -68
  22. package/esm/billing/BarChart.js +0 -45
  23. package/esm/billing/Grid.js +0 -38
  24. package/esm/billing/Header2.js +0 -19
  25. package/esm/billing/Header3.js +0 -31
  26. package/esm/billing/Paragraph.js +0 -27
  27. package/esm/billing/ParagraphGroup.js +0 -16
  28. package/esm/billing/ParagraphText.js +0 -20
  29. package/esm/billing/Section.js +0 -44
  30. package/esm/billing/SectionBody.js +0 -11
  31. package/esm/billing/SectionHeader.js +0 -20
  32. package/esm/billing/__stories__/BarChart.stories.js_bak +0 -46
  33. package/esm/billing/__stories__/Grid.stories.js_bak +0 -57
  34. package/esm/billing/__stories__/Header2.stories.js_bak +0 -62
  35. package/esm/billing/__stories__/Header3.stories.js_bak +0 -69
  36. package/esm/billing/__stories__/Paragraph.stories.js_bak +0 -84
  37. package/esm/billing/__stories__/ParagraphGroup.stories.js_bak +0 -68
  38. package/esm/billing/__stories__/ParagraphText.stories.js_bak +0 -64
  39. package/esm/billing/__stories__/Section.stories.js_bak +0 -115
  40. package/esm/billing/__stories__/SectionBody.stories.js_bak +0 -62
  41. package/esm/billing/__stories__/SectionHeader.stories.js-bak +0 -68
@@ -1,84 +0,0 @@
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
- };
@@ -1,68 +0,0 @@
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
- };
@@ -1,64 +0,0 @@
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
- };
@@ -1,115 +0,0 @@
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
- };
@@ -1,62 +0,0 @@
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
- };
@@ -1,68 +0,0 @@
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 BillingSectionHeader from '../SectionHeader';
12
- import BillingHeader3 from '../Header3';
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/BillingSectionHeader',
19
- component: BillingSectionHeader,
20
- subComponent: {
21
- BillingHeader3,
22
- },
23
- argTypes: {
24
- children: {
25
- description: 'A BillingHeader3 component must be passed in.',
26
- },
27
- inline: { 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
- const styles = StyleSheet.create({
42
- page: {
43
- family: 'Nanum Gothic',
44
- color: '#ffffff',
45
- backgroundColor: theme.bgColor2,
46
- padding: 8,
47
- },
48
- });
49
-
50
- return (
51
- <PDFViewer style={{ width: '100%' }}>
52
- <Document>
53
- <Page size='A4' style={styles.page}>
54
- <View>
55
- <BillingSectionHeader {...args}>
56
- <BillingHeader3>BillingHeader3</BillingHeader3>
57
- <BillingHeader3>BillingHeader3</BillingHeader3>
58
- </BillingSectionHeader>
59
- </View>
60
- </Page>
61
- </Document>
62
- </PDFViewer>
63
- );
64
- };
65
-
66
- Default.args = {
67
- inline: false,
68
- };
@@ -1,45 +0,0 @@
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;
@@ -1,38 +0,0 @@
1
- import { View } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingGrid = _ref => {
4
- let {
5
- children
6
- } = _ref;
7
- const styles = {
8
- display: 'flex',
9
- flexWrap: 'wrap',
10
- flexDirection: 'row',
11
- margin: '0 -8'
12
- };
13
- return /*#__PURE__*/_jsx(View, {
14
- style: styles,
15
- children: children
16
- });
17
- };
18
- const BillingColumn = _ref2 => {
19
- let {
20
- children,
21
- flex
22
- } = _ref2;
23
- const styles = {
24
- padding: '0 8',
25
- width: '50%'
26
- };
27
- if (flex) {
28
- styles.display = 'flex';
29
- styles.alignContent = 'stretch';
30
- styles.alignItems = 'stretch';
31
- styles.flexDirection = 'column';
32
- }
33
- return /*#__PURE__*/_jsx(View, {
34
- style: styles,
35
- children: children
36
- });
37
- };
38
- export { BillingGrid, BillingColumn };
@@ -1,19 +0,0 @@
1
- import { Text } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingHeader2 = _ref => {
4
- let {
5
- children
6
- } = _ref;
7
- const styles = {
8
- fontSize: 20,
9
- wordBreak: 'break-word',
10
- textAlign: 'center',
11
- margin: 0,
12
- marginBottom: 12
13
- };
14
- return /*#__PURE__*/_jsx(Text, {
15
- style: styles,
16
- children: children
17
- });
18
- };
19
- export default BillingHeader2;
@@ -1,31 +0,0 @@
1
- import { Text } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingHeader3 = _ref => {
4
- let {
5
- children,
6
- fontWeightNormal,
7
- noMarginBottom,
8
- paddingBottom
9
- } = _ref;
10
- const styles = {
11
- fontSize: 14,
12
- lineHeight: 1.25,
13
- wordBreak: 'break-word',
14
- fontWeight: 'bold',
15
- marginBottom: 8
16
- };
17
- if (fontWeightNormal) {
18
- styles.fontWeight = 'normal';
19
- }
20
- if (noMarginBottom) {
21
- styles.marginBottom = 0;
22
- }
23
- if (paddingBottom) {
24
- styles.paddingBottom = 8;
25
- }
26
- return /*#__PURE__*/_jsx(Text, {
27
- style: styles,
28
- children: children
29
- });
30
- };
31
- export default BillingHeader3;
@@ -1,27 +0,0 @@
1
- import { View } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingParagraph = _ref => {
4
- let {
5
- children,
6
- marginRight,
7
- justifyContentBetween
8
- } = _ref;
9
- const styles = {
10
- margin: 0,
11
- display: 'flex',
12
- flexDirection: 'row',
13
- wordBreak: 'break-word',
14
- overflowWrap: 'break-word'
15
- };
16
- if (marginRight) {
17
- styles.marginRight = 16;
18
- }
19
- if (justifyContentBetween) {
20
- styles.justifyContent = 'space-between';
21
- }
22
- return /*#__PURE__*/_jsx(View, {
23
- style: styles,
24
- children: children
25
- });
26
- };
27
- export default BillingParagraph;
@@ -1,16 +0,0 @@
1
- import { View } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingParagraphGroup = _ref => {
4
- let {
5
- children
6
- } = _ref;
7
- const styles = {
8
- display: 'flex',
9
- flexDirection: 'row'
10
- };
11
- return /*#__PURE__*/_jsx(View, {
12
- style: styles,
13
- children: children
14
- });
15
- };
16
- export default BillingParagraphGroup;
@@ -1,20 +0,0 @@
1
- import { Text } from '@react-pdf/renderer';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- const BillingParagraphText = _ref => {
4
- let {
5
- children,
6
- fontWeightBold
7
- } = _ref;
8
- const styles = {
9
- fontSize: 12,
10
- lineHeight: 1.5
11
- };
12
- if (fontWeightBold) {
13
- styles.fontWeight = 'bold';
14
- }
15
- return /*#__PURE__*/_jsx(Text, {
16
- style: styles,
17
- children: children
18
- });
19
- };
20
- export default BillingParagraphText;