shadcn-ui-react 0.6.6 → 0.6.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/dist/index.cjs CHANGED
@@ -4754,13 +4754,28 @@ function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
4754
4754
 
4755
4755
  // node_modules/react-day-picker/dist/esm/selection/useRange.js
4756
4756
  function useRange(props, dateLib) {
4757
- const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;
4757
+ const { disabled, excludeDisabled, resetOnSelect, selected: initiallySelected, required, onSelect } = props;
4758
4758
  const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
4759
4759
  const selected = !onSelect ? internallySelected : initiallySelected;
4760
4760
  const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
4761
4761
  const select = (triggerDate, modifiers, e) => {
4762
4762
  const { min: min2, max: max2 } = props;
4763
- const newRange = triggerDate ? addToRange(triggerDate, selected, min2, max2, required, dateLib) : void 0;
4763
+ let newRange;
4764
+ if (triggerDate) {
4765
+ const selectedFrom = selected == null ? void 0 : selected.from;
4766
+ const selectedTo = selected == null ? void 0 : selected.to;
4767
+ const hasFullRange = !!selectedFrom && !!selectedTo;
4768
+ const isClickingSingleDayRange = !!selectedFrom && !!selectedTo && dateLib.isSameDay(selectedFrom, selectedTo) && dateLib.isSameDay(triggerDate, selectedFrom);
4769
+ if (resetOnSelect && (hasFullRange || !(selected == null ? void 0 : selected.from))) {
4770
+ if (!required && isClickingSingleDayRange) {
4771
+ newRange = void 0;
4772
+ } else {
4773
+ newRange = { from: triggerDate, to: void 0 };
4774
+ }
4775
+ } else {
4776
+ newRange = addToRange(triggerDate, selected, min2, max2, required, dateLib);
4777
+ }
4778
+ }
4764
4779
  if (excludeDisabled && disabled && (newRange == null ? void 0 : newRange.from) && newRange.to) {
4765
4780
  if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {
4766
4781
  newRange.from = triggerDate;
@@ -4890,7 +4905,7 @@ function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
4890
4905
 
4891
4906
  // node_modules/react-day-picker/dist/esm/DayPicker.js
4892
4907
  function DayPicker(initialProps) {
4893
- var _a, _b;
4908
+ var _a, _b, _c;
4894
4909
  let props = initialProps;
4895
4910
  const timeZone = props.timeZone;
4896
4911
  if (timeZone) {
@@ -5096,7 +5111,7 @@ function DayPicker(initialProps) {
5096
5111
  { value: contextValue },
5097
5112
  import_react32.default.createElement(
5098
5113
  components.Root,
5099
- __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
5114
+ __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: (_c = props.lang) != null ? _c : locale.code, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
5100
5115
  import_react32.default.createElement(
5101
5116
  components.Months,
5102
5117
  { className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
@@ -9240,6 +9255,7 @@ var inputVariants3 = {
9240
9255
  var variants3 = inputVariants3;
9241
9256
 
9242
9257
  // src/components/ui/input.tsx
9258
+ var import_lucide_react8 = require("lucide-react");
9243
9259
  var import_jsx_runtime56 = require("react/jsx-runtime");
9244
9260
  function UiInput(_a) {
9245
9261
  var _b = _a, {
@@ -9253,7 +9269,9 @@ function UiInput(_a) {
9253
9269
  inputClassName,
9254
9270
  variant = "outline",
9255
9271
  errorMessage,
9256
- htmlFormItemId: formItemId
9272
+ htmlFormItemId: formItemId,
9273
+ requiredLabel,
9274
+ requiredLabelClassName
9257
9275
  } = _b, inputProps = __objRest(_b, [
9258
9276
  "ref",
9259
9277
  "label",
@@ -9265,16 +9283,29 @@ function UiInput(_a) {
9265
9283
  "inputClassName",
9266
9284
  "variant",
9267
9285
  "errorMessage",
9268
- "htmlFormItemId"
9286
+ "htmlFormItemId",
9287
+ "requiredLabel",
9288
+ "requiredLabelClassName"
9269
9289
  ]);
9270
9290
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("w-full", inputClassName), children: [
9271
- label ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9291
+ label ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
9272
9292
  Label3,
9273
9293
  {
9274
9294
  ref,
9275
9295
  className: cn(errorMessage && "text-destructive", labelClassName),
9276
9296
  htmlFor: formItemId,
9277
- children: label
9297
+ children: [
9298
+ label,
9299
+ requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
9300
+ import_lucide_react8.Asterisk,
9301
+ {
9302
+ className: cn(
9303
+ "ml-px h-3 w-3 text-red-500",
9304
+ requiredLabelClassName
9305
+ )
9306
+ }
9307
+ )
9308
+ ]
9278
9309
  }
9279
9310
  ) : null,
9280
9311
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
@@ -9284,8 +9315,8 @@ function UiInput(_a) {
9284
9315
  placeholder,
9285
9316
  className: cn(
9286
9317
  "bg-input px-[0.9rem] py-5",
9287
- className,
9288
- variants3[variant]
9318
+ variants3[variant],
9319
+ className
9289
9320
  ),
9290
9321
  classNameDefault
9291
9322
  })
package/dist/index.d.cts CHANGED
@@ -1021,7 +1021,7 @@ declare const inputVariants: Record<InputVariantProps, string>;
1021
1021
  type InputVariant = keyof typeof inputVariants;
1022
1022
 
1023
1023
  type VariantProps = InputVariant;
1024
- interface UiInputProps {
1024
+ interface UiInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
1025
1025
  ref?: React$1.Ref<HTMLLabelElement>;
1026
1026
  label?: string;
1027
1027
  placeholder?: string;
@@ -1029,14 +1029,16 @@ interface UiInputProps {
1029
1029
  onChange?: React$1.ChangeEventHandler<HTMLInputElement> | undefined;
1030
1030
  className?: string;
1031
1031
  classNameDefault?: boolean;
1032
+ requiredLabel?: boolean;
1033
+ requiredLabelClassName?: string;
1032
1034
  labelClassName?: string;
1033
1035
  inputClassName?: string;
1034
1036
  variant?: VariantProps;
1035
1037
  errorMessage?: string;
1036
1038
  htmlFormItemId?: string;
1037
1039
  }
1038
- declare function UiInput({ ref, label, placeholder, onChange, className, classNameDefault, labelClassName, inputClassName, variant, errorMessage, htmlFormItemId: formItemId, ...inputProps }: UiInputProps): react_jsx_runtime.JSX.Element;
1040
+ declare function UiInput({ ref, label, placeholder, onChange, className, classNameDefault, labelClassName, inputClassName, variant, errorMessage, htmlFormItemId: formItemId, requiredLabel, requiredLabelClassName, ...inputProps }: UiInputProps): react_jsx_runtime.JSX.Element;
1039
1041
 
1040
1042
  declare function cn(...inputs: ClassValue[]): string;
1041
1043
 
1042
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
1044
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiInput, type UiInputProps, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
package/dist/index.d.ts CHANGED
@@ -1021,7 +1021,7 @@ declare const inputVariants: Record<InputVariantProps, string>;
1021
1021
  type InputVariant = keyof typeof inputVariants;
1022
1022
 
1023
1023
  type VariantProps = InputVariant;
1024
- interface UiInputProps {
1024
+ interface UiInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> {
1025
1025
  ref?: React$1.Ref<HTMLLabelElement>;
1026
1026
  label?: string;
1027
1027
  placeholder?: string;
@@ -1029,14 +1029,16 @@ interface UiInputProps {
1029
1029
  onChange?: React$1.ChangeEventHandler<HTMLInputElement> | undefined;
1030
1030
  className?: string;
1031
1031
  classNameDefault?: boolean;
1032
+ requiredLabel?: boolean;
1033
+ requiredLabelClassName?: string;
1032
1034
  labelClassName?: string;
1033
1035
  inputClassName?: string;
1034
1036
  variant?: VariantProps;
1035
1037
  errorMessage?: string;
1036
1038
  htmlFormItemId?: string;
1037
1039
  }
1038
- declare function UiInput({ ref, label, placeholder, onChange, className, classNameDefault, labelClassName, inputClassName, variant, errorMessage, htmlFormItemId: formItemId, ...inputProps }: UiInputProps): react_jsx_runtime.JSX.Element;
1040
+ declare function UiInput({ ref, label, placeholder, onChange, className, classNameDefault, labelClassName, inputClassName, variant, errorMessage, htmlFormItemId: formItemId, requiredLabel, requiredLabelClassName, ...inputProps }: UiInputProps): react_jsx_runtime.JSX.Element;
1039
1041
 
1040
1042
  declare function cn(...inputs: ClassValue[]): string;
1041
1043
 
1042
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiInput, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
1044
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertModal, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Breadcrumbs, Button, type ButtonProps, Calendar, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DATA_TABLE_TEMPLATES, DataTable, type DataTableAccent, DataTableSkeleton, type DataTableSlots, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, FileUpload, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormSelect, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Icons, ImagePreview, Input, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, type InputProps, type InputVariant$1 as InputVariant, type InputVariantProps$1 as InputVariantProps, Label, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, PageHead, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationNextLast, PaginationPrevious, PaginationPreviousLast, PaginationSection, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, type SelectOption, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UiInput, type UiInputProps, UiSelect, badgeVariants, buttonVariants, cn, inputVariants$2 as inputVariants, navigationMenuTriggerStyle, reducer, toast, toggleVariants, useFormField, useToast, variants };
package/dist/index.js CHANGED
@@ -4490,13 +4490,28 @@ function rangeContainsModifiers(range, modifiers, dateLib = defaultDateLib) {
4490
4490
 
4491
4491
  // node_modules/react-day-picker/dist/esm/selection/useRange.js
4492
4492
  function useRange(props, dateLib) {
4493
- const { disabled, excludeDisabled, selected: initiallySelected, required, onSelect } = props;
4493
+ const { disabled, excludeDisabled, resetOnSelect, selected: initiallySelected, required, onSelect } = props;
4494
4494
  const [internallySelected, setSelected] = useControlledValue(initiallySelected, onSelect ? initiallySelected : void 0);
4495
4495
  const selected = !onSelect ? internallySelected : initiallySelected;
4496
4496
  const isSelected = (date) => selected && rangeIncludesDate(selected, date, false, dateLib);
4497
4497
  const select = (triggerDate, modifiers, e) => {
4498
4498
  const { min: min2, max: max2 } = props;
4499
- const newRange = triggerDate ? addToRange(triggerDate, selected, min2, max2, required, dateLib) : void 0;
4499
+ let newRange;
4500
+ if (triggerDate) {
4501
+ const selectedFrom = selected == null ? void 0 : selected.from;
4502
+ const selectedTo = selected == null ? void 0 : selected.to;
4503
+ const hasFullRange = !!selectedFrom && !!selectedTo;
4504
+ const isClickingSingleDayRange = !!selectedFrom && !!selectedTo && dateLib.isSameDay(selectedFrom, selectedTo) && dateLib.isSameDay(triggerDate, selectedFrom);
4505
+ if (resetOnSelect && (hasFullRange || !(selected == null ? void 0 : selected.from))) {
4506
+ if (!required && isClickingSingleDayRange) {
4507
+ newRange = void 0;
4508
+ } else {
4509
+ newRange = { from: triggerDate, to: void 0 };
4510
+ }
4511
+ } else {
4512
+ newRange = addToRange(triggerDate, selected, min2, max2, required, dateLib);
4513
+ }
4514
+ }
4500
4515
  if (excludeDisabled && disabled && (newRange == null ? void 0 : newRange.from) && newRange.to) {
4501
4516
  if (rangeContainsModifiers({ from: newRange.from, to: newRange.to }, disabled, dateLib)) {
4502
4517
  newRange.from = triggerDate;
@@ -4626,7 +4641,7 @@ function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
4626
4641
 
4627
4642
  // node_modules/react-day-picker/dist/esm/DayPicker.js
4628
4643
  function DayPicker(initialProps) {
4629
- var _a, _b;
4644
+ var _a, _b, _c;
4630
4645
  let props = initialProps;
4631
4646
  const timeZone = props.timeZone;
4632
4647
  if (timeZone) {
@@ -4832,7 +4847,7 @@ function DayPicker(initialProps) {
4832
4847
  { value: contextValue },
4833
4848
  React32.createElement(
4834
4849
  components.Root,
4835
- __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
4850
+ __spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: (_c = props.lang) != null ? _c : locale.code, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
4836
4851
  React32.createElement(
4837
4852
  components.Months,
4838
4853
  { className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
@@ -9038,6 +9053,7 @@ var inputVariants3 = {
9038
9053
  var variants3 = inputVariants3;
9039
9054
 
9040
9055
  // src/components/ui/input.tsx
9056
+ import { Asterisk as Asterisk2 } from "lucide-react";
9041
9057
  import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
9042
9058
  function UiInput(_a) {
9043
9059
  var _b = _a, {
@@ -9051,7 +9067,9 @@ function UiInput(_a) {
9051
9067
  inputClassName,
9052
9068
  variant = "outline",
9053
9069
  errorMessage,
9054
- htmlFormItemId: formItemId
9070
+ htmlFormItemId: formItemId,
9071
+ requiredLabel,
9072
+ requiredLabelClassName
9055
9073
  } = _b, inputProps = __objRest(_b, [
9056
9074
  "ref",
9057
9075
  "label",
@@ -9063,16 +9081,29 @@ function UiInput(_a) {
9063
9081
  "inputClassName",
9064
9082
  "variant",
9065
9083
  "errorMessage",
9066
- "htmlFormItemId"
9084
+ "htmlFormItemId",
9085
+ "requiredLabel",
9086
+ "requiredLabelClassName"
9067
9087
  ]);
9068
9088
  return /* @__PURE__ */ jsxs31("div", { className: cn("w-full", inputClassName), children: [
9069
- label ? /* @__PURE__ */ jsx56(
9089
+ label ? /* @__PURE__ */ jsxs31(
9070
9090
  Label3,
9071
9091
  {
9072
9092
  ref,
9073
9093
  className: cn(errorMessage && "text-destructive", labelClassName),
9074
9094
  htmlFor: formItemId,
9075
- children: label
9095
+ children: [
9096
+ label,
9097
+ requiredLabel && /* @__PURE__ */ jsx56(
9098
+ Asterisk2,
9099
+ {
9100
+ className: cn(
9101
+ "ml-px h-3 w-3 text-red-500",
9102
+ requiredLabelClassName
9103
+ )
9104
+ }
9105
+ )
9106
+ ]
9076
9107
  }
9077
9108
  ) : null,
9078
9109
  /* @__PURE__ */ jsx56(
@@ -9082,8 +9113,8 @@ function UiInput(_a) {
9082
9113
  placeholder,
9083
9114
  className: cn(
9084
9115
  "bg-input px-[0.9rem] py-5",
9085
- className,
9086
- variants3[variant]
9116
+ variants3[variant],
9117
+ className
9087
9118
  ),
9088
9119
  classNameDefault
9089
9120
  })
package/dist/style.css CHANGED
@@ -318,6 +318,12 @@
318
318
  .inset-y-0 {
319
319
  inset-block: calc(var(--spacing) * 0);
320
320
  }
321
+ .start {
322
+ inset-inline-start: var(--spacing);
323
+ }
324
+ .end {
325
+ inset-inline-end: var(--spacing);
326
+ }
321
327
  .-top-12 {
322
328
  top: calc(var(--spacing) * -12);
323
329
  }
@@ -328,7 +334,7 @@
328
334
  top: calc(var(--spacing) * 1);
329
335
  }
330
336
  .top-1\/2 {
331
- top: calc(1/2 * 100%);
337
+ top: calc(1 / 2 * 100%);
332
338
  }
333
339
  .top-4 {
334
340
  top: calc(var(--spacing) * 4);
@@ -382,7 +388,7 @@
382
388
  left: calc(var(--spacing) * 1);
383
389
  }
384
390
  .left-1\/2 {
385
- left: calc(1/2 * 100%);
391
+ left: calc(1 / 2 * 100%);
386
392
  }
387
393
  .left-2 {
388
394
  left: calc(var(--spacing) * 2);
@@ -608,7 +614,7 @@
608
614
  width: calc(var(--spacing) * 3.5);
609
615
  }
610
616
  .w-3\/4 {
611
- width: calc(3/4 * 100%);
617
+ width: calc(3 / 4 * 100%);
612
618
  }
613
619
  .w-4 {
614
620
  width: calc(var(--spacing) * 4);
@@ -733,7 +739,7 @@
733
739
  border-spacing: var(--tw-border-spacing-x) var(--tw-border-spacing-y);
734
740
  }
735
741
  .-translate-x-1\/2 {
736
- --tw-translate-x: calc(calc(1/2 * 100%) * -1);
742
+ --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
737
743
  translate: var(--tw-translate-x) var(--tw-translate-y);
738
744
  }
739
745
  .translate-x-\[-50\%\] {
@@ -741,7 +747,7 @@
741
747
  translate: var(--tw-translate-x) var(--tw-translate-y);
742
748
  }
743
749
  .-translate-y-1\/2 {
744
- --tw-translate-y: calc(calc(1/2 * 100%) * -1);
750
+ --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
745
751
  translate: var(--tw-translate-x) var(--tw-translate-y);
746
752
  }
747
753
  .translate-y-\[-50\%\] {
@@ -1796,7 +1802,7 @@
1796
1802
  .after\:left-1\/2 {
1797
1803
  &::after {
1798
1804
  content: var(--tw-content);
1799
- left: calc(1/2 * 100%);
1805
+ left: calc(1 / 2 * 100%);
1800
1806
  }
1801
1807
  }
1802
1808
  .after\:w-1 {
@@ -1808,7 +1814,7 @@
1808
1814
  .after\:-translate-x-1\/2 {
1809
1815
  &::after {
1810
1816
  content: var(--tw-content);
1811
- --tw-translate-x: calc(calc(1/2 * 100%) * -1);
1817
+ --tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
1812
1818
  translate: var(--tw-translate-x) var(--tw-translate-y);
1813
1819
  }
1814
1820
  }
@@ -2583,7 +2589,7 @@
2583
2589
  &[data-panel-group-direction=vertical] {
2584
2590
  &::after {
2585
2591
  content: var(--tw-content);
2586
- --tw-translate-y: calc(calc(1/2 * 100%) * -1);
2592
+ --tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
2587
2593
  translate: var(--tw-translate-x) var(--tw-translate-y);
2588
2594
  }
2589
2595
  }
@@ -3836,4 +3842,4 @@
3836
3842
  }
3837
3843
  }
3838
3844
  }
3839
- /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
3845
+ /*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadcn-ui-react",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "private": false,
5
5
  "author": "Bleker Cordova <bleker@gliyen.com>",
6
6
  "description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
@@ -51,52 +51,52 @@
51
51
  "test:watch": "jest --watch"
52
52
  },
53
53
  "devDependencies": {
54
- "@babel/core": "^7.28.6",
55
- "@babel/preset-env": "^7.28.6",
54
+ "@babel/core": "^7.29.0",
55
+ "@babel/preset-env": "^7.29.2",
56
56
  "@babel/preset-react": "^7.28.5",
57
57
  "@babel/preset-typescript": "^7.28.5",
58
- "@eslint/config-array": "^0.23.0",
59
- "@eslint/object-schema": "^3.0.0",
58
+ "@eslint/config-array": "^0.23.5",
59
+ "@eslint/object-schema": "^3.0.5",
60
60
  "@hookform/resolvers": "^5.2.2",
61
- "@tailwindcss/postcss": "^4.1.18",
62
- "@tailwindcss/vite": "^4.1.18",
61
+ "@tailwindcss/postcss": "^4.2.4",
62
+ "@tailwindcss/vite": "^4.2.4",
63
63
  "@testing-library/dom": "^10.4.1",
64
64
  "@testing-library/jest-dom": "^6.9.1",
65
65
  "@testing-library/react": "^16.3.2",
66
66
  "@testing-library/user-event": "^14.6.1",
67
67
  "@types/jest": "^30.0.0",
68
- "@types/node": "^25.0.10",
69
- "@types/react": "^19.2.9",
68
+ "@types/node": "^25.6.0",
69
+ "@types/react": "^19.2.14",
70
70
  "@types/react-dom": "^19.2.3",
71
- "@typescript-eslint/eslint-plugin": "^8.53.1",
72
- "@typescript-eslint/parser": "^8.53.1",
73
- "autoprefixer": "^10.4.23",
74
- "babel-jest": "^30.2.0",
71
+ "@typescript-eslint/eslint-plugin": "^8.59.0",
72
+ "@typescript-eslint/parser": "^8.59.0",
73
+ "autoprefixer": "^10.5.0",
74
+ "babel-jest": "^30.3.0",
75
75
  "cross-env": "^10.1.0",
76
- "eslint": "^9.39.2",
77
- "eslint-plugin-react-hooks": "^7.0.1",
78
- "eslint-plugin-react-refresh": "^0.4.26",
76
+ "eslint": "^10.2.1",
77
+ "eslint-plugin-react-hooks": "^7.1.1",
78
+ "eslint-plugin-react-refresh": "^0.5.2",
79
79
  "identity-obj-proxy": "^3.0.0",
80
- "jest": "^30.2.0",
81
- "jest-environment-jsdom": "^30.2.0",
82
- "react": "^19.2.3",
83
- "react-day-picker": "^9.13.0",
84
- "react-dom": "^19.2.3",
85
- "react-test-renderer": "^19.2.3",
86
- "rimraf": "^6.1.2",
87
- "tailwindcss": "^4.1.18",
80
+ "jest": "^30.3.0",
81
+ "jest-environment-jsdom": "^30.3.0",
82
+ "react": "^19.2.5",
83
+ "react-day-picker": "^9.14.0",
84
+ "react-dom": "^19.2.5",
85
+ "react-test-renderer": "^19.2.5",
86
+ "rimraf": "^6.1.3",
87
+ "tailwindcss": "^4.2.4",
88
88
  "tailwindcss-animate": "^1.0.7",
89
89
  "tsup": "^8.5.1",
90
- "typescript": "^5.9.3",
90
+ "typescript": "^6.0.3",
91
91
  "vaul": "^1.1.2",
92
- "vite": "^7.3.1",
92
+ "vite": "^8.0.10",
93
93
  "vite-plugin-dts": "^4.5.4",
94
94
  "vite-plugin-ts-alias": "^0.1.1",
95
95
  "zod": "^4.3.6"
96
96
  },
97
97
  "peerDependencies": {
98
- "react": "^17.0.0 || ^18.3.1 || ^19.2.3 || ^20.0.0",
99
- "react-dom": "^17.0.0 || ^18.3.1 || ^19.2.3 || ^20.0.0"
98
+ "react": "^17.0.0 || ^18.3.1 || ^19.2.5 || ^20.0.0",
99
+ "react-dom": "^17.0.0 || ^18.3.1 || ^19.2.5 || ^20.0.0"
100
100
  },
101
101
  "publishConfig": {
102
102
  "access": "public"
@@ -131,24 +131,24 @@
131
131
  "@radix-ui/react-toggle-group": "^1.1.11",
132
132
  "@radix-ui/react-tooltip": "^1.2.8",
133
133
  "@tanstack/react-table": "^8.21.3",
134
- "@vitejs/plugin-react": "^5.1.2",
135
- "@vitejs/plugin-react-swc": "^4.2.2",
134
+ "@vitejs/plugin-react": "^6.0.1",
135
+ "@vitejs/plugin-react-swc": "^4.3.0",
136
136
  "class-variance-authority": "^0.7.1",
137
137
  "clsx": "^2.1.1",
138
138
  "cmdk": "^1.1.1",
139
139
  "embla-carousel-react": "^8.6.0",
140
- "framer-motion": "^12.29.0",
140
+ "framer-motion": "^12.38.0",
141
141
  "input-otp": "^1.4.2",
142
- "lucide-react": "^0.562.0",
142
+ "lucide-react": "^1.11.0",
143
143
  "next-themes": "^0.4.6",
144
- "react-dropzone": "^14.3.8",
144
+ "react-dropzone": "^15.0.0",
145
145
  "react-helmet-next": "^0.0.2",
146
- "react-hook-form": "^7.71.1",
147
- "react-resizable-panels": "^4.4.1",
146
+ "react-hook-form": "^7.74.0",
147
+ "react-resizable-panels": "^4.10.0",
148
148
  "sonner": "^2.0.7",
149
- "tailwind-merge": "^3.4.0",
149
+ "tailwind-merge": "^3.5.0",
150
150
  "tailwind-variants": "^3.2.2",
151
- "use-debounce": "^10.1.0",
151
+ "use-debounce": "^10.1.1",
152
152
  "vaul": "^1.1.2"
153
153
  }
154
154
  }