@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.
- package/dist/Accordion/Accordion.d.ts +3 -3
- package/dist/Accordion/Accordion.js +11 -11
- package/dist/Accordion/AccordionActions.d.ts +3 -3
- package/dist/Accordion/AccordionActions.js +11 -11
- package/dist/Accordion/AccordionDetails.d.ts +3 -3
- package/dist/Accordion/AccordionDetails.js +11 -11
- package/dist/Accordion/AccordionSummary.d.ts +3 -3
- package/dist/Accordion/AccordionSummary.js +12 -12
- package/dist/Accordion/index.d.ts +5 -5
- package/dist/Accordion/index.js +8 -8
- package/dist/Accordion/types.d.ts +57 -57
- package/dist/Accordion/types.js +2 -2
- package/dist/AppBar/AppBar.d.ts +4 -4
- package/dist/AppBar/AppBar.js +16 -16
- package/dist/AppBar/index.d.ts +2 -2
- package/dist/AppBar/index.js +5 -5
- package/dist/AppBar/types.d.ts +3 -3
- package/dist/AppBar/types.js +2 -2
- package/dist/Autocomplete/Autocomplete.d.ts +3 -3
- package/dist/Autocomplete/Autocomplete.js +48 -48
- package/dist/Autocomplete/index.d.ts +2 -2
- package/dist/Autocomplete/index.js +7 -7
- package/dist/Autocomplete/styles.d.ts +1 -1
- package/dist/Autocomplete/styles.js +14 -14
- package/dist/Autocomplete/types.d.ts +65 -65
- package/dist/Autocomplete/types.js +2 -2
- package/dist/AutocompleteX/AutocompleteX.d.ts +2 -2
- package/dist/AutocompleteX/AutocompleteX.js +5 -5
- package/dist/AutocompleteX/index.d.ts +2 -2
- package/dist/AutocompleteX/index.js +7 -7
- package/dist/AutocompleteX/types.d.ts +6 -6
- package/dist/AutocompleteX/types.js +2 -2
- package/dist/Avatar/Avatar.d.ts +3 -3
- package/dist/Avatar/Avatar.js +27 -27
- package/dist/Avatar/AvatarGroup.d.ts +3 -3
- package/dist/Avatar/AvatarGroup.js +21 -21
- package/dist/Avatar/index.d.ts +3 -3
- package/dist/Avatar/index.js +9 -9
- package/dist/Avatar/types.d.ts +48 -48
- package/dist/Avatar/types.js +2 -2
- package/dist/Badge/Badge.d.ts +3 -3
- package/dist/Badge/Badge.js +11 -11
- package/dist/Badge/index.d.ts +2 -2
- package/dist/Badge/index.js +5 -5
- package/dist/Badge/types.d.ts +2 -2
- package/dist/Badge/types.js +2 -2
- package/dist/Box/Box.d.ts +3 -3
- package/dist/Box/Box.js +11 -11
- package/dist/Box/index.d.ts +2 -2
- package/dist/Box/index.js +5 -5
- package/dist/Box/types.d.ts +2 -2
- package/dist/Box/types.js +2 -2
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/Breadcrumbs/Breadcrumbs.js +10 -10
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +7 -7
- package/dist/Breadcrumbs/types.d.ts +2 -2
- package/dist/Breadcrumbs/types.js +2 -2
- package/dist/Button/Button.d.ts +8 -8
- package/dist/Button/Button.js +125 -125
- package/dist/Button/index.d.ts +2 -2
- package/dist/Button/index.js +5 -5
- package/dist/Button/types.d.ts +21 -21
- package/dist/Button/types.js +2 -2
- package/dist/ButtonGroup/ButtonGroup.d.ts +3 -3
- package/dist/ButtonGroup/ButtonGroup.js +11 -11
- package/dist/ButtonGroup/index.d.ts +2 -2
- package/dist/ButtonGroup/index.js +5 -5
- package/dist/ButtonGroup/types.d.ts +37 -37
- package/dist/ButtonGroup/types.js +2 -2
- package/dist/Card/Card.d.ts +8 -8
- package/dist/Card/Card.js +36 -36
- package/dist/Card/index.d.ts +2 -2
- package/dist/Card/index.js +5 -5
- package/dist/Card/types.d.ts +7 -7
- package/dist/Card/types.js +2 -2
- package/dist/Checkbox/Checkbox.d.ts +3 -3
- package/dist/Checkbox/Checkbox.js +27 -27
- package/dist/Checkbox/index.d.ts +2 -2
- package/dist/Checkbox/index.js +5 -5
- package/dist/Checkbox/types.d.ts +84 -84
- package/dist/Checkbox/types.js +2 -2
- package/dist/Chip/Chip.d.ts +3 -3
- package/dist/Chip/Chip.js +16 -16
- package/dist/Chip/RandomColoredChip.d.ts +3 -3
- package/dist/Chip/RandomColoredChip.js +33 -33
- package/dist/Chip/index.d.ts +2 -2
- package/dist/Chip/index.js +5 -5
- package/dist/Chip/types.d.ts +13 -13
- package/dist/Chip/types.js +2 -2
- package/dist/Collapse/Collapse.d.ts +3 -3
- package/dist/Collapse/Collapse.js +11 -11
- package/dist/Collapse/index.d.ts +2 -2
- package/dist/Collapse/index.js +5 -5
- package/dist/Collapse/types.d.ts +2 -2
- package/dist/Collapse/types.js +2 -2
- package/dist/Dialog/Dialog.d.ts +7 -7
- package/dist/Dialog/Dialog.js +31 -31
- package/dist/Dialog/index.d.ts +2 -2
- package/dist/Dialog/index.js +5 -5
- package/dist/Dialog/types.d.ts +157 -157
- package/dist/Dialog/types.js +2 -2
- package/dist/Divider/Divider.d.ts +3 -3
- package/dist/Divider/Divider.js +10 -10
- package/dist/Divider/index.d.ts +2 -2
- package/dist/Divider/index.js +5 -5
- package/dist/Divider/types.d.ts +2 -2
- package/dist/Divider/types.js +2 -2
- package/dist/Drawer/Drawer.d.ts +3 -3
- package/dist/Drawer/Drawer.js +11 -11
- package/dist/Drawer/index.d.ts +2 -2
- package/dist/Drawer/index.js +5 -5
- package/dist/Drawer/types.d.ts +2 -2
- package/dist/Drawer/types.js +2 -2
- package/dist/Drawer360/ActionFooter.d.ts +13 -12
- package/dist/Drawer360/ActionFooter.js +108 -102
- package/dist/Drawer360/ActionFooter.js.map +1 -1
- package/dist/Drawer360/DiscardDialog.d.ts +10 -10
- package/dist/Drawer360/DiscardDialog.js +48 -48
- package/dist/Drawer360/Drawer360.d.ts +3 -3
- package/dist/Drawer360/Drawer360.js +95 -97
- package/dist/Drawer360/Drawer360.js.map +1 -1
- package/dist/Drawer360/helpers.d.ts +3 -3
- package/dist/Drawer360/helpers.js +61 -61
- package/dist/Drawer360/index.d.ts +2 -2
- package/dist/Drawer360/index.js +5 -5
- package/dist/Drawer360/types.d.ts +30 -30
- package/dist/Drawer360/types.js +2 -2
- package/dist/Form/FormControl.d.ts +2 -2
- package/dist/Form/FormControl.js +4 -4
- package/dist/Form/FormControlLabel.d.ts +2 -2
- package/dist/Form/FormControlLabel.js +4 -4
- package/dist/Form/FormGroup.d.ts +2 -2
- package/dist/Form/FormGroup.js +5 -5
- package/dist/Form/FormHelperText.d.ts +2 -2
- package/dist/Form/FormHelperText.js +4 -4
- package/dist/Form/FormLabel.d.ts +2 -2
- package/dist/Form/FormLabel.js +4 -4
- package/dist/Form/InputAdornment.d.ts +2 -2
- package/dist/Form/InputAdornment.js +4 -4
- package/dist/Form/InputLabel.d.ts +2 -2
- package/dist/Form/InputLabel.js +4 -4
- package/dist/Form/index.d.ts +8 -8
- package/dist/Form/index.js +19 -19
- package/dist/Form/types.d.ts +9 -9
- package/dist/Form/types.js +2 -2
- package/dist/Grid/Grid.d.ts +3 -3
- package/dist/Grid/Grid.js +10 -10
- package/dist/Grid/index.d.ts +2 -2
- package/dist/Grid/index.js +5 -5
- package/dist/Grid/types.d.ts +2 -2
- package/dist/Grid/types.js +2 -2
- package/dist/Hidden/Hidden.d.ts +3 -3
- package/dist/Hidden/Hidden.js +11 -11
- package/dist/Hidden/index.d.ts +2 -2
- package/dist/Hidden/index.js +5 -5
- package/dist/Hidden/types.d.ts +8 -8
- package/dist/Hidden/types.js +2 -2
- package/dist/Icon/Icon.d.ts +5 -5
- package/dist/Icon/Icon.js +57 -57
- package/dist/Icon/index.d.ts +2 -2
- package/dist/Icon/index.js +9 -9
- package/dist/Icon/types.d.ts +46 -46
- package/dist/Icon/types.js +2 -2
- package/dist/Image/Image.d.ts +3 -3
- package/dist/Image/Image.js +22 -22
- package/dist/Image/index.d.ts +2 -2
- package/dist/Image/index.js +7 -7
- package/dist/Image/types.d.ts +21 -21
- package/dist/Image/types.js +2 -2
- package/dist/Link/Link.d.ts +3 -3
- package/dist/Link/Link.js +10 -10
- package/dist/Link/index.d.ts +2 -2
- package/dist/Link/index.js +7 -7
- package/dist/Link/types.d.ts +41 -41
- package/dist/Link/types.js +2 -2
- package/dist/List/List.d.ts +8 -8
- package/dist/List/List.js +36 -36
- package/dist/List/index.d.ts +2 -2
- package/dist/List/index.js +5 -5
- package/dist/List/types.d.ts +7 -7
- package/dist/List/types.js +2 -2
- package/dist/Menu/Menu.d.ts +6 -6
- package/dist/Menu/Menu.js +9 -9
- package/dist/Menu/index.d.ts +2 -2
- package/dist/Menu/index.js +5 -5
- package/dist/Menu/types.d.ts +71 -71
- package/dist/Menu/types.js +2 -2
- package/dist/Notification/Notification.d.ts +5 -5
- package/dist/Notification/Notification.js +51 -51
- package/dist/Notification/index.d.ts +2 -2
- package/dist/Notification/index.js +9 -9
- package/dist/Notification/types.d.ts +7 -7
- package/dist/Notification/types.js +2 -2
- package/dist/Pagination/Pagination.d.ts +4 -4
- package/dist/Pagination/Pagination.js +193 -193
- package/dist/Pagination/PaginationHelper.d.ts +6 -6
- package/dist/Pagination/PaginationHelper.js +123 -123
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Pagination/index.js +7 -7
- package/dist/Pagination/types.d.ts +29 -29
- package/dist/Pagination/types.js +8 -8
- package/dist/Paper/Paper.d.ts +2 -2
- package/dist/Paper/Paper.js +5 -5
- package/dist/Paper/index.d.ts +2 -2
- package/dist/Paper/index.js +5 -5
- package/dist/Paper/types.d.ts +2 -2
- package/dist/Paper/types.js +2 -2
- package/dist/Pickers/DatePicker.d.ts +10 -10
- package/dist/Pickers/DatePicker.js +29 -29
- package/dist/Pickers/DateTimePicker.d.ts +3 -3
- package/dist/Pickers/DateTimePicker.js +24 -24
- package/dist/Pickers/TimePicker.d.ts +3 -3
- package/dist/Pickers/TimePicker.js +24 -24
- package/dist/Pickers/index.d.ts +4 -4
- package/dist/Pickers/index.js +7 -7
- package/dist/Pickers/types.d.ts +80 -80
- package/dist/Pickers/types.js +2 -2
- package/dist/Popover/Popover.d.ts +2 -2
- package/dist/Popover/Popover.js +5 -5
- package/dist/Popover/index.d.ts +3 -3
- package/dist/Popover/index.js +7 -7
- package/dist/Popover/types.d.ts +2 -2
- package/dist/Popover/types.js +2 -2
- package/dist/Progress/Progress.d.ts +5 -5
- package/dist/Progress/Progress.js +12 -12
- package/dist/Progress/index.d.ts +2 -2
- package/dist/Progress/index.js +5 -5
- package/dist/Progress/types.d.ts +3 -3
- package/dist/Progress/types.js +2 -2
- package/dist/Radio/Radio.d.ts +3 -3
- package/dist/Radio/Radio.js +26 -26
- package/dist/Radio/RadioGroup.d.ts +3 -3
- package/dist/Radio/RadioGroup.js +9 -9
- package/dist/Radio/index.d.ts +3 -3
- package/dist/Radio/index.js +9 -9
- package/dist/Radio/types.d.ts +46 -46
- package/dist/Radio/types.js +2 -2
- package/dist/Rating/Rating.d.ts +3 -3
- package/dist/Rating/Rating.js +71 -71
- package/dist/Rating/index.d.ts +2 -2
- package/dist/Rating/index.js +5 -5
- package/dist/Rating/types.d.ts +49 -49
- package/dist/Rating/types.js +2 -2
- package/dist/Select/Select.d.ts +3 -3
- package/dist/Select/Select.js +38 -38
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select/index.js +7 -7
- package/dist/Select/types.d.ts +76 -76
- package/dist/Select/types.js +2 -2
- package/dist/Slide/Slide.d.ts +3 -3
- package/dist/Slide/Slide.js +11 -11
- package/dist/Slide/index.d.ts +2 -2
- package/dist/Slide/index.js +7 -7
- package/dist/Slide/types.d.ts +2 -2
- package/dist/Slide/types.js +2 -2
- package/dist/Snackbar/Snackbar.d.ts +3 -3
- package/dist/Snackbar/Snackbar.js +11 -11
- package/dist/Snackbar/index.d.ts +2 -2
- package/dist/Snackbar/index.js +7 -7
- package/dist/Snackbar/types.d.ts +2 -2
- package/dist/Snackbar/types.js +2 -2
- package/dist/Spacing/Spacing.d.ts +7 -7
- package/dist/Spacing/Spacing.js +71 -71
- package/dist/Spacing/index.d.ts +2 -2
- package/dist/Spacing/index.js +5 -5
- package/dist/Spacing/types.d.ts +15 -15
- package/dist/Spacing/types.js +2 -2
- package/dist/Stepper/MobileStepper.d.ts +3 -3
- package/dist/Stepper/MobileStepper.js +10 -10
- package/dist/Stepper/Stepper.d.ts +7 -7
- package/dist/Stepper/Stepper.js +27 -27
- package/dist/Stepper/index.d.ts +3 -3
- package/dist/Stepper/index.js +6 -6
- package/dist/Stepper/types.d.ts +14 -14
- package/dist/Stepper/types.js +2 -2
- package/dist/Switch/Switch.d.ts +3 -3
- package/dist/Switch/Switch.js +10 -10
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/index.js +7 -7
- package/dist/Switch/types.d.ts +12 -12
- package/dist/Switch/types.js +2 -2
- package/dist/Table/ResizeTableCell/ResizeTableCell.d.ts +11 -11
- package/dist/Table/ResizeTableCell/ResizeTableCell.js +94 -94
- package/dist/Table/ResizeTableCell/ResizeTableCellStyles.d.ts +2 -2
- package/dist/Table/ResizeTableCell/ResizeTableCellStyles.js +60 -60
- package/dist/Table/ResizeTableCell/ResizeTableContext.d.ts +15 -15
- package/dist/Table/ResizeTableCell/ResizeTableContext.js +16 -16
- package/dist/Table/Table.d.ts +8 -8
- package/dist/Table/Table.js +11 -11
- package/dist/Table/index.d.ts +4 -4
- package/dist/Table/index.js +7 -7
- package/dist/Table/types.d.ts +7 -7
- package/dist/Table/types.js +2 -2
- package/dist/TableColumnSettings/TableColumnSettings.d.ts +4 -4
- package/dist/TableColumnSettings/TableColumnSettings.js +131 -131
- package/dist/TableColumnSettings/TableColumnSettingsStyles.d.ts +1 -1
- package/dist/TableColumnSettings/TableColumnSettingsStyles.js +83 -83
- package/dist/TableColumnSettings/index.d.ts +3 -3
- package/dist/TableColumnSettings/index.js +7 -7
- package/dist/TableColumnSettings/types.d.ts +14 -14
- package/dist/TableColumnSettings/types.js +2 -2
- package/dist/Tabs/Tabs.d.ts +10 -10
- package/dist/Tabs/Tabs.js +135 -135
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tabs/index.js +5 -5
- package/dist/Tabs/types.d.ts +13 -13
- package/dist/Tabs/types.js +2 -2
- package/dist/TextField/CurrencyTextField.d.ts +3 -3
- package/dist/TextField/CurrencyTextField.js +22 -22
- package/dist/TextField/InlineTextField.d.ts +3 -3
- package/dist/TextField/InlineTextField.js +142 -142
- package/dist/TextField/MaskedTextField.d.ts +3 -3
- package/dist/TextField/MaskedTextField.js +13 -13
- package/dist/TextField/TextField.d.ts +3 -3
- package/dist/TextField/TextField.js +13 -13
- package/dist/TextField/ValidatedTextField.d.ts +3 -3
- package/dist/TextField/ValidatedTextField.js +35 -35
- package/dist/TextField/index.d.ts +6 -6
- package/dist/TextField/index.js +9 -9
- package/dist/TextField/styles.d.ts +2 -2
- package/dist/TextField/styles.js +13 -13
- package/dist/TextField/types.d.ts +63 -63
- package/dist/TextField/types.js +2 -2
- package/dist/ThemeProvider/DefaultEpilotTheme.d.ts +2 -2
- package/dist/ThemeProvider/DefaultEpilotTheme.js +312 -312
- package/dist/ThemeProvider/ThemeProvider.d.ts +3 -3
- package/dist/ThemeProvider/ThemeProvider.js +30 -30
- package/dist/ThemeProvider/fonts.d.ts +8 -8
- package/dist/ThemeProvider/fonts.js +13 -13
- package/dist/ThemeProvider/index.d.ts +3 -3
- package/dist/ThemeProvider/index.js +8 -8
- package/dist/ThemeProvider/mapping.d.ts +10 -10
- package/dist/ThemeProvider/mapping.js +846 -846
- package/dist/ThemeProvider/types.d.ts +136 -136
- package/dist/ThemeProvider/types.js +2 -2
- package/dist/ToggleButton/ToggleButton.d.ts +3 -3
- package/dist/ToggleButton/ToggleButton.js +12 -12
- package/dist/ToggleButton/index.d.ts +2 -2
- package/dist/ToggleButton/index.js +5 -5
- package/dist/ToggleButton/types.d.ts +27 -27
- package/dist/ToggleButton/types.js +2 -2
- package/dist/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -3
- package/dist/ToggleButtonGroup/ToggleButtonGroup.js +12 -12
- package/dist/ToggleButtonGroup/index.d.ts +2 -2
- package/dist/ToggleButtonGroup/index.js +5 -5
- package/dist/ToggleButtonGroup/types.d.ts +2 -2
- package/dist/ToggleButtonGroup/types.js +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Tooltip/Tooltip.js +22 -22
- package/dist/Tooltip/index.d.ts +2 -2
- package/dist/Tooltip/index.js +5 -5
- package/dist/Tooltip/types.d.ts +8 -8
- package/dist/Tooltip/types.js +2 -2
- package/dist/Typography/Typography.d.ts +13 -13
- package/dist/Typography/Typography.js +60 -60
- package/dist/Typography/index.d.ts +3 -3
- package/dist/Typography/index.js +22 -22
- package/dist/Typography/types.d.ts +7 -7
- package/dist/Typography/types.js +2 -2
- package/dist/bundle.js +19 -19
- package/dist/bundle.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +6 -6
- package/dist/context/ClassPrefixContext.d.ts +9 -9
- package/dist/context/ClassPrefixContext.js +14 -14
- package/dist/index.d.ts +51 -51
- package/dist/index.js +54 -54
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +4 -4
- package/dist/styles/styles.d.ts +3 -3
- package/dist/styles/styles.js +18 -18
- package/dist/utils.d.ts +7 -7
- package/dist/utils.js +27 -27
- package/package.json +1 -1
- 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';
|
package/dist/TextField/index.js
CHANGED
|
@@ -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>;
|
package/dist/TextField/styles.js
CHANGED
|
@@ -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
|
+
};
|