react-native-paper-dates 0.16.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +6 -0
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/Day.js +1 -0
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js +1 -0
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/Month.js +1 -0
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +1 -0
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js +1 -0
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +2 -0
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js +1 -0
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +1 -0
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +4 -0
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +1 -0
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/index.js +9 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/translations/hi.js +25 -0
- package/lib/commonjs/translations/hi.js.map +1 -0
- package/lib/module/Date/DatePickerModalContentHeader.js +6 -0
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/Day.js +1 -0
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js +1 -0
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/Month.js +1 -0
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/YearPicker.js +1 -0
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js +1 -0
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +2 -0
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js +1 -0
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/TimeInput.js +1 -0
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +4 -0
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +1 -0
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/translations/hi.js +18 -0
- package/lib/module/translations/hi.js.map +1 -0
- package/lib/typescript/Date/AnimatedCrossView.d.ts +2 -1
- package/lib/typescript/Date/AnimatedCrossView.d.ts.map +1 -1
- package/lib/typescript/Date/AutoSizer.d.ts +2 -1
- package/lib/typescript/Date/AutoSizer.d.ts.map +1 -1
- package/lib/typescript/Date/Calendar.d.ts +1 -1
- package/lib/typescript/Date/Calendar.d.ts.map +1 -1
- package/lib/typescript/Date/CalendarEdit.d.ts +1 -1
- package/lib/typescript/Date/CalendarEdit.d.ts.map +1 -1
- package/lib/typescript/Date/CalendarHeader.d.ts +1 -1
- package/lib/typescript/Date/CalendarHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerInputWithoutModal.d.ts +4 -4
- package/lib/typescript/Date/DatePickerModal.d.ts +1 -1
- package/lib/typescript/Date/DatePickerModal.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalContent.d.ts +1 -1
- package/lib/typescript/Date/DatePickerModalContent.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalContentHeader.d.ts +5 -4
- package/lib/typescript/Date/DatePickerModalContentHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalHeader.d.ts +2 -1
- package/lib/typescript/Date/DatePickerModalHeader.d.ts.map +1 -1
- package/lib/typescript/Date/DatePickerModalHeaderBackground.d.ts +2 -1
- package/lib/typescript/Date/DatePickerModalHeaderBackground.d.ts.map +1 -1
- package/lib/typescript/Date/Day.d.ts +2 -2
- package/lib/typescript/Date/Day.d.ts.map +1 -1
- package/lib/typescript/Date/DayName.d.ts +1 -1
- package/lib/typescript/Date/DayName.d.ts.map +1 -1
- package/lib/typescript/Date/DayNames.d.ts +1 -1
- package/lib/typescript/Date/DayNames.d.ts.map +1 -1
- package/lib/typescript/Date/DayRange.d.ts +1 -1
- package/lib/typescript/Date/DayRange.d.ts.map +1 -1
- package/lib/typescript/Date/Month.d.ts +1 -1
- package/lib/typescript/Date/Month.d.ts.map +1 -1
- package/lib/typescript/Date/Swiper.d.ts +1 -1
- package/lib/typescript/Date/Swiper.d.ts.map +1 -1
- package/lib/typescript/Date/Swiper.native.d.ts +1 -1
- package/lib/typescript/Date/Swiper.native.d.ts.map +1 -1
- package/lib/typescript/Date/YearPicker.d.ts +2 -1
- package/lib/typescript/Date/YearPicker.d.ts.map +1 -1
- package/lib/typescript/TextInputMask.d.ts +4 -4
- package/lib/typescript/Time/AmPmSwitcher.d.ts +2 -1
- package/lib/typescript/Time/AmPmSwitcher.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClock.d.ts +1 -1
- package/lib/typescript/Time/AnalogClock.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClockHours.d.ts +1 -1
- package/lib/typescript/Time/AnalogClockHours.d.ts.map +1 -1
- package/lib/typescript/Time/AnalogClockMinutes.d.ts +1 -1
- package/lib/typescript/Time/AnalogClockMinutes.d.ts.map +1 -1
- package/lib/typescript/Time/AnimatedClockSwitcher.d.ts +2 -1
- package/lib/typescript/Time/AnimatedClockSwitcher.d.ts.map +1 -1
- package/lib/typescript/Time/TimeInput.d.ts.map +1 -1
- package/lib/typescript/Time/TimeInputs.d.ts +1 -1
- package/lib/typescript/Time/TimeInputs.d.ts.map +1 -1
- package/lib/typescript/Time/TimePicker.d.ts +1 -1
- package/lib/typescript/Time/TimePicker.d.ts.map +1 -1
- package/lib/typescript/Time/TimePickerModal.d.ts +1 -1
- package/lib/typescript/Time/TimePickerModal.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/translations/hi.d.ts +4 -0
- package/lib/typescript/translations/hi.d.ts.map +1 -0
- package/package.json +19 -17
- package/src/Date/DatePickerModalContentHeader.tsx +25 -5
- package/src/Date/Day.tsx +1 -0
- package/src/Date/DayName.tsx +1 -0
- package/src/Date/Month.tsx +1 -0
- package/src/Date/YearPicker.tsx +1 -0
- package/src/Time/AmPmSwitcher.tsx +1 -0
- package/src/Time/AnalogClockHours.tsx +2 -0
- package/src/Time/AnalogClockMinutes.tsx +1 -0
- package/src/Time/TimeInput.tsx +1 -0
- package/src/Time/TimeInputs.tsx +8 -2
- package/src/Time/TimePickerModal.tsx +1 -0
- package/src/index.tsx +1 -0
- package/src/translations/hi.ts +21 -0
|
@@ -80,6 +80,7 @@ export default function DatePickerModalContentHeader(
|
|
|
80
80
|
<View style={styles.header}>
|
|
81
81
|
<View>
|
|
82
82
|
<Text
|
|
83
|
+
maxFontSizeMultiplier={1.5}
|
|
83
84
|
style={[styles.label, { color: supportingTextColor, ...textFont }]}
|
|
84
85
|
>
|
|
85
86
|
{uppercase ? label.toUpperCase() : label}
|
|
@@ -147,7 +148,10 @@ export function HeaderContentSingle({
|
|
|
147
148
|
}, [locale])
|
|
148
149
|
|
|
149
150
|
return (
|
|
150
|
-
<Text
|
|
151
|
+
<Text
|
|
152
|
+
maxFontSizeMultiplier={1.5}
|
|
153
|
+
style={[styles.singleHeaderText, { color: dateColor }]}
|
|
154
|
+
>
|
|
151
155
|
{state.date ? formatter.format(state.date) : emptyLabel}
|
|
152
156
|
</Text>
|
|
153
157
|
)
|
|
@@ -187,7 +191,12 @@ export function HeaderContentMulti({
|
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
return (
|
|
190
|
-
<Text
|
|
194
|
+
<Text
|
|
195
|
+
maxFontSizeMultiplier={1.5}
|
|
196
|
+
style={[styles.singleHeaderText, { color: dateColor }]}
|
|
197
|
+
>
|
|
198
|
+
{label}
|
|
199
|
+
</Text>
|
|
191
200
|
)
|
|
192
201
|
}
|
|
193
202
|
|
|
@@ -221,11 +230,22 @@ export function HeaderContentRange({
|
|
|
221
230
|
|
|
222
231
|
return (
|
|
223
232
|
<>
|
|
224
|
-
<Text
|
|
233
|
+
<Text
|
|
234
|
+
maxFontSizeMultiplier={1.5}
|
|
235
|
+
style={[styles.rangeHeaderText, { color: startColor }]}
|
|
236
|
+
>
|
|
225
237
|
{state.startDate ? formatter.format(state.startDate) : startLabel}
|
|
226
238
|
</Text>
|
|
227
|
-
<Text
|
|
228
|
-
|
|
239
|
+
<Text
|
|
240
|
+
maxFontSizeMultiplier={1.5}
|
|
241
|
+
style={[styles.headerSeparator, { color }]}
|
|
242
|
+
>
|
|
243
|
+
{headerSeparator}
|
|
244
|
+
</Text>
|
|
245
|
+
<Text
|
|
246
|
+
maxFontSizeMultiplier={1.5}
|
|
247
|
+
style={[styles.rangeHeaderText, { color: endColor }]}
|
|
248
|
+
>
|
|
229
249
|
{state.endDate ? formatter.format(state.endDate) : endLabel}
|
|
230
250
|
</Text>
|
|
231
251
|
</>
|
package/src/Date/Day.tsx
CHANGED
package/src/Date/DayName.tsx
CHANGED
package/src/Date/Month.tsx
CHANGED
package/src/Date/YearPicker.tsx
CHANGED
|
@@ -32,6 +32,7 @@ function AnalogClockHours({
|
|
|
32
32
|
<View style={styles.outerHourInner}>
|
|
33
33
|
{/* Display 00 instead of 12 for AM hours */}
|
|
34
34
|
<Text
|
|
35
|
+
maxFontSizeMultiplier={1.5}
|
|
35
36
|
style={
|
|
36
37
|
(!is24Hour && i + 1 === hours) ||
|
|
37
38
|
(hours === i + 1 && hours !== 12) ||
|
|
@@ -62,6 +63,7 @@ function AnalogClockHours({
|
|
|
62
63
|
>
|
|
63
64
|
<View style={styles.innerHourInner}>
|
|
64
65
|
<Text
|
|
66
|
+
maxFontSizeMultiplier={1.5}
|
|
65
67
|
selectable={false}
|
|
66
68
|
style={[
|
|
67
69
|
i + 13 === hours || (i + 13 === 24 && hours === 12)
|
package/src/Time/TimeInput.tsx
CHANGED
package/src/Time/TimeInputs.tsx
CHANGED
|
@@ -87,6 +87,7 @@ function TimeInputs({
|
|
|
87
87
|
pressed={focused === clockTypes.hours}
|
|
88
88
|
onPress={onFocusInput}
|
|
89
89
|
inputType={inputType}
|
|
90
|
+
maxFontSizeMultiplier={1.2}
|
|
90
91
|
selectionColor={
|
|
91
92
|
theme.dark
|
|
92
93
|
? Color(theme.colors.primary).darken(0.2).hex()
|
|
@@ -111,7 +112,9 @@ function TimeInputs({
|
|
|
111
112
|
}}
|
|
112
113
|
/>
|
|
113
114
|
{inputType === 'keyboard' ? (
|
|
114
|
-
<Text variant="bodySmall">
|
|
115
|
+
<Text maxFontSizeMultiplier={1.5} variant="bodySmall">
|
|
116
|
+
Hour
|
|
117
|
+
</Text>
|
|
115
118
|
) : null}
|
|
116
119
|
</View>
|
|
117
120
|
<View
|
|
@@ -155,6 +158,7 @@ function TimeInputs({
|
|
|
155
158
|
pressed={focused === clockTypes.minutes}
|
|
156
159
|
onPress={onFocusInput}
|
|
157
160
|
inputType={inputType}
|
|
161
|
+
maxFontSizeMultiplier={1.2}
|
|
158
162
|
selectionColor={
|
|
159
163
|
theme.dark
|
|
160
164
|
? Color(theme.colors.primary).darken(0.2).hex()
|
|
@@ -173,7 +177,9 @@ function TimeInputs({
|
|
|
173
177
|
}}
|
|
174
178
|
/>
|
|
175
179
|
{inputType === 'keyboard' ? (
|
|
176
|
-
<Text variant="bodySmall">
|
|
180
|
+
<Text maxFontSizeMultiplier={1.5} variant="bodySmall">
|
|
181
|
+
Minute
|
|
182
|
+
</Text>
|
|
177
183
|
) : null}
|
|
178
184
|
</View>
|
|
179
185
|
{!is24Hour && (
|
package/src/index.tsx
CHANGED
|
@@ -15,6 +15,7 @@ export { default as enGB } from './translations/enGB'
|
|
|
15
15
|
export { default as es } from './translations/es'
|
|
16
16
|
export { default as fr } from './translations/fr'
|
|
17
17
|
export { default as he } from './translations/he'
|
|
18
|
+
export { default as hi } from './translations/hi'
|
|
18
19
|
export { default as it } from './translations/it'
|
|
19
20
|
export { default as ko } from './translations/ko'
|
|
20
21
|
export { default as nl } from './translations/nl'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TranslationsType } from './utils'
|
|
2
|
+
|
|
3
|
+
const hi: TranslationsType = {
|
|
4
|
+
save: 'जमा करें',
|
|
5
|
+
selectSingle: 'तारीख़ चुनें',
|
|
6
|
+
selectMultiple: 'तारीख़ें चुनें',
|
|
7
|
+
selectRange: 'अवधि चुनें',
|
|
8
|
+
notAccordingToDateFormat: (inputFormat) =>
|
|
9
|
+
`तारीख़ का प्रारूप ${inputFormat} होना चाहिए`,
|
|
10
|
+
mustBeHigherThan: (date) => `${date} के बाद होना चाहिए`,
|
|
11
|
+
mustBeLowerThan: (date) => `${date} से पहले होना चाहिए`,
|
|
12
|
+
mustBeBetween: (startDate, endDate) =>
|
|
13
|
+
`${startDate} - ${endDate} के बीच होना चाहिए`,
|
|
14
|
+
dateIsDisabled: 'दिन की अनुमति नहीं है',
|
|
15
|
+
previous: 'पिछला',
|
|
16
|
+
next: 'अगला',
|
|
17
|
+
typeInDate: 'तारीख़ लिखें',
|
|
18
|
+
pickDateFromCalendar: 'कैलेंडर से तारीख़ चुनें',
|
|
19
|
+
close: 'बंद करें',
|
|
20
|
+
}
|
|
21
|
+
export default hi
|