@rhc-shared-components/form-multi-select-component 0.0.5 → 0.0.6

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.
@@ -13,6 +13,9 @@ export interface FormMultiSelectInputProps {
13
13
  ariaLabel?: string;
14
14
  helperText?: string;
15
15
  maxHeight?: string | number;
16
+ isDisabled?: boolean;
17
+ classNames?: string;
18
+ menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
16
19
  }
17
20
  declare const FormMultiSelectInput: React.FC<FormMultiSelectInputProps>;
18
21
  export default FormMultiSelectInput;
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
39
39
  return target;
40
40
  }
41
41
 
42
- var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight"];
42
+ var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight", "isDisabled", "classNames", "menuAppendTo"];
43
43
 
44
44
  var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
45
45
  var label = _ref.label,
@@ -50,6 +50,9 @@ var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
50
50
  placeholder = _ref.placeholder,
51
51
  helperText = _ref.helperText,
52
52
  maxHeight = _ref.maxHeight,
53
+ isDisabled = _ref.isDisabled,
54
+ classNames = _ref.classNames,
55
+ menuAppendTo = _ref.menuAppendTo,
53
56
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
54
57
 
55
58
  var _useField = formik.useField(rest),
@@ -103,8 +106,12 @@ var FormMultiSelectInput = function FormMultiSelectInput(_ref) {
103
106
  }, maxHeight && {
104
107
  maxHeight: maxHeight
105
108
  }, {
106
- isDisabled: isSubmitting,
109
+ isDisabled: isSubmitting || isDisabled,
107
110
  "aria-label": ariaLabel
111
+ }, classNames && {
112
+ className: classNames
113
+ }, menuAppendTo && {
114
+ menuAppendTo: menuAppendTo
108
115
  }, rest), lodash.map(selectOptions, function (option, index) {
109
116
  return React__namespace.createElement(reactCore.SelectOption, Object.assign({
110
117
  key: index,
@@ -19,7 +19,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
19
19
  return target;
20
20
  }
21
21
 
22
- const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight"];
22
+ const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "maxHeight", "isDisabled", "classNames", "menuAppendTo"];
23
23
 
24
24
  const FormMultiSelectInput = _ref => {
25
25
  let {
@@ -29,7 +29,10 @@ const FormMultiSelectInput = _ref => {
29
29
  ariaLabel = 'Select Input',
30
30
  placeholder,
31
31
  helperText,
32
- maxHeight
32
+ maxHeight,
33
+ isDisabled,
34
+ classNames,
35
+ menuAppendTo
33
36
  } = _ref,
34
37
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
35
38
 
@@ -79,8 +82,12 @@ const FormMultiSelectInput = _ref => {
79
82
  }, maxHeight && {
80
83
  maxHeight
81
84
  }, {
82
- isDisabled: isSubmitting,
85
+ isDisabled: isSubmitting || isDisabled,
83
86
  "aria-label": ariaLabel
87
+ }, classNames && {
88
+ className: classNames
89
+ }, menuAppendTo && {
90
+ menuAppendTo
84
91
  }, rest), map(selectOptions, (option, index) => React.createElement(SelectOption, Object.assign({
85
92
  key: index,
86
93
  value: option.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhc-shared-components/form-multi-select-component",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "project description",
5
5
  "author": "shkale",
6
6
  "license": "MIT",