Release v1.3.1 (#100)

This commit is contained in:
Markus Thielker 2025-03-18 09:20:23 +01:00 committed by GitHub
commit d242378bb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1219 additions and 19 deletions

1203
bun.lock Normal file

File diff suppressed because it is too large Load diff

BIN
bun.lockb

Binary file not shown.

View file

@ -2,7 +2,7 @@
"name": "next-finances", "name": "next-finances",
"description": "A finances application to keep track of my personal spendings", "description": "A finances application to keep track of my personal spendings",
"homepage": "https://github.com/MarkusThielker/next-finances", "homepage": "https://github.com/MarkusThielker/next-finances",
"version": "1.3.0", "version": "1.3.1",
"author": { "author": {
"name": "Markus Thielker" "name": "Markus Thielker"
}, },
@ -26,7 +26,7 @@
"@radix-ui/react-dropdown-menu": "^2.1.4", "@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-label": "^2.1.1", "@radix-ui/react-label": "^2.1.1",
"@radix-ui/react-navigation-menu": "^1.2.3", "@radix-ui/react-navigation-menu": "^1.2.3",
"@radix-ui/react-popover": "^1.1.4", "@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-scroll-area": "^1.2.2", "@radix-ui/react-scroll-area": "^1.2.2",
"@radix-ui/react-select": "^2.1.4", "@radix-ui/react-select": "^2.1.4",
"@radix-ui/react-separator": "^1.1.1", "@radix-ui/react-separator": "^1.1.1",

View file

@ -125,10 +125,7 @@ export default function PaymentForm({value, entities, categories, onSubmit, clas
<Calendar <Calendar
mode="single" mode="single"
selected={field.value} selected={field.value}
onSelect={(e) => { onSelect={field.onChange}
field.onChange(e);
}}
initialFocus
/> />
</PopoverContent> </PopoverContent>
</Popover> </Popover>

View file

@ -5,7 +5,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
const buttonVariants = cva( const buttonVariants = cva(
'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
{ {
variants: { variants: {
variant: { variant: {
@ -40,11 +40,11 @@ export interface ButtonProps
} }
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({className, variant, size, asChild = false, ...props}, ref) => { ({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button'; const Comp = asChild ? Slot : 'button';
return ( return (
<Comp <Comp
className={cn(buttonVariants({variant, size, className}))} className={cn(buttonVariants({ variant, size, className }))}
ref={ref} ref={ref}
{...props} {...props}
/> />

View file

@ -10,11 +10,11 @@ import { buttonVariants } from '@/components/ui/button';
export type CalendarProps = React.ComponentProps<typeof DayPicker> export type CalendarProps = React.ComponentProps<typeof DayPicker>
function Calendar({ function Calendar({
className, className,
classNames, classNames,
showOutsideDays = true, showOutsideDays = true,
...props ...props
}: CalendarProps) { }: CalendarProps) {
return ( return (
<DayPicker <DayPicker
showOutsideDays={showOutsideDays} showOutsideDays={showOutsideDays}
@ -26,7 +26,7 @@ function Calendar({
caption_label: 'text-sm font-medium', caption_label: 'text-sm font-medium',
nav: 'space-x-1 flex items-center', nav: 'space-x-1 flex items-center',
nav_button: cn( nav_button: cn(
buttonVariants({variant: 'outline'}), buttonVariants({ variant: 'outline' }),
'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100', 'h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100',
), ),
nav_button_previous: 'absolute left-1', nav_button_previous: 'absolute left-1',
@ -38,7 +38,7 @@ function Calendar({
row: 'flex w-full mt-2', row: 'flex w-full mt-2',
cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20', cell: 'h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20',
day: cn( day: cn(
buttonVariants({variant: 'ghost'}), buttonVariants({ variant: 'ghost' }),
'h-9 w-9 p-0 font-normal aria-selected:opacity-100', 'h-9 w-9 p-0 font-normal aria-selected:opacity-100',
), ),
day_range_end: 'day-range-end', day_range_end: 'day-range-end',
@ -54,10 +54,10 @@ function Calendar({
...classNames, ...classNames,
}} }}
components={{ components={{
IconLeft: ({className, ...props}) => ( IconLeft: ({ className, ...props }) => (
<ChevronLeft className={cn('h-4 w-4', className)} {...props} /> <ChevronLeft className={cn('h-4 w-4', className)} {...props} />
), ),
IconRight: ({className, ...props}) => ( IconRight: ({ className, ...props }) => (
<ChevronRight className={cn('h-4 w-4', className)} {...props} /> <ChevronRight className={cn('h-4 w-4', className)} {...props} />
), ),
}} }}

View file

@ -12,7 +12,7 @@ const PopoverTrigger = PopoverPrimitive.Trigger;
const PopoverContent = React.forwardRef< const PopoverContent = React.forwardRef<
React.ElementRef<typeof PopoverPrimitive.Content>, React.ElementRef<typeof PopoverPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
>(({className, align = 'center', sideOffset = 4, ...props}, ref) => ( >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (
<PopoverPrimitive.Portal> <PopoverPrimitive.Portal>
<PopoverPrimitive.Content <PopoverPrimitive.Content
ref={ref} ref={ref}