shadcn-ui-react 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +480 -195
- package/dist/index.js +446 -161
- package/dist/style.css +14 -18
- package/package.json +49 -49
package/dist/index.cjs
CHANGED
|
@@ -661,9 +661,6 @@ var Button = React5.forwardRef(
|
|
|
661
661
|
);
|
|
662
662
|
Button.displayName = "Button";
|
|
663
663
|
|
|
664
|
-
// node_modules/@date-fns/tz/constants/index.js
|
|
665
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
666
|
-
|
|
667
664
|
// node_modules/@date-fns/tz/tzName/index.js
|
|
668
665
|
function tzName(timeZone, date, format2 = "long") {
|
|
669
666
|
return new Intl.DateTimeFormat("en-US", {
|
|
@@ -749,7 +746,7 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
749
746
|
}
|
|
750
747
|
//#endregion
|
|
751
748
|
//#region date-fns integration
|
|
752
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
749
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
753
750
|
return new _TZDateMini(+new Date(date), this.timeZone);
|
|
754
751
|
}
|
|
755
752
|
//#endregion
|
|
@@ -877,7 +874,7 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
877
874
|
return new _TZDate(+this, timeZone);
|
|
878
875
|
}
|
|
879
876
|
//#region date-fns integration
|
|
880
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
877
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
881
878
|
return new _TZDate(+new Date(date), this.timeZone);
|
|
882
879
|
}
|
|
883
880
|
//#endregion
|
|
@@ -895,13 +892,13 @@ var secondsInWeek = secondsInDay * 7;
|
|
|
895
892
|
var secondsInYear = secondsInDay * daysInYear;
|
|
896
893
|
var secondsInMonth = secondsInYear / 12;
|
|
897
894
|
var secondsInQuarter = secondsInMonth * 3;
|
|
898
|
-
var
|
|
895
|
+
var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
899
896
|
|
|
900
897
|
// node_modules/date-fns/constructFrom.js
|
|
901
898
|
function constructFrom(date, value) {
|
|
902
899
|
if (typeof date === "function") return date(value);
|
|
903
|
-
if (date && typeof date === "object" &&
|
|
904
|
-
return date[
|
|
900
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
901
|
+
return date[constructFromSymbol](value);
|
|
905
902
|
if (date instanceof Date) return new date.constructor(value);
|
|
906
903
|
return new Date(value);
|
|
907
904
|
}
|
|
@@ -1176,6 +1173,29 @@ function startOfYear(date, options) {
|
|
|
1176
1173
|
return date_;
|
|
1177
1174
|
}
|
|
1178
1175
|
|
|
1176
|
+
// node_modules/date-fns/eachYearOfInterval.js
|
|
1177
|
+
function eachYearOfInterval(interval, options) {
|
|
1178
|
+
var _a;
|
|
1179
|
+
const { start, end } = normalizeInterval(options == null ? void 0 : options.in, interval);
|
|
1180
|
+
let reversed = +start > +end;
|
|
1181
|
+
const endTime = reversed ? +start : +end;
|
|
1182
|
+
const date = reversed ? end : start;
|
|
1183
|
+
date.setHours(0, 0, 0, 0);
|
|
1184
|
+
date.setMonth(0, 1);
|
|
1185
|
+
let step = (_a = options == null ? void 0 : options.step) != null ? _a : 1;
|
|
1186
|
+
if (!step) return [];
|
|
1187
|
+
if (step < 0) {
|
|
1188
|
+
step = -step;
|
|
1189
|
+
reversed = !reversed;
|
|
1190
|
+
}
|
|
1191
|
+
const dates = [];
|
|
1192
|
+
while (+date <= endTime) {
|
|
1193
|
+
dates.push(constructFrom(start, date));
|
|
1194
|
+
date.setFullYear(date.getFullYear() + step);
|
|
1195
|
+
}
|
|
1196
|
+
return reversed ? dates.reverse() : dates;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1179
1199
|
// node_modules/date-fns/endOfWeek.js
|
|
1180
1200
|
function endOfWeek(date, options) {
|
|
1181
1201
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -2724,8 +2744,66 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2724
2744
|
return endDate;
|
|
2725
2745
|
}
|
|
2726
2746
|
|
|
2747
|
+
// node_modules/react-day-picker/dist/esm/locale/en-US.js
|
|
2748
|
+
var enUS2 = __spreadProps(__spreadValues({}, enUS), {
|
|
2749
|
+
labels: {
|
|
2750
|
+
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
2751
|
+
let formatDate;
|
|
2752
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2753
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2754
|
+
} else {
|
|
2755
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2756
|
+
}
|
|
2757
|
+
let label = formatDate(date, "PPPP");
|
|
2758
|
+
if (modifiers.today)
|
|
2759
|
+
label = `Today, ${label}`;
|
|
2760
|
+
if (modifiers.selected)
|
|
2761
|
+
label = `${label}, selected`;
|
|
2762
|
+
return label;
|
|
2763
|
+
},
|
|
2764
|
+
labelMonthDropdown: "Choose the Month",
|
|
2765
|
+
labelNext: "Go to the Next Month",
|
|
2766
|
+
labelPrevious: "Go to the Previous Month",
|
|
2767
|
+
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
2768
|
+
labelYearDropdown: "Choose the Year",
|
|
2769
|
+
labelGrid: (date, options, dateLib) => {
|
|
2770
|
+
let formatDate;
|
|
2771
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2772
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2773
|
+
} else {
|
|
2774
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2775
|
+
}
|
|
2776
|
+
return formatDate(date, "LLLL yyyy");
|
|
2777
|
+
},
|
|
2778
|
+
labelGridcell: (date, modifiers, options, dateLib) => {
|
|
2779
|
+
let formatDate;
|
|
2780
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2781
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2782
|
+
} else {
|
|
2783
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2784
|
+
}
|
|
2785
|
+
let label = formatDate(date, "PPPP");
|
|
2786
|
+
if (modifiers == null ? void 0 : modifiers.today) {
|
|
2787
|
+
label = `Today, ${label}`;
|
|
2788
|
+
}
|
|
2789
|
+
return label;
|
|
2790
|
+
},
|
|
2791
|
+
labelNav: "Navigation bar",
|
|
2792
|
+
labelWeekNumberHeader: "Week Number",
|
|
2793
|
+
labelWeekday: (date, options, dateLib) => {
|
|
2794
|
+
let formatDate;
|
|
2795
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2796
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2797
|
+
} else {
|
|
2798
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2799
|
+
}
|
|
2800
|
+
return formatDate(date, "cccc");
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
});
|
|
2804
|
+
|
|
2727
2805
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2728
|
-
var DateLib = class {
|
|
2806
|
+
var DateLib = class _DateLib {
|
|
2729
2807
|
/**
|
|
2730
2808
|
* Creates an instance of `DateLib`.
|
|
2731
2809
|
*
|
|
@@ -2782,6 +2860,19 @@ var DateLib = class {
|
|
|
2782
2860
|
var _a;
|
|
2783
2861
|
return ((_a = this.overrides) == null ? void 0 : _a.eachMonthOfInterval) ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
2784
2862
|
};
|
|
2863
|
+
this.eachYearOfInterval = (interval) => {
|
|
2864
|
+
var _a;
|
|
2865
|
+
const years = ((_a = this.overrides) == null ? void 0 : _a.eachYearOfInterval) ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
2866
|
+
const uniqueYears = new Set(years.map((d) => this.getYear(d)));
|
|
2867
|
+
if (uniqueYears.size === years.length) {
|
|
2868
|
+
return years;
|
|
2869
|
+
}
|
|
2870
|
+
const yearsArray = [];
|
|
2871
|
+
uniqueYears.forEach((y) => {
|
|
2872
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
2873
|
+
});
|
|
2874
|
+
return yearsArray;
|
|
2875
|
+
};
|
|
2785
2876
|
this.endOfBroadcastWeek = (date) => {
|
|
2786
2877
|
var _a;
|
|
2787
2878
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
@@ -2890,7 +2981,7 @@ var DateLib = class {
|
|
|
2890
2981
|
var _a;
|
|
2891
2982
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfYear) ? this.overrides.startOfYear(date) : startOfYear(date);
|
|
2892
2983
|
};
|
|
2893
|
-
this.options = __spreadValues({ locale:
|
|
2984
|
+
this.options = __spreadValues({ locale: enUS2 }, options);
|
|
2894
2985
|
this.overrides = overrides;
|
|
2895
2986
|
}
|
|
2896
2987
|
/**
|
|
@@ -2932,7 +3023,62 @@ var DateLib = class {
|
|
|
2932
3023
|
formatNumber(value) {
|
|
2933
3024
|
return this.replaceDigits(value.toString());
|
|
2934
3025
|
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Returns the preferred ordering for month and year labels for the current
|
|
3028
|
+
* locale.
|
|
3029
|
+
*/
|
|
3030
|
+
getMonthYearOrder() {
|
|
3031
|
+
var _a;
|
|
3032
|
+
const code = (_a = this.options.locale) == null ? void 0 : _a.code;
|
|
3033
|
+
if (!code) {
|
|
3034
|
+
return "month-first";
|
|
3035
|
+
}
|
|
3036
|
+
return _DateLib.yearFirstLocales.has(code) ? "year-first" : "month-first";
|
|
3037
|
+
}
|
|
3038
|
+
/**
|
|
3039
|
+
* Formats the month/year pair respecting locale conventions.
|
|
3040
|
+
*
|
|
3041
|
+
* @since 9.11.0
|
|
3042
|
+
*/
|
|
3043
|
+
formatMonthYear(date) {
|
|
3044
|
+
const { locale, timeZone, numerals } = this.options;
|
|
3045
|
+
const localeCode = locale == null ? void 0 : locale.code;
|
|
3046
|
+
if (localeCode && _DateLib.yearFirstLocales.has(localeCode)) {
|
|
3047
|
+
try {
|
|
3048
|
+
const intl = new Intl.DateTimeFormat(localeCode, {
|
|
3049
|
+
month: "long",
|
|
3050
|
+
year: "numeric",
|
|
3051
|
+
timeZone,
|
|
3052
|
+
numberingSystem: numerals
|
|
3053
|
+
});
|
|
3054
|
+
const formatted = intl.format(date);
|
|
3055
|
+
return formatted;
|
|
3056
|
+
} catch (e) {
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
const pattern = this.getMonthYearOrder() === "year-first" ? "y LLLL" : "LLLL y";
|
|
3060
|
+
return this.format(date, pattern);
|
|
3061
|
+
}
|
|
2935
3062
|
};
|
|
3063
|
+
DateLib.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
3064
|
+
"eu",
|
|
3065
|
+
"hu",
|
|
3066
|
+
"ja",
|
|
3067
|
+
"ja-Hira",
|
|
3068
|
+
"ja-JP",
|
|
3069
|
+
"ko",
|
|
3070
|
+
"ko-KR",
|
|
3071
|
+
"lt",
|
|
3072
|
+
"lt-LT",
|
|
3073
|
+
"lv",
|
|
3074
|
+
"lv-LV",
|
|
3075
|
+
"mn",
|
|
3076
|
+
"mn-MN",
|
|
3077
|
+
"zh",
|
|
3078
|
+
"zh-CN",
|
|
3079
|
+
"zh-HK",
|
|
3080
|
+
"zh-TW"
|
|
3081
|
+
]);
|
|
2936
3082
|
var defaultDateLib = new DateLib();
|
|
2937
3083
|
|
|
2938
3084
|
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
@@ -2942,6 +3088,9 @@ var CalendarDay = class {
|
|
|
2942
3088
|
this.displayMonth = displayMonth;
|
|
2943
3089
|
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
2944
3090
|
this.dateLib = dateLib;
|
|
3091
|
+
this.isoDate = dateLib.format(date, "yyyy-MM-dd");
|
|
3092
|
+
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
3093
|
+
this.dateMonthId = dateLib.format(date, "yyyy-MM");
|
|
2945
3094
|
}
|
|
2946
3095
|
/**
|
|
2947
3096
|
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
@@ -3354,7 +3503,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3354
3503
|
return isSameDay2(date, matcher);
|
|
3355
3504
|
}
|
|
3356
3505
|
if (isDatesArray(matcher, dateLib)) {
|
|
3357
|
-
return matcher.
|
|
3506
|
+
return matcher.some((matcherDate) => isSameDay2(date, matcherDate));
|
|
3358
3507
|
}
|
|
3359
3508
|
if (isDateRange(matcher)) {
|
|
3360
3509
|
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
@@ -3392,7 +3541,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3392
3541
|
|
|
3393
3542
|
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3394
3543
|
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3395
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3544
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
|
|
3396
3545
|
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3397
3546
|
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3398
3547
|
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
@@ -3412,7 +3561,7 @@ function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
|
3412
3561
|
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3413
3562
|
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
3414
3563
|
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3415
|
-
const isToday = isSameDay2(date, today
|
|
3564
|
+
const isToday = isSameDay2(date, today);
|
|
3416
3565
|
if (isOutside)
|
|
3417
3566
|
internalModifiersMap.outside.push(day);
|
|
3418
3567
|
if (isDisabled)
|
|
@@ -3528,7 +3677,8 @@ __export(formatters_exports, {
|
|
|
3528
3677
|
|
|
3529
3678
|
// node_modules/react-day-picker/dist/esm/formatters/formatCaption.js
|
|
3530
3679
|
function formatCaption(month, options, dateLib) {
|
|
3531
|
-
|
|
3680
|
+
const lib = dateLib != null ? dateLib : new DateLib(options);
|
|
3681
|
+
return lib.formatMonthYear(month);
|
|
3532
3682
|
}
|
|
3533
3683
|
var formatMonthCaption = formatCaption;
|
|
3534
3684
|
|
|
@@ -3577,70 +3727,6 @@ function getFormatters(customFormatters) {
|
|
|
3577
3727
|
return __spreadValues(__spreadValues({}, formatters_exports), customFormatters);
|
|
3578
3728
|
}
|
|
3579
3729
|
|
|
3580
|
-
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3581
|
-
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3582
|
-
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3583
|
-
const months = eachMonthOfInterval2({
|
|
3584
|
-
start: startOfYear2(displayMonth),
|
|
3585
|
-
end: endOfYear2(displayMonth)
|
|
3586
|
-
});
|
|
3587
|
-
const options = months.map((month) => {
|
|
3588
|
-
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3589
|
-
const value = getMonth2(month);
|
|
3590
|
-
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3591
|
-
return { value, label, disabled };
|
|
3592
|
-
});
|
|
3593
|
-
return options;
|
|
3594
|
-
}
|
|
3595
|
-
|
|
3596
|
-
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3597
|
-
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3598
|
-
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3599
|
-
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3600
|
-
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3601
|
-
});
|
|
3602
|
-
return style;
|
|
3603
|
-
}
|
|
3604
|
-
|
|
3605
|
-
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3606
|
-
function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
3607
|
-
const today = dateLib.today();
|
|
3608
|
-
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(today, dateLib) : ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
|
|
3609
|
-
const days = [];
|
|
3610
|
-
for (let i = 0; i < 7; i++) {
|
|
3611
|
-
const day = dateLib.addDays(start, i);
|
|
3612
|
-
days.push(day);
|
|
3613
|
-
}
|
|
3614
|
-
return days;
|
|
3615
|
-
}
|
|
3616
|
-
|
|
3617
|
-
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3618
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3619
|
-
if (!navStart)
|
|
3620
|
-
return void 0;
|
|
3621
|
-
if (!navEnd)
|
|
3622
|
-
return void 0;
|
|
3623
|
-
const { startOfYear: startOfYear2, endOfYear: endOfYear2, addYears: addYears2, getYear: getYear2, isBefore: isBefore2, isSameYear: isSameYear2 } = dateLib;
|
|
3624
|
-
const firstNavYear = startOfYear2(navStart);
|
|
3625
|
-
const lastNavYear = endOfYear2(navEnd);
|
|
3626
|
-
const years = [];
|
|
3627
|
-
let year = firstNavYear;
|
|
3628
|
-
while (isBefore2(year, lastNavYear) || isSameYear2(year, lastNavYear)) {
|
|
3629
|
-
years.push(year);
|
|
3630
|
-
year = addYears2(year, 1);
|
|
3631
|
-
}
|
|
3632
|
-
if (reverse)
|
|
3633
|
-
years.reverse();
|
|
3634
|
-
return years.map((year2) => {
|
|
3635
|
-
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3636
|
-
return {
|
|
3637
|
-
value: getYear2(year2),
|
|
3638
|
-
label,
|
|
3639
|
-
disabled: false
|
|
3640
|
-
};
|
|
3641
|
-
});
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
3730
|
// node_modules/react-day-picker/dist/esm/labels/index.js
|
|
3645
3731
|
var labels_exports = {};
|
|
3646
3732
|
__export(labels_exports, {
|
|
@@ -3672,7 +3758,8 @@ var labelDay = labelDayButton;
|
|
|
3672
3758
|
|
|
3673
3759
|
// node_modules/react-day-picker/dist/esm/labels/labelGrid.js
|
|
3674
3760
|
function labelGrid(date, options, dateLib) {
|
|
3675
|
-
|
|
3761
|
+
const lib = dateLib != null ? dateLib : new DateLib(options);
|
|
3762
|
+
return lib.formatMonthYear(date);
|
|
3676
3763
|
}
|
|
3677
3764
|
var labelCaption = labelGrid;
|
|
3678
3765
|
|
|
@@ -3696,8 +3783,9 @@ function labelNav() {
|
|
|
3696
3783
|
}
|
|
3697
3784
|
|
|
3698
3785
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3699
|
-
|
|
3700
|
-
|
|
3786
|
+
var defaultLabel = "Go to the Next Month";
|
|
3787
|
+
function labelNext(_month, _options) {
|
|
3788
|
+
return defaultLabel;
|
|
3701
3789
|
}
|
|
3702
3790
|
|
|
3703
3791
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
@@ -3725,6 +3813,92 @@ function labelYearDropdown(_options) {
|
|
|
3725
3813
|
return "Choose the Year";
|
|
3726
3814
|
}
|
|
3727
3815
|
|
|
3816
|
+
// node_modules/react-day-picker/dist/esm/helpers/getLabels.js
|
|
3817
|
+
var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
3818
|
+
if (customLabel)
|
|
3819
|
+
return customLabel;
|
|
3820
|
+
if (localeLabel) {
|
|
3821
|
+
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
3822
|
+
}
|
|
3823
|
+
return defaultLabel2;
|
|
3824
|
+
};
|
|
3825
|
+
function getLabels(customLabels, options) {
|
|
3826
|
+
var _a, _b;
|
|
3827
|
+
const localeLabels = (_b = (_a = options.locale) == null ? void 0 : _a.labels) != null ? _b : {};
|
|
3828
|
+
return __spreadProps(__spreadValues(__spreadValues({}, labels_exports), customLabels != null ? customLabels : {}), {
|
|
3829
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
|
|
3830
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
3831
|
+
labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
|
|
3832
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
|
|
3833
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
3834
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
3835
|
+
labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
|
|
3836
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
|
|
3837
|
+
labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
|
|
3838
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
3839
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
|
|
3840
|
+
});
|
|
3841
|
+
}
|
|
3842
|
+
|
|
3843
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3844
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3845
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3846
|
+
const months = eachMonthOfInterval2({
|
|
3847
|
+
start: startOfYear2(displayMonth),
|
|
3848
|
+
end: endOfYear2(displayMonth)
|
|
3849
|
+
});
|
|
3850
|
+
const options = months.map((month) => {
|
|
3851
|
+
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3852
|
+
const value = getMonth2(month);
|
|
3853
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3854
|
+
return { value, label, disabled };
|
|
3855
|
+
});
|
|
3856
|
+
return options;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3859
|
+
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3860
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3861
|
+
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3862
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3863
|
+
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3864
|
+
});
|
|
3865
|
+
return style;
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3869
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
3870
|
+
const referenceToday = today != null ? today : dateLib.today();
|
|
3871
|
+
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
3872
|
+
const days = [];
|
|
3873
|
+
for (let i = 0; i < 7; i++) {
|
|
3874
|
+
const day = dateLib.addDays(start, i);
|
|
3875
|
+
days.push(day);
|
|
3876
|
+
}
|
|
3877
|
+
return days;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3881
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3882
|
+
if (!navStart)
|
|
3883
|
+
return void 0;
|
|
3884
|
+
if (!navEnd)
|
|
3885
|
+
return void 0;
|
|
3886
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
3887
|
+
const firstNavYear = startOfYear2(navStart);
|
|
3888
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
3889
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
3890
|
+
if (reverse)
|
|
3891
|
+
years.reverse();
|
|
3892
|
+
return years.map((year) => {
|
|
3893
|
+
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
3894
|
+
return {
|
|
3895
|
+
value: getYear2(year),
|
|
3896
|
+
label,
|
|
3897
|
+
disabled: false
|
|
3898
|
+
};
|
|
3899
|
+
});
|
|
3900
|
+
}
|
|
3901
|
+
|
|
3728
3902
|
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
3729
3903
|
var import_react28 = require("react");
|
|
3730
3904
|
var asHtmlElement = (element) => {
|
|
@@ -3866,15 +4040,14 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3866
4040
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3867
4041
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3868
4042
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3869
|
-
const
|
|
3870
|
-
const
|
|
4043
|
+
const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
4044
|
+
const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
|
|
4045
|
+
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
4046
|
+
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
3871
4047
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3872
4048
|
const dates = [];
|
|
3873
4049
|
for (let i = 0; i <= nOfDays; i++) {
|
|
3874
4050
|
const date = addDays2(startWeekFirstDate, i);
|
|
3875
|
-
if (maxDate && isAfter2(date, maxDate)) {
|
|
3876
|
-
break;
|
|
3877
|
-
}
|
|
3878
4051
|
dates.push(date);
|
|
3879
4052
|
}
|
|
3880
4053
|
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
@@ -4063,6 +4236,7 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
4063
4236
|
|
|
4064
4237
|
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
4065
4238
|
function useCalendar(props, dateLib) {
|
|
4239
|
+
var _a;
|
|
4066
4240
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
4067
4241
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
4068
4242
|
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
@@ -4075,13 +4249,44 @@ function useCalendar(props, dateLib) {
|
|
|
4075
4249
|
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
4076
4250
|
setFirstMonth(newInitialMonth);
|
|
4077
4251
|
}, [props.timeZone]);
|
|
4078
|
-
const
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4252
|
+
const { months, weeks, days, previousMonth, nextMonth } = (0, import_react30.useMemo)(() => {
|
|
4253
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
|
|
4254
|
+
const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
|
|
4255
|
+
ISOWeek: props.ISOWeek,
|
|
4256
|
+
fixedWeeks: props.fixedWeeks,
|
|
4257
|
+
broadcastCalendar: props.broadcastCalendar
|
|
4258
|
+
}, dateLib);
|
|
4259
|
+
const months2 = getMonths(displayMonths, dates, {
|
|
4260
|
+
broadcastCalendar: props.broadcastCalendar,
|
|
4261
|
+
fixedWeeks: props.fixedWeeks,
|
|
4262
|
+
ISOWeek: props.ISOWeek,
|
|
4263
|
+
reverseMonths: props.reverseMonths
|
|
4264
|
+
}, dateLib);
|
|
4265
|
+
const weeks2 = getWeeks(months2);
|
|
4266
|
+
const days2 = getDays(months2);
|
|
4267
|
+
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
|
|
4268
|
+
const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
|
|
4269
|
+
return {
|
|
4270
|
+
months: months2,
|
|
4271
|
+
weeks: weeks2,
|
|
4272
|
+
days: days2,
|
|
4273
|
+
previousMonth: previousMonth2,
|
|
4274
|
+
nextMonth: nextMonth2
|
|
4275
|
+
};
|
|
4276
|
+
}, [
|
|
4277
|
+
dateLib,
|
|
4278
|
+
firstMonth.getTime(),
|
|
4279
|
+
navEnd == null ? void 0 : navEnd.getTime(),
|
|
4280
|
+
navStart == null ? void 0 : navStart.getTime(),
|
|
4281
|
+
props.disableNavigation,
|
|
4282
|
+
props.broadcastCalendar,
|
|
4283
|
+
(_a = props.endMonth) == null ? void 0 : _a.getTime(),
|
|
4284
|
+
props.fixedWeeks,
|
|
4285
|
+
props.ISOWeek,
|
|
4286
|
+
props.numberOfMonths,
|
|
4287
|
+
props.pagedNavigation,
|
|
4288
|
+
props.reverseMonths
|
|
4289
|
+
]);
|
|
4085
4290
|
const { disableNavigation, onMonthChange } = props;
|
|
4086
4291
|
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
4087
4292
|
const goToMonth = (date) => {
|
|
@@ -4212,6 +4417,12 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
4212
4417
|
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
4213
4418
|
if (!nextFocus)
|
|
4214
4419
|
return;
|
|
4420
|
+
if (props.disableNavigation) {
|
|
4421
|
+
const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));
|
|
4422
|
+
if (!isNextInCalendar) {
|
|
4423
|
+
return;
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4215
4426
|
calendar.goToDay(nextFocus);
|
|
4216
4427
|
setFocused(nextFocus);
|
|
4217
4428
|
};
|
|
@@ -4472,40 +4683,110 @@ function useSelection(props, dateLib) {
|
|
|
4472
4683
|
}
|
|
4473
4684
|
}
|
|
4474
4685
|
|
|
4686
|
+
// node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
|
|
4687
|
+
function toTimeZone(date, timeZone) {
|
|
4688
|
+
if (date instanceof TZDate && date.timeZone === timeZone) {
|
|
4689
|
+
return date;
|
|
4690
|
+
}
|
|
4691
|
+
return new TZDate(date, timeZone);
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
4695
|
+
function convertMatcher(matcher, timeZone) {
|
|
4696
|
+
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
4697
|
+
return matcher;
|
|
4698
|
+
}
|
|
4699
|
+
if (matcher instanceof Date) {
|
|
4700
|
+
return toTimeZone(matcher, timeZone);
|
|
4701
|
+
}
|
|
4702
|
+
if (Array.isArray(matcher)) {
|
|
4703
|
+
return matcher.map((value) => value instanceof Date ? toTimeZone(value, timeZone) : value);
|
|
4704
|
+
}
|
|
4705
|
+
if (isDateRange(matcher)) {
|
|
4706
|
+
return __spreadProps(__spreadValues({}, matcher), {
|
|
4707
|
+
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
4708
|
+
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
4709
|
+
});
|
|
4710
|
+
}
|
|
4711
|
+
if (isDateInterval(matcher)) {
|
|
4712
|
+
return {
|
|
4713
|
+
before: toTimeZone(matcher.before, timeZone),
|
|
4714
|
+
after: toTimeZone(matcher.after, timeZone)
|
|
4715
|
+
};
|
|
4716
|
+
}
|
|
4717
|
+
if (isDateAfterType(matcher)) {
|
|
4718
|
+
return {
|
|
4719
|
+
after: toTimeZone(matcher.after, timeZone)
|
|
4720
|
+
};
|
|
4721
|
+
}
|
|
4722
|
+
if (isDateBeforeType(matcher)) {
|
|
4723
|
+
return {
|
|
4724
|
+
before: toTimeZone(matcher.before, timeZone)
|
|
4725
|
+
};
|
|
4726
|
+
}
|
|
4727
|
+
return matcher;
|
|
4728
|
+
}
|
|
4729
|
+
function convertMatchersToTimeZone(matchers, timeZone) {
|
|
4730
|
+
if (!matchers) {
|
|
4731
|
+
return matchers;
|
|
4732
|
+
}
|
|
4733
|
+
if (Array.isArray(matchers)) {
|
|
4734
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone));
|
|
4735
|
+
}
|
|
4736
|
+
return convertMatcher(matchers, timeZone);
|
|
4737
|
+
}
|
|
4738
|
+
|
|
4475
4739
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4476
4740
|
function DayPicker(initialProps) {
|
|
4477
4741
|
var _a, _b;
|
|
4478
4742
|
let props = initialProps;
|
|
4479
|
-
|
|
4480
|
-
|
|
4743
|
+
const timeZone = props.timeZone;
|
|
4744
|
+
if (timeZone) {
|
|
4745
|
+
props = __spreadProps(__spreadValues({}, initialProps), {
|
|
4746
|
+
timeZone
|
|
4747
|
+
});
|
|
4481
4748
|
if (props.today) {
|
|
4482
|
-
props.today =
|
|
4749
|
+
props.today = toTimeZone(props.today, timeZone);
|
|
4483
4750
|
}
|
|
4484
4751
|
if (props.month) {
|
|
4485
|
-
props.month =
|
|
4752
|
+
props.month = toTimeZone(props.month, timeZone);
|
|
4486
4753
|
}
|
|
4487
4754
|
if (props.defaultMonth) {
|
|
4488
|
-
props.defaultMonth =
|
|
4755
|
+
props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
|
|
4489
4756
|
}
|
|
4490
4757
|
if (props.startMonth) {
|
|
4491
|
-
props.startMonth =
|
|
4758
|
+
props.startMonth = toTimeZone(props.startMonth, timeZone);
|
|
4492
4759
|
}
|
|
4493
4760
|
if (props.endMonth) {
|
|
4494
|
-
props.endMonth =
|
|
4761
|
+
props.endMonth = toTimeZone(props.endMonth, timeZone);
|
|
4495
4762
|
}
|
|
4496
4763
|
if (props.mode === "single" && props.selected) {
|
|
4497
|
-
props.selected =
|
|
4764
|
+
props.selected = toTimeZone(props.selected, timeZone);
|
|
4498
4765
|
} else if (props.mode === "multiple" && props.selected) {
|
|
4499
|
-
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) =>
|
|
4766
|
+
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) => toTimeZone(date, timeZone));
|
|
4500
4767
|
} else if (props.mode === "range" && props.selected) {
|
|
4501
4768
|
props.selected = {
|
|
4502
|
-
from: props.selected.from ?
|
|
4503
|
-
to: props.selected.to ?
|
|
4769
|
+
from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
|
|
4770
|
+
to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
|
|
4504
4771
|
};
|
|
4505
4772
|
}
|
|
4773
|
+
if (props.disabled !== void 0) {
|
|
4774
|
+
props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
|
|
4775
|
+
}
|
|
4776
|
+
if (props.hidden !== void 0) {
|
|
4777
|
+
props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
|
|
4778
|
+
}
|
|
4779
|
+
if (props.modifiers) {
|
|
4780
|
+
const nextModifiers = {};
|
|
4781
|
+
Object.keys(props.modifiers).forEach((key) => {
|
|
4782
|
+
var _a2;
|
|
4783
|
+
nextModifiers[key] = convertMatchersToTimeZone((_a2 = props.modifiers) == null ? void 0 : _a2[key], timeZone);
|
|
4784
|
+
});
|
|
4785
|
+
props.modifiers = nextModifiers;
|
|
4786
|
+
}
|
|
4506
4787
|
}
|
|
4507
4788
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = (0, import_react32.useMemo)(() => {
|
|
4508
|
-
const locale2 = __spreadValues(__spreadValues({},
|
|
4789
|
+
const locale2 = __spreadValues(__spreadValues({}, enUS2), props.locale);
|
|
4509
4790
|
const dateLib2 = new DateLib({
|
|
4510
4791
|
locale: locale2,
|
|
4511
4792
|
weekStartsOn: props.broadcastCalendar ? 1 : props.weekStartsOn,
|
|
@@ -4519,7 +4800,7 @@ function DayPicker(initialProps) {
|
|
|
4519
4800
|
dateLib: dateLib2,
|
|
4520
4801
|
components: getComponents(props.components),
|
|
4521
4802
|
formatters: getFormatters(props.formatters),
|
|
4522
|
-
labels:
|
|
4803
|
+
labels: getLabels(props.labels, dateLib2.options),
|
|
4523
4804
|
locale: locale2,
|
|
4524
4805
|
classNames: __spreadValues(__spreadValues({}, getDefaultClassNames()), props.classNames)
|
|
4525
4806
|
};
|
|
@@ -4538,15 +4819,18 @@ function DayPicker(initialProps) {
|
|
|
4538
4819
|
props.labels,
|
|
4539
4820
|
props.classNames
|
|
4540
4821
|
]);
|
|
4822
|
+
if (!props.today) {
|
|
4823
|
+
props = __spreadProps(__spreadValues({}, props), { today: dateLib.today() });
|
|
4824
|
+
}
|
|
4541
4825
|
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4542
4826
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4543
4827
|
const calendar = useCalendar(props, dateLib);
|
|
4544
4828
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4545
4829
|
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
4546
4830
|
const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
|
|
4547
|
-
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4831
|
+
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : (() => false), dateLib);
|
|
4548
4832
|
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4549
|
-
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
4833
|
+
const weekdays = (0, import_react32.useMemo)(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
|
|
4550
4834
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4551
4835
|
const handlePreviousClick = (0, import_react32.useCallback)(() => {
|
|
4552
4836
|
if (!previousMonth)
|
|
@@ -4564,6 +4848,9 @@ function DayPicker(initialProps) {
|
|
|
4564
4848
|
e.preventDefault();
|
|
4565
4849
|
e.stopPropagation();
|
|
4566
4850
|
setFocused(day);
|
|
4851
|
+
if (m.disabled) {
|
|
4852
|
+
return;
|
|
4853
|
+
}
|
|
4567
4854
|
select == null ? void 0 : select(day.date, m, e);
|
|
4568
4855
|
onDayClick == null ? void 0 : onDayClick(day.date, m, e);
|
|
4569
4856
|
}, [select, onDayClick, setFocused]);
|
|
@@ -4649,7 +4936,7 @@ function DayPicker(initialProps) {
|
|
|
4649
4936
|
{ value: contextValue },
|
|
4650
4937
|
import_react32.default.createElement(
|
|
4651
4938
|
components.Root,
|
|
4652
|
-
__spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"] }, dataAttributes),
|
|
4939
|
+
__spreadValues({ rootRef: props.animate ? rootElRef : void 0, className, style, dir: props.dir, id: props.id, lang: props.lang, nonce: props.nonce, title: props.title, role: props.role, "aria-label": props["aria-label"], "aria-labelledby": props["aria-labelledby"] }, dataAttributes),
|
|
4653
4940
|
import_react32.default.createElement(
|
|
4654
4941
|
components.Months,
|
|
4655
4942
|
{ className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
|
|
@@ -4674,8 +4961,12 @@ function DayPicker(initialProps) {
|
|
|
4674
4961
|
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(
|
|
4675
4962
|
components.DropdownNav,
|
|
4676
4963
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
4677
|
-
|
|
4678
|
-
|
|
4964
|
+
(() => {
|
|
4965
|
+
const monthControl = captionLayout === "dropdown" || captionLayout === "dropdown-months" ? import_react32.default.createElement(components.MonthsDropdown, { key: "month", 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", { key: "month" }, formatMonthDropdown2(calendarMonth.date, dateLib));
|
|
4966
|
+
const yearControl = captionLayout === "dropdown" || captionLayout === "dropdown-years" ? import_react32.default.createElement(components.YearsDropdown, { key: "year", 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", { key: "year" }, formatYearDropdown2(calendarMonth.date, dateLib));
|
|
4967
|
+
const controls = dateLib.getMonthYearOrder() === "year-first" ? [yearControl, monthControl] : [monthControl, yearControl];
|
|
4968
|
+
return controls;
|
|
4969
|
+
})(),
|
|
4679
4970
|
import_react32.default.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4680
4971
|
border: 0,
|
|
4681
4972
|
clip: "rect(0 0 0 0)",
|
|
@@ -4688,10 +4979,7 @@ function DayPicker(initialProps) {
|
|
|
4688
4979
|
whiteSpace: "nowrap",
|
|
4689
4980
|
wordWrap: "normal"
|
|
4690
4981
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4691
|
-
) : (
|
|
4692
|
-
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
4693
|
-
import_react32.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4694
|
-
)),
|
|
4982
|
+
) : import_react32.default.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
4695
4983
|
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && import_react32.default.createElement(
|
|
4696
4984
|
components.NextMonthButton,
|
|
4697
4985
|
{ type: "button", className: classNames[UI.NextMonthButton], tabIndex: nextMonth ? void 0 : -1, "aria-disabled": nextMonth ? void 0 : true, "aria-label": labelNext2(nextMonth), onClick: handleNextClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
@@ -4711,8 +4999,7 @@ function DayPicker(initialProps) {
|
|
|
4711
4999
|
return import_react32.default.createElement(
|
|
4712
5000
|
components.Week,
|
|
4713
5001
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4714
|
-
showWeekNumber &&
|
|
4715
|
-
import_react32.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
5002
|
+
showWeekNumber && import_react32.default.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4716
5003
|
locale
|
|
4717
5004
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4718
5005
|
week.days.map((day) => {
|
|
@@ -4729,10 +5016,7 @@ function DayPicker(initialProps) {
|
|
|
4729
5016
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4730
5017
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4731
5018
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4732
|
-
return (
|
|
4733
|
-
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
4734
|
-
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))
|
|
4735
|
-
);
|
|
5019
|
+
return import_react32.default.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || void 0, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : void 0, "data-selected": modifiers.selected || void 0, "data-disabled": modifiers.disabled || void 0, "data-hidden": modifiers.hidden || void 0, "data-outside": day.outside || void 0, "data-focused": modifiers.focused || void 0, "data-today": modifiers.today || void 0 }, !modifiers.hidden && isInteractive ? import_react32.default.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles == null ? void 0 : styles[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || void 0, "aria-disabled": modifiers.focused && modifiers.disabled || void 0, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton2(date, modifiers, dateLib.options, dateLib), onClick: handleDayClick(day, modifiers), onBlur: handleDayBlur(day, modifiers), onFocus: handleDayFocus(day, modifiers), onKeyDown: handleDayKeyDown(day, modifiers), onMouseEnter: handleDayMouseEnter(day, modifiers), onMouseLeave: handleDayMouseLeave(day, modifiers) }, formatDay2(date, dateLib.options, dateLib)) : !modifiers.hidden && formatDay2(day.date, dateLib.options, dateLib));
|
|
4736
5020
|
})
|
|
4737
5021
|
);
|
|
4738
5022
|
}))
|
|
@@ -4740,8 +5024,7 @@ function DayPicker(initialProps) {
|
|
|
4740
5024
|
);
|
|
4741
5025
|
})
|
|
4742
5026
|
),
|
|
4743
|
-
props.footer &&
|
|
4744
|
-
import_react32.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
5027
|
+
props.footer && import_react32.default.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
4745
5028
|
)
|
|
4746
5029
|
);
|
|
4747
5030
|
}
|
|
@@ -5762,11 +6045,10 @@ var Form = ({
|
|
|
5762
6045
|
var import_react33 = __toESM(require("react"), 1);
|
|
5763
6046
|
var import_react_hook_form2 = require("react-hook-form");
|
|
5764
6047
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
5765
|
-
var
|
|
6048
|
+
var import_lucide_react2 = require("lucide-react");
|
|
5766
6049
|
|
|
5767
6050
|
// src/components/input.tsx
|
|
5768
6051
|
var React41 = __toESM(require("react"), 1);
|
|
5769
|
-
var import_lucide_react2 = require("lucide-react");
|
|
5770
6052
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5771
6053
|
var Input = React41.forwardRef(
|
|
5772
6054
|
(_a, ref) => {
|
|
@@ -5776,6 +6058,7 @@ var Input = React41.forwardRef(
|
|
|
5776
6058
|
size = "md",
|
|
5777
6059
|
leading,
|
|
5778
6060
|
trailing,
|
|
6061
|
+
classNameDefault = true,
|
|
5779
6062
|
invalid = false,
|
|
5780
6063
|
disabled
|
|
5781
6064
|
} = _b, props = __objRest(_b, [
|
|
@@ -5784,6 +6067,7 @@ var Input = React41.forwardRef(
|
|
|
5784
6067
|
"size",
|
|
5785
6068
|
"leading",
|
|
5786
6069
|
"trailing",
|
|
6070
|
+
"classNameDefault",
|
|
5787
6071
|
"invalid",
|
|
5788
6072
|
"disabled"
|
|
5789
6073
|
]);
|
|
@@ -5819,7 +6103,6 @@ var Input = React41.forwardRef(
|
|
|
5819
6103
|
className: cn(
|
|
5820
6104
|
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 opacity-60",
|
|
5821
6105
|
size === "lg" ? "text-[1.15rem]" : "text-[1rem]",
|
|
5822
|
-
// no desplazamos visualmente en variantes sin padding
|
|
5823
6106
|
variant === "flushed" || variant === "link" ? "hidden" : ""
|
|
5824
6107
|
),
|
|
5825
6108
|
children: leading
|
|
@@ -5831,7 +6114,7 @@ var Input = React41.forwardRef(
|
|
|
5831
6114
|
ref,
|
|
5832
6115
|
"aria-invalid": invalid || void 0,
|
|
5833
6116
|
disabled,
|
|
5834
|
-
className: cn(
|
|
6117
|
+
className: classNameDefault ? cn(
|
|
5835
6118
|
base,
|
|
5836
6119
|
variants2[variant],
|
|
5837
6120
|
variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
|
|
@@ -5839,7 +6122,8 @@ var Input = React41.forwardRef(
|
|
|
5839
6122
|
iconPadLeft,
|
|
5840
6123
|
iconPadRight,
|
|
5841
6124
|
className
|
|
5842
|
-
)
|
|
6125
|
+
) : className,
|
|
6126
|
+
"data-private": true
|
|
5843
6127
|
}, props)
|
|
5844
6128
|
),
|
|
5845
6129
|
trailing ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -5857,7 +6141,6 @@ var Input = React41.forwardRef(
|
|
|
5857
6141
|
}
|
|
5858
6142
|
);
|
|
5859
6143
|
Input.displayName = "Input";
|
|
5860
|
-
Input.displayName = "Input";
|
|
5861
6144
|
|
|
5862
6145
|
// src/components/Form/form-field.tsx
|
|
5863
6146
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
@@ -5937,7 +6220,7 @@ var FormField = (_a) => {
|
|
|
5937
6220
|
children: [
|
|
5938
6221
|
label,
|
|
5939
6222
|
requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5940
|
-
|
|
6223
|
+
import_lucide_react2.Asterisk,
|
|
5941
6224
|
{
|
|
5942
6225
|
className: cn(
|
|
5943
6226
|
"ml-[1px] h-3 w-3 text-red-500",
|
|
@@ -5957,7 +6240,7 @@ var FormField = (_a) => {
|
|
|
5957
6240
|
},
|
|
5958
6241
|
placeholder,
|
|
5959
6242
|
className: cn("bg-input px-[0.9rem] py-5", className),
|
|
5960
|
-
classNameDefault
|
|
6243
|
+
classNameDefault
|
|
5961
6244
|
})
|
|
5962
6245
|
) }),
|
|
5963
6246
|
fieldError && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FormMessage, { className: messageClassName, children: fieldError })
|
|
@@ -6141,7 +6424,7 @@ var FormSelect = ({
|
|
|
6141
6424
|
children: [
|
|
6142
6425
|
label,
|
|
6143
6426
|
requiredLabel && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6144
|
-
|
|
6427
|
+
import_lucide_react2.Asterisk,
|
|
6145
6428
|
{
|
|
6146
6429
|
className: cn(
|
|
6147
6430
|
"ml-[4px] h-3 w-3 text-red-500",
|
|
@@ -6253,35 +6536,35 @@ var HoverCardContent = React43.forwardRef((_a, ref) => {
|
|
|
6253
6536
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
6254
6537
|
|
|
6255
6538
|
// src/components/icons.tsx
|
|
6256
|
-
var
|
|
6539
|
+
var import_lucide_react3 = require("lucide-react");
|
|
6257
6540
|
var IconsApp = {
|
|
6258
|
-
dashboard:
|
|
6259
|
-
logo:
|
|
6260
|
-
login:
|
|
6261
|
-
close:
|
|
6262
|
-
profile:
|
|
6263
|
-
spinner:
|
|
6264
|
-
kanban:
|
|
6265
|
-
chevronLeft:
|
|
6266
|
-
chevronRight:
|
|
6267
|
-
trash:
|
|
6268
|
-
employee:
|
|
6269
|
-
post:
|
|
6270
|
-
page:
|
|
6271
|
-
media:
|
|
6272
|
-
settings:
|
|
6273
|
-
billing:
|
|
6274
|
-
ellipsis:
|
|
6275
|
-
add:
|
|
6276
|
-
warning:
|
|
6277
|
-
user:
|
|
6278
|
-
arrowRight:
|
|
6279
|
-
help:
|
|
6280
|
-
pizza:
|
|
6281
|
-
sun:
|
|
6282
|
-
moon:
|
|
6283
|
-
laptop:
|
|
6284
|
-
check:
|
|
6541
|
+
dashboard: import_lucide_react3.LayoutDashboardIcon,
|
|
6542
|
+
logo: import_lucide_react3.Command,
|
|
6543
|
+
login: import_lucide_react3.LogIn,
|
|
6544
|
+
close: import_lucide_react3.X,
|
|
6545
|
+
profile: import_lucide_react3.User2Icon,
|
|
6546
|
+
spinner: import_lucide_react3.Loader2,
|
|
6547
|
+
kanban: import_lucide_react3.CircuitBoardIcon,
|
|
6548
|
+
chevronLeft: import_lucide_react3.ChevronLeft,
|
|
6549
|
+
chevronRight: import_lucide_react3.ChevronRight,
|
|
6550
|
+
trash: import_lucide_react3.Trash,
|
|
6551
|
+
employee: import_lucide_react3.UserX2Icon,
|
|
6552
|
+
post: import_lucide_react3.FileText,
|
|
6553
|
+
page: import_lucide_react3.File,
|
|
6554
|
+
media: import_lucide_react3.Image,
|
|
6555
|
+
settings: import_lucide_react3.Settings,
|
|
6556
|
+
billing: import_lucide_react3.CreditCard,
|
|
6557
|
+
ellipsis: import_lucide_react3.MoreVertical,
|
|
6558
|
+
add: import_lucide_react3.Plus,
|
|
6559
|
+
warning: import_lucide_react3.AlertTriangle,
|
|
6560
|
+
user: import_lucide_react3.User,
|
|
6561
|
+
arrowRight: import_lucide_react3.ArrowRight,
|
|
6562
|
+
help: import_lucide_react3.HelpCircle,
|
|
6563
|
+
pizza: import_lucide_react3.Pizza,
|
|
6564
|
+
sun: import_lucide_react3.SunMedium,
|
|
6565
|
+
moon: import_lucide_react3.Moon,
|
|
6566
|
+
laptop: import_lucide_react3.Laptop,
|
|
6567
|
+
check: import_lucide_react3.Check
|
|
6285
6568
|
};
|
|
6286
6569
|
var Icons = IconsApp;
|
|
6287
6570
|
|
|
@@ -6322,7 +6605,8 @@ var InputOTPSlot = React44.forwardRef((_a, ref) => {
|
|
|
6322
6605
|
"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
|
|
6323
6606
|
isActive && "z-10 ring-1 ring-ring",
|
|
6324
6607
|
className
|
|
6325
|
-
)
|
|
6608
|
+
),
|
|
6609
|
+
"data-private": true
|
|
6326
6610
|
}, props), {
|
|
6327
6611
|
children: [
|
|
6328
6612
|
char,
|
|
@@ -6686,7 +6970,7 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
|
|
|
6686
6970
|
// src/components/pagination.tsx
|
|
6687
6971
|
var import_react_icons12 = require("@radix-ui/react-icons");
|
|
6688
6972
|
var React48 = __toESM(require("react"), 1);
|
|
6689
|
-
var
|
|
6973
|
+
var import_lucide_react4 = require("lucide-react");
|
|
6690
6974
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
6691
6975
|
var Pagination = (_a) => {
|
|
6692
6976
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
@@ -6755,7 +7039,7 @@ var PaginationPreviousLast = (_a) => {
|
|
|
6755
7039
|
className: cn("gap-1 pl-2.5", className)
|
|
6756
7040
|
}, props), {
|
|
6757
7041
|
children: [
|
|
6758
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
7042
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronLeft, { className: "h-4 w-4" }),
|
|
6759
7043
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Previous Last" })
|
|
6760
7044
|
]
|
|
6761
7045
|
})
|
|
@@ -6819,7 +7103,7 @@ var PaginationNextLast = (_a) => {
|
|
|
6819
7103
|
}, props), {
|
|
6820
7104
|
children: [
|
|
6821
7105
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", children: "Next Last" }),
|
|
6822
|
-
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
7106
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_lucide_react4.ChevronRight, { className: "h-4 w-4" })
|
|
6823
7107
|
]
|
|
6824
7108
|
})
|
|
6825
7109
|
);
|
|
@@ -7044,7 +7328,7 @@ function SearchInput({
|
|
|
7044
7328
|
value: searchTerm,
|
|
7045
7329
|
onChange: (event) => setSearchTerm(event.target.value),
|
|
7046
7330
|
className: cn("w-full md:max-w-sm", className),
|
|
7047
|
-
classNameDefault
|
|
7331
|
+
classNameDefault
|
|
7048
7332
|
}
|
|
7049
7333
|
);
|
|
7050
7334
|
}
|
|
@@ -7937,13 +8221,13 @@ var AlertModal = ({
|
|
|
7937
8221
|
};
|
|
7938
8222
|
|
|
7939
8223
|
// src/shared/breadcrumbs.tsx
|
|
7940
|
-
var
|
|
8224
|
+
var import_lucide_react5 = require("lucide-react");
|
|
7941
8225
|
var import_react35 = require("react");
|
|
7942
8226
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7943
8227
|
function Breadcrumbs({ items, className, classNameList }) {
|
|
7944
8228
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbList, { className: classNameList, children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react35.Fragment, { children: [
|
|
7945
8229
|
index !== items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbItem, { className: item.className, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbLink, { href: item.link, children: item.title }) }),
|
|
7946
|
-
index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
8230
|
+
index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbSeparator, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react5.Slash, {}) }),
|
|
7947
8231
|
index === items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(BreadcrumbPage, { children: item.title })
|
|
7948
8232
|
] }, item.title)) }) });
|
|
7949
8233
|
}
|
|
@@ -7952,7 +8236,7 @@ function Breadcrumbs({ items, className, classNameList }) {
|
|
|
7952
8236
|
var import_react36 = __toESM(require("react"), 1);
|
|
7953
8237
|
var import_react_icons18 = require("@radix-ui/react-icons");
|
|
7954
8238
|
var import_react_table = require("@tanstack/react-table");
|
|
7955
|
-
var
|
|
8239
|
+
var import_lucide_react6 = require("lucide-react");
|
|
7956
8240
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7957
8241
|
function DataTable({
|
|
7958
8242
|
columns,
|
|
@@ -8003,9 +8287,9 @@ function DataTable({
|
|
|
8003
8287
|
if (onPageChange) {
|
|
8004
8288
|
onPageChange(pagination.pageIndex + 1);
|
|
8005
8289
|
}
|
|
8006
|
-
}, [pagination]);
|
|
8007
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8008
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.
|
|
8290
|
+
}, [pagination, onPageChange]);
|
|
8291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("rounded-md border bg-background flex flex-col", className), children: [
|
|
8292
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
|
|
8009
8293
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { className: cn("relative", tableClassName), children: [
|
|
8010
8294
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
8011
8295
|
header.column.columnDef.header,
|
|
@@ -8033,23 +8317,26 @@ function DataTable({
|
|
|
8033
8317
|
) }) })
|
|
8034
8318
|
] }),
|
|
8035
8319
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(ScrollBar, { orientation: "horizontal" })
|
|
8036
|
-
] })
|
|
8037
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "
|
|
8038
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex
|
|
8039
|
-
isRowsSelected
|
|
8320
|
+
] }),
|
|
8321
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "border-t px-4 py-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-1 flex-wrap items-center gap-2", children: [
|
|
8323
|
+
isRowsSelected && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-muted-foreground text-sm", children: [
|
|
8040
8324
|
table.getFilteredSelectedRowModel().rows.length,
|
|
8041
8325
|
" ",
|
|
8042
8326
|
ofLabel,
|
|
8043
8327
|
" ",
|
|
8044
8328
|
table.getFilteredRowModel().rows.length,
|
|
8045
|
-
" "
|
|
8046
|
-
|
|
8329
|
+
" ",
|
|
8330
|
+
rowsSelectedLabel
|
|
8331
|
+
] }),
|
|
8047
8332
|
totalRows ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "text-sm text-muted-foreground", children: [
|
|
8048
8333
|
"Total: ",
|
|
8049
8334
|
totalRows,
|
|
8050
8335
|
" registros"
|
|
8051
|
-
] }) : null
|
|
8052
|
-
|
|
8336
|
+
] }) : null
|
|
8337
|
+
] }),
|
|
8338
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end", children: [
|
|
8339
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8053
8340
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
8054
8341
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8055
8342
|
Select2,
|
|
@@ -8069,19 +8356,17 @@ function DataTable({
|
|
|
8069
8356
|
]
|
|
8070
8357
|
}
|
|
8071
8358
|
)
|
|
8072
|
-
] })
|
|
8073
|
-
] }),
|
|
8074
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
|
|
8075
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
8076
|
-
pageLabel,
|
|
8077
|
-
" ",
|
|
8078
|
-
pagination.pageIndex + 1,
|
|
8079
|
-
" ",
|
|
8080
|
-
ofLabel,
|
|
8081
|
-
" ",
|
|
8082
|
-
pageCount
|
|
8083
8359
|
] }),
|
|
8084
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center
|
|
8360
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8361
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex w-[110px] items-center justify-center text-sm font-medium", children: [
|
|
8362
|
+
pageLabel,
|
|
8363
|
+
" ",
|
|
8364
|
+
pagination.pageIndex + 1,
|
|
8365
|
+
" ",
|
|
8366
|
+
ofLabel,
|
|
8367
|
+
" ",
|
|
8368
|
+
pageCount
|
|
8369
|
+
] }),
|
|
8085
8370
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8086
8371
|
Button,
|
|
8087
8372
|
{
|
|
@@ -8103,7 +8388,7 @@ function DataTable({
|
|
|
8103
8388
|
pageIndex: pagination.pageIndex - 1
|
|
8104
8389
|
})),
|
|
8105
8390
|
disabled: pagination.pageIndex === 0,
|
|
8106
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronLeftIcon, { className: "h-4 w-4" })
|
|
8107
8392
|
}
|
|
8108
8393
|
),
|
|
8109
8394
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
@@ -8116,7 +8401,7 @@ function DataTable({
|
|
|
8116
8401
|
pageIndex: pagination.pageIndex + 1
|
|
8117
8402
|
})),
|
|
8118
8403
|
disabled: pagination.pageIndex + 1 >= pageCount,
|
|
8119
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8404
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react6.ChevronRightIcon, { className: "h-4 w-4" })
|
|
8120
8405
|
}
|
|
8121
8406
|
),
|
|
8122
8407
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
@@ -8178,7 +8463,7 @@ function DataTableSkeleton({
|
|
|
8178
8463
|
|
|
8179
8464
|
// src/shared/fileupload.tsx
|
|
8180
8465
|
var import_react_icons19 = require("@radix-ui/react-icons");
|
|
8181
|
-
var
|
|
8466
|
+
var import_lucide_react7 = require("lucide-react");
|
|
8182
8467
|
var import_react37 = require("react");
|
|
8183
8468
|
var import_react_dropzone = require("react-dropzone");
|
|
8184
8469
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
@@ -8209,7 +8494,7 @@ function FileUpload({
|
|
|
8209
8494
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("input", __spreadValues({}, getInputProps())),
|
|
8210
8495
|
value && !!value.length ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ImagePreview, { file: value[0] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_icons19.AvatarIcon, { className: "h-36 w-36 text-gray-100" }),
|
|
8211
8496
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("p", { className: "absolute -bottom-5 left-1/2 flex w-full -translate-x-1/2 -translate-y-1/2 transform flex-col items-center justify-center bg-gray-300 bg-opacity-50 py-1 text-xs font-normal text-muted-foreground ", children: [
|
|
8212
|
-
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
8497
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react7.CameraIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
8213
8498
|
label
|
|
8214
8499
|
] })
|
|
8215
8500
|
] }))
|