@a2v2ai/uikit 0.0.29 → 0.0.31

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 (78) hide show
  1. package/Alert/Alert.d.ts +1 -1
  2. package/Alert/Alert.js +9 -48
  3. package/AlertDialog/AlertDialog.d.ts +3 -3
  4. package/AlertDialog/AlertDialog.js +19 -69
  5. package/Avatar/Avatar.d.ts +1 -1
  6. package/Avatar/Avatar.js +10 -49
  7. package/Badge/Badge.d.ts +1 -1
  8. package/Badge/Badge.js +7 -10
  9. package/Breadcrumb/Breadcrumb.js +14 -56
  10. package/Button/Button.d.ts +1 -1
  11. package/Button/Button.js +9 -46
  12. package/Calendar/Calendar.js +43 -79
  13. package/Card/Card.d.ts +1 -1
  14. package/Card/Card.js +12 -54
  15. package/Carousel/Carousel.d.ts +5 -5
  16. package/Carousel/Carousel.js +20 -67
  17. package/ChatBubble/ChatBubble.d.ts +2 -2
  18. package/ChatBubble/ChatBubble.js +9 -47
  19. package/Checkbox/Checkbox.d.ts +1 -1
  20. package/Checkbox/Checkbox.js +9 -46
  21. package/DataTable/DataTable.d.ts +17 -3
  22. package/DataTable/DataTable.js +36 -9
  23. package/Drawer/Drawer.d.ts +2 -2
  24. package/Drawer/Drawer.js +20 -34
  25. package/DropdownMenu/DropdownMenu.js +15 -65
  26. package/ErrorMessage/ErrorMessage.js +6 -7
  27. package/Flex/Flex.d.ts +1 -1
  28. package/Flex/Flex.js +7 -44
  29. package/IconButton/IconButton.d.ts +1 -1
  30. package/IconButton/IconButton.js +9 -46
  31. package/Input/Input.d.ts +1 -1
  32. package/Input/Input.js +12 -48
  33. package/InputOTP/InputOTP.d.ts +2 -2
  34. package/InputOTP/InputOTP.js +15 -56
  35. package/Label/Label.d.ts +1 -1
  36. package/Label/Label.js +11 -48
  37. package/Loader/Loader.d.ts +1 -1
  38. package/Loader/Loader.js +10 -47
  39. package/Menubar/Menubar.js +22 -71
  40. package/Menubar/index.js +1 -20
  41. package/Pagination/Pagination.d.ts +35 -0
  42. package/Pagination/Pagination.js +37 -0
  43. package/Popover/Popover.js +6 -45
  44. package/Progress/Progress.d.ts +2 -2
  45. package/Progress/Progress.js +9 -47
  46. package/RadioGroup/RadioGroup.d.ts +1 -1
  47. package/RadioGroup/RadioGroup.js +10 -48
  48. package/ScrollArea/ScrollArea.js +8 -45
  49. package/Select/Select.d.ts +1 -1
  50. package/Select/Select.js +20 -65
  51. package/Separator/Separator.js +6 -42
  52. package/Sidebar/Sidebar.d.ts +2 -2
  53. package/Sidebar/Sidebar.js +22 -67
  54. package/Sidebar/index.js +1 -17
  55. package/Skeleton/Skeleton.js +5 -6
  56. package/Slider/Slider.js +6 -42
  57. package/Spinner/Spinner.d.ts +1 -1
  58. package/Spinner/Spinner.js +7 -44
  59. package/Switch/Switch.d.ts +1 -1
  60. package/Switch/Switch.js +9 -46
  61. package/Table/Table.js +12 -55
  62. package/Tabs/Tabs.d.ts +1 -1
  63. package/Tabs/Tabs.js +10 -50
  64. package/Textarea/Textarea.d.ts +1 -1
  65. package/Textarea/Textarea.js +9 -45
  66. package/Toast/Toast.js +10 -14
  67. package/Tooltip/Tooltip.d.ts +1 -1
  68. package/Tooltip/Tooltip.js +11 -50
  69. package/Typography/Typography.d.ts +1 -1
  70. package/Typography/Typography.js +12 -15
  71. package/helpers.js +4 -12
  72. package/icons.js +1 -17
  73. package/index.d.ts +2 -1
  74. package/index.js +42 -235
  75. package/lib/typography-types.js +2 -5
  76. package/lib/utils.js +5 -9
  77. package/package.json +2 -1
  78. package/tmpclaude-2407-cwd +1 -0
