@wealthx/shadcn 1.5.12 → 1.5.13
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/.turbo/turbo-build.log +74 -74
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-CPM6P63C.mjs → chunk-BF5FKUF6.mjs} +53 -24
- package/dist/chunk-KICT4VQL.mjs +508 -0
- package/dist/chunk-V23CBULF.mjs +432 -0
- package/dist/components/ui/appointment-calendar-view.js +177 -176
- package/dist/components/ui/appointment-calendar-view.mjs +1 -1
- package/dist/components/ui/bank-statement-generate-dialog.js +163 -76
- package/dist/components/ui/bank-statement-generate-dialog.mjs +2 -1
- package/dist/components/ui/resource-center/index.js +1030 -0
- package/dist/components/ui/resource-center/index.mjs +29 -0
- package/dist/index.js +540 -364
- package/dist/index.mjs +15 -13
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/index.tsx +2 -0
- package/src/components/ui/appointment-calendar-view.tsx +211 -199
- package/src/components/ui/bank-statement-generate-dialog.tsx +125 -97
- package/src/components/ui/resource-center/index.tsx +35 -0
- package/src/components/ui/resource-center/resource-cards.tsx +218 -0
- package/src/components/ui/resource-center/resource-carousel.tsx +122 -0
- package/src/components/ui/resource-center/resource-center-header.tsx +95 -0
- package/src/components/ui/resource-center/resource-email-editor-dialog.tsx +131 -0
- package/src/components/ui/resource-center/resource-modal.tsx +76 -0
- package/src/components/ui/resource-center/types.ts +81 -0
- package/src/styles/styles-css.ts +1 -1
- package/tsup.config.ts +1 -1
- package/dist/chunk-IODGRCQG.mjs +0 -438
- package/dist/chunk-XYWEGBAA.mjs +0 -348
- package/dist/components/ui/resource-center.js +0 -748
- package/dist/components/ui/resource-center.mjs +0 -24
- package/src/components/ui/resource-center.tsx +0 -539
|
@@ -462,32 +462,26 @@ function formatWeekdayShort(date) {
|
|
|
462
462
|
|
|
463
463
|
// src/components/ui/appointment-calendar-view.tsx
|
|
464
464
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
465
|
-
var
|
|
466
|
-
pending: "border-l-warning bg-warning/5",
|
|
467
|
-
confirmed: "border-l-success bg-success/5",
|
|
468
|
-
cancelled: "border-l-destructive bg-destructive/5",
|
|
469
|
-
rescheduled: "border-l-info bg-info/5"
|
|
470
|
-
};
|
|
471
|
-
var STATUS_CONFIG = {
|
|
465
|
+
var STATUS = {
|
|
472
466
|
pending: {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
467
|
+
card: "border-l-warning bg-warning/[0.06]",
|
|
468
|
+
badge: "warning",
|
|
469
|
+
label: "Pending"
|
|
476
470
|
},
|
|
477
471
|
confirmed: {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
472
|
+
card: "border-l-success bg-success/[0.06]",
|
|
473
|
+
badge: "success",
|
|
474
|
+
label: "Confirmed"
|
|
481
475
|
},
|
|
482
476
|
cancelled: {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
477
|
+
card: "border-l-destructive bg-destructive/[0.06]",
|
|
478
|
+
badge: "destructive",
|
|
479
|
+
label: "Cancelled"
|
|
486
480
|
},
|
|
487
481
|
rescheduled: {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
482
|
+
card: "border-l-info bg-info/[0.06]",
|
|
483
|
+
badge: "info",
|
|
484
|
+
label: "Rescheduled"
|
|
491
485
|
}
|
|
492
486
|
};
|
|
493
487
|
function formatHour(h) {
|
|
@@ -501,6 +495,55 @@ function getHourFromTime(time) {
|
|
|
501
495
|
return time.includes("PM") && h !== 12 ? h + 12 : h;
|
|
502
496
|
}
|
|
503
497
|
var DEFAULT_HOURS = [9, 10, 11, 12, 13, 14, 15, 16, 17];
|
|
498
|
+
function TimeGutter({ hour }) {
|
|
499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex w-16 shrink-0 items-start justify-end border-r border-border pr-3 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-caption text-muted-foreground", children: formatHour(hour) }) });
|
|
500
|
+
}
|
|
501
|
+
function DayCard({
|
|
502
|
+
apt,
|
|
503
|
+
onSelect
|
|
504
|
+
}) {
|
|
505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
506
|
+
Button,
|
|
507
|
+
{
|
|
508
|
+
type: "button",
|
|
509
|
+
variant: "ghost",
|
|
510
|
+
onClick: () => onSelect == null ? void 0 : onSelect(apt),
|
|
511
|
+
className: `h-auto w-full justify-start gap-3 border-l-2 px-3 py-3 text-left hover:opacity-80 ${STATUS[apt.status].card}`,
|
|
512
|
+
children: [
|
|
513
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Avatar, { className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFallback, { className: "text-caption", children: apt.clientAvatarInitials }) }),
|
|
514
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
515
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-body-small font-semibold", children: apt.clientName }),
|
|
516
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-caption text-muted-foreground", children: [
|
|
517
|
+
apt.timeStart,
|
|
518
|
+
" \u2013 ",
|
|
519
|
+
apt.timeEnd
|
|
520
|
+
] })
|
|
521
|
+
] }),
|
|
522
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Badge, { variant: STATUS[apt.status].badge, children: STATUS[apt.status].label })
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
function AptChip({
|
|
528
|
+
apt,
|
|
529
|
+
onSelect,
|
|
530
|
+
className
|
|
531
|
+
}) {
|
|
532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
533
|
+
Button,
|
|
534
|
+
{
|
|
535
|
+
type: "button",
|
|
536
|
+
variant: "ghost",
|
|
537
|
+
onClick: () => onSelect == null ? void 0 : onSelect(apt),
|
|
538
|
+
className: `h-auto w-full justify-start truncate border-l-2 text-left hover:opacity-80 ${STATUS[apt.status].card} ${className != null ? className : ""}`,
|
|
539
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "truncate text-caption font-medium", children: [
|
|
540
|
+
apt.timeStart,
|
|
541
|
+
" ",
|
|
542
|
+
apt.clientName
|
|
543
|
+
] })
|
|
544
|
+
}
|
|
545
|
+
);
|
|
546
|
+
}
|
|
504
547
|
function DayView({
|
|
505
548
|
appointments,
|
|
506
549
|
date,
|
|
@@ -509,85 +552,51 @@ function DayView({
|
|
|
509
552
|
onSelectAppointment
|
|
510
553
|
}) {
|
|
511
554
|
const d = /* @__PURE__ */ new Date(date + "T00:00:00");
|
|
512
|
-
const dayLabel = formatWeekdayShort(d);
|
|
513
|
-
const dayShort = d.getDate();
|
|
514
555
|
const isToday = date === today;
|
|
515
556
|
const dayApts = appointments.filter((a) => a.date === date);
|
|
516
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
|
|
517
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "
|
|
518
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "border-r border-border" }),
|
|
519
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
children: dayShort
|
|
536
|
-
}
|
|
537
|
-
)
|
|
538
|
-
]
|
|
539
|
-
}
|
|
540
|
-
)
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col", children: [
|
|
558
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex shrink-0 border-b border-border", children: [
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-16 shrink-0 border-r border-border" }),
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col items-center gap-1 py-4", children: [
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
562
|
+
"span",
|
|
563
|
+
{
|
|
564
|
+
className: `text-caption tracking-wide ${isToday ? "font-semibold text-primary" : "text-muted-foreground"}`,
|
|
565
|
+
children: formatWeekdayShort(d)
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
569
|
+
"span",
|
|
570
|
+
{
|
|
571
|
+
className: `flex h-10 w-10 items-center justify-center text-xl font-semibold ${isToday ? "text-primary" : ""}`,
|
|
572
|
+
children: d.getDate()
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
] })
|
|
541
576
|
] }),
|
|
542
|
-
hours.map((hour) => {
|
|
577
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-1 flex-col", children: hours.map((hour) => {
|
|
543
578
|
const aptsAtHour = dayApts.filter(
|
|
544
579
|
(a) => getHourFromTime(a.timeStart) === hour
|
|
545
580
|
);
|
|
546
581
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
547
582
|
"div",
|
|
548
583
|
{
|
|
549
|
-
className: "
|
|
584
|
+
className: "flex flex-1 border-b border-border/40 last:border-b-0",
|
|
550
585
|
children: [
|
|
551
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
552
|
-
|
|
586
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TimeGutter, { hour }),
|
|
587
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-1 flex-col gap-2 p-2", children: aptsAtHour.map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
588
|
+
DayCard,
|
|
553
589
|
{
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
"div",
|
|
560
|
-
{
|
|
561
|
-
className: `flex flex-col gap-1.5 p-1.5 ${isToday ? "bg-primary/5" : ""}`,
|
|
562
|
-
children: aptsAtHour.map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
563
|
-
Button,
|
|
564
|
-
{
|
|
565
|
-
type: "button",
|
|
566
|
-
variant: "ghost",
|
|
567
|
-
onClick: () => onSelectAppointment == null ? void 0 : onSelectAppointment(apt),
|
|
568
|
-
className: `h-auto w-full justify-start gap-3 border-l-2 px-3 py-2 text-left hover:opacity-80 ${STATUS_COLORS[apt.status]}`,
|
|
569
|
-
children: [
|
|
570
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Avatar, { className: "h-7 w-7 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AvatarFallback, { className: "text-xs", children: apt.clientAvatarInitials }) }),
|
|
571
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
572
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-sm font-semibold", children: apt.clientName }),
|
|
573
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
574
|
-
apt.timeStart,
|
|
575
|
-
" \u2013 ",
|
|
576
|
-
apt.timeEnd
|
|
577
|
-
] })
|
|
578
|
-
] }),
|
|
579
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Badge, { variant: STATUS_CONFIG[apt.status].variant, children: STATUS_CONFIG[apt.status].label })
|
|
580
|
-
]
|
|
581
|
-
},
|
|
582
|
-
apt.id
|
|
583
|
-
))
|
|
584
|
-
}
|
|
585
|
-
)
|
|
590
|
+
apt,
|
|
591
|
+
onSelect: onSelectAppointment
|
|
592
|
+
},
|
|
593
|
+
apt.id
|
|
594
|
+
)) })
|
|
586
595
|
]
|
|
587
596
|
},
|
|
588
597
|
hour
|
|
589
598
|
);
|
|
590
|
-
})
|
|
599
|
+
}) })
|
|
591
600
|
] });
|
|
592
601
|
}
|
|
593
602
|
function WeekView({
|
|
@@ -597,49 +606,39 @@ function WeekView({
|
|
|
597
606
|
hours,
|
|
598
607
|
onSelectAppointment
|
|
599
608
|
}) {
|
|
600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col overflow-x-auto", children: [
|
|
601
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
602
|
-
"div",
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
},
|
|
629
|
-
day.date
|
|
630
|
-
))
|
|
631
|
-
]
|
|
632
|
-
}
|
|
633
|
-
),
|
|
634
|
-
hours.map((hour) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
609
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col overflow-x-auto", children: [
|
|
610
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex shrink-0 border-b border-border", children: [
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-16 shrink-0 border-r border-border" }),
|
|
612
|
+
weekDays.map((day) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
613
|
+
"div",
|
|
614
|
+
{
|
|
615
|
+
className: "flex flex-1 flex-col items-center border-r border-border py-3 last:border-r-0",
|
|
616
|
+
children: [
|
|
617
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
618
|
+
"span",
|
|
619
|
+
{
|
|
620
|
+
className: `text-caption ${day.date === today ? "font-semibold text-primary" : "text-muted-foreground"}`,
|
|
621
|
+
children: day.label
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
625
|
+
"span",
|
|
626
|
+
{
|
|
627
|
+
className: `text-body-small font-semibold ${day.date === today ? "text-primary" : ""}`,
|
|
628
|
+
children: day.short
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
day.date
|
|
634
|
+
))
|
|
635
|
+
] }),
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-1 flex-col", children: hours.map((hour) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
635
637
|
"div",
|
|
636
638
|
{
|
|
637
|
-
className: "
|
|
638
|
-
style: {
|
|
639
|
-
gridTemplateColumns: `48px repeat(${weekDays.length}, 1fr)`
|
|
640
|
-
},
|
|
639
|
+
className: "flex flex-1 border-b border-border/40 last:border-b-0",
|
|
641
640
|
children: [
|
|
642
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
641
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TimeGutter, { hour }),
|
|
643
642
|
weekDays.map((day) => {
|
|
644
643
|
const aptsAtCell = appointments.filter(
|
|
645
644
|
(a) => a.date === day.date && getHourFromTime(a.timeStart) === hour
|
|
@@ -647,19 +646,13 @@ function WeekView({
|
|
|
647
646
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
648
647
|
"div",
|
|
649
648
|
{
|
|
650
|
-
className:
|
|
651
|
-
children: aptsAtCell.map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
652
|
-
|
|
649
|
+
className: "flex flex-1 flex-col overflow-hidden border-r border-border/40 p-1 last:border-r-0",
|
|
650
|
+
children: aptsAtCell.map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
651
|
+
AptChip,
|
|
653
652
|
{
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
className:
|
|
657
|
-
onClick: () => onSelectAppointment == null ? void 0 : onSelectAppointment(apt),
|
|
658
|
-
children: [
|
|
659
|
-
apt.timeStart,
|
|
660
|
-
" ",
|
|
661
|
-
apt.clientName
|
|
662
|
-
]
|
|
653
|
+
apt,
|
|
654
|
+
onSelect: onSelectAppointment,
|
|
655
|
+
className: "px-2 py-1.5"
|
|
663
656
|
},
|
|
664
657
|
apt.id
|
|
665
658
|
))
|
|
@@ -670,7 +663,7 @@ function WeekView({
|
|
|
670
663
|
]
|
|
671
664
|
},
|
|
672
665
|
hour
|
|
673
|
-
))
|
|
666
|
+
)) })
|
|
674
667
|
] });
|
|
675
668
|
}
|
|
676
669
|
var MONTH_DAY_HEADERS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
@@ -702,19 +695,19 @@ function MonthView({
|
|
|
702
695
|
const vd = /* @__PURE__ */ new Date(viewDate + "T00:00:00");
|
|
703
696
|
const grid = generateMonthGrid(vd.getFullYear(), vd.getMonth());
|
|
704
697
|
const toIso = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
705
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
|
|
706
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "grid grid-cols-7 border-b border-border", children: MONTH_DAY_HEADERS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col", children: [
|
|
699
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "grid shrink-0 grid-cols-7 border-b border-border", children: MONTH_DAY_HEADERS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
707
700
|
"div",
|
|
708
701
|
{
|
|
709
702
|
className: "flex items-center justify-center border-r border-border/40 py-2 last:border-r-0",
|
|
710
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-
|
|
703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-caption font-medium text-muted-foreground", children: d })
|
|
711
704
|
},
|
|
712
705
|
d
|
|
713
706
|
)) }),
|
|
714
|
-
grid.map((week, wi) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex flex-1 flex-col", children: grid.map((week, wi) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
715
708
|
"div",
|
|
716
709
|
{
|
|
717
|
-
className: "
|
|
710
|
+
className: "flex flex-1 border-b border-border last:border-b-0",
|
|
718
711
|
children: week.map((day, di) => {
|
|
719
712
|
const iso = day ? toIso(day) : null;
|
|
720
713
|
const dayApts = iso ? appointments.filter((a) => a.date === iso) : [];
|
|
@@ -722,32 +715,26 @@ function MonthView({
|
|
|
722
715
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
723
716
|
"div",
|
|
724
717
|
{
|
|
725
|
-
className: `min-
|
|
718
|
+
className: `min-w-0 flex-1 border-r border-border/40 p-1.5 last:border-r-0 ${!day ? "bg-muted/20" : ""}`,
|
|
726
719
|
children: day && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
727
720
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
728
721
|
"div",
|
|
729
722
|
{
|
|
730
|
-
className: `mb-1 flex h-6 w-6 items-center justify-center text-xs font-semibold ${isToday ? "
|
|
723
|
+
className: `mb-1 flex h-6 w-6 items-center justify-center text-xs font-semibold ${isToday ? "text-primary" : "text-foreground"}`,
|
|
731
724
|
children: day.getDate()
|
|
732
725
|
}
|
|
733
726
|
),
|
|
734
727
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
735
|
-
dayApts.slice(0, 2).map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
736
|
-
|
|
728
|
+
dayApts.slice(0, 2).map((apt) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
729
|
+
AptChip,
|
|
737
730
|
{
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
className: `h-auto w-full justify-start truncate border-l-2 px-1 py-0.5 text-left text-[10px] font-medium hover:opacity-80 ${STATUS_COLORS[apt.status]}`,
|
|
742
|
-
children: [
|
|
743
|
-
apt.timeStart,
|
|
744
|
-
" ",
|
|
745
|
-
apt.clientName
|
|
746
|
-
]
|
|
731
|
+
apt,
|
|
732
|
+
onSelect: onSelectAppointment,
|
|
733
|
+
className: "px-1.5 py-1"
|
|
747
734
|
},
|
|
748
735
|
apt.id
|
|
749
736
|
)),
|
|
750
|
-
dayApts.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "px-1 text-
|
|
737
|
+
dayApts.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("p", { className: "px-1 text-caption text-muted-foreground", children: [
|
|
751
738
|
"+",
|
|
752
739
|
dayApts.length - 2,
|
|
753
740
|
" more"
|
|
@@ -760,7 +747,7 @@ function MonthView({
|
|
|
760
747
|
})
|
|
761
748
|
},
|
|
762
749
|
wi
|
|
763
|
-
))
|
|
750
|
+
)) })
|
|
764
751
|
] });
|
|
765
752
|
}
|
|
766
753
|
function AppointmentCalendarView({
|
|
@@ -781,7 +768,7 @@ function AppointmentCalendarView({
|
|
|
781
768
|
}) {
|
|
782
769
|
var _a;
|
|
783
770
|
const effectiveViewDate = (_a = viewDate != null ? viewDate : dayViewDate) != null ? _a : today;
|
|
784
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col border border-border bg-card", children: [
|
|
771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 flex-col min-h-0 border border-border bg-card", children: [
|
|
785
772
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between gap-4 px-4 py-3", children: [
|
|
786
773
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
787
774
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -794,7 +781,7 @@ function AppointmentCalendarView({
|
|
|
794
781
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react2.ChevronLeft, { className: "h-3.5 w-3.5" })
|
|
795
782
|
}
|
|
796
783
|
),
|
|
797
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-label-medium", children: periodLabel }),
|
|
798
785
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
799
786
|
Button,
|
|
800
787
|
{
|
|
@@ -815,38 +802,52 @@ function AppointmentCalendarView({
|
|
|
815
802
|
{
|
|
816
803
|
defaultValue: defaultView,
|
|
817
804
|
onValueChange: (v) => onViewChange == null ? void 0 : onViewChange(v),
|
|
818
|
-
className: "flex flex-col",
|
|
805
|
+
className: "flex flex-col flex-1 min-h-0",
|
|
819
806
|
children: [
|
|
820
807
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(TabsList, { children: [
|
|
821
808
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "day", children: "Day" }),
|
|
822
809
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "week", children: "Week" }),
|
|
823
810
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "month", children: "Month" })
|
|
824
811
|
] }) }),
|
|
825
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
826
|
-
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
813
|
+
TabsContent,
|
|
827
814
|
{
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
815
|
+
value: "day",
|
|
816
|
+
className: "mt-0 min-h-0 flex-1 flex flex-col overflow-y-auto",
|
|
817
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
818
|
+
DayView,
|
|
819
|
+
{
|
|
820
|
+
appointments,
|
|
821
|
+
date: effectiveViewDate,
|
|
822
|
+
today,
|
|
823
|
+
hours,
|
|
824
|
+
onSelectAppointment
|
|
825
|
+
}
|
|
826
|
+
)
|
|
833
827
|
}
|
|
834
|
-
)
|
|
835
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
836
|
-
|
|
828
|
+
),
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
830
|
+
TabsContent,
|
|
837
831
|
{
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
832
|
+
value: "week",
|
|
833
|
+
className: "mt-0 min-h-0 flex-1 flex flex-col overflow-y-auto",
|
|
834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
835
|
+
WeekView,
|
|
836
|
+
{
|
|
837
|
+
appointments,
|
|
838
|
+
weekDays,
|
|
839
|
+
today,
|
|
840
|
+
hours,
|
|
841
|
+
onSelectAppointment
|
|
842
|
+
}
|
|
843
|
+
)
|
|
843
844
|
}
|
|
844
|
-
)
|
|
845
|
+
),
|
|
845
846
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
846
847
|
TabsContent,
|
|
847
848
|
{
|
|
848
849
|
value: "month",
|
|
849
|
-
className: "mt-0
|
|
850
|
+
className: "mt-0 min-h-0 flex-1 flex flex-col overflow-y-auto",
|
|
850
851
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
851
852
|
MonthView,
|
|
852
853
|
{
|