@phsa.tec/design-system-react 0.1.6 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/README.md +390 -209
  2. package/dist/index.d.mts +485 -0
  3. package/dist/index.d.ts +485 -0
  4. package/dist/index.js +4259 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +4186 -0
  7. package/dist/index.mjs.map +1 -0
  8. package/dist/styles.css +2534 -0
  9. package/dist/styles.css.map +1 -0
  10. package/dist/styles.d.mts +2 -0
  11. package/dist/styles.d.ts +2 -0
  12. package/package.json +46 -6
  13. package/.eslintrc.json +0 -7
  14. package/.github/workflows/deploy-storybook.yml +0 -75
  15. package/.storybook/main.ts +0 -16
  16. package/.storybook/preview.ts +0 -15
  17. package/components.json +0 -21
  18. package/jest.config.ts +0 -25
  19. package/next.config.ts +0 -7
  20. package/postcss.config.mjs +0 -8
  21. package/public/file.svg +0 -1
  22. package/public/globe.svg +0 -1
  23. package/public/next.svg +0 -1
  24. package/public/vercel.svg +0 -1
  25. package/public/window.svg +0 -1
  26. package/src/app/columns.tsx +0 -178
  27. package/src/app/favicon.ico +0 -0
  28. package/src/app/fonts/GeistMonoVF.woff +0 -0
  29. package/src/app/fonts/GeistVF.woff +0 -0
  30. package/src/app/globals.css +0 -94
  31. package/src/app/layout.tsx +0 -35
  32. package/src/app/page.tsx +0 -7
  33. package/src/components/actions/AlertDialog/AlertDialog.tsx +0 -45
  34. package/src/components/actions/AlertDialog/alert-dialog.stories.tsx +0 -21
  35. package/src/components/actions/AlertDialog/index.ts +0 -1
  36. package/src/components/actions/Button/Button.stories.ts +0 -38
  37. package/src/components/actions/Button/Button.tsx +0 -23
  38. package/src/components/actions/Button/index.ts +0 -1
  39. package/src/components/actions/Collapsible/index.ts +0 -1
  40. package/src/components/actions/Dialog/Dialog.stories.tsx +0 -70
  41. package/src/components/actions/Dialog/Dialog.tsx +0 -87
  42. package/src/components/actions/Dialog/components/DialogWithActions/index.tsx +0 -40
  43. package/src/components/actions/Dialog/index.ts +0 -1
  44. package/src/components/actions/Steps/Steps.stories.tsx +0 -25
  45. package/src/components/actions/Steps/Steps.tsx +0 -51
  46. package/src/components/actions/Steps/index.ts +0 -1
  47. package/src/components/actions/index.ts +0 -5
  48. package/src/components/dataDisplay/Avatar/Avatar.stories.tsx +0 -22
  49. package/src/components/dataDisplay/Avatar/Avatar.tsx +0 -21
  50. package/src/components/dataDisplay/Avatar/index.ts +0 -2
  51. package/src/components/dataDisplay/Badge/Badge.stories.tsx +0 -36
  52. package/src/components/dataDisplay/Badge/index.ts +0 -1
  53. package/src/components/dataDisplay/Card/Card.stories.tsx +0 -24
  54. package/src/components/dataDisplay/Card/Card.tsx +0 -34
  55. package/src/components/dataDisplay/Card/index.ts +0 -1
  56. package/src/components/dataDisplay/DataPairList/DataPairList.tsx +0 -56
  57. package/src/components/dataDisplay/DataPairList/data-pair-list.stories.tsx +0 -87
  58. package/src/components/dataDisplay/DataPairList/index.ts +0 -2
  59. package/src/components/dataDisplay/DataPairList/types.ts +0 -10
  60. package/src/components/dataDisplay/DropDownMenu/index.ts +0 -1
  61. package/src/components/dataDisplay/ErrorMessage/ErrorMessage.tsx +0 -6
  62. package/src/components/dataDisplay/ErrorMessage/index.ts +0 -1
  63. package/src/components/dataDisplay/Icon/Icon.stories.tsx +0 -21
  64. package/src/components/dataDisplay/Icon/Icon.tsx +0 -47
  65. package/src/components/dataDisplay/Icon/index.ts +0 -1
  66. package/src/components/dataDisplay/Icon/types.ts +0 -6
  67. package/src/components/dataDisplay/Label/Label.stories.tsx +0 -21
  68. package/src/components/dataDisplay/Label/Label.tsx +0 -10
  69. package/src/components/dataDisplay/Label/index.ts +0 -1
  70. package/src/components/dataDisplay/Table/Table.tsx +0 -173
  71. package/src/components/dataDisplay/Table/columns.tsx +0 -223
  72. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-column-header.tsx +0 -72
  73. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-pagination.tsx +0 -91
  74. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-toolbar.tsx +0 -17
  75. package/src/components/dataDisplay/Table/components/DynamicTable/data-table-view-options.tsx +0 -58
  76. package/src/components/dataDisplay/Table/components/DynamicTable/data-table.stories.tsx +0 -118
  77. package/src/components/dataDisplay/Table/components/DynamicTable/index.tsx +0 -136
  78. package/src/components/dataDisplay/Table/components/DynamicTable/types.ts +0 -43
  79. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-column-header.tsx +0 -71
  80. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-faceted-filter.tsx +0 -147
  81. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-pagination.tsx +0 -97
  82. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-row-actions.tsx +0 -78
  83. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-toolbar.tsx +0 -60
  84. package/src/components/dataDisplay/Table/custom/CustomTable/data-table-view-options.tsx +0 -59
  85. package/src/components/dataDisplay/Table/custom/CustomTable/data-table.tsx +0 -145
  86. package/src/components/dataDisplay/Table/custom/CustomTable/data.ts +0 -71
  87. package/src/components/dataDisplay/Table/custom/CustomTable/index.tsx +0 -34
  88. package/src/components/dataDisplay/Table/custom/CustomTable/schema.ts +0 -11
  89. package/src/components/dataDisplay/Table/index.ts +0 -2
  90. package/src/components/dataDisplay/Table/table.stories.tsx +0 -147
  91. package/src/components/dataDisplay/Table/types.ts +0 -15
  92. package/src/components/dataDisplay/Tabs/Tabs.stories.tsx +0 -34
  93. package/src/components/dataDisplay/Tabs/Tabs.tsx +0 -53
  94. package/src/components/dataDisplay/Tabs/index.ts +0 -1
  95. package/src/components/dataDisplay/Text/Text.stories.tsx +0 -66
  96. package/src/components/dataDisplay/Text/Text.tsx +0 -56
  97. package/src/components/dataDisplay/Text/index.ts +0 -1
  98. package/src/components/dataDisplay/index.ts +0 -8
  99. package/src/components/dataInput/Input/components/Input/Input.stories.tsx +0 -99
  100. package/src/components/dataInput/Input/components/Input/InputBase.tsx +0 -50
  101. package/src/components/dataInput/Input/components/Input/__tests__/input.test.tsx +0 -38
  102. package/src/components/dataInput/Input/components/Input/index.tsx +0 -48
  103. package/src/components/dataInput/Input/components/Input/types.ts +0 -15
  104. package/src/components/dataInput/Input/components/InputBase/index.tsx +0 -31
  105. package/src/components/dataInput/Input/components/MaskInput/__tests__/mask-input.test.tsx +0 -77
  106. package/src/components/dataInput/Input/components/MaskInput/index.ts +0 -1
  107. package/src/components/dataInput/Input/components/MaskInput/mask-input.stories.tsx +0 -85
  108. package/src/components/dataInput/Input/components/MaskInput/mask-input.tsx +0 -73
  109. package/src/components/dataInput/Input/components/MultipleInput/MultipleInput.tsx +0 -105
  110. package/src/components/dataInput/Input/components/MultipleInput/MultipleInputBase.tsx +0 -100
  111. package/src/components/dataInput/Input/components/MultipleInput/MultipleMaskInput.tsx +0 -35
  112. package/src/components/dataInput/Input/components/MultipleInput/MultipleNumberInput.tsx +0 -35
  113. package/src/components/dataInput/Input/components/MultipleInput/__tests__/multiple-input.test.tsx +0 -152
  114. package/src/components/dataInput/Input/components/MultipleInput/index.ts +0 -2
  115. package/src/components/dataInput/Input/components/MultipleInput/multiple-input.stories.tsx +0 -96
  116. package/src/components/dataInput/Input/components/NumberInput/__tests__/number-input.test.tsx +0 -175
  117. package/src/components/dataInput/Input/components/NumberInput/index.ts +0 -1
  118. package/src/components/dataInput/Input/components/NumberInput/number-input.stories.tsx +0 -76
  119. package/src/components/dataInput/Input/components/NumberInput/number-input.tsx +0 -70
  120. package/src/components/dataInput/Input/index.ts +0 -4
  121. package/src/components/dataInput/Select/MultiSelect/MultiSelect.stories.tsx +0 -119
  122. package/src/components/dataInput/Select/MultiSelect/MultiSelectBase.tsx +0 -135
  123. package/src/components/dataInput/Select/MultiSelect/index.tsx +0 -75
  124. package/src/components/dataInput/Select/Select.stories.tsx +0 -61
  125. package/src/components/dataInput/Select/Select.tsx +0 -73
  126. package/src/components/dataInput/Select/SelectBase.tsx +0 -58
  127. package/src/components/dataInput/Select/index.ts +0 -2
  128. package/src/components/dataInput/Switch/Switch.stories.tsx +0 -75
  129. package/src/components/dataInput/Switch/Switch.tsx +0 -52
  130. package/src/components/dataInput/Switch/index.ts +0 -1
  131. package/src/components/dataInput/checkbox/Checkbox.tsx +0 -57
  132. package/src/components/dataInput/checkbox/Checkbox_old.tsx +0 -58
  133. package/src/components/dataInput/checkbox/Checkout.stories.tsx +0 -62
  134. package/src/components/dataInput/checkbox/index.ts +0 -1
  135. package/src/components/dataInput/form/Form.tsx +0 -47
  136. package/src/components/dataInput/form/index.ts +0 -3
  137. package/src/components/dataInput/index.ts +0 -5
  138. package/src/components/feedback/ErrorLabel/index.tsx +0 -24
  139. package/src/components/feedback/Spinner/index.ts +0 -1
  140. package/src/components/feedback/Toast/Toast.stories.tsx +0 -45
  141. package/src/components/feedback/Toast/index.ts +0 -2
  142. package/src/components/feedback/index.ts +0 -2
  143. package/src/components/index.ts +0 -6
  144. package/src/components/layout/Crud/components/Table/index.tsx +0 -183
  145. package/src/components/layout/Crud/components/Table/types.ts +0 -15
  146. package/src/components/layout/Crud/crud.stories.tsx +0 -317
  147. package/src/components/layout/Crud/hook/useCrudLayout/index.tsx +0 -94
  148. package/src/components/layout/Crud/hook/useRequest/index.tsx +0 -156
  149. package/src/components/layout/Crud/index.tsx +0 -295
  150. package/src/components/layout/Crud/store/CrudLayoutStore.ts +0 -75
  151. package/src/components/layout/Crud/types.ts +0 -14
  152. package/src/components/layout/Drawer/CustomDrawer/index.tsx +0 -33
  153. package/src/components/layout/Drawer/Drawer.stories.tsx +0 -80
  154. package/src/components/layout/Drawer/index.ts +0 -2
  155. package/src/components/layout/PageLayout/PageLayout.stories.tsx +0 -42
  156. package/src/components/layout/PageLayout/index.tsx +0 -28
  157. package/src/components/layout/Separator/index.ts +0 -1
  158. package/src/components/layout/Sheet/Sheet.stories.tsx +0 -28
  159. package/src/components/layout/Sheet/Sheet.tsx +0 -22
  160. package/src/components/layout/Sheet/index.ts +0 -1
  161. package/src/components/layout/Sidebar/Sidebar.stories.tsx +0 -116
  162. package/src/components/layout/Sidebar/Sidebar.tsx +0 -50
  163. package/src/components/layout/Sidebar/components/app-sidebar.tsx +0 -203
  164. package/src/components/layout/Sidebar/components/footer-sidebar.tsx +0 -17
  165. package/src/components/layout/Sidebar/components/header-sidebar.tsx +0 -90
  166. package/src/components/layout/Sidebar/components/menus.tsx +0 -55
  167. package/src/components/layout/Sidebar/components/nav-projects.tsx +0 -88
  168. package/src/components/layout/Sidebar/components/nav-user.tsx +0 -114
  169. package/src/components/layout/Sidebar/components/team-switcher.tsx +0 -85
  170. package/src/components/layout/Sidebar/index.ts +0 -2
  171. package/src/components/layout/Sidebar/provider/index.tsx +0 -51
  172. package/src/components/layout/Tabs/Tabs.tsx +0 -51
  173. package/src/components/layout/Tabs/index.ts +0 -1
  174. package/src/components/layout/Tabs/tabs.stories.tsx +0 -57
  175. package/src/components/layout/index.ts +0 -6
  176. package/src/components/navigation/Breadcrumbs/Breadcrumbs.tsx +0 -66
  177. package/src/components/navigation/Breadcrumbs/index.ts +0 -2
  178. package/src/components/navigation/index.ts +0 -1
  179. package/src/components/ui/alert-dialog.tsx +0 -141
  180. package/src/components/ui/alert.tsx +0 -59
  181. package/src/components/ui/avatar.tsx +0 -50
  182. package/src/components/ui/badge.tsx +0 -40
  183. package/src/components/ui/breadcrumb.tsx +0 -115
  184. package/src/components/ui/button.tsx +0 -57
  185. package/src/components/ui/card.tsx +0 -83
  186. package/src/components/ui/checkbox.tsx +0 -34
  187. package/src/components/ui/collapsible.tsx +0 -11
  188. package/src/components/ui/command.tsx +0 -153
  189. package/src/components/ui/dialog.tsx +0 -124
  190. package/src/components/ui/drawer.tsx +0 -117
  191. package/src/components/ui/dropdown-menu.tsx +0 -201
  192. package/src/components/ui/form.tsx +0 -179
  193. package/src/components/ui/input.tsx +0 -24
  194. package/src/components/ui/label.tsx +0 -30
  195. package/src/components/ui/popover.tsx +0 -33
  196. package/src/components/ui/select.tsx +0 -161
  197. package/src/components/ui/separator.tsx +0 -31
  198. package/src/components/ui/sheet.tsx +0 -140
  199. package/src/components/ui/sidebar.tsx +0 -763
  200. package/src/components/ui/skeleton.tsx +0 -15
  201. package/src/components/ui/sonner.tsx +0 -31
  202. package/src/components/ui/spinner.tsx +0 -54
  203. package/src/components/ui/switch.tsx +0 -33
  204. package/src/components/ui/table.tsx +0 -120
  205. package/src/components/ui/tabs.tsx +0 -55
  206. package/src/components/ui/toast.tsx +0 -130
  207. package/src/components/ui/toaster.tsx +0 -35
  208. package/src/components/ui/tooltip.tsx +0 -32
  209. package/src/hooks/use-conditional-controller.tsx +0 -35
  210. package/src/hooks/use-mask.tsx +0 -116
  211. package/src/hooks/use-mobile.tsx +0 -19
  212. package/src/hooks/use-toast.ts +0 -191
  213. package/src/index.ts +0 -1
  214. package/src/introduction.mdx +0 -132
  215. package/src/lib/utils.ts +0 -6
  216. package/tailwind.config.ts +0 -83
  217. package/tsconfig.json +0 -27
