react-native-paper-dates 0.5.1 → 0.6.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 +8 -3
- package/lib/commonjs/Date/AnimatedCrossView.js +7 -6
- package/lib/commonjs/Date/AnimatedCrossView.js.map +1 -1
- package/lib/commonjs/Date/AutoSizer.js +4 -3
- package/lib/commonjs/Date/AutoSizer.js.map +1 -1
- package/lib/commonjs/Date/Calendar.js +37 -31
- package/lib/commonjs/Date/Calendar.js.map +1 -1
- package/lib/commonjs/Date/CalendarEdit.js +18 -14
- package/lib/commonjs/Date/CalendarEdit.js.map +1 -1
- package/lib/commonjs/Date/CalendarHeader.js +17 -10
- package/lib/commonjs/Date/CalendarHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerInput.js +28 -21
- package/lib/commonjs/Date/DatePickerInput.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalContentHeader.js +30 -24
- package/lib/commonjs/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js +4 -1
- package/lib/commonjs/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js +4 -3
- package/lib/commonjs/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/commonjs/Date/DateRangeInput.js +13 -8
- package/lib/commonjs/Date/DateRangeInput.js.map +1 -1
- package/lib/commonjs/Date/Day.js +4 -1
- package/lib/commonjs/Date/Day.js.map +1 -1
- package/lib/commonjs/Date/DayName.js +4 -3
- package/lib/commonjs/Date/DayName.js.map +1 -1
- package/lib/commonjs/Date/DayNames.js +5 -4
- package/lib/commonjs/Date/DayNames.js.map +1 -1
- package/lib/commonjs/Date/DayRange.js +7 -6
- package/lib/commonjs/Date/DayRange.js.map +1 -1
- package/lib/commonjs/Date/Month.js +45 -34
- package/lib/commonjs/Date/Month.js.map +1 -1
- package/lib/commonjs/Date/Swiper.js +33 -27
- package/lib/commonjs/Date/Swiper.js.map +1 -1
- package/lib/commonjs/Date/Swiper.native.js +27 -21
- package/lib/commonjs/Date/Swiper.native.js.map +1 -1
- package/lib/commonjs/Date/SwiperUtils.js +5 -4
- package/lib/commonjs/Date/SwiperUtils.js.map +1 -1
- package/lib/commonjs/Date/YearPicker.js +26 -18
- package/lib/commonjs/Date/YearPicker.js.map +1 -1
- package/lib/commonjs/Date/dateUtils.js +49 -37
- package/lib/commonjs/Date/dateUtils.js.map +1 -1
- package/lib/commonjs/Date/inputUtils.js +8 -7
- package/lib/commonjs/Date/inputUtils.js.map +1 -1
- package/lib/commonjs/TextInputMask.js +7 -6
- package/lib/commonjs/TextInputMask.js.map +1 -1
- package/lib/commonjs/Time/AmPmSwitcher.js +12 -10
- package/lib/commonjs/Time/AmPmSwitcher.js.map +1 -1
- package/lib/commonjs/Time/AnalogClock.js +8 -7
- package/lib/commonjs/Time/AnalogClock.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockHours.js +5 -4
- package/lib/commonjs/Time/AnalogClockHours.js.map +1 -1
- package/lib/commonjs/Time/AnalogClockMinutes.js +5 -4
- package/lib/commonjs/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/commonjs/Time/AnimatedClockSwitcher.js +6 -5
- package/lib/commonjs/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/commonjs/Time/TimeInput.js +14 -10
- package/lib/commonjs/Time/TimeInput.js.map +1 -1
- package/lib/commonjs/Time/TimeInputs.js +10 -9
- package/lib/commonjs/Time/TimeInputs.js.map +1 -1
- package/lib/commonjs/Time/TimePicker.js +10 -9
- package/lib/commonjs/Time/TimePicker.js.map +1 -1
- package/lib/commonjs/Time/TimePickerModal.js +17 -13
- package/lib/commonjs/Time/TimePickerModal.js.map +1 -1
- package/lib/commonjs/Time/timeUtils.js +7 -6
- package/lib/commonjs/Time/timeUtils.js.map +1 -1
- package/lib/commonjs/index.js +29 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/translations/enGB.js +20 -0
- package/lib/commonjs/translations/enGB.js.map +1 -0
- package/lib/commonjs/translations/pl.js +20 -0
- package/lib/commonjs/translations/pl.js.map +1 -0
- package/lib/commonjs/utils.js +4 -4
- package/lib/module/Date/AnimatedCrossView.js +7 -6
- package/lib/module/Date/AnimatedCrossView.js.map +1 -1
- package/lib/module/Date/AutoSizer.js +4 -3
- package/lib/module/Date/AutoSizer.js.map +1 -1
- package/lib/module/Date/Calendar.js +37 -31
- package/lib/module/Date/Calendar.js.map +1 -1
- package/lib/module/Date/CalendarEdit.js +18 -14
- package/lib/module/Date/CalendarEdit.js.map +1 -1
- package/lib/module/Date/CalendarHeader.js +16 -9
- package/lib/module/Date/CalendarHeader.js.map +1 -1
- package/lib/module/Date/DatePickerInput.js +28 -21
- package/lib/module/Date/DatePickerInput.js.map +1 -1
- package/lib/module/Date/DatePickerModalContentHeader.js +28 -22
- package/lib/module/Date/DatePickerModalContentHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeader.js +4 -1
- package/lib/module/Date/DatePickerModalHeader.js.map +1 -1
- package/lib/module/Date/DatePickerModalHeaderBackground.js +4 -3
- package/lib/module/Date/DatePickerModalHeaderBackground.js.map +1 -1
- package/lib/module/Date/DateRangeInput.js +13 -8
- package/lib/module/Date/DateRangeInput.js.map +1 -1
- package/lib/module/Date/Day.js +4 -1
- package/lib/module/Date/Day.js.map +1 -1
- package/lib/module/Date/DayName.js +4 -3
- package/lib/module/Date/DayName.js.map +1 -1
- package/lib/module/Date/DayNames.js +5 -4
- package/lib/module/Date/DayNames.js.map +1 -1
- package/lib/module/Date/DayRange.js +7 -6
- package/lib/module/Date/DayRange.js.map +1 -1
- package/lib/module/Date/Month.js +41 -31
- package/lib/module/Date/Month.js.map +1 -1
- package/lib/module/Date/Swiper.js +32 -26
- package/lib/module/Date/Swiper.js.map +1 -1
- package/lib/module/Date/Swiper.native.js +27 -21
- package/lib/module/Date/Swiper.native.js.map +1 -1
- package/lib/module/Date/SwiperUtils.js +5 -4
- package/lib/module/Date/SwiperUtils.js.map +1 -1
- package/lib/module/Date/YearPicker.js +26 -18
- package/lib/module/Date/YearPicker.js.map +1 -1
- package/lib/module/Date/dateUtils.js +33 -25
- package/lib/module/Date/dateUtils.js.map +1 -1
- package/lib/module/Date/inputUtils.js +8 -7
- package/lib/module/Date/inputUtils.js.map +1 -1
- package/lib/module/TextInputMask.js +7 -6
- package/lib/module/TextInputMask.js.map +1 -1
- package/lib/module/Time/AmPmSwitcher.js +12 -10
- package/lib/module/Time/AmPmSwitcher.js.map +1 -1
- package/lib/module/Time/AnalogClock.js +8 -7
- package/lib/module/Time/AnalogClock.js.map +1 -1
- package/lib/module/Time/AnalogClockHours.js +5 -4
- package/lib/module/Time/AnalogClockHours.js.map +1 -1
- package/lib/module/Time/AnalogClockMinutes.js +5 -4
- package/lib/module/Time/AnalogClockMinutes.js.map +1 -1
- package/lib/module/Time/AnimatedClockSwitcher.js +6 -5
- package/lib/module/Time/AnimatedClockSwitcher.js.map +1 -1
- package/lib/module/Time/TimeInput.js +14 -10
- package/lib/module/Time/TimeInput.js.map +1 -1
- package/lib/module/Time/TimeInputs.js +10 -9
- package/lib/module/Time/TimeInputs.js.map +1 -1
- package/lib/module/Time/TimePicker.js +10 -9
- package/lib/module/Time/TimePicker.js.map +1 -1
- package/lib/module/Time/TimePickerModal.js +17 -13
- package/lib/module/Time/TimePickerModal.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/translations/enGB.js +13 -0
- package/lib/module/translations/enGB.js.map +1 -0
- package/lib/module/translations/pl.js +13 -0
- package/lib/module/translations/pl.js.map +1 -0
- package/lib/typescript/Date/DatePickerInput.d.ts +4 -4
- package/lib/typescript/TextInputMask.d.ts +3 -3
- package/lib/typescript/Time/AmPmSwitcher.d.ts +1 -1
- package/lib/typescript/Time/AnalogClock.d.ts +1 -1
- package/lib/typescript/Time/TimeInputs.d.ts +1 -1
- package/lib/typescript/Time/TimePickerModal.d.ts +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/translations/enGB.d.ts +3 -0
- package/lib/typescript/translations/pl.d.ts +3 -0
- package/package.json +19 -17
- package/src/Date/CalendarEdit.tsx +3 -0
- package/src/Date/CalendarHeader.tsx +14 -2
- package/src/Date/DatePickerInput.tsx +3 -0
- package/src/Date/DatePickerModalContentHeader.tsx +3 -0
- package/src/Date/DatePickerModalHeader.tsx +3 -0
- package/src/Date/DateRangeInput.tsx +7 -1
- package/src/Date/Day.tsx +3 -0
- package/src/Date/Month.tsx +6 -0
- package/src/Date/Swiper.tsx +1 -0
- package/src/Date/YearPicker.tsx +4 -1
- package/src/Time/AmPmSwitcher.tsx +1 -1
- package/src/Time/AnalogClock.tsx +1 -5
- package/src/Time/AnalogClockMinutes.tsx +4 -1
- package/src/Time/TimeInput.tsx +3 -0
- package/src/Time/TimeInputs.tsx +1 -5
- package/src/Time/TimePickerModal.tsx +4 -1
- package/src/index.tsx +2 -0
- package/src/translations/enGB.ts +15 -0
- package/src/translations/pl.ts +15 -0
|
@@ -4,18 +4,19 @@ import { Button, IconButton, overlay, useTheme } from 'react-native-paper';
|
|
|
4
4
|
import TimePicker from './TimePicker';
|
|
5
5
|
import { clockTypes, inputTypeIcons, inputTypes, reverseInputTypes } from './timeUtils';
|
|
6
6
|
const supportedOrientations = ['portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right'];
|
|
7
|
-
export function TimePickerModal({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
export function TimePickerModal(_ref) {
|
|
8
|
+
let {
|
|
9
|
+
visible,
|
|
10
|
+
onDismiss,
|
|
11
|
+
onConfirm,
|
|
12
|
+
hours,
|
|
13
|
+
minutes,
|
|
14
|
+
label = 'Select time',
|
|
15
|
+
cancelLabel = 'Cancel',
|
|
16
|
+
confirmLabel = 'Ok',
|
|
17
|
+
animationType = 'none',
|
|
18
|
+
locale
|
|
19
|
+
} = _ref;
|
|
19
20
|
const theme = useTheme();
|
|
20
21
|
const [inputType, setInputType] = React.useState(inputTypes.picker);
|
|
21
22
|
const [focused, setFocused] = React.useState(clockTypes.hours);
|
|
@@ -85,7 +86,10 @@ export function TimePickerModal({
|
|
|
85
86
|
onPress: () => setInputType(reverseInputTypes[inputType]),
|
|
86
87
|
size: 24,
|
|
87
88
|
style: styles.inputTypeToggle,
|
|
88
|
-
accessibilityLabel: "toggle keyboard"
|
|
89
|
+
accessibilityLabel: "toggle keyboard" // RN types bug
|
|
90
|
+
,
|
|
91
|
+
hasTVPreferredFocus: undefined,
|
|
92
|
+
tvParallaxProperties: undefined
|
|
89
93
|
}), /*#__PURE__*/React.createElement(View, {
|
|
90
94
|
style: styles.fill
|
|
91
95
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["TimePickerModal.tsx"],"names":["React","Modal","StyleSheet","View","Text","Animated","TouchableWithoutFeedback","KeyboardAvoidingView","Button","IconButton","overlay","useTheme","TimePicker","clockTypes","inputTypeIcons","inputTypes","reverseInputTypes","supportedOrientations","TimePickerModal","visible","onDismiss","onConfirm","hours","minutes","label","cancelLabel","confirmLabel","animationType","locale","theme","inputType","setInputType","useState","picker","focused","setFocused","localHours","setLocalHours","getHours","localMinutes","setLocalMinutes","getMinutes","useEffect","onFocusInput","useCallback","type","onChange","params","absoluteFill","styles","modalBackground","backgroundColor","colors","backdrop","modalRoot","keyboardView","modalContent","dark","surface","borderRadius","roundness","labelContainer","color","text","toUpperCase","timePickerContainer","bottom","inputTypeToggle","fill","undefined","Date","create","justifyContent","alignItems","flex","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","minWidth","paddingLeft","paddingRight","letterSpacing","fontSize","padding","flexDirection","margin","memo"],"mappings":"AAAA,OAAO,KAAKA,KAAZ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B,EAAAA,eAAe,EAAE;AACfwB,IAAAA,IAAI,EAAE;AADS,GAXc;AAc/BlB,EAAAA,YAAY,EAAE;AACZmB,IAAAA,WAAW,EAAE,MADD;AAEZC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,CADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KAFF;AAMZC,IAAAA,aAAa,EAAE,IANH;AAOZC,IAAAA,YAAY,EAAE,IAPF;AAQZC,IAAAA,SAAS,EAAE,EARC;AASZC,IAAAA,QAAQ,EAAE;AATE,GAdiB;AAyB/BrB,EAAAA,cAAc,EAAE;AACdiB,IAAAA,MAAM,EAAE,EADM;AAEdN,IAAAA,cAAc,EAAE,UAFF;AAGdW,IAAAA,WAAW,EAAE,EAHC;AAIdC,IAAAA,YAAY,EAAE;AAJA,GAzBe;AA+B/B5D,EAAAA,KAAK,EAAE;AACL6D,IAAAA,aAAa,EAAE,CADV;AAELC,IAAAA,QAAQ,EAAE;AAFL,GA/BwB;AAmC/BrB,EAAAA,mBAAmB,EAAE;AAAEsB,IAAAA,OAAO,EAAE;AAAX,GAnCU;AAoC/BrB,EAAAA,MAAM,EAAE;AACNsB,IAAAA,aAAa,EAAE,KADT;AAENf,IAAAA,UAAU,EAAE,QAFN;AAGNc,IAAAA,OAAO,EAAE;AAHH,GApCuB;AAyC/BpB,EAAAA,eAAe,EAAE;AAAEsB,IAAAA,MAAM,EAAE;AAAV,GAzCc;AA0C/BrB,EAAAA,IAAI,EAAE;AAAEM,IAAAA,IAAI,EAAE;AAAR;AA1CyB,CAAlB,CAAf;AA6CA,4BAAe1E,KAAK,CAAC0F,IAAN,CAAWxE,eAAX,CAAf","sourcesContent":["import * as React from 'react'\nimport {\n Modal,\n StyleSheet,\n View,\n Text,\n Animated,\n TouchableWithoutFeedback,\n KeyboardAvoidingView,\n} from 'react-native'\n\nimport { Button, IconButton, overlay, useTheme } from 'react-native-paper'\nimport TimePicker from './TimePicker'\nimport {\n clockTypes,\n inputTypeIcons,\n inputTypes,\n PossibleClockTypes,\n PossibleInputTypes,\n reverseInputTypes,\n} from './timeUtils'\n\nconst supportedOrientations: any[] = [\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n]\n\nexport function TimePickerModal({\n visible,\n onDismiss,\n onConfirm,\n hours,\n minutes,\n label = 'Select time',\n cancelLabel = 'Cancel',\n confirmLabel = 'Ok',\n animationType = 'none',\n locale,\n}: {\n locale?: undefined | string\n label?: string\n cancelLabel?: string\n confirmLabel?: string\n hours?: number | undefined\n minutes?: number | undefined\n visible: boolean | undefined\n onDismiss: () => any\n onConfirm: ({ hours, minutes }: { hours: number; minutes: number }) => any\n animationType?: 'slide' | 'fade' | 'none'\n}) {\n const theme = useTheme()\n\n const [inputType, setInputType] = React.useState<PossibleInputTypes>(\n inputTypes.picker\n )\n const [focused, setFocused] = React.useState<PossibleClockTypes>(\n clockTypes.hours\n )\n const [localHours, setLocalHours] = React.useState<number>(getHours(hours))\n const [localMinutes, setLocalMinutes] = React.useState<number>(\n getMinutes(minutes)\n )\n\n React.useEffect(() => {\n setLocalHours(getHours(hours))\n }, [setLocalHours, hours])\n\n React.useEffect(() => {\n setLocalMinutes(getMinutes(minutes))\n }, [setLocalMinutes, minutes])\n\n const onFocusInput = React.useCallback(\n (type: PossibleClockTypes) => setFocused(type),\n []\n )\n const onChange = React.useCallback(\n (params: {\n focused?: PossibleClockTypes | undefined\n hours: number\n minutes: number\n }) => {\n if (params.focused) {\n setFocused(params.focused)\n }\n\n setLocalHours(params.hours)\n setLocalMinutes(params.minutes)\n },\n [setFocused, setLocalHours, setLocalMinutes]\n )\n return (\n <Modal\n animationType={animationType}\n transparent={true}\n visible={visible}\n onRequestClose={onDismiss}\n presentationStyle=\"overFullScreen\"\n supportedOrientations={supportedOrientations}\n //@ts-ignore\n statusBarTranslucent={true}\n >\n <>\n <TouchableWithoutFeedback onPress={onDismiss}>\n <View\n style={[\n StyleSheet.absoluteFill,\n styles.modalBackground,\n { backgroundColor: theme.colors.backdrop },\n ]}\n />\n </TouchableWithoutFeedback>\n\n <View\n style={[StyleSheet.absoluteFill, styles.modalRoot]}\n pointerEvents=\"box-none\"\n >\n <KeyboardAvoidingView\n style={styles.keyboardView}\n behavior={'padding'}\n >\n <Animated.View\n style={[\n styles.modalContent,\n {\n backgroundColor: theme.dark\n ? overlay(10, theme.colors.surface)\n : theme.colors.surface,\n borderRadius: theme.roundness,\n },\n ]}\n >\n <View style={styles.labelContainer}>\n <Text style={[styles.label, { color: theme.colors.text }]}>\n {label.toUpperCase()}\n </Text>\n </View>\n <View style={styles.timePickerContainer}>\n <TimePicker\n locale={locale}\n inputType={inputType}\n focused={focused}\n hours={localHours}\n minutes={localMinutes}\n onChange={onChange}\n onFocusInput={onFocusInput}\n />\n </View>\n <View style={styles.bottom}>\n <IconButton\n icon={inputTypeIcons[reverseInputTypes[inputType]]}\n onPress={() => setInputType(reverseInputTypes[inputType])}\n size={24}\n style={styles.inputTypeToggle}\n accessibilityLabel=\"toggle keyboard\"\n />\n <View style={styles.fill} />\n <Button onPress={onDismiss}>{cancelLabel}</Button>\n <Button\n onPress={() =>\n onConfirm({ hours: localHours, minutes: localMinutes })\n }\n >\n {confirmLabel}\n </Button>\n </View>\n </Animated.View>\n </KeyboardAvoidingView>\n </View>\n </>\n </Modal>\n )\n}\n\nfunction getMinutes(minutes: number | undefined | null): number {\n return minutes === undefined || minutes === null\n ? new Date().getMinutes()\n : minutes\n}\nfunction getHours(hours: number | undefined | null): number {\n return hours === undefined || hours === null ? new Date().getHours() : hours\n}\n\nconst styles = StyleSheet.create({\n modalRoot: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n keyboardView: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n modalBackground: {\n flex: 1,\n },\n modalContent: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 5,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n elevation: 10,\n minWidth: 287,\n },\n labelContainer: {\n height: 28,\n justifyContent: 'flex-end',\n paddingLeft: 24,\n paddingRight: 24,\n },\n label: {\n letterSpacing: 1,\n fontSize: 13,\n },\n timePickerContainer: { padding: 24 },\n bottom: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n inputTypeToggle: { margin: 4 },\n fill: { flex: 1 },\n})\n\nexport default React.memo(TimePickerModal)\n"]}
|
|
1
|
+
{"version":3,"sources":["TimePickerModal.tsx"],"names":["React","Modal","StyleSheet","View","Text","Animated","TouchableWithoutFeedback","KeyboardAvoidingView","Button","IconButton","overlay","useTheme","TimePicker","clockTypes","inputTypeIcons","inputTypes","reverseInputTypes","supportedOrientations","TimePickerModal","visible","onDismiss","onConfirm","hours","minutes","label","cancelLabel","confirmLabel","animationType","locale","theme","inputType","setInputType","useState","picker","focused","setFocused","localHours","setLocalHours","getHours","localMinutes","setLocalMinutes","getMinutes","useEffect","onFocusInput","useCallback","type","onChange","params","absoluteFill","styles","modalBackground","backgroundColor","colors","backdrop","modalRoot","keyboardView","modalContent","dark","surface","borderRadius","roundness","labelContainer","color","text","toUpperCase","timePickerContainer","bottom","inputTypeToggle","undefined","fill","Date","create","justifyContent","alignItems","flex","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","minWidth","paddingLeft","paddingRight","letterSpacing","fontSize","padding","flexDirection","margin","memo"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,KADF,EAEEC,UAFF,EAGEC,IAHF,EAIEC,IAJF,EAKEC,QALF,EAMEC,wBANF,EAOEC,oBAPF,QAQO,cARP;AAUA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,OAA7B,EAAsCC,QAAtC,QAAsD,oBAAtD;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,SACEC,UADF,EAEEC,cAFF,EAGEC,UAHF,EAMEC,iBANF,QAOO,aAPP;AASA,MAAMC,qBAA4B,GAAG,CACnC,UADmC,EAE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,IAAAA,YAAY,EAAE,IAPF;AAQZC,IAAAA,SAAS,EAAE,EARC;AASZC,IAAAA,QAAQ,EAAE;AATE,GAdiB;AAyB/BrB,EAAAA,cAAc,EAAE;AACdiB,IAAAA,MAAM,EAAE,EADM;AAEdN,IAAAA,cAAc,EAAE,UAFF;AAGdW,IAAAA,WAAW,EAAE,EAHC;AAIdC,IAAAA,YAAY,EAAE;AAJA,GAzBe;AA+B/B5D,EAAAA,KAAK,EAAE;AACL6D,IAAAA,aAAa,EAAE,CADV;AAELC,IAAAA,QAAQ,EAAE;AAFL,GA/BwB;AAmC/BrB,EAAAA,mBAAmB,EAAE;AAAEsB,IAAAA,OAAO,EAAE;AAAX,GAnCU;AAoC/BrB,EAAAA,MAAM,EAAE;AACNsB,IAAAA,aAAa,EAAE,KADT;AAENf,IAAAA,UAAU,EAAE,QAFN;AAGNc,IAAAA,OAAO,EAAE;AAHH,GApCuB;AAyC/BpB,EAAAA,eAAe,EAAE;AAAEsB,IAAAA,MAAM,EAAE;AAAV,GAzCc;AA0C/BpB,EAAAA,IAAI,EAAE;AAAEK,IAAAA,IAAI,EAAE;AAAR;AA1CyB,CAAlB,CAAf;AA6CA,4BAAe1E,KAAK,CAAC0F,IAAN,CAAWxE,eAAX,CAAf","sourcesContent":["import * as React from 'react'\nimport {\n Modal,\n StyleSheet,\n View,\n Text,\n Animated,\n TouchableWithoutFeedback,\n KeyboardAvoidingView,\n} from 'react-native'\n\nimport { Button, IconButton, overlay, useTheme } from 'react-native-paper'\nimport TimePicker from './TimePicker'\nimport {\n clockTypes,\n inputTypeIcons,\n inputTypes,\n PossibleClockTypes,\n PossibleInputTypes,\n reverseInputTypes,\n} from './timeUtils'\n\nconst supportedOrientations: any[] = [\n 'portrait',\n 'portrait-upside-down',\n 'landscape',\n 'landscape-left',\n 'landscape-right',\n]\n\nexport function TimePickerModal({\n visible,\n onDismiss,\n onConfirm,\n hours,\n minutes,\n label = 'Select time',\n cancelLabel = 'Cancel',\n confirmLabel = 'Ok',\n animationType = 'none',\n locale,\n}: {\n locale?: undefined | string\n label?: string\n cancelLabel?: string\n confirmLabel?: string\n hours?: number | undefined\n minutes?: number | undefined\n visible: boolean | undefined\n onDismiss: () => any\n onConfirm: (hoursAndMinutes: { hours: number; minutes: number }) => any\n animationType?: 'slide' | 'fade' | 'none'\n}) {\n const theme = useTheme()\n\n const [inputType, setInputType] = React.useState<PossibleInputTypes>(\n inputTypes.picker\n )\n const [focused, setFocused] = React.useState<PossibleClockTypes>(\n clockTypes.hours\n )\n const [localHours, setLocalHours] = React.useState<number>(getHours(hours))\n const [localMinutes, setLocalMinutes] = React.useState<number>(\n getMinutes(minutes)\n )\n\n React.useEffect(() => {\n setLocalHours(getHours(hours))\n }, [setLocalHours, hours])\n\n React.useEffect(() => {\n setLocalMinutes(getMinutes(minutes))\n }, [setLocalMinutes, minutes])\n\n const onFocusInput = React.useCallback(\n (type: PossibleClockTypes) => setFocused(type),\n []\n )\n const onChange = React.useCallback(\n (params: {\n focused?: PossibleClockTypes | undefined\n hours: number\n minutes: number\n }) => {\n if (params.focused) {\n setFocused(params.focused)\n }\n\n setLocalHours(params.hours)\n setLocalMinutes(params.minutes)\n },\n [setFocused, setLocalHours, setLocalMinutes]\n )\n return (\n <Modal\n animationType={animationType}\n transparent={true}\n visible={visible}\n onRequestClose={onDismiss}\n presentationStyle=\"overFullScreen\"\n supportedOrientations={supportedOrientations}\n //@ts-ignore\n statusBarTranslucent={true}\n >\n <>\n <TouchableWithoutFeedback onPress={onDismiss}>\n <View\n style={[\n StyleSheet.absoluteFill,\n styles.modalBackground,\n { backgroundColor: theme.colors.backdrop },\n ]}\n />\n </TouchableWithoutFeedback>\n\n <View\n style={[StyleSheet.absoluteFill, styles.modalRoot]}\n pointerEvents=\"box-none\"\n >\n <KeyboardAvoidingView\n style={styles.keyboardView}\n behavior={'padding'}\n >\n <Animated.View\n style={[\n styles.modalContent,\n {\n backgroundColor: theme.dark\n ? overlay(10, theme.colors.surface)\n : theme.colors.surface,\n borderRadius: theme.roundness,\n },\n ]}\n >\n <View style={styles.labelContainer}>\n <Text style={[styles.label, { color: theme.colors.text }]}>\n {label.toUpperCase()}\n </Text>\n </View>\n <View style={styles.timePickerContainer}>\n <TimePicker\n locale={locale}\n inputType={inputType}\n focused={focused}\n hours={localHours}\n minutes={localMinutes}\n onChange={onChange}\n onFocusInput={onFocusInput}\n />\n </View>\n <View style={styles.bottom}>\n <IconButton\n icon={inputTypeIcons[reverseInputTypes[inputType]]}\n onPress={() => setInputType(reverseInputTypes[inputType])}\n size={24}\n style={styles.inputTypeToggle}\n accessibilityLabel=\"toggle keyboard\"\n // RN types bug\n hasTVPreferredFocus={undefined}\n tvParallaxProperties={undefined}\n />\n <View style={styles.fill} />\n <Button onPress={onDismiss}>{cancelLabel}</Button>\n <Button\n onPress={() =>\n onConfirm({ hours: localHours, minutes: localMinutes })\n }\n >\n {confirmLabel}\n </Button>\n </View>\n </Animated.View>\n </KeyboardAvoidingView>\n </View>\n </>\n </Modal>\n )\n}\n\nfunction getMinutes(minutes: number | undefined | null): number {\n return minutes === undefined || minutes === null\n ? new Date().getMinutes()\n : minutes\n}\nfunction getHours(hours: number | undefined | null): number {\n return hours === undefined || hours === null ? new Date().getHours() : hours\n}\n\nconst styles = StyleSheet.create({\n modalRoot: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n keyboardView: {\n justifyContent: 'center',\n alignItems: 'center',\n flex: 1,\n },\n modalBackground: {\n flex: 1,\n },\n modalContent: {\n shadowColor: '#000',\n shadowOffset: {\n width: 0,\n height: 5,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n elevation: 10,\n minWidth: 287,\n },\n labelContainer: {\n height: 28,\n justifyContent: 'flex-end',\n paddingLeft: 24,\n paddingRight: 24,\n },\n label: {\n letterSpacing: 1,\n fontSize: 13,\n },\n timePickerContainer: { padding: 24 },\n bottom: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n inputTypeToggle: { margin: 4 },\n fill: { flex: 1 },\n})\n\nexport default React.memo(TimePickerModal)\n"]}
|
package/lib/module/index.js
CHANGED
|
@@ -8,4 +8,6 @@ export { default as DatePickerInput } from './Date/DatePickerInput';
|
|
|
8
8
|
export { registerTranslation, getTranslation } from './translations/utils';
|
|
9
9
|
export { default as nl } from './translations/nl';
|
|
10
10
|
export { default as en } from './translations/en';
|
|
11
|
+
export { default as pl } from './translations/pl';
|
|
12
|
+
export { default as enGB } from './translations/enGB';
|
|
11
13
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.tsx"],"names":["default","Calendar","DatePickerModal","DatePickerModalContent","TimePickerModal","TimePicker","DatePickerInput","registerTranslation","getTranslation","nl","en"],"mappings":"AAAA,SAASA,OAAO,IAAIC,QAApB,QAAoC,iBAApC;AACA,SAASD,OAAO,IAAIE,eAApB,QAA2C,wBAA3C;AACA,cAAc,wBAAd;AACA,SAASF,OAAO,IAAIG,sBAApB,QAAkD,+BAAlD;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,wBAA3C;AACA,SAASJ,OAAO,IAAIK,UAApB,QAAsC,mBAAtC;AACA,SAASL,OAAO,IAAIM,eAApB,QAA2C,wBAA3C;AAEA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,sBAApD;AACA,SAASR,OAAO,IAAIS,EAApB,QAA8B,mBAA9B;AACA,SAAST,OAAO,IAAIU,EAApB,QAA8B,mBAA9B","sourcesContent":["export { default as Calendar } from './Date/Calendar'\nexport { default as DatePickerModal } from './Date/DatePickerModal'\nexport * from './Date/DatePickerModal'\nexport { default as DatePickerModalContent } from './Date/DatePickerModalContent'\nexport { default as TimePickerModal } from './Time/TimePickerModal'\nexport { default as TimePicker } from './Time/TimePicker'\nexport { default as DatePickerInput } from './Date/DatePickerInput'\nexport type { TranslationsType } from './translations/utils'\nexport { registerTranslation, getTranslation } from './translations/utils'\nexport { default as nl } from './translations/nl'\nexport { default as en } from './translations/en'\n"]}
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":["default","Calendar","DatePickerModal","DatePickerModalContent","TimePickerModal","TimePicker","DatePickerInput","registerTranslation","getTranslation","nl","en","pl","enGB"],"mappings":"AAAA,SAASA,OAAO,IAAIC,QAApB,QAAoC,iBAApC;AACA,SAASD,OAAO,IAAIE,eAApB,QAA2C,wBAA3C;AACA,cAAc,wBAAd;AACA,SAASF,OAAO,IAAIG,sBAApB,QAAkD,+BAAlD;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,wBAA3C;AACA,SAASJ,OAAO,IAAIK,UAApB,QAAsC,mBAAtC;AACA,SAASL,OAAO,IAAIM,eAApB,QAA2C,wBAA3C;AAEA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,sBAApD;AACA,SAASR,OAAO,IAAIS,EAApB,QAA8B,mBAA9B;AACA,SAAST,OAAO,IAAIU,EAApB,QAA8B,mBAA9B;AACA,SAASV,OAAO,IAAIW,EAApB,QAA8B,mBAA9B;AACA,SAASX,OAAO,IAAIY,IAApB,QAAgC,qBAAhC","sourcesContent":["export { default as Calendar } from './Date/Calendar'\nexport { default as DatePickerModal } from './Date/DatePickerModal'\nexport * from './Date/DatePickerModal'\nexport { default as DatePickerModalContent } from './Date/DatePickerModalContent'\nexport { default as TimePickerModal } from './Time/TimePickerModal'\nexport { default as TimePicker } from './Time/TimePicker'\nexport { default as DatePickerInput } from './Date/DatePickerInput'\nexport type { TranslationsType } from './translations/utils'\nexport { registerTranslation, getTranslation } from './translations/utils'\nexport { default as nl } from './translations/nl'\nexport { default as en } from './translations/en'\nexport { default as pl } from './translations/pl'\nexport { default as enGB } from './translations/enGB'\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const enGB = {
|
|
2
|
+
save: 'Save',
|
|
3
|
+
selectSingle: 'Select date',
|
|
4
|
+
selectMultiple: 'Select dates',
|
|
5
|
+
selectRange: 'Select period',
|
|
6
|
+
notAccordingToDateFormat: inputFormat => `Date format must be ${inputFormat}`,
|
|
7
|
+
mustBeHigherThan: 'Must be later then',
|
|
8
|
+
mustBeLowerThan: 'Must be earlier then',
|
|
9
|
+
mustBeBetween: 'Must be between',
|
|
10
|
+
dateIsDisabled: 'Day is not allowed'
|
|
11
|
+
};
|
|
12
|
+
export default enGB;
|
|
13
|
+
//# sourceMappingURL=enGB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["enGB.ts"],"names":["enGB","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled"],"mappings":"AAEA,MAAMA,IAAsB,GAAG;AAC7BC,EAAAA,IAAI,EAAE,MADuB;AAE7BC,EAAAA,YAAY,EAAE,aAFe;AAG7BC,EAAAA,cAAc,EAAE,cAHa;AAI7BC,EAAAA,WAAW,EAAE,eAJgB;AAK7BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,uBAAsBA,WAAY,EANR;AAO7BC,EAAAA,gBAAgB,EAAE,oBAPW;AAQ7BC,EAAAA,eAAe,EAAE,sBARY;AAS7BC,EAAAA,aAAa,EAAE,iBATc;AAU7BC,EAAAA,cAAc,EAAE;AAVa,CAA/B;AAYA,eAAeV,IAAf","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst enGB: TranslationsType = {\n save: 'Save',\n selectSingle: 'Select date',\n selectMultiple: 'Select dates',\n selectRange: 'Select period',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Date format must be ${inputFormat}`,\n mustBeHigherThan: 'Must be later then',\n mustBeLowerThan: 'Must be earlier then',\n mustBeBetween: 'Must be between',\n dateIsDisabled: 'Day is not allowed',\n}\nexport default enGB\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const pl = {
|
|
2
|
+
save: 'Zapisz',
|
|
3
|
+
selectSingle: 'Wybierz datę',
|
|
4
|
+
selectMultiple: 'Wybierz daty',
|
|
5
|
+
selectRange: 'Wybierz zakres',
|
|
6
|
+
notAccordingToDateFormat: inputFormat => `Data musi mieć format ${inputFormat}`,
|
|
7
|
+
mustBeHigherThan: 'Nie wcześniej niż',
|
|
8
|
+
mustBeLowerThan: 'Nie później niż',
|
|
9
|
+
mustBeBetween: 'Pomiędzy',
|
|
10
|
+
dateIsDisabled: 'Niedozwolona data'
|
|
11
|
+
};
|
|
12
|
+
export default pl;
|
|
13
|
+
//# sourceMappingURL=pl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["pl.ts"],"names":["pl","save","selectSingle","selectMultiple","selectRange","notAccordingToDateFormat","inputFormat","mustBeHigherThan","mustBeLowerThan","mustBeBetween","dateIsDisabled"],"mappings":"AAEA,MAAMA,EAAoB,GAAG;AAC3BC,EAAAA,IAAI,EAAE,QADqB;AAE3BC,EAAAA,YAAY,EAAE,cAFa;AAG3BC,EAAAA,cAAc,EAAE,cAHW;AAI3BC,EAAAA,WAAW,EAAE,gBAJc;AAK3BC,EAAAA,wBAAwB,EAAGC,WAAD,IACvB,yBAAwBA,WAAY,EANZ;AAO3BC,EAAAA,gBAAgB,EAAE,mBAPS;AAQ3BC,EAAAA,eAAe,EAAE,iBARU;AAS3BC,EAAAA,aAAa,EAAE,UATY;AAU3BC,EAAAA,cAAc,EAAE;AAVW,CAA7B;AAYA,eAAeV,EAAf","sourcesContent":["import type { TranslationsType } from './utils'\n\nconst pl: TranslationsType = {\n save: 'Zapisz',\n selectSingle: 'Wybierz datę',\n selectMultiple: 'Wybierz daty',\n selectRange: 'Wybierz zakres',\n notAccordingToDateFormat: (inputFormat: string) =>\n `Data musi mieć format ${inputFormat}`,\n mustBeHigherThan: 'Nie wcześniej niż',\n mustBeLowerThan: 'Nie później niż',\n mustBeBetween: 'Pomiędzy',\n dateIsDisabled: 'Niedozwolona data',\n}\nexport default pl\n"]}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ValidRangeType } from './Calendar';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<(Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Omit<(Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
4
4
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
5
|
-
}) | (Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
5
|
+
}) | (Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
6
6
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
7
7
|
} & {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}), "onChange" | "value"> & {
|
|
10
|
-
inputMode: "
|
|
10
|
+
inputMode: "end" | "start";
|
|
11
11
|
locale: string;
|
|
12
12
|
onChange: (date: Date | undefined) => void;
|
|
13
13
|
value: Date | undefined;
|
|
14
14
|
validRange?: ValidRangeType | undefined;
|
|
15
15
|
withModal?: boolean | undefined;
|
|
16
16
|
withDateFormatInLabel?: boolean | undefined;
|
|
17
|
-
}, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
17
|
+
}, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "theme" | "locale" | "validRange" | "inputMode" | "withModal" | "withDateFormatInLabel"> & React.RefAttributes<unknown>>;
|
|
18
18
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<((Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
2
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<((Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
3
3
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
4
|
-
}) | (Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
4
|
+
}) | (Pick<import("react-native-paper/lib/typescript/components/TextInput/TextInput").TextInputProps, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "ref" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense"> & {
|
|
5
5
|
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
|
|
6
6
|
} & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
})) & {
|
|
9
9
|
mask: string;
|
|
10
|
-
}, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "
|
|
10
|
+
}, "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "keyboardType" | "maxLength" | "multiline" | "onBlur" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onPressIn" | "onPressOut" | "onFocus" | "onSelectionChange" | "onSubmitEditing" | "onTextInput" | "onScroll" | "onKeyPress" | "placeholder" | "placeholderTextColor" | "returnKeyType" | "secureTextEntry" | "selectTextOnFocus" | "selection" | "selectionColor" | "style" | "textAlign" | "testID" | "inputAccessoryViewID" | "value" | "maxFontSizeMultiplier" | "hitSlop" | "onLayout" | "pointerEvents" | "removeClippedSubviews" | "nativeID" | "collapsable" | "needsOffscreenAlphaCompositing" | "renderToHardwareTextureAndroid" | "focusable" | "shouldRasterizeIOS" | "isTVSelectable" | "hasTVPreferredFocus" | "tvParallaxProperties" | "tvParallaxShiftDistanceX" | "tvParallaxShiftDistanceY" | "tvParallaxTiltAngle" | "tvParallaxMagnification" | "onStartShouldSetResponder" | "onMoveShouldSetResponder" | "onResponderEnd" | "onResponderGrant" | "onResponderReject" | "onResponderMove" | "onResponderRelease" | "onResponderStart" | "onResponderTerminationRequest" | "onResponderTerminate" | "onStartShouldSetResponderCapture" | "onMoveShouldSetResponderCapture" | "onTouchStart" | "onTouchMove" | "onTouchEnd" | "onTouchCancel" | "onTouchEndCapture" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "selectionState" | "spellCheck" | "textContentType" | "scrollEnabled" | "importantForAutofill" | "disableFullscreenUI" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "textBreakStrategy" | "underlineColorAndroid" | "textAlignVertical" | "showSoftInputOnFocus" | "label" | "key" | "render" | "left" | "right" | "disabled" | "mode" | "error" | "autoCompleteType" | "underlineColor" | "activeUnderlineColor" | "outlineColor" | "activeOutlineColor" | "dense" | "mask" | "theme"> & React.RefAttributes<unknown>>;
|
|
11
11
|
export default _default;
|
|
@@ -5,7 +5,7 @@ declare function AnalogClock({ hours, minutes, focused, is24Hour, onChange, }: {
|
|
|
5
5
|
minutes: number;
|
|
6
6
|
focused: PossibleClockTypes;
|
|
7
7
|
is24Hour: boolean;
|
|
8
|
-
onChange: (
|
|
8
|
+
onChange: (hoursMinutesAndFocused: {
|
|
9
9
|
hours: number;
|
|
10
10
|
minutes: number;
|
|
11
11
|
focused?: undefined | PossibleClockTypes;
|
|
@@ -6,7 +6,7 @@ declare function TimeInputs({ hours, minutes, onFocusInput, focused, inputType,
|
|
|
6
6
|
hours: number;
|
|
7
7
|
minutes: number;
|
|
8
8
|
onFocusInput: (type: PossibleClockTypes) => any;
|
|
9
|
-
onChange: (
|
|
9
|
+
onChange: (hoursMinutesAndFocused: {
|
|
10
10
|
hours: number;
|
|
11
11
|
minutes: number;
|
|
12
12
|
focused?: undefined | PossibleClockTypes;
|
|
@@ -8,7 +8,7 @@ export declare function TimePickerModal({ visible, onDismiss, onConfirm, hours,
|
|
|
8
8
|
minutes?: number | undefined;
|
|
9
9
|
visible: boolean | undefined;
|
|
10
10
|
onDismiss: () => any;
|
|
11
|
-
onConfirm: (
|
|
11
|
+
onConfirm: (hoursAndMinutes: {
|
|
12
12
|
hours: number;
|
|
13
13
|
minutes: number;
|
|
14
14
|
}) => any;
|
|
@@ -9,3 +9,5 @@ export type { TranslationsType } from './translations/utils';
|
|
|
9
9
|
export { registerTranslation, getTranslation } from './translations/utils';
|
|
10
10
|
export { default as nl } from './translations/nl';
|
|
11
11
|
export { default as en } from './translations/en';
|
|
12
|
+
export { default as pl } from './translations/pl';
|
|
13
|
+
export { default as enGB } from './translations/enGB';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-paper-dates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Performant Date Picker for React Native Paper",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -48,26 +48,26 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@commitlint/config-conventional": "^11.0.0",
|
|
51
|
-
"@react-native-community/eslint-config": "^
|
|
51
|
+
"@react-native-community/eslint-config": "^3.0.1",
|
|
52
52
|
"@release-it/conventional-changelog": "^2.0.0",
|
|
53
|
-
"@types/color": "^3.0.
|
|
54
|
-
"@types/jest": "^26.0.
|
|
55
|
-
"@types/react": "^16.
|
|
56
|
-
"@types/react-native": "^0.
|
|
53
|
+
"@types/color": "^3.0.2",
|
|
54
|
+
"@types/jest": "^26.0.24",
|
|
55
|
+
"@types/react": "^16.14.20",
|
|
56
|
+
"@types/react-native": "^0.66.1",
|
|
57
57
|
"commitlint": "^11.0.0",
|
|
58
|
-
"eslint": "^7.
|
|
59
|
-
"eslint-config-prettier": "^
|
|
60
|
-
"eslint-plugin-prettier": "^
|
|
58
|
+
"eslint": "^7.32.0",
|
|
59
|
+
"eslint-config-prettier": "^8.3.0",
|
|
60
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
61
61
|
"husky": "^4.2.5",
|
|
62
62
|
"jest": "^26.0.1",
|
|
63
|
-
"pod-install": "^0.1.
|
|
64
|
-
"prettier": "^2.
|
|
63
|
+
"pod-install": "^0.1.28",
|
|
64
|
+
"prettier": "^2.4.1",
|
|
65
65
|
"react": "16.13.1",
|
|
66
66
|
"react-native": "^0.64.2",
|
|
67
|
-
"react-native-builder-bob": "
|
|
68
|
-
"react-native-paper": "^4.
|
|
69
|
-
"release-it": "^14.
|
|
70
|
-
"typescript": "^4.
|
|
67
|
+
"react-native-builder-bob": "latest",
|
|
68
|
+
"react-native-paper": "^4.10.0",
|
|
69
|
+
"release-it": "^14.11.6",
|
|
70
|
+
"typescript": "^4.4.4"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": "*",
|
|
@@ -132,7 +132,9 @@
|
|
|
132
132
|
},
|
|
133
133
|
"eslintIgnore": [
|
|
134
134
|
"node_modules/",
|
|
135
|
-
"lib/"
|
|
135
|
+
"lib/",
|
|
136
|
+
"example/node_modules",
|
|
137
|
+
"example/web-build"
|
|
136
138
|
],
|
|
137
139
|
"prettier": {
|
|
138
140
|
"quoteProps": "consistent",
|
|
@@ -157,6 +159,6 @@
|
|
|
157
159
|
]
|
|
158
160
|
},
|
|
159
161
|
"dependencies": {
|
|
160
|
-
"color": "^3.1
|
|
162
|
+
"color": "^3.2.1"
|
|
161
163
|
}
|
|
162
164
|
}
|
|
@@ -88,6 +88,7 @@ function CalendarEdit({
|
|
|
88
88
|
validRange={validRange}
|
|
89
89
|
locale={locale}
|
|
90
90
|
withModal={false}
|
|
91
|
+
autoCompleteType={'off'}
|
|
91
92
|
/>
|
|
92
93
|
) : null}
|
|
93
94
|
{mode === 'range' ? (
|
|
@@ -103,6 +104,7 @@ function CalendarEdit({
|
|
|
103
104
|
validRange={validRange}
|
|
104
105
|
locale={locale}
|
|
105
106
|
withModal={false}
|
|
107
|
+
autoCompleteType={'off'}
|
|
106
108
|
/>
|
|
107
109
|
<View style={styles.separator} />
|
|
108
110
|
<DatePickerInput
|
|
@@ -115,6 +117,7 @@ function CalendarEdit({
|
|
|
115
117
|
validRange={validRange}
|
|
116
118
|
locale={locale}
|
|
117
119
|
withModal={false}
|
|
120
|
+
autoCompleteType={'off'}
|
|
118
121
|
/>
|
|
119
122
|
</>
|
|
120
123
|
) : null}
|
|
@@ -46,7 +46,13 @@ function CalendarHeader({
|
|
|
46
46
|
{ backgroundColor: theme.colors.surface },
|
|
47
47
|
]}
|
|
48
48
|
>
|
|
49
|
-
<IconButton
|
|
49
|
+
<IconButton
|
|
50
|
+
icon="chevron-left"
|
|
51
|
+
onPress={onPrev}
|
|
52
|
+
// RN types bug
|
|
53
|
+
hasTVPreferredFocus={undefined}
|
|
54
|
+
tvParallaxProperties={undefined}
|
|
55
|
+
/>
|
|
50
56
|
</View>
|
|
51
57
|
|
|
52
58
|
<View
|
|
@@ -55,7 +61,13 @@ function CalendarHeader({
|
|
|
55
61
|
{ backgroundColor: theme.colors.surface },
|
|
56
62
|
]}
|
|
57
63
|
>
|
|
58
|
-
<IconButton
|
|
64
|
+
<IconButton
|
|
65
|
+
icon="chevron-right"
|
|
66
|
+
onPress={onNext}
|
|
67
|
+
// RN types bug
|
|
68
|
+
hasTVPreferredFocus={undefined}
|
|
69
|
+
tvParallaxProperties={undefined}
|
|
70
|
+
/>
|
|
59
71
|
</View>
|
|
60
72
|
</View>
|
|
61
73
|
) : null}
|
|
@@ -34,6 +34,9 @@ export default function DatePickerModalHeader(
|
|
|
34
34
|
onPress={props.onDismiss}
|
|
35
35
|
color={color}
|
|
36
36
|
testID="react-native-paper-dates-close"
|
|
37
|
+
// RN types bug
|
|
38
|
+
hasTVPreferredFocus={undefined}
|
|
39
|
+
tvParallaxProperties={undefined}
|
|
37
40
|
/>
|
|
38
41
|
<Appbar.Content title={''} />
|
|
39
42
|
<Button
|
|
@@ -50,7 +50,13 @@ export default function DateRangeInput({ locale }: { locale: string }) {
|
|
|
50
50
|
<Text>Tot</Text>
|
|
51
51
|
</View>
|
|
52
52
|
<View>
|
|
53
|
-
<IconButton
|
|
53
|
+
<IconButton
|
|
54
|
+
icon="calendar"
|
|
55
|
+
onPress={() => setVisible(true)}
|
|
56
|
+
// RN types bug
|
|
57
|
+
hasTVPreferredFocus={undefined}
|
|
58
|
+
tvParallaxProperties={undefined}
|
|
59
|
+
/>
|
|
54
60
|
<Text style={{ opacity: 0 }} accessible={false}>
|
|
55
61
|
tot
|
|
56
62
|
</Text>
|
package/src/Date/Day.tsx
CHANGED
package/src/Date/Month.tsx
CHANGED
|
@@ -266,6 +266,9 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
|
|
|
266
266
|
borderRadius: roundness,
|
|
267
267
|
},
|
|
268
268
|
]}
|
|
269
|
+
// RN types bug
|
|
270
|
+
hasTVPreferredFocus={undefined}
|
|
271
|
+
tvParallaxProperties={undefined}
|
|
269
272
|
>
|
|
270
273
|
<View
|
|
271
274
|
style={[
|
|
@@ -285,6 +288,9 @@ function Month(props: MonthSingleProps | MonthRangeProps | MonthMultiProps) {
|
|
|
285
288
|
<IconButton
|
|
286
289
|
onPress={isHorizontal ? () => onPressYear(year) : undefined}
|
|
287
290
|
icon={selectingYear ? 'chevron-up' : 'chevron-down'}
|
|
291
|
+
// RN types bug
|
|
292
|
+
hasTVPreferredFocus={undefined}
|
|
293
|
+
tvParallaxProperties={undefined}
|
|
288
294
|
/>
|
|
289
295
|
</View>
|
|
290
296
|
</View>
|
package/src/Date/Swiper.tsx
CHANGED
|
@@ -94,6 +94,7 @@ function VerticalScroller({
|
|
|
94
94
|
const [visibleIndexes, setVisibleIndexes] = React.useState<number[]>(
|
|
95
95
|
visibleArray(initialIndex)
|
|
96
96
|
)
|
|
97
|
+
// eslint-disable-next-line no-undef
|
|
97
98
|
const parentRef = React.useRef<HTMLDivElement | null>(null)
|
|
98
99
|
|
|
99
100
|
useIsomorphicLayoutEffect(() => {
|
package/src/Date/YearPicker.tsx
CHANGED
|
@@ -67,7 +67,7 @@ function YearPure({
|
|
|
67
67
|
}: {
|
|
68
68
|
year: number
|
|
69
69
|
selected: boolean
|
|
70
|
-
onPressYear: (
|
|
70
|
+
onPressYear: (newYear: number) => any
|
|
71
71
|
}) {
|
|
72
72
|
const theme = useTheme()
|
|
73
73
|
return (
|
|
@@ -75,6 +75,9 @@ function YearPure({
|
|
|
75
75
|
<TouchableRipple
|
|
76
76
|
onPress={() => onPressYear(year)}
|
|
77
77
|
style={styles.yearButton}
|
|
78
|
+
// RN types bug
|
|
79
|
+
hasTVPreferredFocus={undefined}
|
|
80
|
+
tvParallaxProperties={undefined}
|
|
78
81
|
>
|
|
79
82
|
<View
|
|
80
83
|
style={[
|
package/src/Time/AnalogClock.tsx
CHANGED
|
@@ -35,11 +35,7 @@ function AnalogClock({
|
|
|
35
35
|
minutes: number
|
|
36
36
|
focused: PossibleClockTypes
|
|
37
37
|
is24Hour: boolean
|
|
38
|
-
onChange: ({
|
|
39
|
-
hours,
|
|
40
|
-
minutes,
|
|
41
|
-
focused,
|
|
42
|
-
}: {
|
|
38
|
+
onChange: (hoursMinutesAndFocused: {
|
|
43
39
|
hours: number
|
|
44
40
|
minutes: number
|
|
45
41
|
focused?: undefined | PossibleClockTypes
|