@oneplatformdev/ui 0.0.1-beta.45 → 0.0.1-beta.47
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/Button/buttonVariants.mjs +2 -2
- package/Command/Command.d.ts +1 -1
- package/Command/Command.mjs +4 -3
- package/Dialog/Dialog.d.ts +3 -19
- package/Dialog/Dialog.mjs +15 -96
- package/Dialog/Dialog.types.d.ts +6 -0
- package/Dialog/DialogRoot.d.ts +19 -0
- package/Dialog/DialogRoot.mjs +100 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.mjs +12 -10
- package/Select/Select.mjs +48 -46
- package/Textarea/Textarea.mjs +4 -4
- package/index.css +1 -1
- package/index.mjs +269 -267
- package/package.json +1 -2
package/Command/Command.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { DialogProps } from '@radix-ui/react-dialog';
|
2
|
-
import * as React from
|
2
|
+
import * as React from 'react';
|
3
3
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
4
4
|
children?: React.ReactNode;
|
5
5
|
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
package/Command/Command.mjs
CHANGED
@@ -3,7 +3,8 @@ import * as m from "react";
|
|
3
3
|
import { Command as o } from "cmdk";
|
4
4
|
import { Search as p } from "lucide-react";
|
5
5
|
import { cn as r } from "@oneplatformdev/utils";
|
6
|
-
import {
|
6
|
+
import { DialogRoot as i, DialogContent as c } from "../Dialog/DialogRoot.mjs";
|
7
|
+
import "../Dialog/Dialog.mjs";
|
7
8
|
const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
|
8
9
|
o,
|
9
10
|
{
|
@@ -16,7 +17,7 @@ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
|
|
16
17
|
}
|
17
18
|
));
|
18
19
|
n.displayName = o.displayName;
|
19
|
-
const
|
20
|
+
const b = ({ children: e, ...a }) => /* @__PURE__ */ t(i, { ...a, children: /* @__PURE__ */ t(c, { 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 }) }) }), l = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
20
21
|
/* @__PURE__ */ t(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
21
22
|
/* @__PURE__ */ t(
|
22
23
|
o.Input,
|
@@ -98,7 +99,7 @@ const y = ({
|
|
98
99
|
y.displayName = "CommandShortcut";
|
99
100
|
export {
|
100
101
|
n as Command,
|
101
|
-
|
102
|
+
b as CommandDialog,
|
102
103
|
f as CommandEmpty,
|
103
104
|
g as CommandGroup,
|
104
105
|
l as CommandInput,
|
package/Dialog/Dialog.d.ts
CHANGED
@@ -1,19 +1,3 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
declare const Dialog:
|
4
|
-
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
5
|
-
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
6
|
-
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
7
|
-
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
8
|
-
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
9
|
-
declare const DialogHeader: {
|
10
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
11
|
-
displayName: string;
|
12
|
-
};
|
13
|
-
declare const DialogFooter: {
|
14
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
15
|
-
displayName: string;
|
16
|
-
};
|
17
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
18
|
-
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
19
|
-
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
1
|
+
import { IDialogProps } from './Dialog.types';
|
2
|
+
|
3
|
+
export declare const Dialog: import('react').ForwardRefExoticComponent<IDialogProps & import('react').RefAttributes<never>>;
|
package/Dialog/Dialog.mjs
CHANGED
@@ -1,100 +1,19 @@
|
|
1
|
-
import { jsx as o, jsxs as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
));
|
17
|
-
d.displayName = e.Overlay.displayName;
|
18
|
-
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ n(m, { children: [
|
19
|
-
/* @__PURE__ */ o(d, {}),
|
20
|
-
/* @__PURE__ */ n(
|
21
|
-
e.Content,
|
22
|
-
{
|
23
|
-
ref: r,
|
24
|
-
className: i(
|
25
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
26
|
-
a
|
27
|
-
),
|
28
|
-
...s,
|
29
|
-
children: [
|
30
|
-
t,
|
31
|
-
/* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
32
|
-
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
33
|
-
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
34
|
-
] })
|
35
|
-
]
|
36
|
-
}
|
37
|
-
)
|
38
|
-
] }));
|
39
|
-
f.displayName = e.Content.displayName;
|
40
|
-
const p = ({
|
41
|
-
className: a,
|
42
|
-
...t
|
43
|
-
}) => /* @__PURE__ */ o(
|
44
|
-
"div",
|
45
|
-
{
|
46
|
-
className: i(
|
47
|
-
"flex flex-col space-y-1.5 text-center sm:text-left",
|
48
|
-
a
|
49
|
-
),
|
50
|
-
...t
|
51
|
-
}
|
52
|
-
);
|
53
|
-
p.displayName = "DialogHeader";
|
54
|
-
const g = ({
|
55
|
-
className: a,
|
56
|
-
...t
|
57
|
-
}) => /* @__PURE__ */ o(
|
58
|
-
"div",
|
59
|
-
{
|
60
|
-
className: i(
|
61
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
62
|
-
a
|
63
|
-
),
|
64
|
-
...t
|
1
|
+
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
2
|
+
import { forwardRef as t } from "react";
|
3
|
+
import { DialogRoot as l, DialogContent as n, DialogHeader as a, DialogTitle as s, DialogDescription as c, DialogFooter as m } from "./DialogRoot.mjs";
|
4
|
+
const h = t(
|
5
|
+
(e, d) => {
|
6
|
+
const { ...i } = e;
|
7
|
+
return /* @__PURE__ */ o(l, { ...i, children: /* @__PURE__ */ r(n, { className: "sm:max-w-[600px]", children: [
|
8
|
+
/* @__PURE__ */ r(a, { children: [
|
9
|
+
/* @__PURE__ */ o(s, { children: "title" }),
|
10
|
+
/* @__PURE__ */ o(c, { children: "subtitle" })
|
11
|
+
] }),
|
12
|
+
"Content",
|
13
|
+
/* @__PURE__ */ o(m, { children: "footer" })
|
14
|
+
] }) });
|
65
15
|
}
|
66
16
|
);
|
67
|
-
g.displayName = "DialogFooter";
|
68
|
-
const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
69
|
-
e.Title,
|
70
|
-
{
|
71
|
-
ref: s,
|
72
|
-
className: i(
|
73
|
-
"text-lg font-semibold leading-none tracking-tight",
|
74
|
-
a
|
75
|
-
),
|
76
|
-
...t
|
77
|
-
}
|
78
|
-
));
|
79
|
-
u.displayName = e.Title.displayName;
|
80
|
-
const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
81
|
-
e.Description,
|
82
|
-
{
|
83
|
-
ref: s,
|
84
|
-
className: i("text-sm text-muted-foreground", a),
|
85
|
-
...t
|
86
|
-
}
|
87
|
-
));
|
88
|
-
y.displayName = e.Description.displayName;
|
89
17
|
export {
|
90
|
-
|
91
|
-
v as DialogClose,
|
92
|
-
f as DialogContent,
|
93
|
-
y as DialogDescription,
|
94
|
-
g as DialogFooter,
|
95
|
-
p as DialogHeader,
|
96
|
-
d as DialogOverlay,
|
97
|
-
m as DialogPortal,
|
98
|
-
u as DialogTitle,
|
99
|
-
h as DialogTrigger
|
18
|
+
h as Dialog
|
100
19
|
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
3
|
+
declare const DialogRoot: React.FC<DialogPrimitive.DialogProps>;
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
5
|
+
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
9
|
+
declare const DialogHeader: {
|
10
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
11
|
+
displayName: string;
|
12
|
+
};
|
13
|
+
declare const DialogFooter: {
|
14
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
15
|
+
displayName: string;
|
16
|
+
};
|
17
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
18
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
19
|
+
export { DialogRoot, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
2
|
+
import * as l from "react";
|
3
|
+
import * as e from "@radix-ui/react-dialog";
|
4
|
+
import { X as c } from "lucide-react";
|
5
|
+
import { cn as i } from "@oneplatformdev/utils";
|
6
|
+
const b = e.Root, h = e.Trigger, m = e.Portal, v = e.Close, d = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
7
|
+
e.Overlay,
|
8
|
+
{
|
9
|
+
ref: s,
|
10
|
+
className: i(
|
11
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
12
|
+
a
|
13
|
+
),
|
14
|
+
...t
|
15
|
+
}
|
16
|
+
));
|
17
|
+
d.displayName = e.Overlay.displayName;
|
18
|
+
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ n(m, { children: [
|
19
|
+
/* @__PURE__ */ o(d, {}),
|
20
|
+
/* @__PURE__ */ n(
|
21
|
+
e.Content,
|
22
|
+
{
|
23
|
+
ref: r,
|
24
|
+
className: i(
|
25
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
26
|
+
a
|
27
|
+
),
|
28
|
+
...s,
|
29
|
+
children: [
|
30
|
+
t,
|
31
|
+
/* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
32
|
+
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
33
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
34
|
+
] })
|
35
|
+
]
|
36
|
+
}
|
37
|
+
)
|
38
|
+
] }));
|
39
|
+
f.displayName = e.Content.displayName;
|
40
|
+
const p = ({
|
41
|
+
className: a,
|
42
|
+
...t
|
43
|
+
}) => /* @__PURE__ */ o(
|
44
|
+
"div",
|
45
|
+
{
|
46
|
+
className: i(
|
47
|
+
"flex flex-col space-y-1.5 text-center sm:text-left",
|
48
|
+
a
|
49
|
+
),
|
50
|
+
...t
|
51
|
+
}
|
52
|
+
);
|
53
|
+
p.displayName = "DialogHeader";
|
54
|
+
const g = ({
|
55
|
+
className: a,
|
56
|
+
...t
|
57
|
+
}) => /* @__PURE__ */ o(
|
58
|
+
"div",
|
59
|
+
{
|
60
|
+
className: i(
|
61
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
62
|
+
a
|
63
|
+
),
|
64
|
+
...t
|
65
|
+
}
|
66
|
+
);
|
67
|
+
g.displayName = "DialogFooter";
|
68
|
+
const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
69
|
+
e.Title,
|
70
|
+
{
|
71
|
+
ref: s,
|
72
|
+
className: i(
|
73
|
+
"text-lg font-semibold leading-none tracking-tight",
|
74
|
+
a
|
75
|
+
),
|
76
|
+
...t
|
77
|
+
}
|
78
|
+
));
|
79
|
+
u.displayName = e.Title.displayName;
|
80
|
+
const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
81
|
+
e.Description,
|
82
|
+
{
|
83
|
+
ref: s,
|
84
|
+
className: i("text-sm text-muted-foreground", a),
|
85
|
+
...t
|
86
|
+
}
|
87
|
+
));
|
88
|
+
y.displayName = e.Description.displayName;
|
89
|
+
export {
|
90
|
+
v as DialogClose,
|
91
|
+
f as DialogContent,
|
92
|
+
y as DialogDescription,
|
93
|
+
g as DialogFooter,
|
94
|
+
p as DialogHeader,
|
95
|
+
d as DialogOverlay,
|
96
|
+
m as DialogPortal,
|
97
|
+
b as DialogRoot,
|
98
|
+
u as DialogTitle,
|
99
|
+
h as DialogTrigger
|
100
|
+
};
|
package/Dialog/index.d.ts
CHANGED
package/Dialog/index.mjs
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { DialogClose as l, DialogContent as a, DialogDescription as g, DialogFooter as D, DialogHeader as e, DialogOverlay as r, DialogPortal as t, DialogRoot as n, DialogTitle as p, DialogTrigger as f } from "./DialogRoot.mjs";
|
2
|
+
import { Dialog as s } from "./Dialog.mjs";
|
2
3
|
export {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
s as Dialog,
|
5
|
+
l as DialogClose,
|
6
|
+
a as DialogContent,
|
7
|
+
g as DialogDescription,
|
8
|
+
D as DialogFooter,
|
9
|
+
e as DialogHeader,
|
10
|
+
r as DialogOverlay,
|
11
|
+
t as DialogPortal,
|
12
|
+
n as DialogRoot,
|
11
13
|
p as DialogTitle,
|
12
|
-
|
14
|
+
f as DialogTrigger
|
13
15
|
};
|
package/Select/Select.mjs
CHANGED
@@ -1,65 +1,67 @@
|
|
1
|
-
import { jsxs as d, jsx as
|
2
|
-
import {
|
1
|
+
import { jsxs as d, jsx as c } from "react/jsx-runtime";
|
2
|
+
import { createElement as f } from "react";
|
3
|
+
import { Button as g } from "../Button/Button.mjs";
|
3
4
|
import "../Button/buttonVariants.mjs";
|
4
|
-
import { SelectRoot as
|
5
|
-
import { isValidReactElement as
|
6
|
-
const
|
7
|
-
const { placeholder: l, renderTrigger: e, slotProps:
|
8
|
-
return e && typeof e == "function" &&
|
9
|
-
},
|
10
|
-
const { renderOption: l, option: e, index:
|
11
|
-
return l && typeof l == "function" &&
|
5
|
+
import { SelectRoot as p, SelectContent as h, SelectTrigger as v, SelectValue as S, SelectItem as u } from "./SelectRoot.mjs";
|
6
|
+
import { isValidReactElement as i } from "@oneplatformdev/utils";
|
7
|
+
const C = (r) => {
|
8
|
+
const { placeholder: l, renderTrigger: e, slotProps: n } = r, t = /* @__PURE__ */ c(v, { ...(n == null ? void 0 : n.triggerProps) || {}, children: /* @__PURE__ */ c(S, { placeholder: l }) });
|
9
|
+
return e && typeof e == "function" && i(e(r, t)) ? e(r, t) : t;
|
10
|
+
}, x = (r) => {
|
11
|
+
const { renderOption: l, option: e, index: n, options: t, ...a } = r, o = /* @__PURE__ */ c(u, { value: e.value, children: e.label }, e.value);
|
12
|
+
return l && typeof l == "function" && i(l(
|
12
13
|
e,
|
13
|
-
t,
|
14
14
|
n,
|
15
|
-
{ ...i, options: n },
|
16
|
-
r
|
17
|
-
)) ? c(l(
|
18
|
-
e,
|
19
15
|
t,
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
), u) ? c(l(
|
16
|
+
{ ...a, options: t },
|
17
|
+
o
|
18
|
+
)) ? i(l(
|
24
19
|
e,
|
25
|
-
t,
|
26
20
|
n,
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
t,
|
22
|
+
{ ...a, options: t },
|
23
|
+
o
|
24
|
+
), u) ? i(l(
|
30
25
|
e,
|
26
|
+
n,
|
31
27
|
t,
|
28
|
+
{ ...a, options: t },
|
29
|
+
o
|
30
|
+
)) : /* @__PURE__ */ c(u, { value: e.value, children: l(
|
31
|
+
e,
|
32
32
|
n,
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
},
|
33
|
+
t,
|
34
|
+
{ ...a, options: t },
|
35
|
+
o
|
36
|
+
) }, e.value) : o;
|
37
|
+
}, j = (r) => {
|
37
38
|
const {
|
38
39
|
value: l,
|
39
40
|
options: e,
|
40
|
-
onChange:
|
41
|
-
nullable:
|
42
|
-
clearLabel:
|
43
|
-
disabled:
|
44
|
-
} =
|
41
|
+
onChange: n,
|
42
|
+
nullable: t = !1,
|
43
|
+
clearLabel: a = "Clear",
|
44
|
+
disabled: o
|
45
|
+
} = r;
|
45
46
|
return /* @__PURE__ */ d(
|
46
|
-
|
47
|
+
p,
|
47
48
|
{
|
48
49
|
value: l,
|
49
|
-
onValueChange:
|
50
|
-
disabled:
|
50
|
+
onValueChange: n,
|
51
|
+
disabled: o,
|
51
52
|
children: [
|
52
|
-
/* @__PURE__ */
|
53
|
-
/* @__PURE__ */ d(
|
54
|
-
|
55
|
-
|
56
|
-
}, children:
|
57
|
-
e.map((
|
58
|
-
|
53
|
+
/* @__PURE__ */ c(C, { ...r }),
|
54
|
+
/* @__PURE__ */ d(h, { children: [
|
55
|
+
t && /* @__PURE__ */ c(g, { className: "w-full px-2", variant: "secondary", size: "sm", onClick: () => {
|
56
|
+
n("");
|
57
|
+
}, children: a }),
|
58
|
+
e.map((m, s) => /* @__PURE__ */ f(
|
59
|
+
x,
|
59
60
|
{
|
60
|
-
...
|
61
|
-
|
62
|
-
|
61
|
+
...r,
|
62
|
+
key: m.value,
|
63
|
+
option: m,
|
64
|
+
index: s
|
63
65
|
}
|
64
66
|
))
|
65
67
|
] })
|
@@ -68,5 +70,5 @@ const S = (o) => {
|
|
68
70
|
);
|
69
71
|
};
|
70
72
|
export {
|
71
|
-
|
73
|
+
j as Select
|
72
74
|
};
|
package/Textarea/Textarea.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { jsxs as u, Fragment as
|
1
|
+
import { jsxs as u, Fragment as h, jsx as p } from "react/jsx-runtime";
|
2
2
|
import * as v from "react";
|
3
3
|
import { useId as w, useRef as z, useState as A, useImperativeHandle as N, useEffect as y } from "react";
|
4
4
|
import { cn as d } from "@oneplatformdev/utils";
|
@@ -31,8 +31,8 @@ const T = v.forwardRef(
|
|
31
31
|
minHeight: o
|
32
32
|
})), y(() => {
|
33
33
|
b(r);
|
34
|
-
}, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(
|
35
|
-
/* @__PURE__ */
|
34
|
+
}, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(h, { children: [
|
35
|
+
/* @__PURE__ */ p(
|
36
36
|
"textarea",
|
37
37
|
{
|
38
38
|
id: n || a,
|
@@ -43,7 +43,7 @@ const T = v.forwardRef(
|
|
43
43
|
"flex min-h-10 w-full px-3 py-2 text-base relative",
|
44
44
|
"rounded-md border border-input bg-transparent shadow-sm",
|
45
45
|
"placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
46
|
-
g ? "resize" : "resize-none",
|
46
|
+
g ? "resize" : "resize-none !overflow-hidden",
|
47
47
|
s && "pb-2",
|
48
48
|
f
|
49
49
|
)
|