@oneplatformdev/ui 0.0.1-beta.18 → 0.0.1-beta.3
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/AlertDialog/AlertDialog.d.ts +0 -14
- package/AlertDialog/AlertDialog.mjs +60 -58
- package/Combobox/Combobox.mjs +60 -71
- package/Combobox/Combobox.types.d.ts +0 -7
- package/FormInput/FormInput.mjs +7 -6
- package/FormSelect/FormSelect.types.d.ts +1 -1
- package/Input/index.mjs +8 -5
- package/Search/Search.mjs +11 -10
- package/Sidebar/Sidebar.mjs +14 -13
- package/index.css +1 -1
- package/index.d.ts +0 -2
- package/index.mjs +353 -357
- package/package.json +6 -7
- package/Dropzone/Dropzone.d.ts +0 -22
- package/Dropzone/Dropzone.mjs +0 -136
- package/Dropzone/Dropzone.types.d.ts +0 -36
- package/Dropzone/DropzoneFilePreview.d.ts +0 -4
- package/Dropzone/DropzoneFilePreview.mjs +0 -9
- package/Dropzone/DropzoneUtils.d.ts +0 -4
- package/Dropzone/DropzoneUtils.mjs +0 -15
- package/Dropzone/index.d.ts +0 -2
- package/Dropzone/index.mjs +0 -7
- package/Dropzone/package.json +0 -7
- package/DropzoneFilePreview-Dhtv8F4u.js +0 -67
- package/FormDropzone/FormDropzone.d.ts +0 -4
- package/FormDropzone/FormDropzone.mjs +0 -26
- package/FormDropzone/FormDropzone.types.d.ts +0 -7
- package/FormDropzone/index.d.ts +0 -2
- package/FormDropzone/index.mjs +0 -4
- package/FormDropzone/package.json +0 -7
@@ -6,10 +6,6 @@ import { FC, PropsWithChildren } from 'react';
|
|
6
6
|
* @public
|
7
7
|
* @see [Documentation](#)
|
8
8
|
* @example
|
9
|
-
* > Import:
|
10
|
-
* ```tsx
|
11
|
-
* import { AlertDialog } from '@oneplatformdev/ui/AlertDialog';
|
12
|
-
* ```
|
13
9
|
* > Simple example:
|
14
10
|
* ```tsx
|
15
11
|
* <AlertDialog
|
@@ -29,16 +25,6 @@ import { FC, PropsWithChildren } from 'react';
|
|
29
25
|
* onConfirm={(event) => console.log(event, 'Confirm')}
|
30
26
|
* />
|
31
27
|
* ```
|
32
|
-
* > Trigger example: Button with icon children
|
33
|
-
* ```tsx
|
34
|
-
* <AlertDialog
|
35
|
-
* trigger={<Button variant="outline" size="icon"><PencilLine /></Button>}
|
36
|
-
* title="Dialog title with icon trigger"
|
37
|
-
* description="Description text..."
|
38
|
-
* onCancel={(event) => console.log(event, 'Cancel')}
|
39
|
-
* onConfirm={(event) => console.log(event, 'Confirm')}
|
40
|
-
* />
|
41
|
-
* ```
|
42
28
|
*
|
43
29
|
* > Full content example:
|
44
30
|
* ```tsx
|
@@ -1,97 +1,99 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { cloneElement as a, useId as
|
3
|
-
import { AlertDialogRoot as
|
4
|
-
import {
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { cloneElement as a, useId as y, Children as E } from "react";
|
3
|
+
import { AlertDialogRoot as F, AlertDialogContent as h, AlertDialogTrigger as f, AlertDialogHeader as m, AlertDialogTitle as B, AlertDialogDescription as R, AlertDialogFooter as A, AlertDialogAction as C, AlertDialogCancel as k } from "./AlertDialogRoot.mjs";
|
4
|
+
import { Button as x } from "../Button/Button.mjs";
|
5
|
+
import "../Button/buttonVariants.mjs";
|
6
|
+
import { isValidReactElement as l } from "@oneplatformdev/utils";
|
7
|
+
const H = (n) => {
|
8
|
+
const { slotProps: e = {}, children: r } = n, o = e.trigger ?? {};
|
9
|
+
return l(r, f) ? a(
|
8
10
|
r,
|
9
11
|
{
|
10
12
|
...r.props || {},
|
11
|
-
...
|
13
|
+
...o
|
12
14
|
}
|
13
|
-
) : /* @__PURE__ */ t(
|
14
|
-
},
|
15
|
+
) : l(r, x) ? /* @__PURE__ */ t(f, { asChild: !0, ...o, children: r }) : /* @__PURE__ */ t(f, { asChild: !0, children: /* @__PURE__ */ t(x, { variant: "outline", ...o, children: r }) });
|
16
|
+
}, I = (n) => {
|
15
17
|
const {
|
16
18
|
title: e = "",
|
17
19
|
description: r = "",
|
18
|
-
slotProps:
|
19
|
-
children:
|
20
|
-
} =
|
21
|
-
return
|
22
|
-
|
23
|
-
{ ...
|
24
|
-
) : /* @__PURE__ */ t(
|
25
|
-
e &&
|
20
|
+
slotProps: o = {},
|
21
|
+
children: c
|
22
|
+
} = n, i = o.header ?? {}, d = o.title ?? {}, s = o.description ?? {};
|
23
|
+
return c ? l(c, m) ? a(
|
24
|
+
c,
|
25
|
+
{ ...c.props || {}, ...i }
|
26
|
+
) : /* @__PURE__ */ t(m, { ...i, children: c }) : /* @__PURE__ */ u(m, { children: [
|
27
|
+
e && l(e, B) ? a(
|
26
28
|
e,
|
27
29
|
{ ...e.props || {}, ...d }
|
28
30
|
) : /* @__PURE__ */ t(B, { ...d, children: e }),
|
29
|
-
r &&
|
31
|
+
r && l(r, R) ? a(
|
30
32
|
r,
|
31
|
-
{ ...r.props || {}, ...
|
32
|
-
) : /* @__PURE__ */ t(R, { ...
|
33
|
+
{ ...r.props || {}, ...s }
|
34
|
+
) : /* @__PURE__ */ t(R, { ...s, children: r })
|
33
35
|
] });
|
34
|
-
},
|
36
|
+
}, L = (n) => {
|
35
37
|
const {
|
36
38
|
slotProps: e = {},
|
37
39
|
children: r,
|
38
|
-
onCancel:
|
39
|
-
onConfirm:
|
40
|
-
cancelLabel:
|
40
|
+
onCancel: o,
|
41
|
+
onConfirm: c,
|
42
|
+
cancelLabel: i = "Cancel",
|
41
43
|
actionLabel: d = "Continue",
|
42
|
-
variant:
|
43
|
-
} =
|
44
|
-
return r ?
|
44
|
+
variant: s = "confirm"
|
45
|
+
} = n, T = y(), D = e.footer ?? {}, b = e.cancelButton ?? {}, P = e.actionButton ?? {};
|
46
|
+
return r ? l(r, A) ? a(
|
45
47
|
r,
|
46
|
-
{ ...r.props || {}, ...
|
47
|
-
) : /* @__PURE__ */ t(A, { ...
|
48
|
-
if (!p || !
|
49
|
-
const
|
50
|
-
return
|
51
|
-
}) }) : /* @__PURE__ */
|
52
|
-
|
48
|
+
{ ...r.props || {}, ...D }
|
49
|
+
) : /* @__PURE__ */ t(A, { ...D, children: E.map(r, (p, j) => {
|
50
|
+
if (!p || !l(p)) return;
|
51
|
+
const g = p, v = a(g, { ...g.props || {}, key: g.key || `footer-${T}-action-${j}` });
|
52
|
+
return l(p, C) || l(p, k) ? v : /* @__PURE__ */ t(C, { asChild: !0, children: v });
|
53
|
+
}) }) : /* @__PURE__ */ u(A, { children: [
|
54
|
+
s !== "alert" && /* @__PURE__ */ t(
|
53
55
|
k,
|
54
56
|
{
|
55
57
|
variant: "ghost",
|
56
|
-
onClick:
|
57
|
-
...
|
58
|
-
children:
|
58
|
+
onClick: o,
|
59
|
+
...b,
|
60
|
+
children: i
|
59
61
|
}
|
60
62
|
),
|
61
63
|
/* @__PURE__ */ t(
|
62
|
-
|
64
|
+
C,
|
63
65
|
{
|
64
|
-
onClick:
|
65
|
-
...
|
66
|
-
variant:
|
66
|
+
onClick: c,
|
67
|
+
...P,
|
68
|
+
variant: P.variant || s === "destructive" ? "destructive" : "default",
|
67
69
|
children: d
|
68
70
|
}
|
69
71
|
)
|
70
72
|
] });
|
71
|
-
},
|
73
|
+
}, J = (n) => {
|
72
74
|
const {
|
73
75
|
trigger: e,
|
74
76
|
header: r,
|
75
|
-
footer:
|
76
|
-
slotProps:
|
77
|
-
children:
|
77
|
+
footer: o,
|
78
|
+
slotProps: c = {},
|
79
|
+
children: i,
|
78
80
|
...d
|
79
|
-
} =
|
80
|
-
return /* @__PURE__ */
|
81
|
-
/* @__PURE__ */ t(
|
82
|
-
|
83
|
-
|
81
|
+
} = n, s = c.content ?? {};
|
82
|
+
return /* @__PURE__ */ u(F, { ...d, children: [
|
83
|
+
/* @__PURE__ */ t(H, { ...n, children: e }),
|
84
|
+
i ? l(i, h) ? a(
|
85
|
+
i,
|
84
86
|
{
|
85
|
-
...
|
86
|
-
...
|
87
|
+
...i.props || {},
|
88
|
+
...s
|
87
89
|
}
|
88
|
-
) : /* @__PURE__ */ t(
|
89
|
-
/* @__PURE__ */ t(
|
90
|
-
/* @__PURE__ */ t(
|
90
|
+
) : /* @__PURE__ */ t(h, { ...s, children: i }) : /* @__PURE__ */ u(h, { ...s, children: [
|
91
|
+
/* @__PURE__ */ t(I, { ...n, children: r }),
|
92
|
+
/* @__PURE__ */ t(L, { ...n, children: o })
|
91
93
|
] })
|
92
94
|
] });
|
93
95
|
};
|
94
96
|
export {
|
95
|
-
|
96
|
-
|
97
|
+
J as AlertDialog,
|
98
|
+
J as default
|
97
99
|
};
|
package/Combobox/Combobox.mjs
CHANGED
@@ -1,120 +1,109 @@
|
|
1
1
|
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
2
|
-
import n, {
|
3
|
-
import { LoadingMask as
|
4
|
-
import { Popover as
|
5
|
-
import { Button as
|
2
|
+
import n, { useEffect as E } from "react";
|
3
|
+
import { LoadingMask as I } from "../LoadingMask/LoadingMask.mjs";
|
4
|
+
import { Popover as U, PopoverTrigger as _, PopoverContent as B } from "../Popover/Popover.mjs";
|
5
|
+
import { Button as F } from "../Button/Button.mjs";
|
6
6
|
import "../Button/buttonVariants.mjs";
|
7
|
-
import { Command as
|
8
|
-
import { cn as
|
9
|
-
import { useDebounceCallback as
|
10
|
-
import { X as
|
11
|
-
const
|
12
|
-
var
|
7
|
+
import { Command as G, CommandInput as M, CommandList as R, CommandEmpty as V, CommandGroup as W, CommandItem as X } from "../Command/Command.mjs";
|
8
|
+
import { cn as g } from "@oneplatformdev/utils";
|
9
|
+
import { useDebounceCallback as q } from "@oneplatformdev/hooks";
|
10
|
+
import { X as z, ChevronsUpDown as A, Check as H } from "lucide-react";
|
11
|
+
const te = (w) => {
|
12
|
+
var C;
|
13
13
|
const {
|
14
14
|
value: o,
|
15
|
-
onChange:
|
16
|
-
placeholder:
|
17
|
-
disabled:
|
18
|
-
searchLabel:
|
19
|
-
fetchOptions:
|
15
|
+
onChange: y,
|
16
|
+
placeholder: x,
|
17
|
+
disabled: N,
|
18
|
+
searchLabel: S,
|
19
|
+
fetchOptions: L,
|
20
20
|
options: r,
|
21
|
-
emptyLabel:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
r != null && r.length && i(r);
|
21
|
+
emptyLabel: O = "No options"
|
22
|
+
} = w, [l, d] = n.useState(!1), [P, m] = n.useState(""), [p, h] = n.useState([]), [s, u] = n.useState(), [f, b] = n.useState(!1);
|
23
|
+
E(() => {
|
24
|
+
r != null && r.length && h(r);
|
26
25
|
}, [r]);
|
27
|
-
const
|
28
|
-
l || (
|
29
|
-
},
|
30
|
-
|
26
|
+
const j = async () => {
|
27
|
+
l || (v(), m(""));
|
28
|
+
}, v = async (e) => {
|
29
|
+
b(!0);
|
31
30
|
try {
|
32
|
-
const
|
33
|
-
i
|
34
|
-
} catch (
|
35
|
-
console.error("Unexpected error while get option:",
|
31
|
+
const i = await L(e);
|
32
|
+
h(i);
|
33
|
+
} catch (i) {
|
34
|
+
console.error("Unexpected error while get option:", i);
|
36
35
|
} finally {
|
37
|
-
|
36
|
+
b(!1);
|
38
37
|
}
|
39
|
-
},
|
40
|
-
|
41
|
-
},
|
42
|
-
|
43
|
-
},
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
s({ setOptions: i }).finally(() => {
|
51
|
-
c.current = !0;
|
52
|
-
});
|
53
|
-
}, [s]);
|
54
|
-
return w(() => (R(), () => {
|
55
|
-
c.current = !1;
|
56
|
-
}), []), /* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */ t(
|
57
|
-
F,
|
38
|
+
}, k = q(v, 1e3), D = (e) => {
|
39
|
+
m(e), k(e);
|
40
|
+
}, c = (e) => {
|
41
|
+
y(e.value), u(e);
|
42
|
+
}, T = () => {
|
43
|
+
c({ value: "", label: "" }), u(void 0);
|
44
|
+
};
|
45
|
+
return /* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */ t(
|
46
|
+
U,
|
58
47
|
{
|
59
48
|
open: l,
|
60
49
|
onOpenChange: (e) => {
|
61
|
-
|
50
|
+
d(e), e && j();
|
62
51
|
},
|
63
52
|
children: [
|
64
|
-
/* @__PURE__ */ a(
|
65
|
-
|
53
|
+
/* @__PURE__ */ a(_, { asChild: !0, className: "border-border", children: /* @__PURE__ */ t(
|
54
|
+
F,
|
66
55
|
{
|
67
56
|
variant: "outline",
|
68
57
|
role: "combobox",
|
69
58
|
"aria-expanded": l,
|
70
|
-
className:
|
59
|
+
className: g(
|
71
60
|
"w-full justify-between font-normal text-sm border bg-input",
|
72
61
|
l ? "border-2 border-sidebar-accent" : "border-border"
|
73
62
|
),
|
74
|
-
disabled:
|
63
|
+
disabled: N,
|
75
64
|
children: [
|
76
|
-
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: o ? ((
|
65
|
+
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: o ? ((C = p.find((e) => e.value === o)) == null ? void 0 : C.label) || (s == null ? void 0 : s.label) : /* @__PURE__ */ a("span", { className: "text-gray-400", children: x }) }),
|
77
66
|
o ? /* @__PURE__ */ a(
|
78
|
-
|
67
|
+
z,
|
79
68
|
{
|
80
69
|
className: "opacity-50 w-4 h-4 cursor-pointer hover:opacity-100",
|
81
70
|
onClick: (e) => {
|
82
|
-
e.stopPropagation(),
|
71
|
+
e.stopPropagation(), T();
|
83
72
|
}
|
84
73
|
}
|
85
|
-
) : /* @__PURE__ */ a(
|
74
|
+
) : /* @__PURE__ */ a(A, { className: "opacity-50 w-4 h-4" })
|
86
75
|
]
|
87
76
|
}
|
88
77
|
) }),
|
89
78
|
/* @__PURE__ */ a(
|
90
|
-
|
79
|
+
B,
|
91
80
|
{
|
92
81
|
className: "w-[var(--radix-popper-anchor-width)] max-w-none p-0",
|
93
82
|
align: "start",
|
94
|
-
children: /* @__PURE__ */ t(
|
83
|
+
children: /* @__PURE__ */ t(G, { shouldFilter: !1, children: [
|
95
84
|
/* @__PURE__ */ a(
|
96
|
-
|
85
|
+
M,
|
97
86
|
{
|
98
|
-
placeholder:
|
99
|
-
value:
|
100
|
-
onValueChange:
|
87
|
+
placeholder: S,
|
88
|
+
value: P,
|
89
|
+
onValueChange: D
|
101
90
|
}
|
102
91
|
),
|
103
|
-
/* @__PURE__ */ t(
|
104
|
-
!
|
105
|
-
/* @__PURE__ */ a(
|
106
|
-
|
92
|
+
/* @__PURE__ */ t(R, { children: [
|
93
|
+
!f && /* @__PURE__ */ a(V, { children: O }),
|
94
|
+
/* @__PURE__ */ a(W, { children: f ? /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(I, {}) }) : p.map((e) => /* @__PURE__ */ t(
|
95
|
+
X,
|
107
96
|
{
|
108
97
|
value: e.value,
|
109
98
|
onSelect: () => {
|
110
|
-
o === e.value ?
|
99
|
+
o === e.value ? c({ value: "", label: "" }) : c(e), d(!1);
|
111
100
|
},
|
112
101
|
children: [
|
113
102
|
e.label,
|
114
103
|
/* @__PURE__ */ a(
|
115
|
-
|
104
|
+
H,
|
116
105
|
{
|
117
|
-
className:
|
106
|
+
className: g(
|
118
107
|
"ml-auto",
|
119
108
|
o === e.value ? "opacity-100" : "opacity-0"
|
120
109
|
)
|
@@ -133,5 +122,5 @@ const ie = (N) => {
|
|
133
122
|
) });
|
134
123
|
};
|
135
124
|
export {
|
136
|
-
|
125
|
+
te as Combobox
|
137
126
|
};
|
@@ -1,12 +1,7 @@
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
2
|
-
|
3
1
|
export interface ComboboxOption {
|
4
2
|
value: string;
|
5
3
|
label: string;
|
6
4
|
}
|
7
|
-
export interface ComboboxPropsOnMountParams {
|
8
|
-
setOptions: Dispatch<SetStateAction<ComboboxOption[]>>;
|
9
|
-
}
|
10
5
|
export interface ComboboxProps {
|
11
6
|
value: string;
|
12
7
|
onChange: (value: string) => void;
|
@@ -17,6 +12,4 @@ export interface ComboboxProps {
|
|
17
12
|
options?: ComboboxOption[];
|
18
13
|
/** CommandEmpty label*/
|
19
14
|
emptyLabel?: string;
|
20
|
-
/** Callback for load data on start component */
|
21
|
-
onMount?: (params: ComboboxPropsOnMountParams) => Promise<ComboboxOption[]>;
|
22
15
|
}
|
package/FormInput/FormInput.mjs
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { FormControl as l } from "../Form/Form.mjs";
|
3
|
-
import { FormRenderControl as
|
4
|
-
import
|
5
|
-
|
3
|
+
import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
|
4
|
+
import "../Input/index.mjs";
|
5
|
+
import { Input as u } from "../Input/Input.mjs";
|
6
|
+
const d = (m) => {
|
6
7
|
const { form: t, label: e, name: n, ...p } = m;
|
7
8
|
return /* @__PURE__ */ r(
|
8
|
-
|
9
|
+
i,
|
9
10
|
{
|
10
11
|
form: t,
|
11
12
|
name: n,
|
12
13
|
label: e,
|
13
14
|
render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
14
|
-
|
15
|
+
u,
|
15
16
|
{
|
16
17
|
...o,
|
17
18
|
value: o.value || "",
|
@@ -22,5 +23,5 @@ const F = (m) => {
|
|
22
23
|
);
|
23
24
|
};
|
24
25
|
export {
|
25
|
-
|
26
|
+
d as FormInput
|
26
27
|
};
|
@@ -3,5 +3,5 @@ import { FormRenderControlExtendProps } from '../Form';
|
|
3
3
|
import { UseFormReturn } from 'react-hook-form';
|
4
4
|
import { FieldValues } from 'react-hook-form/dist/types/fields';
|
5
5
|
|
6
|
-
export interface FormSelectProps<Data extends FieldValues, Form extends UseFormReturn<Data>, ExtendOptionData> extends FormRenderControlExtendProps<Data, Form>,
|
6
|
+
export interface FormSelectProps<Data extends FieldValues, Form extends UseFormReturn<Data>, ExtendOptionData> extends FormRenderControlExtendProps<Data, Form>, SelectProps<ExtendOptionData> {
|
7
7
|
}
|
package/Input/index.mjs
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
import { BaseInput as
|
1
|
+
import { BaseInput as a, Input as n, PasswordInput as r, Input as u } from "./Input.mjs";
|
2
|
+
import { inputVariants as s } from "./inputVariants.mjs";
|
3
|
+
e;
|
2
4
|
export {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
5
|
+
a as BaseInput,
|
6
|
+
n as Input,
|
7
|
+
r as PasswordInput,
|
8
|
+
u as default,
|
9
|
+
s as inputVariants
|
7
10
|
};
|
package/Search/Search.mjs
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useState as S } from "react";
|
3
|
-
import
|
4
|
-
import { useDebounceCallback as
|
5
|
-
import { cn as
|
6
|
-
|
3
|
+
import "../Input/index.mjs";
|
4
|
+
import { useDebounceCallback as f } from "@oneplatformdev/hooks";
|
5
|
+
import { cn as v } from "@oneplatformdev/utils";
|
6
|
+
import { Input as d } from "../Input/Input.mjs";
|
7
|
+
const k = (t) => {
|
7
8
|
const {
|
8
9
|
search: a,
|
9
10
|
onChange: e,
|
@@ -11,20 +12,20 @@ const j = (t) => {
|
|
11
12
|
placeholder: s = "Search",
|
12
13
|
className: n,
|
13
14
|
...m
|
14
|
-
} = t, [i, l] = S(a),
|
15
|
+
} = t, [i, l] = S(a), p = f(c, 1e3), h = (r) => {
|
15
16
|
const u = r.target.value;
|
16
|
-
l(u), e == null || e(r),
|
17
|
+
l(u), e == null || e(r), p(r.target.value);
|
17
18
|
};
|
18
|
-
return /* @__PURE__ */ o("div", { className:
|
19
|
-
|
19
|
+
return /* @__PURE__ */ o("div", { className: v("space-y-4", n), children: /* @__PURE__ */ o(
|
20
|
+
d,
|
20
21
|
{
|
21
22
|
placeholder: s,
|
22
23
|
value: i,
|
23
|
-
onChange:
|
24
|
+
onChange: h,
|
24
25
|
...m
|
25
26
|
}
|
26
27
|
) });
|
27
28
|
};
|
28
29
|
export {
|
29
|
-
|
30
|
+
k as Search
|
30
31
|
};
|
package/Sidebar/Sidebar.mjs
CHANGED
@@ -6,12 +6,13 @@ import { PanelLeft as k } from "lucide-react";
|
|
6
6
|
import { cn as d } from "@oneplatformdev/utils";
|
7
7
|
import { Button as E } from "../Button/Button.mjs";
|
8
8
|
import "../Button/buttonVariants.mjs";
|
9
|
-
import
|
10
|
-
import { Separator as
|
11
|
-
import { Sheet as
|
9
|
+
import "../Input/index.mjs";
|
10
|
+
import { Separator as z } from "../Separator/Separator.mjs";
|
11
|
+
import { Sheet as B, SheetContent as T } from "../Sheet/Sheet.mjs";
|
12
12
|
import { Skeleton as M } from "../Skeleton/Skeleton.mjs";
|
13
|
-
import { TooltipProvider as
|
14
|
-
import { Tooltip as
|
13
|
+
import { TooltipProvider as A, TooltipTrigger as D, TooltipContent as O } from "../Tooltip/TooltipRoot.mjs";
|
14
|
+
import { Tooltip as L } from "../Tooltip/Tooltip.mjs";
|
15
|
+
import { Input as G } from "../Input/Input.mjs";
|
15
16
|
const K = 768;
|
16
17
|
function H(a = {}) {
|
17
18
|
const {
|
@@ -66,7 +67,7 @@ const V = i.forwardRef(
|
|
66
67
|
}),
|
67
68
|
[y, g, x, c, p, u, w]
|
68
69
|
);
|
69
|
-
return /* @__PURE__ */ r(R.Provider, { value: I, children: /* @__PURE__ */ r(
|
70
|
+
return /* @__PURE__ */ r(R.Provider, { value: I, children: /* @__PURE__ */ r(A, { delayDuration: 0, children: /* @__PURE__ */ r(
|
70
71
|
"div",
|
71
72
|
{
|
72
73
|
style: {
|
@@ -107,8 +108,8 @@ const U = i.forwardRef(
|
|
107
108
|
...s,
|
108
109
|
children: n
|
109
110
|
}
|
110
|
-
) : m ? /* @__PURE__ */ r(
|
111
|
-
|
111
|
+
) : m ? /* @__PURE__ */ r(B, { open: p, onOpenChange: u, ...s, children: /* @__PURE__ */ r(
|
112
|
+
T,
|
112
113
|
{
|
113
114
|
"data-sidebar": "sidebar",
|
114
115
|
"data-mobile": "true",
|
@@ -228,7 +229,7 @@ const J = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
228
229
|
));
|
229
230
|
J.displayName = "SidebarInset";
|
230
231
|
const Q = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
231
|
-
|
232
|
+
G,
|
232
233
|
{
|
233
234
|
ref: t,
|
234
235
|
"data-sidebar": "input",
|
@@ -261,7 +262,7 @@ const ee = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
261
262
|
));
|
262
263
|
ee.displayName = "SidebarFooter";
|
263
264
|
const ae = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
264
|
-
|
265
|
+
z,
|
265
266
|
{
|
266
267
|
ref: t,
|
267
268
|
"data-sidebar": "separator",
|
@@ -395,10 +396,10 @@ const le = C(
|
|
395
396
|
);
|
396
397
|
return n ? (typeof n == "string" && (n = {
|
397
398
|
children: n
|
398
|
-
}), /* @__PURE__ */ S(
|
399
|
-
/* @__PURE__ */ r(
|
399
|
+
}), /* @__PURE__ */ S(L, { children: [
|
400
|
+
/* @__PURE__ */ r(D, { asChild: !0, children: v }),
|
400
401
|
/* @__PURE__ */ r(
|
401
|
-
|
402
|
+
O,
|
402
403
|
{
|
403
404
|
side: "right",
|
404
405
|
align: "center",
|