├── .changeset ├── README.md └── config.json ├── .editorconfig ├── .eslintrc.js ├── .gitattributes ├── .gitignore ├── .prettierrc.js ├── LICENSE ├── README.md ├── docs ├── .nojekyll ├── README.md ├── _navbar.md ├── _sidebar.md ├── api.md ├── build-icon.js ├── components │ ├── ActionSheet.md │ ├── Badge.md │ ├── Button.md │ ├── Cell.md │ ├── CellGroup.md │ ├── DatePicker.md │ ├── Icon.md │ ├── ImageCropper.md │ ├── IndexList.md │ ├── Modal.md │ ├── Navbar.md │ ├── Picker.md │ ├── Popup.md │ ├── Search.md │ ├── Spin.md │ ├── Swiper.md │ ├── TabBar.md │ ├── Toast.md │ └── Touchable.md ├── guide.md └── index.html ├── package.json ├── packages ├── playground │ ├── .buckconfig │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .prettierrc.js │ ├── .watchmanconfig │ ├── CHANGELOG.md │ ├── __tests__ │ │ └── App-test.tsx │ ├── android │ │ ├── app │ │ │ ├── _BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── reactnativeui │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── reactnativeui │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── ReactNativeUi.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── ReactNativeUi.xcscheme │ │ ├── ReactNativeUi.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── ReactNativeUi │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ └── main.m │ │ └── ReactNativeUiTests │ │ │ ├── Info.plist │ │ │ └── ReactNativeUiTests.m │ ├── metro.config.js │ ├── package.json │ ├── public │ │ └── index.html │ ├── src │ │ ├── components │ │ │ ├── Demo │ │ │ │ └── index.tsx │ │ │ └── Switcher │ │ │ │ └── index.tsx │ │ ├── core │ │ │ ├── constants.ts │ │ │ └── router.tsx │ │ ├── images │ │ │ └── tabbar │ │ │ │ ├── comp-selected.png │ │ │ │ ├── comp.png │ │ │ │ ├── tool-selected.png │ │ │ │ └── tool.png │ │ ├── index.tsx │ │ ├── pages │ │ │ ├── Badge │ │ │ │ └── index.tsx │ │ │ ├── Button │ │ │ │ └── index.tsx │ │ │ ├── Home │ │ │ │ ├── index.tsx │ │ │ │ └── tabs │ │ │ │ │ ├── comp.tsx │ │ │ │ │ └── tools.tsx │ │ │ ├── Icon │ │ │ │ └── index.tsx │ │ │ ├── IndexList │ │ │ │ └── index.tsx │ │ │ ├── Modal │ │ │ │ └── index.tsx │ │ │ ├── Search │ │ │ │ └── index.tsx │ │ │ └── Toast │ │ │ │ └── index.tsx │ │ └── shim.d.ts │ ├── tsconfig.json │ ├── webpack.config.js │ └── yarn.lock └── ui-view │ ├── .gitignore │ ├── .vscode │ └── settings.json │ ├── .watchmanconfig │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── babel.config.js │ ├── package.json │ ├── scripts │ └── svg │ │ └── index.js │ ├── src │ ├── assets │ │ └── svg │ │ │ ├── add-circle-fill.svg │ │ │ ├── add-circle.svg │ │ │ ├── add-square.svg │ │ │ ├── add.svg │ │ │ ├── addteam.svg │ │ │ ├── adduser.svg │ │ │ ├── adjust.svg │ │ │ ├── align-center.svg │ │ │ ├── align-left.svg │ │ │ ├── align-right.svg │ │ │ ├── alipay-circle-fill.svg │ │ │ ├── alipay.svg │ │ │ ├── android-fill.svg │ │ │ ├── android.svg │ │ │ ├── apple-fill.svg │ │ │ ├── apple.svg │ │ │ ├── arrow-double-left.svg │ │ │ ├── arrow-double-right.svg │ │ │ ├── arrow-down-circle.svg │ │ │ ├── arrow-down-filling.svg │ │ │ ├── arrow-down.svg │ │ │ ├── arrow-left-circle.svg │ │ │ ├── arrow-left-filling.svg │ │ │ ├── arrow-left.svg │ │ │ ├── arrow-right-circle.svg │ │ │ ├── arrow-right-filling.svg │ │ │ ├── arrow-right.svg │ │ │ ├── arrow-up-circle.svg │ │ │ ├── arrow-up-filling.svg │ │ │ ├── arrow-up.svg │ │ │ ├── ashbin.svg │ │ │ ├── attachment.svg │ │ │ ├── back.svg │ │ │ ├── bad.svg │ │ │ ├── bell-fill.svg │ │ │ ├── bell.svg │ │ │ ├── bottom.svg │ │ │ ├── calendar.svg │ │ │ ├── camera.svg │ │ │ ├── caps-lock.svg │ │ │ ├── caps-unlock-filling.svg │ │ │ ├── chart-bar.svg │ │ │ ├── chart-pie.svg │ │ │ ├── check-item-filling.svg │ │ │ ├── check-item.svg │ │ │ ├── check.svg │ │ │ ├── clock-filling.svg │ │ │ ├── close-circle-fill.svg │ │ │ ├── close-circle.svg │ │ │ ├── close.svg │ │ │ ├── code.svg │ │ │ ├── colum-height.svg │ │ │ ├── column-3.svg │ │ │ ├── column-4.svg │ │ │ ├── column-horizontal.svg │ │ │ ├── column-vertical.svg │ │ │ ├── comment-filling.svg │ │ │ ├── comment.svg │ │ │ ├── complete.svg │ │ │ ├── copy.svg │ │ │ ├── cry-filling.svg │ │ │ ├── cry.svg │ │ │ ├── customer-service.svg │ │ │ ├── cut.svg │ │ │ ├── dash.svg │ │ │ ├── data-view.svg │ │ │ ├── database.svg │ │ │ ├── decline-filling.svg │ │ │ ├── delete-filling.svg │ │ │ ├── delete.svg │ │ │ ├── deleteuser.svg │ │ │ ├── detail-more.svg │ │ │ ├── dingtalk-circle-fill.svg │ │ │ ├── dingtalk.svg │ │ │ ├── discount.svg │ │ │ ├── double-left.svg │ │ │ ├── double-right.svg │ │ │ ├── down.svg │ │ │ ├── download.svg │ │ │ ├── drag.svg │ │ │ ├── dynamic-filling.svg │ │ │ ├── edit-filling.svg │ │ │ ├── edit.svg │ │ │ ├── electronics.svg │ │ │ ├── ellipsis.svg │ │ │ ├── email.svg │ │ │ ├── error.svg │ │ │ ├── explain.svg │ │ │ ├── export.svg │ │ │ ├── eye-close.svg │ │ │ ├── eye.svg │ │ │ ├── fabulous.svg │ │ │ ├── favorite-filling.svg │ │ │ ├── favorite.svg │ │ │ ├── file-add.svg │ │ │ ├── file-common-filling.svg │ │ │ ├── file-common.svg │ │ │ ├── file-delete.svg │ │ │ ├── file-open.svg │ │ │ ├── file.svg │ │ │ ├── film.svg │ │ │ ├── filter-filling.svg │ │ │ ├── filter.svg │ │ │ ├── folder-close.svg │ │ │ ├── folder-filling.svg │ │ │ ├── forward.svg │ │ │ ├── fullscreen-expand.svg │ │ │ ├── fullscreen-shrink.svg │ │ │ ├── github-fill.svg │ │ │ ├── good.svg │ │ │ ├── google-circle-fill.svg │ │ │ ├── google.svg │ │ │ ├── help-filling.svg │ │ │ ├── help.svg │ │ │ ├── hide.svg │ │ │ ├── history-filling.svg │ │ │ ├── history.svg │ │ │ ├── home-filling.svg │ │ │ ├── home.svg │ │ │ ├── image-text.svg │ │ │ ├── import.svg │ │ │ ├── index.ts │ │ │ ├── intermediate-filling.svg │ │ │ ├── key.svg │ │ │ ├── keyboard-26.svg │ │ │ ├── keyboard-9.svg │ │ │ ├── layers.svg │ │ │ ├── layout-filling.svg │ │ │ ├── layout.svg │ │ │ ├── left.svg │ │ │ ├── line.svg │ │ │ ├── link.svg │ │ │ ├── loading.svg │ │ │ ├── lock.svg │ │ │ ├── login.svg │ │ │ ├── logout.svg │ │ │ ├── map-filling.svg │ │ │ ├── map.svg │ │ │ ├── meh-filling.svg │ │ │ ├── meh.svg │ │ │ ├── menu.svg │ │ │ ├── message.svg │ │ │ ├── mic.svg │ │ │ ├── minus-circle-fill.svg │ │ │ ├── minus-circle.svg │ │ │ ├── minus-square.svg │ │ │ ├── minus.svg │ │ │ ├── mobile-phone.svg │ │ │ ├── modular.svg │ │ │ ├── more.svg │ │ │ ├── move.svg │ │ │ ├── navigation.svg │ │ │ ├── news-filling.svg │ │ │ ├── notification-filling.svg │ │ │ ├── notification.svg │ │ │ ├── operation.svg │ │ │ ├── pad.svg │ │ │ ├── pdf.svg │ │ │ ├── picture-filling.svg │ │ │ ├── picture.svg │ │ │ ├── pin.svg │ │ │ ├── play.svg │ │ │ ├── print.svg │ │ │ ├── prompt-filling.svg │ │ │ ├── prompt.svg │ │ │ ├── qq-circle-fill.svg │ │ │ ├── qq.svg │ │ │ ├── question-circle-fill.svg │ │ │ ├── question-circle.svg │ │ │ ├── question.svg │ │ │ ├── refresh.svg │ │ │ ├── right.svg │ │ │ ├── rise-filling.svg │ │ │ ├── rotate-left.svg │ │ │ ├── run-in.svg │ │ │ ├── run-up.svg │ │ │ ├── safetycertificate.svg │ │ │ ├── save.svg │ │ │ ├── scanning.svg │ │ │ ├── search.svg │ │ │ ├── security.svg │ │ │ ├── select.svg │ │ │ ├── send.svg │ │ │ ├── setting-filling.svg │ │ │ ├── setting.svg │ │ │ ├── sever.svg │ │ │ ├── share.svg │ │ │ ├── sign-out.svg │ │ │ ├── skip.svg │ │ │ ├── small-dash.svg │ │ │ ├── smile-filling.svg │ │ │ ├── smile.svg │ │ │ ├── sort-down.svg │ │ │ ├── sort-menu.svg │ │ │ ├── sort-up.svg │ │ │ ├── sorting.svg │ │ │ ├── stop.svg │ │ │ ├── success-filling.svg │ │ │ ├── success.svg │ │ │ ├── survey.svg │ │ │ ├── swap.svg │ │ │ ├── switch.svg │ │ │ ├── switchuser.svg │ │ │ ├── sync.svg │ │ │ ├── taobao-circle-fill.svg │ │ │ ├── taobao.svg │ │ │ ├── task-filling.svg │ │ │ ├── task.svg │ │ │ ├── team.svg │ │ │ ├── telephone-out.svg │ │ │ ├── telephone.svg │ │ │ ├── text.svg │ │ │ ├── time.svg │ │ │ ├── toggle-left.svg │ │ │ ├── toggle-right.svg │ │ │ ├── top.svg │ │ │ ├── training.svg │ │ │ ├── transaction.svg │ │ │ ├── twitter-circle-fill.svg │ │ │ ├── twitter.svg │ │ │ ├── undo.svg │ │ │ ├── unlock.svg │ │ │ ├── up.svg │ │ │ ├── upload.svg │ │ │ ├── user-circle-filling.svg │ │ │ ├── user-circle.svg │ │ │ ├── user.svg │ │ │ ├── vertical-align-bottom.svg │ │ │ ├── vertical-align-middle.svg │ │ │ ├── vertical-align-top.svg │ │ │ ├── vertical-left.svg │ │ │ ├── vertical-right.svg │ │ │ ├── video.svg │ │ │ ├── voice.svg │ │ │ ├── warning-filling.svg │ │ │ ├── warning.svg │ │ │ ├── wechat-circle-fill.svg │ │ │ ├── wechat.svg │ │ │ ├── weibo-circle-fill.svg │ │ │ ├── weibo.svg │ │ │ ├── wifi.svg │ │ │ ├── work-filling.svg │ │ │ ├── work.svg │ │ │ ├── zhihu-circle-fill.svg │ │ │ ├── zhihu.svg │ │ │ ├── zoom-in.svg │ │ │ └── zoom-out.svg │ ├── components │ │ ├── ActionSheet │ │ │ └── index.tsx │ │ ├── Badge │ │ │ └── index.tsx │ │ ├── Button │ │ │ └── index.tsx │ │ ├── Cell │ │ │ ├── cell.tsx │ │ │ └── cellGroup.tsx │ │ ├── Icon │ │ │ └── index.tsx │ │ ├── ImageCropper │ │ │ ├── index.tsx │ │ │ └── index.web.tsx │ │ ├── IndexList │ │ │ ├── anchor.tsx │ │ │ ├── index.tsx │ │ │ └── list.tsx │ │ ├── Modal │ │ │ ├── index.tsx │ │ │ └── modal.tsx │ │ ├── Navbar │ │ │ └── index.tsx │ │ ├── Picker │ │ │ ├── datePicker.tsx │ │ │ ├── index.tsx │ │ │ └── pickerView.tsx │ │ ├── Popup │ │ │ └── index.tsx │ │ ├── Portal │ │ │ ├── host.tsx │ │ │ └── index.tsx │ │ ├── Search │ │ │ └── index.tsx │ │ ├── Spin │ │ │ └── index.tsx │ │ ├── Styles │ │ │ └── theme.ts │ │ ├── Swiper │ │ │ ├── swiper.tsx │ │ │ └── swiperItem.tsx │ │ ├── TabBar │ │ │ ├── tabBar.tsx │ │ │ └── tabBarItem.tsx │ │ ├── Toast │ │ │ └── index.tsx │ │ └── Touchable │ │ │ └── index.tsx │ ├── index.ts │ ├── lib │ │ └── react-native-svg-uri │ │ │ ├── index.tsx │ │ │ └── utils.ts │ └── utils │ │ └── index.tsx │ └── tsconfig.json └── yarn.lock /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.0.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "master", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Windows files 2 | [*.bat] 3 | end_of_line = crlf 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | plugins: ['react-hooks'], 5 | rules: { 6 | 'react-hooks/rules-of-hooks': 'error', 7 | 'react-hooks/exhaustive-deps': 'warn', 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | packages/playground/android/java_pid75013.hprof filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: true, 3 | jsxBracketSameLine: false, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | arrowParens: 'avoid', 7 | printWidth: 120, 8 | semi: true, 9 | }; 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 guyue88 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 | -------------------------------------------------------------------------------- /docs/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/docs/.nojekyll -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # React Native Ui View 2 | 3 | ![npm (tag)](https://img.shields.io/npm/v/react-native-ui-view.svg) 4 | ![npm](https://img.shields.io/npm/dm/react-native-ui-view.svg) 5 | 6 | React Native Ui View 是一个 react native 组件库,全面兼容 react native 生态框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水。 7 | 8 | ## 组件列表 9 | 10 | - [x] ActionSheet 11 | - [x] Badge 12 | - [x] Button 13 | - [x] Cell 14 | - [x] CellGroup 15 | - [x] Icon 16 | - [x] ImageCropper 17 | - [x] IndexList 18 | - [x] Modal 19 | - [x] Navbar 20 | - [x] Picker 21 | - [x] Popup 22 | - [x] Portal 23 | - [x] Search 24 | - [x] Spin 25 | - [x] Swiper 26 | - [x] Tabbar 27 | - [x] Toast 28 | - [x] Touchable 29 | 30 | ## 适用领域 31 | 32 | React Native Ui View 是 react native 生态专用的 UI 框架,目前仅支持在 react native 中使用,部分组件可以支持在 react-native-web 中使用。 33 | 34 | ## 版权信息 35 | 36 | React Native Ui View 遵循 MIT (opens new window)开源协议,意味着您无需支付任何费用,也无需授权,即可将 React Native Ui View 应用到您的产品中。 37 | 38 | 注意:这并不意味着您可以将 React Native Ui View 应用到非法的领域,比如涉及赌博,暴力等方面。如因此产生纠纷或法律问题,React Native Ui View 不承担任何责任。 39 | -------------------------------------------------------------------------------- /docs/_navbar.md: -------------------------------------------------------------------------------- 1 | - [主页](/) 2 | - [指南](guide.md) 3 | - [组件](components/button.md) 4 | - [API](api.md) 5 | -------------------------------------------------------------------------------- /docs/_sidebar.md: -------------------------------------------------------------------------------- 1 | - [主页](/ 'React Native Ui View') 2 | - [快速开始](guide.md '快速开始') 3 | - 组件 4 | - [ActionSheet](components/ActionSheet.md 'ActionSheet 操作菜单') 5 | - [Badge](components/Badge.md 'Badge 徽标数') 6 | - [Button](components/Button.md 'Button 按钮') 7 | - [Cell](components/Cell.md 'Cell 单元格') 8 | - [CellGroup](components/CellGroup.md 'CellGroup 单元格组') 9 | - [DatePicker](components/DatePicker.md 'DatePicker 时间选择器') 10 | - [Icon](components/Icon.md 'Icon 图标') 11 | - [ImageCropper](components/ImageCropper.md 'ImageCropper 图片裁剪器') 12 | - [IndexList](components/IndexList.md 'IndexList 索引列表') 13 | - [Modal](components/Modal.md 'Modal 模态框') 14 | - [Navbar](components/Navbar.md 'Navbar 导航栏') 15 | - [Picker](components/Picker.md 'Picker 选择器') 16 | - [Popup](components/Popup.md 'Popup 弹出层') 17 | - [Search](components/Search.md 'Search 搜索') 18 | - [Spin](components/Spin.md 'Spin 加载动画') 19 | - [Swiper](components/Swiper.md 'Swiper 轮播图') 20 | - [TabBar](components/TabBar.md 'TabBar 底部导航') 21 | - [Toast](components/Toast.md 'Toast 消息提示') 22 | - [Touchable](components/Touchable.md 'Touchable 可点元素') 23 | - [API](api.md) 24 | -------------------------------------------------------------------------------- /docs/api.md: -------------------------------------------------------------------------------- 1 | # API 2 | 3 | 暂未提供 4 | -------------------------------------------------------------------------------- /docs/components/Badge.md: -------------------------------------------------------------------------------- 1 | # Badge 徽标数 2 | 3 | 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式 4 | 5 | ## 平台差异性说明 6 | 7 | | ReactNative | WEB | 8 | | ----------- | --- | 9 | | √ | √ | 10 | 11 | ## 基本使用 12 | 13 | ```typescript 14 | import React from 'react'; 15 | import { Badge } from 'react-native-ui-view'; 16 | 17 | const Demo: React.FC<{}> = () => { 18 | return ; 19 | }; 20 | ``` 21 | 22 | ## Props 23 | 24 | | 参数 | 说明 | 类型 | 必填 | 默认值 | 25 | | ------------- | --------------------------------- | -------------- | ---- | ------ | 26 | | text | 显示的文字 | string | √ | - | 27 | | size | 显示大小 | large \| small | × | small | 28 | | corner | 是否显示在右上角,绝对定位 | boolean | × | false | 29 | | dot | 是否显示为一个红点 | number | × | false | 30 | | overflowCount | 超出这个值显示为${overflowCount}+ | number | × | 99 | 31 | -------------------------------------------------------------------------------- /docs/components/Button.md: -------------------------------------------------------------------------------- 1 | # Button 按钮 2 | 3 | 按钮 4 | 5 | ## 平台差异性说明 6 | 7 | | ReactNative | WEB | 8 | | ----------- | --- | 9 | | √ | √ | 10 | 11 | ## 基本使用 12 | 13 | ```typescript 14 | import React from 'react'; 15 | import { Button } from 'react-native-ui-view'; 16 | 17 | const Demo: React.FC<{}> = () => { 18 | return 34 | 35 | ); 36 | }; 37 | ``` 38 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React Native Ui View 7 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
Please wait...
18 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "description": "React Native Ui View is a react native component library, which is fully compatible with the react native ecological framework. Comprehensive components and convenient tools will make you feel at ease。", 4 | "workspaces": { 5 | "packages": [ 6 | "packages/*" 7 | ], 8 | "nohoist": [ 9 | "**/create-react-class", 10 | "**/use-latest-callback", 11 | "**/react", 12 | "**/react-dom", 13 | "**/react-native", 14 | "**/react-native/**", 15 | "**/react-native-svg", 16 | "**/react-native-gesture-handler", 17 | "**/react-native-reanimated", 18 | "**/@react-native-community/image-editor" 19 | ] 20 | }, 21 | "scripts": { 22 | "dev": "yarn workspace react-native-ui-view-playground dev", 23 | "doc": "docsify serve ./docs --port 3005", 24 | "build:icon-doc": "node docs/build-icon.js" 25 | }, 26 | "dependencies": { 27 | "@changesets/cli": "^2.22.0", 28 | "eslint-plugin-react-hooks": "^4.3.0", 29 | "eslint": "7.14.0", 30 | "@react-native-community/eslint-config": "^2.0.0" 31 | } 32 | } -------------------------------------------------------------------------------- /packages/playground/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /packages/playground/.gitattributes: -------------------------------------------------------------------------------- 1 | # Windows files should use crlf line endings 2 | # https://help.github.com/articles/dealing-with-line-endings/ 3 | *.bat text eol=crlf 4 | -------------------------------------------------------------------------------- /packages/playground/.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # node.js 33 | # 34 | node_modules/ 35 | npm-debug.log 36 | yarn-error.log 37 | 38 | # BUCK 39 | buck-out/ 40 | \.buckd/ 41 | *.keystore 42 | !debug.keystore 43 | 44 | # fastlane 45 | # 46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 47 | # screenshots whenever they are needed. 48 | # For more information about the recommended setup visit: 49 | # https://docs.fastlane.tools/best-practices/source-control/ 50 | 51 | */fastlane/report.xml 52 | */fastlane/Preview.html 53 | */fastlane/screenshots 54 | 55 | # Bundle artifact 56 | *.jsbundle 57 | 58 | # CocoaPods 59 | /ios/Pods/ 60 | /android/java_pid75013.hprof -------------------------------------------------------------------------------- /packages/playground/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: true, 3 | jsxBracketSameLine: false, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | arrowParens: 'avoid', 7 | printWidth: 120, 8 | semi: true, 9 | }; 10 | -------------------------------------------------------------------------------- /packages/playground/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /packages/playground/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # react-native-ui-view-playground 2 | 3 | ## 0.0.2 4 | 5 | ### Patch Changes 6 | 7 | - Updated dependencies 8 | - react-native-ui-view@0.1.0 9 | -------------------------------------------------------------------------------- /packages/playground/__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/playground/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /packages/playground/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/debug.keystore -------------------------------------------------------------------------------- /packages/playground/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /packages/playground/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/java/com/reactnativeui/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativeui; 2 | 3 | import com.facebook.react.ReactActivity; 4 | import android.os.Bundle; 5 | 6 | public class MainActivity extends ReactActivity { 7 | 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(null); 11 | } 12 | 13 | /** 14 | * Returns the name of the main component registered from JavaScript. This is used to schedule 15 | * rendering of the component. 16 | */ 17 | @Override 18 | protected String getMainComponentName() { 19 | return "ReactNativeUi"; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeUi 3 | 4 | -------------------------------------------------------------------------------- /packages/playground/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/playground/android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | ext { 5 | buildToolsVersion = "29.0.3" 6 | minSdkVersion = 21 7 | compileSdkVersion = 29 8 | targetSdkVersion = 29 9 | ndkVersion = "20.1.5948944" 10 | } 11 | repositories { 12 | google() 13 | jcenter() 14 | } 15 | dependencies { 16 | classpath("com.android.tools.build:gradle:4.1.0") 17 | // NOTE: Do not place your application dependencies here; they belong 18 | // in the individual module build.gradle files 19 | } 20 | } 21 | 22 | allprojects { 23 | repositories { 24 | mavenLocal() 25 | maven { 26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 27 | url("$rootDir/../node_modules/react-native/android") 28 | } 29 | maven { 30 | // Android JSC is installed from npm 31 | url("$rootDir/../node_modules/jsc-android/dist") 32 | } 33 | 34 | google() 35 | jcenter() 36 | maven { url 'https://www.jitpack.io' } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /packages/playground/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/playground/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /packages/playground/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeUi' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /packages/playground/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": "ReactNativeUi" 3 | } -------------------------------------------------------------------------------- /packages/playground/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/playground/index.js: -------------------------------------------------------------------------------- 1 | import 'react-native-gesture-handler'; 2 | import { AppRegistry } from 'react-native'; 3 | import App from './src'; 4 | import { appName } from './app.json'; 5 | 6 | AppRegistry.registerComponent(appName, () => App); 7 | 8 | if (typeof document !== 'undefined') { 9 | const rootTag = document.getElementById('root'); 10 | AppRegistry.runApplication(appName, { rootTag }); 11 | } 12 | -------------------------------------------------------------------------------- /packages/playground/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'ReactNativeUi' do 7 | config = use_native_modules! 8 | 9 | use_react_native!( 10 | :path => config[:reactNativePath], 11 | # to enable hermes on iOS, change `false` to `true` and then install pods 12 | :hermes_enabled => false 13 | ) 14 | 15 | target 'ReactNativeUiTests' do 16 | inherit! :complete 17 | # Pods for testing 18 | end 19 | 20 | # Enables Flipper. 21 | # 22 | # Note that if you have use_frameworks! enabled, Flipper will not work and 23 | # you should disable the next line. 24 | use_flipper!() 25 | 26 | post_install do |installer| 27 | react_native_post_install(installer) 28 | end 29 | end -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUi.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUi/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUi/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUi/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUi/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/playground/ios/ReactNativeUiTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/playground/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | const exclusionList = require('metro-config/src/defaults/exclusionList'); 8 | const { getMetroTools, getMetroAndroidAssetsResolutionFix } = require('react-native-monorepo-tools'); 9 | 10 | const androidAssetsResolutionFix = getMetroAndroidAssetsResolutionFix(); 11 | 12 | const monorepoMetroTools = getMetroTools(); 13 | 14 | module.exports = { 15 | transformer: { 16 | publicPath: androidAssetsResolutionFix.publicPath, 17 | getTransformOptions: async () => ({ 18 | transform: { 19 | experimentalImportSupport: false, 20 | inlineRequires: true, 21 | }, 22 | }), 23 | }, 24 | 25 | server: { 26 | enhanceMiddleware: middleware => { 27 | return androidAssetsResolutionFix.applyMiddleware(middleware); 28 | }, 29 | }, 30 | 31 | watchFolders: monorepoMetroTools.watchFolders, 32 | resolver: { 33 | blockList: exclusionList(monorepoMetroTools.blockList), 34 | extraNodeModules: monorepoMetroTools.extraNodeModules, 35 | }, 36 | }; 37 | -------------------------------------------------------------------------------- /packages/playground/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Component Demo 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/playground/src/core/constants.ts: -------------------------------------------------------------------------------- 1 | export const MODULES = { 2 | HOME: 'HOME', 3 | ICON: 'ICON', 4 | COLORS: 'COLORS', 5 | MODAL: 'MODAL', 6 | TOAST: 'TOAST', 7 | BADGE: 'BADGE', 8 | SEARCH: 'SEARCH', 9 | INDEX_LIST: 'INDEX_LIST', 10 | BUTTON: 'BUTTON', 11 | }; 12 | -------------------------------------------------------------------------------- /packages/playground/src/core/router.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { NavigationContainer } from '@react-navigation/native'; 3 | import { createStackNavigator, TransitionPresets } from '@react-navigation/stack'; 4 | import { MODULES } from './constants'; 5 | 6 | const PAGE_LIST: { pageName: string; component: React.ComponentType }[] = []; 7 | 8 | export const PageContainer = (pageName: string, component: React.ComponentType) => { 9 | if (!PAGE_LIST.find(item => item.pageName === pageName)) { 10 | PAGE_LIST.push({ 11 | pageName, 12 | component, 13 | }); 14 | } 15 | }; 16 | 17 | export const Router = () => { 18 | const Stack = createStackNavigator(); 19 | return ( 20 | 21 | null, 25 | gestureEnabled: true, 26 | ...TransitionPresets.SlideFromRightIOS, 27 | }} 28 | > 29 | {PAGE_LIST.map(item => { 30 | return ; 31 | })} 32 | 33 | 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /packages/playground/src/images/tabbar/comp-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/src/images/tabbar/comp-selected.png -------------------------------------------------------------------------------- /packages/playground/src/images/tabbar/comp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/src/images/tabbar/comp.png -------------------------------------------------------------------------------- /packages/playground/src/images/tabbar/tool-selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/src/images/tabbar/tool-selected.png -------------------------------------------------------------------------------- /packages/playground/src/images/tabbar/tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guyue88/react-native-ui-view/a8d4dcaabc88d6615a3630d06bf9963d8b9ccdca/packages/playground/src/images/tabbar/tool.png -------------------------------------------------------------------------------- /packages/playground/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Portal } from 'react-native-ui-view'; 3 | import { Router } from './core/router'; 4 | 5 | import './pages/Home'; 6 | import './pages/Icon'; 7 | import './pages/Modal'; 8 | import './pages/Toast'; 9 | import './pages/Badge'; 10 | import './pages/Search'; 11 | import './pages/IndexList'; 12 | import './pages/Button'; 13 | 14 | const App = () => { 15 | return ( 16 | 17 | 18 | 19 | ); 20 | }; 21 | 22 | export default App; 23 | -------------------------------------------------------------------------------- /packages/playground/src/pages/Button/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, SafeAreaView, View } from 'react-native'; 3 | import { useNavigation } from '@react-navigation/native'; 4 | import { Theme, Navbar, Button } from 'react-native-ui-view'; 5 | import { MODULES } from '../../core/constants'; 6 | import { PageContainer } from '../../core/router'; 7 | 8 | const ButtonPage = () => { 9 | const navigation = useNavigation(); 10 | 11 | return ( 12 | 13 | navigation.goBack()} /> 14 | 15 | 16 | 17 | 18 | ); 19 | }; 20 | 21 | const styles = StyleSheet.create({ 22 | container: { 23 | flex: 1, 24 | backgroundColor: Theme.fillBase, 25 | }, 26 | page: { 27 | padding: 15, 28 | }, 29 | }); 30 | 31 | PageContainer(MODULES.BUTTON, ButtonPage); 32 | -------------------------------------------------------------------------------- /packages/playground/src/pages/Home/tabs/tools.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, View, Text } from 'react-native'; 3 | 4 | const Tools = () => { 5 | return ( 6 | 7 | Tools 8 | 9 | ); 10 | }; 11 | 12 | const styles = StyleSheet.create({ 13 | title: { 14 | fontSize: 18, 15 | textAlign: 'center', 16 | marginTop: 30, 17 | }, 18 | }); 19 | 20 | export default Tools; 21 | -------------------------------------------------------------------------------- /packages/playground/src/shim.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.json' { 2 | const value: any; 3 | export default value; 4 | } 5 | declare module '*.png' { 6 | const img: number; 7 | export default img; 8 | } 9 | -------------------------------------------------------------------------------- /packages/ui-view/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | esm 4 | .DS_Store 5 | yarn.lock 6 | -------------------------------------------------------------------------------- /packages/ui-view/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true, 3 | "editor.codeActionsOnSave": { 4 | "source.fixAll.eslint": false 5 | }, 6 | "eslint.nodePath": null, 7 | "eslint.options": { 8 | "resolvePluginsRelativeTo": null 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/ui-view/.watchmanconfig: -------------------------------------------------------------------------------- 1 | { 2 | "ignore_dirs": [ 3 | "node_modules" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /packages/ui-view/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # react-native-ui-view 2 | 3 | ## 0.0.10 4 | 5 | ### Minor Changes 6 | 7 | - update button components 8 | -------------------------------------------------------------------------------- /packages/ui-view/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 罗强 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 | -------------------------------------------------------------------------------- /packages/ui-view/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/add-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/add-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/add-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/adduser.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/align-center.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/align-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/align-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/alipay-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/alipay.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/android-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/apple-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-double-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-double-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-down-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-down-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-left-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-left-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-right-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-right-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-up-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-up-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/arrow-up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/back.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/bell-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/bell.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/bottom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/caps-unlock-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/chart-pie.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/check-item-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/check-item.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/check.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/clock-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/close-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/close-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/code.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/colum-height.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/column-3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/column-4.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/column-horizontal.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/column-vertical.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/comment-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/complete.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/cut.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/dash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/database.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/decline-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/delete-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/deleteuser.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/detail-more.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/dingtalk-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/dingtalk.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/discount.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/double-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/double-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/download.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/drag.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/edit-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/electronics.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/ellipsis.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/email.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/error.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/explain.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/eye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/fabulous.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/favorite-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/file-add.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/file-common-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/file-common.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/file-open.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/filter-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/filter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/folder-close.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/folder-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/forward.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/github-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/google-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/google.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/help.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/home-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/image-text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/intermediate-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/key.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/layout-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/layout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/line.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/lock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/login.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/logout.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/map-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/map.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/meh-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/meh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/message.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/mic.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/minus-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/minus-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/minus-square.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/minus.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/mobile-phone.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/more.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/navigation.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/news-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/notification-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/pad.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/picture-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/play.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/print.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/prompt-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/prompt.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/qq-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/qq.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/question-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/question-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/question.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/refresh.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/rise-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/rotate-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/run-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/safetycertificate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/save.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/search.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/security.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/select.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/send.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/sever.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/share.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/skip.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/small-dash.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/sort-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/sort-menu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/sorting.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/stop.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/success-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/success.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/swap.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/switchuser.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/sync.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/taobao.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/task-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/text.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/time.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/toggle-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/toggle-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/top.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/twitter-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/twitter.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/undo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/unlock.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/up.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/upload.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/user-circle-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/user-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/user.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/vertical-align-bottom.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/vertical-align-middle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/vertical-align-top.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/vertical-left.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/vertical-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/video.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/warning-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/warning.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/wifi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/work-filling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/zhihu-circle-fill.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/zhihu.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/zoom-in.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/assets/svg/zoom-out.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/ui-view/src/components/Cell/cellGroup.tsx: -------------------------------------------------------------------------------- 1 | import React, { PropsWithChildren } from 'react'; 2 | import { View, StyleSheet, Text, ViewProps } from 'react-native'; 3 | import { Theme } from '../../components/Styles/theme'; 4 | 5 | export type CellGroupProps = ViewProps & { 6 | // 标题 7 | title?: string; 8 | // 背景色 9 | backgroundColor?: string; 10 | }; 11 | 12 | const CellGroup: React.FC> = props => { 13 | const { title, backgroundColor = Theme.fillBody, style, children, ...rest } = props; 14 | return ( 15 | 16 | {!!title && ( 17 | 18 | {title} 19 | 20 | )} 21 | {children} 22 | 23 | ); 24 | }; 25 | 26 | const styles = StyleSheet.create({ 27 | title: { 28 | paddingHorizontal: 15, 29 | justifyContent: 'center', 30 | height: 40, 31 | }, 32 | titleText: { 33 | fontSize: 16, 34 | color: Theme.colorTextGray, 35 | }, 36 | }); 37 | 38 | export default CellGroup; 39 | -------------------------------------------------------------------------------- /packages/ui-view/src/components/ImageCropper/index.web.tsx: -------------------------------------------------------------------------------- 1 | import React, { PropsWithChildren } from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | export type ImageCropperProps = { 5 | // 需要裁剪的图标地址,仅接受链接地址 6 | uri: string; 7 | // 是否可见 8 | visible: boolean; 9 | // 裁剪目标大小 10 | destSize?: { width: number; height: number }; 11 | // 取消文案,默认“取消” 12 | cancelText?: string; 13 | // 确认文案,默认“确定” 14 | okText?: string; 15 | // 确认回调 16 | onConfirm: (uri: string) => void; 17 | // 关闭回调 18 | onClose: () => void; 19 | }; 20 | 21 | const ImageCropper: React.FC> = () => { 22 | return ; 23 | }; 24 | 25 | export default ImageCropper; 26 | -------------------------------------------------------------------------------- /packages/ui-view/src/components/Portal/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { PortalGuard, PortalHost } from './host'; 3 | 4 | export const portal = new PortalGuard(); 5 | 6 | export default class Portal extends React.Component { 7 | static add = portal.add; 8 | static remove = portal.remove; 9 | 10 | render() { 11 | return ( 12 | <> 13 | {this.props.children} 14 | 15 | 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/ui-view/src/components/Swiper/swiperItem.tsx: -------------------------------------------------------------------------------- 1 | import React, { PropsWithChildren } from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | export type SwiperItemProps = { 5 | // 宽度 6 | width?: number; 7 | // 圆角值 8 | borderRadius?: number; 9 | }; 10 | 11 | const SwiperItem: React.FC> = props => { 12 | const { width, borderRadius = 8, children } = props; 13 | 14 | // eslint-disable-next-line react-native/no-inline-styles 15 | return {children}; 16 | }; 17 | 18 | export default SwiperItem; 19 | -------------------------------------------------------------------------------- /packages/ui-view/src/lib/react-native-svg-uri/utils.ts: -------------------------------------------------------------------------------- 1 | export const camelCase = (value: string) => value.replace(/-([a-z])/g, g => g[1].toUpperCase()); 2 | 3 | export const camelCaseNodeName = ({ nodeName, nodeValue }: any) => ({ nodeName: camelCase(nodeName), nodeValue }); 4 | 5 | export const removePixelsFromNodeValue = ({ nodeName, nodeValue }: any) => ({ 6 | nodeName, 7 | nodeValue: nodeValue.replace('px', ''), 8 | }); 9 | 10 | export const transformStyle = (nodeName: string, nodeValue: string, fillProp: string) => { 11 | if (nodeName === 'style') { 12 | return nodeValue.split(';').reduce((acc, attribute) => { 13 | const [property, value] = attribute.split(':'); 14 | if (property == '') return acc; 15 | else return { ...acc, [camelCase(property)]: fillProp && property === 'fill' ? fillProp : value }; 16 | }, {}); 17 | } 18 | return null; 19 | }; 20 | 21 | export const getEnabledAttributes = 22 | (enabledAttributes: string[]) => 23 | ({ nodeName }: { nodeName: string }) => 24 | enabledAttributes.includes(nodeName); 25 | -------------------------------------------------------------------------------- /packages/ui-view/src/utils/index.tsx: -------------------------------------------------------------------------------- 1 | export const sleep = (time: number) => { 2 | return new Promise(resolve => { 3 | setTimeout(() => { 4 | resolve(1); 5 | }, time); 6 | }); 7 | }; 8 | 9 | export const typeOf = ( 10 | obj: any, 11 | ): 12 | | 'undefined' 13 | | 'number' 14 | | 'boolean' 15 | | 'string' 16 | | 'function' 17 | | 'regexp' 18 | | 'array' 19 | | 'date' 20 | | 'error' 21 | | 'object' 22 | | 'null' => { 23 | const _toString = Object.prototype.toString; 24 | const _type = { 25 | undefined: 'undefined', 26 | number: 'number', 27 | boolean: 'boolean', 28 | string: 'string', 29 | '[object Function]': 'function', 30 | '[object RegExp]': 'regexp', 31 | '[object Array]': 'array', 32 | '[object Date]': 'date', 33 | '[object Error]': 'error', 34 | }; 35 | // @ts-ignore 36 | return _type[typeof obj] || _type[_toString.call(obj)] || (obj ? 'object' : 'null'); 37 | }; 38 | 39 | export const isEmptyObject = (obj: Record) => { 40 | return !Object.keys(obj).length; 41 | }; 42 | --------------------------------------------------------------------------------