-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathdefaultPhrases.js
215 lines (204 loc) · 5.86 KB
/
defaultPhrases.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
const calendarLabel = 'Calendar';
const roleDescription = 'datepicker';
const closeDatePicker = 'Close';
const focusStartDate = 'Interact with the calendar and add the check-in date for your trip.';
const clearDate = 'Clear Date';
const clearDates = 'Clear Dates';
const jumpToPrevMonth = 'Move backward to switch to the previous month.';
const jumpToNextMonth = 'Move forward to switch to the next month.';
const keyboardShortcuts = 'Keyboard Shortcuts';
const showKeyboardShortcutsPanel = 'Open the keyboard shortcuts panel.';
const hideKeyboardShortcutsPanel = 'Close the shortcuts panel.';
const openThisPanel = 'Open this panel.';
const enterKey = 'Enter key';
const leftArrowRightArrow = 'Right and left arrow keys';
const upArrowDownArrow = 'up and down arrow keys';
const pageUpPageDown = 'page up and page down keys';
const homeEnd = 'Home and end keys';
const escape = 'Escape key';
const questionMark = 'Question mark';
const selectFocusedDate = 'Select the date in focus.';
const moveFocusByOneDay = 'Move backward (left) and forward (right) by one day.';
const moveFocusByOneWeek = 'Move backward (up) and forward (down) by one week.';
const moveFocusByOneMonth = 'Switch months.';
const moveFocustoStartAndEndOfWeek = 'Go to the first or last day of a week.';
const returnFocusToInput = 'Return to the date input field.';
const keyboardForwardNavigationInstructions = 'Navigate forward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';
const keyboardBackwardNavigationInstructions = 'Navigate backward to interact with the calendar and select a date. Press the question mark key to get the keyboard shortcuts for changing dates.';
const chooseAvailableStartDate = ({ date }) => `Choose ${date} as your check-in date. It’s available.`;
const chooseAvailableEndDate = ({ date }) => `Choose ${date} as your check-out date. It’s available.`;
const chooseAvailableDate = ({ date }) => date;
const dateIsUnavailable = ({ date }) => `Not available. ${date}`;
const dateIsSelected = ({ date }) => `Selected. ${date}`;
const dateIsSelectedAsStartDate = ({ date }) => `Selected as start date. ${date}`;
const dateIsSelectedAsEndDate = ({ date }) => `Selected as end date. ${date}`;
export default {
calendarLabel,
roleDescription,
closeDatePicker,
focusStartDate,
clearDate,
clearDates,
jumpToPrevMonth,
jumpToNextMonth,
keyboardShortcuts,
showKeyboardShortcutsPanel,
hideKeyboardShortcutsPanel,
openThisPanel,
enterKey,
leftArrowRightArrow,
upArrowDownArrow,
pageUpPageDown,
homeEnd,
escape,
questionMark,
selectFocusedDate,
moveFocusByOneDay,
moveFocusByOneWeek,
moveFocusByOneMonth,
moveFocustoStartAndEndOfWeek,
returnFocusToInput,
keyboardForwardNavigationInstructions,
keyboardBackwardNavigationInstructions,
chooseAvailableStartDate,
chooseAvailableEndDate,
dateIsUnavailable,
dateIsSelected,
dateIsSelectedAsStartDate,
dateIsSelectedAsEndDate,
};
export const DateRangePickerPhrases = {
calendarLabel,
roleDescription,
closeDatePicker,
clearDates,
focusStartDate,
jumpToPrevMonth,
jumpToNextMonth,
keyboardShortcuts,
showKeyboardShortcutsPanel,
hideKeyboardShortcutsPanel,
openThisPanel,
enterKey,
leftArrowRightArrow,
upArrowDownArrow,
pageUpPageDown,
homeEnd,
escape,
questionMark,
selectFocusedDate,
moveFocusByOneDay,
moveFocusByOneWeek,
moveFocusByOneMonth,
moveFocustoStartAndEndOfWeek,
returnFocusToInput,
keyboardForwardNavigationInstructions,
keyboardBackwardNavigationInstructions,
chooseAvailableStartDate,
chooseAvailableEndDate,
dateIsUnavailable,
dateIsSelected,
dateIsSelectedAsStartDate,
dateIsSelectedAsEndDate,
};
export const DateRangePickerInputPhrases = {
focusStartDate,
clearDates,
keyboardForwardNavigationInstructions,
keyboardBackwardNavigationInstructions,
};
export const SingleDatePickerPhrases = {
calendarLabel,
roleDescription,
closeDatePicker,
clearDate,
jumpToPrevMonth,
jumpToNextMonth,
keyboardShortcuts,
showKeyboardShortcutsPanel,
hideKeyboardShortcutsPanel,
openThisPanel,
enterKey,
leftArrowRightArrow,
upArrowDownArrow,
pageUpPageDown,
homeEnd,
escape,
questionMark,
selectFocusedDate,
moveFocusByOneDay,
moveFocusByOneWeek,
moveFocusByOneMonth,
moveFocustoStartAndEndOfWeek,
returnFocusToInput,
keyboardForwardNavigationInstructions,
keyboardBackwardNavigationInstructions,
chooseAvailableDate,
dateIsUnavailable,
dateIsSelected,
};
export const SingleDatePickerInputPhrases = {
clearDate,
keyboardForwardNavigationInstructions,
keyboardBackwardNavigationInstructions,
};
export const DayPickerPhrases = {
calendarLabel,
roleDescription,
jumpToPrevMonth,
jumpToNextMonth,
keyboardShortcuts,
showKeyboardShortcutsPanel,
hideKeyboardShortcutsPanel,
openThisPanel,
enterKey,
leftArrowRightArrow,
upArrowDownArrow,
pageUpPageDown,
homeEnd,
escape,
questionMark,
selectFocusedDate,
moveFocusByOneDay,
moveFocusByOneWeek,
moveFocusByOneMonth,
moveFocustoStartAndEndOfWeek,
returnFocusToInput,
chooseAvailableStartDate,
chooseAvailableEndDate,
chooseAvailableDate,
dateIsUnavailable,
dateIsSelected,
dateIsSelectedAsStartDate,
dateIsSelectedAsEndDate,
};
export const DayPickerKeyboardShortcutsPhrases = {
keyboardShortcuts,
showKeyboardShortcutsPanel,
hideKeyboardShortcutsPanel,
openThisPanel,
enterKey,
leftArrowRightArrow,
upArrowDownArrow,
pageUpPageDown,
homeEnd,
escape,
questionMark,
selectFocusedDate,
moveFocusByOneDay,
moveFocusByOneWeek,
moveFocusByOneMonth,
moveFocustoStartAndEndOfWeek,
returnFocusToInput,
};
export const DayPickerNavigationPhrases = {
jumpToPrevMonth,
jumpToNextMonth,
};
export const CalendarDayPhrases = {
chooseAvailableDate,
dateIsUnavailable,
dateIsSelected,
dateIsSelectedAsStartDate,
dateIsSelectedAsEndDate,
};