@epilot/base-elements 2.7.13 → 2.7.16

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 (376) hide show
  1. package/dist/Accordion/Accordion.d.ts +3 -3
  2. package/dist/Accordion/Accordion.js +11 -11
  3. package/dist/Accordion/AccordionActions.d.ts +3 -3
  4. package/dist/Accordion/AccordionActions.js +11 -11
  5. package/dist/Accordion/AccordionDetails.d.ts +3 -3
  6. package/dist/Accordion/AccordionDetails.js +11 -11
  7. package/dist/Accordion/AccordionSummary.d.ts +3 -3
  8. package/dist/Accordion/AccordionSummary.js +12 -12
  9. package/dist/Accordion/index.d.ts +5 -5
  10. package/dist/Accordion/index.js +8 -8
  11. package/dist/Accordion/types.d.ts +57 -57
  12. package/dist/Accordion/types.js +2 -2
  13. package/dist/AppBar/AppBar.d.ts +4 -4
  14. package/dist/AppBar/AppBar.js +16 -16
  15. package/dist/AppBar/index.d.ts +2 -2
  16. package/dist/AppBar/index.js +5 -5
  17. package/dist/AppBar/types.d.ts +3 -3
  18. package/dist/AppBar/types.js +2 -2
  19. package/dist/Autocomplete/Autocomplete.d.ts +3 -3
  20. package/dist/Autocomplete/Autocomplete.js +48 -48
  21. package/dist/Autocomplete/index.d.ts +2 -2
  22. package/dist/Autocomplete/index.js +7 -7
  23. package/dist/Autocomplete/styles.d.ts +1 -1
  24. package/dist/Autocomplete/styles.js +14 -14
  25. package/dist/Autocomplete/types.d.ts +65 -65
  26. package/dist/Autocomplete/types.js +2 -2
  27. package/dist/AutocompleteX/AutocompleteX.d.ts +2 -2
  28. package/dist/AutocompleteX/AutocompleteX.js +5 -5
  29. package/dist/AutocompleteX/index.d.ts +2 -2
  30. package/dist/AutocompleteX/index.js +7 -7
  31. package/dist/AutocompleteX/types.d.ts +6 -6
  32. package/dist/AutocompleteX/types.js +2 -2
  33. package/dist/Avatar/Avatar.d.ts +3 -3
  34. package/dist/Avatar/Avatar.js +27 -27
  35. package/dist/Avatar/AvatarGroup.d.ts +3 -3
  36. package/dist/Avatar/AvatarGroup.js +21 -21
  37. package/dist/Avatar/index.d.ts +3 -3
  38. package/dist/Avatar/index.js +9 -9
  39. package/dist/Avatar/types.d.ts +48 -48
  40. package/dist/Avatar/types.js +2 -2
  41. package/dist/Badge/Badge.d.ts +3 -3
  42. package/dist/Badge/Badge.js +11 -11
  43. package/dist/Badge/index.d.ts +2 -2
  44. package/dist/Badge/index.js +5 -5
  45. package/dist/Badge/types.d.ts +2 -2
  46. package/dist/Badge/types.js +2 -2
  47. package/dist/Box/Box.d.ts +3 -3
  48. package/dist/Box/Box.js +11 -11
  49. package/dist/Box/index.d.ts +2 -2
  50. package/dist/Box/index.js +5 -5
  51. package/dist/Box/types.d.ts +2 -2
  52. package/dist/Box/types.js +2 -2
  53. package/dist/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  54. package/dist/Breadcrumbs/Breadcrumbs.js +10 -10
  55. package/dist/Breadcrumbs/index.d.ts +2 -2
  56. package/dist/Breadcrumbs/index.js +7 -7
  57. package/dist/Breadcrumbs/types.d.ts +2 -2
  58. package/dist/Breadcrumbs/types.js +2 -2
  59. package/dist/Button/Button.d.ts +8 -8
  60. package/dist/Button/Button.js +125 -125
  61. package/dist/Button/index.d.ts +2 -2
  62. package/dist/Button/index.js +5 -5
  63. package/dist/Button/types.d.ts +21 -21
  64. package/dist/Button/types.js +2 -2
  65. package/dist/ButtonGroup/ButtonGroup.d.ts +3 -3
  66. package/dist/ButtonGroup/ButtonGroup.js +11 -11
  67. package/dist/ButtonGroup/index.d.ts +2 -2
  68. package/dist/ButtonGroup/index.js +5 -5
  69. package/dist/ButtonGroup/types.d.ts +37 -37
  70. package/dist/ButtonGroup/types.js +2 -2
  71. package/dist/Card/Card.d.ts +8 -8
  72. package/dist/Card/Card.js +36 -36
  73. package/dist/Card/index.d.ts +2 -2
  74. package/dist/Card/index.js +5 -5
  75. package/dist/Card/types.d.ts +7 -7
  76. package/dist/Card/types.js +2 -2
  77. package/dist/Checkbox/Checkbox.d.ts +3 -3
  78. package/dist/Checkbox/Checkbox.js +27 -27
  79. package/dist/Checkbox/index.d.ts +2 -2
  80. package/dist/Checkbox/index.js +5 -5
  81. package/dist/Checkbox/types.d.ts +84 -84
  82. package/dist/Checkbox/types.js +2 -2
  83. package/dist/Chip/Chip.d.ts +3 -3
  84. package/dist/Chip/Chip.js +16 -16
  85. package/dist/Chip/RandomColoredChip.d.ts +3 -3
  86. package/dist/Chip/RandomColoredChip.js +33 -33
  87. package/dist/Chip/index.d.ts +2 -2
  88. package/dist/Chip/index.js +5 -5
  89. package/dist/Chip/types.d.ts +13 -13
  90. package/dist/Chip/types.js +2 -2
  91. package/dist/Collapse/Collapse.d.ts +3 -3
  92. package/dist/Collapse/Collapse.js +11 -11
  93. package/dist/Collapse/index.d.ts +2 -2
  94. package/dist/Collapse/index.js +5 -5
  95. package/dist/Collapse/types.d.ts +2 -2
  96. package/dist/Collapse/types.js +2 -2
  97. package/dist/Dialog/Dialog.d.ts +7 -7
  98. package/dist/Dialog/Dialog.js +31 -31
  99. package/dist/Dialog/index.d.ts +2 -2
  100. package/dist/Dialog/index.js +5 -5
  101. package/dist/Dialog/types.d.ts +157 -157
  102. package/dist/Dialog/types.js +2 -2
  103. package/dist/Divider/Divider.d.ts +3 -3
  104. package/dist/Divider/Divider.js +10 -10
  105. package/dist/Divider/index.d.ts +2 -2
  106. package/dist/Divider/index.js +5 -5
  107. package/dist/Divider/types.d.ts +2 -2
  108. package/dist/Divider/types.js +2 -2
  109. package/dist/Drawer/Drawer.d.ts +3 -3
  110. package/dist/Drawer/Drawer.js +11 -11
  111. package/dist/Drawer/index.d.ts +2 -2
  112. package/dist/Drawer/index.js +5 -5
  113. package/dist/Drawer/types.d.ts +2 -2
  114. package/dist/Drawer/types.js +2 -2
  115. package/dist/Drawer360/ActionFooter.d.ts +13 -12
  116. package/dist/Drawer360/ActionFooter.js +108 -102
  117. package/dist/Drawer360/ActionFooter.js.map +1 -1
  118. package/dist/Drawer360/DiscardDialog.d.ts +10 -10
  119. package/dist/Drawer360/DiscardDialog.js +48 -48
  120. package/dist/Drawer360/Drawer360.d.ts +3 -3
  121. package/dist/Drawer360/Drawer360.js +95 -97
  122. package/dist/Drawer360/Drawer360.js.map +1 -1
  123. package/dist/Drawer360/helpers.d.ts +3 -3
  124. package/dist/Drawer360/helpers.js +61 -61
  125. package/dist/Drawer360/index.d.ts +2 -2
  126. package/dist/Drawer360/index.js +5 -5
  127. package/dist/Drawer360/types.d.ts +30 -30
  128. package/dist/Drawer360/types.js +2 -2
  129. package/dist/Form/FormControl.d.ts +2 -2
  130. package/dist/Form/FormControl.js +4 -4
  131. package/dist/Form/FormControlLabel.d.ts +2 -2
  132. package/dist/Form/FormControlLabel.js +4 -4
  133. package/dist/Form/FormGroup.d.ts +2 -2
  134. package/dist/Form/FormGroup.js +5 -5
  135. package/dist/Form/FormHelperText.d.ts +2 -2
  136. package/dist/Form/FormHelperText.js +4 -4
  137. package/dist/Form/FormLabel.d.ts +2 -2
  138. package/dist/Form/FormLabel.js +4 -4
  139. package/dist/Form/InputAdornment.d.ts +2 -2
  140. package/dist/Form/InputAdornment.js +4 -4
  141. package/dist/Form/InputLabel.d.ts +2 -2
  142. package/dist/Form/InputLabel.js +4 -4
  143. package/dist/Form/index.d.ts +8 -8
  144. package/dist/Form/index.js +19 -19
  145. package/dist/Form/types.d.ts +9 -9
  146. package/dist/Form/types.js +2 -2
  147. package/dist/Grid/Grid.d.ts +3 -3
  148. package/dist/Grid/Grid.js +10 -10
  149. package/dist/Grid/index.d.ts +2 -2
  150. package/dist/Grid/index.js +5 -5
  151. package/dist/Grid/types.d.ts +2 -2
  152. package/dist/Grid/types.js +2 -2
  153. package/dist/Hidden/Hidden.d.ts +3 -3
  154. package/dist/Hidden/Hidden.js +11 -11
  155. package/dist/Hidden/index.d.ts +2 -2
  156. package/dist/Hidden/index.js +5 -5
  157. package/dist/Hidden/types.d.ts +8 -8
  158. package/dist/Hidden/types.js +2 -2
  159. package/dist/Icon/Icon.d.ts +5 -5
  160. package/dist/Icon/Icon.js +57 -57
  161. package/dist/Icon/index.d.ts +2 -2
  162. package/dist/Icon/index.js +9 -9
  163. package/dist/Icon/types.d.ts +46 -46
  164. package/dist/Icon/types.js +2 -2
  165. package/dist/Image/Image.d.ts +3 -3
  166. package/dist/Image/Image.js +22 -22
  167. package/dist/Image/index.d.ts +2 -2
  168. package/dist/Image/index.js +7 -7
  169. package/dist/Image/types.d.ts +21 -21
  170. package/dist/Image/types.js +2 -2
  171. package/dist/Link/Link.d.ts +3 -3
  172. package/dist/Link/Link.js +10 -10
  173. package/dist/Link/index.d.ts +2 -2
  174. package/dist/Link/index.js +7 -7
  175. package/dist/Link/types.d.ts +41 -41
  176. package/dist/Link/types.js +2 -2
  177. package/dist/List/List.d.ts +8 -8
  178. package/dist/List/List.js +36 -36
  179. package/dist/List/index.d.ts +2 -2
  180. package/dist/List/index.js +5 -5
  181. package/dist/List/types.d.ts +7 -7
  182. package/dist/List/types.js +2 -2
  183. package/dist/Menu/Menu.d.ts +6 -6
  184. package/dist/Menu/Menu.js +9 -9
  185. package/dist/Menu/index.d.ts +2 -2
  186. package/dist/Menu/index.js +5 -5
  187. package/dist/Menu/types.d.ts +71 -71
  188. package/dist/Menu/types.js +2 -2
  189. package/dist/Notification/Notification.d.ts +5 -5
  190. package/dist/Notification/Notification.js +51 -51
  191. package/dist/Notification/index.d.ts +2 -2
  192. package/dist/Notification/index.js +9 -9
  193. package/dist/Notification/types.d.ts +7 -7
  194. package/dist/Notification/types.js +2 -2
  195. package/dist/Pagination/Pagination.d.ts +4 -4
  196. package/dist/Pagination/Pagination.js +193 -193
  197. package/dist/Pagination/PaginationHelper.d.ts +6 -6
  198. package/dist/Pagination/PaginationHelper.js +123 -123
  199. package/dist/Pagination/index.d.ts +2 -2
  200. package/dist/Pagination/index.js +7 -7
  201. package/dist/Pagination/types.d.ts +29 -29
  202. package/dist/Pagination/types.js +8 -8
  203. package/dist/Paper/Paper.d.ts +2 -2
  204. package/dist/Paper/Paper.js +5 -5
  205. package/dist/Paper/index.d.ts +2 -2
  206. package/dist/Paper/index.js +5 -5
  207. package/dist/Paper/types.d.ts +2 -2
  208. package/dist/Paper/types.js +2 -2
  209. package/dist/Pickers/DatePicker.d.ts +10 -10
  210. package/dist/Pickers/DatePicker.js +29 -29
  211. package/dist/Pickers/DateTimePicker.d.ts +3 -3
  212. package/dist/Pickers/DateTimePicker.js +24 -24
  213. package/dist/Pickers/TimePicker.d.ts +3 -3
  214. package/dist/Pickers/TimePicker.js +24 -24
  215. package/dist/Pickers/index.d.ts +4 -4
  216. package/dist/Pickers/index.js +7 -7
  217. package/dist/Pickers/types.d.ts +80 -80
  218. package/dist/Pickers/types.js +2 -2
  219. package/dist/Popover/Popover.d.ts +2 -2
  220. package/dist/Popover/Popover.js +5 -5
  221. package/dist/Popover/index.d.ts +3 -3
  222. package/dist/Popover/index.js +7 -7
  223. package/dist/Popover/types.d.ts +2 -2
  224. package/dist/Popover/types.js +2 -2
  225. package/dist/Progress/Progress.d.ts +5 -5
  226. package/dist/Progress/Progress.js +12 -12
  227. package/dist/Progress/index.d.ts +2 -2
  228. package/dist/Progress/index.js +5 -5
  229. package/dist/Progress/types.d.ts +3 -3
  230. package/dist/Progress/types.js +2 -2
  231. package/dist/Radio/Radio.d.ts +3 -3
  232. package/dist/Radio/Radio.js +26 -26
  233. package/dist/Radio/RadioGroup.d.ts +3 -3
  234. package/dist/Radio/RadioGroup.js +9 -9
  235. package/dist/Radio/index.d.ts +3 -3
  236. package/dist/Radio/index.js +9 -9
  237. package/dist/Radio/types.d.ts +46 -46
  238. package/dist/Radio/types.js +2 -2
  239. package/dist/Rating/Rating.d.ts +3 -3
  240. package/dist/Rating/Rating.js +71 -71
  241. package/dist/Rating/index.d.ts +2 -2
  242. package/dist/Rating/index.js +5 -5
  243. package/dist/Rating/types.d.ts +49 -49
  244. package/dist/Rating/types.js +2 -2
  245. package/dist/Select/Select.d.ts +3 -3
  246. package/dist/Select/Select.js +38 -38
  247. package/dist/Select/index.d.ts +2 -2
  248. package/dist/Select/index.js +7 -7
  249. package/dist/Select/types.d.ts +76 -76
  250. package/dist/Select/types.js +2 -2
  251. package/dist/Slide/Slide.d.ts +3 -3
  252. package/dist/Slide/Slide.js +11 -11
  253. package/dist/Slide/index.d.ts +2 -2
  254. package/dist/Slide/index.js +7 -7
  255. package/dist/Slide/types.d.ts +2 -2
  256. package/dist/Slide/types.js +2 -2
  257. package/dist/Snackbar/Snackbar.d.ts +3 -3
  258. package/dist/Snackbar/Snackbar.js +11 -11
  259. package/dist/Snackbar/index.d.ts +2 -2
  260. package/dist/Snackbar/index.js +7 -7
  261. package/dist/Snackbar/types.d.ts +2 -2
  262. package/dist/Snackbar/types.js +2 -2
  263. package/dist/Spacing/Spacing.d.ts +7 -7
  264. package/dist/Spacing/Spacing.js +71 -71
  265. package/dist/Spacing/index.d.ts +2 -2
  266. package/dist/Spacing/index.js +5 -5
  267. package/dist/Spacing/types.d.ts +15 -15
  268. package/dist/Spacing/types.js +2 -2
  269. package/dist/Stepper/MobileStepper.d.ts +3 -3
  270. package/dist/Stepper/MobileStepper.js +10 -10
  271. package/dist/Stepper/Stepper.d.ts +7 -7
  272. package/dist/Stepper/Stepper.js +27 -27
  273. package/dist/Stepper/index.d.ts +3 -3
  274. package/dist/Stepper/index.js +6 -6
  275. package/dist/Stepper/types.d.ts +14 -14
  276. package/dist/Stepper/types.js +2 -2
  277. package/dist/Switch/Switch.d.ts +3 -3
  278. package/dist/Switch/Switch.js +10 -10
  279. package/dist/Switch/index.d.ts +2 -2
  280. package/dist/Switch/index.js +7 -7
  281. package/dist/Switch/types.d.ts +12 -12
  282. package/dist/Switch/types.js +2 -2
  283. package/dist/Table/ResizeTableCell/ResizeTableCell.d.ts +11 -11
  284. package/dist/Table/ResizeTableCell/ResizeTableCell.js +94 -94
  285. package/dist/Table/ResizeTableCell/ResizeTableCellStyles.d.ts +2 -2
  286. package/dist/Table/ResizeTableCell/ResizeTableCellStyles.js +60 -60
  287. package/dist/Table/ResizeTableCell/ResizeTableContext.d.ts +15 -15
  288. package/dist/Table/ResizeTableCell/ResizeTableContext.js +16 -16
  289. package/dist/Table/Table.d.ts +8 -8
  290. package/dist/Table/Table.js +11 -11
  291. package/dist/Table/index.d.ts +4 -4
  292. package/dist/Table/index.js +7 -7
  293. package/dist/Table/types.d.ts +7 -7
  294. package/dist/Table/types.js +2 -2
  295. package/dist/TableColumnSettings/TableColumnSettings.d.ts +4 -4
  296. package/dist/TableColumnSettings/TableColumnSettings.js +131 -131
  297. package/dist/TableColumnSettings/TableColumnSettingsStyles.d.ts +1 -1
  298. package/dist/TableColumnSettings/TableColumnSettingsStyles.js +83 -83
  299. package/dist/TableColumnSettings/index.d.ts +3 -3
  300. package/dist/TableColumnSettings/index.js +7 -7
  301. package/dist/TableColumnSettings/types.d.ts +14 -14
  302. package/dist/TableColumnSettings/types.js +2 -2
  303. package/dist/Tabs/Tabs.d.ts +10 -10
  304. package/dist/Tabs/Tabs.js +135 -135
  305. package/dist/Tabs/index.d.ts +2 -2
  306. package/dist/Tabs/index.js +5 -5
  307. package/dist/Tabs/types.d.ts +13 -13
  308. package/dist/Tabs/types.js +2 -2
  309. package/dist/TextField/CurrencyTextField.d.ts +3 -3
  310. package/dist/TextField/CurrencyTextField.js +22 -22
  311. package/dist/TextField/InlineTextField.d.ts +3 -3
  312. package/dist/TextField/InlineTextField.js +142 -142
  313. package/dist/TextField/MaskedTextField.d.ts +3 -3
  314. package/dist/TextField/MaskedTextField.js +13 -13
  315. package/dist/TextField/TextField.d.ts +3 -3
  316. package/dist/TextField/TextField.js +13 -13
  317. package/dist/TextField/ValidatedTextField.d.ts +3 -3
  318. package/dist/TextField/ValidatedTextField.js +35 -35
  319. package/dist/TextField/index.d.ts +6 -6
  320. package/dist/TextField/index.js +9 -9
  321. package/dist/TextField/styles.d.ts +2 -2
  322. package/dist/TextField/styles.js +13 -13
  323. package/dist/TextField/types.d.ts +63 -63
  324. package/dist/TextField/types.js +2 -2
  325. package/dist/ThemeProvider/DefaultEpilotTheme.d.ts +2 -2
  326. package/dist/ThemeProvider/DefaultEpilotTheme.js +312 -312
  327. package/dist/ThemeProvider/ThemeProvider.d.ts +3 -3
  328. package/dist/ThemeProvider/ThemeProvider.js +30 -30
  329. package/dist/ThemeProvider/fonts.d.ts +8 -8
  330. package/dist/ThemeProvider/fonts.js +13 -13
  331. package/dist/ThemeProvider/index.d.ts +3 -3
  332. package/dist/ThemeProvider/index.js +8 -8
  333. package/dist/ThemeProvider/mapping.d.ts +10 -10
  334. package/dist/ThemeProvider/mapping.js +846 -846
  335. package/dist/ThemeProvider/types.d.ts +136 -136
  336. package/dist/ThemeProvider/types.js +2 -2
  337. package/dist/ToggleButton/ToggleButton.d.ts +3 -3
  338. package/dist/ToggleButton/ToggleButton.js +12 -12
  339. package/dist/ToggleButton/index.d.ts +2 -2
  340. package/dist/ToggleButton/index.js +5 -5
  341. package/dist/ToggleButton/types.d.ts +27 -27
  342. package/dist/ToggleButton/types.js +2 -2
  343. package/dist/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -3
  344. package/dist/ToggleButtonGroup/ToggleButtonGroup.js +12 -12
  345. package/dist/ToggleButtonGroup/index.d.ts +2 -2
  346. package/dist/ToggleButtonGroup/index.js +5 -5
  347. package/dist/ToggleButtonGroup/types.d.ts +2 -2
  348. package/dist/ToggleButtonGroup/types.js +2 -2
  349. package/dist/Tooltip/Tooltip.d.ts +3 -3
  350. package/dist/Tooltip/Tooltip.js +22 -22
  351. package/dist/Tooltip/index.d.ts +2 -2
  352. package/dist/Tooltip/index.js +5 -5
  353. package/dist/Tooltip/types.d.ts +8 -8
  354. package/dist/Tooltip/types.js +2 -2
  355. package/dist/Typography/Typography.d.ts +13 -13
  356. package/dist/Typography/Typography.js +60 -60
  357. package/dist/Typography/index.d.ts +3 -3
  358. package/dist/Typography/index.js +22 -22
  359. package/dist/Typography/types.d.ts +7 -7
  360. package/dist/Typography/types.js +2 -2
  361. package/dist/bundle.js +19 -19
  362. package/dist/bundle.js.map +1 -1
  363. package/dist/config.d.ts +1 -1
  364. package/dist/config.js +6 -6
  365. package/dist/context/ClassPrefixContext.d.ts +9 -9
  366. package/dist/context/ClassPrefixContext.js +14 -14
  367. package/dist/index.d.ts +51 -51
  368. package/dist/index.js +54 -54
  369. package/dist/styles/index.d.ts +1 -1
  370. package/dist/styles/index.js +4 -4
  371. package/dist/styles/styles.d.ts +3 -3
  372. package/dist/styles/styles.js +18 -18
  373. package/dist/utils.d.ts +7 -7
  374. package/dist/utils.js +27 -27
  375. package/package.json +1 -1
  376. package/CHANGELOG.md +0 -992
