shadcn-ui-react 0.3.4 → 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 +2 -1
- package/dist/index.cjs +546 -382
- package/dist/index.d.cts +34 -16
- package/dist/index.d.ts +34 -16
- package/dist/index.js +545 -382
- package/dist/style.css +32 -4
- package/package.json +67 -67
package/dist/index.cjs
CHANGED
|
@@ -158,6 +158,7 @@ __export(index_exports, {
|
|
|
158
158
|
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
159
159
|
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
160
160
|
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
161
|
+
Dropzone: () => Dropzone,
|
|
161
162
|
FileUpload: () => FileUpload,
|
|
162
163
|
Form: () => Form,
|
|
163
164
|
FormControl: () => FormControl,
|
|
@@ -657,78 +658,29 @@ var Button = React5.forwardRef(
|
|
|
657
658
|
);
|
|
658
659
|
Button.displayName = "Button";
|
|
659
660
|
|
|
660
|
-
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
661
|
-
var import_react32 = __toESM(require("react"), 1);
|
|
662
|
-
|
|
663
|
-
// node_modules/react-day-picker/dist/esm/UI.js
|
|
664
|
-
var UI;
|
|
665
|
-
(function(UI2) {
|
|
666
|
-
UI2["Root"] = "root";
|
|
667
|
-
UI2["Chevron"] = "chevron";
|
|
668
|
-
UI2["Day"] = "day";
|
|
669
|
-
UI2["DayButton"] = "day_button";
|
|
670
|
-
UI2["CaptionLabel"] = "caption_label";
|
|
671
|
-
UI2["Dropdowns"] = "dropdowns";
|
|
672
|
-
UI2["Dropdown"] = "dropdown";
|
|
673
|
-
UI2["DropdownRoot"] = "dropdown_root";
|
|
674
|
-
UI2["Footer"] = "footer";
|
|
675
|
-
UI2["MonthGrid"] = "month_grid";
|
|
676
|
-
UI2["MonthCaption"] = "month_caption";
|
|
677
|
-
UI2["MonthsDropdown"] = "months_dropdown";
|
|
678
|
-
UI2["Month"] = "month";
|
|
679
|
-
UI2["Months"] = "months";
|
|
680
|
-
UI2["Nav"] = "nav";
|
|
681
|
-
UI2["NextMonthButton"] = "button_next";
|
|
682
|
-
UI2["PreviousMonthButton"] = "button_previous";
|
|
683
|
-
UI2["Week"] = "week";
|
|
684
|
-
UI2["Weeks"] = "weeks";
|
|
685
|
-
UI2["Weekday"] = "weekday";
|
|
686
|
-
UI2["Weekdays"] = "weekdays";
|
|
687
|
-
UI2["WeekNumber"] = "week_number";
|
|
688
|
-
UI2["WeekNumberHeader"] = "week_number_header";
|
|
689
|
-
UI2["YearsDropdown"] = "years_dropdown";
|
|
690
|
-
})(UI || (UI = {}));
|
|
691
|
-
var DayFlag;
|
|
692
|
-
(function(DayFlag2) {
|
|
693
|
-
DayFlag2["disabled"] = "disabled";
|
|
694
|
-
DayFlag2["hidden"] = "hidden";
|
|
695
|
-
DayFlag2["outside"] = "outside";
|
|
696
|
-
DayFlag2["focused"] = "focused";
|
|
697
|
-
DayFlag2["today"] = "today";
|
|
698
|
-
})(DayFlag || (DayFlag = {}));
|
|
699
|
-
var SelectionState;
|
|
700
|
-
(function(SelectionState2) {
|
|
701
|
-
SelectionState2["range_end"] = "range_end";
|
|
702
|
-
SelectionState2["range_middle"] = "range_middle";
|
|
703
|
-
SelectionState2["range_start"] = "range_start";
|
|
704
|
-
SelectionState2["selected"] = "selected";
|
|
705
|
-
})(SelectionState || (SelectionState = {}));
|
|
706
|
-
var Animation;
|
|
707
|
-
(function(Animation2) {
|
|
708
|
-
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
709
|
-
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
710
|
-
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
711
|
-
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
712
|
-
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
713
|
-
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
714
|
-
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
715
|
-
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
716
|
-
})(Animation || (Animation = {}));
|
|
717
|
-
|
|
718
661
|
// node_modules/@date-fns/tz/constants/index.js
|
|
719
662
|
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
720
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
|
+
|
|
721
674
|
// node_modules/@date-fns/tz/tzOffset/index.js
|
|
722
675
|
var offsetFormatCache = {};
|
|
723
676
|
var offsetCache = {};
|
|
724
677
|
function tzOffset(timeZone, date) {
|
|
725
678
|
try {
|
|
726
|
-
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-
|
|
679
|
+
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-US", {
|
|
727
680
|
timeZone,
|
|
728
|
-
hour: "numeric",
|
|
729
681
|
timeZoneName: "longOffset"
|
|
730
682
|
}).format);
|
|
731
|
-
const offsetStr = format2(date).split("GMT")[1]
|
|
683
|
+
const offsetStr = format2(date).split("GMT")[1];
|
|
732
684
|
if (offsetStr in offsetCache) return offsetCache[offsetStr];
|
|
733
685
|
return calcOffset(offsetStr, offsetStr.split(":"));
|
|
734
686
|
} catch (e) {
|
|
@@ -740,9 +692,10 @@ function tzOffset(timeZone, date) {
|
|
|
740
692
|
}
|
|
741
693
|
var offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
742
694
|
function calcOffset(cacheStr, values) {
|
|
743
|
-
const hours = +values[0];
|
|
695
|
+
const hours = +(values[0] || 0);
|
|
744
696
|
const minutes = +(values[1] || 0);
|
|
745
|
-
|
|
697
|
+
const seconds = +(values[2] || 0) / 60;
|
|
698
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
746
699
|
}
|
|
747
700
|
|
|
748
701
|
// node_modules/@date-fns/tz/date/mini.js
|
|
@@ -781,7 +734,8 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
781
734
|
return new _TZDateMini(+this, timeZone);
|
|
782
735
|
}
|
|
783
736
|
getTimezoneOffset() {
|
|
784
|
-
|
|
737
|
+
const offset = -tzOffset(this.timeZone, this);
|
|
738
|
+
return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
|
|
785
739
|
}
|
|
786
740
|
//#endregion
|
|
787
741
|
//#region time
|
|
@@ -821,7 +775,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
|
|
|
821
775
|
});
|
|
822
776
|
function syncToInternal(date) {
|
|
823
777
|
date.internal.setTime(+date);
|
|
824
|
-
date.internal.
|
|
778
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
825
779
|
}
|
|
826
780
|
function syncFromInternal(date) {
|
|
827
781
|
Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
|
|
@@ -829,7 +783,8 @@ function syncFromInternal(date) {
|
|
|
829
783
|
adjustToSystemTZ(date);
|
|
830
784
|
}
|
|
831
785
|
function adjustToSystemTZ(date) {
|
|
832
|
-
const
|
|
786
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
787
|
+
const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
833
788
|
const prevHour = /* @__PURE__ */ new Date(+date);
|
|
834
789
|
prevHour.setUTCHours(prevHour.getUTCHours() - 1);
|
|
835
790
|
const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
@@ -839,14 +794,24 @@ function adjustToSystemTZ(date) {
|
|
|
839
794
|
if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
|
|
840
795
|
const offsetDiff = systemOffset - offset;
|
|
841
796
|
if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
|
|
842
|
-
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);
|
|
843
807
|
const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
844
808
|
const postOffsetDiff = postSystemOffset - postOffset;
|
|
845
809
|
const offsetChanged = postOffset !== offset;
|
|
846
810
|
const postDiff = postOffsetDiff - offsetDiff;
|
|
847
811
|
if (offsetChanged && postDiff) {
|
|
848
812
|
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
|
|
849
|
-
const
|
|
813
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
814
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
850
815
|
const offsetChange = postOffset - newOffset;
|
|
851
816
|
if (offsetChange) {
|
|
852
817
|
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
@@ -914,12 +879,6 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
914
879
|
}
|
|
915
880
|
//#endregion
|
|
916
881
|
};
|
|
917
|
-
function tzName(tz, date) {
|
|
918
|
-
return new Intl.DateTimeFormat("en-GB", {
|
|
919
|
-
timeZone: tz,
|
|
920
|
-
timeZoneName: "long"
|
|
921
|
-
}).format(date).slice(12);
|
|
922
|
-
}
|
|
923
882
|
|
|
924
883
|
// node_modules/date-fns/constants.js
|
|
925
884
|
var daysInYear = 365.2425;
|
|
@@ -2765,10 +2724,10 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2765
2724
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2766
2725
|
var DateLib = class {
|
|
2767
2726
|
/**
|
|
2768
|
-
* Creates an instance of DateLib
|
|
2727
|
+
* Creates an instance of `DateLib`.
|
|
2769
2728
|
*
|
|
2770
|
-
* @param options
|
|
2771
|
-
* @param overrides
|
|
2729
|
+
* @param options Configuration options for the date library.
|
|
2730
|
+
* @param overrides Custom overrides for the date library functions.
|
|
2772
2731
|
*/
|
|
2773
2732
|
constructor(options, overrides) {
|
|
2774
2733
|
this.Date = Date;
|
|
@@ -2822,7 +2781,7 @@ var DateLib = class {
|
|
|
2822
2781
|
};
|
|
2823
2782
|
this.endOfBroadcastWeek = (date) => {
|
|
2824
2783
|
var _a;
|
|
2825
|
-
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);
|
|
2826
2785
|
};
|
|
2827
2786
|
this.endOfISOWeek = (date) => {
|
|
2828
2787
|
var _a;
|
|
@@ -2832,15 +2791,15 @@ var DateLib = class {
|
|
|
2832
2791
|
var _a;
|
|
2833
2792
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfMonth) ? this.overrides.endOfMonth(date) : endOfMonth(date);
|
|
2834
2793
|
};
|
|
2835
|
-
this.endOfWeek = (date) => {
|
|
2794
|
+
this.endOfWeek = (date, options2) => {
|
|
2836
2795
|
var _a;
|
|
2837
|
-
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);
|
|
2838
2797
|
};
|
|
2839
2798
|
this.endOfYear = (date) => {
|
|
2840
2799
|
var _a;
|
|
2841
2800
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfYear) ? this.overrides.endOfYear(date) : endOfYear(date);
|
|
2842
2801
|
};
|
|
2843
|
-
this.format = (date, formatStr) => {
|
|
2802
|
+
this.format = (date, formatStr, _options) => {
|
|
2844
2803
|
var _a;
|
|
2845
2804
|
const formatted = ((_a = this.overrides) == null ? void 0 : _a.format) ? this.overrides.format(date, formatStr, this.options) : format(date, formatStr, this.options);
|
|
2846
2805
|
if (this.options.numerals && this.options.numerals !== "latn") {
|
|
@@ -2852,15 +2811,15 @@ var DateLib = class {
|
|
|
2852
2811
|
var _a;
|
|
2853
2812
|
return ((_a = this.overrides) == null ? void 0 : _a.getISOWeek) ? this.overrides.getISOWeek(date) : getISOWeek(date);
|
|
2854
2813
|
};
|
|
2855
|
-
this.getMonth = (date) => {
|
|
2814
|
+
this.getMonth = (date, _options) => {
|
|
2856
2815
|
var _a;
|
|
2857
2816
|
return ((_a = this.overrides) == null ? void 0 : _a.getMonth) ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
|
|
2858
2817
|
};
|
|
2859
|
-
this.getYear = (date) => {
|
|
2818
|
+
this.getYear = (date, _options) => {
|
|
2860
2819
|
var _a;
|
|
2861
2820
|
return ((_a = this.overrides) == null ? void 0 : _a.getYear) ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
|
|
2862
2821
|
};
|
|
2863
|
-
this.getWeek = (date) => {
|
|
2822
|
+
this.getWeek = (date, _options) => {
|
|
2864
2823
|
var _a;
|
|
2865
2824
|
return ((_a = this.overrides) == null ? void 0 : _a.getWeek) ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
|
|
2866
2825
|
};
|
|
@@ -2904,7 +2863,7 @@ var DateLib = class {
|
|
|
2904
2863
|
var _a;
|
|
2905
2864
|
return ((_a = this.overrides) == null ? void 0 : _a.setYear) ? this.overrides.setYear(date, year) : setYear(date, year);
|
|
2906
2865
|
};
|
|
2907
|
-
this.startOfBroadcastWeek = (date) => {
|
|
2866
|
+
this.startOfBroadcastWeek = (date, _dateLib) => {
|
|
2908
2867
|
var _a;
|
|
2909
2868
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfBroadcastWeek) ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
|
|
2910
2869
|
};
|
|
@@ -2920,7 +2879,7 @@ var DateLib = class {
|
|
|
2920
2879
|
var _a;
|
|
2921
2880
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfMonth) ? this.overrides.startOfMonth(date) : startOfMonth(date);
|
|
2922
2881
|
};
|
|
2923
|
-
this.startOfWeek = (date) => {
|
|
2882
|
+
this.startOfWeek = (date, _options) => {
|
|
2924
2883
|
var _a;
|
|
2925
2884
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfWeek) ? this.overrides.startOfWeek(date, this.options) : startOfWeek(date, this.options);
|
|
2926
2885
|
};
|
|
@@ -2932,9 +2891,11 @@ var DateLib = class {
|
|
|
2932
2891
|
this.overrides = overrides;
|
|
2933
2892
|
}
|
|
2934
2893
|
/**
|
|
2935
|
-
*
|
|
2894
|
+
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
2895
|
+
* digits.
|
|
2936
2896
|
*
|
|
2937
2897
|
* @since 9.5.0
|
|
2898
|
+
* @returns A record mapping Arabic digits to the target numerals.
|
|
2938
2899
|
*/
|
|
2939
2900
|
getDigitMap() {
|
|
2940
2901
|
const { numerals = "latn" } = this.options;
|
|
@@ -2948,20 +2909,22 @@ var DateLib = class {
|
|
|
2948
2909
|
return digitMap;
|
|
2949
2910
|
}
|
|
2950
2911
|
/**
|
|
2951
|
-
*
|
|
2912
|
+
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
2952
2913
|
*
|
|
2953
2914
|
* @since 9.5.0
|
|
2915
|
+
* @param input The string containing Arabic digits.
|
|
2916
|
+
* @returns The string with digits replaced.
|
|
2954
2917
|
*/
|
|
2955
2918
|
replaceDigits(input) {
|
|
2956
2919
|
const digitMap = this.getDigitMap();
|
|
2957
2920
|
return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
|
|
2958
2921
|
}
|
|
2959
2922
|
/**
|
|
2960
|
-
*
|
|
2923
|
+
* Formats a number using the configured numbering system.
|
|
2961
2924
|
*
|
|
2962
2925
|
* @since 9.5.0
|
|
2963
2926
|
* @param value The number to format.
|
|
2964
|
-
* @returns The formatted number.
|
|
2927
|
+
* @returns The formatted number as a string.
|
|
2965
2928
|
*/
|
|
2966
2929
|
formatNumber(value) {
|
|
2967
2930
|
return this.replaceDigits(value.toString());
|
|
@@ -2969,20 +2932,41 @@ var DateLib = class {
|
|
|
2969
2932
|
};
|
|
2970
2933
|
var defaultDateLib = new DateLib();
|
|
2971
2934
|
|
|
2972
|
-
// node_modules/react-day-picker/dist/esm/
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
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
|
+
};
|
|
2986
2970
|
|
|
2987
2971
|
// node_modules/react-day-picker/dist/esm/components/custom-components.js
|
|
2988
2972
|
var custom_components_exports = {};
|
|
@@ -3031,13 +3015,16 @@ function CaptionLabel(props) {
|
|
|
3031
3015
|
var import_react3 = __toESM(require("react"), 1);
|
|
3032
3016
|
function Chevron(props) {
|
|
3033
3017
|
const { size = 24, orientation = "left", className } = props;
|
|
3034
|
-
return
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
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
|
+
)
|
|
3041
3028
|
);
|
|
3042
3029
|
}
|
|
3043
3030
|
|
|
@@ -3063,6 +3050,63 @@ function DayButton(props) {
|
|
|
3063
3050
|
|
|
3064
3051
|
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
3065
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
|
|
3066
3110
|
function Dropdown(props) {
|
|
3067
3111
|
const _a = props, { options, className, components, classNames } = _a, selectProps = __objRest(_a, ["options", "className", "components", "classNames"]);
|
|
3068
3112
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
@@ -3251,6 +3295,178 @@ function YearsDropdown(props) {
|
|
|
3251
3295
|
return import_react27.default.createElement(components.Dropdown, __spreadValues({}, props));
|
|
3252
3296
|
}
|
|
3253
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;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3254
3470
|
// node_modules/react-day-picker/dist/esm/helpers/getComponents.js
|
|
3255
3471
|
function getComponents(customComponents) {
|
|
3256
3472
|
return __spreadValues(__spreadValues({}, custom_components_exports), customComponents);
|
|
@@ -3264,7 +3480,8 @@ function getDataAttributes(props) {
|
|
|
3264
3480
|
"data-required": "required" in props ? props.required : void 0,
|
|
3265
3481
|
"data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
|
|
3266
3482
|
"data-week-numbers": props.showWeekNumber || void 0,
|
|
3267
|
-
"data-broadcast-calendar": props.broadcastCalendar || void 0
|
|
3483
|
+
"data-broadcast-calendar": props.broadcastCalendar || void 0,
|
|
3484
|
+
"data-nav-layout": props.navLayout || void 0
|
|
3268
3485
|
};
|
|
3269
3486
|
Object.entries(props).forEach(([key, val]) => {
|
|
3270
3487
|
if (key.startsWith("data-")) {
|
|
@@ -3322,12 +3539,17 @@ function formatMonthDropdown(month, dateLib = defaultDateLib) {
|
|
|
3322
3539
|
return dateLib.format(month, "LLLL");
|
|
3323
3540
|
}
|
|
3324
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
|
+
|
|
3325
3547
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
|
|
3326
|
-
function formatWeekNumber(weekNumber) {
|
|
3548
|
+
function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
|
|
3327
3549
|
if (weekNumber < 10) {
|
|
3328
|
-
return `0${weekNumber.toLocaleString()}
|
|
3550
|
+
return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
|
|
3329
3551
|
}
|
|
3330
|
-
return `${weekNumber.toLocaleString()}
|
|
3552
|
+
return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
|
|
3331
3553
|
}
|
|
3332
3554
|
|
|
3333
3555
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
|
|
@@ -3335,11 +3557,6 @@ function formatWeekNumberHeader() {
|
|
|
3335
3557
|
return ``;
|
|
3336
3558
|
}
|
|
3337
3559
|
|
|
3338
|
-
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
3339
|
-
function formatWeekdayName(weekday, options, dateLib) {
|
|
3340
|
-
return (dateLib != null ? dateLib : new DateLib(options)).format(weekday, "cccccc");
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
3560
|
// node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
|
|
3344
3561
|
function formatYearDropdown(year, dateLib = defaultDateLib) {
|
|
3345
3562
|
return dateLib.format(year, "yyyy");
|
|
@@ -3395,7 +3612,7 @@ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
|
3395
3612
|
}
|
|
3396
3613
|
|
|
3397
3614
|
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3398
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
3615
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3399
3616
|
if (!navStart)
|
|
3400
3617
|
return void 0;
|
|
3401
3618
|
if (!navEnd)
|
|
@@ -3409,6 +3626,8 @@ function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
|
3409
3626
|
years.push(year);
|
|
3410
3627
|
year = addYears2(year, 1);
|
|
3411
3628
|
}
|
|
3629
|
+
if (reverse)
|
|
3630
|
+
years.reverse();
|
|
3412
3631
|
return years.map((year2) => {
|
|
3413
3632
|
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3414
3633
|
return {
|
|
@@ -3437,6 +3656,17 @@ __export(labels_exports, {
|
|
|
3437
3656
|
labelYearDropdown: () => labelYearDropdown
|
|
3438
3657
|
});
|
|
3439
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
|
+
|
|
3440
3670
|
// node_modules/react-day-picker/dist/esm/labels/labelGrid.js
|
|
3441
3671
|
function labelGrid(date, options, dateLib) {
|
|
3442
3672
|
return (dateLib != null ? dateLib : new DateLib(options)).format(date, "LLLL y");
|
|
@@ -3452,34 +3682,23 @@ function labelGridcell(date, modifiers, options, dateLib) {
|
|
|
3452
3682
|
return label;
|
|
3453
3683
|
}
|
|
3454
3684
|
|
|
3455
|
-
// node_modules/react-day-picker/dist/esm/labels/
|
|
3456
|
-
function
|
|
3457
|
-
|
|
3458
|
-
if (modifiers.today)
|
|
3459
|
-
label = `Today, ${label}`;
|
|
3460
|
-
if (modifiers.selected)
|
|
3461
|
-
label = `${label}, selected`;
|
|
3462
|
-
return label;
|
|
3685
|
+
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3686
|
+
function labelMonthDropdown(_options) {
|
|
3687
|
+
return "Choose the Month";
|
|
3463
3688
|
}
|
|
3464
|
-
var labelDay = labelDayButton;
|
|
3465
3689
|
|
|
3466
3690
|
// node_modules/react-day-picker/dist/esm/labels/labelNav.js
|
|
3467
3691
|
function labelNav() {
|
|
3468
3692
|
return "";
|
|
3469
3693
|
}
|
|
3470
3694
|
|
|
3471
|
-
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3472
|
-
function labelMonthDropdown(options) {
|
|
3473
|
-
return "Choose the Month";
|
|
3474
|
-
}
|
|
3475
|
-
|
|
3476
3695
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3477
|
-
function labelNext(
|
|
3696
|
+
function labelNext(_month) {
|
|
3478
3697
|
return "Go to the Next Month";
|
|
3479
3698
|
}
|
|
3480
3699
|
|
|
3481
3700
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
3482
|
-
function labelPrevious(
|
|
3701
|
+
function labelPrevious(_month) {
|
|
3483
3702
|
return "Go to the Previous Month";
|
|
3484
3703
|
}
|
|
3485
3704
|
|
|
@@ -3489,17 +3708,17 @@ function labelWeekday(date, options, dateLib) {
|
|
|
3489
3708
|
}
|
|
3490
3709
|
|
|
3491
3710
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
|
|
3492
|
-
function labelWeekNumber(weekNumber,
|
|
3711
|
+
function labelWeekNumber(weekNumber, _options) {
|
|
3493
3712
|
return `Week ${weekNumber}`;
|
|
3494
3713
|
}
|
|
3495
3714
|
|
|
3496
3715
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
|
|
3497
|
-
function labelWeekNumberHeader(
|
|
3716
|
+
function labelWeekNumberHeader(_options) {
|
|
3498
3717
|
return "Week Number";
|
|
3499
3718
|
}
|
|
3500
3719
|
|
|
3501
3720
|
// node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
|
|
3502
|
-
function labelYearDropdown(
|
|
3721
|
+
function labelYearDropdown(_options) {
|
|
3503
3722
|
return "Choose the Year";
|
|
3504
3723
|
}
|
|
3505
3724
|
|
|
@@ -3567,7 +3786,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
3567
3786
|
}
|
|
3568
3787
|
const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
|
|
3569
3788
|
const currentMonthEls = queryMonthEls(rootElRef.current);
|
|
3570
|
-
if (currentMonthEls
|
|
3789
|
+
if ((currentMonthEls == null ? void 0 : currentMonthEls.every((el) => el instanceof HTMLElement)) && previousMonthEls && previousMonthEls.every((el) => el instanceof HTMLElement)) {
|
|
3571
3790
|
animatingRef.current = true;
|
|
3572
3791
|
const cleanUpFunctions = [];
|
|
3573
3792
|
rootElRef.current.style.isolation = "isolate";
|
|
@@ -3644,7 +3863,7 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3644
3863
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3645
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;
|
|
3646
3865
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3647
|
-
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth
|
|
3866
|
+
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
3648
3867
|
const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
|
|
3649
3868
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3650
3869
|
const dates = [];
|
|
@@ -3671,12 +3890,11 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3671
3890
|
function getDays(calendarMonths) {
|
|
3672
3891
|
const initialDays = [];
|
|
3673
3892
|
return calendarMonths.reduce((days, month) => {
|
|
3674
|
-
const initialDays2 = [];
|
|
3675
3893
|
const weekDays = month.weeks.reduce((weekDays2, week) => {
|
|
3676
|
-
return
|
|
3677
|
-
},
|
|
3678
|
-
return
|
|
3679
|
-
}, initialDays);
|
|
3894
|
+
return weekDays2.concat(week.days.slice());
|
|
3895
|
+
}, initialDays.slice());
|
|
3896
|
+
return days.concat(weekDays.slice());
|
|
3897
|
+
}, initialDays.slice());
|
|
3680
3898
|
}
|
|
3681
3899
|
|
|
3682
3900
|
// node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
|
|
@@ -3694,60 +3912,26 @@ function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib)
|
|
|
3694
3912
|
}
|
|
3695
3913
|
|
|
3696
3914
|
// node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
|
|
3697
|
-
function getInitialMonth(props, dateLib) {
|
|
3698
|
-
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;
|
|
3699
3917
|
let initialMonth = month || defaultMonth || today;
|
|
3700
3918
|
const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths2, startOfMonth: startOfMonth2 } = dateLib;
|
|
3701
|
-
if (
|
|
3919
|
+
if (navEnd && differenceInCalendarMonths2(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
3702
3920
|
const offset = -1 * (numberOfMonths - 1);
|
|
3703
|
-
initialMonth = addMonths2(
|
|
3921
|
+
initialMonth = addMonths2(navEnd, offset);
|
|
3704
3922
|
}
|
|
3705
|
-
if (
|
|
3706
|
-
initialMonth =
|
|
3923
|
+
if (navStart && differenceInCalendarMonths2(initialMonth, navStart) < 0) {
|
|
3924
|
+
initialMonth = navStart;
|
|
3707
3925
|
}
|
|
3708
|
-
initialMonth = timeZone ? new TZDate(initialMonth, timeZone) : initialMonth;
|
|
3709
3926
|
return startOfMonth2(initialMonth);
|
|
3710
3927
|
}
|
|
3711
3928
|
|
|
3712
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
3713
|
-
var CalendarDay = class {
|
|
3714
|
-
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
3715
|
-
this.date = date;
|
|
3716
|
-
this.displayMonth = displayMonth;
|
|
3717
|
-
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
3718
|
-
this.dateLib = dateLib;
|
|
3719
|
-
}
|
|
3720
|
-
/**
|
|
3721
|
-
* Check if the day is the same as the given day: considering if it is in the
|
|
3722
|
-
* same display month.
|
|
3723
|
-
*/
|
|
3724
|
-
isEqualTo(day) {
|
|
3725
|
-
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
3726
|
-
}
|
|
3727
|
-
};
|
|
3728
|
-
|
|
3729
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
3730
|
-
var CalendarMonth = class {
|
|
3731
|
-
constructor(month, weeks) {
|
|
3732
|
-
this.date = month;
|
|
3733
|
-
this.weeks = weeks;
|
|
3734
|
-
}
|
|
3735
|
-
};
|
|
3736
|
-
|
|
3737
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
3738
|
-
var CalendarWeek = class {
|
|
3739
|
-
constructor(weekNumber, days) {
|
|
3740
|
-
this.days = days;
|
|
3741
|
-
this.weekNumber = weekNumber;
|
|
3742
|
-
}
|
|
3743
|
-
};
|
|
3744
|
-
|
|
3745
3929
|
// node_modules/react-day-picker/dist/esm/helpers/getMonths.js
|
|
3746
3930
|
function getMonths(displayMonths, dates, props, dateLib) {
|
|
3747
3931
|
const { addDays: addDays2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3748
3932
|
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
3749
3933
|
const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek2(month);
|
|
3750
|
-
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month
|
|
3934
|
+
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth2(month)) : endOfWeek2(endOfMonth2(month));
|
|
3751
3935
|
const monthDates = dates.filter((date) => {
|
|
3752
3936
|
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
3753
3937
|
});
|
|
@@ -3862,8 +4046,8 @@ function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, date
|
|
|
3862
4046
|
function getWeeks(months) {
|
|
3863
4047
|
const initialWeeks = [];
|
|
3864
4048
|
return months.reduce((weeks, month) => {
|
|
3865
|
-
return
|
|
3866
|
-
}, initialWeeks);
|
|
4049
|
+
return weeks.concat(month.weeks.slice());
|
|
4050
|
+
}, initialWeeks.slice());
|
|
3867
4051
|
}
|
|
3868
4052
|
|
|
3869
4053
|
// node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js
|
|
@@ -3878,14 +4062,14 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
3878
4062
|
function useCalendar(props, dateLib) {
|
|
3879
4063
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
3880
4064
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
3881
|
-
const initialMonth = getInitialMonth(props, dateLib);
|
|
4065
|
+
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3882
4066
|
const [firstMonth, setFirstMonth] = useControlledValue(
|
|
3883
4067
|
initialMonth,
|
|
3884
4068
|
// initialMonth is always computed from props.month if provided
|
|
3885
4069
|
props.month ? initialMonth : void 0
|
|
3886
4070
|
);
|
|
3887
4071
|
(0, import_react30.useEffect)(() => {
|
|
3888
|
-
const newInitialMonth = getInitialMonth(props, dateLib);
|
|
4072
|
+
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3889
4073
|
setFirstMonth(newInitialMonth);
|
|
3890
4074
|
}, [props.timeZone]);
|
|
3891
4075
|
const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);
|
|
@@ -3972,95 +4156,6 @@ function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
|
3972
4156
|
return focusTarget;
|
|
3973
4157
|
}
|
|
3974
4158
|
|
|
3975
|
-
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3976
|
-
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
3977
|
-
let { from, to } = range;
|
|
3978
|
-
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
3979
|
-
if (from && to) {
|
|
3980
|
-
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
3981
|
-
if (isRangeInverted) {
|
|
3982
|
-
[from, to] = [to, from];
|
|
3983
|
-
}
|
|
3984
|
-
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
3985
|
-
return isInRange;
|
|
3986
|
-
}
|
|
3987
|
-
if (!excludeEnds && to) {
|
|
3988
|
-
return isSameDay2(to, date);
|
|
3989
|
-
}
|
|
3990
|
-
if (!excludeEnds && from) {
|
|
3991
|
-
return isSameDay2(from, date);
|
|
3992
|
-
}
|
|
3993
|
-
return false;
|
|
3994
|
-
}
|
|
3995
|
-
|
|
3996
|
-
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
3997
|
-
function isDateInterval(matcher) {
|
|
3998
|
-
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
3999
|
-
}
|
|
4000
|
-
function isDateRange(value) {
|
|
4001
|
-
return Boolean(value && typeof value === "object" && "from" in value);
|
|
4002
|
-
}
|
|
4003
|
-
function isDateAfterType(value) {
|
|
4004
|
-
return Boolean(value && typeof value === "object" && "after" in value);
|
|
4005
|
-
}
|
|
4006
|
-
function isDateBeforeType(value) {
|
|
4007
|
-
return Boolean(value && typeof value === "object" && "before" in value);
|
|
4008
|
-
}
|
|
4009
|
-
function isDayOfWeekType(value) {
|
|
4010
|
-
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
4011
|
-
}
|
|
4012
|
-
function isDatesArray(value, dateLib) {
|
|
4013
|
-
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
4014
|
-
}
|
|
4015
|
-
|
|
4016
|
-
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
4017
|
-
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
4018
|
-
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
4019
|
-
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
4020
|
-
return matchersArr.some((matcher) => {
|
|
4021
|
-
if (typeof matcher === "boolean") {
|
|
4022
|
-
return matcher;
|
|
4023
|
-
}
|
|
4024
|
-
if (dateLib.isDate(matcher)) {
|
|
4025
|
-
return isSameDay2(date, matcher);
|
|
4026
|
-
}
|
|
4027
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
4028
|
-
return matcher.includes(date);
|
|
4029
|
-
}
|
|
4030
|
-
if (isDateRange(matcher)) {
|
|
4031
|
-
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
4032
|
-
}
|
|
4033
|
-
if (isDayOfWeekType(matcher)) {
|
|
4034
|
-
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
4035
|
-
return matcher.dayOfWeek === date.getDay();
|
|
4036
|
-
}
|
|
4037
|
-
return matcher.dayOfWeek.includes(date.getDay());
|
|
4038
|
-
}
|
|
4039
|
-
if (isDateInterval(matcher)) {
|
|
4040
|
-
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
4041
|
-
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
4042
|
-
const isDayBefore = diffBefore > 0;
|
|
4043
|
-
const isDayAfter = diffAfter < 0;
|
|
4044
|
-
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
4045
|
-
if (isClosedInterval) {
|
|
4046
|
-
return isDayAfter && isDayBefore;
|
|
4047
|
-
} else {
|
|
4048
|
-
return isDayBefore || isDayAfter;
|
|
4049
|
-
}
|
|
4050
|
-
}
|
|
4051
|
-
if (isDateAfterType(matcher)) {
|
|
4052
|
-
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
4053
|
-
}
|
|
4054
|
-
if (isDateBeforeType(matcher)) {
|
|
4055
|
-
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
4056
|
-
}
|
|
4057
|
-
if (typeof matcher === "function") {
|
|
4058
|
-
return matcher(date);
|
|
4059
|
-
}
|
|
4060
|
-
return false;
|
|
4061
|
-
});
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
4159
|
// node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
|
|
4065
4160
|
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
4066
4161
|
const { ISOWeek, broadcastCalendar } = props;
|
|
@@ -4071,7 +4166,7 @@ function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dat
|
|
|
4071
4166
|
month: addMonths2,
|
|
4072
4167
|
year: addYears2,
|
|
4073
4168
|
startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek2(date),
|
|
4074
|
-
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date
|
|
4169
|
+
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek2(date)
|
|
4075
4170
|
};
|
|
4076
4171
|
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
4077
4172
|
if (moveDir === "before" && navStart) {
|
|
@@ -4087,16 +4182,7 @@ function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMo
|
|
|
4087
4182
|
if (attempt > 365) {
|
|
4088
4183
|
return void 0;
|
|
4089
4184
|
}
|
|
4090
|
-
const focusableDate = getFocusableDate(
|
|
4091
|
-
moveBy,
|
|
4092
|
-
moveDir,
|
|
4093
|
-
refDay.date,
|
|
4094
|
-
// should be refDay? or refDay.date?
|
|
4095
|
-
calendarStartMonth,
|
|
4096
|
-
calendarEndMonth,
|
|
4097
|
-
props,
|
|
4098
|
-
dateLib
|
|
4099
|
-
);
|
|
4185
|
+
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
4100
4186
|
const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
4101
4187
|
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
4102
4188
|
const targetMonth = focusableDate;
|
|
@@ -4139,71 +4225,6 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
4139
4225
|
return useFocus2;
|
|
4140
4226
|
}
|
|
4141
4227
|
|
|
4142
|
-
// node_modules/react-day-picker/dist/esm/useGetModifiers.js
|
|
4143
|
-
function useGetModifiers(days, props, dateLib) {
|
|
4144
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
4145
|
-
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
4146
|
-
const startMonth = props.startMonth && startOfMonth2(props.startMonth);
|
|
4147
|
-
const endMonth = props.endMonth && endOfMonth2(props.endMonth);
|
|
4148
|
-
const internalModifiersMap = {
|
|
4149
|
-
[DayFlag.focused]: [],
|
|
4150
|
-
[DayFlag.outside]: [],
|
|
4151
|
-
[DayFlag.disabled]: [],
|
|
4152
|
-
[DayFlag.hidden]: [],
|
|
4153
|
-
[DayFlag.today]: []
|
|
4154
|
-
};
|
|
4155
|
-
const customModifiersMap = {};
|
|
4156
|
-
for (const day of days) {
|
|
4157
|
-
const { date, displayMonth } = day;
|
|
4158
|
-
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
4159
|
-
const isBeforeStartMonth = Boolean(startMonth && isBefore2(date, startMonth));
|
|
4160
|
-
const isAfterEndMonth = Boolean(endMonth && isAfter2(date, endMonth));
|
|
4161
|
-
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
4162
|
-
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeStartMonth || isAfterEndMonth || // Broadcast calendar will show outside days as default
|
|
4163
|
-
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
4164
|
-
const isToday = isSameDay2(date, today != null ? today : dateLib.today());
|
|
4165
|
-
if (isOutside)
|
|
4166
|
-
internalModifiersMap.outside.push(day);
|
|
4167
|
-
if (isDisabled)
|
|
4168
|
-
internalModifiersMap.disabled.push(day);
|
|
4169
|
-
if (isHidden)
|
|
4170
|
-
internalModifiersMap.hidden.push(day);
|
|
4171
|
-
if (isToday)
|
|
4172
|
-
internalModifiersMap.today.push(day);
|
|
4173
|
-
if (modifiers) {
|
|
4174
|
-
Object.keys(modifiers).forEach((name) => {
|
|
4175
|
-
const modifierValue = modifiers == null ? void 0 : modifiers[name];
|
|
4176
|
-
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
4177
|
-
if (!isMatch)
|
|
4178
|
-
return;
|
|
4179
|
-
if (customModifiersMap[name]) {
|
|
4180
|
-
customModifiersMap[name].push(day);
|
|
4181
|
-
} else {
|
|
4182
|
-
customModifiersMap[name] = [day];
|
|
4183
|
-
}
|
|
4184
|
-
});
|
|
4185
|
-
}
|
|
4186
|
-
}
|
|
4187
|
-
return (day) => {
|
|
4188
|
-
const dayFlags = {
|
|
4189
|
-
[DayFlag.focused]: false,
|
|
4190
|
-
[DayFlag.disabled]: false,
|
|
4191
|
-
[DayFlag.hidden]: false,
|
|
4192
|
-
[DayFlag.outside]: false,
|
|
4193
|
-
[DayFlag.today]: false
|
|
4194
|
-
};
|
|
4195
|
-
const customModifiers = {};
|
|
4196
|
-
for (const name in internalModifiersMap) {
|
|
4197
|
-
const days2 = internalModifiersMap[name];
|
|
4198
|
-
dayFlags[name] = days2.some((d) => d === day);
|
|
4199
|
-
}
|
|
4200
|
-
for (const name in customModifiersMap) {
|
|
4201
|
-
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
4202
|
-
}
|
|
4203
|
-
return __spreadValues(__spreadValues({}, dayFlags), customModifiers);
|
|
4204
|
-
};
|
|
4205
|
-
}
|
|
4206
|
-
|
|
4207
4228
|
// node_modules/react-day-picker/dist/esm/selection/useMulti.js
|
|
4208
4229
|
function useMulti(props, dateLib) {
|
|
4209
4230
|
const { selected: initiallySelected, required, onSelect } = props;
|
|
@@ -4254,7 +4275,9 @@ function addToRange(date, initialRange, min2 = 0, max2 = 0, required = false, da
|
|
|
4254
4275
|
range = { from: date, to: min2 > 0 ? void 0 : date };
|
|
4255
4276
|
} else if (from && !to) {
|
|
4256
4277
|
if (isSameDay2(from, date)) {
|
|
4257
|
-
if (
|
|
4278
|
+
if (min2 === 0) {
|
|
4279
|
+
range = { from, to: date };
|
|
4280
|
+
} else if (required) {
|
|
4258
4281
|
range = { from, to: void 0 };
|
|
4259
4282
|
} else {
|
|
4260
4283
|
range = void 0;
|
|
@@ -4447,8 +4470,37 @@ function useSelection(props, dateLib) {
|
|
|
4447
4470
|
}
|
|
4448
4471
|
|
|
4449
4472
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4450
|
-
function DayPicker(
|
|
4451
|
-
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
|
+
}
|
|
4452
4504
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react32.useMemo)(() => {
|
|
4453
4505
|
const locale2 = __spreadValues(__spreadValues({}, enUS), props.locale);
|
|
4454
4506
|
const dateLib2 = new DateLib({
|
|
@@ -4483,14 +4535,14 @@ function DayPicker(props) {
|
|
|
4483
4535
|
props.labels,
|
|
4484
4536
|
props.classNames
|
|
4485
4537
|
]);
|
|
4486
|
-
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;
|
|
4487
4539
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4488
4540
|
const calendar = useCalendar(props, dateLib);
|
|
4489
4541
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4490
|
-
const getModifiers =
|
|
4491
|
-
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 : {};
|
|
4492
4544
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4493
|
-
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;
|
|
4494
4546
|
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
4495
4547
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4496
4548
|
const handlePreviousClick = (0, import_react32.useCallback)(() => {
|
|
@@ -4522,10 +4574,16 @@ function DayPicker(props) {
|
|
|
4522
4574
|
}, [blur, onDayBlur]);
|
|
4523
4575
|
const handleDayKeyDown = (0, import_react32.useCallback)((day, modifiers) => (e) => {
|
|
4524
4576
|
const keyMap = {
|
|
4525
|
-
ArrowLeft: [
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
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"],
|
|
4529
4587
|
PageUp: [e.shiftKey ? "year" : "month", "before"],
|
|
4530
4588
|
PageDown: [e.shiftKey ? "year" : "month", "after"],
|
|
4531
4589
|
Home: ["startOfWeek", "before"],
|
|
@@ -4592,18 +4650,29 @@ function DayPicker(props) {
|
|
|
4592
4650
|
import_react32.default.createElement(
|
|
4593
4651
|
components.Months,
|
|
4594
4652
|
{ className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
|
|
4595
|
-
!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 }),
|
|
4596
4654
|
months.map((calendarMonth, displayIndex) => {
|
|
4597
|
-
const dropdownMonths = getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib);
|
|
4598
|
-
const dropdownYears = getYearOptions(navStart, navEnd, formatters2, dateLib);
|
|
4599
4655
|
return import_react32.default.createElement(
|
|
4600
4656
|
components.Month,
|
|
4601
|
-
{
|
|
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
|
+
),
|
|
4602
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(
|
|
4603
4672
|
components.DropdownNav,
|
|
4604
4673
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
4605
|
-
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:
|
|
4606
|
-
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)),
|
|
4607
4676
|
import_react32.default.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4608
4677
|
border: 0,
|
|
4609
4678
|
clip: "rect(0 0 0 0)",
|
|
@@ -4616,7 +4685,16 @@ function DayPicker(props) {
|
|
|
4616
4685
|
whiteSpace: "nowrap",
|
|
4617
4686
|
wordWrap: "normal"
|
|
4618
4687
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4619
|
-
) :
|
|
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 }),
|
|
4620
4698
|
import_react32.default.createElement(
|
|
4621
4699
|
components.MonthGrid,
|
|
4622
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] },
|
|
@@ -4624,15 +4702,16 @@ function DayPicker(props) {
|
|
|
4624
4702
|
components.Weekdays,
|
|
4625
4703
|
{ "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles == null ? void 0 : styles[UI.Weekdays] },
|
|
4626
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()),
|
|
4627
|
-
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)))
|
|
4628
4706
|
),
|
|
4629
|
-
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) => {
|
|
4630
4708
|
return import_react32.default.createElement(
|
|
4631
4709
|
components.Week,
|
|
4632
4710
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4633
|
-
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, {
|
|
4634
4713
|
locale
|
|
4635
|
-
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber)),
|
|
4714
|
+
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4636
4715
|
week.days.map((day) => {
|
|
4637
4716
|
const { date } = day;
|
|
4638
4717
|
const modifiers = getModifiers(day);
|
|
@@ -4647,7 +4726,10 @@ function DayPicker(props) {
|
|
|
4647
4726
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4648
4727
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4649
4728
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4650
|
-
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
|
+
);
|
|
4651
4733
|
})
|
|
4652
4734
|
);
|
|
4653
4735
|
}))
|
|
@@ -4655,7 +4737,8 @@ function DayPicker(props) {
|
|
|
4655
4737
|
);
|
|
4656
4738
|
})
|
|
4657
4739
|
),
|
|
4658
|
-
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)
|
|
4659
4742
|
)
|
|
4660
4743
|
);
|
|
4661
4744
|
}
|
|
@@ -7608,6 +7691,7 @@ function DataTable({
|
|
|
7608
7691
|
ofLabel = "of",
|
|
7609
7692
|
pageLabel = "Page",
|
|
7610
7693
|
isRowsSelected = true,
|
|
7694
|
+
totalRows,
|
|
7611
7695
|
rowsSelectedLabel = "row(s) selected",
|
|
7612
7696
|
className,
|
|
7613
7697
|
emptyData,
|
|
@@ -7647,6 +7731,35 @@ function DataTable({
|
|
|
7647
7731
|
}
|
|
7648
7732
|
}, [pagination]);
|
|
7649
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
|
+
] }),
|
|
7650
7763
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
7651
7764
|
ScrollArea,
|
|
7652
7765
|
{
|
|
@@ -7695,6 +7808,11 @@ function DataTable({
|
|
|
7695
7808
|
table.getFilteredRowModel().rows.length,
|
|
7696
7809
|
" " + rowsSelectedLabel
|
|
7697
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,
|
|
7698
7816
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
7699
7817
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
7700
7818
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
@@ -7838,7 +7956,6 @@ function FileUpload({
|
|
|
7838
7956
|
const { getRootProps, getInputProps } = (0, import_react_dropzone.useDropzone)({
|
|
7839
7957
|
accept: "image/*",
|
|
7840
7958
|
onDrop: (acceptedFiles) => {
|
|
7841
|
-
console.log("files acceptedFiles=>", acceptedFiles);
|
|
7842
7959
|
onUpdateFile(acceptedFiles);
|
|
7843
7960
|
}
|
|
7844
7961
|
});
|
|
@@ -7991,6 +8108,52 @@ function PaginationSection({
|
|
|
7991
8108
|
] })
|
|
7992
8109
|
] }) }) });
|
|
7993
8110
|
}
|
|
8111
|
+
|
|
8112
|
+
// src/shared/dropzone.tsx
|
|
8113
|
+
var import_react_dropzone2 = require("react-dropzone");
|
|
8114
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
8115
|
+
function Dropzone({
|
|
8116
|
+
label,
|
|
8117
|
+
onChange,
|
|
8118
|
+
value,
|
|
8119
|
+
className,
|
|
8120
|
+
description = "Drag and drop some files here, or click to select files",
|
|
8121
|
+
descriptionActive = "Drop the files here ...",
|
|
8122
|
+
accept,
|
|
8123
|
+
options,
|
|
8124
|
+
descriptionClassName,
|
|
8125
|
+
dropzoneClassName,
|
|
8126
|
+
valueClassName,
|
|
8127
|
+
labelClassName
|
|
8128
|
+
}) {
|
|
8129
|
+
const { getRootProps, getInputProps, isDragActive } = (0, import_react_dropzone2.useDropzone)(__spreadValues({
|
|
8130
|
+
onDrop: (acceptedFiles) => {
|
|
8131
|
+
onChange(acceptedFiles);
|
|
8132
|
+
},
|
|
8133
|
+
accept
|
|
8134
|
+
}, options));
|
|
8135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: cn("space-y-2", className), children: [
|
|
8136
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: cn("font-medium", labelClassName), children: label }),
|
|
8137
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
8138
|
+
"div",
|
|
8139
|
+
__spreadProps(__spreadValues({}, getRootProps()), {
|
|
8140
|
+
className: cn(
|
|
8141
|
+
"cursor-pointer rounded-lg border-2 border-dashed border-gray-300 p-6 text-center hover:border-gray-400",
|
|
8142
|
+
isDragActive && "border-blue-500 bg-blue-50",
|
|
8143
|
+
dropzoneClassName
|
|
8144
|
+
),
|
|
8145
|
+
children: [
|
|
8146
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("input", __spreadValues({}, getInputProps())),
|
|
8147
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: cn("text-gray-600", descriptionClassName), children: isDragActive ? descriptionActive : description })
|
|
8148
|
+
]
|
|
8149
|
+
})
|
|
8150
|
+
),
|
|
8151
|
+
value && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: cn("text-sm text-gray-700 space-y-1", valueClassName), children: value.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("li", { children: [
|
|
8152
|
+
"\u2022 ",
|
|
8153
|
+
file.name
|
|
8154
|
+
] }, idx)) })
|
|
8155
|
+
] });
|
|
8156
|
+
}
|
|
7994
8157
|
// Annotate the CommonJS export names for ESM import in node:
|
|
7995
8158
|
0 && (module.exports = {
|
|
7996
8159
|
Accordion,
|
|
@@ -8092,6 +8255,7 @@ function PaginationSection({
|
|
|
8092
8255
|
DropdownMenuSubContent,
|
|
8093
8256
|
DropdownMenuSubTrigger,
|
|
8094
8257
|
DropdownMenuTrigger,
|
|
8258
|
+
Dropzone,
|
|
8095
8259
|
FileUpload,
|
|
8096
8260
|
Form,
|
|
8097
8261
|
FormControl,
|