shadcn-ui-react 0.4.2 → 0.5.1
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 +141 -31
- package/dist/index.cjs +703 -160
- package/dist/index.d.cts +70 -40
- package/dist/index.d.ts +70 -40
- package/dist/index.js +706 -165
- package/dist/style.css +47 -18
- package/package.json +51 -51
package/dist/index.js
CHANGED
|
@@ -400,9 +400,6 @@ var Button = React5.forwardRef(
|
|
|
400
400
|
);
|
|
401
401
|
Button.displayName = "Button";
|
|
402
402
|
|
|
403
|
-
// node_modules/@date-fns/tz/constants/index.js
|
|
404
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
405
|
-
|
|
406
403
|
// node_modules/@date-fns/tz/tzName/index.js
|
|
407
404
|
function tzName(timeZone, date, format2 = "long") {
|
|
408
405
|
return new Intl.DateTimeFormat("en-US", {
|
|
@@ -488,7 +485,7 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
488
485
|
}
|
|
489
486
|
//#endregion
|
|
490
487
|
//#region date-fns integration
|
|
491
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
488
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
492
489
|
return new _TZDateMini(+new Date(date), this.timeZone);
|
|
493
490
|
}
|
|
494
491
|
//#endregion
|
|
@@ -616,7 +613,7 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
616
613
|
return new _TZDate(+this, timeZone);
|
|
617
614
|
}
|
|
618
615
|
//#region date-fns integration
|
|
619
|
-
[Symbol.for("constructDateFrom")](date) {
|
|
616
|
+
[/* @__PURE__ */ Symbol.for("constructDateFrom")](date) {
|
|
620
617
|
return new _TZDate(+new Date(date), this.timeZone);
|
|
621
618
|
}
|
|
622
619
|
//#endregion
|
|
@@ -634,13 +631,13 @@ var secondsInWeek = secondsInDay * 7;
|
|
|
634
631
|
var secondsInYear = secondsInDay * daysInYear;
|
|
635
632
|
var secondsInMonth = secondsInYear / 12;
|
|
636
633
|
var secondsInQuarter = secondsInMonth * 3;
|
|
637
|
-
var
|
|
634
|
+
var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
638
635
|
|
|
639
636
|
// node_modules/date-fns/constructFrom.js
|
|
640
637
|
function constructFrom(date, value) {
|
|
641
638
|
if (typeof date === "function") return date(value);
|
|
642
|
-
if (date && typeof date === "object" &&
|
|
643
|
-
return date[
|
|
639
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
640
|
+
return date[constructFromSymbol](value);
|
|
644
641
|
if (date instanceof Date) return new date.constructor(value);
|
|
645
642
|
return new Date(value);
|
|
646
643
|
}
|
|
@@ -915,6 +912,29 @@ function startOfYear(date, options) {
|
|
|
915
912
|
return date_;
|
|
916
913
|
}
|
|
917
914
|
|
|
915
|
+
// node_modules/date-fns/eachYearOfInterval.js
|
|
916
|
+
function eachYearOfInterval(interval, options) {
|
|
917
|
+
var _a;
|
|
918
|
+
const { start, end } = normalizeInterval(options == null ? void 0 : options.in, interval);
|
|
919
|
+
let reversed = +start > +end;
|
|
920
|
+
const endTime = reversed ? +start : +end;
|
|
921
|
+
const date = reversed ? end : start;
|
|
922
|
+
date.setHours(0, 0, 0, 0);
|
|
923
|
+
date.setMonth(0, 1);
|
|
924
|
+
let step = (_a = options == null ? void 0 : options.step) != null ? _a : 1;
|
|
925
|
+
if (!step) return [];
|
|
926
|
+
if (step < 0) {
|
|
927
|
+
step = -step;
|
|
928
|
+
reversed = !reversed;
|
|
929
|
+
}
|
|
930
|
+
const dates = [];
|
|
931
|
+
while (+date <= endTime) {
|
|
932
|
+
dates.push(constructFrom(start, date));
|
|
933
|
+
date.setFullYear(date.getFullYear() + step);
|
|
934
|
+
}
|
|
935
|
+
return reversed ? dates.reverse() : dates;
|
|
936
|
+
}
|
|
937
|
+
|
|
918
938
|
// node_modules/date-fns/endOfWeek.js
|
|
919
939
|
function endOfWeek(date, options) {
|
|
920
940
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -2463,6 +2483,64 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2463
2483
|
return endDate;
|
|
2464
2484
|
}
|
|
2465
2485
|
|
|
2486
|
+
// node_modules/react-day-picker/dist/esm/locale/en-US.js
|
|
2487
|
+
var enUS2 = __spreadProps(__spreadValues({}, enUS), {
|
|
2488
|
+
labels: {
|
|
2489
|
+
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
2490
|
+
let formatDate;
|
|
2491
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2492
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2493
|
+
} else {
|
|
2494
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2495
|
+
}
|
|
2496
|
+
let label = formatDate(date, "PPPP");
|
|
2497
|
+
if (modifiers.today)
|
|
2498
|
+
label = `Today, ${label}`;
|
|
2499
|
+
if (modifiers.selected)
|
|
2500
|
+
label = `${label}, selected`;
|
|
2501
|
+
return label;
|
|
2502
|
+
},
|
|
2503
|
+
labelMonthDropdown: "Choose the Month",
|
|
2504
|
+
labelNext: "Go to the Next Month",
|
|
2505
|
+
labelPrevious: "Go to the Previous Month",
|
|
2506
|
+
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
2507
|
+
labelYearDropdown: "Choose the Year",
|
|
2508
|
+
labelGrid: (date, options, dateLib) => {
|
|
2509
|
+
let formatDate;
|
|
2510
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2511
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2512
|
+
} else {
|
|
2513
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2514
|
+
}
|
|
2515
|
+
return formatDate(date, "LLLL yyyy");
|
|
2516
|
+
},
|
|
2517
|
+
labelGridcell: (date, modifiers, options, dateLib) => {
|
|
2518
|
+
let formatDate;
|
|
2519
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2520
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2521
|
+
} else {
|
|
2522
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2523
|
+
}
|
|
2524
|
+
let label = formatDate(date, "PPPP");
|
|
2525
|
+
if (modifiers == null ? void 0 : modifiers.today) {
|
|
2526
|
+
label = `Today, ${label}`;
|
|
2527
|
+
}
|
|
2528
|
+
return label;
|
|
2529
|
+
},
|
|
2530
|
+
labelNav: "Navigation bar",
|
|
2531
|
+
labelWeekNumberHeader: "Week Number",
|
|
2532
|
+
labelWeekday: (date, options, dateLib) => {
|
|
2533
|
+
let formatDate;
|
|
2534
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
2535
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
2536
|
+
} else {
|
|
2537
|
+
formatDate = (d, pattern) => format(d, pattern, __spreadValues({ locale: enUS }, options));
|
|
2538
|
+
}
|
|
2539
|
+
return formatDate(date, "cccc");
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
});
|
|
2543
|
+
|
|
2466
2544
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2467
2545
|
var DateLib = class _DateLib {
|
|
2468
2546
|
/**
|
|
@@ -2521,6 +2599,19 @@ var DateLib = class _DateLib {
|
|
|
2521
2599
|
var _a;
|
|
2522
2600
|
return ((_a = this.overrides) == null ? void 0 : _a.eachMonthOfInterval) ? this.overrides.eachMonthOfInterval(interval) : eachMonthOfInterval(interval);
|
|
2523
2601
|
};
|
|
2602
|
+
this.eachYearOfInterval = (interval) => {
|
|
2603
|
+
var _a;
|
|
2604
|
+
const years = ((_a = this.overrides) == null ? void 0 : _a.eachYearOfInterval) ? this.overrides.eachYearOfInterval(interval) : eachYearOfInterval(interval);
|
|
2605
|
+
const uniqueYears = new Set(years.map((d) => this.getYear(d)));
|
|
2606
|
+
if (uniqueYears.size === years.length) {
|
|
2607
|
+
return years;
|
|
2608
|
+
}
|
|
2609
|
+
const yearsArray = [];
|
|
2610
|
+
uniqueYears.forEach((y) => {
|
|
2611
|
+
yearsArray.push(new Date(y, 0, 1));
|
|
2612
|
+
});
|
|
2613
|
+
return yearsArray;
|
|
2614
|
+
};
|
|
2524
2615
|
this.endOfBroadcastWeek = (date) => {
|
|
2525
2616
|
var _a;
|
|
2526
2617
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
@@ -2629,7 +2720,7 @@ var DateLib = class _DateLib {
|
|
|
2629
2720
|
var _a;
|
|
2630
2721
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfYear) ? this.overrides.startOfYear(date) : startOfYear(date);
|
|
2631
2722
|
};
|
|
2632
|
-
this.options = __spreadValues({ locale:
|
|
2723
|
+
this.options = __spreadValues({ locale: enUS2 }, options);
|
|
2633
2724
|
this.overrides = overrides;
|
|
2634
2725
|
}
|
|
2635
2726
|
/**
|
|
@@ -2736,6 +2827,9 @@ var CalendarDay = class {
|
|
|
2736
2827
|
this.displayMonth = displayMonth;
|
|
2737
2828
|
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
2738
2829
|
this.dateLib = dateLib;
|
|
2830
|
+
this.isoDate = dateLib.format(date, "yyyy-MM-dd");
|
|
2831
|
+
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
2832
|
+
this.dateMonthId = dateLib.format(date, "yyyy-MM");
|
|
2739
2833
|
}
|
|
2740
2834
|
/**
|
|
2741
2835
|
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
@@ -3093,7 +3187,7 @@ function YearsDropdown(props) {
|
|
|
3093
3187
|
}
|
|
3094
3188
|
|
|
3095
3189
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
3096
|
-
import React32, { useCallback as useCallback2, useMemo, useRef as useRef2 } from "react";
|
|
3190
|
+
import React32, { useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
3097
3191
|
|
|
3098
3192
|
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3099
3193
|
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
@@ -3148,7 +3242,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3148
3242
|
return isSameDay2(date, matcher);
|
|
3149
3243
|
}
|
|
3150
3244
|
if (isDatesArray(matcher, dateLib)) {
|
|
3151
|
-
return matcher.
|
|
3245
|
+
return matcher.some((matcherDate) => isSameDay2(date, matcherDate));
|
|
3152
3246
|
}
|
|
3153
3247
|
if (isDateRange(matcher)) {
|
|
3154
3248
|
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
@@ -3186,7 +3280,7 @@ function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
|
3186
3280
|
|
|
3187
3281
|
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3188
3282
|
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3189
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3283
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
|
|
3190
3284
|
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3191
3285
|
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3192
3286
|
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
@@ -3206,7 +3300,7 @@ function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
|
3206
3300
|
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3207
3301
|
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
3208
3302
|
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3209
|
-
const isToday = isSameDay2(date, today
|
|
3303
|
+
const isToday = isSameDay2(date, today);
|
|
3210
3304
|
if (isOutside)
|
|
3211
3305
|
internalModifiersMap.outside.push(day);
|
|
3212
3306
|
if (isDisabled)
|
|
@@ -3372,70 +3466,6 @@ function getFormatters(customFormatters) {
|
|
|
3372
3466
|
return __spreadValues(__spreadValues({}, formatters_exports), customFormatters);
|
|
3373
3467
|
}
|
|
3374
3468
|
|
|
3375
|
-
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3376
|
-
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3377
|
-
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3378
|
-
const months = eachMonthOfInterval2({
|
|
3379
|
-
start: startOfYear2(displayMonth),
|
|
3380
|
-
end: endOfYear2(displayMonth)
|
|
3381
|
-
});
|
|
3382
|
-
const options = months.map((month) => {
|
|
3383
|
-
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3384
|
-
const value = getMonth2(month);
|
|
3385
|
-
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3386
|
-
return { value, label, disabled };
|
|
3387
|
-
});
|
|
3388
|
-
return options;
|
|
3389
|
-
}
|
|
3390
|
-
|
|
3391
|
-
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3392
|
-
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3393
|
-
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3394
|
-
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3395
|
-
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3396
|
-
});
|
|
3397
|
-
return style;
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3401
|
-
function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
3402
|
-
const today = dateLib.today();
|
|
3403
|
-
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(today, dateLib) : ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
|
|
3404
|
-
const days = [];
|
|
3405
|
-
for (let i = 0; i < 7; i++) {
|
|
3406
|
-
const day = dateLib.addDays(start, i);
|
|
3407
|
-
days.push(day);
|
|
3408
|
-
}
|
|
3409
|
-
return days;
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3413
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3414
|
-
if (!navStart)
|
|
3415
|
-
return void 0;
|
|
3416
|
-
if (!navEnd)
|
|
3417
|
-
return void 0;
|
|
3418
|
-
const { startOfYear: startOfYear2, endOfYear: endOfYear2, addYears: addYears2, getYear: getYear2, isBefore: isBefore2, isSameYear: isSameYear2 } = dateLib;
|
|
3419
|
-
const firstNavYear = startOfYear2(navStart);
|
|
3420
|
-
const lastNavYear = endOfYear2(navEnd);
|
|
3421
|
-
const years = [];
|
|
3422
|
-
let year = firstNavYear;
|
|
3423
|
-
while (isBefore2(year, lastNavYear) || isSameYear2(year, lastNavYear)) {
|
|
3424
|
-
years.push(year);
|
|
3425
|
-
year = addYears2(year, 1);
|
|
3426
|
-
}
|
|
3427
|
-
if (reverse)
|
|
3428
|
-
years.reverse();
|
|
3429
|
-
return years.map((year2) => {
|
|
3430
|
-
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3431
|
-
return {
|
|
3432
|
-
value: getYear2(year2),
|
|
3433
|
-
label,
|
|
3434
|
-
disabled: false
|
|
3435
|
-
};
|
|
3436
|
-
});
|
|
3437
|
-
}
|
|
3438
|
-
|
|
3439
3469
|
// node_modules/react-day-picker/dist/esm/labels/index.js
|
|
3440
3470
|
var labels_exports = {};
|
|
3441
3471
|
__export(labels_exports, {
|
|
@@ -3492,8 +3522,9 @@ function labelNav() {
|
|
|
3492
3522
|
}
|
|
3493
3523
|
|
|
3494
3524
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3495
|
-
|
|
3496
|
-
|
|
3525
|
+
var defaultLabel = "Go to the Next Month";
|
|
3526
|
+
function labelNext(_month, _options) {
|
|
3527
|
+
return defaultLabel;
|
|
3497
3528
|
}
|
|
3498
3529
|
|
|
3499
3530
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
@@ -3521,6 +3552,234 @@ function labelYearDropdown(_options) {
|
|
|
3521
3552
|
return "Choose the Year";
|
|
3522
3553
|
}
|
|
3523
3554
|
|
|
3555
|
+
// node_modules/react-day-picker/dist/esm/helpers/getLabels.js
|
|
3556
|
+
var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
3557
|
+
if (customLabel)
|
|
3558
|
+
return customLabel;
|
|
3559
|
+
if (localeLabel) {
|
|
3560
|
+
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
3561
|
+
}
|
|
3562
|
+
return defaultLabel2;
|
|
3563
|
+
};
|
|
3564
|
+
function getLabels(customLabels, options) {
|
|
3565
|
+
var _a, _b;
|
|
3566
|
+
const localeLabels = (_b = (_a = options.locale) == null ? void 0 : _a.labels) != null ? _b : {};
|
|
3567
|
+
return __spreadProps(__spreadValues(__spreadValues({}, labels_exports), customLabels != null ? customLabels : {}), {
|
|
3568
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels == null ? void 0 : customLabels.labelDayButton, localeLabels.labelDayButton),
|
|
3569
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels == null ? void 0 : customLabels.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
3570
|
+
labelNext: resolveLabel(labelNext, customLabels == null ? void 0 : customLabels.labelNext, localeLabels.labelNext),
|
|
3571
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels == null ? void 0 : customLabels.labelPrevious, localeLabels.labelPrevious),
|
|
3572
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels == null ? void 0 : customLabels.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
3573
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels == null ? void 0 : customLabels.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
3574
|
+
labelGrid: resolveLabel(labelGrid, customLabels == null ? void 0 : customLabels.labelGrid, localeLabels.labelGrid),
|
|
3575
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels == null ? void 0 : customLabels.labelGridcell, localeLabels.labelGridcell),
|
|
3576
|
+
labelNav: resolveLabel(labelNav, customLabels == null ? void 0 : customLabels.labelNav, localeLabels.labelNav),
|
|
3577
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels == null ? void 0 : customLabels.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
3578
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels == null ? void 0 : customLabels.labelWeekday, localeLabels.labelWeekday)
|
|
3579
|
+
});
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3583
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3584
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3585
|
+
const months = eachMonthOfInterval2({
|
|
3586
|
+
start: startOfYear2(displayMonth),
|
|
3587
|
+
end: endOfYear2(displayMonth)
|
|
3588
|
+
});
|
|
3589
|
+
const options = months.map((month) => {
|
|
3590
|
+
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3591
|
+
const value = getMonth2(month);
|
|
3592
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3593
|
+
return { value, label, disabled };
|
|
3594
|
+
});
|
|
3595
|
+
return options;
|
|
3596
|
+
}
|
|
3597
|
+
|
|
3598
|
+
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3599
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3600
|
+
let style = __spreadValues({}, styles == null ? void 0 : styles[UI.Day]);
|
|
3601
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3602
|
+
style = __spreadValues(__spreadValues({}, style), modifiersStyles == null ? void 0 : modifiersStyles[modifier]);
|
|
3603
|
+
});
|
|
3604
|
+
return style;
|
|
3605
|
+
}
|
|
3606
|
+
|
|
3607
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3608
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
3609
|
+
const referenceToday = today != null ? today : dateLib.today();
|
|
3610
|
+
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
3611
|
+
const days = [];
|
|
3612
|
+
for (let i = 0; i < 7; i++) {
|
|
3613
|
+
const day = dateLib.addDays(start, i);
|
|
3614
|
+
days.push(day);
|
|
3615
|
+
}
|
|
3616
|
+
return days;
|
|
3617
|
+
}
|
|
3618
|
+
|
|
3619
|
+
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3620
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3621
|
+
if (!navStart)
|
|
3622
|
+
return void 0;
|
|
3623
|
+
if (!navEnd)
|
|
3624
|
+
return void 0;
|
|
3625
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
3626
|
+
const firstNavYear = startOfYear2(navStart);
|
|
3627
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
3628
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
3629
|
+
if (reverse)
|
|
3630
|
+
years.reverse();
|
|
3631
|
+
return years.map((year) => {
|
|
3632
|
+
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
3633
|
+
return {
|
|
3634
|
+
value: getYear2(year),
|
|
3635
|
+
label,
|
|
3636
|
+
disabled: false
|
|
3637
|
+
};
|
|
3638
|
+
});
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
// node_modules/react-day-picker/dist/esm/noonDateLib.js
|
|
3642
|
+
function createNoonOverrides(timeZone, options = {}) {
|
|
3643
|
+
var _a, _b;
|
|
3644
|
+
const { weekStartsOn, locale } = options;
|
|
3645
|
+
const fallbackWeekStartsOn = (_b = weekStartsOn != null ? weekStartsOn : (_a = locale == null ? void 0 : locale.options) == null ? void 0 : _a.weekStartsOn) != null ? _b : 0;
|
|
3646
|
+
const toNoonTZDate = (date) => {
|
|
3647
|
+
const normalizedDate = typeof date === "number" || typeof date === "string" ? new Date(date) : date;
|
|
3648
|
+
return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
|
|
3649
|
+
};
|
|
3650
|
+
const toCalendarDate = (date) => {
|
|
3651
|
+
const zoned = toNoonTZDate(date);
|
|
3652
|
+
return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
|
|
3653
|
+
};
|
|
3654
|
+
return {
|
|
3655
|
+
today: () => {
|
|
3656
|
+
return toNoonTZDate(TZDate.tz(timeZone));
|
|
3657
|
+
},
|
|
3658
|
+
newDate: (year, monthIndex, date) => {
|
|
3659
|
+
return new TZDate(year, monthIndex, date, 12, 0, 0, timeZone);
|
|
3660
|
+
},
|
|
3661
|
+
startOfDay: (date) => {
|
|
3662
|
+
return toNoonTZDate(date);
|
|
3663
|
+
},
|
|
3664
|
+
startOfWeek: (date, options2) => {
|
|
3665
|
+
var _a2;
|
|
3666
|
+
const base = toNoonTZDate(date);
|
|
3667
|
+
const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
|
|
3668
|
+
const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
|
|
3669
|
+
base.setDate(base.getDate() - diff);
|
|
3670
|
+
return base;
|
|
3671
|
+
},
|
|
3672
|
+
startOfISOWeek: (date) => {
|
|
3673
|
+
const base = toNoonTZDate(date);
|
|
3674
|
+
const diff = (base.getDay() - 1 + 7) % 7;
|
|
3675
|
+
base.setDate(base.getDate() - diff);
|
|
3676
|
+
return base;
|
|
3677
|
+
},
|
|
3678
|
+
startOfMonth: (date) => {
|
|
3679
|
+
const base = toNoonTZDate(date);
|
|
3680
|
+
base.setDate(1);
|
|
3681
|
+
return base;
|
|
3682
|
+
},
|
|
3683
|
+
startOfYear: (date) => {
|
|
3684
|
+
const base = toNoonTZDate(date);
|
|
3685
|
+
base.setMonth(0, 1);
|
|
3686
|
+
return base;
|
|
3687
|
+
},
|
|
3688
|
+
endOfWeek: (date, options2) => {
|
|
3689
|
+
var _a2;
|
|
3690
|
+
const base = toNoonTZDate(date);
|
|
3691
|
+
const weekStartsOnValue = (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn;
|
|
3692
|
+
const endDow = (weekStartsOnValue + 6) % 7;
|
|
3693
|
+
const diff = (endDow - base.getDay() + 7) % 7;
|
|
3694
|
+
base.setDate(base.getDate() + diff);
|
|
3695
|
+
return base;
|
|
3696
|
+
},
|
|
3697
|
+
endOfISOWeek: (date) => {
|
|
3698
|
+
const base = toNoonTZDate(date);
|
|
3699
|
+
const diff = (7 - base.getDay()) % 7;
|
|
3700
|
+
base.setDate(base.getDate() + diff);
|
|
3701
|
+
return base;
|
|
3702
|
+
},
|
|
3703
|
+
endOfMonth: (date) => {
|
|
3704
|
+
const base = toNoonTZDate(date);
|
|
3705
|
+
base.setMonth(base.getMonth() + 1, 0);
|
|
3706
|
+
return base;
|
|
3707
|
+
},
|
|
3708
|
+
endOfYear: (date) => {
|
|
3709
|
+
const base = toNoonTZDate(date);
|
|
3710
|
+
base.setMonth(11, 31);
|
|
3711
|
+
return base;
|
|
3712
|
+
},
|
|
3713
|
+
eachMonthOfInterval: (interval) => {
|
|
3714
|
+
const start = toNoonTZDate(interval.start);
|
|
3715
|
+
const end = toNoonTZDate(interval.end);
|
|
3716
|
+
const result = [];
|
|
3717
|
+
const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
|
|
3718
|
+
const endKey = end.getFullYear() * 12 + end.getMonth();
|
|
3719
|
+
while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
|
|
3720
|
+
result.push(new TZDate(cursor, timeZone));
|
|
3721
|
+
cursor.setMonth(cursor.getMonth() + 1, 1);
|
|
3722
|
+
}
|
|
3723
|
+
return result;
|
|
3724
|
+
},
|
|
3725
|
+
// Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
|
|
3726
|
+
// mutate the same TZDate, and return it.
|
|
3727
|
+
addDays: (date, amount) => {
|
|
3728
|
+
const base = toNoonTZDate(date);
|
|
3729
|
+
base.setDate(base.getDate() + amount);
|
|
3730
|
+
return base;
|
|
3731
|
+
},
|
|
3732
|
+
addWeeks: (date, amount) => {
|
|
3733
|
+
const base = toNoonTZDate(date);
|
|
3734
|
+
base.setDate(base.getDate() + amount * 7);
|
|
3735
|
+
return base;
|
|
3736
|
+
},
|
|
3737
|
+
addMonths: (date, amount) => {
|
|
3738
|
+
const base = toNoonTZDate(date);
|
|
3739
|
+
base.setMonth(base.getMonth() + amount);
|
|
3740
|
+
return base;
|
|
3741
|
+
},
|
|
3742
|
+
addYears: (date, amount) => {
|
|
3743
|
+
const base = toNoonTZDate(date);
|
|
3744
|
+
base.setFullYear(base.getFullYear() + amount);
|
|
3745
|
+
return base;
|
|
3746
|
+
},
|
|
3747
|
+
eachYearOfInterval: (interval) => {
|
|
3748
|
+
const start = toNoonTZDate(interval.start);
|
|
3749
|
+
const end = toNoonTZDate(interval.end);
|
|
3750
|
+
const years = [];
|
|
3751
|
+
const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
|
|
3752
|
+
while (cursor.getFullYear() <= end.getFullYear()) {
|
|
3753
|
+
years.push(new TZDate(cursor, timeZone));
|
|
3754
|
+
cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
|
|
3755
|
+
}
|
|
3756
|
+
return years;
|
|
3757
|
+
},
|
|
3758
|
+
getWeek: (date, options2) => {
|
|
3759
|
+
var _a2, _b2, _c, _d;
|
|
3760
|
+
const base = toCalendarDate(date);
|
|
3761
|
+
return getWeek(base, {
|
|
3762
|
+
weekStartsOn: (_a2 = options2 == null ? void 0 : options2.weekStartsOn) != null ? _a2 : fallbackWeekStartsOn,
|
|
3763
|
+
firstWeekContainsDate: (_d = (_c = options2 == null ? void 0 : options2.firstWeekContainsDate) != null ? _c : (_b2 = locale == null ? void 0 : locale.options) == null ? void 0 : _b2.firstWeekContainsDate) != null ? _d : 1
|
|
3764
|
+
});
|
|
3765
|
+
},
|
|
3766
|
+
getISOWeek: (date) => {
|
|
3767
|
+
const base = toCalendarDate(date);
|
|
3768
|
+
return getISOWeek(base);
|
|
3769
|
+
},
|
|
3770
|
+
differenceInCalendarDays: (dateLeft, dateRight) => {
|
|
3771
|
+
const left = toCalendarDate(dateLeft);
|
|
3772
|
+
const right = toCalendarDate(dateRight);
|
|
3773
|
+
return differenceInCalendarDays(left, right);
|
|
3774
|
+
},
|
|
3775
|
+
differenceInCalendarMonths: (dateLeft, dateRight) => {
|
|
3776
|
+
const left = toCalendarDate(dateLeft);
|
|
3777
|
+
const right = toCalendarDate(dateRight);
|
|
3778
|
+
return differenceInCalendarMonths(left, right);
|
|
3779
|
+
}
|
|
3780
|
+
};
|
|
3781
|
+
}
|
|
3782
|
+
|
|
3524
3783
|
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
3525
3784
|
import { useLayoutEffect, useRef } from "react";
|
|
3526
3785
|
var asHtmlElement = (element) => {
|
|
@@ -3653,7 +3912,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
3653
3912
|
}
|
|
3654
3913
|
|
|
3655
3914
|
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
3656
|
-
import { useEffect } from "react";
|
|
3915
|
+
import { useEffect, useMemo } from "react";
|
|
3657
3916
|
|
|
3658
3917
|
// node_modules/react-day-picker/dist/esm/helpers/getDates.js
|
|
3659
3918
|
function getDates(displayMonths, maxDate, props, dateLib) {
|
|
@@ -3662,15 +3921,14 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3662
3921
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3663
3922
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3664
3923
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3665
|
-
const
|
|
3666
|
-
const
|
|
3924
|
+
const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
3925
|
+
const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
|
|
3926
|
+
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
3927
|
+
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
3667
3928
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3668
3929
|
const dates = [];
|
|
3669
3930
|
for (let i = 0; i <= nOfDays; i++) {
|
|
3670
3931
|
const date = addDays2(startWeekFirstDate, i);
|
|
3671
|
-
if (maxDate && isAfter2(date, maxDate)) {
|
|
3672
|
-
break;
|
|
3673
|
-
}
|
|
3674
3932
|
dates.push(date);
|
|
3675
3933
|
}
|
|
3676
3934
|
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
@@ -3859,6 +4117,7 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
3859
4117
|
|
|
3860
4118
|
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
3861
4119
|
function useCalendar(props, dateLib) {
|
|
4120
|
+
var _a;
|
|
3862
4121
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
3863
4122
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
3864
4123
|
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
@@ -3871,13 +4130,44 @@ function useCalendar(props, dateLib) {
|
|
|
3871
4130
|
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3872
4131
|
setFirstMonth(newInitialMonth);
|
|
3873
4132
|
}, [props.timeZone]);
|
|
3874
|
-
const
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
4133
|
+
const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
|
|
4134
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
|
|
4135
|
+
const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : void 0, {
|
|
4136
|
+
ISOWeek: props.ISOWeek,
|
|
4137
|
+
fixedWeeks: props.fixedWeeks,
|
|
4138
|
+
broadcastCalendar: props.broadcastCalendar
|
|
4139
|
+
}, dateLib);
|
|
4140
|
+
const months2 = getMonths(displayMonths, dates, {
|
|
4141
|
+
broadcastCalendar: props.broadcastCalendar,
|
|
4142
|
+
fixedWeeks: props.fixedWeeks,
|
|
4143
|
+
ISOWeek: props.ISOWeek,
|
|
4144
|
+
reverseMonths: props.reverseMonths
|
|
4145
|
+
}, dateLib);
|
|
4146
|
+
const weeks2 = getWeeks(months2);
|
|
4147
|
+
const days2 = getDays(months2);
|
|
4148
|
+
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
|
|
4149
|
+
const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
|
|
4150
|
+
return {
|
|
4151
|
+
months: months2,
|
|
4152
|
+
weeks: weeks2,
|
|
4153
|
+
days: days2,
|
|
4154
|
+
previousMonth: previousMonth2,
|
|
4155
|
+
nextMonth: nextMonth2
|
|
4156
|
+
};
|
|
4157
|
+
}, [
|
|
4158
|
+
dateLib,
|
|
4159
|
+
firstMonth.getTime(),
|
|
4160
|
+
navEnd == null ? void 0 : navEnd.getTime(),
|
|
4161
|
+
navStart == null ? void 0 : navStart.getTime(),
|
|
4162
|
+
props.disableNavigation,
|
|
4163
|
+
props.broadcastCalendar,
|
|
4164
|
+
(_a = props.endMonth) == null ? void 0 : _a.getTime(),
|
|
4165
|
+
props.fixedWeeks,
|
|
4166
|
+
props.ISOWeek,
|
|
4167
|
+
props.numberOfMonths,
|
|
4168
|
+
props.pagedNavigation,
|
|
4169
|
+
props.reverseMonths
|
|
4170
|
+
]);
|
|
3881
4171
|
const { disableNavigation, onMonthChange } = props;
|
|
3882
4172
|
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
3883
4173
|
const goToMonth = (date) => {
|
|
@@ -4008,6 +4298,12 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
4008
4298
|
const nextFocus = getNextFocus(moveBy, moveDir, focusedDay, calendar.navStart, calendar.navEnd, props, dateLib);
|
|
4009
4299
|
if (!nextFocus)
|
|
4010
4300
|
return;
|
|
4301
|
+
if (props.disableNavigation) {
|
|
4302
|
+
const isNextInCalendar = calendar.days.some((day) => day.isEqualTo(nextFocus));
|
|
4303
|
+
if (!isNextInCalendar) {
|
|
4304
|
+
return;
|
|
4305
|
+
}
|
|
4306
|
+
}
|
|
4011
4307
|
calendar.goToDay(nextFocus);
|
|
4012
4308
|
setFocused(nextFocus);
|
|
4013
4309
|
};
|
|
@@ -4268,54 +4564,138 @@ function useSelection(props, dateLib) {
|
|
|
4268
4564
|
}
|
|
4269
4565
|
}
|
|
4270
4566
|
|
|
4567
|
+
// node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
|
|
4568
|
+
function toTimeZone(date, timeZone) {
|
|
4569
|
+
if (date instanceof TZDate && date.timeZone === timeZone) {
|
|
4570
|
+
return date;
|
|
4571
|
+
}
|
|
4572
|
+
return new TZDate(date, timeZone);
|
|
4573
|
+
}
|
|
4574
|
+
|
|
4575
|
+
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
4576
|
+
function toZoneNoon(date, timeZone, noonSafe) {
|
|
4577
|
+
if (!noonSafe)
|
|
4578
|
+
return toTimeZone(date, timeZone);
|
|
4579
|
+
const zoned = toTimeZone(date, timeZone);
|
|
4580
|
+
const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);
|
|
4581
|
+
return new Date(noonZoned.getTime());
|
|
4582
|
+
}
|
|
4583
|
+
function convertMatcher(matcher, timeZone, noonSafe) {
|
|
4584
|
+
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
4585
|
+
return matcher;
|
|
4586
|
+
}
|
|
4587
|
+
if (matcher instanceof Date) {
|
|
4588
|
+
return toZoneNoon(matcher, timeZone, noonSafe);
|
|
4589
|
+
}
|
|
4590
|
+
if (Array.isArray(matcher)) {
|
|
4591
|
+
return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);
|
|
4592
|
+
}
|
|
4593
|
+
if (isDateRange(matcher)) {
|
|
4594
|
+
return __spreadProps(__spreadValues({}, matcher), {
|
|
4595
|
+
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
4596
|
+
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
4597
|
+
});
|
|
4598
|
+
}
|
|
4599
|
+
if (isDateInterval(matcher)) {
|
|
4600
|
+
return {
|
|
4601
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe),
|
|
4602
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4605
|
+
if (isDateAfterType(matcher)) {
|
|
4606
|
+
return {
|
|
4607
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
4608
|
+
};
|
|
4609
|
+
}
|
|
4610
|
+
if (isDateBeforeType(matcher)) {
|
|
4611
|
+
return {
|
|
4612
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe)
|
|
4613
|
+
};
|
|
4614
|
+
}
|
|
4615
|
+
return matcher;
|
|
4616
|
+
}
|
|
4617
|
+
function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
|
|
4618
|
+
if (!matchers) {
|
|
4619
|
+
return matchers;
|
|
4620
|
+
}
|
|
4621
|
+
if (Array.isArray(matchers)) {
|
|
4622
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));
|
|
4623
|
+
}
|
|
4624
|
+
return convertMatcher(matchers, timeZone, noonSafe);
|
|
4625
|
+
}
|
|
4626
|
+
|
|
4271
4627
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4272
4628
|
function DayPicker(initialProps) {
|
|
4273
4629
|
var _a, _b;
|
|
4274
4630
|
let props = initialProps;
|
|
4275
|
-
|
|
4276
|
-
|
|
4631
|
+
const timeZone = props.timeZone;
|
|
4632
|
+
if (timeZone) {
|
|
4633
|
+
props = __spreadProps(__spreadValues({}, initialProps), {
|
|
4634
|
+
timeZone
|
|
4635
|
+
});
|
|
4277
4636
|
if (props.today) {
|
|
4278
|
-
props.today =
|
|
4637
|
+
props.today = toTimeZone(props.today, timeZone);
|
|
4279
4638
|
}
|
|
4280
4639
|
if (props.month) {
|
|
4281
|
-
props.month =
|
|
4640
|
+
props.month = toTimeZone(props.month, timeZone);
|
|
4282
4641
|
}
|
|
4283
4642
|
if (props.defaultMonth) {
|
|
4284
|
-
props.defaultMonth =
|
|
4643
|
+
props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
|
|
4285
4644
|
}
|
|
4286
4645
|
if (props.startMonth) {
|
|
4287
|
-
props.startMonth =
|
|
4646
|
+
props.startMonth = toTimeZone(props.startMonth, timeZone);
|
|
4288
4647
|
}
|
|
4289
4648
|
if (props.endMonth) {
|
|
4290
|
-
props.endMonth =
|
|
4649
|
+
props.endMonth = toTimeZone(props.endMonth, timeZone);
|
|
4291
4650
|
}
|
|
4292
4651
|
if (props.mode === "single" && props.selected) {
|
|
4293
|
-
props.selected =
|
|
4652
|
+
props.selected = toTimeZone(props.selected, timeZone);
|
|
4294
4653
|
} else if (props.mode === "multiple" && props.selected) {
|
|
4295
|
-
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) =>
|
|
4654
|
+
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) => toTimeZone(date, timeZone));
|
|
4296
4655
|
} else if (props.mode === "range" && props.selected) {
|
|
4297
4656
|
props.selected = {
|
|
4298
|
-
from: props.selected.from ?
|
|
4299
|
-
to: props.selected.to ?
|
|
4657
|
+
from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
|
|
4658
|
+
to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
|
|
4300
4659
|
};
|
|
4301
4660
|
}
|
|
4661
|
+
if (props.disabled !== void 0) {
|
|
4662
|
+
props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
|
|
4663
|
+
}
|
|
4664
|
+
if (props.hidden !== void 0) {
|
|
4665
|
+
props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
|
|
4666
|
+
}
|
|
4667
|
+
if (props.modifiers) {
|
|
4668
|
+
const nextModifiers = {};
|
|
4669
|
+
Object.keys(props.modifiers).forEach((key) => {
|
|
4670
|
+
var _a2;
|
|
4671
|
+
nextModifiers[key] = convertMatchersToTimeZone((_a2 = props.modifiers) == null ? void 0 : _a2[key], timeZone);
|
|
4672
|
+
});
|
|
4673
|
+
props.modifiers = nextModifiers;
|
|
4674
|
+
}
|
|
4302
4675
|
}
|
|
4303
|
-
const { components, formatters: formatters2, labels, dateLib, locale, classNames } =
|
|
4304
|
-
|
|
4676
|
+
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo2(() => {
|
|
4677
|
+
var _a2;
|
|
4678
|
+
const locale2 = __spreadValues(__spreadValues({}, enUS2), props.locale);
|
|
4679
|
+
const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
|
|
4680
|
+
const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
|
|
4681
|
+
weekStartsOn,
|
|
4682
|
+
locale: locale2
|
|
4683
|
+
}) : void 0;
|
|
4684
|
+
const overrides = props.dateLib && noonOverrides ? __spreadValues(__spreadValues({}, noonOverrides), props.dateLib) : (_a2 = props.dateLib) != null ? _a2 : noonOverrides;
|
|
4305
4685
|
const dateLib2 = new DateLib({
|
|
4306
4686
|
locale: locale2,
|
|
4307
|
-
weekStartsOn
|
|
4687
|
+
weekStartsOn,
|
|
4308
4688
|
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
4309
4689
|
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
4310
4690
|
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
4311
4691
|
timeZone: props.timeZone,
|
|
4312
4692
|
numerals: props.numerals
|
|
4313
|
-
},
|
|
4693
|
+
}, overrides);
|
|
4314
4694
|
return {
|
|
4315
4695
|
dateLib: dateLib2,
|
|
4316
4696
|
components: getComponents(props.components),
|
|
4317
4697
|
formatters: getFormatters(props.formatters),
|
|
4318
|
-
labels:
|
|
4698
|
+
labels: getLabels(props.labels, dateLib2.options),
|
|
4319
4699
|
locale: locale2,
|
|
4320
4700
|
classNames: __spreadValues(__spreadValues({}, getDefaultClassNames()), props.classNames)
|
|
4321
4701
|
};
|
|
@@ -4329,20 +4709,24 @@ function DayPicker(initialProps) {
|
|
|
4329
4709
|
props.timeZone,
|
|
4330
4710
|
props.numerals,
|
|
4331
4711
|
props.dateLib,
|
|
4712
|
+
props.noonSafe,
|
|
4332
4713
|
props.components,
|
|
4333
4714
|
props.formatters,
|
|
4334
4715
|
props.labels,
|
|
4335
4716
|
props.classNames
|
|
4336
4717
|
]);
|
|
4718
|
+
if (!props.today) {
|
|
4719
|
+
props = __spreadProps(__spreadValues({}, props), { today: dateLib.today() });
|
|
4720
|
+
}
|
|
4337
4721
|
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4338
4722
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4339
4723
|
const calendar = useCalendar(props, dateLib);
|
|
4340
4724
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4341
4725
|
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
4342
4726
|
const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
|
|
4343
|
-
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4727
|
+
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : (() => false), dateLib);
|
|
4344
4728
|
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4345
|
-
const weekdays =
|
|
4729
|
+
const weekdays = useMemo2(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
|
|
4346
4730
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4347
4731
|
const handlePreviousClick = useCallback2(() => {
|
|
4348
4732
|
if (!previousMonth)
|
|
@@ -4360,6 +4744,9 @@ function DayPicker(initialProps) {
|
|
|
4360
4744
|
e.preventDefault();
|
|
4361
4745
|
e.stopPropagation();
|
|
4362
4746
|
setFocused(day);
|
|
4747
|
+
if (m.disabled) {
|
|
4748
|
+
return;
|
|
4749
|
+
}
|
|
4363
4750
|
select == null ? void 0 : select(day.date, m, e);
|
|
4364
4751
|
onDayClick == null ? void 0 : onDayClick(day.date, m, e);
|
|
4365
4752
|
}, [select, onDayClick, setFocused]);
|
|
@@ -4412,7 +4799,7 @@ function DayPicker(initialProps) {
|
|
|
4412
4799
|
const month = dateLib.setYear(dateLib.startOfMonth(date), selectedYear);
|
|
4413
4800
|
goToMonth(month);
|
|
4414
4801
|
}, [dateLib, goToMonth]);
|
|
4415
|
-
const { className, style } =
|
|
4802
|
+
const { className, style } = useMemo2(() => ({
|
|
4416
4803
|
className: [classNames[UI.Root], props.className].filter(Boolean).join(" "),
|
|
4417
4804
|
style: __spreadValues(__spreadValues({}, styles == null ? void 0 : styles[UI.Root]), props.style)
|
|
4418
4805
|
}), [classNames, props.className, props.style, styles]);
|
|
@@ -4488,10 +4875,7 @@ function DayPicker(initialProps) {
|
|
|
4488
4875
|
whiteSpace: "nowrap",
|
|
4489
4876
|
wordWrap: "normal"
|
|
4490
4877
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4491
|
-
) : (
|
|
4492
|
-
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
4493
|
-
React32.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4494
|
-
)),
|
|
4878
|
+
) : React32.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))),
|
|
4495
4879
|
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React32.createElement(
|
|
4496
4880
|
components.NextMonthButton,
|
|
4497
4881
|
{ 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 },
|
|
@@ -4511,8 +4895,7 @@ function DayPicker(initialProps) {
|
|
|
4511
4895
|
return React32.createElement(
|
|
4512
4896
|
components.Week,
|
|
4513
4897
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4514
|
-
showWeekNumber &&
|
|
4515
|
-
React32.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4898
|
+
showWeekNumber && React32.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4516
4899
|
locale
|
|
4517
4900
|
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4518
4901
|
week.days.map((day) => {
|
|
@@ -4529,10 +4912,7 @@ function DayPicker(initialProps) {
|
|
|
4529
4912
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4530
4913
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4531
4914
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4532
|
-
return (
|
|
4533
|
-
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
4534
|
-
React32.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 ? React32.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))
|
|
4535
|
-
);
|
|
4915
|
+
return React32.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 ? React32.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));
|
|
4536
4916
|
})
|
|
4537
4917
|
);
|
|
4538
4918
|
}))
|
|
@@ -4540,8 +4920,7 @@ function DayPicker(initialProps) {
|
|
|
4540
4920
|
);
|
|
4541
4921
|
})
|
|
4542
4922
|
),
|
|
4543
|
-
props.footer &&
|
|
4544
|
-
React32.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
4923
|
+
props.footer && React32.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
4545
4924
|
)
|
|
4546
4925
|
);
|
|
4547
4926
|
}
|
|
@@ -5603,7 +5982,7 @@ var Input = React41.forwardRef(
|
|
|
5603
5982
|
]);
|
|
5604
5983
|
const base = "block w-full bg-transparent text-foreground placeholder:text-muted-foreground outline-none transition disabled:opacity-50 disabled:cursor-not-allowed";
|
|
5605
5984
|
const sizeCls = size === "sm" ? "h-9 px-3 text-sm" : size === "lg" ? "h-12 px-5 text-base" : "h-11 px-4 text-sm";
|
|
5606
|
-
const
|
|
5985
|
+
const variants4 = {
|
|
5607
5986
|
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
5608
5987
|
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
5609
5988
|
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
@@ -5646,13 +6025,14 @@ var Input = React41.forwardRef(
|
|
|
5646
6025
|
disabled,
|
|
5647
6026
|
className: classNameDefault ? cn(
|
|
5648
6027
|
base,
|
|
5649
|
-
|
|
6028
|
+
variants4[variant],
|
|
5650
6029
|
variant === "flushed" ? specialSizeForFlushed : variant === "link" ? specialSizeForLink : sizeCls,
|
|
5651
6030
|
errorCls,
|
|
5652
6031
|
iconPadLeft,
|
|
5653
6032
|
iconPadRight,
|
|
5654
6033
|
className
|
|
5655
|
-
) : className
|
|
6034
|
+
) : className,
|
|
6035
|
+
"data-private": true
|
|
5656
6036
|
}, props)
|
|
5657
6037
|
),
|
|
5658
6038
|
trailing ? /* @__PURE__ */ jsx17(
|
|
@@ -5752,7 +6132,7 @@ var FormField = (_a) => {
|
|
|
5752
6132
|
Asterisk,
|
|
5753
6133
|
{
|
|
5754
6134
|
className: cn(
|
|
5755
|
-
"ml-
|
|
6135
|
+
"ml-px h-3 w-3 text-red-500",
|
|
5756
6136
|
requiredLabelClassName
|
|
5757
6137
|
)
|
|
5758
6138
|
}
|
|
@@ -5956,7 +6336,7 @@ var FormSelect = ({
|
|
|
5956
6336
|
Asterisk,
|
|
5957
6337
|
{
|
|
5958
6338
|
className: cn(
|
|
5959
|
-
"ml-
|
|
6339
|
+
"ml-1 h-3 w-3 text-red-500",
|
|
5960
6340
|
requiredLabelClassName
|
|
5961
6341
|
)
|
|
5962
6342
|
}
|
|
@@ -6162,7 +6542,8 @@ var InputOTPSlot = React44.forwardRef((_a, ref) => {
|
|
|
6162
6542
|
"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",
|
|
6163
6543
|
isActive && "z-10 ring-1 ring-ring",
|
|
6164
6544
|
className
|
|
6165
|
-
)
|
|
6545
|
+
),
|
|
6546
|
+
"data-private": true
|
|
6166
6547
|
}, props), {
|
|
6167
6548
|
children: [
|
|
6168
6549
|
char,
|
|
@@ -6790,12 +7171,9 @@ var ResizablePanelGroup = (_a) => {
|
|
|
6790
7171
|
"className"
|
|
6791
7172
|
]);
|
|
6792
7173
|
return /* @__PURE__ */ jsx29(
|
|
6793
|
-
ResizablePrimitive.
|
|
7174
|
+
ResizablePrimitive.Group,
|
|
6794
7175
|
__spreadValues({
|
|
6795
|
-
className: cn(
|
|
6796
|
-
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
6797
|
-
className
|
|
6798
|
-
)
|
|
7176
|
+
className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className)
|
|
6799
7177
|
}, props)
|
|
6800
7178
|
);
|
|
6801
7179
|
};
|
|
@@ -6809,7 +7187,7 @@ var ResizableHandle = (_a) => {
|
|
|
6809
7187
|
"className"
|
|
6810
7188
|
]);
|
|
6811
7189
|
return /* @__PURE__ */ jsx29(
|
|
6812
|
-
ResizablePrimitive.
|
|
7190
|
+
ResizablePrimitive.Separator,
|
|
6813
7191
|
__spreadProps(__spreadValues({
|
|
6814
7192
|
className: cn(
|
|
6815
7193
|
"relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
@@ -6968,7 +7346,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
|
|
|
6968
7346
|
__spreadProps(__spreadValues({
|
|
6969
7347
|
ref,
|
|
6970
7348
|
className: cn(
|
|
6971
|
-
"relative z-50 max-h-96 min-w-
|
|
7349
|
+
"relative z-50 max-h-96 min-w-32 overflow-hidden bg-popover border border-border text-popover-foreground rounded-md shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
6972
7350
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
6973
7351
|
className
|
|
6974
7352
|
),
|
|
@@ -6981,7 +7359,7 @@ var SelectContent = React54.forwardRef((_a, ref) => {
|
|
|
6981
7359
|
{
|
|
6982
7360
|
className: cn(
|
|
6983
7361
|
"p-1",
|
|
6984
|
-
position === "popper" && "h-
|
|
7362
|
+
position === "popper" && "h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)"
|
|
6985
7363
|
),
|
|
6986
7364
|
children
|
|
6987
7365
|
}
|
|
@@ -7010,7 +7388,7 @@ var SelectItem = React54.forwardRef((_a, ref) => {
|
|
|
7010
7388
|
__spreadProps(__spreadValues({
|
|
7011
7389
|
ref,
|
|
7012
7390
|
className: cn(
|
|
7013
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-
|
|
7391
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
7014
7392
|
className
|
|
7015
7393
|
)
|
|
7016
7394
|
}, props), {
|
|
@@ -7038,7 +7416,7 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7038
7416
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
7039
7417
|
import * as React55 from "react";
|
|
7040
7418
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
7041
|
-
var
|
|
7419
|
+
var Separator6 = React55.forwardRef(
|
|
7042
7420
|
(_a, ref) => {
|
|
7043
7421
|
var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
|
|
7044
7422
|
return /* @__PURE__ */ jsx33(
|
|
@@ -7056,7 +7434,7 @@ var Separator5 = React55.forwardRef(
|
|
|
7056
7434
|
);
|
|
7057
7435
|
}
|
|
7058
7436
|
);
|
|
7059
|
-
|
|
7437
|
+
Separator6.displayName = SeparatorPrimitive.Root.displayName;
|
|
7060
7438
|
|
|
7061
7439
|
// src/components/sheet.tsx
|
|
7062
7440
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
@@ -7815,7 +8193,7 @@ import {
|
|
|
7815
8193
|
useReactTable
|
|
7816
8194
|
} from "@tanstack/react-table";
|
|
7817
8195
|
import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon6 } from "lucide-react";
|
|
7818
|
-
import {
|
|
8196
|
+
import { jsx as jsx48, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7819
8197
|
function DataTable({
|
|
7820
8198
|
columns,
|
|
7821
8199
|
data,
|
|
@@ -7865,9 +8243,9 @@ function DataTable({
|
|
|
7865
8243
|
if (onPageChange) {
|
|
7866
8244
|
onPageChange(pagination.pageIndex + 1);
|
|
7867
8245
|
}
|
|
7868
|
-
}, [pagination]);
|
|
7869
|
-
return /* @__PURE__ */ jsxs23(
|
|
7870
|
-
/* @__PURE__ */
|
|
8246
|
+
}, [pagination, onPageChange]);
|
|
8247
|
+
return /* @__PURE__ */ jsxs23("div", { className: cn("rounded-md border bg-background flex flex-col", className), children: [
|
|
8248
|
+
/* @__PURE__ */ jsxs23(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
|
|
7871
8249
|
/* @__PURE__ */ jsxs23(Table, { className: cn("relative", tableClassName), children: [
|
|
7872
8250
|
/* @__PURE__ */ jsx48(TableHeader, { className: headerClassName, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx48(TableRow, { className: rowClassName, children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx48(TableHead, { className: headerClassName, children: header.isPlaceholder ? null : flexRender(
|
|
7873
8251
|
header.column.columnDef.header,
|
|
@@ -7895,23 +8273,26 @@ function DataTable({
|
|
|
7895
8273
|
) }) })
|
|
7896
8274
|
] }),
|
|
7897
8275
|
/* @__PURE__ */ jsx48(ScrollBar, { orientation: "horizontal" })
|
|
7898
|
-
] })
|
|
7899
|
-
/* @__PURE__ */ jsxs23("div", { className: "
|
|
7900
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex
|
|
7901
|
-
isRowsSelected
|
|
8276
|
+
] }),
|
|
8277
|
+
/* @__PURE__ */ jsxs23("div", { className: "border-t px-4 py-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
8278
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-1 flex-wrap items-center gap-2", children: [
|
|
8279
|
+
isRowsSelected && /* @__PURE__ */ jsxs23("div", { className: "text-muted-foreground text-sm", children: [
|
|
7902
8280
|
table.getFilteredSelectedRowModel().rows.length,
|
|
7903
8281
|
" ",
|
|
7904
8282
|
ofLabel,
|
|
7905
8283
|
" ",
|
|
7906
8284
|
table.getFilteredRowModel().rows.length,
|
|
7907
|
-
" "
|
|
7908
|
-
|
|
8285
|
+
" ",
|
|
8286
|
+
rowsSelectedLabel
|
|
8287
|
+
] }),
|
|
7909
8288
|
totalRows ? /* @__PURE__ */ jsxs23("div", { className: "text-sm text-muted-foreground", children: [
|
|
7910
8289
|
"Total: ",
|
|
7911
8290
|
totalRows,
|
|
7912
8291
|
" registros"
|
|
7913
|
-
] }) : null
|
|
7914
|
-
|
|
8292
|
+
] }) : null
|
|
8293
|
+
] }),
|
|
8294
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-end", children: [
|
|
8295
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
7915
8296
|
/* @__PURE__ */ jsx48("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
7916
8297
|
/* @__PURE__ */ jsxs23(
|
|
7917
8298
|
Select2,
|
|
@@ -7931,19 +8312,17 @@ function DataTable({
|
|
|
7931
8312
|
]
|
|
7932
8313
|
}
|
|
7933
8314
|
)
|
|
7934
|
-
] })
|
|
7935
|
-
] }),
|
|
7936
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex w-full items-center justify-between gap-2 sm:justify-end", children: [
|
|
7937
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
7938
|
-
pageLabel,
|
|
7939
|
-
" ",
|
|
7940
|
-
pagination.pageIndex + 1,
|
|
7941
|
-
" ",
|
|
7942
|
-
ofLabel,
|
|
7943
|
-
" ",
|
|
7944
|
-
pageCount
|
|
7945
8315
|
] }),
|
|
7946
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex items-center
|
|
8316
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
8317
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex w-[110px] items-center justify-center text-sm font-medium", children: [
|
|
8318
|
+
pageLabel,
|
|
8319
|
+
" ",
|
|
8320
|
+
pagination.pageIndex + 1,
|
|
8321
|
+
" ",
|
|
8322
|
+
ofLabel,
|
|
8323
|
+
" ",
|
|
8324
|
+
pageCount
|
|
8325
|
+
] }),
|
|
7947
8326
|
/* @__PURE__ */ jsx48(
|
|
7948
8327
|
Button,
|
|
7949
8328
|
{
|
|
@@ -8252,6 +8631,166 @@ function Dropzone({
|
|
|
8252
8631
|
] }, idx)) })
|
|
8253
8632
|
] });
|
|
8254
8633
|
}
|
|
8634
|
+
|
|
8635
|
+
// src/types/select.ts
|
|
8636
|
+
var inputVariants2 = {
|
|
8637
|
+
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
8638
|
+
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
8639
|
+
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
8640
|
+
filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
8641
|
+
// sin bordes laterales/superior, solo inferior; sin sombras ni radios
|
|
8642
|
+
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
8643
|
+
// sin estilos, útil para inputs embebidos o controles muy custom
|
|
8644
|
+
unstyled: "border-0 shadow-none focus:ring-0",
|
|
8645
|
+
// aspecto tipo enlace: inline height-auto, sin paddings ni borde
|
|
8646
|
+
link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
|
|
8647
|
+
};
|
|
8648
|
+
var variants2 = inputVariants2;
|
|
8649
|
+
|
|
8650
|
+
// src/components/ui/select.tsx
|
|
8651
|
+
import { jsx as jsx55, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
8652
|
+
function UiSelect({
|
|
8653
|
+
ref,
|
|
8654
|
+
label,
|
|
8655
|
+
placeholder,
|
|
8656
|
+
value,
|
|
8657
|
+
onChange,
|
|
8658
|
+
items,
|
|
8659
|
+
children,
|
|
8660
|
+
className,
|
|
8661
|
+
selectClassName,
|
|
8662
|
+
labelClassName,
|
|
8663
|
+
contentClassName,
|
|
8664
|
+
size = "md",
|
|
8665
|
+
variant = "outline",
|
|
8666
|
+
errorMessage,
|
|
8667
|
+
htmlFormItemId: formItemId
|
|
8668
|
+
}) {
|
|
8669
|
+
const triggerBase = "relative inline-flex w-full items-center justify-between outline-none transition disabled:opacity-50 disabled:cursor-not-allowed text-foreground placeholder:text-muted-foreground ring-offset-background";
|
|
8670
|
+
const sizeTrigger = {
|
|
8671
|
+
sm: "h-9 px-3 text-sm",
|
|
8672
|
+
md: "h-11 px-4 text-sm",
|
|
8673
|
+
lg: "h-12 px-5 text-base"
|
|
8674
|
+
};
|
|
8675
|
+
const specialFlushed = variant === "flushed" ? size === "sm" ? "h-9 text-sm" : size === "lg" ? "h-12 text-base" : "h-11 text-sm" : "";
|
|
8676
|
+
const specialLink = variant === "link" ? "text-sm" : "";
|
|
8677
|
+
const contentBase = "bg-popover text-popover-foreground border border-border rounded-md shadow-md";
|
|
8678
|
+
const itemSize = {
|
|
8679
|
+
sm: "h-8 text-sm",
|
|
8680
|
+
md: "h-9 text-sm",
|
|
8681
|
+
lg: "h-10 text-base"
|
|
8682
|
+
};
|
|
8683
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("w-full", selectClassName), children: [
|
|
8684
|
+
label ? /* @__PURE__ */ jsx55(
|
|
8685
|
+
Label3,
|
|
8686
|
+
{
|
|
8687
|
+
ref,
|
|
8688
|
+
className: cn(errorMessage && "text-destructive", labelClassName),
|
|
8689
|
+
htmlFor: formItemId,
|
|
8690
|
+
children: label
|
|
8691
|
+
}
|
|
8692
|
+
) : null,
|
|
8693
|
+
/* @__PURE__ */ jsxs30(Select2, { value, onValueChange: onChange, children: [
|
|
8694
|
+
/* @__PURE__ */ jsx55(
|
|
8695
|
+
SelectTrigger,
|
|
8696
|
+
{
|
|
8697
|
+
className: cn(
|
|
8698
|
+
triggerBase,
|
|
8699
|
+
variants2[variant],
|
|
8700
|
+
variant === "flushed" ? specialFlushed : variant === "link" ? specialLink : sizeTrigger[size],
|
|
8701
|
+
errorMessage && "ring-destructive focus:ring-destructive/40 border-destructive",
|
|
8702
|
+
className,
|
|
8703
|
+
label ? "mt-1" : ""
|
|
8704
|
+
),
|
|
8705
|
+
children: /* @__PURE__ */ jsx55(SelectValue, { placeholder })
|
|
8706
|
+
}
|
|
8707
|
+
),
|
|
8708
|
+
/* @__PURE__ */ jsx55(SelectContent, { className: cn(contentBase, contentClassName), children: children ? children : items ? items == null ? void 0 : items.map((item) => /* @__PURE__ */ jsx55(
|
|
8709
|
+
SelectItem,
|
|
8710
|
+
{
|
|
8711
|
+
value: item.value,
|
|
8712
|
+
className: cn(itemSize[size]),
|
|
8713
|
+
children: item.label
|
|
8714
|
+
},
|
|
8715
|
+
item.value
|
|
8716
|
+
)) : null })
|
|
8717
|
+
] }),
|
|
8718
|
+
errorMessage ? /* @__PURE__ */ jsx55("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
|
|
8719
|
+
] });
|
|
8720
|
+
}
|
|
8721
|
+
|
|
8722
|
+
// src/types/input.ts
|
|
8723
|
+
var inputVariants3 = {
|
|
8724
|
+
outline: "rounded-md border border-input bg-input backdrop-blur-sm shadow-sm hover:border-primary/60 focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
8725
|
+
// default variant
|
|
8726
|
+
soft: "rounded-md border border-transparent bg-muted/60 hover:bg-muted shadow-sm focus:bg-input/80 focus:ring-2 focus:ring-primary/20",
|
|
8727
|
+
// similar to 'filled' but lighter
|
|
8728
|
+
ghost: "rounded-md border border-transparent bg-transparent hover:bg-muted/50 focus:ring-2 focus:ring-ring",
|
|
8729
|
+
// no background, just hover/focus effect
|
|
8730
|
+
filled: "rounded-md border border-input bg-muted/70 hover:bg-muted shadow-inner focus:bg-input/70 focus:ring-2 focus:ring-primary/20",
|
|
8731
|
+
// solid background, inset shadow
|
|
8732
|
+
flushed: "rounded-none border-0 border-b border-input px-0 shadow-none focus:border-b-2 focus:border-primary focus:ring-0",
|
|
8733
|
+
// no lateral/top borders, only bottom; no shadows or rounding
|
|
8734
|
+
unstyled: "border-0 shadow-none focus:ring-0",
|
|
8735
|
+
// no styles, useful for embedded inputs or very custom controls
|
|
8736
|
+
link: "border-0 p-0 h-auto shadow-none bg-transparent text-primary underline-offset-4 focus:underline focus:ring-0"
|
|
8737
|
+
};
|
|
8738
|
+
var variants3 = inputVariants3;
|
|
8739
|
+
|
|
8740
|
+
// src/components/ui/input.tsx
|
|
8741
|
+
import { jsx as jsx56, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8742
|
+
function UiInput(_a) {
|
|
8743
|
+
var _b = _a, {
|
|
8744
|
+
ref,
|
|
8745
|
+
label,
|
|
8746
|
+
placeholder,
|
|
8747
|
+
onChange,
|
|
8748
|
+
className,
|
|
8749
|
+
classNameDefault,
|
|
8750
|
+
labelClassName,
|
|
8751
|
+
inputClassName,
|
|
8752
|
+
variant = "outline",
|
|
8753
|
+
errorMessage,
|
|
8754
|
+
htmlFormItemId: formItemId
|
|
8755
|
+
} = _b, inputProps = __objRest(_b, [
|
|
8756
|
+
"ref",
|
|
8757
|
+
"label",
|
|
8758
|
+
"placeholder",
|
|
8759
|
+
"onChange",
|
|
8760
|
+
"className",
|
|
8761
|
+
"classNameDefault",
|
|
8762
|
+
"labelClassName",
|
|
8763
|
+
"inputClassName",
|
|
8764
|
+
"variant",
|
|
8765
|
+
"errorMessage",
|
|
8766
|
+
"htmlFormItemId"
|
|
8767
|
+
]);
|
|
8768
|
+
return /* @__PURE__ */ jsxs31("div", { className: cn("w-full", inputClassName), children: [
|
|
8769
|
+
label ? /* @__PURE__ */ jsx56(
|
|
8770
|
+
Label3,
|
|
8771
|
+
{
|
|
8772
|
+
ref,
|
|
8773
|
+
className: cn(errorMessage && "text-destructive", labelClassName),
|
|
8774
|
+
htmlFor: formItemId,
|
|
8775
|
+
children: label
|
|
8776
|
+
}
|
|
8777
|
+
) : null,
|
|
8778
|
+
/* @__PURE__ */ jsx56(
|
|
8779
|
+
Input,
|
|
8780
|
+
__spreadProps(__spreadValues({}, inputProps), {
|
|
8781
|
+
onChange,
|
|
8782
|
+
placeholder,
|
|
8783
|
+
className: cn(
|
|
8784
|
+
"bg-input px-[0.9rem] py-5",
|
|
8785
|
+
className,
|
|
8786
|
+
variants3[variant]
|
|
8787
|
+
),
|
|
8788
|
+
classNameDefault
|
|
8789
|
+
})
|
|
8790
|
+
),
|
|
8791
|
+
errorMessage ? /* @__PURE__ */ jsx56("p", { className: "text-sm text-destructive mt-1 ", children: errorMessage }) : null
|
|
8792
|
+
] });
|
|
8793
|
+
}
|
|
8255
8794
|
export {
|
|
8256
8795
|
Accordion,
|
|
8257
8796
|
AccordionContent,
|
|
@@ -8433,7 +8972,7 @@ export {
|
|
|
8433
8972
|
SelectSeparator,
|
|
8434
8973
|
SelectTrigger,
|
|
8435
8974
|
SelectValue,
|
|
8436
|
-
|
|
8975
|
+
Separator6 as Separator,
|
|
8437
8976
|
Sheet,
|
|
8438
8977
|
SheetClose,
|
|
8439
8978
|
SheetContent,
|
|
@@ -8475,6 +9014,8 @@ export {
|
|
|
8475
9014
|
TooltipContent,
|
|
8476
9015
|
TooltipProvider,
|
|
8477
9016
|
TooltipTrigger,
|
|
9017
|
+
UiInput,
|
|
9018
|
+
UiSelect,
|
|
8478
9019
|
badgeVariants,
|
|
8479
9020
|
buttonVariants,
|
|
8480
9021
|
cn,
|