-
-
Notifications
You must be signed in to change notification settings - Fork 693
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58c1187
commit 770d5a7
Showing
35 changed files
with
4,814 additions
and
346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ coverage | |
stats | ||
*.log | ||
packages/**/src/icons/*.js | ||
packages/**/src/icons/*.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,4 @@ Thumbs.db | |
|
||
#npm-yarn | ||
package-lock.json | ||
yarn.lock | ||
src/createElement.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ISC License | ||
|
||
Copyright (c) 2020, Lucide Contributors | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "./node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "dist", | ||
"lib": { | ||
"entryFile": "src/lucide.ts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/lucide-angular/projects/lucide-angular/icons-index.ts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/lucide-angular/projects/lucide-angular/icons/package.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/lucide-angular/projects/lucide-angular/ng-package.json
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
packages/lucide-angular/projects/lucide-angular/package.json
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
packages/lucide-angular/projects/lucide-angular/tslint.json
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
export default ({ componentName, children }) => ` | ||
import { IconData } from '../../lucide'; | ||
import defaultAttributes from '../../default-attributes'; | ||
import { IconData } from './types'; | ||
import defaultAttributes from './constants/default-attributes'; | ||
export const ${componentName}: IconData = [ | ||
const ${componentName}: IconData = [ | ||
'svg', | ||
defaultAttributes, | ||
${JSON.stringify(children)} | ||
]; | ||
export default ${componentName}; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { IconData } from './icons/types' | ||
|
||
/** | ||
* Creates a new SVGElement from icon node | ||
* @param {string} tag | ||
* @param {object} attrs | ||
* @param {array} children | ||
* @returns {SVGElement} | ||
*/ | ||
export const createElement = ([tag, attrs, children = []]: IconData): SVGElement => { | ||
const element = document.createElementNS('http://www.w3.org/2000/svg', tag); | ||
|
||
Object.keys(attrs).forEach(name => { | ||
element.setAttribute(name, attrs[name]); | ||
}); | ||
|
||
if (children.length) { | ||
children.forEach((child: IconData) => { | ||
const childElement = createElement(child); | ||
|
||
element.appendChild(childElement); | ||
}); | ||
} | ||
|
||
return element; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"ngPackage": { | ||
"dest": "dist", | ||
"lib": { | ||
"entryFile": "./index.ts" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type IconNode = readonly [string, object]; | ||
export type IconData = readonly [string, object, IconNode[]? ]; | ||
export type Icons = { [key: string]: IconData } |
6 changes: 3 additions & 3 deletions
6
.../lucide-angular/src/lib/icons.provider.ts → .../lucide-angular/src/lib/icons.provider.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export class Icons { | ||
constructor(private icons: object) {} | ||
} | ||
export class Icons { | ||
constructor(private icons: object) {} | ||
} |
1 change: 0 additions & 1 deletion
1
.../src/lib/lucide-angular.component.spec.ts → .../src/lib/lucide-angular.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.