@xqmsg/ui-core 0.24.5 → 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/StackedPilledInput/index.d.ts +1 -0
- package/dist/components/input/components/token/index.d.ts +1 -0
- package/dist/components/input/index.d.ts +2 -1
- package/dist/ui-core.cjs.development.js +12 -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 +12 -6
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedPilledInput/index.tsx +3 -0
- package/src/components/input/components/token/index.tsx +8 -2
- package/src/components/input/index.tsx +3 -0
package/dist/ui-core.esm.js
CHANGED
|
@@ -1272,7 +1272,9 @@ var Token = function Token(_ref) {
|
|
|
1272
1272
|
var label = _ref.label,
|
|
1273
1273
|
onDelete = _ref.onDelete,
|
|
1274
1274
|
_ref$isMobile = _ref.isMobile,
|
|
1275
|
-
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;
|
|
1276
1278
|
return /*#__PURE__*/React__default.createElement(Flex, {
|
|
1277
1279
|
key: label,
|
|
1278
1280
|
borderRadius: 'full',
|
|
@@ -1291,7 +1293,7 @@ var Token = function Token(_ref) {
|
|
|
1291
1293
|
fontSize: isMobile ? '17px' : '13px',
|
|
1292
1294
|
pr: "4px"
|
|
1293
1295
|
}, truncate(label.trim(), {
|
|
1294
|
-
length:
|
|
1296
|
+
length: truncateLength,
|
|
1295
1297
|
omission: '...'
|
|
1296
1298
|
})), /*#__PURE__*/React__default.createElement(Close, {
|
|
1297
1299
|
boxSize: isMobile ? '17px' : '11px',
|
|
@@ -1604,7 +1606,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1604
1606
|
_ref2$separators = _ref2.separators,
|
|
1605
1607
|
separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
|
|
1606
1608
|
variant = _ref2.variant,
|
|
1607
|
-
label = _ref2.label
|
|
1609
|
+
label = _ref2.label,
|
|
1610
|
+
truncatePillLength = _ref2.truncatePillLength;
|
|
1608
1611
|
var watchedValue = useWatch({
|
|
1609
1612
|
control: control,
|
|
1610
1613
|
name: name
|
|
@@ -1813,7 +1816,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
|
|
|
1813
1816
|
e.preventDefault();
|
|
1814
1817
|
onRemoveTag(index);
|
|
1815
1818
|
},
|
|
1816
|
-
isMobile: isMobile
|
|
1819
|
+
isMobile: isMobile,
|
|
1820
|
+
truncateLength: truncatePillLength
|
|
1817
1821
|
}));
|
|
1818
1822
|
}) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(Text$2, {
|
|
1819
1823
|
color: colors.label.secondary.light,
|
|
@@ -1932,7 +1936,8 @@ function Input(_ref) {
|
|
|
1932
1936
|
clearErrors = _ref.clearErrors,
|
|
1933
1937
|
separators = _ref.separators,
|
|
1934
1938
|
_ref$loadingOptions = _ref.loadingOptions,
|
|
1935
|
-
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions
|
|
1939
|
+
loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
|
|
1940
|
+
truncatePillLength = _ref.truncatePillLength;
|
|
1936
1941
|
function selectedInputField(onChange, onBlur, ref, value) {
|
|
1937
1942
|
switch (inputType) {
|
|
1938
1943
|
case 'text':
|
|
@@ -2061,7 +2066,8 @@ function Input(_ref) {
|
|
|
2061
2066
|
maxLength: maxLength,
|
|
2062
2067
|
variant: variant,
|
|
2063
2068
|
label: label,
|
|
2064
|
-
separators: separators
|
|
2069
|
+
separators: separators,
|
|
2070
|
+
truncatePillLength: truncatePillLength
|
|
2065
2071
|
});
|
|
2066
2072
|
case 'switch':
|
|
2067
2073
|
return /*#__PURE__*/React__default.createElement(StackedSwitch, {
|