@@ -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
- };
@@ -1,124 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as DialogPrimitive from "@radix-ui/react-dialog";
5
- import { X } from "lucide-react";
6
-
7
- import { cn } from "../../lib/utils";
8
-
9
- export type DialogProps = DialogPrimitive.DialogProps;
10
-
11
- const Dialog = DialogPrimitive.Root;
12
-
13
- const DialogTrigger = DialogPrimitive.Trigger;
14
-
15
- const DialogPortal = DialogPrimitive.Portal;
16
-
17
- const DialogClose = DialogPrimitive.Close;
18
-
19
- const DialogOverlay = React.forwardRef<
20
- React.ElementRef<typeof DialogPrimitive.Overlay>,
21
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>
22
- >(({ className, ...props }, ref) => (
23
- <DialogPrimitive.Overlay
24
- ref={ref}
25
- className={cn(
26
- "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
27
- className
28
- )}
29
- {...props}
30
- />
31
- ));
32
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
33
-
34
- const DialogContent = React.forwardRef<
35
- React.ElementRef<typeof DialogPrimitive.Content>,
36
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
37
- >(({ className, children, ...props }, ref) => (
38
- <DialogPortal>
39
- <DialogOverlay />
40
- <DialogPrimitive.Content
41
- ref={ref}
42
- className={cn(
43
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg overflow-auto max-h-[80vh]",
44
- className
45
- )}
46
- {...props}
47
- >
48
- {children}
49
- <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
50
- <X className="h-4 w-4" />
51
- <span className="sr-only">Close</span>
52
- </DialogPrimitive.Close>
53
- </DialogPrimitive.Content>
54
- </DialogPortal>
55
- ));
56
- DialogContent.displayName = DialogPrimitive.Content.displayName;
57
-
58
- const DialogHeader = ({
59
- className,
60
- ...props
61
- }: React.HTMLAttributes<HTMLDivElement>) => (
62
- <div
63
- className={cn(
64
- "flex flex-col space-y-1.5 text-center sm:text-left",
65
- className
66
- )}
67
- {...props}
68
- />
69
- );
70
- DialogHeader.displayName = "DialogHeader";
71
-
72
- const DialogFooter = ({
73
- className,
74
- ...props
75
- }: React.HTMLAttributes<HTMLDivElement>) => (
76
- <div
77
- className={cn(
78
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
79
- className
80
- )}
81
- {...props}
82
- />
83
- );
84
- DialogFooter.displayName = "DialogFooter";
85
-
86
- const DialogTitle = React.forwardRef<
87
- React.ElementRef<typeof DialogPrimitive.Title>,
88
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
89
- >(({ className, ...props }, ref) => (
90
- <DialogPrimitive.Title
91
- ref={ref}
92
- className={cn(
93
- "text-lg font-semibold leading-none tracking-tight",
94
- className
95
- )}
96
- {...props}
97
- />
98
- ));
99
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
100
-
101
- const DialogDescription = React.forwardRef<
102
- React.ElementRef<typeof DialogPrimitive.Description>,
103
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
104
- >(({ className, ...props }, ref) => (
105
- <DialogPrimitive.Description
106
- ref={ref}
107
- className={cn("text-sm text-muted-foreground", className)}
108
- {...props}
109
- />
110
- ));
111
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
112
-
113
- export {
114
- Dialog,
115
- DialogPortal,
116
- DialogOverlay,
117
- DialogTrigger,
118
- DialogClose,
119
- DialogContent,
120
- DialogHeader,
121
- DialogFooter,
122
- DialogTitle,
123
- DialogDescription,
124
- };