@oneplatformdev/ui 0.0.1-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/Accordion/Accordion.d.ts +7 -0
- package/Accordion/Accordion.mjs +46 -0
- package/Accordion/index.d.ts +1 -0
- package/Accordion/index.mjs +7 -0
- package/Accordion/package.json +7 -0
- package/Alert/Alert.d.ts +7 -0
- package/Alert/Alert.mjs +37 -0
- package/Alert/alertVariants.d.ts +4 -0
- package/Alert/alertVariants.mjs +19 -0
- package/Alert/index.d.ts +1 -0
- package/Alert/index.mjs +6 -0
- package/Alert/package.json +7 -0
- package/AlertDialog/AlertDialog.d.ts +65 -0
- package/AlertDialog/AlertDialog.mjs +97 -0
- package/AlertDialog/AlertDialog.types.d.ts +53 -0
- package/AlertDialog/AlertDialogRoot.d.ts +21 -0
- package/AlertDialog/AlertDialogRoot.mjs +114 -0
- package/AlertDialog/index.d.ts +3 -0
- package/AlertDialog/index.mjs +16 -0
- package/AlertDialog/package.json +7 -0
- package/AreaChart/AreaChart.d.ts +4 -0
- package/AreaChart/AreaChart.mjs +27 -0
- package/AreaChart/AreaChart.types.d.ts +15 -0
- package/AreaChart/index.d.ts +2 -0
- package/AreaChart/index.mjs +4 -0
- package/AreaChart/package.json +7 -0
- package/Aside/Aside.d.ts +4 -0
- package/Aside/Aside.mjs +23 -0
- package/Aside/Aside.types.d.ts +18 -0
- package/Aside/AsideSidebar.d.ts +3 -0
- package/Aside/AsideSidebar.mjs +37 -0
- package/Aside/index.d.ts +3 -0
- package/Aside/index.mjs +7 -0
- package/Aside/package.json +7 -0
- package/AspectRatio/AspectRatio.d.ts +2 -0
- package/AspectRatio/AspectRatio.mjs +5 -0
- package/AspectRatio/index.d.ts +1 -0
- package/AspectRatio/index.mjs +5 -0
- package/AspectRatio/package.json +7 -0
- package/Avatar/Avatar.d.ts +5 -0
- package/Avatar/Avatar.mjs +42 -0
- package/Avatar/index.d.ts +1 -0
- package/Avatar/index.mjs +6 -0
- package/Avatar/package.json +7 -0
- package/Badge/Badge.d.ts +5 -0
- package/Badge/Badge.mjs +10 -0
- package/Badge/Badge.types.d.ts +5 -0
- package/Badge/badgeVariants.d.ts +3 -0
- package/Badge/badgeVariants.mjs +20 -0
- package/Badge/index.d.ts +3 -0
- package/Badge/index.mjs +6 -0
- package/Badge/package.json +7 -0
- package/Breadcrumb/Breadcrumb.d.ts +19 -0
- package/Breadcrumb/Breadcrumb.mjs +90 -0
- package/Breadcrumb/index.d.ts +1 -0
- package/Breadcrumb/index.mjs +10 -0
- package/Breadcrumb/package.json +7 -0
- package/Button/Button.d.ts +4 -0
- package/Button/Button.mjs +31 -0
- package/Button/Button.types.d.ts +8 -0
- package/Button/buttonVariants.d.ts +4 -0
- package/Button/buttonVariants.mjs +29 -0
- package/Button/index.d.ts +3 -0
- package/Button/index.mjs +7 -0
- package/Button/package.json +7 -0
- package/ButtonIcon/ButtonIcon.d.ts +3 -0
- package/ButtonIcon/ButtonIcon.mjs +29 -0
- package/ButtonIcon/ButtonIcon.types.d.ts +7 -0
- package/ButtonIcon/buttonIconVariants.d.ts +7 -0
- package/ButtonIcon/buttonIconVariants.mjs +139 -0
- package/ButtonIcon/index.d.ts +3 -0
- package/ButtonIcon/index.mjs +7 -0
- package/ButtonIcon/package.json +7 -0
- package/Calendar/Calendar.d.ts +8 -0
- package/Calendar/Calendar.mjs +63 -0
- package/Calendar/index.d.ts +1 -0
- package/Calendar/index.mjs +4 -0
- package/Calendar/package.json +7 -0
- package/Card/Card.d.ts +8 -0
- package/Card/Card.mjs +61 -0
- package/Card/index.d.ts +1 -0
- package/Card/index.mjs +9 -0
- package/Card/package.json +7 -0
- package/Carousel/Carousel.d.ts +18 -0
- package/Carousel/Carousel.mjs +168 -0
- package/Carousel/index.d.ts +1 -0
- package/Carousel/index.mjs +8 -0
- package/Carousel/package.json +7 -0
- package/Chart/Chart.d.ts +62 -0
- package/Chart/Chart.mjs +210 -0
- package/Chart/index.d.ts +1 -0
- package/Chart/index.mjs +9 -0
- package/Chart/package.json +7 -0
- package/Checkbox/Checkbox.d.ts +4 -0
- package/Checkbox/Checkbox.mjs +27 -0
- package/Checkbox/index.d.ts +1 -0
- package/Checkbox/index.mjs +4 -0
- package/Checkbox/package.json +7 -0
- package/Collapsible/Collapsible.d.ts +5 -0
- package/Collapsible/Collapsible.mjs +7 -0
- package/Collapsible/index.d.ts +1 -0
- package/Collapsible/index.mjs +6 -0
- package/Collapsible/package.json +7 -0
- package/Combobox/Combobox.d.ts +4 -0
- package/Combobox/Combobox.mjs +126 -0
- package/Combobox/Combobox.types.d.ts +15 -0
- package/Combobox/index.d.ts +2 -0
- package/Combobox/index.mjs +4 -0
- package/Combobox/package.json +7 -0
- package/Command/Command.d.ts +80 -0
- package/Command/Command.mjs +109 -0
- package/Command/index.d.ts +1 -0
- package/Command/index.mjs +12 -0
- package/Command/package.json +7 -0
- package/DataTable/DataTable.d.ts +4 -0
- package/DataTable/DataTable.mjs +64 -0
- package/DataTable/DataTable.types.d.ts +11 -0
- package/DataTable/index.d.ts +2 -0
- package/DataTable/index.mjs +4 -0
- package/DataTable/package.json +7 -0
- package/DataTable/useDataTable.d.ts +3 -0
- package/DataTable/useDataTable.mjs +30 -0
- package/DatePicker/DatePicker.d.ts +3 -0
- package/DatePicker/DatePicker.mjs +699 -0
- package/DatePicker/DatePicker.types.d.ts +5 -0
- package/DatePicker/index.d.ts +3 -0
- package/DatePicker/index.mjs +5 -0
- package/DatePicker/package.json +7 -0
- package/Dialog/Dialog.d.ts +19 -0
- package/Dialog/Dialog.mjs +100 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.mjs +13 -0
- package/Dialog/package.json +7 -0
- package/Drawer/Drawer.d.ts +22 -0
- package/Drawer/Drawer.mjs +98 -0
- package/Drawer/index.d.ts +1 -0
- package/Drawer/index.mjs +13 -0
- package/Drawer/package.json +7 -0
- package/DropdownMenu/DropdownMenu.d.ts +27 -0
- package/DropdownMenu/DropdownMenu.mjs +144 -0
- package/DropdownMenu/index.d.ts +1 -0
- package/DropdownMenu/index.mjs +18 -0
- package/DropdownMenu/package.json +7 -0
- package/Dropzone/Dropzone.d.ts +16 -0
- package/Dropzone/Dropzone.mjs +2923 -0
- package/Dropzone/Dropzone.types.d.ts +21 -0
- package/Dropzone/FilePreview.d.ts +15 -0
- package/Dropzone/FilePreview.mjs +7 -0
- package/Dropzone/index.d.ts +2 -0
- package/Dropzone/index.mjs +7 -0
- package/Dropzone/package.json +7 -0
- package/FilePreview-C6IeuOqo.js +40 -0
- package/Form/Form.d.ts +23 -0
- package/Form/Form.mjs +95 -0
- package/Form/FormRenderControl.d.ts +5 -0
- package/Form/FormRenderControl.mjs +21 -0
- package/Form/FormRenderControl.types.d.ts +18 -0
- package/Form/index.d.ts +3 -0
- package/Form/index.mjs +13 -0
- package/Form/package.json +7 -0
- package/FormCheckbox/FormCheckbox.d.ts +5 -0
- package/FormCheckbox/FormCheckbox.mjs +30 -0
- package/FormCheckbox/FormCheckbox.types.d.ts +7 -0
- package/FormCheckbox/index.d.ts +2 -0
- package/FormCheckbox/index.mjs +4 -0
- package/FormCheckbox/package.json +7 -0
- package/FormCombobox/FormCombobox.d.ts +4 -0
- package/FormCombobox/FormCombobox.mjs +26 -0
- package/FormCombobox/FormCombobox.types.d.ts +7 -0
- package/FormCombobox/index.d.ts +2 -0
- package/FormCombobox/index.mjs +4 -0
- package/FormCombobox/package.json +7 -0
- package/FormDatePicker/FormDatePicker.d.ts +4 -0
- package/FormDatePicker/FormDatePicker.mjs +27 -0
- package/FormDatePicker/FormDatePicker.types.d.ts +7 -0
- package/FormDatePicker/index.d.ts +3 -0
- package/FormDatePicker/index.mjs +5 -0
- package/FormDatePicker/package.json +7 -0
- package/FormInput/FormInput.d.ts +5 -0
- package/FormInput/FormInput.mjs +26 -0
- package/FormInput/FormInput.types.d.ts +7 -0
- package/FormInput/index.d.ts +2 -0
- package/FormInput/index.mjs +4 -0
- package/FormInput/package.json +7 -0
- package/FormSelect/FormSelect.d.ts +5 -0
- package/FormSelect/FormSelect.mjs +38 -0
- package/FormSelect/FormSelect.types.d.ts +7 -0
- package/FormSelect/index.d.ts +2 -0
- package/FormSelect/index.mjs +4 -0
- package/FormSelect/package.json +7 -0
- package/FormTextarea/FormTextarea.d.ts +5 -0
- package/FormTextarea/FormTextarea.mjs +26 -0
- package/FormTextarea/FormTextarea.types.d.ts +7 -0
- package/FormTextarea/index.d.ts +2 -0
- package/FormTextarea/index.mjs +4 -0
- package/FormTextarea/package.json +7 -0
- package/Header/Header.d.ts +4 -0
- package/Header/Header.mjs +26 -0
- package/Header/Header.types.d.ts +3 -0
- package/Header/index.d.ts +2 -0
- package/Header/index.mjs +5 -0
- package/Header/package.json +7 -0
- package/HoverCard/HoverCard.d.ts +6 -0
- package/HoverCard/HoverCard.mjs +23 -0
- package/HoverCard/index.d.ts +1 -0
- package/HoverCard/index.mjs +6 -0
- package/HoverCard/package.json +7 -0
- package/Input/Input.d.ts +6 -0
- package/Input/Input.mjs +61 -0
- package/Input/Input.types.d.ts +13 -0
- package/Input/index.d.ts +3 -0
- package/Input/index.mjs +7 -0
- package/Input/inputVariants.d.ts +3 -0
- package/Input/inputVariants.mjs +18 -0
- package/Input/package.json +7 -0
- package/InputOTP/InputOTP.d.ts +34 -0
- package/InputOTP/InputOTP.mjs +48 -0
- package/InputOTP/index.d.ts +1 -0
- package/InputOTP/index.mjs +7 -0
- package/InputOTP/package.json +7 -0
- package/Label/Label.d.ts +5 -0
- package/Label/Label.mjs +17 -0
- package/Label/index.d.ts +2 -0
- package/Label/index.mjs +6 -0
- package/Label/labelVariants.d.ts +1 -0
- package/Label/labelVariants.mjs +7 -0
- package/Label/package.json +7 -0
- package/LazyLoader/LazyLoader.d.ts +20 -0
- package/LazyLoader/LazyLoader.mjs +7 -0
- package/LazyLoader/index.d.ts +1 -0
- package/LazyLoader/index.mjs +5 -0
- package/LazyLoader/package.json +7 -0
- package/LoadingMask/LoadingMask.d.ts +1 -0
- package/LoadingMask/LoadingMask.mjs +59 -0
- package/LoadingMask/index.d.ts +1 -0
- package/LoadingMask/index.mjs +4 -0
- package/LoadingMask/package.json +7 -0
- package/LoadingProgress/LoadingProgress.d.ts +4 -0
- package/LoadingProgress/LoadingProgress.mjs +37 -0
- package/LoadingProgress/LoadingProgress.types.d.ts +8 -0
- package/LoadingProgress/index.d.ts +3 -0
- package/LoadingProgress/index.mjs +6 -0
- package/LoadingProgress/loadingProgressVariants.d.ts +4 -0
- package/LoadingProgress/loadingProgressVariants.mjs +24 -0
- package/LoadingProgress/package.json +7 -0
- package/Menubar/Menubar.d.ts +28 -0
- package/Menubar/Menubar.mjs +175 -0
- package/Menubar/index.d.ts +1 -0
- package/Menubar/index.mjs +19 -0
- package/Menubar/package.json +7 -0
- package/NavigationMenu/NavigationMenu.d.ts +11 -0
- package/NavigationMenu/NavigationMenu.mjs +101 -0
- package/NavigationMenu/index.d.ts +2 -0
- package/NavigationMenu/index.mjs +13 -0
- package/NavigationMenu/navigationMenuVariants.d.ts +1 -0
- package/NavigationMenu/navigationMenuVariants.mjs +7 -0
- package/NavigationMenu/package.json +7 -0
- package/Pagination/Pagination.d.ts +28 -0
- package/Pagination/Pagination.mjs +106 -0
- package/Pagination/index.d.ts +1 -0
- package/Pagination/index.mjs +10 -0
- package/Pagination/package.json +7 -0
- package/Popover/Popover.d.ts +7 -0
- package/Popover/Popover.mjs +24 -0
- package/Popover/index.d.ts +1 -0
- package/Popover/index.mjs +7 -0
- package/Popover/package.json +7 -0
- package/Progress/Progress.d.ts +4 -0
- package/Progress/Progress.mjs +26 -0
- package/Progress/index.d.ts +1 -0
- package/Progress/index.mjs +4 -0
- package/Progress/package.json +7 -0
- package/README.md +33 -0
- package/RadioGroup/RadioGroup.d.ts +5 -0
- package/RadioGroup/RadioGroup.mjs +31 -0
- package/RadioGroup/index.d.ts +1 -0
- package/RadioGroup/index.mjs +5 -0
- package/RadioGroup/package.json +7 -0
- package/Resizable/Resizable.d.ts +23 -0
- package/Resizable/Resizable.mjs +36 -0
- package/Resizable/index.d.ts +1 -0
- package/Resizable/index.mjs +6 -0
- package/Resizable/package.json +7 -0
- package/ScrollArea/ScrollArea.d.ts +5 -0
- package/ScrollArea/ScrollArea.mjs +38 -0
- package/ScrollArea/index.d.ts +1 -0
- package/ScrollArea/index.mjs +5 -0
- package/ScrollArea/package.json +7 -0
- package/Search/Search.d.ts +4 -0
- package/Search/Search.mjs +30 -0
- package/Search/Search.types.d.ts +6 -0
- package/Search/index.d.ts +3 -0
- package/Search/index.mjs +5 -0
- package/Search/package.json +7 -0
- package/Select/Select.d.ts +3 -0
- package/Select/Select.mjs +72 -0
- package/Select/Select.types.d.ts +29 -0
- package/Select/SelectRoot.d.ts +13 -0
- package/Select/SelectRoot.mjs +121 -0
- package/Select/index.d.ts +3 -0
- package/Select/index.mjs +15 -0
- package/Select/package.json +7 -0
- package/Separator/Separator.d.ts +4 -0
- package/Separator/Separator.mjs +24 -0
- package/Separator/index.d.ts +1 -0
- package/Separator/index.mjs +4 -0
- package/Separator/package.json +7 -0
- package/Sheet/Sheet.d.ts +25 -0
- package/Sheet/Sheet.mjs +110 -0
- package/Sheet/index.d.ts +1 -0
- package/Sheet/index.mjs +13 -0
- package/Sheet/package.json +7 -0
- package/Sidebar/Sidebar.d.ts +66 -0
- package/Sidebar/Sidebar.mjs +543 -0
- package/Sidebar/index.d.ts +1 -0
- package/Sidebar/index.mjs +27 -0
- package/Sidebar/package.json +7 -0
- package/Skeleton/Skeleton.d.ts +4 -0
- package/Skeleton/Skeleton.mjs +17 -0
- package/Skeleton/index.d.ts +1 -0
- package/Skeleton/index.mjs +4 -0
- package/Skeleton/package.json +7 -0
- package/Slider/Slider.d.ts +4 -0
- package/Slider/Slider.mjs +23 -0
- package/Slider/index.d.ts +1 -0
- package/Slider/index.mjs +4 -0
- package/Slider/package.json +7 -0
- package/Sonner/Sonner.d.ts +5 -0
- package/Sonner/Sonner.mjs +25 -0
- package/Sonner/index.d.ts +1 -0
- package/Sonner/index.mjs +4 -0
- package/Sonner/package.json +7 -0
- package/Switch/Switch.d.ts +4 -0
- package/Switch/Switch.mjs +27 -0
- package/Switch/index.d.ts +1 -0
- package/Switch/index.mjs +4 -0
- package/Switch/package.json +7 -0
- package/Table/Table.d.ts +10 -0
- package/Table/Table.mjs +90 -0
- package/Table/index.d.ts +1 -0
- package/Table/index.mjs +11 -0
- package/Table/package.json +7 -0
- package/Tabs/Tabs.d.ts +4 -0
- package/Tabs/Tabs.mjs +9 -0
- package/Tabs/Tabs.types.d.ts +9 -0
- package/Tabs/TabsRoot.d.ts +7 -0
- package/Tabs/TabsRoot.mjs +46 -0
- package/Tabs/index.d.ts +2 -0
- package/Tabs/index.mjs +9 -0
- package/Tabs/package.json +7 -0
- package/Textarea/Textarea.d.ts +4 -0
- package/Textarea/Textarea.mjs +18 -0
- package/Textarea/Textarea.types.d.ts +4 -0
- package/Textarea/index.d.ts +2 -0
- package/Textarea/index.mjs +4 -0
- package/Textarea/package.json +7 -0
- package/Theme/ThemeModeToggle.d.ts +8 -0
- package/Theme/ThemeModeToggle.mjs +48 -0
- package/Theme/ThemeProvider.d.ts +4 -0
- package/Theme/ThemeProvider.mjs +27 -0
- package/Theme/index.d.ts +2 -0
- package/Theme/index.mjs +6 -0
- package/Theme/package.json +7 -0
- package/Toast/Toast.d.ts +13 -0
- package/Toast/Toast.mjs +80 -0
- package/Toast/Toast.types.d.ts +34 -0
- package/Toast/index.d.ts +3 -0
- package/Toast/index.mjs +15 -0
- package/Toast/package.json +7 -0
- package/Toast/toast.constants.d.ts +6 -0
- package/Toast/toast.constants.mjs +9 -0
- package/Toast/toastVariants.d.ts +3 -0
- package/Toast/toastVariants.mjs +21 -0
- package/Toast/useToast.d.ts +16 -0
- package/Toast/useToast.mjs +101 -0
- package/Toaster/Toaster.d.ts +1 -0
- package/Toaster/Toaster.mjs +22 -0
- package/Toaster/index.d.ts +1 -0
- package/Toaster/index.mjs +4 -0
- package/Toaster/package.json +7 -0
- package/Toggle/Toggle.d.ts +12 -0
- package/Toggle/Toggle.mjs +37 -0
- package/Toggle/index.d.ts +1 -0
- package/Toggle/index.mjs +5 -0
- package/Toggle/package.json +7 -0
- package/ToggleGroup/ToggleGroup.d.ts +12 -0
- package/ToggleGroup/ToggleGroup.mjs +41 -0
- package/ToggleGroup/index.d.ts +1 -0
- package/ToggleGroup/index.mjs +5 -0
- package/ToggleGroup/package.json +7 -0
- package/Tooltip/Tooltip.d.ts +4 -0
- package/Tooltip/Tooltip.mjs +12 -0
- package/Tooltip/Tooltip.types.d.ts +8 -0
- package/Tooltip/TooltipRoot.d.ts +7 -0
- package/Tooltip/TooltipRoot.mjs +23 -0
- package/Tooltip/index.d.ts +3 -0
- package/Tooltip/index.mjs +9 -0
- package/Tooltip/package.json +7 -0
- package/index.css +1 -0
- package/index.d.ts +66 -0
- package/index.mjs +358 -0
- package/package.json +103 -0
- package/tailwind.config.mjs +148 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
import { SidebarHeader, SidebarContent, SidebarFooter, Sidebar } from '../Sidebar';
|
2
|
+
import * as React from "react";
|
3
|
+
export interface AsideProps {
|
4
|
+
header?: React.ReactNode;
|
5
|
+
sidebar?: React.ReactElement<typeof Sidebar>;
|
6
|
+
}
|
7
|
+
export interface AsideSidebarProps extends Partial<Omit<React.ComponentPropsWithRef<typeof Sidebar>, 'slot' | 'content'>> {
|
8
|
+
header?: React.ReactNode | React.ReactElement<typeof SidebarHeader>;
|
9
|
+
content?: React.ReactNode | React.ReactElement<typeof SidebarContent>;
|
10
|
+
footer?: React.ReactNode | React.ReactElement<typeof SidebarFooter>;
|
11
|
+
slot?: {
|
12
|
+
sidebar?: React.ComponentProps<typeof Sidebar>["slot"];
|
13
|
+
header?: React.ComponentPropsWithoutRef<typeof SidebarHeader>;
|
14
|
+
content?: React.ComponentPropsWithoutRef<typeof SidebarContent>;
|
15
|
+
footer?: React.ComponentPropsWithoutRef<typeof SidebarFooter>;
|
16
|
+
};
|
17
|
+
hiddenRail?: boolean;
|
18
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import { jsxs as l, Fragment as S, jsx as a } from "react/jsx-runtime";
|
2
|
+
import * as c from "react";
|
3
|
+
import { Sidebar as s, SidebarHeader as p, SidebarContent as m, SidebarFooter as h, SidebarRail as E } from "../Sidebar/Sidebar.mjs";
|
4
|
+
function t(d, r) {
|
5
|
+
return c.isValidElement(d) && d.type === r;
|
6
|
+
}
|
7
|
+
const R = (d) => {
|
8
|
+
const {
|
9
|
+
children: r,
|
10
|
+
header: n,
|
11
|
+
content: i,
|
12
|
+
footer: o,
|
13
|
+
slot: e,
|
14
|
+
hiddenRail: b,
|
15
|
+
...f
|
16
|
+
} = d;
|
17
|
+
return /* @__PURE__ */ l(s, { collapsible: "icon", ...f, children: [
|
18
|
+
r || /* @__PURE__ */ l(S, { children: [
|
19
|
+
!r && n && t(n, p) ? c.cloneElement(n, {
|
20
|
+
...n.props,
|
21
|
+
...(e == null ? void 0 : e.header) || {}
|
22
|
+
}) : /* @__PURE__ */ a(p, { ...(e == null ? void 0 : e.header) || {}, children: /* @__PURE__ */ a("div", { className: "grid gap-2 text-center", children: n }) }),
|
23
|
+
!r && i && t(i, m) ? c.cloneElement(i, {
|
24
|
+
...i.props,
|
25
|
+
...(e == null ? void 0 : e.content) || {}
|
26
|
+
}) : /* @__PURE__ */ a(m, { ...(e == null ? void 0 : e.content) || {}, children: i }),
|
27
|
+
!r && o && t(o, h) ? c.cloneElement(o, {
|
28
|
+
...o.props,
|
29
|
+
...(e == null ? void 0 : e.footer) || {}
|
30
|
+
}) : /* @__PURE__ */ a(h, { ...(e == null ? void 0 : e.footer) || {}, children: o })
|
31
|
+
] }),
|
32
|
+
!b && /* @__PURE__ */ a(E, {})
|
33
|
+
] });
|
34
|
+
};
|
35
|
+
export {
|
36
|
+
R as AsideSidebar
|
37
|
+
};
|
package/Aside/index.d.ts
ADDED
package/Aside/index.mjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export { AspectRatio as default, AspectRatio } from './AspectRatio';
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
3
|
+
export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
4
|
+
export declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
5
|
+
export declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import * as o from "react";
|
3
|
+
import * as a from "@radix-ui/react-avatar";
|
4
|
+
import { cn as s } from "@oneplatformdev/utils";
|
5
|
+
const t = o.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ m(
|
6
|
+
a.Root,
|
7
|
+
{
|
8
|
+
ref: r,
|
9
|
+
className: s(
|
10
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
11
|
+
e
|
12
|
+
),
|
13
|
+
...l
|
14
|
+
}
|
15
|
+
));
|
16
|
+
t.displayName = a.Root.displayName;
|
17
|
+
const f = o.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ m(
|
18
|
+
a.Image,
|
19
|
+
{
|
20
|
+
ref: r,
|
21
|
+
className: s("aspect-square h-full w-full", e),
|
22
|
+
...l
|
23
|
+
}
|
24
|
+
));
|
25
|
+
f.displayName = a.Image.displayName;
|
26
|
+
const i = o.forwardRef(({ className: e, ...l }, r) => /* @__PURE__ */ m(
|
27
|
+
a.Fallback,
|
28
|
+
{
|
29
|
+
ref: r,
|
30
|
+
className: s(
|
31
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
32
|
+
e
|
33
|
+
),
|
34
|
+
...l
|
35
|
+
}
|
36
|
+
));
|
37
|
+
i.displayName = a.Fallback.displayName;
|
38
|
+
export {
|
39
|
+
t as Avatar,
|
40
|
+
i as AvatarFallback,
|
41
|
+
f as AvatarImage
|
42
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Avatar';
|
package/Avatar/index.mjs
ADDED
package/Badge/Badge.d.ts
ADDED
package/Badge/Badge.mjs
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { cn as a } from "@oneplatformdev/utils";
|
3
|
+
import { badgeVariants as i } from "./badgeVariants.mjs";
|
4
|
+
function p({ className: r, variant: o, ...m }) {
|
5
|
+
return /* @__PURE__ */ t("div", { className: a(i({ variant: o }), r), ...m });
|
6
|
+
}
|
7
|
+
export {
|
8
|
+
p as Badge,
|
9
|
+
i as badgeVariants
|
10
|
+
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
2
|
+
const t = r(
|
3
|
+
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
4
|
+
{
|
5
|
+
variants: {
|
6
|
+
variant: {
|
7
|
+
default: "border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
8
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
9
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
10
|
+
outline: "text-foreground"
|
11
|
+
}
|
12
|
+
},
|
13
|
+
defaultVariants: {
|
14
|
+
variant: "default"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
);
|
18
|
+
export {
|
19
|
+
t as badgeVariants
|
20
|
+
};
|
package/Badge/index.d.ts
ADDED
package/Badge/index.mjs
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
declare const Breadcrumb: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
3
|
+
separator?: React.ReactNode;
|
4
|
+
} & React.RefAttributes<HTMLElement>>;
|
5
|
+
declare const BreadcrumbList: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
6
|
+
declare const BreadcrumbItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
7
|
+
declare const BreadcrumbLink: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
8
|
+
asChild?: boolean;
|
9
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
10
|
+
declare const BreadcrumbPage: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
11
|
+
declare const BreadcrumbSeparator: {
|
12
|
+
({ children, className, ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
13
|
+
displayName: string;
|
14
|
+
};
|
15
|
+
declare const BreadcrumbEllipsis: {
|
16
|
+
({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
17
|
+
displayName: string;
|
18
|
+
};
|
19
|
+
export { Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis, };
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { jsx as s, jsxs as i } from "react/jsx-runtime";
|
2
|
+
import * as t from "react";
|
3
|
+
import { Slot as n } from "@radix-ui/react-slot";
|
4
|
+
import { ChevronRight as c, MoreHorizontal as d } from "lucide-react";
|
5
|
+
import { cn as o } from "@oneplatformdev/utils";
|
6
|
+
const l = t.forwardRef(({ ...r }, e) => /* @__PURE__ */ s("nav", { ref: e, "aria-label": "breadcrumb", ...r }));
|
7
|
+
l.displayName = "Breadcrumb";
|
8
|
+
const p = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
9
|
+
"ol",
|
10
|
+
{
|
11
|
+
ref: a,
|
12
|
+
className: o(
|
13
|
+
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
14
|
+
r
|
15
|
+
),
|
16
|
+
...e
|
17
|
+
}
|
18
|
+
));
|
19
|
+
p.displayName = "BreadcrumbList";
|
20
|
+
const u = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
21
|
+
"li",
|
22
|
+
{
|
23
|
+
ref: a,
|
24
|
+
className: o("inline-flex items-center gap-1.5", r),
|
25
|
+
...e
|
26
|
+
}
|
27
|
+
));
|
28
|
+
u.displayName = "BreadcrumbItem";
|
29
|
+
const f = t.forwardRef(({ asChild: r, className: e, ...a }, m) => /* @__PURE__ */ s(
|
30
|
+
r ? n : "a",
|
31
|
+
{
|
32
|
+
ref: m,
|
33
|
+
className: o("transition-colors hover:text-foreground", e),
|
34
|
+
...a
|
35
|
+
}
|
36
|
+
));
|
37
|
+
f.displayName = "BreadcrumbLink";
|
38
|
+
const b = t.forwardRef(({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
39
|
+
"span",
|
40
|
+
{
|
41
|
+
ref: a,
|
42
|
+
role: "link",
|
43
|
+
"aria-disabled": "true",
|
44
|
+
"aria-current": "page",
|
45
|
+
className: o("font-normal text-foreground", r),
|
46
|
+
...e
|
47
|
+
}
|
48
|
+
));
|
49
|
+
b.displayName = "BreadcrumbPage";
|
50
|
+
const N = ({
|
51
|
+
children: r,
|
52
|
+
className: e,
|
53
|
+
...a
|
54
|
+
}) => /* @__PURE__ */ s(
|
55
|
+
"li",
|
56
|
+
{
|
57
|
+
role: "presentation",
|
58
|
+
"aria-hidden": "true",
|
59
|
+
className: o("[&>svg]:w-3.5 [&>svg]:h-3.5", e),
|
60
|
+
...a,
|
61
|
+
children: r ?? /* @__PURE__ */ s(c, {})
|
62
|
+
}
|
63
|
+
);
|
64
|
+
N.displayName = "BreadcrumbSeparator";
|
65
|
+
const B = ({
|
66
|
+
className: r,
|
67
|
+
...e
|
68
|
+
}) => /* @__PURE__ */ i(
|
69
|
+
"span",
|
70
|
+
{
|
71
|
+
role: "presentation",
|
72
|
+
"aria-hidden": "true",
|
73
|
+
className: o("flex h-9 w-9 items-center justify-center", r),
|
74
|
+
...e,
|
75
|
+
children: [
|
76
|
+
/* @__PURE__ */ s(d, { className: "h-4 w-4" }),
|
77
|
+
/* @__PURE__ */ s("span", { className: "sr-only", children: "More" })
|
78
|
+
]
|
79
|
+
}
|
80
|
+
);
|
81
|
+
B.displayName = "BreadcrumbElipssis";
|
82
|
+
export {
|
83
|
+
l as Breadcrumb,
|
84
|
+
B as BreadcrumbEllipsis,
|
85
|
+
u as BreadcrumbItem,
|
86
|
+
f as BreadcrumbLink,
|
87
|
+
p as BreadcrumbList,
|
88
|
+
b as BreadcrumbPage,
|
89
|
+
N as BreadcrumbSeparator
|
90
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Breadcrumb';
|
@@ -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.mjs";
|
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
|
+
};
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import * as i from "react";
|
3
|
+
import { Slot as u } from "@radix-ui/react-slot";
|
4
|
+
import { cn as c } from "@oneplatformdev/utils";
|
5
|
+
import { buttonVariants as l } from "./buttonVariants.mjs";
|
6
|
+
import "../Tooltip/TooltipRoot.mjs";
|
7
|
+
import { Tooltip as d } from "../Tooltip/Tooltip.mjs";
|
8
|
+
const x = i.forwardRef(
|
9
|
+
({ disabled: o, className: a, variant: e, size: n, asChild: f = !1, title: r = "", tooltip: t, ...p }, s) => /* @__PURE__ */ m(
|
10
|
+
d,
|
11
|
+
{
|
12
|
+
open: o || !r && !t ? !1 : void 0,
|
13
|
+
message: t || r,
|
14
|
+
delay: 300,
|
15
|
+
children: /* @__PURE__ */ m(
|
16
|
+
f ? u : "button",
|
17
|
+
{
|
18
|
+
className: c(l({ variant: e, size: n, className: a })),
|
19
|
+
ref: s,
|
20
|
+
disabled: o,
|
21
|
+
...p
|
22
|
+
}
|
23
|
+
)
|
24
|
+
}
|
25
|
+
)
|
26
|
+
);
|
27
|
+
x.displayName = "Button";
|
28
|
+
export {
|
29
|
+
x as Button,
|
30
|
+
x as default
|
31
|
+
};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { buttonVariants } from './buttonVariants';
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import * as React from "react";
|
5
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
6
|
+
asChild?: boolean;
|
7
|
+
tooltip?: ReactNode;
|
8
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
export declare const buttonVariants: (props?: ({
|
2
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
3
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
4
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { cva as e } from "class-variance-authority";
|
2
|
+
const t = e(
|
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
|
+
{
|
5
|
+
variants: {
|
6
|
+
variant: {
|
7
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
8
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
9
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
10
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
11
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
12
|
+
link: "text-primary underline-offset-4 hover:underline"
|
13
|
+
},
|
14
|
+
size: {
|
15
|
+
default: "h-9 px-4 py-2",
|
16
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
17
|
+
lg: "h-10 rounded-md px-8",
|
18
|
+
icon: "h-9 w-9"
|
19
|
+
}
|
20
|
+
},
|
21
|
+
defaultVariants: {
|
22
|
+
variant: "default",
|
23
|
+
size: "default"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
);
|
27
|
+
export {
|
28
|
+
t as buttonVariants
|
29
|
+
};
|
package/Button/index.mjs
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import * as c from "react";
|
3
|
+
import { cn as l } from "@oneplatformdev/utils";
|
4
|
+
import { buttonIconVariants as u } from "./buttonIconVariants.mjs";
|
5
|
+
import "../Tooltip/TooltipRoot.mjs";
|
6
|
+
import { Tooltip as d } from "../Tooltip/Tooltip.mjs";
|
7
|
+
const h = c.forwardRef(
|
8
|
+
({ disabled: o, className: e, variant: m, color: p, size: a, rounded: s, title: t = "", tooltip: n, ...i }, f) => /* @__PURE__ */ r(
|
9
|
+
d,
|
10
|
+
{
|
11
|
+
open: o || !t && !n ? !1 : void 0,
|
12
|
+
message: n || t,
|
13
|
+
delay: 300,
|
14
|
+
children: /* @__PURE__ */ r(
|
15
|
+
"button",
|
16
|
+
{
|
17
|
+
className: l(u({ variant: m, size: a, color: p, disabled: o, rounded: s, className: e })),
|
18
|
+
ref: f,
|
19
|
+
disabled: !!o,
|
20
|
+
...i
|
21
|
+
}
|
22
|
+
)
|
23
|
+
}
|
24
|
+
)
|
25
|
+
);
|
26
|
+
h.displayName = "Button";
|
27
|
+
export {
|
28
|
+
h as ButtonIcon
|
29
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { buttonIconVariants } from './buttonIconVariants';
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
4
|
+
import * as React from "react";
|
5
|
+
export interface ButtonIconProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'disabled'>, VariantProps<typeof buttonIconVariants> {
|
6
|
+
tooltip?: ReactNode;
|
7
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare const buttonIconVariants: (props?: ({
|
2
|
+
variant?: "link" | "ghost" | "contained" | "outlined" | null | undefined;
|
3
|
+
color?: "disabled" | "secondary" | "error" | "primary" | "success" | null | undefined;
|
4
|
+
size?: "sm" | "lg" | "icon" | "md" | null | undefined;
|
5
|
+
disabled?: boolean | null | undefined;
|
6
|
+
rounded?: boolean | null | undefined;
|
7
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|