@codeleap/mobile 4.1.0 → 4.2.2
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 +77 -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 +14 -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 +155 -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 +39 -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 +15 -0
- package/dist/components/View/index.js +56 -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 +16 -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/Backdrop/index.tsx +16 -18
- package/src/components/Backdrop/types.ts +3 -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/Modal/index.tsx +28 -18
- package/src/components/Modal/types.ts +3 -0
- 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/components/View/index.tsx +4 -0
- package/src/modules/PressableRipple/ripple.js +61 -61
- package/src/types/utility.ts +6 -3
- package/src/utils/StorageManager.ts +112 -0
- package/src/utils/hooks.ts +2 -51
- package/src/utils/index.ts +3 -1
- package/src/utils/theme.ts +13 -9
|
@@ -0,0 +1,178 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
37
|
+
var t = {};
|
|
38
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
39
|
+
t[p] = s[p];
|
|
40
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
41
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
42
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
43
|
+
t[p[i]] = s[p[i]];
|
|
44
|
+
}
|
|
45
|
+
return t;
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
exports.Spotlight = exports.useImageSpotlight = exports.useSpotlight = exports.SpotlightProvider = void 0;
|
|
52
|
+
var react_1 = __importStar(require("react"));
|
|
53
|
+
var common_1 = require("@codeleap/common");
|
|
54
|
+
var react_native_uuid_1 = __importDefault(require("react-native-uuid"));
|
|
55
|
+
var component_1 = require("./component");
|
|
56
|
+
var View_1 = require("../View");
|
|
57
|
+
var Text_1 = require("../Text");
|
|
58
|
+
var SpotlightCtx = react_1.default.createContext({});
|
|
59
|
+
var SpotlightProvider = function (_a) {
|
|
60
|
+
var children = _a.children;
|
|
61
|
+
var _b = (0, react_1.useState)({}), spotlights = _b[0], setSpotlights = _b[1];
|
|
62
|
+
var _c = (0, react_1.useState)({}), indexes = _c[0], setIndexes = _c[1];
|
|
63
|
+
var ctxValue = {
|
|
64
|
+
spotlights: spotlights,
|
|
65
|
+
setSpotlights: setSpotlights,
|
|
66
|
+
indexes: indexes,
|
|
67
|
+
setIndexes: setIndexes,
|
|
68
|
+
};
|
|
69
|
+
return <SpotlightCtx.Provider value={ctxValue}>
|
|
70
|
+
{children}
|
|
71
|
+
</SpotlightCtx.Provider>;
|
|
72
|
+
};
|
|
73
|
+
exports.SpotlightProvider = SpotlightProvider;
|
|
74
|
+
function useSpotlight(name) {
|
|
75
|
+
var ctx = (0, react_1.useContext)(SpotlightCtx);
|
|
76
|
+
var imList = Object.values(ctx.spotlights[name] || {});
|
|
77
|
+
return {
|
|
78
|
+
images: imList,
|
|
79
|
+
currentIndex: ctx.indexes[name],
|
|
80
|
+
set: function (img, id) {
|
|
81
|
+
var newId = id || react_native_uuid_1.default.v4();
|
|
82
|
+
ctx.setSpotlights(function (prev) {
|
|
83
|
+
var _a;
|
|
84
|
+
var images = __assign({}, prev[name]);
|
|
85
|
+
if (id !== null) {
|
|
86
|
+
images[id] = __assign(__assign({}, images[id]), { source: img });
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
var now = Date.now();
|
|
90
|
+
images[newId] = {
|
|
91
|
+
created: now,
|
|
92
|
+
id: newId,
|
|
93
|
+
source: img,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return __assign(__assign({}, prev), (_a = {}, _a[name] = images, _a));
|
|
97
|
+
});
|
|
98
|
+
return newId;
|
|
99
|
+
},
|
|
100
|
+
remove: function (id) {
|
|
101
|
+
ctx.setSpotlights(function (prev) {
|
|
102
|
+
var _a;
|
|
103
|
+
var images = __assign({}, prev[name]);
|
|
104
|
+
delete images[id];
|
|
105
|
+
return __assign(__assign({}, prev), (_a = {}, _a[name] = images, _a));
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
open: function (id) {
|
|
109
|
+
var newIdx = imList.findIndex(function (x) { return x.id === id; });
|
|
110
|
+
ctx.setIndexes(function (prev) {
|
|
111
|
+
var _a;
|
|
112
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[name] = newIdx, _a)));
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
close: function () {
|
|
116
|
+
ctx.setIndexes(function (prev) {
|
|
117
|
+
var _a;
|
|
118
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[name] = undefined, _a)));
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
clear: function () {
|
|
122
|
+
ctx.setIndexes(function (prev) {
|
|
123
|
+
var _a;
|
|
124
|
+
return (__assign(__assign({}, prev), (_a = {}, _a[name] = undefined, _a)));
|
|
125
|
+
});
|
|
126
|
+
ctx.setSpotlights(function (prev) {
|
|
127
|
+
var _a;
|
|
128
|
+
return __assign(__assign({}, prev), (_a = {}, _a[name] = {}, _a));
|
|
129
|
+
});
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
exports.useSpotlight = useSpotlight;
|
|
134
|
+
var useImageSpotlight = function (name, src) {
|
|
135
|
+
var _a = (0, react_1.useState)(null), id = _a[0], setId = _a[1];
|
|
136
|
+
var spotlight = useSpotlight(name);
|
|
137
|
+
var imSource = common_1.TypeGuards.isString(src) ? { uri: src } : src;
|
|
138
|
+
var prevSource = (0, common_1.usePrevious)(imSource);
|
|
139
|
+
(0, common_1.onUpdate)(function () {
|
|
140
|
+
if (!name)
|
|
141
|
+
return;
|
|
142
|
+
if ((0, common_1.deepEqual)(prevSource, imSource))
|
|
143
|
+
return;
|
|
144
|
+
setId(spotlight.set(imSource, id));
|
|
145
|
+
}, [src, id]);
|
|
146
|
+
(0, common_1.useUnmount)(function () {
|
|
147
|
+
if (!name)
|
|
148
|
+
return;
|
|
149
|
+
spotlight.remove(id);
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
onImagePressed: function () {
|
|
153
|
+
spotlight.open(id);
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
exports.useImageSpotlight = useImageSpotlight;
|
|
158
|
+
var DefaultFooterComponent = function (_a) {
|
|
159
|
+
var imageIndex = _a.imageIndex, imagesLength = _a.imagesLength;
|
|
160
|
+
return (<View_1.View><Text_1.Text text={imageIndex + 1 + '/' + imagesLength}/></View_1.View>);
|
|
161
|
+
};
|
|
162
|
+
var Spotlight = function (props) {
|
|
163
|
+
var name = props.name, HeaderComponent = props.HeaderComponent, showFooter = props.showFooter, FooterComponent = props.FooterComponent, rest = __rest(props, ["name", "HeaderComponent", "showFooter", "FooterComponent"]);
|
|
164
|
+
var spotlight = useSpotlight(name);
|
|
165
|
+
(0, common_1.useUnmount)(function () {
|
|
166
|
+
spotlight.clear();
|
|
167
|
+
});
|
|
168
|
+
var Footer = showFooter ? FooterComponent || DefaultFooterComponent : (function () { return null; });
|
|
169
|
+
return <component_1.ImageView imageIndex={spotlight.currentIndex} images={spotlight.images.map(function (x) { return x.source; })} keyExtractor={function (_, index) { return index.toString(); }} onRequestClose={spotlight.close} visible={typeof spotlight.currentIndex !== 'undefined'} {...rest} FooterComponent={function (_a) {
|
|
170
|
+
var imageIndex = _a.imageIndex;
|
|
171
|
+
return <Footer imageIndex={imageIndex} spotlight={spotlight} imagesLength={spotlight.images.length}/>;
|
|
172
|
+
}} HeaderComponent={!!HeaderComponent ? function (_a) {
|
|
173
|
+
var imageIndex = _a.imageIndex;
|
|
174
|
+
return <HeaderComponent spotlight={spotlight} imageIndex={imageIndex}/>;
|
|
175
|
+
} : undefined}/>;
|
|
176
|
+
};
|
|
177
|
+
exports.Spotlight = Spotlight;
|
|
178
|
+
//# sourceMappingURL=Spotlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spotlight.js","sourceRoot":"","sources":["../../../src/components/ImageView/Spotlight.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAmD;AACnD,2CAAuG;AACvG,wEAAoC;AACpC,yCAAuD;AAGvD,gCAA8B;AAC9B,gCAA8B;AAqB9B,IAAM,YAAY,GAAG,eAAK,CAAC,aAAa,CAAC,EAAmB,CAAC,CAAA;AAEtD,IAAM,iBAAiB,GAA2C,UAAC,EAAY;QAAV,QAAQ,cAAA;IAC5E,IAAA,KAA8B,IAAA,gBAAQ,EAA8B,EAAE,CAAC,EAAtE,UAAU,QAAA,EAAE,aAAa,QAA6C,CAAA;IACvE,IAAA,KAAwB,IAAA,gBAAQ,EAA2B,EAAE,CAAC,E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AAC,CAAA;AAnBY,QAAA,SAAS,aAmBrB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ImageView = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var common_1 = require("@codeleap/common");
|
|
9
|
+
var react_native_image_viewing_1 = __importDefault(require("react-native-image-viewing"));
|
|
10
|
+
var react_native_1 = require("react-native");
|
|
11
|
+
var ImageView = function (props) {
|
|
12
|
+
(0, common_1.onUpdate)(function () {
|
|
13
|
+
react_native_1.StatusBar.setHidden(props.visible);
|
|
14
|
+
}, [props.visible]);
|
|
15
|
+
return (<react_native_image_viewing_1.default doubleTapToZoomEnabled={false} presentationStyle={'overFullScreen'} {...props}/>);
|
|
16
|
+
};
|
|
17
|
+
exports.ImageView = ImageView;
|
|
18
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/components/ImageView/component.tsx"],"names":[],"mappings":";;;;;;AAAA,gDAAyB;AACzB,2CAAoD;AACpD,0FAAmD;AACnD,6CAAwC;AAIjC,IAAM,SAAS,GAAG,UAAC,KAAqB;IAC7C,IAAA,iBAAQ,EAAC;QACP,wBAAS,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;IAEnB,OAAO,CACL,CAAC,oCAAU,CACT,sBAAsB,CAAC,CAAC,KAAK,CAAC,CAC9B,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CACpC,IAAI,KAAK,CAAC,EACV,CACH,CAAA;AACH,CAAC,CAAA;AAZY,QAAA,SAAS,aAYrB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Spotlight"), exports);
|
|
18
|
+
__exportStar(require("./component"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ImageView/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,8CAA2B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputBaseProps } from './types';
|
|
3
|
+
export * from './styles';
|
|
4
|
+
export * from './utils';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export declare const InputBaseDefaultOrder: InputBaseProps['order'];
|
|
7
|
+
export declare const InputBase: {
|
|
8
|
+
(props: InputBaseProps): JSX.Element;
|
|
9
|
+
elements: string[];
|
|
10
|
+
defaultProps: Partial<InputBaseProps>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
25
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
26
|
+
};
|
|
27
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
+
var t = {};
|
|
29
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
+
t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.InputBase = exports.InputBaseDefaultOrder = void 0;
|
|
43
|
+
var react_1 = __importDefault(require("react"));
|
|
44
|
+
var common_1 = require("@codeleap/common");
|
|
45
|
+
var ActionIcon_1 = require("../ActionIcon");
|
|
46
|
+
var View_1 = require("../View");
|
|
47
|
+
var styles_1 = require("./styles");
|
|
48
|
+
var Text_1 = require("../Text");
|
|
49
|
+
__exportStar(require("./styles"), exports);
|
|
50
|
+
__exportStar(require("./utils"), exports);
|
|
51
|
+
__exportStar(require("./types"), exports);
|
|
52
|
+
exports.InputBaseDefaultOrder = [
|
|
53
|
+
'label',
|
|
54
|
+
'description',
|
|
55
|
+
'innerWrapper',
|
|
56
|
+
'error',
|
|
57
|
+
];
|
|
58
|
+
var KeyPassthrough = function (props) {
|
|
59
|
+
return <>{props.children}</>;
|
|
60
|
+
};
|
|
61
|
+
var InputBase = function (props) {
|
|
62
|
+
var _a = __assign(__assign({}, exports.InputBase.defaultProps), props), children = _a.children, _b = _a.error, error = _b === void 0 ? null : _b, label = _a.label, _c = _a.description, description = _c === void 0 ? null : _c, _d = _a.leftIcon, leftIcon = _d === void 0 ? null : _d, _e = _a.rightIcon, rightIcon = _e === void 0 ? null : _e, WrapperComponent = _a.wrapper, debugName = _a.debugName, InnerWrapperComponent = _a.innerWrapper, focused = _a.focused, _f = _a.innerWrapperProps, innerWrapperProps = _f === void 0 ? {} : _f, _g = _a.wrapperProps, wrapperProps = _g === void 0 ? {} : _g, disabled = _a.disabled, _h = _a.order, order = _h === void 0 ? exports.InputBaseDefaultOrder : _h, style = _a.style, labelAsRow = _a.labelAsRow, hideErrorMessage = _a.hideErrorMessage, otherProps = __rest(_a, ["children", "error", "label", "description", "leftIcon", "rightIcon", "wrapper", "debugName", "innerWrapper", "focused", "innerWrapperProps", "wrapperProps", "disabled", "order", "style", "labelAsRow", "hideErrorMessage"]);
|
|
63
|
+
var styles = (0, styles_1.useInputBaseStyles)(props);
|
|
64
|
+
var _leftIcon = (0, common_1.getRenderedComponent)(leftIcon, ActionIcon_1.ActionIcon, {
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
style: styles.leftIconStyles,
|
|
67
|
+
debugName: "".concat(debugName, " left icon"),
|
|
68
|
+
dismissKeyboard: false,
|
|
69
|
+
});
|
|
70
|
+
var _rightIcon = (0, common_1.getRenderedComponent)(rightIcon, ActionIcon_1.ActionIcon, {
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
style: styles.rightIconStyles,
|
|
73
|
+
debugName: "".concat(debugName, " right icon"),
|
|
74
|
+
dismissKeyboard: false,
|
|
75
|
+
});
|
|
76
|
+
var _label = common_1.TypeGuards.isString(label) ? <Text_1.Text text={label} style={styles.labelStyle}/> : label;
|
|
77
|
+
var _error = common_1.TypeGuards.isString(error) ? <Text_1.Text text={error} style={styles.errorStyle}/> : error;
|
|
78
|
+
var _description = common_1.TypeGuards.isString(description) ? <Text_1.Text text={description} style={styles.descriptionStyle}/> : description;
|
|
79
|
+
var parts = {
|
|
80
|
+
label: labelAsRow ? <View_1.View style={styles.labelRowStyle}>
|
|
81
|
+
{_label}
|
|
82
|
+
{_description}
|
|
83
|
+
</View_1.View> : _label,
|
|
84
|
+
description: labelAsRow ? null : _description,
|
|
85
|
+
innerWrapper: <InnerWrapperComponent style={[
|
|
86
|
+
styles.innerWrapperStyle,
|
|
87
|
+
]} {...innerWrapperProps}>
|
|
88
|
+
{_leftIcon}
|
|
89
|
+
{children}
|
|
90
|
+
{_rightIcon}
|
|
91
|
+
</InnerWrapperComponent>,
|
|
92
|
+
error: hideErrorMessage ? null : (_error || <Text_1.Text text={''} style={styles.errorStyle}/>),
|
|
93
|
+
};
|
|
94
|
+
return <WrapperComponent {...otherProps} {...wrapperProps} style={styles.wrapperStyle}>
|
|
95
|
+
{order.map(function (key) { return <KeyPassthrough key={key}>
|
|
96
|
+
{parts[key]}
|
|
97
|
+
</KeyPassthrough>; })}
|
|
98
|
+
</WrapperComponent>;
|
|
99
|
+
};
|
|
100
|
+
exports.InputBase = InputBase;
|
|
101
|
+
exports.InputBase.elements = ['wrapper', 'innerWrapper', 'label', 'errorMessage', 'description', 'icon', 'leftIcon', 'rightIcon'];
|
|
102
|
+
exports.InputBase.defaultProps = {
|
|
103
|
+
disabled: false,
|
|
104
|
+
labelAsRow: false,
|
|
105
|
+
hideErrorMessage: false,
|
|
106
|
+
order: exports.InputBaseDefaultOrder,
|
|
107
|
+
wrapper: View_1.View,
|
|
108
|
+
innerWrapper: View_1.View,
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/InputBase/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,2CAAmE;AACnE,4CAA2D;AAC3D,gCAA8B;AAC9B,mCAA6C;AAE7C,gCAA8B;AAE9B,2CAAwB;AACxB,0CAAuB;AACvB,0CAAuB;AAEV,QAAA,qBAAqB,GAA4B;IAC5D,OAAO;IACP,aAAa;IACb,cAAc;IACd,OAAO;CACR,CAAA;AAED,IAAM,cAAc,GAAG,UAAC,KAAmC;IACzD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAA;AAC9B,CAAC,CAAA;AAEM,IAAM,SAAS,GAAG,UAAC,KAAqB;IAC7C,IAAM,2BAoBD,iBAAS,CAAC,YAAY,GACtB,KAAK,CACT,EArBC,QAAQ,cAAA,EACR,aAAY,EAAZ,KAAK,mBAAG,IAAI,KAAA,EACZ,KAAK,WAAA,EACL,mBAAkB,EAAlB,WAAW,mBAAG,IAAI,KAAA,EAClB,gBAAe,EAAf,QAAQ,mBA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,CAC1C;QAAA,CAAC,KAAK,CAAC,GAAG,CAAC,CACb;MAAA,EAAE,cAAc,CAAC,EAFE,CAEF,CAAC,CAGtB;EAAA,EAAE,gBAAgB,CAAC,CAAA;AACrB,CAAC,CAAA;AA7EY,QAAA,SAAS,aA6ErB;AAED,iBAAS,CAAC,QAAQ,GAAG,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,CAAA;AAEzH,iBAAS,CAAC,YAAY,GAAG;IACvB,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,KAAK;IACjB,gBAAgB,EAAE,KAAK;IACvB,KAAK,EAAE,6BAAqB;IAC5B,OAAO,EAAE,WAAI;IACb,YAAY,EAAE,WAAI;CACQ,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionIconParts } from "../ActionIcon";
|
|
2
|
+
import { InputBaseProps } from "./types";
|
|
3
|
+
type InputIcons = 'icon' | 'leftIcon' | 'rightIcon';
|
|
4
|
+
type IconParts = ActionIconParts;
|
|
5
|
+
export type InputIconComposition = `${InputIcons}${Capitalize<IconParts>}`;
|
|
6
|
+
export type InputBaseStates = 'error' | 'focus' | 'disabled';
|
|
7
|
+
export type InputBaseParts = 'wrapper' | 'innerWrapper' | 'label' | 'errorMessage' | 'description' | 'labelRow' | InputIconComposition;
|
|
8
|
+
export type IconLessInputBaseParts = Exclude<InputBaseParts, InputIconComposition>;
|
|
9
|
+
export type InputBaseComposition = `${InputBaseParts}:${InputBaseStates}` | InputBaseParts;
|
|
10
|
+
export declare const useInputBaseStyles: (props: InputBaseProps) => {
|
|
11
|
+
wrapperStyle: any[];
|
|
12
|
+
innerWrapperStyle: any[];
|
|
13
|
+
leftIconStyles: {};
|
|
14
|
+
rightIconStyles: {};
|
|
15
|
+
labelStyle: any[];
|
|
16
|
+
errorStyle: any[];
|
|
17
|
+
descriptionStyle: any[];
|
|
18
|
+
labelRowStyle: any[];
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useInputBaseStyles = void 0;
|
|
4
|
+
var common_1 = require("@codeleap/common");
|
|
5
|
+
var styles_1 = require("@codeleap/styles");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var getIconStyles = function (obj, state) { return ({
|
|
8
|
+
icon: (0, styles_1.mergeStyles)([
|
|
9
|
+
obj.icon,
|
|
10
|
+
state.focused && obj['icon:focus'],
|
|
11
|
+
state.hasError && obj['icon:error'],
|
|
12
|
+
state.disabled && obj['icon:disabled']
|
|
13
|
+
]),
|
|
14
|
+
'icon:disabled': (0, styles_1.mergeStyles)([
|
|
15
|
+
state.disabled && obj['icon:disabled']
|
|
16
|
+
]),
|
|
17
|
+
touchableWrapper: (0, styles_1.mergeStyles)([
|
|
18
|
+
obj.touchableWrapper,
|
|
19
|
+
state.focused && obj['touchableWrapper:focus'],
|
|
20
|
+
state.hasError && obj['touchableWrapper:error'],
|
|
21
|
+
state.disabled && obj['touchableWrapper:disabled']
|
|
22
|
+
]),
|
|
23
|
+
'touchableWrapper:disabled': (0, styles_1.mergeStyles)([
|
|
24
|
+
state.disabled && obj['touchableWrapper:disabled']
|
|
25
|
+
])
|
|
26
|
+
}); };
|
|
27
|
+
var useIconStyles = function (styles, iconStyles, states) {
|
|
28
|
+
return (0, react_1.useMemo)(function () {
|
|
29
|
+
var _iconStyles = getIconStyles(iconStyles, states);
|
|
30
|
+
return (0, styles_1.mergeStyles)([styles, _iconStyles]);
|
|
31
|
+
}, [states, styles, iconStyles]);
|
|
32
|
+
};
|
|
33
|
+
var useInputBaseStyles = function (props) {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
var focused = props.focused, disabled = props.disabled, error = props.error, styles = props.style;
|
|
36
|
+
var hasError = !common_1.TypeGuards.isNil(error);
|
|
37
|
+
var compositionStyles = (0, styles_1.useCompositionStyles)(['leftIcon', 'rightIcon', 'icon'], styles);
|
|
38
|
+
var generalIconStyles = getIconStyles(compositionStyles === null || compositionStyles === void 0 ? void 0 : compositionStyles.icon, { hasError: hasError, disabled: disabled });
|
|
39
|
+
var leftIconStyles = useIconStyles(generalIconStyles, compositionStyles === null || compositionStyles === void 0 ? void 0 : compositionStyles.leftIcon, {
|
|
40
|
+
// @ts-expect-error
|
|
41
|
+
hasError: hasError,
|
|
42
|
+
disabled: (disabled || ((_a = props === null || props === void 0 ? void 0 : props.leftIcon) === null || _a === void 0 ? void 0 : _a.disabled)),
|
|
43
|
+
focused: focused
|
|
44
|
+
});
|
|
45
|
+
var rightIconStyles = useIconStyles(generalIconStyles, compositionStyles === null || compositionStyles === void 0 ? void 0 : compositionStyles.rightIcon, {
|
|
46
|
+
// @ts-expect-error
|
|
47
|
+
hasError: hasError,
|
|
48
|
+
disabled: (disabled || ((_b = props === null || props === void 0 ? void 0 : props.rightIcon) === null || _b === void 0 ? void 0 : _b.disabled)),
|
|
49
|
+
focused: focused
|
|
50
|
+
});
|
|
51
|
+
var labelStyle = [
|
|
52
|
+
styles.label,
|
|
53
|
+
focused && styles['label:focus'],
|
|
54
|
+
hasError && styles['label:error'],
|
|
55
|
+
disabled && styles['label:disabled'],
|
|
56
|
+
];
|
|
57
|
+
var errorStyle = [
|
|
58
|
+
styles.errorMessage,
|
|
59
|
+
focused && styles['errorMessage:focus'],
|
|
60
|
+
hasError && styles['errorMessage:error'],
|
|
61
|
+
disabled && styles['errorMessage:disabled'],
|
|
62
|
+
];
|
|
63
|
+
var descriptionStyle = [
|
|
64
|
+
styles.description,
|
|
65
|
+
focused && styles['description:focus'],
|
|
66
|
+
hasError && styles['description:error'],
|
|
67
|
+
disabled && styles['description:disabled'],
|
|
68
|
+
];
|
|
69
|
+
var wrapperStyle = [
|
|
70
|
+
styles.wrapper,
|
|
71
|
+
focused && styles['wrapper:focus'],
|
|
72
|
+
error && styles['wrapper:error'],
|
|
73
|
+
disabled && styles['wrapper:disabled'],
|
|
74
|
+
];
|
|
75
|
+
var innerWrapperStyle = [
|
|
76
|
+
styles.innerWrapper,
|
|
77
|
+
focused && styles['innerWrapper:focus'],
|
|
78
|
+
hasError && styles['innerWrapper:error'],
|
|
79
|
+
disabled && styles['innerWrapper:disabled'],
|
|
80
|
+
];
|
|
81
|
+
var labelRowStyle = [
|
|
82
|
+
styles.labelRow,
|
|
83
|
+
focused && styles['labelRow:focus'],
|
|
84
|
+
hasError && styles['labelRow:error'],
|
|
85
|
+
disabled && styles['labelRow:disabled'],
|
|
86
|
+
];
|
|
87
|
+
return {
|
|
88
|
+
wrapperStyle: wrapperStyle,
|
|
89
|
+
innerWrapperStyle: innerWrapperStyle,
|
|
90
|
+
leftIconStyles: leftIconStyles,
|
|
91
|
+
rightIconStyles: rightIconStyles,
|
|
92
|
+
labelStyle: labelStyle,
|
|
93
|
+
errorStyle: errorStyle,
|
|
94
|
+
descriptionStyle: descriptionStyle,
|
|
95
|
+
labelRowStyle: labelRowStyle
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
exports.useInputBaseStyles = useInputBaseStyles;
|
|
99
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/InputBase/styles.ts"],"names":[],"mappings":";;;AAAA,2CAA6C;AAG7C,2CAAoE;AACpE,+BAA+B;AAuB/B,IAAM,aAAa,GAAG,UAAC,GAAG,EAAE,KAAK,IAAK,OAAA,CAAC;IACrC,IAAI,EAAE,IAAA,oBAAW,EAAC;QAChB,GAAG,CAAC,IAAI;QACR,KAAK,CAAC,OAAO,IAAI,GAAG,CAAC,YAAY,CAAC;QAClC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC,YAAY,CAAC;QACnC,KAAK,CAAC,QAAQ,IAAI,GAAG,CAAC,eAAe,CAAC;KACvC,CAAC;IACF,eAAe,EAA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,sBAAsB,CAAC;KAC3C,CAAA;IAED,IAAM,YAAY,GAAG;QACnB,MAAM,CAAC,OAAO;QACd,OAAO,IAAI,MAAM,CAAC,eAAe,CAAC;QAClC,KAAK,IAAI,MAAM,CAAC,eAAe,CAAC;QAChC,QAAQ,IAAI,MAAM,CAAC,kBAAkB,CAAC;KACvC,CAAA;IAED,IAAM,iBAAiB,GAAG;QACxB,MAAM,CAAC,YAAY;QACnB,OAAO,IAAI,MAAM,CAAC,oBAAoB,CAAC;QACvC,QAAQ,IAAI,MAAM,CAAC,oBAAoB,CAAC;QACxC,QAAQ,IAAI,MAAM,CAAC,uBAAuB,CAAC;KAC5C,CAAA;IAED,IAAM,aAAa,GAAG;QACpB,MAAM,CAAC,QAAQ;QACf,OAAO,IAAI,MAAM,CAAC,gBAAgB,CAAC;QACnC,QAAQ,IAAI,MAAM,CAAC,gBAAgB,CAAC;QACpC,QAAQ,IAAI,MAAM,CAAC,mBAAmB,CAAC;KACxC,CAAA;IAEF,OAAO;QACJ,YAAY,cAAA;QACZ,iBAAiB,mBAAA;QACjB,cAAc,gBAAA;QACd,eAAe,iBAAA;QACf,UAAU,YAAA;QACV,UAAU,YAAA;QACV,gBAAgB,kBAAA;QAChB,aAAa,eAAA;KACf,CAAA;AACF,CAAC,CAAA;AA5EY,QAAA,kBAAkB,sBA4E9B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PropsOf, StylesOf } from '@codeleap/common';
|
|
3
|
+
import { InputBaseComposition } from './styles';
|
|
4
|
+
import { ActionIcon } from '../ActionIcon';
|
|
5
|
+
type ActionIconProps = PropsOf<typeof ActionIcon>;
|
|
6
|
+
type OrderedParts = 'label' | 'description' | 'innerWrapper' | 'error';
|
|
7
|
+
type IconProp = Partial<ActionIconProps> | JSX.Element;
|
|
8
|
+
export type InputBaseProps = React.PropsWithChildren<{
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
error?: React.ReactNode;
|
|
11
|
+
leftIcon?: IconProp;
|
|
12
|
+
rightIcon?: IconProp;
|
|
13
|
+
wrapper?: React.FC<any>;
|
|
14
|
+
wrapperProps?: any;
|
|
15
|
+
innerWrapper?: React.FC<any>;
|
|
16
|
+
innerWrapperProps?: any;
|
|
17
|
+
description?: React.ReactNode;
|
|
18
|
+
debugName: string;
|
|
19
|
+
focused?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
order?: OrderedParts[];
|
|
22
|
+
style?: StylesOf<InputBaseComposition>;
|
|
23
|
+
labelAsRow?: boolean;
|
|
24
|
+
hideErrorMessage?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/InputBase/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputBaseProps } from './types';
|
|
2
|
+
type OmitDiff<T1, T2> = {
|
|
3
|
+
[K in Exclude<keyof T1, keyof T2>]: T1[K];
|
|
4
|
+
} & {
|
|
5
|
+
[K in keyof T2]: T2[K];
|
|
6
|
+
};
|
|
7
|
+
type BaseProps = Omit<InputBaseProps, 'style'>;
|
|
8
|
+
export declare function selectInputBaseProps<T extends BaseProps>(props: T): {
|
|
9
|
+
inputBaseProps: BaseProps;
|
|
10
|
+
others: OmitDiff<T, T>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.selectInputBaseProps = void 0;
|
|
15
|
+
function selectInputBaseProps(props) {
|
|
16
|
+
var varList = [
|
|
17
|
+
'label',
|
|
18
|
+
'style',
|
|
19
|
+
'error',
|
|
20
|
+
'innerWrapper',
|
|
21
|
+
'leftIcon',
|
|
22
|
+
'rightIcon',
|
|
23
|
+
'description',
|
|
24
|
+
'wrapper',
|
|
25
|
+
'children',
|
|
26
|
+
'innerWrapperProps',
|
|
27
|
+
'wrapperProps',
|
|
28
|
+
'disabled',
|
|
29
|
+
'hideErrorMessage',
|
|
30
|
+
'style',
|
|
31
|
+
];
|
|
32
|
+
var copy = __assign({}, props);
|
|
33
|
+
var result = varList.reduce(function (acc, key) {
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
acc[key] = copy[key];
|
|
36
|
+
return acc;
|
|
37
|
+
}, {});
|
|
38
|
+
return { inputBaseProps: result, others: copy };
|
|
39
|
+
}
|
|
40
|
+
exports.selectInputBaseProps = selectInputBaseProps;
|
|
41
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/InputBase/utils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAYA,SAAgB,oBAAoB,CAAsB,KAAQ;IAIhE,IAAM,OAAO,GAAkB;QAC7B,OAAO;QACP,OAAO;QACP,OAAO;QACP,cAAc;QACd,UAAU;QACV,WAAW;QACX,aAAa;QACb,SAAS;QACT,UAAU;QACV,mBAAmB;QACnB,cAAc;QACd,UAAU;QACV,kBAAkB;QAClB,OAAO;KACR,CAAA;IAED,IAAM,IAAI,gBAAQ,KAAK,CAAE,CAAA;IAEzB,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,GAAG;QACrC,aAAa;QACb,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAA;QAEpB,OAAO,GAAG,CAAA;IACZ,CAAC,EAAE,EAAe,CAAC,CAAA;IAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,IAAsB,EAAE,CAAA;AACnE,CAAC;AA/BD,oDA+BC"}
|