@codeleap/mobile 1.9.33 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionIcon/index.d.ts +13 -0
- package/dist/components/ActionIcon/index.js +54 -0
- package/dist/components/ActionIcon/index.js.map +1 -0
- package/dist/components/ActionIcon/styles.d.ts +64 -0
- package/dist/components/ActionIcon/styles.js +57 -0
- package/dist/components/ActionIcon/styles.js.map +1 -0
- package/dist/components/{ActivityIndicator.d.ts → ActivityIndicator/index.d.ts} +4 -2
- package/dist/components/{ActivityIndicator.js → ActivityIndicator/index.js} +5 -1
- package/dist/components/ActivityIndicator/index.js.map +1 -0
- package/dist/components/ActivityIndicator/styles.d.ts +59 -0
- package/dist/components/ActivityIndicator/styles.js +52 -0
- package/dist/components/ActivityIndicator/styles.js.map +1 -0
- package/dist/components/AutoComplete/index.d.ts +33 -0
- package/dist/components/AutoComplete/index.js +129 -0
- package/dist/components/AutoComplete/index.js.map +1 -0
- package/dist/components/AutoComplete/styles.d.ts +57 -0
- package/dist/components/AutoComplete/styles.js +28 -0
- package/dist/components/AutoComplete/styles.js.map +1 -0
- package/dist/components/Backdrop/index.d.ts +14 -0
- package/dist/components/{Backdrop.js → Backdrop/index.js} +21 -30
- package/dist/components/Backdrop/index.js.map +1 -0
- package/dist/components/{Backdrop.d.ts → Backdrop/styles.d.ts} +7 -20
- package/dist/components/Backdrop/styles.js +28 -0
- package/dist/components/Backdrop/styles.js.map +1 -0
- package/dist/components/Button/index.d.ts +247 -0
- package/dist/components/{Button.js → Button/index.js} +45 -11
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/{NewPager → Button}/styles.d.ts +59 -86
- package/dist/components/Button/styles.js +59 -0
- package/dist/components/Button/styles.js.map +1 -0
- package/dist/components/Calendar/index.d.ts +15 -0
- package/dist/components/Calendar/index.js +80 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Calendar/style.d.ts +4 -0
- package/dist/components/Calendar/style.js +36 -0
- package/dist/components/Calendar/style.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 +2 -2
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Checkbox/index.js.map +1 -1
- package/dist/components/Checkbox/styles.d.ts +52 -52
- package/dist/components/Checkbox/styles.js +2 -2
- package/dist/components/Checkbox/styles.js.map +1 -1
- package/dist/components/{ContentView.d.ts → ContentView/index.d.ts} +5 -3
- package/dist/components/{ContentView.js → ContentView/index.js} +19 -4
- package/dist/components/ContentView/index.js.map +1 -0
- package/dist/components/ContentView/styles.d.ts +53 -0
- package/dist/components/ContentView/styles.js +26 -0
- package/dist/components/ContentView/styles.js.map +1 -0
- package/dist/components/Drawer/index.d.ts +7 -0
- package/dist/components/{View.js → Drawer/index.js} +18 -15
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/{NewModal → Drawer}/styles.d.ts +55 -56
- package/dist/components/Drawer/styles.js +37 -0
- package/dist/components/Drawer/styles.js.map +1 -0
- package/dist/components/{EmptyPlaceholder.d.ts → EmptyPlaceholder/index.d.ts} +4 -2
- package/dist/components/{EmptyPlaceholder.js → EmptyPlaceholder/index.js} +9 -5
- package/dist/components/EmptyPlaceholder/index.js.map +1 -0
- package/dist/components/EmptyPlaceholder/styles.d.ts +55 -0
- package/dist/components/EmptyPlaceholder/styles.js +32 -0
- package/dist/components/EmptyPlaceholder/styles.js.map +1 -0
- package/dist/components/{FileInput.d.ts → FileInput/index.d.ts} +8 -6
- package/dist/components/{FileInput.js → FileInput/index.js} +13 -30
- package/dist/components/FileInput/index.js.map +1 -0
- package/dist/components/FileInput/styles.d.ts +53 -0
- package/dist/components/FileInput/styles.js +19 -0
- package/dist/components/FileInput/styles.js.map +1 -0
- package/dist/components/Grid/index.d.ts +30 -0
- package/dist/components/Grid/index.js +69 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/Grid/styles.d.ts +5 -0
- package/dist/components/Grid/styles.js +19 -0
- package/dist/components/Grid/styles.js.map +1 -0
- package/dist/components/{Icon.d.ts → Icon/index.d.ts} +3 -1
- package/dist/components/{Icon.js → Icon/index.js} +6 -2
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Icon/styles.d.ts +60 -0
- package/dist/components/Icon/styles.js +45 -0
- package/dist/components/Icon/styles.js.map +1 -0
- package/dist/components/{Image.d.ts → Image/index.d.ts} +6 -4
- package/dist/components/{Image.js → Image/index.js} +35 -7
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Image/styles.d.ts +54 -0
- package/dist/components/Image/styles.js +25 -0
- package/dist/components/Image/styles.js.map +1 -0
- package/dist/components/ImageView/Spotlight.d.ts +25 -0
- package/dist/components/ImageView/Spotlight.js +155 -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 +54 -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/List/PaginationIndicator.d.ts +67 -0
- package/dist/components/List/PaginationIndicator.js +51 -0
- package/dist/components/List/PaginationIndicator.js.map +1 -0
- package/dist/components/{List.d.ts → List/index.d.ts} +12 -15
- package/dist/components/List/index.js +68 -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 +24 -0
- package/dist/components/List/styles.js.map +1 -0
- package/dist/components/Modal/index.d.ts +13 -3
- package/dist/components/Modal/index.js +23 -8
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/styles.d.ts +55 -55
- package/dist/components/Modal/styles.js +4 -3
- package/dist/components/Modal/styles.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +6 -0
- package/dist/components/MultiSelect/index.js +106 -0
- package/dist/components/MultiSelect/index.js.map +1 -0
- package/dist/components/MultiSelect/styles.d.ts +58 -0
- package/dist/components/MultiSelect/styles.js +25 -0
- package/dist/components/MultiSelect/styles.js.map +1 -0
- package/dist/components/MultiSelect/types.d.ts +32 -0
- package/dist/components/MultiSelect/types.js +3 -0
- package/dist/components/MultiSelect/types.js.map +1 -0
- package/dist/components/Navigation/Navigation.js +1 -5
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Pager/index.d.ts +18 -12
- package/dist/components/Pager/index.js +54 -134
- package/dist/components/Pager/index.js.map +1 -1
- package/dist/components/Pager/styles.d.ts +42 -9
- package/dist/components/Pager/styles.js +53 -27
- package/dist/components/Pager/styles.js.map +1 -1
- package/dist/components/RadioInput/index.d.ts +4 -4
- package/dist/components/RadioInput/index.js.map +1 -1
- package/dist/components/RadioInput/styles.d.ts +53 -53
- package/dist/components/RadioInput/styles.js +11 -7
- package/dist/components/RadioInput/styles.js.map +1 -1
- package/dist/components/Scroll/index.d.ts +18 -0
- package/dist/components/{Scroll.js → Scroll/index.js} +14 -11
- package/dist/components/Scroll/index.js.map +1 -0
- package/dist/components/Scroll/styles.d.ts +4 -0
- package/dist/components/Scroll/styles.js +27 -0
- package/dist/components/Scroll/styles.js.map +1 -0
- package/dist/components/Sections/index.d.ts +11 -0
- package/dist/components/{Sections.js → Sections/index.js} +4 -5
- package/dist/components/Sections/index.js.map +1 -0
- package/dist/components/SegmentedControl/index.js.map +1 -1
- package/dist/components/SegmentedControl/styles.d.ts +6 -6
- package/dist/components/Select/index.d.ts +8 -0
- package/dist/components/Select/index.js +38 -80
- package/dist/components/Select/index.js.map +1 -1
- package/dist/components/Select/styles.d.ts +57 -7
- package/dist/components/Select/styles.js +14 -41
- package/dist/components/Select/styles.js.map +1 -1
- package/dist/components/Select/types.d.ts +16 -25
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +4 -0
- package/dist/components/Slider/index.js.map +1 -1
- package/dist/components/Slider/styles.d.ts +53 -0
- package/dist/components/Slider/styles.js +61 -0
- package/dist/components/Slider/styles.js.map +1 -0
- package/dist/components/Slider/types.d.ts +3 -2
- package/dist/components/{Switch.d.ts → Switch/index.d.ts} +3 -2
- package/dist/components/{Switch.js → Switch/index.js} +8 -4
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/styles.d.ts +54 -0
- package/dist/components/Switch/styles.js +34 -0
- package/dist/components/Switch/styles.js.map +1 -0
- package/dist/components/{Text.d.ts → Text/index.d.ts} +5 -3
- package/dist/components/{Text.js → Text/index.js} +7 -3
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Text/styles.d.ts +65 -0
- package/dist/components/Text/styles.js +23 -0
- package/dist/components/Text/styles.js.map +1 -0
- package/dist/components/TextInput/Label.d.ts +9 -0
- package/dist/components/TextInput/Label.js +34 -0
- package/dist/components/TextInput/Label.js.map +1 -0
- package/dist/components/{TextInput.d.ts → TextInput/index.d.ts} +34 -41
- package/dist/components/{TextInput.js → TextInput/index.js} +51 -48
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/TextInput/styles.d.ts +62 -0
- package/dist/components/TextInput/styles.js +60 -0
- package/dist/components/TextInput/styles.js.map +1 -0
- package/dist/components/{Touchable.d.ts → Touchable/index.d.ts} +8 -4
- package/dist/components/{Touchable.js → Touchable/index.js} +59 -12
- package/dist/components/Touchable/index.js.map +1 -0
- package/dist/components/Touchable/styles.d.ts +53 -0
- package/dist/components/Touchable/styles.js +19 -0
- package/dist/components/Touchable/styles.js.map +1 -0
- package/dist/components/{View.d.ts → View/index.d.ts} +6 -0
- package/dist/components/View/index.js +99 -0
- package/dist/components/View/index.js.map +1 -0
- package/dist/components/View/styles.d.ts +54 -0
- package/dist/components/View/styles.js +29 -0
- package/dist/components/View/styles.js.map +1 -0
- package/dist/components/components.d.ts +10 -3
- package/dist/components/components.js +23 -3
- package/dist/components/components.js.map +1 -1
- package/dist/components/defaultStyles.d.ts +1364 -0
- package/dist/components/defaultStyles.js +63 -0
- package/dist/components/defaultStyles.js.map +1 -0
- package/dist/components/{_Modal → legacy/Modal}/index.d.ts +3 -3
- package/dist/components/{_Modal → legacy/Modal}/index.js +6 -6
- package/dist/components/legacy/Modal/index.js.map +1 -0
- package/dist/components/{_Modal → legacy/Modal}/styles.d.ts +6 -6
- package/dist/components/{_Modal → legacy/Modal}/styles.js +0 -0
- package/dist/components/legacy/Modal/styles.js.map +1 -0
- package/dist/components/legacy/Pager/index.d.ts +20 -0
- package/dist/components/legacy/Pager/index.js +168 -0
- package/dist/components/legacy/Pager/index.js.map +1 -0
- package/dist/components/legacy/Pager/styles.d.ts +54 -0
- package/dist/components/legacy/Pager/styles.js +44 -0
- package/dist/components/legacy/Pager/styles.js.map +1 -0
- package/dist/components/legacy/index.d.ts +2 -0
- package/dist/components/legacy/index.js +19 -0
- package/dist/components/legacy/index.js.map +1 -0
- package/dist/index.d.ts +4 -6
- package/dist/index.js +6 -9
- package/dist/index.js.map +1 -1
- package/dist/modules/reactNavigation.d.ts +2 -0
- package/dist/modules/reactNavigation.js +16 -1
- package/dist/modules/reactNavigation.js.map +1 -1
- package/dist/modules/textInputMask.d.ts +1 -0
- package/dist/modules/textInputMask.js +15 -0
- package/dist/modules/textInputMask.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +18 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/KeyboardAware/index.d.ts +6 -0
- package/dist/utils/KeyboardAware/index.js +31 -0
- package/dist/utils/KeyboardAware/index.js.map +1 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.d.ts +3 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.js +9 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareFlatList.js.map +1 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.d.ts +65 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js +450 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareHOC.js.map +1 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.d.ts +7 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.js +4 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareInterface.js.map +1 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.d.ts +3 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.js +10 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareScrollView.js.map +1 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.d.ts +3 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.js +10 -0
- package/dist/utils/KeyboardAware/lib/KeyboardAwareSectionList.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 +10 -2
- package/dist/utils/ModalManager/components.js +39 -7
- package/dist/utils/ModalManager/components.js.map +1 -1
- package/dist/utils/ModalManager/context.d.ts +1 -0
- package/dist/utils/ModalManager/context.js +6 -0
- package/dist/utils/ModalManager/context.js.map +1 -1
- package/dist/utils/ModalManager/index.d.ts +3 -2
- package/dist/utils/ModalManager/index.js +1 -0
- package/dist/utils/ModalManager/index.js.map +1 -1
- package/dist/utils/PermissionManager/context.js +0 -7
- package/dist/utils/PermissionManager/context.js.map +1 -1
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +42 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/misc.d.ts +5 -1
- package/dist/utils/misc.js +62 -1
- package/dist/utils/misc.js.map +1 -1
- package/dist/utils/notifications.d.ts +34 -0
- package/dist/utils/notifications.js +268 -0
- package/dist/utils/notifications.js.map +1 -0
- package/package.json +13 -4
- package/src/components/ActionIcon/index.tsx +31 -0
- package/src/components/ActionIcon/styles.ts +92 -0
- package/src/components/{ActivityIndicator.tsx → ActivityIndicator/index.tsx} +7 -3
- package/src/components/ActivityIndicator/styles.ts +68 -0
- package/src/components/AutoComplete/index.tsx +158 -0
- package/src/components/AutoComplete/styles.ts +49 -0
- package/src/components/{Backdrop.tsx → Backdrop/index.tsx} +9 -42
- package/src/components/Backdrop/styles.ts +33 -0
- package/src/components/{Button.tsx → Button/index.tsx} +64 -11
- package/src/components/Button/styles.ts +105 -0
- package/src/components/Calendar/index.tsx +65 -0
- package/src/components/Calendar/style.ts +35 -0
- package/src/components/Calendar/types.ts +102 -0
- package/src/components/Checkbox/index.tsx +6 -4
- package/src/components/Checkbox/styles.ts +3 -3
- package/src/components/{ContentView.tsx → ContentView/index.tsx} +11 -6
- package/src/components/ContentView/styles.ts +25 -0
- package/src/components/Drawer/index.tsx +24 -0
- package/src/components/Drawer/styles.ts +38 -0
- package/src/components/{EmptyPlaceholder.tsx → EmptyPlaceholder/index.tsx} +14 -7
- package/src/components/EmptyPlaceholder/styles.ts +58 -0
- package/src/components/{FileInput.tsx → FileInput/index.tsx} +19 -28
- package/src/components/FileInput/styles.ts +15 -0
- package/src/components/Grid/index.tsx +107 -0
- package/src/components/Grid/styles.ts +11 -0
- package/src/components/{Icon.tsx → Icon/index.tsx} +8 -3
- package/src/components/Icon/styles.ts +52 -0
- package/src/components/Image/index.tsx +88 -0
- package/src/components/Image/styles.ts +20 -0
- package/src/components/ImageView/Spotlight.tsx +158 -0
- package/src/components/ImageView/component.tsx +38 -0
- package/src/components/ImageView/index.ts +2 -0
- package/src/components/List/PaginationIndicator.tsx +71 -0
- package/src/components/List/index.tsx +108 -0
- package/src/components/List/styles.ts +15 -0
- package/src/components/Modal/index.tsx +75 -39
- package/src/components/Modal/styles.ts +7 -5
- package/src/components/MultiSelect/index.tsx +120 -0
- package/src/components/MultiSelect/styles.ts +25 -0
- package/src/components/MultiSelect/types.ts +39 -0
- package/src/components/Navigation/Navigation.tsx +1 -5
- package/src/components/Pager/index.tsx +81 -202
- package/src/components/Pager/styles.ts +58 -33
- package/src/components/RadioInput/index.tsx +5 -6
- package/src/components/RadioInput/styles.ts +8 -10
- package/src/components/{Scroll.tsx → Scroll/index.tsx} +22 -24
- package/src/components/Scroll/styles.ts +18 -0
- package/src/components/{Sections.tsx → Sections/index.tsx} +5 -15
- package/src/components/SegmentedControl/index.tsx +1 -1
- package/src/components/Select/index.tsx +74 -139
- package/src/components/Select/styles.ts +42 -74
- package/src/components/Select/types.ts +16 -23
- package/src/components/Slider/index.tsx +2 -0
- package/src/components/Slider/styles.ts +75 -0
- package/src/components/Slider/types.ts +7 -2
- package/src/components/{Switch.tsx → Switch/index.tsx} +9 -4
- package/src/components/Switch/styles.ts +37 -0
- package/src/components/{Text.tsx → Text/index.tsx} +7 -3
- package/src/components/Text/styles.ts +34 -0
- package/src/components/TextInput/Label.tsx +26 -0
- package/src/components/{TextInput.tsx → TextInput/index.tsx} +84 -70
- package/src/components/TextInput/styles.ts +120 -0
- package/src/components/Touchable/index.tsx +133 -0
- package/src/components/Touchable/styles.ts +16 -0
- package/src/components/View/index.tsx +89 -0
- package/src/components/View/styles.ts +24 -0
- package/src/components/components.ts +14 -4
- package/src/components/defaultStyles.ts +60 -0
- package/src/components/{_Modal → legacy/Modal}/index.tsx +7 -7
- package/src/components/{_Modal → legacy/Modal}/styles.ts +0 -0
- package/src/components/legacy/Pager/index.tsx +242 -0
- package/src/components/legacy/Pager/styles.ts +51 -0
- package/src/components/legacy/index.ts +2 -0
- package/src/index.ts +4 -9
- package/src/modules/reactNavigation.ts +11 -0
- package/src/modules/textInputMask.ts +2 -0
- package/src/types/index.ts +1 -0
- package/src/utils/KeyboardAware/index.ts +15 -0
- package/src/utils/KeyboardAware/lib/KeyboardAwareFlatList.ts +4 -0
- package/src/utils/KeyboardAware/lib/KeyboardAwareHOC.tsx +608 -0
- package/src/utils/KeyboardAware/lib/KeyboardAwareInterface.ts +13 -0
- package/src/utils/KeyboardAware/lib/KeyboardAwareScrollView.ts +6 -0
- package/src/utils/KeyboardAware/lib/KeyboardAwareSectionList.ts +6 -0
- package/src/utils/KeyboardAware/types.ts +159 -0
- package/src/utils/ModalManager/components.tsx +57 -14
- package/src/utils/ModalManager/context.tsx +10 -0
- package/src/utils/ModalManager/index.ts +4 -1
- package/src/utils/PermissionManager/context.tsx +1 -7
- package/src/utils/index.ts +9 -0
- package/src/utils/misc.ts +61 -2
- package/src/utils/notifications.ts +206 -0
- package/dist/components/ActivityIndicator.js.map +0 -1
- package/dist/components/Backdrop.js.map +0 -1
- package/dist/components/Button.d.ts +0 -132
- package/dist/components/Button.js.map +0 -1
- package/dist/components/ContentView.js.map +0 -1
- package/dist/components/EmptyPlaceholder.js.map +0 -1
- package/dist/components/FileInput.js.map +0 -1
- package/dist/components/Gap.d.ts +0 -8
- package/dist/components/Gap.js +0 -60
- package/dist/components/Gap.js.map +0 -1
- package/dist/components/Icon.js.map +0 -1
- package/dist/components/Image.js.map +0 -1
- package/dist/components/List.js +0 -101
- package/dist/components/List.js.map +0 -1
- package/dist/components/NewModal/index.d.ts +0 -27
- package/dist/components/NewModal/index.js +0 -99
- package/dist/components/NewModal/index.js.map +0 -1
- package/dist/components/NewModal/styles.js +0 -58
- package/dist/components/NewModal/styles.js.map +0 -1
- package/dist/components/NewPager/index.d.ts +0 -26
- package/dist/components/NewPager/index.js +0 -88
- package/dist/components/NewPager/index.js.map +0 -1
- package/dist/components/NewPager/styles.js +0 -70
- package/dist/components/NewPager/styles.js.map +0 -1
- package/dist/components/Overlay.d.ts +0 -16
- package/dist/components/Overlay.js +0 -74
- package/dist/components/Overlay.js.map +0 -1
- package/dist/components/Scroll.d.ts +0 -15
- package/dist/components/Scroll.js.map +0 -1
- package/dist/components/Sections.d.ts +0 -11
- package/dist/components/Sections.js.map +0 -1
- package/dist/components/SegmentedControl.d.ts +0 -5
- package/dist/components/SegmentedControl.js +0 -32
- package/dist/components/SegmentedControl.js.map +0 -1
- package/dist/components/Switch.js.map +0 -1
- package/dist/components/Text.js.map +0 -1
- package/dist/components/TextInput.js.map +0 -1
- package/dist/components/Touchable.js.map +0 -1
- package/dist/components/View.js.map +0 -1
- package/dist/components/_Modal/index.js.map +0 -1
- package/dist/components/_Modal/styles.js.map +0 -1
- package/dist/utils/PermissionManager/components.d.ts +0 -18
- package/dist/utils/PermissionManager/components.js +0 -52
- package/dist/utils/PermissionManager/components.js.map +0 -1
- package/dist/utils/styles.d.ts +0 -1
- package/dist/utils/styles.js +0 -13
- package/dist/utils/styles.js.map +0 -1
- package/src/components/Gap.tsx +0 -40
- package/src/components/Image.tsx +0 -62
- package/src/components/List.tsx +0 -155
- package/src/components/NewPager/index.tsx +0 -121
- package/src/components/NewPager/styles.ts +0 -76
- package/src/components/Overlay.tsx +0 -86
- package/src/components/Touchable.tsx +0 -89
- package/src/components/View.tsx +0 -48
- package/src/utils/styles.ts +0 -14
|
@@ -33,6 +33,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
33
33
|
__setModuleDefault(result, mod);
|
|
34
34
|
return result;
|
|
35
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
|
+
};
|
|
36
39
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
37
40
|
var t = {};
|
|
38
41
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -45,26 +48,31 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
45
48
|
return t;
|
|
46
49
|
};
|
|
47
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
51
|
+
exports.InputIcon = exports.FormError = exports.TextInput = exports.InputLabel = void 0;
|
|
49
52
|
var React = __importStar(require("react"));
|
|
50
53
|
var common_1 = require("@codeleap/common");
|
|
51
54
|
var react_1 = require("react");
|
|
52
|
-
var Text_1 = require("
|
|
53
|
-
var View_1 = require("
|
|
54
|
-
var Icon_1 = require("./Icon");
|
|
55
|
+
var Text_1 = require("../Text");
|
|
56
|
+
var View_1 = require("../View");
|
|
55
57
|
var react_native_1 = require("react-native");
|
|
56
|
-
var Touchable_1 = require("
|
|
57
|
-
var textInputMask_1 = require("
|
|
58
|
+
var Touchable_1 = require("../Touchable");
|
|
59
|
+
var textInputMask_1 = require("../../modules/textInputMask");
|
|
60
|
+
var Label_1 = require("./Label");
|
|
61
|
+
var Label_2 = require("./Label");
|
|
62
|
+
Object.defineProperty(exports, "InputLabel", { enumerable: true, get: function () { return Label_2.InputLabel; } });
|
|
63
|
+
__exportStar(require("./styles"), exports);
|
|
64
|
+
var ActionIcon_1 = require("../ActionIcon");
|
|
58
65
|
exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
|
|
59
66
|
var _a, _b;
|
|
60
|
-
var onChange = rawprops.onChange,
|
|
67
|
+
var onChange = rawprops.onChange, value = rawprops.value, onChangeText = rawprops.onChangeText, disabled = rawprops.disabled, edited = rawprops.edited, onFocus = rawprops.onFocus, onBlur = rawprops.onBlur, variants = rawprops.variants, label = rawprops.label, wrapperProps = rawprops.wrapperProps, leftIcon = rawprops.leftIcon, rightIcon = rawprops.rightIcon, styles = rawprops.styles, validate = rawprops.validate, password = rawprops.password, visibilityToggle = rawprops.visibilityToggle, innerWrapperProps = rawprops.innerWrapperProps, _c = rawprops.masking, masking = _c === void 0 ? null : _c, onChangeMask = rawprops.onChangeMask, debugName = rawprops.debugName, _d = rawprops.required, required = _d === void 0 ? false : _d, props = __rest(rawprops, ["onChange", "value", "onChangeText", "disabled", "edited", "onFocus", "onBlur", "variants", "label", "wrapperProps", "leftIcon", "rightIcon", "styles", "validate", "password", "visibilityToggle", "innerWrapperProps", "masking", "onChangeMask", "debugName", "required"]);
|
|
61
68
|
var _e = (0, react_1.useState)(false), isFocused = _e[0], setFocus = _e[1];
|
|
62
69
|
var _f = (0, react_1.useState)(edited), editedState = _f[0], setEdited = _f[1];
|
|
63
70
|
var input = (0, react_1.useRef)(null);
|
|
64
71
|
var _g = (0, common_1.useBooleanToggle)(false), textIsVisible = _g[0], setTextVisible = _g[1];
|
|
65
|
-
var variantStyles = (0, common_1.useDefaultComponentStyle)('TextInput', {
|
|
72
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:TextInput', {
|
|
66
73
|
variants: variants,
|
|
67
74
|
styles: styles,
|
|
75
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
68
76
|
});
|
|
69
77
|
var InputElement = masking ? textInputMask_1.MaskedTextInput : react_native_1.TextInput;
|
|
70
78
|
var handleBlur = function (e) {
|
|
@@ -99,9 +107,9 @@ exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
|
|
|
99
107
|
(_b = (_a = input.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
100
108
|
}, isTextInput: true })); });
|
|
101
109
|
var _h = (0, common_1.useValidate)(value, validate), showError = _h.showError, error = _h.error;
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
var
|
|
110
|
+
var commonIconStyles = (0, common_1.getNestedStylesByKey)('icon', variantStyles);
|
|
111
|
+
var leftIconStyles = (0, common_1.getNestedStylesByKey)('leftIcon', variantStyles);
|
|
112
|
+
var rightIconStyles = (0, common_1.getNestedStylesByKey)('rightIcon', variantStyles);
|
|
105
113
|
function getStyles(key) {
|
|
106
114
|
var requestedStyles = [
|
|
107
115
|
variantStyles[key],
|
|
@@ -119,18 +127,21 @@ exports.TextInput = (0, react_1.forwardRef)(function (rawprops, inputRef) {
|
|
|
119
127
|
(_b = (_a = input.current) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
120
128
|
}
|
|
121
129
|
}
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
var visibilityToggleProps = visibilityToggle ? {
|
|
131
|
+
onPress: function () { return setTextVisible(); },
|
|
132
|
+
icon: (textIsVisible ? 'input-visiblity:visible' : 'input-visiblity:hidden'),
|
|
133
|
+
debugName: "".concat(debugName, " toggle visibility"),
|
|
134
|
+
} : {};
|
|
135
|
+
return (<Touchable_1.Touchable style={getStyles('wrapper')} debugName={debugName} onPress={handlePress} {...wrapperProps} android_ripple={null}>
|
|
136
|
+
<Label_1.InputLabel label={label} style={getStyles('label')} asteriskStyle={getStyles('requiredAsterisk')} wrapperStyle={getStyles('labelWrapper')} required={required}/>
|
|
124
137
|
<View_1.View style={getStyles('innerWrapper')} {...innerWrapperProps}>
|
|
125
|
-
<exports.InputIcon {
|
|
138
|
+
<exports.InputIcon isFocused={isFocused} showError={showError} styles={leftIconStyles} commonStyles={commonIconStyles} debugName={"".concat(debugName, " left icon")} {...leftIcon}/>
|
|
126
139
|
{/* @ts-ignore */}
|
|
127
140
|
<InputElement ref={input} secureTextEntry={password && !textIsVisible} onChange={function (e) { return masking ? onChange === null || onChange === void 0 ? void 0 : onChange(e) : handleChange(e); }} value={value} editable={disabled} onFocus={handleFocus} onBlur={handleBlur} placeholderTextColor={(_a = react_native_1.StyleSheet.flatten(getStyles('placeholder'))) === null || _a === void 0 ? void 0 : _a.color} selectionColor={(_b = react_native_1.StyleSheet.flatten(getStyles('selection'))) === null || _b === void 0 ? void 0 : _b.color} includeRawValueInChangeText={true} {...props} {...(masking ? { onChangeText: handleMaskChange, type: masking === null || masking === void 0 ? void 0 : masking.type, refInput: function (inputRef) {
|
|
128
141
|
input.current = inputRef;
|
|
129
142
|
} } : {})} style={getStyles('textField')}/>
|
|
130
|
-
{
|
|
131
|
-
|
|
132
|
-
:
|
|
133
|
-
<exports.InputIcon {...rightIcon} style={rightIconStyle} wrapperStyle={buttonIconWrapperStyle}/>}
|
|
143
|
+
<exports.InputIcon isFocused={isFocused} showError={showError} styles={rightIconStyles} commonStyles={commonIconStyles} debugName={"".concat(debugName, " right icon")} {...rightIcon} {...visibilityToggleProps}/>
|
|
144
|
+
|
|
134
145
|
</View_1.View>
|
|
135
146
|
<exports.FormError message={error.message} style={getStyles('error')}/>
|
|
136
147
|
</Touchable_1.Touchable>);
|
|
@@ -145,37 +156,29 @@ var FormError = function (_a) {
|
|
|
145
156
|
};
|
|
146
157
|
exports.FormError = FormError;
|
|
147
158
|
var InputIcon = function (_a) {
|
|
148
|
-
var
|
|
149
|
-
if (!
|
|
159
|
+
var styles = _a.styles, commonStyles = _a.commonStyles, isFocused = _a.isFocused, showError = _a.showError, props = __rest(_a, ["styles", "commonStyles", "isFocused", "showError"]);
|
|
160
|
+
if (!props.icon)
|
|
150
161
|
return null;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
162
|
+
function getStyles(key) {
|
|
163
|
+
if (key === 'icon')
|
|
164
|
+
key = '';
|
|
165
|
+
var requestedStyles = [
|
|
166
|
+
commonStyles[key],
|
|
167
|
+
isFocused ? commonStyles[key + ':focus'] : {},
|
|
168
|
+
showError ? commonStyles[key + ':error'] : {},
|
|
169
|
+
styles[key],
|
|
170
|
+
isFocused ? styles[key + ':focus'] : {},
|
|
171
|
+
showError ? styles[key + ':error'] : {},
|
|
172
|
+
];
|
|
173
|
+
return react_native_1.StyleSheet.flatten(requestedStyles);
|
|
155
174
|
}
|
|
156
|
-
|
|
175
|
+
var iconStyles = {
|
|
176
|
+
icon: getStyles('icon'),
|
|
177
|
+
touchablePressable: getStyles('touchablePressable'),
|
|
178
|
+
touchableWrapper: getStyles('touchableWrapper'),
|
|
179
|
+
touchableRipple: getStyles('touchableRipple'),
|
|
180
|
+
};
|
|
181
|
+
return <ActionIcon_1.ActionIcon styles={iconStyles} {...props}/>;
|
|
157
182
|
};
|
|
158
183
|
exports.InputIcon = InputIcon;
|
|
159
|
-
|
|
160
|
-
var label = _a.label, _b = _a.variants, variants = _b === void 0 ? [] : _b, _c = _a.styles, styles = _c === void 0 ? {} : _c, style = _a.style, _d = _a.asteriskStyle, asteriskStyle = _d === void 0 ? null : _d, _e = _a.required, required = _e === void 0 ? false : _e, _f = _a.wrapperStyle, wrapperStyle = _f === void 0 ? null : _f;
|
|
161
|
-
var labelStyles = (0, common_1.useDefaultComponentStyle)('TextInput', {
|
|
162
|
-
variants: variants,
|
|
163
|
-
styles: styles,
|
|
164
|
-
transform: react_native_1.StyleSheet.flatten,
|
|
165
|
-
});
|
|
166
|
-
if (!label)
|
|
167
|
-
return null;
|
|
168
|
-
switch (typeof label) {
|
|
169
|
-
case 'string':
|
|
170
|
-
return <View_1.View style={wrapperStyle || labelStyles.labelWrapper}>
|
|
171
|
-
<Text_1.Text style={style || labelStyles.label} text={label}/>
|
|
172
|
-
{required && <Text_1.Text style={asteriskStyle || labelStyles.requiredAsterisk} text={' *'}/>}
|
|
173
|
-
</View_1.View>;
|
|
174
|
-
case 'object':
|
|
175
|
-
return label;
|
|
176
|
-
default:
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
exports.InputLabel = InputLabel;
|
|
181
|
-
//# sourceMappingURL=TextInput.js.map
|
|
184
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextInput/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,2CASyB;AACzB,+BAAmG;AACnG,gCAA8B;AAC9B,gCAAyC;AAGzC,6CAAuH;AACvH,0CAAwD;AACxD,6DAAiF;AACjF,iCAAoC;AAEpC,iCAAoC;AAA3B,mGAAA,UAAU,OAAA;AAEnB,2CAAwB;AAOxB,4CAA4E;AAkC/D,QAAA,SAAS,GAAG,IAAA,kBAAU,EAAkC,UAAC,QAAQ,EAAE,QAAQ;;IAEpF,IAAA,QAAQ,GAsBN,QAAQ,SAtBF,EACR,KAAK,GAqBH,QAAQ,MArBL,EACL,YAAY,GAoBV,QAAQ,aApBE,EACZ,QAAQ,GAmBN,QAAQ,SAnBF,EACR,MAAM,GAk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C;QACvB,kBAAkB,EAAE,SAAS,CAAC,oBAAoB,CAAC;QACnD,gBAAgB,EAAE,SAAS,CAAC,kBAAkB,CAAC;QAC/C,eAAe,EAAE,SAAS,CAAC,iBAAiB,CAAC;KAC9C,CAAA;IAED,OAAO,CAAC,uBAAU,CAChB,MAAM,CAAC,CAAC,UAAU,CAAC,CACnB,IAAI,KAAK,CAAC,EACV,CAAA;AACJ,CAAC,CAAA;AA1BY,QAAA,SAAS,aA0BrB"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ActionIconParts } from '../ActionIcon';
|
|
2
|
+
export declare type IconParts = Exclude<ActionIconParts, 'icon' | 'icon:disabled'>;
|
|
3
|
+
declare type InputIcons = 'icon' | 'leftIcon' | 'rightIcon';
|
|
4
|
+
export declare type InputIconComposition = `${InputIcons}${Capitalize<IconParts>}` | InputIcons;
|
|
5
|
+
declare type TextInputParts = 'wrapper' | InputIconComposition | 'textField' | 'label' | 'innerWrapper' | 'error' | 'placeholder' | 'selection' | 'requiredAsterisk' | 'labelWrapper';
|
|
6
|
+
export declare type TextInputComposition = `${TextInputParts}:error` | `${TextInputParts}:focus` | TextInputParts;
|
|
7
|
+
export declare const TextInputStyles: {
|
|
8
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
9
|
+
line: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
10
|
+
box: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
11
|
+
pill: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
12
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
13
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
14
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
15
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
16
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
17
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
18
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
19
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
20
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
21
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
22
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
23
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
24
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
25
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
26
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
27
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
28
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
29
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
30
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
31
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
32
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
33
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
34
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
35
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
36
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
37
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
38
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
39
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
40
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
41
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
42
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
43
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
44
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
45
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
46
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
47
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
48
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
49
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
50
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
51
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
52
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
53
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
54
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
55
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
56
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
57
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
58
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
59
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
60
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TextInputComposition, any>>;
|
|
61
|
+
};
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
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.TextInputStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createTextInputStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var presets = (0, common_1.includePresets)(function (styles) { return createTextInputStyle(function () { return ({ wrapper: styles }); }); });
|
|
18
|
+
exports.TextInputStyles = __assign(__assign({}, presets), { default: createTextInputStyle(function (theme) { return ({
|
|
19
|
+
textField: __assign(__assign(__assign(__assign({}, theme.spacing.padding(0)), theme.spacing.paddingHorizontal(1)), (0, common_1.assignTextStyle)('p1')(theme).text), { minWidth: 1, backgroundColor: 'transparent', flex: 1 }),
|
|
20
|
+
placeholder: {
|
|
21
|
+
color: theme.colors.lightGray,
|
|
22
|
+
},
|
|
23
|
+
selection: {
|
|
24
|
+
color: theme.colors.primary,
|
|
25
|
+
},
|
|
26
|
+
wrapper: {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
flexDirection: 'column',
|
|
29
|
+
},
|
|
30
|
+
innerWrapper: __assign(__assign(__assign(__assign(__assign({}, theme.spacing.paddingVertical(0.5)), theme.spacing.paddingHorizontal(1)), theme.presets.row), theme.border.neutral(1)), { display: 'flex', alignItems: 'center' }),
|
|
31
|
+
label: __assign(__assign({}, theme.spacing.marginBottom(1)), (0, common_1.assignTextStyle)('h5')(theme).text),
|
|
32
|
+
'icon': {
|
|
33
|
+
color: theme.colors.neutral,
|
|
34
|
+
},
|
|
35
|
+
'icon:error': {
|
|
36
|
+
color: theme.colors.negative,
|
|
37
|
+
},
|
|
38
|
+
'icon:focus': {
|
|
39
|
+
color: theme.colors.primary,
|
|
40
|
+
},
|
|
41
|
+
leftIconTouchableWrapper: __assign({}, theme.spacing.marginRight(1)),
|
|
42
|
+
rightIconTouchableWrapper: __assign({}, theme.spacing.marginLeft(1)),
|
|
43
|
+
error: __assign({ color: theme.colors.negative }, theme.spacing.marginTop(0.5)),
|
|
44
|
+
'label:error': {
|
|
45
|
+
color: theme.colors.negative,
|
|
46
|
+
},
|
|
47
|
+
'innerWrapper:error': __assign({}, theme.border.negative(1)),
|
|
48
|
+
'innerWrapper:focus': __assign({}, theme.border.primary(1)),
|
|
49
|
+
requiredAsterisk: {
|
|
50
|
+
color: theme.colors.negative,
|
|
51
|
+
},
|
|
52
|
+
labelWrapper: __assign({}, theme.presets.row),
|
|
53
|
+
}); }), line: createTextInputStyle(function (theme) { return ({
|
|
54
|
+
innerWrapper: __assign({}, theme.border.neutral({ width: 1, directions: ['bottom'] })),
|
|
55
|
+
}); }), box: createTextInputStyle(function (theme) { return ({
|
|
56
|
+
innerWrapper: __assign({}, theme.border.neutral(1)),
|
|
57
|
+
}); }), pill: createTextInputStyle(function (theme) { return ({
|
|
58
|
+
innerWrapper: __assign(__assign({}, theme.border.neutral(1)), { borderRadius: 15 }),
|
|
59
|
+
}); }) });
|
|
60
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/TextInput/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA+F;AA0B/F,IAAM,oBAAoB,GACxB,IAAA,oCAA2B,GAAwB,CAAA;AAErD,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,oBAAoB,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAArB,CAAqB,CAAC,EAAjD,CAAiD,CAAC,CAAA;AAEhF,Q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* as React from 'react';
|
|
2
2
|
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
-
import { ComponentVariants, BaseViewProps,
|
|
4
|
-
import { Pressable, View } from 'react-native';
|
|
3
|
+
import { ComponentVariants, BaseViewProps, AnyFunction } from '@codeleap/common';
|
|
4
|
+
import { Pressable, View as RNView } from 'react-native';
|
|
5
|
+
import { TouchableComposition, TouchableStyles } from './styles';
|
|
6
|
+
import { StylesOf } from '../../types';
|
|
5
7
|
export declare type TouchableProps = Omit<ComponentPropsWithoutRef<typeof Pressable>, 'onPress'> & {
|
|
6
|
-
variants?: ComponentVariants<typeof
|
|
8
|
+
variants?: ComponentVariants<typeof TouchableStyles>['variants'];
|
|
7
9
|
component?: any;
|
|
8
|
-
ref?: React.Ref<
|
|
10
|
+
ref?: React.Ref<RNView>;
|
|
9
11
|
debugName: string;
|
|
10
12
|
activeOpacity?: number;
|
|
11
13
|
debugComponent?: string;
|
|
12
14
|
feedbackVariant?: 'opacity' | 'none' | 'highlight';
|
|
13
15
|
onPress?: AnyFunction;
|
|
16
|
+
styles?: StylesOf<TouchableComposition>;
|
|
14
17
|
} & BaseViewProps;
|
|
18
|
+
export * from './styles';
|
|
15
19
|
export declare const Touchable: React.FC<TouchableProps>;
|
|
16
20
|
export declare const AnimatedTouchable: React.FC<TouchableProps>;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
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
|
+
};
|
|
2
13
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
14
|
if (k2 === undefined) k2 = k;
|
|
4
15
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -22,6 +33,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
33
|
__setModuleDefault(result, mod);
|
|
23
34
|
return result;
|
|
24
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
|
+
};
|
|
25
39
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
26
40
|
var t = {};
|
|
27
41
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -40,10 +54,34 @@ var react_1 = require("react");
|
|
|
40
54
|
var common_1 = require("@codeleap/common");
|
|
41
55
|
var react_native_1 = require("react-native");
|
|
42
56
|
var react_native_animatable_1 = require("react-native-animatable");
|
|
57
|
+
var View_1 = require("../View");
|
|
58
|
+
__exportStar(require("./styles"), exports);
|
|
59
|
+
var rippleStyles = {
|
|
60
|
+
paddingTop: 0,
|
|
61
|
+
paddingLeft: 0,
|
|
62
|
+
paddingRight: 0,
|
|
63
|
+
paddingBottom: 0,
|
|
64
|
+
overflow: 'hidden',
|
|
65
|
+
};
|
|
66
|
+
var defaultPressableStyles = {
|
|
67
|
+
marginTop: 0,
|
|
68
|
+
marginLeft: 0,
|
|
69
|
+
marginRight: 0,
|
|
70
|
+
marginBottom: 0,
|
|
71
|
+
// height: '100%',
|
|
72
|
+
minWidth: '100%',
|
|
73
|
+
// minHeight: '100%',
|
|
74
|
+
// maxHeight: '100%',
|
|
75
|
+
maxWidth: '100%',
|
|
76
|
+
};
|
|
43
77
|
exports.Touchable = (0, react_1.forwardRef)(function (touchableProps, ref) {
|
|
44
|
-
var _a = touchableProps.variants, variants = _a === void 0 ? [] : _a, children = touchableProps.children, onPress = touchableProps.onPress, style = touchableProps.style, _b = touchableProps.activeOpacity, activeOpacity = _b === void 0 ? 0.5 : _b, debugName = touchableProps.debugName, debugComponent = touchableProps.debugComponent, _c = touchableProps.feedbackVariant, feedbackVariant = _c === void 0 ? 'opacity' : _c, props = __rest(touchableProps, ["variants", "children", "onPress", "style", "activeOpacity", "debugName", "debugComponent", "feedbackVariant"]);
|
|
45
|
-
var
|
|
78
|
+
var _a = touchableProps.variants, variants = _a === void 0 ? [] : _a, children = touchableProps.children, onPress = touchableProps.onPress, style = touchableProps.style, _b = touchableProps.activeOpacity, activeOpacity = _b === void 0 ? 0.5 : _b, debugName = touchableProps.debugName, debugComponent = touchableProps.debugComponent, styles = touchableProps.styles, _c = touchableProps.feedbackVariant, feedbackVariant = _c === void 0 ? 'opacity' : _c, props = __rest(touchableProps, ["variants", "children", "onPress", "style", "activeOpacity", "debugName", "debugComponent", "styles", "feedbackVariant"]);
|
|
79
|
+
var _feedbackVariant = onPress ? feedbackVariant : 'none';
|
|
80
|
+
var variantStyles = (0, common_1.useDefaultComponentStyle)('u:Touchable', {
|
|
46
81
|
variants: variants,
|
|
82
|
+
transform: react_native_1.StyleSheet.flatten,
|
|
83
|
+
rootElement: 'wrapper',
|
|
84
|
+
styles: styles,
|
|
47
85
|
});
|
|
48
86
|
var logger = (0, common_1.useCodeleapContext)().logger;
|
|
49
87
|
var press = function () {
|
|
@@ -53,9 +91,12 @@ exports.Touchable = (0, react_1.forwardRef)(function (touchableProps, ref) {
|
|
|
53
91
|
logger.log("<".concat(debugComponent || 'Touchable', "/> pressed"), debugName || variants, 'User interaction');
|
|
54
92
|
onPress && onPress();
|
|
55
93
|
};
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
94
|
+
var _styles = react_native_1.StyleSheet.flatten([variantStyles.wrapper, style]);
|
|
95
|
+
var hasRipple = (!!variantStyles.ripple || !!props.android_ripple) && _feedbackVariant !== 'none';
|
|
96
|
+
function getFeedbackStyle(pressed) {
|
|
97
|
+
if (react_native_1.Platform.OS === 'android' && hasRipple)
|
|
98
|
+
return {};
|
|
99
|
+
switch (_feedbackVariant) {
|
|
59
100
|
case 'highlight':
|
|
60
101
|
return {
|
|
61
102
|
backgroundColor: pressed ? '#e0e0e0' : 'transparent',
|
|
@@ -69,15 +110,21 @@ exports.Touchable = (0, react_1.forwardRef)(function (touchableProps, ref) {
|
|
|
69
110
|
return {};
|
|
70
111
|
}
|
|
71
112
|
}
|
|
72
|
-
|
|
113
|
+
var rippleConfig = hasRipple ? __assign(__assign({}, (variantStyles.ripple || {})), (props.android_ripple || {})) : null;
|
|
114
|
+
var Wrapper = View_1.View;
|
|
115
|
+
return (<Wrapper style={[_styles, rippleStyles]}>
|
|
116
|
+
<react_native_1.Pressable onPress={press} style={function (_a) {
|
|
73
117
|
var pressed = _a.pressed;
|
|
74
118
|
return ([
|
|
75
|
-
getFeedbackStyle(pressed
|
|
76
|
-
|
|
119
|
+
getFeedbackStyle(pressed),
|
|
120
|
+
variantStyles.pressable,
|
|
121
|
+
_styles,
|
|
122
|
+
defaultPressableStyles,
|
|
77
123
|
]);
|
|
78
|
-
}} {...props} ref={ref}>
|
|
79
|
-
|
|
80
|
-
|
|
124
|
+
}} android_ripple={rippleConfig} {...props} ref={ref}>
|
|
125
|
+
{children}
|
|
126
|
+
</react_native_1.Pressable>
|
|
127
|
+
</Wrapper>);
|
|
81
128
|
});
|
|
82
129
|
exports.AnimatedTouchable = (0, react_native_animatable_1.createAnimatableComponent)(exports.Touchable);
|
|
83
|
-
//# sourceMappingURL=
|
|
130
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Touchable/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8B;AAC9B,+BAA4D;AAC5D,2CAQyB;AACzB,6CAA8E;AAE9E,mEAAmE;AAGnE,gCAA8B;AAe9B,2CAAwB;AAExB,IAAM,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AC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,UAAC,EAAW;gBAAT,OAAO,aAAA;YAAO,OAAA,CAAC;gBAClD,gBAAgB,CAAC,OAAO,CAAC;gBACzB,aAAa,CAAC,SAAS;gBACvB,OAAO;gBACP,sBAAsB;aACvB,CAAC;QALiD,CAKjD,CAAC,CAAC,cAAc,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CACpD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,wBAAS,CACb;IAAA,EAAE,OAAO,CAAC,CACX,CAAA;AACH,CAAC,CAAC,CAAA;AAEW,QAAA,iBAAiB,GAAG,IAAA,mDAAyB,EAAC,iBAAS,CAAgC,CAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare type TouchableComposition = 'wrapper' | 'ripple' | 'pressable';
|
|
2
|
+
export declare const TouchableStyles: {
|
|
3
|
+
default: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
4
|
+
inline: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
5
|
+
block: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
6
|
+
flex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
7
|
+
inlineFlex: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
8
|
+
absolute: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
9
|
+
relative: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
10
|
+
fixed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
11
|
+
sticky: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
12
|
+
hidden: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
13
|
+
full: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
14
|
+
noWrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
15
|
+
fullWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
16
|
+
fullHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
17
|
+
fullView: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
18
|
+
fullViewWidth: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
19
|
+
fullViewHeight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
20
|
+
whole: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
21
|
+
centerRow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
22
|
+
row: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
23
|
+
listStyles: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
24
|
+
column: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
25
|
+
center: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
26
|
+
alignStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
27
|
+
alignEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
28
|
+
alignCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
29
|
+
alignStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
30
|
+
alignSelfCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
31
|
+
alignSelfStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
32
|
+
alignSelfStretch: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
33
|
+
alignSelfEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
34
|
+
justifyStart: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
35
|
+
justifyEnd: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
36
|
+
justifyCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
37
|
+
justifySpaceBetween: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
38
|
+
justifySpaceAround: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
39
|
+
textRight: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
40
|
+
textLeft: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
41
|
+
textCenter: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
42
|
+
blur: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
43
|
+
elevated: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
44
|
+
neumorphism: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
45
|
+
scrollX: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
46
|
+
scrollY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
47
|
+
scrollXY: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
48
|
+
wrap: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
49
|
+
debRed: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
50
|
+
debGreen: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
51
|
+
debBlue: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
52
|
+
debYellow: (theme: import("@codeleap/common").ThemeColorScheme<import("@codeleap/common").AppTheme>, variant?: string) => Partial<Record<TouchableComposition, any>>;
|
|
53
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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.TouchableStyles = void 0;
|
|
15
|
+
var common_1 = require("@codeleap/common");
|
|
16
|
+
var createTouchableStyle = (0, common_1.createDefaultVariantFactory)();
|
|
17
|
+
var presets = (0, common_1.includePresets)(function (styles) { return createTouchableStyle(function () { return ({ wrapper: styles, pressable: styles }); }); });
|
|
18
|
+
exports.TouchableStyles = __assign(__assign({}, presets), { default: createTouchableStyle(function (t) { return ({}); }) });
|
|
19
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/Touchable/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8E;AAI9E,IAAM,oBAAoB,GAAG,IAAA,oCAA2B,GAAwB,CAAA;AAEhF,IAAM,OAAO,GAAG,IAAA,uBAAc,EAAC,UAAC,MAAM,IAAK,OAAA,oBAAoB,CAAC,cAAM,OAAA,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAxC,CAAwC,CAAC,EAApE,CAAoE,CAC9G,CAAA;AAEY,QAAA,eAAe,yBACvB,OAAO,KACV,OAAO,EAAE,oBAAoB,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,EAErC,CAAC,EAFmC,CAEnC,CAAC,IAEJ"}
|
|
@@ -3,6 +3,7 @@ import { ComponentPropsWithoutRef } from 'react';
|
|
|
3
3
|
import { ComponentVariants, ViewStyles, BaseViewProps } from '@codeleap/common';
|
|
4
4
|
import { View as NativeView } from 'react-native';
|
|
5
5
|
import { MotiProps } from 'moti';
|
|
6
|
+
export * from './styles';
|
|
6
7
|
export declare type ViewProps = ComponentPropsWithoutRef<typeof NativeView> & ComponentVariants<typeof ViewStyles> & {
|
|
7
8
|
ref?: any;
|
|
8
9
|
component?: any;
|
|
@@ -121,3 +122,8 @@ export declare const AnimatedView: React.ForwardRefExoticComponent<{
|
|
|
121
122
|
component?: any;
|
|
122
123
|
animated?: boolean;
|
|
123
124
|
} & BaseViewProps>;
|
|
125
|
+
declare type GapProps = ViewProps & {
|
|
126
|
+
value: number;
|
|
127
|
+
defaultProps?: any;
|
|
128
|
+
};
|
|
129
|
+
export declare const Gap: React.FC<GapProps>;
|