@xqmsg/ui-core 0.24.4 → 0.24.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.
- package/dist/components/input/StackedInput/StackedInput.d.ts +0 -1
- package/dist/components/input/StackedPilledInput/index.d.ts +1 -0
- package/dist/components/input/StackedTextarea/StackedTextarea.d.ts +0 -1
- package/dist/components/input/components/token/index.d.ts +1 -0
- package/dist/components/input/index.d.ts +2 -2
- package/dist/components/select/index.d.ts +0 -1
- package/dist/ui-core.cjs.development.js +18 -34
- 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 +18 -34
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedInput/StackedInput.tsx +0 -8
- package/src/components/input/StackedPilledInput/index.tsx +3 -0
- package/src/components/input/StackedTextarea/StackedTextarea.tsx +2 -22
- package/src/components/input/components/token/index.tsx +8 -2
- package/src/components/input/index.tsx +3 -3
- package/src/components/select/index.tsx +0 -1
package/dist/ui-core.esm.js
CHANGED
|
@@ -807,7 +807,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
807
807
|
return target;
|
|
808
808
|
}
|
|
809
809
|
|
|
810
|
-
var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "
|
|
810
|
+
var _excluded = ["type", "isRequired", "rightElement", "leftElement", "defaultValue", "variant", "label"];
|
|
811
811
|
/**
|
|
812
812
|
* A functional React component utilized to render the `StackedInput` component.
|
|
813
813
|
*/
|
|
@@ -818,7 +818,6 @@ var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref)
|
|
|
818
818
|
rightElement = _ref2.rightElement,
|
|
819
819
|
leftElement = _ref2.leftElement,
|
|
820
820
|
defaultValue = _ref2.defaultValue,
|
|
821
|
-
allowDefault = _ref2.allowDefault,
|
|
822
821
|
variant = _ref2.variant,
|
|
823
822
|
label = _ref2.label,
|
|
824
823
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
@@ -831,13 +830,7 @@ var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref)
|
|
|
831
830
|
ref: _ref,
|
|
832
831
|
defaultValue: defaultValue,
|
|
833
832
|
fontSize: isMobile ? '17px' : '13px',
|
|
834
|
-
variant: variant
|
|
835
|
-
onKeyDown: function onKeyDown(e) {
|
|
836
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
837
|
-
e.stopPropagation();
|
|
838
|
-
e.preventDefault();
|
|
839
|
-
}
|
|
840
|
-
}
|
|
833
|
+
variant: variant
|
|
841
834
|
})), rightElement && rightElement);
|
|
842
835
|
});
|
|
843
836
|
|
|
@@ -1215,13 +1208,12 @@ var StackedSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref
|
|
|
1215
1208
|
}));
|
|
1216
1209
|
});
|
|
1217
1210
|
|
|
1218
|
-
var _excluded$2 = ["isRequired", "
|
|
1211
|
+
var _excluded$2 = ["isRequired", "variant", "label"];
|
|
1219
1212
|
/**
|
|
1220
1213
|
* A functional React component utilized to render the `StackedTextarea` component.
|
|
1221
1214
|
*/
|
|
1222
1215
|
var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref) {
|
|
1223
|
-
var
|
|
1224
|
-
variant = _ref2.variant,
|
|
1216
|
+
var variant = _ref2.variant,
|
|
1225
1217
|
label = _ref2.label,
|
|
1226
1218
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
|
|
1227
1219
|
var isMobile = variant === 'mobile';
|
|
@@ -1231,26 +1223,14 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
|
|
|
1231
1223
|
}, props, {
|
|
1232
1224
|
variant: variant,
|
|
1233
1225
|
fontSize: "17px",
|
|
1234
|
-
placeholder: label != null ? label : ''
|
|
1235
|
-
onKeyDown: function onKeyDown(e) {
|
|
1236
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
1237
|
-
e.stopPropagation();
|
|
1238
|
-
e.preventDefault();
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1226
|
+
placeholder: label != null ? label : ''
|
|
1241
1227
|
})));
|
|
1242
1228
|
}
|
|
1243
1229
|
return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
|
|
1244
1230
|
ref: _ref
|
|
1245
1231
|
}, props, {
|
|
1246
1232
|
variant: variant,
|
|
1247
|
-
fontSize: "13px"
|
|
1248
|
-
onKeyDown: function onKeyDown(e) {
|
|
1249
|
-
if (e.key === 'Enter' && !allowDefault) {
|
|
1250
|
-
e.stopPropagation();
|
|
1251
|
-
e.preventDefault();
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1233
|
+
fontSize: "13px"
|
|
1254
1234
|
}));
|
|
1255
1235
|
});
|
|
1256
1236
|
|
|
@@ -1292,7 +1272,9 @@ var Token = function Token(_ref) {
|
|
|
1292
1272
|
var label = _ref.label,
|
|
1293
1273
|
onDelete = _ref.onDelete,
|
|
1294
1274
|
_ref$isMobile = _ref.isMobile,
|
|
1295
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile
|
|
1275
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
1276
|
+
_ref$truncateLength = _ref.truncateLength,
|
|
1277
|
+
truncateLength = _ref$truncateLength === void 0 ? 15 : _ref$truncateLength;
|
|
1296
1278
|
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1297
1279
|
key: label,
|
|
1298
1280
|
borderRadius: 'full',
|
|
@@ -1311,7 +1293,7 @@ var Token = function Token(_ref) {
|
|
|
1311
1293
|
fontSize: isMobile ? '17px' : '13px',
|
|
1312
1294
|
pr: "4px"
|
|
1313
1295
|
}, truncate(label.trim(), {
|
|
1314
|
-
length:
|
|
1296
|
+
length: truncateLength,
|
|
1315
1297
|
omission: '...'
|
|
1316
1298
|
})), /*#__PURE__*/React__default.createElement(Close, {
|
|
1317
1299
|
boxSize: isMobile ? '17px' : '11px',
|
|
@@ -1624,7 +1606,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1624
1606
|
_ref2$separators = _ref2.separators,
|
|
1625
1607
|
separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
|
|
1626
1608
|
variant = _ref2.variant,
|
|
1627
|
-
label = _ref2.label
|
|
1609
|
+
label = _ref2.label,
|
|
1610
|
+
truncatePillLength = _ref2.truncatePillLength;
|
|
1628
1611
|
var watchedValue = useWatch({
|
|
1629
1612
|
control: control,
|
|
1630
1613
|
name: name
|
|
@@ -1833,7 +1816,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1833
1816
|
e.preventDefault();
|
|
1834
1817
|
onRemoveTag(index);
|
|
1835
1818
|
},
|
|
1836
|
-
isMobile: isMobile
|
|
1819
|
+
isMobile: isMobile,
|
|
1820
|
+
truncateLength: truncatePillLength
|
|
1837
1821
|
}));
|
|
1838
1822
|
}) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1839
1823
|
color: colors.label.secondary.light,
|
|
@@ -1944,7 +1928,6 @@ function Input(_ref) {
|
|
|
1944
1928
|
disabled = _ref.disabled,
|
|
1945
1929
|
rightElement = _ref.rightElement,
|
|
1946
1930
|
leftElement = _ref.leftElement,
|
|
1947
|
-
allowDefault = _ref.allowDefault,
|
|
1948
1931
|
_ref$variant = _ref.variant,
|
|
1949
1932
|
variant = _ref$variant === void 0 ? 'default' : _ref$variant,
|
|
1950
1933
|
onChange = _ref.onChange,
|
|
@@ -1953,7 +1936,8 @@ function Input(_ref) {
|
|
|
1953
1936
|
clearErrors = _ref.clearErrors,
|
|
1954
1937
|
separators = _ref.separators,
|
|
1955
1938
|
_ref$loadingOptions = _ref.loadingOptions,
|
|
1956
|
-
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions
|
|
1939
|
+
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
|
|
1940
|
+
truncatePillLength = _ref.truncatePillLength;
|
|
1957
1941
|
function selectedInputField(onChange, onBlur, ref, value) {
|
|
1958
1942
|
switch (inputType) {
|
|
1959
1943
|
case 'text':
|
|
@@ -1974,7 +1958,6 @@ function Input(_ref) {
|
|
|
1974
1958
|
disabled: disabled,
|
|
1975
1959
|
defaultValue: defaultValue,
|
|
1976
1960
|
value: value,
|
|
1977
|
-
allowDefault: allowDefault,
|
|
1978
1961
|
variant: variant,
|
|
1979
1962
|
label: label
|
|
1980
1963
|
});
|
|
@@ -2083,7 +2066,8 @@ function Input(_ref) {
|
|
|
2083
2066
|
maxLength: maxLength,
|
|
2084
2067
|
variant: variant,
|
|
2085
2068
|
label: label,
|
|
2086
|
-
separators: separators
|
|
2069
|
+
separators: separators,
|
|
2070
|
+
truncatePillLength: truncatePillLength
|
|
2087
2071
|
});
|
|
2088
2072
|
case 'switch':
|
|
2089
2073
|
return /*#__PURE__*/React__default.createElement(StackedSwitch, {
|