Skip to content

Commit 75b294d

Browse files
committed
release: @coreui/icons-react v2.0.0-rc.6
1 parent cb84c69 commit 75b294d

File tree

16 files changed

+696
-0
lines changed

16 files changed

+696
-0
lines changed

packages/icons-react/.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignorePatterns": [".eslintrc.js"]
3+
}

packages/icons-react/.eslintrc.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Copyright (c) 2013-present, creativeLabs Lukasz Holeczek.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
'use strict'
9+
10+
module.exports = {
11+
root: true, // So parent files don't get applied
12+
env: {
13+
es6: true,
14+
browser: true,
15+
node: true,
16+
},
17+
extends: [
18+
'plugin:react/recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'plugin:prettier/recommended',
21+
],
22+
parser: '@typescript-eslint/parser',
23+
parserOptions: {
24+
ecmaVersion: 2020,
25+
sourceType: 'module',
26+
ecmaFeatures: {
27+
jsx: true,
28+
},
29+
},
30+
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
31+
settings: {
32+
react: {
33+
pragma: 'React',
34+
version: 'detect',
35+
},
36+
},
37+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: false,
3+
trailingComma: "all",
4+
singleQuote: true,
5+
printWidth: 100,
6+
tabWidth: 2
7+
};

packages/icons-react/CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### [@coreui/icons-react](https://coreui.io/) changelog
2+
3+
##### `1.1.0`
4+
- chore: update to React 17
5+
6+
##### `1.0.0` - `1.0.3`
7+
- refactor: improve 'unregistered icon' error message
8+
- fix: change 'replaceAll' func to 'replace' due to transpilation error
9+
- test: more coverage
10+
- fix: typings
11+
- fix: tests, lint, export
12+
- refactor: cleanup
13+
- chore: dependencies update
14+
15+
##### `1.0.0-alpha.3`
16+
- test: add missing tests
17+
- refactor: cleanup
18+
- chore: dependencies update and cleanup
19+
20+
##### `1.0.0-alpha.0`
21+
- initial version
22+
23+
install:
24+
```bash
25+
npm install @coreui/icons-react
26+
```
27+
28+
import:
29+
```jsx
30+
import { CIcon, CIconRaw } from '@coreui/icons-react';
31+
import { cifAu } from '@coreui/icons';
32+
```
33+
```scss
34+
@import '~@coreui/icons/css/all.css';
35+
```
36+
37+
usage:
38+
```jsx
39+
...
40+
class CoreUIIcons extends Component {
41+
...
42+
render() {
43+
return (
44+
<CIconRaw name='cifAu' size="2xl"/>
45+
<CIcon name="cil-list" size="2xl"/>
46+
)
47+
}
48+
...
49+
```

