@oneplatformdev/ui 0.1.10-3 → 0.1.10-4
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/index.js +7 -0
- package/{ui4.js → Alert/Alert.js} +1 -1
- package/Alert/index.js +6 -0
- package/{ui6.js → AlertDialog/AlertDialog.js} +1 -1
- package/AlertDialog/AlertDialog.stories.js +121 -0
- package/AlertDialog/AlertDialog.types.js +1 -0
- package/{ui5.js → AlertDialog/AlertDialogRoot.js} +33 -32
- package/AlertDialog/index.js +16 -0
- package/{ui7.js → AreaChart/AreaChart.js} +1 -1
- package/AreaChart/AreaChart.types.js +1 -0
- package/AreaChart/index.js +4 -0
- package/{ui8.js → Aside/Aside.js} +1 -1
- package/Aside/Aside.types.js +1 -0
- package/{ui9.js → Aside/AsideSidebar.js} +1 -1
- package/Aside/index.js +7 -0
- package/AspectRatio/index.js +5 -0
- package/Avatar/index.js +6 -0
- package/{ui12.js → Badge/Badge.js} +1 -1
- package/Badge/Badge.types.js +1 -0
- package/Badge/index.js +6 -0
- package/Breadcrumb/index.js +10 -0
- package/{ui15.js → Button/Button.js} +6 -5
- package/Button/Button.stories.js +20 -0
- package/Button/Button.types.js +1 -0
- package/Button/index.js +7 -0
- package/{ui17.js → ButtonIcon/ButtonIcon.js} +5 -4
- package/ButtonIcon/ButtonIcon.stories.js +126 -0
- package/ButtonIcon/ButtonIcon.types.js +1 -0
- package/ButtonIcon/index.js +7 -0
- package/CHANGELOG.md +8 -0
- package/{ui19.js → Calendar/Calendar.js} +2 -1
- package/Calendar/index.js +4 -0
- package/Card/index.js +9 -0
- package/{ui21.js → Carousel/Carousel.js} +7 -6
- package/Carousel/index.js +8 -0
- package/Chart/index.js +9 -0
- package/{ui23.js → Checkbox/Checkbox.js} +19 -18
- package/Checkbox/Checkbox.types.js +1 -0
- package/Checkbox/index.js +5 -0
- package/Collapsible/index.js +6 -0
- package/{ui25.js → Combobox/Combobox.js} +38 -36
- package/Combobox/Combobox.types.js +1 -0
- package/Combobox/ComboboxOptionItem.d.ts +1 -1
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/{ui98.js → Combobox/ComboboxOptionItem.js} +16 -17
- package/Combobox/ComboboxOptions.js +64 -0
- package/Combobox/index.js +4 -0
- package/{ui26.js → Command/Command.js} +20 -19
- package/Command/index.js +12 -0
- package/{ui27.js → DataTable/DataTable.js} +13 -12
- package/DataTable/DataTable.types.js +1 -0
- package/DataTable/DataTableColumnFilter.js +31 -0
- package/DataTable/index.js +4 -0
- package/DataTable/useDataTable.js +30 -0
- package/{ui28.js → DatePicker/DatePicker.js} +15 -14
- package/DatePicker/DatePicker.types.js +1 -0
- package/DatePicker/index.js +5 -0
- package/{ui29.js → Dialog/Dialog.js} +1 -1
- package/Dialog/index.js +17 -0
- package/Drawer/index.js +13 -0
- package/{ui32.js → DropdownMenu/DropdownMenu.js} +5 -5
- package/DropdownMenu/index.js +18 -0
- package/{ui85.js → Dropzone/Dropzone.js} +5 -5
- package/{ui93.js → Dropzone/DropzoneFilePreview.js} +2 -2
- package/{ui94.js → Dropzone/DropzoneSinglePickPreview.js} +1 -1
- package/Dropzone/index.js +7 -0
- package/{ui33.js → Form/Form.js} +9 -8
- package/{ui34.js → Form/FormRenderControl.js} +1 -1
- package/Form/FormRenderControl.types.js +1 -0
- package/Form/index.js +13 -0
- package/{ui35.js → FormCheckbox/FormCheckbox.js} +5 -5
- package/FormCheckbox/FormCheckbox.types.js +1 -0
- package/FormCheckbox/index.js +4 -0
- package/{ui36.js → FormCombobox/FormCombobox.js} +5 -5
- package/FormCombobox/FormCombobox.types.js +1 -0
- package/FormCombobox/index.js +4 -0
- package/{ui37.js → FormDatePicker/FormDatePicker.js} +5 -5
- package/FormDatePicker/FormDatePicker.types.js +1 -0
- package/FormDatePicker/index.js +5 -0
- package/FormDropzone/FormDropzone.js +19 -0
- package/FormDropzone/FormDropzone.types.js +1 -0
- package/FormDropzone/index.js +4 -0
- package/{ui38.js → FormInput/FormInput.js} +7 -7
- package/FormInput/FormInput.types.js +1 -0
- package/FormInput/index.js +4 -0
- package/FormRadio/FormRadio.js +40 -0
- package/FormRadio/FormRadio.types.d.ts +1 -1
- package/FormRadio/FormRadio.types.js +1 -0
- package/FormRadio/index.js +4 -0
- package/FormSelect/FormSelect.js +40 -0
- package/FormSelect/FormSelect.types.js +1 -0
- package/FormSelect/index.js +4 -0
- package/{ui40.js → FormTextarea/FormTextarea.js} +5 -5
- package/FormTextarea/FormTextarea.types.js +1 -0
- package/FormTextarea/index.js +4 -0
- package/{ui41.js → Header/Header.js} +2 -2
- package/Header/Header.types.js +1 -0
- package/Header/index.js +5 -0
- package/HoverCard/index.js +6 -0
- package/{ui43.js → Input/Input.js} +1 -1
- package/Input/Input.types.js +1 -0
- package/Input/index.js +7 -0
- package/InputOTP/index.js +7 -0
- package/{ui45.js → Label/Label.js} +1 -1
- package/Label/index.js +6 -0
- package/LazyLoader/LazyLoader.js +8 -0
- package/LazyLoader/index.js +5 -0
- package/LoadedIcon/index.js +4 -0
- package/{ui49.js → LoadingMask/LoadingMask.js} +1 -1
- package/LoadingMask/LoadingMask.types.js +1 -0
- package/LoadingMask/index.js +6 -0
- package/{ui51.js → LoadingProgress/LoadingProgress.js} +1 -1
- package/LoadingProgress/LoadingProgress.types.js +1 -0
- package/LoadingProgress/index.js +6 -0
- package/{ui53.js → Menubar/Menubar.js} +4 -4
- package/Menubar/index.js +19 -0
- package/{ui54.js → NavigationMenu/NavigationMenu.js} +1 -1
- package/NavigationMenu/index.js +13 -0
- package/{ui56.js → Pagination/Pagination.js} +2 -1
- package/Pagination/index.js +10 -0
- package/{ui57.js → Popover/Popover.js} +1 -1
- package/Popover/index.js +7 -0
- package/Progress/index.js +4 -0
- package/Radio/Radio.js +12 -0
- package/Radio/Radio.types.js +1 -0
- package/Radio/index.js +4 -0
- package/{ui59.js → RadioGroup/RadioGroup.js} +1 -1
- package/RadioGroup/index.js +6 -0
- package/Resizable/index.js +6 -0
- package/ScrollArea/index.js +5 -0
- package/{ui62.js → Search/Search.js} +9 -9
- package/Search/Search.types.js +1 -0
- package/Search/index.js +5 -0
- package/{ui64.js → Select/Select.js} +25 -24
- package/Select/Select.stories.js +41 -0
- package/Select/Select.types.js +1 -0
- package/{ui63.js → Select/SelectRoot.js} +3 -3
- package/Select/index.js +15 -0
- package/Separator/index.js +4 -0
- package/Sheet/index.js +13 -0
- package/{ui67.js → Sidebar/Sidebar.js} +16 -15
- package/Sidebar/index.js +27 -0
- package/Skeleton/index.js +4 -0
- package/Slider/index.js +4 -0
- package/Sonner/index.js +4 -0
- package/Switch/index.js +4 -0
- package/Table/index.js +11 -0
- package/{ui88.js → TablePagination/TablePagination.js} +16 -14
- package/TablePagination/index.js +4 -0
- package/{ui74.js → Tabs/Tabs.js} +1 -1
- package/Tabs/Tabs.types.js +1 -0
- package/Tabs/index.js +10 -0
- package/{ui75.js → Textarea/Textarea.js} +1 -1
- package/Textarea/Textarea.types.js +1 -0
- package/Textarea/index.js +4 -0
- package/Textarea/useAutosizeTextArea.d.ts +1 -1
- package/{ui77.js → Theme/ThemeModeToggle.js} +6 -5
- package/Theme/index.js +6 -0
- package/{ui78.js → Toast/Toast.js} +1 -1
- package/Toast/Toast.types.js +1 -0
- package/Toast/index.js +15 -0
- package/Toast/toast.constants.js +9 -0
- package/{ui80.js → Toaster/Toaster.js} +2 -2
- package/Toaster/index.js +4 -0
- package/Toggle/index.js +5 -0
- package/{ui82.js → ToggleGroup/ToggleGroup.js} +1 -1
- package/ToggleGroup/index.js +5 -0
- package/{ui84.js → Tooltip/Tooltip.js} +1 -1
- package/Tooltip/Tooltip.types.js +1 -0
- package/Tooltip/index.js +9 -0
- package/{ui97.js → hooks/dist/useIsMobile/useIsMobile.js} +5 -5
- package/{ui.js → index.js} +87 -87
- package/package.json +6 -16
- package/ui39.js +0 -39
- package/ui47.js +0 -7
- package/ui87.js +0 -19
- package/ui91.js +0 -63
- /package/{ui3.js → Accordion/Accordion.js} +0 -0
- /package/{ui89.js → Alert/alertVariants.js} +0 -0
- /package/{ui10.js → AspectRatio/AspectRatio.js} +0 -0
- /package/{ui11.js → Avatar/Avatar.js} +0 -0
- /package/{ui13.js → Badge/badgeVariants.js} +0 -0
- /package/{ui14.js → Breadcrumb/Breadcrumb.js} +0 -0
- /package/{ui16.js → Button/buttonVariants.js} +0 -0
- /package/{ui18.js → ButtonIcon/buttonIconVariants.js} +0 -0
- /package/{ui20.js → Card/Card.js} +0 -0
- /package/{ui22.js → Chart/Chart.js} +0 -0
- /package/{ui24.js → Collapsible/Collapsible.js} +0 -0
- /package/{ui30.js → Dialog/DialogOverlayScope.js} +0 -0
- /package/{ui31.js → Drawer/Drawer.js} +0 -0
- /package/{ui86.js → Dropzone/Dropzone.types.js} +0 -0
- /package/{ui95.js → Dropzone/DropzoneUtils.js} +0 -0
- /package/{ui42.js → HoverCard/HoverCard.js} +0 -0
- /package/{ui90.js → Input/inputVariants.js} +0 -0
- /package/{ui44.js → InputOTP/InputOTP.js} +0 -0
- /package/{ui46.js → Label/labelVariants.js} +0 -0
- /package/{ui48.js → LoadedIcon/LoadedIcon.js} +0 -0
- /package/{ui50.js → LoadingMask/RenderLoadingMask.js} +0 -0
- /package/{ui52.js → LoadingProgress/loadingProgressVariants.js} +0 -0
- /package/{ui55.js → NavigationMenu/navigationMenuVariants.js} +0 -0
- /package/{ui58.js → Progress/Progress.js} +0 -0
- /package/{ui60.js → Resizable/Resizable.js} +0 -0
- /package/{ui61.js → ScrollArea/ScrollArea.js} +0 -0
- /package/{ui65.js → Separator/Separator.js} +0 -0
- /package/{ui66.js → Sheet/Sheet.js} +0 -0
- /package/{ui68.js → Skeleton/Skeleton.js} +0 -0
- /package/{ui69.js → Slider/Slider.js} +0 -0
- /package/{ui70.js → Sonner/Sonner.js} +0 -0
- /package/{ui71.js → Switch/Switch.js} +0 -0
- /package/{ui72.js → Table/Table.js} +0 -0
- /package/{ui73.js → Tabs/TabsRoot.js} +0 -0
- /package/{ui96.js → Textarea/useAutosizeTextArea.js} +0 -0
- /package/{ui76.js → Theme/ThemeProvider.js} +0 -0
- /package/{ui92.js → Toast/toastVariants.js} +0 -0
- /package/{ui79.js → Toast/useToast.js} +0 -0
- /package/{ui81.js → Toggle/Toggle.js} +0 -0
- /package/{ui83.js → Tooltip/TooltipRoot.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { cn as l } from "@oneplatformdev/utils";
|
|
4
|
-
import { alertVariants as m } from "./
|
|
4
|
+
import { alertVariants as m } from "./alertVariants.js";
|
|
5
5
|
const s = i.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ a(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
package/Alert/index.js
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { cloneElement as a, useId as j, Children as y } from "react";
|
|
3
|
-
import { AlertDialogRoot as E, AlertDialogContent as u, AlertDialogTrigger as v, AlertDialogHeader as f, AlertDialogTitle as B, AlertDialogDescription as R, AlertDialogFooter as A, AlertDialogAction as D, AlertDialogCancel as k } from "./
|
|
3
|
+
import { AlertDialogRoot as E, AlertDialogContent as u, AlertDialogTrigger as v, AlertDialogHeader as f, AlertDialogTitle as B, AlertDialogDescription as R, AlertDialogFooter as A, AlertDialogAction as D, AlertDialogCancel as k } from "./AlertDialogRoot.js";
|
|
4
4
|
import { isValidReactElement as s } from "@oneplatformdev/utils";
|
|
5
5
|
const F = (o) => {
|
|
6
6
|
const { slotProps: e = {}, children: r } = o, i = e.trigger ?? {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { AlertDialog as n } from "./AlertDialog.js";
|
|
3
|
+
import { Button as l } from "../Button/Button.js";
|
|
4
|
+
import "../Button/buttonVariants.js";
|
|
5
|
+
const c = (e) => /* @__PURE__ */ t(n, { ...e }), r = ["confirm", "alert", "destructive"], b = {
|
|
6
|
+
title: "AlertDialog",
|
|
7
|
+
component: n,
|
|
8
|
+
render: c,
|
|
9
|
+
argTypes: {
|
|
10
|
+
open: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "boolean"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
variant: {
|
|
16
|
+
name: "variant",
|
|
17
|
+
description: "ButtonIcon variant",
|
|
18
|
+
options: r,
|
|
19
|
+
control: {
|
|
20
|
+
type: "inline-radio"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
cancelLabel: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "text"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
actionLabel: {
|
|
29
|
+
control: {
|
|
30
|
+
type: "text"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
control: {
|
|
35
|
+
type: "text"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
description: {
|
|
39
|
+
control: {
|
|
40
|
+
type: "text"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
variant: "alert",
|
|
46
|
+
cancelLabel: "Cancel",
|
|
47
|
+
actionLabel: "Action"
|
|
48
|
+
}
|
|
49
|
+
}, s = (e) => /* @__PURE__ */ t(
|
|
50
|
+
n,
|
|
51
|
+
{
|
|
52
|
+
...e
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
s.args = {
|
|
56
|
+
trigger: "Trigger text or ReactNode",
|
|
57
|
+
variant: "confirm",
|
|
58
|
+
title: "Dialog title...",
|
|
59
|
+
description: "Description text...",
|
|
60
|
+
cancelLabel: "Cancel label",
|
|
61
|
+
actionLabel: "Action label"
|
|
62
|
+
};
|
|
63
|
+
const i = (e) => /* @__PURE__ */ t("div", { className: "flex gap-3", children: r.map((o) => /* @__PURE__ */ t(
|
|
64
|
+
n,
|
|
65
|
+
{
|
|
66
|
+
trigger: o,
|
|
67
|
+
...e,
|
|
68
|
+
variant: o
|
|
69
|
+
},
|
|
70
|
+
o
|
|
71
|
+
)) });
|
|
72
|
+
i.parameters = {
|
|
73
|
+
controls: {
|
|
74
|
+
include: ["title", "description", "cancelLabel", "actionLabel"]
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
i.args = {
|
|
78
|
+
title: "Dialog title",
|
|
79
|
+
description: "Description text..."
|
|
80
|
+
};
|
|
81
|
+
const a = (e) => /* @__PURE__ */ t(
|
|
82
|
+
n,
|
|
83
|
+
{
|
|
84
|
+
onOpenChange: (o) => console.log(o),
|
|
85
|
+
trigger: /* @__PURE__ */ t(l, { variant: "outline", children: "Control Trigger" }),
|
|
86
|
+
header: /* @__PURE__ */ t("div", { children: "Custom Header" }),
|
|
87
|
+
footer: [
|
|
88
|
+
/* @__PURE__ */ t(l, { variant: "outline", onClick: console.log, children: "On cancel" }, "cancel"),
|
|
89
|
+
/* @__PURE__ */ t(l, { variant: "outline", onClick: console.log, children: "On Action" }, "action")
|
|
90
|
+
],
|
|
91
|
+
...e
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
a.parameters = {
|
|
95
|
+
controls: {
|
|
96
|
+
include: ["open"]
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
a.args = {
|
|
100
|
+
open: !1
|
|
101
|
+
};
|
|
102
|
+
const p = (e) => /* @__PURE__ */ t(
|
|
103
|
+
n,
|
|
104
|
+
{
|
|
105
|
+
trigger: /* @__PURE__ */ t(l, { variant: "outline", children: "Full Content Trigger" }),
|
|
106
|
+
...e,
|
|
107
|
+
children: "Full Content..."
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
p.parameters = {
|
|
111
|
+
controls: {
|
|
112
|
+
include: []
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
export {
|
|
116
|
+
p as FullContent,
|
|
117
|
+
a as FullControl,
|
|
118
|
+
s as Playground,
|
|
119
|
+
i as Variants,
|
|
120
|
+
b as default
|
|
121
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as e from "@radix-ui/react-alert-dialog";
|
|
4
4
|
import { cn as s } from "@oneplatformdev/utils";
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import "../Button/Button.js";
|
|
6
|
+
import { buttonVariants as n } from "../Button/buttonVariants.js";
|
|
7
|
+
const v = e.Root, C = e.Trigger, f = e.Portal, m = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
8
|
+
e.Overlay,
|
|
8
9
|
{
|
|
9
10
|
className: s(
|
|
10
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",
|
|
11
12
|
a
|
|
12
13
|
),
|
|
13
|
-
...
|
|
14
|
+
...t,
|
|
14
15
|
ref: o
|
|
15
16
|
}
|
|
16
17
|
));
|
|
17
|
-
m.displayName =
|
|
18
|
-
const p = i.forwardRef(({ className: a, ...
|
|
18
|
+
m.displayName = e.Overlay.displayName;
|
|
19
|
+
const p = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ c(f, { children: [
|
|
19
20
|
/* @__PURE__ */ l(m, {}),
|
|
20
21
|
/* @__PURE__ */ l(
|
|
21
|
-
|
|
22
|
+
e.Content,
|
|
22
23
|
{
|
|
23
24
|
ref: o,
|
|
24
25
|
className: s(
|
|
25
26
|
"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
27
|
a
|
|
27
28
|
),
|
|
28
|
-
...
|
|
29
|
+
...t
|
|
29
30
|
}
|
|
30
31
|
)
|
|
31
32
|
] }));
|
|
32
|
-
p.displayName =
|
|
33
|
+
p.displayName = e.Content.displayName;
|
|
33
34
|
const g = ({
|
|
34
35
|
className: a,
|
|
35
|
-
...
|
|
36
|
+
...t
|
|
36
37
|
}) => /* @__PURE__ */ l(
|
|
37
38
|
"div",
|
|
38
39
|
{
|
|
@@ -40,13 +41,13 @@ const g = ({
|
|
|
40
41
|
"w-full min-w-0 flex flex-col space-y-2 text-center sm:text-left",
|
|
41
42
|
a
|
|
42
43
|
),
|
|
43
|
-
...
|
|
44
|
+
...t
|
|
44
45
|
}
|
|
45
46
|
);
|
|
46
47
|
g.displayName = "AlertDialogHeader";
|
|
47
48
|
const N = ({
|
|
48
49
|
className: a,
|
|
49
|
-
...
|
|
50
|
+
...t
|
|
50
51
|
}) => /* @__PURE__ */ l(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
@@ -54,50 +55,50 @@ const N = ({
|
|
|
54
55
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
55
56
|
a
|
|
56
57
|
),
|
|
57
|
-
...
|
|
58
|
+
...t
|
|
58
59
|
}
|
|
59
60
|
);
|
|
60
61
|
N.displayName = "AlertDialogFooter";
|
|
61
|
-
const y = i.forwardRef(({ className: a, ...
|
|
62
|
-
|
|
62
|
+
const y = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
63
|
+
e.Title,
|
|
63
64
|
{
|
|
64
65
|
ref: o,
|
|
65
66
|
className: s("text-lg font-semibold", a),
|
|
66
|
-
...
|
|
67
|
+
...t
|
|
67
68
|
}
|
|
68
69
|
));
|
|
69
|
-
y.displayName =
|
|
70
|
-
const x = i.forwardRef(({ className: a, ...
|
|
71
|
-
|
|
70
|
+
y.displayName = e.Title.displayName;
|
|
71
|
+
const x = i.forwardRef(({ className: a, ...t }, o) => /* @__PURE__ */ l(
|
|
72
|
+
e.Description,
|
|
72
73
|
{
|
|
73
74
|
ref: o,
|
|
74
75
|
className: s("text-sm text-muted-foreground", a),
|
|
75
|
-
...
|
|
76
|
+
...t
|
|
76
77
|
}
|
|
77
78
|
));
|
|
78
|
-
x.displayName =
|
|
79
|
-
const u = i.forwardRef(({ className: a, variant:
|
|
80
|
-
|
|
79
|
+
x.displayName = e.Description.displayName;
|
|
80
|
+
const u = i.forwardRef(({ className: a, variant: t, size: o, ...r }, d) => /* @__PURE__ */ l(
|
|
81
|
+
e.Action,
|
|
81
82
|
{
|
|
82
83
|
ref: d,
|
|
83
|
-
className: s(n({ variant:
|
|
84
|
+
className: s(n({ variant: t, size: o }), a),
|
|
84
85
|
...r
|
|
85
86
|
}
|
|
86
87
|
));
|
|
87
|
-
u.displayName =
|
|
88
|
-
const A = i.forwardRef(({ className: a, variant:
|
|
89
|
-
|
|
88
|
+
u.displayName = e.Action.displayName;
|
|
89
|
+
const A = i.forwardRef(({ className: a, variant: t = "outline-solid", size: o, ...r }, d) => /* @__PURE__ */ l(
|
|
90
|
+
e.Cancel,
|
|
90
91
|
{
|
|
91
92
|
ref: d,
|
|
92
93
|
className: s(
|
|
93
|
-
n({ variant:
|
|
94
|
+
n({ variant: t, size: o }),
|
|
94
95
|
"mt-2 sm:mt-0",
|
|
95
96
|
a
|
|
96
97
|
),
|
|
97
98
|
...r
|
|
98
99
|
}
|
|
99
100
|
));
|
|
100
|
-
A.displayName =
|
|
101
|
+
A.displayName = e.Cancel.displayName;
|
|
101
102
|
export {
|
|
102
103
|
u as AlertDialogAction,
|
|
103
104
|
A as AlertDialogCancel,
|
|
@@ -107,7 +108,7 @@ export {
|
|
|
107
108
|
g as AlertDialogHeader,
|
|
108
109
|
m as AlertDialogOverlay,
|
|
109
110
|
f as AlertDialogPortal,
|
|
110
|
-
|
|
111
|
+
v as AlertDialogRoot,
|
|
111
112
|
y as AlertDialogTitle,
|
|
112
|
-
|
|
113
|
+
C as AlertDialogTrigger
|
|
113
114
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AlertDialogAction as e, AlertDialogCancel as r, AlertDialogContent as t, AlertDialogDescription as i, AlertDialogFooter as a, AlertDialogHeader as g, AlertDialogOverlay as A, AlertDialogPortal as D, AlertDialogRoot as n, AlertDialogTitle as c, AlertDialogTrigger as p } from "./AlertDialogRoot.js";
|
|
2
|
+
import { AlertDialog as m } from "./AlertDialog.js";
|
|
3
|
+
export {
|
|
4
|
+
m as AlertDialog,
|
|
5
|
+
e as AlertDialogAction,
|
|
6
|
+
r as AlertDialogCancel,
|
|
7
|
+
t as AlertDialogContent,
|
|
8
|
+
i as AlertDialogDescription,
|
|
9
|
+
a as AlertDialogFooter,
|
|
10
|
+
g as AlertDialogHeader,
|
|
11
|
+
A as AlertDialogOverlay,
|
|
12
|
+
D as AlertDialogPortal,
|
|
13
|
+
n as AlertDialogRoot,
|
|
14
|
+
c as AlertDialogTitle,
|
|
15
|
+
p as AlertDialogTrigger
|
|
16
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
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 c } from "
|
|
3
|
+
import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as c } from "../Chart/Chart.js";
|
|
4
4
|
const k = ({ 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
5
|
/* @__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
6
|
/* @__PURE__ */ t("stop", { offset: "5%", stopColor: r, stopOpacity: 0.8 }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as c, jsx as i, Fragment as f } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { Sidebar as S, SidebarHeader as s, SidebarContent as p, SidebarFooter as m, SidebarRail as E } from "
|
|
3
|
+
import { Sidebar as S, SidebarHeader as s, SidebarContent as p, SidebarFooter as m, SidebarRail as E } from "../Sidebar/Sidebar.js";
|
|
4
4
|
function d(l, e) {
|
|
5
5
|
return a.isValidElement(l) && l.type === e;
|
|
6
6
|
}
|
package/Aside/index.js
ADDED
package/Avatar/index.js
ADDED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { cn as a } from "@oneplatformdev/utils";
|
|
3
|
-
import { badgeVariants as i } from "./
|
|
3
|
+
import { badgeVariants as i } from "./badgeVariants.js";
|
|
4
4
|
function p({ className: r, variant: o, ...m }) {
|
|
5
5
|
return /* @__PURE__ */ t("div", { className: a(i({ variant: o }), r), ...m });
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/Badge/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Breadcrumb as a, BreadcrumbEllipsis as m, BreadcrumbItem as b, BreadcrumbLink as c, BreadcrumbList as d, BreadcrumbPage as u, BreadcrumbSeparator as B } from "./Breadcrumb.js";
|
|
2
|
+
export {
|
|
3
|
+
a as Breadcrumb,
|
|
4
|
+
m as BreadcrumbEllipsis,
|
|
5
|
+
b as BreadcrumbItem,
|
|
6
|
+
c as BreadcrumbLink,
|
|
7
|
+
d as BreadcrumbList,
|
|
8
|
+
u as BreadcrumbPage,
|
|
9
|
+
B as BreadcrumbSeparator
|
|
10
|
+
};
|
|
@@ -2,22 +2,23 @@ import { jsx as m } from "react/jsx-runtime";
|
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { Slot as u } from "@radix-ui/react-slot";
|
|
4
4
|
import { cn as c } from "@oneplatformdev/utils";
|
|
5
|
-
import { buttonVariants as l } from "./
|
|
6
|
-
import
|
|
5
|
+
import { buttonVariants as l } from "./buttonVariants.js";
|
|
6
|
+
import "../Tooltip/TooltipRoot.js";
|
|
7
|
+
import { Tooltip as d } from "../Tooltip/Tooltip.js";
|
|
7
8
|
const y = i.forwardRef(
|
|
8
|
-
({ disabled: o, className: a, variant: e, size:
|
|
9
|
+
({ disabled: o, className: a, variant: e, size: p, asChild: n = !1, title: t = "", tooltip: r, ...s }, f) => /* @__PURE__ */ m(
|
|
9
10
|
d,
|
|
10
11
|
{
|
|
11
12
|
open: o || !t && !r ? !1 : void 0,
|
|
12
13
|
message: r || t,
|
|
13
14
|
delay: 300,
|
|
14
15
|
children: /* @__PURE__ */ m(
|
|
15
|
-
|
|
16
|
+
n ? u : "button",
|
|
16
17
|
{
|
|
17
18
|
type: "button",
|
|
18
19
|
ref: f,
|
|
19
20
|
disabled: o,
|
|
20
|
-
className: c(l({ variant: e, size:
|
|
21
|
+
className: c(l({ variant: e, size: p, className: a })),
|
|
21
22
|
...s
|
|
22
23
|
}
|
|
23
24
|
)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Button as t } from "./Button.js";
|
|
3
|
+
const o = (e) => /* @__PURE__ */ a(t, { ...e }), n = {
|
|
4
|
+
title: "Button",
|
|
5
|
+
component: t,
|
|
6
|
+
render: o,
|
|
7
|
+
args: {
|
|
8
|
+
variant: "default",
|
|
9
|
+
size: "default",
|
|
10
|
+
disabled: !1
|
|
11
|
+
}
|
|
12
|
+
}, s = {
|
|
13
|
+
args: {
|
|
14
|
+
children: "Default"
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
s as Default,
|
|
19
|
+
n as default
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/Button/index.js
ADDED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
3
|
import { cn as l } from "@oneplatformdev/utils";
|
|
4
|
-
import { buttonIconVariants as u } from "./
|
|
5
|
-
import
|
|
4
|
+
import { buttonIconVariants as u } from "./buttonIconVariants.js";
|
|
5
|
+
import "../Tooltip/TooltipRoot.js";
|
|
6
|
+
import { Tooltip as d } from "../Tooltip/Tooltip.js";
|
|
6
7
|
const h = f.forwardRef(
|
|
7
|
-
({ disabled: o, className:
|
|
8
|
+
({ disabled: o, className: m, variant: e, color: p, size: a, rounded: s, title: t = "", tooltip: r, ...i }, c) => /* @__PURE__ */ n(
|
|
8
9
|
d,
|
|
9
10
|
{
|
|
10
11
|
open: o || !t && !r ? !1 : void 0,
|
|
@@ -13,7 +14,7 @@ const h = f.forwardRef(
|
|
|
13
14
|
children: /* @__PURE__ */ n(
|
|
14
15
|
"button",
|
|
15
16
|
{
|
|
16
|
-
className: l(u({ variant:
|
|
17
|
+
className: l(u({ variant: e, size: a, color: p, disabled: o, rounded: s, className: m })),
|
|
17
18
|
ref: c,
|
|
18
19
|
disabled: !!o,
|
|
19
20
|
...i
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { ButtonIcon as m } from "./ButtonIcon.js";
|
|
3
|
+
import { PencilLineIcon as x } from "lucide-react";
|
|
4
|
+
const s = ["contained", "outlined", "ghost", "link"], c = [
|
|
5
|
+
"primary",
|
|
6
|
+
"secondary",
|
|
7
|
+
"error",
|
|
8
|
+
"success",
|
|
9
|
+
"disabled"
|
|
10
|
+
], f = ["sm", "md", "lg"], l = (a) => /* @__PURE__ */ o(m, { ...a, children: /* @__PURE__ */ o(x, {}) }), z = {
|
|
11
|
+
title: "ButtonIcon",
|
|
12
|
+
component: m,
|
|
13
|
+
render: l,
|
|
14
|
+
argTypes: {
|
|
15
|
+
variant: {
|
|
16
|
+
name: "variant",
|
|
17
|
+
description: "ButtonIcon variant",
|
|
18
|
+
defaultValue: "contained",
|
|
19
|
+
options: s,
|
|
20
|
+
control: {
|
|
21
|
+
type: "inline-radio"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
color: {
|
|
25
|
+
options: c,
|
|
26
|
+
control: {
|
|
27
|
+
type: "inline-radio"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
size: {
|
|
31
|
+
options: f,
|
|
32
|
+
control: {
|
|
33
|
+
type: "inline-radio"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
tooltip: {
|
|
37
|
+
control: {
|
|
38
|
+
type: "text"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
disabled: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "boolean"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
rounded: {
|
|
47
|
+
control: {
|
|
48
|
+
type: "boolean"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
args: {
|
|
53
|
+
variant: "contained",
|
|
54
|
+
color: "primary",
|
|
55
|
+
size: "md",
|
|
56
|
+
disabled: !1,
|
|
57
|
+
rounded: !1,
|
|
58
|
+
tooltip: "ButtonIcon tooltip"
|
|
59
|
+
}
|
|
60
|
+
}, u = ({ rounded: a, ...n }) => /* @__PURE__ */ d("div", { className: "flex flex-col gap-10", children: [
|
|
61
|
+
/* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(l, { rounded: a, ...n }) }),
|
|
62
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: s.map((e) => /* @__PURE__ */ o("div", { className: "flex gap-2", children: c.map((t) => {
|
|
63
|
+
const i = `${e}-${t}`;
|
|
64
|
+
return /* @__PURE__ */ o("div", { className: "flex gap-2", children: f.map((r) => {
|
|
65
|
+
const p = `${i}-${r}`;
|
|
66
|
+
return /* @__PURE__ */ o(
|
|
67
|
+
l,
|
|
68
|
+
{
|
|
69
|
+
color: t,
|
|
70
|
+
size: r,
|
|
71
|
+
variant: e,
|
|
72
|
+
rounded: a,
|
|
73
|
+
tooltip: p
|
|
74
|
+
},
|
|
75
|
+
p
|
|
76
|
+
);
|
|
77
|
+
}) }, i);
|
|
78
|
+
}) }, e)) })
|
|
79
|
+
] });
|
|
80
|
+
u.args = {
|
|
81
|
+
onClick: { action: (a) => a }
|
|
82
|
+
};
|
|
83
|
+
const g = ({ variant: a, ...n }) => /* @__PURE__ */ d("div", { className: "flex flex-col gap-10", children: [
|
|
84
|
+
/* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(l, { variant: a, ...n }) }),
|
|
85
|
+
/* @__PURE__ */ o("div", { className: "flex gap-2", children: s.map((e) => /* @__PURE__ */ o(l, { variant: e, tooltip: e }, e)) })
|
|
86
|
+
] });
|
|
87
|
+
g.parameters = {
|
|
88
|
+
controls: {
|
|
89
|
+
include: ["disabled", "color", "size", "variant"]
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const h = ({ color: a, ...n }) => /* @__PURE__ */ d("div", { className: "flex flex-col gap-2", children: [
|
|
93
|
+
/* @__PURE__ */ o("span", { children: /* @__PURE__ */ o(l, { color: a, ...n }) }),
|
|
94
|
+
/* @__PURE__ */ o("div", { className: "flex gap-2", children: c.map((e) => /* @__PURE__ */ o(l, { color: e, tooltip: e, ...n }, e)) })
|
|
95
|
+
] });
|
|
96
|
+
h.parameters = {
|
|
97
|
+
controls: {
|
|
98
|
+
include: ["disabled", "color", "size", "variant"]
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const v = ({ variant: a, color: n, ...e }) => /* @__PURE__ */ o("div", { className: "flex flex-col gap-10", children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-2", children: s.map((t) => /* @__PURE__ */ o("div", { className: "flex gap-2", children: c.map((i) => {
|
|
102
|
+
const r = `${t}-${i}`;
|
|
103
|
+
return /* @__PURE__ */ o(
|
|
104
|
+
l,
|
|
105
|
+
{
|
|
106
|
+
variant: t,
|
|
107
|
+
color: i,
|
|
108
|
+
disabled: !0,
|
|
109
|
+
tooltip: r,
|
|
110
|
+
...e
|
|
111
|
+
},
|
|
112
|
+
r
|
|
113
|
+
);
|
|
114
|
+
}) }, t)) }) });
|
|
115
|
+
v.parameters = {
|
|
116
|
+
controls: {
|
|
117
|
+
include: []
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
export {
|
|
121
|
+
h as Colors,
|
|
122
|
+
v as Disabled,
|
|
123
|
+
u as Playground,
|
|
124
|
+
g as Variants,
|
|
125
|
+
z as default
|
|
126
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,8 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { ChevronRight as i, ChevronLeft as l } from "lucide-react";
|
|
3
3
|
import { DayPicker as m } from "react-day-picker";
|
|
4
4
|
import { cn as e } from "@oneplatformdev/utils";
|
|
5
|
-
import
|
|
5
|
+
import "../Button/Button.js";
|
|
6
|
+
import { buttonVariants as o } from "../Button/buttonVariants.js";
|
|
6
7
|
function u({
|
|
7
8
|
className: n,
|
|
8
9
|
classNames: s,
|