tabler-react-2 0.1.137 → 0.1.139

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.
@@ -8,7 +8,7 @@ var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _index = require("../index");
10
10
  var _util = require("../util");
11
- var _excluded = ["prompt", "values", "items", "value", "onChange", "aprops", "showSearch", "loading", "disabled", "disabledText", "label", "showLabel", "color", "outline", "maxHeight", "required"];
11
+ var _excluded = ["prompt", "values", "items", "value", "onChange", "aprops", "showSearch", "loading", "disabled", "disabledText", "label", "showLabel", "color", "outline", "maxHeight", "required", "autofocusSearch"];
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
13
13
  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); }
14
14
  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; }
@@ -44,6 +44,8 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
44
44
  _ref$maxHeight = _ref.maxHeight,
45
45
  maxHeight = _ref$maxHeight === void 0 ? "300px" : _ref$maxHeight,
46
46
  required = _ref.required,
47
+ _ref$autofocusSearch = _ref.autofocusSearch,
48
+ autofocusSearch = _ref$autofocusSearch === void 0 ? false : _ref$autofocusSearch,
47
49
  props = _objectWithoutProperties(_ref, _excluded);
48
50
  var values = ivalues || items || [];
49
51
  var getLabelText = function getLabelText(val) {
@@ -118,7 +120,7 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
118
120
  className: "btn dropdown-toggle ".concat(props.disabled ? "disabled" : "", " ").concat(color ? "btn-".concat(outline ? "outline-" : "").concat(color) : "", " ").concat(props.className || ""),
119
121
  "data-bs-toggle": "dropdown"
120
122
  }, aprops), /*#__PURE__*/_react["default"].createElement(_util.Row, {
121
- gap: 0.25
123
+ gap: 0.5
122
124
  }, selectedValue && props.showIconInPrompt ? selectedValue.icon : null, selectedValue ? selectedValue.label : prompt)), /*#__PURE__*/_react["default"].createElement("div", {
123
125
  className: "dropdown-menu"
124
126
  }, showSearch && /*#__PURE__*/_react["default"].createElement("div", {
@@ -128,6 +130,9 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
128
130
  value: searchQuery,
129
131
  onChange: function onChange(q) {
130
132
  return setSearchQuery(q);
133
+ },
134
+ inputProps: {
135
+ autoFocus: autofocusSearch
131
136
  }
132
137
  })), /*#__PURE__*/_react["default"].createElement("div", {
133
138
  style: {
@@ -98,7 +98,7 @@ var Input = exports.Input = function Input(_ref) {
98
98
  autoComplete: autocomplete
99
99
  }, inputProps)) : /*#__PURE__*/_react["default"].createElement("input", _extends({
100
100
  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)),
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
102
  placeholder: placeholder,
103
103
  value: value !== null && value !== void 0 ? value : "" // Always ensure value is a string
104
104
  ,
@@ -2,6 +2,14 @@
2
2
  title: Changelog
3
3
  ---
4
4
 
5
+ # 0.1.138
6
+
7
+ - Added `autofocusSearch` prop to the `DropdownInput` component.
8
+
9
+ # 0.1.137
10
+
11
+ - Added `showIconInPrompt` prop to the `DropdownInput` component and allowed the `className` prop to be passed to the `DropdownInput` component.
12
+
5
13
  # 0.1.135
6
14
 
7
15
  - Fixed awkward sizing of Hr's without text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabler-react-2",
3
- "version": "0.1.137",
3
+ "version": "0.1.139",
4
4
  "description": "A react implementation of Tabler ui",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {