├── .editorconfig ├── .github └── workflows │ └── build.yml ├── .gitignore ├── .node-version ├── .prettierignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bsconfig.json ├── package-lock.json ├── package.json └── src ├── Paper.bs.js ├── Paper.res ├── Paper.resi ├── Paper__ActivityIndicator.bs.js ├── Paper__ActivityIndicator.res ├── Paper__Appbar.bs.js ├── Paper__Appbar.res ├── Paper__Avatar.bs.js ├── Paper__Avatar.res ├── Paper__Badge.bs.js ├── Paper__Badge.res ├── Paper__Banner.bs.js ├── Paper__Banner.res ├── Paper__BottomNavigation.bs.js ├── Paper__BottomNavigation.res ├── Paper__Button.bs.js ├── Paper__Button.res ├── Paper__Caption.bs.js ├── Paper__Caption.res ├── Paper__Card.bs.js ├── Paper__Card.res ├── Paper__Checkbox.bs.js ├── Paper__Checkbox.res ├── Paper__Chip.bs.js ├── Paper__Chip.res ├── Paper__DataTable.bs.js ├── Paper__DataTable.res ├── Paper__Dialog.bs.js ├── Paper__Dialog.res ├── Paper__Divider.bs.js ├── Paper__Divider.res ├── Paper__Drawer.bs.js ├── Paper__Drawer.res ├── Paper__FAB.bs.js ├── Paper__FAB.res ├── Paper__Headline.bs.js ├── Paper__Headline.res ├── Paper__HelperText.bs.js ├── Paper__HelperText.res ├── Paper__Icon.bs.js ├── Paper__Icon.res ├── Paper__IconButton.bs.js ├── Paper__IconButton.res ├── Paper__List.bs.js ├── Paper__List.res ├── Paper__Modal.bs.js ├── Paper__Modal.res ├── Paper__PaperProvider.bs.js ├── Paper__PaperProvider.res ├── Paper__Paragraph.bs.js ├── Paper__Paragraph.res ├── Paper__Portal.bs.js ├── Paper__Portal.res ├── Paper__ProgressBar.bs.js ├── Paper__ProgressBar.res ├── Paper__RadioButton.bs.js ├── Paper__RadioButton.res ├── Paper__Searchbar.bs.js ├── Paper__Searchbar.res ├── Paper__Snackbar.bs.js ├── Paper__Snackbar.res ├── Paper__Subheading.bs.js ├── Paper__Subheading.res ├── Paper__Surface.bs.js ├── Paper__Surface.res ├── Paper__Switch.bs.js ├── Paper__Switch.res ├── Paper__Text.bs.js ├── Paper__Text.res ├── Paper__TextInput.bs.js ├── Paper__TextInput.res ├── Paper__ThemeProvider.bs.js ├── Paper__ThemeProvider.res ├── Paper__Title.bs.js ├── Paper__Title.res ├── Paper__ToggleButton.bs.js ├── Paper__ToggleButton.res ├── Paper__TouchableRipple.bs.js └── Paper__TouchableRipple.res /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://EditorConfig.org 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | charset = utf-8 8 | indent_style = space 9 | indent_size = 2 10 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | tests: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v2 11 | with: 12 | node-version-file: ".node-version" 13 | 14 | - uses: actions/cache@v2 15 | with: 16 | path: ~/.npm 17 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 18 | restore-keys: | 19 | ${{ runner.os }}-node- 20 | 21 | - run: npm install -g npm && npm --version 22 | 23 | - run: npm ci 24 | 25 | - run: npm test 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | 3 | # macOS crap 4 | .DS_Store 5 | 6 | # node 7 | node_modules 8 | 9 | # ReScript artifacts 10 | # *.bs.js # we do want this files to ensure zero-cost 11 | .bsb.lock 12 | **/lib/bs 13 | **/lib/ocaml 14 | **/.merlin 15 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 16 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.bs.js 2 | package.json 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog of `@rescript-react-native/paper` 2 | 3 | ## 3.0.6 - 2021-05-03 4 | 5 | ReScript 6 | 7 | ## 3.0.5 - 2021-02-19 8 | 9 | Fix bsconfig.json name 10 | 11 | ## 3.0.4 - 2020-11-17 12 | 13 | Fix npm description 14 | 15 | ## 3.0.3 - 2020-11-07 16 | 17 | - Add theme support in `PaperProvider` [#5](https://github.com/rescript-react-native/paper/pull/5) by [@souhe](https://github.com/souhe) 18 | 19 | ## 3.0.2 - 2020-11-07 20 | 21 | Initial release 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 @rescript-react-native contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `@rescript-react-native/paper` 2 | 3 | [![Build Status](https://github.com/rescript-react-native/paper/workflows/Build/badge.svg)](https://github.com/rescript-react-native/paper/actions) 4 | [![Version](https://img.shields.io/npm/v/@rescript-react-native/paper.svg)](https://www.npmjs.com/@rescript-react-native/paper) 5 | [![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/) 6 | 7 | [ReScript](https://rescript-lang.org) bindings for 8 | [`react-native-paper`](https://github.com/callstack/react-native-paper). 9 | 10 | Exposed as `Paper` module. 11 | 12 | `@rescript-react-native/paper` X.y.\* means it's compatible with 13 | `react-native-paper` X.y.\* 14 | 15 | ## Status 16 | 17 | ⚠️ Work in progress. These bindings are used successfully in several apps, but 18 | are not complete yet and still subject to change. 19 | 20 | [Checkout missing components](#implemented-components) 21 | 22 | ## Installation 23 | 24 | When [`react-native-paper`](https://github.com/callstack/react-native-paper) 25 | is properly installed & configured by following their installation instructions, 26 | you can install the bindings: 27 | 28 | ```console 29 | npm install @rescript-react-native/paper 30 | # or 31 | yarn add @rescript-react-native/paper 32 | ``` 33 | 34 | `@rescript-react-native/paper` should be added to `bs-dependencies` in your 35 | `bsconfig.json`: 36 | 37 | ```diff 38 | { 39 | //... 40 | "bs-dependencies": [ 41 | "@rescript/react", 42 | "rescript-react-native", 43 | // ... 44 | + "@rescript-react-native/paper" 45 | ], 46 | //... 47 | } 48 | ``` 49 | 50 | ## Usage 51 | 52 | ### Components 53 | 54 | ```rescript 55 | [@react.component] 56 | let make = () => { 57 | let (visible, setVisible) = React.useState(() => false); 58 | 59 | 60 | setVisible(_ => false)}> 61 | 62 | {"Title"->React.string} 63 | 64 | 65 | {"Description"->React.string} 66 | 67 | 68 | 69 | }; 70 | ``` 71 | 72 | --- 73 | 74 | ## Changelog 75 | 76 | Check the [changelog](./CHANGELOG.md) for more informations about recent 77 | releases. 78 | 79 | ## Contribute 80 | 81 | Read the [contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md) before contributing. 82 | 83 | ## Code of Conduct 84 | 85 | We want this community to be friendly and respectful to each other. Please read 86 | [our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md) so that you can understand what 87 | actions will and will not be tolerated. 88 | 89 | ## Implemented components 90 | 91 | - [x] ActivityIndicator 92 | - [x] Avatar 93 | - [x] Appbar 94 | - [x] BottomNavigation 95 | - [x] Badge 96 | - [x] Banner 97 | - [x] Button 98 | - [x] Checkbox 99 | - [x] Card 100 | - [x] Chip 101 | - [x] Dialog 102 | - [x] Divider 103 | - [x] FAB 104 | - [ ] DataTable 105 | - [x] Drawer 106 | - [x] List 107 | - [x] IconButton 108 | - [x] Modal 109 | - [ ] Menu 110 | - [x] RadioButton 111 | - [x] Searchbar 112 | - [x] PaperProvider 113 | - [x] Portal 114 | - [x] ProgressBar 115 | - [x] Snackbar 116 | - [x] Surface 117 | - [x] TextInput 118 | - [x] TouchableRipple 119 | - [x] ToggleButton 120 | - [x] HelperText 121 | - [x] ThemeProvider 122 | - [x] withTheme (HoC) 123 | - Typography 124 | - [x] Title 125 | - [x] Subheading 126 | - [x] Headline 127 | - [x] Paragraph 128 | - [x] Caption 129 | - [x] Text 130 | -------------------------------------------------------------------------------- /bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rescript-react-native/paper", 3 | "reason": { "react-jsx": 3 }, 4 | "package-specs": { 5 | "module": "commonjs", 6 | "in-source": true 7 | }, 8 | "suffix": ".bs.js", 9 | "sources": [ 10 | { 11 | "dir": "src", 12 | "subdirs": false 13 | } 14 | ], 15 | "namespace": false, 16 | "bsc-flags": ["-bs-no-version-header"], 17 | "warnings": { 18 | "error": true 19 | }, 20 | "bs-dependencies": ["@rescript/react", "rescript-react-native"] 21 | } 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@rescript-react-native/paper", 3 | "description": "ReScript bindings for react-native-paper.", 4 | "version": "3.0.6", 5 | "publishConfig": { 6 | "access": "public" 7 | }, 8 | "peerDependencies": { 9 | "react-native-paper": ">=3.0.0", 10 | "@rescript/react": ">=0.10.0", 11 | "rescript-react-native": ">=0.68.0" 12 | }, 13 | "overrides": { 14 | "react": "17.0.2" 15 | }, 16 | "repository": "https://github.com/rescript-react-native/paper.git", 17 | "funding": "https://github.com/rescript-react-native/rescript-react-native?sponsor=1", 18 | "license": "MIT", 19 | "keywords": [ 20 | "rescript", 21 | "react-native", 22 | "react-native-paper" 23 | ], 24 | "files": [ 25 | "*.md", 26 | "bsconfig.json", 27 | "src/**/*.res", 28 | "src/**/*.resi", 29 | "src/**/*.js", 30 | "!src/**/*.bs.js" 31 | ], 32 | "scripts": { 33 | "format:most": "prettier --write \"**/*.{md,json,js,css}\"", 34 | "format:res": "rescript format -all", 35 | "format": "npm run format:most && npm run format:res", 36 | "re:start": "rescript build -w", 37 | "re:build": "rescript", 38 | "re:clean-build": "rescript clean && rescript", 39 | "start": "npm run re:start", 40 | "build": "npm run re:build", 41 | "test": "npm run re:clean-build", 42 | "release": "npmpub" 43 | }, 44 | "devDependencies": { 45 | "rescript": "^9.1.4", 46 | "husky": "^4.0.0", 47 | "lint-staged": "^10.0.0", 48 | "npmpub": "^5.0.0", 49 | "prettier": "^2.0.0", 50 | "react-native-paper": "^3.0.0", 51 | "@rescript/react": "^0.10.0", 52 | "rescript-react-native": ">=0.68.0" 53 | }, 54 | "prettier": { 55 | "trailingComma": "all" 56 | }, 57 | "lint-staged": { 58 | "*.{md,json,js,css}": "prettier --write", 59 | "*.{res,resi}": "rescript format" 60 | }, 61 | "husky": { 62 | "hooks": { 63 | "pre-commit": "lint-staged" 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/Paper.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ReactNativePaper = require("react-native-paper"); 4 | 5 | var ActivityIndicator; 6 | 7 | var Appbar; 8 | 9 | var Avatar; 10 | 11 | var Banner; 12 | 13 | var BottomNavigation; 14 | 15 | var Button; 16 | 17 | var Caption; 18 | 19 | var Badge; 20 | 21 | var Card; 22 | 23 | var Checkbox; 24 | 25 | var Chip; 26 | 27 | var Dialog; 28 | 29 | var Divider; 30 | 31 | var Drawer; 32 | 33 | var FAB; 34 | 35 | var Headline; 36 | 37 | var IconButton; 38 | 39 | var Modal; 40 | 41 | var Surface; 42 | 43 | var PaperProvider; 44 | 45 | var Paragraph; 46 | 47 | var Portal; 48 | 49 | var ProgressBar; 50 | 51 | var RadioButton; 52 | 53 | var Subheading; 54 | 55 | var Switch; 56 | 57 | var Snackbar; 58 | 59 | var $$Text; 60 | 61 | var TextInput; 62 | 63 | var ThemeProvider; 64 | 65 | var Title; 66 | 67 | var TouchableRipple; 68 | 69 | var HelperText; 70 | 71 | var Searchbar; 72 | 73 | var List; 74 | 75 | var ToggleButton; 76 | 77 | var Icon; 78 | 79 | function withTheme(prim) { 80 | return ReactNativePaper.withTheme(prim); 81 | } 82 | 83 | exports.ActivityIndicator = ActivityIndicator; 84 | exports.Appbar = Appbar; 85 | exports.Avatar = Avatar; 86 | exports.Banner = Banner; 87 | exports.BottomNavigation = BottomNavigation; 88 | exports.Button = Button; 89 | exports.Caption = Caption; 90 | exports.Badge = Badge; 91 | exports.Card = Card; 92 | exports.Checkbox = Checkbox; 93 | exports.Chip = Chip; 94 | exports.Dialog = Dialog; 95 | exports.Divider = Divider; 96 | exports.Drawer = Drawer; 97 | exports.FAB = FAB; 98 | exports.Headline = Headline; 99 | exports.IconButton = IconButton; 100 | exports.Modal = Modal; 101 | exports.Surface = Surface; 102 | exports.PaperProvider = PaperProvider; 103 | exports.Paragraph = Paragraph; 104 | exports.Portal = Portal; 105 | exports.ProgressBar = ProgressBar; 106 | exports.RadioButton = RadioButton; 107 | exports.Subheading = Subheading; 108 | exports.Switch = Switch; 109 | exports.Snackbar = Snackbar; 110 | exports.$$Text = $$Text; 111 | exports.TextInput = TextInput; 112 | exports.ThemeProvider = ThemeProvider; 113 | exports.Title = Title; 114 | exports.TouchableRipple = TouchableRipple; 115 | exports.HelperText = HelperText; 116 | exports.Searchbar = Searchbar; 117 | exports.List = List; 118 | exports.ToggleButton = ToggleButton; 119 | exports.Icon = Icon; 120 | exports.withTheme = withTheme; 121 | /* react-native-paper Not a pure module */ 122 | -------------------------------------------------------------------------------- /src/Paper.res: -------------------------------------------------------------------------------- 1 | module ActivityIndicator = Paper__ActivityIndicator 2 | module Appbar = Paper__Appbar 3 | module Avatar = Paper__Avatar 4 | module Badge = Paper__Badge 5 | module Banner = Paper__Banner 6 | module BottomNavigation = Paper__BottomNavigation 7 | module Button = Paper__Button 8 | module Caption = Paper__Caption 9 | module Card = Paper__Card 10 | module Checkbox = Paper__Checkbox 11 | module Chip = Paper__Chip 12 | module DataTable = Paper__DataTable 13 | module Dialog = Paper__Dialog 14 | module Divider = Paper__Divider 15 | module Drawer = Paper__Drawer 16 | module FAB = Paper__FAB 17 | module Headline = Paper__Headline 18 | module HelperText = Paper__HelperText 19 | module Icon = Paper__Icon 20 | module IconButton = Paper__IconButton 21 | module List = Paper__List 22 | module Modal = Paper__Modal 23 | module PaperProvider = Paper__PaperProvider 24 | module Paragraph = Paper__Paragraph 25 | module Portal = Paper__Portal 26 | module ProgressBar = Paper__ProgressBar 27 | module RadioButton = Paper__RadioButton 28 | module Searchbar = Paper__Searchbar 29 | module Snackbar = Paper__Snackbar 30 | module Subheading = Paper__Subheading 31 | module Surface = Paper__Surface 32 | module Switch = Paper__Switch 33 | module Text = Paper__Text 34 | module TextInput = Paper__TextInput 35 | module ThemeProvider = Paper__ThemeProvider 36 | module Title = Paper__Title 37 | module ToggleButton = Paper__ToggleButton 38 | module TouchableRipple = Paper__TouchableRipple 39 | 40 | @module("react-native-paper") 41 | external withTheme: React.component<'props> => React.component<'props> = "withTheme" 42 | -------------------------------------------------------------------------------- /src/Paper.resi: -------------------------------------------------------------------------------- 1 | module ActivityIndicator = Paper__ActivityIndicator 2 | module Appbar = Paper__Appbar 3 | module Avatar = Paper__Avatar 4 | module Badge = Paper__Badge 5 | module Banner = Paper__Banner 6 | module BottomNavigation = Paper__BottomNavigation 7 | module Button = Paper__Button 8 | module Caption = Paper__Caption 9 | module Card = Paper__Card 10 | module Checkbox = Paper__Checkbox 11 | module Chip = Paper__Chip 12 | module DataTable = Paper__DataTable 13 | module Dialog = Paper__Dialog 14 | module Divider = Paper__Divider 15 | module Drawer = Paper__Drawer 16 | module FAB = Paper__FAB 17 | module Headline = Paper__Headline 18 | module HelperText = Paper__HelperText 19 | module Icon = Paper__Icon 20 | module IconButton = Paper__IconButton 21 | module List = Paper__List 22 | module Modal = Paper__Modal 23 | module PaperProvider = Paper__PaperProvider 24 | module Paragraph = Paper__Paragraph 25 | module Portal = Paper__Portal 26 | module ProgressBar = Paper__ProgressBar 27 | module RadioButton = Paper__RadioButton 28 | module Searchbar = Paper__Searchbar 29 | module Snackbar = Paper__Snackbar 30 | module Subheading = Paper__Subheading 31 | module Surface = Paper__Surface 32 | module Switch = Paper__Switch 33 | module Text = Paper__Text 34 | module TextInput = Paper__TextInput 35 | module ThemeProvider = Paper__ThemeProvider 36 | module Title = Paper__Title 37 | module ToggleButton = Paper__ToggleButton 38 | module TouchableRipple = Paper__TouchableRipple 39 | 40 | /** 41 | This binding follow `React.memo` in `@rescript/react` project 42 | @see {https://github.com/rescript-lang/rescript-react/blob/3932945175c088ff88073ff993c553979381d8da/src/React.res#L95-L96} 43 | */ 44 | let withTheme: React.component<'props> => React.component<'props> 45 | -------------------------------------------------------------------------------- /src/Paper__ActivityIndicator.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | function Size_value(prim) { 5 | return prim; 6 | } 7 | 8 | var Size = { 9 | small: "small", 10 | large: "large", 11 | value: Size_value 12 | }; 13 | 14 | exports.Size = Size; 15 | /* No side effect */ 16 | -------------------------------------------------------------------------------- /src/Paper__ActivityIndicator.res: -------------------------------------------------------------------------------- 1 | module Size: { 2 | type t 3 | 4 | let small: t 5 | let large: t 6 | let value: int => t 7 | } = { 8 | type t = string 9 | 10 | let small: t = "small" 11 | let large: t = "large" 12 | external value: int => t = "%identity" 13 | } 14 | 15 | @module("react-native-paper") @react.component 16 | external make: ( 17 | ~animation: bool=?, 18 | ~hidesWhenStopped: bool=?, 19 | ~color: string=?, 20 | ~size: Size.t=?, 21 | ~style: ReactNative.Style.t=?, 22 | ~theme: Paper__ThemeProvider.Theme.t=?, 23 | ) => React.element = "ActivityIndicator" 24 | -------------------------------------------------------------------------------- /src/Paper__Appbar.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Action = {}; 5 | 6 | var Content = {}; 7 | 8 | var Header = {}; 9 | 10 | var BackAction = {}; 11 | 12 | exports.Action = Action; 13 | exports.Content = Content; 14 | exports.Header = Header; 15 | exports.BackAction = BackAction; 16 | /* No side effect */ 17 | -------------------------------------------------------------------------------- /src/Paper__Appbar.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~dark: bool=?, 4 | ~children: React.element=?, 5 | ~style: ReactNative.Style.t=?, 6 | ~theme: Paper__ThemeProvider.Theme.t=?, 7 | ) => React.element = "Appbar" 8 | 9 | module Action = { 10 | @module("react-native-paper") @scope("Appbar") @react.component 11 | external make: ( 12 | ~color: string=?, 13 | ~icon: Paper__Icon.t=?, 14 | ~size: int=?, 15 | ~disabled: bool=?, 16 | ~accessibilityLabel: string=?, 17 | ~children: React.element=?, 18 | ~style: ReactNative.Style.t=?, 19 | ~onPress: unit => unit=?, 20 | ) => React.element = "Action" 21 | } 22 | 23 | module Content = { 24 | @module("react-native-paper") @scope("Appbar") @react.component 25 | external make: ( 26 | ~color: string=?, 27 | ~title: React.element=?, 28 | ~titleStyle: ReactNative.Style.t=?, 29 | ~subtitle: React.element=?, 30 | ~subtitleStyle: ReactNative.Style.t=?, 31 | ~style: ReactNative.Style.t=?, 32 | ~onPress: unit => unit=?, 33 | ~theme: Paper__ThemeProvider.Theme.t=?, 34 | ) => React.element = "Content" 35 | } 36 | 37 | module Header = { 38 | @module("react-native-paper") @scope("Appbar") @react.component 39 | external make: ( 40 | ~dark: bool=?, 41 | ~statusBarHeight: int=?, 42 | ~theme: Paper__ThemeProvider.Theme.t=?, 43 | ~children: React.element=?, 44 | ~style: ReactNative.Style.t=?, 45 | ) => React.element = "Header" 46 | } 47 | 48 | module BackAction = { 49 | @module("react-native-paper") @scope("Appbar") @react.component 50 | external make: ( 51 | ~accessibilityLabel: string=?, 52 | ~onPress: 'a => unit, 53 | ~color: string=?, 54 | ) => React.element = "BackAction" 55 | } 56 | -------------------------------------------------------------------------------- /src/Paper__Avatar.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Icon = {}; 5 | 6 | var $$Image = {}; 7 | 8 | var $$Text = {}; 9 | 10 | exports.Icon = Icon; 11 | exports.$$Image = $$Image; 12 | exports.$$Text = $$Text; 13 | /* No side effect */ 14 | -------------------------------------------------------------------------------- /src/Paper__Avatar.res: -------------------------------------------------------------------------------- 1 | module Icon = { 2 | @module("react-native-paper") @scope("Avatar") @react.component 3 | external make: ( 4 | ~icon: Paper__Icon.t=?, 5 | ~size: int=?, 6 | ~color: string=?, 7 | ~style: ReactNative.Style.t=?, 8 | ~theme: Paper__ThemeProvider.Theme.t=?, 9 | ) => React.element = "Icon" 10 | } 11 | 12 | module Image = { 13 | @module("react-native-paper") @scope("Avatar") @react.component 14 | external make: ( 15 | ~source: 'source, 16 | ~size: int=?, 17 | ~style: ReactNative.Style.t=?, 18 | ~theme: Paper__ThemeProvider.Theme.t=?, 19 | ) => React.element = "Image" 20 | } 21 | 22 | module Text = { 23 | @module("react-native-paper") @scope("Avatar") @react.component 24 | external make: ( 25 | ~label: string, 26 | ~size: int=?, 27 | ~color: string=?, 28 | ~style: ReactNative.Style.t=?, 29 | ~labelStyle: ReactNative.Style.t=?, 30 | ~theme: Paper__ThemeProvider.Theme.t=?, 31 | ) => React.element = "Text" 32 | } 33 | -------------------------------------------------------------------------------- /src/Paper__Badge.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Badge.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~visible: bool=?, 4 | ~theme: Paper__ThemeProvider.Theme.t=?, 5 | ~children: React.element=?, 6 | ~size: int=?, 7 | ~style: ReactNative.Style.t=?, 8 | ) => React.element = "Badge" 9 | -------------------------------------------------------------------------------- /src/Paper__Banner.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Curry = require("rescript/lib/js/curry.js"); 4 | 5 | function renderImage(reRenderIcon, jsIconProps) { 6 | return Curry._1(reRenderIcon, { 7 | size: jsIconProps.size 8 | }); 9 | } 10 | 11 | exports.renderImage = renderImage; 12 | /* No side effect */ 13 | -------------------------------------------------------------------------------- /src/Paper__Banner.res: -------------------------------------------------------------------------------- 1 | @deriving(abstract) 2 | type action = { 3 | label: string, 4 | onPress: unit => unit, 5 | } 6 | 7 | type jsImageProps = {"size": float} 8 | 9 | type imageProps = {size: float} 10 | 11 | type renderImage = jsImageProps => React.element 12 | 13 | let renderImage = (reRenderIcon: imageProps => React.element): renderImage => 14 | (jsIconProps: jsImageProps) => reRenderIcon({size: jsIconProps["size"]}) 15 | 16 | @module("react-native-paper") @react.component 17 | external make: ( 18 | ~visible: bool, 19 | ~actions: array, 20 | ~image: renderImage=?, 21 | ~style: ReactNative.Style.t=?, 22 | ~theme: Paper__ThemeProvider.Theme.t=?, 23 | ) => React.element = "Banner" 24 | -------------------------------------------------------------------------------- /src/Paper__BottomNavigation.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__BottomNavigation.res: -------------------------------------------------------------------------------- 1 | type route = { 2 | "key": string, 3 | "title": string, 4 | "icon": string, 5 | "color": option, 6 | "badge": option, 7 | "accessibilityLabel": option, 8 | "testID": option, 9 | } 10 | 11 | type jumpTo = string => unit 12 | 13 | @module("react-native-paper") @react.component 14 | external make: ( 15 | ~onIndexChange: int => unit, 16 | ~renderScene: {"route": route, "jumpTo": jumpTo} => React.element, 17 | ~renderLabel: {"route": route, "focused": bool, "color": string} => React.element=?, 18 | ~getLabelText: {"route": route} => string=?, 19 | ~getTestID: {"route": route} => option=?, 20 | ~getBadge: {"route": route} => option=?, 21 | ~getColor: {"route": route} => option=?, 22 | ~onTabPress: {"route": route} => unit=?, 23 | ~activeColor: string=?, 24 | ~inactiveColor: string=?, 25 | ~keyboardHidesNavigationBar: bool=?, 26 | ~shifting: bool=?, 27 | ~labeled: bool=?, 28 | ~navigationState: {"index": int, "routes": array}=?, 29 | ~style: ReactNative.Style.t=?, 30 | ~barStyle: ReactNative.Style.t=?, 31 | ~theme: Paper__ThemeProvider.Theme.t=?, 32 | ) => React.element = "BottomNavigation" 33 | -------------------------------------------------------------------------------- /src/Paper__Button.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Button.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~mode: [#text | #outlined | #contained]=?, 4 | ~disabled: bool=?, 5 | ~compact: bool=?, 6 | ~raised: bool=?, 7 | ~loading: bool=?, 8 | ~dark: bool=?, 9 | ~icon: Paper__Icon.t=?, 10 | ~color: string=?, 11 | ~accessibilityLabel: string=?, 12 | ~style: ReactNative.Style.t=?, 13 | ~labelStyle: ReactNative.Style.t=?, 14 | ~theme: Paper__ThemeProvider.Theme.t=?, 15 | ~onPress: ReactNative.Event.pressEvent => unit=?, 16 | ~children: React.element, 17 | ) => React.element = "Button" 18 | -------------------------------------------------------------------------------- /src/Paper__Caption.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Caption.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 3 | "Caption" 4 | -------------------------------------------------------------------------------- /src/Paper__Card.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Actions = {}; 5 | 6 | var Content = {}; 7 | 8 | exports.Actions = Actions; 9 | exports.Content = Content; 10 | /* No side effect */ 11 | -------------------------------------------------------------------------------- /src/Paper__Card.res: -------------------------------------------------------------------------------- 1 | open ReactNative 2 | 3 | @module("react-native-paper") @react.component 4 | external make: ( 5 | ~elevation: int=?, 6 | ~onLongPress: Event.pressEvent => unit=?, 7 | ~onPress: Event.pressEvent => unit=?, 8 | ~style: Style.t=?, 9 | ~theme: 'a=?, 10 | ~testID: string=?, 11 | ~children: React.element, 12 | ) => React.element = "Card" 13 | 14 | @deriving(abstract) 15 | type props = { 16 | @optional 17 | elevation: int, 18 | @optional 19 | onLongPress: Event.pressEvent => unit, 20 | @optional 21 | onPress: Event.pressEvent => unit, 22 | @optional 23 | style: Style.t, 24 | @optional 25 | theme: Paper__ThemeProvider.Theme.t, 26 | @optional 27 | testID: string, 28 | } 29 | 30 | module Actions = { 31 | @module("react-native-paper") @scope("Card") @react.component 32 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 33 | "Actions" 34 | } 35 | 36 | module Content = { 37 | @module("react-native-paper") @scope("Card") @react.component 38 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 39 | "Content" 40 | } 41 | -------------------------------------------------------------------------------- /src/Paper__Checkbox.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Android = {}; 5 | 6 | var IOS = {}; 7 | 8 | exports.Android = Android; 9 | exports.IOS = IOS; 10 | /* No side effect */ 11 | -------------------------------------------------------------------------------- /src/Paper__Checkbox.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~status: [#checked | #unchecked | #indeterminate], 4 | ~theme: Paper__ThemeProvider.Theme.t=?, 5 | ~disabled: bool=?, 6 | ~uncheckColor: string=?, 7 | ~color: string=?, 8 | ~onPress: ReactNative.Event.pressEvent => unit=?, 9 | ) => React.element = "Checkbox" 10 | 11 | module Android = { 12 | @module("react-native-paper") @scope("Checkbox") @react.component 13 | external make: ( 14 | ~status: [#checked | #unchecked | #indeterminate], 15 | ~theme: Paper__ThemeProvider.Theme.t=?, 16 | ~disabled: bool=?, 17 | ~uncheckColor: string=?, 18 | ~color: string=?, 19 | ~onPress: ReactNative.Event.pressEvent => unit=?, 20 | ) => React.element = "Android" 21 | } 22 | 23 | module IOS = { 24 | @module("react-native-paper") @scope("Checkbox") @react.component 25 | external make: ( 26 | ~status: [#checked | #unchecked | #indeterminate], 27 | ~theme: Paper__ThemeProvider.Theme.t=?, 28 | ~disabled: bool=?, 29 | ~uncheckColor: string=?, 30 | ~color: string=?, 31 | ~onPress: ReactNative.Event.pressEvent => unit=?, 32 | ) => React.element = "IOS" 33 | } 34 | -------------------------------------------------------------------------------- /src/Paper__Chip.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Chip.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~mode: [#outlined | #flat], 4 | ~selected: bool=?, 5 | ~disabled: bool=?, 6 | ~accessibilityLabel: string=?, 7 | ~avatar: React.element=?, 8 | ~icon: Paper__Icon.t=?, 9 | ~style: ReactNative.Style.t=?, 10 | ~theme: Paper__ThemeProvider.Theme.t=?, 11 | ~onPress: ReactNative.Event.pressEvent => unit=?, 12 | ~onClose: ReactNative.Event.pressEvent => unit=?, 13 | ~children: React.element, 14 | ) => React.element = "Chip" 15 | -------------------------------------------------------------------------------- /src/Paper__DataTable.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Cell = {}; 5 | 6 | var Header = {}; 7 | 8 | var Pagination = {}; 9 | 10 | var Row = {}; 11 | 12 | var Title = {}; 13 | 14 | exports.Cell = Cell; 15 | exports.Header = Header; 16 | exports.Pagination = Pagination; 17 | exports.Row = Row; 18 | exports.Title = Title; 19 | /* No side effect */ 20 | -------------------------------------------------------------------------------- /src/Paper__DataTable.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~children: React.element, ~style: ReactNative.Style.t=?) => React.element = 3 | "DataTable" 4 | 5 | module Cell = { 6 | @module("react-native-paper") @scope("DataTable") @react.component 7 | external make: ( 8 | ~style: ReactNative.Style.t=?, 9 | ~children: React.element, 10 | ~onPress: unit => unit=?, 11 | ~numeric: bool=?, 12 | ) => React.element = "Cell" 13 | } 14 | 15 | module Header = { 16 | @module("react-native-paper") @scope("DataTable") @react.component 17 | external make: ( 18 | ~style: ReactNative.Style.t=?, 19 | ~children: React.element, 20 | ~theme: Paper__ThemeProvider.Theme.t=?, 21 | ) => React.element = "Header" 22 | } 23 | 24 | module Pagination = { 25 | @module("react-native-paper") @scope("DataTable") @react.component 26 | external make: ( 27 | ~page: int, 28 | ~numberOfPages: int, 29 | ~label: string=?, 30 | ~onPageChange: int => unit, 31 | ~style: ReactNative.Style.t=?, 32 | ~theme: Paper__ThemeProvider.Theme.t=?, 33 | ) => React.element = "Pagination" 34 | } 35 | 36 | module Row = { 37 | @module("react-native-paper") @scope("DataTable") @react.component 38 | external make: ( 39 | ~children: React.element, 40 | ~style: ReactNative.Style.t=?, 41 | ~theme: Paper__ThemeProvider.Theme.t=?, 42 | ~onPress: unit => unit=?, 43 | ) => React.element = "Row" 44 | } 45 | 46 | module Title = { 47 | @module("react-native-paper") @scope("DataTable") @react.component 48 | external make: ( 49 | ~children: React.element, 50 | ~style: ReactNative.Style.t=?, 51 | ~theme: Paper__ThemeProvider.Theme.t=?, 52 | ~onPress: unit => unit=?, 53 | ~numeric: bool=?, 54 | ~sortDirection: string=?, 55 | ~numberOfLines: int=?, 56 | ) => React.element = "Title" 57 | } 58 | -------------------------------------------------------------------------------- /src/Paper__Dialog.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Actions = {}; 5 | 6 | var Content = {}; 7 | 8 | var ScrollArea = {}; 9 | 10 | var Title = {}; 11 | 12 | exports.Actions = Actions; 13 | exports.Content = Content; 14 | exports.ScrollArea = ScrollArea; 15 | exports.Title = Title; 16 | /* No side effect */ 17 | -------------------------------------------------------------------------------- /src/Paper__Dialog.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~visible: bool, 4 | ~onDismiss: unit => unit, 5 | ~dismissable: bool=?, 6 | ~theme: Paper__ThemeProvider.Theme.t=?, 7 | ~style: ReactNative.Style.t=?, 8 | ~children: React.element, 9 | ) => React.element = "Dialog" 10 | 11 | module Actions = { 12 | @module("react-native-paper") @scope("Dialog") @react.component 13 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 14 | "Actions" 15 | } 16 | 17 | module Content = { 18 | @module("react-native-paper") @scope("Dialog") @react.component 19 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 20 | "Content" 21 | } 22 | module ScrollArea = { 23 | @module("react-native-paper") @scope("Dialog") @react.component 24 | external reactClass: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 25 | "ScrollArea" 26 | } 27 | 28 | module Title = { 29 | @module("react-native-paper") @scope("Dialog") @react.component 30 | external make: ( 31 | ~style: ReactNative.Style.t=?, 32 | ~theme: Paper__ThemeProvider.Theme.t=?, 33 | ~children: React.element, 34 | ) => React.element = "Title" 35 | } 36 | -------------------------------------------------------------------------------- /src/Paper__Divider.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Divider.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~inset: bool=?, 4 | ~theme: Paper__ThemeProvider.Theme.t=?, 5 | ~style: ReactNative.Style.t=?, 6 | ) => React.element = "Divider" 7 | -------------------------------------------------------------------------------- /src/Paper__Drawer.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Item = {}; 5 | 6 | var Section = {}; 7 | 8 | exports.Item = Item; 9 | exports.Section = Section; 10 | /* No side effect */ 11 | -------------------------------------------------------------------------------- /src/Paper__Drawer.res: -------------------------------------------------------------------------------- 1 | module Item = { 2 | @module("react-native-paper") @scope("Drawer") @react.component 3 | external make: ( 4 | ~label: string, 5 | ~icon: React.element=?, 6 | ~active: bool=?, 7 | ~theme: Paper__ThemeProvider.Theme.t=?, 8 | ~onPress: ReactNative.Event.targetEvent => unit=?, 9 | ~style: ReactNative.Style.t=?, 10 | ) => React.element = "Item" 11 | } 12 | 13 | module Section = { 14 | @module("react-native-paper") @scope("Drawer") @react.component 15 | external make: (~title: string=?, ~theme: {..}=?, ~children: React.element) => React.element = 16 | "Section" 17 | } 18 | -------------------------------------------------------------------------------- /src/Paper__FAB.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__FAB.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~label: string=?, 4 | ~small: bool=?, 5 | ~color: string=?, 6 | ~disabled: bool=?, 7 | ~onPress: ReactNative.Event.targetEvent => unit, 8 | ~theme: Paper__ThemeProvider.Theme.t=?, 9 | ~style: ReactNative.Style.t=?, 10 | ~accessibilityLabel: string=?, 11 | ~icon: Paper__Icon.t=?, 12 | ) => React.element = "FAB" 13 | -------------------------------------------------------------------------------- /src/Paper__Headline.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Headline.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 3 | "Headline" 4 | -------------------------------------------------------------------------------- /src/Paper__HelperText.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__HelperText.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~theme: Paper__ThemeProvider.Theme.t=?, 4 | ~style: ReactNative.Style.t=?, 5 | ~visible: bool=?, 6 | ~_type: [#error | #info], 7 | ~children: React.element, 8 | ) => React.element = "HelperText" 9 | -------------------------------------------------------------------------------- /src/Paper__Icon.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Icon.res: -------------------------------------------------------------------------------- 1 | type t 2 | 3 | external name: string => t = "%identity" 4 | external render: ({"color": string, "size": float, "direction": string} => React.element) => t = 5 | "%identity" 6 | -------------------------------------------------------------------------------- /src/Paper__IconButton.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__IconButton.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~disabled: bool=?, 4 | ~animated: bool=?, 5 | ~icon: Paper__Icon.t=?, 6 | ~color: string=?, 7 | ~accessibilityLabel: string=?, 8 | ~style: ReactNative.Style.t=?, 9 | ~size: int=?, 10 | ~onPress: ReactNative.Event.pressEvent => unit=?, 11 | ~theme: Paper__ThemeProvider.Theme.t=?, 12 | ) => React.element = "IconButton" 13 | -------------------------------------------------------------------------------- /src/Paper__List.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Section = {}; 5 | 6 | var AccordionGroup = {}; 7 | 8 | var Subheader = {}; 9 | 10 | var Item = {}; 11 | 12 | var Icon = {}; 13 | 14 | var Accordion = {}; 15 | 16 | exports.Section = Section; 17 | exports.AccordionGroup = AccordionGroup; 18 | exports.Subheader = Subheader; 19 | exports.Item = Item; 20 | exports.Icon = Icon; 21 | exports.Accordion = Accordion; 22 | /* No side effect */ 23 | -------------------------------------------------------------------------------- /src/Paper__List.res: -------------------------------------------------------------------------------- 1 | module Section = { 2 | @module("react-native-paper") @scope("List") @react.component 3 | external make: ( 4 | ~title: string, 5 | ~children: React.element, 6 | ~theme: Paper__ThemeProvider.Theme.t=?, 7 | ~style: ReactNative.Style.t=?, 8 | ~titleStyle: ReactNative.Style.t=?, 9 | ) => React.element = "Section" 10 | } 11 | 12 | module AccordionGroup = { 13 | @module("react-native-paper") @scope("List") @react.component 14 | external make: ( 15 | ~onAccordionPress: string => unit=?, 16 | ~expandedId: string=?, 17 | ~children: React.element, 18 | ) => React.element = "AccordionGroup" 19 | } 20 | 21 | module Subheader = { 22 | @module("react-native-paper") @scope("List") @react.component 23 | external make: ( 24 | ~theme: Paper__ThemeProvider.Theme.t=?, 25 | ~style: ReactNative.Style.t=?, 26 | ~children: React.element, 27 | ) => React.element = "Subheader" 28 | } 29 | 30 | module Item = { 31 | type leftRightProps = { 32 | "color": string, 33 | "style": {"marginLeft": float, "marginRight": float, "marginVertical": option}, 34 | } 35 | @module("react-native-paper") @scope("List") @react.component 36 | external make: ( 37 | ~onPress: ReactNative.Event.pressEvent => unit=?, 38 | ~title: string, 39 | ~description: string=?, 40 | ~theme: Paper__ThemeProvider.Theme.t=?, 41 | ~style: ReactNative.Style.t=?, 42 | ~titleStyle: ReactNative.Style.t=?, 43 | ~descriptionStyle: ReactNative.Style.t=?, 44 | ~titleNumberOfLines: int=?, 45 | ~descriptionNumberOfLines: int=?, 46 | ~titleEllipsizeMode: [#head | #middle | #tail | #clip]=?, 47 | ~descriptionEllipsizeMode: [#head | #middle | #tail | #clip]=?, 48 | ~left: leftRightProps => React.element=?, 49 | ~right: leftRightProps => React.element=?, 50 | ) => React.element = "Item" 51 | } 52 | 53 | module Icon = { 54 | @module("react-native-paper") @scope("List") @react.component 55 | external make: ( 56 | ~color: string=?, 57 | ~style: ReactNative.Style.t=?, 58 | ~icon: Paper__Icon.t, 59 | ) => React.element = "Icon" 60 | } 61 | 62 | module Accordion = { 63 | @module("react-native-paper") @scope("List") @react.component 64 | external make: ( 65 | ~title: string, 66 | ~description: string=?, 67 | ~expanded: bool=?, 68 | ~left: {"color": string} => React.element=?, 69 | ~onPress: ReactNative.Event.pressEvent => unit=?, 70 | ~children: React.element, 71 | ~theme: Paper__ThemeProvider.Theme.t=?, 72 | ~style: ReactNative.Style.t=?, 73 | ~titleStyle: ReactNative.Style.t=?, 74 | ~descriptionStyle: ReactNative.Style.t=?, 75 | ~titleNumberOfLines: int=?, 76 | ~descriptionNumberOfLines: int=?, 77 | ~id: string=?, 78 | ) => React.element = "Section" 79 | } 80 | -------------------------------------------------------------------------------- /src/Paper__Modal.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Modal.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~dismissable: bool=?, 4 | ~visible: bool=?, 5 | ~onDismiss: unit => unit=?, 6 | ~children: React.element, 7 | ) => React.element = "Modal" 8 | -------------------------------------------------------------------------------- /src/Paper__PaperProvider.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__PaperProvider.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~children: React.element, ~theme: Paper__ThemeProvider.Theme.t=?) => React.element = 3 | "Provider" 4 | -------------------------------------------------------------------------------- /src/Paper__Paragraph.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Paragraph.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 3 | "Paragraph" 4 | -------------------------------------------------------------------------------- /src/Paper__Portal.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Host = {}; 5 | 6 | exports.Host = Host; 7 | /* No side effect */ 8 | -------------------------------------------------------------------------------- /src/Paper__Portal.res: -------------------------------------------------------------------------------- 1 | module Host = { 2 | @module("react-native-paper") @scope("Portal") @react.component 3 | external make: (~children: React.element) => React.element = "Host" 4 | } 5 | 6 | @module("react-native-paper") @react.component 7 | external make: (~theme: Paper__ThemeProvider.Theme.t=?, ~children: React.element) => React.element = 8 | "Portal" 9 | -------------------------------------------------------------------------------- /src/Paper__ProgressBar.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__ProgressBar.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~progress: float, 4 | ~color: string=?, 5 | ~indeterminate: bool=?, 6 | ~visible: bool=?, 7 | ~theme: 'a=?, 8 | ~style: ReactNative.Style.t=?, 9 | ) => React.element = "ProgressBar" 10 | -------------------------------------------------------------------------------- /src/Paper__RadioButton.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Android = {}; 5 | 6 | var IOS = {}; 7 | 8 | var Group = {}; 9 | 10 | exports.Android = Android; 11 | exports.IOS = IOS; 12 | exports.Group = Group; 13 | /* No side effect */ 14 | -------------------------------------------------------------------------------- /src/Paper__RadioButton.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~value: string, 4 | ~status: [#checked | #unchecked], 5 | ~theme: Paper__ThemeProvider.Theme.t=?, 6 | ~disabled: bool=?, 7 | ~uncheckedColor: string=?, 8 | ~color: string=?, 9 | ~onPress: ReactNative.Event.pressEvent => unit=?, 10 | ) => React.element = "RadioButton" 11 | 12 | module Android = { 13 | @module("react-native-paper") @scope("RadioButton") @react.component 14 | external make: ( 15 | ~value: string, 16 | ~status: [#checked | #unchecked], 17 | ~theme: Paper__ThemeProvider.Theme.t=?, 18 | ~disabled: bool=?, 19 | ~uncheckedColor: string=?, 20 | ~color: string=?, 21 | ~onPress: ReactNative.Event.pressEvent => unit=?, 22 | ) => React.element = "Android" 23 | } 24 | 25 | module IOS = { 26 | @module("react-native-paper") @scope("RadioButton") @react.component 27 | external make: ( 28 | ~value: string, 29 | ~status: [#checked | #unchecked], 30 | ~theme: Paper__ThemeProvider.Theme.t=?, 31 | ~disabled: bool=?, 32 | ~color: string=?, 33 | ~onPress: ReactNative.Event.pressEvent => unit=?, 34 | ) => React.element = "IOS" 35 | } 36 | 37 | module Group = { 38 | @module("react-native-paper") @scope("RadioButton") @react.component 39 | external make: ( 40 | ~value: string, 41 | ~onValueChange: string => string, 42 | ~children: React.element, 43 | ) => React.element = "Group" 44 | } 45 | -------------------------------------------------------------------------------- /src/Paper__Searchbar.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Searchbar.res: -------------------------------------------------------------------------------- 1 | type ref 2 | 3 | @send external isFocused: (ref, unit) => bool = "isFocused" 4 | @send external clear: (ref, unit) => unit = "clear" 5 | @send external focus: (ref, unit) => unit = "focus" 6 | @send external blur: (ref, unit) => unit = "blur" 7 | 8 | @module("react-native-paper") @react.component 9 | external make: ( 10 | ~theme: Paper__ThemeProvider.Theme.t=?, 11 | ~style: ReactNative.Style.t=?, 12 | ~inputStyle: ReactNative.Style.t=?, 13 | ~value: string, 14 | ~iconColor: string=?, 15 | ~placeholder: string=?, 16 | ~onChangeText: string => unit=?, 17 | ~onIconPress: ReactNative.Event.pressEvent => unit=?, 18 | ~icon: Paper__Icon.t=?, 19 | ~clearIcon: Paper__Icon.t=?, 20 | ~ref: Js.Null.t => unit=?, 21 | ) => React.element = "Searchbar" 22 | -------------------------------------------------------------------------------- /src/Paper__Snackbar.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Duration = {}; 5 | 6 | var Action = {}; 7 | 8 | exports.Duration = Duration; 9 | exports.Action = Action; 10 | /* No side effect */ 11 | -------------------------------------------------------------------------------- /src/Paper__Snackbar.res: -------------------------------------------------------------------------------- 1 | module Duration = { 2 | type t 3 | @module("react-native-paper") @scope("Snackbar") 4 | external short: t = "DURATION_SHORT" 5 | @module("react-native-paper") @scope("Snackbar") 6 | external medium: t = "DURATION_MEDIUM" 7 | @module("react-native-paper") @scope("Snackbar") 8 | external long: t = "DURATION_LONG" 9 | 10 | external value: int => t = "%identity" 11 | } 12 | 13 | module Action = { 14 | type t 15 | 16 | @val external none: t = "null" 17 | 18 | @obj external make: (~label: string, ~onPress: unit => unit) => t = "" 19 | } 20 | 21 | @module("react-native-paper") @react.component 22 | external make: ( 23 | ~theme: Paper__ThemeProvider.Theme.t=?, 24 | ~duration: Duration.t=?, 25 | ~onDismiss: unit => unit, 26 | ~style: ReactNative.Style.t=?, 27 | ~action: Action.t=?, 28 | ~visible: bool, 29 | ~children: React.element, 30 | ) => React.element = "Snackbar" 31 | -------------------------------------------------------------------------------- /src/Paper__Subheading.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Subheading.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = 3 | "Subheading" 4 | -------------------------------------------------------------------------------- /src/Paper__Surface.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Surface.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~theme: Paper__ThemeProvider.Theme.t=?, 4 | ~style: ReactNative.Style.t=?, 5 | ~children: React.element=?, 6 | ) => React.element = "Surface" 7 | -------------------------------------------------------------------------------- /src/Paper__Switch.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Switch.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~disabled: bool=?, 4 | ~value: bool=?, 5 | ~color: string=?, 6 | ~style: ReactNative.Style.t=?, 7 | ~theme: Paper__ThemeProvider.Theme.t=?, 8 | ~onValueChange: bool => unit=?, 9 | ~children: React.element=?, 10 | ) => React.element = "Switch" 11 | -------------------------------------------------------------------------------- /src/Paper__Text.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Text.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~selectable: bool=?, 4 | ~acessible: bool=?, 5 | ~elipsizeMode: string=?, 6 | ~nativeID: string=?, 7 | ~numberOfLines: int=?, 8 | ~pressRetentionOffset: {..}=?, 9 | ~allowFontScaling: bool=?, 10 | ~theme: Paper__ThemeProvider.Theme.t=?, 11 | ~style: ReactNative.Style.t=?, 12 | ~onLayout: unit => unit=?, 13 | ~onLongPress: unit => unit=?, 14 | ~onPress: unit => unit=?, 15 | ~testID: string=?, 16 | ~children: React.element, 17 | ) => React.element = "Text" 18 | -------------------------------------------------------------------------------- /src/Paper__TextInput.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__TextInput.res: -------------------------------------------------------------------------------- 1 | module Icon = { 2 | @module("react-native-paper") @scope("TextInput") @react.component 3 | external make: (~name: Paper__Icon.t, ~color: string=?) => React.element = "Icon" 4 | } 5 | module Affix = { 6 | @module("react-native-paper") @scope("TextInput") @react.component 7 | external make: (~text: string) => React.element = "Affix" 8 | } 9 | 10 | @module("react-native-paper") @react.component 11 | external make: ( 12 | ~mode: [#flat | #outlined], 13 | ~allowFontScaling: bool=?, 14 | ~autoCorrect: bool=?, 15 | ~autoFocus: bool=?, 16 | ~autoCapitalize: [#none | #sentences | #words | #characters]=?, 17 | ~autoGrow: bool=?, 18 | ~blurOnSubmit: bool=?, 19 | ~caretHidden: bool=?, 20 | ~contextMenuHidden: bool=?, 21 | ~dataDetectorTypes: string=?, 22 | ~enablesReturnKeyAutomatically: bool=?, 23 | ~error: bool=?, 24 | ~keyboardAppearance: string=?, 25 | ~defaultValue: string=?, 26 | ~disabled: bool=?, 27 | ~disableFullscreenUI: bool=?, 28 | ~editable: bool=?, 29 | ~keyboardType: string=?, 30 | ~inlineImageLeft: string=?, 31 | ~inlineImagePadding: string=?, 32 | ~maxHeight: float=?, 33 | ~maxLength: int=?, 34 | ~label: string=?, 35 | ~placeholder: string=?, 36 | ~placeholderTextColor: string=?, 37 | ~returnKeyType: string=?, 38 | ~returnKeyLabel: string=?, 39 | ~spellCheck: bool=?, 40 | ~textBreakStrategy: string=?, 41 | ~underlineColorAndroid: string=?, 42 | ~clearButtonMode: string=?, 43 | ~clearTextOnFocus: string=?, 44 | ~secureTextEntry: bool=?, 45 | ~selectTextOnFocus: bool=?, 46 | ~selection: {..}=?, 47 | ~selectionColor: string=?, 48 | ~underlineColor: string=?, 49 | ~multiline: bool=?, 50 | ~numberOfLines: int=?, 51 | ~value: string=?, 52 | ~theme: Paper__ThemeProvider.Theme.t=?, 53 | ~style: ReactNative.Style.t=?, 54 | ~onChange: unit => unit=?, 55 | ~onChangeText: string => unit=?, 56 | ~onContentSizeChange: unit => unit=?, 57 | ~onKeyPress: unit => unit=?, 58 | ~onEndEditing: unit => unit=?, 59 | ~onLayout: unit => unit=?, 60 | ~onScroll: unit => unit=?, 61 | ~onSelectionChange: unit => unit=?, 62 | ~onSubmitEditing: unit => unit=?, 63 | ~onFocus: unit => unit=?, 64 | ~onBlur: unit => unit=?, 65 | ~testID: string=?, 66 | ~ref: Js.Nullable.t<'a> => unit=?, 67 | ~right: React.element=?, 68 | ) => React.element = "TextInput" 69 | -------------------------------------------------------------------------------- /src/Paper__ThemeProvider.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Colors = {}; 5 | 6 | var Fonts = {}; 7 | 8 | var Animation = {}; 9 | 10 | var Theme = { 11 | Colors: Colors, 12 | Fonts: Fonts, 13 | Animation: Animation 14 | }; 15 | 16 | exports.Theme = Theme; 17 | /* No side effect */ 18 | -------------------------------------------------------------------------------- /src/Paper__ThemeProvider.res: -------------------------------------------------------------------------------- 1 | module Theme = { 2 | type t 3 | 4 | module Colors = { 5 | type t 6 | 7 | @obj 8 | external make: ( 9 | ~primary: string, 10 | ~accent: string, 11 | ~background: string, 12 | ~surface: string, 13 | ~error: string, 14 | ~text: string, 15 | ~disabled: string, 16 | ~placeholder: string, 17 | ~backdrop: string, 18 | ) => t = "" 19 | 20 | @get external primary: t => string = "primary" 21 | @get external accent: t => string = "accent" 22 | @get external background: t => string = "background" 23 | @get external surface: t => string = "surface" 24 | @get external error: t => string = "error" 25 | @get external text: t => string = "text" 26 | @get external disabled: t => string = "disabled" 27 | @get external placeholder: t => string = "placeholder" 28 | @get external backdrop: t => string = "backdrop" 29 | } 30 | 31 | module Fonts = { 32 | type t 33 | type configured 34 | 35 | @deriving(abstract) 36 | type font = { 37 | fontFamily: string, 38 | fontWeight: string, 39 | } 40 | 41 | @deriving(abstract) 42 | type fontByOS = { 43 | ios: t, 44 | web: t, 45 | android: t, 46 | @optional macos: t, 47 | @optional windows: t, 48 | } 49 | 50 | @module("react-native-paper") 51 | external configureFonts: fontByOS => configured = "configureFonts" 52 | 53 | @obj 54 | external make: (~regular: font, ~medium: font, ~light: font, ~thin: font) => t = "" 55 | } 56 | 57 | module Animation = { 58 | type t 59 | 60 | @obj external make: (~scale: float) => t = "" 61 | 62 | @get external scale: t => float = "scale" 63 | } 64 | 65 | @obj 66 | external make: ( 67 | ~roundness: int=?, 68 | ~dark: bool=?, 69 | ~colors: Colors.t=?, 70 | ~fonts: Fonts.configured=?, 71 | ~animation: Animation.t=?, 72 | unit, 73 | ) => t = "" 74 | 75 | @get external fonts: t => Fonts.configured = "fonts" 76 | @get external colors: t => Colors.t = "colors" 77 | @get external animation: t => Animation.t = "animation" 78 | @get external dark: t => bool = "dark" 79 | } 80 | 81 | @module("react-native-paper") @react.component 82 | external make: (~theme: Theme.t=?, ~children: React.element) => React.element = "ThemeProvider" 83 | 84 | @module("react-native-paper") 85 | external defaultTheme: Theme.t = "DefaultTheme" 86 | 87 | @module("react-native-paper") external darkTheme: Theme.t = "DarkTheme" 88 | @module("react-native-paper") external useTheme: unit => Theme.t = "useTheme" 89 | -------------------------------------------------------------------------------- /src/Paper__Title.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__Title.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: (~style: ReactNative.Style.t=?, ~children: React.element) => React.element = "Title" 3 | -------------------------------------------------------------------------------- /src/Paper__ToggleButton.bs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var Group = {}; 5 | 6 | var Row = {}; 7 | 8 | exports.Group = Group; 9 | exports.Row = Row; 10 | /* No side effect */ 11 | -------------------------------------------------------------------------------- /src/Paper__ToggleButton.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~value: string=?, 4 | ~disabled: bool=?, 5 | ~loading: bool=?, 6 | ~status: [#checked | #unchecked]=?, 7 | ~icon: Paper__Icon.t=?, 8 | ~color: string=?, 9 | ~accessibilityLabel: string=?, 10 | ~style: ReactNative.Style.t=?, 11 | ~theme: Paper__ThemeProvider.Theme.t=?, 12 | ~onPress: string => unit=?, 13 | ) => React.element = "ToggleButton" 14 | 15 | module Group = { 16 | @module("react-native-paper") @scope("ToggleButton") @react.component 17 | external make: ( 18 | ~value: string, 19 | ~onValueChange: string => unit, 20 | ~children: React.element, 21 | ~style: ReactNative.Style.t=?, 22 | ) => React.element = "Group" 23 | } 24 | 25 | module Row = { 26 | @module("react-native-paper") @scope("ToggleButton") @react.component 27 | external make: ( 28 | ~value: string, 29 | ~onValueChange: string => unit, 30 | ~children: React.element, 31 | ~style: ReactNative.Style.t=?, 32 | ) => React.element = "Row" 33 | } 34 | -------------------------------------------------------------------------------- /src/Paper__TouchableRipple.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Paper__TouchableRipple.res: -------------------------------------------------------------------------------- 1 | @module("react-native-paper") @react.component 2 | external make: ( 3 | ~borderless: bool=?, 4 | ~centered: bool=?, 5 | ~background: 'a=?, 6 | ~disabled: bool=?, 7 | ~rippleColor: string=?, 8 | ~underlayColor: string=?, 9 | ~style: ReactNative.Style.t=?, 10 | ~theme: Paper__ThemeProvider.Theme.t=?, 11 | ~onPress: ReactNative.Event.pressEvent => unit=?, 12 | ~onLongPress: ReactNative.Event.pressEvent => unit=?, 13 | ~children: React.element, 14 | ) => React.element = "TouchableRipple" 15 | --------------------------------------------------------------------------------