@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/dev.js CHANGED
@@ -53512,6 +53512,71 @@ UPositiveInteger.propTypes = {
53512
53512
  withRequiredValidator: PropTypes__default.bool
53513
53513
  };
53514
53514
 
53515
+ var useStyles$n = makeStyles$1(function (theme) {
53516
+ return {
53517
+ startAdornmentContainer: {
53518
+ marginRight: theme.spacing(0.5)
53519
+ }
53520
+ };
53521
+ });
53522
+
53523
+ function UCurrencyField(_ref) {
53524
+ var inputPrefix = _ref.inputPrefix,
53525
+ decimalScale = _ref.decimalScale,
53526
+ InputProps = _ref.InputProps,
53527
+ inputProps = _ref.inputProps,
53528
+ props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
53529
+
53530
+ var classes = useStyles$n(props);
53531
+ return React__default.createElement(UPositiveInteger, _extends$1({
53532
+ variant: 'outlined',
53533
+ InputProps: _extends$1({
53534
+ startAdornment: React__default.createElement(
53535
+ 'span',
53536
+ { className: classes.startAdornmentContainer },
53537
+ inputPrefix
53538
+ )
53539
+ }, InputProps),
53540
+ inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
53541
+ }, props));
53542
+ }
53543
+
53544
+ UCurrencyField.propTypes = {
53545
+ /** label */
53546
+ label: PropTypes__default.string,
53547
+ /** placeholder text*/
53548
+ placeholder: PropTypes__default.string,
53549
+ /**
53550
+ * Array of validators.See list of default validators above.
53551
+ *
53552
+ * Ex: `validators={['required', 'isEmail']}`
53553
+ */
53554
+ validators: PropTypes__default.array,
53555
+ /** Attributes applied to the input element. */
53556
+ inputProps: PropTypes__default.object,
53557
+ /** Props applied to the Input element. */
53558
+ InputProps: PropTypes__default.object,
53559
+ /** Prefix string for the input. */
53560
+ inputPrefix: PropTypes__default.string,
53561
+ /** Decimal digit number to be used as default. */
53562
+ decimalScale: PropTypes__default.number,
53563
+ /**
53564
+ * customErrorMessages is an object with key as validator and value as customised error message.
53565
+ *
53566
+ * Ex: `customErrorMessages={{required: 'This field is required'}`
53567
+ */
53568
+ customErrorMessages: PropTypes__default.object,
53569
+ /** To make the content readOnly */
53570
+ readOnly: PropTypes__default.bool,
53571
+ /** Name of input. */
53572
+ name: PropTypes__default.string
53573
+ };
53574
+
53575
+ UCurrencyField.defaultProps = {
53576
+ inputPrefix: '$',
53577
+ decimalScale: 2
53578
+ };
53579
+
53515
53580
  function ActiveFormPositiveInteger(_ref) {
53516
53581
  var InputProps = _ref.InputProps,
53517
53582
  props = objectWithoutProperties(_ref, ['InputProps']);
@@ -53560,6 +53625,81 @@ ActiveFormPositiveInteger.propTypes = {
53560
53625
  withRequiredValidator: PropTypes__default.bool
53561
53626
  };
53562
53627
 
53628
+ var useStyles$o = makeStyles$1(function (theme) {
53629
+ return {
53630
+ startAdornmentContainer: {
53631
+ marginRight: theme.spacing(0.5)
53632
+ }
53633
+ };
53634
+ });
53635
+
53636
+ function ActiveCurrencyField(_ref) {
53637
+ var inputPrefix = _ref.inputPrefix,
53638
+ decimalScale = _ref.decimalScale,
53639
+ InputProps = _ref.InputProps,
53640
+ inputProps = _ref.inputProps,
53641
+ props = objectWithoutProperties(_ref, ['inputPrefix', 'decimalScale', 'InputProps', 'inputProps']);
53642
+
53643
+ var classes = useStyles$o(props);
53644
+ return React__default.createElement(ActiveFormPositiveInteger, _extends$1({
53645
+ variant: 'outlined',
53646
+ InputProps: _extends$1({
53647
+ startAdornment: React__default.createElement(
53648
+ 'span',
53649
+ { className: classes.startAdornmentContainer },
53650
+ inputPrefix
53651
+ )
53652
+ }, InputProps),
53653
+ inputProps: _extends$1({ decimalScale: decimalScale }, inputProps)
53654
+ }, props));
53655
+ }
53656
+
53657
+ ActiveCurrencyField.propTypes = {
53658
+ /** label */
53659
+ label: PropTypes__default.string,
53660
+ /** placeholder text*/
53661
+ placeholder: PropTypes__default.string,
53662
+ /** Typography for text inside the input (Ex: h1, div, etc.) */
53663
+ typographyVariant: PropTypes__default.string,
53664
+ /** Input has some default padding already, to make changes to it pass padding like `inputPadding='0px 2px'` */
53665
+ inputPadding: PropTypes__default.string,
53666
+ /** To hide or display the textfied border*/
53667
+ showBorder: PropTypes__default.bool,
53668
+ /**
53669
+ * Array of validators.See list of default validators above.
53670
+ *
53671
+ * Ex: `validators={['required', 'isEmail']}`
53672
+ */
53673
+ validators: PropTypes__default.array,
53674
+ /** Attributes applied to the input element. */
53675
+ inputProps: PropTypes__default.object,
53676
+ /** Props applied to the Input element. */
53677
+ InputProps: PropTypes__default.object,
53678
+ /** Prefix string for the input. */
53679
+ inputPrefix: PropTypes__default.string,
53680
+ /** Decimal digit number to be used as default. */
53681
+ decimalScale: PropTypes__default.number,
53682
+ /**
53683
+ * customErrorMessages is an object with key as validator and value as customised error message.
53684
+ *
53685
+ * Ex: `customErrorMessages={{required: 'This field is required'}`
53686
+ */
53687
+ customErrorMessages: PropTypes__default.object,
53688
+ /** To make the content readOnly */
53689
+ readOnly: PropTypes__default.bool,
53690
+ /** Name of input. */
53691
+ name: PropTypes__default.string,
53692
+ /** It triggers after each validation.It will return true or false. */
53693
+ validatorListener: PropTypes__default.func,
53694
+ /** Allow to use required validator in any validation trigger, not only form submit. */
53695
+ withRequiredValidator: PropTypes__default.bool
53696
+ };
53697
+
53698
+ ActiveCurrencyField.defaultProps = {
53699
+ inputPrefix: '$',
53700
+ decimalScale: 2
53701
+ };
53702
+
53563
53703
  var DeleteOutlined = createCommonjsModule(function (module, exports) {
53564
53704
 
53565
53705
 
@@ -53584,7 +53724,7 @@ exports.default = _default;
53584
53724
 
53585
53725
  var DeleteOutlinedIcon = unwrapExports(DeleteOutlined);
53586
53726
 
53587
- var useStyles$n = makeStyles$1(function (theme) {
53727
+ var useStyles$p = makeStyles$1(function (theme) {
53588
53728
  return {
53589
53729
  menuDelete: {
53590
53730
  width: '500px'
@@ -53604,7 +53744,7 @@ var useStyles$n = makeStyles$1(function (theme) {
53604
53744
  * It has two varint icon/menu item
53605
53745
  */
53606
53746
  function UConfirmationButton(props) {
53607
- var classes = useStyles$n();
53747
+ var classes = useStyles$p();
53608
53748
  var onConfirm = props.onConfirm,
53609
53749
  id = props.id,
53610
53750
  buttonText = props.buttonText,
@@ -53719,7 +53859,7 @@ UConfirmationButton.defaultProps = {
53719
53859
  /**
53720
53860
  * displays radio buttons
53721
53861
  */
53722
- var useStyles$o = makeStyles$1(function (theme) {
53862
+ var useStyles$q = makeStyles$1(function (theme) {
53723
53863
  return {
53724
53864
  padding: {
53725
53865
  paddingLeft: theme.spacing(3)
@@ -53740,7 +53880,7 @@ function URadioButtons(_ref) {
53740
53880
  optionLabels = _ref.optionLabels,
53741
53881
  optionValues = _ref.optionValues;
53742
53882
 
53743
- var classes = useStyles$o();
53883
+ var classes = useStyles$q();
53744
53884
  var handleOnChange = function handleOnChange(event) {
53745
53885
  onChange && onChange(event);
53746
53886
  };
@@ -53844,7 +53984,7 @@ exports.default = _default;
53844
53984
 
53845
53985
  var DoneIcon = unwrapExports(Done);
53846
53986
 
53847
- var useStyles$p = makeStyles$1(function (theme) {
53987
+ var useStyles$r = makeStyles$1(function (theme) {
53848
53988
  return {
53849
53989
  root: {
53850
53990
  position: 'fixed',
@@ -53876,7 +54016,7 @@ function UAsyncBadge(_ref) {
53876
54016
  visible = _ref.visible,
53877
54017
  onReset = _ref.onReset;
53878
54018
 
53879
- var classes = useStyles$p();
54019
+ var classes = useStyles$r();
53880
54020
 
53881
54021
  /** If variant is success or error, after few seconds, it will set asyncResponse visible to false */
53882
54022
  React.useEffect(function () {
@@ -53915,7 +54055,7 @@ UAsyncBadge.propTypes = {
53915
54055
  onReset: PropTypes__default.func
53916
54056
  };
53917
54057
 
53918
- var useStyles$q = makeStyles$1(function () {
54058
+ var useStyles$s = makeStyles$1(function () {
53919
54059
  return {
53920
54060
  pageLoadingProgress: {
53921
54061
  height: '50vh',
@@ -53930,7 +54070,7 @@ var useStyles$q = makeStyles$1(function () {
53930
54070
  * 2. Display text message
53931
54071
  */
53932
54072
  function UPageLoadingProgress(props) {
53933
- var classes = useStyles$q();
54073
+ var classes = useStyles$s();
53934
54074
  var text = props.text;
53935
54075
 
53936
54076
  return React__default.createElement(
@@ -56313,7 +56453,7 @@ UErrorAlert.defaultProps = {
56313
56453
 
56314
56454
  var filter = createFilterOptions();
56315
56455
 
56316
- var useStyles$r = makeStyles$1(function (theme) {
56456
+ var useStyles$t = makeStyles$1(function (theme) {
56317
56457
  return {
56318
56458
  controlStyle: {
56319
56459
  marginTop: theme.spacing(2),
@@ -56341,7 +56481,7 @@ function UAutoComplete(_ref) {
56341
56481
  allowContextSpecific = _ref.allowContextSpecific,
56342
56482
  props = _ref.props;
56343
56483
 
56344
- var classes = useStyles$r();
56484
+ var classes = useStyles$t();
56345
56485
  //const dispatch = useDispatch()
56346
56486
 
56347
56487
  var _useState = React.useState(value || null),
@@ -56490,7 +56630,7 @@ UAutoComplete.defaultProps = {
56490
56630
 
56491
56631
  /* eslint-disable no-nested-ternary */
56492
56632
 
56493
- var useStyles$s = makeStyles$1(function (theme) {
56633
+ var useStyles$u = makeStyles$1(function (theme) {
56494
56634
  var _ref;
56495
56635
 
56496
56636
  return _ref = {
@@ -56522,7 +56662,7 @@ var useStyles$s = makeStyles$1(function (theme) {
56522
56662
  * Breadcrumbs is a component to implement current user path of the application
56523
56663
  */
56524
56664
  function UBreadcrumbs(props) {
56525
- var classes = useStyles$s();
56665
+ var classes = useStyles$u();
56526
56666
  var breadcrumbLinks = props.breadcrumbLinks;
56527
56667
 
56528
56668
 
@@ -56599,7 +56739,7 @@ UInfiniteScroll.propTypes = {
56599
56739
  onEndOfScroll: PropTypes__default.func
56600
56740
  };
56601
56741
 
56602
- var useStyles$t = makeStyles$1(function (theme) {
56742
+ var useStyles$v = makeStyles$1(function (theme) {
56603
56743
  return {
56604
56744
  small: {
56605
56745
  width: theme.spacing(4),
@@ -56644,7 +56784,7 @@ function UAvatarImage(_ref) {
56644
56784
  zIndexValue = _ref.zIndexValue,
56645
56785
  loadPhoto = _ref.loadPhoto;
56646
56786
 
56647
- var classes = useStyles$t();
56787
+ var classes = useStyles$v();
56648
56788
 
56649
56789
  var _useState = React.useState(''),
56650
56790
  _useState2 = slicedToArray(_useState, 2),
@@ -57076,7 +57216,7 @@ exports.default = _default;
57076
57216
 
57077
57217
  var CloseIcon$1 = unwrapExports(Close);
57078
57218
 
57079
- var useStyles$u = makeStyles$1(function (theme) {
57219
+ var useStyles$w = makeStyles$1(function (theme) {
57080
57220
  return {
57081
57221
  root: {
57082
57222
  width: '100%',
@@ -57116,7 +57256,7 @@ function USearchBox(_ref) {
57116
57256
  searchValue = _useState2[0],
57117
57257
  setSearch = _useState2[1];
57118
57258
 
57119
- var classes = useStyles$u();
57259
+ var classes = useStyles$w();
57120
57260
 
57121
57261
  var handleChange = function handleChange(event) {
57122
57262
  setSearch(event.target.value);
@@ -57217,7 +57357,7 @@ var styles$16 = {
57217
57357
  }
57218
57358
  };
57219
57359
 
57220
- var useStyles$v = makeStyles$1(function (theme) {
57360
+ var useStyles$x = makeStyles$1(function (theme) {
57221
57361
  return {
57222
57362
  textField: {
57223
57363
  marginTop: theme.spacing(0.25),
@@ -57260,7 +57400,7 @@ var useStyles$v = makeStyles$1(function (theme) {
57260
57400
  * ActiveKeyboardDatePicker is a customized [Material Ui KeyboardDatePicker]('https://material-ui-pickers.dev/api/KeyboardDatePicker') for more details
57261
57401
  */
57262
57402
  function ActiveKeyboardDatePicker(props) {
57263
- var classes = useStyles$v(props);
57403
+ var classes = useStyles$x(props);
57264
57404
  var autoOk = props.autoOk,
57265
57405
  variant = props.variant,
57266
57406
  inputVariant = props.inputVariant,
@@ -57379,7 +57519,7 @@ var styles$17 = {
57379
57519
  }
57380
57520
  };
57381
57521
 
57382
- var useStyles$w = makeStyles$1(function (theme) {
57522
+ var useStyles$y = makeStyles$1(function (theme) {
57383
57523
  return {
57384
57524
  textField: {
57385
57525
  marginTop: theme.spacing(0.25),
@@ -57418,7 +57558,7 @@ var useStyles$w = makeStyles$1(function (theme) {
57418
57558
  * Please have look at [Material Ui Date Picker]('https://material-ui-pickers.dev/api/DatePicker') for more details
57419
57559
  */
57420
57560
  function ActiveDatePicker(props) {
57421
- var classes = useStyles$w(props);
57561
+ var classes = useStyles$y(props);
57422
57562
  var autoOk = props.autoOk,
57423
57563
  variant = props.variant,
57424
57564
  inputVariant = props.inputVariant,
@@ -57512,7 +57652,7 @@ var styles$18 = {
57512
57652
  }
57513
57653
  };
57514
57654
 
57515
- var useStyles$x = makeStyles$1(function (theme) {
57655
+ var useStyles$z = makeStyles$1(function (theme) {
57516
57656
  return {
57517
57657
  textField: {
57518
57658
  marginTop: theme.spacing(0.25),
@@ -57551,7 +57691,7 @@ var useStyles$x = makeStyles$1(function (theme) {
57551
57691
  * Please have look at [Material Ui TimePicker]('https://material-ui-pickers.dev/api/TimePicker') for more details
57552
57692
  */
57553
57693
  function ActiveTimePicker(props) {
57554
- var classes = useStyles$x(props);
57694
+ var classes = useStyles$z(props);
57555
57695
  var inputVariant = props.inputVariant,
57556
57696
  readOnly = props.readOnly,
57557
57697
  interactiveMode = props.interactiveMode,
@@ -57636,7 +57776,7 @@ var styles$19 = {
57636
57776
  }
57637
57777
  };
57638
57778
 
57639
- var useStyles$y = makeStyles$1(function (theme) {
57779
+ var useStyles$A = makeStyles$1(function (theme) {
57640
57780
  return {
57641
57781
  textField: {
57642
57782
  marginTop: theme.spacing(0.25),
@@ -57679,7 +57819,7 @@ var useStyles$y = makeStyles$1(function (theme) {
57679
57819
  * ActiveKeyboardTimePicker is customized [ Material Ui KeyboardTimePicker](https://material-ui-pickers.dev/api/KeyboardTimePicker)
57680
57820
  */
57681
57821
  function ActiveKeyboardTimePicker(props) {
57682
- var classes = useStyles$y(props);
57822
+ var classes = useStyles$A(props);
57683
57823
  var inputVariant = props.inputVariant,
57684
57824
  readOnly = props.readOnly,
57685
57825
  interactiveMode = props.interactiveMode,
@@ -57781,6 +57921,7 @@ ActiveKeyboardTimePicker.defaultProps = {
57781
57921
  variant: 'inline'
57782
57922
  };
57783
57923
 
57924
+ exports.ActiveCurrencyField = ActiveCurrencyField;
57784
57925
  exports.ActiveDatePicker = ActiveDatePicker;
57785
57926
  exports.ActiveFormCoordinateField = ActiveFormCoordinateField;
57786
57927
  exports.ActiveFormPositiveInteger = ActiveFormPositiveInteger;
@@ -57797,6 +57938,7 @@ exports.UButton = UButton;
57797
57938
  exports.UConfirmationButton = UConfirmationButton;
57798
57939
  exports.UContent = UContent;
57799
57940
  exports.UCoordinateField = UCoordinateField;
57941
+ exports.UCurrencyField = UCurrencyField;
57800
57942
  exports.UDatePicker = UDatePicker;
57801
57943
  exports.UDateTimePicker = UDateTimePicker;
57802
57944
  exports.UErrorAlert = UErrorAlert;