tabler-react-2 0.1.114 → 0.1.116

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.
@@ -106,13 +106,16 @@ var DropdownInput = exports.DropdownInput = function DropdownInput(_ref) {
106
106
  setSelectedValue(matchedValue);
107
107
  }, [value, values]);
108
108
  var normalize = function normalize(str) {
109
- return str.toLowerCase().replace(/[\s_\-+]+/g, "");
109
+ var _str$toLowerCase;
110
+ return str === null || str === void 0 || (_str$toLowerCase = str.toLowerCase()) === null || _str$toLowerCase === void 0 ? void 0 : _str$toLowerCase.replace(/[\s_\-+]+/g, "");
110
111
  };
111
112
 
112
113
  // Filter values based on the search query using getLabelText
113
114
  (0, _react.useEffect)(function () {
115
+ console.log(values);
114
116
  setFilteredValues(values.filter(function (val) {
115
- return getLabelText(val).toLowerCase().includes(searchQuery.toLowerCase()) || normalize(val.searchIndex.toLowerCase()).includes(normalize(searchQuery).toLowerCase());
117
+ var _normalize, _val$searchIndex;
118
+ return getLabelText(val).toLowerCase().includes(searchQuery.toLowerCase()) || ((_normalize = normalize((_val$searchIndex = val.searchIndex) === null || _val$searchIndex === void 0 ? void 0 : _val$searchIndex.toLowerCase())) === null || _normalize === void 0 ? void 0 : _normalize.includes(normalize(searchQuery).toLowerCase()));
116
119
  }));
117
120
  }, [searchQuery, values]);
118
121
  var handleSelection = function handleSelection(val) {
@@ -29,7 +29,9 @@ var Offcanvas = exports.Offcanvas = /*#__PURE__*/_react["default"].memo(function
29
29
  position = _ref.position,
30
30
  children = _ref.children,
31
31
  _ref$size = _ref.size,
32
- size = _ref$size === void 0 ? 300 : _ref$size;
32
+ size = _ref$size === void 0 ? 300 : _ref$size,
33
+ _ref$zIndex = _ref.zIndex,
34
+ zIndex = _ref$zIndex === void 0 ? 1000 : _ref$zIndex;
33
35
  // backdrop style
34
36
  var backdropStyle = (0, _react.useMemo)(function () {
35
37
  return {
@@ -39,7 +41,7 @@ var Offcanvas = exports.Offcanvas = /*#__PURE__*/_react["default"].memo(function
39
41
  width: "100vw",
40
42
  height: "100vh",
41
43
  backgroundColor: "rgba(0,0,0,0.1)",
42
- zIndex: 9999
44
+ zIndex: zIndex - 1
43
45
  };
44
46
  }, []);
45
47
 
@@ -50,7 +52,7 @@ var Offcanvas = exports.Offcanvas = /*#__PURE__*/_react["default"].memo(function
50
52
  backgroundColor: "#fff",
51
53
  boxShadow: show ? "0 0.5rem 1rem rgba(0,0,0,0.15)" : "none",
52
54
  transition: "transform 0.3s ease-out",
53
- zIndex: 10000,
55
+ zIndex: zIndex,
54
56
  padding: 20,
55
57
  overflow: "auto"
56
58
  };
@@ -2,6 +2,14 @@
2
2
  title: Changelog
3
3
  ---
4
4
 
5
+ ## 0.1.115
6
+
7
+ - Allow z-index of offcanvas to be set via the `zIndex` prop.
8
+
9
+ ## 0.1.114
10
+
11
+ - Bump z-index of offcanvas
12
+
5
13
  ## 0.1.113
6
14
 
7
15
  - Fix issue with where table causes crash when the column that the table is being sorted on is suddenly removed from the columns array.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabler-react-2",
3
- "version": "0.1.114",
3
+ "version": "0.1.116",
4
4
  "description": "A react implementation of Tabler ui",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {