@codeleap/mobile 4.1.0 → 4.2.1
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/Registry.d.ts +7 -0
- package/dist/Registry.js +67 -0
- package/dist/Registry.js.map +1 -0
- package/dist/components/ActionIcon/index.d.ts +13 -0
- package/dist/components/ActionIcon/index.js +79 -0
- package/dist/components/ActionIcon/index.js.map +1 -0
- package/dist/components/ActionIcon/styles.d.ts +5 -0
- package/dist/components/ActionIcon/styles.js +3 -0
- package/dist/components/ActionIcon/styles.js.map +1 -0
- package/dist/components/ActionIcon/types.d.ts +11 -0
- package/dist/components/ActionIcon/types.js +3 -0
- package/dist/components/ActionIcon/types.js.map +1 -0
- package/dist/components/ActivityIndicator/index.d.ts +15 -0
- package/dist/components/ActivityIndicator/index.js +66 -0
- package/dist/components/ActivityIndicator/index.js.map +1 -0
- package/dist/components/ActivityIndicator/styles.d.ts +1 -0
- package/dist/components/ActivityIndicator/styles.js +3 -0
- package/dist/components/ActivityIndicator/styles.js.map +1 -0
- package/dist/components/ActivityIndicator/types.d.ts +9 -0
- package/dist/components/ActivityIndicator/types.js +3 -0
- package/dist/components/ActivityIndicator/types.js.map +1 -0
- package/dist/components/Autocomplete/index.d.ts +13 -0
- package/dist/components/Autocomplete/index.js +192 -0
- package/dist/components/Autocomplete/index.js.map +1 -0
- package/dist/components/Autocomplete/styles.d.ts +8 -0
- package/dist/components/Autocomplete/styles.js +3 -0
- package/dist/components/Autocomplete/styles.js.map +1 -0
- package/dist/components/Autocomplete/types.d.ts +58 -0
- package/dist/components/Autocomplete/types.js +3 -0
- package/dist/components/Autocomplete/types.js.map +1 -0
- package/dist/components/Avatar/index.d.ts +13 -0
- package/dist/components/Avatar/index.js +112 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Avatar/styles.d.ts +2 -0
- package/dist/components/Avatar/styles.js +3 -0
- package/dist/components/Avatar/styles.js.map +1 -0
- package/dist/components/Avatar/types.d.ts +19 -0
- package/dist/components/Avatar/types.js +3 -0
- package/dist/components/Avatar/types.js.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +13 -0
- package/dist/components/AvatarGroup/index.js +79 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/AvatarGroup/styles.d.ts +3 -0
- package/dist/components/AvatarGroup/styles.js +3 -0
- package/dist/components/AvatarGroup/styles.js.map +1 -0
- package/dist/components/AvatarGroup/types.d.ts +9 -0
- package/dist/components/AvatarGroup/types.js +3 -0
- package/dist/components/AvatarGroup/types.js.map +1 -0
- package/dist/components/Backdrop/index.d.ts +13 -0
- package/dist/components/Backdrop/index.js +82 -0
- package/dist/components/Backdrop/index.js.map +1 -0
- package/dist/components/Backdrop/styles.d.ts +1 -0
- package/dist/components/Backdrop/styles.js +3 -0
- package/dist/components/Backdrop/styles.js.map +1 -0
- package/dist/components/Backdrop/types.d.ts +11 -0
- package/dist/components/Backdrop/types.js +3 -0
- package/dist/components/Backdrop/types.js.map +1 -0
- package/dist/components/Badge/index.d.ts +13 -0
- package/dist/components/Badge/index.js +109 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Badge/styles.d.ts +4 -0
- package/dist/components/Badge/styles.js +3 -0
- package/dist/components/Badge/styles.js.map +1 -0
- package/dist/components/Badge/types.d.ts +27 -0
- package/dist/components/Badge/types.js +3 -0
- package/dist/components/Badge/types.js.map +1 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.js +123 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/styles.d.ts +12 -0
- package/dist/components/Button/styles.js +3 -0
- package/dist/components/Button/styles.js.map +1 -0
- package/dist/components/Button/types.d.ts +16 -0
- package/dist/components/Button/types.js +3 -0
- package/dist/components/Button/types.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +19 -0
- package/dist/components/Calendar/index.js +82 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Calendar/types.d.ts +95 -0
- package/dist/components/Calendar/types.js +3 -0
- package/dist/components/Calendar/types.js.map +1 -0
- package/dist/components/Checkbox/index.d.ts +13 -0
- package/dist/components/Checkbox/index.js +120 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Checkbox/styles.d.ts +7 -0
- package/dist/components/Checkbox/styles.js +3 -0
- package/dist/components/Checkbox/styles.js.map +1 -0
- package/dist/components/Checkbox/types.d.ts +10 -0
- package/dist/components/Checkbox/types.js +3 -0
- package/dist/components/Checkbox/types.js.map +1 -0
- package/dist/components/DatePickerModal/index.d.ts +13 -0
- package/dist/components/DatePickerModal/index.js +156 -0
- package/dist/components/DatePickerModal/index.js.map +1 -0
- package/dist/components/DatePickerModal/styles.d.ts +5 -0
- package/dist/components/DatePickerModal/styles.js +3 -0
- package/dist/components/DatePickerModal/styles.js.map +1 -0
- package/dist/components/DatePickerModal/types.d.ts +42 -0
- package/dist/components/DatePickerModal/types.js +3 -0
- package/dist/components/DatePickerModal/types.js.map +1 -0
- package/dist/components/EmptyPlaceholder/index.d.ts +13 -0
- package/dist/components/EmptyPlaceholder/index.js +87 -0
- package/dist/components/EmptyPlaceholder/index.js.map +1 -0
- package/dist/components/EmptyPlaceholder/styles.d.ts +2 -0
- package/dist/components/EmptyPlaceholder/styles.js +3 -0
- package/dist/components/EmptyPlaceholder/styles.js.map +1 -0
- package/dist/components/EmptyPlaceholder/types.d.ts +20 -0
- package/dist/components/EmptyPlaceholder/types.js +3 -0
- package/dist/components/EmptyPlaceholder/types.js.map +1 -0
- package/dist/components/FileInput/index.d.ts +9 -0
- package/dist/components/FileInput/index.js +218 -0
- package/dist/components/FileInput/index.js.map +1 -0
- package/dist/components/FileInput/types.d.ts +23 -0
- package/dist/components/FileInput/types.js +3 -0
- package/dist/components/FileInput/types.js.map +1 -0
- package/dist/components/Grid/index.d.ts +5 -0
- package/dist/components/Grid/index.js +110 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Grid/styles.d.ts +2 -0
- package/dist/components/Grid/styles.js +3 -0
- package/dist/components/Grid/styles.js.map +1 -0
- package/dist/components/Grid/types.d.ts +15 -0
- package/dist/components/Grid/types.js +3 -0
- package/dist/components/Grid/types.js.map +1 -0
- package/dist/components/Icon/index.d.ts +7 -0
- package/dist/components/Icon/index.js +96 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Icon/styles.d.ts +2 -0
- package/dist/components/Icon/styles.js +3 -0
- package/dist/components/Icon/styles.js.map +1 -0
- package/dist/components/Icon/types.d.ts +12 -0
- package/dist/components/Icon/types.js +3 -0
- package/dist/components/Icon/types.js.map +1 -0
- package/dist/components/Image/index.d.ts +5 -0
- package/dist/components/Image/index.js +151 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Image/styles.d.ts +2 -0
- package/dist/components/Image/styles.js +3 -0
- package/dist/components/Image/styles.js.map +1 -0
- package/dist/components/Image/types.d.ts +16 -0
- package/dist/components/Image/types.js +3 -0
- package/dist/components/Image/types.js.map +1 -0
- package/dist/components/ImageView/Spotlight.d.ts +41 -0
- package/dist/components/ImageView/Spotlight.js +178 -0
- package/dist/components/ImageView/Spotlight.js.map +1 -0
- package/dist/components/ImageView/component.d.ts +5 -0
- package/dist/components/ImageView/component.js +18 -0
- package/dist/components/ImageView/component.js.map +1 -0
- package/dist/components/ImageView/index.d.ts +2 -0
- package/dist/components/ImageView/index.js +19 -0
- package/dist/components/ImageView/index.js.map +1 -0
- package/dist/components/InputBase/index.d.ts +11 -0
- package/dist/components/InputBase/index.js +110 -0
- package/dist/components/InputBase/index.js.map +1 -0
- package/dist/components/InputBase/styles.d.ts +20 -0
- package/dist/components/InputBase/styles.js +99 -0
- package/dist/components/InputBase/styles.js.map +1 -0
- package/dist/components/InputBase/types.d.ts +26 -0
- package/dist/components/InputBase/types.js +3 -0
- package/dist/components/InputBase/types.js.map +1 -0
- package/dist/components/InputBase/utils.d.ts +12 -0
- package/dist/components/InputBase/utils.js +41 -0
- package/dist/components/InputBase/utils.js.map +1 -0
- package/dist/components/List/index.d.ts +5 -0
- package/dist/components/List/index.js +104 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/List/styles.d.ts +5 -0
- package/dist/components/List/styles.js +3 -0
- package/dist/components/List/styles.js.map +1 -0
- package/dist/components/List/types.d.ts +36 -0
- package/dist/components/List/types.js +3 -0
- package/dist/components/List/types.js.map +1 -0
- package/dist/components/LoadingOverlay/index.d.ts +13 -0
- package/dist/components/LoadingOverlay/index.js +84 -0
- package/dist/components/LoadingOverlay/index.js.map +1 -0
- package/dist/components/LoadingOverlay/styles.d.ts +4 -0
- package/dist/components/LoadingOverlay/styles.js +3 -0
- package/dist/components/LoadingOverlay/styles.js.map +1 -0
- package/dist/components/LoadingOverlay/types.d.ts +8 -0
- package/dist/components/LoadingOverlay/types.js +3 -0
- package/dist/components/LoadingOverlay/types.js.map +1 -0
- package/dist/components/Modal/index.d.ts +14 -0
- package/dist/components/Modal/index.js +151 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +4 -0
- package/dist/components/Modal/styles.js +3 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Modal/types.d.ts +36 -0
- package/dist/components/Modal/types.js +3 -0
- package/dist/components/Modal/types.js.map +1 -0
- package/dist/components/Navigation/Navigation.d.ts +55 -0
- package/dist/components/Navigation/Navigation.js +84 -0
- package/dist/components/Navigation/Navigation.js.map +1 -0
- package/dist/components/Navigation/constants.d.ts +9 -0
- package/dist/components/Navigation/constants.js +12 -0
- package/dist/components/Navigation/constants.js.map +1 -0
- package/dist/components/Navigation/index.d.ts +3 -0
- package/dist/components/Navigation/index.js +20 -0
- package/dist/components/Navigation/index.js.map +1 -0
- package/dist/components/Navigation/types.d.ts +26 -0
- package/dist/components/Navigation/types.js +3 -0
- package/dist/components/Navigation/types.js.map +1 -0
- package/dist/components/Navigation/utils.d.ts +3 -0
- package/dist/components/Navigation/utils.js +69 -0
- package/dist/components/Navigation/utils.js.map +1 -0
- package/dist/components/NumberIncrement/index.d.ts +5 -0
- package/dist/components/NumberIncrement/index.js +263 -0
- package/dist/components/NumberIncrement/index.js.map +1 -0
- package/dist/components/NumberIncrement/styles.d.ts +4 -0
- package/dist/components/NumberIncrement/styles.js +3 -0
- package/dist/components/NumberIncrement/styles.js.map +1 -0
- package/dist/components/NumberIncrement/types.d.ts +34 -0
- package/dist/components/NumberIncrement/types.js +3 -0
- package/dist/components/NumberIncrement/types.js.map +1 -0
- package/dist/components/NumberIncrement/utils.d.ts +5 -0
- package/dist/components/NumberIncrement/utils.js +27 -0
- package/dist/components/NumberIncrement/utils.js.map +1 -0
- package/dist/components/Pager/PagerDots.d.ts +16 -0
- package/dist/components/Pager/PagerDots.js +58 -0
- package/dist/components/Pager/PagerDots.js.map +1 -0
- package/dist/components/Pager/index.d.ts +14 -0
- package/dist/components/Pager/index.js +127 -0
- package/dist/components/Pager/index.js.map +1 -0
- package/dist/components/Pager/styles.d.ts +4 -0
- package/dist/components/Pager/styles.js +3 -0
- package/dist/components/Pager/styles.js.map +1 -0
- package/dist/components/Pager/types.d.ts +25 -0
- package/dist/components/Pager/types.js +3 -0
- package/dist/components/Pager/types.js.map +1 -0
- package/dist/components/PaginationIndicator/index.d.ts +11 -0
- package/dist/components/PaginationIndicator/index.js +49 -0
- package/dist/components/PaginationIndicator/index.js.map +1 -0
- package/dist/components/PaginationIndicator/styles.d.ts +2 -0
- package/dist/components/PaginationIndicator/styles.js +3 -0
- package/dist/components/PaginationIndicator/styles.js.map +1 -0
- package/dist/components/PaginationIndicator/types.d.ts +10 -0
- package/dist/components/PaginationIndicator/types.js +3 -0
- package/dist/components/PaginationIndicator/types.js.map +1 -0
- package/dist/components/PlacesAutocomplete/index.d.ts +19 -0
- package/dist/components/PlacesAutocomplete/index.js +127 -0
- package/dist/components/PlacesAutocomplete/index.js.map +1 -0
- package/dist/components/PlacesAutocomplete/styles.d.ts +4 -0
- package/dist/components/PlacesAutocomplete/styles.js +3 -0
- package/dist/components/PlacesAutocomplete/styles.js.map +1 -0
- package/dist/components/PlacesAutocomplete/types.d.ts +41 -0
- package/dist/components/PlacesAutocomplete/types.js +3 -0
- package/dist/components/PlacesAutocomplete/types.js.map +1 -0
- package/dist/components/RadioInput/index.d.ts +13 -0
- package/dist/components/RadioInput/index.js +123 -0
- package/dist/components/RadioInput/index.js.map +1 -0
- package/dist/components/RadioInput/styles.d.ts +6 -0
- package/dist/components/RadioInput/styles.js +3 -0
- package/dist/components/RadioInput/styles.js.map +1 -0
- package/dist/components/RadioInput/types.d.ts +27 -0
- package/dist/components/RadioInput/types.js +3 -0
- package/dist/components/RadioInput/types.js.map +1 -0
- package/dist/components/RefreshControl/index.d.ts +13 -0
- package/dist/components/RefreshControl/index.js +67 -0
- package/dist/components/RefreshControl/index.js.map +1 -0
- package/dist/components/RefreshControl/styles.d.ts +1 -0
- package/dist/components/RefreshControl/styles.js +3 -0
- package/dist/components/RefreshControl/styles.js.map +1 -0
- package/dist/components/RefreshControl/types.d.ts +6 -0
- package/dist/components/RefreshControl/types.js +3 -0
- package/dist/components/RefreshControl/types.js.map +1 -0
- package/dist/components/Scroll/index.d.ts +5 -0
- package/dist/components/Scroll/index.js +108 -0
- package/dist/components/Scroll/index.js.map +1 -0
- package/dist/components/Scroll/styles.d.ts +1 -0
- package/dist/components/Scroll/styles.js +3 -0
- package/dist/components/Scroll/styles.js.map +1 -0
- package/dist/components/Scroll/types.d.ts +16 -0
- package/dist/components/Scroll/types.js +3 -0
- package/dist/components/Scroll/types.js.map +1 -0
- package/dist/components/SearchInput/index.d.ts +15 -0
- package/dist/components/SearchInput/index.js +93 -0
- package/dist/components/SearchInput/index.js.map +1 -0
- package/dist/components/Sections/index.d.ts +5 -0
- package/dist/components/Sections/index.js +118 -0
- package/dist/components/Sections/index.js.map +1 -0
- package/dist/components/Sections/styles.d.ts +1 -0
- package/dist/components/Sections/styles.js +3 -0
- package/dist/components/Sections/styles.js.map +1 -0
- package/dist/components/Sections/types.d.ts +34 -0
- package/dist/components/Sections/types.js +3 -0
- package/dist/components/Sections/types.js.map +1 -0
- package/dist/components/SegmentedControl/Option.d.ts +18 -0
- package/dist/components/SegmentedControl/Option.js +44 -0
- package/dist/components/SegmentedControl/Option.js.map +1 -0
- package/dist/components/SegmentedControl/index.d.ts +5 -0
- package/dist/components/SegmentedControl/index.js +174 -0
- package/dist/components/SegmentedControl/index.js.map +1 -0
- package/dist/components/SegmentedControl/styles.d.ts +8 -0
- package/dist/components/SegmentedControl/styles.js +3 -0
- package/dist/components/SegmentedControl/styles.js.map +1 -0
- package/dist/components/SegmentedControl/types.d.ts +34 -0
- package/dist/components/SegmentedControl/types.js +3 -0
- package/dist/components/SegmentedControl/types.js.map +1 -0
- package/dist/components/Select/index.d.ts +13 -0
- package/dist/components/Select/index.js +259 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Select/styles.d.ts +9 -0
- package/dist/components/Select/styles.js +3 -0
- package/dist/components/Select/styles.js.map +1 -0
- package/dist/components/Select/types.d.ts +77 -0
- package/dist/components/Select/types.js +3 -0
- package/dist/components/Select/types.js.map +1 -0
- package/dist/components/Slider/index.d.ts +13 -0
- package/dist/components/Slider/index.js +183 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/styles.d.ts +11 -0
- package/dist/components/Slider/styles.js +3 -0
- package/dist/components/Slider/styles.js.map +1 -0
- package/dist/components/Slider/types.d.ts +22 -0
- package/dist/components/Slider/types.js +3 -0
- package/dist/components/Slider/types.js.map +1 -0
- package/dist/components/SortablePhotos/index.d.ts +13 -0
- package/dist/components/SortablePhotos/index.js +125 -0
- package/dist/components/SortablePhotos/index.js.map +1 -0
- package/dist/components/SortablePhotos/styles.d.ts +2 -0
- package/dist/components/SortablePhotos/styles.js +3 -0
- package/dist/components/SortablePhotos/styles.js.map +1 -0
- package/dist/components/SortablePhotos/types.d.ts +54 -0
- package/dist/components/SortablePhotos/types.js +3 -0
- package/dist/components/SortablePhotos/types.js.map +1 -0
- package/dist/components/SortablePhotos/useSortablePhotos.d.ts +21 -0
- package/dist/components/SortablePhotos/useSortablePhotos.js +192 -0
- package/dist/components/SortablePhotos/useSortablePhotos.js.map +1 -0
- package/dist/components/Switch/index.d.ts +13 -0
- package/dist/components/Switch/index.js +115 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/styles.d.ts +7 -0
- package/dist/components/Switch/styles.js +3 -0
- package/dist/components/Switch/styles.js.map +1 -0
- package/dist/components/Switch/types.d.ts +9 -0
- package/dist/components/Switch/types.js +3 -0
- package/dist/components/Switch/types.js.map +1 -0
- package/dist/components/Text/index.d.ts +7 -0
- package/dist/components/Text/index.js +127 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Text/styles.d.ts +6 -0
- package/dist/components/Text/styles.js +3 -0
- package/dist/components/Text/styles.js.map +1 -0
- package/dist/components/Text/types.d.ts +16 -0
- package/dist/components/Text/types.js +3 -0
- package/dist/components/Text/types.js.map +1 -0
- package/dist/components/TextInput/index.d.ts +5 -0
- package/dist/components/TextInput/index.js +181 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/TextInput/styles.d.ts +5 -0
- package/dist/components/TextInput/styles.js +3 -0
- package/dist/components/TextInput/styles.js.map +1 -0
- package/dist/components/TextInput/types.d.ts +21 -0
- package/dist/components/TextInput/types.js +3 -0
- package/dist/components/TextInput/types.js.map +1 -0
- package/dist/components/Touchable/index.d.ts +5 -0
- package/dist/components/Touchable/index.js +220 -0
- package/dist/components/Touchable/index.js.map +1 -0
- package/dist/components/Touchable/styles.d.ts +6 -0
- package/dist/components/Touchable/styles.js +3 -0
- package/dist/components/Touchable/styles.js.map +1 -0
- package/dist/components/Touchable/types.d.ts +25 -0
- package/dist/components/Touchable/types.js +3 -0
- package/dist/components/Touchable/types.js.map +1 -0
- package/dist/components/View/index.d.ts +13 -0
- package/dist/components/View/index.js +53 -0
- package/dist/components/View/index.js.map +1 -0
- package/dist/components/View/styles.d.ts +1 -0
- package/dist/components/View/styles.js +3 -0
- package/dist/components/View/styles.js.map +1 -0
- package/dist/components/View/types.d.ts +13 -0
- package/dist/components/View/types.js +3 -0
- package/dist/components/View/types.js.map +1 -0
- package/dist/components/components.d.ts +42 -0
- package/dist/components/components.js +59 -0
- package/dist/components/components.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +15 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/PressableRipple/index.d.ts +2 -0
- package/dist/modules/PressableRipple/index.js +9 -0
- package/dist/modules/PressableRipple/index.js.map +1 -0
- package/dist/modules/PressableRipple/ripple.d.ts +30 -0
- package/dist/modules/PressableRipple/ripple.js +213 -0
- package/dist/modules/PressableRipple/ripple.js.map +1 -0
- package/dist/modules/PressableRipple/styles.d.ts +19 -0
- package/dist/modules/PressableRipple/styles.js +29 -0
- package/dist/modules/PressableRipple/styles.js.map +1 -0
- package/dist/modules/PressableRipple/type.d.ts +12 -0
- package/dist/modules/PressableRipple/type.js +3 -0
- package/dist/modules/PressableRipple/type.js.map +1 -0
- package/dist/modules/reactNavigation.d.ts +21 -0
- package/dist/modules/reactNavigation.js +25 -0
- package/dist/modules/reactNavigation.js.map +1 -0
- package/dist/modules/textInputMask.d.ts +6 -0
- package/dist/modules/textInputMask.js +21 -0
- package/dist/modules/textInputMask.js.map +1 -0
- package/dist/modules/types/textInputMask.d.ts +7 -0
- package/dist/modules/types/textInputMask.js +3 -0
- package/dist/modules/types/textInputMask.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/utility.d.ts +14 -0
- package/dist/types/utility.js +3 -0
- package/dist/types/utility.js.map +1 -0
- package/dist/utils/KeyboardAware/context.d.ts +14 -0
- package/dist/utils/KeyboardAware/context.js +28 -0
- package/dist/utils/KeyboardAware/context.js.map +1 -0
- package/dist/utils/KeyboardAware/index.d.ts +3 -0
- package/dist/utils/KeyboardAware/index.js +20 -0
- package/dist/utils/KeyboardAware/index.js.map +1 -0
- package/dist/utils/KeyboardAware/keyboardHooks.d.ts +21 -0
- package/dist/utils/KeyboardAware/keyboardHooks.js +82 -0
- package/dist/utils/KeyboardAware/keyboardHooks.js.map +1 -0
- package/dist/utils/KeyboardAware/types.d.ts +1 -0
- package/dist/utils/KeyboardAware/types.js +7 -0
- package/dist/utils/KeyboardAware/types.js.map +1 -0
- package/dist/utils/ModalManager/components.d.ts +15 -0
- package/dist/utils/ModalManager/components.js +83 -0
- package/dist/utils/ModalManager/components.js.map +1 -0
- package/dist/utils/ModalManager/context.d.ts +48 -0
- package/dist/utils/ModalManager/context.js +184 -0
- package/dist/utils/ModalManager/context.js.map +1 -0
- package/dist/utils/ModalManager/index.d.ts +10 -0
- package/dist/utils/ModalManager/index.js +12 -0
- package/dist/utils/ModalManager/index.js.map +1 -0
- package/dist/utils/NotificationManager/index.d.ts +55 -0
- package/dist/utils/NotificationManager/index.js +304 -0
- package/dist/utils/NotificationManager/index.js.map +1 -0
- package/dist/utils/NotificationManager/types.d.ts +16 -0
- package/dist/utils/NotificationManager/types.js +3 -0
- package/dist/utils/NotificationManager/types.js.map +1 -0
- package/dist/utils/OSAlert.d.ts +32 -0
- package/dist/utils/OSAlert.js +143 -0
- package/dist/utils/OSAlert.js.map +1 -0
- package/dist/utils/PermissionManager/context.d.ts +53 -0
- package/dist/utils/PermissionManager/context.js +324 -0
- package/dist/utils/PermissionManager/context.js.map +1 -0
- package/dist/utils/PermissionManager/index.d.ts +4 -0
- package/dist/utils/PermissionManager/index.js +9 -0
- package/dist/utils/PermissionManager/index.js.map +1 -0
- package/dist/utils/PermissionManager/types.d.ts +16 -0
- package/dist/utils/PermissionManager/types.js +3 -0
- package/dist/utils/PermissionManager/types.js.map +1 -0
- package/dist/utils/StorageManager.d.ts +20 -0
- package/dist/utils/StorageManager.js +86 -0
- package/dist/utils/StorageManager.js.map +1 -0
- package/dist/utils/Subscription.d.ts +17 -0
- package/dist/utils/Subscription.js +72 -0
- package/dist/utils/Subscription.js.map +1 -0
- package/dist/utils/deprecated/notifications.d.ts +40 -0
- package/dist/utils/deprecated/notifications.js +274 -0
- package/dist/utils/deprecated/notifications.js.map +1 -0
- package/dist/utils/hooks.d.ts +68 -0
- package/dist/utils/hooks.js +228 -0
- package/dist/utils/hooks.js.map +1 -0
- package/dist/utils/index.d.ts +14 -0
- package/dist/utils/index.js +44 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/input.d.ts +35 -0
- package/dist/utils/input.js +49 -0
- package/dist/utils/input.js.map +1 -0
- package/dist/utils/locale.d.ts +1 -0
- package/dist/utils/locale.js +10 -0
- package/dist/utils/locale.js.map +1 -0
- package/dist/utils/misc.d.ts +12 -0
- package/dist/utils/misc.js +124 -0
- package/dist/utils/misc.js.map +1 -0
- package/dist/utils/theme.d.ts +23 -0
- package/dist/utils/theme.js +41 -0
- package/dist/utils/theme.js.map +1 -0
- package/dist/utils/useQueryListRefresh.d.ts +12 -0
- package/dist/utils/useQueryListRefresh.js +42 -0
- package/dist/utils/useQueryListRefresh.js.map +1 -0
- package/package.json +9 -10
- package/package.json.bak +53 -0
- package/src/components/Badge/index.tsx +3 -3
- package/src/components/Image/index.tsx +1 -1
- package/src/components/Image/types.ts +1 -1
- package/src/components/Pager/index.tsx +4 -4
- package/src/components/Pager/types.ts +2 -2
- package/src/components/PlacesAutocomplete/index.tsx +3 -1
- package/src/modules/PressableRipple/ripple.js +61 -61
- package/src/utils/StorageManager.ts +112 -0
- package/src/utils/hooks.ts +2 -51
- package/src/utils/index.ts +2 -1
- package/src/utils/theme.ts +13 -9
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Animated } from 'react-native';
|
|
2
|
+
import { TextProps } from './types';
|
|
3
|
+
import { StyledComponentWithProps } from '@codeleap/styles';
|
|
4
|
+
export * from './styles';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export declare const Text: StyledComponentWithProps<TextProps>;
|
|
7
|
+
export declare const AnimatedText: Animated.AnimatedComponent<StyledComponentWithProps<TextProps>>;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
+
};
|
|
39
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
40
|
+
var t = {};
|
|
41
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
42
|
+
t[p] = s[p];
|
|
43
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
44
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
45
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
46
|
+
t[p[i]] = s[p[i]];
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.AnimatedText = exports.Text = void 0;
|
|
52
|
+
var react_1 = __importStar(require("react"));
|
|
53
|
+
var common_1 = require("@codeleap/common");
|
|
54
|
+
var react_native_1 = require("react-native");
|
|
55
|
+
var utils_1 = require("../../utils");
|
|
56
|
+
var Registry_1 = require("../../Registry");
|
|
57
|
+
var hooks_1 = require("../../hooks");
|
|
58
|
+
__exportStar(require("./styles"), exports);
|
|
59
|
+
__exportStar(require("./types"), exports);
|
|
60
|
+
exports.Text = (0, react_1.forwardRef)(function (textProps, ref) {
|
|
61
|
+
var _a = __assign(__assign({}, exports.Text.defaultProps), textProps), text = _a.text, children = _a.children, onPress = _a.onPress, style = _a.style, debounce = _a.debounce, pressDisabled = _a.pressDisabled, animated = _a.animated, animatedStyle = _a.animatedStyle, props = __rest(_a, ["text", "children", "onPress", "style", "debounce", "pressDisabled", "animated", "animatedStyle"]);
|
|
62
|
+
var pressPolyfillEnabled = react_native_1.Platform.select({
|
|
63
|
+
ios: props.suppressHighlighting,
|
|
64
|
+
android: true,
|
|
65
|
+
}) && !!onPress && !pressDisabled;
|
|
66
|
+
var _b = (0, react_1.useState)(false), pressed = _b[0], setPressed = _b[1];
|
|
67
|
+
var pressedRef = react_1.default.useRef(false);
|
|
68
|
+
var _onPress = function (e) {
|
|
69
|
+
if (!onPress)
|
|
70
|
+
return;
|
|
71
|
+
if (common_1.TypeGuards.isNumber(debounce)) {
|
|
72
|
+
if (pressedRef.current) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
pressedRef.current = true;
|
|
76
|
+
onPress === null || onPress === void 0 ? void 0 : onPress(e);
|
|
77
|
+
setTimeout(function () {
|
|
78
|
+
pressedRef.current = false;
|
|
79
|
+
}, debounce);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
onPress === null || onPress === void 0 ? void 0 : onPress(e);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
var handlePress = function (pressed) {
|
|
86
|
+
if (!pressPolyfillEnabled)
|
|
87
|
+
return;
|
|
88
|
+
return function () {
|
|
89
|
+
if (onPress) {
|
|
90
|
+
setPressed(pressed);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
var styles = (0, hooks_1.useStylesFor)(exports.Text.styleRegistryName, style);
|
|
95
|
+
if (!!text && !common_1.TypeGuards.isString(text))
|
|
96
|
+
return <>{text}</>;
|
|
97
|
+
var Component = animated ? react_native_1.Animated.Text : react_native_1.Text;
|
|
98
|
+
var getFeedbackStyle = (0, utils_1.usePressableFeedback)(styles, {
|
|
99
|
+
disabled: !pressPolyfillEnabled,
|
|
100
|
+
feedbackConfig: styles === null || styles === void 0 ? void 0 : styles.pressFeedback,
|
|
101
|
+
hightlightPropertyIn: 'color',
|
|
102
|
+
hightlightPropertyOut: 'backgroundColor',
|
|
103
|
+
}).getFeedbackStyle;
|
|
104
|
+
var feedbackStyle = pressPolyfillEnabled ? getFeedbackStyle(pressed) : undefined;
|
|
105
|
+
var pressProps = !!onPress ? {
|
|
106
|
+
onPress: pressDisabled ? null : _onPress,
|
|
107
|
+
} : {};
|
|
108
|
+
var disabled = !!onPress && pressDisabled;
|
|
109
|
+
return (<Component {...props} onPressIn={handlePress(true)} onPressOut={handlePress(false)} style={[styles === null || styles === void 0 ? void 0 : styles.text, animatedStyle, feedbackStyle, disabled ? styles['text:disabled'] : null]} allowFontScaling={false} {...pressProps}
|
|
110
|
+
// @ts-ignore
|
|
111
|
+
ref={ref}>
|
|
112
|
+
{text}
|
|
113
|
+
{children}
|
|
114
|
+
</Component>);
|
|
115
|
+
});
|
|
116
|
+
exports.Text.styleRegistryName = 'Text';
|
|
117
|
+
exports.Text.elements = ['text', 'pressFeedback'];
|
|
118
|
+
exports.Text.rootElement = 'text';
|
|
119
|
+
exports.Text.withVariantTypes = function (styles) {
|
|
120
|
+
return exports.Text;
|
|
121
|
+
};
|
|
122
|
+
exports.Text.defaultProps = {
|
|
123
|
+
debounce: 1000,
|
|
124
|
+
};
|
|
125
|
+
Registry_1.MobileStyleRegistry.registerComponent(exports.Text);
|
|
126
|
+
exports.AnimatedText = react_native_1.Animated.createAnimatedComponent(exports.Text);
|
|
127
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,2CAA6C;AAC7C,6CAAqE;AACrE,qCAA2E;AAG3E,2CAAoD;AACpD,qCAA0C;AAE1C,2CAAwB;AACxB,0CAAuB;AAEV,QAAA,IAAI,GAAG,IAAA,kBAAU,EAAwB,UAAC,SAAS,EAAE,GAAG;IACnE,IAAM,2BAWD,YAAI,CAAC,YAAY,GACjB,SAAS,CACb,EAZC,IAAI,UAAA,EACJ,QAAQ,cAAA,EACR,OAAO,aAAA,EACP,KAAK,WAAA,EACL,QAAQ,cAAA,EACR,aAAa,m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AAI,CACL;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,SAAS,CAAC,CACb,CAAA;AACH,CAAC,CAAwC,CAAA;AAEzC,YAAI,CAAC,iBAAiB,GAAG,MAAM,CAAA;AAC/B,YAAI,CAAC,QAAQ,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;AACzC,YAAI,CAAC,WAAW,GAAG,MAAM,CAAA;AAEzB,YAAI,CAAC,gBAAgB,GAAG,UAAsB,MAAS;IACrD,OAAO,YAAuE,CAAA;AAChF,CAAC,CAAA;AAED,YAAI,CAAC,YAAY,GAAG;IAClB,QAAQ,EAAE,IAAI;CACO,CAAA;AAEvB,8BAAmB,CAAC,iBAAiB,CAAC,YAAI,CAAC,CAAA;AAE9B,QAAA,YAAY,GAAG,uBAAQ,CAAC,uBAAuB,CAAC,YAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StylesOf } from '@codeleap/common';
|
|
2
|
+
import { FeedbackConfig } from '../../utils';
|
|
3
|
+
export type TextComposition = 'text' | 'pressFeedback' | 'text:disabled';
|
|
4
|
+
export type TextStylesGen<TCSS = any> = StylesOf<'text', TCSS> & {
|
|
5
|
+
'pressFeedback'?: FeedbackConfig;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Text/styles.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { StyledProp } from '@codeleap/styles';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { TextProps as RNTextProps, Animated, ViewStyle, ImageStyle, TextStyle, Text as NativeText } from 'react-native';
|
|
4
|
+
import { AnimatedStyleProp } from 'react-native-reanimated';
|
|
5
|
+
import { TextComposition } from './styles';
|
|
6
|
+
export type TextProps = Omit<RNTextProps, 'style' | 'ref'> & {
|
|
7
|
+
text?: ReactNode;
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
colorChangeConfig?: Partial<Animated.TimingAnimationConfig>;
|
|
10
|
+
debugName?: string;
|
|
11
|
+
debounce?: number;
|
|
12
|
+
pressDisabled?: boolean;
|
|
13
|
+
style?: StyledProp<TextComposition>;
|
|
14
|
+
animatedStyle?: AnimatedStyleProp<ViewStyle | ImageStyle | TextStyle>;
|
|
15
|
+
ref?: React.ForwardedRef<NativeText>;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Text/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
+
};
|
|
39
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
40
|
+
var t = {};
|
|
41
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
42
|
+
t[p] = s[p];
|
|
43
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
44
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
45
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
46
|
+
t[p[i]] = s[p[i]];
|
|
47
|
+
}
|
|
48
|
+
return t;
|
|
49
|
+
};
|
|
50
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
51
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
52
|
+
if (ar || !(i in from)) {
|
|
53
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
54
|
+
ar[i] = from[i];
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
58
|
+
};
|
|
59
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
|
+
exports.TextInput = void 0;
|
|
61
|
+
var react_1 = __importStar(require("react"));
|
|
62
|
+
var common_1 = require("@codeleap/common");
|
|
63
|
+
var react_2 = require("react");
|
|
64
|
+
var react_native_1 = require("react-native");
|
|
65
|
+
var InputBase_1 = require("../InputBase");
|
|
66
|
+
var Touchable_1 = require("../Touchable");
|
|
67
|
+
var textInputMask_1 = require("../../modules/textInputMask");
|
|
68
|
+
var Registry_1 = require("../../Registry");
|
|
69
|
+
var hooks_1 = require("../../hooks");
|
|
70
|
+
__exportStar(require("./styles"), exports);
|
|
71
|
+
__exportStar(require("./types"), exports);
|
|
72
|
+
exports.TextInput = (0, react_2.forwardRef)(function (props, inputRef) {
|
|
73
|
+
var _a, _b, _c, _d, _e, _f;
|
|
74
|
+
var innerInputRef = react_1.default.useRef(null);
|
|
75
|
+
var _g = (0, react_1.useState)(false), isFocused = _g[0], setIsFocused = _g[1];
|
|
76
|
+
var _h = (0, react_1.useState)({ start: 0 }), currentSelection = _h[0], setCurrentSelection = _h[1];
|
|
77
|
+
var _j = (0, InputBase_1.selectInputBaseProps)(__assign(__assign({}, exports.TextInput.defaultProps), props)), inputBaseProps = _j.inputBaseProps, others = _j.others;
|
|
78
|
+
var value = others.value, validate = others.validate, debugName = others.debugName, visibilityToggle = others.visibilityToggle, masking = others.masking, password = others.password, onChangeMask = others.onChangeMask, onPress = others.onPress, visibleIcon = others.visibleIcon, hiddenIcon = others.hiddenIcon, style = others.style, autoAdjustSelection = others.autoAdjustSelection, selectionStart = others.selectionStart, _k = others._error, _error = _k === void 0 ? null : _k, textInputProps = __rest(others, ["value", "validate", "debugName", "visibilityToggle", "masking", "password", "onChangeMask", "onPress", "visibleIcon", "hiddenIcon", "style", "autoAdjustSelection", "selectionStart", "_error"]);
|
|
79
|
+
var _l = (0, common_1.useBooleanToggle)(true), secureTextEntry = _l[0], toggleSecureTextEntry = _l[1];
|
|
80
|
+
var isMasked = !!masking;
|
|
81
|
+
var InputElement = isMasked ? textInputMask_1.MaskedTextInput : react_native_1.TextInput;
|
|
82
|
+
var styles = (0, hooks_1.useStylesFor)(exports.TextInput.styleRegistryName, style);
|
|
83
|
+
// @ts-expect-error - React's ref type system is weird
|
|
84
|
+
(0, react_2.useImperativeHandle)(inputRef, function () {
|
|
85
|
+
return __assign(__assign({}, innerInputRef.current), { focus: function () {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
(_b = (_a = innerInputRef.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
88
|
+
}, isTextInput: true });
|
|
89
|
+
}, [!!((_a = innerInputRef === null || innerInputRef === void 0 ? void 0 : innerInputRef.current) === null || _a === void 0 ? void 0 : _a.focus)]);
|
|
90
|
+
var isPressable = common_1.TypeGuards.isFunction(onPress);
|
|
91
|
+
var validation = (0, common_1.useValidate)(value, validate);
|
|
92
|
+
var handleBlur = react_1.default.useCallback(function (e) {
|
|
93
|
+
var _a;
|
|
94
|
+
validation.onInputBlurred();
|
|
95
|
+
setIsFocused(false);
|
|
96
|
+
if (autoAdjustSelection)
|
|
97
|
+
setCurrentSelection({ start: selectionStart });
|
|
98
|
+
(_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
99
|
+
}, [validation.onInputBlurred, props.onBlur]);
|
|
100
|
+
var handleFocus = react_1.default.useCallback(function (e) {
|
|
101
|
+
var _a;
|
|
102
|
+
validation.onInputFocused();
|
|
103
|
+
setIsFocused(true);
|
|
104
|
+
if (autoAdjustSelection)
|
|
105
|
+
setCurrentSelection(null);
|
|
106
|
+
(_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
107
|
+
}, [validation.onInputFocused, props.onFocus]);
|
|
108
|
+
var handleMaskChange = function (masked, unmasked) {
|
|
109
|
+
if (textInputProps.onChangeText)
|
|
110
|
+
textInputProps.onChangeText((masking === null || masking === void 0 ? void 0 : masking.saveFormatted) ? masked : masked);
|
|
111
|
+
if (onChangeMask)
|
|
112
|
+
onChangeMask(masked, unmasked);
|
|
113
|
+
};
|
|
114
|
+
var isMultiline = textInputProps.multiline;
|
|
115
|
+
var isDisabled = !!inputBaseProps.disabled;
|
|
116
|
+
var placeholderTextColor = (_c = (_b = [
|
|
117
|
+
[isDisabled, styles['placeholder:disabled']],
|
|
118
|
+
[!validation.isValid, styles['placeholder:error']],
|
|
119
|
+
[isFocused, styles['placeholder:focus']],
|
|
120
|
+
[true, styles === null || styles === void 0 ? void 0 : styles.placeholder],
|
|
121
|
+
// @ts-expect-error
|
|
122
|
+
].find(function (_a) {
|
|
123
|
+
var x = _a[0];
|
|
124
|
+
return x;
|
|
125
|
+
})) === null || _b === void 0 ? void 0 : _b[1]) === null || _c === void 0 ? void 0 : _c.color;
|
|
126
|
+
var selectionColor = (_e = (_d = [
|
|
127
|
+
[isDisabled, styles['selection:disabled']],
|
|
128
|
+
[!validation.isValid, styles['selection:error']],
|
|
129
|
+
[isFocused, styles['selection:focus']],
|
|
130
|
+
[true, styles === null || styles === void 0 ? void 0 : styles.selection],
|
|
131
|
+
// @ts-expect-error
|
|
132
|
+
].find(function (_a) {
|
|
133
|
+
var x = _a[0];
|
|
134
|
+
return x;
|
|
135
|
+
})) === null || _d === void 0 ? void 0 : _d[1]) === null || _e === void 0 ? void 0 : _e.color;
|
|
136
|
+
var visibilityToggleProps = visibilityToggle ? {
|
|
137
|
+
onPress: toggleSecureTextEntry,
|
|
138
|
+
icon: (secureTextEntry ? hiddenIcon : visibleIcon),
|
|
139
|
+
debugName: "".concat(debugName, " toggle visibility"),
|
|
140
|
+
} : null;
|
|
141
|
+
var rightIcon = (_f = inputBaseProps === null || inputBaseProps === void 0 ? void 0 : inputBaseProps.rightIcon) !== null && _f !== void 0 ? _f : visibilityToggleProps;
|
|
142
|
+
var maskingExtraProps = isMasked ? __assign({ onChangeText: handleMaskChange, ref: null, refInput: function (inputRef) {
|
|
143
|
+
if (!!inputRef) {
|
|
144
|
+
innerInputRef.current = inputRef;
|
|
145
|
+
}
|
|
146
|
+
} }, masking) : {};
|
|
147
|
+
var buttonModeProps = isPressable ? {
|
|
148
|
+
editable: false,
|
|
149
|
+
caretHidden: true,
|
|
150
|
+
} : {};
|
|
151
|
+
var hasMultipleLines = isMultiline && (value === null || value === void 0 ? void 0 : value.includes('\n'));
|
|
152
|
+
return <InputBase_1.InputBase {...inputBaseProps} innerWrapper={isPressable ? Touchable_1.Touchable : undefined} debugName={debugName} error={(validation.isValid && !_error) ? null : _error || validation.message} style={__assign(__assign({}, styles), { innerWrapper: [
|
|
153
|
+
styles === null || styles === void 0 ? void 0 : styles.innerWrapper,
|
|
154
|
+
isMultiline && styles['innerWrapper:multiline'],
|
|
155
|
+
hasMultipleLines && styles['innerWrapper:hasMultipleLines'],
|
|
156
|
+
] })} innerWrapperProps={__assign(__assign({}, (inputBaseProps.innerWrapperProps || {})), { onPress: onPress, debugName: debugName, dismissKeyboard: false })} rightIcon={rightIcon} focused={isFocused}>
|
|
157
|
+
<InputElement allowFontScaling={false} editable={!isPressable && !isDisabled} {...buttonModeProps} selection={autoAdjustSelection ? currentSelection : undefined} placeholderTextColor={placeholderTextColor} value={value} selectionColor={selectionColor} secureTextEntry={password && secureTextEntry} textAlignVertical={isMultiline ? 'top' : undefined} {...textInputProps} onBlur={handleBlur} onFocus={handleFocus} style={[
|
|
158
|
+
styles === null || styles === void 0 ? void 0 : styles.input,
|
|
159
|
+
isMultiline && styles['input:multiline'],
|
|
160
|
+
isFocused && styles['input:focused'],
|
|
161
|
+
!validation.isValid && styles['input:error'],
|
|
162
|
+
isDisabled && styles['input:disabled'],
|
|
163
|
+
hasMultipleLines && styles['input:hasMultipleLines'],
|
|
164
|
+
]} ref={innerInputRef} pointerEvents={isPressable ? 'none' : undefined} {...maskingExtraProps}/>
|
|
165
|
+
</InputBase_1.InputBase>;
|
|
166
|
+
});
|
|
167
|
+
exports.TextInput.styleRegistryName = 'TextInput';
|
|
168
|
+
exports.TextInput.elements = __spreadArray(__spreadArray([], InputBase_1.InputBase.elements, true), ['input', 'placeholder', 'selection'], false);
|
|
169
|
+
exports.TextInput.rootElement = 'wrapper';
|
|
170
|
+
exports.TextInput.withVariantTypes = function (styles) {
|
|
171
|
+
return exports.TextInput;
|
|
172
|
+
};
|
|
173
|
+
exports.TextInput.defaultProps = {
|
|
174
|
+
hiddenIcon: 'input-visiblity:hidden',
|
|
175
|
+
visibleIcon: 'input-visiblity:visible',
|
|
176
|
+
visibilityToggle: false,
|
|
177
|
+
autoAdjustSelection: false,
|
|
178
|
+
selectionStart: 0,
|
|
179
|
+
};
|
|
180
|
+
Registry_1.MobileStyleRegistry.registerComponent(exports.TextInput);
|
|
181
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,2CAA4E;AAC5E,+BAAuD;AACvD,6CAA0G;AAC1G,0CAA8D;AAC9D,0CAAwC;AACxC,6DAA6D;AAG7D,2CAAoD;AACpD,qCAA0C;AAE1C,2CAAwB;AACxB,0CAAuB;AAEV,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAkC,UAAC,KAAK,EAAE,QAAQ;;IACnF,IAAM,aAAa,GAAG,eAAK,CAAC,MAAM,CAAkB,IAAI,CAAC,CAAA;IAEnD,IAAA,KAA4B,IAAA,gBAAQ,EAAC,KAAK,CAAC,EAA1C,SAAS,QAAA,EAAE,YAAY,QAAmB,CAAA;IAC3C,IAAA,KAA0C,IAAA,gBAAQ,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,EAA/D,gBAAgB,QAAA,EAAE,mBAAmB,QAA0B,CAAA;IAEhE,IAAA,KAGF,IAAA,gCAAoB,wBACnB,iBAAS,CAAC,YAAY,GACtB,KAAK,EACR,EALA,cAAc,oBAAA,EACd,MAAM,YAIN,CAAA;IAGA,IAAA,KAAK,GAeH,MAAM,MAfH,EACL,QAAQ,GAcN,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,CAAC,gBAAgB,GAAG,UAAsB,MAAS;IAC1D,OAAO,iBAAiF,CAAA;AAC1F,CAAC,CAAA;AAED,iBAAS,CAAC,YAAY,GAAG;IACvB,UAAU,EAAE,wBAAmC;IAC/C,WAAW,EAAE,yBAAoC;IACjD,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,KAAK;IAC1B,cAAc,EAAE,CAAC;CACS,CAAA;AAE5B,8BAAmB,CAAC,iBAAiB,CAAC,iBAAS,CAAC,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InputBaseStates, InputBaseParts } from '../InputBase';
|
|
2
|
+
type TextInputParts = InputBaseParts | 'input' | 'placeholder' | 'selection';
|
|
3
|
+
export type TextInputStates = InputBaseStates | 'multiline' | 'hasMultipleLines' | 'pressable';
|
|
4
|
+
export type TextInputComposition = `${TextInputParts}:${TextInputStates}` | TextInputParts;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/TextInput/styles.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InputBaseProps } from '../InputBase';
|
|
2
|
+
import { TextInputProps as RNTextInputProps } from 'react-native';
|
|
3
|
+
import { AnyFunction, FormTypes, yup } from '@codeleap/common';
|
|
4
|
+
import { AppIcon, StyledProp } from '@codeleap/styles';
|
|
5
|
+
import { TextInputMaskProps } from '../../modules/textInputMask';
|
|
6
|
+
import { TextInputComposition } from './styles';
|
|
7
|
+
export type TextInputProps = Omit<InputBaseProps, 'style'> & Omit<RNTextInputProps, 'style'> & {
|
|
8
|
+
password?: boolean;
|
|
9
|
+
validate?: FormTypes.ValidatorFunctionWithoutForm | yup.SchemaOf<string>;
|
|
10
|
+
debugName: string;
|
|
11
|
+
autoAdjustSelection?: boolean;
|
|
12
|
+
selectionStart?: number;
|
|
13
|
+
visibilityToggle?: boolean;
|
|
14
|
+
masking?: FormTypes.TextField['masking'];
|
|
15
|
+
onChangeMask?: TextInputMaskProps['onChangeText'];
|
|
16
|
+
visibleIcon?: AppIcon;
|
|
17
|
+
hiddenIcon?: AppIcon;
|
|
18
|
+
_error?: string;
|
|
19
|
+
onPress?: AnyFunction;
|
|
20
|
+
style?: StyledProp<TextInputComposition>;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/TextInput/types.ts"],"names":[],"mappings":""}
|