Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .knip.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@
"packages/material-icons": {
"ignore": ["src/NativeVectorIconsMaterialIcons.ts"]
},
"packages/mingcute": {
"ignore": ["src/NativeVectorIconsMingCute.ts"],
"ignoreDependencies": ["mingcute_icon"]
},
"packages/simple-line-icons": {
"ignore": ["src/NativeVectorIconsSimpleLineIcons.ts"],
"ignoreDependencies": ["simple-line-icons"]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ RNVI comes with the following supported icons. You can [search NPM](https://www.
- [`MaterialDesignIcons`](https://pictogrammers.com/library/mdi/) from MaterialDesignIcons.com (v7.4.47 including _7448_ icons)
- [`Octicons`](https://primer.style/foundations/icons) designed by GitHub, Inc. (v19.22.0 with _339_ icons)
- [`Lucide`](https://lucide.dev/) designed by Lucide, (v0.576.0 with _1,639_ icons)
- [`MingCute`](https://www.mingcute.com/) designed by MingCute Design (v2.9.71 with _3,322_ icons)

### No longer maintained upstream

Expand Down
1 change: 1 addition & 0 deletions packages/icon-explorer/configPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = (config) =>
'Ionicons.ttf',
'MaterialDesignIcons.ttf',
'MaterialIcons.ttf',
'MingCute.ttf',
'Octicons.ttf',
'SimpleLineIcons.ttf',
'Zocial.ttf',
Expand Down
1 change: 1 addition & 0 deletions packages/icon-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@react-native-vector-icons/lucide": "workspace:*",
"@react-native-vector-icons/material-design-icons": "workspace:*",
"@react-native-vector-icons/material-icons": "workspace:*",
"@react-native-vector-icons/mingcute": "workspace:*",
"@react-native-vector-icons/octicons": "workspace:*",
"@react-native-vector-icons/simple-line-icons": "workspace:*",
"@react-native-vector-icons/zocial": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/icon-explorer/src/TestMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Ionicons } from '@react-native-vector-icons/ionicons';
import { Lucide } from '@react-native-vector-icons/lucide';
import { MaterialDesignIcons } from '@react-native-vector-icons/material-design-icons';
import { MaterialIcons } from '@react-native-vector-icons/material-icons';
import { MingCute } from '@react-native-vector-icons/mingcute';
import { Octicons } from '@react-native-vector-icons/octicons';
import { SimpleLineIcons } from '@react-native-vector-icons/simple-line-icons';
import { Zocial } from '@react-native-vector-icons/zocial';
Expand Down Expand Up @@ -84,6 +85,7 @@ export const TestMode = () => {
{ Component: Lucide, name: 'house', label: 'Lucide' },
{ Component: MaterialDesignIcons, name: 'home', label: 'MaterialDesignIcons' },
{ Component: MaterialIcons, name: 'home', label: 'MaterialIcons' },
{ Component: MingCute, name: 'home_1_fill', label: 'MingCute' },
{ Component: Octicons, name: 'home', label: 'Octicons' },
{ Component: SimpleLineIcons, name: 'home', label: 'SimpleLineIcons' },
{ Component: Zocial, name: 'email', label: 'Zocial' },
Expand Down
3 changes: 3 additions & 0 deletions packages/icon-explorer/src/icon-sets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import { MaterialDesignIcons } from '@react-native-vector-icons/material-design-
import MaterialDesignIconsGlyphs from '@react-native-vector-icons/material-design-icons/glyphmaps/MaterialDesignIcons.json';
import { MaterialIcons } from '@react-native-vector-icons/material-icons';
import MaterialIconsGlyphs from '@react-native-vector-icons/material-icons/glyphmaps/MaterialIcons.json';
import { MingCute } from '@react-native-vector-icons/mingcute';
import MingCuteGlyphs from '@react-native-vector-icons/mingcute/glyphmaps/MingCute.json';
import { Octicons } from '@react-native-vector-icons/octicons';
import OcticonsGlyphs from '@react-native-vector-icons/octicons/glyphmaps/Octicons.json';
import { SimpleLineIcons } from '@react-native-vector-icons/simple-line-icons';
Expand Down Expand Up @@ -100,6 +102,7 @@ const iconSets = {
glyphNames: groupGlyphNames(MaterialDesignIconsGlyphs),
meta: undefined,
},
MingCute: { component: MingCute, glyphNames: groupGlyphNames(MingCuteGlyphs), meta: undefined },
Octicons: { component: Octicons, glyphNames: groupGlyphNames(OcticonsGlyphs), meta: undefined },
SimpleLineIcons: { component: SimpleLineIcons, glyphNames: groupGlyphNames(SimpleLineIconsGlyphs), meta: undefined },
Zocial: { component: Zocial, glyphNames: groupGlyphNames(ZocialGlyphs), meta: undefined },
Expand Down
20 changes: 20 additions & 0 deletions packages/mingcute/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"generator-react-native-vector-icons": {
"packageName": "mingcute",
"postScriptName": "MingCute",
"fontFileName": "MingCute",
"className": "MingCute",
"upstreamFont": "mingcute_icon",
"buildSteps": {
"glyphmap": {
"location": "../../node_modules/mingcute_icon/font/Mingcute.css",
"mode": "css",
"prefix": ".mgc_"
},
"copyFont": {
"location": "../../node_modules/mingcute_icon/font/MingCute.ttf"
}
},
"versions": [{ "rnvi": "1.0.0", "upstream": "2.9.71" }]
}
}
39 changes: 39 additions & 0 deletions packages/mingcute/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# React Native Vector Icons - Mingcute

Mingcute font for React Native Vector Icons

See the [React Native Vector Icons README](../../README.md) for more details.

## Installation

```sh
npm install @react-native-vector-icons/mingcute
```

## Usage

```jsx
import { MingCute } from '@react-native-vector-icons/mingcute';

// ...

<MingCute name="house" color="#ff0000" size={20} />
```

## Versions

Prior to version 12, the version of this font package tracked the upstream version.

The table below tracks which font version is included in each package version.

| RNVI version | Upstream version |
| ------------ | ---------------- |
| &gt; 12.0.0 | 2.9.71 |

## Contributing

See the [contributing guide](../../CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
69 changes: 69 additions & 0 deletions packages/mingcute/android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// NOTE:This file was generated from packages/generator-react-native-vector-icons/src/app/templates
// If you're contributing to react-native-vector-icons, make the change there, otherwise it'll be lost

def isNewArchitectureEnabled() {
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
}

def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

apply plugin: "com.android.library"
apply plugin: "kotlin-android"

if (isNewArchitectureEnabled()) {
apply plugin: "com.facebook.react"
}

def supportsNamespace() {
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
def major = parsed[0].toInteger()
def minor = parsed[1].toInteger()

// Namespace support was added in 7.3.0
return (major == 7 && minor >= 3) || major >= 8
}

android {
if (supportsNamespace()) {
namespace "com.reactnativevectoricons.mingcute"

sourceSets {
main {
manifest.srcFile "src/main/AndroidManifestNew.xml"
}
}
}

compileSdkVersion safeExtGet('compileSdkVersion', 31)

defaultConfig {
targetSdkVersion safeExtGet('targetSdkVersion', 31)
minSdkVersion safeExtGet('minSdkVersion', 24)
}
}

dependencies {
implementation "com.facebook.react:react-native:+"
}

if (isNewArchitectureEnabled()) {
react {
jsRootDir = file("../src/")
libraryName = "VectorIconsMingCute"
codegenJavaPackageName = "com.reactnativevectoricons.mingcute"
}
}

android.sourceSets.main.assets.srcDirs += file("$buildDir/intermediates/RNVI-mingcute")

task copyFonts(type: Copy) {
from "../fonts"
include "*.ttf"

into "${buildDir}/intermediates/RNVI-mingcute/fonts"
eachFile { println "(RNVI:mingcute) Copying font ${it.file}" }
}

preBuild.dependsOn(copyFonts)
3 changes: 3 additions & 0 deletions packages/mingcute/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.reactnativevectoricons.mingcute">
</manifest>
2 changes: 2 additions & 0 deletions packages/mingcute/android/src/main/AndroidManifestNew.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.reactnativevectoricons.mingcute

import com.facebook.react.TurboReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.module.model.ReactModuleInfoProvider

class VectorIconsMingCutePackage : TurboReactPackage() {
override fun getModule(
name: String,
reactContext: ReactApplicationContext,
): NativeModule? = null

override fun getReactModuleInfoProvider(): ReactModuleInfoProvider =
ReactModuleInfoProvider {
mapOf()
}
}
6 changes: 6 additions & 0 deletions packages/mingcute/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// NOTE:This file was generated from packages/generator-react-native-vector-icons/src/app/templates
// If you're contributing to react-native-vector-icons, make the change there, otherwise it'll be lost

module.exports = {
presets: [['module:react-native-builder-bob/babel-preset', { modules: 'commonjs' }]],
};
Binary file added packages/mingcute/fonts/MingCute.ttf
Binary file not shown.
Loading