packages/icons-react/README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<p align="center">
2+
<a href="https://coreui.io/">
3+
<img src="https://coreui.io/images/brand/coreui-icons.svg" alt="CoreUI Icons logo" height="50">
4+
</a>
5+
</p>
6+
7+
<p align="center">
8+
Official React.js component for CoreUI Icons and CoreUI Icons PRO.
9+
<br>
10+
<a href="https://coreui.io/react/docs/components/icon/"><strong>Explore CoreUI Icons for React docs »</strong></a>
11+
<br>
12+
<br>
13+
<a href="https://github.com/coreui/coreui-icons/issues/new?template=bug_report.md">Report bug</a>
14+
·
15+
<a href="https://github.com/coreui/coreui-icons/issues/new?template=feature_request.md">Request feature</a>
16+
·
17+
<a href="https://community.coreui.io/">Community</a>
18+
·
19+
<a href="https://blog.coreui.io/">Blog</a>
20+
</p>
21+
22+
23+
## Status
24+
[![npm package][npm-badge]][npm]
25+
[![NPM downloads][npm-download]][npm]
26+
![react](https://img.shields.io/badge/react-^17.0.2-lightgrey.svg?style=flat-square&logo=react)
27+
28+
29+
[npm-badge]: https://img.shields.io/npm/v/@coreui/icons-react/latest?style=flat-square
30+
[npm]: https://www.npmjs.com/package/@coreui/icons-react
31+
[npm-download]: https://img.shields.io/npm/dm/@coreui/icons-react.svg?style=flat-square
32+
33+
## Installation
34+
35+
```bash
36+
npm install @coreui/icons
37+
npm install @coreui/icons-react@next
38+
```
39+
40+
or
41+
42+
```bash
43+
yarn add @coreui/icons
44+
yarn add @coreui/icons-react@next
45+
```
46+
47+
## Use
48+
49+
### Single icon
50+
51+
```jsx
52+
import { CIcon } from '@coreui/icons-react';
53+
import { cifAU } from '@coreui/icons';
54+
55+
...
56+
render() {
57+
return (
58+
<CIcon icon={cilList} size="xxl"/>
59+
)
60+
}
61+
...
62+
```
63+
64+
### All icons
65+
66+
```jsx
67+
import { CIcon } from '@coreui/icons-react';
68+
import * as icon from '@coreui/icons';
69+
70+
...
71+
render() {
72+
return (
73+
<CIcon icon={icon.cilList} size="xxl"/>
74+
)
75+
}
76+
...
77+
```
78+
79+
80+
## API
81+
82+
| property | type | description |
83+
| --- | --- | --- |
84+
| className | `string` | A string of all className you want applied to the component. |
85+
| customClassName | `string` \| `object` \| `string[]` | Use for replacing default CIcon component classes. Prop is overriding the 'size' prop. |
86+
| icon | `string` \| `string[]` | Name of the icon placed in React object or SVG content. |
87+
| height | `number` | The height attribute defines the vertical length of an icon. |
88+
| size | `sm` \| `md` \|`lg` \| `xl` \| `xxl` \| `3xl` \| `4xl` \| `5xl` \| `6xl` \| `7xl` \| `8xl` \| `9xl` | Size of the icon. |
89+
| use | `string` | If defined component will be rendered using `use` tag. |
90+
| title | `string` | Title tag content. |
91+
| width | `number` | The width attribute defines the horizontal length of an icon. |

packages/icons-react/package.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"name": "@coreui/icons-react",
3+
"description": "Official React component for CoreUI Icons",
4+
"version": "2.0.0-rc.6",
5+
"license": "MIT",
6+
"homepage": "https://icons.coreui.io",
7+
"author": {
8+
"name": "CoreUI",
9+
"url": "https://coreui.io",
10+
"github": "https://github.com/coreui",
11+
"twitter": "https://twitter.com/core_ui"
12+
},
13+
"contributors": [
14+
{
15+
"name": "CoreUI Team",
16+
"url": "https://github.com/orgs/coreui/people"
17+
}
18+
],
19+
"repository": {
20+
"type": "git",
21+
"url": "https://github.com/coreui/coreui-icons.git"
22+
},
23+
"bugs": {
24+
"url": "https://github.com/coreui/coreui-icons/issues"
25+
},
26+
"main": "dist/index.js",
27+
"module": "dist/index.es.js",
28+
"jsnext:main": "dist/index.es.js",
29+
"typings": "dist/index.d.ts",
30+
"files": [
31+
"dist/",
32+
"README.md"
33+
],
34+
"scripts": {
35+
"build": "rollup -c",
36+
"lint": "eslint \"src/**/*.{js,ts,tsx}\"",
37+
"test": "jest --coverage",
38+
"test:update": "jest --coverage --updateSnapshot"
39+
},
40+
"peerDependencies": {
41+
"react": "^17"
42+
},
43+
"devDependencies": {
44+
"@rollup/plugin-commonjs": "^21.0.0",
45+
"@rollup/plugin-node-resolve": "^13.0.5",
46+
"@rollup/plugin-typescript": "^8.3.0",
47+
"@testing-library/jest-dom": "^5.14.1",
48+
"@testing-library/react": "^12.1.2",
49+
"@types/react": "^17.0.30",
50+
"@types/react-dom": "^17.0.9",
51+
"@typescript-eslint/eslint-plugin": "^5.0.0",
52+
"@typescript-eslint/parser": "^5.0.0",
53+
"classnames": "^2.3.1",
54+
"eslint": "^7.32.0",
55+
"eslint-config-prettier": "^8.3.0",
56+
"eslint-plugin-prettier": "^4.0.0",
57+
"eslint-plugin-react": "^7.26.1",
58+
"eslint-plugin-react-hooks": "^4.2.0",
59+
"jest": "^27.3.0",
60+
"prettier": "^2.4.1",
61+
"prop-types": "^15.7.2",
62+
"react": "^17.0.2",
63+
"react-dom": "^17.0.2",
64+
"rollup": "^2.56.2",
65+
"rollup-plugin-import-css": "^3.0.2",
66+
"rollup-plugin-peer-deps-external": "^2.2.4",
67+
"ts-jest": "^27.0.7",
68+
"typescript": "^4.4.4"
69+
},
70+
"keywords": [
71+
"coreui",
72+
"coreui-icons",
73+
"coreui-react",
74+
"icons",
75+
"svg",
76+
"svg-icons",
77+
"layout",
78+
"component",
79+
"react"
80+
],
81+
"jest": {
82+
"moduleNameMapper": {
83+
"\\.(css|scss)$": "<rootDir>/test/styleMock.js"
84+
},
85+
"preset": "ts-jest",
86+
"testEnvironment": "jsdom",
87+
"testPathIgnorePatterns": [
88+
"dist/"
89+
],
90+
"transform": {
91+
".*\\.(js)$": "ts-jest",
92+
".*\\.(tsx)$": "ts-jest"
93+
}
94+
}
95+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import commonjs from '@rollup/plugin-commonjs'
2+
import external from 'rollup-plugin-peer-deps-external'
3+
import resolve from '@rollup/plugin-node-resolve'
4+
import typescript from '@rollup/plugin-typescript'
5+
import css from 'rollup-plugin-import-css'
6+
import pkg from './package.json'
7+
export default {
8+
input: 'src/index.ts',
9+
output: [
10+
{
11+
file: pkg.main,
12+
format: 'cjs',
13+
exports: 'named',
14+
sourcemap: true,
15+
},
16+
{
17+
file: pkg.module,
18+
format: 'es',
19+
exports: 'named',
20+
sourcemap: true,
21+
},
22+
],
23+
plugins: [
24+
css(),
25+
external(),
26+
resolve(),
27+
typescript({
28+
exclude: ['**/__tests__/**'],
29+
tsconfig: './tsconfig.json',
30+
}),
31+
commonjs({
32+
include: ['../../node_modules/**'],
33+
}),
34+
],
35+
}

0 commit comments

Comments
 (0)