@@ -1,45 +1,9 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.progressIndicatorVariants = exports.progressVariants = exports.Progress = void 0;
37
- const jsx_runtime_1 = require("react/jsx-runtime");
38
- const React = __importStar(require("react"));
39
- const ProgressPrimitive = __importStar(require("@radix-ui/react-progress"));
40
- const class_variance_authority_1 = require("class-variance-authority");
41
- const utils_1 = require("../lib/utils");
42
- const progressVariants = (0, class_variance_authority_1.cva)("relative w-full overflow-hidden rounded-full bg-grey-100", {
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../lib/utils";
6
+ const progressVariants = cva("relative w-full overflow-hidden rounded-full bg-grey-100", {
43
7
  variants: {
44
8
  size: {
45
9
  small: "h-1",
@@ -51,8 +15,7 @@ const progressVariants = (0, class_variance_authority_1.cva)("relative w-full ov
51
15
  size: "regular",
52
16
  },
53
17
  });
54
- exports.progressVariants = progressVariants;
55
- const progressIndicatorVariants = (0, class_variance_authority_1.cva)("h-full w-full flex-1 transition-all", {
18
+ const progressIndicatorVariants = cva("h-full w-full flex-1 transition-all", {
56
19
  variants: {
57
20
  variant: {
58
21
  default: "bg-accent-600",
@@ -65,7 +28,6 @@ const progressIndicatorVariants = (0, class_variance_authority_1.cva)("h-full w-
65
28
  variant: "default",
66
29
  },
67
30
  });
68
- exports.progressIndicatorVariants = progressIndicatorVariants;
69
- const Progress = React.forwardRef(({ className, value, size, variant, ...props }, ref) => ((0, jsx_runtime_1.jsx)(ProgressPrimitive.Root, { ref: ref, className: (0, utils_1.cn)(progressVariants({ size }), className), ...props, children: (0, jsx_runtime_1.jsx)(ProgressPrimitive.Indicator, { className: (0, utils_1.cn)(progressIndicatorVariants({ variant })), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
70
- exports.Progress = Progress;
31
+ const Progress = React.forwardRef(({ className, value, size, variant, ...props }, ref) => (_jsx(ProgressPrimitive.Root, { ref: ref, className: cn(progressVariants({ size }), className), ...props, children: _jsx(ProgressPrimitive.Indicator, { className: cn(progressIndicatorVariants({ variant })), style: { transform: `translateX(-${100 - (value || 0)}%)` } }) })));
71
32
  Progress.displayName = ProgressPrimitive.Root.displayName;
33
+ export { Progress, progressVariants, progressIndicatorVariants };
@@ -4,7 +4,7 @@ type RadioGroupItemSize = "small" | "regular";
4
4
  declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const radioGroupItemVariants: (props?: ({
6
6
  size?: "small" | "regular" | null | undefined;
7
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  export interface RadioGroupItemProps extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item> {
9
9
  size?: RadioGroupItemSize;
10
10
  }
@@ -1,51 +1,14 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.radioGroupItemVariants = exports.RadioGroupItem = exports.RadioGroup = void 0;
37
- const jsx_runtime_1 = require("react/jsx-runtime");
38
- const React = __importStar(require("react"));
39
- const RadioGroupPrimitive = __importStar(require("@radix-ui/react-radio-group"));
40
- const lucide_react_1 = require("lucide-react");
41
- const class_variance_authority_1 = require("class-variance-authority");
42
- const utils_1 = require("../lib/utils");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
4
+ import { Circle } from "lucide-react";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../lib/utils";
43
7
  const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
44
- return ((0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Root, { className: (0, utils_1.cn)("grid gap-2", className), ...props, ref: ref }));
8
+ return (_jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
45
9
  });
46
- exports.RadioGroup = RadioGroup;
47
10
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
48
- const radioGroupItemVariants = (0, class_variance_authority_1.cva)("aspect-square rounded-full border border-grey-300 bg-white text-main-950 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-main-950", {
11
+ const radioGroupItemVariants = cva("aspect-square rounded-full border border-grey-300 bg-white text-main-950 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-main-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-main-950", {
49
12
  variants: {
50
13
  size: {
51
14
  small: "size-4",
@@ -56,9 +19,8 @@ const radioGroupItemVariants = (0, class_variance_authority_1.cva)("aspect-squar
56
19
  size: "regular",
57
20
  },
58
21
  });
59
- exports.radioGroupItemVariants = radioGroupItemVariants;
60
22
  const RadioGroupItem = React.forwardRef(({ className, size, ...props }, ref) => {
61
- return ((0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Item, { ref: ref, className: (0, utils_1.cn)(radioGroupItemVariants({ size }), className), ...props, children: (0, jsx_runtime_1.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Circle, { className: (0, utils_1.cn)("fill-main-950 text-main-950", size === "small" ? "size-2" : "size-2.5") }) }) }));
23
+ return (_jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn(radioGroupItemVariants({ size }), className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: _jsx(Circle, { className: cn("fill-main-950 text-main-950", size === "small" ? "size-2" : "size-2.5") }) }) }));
62
24
  });
63
- exports.RadioGroupItem = RadioGroupItem;
64
25
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
26
+ export { RadioGroup, RadioGroupItem, radioGroupItemVariants };
@@ -1,48 +1,11 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ScrollBar = exports.ScrollArea = void 0;
37
- const jsx_runtime_1 = require("react/jsx-runtime");
38
- const React = __importStar(require("react"));
39
- const ScrollAreaPrimitive = __importStar(require("@radix-ui/react-scroll-area"));
40
- const utils_1 = require("../lib/utils");
41
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(ScrollAreaPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("relative overflow-hidden", className), ...props, children: [(0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), (0, jsx_runtime_1.jsx)(ScrollBar, {}), (0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.Corner, {})] })));
42
- exports.ScrollArea = ScrollArea;
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4
+ import { cn } from "../lib/utils";
5
+ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(ScrollAreaPrimitive.Root, { ref: ref, className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] })));
43
6
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
44
- const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => ((0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: (0, utils_1.cn)("flex touch-none select-none transition-colors", orientation === "vertical" &&
7
+ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { ref: ref, orientation: orientation, className: cn("flex touch-none select-none transition-colors", orientation === "vertical" &&
45
8
  "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" &&
46
- "h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: (0, jsx_runtime_1.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-grey-300" }) })));
47
- exports.ScrollBar = ScrollBar;
9
+ "h-2.5 flex-col border-t border-t-transparent p-[1px]", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-grey-300" }) })));
48
10
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
11
+ export { ScrollArea, ScrollBar };
@@ -9,7 +9,7 @@ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.Selec
9
9
  declare const selectTriggerVariants: (props?: ({
10
10
  size?: "small" | "regular" | "large" | null | undefined;
11
11
  variant?: "default" | "error" | null | undefined;
12
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
13
  export interface SelectTriggerProps extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {
14
14
  size?: SelectTriggerSize;
15
15
  variant?: SelectTriggerVariant;
package/Select/Select.js CHANGED
@@ -1,54 +1,16 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.selectTriggerVariants = exports.SelectScrollDownButton = exports.SelectScrollUpButton = exports.SelectSeparator = exports.SelectItem = exports.SelectLabel = exports.SelectContent = exports.SelectTrigger = exports.SelectValue = exports.SelectGroup = exports.Select = void 0;
37
- const jsx_runtime_1 = require("react/jsx-runtime");
38
- const React = __importStar(require("react"));
39
- const SelectPrimitive = __importStar(require("@radix-ui/react-select"));
40
- const lucide_react_1 = require("lucide-react");
41
- const class_variance_authority_1 = require("class-variance-authority");
42
- const utils_1 = require("../lib/utils");
43
- const Typography_1 = require("../Typography/Typography");
44
- const Label_1 = require("../Label/Label");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as SelectPrimitive from "@radix-ui/react-select";
4
+ import { Check, ChevronDown, ChevronUp } from "lucide-react";
5
+ import { cva } from "class-variance-authority";
6
+ import { cn } from "../lib/utils";
7
+ import { Typography } from "../Typography/Typography";
8
+ import { Label } from "../Label/Label";
9
+ import {} from "../lib/typography-types";
45
10
  const Select = SelectPrimitive.Root;
46
- exports.Select = Select;
47
11
  const SelectGroup = SelectPrimitive.Group;
48
- exports.SelectGroup = SelectGroup;
49
12
  const SelectValue = SelectPrimitive.Value;
50
- exports.SelectValue = SelectValue;
51
- const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full items-center justify-between whitespace-nowrap border bg-white text-main-950 ring-offset-white placeholder:text-grey-400 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
13
+ const selectTriggerVariants = cva("flex w-full items-center justify-between whitespace-nowrap border bg-white text-main-950 ring-offset-white placeholder:text-grey-400 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", {
52
14
  variants: {
53
15
  size: {
54
16
  small: "h-8 px-3 text-sm rounded-md",
@@ -65,31 +27,24 @@ const selectTriggerVariants = (0, class_variance_authority_1.cva)("flex w-full i
65
27
  variant: "default",
66
28
  },
67
29
  });
68
- exports.selectTriggerVariants = selectTriggerVariants;
69
30
  const SelectTrigger = React.forwardRef(({ className, size, variant, label, labelVariant = "body2", labelColor = "main-800", error, children, id, ...props }, ref) => {
70
31
  const computedVariant = error ? "error" : variant;
71
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), (0, jsx_runtime_1.jsxs)(SelectPrimitive.Trigger, { ref: ref, id: id, className: (0, utils_1.cn)(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, (0, jsx_runtime_1.jsx)(SelectPrimitive.Icon, { asChild: true, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4 opacity-50" }) })] }), error && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
32
+ return (_jsxs("div", { className: "flex flex-col gap-2 w-full", children: [label && (_jsx(Label, { htmlFor: id, variant: labelVariant, color: labelColor, children: label })), _jsxs(SelectPrimitive.Trigger, { ref: ref, id: id, className: cn(selectTriggerVariants({ size, variant: computedVariant }), className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "size-4 opacity-50" }) })] }), error && (_jsx(Typography, { variant: "caption", color: "error-600", className: "mt-1", children: error }))] }));
72
33
  });
73
- exports.SelectTrigger = SelectTrigger;
74
34
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
75
- const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollUpButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { className: "size-4" }) })));
76
- exports.SelectScrollUpButton = SelectScrollUpButton;
35
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "size-4" }) })));
77
36
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
78
- const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.ScrollDownButton, { ref: ref, className: (0, utils_1.cn)("flex cursor-default items-center justify-center py-1", className), ...props, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4" }) })));
79
- exports.SelectScrollDownButton = SelectScrollDownButton;
37
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "size-4" }) })));
80
38
  SelectScrollDownButton.displayName =
