@react-aria/calendar 3.5.7 → 3.5.8
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/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useCalendar.mjs +1 -1
- package/dist/useCalendarBase.main.js +13 -13
- package/dist/useCalendarBase.mjs +14 -14
- package/dist/useCalendarBase.module.js +13 -13
- package/dist/useCalendarCell.main.js +40 -40
- package/dist/useCalendarCell.mjs +41 -41
- package/dist/useCalendarCell.module.js +40 -40
- package/dist/useCalendarGrid.main.js +23 -23
- package/dist/useCalendarGrid.mjs +24 -24
- package/dist/useCalendarGrid.module.js +23 -23
- package/dist/useRangeCalendar.main.js +4 -4
- package/dist/useRangeCalendar.mjs +5 -5
- package/dist/useRangeCalendar.module.js +4 -4
- package/dist/utils.main.js +22 -22
- package/dist/utils.mjs +23 -23
- package/dist/utils.module.js +22 -22
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +11 -11
package/dist/utils.module.js
CHANGED
|
@@ -23,22 +23,22 @@ function $parcel$interopDefault(a) {
|
|
|
23
23
|
|
|
24
24
|
const $a074e1e2d0f0a665$export$653eddfc964b0f8a = new WeakMap();
|
|
25
25
|
function $a074e1e2d0f0a665$export$134cbb7fb09a9522(date) {
|
|
26
|
-
return (date === null || date === void 0 ? void 0 : date.calendar.identifier) ===
|
|
26
|
+
return (date === null || date === void 0 ? void 0 : date.calendar.identifier) === 'gregory' && date.era === 'BC' ? 'short' : undefined;
|
|
27
27
|
}
|
|
28
28
|
function $a074e1e2d0f0a665$export$b6df97c887c38e1a(state) {
|
|
29
|
-
let stringFormatter = (0, $3HATx$useLocalizedStringFormatter)((0, ($parcel$interopDefault($3HATx$intlStringsmodulejs))),
|
|
29
|
+
let stringFormatter = (0, $3HATx$useLocalizedStringFormatter)((0, ($parcel$interopDefault($3HATx$intlStringsmodulejs))), '@react-aria/calendar');
|
|
30
30
|
let start, end;
|
|
31
|
-
if (
|
|
31
|
+
if ('highlightedRange' in state) ({ start: start, end: end } = state.highlightedRange || {});
|
|
32
32
|
else start = end = state.value;
|
|
33
33
|
let dateFormatter = (0, $3HATx$useDateFormatter)({
|
|
34
|
-
weekday:
|
|
35
|
-
month:
|
|
36
|
-
year:
|
|
37
|
-
day:
|
|
34
|
+
weekday: 'long',
|
|
35
|
+
month: 'long',
|
|
36
|
+
year: 'numeric',
|
|
37
|
+
day: 'numeric',
|
|
38
38
|
era: $a074e1e2d0f0a665$export$134cbb7fb09a9522(start) || $a074e1e2d0f0a665$export$134cbb7fb09a9522(end),
|
|
39
39
|
timeZone: state.timeZone
|
|
40
40
|
});
|
|
41
|
-
let anchorDate =
|
|
41
|
+
let anchorDate = 'anchorDate' in state ? state.anchorDate : null;
|
|
42
42
|
return (0, $3HATx$useMemo)(()=>{
|
|
43
43
|
// No message if currently selecting a range, or there is nothing highlighted.
|
|
44
44
|
if (!anchorDate && start && end) {
|
|
@@ -46,17 +46,17 @@ function $a074e1e2d0f0a665$export$b6df97c887c38e1a(state) {
|
|
|
46
46
|
// otherwise include both dates.
|
|
47
47
|
if ((0, $3HATx$isSameDay)(start, end)) {
|
|
48
48
|
let date = dateFormatter.format(start.toDate(state.timeZone));
|
|
49
|
-
return stringFormatter.format(
|
|
49
|
+
return stringFormatter.format('selectedDateDescription', {
|
|
50
50
|
date: date
|
|
51
51
|
});
|
|
52
52
|
} else {
|
|
53
53
|
let dateRange = $a074e1e2d0f0a665$var$formatRange(dateFormatter, stringFormatter, start, end, state.timeZone);
|
|
54
|
-
return stringFormatter.format(
|
|
54
|
+
return stringFormatter.format('selectedRangeDescription', {
|
|
55
55
|
dateRange: dateRange
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return '';
|
|
60
60
|
}, [
|
|
61
61
|
start,
|
|
62
62
|
end,
|
|
@@ -67,19 +67,19 @@ function $a074e1e2d0f0a665$export$b6df97c887c38e1a(state) {
|
|
|
67
67
|
]);
|
|
68
68
|
}
|
|
69
69
|
function $a074e1e2d0f0a665$export$31afe65d91ef6e8(startDate, endDate, timeZone, isAria) {
|
|
70
|
-
let stringFormatter = (0, $3HATx$useLocalizedStringFormatter)((0, ($parcel$interopDefault($3HATx$intlStringsmodulejs))),
|
|
70
|
+
let stringFormatter = (0, $3HATx$useLocalizedStringFormatter)((0, ($parcel$interopDefault($3HATx$intlStringsmodulejs))), '@react-aria/calendar');
|
|
71
71
|
let era = $a074e1e2d0f0a665$export$134cbb7fb09a9522(startDate) || $a074e1e2d0f0a665$export$134cbb7fb09a9522(endDate);
|
|
72
72
|
let monthFormatter = (0, $3HATx$useDateFormatter)({
|
|
73
|
-
month:
|
|
74
|
-
year:
|
|
73
|
+
month: 'long',
|
|
74
|
+
year: 'numeric',
|
|
75
75
|
era: era,
|
|
76
76
|
calendar: startDate.calendar.identifier,
|
|
77
77
|
timeZone: timeZone
|
|
78
78
|
});
|
|
79
79
|
let dateFormatter = (0, $3HATx$useDateFormatter)({
|
|
80
|
-
month:
|
|
81
|
-
year:
|
|
82
|
-
day:
|
|
80
|
+
month: 'long',
|
|
81
|
+
year: 'numeric',
|
|
82
|
+
day: 'numeric',
|
|
83
83
|
era: era,
|
|
84
84
|
calendar: startDate.calendar.identifier,
|
|
85
85
|
timeZone: timeZone
|
|
@@ -109,17 +109,17 @@ function $a074e1e2d0f0a665$var$formatRange(dateFormatter, stringFormatter, start
|
|
|
109
109
|
let separatorIndex = -1;
|
|
110
110
|
for(let i = 0; i < parts.length; i++){
|
|
111
111
|
let part = parts[i];
|
|
112
|
-
if (part.source ===
|
|
113
|
-
else if (part.source ===
|
|
112
|
+
if (part.source === 'shared' && part.type === 'literal') separatorIndex = i;
|
|
113
|
+
else if (part.source === 'endRange') break;
|
|
114
114
|
}
|
|
115
115
|
// Now we can combine the parts into start and end strings.
|
|
116
|
-
let startValue =
|
|
117
|
-
let endValue =
|
|
116
|
+
let startValue = '';
|
|
117
|
+
let endValue = '';
|
|
118
118
|
for(let i = 0; i < parts.length; i++){
|
|
119
119
|
if (i < separatorIndex) startValue += parts[i].value;
|
|
120
120
|
else if (i > separatorIndex) endValue += parts[i].value;
|
|
121
121
|
}
|
|
122
|
-
return stringFormatter.format(
|
|
122
|
+
return stringFormatter.format('dateRange', {
|
|
123
123
|
startDate: startValue,
|
|
124
124
|
endDate: endValue
|
|
125
125
|
});
|
package/dist/zh-CN.mjs
CHANGED
package/dist/zh-TW.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/calendar",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.8",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@internationalized/date": "^3.5.
|
|
26
|
-
"@react-aria/i18n": "^3.11.
|
|
27
|
-
"@react-aria/interactions": "^3.21.
|
|
28
|
-
"@react-aria/live-announcer": "^3.3.
|
|
29
|
-
"@react-aria/utils": "^3.24.
|
|
30
|
-
"@react-stately/calendar": "^3.5.
|
|
31
|
-
"@react-types/button": "^3.9.
|
|
32
|
-
"@react-types/calendar": "^3.4.
|
|
33
|
-
"@react-types/shared": "^3.23.
|
|
25
|
+
"@internationalized/date": "^3.5.4",
|
|
26
|
+
"@react-aria/i18n": "^3.11.1",
|
|
27
|
+
"@react-aria/interactions": "^3.21.3",
|
|
28
|
+
"@react-aria/live-announcer": "^3.3.4",
|
|
29
|
+
"@react-aria/utils": "^3.24.1",
|
|
30
|
+
"@react-stately/calendar": "^3.5.1",
|
|
31
|
+
"@react-types/button": "^3.9.4",
|
|
32
|
+
"@react-types/calendar": "^3.4.6",
|
|
33
|
+
"@react-types/shared": "^3.23.1",
|
|
34
34
|
"@swc/helpers": "^0.5.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
44
44
|
}
|