@oneplatformdev/ui 0.0.1-beta.12 → 0.0.1-beta.121
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/Accordion/Accordion.d.ts +5 -3
- package/Accordion/Accordion.mjs +27 -24
- package/AlertDialog/AlertDialogRoot.d.ts +2 -2
- package/AlertDialog/AlertDialogRoot.mjs +7 -7
- package/Button/Button.mjs +11 -10
- package/Button/buttonVariants.mjs +14 -8
- package/Calendar/Calendar.mjs +3 -2
- package/Card/Card.d.ts +1 -1
- package/Card/Card.mjs +24 -23
- 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 +1 -0
- package/Checkbox/index.mjs +3 -2
- package/Combobox/Combobox.d.ts +2 -2
- package/Combobox/Combobox.mjs +12 -123
- package/Combobox/Combobox.types.d.ts +36 -1
- package/Combobox/ComboboxOptionItem.d.ts +5 -0
- package/Combobox/ComboboxOptionItem.mjs +69 -0
- package/Combobox/ComboboxOptions.d.ts +4 -0
- package/Combobox/ComboboxOptions.mjs +12 -0
- package/Combobox/index.mjs +1 -1
- package/Combobox-CkGEIfTD.js +325 -0
- package/Command/Command.d.ts +1 -1
- package/Command/Command.mjs +15 -7
- package/DataTable/DataTable.d.ts +10 -3
- package/DataTable/DataTable.mjs +33 -33
- package/DataTable/DataTableColumnFilter.d.ts +4 -0
- package/DataTable/DataTableColumnFilter.mjs +31 -0
- package/DatePicker/DatePicker.mjs +2 -2
- package/Dialog/Dialog.d.ts +6 -3
- package/Dialog/Dialog.mjs +100 -64
- package/Dialog/DialogOverlayScope.d.ts +8 -0
- package/Dialog/DialogOverlayScope.mjs +7 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.mjs +10 -8
- package/DropdownMenu/DropdownMenu.d.ts +2 -2
- package/DropdownMenu/DropdownMenu.mjs +30 -26
- package/Dropzone/Dropzone.d.ts +16 -10
- package/Dropzone/Dropzone.mjs +146 -113
- package/Dropzone/Dropzone.types.d.ts +33 -10
- package/Dropzone/DropzoneFilePreview.d.ts +4 -0
- package/Dropzone/DropzoneFilePreview.mjs +9 -0
- package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
- package/Dropzone/DropzoneSinglePickPreview.mjs +44 -0
- package/Dropzone/DropzoneUtils.d.ts +5 -0
- package/Dropzone/DropzoneUtils.mjs +24 -0
- package/Dropzone/index.mjs +1 -1
- package/DropzoneFilePreview-Dhtv8F4u.js +67 -0
- package/Form/Form.d.ts +2 -2
- package/Form/Form.mjs +48 -45
- package/Form/FormRenderControl.d.ts +2 -3
- package/Form/FormRenderControl.mjs +10 -10
- package/Form/FormRenderControl.types.d.ts +5 -7
- package/FormCheckbox/FormCheckbox.d.ts +2 -3
- package/FormCheckbox/FormCheckbox.mjs +23 -23
- package/FormCheckbox/FormCheckbox.types.d.ts +3 -3
- package/FormCombobox/FormCombobox.d.ts +2 -2
- package/FormCombobox/FormCombobox.mjs +6 -6
- package/FormCombobox/FormCombobox.types.d.ts +2 -3
- package/FormDatePicker/FormDatePicker.d.ts +2 -2
- package/FormDatePicker/FormDatePicker.mjs +20 -18
- package/FormDatePicker/FormDatePicker.types.d.ts +2 -3
- package/FormDropzone/FormDropzone.d.ts +4 -0
- package/FormDropzone/FormDropzone.mjs +19 -0
- package/FormDropzone/FormDropzone.types.d.ts +6 -0
- package/FormDropzone/index.d.ts +2 -0
- package/FormDropzone/index.mjs +4 -0
- package/FormDropzone/package.json +7 -0
- package/FormInput/FormInput.d.ts +5 -3
- package/FormInput/FormInput.mjs +37 -16
- package/FormInput/FormInput.types.d.ts +2 -3
- package/FormRadio/FormRadio.d.ts +4 -0
- package/FormRadio/FormRadio.mjs +40 -0
- package/FormRadio/FormRadio.types.d.ts +6 -0
- package/FormRadio/index.d.ts +2 -0
- package/FormRadio/index.mjs +4 -0
- package/FormRadio/package.json +7 -0
- package/FormSelect/FormSelect.d.ts +2 -3
- package/FormSelect/FormSelect.mjs +19 -17
- package/FormSelect/FormSelect.types.d.ts +2 -3
- package/FormTextarea/FormTextarea.d.ts +2 -3
- package/FormTextarea/FormTextarea.mjs +13 -12
- package/FormTextarea/FormTextarea.types.d.ts +2 -3
- package/Input/Input.mjs +50 -38
- package/Input/Input.types.d.ts +6 -2
- package/Input/inputVariants.mjs +9 -3
- package/Label/Label.d.ts +2 -2
- package/Label/labelVariants.mjs +7 -4
- package/LazyLoader/LazyLoader.mjs +5 -4
- package/LoadedIcon/LoadedIcon.d.ts +11 -0
- package/LoadedIcon/LoadedIcon.mjs +27 -0
- package/LoadedIcon/index.d.ts +1 -0
- package/LoadedIcon/index.mjs +4 -0
- package/LoadedIcon/package.json +7 -0
- package/LoadingMask/LoadingMask.d.ts +4 -1
- package/LoadingMask/LoadingMask.mjs +18 -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/Popover/Popover.d.ts +3 -3
- package/Popover/Popover.mjs +30 -21
- package/Radio/Radio.d.ts +4 -0
- package/Radio/Radio.mjs +12 -0
- package/Radio/Radio.types.d.ts +11 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.mjs +4 -0
- package/Radio/package.json +7 -0
- package/RadioGroup/RadioGroup.d.ts +9 -3
- package/RadioGroup/RadioGroup.mjs +37 -19
- package/RadioGroup/index.mjs +4 -3
- package/ScrollArea/ScrollArea.d.ts +2 -2
- package/ScrollArea/ScrollArea.mjs +26 -13
- package/Search/Search.d.ts +1 -2
- package/Search/Search.mjs +36 -21
- package/Search/Search.types.d.ts +1 -0
- package/Select/Select.mjs +94 -63
- package/Select/Select.types.d.ts +11 -3
- package/Select/SelectRoot.d.ts +2 -2
- package/Select/SelectRoot.mjs +29 -24
- package/Sheet/Sheet.d.ts +5 -2
- package/Sheet/Sheet.mjs +33 -33
- package/TablePagination/TablePagination.d.ts +16 -0
- package/TablePagination/TablePagination.mjs +74 -0
- package/TablePagination/index.d.ts +1 -0
- package/TablePagination/index.mjs +4 -0
- package/TablePagination/package.json +7 -0
- package/Tabs/Tabs.d.ts +3 -2
- package/Tabs/Tabs.mjs +20 -6
- package/Tabs/Tabs.types.d.ts +5 -2
- package/Tabs/index.mjs +8 -7
- package/Textarea/Textarea.d.ts +1 -1
- package/Textarea/Textarea.mjs +72 -15
- package/Textarea/Textarea.types.d.ts +16 -2
- package/Textarea/useAutosizeTextArea.d.ts +3 -0
- package/Textarea/useAutosizeTextArea.mjs +20 -0
- package/Toast/toastVariants.mjs +3 -3
- package/index.css +1 -1
- package/index.d.ts +3 -0
- package/index.mjs +304 -291
- package/package.json +6 -6
- package/tailwind.config.mjs +13 -13
- package/Dropzone/FilePreview.d.ts +0 -15
- package/Dropzone/FilePreview.mjs +0 -7
- package/FilePreview-C6IeuOqo.js +0 -40
package/Select/SelectRoot.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-select";
|
|
4
|
-
import { ChevronDown as i, ChevronUp as
|
|
4
|
+
import { ChevronDown as i, ChevronUp as u, Check as h } from "lucide-react";
|
|
5
5
|
import { cn as s } from "@oneplatformdev/utils";
|
|
6
|
-
const
|
|
6
|
+
const R = e.Root, C = e.Group, I = e.Value, w = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
|
|
7
7
|
e.Trigger,
|
|
8
8
|
{
|
|
9
9
|
ref: d,
|
|
10
10
|
className: s(
|
|
11
|
-
"flex h-
|
|
11
|
+
"flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
12
|
+
"[&>svg]:disabled:hidden",
|
|
12
13
|
o
|
|
13
14
|
),
|
|
14
15
|
...a,
|
|
@@ -18,7 +19,7 @@ const v = e.Root, R = e.Group, C = e.Value, h = l.forwardRef(({ className: o, ch
|
|
|
18
19
|
]
|
|
19
20
|
}
|
|
20
21
|
));
|
|
21
|
-
|
|
22
|
+
w.displayName = e.Trigger.displayName;
|
|
22
23
|
const c = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
23
24
|
e.ScrollUpButton,
|
|
24
25
|
{
|
|
@@ -28,7 +29,7 @@ const c = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
28
29
|
o
|
|
29
30
|
),
|
|
30
31
|
...r,
|
|
31
|
-
children: /* @__PURE__ */ t(
|
|
32
|
+
children: /* @__PURE__ */ t(u, { className: "h-4 w-4" })
|
|
32
33
|
}
|
|
33
34
|
));
|
|
34
35
|
c.displayName = e.ScrollUpButton.displayName;
|
|
@@ -45,17 +46,21 @@ const m = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
45
46
|
}
|
|
46
47
|
));
|
|
47
48
|
m.displayName = e.ScrollDownButton.displayName;
|
|
48
|
-
const
|
|
49
|
+
const y = l.forwardRef(({ className: o, children: r, position: a = "popper", style: d, ...p }, f) => /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ n(
|
|
49
50
|
e.Content,
|
|
50
51
|
{
|
|
51
|
-
ref:
|
|
52
|
+
ref: f,
|
|
52
53
|
className: s(
|
|
53
54
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
54
55
|
a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
55
56
|
o
|
|
56
57
|
),
|
|
57
58
|
position: a,
|
|
58
|
-
|
|
59
|
+
style: {
|
|
60
|
+
pointerEvents: "auto",
|
|
61
|
+
...d
|
|
62
|
+
},
|
|
63
|
+
...p,
|
|
59
64
|
children: [
|
|
60
65
|
/* @__PURE__ */ t(c, {}),
|
|
61
66
|
/* @__PURE__ */ t(
|
|
@@ -72,8 +77,8 @@ const w = l.forwardRef(({ className: o, children: r, position: a = "popper", ...
|
|
|
72
77
|
]
|
|
73
78
|
}
|
|
74
79
|
) }));
|
|
75
|
-
|
|
76
|
-
const
|
|
80
|
+
y.displayName = e.Content.displayName;
|
|
81
|
+
const g = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
77
82
|
e.Label,
|
|
78
83
|
{
|
|
79
84
|
ref: a,
|
|
@@ -81,8 +86,8 @@ const y = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
81
86
|
...r
|
|
82
87
|
}
|
|
83
88
|
));
|
|
84
|
-
|
|
85
|
-
const
|
|
89
|
+
g.displayName = e.Label.displayName;
|
|
90
|
+
const N = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
|
|
86
91
|
e.Item,
|
|
87
92
|
{
|
|
88
93
|
ref: d,
|
|
@@ -92,13 +97,13 @@ const g = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__
|
|
|
92
97
|
),
|
|
93
98
|
...a,
|
|
94
99
|
children: [
|
|
95
|
-
/* @__PURE__ */ t("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t(e.ItemIndicator, { children: /* @__PURE__ */ t(
|
|
100
|
+
/* @__PURE__ */ t("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t(e.ItemIndicator, { children: /* @__PURE__ */ t(h, { className: "h-4 w-4" }) }) }),
|
|
96
101
|
/* @__PURE__ */ t(e.ItemText, { children: r })
|
|
97
102
|
]
|
|
98
103
|
}
|
|
99
104
|
));
|
|
100
|
-
|
|
101
|
-
const
|
|
105
|
+
N.displayName = e.Item.displayName;
|
|
106
|
+
const x = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
102
107
|
e.Separator,
|
|
103
108
|
{
|
|
104
109
|
ref: a,
|
|
@@ -106,16 +111,16 @@ const N = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
106
111
|
...r
|
|
107
112
|
}
|
|
108
113
|
));
|
|
109
|
-
|
|
114
|
+
x.displayName = e.Separator.displayName;
|
|
110
115
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
y as SelectContent,
|
|
117
|
+
C as SelectGroup,
|
|
118
|
+
N as SelectItem,
|
|
119
|
+
g as SelectLabel,
|
|
120
|
+
R as SelectRoot,
|
|
116
121
|
m as SelectScrollDownButton,
|
|
117
122
|
c as SelectScrollUpButton,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
x as SelectSeparator,
|
|
124
|
+
w as SelectTrigger,
|
|
125
|
+
I as SelectValue
|
|
121
126
|
};
|
package/Sheet/Sheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from
|
|
3
|
-
import * as SheetPrimitive from
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
4
|
declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
|
|
5
5
|
declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -10,6 +10,9 @@ declare const sheetVariants: (props?: ({
|
|
|
10
10
|
side?: "top" | "right" | "bottom" | "left" | null | undefined;
|
|
11
11
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
12
12
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
|
+
slotProps?: {
|
|
14
|
+
overlay?: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>;
|
|
15
|
+
};
|
|
13
16
|
}
|
|
14
17
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
18
|
declare const SheetHeader: {
|
package/Sheet/Sheet.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { X as
|
|
4
|
+
import { cva as f } from "class-variance-authority";
|
|
5
|
+
import { X as p } from "lucide-react";
|
|
6
6
|
import { cn as i } from "@oneplatformdev/utils";
|
|
7
|
-
const
|
|
7
|
+
const R = e.Root, T = e.Trigger, j = e.Close, h = e.Portal, l = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
8
8
|
e.Overlay,
|
|
9
9
|
{
|
|
10
10
|
className: i(
|
|
@@ -15,8 +15,8 @@ const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({
|
|
|
15
15
|
ref: s
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
l.displayName = e.Overlay.displayName;
|
|
19
|
+
const g = f(
|
|
20
20
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
21
21
|
{
|
|
22
22
|
variants: {
|
|
@@ -31,17 +31,17 @@ const h = c(
|
|
|
31
31
|
side: "right"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ o(
|
|
36
|
-
/* @__PURE__ */
|
|
34
|
+
), u = r.forwardRef(({ side: t = "right", className: a, children: s, slotProps: n, ...m }, c) => /* @__PURE__ */ d(h, { children: [
|
|
35
|
+
/* @__PURE__ */ o(l, { ...(n == null ? void 0 : n.overlay) || {} }),
|
|
36
|
+
/* @__PURE__ */ d(
|
|
37
37
|
e.Content,
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
40
|
-
className: i(
|
|
41
|
-
...
|
|
39
|
+
ref: c,
|
|
40
|
+
className: i(g({ side: t }), a),
|
|
41
|
+
...m,
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ o(
|
|
43
|
+
/* @__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-secondary", children: [
|
|
44
|
+
/* @__PURE__ */ o(p, { className: "h-4 w-4" }),
|
|
45
45
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
46
46
|
] }),
|
|
47
47
|
s
|
|
@@ -49,8 +49,8 @@ const h = c(
|
|
|
49
49
|
}
|
|
50
50
|
)
|
|
51
51
|
] }));
|
|
52
|
-
|
|
53
|
-
const
|
|
52
|
+
u.displayName = e.Content.displayName;
|
|
53
|
+
const y = ({
|
|
54
54
|
className: t,
|
|
55
55
|
...a
|
|
56
56
|
}) => /* @__PURE__ */ o(
|
|
@@ -63,8 +63,8 @@ const u = ({
|
|
|
63
63
|
...a
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
|
-
|
|
67
|
-
const
|
|
66
|
+
y.displayName = "SheetHeader";
|
|
67
|
+
const x = ({
|
|
68
68
|
className: t,
|
|
69
69
|
...a
|
|
70
70
|
}) => /* @__PURE__ */ o(
|
|
@@ -77,8 +77,8 @@ const y = ({
|
|
|
77
77
|
...a
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
const
|
|
80
|
+
x.displayName = "SheetFooter";
|
|
81
|
+
const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
82
82
|
e.Title,
|
|
83
83
|
{
|
|
84
84
|
ref: s,
|
|
@@ -86,8 +86,8 @@ const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
|
86
86
|
...a
|
|
87
87
|
}
|
|
88
88
|
));
|
|
89
|
-
|
|
90
|
-
const
|
|
89
|
+
N.displayName = e.Title.displayName;
|
|
90
|
+
const b = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
91
91
|
e.Description,
|
|
92
92
|
{
|
|
93
93
|
ref: s,
|
|
@@ -95,16 +95,16 @@ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
|
95
95
|
...a
|
|
96
96
|
}
|
|
97
97
|
));
|
|
98
|
-
|
|
98
|
+
b.displayName = e.Description.displayName;
|
|
99
99
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
R as Sheet,
|
|
101
|
+
j as SheetClose,
|
|
102
|
+
u as SheetContent,
|
|
103
|
+
b as SheetDescription,
|
|
104
|
+
x as SheetFooter,
|
|
105
|
+
y as SheetHeader,
|
|
106
|
+
l as SheetOverlay,
|
|
107
|
+
h as SheetPortal,
|
|
108
|
+
N as SheetTitle,
|
|
109
|
+
T as SheetTrigger
|
|
110
110
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
|
|
3
|
+
interface IProps {
|
|
4
|
+
limit: number;
|
|
5
|
+
offset: number;
|
|
6
|
+
totalRows: number;
|
|
7
|
+
setLimit: (limit: number) => void;
|
|
8
|
+
setOffset: (offset: number) => void;
|
|
9
|
+
tRowsPerPage?: string;
|
|
10
|
+
tPrevious?: string;
|
|
11
|
+
tPage?: string;
|
|
12
|
+
tNext?: string;
|
|
13
|
+
tOf?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TablePagination: FC<IProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Button as i } from "../Button/Button.mjs";
|
|
3
|
+
import "../Button/buttonVariants.mjs";
|
|
4
|
+
import "../Select/SelectRoot.mjs";
|
|
5
|
+
import { Select as P } from "../Select/Select.mjs";
|
|
6
|
+
const y = ({
|
|
7
|
+
offset: l,
|
|
8
|
+
limit: a,
|
|
9
|
+
totalRows: s,
|
|
10
|
+
setLimit: p,
|
|
11
|
+
setOffset: t,
|
|
12
|
+
tRowsPerPage: d = "Rows per page",
|
|
13
|
+
tPrevious: u = "Previous",
|
|
14
|
+
tPage: x = "Page",
|
|
15
|
+
tNext: v = "Next",
|
|
16
|
+
tOf: h = "Of"
|
|
17
|
+
}) => {
|
|
18
|
+
const r = Math.ceil(l / a) + 1, o = Math.ceil(s / a), m = r === o, b = (e) => {
|
|
19
|
+
t(0), p(parseInt(e));
|
|
20
|
+
}, g = () => {
|
|
21
|
+
let e = l - a;
|
|
22
|
+
e < 0 && (e = 0), t(e);
|
|
23
|
+
}, N = () => {
|
|
24
|
+
let e = l + a;
|
|
25
|
+
e > s && (e = s - a), t(e);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ c("div", { className: "flex items-center justify-end space-x-2 py-4", children: [
|
|
28
|
+
/* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
|
|
29
|
+
/* @__PURE__ */ n("span", { className: "text-sm text-nowrap", children: d }),
|
|
30
|
+
/* @__PURE__ */ n(
|
|
31
|
+
P,
|
|
32
|
+
{
|
|
33
|
+
value: a == null ? void 0 : a.toString(),
|
|
34
|
+
options: [
|
|
35
|
+
{ value: "5", label: "5" },
|
|
36
|
+
{ value: "10", label: "10" },
|
|
37
|
+
{ value: "20", label: "20" },
|
|
38
|
+
{ value: "30", label: "30" },
|
|
39
|
+
{ value: "50", label: "50" }
|
|
40
|
+
],
|
|
41
|
+
onChange: b,
|
|
42
|
+
placeholder: "6",
|
|
43
|
+
nullable: !1
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
] }),
|
|
47
|
+
/* @__PURE__ */ c("div", { className: "space-x-2", children: [
|
|
48
|
+
/* @__PURE__ */ n(
|
|
49
|
+
i,
|
|
50
|
+
{
|
|
51
|
+
variant: "outline",
|
|
52
|
+
size: "sm",
|
|
53
|
+
disabled: !l,
|
|
54
|
+
onClick: g,
|
|
55
|
+
children: u
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ n("span", { className: "text-sm", children: `${x} ${r} ${h} ${o}` }),
|
|
59
|
+
/* @__PURE__ */ n(
|
|
60
|
+
i,
|
|
61
|
+
{
|
|
62
|
+
variant: "outline",
|
|
63
|
+
size: "sm",
|
|
64
|
+
disabled: m,
|
|
65
|
+
onClick: N,
|
|
66
|
+
children: v
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] })
|
|
70
|
+
] });
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
y as TablePagination
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TablePagination';
|
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TabsProps } from './Tabs.types';
|
|
2
|
-
import { FC } from 'react';
|
|
2
|
+
import { FC, PropsWithChildren } from 'react';
|
|
3
3
|
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const TabRender: FC<TabsProps>;
|
|
5
|
+
export declare const Tabs: FC<PropsWithChildren<TabsProps>>;
|
package/Tabs/Tabs.mjs
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Children as p } from "react";
|
|
3
|
+
import { TabsContent as m, TabsRoot as b, TabsList as i, TabsTrigger as h } from "./TabsRoot.mjs";
|
|
4
|
+
const T = (a) => {
|
|
5
|
+
const { tabs: s = [], contents: t } = a;
|
|
6
|
+
return p.map(t, (n, r) => {
|
|
7
|
+
var l;
|
|
8
|
+
if (!n || !s[r]) return null;
|
|
9
|
+
const e = (l = s[r]) == null ? void 0 : l.value, u = n.props || {};
|
|
10
|
+
return /* @__PURE__ */ o(m, { value: e, ...u, children: n }, e);
|
|
11
|
+
});
|
|
12
|
+
}, f = (a) => {
|
|
13
|
+
const { tab: s, tabs: t = [], onChange: n, children: r } = a;
|
|
14
|
+
return /* @__PURE__ */ c(b, { value: s, onValueChange: n, children: [
|
|
15
|
+
/* @__PURE__ */ o(i, { className: "px-2 py-6 bg-[#E0E7FF] rounded-[6px]", children: t.map((e) => /* @__PURE__ */ o(h, { value: e.value, className: "h-8", children: e.label }, e.value)) }),
|
|
16
|
+
r,
|
|
17
|
+
!r && /* @__PURE__ */ o(T, { ...a })
|
|
18
|
+
] });
|
|
6
19
|
};
|
|
7
20
|
export {
|
|
8
|
-
|
|
21
|
+
T as TabRender,
|
|
22
|
+
f as Tabs
|
|
9
23
|
};
|
package/Tabs/Tabs.types.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
|
|
1
3
|
export interface TabItemProps {
|
|
2
4
|
value: string;
|
|
3
5
|
label: string;
|
|
4
6
|
}
|
|
5
7
|
export interface TabsProps {
|
|
6
8
|
tabs: TabItemProps[];
|
|
7
|
-
tab
|
|
8
|
-
onChange
|
|
9
|
+
tab?: string;
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
contents?: ReactElement[];
|
|
9
12
|
}
|
package/Tabs/index.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TabsContent as
|
|
2
|
-
import { Tabs as
|
|
1
|
+
import { TabsContent as T, TabsList as a, TabsRoot as b, TabsTrigger as e } from "./TabsRoot.mjs";
|
|
2
|
+
import { TabRender as t, Tabs as n } from "./Tabs.mjs";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
t as TabRender,
|
|
5
|
+
n as Tabs,
|
|
6
|
+
T as TabsContent,
|
|
7
|
+
a as TabsList,
|
|
8
|
+
b as TabsRoot,
|
|
9
|
+
e as TabsTrigger
|
|
9
10
|
};
|
package/Textarea/Textarea.d.ts
CHANGED
package/Textarea/Textarea.mjs
CHANGED
|
@@ -1,18 +1,75 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as u, Fragment as h, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { useId as w, useRef as z, useState as A, useImperativeHandle as F, useEffect as N } from "react";
|
|
4
|
+
import { cn as d } from "@oneplatformdev/utils";
|
|
5
|
+
import { useAutosizeTextArea as y } from "./useAutosizeTextArea.mjs";
|
|
6
|
+
const S = v.forwardRef(
|
|
7
|
+
(m, c) => {
|
|
8
|
+
const {
|
|
9
|
+
className: f,
|
|
10
|
+
value: r = "",
|
|
11
|
+
maxHeight: o = Number.MAX_SAFE_INTEGER,
|
|
12
|
+
minHeight: i = 0,
|
|
13
|
+
resizeble: x = !0,
|
|
14
|
+
counter: n = !1,
|
|
15
|
+
id: s = "",
|
|
16
|
+
...e
|
|
17
|
+
} = m, a = w(), t = z(null), [g, b] = A("");
|
|
18
|
+
return y({
|
|
19
|
+
textAreaRef: t,
|
|
20
|
+
triggerAutoSize: g,
|
|
21
|
+
maxHeight: o,
|
|
22
|
+
minHeight: i
|
|
23
|
+
}), F(c, () => ({
|
|
24
|
+
...t.current ?? {},
|
|
25
|
+
textArea: t.current,
|
|
26
|
+
focus: () => {
|
|
27
|
+
var l;
|
|
28
|
+
return (l = t == null ? void 0 : t.current) == null ? void 0 : l.focus();
|
|
29
|
+
},
|
|
30
|
+
maxHeight: o,
|
|
31
|
+
minHeight: i
|
|
32
|
+
})), N(() => {
|
|
33
|
+
b(r);
|
|
34
|
+
}, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(h, { children: [
|
|
35
|
+
/* @__PURE__ */ p(
|
|
36
|
+
"textarea",
|
|
37
|
+
{
|
|
38
|
+
id: s || a,
|
|
39
|
+
...e,
|
|
40
|
+
ref: t,
|
|
41
|
+
value: r,
|
|
42
|
+
className: d(
|
|
43
|
+
"flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm",
|
|
44
|
+
"rounded-[12px] border border-input bg-[#FCFCFC] shadow-none",
|
|
45
|
+
"placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
46
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
47
|
+
x ? "resize" : "resize-none !overflow-hidden",
|
|
48
|
+
n && "pb-2",
|
|
49
|
+
f
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
n && /* @__PURE__ */ u(
|
|
54
|
+
"label",
|
|
55
|
+
{
|
|
56
|
+
htmlFor: s || a,
|
|
57
|
+
className: d(
|
|
58
|
+
"w-full text-right inline-flex items-center justify-end",
|
|
59
|
+
"text-sm font-normal text-muted-foreground",
|
|
60
|
+
"leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
61
|
+
),
|
|
62
|
+
children: [
|
|
63
|
+
String(r || "").length,
|
|
64
|
+
" / ",
|
|
65
|
+
e == null ? void 0 : e.maxLength
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] });
|
|
13
70
|
}
|
|
14
|
-
)
|
|
15
|
-
|
|
71
|
+
);
|
|
72
|
+
S.displayName = "Textarea";
|
|
16
73
|
export {
|
|
17
|
-
|
|
74
|
+
S as Textarea
|
|
18
75
|
};
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, RefObject } from 'react';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface IUseAutosizeTextAreaProps {
|
|
4
|
+
textAreaRef: RefObject<HTMLTextAreaElement | null>;
|
|
5
|
+
triggerAutoSize: string;
|
|
6
|
+
/**
|
|
7
|
+
* The minimum height of the textarea.
|
|
8
|
+
*/
|
|
9
|
+
minHeight?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The maximum height of the textarea.
|
|
12
|
+
*/
|
|
13
|
+
maxHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface TextareaProps extends ComponentProps<'textarea'>, Pick<IUseAutosizeTextAreaProps, 'minHeight' | 'maxHeight'> {
|
|
16
|
+
resizeble?: boolean;
|
|
17
|
+
counter?: boolean;
|
|
4
18
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
const u = ({
|
|
3
|
+
textAreaRef: r,
|
|
4
|
+
triggerAutoSize: l,
|
|
5
|
+
maxHeight: t = Number.MAX_SAFE_INTEGER,
|
|
6
|
+
minHeight: s = 0
|
|
7
|
+
}) => {
|
|
8
|
+
const [c, i] = f.useState(!0);
|
|
9
|
+
f.useEffect(() => {
|
|
10
|
+
const e = r.current;
|
|
11
|
+
if (e) {
|
|
12
|
+
c && (e.style.minHeight = `${s + 0}px`, t > s && (e.style.maxHeight = `${t}px`), i(!1)), e.style.height = `${s + 0}px`;
|
|
13
|
+
const o = e.scrollHeight;
|
|
14
|
+
o > t ? e.style.height = `${t}px` : e.style.height = `${o + 0}px`;
|
|
15
|
+
}
|
|
16
|
+
}, [r.current, l]);
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
u as useAutosizeTextArea
|
|
20
|
+
};
|
package/Toast/toastVariants.mjs
CHANGED
|
@@ -6,9 +6,9 @@ const a = t(
|
|
|
6
6
|
variant: {
|
|
7
7
|
default: "border bg-background text-foreground",
|
|
8
8
|
destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
|
|
9
|
-
success: "",
|
|
10
|
-
info: "",
|
|
11
|
-
update: ""
|
|
9
|
+
success: "border bg-primary text-white",
|
|
10
|
+
info: "border bg-blue-400 text-white",
|
|
11
|
+
update: "border bg-orange-400 text-white"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
defaultVariants: {
|