on a54b5ac help sign in
203 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';
20// import Checkbox from './Checkbox';
21import CheckboxButton from './CheckboxButton';
22import Anchor from './Anchor';
23// import ToggleButton from './ToggleButton';
25// Input
26import Form from './Form'
27import Label from './Label';
28import InnerLabel from './InnerLabel';
29import InputCaption from './InputCaption';
30import Input from './Input';
31import Textarea from './Textarea';
32import advancedInput from './advancedInput';
34// Dropdowns
35import DropdownItem from './DropdownItem';
36import DropdownDivider from './DropdownDivider';
37import InnerLabelDropdown from './InnerLabelDropdown';
39// Path Control
40import Breadcrumb from './Breadcrumb';
41import BreadcrumbItem from './BreadcrumbItem';
43// Layout
44import Container from './Container';
45import Col from './Col';
46import Row from './Row';
47// import FlexRow from './FlexRow';
48// import FlexCol from './FlexCol';
49import Spacing from './Spacing';
51// Type
52import H1 from './H1';
53import H2 from './H2';
54import H3 from './H3';
55import H4 from './H4';
56import P from './P';
57import Code from './Code'
58import Warning from './Warning'
60// Misc
61import ValidatedSigil from './ValidatedSigil';
62import ValidatedBlockie from './ValidatedBlockie';
63import Chevron from './icons/Chevron'
64import ShowBlockie from './ShowBlockie'
66// HOC validated form components
68const RequiredInput = advancedInput({
69 WrappedComponent: Input,
70 validators: [
71 validateNotEmpty,
72 ],
73});
76const NetworkKeyInput = advancedInput({
77 WrappedComponent: Input,
78 validators: [
79 validateNotEmpty,
80 validateNetworkKey
81 ],
82});
85const NetworkSeedInput = advancedInput({
86 WrappedComponent: Input,
87 validators: [
88 validateNotEmpty,
89 validateNetworkSeed
90 ],
91});
94const AddressInput = advancedInput({
95 WrappedComponent: Input,
96 validators: [
97 validateEthereumAddress,
98 validateNotEmpty,
99 ],
100});
103const MnemonicInput = advancedInput({
104 WrappedComponent: Textarea,
105 validators: [
106 validateMnemonic,
107 validateNotEmpty,
108 ],
109});
111const GalaxyInput = advancedInput({
112 WrappedComponent: Input,
113 validators: [
114 validateGalaxy,
115 validateNotEmpty,
116 ],
117 transformers: [
118 prependSig,
119 ]
120});
122const PointInput = advancedInput({
123 WrappedComponent: Input,
124 validators: [
125 validatePoint,
126 validateNotEmpty,
127 ],
128 transformers: [
129 prependSig,
130 ]
131});
133const TicketInput = advancedInput({
134 WrappedComponent: Input,
135 validators: [
136 validateTicket,
137 validateNotEmpty,
138 ],
139 transformers: [
140 prependSig,
141 ]
142});
144const ShardInput = advancedInput({
145 WrappedComponent: Input,
146 validators: [
147 validateShard
148 ],
149 transformers: [
150 ]
151});
153export {
154 Button,
155 CheckboxButton,
156 Anchor,
157 InputCaption,
159 Form,
160 Label,
161 Input,
162 InnerLabel,
163 Textarea,
164 AddressInput,
165 MnemonicInput,
166 GalaxyInput,
167 PointInput,
168 TicketInput,
169 ShardInput,
170 RequiredInput,
171 NetworkKeyInput,
172 NetworkSeedInput,
174 advancedInput,
176 ValidatedSigil,
177 ValidatedBlockie,
178 ShowBlockie,
180 DropdownItem,
181 DropdownDivider,
182 InnerLabelDropdown,
184 Breadcrumb,
185 BreadcrumbItem,
187 Container,
188 Col,
189 Row,
190 // FlexRow,
191 // FlexCol,
192 Spacing,
194 H1,
195 H2,
196 H3,
197 H4,
198 P,
199 Code,
200 Warning,
202 Chevron,
203};