Skip to content

Commit

Permalink
feat(Icon): almost done
Browse files Browse the repository at this point in the history
  • Loading branch information
xinyao27 committed Jun 18, 2019
1 parent 4367aaa commit 2dfe68d
Show file tree
Hide file tree
Showing 873 changed files with 23,167 additions and 45 deletions.
40 changes: 40 additions & 0 deletions packages/fluent-ui-icons/package.json
@@ -0,0 +1,40 @@
{
"name": "@fluent-ui/icons",
"version": "0.0.1",
"description": "Fluent Design System Svg Icon.",
"author": "chenyueban <chenyueban@qq.com>",
"keywords": [
"react",
"fluent-design",
"fluent-ui",
"icons"
],
"main": "build/umd/index.js",
"module": "build/es/index.js",
"repository": {
"type": "git",
"url": "https://github.com/chenyueban/fluent-ui",
"directory": "packages/fluent-ui"
},
"homepage": "https://fluent-ui.com/",
"bugs": {
"url": "https://github.com/chenyueban/fluent-ui/issues"
},
"license": "MIT",
"engines": {
"node": ">=8.0.0"
},
"scripts": {
"prebuild": "rimraf build",
"build": "yarn build:cjs && yarn build:es && yarn build:umd",
"build:cjs": "cross-env NODE_ENV=production tsc --module CommonJS --outDir ./build/cjs",
"build:es": "cross-env NODE_ENV=production tsc --module ES6 --outDir ./build/es",
"build:umd": "cross-env NODE_ENV=production tsc --module UMD --outDir ./build/umd",
"start": "cross-env NODE_ENV=production tsc -w --module ES6 --outDir ./build/es"
},
"peerDependencies": {
"react": ">= 16.8.0",
"react-dom": ">= 16.8.0",
"styled-components": ">= 4.X"
}
}
34 changes: 34 additions & 0 deletions packages/fluent-ui-icons/src/Icon.tsx
@@ -0,0 +1,34 @@
import React, { forwardRef, ReactElement, Ref } from 'react'
import styled from 'styled-components'
import * as Icons from './element'
import { omit } from './utils'

interface IconProps {
type: string
}

const SvgIconStyled = styled.svg`
width: 1em;
height: 1em;
display: inline-block;
user-select: none;
font-size: 1.5rem;
color: inherit;
fill: currentColor;
`

const Icon = forwardRef<{}, IconProps>(
({ type }: IconProps, ref: Ref<any>): ReactElement => {
const vdom = (Icons as any)[type]
const d = vdom.props.children.props.d
return (
<SvgIconStyled ref={ref} {...omit(vdom.props, ['children'])}>
<path d={d} />
</SvgIconStyled>
)
}
)

Icon.displayName = 'FIcon'

