ikoncomponents 1.1.6 → 1.1.8

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.
Files changed (82) hide show
  1. package/dist/hooks/use-mobile.js +2 -38
  2. package/dist/ikoncomponents/action-menu/index.js +15 -18
  3. package/dist/ikoncomponents/action-menu/type.js +1 -2
  4. package/dist/ikoncomponents/alert-dialog/index.js +6 -10
  5. package/dist/ikoncomponents/buttons/index.js +32 -23
  6. package/dist/ikoncomponents/combobox-input/index.js +14 -16
  7. package/dist/ikoncomponents/combobox-input/type.js +1 -2
  8. package/dist/ikoncomponents/data-table/datatable-column-filter/index.js +13 -16
  9. package/dist/ikoncomponents/data-table/datatable-faceted-filter/index.js +22 -58
  10. package/dist/ikoncomponents/data-table/datatable-filter-menu/index.js +18 -21
  11. package/dist/ikoncomponents/data-table/datatable-pagination/index.js +10 -13
  12. package/dist/ikoncomponents/data-table/datatable-toolbar/index.js +17 -19
  13. package/dist/ikoncomponents/data-table/function.js +4 -7
  14. package/dist/ikoncomponents/data-table/index.js +81 -116
  15. package/dist/ikoncomponents/data-table/type.js +1 -2
  16. package/dist/ikoncomponents/e-chart/index.js +32 -37
  17. package/dist/ikoncomponents/file-input/index.js +20 -11
  18. package/dist/ikoncomponents/glowing-effect/index.js +16 -18
  19. package/dist/ikoncomponents/icon/index.js +16 -40
  20. package/dist/ikoncomponents/loading-spinner/index.js +16 -8
  21. package/dist/ikoncomponents/multi-combobox/index.js +31 -30
  22. package/dist/ikoncomponents/no-data/index.js +4 -7
  23. package/dist/ikoncomponents/page-wrapper/index.js +5 -8
  24. package/dist/ikoncomponents/password-strength-meter/index.js +6 -13
  25. package/dist/ikoncomponents/phone-input/index.js +30 -54
  26. package/dist/ikoncomponents/resource-spreadsheet/index.js +11 -48
  27. package/dist/ikoncomponents/search-input/index.js +18 -9
  28. package/dist/ikoncomponents/sheet/index.js +5 -8
  29. package/dist/ikoncomponents/simple-widget/index.js +8 -11
  30. package/dist/ikoncomponents/tabs/index.js +20 -22
  31. package/dist/ikoncomponents/tabs/type.js +1 -2
  32. package/dist/ikoncomponents/theme-toggle-btn/index.js +8 -11
  33. package/dist/ikoncomponents/title-progress/index.js +4 -7
  34. package/dist/ikoncomponents/tooltip/index.js +4 -7
  35. package/dist/ikoncomponents/twolevel-dropdown/index.js +20 -53
  36. package/dist/ikoncomponents/widgets/index.js +10 -13
  37. package/dist/ikoncomponents/widgets/type.js +1 -2
  38. package/dist/index.d.ts +3 -3
  39. package/dist/index.js +70 -123
  40. package/dist/shadcn/accordion.js +28 -51
  41. package/dist/shadcn/alert-dialog.js +60 -70
  42. package/dist/shadcn/alert.d.ts +1 -1
  43. package/dist/shadcn/alert.js +25 -15
  44. package/dist/shadcn/avatar.js +24 -47
  45. package/dist/shadcn/badge.d.ts +1 -1
  46. package/dist/shadcn/badge.js +21 -13
  47. package/dist/shadcn/button.d.ts +1 -1
  48. package/dist/shadcn/button.js +21 -13
  49. package/dist/shadcn/calendar.js +42 -97
  50. package/dist/shadcn/card.js +35 -25
  51. package/dist/shadcn/checkbox.js +19 -42
  52. package/dist/shadcn/command.js +53 -43
  53. package/dist/shadcn/date-input.js +25 -60
  54. package/dist/shadcn/date-range-picker.js +14 -18
  55. package/dist/shadcn/dialog.js +56 -79
  56. package/dist/shadcn/dropdown-menu.js +61 -84
  57. package/dist/shadcn/hover-card.js +24 -47
  58. package/dist/shadcn/input.js +17 -7
  59. package/dist/shadcn/label.js +18 -41
  60. package/dist/shadcn/navigation-menu.d.ts +1 -1
  61. package/dist/shadcn/navigation-menu.js +43 -68
  62. package/dist/shadcn/popover.js +27 -50
  63. package/dist/shadcn/progress.js +19 -42
  64. package/dist/shadcn/radio-group.js +23 -45
  65. package/dist/shadcn/scroll-area.js +22 -45
  66. package/dist/shadcn/select.js +58 -81
  67. package/dist/shadcn/separator.js +18 -41
  68. package/dist/shadcn/sheet.js +52 -73
  69. package/dist/shadcn/sidebar.d.ts +1 -1
  70. package/dist/shadcn/sidebar.js +113 -141
  71. package/dist/shadcn/skeleton.js +17 -7
  72. package/dist/shadcn/slider.js +19 -42
  73. package/dist/shadcn/sonner.js +20 -11
  74. package/dist/shadcn/switch.js +18 -41
  75. package/dist/shadcn/table.js +46 -36
  76. package/dist/shadcn/tabs.js +27 -50
  77. package/dist/shadcn/textarea.js +17 -7
  78. package/dist/shadcn/tooltip.js +27 -50
  79. package/dist/shadcn/workflow.js +8 -8
  80. package/dist/utils/cn.js +4 -7
  81. package/dist/utils/theme-provider/index.js +16 -7
  82. package/package.json +2 -1
