@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,543 @@
|
|
1
|
+
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
2
|
+
import * as i from "react";
|
3
|
+
import { Slot as h } from "@radix-ui/react-slot";
|
4
|
+
import { cva as C } from "class-variance-authority";
|
5
|
+
import { PanelLeft as k } from "lucide-react";
|
6
|
+
import { cn as d } from "@oneplatformdev/utils";
|
7
|
+
import { Button as E } from "../Button/Button.mjs";
|
8
|
+
import "../Button/buttonVariants.mjs";
|
9
|
+
import { Input as z } from "../Input/Input.mjs";
|
10
|
+
import { Separator as B } from "../Separator/Separator.mjs";
|
11
|
+
import { Sheet as T, SheetContent as A } from "../Sheet/Sheet.mjs";
|
12
|
+
import { Skeleton as M } from "../Skeleton/Skeleton.mjs";
|
13
|
+
import { TooltipProvider as D, TooltipTrigger as O, TooltipContent as L } from "../Tooltip/TooltipRoot.mjs";
|
14
|
+
import { Tooltip as G } from "../Tooltip/Tooltip.mjs";
|
15
|
+
const K = 768;
|
16
|
+
function H(a = {}) {
|
17
|
+
const {
|
18
|
+
mobileBreakpoint: e = K
|
19
|
+
} = a, [t, o] = i.useState(void 0);
|
20
|
+
return i.useEffect(() => {
|
21
|
+
const n = window.matchMedia(`(max-width: ${e - 1}px)`), s = () => {
|
22
|
+
o(window.innerWidth < e);
|
23
|
+
};
|
24
|
+
return n.addEventListener("change", s), o(window.innerWidth < e), () => n.removeEventListener("change", s);
|
25
|
+
}, [e]), !!t;
|
26
|
+
}
|
27
|
+
const j = "sidebar:state", P = 60 * 60 * 24 * 7, W = "16rem", $ = "18rem", q = "3rem", F = "b", R = i.createContext(null);
|
28
|
+
function N() {
|
29
|
+
const a = i.useContext(R);
|
30
|
+
if (!a)
|
31
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
32
|
+
return a;
|
33
|
+
}
|
34
|
+
const V = i.forwardRef(
|
35
|
+
({
|
36
|
+
defaultOpen: a = !0,
|
37
|
+
open: e,
|
38
|
+
onOpenChange: t,
|
39
|
+
className: o,
|
40
|
+
style: n,
|
41
|
+
children: s,
|
42
|
+
...f
|
43
|
+
}, m) => {
|
44
|
+
const c = H(), [p, u] = i.useState(!1), [v, _] = i.useState(a), g = e ?? v, x = i.useCallback(
|
45
|
+
(l) => {
|
46
|
+
const b = typeof l == "function" ? l(g) : l;
|
47
|
+
t ? t(b) : _(b), document.cookie = `${j}=${b}; path=/; max-age=${P}`;
|
48
|
+
},
|
49
|
+
[t, g]
|
50
|
+
), w = i.useCallback(() => c ? u((l) => !l) : x((l) => !l), [c, x, u]);
|
51
|
+
i.useEffect(() => {
|
52
|
+
const l = (b) => {
|
53
|
+
b.key === F && (b.metaKey || b.ctrlKey) && (b.preventDefault(), w());
|
54
|
+
};
|
55
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
56
|
+
}, [w]);
|
57
|
+
const y = g ? "expanded" : "collapsed", I = i.useMemo(
|
58
|
+
() => ({
|
59
|
+
state: y,
|
60
|
+
open: g,
|
61
|
+
setOpen: x,
|
62
|
+
isMobile: c,
|
63
|
+
openMobile: p,
|
64
|
+
setOpenMobile: u,
|
65
|
+
toggleSidebar: w
|
66
|
+
}),
|
67
|
+
[y, g, x, c, p, u, w]
|
68
|
+
);
|
69
|
+
return /* @__PURE__ */ r(R.Provider, { value: I, children: /* @__PURE__ */ r(D, { delayDuration: 0, children: /* @__PURE__ */ r(
|
70
|
+
"div",
|
71
|
+
{
|
72
|
+
style: {
|
73
|
+
"--sidebar-width": W,
|
74
|
+
"--sidebar-width-icon": q,
|
75
|
+
...n
|
76
|
+
},
|
77
|
+
className: d(
|
78
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
79
|
+
o
|
80
|
+
),
|
81
|
+
ref: m,
|
82
|
+
...f,
|
83
|
+
children: s
|
84
|
+
}
|
85
|
+
) }) });
|
86
|
+
}
|
87
|
+
);
|
88
|
+
V.displayName = "SidebarProvider";
|
89
|
+
const U = i.forwardRef(
|
90
|
+
({
|
91
|
+
side: a = "left",
|
92
|
+
variant: e = "sidebar",
|
93
|
+
collapsible: t = "offcanvas",
|
94
|
+
className: o,
|
95
|
+
children: n,
|
96
|
+
...s
|
97
|
+
}, f) => {
|
98
|
+
const { isMobile: m, state: c, openMobile: p, setOpenMobile: u } = N();
|
99
|
+
return t === "none" ? /* @__PURE__ */ r(
|
100
|
+
"div",
|
101
|
+
{
|
102
|
+
className: d(
|
103
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
104
|
+
o
|
105
|
+
),
|
106
|
+
ref: f,
|
107
|
+
...s,
|
108
|
+
children: n
|
109
|
+
}
|
110
|
+
) : m ? /* @__PURE__ */ r(T, { open: p, onOpenChange: u, ...s, children: /* @__PURE__ */ r(
|
111
|
+
A,
|
112
|
+
{
|
113
|
+
"data-sidebar": "sidebar",
|
114
|
+
"data-mobile": "true",
|
115
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
116
|
+
style: {
|
117
|
+
"--sidebar-width": $
|
118
|
+
},
|
119
|
+
side: a,
|
120
|
+
children: /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
|
121
|
+
}
|
122
|
+
) }) : /* @__PURE__ */ S(
|
123
|
+
"div",
|
124
|
+
{
|
125
|
+
ref: f,
|
126
|
+
className: "group peer hidden md:block text-sidebar-foreground",
|
127
|
+
"data-state": c,
|
128
|
+
"data-collapsible": c === "collapsed" ? t : "",
|
129
|
+
"data-variant": e,
|
130
|
+
"data-side": a,
|
131
|
+
children: [
|
132
|
+
/* @__PURE__ */ r(
|
133
|
+
"div",
|
134
|
+
{
|
135
|
+
className: d(
|
136
|
+
"duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear",
|
137
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
138
|
+
"group-data-[side=right]:rotate-180",
|
139
|
+
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
140
|
+
)
|
141
|
+
}
|
142
|
+
),
|
143
|
+
/* @__PURE__ */ r(
|
144
|
+
"div",
|
145
|
+
{
|
146
|
+
className: d(
|
147
|
+
"duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",
|
148
|
+
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
149
|
+
// Adjust the padding for floating and inset variants.
|
150
|
+
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
151
|
+
o
|
152
|
+
),
|
153
|
+
...s,
|
154
|
+
children: /* @__PURE__ */ r(
|
155
|
+
"div",
|
156
|
+
{
|
157
|
+
"data-sidebar": "sidebar",
|
158
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
159
|
+
children: n
|
160
|
+
}
|
161
|
+
)
|
162
|
+
}
|
163
|
+
)
|
164
|
+
]
|
165
|
+
}
|
166
|
+
);
|
167
|
+
}
|
168
|
+
);
|
169
|
+
U.displayName = "Sidebar";
|
170
|
+
const X = i.forwardRef(({ className: a, onClick: e, ...t }, o) => {
|
171
|
+
const { toggleSidebar: n } = N();
|
172
|
+
return /* @__PURE__ */ S(
|
173
|
+
E,
|
174
|
+
{
|
175
|
+
ref: o,
|
176
|
+
"data-sidebar": "trigger",
|
177
|
+
variant: "ghost",
|
178
|
+
size: "icon",
|
179
|
+
className: d("h-7 w-7", a),
|
180
|
+
onClick: (s) => {
|
181
|
+
e == null || e(s), n();
|
182
|
+
},
|
183
|
+
...t,
|
184
|
+
children: [
|
185
|
+
/* @__PURE__ */ r(k, {}),
|
186
|
+
/* @__PURE__ */ r("span", { className: "sr-only", children: "Toggle Sidebar" })
|
187
|
+
]
|
188
|
+
}
|
189
|
+
);
|
190
|
+
});
|
191
|
+
X.displayName = "SidebarTrigger";
|
192
|
+
const Y = i.forwardRef(({ className: a, ...e }, t) => {
|
193
|
+
const { toggleSidebar: o } = N();
|
194
|
+
return /* @__PURE__ */ r(
|
195
|
+
"button",
|
196
|
+
{
|
197
|
+
ref: t,
|
198
|
+
"data-sidebar": "rail",
|
199
|
+
"aria-label": "Toggle Sidebar",
|
200
|
+
tabIndex: -1,
|
201
|
+
onClick: o,
|
202
|
+
title: "Toggle Sidebar",
|
203
|
+
className: d(
|
204
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
205
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
206
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
207
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
208
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
209
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
210
|
+
a
|
211
|
+
),
|
212
|
+
...e
|
213
|
+
}
|
214
|
+
);
|
215
|
+
});
|
216
|
+
Y.displayName = "SidebarRail";
|
217
|
+
const J = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
218
|
+
"main",
|
219
|
+
{
|
220
|
+
ref: t,
|
221
|
+
className: d(
|
222
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
223
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
224
|
+
a
|
225
|
+
),
|
226
|
+
...e
|
227
|
+
}
|
228
|
+
));
|
229
|
+
J.displayName = "SidebarInset";
|
230
|
+
const Q = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
231
|
+
z,
|
232
|
+
{
|
233
|
+
ref: t,
|
234
|
+
"data-sidebar": "input",
|
235
|
+
className: d(
|
236
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
237
|
+
a
|
238
|
+
),
|
239
|
+
...e
|
240
|
+
}
|
241
|
+
));
|
242
|
+
Q.displayName = "SidebarInput";
|
243
|
+
const Z = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
244
|
+
"div",
|
245
|
+
{
|
246
|
+
ref: t,
|
247
|
+
"data-sidebar": "header",
|
248
|
+
className: d("flex flex-col gap-2 p-2", a),
|
249
|
+
...e
|
250
|
+
}
|
251
|
+
));
|
252
|
+
Z.displayName = "SidebarHeader";
|
253
|
+
const ee = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
254
|
+
"div",
|
255
|
+
{
|
256
|
+
ref: t,
|
257
|
+
"data-sidebar": "footer",
|
258
|
+
className: d("flex flex-col gap-2 p-2", a),
|
259
|
+
...e
|
260
|
+
}
|
261
|
+
));
|
262
|
+
ee.displayName = "SidebarFooter";
|
263
|
+
const ae = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
264
|
+
B,
|
265
|
+
{
|
266
|
+
ref: t,
|
267
|
+
"data-sidebar": "separator",
|
268
|
+
className: d("mx-2 w-auto bg-sidebar-border", a),
|
269
|
+
...e
|
270
|
+
}
|
271
|
+
));
|
272
|
+
ae.displayName = "SidebarSeparator";
|
273
|
+
const te = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
274
|
+
"div",
|
275
|
+
{
|
276
|
+
ref: t,
|
277
|
+
"data-sidebar": "content",
|
278
|
+
className: d(
|
279
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
280
|
+
a
|
281
|
+
),
|
282
|
+
...e
|
283
|
+
}
|
284
|
+
));
|
285
|
+
te.displayName = "SidebarContent";
|
286
|
+
const re = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
287
|
+
"div",
|
288
|
+
{
|
289
|
+
ref: t,
|
290
|
+
"data-sidebar": "group",
|
291
|
+
className: d("relative flex w-full min-w-0 flex-col p-2", a),
|
292
|
+
...e
|
293
|
+
}
|
294
|
+
));
|
295
|
+
re.displayName = "SidebarGroup";
|
296
|
+
const ie = i.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ r(
|
297
|
+
e ? h : "div",
|
298
|
+
{
|
299
|
+
ref: o,
|
300
|
+
"data-sidebar": "group-label",
|
301
|
+
className: d(
|
302
|
+
"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
303
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
304
|
+
a
|
305
|
+
),
|
306
|
+
...t
|
307
|
+
}
|
308
|
+
));
|
309
|
+
ie.displayName = "SidebarGroupLabel";
|
310
|
+
const oe = i.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ r(
|
311
|
+
e ? h : "button",
|
312
|
+
{
|
313
|
+
ref: o,
|
314
|
+
"data-sidebar": "group-action",
|
315
|
+
className: d(
|
316
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
317
|
+
// Increases the hit area of the button on mobile.
|
318
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
319
|
+
"group-data-[collapsible=icon]:hidden",
|
320
|
+
a
|
321
|
+
),
|
322
|
+
...t
|
323
|
+
}
|
324
|
+
));
|
325
|
+
oe.displayName = "SidebarGroupAction";
|
326
|
+
const ne = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
327
|
+
"div",
|
328
|
+
{
|
329
|
+
ref: t,
|
330
|
+
"data-sidebar": "group-content",
|
331
|
+
className: d("w-full text-sm", a),
|
332
|
+
...e
|
333
|
+
}
|
334
|
+
));
|
335
|
+
ne.displayName = "SidebarGroupContent";
|
336
|
+
const de = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
337
|
+
"ul",
|
338
|
+
{
|
339
|
+
ref: t,
|
340
|
+
"data-sidebar": "menu",
|
341
|
+
className: d("flex w-full min-w-0 flex-col gap-1", a),
|
342
|
+
...e
|
343
|
+
}
|
344
|
+
));
|
345
|
+
de.displayName = "SidebarMenu";
|
346
|
+
const se = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
347
|
+
"li",
|
348
|
+
{
|
349
|
+
ref: t,
|
350
|
+
"data-sidebar": "menu-item",
|
351
|
+
className: d("group/menu-item relative", a),
|
352
|
+
...e
|
353
|
+
}
|
354
|
+
));
|
355
|
+
se.displayName = "SidebarMenuItem";
|
356
|
+
const le = C(
|
357
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
358
|
+
{
|
359
|
+
variants: {
|
360
|
+
variant: {
|
361
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
362
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
363
|
+
},
|
364
|
+
size: {
|
365
|
+
default: "h-8 text-sm",
|
366
|
+
sm: "h-7 text-xs",
|
367
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
368
|
+
}
|
369
|
+
},
|
370
|
+
defaultVariants: {
|
371
|
+
variant: "default",
|
372
|
+
size: "default"
|
373
|
+
}
|
374
|
+
}
|
375
|
+
), ce = i.forwardRef(
|
376
|
+
({
|
377
|
+
asChild: a = !1,
|
378
|
+
isActive: e = !1,
|
379
|
+
variant: t = "default",
|
380
|
+
size: o = "default",
|
381
|
+
tooltip: n,
|
382
|
+
className: s,
|
383
|
+
...f
|
384
|
+
}, m) => {
|
385
|
+
const c = a ? h : "button", { isMobile: p, state: u } = N(), v = /* @__PURE__ */ r(
|
386
|
+
c,
|
387
|
+
{
|
388
|
+
ref: m,
|
389
|
+
"data-sidebar": "menu-button",
|
390
|
+
"data-size": o,
|
391
|
+
"data-active": e,
|
392
|
+
className: d(le({ variant: t, size: o }), s),
|
393
|
+
...f
|
394
|
+
}
|
395
|
+
);
|
396
|
+
return n ? (typeof n == "string" && (n = {
|
397
|
+
children: n
|
398
|
+
}), /* @__PURE__ */ S(G, { children: [
|
399
|
+
/* @__PURE__ */ r(O, { asChild: !0, children: v }),
|
400
|
+
/* @__PURE__ */ r(
|
401
|
+
L,
|
402
|
+
{
|
403
|
+
side: "right",
|
404
|
+
align: "center",
|
405
|
+
hidden: u !== "collapsed" || p,
|
406
|
+
...n
|
407
|
+
}
|
408
|
+
)
|
409
|
+
] })) : v;
|
410
|
+
}
|
411
|
+
);
|
412
|
+
ce.displayName = "SidebarMenuButton";
|
413
|
+
const ue = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ r(
|
414
|
+
e ? h : "button",
|
415
|
+
{
|
416
|
+
ref: n,
|
417
|
+
"data-sidebar": "menu-action",
|
418
|
+
className: d(
|
419
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
420
|
+
// Increases the hit area of the button on mobile.
|
421
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
422
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
423
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
424
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
425
|
+
"group-data-[collapsible=icon]:hidden",
|
426
|
+
t && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
427
|
+
a
|
428
|
+
),
|
429
|
+
...o
|
430
|
+
}
|
431
|
+
));
|
432
|
+
ue.displayName = "SidebarMenuAction";
|
433
|
+
const be = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
434
|
+
"div",
|
435
|
+
{
|
436
|
+
ref: t,
|
437
|
+
"data-sidebar": "menu-badge",
|
438
|
+
className: d(
|
439
|
+
"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
|
440
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
441
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
442
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
443
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
444
|
+
"group-data-[collapsible=icon]:hidden",
|
445
|
+
a
|
446
|
+
),
|
447
|
+
...e
|
448
|
+
}
|
449
|
+
));
|
450
|
+
be.displayName = "SidebarMenuBadge";
|
451
|
+
const fe = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
452
|
+
const n = i.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
453
|
+
return /* @__PURE__ */ S(
|
454
|
+
"div",
|
455
|
+
{
|
456
|
+
ref: o,
|
457
|
+
"data-sidebar": "menu-skeleton",
|
458
|
+
className: d("rounded-md h-8 flex gap-2 px-2 items-center", a),
|
459
|
+
...t,
|
460
|
+
children: [
|
461
|
+
e && /* @__PURE__ */ r(
|
462
|
+
M,
|
463
|
+
{
|
464
|
+
className: "size-4 rounded-md",
|
465
|
+
"data-sidebar": "menu-skeleton-icon"
|
466
|
+
}
|
467
|
+
),
|
468
|
+
/* @__PURE__ */ r(
|
469
|
+
M,
|
470
|
+
{
|
471
|
+
className: "h-4 flex-1 max-w-[--skeleton-width]",
|
472
|
+
"data-sidebar": "menu-skeleton-text",
|
473
|
+
style: {
|
474
|
+
"--skeleton-width": n
|
475
|
+
}
|
476
|
+
}
|
477
|
+
)
|
478
|
+
]
|
479
|
+
}
|
480
|
+
);
|
481
|
+
});
|
482
|
+
fe.displayName = "SidebarMenuSkeleton";
|
483
|
+
const pe = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
484
|
+
"ul",
|
485
|
+
{
|
486
|
+
ref: t,
|
487
|
+
"data-sidebar": "menu-sub",
|
488
|
+
className: d(
|
489
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
490
|
+
"group-data-[collapsible=icon]:hidden",
|
491
|
+
a
|
492
|
+
),
|
493
|
+
...e
|
494
|
+
}
|
495
|
+
));
|
496
|
+
pe.displayName = "SidebarMenuSub";
|
497
|
+
const me = i.forwardRef(({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a }));
|
498
|
+
me.displayName = "SidebarMenuSubItem";
|
499
|
+
const ge = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: o, ...n }, s) => /* @__PURE__ */ r(
|
500
|
+
a ? h : "a",
|
501
|
+
{
|
502
|
+
ref: s,
|
503
|
+
"data-sidebar": "menu-sub-button",
|
504
|
+
"data-size": e,
|
505
|
+
"data-active": t,
|
506
|
+
className: d(
|
507
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
508
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
509
|
+
e === "sm" && "text-xs",
|
510
|
+
e === "md" && "text-sm",
|
511
|
+
"group-data-[collapsible=icon]:hidden",
|
512
|
+
o
|
513
|
+
),
|
514
|
+
...n
|
515
|
+
}
|
516
|
+
));
|
517
|
+
ge.displayName = "SidebarMenuSubButton";
|
518
|
+
export {
|
519
|
+
U as Sidebar,
|
520
|
+
te as SidebarContent,
|
521
|
+
ee as SidebarFooter,
|
522
|
+
re as SidebarGroup,
|
523
|
+
oe as SidebarGroupAction,
|
524
|
+
ne as SidebarGroupContent,
|
525
|
+
ie as SidebarGroupLabel,
|
526
|
+
Z as SidebarHeader,
|
527
|
+
Q as SidebarInput,
|
528
|
+
J as SidebarInset,
|
529
|
+
de as SidebarMenu,
|
530
|
+
ue as SidebarMenuAction,
|
531
|
+
be as SidebarMenuBadge,
|
532
|
+
ce as SidebarMenuButton,
|
533
|
+
se as SidebarMenuItem,
|
534
|
+
fe as SidebarMenuSkeleton,
|
535
|
+
pe as SidebarMenuSub,
|
536
|
+
ge as SidebarMenuSubButton,
|
537
|
+
me as SidebarMenuSubItem,
|
538
|
+
V as SidebarProvider,
|
539
|
+
Y as SidebarRail,
|
540
|
+
ae as SidebarSeparator,
|
541
|
+
X as SidebarTrigger,
|
542
|
+
N as useSidebar
|
543
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Sidebar';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Sidebar as a, SidebarContent as i, SidebarFooter as S, SidebarGroup as b, SidebarGroupAction as d, SidebarGroupContent as n, SidebarGroupLabel as u, SidebarHeader as t, SidebarInput as o, SidebarInset as M, SidebarMenu as p, SidebarMenuAction as G, SidebarMenuBadge as I, SidebarMenuButton as g, SidebarMenuItem as l, SidebarMenuSkeleton as m, SidebarMenuSub as B, SidebarMenuSubButton as c, SidebarMenuSubItem as s, SidebarProvider as A, SidebarRail as C, SidebarSeparator as f, SidebarTrigger as k, useSidebar as v } from "./Sidebar.mjs";
|
2
|
+
export {
|
3
|
+
a as Sidebar,
|
4
|
+
i as SidebarContent,
|
5
|
+
S as SidebarFooter,
|
6
|
+
b as SidebarGroup,
|
7
|
+
d as SidebarGroupAction,
|
8
|
+
n as SidebarGroupContent,
|
9
|
+
u as SidebarGroupLabel,
|
10
|
+
t as SidebarHeader,
|
11
|
+
o as SidebarInput,
|
12
|
+
M as SidebarInset,
|
13
|
+
p as SidebarMenu,
|
14
|
+
G as SidebarMenuAction,
|
15
|
+
I as SidebarMenuBadge,
|
16
|
+
g as SidebarMenuButton,
|
17
|
+
l as SidebarMenuItem,
|
18
|
+
m as SidebarMenuSkeleton,
|
19
|
+
B as SidebarMenuSub,
|
20
|
+
c as SidebarMenuSubButton,
|
21
|
+
s as SidebarMenuSubItem,
|
22
|
+
A as SidebarProvider,
|
23
|
+
C as SidebarRail,
|
24
|
+
f as SidebarSeparator,
|
25
|
+
k as SidebarTrigger,
|
26
|
+
v as useSidebar
|
27
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { cn as o } from "@oneplatformdev/utils";
|
3
|
+
function i({
|
4
|
+
className: r,
|
5
|
+
...e
|
6
|
+
}) {
|
7
|
+
return /* @__PURE__ */ m(
|
8
|
+
"div",
|
9
|
+
{
|
10
|
+
className: o("animate-pulse rounded-md bg-primary/10", r),
|
11
|
+
...e
|
12
|
+
}
|
13
|
+
);
|
14
|
+
}
|
15
|
+
export {
|
16
|
+
i as Skeleton
|
17
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Skeleton';
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
3
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
4
|
+
export { Slider };
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
2
|
+
import * as a from "react";
|
3
|
+
import * as e from "@radix-ui/react-slider";
|
4
|
+
import { cn as n } from "@oneplatformdev/utils";
|
5
|
+
const t = a.forwardRef(({ className: o, ...i }, l) => /* @__PURE__ */ s(
|
6
|
+
e.Root,
|
7
|
+
{
|
8
|
+
ref: l,
|
9
|
+
className: n(
|
10
|
+
"relative flex w-full touch-none select-none items-center",
|
11
|
+
o
|
12
|
+
),
|
13
|
+
...i,
|
14
|
+
children: [
|
15
|
+
/* @__PURE__ */ r(e.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ r(e.Range, { className: "absolute h-full bg-primary" }) }),
|
16
|
+
/* @__PURE__ */ r(e.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
17
|
+
]
|
18
|
+
}
|
19
|
+
));
|
20
|
+
t.displayName = e.Root.displayName;
|
21
|
+
export {
|
22
|
+
t as Slider
|
23
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './Slider';
|
package/Slider/index.mjs
ADDED