export default Icon
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/Accident.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M10 20q0.422 0 0.781 0.156t0.633 0.43 0.43 0.633 0.156 0.781-0.156 0.781-0.43 0.633-0.633 0.43-0.781 0.156-0.781-0.156-0.633-0.43-0.43-0.633-0.156-0.781 0.156-0.781 0.43-0.633 0.633-0.43 0.781-0.156zM22 8q0.422 0 0.781 0.156t0.633 0.43 0.43 0.633 0.156 0.781-0.156 0.781-0.43 0.633-0.633 0.43-0.781 0.156-0.781-0.156-0.633-0.43-0.43-0.633-0.156-0.781 0.156-0.781 0.43-0.633 0.633-0.43 0.781-0.156zM31.406 12.016q0.594 0.563 0.594 1.359 0 0.375-0.141 0.719t-0.406 0.609l-1.234 1.25q-0.266 0.266-0.617 0.406t-0.711 0.141q-0.813 0-1.375-0.594l-11.609 11.609q0.594 0.563 0.594 1.375 0 0.359-0.141 0.711t-0.406 0.617l-1.25 1.234q-0.547 0.547-1.313 0.547-0.813 0-1.375-0.594l-0.016 0.016q-0.344-0.359-0.703-0.711t-0.719-0.695v-0.016l-3.609-3.609q-0.266-0.266-0.492-0.469t-0.438-0.406-0.422-0.422-0.445-0.5q-0.016-0.016-0.203-0.391l-0.859-1.719t-0.234-0.484h-1.469l-0.703 0.703-1.406-1.406 1.297-1.297h1.297l-2.266-4.516q-0.313-0.625-0.469-1.203t-0.156-1.281q0-0.438 0.078-0.945t0.242-1.008 0.398-0.953 0.563-0.766l8.094-8.047q0.313-0.313 0.758-0.555t0.938-0.406 0.992-0.242 0.938-0.078q0.703 0 1.281 0.156t1.203 0.469l4.516 2.266v-1.297l1.297-1.297 1.406 1.406-0.703 0.703v1.469q0.078 0.031 0.484 0.234l1.719 0.859t0.391 0.203q0.281 0.234 0.5 0.453t0.422 0.43 0.406 0.43 0.469 0.484l3.609 3.609h0.016q0.344 0.359 0.695 0.719t0.711 0.703zM2 13q0 0.453 0.094 0.797t0.297 0.75l1.891 3.766 14.031-14.031-3.797-1.906q-0.375-0.188-0.734-0.281t-0.781-0.094q-0.266 0-0.578 0.047t-0.633 0.148-0.602 0.242-0.469 0.328l-7.953 7.906q-0.188 0.188-0.336 0.477t-0.242 0.617-0.141 0.648-0.047 0.586zM17.5 23.078l5.578-5.578-0.125-0.125-2.188-0.734-4.125 4.125 0.734 2.188zM24.5 16.094q1.031-1.031 2.039-2.047t2.039-2.047l-3.453-3.453q-0.25-0.25-0.445-0.469t-0.391-0.422-0.398-0.406-0.484-0.422q-0.016-0.016-0.242-0.133t-0.563-0.281-0.727-0.359-0.742-0.367-0.609-0.305-0.32-0.164l-14.984 14.984q0.031 0.063 0.164 0.32t0.305 0.609 0.367 0.742 0.359 0.727 0.281 0.563 0.133 0.242q0.219 0.281 0.422 0.484t0.406 0.398 0.422 0.391 0.469 0.445l3.453 3.453q1.031-1.031 2.047-2.039t2.047-2.039l-0.469-0.453-1.266-3.813 5.875-5.875 3.813 1.266z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/AccidentSolid.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M31.406 12.016q0.594 0.563 0.594 1.359 0 0.375-0.141 0.719t-0.406 0.609l-1.234 1.25q-0.266 0.266-0.617 0.406t-0.711 0.141q-0.813 0-1.375-0.594l-11.609 11.609q0.594 0.563 0.594 1.375 0 0.359-0.141 0.711t-0.406 0.617l-1.25 1.234q-0.547 0.547-1.313 0.547-0.813 0-1.375-0.594l-0.016 0.016q-0.344-0.359-0.703-0.711t-0.719-0.695v-0.016l-3.609-3.609q-0.266-0.266-0.492-0.469t-0.438-0.406-0.422-0.422-0.445-0.5q-0.016-0.016-0.203-0.391l-0.859-1.719t-0.234-0.484h-1.469l-0.703 0.703-1.406-1.406 1.297-1.297h1.297l-2.266-4.516q-0.313-0.625-0.469-1.203t-0.156-1.281q0-0.438 0.078-0.945t0.242-1.008 0.398-0.953 0.563-0.766l8.094-8.047q0.313-0.313 0.758-0.555t0.938-0.406 0.992-0.242 0.938-0.078q0.703 0 1.281 0.156t1.203 0.469l4.516 2.266v-1.297l1.297-1.297 1.406 1.406-0.703 0.703v1.469q0.078 0.031 0.484 0.234l1.719 0.859t0.391 0.203q0.281 0.234 0.5 0.453t0.422 0.43 0.406 0.43 0.469 0.484l3.609 3.609h0.016q0.344 0.359 0.695 0.719t0.711 0.703zM12 22q0-0.422-0.156-0.781t-0.43-0.633-0.633-0.43-0.781-0.156-0.781 0.156-0.633 0.43-0.43 0.633-0.156 0.781 0.156 0.781 0.43 0.633 0.633 0.43 0.781 0.156 0.781-0.156 0.633-0.43 0.43-0.633 0.156-0.781zM22 12q0.422 0 0.781-0.156t0.633-0.43 0.43-0.633 0.156-0.781-0.156-0.781-0.43-0.633-0.633-0.43-0.781-0.156-0.781 0.156-0.633 0.43-0.43 0.633-0.156 0.781 0.156 0.781 0.43 0.633 0.633 0.43 0.781 0.156zM20.5 15.5l-5 5 1 3 7-7zM2 13q0 0.453 0.094 0.797t0.297 0.75l1.891 3.766 14.031-14.031-3.797-1.906q-0.375-0.188-0.734-0.281t-0.781-0.094q-0.266 0-0.578 0.047t-0.633 0.148-0.602 0.242-0.469 0.328l-7.953 7.906q-0.188 0.188-0.336 0.477t-0.242 0.617-0.141 0.648-0.047 0.586z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
24 changes: 24 additions & 0 deletions packages/fluent-ui-icons/src/element/ActionCenter.ts
@@ -0,0 +1,24 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d: 'M0 0h32v26h-10l-6 6-6-6h-10v-26zM30 24v-22h-28v22h8.828l5.172 5.172 5.172-5.172h8.828z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/ActionCenterAsterisk.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M9.828 3.359l-2.828 1.641 2.828 1.641-1 1.719-2.828-1.625v3.266h-2v-3.266l-2.828 1.625-1-1.719 2.828-1.641-2.828-1.641 1-1.719 2.828 1.625v-3.266h2v3.266l2.828-1.625 1 1.719z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/ActionCenterMirrored.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M32 0h-31.998v26h9.999l6 6 6-6h9.999v-26zM2.002 24v-22h27.998v22h-8.828l-5.172 5.172-5.172-5.172h-8.828z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/ActionCenterNotification.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M0 0h32v26h-10l-6 6-6-6h-10v-26zM26 12h-20v2h20v-2zM26 6h-20v2h20v-2zM18 18h-12v2h12v-2z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M32 0h-31.998v26h9.999l6 6 6-6h9.999v-26zM6.002 12h19.999v2h-19.999v-2zM6.002 6h19.999v2h-19.999v-2zM14.001 18h11.999v2h-11.999v-2z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/ActionCenterQuiet.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M32 0v18.578q-0.438-0.484-0.945-0.898t-1.055-0.758v-14.922h-28v22h8.828l6.594 6.578-1.422 1.422-6-6h-10v-26h32zM25.703 18.078q1.328 0.125 2.484 0.719t2 1.523 1.328 2.133 0.484 2.547q0 1.453-0.547 2.727t-1.5 2.227-2.227 1.5-2.727 0.547q-1.172 0-2.242-0.375t-1.953-1.039-1.531-1.594-0.977-2.055q0.172 0.016 0.352 0.039t0.352 0.023q1.453 0 2.727-0.555t2.219-1.5 1.5-2.219 0.555-2.727q0-0.5-0.086-0.977t-0.211-0.945zM25 30q1.031 0 1.945-0.391t1.594-1.070 1.070-1.594 0.391-1.945q0-1.234-0.531-2.25t-1.516-1.766q-0.156 1.344-0.688 2.563t-1.359 2.219-1.93 1.734-2.398 1.125q0.703 0.656 1.578 1.016t1.844 0.359z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M26 18.109q1.281 0.188 2.383 0.797t1.906 1.531 1.258 2.094 0.453 2.469q0 1.453-0.547 2.727t-1.5 2.227-2.227 1.5-2.727 0.547q-1.156 0-2.227-0.367t-1.945-1.023-1.523-1.578-0.977-2.031h0.672q1.453 0 2.727-0.555t2.219-1.5 1.5-2.219 0.555-2.727v-1.891zM25 30q1.031 0 1.945-0.391t1.594-1.070 1.070-1.594 0.391-1.945q0-1.219-0.531-2.258t-1.516-1.758q-0.156 1.344-0.688 2.563t-1.359 2.211-1.93 1.734-2.398 1.133q0.75 0.672 1.586 1.023t1.836 0.352zM32 0v19.344q-0.641-0.797-1.43-1.422t-1.688-1.047-1.883-0.648-2-0.227h-1v4q0 1.031-0.398 1.945t-1.078 1.594-1.586 1.070-1.938 0.391h-3q0 1.422 0.438 2.773t1.281 2.508l-1.719 1.719-6-6h-10v-26h32zM18 18h-12v2h12v-2zM26 12h-20v2h20v-2zM26 6h-20v2h20v-2z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/AddRemoteDevice.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M16 22v2h4v2h-10v-2h4v-2h-6v4h-8v-12h2v-8h26v12h-2v-10h-22v6h4v6h16v2h-8zM6 24v-8h-4v8h4zM28 24h4v2h-4v4h-2v-4h-4v-2h4v-4h2v4z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/AddSurfaceHub.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M28 24h4v2h-4v4h-2v-4h-4v-2h4v-4h2v4zM0 6h32v16h-2v-14h-2v10h-2v-10h-20v16h14v2h-20v-20zM4 24v-16h-2v16h2z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}
25 changes: 25 additions & 0 deletions packages/fluent-ui-icons/src/element/AddTo.ts
@@ -0,0 +1,25 @@
export default {
type: 'svg',
key: null,
ref: null,
props: {
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
width: '32',
height: '32',
viewBox: '0 0 32 32',
children: {
type: 'path',
key: null,
ref: null,
props: {
d:
'M17 15h5v2h-5v5h-2v-5h-5v-2h5v-5h2v5zM16 2q1.938 0 3.727 0.5t3.344 1.414 2.828 2.188 2.188 2.828 1.414 3.344 0.5 3.727-0.5 3.727-1.414 3.344-2.188 2.828-2.828 2.188-3.344 1.414-3.727 0.5-3.727-0.5-3.344-1.414-2.828-2.188-2.188-2.828-1.414-3.344-0.5-3.727 0.5-3.727 1.414-3.344 2.188-2.828 2.828-2.188 3.344-1.414 3.727-0.5zM16 28q1.656 0 3.188-0.43t2.867-1.211 2.43-1.875 1.875-2.43 1.211-2.867 0.43-3.188-0.43-3.188-1.211-2.867-1.875-2.43-2.43-1.875-2.867-1.211-3.188-0.43-3.188 0.43-2.867 1.211-2.43 1.875-1.875 2.43-1.211 2.867-0.43 3.188 0.43 3.188 1.211 2.867 1.875 2.43 2.43 1.875 2.867 1.211 3.188 0.43z'
},
_owner: null,
_store: {}
}
},
_owner: null,
_store: {}
}

0 comments on commit 2dfe68d

Please sign in to comment.