@react-aria/datepicker 3.0.0-nightly.3180 → 3.0.0
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/main.js +197 -143
- package/dist/main.js.map +1 -1
- package/dist/module.js +197 -130
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +8 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/index.ts +7 -1
- package/src/useDateField.ts +15 -8
- package/src/useDatePicker.ts +12 -8
- package/src/useDatePickerGroup.ts +34 -5
- package/src/useDateRangePicker.ts +15 -13
- package/src/useDateSegment.ts +83 -63
- package/src/useDisplayNames.ts +1 -0
package/dist/main.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var $IwcIq$reactariafocus = require("@react-aria/focus");
|
|
2
2
|
var $IwcIq$reactariautils = require("@react-aria/utils");
|
|
3
|
+
var $IwcIq$react = require("react");
|
|
3
4
|
var $IwcIq$reactarialabel = require("@react-aria/label");
|
|
4
5
|
var $IwcIq$reactariai18n = require("@react-aria/i18n");
|
|
5
|
-
var $IwcIq$react = require("react");
|
|
6
6
|
var $IwcIq$reactariainteractions = require("@react-aria/interactions");
|
|
7
|
+
var $IwcIq$internationalizeddate = require("@internationalized/date");
|
|
7
8
|
var $IwcIq$internationalizednumber = require("@internationalized/number");
|
|
8
9
|
var $IwcIq$reactariaspinbutton = require("@react-aria/spinbutton");
|
|
9
10
|
var $IwcIq$internationalizedmessage = require("@internationalized/message");
|
|
@@ -11,22 +12,6 @@ var $IwcIq$internationalizedmessage = require("@internationalized/message");
|
|
|
11
12
|
function $parcel$export(e, n, v, s) {
|
|
12
13
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
14
|
}
|
|
14
|
-
function $parcel$exportWildcard(dest, source) {
|
|
15
|
-
Object.keys(source).forEach(function(key) {
|
|
16
|
-
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Object.defineProperty(dest, key, {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return source[key];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
return dest;
|
|
29
|
-
}
|
|
30
15
|
function $parcel$interopDefault(a) {
|
|
31
16
|
return a && a.__esModule ? a.default : a;
|
|
32
17
|
}
|
|
@@ -36,142 +21,145 @@ $parcel$export(module.exports, "useDateSegment", () => $5c015c6316d1904d$export$
|
|
|
36
21
|
$parcel$export(module.exports, "useDateField", () => $4acc2f407c169e55$export$5591b0b878c1a989);
|
|
37
22
|
$parcel$export(module.exports, "useTimeField", () => $4acc2f407c169e55$export$4c842f6a241dc825);
|
|
38
23
|
$parcel$export(module.exports, "useDateRangePicker", () => $20f695b1b69e6b9e$export$12fd5f0e9f4bb192);
|
|
24
|
+
$parcel$export(module.exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
25
|
+
|
|
26
|
+
|
|
39
27
|
|
|
40
28
|
var $c7d0e80b992ca68a$exports = {};
|
|
41
29
|
var $aa344be62785b256$exports = {};
|
|
42
|
-
$aa344be62785b256$exports = JSON.parse("{\"calendar\":\"التقويم\",\"
|
|
30
|
+
$aa344be62785b256$exports = JSON.parse("{\"calendar\":\"التقويم\",\"day\":\"يوم\",\"dayPeriod\":\"ص/م\",\"endDate\":\"تاريخ الانتهاء\",\"era\":\"العصر\",\"hour\":\"الساعات\",\"minute\":\"الدقائق\",\"month\":\"الشهر\",\"second\":\"الثواني\",\"selectedDateDescription\":\"تاريخ محدد: {date}\",\"selectedRangeDescription\":\"المدى الزمني المحدد: {startDate} إلى {endDate}\",\"selectedTimeDescription\":\"الوقت المحدد: {time}\",\"startDate\":\"تاريخ البدء\",\"timeZoneName\":\"التوقيت\",\"weekday\":\"اليوم\",\"year\":\"السنة\"}");
|
|
43
31
|
|
|
44
32
|
|
|
45
33
|
var $615986c3475e7c8c$exports = {};
|
|
46
|
-
$615986c3475e7c8c$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
34
|
+
$615986c3475e7c8c$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"ден\",\"dayPeriod\":\"пр.об./сл.об.\",\"endDate\":\"Крайна дата\",\"era\":\"ера\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месец\",\"second\":\"секунда\",\"selectedDateDescription\":\"Избрана дата: {date}\",\"selectedRangeDescription\":\"Избран диапазон: {startDate} до {endDate}\",\"selectedTimeDescription\":\"Избрано време: {time}\",\"startDate\":\"Начална дата\",\"timeZoneName\":\"часова зона\",\"weekday\":\"ден от седмицата\",\"year\":\"година\"}");
|
|
47
35
|
|
|
48
36
|
|
|
49
37
|
var $6c6207692f1ab248$exports = {};
|
|
50
|
-
$6c6207692f1ab248$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"
|
|
38
|
+
$6c6207692f1ab248$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"day\":\"den\",\"dayPeriod\":\"část dne\",\"endDate\":\"Konečné datum\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minuta\",\"month\":\"měsíc\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Vybrané datum: {date}\",\"selectedRangeDescription\":\"Vybrané období: {startDate} až {endDate}\",\"selectedTimeDescription\":\"Vybraný čas: {time}\",\"startDate\":\"Počáteční datum\",\"timeZoneName\":\"časové pásmo\",\"weekday\":\"den v týdnu\",\"year\":\"rok\"}");
|
|
51
39
|
|
|
52
40
|
|
|
53
41
|
var $fb37a9d024dd70f8$exports = {};
|
|
54
|
-
$fb37a9d024dd70f8$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
42
|
+
$fb37a9d024dd70f8$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Slutdato\",\"era\":\"æra\",\"hour\":\"time\",\"minute\":\"minut\",\"month\":\"måned\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valgt dato: {date}\",\"selectedRangeDescription\":\"Valgt interval: {startDate} til {endDate}\",\"selectedTimeDescription\":\"Valgt tidspunkt: {time}\",\"startDate\":\"Startdato\",\"timeZoneName\":\"tidszone\",\"weekday\":\"ugedag\",\"year\":\"år\"}");
|
|
55
43
|
|
|
56
44
|
|
|
57
45
|
var $d7780bd4790f7ae9$exports = {};
|
|
58
|
-
$d7780bd4790f7ae9$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
46
|
+
$d7780bd4790f7ae9$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"Tag\",\"dayPeriod\":\"Tageshälfte\",\"endDate\":\"Enddatum\",\"era\":\"Epoche\",\"hour\":\"Stunde\",\"minute\":\"Minute\",\"month\":\"Monat\",\"second\":\"Sekunde\",\"selectedDateDescription\":\"Ausgewähltes Datum: {date}\",\"selectedRangeDescription\":\"Ausgewählter Bereich: {startDate} bis {endDate}\",\"selectedTimeDescription\":\"Ausgewählte Zeit: {time}\",\"startDate\":\"Anfangsdatum\",\"timeZoneName\":\"Zeitzone\",\"weekday\":\"Wochentag\",\"year\":\"Jahr\"}");
|
|
59
47
|
|
|
60
48
|
|
|
61
49
|
var $9cdf03311f06c4ac$exports = {};
|
|
62
|
-
$9cdf03311f06c4ac$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"
|
|
50
|
+
$9cdf03311f06c4ac$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"day\":\"ημέρα\",\"dayPeriod\":\"π.μ./μ.μ.\",\"endDate\":\"Ημερομηνία λήξης\",\"era\":\"περίοδος\",\"hour\":\"ώρα\",\"minute\":\"λεπτό\",\"month\":\"μήνας\",\"second\":\"δευτερόλεπτο\",\"selectedDateDescription\":\"Επιλεγμένη ημερομηνία: {date}\",\"selectedRangeDescription\":\"Επιλεγμένο εύρος: {startDate} έως {endDate}\",\"selectedTimeDescription\":\"Επιλεγμένη ώρα: {time}\",\"startDate\":\"Ημερομηνία έναρξης\",\"timeZoneName\":\"ζώνη ώρας\",\"weekday\":\"καθημερινή\",\"year\":\"έτος\"}");
|
|
63
51
|
|
|
64
52
|
|
|
65
53
|
var $f93fc9e164ae811c$exports = {};
|
|
66
|
-
$f93fc9e164ae811c$exports = JSON.parse("{\"era\":\"era\",\"year\":\"year\",\"month\":\"month\",\"day\":\"day\",\"hour\":\"hour\",\"minute\":\"minute\",\"second\":\"second\",\"dayPeriod\":\"AM/PM\",\"calendar\":\"Calendar\",\"
|
|
54
|
+
$f93fc9e164ae811c$exports = JSON.parse("{\"era\":\"era\",\"year\":\"year\",\"month\":\"month\",\"day\":\"day\",\"hour\":\"hour\",\"minute\":\"minute\",\"second\":\"second\",\"dayPeriod\":\"AM/PM\",\"calendar\":\"Calendar\",\"startDate\":\"Start Date\",\"endDate\":\"End Date\",\"weekday\":\"day of the week\",\"timeZoneName\":\"time zone\",\"selectedDateDescription\":\"Selected Date: {date}\",\"selectedRangeDescription\":\"Selected Range: {startDate} to {endDate}\",\"selectedTimeDescription\":\"Selected Time: {time}\"}");
|
|
67
55
|
|
|
68
56
|
|
|
69
57
|
var $7426c3264bf5ffea$exports = {};
|
|
70
|
-
$7426c3264bf5ffea$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
58
|
+
$7426c3264bf5ffea$exports = JSON.parse("{\"calendar\":\"Calendario\",\"day\":\"día\",\"dayPeriod\":\"a. m./p. m.\",\"endDate\":\"Fecha final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mes\",\"second\":\"segundo\",\"selectedDateDescription\":\"Fecha seleccionada: {date}\",\"selectedRangeDescription\":\"Rango seleccionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora seleccionada: {time}\",\"startDate\":\"Fecha de inicio\",\"timeZoneName\":\"zona horaria\",\"weekday\":\"día de la semana\",\"year\":\"año\"}");
|
|
71
59
|
|
|
72
60
|
|
|
73
61
|
var $1115cc0042de790c$exports = {};
|
|
74
|
-
$1115cc0042de790c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
62
|
+
$1115cc0042de790c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"päev\",\"dayPeriod\":\"enne/pärast lõunat\",\"endDate\":\"Lõppkuupäev\",\"era\":\"ajastu\",\"hour\":\"tund\",\"minute\":\"minut\",\"month\":\"kuu\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valitud kuupäev: {date}\",\"selectedRangeDescription\":\"Valitud vahemik: {startDate} kuni {endDate}\",\"selectedTimeDescription\":\"Valitud aeg: {time}\",\"startDate\":\"Alguskuupäev\",\"timeZoneName\":\"ajavöönd\",\"weekday\":\"nädalapäev\",\"year\":\"aasta\"}");
|
|
75
63
|
|
|
76
64
|
|
|
77
65
|
var $4e80389dccb9283f$exports = {};
|
|
78
|
-
$4e80389dccb9283f$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"
|
|
66
|
+
$4e80389dccb9283f$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"day\":\"päivä\",\"dayPeriod\":\"vuorokaudenaika\",\"endDate\":\"Päättymispäivä\",\"era\":\"aikakausi\",\"hour\":\"tunti\",\"minute\":\"minuutti\",\"month\":\"kuukausi\",\"second\":\"sekunti\",\"selectedDateDescription\":\"Valittu päivämäärä: {date}\",\"selectedRangeDescription\":\"Valittu aikaväli: {startDate} – {endDate}\",\"selectedTimeDescription\":\"Valittu aika: {time}\",\"startDate\":\"Alkamispäivä\",\"timeZoneName\":\"aikavyöhyke\",\"weekday\":\"viikonpäivä\",\"year\":\"vuosi\"}");
|
|
79
67
|
|
|
80
68
|
|
|
81
69
|
var $78ad6f738c1f38d1$exports = {};
|
|
82
|
-
$78ad6f738c1f38d1$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"
|
|
70
|
+
$78ad6f738c1f38d1$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"day\":\"jour\",\"dayPeriod\":\"cadran\",\"endDate\":\"Date de fin\",\"era\":\"ère\",\"hour\":\"heure\",\"minute\":\"minute\",\"month\":\"mois\",\"second\":\"seconde\",\"selectedDateDescription\":\"Date sélectionnée : {date}\",\"selectedRangeDescription\":\"Plage sélectionnée : {startDate} au {endDate}\",\"selectedTimeDescription\":\"Heure choisie : {time}\",\"startDate\":\"Date de début\",\"timeZoneName\":\"fuseau horaire\",\"weekday\":\"jour de la semaine\",\"year\":\"année\"}");
|
|
83
71
|
|
|
84
72
|
|
|
85
73
|
var $50fa4716d827cd97$exports = {};
|
|
86
|
-
$50fa4716d827cd97$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"
|
|
74
|
+
$50fa4716d827cd97$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"day\":\"יום\",\"dayPeriod\":\"לפנה״צ/אחה״צ\",\"endDate\":\"תאריך סיום\",\"era\":\"תקופה\",\"hour\":\"שעה\",\"minute\":\"דקה\",\"month\":\"חודש\",\"second\":\"שנייה\",\"selectedDateDescription\":\"תאריך נבחר: {date}\",\"selectedRangeDescription\":\"טווח נבחר: {startDate} עד {endDate}\",\"selectedTimeDescription\":\"זמן נבחר: {time}\",\"startDate\":\"תאריך התחלה\",\"timeZoneName\":\"אזור זמן\",\"weekday\":\"יום בשבוע\",\"year\":\"שנה\"}");
|
|
87
75
|
|
|
88
76
|
|
|
89
77
|
var $7297908fac4cf6c2$exports = {};
|
|
90
|
-
$7297908fac4cf6c2$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
78
|
+
$7297908fac4cf6c2$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"day\":\"dan\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Datum završetka\",\"era\":\"era\",\"hour\":\"sat\",\"minute\":\"minuta\",\"month\":\"mjesec\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Odabrani datum: {date}\",\"selectedRangeDescription\":\"Odabrani raspon: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Odabrano vrijeme: {time}\",\"startDate\":\"Datum početka\",\"timeZoneName\":\"vremenska zona\",\"weekday\":\"dan u tjednu\",\"year\":\"godina\"}");
|
|
91
79
|
|
|
92
80
|
|
|
93
81
|
var $f95c1b06e1d5ba32$exports = {};
|
|
94
|
-
$f95c1b06e1d5ba32$exports = JSON.parse("{\"calendar\":\"Naptár\",\"
|
|
82
|
+
$f95c1b06e1d5ba32$exports = JSON.parse("{\"calendar\":\"Naptár\",\"day\":\"nap\",\"dayPeriod\":\"napszak\",\"endDate\":\"Befejező dátum\",\"era\":\"éra\",\"hour\":\"óra\",\"minute\":\"perc\",\"month\":\"hónap\",\"second\":\"másodperc\",\"selectedDateDescription\":\"Kijelölt dátum: {date}\",\"selectedRangeDescription\":\"Kijelölt tartomány: {startDate}–{endDate}\",\"selectedTimeDescription\":\"Kijelölt idő: {time}\",\"startDate\":\"Kezdő dátum\",\"timeZoneName\":\"időzóna\",\"weekday\":\"hét napja\",\"year\":\"év\"}");
|
|
95
83
|
|
|
96
84
|
|
|
97
85
|
var $437a8dc519258a01$exports = {};
|
|
98
|
-
$437a8dc519258a01$exports = JSON.parse("{\"calendar\":\"Calendario\",\"
|
|
86
|
+
$437a8dc519258a01$exports = JSON.parse("{\"calendar\":\"Calendario\",\"day\":\"giorno\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data finale\",\"era\":\"era\",\"hour\":\"ora\",\"minute\":\"minuto\",\"month\":\"mese\",\"second\":\"secondo\",\"selectedDateDescription\":\"Data selezionata: {date}\",\"selectedRangeDescription\":\"Intervallo selezionato: da {startDate} a {endDate}\",\"selectedTimeDescription\":\"Ora selezionata: {time}\",\"startDate\":\"Data iniziale\",\"timeZoneName\":\"fuso orario\",\"weekday\":\"giorno della settimana\",\"year\":\"anno\"}");
|
|
99
87
|
|
|
100
88
|
|
|
101
89
|
var $bd0aa2b50092a836$exports = {};
|
|
102
|
-
$bd0aa2b50092a836$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"
|
|
90
|
+
$bd0aa2b50092a836$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"day\":\"日\",\"dayPeriod\":\"午前/午後\",\"endDate\":\"終了日\",\"era\":\"時代\",\"hour\":\"時\",\"minute\":\"分\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選択した日付 : {date}\",\"selectedRangeDescription\":\"選択範囲 : {startDate} から {endDate}\",\"selectedTimeDescription\":\"選択した時間 : {time}\",\"startDate\":\"開始日\",\"timeZoneName\":\"タイムゾーン\",\"weekday\":\"曜日\",\"year\":\"年\"}");
|
|
103
91
|
|
|
104
92
|
|
|
105
93
|
var $bbd8176c2e044bc1$exports = {};
|
|
106
|
-
$bbd8176c2e044bc1$exports = JSON.parse("{\"calendar\":\"달력\",\"
|
|
94
|
+
$bbd8176c2e044bc1$exports = JSON.parse("{\"calendar\":\"달력\",\"day\":\"일\",\"dayPeriod\":\"오전/오후\",\"endDate\":\"종료 날짜\",\"era\":\"연호\",\"hour\":\"시\",\"minute\":\"분\",\"month\":\"월\",\"second\":\"초\",\"selectedDateDescription\":\"선택 일자: {date}\",\"selectedRangeDescription\":\"선택 범위: {startDate} ~ {endDate}\",\"selectedTimeDescription\":\"선택 시간: {time}\",\"startDate\":\"시작 날짜\",\"timeZoneName\":\"시간대\",\"weekday\":\"요일\",\"year\":\"년\"}");
|
|
107
95
|
|
|
108
96
|
|
|
109
97
|
var $1af703df56ff5180$exports = {};
|
|
110
|
-
$1af703df56ff5180$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"
|
|
98
|
+
$1af703df56ff5180$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"day\":\"diena\",\"dayPeriod\":\"iki pietų / po pietų\",\"endDate\":\"Pabaigos data\",\"era\":\"era\",\"hour\":\"valanda\",\"minute\":\"minutė\",\"month\":\"mėnuo\",\"second\":\"sekundė\",\"selectedDateDescription\":\"Pasirinkta data: {date}\",\"selectedRangeDescription\":\"Pasirinktas intervalas: nuo {startDate} iki {endDate}\",\"selectedTimeDescription\":\"Pasirinktas laikas: {time}\",\"startDate\":\"Pradžios data\",\"timeZoneName\":\"laiko juosta\",\"weekday\":\"savaitės diena\",\"year\":\"metai\"}");
|
|
111
99
|
|
|
112
100
|
|
|
113
101
|
var $9705eb4511dea9f8$exports = {};
|
|
114
|
-
$9705eb4511dea9f8$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"
|
|
102
|
+
$9705eb4511dea9f8$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"day\":\"diena\",\"dayPeriod\":\"priekšpusdienā/pēcpusdienā\",\"endDate\":\"Beigu datums\",\"era\":\"ēra\",\"hour\":\"stundas\",\"minute\":\"minūtes\",\"month\":\"mēnesis\",\"second\":\"sekundes\",\"selectedDateDescription\":\"Atlasītais datums: {date}\",\"selectedRangeDescription\":\"Atlasītais diapazons: no {startDate} līdz {endDate}\",\"selectedTimeDescription\":\"Atlasītais laiks: {time}\",\"startDate\":\"Sākuma datums\",\"timeZoneName\":\"laika josla\",\"weekday\":\"nedēļas diena\",\"year\":\"gads\"}");
|
|
115
103
|
|
|
116
104
|
|
|
117
105
|
var $8ef984876a7160bc$exports = {};
|
|
118
|
-
$8ef984876a7160bc$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
106
|
+
$8ef984876a7160bc$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Sluttdato\",\"era\":\"tidsalder\",\"hour\":\"time\",\"minute\":\"minutt\",\"month\":\"måned\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valgt dato: {date}\",\"selectedRangeDescription\":\"Valgt område: {startDate} til {endDate}\",\"selectedTimeDescription\":\"Valgt tid: {time}\",\"startDate\":\"Startdato\",\"timeZoneName\":\"tidssone\",\"weekday\":\"ukedag\",\"year\":\"år\"}");
|
|
119
107
|
|
|
120
108
|
|
|
121
109
|
var $b6e9809e1ecaa25e$exports = {};
|
|
122
|
-
$b6e9809e1ecaa25e$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
110
|
+
$b6e9809e1ecaa25e$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Einddatum\",\"era\":\"tijdperk\",\"hour\":\"uur\",\"minute\":\"minuut\",\"month\":\"maand\",\"second\":\"seconde\",\"selectedDateDescription\":\"Geselecteerde datum: {date}\",\"selectedRangeDescription\":\"Geselecteerd bereik: {startDate} tot {endDate}\",\"selectedTimeDescription\":\"Geselecteerde tijd: {time}\",\"startDate\":\"Startdatum\",\"timeZoneName\":\"tijdzone\",\"weekday\":\"dag van de week\",\"year\":\"jaar\"}");
|
|
123
111
|
|
|
124
112
|
|
|
125
113
|
var $deb2fa609661fe31$exports = {};
|
|
126
|
-
$deb2fa609661fe31$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"
|
|
114
|
+
$deb2fa609661fe31$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"day\":\"dzień\",\"dayPeriod\":\"rano / po południu / wieczorem\",\"endDate\":\"Data końcowa\",\"era\":\"era\",\"hour\":\"godzina\",\"minute\":\"minuta\",\"month\":\"miesiąc\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Wybrana data: {date}\",\"selectedRangeDescription\":\"Wybrany zakres: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Wybrany czas: {time}\",\"startDate\":\"Data początkowa\",\"timeZoneName\":\"strefa czasowa\",\"weekday\":\"dzień tygodnia\",\"year\":\"rok\"}");
|
|
127
115
|
|
|
128
116
|
|
|
129
117
|
var $591c8c054c84fa56$exports = {};
|
|
130
|
-
$591c8c054c84fa56$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
118
|
+
$591c8c054c84fa56$exports = JSON.parse("{\"calendar\":\"Calendário\",\"day\":\"dia\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"selectedDateDescription\":\"Data selecionada: {date}\",\"selectedRangeDescription\":\"Intervalo selecionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora selecionada: {time}\",\"startDate\":\"Data inicial\",\"timeZoneName\":\"fuso horário\",\"weekday\":\"dia da semana\",\"year\":\"ano\"}");
|
|
131
119
|
|
|
132
120
|
|
|
133
121
|
var $f1633bd6cbc228e8$exports = {};
|
|
134
|
-
$f1633bd6cbc228e8$exports = JSON.parse("{\"calendar\":\"Calendário\",\"
|
|
122
|
+
$f1633bd6cbc228e8$exports = JSON.parse("{\"calendar\":\"Calendário\",\"day\":\"dia\",\"dayPeriod\":\"am/pm\",\"endDate\":\"Data de Término\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"selectedDateDescription\":\"Data selecionada: {date}\",\"selectedRangeDescription\":\"Intervalo selecionado: {startDate} a {endDate}\",\"selectedTimeDescription\":\"Hora selecionada: {time}\",\"startDate\":\"Data de Início\",\"timeZoneName\":\"fuso horário\",\"weekday\":\"dia da semana\",\"year\":\"ano\"}");
|
|
135
123
|
|
|
136
124
|
|
|
137
125
|
var $14e09da03f3d1c5b$exports = {};
|
|
138
|
-
$14e09da03f3d1c5b$exports = JSON.parse("{\"calendar\":\"Calendar\",\"
|
|
126
|
+
$14e09da03f3d1c5b$exports = JSON.parse("{\"calendar\":\"Calendar\",\"day\":\"zi\",\"dayPeriod\":\"a.m/p.m.\",\"endDate\":\"Dată final\",\"era\":\"eră\",\"hour\":\"oră\",\"minute\":\"minut\",\"month\":\"lună\",\"second\":\"secundă\",\"selectedDateDescription\":\"Dată selectată: {date}\",\"selectedRangeDescription\":\"Interval selectat: de la {startDate} până la {endDate}\",\"selectedTimeDescription\":\"Ora selectată: {time}\",\"startDate\":\"Dată început\",\"timeZoneName\":\"fus orar\",\"weekday\":\"ziua din săptămână\",\"year\":\"an\"}");
|
|
139
127
|
|
|
140
128
|
|
|
141
129
|
var $63247a3456bc40d1$exports = {};
|
|
142
|
-
$63247a3456bc40d1$exports = JSON.parse("{\"calendar\":\"Календарь\",\"
|
|
130
|
+
$63247a3456bc40d1$exports = JSON.parse("{\"calendar\":\"Календарь\",\"day\":\"день\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Дата окончания\",\"era\":\"эра\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месяц\",\"second\":\"секунда\",\"selectedDateDescription\":\"Выбранная дата: {date}\",\"selectedRangeDescription\":\"Выбранный диапазон: с {startDate} по {endDate}\",\"selectedTimeDescription\":\"Выбранное время: {time}\",\"startDate\":\"Дата начала\",\"timeZoneName\":\"часовой пояс\",\"weekday\":\"день недели\",\"year\":\"год\"}");
|
|
143
131
|
|
|
144
132
|
|
|
145
133
|
var $22150dd20c353dd4$exports = {};
|
|
146
|
-
$22150dd20c353dd4$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"
|
|
134
|
+
$22150dd20c353dd4$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"day\":\"deň\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Dátum ukončenia\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minúta\",\"month\":\"mesiac\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Vybratý dátum: {date}\",\"selectedRangeDescription\":\"Vybratý rozsah: od {startDate} do {endDate}\",\"selectedTimeDescription\":\"Vybratý čas: {time}\",\"startDate\":\"Dátum začatia\",\"timeZoneName\":\"časové pásmo\",\"weekday\":\"deň týždňa\",\"year\":\"rok\"}");
|
|
147
135
|
|
|
148
136
|
|
|
149
137
|
var $701eb9a0385c55fd$exports = {};
|
|
150
|
-
$701eb9a0385c55fd$exports = JSON.parse("{\"calendar\":\"Koledar\",\"
|
|
138
|
+
$701eb9a0385c55fd$exports = JSON.parse("{\"calendar\":\"Koledar\",\"day\":\"dan\",\"dayPeriod\":\"dop/pop\",\"endDate\":\"Datum konca\",\"era\":\"doba\",\"hour\":\"ura\",\"minute\":\"minuta\",\"month\":\"mesec\",\"second\":\"sekunda\",\"selectedDateDescription\":\"Izbrani datum: {date}\",\"selectedRangeDescription\":\"Izbrano območje: {startDate} do {endDate}\",\"selectedTimeDescription\":\"Izbrani čas: {time}\",\"startDate\":\"Datum začetka\",\"timeZoneName\":\"časovni pas\",\"weekday\":\"dan v tednu\",\"year\":\"leto\"}");
|
|
151
139
|
|
|
152
140
|
|
|
153
141
|
var $54684a4891ca6dc5$exports = {};
|
|
154
|
-
$54684a4891ca6dc5$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"
|
|
142
|
+
$54684a4891ca6dc5$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"day\":\"дан\",\"dayPeriod\":\"пре подне/по подне\",\"endDate\":\"Datum završetka\",\"era\":\"ера\",\"hour\":\"сат\",\"minute\":\"минут\",\"month\":\"месец\",\"second\":\"секунд\",\"selectedDateDescription\":\"Izabrani datum: {date}\",\"selectedRangeDescription\":\"Izabrani opseg: od {startDate} do {endDate}\",\"selectedTimeDescription\":\"Izabrano vreme: {time}\",\"startDate\":\"Datum početka\",\"timeZoneName\":\"временска зона\",\"weekday\":\"дан у недељи\",\"year\":\"година\"}");
|
|
155
143
|
|
|
156
144
|
|
|
157
145
|
var $545887f88a5a52db$exports = {};
|
|
158
|
-
$545887f88a5a52db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"
|
|
146
|
+
$545887f88a5a52db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"day\":\"dag\",\"dayPeriod\":\"fm/em\",\"endDate\":\"Slutdatum\",\"era\":\"era\",\"hour\":\"timme\",\"minute\":\"minut\",\"month\":\"månad\",\"second\":\"sekund\",\"selectedDateDescription\":\"Valt datum: {date}\",\"selectedRangeDescription\":\"Valt intervall: {startDate} till {endDate}\",\"selectedTimeDescription\":\"Vald tid: {time}\",\"startDate\":\"Startdatum\",\"timeZoneName\":\"tidszon\",\"weekday\":\"veckodag\",\"year\":\"år\"}");
|
|
159
147
|
|
|
160
148
|
|
|
161
149
|
var $492d49420dd96ff4$exports = {};
|
|
162
|
-
$492d49420dd96ff4$exports = JSON.parse("{\"calendar\":\"Takvim\",\"
|
|
150
|
+
$492d49420dd96ff4$exports = JSON.parse("{\"calendar\":\"Takvim\",\"day\":\"gün\",\"dayPeriod\":\"ÖÖ/ÖS\",\"endDate\":\"Bitiş Tarihi\",\"era\":\"çağ\",\"hour\":\"saat\",\"minute\":\"dakika\",\"month\":\"ay\",\"second\":\"saniye\",\"selectedDateDescription\":\"Seçilen Tarih: {date}\",\"selectedRangeDescription\":\"Seçilen Aralık: {startDate} - {endDate}\",\"selectedTimeDescription\":\"Seçilen Zaman: {time}\",\"startDate\":\"Başlangıç Tarihi\",\"timeZoneName\":\"saat dilimi\",\"weekday\":\"haftanın günü\",\"year\":\"yıl\"}");
|
|
163
151
|
|
|
164
152
|
|
|
165
153
|
var $dc85765e85e8f267$exports = {};
|
|
166
|
-
$dc85765e85e8f267$exports = JSON.parse("{\"calendar\":\"Календар\",\"
|
|
154
|
+
$dc85765e85e8f267$exports = JSON.parse("{\"calendar\":\"Календар\",\"day\":\"день\",\"dayPeriod\":\"дп/пп\",\"endDate\":\"Дата завершення\",\"era\":\"ера\",\"hour\":\"година\",\"minute\":\"хвилина\",\"month\":\"місяць\",\"second\":\"секунда\",\"selectedDateDescription\":\"Вибрана дата: {date}\",\"selectedRangeDescription\":\"Вибраний діапазон: {startDate} — {endDate}\",\"selectedTimeDescription\":\"Вибраний час: {time}\",\"startDate\":\"Дата початку\",\"timeZoneName\":\"часовий пояс\",\"weekday\":\"день тижня\",\"year\":\"рік\"}");
|
|
167
155
|
|
|
168
156
|
|
|
169
157
|
var $2157d63cb80c7c63$exports = {};
|
|
170
|
-
$2157d63cb80c7c63$exports = JSON.parse("{\"calendar\":\"日历\",\"
|
|
158
|
+
$2157d63cb80c7c63$exports = JSON.parse("{\"calendar\":\"日历\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"结束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"选定的日期:{date}\",\"selectedRangeDescription\":\"选定的范围:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"选定的时间:{time}\",\"startDate\":\"开始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
171
159
|
|
|
172
160
|
|
|
173
161
|
var $0335c3ddb5f70cbe$exports = {};
|
|
174
|
-
$0335c3ddb5f70cbe$exports = JSON.parse("{\"calendar\":\"日曆\",\"
|
|
162
|
+
$0335c3ddb5f70cbe$exports = JSON.parse("{\"calendar\":\"日曆\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"結束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"selectedDateDescription\":\"選定的日期:{date}\",\"selectedRangeDescription\":\"選定的範圍:{startDate} 至 {endDate}\",\"selectedTimeDescription\":\"選定的時間:{time}\",\"startDate\":\"開始日期\",\"timeZoneName\":\"时区\",\"weekday\":\"工作日\",\"year\":\"年\"}");
|
|
175
163
|
|
|
176
164
|
|
|
177
165
|
$c7d0e80b992ca68a$exports = {
|
|
@@ -219,7 +207,14 @@ $c7d0e80b992ca68a$exports = {
|
|
|
219
207
|
|
|
220
208
|
|
|
221
209
|
|
|
222
|
-
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1, disableArrowNavigation) {
|
|
213
|
+
let { direction: direction } = $IwcIq$reactariai18n.useLocale();
|
|
214
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref1)
|
|
215
|
+
, [
|
|
216
|
+
ref1
|
|
217
|
+
]);
|
|
223
218
|
// Open the popover on alt + arrow down
|
|
224
219
|
let onKeyDown = (e)=>{
|
|
225
220
|
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
@@ -227,6 +222,21 @@ function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
|
227
222
|
e.stopPropagation();
|
|
228
223
|
state.setOpen(true);
|
|
229
224
|
}
|
|
225
|
+
if (disableArrowNavigation) return;
|
|
226
|
+
switch(e.key){
|
|
227
|
+
case 'ArrowLeft':
|
|
228
|
+
e.preventDefault();
|
|
229
|
+
e.stopPropagation();
|
|
230
|
+
if (direction === 'rtl') focusManager.focusNext();
|
|
231
|
+
else focusManager.focusPrevious();
|
|
232
|
+
break;
|
|
233
|
+
case 'ArrowRight':
|
|
234
|
+
e.preventDefault();
|
|
235
|
+
e.stopPropagation();
|
|
236
|
+
if (direction === 'rtl') focusManager.focusPrevious();
|
|
237
|
+
else focusManager.focusNext();
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
230
240
|
};
|
|
231
241
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
232
242
|
let focusLast = ()=>{
|
|
@@ -249,9 +259,9 @@ function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
|
249
259
|
}while (last)
|
|
250
260
|
}
|
|
251
261
|
// Now go backwards until we find an element that is not a placeholder.
|
|
252
|
-
while(target === null || target === void 0 ? void 0 : target.
|
|
262
|
+
while(target === null || target === void 0 ? void 0 : target.hasAttribute('data-placeholder')){
|
|
253
263
|
let prev = walker.previousNode();
|
|
254
|
-
if (prev && prev.
|
|
264
|
+
if (prev && prev.hasAttribute('data-placeholder')) target = prev;
|
|
255
265
|
else break;
|
|
256
266
|
}
|
|
257
267
|
if (target) target.focus();
|
|
@@ -272,6 +282,7 @@ function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
|
272
282
|
|
|
273
283
|
|
|
274
284
|
|
|
285
|
+
|
|
275
286
|
const $4acc2f407c169e55$export$653eddfc964b0f8a = new WeakMap();
|
|
276
287
|
const $4acc2f407c169e55$export$300019f83c56d282 = '__role_' + Date.now();
|
|
277
288
|
const $4acc2f407c169e55$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
@@ -280,15 +291,20 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
280
291
|
...props,
|
|
281
292
|
labelElementType: 'span'
|
|
282
293
|
});
|
|
283
|
-
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
284
294
|
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
285
295
|
onBlurWithin () {
|
|
286
296
|
state.confirmPlaceholder();
|
|
287
297
|
}
|
|
288
298
|
});
|
|
289
|
-
let
|
|
290
|
-
|
|
291
|
-
|
|
299
|
+
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
300
|
+
let message = state.maxGranularity === 'hour' ? 'selectedTimeDescription' : 'selectedDateDescription';
|
|
301
|
+
let field = state.maxGranularity === 'hour' ? 'time' : 'date';
|
|
302
|
+
let description = state.value ? formatMessage(message, {
|
|
303
|
+
[field]: state.formatValue({
|
|
304
|
+
month: 'long'
|
|
305
|
+
})
|
|
306
|
+
}) : '';
|
|
307
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
292
308
|
// If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
|
|
293
309
|
// will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
|
|
294
310
|
let describedBy = props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
|
|
@@ -301,6 +317,7 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
301
317
|
propsFocusManager,
|
|
302
318
|
ref
|
|
303
319
|
]);
|
|
320
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref, props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation');
|
|
304
321
|
// Pass labels and other information to segments.
|
|
305
322
|
$4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
|
|
306
323
|
ariaLabel: props['aria-label'],
|
|
@@ -331,6 +348,7 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
331
348
|
}, [
|
|
332
349
|
focusManager
|
|
333
350
|
]);
|
|
351
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
334
352
|
return {
|
|
335
353
|
labelProps: {
|
|
336
354
|
...labelProps,
|
|
@@ -338,7 +356,7 @@ function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
|
338
356
|
focusManager.focusFirst();
|
|
339
357
|
}
|
|
340
358
|
},
|
|
341
|
-
fieldProps: $IwcIq$reactariautils.mergeProps(fieldDOMProps, groupProps, focusWithinProps),
|
|
359
|
+
fieldProps: $IwcIq$reactariautils.mergeProps(domProps, fieldDOMProps, groupProps, focusWithinProps),
|
|
342
360
|
descriptionProps: descriptionProps,
|
|
343
361
|
errorMessageProps: errorMessageProps
|
|
344
362
|
};
|
|
@@ -362,15 +380,24 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
362
380
|
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
363
381
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
364
382
|
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
365
|
-
let
|
|
383
|
+
let date = state.formatValue(locale, {
|
|
366
384
|
month: 'long'
|
|
367
|
-
})
|
|
385
|
+
});
|
|
386
|
+
let description = date ? formatMessage('selectedDateDescription', {
|
|
387
|
+
date: date
|
|
388
|
+
}) : '';
|
|
389
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
368
390
|
let ariaDescribedBy = [
|
|
369
391
|
descProps['aria-describedby'],
|
|
370
392
|
fieldProps['aria-describedby']
|
|
371
393
|
].filter(Boolean).join(' ') || undefined;
|
|
394
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
395
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref)
|
|
396
|
+
, [
|
|
397
|
+
ref
|
|
398
|
+
]);
|
|
372
399
|
return {
|
|
373
|
-
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps, {
|
|
400
|
+
groupProps: $IwcIq$reactariautils.mergeProps(domProps, groupProps, fieldProps, descProps, {
|
|
374
401
|
role: 'group',
|
|
375
402
|
'aria-disabled': props.isDisabled || null,
|
|
376
403
|
'aria-labelledby': labelledBy,
|
|
@@ -379,7 +406,6 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
379
406
|
labelProps: {
|
|
380
407
|
...labelProps,
|
|
381
408
|
onClick: ()=>{
|
|
382
|
-
let focusManager = $IwcIq$reactariafocus.createFocusManager(ref);
|
|
383
409
|
focusManager.focusFirst();
|
|
384
410
|
}
|
|
385
411
|
},
|
|
@@ -406,7 +432,6 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
406
432
|
buttonProps: {
|
|
407
433
|
...descProps,
|
|
408
434
|
id: buttonId,
|
|
409
|
-
excludeFromTabOrder: true,
|
|
410
435
|
'aria-haspopup': 'dialog',
|
|
411
436
|
'aria-label': formatMessage('calendar'),
|
|
412
437
|
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
@@ -426,7 +451,9 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
426
451
|
isDisabled: props.isDisabled,
|
|
427
452
|
isReadOnly: props.isReadOnly,
|
|
428
453
|
isDateUnavailable: props.isDateUnavailable,
|
|
429
|
-
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue
|
|
454
|
+
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue,
|
|
455
|
+
validationState: state.validationState,
|
|
456
|
+
errorMessage: props.errorMessage
|
|
430
457
|
}
|
|
431
458
|
};
|
|
432
459
|
}
|
|
@@ -437,9 +464,7 @@ function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
|
437
464
|
|
|
438
465
|
|
|
439
466
|
|
|
440
|
-
var $934ac650a0aceb4b$exports = {};
|
|
441
467
|
|
|
442
|
-
$parcel$export($934ac650a0aceb4b$exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
443
468
|
|
|
444
469
|
|
|
445
470
|
|
|
@@ -473,13 +498,12 @@ class $934ac650a0aceb4b$var$DisplayNamesPolyfill {
|
|
|
473
498
|
|
|
474
499
|
|
|
475
500
|
|
|
476
|
-
|
|
477
501
|
function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
478
502
|
let enteredKeys = $IwcIq$react.useRef('');
|
|
479
|
-
let { locale: locale
|
|
503
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
480
504
|
let displayNames = $934ac650a0aceb4b$export$d42c60378c8168f8();
|
|
481
505
|
let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $4acc2f407c169e55$export$653eddfc964b0f8a.get(state);
|
|
482
|
-
let textValue = segment.text;
|
|
506
|
+
let textValue = segment.isPlaceholder ? '' : segment.text;
|
|
483
507
|
let options = $IwcIq$react.useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
484
508
|
, [
|
|
485
509
|
state.dateFormatter
|
|
@@ -493,11 +517,14 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
493
517
|
hour12: options.hour12,
|
|
494
518
|
timeZone: options.timeZone
|
|
495
519
|
});
|
|
496
|
-
if (segment.type === 'month') {
|
|
520
|
+
if (segment.type === 'month' && !segment.isPlaceholder) {
|
|
497
521
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
498
522
|
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
499
|
-
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
523
|
+
} else if (segment.type === 'hour' && !segment.isPlaceholder) textValue = hourDateFormatter.format(state.dateValue);
|
|
500
524
|
let { spinButtonProps: spinButtonProps } = $IwcIq$reactariaspinbutton.useSpinButton({
|
|
525
|
+
// The ARIA spec says aria-valuenow is optional if there's no value, but aXe seems to require it.
|
|
526
|
+
// This doesn't seem to have any negative effects with real AT since we also use aria-valuetext.
|
|
527
|
+
// https://github.com/dequelabs/axe-core/issues/3505
|
|
501
528
|
value: segment.value,
|
|
502
529
|
textValue: textValue,
|
|
503
530
|
minValue: segment.minValue,
|
|
@@ -551,36 +578,6 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
551
578
|
if (e.key === 'a' && ($IwcIq$reactariautils.isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
|
|
552
579
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
|
|
553
580
|
switch(e.key){
|
|
554
|
-
case 'ArrowLeft':
|
|
555
|
-
e.preventDefault();
|
|
556
|
-
e.stopPropagation();
|
|
557
|
-
if (direction === 'rtl') focusManager.focusNext({
|
|
558
|
-
tabbable: true
|
|
559
|
-
});
|
|
560
|
-
else focusManager.focusPrevious({
|
|
561
|
-
tabbable: true
|
|
562
|
-
});
|
|
563
|
-
break;
|
|
564
|
-
case 'ArrowRight':
|
|
565
|
-
e.preventDefault();
|
|
566
|
-
e.stopPropagation();
|
|
567
|
-
if (direction === 'rtl') focusManager.focusPrevious({
|
|
568
|
-
tabbable: true
|
|
569
|
-
});
|
|
570
|
-
else focusManager.focusNext({
|
|
571
|
-
tabbable: true
|
|
572
|
-
});
|
|
573
|
-
break;
|
|
574
|
-
case 'Enter':
|
|
575
|
-
e.preventDefault();
|
|
576
|
-
e.stopPropagation();
|
|
577
|
-
if (segment.isPlaceholder && !state.isReadOnly) state.confirmPlaceholder(segment.type);
|
|
578
|
-
focusManager.focusNext({
|
|
579
|
-
tabbable: true
|
|
580
|
-
});
|
|
581
|
-
break;
|
|
582
|
-
case 'Tab':
|
|
583
|
-
break;
|
|
584
581
|
case 'Backspace':
|
|
585
582
|
case 'Delete':
|
|
586
583
|
// Safari on iOS does not fire beforeinput for the backspace key because the cursor is at the start.
|
|
@@ -614,6 +611,42 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
614
611
|
}, [
|
|
615
612
|
amPmFormatter
|
|
616
613
|
]);
|
|
614
|
+
// Get a list of formatted era names so users can type the first character to choose one.
|
|
615
|
+
let eraFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
616
|
+
year: 'numeric',
|
|
617
|
+
era: 'narrow',
|
|
618
|
+
timeZone: 'UTC'
|
|
619
|
+
});
|
|
620
|
+
let eras1 = $IwcIq$react.useMemo(()=>{
|
|
621
|
+
if (segment.type !== 'era') return [];
|
|
622
|
+
let date = $IwcIq$internationalizeddate.toCalendar(new $IwcIq$internationalizeddate.CalendarDate(1, 1, 1), state.calendar);
|
|
623
|
+
let eras = state.calendar.getEras().map((era)=>{
|
|
624
|
+
let eraDate = date.set({
|
|
625
|
+
year: 1,
|
|
626
|
+
month: 1,
|
|
627
|
+
day: 1,
|
|
628
|
+
era: era
|
|
629
|
+
}).toDate('UTC');
|
|
630
|
+
let parts = eraFormatter.formatToParts(eraDate);
|
|
631
|
+
let formatted = parts.find((p)=>p.type === 'era'
|
|
632
|
+
).value;
|
|
633
|
+
return {
|
|
634
|
+
era: era,
|
|
635
|
+
formatted: formatted
|
|
636
|
+
};
|
|
637
|
+
});
|
|
638
|
+
// Remove the common prefix from formatted values. This is so that in calendars with eras like
|
|
639
|
+
// ERA0 and ERA1 (e.g. Ethiopic), users can press "0" and "1" to select an era. In other cases,
|
|
640
|
+
// the first letter is used.
|
|
641
|
+
let prefixLength = $5c015c6316d1904d$var$commonPrefixLength(eras.map((era)=>era.formatted
|
|
642
|
+
));
|
|
643
|
+
if (prefixLength) for (let era1 of eras)era1.formatted = era1.formatted.slice(prefixLength);
|
|
644
|
+
return eras;
|
|
645
|
+
}, [
|
|
646
|
+
eraFormatter,
|
|
647
|
+
state.calendar,
|
|
648
|
+
segment.type
|
|
649
|
+
]);
|
|
617
650
|
let onInput = (key)=>{
|
|
618
651
|
if (state.isDisabled || state.isReadOnly) return;
|
|
619
652
|
let newValue = enteredKeys.current + key;
|
|
@@ -622,10 +655,18 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
622
655
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
623
656
|
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 12);
|
|
624
657
|
else break;
|
|
625
|
-
focusManager.focusNext(
|
|
626
|
-
tabbable: true
|
|
627
|
-
});
|
|
658
|
+
focusManager.focusNext();
|
|
628
659
|
break;
|
|
660
|
+
case 'era':
|
|
661
|
+
{
|
|
662
|
+
let matched = eras1.find((e)=>startsWith(e.formatted, key)
|
|
663
|
+
);
|
|
664
|
+
if (matched) {
|
|
665
|
+
state.setSegment('era', matched.era);
|
|
666
|
+
focusManager.focusNext();
|
|
667
|
+
}
|
|
668
|
+
break;
|
|
669
|
+
}
|
|
629
670
|
case 'day':
|
|
630
671
|
case 'hour':
|
|
631
672
|
case 'minute':
|
|
@@ -654,9 +695,7 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
654
695
|
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
655
696
|
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
656
697
|
enteredKeys.current = '';
|
|
657
|
-
if (shouldSetValue) focusManager.focusNext(
|
|
658
|
-
tabbable: true
|
|
659
|
-
});
|
|
698
|
+
if (shouldSetValue) focusManager.focusNext();
|
|
660
699
|
} else enteredKeys.current = newValue;
|
|
661
700
|
break;
|
|
662
701
|
}
|
|
@@ -665,12 +704,9 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
665
704
|
let onFocus = ()=>{
|
|
666
705
|
enteredKeys.current = '';
|
|
667
706
|
$IwcIq$reactariautils.scrollIntoView($IwcIq$reactariautils.getScrollParent(ref.current), ref.current);
|
|
668
|
-
//
|
|
669
|
-
// Since usePress disables text selection, this won't happen by default.
|
|
670
|
-
ref.current.style.webkitUserSelect = 'text';
|
|
707
|
+
// Collapse selection to start or Chrome won't fire input events.
|
|
671
708
|
let selection = window.getSelection();
|
|
672
709
|
selection.collapse(ref.current);
|
|
673
|
-
ref.current.style.webkitUserSelect = '';
|
|
674
710
|
};
|
|
675
711
|
let compositionRef = $IwcIq$react.useRef('');
|
|
676
712
|
// @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
@@ -706,21 +742,19 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
706
742
|
break;
|
|
707
743
|
}
|
|
708
744
|
});
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
e.preventDefault();
|
|
723
|
-
});
|
|
745
|
+
$IwcIq$reactariautils.useLayoutEffect(()=>{
|
|
746
|
+
let element = ref.current;
|
|
747
|
+
return ()=>{
|
|
748
|
+
// If the focused segment is removed, focus the previous one, or the next one if there was no previous one.
|
|
749
|
+
if (document.activeElement === element) {
|
|
750
|
+
let prev = focusManager.focusPrevious();
|
|
751
|
+
if (!prev) focusManager.focusNext();
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
}, [
|
|
755
|
+
ref,
|
|
756
|
+
focusManager
|
|
757
|
+
]);
|
|
724
758
|
// spinbuttons cannot be focused with VoiceOver on iOS.
|
|
725
759
|
let touchPropOverrides = $IwcIq$reactariautils.isIOS() || segment.type === 'timeZoneName' ? {
|
|
726
760
|
role: 'textbox',
|
|
@@ -755,13 +789,13 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
755
789
|
}
|
|
756
790
|
};
|
|
757
791
|
return {
|
|
758
|
-
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps,
|
|
792
|
+
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps, labelProps, {
|
|
759
793
|
id: id,
|
|
760
794
|
...touchPropOverrides,
|
|
761
795
|
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
762
796
|
'aria-describedby': ariaDescribedBy,
|
|
763
|
-
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
764
797
|
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
798
|
+
'data-placeholder': segment.isPlaceholder || undefined,
|
|
765
799
|
contentEditable: isEditable,
|
|
766
800
|
suppressContentEditableWarning: isEditable,
|
|
767
801
|
spellCheck: isEditable ? 'false' : undefined,
|
|
@@ -769,17 +803,33 @@ function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
|
769
803
|
autoCorrect: isEditable ? 'off' : undefined,
|
|
770
804
|
// Capitalization was changed in React 17...
|
|
771
805
|
[parseInt(($parcel$interopDefault($IwcIq$react)).version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,
|
|
772
|
-
inputMode: state.isDisabled || segment.type === 'dayPeriod' || !isEditable ? undefined : 'numeric',
|
|
806
|
+
inputMode: state.isDisabled || segment.type === 'dayPeriod' || segment.type === 'era' || !isEditable ? undefined : 'numeric',
|
|
773
807
|
tabIndex: state.isDisabled ? undefined : 0,
|
|
774
808
|
onKeyDown: onKeyDown,
|
|
775
809
|
onFocus: onFocus,
|
|
776
810
|
style: {
|
|
777
811
|
caretColor: 'transparent'
|
|
812
|
+
},
|
|
813
|
+
// Prevent pointer events from reaching useDatePickerGroup, and allow native browser behavior to focus the segment.
|
|
814
|
+
onPointerDown (e) {
|
|
815
|
+
e.stopPropagation();
|
|
816
|
+
},
|
|
817
|
+
onMouseDown (e) {
|
|
818
|
+
e.stopPropagation();
|
|
778
819
|
}
|
|
779
820
|
})
|
|
780
821
|
};
|
|
781
822
|
}
|
|
782
|
-
|
|
823
|
+
function $5c015c6316d1904d$var$commonPrefixLength(strings) {
|
|
824
|
+
// Sort the strings, and compare the characters in the first and last to find the common prefix.
|
|
825
|
+
strings.sort();
|
|
826
|
+
let first = strings[0];
|
|
827
|
+
let last = strings[strings.length - 1];
|
|
828
|
+
for(let i = 0; i < first.length; i++){
|
|
829
|
+
if (first[i] !== last[i]) return i;
|
|
830
|
+
}
|
|
831
|
+
return 0;
|
|
832
|
+
}
|
|
783
833
|
|
|
784
834
|
|
|
785
835
|
|
|
@@ -800,9 +850,13 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
800
850
|
});
|
|
801
851
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
802
852
|
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
803
|
-
let
|
|
853
|
+
let range = state.formatValue(locale, {
|
|
804
854
|
month: 'long'
|
|
805
855
|
});
|
|
856
|
+
let description = range ? formatMessage('selectedRangeDescription', {
|
|
857
|
+
startDate: range.start,
|
|
858
|
+
endDate: range.end
|
|
859
|
+
}) : '';
|
|
806
860
|
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
807
861
|
let startFieldProps = {
|
|
808
862
|
'aria-label': formatMessage('startDate'),
|
|
@@ -815,18 +869,17 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
815
869
|
let buttonId = $IwcIq$reactariautils.useId();
|
|
816
870
|
let dialogId = $IwcIq$reactariautils.useId();
|
|
817
871
|
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
818
|
-
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
819
|
-
onBlurWithin () {
|
|
820
|
-
state.confirmPlaceholder();
|
|
821
|
-
}
|
|
822
|
-
});
|
|
823
872
|
let ariaDescribedBy = [
|
|
824
873
|
descProps['aria-describedby'],
|
|
825
874
|
fieldProps['aria-describedby']
|
|
826
875
|
].filter(Boolean).join(' ') || undefined;
|
|
827
|
-
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref
|
|
876
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref, {
|
|
877
|
+
// Exclude the button from the focus manager.
|
|
878
|
+
accept: (element)=>element.id !== buttonId
|
|
879
|
+
})
|
|
828
880
|
, [
|
|
829
|
-
ref
|
|
881
|
+
ref,
|
|
882
|
+
buttonId
|
|
830
883
|
]);
|
|
831
884
|
let commonFieldProps = {
|
|
832
885
|
[$4acc2f407c169e55$export$7b3062cd49e80452]: focusManager,
|
|
@@ -843,8 +896,9 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
843
896
|
isRequired: props.isRequired,
|
|
844
897
|
validationState: state.validationState
|
|
845
898
|
};
|
|
899
|
+
let domProps = $IwcIq$reactariautils.filterDOMProps(props);
|
|
846
900
|
return {
|
|
847
|
-
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps,
|
|
901
|
+
groupProps: $IwcIq$reactariautils.mergeProps(domProps, groupProps, fieldProps, descProps, {
|
|
848
902
|
role: 'group',
|
|
849
903
|
'aria-disabled': props.isDisabled || null,
|
|
850
904
|
'aria-describedby': ariaDescribedBy
|
|
@@ -858,7 +912,6 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
858
912
|
buttonProps: {
|
|
859
913
|
...descProps,
|
|
860
914
|
id: buttonId,
|
|
861
|
-
excludeFromTabOrder: true,
|
|
862
915
|
'aria-haspopup': 'dialog',
|
|
863
916
|
'aria-label': formatMessage('calendar'),
|
|
864
917
|
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
@@ -895,14 +948,15 @@ function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
895
948
|
isReadOnly: props.isReadOnly,
|
|
896
949
|
isDateUnavailable: props.isDateUnavailable,
|
|
897
950
|
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
898
|
-
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue
|
|
951
|
+
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue,
|
|
952
|
+
validationState: state.validationState,
|
|
953
|
+
errorMessage: props.errorMessage
|
|
899
954
|
}
|
|
900
955
|
};
|
|
901
956
|
}
|
|
902
957
|
|
|
903
958
|
|
|
904
959
|
|
|
905
|
-
$parcel$exportWildcard(module.exports, $934ac650a0aceb4b$exports);
|
|
906
960
|
|
|
907
961
|
|
|
908
962
|
//# sourceMappingURL=main.js.map
|