@unicef/material-ui 0.11.6 → 0.11.7

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
@@ -28569,6 +28569,30 @@ exports.default = _default;
28569
28569
 
28570
28570
  var CancelIcon$1 = unwrapExports(Cancel);
28571
28571
 
28572
+ var ArrowDropDown = createCommonjsModule(function (module, exports) {
28573
+
28574
+
28575
+
28576
+
28577
+
28578
+ Object.defineProperty(exports, "__esModule", {
28579
+ value: true
28580
+ });
28581
+ exports.default = void 0;
28582
+
28583
+ var React = interopRequireWildcard(React__default);
28584
+
28585
+ var _createSvgIcon = interopRequireDefault(createSvgIcon$1);
28586
+
28587
+ var _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement("path", {
28588
+ d: "M7 10l5 5 5-5z"
28589
+ }), 'ArrowDropDown');
28590
+
28591
+ exports.default = _default;
28592
+ });
28593
+
28594
+ var ArrowDropDownIcon$1 = unwrapExports(ArrowDropDown);
28595
+
28572
28596
  var useStyles$5 = makeStyles$1(function (theme) {
28573
28597
  return {
28574
28598
  chip: {
@@ -30648,6 +30672,11 @@ var defaultComponents$1 = {
30648
30672
  MultiValueRemove: function MultiValueRemove(removeProps) {
30649
30673
  return React__default.createElement(CancelIcon$1, removeProps);
30650
30674
  }
30675
+ };
30676
+
30677
+ var ICON_VARIANTS = {
30678
+ dark: 'dark',
30679
+ light: 'light'
30651
30680
 
30652
30681
  /**
30653
30682
  * USelectPicker is a control for selecting a option from a list. Has the features below:
@@ -30678,7 +30707,8 @@ var defaultComponents$1 = {
30678
30707
  isDisabled = props.isDisabled,
30679
30708
  menuIsOpen = props.menuIsOpen,
30680
30709
  placeholder = props.placeholder,
30681
- others = objectWithoutProperties(props, ['label', 'variant', 'TextFieldProps', 'showNoOptionsWithEmptyTextField', 'onInputChange', 'components', 'showLabelHelp', 'InputLabelProps', 'InputLabelHelpProps', 'hideAvatar', 'readOnly', 'lineByLineOption', 'isClearable', 'isSearchable', 'isDisabled', 'menuIsOpen', 'placeholder']);
30710
+ iconVariant = props.iconVariant,
30711
+ others = objectWithoutProperties(props, ['label', 'variant', 'TextFieldProps', 'showNoOptionsWithEmptyTextField', 'onInputChange', 'components', 'showLabelHelp', 'InputLabelProps', 'InputLabelHelpProps', 'hideAvatar', 'readOnly', 'lineByLineOption', 'isClearable', 'isSearchable', 'isDisabled', 'menuIsOpen', 'placeholder', 'iconVariant']);
30682
30712
 
30683
30713
  var _useState = React.useState(true),
30684
30714
  _useState2 = slicedToArray(_useState, 2),
@@ -30724,11 +30754,17 @@ var defaultComponents$1 = {
30724
30754
  onInputChange && onInputChange(value);
30725
30755
  };
30726
30756
 
30727
- var extraComponents = readOnly ? {
30728
- DropdownIndicator: function DropdownIndicator() {
30729
- return null;
30730
- }
30731
- } : {};
30757
+ var extraComponents = {};
30758
+ if (iconVariant === ICON_VARIANTS.dark) extraComponents.DropdownIndicator = function () {
30759
+ return React__default.createElement(
30760
+ 'span',
30761
+ { style: { color: theme.palette.text.secondary } },
30762
+ React__default.createElement(ArrowDropDownIcon$1, null)
30763
+ );
30764
+ };
30765
+ if (readOnly) extraComponents.DropdownIndicator = function () {
30766
+ return null;
30767
+ };
30732
30768
 
30733
30769
  var selectPlaceholder = readOnly ? '' : placeholder;
30734
30770
 
@@ -30819,7 +30855,9 @@ USelectPicker.propTypes = {
30819
30855
  /** Whether the input is disabled */
30820
30856
  isDisabled: PropTypes__default.bool,
30821
30857
  /** Whether the menu is open */
30822
- menuIsOpen: PropTypes__default.bool
30858
+ menuIsOpen: PropTypes__default.bool,
30859
+ /** Down arrow variant */
30860
+ iconVariant: PropTypes__default.oneOf([ICON_VARIANTS.dark, ICON_VARIANTS.light])
30823
30861
  };
30824
30862
 
30825
30863
  USelectPicker.defaultProps = {
@@ -30835,7 +30873,8 @@ USelectPicker.defaultProps = {
30835
30873
  isSearchable: true,
30836
30874
  isDisabled: false,
30837
30875
  menuIsOpen: undefined,
30838
- lineByLineOption: false
30876
+ lineByLineOption: false,
30877
+ iconVariant: ICON_VARIANTS.light
30839
30878
  };
30840
30879
 
30841
30880
  /**
@@ -43414,7 +43453,7 @@ var Alert$1 = withStyles$1(styles$14, {
43414
43453
  * @ignore - internal component.
43415
43454
  */
43416
43455
 
43417
- var ArrowDropDownIcon$1 = createSvgIcon( /*#__PURE__*/React.createElement("path", {
43456
+ var ArrowDropDownIcon$2 = createSvgIcon( /*#__PURE__*/React.createElement("path", {
43418
43457
  d: "M7 10l5 5 5-5z"
43419
43458
  }));
43420
43459
 
@@ -44692,7 +44731,7 @@ var _ref$4 = /*#__PURE__*/React.createElement(CloseIcon, {
44692
44731
  fontSize: "small"
44693
44732
  });
44694
44733
 
44695
- var _ref2$3 = /*#__PURE__*/React.createElement(ArrowDropDownIcon$1, null);
44734
+ var _ref2$3 = /*#__PURE__*/React.createElement(ArrowDropDownIcon$2, null);
44696
44735
 
44697
44736
  var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(props, ref) {
44698
44737
  /* eslint-disable no-unused-vars */