81
39
  SelectPrimitive.ScrollDownButton.displayName;
82
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Portal, { children: (0, jsx_runtime_1.jsxs)(SelectPrimitive.Content, { ref: ref, className: (0, utils_1.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white text-main-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
83
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [(0, jsx_runtime_1.jsx)(SelectScrollUpButton, {}), (0, jsx_runtime_1.jsx)(SelectPrimitive.Viewport, { className: (0, utils_1.cn)("p-1", position === "popper" &&
84
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), (0, jsx_runtime_1.jsx)(SelectScrollDownButton, {})] }) })));
85
- exports.SelectContent = SelectContent;
40
+ const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-lg border border-grey-200 bg-white text-main-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
41
+ "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
42
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
86
43
  SelectContent.displayName = SelectPrimitive.Content.displayName;
87
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Label, { ref: ref, className: (0, utils_1.cn)("px-2 py-1.5 text-sm font-semibold text-grey-500", className), ...props })));
88
- exports.SelectLabel = SelectLabel;
44
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold text-grey-500", className), ...props })));
89
45
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
90
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SelectPrimitive.Item, { ref: ref, className: (0, utils_1.cn)("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [(0, jsx_runtime_1.jsx)("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemIndicator, { children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { className: "size-4" }) }) }), (0, jsx_runtime_1.jsx)(SelectPrimitive.ItemText, { children: children })] })));
91
- exports.SelectItem = SelectItem;
46
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-grey-100 focus:text-main-950 data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
92
47
  SelectItem.displayName = SelectPrimitive.Item.displayName;
