@codapet/design-system 0.5.1 → 0.5.3
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.d.mts +16 -10
- package/dist/index.mjs +95 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -15,6 +15,7 @@ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
|
15
15
|
import { Command as Command$1 } from 'cmdk';
|
|
16
16
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
17
17
|
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
|
18
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
18
19
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
19
20
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
20
21
|
import * as react_hook_form from 'react-hook-form';
|
|
@@ -25,7 +26,6 @@ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
|
25
26
|
import { OTPInput } from 'input-otp';
|
|
26
27
|
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
27
28
|
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
28
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
29
29
|
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
30
30
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
31
31
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
@@ -112,7 +112,7 @@ declare function Button({ className, variant, size, asChild, ...props }: React$1
|
|
|
112
112
|
}): react_jsx_runtime.JSX.Element;
|
|
113
113
|
|
|
114
114
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React$1.ComponentProps<typeof DayPicker> & {
|
|
115
|
-
buttonVariant?: React$1.ComponentProps<typeof Button>[
|
|
115
|
+
buttonVariant?: React$1.ComponentProps<typeof Button>['variant'];
|
|
116
116
|
}): react_jsx_runtime.JSX.Element;
|
|
117
117
|
declare function CalendarDayButton({ className, day, modifiers, ...props }: React$1.ComponentProps<typeof DayButton>): react_jsx_runtime.JSX.Element;
|
|
118
118
|
|
|
@@ -250,6 +250,11 @@ interface InputProps extends Omit<React$1.ComponentProps<'input'>, 'size'>, Vari
|
|
|
250
250
|
}
|
|
251
251
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
252
252
|
|
|
253
|
+
declare function Popover({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
254
|
+
declare function PopoverTrigger({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
255
|
+
declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
256
|
+
declare function PopoverAnchor({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime.JSX.Element;
|
|
257
|
+
|
|
253
258
|
type DateFormat = 'MM/DD/YYYY' | 'DD/MM/YYYY' | 'YYYY-MM-DD' | 'DD-MM-YYYY' | 'MM-DD-YYYY' | 'DD.MM.YYYY' | 'MMMM D, YYYY' | 'D MMMM YYYY';
|
|
254
259
|
type NativeInputProps = Omit<React$1.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'min' | 'max' | 'size' | 'disabled' | 'onSelect'>;
|
|
255
260
|
type FlattenedCalendarProps$1 = Omit<React$1.ComponentProps<typeof Calendar>, keyof React$1.InputHTMLAttributes<HTMLInputElement> | 'className' | 'mode' | 'selected' | 'onSelect' | 'month' | 'onMonthChange' | 'disabled' | 'captionLayout' | 'showOutsideDays' | 'classNames' | 'components' | 'formatters' | 'buttonVariant'>;
|
|
@@ -263,6 +268,8 @@ interface DateInputProps extends NativeInputProps, FlattenedCalendarProps$1 {
|
|
|
263
268
|
size?: VariantProps<typeof inputVariants>['size'];
|
|
264
269
|
inputClassName?: string;
|
|
265
270
|
calendarClassName?: string;
|
|
271
|
+
popoverContentClassName?: string;
|
|
272
|
+
popoverContentProps?: Omit<React$1.ComponentProps<typeof PopoverContent>, 'children' | 'className'>;
|
|
266
273
|
dateFormat?: DateFormat;
|
|
267
274
|
mode?: React$1.ComponentProps<typeof Calendar>['mode'];
|
|
268
275
|
selected?: Date;
|
|
@@ -277,7 +284,7 @@ interface DateInputProps extends NativeInputProps, FlattenedCalendarProps$1 {
|
|
|
277
284
|
formatters?: React$1.ComponentProps<typeof Calendar>['formatters'];
|
|
278
285
|
buttonVariant?: React$1.ComponentProps<typeof Calendar>['buttonVariant'];
|
|
279
286
|
}
|
|
280
|
-
declare function DateInput({ date, setDate, maxDate, minDate, disableFuture, className, inputClassName, calendarClassName, inputDisabled, dateFormat, mode, selected, onSelect, month, onMonthChange, disabled: calendarDisabled, captionLayout, showOutsideDays, classNames, components, formatters, buttonVariant, placeholder, onBlur, ...restProps }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
287
|
+
declare function DateInput({ date, setDate, maxDate, minDate, disableFuture, className, inputClassName, calendarClassName, popoverContentClassName, popoverContentProps, inputDisabled, dateFormat, mode, selected, onSelect, month, onMonthChange, disabled: calendarDisabled, captionLayout, showOutsideDays, classNames, components, formatters, buttonVariant, placeholder, onBlur, ...restProps }: DateInputProps): react_jsx_runtime.JSX.Element;
|
|
281
288
|
|
|
282
289
|
type FlattenedCalendarProps = Omit<React$1.ComponentProps<typeof Calendar>, keyof React$1.InputHTMLAttributes<HTMLInputElement> | 'className' | 'mode' | 'selected' | 'onSelect' | 'month' | 'onMonthChange' | 'disabled' | 'captionLayout' | 'showOutsideDays' | 'classNames' | 'components' | 'formatters' | 'buttonVariant'>;
|
|
283
290
|
interface DateRangeInputProps extends FlattenedCalendarProps {
|
|
@@ -291,6 +298,8 @@ interface DateRangeInputProps extends FlattenedCalendarProps {
|
|
|
291
298
|
className?: string;
|
|
292
299
|
inputClassName?: string;
|
|
293
300
|
calendarClassName?: string;
|
|
301
|
+
popoverContentClassName?: string;
|
|
302
|
+
popoverContentProps?: Omit<React$1.ComponentProps<typeof PopoverContent>, 'children' | 'className'>;
|
|
294
303
|
dateFormat?: DateFormat;
|
|
295
304
|
placeholder?: string;
|
|
296
305
|
selected?: DateRange;
|
|
@@ -305,7 +314,7 @@ interface DateRangeInputProps extends FlattenedCalendarProps {
|
|
|
305
314
|
formatters?: React$1.ComponentProps<typeof Calendar>['formatters'];
|
|
306
315
|
buttonVariant?: React$1.ComponentProps<typeof Calendar>['buttonVariant'];
|
|
307
316
|
}
|
|
308
|
-
declare function DateRangeInput({ dateRange, setDateRange, maxDate, minDate, disableFuture, className, inputClassName, calendarClassName, inputDisabled, dateFormat, selected, onSelect, month, onMonthChange, disabled: calendarDisabled, captionLayout, showOutsideDays, classNames, components, formatters, buttonVariant, placeholder, size, ...restProps }: DateRangeInputProps): react_jsx_runtime.JSX.Element;
|
|
317
|
+
declare function DateRangeInput({ dateRange, setDateRange, maxDate, minDate, disableFuture, className, inputClassName, calendarClassName, popoverContentClassName, popoverContentProps, inputDisabled, dateFormat, selected, onSelect, month, onMonthChange, disabled: calendarDisabled, captionLayout, showOutsideDays, classNames, components, formatters, buttonVariant, placeholder, size, ...restProps }: DateRangeInputProps): react_jsx_runtime.JSX.Element;
|
|
309
318
|
|
|
310
319
|
declare function Drawer({ ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
311
320
|
declare function DrawerTrigger({ ...props }: React$1.ComponentProps<typeof Drawer$1.Trigger>): react_jsx_runtime.JSX.Element;
|
|
@@ -430,11 +439,6 @@ declare function PaginationPrevious({ className, ...props }: React$1.ComponentPr
|
|
|
430
439
|
declare function PaginationNext({ className, ...props }: React$1.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
|
|
431
440
|
declare function PaginationEllipsis({ className, ...props }: React$1.ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
432
441
|
|
|
433
|
-
declare function Popover({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
434
|
-
declare function PopoverTrigger({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
435
|
-
declare function PopoverContent({ className, align, sideOffset, ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
436
|
-
declare function PopoverAnchor({ ...props }: React$1.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime.JSX.Element;
|
|
437
|
-
|
|
438
442
|
declare function Progress({ className, value, ...props }: React$1.ComponentProps<typeof ProgressPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
439
443
|
|
|
440
444
|
declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -597,11 +601,13 @@ interface TimeInputProps {
|
|
|
597
601
|
size?: VariantProps<typeof inputVariants>['size'];
|
|
598
602
|
className?: string;
|
|
599
603
|
inputClassName?: string;
|
|
604
|
+
popoverContentClassName?: string;
|
|
605
|
+
popoverContentProps?: Omit<React$1.ComponentProps<typeof PopoverContent>, 'children' | 'className'>;
|
|
600
606
|
placeholder?: string;
|
|
601
607
|
icon?: React$1.ReactNode;
|
|
602
608
|
formatDisplay?: (time: TimeValue) => string;
|
|
603
609
|
}
|
|
604
|
-
declare function TimeInput({ time, setTime, timeFormat, minuteStep, inputDisabled, className, inputClassName, size, placeholder, icon, formatDisplay }: TimeInputProps): react_jsx_runtime.JSX.Element;
|
|
610
|
+
declare function TimeInput({ time, setTime, timeFormat, minuteStep, inputDisabled, className, inputClassName, popoverContentClassName, popoverContentProps, size, placeholder, icon, formatDisplay }: TimeInputProps): react_jsx_runtime.JSX.Element;
|
|
605
611
|
|
|
606
612
|
declare const toggleVariants: (props?: ({
|
|
607
613
|
variant?: "default" | "outline" | null | undefined;
|
package/dist/index.mjs
CHANGED
|
@@ -631,13 +631,13 @@ function BreadcrumbEllipsis({
|
|
|
631
631
|
}
|
|
632
632
|
|
|
633
633
|
// src/components/ui/calendar.tsx
|
|
634
|
-
import * as React10 from "react";
|
|
635
634
|
import {
|
|
636
635
|
ChevronDownIcon as ChevronDownIcon2,
|
|
637
636
|
ChevronLeftIcon,
|
|
638
637
|
ChevronRightIcon
|
|
639
638
|
} from "lucide-react";
|
|
640
|
-
import
|
|
639
|
+
import * as React10 from "react";
|
|
640
|
+
import { DayPicker } from "react-day-picker";
|
|
641
641
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
642
642
|
function Calendar({
|
|
643
643
|
className,
|
|
@@ -649,13 +649,12 @@ function Calendar({
|
|
|
649
649
|
components,
|
|
650
650
|
...props
|
|
651
651
|
}) {
|
|
652
|
-
const defaultClassNames = getDefaultClassNames();
|
|
653
652
|
return /* @__PURE__ */ jsx11(
|
|
654
653
|
DayPicker,
|
|
655
654
|
{
|
|
656
655
|
showOutsideDays,
|
|
657
656
|
className: cn(
|
|
658
|
-
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
657
|
+
"bg-background group/calendar p-3 [--cell-size:--spacing(4)] md:[--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
659
658
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
660
659
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
661
660
|
className
|
|
@@ -666,86 +665,86 @@ function Calendar({
|
|
|
666
665
|
...formatters
|
|
667
666
|
},
|
|
668
667
|
classNames: {
|
|
669
|
-
root: cn("w-fit",
|
|
668
|
+
root: cn("w-fit ", classNames?.root),
|
|
670
669
|
months: cn(
|
|
671
670
|
"flex gap-4 flex-col md:flex-row relative",
|
|
672
|
-
|
|
671
|
+
classNames?.months
|
|
673
672
|
),
|
|
674
|
-
month: cn("flex flex-col w-full gap-4",
|
|
673
|
+
month: cn("flex flex-col w-full gap-4", classNames?.month),
|
|
675
674
|
nav: cn(
|
|
676
675
|
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
677
|
-
|
|
676
|
+
classNames?.nav
|
|
678
677
|
),
|
|
679
678
|
button_previous: cn(
|
|
680
679
|
buttonVariants({ variant: buttonVariant }),
|
|
681
680
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
682
|
-
|
|
681
|
+
classNames?.button_previous
|
|
683
682
|
),
|
|
684
683
|
button_next: cn(
|
|
685
684
|
buttonVariants({ variant: buttonVariant }),
|
|
686
685
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
687
|
-
|
|
686
|
+
classNames?.button_next
|
|
688
687
|
),
|
|
689
688
|
month_caption: cn(
|
|
690
689
|
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
691
|
-
|
|
690
|
+
classNames?.month_caption
|
|
692
691
|
),
|
|
693
692
|
dropdowns: cn(
|
|
694
693
|
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
695
|
-
|
|
694
|
+
classNames?.dropdowns
|
|
696
695
|
),
|
|
697
696
|
dropdown_root: cn(
|
|
698
697
|
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
699
|
-
|
|
698
|
+
classNames?.dropdown_root
|
|
700
699
|
),
|
|
701
700
|
dropdown: cn(
|
|
702
701
|
"absolute bg-popover inset-0 opacity-0",
|
|
703
|
-
|
|
702
|
+
classNames?.dropdown
|
|
704
703
|
),
|
|
705
704
|
caption_label: cn(
|
|
706
705
|
"select-none font-medium",
|
|
707
706
|
captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
708
|
-
|
|
707
|
+
classNames?.caption_label
|
|
708
|
+
),
|
|
709
|
+
table: cn("w-full border-collapse", classNames?.table),
|
|
710
|
+
weekdays: cn(
|
|
711
|
+
"flex items-center justify-center w-full gap-2",
|
|
712
|
+
classNames?.weekdays
|
|
709
713
|
),
|
|
710
|
-
table: "w-full border-collapse",
|
|
711
|
-
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
712
714
|
weekday: cn(
|
|
713
|
-
"text-muted-foreground rounded-md
|
|
714
|
-
|
|
715
|
+
"text-muted-foreground rounded-full md:flex-1 size-6 mx-1 font-normal text-[0.8rem] select-none ",
|
|
716
|
+
classNames?.weekday
|
|
717
|
+
),
|
|
718
|
+
week: cn(
|
|
719
|
+
"flex w-full md:mt-2 mt-[2px] items-center justify-center gap-1",
|
|
720
|
+
classNames?.week
|
|
715
721
|
),
|
|
716
|
-
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
717
722
|
week_number_header: cn(
|
|
718
|
-
"select-none w-(--cell-size)",
|
|
719
|
-
|
|
723
|
+
"select-none w-(--cell-size) ",
|
|
724
|
+
"flex items-center justify-center ",
|
|
725
|
+
classNames?.week_number_header
|
|
720
726
|
),
|
|
721
727
|
week_number: cn(
|
|
722
728
|
"text-[0.8rem] select-none text-muted-foreground",
|
|
723
|
-
|
|
729
|
+
classNames?.week_number
|
|
724
730
|
),
|
|
725
731
|
day: cn(
|
|
726
|
-
"relative w-full h-full p-0 text-center
|
|
727
|
-
|
|
728
|
-
),
|
|
729
|
-
range_start: cn(
|
|
730
|
-
"rounded-l-md bg-accent",
|
|
731
|
-
defaultClassNames.range_start
|
|
732
|
+
"relative flex items-center justify-center md:w-full md:h-full p-0 text-center group/day aspect-square select-none size-7 md:mx-0 mx-1 rounded-full",
|
|
733
|
+
classNames?.day
|
|
732
734
|
),
|
|
733
|
-
|
|
734
|
-
|
|
735
|
+
range_start: cn(" bg-accent", classNames?.range_start),
|
|
736
|
+
range_middle: cn("rounded-none", classNames?.range_middle),
|
|
737
|
+
range_end: cn(" bg-accent", classNames?.range_end),
|
|
735
738
|
today: cn(
|
|
736
|
-
"bg-accent text-accent-foreground
|
|
737
|
-
|
|
739
|
+
"bg-accent text-accent-foreground rounded-full",
|
|
740
|
+
classNames?.today
|
|
738
741
|
),
|
|
739
742
|
outside: cn(
|
|
740
743
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
741
|
-
|
|
744
|
+
classNames?.outside
|
|
742
745
|
),
|
|
743
|
-
disabled: cn(
|
|
744
|
-
|
|
745
|
-
defaultClassNames.disabled
|
|
746
|
-
),
|
|
747
|
-
hidden: cn("invisible", defaultClassNames.hidden),
|
|
748
|
-
...classNames
|
|
746
|
+
disabled: cn("text-muted-foreground opacity-50", classNames?.disabled),
|
|
747
|
+
hidden: cn("invisible", classNames?.hidden)
|
|
749
748
|
},
|
|
750
749
|
components: {
|
|
751
750
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
@@ -790,7 +789,6 @@ function CalendarDayButton({
|
|
|
790
789
|
modifiers,
|
|
791
790
|
...props
|
|
792
791
|
}) {
|
|
793
|
-
const defaultClassNames = getDefaultClassNames();
|
|
794
792
|
const ref = React10.useRef(null);
|
|
795
793
|
React10.useEffect(() => {
|
|
796
794
|
if (modifiers.focused) ref.current?.focus();
|
|
@@ -807,8 +805,7 @@ function CalendarDayButton({
|
|
|
807
805
|
"data-range-end": modifiers.range_end,
|
|
808
806
|
"data-range-middle": modifiers.range_middle,
|
|
809
807
|
className: cn(
|
|
810
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px]
|
|
811
|
-
defaultClassNames.day,
|
|
808
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none md:font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70 md:p-0 rounded-full md:text-base text-sm font-medium",
|
|
812
809
|
className
|
|
813
810
|
),
|
|
814
811
|
...props
|
|
@@ -2167,6 +2164,8 @@ function DateInput({
|
|
|
2167
2164
|
className,
|
|
2168
2165
|
inputClassName,
|
|
2169
2166
|
calendarClassName,
|
|
2167
|
+
popoverContentClassName,
|
|
2168
|
+
popoverContentProps,
|
|
2170
2169
|
inputDisabled,
|
|
2171
2170
|
dateFormat = "MM/DD/YYYY",
|
|
2172
2171
|
mode,
|
|
@@ -2272,7 +2271,7 @@ function DateInput({
|
|
|
2272
2271
|
onMonthChange: onMonthChange ?? setMonthState,
|
|
2273
2272
|
showOutsideDays,
|
|
2274
2273
|
className: cn(
|
|
2275
|
-
"w-auto mx-auto
|
|
2274
|
+
"w-auto mx-auto overflow-y-auto h-auto m-2",
|
|
2276
2275
|
calendarClassName
|
|
2277
2276
|
),
|
|
2278
2277
|
classNames,
|
|
@@ -2349,7 +2348,17 @@ function DateInput({
|
|
|
2349
2348
|
...inputProps
|
|
2350
2349
|
}
|
|
2351
2350
|
) }) }),
|
|
2352
|
-
/* @__PURE__ */ jsx22(
|
|
2351
|
+
/* @__PURE__ */ jsx22(
|
|
2352
|
+
PopoverContent,
|
|
2353
|
+
{
|
|
2354
|
+
className: cn(
|
|
2355
|
+
"p-0 w-[var(--radix-popper-anchor-width)] h-auto md:w-[350px]",
|
|
2356
|
+
popoverContentClassName
|
|
2357
|
+
),
|
|
2358
|
+
...popoverContentProps,
|
|
2359
|
+
children: /* @__PURE__ */ jsx22("div", { className: "border border-blue-500 h-full w-full rounded-md", children: /* @__PURE__ */ jsx22(Calendar, { ...resolvedCalendarProps }) })
|
|
2360
|
+
}
|
|
2361
|
+
)
|
|
2353
2362
|
] }) });
|
|
2354
2363
|
}
|
|
2355
2364
|
|
|
@@ -2406,6 +2415,8 @@ function DateRangeInput({
|
|
|
2406
2415
|
className,
|
|
2407
2416
|
inputClassName,
|
|
2408
2417
|
calendarClassName,
|
|
2418
|
+
popoverContentClassName,
|
|
2419
|
+
popoverContentProps,
|
|
2409
2420
|
inputDisabled,
|
|
2410
2421
|
dateFormat = "MM/DD/YYYY",
|
|
2411
2422
|
selected,
|
|
@@ -2497,10 +2508,7 @@ function DateRangeInput({
|
|
|
2497
2508
|
month: effectiveMonth,
|
|
2498
2509
|
onMonthChange: onMonthChange ?? setMonthState,
|
|
2499
2510
|
showOutsideDays,
|
|
2500
|
-
className: cn(
|
|
2501
|
-
"w-auto mx-auto h-fit shrink-0 md:h-auto m-2",
|
|
2502
|
-
calendarClassName
|
|
2503
|
-
),
|
|
2511
|
+
className: cn("w-auto shrink-0 h-auto mt-2", calendarClassName),
|
|
2504
2512
|
classNames,
|
|
2505
2513
|
components,
|
|
2506
2514
|
formatters,
|
|
@@ -2528,31 +2536,41 @@ function DateRangeInput({
|
|
|
2528
2536
|
]
|
|
2529
2537
|
}
|
|
2530
2538
|
) }),
|
|
2531
|
-
/* @__PURE__ */ jsx23(
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
variant: "ghost-secondary",
|
|
2538
|
-
size: "sm",
|
|
2539
|
-
onClick: handleClear,
|
|
2540
|
-
type: "button",
|
|
2541
|
-
children: "Clear"
|
|
2542
|
-
}
|
|
2539
|
+
/* @__PURE__ */ jsx23(
|
|
2540
|
+
PopoverContent,
|
|
2541
|
+
{
|
|
2542
|
+
className: cn(
|
|
2543
|
+
"p-0 h-[400px] w-[var(--radix-popper-anchor-width)] md:h-auto md:w-[350px]",
|
|
2544
|
+
popoverContentClassName
|
|
2543
2545
|
),
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
{
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2546
|
+
...popoverContentProps,
|
|
2547
|
+
children: /* @__PURE__ */ jsxs11("div", { className: "border border-blue-500 h-full w-full rounded-md flex flex-col overflow-y-auto justify-between", children: [
|
|
2548
|
+
/* @__PURE__ */ jsx23(Calendar, { ...resolvedCalendarProps }),
|
|
2549
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-2 px-2 py-2 shrink-0", children: [
|
|
2550
|
+
/* @__PURE__ */ jsx23(
|
|
2551
|
+
Button,
|
|
2552
|
+
{
|
|
2553
|
+
variant: "ghost-secondary",
|
|
2554
|
+
size: "sm",
|
|
2555
|
+
onClick: handleClear,
|
|
2556
|
+
type: "button",
|
|
2557
|
+
children: "Clear"
|
|
2558
|
+
}
|
|
2559
|
+
),
|
|
2560
|
+
/* @__PURE__ */ jsx23(
|
|
2561
|
+
Button,
|
|
2562
|
+
{
|
|
2563
|
+
variant: "primary",
|
|
2564
|
+
size: "sm",
|
|
2565
|
+
onClick: handleAdd,
|
|
2566
|
+
type: "button",
|
|
2567
|
+
children: "Add"
|
|
2568
|
+
}
|
|
2569
|
+
)
|
|
2570
|
+
] })
|
|
2571
|
+
] })
|
|
2572
|
+
}
|
|
2573
|
+
)
|
|
2556
2574
|
] }) });
|
|
2557
2575
|
}
|
|
2558
2576
|
|
|
@@ -5241,6 +5259,8 @@ function TimeInput({
|
|
|
5241
5259
|
inputDisabled,
|
|
5242
5260
|
className,
|
|
5243
5261
|
inputClassName,
|
|
5262
|
+
popoverContentClassName,
|
|
5263
|
+
popoverContentProps,
|
|
5244
5264
|
size,
|
|
5245
5265
|
placeholder,
|
|
5246
5266
|
icon,
|
|
@@ -5327,8 +5347,9 @@ function TimeInput({
|
|
|
5327
5347
|
/* @__PURE__ */ jsx49(
|
|
5328
5348
|
PopoverContent,
|
|
5329
5349
|
{
|
|
5330
|
-
className: "w-auto p-0
|
|
5350
|
+
className: cn("w-auto p-0", popoverContentClassName),
|
|
5331
5351
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5352
|
+
...popoverContentProps,
|
|
5332
5353
|
children: /* @__PURE__ */ jsxs24("div", { className: "flex divide-x border border-blue-500 rounded-md", children: [
|
|
5333
5354
|
/* @__PURE__ */ jsx49("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx49("div", { ref: hoursRef, className: "flex flex-col p-1 ", children: hoursList.map((h) => /* @__PURE__ */ jsx49(
|
|
5334
5355
|
Button,
|