@pixpilot/shadcn 0.3.1 → 0.3.2
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/dist/_virtual/rolldown_runtime.cjs +25 -1
- package/dist/components/index.cjs +30 -1
- package/dist/components/index.js +30 -1
- package/dist/components/ui/OrContinueWithSeparator.cjs +30 -1
- package/dist/components/ui/OrContinueWithSeparator.js +27 -1
- package/dist/components/ui/alert-dialog.cjs +101 -1
- package/dist/components/ui/alert-dialog.js +87 -1
- package/dist/components/ui/alert.cjs +45 -1
- package/dist/components/ui/alert.d.cts +4 -4
- package/dist/components/ui/alert.js +39 -1
- package/dist/components/ui/avatar.cjs +37 -1
- package/dist/components/ui/avatar.js +31 -1
- package/dist/components/ui/badge.cjs +33 -1
- package/dist/components/ui/badge.js +27 -1
- package/dist/components/ui/button.cjs +52 -1
- package/dist/components/ui/button.js +46 -1
- package/dist/components/ui/calendar.cjs +113 -1
- package/dist/components/ui/calendar.js +107 -1
- package/dist/components/ui/card.cjs +67 -1
- package/dist/components/ui/card.js +58 -1
- package/dist/components/ui/checkbox.cjs +31 -1
- package/dist/components/ui/checkbox.js +26 -1
- package/dist/components/ui/command.cjs +104 -1
- package/dist/components/ui/command.js +91 -1
- package/dist/components/ui/dialog.cjs +102 -1
- package/dist/components/ui/dialog.js +88 -1
- package/dist/components/ui/dropdown-menu.cjs +144 -1
- package/dist/components/ui/dropdown-menu.js +125 -1
- package/dist/components/ui/file-upload.cjs +926 -1
- package/dist/components/ui/file-upload.js +910 -1
- package/dist/components/ui/form.cjs +101 -1
- package/dist/components/ui/form.js +89 -1
- package/dist/components/ui/index.cjs +29 -1
- package/dist/components/ui/index.js +29 -1
- package/dist/components/ui/input.cjs +20 -1
- package/dist/components/ui/input.js +17 -1
- package/dist/components/ui/label.cjs +21 -1
- package/dist/components/ui/label.js +17 -1
- package/dist/components/ui/pagination.cjs +92 -1
- package/dist/components/ui/pagination.js +82 -1
- package/dist/components/ui/popover.cjs +44 -1
- package/dist/components/ui/popover.js +37 -1
- package/dist/components/ui/radio-group.cjs +36 -1
- package/dist/components/ui/radio-group.js +30 -1
- package/dist/components/ui/select.cjs +116 -1
- package/dist/components/ui/select.js +102 -1
- package/dist/components/ui/separator.cjs +23 -1
- package/dist/components/ui/separator.js +19 -1
- package/dist/components/ui/shadcn-io/tags/index.cjs +146 -1
- package/dist/components/ui/shadcn-io/tags/index.js +134 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +66 -1
- package/dist/components/ui/shadcn-io/tags-input-inline/index.js +57 -1
- package/dist/components/ui/sheet.cjs +96 -1
- package/dist/components/ui/sheet.js +84 -1
- package/dist/components/ui/slider.cjs +42 -1
- package/dist/components/ui/slider.js +38 -1
- package/dist/components/ui/switch.cjs +28 -1
- package/dist/components/ui/switch.js +24 -1
- package/dist/components/ui/tabs.cjs +45 -1
- package/dist/components/ui/tabs.js +38 -1
- package/dist/components/ui/textarea.cjs +19 -1
- package/dist/components/ui/textarea.js +16 -1
- package/dist/components/ui/tooltip.cjs +45 -1
- package/dist/components/ui/tooltip.d.cts +5 -5
- package/dist/components/ui/tooltip.js +38 -1
- package/dist/index.cjs +189 -1
- package/dist/index.js +34 -1
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/utils.cjs +13 -1
- package/dist/lib/utils.js +10 -1
- package/package.json +1 -1
|
@@ -1 +1,101 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
const require_label = require('./label.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
9
|
+
let __radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
10
|
+
__radix_ui_react_slot = require_rolldown_runtime.__toESM(__radix_ui_react_slot);
|
|
11
|
+
let react_hook_form = require("react-hook-form");
|
|
12
|
+
react_hook_form = require_rolldown_runtime.__toESM(react_hook_form);
|
|
13
|
+
|
|
14
|
+
//#region src/components/ui/form.tsx
|
|
15
|
+
const Form = react_hook_form.FormProvider;
|
|
16
|
+
const FormFieldContext = react.createContext({});
|
|
17
|
+
function FormField({ ...props }) {
|
|
18
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormFieldContext, {
|
|
19
|
+
value: { name: props.name },
|
|
20
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_hook_form.Controller, { ...props })
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function useFormField() {
|
|
24
|
+
const fieldContext = react.use(FormFieldContext);
|
|
25
|
+
const itemContext = react.use(FormItemContext);
|
|
26
|
+
const { getFieldState } = (0, react_hook_form.useFormContext)();
|
|
27
|
+
const formState = (0, react_hook_form.useFormState)({ name: fieldContext.name });
|
|
28
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
29
|
+
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
30
|
+
const { id } = itemContext;
|
|
31
|
+
return {
|
|
32
|
+
id,
|
|
33
|
+
name: fieldContext.name,
|
|
34
|
+
formItemId: `${id}-form-item`,
|
|
35
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
36
|
+
formMessageId: `${id}-form-item-message`,
|
|
37
|
+
...fieldState
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const FormItemContext = react.createContext({});
|
|
41
|
+
function FormItem({ className,...props }) {
|
|
42
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormItemContext, {
|
|
43
|
+
value: { id: react.useId() },
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
45
|
+
"data-slot": "form-item",
|
|
46
|
+
className: require_utils.cn("grid gap-2", className),
|
|
47
|
+
...props
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function FormLabel({ className,...props }) {
|
|
52
|
+
const { error, formItemId } = useFormField();
|
|
53
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_label.Label, {
|
|
54
|
+
"data-slot": "form-label",
|
|
55
|
+
"data-error": Boolean(error),
|
|
56
|
+
className: require_utils.cn("data-[error=true]:text-destructive", className),
|
|
57
|
+
htmlFor: formItemId,
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function FormControl({ ...props }) {
|
|
62
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
63
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_slot.Slot, {
|
|
64
|
+
"data-slot": "form-control",
|
|
65
|
+
id: formItemId,
|
|
66
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
67
|
+
"aria-invalid": Boolean(error),
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function FormDescription({ className,...props }) {
|
|
72
|
+
const { formDescriptionId } = useFormField();
|
|
73
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
74
|
+
"data-slot": "form-description",
|
|
75
|
+
id: formDescriptionId,
|
|
76
|
+
className: require_utils.cn("text-muted-foreground text-sm", className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function FormMessage({ className,...props }) {
|
|
81
|
+
const { error, formMessageId } = useFormField();
|
|
82
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
83
|
+
if (!body) return null;
|
|
84
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
85
|
+
"data-slot": "form-message",
|
|
86
|
+
id: formMessageId,
|
|
87
|
+
className: require_utils.cn("text-destructive text-sm", className),
|
|
88
|
+
...props,
|
|
89
|
+
children: body
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
exports.Form = Form;
|
|
95
|
+
exports.FormControl = FormControl;
|
|
96
|
+
exports.FormDescription = FormDescription;
|
|
97
|
+
exports.FormField = FormField;
|
|
98
|
+
exports.FormItem = FormItem;
|
|
99
|
+
exports.FormLabel = FormLabel;
|
|
100
|
+
exports.FormMessage = FormMessage;
|
|
101
|
+
exports.useFormField = useFormField;
|
|
@@ -1 +1,89 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import { Label } from "./label.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
|
|
8
|
+
|
|
9
|
+
//#region src/components/ui/form.tsx
|
|
10
|
+
const Form = FormProvider;
|
|
11
|
+
const FormFieldContext = React.createContext({});
|
|
12
|
+
function FormField({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(FormFieldContext, {
|
|
14
|
+
value: { name: props.name },
|
|
15
|
+
children: /* @__PURE__ */ jsx(Controller, { ...props })
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function useFormField() {
|
|
19
|
+
const fieldContext = React.use(FormFieldContext);
|
|
20
|
+
const itemContext = React.use(FormItemContext);
|
|
21
|
+
const { getFieldState } = useFormContext();
|
|
22
|
+
const formState = useFormState({ name: fieldContext.name });
|
|
23
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
24
|
+
if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
|
|
25
|
+
const { id } = itemContext;
|
|
26
|
+
return {
|
|
27
|
+
id,
|
|
28
|
+
name: fieldContext.name,
|
|
29
|
+
formItemId: `${id}-form-item`,
|
|
30
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
31
|
+
formMessageId: `${id}-form-item-message`,
|
|
32
|
+
...fieldState
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const FormItemContext = React.createContext({});
|
|
36
|
+
function FormItem({ className,...props }) {
|
|
37
|
+
return /* @__PURE__ */ jsx(FormItemContext, {
|
|
38
|
+
value: { id: React.useId() },
|
|
39
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
40
|
+
"data-slot": "form-item",
|
|
41
|
+
className: cn("grid gap-2", className),
|
|
42
|
+
...props
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function FormLabel({ className,...props }) {
|
|
47
|
+
const { error, formItemId } = useFormField();
|
|
48
|
+
return /* @__PURE__ */ jsx(Label, {
|
|
49
|
+
"data-slot": "form-label",
|
|
50
|
+
"data-error": Boolean(error),
|
|
51
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
52
|
+
htmlFor: formItemId,
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function FormControl({ ...props }) {
|
|
57
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
58
|
+
return /* @__PURE__ */ jsx(Slot, {
|
|
59
|
+
"data-slot": "form-control",
|
|
60
|
+
id: formItemId,
|
|
61
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
62
|
+
"aria-invalid": Boolean(error),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function FormDescription({ className,...props }) {
|
|
67
|
+
const { formDescriptionId } = useFormField();
|
|
68
|
+
return /* @__PURE__ */ jsx("p", {
|
|
69
|
+
"data-slot": "form-description",
|
|
70
|
+
id: formDescriptionId,
|
|
71
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function FormMessage({ className,...props }) {
|
|
76
|
+
const { error, formMessageId } = useFormField();
|
|
77
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
78
|
+
if (!body) return null;
|
|
79
|
+
return /* @__PURE__ */ jsx("p", {
|
|
80
|
+
"data-slot": "form-message",
|
|
81
|
+
id: formMessageId,
|
|
82
|
+
className: cn("text-destructive text-sm", className),
|
|
83
|
+
...props,
|
|
84
|
+
children: body
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_alert = require('./alert.cjs');
|
|
2
|
+
const require_alert_dialog = require('./alert-dialog.cjs');
|
|
3
|
+
const require_avatar = require('./avatar.cjs');
|
|
4
|
+
const require_badge = require('./badge.cjs');
|
|
5
|
+
const require_button = require('./button.cjs');
|
|
6
|
+
const require_calendar = require('./calendar.cjs');
|
|
7
|
+
const require_card = require('./card.cjs');
|
|
8
|
+
const require_checkbox = require('./checkbox.cjs');
|
|
9
|
+
const require_dialog = require('./dialog.cjs');
|
|
10
|
+
const require_command = require('./command.cjs');
|
|
11
|
+
const require_dropdown_menu = require('./dropdown-menu.cjs');
|
|
12
|
+
const require_file_upload = require('./file-upload.cjs');
|
|
13
|
+
const require_label = require('./label.cjs');
|
|
14
|
+
const require_form = require('./form.cjs');
|
|
15
|
+
const require_input = require('./input.cjs');
|
|
16
|
+
const require_separator = require('./separator.cjs');
|
|
17
|
+
const require_OrContinueWithSeparator = require('./OrContinueWithSeparator.cjs');
|
|
18
|
+
const require_pagination = require('./pagination.cjs');
|
|
19
|
+
const require_popover = require('./popover.cjs');
|
|
20
|
+
const require_radio_group = require('./radio-group.cjs');
|
|
21
|
+
const require_select = require('./select.cjs');
|
|
22
|
+
const require_index = require('./shadcn-io/tags/index.cjs');
|
|
23
|
+
const require_index$1 = require('./shadcn-io/tags-input-inline/index.cjs');
|
|
24
|
+
const require_sheet = require('./sheet.cjs');
|
|
25
|
+
const require_slider = require('./slider.cjs');
|
|
26
|
+
const require_switch = require('./switch.cjs');
|
|
27
|
+
const require_tabs = require('./tabs.cjs');
|
|
28
|
+
const require_textarea = require('./textarea.cjs');
|
|
29
|
+
const require_tooltip = require('./tooltip.cjs');
|
|
@@ -1 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Alert, AlertDescription, AlertTitle } from "./alert.js";
|
|
2
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./alert-dialog.js";
|
|
3
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
4
|
+
import { Badge, badgeVariants } from "./badge.js";
|
|
5
|
+
import { Button, buttonVariants } from "./button.js";
|
|
6
|
+
import { Calendar, CalendarDayButton } from "./calendar.js";
|
|
7
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
|
|
8
|
+
import { Checkbox } from "./checkbox.js";
|
|
9
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js";
|
|
10
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./command.js";
|
|
11
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
12
|
+
import { FileUploadClear, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, FileUploadList, FileUploadRoot, FileUploadTrigger, useStore } from "./file-upload.js";
|
|
13
|
+
import { Label } from "./label.js";
|
|
14
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./form.js";
|
|
15
|
+
import { Input } from "./input.js";
|
|
16
|
+
import { Separator } from "./separator.js";
|
|
17
|
+
import { OrContinueWithSeparator } from "./OrContinueWithSeparator.js";
|
|
18
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./pagination.js";
|
|
19
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
20
|
+
import { RadioGroup, RadioGroupItem } from "./radio-group.js";
|
|
21
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
22
|
+
import { Tags, TagsContent, TagsEmpty, TagsGroup, TagsInput, TagsItem, TagsList, TagsTrigger, TagsValue } from "./shadcn-io/tags/index.js";
|
|
23
|
+
import { TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot } from "./shadcn-io/tags-input-inline/index.js";
|
|
24
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
25
|
+
import { Slider } from "./slider.js";
|
|
26
|
+
import { Switch } from "./switch.js";
|
|
27
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
28
|
+
import { Textarea } from "./textarea.js";
|
|
29
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
|
|
9
|
+
//#region src/components/ui/input.tsx
|
|
10
|
+
function Input({ className, type,...props }) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
12
|
+
type,
|
|
13
|
+
"data-slot": "input",
|
|
14
|
+
className: require_utils.cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className),
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.Input = Input;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/input.tsx
|
|
7
|
+
function Input({ className, type,...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx("input", {
|
|
9
|
+
type,
|
|
10
|
+
"data-slot": "input",
|
|
11
|
+
className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Input };
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let __radix_ui_react_label = require("@radix-ui/react-label");
|
|
9
|
+
__radix_ui_react_label = require_rolldown_runtime.__toESM(__radix_ui_react_label);
|
|
10
|
+
|
|
11
|
+
//#region src/components/ui/label.tsx
|
|
12
|
+
function Label({ className,...props }) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_label.Root, {
|
|
14
|
+
"data-slot": "label",
|
|
15
|
+
className: require_utils.cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.Label = Label;
|
|
@@ -1 +1,17 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
|
+
|
|
7
|
+
//#region src/components/ui/label.tsx
|
|
8
|
+
function Label({ className,...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
|
|
10
|
+
"data-slot": "label",
|
|
11
|
+
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Label };
|
|
@@ -1 +1,92 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
const require_button = require('./button.cjs');
|
|
5
|
+
require('../../index.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
10
|
+
let lucide_react = require("lucide-react");
|
|
11
|
+
lucide_react = require_rolldown_runtime.__toESM(lucide_react);
|
|
12
|
+
|
|
13
|
+
//#region src/components/ui/pagination.tsx
|
|
14
|
+
function Pagination({ className,...props }) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
16
|
+
role: "navigation",
|
|
17
|
+
"aria-label": "pagination",
|
|
18
|
+
"data-slot": "pagination",
|
|
19
|
+
className: require_utils.cn("mx-auto flex w-full justify-center", className),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function PaginationContent({ className,...props }) {
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
25
|
+
"data-slot": "pagination-content",
|
|
26
|
+
className: require_utils.cn("flex flex-row items-center gap-1", className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function PaginationItem({ ...props }) {
|
|
31
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
32
|
+
"data-slot": "pagination-item",
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function PaginationLink({ className, isActive, size = "icon",...props }) {
|
|
37
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
38
|
+
"aria-current": isActive ? "page" : void 0,
|
|
39
|
+
"data-slot": "pagination-link",
|
|
40
|
+
"data-active": isActive,
|
|
41
|
+
className: require_utils.cn(require_button.buttonVariants({
|
|
42
|
+
variant: isActive ? "outline" : "ghost",
|
|
43
|
+
size
|
|
44
|
+
}), className),
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function PaginationPrevious({ className,...props }) {
|
|
49
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PaginationLink, {
|
|
50
|
+
"aria-label": "Go to previous page",
|
|
51
|
+
size: "default",
|
|
52
|
+
className: require_utils.cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
53
|
+
...props,
|
|
54
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeftIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
55
|
+
className: "hidden sm:block",
|
|
56
|
+
children: "Previous"
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function PaginationNext({ className,...props }) {
|
|
61
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PaginationLink, {
|
|
62
|
+
"aria-label": "Go to next page",
|
|
63
|
+
size: "default",
|
|
64
|
+
className: require_utils.cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
65
|
+
...props,
|
|
66
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
67
|
+
className: "hidden sm:block",
|
|
68
|
+
children: "Next"
|
|
69
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, {})]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function PaginationEllipsis({ className,...props }) {
|
|
73
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
74
|
+
"aria-hidden": true,
|
|
75
|
+
"data-slot": "pagination-ellipsis",
|
|
76
|
+
className: require_utils.cn("flex size-9 items-center justify-center", className),
|
|
77
|
+
...props,
|
|
78
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
79
|
+
className: "sr-only",
|
|
80
|
+
children: "More pages"
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
exports.Pagination = Pagination;
|
|
87
|
+
exports.PaginationContent = PaginationContent;
|
|
88
|
+
exports.PaginationEllipsis = PaginationEllipsis;
|
|
89
|
+
exports.PaginationItem = PaginationItem;
|
|
90
|
+
exports.PaginationLink = PaginationLink;
|
|
91
|
+
exports.PaginationNext = PaginationNext;
|
|
92
|
+
exports.PaginationPrevious = PaginationPrevious;
|
|
@@ -1 +1,82 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import { buttonVariants } from "./button.js";
|
|
4
|
+
import "../../index.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
8
|
+
|
|
9
|
+
//#region src/components/ui/pagination.tsx
|
|
10
|
+
function Pagination({ className,...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
12
|
+
role: "navigation",
|
|
13
|
+
"aria-label": "pagination",
|
|
14
|
+
"data-slot": "pagination",
|
|
15
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function PaginationContent({ className,...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("ul", {
|
|
21
|
+
"data-slot": "pagination-content",
|
|
22
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function PaginationItem({ ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("li", {
|
|
28
|
+
"data-slot": "pagination-item",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function PaginationLink({ className, isActive, size = "icon",...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("a", {
|
|
34
|
+
"aria-current": isActive ? "page" : void 0,
|
|
35
|
+
"data-slot": "pagination-link",
|
|
36
|
+
"data-active": isActive,
|
|
37
|
+
className: cn(buttonVariants({
|
|
38
|
+
variant: isActive ? "outline" : "ghost",
|
|
39
|
+
size
|
|
40
|
+
}), className),
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function PaginationPrevious({ className,...props }) {
|
|
45
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
46
|
+
"aria-label": "Go to previous page",
|
|
47
|
+
size: "default",
|
|
48
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
49
|
+
...props,
|
|
50
|
+
children: [/* @__PURE__ */ jsx(ChevronLeftIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
51
|
+
className: "hidden sm:block",
|
|
52
|
+
children: "Previous"
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function PaginationNext({ className,...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
58
|
+
"aria-label": "Go to next page",
|
|
59
|
+
size: "default",
|
|
60
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
61
|
+
...props,
|
|
62
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
63
|
+
className: "hidden sm:block",
|
|
64
|
+
children: "Next"
|
|
65
|
+
}), /* @__PURE__ */ jsx(ChevronRightIcon, {})]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function PaginationEllipsis({ className,...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
70
|
+
"aria-hidden": true,
|
|
71
|
+
"data-slot": "pagination-ellipsis",
|
|
72
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
73
|
+
...props,
|
|
74
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
75
|
+
className: "sr-only",
|
|
76
|
+
children: "More pages"
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -1 +1,44 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_utils = require('../../lib/utils.cjs');
|
|
3
|
+
require('../../lib/index.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_rolldown_runtime.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
|
|
8
|
+
let __radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
9
|
+
__radix_ui_react_popover = require_rolldown_runtime.__toESM(__radix_ui_react_popover);
|
|
10
|
+
|
|
11
|
+
//#region src/components/ui/popover.tsx
|
|
12
|
+
function Popover({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_popover.Root, {
|
|
14
|
+
"data-slot": "popover",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function PopoverTrigger({ ...props }) {
|
|
19
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_popover.Trigger, {
|
|
20
|
+
"data-slot": "popover-trigger",
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function PopoverContent({ className, align = "center", sideOffset = 4,...props }) {
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_popover.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_popover.Content, {
|
|
26
|
+
"data-slot": "popover-content",
|
|
27
|
+
align,
|
|
28
|
+
sideOffset,
|
|
29
|
+
className: require_utils.cn("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
30
|
+
...props
|
|
31
|
+
}) });
|
|
32
|
+
}
|
|
33
|
+
function PopoverAnchor({ ...props }) {
|
|
34
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__radix_ui_react_popover.Anchor, {
|
|
35
|
+
"data-slot": "popover-anchor",
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
exports.Popover = Popover;
|
|
42
|
+
exports.PopoverAnchor = PopoverAnchor;
|
|
43
|
+
exports.PopoverContent = PopoverContent;
|
|
44
|
+
exports.PopoverTrigger = PopoverTrigger;
|
|
@@ -1 +1,37 @@
|
|
|
1
|
-
import{cn
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import "../../lib/index.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
6
|
+
|
|
7
|
+
//#region src/components/ui/popover.tsx
|
|
8
|
+
function Popover({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
|
|
10
|
+
"data-slot": "popover",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function PopoverTrigger({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
|
|
16
|
+
"data-slot": "popover-trigger",
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function PopoverContent({ className, align = "center", sideOffset = 4,...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
|
|
22
|
+
"data-slot": "popover-content",
|
|
23
|
+
align,
|
|
24
|
+
sideOffset,
|
|
25
|
+
className: cn("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
26
|
+
...props
|
|
27
|
+
}) });
|
|
28
|
+
}
|
|
29
|
+
function PopoverAnchor({ ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
|
|
31
|
+
"data-slot": "popover-anchor",
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|