@@ -1,76 +1,28 @@
1
- "use strict";
2
1
  "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.Sidebar = Sidebar;
38
- exports.SidebarContent = SidebarContent;
39
- exports.SidebarFooter = SidebarFooter;
40
- exports.SidebarGroup = SidebarGroup;
41
- exports.SidebarGroupAction = SidebarGroupAction;
42
- exports.SidebarGroupContent = SidebarGroupContent;
43
- exports.SidebarGroupLabel = SidebarGroupLabel;
44
- exports.SidebarHeader = SidebarHeader;
45
- exports.SidebarInput = SidebarInput;
46
- exports.SidebarInset = SidebarInset;
47
- exports.SidebarMenu = SidebarMenu;
48
- exports.SidebarMenuAction = SidebarMenuAction;
49
- exports.SidebarMenuBadge = SidebarMenuBadge;
50
- exports.SidebarMenuButton = SidebarMenuButton;
51
- exports.SidebarMenuItem = SidebarMenuItem;
52
- exports.SidebarMenuSkeleton = SidebarMenuSkeleton;
53
- exports.SidebarMenuSub = SidebarMenuSub;
54
- exports.SidebarMenuSubButton = SidebarMenuSubButton;
55
- exports.SidebarMenuSubItem = SidebarMenuSubItem;
56
- exports.SidebarProvider = SidebarProvider;
57
- exports.SidebarRail = SidebarRail;
58
- exports.SidebarSeparator = SidebarSeparator;
59
- exports.SidebarTrigger = SidebarTrigger;
60
- exports.useSidebar = useSidebar;
61
- const jsx_runtime_1 = require("react/jsx-runtime");
62
- const React = __importStar(require("react"));
63
- const react_slot_1 = require("@radix-ui/react-slot");
64
- const class_variance_authority_1 = require("class-variance-authority");
65
- const lucide_react_1 = require("lucide-react");
66
- const use_mobile_1 = require("../hooks/use-mobile");
67
- const cn_1 = require("../utils/cn");
68
- const button_1 = require("./button");
69
- const input_1 = require("./input");
70
- const separator_1 = require("./separator");
71
- const sheet_1 = require("./sheet");
72
- const skeleton_1 = require("./skeleton");
73
- const tooltip_1 = require("./tooltip");
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import * as React from "react";
15
+ import { Slot } from "@radix-ui/react-slot";
16
+ import { cva } from "class-variance-authority";
17
+ import { PanelLeftIcon } from "lucide-react";
18
+ import { useIsMobile } from "../hooks/use-mobile";
19
+ import { cn } from "../utils/cn";
20
+ import { Button } from "./button";
21
+ import { Input } from "./input";
22
+ import { Separator } from "./separator";
23
+ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "./sheet";
24
+ import { Skeleton } from "./skeleton";
25
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./tooltip";
74
26
  const SIDEBAR_COOKIE_NAME = "sidebar_state";
75
27
  const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
