@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.
- package/Command/Command.mjs +27 -27
- package/Search/Search.mjs +21 -18
- package/package.json +1 -1
package/Command/Command.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { Command as
|
|
4
|
-
import {
|
|
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__ */
|
|
8
|
-
|
|
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 =
|
|
19
|
-
const C = ({ children: e, ...a }) => /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
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 =
|
|
34
|
-
const u = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */
|
|
35
|
-
|
|
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 =
|
|
43
|
-
const f = m.forwardRef((e, a) => /* @__PURE__ */
|
|
44
|
-
|
|
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 =
|
|
52
|
-
const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */
|
|
53
|
-
|
|
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 =
|
|
64
|
-
const x = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */
|
|
65
|
-
|
|
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 =
|
|
73
|
-
const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */
|
|
74
|
-
|
|
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 =
|
|
91
|
+
h.displayName = o.Item.displayName;
|
|
92
92
|
const y = ({
|
|
93
93
|
className: e,
|
|
94
94
|
...a
|
|
95
|
-
}) => /* @__PURE__ */
|
|
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
|
|
2
|
-
import { useState as
|
|
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
|
|
5
|
-
import { cn as
|
|
6
|
-
import { SearchIcon as
|
|
7
|
-
import { LoadedIcon as
|
|
8
|
-
const
|
|
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:
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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__ */
|
|
23
|
+
return /* @__PURE__ */ t(
|
|
23
24
|
v,
|
|
24
25
|
{
|
|
26
|
+
name: p,
|
|
25
27
|
placeholder: s,
|
|
26
|
-
value:
|
|
28
|
+
value: h,
|
|
29
|
+
className: x("min-w-[340px]", m),
|
|
27
30
|
onChange: d,
|
|
28
|
-
...
|
|
31
|
+
...l,
|
|
29
32
|
...e || {},
|
|
30
33
|
slotProps: {
|
|
31
34
|
...e || {},
|
|
32
35
|
input: {
|
|
33
|
-
startAdornment: /* @__PURE__ */
|
|
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
|
-
|
|
44
|
+
L as Search
|
|
42
45
|
};
|