on adf9104 help sign in
205 lines 3.5 kB history raw
1// Helpers
2import {
3 validateMnemonic,
4 validateNotEmpty,
5 validateEthereumAddress,
6 validateGalaxy,
7 validatePoint,
8 validateTicket,
9 validateNetworkKey,
10 validateNetworkSeed,
11 validateShard
12} from '../lib/validators';
14import {
15 prependSig,
16} from '../lib/transformers';
18// Buttons
19import Button from './Button';
20import UploadButton from './UploadButton';
21// import Checkbox from './Checkbox';
22import CheckboxButton from './CheckboxButton';
23import Anchor from './Anchor';
24// import ToggleButton from './ToggleButton';
26// Input
27import Form from './Form'
28import Label from './Label';
29import InnerLabel from './InnerLabel';
30import InputCaption from './InputCaption';
31import Input from './Input';
32import Textarea from './Textarea';
33import advancedInput from './advancedInput';
35// Dropdowns
36import DropdownItem from './DropdownItem';
37import DropdownDivider from './DropdownDivider';
38import InnerLabelDropdown from './InnerLabelDropdown';
40// Path Control
41import Breadcrumb from './Breadcrumb';
42import BreadcrumbItem from './BreadcrumbItem';
44// Layout
45import Container from './Container';
46import Col from './Col';
47import Row from './Row';
48// import FlexRow from './FlexRow';
49// import FlexCol from './FlexCol';
50import Spacing from './Spacing';
52// Type
53import H1 from './H1';
54import H2 from './H2';
55import H3 from './H3';
56import H4 from './H4';
57import P from './P';
58import Code from './Code'
59import Warning from './Warning'
61// Misc
62import ValidatedSigil from './ValidatedSigil';
63import ValidatedBlockie from './ValidatedBlockie';
64import Chevron from './icons/Chevron'
65import ShowBlockie from './ShowBlockie'
67// HOC validated form components
69const RequiredInput = advancedInput({
70 WrappedComponent: Input,
71 validators: [
72 validateNotEmpty,
73 ],
74});
77const NetworkKeyInput = advancedInput({
78 WrappedComponent: Input,
79 validators: [
80 validateNotEmpty,
81 validateNetworkKey
82 ],
83});
86const NetworkSeedInput = advancedInput({
87 WrappedComponent: Input,
88 validators: [
89 validateNotEmpty,
90 validateNetworkSeed
91 ],
92});
95const AddressInput = advancedInput({
96 WrappedComponent: Input,
97 validators: [
98 validateEthereumAddress,
99 validateNotEmpty,
100 ],
101});
104const MnemonicInput = advancedInput({
105 WrappedComponent: Textarea,
106 validators: [
107 validateMnemonic,
108 validateNotEmpty,
109 ],
110});
112const GalaxyInput = advancedInput({
113 WrappedComponent: Input,
114 validators: [
115 validateGalaxy,
116 validateNotEmpty,
117 ],
118 transformers: [
119 prependSig,
120 ]
121});
123const PointInput = advancedInput({
124 WrappedComponent: Input,
125 validators: [
126 validatePoint,
127 validateNotEmpty,
128 ],
129 transformers: [
130 prependSig,
131 ]
132});
134const TicketInput = advancedInput({
135 WrappedComponent: Input,
136 validators: [
137 validateTicket,
138 validateNotEmpty,
139 ],
140 transformers: [
141 prependSig,
142 ]
143});
145const ShardInput = advancedInput({
146 WrappedComponent: Input,
147 validators: [
148 validateShard
149 ],
150 transformers: [
151 ]
152});
154export {
155 Button,
156 CheckboxButton,
157 UploadButton,
158 Anchor,
159 InputCaption,
161 Form,
162 Label,
163 Input,
164 InnerLabel,
165 Textarea,
166 AddressInput,
167 MnemonicInput,
168 GalaxyInput,
169 PointInput,
170 TicketInput,
171 ShardInput,
172 RequiredInput,
173 NetworkKeyInput,
174 NetworkSeedInput,
176 advancedInput,
178 ValidatedSigil,
179 ValidatedBlockie,
180 ShowBlockie,
182 DropdownItem,
183 DropdownDivider,
184 InnerLabelDropdown,
186 Breadcrumb,
187 BreadcrumbItem,
189 Container,
190 Col,
191 Row,
192 // FlexRow,
193 // FlexCol,
194 Spacing,
196 H1,
197 H2,
198 H3,
199 H4,
200 P,
201 Code,
202 Warning,
204 Chevron,
205};