zebpay-ui 0.0.1
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/.babelrc +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.json +28 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/workflows/gh-pages.yml +22 -0
- package/.husky/pre-commit +4 -0
- package/.lintstagedrc.js +11 -0
- package/.prettierignore +3 -0
- package/.storybook/main.js +12 -0
- package/.storybook/preview.js +22 -0
- package/README.md +3 -0
- package/dist/cjs/index.js +657 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/index.js +648 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +94 -0
- package/icons/index.js +29 -0
- package/icons/out/icons.css +489 -0
- package/icons/out/icons.eot +0 -0
- package/icons/out/icons.html +1473 -0
- package/icons/out/icons.json +159 -0
- package/icons/out/icons.ts +637 -0
- package/icons/out/icons.woff +0 -0
- package/icons/out/icons.woff2 +0 -0
- package/icons/svgs/1-graph.svg +3 -0
- package/icons/svgs/4-graph.svg +5 -0
- package/icons/svgs/account-no.svg +4 -0
- package/icons/svgs/activity.svg +5 -0
- package/icons/svgs/add-collateral.svg +3 -0
- package/icons/svgs/add.svg +3 -0
- package/icons/svgs/address.svg +4 -0
- package/icons/svgs/api.svg +6 -0
- package/icons/svgs/arrow-down.svg +3 -0
- package/icons/svgs/arrow-left.svg +3 -0
- package/icons/svgs/arrow-right.svg +3 -0
- package/icons/svgs/arrow-up.svg +3 -0
- package/icons/svgs/asterik.svg +3 -0
- package/icons/svgs/balance-ltv.svg +3 -0
- package/icons/svgs/bank.svg +8 -0
- package/icons/svgs/blog.svg +8 -0
- package/icons/svgs/bonus.svg +3 -0
- package/icons/svgs/buy-crypto.svg +3 -0
- package/icons/svgs/calendar.svg +3 -0
- package/icons/svgs/camera.svg +6 -0
- package/icons/svgs/cancelled.svg +3 -0
- package/icons/svgs/candle chart.svg +4 -0
- package/icons/svgs/cheque.svg +8 -0
- package/icons/svgs/circle-cross.svg +4 -0
- package/icons/svgs/circulation-supply.svg +3 -0
- package/icons/svgs/city.svg +3 -0
- package/icons/svgs/coin-stack.svg +5 -0
- package/icons/svgs/coins.svg +5 -0
- package/icons/svgs/compare.svg +3 -0
- package/icons/svgs/completed.svg +4 -0
- package/icons/svgs/contract.svg +3 -0
- package/icons/svgs/copy.svg +3 -0
- package/icons/svgs/coupon.svg +5 -0
- package/icons/svgs/cross.svg +3 -0
- package/icons/svgs/deactivate.svg +3 -0
- package/icons/svgs/deposit.svg +3 -0
- package/icons/svgs/depth-chart.svg +4 -0
- package/icons/svgs/district.svg +3 -0
- package/icons/svgs/dob.svg +3 -0
- package/icons/svgs/download.svg +4 -0
- package/icons/svgs/downwards.svg +3 -0
- package/icons/svgs/driving-licence.svg +3 -0
- package/icons/svgs/earned.svg +5 -0
- package/icons/svgs/edit.svg +3 -0
- package/icons/svgs/email.svg +3 -0
- package/icons/svgs/emi-amount.svg +6 -0
- package/icons/svgs/emi-duedate.svg +3 -0
- package/icons/svgs/error.svg +6 -0
- package/icons/svgs/expand.svg +3 -0
- package/icons/svgs/external-link.svg +3 -0
- package/icons/svgs/facelock.svg +3 -0
- package/icons/svgs/fees.svg +3 -0
- package/icons/svgs/filter.svg +3 -0
- package/icons/svgs/fingerprint.svg +7 -0
- package/icons/svgs/form.svg +3 -0
- package/icons/svgs/globe.svg +3 -0
- package/icons/svgs/hamburger.svg +3 -0
- package/icons/svgs/help.svg +5 -0
- package/icons/svgs/hide.svg +4 -0
- package/icons/svgs/home.svg +4 -0
- package/icons/svgs/ifsc.svg +7 -0
- package/icons/svgs/income-source.svg +3 -0
- package/icons/svgs/indicators.svg +3 -0
- package/icons/svgs/info.svg +3 -0
- package/icons/svgs/initial-ltv.svg +3 -0
- package/icons/svgs/instant-buy-sell.svg +3 -0
- package/icons/svgs/interest-amount.svg +3 -0
- package/icons/svgs/interest-rate.svg +6 -0
- package/icons/svgs/kyc.svg +5 -0
- package/icons/svgs/lend.svg +4 -0
- package/icons/svgs/link.svg +4 -0
- package/icons/svgs/liquidation-cost.svg +3 -0
- package/icons/svgs/liquidation-id.svg +3 -0
- package/icons/svgs/liquidation-price.svg +3 -0
- package/icons/svgs/liquidation.svg +4 -0
- package/icons/svgs/list.svg +8 -0
- package/icons/svgs/loan-amount.svg +3 -0
- package/icons/svgs/loan-details.svg +3 -0
- package/icons/svgs/loan-repayment.svg +3 -0
- package/icons/svgs/loan-term.svg +3 -0
- package/icons/svgs/location.svg +4 -0
- package/icons/svgs/lock.svg +3 -0
- package/icons/svgs/logout.svg +3 -0
- package/icons/svgs/ltv-ratio.svg +5 -0
- package/icons/svgs/mail.svg +3 -0
- package/icons/svgs/map.svg +4 -0
- package/icons/svgs/margin-call.svg +4 -0
- package/icons/svgs/max-supply.svg +3 -0
- package/icons/svgs/menu.svg +3 -0
- package/icons/svgs/more-options.svg +5 -0
- package/icons/svgs/negative.svg +3 -0
- package/icons/svgs/network.svg +3 -0
- package/icons/svgs/next.svg +3 -0
- package/icons/svgs/nominee.svg +3 -0
- package/icons/svgs/note.svg +3 -0
- package/icons/svgs/notification.svg +3 -0
- package/icons/svgs/occupation.svg +3 -0
- package/icons/svgs/ongoing.svg +4 -0
- package/icons/svgs/order.svg +4 -0
- package/icons/svgs/orders-complete.svg +6 -0
- package/icons/svgs/pair-selector.svg +3 -0
- package/icons/svgs/pan.svg +8 -0
- package/icons/svgs/passbook.svg +3 -0
- package/icons/svgs/passport.svg +4 -0
- package/icons/svgs/pay-emi.svg +3 -0
- package/icons/svgs/pay-lumpsum.svg +3 -0
- package/icons/svgs/pay-off-loan.svg +3 -0
- package/icons/svgs/penalty-charges.svg +3 -0
- package/icons/svgs/percentage.svg +6 -0
- package/icons/svgs/phone.svg +3 -0
- package/icons/svgs/positive.svg +3 -0
- package/icons/svgs/prepay-principal.svg +3 -0
- package/icons/svgs/previous.svg +3 -0
- package/icons/svgs/profile.svg +3 -0
- package/icons/svgs/quicktrade.svg +5 -0
- package/icons/svgs/rank.svg +3 -0
- package/icons/svgs/ream.svg +6 -0
- package/icons/svgs/recieve.svg +3 -0
- package/icons/svgs/repayment-schedule.svg +4 -0
- package/icons/svgs/reports.svg +6 -0
- package/icons/svgs/reset.svg +4 -0
- package/icons/svgs/save.svg +3 -0
- package/icons/svgs/scan.svg +3 -0
- package/icons/svgs/search.svg +3 -0
- package/icons/svgs/security.svg +4 -0
- package/icons/svgs/selfie.svg +5 -0
- package/icons/svgs/sell-crypto.svg +3 -0
- package/icons/svgs/send-email.svg +3 -0
- package/icons/svgs/send.svg +3 -0
- package/icons/svgs/separator.svg +3 -0
- package/icons/svgs/setttings.svg +3 -0
- package/icons/svgs/share.svg +3 -0
- package/icons/svgs/show.svg +3 -0
- package/icons/svgs/side.svg +7 -0
- package/icons/svgs/sip.svg +4 -0
- package/icons/svgs/sms.svg +6 -0
- package/icons/svgs/star-filled.svg +3 -0
- package/icons/svgs/star.svg +3 -0
- package/icons/svgs/statement.svg +3 -0
- package/icons/svgs/stop.svg +3 -0
- package/icons/svgs/street-address.svg +3 -0
- package/icons/svgs/subtract.svg +3 -0
- package/icons/svgs/success.svg +4 -0
- package/icons/svgs/support.svg +5 -0
- package/icons/svgs/templates.svg +3 -0
- package/icons/svgs/term.svg +3 -0
- package/icons/svgs/tick.svg +3 -0
- package/icons/svgs/total-payable-lumpsum.svg +9 -0
- package/icons/svgs/trash.svg +3 -0
- package/icons/svgs/unlock.svg +3 -0
- package/icons/svgs/upi.svg +3 -0
- package/icons/svgs/upload.svg +4 -0
- package/icons/svgs/upwards.svg +3 -0
- package/icons/svgs/voting-card.svg +5 -0
- package/icons/svgs/wallet.svg +3 -0
- package/icons/svgs/xpress.svg +6 -0
- package/icons/svgs/zip-code.svg +3 -0
- package/package.json +65 -0
- package/rollup.config.js +49 -0
- package/src/components/Button/index.tsx +55 -0
- package/src/components/Button/styles.ts +142 -0
- package/src/components/Button/typings.ts +20 -0
- package/src/components/Checkbox/index.tsx +44 -0
- package/src/components/Checkbox/styles.ts +76 -0
- package/src/components/Checkbox/typings.ts +11 -0
- package/src/components/CircularLoader/index.tsx +22 -0
- package/src/components/CircularLoader/style.ts +18 -0
- package/src/components/CircularLoader/typings.ts +4 -0
- package/src/components/DateRangePicker/index.tsx +36 -0
- package/src/components/DateRangePicker/styles.css +676 -0
- package/src/components/Input/index.tsx +95 -0
- package/src/components/Input/styles.ts +79 -0
- package/src/components/Input/typings.ts +25 -0
- package/src/components/Popper/index.tsx +62 -0
- package/src/components/Popper/styles.ts +59 -0
- package/src/components/Popper/typings.ts +16 -0
- package/src/components/Radio/index.tsx +32 -0
- package/src/components/Radio/styles.ts +51 -0
- package/src/components/Radio/typings.ts +11 -0
- package/src/components/Toast/index.tsx +88 -0
- package/src/components/Toast/styles.ts +69 -0
- package/src/components/Toast/typings.ts +6 -0
- package/src/components/index.ts +19 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useFocus.ts +16 -0
- package/src/index.ts +2 -0
- package/src/styles/colors.ts +39 -0
- package/src/styles/index.ts +6 -0
- package/src/styles/mixins.ts +52 -0
- package/src/styles/typography.ts +331 -0
- package/src/styles/utils.ts +39 -0
- package/stories/Button.stories.tsx +20 -0
- package/stories/Checkbox.stories.tsx +18 -0
- package/stories/CircularLoader.stories.tsx +15 -0
- package/stories/DateRangePicker.stories.tsx +18 -0
- package/stories/Input.stories.tsx +18 -0
- package/stories/Popper.stories.tsx +23 -0
- package/stories/Radio.stories.tsx +18 -0
- package/stories/Toast.stories.tsx +17 -0
- package/tsconfig.json +24 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import colors from "./colors";
|
|
3
|
+
|
|
4
|
+
const mixins = {
|
|
5
|
+
flexJustifiedBetween: css({
|
|
6
|
+
justifyContent: "space-between",
|
|
7
|
+
}),
|
|
8
|
+
flexJustifiedCenter: css({
|
|
9
|
+
justifyContent: "center",
|
|
10
|
+
}),
|
|
11
|
+
flexJustifiedEnd: css({
|
|
12
|
+
justifyContent: "flex-end",
|
|
13
|
+
}),
|
|
14
|
+
flexAlignCenter: css({
|
|
15
|
+
display: "flex",
|
|
16
|
+
alignItems: "center",
|
|
17
|
+
}),
|
|
18
|
+
flexAlignStart: css({
|
|
19
|
+
display: "flex",
|
|
20
|
+
alignItems: "flex-start",
|
|
21
|
+
}),
|
|
22
|
+
flexNoWrap: css({ flexWrap: "nowrap" }),
|
|
23
|
+
flexColumn: css({ display: "flex", flexDirection: "column" }),
|
|
24
|
+
textSuccess: css({
|
|
25
|
+
color: colors.Zeb_Solid_Green,
|
|
26
|
+
}),
|
|
27
|
+
textError: css({
|
|
28
|
+
color: colors.Zeb_Solid_Red,
|
|
29
|
+
}),
|
|
30
|
+
bgSuccess: css({
|
|
31
|
+
background: colors.Zeb_Solid_Green,
|
|
32
|
+
}),
|
|
33
|
+
bgError: css({
|
|
34
|
+
background: colors.Zeb_Solid_Red,
|
|
35
|
+
}),
|
|
36
|
+
textFaded: css({
|
|
37
|
+
color: colors.Zeb_Solid_Light_Blue,
|
|
38
|
+
}),
|
|
39
|
+
textCapitalize: css({
|
|
40
|
+
textTransform: "capitalize",
|
|
41
|
+
}),
|
|
42
|
+
textAlignmentCenter: css({
|
|
43
|
+
textAlign: "center",
|
|
44
|
+
}),
|
|
45
|
+
textAlignmentLeft: css({
|
|
46
|
+
textAlign: "left",
|
|
47
|
+
}),
|
|
48
|
+
textAlignmentRight: css({
|
|
49
|
+
textAlign: "right",
|
|
50
|
+
}),
|
|
51
|
+
};
|
|
52
|
+
export default mixins;
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import colors from "./colors";
|
|
2
|
+
import utils from "./utils";
|
|
3
|
+
import { CSSObject } from "@emotion/react";
|
|
4
|
+
|
|
5
|
+
interface Styles {
|
|
6
|
+
[key: string]: CSSObject;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const typography: Styles = {
|
|
10
|
+
H1_56_bold: {
|
|
11
|
+
fontFamily: "Lato",
|
|
12
|
+
fontStyle: "normal",
|
|
13
|
+
fontWeight: "bold",
|
|
14
|
+
fontSize: utils.remConverter(56),
|
|
15
|
+
lineHeight: "86px",
|
|
16
|
+
letterSpacing: "0.8px",
|
|
17
|
+
color: colors.Zeb_Solid_White,
|
|
18
|
+
},
|
|
19
|
+
H2_44_bold: {
|
|
20
|
+
fontFamily: "Lato",
|
|
21
|
+
fontStyle: "normal",
|
|
22
|
+
fontWeight: "bold",
|
|
23
|
+
fontSize: utils.remConverter(44),
|
|
24
|
+
lineHeight: "60px",
|
|
25
|
+
letterSpacing: "0.8px",
|
|
26
|
+
color: colors.Zeb_Solid_White,
|
|
27
|
+
},
|
|
28
|
+
H3_32_bold: {
|
|
29
|
+
fontFamily: "Lato",
|
|
30
|
+
fontStyle: "normal",
|
|
31
|
+
fontWeight: "bold",
|
|
32
|
+
fontSize: utils.remConverter(32),
|
|
33
|
+
lineHeight: "48px",
|
|
34
|
+
letterSpacing: "0.8px",
|
|
35
|
+
color: colors.Zeb_Solid_White,
|
|
36
|
+
},
|
|
37
|
+
H4_28_bold: {
|
|
38
|
+
fontFamily: "Lato",
|
|
39
|
+
fontStyle: "normal",
|
|
40
|
+
fontWeight: "bold",
|
|
41
|
+
fontSize: utils.remConverter(28),
|
|
42
|
+
lineHeight: "40px",
|
|
43
|
+
letterSpacing: "0.8px",
|
|
44
|
+
color: colors.Zeb_Solid_White,
|
|
45
|
+
},
|
|
46
|
+
H5_20_bold: {
|
|
47
|
+
fontFamily: "Lato",
|
|
48
|
+
fontStyle: "normal",
|
|
49
|
+
fontWeight: "bold",
|
|
50
|
+
fontSize: utils.remConverter(20),
|
|
51
|
+
lineHeight: "normal",
|
|
52
|
+
letterSpacing: "0.8px",
|
|
53
|
+
color: colors.Zeb_Solid_White,
|
|
54
|
+
},
|
|
55
|
+
H6_16_bold: {
|
|
56
|
+
fontFamily: "Lato",
|
|
57
|
+
fontStyle: "normal",
|
|
58
|
+
fontWeight: "bold",
|
|
59
|
+
fontSize: utils.remConverter(16),
|
|
60
|
+
lineHeight: "28px",
|
|
61
|
+
letterSpacing: "0.8px",
|
|
62
|
+
color: colors.Zeb_Solid_White,
|
|
63
|
+
},
|
|
64
|
+
H1_56_semibold: {
|
|
65
|
+
fontFamily: "Lato",
|
|
66
|
+
fontStyle: "normal",
|
|
67
|
+
fontWeight: 600,
|
|
68
|
+
fontSize: utils.remConverter(56),
|
|
69
|
+
lineHeight: "86px",
|
|
70
|
+
letterSpacing: "0.8px",
|
|
71
|
+
color: colors.Zeb_Solid_White,
|
|
72
|
+
},
|
|
73
|
+
H2_44_semibold: {
|
|
74
|
+
fontFamily: "Lato",
|
|
75
|
+
fontStyle: "normal",
|
|
76
|
+
fontWeight: 600,
|
|
77
|
+
fontSize: utils.remConverter(44),
|
|
78
|
+
lineHeight: "60px",
|
|
79
|
+
letterSpacing: "0.8px",
|
|
80
|
+
color: colors.Zeb_Solid_White,
|
|
81
|
+
},
|
|
82
|
+
H3_32_semibold: {
|
|
83
|
+
fontFamily: "Lato",
|
|
84
|
+
fontStyle: "normal",
|
|
85
|
+
fontWeight: 600,
|
|
86
|
+
fontSize: utils.remConverter(32),
|
|
87
|
+
lineHeight: "48px",
|
|
88
|
+
letterSpacing: "0.8px",
|
|
89
|
+
color: colors.Zeb_Solid_White,
|
|
90
|
+
},
|
|
91
|
+
H4_28_semibold: {
|
|
92
|
+
fontFamily: "Lato",
|
|
93
|
+
fontStyle: "normal",
|
|
94
|
+
fontWeight: 600,
|
|
95
|
+
fontSize: utils.remConverter(28),
|
|
96
|
+
lineHeight: "40px",
|
|
97
|
+
letterSpacing: "0.8px",
|
|
98
|
+
color: colors.Zeb_Solid_White,
|
|
99
|
+
},
|
|
100
|
+
H5_20_semibold: {
|
|
101
|
+
fontFamily: "Lato",
|
|
102
|
+
fontStyle: "normal",
|
|
103
|
+
fontWeight: 600,
|
|
104
|
+
fontSize: utils.remConverter(20),
|
|
105
|
+
lineHeight: "30px",
|
|
106
|
+
letterSpacing: "0.8px",
|
|
107
|
+
color: colors.Zeb_Solid_White,
|
|
108
|
+
},
|
|
109
|
+
H6_16_semibold: {
|
|
110
|
+
fontFamily: "Lato",
|
|
111
|
+
fontStyle: "normal",
|
|
112
|
+
fontWeight: 600,
|
|
113
|
+
fontSize: utils.remConverter(16),
|
|
114
|
+
lineHeight: "28px",
|
|
115
|
+
letterSpacing: "0.8px",
|
|
116
|
+
color: colors.Zeb_Solid_White,
|
|
117
|
+
},
|
|
118
|
+
H1_56_regular: {
|
|
119
|
+
fontFamily: "Lato",
|
|
120
|
+
fontStyle: "normal",
|
|
121
|
+
fontWeight: "normal",
|
|
122
|
+
fontSize: utils.remConverter(56),
|
|
123
|
+
lineHeight: "86px",
|
|
124
|
+
letterSpacing: "0.8px",
|
|
125
|
+
color: colors.Zeb_Solid_White,
|
|
126
|
+
},
|
|
127
|
+
H2_44_regular: {
|
|
128
|
+
fontFamily: "Lato",
|
|
129
|
+
fontStyle: "normal",
|
|
130
|
+
fontWeight: "normal",
|
|
131
|
+
fontSize: utils.remConverter(44),
|
|
132
|
+
lineHeight: "60px",
|
|
133
|
+
letterSpacing: "0.8px",
|
|
134
|
+
color: colors.Zeb_Solid_White,
|
|
135
|
+
},
|
|
136
|
+
H3_32_regular: {
|
|
137
|
+
fontFamily: "Lato",
|
|
138
|
+
fontStyle: "normal",
|
|
139
|
+
fontWeight: "normal",
|
|
140
|
+
fontSize: utils.remConverter(32),
|
|
141
|
+
lineHeight: "48px",
|
|
142
|
+
letterSpacing: "0.8px",
|
|
143
|
+
color: colors.Zeb_Solid_White,
|
|
144
|
+
},
|
|
145
|
+
H4_28_regular: {
|
|
146
|
+
fontFamily: "Lato",
|
|
147
|
+
fontStyle: "normal",
|
|
148
|
+
fontWeight: "normal",
|
|
149
|
+
fontSize: utils.remConverter(28),
|
|
150
|
+
lineHeight: "40px",
|
|
151
|
+
letterSpacing: "0.8px",
|
|
152
|
+
color: colors.Zeb_Solid_White,
|
|
153
|
+
},
|
|
154
|
+
H5_20_regular: {
|
|
155
|
+
fontFamily: "Lato",
|
|
156
|
+
fontStyle: "normal",
|
|
157
|
+
fontWeight: "normal",
|
|
158
|
+
fontSize: utils.remConverter(20),
|
|
159
|
+
lineHeight: "30px",
|
|
160
|
+
letterSpacing: "0.8px",
|
|
161
|
+
color: colors.Zeb_Solid_White,
|
|
162
|
+
},
|
|
163
|
+
H6_16_regular: {
|
|
164
|
+
fontFamily: "Lato",
|
|
165
|
+
fontStyle: "normal",
|
|
166
|
+
fontWeight: "normal",
|
|
167
|
+
fontSize: utils.remConverter(16),
|
|
168
|
+
lineHeight: "28px",
|
|
169
|
+
letterSpacing: "0.8px",
|
|
170
|
+
color: colors.Zeb_Solid_White,
|
|
171
|
+
},
|
|
172
|
+
H8_12_regular: {
|
|
173
|
+
fontFamily: "Lato",
|
|
174
|
+
fontStyle: "normal",
|
|
175
|
+
fontWeight: "normal",
|
|
176
|
+
fontSize: utils.remConverter(12),
|
|
177
|
+
lineHeight: "18px",
|
|
178
|
+
letterSpacing: "0.8px",
|
|
179
|
+
color: colors.Zeb_Solid_White,
|
|
180
|
+
},
|
|
181
|
+
B1_24_semibold: {
|
|
182
|
+
fontFamily: "Lato",
|
|
183
|
+
fontStyle: "normal",
|
|
184
|
+
fontWeight: 600,
|
|
185
|
+
fontSize: utils.remConverter(24),
|
|
186
|
+
lineHeight: "40px",
|
|
187
|
+
letterSpacing: "0.4px",
|
|
188
|
+
color: colors.Zeb_Solid_White,
|
|
189
|
+
},
|
|
190
|
+
B2_20_semibold: {
|
|
191
|
+
fontFamily: "Lato",
|
|
192
|
+
fontStyle: "normal",
|
|
193
|
+
fontWeight: 600,
|
|
194
|
+
fontSize: utils.remConverter(20),
|
|
195
|
+
lineHeight: "30px",
|
|
196
|
+
letterSpacing: "0.4px",
|
|
197
|
+
color: colors.Zeb_Solid_White,
|
|
198
|
+
},
|
|
199
|
+
B3_16_semibold: {
|
|
200
|
+
fontFamily: "Lato",
|
|
201
|
+
fontStyle: "normal",
|
|
202
|
+
fontWeight: 600,
|
|
203
|
+
fontSize: utils.remConverter(16),
|
|
204
|
+
lineHeight: "28px",
|
|
205
|
+
letterSpacing: "0.4px",
|
|
206
|
+
color: colors.Zeb_Solid_White,
|
|
207
|
+
},
|
|
208
|
+
B4_14_semibold: {
|
|
209
|
+
fontFamily: "Lato",
|
|
210
|
+
fontStyle: "normal",
|
|
211
|
+
fontWeight: 600,
|
|
212
|
+
fontSize: utils.remConverter(14),
|
|
213
|
+
lineHeight: "24px",
|
|
214
|
+
letterSpacing: "0.4px",
|
|
215
|
+
color: colors.Zeb_Solid_White,
|
|
216
|
+
},
|
|
217
|
+
B5_12_semibold: {
|
|
218
|
+
fontFamily: "Lato",
|
|
219
|
+
fontStyle: "normal",
|
|
220
|
+
fontWeight: 600,
|
|
221
|
+
fontSize: utils.remConverter(12),
|
|
222
|
+
lineHeight: "18px",
|
|
223
|
+
letterSpacing: "0.4px",
|
|
224
|
+
color: colors.Zeb_Solid_White,
|
|
225
|
+
},
|
|
226
|
+
B6_10_semibold: {
|
|
227
|
+
fontFamily: "Lato",
|
|
228
|
+
fontStyle: "normal",
|
|
229
|
+
fontWeight: 600,
|
|
230
|
+
fontSize: utils.remConverter(10),
|
|
231
|
+
lineHeight: "12px",
|
|
232
|
+
letterSpacing: "0.4px",
|
|
233
|
+
color: colors.Zeb_Solid_White,
|
|
234
|
+
},
|
|
235
|
+
B1_24_regular: {
|
|
236
|
+
fontFamily: "Lato",
|
|
237
|
+
fontStyle: "normal",
|
|
238
|
+
fontWeight: 600,
|
|
239
|
+
fontSize: utils.remConverter(24),
|
|
240
|
+
lineHeight: "40px",
|
|
241
|
+
letterSpacing: "0.4px",
|
|
242
|
+
color: colors.Zeb_Solid_White,
|
|
243
|
+
},
|
|
244
|
+
B2_20_regular: {
|
|
245
|
+
fontFamily: "Lato",
|
|
246
|
+
fontStyle: "normal",
|
|
247
|
+
fontWeight: 600,
|
|
248
|
+
fontSize: utils.remConverter(20),
|
|
249
|
+
lineHeight: "30px",
|
|
250
|
+
letterSpacing: "0.4px",
|
|
251
|
+
color: colors.Zeb_Solid_White,
|
|
252
|
+
},
|
|
253
|
+
B3_16_regular: {
|
|
254
|
+
fontFamily: "Lato",
|
|
255
|
+
fontStyle: "normal",
|
|
256
|
+
fontWeight: "normal",
|
|
257
|
+
fontSize: utils.remConverter(16),
|
|
258
|
+
lineHeight: "28px",
|
|
259
|
+
letterSpacing: "0.4px",
|
|
260
|
+
color: colors.Zeb_Solid_White,
|
|
261
|
+
},
|
|
262
|
+
B4_14_regular: {
|
|
263
|
+
fontFamily: "Lato",
|
|
264
|
+
fontStyle: "normal",
|
|
265
|
+
fontWeight: "normal",
|
|
266
|
+
fontSize: utils.remConverter(14),
|
|
267
|
+
lineHeight: "24px",
|
|
268
|
+
letterSpacing: "0.4px",
|
|
269
|
+
color: colors.Zeb_Solid_White,
|
|
270
|
+
},
|
|
271
|
+
B5_12_regular: {
|
|
272
|
+
fontFamily: "Lato",
|
|
273
|
+
fontStyle: "normal",
|
|
274
|
+
fontWeight: "normal",
|
|
275
|
+
fontSize: utils.remConverter(12),
|
|
276
|
+
lineHeight: "18px",
|
|
277
|
+
letterSpacing: "0.4px",
|
|
278
|
+
color: colors.Zeb_Solid_White,
|
|
279
|
+
},
|
|
280
|
+
B6_10_regular: {
|
|
281
|
+
fontFamily: "Lato",
|
|
282
|
+
fontStyle: "normal",
|
|
283
|
+
fontWeight: "normal",
|
|
284
|
+
fontSize: utils.remConverter(10),
|
|
285
|
+
lineHeight: "12px",
|
|
286
|
+
letterSpacing: "0.4px",
|
|
287
|
+
color: colors.Zeb_Solid_White,
|
|
288
|
+
},
|
|
289
|
+
C1_20: {
|
|
290
|
+
fontFamily: "Lato",
|
|
291
|
+
fontStyle: "normal",
|
|
292
|
+
fontWeight: "bold",
|
|
293
|
+
fontSize: utils.remConverter(20),
|
|
294
|
+
lineHeight: "30px",
|
|
295
|
+
letterSpacing: "1.6px",
|
|
296
|
+
color: colors.Zeb_Solid_White,
|
|
297
|
+
textTransform: "uppercase",
|
|
298
|
+
},
|
|
299
|
+
C2_16: {
|
|
300
|
+
fontFamily: "Lato",
|
|
301
|
+
fontStyle: "normal",
|
|
302
|
+
fontWeight: "bold",
|
|
303
|
+
fontSize: utils.remConverter(16),
|
|
304
|
+
lineHeight: "28px",
|
|
305
|
+
letterSpacing: "0.8px",
|
|
306
|
+
color: colors.Zeb_Solid_White,
|
|
307
|
+
textTransform: "uppercase",
|
|
308
|
+
},
|
|
309
|
+
C3_14: {
|
|
310
|
+
fontFamily: "Lato",
|
|
311
|
+
fontStyle: "normal",
|
|
312
|
+
fontWeight: "bold",
|
|
313
|
+
fontSize: utils.remConverter(14),
|
|
314
|
+
lineHeight: "24px",
|
|
315
|
+
letterSpacing: "0.8px",
|
|
316
|
+
color: colors.Zeb_Solid_White,
|
|
317
|
+
textTransform: "uppercase",
|
|
318
|
+
},
|
|
319
|
+
C4_12: {
|
|
320
|
+
fontFamily: "Lato",
|
|
321
|
+
fontStyle: "normal",
|
|
322
|
+
fontWeight: "bold",
|
|
323
|
+
fontSize: utils.remConverter(12),
|
|
324
|
+
lineHeight: "18px",
|
|
325
|
+
letterSpacing: "0.4px",
|
|
326
|
+
color: colors.Zeb_Solid_White,
|
|
327
|
+
textTransform: "uppercase",
|
|
328
|
+
},
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
export default typography;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
|
|
3
|
+
const utils = {
|
|
4
|
+
remConverter: (value: number) => {
|
|
5
|
+
return `${value / 16}rem`;
|
|
6
|
+
},
|
|
7
|
+
widthPercentage: (value: number) => {
|
|
8
|
+
return css({
|
|
9
|
+
width: `${value}%`,
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
heightPercentage: (value: number) => {
|
|
13
|
+
return css({
|
|
14
|
+
height: `${value}%`,
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
mr: (value: number) => {
|
|
18
|
+
return css({
|
|
19
|
+
marginRight: utils.remConverter(value),
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
ml: (value: number) => {
|
|
23
|
+
return css({
|
|
24
|
+
marginLeft: utils.remConverter(value),
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
mt: (value: number) => {
|
|
28
|
+
return css({
|
|
29
|
+
marginTop: utils.remConverter(value),
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
mb: (value: number) => {
|
|
33
|
+
return css({
|
|
34
|
+
marginBottom: utils.remConverter(value),
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default utils;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Button } from "../src/components";
|
|
4
|
+
|
|
5
|
+
// the default export is the story
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Button",
|
|
8
|
+
component: Button,
|
|
9
|
+
args: {
|
|
10
|
+
type: "primary",
|
|
11
|
+
size: "medium",
|
|
12
|
+
disabled: false,
|
|
13
|
+
loading: false,
|
|
14
|
+
},
|
|
15
|
+
} as ComponentMeta<typeof Button>;
|
|
16
|
+
|
|
17
|
+
// the exported function must return our component & its name will be the name of the story
|
|
18
|
+
export const Playground: ComponentStory<typeof Button> = (args) => {
|
|
19
|
+
return <Button {...args}>Click Me!</Button>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Checkbox } from "../src/components";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/Checkbox",
|
|
7
|
+
component: Checkbox,
|
|
8
|
+
args: {
|
|
9
|
+
name: "test-checkbox",
|
|
10
|
+
label: "Test label",
|
|
11
|
+
checked: false,
|
|
12
|
+
value: 1,
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof Checkbox>;
|
|
15
|
+
|
|
16
|
+
export const Default: ComponentStory<typeof Checkbox> = (args) => (
|
|
17
|
+
<Checkbox {...args} />
|
|
18
|
+
);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CircularLoader } from "../src/components";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/CircularLoader",
|
|
7
|
+
component: CircularLoader,
|
|
8
|
+
args: {
|
|
9
|
+
size: 18,
|
|
10
|
+
},
|
|
11
|
+
} as ComponentMeta<typeof CircularLoader>;
|
|
12
|
+
|
|
13
|
+
export const Default: ComponentStory<typeof CircularLoader> = (args) => (
|
|
14
|
+
<CircularLoader {...args} />
|
|
15
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsxImportSource @emotion/react */
|
|
2
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { DateRangePicker } from "../src/components";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/DateRangePicker",
|
|
8
|
+
component: DateRangePicker,
|
|
9
|
+
args: {
|
|
10
|
+
months: 2,
|
|
11
|
+
onChange: () => {},
|
|
12
|
+
ranges: { startDate: new Date(), endDate: new Date() },
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof DateRangePicker>;
|
|
15
|
+
|
|
16
|
+
export const Playground: ComponentStory<typeof DateRangePicker> = (args) => {
|
|
17
|
+
return <DateRangePicker {...args} />;
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Input } from "../src/components";
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: "Components/Input",
|
|
8
|
+
component: Input,
|
|
9
|
+
args: {
|
|
10
|
+
label: "Label",
|
|
11
|
+
placeholder: "Placeholder",
|
|
12
|
+
style: css({ width: "400px" }),
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof Input>;
|
|
15
|
+
|
|
16
|
+
export const Default: ComponentStory<typeof Input> = (args) => (
|
|
17
|
+
<Input {...args} />
|
|
18
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { css } from "@emotion/react";
|
|
2
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Popper } from "../src/components";
|
|
5
|
+
import { ChildrenProps } from "../src/components/Popper/typings";
|
|
6
|
+
|
|
7
|
+
const InternalComponent = (props: ChildrenProps) => (
|
|
8
|
+
<span>Internal component</span>
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
title: "Components/Popper",
|
|
13
|
+
component: Popper,
|
|
14
|
+
args: {
|
|
15
|
+
label: "Label",
|
|
16
|
+
renderChildren: InternalComponent,
|
|
17
|
+
style: css({ marginTop: "7rem" }),
|
|
18
|
+
},
|
|
19
|
+
} as ComponentMeta<typeof Popper>;
|
|
20
|
+
|
|
21
|
+
export const Default: ComponentStory<typeof Popper> = (args) => (
|
|
22
|
+
<Popper {...args} />
|
|
23
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Radio } from "../src/components";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/Radio",
|
|
7
|
+
component: Radio,
|
|
8
|
+
args: {
|
|
9
|
+
name: "test-radio",
|
|
10
|
+
label: "Test label",
|
|
11
|
+
selected: true,
|
|
12
|
+
value: 1,
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof Radio>;
|
|
15
|
+
|
|
16
|
+
export const Default: ComponentStory<typeof Radio> = (args) => (
|
|
17
|
+
<Radio {...args} />
|
|
18
|
+
);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Toast } from "../src/components";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title: "Components/Toast",
|
|
7
|
+
component: Toast,
|
|
8
|
+
args: {
|
|
9
|
+
title: "Test title",
|
|
10
|
+
description: "Test description",
|
|
11
|
+
type: "info",
|
|
12
|
+
},
|
|
13
|
+
} as ComponentMeta<typeof Toast>;
|
|
14
|
+
|
|
15
|
+
export const Default: ComponentStory<typeof Toast> = (args) => (
|
|
16
|
+
<Toast {...args} />
|
|
17
|
+
);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"outDir": "dist",
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationDir": "dist",
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"jsx": "react",
|
|
20
|
+
"types": ["@emotion/react"]
|
|
21
|
+
},
|
|
22
|
+
"include": ["src"],
|
|
23
|
+
"exclude": ["node_modules", "dist"]
|
|
24
|
+
}
|