76
28
  const SIDEBAR_WIDTH = "16rem";
@@ -85,13 +37,14 @@ function useSidebar() {
85
37
  }
86
38
  return context;
87
39
  }
88
- function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }) {
89
- const isMobile = (0, use_mobile_1.useIsMobile)();
40
+ function SidebarProvider(_a) {
41
+ var { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children } = _a, props = __rest(_a, ["defaultOpen", "open", "onOpenChange", "className", "style", "children"]);
42
+ const isMobile = useIsMobile();
90
43
  const [openMobile, setOpenMobile] = React.useState(false);
91
44
  // This is the internal state of the sidebar.
92
45
  // We use openProp and setOpenProp for control from outside the component.
93
46
  const [_open, _setOpen] = React.useState(defaultOpen);
94
- const open = openProp ?? _open;
47
+ const open = openProp !== null && openProp !== void 0 ? openProp : _open;
95
48
  const setOpen = React.useCallback((value) => {
96
49
  const openState = typeof value === "function" ? value(open) : value;
97
50
  if (setOpenProp) {
@@ -131,84 +84,95 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
131
84
  setOpenMobile,
132
85
  toggleSidebar,
133
86
  }), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
134
- return ((0, jsx_runtime_1.jsx)(SidebarContext.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)(tooltip_1.TooltipProvider, { delayDuration: 0, children: (0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-wrapper", style: {
135
- "--sidebar-width": SIDEBAR_WIDTH,
136
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
137
- ...style,
138
- }, className: (0, cn_1.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className), ...props, children: children }) }) }));
87
+ return (_jsx(SidebarContext.Provider, { value: contextValue, children: _jsx(TooltipProvider, { delayDuration: 0, children: _jsx("div", Object.assign({ "data-slot": "sidebar-wrapper", style: Object.assign({ "--sidebar-width": SIDEBAR_WIDTH, "--sidebar-width-icon": SIDEBAR_WIDTH_ICON }, style), className: cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", className) }, props, { children: children })) }) }));
139
88
  }
140
- function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, ...props }) {
89
+ function Sidebar(_a) {
90
+ var { side = "left", variant = "sidebar", collapsible = "offcanvas", className, children } = _a, props = __rest(_a, ["side", "variant", "collapsible", "className", "children"]);
141
91
  const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
142
92
  if (collapsible === "none") {
143
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar", className: (0, cn_1.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className), ...props, children: children }));
93
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar", className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className) }, props, { children: children })));
144
94
  }
145
95
  if (isMobile) {
146
- return ((0, jsx_runtime_1.jsx)(sheet_1.Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: (0, jsx_runtime_1.jsxs)(sheet_1.SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
96
+ return (_jsx(Sheet, Object.assign({ open: openMobile, onOpenChange: setOpenMobile }, props, { children: _jsxs(SheetContent, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
147
97
  "--sidebar-width": SIDEBAR_WIDTH_MOBILE,
148
- }, side: side, children: [(0, jsx_runtime_1.jsxs)(sheet_1.SheetHeader, { className: "sr-only", children: [(0, jsx_runtime_1.jsx)(sheet_1.SheetTitle, { children: "Sidebar" }), (0, jsx_runtime_1.jsx)(sheet_1.SheetDescription, { children: "Displays the mobile sidebar." })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex h-full w-full flex-col", children: children })] }) }));
98
+ }, side: side, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: "Sidebar" }), _jsx(SheetDescription, { children: "Displays the mobile sidebar." })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }) })));
149
99
  }
150
- return ((0, jsx_runtime_1.jsxs)("div", { className: "group peer text-sidebar-foreground hidden md:block", "data-state": state, "data-collapsible": state === "collapsed" ? collapsible : "", "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [(0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-gap", className: (0, cn_1.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset"
100
+ return (_jsxs("div", { className: "group peer text-sidebar-foreground hidden md:block", "data-state": state, "data-collapsible": state === "collapsed" ? collapsible : "", "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset"
151
101
  ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
152
- : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)") }), (0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-container", className: (0, cn_1.cn)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", side === "left"
102
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)") }), _jsx("div", Object.assign({ "data-slot": "sidebar-container", className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex", side === "left"
153
103
  ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]"
154
104
  : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
155
105
  // Adjust the padding for floating and inset variants.
156
106
  variant === "floating" || variant === "inset"
157
107
  ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
158
- : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className), ...props, children: (0, jsx_runtime_1.jsx)("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm", children: children }) })] }));
108
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className) }, props, { children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm", children: children }) }))] }));
159
109
  }
160
- function SidebarTrigger({ className, onClick, ...props }) {
110
+ function SidebarTrigger(_a) {
111
+ var { className, onClick } = _a, props = __rest(_a, ["className", "onClick"]);
161
112
  const { toggleSidebar } = useSidebar();
162
- return ((0, jsx_runtime_1.jsxs)(button_1.Button, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon", className: (0, cn_1.cn)("size-7", className), onClick: (event) => {
163
- onClick?.(event);
113
+ return (_jsxs(Button, Object.assign({ "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon", className: cn("size-7", className), onClick: (event) => {
114
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
164
115
  toggleSidebar();
165
- }, ...props, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftIcon, {}), (0, jsx_runtime_1.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })] }));
116
+ } }, props, { children: [_jsx(PanelLeftIcon, {}), _jsx("span", { className: "sr-only", children: "Toggle Sidebar" })] })));
166
117
  }
