@uxf/ui 1.0.0-beta.34 → 1.0.0-beta.35

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.
@@ -33,12 +33,11 @@ const react_2 = __importStar(require("react"));
33
33
  const label_1 = require("../label");
34
34
  const forwardRef_1 = require("@uxf/ui/utils/forwardRef");
35
35
  const icon_1 = require("../icon");
36
+ const slugify_1 = require("@uxf/core/utils/slugify");
36
37
  function Combobox(props, ref) {
37
38
  const [query, setQuery] = (0, react_2.useState)("");
38
39
  const selectedOption = props.options.find((option) => option.id === props.value);
39
- const filteredData = query === ""
40
- ? props.options
41
- : props.options.filter((item) => String(item.label).toLowerCase().includes(query.toLowerCase()));
40
+ const filteredData = query === "" ? props.options : props.options.filter((item) => (0, slugify_1.slugify)(item.label).includes((0, slugify_1.slugify)(query)));
42
41
  const innerRef = (0, react_2.useRef)(null);
43
42
  const input = (0, useInputFocus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
44
43
  const dropdown = (0, use_dropdown_1.useDropdown)("bottom", true);
@@ -35,8 +35,8 @@ exports.default = {
35
35
  component: index_1.Combobox,
36
36
  };
37
37
  const options = [
38
- { id: "one", label: "Option one" },
39
- { id: "two", label: "Option two" },
38
+ { id: "one", label: "Option one escr" },
39
+ { id: "two", label: "Option two ěščř" },
40
40
  { id: "three", label: "Option three" },
41
41
  ];
42
42
  function Default() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/ui",
3
- "version": "1.0.0-beta.34",
3
+ "version": "1.0.0-beta.35",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"