@@ -1,143 +1,143 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.InlineTextField = void 0;
4
- var tslib_1 = require("tslib");
5
- var core_1 = require("@material-ui/core");
6
- var react_1 = tslib_1.__importStar(require("react"));
7
- var Button_1 = require("../Button");
8
- var Icon_1 = require("../Icon");
9
- var styles_1 = require("../styles");
10
- var useStyles = styles_1.makeStyles(function () {
11
- return styles_1.createStyles({
12
- withLabel: {
13
- '& div': {
14
- backgroundColor: 'transparent',
15
- '& fieldset': {
16
- borderWidth: 0
17
- }
18
- }
19
- },
20
- sizes: function (_a) {
21
- var size = _a.size;
22
- return ({
23
- '& div': getSizeStyle(size)
24
- });
25
- }
26
- });
27
- });
28
- function getSizeStyle(size) {
29
- switch (size) {
30
- case 'medium':
31
- return {
32
- paddingRight: 14,
33
- fontSize: 16,
34
- height: 40,
35
- '& input': {
36
- paddingLeft: 10
37
- },
38
- '& i': {
39
- fontSize: '12px !important'
40
- }
41
- };
42
- case 'small':
43
- return {
44
- paddingRight: 10,
45
- fontSize: 14,
46
- height: 32,
47
- '& input': {
48
- paddingLeft: 8
49
- },
50
- '& i': {
51
- fontSize: '12px !important'
52
- }
53
- };
54
- case 'large':
55
- return {
56
- paddingRight: 14,
57
- fontSize: 16,
58
- height: 48,
59
- '& i': {
60
- fontSize: '12px !important'
61
- }
62
- };
63
- case 'veryLarge':
64
- return {
65
- paddingRight: 16,
66
- fontSize: 20,
67
- height: 56,
68
- '& i': {
69
- fontSize: '16px !important'
70
- }
71
- };
72
- case 'verySmall':
73
- return {
74
- paddingRight: 8,
75
- fontSize: 12,
76
- height: 24,
77
- '& input': {
78
- paddingLeft: 8
79
- },
80
- '& i': {
81
- fontSize: '8px !important'
82
- }
83
- };
84
- default:
85
- return {};
86
- }
87
- }
88
- function InlineTextField(props) {
89
- var initialValue = props.value, onChange = props.onChange, containerStyle = props.containerStyle, isLabel = props.isLabel, compact = props.compact, _a = props.inputProps, inputProps = _a === void 0 ? {} : _a, labelStyle = props.labelStyle, _b = props.clickAwayAction, clickAwayAction = _b === void 0 ? 'ABORT' : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, rest = tslib_1.__rest(props, ["value", "onChange", "containerStyle", "isLabel", "compact", "inputProps", "labelStyle", "clickAwayAction", "size"]);
90
- var style = inputProps.style, restinputProps = tslib_1.__rest(inputProps, ["style"]);
91
- var classes = useStyles(props);
92
- var _d = react_1.useState(false), showControls = _d[0], setShowControls = _d[1];
93
- var _e = react_1.useState(false), showEditingIcon = _e[0], setShowEditingIcon = _e[1];
94
- var _f = react_1.useState(initialValue), value = _f[0], setValue = _f[1];
95
- react_1.useEffect(function () {
96
- setValue(initialValue);
97
- }, [initialValue]);
98
- var theme = styles_1.useTheme();
99
- var onClickCheck = function () {
100
- onChange &&
101
- onChange({ target: { value: value } });
102
- setShowControls(false);
103
- };
104
- var onClickCancel = function () {
105
- onChange &&
106
- onChange({
107
- target: { value: initialValue }
108
- });
109
- setValue(initialValue);
110
- setShowControls(false);
111
- };
112
- var onFormSubmit = function (e) {
113
- e.preventDefault();
114
- setShowControls(false);
115
- onChange &&
116
- onChange({ target: { value: value } });
117
- };
118
- var handleKeyDown = function (e) {
119
- if (e && e.keyCode === 27) {
120
- onClickCancel();
121
- }
122
- };
123
- return (react_1["default"].createElement("form", { onSubmit: onFormSubmit, style: tslib_1.__assign({ position: 'relative', display: 'inline-flex', flexDirection: 'column', alignItems: 'flex-end' }, containerStyle) },
124
- react_1["default"].createElement(core_1.TextField, tslib_1.__assign({ InputProps: {
125
- endAdornment: (react_1["default"].createElement(Icon_1.EIcon, { color: "secondary", name: "pencil2", style: {
126
- visibility: showEditingIcon && !showControls ? 'visible' : 'hidden'
127
- } }))
128
- }, className: classes.sizes + " " + (isLabel ? classes.withLabel : ''), inputProps: tslib_1.__assign(tslib_1.__assign({ size: compact && typeof value === 'string' ? value.length + 1 : undefined, maxLength: compact && typeof value === 'string' ? value.length + 1 : undefined }, restinputProps), { style: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, style), labelStyle), { color: showControls || showEditingIcon
129
- ? theme.palette.text.primary
130
- : (labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.color) || (style === null || style === void 0 ? void 0 : style.color) }) }), onBlur: function () {
131
- return clickAwayAction === 'ABORT' ? onClickCancel() : onClickCheck();
132
- }, onChange: function (e) { return setValue(e.target.value); }, onFocus: function () { return setShowControls(true); }, onKeyDown: handleKeyDown, onMouseEnter: function () { return setShowEditingIcon(true); }, onMouseLeave: function () { return setShowEditingIcon(false); }, value: value, variant: "outlined" }, rest)),
133
- showControls && renderControls(onClickCheck, onClickCancel)));
134
- }
135
- exports.InlineTextField = InlineTextField;
136
- function renderControls(onClickCheck, onClickCancel) {
137
- return (react_1["default"].createElement("span", { style: { position: 'absolute', top: '100%', marginTop: 4, lineHeight: 1 } },
138
- react_1["default"].createElement(Button_1.ElevatedIconButton, { onMouseDown: onClickCheck, variant: "rounded" },
139
- react_1["default"].createElement(Icon_1.EIcon, { color: "secondary", fontSize: 16, name: "check" })),
140
- react_1["default"].createElement(Button_1.ElevatedIconButton, { onMouseDown: onClickCancel, style: { marginLeft: 4 }, variant: "rounded" },
141
- react_1["default"].createElement(Icon_1.EIcon, { fontSize: 16, name: "x" }))));
142
- }
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.InlineTextField = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("@material-ui/core");
6
+ var react_1 = tslib_1.__importStar(require("react"));
7
+ var Button_1 = require("../Button");
8
+ var Icon_1 = require("../Icon");
9
+ var styles_1 = require("../styles");
10
+ var useStyles = styles_1.makeStyles(function () {
11
+ return styles_1.createStyles({
12
+ withLabel: {
13
+ '& div': {
14
+ backgroundColor: 'transparent',
15
+ '& fieldset': {
16
+ borderWidth: 0
17
+ }
18
+ }
19
+ },
20
+ sizes: function (_a) {
21
+ var size = _a.size;
22
+ return ({
23
+ '& div': getSizeStyle(size)
24
+ });
25
+ }
26
+ });
27
+ });
28
+ function getSizeStyle(size) {
29
+ switch (size) {
30
+ case 'medium':
31
+ return {
32
+ paddingRight: 14,
33
+ fontSize: 16,
34
+ height: 40,
35
+ '& input': {
36
+ paddingLeft: 10
37
+ },
38
+ '& i': {
39
+ fontSize: '12px !important'
40
+ }
41
+ };
42
+ case 'small':
43
+ return {
44
+ paddingRight: 10,
45
+ fontSize: 14,
46
+ height: 32,
47
+ '& input': {
48
+ paddingLeft: 8
49
+ },
50
+ '& i': {
51
+ fontSize: '12px !important'
52
+ }
53
+ };
54
+ case 'large':
55
+ return {
56
+ paddingRight: 14,
57
+ fontSize: 16,
58
+ height: 48,
59
+ '& i': {
60
+ fontSize: '12px !important'
61
+ }
62
+ };
63
+ case 'veryLarge':
64
+ return {
65
+ paddingRight: 16,
66
+ fontSize: 20,
67
+ height: 56,
68
+ '& i': {
69
+ fontSize: '16px !important'
70
+ }
71
+ };
72
+ case 'verySmall':
73
+ return {
74
+ paddingRight: 8,
75
+ fontSize: 12,
76
+ height: 24,
77
+ '& input': {
78
+ paddingLeft: 8
79
+ },
80
+ '& i': {
81
+ fontSize: '8px !important'
82
+ }
83
+ };
84
+ default:
85
+ return {};
86
+ }
87
+ }
88
+ function InlineTextField(props) {
89
+ var initialValue = props.value, onChange = props.onChange, containerStyle = props.containerStyle, isLabel = props.isLabel, compact = props.compact, _a = props.inputProps, inputProps = _a === void 0 ? {} : _a, labelStyle = props.labelStyle, _b = props.clickAwayAction, clickAwayAction = _b === void 0 ? 'ABORT' : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, rest = tslib_1.__rest(props, ["value", "onChange", "containerStyle", "isLabel", "compact", "inputProps", "labelStyle", "clickAwayAction", "size"]);
90
+ var style = inputProps.style, restinputProps = tslib_1.__rest(inputProps, ["style"]);
91
+ var classes = useStyles(props);
92
+ var _d = react_1.useState(false), showControls = _d[0], setShowControls = _d[1];
93
+ var _e = react_1.useState(false), showEditingIcon = _e[0], setShowEditingIcon = _e[1];
94
+ var _f = react_1.useState(initialValue), value = _f[0], setValue = _f[1];
95
+ react_1.useEffect(function () {
96
+ setValue(initialValue);
97
+ }, [initialValue]);
98
+ var theme = styles_1.useTheme();
99
+ var onClickCheck = function () {
100
+ onChange &&
101
+ onChange({ target: { value: value } });
102
+ setShowControls(false);
103
+ };
104
+ var onClickCancel = function () {
105
+ onChange &&
106
+ onChange({
107
+ target: { value: initialValue }
108
+ });
109
+ setValue(initialValue);
110
+ setShowControls(false);
111
+ };
112
+ var onFormSubmit = function (e) {
113
+ e.preventDefault();
114
+ setShowControls(false);
115
+ onChange &&
116
+ onChange({ target: { value: value } });
117
+ };
118
+ var handleKeyDown = function (e) {
119
+ if (e && e.keyCode === 27) {
120
+ onClickCancel();
121
+ }
122
+ };
123
+ return (react_1["default"].createElement("form", { onSubmit: onFormSubmit, style: tslib_1.__assign({ position: 'relative', display: 'inline-flex', flexDirection: 'column', alignItems: 'flex-end' }, containerStyle) },
124
+ react_1["default"].createElement(core_1.TextField, tslib_1.__assign({ InputProps: {
125
+ endAdornment: (react_1["default"].createElement(Icon_1.EIcon, { color: "secondary", name: "pencil2", style: {
126
+ visibility: showEditingIcon && !showControls ? 'visible' : 'hidden'
127
+ } }))
128
+ }, className: classes.sizes + " " + (isLabel ? classes.withLabel : ''), inputProps: tslib_1.__assign(tslib_1.__assign({ size: compact && typeof value === 'string' ? value.length + 1 : undefined, maxLength: compact && typeof value === 'string' ? value.length + 1 : undefined }, restinputProps), { style: tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, style), labelStyle), { color: showControls || showEditingIcon
129
+ ? theme.palette.text.primary
130
+ : (labelStyle === null || labelStyle === void 0 ? void 0 : labelStyle.color) || (style === null || style === void 0 ? void 0 : style.color) }) }), onBlur: function () {
131
+ return clickAwayAction === 'ABORT' ? onClickCancel() : onClickCheck();
132
+ }, onChange: function (e) { return setValue(e.target.value); }, onFocus: function () { return setShowControls(true); }, onKeyDown: handleKeyDown, onMouseEnter: function () { return setShowEditingIcon(true); }, onMouseLeave: function () { return setShowEditingIcon(false); }, value: value, variant: "outlined" }, rest)),
133
+ showControls && renderControls(onClickCheck, onClickCancel)));
134
+ }
135
+ exports.InlineTextField = InlineTextField;
136
+ function renderControls(onClickCheck, onClickCancel) {
137
+ return (react_1["default"].createElement("span", { style: { position: 'absolute', top: '100%', marginTop: 4, lineHeight: 1 } },
138
+ react_1["default"].createElement(Button_1.ElevatedIconButton, { onMouseDown: onClickCheck, variant: "rounded" },
139
+ react_1["default"].createElement(Icon_1.EIcon, { color: "secondary", fontSize: 16, name: "check" })),
140
+ react_1["default"].createElement(Button_1.ElevatedIconButton, { onMouseDown: onClickCancel, style: { marginLeft: 4 }, variant: "rounded" },
141
+ react_1["default"].createElement(Icon_1.EIcon, { fontSize: 16, name: "x" }))));
142
+ }
143
143
  //# sourceMappingURL=InlineTextField.js.map
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { MaskedTextFieldProps } from './types';
3
- export declare function MaskedTextField(props: MaskedTextFieldProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { MaskedTextFieldProps } from './types';
3
+ export declare function MaskedTextField(props: MaskedTextFieldProps): JSX.Element;
@@ -1,14 +1,14 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.MaskedTextField = void 0;
4
- var tslib_1 = require("tslib");
5
- var react_1 = tslib_1.__importDefault(require("react"));
6
- var react_input_mask_1 = tslib_1.__importDefault(require("react-input-mask"));
7
- var TextField_1 = require("./TextField");
8
- function MaskedTextField(props) {
9
- var textFieldProps = props.textFieldProps, required = props.required, inputRef = props.inputRef, rest = tslib_1.__rest(props, ["textFieldProps", "required", "inputRef"]);
10
- var onChange = textFieldProps.onChange, onMouseDown = textFieldProps.onMouseDown, onFocus = textFieldProps.onFocus, onBlur = textFieldProps.onBlur, value = textFieldProps.value, disabled = textFieldProps.disabled, otherTextFieldProps = tslib_1.__rest(textFieldProps, ["onChange", "onMouseDown", "onFocus", "onBlur", "value", "disabled"]);
11
- return (react_1["default"].createElement(react_input_mask_1["default"], tslib_1.__assign({ disabled: disabled, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onMouseDown: onMouseDown, value: value }, rest), function () { return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({ inputRef: inputRef, required: required }, otherTextFieldProps))); }));
12
- }
13
- exports.MaskedTextField = MaskedTextField;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.MaskedTextField = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importDefault(require("react"));
6
+ var react_input_mask_1 = tslib_1.__importDefault(require("react-input-mask"));
7
+ var TextField_1 = require("./TextField");
8
+ function MaskedTextField(props) {
9
+ var textFieldProps = props.textFieldProps, required = props.required, inputRef = props.inputRef, rest = tslib_1.__rest(props, ["textFieldProps", "required", "inputRef"]);
10
+ var onChange = textFieldProps.onChange, onMouseDown = textFieldProps.onMouseDown, onFocus = textFieldProps.onFocus, onBlur = textFieldProps.onBlur, value = textFieldProps.value, disabled = textFieldProps.disabled, otherTextFieldProps = tslib_1.__rest(textFieldProps, ["onChange", "onMouseDown", "onFocus", "onBlur", "value", "disabled"]);
11
+ return (react_1["default"].createElement(react_input_mask_1["default"], tslib_1.__assign({ disabled: disabled, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onMouseDown: onMouseDown, value: value }, rest), function () { return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({ inputRef: inputRef, required: required }, otherTextFieldProps))); }));
12
+ }
13
+ exports.MaskedTextField = MaskedTextField;
14
14
  //# sourceMappingURL=MaskedTextField.js.map
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { TextFieldProps } from './types';
3
- export declare function TextField({ InputProps, customBackgroundColor, ...props }: TextFieldProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { TextFieldProps } from './types';
3
+ export declare function TextField({ InputProps, customBackgroundColor, ...props }: TextFieldProps): JSX.Element;
@@ -1,14 +1,14 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.TextField = void 0;
4
- var tslib_1 = require("tslib");
5
- var core_1 = require("@material-ui/core");
6
- var react_1 = tslib_1.__importDefault(require("react"));
7
- var styles_1 = require("./styles");
8
- function TextField(_a) {
9
- var InputProps = _a.InputProps, customBackgroundColor = _a.customBackgroundColor, props = tslib_1.__rest(_a, ["InputProps", "customBackgroundColor"]);
10
- var classes = styles_1.useTextFieldStyles(tslib_1.__assign({ customBackgroundColor: customBackgroundColor }, props));
11
- return react_1["default"].createElement(core_1.TextField, tslib_1.__assign({ InputProps: tslib_1.__assign({ classes: classes }, InputProps) }, props));
12
- }
13
- exports.TextField = TextField;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.TextField = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var core_1 = require("@material-ui/core");
6
+ var react_1 = tslib_1.__importDefault(require("react"));
7
+ var styles_1 = require("./styles");
8
+ function TextField(_a) {
9
+ var InputProps = _a.InputProps, customBackgroundColor = _a.customBackgroundColor, props = tslib_1.__rest(_a, ["InputProps", "customBackgroundColor"]);
10
+ var classes = styles_1.useTextFieldStyles(tslib_1.__assign({ customBackgroundColor: customBackgroundColor }, props));
11
+ return react_1["default"].createElement(core_1.TextField, tslib_1.__assign({ InputProps: tslib_1.__assign({ classes: classes }, InputProps) }, props));
12
+ }
13
+ exports.TextField = TextField;
14
14
  //# sourceMappingURL=TextField.js.map
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- import { ValidatedTextFieldProps } from './types';
3
- export declare function ValidatedTextField(props: ValidatedTextFieldProps): JSX.Element;
1
+ /// <reference types="react" />
2
+ import { ValidatedTextFieldProps } from './types';
3
+ export declare function ValidatedTextField(props: ValidatedTextFieldProps): JSX.Element;
@@ -1,36 +1,36 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.ValidatedTextField = void 0;
4
- var tslib_1 = require("tslib");
5
- var react_1 = tslib_1.__importStar(require("react"));
6
- var TextField_1 = require("./TextField");
7
- function ValidatedTextField(props) {
8
- var onError = props.onError, onChange = props.onChange, validationRegEx = props.validationRegEx, value = props.value, variant = props.variant, rest = tslib_1.__rest(props, ["onError", "onChange", "validationRegEx", "value", "variant"]);
9
- var _a = react_1.useState(false), error = _a[0], setError = _a[1];
10
- var handleChange = function (event) {
11
- // is valid
12
- var isValid = validationRegEx.test(event.target.value);
13
- // show error if it does not match
14
- if (isValid) {
15
- setError(false);
16
- // fire the callback if any
17
- if (onError) {
18
- onError(false);
19
- }
20
- }
21
- else {
22
- setError(true);
23
- // fire the callback if any
24
- if (onError) {
25
- onError(true);
26
- }
27
- }
28
- // fire the callback for change
29
- if (onChange) {
30
- onChange(event);
31
- }
32
- };
33
- return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({}, rest, { error: error, onChange: handleChange, value: value, variant: variant })));
34
- }
35
- exports.ValidatedTextField = ValidatedTextField;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ValidatedTextField = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = tslib_1.__importStar(require("react"));
6
+ var TextField_1 = require("./TextField");
7
+ function ValidatedTextField(props) {
8
+ var onError = props.onError, onChange = props.onChange, validationRegEx = props.validationRegEx, value = props.value, variant = props.variant, rest = tslib_1.__rest(props, ["onError", "onChange", "validationRegEx", "value", "variant"]);
9
+ var _a = react_1.useState(false), error = _a[0], setError = _a[1];
10
+ var handleChange = function (event) {
11
+ // is valid
12
+ var isValid = validationRegEx.test(event.target.value);
13
+ // show error if it does not match
14
+ if (isValid) {
15
+ setError(false);
16
+ // fire the callback if any
17
+ if (onError) {
18
+ onError(false);
19
+ }
20
+ }
21
+ else {
22
+ setError(true);
23
+ // fire the callback if any
24
+ if (onError) {
25
+ onError(true);
26
+ }
27
+ }
28
+ // fire the callback for change
29
+ if (onChange) {
30
+ onChange(event);
31
+ }
32
+ };
33
+ return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({}, rest, { error: error, onChange: handleChange, value: value, variant: variant })));
34
+ }
35
+ exports.ValidatedTextField = ValidatedTextField;
36
36
  //# sourceMappingURL=ValidatedTextField.js.map
@@ -1,6 +1,6 @@
1
- export * from './TextField';
2
- export * from './MaskedTextField';
3
- export * from './ValidatedTextField';
4
- export * from './CurrencyTextField';
5
- export * from './types';
6
- export * from './InlineTextField';
1
+ export * from './TextField';
2
+ export * from './MaskedTextField';
3
+ export * from './ValidatedTextField';
4
+ export * from './CurrencyTextField';
5
+ export * from './types';
6
+ export * from './InlineTextField';
@@ -1,10 +1,10 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./TextField"), exports);
5
- tslib_1.__exportStar(require("./MaskedTextField"), exports);
6
- tslib_1.__exportStar(require("./ValidatedTextField"), exports);
7
- tslib_1.__exportStar(require("./CurrencyTextField"), exports);
8
- tslib_1.__exportStar(require("./types"), exports);
9
- tslib_1.__exportStar(require("./InlineTextField"), exports);
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./TextField"), exports);
5
+ tslib_1.__exportStar(require("./MaskedTextField"), exports);
6
+ tslib_1.__exportStar(require("./ValidatedTextField"), exports);
7
+ tslib_1.__exportStar(require("./CurrencyTextField"), exports);
8
+ tslib_1.__exportStar(require("./types"), exports);
9
+ tslib_1.__exportStar(require("./InlineTextField"), exports);
10
10
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import { TextFieldProps } from './types';
2
- export declare const useTextFieldStyles: (props: TextFieldProps) => Record<"root", string>;
1
+ import { TextFieldProps } from './types';
2
+ export declare const useTextFieldStyles: (props: TextFieldProps) => Record<"root", string>;
@@ -1,14 +1,14 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.useTextFieldStyles = void 0;
4
- var core_1 = require("@material-ui/core");
5
- exports.useTextFieldStyles = core_1.makeStyles(function () {
6
- return core_1.createStyles({
7
- root: {
8
- backgroundColor: function (props) {
9
- return "" + props.customBackgroundColor;
10
- }
11
- }
12
- });
13
- });
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.useTextFieldStyles = void 0;
4
+ var core_1 = require("@material-ui/core");
5
+ exports.useTextFieldStyles = core_1.makeStyles(function () {
6
+ return core_1.createStyles({
7
+ root: {
8
+ backgroundColor: function (props) {
9
+ return "" + props.customBackgroundColor;
10
+ }
11
+ }
12
+ });
13
+ });
14
14
  //# sourceMappingURL=styles.js.map
@@ -1,63 +1,63 @@
1
- import { TextFieldProps as MuiTextFieldProps } from '@material-ui/core';
2
- import { ChangeEvent, CSSProperties } from 'react';
3
- import { Props as InputMaskProps } from 'react-input-mask';
4
- export declare type TextFieldProps = MuiTextFieldProps & {
5
- /**
6
- * non MUI prop to allow overwriting the default background color
7
- */
8
- customBackgroundColor?: string;
9
- };
10
- export declare type ValidatedTextFieldProps = Omit<TextFieldProps, 'type' | 'onError'> & {
11
- /**
12
- * regular expression that will be used to validate the input
13
- */
14
- validationRegEx: RegExp;
15
- /**
16
- * a callback that will be fired when the email is not valid
17
- * could be used to update the helper text
18
- */
19
- onError?: (isValid: boolean) => void;
20
- };
21
- export declare type MaskedTextFieldProps = InputMaskProps & {
22
- textFieldProps: TextFieldProps;
23
- };
24
- export declare type CurrencyTextFieldProps = TextFieldProps & {
25
- currency: string;
26
- value?: string;
27
- onCurrencyChange?: (value: string) => void;
28
- };
29
- export declare type InlineTextFieldProps = Omit<TextFieldProps, 'onChange' | 'size'> & {
30
- /**
31
- * a callnack that will be triggered when the user clicks save or cancel
32
- * on cancel will NOT pass an event
33
- */
34
- onChange?: (event?: ChangeEvent<HTMLInputElement>) => void;
35
- /**
36
- * a style passed to the form container
37
- */
38
- containerStyle?: CSSProperties;
39
- /**
40
- * is the textfield a label aka. it will not show input styling before hover
41
- * @default false
42
- */
43
- isLabel?: boolean;
44
- /**
45
- * when set to true, the textfield will have the size of the value +1, so it will expand with the value, otherwise it will have the deffault width
46
- * @default false
47
- */
48
- compact?: boolean;
49
- /**
50
- * what action should be triggered when the user click away
51
- * @default ABORT
52
- */
53
- clickAwayAction?: 'SAVE' | 'ABORT';
54
- /**
55
- * the style of the label and the text inside the textfield
56
- */
57
- labelStyle?: CSSProperties;
58
- /**
59
- * field size
60
- * @default 'meduim'
61
- */
62
- size?: 'medium' | 'verySmall' | 'small' | 'large' | 'veryLarge' | 'adaptive';
63
- };
1
+ import { TextFieldProps as MuiTextFieldProps } from '@material-ui/core';
2
+ import { ChangeEvent, CSSProperties } from 'react';
3
+ import { Props as InputMaskProps } from 'react-input-mask';
4
+ export declare type TextFieldProps = MuiTextFieldProps & {
5
+ /**
6
+ * non MUI prop to allow overwriting the default background color
7
+ */
8
+ customBackgroundColor?: string;
9
+ };
10
+ export declare type ValidatedTextFieldProps = Omit<TextFieldProps, 'type' | 'onError'> & {
11
+ /**
12
+ * regular expression that will be used to validate the input
13
+ */
14
+ validationRegEx: RegExp;
15
+ /**
16
+ * a callback that will be fired when the email is not valid
17
+ * could be used to update the helper text
18
+ */
19
+ onError?: (isValid: boolean) => void;
20
+ };
21
+ export declare type MaskedTextFieldProps = InputMaskProps & {
22
+ textFieldProps: TextFieldProps;
23
+ };
24
+ export declare type CurrencyTextFieldProps = TextFieldProps & {
25
+ currency: string;
26
+ value?: string;
27
+ onCurrencyChange?: (value: string) => void;
28
+ };
29
+ export declare type InlineTextFieldProps = Omit<TextFieldProps, 'onChange' | 'size'> & {
30
+ /**
31
+ * a callnack that will be triggered when the user clicks save or cancel
32
+ * on cancel will NOT pass an event
33
+ */
34
+ onChange?: (event?: ChangeEvent<HTMLInputElement>) => void;
35
+ /**
36
+ * a style passed to the form container
37
+ */
38
+ containerStyle?: CSSProperties;
39
+ /**
40
+ * is the textfield a label aka. it will not show input styling before hover
41
+ * @default false
42
+ */
43
+ isLabel?: boolean;
44
+ /**
45
+ * when set to true, the textfield will have the size of the value +1, so it will expand with the value, otherwise it will have the deffault width
46
+ * @default false
47
+ */
48
+ compact?: boolean;
49
+ /**
50
+ * what action should be triggered when the user click away
51
+ * @default ABORT
52
+ */
53
+ clickAwayAction?: 'SAVE' | 'ABORT';
54
+ /**
55
+ * the style of the label and the text inside the textfield
56
+ */
57
+ labelStyle?: CSSProperties;
58
+ /**
59
+ * field size
60
+ * @default 'meduim'
61
+ */
62
+ size?: 'medium' | 'verySmall' | 'small' | 'large' | 'veryLarge' | 'adaptive';
63
+ };