shadcn-ui-react 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +508 -386
- package/dist/index.d.cts +21 -15
- package/dist/index.d.ts +21 -15
- package/dist/index.js +508 -386
- package/dist/style.css +5 -4
- package/package.json +67 -67
package/dist/index.js
CHANGED
|
@@ -400,78 +400,29 @@ var Button = React5.forwardRef(
|
|
|
400
400
|
);
|
|
401
401
|
Button.displayName = "Button";
|
|
402
402
|
|
|
403
|
-
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
404
|
-
import React32, { useCallback as useCallback2, useMemo, useRef as useRef2 } from "react";
|
|
405
|
-
|
|
406
|
-
// node_modules/react-day-picker/dist/esm/UI.js
|
|
407
|
-
var UI;
|
|
408
|
-
(function(UI2) {
|
|
409
|
-
UI2["Root"] = "root";
|
|
410
|
-
UI2["Chevron"] = "chevron";
|
|
411
|
-
UI2["Day"] = "day";
|
|
412
|
-
UI2["DayButton"] = "day_button";
|
|
413
|
-
UI2["CaptionLabel"] = "caption_label";
|
|
414
|
-
UI2["Dropdowns"] = "dropdowns";
|
|
415
|
-
UI2["Dropdown"] = "dropdown";
|
|
416
|
-
UI2["DropdownRoot"] = "dropdown_root";
|
|
417
|
-
UI2["Footer"] = "footer";
|
|
418
|
-
UI2["MonthGrid"] = "month_grid";
|
|
419
|
-
UI2["MonthCaption"] = "month_caption";
|
|
420
|
-
UI2["MonthsDropdown"] = "months_dropdown";
|
|
421
|
-
UI2["Month"] = "month";
|
|
422
|
-
UI2["Months"] = "months";
|
|
423
|
-
UI2["Nav"] = "nav";
|
|
424
|
-
UI2["NextMonthButton"] = "button_next";
|
|
425
|
-
UI2["PreviousMonthButton"] = "button_previous";
|
|
426
|
-
UI2["Week"] = "week";
|
|
427
|
-
UI2["Weeks"] = "weeks";
|
|
428
|
-
UI2["Weekday"] = "weekday";
|
|
429
|
-
UI2["Weekdays"] = "weekdays";
|
|
430
|
-
UI2["WeekNumber"] = "week_number";
|
|
431
|
-
UI2["WeekNumberHeader"] = "week_number_header";
|
|
432
|
-
UI2["YearsDropdown"] = "years_dropdown";
|
|
433
|
-
})(UI || (UI = {}));
|
|
434
|
-
var DayFlag;
|
|
435
|
-
(function(DayFlag2) {
|
|
436
|
-
DayFlag2["disabled"] = "disabled";
|
|
437
|
-
DayFlag2["hidden"] = "hidden";
|
|
438
|
-
DayFlag2["outside"] = "outside";
|
|
439
|
-
DayFlag2["focused"] = "focused";
|
|
440
|
-
DayFlag2["today"] = "today";
|
|
441
|
-
})(DayFlag || (DayFlag = {}));
|
|
442
|
-
var SelectionState;
|
|
443
|
-
(function(SelectionState2) {
|
|
444
|
-
SelectionState2["range_end"] = "range_end";
|
|
445
|
-
SelectionState2["range_middle"] = "range_middle";
|
|
446
|
-
SelectionState2["range_start"] = "range_start";
|
|
447
|
-
SelectionState2["selected"] = "selected";
|
|
448
|
-
})(SelectionState || (SelectionState = {}));
|
|
449
|
-
var Animation;
|
|
450
|
-
(function(Animation2) {
|
|
451
|
-
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
452
|
-
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
453
|
-
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
454
|
-
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
455
|
-
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
456
|
-
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
457
|
-
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
458
|
-
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
459
|
-
})(Animation || (Animation = {}));
|
|
460
|
-
|
|
461
403
|
// node_modules/@date-fns/tz/constants/index.js
|
|
462
404
|
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
463
405
|
|
|
406
|
+
// node_modules/@date-fns/tz/tzName/index.js
|
|
407
|
+
function tzName(timeZone, date, format2 = "long") {
|
|
408
|
+
return new Intl.DateTimeFormat("en-US", {
|
|
409
|
+
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
410
|
+
hour: "numeric",
|
|
411
|
+
timeZone,
|
|
412
|
+
timeZoneName: format2
|
|
413
|
+
}).format(date).split(/\s/g).slice(2).join(" ");
|
|
414
|
+
}
|
|
415
|
+
|
|
464
416
|
// node_modules/@date-fns/tz/tzOffset/index.js
|
|
465
417
|
var offsetFormatCache = {};
|
|
466
418
|
var offsetCache = {};
|
|
467
419
|
function tzOffset(timeZone, date) {
|
|
468
420
|
try {
|
|
469
|
-
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-
|
|
421
|
+
const format2 = offsetFormatCache[timeZone] || (offsetFormatCache[timeZone] = new Intl.DateTimeFormat("en-US", {
|
|
470
422
|
timeZone,
|
|
471
|
-
hour: "numeric",
|
|
472
423
|
timeZoneName: "longOffset"
|
|
473
424
|
}).format);
|
|
474
|
-
const offsetStr = format2(date).split("GMT")[1]
|
|
425
|
+
const offsetStr = format2(date).split("GMT")[1];
|
|
475
426
|
if (offsetStr in offsetCache) return offsetCache[offsetStr];
|
|
476
427
|
return calcOffset(offsetStr, offsetStr.split(":"));
|
|
477
428
|
} catch (e) {
|
|
@@ -483,9 +434,10 @@ function tzOffset(timeZone, date) {
|
|
|
483
434
|
}
|
|
484
435
|
var offsetRe = /([+-]\d\d):?(\d\d)?/;
|
|
485
436
|
function calcOffset(cacheStr, values) {
|
|
486
|
-
const hours = +values[0];
|
|
437
|
+
const hours = +(values[0] || 0);
|
|
487
438
|
const minutes = +(values[1] || 0);
|
|
488
|
-
|
|
439
|
+
const seconds = +(values[2] || 0) / 60;
|
|
440
|
+
return offsetCache[cacheStr] = hours * 60 + minutes > 0 ? hours * 60 + minutes + seconds : hours * 60 - minutes - seconds;
|
|
489
441
|
}
|
|
490
442
|
|
|
491
443
|
// node_modules/@date-fns/tz/date/mini.js
|
|
@@ -524,7 +476,8 @@ var TZDateMini = class _TZDateMini extends Date {
|
|
|
524
476
|
return new _TZDateMini(+this, timeZone);
|
|
525
477
|
}
|
|
526
478
|
getTimezoneOffset() {
|
|
527
|
-
|
|
479
|
+
const offset = -tzOffset(this.timeZone, this);
|
|
480
|
+
return offset > 0 ? Math.floor(offset) : Math.ceil(offset);
|
|
528
481
|
}
|
|
529
482
|
//#endregion
|
|
530
483
|
//#region time
|
|
@@ -564,7 +517,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach((method) => {
|
|
|
564
517
|
});
|
|
565
518
|
function syncToInternal(date) {
|
|
566
519
|
date.internal.setTime(+date);
|
|
567
|
-
date.internal.
|
|
520
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() - Math.round(-tzOffset(date.timeZone, date) * 60));
|
|
568
521
|
}
|
|
569
522
|
function syncFromInternal(date) {
|
|
570
523
|
Date.prototype.setFullYear.call(date, date.internal.getUTCFullYear(), date.internal.getUTCMonth(), date.internal.getUTCDate());
|
|
@@ -572,7 +525,8 @@ function syncFromInternal(date) {
|
|
|
572
525
|
adjustToSystemTZ(date);
|
|
573
526
|
}
|
|
574
527
|
function adjustToSystemTZ(date) {
|
|
575
|
-
const
|
|
528
|
+
const baseOffset = tzOffset(date.timeZone, date);
|
|
529
|
+
const offset = baseOffset > 0 ? Math.floor(baseOffset) : Math.ceil(baseOffset);
|
|
576
530
|
const prevHour = /* @__PURE__ */ new Date(+date);
|
|
577
531
|
prevHour.setUTCHours(prevHour.getUTCHours() - 1);
|
|
578
532
|
const systemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
@@ -582,14 +536,24 @@ function adjustToSystemTZ(date) {
|
|
|
582
536
|
if (systemDSTChange && dstShift) date.internal.setUTCMinutes(date.internal.getUTCMinutes() + systemDSTChange);
|
|
583
537
|
const offsetDiff = systemOffset - offset;
|
|
584
538
|
if (offsetDiff) Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + offsetDiff);
|
|
585
|
-
const
|
|
539
|
+
const systemDate = /* @__PURE__ */ new Date(+date);
|
|
540
|
+
systemDate.setUTCSeconds(0);
|
|
541
|
+
const systemSecondsOffset = systemOffset > 0 ? systemDate.getSeconds() : (systemDate.getSeconds() - 60) % 60;
|
|
542
|
+
const secondsOffset = Math.round(-(tzOffset(date.timeZone, date) * 60)) % 60;
|
|
543
|
+
if (secondsOffset || systemSecondsOffset) {
|
|
544
|
+
date.internal.setUTCSeconds(date.internal.getUTCSeconds() + secondsOffset);
|
|
545
|
+
Date.prototype.setUTCSeconds.call(date, Date.prototype.getUTCSeconds.call(date) + secondsOffset + systemSecondsOffset);
|
|
546
|
+
}
|
|
547
|
+
const postBaseOffset = tzOffset(date.timeZone, date);
|
|
548
|
+
const postOffset = postBaseOffset > 0 ? Math.floor(postBaseOffset) : Math.ceil(postBaseOffset);
|
|
586
549
|
const postSystemOffset = -(/* @__PURE__ */ new Date(+date)).getTimezoneOffset();
|
|
587
550
|
const postOffsetDiff = postSystemOffset - postOffset;
|
|
588
551
|
const offsetChanged = postOffset !== offset;
|
|
589
552
|
const postDiff = postOffsetDiff - offsetDiff;
|
|
590
553
|
if (offsetChanged && postDiff) {
|
|
591
554
|
Date.prototype.setUTCMinutes.call(date, Date.prototype.getUTCMinutes.call(date) + postDiff);
|
|
592
|
-
const
|
|
555
|
+
const newBaseOffset = tzOffset(date.timeZone, date);
|
|
556
|
+
const newOffset = newBaseOffset > 0 ? Math.floor(newBaseOffset) : Math.ceil(newBaseOffset);
|
|
593
557
|
const offsetChange = postOffset - newOffset;
|
|
594
558
|
if (offsetChange) {
|
|
595
559
|
date.internal.setUTCMinutes(date.internal.getUTCMinutes() + offsetChange);
|
|
@@ -657,12 +621,6 @@ var TZDate = class _TZDate extends TZDateMini {
|
|
|
657
621
|
}
|
|
658
622
|
//#endregion
|
|
659
623
|
};
|
|
660
|
-
function tzName(tz, date) {
|
|
661
|
-
return new Intl.DateTimeFormat("en-GB", {
|
|
662
|
-
timeZone: tz,
|
|
663
|
-
timeZoneName: "long"
|
|
664
|
-
}).format(date).slice(12);
|
|
665
|
-
}
|
|
666
624
|
|
|
667
625
|
// node_modules/date-fns/constants.js
|
|
668
626
|
var daysInYear = 365.2425;
|
|
@@ -2508,10 +2466,10 @@ function endOfBroadcastWeek(date, dateLib) {
|
|
|
2508
2466
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
2509
2467
|
var DateLib = class {
|
|
2510
2468
|
/**
|
|
2511
|
-
* Creates an instance of DateLib
|
|
2469
|
+
* Creates an instance of `DateLib`.
|
|
2512
2470
|
*
|
|
2513
|
-
* @param options
|
|
2514
|
-
* @param overrides
|
|
2471
|
+
* @param options Configuration options for the date library.
|
|
2472
|
+
* @param overrides Custom overrides for the date library functions.
|
|
2515
2473
|
*/
|
|
2516
2474
|
constructor(options, overrides) {
|
|
2517
2475
|
this.Date = Date;
|
|
@@ -2565,7 +2523,7 @@ var DateLib = class {
|
|
|
2565
2523
|
};
|
|
2566
2524
|
this.endOfBroadcastWeek = (date) => {
|
|
2567
2525
|
var _a;
|
|
2568
|
-
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date
|
|
2526
|
+
return ((_a = this.overrides) == null ? void 0 : _a.endOfBroadcastWeek) ? this.overrides.endOfBroadcastWeek(date) : endOfBroadcastWeek(date, this);
|
|
2569
2527
|
};
|
|
2570
2528
|
this.endOfISOWeek = (date) => {
|
|
2571
2529
|
var _a;
|
|
@@ -2575,15 +2533,15 @@ var DateLib = class {
|
|
|
2575
2533
|
var _a;
|
|
2576
2534
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfMonth) ? this.overrides.endOfMonth(date) : endOfMonth(date);
|
|
2577
2535
|
};
|
|
2578
|
-
this.endOfWeek = (date) => {
|
|
2536
|
+
this.endOfWeek = (date, options2) => {
|
|
2579
2537
|
var _a;
|
|
2580
|
-
return ((_a = this.overrides) == null ? void 0 : _a.endOfWeek) ? this.overrides.endOfWeek(date,
|
|
2538
|
+
return ((_a = this.overrides) == null ? void 0 : _a.endOfWeek) ? this.overrides.endOfWeek(date, options2) : endOfWeek(date, this.options);
|
|
2581
2539
|
};
|
|
2582
2540
|
this.endOfYear = (date) => {
|
|
2583
2541
|
var _a;
|
|
2584
2542
|
return ((_a = this.overrides) == null ? void 0 : _a.endOfYear) ? this.overrides.endOfYear(date) : endOfYear(date);
|
|
2585
2543
|
};
|
|
2586
|
-
this.format = (date, formatStr) => {
|
|
2544
|
+
this.format = (date, formatStr, _options) => {
|
|
2587
2545
|
var _a;
|
|
2588
2546
|
const formatted = ((_a = this.overrides) == null ? void 0 : _a.format) ? this.overrides.format(date, formatStr, this.options) : format(date, formatStr, this.options);
|
|
2589
2547
|
if (this.options.numerals && this.options.numerals !== "latn") {
|
|
@@ -2595,15 +2553,15 @@ var DateLib = class {
|
|
|
2595
2553
|
var _a;
|
|
2596
2554
|
return ((_a = this.overrides) == null ? void 0 : _a.getISOWeek) ? this.overrides.getISOWeek(date) : getISOWeek(date);
|
|
2597
2555
|
};
|
|
2598
|
-
this.getMonth = (date) => {
|
|
2556
|
+
this.getMonth = (date, _options) => {
|
|
2599
2557
|
var _a;
|
|
2600
2558
|
return ((_a = this.overrides) == null ? void 0 : _a.getMonth) ? this.overrides.getMonth(date, this.options) : getMonth(date, this.options);
|
|
2601
2559
|
};
|
|
2602
|
-
this.getYear = (date) => {
|
|
2560
|
+
this.getYear = (date, _options) => {
|
|
2603
2561
|
var _a;
|
|
2604
2562
|
return ((_a = this.overrides) == null ? void 0 : _a.getYear) ? this.overrides.getYear(date, this.options) : getYear(date, this.options);
|
|
2605
2563
|
};
|
|
2606
|
-
this.getWeek = (date) => {
|
|
2564
|
+
this.getWeek = (date, _options) => {
|
|
2607
2565
|
var _a;
|
|
2608
2566
|
return ((_a = this.overrides) == null ? void 0 : _a.getWeek) ? this.overrides.getWeek(date, this.options) : getWeek(date, this.options);
|
|
2609
2567
|
};
|
|
@@ -2647,7 +2605,7 @@ var DateLib = class {
|
|
|
2647
2605
|
var _a;
|
|
2648
2606
|
return ((_a = this.overrides) == null ? void 0 : _a.setYear) ? this.overrides.setYear(date, year) : setYear(date, year);
|
|
2649
2607
|
};
|
|
2650
|
-
this.startOfBroadcastWeek = (date) => {
|
|
2608
|
+
this.startOfBroadcastWeek = (date, _dateLib) => {
|
|
2651
2609
|
var _a;
|
|
2652
2610
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfBroadcastWeek) ? this.overrides.startOfBroadcastWeek(date, this) : startOfBroadcastWeek(date, this);
|
|
2653
2611
|
};
|
|
@@ -2663,7 +2621,7 @@ var DateLib = class {
|
|
|
2663
2621
|
var _a;
|
|
2664
2622
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfMonth) ? this.overrides.startOfMonth(date) : startOfMonth(date);
|
|
2665
2623
|
};
|
|
2666
|
-
this.startOfWeek = (date) => {
|
|
2624
|
+
this.startOfWeek = (date, _options) => {
|
|
2667
2625
|
var _a;
|
|
2668
2626
|
return ((_a = this.overrides) == null ? void 0 : _a.startOfWeek) ? this.overrides.startOfWeek(date, this.options) : startOfWeek(date, this.options);
|
|
2669
2627
|
};
|
|
@@ -2675,9 +2633,11 @@ var DateLib = class {
|
|
|
2675
2633
|
this.overrides = overrides;
|
|
2676
2634
|
}
|
|
2677
2635
|
/**
|
|
2678
|
-
*
|
|
2636
|
+
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
2637
|
+
* digits.
|
|
2679
2638
|
*
|
|
2680
2639
|
* @since 9.5.0
|
|
2640
|
+
* @returns A record mapping Arabic digits to the target numerals.
|
|
2681
2641
|
*/
|
|
2682
2642
|
getDigitMap() {
|
|
2683
2643
|
const { numerals = "latn" } = this.options;
|
|
@@ -2691,20 +2651,22 @@ var DateLib = class {
|
|
|
2691
2651
|
return digitMap;
|
|
2692
2652
|
}
|
|
2693
2653
|
/**
|
|
2694
|
-
*
|
|
2654
|
+
* Replaces Arabic digits in a string with the target numbering system digits.
|
|
2695
2655
|
*
|
|
2696
2656
|
* @since 9.5.0
|
|
2657
|
+
* @param input The string containing Arabic digits.
|
|
2658
|
+
* @returns The string with digits replaced.
|
|
2697
2659
|
*/
|
|
2698
2660
|
replaceDigits(input) {
|
|
2699
2661
|
const digitMap = this.getDigitMap();
|
|
2700
2662
|
return input.replace(/\d/g, (digit) => digitMap[digit] || digit);
|
|
2701
2663
|
}
|
|
2702
2664
|
/**
|
|
2703
|
-
*
|
|
2665
|
+
* Formats a number using the configured numbering system.
|
|
2704
2666
|
*
|
|
2705
2667
|
* @since 9.5.0
|
|
2706
2668
|
* @param value The number to format.
|
|
2707
|
-
* @returns The formatted number.
|
|
2669
|
+
* @returns The formatted number as a string.
|
|
2708
2670
|
*/
|
|
2709
2671
|
formatNumber(value) {
|
|
2710
2672
|
return this.replaceDigits(value.toString());
|
|
@@ -2712,20 +2674,41 @@ var DateLib = class {
|
|
|
2712
2674
|
};
|
|
2713
2675
|
var defaultDateLib = new DateLib();
|
|
2714
2676
|
|
|
2715
|
-
// node_modules/react-day-picker/dist/esm/
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2677
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
2678
|
+
var CalendarDay = class {
|
|
2679
|
+
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
2680
|
+
this.date = date;
|
|
2681
|
+
this.displayMonth = displayMonth;
|
|
2682
|
+
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
2683
|
+
this.dateLib = dateLib;
|
|
2684
|
+
}
|
|
2685
|
+
/**
|
|
2686
|
+
* Checks if this day is equal to another `CalendarDay`, considering both the
|
|
2687
|
+
* date and the displayed month.
|
|
2688
|
+
*
|
|
2689
|
+
* @param day The `CalendarDay` to compare with.
|
|
2690
|
+
* @returns `true` if the days are equal, otherwise `false`.
|
|
2691
|
+
*/
|
|
2692
|
+
isEqualTo(day) {
|
|
2693
|
+
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
2694
|
+
}
|
|
2695
|
+
};
|
|
2696
|
+
|
|
2697
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
2698
|
+
var CalendarMonth = class {
|
|
2699
|
+
constructor(month, weeks) {
|
|
2700
|
+
this.date = month;
|
|
2701
|
+
this.weeks = weeks;
|
|
2702
|
+
}
|
|
2703
|
+
};
|
|
2704
|
+
|
|
2705
|
+
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
2706
|
+
var CalendarWeek = class {
|
|
2707
|
+
constructor(weekNumber, days) {
|
|
2708
|
+
this.days = days;
|
|
2709
|
+
this.weekNumber = weekNumber;
|
|
2710
|
+
}
|
|
2711
|
+
};
|
|
2729
2712
|
|
|
2730
2713
|
// node_modules/react-day-picker/dist/esm/components/custom-components.js
|
|
2731
2714
|
var custom_components_exports = {};
|
|
@@ -2774,13 +2757,16 @@ function CaptionLabel(props) {
|
|
|
2774
2757
|
import React8 from "react";
|
|
2775
2758
|
function Chevron(props) {
|
|
2776
2759
|
const { size = 24, orientation = "left", className } = props;
|
|
2777
|
-
return
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2760
|
+
return (
|
|
2761
|
+
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
2762
|
+
React8.createElement(
|
|
2763
|
+
"svg",
|
|
2764
|
+
{ className, width: size, height: size, viewBox: "0 0 24 24" },
|
|
2765
|
+
orientation === "up" && React8.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
2766
|
+
orientation === "down" && React8.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
2767
|
+
orientation === "left" && React8.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
2768
|
+
orientation === "right" && React8.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
2769
|
+
)
|
|
2784
2770
|
);
|
|
2785
2771
|
}
|
|
2786
2772
|
|
|
@@ -2806,6 +2792,63 @@ function DayButton(props) {
|
|
|
2806
2792
|
|
|
2807
2793
|
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
2808
2794
|
import React11 from "react";
|
|
2795
|
+
|
|
2796
|
+
// node_modules/react-day-picker/dist/esm/UI.js
|
|
2797
|
+
var UI;
|
|
2798
|
+
(function(UI2) {
|
|
2799
|
+
UI2["Root"] = "root";
|
|
2800
|
+
UI2["Chevron"] = "chevron";
|
|
2801
|
+
UI2["Day"] = "day";
|
|
2802
|
+
UI2["DayButton"] = "day_button";
|
|
2803
|
+
UI2["CaptionLabel"] = "caption_label";
|
|
2804
|
+
UI2["Dropdowns"] = "dropdowns";
|
|
2805
|
+
UI2["Dropdown"] = "dropdown";
|
|
2806
|
+
UI2["DropdownRoot"] = "dropdown_root";
|
|
2807
|
+
UI2["Footer"] = "footer";
|
|
2808
|
+
UI2["MonthGrid"] = "month_grid";
|
|
2809
|
+
UI2["MonthCaption"] = "month_caption";
|
|
2810
|
+
UI2["MonthsDropdown"] = "months_dropdown";
|
|
2811
|
+
UI2["Month"] = "month";
|
|
2812
|
+
UI2["Months"] = "months";
|
|
2813
|
+
UI2["Nav"] = "nav";
|
|
2814
|
+
UI2["NextMonthButton"] = "button_next";
|
|
2815
|
+
UI2["PreviousMonthButton"] = "button_previous";
|
|
2816
|
+
UI2["Week"] = "week";
|
|
2817
|
+
UI2["Weeks"] = "weeks";
|
|
2818
|
+
UI2["Weekday"] = "weekday";
|
|
2819
|
+
UI2["Weekdays"] = "weekdays";
|
|
2820
|
+
UI2["WeekNumber"] = "week_number";
|
|
2821
|
+
UI2["WeekNumberHeader"] = "week_number_header";
|
|
2822
|
+
UI2["YearsDropdown"] = "years_dropdown";
|
|
2823
|
+
})(UI || (UI = {}));
|
|
2824
|
+
var DayFlag;
|
|
2825
|
+
(function(DayFlag2) {
|
|
2826
|
+
DayFlag2["disabled"] = "disabled";
|
|
2827
|
+
DayFlag2["hidden"] = "hidden";
|
|
2828
|
+
DayFlag2["outside"] = "outside";
|
|
2829
|
+
DayFlag2["focused"] = "focused";
|
|
2830
|
+
DayFlag2["today"] = "today";
|
|
2831
|
+
})(DayFlag || (DayFlag = {}));
|
|
2832
|
+
var SelectionState;
|
|
2833
|
+
(function(SelectionState2) {
|
|
2834
|
+
SelectionState2["range_end"] = "range_end";
|
|
2835
|
+
SelectionState2["range_middle"] = "range_middle";
|
|
2836
|
+
SelectionState2["range_start"] = "range_start";
|
|
2837
|
+
SelectionState2["selected"] = "selected";
|
|
2838
|
+
})(SelectionState || (SelectionState = {}));
|
|
2839
|
+
var Animation;
|
|
2840
|
+
(function(Animation2) {
|
|
2841
|
+
Animation2["weeks_before_enter"] = "weeks_before_enter";
|
|
2842
|
+
Animation2["weeks_before_exit"] = "weeks_before_exit";
|
|
2843
|
+
Animation2["weeks_after_enter"] = "weeks_after_enter";
|
|
2844
|
+
Animation2["weeks_after_exit"] = "weeks_after_exit";
|
|
2845
|
+
Animation2["caption_after_enter"] = "caption_after_enter";
|
|
2846
|
+
Animation2["caption_after_exit"] = "caption_after_exit";
|
|
2847
|
+
Animation2["caption_before_enter"] = "caption_before_enter";
|
|
2848
|
+
Animation2["caption_before_exit"] = "caption_before_exit";
|
|
2849
|
+
})(Animation || (Animation = {}));
|
|
2850
|
+
|
|
2851
|
+
// node_modules/react-day-picker/dist/esm/components/Dropdown.js
|
|
2809
2852
|
function Dropdown(props) {
|
|
2810
2853
|
const _a = props, { options, className, components, classNames } = _a, selectProps = __objRest(_a, ["options", "className", "components", "classNames"]);
|
|
2811
2854
|
const cssClassSelect = [classNames[UI.Dropdown], className].join(" ");
|
|
@@ -2994,6 +3037,178 @@ function YearsDropdown(props) {
|
|
|
2994
3037
|
return React31.createElement(components.Dropdown, __spreadValues({}, props));
|
|
2995
3038
|
}
|
|
2996
3039
|
|
|
3040
|
+
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
3041
|
+
import React32, { useCallback as useCallback2, useMemo, useRef as useRef2 } from "react";
|
|
3042
|
+
|
|
3043
|
+
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3044
|
+
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
3045
|
+
let { from, to } = range;
|
|
3046
|
+
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
3047
|
+
if (from && to) {
|
|
3048
|
+
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
3049
|
+
if (isRangeInverted) {
|
|
3050
|
+
[from, to] = [to, from];
|
|
3051
|
+
}
|
|
3052
|
+
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
3053
|
+
return isInRange;
|
|
3054
|
+
}
|
|
3055
|
+
if (!excludeEnds && to) {
|
|
3056
|
+
return isSameDay2(to, date);
|
|
3057
|
+
}
|
|
3058
|
+
if (!excludeEnds && from) {
|
|
3059
|
+
return isSameDay2(from, date);
|
|
3060
|
+
}
|
|
3061
|
+
return false;
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
3065
|
+
function isDateInterval(matcher) {
|
|
3066
|
+
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
3067
|
+
}
|
|
3068
|
+
function isDateRange(value) {
|
|
3069
|
+
return Boolean(value && typeof value === "object" && "from" in value);
|
|
3070
|
+
}
|
|
3071
|
+
function isDateAfterType(value) {
|
|
3072
|
+
return Boolean(value && typeof value === "object" && "after" in value);
|
|
3073
|
+
}
|
|
3074
|
+
function isDateBeforeType(value) {
|
|
3075
|
+
return Boolean(value && typeof value === "object" && "before" in value);
|
|
3076
|
+
}
|
|
3077
|
+
function isDayOfWeekType(value) {
|
|
3078
|
+
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
3079
|
+
}
|
|
3080
|
+
function isDatesArray(value, dateLib) {
|
|
3081
|
+
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
3085
|
+
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
3086
|
+
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
3087
|
+
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
3088
|
+
return matchersArr.some((matcher) => {
|
|
3089
|
+
if (typeof matcher === "boolean") {
|
|
3090
|
+
return matcher;
|
|
3091
|
+
}
|
|
3092
|
+
if (dateLib.isDate(matcher)) {
|
|
3093
|
+
return isSameDay2(date, matcher);
|
|
3094
|
+
}
|
|
3095
|
+
if (isDatesArray(matcher, dateLib)) {
|
|
3096
|
+
return matcher.includes(date);
|
|
3097
|
+
}
|
|
3098
|
+
if (isDateRange(matcher)) {
|
|
3099
|
+
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
3100
|
+
}
|
|
3101
|
+
if (isDayOfWeekType(matcher)) {
|
|
3102
|
+
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
3103
|
+
return matcher.dayOfWeek === date.getDay();
|
|
3104
|
+
}
|
|
3105
|
+
return matcher.dayOfWeek.includes(date.getDay());
|
|
3106
|
+
}
|
|
3107
|
+
if (isDateInterval(matcher)) {
|
|
3108
|
+
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
3109
|
+
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
3110
|
+
const isDayBefore = diffBefore > 0;
|
|
3111
|
+
const isDayAfter = diffAfter < 0;
|
|
3112
|
+
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
3113
|
+
if (isClosedInterval) {
|
|
3114
|
+
return isDayAfter && isDayBefore;
|
|
3115
|
+
} else {
|
|
3116
|
+
return isDayBefore || isDayAfter;
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
if (isDateAfterType(matcher)) {
|
|
3120
|
+
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
3121
|
+
}
|
|
3122
|
+
if (isDateBeforeType(matcher)) {
|
|
3123
|
+
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
3124
|
+
}
|
|
3125
|
+
if (typeof matcher === "function") {
|
|
3126
|
+
return matcher(date);
|
|
3127
|
+
}
|
|
3128
|
+
return false;
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3133
|
+
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3134
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3135
|
+
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3136
|
+
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3137
|
+
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
3138
|
+
const internalModifiersMap = {
|
|
3139
|
+
[DayFlag.focused]: [],
|
|
3140
|
+
[DayFlag.outside]: [],
|
|
3141
|
+
[DayFlag.disabled]: [],
|
|
3142
|
+
[DayFlag.hidden]: [],
|
|
3143
|
+
[DayFlag.today]: []
|
|
3144
|
+
};
|
|
3145
|
+
const customModifiersMap = {};
|
|
3146
|
+
for (const day of days) {
|
|
3147
|
+
const { date, displayMonth } = day;
|
|
3148
|
+
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
3149
|
+
const isBeforeNavStart = Boolean(computedNavStart && isBefore2(date, computedNavStart));
|
|
3150
|
+
const isAfterNavEnd = Boolean(computedNavEnd && isAfter2(date, computedNavEnd));
|
|
3151
|
+
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3152
|
+
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || // Broadcast calendar will show outside days as default
|
|
3153
|
+
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3154
|
+
const isToday = isSameDay2(date, today != null ? today : dateLib.today());
|
|
3155
|
+
if (isOutside)
|
|
3156
|
+
internalModifiersMap.outside.push(day);
|
|
3157
|
+
if (isDisabled)
|
|
3158
|
+
internalModifiersMap.disabled.push(day);
|
|
3159
|
+
if (isHidden)
|
|
3160
|
+
internalModifiersMap.hidden.push(day);
|
|
3161
|
+
if (isToday)
|
|
3162
|
+
internalModifiersMap.today.push(day);
|
|
3163
|
+
if (modifiers) {
|
|
3164
|
+
Object.keys(modifiers).forEach((name) => {
|
|
3165
|
+
const modifierValue = modifiers == null ? void 0 : modifiers[name];
|
|
3166
|
+
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
3167
|
+
if (!isMatch)
|
|
3168
|
+
return;
|
|
3169
|
+
if (customModifiersMap[name]) {
|
|
3170
|
+
customModifiersMap[name].push(day);
|
|
3171
|
+
} else {
|
|
3172
|
+
customModifiersMap[name] = [day];
|
|
3173
|
+
}
|
|
3174
|
+
});
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
return (day) => {
|
|
3178
|
+
const dayFlags = {
|
|
3179
|
+
[DayFlag.focused]: false,
|
|
3180
|
+
[DayFlag.disabled]: false,
|
|
3181
|
+
[DayFlag.hidden]: false,
|
|
3182
|
+
[DayFlag.outside]: false,
|
|
3183
|
+
[DayFlag.today]: false
|
|
3184
|
+
};
|
|
3185
|
+
const customModifiers = {};
|
|
3186
|
+
for (const name in internalModifiersMap) {
|
|
3187
|
+
const days2 = internalModifiersMap[name];
|
|
3188
|
+
dayFlags[name] = days2.some((d) => d === day);
|
|
3189
|
+
}
|
|
3190
|
+
for (const name in customModifiersMap) {
|
|
3191
|
+
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
3192
|
+
}
|
|
3193
|
+
return __spreadValues(__spreadValues({}, dayFlags), customModifiers);
|
|
3194
|
+
};
|
|
3195
|
+
}
|
|
3196
|
+
|
|
3197
|
+
// node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js
|
|
3198
|
+
function getClassNamesForModifiers(modifiers, classNames, modifiersClassNames = {}) {
|
|
3199
|
+
const modifierClassNames = Object.entries(modifiers).filter(([, active]) => active === true).reduce((previousValue, [key]) => {
|
|
3200
|
+
if (modifiersClassNames[key]) {
|
|
3201
|
+
previousValue.push(modifiersClassNames[key]);
|
|
3202
|
+
} else if (classNames[DayFlag[key]]) {
|
|
3203
|
+
previousValue.push(classNames[DayFlag[key]]);
|
|
3204
|
+
} else if (classNames[SelectionState[key]]) {
|
|
3205
|
+
previousValue.push(classNames[SelectionState[key]]);
|
|
3206
|
+
}
|
|
3207
|
+
return previousValue;
|
|
3208
|
+
}, [classNames[UI.Day]]);
|
|
3209
|
+
return modifierClassNames;
|
|
3210
|
+
}
|
|
3211
|
+
|
|
2997
3212
|
// node_modules/react-day-picker/dist/esm/helpers/getComponents.js
|
|
2998
3213
|
function getComponents(customComponents) {
|
|
2999
3214
|
return __spreadValues(__spreadValues({}, custom_components_exports), customComponents);
|
|
@@ -3007,7 +3222,8 @@ function getDataAttributes(props) {
|
|
|
3007
3222
|
"data-required": "required" in props ? props.required : void 0,
|
|
3008
3223
|
"data-multiple-months": props.numberOfMonths && props.numberOfMonths > 1 || void 0,
|
|
3009
3224
|
"data-week-numbers": props.showWeekNumber || void 0,
|
|
3010
|
-
"data-broadcast-calendar": props.broadcastCalendar || void 0
|
|
3225
|
+
"data-broadcast-calendar": props.broadcastCalendar || void 0,
|
|
3226
|
+
"data-nav-layout": props.navLayout || void 0
|
|
3011
3227
|
};
|
|
3012
3228
|
Object.entries(props).forEach(([key, val]) => {
|
|
3013
3229
|
if (key.startsWith("data-")) {
|
|
@@ -3065,12 +3281,17 @@ function formatMonthDropdown(month, dateLib = defaultDateLib) {
|
|
|
3065
3281
|
return dateLib.format(month, "LLLL");
|
|
3066
3282
|
}
|
|
3067
3283
|
|
|
3284
|
+
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
3285
|
+
function formatWeekdayName(weekday, options, dateLib) {
|
|
3286
|
+
return (dateLib != null ? dateLib : new DateLib(options)).format(weekday, "cccccc");
|
|
3287
|
+
}
|
|
3288
|
+
|
|
3068
3289
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js
|
|
3069
|
-
function formatWeekNumber(weekNumber) {
|
|
3290
|
+
function formatWeekNumber(weekNumber, dateLib = defaultDateLib) {
|
|
3070
3291
|
if (weekNumber < 10) {
|
|
3071
|
-
return `0${weekNumber.toLocaleString()}
|
|
3292
|
+
return dateLib.formatNumber(`0${weekNumber.toLocaleString()}`);
|
|
3072
3293
|
}
|
|
3073
|
-
return `${weekNumber.toLocaleString()}
|
|
3294
|
+
return dateLib.formatNumber(`${weekNumber.toLocaleString()}`);
|
|
3074
3295
|
}
|
|
3075
3296
|
|
|
3076
3297
|
// node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js
|
|
@@ -3078,11 +3299,6 @@ function formatWeekNumberHeader() {
|
|
|
3078
3299
|
return ``;
|
|
3079
3300
|
}
|
|
3080
3301
|
|
|
3081
|
-
// node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js
|
|
3082
|
-
function formatWeekdayName(weekday, options, dateLib) {
|
|
3083
|
-
return (dateLib != null ? dateLib : new DateLib(options)).format(weekday, "cccccc");
|
|
3084
|
-
}
|
|
3085
|
-
|
|
3086
3302
|
// node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js
|
|
3087
3303
|
function formatYearDropdown(year, dateLib = defaultDateLib) {
|
|
3088
3304
|
return dateLib.format(year, "yyyy");
|
|
@@ -3138,7 +3354,7 @@ function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
|
3138
3354
|
}
|
|
3139
3355
|
|
|
3140
3356
|
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3141
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
3357
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3142
3358
|
if (!navStart)
|
|
3143
3359
|
return void 0;
|
|
3144
3360
|
if (!navEnd)
|
|
@@ -3152,6 +3368,8 @@ function getYearOptions(navStart, navEnd, formatters2, dateLib) {
|
|
|
3152
3368
|
years.push(year);
|
|
3153
3369
|
year = addYears2(year, 1);
|
|
3154
3370
|
}
|
|
3371
|
+
if (reverse)
|
|
3372
|
+
years.reverse();
|
|
3155
3373
|
return years.map((year2) => {
|
|
3156
3374
|
const label = formatters2.formatYearDropdown(year2, dateLib);
|
|
3157
3375
|
return {
|
|
@@ -3180,6 +3398,17 @@ __export(labels_exports, {
|
|
|
3180
3398
|
labelYearDropdown: () => labelYearDropdown
|
|
3181
3399
|
});
|
|
3182
3400
|
|
|
3401
|
+
// node_modules/react-day-picker/dist/esm/labels/labelDayButton.js
|
|
3402
|
+
function labelDayButton(date, modifiers, options, dateLib) {
|
|
3403
|
+
let label = (dateLib != null ? dateLib : new DateLib(options)).format(date, "PPPP");
|
|
3404
|
+
if (modifiers.today)
|
|
3405
|
+
label = `Today, ${label}`;
|
|
3406
|
+
if (modifiers.selected)
|
|
3407
|
+
label = `${label}, selected`;
|
|
3408
|
+
return label;
|
|
3409
|
+
}
|
|
3410
|
+
var labelDay = labelDayButton;
|
|
3411
|
+
|
|
3183
3412
|
// node_modules/react-day-picker/dist/esm/labels/labelGrid.js
|
|
3184
3413
|
function labelGrid(date, options, dateLib) {
|
|
3185
3414
|
return (dateLib != null ? dateLib : new DateLib(options)).format(date, "LLLL y");
|
|
@@ -3195,34 +3424,23 @@ function labelGridcell(date, modifiers, options, dateLib) {
|
|
|
3195
3424
|
return label;
|
|
3196
3425
|
}
|
|
3197
3426
|
|
|
3198
|
-
// node_modules/react-day-picker/dist/esm/labels/
|
|
3199
|
-
function
|
|
3200
|
-
|
|
3201
|
-
if (modifiers.today)
|
|
3202
|
-
label = `Today, ${label}`;
|
|
3203
|
-
if (modifiers.selected)
|
|
3204
|
-
label = `${label}, selected`;
|
|
3205
|
-
return label;
|
|
3427
|
+
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3428
|
+
function labelMonthDropdown(_options) {
|
|
3429
|
+
return "Choose the Month";
|
|
3206
3430
|
}
|
|
3207
|
-
var labelDay = labelDayButton;
|
|
3208
3431
|
|
|
3209
3432
|
// node_modules/react-day-picker/dist/esm/labels/labelNav.js
|
|
3210
3433
|
function labelNav() {
|
|
3211
3434
|
return "";
|
|
3212
3435
|
}
|
|
3213
3436
|
|
|
3214
|
-
// node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js
|
|
3215
|
-
function labelMonthDropdown(options) {
|
|
3216
|
-
return "Choose the Month";
|
|
3217
|
-
}
|
|
3218
|
-
|
|
3219
3437
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
3220
|
-
function labelNext(
|
|
3438
|
+
function labelNext(_month) {
|
|
3221
3439
|
return "Go to the Next Month";
|
|
3222
3440
|
}
|
|
3223
3441
|
|
|
3224
3442
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
3225
|
-
function labelPrevious(
|
|
3443
|
+
function labelPrevious(_month) {
|
|
3226
3444
|
return "Go to the Previous Month";
|
|
3227
3445
|
}
|
|
3228
3446
|
|
|
@@ -3232,17 +3450,17 @@ function labelWeekday(date, options, dateLib) {
|
|
|
3232
3450
|
}
|
|
3233
3451
|
|
|
3234
3452
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js
|
|
3235
|
-
function labelWeekNumber(weekNumber,
|
|
3453
|
+
function labelWeekNumber(weekNumber, _options) {
|
|
3236
3454
|
return `Week ${weekNumber}`;
|
|
3237
3455
|
}
|
|
3238
3456
|
|
|
3239
3457
|
// node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js
|
|
3240
|
-
function labelWeekNumberHeader(
|
|
3458
|
+
function labelWeekNumberHeader(_options) {
|
|
3241
3459
|
return "Week Number";
|
|
3242
3460
|
}
|
|
3243
3461
|
|
|
3244
3462
|
// node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js
|
|
3245
|
-
function labelYearDropdown(
|
|
3463
|
+
function labelYearDropdown(_options) {
|
|
3246
3464
|
return "Choose the Year";
|
|
3247
3465
|
}
|
|
3248
3466
|
|
|
@@ -3310,7 +3528,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
3310
3528
|
}
|
|
3311
3529
|
const previousMonthEls = previousRootElSnapshot instanceof HTMLElement ? queryMonthEls(previousRootElSnapshot) : [];
|
|
3312
3530
|
const currentMonthEls = queryMonthEls(rootElRef.current);
|
|
3313
|
-
if (currentMonthEls
|
|
3531
|
+
if ((currentMonthEls == null ? void 0 : currentMonthEls.every((el) => el instanceof HTMLElement)) && previousMonthEls && previousMonthEls.every((el) => el instanceof HTMLElement)) {
|
|
3314
3532
|
animatingRef.current = true;
|
|
3315
3533
|
const cleanUpFunctions = [];
|
|
3316
3534
|
rootElRef.current.style.isolation = "isolate";
|
|
@@ -3387,7 +3605,7 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3387
3605
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props != null ? props : {};
|
|
3388
3606
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3389
3607
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
3390
|
-
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth
|
|
3608
|
+
const endWeekLastDate = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
3391
3609
|
const nOfDays = differenceInCalendarDays2(endWeekLastDate, startWeekFirstDate);
|
|
3392
3610
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
3393
3611
|
const dates = [];
|
|
@@ -3414,12 +3632,11 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
3414
3632
|
function getDays(calendarMonths) {
|
|
3415
3633
|
const initialDays = [];
|
|
3416
3634
|
return calendarMonths.reduce((days, month) => {
|
|
3417
|
-
const initialDays2 = [];
|
|
3418
3635
|
const weekDays = month.weeks.reduce((weekDays2, week) => {
|
|
3419
|
-
return
|
|
3420
|
-
},
|
|
3421
|
-
return
|
|
3422
|
-
}, initialDays);
|
|
3636
|
+
return weekDays2.concat(week.days.slice());
|
|
3637
|
+
}, initialDays.slice());
|
|
3638
|
+
return days.concat(weekDays.slice());
|
|
3639
|
+
}, initialDays.slice());
|
|
3423
3640
|
}
|
|
3424
3641
|
|
|
3425
3642
|
// node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js
|
|
@@ -3437,60 +3654,26 @@ function getDisplayMonths(firstDisplayedMonth, calendarEndMonth, props, dateLib)
|
|
|
3437
3654
|
}
|
|
3438
3655
|
|
|
3439
3656
|
// node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js
|
|
3440
|
-
function getInitialMonth(props, dateLib) {
|
|
3441
|
-
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1
|
|
3657
|
+
function getInitialMonth(props, navStart, navEnd, dateLib) {
|
|
3658
|
+
const { month, defaultMonth, today = dateLib.today(), numberOfMonths = 1 } = props;
|
|
3442
3659
|
let initialMonth = month || defaultMonth || today;
|
|
3443
3660
|
const { differenceInCalendarMonths: differenceInCalendarMonths2, addMonths: addMonths2, startOfMonth: startOfMonth2 } = dateLib;
|
|
3444
|
-
if (
|
|
3661
|
+
if (navEnd && differenceInCalendarMonths2(navEnd, initialMonth) < numberOfMonths - 1) {
|
|
3445
3662
|
const offset = -1 * (numberOfMonths - 1);
|
|
3446
|
-
initialMonth = addMonths2(
|
|
3663
|
+
initialMonth = addMonths2(navEnd, offset);
|
|
3447
3664
|
}
|
|
3448
|
-
if (
|
|
3449
|
-
initialMonth =
|
|
3665
|
+
if (navStart && differenceInCalendarMonths2(initialMonth, navStart) < 0) {
|
|
3666
|
+
initialMonth = navStart;
|
|
3450
3667
|
}
|
|
3451
|
-
initialMonth = timeZone ? new TZDate(initialMonth, timeZone) : initialMonth;
|
|
3452
3668
|
return startOfMonth2(initialMonth);
|
|
3453
3669
|
}
|
|
3454
3670
|
|
|
3455
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarDay.js
|
|
3456
|
-
var CalendarDay = class {
|
|
3457
|
-
constructor(date, displayMonth, dateLib = defaultDateLib) {
|
|
3458
|
-
this.date = date;
|
|
3459
|
-
this.displayMonth = displayMonth;
|
|
3460
|
-
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date, displayMonth));
|
|
3461
|
-
this.dateLib = dateLib;
|
|
3462
|
-
}
|
|
3463
|
-
/**
|
|
3464
|
-
* Check if the day is the same as the given day: considering if it is in the
|
|
3465
|
-
* same display month.
|
|
3466
|
-
*/
|
|
3467
|
-
isEqualTo(day) {
|
|
3468
|
-
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
3469
|
-
}
|
|
3470
|
-
};
|
|
3471
|
-
|
|
3472
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js
|
|
3473
|
-
var CalendarMonth = class {
|
|
3474
|
-
constructor(month, weeks) {
|
|
3475
|
-
this.date = month;
|
|
3476
|
-
this.weeks = weeks;
|
|
3477
|
-
}
|
|
3478
|
-
};
|
|
3479
|
-
|
|
3480
|
-
// node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js
|
|
3481
|
-
var CalendarWeek = class {
|
|
3482
|
-
constructor(weekNumber, days) {
|
|
3483
|
-
this.days = days;
|
|
3484
|
-
this.weekNumber = weekNumber;
|
|
3485
|
-
}
|
|
3486
|
-
};
|
|
3487
|
-
|
|
3488
3671
|
// node_modules/react-day-picker/dist/esm/helpers/getMonths.js
|
|
3489
3672
|
function getMonths(displayMonths, dates, props, dateLib) {
|
|
3490
3673
|
const { addDays: addDays2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, getISOWeek: getISOWeek2, getWeek: getWeek2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
3491
3674
|
const dayPickerMonths = displayMonths.reduce((months, month) => {
|
|
3492
3675
|
const firstDateOfFirstWeek = props.broadcastCalendar ? startOfBroadcastWeek2(month, dateLib) : props.ISOWeek ? startOfISOWeek2(month) : startOfWeek2(month);
|
|
3493
|
-
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month
|
|
3676
|
+
const lastDateOfLastWeek = props.broadcastCalendar ? endOfBroadcastWeek2(month) : props.ISOWeek ? endOfISOWeek2(endOfMonth2(month)) : endOfWeek2(endOfMonth2(month));
|
|
3494
3677
|
const monthDates = dates.filter((date) => {
|
|
3495
3678
|
return date >= firstDateOfFirstWeek && date <= lastDateOfLastWeek;
|
|
3496
3679
|
});
|
|
@@ -3605,8 +3788,8 @@ function getPreviousMonth(firstDisplayedMonth, calendarStartMonth, options, date
|
|
|
3605
3788
|
function getWeeks(months) {
|
|
3606
3789
|
const initialWeeks = [];
|
|
3607
3790
|
return months.reduce((weeks, month) => {
|
|
3608
|
-
return
|
|
3609
|
-
}, initialWeeks);
|
|
3791
|
+
return weeks.concat(month.weeks.slice());
|
|
3792
|
+
}, initialWeeks.slice());
|
|
3610
3793
|
}
|
|
3611
3794
|
|
|
3612
3795
|
// node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js
|
|
@@ -3621,14 +3804,14 @@ function useControlledValue(defaultValue, controlledValue) {
|
|
|
3621
3804
|
function useCalendar(props, dateLib) {
|
|
3622
3805
|
const [navStart, navEnd] = getNavMonths(props, dateLib);
|
|
3623
3806
|
const { startOfMonth: startOfMonth2, endOfMonth: endOfMonth2 } = dateLib;
|
|
3624
|
-
const initialMonth = getInitialMonth(props, dateLib);
|
|
3807
|
+
const initialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3625
3808
|
const [firstMonth, setFirstMonth] = useControlledValue(
|
|
3626
3809
|
initialMonth,
|
|
3627
3810
|
// initialMonth is always computed from props.month if provided
|
|
3628
3811
|
props.month ? initialMonth : void 0
|
|
3629
3812
|
);
|
|
3630
3813
|
useEffect(() => {
|
|
3631
|
-
const newInitialMonth = getInitialMonth(props, dateLib);
|
|
3814
|
+
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
3632
3815
|
setFirstMonth(newInitialMonth);
|
|
3633
3816
|
}, [props.timeZone]);
|
|
3634
3817
|
const displayMonths = getDisplayMonths(firstMonth, navEnd, props, dateLib);
|
|
@@ -3715,95 +3898,6 @@ function calculateFocusTarget(days, getModifiers, isSelected, lastFocused) {
|
|
|
3715
3898
|
return focusTarget;
|
|
3716
3899
|
}
|
|
3717
3900
|
|
|
3718
|
-
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3719
|
-
function rangeIncludesDate(range, date, excludeEnds = false, dateLib = defaultDateLib) {
|
|
3720
|
-
let { from, to } = range;
|
|
3721
|
-
const { differenceInCalendarDays: differenceInCalendarDays2, isSameDay: isSameDay2 } = dateLib;
|
|
3722
|
-
if (from && to) {
|
|
3723
|
-
const isRangeInverted = differenceInCalendarDays2(to, from) < 0;
|
|
3724
|
-
if (isRangeInverted) {
|
|
3725
|
-
[from, to] = [to, from];
|
|
3726
|
-
}
|
|
3727
|
-
const isInRange = differenceInCalendarDays2(date, from) >= (excludeEnds ? 1 : 0) && differenceInCalendarDays2(to, date) >= (excludeEnds ? 1 : 0);
|
|
3728
|
-
return isInRange;
|
|
3729
|
-
}
|
|
3730
|
-
if (!excludeEnds && to) {
|
|
3731
|
-
return isSameDay2(to, date);
|
|
3732
|
-
}
|
|
3733
|
-
if (!excludeEnds && from) {
|
|
3734
|
-
return isSameDay2(from, date);
|
|
3735
|
-
}
|
|
3736
|
-
return false;
|
|
3737
|
-
}
|
|
3738
|
-
|
|
3739
|
-
// node_modules/react-day-picker/dist/esm/utils/typeguards.js
|
|
3740
|
-
function isDateInterval(matcher) {
|
|
3741
|
-
return Boolean(matcher && typeof matcher === "object" && "before" in matcher && "after" in matcher);
|
|
3742
|
-
}
|
|
3743
|
-
function isDateRange(value) {
|
|
3744
|
-
return Boolean(value && typeof value === "object" && "from" in value);
|
|
3745
|
-
}
|
|
3746
|
-
function isDateAfterType(value) {
|
|
3747
|
-
return Boolean(value && typeof value === "object" && "after" in value);
|
|
3748
|
-
}
|
|
3749
|
-
function isDateBeforeType(value) {
|
|
3750
|
-
return Boolean(value && typeof value === "object" && "before" in value);
|
|
3751
|
-
}
|
|
3752
|
-
function isDayOfWeekType(value) {
|
|
3753
|
-
return Boolean(value && typeof value === "object" && "dayOfWeek" in value);
|
|
3754
|
-
}
|
|
3755
|
-
function isDatesArray(value, dateLib) {
|
|
3756
|
-
return Array.isArray(value) && value.every(dateLib.isDate);
|
|
3757
|
-
}
|
|
3758
|
-
|
|
3759
|
-
// node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js
|
|
3760
|
-
function dateMatchModifiers(date, matchers, dateLib = defaultDateLib) {
|
|
3761
|
-
const matchersArr = !Array.isArray(matchers) ? [matchers] : matchers;
|
|
3762
|
-
const { isSameDay: isSameDay2, differenceInCalendarDays: differenceInCalendarDays2, isAfter: isAfter2 } = dateLib;
|
|
3763
|
-
return matchersArr.some((matcher) => {
|
|
3764
|
-
if (typeof matcher === "boolean") {
|
|
3765
|
-
return matcher;
|
|
3766
|
-
}
|
|
3767
|
-
if (dateLib.isDate(matcher)) {
|
|
3768
|
-
return isSameDay2(date, matcher);
|
|
3769
|
-
}
|
|
3770
|
-
if (isDatesArray(matcher, dateLib)) {
|
|
3771
|
-
return matcher.includes(date);
|
|
3772
|
-
}
|
|
3773
|
-
if (isDateRange(matcher)) {
|
|
3774
|
-
return rangeIncludesDate(matcher, date, false, dateLib);
|
|
3775
|
-
}
|
|
3776
|
-
if (isDayOfWeekType(matcher)) {
|
|
3777
|
-
if (!Array.isArray(matcher.dayOfWeek)) {
|
|
3778
|
-
return matcher.dayOfWeek === date.getDay();
|
|
3779
|
-
}
|
|
3780
|
-
return matcher.dayOfWeek.includes(date.getDay());
|
|
3781
|
-
}
|
|
3782
|
-
if (isDateInterval(matcher)) {
|
|
3783
|
-
const diffBefore = differenceInCalendarDays2(matcher.before, date);
|
|
3784
|
-
const diffAfter = differenceInCalendarDays2(matcher.after, date);
|
|
3785
|
-
const isDayBefore = diffBefore > 0;
|
|
3786
|
-
const isDayAfter = diffAfter < 0;
|
|
3787
|
-
const isClosedInterval = isAfter2(matcher.before, matcher.after);
|
|
3788
|
-
if (isClosedInterval) {
|
|
3789
|
-
return isDayAfter && isDayBefore;
|
|
3790
|
-
} else {
|
|
3791
|
-
return isDayBefore || isDayAfter;
|
|
3792
|
-
}
|
|
3793
|
-
}
|
|
3794
|
-
if (isDateAfterType(matcher)) {
|
|
3795
|
-
return differenceInCalendarDays2(date, matcher.after) > 0;
|
|
3796
|
-
}
|
|
3797
|
-
if (isDateBeforeType(matcher)) {
|
|
3798
|
-
return differenceInCalendarDays2(matcher.before, date) > 0;
|
|
3799
|
-
}
|
|
3800
|
-
if (typeof matcher === "function") {
|
|
3801
|
-
return matcher(date);
|
|
3802
|
-
}
|
|
3803
|
-
return false;
|
|
3804
|
-
});
|
|
3805
|
-
}
|
|
3806
|
-
|
|
3807
3901
|
// node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js
|
|
3808
3902
|
function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dateLib) {
|
|
3809
3903
|
const { ISOWeek, broadcastCalendar } = props;
|
|
@@ -3814,7 +3908,7 @@ function getFocusableDate(moveBy, moveDir, refDate, navStart, navEnd, props, dat
|
|
|
3814
3908
|
month: addMonths2,
|
|
3815
3909
|
year: addYears2,
|
|
3816
3910
|
startOfWeek: (date) => broadcastCalendar ? startOfBroadcastWeek2(date, dateLib) : ISOWeek ? startOfISOWeek2(date) : startOfWeek2(date),
|
|
3817
|
-
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date
|
|
3911
|
+
endOfWeek: (date) => broadcastCalendar ? endOfBroadcastWeek2(date) : ISOWeek ? endOfISOWeek2(date) : endOfWeek2(date)
|
|
3818
3912
|
};
|
|
3819
3913
|
let focusableDate = moveFns[moveBy](refDate, moveDir === "after" ? 1 : -1);
|
|
3820
3914
|
if (moveDir === "before" && navStart) {
|
|
@@ -3830,16 +3924,7 @@ function getNextFocus(moveBy, moveDir, refDay, calendarStartMonth, calendarEndMo
|
|
|
3830
3924
|
if (attempt > 365) {
|
|
3831
3925
|
return void 0;
|
|
3832
3926
|
}
|
|
3833
|
-
const focusableDate = getFocusableDate(
|
|
3834
|
-
moveBy,
|
|
3835
|
-
moveDir,
|
|
3836
|
-
refDay.date,
|
|
3837
|
-
// should be refDay? or refDay.date?
|
|
3838
|
-
calendarStartMonth,
|
|
3839
|
-
calendarEndMonth,
|
|
3840
|
-
props,
|
|
3841
|
-
dateLib
|
|
3842
|
-
);
|
|
3927
|
+
const focusableDate = getFocusableDate(moveBy, moveDir, refDay.date, calendarStartMonth, calendarEndMonth, props, dateLib);
|
|
3843
3928
|
const isDisabled = Boolean(props.disabled && dateMatchModifiers(focusableDate, props.disabled, dateLib));
|
|
3844
3929
|
const isHidden = Boolean(props.hidden && dateMatchModifiers(focusableDate, props.hidden, dateLib));
|
|
3845
3930
|
const targetMonth = focusableDate;
|
|
@@ -3882,71 +3967,6 @@ function useFocus(props, calendar, getModifiers, isSelected, dateLib) {
|
|
|
3882
3967
|
return useFocus2;
|
|
3883
3968
|
}
|
|
3884
3969
|
|
|
3885
|
-
// node_modules/react-day-picker/dist/esm/useGetModifiers.js
|
|
3886
|
-
function useGetModifiers(days, props, dateLib) {
|
|
3887
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3888
|
-
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3889
|
-
const startMonth = props.startMonth && startOfMonth2(props.startMonth);
|
|
3890
|
-
const endMonth = props.endMonth && endOfMonth2(props.endMonth);
|
|
3891
|
-
const internalModifiersMap = {
|
|
3892
|
-
[DayFlag.focused]: [],
|
|
3893
|
-
[DayFlag.outside]: [],
|
|
3894
|
-
[DayFlag.disabled]: [],
|
|
3895
|
-
[DayFlag.hidden]: [],
|
|
3896
|
-
[DayFlag.today]: []
|
|
3897
|
-
};
|
|
3898
|
-
const customModifiersMap = {};
|
|
3899
|
-
for (const day of days) {
|
|
3900
|
-
const { date, displayMonth } = day;
|
|
3901
|
-
const isOutside = Boolean(displayMonth && !isSameMonth2(date, displayMonth));
|
|
3902
|
-
const isBeforeStartMonth = Boolean(startMonth && isBefore2(date, startMonth));
|
|
3903
|
-
const isAfterEndMonth = Boolean(endMonth && isAfter2(date, endMonth));
|
|
3904
|
-
const isDisabled = Boolean(disabled && dateMatchModifiers(date, disabled, dateLib));
|
|
3905
|
-
const isHidden = Boolean(hidden && dateMatchModifiers(date, hidden, dateLib)) || isBeforeStartMonth || isAfterEndMonth || // Broadcast calendar will show outside days as default
|
|
3906
|
-
!broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3907
|
-
const isToday = isSameDay2(date, today != null ? today : dateLib.today());
|
|
3908
|
-
if (isOutside)
|
|
3909
|
-
internalModifiersMap.outside.push(day);
|
|
3910
|
-
if (isDisabled)
|
|
3911
|
-
internalModifiersMap.disabled.push(day);
|
|
3912
|
-
if (isHidden)
|
|
3913
|
-
internalModifiersMap.hidden.push(day);
|
|
3914
|
-
if (isToday)
|
|
3915
|
-
internalModifiersMap.today.push(day);
|
|
3916
|
-
if (modifiers) {
|
|
3917
|
-
Object.keys(modifiers).forEach((name) => {
|
|
3918
|
-
const modifierValue = modifiers == null ? void 0 : modifiers[name];
|
|
3919
|
-
const isMatch = modifierValue ? dateMatchModifiers(date, modifierValue, dateLib) : false;
|
|
3920
|
-
if (!isMatch)
|
|
3921
|
-
return;
|
|
3922
|
-
if (customModifiersMap[name]) {
|
|
3923
|
-
customModifiersMap[name].push(day);
|
|
3924
|
-
} else {
|
|
3925
|
-
customModifiersMap[name] = [day];
|
|
3926
|
-
}
|
|
3927
|
-
});
|
|
3928
|
-
}
|
|
3929
|
-
}
|
|
3930
|
-
return (day) => {
|
|
3931
|
-
const dayFlags = {
|
|
3932
|
-
[DayFlag.focused]: false,
|
|
3933
|
-
[DayFlag.disabled]: false,
|
|
3934
|
-
[DayFlag.hidden]: false,
|
|
3935
|
-
[DayFlag.outside]: false,
|
|
3936
|
-
[DayFlag.today]: false
|
|
3937
|
-
};
|
|
3938
|
-
const customModifiers = {};
|
|
3939
|
-
for (const name in internalModifiersMap) {
|
|
3940
|
-
const days2 = internalModifiersMap[name];
|
|
3941
|
-
dayFlags[name] = days2.some((d) => d === day);
|
|
3942
|
-
}
|
|
3943
|
-
for (const name in customModifiersMap) {
|
|
3944
|
-
customModifiers[name] = customModifiersMap[name].some((d) => d === day);
|
|
3945
|
-
}
|
|
3946
|
-
return __spreadValues(__spreadValues({}, dayFlags), customModifiers);
|
|
3947
|
-
};
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
3970
|
// node_modules/react-day-picker/dist/esm/selection/useMulti.js
|
|
3951
3971
|
function useMulti(props, dateLib) {
|
|
3952
3972
|
const { selected: initiallySelected, required, onSelect } = props;
|
|
@@ -3997,7 +4017,9 @@ function addToRange(date, initialRange, min2 = 0, max2 = 0, required = false, da
|
|
|
3997
4017
|
range = { from: date, to: min2 > 0 ? void 0 : date };
|
|
3998
4018
|
} else if (from && !to) {
|
|
3999
4019
|
if (isSameDay2(from, date)) {
|
|
4000
|
-
if (
|
|
4020
|
+
if (min2 === 0) {
|
|
4021
|
+
range = { from, to: date };
|
|
4022
|
+
} else if (required) {
|
|
4001
4023
|
range = { from, to: void 0 };
|
|
4002
4024
|
} else {
|
|
4003
4025
|
range = void 0;
|
|
@@ -4190,8 +4212,37 @@ function useSelection(props, dateLib) {
|
|
|
4190
4212
|
}
|
|
4191
4213
|
|
|
4192
4214
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4193
|
-
function DayPicker(
|
|
4194
|
-
var _a;
|
|
4215
|
+
function DayPicker(initialProps) {
|
|
4216
|
+
var _a, _b;
|
|
4217
|
+
let props = initialProps;
|
|
4218
|
+
if (props.timeZone) {
|
|
4219
|
+
props = __spreadValues({}, initialProps);
|
|
4220
|
+
if (props.today) {
|
|
4221
|
+
props.today = new TZDate(props.today, props.timeZone);
|
|
4222
|
+
}
|
|
4223
|
+
if (props.month) {
|
|
4224
|
+
props.month = new TZDate(props.month, props.timeZone);
|
|
4225
|
+
}
|
|
4226
|
+
if (props.defaultMonth) {
|
|
4227
|
+
props.defaultMonth = new TZDate(props.defaultMonth, props.timeZone);
|
|
4228
|
+
}
|
|
4229
|
+
if (props.startMonth) {
|
|
4230
|
+
props.startMonth = new TZDate(props.startMonth, props.timeZone);
|
|
4231
|
+
}
|
|
4232
|
+
if (props.endMonth) {
|
|
4233
|
+
props.endMonth = new TZDate(props.endMonth, props.timeZone);
|
|
4234
|
+
}
|
|
4235
|
+
if (props.mode === "single" && props.selected) {
|
|
4236
|
+
props.selected = new TZDate(props.selected, props.timeZone);
|
|
4237
|
+
} else if (props.mode === "multiple" && props.selected) {
|
|
4238
|
+
props.selected = (_a = props.selected) == null ? void 0 : _a.map((date) => new TZDate(date, props.timeZone));
|
|
4239
|
+
} else if (props.mode === "range" && props.selected) {
|
|
4240
|
+
props.selected = {
|
|
4241
|
+
from: props.selected.from ? new TZDate(props.selected.from, props.timeZone) : void 0,
|
|
4242
|
+
to: props.selected.to ? new TZDate(props.selected.to, props.timeZone) : void 0
|
|
4243
|
+
};
|
|
4244
|
+
}
|
|
4245
|
+
}
|
|
4195
4246
|
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo(() => {
|
|
4196
4247
|
const locale2 = __spreadValues(__spreadValues({}, enUS), props.locale);
|
|
4197
4248
|
const dateLib2 = new DateLib({
|
|
@@ -4226,14 +4277,14 @@ function DayPicker(props) {
|
|
|
4226
4277
|
props.labels,
|
|
4227
4278
|
props.classNames
|
|
4228
4279
|
]);
|
|
4229
|
-
const { captionLayout, mode, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4280
|
+
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4230
4281
|
const { formatCaption: formatCaption2, formatDay: formatDay2, formatMonthDropdown: formatMonthDropdown2, formatWeekNumber: formatWeekNumber2, formatWeekNumberHeader: formatWeekNumberHeader2, formatWeekdayName: formatWeekdayName2, formatYearDropdown: formatYearDropdown2 } = formatters2;
|
|
4231
4282
|
const calendar = useCalendar(props, dateLib);
|
|
4232
4283
|
const { days, months, navStart, navEnd, previousMonth, nextMonth, goToMonth } = calendar;
|
|
4233
|
-
const getModifiers =
|
|
4234
|
-
const { isSelected, select, selected: selectedValue } = (
|
|
4284
|
+
const getModifiers = createGetModifiers(days, props, navStart, navEnd, dateLib);
|
|
4285
|
+
const { isSelected, select, selected: selectedValue } = (_b = useSelection(props, dateLib)) != null ? _b : {};
|
|
4235
4286
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected != null ? isSelected : () => false, dateLib);
|
|
4236
|
-
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4287
|
+
const { labelDayButton: labelDayButton2, labelGridcell: labelGridcell2, labelGrid: labelGrid2, labelMonthDropdown: labelMonthDropdown2, labelNav: labelNav2, labelPrevious: labelPrevious2, labelNext: labelNext2, labelWeekday: labelWeekday2, labelWeekNumber: labelWeekNumber2, labelWeekNumberHeader: labelWeekNumberHeader2, labelYearDropdown: labelYearDropdown2 } = labels;
|
|
4237
4288
|
const weekdays = useMemo(() => getWeekdays(dateLib, props.ISOWeek), [dateLib, props.ISOWeek]);
|
|
4238
4289
|
const isInteractive = mode !== void 0 || onDayClick !== void 0;
|
|
4239
4290
|
const handlePreviousClick = useCallback2(() => {
|
|
@@ -4265,10 +4316,16 @@ function DayPicker(props) {
|
|
|
4265
4316
|
}, [blur, onDayBlur]);
|
|
4266
4317
|
const handleDayKeyDown = useCallback2((day, modifiers) => (e) => {
|
|
4267
4318
|
const keyMap = {
|
|
4268
|
-
ArrowLeft: [
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4319
|
+
ArrowLeft: [
|
|
4320
|
+
e.shiftKey ? "month" : "day",
|
|
4321
|
+
props.dir === "rtl" ? "after" : "before"
|
|
4322
|
+
],
|
|
4323
|
+
ArrowRight: [
|
|
4324
|
+
e.shiftKey ? "month" : "day",
|
|
4325
|
+
props.dir === "rtl" ? "before" : "after"
|
|
4326
|
+
],
|
|
4327
|
+
ArrowDown: [e.shiftKey ? "year" : "week", "after"],
|
|
4328
|
+
ArrowUp: [e.shiftKey ? "year" : "week", "before"],
|
|
4272
4329
|
PageUp: [e.shiftKey ? "year" : "month", "before"],
|
|
4273
4330
|
PageDown: [e.shiftKey ? "year" : "month", "after"],
|
|
4274
4331
|
Home: ["startOfWeek", "before"],
|
|
@@ -4335,18 +4392,29 @@ function DayPicker(props) {
|
|
|
4335
4392
|
React32.createElement(
|
|
4336
4393
|
components.Months,
|
|
4337
4394
|
{ className: classNames[UI.Months], style: styles == null ? void 0 : styles[UI.Months] },
|
|
4338
|
-
!props.hideNavigation && React32.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4395
|
+
!props.hideNavigation && !navLayout && React32.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4339
4396
|
months.map((calendarMonth, displayIndex) => {
|
|
4340
|
-
const dropdownMonths = getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib);
|
|
4341
|
-
const dropdownYears = getYearOptions(navStart, navEnd, formatters2, dateLib);
|
|
4342
4397
|
return React32.createElement(
|
|
4343
4398
|
components.Month,
|
|
4344
|
-
{
|
|
4399
|
+
{
|
|
4400
|
+
"data-animated-month": props.animate ? "true" : void 0,
|
|
4401
|
+
className: classNames[UI.Month],
|
|
4402
|
+
style: styles == null ? void 0 : styles[UI.Month],
|
|
4403
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
4404
|
+
key: displayIndex,
|
|
4405
|
+
displayIndex,
|
|
4406
|
+
calendarMonth
|
|
4407
|
+
},
|
|
4408
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === 0 && React32.createElement(
|
|
4409
|
+
components.PreviousMonthButton,
|
|
4410
|
+
{ type: "button", className: classNames[UI.PreviousMonthButton], tabIndex: previousMonth ? void 0 : -1, "aria-disabled": previousMonth ? void 0 : true, "aria-label": labelPrevious2(previousMonth), onClick: handlePreviousClick, "data-animated-button": props.animate ? "true" : void 0 },
|
|
4411
|
+
React32.createElement(components.Chevron, { disabled: previousMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "right" : "left" })
|
|
4412
|
+
),
|
|
4345
4413
|
React32.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")) ? React32.createElement(
|
|
4346
4414
|
components.DropdownNav,
|
|
4347
4415
|
{ className: classNames[UI.Dropdowns], style: styles == null ? void 0 : styles[UI.Dropdowns] },
|
|
4348
|
-
captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React32.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options:
|
|
4349
|
-
captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React32.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options:
|
|
4416
|
+
captionLayout === "dropdown" || captionLayout === "dropdown-months" ? React32.createElement(components.MonthsDropdown, { className: classNames[UI.MonthsDropdown], "aria-label": labelMonthDropdown2(), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleMonthChange(calendarMonth.date), options: getMonthOptions(calendarMonth.date, navStart, navEnd, formatters2, dateLib), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getMonth(calendarMonth.date) }) : React32.createElement("span", null, formatMonthDropdown2(calendarMonth.date, dateLib)),
|
|
4417
|
+
captionLayout === "dropdown" || captionLayout === "dropdown-years" ? React32.createElement(components.YearsDropdown, { className: classNames[UI.YearsDropdown], "aria-label": labelYearDropdown2(dateLib.options), classNames, components, disabled: Boolean(props.disableNavigation), onChange: handleYearChange(calendarMonth.date), options: getYearOptions(navStart, navEnd, formatters2, dateLib, Boolean(props.reverseYears)), style: styles == null ? void 0 : styles[UI.Dropdown], value: dateLib.getYear(calendarMonth.date) }) : React32.createElement("span", null, formatYearDropdown2(calendarMonth.date, dateLib)),
|
|
4350
4418
|
React32.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
4351
4419
|
border: 0,
|
|
4352
4420
|
clip: "rect(0 0 0 0)",
|
|
@@ -4359,7 +4427,16 @@ function DayPicker(props) {
|
|
|
4359
4427
|
whiteSpace: "nowrap",
|
|
4360
4428
|
wordWrap: "normal"
|
|
4361
4429
|
} }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4362
|
-
) :
|
|
4430
|
+
) : (
|
|
4431
|
+
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
4432
|
+
React32.createElement(components.CaptionLabel, { className: classNames[UI.CaptionLabel], role: "status", "aria-live": "polite" }, formatCaption2(calendarMonth.date, dateLib.options, dateLib))
|
|
4433
|
+
)),
|
|
4434
|
+
navLayout === "around" && !props.hideNavigation && displayIndex === numberOfMonths - 1 && React32.createElement(
|
|
4435
|
+
components.NextMonthButton,
|
|
4436
|
+
{ 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 },
|
|
4437
|
+
React32.createElement(components.Chevron, { disabled: nextMonth ? void 0 : true, className: classNames[UI.Chevron], orientation: props.dir === "rtl" ? "left" : "right" })
|
|
4438
|
+
),
|
|
4439
|
+
displayIndex === numberOfMonths - 1 && navLayout === "after" && !props.hideNavigation && React32.createElement(components.Nav, { "data-animated-nav": props.animate ? "true" : void 0, className: classNames[UI.Nav], style: styles == null ? void 0 : styles[UI.Nav], "aria-label": labelNav2(), onPreviousClick: handlePreviousClick, onNextClick: handleNextClick, previousMonth, nextMonth }),
|
|
4363
4440
|
React32.createElement(
|
|
4364
4441
|
components.MonthGrid,
|
|
4365
4442
|
{ role: "grid", "aria-multiselectable": mode === "multiple" || mode === "range", "aria-label": labelGrid2(calendarMonth.date, dateLib.options, dateLib) || void 0, className: classNames[UI.MonthGrid], style: styles == null ? void 0 : styles[UI.MonthGrid] },
|
|
@@ -4367,15 +4444,16 @@ function DayPicker(props) {
|
|
|
4367
4444
|
components.Weekdays,
|
|
4368
4445
|
{ "data-animated-weekdays": props.animate ? "true" : void 0, className: classNames[UI.Weekdays], style: styles == null ? void 0 : styles[UI.Weekdays] },
|
|
4369
4446
|
showWeekNumber && React32.createElement(components.WeekNumberHeader, { "aria-label": labelWeekNumberHeader2(dateLib.options), className: classNames[UI.WeekNumberHeader], style: styles == null ? void 0 : styles[UI.WeekNumberHeader], scope: "col" }, formatWeekNumberHeader2()),
|
|
4370
|
-
weekdays.map((weekday
|
|
4447
|
+
weekdays.map((weekday) => React32.createElement(components.Weekday, { "aria-label": labelWeekday2(weekday, dateLib.options, dateLib), className: classNames[UI.Weekday], key: String(weekday), style: styles == null ? void 0 : styles[UI.Weekday], scope: "col" }, formatWeekdayName2(weekday, dateLib.options, dateLib)))
|
|
4371
4448
|
),
|
|
4372
|
-
React32.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week
|
|
4449
|
+
React32.createElement(components.Weeks, { "data-animated-weeks": props.animate ? "true" : void 0, className: classNames[UI.Weeks], style: styles == null ? void 0 : styles[UI.Weeks] }, calendarMonth.weeks.map((week) => {
|
|
4373
4450
|
return React32.createElement(
|
|
4374
4451
|
components.Week,
|
|
4375
4452
|
{ className: classNames[UI.Week], key: week.weekNumber, style: styles == null ? void 0 : styles[UI.Week], week },
|
|
4376
|
-
showWeekNumber &&
|
|
4453
|
+
showWeekNumber && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
4454
|
+
React32.createElement(components.WeekNumber, { week, style: styles == null ? void 0 : styles[UI.WeekNumber], "aria-label": labelWeekNumber2(week.weekNumber, {
|
|
4377
4455
|
locale
|
|
4378
|
-
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber)),
|
|
4456
|
+
}), className: classNames[UI.WeekNumber], scope: "row", role: "rowheader" }, formatWeekNumber2(week.weekNumber, dateLib)),
|
|
4379
4457
|
week.days.map((day) => {
|
|
4380
4458
|
const { date } = day;
|
|
4381
4459
|
const modifiers = getModifiers(day);
|
|
@@ -4390,7 +4468,10 @@ function DayPicker(props) {
|
|
|
4390
4468
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4391
4469
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4392
4470
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell2(date, modifiers, dateLib.options, dateLib) : void 0;
|
|
4393
|
-
return
|
|
4471
|
+
return (
|
|
4472
|
+
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
4473
|
+
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))
|
|
4474
|
+
);
|
|
4394
4475
|
})
|
|
4395
4476
|
);
|
|
4396
4477
|
}))
|
|
@@ -4398,7 +4479,8 @@ function DayPicker(props) {
|
|
|
4398
4479
|
);
|
|
4399
4480
|
})
|
|
4400
4481
|
),
|
|
4401
|
-
props.footer &&
|
|
4482
|
+
props.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
4483
|
+
React32.createElement(components.Footer, { className: classNames[UI.Footer], style: styles == null ? void 0 : styles[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)
|
|
4402
4484
|
)
|
|
4403
4485
|
);
|
|
4404
4486
|
}
|
|
@@ -5460,15 +5542,15 @@ import * as React42 from "react";
|
|
|
5460
5542
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
5461
5543
|
var Input = React42.forwardRef(
|
|
5462
5544
|
(_a, ref) => {
|
|
5463
|
-
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
5545
|
+
var _b = _a, { className, classNameDefault, type } = _b, props = __objRest(_b, ["className", "classNameDefault", "type"]);
|
|
5464
5546
|
return /* @__PURE__ */ jsx18(
|
|
5465
5547
|
"input",
|
|
5466
5548
|
__spreadValues({
|
|
5467
5549
|
type,
|
|
5468
|
-
className: cn(
|
|
5550
|
+
className: classNameDefault ? cn(
|
|
5469
5551
|
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
5470
5552
|
className
|
|
5471
|
-
),
|
|
5553
|
+
) : className,
|
|
5472
5554
|
ref
|
|
5473
5555
|
}, props)
|
|
5474
5556
|
);
|
|
@@ -5490,6 +5572,7 @@ var FormField = (_a) => {
|
|
|
5490
5572
|
placeholder,
|
|
5491
5573
|
requiredLabel,
|
|
5492
5574
|
className = "px-4 py-6 shadow-inner drop-shadow-xl",
|
|
5575
|
+
classNameDefault,
|
|
5493
5576
|
labelClassName,
|
|
5494
5577
|
messageClassName,
|
|
5495
5578
|
requiredLabelClassName,
|
|
@@ -5504,6 +5587,7 @@ var FormField = (_a) => {
|
|
|
5504
5587
|
"placeholder",
|
|
5505
5588
|
"requiredLabel",
|
|
5506
5589
|
"className",
|
|
5590
|
+
"classNameDefault",
|
|
5507
5591
|
"labelClassName",
|
|
5508
5592
|
"messageClassName",
|
|
5509
5593
|
"requiredLabelClassName",
|
|
@@ -5546,7 +5630,8 @@ var FormField = (_a) => {
|
|
|
5546
5630
|
onChange == null ? void 0 : onChange(e.target.value);
|
|
5547
5631
|
},
|
|
5548
5632
|
placeholder,
|
|
5549
|
-
className
|
|
5633
|
+
className,
|
|
5634
|
+
classNameDefault: classNameDefault != null ? classNameDefault : true
|
|
5550
5635
|
})
|
|
5551
5636
|
) }),
|
|
5552
5637
|
fieldError && /* @__PURE__ */ jsx19(FormMessage, { className: messageClassName, children: fieldError })
|
|
@@ -6459,6 +6544,7 @@ function SearchInput({
|
|
|
6459
6544
|
value,
|
|
6460
6545
|
placeholder,
|
|
6461
6546
|
className,
|
|
6547
|
+
classNameDefault,
|
|
6462
6548
|
debounceTime = 750,
|
|
6463
6549
|
onSearch
|
|
6464
6550
|
}) {
|
|
@@ -6479,7 +6565,8 @@ function SearchInput({
|
|
|
6479
6565
|
placeholder: placeholder || `Search...`,
|
|
6480
6566
|
value: searchTerm,
|
|
6481
6567
|
onChange: (event) => setSearchTerm(event.target.value),
|
|
6482
|
-
className: cn("w-full md:max-w-sm", className)
|
|
6568
|
+
className: cn("w-full md:max-w-sm", className),
|
|
6569
|
+
classNameDefault: classNameDefault != null ? classNameDefault : true
|
|
6483
6570
|
}
|
|
6484
6571
|
);
|
|
6485
6572
|
}
|
|
@@ -7414,6 +7501,7 @@ function DataTable({
|
|
|
7414
7501
|
ofLabel = "of",
|
|
7415
7502
|
pageLabel = "Page",
|
|
7416
7503
|
isRowsSelected = true,
|
|
7504
|
+
totalRows,
|
|
7417
7505
|
rowsSelectedLabel = "row(s) selected",
|
|
7418
7506
|
className,
|
|
7419
7507
|
emptyData,
|
|
@@ -7453,6 +7541,35 @@ function DataTable({
|
|
|
7453
7541
|
}
|
|
7454
7542
|
}, [pagination]);
|
|
7455
7543
|
return /* @__PURE__ */ jsxs22(Fragment2, { children: [
|
|
7544
|
+
/* @__PURE__ */ jsxs22("div", { className: "rounded-md border", children: [
|
|
7545
|
+
/* @__PURE__ */ jsx48(Table, { className: cn("relative", tableClassName), children: /* @__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(
|
|
7546
|
+
header.column.columnDef.header,
|
|
7547
|
+
header.getContext()
|
|
7548
|
+
) }, header.id)) }, headerGroup.id)) }) }),
|
|
7549
|
+
/* @__PURE__ */ jsxs22(ScrollArea, { className: "h-[calc(80vh-220px)] md:h-[calc(80dvh-80px)]", children: [
|
|
7550
|
+
/* @__PURE__ */ jsx48(Table, { className: cn("relative", tableClassName), children: /* @__PURE__ */ jsx48(TableBody, { className: bodyClassName, children: table.getRowModel().rows.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx48(
|
|
7551
|
+
TableRow,
|
|
7552
|
+
{
|
|
7553
|
+
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
7554
|
+
onClick: () => onClickItem(row.original),
|
|
7555
|
+
className: rowClassName,
|
|
7556
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx48(TableCell, { className: cellClassName, children: flexRender(
|
|
7557
|
+
cell.column.columnDef.cell,
|
|
7558
|
+
cell.getContext()
|
|
7559
|
+
) }, cell.id))
|
|
7560
|
+
},
|
|
7561
|
+
row.id
|
|
7562
|
+
)) : emptyData || /* @__PURE__ */ jsx48(TableRow, { children: /* @__PURE__ */ jsx48(
|
|
7563
|
+
TableCell,
|
|
7564
|
+
{
|
|
7565
|
+
colSpan: columns.length,
|
|
7566
|
+
className: "h-24 text-center",
|
|
7567
|
+
children: "No results."
|
|
7568
|
+
}
|
|
7569
|
+
) }) }) }),
|
|
7570
|
+
/* @__PURE__ */ jsx48(ScrollBar, { orientation: "horizontal" })
|
|
7571
|
+
] })
|
|
7572
|
+
] }),
|
|
7456
7573
|
/* @__PURE__ */ jsxs22(
|
|
7457
7574
|
ScrollArea,
|
|
7458
7575
|
{
|
|
@@ -7501,6 +7618,11 @@ function DataTable({
|
|
|
7501
7618
|
table.getFilteredRowModel().rows.length,
|
|
7502
7619
|
" " + rowsSelectedLabel
|
|
7503
7620
|
] }) : null,
|
|
7621
|
+
totalRows ? /* @__PURE__ */ jsxs22("div", { className: "text-sm text-muted-foreground", children: [
|
|
7622
|
+
"Total: ",
|
|
7623
|
+
totalRows,
|
|
7624
|
+
" registros"
|
|
7625
|
+
] }) : null,
|
|
7504
7626
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center space-x-2", children: [
|
|
7505
7627
|
/* @__PURE__ */ jsx48("p", { className: "text-sm font-medium whitespace-nowrap", children: rowPerPageLabel }),
|
|
7506
7628
|
/* @__PURE__ */ jsxs22(
|