167
- function SidebarRail({ className, ...props }) {
118
+ function SidebarRail(_a) {
119
+ var { className } = _a, props = __rest(_a, ["className"]);
168
120
  const { toggleSidebar } = useSidebar();
169
- return ((0, jsx_runtime_1.jsx)("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: (0, cn_1.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className), ...props }));
121
+ return (_jsx("button", Object.assign({ "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: toggleSidebar, title: "Toggle Sidebar", className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className) }, props)));
170
122
  }
171
- function SidebarInset({ className, ...props }) {
172
- return ((0, jsx_runtime_1.jsx)("main", { "data-slot": "sidebar-inset", className: (0, cn_1.cn)("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className), ...props }));
123
+ function SidebarInset(_a) {
124
+ var { className } = _a, props = __rest(_a, ["className"]);
125
+ return (_jsx("main", Object.assign({ "data-slot": "sidebar-inset", className: cn("bg-background relative flex w-full flex-1 flex-col", "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className) }, props)));
173
126
  }
174
- function SidebarInput({ className, ...props }) {
175
- return ((0, jsx_runtime_1.jsx)(input_1.Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: (0, cn_1.cn)("bg-background h-8 w-full shadow-none", className), ...props }));
127
+ function SidebarInput(_a) {
128
+ var { className } = _a, props = __rest(_a, ["className"]);
129
+ return (_jsx(Input, Object.assign({ "data-slot": "sidebar-input", "data-sidebar": "input", className: cn("bg-background h-8 w-full shadow-none", className) }, props)));
176
130
  }
177
- function SidebarHeader({ className, ...props }) {
178
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: (0, cn_1.cn)("flex flex-col gap-2 p-2", className), ...props }));
131
+ function SidebarHeader(_a) {
132
+ var { className } = _a, props = __rest(_a, ["className"]);
133
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-header", "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2", className) }, props)));
179
134
  }
180
- function SidebarFooter({ className, ...props }) {
181
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: (0, cn_1.cn)("flex flex-col gap-2 p-2", className), ...props }));
135
+ function SidebarFooter(_a) {
136
+ var { className } = _a, props = __rest(_a, ["className"]);
137
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className) }, props)));
182
138
  }
183
- function SidebarSeparator({ className, ...props }) {
184
- return ((0, jsx_runtime_1.jsx)(separator_1.Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: (0, cn_1.cn)("bg-sidebar-border mx-2 w-auto", className), ...props }));
139
+ function SidebarSeparator(_a) {
140
+ var { className } = _a, props = __rest(_a, ["className"]);
141
+ return (_jsx(Separator, Object.assign({ "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn("bg-sidebar-border mx-2 w-auto", className) }, props)));
185
142
  }
186
- function SidebarContent({ className, ...props }) {
187
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className: (0, cn_1.cn)("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className), ...props }));
143
+ function SidebarContent(_a) {
144
+ var { className } = _a, props = __rest(_a, ["className"]);
145
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-content", "data-sidebar": "content", className: cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className) }, props)));
188
146
  }
189
- function SidebarGroup({ className, ...props }) {
190
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: (0, cn_1.cn)("relative flex w-full min-w-0 flex-col p-2", className), ...props }));
147
+ function SidebarGroup(_a) {
148
+ var { className } = _a, props = __rest(_a, ["className"]);
149
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-group", "data-sidebar": "group", className: cn("relative flex w-full min-w-0 flex-col p-2", className) }, props)));
191
150
  }
192
- function SidebarGroupLabel({ className, asChild = false, ...props }) {
193
- const Comp = asChild ? react_slot_1.Slot : "div";
194
- return ((0, jsx_runtime_1.jsx)(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: (0, cn_1.cn)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className), ...props }));
151
+ function SidebarGroupLabel(_a) {
152
+ var { className, asChild = false } = _a, props = __rest(_a, ["className", "asChild"]);
153
+ const Comp = asChild ? Slot : "div";
154
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className) }, props)));
195
155
  }
196
- function SidebarGroupAction({ className, asChild = false, ...props }) {
197
- const Comp = asChild ? react_slot_1.Slot : "button";
198
- return ((0, jsx_runtime_1.jsx)(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: (0, cn_1.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
156
+ function SidebarGroupAction(_a) {
157
+ var { className, asChild = false } = _a, props = __rest(_a, ["className", "asChild"]);
158
+ const Comp = asChild ? Slot : "button";
159
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
199
160
  // Increases the hit area of the button on mobile.
200
- "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className), ...props }));
161
+ "after:absolute after:-inset-2 md:after:hidden", "group-data-[collapsible=icon]:hidden", className) }, props)));
201
162
  }
202
- function SidebarGroupContent({ className, ...props }) {
203
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: (0, cn_1.cn)("w-full text-sm", className), ...props }));
163
+ function SidebarGroupContent(_a) {
164
+ var { className } = _a, props = __rest(_a, ["className"]);
165
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn("w-full text-sm", className) }, props)));
204
166
  }
