@react-aria/datepicker 3.0.0-alpha.2 → 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 +830 -858
- package/dist/main.js.map +1 -1
- package/dist/module.js +825 -809
- 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 +16 -15
- 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,936 +1,908 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = require("@react-aria/i18n");
|
|
28
|
-
|
|
29
|
-
var {
|
|
30
|
-
useField
|
|
31
|
-
} = require("@react-aria/label");
|
|
32
|
-
|
|
33
|
-
var {
|
|
34
|
-
usePress,
|
|
35
|
-
useFocusWithin
|
|
36
|
-
} = require("@react-aria/interactions");
|
|
37
|
-
|
|
38
|
-
var {
|
|
39
|
-
mergeProps,
|
|
40
|
-
useDescription,
|
|
41
|
-
useId,
|
|
42
|
-
getScrollParent,
|
|
43
|
-
isIOS,
|
|
44
|
-
isMac,
|
|
45
|
-
scrollIntoView,
|
|
46
|
-
useEvent,
|
|
47
|
-
useLabels
|
|
48
|
-
} = require("@react-aria/utils");
|
|
49
|
-
|
|
50
|
-
var {
|
|
51
|
-
createFocusManager,
|
|
52
|
-
useFocusManager
|
|
53
|
-
} = require("@react-aria/focus");
|
|
54
|
-
|
|
55
|
-
var _babelRuntimeHelpersInteropRequireDefault = $parcel$interopDefault(require("@babel/runtime/helpers/interopRequireDefault"));
|
|
56
|
-
|
|
57
|
-
var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
|
|
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
|
+
|
|
11
|
+
function $parcel$export(e, n, v, s) {
|
|
12
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
13
|
+
}
|
|
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
|
+
});
|
|
58
27
|
|
|
28
|
+
return dest;
|
|
29
|
+
}
|
|
59
30
|
function $parcel$interopDefault(a) {
|
|
60
31
|
return a && a.__esModule ? a.default : a;
|
|
61
32
|
}
|
|
62
33
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
$
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
$bab398828901e91cda5ace996e16743$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\":\"часова зона\"}");
|
|
69
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/cs-CZ.json
|
|
70
|
-
var $a1b39c1203bddacb07ac8af1bf09f93d$exports = {};
|
|
71
|
-
$a1b39c1203bddacb07ac8af1bf09f93d$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\"}");
|
|
72
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/da-DK.json
|
|
73
|
-
var $de6d54fc6253e3aab217ab66cc92632$exports = {};
|
|
74
|
-
$de6d54fc6253e3aab217ab66cc92632$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\"}");
|
|
75
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/de-DE.json
|
|
76
|
-
var $c62d85e73a4bc4d2d79c4e5438a0a3$exports = {};
|
|
77
|
-
$c62d85e73a4bc4d2d79c4e5438a0a3$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\"}");
|
|
78
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/el-GR.json
|
|
79
|
-
var $e7f2c17a4d052730760575ff7cf57df6$exports = {};
|
|
80
|
-
$e7f2c17a4d052730760575ff7cf57df6$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\":\"ζώνη ώρας\"}");
|
|
81
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/en-US.json
|
|
82
|
-
var $adfdcb0b7f4822eaafecdabf45f751$exports = {};
|
|
83
|
-
$adfdcb0b7f4822eaafecdabf45f751$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\"}");
|
|
84
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/es-ES.json
|
|
85
|
-
var $f9c516e0c25716b7d567ed2$exports = {};
|
|
86
|
-
$f9c516e0c25716b7d567ed2$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\"}");
|
|
87
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/et-EE.json
|
|
88
|
-
var $ba7274e4009469f7b66a9c93516dc421$exports = {};
|
|
89
|
-
$ba7274e4009469f7b66a9c93516dc421$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\"}");
|
|
90
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/fi-FI.json
|
|
91
|
-
var $c64b2869d31111b8a6212d3569c46edc$exports = {};
|
|
92
|
-
$c64b2869d31111b8a6212d3569c46edc$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\"}");
|
|
93
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/fr-FR.json
|
|
94
|
-
var $ba1e9adecce613badde3f8b2a91b9$exports = {};
|
|
95
|
-
$ba1e9adecce613badde3f8b2a91b9$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\"}");
|
|
96
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/he-IL.json
|
|
97
|
-
var $da5d80bcf16af82fe7b14fc1e9d9$exports = {};
|
|
98
|
-
$da5d80bcf16af82fe7b14fc1e9d9$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\":\"אזור זמן\"}");
|
|
99
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/hr-HR.json
|
|
100
|
-
var $c179e9a34711caa46568a537c351781$exports = {};
|
|
101
|
-
$c179e9a34711caa46568a537c351781$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\"}");
|
|
102
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/hu-HU.json
|
|
103
|
-
var $a40a6dd4cfb1bd1de71f82470d8716$exports = {};
|
|
104
|
-
$a40a6dd4cfb1bd1de71f82470d8716$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\"}");
|
|
105
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/it-IT.json
|
|
106
|
-
var $b9be9a4b72f2aadd1d314520c1acfc$exports = {};
|
|
107
|
-
$b9be9a4b72f2aadd1d314520c1acfc$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\"}");
|
|
108
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/ja-JP.json
|
|
109
|
-
var $b41d870af1ac3496d01f8698fb5c954$exports = {};
|
|
110
|
-
$b41d870af1ac3496d01f8698fb5c954$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\":\"タイムゾーン\"}");
|
|
111
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/ko-KR.json
|
|
112
|
-
var $fe0c574bf48312400dd82a37538c16ef$exports = {};
|
|
113
|
-
$fe0c574bf48312400dd82a37538c16ef$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\":\"시간대\"}");
|
|
114
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/lt-LT.json
|
|
115
|
-
var $b0ad35113dfe9f264970b85837$exports = {};
|
|
116
|
-
$b0ad35113dfe9f264970b85837$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\"}");
|
|
117
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/lv-LV.json
|
|
118
|
-
var $c670847f13ef745cf51c4d927173b$exports = {};
|
|
119
|
-
$c670847f13ef745cf51c4d927173b$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\"}");
|
|
120
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/nb-NO.json
|
|
121
|
-
var $d59ad4442794aa8d7415835505965b2$exports = {};
|
|
122
|
-
$d59ad4442794aa8d7415835505965b2$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\"}");
|
|
123
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/nl-NL.json
|
|
124
|
-
var $ea0bd7fd22f4939550fa7411df8295f2$exports = {};
|
|
125
|
-
$ea0bd7fd22f4939550fa7411df8295f2$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\"}");
|
|
126
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/pl-PL.json
|
|
127
|
-
var $c08613207efc8ea834b1fadda995620b$exports = {};
|
|
128
|
-
$c08613207efc8ea834b1fadda995620b$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\"}");
|
|
129
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/pt-BR.json
|
|
130
|
-
var $c53c2ff9b6580a8da286c11a97f27c0c$exports = {};
|
|
131
|
-
$c53c2ff9b6580a8da286c11a97f27c0c$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\"}");
|
|
132
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/pt-PT.json
|
|
133
|
-
var $d9eb517021c8b3bace06723f935$exports = {};
|
|
134
|
-
$d9eb517021c8b3bace06723f935$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\"}");
|
|
135
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/ro-RO.json
|
|
136
|
-
var $b374a5303a356023e59a4df3c152bebf$exports = {};
|
|
137
|
-
$b374a5303a356023e59a4df3c152bebf$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\"}");
|
|
138
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/ru-RU.json
|
|
139
|
-
var $e72056058c9fa1ea634cd2d7f7700$exports = {};
|
|
140
|
-
$e72056058c9fa1ea634cd2d7f7700$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\":\"часовой пояс\"}");
|
|
141
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/sk-SK.json
|
|
142
|
-
var $ab8e21cbc487e19c15c39cc2df98aed6$exports = {};
|
|
143
|
-
$ab8e21cbc487e19c15c39cc2df98aed6$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
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/sl-SI.json
|
|
145
|
-
var $a155de298a83a5c6e328091b4347a$exports = {};
|
|
146
|
-
$a155de298a83a5c6e328091b4347a$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\"}");
|
|
147
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/sr-SP.json
|
|
148
|
-
var $f93e8a2d2993e66b87975762a481$exports = {};
|
|
149
|
-
$f93e8a2d2993e66b87975762a481$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\":\"временска зона\"}");
|
|
150
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/sv-SE.json
|
|
151
|
-
var $d90bf5621eeb550e11f07fd645ee9375$exports = {};
|
|
152
|
-
$d90bf5621eeb550e11f07fd645ee9375$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\"}");
|
|
153
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/tr-TR.json
|
|
154
|
-
var $aa582d9ff36fb511de0ccb22bd9e2bb$exports = {};
|
|
155
|
-
$aa582d9ff36fb511de0ccb22bd9e2bb$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\"}");
|
|
156
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/uk-UA.json
|
|
157
|
-
var $a1ed5505308b04ac9cd1c488538019c3$exports = {};
|
|
158
|
-
$a1ed5505308b04ac9cd1c488538019c3$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\":\"часовий пояс\"}");
|
|
159
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/zh-CN.json
|
|
160
|
-
var $c6b9bcbebc7c1f385b7e70bbd744b53$exports = {};
|
|
161
|
-
$c6b9bcbebc7c1f385b7e70bbd744b53$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\":\"时区\"}");
|
|
162
|
-
// ASSET: /Users/govett/Downloads/react-spectrum-release/packages/@react-aria/datepicker/intl/zh-TW.json
|
|
163
|
-
var $ae51b3cde9961c4855b77ac499ea$exports = {};
|
|
164
|
-
$ae51b3cde9961c4855b77ac499ea$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\":\"时区\"}");
|
|
165
|
-
|
|
166
|
-
function $e62c7e96a53f216814557ded9a8cf$export$useDatePickerGroup(state, ref) {
|
|
167
|
-
// Open the popover on alt + arrow down
|
|
168
|
-
let onKeyDown = e => {
|
|
169
|
-
if (e.altKey && e.key === 'ArrowDown' && 'setOpen' in state) {
|
|
170
|
-
e.preventDefault();
|
|
171
|
-
e.stopPropagation();
|
|
172
|
-
state.setOpen(true);
|
|
173
|
-
}
|
|
174
|
-
}; // Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
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);
|
|
175
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\":\"التوقيت\"}");
|
|
176
43
|
|
|
177
|
-
let focusLast = () => {
|
|
178
|
-
let elements = ref.current.querySelectorAll('[tabindex="0"]');
|
|
179
|
-
let index = elements.length - 1;
|
|
180
44
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
}
|
|
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\":\"часова зона\"}");
|
|
184
47
|
|
|
185
|
-
index = Math.min(index + 1, elements.length - 1);
|
|
186
|
-
let element = elements[index];
|
|
187
48
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
let {
|
|
194
|
-
pressProps
|
|
195
|
-
} = usePress({
|
|
196
|
-
onPressStart(e) {
|
|
197
|
-
if (e.pointerType === 'mouse') {
|
|
198
|
-
focusLast();
|
|
199
|
-
}
|
|
200
|
-
},
|
|
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\"}");
|
|
201
51
|
|
|
202
|
-
onPress(e) {
|
|
203
|
-
if (e.pointerType !== 'mouse') {
|
|
204
|
-
focusLast();
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
52
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
onKeyDown
|
|
211
|
-
});
|
|
212
|
-
}
|
|
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\"}");
|
|
213
55
|
|
|
214
|
-
// @ts-ignore
|
|
215
|
-
const $faa51d1fd0ed7732821d1b830a6e9ae2$var$intlMessages = {
|
|
216
|
-
"ar-AE": _babelRuntimeHelpersInteropRequireDefault($be926026280e076dd0b048671d4b$exports).default,
|
|
217
|
-
"bg-BG": _babelRuntimeHelpersInteropRequireDefault($bab398828901e91cda5ace996e16743$exports).default,
|
|
218
|
-
"cs-CZ": _babelRuntimeHelpersInteropRequireDefault($a1b39c1203bddacb07ac8af1bf09f93d$exports).default,
|
|
219
|
-
"da-DK": _babelRuntimeHelpersInteropRequireDefault($de6d54fc6253e3aab217ab66cc92632$exports).default,
|
|
220
|
-
"de-DE": _babelRuntimeHelpersInteropRequireDefault($c62d85e73a4bc4d2d79c4e5438a0a3$exports).default,
|
|
221
|
-
"el-GR": _babelRuntimeHelpersInteropRequireDefault($e7f2c17a4d052730760575ff7cf57df6$exports).default,
|
|
222
|
-
"en-US": _babelRuntimeHelpersInteropRequireDefault($adfdcb0b7f4822eaafecdabf45f751$exports).default,
|
|
223
|
-
"es-ES": _babelRuntimeHelpersInteropRequireDefault($f9c516e0c25716b7d567ed2$exports).default,
|
|
224
|
-
"et-EE": _babelRuntimeHelpersInteropRequireDefault($ba7274e4009469f7b66a9c93516dc421$exports).default,
|
|
225
|
-
"fi-FI": _babelRuntimeHelpersInteropRequireDefault($c64b2869d31111b8a6212d3569c46edc$exports).default,
|
|
226
|
-
"fr-FR": _babelRuntimeHelpersInteropRequireDefault($ba1e9adecce613badde3f8b2a91b9$exports).default,
|
|
227
|
-
"he-IL": _babelRuntimeHelpersInteropRequireDefault($da5d80bcf16af82fe7b14fc1e9d9$exports).default,
|
|
228
|
-
"hr-HR": _babelRuntimeHelpersInteropRequireDefault($c179e9a34711caa46568a537c351781$exports).default,
|
|
229
|
-
"hu-HU": _babelRuntimeHelpersInteropRequireDefault($a40a6dd4cfb1bd1de71f82470d8716$exports).default,
|
|
230
|
-
"it-IT": _babelRuntimeHelpersInteropRequireDefault($b9be9a4b72f2aadd1d314520c1acfc$exports).default,
|
|
231
|
-
"ja-JP": _babelRuntimeHelpersInteropRequireDefault($b41d870af1ac3496d01f8698fb5c954$exports).default,
|
|
232
|
-
"ko-KR": _babelRuntimeHelpersInteropRequireDefault($fe0c574bf48312400dd82a37538c16ef$exports).default,
|
|
233
|
-
"lt-LT": _babelRuntimeHelpersInteropRequireDefault($b0ad35113dfe9f264970b85837$exports).default,
|
|
234
|
-
"lv-LV": _babelRuntimeHelpersInteropRequireDefault($c670847f13ef745cf51c4d927173b$exports).default,
|
|
235
|
-
"nb-NO": _babelRuntimeHelpersInteropRequireDefault($d59ad4442794aa8d7415835505965b2$exports).default,
|
|
236
|
-
"nl-NL": _babelRuntimeHelpersInteropRequireDefault($ea0bd7fd22f4939550fa7411df8295f2$exports).default,
|
|
237
|
-
"pl-PL": _babelRuntimeHelpersInteropRequireDefault($c08613207efc8ea834b1fadda995620b$exports).default,
|
|
238
|
-
"pt-BR": _babelRuntimeHelpersInteropRequireDefault($c53c2ff9b6580a8da286c11a97f27c0c$exports).default,
|
|
239
|
-
"pt-PT": _babelRuntimeHelpersInteropRequireDefault($d9eb517021c8b3bace06723f935$exports).default,
|
|
240
|
-
"ro-RO": _babelRuntimeHelpersInteropRequireDefault($b374a5303a356023e59a4df3c152bebf$exports).default,
|
|
241
|
-
"ru-RU": _babelRuntimeHelpersInteropRequireDefault($e72056058c9fa1ea634cd2d7f7700$exports).default,
|
|
242
|
-
"sk-SK": _babelRuntimeHelpersInteropRequireDefault($ab8e21cbc487e19c15c39cc2df98aed6$exports).default,
|
|
243
|
-
"sl-SI": _babelRuntimeHelpersInteropRequireDefault($a155de298a83a5c6e328091b4347a$exports).default,
|
|
244
|
-
"sr-SP": _babelRuntimeHelpersInteropRequireDefault($f93e8a2d2993e66b87975762a481$exports).default,
|
|
245
|
-
"sv-SE": _babelRuntimeHelpersInteropRequireDefault($d90bf5621eeb550e11f07fd645ee9375$exports).default,
|
|
246
|
-
"tr-TR": _babelRuntimeHelpersInteropRequireDefault($aa582d9ff36fb511de0ccb22bd9e2bb$exports).default,
|
|
247
|
-
"uk-UA": _babelRuntimeHelpersInteropRequireDefault($a1ed5505308b04ac9cd1c488538019c3$exports).default,
|
|
248
|
-
"zh-CN": _babelRuntimeHelpersInteropRequireDefault($c6b9bcbebc7c1f385b7e70bbd744b53$exports).default,
|
|
249
|
-
"zh-TW": _babelRuntimeHelpersInteropRequireDefault($ae51b3cde9961c4855b77ac499ea$exports).default
|
|
250
|
-
};
|
|
251
56
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
let dialogId = useId();
|
|
255
|
-
let formatMessage = useMessageFormatter($faa51d1fd0ed7732821d1b830a6e9ae2$var$intlMessages);
|
|
256
|
-
let {
|
|
257
|
-
labelProps,
|
|
258
|
-
fieldProps,
|
|
259
|
-
descriptionProps,
|
|
260
|
-
errorMessageProps
|
|
261
|
-
} = useField(_babelRuntimeHelpersExtends({}, props, {
|
|
262
|
-
labelElementType: 'span'
|
|
263
|
-
}));
|
|
264
|
-
let groupProps = $e62c7e96a53f216814557ded9a8cf$export$useDatePickerGroup(state, ref);
|
|
265
|
-
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
266
|
-
let {
|
|
267
|
-
locale
|
|
268
|
-
} = useLocale();
|
|
269
|
-
let descProps = useDescription(state.formatValue(locale, {
|
|
270
|
-
month: 'long'
|
|
271
|
-
}));
|
|
272
|
-
let ariaDescribedBy = [descProps['aria-describedby'], fieldProps['aria-describedby']].filter(Boolean).join(' ') || undefined;
|
|
273
|
-
return {
|
|
274
|
-
groupProps: mergeProps(groupProps, descProps, {
|
|
275
|
-
role: 'group',
|
|
276
|
-
'aria-disabled': props.isDisabled || null,
|
|
277
|
-
'aria-labelledby': labelledBy,
|
|
278
|
-
'aria-describedby': ariaDescribedBy
|
|
279
|
-
}),
|
|
280
|
-
labelProps: _babelRuntimeHelpersExtends({}, labelProps, {
|
|
281
|
-
onClick: () => {
|
|
282
|
-
let focusManager = createFocusManager(ref);
|
|
283
|
-
focusManager.focusFirst();
|
|
284
|
-
}
|
|
285
|
-
}),
|
|
286
|
-
fieldProps,
|
|
287
|
-
descriptionProps,
|
|
288
|
-
errorMessageProps,
|
|
289
|
-
buttonProps: _babelRuntimeHelpersExtends({}, descProps, {
|
|
290
|
-
id: buttonId,
|
|
291
|
-
excludeFromTabOrder: true,
|
|
292
|
-
'aria-haspopup': 'dialog',
|
|
293
|
-
'aria-label': formatMessage('calendar'),
|
|
294
|
-
'aria-labelledby': labelledBy + " " + buttonId,
|
|
295
|
-
'aria-describedby': ariaDescribedBy
|
|
296
|
-
}),
|
|
297
|
-
dialogProps: {
|
|
298
|
-
id: dialogId,
|
|
299
|
-
'aria-labelledby': labelledBy + " " + buttonId
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
}
|
|
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\"}");
|
|
303
59
|
|
|
304
|
-
exports.useDatePicker = useDatePicker;
|
|
305
|
-
const labelIds = new WeakMap();
|
|
306
|
-
exports.labelIds = labelIds;
|
|
307
|
-
|
|
308
|
-
function useDateField(props, state, ref) {
|
|
309
|
-
let {
|
|
310
|
-
labelProps,
|
|
311
|
-
fieldProps,
|
|
312
|
-
descriptionProps,
|
|
313
|
-
errorMessageProps
|
|
314
|
-
} = useField(_babelRuntimeHelpersExtends({}, props, {
|
|
315
|
-
labelElementType: 'span'
|
|
316
|
-
}));
|
|
317
|
-
let groupProps = $e62c7e96a53f216814557ded9a8cf$export$useDatePickerGroup(state, ref);
|
|
318
|
-
let {
|
|
319
|
-
focusWithinProps
|
|
320
|
-
} = useFocusWithin({
|
|
321
|
-
onBlurWithin() {
|
|
322
|
-
state.confirmPlaceholder();
|
|
323
|
-
}
|
|
324
60
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
month: 'long'
|
|
328
|
-
}));
|
|
329
|
-
let descProps = useDescription(state.value ? formatter.format(state.dateValue) : null);
|
|
330
|
-
let segmentLabelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
331
|
-
let describedBy = [descProps['aria-describedby'], fieldProps['aria-describedby']].filter(Boolean).join(' ') || undefined;
|
|
332
|
-
labelIds.set(state, {
|
|
333
|
-
ariaLabelledBy: segmentLabelledBy,
|
|
334
|
-
ariaDescribedBy: describedBy
|
|
335
|
-
});
|
|
336
|
-
return {
|
|
337
|
-
labelProps: _babelRuntimeHelpersExtends({}, labelProps, {
|
|
338
|
-
onClick: () => {
|
|
339
|
-
let focusManager = createFocusManager(ref);
|
|
340
|
-
focusManager.focusFirst();
|
|
341
|
-
}
|
|
342
|
-
}),
|
|
343
|
-
fieldProps: mergeProps(fieldProps, descProps, groupProps, focusWithinProps, {
|
|
344
|
-
role: 'group',
|
|
345
|
-
'aria-disabled': props.isDisabled || undefined,
|
|
346
|
-
'aria-describedby': describedBy
|
|
347
|
-
}),
|
|
348
|
-
descriptionProps,
|
|
349
|
-
errorMessageProps
|
|
350
|
-
};
|
|
351
|
-
}
|
|
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\":\"ζώνη ώρας\"}");
|
|
352
63
|
|
|
353
|
-
exports.useDateField = useDateField;
|
|
354
|
-
|
|
355
|
-
/*
|
|
356
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
357
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
358
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
359
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
360
|
-
*
|
|
361
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
362
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
363
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
364
|
-
* governing permissions and limitations under the License.
|
|
365
|
-
*/
|
|
366
|
-
// @ts-ignore
|
|
367
|
-
const $c1a8bb7b70528f3f1285786fdf18b77$var$intlMessages = {
|
|
368
|
-
"ar-AE": _babelRuntimeHelpersInteropRequireDefault($be926026280e076dd0b048671d4b$exports).default,
|
|
369
|
-
"bg-BG": _babelRuntimeHelpersInteropRequireDefault($bab398828901e91cda5ace996e16743$exports).default,
|
|
370
|
-
"cs-CZ": _babelRuntimeHelpersInteropRequireDefault($a1b39c1203bddacb07ac8af1bf09f93d$exports).default,
|
|
371
|
-
"da-DK": _babelRuntimeHelpersInteropRequireDefault($de6d54fc6253e3aab217ab66cc92632$exports).default,
|
|
372
|
-
"de-DE": _babelRuntimeHelpersInteropRequireDefault($c62d85e73a4bc4d2d79c4e5438a0a3$exports).default,
|
|
373
|
-
"el-GR": _babelRuntimeHelpersInteropRequireDefault($e7f2c17a4d052730760575ff7cf57df6$exports).default,
|
|
374
|
-
"en-US": _babelRuntimeHelpersInteropRequireDefault($adfdcb0b7f4822eaafecdabf45f751$exports).default,
|
|
375
|
-
"es-ES": _babelRuntimeHelpersInteropRequireDefault($f9c516e0c25716b7d567ed2$exports).default,
|
|
376
|
-
"et-EE": _babelRuntimeHelpersInteropRequireDefault($ba7274e4009469f7b66a9c93516dc421$exports).default,
|
|
377
|
-
"fi-FI": _babelRuntimeHelpersInteropRequireDefault($c64b2869d31111b8a6212d3569c46edc$exports).default,
|
|
378
|
-
"fr-FR": _babelRuntimeHelpersInteropRequireDefault($ba1e9adecce613badde3f8b2a91b9$exports).default,
|
|
379
|
-
"he-IL": _babelRuntimeHelpersInteropRequireDefault($da5d80bcf16af82fe7b14fc1e9d9$exports).default,
|
|
380
|
-
"hr-HR": _babelRuntimeHelpersInteropRequireDefault($c179e9a34711caa46568a537c351781$exports).default,
|
|
381
|
-
"hu-HU": _babelRuntimeHelpersInteropRequireDefault($a40a6dd4cfb1bd1de71f82470d8716$exports).default,
|
|
382
|
-
"it-IT": _babelRuntimeHelpersInteropRequireDefault($b9be9a4b72f2aadd1d314520c1acfc$exports).default,
|
|
383
|
-
"ja-JP": _babelRuntimeHelpersInteropRequireDefault($b41d870af1ac3496d01f8698fb5c954$exports).default,
|
|
384
|
-
"ko-KR": _babelRuntimeHelpersInteropRequireDefault($fe0c574bf48312400dd82a37538c16ef$exports).default,
|
|
385
|
-
"lt-LT": _babelRuntimeHelpersInteropRequireDefault($b0ad35113dfe9f264970b85837$exports).default,
|
|
386
|
-
"lv-LV": _babelRuntimeHelpersInteropRequireDefault($c670847f13ef745cf51c4d927173b$exports).default,
|
|
387
|
-
"nb-NO": _babelRuntimeHelpersInteropRequireDefault($d59ad4442794aa8d7415835505965b2$exports).default,
|
|
388
|
-
"nl-NL": _babelRuntimeHelpersInteropRequireDefault($ea0bd7fd22f4939550fa7411df8295f2$exports).default,
|
|
389
|
-
"pl-PL": _babelRuntimeHelpersInteropRequireDefault($c08613207efc8ea834b1fadda995620b$exports).default,
|
|
390
|
-
"pt-BR": _babelRuntimeHelpersInteropRequireDefault($c53c2ff9b6580a8da286c11a97f27c0c$exports).default,
|
|
391
|
-
"pt-PT": _babelRuntimeHelpersInteropRequireDefault($d9eb517021c8b3bace06723f935$exports).default,
|
|
392
|
-
"ro-RO": _babelRuntimeHelpersInteropRequireDefault($b374a5303a356023e59a4df3c152bebf$exports).default,
|
|
393
|
-
"ru-RU": _babelRuntimeHelpersInteropRequireDefault($e72056058c9fa1ea634cd2d7f7700$exports).default,
|
|
394
|
-
"sk-SK": _babelRuntimeHelpersInteropRequireDefault($ab8e21cbc487e19c15c39cc2df98aed6$exports).default,
|
|
395
|
-
"sl-SI": _babelRuntimeHelpersInteropRequireDefault($a155de298a83a5c6e328091b4347a$exports).default,
|
|
396
|
-
"sr-SP": _babelRuntimeHelpersInteropRequireDefault($f93e8a2d2993e66b87975762a481$exports).default,
|
|
397
|
-
"sv-SE": _babelRuntimeHelpersInteropRequireDefault($d90bf5621eeb550e11f07fd645ee9375$exports).default,
|
|
398
|
-
"tr-TR": _babelRuntimeHelpersInteropRequireDefault($aa582d9ff36fb511de0ccb22bd9e2bb$exports).default,
|
|
399
|
-
"uk-UA": _babelRuntimeHelpersInteropRequireDefault($a1ed5505308b04ac9cd1c488538019c3$exports).default,
|
|
400
|
-
"zh-CN": _babelRuntimeHelpersInteropRequireDefault($c6b9bcbebc7c1f385b7e70bbd744b53$exports).default,
|
|
401
|
-
"zh-TW": _babelRuntimeHelpersInteropRequireDefault($ae51b3cde9961c4855b77ac499ea$exports).default
|
|
402
|
-
};
|
|
403
64
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
locale
|
|
407
|
-
} = useLocale();
|
|
408
|
-
return useMemo(() => {
|
|
409
|
-
// Try to use Intl.DisplayNames if possible. It may be supported in browsers, but not support the dateTimeField
|
|
410
|
-
// type as that was only added in v2. https://github.com/tc39/intl-displaynames-v2
|
|
411
|
-
try {
|
|
412
|
-
// @ts-ignore
|
|
413
|
-
return new Intl.DisplayNames(locale, {
|
|
414
|
-
type: 'dateTimeField'
|
|
415
|
-
});
|
|
416
|
-
} catch (err) {
|
|
417
|
-
return new $c1a8bb7b70528f3f1285786fdf18b77$var$DisplayNamesPolyfill(locale);
|
|
418
|
-
}
|
|
419
|
-
}, [locale]);
|
|
420
|
-
}
|
|
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\"}");
|
|
421
67
|
|
|
422
|
-
exports.useDisplayNames = useDisplayNames;
|
|
423
68
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
this.locale = void 0;
|
|
427
|
-
this.dictionary = void 0;
|
|
428
|
-
this.locale = locale;
|
|
429
|
-
this.dictionary = new MessageDictionary($c1a8bb7b70528f3f1285786fdf18b77$var$intlMessages);
|
|
430
|
-
}
|
|
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\"}");
|
|
431
71
|
|
|
432
|
-
of(field) {
|
|
433
|
-
return this.dictionary.getStringForLocale(field, this.locale);
|
|
434
|
-
}
|
|
435
72
|
|
|
436
|
-
}
|
|
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\"}");
|
|
437
75
|
|
|
438
|
-
function useDateSegment(props, segment, state, ref) {
|
|
439
|
-
let enteredKeys = useRef('');
|
|
440
|
-
let {
|
|
441
|
-
locale,
|
|
442
|
-
direction
|
|
443
|
-
} = useLocale();
|
|
444
|
-
let displayNames = useDisplayNames();
|
|
445
|
-
let focusManager = useFocusManager();
|
|
446
|
-
let textValue = segment.text;
|
|
447
|
-
let options = useMemo(() => state.dateFormatter.resolvedOptions(), [state.dateFormatter]);
|
|
448
|
-
let monthDateFormatter = useDateFormatter({
|
|
449
|
-
month: 'long',
|
|
450
|
-
timeZone: options.timeZone
|
|
451
|
-
});
|
|
452
|
-
let hourDateFormatter = useDateFormatter({
|
|
453
|
-
hour: 'numeric',
|
|
454
|
-
hour12: options.hour12,
|
|
455
|
-
timeZone: options.timeZone
|
|
456
|
-
});
|
|
457
76
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
textValue = monthTextValue !== textValue ? textValue + " \u2013 " + monthTextValue : monthTextValue;
|
|
461
|
-
} else if (segment.type === 'hour' || segment.type === 'dayPeriod') {
|
|
462
|
-
textValue = hourDateFormatter.format(state.dateValue);
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
let {
|
|
466
|
-
spinButtonProps
|
|
467
|
-
} = useSpinButton({
|
|
468
|
-
value: segment.value,
|
|
469
|
-
textValue,
|
|
470
|
-
minValue: segment.minValue,
|
|
471
|
-
maxValue: segment.maxValue,
|
|
472
|
-
isDisabled: props.isDisabled,
|
|
473
|
-
isReadOnly: props.isReadOnly || !segment.isEditable,
|
|
474
|
-
isRequired: props.isRequired,
|
|
475
|
-
onIncrement: () => {
|
|
476
|
-
enteredKeys.current = '';
|
|
477
|
-
state.increment(segment.type);
|
|
478
|
-
},
|
|
479
|
-
onDecrement: () => {
|
|
480
|
-
enteredKeys.current = '';
|
|
481
|
-
state.decrement(segment.type);
|
|
482
|
-
},
|
|
483
|
-
onIncrementPage: () => {
|
|
484
|
-
enteredKeys.current = '';
|
|
485
|
-
state.incrementPage(segment.type);
|
|
486
|
-
},
|
|
487
|
-
onDecrementPage: () => {
|
|
488
|
-
enteredKeys.current = '';
|
|
489
|
-
state.decrementPage(segment.type);
|
|
490
|
-
},
|
|
491
|
-
onIncrementToMax: () => {
|
|
492
|
-
enteredKeys.current = '';
|
|
493
|
-
state.setSegment(segment.type, segment.maxValue);
|
|
494
|
-
},
|
|
495
|
-
onDecrementToMin: () => {
|
|
496
|
-
enteredKeys.current = '';
|
|
497
|
-
state.setSegment(segment.type, segment.minValue);
|
|
498
|
-
}
|
|
499
|
-
});
|
|
500
|
-
let parser = useMemo(() => new NumberParser(locale, {
|
|
501
|
-
maximumFractionDigits: 0
|
|
502
|
-
}), [locale]);
|
|
503
|
-
|
|
504
|
-
let backspace = () => {
|
|
505
|
-
if (parser.isValidPartialNumber(segment.text) && !props.isReadOnly && !segment.isPlaceholder) {
|
|
506
|
-
let newValue = segment.text.slice(0, -1);
|
|
507
|
-
let parsed = parser.parse(newValue);
|
|
508
|
-
|
|
509
|
-
if (newValue.length === 0 || parsed === 0) {
|
|
510
|
-
state.clearSegment(segment.type);
|
|
511
|
-
} else {
|
|
512
|
-
state.setSegment(segment.type, parsed);
|
|
513
|
-
}
|
|
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\"}");
|
|
514
79
|
|
|
515
|
-
enteredKeys.current = newValue;
|
|
516
|
-
} else if (segment.type === 'dayPeriod') {
|
|
517
|
-
state.clearSegment(segment.type);
|
|
518
|
-
}
|
|
519
|
-
};
|
|
520
80
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
// https://bugzilla.mozilla.org/show_bug.cgi?id=1742153
|
|
524
|
-
if (e.key === 'a' && (isMac() ? e.metaKey : e.ctrlKey)) {
|
|
525
|
-
e.preventDefault();
|
|
526
|
-
}
|
|
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\"}");
|
|
527
83
|
|
|
528
|
-
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) {
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
84
|
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
e.preventDefault();
|
|
535
|
-
e.stopPropagation();
|
|
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\":\"אזור זמן\"}");
|
|
536
87
|
|
|
537
|
-
if (direction === 'rtl') {
|
|
538
|
-
focusManager.focusNext();
|
|
539
|
-
} else {
|
|
540
|
-
focusManager.focusPrevious();
|
|
541
|
-
}
|
|
542
88
|
|
|
543
|
-
|
|
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\"}");
|
|
544
91
|
|
|
545
|
-
case 'ArrowRight':
|
|
546
|
-
e.preventDefault();
|
|
547
|
-
e.stopPropagation();
|
|
548
92
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
} else {
|
|
552
|
-
focusManager.focusNext();
|
|
553
|
-
}
|
|
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\"}");
|
|
554
95
|
|
|
555
|
-
break;
|
|
556
96
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
e.stopPropagation();
|
|
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\"}");
|
|
560
99
|
|
|
561
|
-
if (segment.isPlaceholder && !props.isReadOnly) {
|
|
562
|
-
state.confirmPlaceholder(segment.type);
|
|
563
|
-
}
|
|
564
100
|
|
|
565
|
-
|
|
566
|
-
|
|
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\":\"タイムゾーン\"}");
|
|
567
103
|
|
|
568
|
-
case 'Tab':
|
|
569
|
-
break;
|
|
570
104
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
{
|
|
574
|
-
// Safari on iOS does not fire beforeinput for the backspace key because the cursor is at the start.
|
|
575
|
-
e.preventDefault();
|
|
576
|
-
e.stopPropagation();
|
|
577
|
-
backspace();
|
|
578
|
-
break;
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
}; // Safari dayPeriod option doesn't work...
|
|
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\":\"시간대\"}");
|
|
582
107
|
|
|
583
108
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
} = useFilter({
|
|
587
|
-
sensitivity: 'base'
|
|
588
|
-
});
|
|
589
|
-
let amPmFormatter = useDateFormatter({
|
|
590
|
-
hour: 'numeric',
|
|
591
|
-
hour12: true
|
|
592
|
-
});
|
|
593
|
-
let am = useMemo(() => {
|
|
594
|
-
let date = new Date();
|
|
595
|
-
date.setHours(0);
|
|
596
|
-
return amPmFormatter.formatToParts(date).find(part => part.type === 'dayPeriod').value;
|
|
597
|
-
}, [amPmFormatter]);
|
|
598
|
-
let pm = useMemo(() => {
|
|
599
|
-
let date = new Date();
|
|
600
|
-
date.setHours(12);
|
|
601
|
-
return amPmFormatter.formatToParts(date).find(part => part.type === 'dayPeriod').value;
|
|
602
|
-
}, [amPmFormatter]);
|
|
603
|
-
|
|
604
|
-
let onInput = key => {
|
|
605
|
-
if (props.isDisabled || props.isReadOnly) {
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
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\"}");
|
|
608
111
|
|
|
609
|
-
let newValue = enteredKeys.current + key;
|
|
610
112
|
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
if (startsWith(am, key)) {
|
|
614
|
-
state.setSegment('dayPeriod', 0);
|
|
615
|
-
} else if (startsWith(pm, key)) {
|
|
616
|
-
state.setSegment('dayPeriod', 12);
|
|
617
|
-
} else {
|
|
618
|
-
break;
|
|
619
|
-
}
|
|
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\"}");
|
|
620
115
|
|
|
621
|
-
focusManager.focusNext();
|
|
622
|
-
break;
|
|
623
|
-
|
|
624
|
-
case 'day':
|
|
625
|
-
case 'hour':
|
|
626
|
-
case 'minute':
|
|
627
|
-
case 'second':
|
|
628
|
-
case 'month':
|
|
629
|
-
case 'year':
|
|
630
|
-
{
|
|
631
|
-
if (!parser.isValidPartialNumber(newValue)) {
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
|
|
635
|
-
let numberValue = parser.parse(newValue);
|
|
636
|
-
let segmentValue = numberValue;
|
|
637
|
-
let allowsZero = segment.minValue === 0;
|
|
638
|
-
|
|
639
|
-
if (segment.type === 'hour' && state.dateFormatter.resolvedOptions().hour12) {
|
|
640
|
-
switch (state.dateFormatter.resolvedOptions().hourCycle) {
|
|
641
|
-
case 'h11':
|
|
642
|
-
if (numberValue > 11) {
|
|
643
|
-
segmentValue = parser.parse(key);
|
|
644
|
-
}
|
|
645
116
|
|
|
646
|
-
|
|
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\"}");
|
|
647
119
|
|
|
648
|
-
case 'h12':
|
|
649
|
-
allowsZero = false;
|
|
650
120
|
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
}
|
|
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\"}");
|
|
654
123
|
|
|
655
|
-
break;
|
|
656
|
-
}
|
|
657
124
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
}
|
|
661
|
-
} else if (numberValue > segment.maxValue) {
|
|
662
|
-
segmentValue = parser.parse(key);
|
|
663
|
-
}
|
|
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\"}");
|
|
664
127
|
|
|
665
|
-
if (isNaN(numberValue)) {
|
|
666
|
-
return;
|
|
667
|
-
}
|
|
668
128
|
|
|
669
|
-
|
|
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\"}");
|
|
131
|
+
|
|
132
|
+
|
|
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\"}");
|
|
135
|
+
|
|
136
|
+
|
|
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\"}");
|
|
139
|
+
|
|
140
|
+
|
|
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\":\"часовой пояс\"}");
|
|
143
|
+
|
|
144
|
+
|
|
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\"}");
|
|
147
|
+
|
|
148
|
+
|
|
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\"}");
|
|
151
|
+
|
|
152
|
+
|
|
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\":\"временска зона\"}");
|
|
155
|
+
|
|
156
|
+
|
|
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\"}");
|
|
159
|
+
|
|
160
|
+
|
|
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\"}");
|
|
163
|
+
|
|
164
|
+
|
|
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\":\"часовий пояс\"}");
|
|
167
|
+
|
|
168
|
+
|
|
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\":\"时区\"}");
|
|
171
|
+
|
|
172
|
+
|
|
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\":\"时区\"}");
|
|
175
|
+
|
|
176
|
+
|
|
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
|
|
212
|
+
};
|
|
670
213
|
|
|
671
|
-
if (shouldSetValue) {
|
|
672
|
-
state.setSegment(segment.type, segmentValue);
|
|
673
|
-
}
|
|
674
214
|
|
|
675
|
-
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
676
|
-
enteredKeys.current = '';
|
|
677
215
|
|
|
678
|
-
if (shouldSetValue) {
|
|
679
|
-
focusManager.focusNext();
|
|
680
|
-
}
|
|
681
|
-
} else {
|
|
682
|
-
enteredKeys.current = newValue;
|
|
683
|
-
}
|
|
684
216
|
|
|
685
|
-
break;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
};
|
|
689
217
|
|
|
690
|
-
let onFocus = () => {
|
|
691
|
-
enteredKeys.current = '';
|
|
692
|
-
scrollIntoView(getScrollParent(ref.current), ref.current); // Safari requires that a selection is set or it won't fire input events.
|
|
693
|
-
// Since usePress disables text selection, this won't happen by default.
|
|
694
218
|
|
|
695
|
-
ref.current.style.webkitUserSelect = 'text';
|
|
696
|
-
let selection = window.getSelection();
|
|
697
|
-
selection.collapse(ref.current);
|
|
698
|
-
ref.current.style.webkitUserSelect = '';
|
|
699
|
-
};
|
|
700
219
|
|
|
701
|
-
let compositionRef = useRef(''); // @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
702
220
|
|
|
703
|
-
useEvent(ref, 'beforeinput', e => {
|
|
704
|
-
e.preventDefault();
|
|
705
221
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
if (
|
|
710
|
-
|
|
222
|
+
function $715562ad3b4cced4$export$4a931266a3838b86(state, ref1) {
|
|
223
|
+
// Open the popover on alt + arrow down
|
|
224
|
+
let onKeyDown = (e)=>{
|
|
225
|
+
if (e.altKey && (e.key === 'ArrowDown' || e.key === 'ArrowUp') && 'setOpen' in state) {
|
|
226
|
+
e.preventDefault();
|
|
227
|
+
e.stopPropagation();
|
|
228
|
+
state.setOpen(true);
|
|
711
229
|
}
|
|
230
|
+
};
|
|
231
|
+
// Focus the first placeholder segment from the end on mouse down/touch up in the field.
|
|
232
|
+
let focusLast = ()=>{
|
|
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();
|
|
258
|
+
};
|
|
259
|
+
let { pressProps: pressProps } = $IwcIq$reactariainteractions.usePress({
|
|
260
|
+
onPressStart (e) {
|
|
261
|
+
if (e.pointerType === 'mouse') focusLast();
|
|
262
|
+
},
|
|
263
|
+
onPress (e) {
|
|
264
|
+
if (e.pointerType !== 'mouse') focusLast();
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
return $IwcIq$reactariautils.mergeProps(pressProps, {
|
|
268
|
+
onKeyDown: onKeyDown
|
|
269
|
+
});
|
|
270
|
+
}
|
|
712
271
|
|
|
713
|
-
break;
|
|
714
272
|
|
|
715
|
-
case 'insertCompositionText':
|
|
716
|
-
// insertCompositionText cannot be canceled.
|
|
717
|
-
// Record the current state of the element so we can restore it in the `input` event below.
|
|
718
|
-
compositionRef.current = ref.current.textContent; // Safari gets stuck in a composition state unless we also assign to the value here.
|
|
719
|
-
// eslint-disable-next-line no-self-assign
|
|
720
273
|
|
|
721
|
-
ref.current.textContent = ref.current.textContent;
|
|
722
|
-
break;
|
|
723
274
|
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
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({
|
|
280
|
+
...props,
|
|
281
|
+
labelElementType: 'span'
|
|
282
|
+
});
|
|
283
|
+
let groupProps = $715562ad3b4cced4$export$4a931266a3838b86(state, ref);
|
|
284
|
+
let { focusWithinProps: focusWithinProps } = $IwcIq$reactariainteractions.useFocusWithin({
|
|
285
|
+
onBlurWithin () {
|
|
286
|
+
state.confirmPlaceholder();
|
|
727
287
|
}
|
|
288
|
+
});
|
|
289
|
+
let descProps = $IwcIq$reactariautils.useDescription(state.formatValue({
|
|
290
|
+
month: 'long'
|
|
291
|
+
}));
|
|
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'] : [
|
|
295
|
+
descProps['aria-describedby'],
|
|
296
|
+
fieldProps['aria-describedby']
|
|
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
|
+
]);
|
|
334
|
+
return {
|
|
335
|
+
labelProps: {
|
|
336
|
+
...labelProps,
|
|
337
|
+
onClick: ()=>{
|
|
338
|
+
focusManager.focusFirst();
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
fieldProps: $IwcIq$reactariautils.mergeProps(fieldDOMProps, groupProps, focusWithinProps),
|
|
342
|
+
descriptionProps: descriptionProps,
|
|
343
|
+
errorMessageProps: errorMessageProps
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
function $4acc2f407c169e55$export$4c842f6a241dc825(props, state, ref) {
|
|
347
|
+
return $4acc2f407c169e55$export$5591b0b878c1a989(props, state, ref);
|
|
348
|
+
}
|
|
728
349
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
|
|
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({
|
|
359
|
+
...props,
|
|
360
|
+
labelElementType: 'span'
|
|
361
|
+
});
|
|
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, {
|
|
366
|
+
month: 'long'
|
|
367
|
+
}));
|
|
368
|
+
let ariaDescribedBy = [
|
|
369
|
+
descProps['aria-describedby'],
|
|
370
|
+
fieldProps['aria-describedby']
|
|
371
|
+
].filter(Boolean).join(' ') || undefined;
|
|
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
|
+
}),
|
|
379
|
+
labelProps: {
|
|
380
|
+
...labelProps,
|
|
381
|
+
onClick: ()=>{
|
|
382
|
+
let focusManager = $IwcIq$reactariafocus.createFocusManager(ref);
|
|
383
|
+
focusManager.focusFirst();
|
|
384
|
+
}
|
|
385
|
+
},
|
|
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
|
+
},
|
|
404
|
+
descriptionProps: descriptionProps,
|
|
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
|
|
746
430
|
}
|
|
431
|
+
};
|
|
432
|
+
}
|
|
747
433
|
|
|
748
|
-
break;
|
|
749
|
-
}
|
|
750
|
-
}); // Focus on mouse down/touch up to match native textfield behavior.
|
|
751
|
-
// usePress handles canceling text selection.
|
|
752
|
-
|
|
753
|
-
let {
|
|
754
|
-
pressProps
|
|
755
|
-
} = usePress({
|
|
756
|
-
preventFocusOnPress: true,
|
|
757
|
-
onPressStart: e => {
|
|
758
|
-
if (e.pointerType === 'mouse') {
|
|
759
|
-
e.target.focus();
|
|
760
|
-
}
|
|
761
|
-
},
|
|
762
434
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
var $934ac650a0aceb4b$exports = {};
|
|
441
|
+
|
|
442
|
+
$parcel$export($934ac650a0aceb4b$exports, "useDisplayNames", () => $934ac650a0aceb4b$export$d42c60378c8168f8);
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
function $934ac650a0aceb4b$export$d42c60378c8168f8() {
|
|
448
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
449
|
+
return $IwcIq$react.useMemo(()=>{
|
|
450
|
+
// Try to use Intl.DisplayNames if possible. It may be supported in browsers, but not support the dateTimeField
|
|
451
|
+
// type as that was only added in v2. https://github.com/tc39/intl-displaynames-v2
|
|
452
|
+
try {
|
|
453
|
+
// @ts-ignore
|
|
454
|
+
return new Intl.DisplayNames(locale, {
|
|
455
|
+
type: 'dateTimeField'
|
|
456
|
+
});
|
|
457
|
+
} catch (err) {
|
|
458
|
+
return new $934ac650a0aceb4b$var$DisplayNamesPolyfill(locale);
|
|
459
|
+
}
|
|
460
|
+
}, [
|
|
461
|
+
locale
|
|
462
|
+
]);
|
|
463
|
+
}
|
|
464
|
+
class $934ac650a0aceb4b$var$DisplayNamesPolyfill {
|
|
465
|
+
of(field) {
|
|
466
|
+
return this.dictionary.getStringForLocale(field, this.locale);
|
|
767
467
|
}
|
|
468
|
+
constructor(locale){
|
|
469
|
+
this.locale = locale;
|
|
470
|
+
this.dictionary = new $IwcIq$internationalizedmessage.MessageDictionary((/*@__PURE__*/$parcel$interopDefault($c7d0e80b992ca68a$exports)));
|
|
471
|
+
}
|
|
472
|
+
}
|
|
768
473
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
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);
|
|
482
|
+
let textValue = segment.text;
|
|
483
|
+
let options = $IwcIq$react.useMemo(()=>state.dateFormatter.resolvedOptions()
|
|
484
|
+
, [
|
|
485
|
+
state.dateFormatter
|
|
486
|
+
]);
|
|
487
|
+
let monthDateFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
488
|
+
month: 'long',
|
|
489
|
+
timeZone: options.timeZone
|
|
490
|
+
});
|
|
491
|
+
let hourDateFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
492
|
+
hour: 'numeric',
|
|
493
|
+
hour12: options.hour12,
|
|
494
|
+
timeZone: options.timeZone
|
|
495
|
+
});
|
|
496
|
+
if (segment.type === 'month') {
|
|
497
|
+
let monthTextValue = monthDateFormatter.format(state.dateValue);
|
|
498
|
+
textValue = monthTextValue !== textValue ? `${textValue} – ${monthTextValue}` : monthTextValue;
|
|
499
|
+
} else if (segment.type === 'hour') textValue = hourDateFormatter.format(state.dateValue);
|
|
500
|
+
let { spinButtonProps: spinButtonProps } = $IwcIq$reactariaspinbutton.useSpinButton({
|
|
501
|
+
value: segment.value,
|
|
502
|
+
textValue: textValue,
|
|
503
|
+
minValue: segment.minValue,
|
|
504
|
+
maxValue: segment.maxValue,
|
|
505
|
+
isDisabled: state.isDisabled,
|
|
506
|
+
isReadOnly: state.isReadOnly || !segment.isEditable,
|
|
507
|
+
isRequired: state.isRequired,
|
|
508
|
+
onIncrement: ()=>{
|
|
509
|
+
enteredKeys.current = '';
|
|
510
|
+
state.increment(segment.type);
|
|
511
|
+
},
|
|
512
|
+
onDecrement: ()=>{
|
|
513
|
+
enteredKeys.current = '';
|
|
514
|
+
state.decrement(segment.type);
|
|
515
|
+
},
|
|
516
|
+
onIncrementPage: ()=>{
|
|
517
|
+
enteredKeys.current = '';
|
|
518
|
+
state.incrementPage(segment.type);
|
|
519
|
+
},
|
|
520
|
+
onDecrementPage: ()=>{
|
|
521
|
+
enteredKeys.current = '';
|
|
522
|
+
state.decrementPage(segment.type);
|
|
523
|
+
},
|
|
524
|
+
onIncrementToMax: ()=>{
|
|
525
|
+
enteredKeys.current = '';
|
|
526
|
+
state.setSegment(segment.type, segment.maxValue);
|
|
527
|
+
},
|
|
528
|
+
onDecrementToMin: ()=>{
|
|
529
|
+
enteredKeys.current = '';
|
|
530
|
+
state.setSegment(segment.type, segment.minValue);
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
let parser = $IwcIq$react.useMemo(()=>new $IwcIq$internationalizednumber.NumberParser(locale, {
|
|
534
|
+
maximumFractionDigits: 0
|
|
535
|
+
})
|
|
536
|
+
, [
|
|
537
|
+
locale
|
|
538
|
+
]);
|
|
539
|
+
let backspace = ()=>{
|
|
540
|
+
if (parser.isValidPartialNumber(segment.text) && !state.isReadOnly && !segment.isPlaceholder) {
|
|
541
|
+
let newValue = segment.text.slice(0, -1);
|
|
542
|
+
let parsed = parser.parse(newValue);
|
|
543
|
+
if (newValue.length === 0 || parsed === 0) state.clearSegment(segment.type);
|
|
544
|
+
else state.setSegment(segment.type, parsed);
|
|
545
|
+
enteredKeys.current = newValue;
|
|
546
|
+
} else if (segment.type === 'dayPeriod') state.clearSegment(segment.type);
|
|
547
|
+
};
|
|
548
|
+
let onKeyDown = (e)=>{
|
|
549
|
+
// Firefox does not fire selectstart for Ctrl/Cmd + A
|
|
550
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1742153
|
|
551
|
+
if (e.key === 'a' && ($IwcIq$reactariautils.isMac() ? e.metaKey : e.ctrlKey)) e.preventDefault();
|
|
552
|
+
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey) return;
|
|
553
|
+
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
|
+
case 'Backspace':
|
|
585
|
+
case 'Delete':
|
|
586
|
+
// Safari on iOS does not fire beforeinput for the backspace key because the cursor is at the start.
|
|
587
|
+
e.preventDefault();
|
|
588
|
+
e.stopPropagation();
|
|
589
|
+
backspace();
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
};
|
|
593
|
+
// Safari dayPeriod option doesn't work...
|
|
594
|
+
let { startsWith: startsWith } = $IwcIq$reactariai18n.useFilter({
|
|
595
|
+
sensitivity: 'base'
|
|
596
|
+
});
|
|
597
|
+
let amPmFormatter = $IwcIq$reactariai18n.useDateFormatter({
|
|
598
|
+
hour: 'numeric',
|
|
599
|
+
hour12: true
|
|
600
|
+
});
|
|
601
|
+
let am = $IwcIq$react.useMemo(()=>{
|
|
602
|
+
let date = new Date();
|
|
603
|
+
date.setHours(0);
|
|
604
|
+
return amPmFormatter.formatToParts(date).find((part)=>part.type === 'dayPeriod'
|
|
605
|
+
).value;
|
|
606
|
+
}, [
|
|
607
|
+
amPmFormatter
|
|
608
|
+
]);
|
|
609
|
+
let pm = $IwcIq$react.useMemo(()=>{
|
|
610
|
+
let date = new Date();
|
|
611
|
+
date.setHours(12);
|
|
612
|
+
return amPmFormatter.formatToParts(date).find((part)=>part.type === 'dayPeriod'
|
|
613
|
+
).value;
|
|
614
|
+
}, [
|
|
615
|
+
amPmFormatter
|
|
616
|
+
]);
|
|
617
|
+
let onInput = (key)=>{
|
|
618
|
+
if (state.isDisabled || state.isReadOnly) return;
|
|
619
|
+
let newValue = enteredKeys.current + key;
|
|
620
|
+
switch(segment.type){
|
|
621
|
+
case 'dayPeriod':
|
|
622
|
+
if (startsWith(am, key)) state.setSegment('dayPeriod', 0);
|
|
623
|
+
else if (startsWith(pm, key)) state.setSegment('dayPeriod', 12);
|
|
624
|
+
else break;
|
|
625
|
+
focusManager.focusNext({
|
|
626
|
+
tabbable: true
|
|
627
|
+
});
|
|
628
|
+
break;
|
|
629
|
+
case 'day':
|
|
630
|
+
case 'hour':
|
|
631
|
+
case 'minute':
|
|
632
|
+
case 'second':
|
|
633
|
+
case 'month':
|
|
634
|
+
case 'year':
|
|
635
|
+
{
|
|
636
|
+
if (!parser.isValidPartialNumber(newValue)) return;
|
|
637
|
+
let numberValue = parser.parse(newValue);
|
|
638
|
+
let segmentValue = numberValue;
|
|
639
|
+
let allowsZero = segment.minValue === 0;
|
|
640
|
+
if (segment.type === 'hour' && state.dateFormatter.resolvedOptions().hour12) {
|
|
641
|
+
switch(state.dateFormatter.resolvedOptions().hourCycle){
|
|
642
|
+
case 'h11':
|
|
643
|
+
if (numberValue > 11) segmentValue = parser.parse(key);
|
|
644
|
+
break;
|
|
645
|
+
case 'h12':
|
|
646
|
+
allowsZero = false;
|
|
647
|
+
if (numberValue > 12) segmentValue = parser.parse(key);
|
|
648
|
+
break;
|
|
649
|
+
}
|
|
650
|
+
if (segment.value >= 12 && numberValue > 1) numberValue += 12;
|
|
651
|
+
} else if (numberValue > segment.maxValue) segmentValue = parser.parse(key);
|
|
652
|
+
if (isNaN(numberValue)) return;
|
|
653
|
+
let shouldSetValue = segmentValue !== 0 || allowsZero;
|
|
654
|
+
if (shouldSetValue) state.setSegment(segment.type, segmentValue);
|
|
655
|
+
if (Number(numberValue + '0') > segment.maxValue || newValue.length >= String(segment.maxValue).length) {
|
|
656
|
+
enteredKeys.current = '';
|
|
657
|
+
if (shouldSetValue) focusManager.focusNext({
|
|
658
|
+
tabbable: true
|
|
659
|
+
});
|
|
660
|
+
} else enteredKeys.current = newValue;
|
|
661
|
+
break;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
let onFocus = ()=>{
|
|
666
|
+
enteredKeys.current = '';
|
|
667
|
+
$IwcIq$reactariautils.scrollIntoView($IwcIq$reactariautils.getScrollParent(ref.current), ref.current);
|
|
668
|
+
// Safari requires that a selection is set or it won't fire input events.
|
|
669
|
+
// Since usePress disables text selection, this won't happen by default.
|
|
670
|
+
ref.current.style.webkitUserSelect = 'text';
|
|
671
|
+
let selection = window.getSelection();
|
|
672
|
+
selection.collapse(ref.current);
|
|
673
|
+
ref.current.style.webkitUserSelect = '';
|
|
674
|
+
};
|
|
675
|
+
let compositionRef = $IwcIq$react.useRef('');
|
|
676
|
+
// @ts-ignore - TODO: possibly old TS version? doesn't fail in my editor...
|
|
677
|
+
$IwcIq$reactariautils.useEvent(ref, 'beforeinput', (e)=>{
|
|
678
|
+
e.preventDefault();
|
|
679
|
+
switch(e.inputType){
|
|
680
|
+
case 'deleteContentBackward':
|
|
681
|
+
case 'deleteContentForward':
|
|
682
|
+
if (parser.isValidPartialNumber(segment.text) && !state.isReadOnly) backspace();
|
|
683
|
+
break;
|
|
684
|
+
case 'insertCompositionText':
|
|
685
|
+
// insertCompositionText cannot be canceled.
|
|
686
|
+
// Record the current state of the element so we can restore it in the `input` event below.
|
|
687
|
+
compositionRef.current = ref.current.textContent;
|
|
688
|
+
// Safari gets stuck in a composition state unless we also assign to the value here.
|
|
689
|
+
// eslint-disable-next-line no-self-assign
|
|
690
|
+
ref.current.textContent = ref.current.textContent;
|
|
691
|
+
break;
|
|
692
|
+
default:
|
|
693
|
+
if (e.data != null) onInput(e.data);
|
|
694
|
+
break;
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
$IwcIq$reactariautils.useEvent(ref, 'input', (e)=>{
|
|
698
|
+
let { inputType: inputType , data: data } = e;
|
|
699
|
+
switch(inputType){
|
|
700
|
+
case 'insertCompositionText':
|
|
701
|
+
// Reset the DOM to how it was in the beforeinput event.
|
|
702
|
+
ref.current.textContent = compositionRef.current;
|
|
703
|
+
// Android sometimes fires key presses of letters as composition events. Need to handle am/pm keys here too.
|
|
704
|
+
// Can also happen e.g. with Pinyin keyboard on iOS.
|
|
705
|
+
if (startsWith(am, data) || startsWith(pm, data)) onInput(data);
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
// Focus on mouse down/touch up to match native textfield behavior.
|
|
710
|
+
// usePress handles canceling text selection.
|
|
711
|
+
let { pressProps: pressProps } = $IwcIq$reactariainteractions.usePress({
|
|
712
|
+
preventFocusOnPress: true,
|
|
713
|
+
onPressStart: (e)=>{
|
|
714
|
+
if (e.pointerType === 'mouse') e.target.focus();
|
|
715
|
+
},
|
|
716
|
+
onPress (e) {
|
|
717
|
+
if (e.pointerType !== 'mouse') e.target.focus();
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
// For Android: prevent selection on long press.
|
|
721
|
+
$IwcIq$reactariautils.useEvent(ref, 'selectstart', (e)=>{
|
|
722
|
+
e.preventDefault();
|
|
723
|
+
});
|
|
724
|
+
// spinbuttons cannot be focused with VoiceOver on iOS.
|
|
725
|
+
let touchPropOverrides = $IwcIq$reactariautils.isIOS() || segment.type === 'timeZoneName' ? {
|
|
726
|
+
role: 'textbox',
|
|
727
|
+
'aria-valuemax': null,
|
|
728
|
+
'aria-valuemin': null,
|
|
729
|
+
'aria-valuetext': null,
|
|
730
|
+
'aria-valuenow': null
|
|
731
|
+
} : {
|
|
732
|
+
};
|
|
733
|
+
// Only apply aria-describedby to the first segment, unless the field is invalid. This avoids it being
|
|
734
|
+
// read every time the user navigates to a new segment.
|
|
735
|
+
let firstSegment = $IwcIq$react.useMemo(()=>state.segments.find((s)=>s.isEditable
|
|
736
|
+
)
|
|
737
|
+
, [
|
|
738
|
+
state.segments
|
|
739
|
+
]);
|
|
740
|
+
if (segment !== firstSegment && state.validationState !== 'invalid') ariaDescribedBy = undefined;
|
|
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
|
+
};
|
|
757
|
+
return {
|
|
758
|
+
segmentProps: $IwcIq$reactariautils.mergeProps(spinButtonProps, pressProps, labelProps, {
|
|
759
|
+
id: id,
|
|
760
|
+
...touchPropOverrides,
|
|
761
|
+
'aria-invalid': state.validationState === 'invalid' ? 'true' : undefined,
|
|
762
|
+
'aria-describedby': ariaDescribedBy,
|
|
763
|
+
'aria-placeholder': segment.isPlaceholder ? segment.text : undefined,
|
|
764
|
+
'aria-readonly': state.isReadOnly || !segment.isEditable ? 'true' : undefined,
|
|
765
|
+
contentEditable: isEditable,
|
|
766
|
+
suppressContentEditableWarning: isEditable,
|
|
767
|
+
spellCheck: isEditable ? 'false' : undefined,
|
|
768
|
+
autoCapitalize: isEditable ? 'off' : undefined,
|
|
769
|
+
autoCorrect: isEditable ? 'off' : undefined,
|
|
770
|
+
// Capitalization was changed in React 17...
|
|
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,
|
|
774
|
+
onKeyDown: onKeyDown,
|
|
775
|
+
onFocus: onFocus,
|
|
776
|
+
style: {
|
|
777
|
+
caretColor: 'transparent'
|
|
778
|
+
}
|
|
779
|
+
})
|
|
780
|
+
};
|
|
821
781
|
}
|
|
822
782
|
|
|
823
|
-
exports.useDateSegment = useDateSegment;
|
|
824
|
-
// @ts-ignore
|
|
825
|
-
const $ddcda6963a16ac7df68e63c656b9bc76$var$intlMessages = {
|
|
826
|
-
"ar-AE": _babelRuntimeHelpersInteropRequireDefault($be926026280e076dd0b048671d4b$exports).default,
|
|
827
|
-
"bg-BG": _babelRuntimeHelpersInteropRequireDefault($bab398828901e91cda5ace996e16743$exports).default,
|
|
828
|
-
"cs-CZ": _babelRuntimeHelpersInteropRequireDefault($a1b39c1203bddacb07ac8af1bf09f93d$exports).default,
|
|
829
|
-
"da-DK": _babelRuntimeHelpersInteropRequireDefault($de6d54fc6253e3aab217ab66cc92632$exports).default,
|
|
830
|
-
"de-DE": _babelRuntimeHelpersInteropRequireDefault($c62d85e73a4bc4d2d79c4e5438a0a3$exports).default,
|
|
831
|
-
"el-GR": _babelRuntimeHelpersInteropRequireDefault($e7f2c17a4d052730760575ff7cf57df6$exports).default,
|
|
832
|
-
"en-US": _babelRuntimeHelpersInteropRequireDefault($adfdcb0b7f4822eaafecdabf45f751$exports).default,
|
|
833
|
-
"es-ES": _babelRuntimeHelpersInteropRequireDefault($f9c516e0c25716b7d567ed2$exports).default,
|
|
834
|
-
"et-EE": _babelRuntimeHelpersInteropRequireDefault($ba7274e4009469f7b66a9c93516dc421$exports).default,
|
|
835
|
-
"fi-FI": _babelRuntimeHelpersInteropRequireDefault($c64b2869d31111b8a6212d3569c46edc$exports).default,
|
|
836
|
-
"fr-FR": _babelRuntimeHelpersInteropRequireDefault($ba1e9adecce613badde3f8b2a91b9$exports).default,
|
|
837
|
-
"he-IL": _babelRuntimeHelpersInteropRequireDefault($da5d80bcf16af82fe7b14fc1e9d9$exports).default,
|
|
838
|
-
"hr-HR": _babelRuntimeHelpersInteropRequireDefault($c179e9a34711caa46568a537c351781$exports).default,
|
|
839
|
-
"hu-HU": _babelRuntimeHelpersInteropRequireDefault($a40a6dd4cfb1bd1de71f82470d8716$exports).default,
|
|
840
|
-
"it-IT": _babelRuntimeHelpersInteropRequireDefault($b9be9a4b72f2aadd1d314520c1acfc$exports).default,
|
|
841
|
-
"ja-JP": _babelRuntimeHelpersInteropRequireDefault($b41d870af1ac3496d01f8698fb5c954$exports).default,
|
|
842
|
-
"ko-KR": _babelRuntimeHelpersInteropRequireDefault($fe0c574bf48312400dd82a37538c16ef$exports).default,
|
|
843
|
-
"lt-LT": _babelRuntimeHelpersInteropRequireDefault($b0ad35113dfe9f264970b85837$exports).default,
|
|
844
|
-
"lv-LV": _babelRuntimeHelpersInteropRequireDefault($c670847f13ef745cf51c4d927173b$exports).default,
|
|
845
|
-
"nb-NO": _babelRuntimeHelpersInteropRequireDefault($d59ad4442794aa8d7415835505965b2$exports).default,
|
|
846
|
-
"nl-NL": _babelRuntimeHelpersInteropRequireDefault($ea0bd7fd22f4939550fa7411df8295f2$exports).default,
|
|
847
|
-
"pl-PL": _babelRuntimeHelpersInteropRequireDefault($c08613207efc8ea834b1fadda995620b$exports).default,
|
|
848
|
-
"pt-BR": _babelRuntimeHelpersInteropRequireDefault($c53c2ff9b6580a8da286c11a97f27c0c$exports).default,
|
|
849
|
-
"pt-PT": _babelRuntimeHelpersInteropRequireDefault($d9eb517021c8b3bace06723f935$exports).default,
|
|
850
|
-
"ro-RO": _babelRuntimeHelpersInteropRequireDefault($b374a5303a356023e59a4df3c152bebf$exports).default,
|
|
851
|
-
"ru-RU": _babelRuntimeHelpersInteropRequireDefault($e72056058c9fa1ea634cd2d7f7700$exports).default,
|
|
852
|
-
"sk-SK": _babelRuntimeHelpersInteropRequireDefault($ab8e21cbc487e19c15c39cc2df98aed6$exports).default,
|
|
853
|
-
"sl-SI": _babelRuntimeHelpersInteropRequireDefault($a155de298a83a5c6e328091b4347a$exports).default,
|
|
854
|
-
"sr-SP": _babelRuntimeHelpersInteropRequireDefault($f93e8a2d2993e66b87975762a481$exports).default,
|
|
855
|
-
"sv-SE": _babelRuntimeHelpersInteropRequireDefault($d90bf5621eeb550e11f07fd645ee9375$exports).default,
|
|
856
|
-
"tr-TR": _babelRuntimeHelpersInteropRequireDefault($aa582d9ff36fb511de0ccb22bd9e2bb$exports).default,
|
|
857
|
-
"uk-UA": _babelRuntimeHelpersInteropRequireDefault($a1ed5505308b04ac9cd1c488538019c3$exports).default,
|
|
858
|
-
"zh-CN": _babelRuntimeHelpersInteropRequireDefault($c6b9bcbebc7c1f385b7e70bbd744b53$exports).default,
|
|
859
|
-
"zh-TW": _babelRuntimeHelpersInteropRequireDefault($ae51b3cde9961c4855b77ac499ea$exports).default
|
|
860
|
-
};
|
|
861
783
|
|
|
862
|
-
function useDateRangePicker(props, state, ref) {
|
|
863
|
-
let formatMessage = useMessageFormatter($ddcda6963a16ac7df68e63c656b9bc76$var$intlMessages);
|
|
864
|
-
let {
|
|
865
|
-
labelProps,
|
|
866
|
-
fieldProps,
|
|
867
|
-
descriptionProps,
|
|
868
|
-
errorMessageProps
|
|
869
|
-
} = useField(_babelRuntimeHelpersExtends({}, props, {
|
|
870
|
-
labelElementType: 'span'
|
|
871
|
-
}));
|
|
872
|
-
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
873
|
-
let {
|
|
874
|
-
locale
|
|
875
|
-
} = useLocale();
|
|
876
|
-
let description = state.formatValue(locale, {
|
|
877
|
-
month: 'long'
|
|
878
|
-
});
|
|
879
|
-
let descProps = useDescription(description);
|
|
880
|
-
let startFieldProps = useLabels({
|
|
881
|
-
'aria-label': formatMessage('startDate'),
|
|
882
|
-
'aria-labelledby': labelledBy
|
|
883
|
-
});
|
|
884
|
-
let endFieldProps = useLabels({
|
|
885
|
-
'aria-label': formatMessage('endDate'),
|
|
886
|
-
'aria-labelledby': labelledBy
|
|
887
|
-
});
|
|
888
|
-
let buttonId = useId();
|
|
889
|
-
let dialogId = useId();
|
|
890
|
-
let groupProps = $e62c7e96a53f216814557ded9a8cf$export$useDatePickerGroup(state, ref);
|
|
891
|
-
let {
|
|
892
|
-
focusWithinProps
|
|
893
|
-
} = useFocusWithin({
|
|
894
|
-
onBlurWithin() {
|
|
895
|
-
state.confirmPlaceholder();
|
|
896
|
-
}
|
|
897
784
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
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({
|
|
798
|
+
...props,
|
|
799
|
+
labelElementType: 'span'
|
|
800
|
+
});
|
|
801
|
+
let labelledBy = fieldProps['aria-labelledby'] || fieldProps.id;
|
|
802
|
+
let { locale: locale } = $IwcIq$reactariai18n.useLocale();
|
|
803
|
+
let description = state.formatValue(locale, {
|
|
804
|
+
month: 'long'
|
|
805
|
+
});
|
|
806
|
+
let descProps = $IwcIq$reactariautils.useDescription(description);
|
|
807
|
+
let startFieldProps = {
|
|
808
|
+
'aria-label': formatMessage('startDate'),
|
|
809
|
+
'aria-labelledby': labelledBy
|
|
810
|
+
};
|
|
811
|
+
let endFieldProps = {
|
|
812
|
+
'aria-label': formatMessage('endDate'),
|
|
813
|
+
'aria-labelledby': labelledBy
|
|
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({
|
|
819
|
+
onBlurWithin () {
|
|
820
|
+
state.confirmPlaceholder();
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
let ariaDescribedBy = [
|
|
824
|
+
descProps['aria-describedby'],
|
|
825
|
+
fieldProps['aria-describedby']
|
|
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
|
+
};
|
|
846
|
+
return {
|
|
847
|
+
groupProps: $IwcIq$reactariautils.mergeProps(groupProps, fieldProps, descProps, focusWithinProps, {
|
|
848
|
+
role: 'group',
|
|
849
|
+
'aria-disabled': props.isDisabled || null,
|
|
850
|
+
'aria-describedby': ariaDescribedBy
|
|
851
|
+
}),
|
|
852
|
+
labelProps: {
|
|
853
|
+
...labelProps,
|
|
854
|
+
onClick: ()=>{
|
|
855
|
+
focusManager.focusFirst();
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
buttonProps: {
|
|
859
|
+
...descProps,
|
|
860
|
+
id: buttonId,
|
|
861
|
+
excludeFromTabOrder: true,
|
|
862
|
+
'aria-haspopup': 'dialog',
|
|
863
|
+
'aria-label': formatMessage('calendar'),
|
|
864
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`,
|
|
865
|
+
'aria-describedby': ariaDescribedBy,
|
|
866
|
+
onPress: ()=>state.setOpen(true)
|
|
867
|
+
},
|
|
868
|
+
dialogProps: {
|
|
869
|
+
id: dialogId,
|
|
870
|
+
'aria-labelledby': `${labelledBy} ${buttonId}`
|
|
871
|
+
},
|
|
872
|
+
startFieldProps: {
|
|
873
|
+
...startFieldProps,
|
|
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
|
|
879
|
+
},
|
|
880
|
+
endFieldProps: {
|
|
881
|
+
...endFieldProps,
|
|
882
|
+
...commonFieldProps,
|
|
883
|
+
value: (ref2 = state.value) === null || ref2 === void 0 ? void 0 : ref2.end,
|
|
884
|
+
onChange: (end)=>state.setDateTime('end', end)
|
|
885
|
+
},
|
|
886
|
+
descriptionProps: descriptionProps,
|
|
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
|
+
}
|
|
900
|
+
};
|
|
933
901
|
}
|
|
934
902
|
|
|
935
|
-
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
$parcel$exportWildcard(module.exports, $934ac650a0aceb4b$exports);
|
|
906
|
+
|
|
907
|
+
|
|
936
908
|
//# sourceMappingURL=main.js.map
|