tabler-react-2 0.1.141 → 0.1.143
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/input/dropdown.js
CHANGED
|
@@ -117,7 +117,7 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
|
|
|
117
117
|
className: "dropdown"
|
|
118
118
|
}, props), /*#__PURE__*/_react["default"].createElement("a", _extends({
|
|
119
119
|
href: "javascript:void(0)",
|
|
120
|
-
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || ""),
|
|
120
|
+
className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || "", " ").concat(props.invalid ? "is-invalid" : ""),
|
|
121
121
|
"data-bs-toggle": "dropdown"
|
|
122
122
|
}, aprops), /*#__PURE__*/_react["default"].createElement(_util.Row, {
|
|
123
123
|
gap: 0.5
|
package/dist/input/input.js
CHANGED
|
@@ -9,7 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _spinner = require("../spinner");
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _excluded = ["type", "label", "placeholder", "value", "onChange", "onRawChange", "onInput", "icon", "iconPos", "loader", "separated", "prependedText", "appendedText", "appendedLinkText", "appendedLinkHref", "appendedLinkOnClick", "datalistItems", "variant", "size", "noMargin", "inputProps", "helpText", "helpTextPlacement", "helpPrompt", "required", "hint", "labelDescription", "autocomplete", "useTextarea"];
|
|
12
|
+
var _excluded = ["type", "label", "placeholder", "value", "onChange", "onRawChange", "onInput", "icon", "iconPos", "loader", "separated", "prependedText", "appendedText", "appendedLinkText", "appendedLinkHref", "appendedLinkOnClick", "datalistItems", "variant", "size", "noMargin", "inputProps", "helpText", "helpTextPlacement", "helpPrompt", "required", "hint", "labelDescription", "autocomplete", "useTextarea", "invalid"];
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -58,6 +58,7 @@ var Input = exports.Input = function Input(_ref) {
|
|
|
58
58
|
autocomplete = _ref.autocomplete,
|
|
59
59
|
_ref$useTextarea = _ref.useTextarea,
|
|
60
60
|
useTextarea = _ref$useTextarea === void 0 ? false : _ref$useTextarea,
|
|
61
|
+
invalid = _ref.invalid,
|
|
61
62
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
62
63
|
// State for managing uncontrolled input value
|
|
63
64
|
var _useState = (0, _react.useState)(controlledValue),
|
|
@@ -89,7 +90,7 @@ var Input = exports.Input = function Input(_ref) {
|
|
|
89
90
|
};
|
|
90
91
|
var renderInput = function renderInput() {
|
|
91
92
|
return useTextarea ? /*#__PURE__*/_react["default"].createElement("textarea", _extends({
|
|
92
|
-
className: (0, _classnames["default"])("form-control", variant && "border-".concat(variant), variant && "text-".concat(variant), variant && "bg-".concat(variant, "-lt"), size && "form-control-".concat(size)),
|
|
93
|
+
className: (0, _classnames["default"])("form-control", variant && "border-".concat(variant), variant && "text-".concat(variant), variant && "bg-".concat(variant, "-lt"), size && "form-control-".concat(size), invalid && "is-invalid"),
|
|
93
94
|
placeholder: placeholder,
|
|
94
95
|
value: value !== null && value !== void 0 ? value : "" // Always ensure value is a string
|
|
95
96
|
,
|
|
@@ -98,7 +99,7 @@ var Input = exports.Input = function Input(_ref) {
|
|
|
98
99
|
autoComplete: autocomplete
|
|
99
100
|
}, inputProps)) : /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
100
101
|
type: type,
|
|
101
|
-
className: (0, _classnames["default"])("form-control", variant && "border-".concat(variant), variant && "text-".concat(variant), variant && "bg-".concat(variant, "-lt"), size && "form-control-".concat(size), props.inputClassName),
|
|
102
|
+
className: (0, _classnames["default"])("form-control", variant && "border-".concat(variant), variant && "text-".concat(variant), variant && "bg-".concat(variant, "-lt"), size && "form-control-".concat(size), invalid && "is-invalid", props.inputClassName),
|
|
102
103
|
placeholder: placeholder,
|
|
103
104
|
value: value !== null && value !== void 0 ? value : "" // Always ensure value is a string
|
|
104
105
|
,
|