shadcn-ui-react 0.3.5 → 0.3.6
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/README.md +1 -1
- package/dist/index.cjs +503 -386
- package/dist/index.d.cts +14 -13
- package/dist/index.d.ts +14 -13
- package/dist/index.js +503 -386
- package/dist/style.css +5 -4
- package/package.json +67 -67
package/dist/index.cjs
CHANGED
|
@@ -658,78 +658,29 @@ var Button = React5.forwardRef(
|
|
|
658
658
|
);
|
|
659
659
|
Button.displayName = "Button";
|
|
660
660
|
|
|
661
|
-
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
662
|
-
var import_react32 = __toESM(require("react"), 1);
|
|
663
|
-
|
|
664
|
-
// node_modules/react-day-picker/dist/esm/UI.js
|
|
665
|
-
var UI;
|
|
666
|
-
(function(UI2) {
|
|
667
|
-
UI2["Root"] = "root";
|
|
668
|
-
UI2["Chevron"] = "chevron";
|
|
669
|
-
UI2["Day"] = "day";
|
|
670
|
-
UI2["DayButton"] = "day_button";
|
|
671
|
-
UI2["CaptionLabel"] = "caption_label";
|
|
672
|
-
UI2["Dropdowns"] = "dropdowns";
|
|
673
|
-
UI2["Dropdown"] = "dropdown";
|
|
674
|
-
UI2["DropdownRoot"] = "dropdown_root";
|
|
675
|
-
UI2["Footer"] = "footer";
|
|
676
|
-
UI2["MonthGrid"] = "month_grid";
|
|
677
|
-
UI2["MonthCaption"] = "month_caption";
|
|
678
|
-
UI2["MonthsDropdown"] = "months_dropdown";
|
|
679
|
-
UI2["Month"] = "month";
|
|
680
|
-
UI2["Months"] = "months";
|
|
681
|
-
UI2["Nav"] = "nav";
|
|
682
|
-
UI2["NextMonthButton"] = "button_next";
|
|
683
|
-
UI2["PreviousMonthButton"] = "button_previous";
|
|
684
|
-
UI2["Week"] = "week";
|
|
685
|
-
UI2["Weeks"] = "weeks";
|
|
686
|
-
UI2["Weekday"] = "weekday";
|
|
687
|
-
UI2["Weekdays"] = "weekdays";
|
|
688
|
-
UI2["WeekNumber"] = "week_number";
|
|
689
|
-
UI2["WeekNumberHeader"] = "week_number_header";
|
|
690
|
-
UI2["YearsDropdown"] = "years_dropdown";
|
|
691
|
-
})(UI || (UI = {}));
|
|
692
|
-
var DayFlag;
|
|
693
|
-
(function(DayFlag2) {
|
|
694
|
-
DayFlag2["disabled"] = "disabled";
|
|
695
|
-
DayFlag2["hidden"] = "hidden";
|
|
696
|
-
DayFlag2["outside"] = "outside";
|
|
697
|
-
DayFlag2["focused"] = "focused";
|
|
698
|
-
DayFlag2["today"] = "today";
|
|
699
|
-
})(DayFlag || (DayFlag = {}));
|
|
700
|
-
var SelectionState;
|
|
701
|
-
(function(SelectionState2) {
|
|
702
|
-
SelectionState2["range_end"] = "range_end";
|
|
703
|
-
SelectionState2["range_middle"] = "range_middle";
|
|
704
|
-
SelectionState2["range_start"] = "range_start";
|
|
705
|
-
SelectionState2["selected"] = "selected";
|
|
706
|
-
})(SelectionState || (SelectionState = {}));
|
|
707
|
-
var Animation;
|
|
708
|
-
(function(Animation2) {
|
|
709
|
-
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
710
|
-
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
711
|
-
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
712
|
-
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
713
|
-
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
714
|
-
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
715
|
-
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
716
|
-
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
717
|
-
})(Animation || (Animation = {}));
|
|
718
|
-
|
|
719
661
|
// node_modules/@date-fns/tz/constants/index.js
|
|
720
662
|
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
721
663
|
|
|
664
|
+
// node_modules/@date-fns/tz/tzName/index.js
|
|
665
|
+
function tzName(timeZone, date, format2 = "long") {
|
|
666
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
667
|
+
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
668
|
+
hour: "numeric",
|
|
669
|
+
timeZone,
|
|
670
|
+
timeZoneName: format2
|
|
671
|
+
}).format(date).split(/\s/g).slice(2).join(" ");
|
|
672
|
+
}
|
|
673
|
+
|
|
722
674
|
// node_modules/@date-fns/tz/tzOffset/index.js
|
|
723
675
|
var offsetFormatCache = {};
|
|
724
676
|
var offsetCache = {};
|
|
725
677
|
function tzOffset(timeZone, date) {
|
|
726
678
|
try {
|
|
727
|
-
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-
|
|
679
|
+
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-US", {
|
|
728
680
|
timeZone,
|
|
729
|
-
hour: "numeric",
|
|
730
681
|
timeZoneName: "longOffset"
|
|
731
682
|
}).format);
|
|
732
|
-
const offsetStr = format2(date).split("GMT")[1]
|
|
683
|
+
const offsetStr = format2(date).split("GMT")[1];
|
|
733
684
|
if (offsetStr in offsetCache) return offsetCache[offsetStr];
|
|
734
685
|
return calcOffset(offsetStr, offsetStr.split(":"));
|
|
735
686
|
} catch (e) {
|
|
@@ -741,9 +692,10 @@ function tzOffset(timeZone, date) {
|
|
|
741
692
|
}
|
|
742
693
|
var offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
743
694
|
function calcOffset(cacheStr, values) {
|
|
744
|
-
const hours = +values[0];
|
|
695
|
+
const hours = +(values[0] || 0);
|
|
745
696
|
const minutes = +(values[1] || 0);
|
|
746
|
-
|
|
697
|
+
const seconds = +(values[2] || 0) / 60;
|
|
698
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
747
699
|
}
|
|
748
700
|
|
|
749
701
|
// node_modules/@date-fns/tz/date/mini.js
|
|
@@ -782,7 +734,8 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
782
734
|
return new _TZDateMini(+this, timeZone);
|
|
783
735
|
}
|
|
784
736
|
getTimezoneOffset() {
|
|
785
|
-
|
|
737
|
+
const offset = -tzOffset(this.timeZone, this);
|
|
738
|
+
return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
|
|
786
739
|
}
|
|
787
740
|
//#endregion
|
|
788
741
|
//#region time
|
|
@@ -822,7 +775,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
|
|
|
822
775
|
});
|
|
823
776
|
function syncToInternal(date) {
|
|
824
777
|
date.internal.setTime(+date);
|
|
825
|
-
date.internal.
|
|
778
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
826
779
|
}
|
|
827
780
|
function syncFromInternal(date) {
|
|
828
781
|
Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
|
|
@@ -830,7 +783,8 @@ function syncFromInternal(date) {
|
|
|
830
783
|
adjustToSystemTZ(date);
|
|
831
784
|
}
|
|
832
785
|
function adjustToSystemTZ(date) {
|
|
833
|
-
const
|
|
786
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
787
|
+
const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
834
788
|
const prevHour = /* @__PURE__ */ new Date(+date);
|
|
835
789
|
prevHour.setUTCHours(prevHour.getUTCHours() - 1);
|
|
836
790
|
const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
@@ -840,14 +794,24 @@ function adjustToSystemTZ(date) {
|
|
|
840
794
|
if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
|
|
841
795
|
const offsetDiff = systemOffset - offset;
|
|
842
796
|
if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
|
|
843
|
-
const
|
|
797
|
+
const systemDate = /* @__PURE__ */ new Date(+date);
|
|
798
|
+
systemDate.setUTCSeconds(0);
|
|
799
|
+
const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
|
|
800
|
+
const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
|
|
801
|
+
if (secondsOffset || systemSecondsOffset) {
|
|
802
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
|
|
803
|
+
Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
|
|
804
|
+
}
|
|
805
|
+
const postBaseOffset = tzOffset(date.timeZone, date);
|
|
806
|
+
const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
|
|
844
807
|
const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
845
808
|
const postOffsetDiff = postSystemOffset - postOffset;
|
|
846
809
|
const offsetChanged = postOffset !== offset;
|
|
847
810
|
const postDiff = postOffsetDiff - offsetDiff;
|
|
848
811
|
if (offsetChanged && postDiff) {
|
|
849
812
|
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
|
|
850
|
-
const
|
|
813
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
814
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
851
815
|
const offsetChange = postOffset - newOffset;
|
|
852
816
|
if (offsetChange) {
|
|
853
817
|
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
@@ -915,12 +879,6 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
915
879
|
}
|
|
916
880
|
//#endregion
|
|
917
881
|
};
|
|
918
|
-
function tzName(tz, date) {
|
|
919
|
-
return new Intl.DateTimeFormat("en-GB", {
|
|
920
|
-
timeZone: tz,
|
|
921
|
-
timeZoneName: "long"
|
|
922
|
-
}).format(date).slice(12);
|
|
923
|
-
}
|
|
924
882
|
|
|
925
883
|
// node_modules/date-fns/constants.js
|
|
926
884
|
var daysInYear = 365.2425;
|
|
@@ -2766,10 +2724,10 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2766
2724
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2767
2725
|
var DateLib = class {
|
|
2768
2726
|
/**
|
|
2769
|
-
* Creates an instance of DateLib
|
|
2727
|
+
* Creates an instance of `DateLib`.
|
|
2770
2728
|
*
|
|
2771
|
-
* @param options
|
|
2772
|
-
* @param overrides
|
|
2729
|
+
* @param options Configuration options for the date library.
|
|
2730
|
+
* @param overrides Custom overrides for the date library functions.
|
|
2773
2731
|
*/
|
|
2774
2732
|
constructor(options, overrides) {
|
|
2775
2733
|
this.Date = Date;
|
|
@@ -2823,7 +2781,7 @@ var DateLib = class {
|
|
|
2823
2781
|
};
|
|
2824
2782
|
this.endOfBroadcastWeek = (date) => {
|
|
2825
2783
|
var _a;
|
|
2826
|
-
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date
|
|
2784
|
+
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
2827
2785
|
};
|
|
2828
2786
|
this.endOfISOWeek = (date) => {
|
|
2829
2787
|
var _a;
|
|
@@ -2833,15 +2791,15 @@ var DateLib = class {
|
|
|
2833
2791
|
var _a;
|
|
2834
2792
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfMonth) ? this.overrides.endOfMonth(date) : endOfMonth(date);
|
|
2835
2793
|
};
|
|
2836
|
-
this.endOfWeek = (date) => {
|
|
2794
|
+
this.endOfWeek = (date, options2) => {
|
|
2837
2795
|
var _a;
|
|
2838
|
-
return ((_a = this.overrides) == null ? void 0 : _a.endOfWeek) ? this.overrides.endOfWeek(date,
|
|
2796
|
+
return ((_a = this.overrides) == null ? void 0 : _a.endOfWeek) ? this.overrides.endOfWeek(date, options2) : endOfWeek(date, this.options);
|
|
2839
2797
|
};
|
|
2840
2798
|
this.endOfYear = (date) => {
|
|
2841
2799
|
var _a;
|
|
2842
2800
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfYear) ? this.overrides.endOfYear(date) : endOfYear(date);
|
|
2843
2801
|
};
|
|
2844
|
-
this.format = (date, formatStr) => {
|
|
2802
|
+
this.format = (date, formatStr, _options) => {
|
|
2845
2803
|
var _a;
|
|
2846
2804
|
const formatted = ((_a = this.overrides) == null ? void 0 : _a.format) ? this.overrides.format(date, formatStr, this.options) : format(date, formatStr, this.options);
|
|
2847
2805
|
if (this.options.numerals && this.options.numerals !== "latn") {
|
|
@@ -2853,15 +2811,15 @@ var DateLib = class {
|
|
|
2853
2811
|
var _a;
|
|
2854
2812
|
return ((_a = this.overrides) == null ? void 0 : _a.getISOWeek) ? this.overrides.getISOWeek(date) : getISOWeek(date);
|
|
2855
2813
|
};
|
|
2856
|
-
this.getMonth = (date) => {
|
|
2814
|
+
this.getMonth = (date, _options) => {
|
|
2857
2815
|
var _a;
|
|
2858
2816
|
return ((_a = this.overrides) == null ? void 0 : _a.getMonth) ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
|
|
2859
2817
|
};
|
|
2860
|
-
this.getYear = (date) => {
|
|
2818
|
+
this.getYear = (date, _options) => {
|
|
2861
2819
|
var _a;
|
|
2862
2820
|
return ((_a = this.overrides) == null ? void 0 : _a.getYear) ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
|
|
2863
2821
|
};
|
|
2864
|
-
this.getWeek = (date) => {
|
|
2822
|
+
this.getWeek = (date, _options) => {
|
|
2865
2823
|
var _a;
|
|
2866
2824
|
return ((_a = this.overrides) == null ? void 0 : _a.getWeek) ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
|
|
2867
2825
|
};
|
|
@@ -2905,7 +2863,7 @@ var DateLib = class {
|
|
|
2905
2863
|
var _a;
|
|
2906
2864
|
return ((_a = this.overrides) == null ? void 0 : _a.setYear) ? this.overrides.setYear(date, year) : setYear(date, year);
|
|
2907
2865
|
};
|
|
2908
|
-
this.startOfBroadcastWeek = (date) => {
|
|
2866
|
+
this.startOfBroadcastWeek = (date, _dateLib) => {
|
|
2909
2867
|
var _a;
|
|
2910
2868
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfBroadcastWeek) ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
|
|
2911
2869
|
};
|
|
@@ -2921,7 +2879,7 @@ var DateLib = class {
|
|
|
2921
2879
|
var _a;
|
|
2922
2880
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfMonth) ? this.overrides.startOfMonth(date) : startOfMonth(date);
|
|
2923
2881
|
};
|
|
2924
|
-
this.startOfWeek = (date) => {
|
|
2882
|
+
this.startOfWeek = (date, _options) => {
|
|
2925
2883
|
var _a;
|
|
2926
2884
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfWeek) ? this.overrides.startOfWeek(date, this.options) : startOfWeek(date, this.options);
|
|
2927
2885
|
};
|
|
@@ -2933,9 +2891,11 @@ var DateLib = class {
|
|
|
2933
2891
|
this.overrides = overrides;
|
|
2934
2892
|
}
|
|
2935
2893
|
/**
|
|
2936
|
-
*
|
|
2894
|
+
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
2895
|
+
* digits.
|
|
2937
2896
|
*
|
|
2938
2897
|
* @since 9.5.0
|
|
2898
|
+
* @returns A record mapping Arabic digits to the target numerals.
|
|
2939
2899
|
*/
|
|
2940
2900
|
getDigitMap() {
|
|
2941
2901
|
const { numerals = "latn" } = this.options;
|
|
@@ -2949,20 +2909,22 @@ var DateLib = class {
|
|
|
2949
2909
|
return digitMap;
|
|
2950
2910
|
}
|
|
2951
2911
|
/**
|
|
2952
|
-
*
|
|
2912
|
+
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
2953
2913
|
*
|
|
2954
2914
|
* @since 9.5.0
|
|
2915
|
+
* @param input The string containing Arabic digits.
|
|
2916
|
+
* @returns The string with digits replaced.
|
|
2955
2917
|
*/
|
|
2956
2918
|
replaceDigits(input) {
|
|
2957
2919
|
const digitMap = this.getDigitMap();
|
|
2958
2920
|
return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
|
|
2959
2921
|
}
|
|
2960
2922
|
/**
|
|
2961
|
-
*
|
|
2923
|
+
* Formats a number using the configured numbering system.
|
|
2962
2924
|
*
|
|
2963
2925
|
* @since 9.5.0
|
|
2964
2926
|
* @param value The number to format.
|
|
2965
|
-
* @returns The formatted number.
|
|
2927
|
+
* @returns The formatted number as a string.
|
|
2966
2928
|
*/
|
|
2967
2929
|
formatNumber(value) {
|
|
2968
2930
|
return this.replaceDigits(value.toString());
|
|
@@ -2970,20 +2932,41 @@ var DateLib = class {
|
|
|
2970
2932
|
};
|
|
2971
2933
|
var defaultDateLib = new DateLib();
|
|
2972
2934
|
|
|
2973
|
-
// node_modules/react-day-picker/dist/esm/
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2935
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
2936
|
+
var CalendarDay = class {
|
|
2937
|
+
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
2938
|
+
this.date = date;
|
|
2939
|
+
this.displayMonth = displayMonth;
|
|
2940
|
+
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
2941
|
+
this.dateLib = dateLib;
|
|
2942
|
+
}
|
|
2943
|
+
/**
|
|
2944
|
+
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
2945
|
+
* date and the displayed month.
|
|
2946
|
+
*
|
|
2947
|
+
* @param day The `CalendarDay` to compare with.
|
|
2948
|
+
* @returns `true` if the days are equal, otherwise `false`.
|
|
2949
|
+
*/
|
|
2950
|
+
isEqualTo(day) {
|
|
2951
|
+
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
2952
|
+
}
|
|
2953
|
+
};
|
|
2954
|
+
|
|
2955
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
2956
|
+
var CalendarMonth = class {
|
|
2957
|
+
constructor(month, weeks) {
|
|
2958
|
+
this.date = month;
|
|
2959
|
+
this.weeks = weeks;
|
|
2960
|
+
}
|
|
2961
|
+
};
|
|
2962
|
+
|
|
2963
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
2964
|
+
var CalendarWeek = class {
|
|
2965
|
+
constructor(weekNumber, days) {
|
|
2966
|
+
this.days = days;
|
|
2967
|
+
this.weekNumber = weekNumber;
|
|
2968
|
+
}
|
|
2969
|
+
};
|
|
2987
2970
|
|
|
2988
2971
|
// node_modules/react-day-picker/dist/esm/components/custom-components.js
|
|
2989
2972
|
var custom_components_exports = {};
|
|
@@ -3032,13 +3015,16 @@ function CaptionLabel(props) {
|
|
|
3032
3015
|
var import_react3 = __toESM(require("react"), 1);
|
|
3033
3016
|
function Chevron(props) {
|
|
3034
3017
|
const { size = 24, orientation = "left", className } = props;
|
|
3035
|
-
return
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3018
|
+
return (
|
|
3019
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
3020
|
+
import_react3.default.createElement(
|
|
3021
|
+
"svg",
|
|
3022
|
+
{ className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
3023
|
+
orientation === "up" && import_react3.default.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
3024
|
+
orientation === "down" && import_react3.default.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
3025
|
+
orientation === "left" && import_react3.default.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
3026
|
+
orientation === "right" && import_react3.default.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
3027
|
+
)
|
|
3042
3028
|
);
|
|
3043
3029
|
}
|
|
3044
3030
|
|
|
@@ -3064,6 +3050,63 @@ function DayButton(props) {
|
|
|
3064
3050
|
|
|
3065
3051
|
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
3066
3052
|
var import_react6 = __toESM(require("react"), 1);
|
|
3053
|
+
|
|
3054
|
+
// node_modules/react-day-picker/dist/esm/UI.js
|
|
3055
|
+
var UI;
|
|
3056
|
+
(function(UI2) {
|
|
3057
|
+
UI2["Root"] = "root";
|
|
3058
|
+
UI2["Chevron"] = "chevron";
|
|
3059
|
+
UI2["Day"] = "day";
|
|
3060
|
+
UI2["DayButton"] = "day_button";
|
|
3061
|
+
UI2["CaptionLabel"] = "caption_label";
|
|
3062
|
+
UI2["Dropdowns"] = "dropdowns";
|
|
3063
|
+
UI2["Dropdown"] = "dropdown";
|
|
3064
|
+
UI2["DropdownRoot"] = "dropdown_root";
|
|
3065
|
+
UI2["Footer"] = "footer";
|
|
3066
|
+
UI2["MonthGrid"] = "month_grid";
|
|
3067
|
+
UI2["MonthCaption"] = "month_caption";
|
|
3068
|
+
UI2["MonthsDropdown"] = "months_dropdown";
|
|
3069
|
+
UI2["Month"] = "month";
|
|
3070
|
+
UI2["Months"] = "months";
|
|
3071
|
+
UI2["Nav"] = "nav";
|
|
3072
|
+
UI2["NextMonthButton"] = "button_next";
|
|
3073
|
+
UI2["PreviousMonthButton"] = "button_previous";
|
|
3074
|
+
UI2["Week"] = "week";
|
|
3075
|
+
UI2["Weeks"] = "weeks";
|
|
3076
|
+
UI2["Weekday"] = "weekday";
|
|
3077
|
+
UI2["Weekdays"] = "weekdays";
|
|
3078
|
+
UI2["WeekNumber"] = "week_number";
|
|
3079
|
+
UI2["WeekNumberHeader"] = "week_number_header";
|
|
3080
|
+
UI2["YearsDropdown"] = "years_dropdown";
|
|
3081
|
+
})(UI || (UI = {}));
|
|
3082
|
+
var DayFlag;
|
|
3083
|
+
(function(DayFlag2) {
|
|
3084
|
+
DayFlag2["disabled"] = "disabled";
|
|
3085
|
+
DayFlag2["hidden"] = "hidden";
|
|
3086
|
+
DayFlag2["outside"] = "outside";
|
|
3087
|
+
DayFlag2["focused"] = "focused";
|
|
3088
|
+
DayFlag2["today"] = "today";
|
|
3089
|
+
})(DayFlag || (DayFlag = {}));
|
|
3090
|
+
var SelectionState;
|
|
3091
|
+
(function(SelectionState2) {
|
|
3092
|
+
SelectionState2["range_end"] = "range_end";
|
|
3093
|
+
SelectionState2["range_middle"] = "range_middle";
|
|
3094
|
+
SelectionState2["range_start"] = "range_start";
|
|
3095
|
+
SelectionState2["selected"] = "selected";
|
|
3096
|
+
})(SelectionState || (SelectionState = {}));
|
|
3097
|
+
var Animation;
|
|
3098
|
+
(function(Animation2) {
|
|
3099
|
+
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
3100
|
+
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
3101
|
+
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
3102
|
+
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
3103
|
+
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
3104
|
+
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
3105
|
+
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
3106
|
+
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
3107
|
+
})(Animation || (Animation = {}));
|
|
3108
|
+
|
|
3109
|
+
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
3067
3110
|
function Dropdown(props) {
|
|
3068
3111
|
const _a = props, { options, className, components, classNames } = _a, selectProps = __objRest(_a, ["options", "className", "components", "classNames"]);
|
|
3069
3112
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
@@ -3245,11 +3288,183 @@ function Weeks(props) {
|
|
|
3245
3288
|
return import_react26.default.createElement("tbody", __spreadValues({}, props));
|
|
3246
3289
|
}
|
|
3247
3290
|
|
|
3248
|
-
// node_modules/react-day-picker/dist/esm/components/YearsDropdown.js
|
|
3249
|
-
var import_react27 = __toESM(require("react"), 1);
|
|
3250
|
-
function YearsDropdown(props) {
|
|
3251
|
-
const { components } = useDayPicker();
|
|
3252
|
-
return import_react27.default.createElement(components.Dropdown, __spreadValues({}, props));
|
|
3291
|
+
// node_modules/react-day-picker/dist/esm/components/YearsDropdown.js
|
|
3292
|
+
var import_react27 = __toESM(require("react"), 1);
|
|
3293
|
+
function YearsDropdown(props) {
|
|
3294
|
+
const { components } = useDayPicker();
|
|
3295
|
+
return import_react27.default.createElement(components.Dropdown, __spreadValues({}, props));
|
|
3296
|
+
}
|
|
3297
|
+
|
|
3298
|
+
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
3299
|
+
var import_react32 = __toESM(require("react"), 1);
|
|
3300
|
+
|
|
3301
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3302
|
+
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
3303
|
+
let { from, to } = range;
|
|
3304
|
+
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
3305
|
+
if (from && to) {
|
|
3306
|
+
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
3307
|
+
if (isRangeInverted) {
|
|
3308
|
+
[from, to] = [to, from];
|
|
3309
|
+
}
|
|
3310
|
+
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
3311
|
+
return isInRange;
|
|
3312
|
+
}
|
|
3313
|
+
if (!excludeEnds && to) {
|
|
3314
|
+
return isSameDay2(to, date);
|
|
3315
|
+
}
|
|
3316
|
+
if (!excludeEnds && from) {
|
|
3317
|
+
return isSameDay2(from, date);
|
|
3318
|
+
}
|
|
3319
|
+
return false;
|
|
3320
|
+
}
|
|
3321
|
+
|
|
3322
|
+
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
3323
|
+
function isDateInterval(matcher) {
|
|
3324
|
+
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
3325
|
+
}
|
|
3326
|
+
function isDateRange(value) {
|
|
3327
|
+
return Boolean(value && typeof value === "object" && "from" in value);
|
|
3328
|
+
}
|
|
3329
|
+
function isDateAfterType(value) {
|
|
3330
|
+
return Boolean(value && typeof value === "object" && "after" in value);
|
|
3331
|
+
}
|
|
3332
|
+
function isDateBeforeType(value) {
|
|
3333
|
+
return Boolean(value && typeof value === "object" && "before" in value);
|
|
3334
|
+
}
|
|
3335
|
+
function isDayOfWeekType(value) {
|
|
3336
|
+
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
3337
|
+
}
|
|
3338
|
+
function isDatesArray(value, dateLib) {
|
|
3339
|
+
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
3343
|
+
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
3344
|
+
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
3345
|
+
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
3346
|
+
return matchersArr.some((matcher) => {
|
|
3347
|
+
if (typeof matcher === "boolean") {
|
|
3348
|
+
return matcher;
|
|
3349
|
+
}
|
|
3350
|
+
if (dateLib.isDate(matcher)) {
|
|
3351
|
+
return isSameDay2(date, matcher);
|
|
3352
|
+
}
|
|
3353
|
+
if (isDatesArray(matcher, dateLib)) {
|
|
3354
|
+
return matcher.includes(date);
|
|
3355
|
+
}
|
|
3356
|
+
if (isDateRange(matcher)) {
|
|
3357
|
+
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
3358
|
+
}
|
|
3359
|
+
if (isDayOfWeekType(matcher)) {
|
|
3360
|
+
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
3361
|
+
return matcher.dayOfWeek === date.getDay();
|
|
3362
|
+
}
|
|
3363
|
+
return matcher.dayOfWeek.includes(date.getDay());
|
|
3364
|
+
}
|
|
3365
|
+
if (isDateInterval(matcher)) {
|
|
3366
|
+
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
3367
|
+
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
3368
|
+
const isDayBefore = diffBefore > 0;
|
|
3369
|
+
const isDayAfter = diffAfter < 0;
|
|
3370
|
+
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
3371
|
+
if (isClosedInterval) {
|
|
3372
|
+
return isDayAfter && isDayBefore;
|
|
3373
|
+
} else {
|
|
3374
|
+
return isDayBefore || isDayAfter;
|
|
3375
|
+
}
|
|
3376
|
+
}
|
|
3377
|
+
if (isDateAfterType(matcher)) {
|
|
3378
|
+
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
3379
|
+
}
|
|
3380
|
+
if (isDateBeforeType(matcher)) {
|
|
3381
|
+
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
3382
|
+
}
|
|
3383
|
+
if (typeof matcher === "function") {
|
|
3384
|
+
return matcher(date);
|
|
3385
|
+
}
|
|
3386
|
+
return false;
|
|
3387
|
+
});
|
|
3388
|
+
}
|
|
3389
|
+
|
|
3390
|
+
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3391
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3392
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3393
|
+
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3394
|
+
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3395
|
+
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
3396
|
+
const internalModifiersMap = {
|
|
3397
|
+
[DayFlag.focused]: [],
|
|
3398
|
+
[DayFlag.outside]: [],
|
|
3399
|
+
[DayFlag.disabled]: [],
|
|
3400
|
+
[DayFlag.hidden]: [],
|
|
3401
|
+
[DayFlag.today]: []
|
|
3402
|
+
};
|
|
3403
|
+
const customModifiersMap = {};
|
|
3404
|
+
for (const day of days) {
|
|
3405
|
+
const { date, displayMonth } = day;
|
|
3406
|
+
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
3407
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore2(date, computedNavStart));
|
|
3408
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter2(date, computedNavEnd));
|
|
3409
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3410
|
+
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
3411
|
+
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3412
|
+
const isToday = isSameDay2(date, today != null ? today : dateLib.today());
|
|
3413
|
+
if (isOutside)
|
|
3414
|
+
internalModifiersMap.outside.push(day);
|
|
3415
|
+
if (isDisabled)
|
|
3416
|
+
internalModifiersMap.disabled.push(day);
|
|
3417
|
+
if (isHidden)
|
|
3418
|
+
internalModifiersMap.hidden.push(day);
|
|
3419
|
+
if (isToday)
|
|
3420
|
+
internalModifiersMap.today.push(day);
|
|
3421
|
+
if (modifiers) {
|
|
3422
|
+
Object.keys(modifiers).forEach((name) => {
|
|
3423
|
+
const modifierValue = modifiers == null ? void 0 : modifiers[name];
|
|
3424
|
+
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
3425
|
+
if (!isMatch)
|
|
3426
|
+
return;
|
|
3427
|
+
if (customModifiersMap[name]) {
|
|
3428
|
+
customModifiersMap[name].push(day);
|
|
3429
|
+
} else {
|
|
3430
|
+
customModifiersMap[name] = [day];
|
|
3431
|
+
}
|
|
3432
|
+
});
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
return (day) => {
|
|
3436
|
+
const dayFlags = {
|
|
3437
|
+
[DayFlag.focused]: false,
|
|
3438
|
+
[DayFlag.disabled]: false,
|
|
3439
|
+
[DayFlag.hidden]: false,
|
|
3440
|
+
[DayFlag.outside]: false,
|
|
3441
|
+
[DayFlag.today]: false
|
|
3442
|
+
};
|
|
3443
|
+
const customModifiers = {};
|
|
3444
|
+
for (const name in internalModifiersMap) {
|
|
3445
|
+
const days2 = internalModifiersMap[name];
|
|
3446
|
+
dayFlags[name] = days2.some((d) => d === day);
|
|
3447
|
+
}
|
|
3448
|
+
for (const name in customModifiersMap) {
|
|
3449
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
3450
|
+
}
|
|
3451
|
+
return __spreadValues(__spreadValues({}, dayFlags), customModifiers);
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
// node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js
|
|
3456
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
3457
|
+
const modifierClassNames = Object.entries(modifiers).filter(([, active]) => active === true).reduce((previousValue, [key]) => {
|
|
3458
|
+
if (modifiersClassNames[key]) {
|
|
3459
|
+
previousValue.push(modifiersClassNames[key]);
|
|
3460
|
+
} else if (classNames[DayFlag[key]]) {
|
|
3461
|
+
previousValue.push(classNames[DayFlag[key]]);
|
|
3462
|
+
} else if (classNames[SelectionState[key]]) {
|
|
3463
|
+
previousValue.push(classNames[SelectionState[key]]);
|
|
3464
|
+
}
|
|
3465
|
+
return previousValue;
|
|
3466
|
+
}, [classNames[UI.Day]]);
|
|
3467
|
+
return modifierClassNames;
|
|
3253
3468
|
}
|
|
3254
3469
|
|
|
3255
3470
|
// node_modules/react-day-picker/dist/esm/helpers/getComponents.js
|
|
@@ -3265,7 +3480,8 @@ function getDataAttributes(props) {
|
|
|
3265
3480
|
"data-required": "required" in props ? props.required : void 0,
|
|
3266
3481
|
"data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
|
|
3267
3482
|
"data-week-numbers": props.showWeekNumber || void 0,
|
|
3268
|
-
"data-broadcast-calendar": props.broadcastCalendar || void 0
|
|
3483
|
+
"data-broadcast-calendar": props.broadcastCalendar || void 0,
|
|
3484
|
+
"data-nav-layout": props.navLayout || void 0
|
|
3269
3485
|
};
|
|
3270
3486
|
Object.entries(props).forEach(([key, val]) => {
|
|
3271
3487
|
if (key.startsWith("data-")) {
|
|
@@ -3323,12 +3539,17 @@ function formatMonthDropdown(month, dateLib = defaultDateLib) {
|
|
|
3323
3539
|
return dateLib.format(month, "LLLL");
|
|
3324
3540
|
}
|
|
3325
3541
|
|
|
3542
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
3543
|
+
function formatWeekdayName(weekday, options, dateLib) {
|
|
3544
|
+
return (dateLib != null ? dateLib : new DateLib(options)).format(weekday, "cccccc");
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3326
3547
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
|
|
3327
|
-
function formatWeekNumber(weekNumber) {
|
|
3548
|
+
function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
|
|
3328
3549
|
if (weekNumber < 10) {
|
|
3329
|
-
return `0${weekNumber.toLocaleString()}
|
|
3550
|
+
return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
|
|
3330
3551
|
}
|
|
3331
|
-
return `${weekNumber.toLocaleString()}
|
|
3552
|
+
return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
|
|
3332
3553
|
}
|
|
3333
3554
|
|
|
3334
3555
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
|
|
@@ -3336,11 +3557,6 @@ function formatWeekNumberHeader() {
|
|
|
3336
3557
|
return ``;
|
|
3337
3558
|
}
|
|
3338
3559
|
|
|
3339
|
-
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
3340
|
-
function formatWeekdayName(weekday, options, dateLib) {
|
|
3341
|
-
return (dateLib != null ? dateLib : new DateLib(options)).format(weekday, "cccccc");
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
3560
|
// node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
|
|
3345
3561
|
function formatYearDropdown(year, dateLib = defaultDateLib) {
|
|
3346
3562
|
return dateLib.format(year, "yyyy");
|
|
@@ -3396,7 +3612,7 @@ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
|
3396
3612
|
}
|
|
3397
3613
|
|
|
3398
3614
|
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3399
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
3615
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3400
3616
|
if (!navStart)
|
|
3401
3617
|
return void 0;
|
|
3402
3618
|
if (!navEnd)
|
|
@@ -3410,6 +3626,8 @@ function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
|
3410
3626
|
years.push(year);
|
|
3411
3627
|
year = addYears2(year, 1);
|
|
3412
3628
|
}
|
|
3629
|
+
if (reverse)
|
|
3630
|
+
years.reverse();
|
|
3413
3631
|
return years.map((year2) => {
|
|
3414
3632
|
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3415
3633
|
return {
|
|
@@ -3438,6 +3656,17 @@ __export(labels_exports, {
|
|
|
3438
3656
|
labelYearDropdown: () => labelYearDropdown
|
|
3439
3657
|
});
|
|
3440
3658
|
|
|
3659
|
+
// node_modules/react-day-picker/dist/esm/labels/labelDayButton.js
|
|
3660
|
+
function labelDayButton(date, modifiers, options, dateLib) {
|
|
3661
|
+
let label = (dateLib != null ? dateLib : new DateLib(options)).format(date, "PPPP");
|
|
3662
|
+
if (modifiers.today)
|
|
3663
|
+
label = `Today, ${label}`;
|
|
3664
|
+
if (modifiers.selected)
|
|
3665
|
+
label = `${label}, selected`;
|
|
3666
|
+
return label;
|
|
3667
|
+
}
|
|
3668
|
+
var labelDay = labelDayButton;
|
|
3669
|
+
|
|
3441
3670
|
// node_modules/react-day-picker/dist/esm/labels/labelGrid.js
|
|
3442
3671
|
function labelGrid(date, options, dateLib) {
|
|
3443
3672
|
return (dateLib != null ? dateLib : new DateLib(options)).format(date, "LLLL y");
|
|
@@ -3453,34 +3682,23 @@ function labelGridcell(date, modifiers, options, dateLib) {
|
|
|
3453
3682
|
return label;
|
|
3454
3683
|
}
|
|
3455
3684
|
|
|
3456
|
-
// node_modules/react-day-picker/dist/esm/labels/
|
|
3457
|
-
function
|
|
3458
|
-
|
|
3459
|
-
if (modifiers.today)
|
|
3460
|
-
label = `Today, ${label}`;
|
|
3461
|
-
if (modifiers.selected)
|
|
3462
|
-
label = `${label}, selected`;
|
|
3463
|
-
return label;
|
|
3685
|
+
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3686
|
+
function labelMonthDropdown(_options) {
|
|
3687
|
+
return "Choose the Month";
|
|
3464
3688
|
}
|
|
3465
|
-
var labelDay = labelDayButton;
|
|
3466
3689
|
|
|
3467
3690
|
// node_modules/react-day-picker/dist/esm/labels/labelNav.js
|
|
3468
3691
|
function labelNav() {
|
|
3469
3692
|
return "";
|
|
3470
3693
|
}
|
|
3471
3694
|
|
|
3472
|
-
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3473
|
-
function labelMonthDropdown(options) {
|
|
3474
|
-
return "Choose the Month";
|
|
3475
|
-
}
|
|
3476
|
-
|
|
3477
3695
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3478
|
-
function labelNext(
|
|
3696
|
+
function labelNext(_month) {
|
|
3479
3697
|
return "Go to the Next Month";
|
|
3480
3698
|
}
|
|
3481
3699
|
|
|
3482
3700
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
3483
|
-
function labelPrevious(
|
|
3701
|
+
function labelPrevious(_month) {
|
|
3484
3702
|
return "Go to the Previous Month";
|
|
3485
3703
|
}
|
|
3486
3704
|
|
|
@@ -3490,17 +3708,17 @@ function labelWeekday(date, options, dateLib) {
|
|
|
3490
3708
|
}
|
|
3491
3709
|
|
|
3492
3710
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
|
|
3493
|
-
function labelWeekNumber(weekNumber,
|
|
3711
|
+
function labelWeekNumber(weekNumber, _options) {
|
|
3494
3712
|
return `Week ${weekNumber}`;
|
|
3495
3713
|
}
|
|
3496
3714
|
|
|
3497
3715
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
|
|
3498
|
-
function labelWeekNumberHeader(
|
|
3716
|
+
function labelWeekNumberHeader(_options) {
|
|
3499
3717
|
return "Week Number";
|
|
3500
3718
|
}
|
|
3501
3719
|
|
|
3502
3720
|
// node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
|
|
3503
|
-
function labelYearDropdown(
|
|
3721
|
+
function labelYearDropdown(_options) {
|
|
3504
3722
|
return "Choose the Year";
|
|
3505
3723
|
}
|
|
3506
3724
|
|
|
@@ -3568,7 +3786,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
3568
3786
|
}
|
|
3569
3787
|
const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
|
|
3570
3788
|
const currentMonthEls = queryMonthEls(rootElRef.current);
|
|
3571
|
-
if (currentMonthEls
|
|
3789
|
+
if ((currentMonthEls == null ? void 0 : currentMonthEls.every((el) => el instanceof HTMLElement)) && previousMonthEls && previousMonthEls.every((el) => el instanceof HTMLElement)) {
|
|
3572
3790
|
animatingRef.current = true;
|
|
3573
3791
|
const cleanUpFunctions = [];
|
|
3574
3792
|
rootElRef.current.style.isolation = "isolate";
|
|
@@ -3645,7 +3863,7 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3645
3863
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3646
3864
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3647
3865
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3648
|
-
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth
|
|
3866
|
+
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
3649
3867
|
const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
|
|
3650
3868
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3651
3869
|
const dates = [];
|
|
@@ -3672,12 +3890,11 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3672
3890
|
function getDays(calendarMonths) {
|
|
3673
3891
|
const initialDays = [];
|
|
3674
3892
|
return calendarMonths.reduce((days, month) => {
|
|
3675
|
-
const initialDays2 = [];
|
|
3676
3893
|
const weekDays = month.weeks.reduce((weekDays2, week) => {
|
|
3677
|
-
return
|
|
3678
|
-
},
|
|
3679
|
-
return
|
|
3680
|
-
}, initialDays);
|
|
3894
|
+
return weekDays2.concat(week.days.slice());
|
|
3895
|
+
}, initialDays.slice());
|
|
3896
|
+
return days.concat(weekDays.slice());
|
|
3897
|
+
}, initialDays.slice());
|
|
3681
3898
|
}
|
|
3682
3899
|
|
|
3683
3900
|
// node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
|
|
@@ -3695,60 +3912,26 @@ function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib)
|
|
|
3695
3912
|
}
|
|
3696
3913
|
|
|
3697
3914
|
// node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
|
|
3698
|
-
function getInitialMonth(props, dateLib) {
|
|
3699
|
-
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1
|
|
3915
|
+
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
3916
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1 } = props;
|
|
3700
3917
|
let initialMonth = month || defaultMonth || today;
|
|
3701
3918
|
const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths2, startOfMonth: startOfMonth2 } = dateLib;
|
|
3702
|
-
if (
|
|
3919
|
+
if (navEnd && differenceInCalendarMonths2(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
3703
3920
|
const offset = -1 * (numberOfMonths - 1);
|
|
3704
|
-
initialMonth = addMonths2(
|
|
3921
|
+
initialMonth = addMonths2(navEnd, offset);
|
|
3705
3922
|
}
|
|
3706
|
-
if (
|
|
3707
|
-
initialMonth =
|
|
3923
|
+
if (navStart && differenceInCalendarMonths2(initialMonth, navStart) < 0) {
|
|
3924
|
+
initialMonth = navStart;
|
|
3708
3925
|
}
|
|
3709
|
-
initialMonth = timeZone ? new TZDate(initialMonth, timeZone) : initialMonth;
|
|
3710
3926
|
return startOfMonth2(initialMonth);
|
|
3711
3927
|
}
|
|
3712
3928
|
|
|
3713
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
3714
|
-
var CalendarDay = class {
|
|
3715
|
-
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
3716
|
-
this.date = date;
|
|
3717
|
-
this.displayMonth = displayMonth;
|
|
3718
|
-
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
3719
|
-
this.dateLib = dateLib;
|
|
3720
|
-
}
|
|
3721
|
-
/**
|
|
3722
|
-
* Check if the day is the same as the given day: considering if it is in the
|
|
3723
|
-
* same display month.
|
|
3724
|
-
*/
|
|
3725
|
-
isEqualTo(day) {
|
|
3726
|
-
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
3727
|
-
}
|
|
3728
|
-
};
|
|
3729
|
-
|
|
3730
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
3731
|
-
var CalendarMonth = class {
|
|
3732
|
-
constructor(month, weeks) {
|
|
3733
|
-
this.date = month;
|
|
3734
|
-
this.weeks = weeks;
|
|
3735
|
-
}
|
|
3736
|
-
};
|
|
3737
|
-
|
|
3738
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
3739
|
-
var CalendarWeek = class {
|
|
3740
|
-
constructor(weekNumber, days) {
|
|
3741
|
-
this.days = days;
|
|
3742
|
-
this.weekNumber = weekNumber;
|
|
3743
|
-
}
|
|
3744
|
-
};
|
|
3745
|
-
|
|
3746
3929
|
// node_modules/react-day-picker/dist/esm/helpers/getMonths.js
|
|
3747
3930
|
function getMonths(displayMonths, dates, props, dateLib) {
|
|
3748
3931
|
const { addDays: addDays2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3749
3932
|
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
3750
3933
|
const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek2(month);
|
|
3751
|
-
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month
|
|
3934
|
+
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth2(month)) : endOfWeek2(endOfMonth2(month));
|
|
3752
3935
|
const monthDates = dates.filter((date) => {
|
|
3753
3936
|
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
3754
3937
|
});
|
|
@@ -3863,8 +4046,8 @@ function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, date
|
|
|
3863
4046
|
function getWeeks(months) {
|
|
3864
4047
|
const initialWeeks = [];
|
|
3865
4048
|
return months.reduce((weeks, month) => {
|
|
3866
|
-
return
|
|
3867
|
-
}, initialWeeks);
|
|
4049
|
+
return weeks.concat(month.weeks.slice());
|
|
4050
|
+
}, initialWeeks.slice());
|
|
3868
4051
|
}
|
|
3869
4052
|
|
|
3870
4053
|
// node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js
|
|
@@ -3879,14 +4062,14 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
3879
4062
|
function useCalendar(props, dateLib) {
|
|
3880
4063
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
3881
4064
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
3882
|
-
const initialMonth = getInitialMonth(props, dateLib);
|
|
4065
|
+
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3883
4066
|
const [firstMonth, setFirstMonth] = useControlledValue(
|
|
3884
4067
|
initialMonth,
|
|
3885
4068
|
// initialMonth is always computed from props.month if provided
|
|
3886
4069
|
props.month ? initialMonth : void 0
|
|
3887
4070
|
);
|
|
3888
4071
|
(0, import_react30.useEffect)(() => {
|
|
3889
|
-
const newInitialMonth = getInitialMonth(props, dateLib);
|
|
4072
|
+
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3890
4073
|
setFirstMonth(newInitialMonth);
|
|
3891
4074
|
}, [props.timeZone]);
|
|
3892
4075
|
const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);
|
|
@@ -3973,95 +4156,6 @@ function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
|
3973
4156
|
return focusTarget;
|
|
3974
4157
|
}
|
|
3975
4158
|
|
|
3976
|
-
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3977
|
-
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
3978
|
-
let { from, to } = range;
|
|
3979
|
-
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
3980
|
-
if (from && to) {
|
|
3981
|
-
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
3982
|
-
if (isRangeInverted) {
|
|
3983
|
-
[from, to] = [to, from];
|
|
3984
|
-
}
|
|
3985
|
-
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
3986
|
-
return isInRange;
|
|
3987
|
-
}
|
|
3988
|
-
if (!excludeEnds && to) {
|
|
3989
|
-
return isSameDay2(to, date);
|
|
3990
|
-
}
|
|
3991
|
-
if (!excludeEnds && from) {
|
|
3992
|
-
return isSameDay2(from, date);
|
|
3993
|
-
}
|
|
3994
|
-
return false;
|
|
3995
|
-
}
|
|
3996
|
-
|
|
3997
|
-
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
3998
|
-
function isDateInterval(matcher) {
|
|
3999
|
-
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
4000
|
-
}
|
|
4001
|
-
function isDateRange(value) {
|
|
4002
|
-
return Boolean(value && typeof value === "object" && "from" in value);
|
|
4003
|
-
}
|
|
4004
|
-
function isDateAfterType(value) {
|
|
4005
|
-
return Boolean(value && typeof value === "object" && "after" in value);
|
|
4006
|
-
}
|
|
4007
|
-
function isDateBeforeType(value) {
|
|
4008
|
-
return Boolean(value && typeof value === "object" && "before" in value);
|
|
4009
|
-
}
|
|
4010
|
-
function isDayOfWeekType(value) {
|
|
4011
|
-
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
4012
|
-
}
|
|
4013
|
-
function isDatesArray(value, dateLib) {
|
|
4014
|
-
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
4015
|
-
}
|
|
4016
|
-
|
|
4017
|
-
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
4018
|
-
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
4019
|
-
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
4020
|
-
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
4021
|
-
return matchersArr.some((matcher) => {
|
|
4022
|
-
if (typeof matcher === "boolean") {
|
|
4023
|
-
return matcher;
|
|
4024
|
-
}
|
|
4025
|
-
if (dateLib.isDate(matcher)) {
|
|
4026
|
-
return isSameDay2(date, matcher);
|
|
4027
|
-
}
|
|
4028
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
4029
|
-
return matcher.includes(date);
|
|
4030
|
-
}
|
|
4031
|
-
if (isDateRange(matcher)) {
|
|
4032
|
-
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
4033
|
-
}
|
|
4034
|
-
if (isDayOfWeekType(matcher)) {
|
|
4035
|
-
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
4036
|
-
return matcher.dayOfWeek === date.getDay();
|
|
4037
|
-
}
|
|
4038
|
-
return matcher.dayOfWeek.includes(date.getDay());
|
|
4039
|
-
}
|
|
4040
|
-
if (isDateInterval(matcher)) {
|
|
4041
|
-
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
4042
|
-
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
4043
|
-
const isDayBefore = diffBefore > 0;
|
|
4044
|
-
const isDayAfter = diffAfter < 0;
|
|
4045
|
-
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
4046
|
-
if (isClosedInterval) {
|
|
4047
|
-
return isDayAfter && isDayBefore;
|
|
4048
|
-
} else {
|
|
4049
|
-
return isDayBefore || isDayAfter;
|
|
4050
|
-
}
|
|
4051
|
-
}
|
|
4052
|
-
if (isDateAfterType(matcher)) {
|
|
4053
|
-
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
4054
|
-
}
|
|
4055
|
-
if (isDateBeforeType(matcher)) {
|
|
4056
|
-
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
4057
|
-
}
|
|
4058
|
-
if (typeof matcher === "function") {
|
|
4059
|
-
return matcher(date);
|
|
4060
|
-
}
|
|
4061
|
-
return false;
|
|
4062
|
-
});
|
|
4063
|
-
}
|
|
4064
|
-
|
|
4065
4159
|
// node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
|
|
4066
4160
|
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
4067
4161
|
const { ISOWeek, broadcastCalendar } = props;
|
|
@@ -4072,7 +4166,7 @@ function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dat
|
|
|
4072
4166
|
month: addMonths2,
|
|
4073
4167
|
year: addYears2,
|
|
4074
4168
|
startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek2(date),
|
|
4075
|
-
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date
|
|
4169
|
+
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek2(date)
|
|
4076
4170
|
};
|
|
4077
4171
|
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
4078
4172
|
if (moveDir === "before" && navStart) {
|
|
@@ -4088,16 +4182,7 @@ function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMo
|
|
|
4088
4182
|
if (attempt > 365) {
|
|
4089
4183
|
return void 0;
|
|
4090
4184
|
}
|
|
4091
|
-
const focusableDate = getFocusableDate(
|
|
4092
|
-
moveBy,
|
|
4093
|
-
moveDir,
|
|
4094
|
-
refDay.date,
|
|
4095
|
-
// should be refDay? or refDay.date?
|
|
4096
|
-
calendarStartMonth,
|
|
4097
|
-
calendarEndMonth,
|
|
4098
|
-
props,
|
|
4099
|
-
dateLib
|
|
4100
|
-
);
|
|
4185
|
+
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
4101
4186
|
const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
4102
4187
|
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
4103
4188
|
const targetMonth = focusableDate;
|
|
@@ -4140,71 +4225,6 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
4140
4225
|
return useFocus2;
|
|
4141
4226
|
}
|
|
4142
4227
|
|
|
4143
|
-
// node_modules/react-day-picker/dist/esm/useGetModifiers.js
|
|
4144
|
-
function useGetModifiers(days, props, dateLib) {
|
|
4145
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
4146
|
-
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
4147
|
-
const startMonth = props.startMonth && startOfMonth2(props.startMonth);
|
|
4148
|
-
const endMonth = props.endMonth && endOfMonth2(props.endMonth);
|
|
4149
|
-
const internalModifiersMap = {
|
|
4150
|
-
[DayFlag.focused]: [],
|
|
4151
|
-
[DayFlag.outside]: [],
|
|
4152
|
-
[DayFlag.disabled]: [],
|
|
4153
|
-
[DayFlag.hidden]: [],
|
|
4154
|
-
[DayFlag.today]: []
|
|
4155
|
-
};
|
|
4156
|
-
const customModifiersMap = {};
|
|
4157
|
-
for (const day of days) {
|
|
4158
|
-
const { date, displayMonth } = day;
|
|
4159
|
-
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
4160
|
-
const isBeforeStartMonth = Boolean(startMonth && isBefore2(date, startMonth));
|
|
4161
|
-
const isAfterEndMonth = Boolean(endMonth && isAfter2(date, endMonth));
|
|
4162
|
-
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
4163
|
-
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeStartMonth || isAfterEndMonth || // Broadcast calendar will show outside days as default
|
|
4164
|
-
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
4165
|
-
const isToday = isSameDay2(date, today != null ? today : dateLib.today());
|
|
4166
|
-
if (isOutside)
|
|
4167
|
-
internalModifiersMap.outside.push(day);
|
|
4168
|
-
if (isDisabled)
|
|
4169
|
-
internalModifiersMap.disabled.push(day);
|
|
4170
|
-
if (isHidden)
|
|
4171
|
-
internalModifiersMap.hidden.push(day);
|
|
4172
|
-
if (isToday)
|
|
4173
|
-
internalModifiersMap.today.push(day);
|
|
4174
|
-
if (modifiers) {
|
|
4175
|
-
Object.keys(modifiers).forEach((name) => {
|
|
4176
|
-
const modifierValue = modifiers == null ? void 0 : modifiers[name];
|
|
4177
|
-
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
4178
|
-
if (!isMatch)
|
|
4179
|
-
return;
|
|
4180
|
-
if (customModifiersMap[name]) {
|
|
4181
|
-
customModifiersMap[name].push(day);
|
|
4182
|
-
} else {
|
|
4183
|
-
customModifiersMap[name] = [day];
|
|
4184
|
-
}
|
|
4185
|
-
});
|
|
4186
|
-
}
|
|
4187
|
-
}
|
|
4188
|
-
return (day) => {
|
|
4189
|
-
const dayFlags = {
|
|
4190
|
-
[DayFlag.focused]: false,
|
|
4191
|
-
[DayFlag.disabled]: false,
|
|
4192
|
-
[DayFlag.hidden]: false,
|
|
4193
|
-
[DayFlag.outside]: false,
|
|
4194
|
-
[DayFlag.today]: false
|
|
4195
|
-
};
|
|
4196
|
-
const customModifiers = {};
|
|
4197
|
-
for (const name in internalModifiersMap) {
|
|
4198
|
-
const days2 = internalModifiersMap[name];
|
|
4199
|
-
dayFlags[name] = days2.some((d) => d === day);
|
|
4200
|
-
}
|
|
4201
|
-
for (const name in customModifiersMap) {
|
|
4202
|
-
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
4203
|
-
}
|
|
4204
|
-
return __spreadValues(__spreadValues({}, dayFlags), customModifiers);
|
|
4205
|
-
};
|
|
4206
|
-
}
|
|
4207
|
-
|
|
4208
4228
|
// node_modules/react-day-picker/dist/esm/selection/useMulti.js
|
|
4209
4229
|
function useMulti(props, dateLib) {
|
|
4210
4230
|
const { selected: initiallySelected, required, onSelect } = props;
|
|
@@ -4255,7 +4275,9 @@ function addToRange(date, initialRange, min2 = 0, max2 = 0, required = false, da
|
|
|
4255
4275
|
range = { from: date, to: min2 > 0 ? void 0 : date };
|
|
4256
4276
|
} else if (from && !to) {
|
|
4257
4277
|
if (isSameDay2(from, date)) {
|
|
4258
|
-
if (
|
|
4278
|
+
if (min2 === 0) {
|
|
4279
|
+
range = { from, to: date };
|
|
4280
|
+
} else if (required) {
|
|
4259
4281
|
range = { from, to: void 0 };
|
|
4260
4282
|
} else {
|
|
4261
4283
|
range = void 0;
|
|
@@ -4448,8 +4470,37 @@ function useSelection(props, dateLib) {
|
|
|
4448
4470
|
}
|
|
4449
4471
|
|
|
4450
4472
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4451
|
-
function DayPicker(
|
|
4452
|
-
var _a;
|
|
4473
|
+
function DayPicker(initialProps) {
|
|
4474
|
+
var _a, _b;
|
|
4475
|
+
let props = initialProps;
|
|
4476
|
+
if (props.timeZone) {
|
|
4477
|
+
props = __spreadValues({}, initialProps);
|
|
4478
|
+
if (props.today) {
|
|
4479
|
+
props.today = new TZDate(props.today, props.timeZone);
|
|
4480
|
+
}
|
|
4481
|
+
if (props.month) {
|
|
4482
|
+
props.month = new TZDate(props.month, props.timeZone);
|
|
4483
|
+
}
|
|
4484
|
+
if (props.defaultMonth) {
|
|
4485
|
+
props.defaultMonth = new TZDate(props.defaultMonth, props.timeZone);
|
|
4486
|
+
}
|
|
4487
|
+
if (props.startMonth) {
|
|
4488
|
+
props.startMonth = new TZDate(props.startMonth, props.timeZone);
|
|
4489
|
+
}
|
|
4490
|
+
if (props.endMonth) {
|
|
4491
|
+
props.endMonth = new TZDate(props.endMonth, props.timeZone);
|
|
4492
|
+
}
|
|
4493
|
+
if (props.mode === "single" && props.selected) {
|
|
4494
|
+
props.selected = new TZDate(props.selected, props.timeZone);
|
|
4495
|
+
} else if (props.mode === "multiple" && props.selected) {
|
|
4496
|
+
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) => new TZDate(date, props.timeZone));
|
|
4497
|
+
} else if (props.mode === "range" && props.selected) {
|
|
4498
|
+
props.selected = {
|
|
4499
|
+
from: props.selected.from ? new TZDate(props.selected.from, props.timeZone) : void 0,
|
|
4500
|
+
to: props.selected.to ? new TZDate(props.selected.to, props.timeZone) : void 0
|
|
4501
|
+
};
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4453
4504
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react32.useMemo)(() => {
|
|
4454
4505
|
const locale2 = __spreadValues(__spreadValues({}, enUS), props.locale);
|
|
4455
4506
|
const dateLib2 = new DateLib({
|
|
@@ -4484,14 +4535,14 @@ function DayPicker(props) {
|
|
|
4484
4535
|
props.labels,
|
|
4485
4536
|
props.classNames
|
|
4486
4537
|
]);
|
|
4487
|
-
const { captionLayout, mode, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4538
|
+
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4488
4539
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4489
4540
|
const calendar = useCalendar(props, dateLib);
|
|
4490
4541
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4491
|
-
const getModifiers =
|
|
4492
|
-
const { isSelected, select, selected: selectedValue } = (
|
|
4542
|
+
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
4543
|
+
const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
|
|
4493
4544
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4494
|
-
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4545
|
+
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4495
4546
|
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
4496
4547
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4497
4548
|
const handlePreviousClick = (0, import_react32.useCallback)(() => {
|
|
@@ -4523,10 +4574,16 @@ function DayPicker(props) {
|
|
|
4523
4574
|
}, [blur, onDayBlur]);
|
|
4524
4575
|
const handleDayKeyDown = (0, import_react32.useCallback)((day, modifiers) => (e) => {
|
|
4525
4576
|
const keyMap = {
|
|
4526
|
-
ArrowLeft: [
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4577
|
+
ArrowLeft: [
|
|
4578
|
+
e.shiftKey ? "month" : "day",
|
|
4579
|
+
props.dir === "rtl" ? "after" : "before"
|
|
4580
|
+
],
|
|
4581
|
+
ArrowRight: [
|
|
4582
|
+
e.shiftKey ? "month" : "day",
|
|
4583
|
+
props.dir === "rtl" ? "before" : "after"
|
|
4584
|
+
],
|
|
4585
|
+
ArrowDown: [e.shiftKey ? "year" : "week", "after"],
|
|
4586
|
+
ArrowUp: [e.shiftKey ? "year" : "week", "before"],
|
|
4530
4587
|
PageUp: [e.shiftKey ? "year" : "month", "before"],
|
|
4531
4588
|
PageDown: [e.shiftKey ? "year" : "month", "after"],
|
|
4532
4589
|
Home: ["startOfWeek", "before"],
|
|
@@ -4593,18 +4650,29 @@ function DayPicker(props) {
|
|
|
4593
4650
|
import_react32.default.createElement(
|
|
4594
4651
|
components.Months,
|
|
4595
4652
|
{ className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
|
|
4596
|
-
!props.hideNavigation && import_react32.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4653
|
+
!props.hideNavigation && !navLayout && import_react32.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4597
4654
|
months.map((calendarMonth, displayIndex) => {
|
|
4598
|
-
const dropdownMonths = getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib);
|
|
4599
|
-
const dropdownYears = getYearOptions(navStart, navEnd, formatters2, dateLib);
|
|
4600
4655
|
return import_react32.default.createElement(
|
|
4601
4656
|
components.Month,
|
|
4602
|
-
{
|
|
4657
|
+
{
|
|
4658
|
+
"data-animated-month": props.animate ? "true" : void 0,
|
|
4659
|
+
className: classNames[UI.Month],
|
|
4660
|
+
style: styles == null ? void 0 : styles[UI.Month],
|
|
4661
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
4662
|
+
key: displayIndex,
|
|
4663
|
+
displayIndex,
|
|
4664
|
+
calendarMonth
|
|
4665
|
+
},
|
|
4666
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === 0 && import_react32.default.createElement(
|
|
4667
|
+
components.PreviousMonthButton,
|
|
4668
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
4669
|
+
import_react32.default.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
4670
|
+
),
|
|
4603
4671
|
import_react32.default.createElement(components.MonthCaption, { "data-animated-caption": props.animate ? "true" : void 0, className: classNames[UI.MonthCaption], style: styles == null ? void 0 : styles[UI.MonthCaption], calendarMonth, displayIndex }, (captionLayout == null ? void 0 : captionLayout.startsWith("dropdown")) ? import_react32.default.createElement(
|
|
4604
4672
|
components.DropdownNav,
|
|
4605
4673
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
4606
|
-
captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react32.default.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options:
|
|
4607
|
-
captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react32.default.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options:
|
|
4674
|
+
captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react32.default.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : import_react32.default.createElement("span", null, formatMonthDropdown2(calendarMonth.date, dateLib)),
|
|
4675
|
+
captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react32.default.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : import_react32.default.createElement("span", null, formatYearDropdown2(calendarMonth.date, dateLib)),
|
|
4608
4676
|
import_react32.default.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4609
4677
|
border: 0,
|
|
4610
4678
|
clip: "rect(0 0 0 0)",
|
|
@@ -4617,7 +4685,16 @@ function DayPicker(props) {
|
|
|
4617
4685
|
whiteSpace: "nowrap",
|
|
4618
4686
|
wordWrap: "normal"
|
|
4619
4687
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4620
|
-
) :
|
|
4688
|
+
) : (
|
|
4689
|
+
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
4690
|
+
import_react32.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4691
|
+
)),
|
|
4692
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && import_react32.default.createElement(
|
|
4693
|
+
components.NextMonthButton,
|
|
4694
|
+
{ 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 },
|
|
4695
|
+
import_react32.default.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
4696
|
+
),
|
|
4697
|
+
displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && import_react32.default.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4621
4698
|
import_react32.default.createElement(
|
|
4622
4699
|
components.MonthGrid,
|
|
4623
4700
|
{ role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI.MonthGrid], style: styles == null ? void 0 : styles[UI.MonthGrid] },
|
|
@@ -4625,15 +4702,16 @@ function DayPicker(props) {
|
|
|
4625
4702
|
components.Weekdays,
|
|
4626
4703
|
{ "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles == null ? void 0 : styles[UI.Weekdays] },
|
|
4627
4704
|
showWeekNumber && import_react32.default.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles == null ? void 0 : styles[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
|
|
4628
|
-
weekdays.map((weekday
|
|
4705
|
+
weekdays.map((weekday) => import_react32.default.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles == null ? void 0 : styles[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
|
|
4629
4706
|
),
|
|
4630
|
-
import_react32.default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week
|
|
4707
|
+
import_react32.default.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week) => {
|
|
4631
4708
|
return import_react32.default.createElement(
|
|
4632
4709
|
components.Week,
|
|
4633
4710
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4634
|
-
showWeekNumber &&
|
|
4711
|
+
showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
4712
|
+
import_react32.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4635
4713
|
locale
|
|
4636
|
-
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber)),
|
|
4714
|
+
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4637
4715
|
week.days.map((day) => {
|
|
4638
4716
|
const { date } = day;
|
|
4639
4717
|
const modifiers = getModifiers(day);
|
|
@@ -4648,7 +4726,10 @@ function DayPicker(props) {
|
|
|
4648
4726
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4649
4727
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4650
4728
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4651
|
-
return
|
|
4729
|
+
return (
|
|
4730
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
4731
|
+
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))
|
|
4732
|
+
);
|
|
4652
4733
|
})
|
|
4653
4734
|
);
|
|
4654
4735
|
}))
|
|
@@ -4656,7 +4737,8 @@ function DayPicker(props) {
|
|
|
4656
4737
|
);
|
|
4657
4738
|
})
|
|
4658
4739
|
),
|
|
4659
|
-
props.footer &&
|
|
4740
|
+
props.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
4741
|
+
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)
|
|
4660
4742
|
)
|
|
4661
4743
|
);
|
|
4662
4744
|
}
|
|
@@ -7609,6 +7691,7 @@ function DataTable({
|
|
|
7609
7691
|
ofLabel = "of",
|
|
7610
7692
|
pageLabel = "Page",
|
|
7611
7693
|
isRowsSelected = true,
|
|
7694
|
+
totalRows,
|
|
7612
7695
|
rowsSelectedLabel = "row(s) selected",
|
|
7613
7696
|
className,
|
|
7614
7697
|
emptyData,
|
|
@@ -7648,6 +7731,35 @@ function DataTable({
|
|
|
7648
7731
|
}
|
|
7649
7732
|
}, [pagination]);
|
|
7650
7733
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
7734
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "rounded-md border", children: [
|
|
7735
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Table, { className: cn("relative", tableClassName), children: /* @__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)(
|
|
7736
|
+
header.column.columnDef.header,
|
|
7737
|
+
header.getContext()
|
|
7738
|
+
) }, header.id)) }, headerGroup.id)) }) }),
|
|
7739
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
|
|
7740
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Table, { className: cn("relative", tableClassName), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7741
|
+
TableRow,
|
|
7742
|
+
{
|
|
7743
|
+
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
7744
|
+
onClick: () => onClickItem(row.original),
|
|
7745
|
+
className: rowClassName,
|
|
7746
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { className: cellClassName, children: (0, import_react_table.flexRender)(
|
|
7747
|
+
cell.column.columnDef.cell,
|
|
7748
|
+
cell.getContext()
|
|
7749
|
+
) }, cell.id))
|
|
7750
|
+
},
|
|
7751
|
+
row.id
|
|
7752
|
+
)) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7753
|
+
TableCell,
|
|
7754
|
+
{
|
|
7755
|
+
colSpan: columns.length,
|
|
7756
|
+
className: "h-24 text-center",
|
|
7757
|
+
children: "No results."
|
|
7758
|
+
}
|
|
7759
|
+
) }) }) }),
|
|
7760
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
|
|
7761
|
+
] })
|
|
7762
|
+
] }),
|
|
7651
7763
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
7652
7764
|
ScrollArea,
|
|
7653
7765
|
{
|
|
@@ -7696,6 +7808,11 @@ function DataTable({
|
|
|
7696
7808
|
table.getFilteredRowModel().rows.length,
|
|
7697
7809
|
" " + rowsSelectedLabel
|
|
7698
7810
|
] }) : null,
|
|
7811
|
+
totalRows ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-sm text-muted-foreground", children: [
|
|
7812
|
+
"Total: ",
|
|
7813
|
+
totalRows,
|
|
7814
|
+
" registros"
|
|
7815
|
+
] }) : null,
|
|
7699
7816
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
7700
7817
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
7701
7818
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|