@unicef/material-ui 0.8.1 → 0.8.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/prod.js CHANGED
@@ -46901,6 +46901,71 @@ UPositiveInteger.propTypes = {
46901
46901
  withRequiredValidator: PropTypes__default.bool
46902
46902
  };
46903
46903
 
46904
+ var useStyles$n = makeStyles$1(function (theme) {
46905
+ return {
46906
+ startAdornmentContainer: {
46907
+ marginRight: theme.spacing(0.5)
46908
+ }
46909
+ };
46910
+ });
46911
+
46912
+ function UCurrencyField(_ref) {
46913
+ var inputPrefix = _ref.inputPrefix,
46914
+ decimalScale = _ref.decimalScale,
46915
+ InputProps = _ref.InputProps,
46916
+ inputProps = _ref.inputProps,
46917
+ props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
46918
+
46919
+ var classes = useStyles$n(props);
46920
+ return React__default.createElement(UPositiveInteger, _extends$1({
46921
+ variant: 'outlined',
46922
+ InputProps: _extends$1({
46923
+ startAdornment: React__default.createElement(
46924
+ 'span',
46925
+ { className: classes.startAdornmentContainer },
46926
+ inputPrefix
46927
+ )
46928
+ }, InputProps),
46929
+ inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
46930
+ }, props));
46931
+ }
46932
+
46933
+ UCurrencyField.propTypes = {
46934
+ /** label */
46935
+ label: PropTypes__default.string,
46936
+ /** placeholder text*/
46937
+ placeholder: PropTypes__default.string,
46938
+ /**
46939
+ * Array of validators.See list of default validators above.
46940
+ *
46941
+ * Ex: `validators={['required', 'isEmail']}`
46942
+ */
46943
+ validators: PropTypes__default.array,
46944
+ /** Attributes applied to the input element. */
46945
+ inputProps: PropTypes__default.object,
46946
+ /** Props applied to the Input element. */
46947
+ InputProps: PropTypes__default.object,
46948
+ /** Prefix string for the input. */
46949
+ inputPrefix: PropTypes__default.string,
46950
+ /** Decimal digit number to be used as default. */
46951
+ decimalScale: PropTypes__default.number,
46952
+ /**
46953
+ * customErrorMessages is an object with key as validator and value as customised error message.
46954
+ *
46955
+ * Ex: `customErrorMessages={{required: 'This field is required'}`
46956
+ */
46957
+ customErrorMessages: PropTypes__default.object,
46958
+ /** To make the content readOnly */
46959
+ readOnly: PropTypes__default.bool,
46960
+ /** Name of input. */
46961
+ name: PropTypes__default.string
46962
+ };
46963
+
46964
+ UCurrencyField.defaultProps = {
46965
+ inputPrefix: '$',
46966
+ decimalScale: 2
46967
+ };
46968
+
46904
46969
  function ActiveFormPositiveInteger(_ref) {
46905
46970
  var InputProps = _ref.InputProps,
46906
46971
  props = objectWithoutProperties(_ref, ['InputProps']);
@@ -46949,6 +47014,81 @@ ActiveFormPositiveInteger.propTypes = {
46949
47014
  withRequiredValidator: PropTypes__default.bool
46950
47015
  };
46951
47016
 
47017
+ var useStyles$o = makeStyles$1(function (theme) {
47018
+ return {
47019
+ startAdornmentContainer: {
47020
+ marginRight: theme.spacing(0.5)
47021
+ }
47022
+ };
47023
+ });
47024
+
47025
+ function ActiveCurrencyField(_ref) {
47026
+ var inputPrefix = _ref.inputPrefix,
47027
+ decimalScale = _ref.decimalScale,
47028
+ InputProps = _ref.InputProps,
47029
+ inputProps = _ref.inputProps,
47030
+ props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
47031
+
47032
+ var classes = useStyles$o(props);
47033
+ return React__default.createElement(ActiveFormPositiveInteger, _extends$1({
47034
+ variant: 'outlined',
47035
+ InputProps: _extends$1({
47036
+ startAdornment: React__default.createElement(
47037
+ 'span',
47038
+ { className: classes.startAdornmentContainer },
47039
+ inputPrefix
47040
+ )
47041
+ }, InputProps),
47042
+ inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
47043
+ }, props));
47044
+ }
47045
+
47046
+ ActiveCurrencyField.propTypes = {
47047
+ /** label */
47048
+ label: PropTypes__default.string,
47049
+ /** placeholder text*/
47050
+ placeholder: PropTypes__default.string,
47051
+ /** Typography for text inside the input (Ex: h1, div, etc.) */
47052
+ typographyVariant: PropTypes__default.string,
47053
+ /** Input has some default padding already, to make changes to it pass padding like `inputPadding='0px 2px'` */
47054
+ inputPadding: PropTypes__default.string,
47055
+ /** To hide or display the textfied border*/
47056
+ showBorder: PropTypes__default.bool,
47057
+ /**
47058
+ * Array of validators.See list of default validators above.
47059
+ *
47060
+ * Ex: `validators={['required', 'isEmail']}`
47061
+ */
47062
+ validators: PropTypes__default.array,
47063
+ /** Attributes applied to the input element. */
47064
+ inputProps: PropTypes__default.object,
47065
+ /** Props applied to the Input element. */
47066
+ InputProps: PropTypes__default.object,
47067
+ /** Prefix string for the input. */
47068
+ inputPrefix: PropTypes__default.string,
47069
+ /** Decimal digit number to be used as default. */
47070
+ decimalScale: PropTypes__default.number,
47071
+ /**
47072
+ * customErrorMessages is an object with key as validator and value as customised error message.
47073
+ *
47074
+ * Ex: `customErrorMessages={{required: 'This field is required'}`
47075
+ */
47076
+ customErrorMessages: PropTypes__default.object,
47077
+ /** To make the content readOnly */
47078
+ readOnly: PropTypes__default.bool,
47079
+ /** Name of input. */
47080
+ name: PropTypes__default.string,
47081
+ /** It triggers after each validation.It will return true or false. */
47082
+ validatorListener: PropTypes__default.func,
47083
+ /** Allow to use required validator in any validation trigger, not only form submit. */
47084
+ withRequiredValidator: PropTypes__default.bool
47085
+ };
47086
+
47087
+ ActiveCurrencyField.defaultProps = {
47088
+ inputPrefix: '$',
47089
+ decimalScale: 2
47090
+ };
47091
+
46952
47092
  var DeleteOutlined = createCommonjsModule(function (module, exports) {
46953
47093
 
46954
47094
 
@@ -46973,7 +47113,7 @@ exports.default = _default;
46973
47113
 
46974
47114
  var DeleteOutlinedIcon = unwrapExports(DeleteOutlined);
46975
47115
 
46976
- var useStyles$n = makeStyles$1(function (theme) {
47116
+ var useStyles$p = makeStyles$1(function (theme) {
46977
47117
  return {
46978
47118
  menuDelete: {
46979
47119
  width: '500px'
@@ -46993,7 +47133,7 @@ var useStyles$n = makeStyles$1(function (theme) {
46993
47133
  * It has two varint icon/menu item
46994
47134
  */
46995
47135
  function UConfirmationButton(props) {
46996
- var classes = useStyles$n();
47136
+ var classes = useStyles$p();
46997
47137
  var onConfirm = props.onConfirm,
46998
47138
  id = props.id,
46999
47139
  buttonText = props.buttonText,
@@ -47108,7 +47248,7 @@ UConfirmationButton.defaultProps = {
47108
47248
  /**
47109
47249
  * displays radio buttons
47110
47250
  */
47111
- var useStyles$o = makeStyles$1(function (theme) {
47251
+ var useStyles$q = makeStyles$1(function (theme) {
47112
47252
  return {
47113
47253
  padding: {
47114
47254
  paddingLeft: theme.spacing(3)
@@ -47129,7 +47269,7 @@ function URadioButtons(_ref) {
47129
47269
  optionLabels = _ref.optionLabels,
47130
47270
  optionValues = _ref.optionValues;
47131
47271
 
47132
- var classes = useStyles$o();
47272
+ var classes = useStyles$q();
47133
47273
  var handleOnChange = function handleOnChange(event) {
47134
47274
  onChange && onChange(event);
47135
47275
  };
@@ -47233,7 +47373,7 @@ exports.default = _default;
47233
47373
 
47234
47374
  var DoneIcon = unwrapExports(Done);
47235
47375
 
47236
- var useStyles$p = makeStyles$1(function (theme) {
47376
+ var useStyles$r = makeStyles$1(function (theme) {
47237
47377
  return {
47238
47378
  root: {
47239
47379
  position: 'fixed',
@@ -47265,7 +47405,7 @@ function UAsyncBadge(_ref) {
47265
47405
  visible = _ref.visible,
47266
47406
  onReset = _ref.onReset;
47267
47407
 
47268
- var classes = useStyles$p();
47408
+ var classes = useStyles$r();
47269
47409
 
47270
47410
  /** If variant is success or error, after few seconds, it will set asyncResponse visible to false */
47271
47411
  React.useEffect(function () {
@@ -47304,7 +47444,7 @@ UAsyncBadge.propTypes = {
47304
47444
  onReset: PropTypes__default.func
47305
47445
  };
47306
47446
 
47307
- var useStyles$q = makeStyles$1(function () {
47447
+ var useStyles$s = makeStyles$1(function () {
47308
47448
  return {
47309
47449
  pageLoadingProgress: {
47310
47450
  height: '50vh',
@@ -47319,7 +47459,7 @@ var useStyles$q = makeStyles$1(function () {
47319
47459
  * 2. Display text message
47320
47460
  */
47321
47461
  function UPageLoadingProgress(props) {
47322
- var classes = useStyles$q();
47462
+ var classes = useStyles$s();
47323
47463
  var text = props.text;
47324
47464
 
47325
47465
  return React__default.createElement(
@@ -49172,7 +49312,7 @@ UErrorAlert.defaultProps = {
49172
49312
 
49173
49313
  var filter = createFilterOptions();
49174
49314
 
49175
- var useStyles$r = makeStyles$1(function (theme) {
49315
+ var useStyles$t = makeStyles$1(function (theme) {
49176
49316
  return {
49177
49317
  controlStyle: {
49178
49318
  marginTop: theme.spacing(2),
@@ -49200,7 +49340,7 @@ function UAutoComplete(_ref) {
49200
49340
  allowContextSpecific = _ref.allowContextSpecific,
49201
49341
  props = _ref.props;
49202
49342
 
49203
- var classes = useStyles$r();
49343
+ var classes = useStyles$t();
49204
49344
  //const dispatch = useDispatch()
49205
49345
 
49206
49346
  var _useState = React.useState(value || null),
@@ -49349,7 +49489,7 @@ UAutoComplete.defaultProps = {
49349
49489
 
49350
49490
  /* eslint-disable no-nested-ternary */
49351
49491
 
49352
- var useStyles$s = makeStyles$1(function (theme) {
49492
+ var useStyles$u = makeStyles$1(function (theme) {
49353
49493
  var _ref;
49354
49494
 
49355
49495
  return _ref = {
@@ -49381,7 +49521,7 @@ var useStyles$s = makeStyles$1(function (theme) {
49381
49521
  * Breadcrumbs is a component to implement current user path of the application
49382
49522
  */
49383
49523
  function UBreadcrumbs(props) {
49384
- var classes = useStyles$s();
49524
+ var classes = useStyles$u();
49385
49525
  var breadcrumbLinks = props.breadcrumbLinks;
49386
49526
 
49387
49527
 
@@ -49458,7 +49598,7 @@ UInfiniteScroll.propTypes = {
49458
49598
  onEndOfScroll: PropTypes__default.func
49459
49599
  };
49460
49600
 
49461
- var useStyles$t = makeStyles$1(function (theme) {
49601
+ var useStyles$v = makeStyles$1(function (theme) {
49462
49602
  return {
49463
49603
  small: {
49464
49604
  width: theme.spacing(4),
@@ -49503,7 +49643,7 @@ function UAvatarImage(_ref) {
49503
49643
  zIndexValue = _ref.zIndexValue,
49504
49644
  loadPhoto = _ref.loadPhoto;
49505
49645
 
49506
- var classes = useStyles$t();
49646
+ var classes = useStyles$v();
49507
49647
 
49508
49648
  var _useState = React.useState(''),
49509
49649
  _useState2 = slicedToArray(_useState, 2),
@@ -49935,7 +50075,7 @@ exports.default = _default;
49935
50075
 
49936
50076
  var CloseIcon$1 = unwrapExports(Close);
49937
50077
 
49938
- var useStyles$u = makeStyles$1(function (theme) {
50078
+ var useStyles$w = makeStyles$1(function (theme) {
49939
50079
  return {
49940
50080
  root: {
49941
50081
  width: '100%',
@@ -49975,7 +50115,7 @@ function USearchBox(_ref) {
49975
50115
  searchValue = _useState2[0],
49976
50116
  setSearch = _useState2[1];
49977
50117
 
49978
- var classes = useStyles$u();
50118
+ var classes = useStyles$w();
49979
50119
 
49980
50120
  var handleChange = function handleChange(event) {
49981
50121
  setSearch(event.target.value);
@@ -50076,7 +50216,7 @@ var styles$16 = {
50076
50216
  }
50077
50217
  };
50078
50218
 
50079
- var useStyles$v = makeStyles$1(function (theme) {
50219
+ var useStyles$x = makeStyles$1(function (theme) {
50080
50220
  return {
50081
50221
  textField: {
50082
50222
  marginTop: theme.spacing(0.25),
@@ -50119,7 +50259,7 @@ var useStyles$v = makeStyles$1(function (theme) {
50119
50259
  * ActiveKeyboardDatePicker is a customized [Material Ui KeyboardDatePicker]('https://material-ui-pickers.dev/api/KeyboardDatePicker') for more details
50120
50260
  */
50121
50261
  function ActiveKeyboardDatePicker(props) {
50122
- var classes = useStyles$v(props);
50262
+ var classes = useStyles$x(props);
50123
50263
  var autoOk = props.autoOk,
50124
50264
  variant = props.variant,
50125
50265
  inputVariant = props.inputVariant,
@@ -50238,7 +50378,7 @@ var styles$17 = {
50238
50378
  }
50239
50379
  };
50240
50380
 
50241
- var useStyles$w = makeStyles$1(function (theme) {
50381
+ var useStyles$y = makeStyles$1(function (theme) {
50242
50382
  return {
50243
50383
  textField: {
50244
50384
  marginTop: theme.spacing(0.25),
@@ -50277,7 +50417,7 @@ var useStyles$w = makeStyles$1(function (theme) {
50277
50417
  * Please have look at [Material Ui Date Picker]('https://material-ui-pickers.dev/api/DatePicker') for more details
50278
50418
  */
50279
50419
  function ActiveDatePicker(props) {
50280
- var classes = useStyles$w(props);
50420
+ var classes = useStyles$y(props);
50281
50421
  var autoOk = props.autoOk,
50282
50422
  variant = props.variant,
50283
50423
  inputVariant = props.inputVariant,
@@ -50371,7 +50511,7 @@ var styles$18 = {
50371
50511
  }
50372
50512
  };
50373
50513
 
50374
- var useStyles$x = makeStyles$1(function (theme) {
50514
+ var useStyles$z = makeStyles$1(function (theme) {
50375
50515
  return {
50376
50516
  textField: {
50377
50517
  marginTop: theme.spacing(0.25),
@@ -50410,7 +50550,7 @@ var useStyles$x = makeStyles$1(function (theme) {
50410
50550
  * Please have look at [Material Ui TimePicker]('https://material-ui-pickers.dev/api/TimePicker') for more details
50411
50551
  */
50412
50552
  function ActiveTimePicker(props) {
50413
- var classes = useStyles$x(props);
50553
+ var classes = useStyles$z(props);
50414
50554
  var inputVariant = props.inputVariant,
50415
50555
  readOnly = props.readOnly,
50416
50556
  interactiveMode = props.interactiveMode,
@@ -50495,7 +50635,7 @@ var styles$19 = {
50495
50635
  }
50496
50636
  };
50497
50637
 
50498
- var useStyles$y = makeStyles$1(function (theme) {
50638
+ var useStyles$A = makeStyles$1(function (theme) {
50499
50639
  return {
50500
50640
  textField: {
50501
50641
  marginTop: theme.spacing(0.25),
@@ -50538,7 +50678,7 @@ var useStyles$y = makeStyles$1(function (theme) {
50538
50678
  * ActiveKeyboardTimePicker is customized [ Material Ui KeyboardTimePicker](https://material-ui-pickers.dev/api/KeyboardTimePicker)
50539
50679
  */
50540
50680
  function ActiveKeyboardTimePicker(props) {
50541
- var classes = useStyles$y(props);
50681
+ var classes = useStyles$A(props);
50542
50682
  var inputVariant = props.inputVariant,
50543
50683
  readOnly = props.readOnly,
50544
50684
  interactiveMode = props.interactiveMode,
@@ -50640,6 +50780,7 @@ ActiveKeyboardTimePicker.defaultProps = {
50640
50780
  variant: 'inline'
50641
50781
  };
50642
50782
 
50783
+ exports.ActiveCurrencyField = ActiveCurrencyField;
50643
50784
  exports.ActiveDatePicker = ActiveDatePicker;
50644
50785
  exports.ActiveFormCoordinateField = ActiveFormCoordinateField;
50645
50786
  exports.ActiveFormPositiveInteger = ActiveFormPositiveInteger;
@@ -50656,6 +50797,7 @@ exports.UButton = UButton;
50656
50797
  exports.UConfirmationButton = UConfirmationButton;
50657
50798
  exports.UContent = UContent;
50658
50799
  exports.UCoordinateField = UCoordinateField;
50800
+ exports.UCurrencyField = UCurrencyField;
50659
50801
  exports.UDatePicker = UDatePicker;
50660
50802
  exports.UDateTimePicker = UDateTimePicker;
50661
50803
  exports.UErrorAlert = UErrorAlert;