@wealthx/shadcn 1.5.8 → 1.5.10
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 +62 -62
- package/CHANGELOG.md +12 -0
- package/dist/{chunk-XVZGXPIX.mjs → chunk-Z2BW5T7P.mjs} +58 -38
- package/dist/components/ui/appointment-calendar-view.js +58 -38
- package/dist/components/ui/appointment-calendar-view.mjs +1 -1
- package/dist/index.js +58 -38
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/appointment-calendar-view.tsx +24 -10
- package/src/styles/styles-css.ts +1 -1
|
@@ -695,11 +695,12 @@ function generateMonthGrid(year, month) {
|
|
|
695
695
|
}
|
|
696
696
|
function MonthView({
|
|
697
697
|
appointments,
|
|
698
|
+
viewDate,
|
|
698
699
|
today,
|
|
699
700
|
onSelectAppointment
|
|
700
701
|
}) {
|
|
701
|
-
const
|
|
702
|
-
const grid = generateMonthGrid(
|
|
702
|
+
const vd = /* @__PURE__ */ new Date(viewDate + "T00:00:00");
|
|
703
|
+
const grid = generateMonthGrid(vd.getFullYear(), vd.getMonth());
|
|
703
704
|
const toIso = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
704
705
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col", children: [
|
|
705
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)(
|
|
@@ -768,15 +769,18 @@ function AppointmentCalendarView({
|
|
|
768
769
|
periodLabel,
|
|
769
770
|
weekDays,
|
|
770
771
|
hours = DEFAULT_HOURS,
|
|
772
|
+
viewDate,
|
|
771
773
|
dayViewDate,
|
|
772
774
|
defaultView = "week",
|
|
773
775
|
onPrev,
|
|
774
776
|
onNext,
|
|
775
777
|
onToday,
|
|
778
|
+
onViewChange,
|
|
776
779
|
onSelectAppointment,
|
|
777
780
|
toolbarActions
|
|
778
781
|
}) {
|
|
779
|
-
|
|
782
|
+
var _a;
|
|
783
|
+
const effectiveViewDate = (_a = viewDate != null ? viewDate : dayViewDate) != null ? _a : today;
|
|
780
784
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col border border-border bg-card", children: [
|
|
781
785
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between gap-4 px-4 py-3", children: [
|
|
782
786
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
@@ -806,41 +810,57 @@ function AppointmentCalendarView({
|
|
|
806
810
|
toolbarActions && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex items-center gap-2", children: toolbarActions })
|
|
807
811
|
] }),
|
|
808
812
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
|
|
809
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
813
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
814
|
+
Tabs,
|
|
815
|
+
{
|
|
816
|
+
defaultValue: defaultView,
|
|
817
|
+
onValueChange: (v) => onViewChange == null ? void 0 : onViewChange(v),
|
|
818
|
+
className: "flex flex-col",
|
|
819
|
+
children: [
|
|
820
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(TabsList, { children: [
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "day", children: "Day" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "week", children: "Week" }),
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsTrigger, { value: "month", children: "Month" })
|
|
824
|
+
] }) }),
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsContent, { value: "day", className: "mt-0 max-h-[75vh] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
826
|
+
DayView,
|
|
827
|
+
{
|
|
828
|
+
appointments,
|
|
829
|
+
date: effectiveViewDate,
|
|
830
|
+
today,
|
|
831
|
+
hours,
|
|
832
|
+
onSelectAppointment
|
|
833
|
+
}
|
|
834
|
+
) }),
|
|
835
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TabsContent, { value: "week", className: "mt-0 max-h-[75vh] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
836
|
+
WeekView,
|
|
837
|
+
{
|
|
838
|
+
appointments,
|
|
839
|
+
weekDays,
|
|
840
|
+
today,
|
|
841
|
+
hours,
|
|
842
|
+
onSelectAppointment
|
|
843
|
+
}
|
|
844
|
+
) }),
|
|
845
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
846
|
+
TabsContent,
|
|
847
|
+
{
|
|
848
|
+
value: "month",
|
|
849
|
+
className: "mt-0 max-h-[75vh] overflow-y-auto",
|
|
850
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
851
|
+
MonthView,
|
|
852
|
+
{
|
|
853
|
+
appointments,
|
|
854
|
+
viewDate: effectiveViewDate,
|
|
855
|
+
today,
|
|
856
|
+
onSelectAppointment
|
|
857
|
+
}
|
|
858
|
+
)
|
|
859
|
+
}
|
|
860
|
+
)
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
)
|
|
844
864
|
] });
|
|
845
865
|
}
|
|
846
866
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.js
CHANGED
|
@@ -9589,11 +9589,12 @@ function generateMonthGrid(year, month) {
|
|
|
9589
9589
|
}
|
|
9590
9590
|
function MonthView({
|
|
9591
9591
|
appointments,
|
|
9592
|
+
viewDate,
|
|
9592
9593
|
today,
|
|
9593
9594
|
onSelectAppointment
|
|
9594
9595
|
}) {
|
|
9595
|
-
const
|
|
9596
|
-
const grid = generateMonthGrid(
|
|
9596
|
+
const vd = /* @__PURE__ */ new Date(viewDate + "T00:00:00");
|
|
9597
|
+
const grid = generateMonthGrid(vd.getFullYear(), vd.getMonth());
|
|
9597
9598
|
const toIso = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
|
9598
9599
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col", children: [
|
|
9599
9600
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid grid-cols-7 border-b border-border", children: MONTH_DAY_HEADERS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
@@ -9662,15 +9663,18 @@ function AppointmentCalendarView({
|
|
|
9662
9663
|
periodLabel,
|
|
9663
9664
|
weekDays,
|
|
9664
9665
|
hours = DEFAULT_HOURS,
|
|
9666
|
+
viewDate,
|
|
9665
9667
|
dayViewDate,
|
|
9666
9668
|
defaultView = "week",
|
|
9667
9669
|
onPrev,
|
|
9668
9670
|
onNext,
|
|
9669
9671
|
onToday,
|
|
9672
|
+
onViewChange,
|
|
9670
9673
|
onSelectAppointment,
|
|
9671
9674
|
toolbarActions
|
|
9672
9675
|
}) {
|
|
9673
|
-
|
|
9676
|
+
var _a;
|
|
9677
|
+
const effectiveViewDate = (_a = viewDate != null ? viewDate : dayViewDate) != null ? _a : today;
|
|
9674
9678
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col border border-border bg-card", children: [
|
|
9675
9679
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center justify-between gap-4 px-4 py-3", children: [
|
|
9676
9680
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
@@ -9700,41 +9704,57 @@ function AppointmentCalendarView({
|
|
|
9700
9704
|
toolbarActions && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center gap-2", children: toolbarActions })
|
|
9701
9705
|
] }),
|
|
9702
9706
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Separator, {}),
|
|
9703
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
9718
|
-
|
|
9719
|
-
|
|
9720
|
-
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9707
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9708
|
+
Tabs,
|
|
9709
|
+
{
|
|
9710
|
+
defaultValue: defaultView,
|
|
9711
|
+
onValueChange: (v) => onViewChange == null ? void 0 : onViewChange(v),
|
|
9712
|
+
className: "flex flex-col",
|
|
9713
|
+
children: [
|
|
9714
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "px-4 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(TabsList, { children: [
|
|
9715
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsTrigger, { value: "day", children: "Day" }),
|
|
9716
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsTrigger, { value: "week", children: "Week" }),
|
|
9717
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsTrigger, { value: "month", children: "Month" })
|
|
9718
|
+
] }) }),
|
|
9719
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsContent, { value: "day", className: "mt-0 max-h-[75vh] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9720
|
+
DayView,
|
|
9721
|
+
{
|
|
9722
|
+
appointments,
|
|
9723
|
+
date: effectiveViewDate,
|
|
9724
|
+
today,
|
|
9725
|
+
hours,
|
|
9726
|
+
onSelectAppointment
|
|
9727
|
+
}
|
|
9728
|
+
) }),
|
|
9729
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsContent, { value: "week", className: "mt-0 max-h-[75vh] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9730
|
+
WeekView,
|
|
9731
|
+
{
|
|
9732
|
+
appointments,
|
|
9733
|
+
weekDays,
|
|
9734
|
+
today,
|
|
9735
|
+
hours,
|
|
9736
|
+
onSelectAppointment
|
|
9737
|
+
}
|
|
9738
|
+
) }),
|
|
9739
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9740
|
+
TabsContent,
|
|
9741
|
+
{
|
|
9742
|
+
value: "month",
|
|
9743
|
+
className: "mt-0 max-h-[75vh] overflow-y-auto",
|
|
9744
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9745
|
+
MonthView,
|
|
9746
|
+
{
|
|
9747
|
+
appointments,
|
|
9748
|
+
viewDate: effectiveViewDate,
|
|
9749
|
+
today,
|
|
9750
|
+
onSelectAppointment
|
|
9751
|
+
}
|
|
9752
|
+
)
|
|
9753
|
+
}
|
|
9754
|
+
)
|
|
9755
|
+
]
|
|
9756
|
+
}
|
|
9757
|
+
)
|
|
9738
9758
|
] });
|
|
9739
9759
|
}
|
|
9740
9760
|
|
package/dist/index.mjs
CHANGED