├── .editorconfig ├── .gitattributes ├── .github ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── dependabot.yml └── workflows │ ├── ci.yml │ ├── dco.yml │ └── release.yml ├── .gitignore ├── .npmrc ├── .watchmanconfig ├── LICENSE ├── README.md ├── SECURITY.md ├── babel.config.js ├── eslint.config.mjs ├── example ├── .bundle │ └── config ├── .ruby-version ├── Gemfile ├── Gemfile.lock ├── android │ ├── app │ │ ├── build.gradle │ │ ├── debug.keystore │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── fonts │ │ │ │ ├── IBMPlexMono-Regular.ttf │ │ │ │ ├── IBMPlexSans-Bold.ttf │ │ │ │ ├── IBMPlexSans-ExtraLight.ttf │ │ │ │ ├── IBMPlexSans-Light.ttf │ │ │ │ ├── IBMPlexSans-Medium.ttf │ │ │ │ ├── IBMPlexSans-Regular.ttf │ │ │ │ ├── IBMPlexSans-SemiBold.ttf │ │ │ │ └── IBMPlexSans-Thin.ttf │ │ │ ├── googleplay-web.png │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── java │ │ │ └── com │ │ │ │ └── ibm │ │ │ │ └── design │ │ │ │ └── carbon │ │ │ │ └── mobile │ │ │ │ ├── MainActivity.kt │ │ │ │ └── MainApplication.kt │ │ │ └── res │ │ │ ├── drawable │ │ │ └── rn_edit_text_material.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher_background.png │ │ │ └── ic_launcher_foreground.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── link-assets-manifest.json │ └── settings.gradle ├── babel.config.js ├── index.js ├── ios │ ├── .xcode.env │ ├── .xcode.env.local │ ├── CarbonReactNativeExample-Bridging-Header.h │ ├── CarbonReactNativeExample.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── CarbonReactNativeExample.xcscheme │ ├── CarbonReactNativeExample.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── CarbonReactNativeExample │ │ ├── AppDelegate.swift │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── AppIcon_1024x1024@1x.png │ │ │ │ ├── AppIcon_20x20@2x-1.png │ │ │ │ ├── AppIcon_20x20@2x.png │ │ │ │ ├── AppIcon_20x20@3x.png │ │ │ │ ├── AppIcon_29x29@2x-1.png │ │ │ │ ├── AppIcon_29x29@2x.png │ │ │ │ ├── AppIcon_29x29@3x.png │ │ │ │ ├── AppIcon_40x40@2x-1.png │ │ │ │ ├── AppIcon_40x40@2x.png │ │ │ │ ├── AppIcon_40x40@3x.png │ │ │ │ ├── AppIcon_60x60@2x.png │ │ │ │ ├── AppIcon_60x60@3x.png │ │ │ │ ├── AppIcon_76x76@2x.png │ │ │ │ ├── AppIcon_83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── iTunesArtwork.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── iTunesArtwork.png │ │ │ └── splash_background.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── background.png │ │ ├── Info.plist │ │ ├── LaunchScreen.storyboard │ │ └── PrivacyInfo.xcprivacy │ ├── Podfile │ ├── Podfile.lock │ └── link-assets-manifest.json ├── metro.config.js ├── package-lock.json ├── package.json ├── react-native.config.js └── src │ ├── App.tsx │ ├── Views │ ├── AcceptsTerms.tsx │ ├── Accordion.tsx │ ├── ActionSheet.tsx │ ├── BottomNavigationBar.tsx │ ├── BottomToolbar.tsx │ ├── BottomToolbarPrimaryAction.tsx │ ├── Button.tsx │ ├── Checkbox.tsx │ ├── ComponentList.tsx │ ├── ContentSwitcher.tsx │ ├── DataTable.tsx │ ├── DateInput.tsx │ ├── DocumentViewer.tsx │ ├── Dropdown.tsx │ ├── ErrorState.tsx │ ├── FileUploaderItem.tsx │ ├── FormItem.tsx │ ├── GrantPermission.tsx │ ├── Icons.tsx │ ├── LandingView.tsx │ ├── Link.tsx │ ├── List.tsx │ ├── Loading.tsx │ ├── Login.tsx │ ├── LoginCreateAccount.tsx │ ├── LoginCreatePassword.tsx │ ├── LoginForgotPassword.tsx │ ├── Menu.tsx │ ├── Modal.tsx │ ├── NavigationList.tsx │ ├── Notification.tsx │ ├── NumberInput.tsx │ ├── Overlay.tsx │ ├── OverrideTheme.tsx │ ├── Pagination.tsx │ ├── PasswordInput.tsx │ ├── ProgressIndicator.tsx │ ├── RadioButton.tsx │ ├── RealLandingView.tsx │ ├── Resources.tsx │ ├── Search.tsx │ ├── Slider.tsx │ ├── Tabs.tsx │ ├── Tag.tsx │ ├── Text.tsx │ ├── TextArea.tsx │ ├── TextInput.tsx │ ├── Tile.tsx │ ├── Toggle.tsx │ ├── Tooltip.tsx │ ├── TopNavigationBar.tsx │ ├── TopNavigationBarLogin.tsx │ ├── UiPanel.tsx │ ├── ViewWrapper.tsx │ └── WebHeader.tsx │ ├── assets │ ├── app_icon.png │ ├── companyImage.png │ ├── components │ │ ├── button-dark.png │ │ └── button-light.png │ ├── productImage.png │ └── react.png │ ├── constants │ ├── privacyPolicy.ts │ ├── termsConditions.ts │ ├── testDocument.ts │ ├── thirdPartyNotices.ts │ └── versionCode.ts │ └── react-app-env.d.ts ├── lefthook.yml ├── package-lock.json ├── package.json ├── scripts └── bump-example.js ├── src ├── __tests__ │ └── index.test.tsx ├── assets │ └── fonts │ │ ├── IBMPlexMono-Regular.ttf │ │ ├── IBMPlexSans-Bold.ttf │ │ ├── IBMPlexSans-ExtraLight.ttf │ │ ├── IBMPlexSans-Light.ttf │ │ ├── IBMPlexSans-Medium.ttf │ │ ├── IBMPlexSans-Regular.ttf │ │ ├── IBMPlexSans-SemiBold.ttf │ │ └── IBMPlexSans-Thin.ttf ├── components │ ├── AcceptTerms │ │ └── index.tsx │ ├── Accordion │ │ └── index.tsx │ ├── ActionSheet │ │ └── index.tsx │ ├── BaseTextInputs │ │ └── index.tsx │ ├── BottomNavigationBar │ │ └── index.tsx │ ├── BottomSafeAreaColorOverride │ │ └── index.tsx │ ├── BottomToolbar │ │ └── index.tsx │ ├── BottomToolbarPrimaryAction │ │ └── index.tsx │ ├── Button │ │ └── index.tsx │ ├── Checkbox │ │ └── index.tsx │ ├── ContentSwitcher │ │ └── index.tsx │ ├── DataTable │ │ ├── DataTable.tsx │ │ ├── DataTableCell.tsx │ │ ├── DataTableHeader.tsx │ │ ├── DataTableHeaderSelected.tsx │ │ ├── DataTableRow.tsx │ │ └── index.tsx │ ├── DateInput │ │ └── index.tsx │ ├── DocumentViewer │ │ └── index.tsx │ ├── Dropdown │ │ └── index.tsx │ ├── ErrorState │ │ ├── access_error.png │ │ ├── empty_error.png │ │ ├── generic_error.png │ │ └── index.tsx │ ├── FileUploaderItem │ │ └── index.tsx │ ├── FormItem │ │ └── index.tsx │ ├── GrantPermission │ │ ├── camera_permission.png │ │ ├── file_permission.png │ │ ├── index.tsx │ │ ├── location_permission.png │ │ └── notifications_permission.png │ ├── InlineLink │ │ └── index.tsx │ ├── LandingView │ │ └── index.tsx │ ├── Link │ │ └── index.tsx │ ├── List │ │ └── index.tsx │ ├── Loading │ │ └── index.tsx │ ├── Menu │ │ └── index.tsx │ ├── MenuItem │ │ └── index.tsx │ ├── Modal │ │ └── index.tsx │ ├── NavigationList │ │ └── index.tsx │ ├── NavigationListItem │ │ └── index.tsx │ ├── Notification │ │ └── index.tsx │ ├── NumberInput │ │ └── index.tsx │ ├── Overlay │ │ └── index.tsx │ ├── Pagination │ │ └── index.tsx │ ├── PasswordInput │ │ └── index.tsx │ ├── ProgressIndicator │ │ └── index.tsx │ ├── RadioButton │ │ └── index.tsx │ ├── SafeAreaWrapper │ │ └── index.tsx │ ├── Search │ │ └── index.tsx │ ├── Slider │ │ └── index.tsx │ ├── Tabs │ │ └── index.tsx │ ├── Tag │ │ └── index.tsx │ ├── Text │ │ └── index.tsx │ ├── TextArea │ │ └── index.tsx │ ├── TextInput │ │ └── index.tsx │ ├── Tile │ │ └── index.tsx │ ├── Toggle │ │ └── index.tsx │ ├── Tooltip │ │ └── index.tsx │ ├── TopNavigationBar │ │ └── index.tsx │ ├── TopNavigationBarLogin │ │ └── index.tsx │ ├── UiPanel │ │ └── index.tsx │ ├── UiPanelItem │ │ └── index.tsx │ ├── ViewWrapper │ │ └── index.tsx │ └── WebHeader │ │ └── index.tsx ├── constants │ ├── constants.ts │ └── defaultText.ts ├── helpers │ └── index.tsx ├── index.tsx ├── react-app-env.d.ts ├── styles │ ├── colors.ts │ ├── typography.ts │ └── z-index.ts └── types │ ├── navigation.ts │ └── shared.ts ├── telemetry.yml ├── tsconfig.build.json ├── tsconfig.json └── typedoc.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | indent_style = space 10 | indent_size = 2 11 | 12 | end_of_line = lf 13 | charset = utf-8 14 | trim_trailing_whitespace = true 15 | insert_final_newline = true 16 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | # specific for windows script files 3 | *.bat text eol=crlf -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @dabrad26 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: 'github-actions' 5 | directory: '/' 6 | schedule: 7 | interval: 'daily' 8 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | branches: 8 | - main 9 | merge_group: 10 | types: [checks_requested] 11 | 12 | concurrency: 13 | group: ${{ github.workflow }}-${{ github.ref }} 14 | cancel-in-progress: true 15 | 16 | jobs: 17 | lint: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@v4 21 | - name: Use Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: '22.x' 25 | - name: Install dependencies 26 | run: npm ci && npm --prefix ./example ci 27 | - name: Lint JavaScript files 28 | run: npm run lint 29 | 30 | typescript: 31 | runs-on: ubuntu-latest 32 | steps: 33 | - uses: actions/checkout@v4 34 | - name: Use Node.js 35 | uses: actions/setup-node@v4 36 | with: 37 | node-version: '22.x' 38 | - name: Install dependencies 39 | run: npm ci && npm --prefix ./example ci 40 | - name: Run typescript 41 | run: npm run typescript 42 | 43 | test: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - uses: actions/checkout@v4 47 | - name: Use Node.js 48 | uses: actions/setup-node@v4 49 | with: 50 | node-version: '22.x' 51 | - uses: actions/cache@v4 52 | id: cache 53 | with: 54 | path: | 55 | node_modules 56 | */**/node_modules 57 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 58 | - name: Install dependencies 59 | run: npm ci && npm --prefix ./example ci 60 | - name: Run tests 61 | run: npm run test --coverage 62 | - name: Archive code coverage results 63 | uses: actions/upload-artifact@v4 64 | with: 65 | name: code-coverage-report 66 | path: coverage 67 | 68 | build: 69 | runs-on: ubuntu-latest 70 | steps: 71 | - uses: actions/checkout@v4 72 | - name: Use Node.js 73 | uses: actions/setup-node@v4 74 | with: 75 | node-version: '22.x' 76 | - uses: actions/cache@v4 77 | id: cache 78 | with: 79 | path: | 80 | node_modules 81 | */**/node_modules 82 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} 83 | - name: Install dependencies 84 | run: npm ci && npm --prefix ./example ci 85 | - name: Build package 86 | run: npm run prepare 87 | -------------------------------------------------------------------------------- /.github/workflows/dco.yml: -------------------------------------------------------------------------------- 1 | name: 'DCO Assistant' 2 | on: 3 | issue_comment: 4 | types: [created] 5 | pull_request_target: 6 | types: [opened, closed, synchronize] 7 | merge_group: 8 | types: [checks_requested] 9 | 10 | jobs: 11 | DCO: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: 'DCO Assistant' 15 | if: (github.event.comment.body == 'recheck' || github.event.comment.body 16 | == 'I have read the DCO document and I hereby sign the DCO.') || 17 | github.event_name == 'pull_request_target' 18 | uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 #2.6.1 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | PERSONAL_ACCESS_TOKEN: ${{ secrets.DCO_PERSONAL_ACCESS_TOKEN }} 22 | with: 23 | path-to-signatures: 'dco-signatures.json' 24 | path-to-document: 'https://github.com/carbon-design-system/carbon-dco/blob/main/dco.md' 25 | branch: 'main' 26 | allowlist: bot* 27 | remote-organization-name: carbon-design-system 28 | remote-repository-name: carbon-dco 29 | create-file-commit-message: 'chore: create file to store dco signatures' 30 | signed-commit-message: 'chore: $contributorName has signed the dco in #$pullRequestNo' 31 | custom-notsigned-prcomment: 32 | 'Thanks for your submission! We ask that $you sign our [Developer 33 | Certificate of 34 | Origin](https://github.com/carbon-design-system/carbon-dco/blob/main/dco.md) 35 | before we can accept your contribution. You can sign the DCO by 36 | adding a comment below using this text:' 37 | custom-pr-sign-comment: 'I have read the DCO document and I hereby sign the DCO.' 38 | custom-allsigned-prcomment: 'All contributors have signed the DCO.' 39 | lock-pullrequest-aftermerge: false 40 | use-dco-flag: true 41 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | jobs: 8 | build: 9 | if: 10 | github.actor != 'carbon-bot' 11 | && !contains(github.event.head_commit.message, 'ci-skip') 12 | name: Create release - Node.js 13 | runs-on: ubuntu-latest 14 | permissions: 15 | contents: read 16 | id-token: write 17 | 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: Use Node.js 25 | uses: actions/setup-node@v4 26 | with: 27 | node-version: '22.14.0' 28 | registry-url: 'https://registry.npmjs.org' 29 | 30 | - name: Install dependencies 31 | run: npm ci && npm --prefix ./example ci 32 | 33 | - name: Configure git 34 | uses: oleksiyrudenko/gha-git-credentials@v2.1 35 | with: 36 | global: true 37 | name: 'David Bradshaw' 38 | email: 'david.bradshaw@ibm.com' 39 | actor: 'david.bradshaw@ibm.com' 40 | token: '${{ secrets.DCO_PERSONAL_ACCESS_TOKEN }}' 41 | 42 | - name: Change git remote to use SSH 43 | run: | 44 | git remote set-url origin git@github.com:carbon-design-system/carbon-react-native.git 45 | 46 | - name: Attach SSH key 47 | uses: webfactory/ssh-agent@v0.9.1 48 | with: 49 | ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} 50 | 51 | - name: Deploy to Github & NPM 🚀 52 | run: | 53 | npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }} 54 | npm run release -- --ci 55 | env: 56 | GITHUB_TOKEN: ${{ secrets.DCO_PERSONAL_ACCESS_TOKEN }} 57 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 58 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # XDE 6 | .expo/ 7 | 8 | # VSCode 9 | .vscode/ 10 | jsconfig.json 11 | 12 | # Xcode 13 | # 14 | build/ 15 | *.pbxuser 16 | !default.pbxuser 17 | *.mode1v3 18 | !default.mode1v3 19 | *.mode2v3 20 | !default.mode2v3 21 | *.perspectivev3 22 | !default.perspectivev3 23 | xcuserdata 24 | *.xccheckout 25 | *.moved-aside 26 | DerivedData 27 | *.hmap 28 | *.ipa 29 | *.xcuserstate 30 | project.xcworkspace 31 | 32 | # Android/IJ 33 | # 34 | .classpath 35 | .cxx 36 | .gradle 37 | .idea 38 | .project 39 | .settings 40 | local.properties 41 | */android/app/release 42 | android.iml 43 | .kotlin 44 | 45 | # Cocoapods 46 | # 47 | example/ios/Pods 48 | 49 | # Ruby 50 | example/vendor/ 51 | 52 | # node.js 53 | # 54 | node_modules/ 55 | npm-debug.log 56 | yarn-debug.log 57 | yarn-error.log 58 | 59 | # BUCK 60 | buck-out/ 61 | \.buckd/ 62 | android/app/libs 63 | android/keystores/debug.keystore 64 | 65 | # Expo 66 | .expo/* 67 | 68 | # generated by bob 69 | lib/ 70 | 71 | # Documentation 72 | /docs 73 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true 2 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 1.x | :white_check_mark: | 8 | 9 | These supported versions include the different discrete version numbers of 10 | individual packages as listed in the 11 | [release changelogs](https://github.com/carbon-design-system/carbon-react-native/releases). 12 | 13 | ## Reporting a Vulnerability 14 | 15 | _Please do not report security vulnerabilities through public GitHub issues._ 16 | 17 | Instead, report a vulnerability through GitHub's security advisory feature at 18 | https://github.com/carbon-design-system/carbon-react-native/security/advisories/new 19 | 20 | Please include a description of the issue, the steps you took to create the 21 | issue, affected versions, and, if known, mitigations for the issue. Our team 22 | aims to respond to all new vulnerability reports within 7 business days. 23 | 24 | Additional information on reporting vulnerabilities to IBM is available at 25 | https://www.ibm.com/trust/security-psirt 26 | 27 | ## Preferred languages 28 | 29 | We prefer all communications to be in English. 30 | 31 | ## Comments on this policy 32 | 33 | If you have suggestions on how this process could be improved please 34 | [submit a pull request](https://github.com/carbon-design-system/carbon-react-native/compare) 35 | or [file an issue](https://github.com/carbon-design-system/carbon-react-native/issues/new) to 36 | discuss. 37 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:@react-native/babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import globals from "globals"; 2 | import pluginJs from "@eslint/js"; 3 | import tseslint from "typescript-eslint"; 4 | import pluginReact from "eslint-plugin-react"; 5 | 6 | /** @type {import('eslint').Linter.Config[]} */ 7 | export default [ 8 | {files: ['**/*.{ts,jsx,tsx}']}, 9 | {ignores: ['lib', 'node_modules', '**/*.{js,mjs}']}, 10 | {languageOptions: { globals: globals.browser }}, 11 | pluginJs.configs.recommended, 12 | ...tseslint.configs.recommended, 13 | pluginReact.configs.flat.recommended, 14 | {rules: { 15 | '@typescript-eslint/no-require-imports': 'off', 16 | 'semi': 'error', 17 | "quotes": ["error", "single", {"avoidEscape": true}], 18 | "quote-props": ["error", "as-needed"], 19 | "object-curly-spacing": ["error", "always"], 20 | "array-bracket-spacing": ["error", "never"], 21 | "computed-property-spacing": ["error", "never"], 22 | "no-console": ["error", {"allow": ["warn", "error"]}], 23 | "comma-dangle": ["error", "always-multiline"], 24 | }}, 25 | ]; 26 | -------------------------------------------------------------------------------- /example/.bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /example/.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.5 2 | -------------------------------------------------------------------------------- /example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby '2.7.5' 5 | 6 | # Exclude problematic versions of cocoapods and activesupport that causes build failures. 7 | gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' 8 | gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' 9 | gem 'xcodeproj', '< 1.26.0' 10 | gem 'concurrent-ruby', '< 1.3.4' 11 | 12 | # Ruby 3.4.0 has removed some libraries from the standard library. 13 | gem 'bigdecimal' 14 | gem 'logger' 15 | gem 'benchmark' 16 | gem 'mutex_m' 17 | -------------------------------------------------------------------------------- /example/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | CFPropertyList (3.0.6) 5 | rexml 6 | activesupport (6.1.7.6) 7 | concurrent-ruby (~> 1.0, >= 1.0.2) 8 | i18n (>= 1.6, < 2) 9 | minitest (>= 5.1) 10 | tzinfo (~> 2.0) 11 | zeitwerk (~> 2.3) 12 | addressable (2.8.5) 13 | public_suffix (>= 2.0.2, < 6.0) 14 | algoliasearch (1.27.5) 15 | httpclient (~> 2.8, >= 2.8.3) 16 | json (>= 1.5.1) 17 | atomos (0.1.3) 18 | benchmark (0.1.0) 19 | bigdecimal (2.0.0) 20 | claide (1.1.0) 21 | cocoapods (1.14.3) 22 | addressable (~> 2.8) 23 | claide (>= 1.0.2, < 2.0) 24 | cocoapods-core (= 1.14.3) 25 | cocoapods-deintegrate (>= 1.0.3, < 2.0) 26 | cocoapods-downloader (>= 2.1, < 3.0) 27 | cocoapods-plugins (>= 1.0.0, < 2.0) 28 | cocoapods-search (>= 1.0.0, < 2.0) 29 | cocoapods-trunk (>= 1.6.0, < 2.0) 30 | cocoapods-try (>= 1.1.0, < 2.0) 31 | colored2 (~> 3.1) 32 | escape (~> 0.0.4) 33 | fourflusher (>= 2.3.0, < 3.0) 34 | gh_inspector (~> 1.0) 35 | molinillo (~> 0.8.0) 36 | nap (~> 1.0) 37 | ruby-macho (>= 2.3.0, < 3.0) 38 | xcodeproj (>= 1.23.0, < 2.0) 39 | cocoapods-core (1.14.3) 40 | activesupport (>= 5.0, < 8) 41 | addressable (~> 2.8) 42 | algoliasearch (~> 1.0) 43 | concurrent-ruby (~> 1.1) 44 | fuzzy_match (~> 2.0.4) 45 | nap (~> 1.0) 46 | netrc (~> 0.11) 47 | public_suffix (~> 4.0) 48 | typhoeus (~> 1.0) 49 | cocoapods-deintegrate (1.0.5) 50 | cocoapods-downloader (2.1) 51 | cocoapods-plugins (1.0.0) 52 | nap 53 | cocoapods-search (1.0.1) 54 | cocoapods-trunk (1.6.0) 55 | nap (>= 0.8, < 2.0) 56 | netrc (~> 0.11) 57 | cocoapods-try (1.2.0) 58 | colored2 (3.1.2) 59 | concurrent-ruby (1.2.2) 60 | escape (0.0.4) 61 | ethon (0.16.0) 62 | ffi (>= 1.15.0) 63 | ffi (1.16.3) 64 | fourflusher (2.3.1) 65 | fuzzy_match (2.0.4) 66 | gh_inspector (1.1.3) 67 | httpclient (2.8.3) 68 | i18n (1.14.1) 69 | concurrent-ruby (~> 1.0) 70 | json (2.6.3) 71 | logger (1.4.2) 72 | minitest (5.19.0) 73 | molinillo (0.8.0) 74 | mutex_m (0.1.0) 75 | nanaimo (0.3.0) 76 | nap (1.1.0) 77 | netrc (0.11.0) 78 | public_suffix (4.0.7) 79 | rexml (3.2.6) 80 | ruby-macho (2.5.1) 81 | typhoeus (1.4.1) 82 | ethon (>= 0.9.0) 83 | tzinfo (2.0.6) 84 | concurrent-ruby (~> 1.0) 85 | xcodeproj (1.23.0) 86 | CFPropertyList (>= 2.3.3, < 4.0) 87 | atomos (~> 0.1.3) 88 | claide (>= 1.0.2, < 2.0) 89 | colored2 (~> 3.1) 90 | nanaimo (~> 0.3.0) 91 | rexml (~> 3.2.4) 92 | zeitwerk (2.6.11) 93 | 94 | PLATFORMS 95 | ruby 96 | 97 | DEPENDENCIES 98 | activesupport (>= 6.1.7.5, != 7.1.0) 99 | benchmark 100 | bigdecimal 101 | cocoapods (>= 1.13, != 1.15.1, != 1.15.0) 102 | concurrent-ruby (< 1.3.4) 103 | logger 104 | mutex_m 105 | xcodeproj (< 1.26.0) 106 | 107 | RUBY VERSION 108 | ruby 2.7.5p203 109 | 110 | BUNDLED WITH 111 | 2.1.4 112 | -------------------------------------------------------------------------------- /example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/debug.keystore -------------------------------------------------------------------------------- /example/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 | 12 | -keep class com.facebook.hermes.unicode.** { *; } 13 | -keep class com.facebook.jni.** { *; } 14 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexMono-Regular.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-Bold.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-ExtraLight.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-Light.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-Medium.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-Regular.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-SemiBold.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/assets/fonts/IBMPlexSans-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/assets/fonts/IBMPlexSans-Thin.ttf -------------------------------------------------------------------------------- /example/android/app/src/main/googleplay-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/googleplay-web.png -------------------------------------------------------------------------------- /example/android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/ibm/design/carbon/mobile/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ibm.design.carbon.mobile; 2 | 3 | import com.facebook.react.ReactActivity 4 | import com.facebook.react.ReactActivityDelegate 5 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 6 | import com.facebook.react.defaults.DefaultReactActivityDelegate 7 | 8 | class MainActivity : ReactActivity() { 9 | 10 | /** 11 | * Returns the name of the main component registered from JavaScript. This is used to schedule 12 | * rendering of the component. 13 | */ 14 | override fun getMainComponentName(): String = "CarbonReactNativeExample"; 15 | 16 | /** 17 | * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 18 | * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 19 | */ 20 | override fun createReactActivityDelegate(): ReactActivityDelegate = DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) 21 | } 22 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/ibm/design/carbon/mobile/MainApplication.kt: -------------------------------------------------------------------------------- 1 | package com.ibm.design.carbon.mobile; 2 | 3 | import android.app.Application 4 | import com.facebook.react.PackageList 5 | import com.facebook.react.ReactApplication 6 | import com.facebook.react.ReactHost 7 | import com.facebook.react.ReactNativeHost 8 | import com.facebook.react.ReactPackage 9 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load 10 | import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost 11 | import com.facebook.react.defaults.DefaultReactNativeHost 12 | import com.facebook.react.soloader.OpenSourceMergedSoMapping 13 | import com.facebook.soloader.SoLoader 14 | 15 | class MainApplication : Application(), ReactApplication { 16 | 17 | override val reactNativeHost: ReactNativeHost = 18 | object : DefaultReactNativeHost(this) { 19 | override fun getPackages(): List = 20 | PackageList(this).packages.apply { 21 | // Packages that cannot be autolinked yet can be added manually here, for example: 22 | // add(MyReactNativePackage()) 23 | } 24 | 25 | override fun getJSMainModuleName(): String = "index" 26 | 27 | override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG 28 | 29 | override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED 30 | override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED 31 | } 32 | 33 | override val reactHost: ReactHost 34 | get() = getDefaultReactHost(applicationContext, reactNativeHost) 35 | 36 | override fun onCreate() { 37 | super.onCreate() 38 | SoLoader.init(this, OpenSourceMergedSoMapping) 39 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { 40 | // If you opted-in for the New Architecture, we load the native entry point for this app. 41 | load() 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/rn_edit_text_material.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 22 | 23 | 24 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | CarbonReactNative Example 3 | 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext { 3 | buildToolsVersion = "35.0.0" 4 | minSdkVersion = 24 5 | compileSdkVersion = 35 6 | targetSdkVersion = 35 7 | ndkVersion = "27.1.12297006" 8 | kotlinVersion = "2.0.21" 9 | } 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | dependencies { 15 | classpath("com.android.tools.build:gradle") 16 | classpath("com.facebook.react:react-native-gradle-plugin") 17 | classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") 18 | } 19 | } 20 | 21 | apply plugin: "com.facebook.react.rootproject" 22 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx512m -XX:MaxMetaspaceSize=256m 13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | # AndroidX package structure to make it clearer which packages are bundled with the 21 | # Android operating system, and which are packaged with your app's APK 22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 23 | android.useAndroidX=true 24 | 25 | # Use this property to specify which architecture you want to build. 26 | # You can also override it from the CLI using 27 | # ./gradlew -PreactNativeArchitectures=x86_64 28 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 29 | 30 | # Use this property to enable support to the new architecture. 31 | # This will allow you to use TurboModules and the Fabric render in 32 | # your application. You should enable this flag either if you want 33 | # to write custom TurboModules/Fabric components OR use libraries that 34 | # are providing them. 35 | newArchEnabled=true 36 | 37 | # Use this property to enable or disable the Hermes JS engine. 38 | # If set to false, you will be using JSC instead. 39 | hermesEnabled=true 40 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu May 02 14:24:51 PDT 2024 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip 5 | networkTimeout=10000 6 | validateDistributionUrl=true 7 | zipStoreBase=GRADLE_USER_HOME 8 | zipStorePath=wrapper/dists 9 | -------------------------------------------------------------------------------- /example/android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | @rem SPDX-License-Identifier: Apache-2.0 17 | @rem 18 | 19 | @if "%DEBUG%"=="" @echo off 20 | @rem ########################################################################## 21 | @rem 22 | @rem Gradle startup script for Windows 23 | @rem 24 | @rem ########################################################################## 25 | 26 | @rem Set local scope for the variables with windows NT shell 27 | if "%OS%"=="Windows_NT" setlocal 28 | 29 | set DIRNAME=%~dp0 30 | if "%DIRNAME%"=="" set DIRNAME=. 31 | @rem This is normally unused 32 | set APP_BASE_NAME=%~n0 33 | set APP_HOME=%DIRNAME% 34 | 35 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 36 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 37 | 38 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 39 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 40 | 41 | @rem Find java.exe 42 | if defined JAVA_HOME goto findJavaFromJavaHome 43 | 44 | set JAVA_EXE=java.exe 45 | %JAVA_EXE% -version >NUL 2>&1 46 | if %ERRORLEVEL% equ 0 goto execute 47 | 48 | echo. 1>&2 49 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 50 | echo. 1>&2 51 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 52 | echo location of your Java installation. 1>&2 53 | 54 | goto fail 55 | 56 | :findJavaFromJavaHome 57 | set JAVA_HOME=%JAVA_HOME:"=% 58 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 59 | 60 | if exist "%JAVA_EXE%" goto execute 61 | 62 | echo. 1>&2 63 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 64 | echo. 1>&2 65 | echo Please set the JAVA_HOME variable in your environment to match the 1>&2 66 | echo location of your Java installation. 1>&2 67 | 68 | goto fail 69 | 70 | :execute 71 | @rem Setup the command line 72 | 73 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 74 | 75 | 76 | @rem Execute Gradle 77 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 78 | 79 | :end 80 | @rem End local scope for the variables with windows NT shell 81 | if %ERRORLEVEL% equ 0 goto mainEnd 82 | 83 | :fail 84 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 85 | rem the _cmd.exe /c_ return code! 86 | set EXIT_CODE=%ERRORLEVEL% 87 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 88 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 89 | exit /b %EXIT_CODE% 90 | 91 | :mainEnd 92 | if "%OS%"=="Windows_NT" endlocal 93 | 94 | :omega 95 | -------------------------------------------------------------------------------- /example/android/link-assets-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "migIndex": 1, 3 | "data": [ 4 | { 5 | "path": "../src/assets/fonts/IBMPlexMono-Regular.ttf", 6 | "sha1": "047598848a4bdd7d0071e1fa52f7a02e3c3c186e" 7 | }, 8 | { 9 | "path": "../src/assets/fonts/IBMPlexSans-Bold.ttf", 10 | "sha1": "ac554e892a1dd9e6d608b4858a86fea0aef10aec" 11 | }, 12 | { 13 | "path": "../src/assets/fonts/IBMPlexSans-ExtraLight.ttf", 14 | "sha1": "0f2f7d79b051462c42ccd415fad82b06c1f6fc9a" 15 | }, 16 | { 17 | "path": "../src/assets/fonts/IBMPlexSans-Light.ttf", 18 | "sha1": "012ed6763082fa21f566af32ce97f638321c1384" 19 | }, 20 | { 21 | "path": "../src/assets/fonts/IBMPlexSans-Medium.ttf", 22 | "sha1": "de9962fe775cc845b1a67c04216249f0801b2e5f" 23 | }, 24 | { 25 | "path": "../src/assets/fonts/IBMPlexSans-Regular.ttf", 26 | "sha1": "b8a09e192ea398424f73d3df900447bc6cb5e23b" 27 | }, 28 | { 29 | "path": "../src/assets/fonts/IBMPlexSans-SemiBold.ttf", 30 | "sha1": "edc22f78a540bb9c1174b2c7a00d0cccfb2fca38" 31 | }, 32 | { 33 | "path": "../src/assets/fonts/IBMPlexSans-Thin.ttf", 34 | "sha1": "2f4e001fce166529b72b959f7a7be9214f36f281" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") } 2 | plugins { id("com.facebook.react.settings") } 3 | extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } 4 | rootProject.name = 'CarbonReactNativeExample' 5 | include ':app' 6 | includeBuild('../node_modules/@react-native/gradle-plugin') 7 | -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const pak = require('../package.json'); 3 | 4 | module.exports = { 5 | presets: ['module:@react-native/babel-preset'], 6 | plugins: [ 7 | [ 8 | 'module-resolver', 9 | { 10 | root: ["../"], 11 | alias: { 12 | [pak.name]: path.join(__dirname, '..', pak.source), 13 | }, 14 | }, 15 | ], 16 | ], 17 | }; 18 | -------------------------------------------------------------------------------- /example/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import App from './src/App'; 3 | 4 | AppRegistry.registerComponent('CarbonReactNativeExample', () => App); 5 | -------------------------------------------------------------------------------- /example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | export NODE_BINARY=$(command -v node) 2 | -------------------------------------------------------------------------------- /example/ios/.xcode.env.local: -------------------------------------------------------------------------------- 1 | export NODE_BINARY=/usr/local/bin/node 2 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample.xcodeproj/xcshareddata/xcschemes/CarbonReactNativeExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 42 | 44 | 50 | 51 | 52 | 53 | 59 | 61 | 67 | 68 | 69 | 70 | 72 | 73 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import React 3 | import React_RCTAppDelegate 4 | import ReactAppDependencyProvider 5 | 6 | @main 7 | class AppDelegate: UIResponder, UIApplicationDelegate { 8 | var window: UIWindow? 9 | 10 | var reactNativeDelegate: ReactNativeDelegate? 11 | var reactNativeFactory: RCTReactNativeFactory? 12 | 13 | func application( 14 | _ application: UIApplication, 15 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil 16 | ) -> Bool { 17 | let delegate = ReactNativeDelegate() 18 | let factory = RCTReactNativeFactory(delegate: delegate) 19 | delegate.dependencyProvider = RCTAppDependencyProvider() 20 | 21 | reactNativeDelegate = delegate 22 | reactNativeFactory = factory 23 | 24 | window = UIWindow(frame: UIScreen.main.bounds) 25 | 26 | factory.startReactNative( 27 | withModuleName: "CarbonReactNativeExample", 28 | in: window, 29 | launchOptions: launchOptions 30 | ) 31 | 32 | return true 33 | } 34 | } 35 | 36 | class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate { 37 | override func sourceURL(for bridge: RCTBridge) -> URL? { 38 | self.bundleURL() 39 | } 40 | 41 | override func bundleURL() -> URL? { 42 | #if DEBUG 43 | RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") 44 | #else 45 | Bundle.main.url(forResource: "main", withExtension: "jsbundle") 46 | #endif 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@2x-1.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_20x20@3x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@2x-1.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_29x29@3x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@2x-1.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_40x40@3x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_60x60@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_60x60@3x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_76x76@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/AppIcon_83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon_20x20@2x.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "AppIcon_20x20@3x.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "AppIcon_29x29@2x.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "AppIcon_29x29@3x.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "AppIcon_40x40@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "AppIcon_40x40@3x.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "AppIcon_60x60@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "AppIcon_60x60@3x.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "idiom" : "ipad", 53 | "scale" : "1x", 54 | "size" : "20x20" 55 | }, 56 | { 57 | "filename" : "AppIcon_20x20@2x-1.png", 58 | "idiom" : "ipad", 59 | "scale" : "2x", 60 | "size" : "20x20" 61 | }, 62 | { 63 | "idiom" : "ipad", 64 | "scale" : "1x", 65 | "size" : "29x29" 66 | }, 67 | { 68 | "filename" : "AppIcon_29x29@2x-1.png", 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "29x29" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "40x40" 77 | }, 78 | { 79 | "filename" : "AppIcon_40x40@2x-1.png", 80 | "idiom" : "ipad", 81 | "scale" : "2x", 82 | "size" : "40x40" 83 | }, 84 | { 85 | "idiom" : "ipad", 86 | "scale" : "1x", 87 | "size" : "76x76" 88 | }, 89 | { 90 | "filename" : "AppIcon_76x76@2x.png", 91 | "idiom" : "ipad", 92 | "scale" : "2x", 93 | "size" : "76x76" 94 | }, 95 | { 96 | "filename" : "AppIcon_83.5x83.5@2x.png", 97 | "idiom" : "ipad", 98 | "scale" : "2x", 99 | "size" : "83.5x83.5" 100 | }, 101 | { 102 | "filename" : "AppIcon_1024x1024@1x.png", 103 | "idiom" : "ios-marketing", 104 | "scale" : "1x", 105 | "size" : "1024x1024" 106 | } 107 | ], 108 | "info" : { 109 | "author" : "xcode", 110 | "version" : 1 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/iTunesArtwork.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "iTunesArtwork.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/iTunesArtwork.imageset/iTunesArtwork.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/splash_background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "background.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Images.xcassets/splash_background.imageset/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carbon-design-system/carbon-react-native/883b6c64881ff79867f363a7123d7c4c59bb02a2/example/ios/CarbonReactNativeExample/Images.xcassets/splash_background.imageset/background.png -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | IBM Carbon 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 31 25 | ITSAppUsesNonExemptEncryption 26 | 27 | LSRequiresIPhoneOS 28 | 29 | NSAppTransportSecurity 30 | 31 | NSAllowsArbitraryLoads 32 | 33 | NSAllowsLocalNetworking 34 | 35 | 36 | NSLocationWhenInUseUsageDescription 37 | 38 | UIAppFonts 39 | 40 | IBMPlexMono-Regular.ttf 41 | IBMPlexSans-Bold.ttf 42 | IBMPlexSans-ExtraLight.ttf 43 | IBMPlexSans-Light.ttf 44 | IBMPlexSans-Medium.ttf 45 | IBMPlexSans-Regular.ttf 46 | IBMPlexSans-SemiBold.ttf 47 | IBMPlexSans-Thin.ttf 48 | 49 | UILaunchStoryboardName 50 | LaunchScreen 51 | UIRequiredDeviceCapabilities 52 | 53 | arm64 54 | 55 | UISupportedInterfaceOrientations 56 | 57 | UIInterfaceOrientationPortrait 58 | UIInterfaceOrientationLandscapeLeft 59 | UIInterfaceOrientationLandscapeRight 60 | UIInterfaceOrientationPortraitUpsideDown 61 | 62 | UIViewControllerBasedStatusBarAppearance 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /example/ios/CarbonReactNativeExample/PrivacyInfo.xcprivacy: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSPrivacyAccessedAPITypes 6 | 7 | 8 | NSPrivacyAccessedAPIType 9 | NSPrivacyAccessedAPICategoryFileTimestamp 10 | NSPrivacyAccessedAPITypeReasons 11 | 12 | C617.1 13 | 14 | 15 | 16 | NSPrivacyAccessedAPIType 17 | NSPrivacyAccessedAPICategoryUserDefaults 18 | NSPrivacyAccessedAPITypeReasons 19 | 20 | CA92.1 21 | 22 | 23 | 24 | NSPrivacyAccessedAPIType 25 | NSPrivacyAccessedAPICategorySystemBootTime 26 | NSPrivacyAccessedAPITypeReasons 27 | 28 | 35F9.1 29 | 30 | 31 | 32 | NSPrivacyCollectedDataTypes 33 | 34 | NSPrivacyTracking 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Resolve react_native_pods.rb with node to allow for hoisting 2 | require Pod::Executable.execute_command('node', ['-p', 3 | 'require.resolve( 4 | "react-native/scripts/react_native_pods.rb", 5 | {paths: [process.argv[1]]}, 6 | )', __dir__]).strip 7 | 8 | platform :ios, min_ios_version_supported 9 | prepare_react_native_project! 10 | 11 | linkage = ENV['USE_FRAMEWORKS'] 12 | if linkage != nil 13 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green 14 | use_frameworks! :linkage => linkage.to_sym 15 | end 16 | 17 | target 'CarbonReactNativeExample' do 18 | config = use_native_modules! 19 | 20 | use_react_native!( 21 | :path => config[:reactNativePath], 22 | # An absolute path to your application root. 23 | :app_path => "#{Pod::Config.instance.installation_root}/.." 24 | ) 25 | 26 | post_install do |installer| 27 | # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 28 | react_native_post_install( 29 | installer, 30 | config[:reactNativePath], 31 | :mac_catalyst_enabled => false, 32 | # :ccache_enabled => true 33 | ) 34 | 35 | installer.pods_project.targets.each do |target| 36 | target.build_configurations.each do |config| 37 | config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO' 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /example/ios/link-assets-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "migIndex": 1, 3 | "data": [ 4 | { 5 | "path": "../src/assets/fonts/IBMPlexMono-Regular.ttf", 6 | "sha1": "047598848a4bdd7d0071e1fa52f7a02e3c3c186e" 7 | }, 8 | { 9 | "path": "../src/assets/fonts/IBMPlexSans-Bold.ttf", 10 | "sha1": "ac554e892a1dd9e6d608b4858a86fea0aef10aec" 11 | }, 12 | { 13 | "path": "../src/assets/fonts/IBMPlexSans-ExtraLight.ttf", 14 | "sha1": "0f2f7d79b051462c42ccd415fad82b06c1f6fc9a" 15 | }, 16 | { 17 | "path": "../src/assets/fonts/IBMPlexSans-Light.ttf", 18 | "sha1": "012ed6763082fa21f566af32ce97f638321c1384" 19 | }, 20 | { 21 | "path": "../src/assets/fonts/IBMPlexSans-Medium.ttf", 22 | "sha1": "de9962fe775cc845b1a67c04216249f0801b2e5f" 23 | }, 24 | { 25 | "path": "../src/assets/fonts/IBMPlexSans-Regular.ttf", 26 | "sha1": "b8a09e192ea398424f73d3df900447bc6cb5e23b" 27 | }, 28 | { 29 | "path": "../src/assets/fonts/IBMPlexSans-SemiBold.ttf", 30 | "sha1": "edc22f78a540bb9c1174b2c7a00d0cccfb2fca38" 31 | }, 32 | { 33 | "path": "../src/assets/fonts/IBMPlexSans-Thin.ttf", 34 | "sha1": "2f4e001fce166529b72b959f7a7be9214f36f281" 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /example/metro.config.js: -------------------------------------------------------------------------------- 1 | const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config"); 2 | const path = require("path"); 3 | 4 | /** 5 | * Metro configuration 6 | * https://facebook.github.io/metro/docs/configuration 7 | * 8 | * @type {import('metro-config').MetroConfig} 9 | */ 10 | const extraNodeModules = { 11 | shared: path.resolve(__dirname + "/../src"), 12 | }; 13 | 14 | const watchFolders = [path.resolve(__dirname + "/../src")]; 15 | 16 | const nodeModulesPaths = [path.resolve(path.join(__dirname, "./node_modules"))]; 17 | 18 | const config = { 19 | resolver: { 20 | extraNodeModules, 21 | nodeModulesPaths, 22 | }, 23 | watchFolders, 24 | }; 25 | 26 | module.exports = mergeConfig(getDefaultConfig(__dirname), config); 27 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "carbon-react-native-example", 3 | "description": "Example app for carbon-react-native", 4 | "version": "1.0.0", 5 | "private": true, 6 | "scripts": { 7 | "android": "react-native run-android", 8 | "ios": "react-native run-ios", 9 | "start": "react-native start --reset-cache", 10 | "pods": "pod-install --quiet" 11 | }, 12 | "license": "Apache-2.0", 13 | "dependencies": { 14 | "@carbon/icon-helpers": "^10.55.0", 15 | "@carbon/icons": "^11.56.0", 16 | "@carbon/themes": "^11.47.0", 17 | "@react-native-async-storage/async-storage": "^2.1.2", 18 | "react": "19.0.0", 19 | "react-native": "0.79.2", 20 | "react-native-safe-area-context": "^5.3.0", 21 | "react-native-svg": "^15.11.2", 22 | "react-native-webview": "^13.13.2" 23 | }, 24 | "devDependencies": { 25 | "@babel/core": "^7.25.2", 26 | "@babel/preset-env": "^7.25.3", 27 | "@babel/runtime": "^7.26.10", 28 | "@react-native-community/cli": "18.0.0", 29 | "@react-native-community/cli-platform-android": "18.0.0", 30 | "@react-native-community/cli-platform-ios": "18.0.0", 31 | "@react-native/babel-preset": "0.79.2", 32 | "@react-native/metro-config": "0.79.2", 33 | "@react-native/typescript-config": "0.79.2", 34 | "@tsconfig/react-native": "^3.0.5", 35 | "babel-plugin-module-resolver": "^5.0.2" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /example/react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | project: { 3 | ios: {}, 4 | android: {}, 5 | }, 6 | assets: ['../src/assets/fonts/'], 7 | }; 8 | -------------------------------------------------------------------------------- /example/src/Views/AcceptsTerms.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { StyleSheet, ScrollView, Alert } from 'react-native'; 3 | import { AcceptTerms, Button, Checkbox } from '@carbon/react-native'; 4 | import { testDocument } from '../constants/testDocument'; 5 | 6 | const styles = StyleSheet.create({ 7 | view: { 8 | padding: 16, 9 | flex: 1, 10 | }, 11 | container: { 12 | flexGrow: 1, 13 | paddingBottom: 64, 14 | }, 15 | itemStyle: { 16 | marginTop: 16, 17 | }, 18 | }); 19 | 20 | export default class TestAcceptTerms extends React.Component { 21 | state = { 22 | open: false, 23 | forceIos: false, 24 | forceAndroid: false, 25 | loadSite: false, 26 | }; 27 | 28 | private textStrings = { 29 | agree: 'Agree', 30 | disagree: 'Disagree', 31 | modalTitle: 'Are you sure?', 32 | modalBody: 'The use of this app requires agreement to the terms and conditions.', 33 | modalSecondaryAction: 'Disagree', 34 | modalPrimaryAction: 'Continue', 35 | }; 36 | 37 | private open = (): void => { 38 | this.setState({ open: true }); 39 | }; 40 | 41 | private resultCallback = (result: boolean): void => { 42 | this.setState({ open: false }); 43 | Alert.alert(result ? 'You accepted the terms' : 'You did not accept the terms', result ? 'Your app show save they have accepted and never show again unless terms change.' : 'Your app should exit or return to landing.'); 44 | }; 45 | 46 | render(): React.ReactNode { 47 | const { open, forceIos, forceAndroid, loadSite } = this.state; 48 | let forceType = undefined as 'android' | 'ios' | undefined; 49 | 50 | if (forceAndroid) { 51 | forceType = 'android'; 52 | } else if (forceIos) { 53 | forceType = 'ios'; 54 | } 55 | 56 | return ( 57 | 58 | this.setState({ forceIos: value })} label="Force iOS mode" /> 59 | this.setState({ forceAndroid: value })} label="Force Android mode" /> 60 | this.setState({ loadSite: value })} label="Load website" /> 61 |