@codapet/design-system 0.4.9 → 0.5.1
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.mjs +36 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2323,13 +2323,17 @@ function DateInput({
|
|
|
2323
2323
|
}
|
|
2324
2324
|
};
|
|
2325
2325
|
return /* @__PURE__ */ jsx22("div", { className: cn("relative flex gap-2", className), children: /* @__PURE__ */ jsxs10(Popover, { open, onOpenChange: setOpen, children: [
|
|
2326
|
-
/* @__PURE__ */ jsx22(PopoverTrigger, { asChild: true, disabled: isInputDisabled, children: /* @__PURE__ */ jsx22("div", { className: "w-full relative", children: /* @__PURE__ */ jsx22(
|
|
2326
|
+
/* @__PURE__ */ jsx22(PopoverTrigger, { asChild: true, disabled: isInputDisabled, children: /* @__PURE__ */ jsx22("div", { className: "w-full relative group", children: /* @__PURE__ */ jsx22(
|
|
2327
2327
|
Input,
|
|
2328
2328
|
{
|
|
2329
2329
|
id: "date",
|
|
2330
2330
|
value,
|
|
2331
2331
|
placeholder: resolvedPlaceholder,
|
|
2332
|
-
className: cn(
|
|
2332
|
+
className: cn(
|
|
2333
|
+
"bg-background cursor-pointer",
|
|
2334
|
+
"group-data-[state=open]:border-blue-500 group-data-[state=open]:hover:border-blue-500",
|
|
2335
|
+
inputClassName
|
|
2336
|
+
),
|
|
2333
2337
|
onChange: handleInputChange,
|
|
2334
2338
|
onBlur: handleBlur,
|
|
2335
2339
|
disabled: isInputDisabled,
|
|
@@ -2345,7 +2349,7 @@ function DateInput({
|
|
|
2345
2349
|
...inputProps
|
|
2346
2350
|
}
|
|
2347
2351
|
) }) }),
|
|
2348
|
-
/* @__PURE__ */ jsx22(PopoverContent, { className: "p-
|
|
2352
|
+
/* @__PURE__ */ jsx22(PopoverContent, { className: "p-0 overflow-y-auto h-[400px] md:h-auto md:w-[350px] ", children: /* @__PURE__ */ jsx22("div", { className: "border border-blue-500 h-full w-full rounded-md", children: /* @__PURE__ */ jsx22(Calendar, { ...resolvedCalendarProps }) }) })
|
|
2349
2353
|
] }) });
|
|
2350
2354
|
}
|
|
2351
2355
|
|
|
@@ -2494,7 +2498,7 @@ function DateRangeInput({
|
|
|
2494
2498
|
onMonthChange: onMonthChange ?? setMonthState,
|
|
2495
2499
|
showOutsideDays,
|
|
2496
2500
|
className: cn(
|
|
2497
|
-
"w-auto
|
|
2501
|
+
"w-auto mx-auto h-fit shrink-0 md:h-auto m-2",
|
|
2498
2502
|
calendarClassName
|
|
2499
2503
|
),
|
|
2500
2504
|
classNames,
|
|
@@ -2513,7 +2517,7 @@ function DateRangeInput({
|
|
|
2513
2517
|
className: cn(
|
|
2514
2518
|
inputVariants({ size }),
|
|
2515
2519
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
2516
|
-
open
|
|
2520
|
+
"data-[state=open]:border-blue-500 data-[state=open]:hover:border-blue-500",
|
|
2517
2521
|
isInputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
2518
2522
|
inputClassName
|
|
2519
2523
|
),
|
|
@@ -2524,9 +2528,9 @@ function DateRangeInput({
|
|
|
2524
2528
|
]
|
|
2525
2529
|
}
|
|
2526
2530
|
) }),
|
|
2527
|
-
/* @__PURE__ */
|
|
2531
|
+
/* @__PURE__ */ jsx23(PopoverContent, { className: "p-0 h-[400px] w-[var(--radix-popper-anchor-width)] md:h-auto md:w-[350px]", children: /* @__PURE__ */ jsxs11("div", { className: "border border-blue-500 h-full w-full rounded-md flex flex-col overflow-y-auto", children: [
|
|
2528
2532
|
/* @__PURE__ */ jsx23(Calendar, { ...resolvedCalendarProps }),
|
|
2529
|
-
/* @__PURE__ */ jsxs11("div", { className: "flex
|
|
2533
|
+
/* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-2 px-2 py-2 shrink-0", children: [
|
|
2530
2534
|
/* @__PURE__ */ jsx23(
|
|
2531
2535
|
Button,
|
|
2532
2536
|
{
|
|
@@ -2548,7 +2552,7 @@ function DateRangeInput({
|
|
|
2548
2552
|
}
|
|
2549
2553
|
)
|
|
2550
2554
|
] })
|
|
2551
|
-
] })
|
|
2555
|
+
] }) })
|
|
2552
2556
|
] }) });
|
|
2553
2557
|
}
|
|
2554
2558
|
|
|
@@ -5309,7 +5313,7 @@ function TimeInput({
|
|
|
5309
5313
|
className: cn(
|
|
5310
5314
|
inputVariants({ size }),
|
|
5311
5315
|
"bg-background cursor-pointer w-full text-left flex items-center justify-between gap-2 font-normal",
|
|
5312
|
-
open
|
|
5316
|
+
"data-[state=open]:border-blue-500 data-[state=open]:hover:border-blue-500",
|
|
5313
5317
|
inputDisabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
5314
5318
|
inputClassName
|
|
5315
5319
|
),
|
|
@@ -5325,7 +5329,7 @@ function TimeInput({
|
|
|
5325
5329
|
{
|
|
5326
5330
|
className: "w-auto p-0 ",
|
|
5327
5331
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
5328
|
-
children: /* @__PURE__ */ jsxs24("div", { className: "flex divide-x", children: [
|
|
5332
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "flex divide-x border border-blue-500 rounded-md", children: [
|
|
5329
5333
|
/* @__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(
|
|
5330
5334
|
Button,
|
|
5331
5335
|
{
|
|
@@ -5341,21 +5345,31 @@ function TimeInput({
|
|
|
5341
5345
|
},
|
|
5342
5346
|
h
|
|
5343
5347
|
)) }) }),
|
|
5344
|
-
/* @__PURE__ */ jsx49("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx49(
|
|
5345
|
-
|
|
5348
|
+
/* @__PURE__ */ jsx49("div", { className: "h-56 w-16 overflow-y-auto overscroll-y-contain [-webkit-overflow-scrolling:touch]", children: /* @__PURE__ */ jsx49(
|
|
5349
|
+
"div",
|
|
5346
5350
|
{
|
|
5347
|
-
|
|
5348
|
-
size: "sm",
|
|
5349
|
-
"data-selected": selectedMinute === m,
|
|
5351
|
+
ref: minutesRef,
|
|
5350
5352
|
className: cn(
|
|
5351
|
-
"
|
|
5352
|
-
|
|
5353
|
+
"flex flex-col p-1",
|
|
5354
|
+
minutesList.length <= 12 && "h-full justify-center"
|
|
5353
5355
|
),
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5356
|
+
children: minutesList.map((m) => /* @__PURE__ */ jsx49(
|
|
5357
|
+
Button,
|
|
5358
|
+
{
|
|
5359
|
+
variant: "ghost",
|
|
5360
|
+
size: "sm",
|
|
5361
|
+
"data-selected": selectedMinute === m,
|
|
5362
|
+
className: cn(
|
|
5363
|
+
"w-full justify-center font-mono text-sm",
|
|
5364
|
+
selectedMinute === m && "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground"
|
|
5365
|
+
),
|
|
5366
|
+
onClick: () => handleMinuteSelect(m),
|
|
5367
|
+
children: String(m).padStart(2, "0")
|
|
5368
|
+
},
|
|
5369
|
+
m
|
|
5370
|
+
))
|
|
5371
|
+
}
|
|
5372
|
+
) }),
|
|
5359
5373
|
!is24HourFormat(timeFormat) && /* @__PURE__ */ jsx49("div", { className: "flex flex-col p-1 justify-center gap-1", children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsx49(
|
|
5360
5374
|
Button,
|
|
5361
5375
|
{
|