myprojectpackageprav
Version:
My package in npm
16 lines • 3.66 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var input_label_1 = tslib_1.__importDefault(require("./input-label"));
var InputSearch = function (inputProps) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
return (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement("div", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.formClassName },
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.label) && react_1.default.createElement(input_label_1.default, { labelProps: { htmlFor: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _a === void 0 ? void 0 : _a.id }, label: inputProps === null || inputProps === void 0 ? void 0 : inputProps.label, className: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _b === void 0 ? void 0 : _b.className, infoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.info, isinfoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isInfo, isinfoIcon: inputProps === null || inputProps === void 0 ? void 0 : inputProps.infoIcon, mandatory: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isMandatory }),
react_1.default.createElement("div", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.searchgroup },
react_1.default.createElement("input", { name: (_c = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _c === void 0 ? void 0 : _c.name, id: (_d = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _d === void 0 ? void 0 : _d.id, value: (_e = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _e === void 0 ? void 0 : _e.value, maxLength: (_f = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _f === void 0 ? void 0 : _f.maxLength, onChange: inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange, disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, readOnly: inputProps === null || inputProps === void 0 ? void 0 : inputProps.readonly, className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className, style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style, "aria-label": inputProps['aria-label'] || ((_g = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _g === void 0 ? void 0 : _g.arialabel) || (inputProps === null || inputProps === void 0 ? void 0 : inputProps.label), "aria-required": inputProps === null || inputProps === void 0 ? void 0 : inputProps.isMandatory, size: ((_h = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _h === void 0 ? void 0 : _h.size) || 'sm', type: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.type) || 'search', placeholder: (_j = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _j === void 0 ? void 0 : _j.placeholder }),
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.icon) && react_1.default.createElement("span", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.icon })))));
};
exports.default = InputSearch;
//# sourceMappingURL=input-search.js.map