@accounter/client 0.0.6-alpha-20250821064131-607bce2af8795b29d697c284cea324342edf056a → 0.0.7-alpha-20250821152900-10d226ddb9282dab646439fa323daab0b61c6033
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/CHANGELOG.md +97 -81
- package/dist/assets/{index-C2vScwb6.js → index-CabjtfX2.js} +214 -214
- package/dist/assets/index-p-KPWm08.css +1 -0
- package/dist/assets/{index.es-CAyIWuwI.js → index.es-C1DDb-T2.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/src/components/common/inputs/index.ts +1 -1
- package/src/components/{ui → common/inputs}/select-with-search.tsx +4 -13
- package/src/components/layout/dashboard-layout.tsx +1 -1
- package/src/components/layout/page-layout.tsx +2 -2
- package/src/components/transactions-table/cells/counterparty.tsx +1 -2
- package/src/components/transactions-table/cells-legacy/counterparty.tsx +1 -2
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/avatar.tsx +1 -1
- package/src/components/ui/badge.tsx +2 -2
- package/src/components/ui/button.tsx +5 -5
- package/src/components/ui/calendar.tsx +6 -3
- package/src/components/ui/card.tsx +2 -2
- package/src/components/ui/chart.tsx +3 -1
- package/src/components/ui/checkbox.tsx +2 -2
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/command.tsx +18 -3
- package/src/components/ui/dialog.tsx +15 -7
- package/src/components/ui/drawer.tsx +7 -2
- package/src/components/ui/dropdown-menu.tsx +4 -4
- package/src/components/ui/form.tsx +4 -4
- package/src/components/ui/input.tsx +2 -2
- package/src/components/ui/label.tsx +3 -1
- package/src/components/ui/popover.tsx +2 -2
- package/src/components/ui/scroll-area.tsx +4 -2
- package/src/components/ui/select.tsx +9 -5
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/sheet.tsx +4 -2
- package/src/components/ui/sonner.tsx +1 -1
- package/src/components/ui/switch.tsx +5 -3
- package/src/components/ui/table.tsx +2 -2
- package/src/components/ui/tabs.tsx +5 -3
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +5 -3
- package/dist/assets/index-waSKKwJo.css +0 -1
- package/src/components/common/inputs/select-input.tsx +0 -39
- package/src/components/ui/collapsible.ts +0 -9
- package/src/components/ui/heading.tsx +0 -15
|
@@ -5,11 +5,10 @@ import { useGetBusinesses } from '../../../hooks/use-get-businesses.js';
|
|
|
5
5
|
import { useUpdateTransaction } from '../../../hooks/use-update-transaction.js';
|
|
6
6
|
import { useUrlQuery } from '../../../hooks/use-url-query.js';
|
|
7
7
|
import { getBusinessTransactionsHref } from '../../business-transactions/index.js';
|
|
8
|
-
import { Tooltip } from '../../common/index.js';
|
|
8
|
+
import { SelectWithSearch, Tooltip } from '../../common/index.js';
|
|
9
9
|
import { InsertBusiness } from '../../common/modals/insert-business.jsx';
|
|
10
10
|
import { SimilarTransactionsModal } from '../../common/modals/similar-transactions-modal.jsx';
|
|
11
11
|
import { Button } from '../../ui/button.jsx';
|
|
12
|
-
import { SelectWithSearch } from '../../ui/select-with-search.jsx';
|
|
13
12
|
import type { TransactionsTableRowType } from '../columns.js';
|
|
14
13
|
|
|
15
14
|
type Props = {
|
|
@@ -9,11 +9,10 @@ import { useGetBusinesses } from '../../../hooks/use-get-businesses.js';
|
|
|
9
9
|
import { useUpdateTransaction } from '../../../hooks/use-update-transaction.js';
|
|
10
10
|
import { useUrlQuery } from '../../../hooks/use-url-query.js';
|
|
11
11
|
import { getBusinessTransactionsHref } from '../../business-transactions/index.js';
|
|
12
|
-
import { Tooltip } from '../../common/index.js';
|
|
12
|
+
import { SelectWithSearch, Tooltip } from '../../common/index.js';
|
|
13
13
|
import { InsertBusiness } from '../../common/modals/insert-business.js';
|
|
14
14
|
import { SimilarTransactionsModal } from '../../common/modals/similar-transactions-modal.js';
|
|
15
15
|
import { Button } from '../../ui/button.js';
|
|
16
|
-
import { SelectWithSearch } from '../../ui/select-with-search.js';
|
|
17
16
|
|
|
18
17
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- used by codegen
|
|
19
18
|
/* GraphQL */ `
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChevronDownIcon } from 'lucide-react';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>) {
|
|
7
7
|
return <AccordionPrimitive.Root data-slot="accordion" {...props} />;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
2
3
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>) {
|
|
6
6
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva(
|
|
7
7
|
'inline-flex items-center justify-center rounded-md border border-gray-200 px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 transition-[color,box-shadow] overflow-hidden dark:border-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900',
|
|
@@ -13,7 +13,7 @@ const badgeVariants = cva(
|
|
|
13
13
|
secondary:
|
|
14
14
|
'border-transparent bg-gray-100 text-gray-900 [a&]:hover:bg-gray-100/90 dark:bg-gray-800 dark:text-gray-50 dark:[a&]:hover:bg-gray-800/90',
|
|
15
15
|
destructive:
|
|
16
|
-
'border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40',
|
|
16
|
+
'border-transparent bg-red-500 text-white [a&]:hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:[a&]:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40 dark:dark:bg-red-900/60',
|
|
17
17
|
outline:
|
|
18
18
|
'text-gray-950 [a&]:hover:bg-gray-100 [a&]:hover:text-gray-900 dark:text-gray-50 dark:[a&]:hover:bg-gray-800 dark:[a&]:hover:text-gray-50',
|
|
19
19
|
},
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
11
|
default:
|
|
12
12
|
'bg-gray-900 text-gray-50 shadow-xs hover:bg-gray-900/90 dark:bg-gray-50 dark:text-gray-900 dark:hover:bg-gray-50/90',
|
|
13
13
|
destructive:
|
|
14
|
-
'bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:focus-visible:ring-red-900/40 dark:bg-red-900/60',
|
|
14
|
+
'bg-red-500 text-white shadow-xs hover:bg-red-500/90 focus-visible:ring-red-500/20 dark:focus-visible:ring-red-500/40 dark:bg-red-500/60 dark:bg-red-900 dark:hover:bg-red-900/90 dark:focus-visible:ring-red-900/20 dark:dark:focus-visible:ring-red-900/40 dark:dark:bg-red-900/60',
|
|
15
15
|
outline:
|
|
16
|
-
'border bg-white shadow-xs hover:bg-gray-100 hover:text-gray-900 dark:bg-gray-200/30 dark:border-gray-200 dark:hover:bg-gray-200/50 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:bg-gray-800/30 dark:border-gray-800 dark:hover:bg-gray-800/50',
|
|
16
|
+
'border bg-white shadow-xs hover:bg-gray-100 hover:text-gray-900 dark:bg-gray-200/30 dark:border-gray-200 dark:hover:bg-gray-200/50 dark:bg-gray-950 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:dark:bg-gray-800/30 dark:dark:border-gray-800 dark:dark:hover:bg-gray-800/50',
|
|
17
17
|
secondary:
|
|
18
18
|
'bg-gray-100 text-gray-900 shadow-xs hover:bg-gray-100/80 dark:bg-gray-800 dark:text-gray-50 dark:hover:bg-gray-800/80',
|
|
19
19
|
ghost:
|
|
20
|
-
'hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-100/50 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:hover:bg-gray-800/50',
|
|
20
|
+
'hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-100/50 dark:hover:bg-gray-800 dark:hover:text-gray-50 dark:dark:hover:bg-gray-800/50',
|
|
21
21
|
link: 'text-gray-900 underline-offset-4 hover:underline dark:text-gray-50',
|
|
22
22
|
},
|
|
23
23
|
size: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';
|
|
3
3
|
import { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Button, buttonVariants } from '@/components/ui/button.js';
|
|
5
|
+
import { cn } from '@/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
function Calendar({
|
|
8
8
|
className,
|
|
@@ -62,7 +62,10 @@ function Calendar({
|
|
|
62
62
|
'relative has-focus:border-gray-950 border border-gray-200 shadow-xs has-focus:ring-gray-950/50 has-focus:ring-[3px] rounded-md dark:has-focus:border-gray-300 dark:border-gray-800 dark:has-focus:ring-gray-300/50',
|
|
63
63
|
defaultClassNames.dropdown_root,
|
|
64
64
|
),
|
|
65
|
-
dropdown: cn(
|
|
65
|
+
dropdown: cn(
|
|
66
|
+
'absolute bg-white inset-0 opacity-0 dark:bg-gray-950',
|
|
67
|
+
defaultClassNames.dropdown,
|
|
68
|
+
),
|
|
66
69
|
caption_label: cn(
|
|
67
70
|
'select-none font-medium',
|
|
68
71
|
captionLayout === 'label'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { cn } from '
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
3
3
|
|
|
4
4
|
function Card({ className, ...props }: React.ComponentProps<'div'>) {
|
|
5
5
|
return (
|
|
@@ -19,7 +19,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
19
19
|
<div
|
|
20
20
|
data-slot="card-header"
|
|
21
21
|
className={cn(
|
|
22
|
-
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-
|
|
22
|
+
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
23
23
|
className,
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import * as RechartsPrimitive from 'recharts';
|
|
3
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '@/lib/utils.js';
|
|
4
6
|
|
|
5
7
|
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
6
8
|
const THEMES = { light: '', dark: '.dark' } as const;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckIcon } from 'lucide-react';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
7
7
|
return (
|
|
8
8
|
<CheckboxPrimitive.Root
|
|
9
9
|
data-slot="checkbox"
|
|
10
10
|
className={cn(
|
|
11
|
-
'peer border-gray-200 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 data-[state=checked]:border-gray-900 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900 dark:data-[state=checked]:border-gray-50 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900',
|
|
11
|
+
'peer border-gray-200 dark:bg-gray-200/30 data-[state=checked]:bg-gray-900 data-[state=checked]:text-gray-50 dark:data-[state=checked]:bg-gray-900 data-[state=checked]:border-gray-900 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-gray-800 dark:dark:bg-gray-800/30 dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:text-gray-900 dark:dark:data-[state=checked]:bg-gray-50 dark:data-[state=checked]:border-gray-50 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900',
|
|
12
12
|
className,
|
|
13
13
|
)}
|
|
14
14
|
{...props}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
2
|
+
|
|
3
|
+
function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {
|
|
4
|
+
return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} />;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function CollapsibleTrigger({
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {
|
|
10
|
+
return <CollapsiblePrimitive.CollapsibleTrigger data-slot="collapsible-trigger" {...props} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function CollapsibleContent({
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {
|
|
16
|
+
return <CollapsiblePrimitive.CollapsibleContent data-slot="collapsible-content" {...props} />;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
5
|
import { SearchIcon } from 'lucide-react';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
+
import {
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogDescription,
|
|
10
|
+
DialogHeader,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
} from '@/components/ui/dialog.js';
|
|
13
|
+
import { cn } from '@/lib/utils.js';
|
|
6
14
|
|
|
7
15
|
function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
|
|
8
16
|
return (
|
|
@@ -21,10 +29,14 @@ function CommandDialog({
|
|
|
21
29
|
title = 'Command Palette',
|
|
22
30
|
description = 'Search for a command to run...',
|
|
23
31
|
children,
|
|
32
|
+
className,
|
|
33
|
+
showCloseButton = true,
|
|
24
34
|
...props
|
|
25
35
|
}: React.ComponentProps<typeof Dialog> & {
|
|
26
36
|
title?: string;
|
|
27
37
|
description?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
showCloseButton?: boolean;
|
|
28
40
|
}) {
|
|
29
41
|
return (
|
|
30
42
|
<Dialog {...props}>
|
|
@@ -32,7 +44,10 @@ function CommandDialog({
|
|
|
32
44
|
<DialogTitle>{title}</DialogTitle>
|
|
33
45
|
<DialogDescription>{description}</DialogDescription>
|
|
34
46
|
</DialogHeader>
|
|
35
|
-
<DialogContent
|
|
47
|
+
<DialogContent
|
|
48
|
+
className={cn('overflow-hidden p-0', className)}
|
|
49
|
+
showCloseButton={showCloseButton}
|
|
50
|
+
>
|
|
36
51
|
<Command className="[&_[cmdk-group-heading]]:text-gray-500 **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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 dark:[&_[cmdk-group-heading]]:text-gray-400">
|
|
37
52
|
{children}
|
|
38
53
|
</Command>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { XIcon } from 'lucide-react';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {
|
|
7
7
|
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
@@ -27,7 +27,7 @@ function DialogOverlay({
|
|
|
27
27
|
<DialogPrimitive.Overlay
|
|
28
28
|
data-slot="dialog-overlay"
|
|
29
29
|
className={cn(
|
|
30
|
-
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/
|
|
30
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50',
|
|
31
31
|
className,
|
|
32
32
|
)}
|
|
33
33
|
{...props}
|
|
@@ -38,8 +38,11 @@ function DialogOverlay({
|
|
|
38
38
|
function DialogContent({
|
|
39
39
|
className,
|
|
40
40
|
children,
|
|
41
|
+
showCloseButton = true,
|
|
41
42
|
...props
|
|
42
|
-
}: React.ComponentProps<typeof DialogPrimitive.Content>
|
|
43
|
+
}: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
44
|
+
showCloseButton?: boolean;
|
|
45
|
+
}) {
|
|
43
46
|
return (
|
|
44
47
|
<DialogPortal data-slot="dialog-portal">
|
|
45
48
|
<DialogOverlay />
|
|
@@ -52,10 +55,15 @@ function DialogContent({
|
|
|
52
55
|
{...props}
|
|
53
56
|
>
|
|
54
57
|
{children}
|
|
55
|
-
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
{showCloseButton && (
|
|
59
|
+
<DialogPrimitive.Close
|
|
60
|
+
data-slot="dialog-close"
|
|
61
|
+
className="ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 data-[state=open]:text-gray-500 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800 dark:data-[state=open]:text-gray-400"
|
|
62
|
+
>
|
|
63
|
+
<XIcon />
|
|
64
|
+
<span className="sr-only">Close</span>
|
|
65
|
+
</DialogPrimitive.Close>
|
|
66
|
+
)}
|
|
59
67
|
</DialogPrimitive.Content>
|
|
60
68
|
</DialogPortal>
|
|
61
69
|
);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { Drawer as DrawerPrimitive } from 'vaul';
|
|
3
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '@/lib/utils.js';
|
|
4
6
|
|
|
5
7
|
function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {
|
|
6
8
|
return <DrawerPrimitive.Root data-slot="drawer" {...props} />;
|
|
@@ -65,7 +67,10 @@ function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
|
65
67
|
return (
|
|
66
68
|
<div
|
|
67
69
|
data-slot="drawer-header"
|
|
68
|
-
className={cn(
|
|
70
|
+
className={cn(
|
|
71
|
+
'flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left',
|
|
72
|
+
className,
|
|
73
|
+
)}
|
|
69
74
|
{...props}
|
|
70
75
|
/>
|
|
71
76
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
|
7
7
|
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />;
|
|
@@ -30,7 +30,7 @@ function DropdownMenuContent({
|
|
|
30
30
|
data-slot="dropdown-menu-content"
|
|
31
31
|
sideOffset={sideOffset}
|
|
32
32
|
className={cn(
|
|
33
|
-
'bg-white text-gray-950 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-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
33
|
+
'bg-white text-gray-950 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-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
34
34
|
className,
|
|
35
35
|
)}
|
|
36
36
|
{...props}
|
|
@@ -58,7 +58,7 @@ function DropdownMenuItem({
|
|
|
58
58
|
data-inset={inset}
|
|
59
59
|
data-variant={variant}
|
|
60
60
|
className={cn(
|
|
61
|
-
"focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-
|
|
61
|
+
"focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-gray-400",
|
|
62
62
|
className,
|
|
63
63
|
)}
|
|
64
64
|
{...props}
|
|
@@ -198,7 +198,7 @@ function DropdownMenuSubContent({
|
|
|
198
198
|
<DropdownMenuPrimitive.SubContent
|
|
199
199
|
data-slot="dropdown-menu-sub-content"
|
|
200
200
|
className={cn(
|
|
201
|
-
'bg-white text-gray-950 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-1001 min-w-[8rem] overflow-hidden rounded-md border border-gray-200 p-1 shadow-lg dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
201
|
+
'bg-white text-gray-950 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-1001 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-gray-200 p-1 shadow-lg dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
202
202
|
className,
|
|
203
203
|
)}
|
|
204
204
|
{...props}
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
type FieldPath,
|
|
9
9
|
type FieldValues,
|
|
10
10
|
} from 'react-hook-form';
|
|
11
|
+
import { Label } from '@/components/ui/label.js';
|
|
12
|
+
import { cn } from '@/lib/utils.js';
|
|
11
13
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
12
14
|
import { Slot } from '@radix-ui/react-slot';
|
|
13
|
-
import { cn } from '../../lib/utils.js';
|
|
14
|
-
import { Label } from './label.js';
|
|
15
15
|
|
|
16
16
|
const Form = FormProvider;
|
|
17
17
|
|
|
@@ -84,7 +84,7 @@ function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPri
|
|
|
84
84
|
data-slot="form-label"
|
|
85
85
|
data-error={!!error}
|
|
86
86
|
className={cn(
|
|
87
|
-
'data-[error=true]:text-
|
|
87
|
+
'data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900',
|
|
88
88
|
className,
|
|
89
89
|
)}
|
|
90
90
|
htmlFor={formItemId}
|
|
@@ -132,7 +132,7 @@ function FormMessage({ className, ...props }: React.ComponentProps<'p'>) {
|
|
|
132
132
|
<p
|
|
133
133
|
data-slot="form-message"
|
|
134
134
|
id={formMessageId}
|
|
135
|
-
className={cn('text-red-500 text-sm dark:text-red-
|
|
135
|
+
className={cn('text-red-500 text-sm dark:text-red-900', className)}
|
|
136
136
|
{...props}
|
|
137
137
|
>
|
|
138
138
|
{body}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { cn } from '
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
3
3
|
|
|
4
4
|
function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
|
5
5
|
return (
|
|
@@ -7,7 +7,7 @@ function Input({ className, type, ...props }: React.ComponentProps<'input'>) {
|
|
|
7
7
|
type={type}
|
|
8
8
|
data-slot="input"
|
|
9
9
|
className={cn(
|
|
10
|
-
'
|
|
10
|
+
'file:text-gray-950 placeholder:text-gray-500 selection:bg-gray-900 selection:text-gray-50 dark:bg-gray-200/30 border-gray-200 flex 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 dark:file:text-gray-50 dark:placeholder:text-gray-400 dark:selection:bg-gray-50 dark:selection:text-gray-900 dark:dark:bg-gray-800/30 dark:border-gray-800',
|
|
11
11
|
'focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50',
|
|
12
12
|
'aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900',
|
|
13
13
|
className,
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
4
|
+
import { cn } from '@/lib/utils.js';
|
|
2
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
6
|
|
|
5
7
|
function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
6
8
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
2
3
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
6
6
|
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
@@ -23,7 +23,7 @@ function PopoverContent({
|
|
|
23
23
|
align={align}
|
|
24
24
|
sideOffset={sideOffset}
|
|
25
25
|
className={cn(
|
|
26
|
-
'bg-white text-gray-950 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-1001 w-72 rounded-md border border-gray-200 p-4 shadow-md outline-hidden dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
26
|
+
'bg-white text-gray-950 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-1001 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-gray-200 p-4 shadow-md outline-hidden dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
27
27
|
className,
|
|
28
28
|
)}
|
|
29
29
|
{...props}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
4
|
+
import { cn } from '@/lib/utils.js';
|
|
2
5
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
6
|
|
|
5
7
|
function ScrollArea({
|
|
6
8
|
className,
|
|
@@ -15,7 +17,7 @@ function ScrollArea({
|
|
|
15
17
|
>
|
|
16
18
|
<ScrollAreaPrimitive.Viewport
|
|
17
19
|
data-slot="scroll-area-viewport"
|
|
18
|
-
className="
|
|
20
|
+
className="focus-visible:ring-gray-950/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1 dark:focus-visible:ring-gray-300/50"
|
|
19
21
|
>
|
|
20
22
|
{children}
|
|
21
23
|
</ScrollAreaPrimitive.Viewport>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
3
|
+
import { cn } from '@/lib/utils.js';
|
|
3
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
5
|
|
|
6
6
|
function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {
|
|
7
7
|
return <SelectPrimitive.Root data-slot="select" {...props} />;
|
|
@@ -17,14 +17,18 @@ function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.V
|
|
|
17
17
|
|
|
18
18
|
function SelectTrigger({
|
|
19
19
|
className,
|
|
20
|
+
size = 'default',
|
|
20
21
|
children,
|
|
21
22
|
...props
|
|
22
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger>
|
|
23
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
24
|
+
size?: 'sm' | 'default';
|
|
25
|
+
}) {
|
|
23
26
|
return (
|
|
24
27
|
<SelectPrimitive.Trigger
|
|
25
28
|
data-slot="select-trigger"
|
|
29
|
+
data-size={size}
|
|
26
30
|
className={cn(
|
|
27
|
-
"border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500
|
|
31
|
+
"border-gray-200 data-[placeholder]:text-gray-500 [&_svg:not([class*='text-'])]:text-gray-500 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-gray-200/30 dark:hover:bg-gray-200/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:border-gray-800 dark:data-[placeholder]:text-gray-400 dark:[&_svg:not([class*='text-'])]:text-gray-400 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-gray-800/30 dark:dark:hover:bg-gray-800/50",
|
|
28
32
|
className,
|
|
29
33
|
)}
|
|
30
34
|
{...props}
|
|
@@ -48,7 +52,7 @@ function SelectContent({
|
|
|
48
52
|
<SelectPrimitive.Content
|
|
49
53
|
data-slot="select-content"
|
|
50
54
|
className={cn(
|
|
51
|
-
'bg-white text-gray-950 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 relative z-
|
|
55
|
+
'bg-white text-gray-950 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800',
|
|
52
56
|
position === 'popper' &&
|
|
53
57
|
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
54
58
|
className,
|
|
@@ -76,7 +80,7 @@ function SelectLabel({ className, ...props }: React.ComponentProps<typeof Select
|
|
|
76
80
|
return (
|
|
77
81
|
<SelectPrimitive.Label
|
|
78
82
|
data-slot="select-label"
|
|
79
|
-
className={cn('px-2 py-1.5 text-
|
|
83
|
+
className={cn('text-gray-500 px-2 py-1.5 text-xs dark:text-gray-400', className)}
|
|
80
84
|
{...props}
|
|
81
85
|
/>
|
|
82
86
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
2
3
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
4
|
|
|
5
5
|
function Separator({
|
|
6
6
|
className,
|
|
@@ -10,7 +10,7 @@ function Separator({
|
|
|
10
10
|
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
|
|
11
11
|
return (
|
|
12
12
|
<SeparatorPrimitive.Root
|
|
13
|
-
data-slot="separator
|
|
13
|
+
data-slot="separator"
|
|
14
14
|
decorative={decorative}
|
|
15
15
|
orientation={orientation}
|
|
16
16
|
className={cn(
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { XIcon } from 'lucide-react';
|
|
5
|
+
import { cn } from '@/lib/utils.js';
|
|
3
6
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
4
|
-
import { cn } from '../../lib/utils.js';
|
|
5
7
|
|
|
6
8
|
function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
|
|
7
9
|
return <SheetPrimitive.Root data-slot="sheet" {...props} />;
|
|
@@ -27,7 +29,7 @@ function SheetOverlay({
|
|
|
27
29
|
<SheetPrimitive.Overlay
|
|
28
30
|
data-slot="sheet-overlay"
|
|
29
31
|
className={cn(
|
|
30
|
-
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/
|
|
32
|
+
'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50',
|
|
31
33
|
className,
|
|
32
34
|
)}
|
|
33
35
|
{...props}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import React from 'react';
|
|
4
|
+
import { cn } from '@/lib/utils.js';
|
|
2
5
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
-
import { cn } from '../../lib/utils.js';
|
|
4
6
|
|
|
5
7
|
function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
|
|
6
8
|
return (
|
|
7
9
|
<SwitchPrimitive.Root
|
|
8
10
|
data-slot="switch"
|
|
9
11
|
className={cn(
|
|
10
|
-
'peer data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-gray-200 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 inline-flex h-
|
|
12
|
+
'peer data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-gray-200 focus-visible:border-gray-950 focus-visible:ring-gray-950/50 dark:data-[state=unchecked]:bg-gray-200/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-gray-200 border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-gray-50 dark:data-[state=unchecked]:bg-gray-800 dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50 dark:dark:data-[state=unchecked]:bg-gray-800/80 dark:border-gray-800',
|
|
11
13
|
className,
|
|
12
14
|
)}
|
|
13
15
|
{...props}
|
|
@@ -15,7 +17,7 @@ function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimi
|
|
|
15
17
|
<SwitchPrimitive.Thumb
|
|
16
18
|
data-slot="switch-thumb"
|
|
17
19
|
className={cn(
|
|
18
|
-
'bg-white pointer-events-none block size-4 rounded-full ring-0
|
|
20
|
+
'bg-white dark:data-[state=unchecked]:bg-gray-950 dark:data-[state=checked]:bg-gray-50 pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-gray-950 dark:dark:data-[state=unchecked]:bg-gray-50 dark:dark:data-[state=checked]:bg-gray-900',
|
|
19
21
|
)}
|
|
20
22
|
/>
|
|
21
23
|
</SwitchPrimitive.Root>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { cn } from '
|
|
2
|
+
import { cn } from '@/lib/utils.js';
|
|
3
3
|
|
|
4
4
|
function Table({ className, ...props }: React.ComponentProps<'table'>) {
|
|
5
5
|
return (
|
|
@@ -58,7 +58,7 @@ function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
|
|
|
58
58
|
<th
|
|
59
59
|
data-slot="table-head"
|
|
60
60
|
className={cn(
|
|
61
|
-
'text-gray-
|
|
61
|
+
'text-gray-950 h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] dark:text-gray-50',
|
|
62
62
|
className,
|
|
63
63
|
)}
|
|
64
64
|
{...props}
|