@oneplatformdev/ui 0.0.1-beta.110 → 0.0.1-beta.112

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.
@@ -1,11 +1,11 @@
1
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { Command as t } from "cmdk";
4
- import { Search as p } from "lucide-react";
3
+ import { Command as o } from "cmdk";
4
+ import { SearchIcon as p } from "lucide-react";
5
5
  import { cn as r } from "@oneplatformdev/utils";
6
6
  import { Dialog as i, DialogContent as l } from "../Dialog/Dialog.mjs";
7
- const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
8
- t,
7
+ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
8
+ o,
9
9
  {
10
10
  ref: d,
11
11
  className: r(
@@ -15,11 +15,11 @@ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
15
15
  ...a
16
16
  }
17
17
  ));
18
- n.displayName = t.displayName;
19
- const C = ({ children: e, ...a }) => /* @__PURE__ */ o(i, { ...a, children: /* @__PURE__ */ o(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), c = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
20
- /* @__PURE__ */ o(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
21
- /* @__PURE__ */ o(
22
- t.Input,
18
+ n.displayName = o.displayName;
19
+ const C = ({ children: e, ...a }) => /* @__PURE__ */ t(i, { ...a, children: /* @__PURE__ */ t(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ t(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), c = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
20
+ /* @__PURE__ */ t(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
21
+ /* @__PURE__ */ t(
22
+ o.Input,
23
23
  {
24
24
  ref: d,
25
25
  className: r(
@@ -30,27 +30,27 @@ const C = ({ children: e, ...a }) => /* @__PURE__ */ o(i, { ...a, children: /* @
30
30
  }
31
31
  )
32
32
  ] }));
33
- c.displayName = t.Input.displayName;
34
- const u = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
35
- t.List,
33
+ c.displayName = o.Input.displayName;
34
+ const u = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
35
+ o.List,
36
36
  {
37
37
  ref: d,
38
38
  className: r("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
39
39
  ...a
40
40
  }
41
41
  ));
42
- u.displayName = t.List.displayName;
43
- const f = m.forwardRef((e, a) => /* @__PURE__ */ o(
44
- t.Empty,
42
+ u.displayName = o.List.displayName;
43
+ const f = m.forwardRef((e, a) => /* @__PURE__ */ t(
44
+ o.Empty,
45
45
  {
46
46
  ref: a,
47
47
  className: "py-6 text-center text-sm",
48
48
  ...e
49
49
  }
50
50
  ));
51
- f.displayName = t.Empty.displayName;
52
- const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
53
- t.Group,
51
+ f.displayName = o.Empty.displayName;
52
+ const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
53
+ o.Group,
54
54
  {
55
55
  ref: d,
56
56
  className: r(
@@ -60,18 +60,18 @@ const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
60
60
  ...a
61
61
  }
62
62
  ));
63
- g.displayName = t.Group.displayName;
64
- const x = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
65
- t.Separator,
63
+ g.displayName = o.Group.displayName;
64
+ const x = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
65
+ o.Separator,
66
66
  {
67
67
  ref: d,
68
68
  className: r("-mx-1 h-px bg-border", e),
69
69
  ...a
70
70
  }
71
71
  ));
72
- x.displayName = t.Separator.displayName;
73
- const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
74
- t.Item,
72
+ x.displayName = o.Separator.displayName;
73
+ const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
74
+ o.Item,
75
75
  {
76
76
  ref: d,
77
77
  className: r(
@@ -88,11 +88,11 @@ const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
88
88
  ...a
89
89
  }
90
90
  ));
91
- h.displayName = t.Item.displayName;
91
+ h.displayName = o.Item.displayName;
92
92
  const y = ({
93
93
  className: e,
94
94
  ...a
95
- }) => /* @__PURE__ */ o(
95
+ }) => /* @__PURE__ */ t(
96
96
  "span",
97
97
  {
98
98
  className: r(
package/Search/Search.mjs CHANGED
@@ -1,42 +1,45 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { useState as S } from "react";
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useState as g } from "react";
3
3
  import { Input as v } from "../Input/Input.mjs";
4
- import { useDebounceCallback as g } from "@oneplatformdev/hooks";
5
- import { cn as b } from "@oneplatformdev/utils";
6
- import { SearchIcon as x } from "lucide-react";
7
- import { LoadedIcon as I } from "../LoadedIcon/LoadedIcon.mjs";
8
- const A = (a) => {
4
+ import { useDebounceCallback as b } from "@oneplatformdev/hooks";
5
+ import { cn as x } from "@oneplatformdev/utils";
6
+ import { SearchIcon as I } from "lucide-react";
7
+ import { LoadedIcon as C } from "../LoadedIcon/LoadedIcon.mjs";
8
+ const L = (a) => {
9
9
  const {
10
10
  search: c,
11
- onChange: o,
11
+ onChange: r,
12
12
  onSearch: n,
13
13
  placeholder: s = "Search",
14
14
  className: m,
15
15
  loading: i = !1,
16
16
  slotProps: e,
17
- ...p
18
- } = a, [l, h] = S(c), u = g(n, 1e3), d = (t) => {
19
- const f = t.target.value;
20
- h(f), o == null || o(t), u(t.target.value);
17
+ name: p = "search",
18
+ ...l
19
+ } = a, [h, u] = g(c), f = b(n, 1e3), d = (o) => {
20
+ const S = o.target.value;
21
+ u(S), r == null || r(o), f(o.target.value);
21
22
  };
22
- return /* @__PURE__ */ r("div", { className: b("space-y-4 min-w-[340px]", m), children: /* @__PURE__ */ r(
23
+ return /* @__PURE__ */ t(
23
24
  v,
24
25
  {
26
+ name: p,
25
27
  placeholder: s,
26
- value: l,
28
+ value: h,
29
+ className: x("min-w-[340px]", m),
27
30
  onChange: d,
28
- ...p,
31
+ ...l,
29
32
  ...e || {},
30
33
  slotProps: {
31
34
  ...e || {},
32
35
  input: {
33
- startAdornment: /* @__PURE__ */ r(I, { loading: i, size: "sm", children: /* @__PURE__ */ r(x, {}) }),
36
+ startAdornment: /* @__PURE__ */ t(C, { loading: i, size: "sm", children: /* @__PURE__ */ t(I, {}) }),
34
37
  ...(e == null ? void 0 : e.input) || {}
35
38
  }
36
39
  }
37
40
  }
38
- ) });
41
+ );
39
42
  };
40
43
  export {
41
- A as Search
44
+ L as Search
42
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneplatformdev/ui",
3
- "version": "0.0.1-beta.110",
3
+ "version": "0.0.1-beta.112",
4
4
  "description": "UI React Components.",
5
5
  "author": "One Platform Development Team",
6
6
  "keywords": [