@oneplatformdev/ui 0.0.1-beta.64 → 0.0.1-beta.68
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/Alert/Alert.mjs +7 -6
- package/AreaChart/AreaChart.mjs +5 -4
- package/Badge/Badge.mjs +7 -6
- package/Button/buttonVariants.mjs +3 -3
- package/Calendar/Calendar.mjs +1 -0
- package/Checkbox/Checkbox.d.ts +5 -4
- package/Checkbox/Checkbox.mjs +48 -21
- package/Checkbox/Checkbox.types.d.ts +10 -0
- package/Checkbox/index.d.ts +2 -1
- package/Checkbox/index.mjs +3 -2
- package/Combobox/Combobox.d.ts +2 -2
- package/Combobox/Combobox.mjs +55 -53
- package/Command/Command.mjs +3 -2
- package/DataTable/DataTable.mjs +16 -15
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.mjs +14 -12
- package/Dropzone/Dropzone.mjs +1 -1
- package/Dropzone/DropzoneFilePreview.mjs +1 -1
- package/Dropzone/index.mjs +1 -1
- package/{DropzoneFilePreview-Dhtv8F4u.js → DropzoneFilePreview-C-SoCoO0.js} +16 -15
- package/Form/Form.mjs +5 -4
- package/Form/FormRenderControl.mjs +7 -6
- package/FormCheckbox/FormCheckbox.d.ts +1 -1
- package/FormCheckbox/FormCheckbox.mjs +24 -23
- package/FormCheckbox/FormCheckbox.types.d.ts +3 -2
- package/FormCombobox/FormCombobox.mjs +13 -12
- package/FormDatePicker/FormDatePicker.mjs +7 -6
- package/FormDropzone/FormDropzone.mjs +7 -6
- package/FormInput/FormInput.mjs +7 -6
- package/FormRadio/FormRadio.mjs +11 -10
- package/FormSelect/FormSelect.mjs +6 -5
- package/FormTextarea/FormTextarea.mjs +10 -9
- package/Header/Header.mjs +7 -6
- package/Label/Label.d.ts +2 -2
- package/Label/Label.mjs +7 -6
- package/Label/labelVariants.mjs +1 -1
- package/LazyLoader/LazyLoader.mjs +5 -4
- package/LoadingMask/LoadingMask.d.ts +4 -1
- package/LoadingMask/LoadingMask.mjs +19 -56
- package/LoadingMask/LoadingMask.types.d.ts +5 -0
- package/LoadingMask/RenderLoadingMask.d.ts +3 -0
- package/LoadingMask/RenderLoadingMask.mjs +108 -0
- package/LoadingMask/index.d.ts +2 -0
- package/LoadingMask/index.mjs +4 -2
- package/LoadingProgress/LoadingProgress.mjs +3 -2
- package/Radio/Radio.mjs +8 -7
- package/ScrollArea/ScrollArea.d.ts +2 -2
- package/ScrollArea/ScrollArea.mjs +26 -13
- package/Skeleton/Skeleton.mjs +9 -8
- package/TablePagination/TablePagination.mjs +9 -8
- package/Textarea/Textarea.mjs +5 -72
- package/Textarea/index.mjs +2 -2
- package/Textarea/useAutosizeTextArea.mjs +65 -18
- package/Textarea-D1CCXy7E.js +149 -0
- package/Theme/ThemeProvider.mjs +14 -13
- package/Toast/Toast.mjs +3 -2
- package/ToggleGroup/ToggleGroup.mjs +7 -6
- package/Tooltip/Tooltip.mjs +3 -2
- package/index.css +1 -1
- package/index.mjs +287 -284
- package/package.json +1 -1
package/Alert/Alert.mjs
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
2
2
|
import * as i from "react";
|
3
|
-
import
|
3
|
+
import "class-variance-authority";
|
4
|
+
import { cn as o } from "@oneplatformdev/utils";
|
4
5
|
import { alertVariants as m } from "./alertVariants.mjs";
|
5
|
-
const s = i.forwardRef(({ className: e, variant: r, ...t },
|
6
|
+
const s = i.forwardRef(({ className: e, variant: r, ...t }, l) => /* @__PURE__ */ a(
|
6
7
|
"div",
|
7
8
|
{
|
8
|
-
ref:
|
9
|
+
ref: l,
|
9
10
|
role: "alert",
|
10
|
-
className:
|
11
|
+
className: o(m({ variant: r }), e),
|
11
12
|
...t
|
12
13
|
}
|
13
14
|
));
|
@@ -16,7 +17,7 @@ const n = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
|
16
17
|
"h5",
|
17
18
|
{
|
18
19
|
ref: t,
|
19
|
-
className:
|
20
|
+
className: o("mb-1 font-medium leading-none tracking-tight", e),
|
20
21
|
...r
|
21
22
|
}
|
22
23
|
));
|
@@ -25,7 +26,7 @@ const d = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
|
|
25
26
|
"div",
|
26
27
|
{
|
27
28
|
ref: t,
|
28
|
-
className:
|
29
|
+
className: o("text-sm [&_p]:leading-relaxed", e),
|
29
30
|
...r
|
30
31
|
}
|
31
32
|
));
|
package/AreaChart/AreaChart.mjs
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import "react";
|
2
3
|
import { AreaChart as s, CartesianGrid as n, XAxis as l, YAxis as h, Area as p } from "recharts";
|
3
|
-
import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as
|
4
|
-
const
|
4
|
+
import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as m } from "../Chart/Chart.mjs";
|
5
|
+
const y = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, className: "h-[350px] w-full", children: /* @__PURE__ */ a(s, { data: o, width: 808, height: 350, margin: { top: 10, right: 10, left: 0, bottom: 0 }, children: [
|
5
6
|
/* @__PURE__ */ t("defs", { children: Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ a("linearGradient", { id: `${e}Gradient`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
6
7
|
/* @__PURE__ */ t("stop", { offset: "5%", stopColor: r, stopOpacity: 0.8 }),
|
7
8
|
/* @__PURE__ */ t("stop", { offset: "95%", stopColor: r, stopOpacity: 0.1 })
|
@@ -9,7 +10,7 @@ const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
|
|
9
10
|
/* @__PURE__ */ t(n, { strokeDasharray: "none", stroke: "gray", strokeWidth: 0.5, vertical: !0, horizontal: !0 }),
|
10
11
|
/* @__PURE__ */ t(l, { dataKey: "month", axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
|
11
12
|
/* @__PURE__ */ t(h, { axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
|
12
|
-
/* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(
|
13
|
+
/* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(m, {}) }),
|
13
14
|
Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ t(
|
14
15
|
p,
|
15
16
|
{
|
@@ -23,5 +24,5 @@ const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
|
|
23
24
|
))
|
24
25
|
] }) });
|
25
26
|
export {
|
26
|
-
|
27
|
+
y as AreaChart
|
27
28
|
};
|
package/Badge/Badge.mjs
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
2
|
+
import "react";
|
3
|
+
import { cn as i } from "@oneplatformdev/utils";
|
4
|
+
import { badgeVariants as a } from "./badgeVariants.mjs";
|
5
|
+
function s({ className: r, variant: o, ...m }) {
|
6
|
+
return /* @__PURE__ */ t("div", { className: i(a({ variant: o }), r), ...m });
|
6
7
|
}
|
7
8
|
export {
|
8
|
-
|
9
|
-
|
9
|
+
s as Badge,
|
10
|
+
a as badgeVariants
|
10
11
|
};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
2
|
-
const
|
2
|
+
const t = e(
|
3
3
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
4
4
|
{
|
5
5
|
variants: {
|
@@ -20,10 +20,10 @@ const r = e(
|
|
20
20
|
},
|
21
21
|
defaultVariants: {
|
22
22
|
variant: "default",
|
23
|
-
size: "
|
23
|
+
size: "lg"
|
24
24
|
}
|
25
25
|
}
|
26
26
|
);
|
27
27
|
export {
|
28
|
-
|
28
|
+
t as buttonVariants
|
29
29
|
};
|
package/Calendar/Calendar.mjs
CHANGED
package/Checkbox/Checkbox.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import * as
|
3
|
-
declare const Checkbox: React.ForwardRefExoticComponent<
|
4
|
-
|
1
|
+
import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types.ts';
|
2
|
+
import * as React from 'react';
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
4
|
+
declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
5
|
+
export { Checkbox, CheckboxLabel };
|
package/Checkbox/Checkbox.mjs
CHANGED
@@ -1,27 +1,54 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import * as s from "react";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { cn as
|
6
|
-
|
7
|
-
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
2
|
+
import * as s from "@radix-ui/react-checkbox";
|
3
|
+
import { MinusIcon as l, CheckIcon as h } from "lucide-react";
|
4
|
+
import * as m from "react";
|
5
|
+
import { cn as a } from "@oneplatformdev/utils";
|
6
|
+
import { Label as u } from "../Label/Label.mjs";
|
7
|
+
import "../Label/labelVariants.mjs";
|
8
|
+
const d = m.forwardRef(({ className: t, checked: c, indeterminate: e, ...i }, o) => {
|
9
|
+
const f = e ? l : h;
|
10
|
+
return /* @__PURE__ */ r(
|
11
|
+
s.Root,
|
12
|
+
{
|
13
|
+
ref: o,
|
14
|
+
className: a(
|
15
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
16
|
+
t
|
17
|
+
),
|
18
|
+
...i,
|
19
|
+
checked: c || e,
|
20
|
+
children: /* @__PURE__ */ r(
|
21
|
+
s.Indicator,
|
22
|
+
{
|
23
|
+
className: a("flex items-center justify-center text-current"),
|
24
|
+
children: /* @__PURE__ */ r(f, { className: "h-4 w-4" })
|
25
|
+
}
|
26
|
+
)
|
27
|
+
}
|
28
|
+
);
|
29
|
+
});
|
30
|
+
d.displayName = s.Root.displayName;
|
31
|
+
const x = m.forwardRef(({ label: t = "", children: c, labelProps: e, ...i }, o) => /* @__PURE__ */ n(
|
32
|
+
u,
|
8
33
|
{
|
9
|
-
ref:
|
10
|
-
|
11
|
-
|
12
|
-
|
34
|
+
ref: o,
|
35
|
+
...e,
|
36
|
+
className: a(
|
37
|
+
"flex w-full items-start gap-3 font-normal py-3 cursor-pointer",
|
38
|
+
e == null ? void 0 : e.className
|
13
39
|
),
|
14
|
-
|
15
|
-
children:
|
16
|
-
r
|
17
|
-
{
|
18
|
-
className:
|
19
|
-
|
20
|
-
}
|
21
|
-
|
40
|
+
style: e == null ? void 0 : e.style,
|
41
|
+
children: [
|
42
|
+
/* @__PURE__ */ r(d, { ...i }),
|
43
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col w-full gap-3", children: [
|
44
|
+
/* @__PURE__ */ r("span", { className: "flex flex-col justify-start leading-[16px]", children: t }),
|
45
|
+
c
|
46
|
+
] })
|
47
|
+
]
|
22
48
|
}
|
23
49
|
));
|
24
|
-
|
50
|
+
x.displayName = "CheckboxLabel";
|
25
51
|
export {
|
26
|
-
d as Checkbox
|
52
|
+
d as Checkbox,
|
53
|
+
x as CheckboxLabel
|
27
54
|
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Label } from '../Label';
|
2
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
3
|
+
import * as React from 'react';
|
4
|
+
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
5
|
+
indeterminate?: boolean;
|
6
|
+
}
|
7
|
+
export interface CheckboxLabelProps extends CheckboxProps {
|
8
|
+
label?: string;
|
9
|
+
labelProps?: React.ComponentPropsWithoutRef<typeof Label>;
|
10
|
+
}
|
package/Checkbox/index.d.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export * from './Checkbox';
|
1
|
+
export * from './Checkbox.tsx';
|
2
|
+
export type * from './Checkbox.types.ts';
|
package/Checkbox/index.mjs
CHANGED
package/Combobox/Combobox.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ComboboxProps } from './Combobox.types';
|
2
|
-
import {
|
2
|
+
import { default as React } from 'react';
|
3
3
|
|
4
|
-
export declare const Combobox:
|
4
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLDivElement>>;
|
package/Combobox/Combobox.mjs
CHANGED
@@ -1,86 +1,88 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
2
|
-
import s, { useRef as
|
3
|
-
import { LoadingMask as
|
4
|
-
import
|
5
|
-
import {
|
1
|
+
import { jsx as a, jsxs as r, Fragment as G } from "react/jsx-runtime";
|
2
|
+
import s, { forwardRef as I, useRef as U, useEffect as q, useCallback as c, useLayoutEffect as A } from "react";
|
3
|
+
import { LoadingMask as V } from "../LoadingMask/LoadingMask.mjs";
|
4
|
+
import "../LoadingMask/RenderLoadingMask.mjs";
|
5
|
+
import { Popover as X, PopoverTrigger as H, PopoverContent as J } from "../Popover/Popover.mjs";
|
6
|
+
import { Button as K } from "../Button/Button.mjs";
|
6
7
|
import "../Button/buttonVariants.mjs";
|
7
|
-
import { Command as
|
8
|
+
import { Command as Q, CommandInput as W, CommandList as Y, CommandGroup as Z, CommandEmpty as j, CommandItem as $ } from "../Command/Command.mjs";
|
8
9
|
import { cn as h } from "@oneplatformdev/utils";
|
9
|
-
import { useDebounceCallback as
|
10
|
-
import { X as
|
11
|
-
const
|
12
|
-
var
|
10
|
+
import { useDebounceCallback as ee } from "@oneplatformdev/hooks";
|
11
|
+
import { X as ae, ChevronsUpDown as te, Check as re } from "lucide-react";
|
12
|
+
const fe = I((k, O) => {
|
13
|
+
var L;
|
13
14
|
const {
|
14
|
-
value:
|
15
|
+
value: o,
|
15
16
|
onChange: P,
|
16
17
|
placeholder: D,
|
17
18
|
disabled: T,
|
18
19
|
searchLabel: B = "Type to search...",
|
19
20
|
fetchOptions: E,
|
20
|
-
options:
|
21
|
+
options: n,
|
21
22
|
emptyLabel: C = "No options",
|
22
23
|
emptyAction: i,
|
23
24
|
onMount: x
|
24
|
-
} =
|
25
|
-
|
26
|
-
|
27
|
-
}, [
|
25
|
+
} = k, f = U(!1), [t, d] = s.useState(!1), [m, w] = s.useState(""), [p, u] = s.useState([]), [b, N] = s.useState(), [g, l] = s.useState(!1);
|
26
|
+
q(() => {
|
27
|
+
n != null && n.length && u(n);
|
28
|
+
}, [n]);
|
28
29
|
const M = async () => {
|
29
30
|
t || (S(), w(""));
|
30
31
|
}, S = c(async (e) => {
|
31
32
|
l(!0);
|
32
33
|
try {
|
33
34
|
const y = await E(e);
|
34
|
-
|
35
|
+
u(y);
|
35
36
|
} catch (y) {
|
36
37
|
console.error("Unexpected error while get option:", y);
|
37
38
|
} finally {
|
38
39
|
l(!1);
|
39
40
|
}
|
40
|
-
}, []),
|
41
|
+
}, []), R = ee(S, 1e3, {
|
41
42
|
leading: !1,
|
42
43
|
trailing: !0
|
43
|
-
}),
|
44
|
-
l(!0), w(e),
|
44
|
+
}), _ = c((e) => {
|
45
|
+
l(!0), w(e), R(e);
|
45
46
|
}, []), v = c((e) => {
|
46
47
|
P(e.value), N(e), l(!1);
|
47
|
-
}, []),
|
48
|
-
|
49
|
-
}, []),
|
48
|
+
}, []), z = c(() => {
|
49
|
+
v({ value: "", label: "" }), N(void 0), l(!1);
|
50
|
+
}, []), F = c(() => {
|
50
51
|
if (!x) {
|
51
52
|
f.current = !0;
|
52
53
|
return;
|
53
54
|
}
|
54
|
-
x({ setOptions:
|
55
|
+
x({ setOptions: u, search: m || "", open: t, setOpen: d }).finally(
|
55
56
|
() => {
|
56
57
|
f.current = !0;
|
57
58
|
}
|
58
59
|
);
|
59
60
|
}, []);
|
60
|
-
return
|
61
|
+
return A(() => (F(), () => {
|
61
62
|
f.current = !1;
|
62
|
-
}), []), /* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */
|
63
|
-
|
63
|
+
}), []), /* @__PURE__ */ a("div", { className: "w-full", ref: O, children: /* @__PURE__ */ r(
|
64
|
+
X,
|
64
65
|
{
|
65
66
|
open: t,
|
66
67
|
onOpenChange: (e) => {
|
67
68
|
d(e), e && M();
|
68
69
|
},
|
69
70
|
children: [
|
70
|
-
/* @__PURE__ */ a(
|
71
|
-
|
71
|
+
/* @__PURE__ */ a(H, { asChild: !0, className: "border-input", children: /* @__PURE__ */ r(
|
72
|
+
K,
|
72
73
|
{
|
73
74
|
variant: "outline",
|
74
75
|
role: "combobox",
|
76
|
+
size: "lg",
|
75
77
|
"aria-expanded": t,
|
76
78
|
className: h(
|
77
|
-
"w-full justify-between font-normal text-sm border bg-transparent relative",
|
79
|
+
"w-full justify-between font-normal text-sm border bg-transparent relative p-3",
|
78
80
|
t ? "border-2 border-sidebar-accent" : "border-border"
|
79
81
|
),
|
80
82
|
disabled: T,
|
81
83
|
children: [
|
82
|
-
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children:
|
83
|
-
|
84
|
+
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: o ? ((L = p.find((e) => e.value === o)) == null ? void 0 : L.label) || (b == null ? void 0 : b.label) : /* @__PURE__ */ a("span", { className: "text-gray-400", children: D }) }),
|
85
|
+
o ? /* @__PURE__ */ a(
|
84
86
|
"div",
|
85
87
|
{
|
86
88
|
className: h(
|
@@ -90,58 +92,58 @@ const ue = (O) => {
|
|
90
92
|
"opacity-50 cursor-pointer hover:opacity-100"
|
91
93
|
),
|
92
94
|
onClick: (e) => {
|
93
|
-
e.stopPropagation(),
|
95
|
+
e.stopPropagation(), z();
|
94
96
|
},
|
95
|
-
children: /* @__PURE__ */ a(
|
97
|
+
children: /* @__PURE__ */ a(ae, {})
|
96
98
|
}
|
97
|
-
) : /* @__PURE__ */ a(
|
99
|
+
) : /* @__PURE__ */ a(te, { className: "opacity-50 w-4 h-4" })
|
98
100
|
]
|
99
101
|
}
|
100
102
|
) }),
|
101
103
|
/* @__PURE__ */ a(
|
102
|
-
|
104
|
+
J,
|
103
105
|
{
|
104
106
|
className: "w-[var(--radix-popper-anchor-width)] max-w-none p-0",
|
105
107
|
align: "start",
|
106
|
-
children: /* @__PURE__ */
|
108
|
+
children: /* @__PURE__ */ r(Q, { shouldFilter: !1, children: [
|
107
109
|
/* @__PURE__ */ a(
|
108
|
-
|
110
|
+
W,
|
109
111
|
{
|
110
112
|
placeholder: B,
|
111
113
|
value: m,
|
112
|
-
onValueChange:
|
114
|
+
onValueChange: _
|
113
115
|
}
|
114
116
|
),
|
115
|
-
/* @__PURE__ */ a(
|
116
|
-
|
117
|
+
/* @__PURE__ */ a(Y, { children: /* @__PURE__ */ r(
|
118
|
+
Z,
|
117
119
|
{
|
118
|
-
className: h(!
|
120
|
+
className: h(!p.length && "p-0 shadow-none"),
|
119
121
|
children: [
|
120
|
-
g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(
|
121
|
-
!g && !!m && /* @__PURE__ */ a(
|
122
|
+
g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(V, {}) }),
|
123
|
+
!g && !!m && /* @__PURE__ */ a(G, { children: i ? /* @__PURE__ */ r(j, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
|
122
124
|
/* @__PURE__ */ a("span", { children: C }),
|
123
125
|
typeof i == "function" ? i({
|
124
|
-
setOptions:
|
126
|
+
setOptions: u,
|
125
127
|
search: m || "",
|
126
128
|
open: t,
|
127
129
|
setOpen: d
|
128
130
|
}) : i
|
129
|
-
] }) : /* @__PURE__ */ a(
|
130
|
-
!g && !!
|
131
|
-
|
131
|
+
] }) : /* @__PURE__ */ a(j, { children: C }) }),
|
132
|
+
!g && !!p.length && p.map((e) => /* @__PURE__ */ r(
|
133
|
+
$,
|
132
134
|
{
|
133
135
|
value: e.value,
|
134
136
|
onSelect: () => {
|
135
|
-
|
137
|
+
o === e.value ? v({ value: "", label: "" }) : v(e), d(!1);
|
136
138
|
},
|
137
139
|
children: [
|
138
140
|
e.label,
|
139
141
|
/* @__PURE__ */ a(
|
140
|
-
|
142
|
+
re,
|
141
143
|
{
|
142
144
|
className: h(
|
143
145
|
"ml-auto",
|
144
|
-
|
146
|
+
o === e.value ? "opacity-100" : "opacity-0"
|
145
147
|
)
|
146
148
|
}
|
147
149
|
)
|
@@ -158,7 +160,7 @@ const ue = (O) => {
|
|
158
160
|
]
|
159
161
|
}
|
160
162
|
) });
|
161
|
-
};
|
163
|
+
});
|
162
164
|
export {
|
163
|
-
|
165
|
+
fe as Combobox
|
164
166
|
};
|
package/Command/Command.mjs
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { jsx as t, jsxs as s } from "react/jsx-runtime";
|
2
2
|
import * as m from "react";
|
3
|
+
import "@radix-ui/react-dialog";
|
3
4
|
import { Command as o } from "cmdk";
|
4
5
|
import { Search as p } from "lucide-react";
|
5
6
|
import { cn as r } from "@oneplatformdev/utils";
|
@@ -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/DataTable/DataTable.mjs
CHANGED
@@ -5,8 +5,9 @@ import { DropdownMenu as p, DropdownMenuTrigger as g, DropdownMenuContent as u,
|
|
5
5
|
import { Table as f, TableHeader as w, TableRow as t, TableHead as x, TableBody as b, TableCell as d } from "../Table/Table.mjs";
|
6
6
|
import { flexRender as a } from "@tanstack/react-table";
|
7
7
|
import { ChevronDown as D } from "lucide-react";
|
8
|
-
|
9
|
-
|
8
|
+
import "react";
|
9
|
+
const I = ({
|
10
|
+
table: n,
|
10
11
|
ToolBar: s,
|
11
12
|
tColumns: c = "Columns",
|
12
13
|
tNoResults: m = "No results"
|
@@ -21,12 +22,12 @@ const y = ({
|
|
21
22
|
" ",
|
22
23
|
/* @__PURE__ */ l(D, { className: "ml-2 h-4 w-4" })
|
23
24
|
] }) }),
|
24
|
-
/* @__PURE__ */ l(u, { align: "end", children:
|
25
|
+
/* @__PURE__ */ l(u, { align: "end", children: n.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
|
25
26
|
C,
|
26
27
|
{
|
27
28
|
className: "capitalize",
|
28
29
|
checked: e.getIsVisible(),
|
29
|
-
onCheckedChange: (
|
30
|
+
onCheckedChange: (r) => e.toggleVisibility(!!r),
|
30
31
|
children: e.id
|
31
32
|
},
|
32
33
|
e.id
|
@@ -34,24 +35,24 @@ const y = ({
|
|
34
35
|
] })
|
35
36
|
] }),
|
36
37
|
/* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(f, { children: [
|
37
|
-
/* @__PURE__ */ l(w, { children:
|
38
|
-
|
39
|
-
|
40
|
-
) },
|
41
|
-
/* @__PURE__ */ l(b, { children: (o =
|
38
|
+
/* @__PURE__ */ l(w, { children: n.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((r) => /* @__PURE__ */ l(x, { children: r.isPlaceholder ? null : a(
|
39
|
+
r.column.columnDef.header,
|
40
|
+
r.getContext()
|
41
|
+
) }, r.id)) }, e.id)) }),
|
42
|
+
/* @__PURE__ */ l(b, { children: (o = n.getRowModel().rows) != null && o.length ? n.getRowModel().rows.map((e) => /* @__PURE__ */ l(
|
42
43
|
t,
|
43
44
|
{
|
44
45
|
"data-state": e.getIsSelected() && "selected",
|
45
|
-
children: e.getVisibleCells().map((
|
46
|
-
|
47
|
-
|
48
|
-
) },
|
46
|
+
children: e.getVisibleCells().map((r) => /* @__PURE__ */ l(d, { children: a(
|
47
|
+
r.column.columnDef.cell,
|
48
|
+
r.getContext()
|
49
|
+
) }, r.id))
|
49
50
|
},
|
50
51
|
e.id
|
51
52
|
)) : /* @__PURE__ */ l(t, { children: /* @__PURE__ */ l(
|
52
53
|
d,
|
53
54
|
{
|
54
|
-
colSpan:
|
55
|
+
colSpan: n.getAllColumns().length,
|
55
56
|
className: "h-24 text-center",
|
56
57
|
children: m
|
57
58
|
}
|
@@ -60,5 +61,5 @@ const y = ({
|
|
60
61
|
] });
|
61
62
|
};
|
62
63
|
export {
|
63
|
-
|
64
|
+
I as DataTable
|
64
65
|
};
|
package/Dialog/Dialog.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as React from
|
2
|
-
import * as DialogPrimitive from
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
3
3
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
4
4
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
5
5
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
package/Dialog/Dialog.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsx as o, jsxs as
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
2
2
|
import * as l from "react";
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
4
4
|
import { X as c } from "lucide-react";
|
5
5
|
import { cn as i } from "@oneplatformdev/utils";
|
6
|
-
const b = e.Root, h = e.Trigger, m = e.Portal,
|
6
|
+
const b = e.Root, h = e.Trigger, m = e.Portal, w = e.Close, n = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
7
7
|
e.Overlay,
|
8
8
|
{
|
9
9
|
ref: s,
|
@@ -14,21 +14,23 @@ const b = e.Root, h = e.Trigger, m = e.Portal, v = e.Close, d = l.forwardRef(({
|
|
14
14
|
...t
|
15
15
|
}
|
16
16
|
));
|
17
|
-
|
18
|
-
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */
|
19
|
-
/* @__PURE__ */ o(
|
20
|
-
/* @__PURE__ */
|
17
|
+
n.displayName = e.Overlay.displayName;
|
18
|
+
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ d(m, { children: [
|
19
|
+
/* @__PURE__ */ o(n, {}),
|
20
|
+
/* @__PURE__ */ d(
|
21
21
|
e.Content,
|
22
22
|
{
|
23
23
|
ref: r,
|
24
24
|
className: i(
|
25
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
|
+
"max-w-[90%] max-h-[90%] overflow-hidden",
|
27
|
+
"bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
|
26
28
|
a
|
27
29
|
),
|
28
30
|
...s,
|
29
31
|
children: [
|
30
32
|
t,
|
31
|
-
/* @__PURE__ */
|
33
|
+
/* @__PURE__ */ d(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
34
|
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
33
35
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
34
36
|
] })
|
@@ -77,7 +79,7 @@ const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
77
79
|
}
|
78
80
|
));
|
79
81
|
u.displayName = e.Title.displayName;
|
80
|
-
const
|
82
|
+
const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
81
83
|
e.Description,
|
82
84
|
{
|
83
85
|
ref: s,
|
@@ -85,15 +87,15 @@ const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
85
87
|
...t
|
86
88
|
}
|
87
89
|
));
|
88
|
-
|
90
|
+
x.displayName = e.Description.displayName;
|
89
91
|
export {
|
90
92
|
b as Dialog,
|
91
|
-
|
93
|
+
w as DialogClose,
|
92
94
|
f as DialogContent,
|
93
|
-
|
95
|
+
x as DialogDescription,
|
94
96
|
g as DialogFooter,
|
95
97
|
p as DialogHeader,
|
96
|
-
|
98
|
+
n as DialogOverlay,
|
97
99
|
m as DialogPortal,
|
98
100
|
u as DialogTitle,
|
99
101
|
h as DialogTrigger
|
package/Dropzone/Dropzone.mjs
CHANGED
@@ -4,7 +4,7 @@ import { useDropzone as O } from "react-dropzone";
|
|
4
4
|
import { Card as X } from "../Card/Card.mjs";
|
5
5
|
import { X as Y } from "lucide-react";
|
6
6
|
import { cn as f } from "@oneplatformdev/utils";
|
7
|
-
import { F as q, D as G } from "../DropzoneFilePreview-
|
7
|
+
import { F as q, D as G } from "../DropzoneFilePreview-C-SoCoO0.js";
|
8
8
|
import { DefaultFileIcon as H, isFile as u, extractName as J } from "./DropzoneUtils.mjs";
|
9
9
|
import { DropzoneSinglePickPreview as K } from "./DropzoneSinglePickPreview.mjs";
|
10
10
|
const Q = j(
|