Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ead5a81916 | ||
|
|
3d92eb3833 | ||
|
|
8b88ddf07e |
15
icons/mail-check.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="m16 19 2 2 4-4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 368 B |
15
icons/mail-minus.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 15V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="M16 19h6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 362 B |
14
icons/mail-open.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z" />
|
||||
<path d="m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 387 B |
16
icons/mail-plus.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="M19 16v6" />
|
||||
<path d="M16 19h6" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 386 B |
16
icons/mail-question.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="M18 15.28c.2-.4.5-.8.9-1a2.1 2.1 0 0 1 2.6.4c.3.4.5.8.5 1.3 0 1.3-2 2-2 2" />
|
||||
<path d="M20 22v.01" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 458 B |
17
icons/mail-search.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 12.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h7.5" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="M18 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6v0Z" />
|
||||
<circle cx="18" cy="18" r="3" />
|
||||
<path d="m22 22-1.5-1.5" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 460 B |
16
icons/mail-warning.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="M20 14v4" />
|
||||
<path d="M20 22v.01" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 393 B |
16
icons/mail-x.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
<path d="m17 17 4 4" />
|
||||
<path d="m21 17-4 4" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 390 B |
@@ -9,6 +9,6 @@
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" />
|
||||
<polyline points="22,6 12,13 2,6" />
|
||||
<rect x="2" y="4" width="20" height="16" rx="2" />
|
||||
<path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" />
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 318 B |
15
icons/mails.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect x="6" y="4" width="16" height="13" rx="2" />
|
||||
<path d="m22 7-7.1 3.78c-.57.3-1.23.3-1.8 0L6 7" />
|
||||
<path d="M2 8v11c0 1.1.9 2 2 2h14" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 355 B |
10
package.json
@@ -18,7 +18,15 @@
|
||||
"**/react-dom",
|
||||
"**/react-dom/**",
|
||||
"**/react-test-renderer",
|
||||
"**/react-test-renderer/**"
|
||||
"**/react-test-renderer/**",
|
||||
"**/vue",
|
||||
"**/vue/**",
|
||||
"**/vue-template-compiler",
|
||||
"**/vue-template-compiler/**",
|
||||
"**/vue-template-es2015-compiler",
|
||||
"**/vue-template-es2015-compiler/**",
|
||||
"**/@testing-library/vue",
|
||||
"**/@testing-library/vue/**"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"jest": "^26.6.3",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.5.1",
|
||||
"react-dom": "^16.5.1",
|
||||
"react-native": "^0.69.0",
|
||||
"react-native-svg": "^12.0.0"
|
||||
},
|
||||
|
||||
66
packages/lucide-react-native/tests/__mocks__/react-native-svg.js
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
// @flow
|
||||
|
||||
// https://github.com/FormidableLabs/react-native-svg-mock
|
||||
import React from 'react';
|
||||
|
||||
const createComponent = function(name) {
|
||||
const component = (props) => {
|
||||
return React.createElement(name, props, props.children);
|
||||
}
|
||||
|
||||
component.displayName = name;
|
||||
|
||||
return component
|
||||
};
|
||||
|
||||
// Mock all react-native-svg exports
|
||||
// from https://github.com/magicismight/react-native-svg/blob/master/index.js
|
||||
const Svg = createComponent('svg');
|
||||
const Circle = createComponent('circle');
|
||||
const Ellipse = createComponent('ellipse');
|
||||
const G = createComponent('g');
|
||||
const Text = createComponent('text');
|
||||
const TextPath = createComponent('textPath');
|
||||
const TSpan = createComponent('tSpan');
|
||||
const Path = createComponent('path');
|
||||
const Polygon = createComponent('polygon');
|
||||
const Polyline = createComponent('polyline');
|
||||
const Line = createComponent('line');
|
||||
const Rect = createComponent('rect');
|
||||
const Use = createComponent('use');
|
||||
const Image = createComponent('image');
|
||||
const Symbol = createComponent('symbol');
|
||||
const Defs = createComponent('defs');
|
||||
const LinearGradient = createComponent('linearGradient');
|
||||
const RadialGradient = createComponent('radialGradient');
|
||||
const Stop = createComponent('stop');
|
||||
const ClipPath = createComponent('clipPath');
|
||||
const Pattern = createComponent('pattern');
|
||||
const Mask = createComponent('mask');
|
||||
|
||||
export {
|
||||
Svg,
|
||||
Circle,
|
||||
Ellipse,
|
||||
G,
|
||||
Text,
|
||||
TextPath,
|
||||
TSpan,
|
||||
Path,
|
||||
Polygon,
|
||||
Polyline,
|
||||
Line,
|
||||
Rect,
|
||||
Use,
|
||||
Image,
|
||||
Symbol,
|
||||
Defs,
|
||||
LinearGradient,
|
||||
RadialGradient,
|
||||
Stop,
|
||||
ClipPath,
|
||||
Pattern,
|
||||
Mask,
|
||||
};
|
||||
|
||||
export default Svg;
|
||||
@@ -1,5 +1,5 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"48\\" height=\\"48\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"red\\" stroke-width=\\"4\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" class=\\"lucide lucide-grid\\" data-testid=\\"grid-icon\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
|
||||
exports[`Using lucide icon components should adjust the size, stroke color and stroke width 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"48\\" height=\\"48\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"red\\" stroke-width=\\"4\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" data-testid=\\"grid-icon\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
|
||||
|
||||
exports[`Using lucide icon components should render an component 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"currentColor\\" stroke-width=\\"2\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\" class=\\"lucide lucide-grid\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
|
||||
exports[`Using lucide icon components should render an component 1`] = `"<svg xmlns=\\"http://www.w3.org/2000/svg\\" width=\\"24\\" height=\\"24\\" viewBox=\\"0 0 24 24\\" fill=\\"none\\" stroke=\\"currentColor\\" stroke-width=\\"2\\" stroke-linecap=\\"round\\" stroke-linejoin=\\"round\\"><rect x=\\"3\\" y=\\"3\\" width=\\"18\\" height=\\"18\\" rx=\\"2\\" ry=\\"2\\"></rect><line x1=\\"3\\" y1=\\"9\\" x2=\\"21\\" y2=\\"9\\"></line><line x1=\\"3\\" y1=\\"15\\" x2=\\"21\\" y2=\\"15\\"></line><line x1=\\"9\\" y1=\\"3\\" x2=\\"9\\" y2=\\"21\\"></line><line x1=\\"15\\" y1=\\"3\\" x2=\\"15\\" y2=\\"21\\"></line></svg>"`;
|
||||
|
||||
@@ -37,8 +37,6 @@ describe('Using lucide icon components', () => {
|
||||
|
||||
const [icon] = document.getElementsByClassName('my-icon');
|
||||
|
||||
console.log(icon);
|
||||
|
||||
expect(icon).toHaveClass('my-icon')
|
||||
});
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
"@testing-library/vue": "^5.8.2",
|
||||
"@vue/test-utils": "^1.1.2",
|
||||
"@vue/test-utils": "1.3.0",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
"vue": "^2.6.12",
|
||||
"vue": "2.6.14",
|
||||
"vue-jest": "^3.0.7",
|
||||
"vue-template-compiler": "^2.6.12"
|
||||
"vue-template-compiler": "2.6.14"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^2.6.12"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import {render, fireEvent} from '@testing-library/vue'
|
||||
import { Smile } from '../src/icons'
|
||||
|
||||
|
||||
70
tags.json
@@ -360,6 +360,7 @@
|
||||
"baggage-claim": [
|
||||
"baggage",
|
||||
"luggage",
|
||||
"suitcase",
|
||||
"travel",
|
||||
"cart",
|
||||
"trolley"
|
||||
@@ -2471,6 +2472,7 @@
|
||||
"luggage": [
|
||||
"baggage",
|
||||
"luggage",
|
||||
"suitcase",
|
||||
"travel"
|
||||
],
|
||||
"magnet": [
|
||||
@@ -2482,7 +2484,73 @@
|
||||
"mail": [
|
||||
"email",
|
||||
"message",
|
||||
"letter"
|
||||
"letter",
|
||||
"unread"
|
||||
],
|
||||
"mail-check": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"subscribe",
|
||||
"delivered",
|
||||
"success"
|
||||
],
|
||||
"mail-minus": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"remove",
|
||||
"delete"
|
||||
],
|
||||
"mail-open": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"read"
|
||||
],
|
||||
"mail-plus": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"add",
|
||||
"create",
|
||||
"new",
|
||||
"compose"
|
||||
],
|
||||
"mail-question": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"delivery",
|
||||
"undelivered"
|
||||
],
|
||||
"mail-search": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"search"
|
||||
],
|
||||
"mail-warning": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"delivery error"
|
||||
],
|
||||
"mail-x": [
|
||||
"email",
|
||||
"message",
|
||||
"letter",
|
||||
"remove",
|
||||
"delete"
|
||||
],
|
||||
"mails": [
|
||||
"emails",
|
||||
"messages",
|
||||
"letters",
|
||||
"multiple",
|
||||
"mailing list",
|
||||
"newsletter",
|
||||
"copy"
|
||||
],
|
||||
"map": [
|
||||
"location",
|
||||
|
||||