reka-ui 2.8.0 → 2.8.2
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/Calendar/CalendarCellTrigger.cjs +4 -1
- package/dist/Calendar/CalendarCellTrigger.cjs.map +1 -1
- package/dist/Calendar/CalendarCellTrigger.js +4 -1
- package/dist/Calendar/CalendarCellTrigger.js.map +1 -1
- package/dist/Calendar/CalendarRoot.cjs +12 -7
- package/dist/Calendar/CalendarRoot.cjs.map +1 -1
- package/dist/Calendar/CalendarRoot.js +13 -8
- package/dist/Calendar/CalendarRoot.js.map +1 -1
- package/dist/Calendar/useCalendar.cjs +32 -2
- package/dist/Calendar/useCalendar.cjs.map +1 -1
- package/dist/Calendar/useCalendar.js +33 -3
- package/dist/Calendar/useCalendar.js.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.cjs +2 -1
- package/dist/Combobox/ComboboxContentImpl.cjs.map +1 -1
- package/dist/Combobox/ComboboxContentImpl.js +2 -1
- package/dist/Combobox/ComboboxContentImpl.js.map +1 -1
- package/dist/DatePicker/DatePickerRoot.cjs +4 -3
- package/dist/DatePicker/DatePickerRoot.cjs.map +1 -1
- package/dist/DatePicker/DatePickerRoot.js +4 -3
- package/dist/DatePicker/DatePickerRoot.js.map +1 -1
- package/dist/DateRangePicker/DateRangePickerRoot.cjs +4 -3
- package/dist/DateRangePicker/DateRangePickerRoot.cjs.map +1 -1
- package/dist/DateRangePicker/DateRangePickerRoot.js +5 -4
- package/dist/DateRangePicker/DateRangePickerRoot.js.map +1 -1
- package/dist/RangeCalendar/RangeCalendarCellTrigger.cjs +8 -2
- package/dist/RangeCalendar/RangeCalendarCellTrigger.cjs.map +1 -1
- package/dist/RangeCalendar/RangeCalendarCellTrigger.js +8 -2
- package/dist/RangeCalendar/RangeCalendarCellTrigger.js.map +1 -1
- package/dist/RangeCalendar/RangeCalendarGrid.cjs +2 -1
- package/dist/RangeCalendar/RangeCalendarGrid.cjs.map +1 -1
- package/dist/RangeCalendar/RangeCalendarGrid.js +2 -1
- package/dist/RangeCalendar/RangeCalendarGrid.js.map +1 -1
- package/dist/RangeCalendar/RangeCalendarRoot.cjs +30 -16
- package/dist/RangeCalendar/RangeCalendarRoot.cjs.map +1 -1
- package/dist/RangeCalendar/RangeCalendarRoot.js +31 -17
- package/dist/RangeCalendar/RangeCalendarRoot.js.map +1 -1
- package/dist/RangeCalendar/useRangeCalendar.cjs +41 -8
- package/dist/RangeCalendar/useRangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar/useRangeCalendar.js +41 -8
- package/dist/RangeCalendar/useRangeCalendar.js.map +1 -1
- package/dist/constant.d.cts.map +1 -1
- package/dist/date/calendar.cjs +29 -9
- package/dist/date/calendar.cjs.map +1 -1
- package/dist/date/calendar.js +25 -11
- package/dist/date/calendar.js.map +1 -1
- package/dist/date/useDateField.cjs +1 -1
- package/dist/date/useDateField.cjs.map +1 -1
- package/dist/date/useDateField.js +1 -1
- package/dist/date/useDateField.js.map +1 -1
- package/dist/date.cjs +1 -0
- package/dist/date.d.cts +2 -2
- package/dist/date.d.ts +2 -2
- package/dist/date.js +2 -2
- package/dist/index.d.cts +841 -836
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +804 -799
- package/dist/index.d.ts.map +1 -1
- package/dist/index2.d.cts +9 -2
- package/dist/index2.d.cts.map +1 -1
- package/dist/index2.d.ts +9 -2
- package/dist/index2.d.ts.map +1 -1
- package/dist/shared/useForwardExpose.cjs +1 -1
- package/dist/shared/useForwardExpose.cjs.map +1 -1
- package/dist/shared/useForwardExpose.js +1 -1
- package/dist/shared/useForwardExpose.js.map +1 -1
- package/package.json +16 -12
- package/src/Calendar/CalendarCellTrigger.vue +8 -1
- package/src/Calendar/CalendarRoot.vue +19 -7
- package/src/Calendar/useCalendar.ts +43 -3
- package/src/Combobox/ComboboxContentImpl.vue +1 -0
- package/src/DatePicker/DatePickerRoot.vue +4 -4
- package/src/DateRangePicker/DateRangePickerRoot.vue +5 -5
- package/src/RadioGroup/RadioGroupRoot.vue +1 -1
- package/src/RangeCalendar/RangeCalendarCellTrigger.vue +13 -3
- package/src/RangeCalendar/RangeCalendarGrid.vue +1 -0
- package/src/RangeCalendar/RangeCalendarRoot.vue +46 -30
- package/src/RangeCalendar/useRangeCalendar.ts +43 -15
- package/src/date/calendar.ts +42 -18
- package/src/shared/date/useDateField.ts +3 -1
- package/src/shared/useForwardExpose.ts +1 -1
package/dist/index2.d.cts
CHANGED
|
@@ -63,6 +63,7 @@ declare const EDITABLE_SEGMENT_PARTS: readonly ["day", "month", "year", "hour",
|
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/date/calendar.d.ts
|
|
65
65
|
type WeekDayFormat = 'narrow' | 'short' | 'long';
|
|
66
|
+
type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
66
67
|
type CreateSelectProps = {
|
|
67
68
|
/**
|
|
68
69
|
* The date object representing the date (usually the first day of the month/year).
|
|
@@ -77,7 +78,7 @@ type CreateMonthProps = {
|
|
|
77
78
|
/**
|
|
78
79
|
* The day of the week to start the calendar on (0 for Sunday, 1 for Monday, etc.).
|
|
79
80
|
*/
|
|
80
|
-
weekStartsOn:
|
|
81
|
+
weekStartsOn: WeekStartsOn;
|
|
81
82
|
/**
|
|
82
83
|
* Whether to always render 6 weeks in the calendar, even if the month doesn't
|
|
83
84
|
* span 6 weeks.
|
|
@@ -119,6 +120,12 @@ declare function createDateRange({
|
|
|
119
120
|
start,
|
|
120
121
|
end
|
|
121
122
|
}: DateRange): DateValue[];
|
|
123
|
+
/**
|
|
124
|
+
* It's better to use `getWeekStart` from `@internationalized/date`,
|
|
125
|
+
* but sadly it is not yet exported from the package.
|
|
126
|
+
* And the `Intl.Locale` API is not supported well enough yet.
|
|
127
|
+
*/
|
|
128
|
+
declare function getWeekStartsOn(locale: string): WeekStartsOn;
|
|
122
129
|
/**
|
|
123
130
|
* Returns the locale-specific week number
|
|
124
131
|
*/
|
|
@@ -206,5 +213,5 @@ declare function areAllDaysBetweenValid(start: DateValue, end: DateValue, isUnav
|
|
|
206
213
|
//# sourceMappingURL=comparators.d.ts.map
|
|
207
214
|
|
|
208
215
|
//#endregion
|
|
209
|
-
export { CreateMonthProps, CreateSelectProps, DateRange, DateStep, DateValue$1 as DateValue, DateValue$2 as DateValue$1, Grid, HourCycle, Matcher, SegmentPart, SegmentValueObj, WeekDayFormat, areAllDaysBetweenValid, createDateRange, createDecade, createMonth, createMonths, createYear, createYearRange, endOfDecade, getDaysBetween, getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek, getWeekNumber, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isZonedDateTime, parseStringToDateValue, startOfDecade, toDate };
|
|
216
|
+
export { CreateMonthProps, CreateSelectProps, DateRange, DateStep, DateValue$1 as DateValue, DateValue$2 as DateValue$1, Grid, HourCycle, Matcher, SegmentPart, SegmentValueObj, WeekDayFormat, WeekStartsOn, areAllDaysBetweenValid, createDateRange, createDecade, createMonth, createMonths, createYear, createYearRange, endOfDecade, getDaysBetween, getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek, getWeekNumber, getWeekStartsOn, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isZonedDateTime, parseStringToDateValue, startOfDecade, toDate };
|
|
210
217
|
//# sourceMappingURL=index2.d.cts.map
|
package/dist/index2.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.d.cts","names":[],"sources":["../src/date/types.ts","../src/shared/date/types.ts","../src/shared/date/parts.ts","../src/date/calendar.ts","../src/date/comparators.ts"],"sourcesContent":[],"mappings":";;;KAQY,OAAA,UAAiB;AAAjB,KAEA,IAFO,CAAA,CAAA,CAAA,GAAA;EAEP;;;;;AAyBF;SAlBD;;;ACFT;AAUA;;;;EAEgB,IAAA,EDDR,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QAAA,EAAA,WAAA,CAAA;;;AAFJ,KGGA,aAAA,GHHiB,QAAS,GAAA,OAAA,GAAA,MAAA;AAE1B,KGGA,
|
|
1
|
+
{"version":3,"file":"index2.d.cts","names":[],"sources":["../src/date/types.ts","../src/shared/date/types.ts","../src/shared/date/parts.ts","../src/date/calendar.ts","../src/date/comparators.ts"],"sourcesContent":[],"mappings":";;;KAQY,OAAA,UAAiB;AAAjB,KAEA,IAFO,CAAA,CAAA,CAAA,GAAA;EAEP;;;;;AAyBF;SAlBD;;;ACFT;AAUA;;;;EAEgB,IAAA,EDDR,CCCQ,EAAA,EAAA;EAGJ;AAEZ;AACA;AACA;AACA;AACA;;EAAuB,KAAG,EDDjB,CCCiB,EAAA;CAAmB;AAAyB;;;ADV9D,KCXI,QAAA,GDWJ;EAAC,IASA,CAAA,EAAA,MAAA;EAAC,KAAA,CAAA,EAAA,MAAA;;;;ECpBE,MAAA,CAAA,EAAA,MAAQ;EAUR,WAAA,CAAS,EAAA,MAAA;CAAA;AACZ,KADG,SAAA,GACH;EAAS,KACX,EADE,WACF,GAAA,SAAA;EAAS,GAAA,EAAT,WAAS,GAAA,SAAA;AAGhB,CAAA;AAEY,KAFA,SAAA,GAEe,EAAA,GAAA,EAAA,GAAA,SAAW;AAC1B,KADA,eAAA,GACe,CAAA,OADW,kBACkB,CAAA,CAAA,MAAA,CAAA;AAC5C,KADA,eAAA,GACmB,CAAA,OADO,kBACI,CAAA,CAAA,MAAsB,CAAA;AACpD,KADA,mBAAA,GACsB,CAAA,OADQ,sBACG,CAAA,CAAA,MAA0B,CAAA;AAC3D,KADA,sBAAA,GACW,CAAA,OADsB,0BACtB,CAAA,CAAA,MAAA,CAAA;AAAA,KAAX,WAAA,GAAc,mBAAH,GAAyB,sBAAzB;AAAyB,KAIpC,SAAA,GAJoC,IAAA,GAAA,IAAA,GAAA,IAAA;AAAsB,KAK1D,cAAA,GAL0D,QAM9D,eAFa,GAAA,MAAA,GAAA,IAAA,EACrB;AAGY,K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AAA,aAAA,ECoFN,ODpFM,GAAA,SAAA,EAAA,UAAA,ECqFT,ODrFS,GAAA,SAAA,EAAA,eAAA,CAAA,ECsFH,ODtFG,GAAA,SAAA,CAAA,EAAA,OAAA"}
|
package/dist/index2.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ declare const EDITABLE_SEGMENT_PARTS: readonly ["day", "month", "year", "hour",
|
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region src/date/calendar.d.ts
|
|
65
65
|
type WeekDayFormat = 'narrow' | 'short' | 'long';
|
|
66
|
+
type WeekStartsOn = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
66
67
|
type CreateSelectProps = {
|
|
67
68
|
/**
|
|
68
69
|
* The date object representing the date (usually the first day of the month/year).
|
|
@@ -77,7 +78,7 @@ type CreateMonthProps = {
|
|
|
77
78
|
/**
|
|
78
79
|
* The day of the week to start the calendar on (0 for Sunday, 1 for Monday, etc.).
|
|
79
80
|
*/
|
|
80
|
-
weekStartsOn:
|
|
81
|
+
weekStartsOn: WeekStartsOn;
|
|
81
82
|
/**
|
|
82
83
|
* Whether to always render 6 weeks in the calendar, even if the month doesn't
|
|
83
84
|
* span 6 weeks.
|
|
@@ -119,6 +120,12 @@ declare function createDateRange({
|
|
|
119
120
|
start,
|
|
120
121
|
end
|
|
121
122
|
}: DateRange): DateValue[];
|
|
123
|
+
/**
|
|
124
|
+
* It's better to use `getWeekStart` from `@internationalized/date`,
|
|
125
|
+
* but sadly it is not yet exported from the package.
|
|
126
|
+
* And the `Intl.Locale` API is not supported well enough yet.
|
|
127
|
+
*/
|
|
128
|
+
declare function getWeekStartsOn(locale: string): WeekStartsOn;
|
|
122
129
|
/**
|
|
123
130
|
* Returns the locale-specific week number
|
|
124
131
|
*/
|
|
@@ -206,5 +213,5 @@ declare function areAllDaysBetweenValid(start: DateValue, end: DateValue, isUnav
|
|
|
206
213
|
//# sourceMappingURL=comparators.d.ts.map
|
|
207
214
|
|
|
208
215
|
//#endregion
|
|
209
|
-
export { CreateMonthProps, CreateSelectProps, DateRange, DateStep, DateValue$1 as DateValue, DateValue$2 as DateValue$1, Grid, HourCycle, Matcher, SegmentPart, SegmentValueObj, WeekDayFormat, areAllDaysBetweenValid, createDateRange, createDecade, createMonth, createMonths, createYear, createYearRange, endOfDecade, getDaysBetween, getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek, getWeekNumber, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isZonedDateTime, parseStringToDateValue, startOfDecade, toDate };
|
|
216
|
+
export { CreateMonthProps, CreateSelectProps, DateRange, DateStep, DateValue$1 as DateValue, DateValue$2 as DateValue$1, Grid, HourCycle, Matcher, SegmentPart, SegmentValueObj, WeekDayFormat, WeekStartsOn, areAllDaysBetweenValid, createDateRange, createDecade, createMonth, createMonths, createYear, createYearRange, endOfDecade, getDaysBetween, getDaysInMonth, getLastFirstDayOfWeek, getNextLastDayOfWeek, getWeekNumber, getWeekStartsOn, hasTime, isAfter, isAfterOrSame, isBefore, isBeforeOrSame, isBetween, isBetweenInclusive, isCalendarDateTime, isZonedDateTime, parseStringToDateValue, startOfDecade, toDate };
|
|
210
217
|
//# sourceMappingURL=index2.d.ts.map
|
package/dist/index2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.d.ts","names":[],"sources":["../src/date/types.ts","../src/shared/date/types.ts","../src/shared/date/parts.ts","../src/date/calendar.ts","../src/date/comparators.ts"],"sourcesContent":[],"mappings":";;;KAQY,OAAA,UAAiB;AAAjB,KAEA,IAFO,CAAA,CAAA,CAAA,GAAA;EAEP;;;;;AAyBF;SAlBD;;;ACFT;AAUA;;;;EAEgB,IAAA,EDDR,CCCQ,EAAA,EAAA;EAGJ;AAEZ;AACA;AACA;AACA;AACA;;EAAuB,KAAG,EDDjB,CCCiB,EAAA;CAAmB;AAAyB;;;ADV9D,KCXI,QAAA,GDWJ;EAAC,IAS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":["../src/date/types.ts","../src/shared/date/types.ts","../src/shared/date/parts.ts","../src/date/calendar.ts","../src/date/comparators.ts"],"sourcesContent":[],"mappings":";;;KAQY,OAAA,UAAiB;AAAjB,KAEA,IAFO,CAAA,CAAA,CAAA,GAAA;EAEP;;;;;AAyBF;SAlBD;;;ACFT;AAUA;;;;EAEgB,IAAA,EDDR,CCCQ,EAAA,EAAA;EAGJ;AAEZ;AACA;AACA;AACA;AACA;;EAAuB,KAAG,EDDjB,CCCiB,EAAA;CAAmB;AAAyB;;;ADV9D,KCXI,QAAA,GDWJ;EAAC,IASA,CAAA,EAAA,MAAA;EAAC,KAAA,CAAA,EAAA,MAAA;;;;ECpBE,MAAA,CAAA,EAAA,MAAQ;EAUR,WAAA,CAAS,EAAA,MAAA;CAAA;AACZ,KADG,SAAA,GACH;EAAS,KACX,EADE,WACF,GAAA,SAAA;EAAS,GAAA,EAAT,WAAS,GAAA,SAAA;AAGhB,CAAA;AAEY,KAFA,SAAA,GAEe,EAAA,GAAA,EAAA,GAAW,SAAA;AAC1B,KADA,eAAA,GACe,CAAA,OADW,kBACkB,CAAA,CAAA,MAAA,CAAA;AAC5C,KADA,eAAA,GACmB,CAAA,OADO,kBACI,CAAA,CAAA,MAAsB,CAAA;AACpD,KADA,mBAAA,GACsB,CAAA,OADQ,sBACG,CAAA,CAAA,MAA0B,CAAA;AAC3D,KADA,sBAAA,GACW,CAAA,OADsB,0BACtB,CAAA,CAAA,MAAA,CAAA;AAAA,KAAX,WAAA,GAAc,mBAAH,GAAyB,sBAAzB;AAAyB,KAIpC,SAAA,GAJoC,IAAA,GAAA,IAAA,GAAA,IAAA;AAAsB,KAK1D,cAAA,GAL0D,QAM9D,eAFa,GAAA,MAAA,GAAA,IAAA,EACrB;AAGY,KAAA,cAAA,GAAc,QAClB,eADkB,GACA,CADA,SAAA,WAAA,GACwB,SADxB,GAAA,MAAA,GAAA,IAAA,EAAA;AACA,KAEd,qBAAA,GAAwB,cAFV,GAE2B,cAF3B;A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
|
|
@@ -35,7 +35,7 @@ function useForwardExpose() {
|
|
|
35
35
|
configurable: true,
|
|
36
36
|
get: () => ref$1 instanceof Element ? ref$1 : ref$1.$el
|
|
37
37
|
});
|
|
38
|
-
if (!(ref$1 instanceof Element) && !Object.
|
|
38
|
+
if (!(ref$1 instanceof Element) && !Object.prototype.hasOwnProperty.call(ref$1, "$el")) {
|
|
39
39
|
const childExposed = ref$1.$.exposed;
|
|
40
40
|
const merged = Object.assign({}, ret);
|
|
41
41
|
for (const key in childExposed) Object.defineProperty(merged, key, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForwardExpose.cjs","names":["localExpose: Record<string, any> | null","ret: Record<string, any>","ref: Element | T | null","ref"],"sources":["../../src/shared/useForwardExpose.ts"],"sourcesContent":[],"mappings":";;;;;AAKA,SAAgB,mBAAsD;CACpE,MAAM,WAAW,6BAAoB;CAErC,MAAM,aAAa,cAAyB;CAC5C,MAAM,iBAAiB,kBAAsB,MAAM;AAGjD,SAAO,CAAC,SAAS,UAAW,EAAC,SAAS,WAAW,OAAO,IAAI,SAAS,GAAG,WAAW,OAAO,IAAI,qBAAqB,gCAAa,WAAW;CAC5I,EAAC;CAIF,MAAMA,cAA0C,OAAO,OAAO,CAAE,GAAE,SAAS,QAAQ;CACnF,MAAMC,MAA2B,CAAE;AAGnC,MAAK,MAAM,OAAO,SAAS,MACzB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AAIJ,KAAI,OAAO,KAAK,YAAY,CAAC,SAAS,EACpC,MAAK,MAAM,OAAO,YAChB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,YAAa;CACzB,EAAC;AAKN,QAAO,eAAe,KAAK,OAAO;EAChC,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AACF,UAAS,UAAU;CAEnB,SAAS,WAAWC,OAAyB;AAC3C,aAAW,QAAQC;AAEnB,OAAKA,MACH;AAGF,SAAO,eAAe,KAAK,OAAO;GAChC,YAAY;GACZ,cAAc;GACd,KAAK,MAAOA,iBAAe,UAAUA,QAAMA,MAAI;EAChD,EAAC;AAIF,QAAMA,iBAAe,aAAa,OAAO,
|
|
1
|
+
{"version":3,"file":"useForwardExpose.cjs","names":["localExpose: Record<string, any> | null","ret: Record<string, any>","ref: Element | T | null","ref"],"sources":["../../src/shared/useForwardExpose.ts"],"sourcesContent":[],"mappings":";;;;;AAKA,SAAgB,mBAAsD;CACpE,MAAM,WAAW,6BAAoB;CAErC,MAAM,aAAa,cAAyB;CAC5C,MAAM,iBAAiB,kBAAsB,MAAM;AAGjD,SAAO,CAAC,SAAS,UAAW,EAAC,SAAS,WAAW,OAAO,IAAI,SAAS,GAAG,WAAW,OAAO,IAAI,qBAAqB,gCAAa,WAAW;CAC5I,EAAC;CAIF,MAAMA,cAA0C,OAAO,OAAO,CAAE,GAAE,SAAS,QAAQ;CACnF,MAAMC,MAA2B,CAAE;AAGnC,MAAK,MAAM,OAAO,SAAS,MACzB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AAIJ,KAAI,OAAO,KAAK,YAAY,CAAC,SAAS,EACpC,MAAK,MAAM,OAAO,YAChB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,YAAa;CACzB,EAAC;AAKN,QAAO,eAAe,KAAK,OAAO;EAChC,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AACF,UAAS,UAAU;CAEnB,SAAS,WAAWC,OAAyB;AAC3C,aAAW,QAAQC;AAEnB,OAAKA,MACH;AAGF,SAAO,eAAe,KAAK,OAAO;GAChC,YAAY;GACZ,cAAc;GACd,KAAK,MAAOA,iBAAe,UAAUA,QAAMA,MAAI;EAChD,EAAC;AAIF,QAAMA,iBAAe,aAAa,OAAO,UAAU,eAAe,KAAKA,OAAK,MAAM,EAAE;GAElF,MAAM,eAAeA,MAAI,EAAE;GAC3B,MAAM,SAAS,OAAO,OAAO,CAAE,GAAE,IAAI;AAErC,QAAK,MAAM,OAAO,aAChB,QAAO,eAAe,QAAQ,KAAK;IACjC,YAAY;IACZ,cAAc;IACd,KAAK,MAAM,aAAa;GACzB,EAAC;AAGJ,YAAS,UAAU;EACpB;CACF;AAED,QAAO;EAAE;EAAY;EAAY;CAAgB;AAClD"}
|
|
@@ -34,7 +34,7 @@ function useForwardExpose() {
|
|
|
34
34
|
configurable: true,
|
|
35
35
|
get: () => ref$1 instanceof Element ? ref$1 : ref$1.$el
|
|
36
36
|
});
|
|
37
|
-
if (!(ref$1 instanceof Element) && !Object.
|
|
37
|
+
if (!(ref$1 instanceof Element) && !Object.prototype.hasOwnProperty.call(ref$1, "$el")) {
|
|
38
38
|
const childExposed = ref$1.$.exposed;
|
|
39
39
|
const merged = Object.assign({}, ret);
|
|
40
40
|
for (const key in childExposed) Object.defineProperty(merged, key, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useForwardExpose.js","names":["localExpose: Record<string, any> | null","ret: Record<string, any>","ref: Element | T | null","ref"],"sources":["../../src/shared/useForwardExpose.ts"],"sourcesContent":[],"mappings":";;;;AAKA,SAAgB,mBAAsD;CACpE,MAAM,WAAW,oBAAoB;CAErC,MAAM,aAAa,KAAyB;CAC5C,MAAM,iBAAiB,SAAsB,MAAM;AAGjD,SAAO,CAAC,SAAS,UAAW,EAAC,SAAS,WAAW,OAAO,IAAI,SAAS,GAAG,WAAW,OAAO,IAAI,qBAAqB,aAAa,WAAW;CAC5I,EAAC;CAIF,MAAMA,cAA0C,OAAO,OAAO,CAAE,GAAE,SAAS,QAAQ;CACnF,MAAMC,MAA2B,CAAE;AAGnC,MAAK,MAAM,OAAO,SAAS,MACzB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AAIJ,KAAI,OAAO,KAAK,YAAY,CAAC,SAAS,EACpC,MAAK,MAAM,OAAO,YAChB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,YAAa;CACzB,EAAC;AAKN,QAAO,eAAe,KAAK,OAAO;EAChC,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AACF,UAAS,UAAU;CAEnB,SAAS,WAAWC,OAAyB;AAC3C,aAAW,QAAQC;AAEnB,OAAKA,MACH;AAGF,SAAO,eAAe,KAAK,OAAO;GAChC,YAAY;GACZ,cAAc;GACd,KAAK,MAAOA,iBAAe,UAAUA,QAAMA,MAAI;EAChD,EAAC;AAIF,QAAMA,iBAAe,aAAa,OAAO,
|
|
1
|
+
{"version":3,"file":"useForwardExpose.js","names":["localExpose: Record<string, any> | null","ret: Record<string, any>","ref: Element | T | null","ref"],"sources":["../../src/shared/useForwardExpose.ts"],"sourcesContent":[],"mappings":";;;;AAKA,SAAgB,mBAAsD;CACpE,MAAM,WAAW,oBAAoB;CAErC,MAAM,aAAa,KAAyB;CAC5C,MAAM,iBAAiB,SAAsB,MAAM;AAGjD,SAAO,CAAC,SAAS,UAAW,EAAC,SAAS,WAAW,OAAO,IAAI,SAAS,GAAG,WAAW,OAAO,IAAI,qBAAqB,aAAa,WAAW;CAC5I,EAAC;CAIF,MAAMA,cAA0C,OAAO,OAAO,CAAE,GAAE,SAAS,QAAQ;CACnF,MAAMC,MAA2B,CAAE;AAGnC,MAAK,MAAM,OAAO,SAAS,MACzB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AAIJ,KAAI,OAAO,KAAK,YAAY,CAAC,SAAS,EACpC,MAAK,MAAM,OAAO,YAChB,QAAO,eAAe,KAAK,KAAK;EAC9B,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,YAAa;CACzB,EAAC;AAKN,QAAO,eAAe,KAAK,OAAO;EAChC,YAAY;EACZ,cAAc;EACd,KAAK,MAAM,SAAS,MAAM;CAC3B,EAAC;AACF,UAAS,UAAU;CAEnB,SAAS,WAAWC,OAAyB;AAC3C,aAAW,QAAQC;AAEnB,OAAKA,MACH;AAGF,SAAO,eAAe,KAAK,OAAO;GAChC,YAAY;GACZ,cAAc;GACd,KAAK,MAAOA,iBAAe,UAAUA,QAAMA,MAAI;EAChD,EAAC;AAIF,QAAMA,iBAAe,aAAa,OAAO,UAAU,eAAe,KAAKA,OAAK,MAAM,EAAE;GAElF,MAAM,eAAeA,MAAI,EAAE;GAC3B,MAAM,SAAS,OAAO,OAAO,CAAE,GAAE,IAAI;AAErC,QAAK,MAAM,OAAO,aAChB,QAAO,eAAe,QAAQ,KAAK;IACjC,YAAY;IACZ,cAAc;IACd,KAAK,MAAM,aAAa;GACzB,EAAC;AAGJ,YAAS,UAAU;EACpB;CACF;AAED,QAAO;EAAE;EAAY;EAAY;CAAgB;AAClD"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reka-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.2",
|
|
5
5
|
"description": "Vue port for Radix UI Primitives.",
|
|
6
6
|
"author": "UnoVue Contributors (https://github.com/unovue)",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"funding": {
|
|
9
|
+
"type": "github",
|
|
10
|
+
"url": "https://github.com/sponsors/zernonia"
|
|
11
|
+
},
|
|
8
12
|
"homepage": "https://github.com/unovue/reka-ui",
|
|
9
13
|
"repository": {
|
|
10
14
|
"type": "git",
|
|
@@ -65,6 +69,15 @@
|
|
|
65
69
|
"!src/**/stories",
|
|
66
70
|
"!src/**/story"
|
|
67
71
|
],
|
|
72
|
+
"scripts": {
|
|
73
|
+
"build": "pnpm type-check && pnpm build-only",
|
|
74
|
+
"build-only": "tsdown && tsx scripts/postbuild.ts",
|
|
75
|
+
"watch": "tsdown --watch",
|
|
76
|
+
"type-check": "vue-tsc -p tsconfig.check.json --noEmit",
|
|
77
|
+
"test": "vitest",
|
|
78
|
+
"test-update": "vitest -u",
|
|
79
|
+
"pub:release": "npm publish --access public --provenance"
|
|
80
|
+
},
|
|
68
81
|
"peerDependencies": {
|
|
69
82
|
"vue": ">= 3.2.0"
|
|
70
83
|
},
|
|
@@ -91,7 +104,7 @@
|
|
|
91
104
|
"@tsconfig/node24": "^24.0.0",
|
|
92
105
|
"@types/jsdom": "^27.0.0",
|
|
93
106
|
"@types/node": "^24.0.13",
|
|
94
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
107
|
+
"@vitejs/plugin-vue": "^6.0.4",
|
|
95
108
|
"@vitest/coverage-istanbul": "^3.2.4",
|
|
96
109
|
"@vue/test-utils": "^2.4.6",
|
|
97
110
|
"@vue/tsconfig": "^0.7.0",
|
|
@@ -104,14 +117,5 @@
|
|
|
104
117
|
"vue": "3.5.17",
|
|
105
118
|
"vue-component-type-helpers": "^3.0.3",
|
|
106
119
|
"vue-tsc": "2.2.12"
|
|
107
|
-
},
|
|
108
|
-
"scripts": {
|
|
109
|
-
"build": "pnpm type-check && pnpm build-only",
|
|
110
|
-
"build-only": "tsdown && tsx scripts/postbuild.ts",
|
|
111
|
-
"watch": "tsdown --watch",
|
|
112
|
-
"type-check": "vue-tsc -p tsconfig.check.json --noEmit",
|
|
113
|
-
"test": "vitest",
|
|
114
|
-
"test-update": "vitest -u",
|
|
115
|
-
"pub:release": "pnpm publish --no-git-checks --access public"
|
|
116
120
|
}
|
|
117
|
-
}
|
|
121
|
+
}
|
|
@@ -82,8 +82,15 @@ const isOutsideVisibleView = computed(() =>
|
|
|
82
82
|
const isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (rootContext.disableDaysOutsideCurrentView.value && isOutsideView.value))
|
|
83
83
|
|
|
84
84
|
const isFocusedDate = computed(() => {
|
|
85
|
-
|
|
85
|
+
if (isOutsideView.value || isDisabled.value)
|
|
86
|
+
return false
|
|
87
|
+
if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))
|
|
88
|
+
return true
|
|
89
|
+
if ((!rootContext.hasSelectedDate.value || rootContext.isSelectedDateDisabled.value) && !rootContext.isPlaceholderFocusable.value)
|
|
90
|
+
return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)
|
|
91
|
+
return false
|
|
86
92
|
})
|
|
93
|
+
|
|
87
94
|
const isSelectedDate = computed(() => rootContext.isDateSelected(props.day))
|
|
88
95
|
|
|
89
96
|
function changeDate(date: DateValue) {
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import type { DateValue } from '@internationalized/date'
|
|
3
3
|
|
|
4
4
|
import type { Ref } from 'vue'
|
|
5
|
-
import type { Grid, Matcher, WeekDayFormat } from '@/date'
|
|
5
|
+
import type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'
|
|
6
6
|
import type { PrimitiveProps } from '@/Primitive'
|
|
7
7
|
|
|
8
8
|
import type { Formatter } from '@/shared'
|
|
9
9
|
import type { Direction } from '@/shared/types'
|
|
10
10
|
import { isEqualDay, isSameDay } from '@internationalized/date'
|
|
11
|
+
import { getWeekStartsOn } from '@/date'
|
|
11
12
|
import { createContext, useDirection, useLocale } from '@/shared'
|
|
12
13
|
import { getDefaultDate, handleCalendarInitialFocus } from '@/shared/date'
|
|
13
14
|
import { useCalendar, useCalendarState } from './useCalendar'
|
|
@@ -20,7 +21,7 @@ type CalendarRootContext = {
|
|
|
20
21
|
preventDeselect: Ref<boolean>
|
|
21
22
|
grid: Ref<Grid<DateValue>[]>
|
|
22
23
|
weekDays: Ref<string[]>
|
|
23
|
-
weekStartsOn: Ref<
|
|
24
|
+
weekStartsOn: Ref<WeekStartsOn>
|
|
24
25
|
weekdayFormat: Ref<WeekDayFormat>
|
|
25
26
|
fixedWeeks: Ref<boolean>
|
|
26
27
|
multiple: Ref<boolean>
|
|
@@ -47,6 +48,10 @@ type CalendarRootContext = {
|
|
|
47
48
|
disableDaysOutsideCurrentView: Ref<boolean>
|
|
48
49
|
minValue: Ref<DateValue | undefined>
|
|
49
50
|
maxValue: Ref<DateValue | undefined>
|
|
51
|
+
isPlaceholderFocusable: Ref<boolean>
|
|
52
|
+
firstFocusableDate: Ref<DateValue | undefined>
|
|
53
|
+
hasSelectedDate: Ref<boolean>
|
|
54
|
+
isSelectedDateDisabled: Ref<boolean>
|
|
50
55
|
}
|
|
51
56
|
|
|
52
57
|
export interface CalendarRootProps extends PrimitiveProps {
|
|
@@ -61,7 +66,7 @@ export interface CalendarRootProps extends PrimitiveProps {
|
|
|
61
66
|
/** Whether or not to prevent the user from deselecting a date without selecting another date first */
|
|
62
67
|
preventDeselect?: boolean
|
|
63
68
|
/** The day of the week to start the calendar on */
|
|
64
|
-
weekStartsOn?:
|
|
69
|
+
weekStartsOn?: WeekStartsOn
|
|
65
70
|
/** The format to use for the weekday strings provided via the weekdays slot prop */
|
|
66
71
|
weekdayFormat?: WeekDayFormat
|
|
67
72
|
/** The accessible label for the calendar */
|
|
@@ -113,7 +118,7 @@ export const [injectCalendarRootContext, provideCalendarRootContext]
|
|
|
113
118
|
|
|
114
119
|
<script setup lang="ts">
|
|
115
120
|
import { useVModel } from '@vueuse/core'
|
|
116
|
-
import { onMounted, toRefs, watch } from 'vue'
|
|
121
|
+
import { computed, onMounted, toRefs, watch } from 'vue'
|
|
117
122
|
import { Primitive, usePrimitiveElement } from '@/Primitive'
|
|
118
123
|
|
|
119
124
|
const props = withDefaults(defineProps<CalendarRootProps>(), {
|
|
@@ -121,7 +126,6 @@ const props = withDefaults(defineProps<CalendarRootProps>(), {
|
|
|
121
126
|
as: 'div',
|
|
122
127
|
pagedNavigation: false,
|
|
123
128
|
preventDeselect: false,
|
|
124
|
-
weekStartsOn: 0,
|
|
125
129
|
weekdayFormat: 'narrow',
|
|
126
130
|
fixedWeeks: false,
|
|
127
131
|
multiple: false,
|
|
@@ -144,7 +148,7 @@ defineSlots<{
|
|
|
144
148
|
/** The days of the week */
|
|
145
149
|
weekDays: string[]
|
|
146
150
|
/** The start of the week */
|
|
147
|
-
weekStartsOn:
|
|
151
|
+
weekStartsOn: WeekStartsOn
|
|
148
152
|
/** The calendar locale */
|
|
149
153
|
locale: string
|
|
150
154
|
/** Whether or not to always display 6 weeks in the calendar */
|
|
@@ -159,7 +163,6 @@ const {
|
|
|
159
163
|
readonly,
|
|
160
164
|
initialFocus,
|
|
161
165
|
pagedNavigation,
|
|
162
|
-
weekStartsOn,
|
|
163
166
|
weekdayFormat,
|
|
164
167
|
fixedWeeks,
|
|
165
168
|
multiple,
|
|
@@ -182,6 +185,7 @@ const { primitiveElement, currentElement: parentElement }
|
|
|
182
185
|
= usePrimitiveElement()
|
|
183
186
|
const locale = useLocale(propLocale)
|
|
184
187
|
const dir = useDirection(propDir)
|
|
188
|
+
const weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))
|
|
185
189
|
|
|
186
190
|
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
187
191
|
defaultValue: defaultValue.value,
|
|
@@ -216,6 +220,8 @@ const {
|
|
|
216
220
|
prevPage,
|
|
217
221
|
formatter,
|
|
218
222
|
grid,
|
|
223
|
+
isPlaceholderFocusable,
|
|
224
|
+
firstFocusableDate,
|
|
219
225
|
} = useCalendar({
|
|
220
226
|
locale,
|
|
221
227
|
placeholder,
|
|
@@ -237,6 +243,8 @@ const {
|
|
|
237
243
|
const {
|
|
238
244
|
isInvalid,
|
|
239
245
|
isDateSelected,
|
|
246
|
+
hasSelectedDate,
|
|
247
|
+
isSelectedDateDisabled,
|
|
240
248
|
} = useCalendarState({
|
|
241
249
|
date: modelValue,
|
|
242
250
|
isDateDisabled,
|
|
@@ -327,6 +335,10 @@ provideCalendarRootContext({
|
|
|
327
335
|
disableDaysOutsideCurrentView,
|
|
328
336
|
minValue,
|
|
329
337
|
maxValue,
|
|
338
|
+
isPlaceholderFocusable,
|
|
339
|
+
firstFocusableDate,
|
|
340
|
+
hasSelectedDate,
|
|
341
|
+
isSelectedDateDisabled,
|
|
330
342
|
})
|
|
331
343
|
</script>
|
|
332
344
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
import type { DateFields, DateValue } from '@internationalized/date'
|
|
6
6
|
import type { Ref } from 'vue'
|
|
7
|
-
import type { Grid, Matcher, WeekDayFormat } from '@/date'
|
|
7
|
+
import type { Grid, Matcher, WeekDayFormat, WeekStartsOn } from '@/date'
|
|
8
8
|
import type { DateFormatterOptions } from '@/shared/useDateFormatter'
|
|
9
|
-
import { isEqualMonth, isSameDay } from '@internationalized/date'
|
|
9
|
+
import { isEqualMonth, isSameDay, isSameMonth } from '@internationalized/date'
|
|
10
10
|
import { computed, ref, watch } from 'vue'
|
|
11
11
|
import { createMonths, getDaysInMonth, isAfter, isBefore, toDate } from '@/date'
|
|
12
12
|
import { useDateFormatter } from '@/shared'
|
|
@@ -14,7 +14,7 @@ import { useDateFormatter } from '@/shared'
|
|
|
14
14
|
export type UseCalendarProps = {
|
|
15
15
|
locale: Ref<string>
|
|
16
16
|
placeholder: Ref<DateValue>
|
|
17
|
-
weekStartsOn: Ref<
|
|
17
|
+
weekStartsOn: Ref<WeekStartsOn>
|
|
18
18
|
fixedWeeks: Ref<boolean>
|
|
19
19
|
numberOfMonths: Ref<number>
|
|
20
20
|
minValue: Ref<DateValue | undefined>
|
|
@@ -71,9 +71,26 @@ export function useCalendarState(props: UseCalendarStateProps) {
|
|
|
71
71
|
},
|
|
72
72
|
)
|
|
73
73
|
|
|
74
|
+
const hasSelectedDate = computed(() => {
|
|
75
|
+
return Array.isArray(props.date.value) ? props.date.value.length > 0 : !!props.date.value
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
const isSelectedDateDisabled = computed(() => {
|
|
79
|
+
if (Array.isArray(props.date.value)) {
|
|
80
|
+
if (!props.date.value.length)
|
|
81
|
+
return false
|
|
82
|
+
return props.date.value.some(dateObj => props.isDateDisabled?.(dateObj))
|
|
83
|
+
}
|
|
84
|
+
if (!props.date.value)
|
|
85
|
+
return false
|
|
86
|
+
return !!props.isDateDisabled?.(props.date.value)
|
|
87
|
+
})
|
|
88
|
+
|
|
74
89
|
return {
|
|
75
90
|
isDateSelected,
|
|
76
91
|
isInvalid,
|
|
92
|
+
hasSelectedDate,
|
|
93
|
+
isSelectedDateDisabled,
|
|
77
94
|
}
|
|
78
95
|
}
|
|
79
96
|
|
|
@@ -336,6 +353,27 @@ export function useCalendar(props: UseCalendarProps) {
|
|
|
336
353
|
|
|
337
354
|
const fullCalendarLabel = computed(() => `${props.calendarLabel.value ?? 'Event Date'}, ${headingValue.value}`)
|
|
338
355
|
|
|
356
|
+
const isPlaceholderFocusable = computed(() => {
|
|
357
|
+
return !(isDateDisabled(props.placeholder.value) || isDateUnavailable(props.placeholder.value) || isOutsideVisibleView(props.placeholder.value))
|
|
358
|
+
})
|
|
359
|
+
|
|
360
|
+
const firstFocusableDate = computed(() => {
|
|
361
|
+
for (const month of grid.value) {
|
|
362
|
+
if (props.minValue.value && isBefore(month.value, props.minValue.value))
|
|
363
|
+
continue
|
|
364
|
+
|
|
365
|
+
const daysInMonth = getDaysInMonth(month.value)
|
|
366
|
+
const startDay = props.minValue.value && isSameMonth(props.minValue.value, month.value) ? props.minValue.value.day : 1
|
|
367
|
+
|
|
368
|
+
for (let day = startDay; day <= daysInMonth; day++) {
|
|
369
|
+
const date = month.value.set({ day })
|
|
370
|
+
if (isDateDisabled(date) || isDateUnavailable(date))
|
|
371
|
+
continue
|
|
372
|
+
return date
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
})
|
|
376
|
+
|
|
339
377
|
return {
|
|
340
378
|
isDateDisabled,
|
|
341
379
|
isDateUnavailable,
|
|
@@ -350,5 +388,7 @@ export function useCalendar(props: UseCalendarProps) {
|
|
|
350
388
|
prevPage,
|
|
351
389
|
headingValue,
|
|
352
390
|
fullCalendarLabel,
|
|
391
|
+
isPlaceholderFocusable,
|
|
392
|
+
firstFocusableDate,
|
|
353
393
|
}
|
|
354
394
|
}
|
|
@@ -3,10 +3,11 @@ import type { DateValue } from '@internationalized/date'
|
|
|
3
3
|
|
|
4
4
|
import type { Ref } from 'vue'
|
|
5
5
|
import type { CalendarRootProps, DateFieldRoot, DateFieldRootProps, PopoverRootEmits, PopoverRootProps } from '..'
|
|
6
|
-
import type { Matcher, WeekDayFormat } from '@/date'
|
|
6
|
+
import type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'
|
|
7
7
|
import type { DateStep, Granularity, HourCycle } from '@/shared/date'
|
|
8
8
|
import type { Direction } from '@/shared/types'
|
|
9
9
|
import { computed, ref, toRefs, watch } from 'vue'
|
|
10
|
+
import { getWeekStartsOn } from '@/date'
|
|
10
11
|
import { createContext, useDirection, useLocale } from '@/shared'
|
|
11
12
|
import { getDefaultDate } from '@/shared/date'
|
|
12
13
|
import { PopoverRoot } from '..'
|
|
@@ -26,7 +27,7 @@ type DatePickerRootContext = {
|
|
|
26
27
|
placeholder: Ref<DateValue>
|
|
27
28
|
pagedNavigation: Ref<boolean>
|
|
28
29
|
preventDeselect: Ref<boolean>
|
|
29
|
-
weekStartsOn: Ref<
|
|
30
|
+
weekStartsOn: Ref<WeekStartsOn>
|
|
30
31
|
weekdayFormat: Ref<WeekDayFormat>
|
|
31
32
|
fixedWeeks: Ref<boolean>
|
|
32
33
|
numberOfMonths: Ref<number>
|
|
@@ -73,7 +74,6 @@ const props = withDefaults(defineProps<DatePickerRootProps>(), {
|
|
|
73
74
|
modal: false,
|
|
74
75
|
pagedNavigation: false,
|
|
75
76
|
preventDeselect: false,
|
|
76
|
-
weekStartsOn: 0,
|
|
77
77
|
weekdayFormat: 'narrow',
|
|
78
78
|
fixedWeeks: false,
|
|
79
79
|
numberOfMonths: 1,
|
|
@@ -90,7 +90,6 @@ const {
|
|
|
90
90
|
disabled,
|
|
91
91
|
readonly,
|
|
92
92
|
pagedNavigation,
|
|
93
|
-
weekStartsOn,
|
|
94
93
|
weekdayFormat,
|
|
95
94
|
fixedWeeks,
|
|
96
95
|
numberOfMonths,
|
|
@@ -115,6 +114,7 @@ const {
|
|
|
115
114
|
|
|
116
115
|
const dir = useDirection(propDir)
|
|
117
116
|
const locale = useLocale(propLocale)
|
|
117
|
+
const weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))
|
|
118
118
|
|
|
119
119
|
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
120
120
|
defaultValue: defaultValue.value,
|
|
@@ -3,10 +3,11 @@ import type { DateValue } from '@internationalized/date'
|
|
|
3
3
|
|
|
4
4
|
import type { Ref } from 'vue'
|
|
5
5
|
import type { DateRangeFieldRoot, DateRangeFieldRootProps, PopoverRootEmits, PopoverRootProps, RangeCalendarRootProps } from '..'
|
|
6
|
-
import type { Matcher, WeekDayFormat } from '@/date'
|
|
6
|
+
import type { Matcher, WeekDayFormat, WeekStartsOn } from '@/date'
|
|
7
7
|
import type { DateRange, DateStep, Granularity, HourCycle } from '@/shared/date'
|
|
8
8
|
|
|
9
9
|
import type { Direction } from '@/shared/types'
|
|
10
|
+
import { getWeekStartsOn } from '@/date'
|
|
10
11
|
import { createContext, useDirection, useLocale } from '@/shared'
|
|
11
12
|
import { getDefaultDate } from '@/shared/date'
|
|
12
13
|
import { PopoverRoot } from '..'
|
|
@@ -26,7 +27,7 @@ type DateRangePickerRootContext = {
|
|
|
26
27
|
placeholder: Ref<DateValue>
|
|
27
28
|
pagedNavigation: Ref<boolean>
|
|
28
29
|
preventDeselect: Ref<boolean>
|
|
29
|
-
weekStartsOn: Ref<
|
|
30
|
+
weekStartsOn: Ref<WeekStartsOn>
|
|
30
31
|
weekdayFormat: Ref<WeekDayFormat>
|
|
31
32
|
fixedWeeks: Ref<boolean>
|
|
32
33
|
numberOfMonths: Ref<number>
|
|
@@ -69,7 +70,7 @@ export const [injectDateRangePickerRootContext, provideDateRangePickerRootContex
|
|
|
69
70
|
|
|
70
71
|
<script setup lang="ts">
|
|
71
72
|
import { useVModel } from '@vueuse/core'
|
|
72
|
-
import { ref, toRefs, watch } from 'vue'
|
|
73
|
+
import { computed, ref, toRefs, watch } from 'vue'
|
|
73
74
|
|
|
74
75
|
defineOptions({
|
|
75
76
|
inheritAttrs: false,
|
|
@@ -81,7 +82,6 @@ const props = withDefaults(defineProps<DateRangePickerRootProps>(), {
|
|
|
81
82
|
modal: false,
|
|
82
83
|
pagedNavigation: false,
|
|
83
84
|
preventDeselect: false,
|
|
84
|
-
weekStartsOn: 0,
|
|
85
85
|
weekdayFormat: 'narrow',
|
|
86
86
|
fixedWeeks: false,
|
|
87
87
|
numberOfMonths: 1,
|
|
@@ -101,7 +101,6 @@ const {
|
|
|
101
101
|
disabled,
|
|
102
102
|
readonly,
|
|
103
103
|
pagedNavigation,
|
|
104
|
-
weekStartsOn,
|
|
105
104
|
weekdayFormat,
|
|
106
105
|
fixedWeeks,
|
|
107
106
|
numberOfMonths,
|
|
@@ -129,6 +128,7 @@ const {
|
|
|
129
128
|
|
|
130
129
|
const dir = useDirection(propsDir)
|
|
131
130
|
const locale = useLocale(propLocale)
|
|
131
|
+
const weekStartsOn = computed(() => props.weekStartsOn ?? getWeekStartsOn(locale.value))
|
|
132
132
|
|
|
133
133
|
const modelValue = useVModel(props, 'modelValue', emits, {
|
|
134
134
|
defaultValue: props.defaultValue ?? { start: undefined, end: undefined },
|
|
@@ -24,7 +24,7 @@ export interface RadioGroupRootProps extends PrimitiveProps, FormFieldProps {
|
|
|
24
24
|
}
|
|
25
25
|
export type RadioGroupRootEmits = {
|
|
26
26
|
/** Event handler called when the radio group value changes */
|
|
27
|
-
'update:modelValue': [payload:
|
|
27
|
+
'update:modelValue': [payload: AcceptableValue]
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
interface RadioGroupRootContext {
|
|
@@ -94,7 +94,15 @@ const isDisabled = computed(() => rootContext.isDateDisabled(props.day) || (root
|
|
|
94
94
|
const dayValue = computed(() => props.day.day.toLocaleString(rootContext.locale.value))
|
|
95
95
|
|
|
96
96
|
const isFocusedDate = computed(() => {
|
|
97
|
-
|
|
97
|
+
if (isOutsideView.value || isDisabled.value)
|
|
98
|
+
return false
|
|
99
|
+
if (!rootContext.disabled.value && rootContext.isPlaceholderFocusable.value && isSameDay(props.day, rootContext.placeholder.value))
|
|
100
|
+
return true
|
|
101
|
+
if (!rootContext.disabled.value && rootContext.selectedFocusableDate.value && !rootContext.isPlaceholderFocusable.value)
|
|
102
|
+
return isSameDay(props.day, rootContext.selectedFocusableDate.value)
|
|
103
|
+
if (!rootContext.disabled.value && (!rootContext.hasSelectedDate.value || rootContext.isSelectedDisabled.value) && !rootContext.isPlaceholderFocusable.value)
|
|
104
|
+
return rootContext.firstFocusableDate.value && isSameDay(props.day, rootContext.firstFocusableDate.value)
|
|
105
|
+
return false
|
|
98
106
|
})
|
|
99
107
|
|
|
100
108
|
function changeDate(e: MouseEvent | KeyboardEvent, date: DateValue) {
|
|
@@ -103,22 +111,24 @@ function changeDate(e: MouseEvent | KeyboardEvent, date: DateValue) {
|
|
|
103
111
|
if (rootContext.isDateDisabled(date) || rootContext.isDateUnavailable?.(date))
|
|
104
112
|
return
|
|
105
113
|
|
|
106
|
-
rootContext.lastPressedDateValue.value = date.copy()
|
|
107
|
-
|
|
108
114
|
if (rootContext.startValue.value && rootContext.highlightedRange.value === null) {
|
|
109
115
|
if (isSameDay(date, rootContext.startValue.value) && !rootContext.preventDeselect.value && !rootContext.endValue.value) {
|
|
110
116
|
rootContext.startValue.value = undefined
|
|
111
117
|
rootContext.onPlaceholderChange(date)
|
|
118
|
+
rootContext.lastPressedDateValue.value = date.copy()
|
|
112
119
|
return
|
|
113
120
|
}
|
|
114
121
|
else if (!rootContext.endValue.value) {
|
|
115
122
|
e.preventDefault()
|
|
116
123
|
if (rootContext.lastPressedDateValue.value && isSameDay(rootContext.lastPressedDateValue.value, date))
|
|
117
124
|
rootContext.startValue.value = date.copy()
|
|
125
|
+
rootContext.lastPressedDateValue.value = date.copy()
|
|
118
126
|
return
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
129
|
|
|
130
|
+
rootContext.lastPressedDateValue.value = date.copy()
|
|
131
|
+
|
|
122
132
|
if (
|
|
123
133
|
rootContext.startValue.value
|
|
124
134
|
&& rootContext.endValue.value
|
|
@@ -26,6 +26,7 @@ const readonly = computed(() => rootContext.readonly.value ? true : undefined)
|
|
|
26
26
|
:aria-disabled="disabled"
|
|
27
27
|
:data-readonly="readonly && ''"
|
|
28
28
|
:data-disabled="disabled && ''"
|
|
29
|
+
@mouseleave="rootContext.focusedValue.value = undefined"
|
|
29
30
|
>
|
|
30
31
|
<slot />
|
|
31
32
|
</Primitive>
|