205
- function SidebarMenu({ className, ...props }) {
206
- return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: (0, cn_1.cn)("flex w-full min-w-0 flex-col gap-1", className), ...props }));
167
+ function SidebarMenu(_a) {
168
+ var { className } = _a, props = __rest(_a, ["className"]);
169
+ return (_jsx("ul", Object.assign({ "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-1", className) }, props)));
207
170
  }
208
- function SidebarMenuItem({ className, ...props }) {
209
- return ((0, jsx_runtime_1.jsx)("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: (0, cn_1.cn)("group/menu-item relative", className), ...props }));
171
+ function SidebarMenuItem(_a) {
172
+ var { className } = _a, props = __rest(_a, ["className"]);
173
+ return (_jsx("li", Object.assign({ "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn("group/menu-item relative", className) }, props)));
210
174
  }
211
- const sidebarMenuButtonVariants = (0, class_variance_authority_1.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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", {
175
+ const sidebarMenuButtonVariants = cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden 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", {
212
176
  variants: {
213
177
  variant: {
214
178
  default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
@@ -225,10 +189,11 @@ const sidebarMenuButtonVariants = (0, class_variance_authority_1.cva)("peer/menu
225
189
  size: "default",
226
190
  },
227
191
  });
228
- function SidebarMenuButton({ asChild = false, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
229
- const Comp = asChild ? react_slot_1.Slot : "button";
192
+ function SidebarMenuButton(_a) {
193
+ var { asChild = false, isActive = false, variant = "default", size = "default", tooltip, className } = _a, props = __rest(_a, ["asChild", "isActive", "variant", "size", "tooltip", "className"]);
194
+ const Comp = asChild ? Slot : "button";
230
195
  const { isMobile, state } = useSidebar();
231
- const button = ((0, jsx_runtime_1.jsx)(Comp, { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: (0, cn_1.cn)(sidebarMenuButtonVariants({ variant, size }), className), ...props }));
196
+ const button = (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: cn(sidebarMenuButtonVariants({ variant, size }), className) }, props)));
232
197
  if (!tooltip) {
233
198
  return button;
234
199
  }
@@ -237,34 +202,41 @@ function SidebarMenuButton({ asChild = false, isActive = false, variant = "defau
237
202
  children: tooltip,
238
203
  };
239
204
  }
240
- return ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { asChild: true, children: button }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", align: "center", hidden: state !== "collapsed" || isMobile, ...tooltip })] }));
205
+ return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: button }), _jsx(TooltipContent, Object.assign({ side: "right", align: "center", hidden: state !== "collapsed" || isMobile }, tooltip))] }));
241
206
  }
242
- function SidebarMenuAction({ className, asChild = false, showOnHover = false, ...props }) {
243
- const Comp = asChild ? react_slot_1.Slot : "button";
244
- return ((0, jsx_runtime_1.jsx)(Comp, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: (0, cn_1.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
207
+ function SidebarMenuAction(_a) {
208
+ var { className, asChild = false, showOnHover = false } = _a, props = __rest(_a, ["className", "asChild", "showOnHover"]);
209
+ const Comp = asChild ? Slot : "button";
210
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
245
211
  // Increases the hit area of the button on mobile.
246
212
  "after:absolute after:-inset-2 md:after:hidden", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", showOnHover &&
247
- "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className), ...props }));
213
+ "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0", className) }, props)));
248
214
  }
