wini-web-components 1.0.1 → 1.0.2
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.
|
@@ -275,7 +275,7 @@ var SelectMultiple = /** @class */ (function (_super) {
|
|
|
275
275
|
else
|
|
276
276
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: false, onSelect: null }));
|
|
277
277
|
} })),
|
|
278
|
-
react_1.default.createElement("button", { type: 'button', className: 'row', style: { padding: '0.4rem' }, onClick: function (ev) {
|
|
278
|
+
this.props.hideClearValueButton && react_1.default.createElement("button", { type: 'button', className: 'row', style: { padding: '0.4rem' }, onClick: function (ev) {
|
|
279
279
|
ev.stopPropagation();
|
|
280
280
|
if (_this.state.value.length)
|
|
281
281
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, value: [] }));
|
|
@@ -230,9 +230,11 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
230
230
|
var _this = this;
|
|
231
231
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
232
232
|
return react_1.default.createElement("div", { ref: this.containerRef, className: "select1-container row ".concat(this.props.disabled ? 'disabled' : '', " ").concat(((_a = this.props.helperText) === null || _a === void 0 ? void 0 : _a.length) && 'helper-text', " ").concat((_b = this.props.className) !== null && _b !== void 0 ? _b : 'body-3'), "helper-text": this.props.helperText, style: this.props.style ? __assign(__assign({}, { '--helper-text-color': (_c = this.props.helperTextColor) !== null && _c !== void 0 ? _c : '#e14337' }), this.props.style) : { '--helper-text-color': (_d = this.props.helperTextColor) !== null && _d !== void 0 ? _d : '#e14337' }, onClick: function () {
|
|
233
|
-
var _a, _b;
|
|
234
|
-
if (!_this.state.isOpen)
|
|
233
|
+
var _a, _b, _c;
|
|
234
|
+
if (!_this.state.isOpen) {
|
|
235
235
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, style: undefined, offset: (_b = (_a = _this.containerRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect() }));
|
|
236
|
+
(_c = _this.inputRef.current) === null || _c === void 0 ? void 0 : _c.focus();
|
|
237
|
+
}
|
|
236
238
|
} },
|
|
237
239
|
react_1.default.createElement("div", { className: 'row', style: { flexWrap: 'wrap', flex: 1, width: '100%', gap: '0.6rem 0.4rem' } },
|
|
238
240
|
react_1.default.createElement("input", { ref: this.inputRef, onChange: this.search, placeholder: this.props.placeholder, onBlur: function (ev) {
|
|
@@ -241,7 +243,7 @@ var Select1 = /** @class */ (function (_super) {
|
|
|
241
243
|
else
|
|
242
244
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: false, onSelect: null }));
|
|
243
245
|
} })),
|
|
244
|
-
react_1.default.createElement("button", { type: 'button', className: 'row', style: { padding: '0.4rem' }, onClick: function (ev) {
|
|
246
|
+
this.props.hideClearValueButton && react_1.default.createElement("button", { type: 'button', className: 'row', style: { padding: '0.4rem' }, onClick: function (ev) {
|
|
245
247
|
ev.stopPropagation();
|
|
246
248
|
if (_this.state.value)
|
|
247
249
|
_this.setState(__assign(__assign({}, _this.state), { isOpen: true, value: undefined }));
|