93
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SelectPrimitive.Separator, { ref: ref, className: (0, utils_1.cn)("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
94
- exports.SelectSeparator = SelectSeparator;
48
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-grey-100", className), ...props })));
95
49
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
50
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, selectTriggerVariants, };
@@ -1,43 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Separator = void 0;
37
- const jsx_runtime_1 = require("react/jsx-runtime");
38
- const React = __importStar(require("react"));
39
- const SeparatorPrimitive = __importStar(require("@radix-ui/react-separator"));
40
- const utils_1 = require("../lib/utils");
41
- const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => ((0, jsx_runtime_1.jsx)(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: (0, utils_1.cn)("shrink-0 bg-grey-200", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
42
- exports.Separator = Separator;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
4
+ import { cn } from "../lib/utils";
5
+ const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => (_jsx(SeparatorPrimitive.Root, { ref: ref, decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-grey-200", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className), ...props })));
43
6
  Separator.displayName = SeparatorPrimitive.Root.displayName;
7
+ export { Separator };
@@ -23,7 +23,7 @@ export type SidebarGroupLabelProps = React.HTMLAttributes<HTMLDivElement>;
23
23
  declare const SidebarGroupLabel: React.ForwardRefExoticComponent<SidebarGroupLabelProps & React.RefAttributes<HTMLDivElement>>;
24
24
  declare const sidebarMenuItemVariants: (props?: ({
25
25
  active?: boolean | null | undefined;
26
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
26
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
27
27
  export interface SidebarMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarMenuItemVariants> {
28
28
  icon?: React.ReactNode;
29
29
  label: string;
@@ -36,7 +36,7 @@ export interface SidebarMenuItemProps extends React.HTMLAttributes<HTMLDivElemen
36
36
  declare const SidebarMenuItem: React.ForwardRefExoticComponent<SidebarMenuItemProps & React.RefAttributes<HTMLDivElement>>;
37
37
  declare const sidebarSubMenuItemVariants: (props?: ({
38
38
  active?: boolean | null | undefined;
39
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
39
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
40
40
  export interface SidebarSubMenuItemProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof sidebarSubMenuItemVariants> {
41
41
  label: string;
42
42
  }
@@ -1,45 +1,8 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.sidebarSubMenuItemVariants = exports.sidebarMenuItemVariants = exports.SidebarToggle = exports.SidebarSeparator = exports.SidebarSubMenuItem = exports.SidebarMenuItem = exports.SidebarGroupLabel = exports.SidebarGroup = exports.SidebarFooter = exports.SidebarContent = exports.SidebarHeader = exports.Sidebar = void 0;
37
- exports.useSidebar = useSidebar;
38
- const jsx_runtime_1 = require("react/jsx-runtime");
39
- const React = __importStar(require("react"));
40
- const class_variance_authority_1 = require("class-variance-authority");
41
- const lucide_react_1 = require("lucide-react");
42
- const utils_1 = require("../lib/utils");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { ChevronDown, ChevronRight } from "lucide-react";
5
+ import { cn } from "../lib/utils";
43
6
  const SidebarContext = React.createContext(undefined);
44
7
  function useSidebar() {
45
8
  const context = React.useContext(SidebarContext);
@@ -58,46 +21,40 @@ const Sidebar = React.forwardRef(({ className, collapsed: controlledCollapsed, o
58
21
  }
59
22
  onCollapsedChange?.(value);
60
23
  }, [isControlled, onCollapsedChange]);
61
- return ((0, jsx_runtime_1.jsx)(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: (0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar", "data-collapsed": collapsed, className: (0, utils_1.cn)("flex h-full flex-col bg-white border-r border-grey-200 transition-all duration-300", collapsed ? "w-[52px]" : "w-[240px]", className), ...props, children: children }) }));
24
+ return (_jsx(SidebarContext.Provider, { value: { collapsed, setCollapsed }, children: _jsx("div", { ref: ref, "data-slot": "sidebar", "data-collapsed": collapsed, className: cn("flex h-full flex-col bg-white border-r border-grey-200 transition-all duration-300", collapsed ? "w-[52px]" : "w-[240px]", className), ...props, children: children }) }));
62
25
  });
63
- exports.Sidebar = Sidebar;
64
26
  Sidebar.displayName = "Sidebar";
65
27
  const SidebarHeader = React.forwardRef(({ className, children, ...props }, ref) => {
66
28
  const { collapsed } = useSidebar();
67
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-header", className: (0, utils_1.cn)("flex shrink-0 items-center", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
29
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-header", className: cn("flex shrink-0 items-center", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
68
30
  });
69
- exports.SidebarHeader = SidebarHeader;
70
31
  SidebarHeader.displayName = "SidebarHeader";
71
32
  const SidebarContent = React.forwardRef(({ className, children, ...props }, ref) => {
72
33
  const { collapsed } = useSidebar();
73
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-content", className: (0, utils_1.cn)("flex-1 overflow-y-auto", collapsed ? "px-2 py-4" : "p-4", className), ...props, children: children }));
34
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-content", className: cn("flex-1 overflow-y-auto", collapsed ? "px-2 py-4" : "p-4", className), ...props, children: children }));
74
35
  });
75
- exports.SidebarContent = SidebarContent;
76
36
  SidebarContent.displayName = "SidebarContent";
77
37
  const SidebarFooter = React.forwardRef(({ className, children, ...props }, ref) => {
78
38
  const { collapsed } = useSidebar();
79
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-footer", className: (0, utils_1.cn)("flex shrink-0 items-center border-t border-grey-200", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
39
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-footer", className: cn("flex shrink-0 items-center border-t border-grey-200", collapsed ? "justify-center p-2" : "p-4", className), ...props, children: children }));
80
40
  });
81
- exports.SidebarFooter = SidebarFooter;
82
41
  SidebarFooter.displayName = "SidebarFooter";
83
42
  const SidebarGroup = React.forwardRef(({ className, children, ...props }, ref) => {
84
43
  const { collapsed } = useSidebar();
85
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-group", className: (0, utils_1.cn)("flex flex-col", collapsed ? "gap-1" : "gap-0.5", className), ...props, children: children }));
44
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-group", className: cn("flex flex-col", collapsed ? "gap-1" : "gap-0.5", className), ...props, children: children }));
86
45
  });
87
- exports.SidebarGroup = SidebarGroup;
88
46
  SidebarGroup.displayName = "SidebarGroup";
89
47
  const SidebarGroupLabel = React.forwardRef(({ className, children, ...props }, ref) => {
90
48
  const { collapsed } = useSidebar();
91
49
  if (collapsed)
92
50
  return null;
93
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-group-label", className: (0, utils_1.cn)("px-3 py-2 text-xs font-normal text-grey-500", className), ...props, children: children }));
51
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-group-label", className: cn("px-3 py-2 text-xs font-normal text-grey-500", className), ...props, children: children }));
94
52
  });
95
- exports.SidebarGroupLabel = SidebarGroupLabel;
96
53
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
97
54
  /* -----------------------------------------------------------------------------
98
55
  * SidebarMenuItem
99
56
  * -------------------------------------------------------------------------- */
100
- const sidebarMenuItemVariants = (0, class_variance_authority_1.cva)("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
57
+ const sidebarMenuItemVariants = cva("flex items-center gap-2 px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
101
58
  variants: {
102
59
  active: {
103
60
  true: "bg-grey-100 text-grey-900",
@@ -108,7 +65,6 @@ const sidebarMenuItemVariants = (0, class_variance_authority_1.cva)("flex items-
108
65
  active: false,
109
66
  },
110
67
  });
111
- exports.sidebarMenuItemVariants = sidebarMenuItemVariants;
112
68
  const SidebarMenuItem = React.forwardRef(({ className, icon, label, labelClassName, badge, active, hasChildren, expanded, onExpandedChange, children, onClick, ...props }, ref) => {
113
69
  const { collapsed } = useSidebar();
114
70
  const [internalExpanded, setInternalExpanded] = React.useState(expanded ?? false);
@@ -122,16 +78,15 @@ const SidebarMenuItem = React.forwardRef(({ className, icon, label, labelClassNa
122
78
  onClick?.(e);
123
79
  };
124
80
  if (collapsed) {
125
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-menu-item", className: (0, utils_1.cn)("flex items-center justify-center size-9 rounded-lg cursor-pointer transition-colors mx-auto", active ? "bg-grey-100 text-grey-900" : "text-grey-600 hover:bg-grey-50", className), onClick: onClick, ...props, children: icon && (0, jsx_runtime_1.jsx)("span", { className: "size-4", children: icon }) }));
81
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-menu-item", className: cn("flex items-center justify-center size-9 rounded-lg cursor-pointer transition-colors mx-auto", active ? "bg-grey-100 text-grey-900" : "text-grey-600 hover:bg-grey-50", className), onClick: onClick, ...props, children: icon && _jsx("span", { className: "size-4", children: icon }) }));
126
82
  }
127
- return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "sidebar-menu-item-wrapper", children: [(0, jsx_runtime_1.jsxs)("div", { ref: ref, "data-slot": "sidebar-menu-item", className: (0, utils_1.cn)(sidebarMenuItemVariants({ active }), className), onClick: handleClick, ...props, children: [icon && (0, jsx_runtime_1.jsx)("span", { className: "size-4 shrink-0", children: icon }), (0, jsx_runtime_1.jsx)("span", { className: (0, utils_1.cn)("flex-1 truncate", labelClassName), children: label }), badge && (0, jsx_runtime_1.jsx)("span", { className: "shrink-0", children: badge }), hasChildren && ((0, jsx_runtime_1.jsx)("span", { className: "size-4 shrink-0 text-grey-400", children: isExpanded ? (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { className: "size-4" }) : (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronRight, { className: "size-4" }) }))] }), hasChildren && isExpanded && children && ((0, jsx_runtime_1.jsx)("div", { className: "ml-6 mt-1 flex flex-col", children: children }))] }));
83
+ return (_jsxs("div", { "data-slot": "sidebar-menu-item-wrapper", children: [_jsxs("div", { ref: ref, "data-slot": "sidebar-menu-item", className: cn(sidebarMenuItemVariants({ active }), className), onClick: handleClick, ...props, children: [icon && _jsx("span", { className: "size-4 shrink-0", children: icon }), _jsx("span", { className: cn("flex-1 truncate", labelClassName), children: label }), badge && _jsx("span", { className: "shrink-0", children: badge }), hasChildren && (_jsx("span", { className: "size-4 shrink-0 text-grey-400", children: isExpanded ? _jsx(ChevronDown, { className: "size-4" }) : _jsx(ChevronRight, { className: "size-4" }) }))] }), hasChildren && isExpanded && children && (_jsx("div", { className: "ml-6 mt-1 flex flex-col", children: children }))] }));
128
84
  });
129
- exports.SidebarMenuItem = SidebarMenuItem;
130
85
  SidebarMenuItem.displayName = "SidebarMenuItem";
131
86
  /* -----------------------------------------------------------------------------
132
87
  * SidebarSubMenuItem
133
88
  * -------------------------------------------------------------------------- */
134
- const sidebarSubMenuItemVariants = (0, class_variance_authority_1.cva)("flex items-center px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
89
+ const sidebarSubMenuItemVariants = cva("flex items-center px-3 py-2 rounded-md text-sm font-normal cursor-pointer transition-colors outline-none", {
135
90
  variants: {
136
91
  active: {
137
92
  true: "bg-grey-100 text-grey-900",
@@ -142,20 +97,20 @@ const sidebarSubMenuItemVariants = (0, class_variance_authority_1.cva)("flex ite
142
97
  active: false,
143
98
  },
144
99
  });
145
- exports.sidebarSubMenuItemVariants = sidebarSubMenuItemVariants;
146
100
  const SidebarSubMenuItem = React.forwardRef(({ className, label, active, ...props }, ref) => {
147
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-sub-menu-item", className: (0, utils_1.cn)(sidebarSubMenuItemVariants({ active }), className), ...props, children: (0, jsx_runtime_1.jsx)("span", { className: "truncate", children: label }) }));
101
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-sub-menu-item", className: cn(sidebarSubMenuItemVariants({ active }), className), ...props, children: _jsx("span", { className: "truncate", children: label }) }));
148
102
  });
149
- exports.SidebarSubMenuItem = SidebarSubMenuItem;
150
103
  SidebarSubMenuItem.displayName = "SidebarSubMenuItem";
151
104
  const SidebarSeparator = React.forwardRef(({ className, ...props }, ref) => {
152
- return ((0, jsx_runtime_1.jsx)("div", { ref: ref, "data-slot": "sidebar-separator", className: (0, utils_1.cn)("my-2 h-px bg-grey-200", className), ...props }));
105
+ return (_jsx("div", { ref: ref, "data-slot": "sidebar-separator", className: cn("my-2 h-px bg-grey-200", className), ...props }));
153
106
  });
154
- exports.SidebarSeparator = SidebarSeparator;
155
107
  SidebarSeparator.displayName = "SidebarSeparator";
156
108
  const SidebarToggle = React.forwardRef(({ className, children, ...props }, ref) => {
157
109
  const { collapsed, setCollapsed } = useSidebar();
158
- return ((0, jsx_runtime_1.jsx)("button", { ref: ref, "data-slot": "sidebar-toggle", type: "button", className: (0, utils_1.cn)("flex items-center justify-center p-2 rounded-md text-grey-500 hover:bg-grey-100 hover:text-grey-700 transition-colors", className), onClick: () => setCollapsed(!collapsed), ...props, children: children }));
110
+ return (_jsx("button", { ref: ref, "data-slot": "sidebar-toggle", type: "button", className: cn("flex items-center justify-center p-2 rounded-md text-grey-500 hover:bg-grey-100 hover:text-grey-700 transition-colors", className), onClick: () => setCollapsed(!collapsed), ...props, children: children }));
159
111
  });
160
- exports.SidebarToggle = SidebarToggle;
161
112
  SidebarToggle.displayName = "SidebarToggle";
113
+ /* -----------------------------------------------------------------------------
114
+ * Exports
115
+ * -------------------------------------------------------------------------- */
116
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, };
package/Sidebar/index.js CHANGED
@@ -1,17 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sidebarSubMenuItemVariants = exports.sidebarMenuItemVariants = exports.useSidebar = exports.SidebarToggle = exports.SidebarSeparator = exports.SidebarSubMenuItem = exports.SidebarMenuItem = exports.SidebarGroupLabel = exports.SidebarGroup = exports.SidebarFooter = exports.SidebarContent = exports.SidebarHeader = exports.Sidebar = void 0;
4
- var Sidebar_1 = require("./Sidebar");
5
- Object.defineProperty(exports, "Sidebar", { enumerable: true, get: function () { return Sidebar_1.Sidebar; } });
6
- Object.defineProperty(exports, "SidebarHeader", { enumerable: true, get: function () { return Sidebar_1.SidebarHeader; } });
7
- Object.defineProperty(exports, "SidebarContent", { enumerable: true, get: function () { return Sidebar_1.SidebarContent; } });
8
- Object.defineProperty(exports, "SidebarFooter", { enumerable: true, get: function () { return Sidebar_1.SidebarFooter; } });
9
- Object.defineProperty(exports, "SidebarGroup", { enumerable: true, get: function () { return Sidebar_1.SidebarGroup; } });
10
- Object.defineProperty(exports, "SidebarGroupLabel", { enumerable: true, get: function () { return Sidebar_1.SidebarGroupLabel; } });
11
- Object.defineProperty(exports, "SidebarMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarMenuItem; } });
12
- Object.defineProperty(exports, "SidebarSubMenuItem", { enumerable: true, get: function () { return Sidebar_1.SidebarSubMenuItem; } });
13
- Object.defineProperty(exports, "SidebarSeparator", { enumerable: true, get: function () { return Sidebar_1.SidebarSeparator; } });
14
- Object.defineProperty(exports, "SidebarToggle", { enumerable: true, get: function () { return Sidebar_1.SidebarToggle; } });
15
- Object.defineProperty(exports, "useSidebar", { enumerable: true, get: function () { return Sidebar_1.useSidebar; } });
16
- Object.defineProperty(exports, "sidebarMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarMenuItemVariants; } });
17
- Object.defineProperty(exports, "sidebarSubMenuItemVariants", { enumerable: true, get: function () { return Sidebar_1.sidebarSubMenuItemVariants; } });
1
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarMenuItem, SidebarSubMenuItem, SidebarSeparator, SidebarToggle, useSidebar, sidebarMenuItemVariants, sidebarSubMenuItemVariants, } from "./Sidebar";