shadcn-ui-react 0.4.2 → 0.5.0
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.cjs +367 -142
- package/dist/index.js +372 -147
- package/dist/style.css +17 -1
- package/package.json +48 -48
package/dist/index.cjs
CHANGED
|
@@ -661,9 +661,6 @@ var Button = React5.forwardRef(
|
|
|
661
661
|
);
|
|
662
662
|
Button.displayName = "Button";
|
|
663
663
|
|
|
664
|
-
// node_modules/@date-fns/tz/constants/index.js
|
|
665
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
666
|
-
|
|
667
664
|
// node_modules/@date-fns/tz/tzName/index.js
|
|
668
665
|
function tzName(timeZone, date, format2 = "long") {
|
|
669
666
|
return new Intl.DateTimeFormat("en-US", {
|
|
@@ -749,7 +746,7 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
749
746
|
}
|
|
750
747
|
//#endregion
|
|
751
748
|
//#region date-fns integration
|
|
752
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
749
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
753
750
|
return new _TZDateMini(+new Date(date), this.timeZone);
|
|
754
751
|
}
|
|
755
752
|
//#endregion
|
|
@@ -877,7 +874,7 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
877
874
|
return new _TZDate(+this, timeZone);
|
|
878
875
|
}
|
|
879
876
|
//#region date-fns integration
|
|
880
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
877
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
881
878
|
return new _TZDate(+new Date(date), this.timeZone);
|
|
882
879
|
}
|
|
883
880
|
//#endregion
|
|
@@ -895,13 +892,13 @@ var secondsInWeek = secondsInDay * 7;
|
|
|
895
892
|
var secondsInYear = secondsInDay * daysInYear;
|
|
896
893
|
var secondsInMonth = secondsInYear / 12;
|
|
897
894
|
var secondsInQuarter = secondsInMonth * 3;
|
|
898
|
-
var
|
|
895
|
+
var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
899
896
|
|
|
900
897
|
// node_modules/date-fns/constructFrom.js
|
|
901
898
|
function constructFrom(date, value) {
|
|
902
899
|
if (typeof date === "function") return date(value);
|
|
903
|
-
if (date && typeof date === "object" &&
|
|
904
|
-
return date[
|
|
900
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
901
|
+
return date[constructFromSymbol](value);
|
|
905
902
|
if (date instanceof Date) return new date.constructor(value);
|
|
906
903
|
return new Date(value);
|
|
907
904
|
}
|
|
@@ -1176,6 +1173,29 @@ function startOfYear(date, options) {
|
|
|
1176
1173
|
return date_;
|
|
1177
1174
|
}
|
|
1178
1175
|
|
|
1176
|
+
// node_modules/date-fns/eachYearOfInterval.js
|
|
1177
|
+
function eachYearOfInterval(interval, options) {
|
|
1178
|
+
var _a;
|
|
1179
|
+
const { start, end } = normalizeInterval(options == null ? void 0 : options.in, interval);
|
|
1180
|
+
let reversed = +start > +end;
|
|
1181
|
+
const endTime = reversed ? +start : +end;
|
|
1182
|
+
const date = reversed ? end : start;
|
|
1183
|
+
date.setHours(0, 0, 0, 0);
|
|
1184
|
+
date.setMonth(0, 1);
|
|
1185
|
+
let step = (_a = options == null ? void 0 : options.step) != null ? _a : 1;
|
|
1186
|
+
if (!step) return [];
|
|
1187
|
+
if (step < 0) {
|
|
1188
|
+
step = -step;
|
|
1189
|
+
reversed = !reversed;
|
|
1190
|
+
}
|
|
1191
|
+
const dates = [];
|
|
1192
|
+
while (+date <= endTime) {
|
|
1193
|
+
dates.push(constructFrom(start, date));
|
|
1194
|
+
date.setFullYear(date.getFullYear() + step);
|
|
1195
|
+
}
|
|
1196
|
+
return reversed ? dates.reverse() : dates;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1179
1199
|
// node_modules/date-fns/endOfWeek.js
|
|
1180
1200
|
function endOfWeek(date, options) {
|
|
1181
1201
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -2724,6 +2744,64 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2724
2744
|
return endDate;
|
|
2725
2745
|
}
|
|
2726
2746
|
|
|
2747
|
+
// node_modules/react-day-picker/dist/esm/locale/en-US.js
|
|
2748
|
+
var enUS2 = __spreadProps(__spreadValues({}, enUS), {
|
|
2749
|
+
labels: {
|
|
2750
|
+
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
2751
|
+
let formatDate;
|
|
2752
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2753
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2754
|
+
} else {
|
|
2755
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2756
|
+
}
|
|
2757
|
+
let label = formatDate(date, "PPPP");
|
|
2758
|
+
if (modifiers.today)
|
|
2759
|
+
label = `Today, ${label}`;
|
|
2760
|
+
if (modifiers.selected)
|
|
2761
|
+
label = `${label}, selected`;
|
|
2762
|
+
return label;
|
|
2763
|
+
},
|
|
2764
|
+
labelMonthDropdown: "Choose the Month",
|
|
2765
|
+
labelNext: "Go to the Next Month",
|
|
2766
|
+
labelPrevious: "Go to the Previous Month",
|
|
2767
|
+
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
2768
|
+
labelYearDropdown: "Choose the Year",
|
|
2769
|
+
labelGrid: (date, options, dateLib) => {
|
|
2770
|
+
let formatDate;
|
|
2771
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2772
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2773
|
+
} else {
|
|
2774
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2775
|
+
}
|
|
2776
|
+
return formatDate(date, "LLLL yyyy");
|
|
2777
|
+
},
|
|
2778
|
+
labelGridcell: (date, modifiers, options, dateLib) => {
|
|
2779
|
+
let formatDate;
|
|
2780
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2781
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2782
|
+
} else {
|
|
2783
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2784
|
+
}
|
|
2785
|
+
let label = formatDate(date, "PPPP");
|
|
2786
|
+
if (modifiers == null ? void 0 : modifiers.today) {
|
|
2787
|
+
label = `Today, ${label}`;
|
|
2788
|
+
}
|
|
2789
|
+
return label;
|
|
2790
|
+
},
|
|
2791
|
+
labelNav: "Navigation bar",
|
|
2792
|
+
labelWeekNumberHeader: "Week Number",
|
|
2793
|
+
labelWeekday: (date, options, dateLib) => {
|
|
2794
|
+
let formatDate;
|
|
2795
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2796
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2797
|
+
} else {
|
|
2798
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2799
|
+
}
|
|
2800
|
+
return formatDate(date, "cccc");
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
});
|
|
2804
|
+
|
|
2727
2805
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2728
2806
|
var DateLib = class _DateLib {
|
|
2729
2807
|
/**
|
|
@@ -2782,6 +2860,19 @@ var DateLib = class _DateLib {
|
|
|
2782
2860
|
var _a;
|
|
2783
2861
|
return ((_a = this.overrides) == null ? void 0 : _a.eachMonthOfInterval) ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
2784
2862
|
};
|
|
2863
|
+
this.eachYearOfInterval = (interval) => {
|
|
2864
|
+
var _a;
|
|
2865
|
+
const years = ((_a = this.overrides) == null ? void 0 : _a.eachYearOfInterval) ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
2866
|
+
const uniqueYears = new Set(years.map((d) => this.getYear(d)));
|
|
2867
|
+
if (uniqueYears.size === years.length) {
|
|
2868
|
+
return years;
|
|
2869
|
+
}
|
|
2870
|
+
const yearsArray = [];
|
|
2871
|
+
uniqueYears.forEach((y) => {
|
|
2872
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
2873
|
+
});
|
|
2874
|
+
return yearsArray;
|
|
2875
|
+
};
|
|
2785
2876
|
this.endOfBroadcastWeek = (date) => {
|
|
2786
2877
|
var _a;
|
|
2787
2878
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
@@ -2890,7 +2981,7 @@ var DateLib = class _DateLib {
|
|
|
2890
2981
|
var _a;
|
|
2891
2982
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfYear) ? this.overrides.startOfYear(date) : startOfYear(date);
|
|
2892
2983
|
};
|
|
2893
|
-
this.options = __spreadValues({ locale:
|
|
2984
|
+
this.options = __spreadValues({ locale: enUS2 }, options);
|
|
2894
2985
|
this.overrides = overrides;
|
|
2895
2986
|
}
|
|
2896
2987
|
/**
|
|
@@ -2997,6 +3088,9 @@ var CalendarDay = class {
|
|
|
2997
3088
|
this.displayMonth = displayMonth;
|
|
2998
3089
|
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
2999
3090
|
this.dateLib = dateLib;
|
|
3091
|
+
this.isoDate = dateLib.format(date, "yyyy-MM-dd");
|
|
3092
|
+
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
3093
|
+
this.dateMonthId = dateLib.format(date, "yyyy-MM");
|
|
3000
3094
|
}
|
|
3001
3095
|
/**
|
|
3002
3096
|
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
@@ -3409,7 +3503,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3409
3503
|
return isSameDay2(date, matcher);
|
|
3410
3504
|
}
|
|
3411
3505
|
if (isDatesArray(matcher, dateLib)) {
|
|
3412
|
-
return matcher.
|
|
3506
|
+
return matcher.some((matcherDate) => isSameDay2(date, matcherDate));
|
|
3413
3507
|
}
|
|
3414
3508
|
if (isDateRange(matcher)) {
|
|
3415
3509
|
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
@@ -3447,7 +3541,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3447
3541
|
|
|
3448
3542
|
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3449
3543
|
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3450
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3544
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
|
|
3451
3545
|
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3452
3546
|
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3453
3547
|
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
@@ -3467,7 +3561,7 @@ function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
|
3467
3561
|
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3468
3562
|
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
3469
3563
|
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3470
|
-
const isToday = isSameDay2(date, today
|
|
3564
|
+
const isToday = isSameDay2(date, today);
|
|
3471
3565
|
if (isOutside)
|
|
3472
3566
|
internalModifiersMap.outside.push(day);
|
|
3473
3567
|
if (isDisabled)
|
|
@@ -3633,70 +3727,6 @@ function getFormatters(customFormatters) {
|
|
|
3633
3727
|
return __spreadValues(__spreadValues({}, formatters_exports), customFormatters);
|
|
3634
3728
|
}
|
|
3635
3729
|
|
|
3636
|
-
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3637
|
-
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3638
|
-
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3639
|
-
const months = eachMonthOfInterval2({
|
|
3640
|
-
start: startOfYear2(displayMonth),
|
|
3641
|
-
end: endOfYear2(displayMonth)
|
|
3642
|
-
});
|
|
3643
|
-
const options = months.map((month) => {
|
|
3644
|
-
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3645
|
-
const value = getMonth2(month);
|
|
3646
|
-
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3647
|
-
return { value, label, disabled };
|
|
3648
|
-
});
|
|
3649
|
-
return options;
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3653
|
-
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3654
|
-
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3655
|
-
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3656
|
-
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3657
|
-
});
|
|
3658
|
-
return style;
|
|
3659
|
-
}
|
|
3660
|
-
|
|
3661
|
-
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3662
|
-
function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
3663
|
-
const today = dateLib.today();
|
|
3664
|
-
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(today, dateLib) : ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
|
|
3665
|
-
const days = [];
|
|
3666
|
-
for (let i = 0; i < 7; i++) {
|
|
3667
|
-
const day = dateLib.addDays(start, i);
|
|
3668
|
-
days.push(day);
|
|
3669
|
-
}
|
|
3670
|
-
return days;
|
|
3671
|
-
}
|
|
3672
|
-
|
|
3673
|
-
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3674
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3675
|
-
if (!navStart)
|
|
3676
|
-
return void 0;
|
|
3677
|
-
if (!navEnd)
|
|
3678
|
-
return void 0;
|
|
3679
|
-
const { startOfYear: startOfYear2, endOfYear: endOfYear2, addYears: addYears2, getYear: getYear2, isBefore: isBefore2, isSameYear: isSameYear2 } = dateLib;
|
|
3680
|
-
const firstNavYear = startOfYear2(navStart);
|
|
3681
|
-
const lastNavYear = endOfYear2(navEnd);
|
|
3682
|
-
const years = [];
|
|
3683
|
-
let year = firstNavYear;
|
|
3684
|
-
while (isBefore2(year, lastNavYear) || isSameYear2(year, lastNavYear)) {
|
|
3685
|
-
years.push(year);
|
|
3686
|
-
year = addYears2(year, 1);
|
|
3687
|
-
}
|
|
3688
|
-
if (reverse)
|
|
3689
|
-
years.reverse();
|
|
3690
|
-
return years.map((year2) => {
|
|
3691
|
-
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3692
|
-
return {
|
|
3693
|
-
value: getYear2(year2),
|
|
3694
|
-
label,
|
|
3695
|
-
disabled: false
|
|
3696
|
-
};
|
|
3697
|
-
});
|
|
3698
|
-
}
|
|
3699
|
-
|
|
3700
3730
|
// node_modules/react-day-picker/dist/esm/labels/index.js
|
|
3701
3731
|
var labels_exports = {};
|
|
3702
3732
|
__export(labels_exports, {
|
|
@@ -3753,8 +3783,9 @@ function labelNav() {
|
|
|
3753
3783
|
}
|
|
3754
3784
|
|
|
3755
3785
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3756
|
-
|
|
3757
|
-
|
|
3786
|
+
var defaultLabel = "Go to the Next Month";
|
|
3787
|
+
function labelNext(_month, _options) {
|
|
3788
|
+
return defaultLabel;
|
|
3758
3789
|
}
|
|
3759
3790
|
|
|
3760
3791
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
@@ -3782,6 +3813,92 @@ function labelYearDropdown(_options) {
|
|
|
3782
3813
|
return "Choose the Year";
|
|
3783
3814
|
}
|
|
3784
3815
|
|
|
3816
|
+
// node_modules/react-day-picker/dist/esm/helpers/getLabels.js
|
|
3817
|
+
var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
3818
|
+
if (customLabel)
|
|
3819
|
+
return customLabel;
|
|
3820
|
+
if (localeLabel) {
|
|
3821
|
+
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
3822
|
+
}
|
|
3823
|
+
return defaultLabel2;
|
|
3824
|
+
};
|
|
3825
|
+
function getLabels(customLabels, options) {
|
|
3826
|
+
var _a, _b;
|
|
3827
|
+
const localeLabels = (_b = (_a = options.locale) == null ? void 0 : _a.labels) != null ? _b : {};
|
|
3828
|
+
return __spreadProps(__spreadValues(__spreadValues({}, labels_exports), customLabels != null ? customLabels : {}), {
|
|
3829
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
|
|
3830
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
3831
|
+
labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
|
|
3832
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
|
|
3833
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
3834
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
3835
|
+
labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
|
|
3836
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
|
|
3837
|
+
labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
|
|
3838
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
3839
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3844
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3845
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3846
|
+
const months = eachMonthOfInterval2({
|
|
3847
|
+
start: startOfYear2(displayMonth),
|
|
3848
|
+
end: endOfYear2(displayMonth)
|
|
3849
|
+
});
|
|
3850
|
+
const options = months.map((month) => {
|
|
3851
|
+
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3852
|
+
const value = getMonth2(month);
|
|
3853
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3854
|
+
return { value, label, disabled };
|
|
3855
|
+
});
|
|
3856
|
+
return options;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3860
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3861
|
+
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3862
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3863
|
+
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3864
|
+
});
|
|
3865
|
+
return style;
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3869
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
3870
|
+
const referenceToday = today != null ? today : dateLib.today();
|
|
3871
|
+
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
3872
|
+
const days = [];
|
|
3873
|
+
for (let i = 0; i < 7; i++) {
|
|
3874
|
+
const day = dateLib.addDays(start, i);
|
|
3875
|
+
days.push(day);
|
|
3876
|
+
}
|
|
3877
|
+
return days;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3881
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3882
|
+
if (!navStart)
|
|
3883
|
+
return void 0;
|
|
3884
|
+
if (!navEnd)
|
|
3885
|
+
return void 0;
|
|
3886
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
3887
|
+
const firstNavYear = startOfYear2(navStart);
|
|
3888
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
3889
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
3890
|
+
if (reverse)
|
|
3891
|
+
years.reverse();
|
|
3892
|
+
return years.map((year) => {
|
|
3893
|
+
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
3894
|
+
return {
|
|
3895
|
+
value: getYear2(year),
|
|
3896
|
+
label,
|
|
3897
|
+
disabled: false
|
|
3898
|
+
};
|
|
3899
|
+
});
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3785
3902
|
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
3786
3903
|
var import_react28 = require("react");
|
|
3787
3904
|
var asHtmlElement = (element) => {
|
|
@@ -3923,15 +4040,14 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3923
4040
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3924
4041
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3925
4042
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3926
|
-
const
|
|
3927
|
-
const
|
|
4043
|
+
const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
4044
|
+
const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
|
|
4045
|
+
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
4046
|
+
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
3928
4047
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3929
4048
|
const dates = [];
|
|
3930
4049
|
for (let i = 0; i <= nOfDays; i++) {
|
|
3931
4050
|
const date = addDays2(startWeekFirstDate, i);
|
|
3932
|
-
if (maxDate && isAfter2(date, maxDate)) {
|
|
3933
|
-
break;
|
|
3934
|
-
}
|
|
3935
4051
|
dates.push(date);
|
|
3936
4052
|
}
|
|
3937
4053
|
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
@@ -4120,6 +4236,7 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
4120
4236
|
|
|
4121
4237
|
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
4122
4238
|
function useCalendar(props, dateLib) {
|
|
4239
|
+
var _a;
|
|
4123
4240
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
4124
4241
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
4125
4242
|
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
@@ -4132,13 +4249,44 @@ function useCalendar(props, dateLib) {
|
|
|
4132
4249
|
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
4133
4250
|
setFirstMonth(newInitialMonth);
|
|
4134
4251
|
}, [props.timeZone]);
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4252
|
+
const { months, weeks, days, previousMonth, nextMonth } = (0, import_react30.useMemo)(() => {
|
|
4253
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
|
|
4254
|
+
const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
|
|
4255
|
+
ISOWeek: props.ISOWeek,
|
|
4256
|
+
fixedWeeks: props.fixedWeeks,
|
|
4257
|
+
broadcastCalendar: props.broadcastCalendar
|
|
4258
|
+
}, dateLib);
|
|
4259
|
+
const months2 = getMonths(displayMonths, dates, {
|
|
4260
|
+
broadcastCalendar: props.broadcastCalendar,
|
|
4261
|
+
fixedWeeks: props.fixedWeeks,
|
|
4262
|
+
ISOWeek: props.ISOWeek,
|
|
4263
|
+
reverseMonths: props.reverseMonths
|
|
4264
|
+
}, dateLib);
|
|
4265
|
+
const weeks2 = getWeeks(months2);
|
|
4266
|
+
const days2 = getDays(months2);
|
|
4267
|
+
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
|
|
4268
|
+
const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
|
|
4269
|
+
return {
|
|
4270
|
+
months: months2,
|
|
4271
|
+
weeks: weeks2,
|
|
4272
|
+
days: days2,
|
|
4273
|
+
previousMonth: previousMonth2,
|
|
4274
|
+
nextMonth: nextMonth2
|
|
4275
|
+
};
|
|
4276
|
+
}, [
|
|
4277
|
+
dateLib,
|
|
4278
|
+
firstMonth.getTime(),
|
|
4279
|
+
navEnd == null ? void 0 : navEnd.getTime(),
|
|
4280
|
+
navStart == null ? void 0 : navStart.getTime(),
|
|
4281
|
+
props.disableNavigation,
|
|
4282
|
+
props.broadcastCalendar,
|
|
4283
|
+
(_a = props.endMonth) == null ? void 0 : _a.getTime(),
|
|
4284
|
+
props.fixedWeeks,
|
|
4285
|
+
props.ISOWeek,
|
|
4286
|
+
props.numberOfMonths,
|
|
4287
|
+
props.pagedNavigation,
|
|
4288
|
+
props.reverseMonths
|
|
4289
|
+
]);
|
|
4142
4290
|
const { disableNavigation, onMonthChange } = props;
|
|
4143
4291
|
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
4144
4292
|
const goToMonth = (date) => {
|
|
@@ -4269,6 +4417,12 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
4269
4417
|
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
4270
4418
|
if (!nextFocus)
|
|
4271
4419
|
return;
|
|
4420
|
+
if (props.disableNavigation) {
|
|
4421
|
+
const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));
|
|
4422
|
+
if (!isNextInCalendar) {
|
|
4423
|
+
return;
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4272
4426
|
calendar.goToDay(nextFocus);
|
|
4273
4427
|
setFocused(nextFocus);
|
|
4274
4428
|
};
|
|
@@ -4529,40 +4683,110 @@ function useSelection(props, dateLib) {
|
|
|
4529
4683
|
}
|
|
4530
4684
|
}
|
|
4531
4685
|
|
|
4686
|
+
// node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
|
|
4687
|
+
function toTimeZone(date, timeZone) {
|
|
4688
|
+
if (date instanceof TZDate && date.timeZone === timeZone) {
|
|
4689
|
+
return date;
|
|
4690
|
+
}
|
|
4691
|
+
return new TZDate(date, timeZone);
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
4695
|
+
function convertMatcher(matcher, timeZone) {
|
|
4696
|
+
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
4697
|
+
return matcher;
|
|
4698
|
+
}
|
|
4699
|
+
if (matcher instanceof Date) {
|
|
4700
|
+
return toTimeZone(matcher, timeZone);
|
|
4701
|
+
}
|
|
4702
|
+
if (Array.isArray(matcher)) {
|
|
4703
|
+
return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
|
|
4704
|
+
}
|
|
4705
|
+
if (isDateRange(matcher)) {
|
|
4706
|
+
return __spreadProps(__spreadValues({}, matcher), {
|
|
4707
|
+
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
4708
|
+
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
4709
|
+
});
|
|
4710
|
+
}
|
|
4711
|
+
if (isDateInterval(matcher)) {
|
|
4712
|
+
return {
|
|
4713
|
+
before: toTimeZone(matcher.before, timeZone),
|
|
4714
|
+
after: toTimeZone(matcher.after, timeZone)
|
|
4715
|
+
};
|
|
4716
|
+
}
|
|
4717
|
+
if (isDateAfterType(matcher)) {
|
|
4718
|
+
return {
|
|
4719
|
+
after: toTimeZone(matcher.after, timeZone)
|
|
4720
|
+
};
|
|
4721
|
+
}
|
|
4722
|
+
if (isDateBeforeType(matcher)) {
|
|
4723
|
+
return {
|
|
4724
|
+
before: toTimeZone(matcher.before, timeZone)
|
|
4725
|
+
};
|
|
4726
|
+
}
|
|
4727
|
+
return matcher;
|
|
4728
|
+
}
|
|
4729
|
+
function convertMatchersToTimeZone(matchers, timeZone) {
|
|
4730
|
+
if (!matchers) {
|
|
4731
|
+
return matchers;
|
|
4732
|
+
}
|
|
4733
|
+
if (Array.isArray(matchers)) {
|
|
4734
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone));
|
|
4735
|
+
}
|
|
4736
|
+
return convertMatcher(matchers, timeZone);
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4532
4739
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4533
4740
|
function DayPicker(initialProps) {
|
|
4534
4741
|
var _a, _b;
|
|
4535
4742
|
let props = initialProps;
|
|
4536
|
-
|
|
4537
|
-
|
|
4743
|
+
const timeZone = props.timeZone;
|
|
4744
|
+
if (timeZone) {
|
|
4745
|
+
props = __spreadProps(__spreadValues({}, initialProps), {
|
|
4746
|
+
timeZone
|
|
4747
|
+
});
|
|
4538
4748
|
if (props.today) {
|
|
4539
|
-
props.today =
|
|
4749
|
+
props.today = toTimeZone(props.today, timeZone);
|
|
4540
4750
|
}
|
|
4541
4751
|
if (props.month) {
|
|
4542
|
-
props.month =
|
|
4752
|
+
props.month = toTimeZone(props.month, timeZone);
|
|
4543
4753
|
}
|
|
4544
4754
|
if (props.defaultMonth) {
|
|
4545
|
-
props.defaultMonth =
|
|
4755
|
+
props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
|
|
4546
4756
|
}
|
|
4547
4757
|
if (props.startMonth) {
|
|
4548
|
-
props.startMonth =
|
|
4758
|
+
props.startMonth = toTimeZone(props.startMonth, timeZone);
|
|
4549
4759
|
}
|
|
4550
4760
|
if (props.endMonth) {
|
|
4551
|
-
props.endMonth =
|
|
4761
|
+
props.endMonth = toTimeZone(props.endMonth, timeZone);
|
|
4552
4762
|
}
|
|
4553
4763
|
if (props.mode === "single" && props.selected) {
|
|
4554
|
-
props.selected =
|
|
4764
|
+
props.selected = toTimeZone(props.selected, timeZone);
|
|
4555
4765
|
} else if (props.mode === "multiple" && props.selected) {
|
|
4556
|
-
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) =>
|
|
4766
|
+
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) => toTimeZone(date, timeZone));
|
|
4557
4767
|
} else if (props.mode === "range" && props.selected) {
|
|
4558
4768
|
props.selected = {
|
|
4559
|
-
from: props.selected.from ?
|
|
4560
|
-
to: props.selected.to ?
|
|
4769
|
+
from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
|
|
4770
|
+
to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
|
|
4561
4771
|
};
|
|
4562
4772
|
}
|
|
4773
|
+
if (props.disabled !== void 0) {
|
|
4774
|
+
props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
|
|
4775
|
+
}
|
|
4776
|
+
if (props.hidden !== void 0) {
|
|
4777
|
+
props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
|
|
4778
|
+
}
|
|
4779
|
+
if (props.modifiers) {
|
|
4780
|
+
const nextModifiers = {};
|
|
4781
|
+
Object.keys(props.modifiers).forEach((key) => {
|
|
4782
|
+
var _a2;
|
|
4783
|
+
nextModifiers[key] = convertMatchersToTimeZone((_a2 = props.modifiers) == null ? void 0 : _a2[key], timeZone);
|
|
4784
|
+
});
|
|
4785
|
+
props.modifiers = nextModifiers;
|
|
4786
|
+
}
|
|
4563
4787
|
}
|
|
4564
4788
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react32.useMemo)(() => {
|
|
4565
|
-
const locale2 = __spreadValues(__spreadValues({},
|
|
4789
|
+
const locale2 = __spreadValues(__spreadValues({}, enUS2), props.locale);
|
|
4566
4790
|
const dateLib2 = new DateLib({
|
|
4567
4791
|
locale: locale2,
|
|
4568
4792
|
weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
|
|
@@ -4576,7 +4800,7 @@ function DayPicker(initialProps) {
|
|
|
4576
4800
|
dateLib: dateLib2,
|
|
4577
4801
|
components: getComponents(props.components),
|
|
4578
4802
|
formatters: getFormatters(props.formatters),
|
|
4579
|
-
labels:
|
|
4803
|
+
labels: getLabels(props.labels, dateLib2.options),
|
|
4580
4804
|
locale: locale2,
|
|
4581
4805
|
classNames: __spreadValues(__spreadValues({}, getDefaultClassNames()), props.classNames)
|
|
4582
4806
|
};
|
|
@@ -4595,15 +4819,18 @@ function DayPicker(initialProps) {
|
|
|
4595
4819
|
props.labels,
|
|
4596
4820
|
props.classNames
|
|
4597
4821
|
]);
|
|
4822
|
+
if (!props.today) {
|
|
4823
|
+
props = __spreadProps(__spreadValues({}, props), { today: dateLib.today() });
|
|
4824
|
+
}
|
|
4598
4825
|
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4599
4826
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4600
4827
|
const calendar = useCalendar(props, dateLib);
|
|
4601
4828
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4602
4829
|
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
4603
4830
|
const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
|
|
4604
|
-
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4831
|
+
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : (() => false), dateLib);
|
|
4605
4832
|
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4606
|
-
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
4833
|
+
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
|
|
4607
4834
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4608
4835
|
const handlePreviousClick = (0, import_react32.useCallback)(() => {
|
|
4609
4836
|
if (!previousMonth)
|
|
@@ -4621,6 +4848,9 @@ function DayPicker(initialProps) {
|
|
|
4621
4848
|
e.preventDefault();
|
|
4622
4849
|
e.stopPropagation();
|
|
4623
4850
|
setFocused(day);
|
|
4851
|
+
if (m.disabled) {
|
|
4852
|
+
return;
|
|
4853
|
+
}
|
|
4624
4854
|
select == null ? void 0 : select(day.date, m, e);
|
|
4625
4855
|
onDayClick == null ? void 0 : onDayClick(day.date, m, e);
|
|
4626
4856
|
}, [select, onDayClick, setFocused]);
|
|
@@ -4749,10 +4979,7 @@ function DayPicker(initialProps) {
|
|
|
4749
4979
|
whiteSpace: "nowrap",
|
|
4750
4980
|
wordWrap: "normal"
|
|
4751
4981
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4752
|
-
) : (
|
|
4753
|
-
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
4754
|
-
import_react32.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4755
|
-
)),
|
|
4982
|
+
) : import_react32.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
4756
4983
|
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && import_react32.default.createElement(
|
|
4757
4984
|
components.NextMonthButton,
|
|
4758
4985
|
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
@@ -4772,8 +4999,7 @@ function DayPicker(initialProps) {
|
|
|
4772
4999
|
return import_react32.default.createElement(
|
|
4773
5000
|
components.Week,
|
|
4774
5001
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4775
|
-
showWeekNumber &&
|
|
4776
|
-
import_react32.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
5002
|
+
showWeekNumber && import_react32.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4777
5003
|
locale
|
|
4778
5004
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4779
5005
|
week.days.map((day) => {
|
|
@@ -4790,10 +5016,7 @@ function DayPicker(initialProps) {
|
|
|
4790
5016
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4791
5017
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4792
5018
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4793
|
-
return (
|
|
4794
|
-
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
4795
|
-
import_react32.default.createElement(components.Day, { key: `${dateLib.format(date, "yyyy-MM-dd")}_${dateLib.format(day.displayMonth, "yyyy-MM")}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": dateLib.format(date, "yyyy-MM-dd"), "data-month": day.outside ? dateLib.format(date, "yyyy-MM") : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? import_react32.default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib))
|
|
4796
|
-
);
|
|
5019
|
+
return import_react32.default.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? import_react32.default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
|
|
4797
5020
|
})
|
|
4798
5021
|
);
|
|
4799
5022
|
}))
|
|
@@ -4801,8 +5024,7 @@ function DayPicker(initialProps) {
|
|
|
4801
5024
|
);
|
|
4802
5025
|
})
|
|
4803
5026
|
),
|
|
4804
|
-
props.footer &&
|
|
4805
|
-
import_react32.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
5027
|
+
props.footer && import_react32.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
4806
5028
|
)
|
|
4807
5029
|
);
|
|
4808
5030
|
}
|
|
@@ -5900,7 +6122,8 @@ var Input = React41.forwardRef(
|
|
|
5900
6122
|
iconPadLeft,
|
|
5901
6123
|
iconPadRight,
|
|
5902
6124
|
className
|
|
5903
|
-
) : className
|
|
6125
|
+
) : className,
|
|
6126
|
+
"data-private": true
|
|
5904
6127
|
}, props)
|
|
5905
6128
|
),
|
|
5906
6129
|
trailing ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -6382,7 +6605,8 @@ var InputOTPSlot = React44.forwardRef((_a, ref) => {
|
|
|
6382
6605
|
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
6383
6606
|
isActive && "z-10 ring-1 ring-ring",
|
|
6384
6607
|
className
|
|
6385
|
-
)
|
|
6608
|
+
),
|
|
6609
|
+
"data-private": true
|
|
6386
6610
|
}, props), {
|
|
6387
6611
|
children: [
|
|
6388
6612
|
char,
|
|
@@ -8063,9 +8287,9 @@ function DataTable({
|
|
|
8063
8287
|
if (onPageChange) {
|
|
8064
8288
|
onPageChange(pagination.pageIndex + 1);
|
|
8065
8289
|
}
|
|
8066
|
-
}, [pagination]);
|
|
8067
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8068
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
8290
|
+
}, [pagination, onPageChange]);
|
|
8291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("rounded-md border bg-background flex flex-col", className), children: [
|
|
8292
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
|
|
8069
8293
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { className: cn("relative", tableClassName), children: [
|
|
8070
8294
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
8071
8295
|
header.column.columnDef.header,
|
|
@@ -8093,23 +8317,26 @@ function DataTable({
|
|
|
8093
8317
|
) }) })
|
|
8094
8318
|
] }),
|
|
8095
8319
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
|
|
8096
|
-
] })
|
|
8097
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "
|
|
8098
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex
|
|
8099
|
-
isRowsSelected
|
|
8320
|
+
] }),
|
|
8321
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "border-t px-4 py-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-2", children: [
|
|
8323
|
+
isRowsSelected && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground text-sm", children: [
|
|
8100
8324
|
table.getFilteredSelectedRowModel().rows.length,
|
|
8101
8325
|
" ",
|
|
8102
8326
|
ofLabel,
|
|
8103
8327
|
" ",
|
|
8104
8328
|
table.getFilteredRowModel().rows.length,
|
|
8105
|
-
" "
|
|
8106
|
-
|
|
8329
|
+
" ",
|
|
8330
|
+
rowsSelectedLabel
|
|
8331
|
+
] }),
|
|
8107
8332
|
totalRows ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-sm text-muted-foreground", children: [
|
|
8108
8333
|
"Total: ",
|
|
8109
8334
|
totalRows,
|
|
8110
8335
|
" registros"
|
|
8111
|
-
] }) : null
|
|
8112
|
-
|
|
8336
|
+
] }) : null
|
|
8337
|
+
] }),
|
|
8338
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end", children: [
|
|
8339
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8113
8340
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
8114
8341
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8115
8342
|
Select2,
|
|
@@ -8129,19 +8356,17 @@ function DataTable({
|
|
|
8129
8356
|
]
|
|
8130
8357
|
}
|
|
8131
8358
|
)
|
|
8132
|
-
] })
|
|
8133
|
-
] }),
|
|
8134
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
|
|
8135
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
8136
|
-
pageLabel,
|
|
8137
|
-
" ",
|
|
8138
|
-
pagination.pageIndex + 1,
|
|
8139
|
-
" ",
|
|
8140
|
-
ofLabel,
|
|
8141
|
-
" ",
|
|
8142
|
-
pageCount
|
|
8143
8359
|
] }),
|
|
8144
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8361
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-[110px] items-center justify-center text-sm font-medium", children: [
|
|
8362
|
+
pageLabel,
|
|
8363
|
+
" ",
|
|
8364
|
+
pagination.pageIndex + 1,
|
|
8365
|
+
" ",
|
|
8366
|
+
ofLabel,
|
|
8367
|
+
" ",
|
|
8368
|
+
pageCount
|
|
8369
|
+
] }),
|
|
8145
8370
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8146
8371
|
Button,
|
|
8147
8372
|
{
|