@epilot/base-elements 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/dist/Autocomplete/Autocomplete.js +2 -2
- package/dist/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/Autocomplete/types.d.ts +4 -0
- package/dist/Pickers/DatePicker.js +5 -6
- package/dist/Pickers/DatePicker.js.map +1 -1
- package/dist/Pickers/DateTimePicker.js +5 -6
- package/dist/Pickers/DateTimePicker.js.map +1 -1
- package/dist/Pickers/TimePicker.js +4 -5
- package/dist/Pickers/TimePicker.js.map +1 -1
- package/dist/Pickers/types.d.ts +12 -0
- package/dist/Select/Select.js +7 -3
- package/dist/Select/Select.js.map +1 -1
- package/dist/Select/types.d.ts +4 -0
- package/dist/TextField/TextField.d.ts +3 -2
- package/dist/TextField/TextField.js +9 -1
- package/dist/TextField/TextField.js.map +1 -1
- package/dist/TextField/styles.d.ts +2 -0
- package/dist/TextField/styles.js +14 -0
- package/dist/TextField/styles.js.map +1 -0
- package/dist/TextField/types.d.ts +6 -1
- package/dist/bundle.js +44 -44
- package/dist/bundle.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.7.1](https://gitlab.com/e-pilot/frontend/base/elements/compare/v2.7.0...v2.7.1) (2022-03-03)
|
|
6
|
+
|
|
5
7
|
## [2.7.0](https://gitlab.com/e-pilot/frontend/base/elements/compare/v2.6.0...v2.7.0) (2022-02-24)
|
|
6
8
|
|
|
7
9
|
|
|
@@ -16,7 +16,7 @@ function DropdownPopper(props) {
|
|
|
16
16
|
} })));
|
|
17
17
|
}
|
|
18
18
|
function Autocomplete(props) {
|
|
19
|
-
var error = props.error, label = props.label, _a = props.multiple, multiple = _a === void 0 ? true : _a, _b = props.popupIcon, popupIcon = _b === void 0 ? react_1["default"].createElement(ExpandMore_1["default"], { color: "secondary" }) : _b, noOptionsText = props.noOptionsText, options = props.options, placeholder = props.placeholder, value = props.value, onChange = props.onChange, disableOpenOnFocus = props.disableOpenOnFocus, disabled = props.disabled, fullWidth = props.fullWidth, id = props.id, required = props.required, _c = props.variant, variant = _c === void 0 ? 'filled' : _c, _d = props.flipPopperEnabled, flipPopperEnabled = _d === void 0 ? false : _d, rest = tslib_1.__rest(props, ["error", "label", "multiple", "popupIcon", "noOptionsText", "options", "placeholder", "value", "onChange", "disableOpenOnFocus", "disabled", "fullWidth", "id", "required", "variant", "flipPopperEnabled"]);
|
|
19
|
+
var error = props.error, label = props.label, _a = props.multiple, multiple = _a === void 0 ? true : _a, _b = props.popupIcon, popupIcon = _b === void 0 ? react_1["default"].createElement(ExpandMore_1["default"], { color: "secondary" }) : _b, noOptionsText = props.noOptionsText, options = props.options, placeholder = props.placeholder, value = props.value, onChange = props.onChange, disableOpenOnFocus = props.disableOpenOnFocus, disabled = props.disabled, fullWidth = props.fullWidth, id = props.id, required = props.required, _c = props.variant, variant = _c === void 0 ? 'filled' : _c, _d = props.flipPopperEnabled, flipPopperEnabled = _d === void 0 ? false : _d, customBackgroundColor = props.customBackgroundColor, rest = tslib_1.__rest(props, ["error", "label", "multiple", "popupIcon", "noOptionsText", "options", "placeholder", "value", "onChange", "disableOpenOnFocus", "disabled", "fullWidth", "id", "required", "variant", "flipPopperEnabled", "customBackgroundColor"]);
|
|
20
20
|
var clearIconOverwrite = styles_1.useAutocompleteStyles().clearIconOverwrite;
|
|
21
21
|
var _e = react_1.useState(false), open = _e[0], setOpen = _e[1];
|
|
22
22
|
var _f = react_1.useState(''), inputValue = _f[0], setInputValue = _f[1];
|
|
@@ -43,7 +43,7 @@ function Autocomplete(props) {
|
|
|
43
43
|
};
|
|
44
44
|
return (react_1["default"].createElement(lab_1.Autocomplete, tslib_1.__assign({ ChipProps: {
|
|
45
45
|
deleteIcon: react_1["default"].createElement(Icon_1.Icon, { name: "close" })
|
|
46
|
-
}, PopperComponent: flipPopperEnabled ? core_1.Popper : DropdownPopper, className: clearIconOverwrite, disabled: disabled, fullWidth: fullWidth, inputValue: inputValue, multiple: multiple, noOptionsText: noOptionsText || undefined, onChange: handleOnChange, onClose: function () { return setOpen(false); }, onInputChange: handleInputChange, onOpen: disableOpenOnFocus ? handleOpen : undefined, open: disableOpenOnFocus ? open : undefined, options: options, popupIcon: popupIcon, renderInput: function (params) { return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({}, params, { error: error ? true : false, helperText: error, label: label + (required ? ' *' : ''), placeholder: placeholder, variant: variant }))); }, value: value }, rest)));
|
|
46
|
+
}, PopperComponent: flipPopperEnabled ? core_1.Popper : DropdownPopper, className: clearIconOverwrite, disabled: disabled, fullWidth: fullWidth, inputValue: inputValue, multiple: multiple, noOptionsText: noOptionsText || undefined, onChange: handleOnChange, onClose: function () { return setOpen(false); }, onInputChange: handleInputChange, onOpen: disableOpenOnFocus ? handleOpen : undefined, open: disableOpenOnFocus ? open : undefined, options: options, popupIcon: popupIcon, renderInput: function (params) { return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({}, params, { customBackgroundColor: customBackgroundColor, error: error ? true : false, helperText: error, label: label + (required ? ' *' : ''), placeholder: placeholder, variant: variant }))); }, value: value }, rest)));
|
|
47
47
|
}
|
|
48
48
|
exports.Autocomplete = Autocomplete;
|
|
49
49
|
//# sourceMappingURL=Autocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.js","sourceRoot":"","sources":["../../src/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":";;;;AAAA,0CAAoE;AACpE,qFAAsD;AACtD,wCAAkE;AAClE,qDAAkD;AAElD,gCAA8B;AAC9B,0CAAwC;AAExC,mCAAgD;AAGhD,SAAS,cAAc,CAAC,KAAkB;IACxC,OAAO,CAC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AAS,EAAE,kBAAkB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,IAAI,SAAS,EACzC,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,cAAM,OAAA,OAAO,CAAC,KAAK,CAAC,EAAd,CAAc,EAC7B,aAAa,EAAE,iBAAiB,EAChC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACnD,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC3C,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,UAAA,MAAM,IAAI,OAAA,CACrB,iCAAC,qBAAS,uBACJ,MAAM,IACV,qBAAqB,EAAE,qBAAqB,EAC5C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EAC3B,UAAU,EAAE,KAAK,EACjB,KAAK,EAAE,KAAK,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EACrC,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,IAChB,CACH,EAVsB,CAUtB,EACD,KAAK,EAAE,KAAK,IACR,IAAI,EACR,CACH,CAAA;AACH,CAAC;AAxFD,oCAwFC"}
|
|
@@ -57,5 +57,9 @@ export declare type AutocompleteProps = Omit<MuiAutocompleteProps<any, Multiple,
|
|
|
57
57
|
* @default false
|
|
58
58
|
*/
|
|
59
59
|
flipPopperEnabled?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* non MUI prop to allow overwriting the default background color
|
|
62
|
+
*/
|
|
63
|
+
customBackgroundColor?: string;
|
|
60
64
|
};
|
|
61
65
|
export {};
|
|
@@ -4,7 +4,6 @@ exports.DatePicker = exports.DateFnsUtils = exports.KeyboardDateTimePicker = exp
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var date_fns_1 = tslib_1.__importDefault(require("@date-io/date-fns"));
|
|
6
6
|
exports.DateFnsUtils = date_fns_1["default"];
|
|
7
|
-
var core_1 = require("@material-ui/core");
|
|
8
7
|
var pickers_1 = require("@material-ui/pickers");
|
|
9
8
|
exports.MuiPickersUtilsProvider = pickers_1.MuiPickersUtilsProvider;
|
|
10
9
|
exports.KeyboardDatePicker = pickers_1.KeyboardDatePicker;
|
|
@@ -12,19 +11,19 @@ exports.KeyboardTimePicker = pickers_1.KeyboardTimePicker;
|
|
|
12
11
|
exports.KeyboardDateTimePicker = pickers_1.KeyboardDateTimePicker;
|
|
13
12
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
14
13
|
var __1 = require("..");
|
|
15
|
-
var useClasses =
|
|
16
|
-
return
|
|
14
|
+
var useClasses = __1.makeStyles(function () {
|
|
15
|
+
return __1.createStyles({ root: { lineHeight: '1.66' } });
|
|
17
16
|
});
|
|
18
17
|
function DatePicker(props) {
|
|
19
|
-
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.size, size = _b === void 0 ? 'medium' : _b, _c = props.format, format = _c === void 0 ? 'dd.MM.yyyy' : _c, onChange = props.onChange, shouldDisableDate = props.shouldDisableDate, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "size", "format", "onChange", "shouldDisableDate"]);
|
|
20
|
-
var classes = useClasses();
|
|
18
|
+
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.size, size = _b === void 0 ? 'medium' : _b, _c = props.format, format = _c === void 0 ? 'dd.MM.yyyy' : _c, onChange = props.onChange, shouldDisableDate = props.shouldDisableDate, customBackgroundColor = props.customBackgroundColor, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "size", "format", "onChange", "shouldDisableDate", "customBackgroundColor"]);
|
|
21
19
|
var htmlId = id ? id.replace(/^#\/properties\//, '') : undefined;
|
|
20
|
+
var classes = useClasses();
|
|
22
21
|
return (react_1["default"].createElement(__1.FormControl, { disabled: disabled, error: error, fullWidth: fullWidth, style: containerStyle },
|
|
23
22
|
label && (react_1["default"].createElement(__1.InputLabel, { classes: { root: classes.root }, htmlFor: "field-" + id, shrink: true },
|
|
24
23
|
label,
|
|
25
24
|
required ? ' *' : '')),
|
|
26
25
|
react_1["default"].createElement(pickers_1.MuiPickersUtilsProvider, { utils: date_fns_1["default"] },
|
|
27
|
-
react_1["default"].createElement(pickers_1.DatePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, name: htmlId, onChange: onChange, shouldDisableDate: shouldDisableDate || undefined, size: size, value: value }))),
|
|
26
|
+
react_1["default"].createElement(pickers_1.DatePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { customBackgroundColor: customBackgroundColor, disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, name: htmlId, onChange: onChange, shouldDisableDate: shouldDisableDate || undefined, size: size, value: value }))),
|
|
28
27
|
!!helperText && react_1["default"].createElement(__1.FormHelperText, null, helperText)));
|
|
29
28
|
}
|
|
30
29
|
exports.DatePicker = DatePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../src/Pickers/DatePicker.tsx"],"names":[],"mappings":";;;;AAAA,uEAA4C;
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../src/Pickers/DatePicker.tsx"],"names":[],"mappings":";;;;AAAA,uEAA4C;AAyBnC,uBAzBF,qBAAY,CAyBE;AAxBrB,gDAM6B;AAapB,kCAjBP,iCAAuB,CAiBO;AAEvB,6BAlBP,4BAAkB,CAkBO;AADlB,6BAhBP,4BAAkB,CAgBO;AAElB,iCAjBP,gCAAsB,CAiBO;AAf/B,wDAAyB;AAEzB,wBAQW;AAQX,IAAM,UAAU,GAAG,cAAU,CAAC;IAC5B,OAAA,gBAAY,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;AAA9C,CAA8C,CAC/C,CAAA;AAED,SAAgB,UAAU,CAAC,KAAsB;IAE7C,IAAA,QAAQ,GAeN,KAAK,SAfC,EACR,KAAK,GAcH,KAAK,MAdF,EACL,SAAS,GAaP,KAAK,UAbE,EACT,UAAU,GAYR,KAAK,WAZG,EACV,KAWE,KAAK,GAXK,EAAZ,EAAE,mBAAG,OAAO,KAAA,EACZ,KAAK,GAUH,KAAK,MAVF,EACL,QAAQ,GASN,KAAK,SATC,EACR,cAAc,GAQZ,KAAK,eARO,EACd,KAAK,GAOH,KAAK,MAPF,EACL,KAME,KAAK,KANQ,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,KAKE,KAAK,OALc,EAArB,MAAM,mBAAG,YAAY,KAAA,EACrB,QAAQ,GAIN,KAAK,SAJC,EACR,iBAAiB,GAGf,KAAK,kBAHU,EACjB,qBAAqB,GAEnB,KAAK,sBAFc,EAClB,IAAI,kBACL,KAAK,EAhBH,kLAgBL,CADQ,CACA;IAET,IAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OA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CAAC,CAAC,UAAU,IAAI,iCAAC,kBAAc,QAAE,UAAU,CAAkB,CAClD,CACf,CAAA;AACH,CAAC;AAvED,gCAuEC"}
|
|
@@ -3,23 +3,22 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.DateTimePicker = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var date_fns_1 = tslib_1.__importDefault(require("@date-io/date-fns"));
|
|
6
|
-
var core_1 = require("@material-ui/core");
|
|
7
6
|
var pickers_1 = require("@material-ui/pickers");
|
|
8
7
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
9
8
|
var __1 = require("..");
|
|
10
|
-
var useClasses =
|
|
11
|
-
return
|
|
9
|
+
var useClasses = __1.makeStyles(function () {
|
|
10
|
+
return __1.createStyles({ root: { lineHeight: '1.66' } });
|
|
12
11
|
});
|
|
13
12
|
function DateTimePicker(props) {
|
|
14
|
-
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.ampm, ampm = _b === void 0 ? false : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, _d = props.format, format = _d === void 0 ? 'dd.MM.yyyy HH:mm' : _d, onChange = props.onChange, shouldDisableDate = props.shouldDisableDate, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "ampm", "size", "format", "onChange", "shouldDisableDate"]);
|
|
15
|
-
var classes = useClasses();
|
|
13
|
+
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.ampm, ampm = _b === void 0 ? false : _b, _c = props.size, size = _c === void 0 ? 'medium' : _c, _d = props.format, format = _d === void 0 ? 'dd.MM.yyyy HH:mm' : _d, onChange = props.onChange, shouldDisableDate = props.shouldDisableDate, customBackgroundColor = props.customBackgroundColor, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "ampm", "size", "format", "onChange", "shouldDisableDate", "customBackgroundColor"]);
|
|
16
14
|
var htmlId = id ? id.replace(/^#\/properties\//, '') : undefined;
|
|
15
|
+
var classes = useClasses();
|
|
17
16
|
return (react_1["default"].createElement(__1.FormControl, { disabled: disabled, error: error, fullWidth: fullWidth, style: containerStyle },
|
|
18
17
|
label && (react_1["default"].createElement(__1.InputLabel, { classes: { root: classes.root }, htmlFor: "field-" + id, shrink: true },
|
|
19
18
|
label,
|
|
20
19
|
required ? ' *' : '')),
|
|
21
20
|
react_1["default"].createElement(pickers_1.MuiPickersUtilsProvider, { utils: date_fns_1["default"] },
|
|
22
|
-
react_1["default"].createElement(pickers_1.DateTimePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { ampm: ampm, animateYearScrolling: true, error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, maxDate: undefined, minDate: undefined, name: htmlId, onChange: onChange, shouldDisableDate: shouldDisableDate || undefined, size: size, value: value }))),
|
|
21
|
+
react_1["default"].createElement(pickers_1.DateTimePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { customBackgroundColor: customBackgroundColor, disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { ampm: ampm, animateYearScrolling: true, error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, maxDate: undefined, minDate: undefined, name: htmlId, onChange: onChange, shouldDisableDate: shouldDisableDate || undefined, size: size, value: value }))),
|
|
23
22
|
!!helperText && react_1["default"].createElement(__1.FormHelperText, null, helperText)));
|
|
24
23
|
}
|
|
25
24
|
exports.DateTimePicker = DateTimePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimePicker.js","sourceRoot":"","sources":["../../src/Pickers/DateTimePicker.tsx"],"names":[],"mappings":";;;;AAAA,uEAA4C;AAC5C,
|
|
1
|
+
{"version":3,"file":"DateTimePicker.js","sourceRoot":"","sources":["../../src/Pickers/DateTimePicker.tsx"],"names":[],"mappings":";;;;AAAA,uEAA4C;AAC5C,gDAG6B;AAC7B,wDAAyB;AAEzB,wBAQW;AACX,IAAM,UAAU,GAAG,cAAU,CAAC;IAC5B,OAAA,gBAAY,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;AAA9C,CAA8C,CAC/C,CAAA;AAED,SAAgB,cAAc,CAAC,KAA0B;IAErD,IAAA,QAAQ,GAgBN,KAAK,SAhBC,EACR,KAAK,GAeH,KAAK,MAfF,EACL,SAAS,GAcP,KAAK,UAdE,EACT,UAAU,GAaR,KAAK,WAbG,EACV,KAYE,KAAK,GAZK,EAAZ,EAAE,mBAAG,OAAO,KAAA,EACZ,KAAK,GAWH,KAAK,MAXF,EACL,QAAQ,GAUN,KAAK,SAVC,EACR,cAAc,GASZ,KAAK,eATO,EACd,KAAK,GAQH,KAAK,MARF,EACL,KAOE,KAAK,KAPK,EAAZ,IAAI,mBAAG,KAAK,KAAA,EACZ,KAME,KAAK,KANQ,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,KAKE,KAAK,OALoB,EAA3B,MAAM,mBAAG,kBAAkB,KAAA,EAC3B,QAAQ,GAIN,KAAK,SAJC,EACR,iBAAiB,GAGf,KAAK,kBAHU,EACjB,qBAAqB,GAEnB,KAAK,sBAFc,EAClB,IAAI,kBACL,KAAK,EAjBH,0LAiBL,CADQ,CACA;IAET,IAAM,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,kB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AI,SAAS,EACjD,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,IACZ,CACsB;QACzB,CAAC,CAAC,UAAU,IAAI,iCAAC,kBAAc,QAAE,UAAU,CAAkB,CAClD,CACf,CAAA;AACH,CAAC;AA5ED,wCA4EC"}
|
|
@@ -3,15 +3,14 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.TimePicker = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var date_fns_1 = tslib_1.__importDefault(require("@date-io/date-fns"));
|
|
6
|
-
var core_1 = require("@material-ui/core");
|
|
7
6
|
var pickers_1 = require("@material-ui/pickers");
|
|
8
7
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
9
8
|
var __1 = require("..");
|
|
10
|
-
var useClasses =
|
|
11
|
-
return
|
|
9
|
+
var useClasses = __1.makeStyles(function () {
|
|
10
|
+
return __1.createStyles({ root: { lineHeight: '1.66' } });
|
|
12
11
|
});
|
|
13
12
|
function TimePicker(props) {
|
|
14
|
-
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.format, format = _b === void 0 ? 'HH:mm' : _b, _c = props.ampm, ampm = _c === void 0 ? false : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, onChange = props.onChange, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "format", "ampm", "size", "onChange"]);
|
|
13
|
+
var disabled = props.disabled, error = props.error, fullWidth = props.fullWidth, helperText = props.helperText, _a = props.id, id = _a === void 0 ? 'no-id' : _a, label = props.label, required = props.required, containerStyle = props.containerStyle, value = props.value, _b = props.format, format = _b === void 0 ? 'HH:mm' : _b, _c = props.ampm, ampm = _c === void 0 ? false : _c, _d = props.size, size = _d === void 0 ? 'medium' : _d, onChange = props.onChange, customBackgroundColor = props.customBackgroundColor, rest = tslib_1.__rest(props, ["disabled", "error", "fullWidth", "helperText", "id", "label", "required", "containerStyle", "value", "format", "ampm", "size", "onChange", "customBackgroundColor"]);
|
|
15
14
|
var classes = useClasses();
|
|
16
15
|
var htmlId = id ? id.replace(/^#\/properties\//, '') : undefined;
|
|
17
16
|
return (react_1["default"].createElement(__1.FormControl, { disabled: disabled, error: error, fullWidth: fullWidth, style: containerStyle },
|
|
@@ -19,7 +18,7 @@ function TimePicker(props) {
|
|
|
19
18
|
label,
|
|
20
19
|
required ? ' *' : '')),
|
|
21
20
|
react_1["default"].createElement(pickers_1.MuiPickersUtilsProvider, { utils: date_fns_1["default"] },
|
|
22
|
-
react_1["default"].createElement(pickers_1.TimePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { ampm: ampm, error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, name: htmlId, onChange: onChange, size: size, value: value }))),
|
|
21
|
+
react_1["default"].createElement(pickers_1.TimePicker, tslib_1.__assign({ TextFieldComponent: function (props) { return (react_1["default"].createElement(__1.TextField, { customBackgroundColor: customBackgroundColor, disabled: disabled, error: !!error, fullWidth: fullWidth, id: htmlId, label: label || undefined, onChange: props.onChange, onClick: props.onClick, required: required, size: size, value: props.value })); } }, rest, { ampm: ampm, error: error, format: format, fullWidth: fullWidth, id: htmlId && "field-" + htmlId, name: htmlId, onChange: onChange, size: size, value: value }))),
|
|
23
22
|
!!helperText && react_1["default"].createElement(__1.FormHelperText, null, helperText)));
|
|
24
23
|
}
|
|
25
24
|
exports.TimePicker = TimePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimePicker.js","sourceRoot":"","sources":["../../src/Pickers/TimePicker.tsx"],"names":[],"mappings":";;;;AAAA,uEAA4C;AAC5C,
|
|
1
|
+
{"version":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OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAC/B,OAAO,EAAE,WAAS,EAAI,EACtB,MAAM;YAEL,KAAK;YACL,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CACV,CACd;QACD,iCAAC,iCAAuB,IAAC,KAAK,EAAE,qBAAY;YAC1C,iCAAC,oBAAa,qBACZ,kBAAkB,EAAE,UAAA,KAAK,IAAI,OAAA,CAC3B,iCAAC,aAAS,IACR,qBAAqB,EAAE,qBAAqB,EAC5C,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,KAAK,IAAI,SAAS,EACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,CAAC,KAAK,GAClB,CACH,EAd4B,CAc5B,IACG,IAAI,IACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,MAAM,IAAI,WAAS,MAAQ,EAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,IACZ,CACsB;QACzB,CAAC,CAAC,UAAU,IAAI,iCAAC,kBAAc,QAAE,UAAU,CAAkB,CAClD,CACf,CAAA;AACH,CAAC;AAxED,gCAwEC"}
|
package/dist/Pickers/types.d.ts
CHANGED
|
@@ -21,6 +21,10 @@ export declare type DatePickerProps = Omit<MuiDatePickerProps, 'color' | 'margin
|
|
|
21
21
|
* The size of the text field.
|
|
22
22
|
*/
|
|
23
23
|
size?: 'medium' | 'small';
|
|
24
|
+
/**
|
|
25
|
+
* non MUI prop to allow overwriting the default background color
|
|
26
|
+
*/
|
|
27
|
+
customBackgroundColor?: string;
|
|
24
28
|
};
|
|
25
29
|
export declare type DateTimePickerProps = Omit<MuiDateTimePickerProps, 'color' | 'margin' | 'size' | 'autoComplete' | 'defaultValue' | 'minDate' | 'maxDate'> & {
|
|
26
30
|
/**
|
|
@@ -43,6 +47,10 @@ export declare type DateTimePickerProps = Omit<MuiDateTimePickerProps, 'color' |
|
|
|
43
47
|
* The size of the text field.
|
|
44
48
|
*/
|
|
45
49
|
size?: 'medium' | 'small';
|
|
50
|
+
/**
|
|
51
|
+
* non MUI prop to allow overwriting the default background color
|
|
52
|
+
*/
|
|
53
|
+
customBackgroundColor?: string;
|
|
46
54
|
};
|
|
47
55
|
export declare type TimePickerProps = Omit<MuiTimePickerProps, 'color' | 'margin' | 'size' | 'autoComplete' | 'defaultValue' | 'minDate' | 'maxDate'> & {
|
|
48
56
|
/**
|
|
@@ -65,4 +73,8 @@ export declare type TimePickerProps = Omit<MuiTimePickerProps, 'color' | 'margin
|
|
|
65
73
|
* The size of the text field.
|
|
66
74
|
*/
|
|
67
75
|
size?: 'medium' | 'small';
|
|
76
|
+
/**
|
|
77
|
+
* non MUI prop to allow overwriting the default background color
|
|
78
|
+
*/
|
|
79
|
+
customBackgroundColor?: string;
|
|
68
80
|
};
|
package/dist/Select/Select.js
CHANGED
|
@@ -6,6 +6,7 @@ var core_1 = require("@material-ui/core");
|
|
|
6
6
|
var ExpandMore_1 = tslib_1.__importDefault(require("@material-ui/icons/ExpandMore"));
|
|
7
7
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
8
8
|
var __1 = require("../");
|
|
9
|
+
var styles_1 = require("../TextField/styles");
|
|
9
10
|
var useStyles = core_1.makeStyles(function (theme) {
|
|
10
11
|
return core_1.createStyles({
|
|
11
12
|
placeholderColor: {
|
|
@@ -19,14 +20,17 @@ var useStyles = core_1.makeStyles(function (theme) {
|
|
|
19
20
|
});
|
|
20
21
|
});
|
|
21
22
|
function Select(props) {
|
|
22
|
-
var classes = useStyles();
|
|
23
|
+
var classes = useStyles(props);
|
|
24
|
+
var root = styles_1.useTextFieldStyles({
|
|
25
|
+
customBackgroundColor: props.customBackgroundColor
|
|
26
|
+
}).root;
|
|
23
27
|
var _a = props.id, id = _a === void 0 ? 'no-id' : _a, children = props.children, disabled = props.disabled, error = props.error, _b = props.fullWidth, fullWidth = _b === void 0 ? false : _b, label = props.label, onChange = props.onChange, placeholder = props.placeholder, _c = props.required, required = _c === void 0 ? false : _c, _d = props.value, value = _d === void 0 ? '' : _d, containerStyle = props.containerStyle, _e = props.IconComponent, IconComponent = _e === void 0 ? ExpandMore_1["default"] : _e, _f = props.variant, variant = _f === void 0 ? 'filled' : _f, _g = props.size, size = _g === void 0 ? 'medium' : _g, rest = tslib_1.__rest(props, ["id", "children", "disabled", "error", "fullWidth", "label", "onChange", "placeholder", "required", "value", "containerStyle", "IconComponent", "variant", "size"]);
|
|
24
28
|
var htmlId = id.replace(/^#\/properties\//, '');
|
|
25
29
|
return (react_1["default"].createElement(__1.FormControl, { disabled: disabled, error: !!error, fullWidth: fullWidth, size: size, style: containerStyle, variant: variant },
|
|
26
30
|
react_1["default"].createElement(core_1.InputLabel, { shrink: true }, label),
|
|
27
31
|
react_1["default"].createElement(core_1.Select, tslib_1.__assign({ id: "select-" + htmlId, name: htmlId }, rest, { IconComponent: IconComponent, className: !value
|
|
28
|
-
? classes.placeholderColor + " " + classes.selectFocus
|
|
29
|
-
: classes.selectFocus, displayEmpty: true, onChange: onChange, renderValue: value !== '' || placeholder === ''
|
|
32
|
+
? root + " " + classes.placeholderColor + " " + classes.selectFocus
|
|
33
|
+
: root + " " + classes.selectFocus, displayEmpty: true, onChange: onChange, renderValue: value !== '' || placeholder === ''
|
|
30
34
|
? undefined
|
|
31
35
|
: function () { return react_1["default"].createElement("div", { "aria-label": "None" }, placeholder); }, value: value }), children),
|
|
32
36
|
react_1["default"].createElement(__1.FormHelperText, null, error)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/Select/Select.tsx"],"names":[],"mappings":";;;;AAAA,0CAK0B;AAC1B,qFAAsD;AACtD,wDAAyB;AAEzB,yBAAwD;AAIxD,IAAM,SAAS,GAAG,iBAAU,CAAC,UAAC,KAAY;IACxC,OAAA,mBAAY,CAAC;QACX,gBAAgB,EAAE;YAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;SACpC;QACD,WAAW,EAAE;YACX,UAAU,EAAE;gBACV,UAAU,EAAE,SAAS;aACtB;SACF;KACF,CAAC;AATF,CASE,CACH,CAAA;AAED,SAAgB,MAAM,CAAC,KAAkB;IACvC,IAAM,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../src/Select/Select.tsx"],"names":[],"mappings":";;;;AAAA,0CAK0B;AAC1B,qFAAsD;AACtD,wDAAyB;AAEzB,yBAAwD;AACxD,8CAAwD;AAIxD,IAAM,SAAS,GAAG,iBAAU,CAAC,UAAC,KAAY;IACxC,OAAA,mBAAY,CAAC;QACX,gBAAgB,EAAE;YAChB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS;SACpC;QACD,WAAW,EAAE;YACX,UAAU,EAAE;gBACV,UAAU,EAAE,SAAS;aACtB;SACF;KACF,CAAC;AATF,CASE,CACH,CAAA;AAED,SAAgB,MAAM,CAAC,KAAkB;IACvC,IAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;IACxB,IAAA,IAAI,GAAK,2BAAkB,CAAC;QAClC,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;KACnD,CAAC,KAFU,CAEV;IAGA,IAAA,KAeE,KAAK,GAfK,EAAZ,EAAE,mBAAG,OAAO,KAAA,EACZ,QAAQ,GAcN,KAAK,SAdC,EACR,QAAQ,GAaN,KAAK,SAbC,EACR,KAAK,GAYH,KAAK,MA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C,cAAM,OAAA,wDAAgB,MAAM,IAAE,WAAW,CAAO,EAA1C,CAA0C,EAEtD,KAAK,EAAE,KAAK,KAEX,QAAQ,CACC;QACZ,iCAAC,kBAAc,QAAE,KAAK,CAAkB,CAC5B,CACf,CAAA;AACH,CAAC;AA3DD,wBA2DC"}
|
package/dist/Select/types.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextFieldProps } from './types';
|
|
3
|
+
export declare function TextField({ InputProps, ...props }: TextFieldProps): JSX.Element;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.TextField = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
4
5
|
var core_1 = require("@material-ui/core");
|
|
5
|
-
|
|
6
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
+
var styles_1 = require("./styles");
|
|
8
|
+
function TextField(_a) {
|
|
9
|
+
var InputProps = _a.InputProps, props = tslib_1.__rest(_a, ["InputProps"]);
|
|
10
|
+
var classes = styles_1.useTextFieldStyles(props);
|
|
11
|
+
return react_1["default"].createElement(core_1.TextField, tslib_1.__assign({ InputProps: tslib_1.__assign(tslib_1.__assign({}, InputProps), { classes: classes }) }, props));
|
|
12
|
+
}
|
|
13
|
+
exports.TextField = TextField;
|
|
6
14
|
//# sourceMappingURL=TextField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../src/TextField/TextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../src/TextField/TextField.tsx"],"names":[],"mappings":";;;;AAAA,0CAA6D;AAC7D,wDAAyB;AAEzB,mCAA6C;AAG7C,SAAgB,SAAS,CAAC,EAAwC;IAAtC,IAAA,UAAU,gBAAA,EAAK,KAAK,sBAAtB,cAAwB,CAAF;IAC9C,IAAM,OAAO,GAAG,2BAAkB,CAAC,KAAK,CAAC,CAAA;IAEzC,OAAO,iCAAC,gBAAY,qBAAC,UAAU,wCAAO,UAAU,KAAE,OAAO,SAAA,OAAQ,KAAK,EAAI,CAAA;AAC5E,CAAC;AAJD,8BAIC"}
|
|
@@ -0,0 +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
|
+
});
|
|
14
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/TextField/styles.ts"],"names":[],"mappings":";;;AAAA,0CAA4D;AAI/C,QAAA,kBAAkB,GAAG,iBAAU,CAAC;IAC3C,OAAA,mBAAY,CAAC;QACX,IAAI,EAAE;YACJ,eAAe,EAAE,UAAC,KAAqB;gBACrC,OAAA,KAAG,KAAK,CAAC,qBAAuB;YAAhC,CAAgC;SACnC;KACF,CAAC;AALF,CAKE,CACH,CAAA"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { TextFieldProps as MuiTextFieldProps } from '@material-ui/core';
|
|
2
2
|
import { ChangeEvent, CSSProperties } from 'react';
|
|
3
3
|
import { Props as InputMaskProps } from 'react-input-mask';
|
|
4
|
-
export declare type TextFieldProps = MuiTextFieldProps
|
|
4
|
+
export declare type TextFieldProps = MuiTextFieldProps & {
|
|
5
|
+
/**
|
|
6
|
+
* non MUI prop to allow overwriting the default background color
|
|
7
|
+
*/
|
|
8
|
+
customBackgroundColor?: string;
|
|
9
|
+
};
|
|
5
10
|
export declare type ValidatedTextFieldProps = Omit<TextFieldProps, 'type' | 'onError'> & {
|
|
6
11
|
/**
|
|
7
12
|
* regular expression that will be used to validate the input
|