@react-aria/datepicker 3.0.0-alpha.4 → 3.0.0-alpha.5
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 +417 -281
- package/dist/main.js.map +1 -1
- package/dist/module.js +409 -275
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +67 -28
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -9
- package/src/index.ts +4 -4
- package/src/useDateField.ts +77 -21
- package/src/useDatePicker.ts +52 -10
- package/src/useDatePickerGroup.ts +34 -11
- package/src/useDateRangePicker.ts +66 -18
- package/src/useDateSegment.ts +55 -36
package/dist/main.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
5
|
-
var $
|
|
6
|
-
var $
|
|
7
|
-
var $
|
|
8
|
-
var $
|
|
9
|
-
var $
|
|
1
|
+
var $IwcIq$reactariafocus = require("@react-aria/focus");
|
|
2
|
+
var $IwcIq$reactariautils = require("@react-aria/utils");
|
|
3
|
+
var $IwcIq$reactarialabel = require("@react-aria/label");
|
|
4
|
+
var $IwcIq$reactariai18n = require("@react-aria/i18n");
|
|
5
|
+
var $IwcIq$react = require("react");
|
|
6
|
+
var $IwcIq$reactariainteractions = require("@react-aria/interactions");
|
|
7
|
+
var $IwcIq$internationalizednumber = require("@internationalized/number");
|
|
8
|
+
var $IwcIq$reactariaspinbutton = require("@react-aria/spinbutton");
|
|
9
|
+
var $IwcIq$internationalizedmessage = require("@internationalized/message");
|
|
10
10
|
|
|
11
|
+
function $parcel$export(e, n, v, s) {
|
|
12
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
+
}
|
|
11
14
|
function $parcel$exportWildcard(dest, source) {
|
|
12
15
|
Object.keys(source).forEach(function(key) {
|
|
13
16
|
if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
|
|
@@ -27,195 +30,199 @@ function $parcel$exportWildcard(dest, source) {
|
|
|
27
30
|
function $parcel$interopDefault(a) {
|
|
28
31
|
return a && a.__esModule ? a.default : a;
|
|
29
32
|
}
|
|
30
|
-
function $parcel$export(e, n, v, s) {
|
|
31
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
32
|
-
}
|
|
33
|
-
var $92d23c5df58a099f$exports = {};
|
|
34
33
|
|
|
35
|
-
$parcel$export(
|
|
34
|
+
$parcel$export(module.exports, "useDatePicker", () => $e90ae7c26a69c6b1$export$42df105a73306d51);
|
|
35
|
+
$parcel$export(module.exports, "useDateSegment", () => $5c015c6316d1904d$export$1315d136e6f7581);
|
|
36
|
+
$parcel$export(module.exports, "useDateField", () => $4acc2f407c169e55$export$5591b0b878c1a989);
|
|
37
|
+
$parcel$export(module.exports, "useTimeField", () => $4acc2f407c169e55$export$4c842f6a241dc825);
|
|
38
|
+
$parcel$export(module.exports, "useDateRangePicker", () => $20f695b1b69e6b9e$export$12fd5f0e9f4bb192);
|
|
36
39
|
|
|
37
|
-
var $
|
|
38
|
-
var $
|
|
39
|
-
$
|
|
40
|
+
var $c7d0e80b992ca68a$exports = {};
|
|
41
|
+
var $aa344be62785b256$exports = {};
|
|
42
|
+
$aa344be62785b256$exports = JSON.parse("{\"calendar\":\"التقويم\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} إلى {end, date, long}\",\"date\":\"التاريخ\",\"dateRange\":\"نطاق التاريخ\",\"day\":\"يوم\",\"dayPeriod\":\"ص/م\",\"endDate\":\"تاريخ الانتهاء\",\"era\":\"العصر\",\"hour\":\"الساعات\",\"minute\":\"الدقائق\",\"month\":\"الشهر\",\"second\":\"الثواني\",\"startDate\":\"تاريخ البدء\",\"year\":\"السنة\",\"weekday\":\"اليوم\",\"timeZoneName\":\"التوقيت\"}");
|
|
40
43
|
|
|
41
44
|
|
|
42
|
-
var $
|
|
43
|
-
$
|
|
45
|
+
var $615986c3475e7c8c$exports = {};
|
|
46
|
+
$615986c3475e7c8c$exports = JSON.parse("{\"calendar\":\"Календар\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} до {end, date, long}\",\"date\":\"Дата\",\"dateRange\":\"Времеви интервал\",\"day\":\"ден\",\"dayPeriod\":\"пр.об./сл.об.\",\"endDate\":\"Крайна дата\",\"era\":\"ера\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месец\",\"second\":\"секунда\",\"startDate\":\"Начална дата\",\"year\":\"година\",\"weekday\":\"ден от седмицата\",\"timeZoneName\":\"часова зона\"}");
|
|
44
47
|
|
|
45
48
|
|
|
46
|
-
var $
|
|
47
|
-
$
|
|
49
|
+
var $6c6207692f1ab248$exports = {};
|
|
50
|
+
$6c6207692f1ab248$exports = JSON.parse("{\"calendar\":\"Kalendář\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} až {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Rozsah dat\",\"day\":\"den\",\"dayPeriod\":\"část dne\",\"endDate\":\"Konečné datum\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minuta\",\"month\":\"měsíc\",\"second\":\"sekunda\",\"startDate\":\"Počáteční datum\",\"year\":\"rok\",\"weekday\":\"den v týdnu\",\"timeZoneName\":\"časové pásmo\"}");
|
|
48
51
|
|
|
49
52
|
|
|
50
|
-
var $
|
|
51
|
-
$
|
|
53
|
+
var $fb37a9d024dd70f8$exports = {};
|
|
54
|
+
$fb37a9d024dd70f8$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} til {end, date, long}\",\"date\":\"Dato\",\"dateRange\":\"Datointerval\",\"day\":\"dag\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Slutdato\",\"era\":\"æra\",\"hour\":\"time\",\"minute\":\"minut\",\"month\":\"måned\",\"second\":\"sekund\",\"startDate\":\"Startdato\",\"year\":\"år\",\"weekday\":\"ugedag\",\"timeZoneName\":\"tidszone\"}");
|
|
52
55
|
|
|
53
56
|
|
|
54
|
-
var $
|
|
55
|
-
$
|
|
57
|
+
var $d7780bd4790f7ae9$exports = {};
|
|
58
|
+
$d7780bd4790f7ae9$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} bis {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Datumsbereich\",\"day\":\"Tag\",\"dayPeriod\":\"Tageshälfte\",\"endDate\":\"Enddatum\",\"era\":\"Epoche\",\"hour\":\"Stunde\",\"minute\":\"Minute\",\"month\":\"Monat\",\"second\":\"Sekunde\",\"startDate\":\"Anfangsdatum\",\"year\":\"Jahr\",\"weekday\":\"Wochentag\",\"timeZoneName\":\"Zeitzone\"}");
|
|
56
59
|
|
|
57
60
|
|
|
58
|
-
var $
|
|
59
|
-
$
|
|
61
|
+
var $9cdf03311f06c4ac$exports = {};
|
|
62
|
+
$9cdf03311f06c4ac$exports = JSON.parse("{\"calendar\":\"Ημερολόγιο\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} ως {end, date, long}\",\"date\":\"Ημερομηνία\",\"dateRange\":\"Εύρος ημερομηνιών\",\"day\":\"ημέρα\",\"dayPeriod\":\"π.μ./μ.μ.\",\"endDate\":\"Ημερομηνία λήξης\",\"era\":\"περίοδος\",\"hour\":\"ώρα\",\"minute\":\"λεπτό\",\"month\":\"μήνας\",\"second\":\"δευτερόλεπτο\",\"startDate\":\"Ημερομηνία έναρξης\",\"year\":\"έτος\",\"weekday\":\"καθημερινή\",\"timeZoneName\":\"ζώνη ώρας\"}");
|
|
60
63
|
|
|
61
64
|
|
|
62
|
-
var $
|
|
63
|
-
$
|
|
65
|
+
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\",\"date\":\"Date\",\"dateRange\":\"Date Range\",\"startDate\":\"Start Date\",\"endDate\":\"End Date\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} to {end, date, long}\",\"weekday\":\"day of the week\",\"timeZoneName\":\"time zone\"}");
|
|
64
67
|
|
|
65
68
|
|
|
66
|
-
var $
|
|
67
|
-
$
|
|
69
|
+
var $7426c3264bf5ffea$exports = {};
|
|
70
|
+
$7426c3264bf5ffea$exports = JSON.parse("{\"calendar\":\"Calendario\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} a {end, date, long}\",\"date\":\"Fecha\",\"dateRange\":\"Intervalo de fecha\",\"day\":\"día\",\"dayPeriod\":\"a. m./p. m.\",\"endDate\":\"Fecha final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mes\",\"second\":\"segundo\",\"startDate\":\"Fecha de inicio\",\"year\":\"año\",\"weekday\":\"día de la semana\",\"timeZoneName\":\"zona horaria\"}");
|
|
68
71
|
|
|
69
72
|
|
|
70
|
-
var $
|
|
71
|
-
$
|
|
73
|
+
var $1115cc0042de790c$exports = {};
|
|
74
|
+
$1115cc0042de790c$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} kuni {end, date, long}\",\"date\":\"Kuupäev\",\"dateRange\":\"Kuupäevavahemik\",\"day\":\"päev\",\"dayPeriod\":\"enne/pärast lõunat\",\"endDate\":\"Lõppkuupäev\",\"era\":\"ajastu\",\"hour\":\"tund\",\"minute\":\"minut\",\"month\":\"kuu\",\"second\":\"sekund\",\"startDate\":\"Alguskuupäev\",\"year\":\"aasta\",\"weekday\":\"nädalapäev\",\"timeZoneName\":\"ajavöönd\"}");
|
|
72
75
|
|
|
73
76
|
|
|
74
|
-
var $
|
|
75
|
-
$
|
|
77
|
+
var $4e80389dccb9283f$exports = {};
|
|
78
|
+
$4e80389dccb9283f$exports = JSON.parse("{\"calendar\":\"Kalenteri\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long}–{end, date, long}\",\"date\":\"Päivämäärä\",\"dateRange\":\"Päivämääräalue\",\"day\":\"päivä\",\"dayPeriod\":\"vuorokaudenaika\",\"endDate\":\"Päättymispäivä\",\"era\":\"aikakausi\",\"hour\":\"tunti\",\"minute\":\"minuutti\",\"month\":\"kuukausi\",\"second\":\"sekunti\",\"startDate\":\"Alkamispäivä\",\"year\":\"vuosi\",\"weekday\":\"viikonpäivä\",\"timeZoneName\":\"aikavyöhyke\"}");
|
|
76
79
|
|
|
77
80
|
|
|
78
|
-
var $
|
|
79
|
-
$
|
|
81
|
+
var $78ad6f738c1f38d1$exports = {};
|
|
82
|
+
$78ad6f738c1f38d1$exports = JSON.parse("{\"calendar\":\"Calendrier\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} au {end, date, long}\",\"date\":\"Date\",\"dateRange\":\"Plage de dates\",\"day\":\"jour\",\"dayPeriod\":\"cadran\",\"endDate\":\"Date de fin\",\"era\":\"ère\",\"hour\":\"heure\",\"minute\":\"minute\",\"month\":\"mois\",\"second\":\"seconde\",\"startDate\":\"Date de début\",\"year\":\"année\",\"weekday\":\"jour de la semaine\",\"timeZoneName\":\"fuseau horaire\"}");
|
|
80
83
|
|
|
81
84
|
|
|
82
|
-
var $
|
|
83
|
-
$
|
|
85
|
+
var $50fa4716d827cd97$exports = {};
|
|
86
|
+
$50fa4716d827cd97$exports = JSON.parse("{\"calendar\":\"לוח שנה\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"מ-{start, date, long} ועד {end, date, long}\",\"date\":\"תאריך\",\"dateRange\":\"טווח תאריכים\",\"day\":\"יום\",\"dayPeriod\":\"לפנה״צ/אחה״צ\",\"endDate\":\"תאריך סיום\",\"era\":\"תקופה\",\"hour\":\"שעה\",\"minute\":\"דקה\",\"month\":\"חודש\",\"second\":\"שנייה\",\"startDate\":\"תאריך התחלה\",\"year\":\"שנה\",\"weekday\":\"יום בשבוע\",\"timeZoneName\":\"אזור זמן\"}");
|
|
84
87
|
|
|
85
88
|
|
|
86
|
-
var $
|
|
87
|
-
$
|
|
89
|
+
var $7297908fac4cf6c2$exports = {};
|
|
90
|
+
$7297908fac4cf6c2$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} do {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Raspon datuma\",\"day\":\"dan\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Datum završetka\",\"era\":\"era\",\"hour\":\"sat\",\"minute\":\"minuta\",\"month\":\"mjesec\",\"second\":\"sekunda\",\"startDate\":\"Datum početka\",\"year\":\"godina\",\"weekday\":\"dan u tjednu\",\"timeZoneName\":\"vremenska zona\"}");
|
|
88
91
|
|
|
89
92
|
|
|
90
|
-
var $
|
|
91
|
-
$
|
|
93
|
+
var $f95c1b06e1d5ba32$exports = {};
|
|
94
|
+
$f95c1b06e1d5ba32$exports = JSON.parse("{\"calendar\":\"Naptár\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} – {end, date, long}\",\"date\":\"Dátum\",\"dateRange\":\"Dátumtartomány\",\"day\":\"nap\",\"dayPeriod\":\"napszak\",\"endDate\":\"Befejező dátum\",\"era\":\"éra\",\"hour\":\"óra\",\"minute\":\"perc\",\"month\":\"hónap\",\"second\":\"másodperc\",\"startDate\":\"Kezdő dátum\",\"year\":\"év\",\"weekday\":\"hét napja\",\"timeZoneName\":\"időzóna\"}");
|
|
92
95
|
|
|
93
96
|
|
|
94
|
-
var $
|
|
95
|
-
$
|
|
97
|
+
var $437a8dc519258a01$exports = {};
|
|
98
|
+
$437a8dc519258a01$exports = JSON.parse("{\"calendar\":\"Calendario\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"Da {start, date, long} a {end, date, long}\",\"date\":\"Data\",\"dateRange\":\"Intervallo date\",\"day\":\"giorno\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data finale\",\"era\":\"era\",\"hour\":\"ora\",\"minute\":\"minuto\",\"month\":\"mese\",\"second\":\"secondo\",\"startDate\":\"Data iniziale\",\"year\":\"anno\",\"weekday\":\"giorno della settimana\",\"timeZoneName\":\"fuso orario\"}");
|
|
96
99
|
|
|
97
100
|
|
|
98
|
-
var $
|
|
99
|
-
$
|
|
101
|
+
var $bd0aa2b50092a836$exports = {};
|
|
102
|
+
$bd0aa2b50092a836$exports = JSON.parse("{\"calendar\":\"カレンダー\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} ~ {end, date, long}\",\"date\":\"日付\",\"dateRange\":\"日付範囲\",\"day\":\"日\",\"dayPeriod\":\"午前/午後\",\"endDate\":\"終了日\",\"era\":\"時代\",\"hour\":\"時\",\"minute\":\"分\",\"month\":\"月\",\"second\":\"秒\",\"startDate\":\"開始日\",\"year\":\"年\",\"weekday\":\"曜日\",\"timeZoneName\":\"タイムゾーン\"}");
|
|
100
103
|
|
|
101
104
|
|
|
102
|
-
var $
|
|
103
|
-
$
|
|
105
|
+
var $bbd8176c2e044bc1$exports = {};
|
|
106
|
+
$bbd8176c2e044bc1$exports = JSON.parse("{\"calendar\":\"달력\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} ~ {end, date, long}\",\"date\":\"날짜\",\"dateRange\":\"날짜 범위\",\"day\":\"일\",\"dayPeriod\":\"오전/오후\",\"endDate\":\"종료 날짜\",\"era\":\"연호\",\"hour\":\"시\",\"minute\":\"분\",\"month\":\"월\",\"second\":\"초\",\"startDate\":\"시작 날짜\",\"year\":\"년\",\"weekday\":\"요일\",\"timeZoneName\":\"시간대\"}");
|
|
104
107
|
|
|
105
108
|
|
|
106
|
-
var $
|
|
107
|
-
$
|
|
109
|
+
var $1af703df56ff5180$exports = {};
|
|
110
|
+
$1af703df56ff5180$exports = JSON.parse("{\"calendar\":\"Kalendorius\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"Nuo {start, date, long} iki {end, date, long}\",\"date\":\"Data\",\"dateRange\":\"Datų intervalas\",\"day\":\"diena\",\"dayPeriod\":\"iki pietų / po pietų\",\"endDate\":\"Pabaigos data\",\"era\":\"era\",\"hour\":\"valanda\",\"minute\":\"minutė\",\"month\":\"mėnuo\",\"second\":\"sekundė\",\"startDate\":\"Pradžios data\",\"year\":\"metai\",\"weekday\":\"savaitės diena\",\"timeZoneName\":\"laiko juosta\"}");
|
|
108
111
|
|
|
109
112
|
|
|
110
|
-
var $
|
|
111
|
-
$
|
|
113
|
+
var $9705eb4511dea9f8$exports = {};
|
|
114
|
+
$9705eb4511dea9f8$exports = JSON.parse("{\"calendar\":\"Kalendārs\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} līdz {end, date, long}\",\"date\":\"Datums\",\"dateRange\":\"Datumu diapazons\",\"day\":\"diena\",\"dayPeriod\":\"priekšpusdienā/pēcpusdienā\",\"endDate\":\"Beigu datums\",\"era\":\"ēra\",\"hour\":\"stundas\",\"minute\":\"minūtes\",\"month\":\"mēnesis\",\"second\":\"sekundes\",\"startDate\":\"Sākuma datums\",\"year\":\"gads\",\"weekday\":\"nedēļas diena\",\"timeZoneName\":\"laika josla\"}");
|
|
112
115
|
|
|
113
116
|
|
|
114
|
-
var $
|
|
115
|
-
$
|
|
117
|
+
var $8ef984876a7160bc$exports = {};
|
|
118
|
+
$8ef984876a7160bc$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} til {end, date, long}\",\"date\":\"Dato\",\"dateRange\":\"Datoområde\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Sluttdato\",\"era\":\"tidsalder\",\"hour\":\"time\",\"minute\":\"minutt\",\"month\":\"måned\",\"second\":\"sekund\",\"startDate\":\"Startdato\",\"year\":\"år\",\"weekday\":\"ukedag\",\"timeZoneName\":\"tidssone\"}");
|
|
116
119
|
|
|
117
120
|
|
|
118
|
-
var $
|
|
119
|
-
$
|
|
121
|
+
var $b6e9809e1ecaa25e$exports = {};
|
|
122
|
+
$b6e9809e1ecaa25e$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} t/m {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Datumbereik\",\"day\":\"dag\",\"dayPeriod\":\"a.m./p.m.\",\"endDate\":\"Einddatum\",\"era\":\"tijdperk\",\"hour\":\"uur\",\"minute\":\"minuut\",\"month\":\"maand\",\"second\":\"seconde\",\"startDate\":\"Startdatum\",\"year\":\"jaar\",\"weekday\":\"dag van de week\",\"timeZoneName\":\"tijdzone\"}");
|
|
120
123
|
|
|
121
124
|
|
|
122
|
-
var $
|
|
123
|
-
$
|
|
125
|
+
var $deb2fa609661fe31$exports = {};
|
|
126
|
+
$deb2fa609661fe31$exports = JSON.parse("{\"calendar\":\"Kalendarz\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} do {end, date, long}\",\"date\":\"Data\",\"dateRange\":\"Zakres dat\",\"day\":\"dzień\",\"dayPeriod\":\"rano / po południu / wieczorem\",\"endDate\":\"Data końcowa\",\"era\":\"era\",\"hour\":\"godzina\",\"minute\":\"minuta\",\"month\":\"miesiąc\",\"second\":\"sekunda\",\"startDate\":\"Data początkowa\",\"year\":\"rok\",\"weekday\":\"dzień tygodnia\",\"timeZoneName\":\"strefa czasowa\"}");
|
|
124
127
|
|
|
125
128
|
|
|
126
|
-
var $
|
|
127
|
-
$
|
|
129
|
+
var $591c8c054c84fa56$exports = {};
|
|
130
|
+
$591c8c054c84fa56$exports = JSON.parse("{\"calendar\":\"Calendário\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} a {end, date, long}\",\"date\":\"Data\",\"dateRange\":\"Intervalo de datas\",\"day\":\"dia\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Data final\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"startDate\":\"Data inicial\",\"year\":\"ano\",\"weekday\":\"dia da semana\",\"timeZoneName\":\"fuso horário\"}");
|
|
128
131
|
|
|
129
132
|
|
|
130
|
-
var $
|
|
131
|
-
$
|
|
133
|
+
var $f1633bd6cbc228e8$exports = {};
|
|
134
|
+
$f1633bd6cbc228e8$exports = JSON.parse("{\"calendar\":\"Calendário\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} a {end, date, long}\",\"date\":\"Data\",\"dateRange\":\"Intervalo de datas\",\"day\":\"dia\",\"dayPeriod\":\"am/pm\",\"endDate\":\"Data de Término\",\"era\":\"era\",\"hour\":\"hora\",\"minute\":\"minuto\",\"month\":\"mês\",\"second\":\"segundo\",\"startDate\":\"Data de Início\",\"year\":\"ano\",\"weekday\":\"dia da semana\",\"timeZoneName\":\"fuso horário\"}");
|
|
132
135
|
|
|
133
136
|
|
|
134
|
-
var $
|
|
135
|
-
$
|
|
137
|
+
var $14e09da03f3d1c5b$exports = {};
|
|
138
|
+
$14e09da03f3d1c5b$exports = JSON.parse("{\"calendar\":\"Calendar\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} - {end, date, long}\",\"date\":\"Dată\",\"dateRange\":\"Raza datei\",\"day\":\"zi\",\"dayPeriod\":\"a.m/p.m.\",\"endDate\":\"Dată final\",\"era\":\"eră\",\"hour\":\"oră\",\"minute\":\"minut\",\"month\":\"lună\",\"second\":\"secundă\",\"startDate\":\"Dată început\",\"year\":\"an\",\"weekday\":\"ziua din săptămână\",\"timeZoneName\":\"fus orar\"}");
|
|
136
139
|
|
|
137
140
|
|
|
138
|
-
var $
|
|
139
|
-
$
|
|
141
|
+
var $63247a3456bc40d1$exports = {};
|
|
142
|
+
$63247a3456bc40d1$exports = JSON.parse("{\"calendar\":\"Календарь\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} – {end, date, long}\",\"date\":\"Дата\",\"dateRange\":\"Диапазон дат\",\"day\":\"день\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Дата окончания\",\"era\":\"эра\",\"hour\":\"час\",\"minute\":\"минута\",\"month\":\"месяц\",\"second\":\"секунда\",\"startDate\":\"Дата начала\",\"year\":\"год\",\"weekday\":\"день недели\",\"timeZoneName\":\"часовой пояс\"}");
|
|
140
143
|
|
|
141
144
|
|
|
142
|
-
var $
|
|
143
|
-
$
|
|
145
|
+
var $22150dd20c353dd4$exports = {};
|
|
146
|
+
$22150dd20c353dd4$exports = JSON.parse("{\"calendar\":\"Kalendár\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} do {end, date, long}\",\"date\":\"Dátum\",\"dateRange\":\"Rozsah dátumov\",\"day\":\"deň\",\"dayPeriod\":\"AM/PM\",\"endDate\":\"Dátum ukončenia\",\"era\":\"letopočet\",\"hour\":\"hodina\",\"minute\":\"minúta\",\"month\":\"mesiac\",\"second\":\"sekunda\",\"startDate\":\"Dátum začatia\",\"year\":\"rok\",\"weekday\":\"deň týždňa\",\"timeZoneName\":\"časové pásmo\"}");
|
|
144
147
|
|
|
145
148
|
|
|
146
|
-
var $
|
|
147
|
-
$
|
|
149
|
+
var $701eb9a0385c55fd$exports = {};
|
|
150
|
+
$701eb9a0385c55fd$exports = JSON.parse("{\"calendar\":\"Koledar\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} do {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Datumski obseg\",\"day\":\"dan\",\"dayPeriod\":\"dop/pop\",\"endDate\":\"Datum konca\",\"era\":\"doba\",\"hour\":\"ura\",\"minute\":\"minuta\",\"month\":\"mesec\",\"second\":\"sekunda\",\"startDate\":\"Datum začetka\",\"year\":\"leto\",\"weekday\":\"dan v tednu\",\"timeZoneName\":\"časovni pas\"}");
|
|
148
151
|
|
|
149
152
|
|
|
150
|
-
var $
|
|
151
|
-
$
|
|
153
|
+
var $54684a4891ca6dc5$exports = {};
|
|
154
|
+
$54684a4891ca6dc5$exports = JSON.parse("{\"calendar\":\"Kalendar\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} do {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Opseg datuma\",\"day\":\"дан\",\"dayPeriod\":\"пре подне/по подне\",\"endDate\":\"Datum završetka\",\"era\":\"ера\",\"hour\":\"сат\",\"minute\":\"минут\",\"month\":\"месец\",\"second\":\"секунд\",\"startDate\":\"Datum početka\",\"year\":\"година\",\"weekday\":\"дан у недељи\",\"timeZoneName\":\"временска зона\"}");
|
|
152
155
|
|
|
153
156
|
|
|
154
|
-
var $
|
|
155
|
-
$
|
|
157
|
+
var $545887f88a5a52db$exports = {};
|
|
158
|
+
$545887f88a5a52db$exports = JSON.parse("{\"calendar\":\"Kalender\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} till {end, date, long}\",\"date\":\"Datum\",\"dateRange\":\"Datumintervall\",\"day\":\"dag\",\"dayPeriod\":\"fm/em\",\"endDate\":\"Slutdatum\",\"era\":\"era\",\"hour\":\"timme\",\"minute\":\"minut\",\"month\":\"månad\",\"second\":\"sekund\",\"startDate\":\"Startdatum\",\"year\":\"år\",\"weekday\":\"veckodag\",\"timeZoneName\":\"tidszon\"}");
|
|
156
159
|
|
|
157
160
|
|
|
158
|
-
var $
|
|
159
|
-
$
|
|
161
|
+
var $492d49420dd96ff4$exports = {};
|
|
162
|
+
$492d49420dd96ff4$exports = JSON.parse("{\"calendar\":\"Takvim\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} - {end, date, long}\",\"date\":\"Tarih\",\"dateRange\":\"Tarih Aralığı\",\"day\":\"gün\",\"dayPeriod\":\"ÖÖ/ÖS\",\"endDate\":\"Bitiş Tarihi\",\"era\":\"çağ\",\"hour\":\"saat\",\"minute\":\"dakika\",\"month\":\"ay\",\"second\":\"saniye\",\"startDate\":\"Başlangıç Tarihi\",\"year\":\"yıl\",\"weekday\":\"haftanın günü\",\"timeZoneName\":\"saat dilimi\"}");
|
|
160
163
|
|
|
161
164
|
|
|
162
|
-
var $
|
|
163
|
-
$
|
|
165
|
+
var $dc85765e85e8f267$exports = {};
|
|
166
|
+
$dc85765e85e8f267$exports = JSON.parse("{\"calendar\":\"Календар\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"Від {start, date, long} до {end, date, long}\",\"date\":\"Дата\",\"dateRange\":\"Діапазон дат\",\"day\":\"день\",\"dayPeriod\":\"дп/пп\",\"endDate\":\"Дата завершення\",\"era\":\"ера\",\"hour\":\"година\",\"minute\":\"хвилина\",\"month\":\"місяць\",\"second\":\"секунда\",\"startDate\":\"Дата початку\",\"year\":\"рік\",\"weekday\":\"день тижня\",\"timeZoneName\":\"часовий пояс\"}");
|
|
164
167
|
|
|
165
168
|
|
|
166
|
-
var $
|
|
167
|
-
$
|
|
169
|
+
var $2157d63cb80c7c63$exports = {};
|
|
170
|
+
$2157d63cb80c7c63$exports = JSON.parse("{\"calendar\":\"日历\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long} 至 {end, date, long}\",\"date\":\"日期\",\"dateRange\":\"日期范围\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"结束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"startDate\":\"开始日期\",\"year\":\"年\",\"weekday\":\"工作日\",\"timeZoneName\":\"时区\"}");
|
|
168
171
|
|
|
169
172
|
|
|
170
|
-
var $
|
|
171
|
-
$
|
|
173
|
+
var $0335c3ddb5f70cbe$exports = {};
|
|
174
|
+
$0335c3ddb5f70cbe$exports = JSON.parse("{\"calendar\":\"日曆\",\"currentDate\":\"{date, date, full}\",\"currentDateRange\":\"{start, date, long}至 {end, date, long}\",\"date\":\"日期\",\"dateRange\":\"日期範圍\",\"day\":\"日\",\"dayPeriod\":\"上午/下午\",\"endDate\":\"結束日期\",\"era\":\"纪元\",\"hour\":\"小时\",\"minute\":\"分钟\",\"month\":\"月\",\"second\":\"秒\",\"startDate\":\"開始日期\",\"year\":\"年\",\"weekday\":\"工作日\",\"timeZoneName\":\"时区\"}");
|
|
172
175
|
|
|
173
176
|
|
|
174
|
-
$
|
|
175
|
-
"ar-AE": $
|
|
176
|
-
"bg-BG": $
|
|
177
|
-
"cs-CZ": $
|
|
178
|
-
"da-DK": $
|
|
179
|
-
"de-DE": $
|
|
180
|
-
"el-GR": $
|
|
181
|
-
"en-US": $
|
|
182
|
-
"es-ES": $
|
|
183
|
-
"et-EE": $
|
|
184
|
-
"fi-FI": $
|
|
185
|
-
"fr-FR": $
|
|
186
|
-
"he-IL": $
|
|
187
|
-
"hr-HR": $
|
|
188
|
-
"hu-HU": $
|
|
189
|
-
"it-IT": $
|
|
190
|
-
"ja-JP": $
|
|
191
|
-
"ko-KR": $
|
|
192
|
-
"lt-LT": $
|
|
193
|
-
"lv-LV": $
|
|
194
|
-
"nb-NO": $
|
|
195
|
-
"nl-NL": $
|
|
196
|
-
"pl-PL": $
|
|
197
|
-
"pt-BR": $
|
|
198
|
-
"pt-PT": $
|
|
199
|
-
"ro-RO": $
|
|
200
|
-
"ru-RU": $
|
|
201
|
-
"sk-SK": $
|
|
202
|
-
"sl-SI": $
|
|
203
|
-
"sr-SP": $
|
|
204
|
-
"sv-SE": $
|
|
205
|
-
"tr-TR": $
|
|
206
|
-
"uk-UA": $
|
|
207
|
-
"zh-CN": $
|
|
208
|
-
"zh-TW": $
|
|
177
|
+
$c7d0e80b992ca68a$exports = {
|
|
178
|
+
"ar-AE": $aa344be62785b256$exports,
|
|
179
|
+
"bg-BG": $615986c3475e7c8c$exports,
|
|
180
|
+
"cs-CZ": $6c6207692f1ab248$exports,
|
|
181
|
+
"da-DK": $fb37a9d024dd70f8$exports,
|
|
182
|
+
"de-DE": $d7780bd4790f7ae9$exports,
|
|
183
|
+
"el-GR": $9cdf03311f06c4ac$exports,
|
|
184
|
+
"en-US": $f93fc9e164ae811c$exports,
|
|
185
|
+
"es-ES": $7426c3264bf5ffea$exports,
|
|
186
|
+
"et-EE": $1115cc0042de790c$exports,
|
|
187
|
+
"fi-FI": $4e80389dccb9283f$exports,
|
|
188
|
+
"fr-FR": $78ad6f738c1f38d1$exports,
|
|
189
|
+
"he-IL": $50fa4716d827cd97$exports,
|
|
190
|
+
"hr-HR": $7297908fac4cf6c2$exports,
|
|
191
|
+
"hu-HU": $f95c1b06e1d5ba32$exports,
|
|
192
|
+
"it-IT": $437a8dc519258a01$exports,
|
|
193
|
+
"ja-JP": $bd0aa2b50092a836$exports,
|
|
194
|
+
"ko-KR": $bbd8176c2e044bc1$exports,
|
|
195
|
+
"lt-LT": $1af703df56ff5180$exports,
|
|
196
|
+
"lv-LV": $9705eb4511dea9f8$exports,
|
|
197
|
+
"nb-NO": $8ef984876a7160bc$exports,
|
|
198
|
+
"nl-NL": $b6e9809e1ecaa25e$exports,
|
|
199
|
+
"pl-PL": $deb2fa609661fe31$exports,
|
|
200
|
+
"pt-BR": $591c8c054c84fa56$exports,
|
|
201
|
+
"pt-PT": $f1633bd6cbc228e8$exports,
|
|
202
|
+
"ro-RO": $14e09da03f3d1c5b$exports,
|
|
203
|
+
"ru-RU": $63247a3456bc40d1$exports,
|
|
204
|
+
"sk-SK": $22150dd20c353dd4$exports,
|
|
205
|
+
"sl-SI": $701eb9a0385c55fd$exports,
|
|
206
|
+
"sr-SP": $54684a4891ca6dc5$exports,
|
|
207
|
+
"sv-SE": $545887f88a5a52db$exports,
|
|
208
|
+
"tr-TR": $492d49420dd96ff4$exports,
|
|
209
|
+
"uk-UA": $dc85765e85e8f267$exports,
|
|
210
|
+
"zh-CN": $2157d63cb80c7c63$exports,
|
|
211
|
+
"zh-TW": $0335c3ddb5f70cbe$exports
|
|
209
212
|
};
|
|
210
213
|
|
|
211
214
|
|
|
212
215
|
|
|
213
216
|
|
|
214
217
|
|
|
215
|
-
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
216
223
|
// Open the popover on alt + arrow down
|
|
217
224
|
let onKeyDown = (e)=>{
|
|
218
|
-
if (e.altKey && e.key === 'ArrowDown' && 'setOpen' in state) {
|
|
225
|
+
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
219
226
|
e.preventDefault();
|
|
220
227
|
e.stopPropagation();
|
|
221
228
|
state.setOpen(true);
|
|
@@ -223,14 +230,33 @@ function $5419094120bfb814$export$4a931266a3838b86(state, ref) {
|
|
|
223
230
|
};
|
|
224
231
|
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
225
232
|
let focusLast = ()=>{
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
233
|
+
var ref;
|
|
234
|
+
// Try to find the segment prior to the element that was clicked on.
|
|
235
|
+
let target = (ref = window.event) === null || ref === void 0 ? void 0 : ref.target;
|
|
236
|
+
let walker = $IwcIq$reactariafocus.getFocusableTreeWalker(ref1.current, {
|
|
237
|
+
tabbable: true
|
|
238
|
+
});
|
|
239
|
+
if (target) {
|
|
240
|
+
walker.currentNode = target;
|
|
241
|
+
target = walker.previousNode();
|
|
242
|
+
}
|
|
243
|
+
// If no target found, find the last element from the end.
|
|
244
|
+
if (!target) {
|
|
245
|
+
let last;
|
|
246
|
+
do {
|
|
247
|
+
last = walker.lastChild();
|
|
248
|
+
if (last) target = last;
|
|
249
|
+
}while (last)
|
|
250
|
+
}
|
|
251
|
+
// Now go backwards until we find an element that is not a placeholder.
|
|
252
|
+
while(target === null || target === void 0 ? void 0 : target.getAttribute('aria-placeholder')){
|
|
253
|
+
let prev = walker.previousNode();
|
|
254
|
+
if (prev && prev.getAttribute('aria-placeholder')) target = prev;
|
|
255
|
+
else break;
|
|
256
|
+
}
|
|
257
|
+
if (target) target.focus();
|
|
232
258
|
};
|
|
233
|
-
let { pressProps: pressProps } = $
|
|
259
|
+
let { pressProps: pressProps } = $IwcIq$reactariainteractions.usePress({
|
|
234
260
|
onPressStart (e) {
|
|
235
261
|
if (e.pointerType === 'mouse') focusLast();
|
|
236
262
|
},
|
|
@@ -238,7 +264,7 @@ function $5419094120bfb814$export$4a931266a3838b86(state, ref) {
|
|
|
238
264
|
if (e.pointerType !== 'mouse') focusLast();
|
|
239
265
|
}
|
|
240
266
|
});
|
|
241
|
-
return $
|
|
267
|
+
return $IwcIq$reactariautils.mergeProps(pressProps, {
|
|
242
268
|
onKeyDown: onKeyDown
|
|
243
269
|
});
|
|
244
270
|
}
|
|
@@ -246,112 +272,162 @@ function $5419094120bfb814$export$4a931266a3838b86(state, ref) {
|
|
|
246
272
|
|
|
247
273
|
|
|
248
274
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $
|
|
275
|
+
const $4acc2f407c169e55$export$653eddfc964b0f8a = new WeakMap();
|
|
276
|
+
const $4acc2f407c169e55$export$300019f83c56d282 = '__role_' + Date.now();
|
|
277
|
+
const $4acc2f407c169e55$export$7b3062cd49e80452 = '__focusManager_' + Date.now();
|
|
278
|
+
function $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref) {
|
|
279
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
254
280
|
...props,
|
|
255
281
|
labelElementType: 'span'
|
|
256
282
|
});
|
|
257
|
-
let groupProps = $
|
|
258
|
-
let
|
|
259
|
-
|
|
260
|
-
|
|
283
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
284
|
+
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
285
|
+
onBlurWithin () {
|
|
286
|
+
state.confirmPlaceholder();
|
|
287
|
+
}
|
|
288
|
+
});
|
|
289
|
+
let descProps = $IwcIq$reactariautils.useDescription(state.formatValue({
|
|
261
290
|
month: 'long'
|
|
262
291
|
}));
|
|
263
|
-
|
|
292
|
+
// If within a date picker or date range picker, the date field will have role="presentation" and an aria-describedby
|
|
293
|
+
// will be passed in that references the value (e.g. entire range). Otherwise, add the field's value description.
|
|
294
|
+
let describedBy = props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation' ? fieldProps['aria-describedby'] : [
|
|
264
295
|
descProps['aria-describedby'],
|
|
265
296
|
fieldProps['aria-describedby']
|
|
266
297
|
].filter(Boolean).join(' ') || undefined;
|
|
298
|
+
let propsFocusManager = props[$4acc2f407c169e55$export$7b3062cd49e80452];
|
|
299
|
+
let focusManager = $IwcIq$react.useMemo(()=>propsFocusManager || $IwcIq$reactariafocus.createFocusManager(ref)
|
|
300
|
+
, [
|
|
301
|
+
propsFocusManager,
|
|
302
|
+
ref
|
|
303
|
+
]);
|
|
304
|
+
// Pass labels and other information to segments.
|
|
305
|
+
$4acc2f407c169e55$export$653eddfc964b0f8a.set(state, {
|
|
306
|
+
ariaLabel: props['aria-label'],
|
|
307
|
+
ariaLabelledBy: [
|
|
308
|
+
props['aria-labelledby'],
|
|
309
|
+
labelProps.id
|
|
310
|
+
].filter(Boolean).join(' ') || undefined,
|
|
311
|
+
ariaDescribedBy: describedBy,
|
|
312
|
+
focusManager: focusManager
|
|
313
|
+
});
|
|
314
|
+
let autoFocusRef = $IwcIq$react.useRef(props.autoFocus);
|
|
315
|
+
// When used within a date picker or date range picker, the field gets role="presentation"
|
|
316
|
+
// rather than role="group". Since the date picker/date range picker already has a role="group"
|
|
317
|
+
// with a label and description, and the segments are already labeled by this as well, this
|
|
318
|
+
// avoids very verbose duplicate announcements.
|
|
319
|
+
let fieldDOMProps;
|
|
320
|
+
if (props[$4acc2f407c169e55$export$300019f83c56d282] === 'presentation') fieldDOMProps = {
|
|
321
|
+
role: 'presentation'
|
|
322
|
+
};
|
|
323
|
+
else fieldDOMProps = $IwcIq$reactariautils.mergeProps(fieldProps, {
|
|
324
|
+
role: 'group',
|
|
325
|
+
'aria-disabled': props.isDisabled || undefined,
|
|
326
|
+
'aria-describedby': describedBy
|
|
327
|
+
});
|
|
328
|
+
$IwcIq$react.useEffect(()=>{
|
|
329
|
+
if (autoFocusRef.current) focusManager.focusFirst();
|
|
330
|
+
autoFocusRef.current = false;
|
|
331
|
+
}, [
|
|
332
|
+
focusManager
|
|
333
|
+
]);
|
|
267
334
|
return {
|
|
268
|
-
groupProps: $dWCUd$reactariautils.mergeProps(groupProps, descProps, {
|
|
269
|
-
role: 'group',
|
|
270
|
-
'aria-disabled': props.isDisabled || null,
|
|
271
|
-
'aria-labelledby': labelledBy,
|
|
272
|
-
'aria-describedby': ariaDescribedBy
|
|
273
|
-
}),
|
|
274
335
|
labelProps: {
|
|
275
336
|
...labelProps,
|
|
276
337
|
onClick: ()=>{
|
|
277
|
-
let focusManager = $dWCUd$reactariafocus.createFocusManager(ref);
|
|
278
338
|
focusManager.focusFirst();
|
|
279
339
|
}
|
|
280
340
|
},
|
|
281
|
-
fieldProps:
|
|
341
|
+
fieldProps: $IwcIq$reactariautils.mergeProps(fieldDOMProps, groupProps, focusWithinProps),
|
|
282
342
|
descriptionProps: descriptionProps,
|
|
283
|
-
errorMessageProps: errorMessageProps
|
|
284
|
-
buttonProps: {
|
|
285
|
-
...descProps,
|
|
286
|
-
id: buttonId,
|
|
287
|
-
excludeFromTabOrder: true,
|
|
288
|
-
'aria-haspopup': 'dialog',
|
|
289
|
-
'aria-label': formatMessage('calendar'),
|
|
290
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
291
|
-
'aria-describedby': ariaDescribedBy
|
|
292
|
-
},
|
|
293
|
-
dialogProps: {
|
|
294
|
-
id: dialogId,
|
|
295
|
-
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
296
|
-
}
|
|
343
|
+
errorMessageProps: errorMessageProps
|
|
297
344
|
};
|
|
298
345
|
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
$parcel$export($6a4b2ffaecd2cb39$exports, "useDateSegment", () => $6a4b2ffaecd2cb39$export$1315d136e6f7581);
|
|
304
|
-
|
|
305
|
-
var $a7ab9d2995fd0aed$exports = {};
|
|
306
|
-
|
|
307
|
-
$parcel$export($a7ab9d2995fd0aed$exports, "labelIds", () => $a7ab9d2995fd0aed$export$beb2340c1222c6d);
|
|
308
|
-
$parcel$export($a7ab9d2995fd0aed$exports, "useDateField", () => $a7ab9d2995fd0aed$export$5591b0b878c1a989);
|
|
309
|
-
|
|
346
|
+
function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
|
|
347
|
+
return $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref);
|
|
348
|
+
}
|
|
310
349
|
|
|
311
350
|
|
|
312
351
|
|
|
313
352
|
|
|
314
353
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
let
|
|
354
|
+
function $e90ae7c26a69c6b1$export$42df105a73306d51(props, state, ref) {
|
|
355
|
+
let buttonId = $IwcIq$reactariautils.useId();
|
|
356
|
+
let dialogId = $IwcIq$reactariautils.useId();
|
|
357
|
+
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
358
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
318
359
|
...props,
|
|
319
360
|
labelElementType: 'span'
|
|
320
361
|
});
|
|
321
|
-
let groupProps = $
|
|
322
|
-
let
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
let formatter = $dWCUd$reactariai18n.useDateFormatter(state.getFormatOptions({
|
|
362
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
363
|
+
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
364
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
365
|
+
let descProps = $IwcIq$reactariautils.useDescription(state.formatValue(locale, {
|
|
328
366
|
month: 'long'
|
|
329
367
|
}));
|
|
330
|
-
let
|
|
331
|
-
let segmentLabelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
332
|
-
let describedBy = [
|
|
368
|
+
let ariaDescribedBy = [
|
|
333
369
|
descProps['aria-describedby'],
|
|
334
370
|
fieldProps['aria-describedby']
|
|
335
371
|
].filter(Boolean).join(' ') || undefined;
|
|
336
|
-
$a7ab9d2995fd0aed$export$beb2340c1222c6d.set(state, {
|
|
337
|
-
ariaLabelledBy: segmentLabelledBy,
|
|
338
|
-
ariaDescribedBy: describedBy
|
|
339
|
-
});
|
|
340
372
|
return {
|
|
373
|
+
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps, {
|
|
374
|
+
role: 'group',
|
|
375
|
+
'aria-disabled': props.isDisabled || null,
|
|
376
|
+
'aria-labelledby': labelledBy,
|
|
377
|
+
'aria-describedby': ariaDescribedBy
|
|
378
|
+
}),
|
|
341
379
|
labelProps: {
|
|
342
380
|
...labelProps,
|
|
343
381
|
onClick: ()=>{
|
|
344
|
-
let focusManager = $
|
|
382
|
+
let focusManager = $IwcIq$reactariafocus.createFocusManager(ref);
|
|
345
383
|
focusManager.focusFirst();
|
|
346
384
|
}
|
|
347
385
|
},
|
|
348
|
-
fieldProps:
|
|
349
|
-
|
|
350
|
-
'
|
|
351
|
-
'aria-describedby':
|
|
352
|
-
|
|
386
|
+
fieldProps: {
|
|
387
|
+
...fieldProps,
|
|
388
|
+
[$4acc2f407c169e55$export$300019f83c56d282]: 'presentation',
|
|
389
|
+
'aria-describedby': ariaDescribedBy,
|
|
390
|
+
value: state.value,
|
|
391
|
+
onChange: state.setValue,
|
|
392
|
+
minValue: props.minValue,
|
|
393
|
+
maxValue: props.maxValue,
|
|
394
|
+
placeholderValue: props.placeholderValue,
|
|
395
|
+
hideTimeZone: props.hideTimeZone,
|
|
396
|
+
hourCycle: props.hourCycle,
|
|
397
|
+
granularity: props.granularity,
|
|
398
|
+
isDisabled: props.isDisabled,
|
|
399
|
+
isReadOnly: props.isReadOnly,
|
|
400
|
+
isRequired: props.isRequired,
|
|
401
|
+
validationState: state.validationState,
|
|
402
|
+
autoFocus: props.autoFocus
|
|
403
|
+
},
|
|
353
404
|
descriptionProps: descriptionProps,
|
|
354
|
-
errorMessageProps: errorMessageProps
|
|
405
|
+
errorMessageProps: errorMessageProps,
|
|
406
|
+
buttonProps: {
|
|
407
|
+
...descProps,
|
|
408
|
+
id: buttonId,
|
|
409
|
+
excludeFromTabOrder: true,
|
|
410
|
+
'aria-haspopup': 'dialog',
|
|
411
|
+
'aria-label': formatMessage('calendar'),
|
|
412
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
413
|
+
'aria-describedby': ariaDescribedBy,
|
|
414
|
+
onPress: ()=>state.setOpen(true)
|
|
415
|
+
},
|
|
416
|
+
dialogProps: {
|
|
417
|
+
id: dialogId,
|
|
418
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
419
|
+
},
|
|
420
|
+
calendarProps: {
|
|
421
|
+
autoFocus: true,
|
|
422
|
+
value: state.dateValue,
|
|
423
|
+
onChange: state.setDateValue,
|
|
424
|
+
minValue: props.minValue,
|
|
425
|
+
maxValue: props.maxValue,
|
|
426
|
+
isDisabled: props.isDisabled,
|
|
427
|
+
isReadOnly: props.isReadOnly,
|
|
428
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
429
|
+
defaultFocusedValue: state.dateValue ? undefined : props.placeholderValue
|
|
430
|
+
}
|
|
355
431
|
};
|
|
356
432
|
}
|
|
357
433
|
|
|
@@ -359,16 +435,18 @@ function $a7ab9d2995fd0aed$export$5591b0b878c1a989(props, state, ref) {
|
|
|
359
435
|
|
|
360
436
|
|
|
361
437
|
|
|
362
|
-
var $4b6d1294710a9407$exports = {};
|
|
363
438
|
|
|
364
|
-
$parcel$export($4b6d1294710a9407$exports, "useDisplayNames", () => $4b6d1294710a9407$export$d42c60378c8168f8);
|
|
365
439
|
|
|
440
|
+
var $934ac650a0aceb4b$exports = {};
|
|
441
|
+
|
|
442
|
+
$parcel$export($934ac650a0aceb4b$exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
366
443
|
|
|
367
444
|
|
|
368
445
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
446
|
+
|
|
447
|
+
function $934ac650a0aceb4b$export$d42c60378c8168f8() {
|
|
448
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
449
|
+
return $IwcIq$react.useMemo(()=>{
|
|
372
450
|
// Try to use Intl.DisplayNames if possible. It may be supported in browsers, but not support the dateTimeField
|
|
373
451
|
// type as that was only added in v2. https://github.com/tc39/intl-displaynames-v2
|
|
374
452
|
try {
|
|
@@ -377,41 +455,40 @@ function $4b6d1294710a9407$export$d42c60378c8168f8() {
|
|
|
377
455
|
type: 'dateTimeField'
|
|
378
456
|
});
|
|
379
457
|
} catch (err) {
|
|
380
|
-
return new $
|
|
458
|
+
return new $934ac650a0aceb4b$var$DisplayNamesPolyfill(locale);
|
|
381
459
|
}
|
|
382
460
|
}, [
|
|
383
461
|
locale
|
|
384
462
|
]);
|
|
385
463
|
}
|
|
386
|
-
class $
|
|
464
|
+
class $934ac650a0aceb4b$var$DisplayNamesPolyfill {
|
|
387
465
|
of(field) {
|
|
388
466
|
return this.dictionary.getStringForLocale(field, this.locale);
|
|
389
467
|
}
|
|
390
468
|
constructor(locale){
|
|
391
469
|
this.locale = locale;
|
|
392
|
-
this.dictionary = new $
|
|
470
|
+
this.dictionary = new $IwcIq$internationalizedmessage.MessageDictionary((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
393
471
|
}
|
|
394
472
|
}
|
|
395
473
|
|
|
396
474
|
|
|
397
475
|
|
|
398
476
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
let
|
|
402
|
-
let
|
|
403
|
-
let
|
|
404
|
-
let focusManager = $dWCUd$reactariafocus.useFocusManager();
|
|
477
|
+
function $5c015c6316d1904d$export$1315d136e6f7581(segment, state, ref) {
|
|
478
|
+
let enteredKeys = $IwcIq$react.useRef('');
|
|
479
|
+
let { locale: locale , direction: direction } = $IwcIq$reactariai18n.useLocale();
|
|
480
|
+
let displayNames = $934ac650a0aceb4b$export$d42c60378c8168f8();
|
|
481
|
+
let { ariaLabel: ariaLabel , ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy , focusManager: focusManager } = $4acc2f407c169e55$export$653eddfc964b0f8a.get(state);
|
|
405
482
|
let textValue = segment.text;
|
|
406
|
-
let options = $
|
|
483
|
+
let options = $IwcIq$react.useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
407
484
|
, [
|
|
408
485
|
state.dateFormatter
|
|
409
486
|
]);
|
|
410
|
-
let monthDateFormatter = $
|
|
487
|
+
let monthDateFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
411
488
|
month: 'long',
|
|
412
489
|
timeZone: options.timeZone
|
|
413
490
|
});
|
|
414
|
-
let hourDateFormatter = $
|
|
491
|
+
let hourDateFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
415
492
|
hour: 'numeric',
|
|
416
493
|
hour12: options.hour12,
|
|
417
494
|
timeZone: options.timeZone
|
|
@@ -419,15 +496,15 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
419
496
|
if (segment.type === 'month') {
|
|
420
497
|
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
421
498
|
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
422
|
-
} else if (segment.type === 'hour'
|
|
423
|
-
let { spinButtonProps: spinButtonProps } = $
|
|
499
|
+
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
500
|
+
let { spinButtonProps: spinButtonProps } = $IwcIq$reactariaspinbutton.useSpinButton({
|
|
424
501
|
value: segment.value,
|
|
425
502
|
textValue: textValue,
|
|
426
503
|
minValue: segment.minValue,
|
|
427
504
|
maxValue: segment.maxValue,
|
|
428
|
-
isDisabled:
|
|
429
|
-
isReadOnly:
|
|
430
|
-
isRequired:
|
|
505
|
+
isDisabled: state.isDisabled,
|
|
506
|
+
isReadOnly: state.isReadOnly || !segment.isEditable,
|
|
507
|
+
isRequired: state.isRequired,
|
|
431
508
|
onIncrement: ()=>{
|
|
432
509
|
enteredKeys.current = '';
|
|
433
510
|
state.increment(segment.type);
|
|
@@ -453,14 +530,14 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
453
530
|
state.setSegment(segment.type, segment.minValue);
|
|
454
531
|
}
|
|
455
532
|
});
|
|
456
|
-
let parser = $
|
|
533
|
+
let parser = $IwcIq$react.useMemo(()=>new $IwcIq$internationalizednumber.NumberParser(locale, {
|
|
457
534
|
maximumFractionDigits: 0
|
|
458
535
|
})
|
|
459
536
|
, [
|
|
460
537
|
locale
|
|
461
538
|
]);
|
|
462
539
|
let backspace = ()=>{
|
|
463
|
-
if (parser.isValidPartialNumber(segment.text) && !
|
|
540
|
+
if (parser.isValidPartialNumber(segment.text) && !state.isReadOnly && !segment.isPlaceholder) {
|
|
464
541
|
let newValue = segment.text.slice(0, -1);
|
|
465
542
|
let parsed = parser.parse(newValue);
|
|
466
543
|
if (newValue.length === 0 || parsed === 0) state.clearSegment(segment.type);
|
|
@@ -471,26 +548,36 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
471
548
|
let onKeyDown = (e)=>{
|
|
472
549
|
// Firefox does not fire selectstart for Ctrl/Cmd + A
|
|
473
550
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1742153
|
|
474
|
-
if (e.key === 'a' && ($
|
|
551
|
+
if (e.key === 'a' && ($IwcIq$reactariautils.isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
|
|
475
552
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
|
|
476
553
|
switch(e.key){
|
|
477
554
|
case 'ArrowLeft':
|
|
478
555
|
e.preventDefault();
|
|
479
556
|
e.stopPropagation();
|
|
480
|
-
if (direction === 'rtl') focusManager.focusNext(
|
|
481
|
-
|
|
557
|
+
if (direction === 'rtl') focusManager.focusNext({
|
|
558
|
+
tabbable: true
|
|
559
|
+
});
|
|
560
|
+
else focusManager.focusPrevious({
|
|
561
|
+
tabbable: true
|
|
562
|
+
});
|
|
482
563
|
break;
|
|
483
564
|
case 'ArrowRight':
|
|
484
565
|
e.preventDefault();
|
|
485
566
|
e.stopPropagation();
|
|
486
|
-
if (direction === 'rtl') focusManager.focusPrevious(
|
|
487
|
-
|
|
567
|
+
if (direction === 'rtl') focusManager.focusPrevious({
|
|
568
|
+
tabbable: true
|
|
569
|
+
});
|
|
570
|
+
else focusManager.focusNext({
|
|
571
|
+
tabbable: true
|
|
572
|
+
});
|
|
488
573
|
break;
|
|
489
574
|
case 'Enter':
|
|
490
575
|
e.preventDefault();
|
|
491
576
|
e.stopPropagation();
|
|
492
|
-
if (segment.isPlaceholder && !
|
|
493
|
-
focusManager.focusNext(
|
|
577
|
+
if (segment.isPlaceholder && !state.isReadOnly) state.confirmPlaceholder(segment.type);
|
|
578
|
+
focusManager.focusNext({
|
|
579
|
+
tabbable: true
|
|
580
|
+
});
|
|
494
581
|
break;
|
|
495
582
|
case 'Tab':
|
|
496
583
|
break;
|
|
@@ -504,14 +591,14 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
504
591
|
}
|
|
505
592
|
};
|
|
506
593
|
// Safari dayPeriod option doesn't work...
|
|
507
|
-
let { startsWith: startsWith } = $
|
|
594
|
+
let { startsWith: startsWith } = $IwcIq$reactariai18n.useFilter({
|
|
508
595
|
sensitivity: 'base'
|
|
509
596
|
});
|
|
510
|
-
let amPmFormatter = $
|
|
597
|
+
let amPmFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
511
598
|
hour: 'numeric',
|
|
512
599
|
hour12: true
|
|
513
600
|
});
|
|
514
|
-
let am = $
|
|
601
|
+
let am = $IwcIq$react.useMemo(()=>{
|
|
515
602
|
let date = new Date();
|
|
516
603
|
date.setHours(0);
|
|
517
604
|
return amPmFormatter.formatToParts(date).find((part)=>part.type === 'dayPeriod'
|
|
@@ -519,7 +606,7 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
519
606
|
}, [
|
|
520
607
|
amPmFormatter
|
|
521
608
|
]);
|
|
522
|
-
let pm = $
|
|
609
|
+
let pm = $IwcIq$react.useMemo(()=>{
|
|
523
610
|
let date = new Date();
|
|
524
611
|
date.setHours(12);
|
|
525
612
|
return amPmFormatter.formatToParts(date).find((part)=>part.type === 'dayPeriod'
|
|
@@ -528,14 +615,16 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
528
615
|
amPmFormatter
|
|
529
616
|
]);
|
|
530
617
|
let onInput = (key)=>{
|
|
531
|
-
if (
|
|
618
|
+
if (state.isDisabled || state.isReadOnly) return;
|
|
532
619
|
let newValue = enteredKeys.current + key;
|
|
533
620
|
switch(segment.type){
|
|
534
621
|
case 'dayPeriod':
|
|
535
622
|
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
536
623
|
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 12);
|
|
537
624
|
else break;
|
|
538
|
-
focusManager.focusNext(
|
|
625
|
+
focusManager.focusNext({
|
|
626
|
+
tabbable: true
|
|
627
|
+
});
|
|
539
628
|
break;
|
|
540
629
|
case 'day':
|
|
541
630
|
case 'hour':
|
|
@@ -565,7 +654,9 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
565
654
|
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
566
655
|
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
567
656
|
enteredKeys.current = '';
|
|
568
|
-
if (shouldSetValue) focusManager.focusNext(
|
|
657
|
+
if (shouldSetValue) focusManager.focusNext({
|
|
658
|
+
tabbable: true
|
|
659
|
+
});
|
|
569
660
|
} else enteredKeys.current = newValue;
|
|
570
661
|
break;
|
|
571
662
|
}
|
|
@@ -573,7 +664,7 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
573
664
|
};
|
|
574
665
|
let onFocus = ()=>{
|
|
575
666
|
enteredKeys.current = '';
|
|
576
|
-
$
|
|
667
|
+
$IwcIq$reactariautils.scrollIntoView($IwcIq$reactariautils.getScrollParent(ref.current), ref.current);
|
|
577
668
|
// Safari requires that a selection is set or it won't fire input events.
|
|
578
669
|
// Since usePress disables text selection, this won't happen by default.
|
|
579
670
|
ref.current.style.webkitUserSelect = 'text';
|
|
@@ -581,14 +672,14 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
581
672
|
selection.collapse(ref.current);
|
|
582
673
|
ref.current.style.webkitUserSelect = '';
|
|
583
674
|
};
|
|
584
|
-
let compositionRef = $
|
|
675
|
+
let compositionRef = $IwcIq$react.useRef('');
|
|
585
676
|
// @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
586
|
-
$
|
|
677
|
+
$IwcIq$reactariautils.useEvent(ref, 'beforeinput', (e)=>{
|
|
587
678
|
e.preventDefault();
|
|
588
679
|
switch(e.inputType){
|
|
589
680
|
case 'deleteContentBackward':
|
|
590
681
|
case 'deleteContentForward':
|
|
591
|
-
if (parser.isValidPartialNumber(segment.text) && !
|
|
682
|
+
if (parser.isValidPartialNumber(segment.text) && !state.isReadOnly) backspace();
|
|
592
683
|
break;
|
|
593
684
|
case 'insertCompositionText':
|
|
594
685
|
// insertCompositionText cannot be canceled.
|
|
@@ -603,7 +694,7 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
603
694
|
break;
|
|
604
695
|
}
|
|
605
696
|
});
|
|
606
|
-
$
|
|
697
|
+
$IwcIq$reactariautils.useEvent(ref, 'input', (e)=>{
|
|
607
698
|
let { inputType: inputType , data: data } = e;
|
|
608
699
|
switch(inputType){
|
|
609
700
|
case 'insertCompositionText':
|
|
@@ -617,7 +708,7 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
617
708
|
});
|
|
618
709
|
// Focus on mouse down/touch up to match native textfield behavior.
|
|
619
710
|
// usePress handles canceling text selection.
|
|
620
|
-
let { pressProps: pressProps } = $
|
|
711
|
+
let { pressProps: pressProps } = $IwcIq$reactariainteractions.usePress({
|
|
621
712
|
preventFocusOnPress: true,
|
|
622
713
|
onPressStart: (e)=>{
|
|
623
714
|
if (e.pointerType === 'mouse') e.target.focus();
|
|
@@ -627,11 +718,11 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
627
718
|
}
|
|
628
719
|
});
|
|
629
720
|
// For Android: prevent selection on long press.
|
|
630
|
-
$
|
|
721
|
+
$IwcIq$reactariautils.useEvent(ref, 'selectstart', (e)=>{
|
|
631
722
|
e.preventDefault();
|
|
632
723
|
});
|
|
633
724
|
// spinbuttons cannot be focused with VoiceOver on iOS.
|
|
634
|
-
let touchPropOverrides = $
|
|
725
|
+
let touchPropOverrides = $IwcIq$reactariautils.isIOS() || segment.type === 'timeZoneName' ? {
|
|
635
726
|
role: 'textbox',
|
|
636
727
|
'aria-valuemax': null,
|
|
637
728
|
'aria-valuemin': null,
|
|
@@ -639,49 +730,59 @@ function $6a4b2ffaecd2cb39$export$1315d136e6f7581(props, segment, state, ref) {
|
|
|
639
730
|
'aria-valuenow': null
|
|
640
731
|
} : {
|
|
641
732
|
};
|
|
642
|
-
let { ariaLabelledBy: ariaLabelledBy , ariaDescribedBy: ariaDescribedBy } = $a7ab9d2995fd0aed$export$beb2340c1222c6d.get(state);
|
|
643
733
|
// Only apply aria-describedby to the first segment, unless the field is invalid. This avoids it being
|
|
644
734
|
// read every time the user navigates to a new segment.
|
|
645
|
-
let firstSegment = $
|
|
735
|
+
let firstSegment = $IwcIq$react.useMemo(()=>state.segments.find((s)=>s.isEditable
|
|
646
736
|
)
|
|
647
737
|
, [
|
|
648
738
|
state.segments
|
|
649
739
|
]);
|
|
650
740
|
if (segment !== firstSegment && state.validationState !== 'invalid') ariaDescribedBy = undefined;
|
|
651
|
-
let id = $
|
|
652
|
-
let isEditable = !
|
|
741
|
+
let id = $IwcIq$reactariautils.useId();
|
|
742
|
+
let isEditable = !state.isDisabled && !state.isReadOnly && segment.isEditable;
|
|
743
|
+
// Prepend the label passed from the field to each segment name.
|
|
744
|
+
// This is needed because VoiceOver on iOS does not announce groups.
|
|
745
|
+
let name = segment.type === 'literal' ? '' : displayNames.of(segment.type);
|
|
746
|
+
let labelProps = $IwcIq$reactariautils.useLabels({
|
|
747
|
+
'aria-label': (ariaLabel ? ariaLabel + ' ' : '') + name,
|
|
748
|
+
'aria-labelledby': ariaLabelledBy
|
|
749
|
+
});
|
|
750
|
+
// Literal segments should not be visible to screen readers. We don't really need any of the above,
|
|
751
|
+
// but the rules of hooks mean hooks cannot be conditional so we have to put this condition here.
|
|
752
|
+
if (segment.type === 'literal') return {
|
|
753
|
+
segmentProps: {
|
|
754
|
+
'aria-hidden': true
|
|
755
|
+
}
|
|
756
|
+
};
|
|
653
757
|
return {
|
|
654
|
-
segmentProps: $
|
|
758
|
+
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps, pressProps, labelProps, {
|
|
655
759
|
id: id,
|
|
656
760
|
...touchPropOverrides,
|
|
657
|
-
'aria-controls': props['aria-controls'],
|
|
658
|
-
// 'aria-haspopup': props['aria-haspopup'], // deprecated in ARIA 1.2
|
|
659
761
|
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
660
|
-
'aria-label': segment.type !== 'literal' ? displayNames.of(segment.type) : undefined,
|
|
661
|
-
'aria-labelledby': `${ariaLabelledBy} ${id}`,
|
|
662
762
|
'aria-describedby': ariaDescribedBy,
|
|
663
763
|
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
664
|
-
'aria-readonly':
|
|
764
|
+
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
665
765
|
contentEditable: isEditable,
|
|
666
766
|
suppressContentEditableWarning: isEditable,
|
|
667
767
|
spellCheck: isEditable ? 'false' : undefined,
|
|
668
768
|
autoCapitalize: isEditable ? 'off' : undefined,
|
|
669
769
|
autoCorrect: isEditable ? 'off' : undefined,
|
|
670
770
|
// Capitalization was changed in React 17...
|
|
671
|
-
[parseInt(($parcel$interopDefault($
|
|
672
|
-
inputMode:
|
|
673
|
-
tabIndex:
|
|
771
|
+
[parseInt(($parcel$interopDefault($IwcIq$react)).version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,
|
|
772
|
+
inputMode: state.isDisabled || segment.type === 'dayPeriod' || !isEditable ? undefined : 'numeric',
|
|
773
|
+
tabIndex: state.isDisabled ? undefined : 0,
|
|
674
774
|
onKeyDown: onKeyDown,
|
|
675
|
-
onFocus: onFocus
|
|
775
|
+
onFocus: onFocus,
|
|
776
|
+
style: {
|
|
777
|
+
caretColor: 'transparent'
|
|
778
|
+
}
|
|
676
779
|
})
|
|
677
780
|
};
|
|
678
781
|
}
|
|
679
782
|
|
|
680
783
|
|
|
681
784
|
|
|
682
|
-
var $5a2d6bad3e8953e8$exports = {};
|
|
683
785
|
|
|
684
|
-
$parcel$export($5a2d6bad3e8953e8$exports, "useDateRangePicker", () => $5a2d6bad3e8953e8$export$12fd5f0e9f4bb192);
|
|
685
786
|
|
|
686
787
|
|
|
687
788
|
|
|
@@ -689,30 +790,32 @@ $parcel$export($5a2d6bad3e8953e8$exports, "useDateRangePicker", () => $5a2d6bad3
|
|
|
689
790
|
|
|
690
791
|
|
|
691
792
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
793
|
+
|
|
794
|
+
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
795
|
+
var ref1, ref2;
|
|
796
|
+
let formatMessage = $IwcIq$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
797
|
+
let { labelProps: labelProps , fieldProps: fieldProps , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = $IwcIq$reactarialabel.useField({
|
|
695
798
|
...props,
|
|
696
799
|
labelElementType: 'span'
|
|
697
800
|
});
|
|
698
801
|
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
699
|
-
let { locale: locale } = $
|
|
802
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
700
803
|
let description = state.formatValue(locale, {
|
|
701
804
|
month: 'long'
|
|
702
805
|
});
|
|
703
|
-
let descProps = $
|
|
704
|
-
let startFieldProps =
|
|
806
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
807
|
+
let startFieldProps = {
|
|
705
808
|
'aria-label': formatMessage('startDate'),
|
|
706
809
|
'aria-labelledby': labelledBy
|
|
707
|
-
}
|
|
708
|
-
let endFieldProps =
|
|
810
|
+
};
|
|
811
|
+
let endFieldProps = {
|
|
709
812
|
'aria-label': formatMessage('endDate'),
|
|
710
813
|
'aria-labelledby': labelledBy
|
|
711
|
-
}
|
|
712
|
-
let buttonId = $
|
|
713
|
-
let dialogId = $
|
|
714
|
-
let groupProps = $
|
|
715
|
-
let { focusWithinProps: focusWithinProps } = $
|
|
814
|
+
};
|
|
815
|
+
let buttonId = $IwcIq$reactariautils.useId();
|
|
816
|
+
let dialogId = $IwcIq$reactariautils.useId();
|
|
817
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
818
|
+
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
716
819
|
onBlurWithin () {
|
|
717
820
|
state.confirmPlaceholder();
|
|
718
821
|
}
|
|
@@ -721,8 +824,27 @@ function $5a2d6bad3e8953e8$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
721
824
|
descProps['aria-describedby'],
|
|
722
825
|
fieldProps['aria-describedby']
|
|
723
826
|
].filter(Boolean).join(' ') || undefined;
|
|
827
|
+
let focusManager = $IwcIq$react.useMemo(()=>$IwcIq$reactariafocus.createFocusManager(ref)
|
|
828
|
+
, [
|
|
829
|
+
ref
|
|
830
|
+
]);
|
|
831
|
+
let commonFieldProps = {
|
|
832
|
+
[$4acc2f407c169e55$export$7b3062cd49e80452]: focusManager,
|
|
833
|
+
[$4acc2f407c169e55$export$300019f83c56d282]: 'presentation',
|
|
834
|
+
'aria-describedby': ariaDescribedBy,
|
|
835
|
+
minValue: props.minValue,
|
|
836
|
+
maxValue: props.maxValue,
|
|
837
|
+
placeholderValue: props.placeholderValue,
|
|
838
|
+
hideTimeZone: props.hideTimeZone,
|
|
839
|
+
hourCycle: props.hourCycle,
|
|
840
|
+
granularity: props.granularity,
|
|
841
|
+
isDisabled: props.isDisabled,
|
|
842
|
+
isReadOnly: props.isReadOnly,
|
|
843
|
+
isRequired: props.isRequired,
|
|
844
|
+
validationState: state.validationState
|
|
845
|
+
};
|
|
724
846
|
return {
|
|
725
|
-
groupProps: $
|
|
847
|
+
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps, focusWithinProps, {
|
|
726
848
|
role: 'group',
|
|
727
849
|
'aria-disabled': props.isDisabled || null,
|
|
728
850
|
'aria-describedby': ariaDescribedBy
|
|
@@ -730,7 +852,6 @@ function $5a2d6bad3e8953e8$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
730
852
|
labelProps: {
|
|
731
853
|
...labelProps,
|
|
732
854
|
onClick: ()=>{
|
|
733
|
-
let focusManager = $dWCUd$reactariafocus.createFocusManager(ref);
|
|
734
855
|
focusManager.focusFirst();
|
|
735
856
|
}
|
|
736
857
|
},
|
|
@@ -741,7 +862,8 @@ function $5a2d6bad3e8953e8$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
741
862
|
'aria-haspopup': 'dialog',
|
|
742
863
|
'aria-label': formatMessage('calendar'),
|
|
743
864
|
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
744
|
-
'aria-describedby': ariaDescribedBy
|
|
865
|
+
'aria-describedby': ariaDescribedBy,
|
|
866
|
+
onPress: ()=>state.setOpen(true)
|
|
745
867
|
},
|
|
746
868
|
dialogProps: {
|
|
747
869
|
id: dialogId,
|
|
@@ -749,24 +871,38 @@ function $5a2d6bad3e8953e8$export$12fd5f0e9f4bb192(props, state, ref) {
|
|
|
749
871
|
},
|
|
750
872
|
startFieldProps: {
|
|
751
873
|
...startFieldProps,
|
|
752
|
-
|
|
874
|
+
...commonFieldProps,
|
|
875
|
+
value: (ref1 = state.value) === null || ref1 === void 0 ? void 0 : ref1.start,
|
|
876
|
+
onChange: (start)=>state.setDateTime('start', start)
|
|
877
|
+
,
|
|
878
|
+
autoFocus: props.autoFocus
|
|
753
879
|
},
|
|
754
880
|
endFieldProps: {
|
|
755
881
|
...endFieldProps,
|
|
756
|
-
|
|
882
|
+
...commonFieldProps,
|
|
883
|
+
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
884
|
+
onChange: (end)=>state.setDateTime('end', end)
|
|
757
885
|
},
|
|
758
886
|
descriptionProps: descriptionProps,
|
|
759
|
-
errorMessageProps: errorMessageProps
|
|
887
|
+
errorMessageProps: errorMessageProps,
|
|
888
|
+
calendarProps: {
|
|
889
|
+
autoFocus: true,
|
|
890
|
+
value: state.dateRange,
|
|
891
|
+
onChange: state.setDateRange,
|
|
892
|
+
minValue: props.minValue,
|
|
893
|
+
maxValue: props.maxValue,
|
|
894
|
+
isDisabled: props.isDisabled,
|
|
895
|
+
isReadOnly: props.isReadOnly,
|
|
896
|
+
isDateUnavailable: props.isDateUnavailable,
|
|
897
|
+
allowsNonContiguousRanges: props.allowsNonContiguousRanges,
|
|
898
|
+
defaultFocusedValue: state.dateRange ? undefined : props.placeholderValue
|
|
899
|
+
}
|
|
760
900
|
};
|
|
761
901
|
}
|
|
762
902
|
|
|
763
903
|
|
|
764
904
|
|
|
765
|
-
$parcel$exportWildcard(module.exports, $
|
|
766
|
-
$parcel$exportWildcard(module.exports, $6a4b2ffaecd2cb39$exports);
|
|
767
|
-
$parcel$exportWildcard(module.exports, $a7ab9d2995fd0aed$exports);
|
|
768
|
-
$parcel$exportWildcard(module.exports, $5a2d6bad3e8953e8$exports);
|
|
769
|
-
$parcel$exportWildcard(module.exports, $4b6d1294710a9407$exports);
|
|
905
|
+
$parcel$exportWildcard(module.exports, $934ac650a0aceb4b$exports);
|
|
770
906
|
|
|
771
907
|
|
|
772
908
|
//# sourceMappingURL=main.js.map
|