@xqmsg/ui-core 0.24.6 → 0.24.8
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/dist/ui-core.cjs.development.js +16 -6
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +16 -6
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedMultiSelect/index.tsx +5 -2
- package/src/components/input/StackedPilledInput/index.tsx +1 -1
- package/src/components/input/StackedSelect/index.tsx +1 -0
- package/src/components/input/index.tsx +9 -0
|
@@ -1196,7 +1196,8 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1196
1196
|
value: isFocussed ? searchValue : selectedOption,
|
|
1197
1197
|
autoComplete: "off",
|
|
1198
1198
|
onChange: handleInput,
|
|
1199
|
-
onKeyDown: handleOnKeyDown
|
|
1199
|
+
onKeyDown: handleOnKeyDown,
|
|
1200
|
+
disabled: disabled
|
|
1200
1201
|
})), /*#__PURE__*/React__default.createElement(react.InputRightElement, {
|
|
1201
1202
|
cursor: disabled ? 'not-allowed' : 'pointer',
|
|
1202
1203
|
onClick: function onClick() {
|
|
@@ -1365,7 +1366,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1365
1366
|
}
|
|
1366
1367
|
}, [boundingClientRect]);
|
|
1367
1368
|
useOnClickOutside(dropdownRef, function () {
|
|
1368
|
-
|
|
1369
|
+
setSearchValue('');
|
|
1370
|
+
setIsFocussed(false);
|
|
1369
1371
|
});
|
|
1370
1372
|
// gets latest watched form value (common delimited) from RHF state and creates a list
|
|
1371
1373
|
React.useEffect(function () {
|
|
@@ -1573,7 +1575,6 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1573
1575
|
width: "0",
|
|
1574
1576
|
autoComplete: "off",
|
|
1575
1577
|
type: "text",
|
|
1576
|
-
ref: inputRef,
|
|
1577
1578
|
tabIndex: -1,
|
|
1578
1579
|
_focus: {
|
|
1579
1580
|
boxShadow: 'none !important'
|
|
@@ -1595,6 +1596,7 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1595
1596
|
optionIndex: optionIndex,
|
|
1596
1597
|
loading: loadingOptions
|
|
1597
1598
|
}, /*#__PURE__*/React__default.createElement(react.Input, {
|
|
1599
|
+
ref: inputRef,
|
|
1598
1600
|
value: searchValue,
|
|
1599
1601
|
onChange: handleInput,
|
|
1600
1602
|
disabled: loadingOptions
|
|
@@ -1803,7 +1805,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1803
1805
|
}
|
|
1804
1806
|
},
|
|
1805
1807
|
ref: scrollRef,
|
|
1806
|
-
zIndex:
|
|
1808
|
+
zIndex: 99,
|
|
1807
1809
|
onKeyDown: onHandleKeyDown
|
|
1808
1810
|
}, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
|
|
1809
1811
|
return /*#__PURE__*/React__default.createElement(react.Box, {
|
|
@@ -1946,6 +1948,10 @@ function Input(_ref) {
|
|
|
1946
1948
|
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
|
|
1947
1949
|
truncatePillLength = _ref.truncatePillLength;
|
|
1948
1950
|
function selectedInputField(onChange, onBlur, ref, value) {
|
|
1951
|
+
if (inputType === 'text') {
|
|
1952
|
+
console.log(errorText);
|
|
1953
|
+
console.log(isInvalid);
|
|
1954
|
+
}
|
|
1949
1955
|
switch (inputType) {
|
|
1950
1956
|
case 'text':
|
|
1951
1957
|
return /*#__PURE__*/React__default.createElement(StackedInput, {
|
|
@@ -1966,7 +1972,9 @@ function Input(_ref) {
|
|
|
1966
1972
|
defaultValue: defaultValue,
|
|
1967
1973
|
value: value,
|
|
1968
1974
|
variant: variant,
|
|
1969
|
-
label: label
|
|
1975
|
+
label: label,
|
|
1976
|
+
setError: setError,
|
|
1977
|
+
clearErrors: clearErrors
|
|
1970
1978
|
});
|
|
1971
1979
|
case 'radio':
|
|
1972
1980
|
return /*#__PURE__*/React__default.createElement(StackedRadioGroup, {
|
|
@@ -1993,6 +2001,8 @@ function Input(_ref) {
|
|
|
1993
2001
|
onBlur: onBlur,
|
|
1994
2002
|
setValue: setValue,
|
|
1995
2003
|
control: control,
|
|
2004
|
+
setError: setError,
|
|
2005
|
+
clearErrors: clearErrors,
|
|
1996
2006
|
ref: ref,
|
|
1997
2007
|
disabled: disabled,
|
|
1998
2008
|
value: value,
|
|
@@ -2116,7 +2126,7 @@ function Input(_ref) {
|
|
|
2116
2126
|
tooltipText: tooltipText,
|
|
2117
2127
|
label: label,
|
|
2118
2128
|
isRequired: isRequired
|
|
2119
|
-
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid && /*#__PURE__*/React__default.createElement(react.FormErrorMessage, null, errorText), helperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, null, helperText));
|
|
2129
|
+
}), selectedInputField(onChange ? onChange : fieldOnChange, onBlur, ref, value), isInvalid && /*#__PURE__*/React__default.createElement(react.FormErrorMessage, null, errorText), helperText && /*#__PURE__*/React__default.createElement(react.FormHelperText, null, helperText), errorText, " ", isInvalid == null ? void 0 : isInvalid.toString());
|
|
2120
2130
|
}
|
|
2121
2131
|
});
|
|
2122
2132
|
}
|