@codapet/design-system 0.8.0 → 0.8.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 +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +8 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1038,7 +1038,7 @@ function Calendar({
|
|
|
1038
1038
|
"flex gap-4 flex-col md:flex-row relative",
|
|
1039
1039
|
classNames?.months
|
|
1040
1040
|
),
|
|
1041
|
-
month: cn("flex flex-col w-full gap-4", classNames?.month),
|
|
1041
|
+
month: cn("flex flex-col w-full gap-4 items-center", classNames?.month),
|
|
1042
1042
|
nav: cn(
|
|
1043
1043
|
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
1044
1044
|
classNames?.nav
|
|
@@ -1076,7 +1076,7 @@ function Calendar({
|
|
|
1076
1076
|
),
|
|
1077
1077
|
table: cn("w-full border-collapse", classNames?.table),
|
|
1078
1078
|
weekdays: cn(
|
|
1079
|
-
"flex items-center justify-
|
|
1079
|
+
"flex items-center justify-start w-full gap-2",
|
|
1080
1080
|
classNames?.weekdays
|
|
1081
1081
|
),
|
|
1082
1082
|
weekday: cn(
|
|
@@ -1084,7 +1084,7 @@ function Calendar({
|
|
|
1084
1084
|
classNames?.weekday
|
|
1085
1085
|
),
|
|
1086
1086
|
week: cn(
|
|
1087
|
-
"flex w-full md:mt-2 mt-[2px] items-center justify-
|
|
1087
|
+
"flex w-full md:mt-2 mt-[2px] items-center justify-start gap-1",
|
|
1088
1088
|
classNames?.week
|
|
1089
1089
|
),
|
|
1090
1090
|
week_number_header: cn(
|
|
@@ -1173,7 +1173,7 @@ function CalendarDayButton({
|
|
|
1173
1173
|
"data-range-end": modifiers.range_end,
|
|
1174
1174
|
"data-range-middle": modifiers.range_middle,
|
|
1175
1175
|
className: cn(
|
|
1176
|
-
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-range-middle-bg 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 text-foreground data-[range-middle=true]:rounded-md",
|
|
1176
|
+
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-range-middle-bg 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 text-foreground data-[range-start=true]:rounded-md data-[range-middle=true]:rounded-md data-[range-end=true]:rounded-md",
|
|
1177
1177
|
className
|
|
1178
1178
|
),
|
|
1179
1179
|
...props
|
|
@@ -2615,13 +2615,13 @@ function DateInput({
|
|
|
2615
2615
|
const dropdownStartMonth = React24.useMemo(() => {
|
|
2616
2616
|
if (effectiveMinDate) return effectiveMinDate;
|
|
2617
2617
|
const d = new Date(today);
|
|
2618
|
-
d.setFullYear(d.getFullYear() -
|
|
2618
|
+
d.setFullYear(d.getFullYear() - 15);
|
|
2619
2619
|
return d;
|
|
2620
2620
|
}, [effectiveMinDate, today]);
|
|
2621
2621
|
const dropdownEndMonth = React24.useMemo(() => {
|
|
2622
2622
|
if (effectiveMaxDate) return effectiveMaxDate;
|
|
2623
2623
|
const d = new Date(today);
|
|
2624
|
-
d.setFullYear(d.getFullYear() +
|
|
2624
|
+
d.setFullYear(d.getFullYear() + 10);
|
|
2625
2625
|
return d;
|
|
2626
2626
|
}, [effectiveMaxDate, today]);
|
|
2627
2627
|
React24.useEffect(() => {
|
|
@@ -2742,11 +2742,11 @@ function DateInput({
|
|
|
2742
2742
|
PopoverContent,
|
|
2743
2743
|
{
|
|
2744
2744
|
className: cn(
|
|
2745
|
-
"p-0 w-[var(--radix-popper-anchor-width)] h-auto md:w-[350px]",
|
|
2745
|
+
"p-0 w-[var(--radix-popper-anchor-width)] h-auto md:w-[350px] ",
|
|
2746
2746
|
popoverContentClassName
|
|
2747
2747
|
),
|
|
2748
2748
|
...popoverContentProps,
|
|
2749
|
-
children: /* @__PURE__ */ jsx26("div", { className: "border border-focus-ring h-full w-full rounded-md", children: /* @__PURE__ */ jsx26(Calendar, { ...resolvedCalendarProps }) })
|
|
2749
|
+
children: /* @__PURE__ */ jsx26("div", { className: "border border-focus-ring h-full w-full rounded-md py-2 md:py-0", children: /* @__PURE__ */ jsx26(Calendar, { ...resolvedCalendarProps }) })
|
|
2750
2750
|
}
|
|
2751
2751
|
)
|
|
2752
2752
|
] }) });
|