@phsa.tec/design-system-react 0.1.5 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +390 -209
- package/dist/index.d.mts +485 -0
- package/dist/index.d.ts +485 -0
- package/dist/index.js +4259 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4186 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +46 -6
- package/.eslintrc.json +0 -7
- package/.github/workflows/deploy-storybook.yml +0 -75
- package/.storybook/main.ts +0 -16
- package/.storybook/preview.ts +0 -15
- package/components.json +0 -21
- package/jest.config.ts +0 -25
- package/next.config.ts +0 -7
- package/postcss.config.mjs +0 -8
- package/public/file.svg +0 -1
- package/public/globe.svg +0 -1
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/public/window.svg +0 -1
- package/src/app/columns.tsx +0 -178
- package/src/app/favicon.ico +0 -0
- package/src/app/fonts/GeistMonoVF.woff +0 -0
- package/src/app/fonts/GeistVF.woff +0 -0
- package/src/app/globals.css +0 -94
- package/src/app/layout.tsx +0 -35
- package/src/app/page.tsx +0 -7
- package/src/components/actions/AlertDialog/AlertDialog.tsx +0 -45
- package/src/components/actions/AlertDialog/alert-dialog.stories.tsx +0 -21
- package/src/components/actions/AlertDialog/index.ts +0 -1
- package/src/components/actions/Button/Button.stories.ts +0 -38
- package/src/components/actions/Button/Button.tsx +0 -23
- package/src/components/actions/Button/index.ts +0 -1
- package/src/components/actions/Collapsible/index.ts +0 -1
- package/src/components/actions/Dialog/Dialog.stories.tsx +0 -70
- package/src/components/actions/Dialog/Dialog.tsx +0 -87
- package/src/components/actions/Dialog/components/DialogWithActions/index.tsx +0 -40
- package/src/components/actions/Dialog/index.ts +0 -1
- package/src/components/actions/Steps/Steps.stories.tsx +0 -25
- package/src/components/actions/Steps/Steps.tsx +0 -51
- package/src/components/actions/Steps/index.ts +0 -1
- package/src/components/actions/index.ts +0 -5
- package/src/components/dataDisplay/Avatar/Avatar.stories.tsx +0 -22
- package/src/components/dataDisplay/Avatar/Avatar.tsx +0 -21
- package/src/components/dataDisplay/Avatar/index.ts +0 -2
- package/src/components/dataDisplay/Badge/Badge.stories.tsx +0 -36
- package/src/components/dataDisplay/Badge/index.ts +0 -1
- package/src/components/dataDisplay/Card/Card.stories.tsx +0 -24
- package/src/components/dataDisplay/Card/Card.tsx +0 -34
- package/src/components/dataDisplay/Card/index.ts +0 -1
- package/src/components/dataDisplay/DataPairList/DataPairList.tsx +0 -56
- package/src/components/dataDisplay/DataPairList/data-pair-list.stories.tsx +0 -87
- package/src/components/dataDisplay/DataPairList/index.ts +0 -2
- package/src/components/dataDisplay/DataPairList/types.ts +0 -10
- package/src/components/dataDisplay/DropDownMenu/index.ts +0 -1
- package/src/components/dataDisplay/ErrorMessage/ErrorMessage.tsx +0 -6
- package/src/components/dataDisplay/ErrorMessage/index.ts +0 -1
- package/src/components/dataDisplay/Icon/Icon.stories.tsx +0 -21
- package/src/components/dataDisplay/Icon/Icon.tsx +0 -47
- package/src/components/dataDisplay/Icon/index.ts +0 -1
- package/src/components/dataDisplay/Icon/types.ts +0 -6
- package/src/components/dataDisplay/Label/Label.stories.tsx +0 -21
- package/src/components/dataDisplay/Label/Label.tsx +0 -10
- package/src/components/dataDisplay/Label/index.ts +0 -1
- package/src/components/dataDisplay/Table/Table.tsx +0 -173
- package/src/components/dataDisplay/Table/columns.tsx +0 -223
- package/src/components/dataDisplay/Table/components/DynamicTable/data-table-column-header.tsx +0 -72
- package/src/components/dataDisplay/Table/components/DynamicTable/data-table-pagination.tsx +0 -91
- package/src/components/dataDisplay/Table/components/DynamicTable/data-table-toolbar.tsx +0 -17
- package/src/components/dataDisplay/Table/components/DynamicTable/data-table-view-options.tsx +0 -58
- package/src/components/dataDisplay/Table/components/DynamicTable/data-table.stories.tsx +0 -118
- package/src/components/dataDisplay/Table/components/DynamicTable/index.tsx +0 -136
- package/src/components/dataDisplay/Table/components/DynamicTable/types.ts +0 -43
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-column-header.tsx +0 -71
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-faceted-filter.tsx +0 -147
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-pagination.tsx +0 -97
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-row-actions.tsx +0 -78
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-toolbar.tsx +0 -60
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table-view-options.tsx +0 -59
- package/src/components/dataDisplay/Table/custom/CustomTable/data-table.tsx +0 -145
- package/src/components/dataDisplay/Table/custom/CustomTable/data.ts +0 -71
- package/src/components/dataDisplay/Table/custom/CustomTable/index.tsx +0 -34
- package/src/components/dataDisplay/Table/custom/CustomTable/schema.ts +0 -11
- package/src/components/dataDisplay/Table/index.ts +0 -2
- package/src/components/dataDisplay/Table/table.stories.tsx +0 -147
- package/src/components/dataDisplay/Table/types.ts +0 -15
- package/src/components/dataDisplay/Tabs/Tabs.stories.tsx +0 -34
- package/src/components/dataDisplay/Tabs/Tabs.tsx +0 -53
- package/src/components/dataDisplay/Tabs/index.ts +0 -1
- package/src/components/dataDisplay/Text/Text.stories.tsx +0 -66
- package/src/components/dataDisplay/Text/Text.tsx +0 -56
- package/src/components/dataDisplay/Text/index.ts +0 -1
- package/src/components/dataDisplay/index.ts +0 -8
- package/src/components/dataInput/Input/components/Input/Input.stories.tsx +0 -99
- package/src/components/dataInput/Input/components/Input/InputBase.tsx +0 -50
- package/src/components/dataInput/Input/components/Input/__tests__/input.test.tsx +0 -38
- package/src/components/dataInput/Input/components/Input/index.tsx +0 -48
- package/src/components/dataInput/Input/components/Input/types.ts +0 -15
- package/src/components/dataInput/Input/components/InputBase/index.tsx +0 -31
- package/src/components/dataInput/Input/components/MaskInput/__tests__/mask-input.test.tsx +0 -77
- package/src/components/dataInput/Input/components/MaskInput/index.ts +0 -1
- package/src/components/dataInput/Input/components/MaskInput/mask-input.stories.tsx +0 -85
- package/src/components/dataInput/Input/components/MaskInput/mask-input.tsx +0 -73
- package/src/components/dataInput/Input/components/MultipleInput/MultipleInput.tsx +0 -105
- package/src/components/dataInput/Input/components/MultipleInput/MultipleInputBase.tsx +0 -100
- package/src/components/dataInput/Input/components/MultipleInput/MultipleMaskInput.tsx +0 -35
- package/src/components/dataInput/Input/components/MultipleInput/MultipleNumberInput.tsx +0 -35
- package/src/components/dataInput/Input/components/MultipleInput/__tests__/multiple-input.test.tsx +0 -152
- package/src/components/dataInput/Input/components/MultipleInput/index.ts +0 -2
- package/src/components/dataInput/Input/components/MultipleInput/multiple-input.stories.tsx +0 -96
- package/src/components/dataInput/Input/components/NumberInput/index.ts +0 -1
- package/src/components/dataInput/Input/components/NumberInput/number-input.stories.tsx +0 -76
- package/src/components/dataInput/Input/components/NumberInput/number-input.tsx +0 -68
- package/src/components/dataInput/Input/index.ts +0 -4
- package/src/components/dataInput/Select/MultiSelect/MultiSelect.stories.tsx +0 -119
- package/src/components/dataInput/Select/MultiSelect/MultiSelectBase.tsx +0 -135
- package/src/components/dataInput/Select/MultiSelect/index.tsx +0 -75
- package/src/components/dataInput/Select/Select.stories.tsx +0 -61
- package/src/components/dataInput/Select/Select.tsx +0 -73
- package/src/components/dataInput/Select/SelectBase.tsx +0 -58
- package/src/components/dataInput/Select/index.ts +0 -2
- package/src/components/dataInput/Switch/Switch.stories.tsx +0 -75
- package/src/components/dataInput/Switch/Switch.tsx +0 -52
- package/src/components/dataInput/Switch/index.ts +0 -1
- package/src/components/dataInput/checkbox/Checkbox.tsx +0 -57
- package/src/components/dataInput/checkbox/Checkbox_old.tsx +0 -58
- package/src/components/dataInput/checkbox/Checkout.stories.tsx +0 -62
- package/src/components/dataInput/checkbox/index.ts +0 -1
- package/src/components/dataInput/form/Form.tsx +0 -47
- package/src/components/dataInput/form/index.ts +0 -3
- package/src/components/dataInput/index.ts +0 -5
- package/src/components/feedback/ErrorLabel/index.tsx +0 -24
- package/src/components/feedback/Spinner/index.ts +0 -1
- package/src/components/feedback/Toast/Toast.stories.tsx +0 -45
- package/src/components/feedback/Toast/index.ts +0 -2
- package/src/components/feedback/index.ts +0 -2
- package/src/components/index.ts +0 -6
- package/src/components/layout/Crud/components/Table/index.tsx +0 -183
- package/src/components/layout/Crud/components/Table/types.ts +0 -15
- package/src/components/layout/Crud/crud.stories.tsx +0 -317
- package/src/components/layout/Crud/hook/useCrudLayout/index.tsx +0 -94
- package/src/components/layout/Crud/hook/useRequest/index.tsx +0 -156
- package/src/components/layout/Crud/index.tsx +0 -295
- package/src/components/layout/Crud/store/CrudLayoutStore.ts +0 -75
- package/src/components/layout/Crud/types.ts +0 -14
- package/src/components/layout/Drawer/CustomDrawer/index.tsx +0 -33
- package/src/components/layout/Drawer/Drawer.stories.tsx +0 -80
- package/src/components/layout/Drawer/index.ts +0 -2
- package/src/components/layout/PageLayout/PageLayout.stories.tsx +0 -42
- package/src/components/layout/PageLayout/index.tsx +0 -28
- package/src/components/layout/Separator/index.ts +0 -1
- package/src/components/layout/Sheet/Sheet.stories.tsx +0 -28
- package/src/components/layout/Sheet/Sheet.tsx +0 -22
- package/src/components/layout/Sheet/index.ts +0 -1
- package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -116
- package/src/components/layout/Sidebar/Sidebar.tsx +0 -50
- package/src/components/layout/Sidebar/components/app-sidebar.tsx +0 -203
- package/src/components/layout/Sidebar/components/footer-sidebar.tsx +0 -17
- package/src/components/layout/Sidebar/components/header-sidebar.tsx +0 -90
- package/src/components/layout/Sidebar/components/menus.tsx +0 -55
- package/src/components/layout/Sidebar/components/nav-projects.tsx +0 -88
- package/src/components/layout/Sidebar/components/nav-user.tsx +0 -114
- package/src/components/layout/Sidebar/components/team-switcher.tsx +0 -85
- package/src/components/layout/Sidebar/index.ts +0 -2
- package/src/components/layout/Sidebar/provider/index.tsx +0 -51
- package/src/components/layout/Tabs/Tabs.tsx +0 -51
- package/src/components/layout/Tabs/index.ts +0 -1
- package/src/components/layout/Tabs/tabs.stories.tsx +0 -57
- package/src/components/layout/index.ts +0 -6
- package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +0 -66
- package/src/components/navigation/Breadcrumbs/index.ts +0 -2
- package/src/components/navigation/index.ts +0 -1
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/alert.tsx +0 -59
- package/src/components/ui/avatar.tsx +0 -50
- package/src/components/ui/badge.tsx +0 -40
- package/src/components/ui/breadcrumb.tsx +0 -115
- package/src/components/ui/button.tsx +0 -57
- package/src/components/ui/card.tsx +0 -83
- package/src/components/ui/checkbox.tsx +0 -34
- package/src/components/ui/collapsible.tsx +0 -11
- package/src/components/ui/command.tsx +0 -153
- package/src/components/ui/dialog.tsx +0 -124
- package/src/components/ui/drawer.tsx +0 -117
- package/src/components/ui/dropdown-menu.tsx +0 -201
- package/src/components/ui/form.tsx +0 -179
- package/src/components/ui/input.tsx +0 -24
- package/src/components/ui/label.tsx +0 -30
- package/src/components/ui/popover.tsx +0 -33
- package/src/components/ui/select.tsx +0 -161
- package/src/components/ui/separator.tsx +0 -31
- package/src/components/ui/sheet.tsx +0 -140
- package/src/components/ui/sidebar.tsx +0 -763
- package/src/components/ui/skeleton.tsx +0 -15
- package/src/components/ui/sonner.tsx +0 -31
- package/src/components/ui/spinner.tsx +0 -54
- package/src/components/ui/switch.tsx +0 -33
- package/src/components/ui/table.tsx +0 -120
- package/src/components/ui/tabs.tsx +0 -55
- package/src/components/ui/toast.tsx +0 -130
- package/src/components/ui/toaster.tsx +0 -35
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/hooks/use-conditional-controller.tsx +0 -35
- package/src/hooks/use-mask.tsx +0 -116
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/hooks/use-toast.ts +0 -191
- package/src/index.ts +0 -1
- package/src/introduction.mdx +0 -132
- package/src/lib/utils.ts +0 -6
- package/tailwind.config.ts +0 -83
- package/tsconfig.json +0 -27
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
-
|
|
4
|
-
import { cn } from "@/lib/utils"
|
|
5
|
-
|
|
6
|
-
const alertVariants = cva(
|
|
7
|
-
"relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default: "bg-background text-foreground",
|
|
12
|
-
destructive:
|
|
13
|
-
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
defaultVariants: {
|
|
17
|
-
variant: "default",
|
|
18
|
-
},
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
const Alert = React.forwardRef<
|
|
23
|
-
HTMLDivElement,
|
|
24
|
-
React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>
|
|
25
|
-
>(({ className, variant, ...props }, ref) => (
|
|
26
|
-
<div
|
|
27
|
-
ref={ref}
|
|
28
|
-
role="alert"
|
|
29
|
-
className={cn(alertVariants({ variant }), className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
))
|
|
33
|
-
Alert.displayName = "Alert"
|
|
34
|
-
|
|
35
|
-
const AlertTitle = React.forwardRef<
|
|
36
|
-
HTMLParagraphElement,
|
|
37
|
-
React.HTMLAttributes<HTMLHeadingElement>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<h5
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn("mb-1 font-medium leading-none tracking-tight", className)}
|
|
42
|
-
{...props}
|
|
43
|
-
/>
|
|
44
|
-
))
|
|
45
|
-
AlertTitle.displayName = "AlertTitle"
|
|
46
|
-
|
|
47
|
-
const AlertDescription = React.forwardRef<
|
|
48
|
-
HTMLParagraphElement,
|
|
49
|
-
React.HTMLAttributes<HTMLParagraphElement>
|
|
50
|
-
>(({ className, ...props }, ref) => (
|
|
51
|
-
<div
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn("text-sm [&_p]:leading-relaxed", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
))
|
|
57
|
-
AlertDescription.displayName = "AlertDescription"
|
|
58
|
-
|
|
59
|
-
export { Alert, AlertTitle, AlertDescription }
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
5
|
-
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
|
-
|
|
8
|
-
const Avatar = React.forwardRef<
|
|
9
|
-
React.ElementRef<typeof AvatarPrimitive.Root>,
|
|
10
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
|
|
11
|
-
>(({ className, ...props }, ref) => (
|
|
12
|
-
<AvatarPrimitive.Root
|
|
13
|
-
ref={ref}
|
|
14
|
-
className={cn(
|
|
15
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
16
|
-
className
|
|
17
|
-
)}
|
|
18
|
-
{...props}
|
|
19
|
-
/>
|
|
20
|
-
));
|
|
21
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
22
|
-
|
|
23
|
-
const AvatarImage = React.forwardRef<
|
|
24
|
-
React.ElementRef<typeof AvatarPrimitive.Image>,
|
|
25
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
|
|
26
|
-
>(({ className, ...props }, ref) => (
|
|
27
|
-
<AvatarPrimitive.Image
|
|
28
|
-
ref={ref}
|
|
29
|
-
className={cn("aspect-square h-full w-full", className)}
|
|
30
|
-
{...props}
|
|
31
|
-
/>
|
|
32
|
-
));
|
|
33
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
34
|
-
|
|
35
|
-
const AvatarFallback = React.forwardRef<
|
|
36
|
-
React.ElementRef<typeof AvatarPrimitive.Fallback>,
|
|
37
|
-
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
|
|
38
|
-
>(({ className, ...props }, ref) => (
|
|
39
|
-
<AvatarPrimitive.Fallback
|
|
40
|
-
ref={ref}
|
|
41
|
-
className={cn(
|
|
42
|
-
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
));
|
|
48
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
49
|
-
|
|
50
|
-
export { Avatar, AvatarImage, AvatarFallback };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
-
|
|
4
|
-
import { cn } from "../../lib/utils";
|
|
5
|
-
|
|
6
|
-
const badgeVariants = cva(
|
|
7
|
-
"inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
8
|
-
{
|
|
9
|
-
variants: {
|
|
10
|
-
variant: {
|
|
11
|
-
default:
|
|
12
|
-
"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",
|
|
13
|
-
secondary:
|
|
14
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
15
|
-
destructive:
|
|
16
|
-
"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",
|
|
17
|
-
success:
|
|
18
|
-
"border-transparent bg-success text-primary-foreground shadow hover:bg-success/80",
|
|
19
|
-
warning:
|
|
20
|
-
"border-transparent bg-warning text-primary-foreground shadow hover:bg-warning/80",
|
|
21
|
-
outline: "text-foreground",
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
defaultVariants: {
|
|
25
|
-
variant: "default",
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
export interface BadgeProps
|
|
31
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
32
|
-
VariantProps<typeof badgeVariants> {}
|
|
33
|
-
|
|
34
|
-
function Badge({ className, variant, ...props }: BadgeProps) {
|
|
35
|
-
return (
|
|
36
|
-
<div className={cn(badgeVariants({ variant }), className)} {...props} />
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export { Badge, badgeVariants };
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const Breadcrumb = React.forwardRef<
|
|
8
|
-
HTMLElement,
|
|
9
|
-
React.ComponentPropsWithoutRef<"nav"> & {
|
|
10
|
-
separator?: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
>(({ ...props }, ref) => <nav ref={ref} aria-label="breadcrumb" {...props} />);
|
|
13
|
-
Breadcrumb.displayName = "Breadcrumb";
|
|
14
|
-
|
|
15
|
-
const BreadcrumbList = React.forwardRef<
|
|
16
|
-
HTMLOListElement,
|
|
17
|
-
React.ComponentPropsWithoutRef<"ol">
|
|
18
|
-
>(({ className, ...props }, ref) => (
|
|
19
|
-
<ol
|
|
20
|
-
ref={ref}
|
|
21
|
-
className={cn(
|
|
22
|
-
"flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
));
|
|
28
|
-
BreadcrumbList.displayName = "BreadcrumbList";
|
|
29
|
-
|
|
30
|
-
const BreadcrumbItem = React.forwardRef<
|
|
31
|
-
HTMLLIElement,
|
|
32
|
-
React.ComponentPropsWithoutRef<"li">
|
|
33
|
-
>(({ className, ...props }, ref) => (
|
|
34
|
-
<li
|
|
35
|
-
ref={ref}
|
|
36
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
37
|
-
{...props}
|
|
38
|
-
/>
|
|
39
|
-
));
|
|
40
|
-
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
41
|
-
|
|
42
|
-
const BreadcrumbLink = React.forwardRef<
|
|
43
|
-
HTMLAnchorElement,
|
|
44
|
-
React.ComponentPropsWithoutRef<"a"> & {
|
|
45
|
-
asChild?: boolean;
|
|
46
|
-
}
|
|
47
|
-
>(({ asChild, className, ...props }, ref) => {
|
|
48
|
-
const Comp = asChild ? Slot : "a";
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<Comp
|
|
52
|
-
ref={ref}
|
|
53
|
-
className={cn("transition-colors hover:text-foreground", className)}
|
|
54
|
-
{...props}
|
|
55
|
-
/>
|
|
56
|
-
);
|
|
57
|
-
});
|
|
58
|
-
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
59
|
-
|
|
60
|
-
const BreadcrumbPage = React.forwardRef<
|
|
61
|
-
HTMLSpanElement,
|
|
62
|
-
React.ComponentPropsWithoutRef<"span">
|
|
63
|
-
>(({ className, ...props }, ref) => (
|
|
64
|
-
<span
|
|
65
|
-
ref={ref}
|
|
66
|
-
role="link"
|
|
67
|
-
aria-disabled="true"
|
|
68
|
-
aria-current="page"
|
|
69
|
-
className={cn("font-normal text-foreground", className)}
|
|
70
|
-
{...props}
|
|
71
|
-
/>
|
|
72
|
-
));
|
|
73
|
-
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
74
|
-
|
|
75
|
-
const BreadcrumbSeparator = ({
|
|
76
|
-
children,
|
|
77
|
-
className,
|
|
78
|
-
...props
|
|
79
|
-
}: React.ComponentProps<"li">) => (
|
|
80
|
-
<li
|
|
81
|
-
role="presentation"
|
|
82
|
-
aria-hidden="true"
|
|
83
|
-
className={cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className)}
|
|
84
|
-
{...props}
|
|
85
|
-
>
|
|
86
|
-
{children ?? <ChevronRight />}
|
|
87
|
-
</li>
|
|
88
|
-
);
|
|
89
|
-
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
90
|
-
|
|
91
|
-
const BreadcrumbEllipsis = ({
|
|
92
|
-
className,
|
|
93
|
-
...props
|
|
94
|
-
}: React.ComponentProps<"span">) => (
|
|
95
|
-
<span
|
|
96
|
-
role="presentation"
|
|
97
|
-
aria-hidden="true"
|
|
98
|
-
className={cn("flex h-9 w-9 items-center justify-center", className)}
|
|
99
|
-
{...props}
|
|
100
|
-
>
|
|
101
|
-
<MoreHorizontal className="h-4 w-4" />
|
|
102
|
-
<span className="sr-only">More</span>
|
|
103
|
-
</span>
|
|
104
|
-
);
|
|
105
|
-
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
106
|
-
|
|
107
|
-
export {
|
|
108
|
-
Breadcrumb,
|
|
109
|
-
BreadcrumbList,
|
|
110
|
-
BreadcrumbItem,
|
|
111
|
-
BreadcrumbLink,
|
|
112
|
-
BreadcrumbPage,
|
|
113
|
-
BreadcrumbSeparator,
|
|
114
|
-
BreadcrumbEllipsis,
|
|
115
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
|
-
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
14
|
-
destructive:
|
|
15
|
-
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
16
|
-
outline:
|
|
17
|
-
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
18
|
-
secondary:
|
|
19
|
-
"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
20
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
default: "h-9 px-4 py-2",
|
|
25
|
-
sm: "h-8 rounded-md px-3 text-xs",
|
|
26
|
-
lg: "h-10 rounded-md px-8",
|
|
27
|
-
icon: "h-9 w-9",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
defaultVariants: {
|
|
31
|
-
variant: "default",
|
|
32
|
-
size: "default",
|
|
33
|
-
},
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
export interface ButtonProps
|
|
38
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
39
|
-
VariantProps<typeof buttonVariants> {
|
|
40
|
-
asChild?: boolean;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
44
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
45
|
-
const Comp = asChild ? Slot : "button";
|
|
46
|
-
return (
|
|
47
|
-
<Comp
|
|
48
|
-
className={cn(buttonVariants({ variant, size, className }))}
|
|
49
|
-
ref={ref}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
Button.displayName = "Button";
|
|
56
|
-
|
|
57
|
-
export { Button, buttonVariants };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "../../lib/utils";
|
|
4
|
-
|
|
5
|
-
const Card = React.forwardRef<
|
|
6
|
-
HTMLDivElement,
|
|
7
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
8
|
-
>(({ className, ...props }, ref) => (
|
|
9
|
-
<div
|
|
10
|
-
ref={ref}
|
|
11
|
-
className={cn(
|
|
12
|
-
"rounded-xl border bg-card text-card-foreground shadow",
|
|
13
|
-
className
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
/>
|
|
17
|
-
));
|
|
18
|
-
Card.displayName = "Card";
|
|
19
|
-
|
|
20
|
-
const CardHeader = React.forwardRef<
|
|
21
|
-
HTMLDivElement,
|
|
22
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
23
|
-
>(({ className, ...props }, ref) => (
|
|
24
|
-
<div
|
|
25
|
-
ref={ref}
|
|
26
|
-
className={cn("flex flex-col space-y-1.5 p-6", className)}
|
|
27
|
-
{...props}
|
|
28
|
-
/>
|
|
29
|
-
));
|
|
30
|
-
CardHeader.displayName = "CardHeader";
|
|
31
|
-
|
|
32
|
-
const CardTitle = React.forwardRef<
|
|
33
|
-
HTMLDivElement,
|
|
34
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
35
|
-
>(({ className, ...props }, ref) => (
|
|
36
|
-
<div
|
|
37
|
-
ref={ref}
|
|
38
|
-
className={cn("font-semibold leading-none tracking-tight", className)}
|
|
39
|
-
{...props}
|
|
40
|
-
/>
|
|
41
|
-
));
|
|
42
|
-
CardTitle.displayName = "CardTitle";
|
|
43
|
-
|
|
44
|
-
const CardDescription = React.forwardRef<
|
|
45
|
-
HTMLDivElement,
|
|
46
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
47
|
-
>(({ className, ...props }, ref) => (
|
|
48
|
-
<div
|
|
49
|
-
ref={ref}
|
|
50
|
-
className={cn("text-sm text-muted-foreground", className)}
|
|
51
|
-
{...props}
|
|
52
|
-
/>
|
|
53
|
-
));
|
|
54
|
-
CardDescription.displayName = "CardDescription";
|
|
55
|
-
|
|
56
|
-
const CardContent = React.forwardRef<
|
|
57
|
-
HTMLDivElement,
|
|
58
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
59
|
-
>(({ className, ...props }, ref) => (
|
|
60
|
-
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
61
|
-
));
|
|
62
|
-
CardContent.displayName = "CardContent";
|
|
63
|
-
|
|
64
|
-
const CardFooter = React.forwardRef<
|
|
65
|
-
HTMLDivElement,
|
|
66
|
-
React.HTMLAttributes<HTMLDivElement>
|
|
67
|
-
>(({ className, ...props }, ref) => (
|
|
68
|
-
<div
|
|
69
|
-
ref={ref}
|
|
70
|
-
className={cn("flex items-center p-6 pt-0", className)}
|
|
71
|
-
{...props}
|
|
72
|
-
/>
|
|
73
|
-
));
|
|
74
|
-
CardFooter.displayName = "CardFooter";
|
|
75
|
-
|
|
76
|
-
export {
|
|
77
|
-
Card,
|
|
78
|
-
CardHeader,
|
|
79
|
-
CardFooter,
|
|
80
|
-
CardTitle,
|
|
81
|
-
CardDescription,
|
|
82
|
-
CardContent,
|
|
83
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
|
-
import { Check } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
import { cn } from "../../lib/utils";
|
|
8
|
-
|
|
9
|
-
export type CheckboxProps = React.ComponentPropsWithoutRef<
|
|
10
|
-
typeof CheckboxPrimitive.Root
|
|
11
|
-
>;
|
|
12
|
-
|
|
13
|
-
const Checkbox = React.forwardRef<
|
|
14
|
-
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
15
|
-
CheckboxProps
|
|
16
|
-
>(({ className, ...props }, ref) => (
|
|
17
|
-
<CheckboxPrimitive.Root
|
|
18
|
-
ref={ref}
|
|
19
|
-
className={cn(
|
|
20
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
21
|
-
className
|
|
22
|
-
)}
|
|
23
|
-
{...props}
|
|
24
|
-
>
|
|
25
|
-
<CheckboxPrimitive.Indicator
|
|
26
|
-
className={cn("flex items-center justify-center text-current")}
|
|
27
|
-
>
|
|
28
|
-
<Check className="h-4 w-4" />
|
|
29
|
-
</CheckboxPrimitive.Indicator>
|
|
30
|
-
</CheckboxPrimitive.Root>
|
|
31
|
-
));
|
|
32
|
-
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
33
|
-
|
|
34
|
-
export { Checkbox };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible"
|
|
4
|
-
|
|
5
|
-
const Collapsible = CollapsiblePrimitive.Root
|
|
6
|
-
|
|
7
|
-
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
|
|
8
|
-
|
|
9
|
-
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
|
|
10
|
-
|
|
11
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { type DialogProps } from "@radix-ui/react-dialog";
|
|
5
|
-
import { Command as CommandPrimitive } from "cmdk";
|
|
6
|
-
import { Search } from "lucide-react";
|
|
7
|
-
|
|
8
|
-
import { cn } from "../../lib/utils";
|
|
9
|
-
import { Dialog, DialogContent } from "../../components/ui/dialog";
|
|
10
|
-
|
|
11
|
-
const Command = React.forwardRef<
|
|
12
|
-
React.ElementRef<typeof CommandPrimitive>,
|
|
13
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
|
14
|
-
>(({ className, ...props }, ref) => (
|
|
15
|
-
<CommandPrimitive
|
|
16
|
-
ref={ref}
|
|
17
|
-
className={cn(
|
|
18
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
19
|
-
className
|
|
20
|
-
)}
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
));
|
|
24
|
-
Command.displayName = CommandPrimitive.displayName;
|
|
25
|
-
|
|
26
|
-
const CommandDialog = ({ children, ...props }: DialogProps) => {
|
|
27
|
-
return (
|
|
28
|
-
<Dialog {...props}>
|
|
29
|
-
<DialogContent className="overflow-hidden p-0">
|
|
30
|
-
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
31
|
-
{children}
|
|
32
|
-
</Command>
|
|
33
|
-
</DialogContent>
|
|
34
|
-
</Dialog>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const CommandInput = React.forwardRef<
|
|
39
|
-
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
40
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
|
41
|
-
>(({ className, ...props }, ref) => (
|
|
42
|
-
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
|
43
|
-
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
|
44
|
-
<CommandPrimitive.Input
|
|
45
|
-
ref={ref}
|
|
46
|
-
className={cn(
|
|
47
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
48
|
-
className
|
|
49
|
-
)}
|
|
50
|
-
{...props}
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
));
|
|
54
|
-
|
|
55
|
-
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
56
|
-
|
|
57
|
-
const CommandList = React.forwardRef<
|
|
58
|
-
React.ElementRef<typeof CommandPrimitive.List>,
|
|
59
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
|
60
|
-
>(({ className, ...props }, ref) => (
|
|
61
|
-
<CommandPrimitive.List
|
|
62
|
-
ref={ref}
|
|
63
|
-
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
|
64
|
-
{...props}
|
|
65
|
-
/>
|
|
66
|
-
));
|
|
67
|
-
|
|
68
|
-
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
69
|
-
|
|
70
|
-
const CommandEmpty = React.forwardRef<
|
|
71
|
-
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
72
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
|
73
|
-
>((props, ref) => (
|
|
74
|
-
<CommandPrimitive.Empty
|
|
75
|
-
ref={ref}
|
|
76
|
-
className="py-6 text-center text-sm"
|
|
77
|
-
{...props}
|
|
78
|
-
/>
|
|
79
|
-
));
|
|
80
|
-
|
|
81
|
-
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
82
|
-
|
|
83
|
-
const CommandGroup = React.forwardRef<
|
|
84
|
-
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
85
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
|
86
|
-
>(({ className, ...props }, ref) => (
|
|
87
|
-
<CommandPrimitive.Group
|
|
88
|
-
ref={ref}
|
|
89
|
-
className={cn(
|
|
90
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
91
|
-
className
|
|
92
|
-
)}
|
|
93
|
-
{...props}
|
|
94
|
-
/>
|
|
95
|
-
));
|
|
96
|
-
|
|
97
|
-
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
98
|
-
|
|
99
|
-
const CommandSeparator = React.forwardRef<
|
|
100
|
-
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
101
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
|
102
|
-
>(({ className, ...props }, ref) => (
|
|
103
|
-
<CommandPrimitive.Separator
|
|
104
|
-
ref={ref}
|
|
105
|
-
className={cn("-mx-1 h-px bg-border", className)}
|
|
106
|
-
{...props}
|
|
107
|
-
/>
|
|
108
|
-
));
|
|
109
|
-
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
110
|
-
|
|
111
|
-
const CommandItem = React.forwardRef<
|
|
112
|
-
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
113
|
-
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
|
114
|
-
>(({ className, ...props }, ref) => (
|
|
115
|
-
<CommandPrimitive.Item
|
|
116
|
-
ref={ref}
|
|
117
|
-
className={cn(
|
|
118
|
-
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
119
|
-
className
|
|
120
|
-
)}
|
|
121
|
-
{...props}
|
|
122
|
-
/>
|
|
123
|
-
));
|
|
124
|
-
|
|
125
|
-
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
|
126
|
-
|
|
127
|
-
const CommandShortcut = ({
|
|
128
|
-
className,
|
|
129
|
-
...props
|
|
130
|
-
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
131
|
-
return (
|
|
132
|
-
<span
|
|
133
|
-
className={cn(
|
|
134
|
-
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
135
|
-
className
|
|
136
|
-
)}
|
|
137
|
-
{...props}
|
|
138
|
-
/>
|
|
139
|
-
);
|
|
140
|
-
};
|
|
141
|
-
CommandShortcut.displayName = "CommandShortcut";
|
|
142
|
-
|
|
143
|
-
export {
|
|
144
|
-
Command,
|
|
145
|
-
CommandDialog,
|
|
146
|
-
CommandInput,
|
|
147
|
-
CommandList,
|
|
148
|
-
CommandEmpty,
|
|
149
|
-
CommandGroup,
|
|
150
|
-
CommandItem,
|
|
151
|
-
CommandShortcut,
|
|
152
|
-
CommandSeparator,
|
|
153
|
-
};
|