urfu-ui-kit-react 1.4.6 → 1.4.8

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.
@@ -10008,8 +10008,8 @@ const Jr = [
10008
10008
  const d = (u) => {
10009
10009
  s.current && !s.current.contains(u.target) && i();
10010
10010
  };
10011
- return document.addEventListener("mousedown", d), () => {
10012
- document.removeEventListener("mousedown", d);
10011
+ return document.addEventListener("click", d), () => {
10012
+ document.removeEventListener("click", d);
10013
10013
  };
10014
10014
  }, [i]);
10015
10015
  const l = n.find((d) => d.value === a);
@@ -10083,7 +10083,6 @@ const Jr = [
10083
10083
  onClick: (u) => {
10084
10084
  u.stopPropagation(), i(), t(d.value);
10085
10085
  },
10086
- onMouseDown: (u) => u.preventDefault(),
10087
10086
  children: d.label
10088
10087
  },
10089
10088
  d.value
@@ -12672,10 +12671,33 @@ const Pf = ({
12672
12671
  value: a,
12673
12672
  onChange: t,
12674
12673
  className: e = ""
12675
- }) => /* @__PURE__ */ f.jsxs("div", { className: `u-search ${e}`, children: [
12676
- /* @__PURE__ */ f.jsx("input", { placeholder: n, className: "u-input", type: "search", value: a, onChange: t }),
12677
- /* @__PURE__ */ f.jsx("button", { className: "u-search-loupe", type: "button" })
12678
- ] });
12674
+ }) => {
12675
+ const r = (o) => {
12676
+ o.preventDefault(), t && t({
12677
+ target: { value: "" }
12678
+ });
12679
+ };
12680
+ return /* @__PURE__ */ f.jsxs("div", { className: `u-search ${e}`, children: [
12681
+ /* @__PURE__ */ f.jsx(
12682
+ "input",
12683
+ {
12684
+ placeholder: n,
12685
+ className: "u-input",
12686
+ type: "search",
12687
+ value: a,
12688
+ onChange: t
12689
+ }
12690
+ ),
12691
+ a && /* @__PURE__ */ f.jsx(
12692
+ "i",
12693
+ {
12694
+ className: "u-icon icon-cross-small u-search-clear",
12695
+ onClick: r
12696
+ }
12697
+ ),
12698
+ /* @__PURE__ */ f.jsx("button", { className: "u-search-loupe", type: "button" })
12699
+ ] });
12700
+ };
12679
12701
  Pf.propTypes = {
12680
12702
  placeholder: D.string,
12681
12703
  value: D.string,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UrFU UI-Kit for React Web",
4
4
  "license": "Apache-2.0",
5
5
  "private": false,
6
- "version": "1.4.6",
6
+ "version": "1.4.8",
7
7
  "type": "module",
8
8
  "main": "dist/urfu-ui-kit-react",
9
9
  "types": "dist/urfu-ui-kit-react",
@@ -20,7 +20,7 @@
20
20
  "date-fns": "^3.6.0",
21
21
  "react-datepicker": "^7.4.0",
22
22
  "react-input-mask": "^2.0.4",
23
- "urfu-ui-kit-vanilla": "^2.1.1"
23
+ "urfu-ui-kit-vanilla": "^2.2.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@chromatic-com/storybook": "^1.3.3",