249
- function SidebarMenuBadge({ className, ...props }) {
250
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: (0, cn_1.cn)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className), ...props }));
215
+ function SidebarMenuBadge(_a) {
216
+ var { className } = _a, props = __rest(_a, ["className"]);
217
+ return (_jsx("div", Object.assign({ "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", className) }, props)));
251
218
  }
252
- function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
219
+ function SidebarMenuSkeleton(_a) {
220
+ var { className, showIcon = false } = _a, props = __rest(_a, ["className", "showIcon"]);
253
221
  // Random width between 50 to 90%.
254
222
  const width = React.useMemo(() => {
255
223
  return `${Math.floor(Math.random() * 40) + 50}%`;
256
224
  }, []);
257
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: (0, cn_1.cn)("flex h-8 items-center gap-2 rounded-md px-2", className), ...props, children: [showIcon && ((0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" })), (0, jsx_runtime_1.jsx)(skeleton_1.Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
225
+ return (_jsxs("div", Object.assign({ "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn("flex h-8 items-center gap-2 rounded-md px-2", className) }, props, { children: [showIcon && (_jsx(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" })), _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
258
226
  "--skeleton-width": width,
259
- } })] }));
227
+ } })] })));
260
228
  }
261
- function SidebarMenuSub({ className, ...props }) {
262
- return ((0, jsx_runtime_1.jsx)("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: (0, cn_1.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className), ...props }));
229
+ function SidebarMenuSub(_a) {
230
+ var { className } = _a, props = __rest(_a, ["className"]);
231
+ return (_jsx("ul", Object.assign({ "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5", "group-data-[collapsible=icon]:hidden", className) }, props)));
263
232
  }
264
- function SidebarMenuSubItem({ className, ...props }) {
265
- return ((0, jsx_runtime_1.jsx)("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: (0, cn_1.cn)("group/menu-sub-item relative", className), ...props }));
233
+ function SidebarMenuSubItem(_a) {
234
+ var { className } = _a, props = __rest(_a, ["className"]);
235
+ return (_jsx("li", Object.assign({ "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn("group/menu-sub-item relative", className) }, props)));
266
236
  }
267
- function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false, className, ...props }) {
268
- const Comp = asChild ? react_slot_1.Slot : "a";
269
- return ((0, jsx_runtime_1.jsx)(Comp, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: (0, cn_1.cn)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className), ...props }));
237
+ function SidebarMenuSubButton(_a) {
238
+ var { asChild = false, size = "md", isActive = false, className } = _a, props = __rest(_a, ["asChild", "size", "isActive", "className"]);
239
+ const Comp = asChild ? Slot : "a";
240
+ return (_jsx(Comp, Object.assign({ "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 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", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", size === "sm" && "text-xs", size === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", className) }, props)));
270
241
  }
242
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -1,8 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Skeleton = Skeleton;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const cn_1 = require("../utils/cn");
6
- function Skeleton({ className, ...props }) {
7
- return ((0, jsx_runtime_1.jsx)("div", { "data-slot": "skeleton", className: (0, cn_1.cn)("animate-pulse rounded-md", className), style: { backgroundColor: "var(--keross-skeleton-bg)" }, ...props }));
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { cn } from "../utils/cn";
14
+ function Skeleton(_a) {
15
+ var { className } = _a, props = __rest(_a, ["className"]);
16
+ return (_jsx("div", Object.assign({ "data-slot": "skeleton", className: cn("animate-pulse rounded-md", className), style: { backgroundColor: "var(--keross-skeleton-bg)" } }, props)));
8
17
  }
18
+ export { Skeleton };
@@ -1,49 +1,26 @@
1
- "use strict";
2
1
  "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.Slider = Slider;
38
- const jsx_runtime_1 = require("react/jsx-runtime");
39
- const React = __importStar(require("react"));
40
- const SliderPrimitive = __importStar(require("@radix-ui/react-slider"));
41
- const cn_1 = require("../utils/cn");
42
- function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import * as React from "react";
15
+ import * as SliderPrimitive from "@radix-ui/react-slider";
16
+ import { cn } from "../utils/cn";
17
+ function Slider(_a) {
18
+ var { className, defaultValue, value, min = 0, max = 100 } = _a, props = __rest(_a, ["className", "defaultValue", "value", "min", "max"]);
43
19
  const _values = React.useMemo(() => Array.isArray(value)
44
20
  ? value
45
21
  : Array.isArray(defaultValue)
46
22
  ? defaultValue
47
23
  : [min, max], [value, defaultValue, min, max]);
48
- return ((0, jsx_runtime_1.jsxs)(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: (0, cn_1.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className), ...props, children: [(0, jsx_runtime_1.jsx)(SliderPrimitive.Track, { "data-slot": "slider-track", className: (0, cn_1.cn)("relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"), style: { backgroundColor: "var(--keross-skeleton-bg)" }, children: (0, jsx_runtime_1.jsx)(SliderPrimitive.Range, { "data-slot": "slider-range", className: (0, cn_1.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full") }) }), Array.from({ length: _values.length }, (_, index) => ((0, jsx_runtime_1.jsx)(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "border-primary bg-white ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
24
+ return (_jsxs(SliderPrimitive.Root, Object.assign({ "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className) }, props, { children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn("relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"), style: { backgroundColor: "var(--keross-skeleton-bg)" }, children: _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full") }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "border-primary bg-white ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] })));
49
25
  }
26
+ export { Slider };
@@ -1,16 +1,25 @@
1
- "use strict";
2
1
  "use client";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Toaster = void 0;
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const next_themes_1 = require("next-themes");
7
- const sonner_1 = require("sonner");
8
- const Toaster = ({ ...props }) => {
9
- const { theme = "system" } = (0, next_themes_1.useTheme)();
10
- return ((0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme, className: "toaster group", style: {
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { useTheme } from "next-themes";
15
+ import { Toaster as Sonner } from "sonner";
16
+ const Toaster = (_a) => {
17
+ var props = __rest(_a, []);
18
+ const { theme = "system" } = useTheme();
19
+ return (_jsx(Sonner, Object.assign({ theme: theme, className: "toaster group", style: {
11
20
  "--normal-bg": "var(--popover)",
12
21
  "--normal-text": "var(--popover-foreground)",
13
22
  "--normal-border": "var(--border)",
14
- }, ...props }));
23
+ } }, props)));
15
24
  };
16
- exports.Toaster = Toaster;
25
+ export { Toaster };
@@ -1,43 +1,20 @@
1
- "use strict";
2
1
  "use client";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || (function () {
20
- var ownKeys = function(o) {
21
- ownKeys = Object.getOwnPropertyNames || function (o) {
22
- var ar = [];
23
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
- return ar;
25
- };
26
- return ownKeys(o);
27
- };
28
- return function (mod) {
29
- if (mod && mod.__esModule) return mod;
30
- var result = {};
31
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
- __setModuleDefault(result, mod);
33
- return result;
34
- };
35
- })();
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.Switch = Switch;
38
- const jsx_runtime_1 = require("react/jsx-runtime");
39
- const SwitchPrimitive = __importStar(require("@radix-ui/react-switch"));
40
- const cn_1 = require("../utils/cn");
41
- function Switch({ className, ...props }) {
42
- return ((0, jsx_runtime_1.jsx)(SwitchPrimitive.Root, { "data-slot": "switch", className: (0, cn_1.cn)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: (0, jsx_runtime_1.jsx)(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: (0, cn_1.cn)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0") }) }));
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
15
+ import { cn } from "../utils/cn";
16
+ function Switch(_a) {
17
+ var { className } = _a, props = __rest(_a, ["className"]);
18
+ return (_jsx(SwitchPrimitive.Root, Object.assign({ "data-slot": "switch", className: cn("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0") }) })));
43
19
  }
20
+ export { Switch };