@unicef/material-ui 0.12.0 → 0.12.2
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/lib/dev.js +195 -12
- package/lib/dev.js.map +1 -1
- package/lib/prod.js +195 -12
- package/lib/prod.js.map +1 -1
- package/package.json +1 -1
package/lib/prod.js
CHANGED
|
@@ -28334,7 +28334,12 @@ function InputComponent(_ref) {
|
|
|
28334
28334
|
var inputRef = _ref.inputRef,
|
|
28335
28335
|
props = objectWithoutProperties(_ref, ['inputRef']);
|
|
28336
28336
|
|
|
28337
|
-
return React__default.createElement('div', _extends$1({
|
|
28337
|
+
return React__default.createElement('div', _extends$1({
|
|
28338
|
+
ref: inputRef
|
|
28339
|
+
}, props, {
|
|
28340
|
+
required: undefined // Remove required from div element
|
|
28341
|
+
, 'aria-invalid': undefined // Remove aria-invalid from div element
|
|
28342
|
+
}));
|
|
28338
28343
|
}
|
|
28339
28344
|
|
|
28340
28345
|
InputComponent.propTypes = {
|
|
@@ -30159,7 +30164,10 @@ function Input$3(props) {
|
|
|
30159
30164
|
describedBy = describedBy || customDescribedBy ? '' + (describedBy ? describedBy : '') + (customDescribedBy ? ' ' + customDescribedBy : '') : undefined;
|
|
30160
30165
|
}
|
|
30161
30166
|
|
|
30162
|
-
return React__default.createElement(components.Input, _extends$1({}, props, {
|
|
30167
|
+
return React__default.createElement(components.Input, _extends$1({}, props, {
|
|
30168
|
+
'aria-describedby': describedBy,
|
|
30169
|
+
required: props && props.selectProps && props.selectProps.required || undefined
|
|
30170
|
+
}));
|
|
30163
30171
|
}
|
|
30164
30172
|
|
|
30165
30173
|
Input$3.propTypes = {
|
|
@@ -45566,7 +45574,8 @@ function ActiveKeyboardDatePicker(props) {
|
|
|
45566
45574
|
showLabelHelp = props.showLabelHelp,
|
|
45567
45575
|
InputLabelHelpProps = props.InputLabelHelpProps,
|
|
45568
45576
|
label = props.label,
|
|
45569
|
-
|
|
45577
|
+
KeyboardButtonProps = props.KeyboardButtonProps,
|
|
45578
|
+
others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
|
|
45570
45579
|
|
|
45571
45580
|
var _React$useState = React__default.useState(classes.icon),
|
|
45572
45581
|
_React$useState2 = slicedToArray(_React$useState, 2),
|
|
@@ -45607,11 +45616,11 @@ function ActiveKeyboardDatePicker(props) {
|
|
|
45607
45616
|
disabled: Boolean(readOnly)
|
|
45608
45617
|
}, inputProps),
|
|
45609
45618
|
readOnly: readOnly,
|
|
45610
|
-
KeyboardButtonProps: {
|
|
45619
|
+
KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
|
|
45611
45620
|
classes: {
|
|
45612
45621
|
root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
|
|
45613
45622
|
}
|
|
45614
|
-
},
|
|
45623
|
+
}),
|
|
45615
45624
|
InputProps: _extends$1({
|
|
45616
45625
|
classes: {
|
|
45617
45626
|
root: classes.input + ' ' + (readOnly && classes.inputHover),
|
|
@@ -45653,14 +45662,17 @@ ActiveKeyboardDatePicker.propTypes = {
|
|
|
45653
45662
|
/** Show label help */
|
|
45654
45663
|
showLabelHelp: PropTypes__default.bool,
|
|
45655
45664
|
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
|
|
45656
|
-
InputLabelHelpProps: PropTypes__default.object
|
|
45665
|
+
InputLabelHelpProps: PropTypes__default.object,
|
|
45666
|
+
/** Keyboard button props */
|
|
45667
|
+
KeyboardButtonProps: PropTypes__default.object
|
|
45657
45668
|
};
|
|
45658
45669
|
|
|
45659
45670
|
ActiveKeyboardDatePicker.defaultProps = {
|
|
45660
45671
|
inputVariant: 'outlined',
|
|
45661
45672
|
autoOk: true,
|
|
45662
45673
|
variant: 'inline',
|
|
45663
|
-
format: 'dd/MM/yyyy'
|
|
45674
|
+
format: 'dd/MM/yyyy',
|
|
45675
|
+
KeyboardButtonProps: {}
|
|
45664
45676
|
};
|
|
45665
45677
|
|
|
45666
45678
|
var styles$17 = {
|
|
@@ -45983,7 +45995,8 @@ function ActiveKeyboardTimePicker(props) {
|
|
|
45983
45995
|
showLabelHelp = props.showLabelHelp,
|
|
45984
45996
|
InputLabelHelpProps = props.InputLabelHelpProps,
|
|
45985
45997
|
label = props.label,
|
|
45986
|
-
|
|
45998
|
+
KeyboardButtonProps = props.KeyboardButtonProps,
|
|
45999
|
+
others = objectWithoutProperties(props, ['inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
|
|
45987
46000
|
|
|
45988
46001
|
var _React$useState = React__default.useState(classes.icon),
|
|
45989
46002
|
_React$useState2 = slicedToArray(_React$useState, 2),
|
|
@@ -46022,11 +46035,11 @@ function ActiveKeyboardTimePicker(props) {
|
|
|
46022
46035
|
disabled: Boolean(readOnly)
|
|
46023
46036
|
}, inputProps),
|
|
46024
46037
|
readOnly: readOnly,
|
|
46025
|
-
KeyboardButtonProps: {
|
|
46038
|
+
KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
|
|
46026
46039
|
classes: {
|
|
46027
46040
|
root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
|
|
46028
46041
|
}
|
|
46029
|
-
},
|
|
46042
|
+
}),
|
|
46030
46043
|
InputProps: _extends$1({
|
|
46031
46044
|
classes: {
|
|
46032
46045
|
root: classes.input + ' ' + (readOnly && classes.inputHover),
|
|
@@ -46064,13 +46077,16 @@ ActiveKeyboardTimePicker.propTypes = {
|
|
|
46064
46077
|
/** Show label help */
|
|
46065
46078
|
showLabelHelp: PropTypes__default.bool,
|
|
46066
46079
|
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
|
|
46067
|
-
InputLabelHelpProps: PropTypes__default.object
|
|
46080
|
+
InputLabelHelpProps: PropTypes__default.object,
|
|
46081
|
+
/** Keyboard button props */
|
|
46082
|
+
KeyboardButtonProps: PropTypes__default.object
|
|
46068
46083
|
};
|
|
46069
46084
|
|
|
46070
46085
|
ActiveKeyboardTimePicker.defaultProps = {
|
|
46071
46086
|
inputVariant: 'outlined',
|
|
46072
46087
|
autoOk: true,
|
|
46073
|
-
variant: 'inline'
|
|
46088
|
+
variant: 'inline',
|
|
46089
|
+
KeyboardButtonProps: {}
|
|
46074
46090
|
};
|
|
46075
46091
|
|
|
46076
46092
|
var filter$1 = createFilterOptions();
|
|
@@ -46291,6 +46307,172 @@ ActiveAutoComplete.defaultProps = {
|
|
|
46291
46307
|
usedItemIds: []
|
|
46292
46308
|
};
|
|
46293
46309
|
|
|
46310
|
+
var styles$1a = {
|
|
46311
|
+
labelRoot: {
|
|
46312
|
+
pointerEvents: 'auto',
|
|
46313
|
+
display: 'flex',
|
|
46314
|
+
alignItems: 'center'
|
|
46315
|
+
}
|
|
46316
|
+
};
|
|
46317
|
+
|
|
46318
|
+
var useStyles$A = makeStyles$1(function (theme) {
|
|
46319
|
+
return {
|
|
46320
|
+
textField: {
|
|
46321
|
+
marginTop: theme.spacing(0.25),
|
|
46322
|
+
marginBottom: theme.spacing(0.25)
|
|
46323
|
+
},
|
|
46324
|
+
notchedOutline: {
|
|
46325
|
+
borderRadius: 2,
|
|
46326
|
+
borderColor: 'transparent'
|
|
46327
|
+
},
|
|
46328
|
+
inputPaddingWithoutLabel: function inputPaddingWithoutLabel(props) {
|
|
46329
|
+
return {
|
|
46330
|
+
padding: props.inputPadding ? props.inputPadding : '2px 2px 2px 2px',
|
|
46331
|
+
height: 'auto'
|
|
46332
|
+
};
|
|
46333
|
+
},
|
|
46334
|
+
inputPaddingWithLabel: function inputPaddingWithLabel(props) {
|
|
46335
|
+
return {
|
|
46336
|
+
padding: props.inputPadding ? props.inputPadding : '18.5px 14px',
|
|
46337
|
+
height: 'auto'
|
|
46338
|
+
};
|
|
46339
|
+
},
|
|
46340
|
+
input: function input(props) {
|
|
46341
|
+
return _extends$1({}, theme.typography[props.typographyVariant]);
|
|
46342
|
+
},
|
|
46343
|
+
inputHover: {
|
|
46344
|
+
'&:hover $notchedOutline': {
|
|
46345
|
+
borderColor: 'transparent'
|
|
46346
|
+
}
|
|
46347
|
+
},
|
|
46348
|
+
icon: {
|
|
46349
|
+
display: 'none'
|
|
46350
|
+
},
|
|
46351
|
+
showIcon: {
|
|
46352
|
+
display: 'block'
|
|
46353
|
+
}
|
|
46354
|
+
};
|
|
46355
|
+
});
|
|
46356
|
+
|
|
46357
|
+
/**
|
|
46358
|
+
* ActiveKeyboardDateTimePicker is a customized [Material Ui KeyboardDateTimePicker]('https://material-ui-pickers.dev/api/KeyboardDateTimePicker') for more details
|
|
46359
|
+
*/
|
|
46360
|
+
function ActiveKeyboardDateTimePicker(props) {
|
|
46361
|
+
var classes = useStyles$A(props);
|
|
46362
|
+
var autoOk = props.autoOk,
|
|
46363
|
+
variant = props.variant,
|
|
46364
|
+
inputVariant = props.inputVariant,
|
|
46365
|
+
readOnly = props.readOnly,
|
|
46366
|
+
interactiveMode = props.interactiveMode,
|
|
46367
|
+
InputLabelProps = props.InputLabelProps,
|
|
46368
|
+
className = props.className,
|
|
46369
|
+
inputProps = props.inputProps,
|
|
46370
|
+
InputProps = props.InputProps,
|
|
46371
|
+
placeholder = props.placeholder,
|
|
46372
|
+
showLabelHelp = props.showLabelHelp,
|
|
46373
|
+
InputLabelHelpProps = props.InputLabelHelpProps,
|
|
46374
|
+
label = props.label,
|
|
46375
|
+
KeyboardButtonProps = props.KeyboardButtonProps,
|
|
46376
|
+
others = objectWithoutProperties(props, ['autoOk', 'variant', 'inputVariant', 'readOnly', 'interactiveMode', 'InputLabelProps', 'className', 'inputProps', 'InputProps', 'placeholder', 'showLabelHelp', 'InputLabelHelpProps', 'label', 'KeyboardButtonProps']);
|
|
46377
|
+
|
|
46378
|
+
var _React$useState = React__default.useState(classes.icon),
|
|
46379
|
+
_React$useState2 = slicedToArray(_React$useState, 2),
|
|
46380
|
+
hideIcon = _React$useState2[0],
|
|
46381
|
+
setHideIcon = _React$useState2[1];
|
|
46382
|
+
|
|
46383
|
+
var inputPaddingClass = props.label ? classes.inputPaddingWithLabel : classes.inputPaddingWithoutLabel;
|
|
46384
|
+
var finalPlaceholder = readOnly ? null : placeholder;
|
|
46385
|
+
|
|
46386
|
+
var onMouseOver = function onMouseOver() {
|
|
46387
|
+
if (!readOnly) {
|
|
46388
|
+
setHideIcon(classes.showIcon);
|
|
46389
|
+
}
|
|
46390
|
+
return props.onMouseOver && props.onMouseOver;
|
|
46391
|
+
};
|
|
46392
|
+
|
|
46393
|
+
var handleBlur = function handleBlur(event) {
|
|
46394
|
+
event.preventDefault();
|
|
46395
|
+
setHideIcon(classes.icon);
|
|
46396
|
+
return props.onBlur && props.onBlur;
|
|
46397
|
+
};
|
|
46398
|
+
|
|
46399
|
+
return React__default.createElement(
|
|
46400
|
+
MuiPickersUtilsProvider,
|
|
46401
|
+
{ utils: DateFnsUtils },
|
|
46402
|
+
React__default.createElement(KeyboardDateTimePicker, _extends$1({
|
|
46403
|
+
autoOk: autoOk,
|
|
46404
|
+
variant: variant,
|
|
46405
|
+
inputVariant: inputVariant,
|
|
46406
|
+
placeholder: finalPlaceholder,
|
|
46407
|
+
className: classes.textField + ' ' + (className && className),
|
|
46408
|
+
InputLabelProps: _extends$1({
|
|
46409
|
+
shrink: true,
|
|
46410
|
+
style: _extends$1({}, styles$1a.labelRoot)
|
|
46411
|
+
}, InputLabelProps),
|
|
46412
|
+
inputProps: _extends$1({
|
|
46413
|
+
readOnly: Boolean(readOnly),
|
|
46414
|
+
disabled: Boolean(readOnly)
|
|
46415
|
+
}, inputProps),
|
|
46416
|
+
readOnly: readOnly,
|
|
46417
|
+
KeyboardButtonProps: _extends$1({}, KeyboardButtonProps, {
|
|
46418
|
+
classes: {
|
|
46419
|
+
root: '' + (!interactiveMode && !readOnly ? '' : hideIcon)
|
|
46420
|
+
}
|
|
46421
|
+
}),
|
|
46422
|
+
InputProps: _extends$1({
|
|
46423
|
+
classes: {
|
|
46424
|
+
root: classes.input + ' ' + (readOnly && classes.inputHover),
|
|
46425
|
+
notchedOutline: '' + (!interactiveMode && !readOnly ? '' : classes.notchedOutline),
|
|
46426
|
+
input: inputPaddingClass
|
|
46427
|
+
}
|
|
46428
|
+
}, InputProps),
|
|
46429
|
+
label: showLabelHelp ? React__default.createElement(InputLabelHelp, _extends$1({ inputLabel: label }, InputLabelHelpProps)) : label,
|
|
46430
|
+
onMouseOver: onMouseOver,
|
|
46431
|
+
onMouseLeave: handleBlur,
|
|
46432
|
+
onBlur: handleBlur
|
|
46433
|
+
}, others))
|
|
46434
|
+
);
|
|
46435
|
+
}
|
|
46436
|
+
|
|
46437
|
+
ActiveKeyboardDateTimePicker.propTypes = {
|
|
46438
|
+
/** AutoOk on date select */
|
|
46439
|
+
autoOk: PropTypes__default.bool,
|
|
46440
|
+
/** Picker container option variant : 'dialog' | 'inline' | 'static' */
|
|
46441
|
+
variant: PropTypes__default.string,
|
|
46442
|
+
/** Material ui textfield variant */
|
|
46443
|
+
inputVariant: PropTypes__default.string,
|
|
46444
|
+
/** Date format */
|
|
46445
|
+
format: PropTypes__default.string,
|
|
46446
|
+
/** To make the content readOnly */
|
|
46447
|
+
readOnly: PropTypes__default.bool,
|
|
46448
|
+
/** Change to write mode by hiding text field border and displays border on hover*/
|
|
46449
|
+
interactiveMode: PropTypes__default.bool,
|
|
46450
|
+
/** Props applied to the InputLabel element.*/
|
|
46451
|
+
InputLabelProps: PropTypes__default.object,
|
|
46452
|
+
/** Attributes applied to the input element. */
|
|
46453
|
+
inputProps: PropTypes__default.object,
|
|
46454
|
+
/** Props applied to the Input element. */
|
|
46455
|
+
InputProps: PropTypes__default.object,
|
|
46456
|
+
/** Placeholder text*/
|
|
46457
|
+
placeholder: PropTypes__default.string,
|
|
46458
|
+
/** Label text */
|
|
46459
|
+
label: PropTypes__default.string,
|
|
46460
|
+
/** Show label help */
|
|
46461
|
+
showLabelHelp: PropTypes__default.bool,
|
|
46462
|
+
/** Props applied to the input label help element. E.g InputLabelHelpProps={{type:'link', label:'Help', link:'unicef.github.io', icon, tooltipTitle: 'Tooltip title', tooltipPlacement: 'bottom}} */
|
|
46463
|
+
InputLabelHelpProps: PropTypes__default.object,
|
|
46464
|
+
/** Keyboard button props */
|
|
46465
|
+
KeyboardButtonProps: PropTypes__default.object
|
|
46466
|
+
};
|
|
46467
|
+
|
|
46468
|
+
ActiveKeyboardDateTimePicker.defaultProps = {
|
|
46469
|
+
inputVariant: 'outlined',
|
|
46470
|
+
autoOk: true,
|
|
46471
|
+
variant: 'inline',
|
|
46472
|
+
format: 'dd/MM/yyyy hh:mm a',
|
|
46473
|
+
KeyboardButtonProps: {}
|
|
46474
|
+
};
|
|
46475
|
+
|
|
46294
46476
|
exports.ActiveAutoComplete = ActiveAutoComplete;
|
|
46295
46477
|
exports.ActiveCurrencyField = ActiveCurrencyField;
|
|
46296
46478
|
exports.ActiveDatePicker = ActiveDatePicker;
|
|
@@ -46299,6 +46481,7 @@ exports.ActiveFormPositiveInteger = ActiveFormPositiveInteger;
|
|
|
46299
46481
|
exports.ActiveFormSelect = ActiveFormSelect;
|
|
46300
46482
|
exports.ActiveFormTextField = ActiveFormTextField;
|
|
46301
46483
|
exports.ActiveKeyboardDatePicker = ActiveKeyboardDatePicker;
|
|
46484
|
+
exports.ActiveKeyboardDateTimePicker = ActiveKeyboardDateTimePicker;
|
|
46302
46485
|
exports.ActiveKeyboardTimePicker = ActiveKeyboardTimePicker;
|
|
46303
46486
|
exports.ActiveTimePicker = ActiveTimePicker;
|
|
46304
46487
|
exports.UAsyncBadge = UAsyncBadge;
|