sea-react-components 1.3.0 → 1.3.1

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sea-react-components",
3
3
  "description": "SEA react components library",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "tsc --build && npx postcss src/styles.css -o dist/styles.css && npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css",
@@ -45,7 +45,7 @@
45
45
  "jwt-decode": "^4.0.0",
46
46
  "lowlight": "^3.3.0",
47
47
  "react-dom": "^18.3.1",
48
- "sea-platform-helpers": "^1.4.0",
48
+ "sea-platform-helpers": "^1.5.0",
49
49
  "sea-react-components": "file:",
50
50
  "yup": "^1.5.0"
51
51
  },
@@ -1,7 +0,0 @@
1
- import { Props as InputProps } from "../../../input";
2
- export type Props = {
3
- onDebouncedChange: (newValue: string) => void;
4
- QueryDebouncedTime?: number;
5
- } & InputProps;
6
- export default function SearchInput({ value, onDebouncedChange, QueryDebouncedTime, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/list-item/components/search-input/index.tsx"],"names":[],"mappings":"AAGA,OAAc,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,MAAM,KAAK,GAAG;IAClB,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,UAAU,CAAC;AACf,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,KAAK,EACL,iBAAiB,EACjB,kBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,2CAiCP"}
@@ -1,38 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { Icon } from "@iconify/react";
15
- import { useEffect, useState } from "react";
16
- import Input from "../../../input";
17
- export default function SearchInput(_a) {
18
- var { value, onDebouncedChange, QueryDebouncedTime = 500 } = _a, props = __rest(_a, ["value", "onDebouncedChange", "QueryDebouncedTime"]);
19
- const [currentValue, setCurrentValue] = useState(value);
20
- const [debouncedQuery, setDebouncedQuery] = useState("");
21
- useEffect(() => {
22
- setCurrentValue((value || "").toString());
23
- }, [value]);
24
- useEffect(() => {
25
- const handler = setTimeout(() => {
26
- setDebouncedQuery(currentValue);
27
- }, QueryDebouncedTime);
28
- // Cleanup the timeout on every keystroke
29
- return () => clearTimeout(handler);
30
- }, [currentValue, QueryDebouncedTime]);
31
- // Trigger the callback when debouncedQuery changes
32
- useEffect(() => {
33
- if (onDebouncedChange) {
34
- onDebouncedChange(debouncedQuery);
35
- }
36
- }, [debouncedQuery, onDebouncedChange]);
37
- return (_jsx(Input, Object.assign({ value: currentValue, onChange: (e) => setCurrentValue(e.target.value), end: _jsx(Icon, { icon: "material-symbols:search", className: "w-5 h-5 text-primary" }) }, props)));
38
- }