@pedidopago/ui 1.7.8 → 1.7.9
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/Examples/index.tsx"],"names":[],"mappings":";AAUA,wBAAgB,qCAAqC,gBAwCpD;AAED,wBAAgB,oCAAoC,gBA6BnD;AACD,wBAAgB,6BAA6B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/NewSelect/Examples/index.tsx"],"names":[],"mappings":";AAUA,wBAAgB,qCAAqC,gBAwCpD;AAED,wBAAgB,oCAAoC,gBA6BnD;AACD,wBAAgB,6BAA6B,gBAiC5C"}
|
|
@@ -108,7 +108,7 @@ function MultipleSelectExampleWithChip() {
|
|
|
108
108
|
searchInput = _useState10[0],
|
|
109
109
|
setSearchInput = _useState10[1];
|
|
110
110
|
var filteredOptions = _constants.optionsSelectExample.filter(function (option) {
|
|
111
|
-
return option.label.includes(searchInput);
|
|
111
|
+
return option.label.toLowerCase().includes(searchInput.toLowerCase());
|
|
112
112
|
});
|
|
113
113
|
var _useState11 = (0, _react.useState)([]),
|
|
114
114
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
@@ -131,6 +131,7 @@ function MultipleSelectExampleWithChip() {
|
|
|
131
131
|
});
|
|
132
132
|
},
|
|
133
133
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectInputSearch.SelectInputSearch, {
|
|
134
|
+
value: searchInput,
|
|
134
135
|
onChange: function onChange(event) {
|
|
135
136
|
return setSearchInput(event.currentTarget.value);
|
|
136
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/index.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,WAAW,EAA8C,MAAM,SAAS,CAAC;AAElF,wBAAgB,SAAS,CAAC,EACxB,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/NewSelect/index.tsx"],"names":[],"mappings":";AAqBA,OAAO,EAAE,WAAW,EAA8C,MAAM,SAAS,CAAC;AAElF,wBAAgB,SAAS,CAAC,EACxB,KAAU,EACV,WAAgB,EAChB,KAAK,EACL,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,WAAW,eA0Nb;yBAxOe,SAAS"}
|
|
@@ -224,26 +224,21 @@ function NewSelect(_ref) {
|
|
|
224
224
|
var _child$props;
|
|
225
225
|
return option.value === ((_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.value);
|
|
226
226
|
});
|
|
227
|
-
var isSelectItemElement = child
|
|
227
|
+
var isSelectItemElement = /*#__PURE__*/(0, _react.isValidElement)(child) && child.type.displayName === 'SelectItem';
|
|
228
228
|
var className = (0, _classnames.default)(isSelectItemElement ? 'select-item' : '', {
|
|
229
229
|
selected: isSelectedOption
|
|
230
230
|
});
|
|
231
231
|
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
232
232
|
onClick: function onClick(event) {
|
|
233
|
-
|
|
234
|
-
if (event.currentTarget.classList.contains('select-item')) {
|
|
233
|
+
if (event.currentTarget.classList.contains('select-item') && child.props.value) {
|
|
235
234
|
if (multiple) {
|
|
236
235
|
var _child$props2;
|
|
237
236
|
changeMultipleOption(event, (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.value);
|
|
238
237
|
} else {
|
|
239
|
-
var _child$props3;
|
|
240
238
|
setIsOpenOptions(false);
|
|
241
|
-
onChange(
|
|
239
|
+
onChange(child.props.value);
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
|
-
|
|
245
|
-
// Call onClick() inside of children
|
|
246
|
-
(_child$props4 = child.props) === null || _child$props4 === void 0 ? void 0 : (_child$props4$onClick = _child$props4.onClick) === null || _child$props4$onClick === void 0 ? void 0 : _child$props4$onClick.call(_child$props4);
|
|
247
242
|
},
|
|
248
243
|
className: className
|
|
249
244
|
});
|