mino-daisy-react 1.1.15 → 1.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +449 -103
- package/package.json +22 -22
package/dist/index.js
CHANGED
|
@@ -3108,6 +3108,65 @@ function endOfBroadcastWeek(date2, dateLib) {
|
|
|
3108
3108
|
return endDate;
|
|
3109
3109
|
}
|
|
3110
3110
|
|
|
3111
|
+
// node_modules/react-day-picker/dist/esm/locale/en-US.js
|
|
3112
|
+
var enUS2 = {
|
|
3113
|
+
...enUS,
|
|
3114
|
+
labels: {
|
|
3115
|
+
labelDayButton: (date2, modifiers, options, dateLib) => {
|
|
3116
|
+
let formatDate;
|
|
3117
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
3118
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
3119
|
+
} else {
|
|
3120
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
|
|
3121
|
+
}
|
|
3122
|
+
let label = formatDate(date2, "PPPP");
|
|
3123
|
+
if (modifiers.today)
|
|
3124
|
+
label = `Today, ${label}`;
|
|
3125
|
+
if (modifiers.selected)
|
|
3126
|
+
label = `${label}, selected`;
|
|
3127
|
+
return label;
|
|
3128
|
+
},
|
|
3129
|
+
labelMonthDropdown: "Choose the Month",
|
|
3130
|
+
labelNext: "Go to the Next Month",
|
|
3131
|
+
labelPrevious: "Go to the Previous Month",
|
|
3132
|
+
labelWeekNumber: (weekNumber) => `Week ${weekNumber}`,
|
|
3133
|
+
labelYearDropdown: "Choose the Year",
|
|
3134
|
+
labelGrid: (date2, options, dateLib) => {
|
|
3135
|
+
let formatDate;
|
|
3136
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
3137
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
3138
|
+
} else {
|
|
3139
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
|
|
3140
|
+
}
|
|
3141
|
+
return formatDate(date2, "LLLL yyyy");
|
|
3142
|
+
},
|
|
3143
|
+
labelGridcell: (date2, modifiers, options, dateLib) => {
|
|
3144
|
+
let formatDate;
|
|
3145
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
3146
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
3147
|
+
} else {
|
|
3148
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
|
|
3149
|
+
}
|
|
3150
|
+
let label = formatDate(date2, "PPPP");
|
|
3151
|
+
if (modifiers?.today) {
|
|
3152
|
+
label = `Today, ${label}`;
|
|
3153
|
+
}
|
|
3154
|
+
return label;
|
|
3155
|
+
},
|
|
3156
|
+
labelNav: "Navigation bar",
|
|
3157
|
+
labelWeekNumberHeader: "Week Number",
|
|
3158
|
+
labelWeekday: (date2, options, dateLib) => {
|
|
3159
|
+
let formatDate;
|
|
3160
|
+
if (dateLib && typeof dateLib.format === "function") {
|
|
3161
|
+
formatDate = dateLib.format.bind(dateLib);
|
|
3162
|
+
} else {
|
|
3163
|
+
formatDate = (d, pattern) => format(d, pattern, { locale: enUS, ...options });
|
|
3164
|
+
}
|
|
3165
|
+
return formatDate(date2, "cccc");
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
};
|
|
3169
|
+
|
|
3111
3170
|
// node_modules/react-day-picker/dist/esm/classes/DateLib.js
|
|
3112
3171
|
class DateLib {
|
|
3113
3172
|
constructor(options, overrides) {
|
|
@@ -3245,7 +3304,7 @@ class DateLib {
|
|
|
3245
3304
|
this.startOfYear = (date2) => {
|
|
3246
3305
|
return this.overrides?.startOfYear ? this.overrides.startOfYear(date2) : startOfYear(date2);
|
|
3247
3306
|
};
|
|
3248
|
-
this.options = { locale:
|
|
3307
|
+
this.options = { locale: enUS2, ...options };
|
|
3249
3308
|
this.overrides = overrides;
|
|
3250
3309
|
}
|
|
3251
3310
|
getDigitMap() {
|
|
@@ -3320,6 +3379,9 @@ class CalendarDay {
|
|
|
3320
3379
|
this.displayMonth = displayMonth;
|
|
3321
3380
|
this.outside = Boolean(displayMonth && !dateLib.isSameMonth(date2, displayMonth));
|
|
3322
3381
|
this.dateLib = dateLib;
|
|
3382
|
+
this.isoDate = dateLib.format(date2, "yyyy-MM-dd");
|
|
3383
|
+
this.displayMonthId = dateLib.format(displayMonth, "yyyy-MM");
|
|
3384
|
+
this.dateMonthId = dateLib.format(date2, "yyyy-MM");
|
|
3323
3385
|
}
|
|
3324
3386
|
isEqualTo(day) {
|
|
3325
3387
|
return this.dateLib.isSameDay(day.date, this.date) && this.dateLib.isSameMonth(day.displayMonth, this.displayMonth);
|
|
@@ -3606,7 +3668,7 @@ function YearsDropdown(props) {
|
|
|
3606
3668
|
return React26.createElement(components.Dropdown, { ...props });
|
|
3607
3669
|
}
|
|
3608
3670
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
3609
|
-
import React27, { useCallback as useCallback2, useMemo, useRef as useRef2 } from "react";
|
|
3671
|
+
import React27, { useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
3610
3672
|
|
|
3611
3673
|
// node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js
|
|
3612
3674
|
function rangeIncludesDate(range, date2, excludeEnds = false, dateLib = defaultDateLib) {
|
|
@@ -3661,7 +3723,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
|
|
|
3661
3723
|
return isSameDay2(date2, matcher);
|
|
3662
3724
|
}
|
|
3663
3725
|
if (isDatesArray(matcher, dateLib)) {
|
|
3664
|
-
return matcher.
|
|
3726
|
+
return matcher.some((matcherDate) => isSameDay2(date2, matcherDate));
|
|
3665
3727
|
}
|
|
3666
3728
|
if (isDateRange(matcher)) {
|
|
3667
3729
|
return rangeIncludesDate(matcher, date2, false, dateLib);
|
|
@@ -3699,7 +3761,7 @@ function dateMatchModifiers(date2, matchers, dateLib = defaultDateLib) {
|
|
|
3699
3761
|
|
|
3700
3762
|
// node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js
|
|
3701
3763
|
function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
3702
|
-
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today } = props;
|
|
3764
|
+
const { disabled, hidden, modifiers, showOutsideDays, broadcastCalendar, today = dateLib.today() } = props;
|
|
3703
3765
|
const { isSameDay: isSameDay2, isSameMonth: isSameMonth2, startOfMonth: startOfMonth2, isBefore: isBefore2, endOfMonth: endOfMonth2, isAfter: isAfter2 } = dateLib;
|
|
3704
3766
|
const computedNavStart = navStart && startOfMonth2(navStart);
|
|
3705
3767
|
const computedNavEnd = navEnd && endOfMonth2(navEnd);
|
|
@@ -3718,7 +3780,7 @@ function createGetModifiers(days, props, navStart, navEnd, dateLib) {
|
|
|
3718
3780
|
const isAfterNavEnd = Boolean(computedNavEnd && isAfter2(date2, computedNavEnd));
|
|
3719
3781
|
const isDisabled = Boolean(disabled && dateMatchModifiers(date2, disabled, dateLib));
|
|
3720
3782
|
const isHidden = Boolean(hidden && dateMatchModifiers(date2, hidden, dateLib)) || isBeforeNavStart || isAfterNavEnd || !broadcastCalendar && !showOutsideDays && isOutside || broadcastCalendar && showOutsideDays === false && isOutside;
|
|
3721
|
-
const isToday = isSameDay2(date2, today
|
|
3783
|
+
const isToday = isSameDay2(date2, today);
|
|
3722
3784
|
if (isOutside)
|
|
3723
3785
|
internalModifiersMap.outside.push(day);
|
|
3724
3786
|
if (isDisabled)
|
|
@@ -3885,68 +3947,6 @@ function getFormatters(customFormatters) {
|
|
|
3885
3947
|
};
|
|
3886
3948
|
}
|
|
3887
3949
|
|
|
3888
|
-
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
3889
|
-
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
3890
|
-
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
3891
|
-
const months = eachMonthOfInterval2({
|
|
3892
|
-
start: startOfYear2(displayMonth),
|
|
3893
|
-
end: endOfYear2(displayMonth)
|
|
3894
|
-
});
|
|
3895
|
-
const options = months.map((month) => {
|
|
3896
|
-
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
3897
|
-
const value = getMonth2(month);
|
|
3898
|
-
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
3899
|
-
return { value, label, disabled };
|
|
3900
|
-
});
|
|
3901
|
-
return options;
|
|
3902
|
-
}
|
|
3903
|
-
|
|
3904
|
-
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
3905
|
-
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
3906
|
-
let style = { ...styles?.[UI.Day] };
|
|
3907
|
-
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
3908
|
-
style = {
|
|
3909
|
-
...style,
|
|
3910
|
-
...modifiersStyles?.[modifier]
|
|
3911
|
-
};
|
|
3912
|
-
});
|
|
3913
|
-
return style;
|
|
3914
|
-
}
|
|
3915
|
-
|
|
3916
|
-
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
3917
|
-
function getWeekdays(dateLib, ISOWeek, broadcastCalendar) {
|
|
3918
|
-
const today = dateLib.today();
|
|
3919
|
-
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(today, dateLib) : ISOWeek ? dateLib.startOfISOWeek(today) : dateLib.startOfWeek(today);
|
|
3920
|
-
const days = [];
|
|
3921
|
-
for (let i = 0;i < 7; i++) {
|
|
3922
|
-
const day = dateLib.addDays(start, i);
|
|
3923
|
-
days.push(day);
|
|
3924
|
-
}
|
|
3925
|
-
return days;
|
|
3926
|
-
}
|
|
3927
|
-
|
|
3928
|
-
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
3929
|
-
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
3930
|
-
if (!navStart)
|
|
3931
|
-
return;
|
|
3932
|
-
if (!navEnd)
|
|
3933
|
-
return;
|
|
3934
|
-
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
3935
|
-
const firstNavYear = startOfYear2(navStart);
|
|
3936
|
-
const lastNavYear = endOfYear2(navEnd);
|
|
3937
|
-
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
3938
|
-
if (reverse)
|
|
3939
|
-
years.reverse();
|
|
3940
|
-
return years.map((year) => {
|
|
3941
|
-
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
3942
|
-
return {
|
|
3943
|
-
value: getYear2(year),
|
|
3944
|
-
label,
|
|
3945
|
-
disabled: false
|
|
3946
|
-
};
|
|
3947
|
-
});
|
|
3948
|
-
}
|
|
3949
|
-
|
|
3950
3950
|
// node_modules/react-day-picker/dist/esm/labels/index.js
|
|
3951
3951
|
var exports_labels = {};
|
|
3952
3952
|
__export(exports_labels, {
|
|
@@ -3998,8 +3998,9 @@ function labelNav() {
|
|
|
3998
3998
|
return "";
|
|
3999
3999
|
}
|
|
4000
4000
|
// node_modules/react-day-picker/dist/esm/labels/labelNext.js
|
|
4001
|
-
|
|
4002
|
-
|
|
4001
|
+
var defaultLabel = "Go to the Next Month";
|
|
4002
|
+
function labelNext(_month, _options) {
|
|
4003
|
+
return defaultLabel;
|
|
4003
4004
|
}
|
|
4004
4005
|
// node_modules/react-day-picker/dist/esm/labels/labelPrevious.js
|
|
4005
4006
|
function labelPrevious(_month) {
|
|
@@ -4021,6 +4022,232 @@ function labelWeekNumberHeader(_options) {
|
|
|
4021
4022
|
function labelYearDropdown(_options) {
|
|
4022
4023
|
return "Choose the Year";
|
|
4023
4024
|
}
|
|
4025
|
+
// node_modules/react-day-picker/dist/esm/helpers/getLabels.js
|
|
4026
|
+
var resolveLabel = (defaultLabel2, customLabel, localeLabel) => {
|
|
4027
|
+
if (customLabel)
|
|
4028
|
+
return customLabel;
|
|
4029
|
+
if (localeLabel) {
|
|
4030
|
+
return typeof localeLabel === "function" ? localeLabel : (..._args) => localeLabel;
|
|
4031
|
+
}
|
|
4032
|
+
return defaultLabel2;
|
|
4033
|
+
};
|
|
4034
|
+
function getLabels(customLabels, options) {
|
|
4035
|
+
const localeLabels = options.locale?.labels ?? {};
|
|
4036
|
+
return {
|
|
4037
|
+
...exports_labels,
|
|
4038
|
+
...customLabels ?? {},
|
|
4039
|
+
labelDayButton: resolveLabel(labelDayButton, customLabels?.labelDayButton, localeLabels.labelDayButton),
|
|
4040
|
+
labelMonthDropdown: resolveLabel(labelMonthDropdown, customLabels?.labelMonthDropdown, localeLabels.labelMonthDropdown),
|
|
4041
|
+
labelNext: resolveLabel(labelNext, customLabels?.labelNext, localeLabels.labelNext),
|
|
4042
|
+
labelPrevious: resolveLabel(labelPrevious, customLabels?.labelPrevious, localeLabels.labelPrevious),
|
|
4043
|
+
labelWeekNumber: resolveLabel(labelWeekNumber, customLabels?.labelWeekNumber, localeLabels.labelWeekNumber),
|
|
4044
|
+
labelYearDropdown: resolveLabel(labelYearDropdown, customLabels?.labelYearDropdown, localeLabels.labelYearDropdown),
|
|
4045
|
+
labelGrid: resolveLabel(labelGrid, customLabels?.labelGrid, localeLabels.labelGrid),
|
|
4046
|
+
labelGridcell: resolveLabel(labelGridcell, customLabels?.labelGridcell, localeLabels.labelGridcell),
|
|
4047
|
+
labelNav: resolveLabel(labelNav, customLabels?.labelNav, localeLabels.labelNav),
|
|
4048
|
+
labelWeekNumberHeader: resolveLabel(labelWeekNumberHeader, customLabels?.labelWeekNumberHeader, localeLabels.labelWeekNumberHeader),
|
|
4049
|
+
labelWeekday: resolveLabel(labelWeekday, customLabels?.labelWeekday, localeLabels.labelWeekday)
|
|
4050
|
+
};
|
|
4051
|
+
}
|
|
4052
|
+
|
|
4053
|
+
// node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js
|
|
4054
|
+
function getMonthOptions(displayMonth, navStart, navEnd, formatters2, dateLib) {
|
|
4055
|
+
const { startOfMonth: startOfMonth2, startOfYear: startOfYear2, endOfYear: endOfYear2, eachMonthOfInterval: eachMonthOfInterval2, getMonth: getMonth2 } = dateLib;
|
|
4056
|
+
const months = eachMonthOfInterval2({
|
|
4057
|
+
start: startOfYear2(displayMonth),
|
|
4058
|
+
end: endOfYear2(displayMonth)
|
|
4059
|
+
});
|
|
4060
|
+
const options = months.map((month) => {
|
|
4061
|
+
const label = formatters2.formatMonthDropdown(month, dateLib);
|
|
4062
|
+
const value = getMonth2(month);
|
|
4063
|
+
const disabled = navStart && month < startOfMonth2(navStart) || navEnd && month > startOfMonth2(navEnd) || false;
|
|
4064
|
+
return { value, label, disabled };
|
|
4065
|
+
});
|
|
4066
|
+
return options;
|
|
4067
|
+
}
|
|
4068
|
+
|
|
4069
|
+
// node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js
|
|
4070
|
+
function getStyleForModifiers(dayModifiers, styles = {}, modifiersStyles = {}) {
|
|
4071
|
+
let style = { ...styles?.[UI.Day] };
|
|
4072
|
+
Object.entries(dayModifiers).filter(([, active]) => active === true).forEach(([modifier]) => {
|
|
4073
|
+
style = {
|
|
4074
|
+
...style,
|
|
4075
|
+
...modifiersStyles?.[modifier]
|
|
4076
|
+
};
|
|
4077
|
+
});
|
|
4078
|
+
return style;
|
|
4079
|
+
}
|
|
4080
|
+
|
|
4081
|
+
// node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js
|
|
4082
|
+
function getWeekdays(dateLib, ISOWeek, broadcastCalendar, today) {
|
|
4083
|
+
const referenceToday = today ?? dateLib.today();
|
|
4084
|
+
const start = broadcastCalendar ? dateLib.startOfBroadcastWeek(referenceToday, dateLib) : ISOWeek ? dateLib.startOfISOWeek(referenceToday) : dateLib.startOfWeek(referenceToday);
|
|
4085
|
+
const days = [];
|
|
4086
|
+
for (let i = 0;i < 7; i++) {
|
|
4087
|
+
const day = dateLib.addDays(start, i);
|
|
4088
|
+
days.push(day);
|
|
4089
|
+
}
|
|
4090
|
+
return days;
|
|
4091
|
+
}
|
|
4092
|
+
|
|
4093
|
+
// node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js
|
|
4094
|
+
function getYearOptions(navStart, navEnd, formatters2, dateLib, reverse = false) {
|
|
4095
|
+
if (!navStart)
|
|
4096
|
+
return;
|
|
4097
|
+
if (!navEnd)
|
|
4098
|
+
return;
|
|
4099
|
+
const { startOfYear: startOfYear2, endOfYear: endOfYear2, eachYearOfInterval: eachYearOfInterval2, getYear: getYear2 } = dateLib;
|
|
4100
|
+
const firstNavYear = startOfYear2(navStart);
|
|
4101
|
+
const lastNavYear = endOfYear2(navEnd);
|
|
4102
|
+
const years = eachYearOfInterval2({ start: firstNavYear, end: lastNavYear });
|
|
4103
|
+
if (reverse)
|
|
4104
|
+
years.reverse();
|
|
4105
|
+
return years.map((year) => {
|
|
4106
|
+
const label = formatters2.formatYearDropdown(year, dateLib);
|
|
4107
|
+
return {
|
|
4108
|
+
value: getYear2(year),
|
|
4109
|
+
label,
|
|
4110
|
+
disabled: false
|
|
4111
|
+
};
|
|
4112
|
+
});
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
// node_modules/react-day-picker/dist/esm/noonDateLib.js
|
|
4116
|
+
function createNoonOverrides(timeZone, options = {}) {
|
|
4117
|
+
const { weekStartsOn, locale } = options;
|
|
4118
|
+
const fallbackWeekStartsOn = weekStartsOn ?? locale?.options?.weekStartsOn ?? 0;
|
|
4119
|
+
const toNoonTZDate = (date2) => {
|
|
4120
|
+
const normalizedDate = typeof date2 === "number" || typeof date2 === "string" ? new Date(date2) : date2;
|
|
4121
|
+
return new TZDate(normalizedDate.getFullYear(), normalizedDate.getMonth(), normalizedDate.getDate(), 12, 0, 0, timeZone);
|
|
4122
|
+
};
|
|
4123
|
+
const toCalendarDate = (date2) => {
|
|
4124
|
+
const zoned = toNoonTZDate(date2);
|
|
4125
|
+
return new Date(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 0, 0, 0, 0);
|
|
4126
|
+
};
|
|
4127
|
+
return {
|
|
4128
|
+
today: () => {
|
|
4129
|
+
return toNoonTZDate(TZDate.tz(timeZone));
|
|
4130
|
+
},
|
|
4131
|
+
newDate: (year, monthIndex, date2) => {
|
|
4132
|
+
return new TZDate(year, monthIndex, date2, 12, 0, 0, timeZone);
|
|
4133
|
+
},
|
|
4134
|
+
startOfDay: (date2) => {
|
|
4135
|
+
return toNoonTZDate(date2);
|
|
4136
|
+
},
|
|
4137
|
+
startOfWeek: (date2, options2) => {
|
|
4138
|
+
const base = toNoonTZDate(date2);
|
|
4139
|
+
const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
|
|
4140
|
+
const diff = (base.getDay() - weekStartsOnValue + 7) % 7;
|
|
4141
|
+
base.setDate(base.getDate() - diff);
|
|
4142
|
+
return base;
|
|
4143
|
+
},
|
|
4144
|
+
startOfISOWeek: (date2) => {
|
|
4145
|
+
const base = toNoonTZDate(date2);
|
|
4146
|
+
const diff = (base.getDay() - 1 + 7) % 7;
|
|
4147
|
+
base.setDate(base.getDate() - diff);
|
|
4148
|
+
return base;
|
|
4149
|
+
},
|
|
4150
|
+
startOfMonth: (date2) => {
|
|
4151
|
+
const base = toNoonTZDate(date2);
|
|
4152
|
+
base.setDate(1);
|
|
4153
|
+
return base;
|
|
4154
|
+
},
|
|
4155
|
+
startOfYear: (date2) => {
|
|
4156
|
+
const base = toNoonTZDate(date2);
|
|
4157
|
+
base.setMonth(0, 1);
|
|
4158
|
+
return base;
|
|
4159
|
+
},
|
|
4160
|
+
endOfWeek: (date2, options2) => {
|
|
4161
|
+
const base = toNoonTZDate(date2);
|
|
4162
|
+
const weekStartsOnValue = options2?.weekStartsOn ?? fallbackWeekStartsOn;
|
|
4163
|
+
const endDow = (weekStartsOnValue + 6) % 7;
|
|
4164
|
+
const diff = (endDow - base.getDay() + 7) % 7;
|
|
4165
|
+
base.setDate(base.getDate() + diff);
|
|
4166
|
+
return base;
|
|
4167
|
+
},
|
|
4168
|
+
endOfISOWeek: (date2) => {
|
|
4169
|
+
const base = toNoonTZDate(date2);
|
|
4170
|
+
const diff = (7 - base.getDay()) % 7;
|
|
4171
|
+
base.setDate(base.getDate() + diff);
|
|
4172
|
+
return base;
|
|
4173
|
+
},
|
|
4174
|
+
endOfMonth: (date2) => {
|
|
4175
|
+
const base = toNoonTZDate(date2);
|
|
4176
|
+
base.setMonth(base.getMonth() + 1, 0);
|
|
4177
|
+
return base;
|
|
4178
|
+
},
|
|
4179
|
+
endOfYear: (date2) => {
|
|
4180
|
+
const base = toNoonTZDate(date2);
|
|
4181
|
+
base.setMonth(11, 31);
|
|
4182
|
+
return base;
|
|
4183
|
+
},
|
|
4184
|
+
eachMonthOfInterval: (interval) => {
|
|
4185
|
+
const start = toNoonTZDate(interval.start);
|
|
4186
|
+
const end = toNoonTZDate(interval.end);
|
|
4187
|
+
const result = [];
|
|
4188
|
+
const cursor = new TZDate(start.getFullYear(), start.getMonth(), 1, 12, 0, 0, timeZone);
|
|
4189
|
+
const endKey = end.getFullYear() * 12 + end.getMonth();
|
|
4190
|
+
while (cursor.getFullYear() * 12 + cursor.getMonth() <= endKey) {
|
|
4191
|
+
result.push(new TZDate(cursor, timeZone));
|
|
4192
|
+
cursor.setMonth(cursor.getMonth() + 1, 1);
|
|
4193
|
+
}
|
|
4194
|
+
return result;
|
|
4195
|
+
},
|
|
4196
|
+
addDays: (date2, amount) => {
|
|
4197
|
+
const base = toNoonTZDate(date2);
|
|
4198
|
+
base.setDate(base.getDate() + amount);
|
|
4199
|
+
return base;
|
|
4200
|
+
},
|
|
4201
|
+
addWeeks: (date2, amount) => {
|
|
4202
|
+
const base = toNoonTZDate(date2);
|
|
4203
|
+
base.setDate(base.getDate() + amount * 7);
|
|
4204
|
+
return base;
|
|
4205
|
+
},
|
|
4206
|
+
addMonths: (date2, amount) => {
|
|
4207
|
+
const base = toNoonTZDate(date2);
|
|
4208
|
+
base.setMonth(base.getMonth() + amount);
|
|
4209
|
+
return base;
|
|
4210
|
+
},
|
|
4211
|
+
addYears: (date2, amount) => {
|
|
4212
|
+
const base = toNoonTZDate(date2);
|
|
4213
|
+
base.setFullYear(base.getFullYear() + amount);
|
|
4214
|
+
return base;
|
|
4215
|
+
},
|
|
4216
|
+
eachYearOfInterval: (interval) => {
|
|
4217
|
+
const start = toNoonTZDate(interval.start);
|
|
4218
|
+
const end = toNoonTZDate(interval.end);
|
|
4219
|
+
const years = [];
|
|
4220
|
+
const cursor = new TZDate(start.getFullYear(), 0, 1, 12, 0, 0, timeZone);
|
|
4221
|
+
while (cursor.getFullYear() <= end.getFullYear()) {
|
|
4222
|
+
years.push(new TZDate(cursor, timeZone));
|
|
4223
|
+
cursor.setFullYear(cursor.getFullYear() + 1, 0, 1);
|
|
4224
|
+
}
|
|
4225
|
+
return years;
|
|
4226
|
+
},
|
|
4227
|
+
getWeek: (date2, options2) => {
|
|
4228
|
+
const base = toCalendarDate(date2);
|
|
4229
|
+
return getWeek(base, {
|
|
4230
|
+
weekStartsOn: options2?.weekStartsOn ?? fallbackWeekStartsOn,
|
|
4231
|
+
firstWeekContainsDate: options2?.firstWeekContainsDate ?? locale?.options?.firstWeekContainsDate ?? 1
|
|
4232
|
+
});
|
|
4233
|
+
},
|
|
4234
|
+
getISOWeek: (date2) => {
|
|
4235
|
+
const base = toCalendarDate(date2);
|
|
4236
|
+
return getISOWeek(base);
|
|
4237
|
+
},
|
|
4238
|
+
differenceInCalendarDays: (dateLeft, dateRight) => {
|
|
4239
|
+
const left = toCalendarDate(dateLeft);
|
|
4240
|
+
const right = toCalendarDate(dateRight);
|
|
4241
|
+
return differenceInCalendarDays(left, right);
|
|
4242
|
+
},
|
|
4243
|
+
differenceInCalendarMonths: (dateLeft, dateRight) => {
|
|
4244
|
+
const left = toCalendarDate(dateLeft);
|
|
4245
|
+
const right = toCalendarDate(dateRight);
|
|
4246
|
+
return differenceInCalendarMonths(left, right);
|
|
4247
|
+
}
|
|
4248
|
+
};
|
|
4249
|
+
}
|
|
4250
|
+
|
|
4024
4251
|
// node_modules/react-day-picker/dist/esm/useAnimation.js
|
|
4025
4252
|
import { useLayoutEffect, useRef } from "react";
|
|
4026
4253
|
var asHtmlElement = (element) => {
|
|
@@ -4147,7 +4374,7 @@ function useAnimation(rootElRef, enabled, { classNames, months, focused, dateLib
|
|
|
4147
4374
|
}
|
|
4148
4375
|
|
|
4149
4376
|
// node_modules/react-day-picker/dist/esm/useCalendar.js
|
|
4150
|
-
import { useEffect } from "react";
|
|
4377
|
+
import { useEffect, useMemo } from "react";
|
|
4151
4378
|
|
|
4152
4379
|
// node_modules/react-day-picker/dist/esm/helpers/getDates.js
|
|
4153
4380
|
function getDates(displayMonths, maxDate, props, dateLib) {
|
|
@@ -4156,15 +4383,14 @@ function getDates(displayMonths, maxDate, props, dateLib) {
|
|
|
4156
4383
|
const { ISOWeek, fixedWeeks, broadcastCalendar } = props ?? {};
|
|
4157
4384
|
const { addDays: addDays2, differenceInCalendarDays: differenceInCalendarDays2, differenceInCalendarMonths: differenceInCalendarMonths2, endOfBroadcastWeek: endOfBroadcastWeek2, endOfISOWeek: endOfISOWeek2, endOfMonth: endOfMonth2, endOfWeek: endOfWeek2, isAfter: isAfter2, startOfBroadcastWeek: startOfBroadcastWeek2, startOfISOWeek: startOfISOWeek2, startOfWeek: startOfWeek2 } = dateLib;
|
|
4158
4385
|
const startWeekFirstDate = broadcastCalendar ? startOfBroadcastWeek2(firstMonth, dateLib) : ISOWeek ? startOfISOWeek2(firstMonth) : startOfWeek2(firstMonth);
|
|
4159
|
-
const
|
|
4160
|
-
const
|
|
4386
|
+
const displayMonthsWeekEnd = broadcastCalendar ? endOfBroadcastWeek2(lastMonth) : ISOWeek ? endOfISOWeek2(endOfMonth2(lastMonth)) : endOfWeek2(endOfMonth2(lastMonth));
|
|
4387
|
+
const constraintWeekEnd = maxDate && (broadcastCalendar ? endOfBroadcastWeek2(maxDate) : ISOWeek ? endOfISOWeek2(maxDate) : endOfWeek2(maxDate));
|
|
4388
|
+
const gridEndDate = constraintWeekEnd && isAfter2(displayMonthsWeekEnd, constraintWeekEnd) ? constraintWeekEnd : displayMonthsWeekEnd;
|
|
4389
|
+
const nOfDays = differenceInCalendarDays2(gridEndDate, startWeekFirstDate);
|
|
4161
4390
|
const nOfMonths = differenceInCalendarMonths2(lastMonth, firstMonth) + 1;
|
|
4162
4391
|
const dates = [];
|
|
4163
4392
|
for (let i = 0;i <= nOfDays; i++) {
|
|
4164
4393
|
const date2 = addDays2(startWeekFirstDate, i);
|
|
4165
|
-
if (maxDate && isAfter2(date2, maxDate)) {
|
|
4166
|
-
break;
|
|
4167
|
-
}
|
|
4168
4394
|
dates.push(date2);
|
|
4169
4395
|
}
|
|
4170
4396
|
const nrOfDaysWithFixedWeeks = broadcastCalendar ? 35 : 42;
|
|
@@ -4360,13 +4586,44 @@ function useCalendar(props, dateLib) {
|
|
|
4360
4586
|
const newInitialMonth = getInitialMonth(props, navStart, navEnd, dateLib);
|
|
4361
4587
|
setFirstMonth(newInitialMonth);
|
|
4362
4588
|
}, [props.timeZone]);
|
|
4363
|
-
const
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4589
|
+
const { months, weeks, days, previousMonth, nextMonth } = useMemo(() => {
|
|
4590
|
+
const displayMonths = getDisplayMonths(firstMonth, navEnd, { numberOfMonths: props.numberOfMonths }, dateLib);
|
|
4591
|
+
const dates = getDates(displayMonths, props.endMonth ? endOfMonth2(props.endMonth) : undefined, {
|
|
4592
|
+
ISOWeek: props.ISOWeek,
|
|
4593
|
+
fixedWeeks: props.fixedWeeks,
|
|
4594
|
+
broadcastCalendar: props.broadcastCalendar
|
|
4595
|
+
}, dateLib);
|
|
4596
|
+
const months2 = getMonths(displayMonths, dates, {
|
|
4597
|
+
broadcastCalendar: props.broadcastCalendar,
|
|
4598
|
+
fixedWeeks: props.fixedWeeks,
|
|
4599
|
+
ISOWeek: props.ISOWeek,
|
|
4600
|
+
reverseMonths: props.reverseMonths
|
|
4601
|
+
}, dateLib);
|
|
4602
|
+
const weeks2 = getWeeks(months2);
|
|
4603
|
+
const days2 = getDays(months2);
|
|
4604
|
+
const previousMonth2 = getPreviousMonth(firstMonth, navStart, props, dateLib);
|
|
4605
|
+
const nextMonth2 = getNextMonth(firstMonth, navEnd, props, dateLib);
|
|
4606
|
+
return {
|
|
4607
|
+
months: months2,
|
|
4608
|
+
weeks: weeks2,
|
|
4609
|
+
days: days2,
|
|
4610
|
+
previousMonth: previousMonth2,
|
|
4611
|
+
nextMonth: nextMonth2
|
|
4612
|
+
};
|
|
4613
|
+
}, [
|
|
4614
|
+
dateLib,
|
|
4615
|
+
firstMonth.getTime(),
|
|
4616
|
+
navEnd?.getTime(),
|
|
4617
|
+
navStart?.getTime(),
|
|
4618
|
+
props.disableNavigation,
|
|
4619
|
+
props.broadcastCalendar,
|
|
4620
|
+
props.endMonth?.getTime(),
|
|
4621
|
+
props.fixedWeeks,
|
|
4622
|
+
props.ISOWeek,
|
|
4623
|
+
props.numberOfMonths,
|
|
4624
|
+
props.pagedNavigation,
|
|
4625
|
+
props.reverseMonths
|
|
4626
|
+
]);
|
|
4370
4627
|
const { disableNavigation, onMonthChange } = props;
|
|
4371
4628
|
const isDayInCalendar = (day) => weeks.some((week) => week.days.some((d) => d.isEqualTo(day)));
|
|
4372
4629
|
const goToMonth = (date2) => {
|
|
@@ -4762,55 +5019,137 @@ function useSelection(props, dateLib) {
|
|
|
4762
5019
|
}
|
|
4763
5020
|
}
|
|
4764
5021
|
|
|
5022
|
+
// node_modules/react-day-picker/dist/esm/utils/toTimeZone.js
|
|
5023
|
+
function toTimeZone(date2, timeZone) {
|
|
5024
|
+
if (date2 instanceof TZDate && date2.timeZone === timeZone) {
|
|
5025
|
+
return date2;
|
|
5026
|
+
}
|
|
5027
|
+
return new TZDate(date2, timeZone);
|
|
5028
|
+
}
|
|
5029
|
+
|
|
5030
|
+
// node_modules/react-day-picker/dist/esm/utils/convertMatchersToTimeZone.js
|
|
5031
|
+
function toZoneNoon(date2, timeZone, noonSafe) {
|
|
5032
|
+
if (!noonSafe)
|
|
5033
|
+
return toTimeZone(date2, timeZone);
|
|
5034
|
+
const zoned = toTimeZone(date2, timeZone);
|
|
5035
|
+
const noonZoned = new TZDate(zoned.getFullYear(), zoned.getMonth(), zoned.getDate(), 12, 0, 0, timeZone);
|
|
5036
|
+
return new Date(noonZoned.getTime());
|
|
5037
|
+
}
|
|
5038
|
+
function convertMatcher(matcher, timeZone, noonSafe) {
|
|
5039
|
+
if (typeof matcher === "boolean" || typeof matcher === "function") {
|
|
5040
|
+
return matcher;
|
|
5041
|
+
}
|
|
5042
|
+
if (matcher instanceof Date) {
|
|
5043
|
+
return toZoneNoon(matcher, timeZone, noonSafe);
|
|
5044
|
+
}
|
|
5045
|
+
if (Array.isArray(matcher)) {
|
|
5046
|
+
return matcher.map((value) => value instanceof Date ? toZoneNoon(value, timeZone, noonSafe) : value);
|
|
5047
|
+
}
|
|
5048
|
+
if (isDateRange(matcher)) {
|
|
5049
|
+
return {
|
|
5050
|
+
...matcher,
|
|
5051
|
+
from: matcher.from ? toTimeZone(matcher.from, timeZone) : matcher.from,
|
|
5052
|
+
to: matcher.to ? toTimeZone(matcher.to, timeZone) : matcher.to
|
|
5053
|
+
};
|
|
5054
|
+
}
|
|
5055
|
+
if (isDateInterval(matcher)) {
|
|
5056
|
+
return {
|
|
5057
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe),
|
|
5058
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
5059
|
+
};
|
|
5060
|
+
}
|
|
5061
|
+
if (isDateAfterType(matcher)) {
|
|
5062
|
+
return {
|
|
5063
|
+
after: toZoneNoon(matcher.after, timeZone, noonSafe)
|
|
5064
|
+
};
|
|
5065
|
+
}
|
|
5066
|
+
if (isDateBeforeType(matcher)) {
|
|
5067
|
+
return {
|
|
5068
|
+
before: toZoneNoon(matcher.before, timeZone, noonSafe)
|
|
5069
|
+
};
|
|
5070
|
+
}
|
|
5071
|
+
return matcher;
|
|
5072
|
+
}
|
|
5073
|
+
function convertMatchersToTimeZone(matchers, timeZone, noonSafe) {
|
|
5074
|
+
if (!matchers) {
|
|
5075
|
+
return matchers;
|
|
5076
|
+
}
|
|
5077
|
+
if (Array.isArray(matchers)) {
|
|
5078
|
+
return matchers.map((matcher) => convertMatcher(matcher, timeZone, noonSafe));
|
|
5079
|
+
}
|
|
5080
|
+
return convertMatcher(matchers, timeZone, noonSafe);
|
|
5081
|
+
}
|
|
5082
|
+
|
|
4765
5083
|
// node_modules/react-day-picker/dist/esm/DayPicker.js
|
|
4766
5084
|
function DayPicker(initialProps) {
|
|
4767
5085
|
let props = initialProps;
|
|
4768
|
-
|
|
5086
|
+
const timeZone = props.timeZone;
|
|
5087
|
+
if (timeZone) {
|
|
4769
5088
|
props = {
|
|
4770
|
-
...initialProps
|
|
5089
|
+
...initialProps,
|
|
5090
|
+
timeZone
|
|
4771
5091
|
};
|
|
4772
5092
|
if (props.today) {
|
|
4773
|
-
props.today =
|
|
5093
|
+
props.today = toTimeZone(props.today, timeZone);
|
|
4774
5094
|
}
|
|
4775
5095
|
if (props.month) {
|
|
4776
|
-
props.month =
|
|
5096
|
+
props.month = toTimeZone(props.month, timeZone);
|
|
4777
5097
|
}
|
|
4778
5098
|
if (props.defaultMonth) {
|
|
4779
|
-
props.defaultMonth =
|
|
5099
|
+
props.defaultMonth = toTimeZone(props.defaultMonth, timeZone);
|
|
4780
5100
|
}
|
|
4781
5101
|
if (props.startMonth) {
|
|
4782
|
-
props.startMonth =
|
|
5102
|
+
props.startMonth = toTimeZone(props.startMonth, timeZone);
|
|
4783
5103
|
}
|
|
4784
5104
|
if (props.endMonth) {
|
|
4785
|
-
props.endMonth =
|
|
5105
|
+
props.endMonth = toTimeZone(props.endMonth, timeZone);
|
|
4786
5106
|
}
|
|
4787
5107
|
if (props.mode === "single" && props.selected) {
|
|
4788
|
-
props.selected =
|
|
5108
|
+
props.selected = toTimeZone(props.selected, timeZone);
|
|
4789
5109
|
} else if (props.mode === "multiple" && props.selected) {
|
|
4790
|
-
props.selected = props.selected?.map((date2) =>
|
|
5110
|
+
props.selected = props.selected?.map((date2) => toTimeZone(date2, timeZone));
|
|
4791
5111
|
} else if (props.mode === "range" && props.selected) {
|
|
4792
5112
|
props.selected = {
|
|
4793
|
-
from: props.selected.from ?
|
|
4794
|
-
to: props.selected.to ?
|
|
5113
|
+
from: props.selected.from ? toTimeZone(props.selected.from, timeZone) : props.selected.from,
|
|
5114
|
+
to: props.selected.to ? toTimeZone(props.selected.to, timeZone) : props.selected.to
|
|
4795
5115
|
};
|
|
4796
5116
|
}
|
|
5117
|
+
if (props.disabled !== undefined) {
|
|
5118
|
+
props.disabled = convertMatchersToTimeZone(props.disabled, timeZone);
|
|
5119
|
+
}
|
|
5120
|
+
if (props.hidden !== undefined) {
|
|
5121
|
+
props.hidden = convertMatchersToTimeZone(props.hidden, timeZone);
|
|
5122
|
+
}
|
|
5123
|
+
if (props.modifiers) {
|
|
5124
|
+
const nextModifiers = {};
|
|
5125
|
+
Object.keys(props.modifiers).forEach((key) => {
|
|
5126
|
+
nextModifiers[key] = convertMatchersToTimeZone(props.modifiers?.[key], timeZone);
|
|
5127
|
+
});
|
|
5128
|
+
props.modifiers = nextModifiers;
|
|
5129
|
+
}
|
|
4797
5130
|
}
|
|
4798
|
-
const { components, formatters: formatters2, labels, dateLib, locale, classNames } =
|
|
4799
|
-
const locale2 = { ...
|
|
5131
|
+
const { components, formatters: formatters2, labels, dateLib, locale, classNames } = useMemo2(() => {
|
|
5132
|
+
const locale2 = { ...enUS2, ...props.locale };
|
|
5133
|
+
const weekStartsOn = props.broadcastCalendar ? 1 : props.weekStartsOn;
|
|
5134
|
+
const noonOverrides = props.noonSafe && props.timeZone ? createNoonOverrides(props.timeZone, {
|
|
5135
|
+
weekStartsOn,
|
|
5136
|
+
locale: locale2
|
|
5137
|
+
}) : undefined;
|
|
5138
|
+
const overrides = props.dateLib && noonOverrides ? { ...noonOverrides, ...props.dateLib } : props.dateLib ?? noonOverrides;
|
|
4800
5139
|
const dateLib2 = new DateLib({
|
|
4801
5140
|
locale: locale2,
|
|
4802
|
-
weekStartsOn
|
|
5141
|
+
weekStartsOn,
|
|
4803
5142
|
firstWeekContainsDate: props.firstWeekContainsDate,
|
|
4804
5143
|
useAdditionalWeekYearTokens: props.useAdditionalWeekYearTokens,
|
|
4805
5144
|
useAdditionalDayOfYearTokens: props.useAdditionalDayOfYearTokens,
|
|
4806
5145
|
timeZone: props.timeZone,
|
|
4807
5146
|
numerals: props.numerals
|
|
4808
|
-
},
|
|
5147
|
+
}, overrides);
|
|
4809
5148
|
return {
|
|
4810
5149
|
dateLib: dateLib2,
|
|
4811
5150
|
components: getComponents(props.components),
|
|
4812
5151
|
formatters: getFormatters(props.formatters),
|
|
4813
|
-
labels:
|
|
5152
|
+
labels: getLabels(props.labels, dateLib2.options),
|
|
4814
5153
|
locale: locale2,
|
|
4815
5154
|
classNames: { ...getDefaultClassNames(), ...props.classNames }
|
|
4816
5155
|
};
|
|
@@ -4824,11 +5163,15 @@ function DayPicker(initialProps) {
|
|
|
4824
5163
|
props.timeZone,
|
|
4825
5164
|
props.numerals,
|
|
4826
5165
|
props.dateLib,
|
|
5166
|
+
props.noonSafe,
|
|
4827
5167
|
props.components,
|
|
4828
5168
|
props.formatters,
|
|
4829
5169
|
props.labels,
|
|
4830
5170
|
props.classNames
|
|
4831
5171
|
]);
|
|
5172
|
+
if (!props.today) {
|
|
5173
|
+
props = { ...props, today: dateLib.today() };
|
|
5174
|
+
}
|
|
4832
5175
|
const { captionLayout, mode, navLayout, numberOfMonths = 1, onDayBlur, onDayClick, onDayFocus, onDayKeyDown, onDayMouseEnter, onDayMouseLeave, onNextClick, onPrevClick, showWeekNumber, styles } = props;
|
|
4833
5176
|
const { formatCaption: formatCaption3, formatDay: formatDay3, formatMonthDropdown: formatMonthDropdown3, formatWeekNumber: formatWeekNumber3, formatWeekNumberHeader: formatWeekNumberHeader3, formatWeekdayName: formatWeekdayName3, formatYearDropdown: formatYearDropdown3 } = formatters2;
|
|
4834
5177
|
const calendar = useCalendar(props, dateLib);
|
|
@@ -4837,7 +5180,7 @@ function DayPicker(initialProps) {
|
|
|
4837
5180
|
const { isSelected, select, selected: selectedValue } = useSelection(props, dateLib) ?? {};
|
|
4838
5181
|
const { blur, focused, isFocusTarget, moveFocus, setFocused } = useFocus(props, calendar, getModifiers, isSelected ?? (() => false), dateLib);
|
|
4839
5182
|
const { labelDayButton: labelDayButton3, labelGridcell: labelGridcell3, labelGrid: labelGrid4, labelMonthDropdown: labelMonthDropdown3, labelNav: labelNav3, labelPrevious: labelPrevious3, labelNext: labelNext3, labelWeekday: labelWeekday3, labelWeekNumber: labelWeekNumber3, labelWeekNumberHeader: labelWeekNumberHeader3, labelYearDropdown: labelYearDropdown3 } = labels;
|
|
4840
|
-
const weekdays =
|
|
5183
|
+
const weekdays = useMemo2(() => getWeekdays(dateLib, props.ISOWeek, props.broadcastCalendar, props.today), [dateLib, props.ISOWeek, props.broadcastCalendar, props.today]);
|
|
4841
5184
|
const isInteractive = mode !== undefined || onDayClick !== undefined;
|
|
4842
5185
|
const handlePreviousClick = useCallback2(() => {
|
|
4843
5186
|
if (!previousMonth)
|
|
@@ -4855,6 +5198,9 @@ function DayPicker(initialProps) {
|
|
|
4855
5198
|
e.preventDefault();
|
|
4856
5199
|
e.stopPropagation();
|
|
4857
5200
|
setFocused(day);
|
|
5201
|
+
if (m.disabled) {
|
|
5202
|
+
return;
|
|
5203
|
+
}
|
|
4858
5204
|
select?.(day.date, m, e);
|
|
4859
5205
|
onDayClick?.(day.date, m, e);
|
|
4860
5206
|
}, [select, onDayClick, setFocused]);
|
|
@@ -4907,7 +5253,7 @@ function DayPicker(initialProps) {
|
|
|
4907
5253
|
const month = dateLib.setYear(dateLib.startOfMonth(date2), selectedYear);
|
|
4908
5254
|
goToMonth(month);
|
|
4909
5255
|
}, [dateLib, goToMonth]);
|
|
4910
|
-
const { className, style } =
|
|
5256
|
+
const { className, style } = useMemo2(() => ({
|
|
4911
5257
|
className: [classNames[UI.Root], props.className].filter(Boolean).join(" "),
|
|
4912
5258
|
style: { ...styles?.[UI.Root], ...props.style }
|
|
4913
5259
|
}), [classNames, props.className, props.style, styles]);
|
|
@@ -4976,7 +5322,7 @@ function DayPicker(initialProps) {
|
|
|
4976
5322
|
const style2 = getStyleForModifiers(modifiers, styles, props.modifiersStyles);
|
|
4977
5323
|
const className2 = getClassNamesForModifiers(modifiers, classNames, props.modifiersClassNames);
|
|
4978
5324
|
const ariaLabel = !isInteractive && !modifiers.hidden ? labelGridcell3(date2, modifiers, dateLib.options, dateLib) : undefined;
|
|
4979
|
-
return React27.createElement(components.Day, { key: `${
|
|
5325
|
+
return React27.createElement(components.Day, { key: `${day.isoDate}_${day.displayMonthId}`, day, modifiers, className: className2.join(" "), style: style2, role: "gridcell", "aria-selected": modifiers.selected || undefined, "aria-label": ariaLabel, "data-day": day.isoDate, "data-month": day.outside ? day.dateMonthId : undefined, "data-selected": modifiers.selected || undefined, "data-disabled": modifiers.disabled || undefined, "data-hidden": modifiers.hidden || undefined, "data-outside": day.outside || undefined, "data-focused": modifiers.focused || undefined, "data-today": modifiers.today || undefined }, !modifiers.hidden && isInteractive ? React27.createElement(components.DayButton, { className: classNames[UI.DayButton], style: styles?.[UI.DayButton], type: "button", day, modifiers, disabled: !modifiers.focused && modifiers.disabled || undefined, "aria-disabled": modifiers.focused && modifiers.disabled || undefined, tabIndex: isFocusTarget(day) ? 0 : -1, "aria-label": labelDayButton3(date2, 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) }, formatDay3(date2, dateLib.options, dateLib)) : !modifiers.hidden && formatDay3(day.date, dateLib.options, dateLib));
|
|
4980
5326
|
}));
|
|
4981
5327
|
}))));
|
|
4982
5328
|
})), props.footer && React27.createElement(components.Footer, { className: classNames[UI.Footer], style: styles?.[UI.Footer], role: "status", "aria-live": "polite" }, props.footer)));
|
|
@@ -5523,7 +5869,7 @@ import { jsx as jsx29 } from "react/jsx-runtime";
|
|
|
5523
5869
|
function Input({ className, ref, ...props }) {
|
|
5524
5870
|
return /* @__PURE__ */ jsx29("input", {
|
|
5525
5871
|
ref,
|
|
5526
|
-
className: clsx("input", className),
|
|
5872
|
+
className: clsx("input w-full", className),
|
|
5527
5873
|
...props
|
|
5528
5874
|
});
|
|
5529
5875
|
}
|
|
@@ -15523,7 +15869,7 @@ var ContentEditable = mod10.ContentEditable;
|
|
|
15523
15869
|
var ContentEditableElement = mod10.ContentEditableElement;
|
|
15524
15870
|
|
|
15525
15871
|
// node_modules/.pnpm/react-error-boundary@6.0.0_react@19.2.0/node_modules/react-error-boundary/dist/react-error-boundary.js
|
|
15526
|
-
import { createContext as createContext2, Component, createElement, useContext as useContext2, useState as useState3, useMemo as
|
|
15872
|
+
import { createContext as createContext2, Component, createElement, useContext as useContext2, useState as useState3, useMemo as useMemo3, forwardRef } from "react";
|
|
15527
15873
|
"use client";
|
|
15528
15874
|
var ErrorBoundaryContext = createContext2(null);
|
|
15529
15875
|
var initialState = {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/giacomorebonato/mino-daisy-react.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.1.
|
|
7
|
+
"version": "1.1.16",
|
|
8
8
|
"description": "React component library wrapping DaisyUI components",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "./dist/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"storybook": "storybook dev -p 6006",
|
|
20
20
|
"build-storybook": "storybook build",
|
|
21
21
|
"format": "biome check --write",
|
|
22
|
-
"release": "release-it"
|
|
22
|
+
"release": "bunx --bun release-it"
|
|
23
23
|
},
|
|
24
24
|
"keywords": [
|
|
25
25
|
"react",
|
|
@@ -37,29 +37,29 @@
|
|
|
37
37
|
"tailwindcss": ">=4.0.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@biomejs/biome": "^2.3.
|
|
40
|
+
"@biomejs/biome": "^2.3.13",
|
|
41
41
|
"@chromatic-com/storybook": "^4.1.3",
|
|
42
|
-
"@happy-dom/global-registrator": "^20.0
|
|
43
|
-
"@storybook/addon-a11y": "^10.1
|
|
44
|
-
"@storybook/addon-docs": "^10.1
|
|
45
|
-
"@storybook/react-vite": "^10.1
|
|
46
|
-
"@tailwindcss/vite": "^4.1.
|
|
42
|
+
"@happy-dom/global-registrator": "^20.4.0",
|
|
43
|
+
"@storybook/addon-a11y": "^10.2.1",
|
|
44
|
+
"@storybook/addon-docs": "^10.2.1",
|
|
45
|
+
"@storybook/react-vite": "^10.2.1",
|
|
46
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
47
47
|
"@testing-library/dom": "^10.4.1",
|
|
48
48
|
"@testing-library/jest-dom": "^6.9.1",
|
|
49
|
-
"@testing-library/react": "^16.3.
|
|
49
|
+
"@testing-library/react": "^16.3.2",
|
|
50
50
|
"@testing-library/user-event": "^14.6.1",
|
|
51
|
-
"@types/bun": "^1.3.
|
|
52
|
-
"@types/node": "^24.10.
|
|
53
|
-
"@types/react": "^19.2.
|
|
54
|
-
"@types/react-dom": "^19.2.
|
|
55
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
56
|
-
"daisyui": "^5.
|
|
57
|
-
"playwright": "^1.
|
|
58
|
-
"react": "^19.2.
|
|
59
|
-
"react-dom": "^19.2.
|
|
60
|
-
"release-it": "^19.
|
|
61
|
-
"storybook": "^10.1
|
|
62
|
-
"tailwindcss": "^4.1.
|
|
51
|
+
"@types/bun": "^1.3.8",
|
|
52
|
+
"@types/node": "^24.10.9",
|
|
53
|
+
"@types/react": "^19.2.10",
|
|
54
|
+
"@types/react-dom": "^19.2.3",
|
|
55
|
+
"@typescript/native-preview": "^7.0.0-dev.20260129.1",
|
|
56
|
+
"daisyui": "^5.5.14",
|
|
57
|
+
"playwright": "^1.58.0",
|
|
58
|
+
"react": "^19.2.4",
|
|
59
|
+
"react-dom": "^19.2.4",
|
|
60
|
+
"release-it": "^19.2.4",
|
|
61
|
+
"storybook": "^10.2.1",
|
|
62
|
+
"tailwindcss": "^4.1.18",
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@lexical/utils": "^0.38.2",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"lexical": "^0.38.2",
|
|
76
|
-
"react-day-picker": "^9.
|
|
76
|
+
"react-day-picker": "^9.13.0"
|
|
77
77
|
},
|
|
78
78
|
"private": false
|
|
79
79
|
}
|