qlu-20-ui-library 1.12.3 → 1.12.4

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.
@@ -45874,40 +45874,42 @@ const iZ = (t) => {
45874
45874
  iconType: e = "search",
45875
45875
  iconSize: n = "18",
45876
45876
  showIconOnLeft: r = !1,
45877
- onChange: i = () => {
45877
+ defaultValue: i,
45878
+ onChange: a = () => {
45878
45879
  },
45879
- handleOnFocus: a = () => {
45880
+ handleOnFocus: o = () => {
45880
45881
  },
45881
- onEnter: o = () => {
45882
+ onEnter: s = () => {
45882
45883
  },
45883
- dataCy: s
45884
+ dataCy: l
45884
45885
  }) => {
45885
- const [l, u] = ee(!1), h = pe({
45886
+ const [u, h] = ee(!1), f = pe({
45886
45887
  "inputFieldWithSvg--Container": !0,
45887
- "inputFieldWithSvg--Container-Focused": l,
45888
+ "inputFieldWithSvg--Container-Focused": u,
45888
45889
  "inputFieldWithSvg--RowReverse": r
45889
45890
  });
45890
- return /* @__PURE__ */ C("div", { className: h, children: [
45891
+ return /* @__PURE__ */ C("div", { className: f, children: [
45891
45892
  /* @__PURE__ */ c(
45892
45893
  "input",
45893
45894
  {
45894
45895
  placeholder: t,
45896
+ defaultValue: i,
45895
45897
  onFocus: () => {
45896
- u(!0), a();
45898
+ h(!0), o();
45897
45899
  },
45898
- onBlur: () => u(!1),
45899
- onChange: (p) => i(p.target.value),
45900
- onKeyDown: (p) => {
45901
- p.key === "Enter" && o();
45900
+ onBlur: () => h(!1),
45901
+ onChange: (m) => a(m.target.value),
45902
+ onKeyDown: (m) => {
45903
+ m.key === "Enter" && s();
45902
45904
  },
45903
- "data-cy": `${s}-input`
45905
+ "data-cy": `${l}-input`
45904
45906
  }
45905
45907
  ),
45906
45908
  /* @__PURE__ */ c(
45907
45909
  "button",
45908
45910
  {
45909
45911
  className: "inputFieldWithSvg--SvgButton",
45910
- "data-cy": `${s}-submit`,
45912
+ "data-cy": `${l}-submit`,
45911
45913
  children: /* @__PURE__ */ c(fe, { iconType: e, iconSize: n })
45912
45914
  }
45913
45915
  )
@@ -4,10 +4,11 @@ interface InputFieldWithSvgProps {
4
4
  iconType?: IconType;
5
5
  iconSize?: IconSize;
6
6
  showIconOnLeft?: boolean;
7
+ defaultValue?: string;
7
8
  onChange: (value: string) => void;
8
9
  handleOnFocus?: () => void;
9
10
  onEnter?: () => void;
10
11
  dataCy?: string;
11
12
  }
12
- declare const InputFieldWithSvg: ({ placeholder, iconType, iconSize, showIconOnLeft, onChange, handleOnFocus, onEnter, dataCy, }: InputFieldWithSvgProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare const InputFieldWithSvg: ({ placeholder, iconType, iconSize, showIconOnLeft, defaultValue, onChange, handleOnFocus, onEnter, dataCy, }: InputFieldWithSvgProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export default InputFieldWithSvg;
@@ -5,10 +5,11 @@ interface InputFieldWithSvgProps {
5
5
  iconType?: IconType;
6
6
  iconSize?: IconSize;
7
7
  showIconOnLeft?: boolean;
8
+ defaultValue?: string;
8
9
  onChange: (value: string) => void;
9
10
  handleOnFocus?: () => void;
10
11
  onEnter?: () => void;
11
12
  dataCy?: string;
12
13
  }
13
- declare const InputFieldWithSvg: ({ placeholder, iconType, iconSize, showIconOnLeft, onChange, handleOnFocus, onEnter, dataCy, }: InputFieldWithSvgProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const InputFieldWithSvg: ({ placeholder, iconType, iconSize, showIconOnLeft, defaultValue, onChange, handleOnFocus, onEnter, dataCy, }: InputFieldWithSvgProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default InputFieldWithSvg;
@@ -3,7 +3,7 @@ import clsx from "clsx";
3
3
  import "./style.scss";
4
4
  import GetSvgIcon from "../GetSvgIcon";
5
5
  import { useState } from "react";
6
- const InputFieldWithSvg = ({ placeholder = "", iconType = "search", iconSize = "18", showIconOnLeft = false, onChange = () => { }, handleOnFocus = () => { }, onEnter = () => { }, dataCy, }) => {
6
+ const InputFieldWithSvg = ({ placeholder = "", iconType = "search", iconSize = "18", showIconOnLeft = false, defaultValue, onChange = () => { }, handleOnFocus = () => { }, onEnter = () => { }, dataCy, }) => {
7
7
  const [fieldFocused, setFieldFocused] = useState(false);
8
8
  const className = clsx({
9
9
  "inputFieldWithSvg--Container": true,
@@ -15,7 +15,7 @@ const InputFieldWithSvg = ({ placeholder = "", iconType = "search", iconSize = "
15
15
  onEnter();
16
16
  }
17
17
  };
18
- return (_jsxs("div", { className: className, children: [_jsx("input", { placeholder: placeholder, onFocus: () => {
18
+ return (_jsxs("div", { className: className, children: [_jsx("input", { placeholder: placeholder, defaultValue: defaultValue, onFocus: () => {
19
19
  setFieldFocused(true);
20
20
  handleOnFocus();
21
21
  }, onBlur: () => setFieldFocused(false), onChange: (e) => onChange(e.target.value), onKeyDown: handleKeyPress, "data-cy": `${dataCy}-input` }), _jsx("button", { className: "inputFieldWithSvg--SvgButton", "data-cy": `${dataCy}-submit`, children: _jsx(GetSvgIcon, { iconType: iconType, iconSize: iconSize }) })] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qlu-20-ui-library",
3
- "version": "1.12.3",
3
+ "version": "1.12.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",