@a2v2ai/uikit 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Alert/Alert.d.ts +1 -1
- package/Alert/Alert.js +9 -48
- package/AlertDialog/AlertDialog.d.ts +3 -3
- package/AlertDialog/AlertDialog.js +19 -69
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js +10 -49
- package/Badge/Badge.d.ts +1 -1
- package/Badge/Badge.js +7 -10
- package/Breadcrumb/Breadcrumb.js +14 -56
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +9 -46
- package/Calendar/Calendar.js +43 -79
- package/Card/Card.d.ts +1 -1
- package/Card/Card.js +12 -54
- package/Carousel/Carousel.d.ts +5 -5
- package/Carousel/Carousel.js +20 -67
- package/ChatBubble/ChatBubble.d.ts +2 -2
- package/ChatBubble/ChatBubble.js +9 -47
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.js +9 -46
- package/DataTable/DataTable.d.ts +21 -0
- package/DataTable/DataTable.js +20 -0
- package/Drawer/Drawer.d.ts +2 -2
- package/Drawer/Drawer.js +20 -34
- package/DropdownMenu/DropdownMenu.js +15 -65
- package/ErrorMessage/ErrorMessage.js +6 -7
- package/Flex/Flex.d.ts +1 -1
- package/Flex/Flex.js +7 -44
- package/IconButton/IconButton.d.ts +1 -1
- package/IconButton/IconButton.js +9 -46
- package/Input/Input.d.ts +1 -1
- package/Input/Input.js +12 -48
- package/InputOTP/InputOTP.d.ts +2 -2
- package/InputOTP/InputOTP.js +15 -56
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js +11 -48
- package/Loader/Loader.d.ts +1 -1
- package/Loader/Loader.js +10 -47
- package/Menubar/Menubar.js +22 -71
- package/Menubar/index.js +1 -20
- package/Popover/Popover.js +6 -45
- package/Progress/Progress.d.ts +2 -2
- package/Progress/Progress.js +9 -47
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/RadioGroup/RadioGroup.js +10 -48
- package/ScrollArea/ScrollArea.js +8 -45
- package/Select/Select.d.ts +1 -1
- package/Select/Select.js +20 -65
- package/Separator/Separator.js +6 -42
- package/Sidebar/Sidebar.d.ts +2 -2
- package/Sidebar/Sidebar.js +22 -67
- package/Sidebar/index.js +1 -17
- package/Skeleton/Skeleton.js +5 -6
- package/Slider/Slider.js +6 -42
- package/Spinner/Spinner.d.ts +1 -1
- package/Spinner/Spinner.js +7 -44
- package/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.js +9 -46
- package/Table/Table.js +12 -55
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +10 -50
- package/Textarea/Textarea.d.ts +1 -1
- package/Textarea/Textarea.js +9 -45
- package/Toast/Toast.js +10 -14
- package/Tooltip/Tooltip.d.ts +1 -1
- package/Tooltip/Tooltip.js +11 -50
- package/Typography/Typography.d.ts +1 -1
- package/Typography/Typography.js +12 -15
- package/helpers.js +4 -12
- package/icons.js +1 -17
- package/index.d.ts +1 -0
- package/index.js +41 -233
- package/lib/typography-types.js +2 -5
- package/lib/utils.js +5 -9
- package/package.json +2 -1
- package/tmpclaude-2407-cwd +1 -0
package/RadioGroup/RadioGroup.js
CHANGED
|
@@ -1,51 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 ((
|
|
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 =
|
|
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 ((
|
|
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 };
|
package/ScrollArea/ScrollArea.js
CHANGED
|
@@ -1,48 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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) => ((
|
|
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: (
|
|
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 };
|
package/Select/Select.d.ts
CHANGED
|
@@ -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/
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
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
|
-
|
|
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 ((
|
|
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) => ((
|
|
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) => ((
|
|
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) => ((
|
|
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: [(
|
|
84
|
-
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), (
|
|
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) => ((
|
|
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) => ((
|
|
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) => ((
|
|
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, };
|
package/Separator/Separator.js
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 };
|
package/Sidebar/Sidebar.d.ts
CHANGED
|
@@ -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/
|
|
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/
|
|
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
|
}
|
package/Sidebar/Sidebar.js
CHANGED
|
@@ -1,45 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 ((
|
|
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 ((
|
|
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 ((
|
|
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 ((
|
|
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 ((
|
|
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 ((
|
|
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 =
|
|
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 ((
|
|
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 ((
|
|
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 =
|
|
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 ((
|
|
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 ((
|
|
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 ((
|
|
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
|
-
|
|
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";
|
package/Skeleton/Skeleton.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const utils_1 = require("../lib/utils");
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
6
4
|
function Skeleton({ className, ...props }) {
|
|
7
|
-
return ((
|
|
5
|
+
return (_jsx("div", { className: cn("animate-pulse rounded-md bg-grey-100", className), ...props }));
|
|
8
6
|
}
|
|
7
|
+
export { Skeleton };
|
package/Slider/Slider.js
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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.Slider = void 0;
|
|
37
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
const React = __importStar(require("react"));
|
|
39
|
-
const SliderPrimitive = __importStar(require("@radix-ui/react-slider"));
|
|
40
|
-
const utils_1 = require("../lib/utils");
|
|
41
|
-
const Slider = React.forwardRef(({ className, ...props }, ref) => ((0, jsx_runtime_1.jsxs)(SliderPrimitive.Root, { ref: ref, className: (0, utils_1.cn)("relative flex w-full touch-none select-none items-center", className), ...props, children: [(0, jsx_runtime_1.jsx)(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-grey-300", children: (0, jsx_runtime_1.jsx)(SliderPrimitive.Range, { className: "absolute h-full bg-main-900" }) }), (0, jsx_runtime_1.jsx)(SliderPrimitive.Thumb, { className: "block size-3 rounded-full border border-main-900 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-600 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })] })));
|
|
42
|
-
exports.Slider = Slider;
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
const Slider = React.forwardRef(({ className, ...props }, ref) => (_jsxs(SliderPrimitive.Root, { ref: ref, className: cn("relative flex w-full touch-none select-none items-center", className), ...props, children: [_jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-grey-300", children: _jsx(SliderPrimitive.Range, { className: "absolute h-full bg-main-900" }) }), _jsx(SliderPrimitive.Thumb, { className: "block size-3 rounded-full border border-main-900 bg-white shadow transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-600 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })] })));
|
|
43
6
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
7
|
+
export { Slider };
|
package/Spinner/Spinner.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type SpinnerVariant = "default" | "primary" | "secondary" | "muted" | "white";
|
|
|
4
4
|
declare const spinnerVariants: (props?: ({
|
|
5
5
|
size?: "default" | "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
6
6
|
variant?: "default" | "secondary" | "primary" | "white" | "muted" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface SpinnerProps extends React.SVGAttributes<SVGSVGElement> {
|
|
9
9
|
size?: SpinnerSize;
|
|
10
10
|
variant?: SpinnerVariant;
|