diff --git a/.fatherrc.js b/.fatherrc.js index 501f29c..4ec8a8c 100644 --- a/.fatherrc.js +++ b/.fatherrc.js @@ -1,16 +1,71 @@ -export default { - cjs: 'babel', +const common = { + runtimeHelpers: true, +}; + +const dev = { + entry: ['src/index.ts', 'src/style.ts'], + autoprefixer: { + flexbox: 'no-2009', + }, + esm: 'rollup', + overridesByEntry: { + 'src/index.ts': { + esm: { file: 'index' }, + }, + 'src/style.ts': { + esm: { file: 'icons' }, + }, + }, +}; + +const esm = { + entry: 'src/index.ts', + esm: { + type: 'babel', + }, + lessInBabelMode: false, +}; + +const cjs = { entry: 'src/index.ts', - esm: 'babel', + cjs: { + type: 'babel', + }, + lessInBabelMode: false, +}; + +const umd = { + entry: ['src/index.ts', 'src/style.ts'], + autoprefixer: { + flexbox: 'no-2009', + }, extractCSS: true, - file: 'icons', - lessInBabelMode: true, - runtimeHelpers: true, umd: { globals: { react: 'React', }, minFile: true, - sourcemap: true, + }, + overridesByEntry: { + 'src/index.ts': { + umd: { name: 'ufs', file: 'index' }, + }, + 'src/style.ts': { + umd: { file: 'icons' }, + }, }, }; + +const configMap = { + dev, + esm, + cjs, + umd, +}; + +const buildType = process.env.NODE_ENV === 'development' ? 'dev' : process.env.BUILD_TYPE; + +export default { + ...common, + ...configMap[buildType], +}; \ No newline at end of file diff --git a/.storybook/theme.js b/.storybook/theme.js index 3a07a93..95259a6 100644 --- a/.storybook/theme.js +++ b/.storybook/theme.js @@ -3,7 +3,7 @@ import { getPreferredColorScheme } from '@storybook/theming/dist/esm/utils'; const baseTheme = { fontBase: '"PingFang SC", sans-serif', - brandTitle: 'GrowingIO Design Charts', + brandTitle: 'GrowingIO Design Icons', brandUrl: 'https://www.growingio.com', }; diff --git a/.svgrrc.js b/.svgrrc.js index b0ea2ee..c984436 100644 --- a/.svgrrc.js +++ b/.svgrrc.js @@ -31,6 +31,9 @@ module.exports = { } ] }, + svgProps:{ + focusable:false + }, expandProps: 'end', semi: true, typescript: true, diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 0f3f1bd..5e866d0 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -23,6 +23,6 @@ ## 添加(更新)图标过程 -1. 拿到设计师提供的 `svg` 文件后,检查命名是否规范;线框图标,后缀用 `-outlined`,填充的图标用 `-filled`,如果只存在一种类型 不需要填写后缀; +1. 拿到设计师提供的 `svg` 文件后,检查命名是否规范;线框图标,后缀用 `-outlined`,填充的图标用 `-filled`; 2. 放在 `svgs` 目录下; 3. 运行 `yarn storybook` 预览 Icon。 diff --git a/README.en-US.md b/README.en-US.md index c7107ca..006055c 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -22,11 +22,11 @@ $ yarn add @gio-design/icons ```javascript import React, { ReactDOM } from 'react'; -import { Gear } from '@gio-design/icons'; +import { GearOutlined } from '@gio-design/icons'; ReactDOM.render( <> - + , mountNode ); diff --git a/build-umd b/build-umd new file mode 100755 index 0000000..70b2f21 --- /dev/null +++ b/build-umd @@ -0,0 +1,22 @@ +#!/usr/bin/env node + +const fs = require('fs-extra'); +const util = require('util'); +const { exec } = require('child_process'); +const path = require('path'); + +const execSync = util.promisify(exec); +const getRelativePath = pathStr => path.join(__dirname, pathStr); + +const build = async () => { + console.info('start build umd...'); + + await execSync('father-build'); + await fs.removeSync(getRelativePath('./dist/icons.js')); + await fs.removeSync(getRelativePath('./dist/icons.min.js')); + await fs.moveSync(getRelativePath('./dist/icons.css'), getRelativePath('./dist/index.css')); + await fs.moveSync(getRelativePath('./dist/icons.min.css'), getRelativePath('./dist/index.min.css')); + await fs.removeSync(getRelativePath('./dist/style.d.ts')) +}; + +build(); \ No newline at end of file diff --git a/demos/0.Icons.stories.tsx b/demos/0.Icons.stories.tsx index 5d48384..da8e423 100644 --- a/demos/0.Icons.stories.tsx +++ b/demos/0.Icons.stories.tsx @@ -5,7 +5,8 @@ import CopyToClipboard from 'react-copy-to-clipboard'; import * as allIcons from '../src'; import { categories } from './fields'; import './icons.css'; -import { Search } from '../src'; +import '../src/Wrapper.css' +import { SearchOutlined } from '../src'; export default { title: 'Icons', component: IconList, @@ -24,7 +25,8 @@ interface ItemProps { } interface CategoryProps { icons: string[], - title: string + title: string, + theme?: string, } // const allIcons: { // [key: string]: any; @@ -44,8 +46,9 @@ function Item({ title, icon }: ItemProps) { ); } -function Category({ icons = [], title, ...iconProps }: CategoryProps) { - const items = icons.map(name => allIcons[name] && ); +function Category({ icons = [], title, theme, ...iconProps }: CategoryProps) { + const themeIcons = theme ? icons.filter(i => i.endsWith(theme)) : icons; + const items = themeIcons.map(name => allIcons[name] && ).filter(Boolean); return items?.length > 0 && (

{title}({items?.length})

@@ -54,7 +57,7 @@ function Category({ icons = [], title, ...iconProps }: CategoryProps) { } function filterIcons(iconKeys: string[], kw: string) { if (kw?.trim()) { - return iconKeys.filter((k: string) => k.toLowerCase().includes(kw?.trim())); + return iconKeys.filter((k: string) => k.toLowerCase().replace(/(outlined|filled|twotone)$/i, '').includes(kw?.trim())); } return iconKeys; } @@ -88,7 +91,7 @@ function IconList({ keyword, ...iconProps }: IconListProps) {
setSearchKey(e.target.value)} />
- +
@@ -105,5 +108,26 @@ export const AllIcons = Template.bind({}); AllIcons.args = { color: '', rotating: false, + size: '1em' }; +export const Outlined = Template.bind({}); +Outlined.args = { + color: '', + rotating: false, + theme: 'Outlined' +}; + +export const Filled = Template.bind({}); +Filled.args = { + color: '', + rotating: false, + theme: 'Filled' +}; + +export const TwoTone = Template.bind({}); +TwoTone.args = { + color: '', + rotating: false, + theme: 'TwoTone' +}; \ No newline at end of file diff --git a/demos/1.Examples.stories.tsx b/demos/1.Examples.stories.tsx index c033451..aa4d549 100644 --- a/demos/1.Examples.stories.tsx +++ b/demos/1.Examples.stories.tsx @@ -1,19 +1,17 @@ import React from 'react'; import { Meta, Story } from '@storybook/react/types-6-0'; import { action } from '@storybook/addon-actions'; -import { Gear } from '../src'; +import { GearOutlined } from '../src'; import { IconProps } from '../src/interfaces'; +import '../src/Wrapper.css'; export default { title: 'Examples', - component: Gear, - // decorators: [(Story, context) =>
{Story()}
] + component: GearOutlined, } as Meta; const Template: Story = (args) => - + export const Default = Template.bind({}); Default.args = { diff --git a/demos/fields.ts b/demos/fields.ts index 5c149b7..aafedcb 100644 --- a/demos/fields.ts +++ b/demos/fields.ts @@ -2,65 +2,65 @@ import * as GIOIcons from '../src'; export const all = Object.keys(GIOIcons); const user: string[] = [ - 'user', - 'user-tie', - 'user-search', - 'user-bars', - 'user-tgi', - 'user-group', - 'user-screen', - 'id', - 'user-plus', - 'user-service' + 'user-outlined', + 'user-tie-outlined', + 'user-search-outlined', + 'user-bars-outlined', + 'user-tgi-outlined', + 'user-group-outlined', + 'user-screen-outlined', + 'id-outlined', + 'user-plus-filled', + 'user-service-filled' ] const data: string[] = [ - 'database', - 'data-upload', - 'variable', - 'string', - 'number', - 'boolean', - 'terminal', - 'date', - 'array', - 'sql', - 'line-chart', - 'column-chart', - 'bar-chart', - 'bubble-chart', - 'pie-chart', - 'curve-chart', - 'number-chart', - 'table', - 'mixed-column-chart', - 'mixed-line-chart', - 'calculate', - 'click', - 'gauge', - 'code', - 'condition' + 'database-outlined', + 'data-upload-outlined', + 'variable-outlined', + 'string-outlined', + 'number-outlined', + 'boolean-outlined', + 'terminal-outlined', + 'date-outlined', + 'array-outlined', + 'sql-outlined', + 'line-chart-outlined', + 'column-chart-outlined', + 'bar-chart-outlined', + 'bubble-chart-outlined', + 'pie-chart-outlined', + 'curve-chart-outlined', + 'number-chart-outlined', + 'table-outlined', + 'mixed-column-chart-outlined', + 'mixed-line-chart-outlined', + 'calculate-outlined', + 'click-outlined', + 'gauge-outlined', + 'code-outlined', + 'condition-outlined' ] const platform: string[] = [ - 'mobile', + 'mobile-outlined', 'mobile-filled', - 'desktop', + 'desktop-outlined', 'desktop-filled', - 'tablet', + 'tablet-outlined', 'tablet-filled', - 'browser', - 'browser-key', - 'browser-eye', - 'wechat', + 'browser-outlined', + 'browser-key-outlined', + 'browser-eye-outlined', + 'wechat-outlined', 'wechat-filled', - 'alipay', + 'alipay-outlined', 'alipay-filled', - 'windows', 'windows-filled', - 'apple', + 'windows-outlined', + 'apple-outlined', 'apple-filled', - 'android', + 'android-outlined', 'android-filled', - 'mini-program', + 'mini-program-outlined', 'mini-program-filled' ] diff --git a/demos/icons.css b/demos/icons.css index 1ed660c..137c63b 100644 --- a/demos/icons.css +++ b/demos/icons.css @@ -8,6 +8,8 @@ border-radius: 2px; cursor: pointer; user-select: none; + color: #242E59; + position: relative; } .icon-item-inner-container { @@ -16,11 +18,13 @@ align-items: center; justify-content: center; height: 100%; + transition:all 0.25s ease-in-out; } .icon-item-inner-container > .gio-icon { display: inline-block; margin-bottom: 10px; + transition: transform 0.3s ease-in-out 0s ; } .icon-item-inner-container > .icon-item-title { @@ -37,6 +41,10 @@ .icon-item-container:hover { border: 2px solid #4177f6; + +} +.icon-item-container:hover .gio-icon { + transform: scale(1.4); } .icons-category-title { color: #7b819c; diff --git a/docs/0.Migeration.stories.mdx b/docs/0.Migeration.stories.mdx index 936f6ff..688864b 100644 --- a/docs/0.Migeration.stories.mdx +++ b/docs/0.Migeration.stories.mdx @@ -5,63 +5,63 @@ import { TabsState } from '@storybook/components'; # 名称变更 - 可以先尝试搜索原来的名称 -- 去掉 outlined/twotone/filled 后缀 ## 图标名称变更对照表 | 原名称 | 新名称 | :--- | :---- -| AddCircleOutlined | PlusCircle -| AddSquareOutlined | AddTo -| AppOutlined | Card -| AttributionPropertyOutlined | Transform -| CodelessTrackingOutlined | Write -| DataManagementOutlined | DataGear -| ProductManagementOutlined | CardGear -| DotChartOutlined | BubbleChart -| ElementPropertyOutlined | Click -| EventAnalysisOutlined | ColumnChart -| EventflowOutlined | Route -| EventsPresetOutlined | Cursor -| EventPropertyOutlined | Event -| EventOutlined | Event -| EventsTrackingOutlined | Terminal -| ExplainOutlined | Question -| Filter2Outlined | Sliders -| FlowOutlined | Split -| FoldOutlined | Collapse -| FullScreenOutlined | Expand -| HideOutlined | EyeSlash -| InfoCircleOutlined | Info -| ItemOutlined | Relation -| LeftDoubleOutlined | ArrowsLeft -| FunnelAnalysisOutlined | Funnel -| ListTypeOutlined | Array -| MetricsCustomOutlined | Calculate -| MetricsPresetOutlined | Gauge -| MoreHorizonalOutlined | More -| MoreOutlined | MoreVertical -| MoveOutlined | Drag -| PagePropertyOutlined | Browser -| RightDoubleOutlined | ArrowsRight -| Setting2Outlined | Gears -| SettingOutlined | Gear -| StopWatchOutlined | Clock -| UserSegmentOutlined | UserGroup -| UserOriginOutlined | Compass -| ShrinkOutlined | ZoomMinus -| VirtualPropertyOutlined | Code -| UserCardOutlined | Id -| CleanOutlined | Clear -| DistributionAnalysisOutlined | Sitemap -| DevicePropertyOutlined | Mobile -| NotificationOutlined | Bell -| ProcessCanvasOutlined | Process -| EnlargeOutlined | ZoomPlus -| TgiOutlined | UserTgi +| AddCircleOutlined | PlusCircleOutlined +| AddSquareOutlined | AddToOutlined +| AppOutlined | CardOutlined +| AttributionPropertyOutlined | TransformOutlined +| CodelessTrackingOutlined | WriteOutlined +| DataManagementOutlined | DataGearOutlined +| ProductManagementOutlined | CardGearOutlined +| DotChartOutlined | BubbleChartOutlined +| ElementPropertyOutlined | ClickOutlined +| EventAnalysisOutlined | ColumnChartOutlined +| EventflowOutlined | RouteOutlined +| EventsPresetOutlined | CursorOutlined +| EventPropertyOutlined | EventOutlined +| EventOutlined | EventOutlined +| EventsTrackingOutlined | TerminalOutlined +| ExplainOutlined | QuestionOutlined +| Filter2Outlined | SlidersOutlined +| FlowOutlined | SplitOutlined +| FoldOutlined | CollapseOutlined +| FullScreenOutlined | ExpandOutlined +| HideOutlined | EyeSlashOutlined +| InfoCircleOutlined | InfoOutlined +| ItemOutlined | RelationOutlined +| LeftDoubleOutlined | ArrowsLeftOutlined +| FunnelAnalysisOutlined | FunnelOutlined +| ListTypeOutlined | ArrayOutlined +| MetricsCustomOutlined | CalculateOutlined +| MetricsPresetOutlined | GaugeOutlined +| MoreHorizonalOutlined | MoreOutlined +| MoreOutlined | MoreVerticalOutlined +| MoveOutlined | DragOutlined +| PagePropertyOutlined | BrowserOutlined +| RightDoubleOutlined | ArrowsRightOutlined +| Setting2Outlined | GearsOutlined +| SettingOutlined | GearOutlined +| StopWatchOutlined | ClockOutlined +| UserSegmentOutlined | UserGroupOutlined +| UserOriginOutlined | CompassOutlined +| ShrinkOutlined | ZoomMinusOutlined +| VirtualPropertyOutlined | CodeOutlined +| UserCardOutlined | IdOutlined +| CleanOutlined | ClearOutlined +| DistributionAnalysisOutlined | SitemapOutlined +| DevicePropertyOutlined | MobileOutlined +| NotificationOutlined | BellOutlined +| ProcessCanvasOutlined | ProcessOutlined +| EnlargeOutlined | ZoomPlusOutlined +| TgiOutlined | UserTgiOutlined ## 删除的图标 - ItemPropertyOutlined - MapChartOutlined - LocationRecoveryOutlined +- UsersTwoTone diff --git a/docs/0.QuickStart.stories.mdx b/docs/0.QuickStart.stories.mdx index 7d0efbf..fa2a120 100644 --- a/docs/0.QuickStart.stories.mdx +++ b/docs/0.QuickStart.stories.mdx @@ -30,11 +30,12 @@ $ npm install --save @gio-design/icons ```javascript import React, { ReactDOM } from 'react'; -import { AddTo } from '@gio-design/icons'; +import { AddToOutlined } from '@gio-design/icons'; +import '~@gio-design/icons/dist/index.css'; ReactDOM.render( <> - + , mountNode ); diff --git a/package.json b/package.json index bd9aac8..30cfaf3 100644 --- a/package.json +++ b/package.json @@ -9,14 +9,19 @@ "es" ], "sideEffects": [ - "dist/*" + "dist/*", + "es/*", + "lib/*" ], "main": "lib/index.js", "module": "es/index.js", - "unpkg": "dist/icons.umd.min.js", + "unpkg": "dist/index.min.js", "typings": "dist/index.d.ts", "scripts": { - "build": "father-build", + "build": "yarn run build:esm && yarn run build:cjs && yarn run build:umd", + "build:esm": "cross-env BUILD_TYPE=esm father-build", + "build:cjs": "cross-env BUILD_TYPE=cjs father-build", + "build:umd": "cross-env BUILD_TYPE=umd node ./build-umd", "generate": "svgr --template templates/svgTemplate.ts --out-dir src/icons -- svgs", "preversion": "yarn generate && yarn build", "storybook": "yarn generate && start-storybook -p 6006", @@ -52,8 +57,10 @@ "@types/react-copy-to-clipboard": "^5.0.0", "commitizen": "^4.2.2", "conventional-changelog-cli": "^2.1.1", + "cross-env": "^7.0.3", "cz-conventional-changelog": "^3.3.0", "father-build": "^1.20.4", + "fs-extra": "^10.0.1", "husky": "^7.0.0", "react": "^17.0.1", "react-copy-to-clipboard": "^5.0.2", diff --git a/src/Wrapper.tsx b/src/Wrapper.tsx index 010c322..60dff61 100644 --- a/src/Wrapper.tsx +++ b/src/Wrapper.tsx @@ -1,7 +1,6 @@ import React from 'react'; import type { WrapperProps } from './interfaces'; -import './Wrapper.css'; const Wrapper: React.FC = (props: WrapperProps) => { const { icon, className, rotating, svgName, ...restProps } = props; diff --git a/src/style.ts b/src/style.ts new file mode 100644 index 0000000..b55c222 --- /dev/null +++ b/src/style.ts @@ -0,0 +1 @@ +import './Wrapper.css' \ No newline at end of file diff --git a/svgs/add-to.svg b/svgs/add-to-outlined.svg similarity index 100% rename from svgs/add-to.svg rename to svgs/add-to-outlined.svg diff --git a/svgs/alipay.svg b/svgs/alipay-outlined.svg similarity index 100% rename from svgs/alipay.svg rename to svgs/alipay-outlined.svg diff --git a/svgs/analysis.svg b/svgs/analysis-outlined.svg similarity index 100% rename from svgs/analysis.svg rename to svgs/analysis-outlined.svg diff --git a/svgs/android.svg b/svgs/android-outlined.svg similarity index 100% rename from svgs/android.svg rename to svgs/android-outlined.svg diff --git a/svgs/apple.svg b/svgs/apple-outlined.svg similarity index 100% rename from svgs/apple.svg rename to svgs/apple-outlined.svg diff --git a/svgs/array.svg b/svgs/array-outlined.svg similarity index 100% rename from svgs/array.svg rename to svgs/array-outlined.svg diff --git a/svgs/arrow-down.svg b/svgs/arrow-down-outlined.svg similarity index 100% rename from svgs/arrow-down.svg rename to svgs/arrow-down-outlined.svg diff --git a/svgs/arrow-left.svg b/svgs/arrow-left-outlined.svg similarity index 100% rename from svgs/arrow-left.svg rename to svgs/arrow-left-outlined.svg diff --git a/svgs/arrow-right.svg b/svgs/arrow-right-outlined.svg similarity index 100% rename from svgs/arrow-right.svg rename to svgs/arrow-right-outlined.svg diff --git a/svgs/arrow-up.svg b/svgs/arrow-up-outlined.svg similarity index 100% rename from svgs/arrow-up.svg rename to svgs/arrow-up-outlined.svg diff --git a/svgs/arrows-down.svg b/svgs/arrows-down-outlined.svg similarity index 100% rename from svgs/arrows-down.svg rename to svgs/arrows-down-outlined.svg diff --git a/svgs/arrows-left.svg b/svgs/arrows-left-outlined.svg similarity index 100% rename from svgs/arrows-left.svg rename to svgs/arrows-left-outlined.svg diff --git a/svgs/arrows-right.svg b/svgs/arrows-right-outlined.svg similarity index 100% rename from svgs/arrows-right.svg rename to svgs/arrows-right-outlined.svg diff --git a/svgs/arrows-up.svg b/svgs/arrows-up-outlined.svg similarity index 100% rename from svgs/arrows-up.svg rename to svgs/arrows-up-outlined.svg diff --git a/svgs/bar-chart.svg b/svgs/bar-chart-outlined.svg similarity index 100% rename from svgs/bar-chart.svg rename to svgs/bar-chart-outlined.svg diff --git a/svgs/bars.svg b/svgs/bars-outlined.svg similarity index 100% rename from svgs/bars.svg rename to svgs/bars-outlined.svg diff --git a/svgs/bell.svg b/svgs/bell-outlined.svg similarity index 100% rename from svgs/bell.svg rename to svgs/bell-outlined.svg diff --git a/svgs/boolean.svg b/svgs/boolean-outlined.svg similarity index 100% rename from svgs/boolean.svg rename to svgs/boolean-outlined.svg diff --git a/svgs/browser-eye.svg b/svgs/browser-eye-outlined.svg similarity index 100% rename from svgs/browser-eye.svg rename to svgs/browser-eye-outlined.svg diff --git a/svgs/browser-key.svg b/svgs/browser-key-outlined.svg similarity index 100% rename from svgs/browser-key.svg rename to svgs/browser-key-outlined.svg diff --git a/svgs/browser.svg b/svgs/browser-outlined.svg similarity index 100% rename from svgs/browser.svg rename to svgs/browser-outlined.svg diff --git a/svgs/bubble-chart.svg b/svgs/bubble-chart-outlined.svg similarity index 100% rename from svgs/bubble-chart.svg rename to svgs/bubble-chart-outlined.svg diff --git a/svgs/calculate.svg b/svgs/calculate-outlined.svg similarity index 100% rename from svgs/calculate.svg rename to svgs/calculate-outlined.svg diff --git a/svgs/calendar.svg b/svgs/calendar-outlined.svg similarity index 100% rename from svgs/calendar.svg rename to svgs/calendar-outlined.svg diff --git a/svgs/campaign.svg b/svgs/campaign-outlined.svg similarity index 100% rename from svgs/campaign.svg rename to svgs/campaign-outlined.svg diff --git a/svgs/card-gear.svg b/svgs/card-gear-outlined.svg similarity index 100% rename from svgs/card-gear.svg rename to svgs/card-gear-outlined.svg diff --git a/svgs/card.svg b/svgs/card-outlined.svg similarity index 100% rename from svgs/card.svg rename to svgs/card-outlined.svg diff --git a/svgs/check.svg b/svgs/check-outlined.svg similarity index 100% rename from svgs/check.svg rename to svgs/check-outlined.svg diff --git a/svgs/clear.svg b/svgs/clear-outlined.svg similarity index 100% rename from svgs/clear.svg rename to svgs/clear-outlined.svg diff --git a/svgs/click.svg b/svgs/click-outlined.svg similarity index 100% rename from svgs/click.svg rename to svgs/click-outlined.svg diff --git a/svgs/clock.svg b/svgs/clock-outlined.svg similarity index 100% rename from svgs/clock.svg rename to svgs/clock-outlined.svg diff --git a/svgs/close.svg b/svgs/close-outlined.svg similarity index 100% rename from svgs/close.svg rename to svgs/close-outlined.svg diff --git a/svgs/code.svg b/svgs/code-outlined.svg similarity index 100% rename from svgs/code.svg rename to svgs/code-outlined.svg diff --git a/svgs/collapse.svg b/svgs/collapse-outlined.svg similarity index 100% rename from svgs/collapse.svg rename to svgs/collapse-outlined.svg diff --git a/svgs/column-chart.svg b/svgs/column-chart-outlined.svg similarity index 100% rename from svgs/column-chart.svg rename to svgs/column-chart-outlined.svg diff --git a/svgs/comment.svg b/svgs/comment-outlined.svg similarity index 100% rename from svgs/comment.svg rename to svgs/comment-outlined.svg diff --git a/svgs/compass.svg b/svgs/compass-outlined.svg similarity index 100% rename from svgs/compass.svg rename to svgs/compass-outlined.svg diff --git a/svgs/condition.svg b/svgs/condition-outlined.svg similarity index 100% rename from svgs/condition.svg rename to svgs/condition-outlined.svg diff --git a/svgs/copy.svg b/svgs/copy-outlined.svg similarity index 100% rename from svgs/copy.svg rename to svgs/copy-outlined.svg diff --git a/svgs/cursor.svg b/svgs/cursor-outlined.svg similarity index 100% rename from svgs/cursor.svg rename to svgs/cursor-outlined.svg diff --git a/svgs/curve-chart.svg b/svgs/curve-chart-outlined.svg similarity index 100% rename from svgs/curve-chart.svg rename to svgs/curve-chart-outlined.svg diff --git a/svgs/dashboard.svg b/svgs/dashboard-outlined.svg similarity index 100% rename from svgs/dashboard.svg rename to svgs/dashboard-outlined.svg diff --git a/svgs/data-gear.svg b/svgs/data-gear-outlined.svg similarity index 100% rename from svgs/data-gear.svg rename to svgs/data-gear-outlined.svg diff --git a/svgs/data-upload.svg b/svgs/data-upload-outlined.svg similarity index 100% rename from svgs/data-upload.svg rename to svgs/data-upload-outlined.svg diff --git a/svgs/database.svg b/svgs/database-outlined.svg similarity index 100% rename from svgs/database.svg rename to svgs/database-outlined.svg diff --git a/svgs/date.svg b/svgs/date-outlined.svg similarity index 100% rename from svgs/date.svg rename to svgs/date-outlined.svg diff --git a/svgs/debug.svg b/svgs/debug-outlined.svg similarity index 100% rename from svgs/debug.svg rename to svgs/debug-outlined.svg diff --git a/svgs/delete.svg b/svgs/delete-outlined.svg similarity index 100% rename from svgs/delete.svg rename to svgs/delete-outlined.svg diff --git a/svgs/desktop.svg b/svgs/desktop-outlined.svg similarity index 100% rename from svgs/desktop.svg rename to svgs/desktop-outlined.svg diff --git a/svgs/disable.svg b/svgs/disable-outlined.svg similarity index 100% rename from svgs/disable.svg rename to svgs/disable-outlined.svg diff --git a/svgs/document.svg b/svgs/document-filled.svg similarity index 100% rename from svgs/document.svg rename to svgs/document-filled.svg diff --git a/svgs/down.svg b/svgs/down-filled.svg similarity index 100% rename from svgs/down.svg rename to svgs/down-filled.svg diff --git a/svgs/download.svg b/svgs/download-outlined.svg similarity index 100% rename from svgs/download.svg rename to svgs/download-outlined.svg diff --git a/svgs/drag.svg b/svgs/drag-outlined.svg similarity index 100% rename from svgs/drag.svg rename to svgs/drag-outlined.svg diff --git a/svgs/edit.svg b/svgs/edit-outlined.svg similarity index 100% rename from svgs/edit.svg rename to svgs/edit-outlined.svg diff --git a/svgs/email.svg b/svgs/email-outlined.svg similarity index 100% rename from svgs/email.svg rename to svgs/email-outlined.svg diff --git a/svgs/error.svg b/svgs/error-outlined.svg similarity index 100% rename from svgs/error.svg rename to svgs/error-outlined.svg diff --git a/svgs/event.svg b/svgs/event-outlined.svg similarity index 100% rename from svgs/event.svg rename to svgs/event-outlined.svg diff --git a/svgs/expand.svg b/svgs/expand-outlined.svg similarity index 100% rename from svgs/expand.svg rename to svgs/expand-outlined.svg diff --git a/svgs/extension.svg b/svgs/extension-outlined.svg similarity index 100% rename from svgs/extension.svg rename to svgs/extension-outlined.svg diff --git a/svgs/eye-closed.svg b/svgs/eye-closed-outlined.svg similarity index 100% rename from svgs/eye-closed.svg rename to svgs/eye-closed-outlined.svg diff --git a/svgs/eye.svg b/svgs/eye-outlined.svg similarity index 100% rename from svgs/eye.svg rename to svgs/eye-outlined.svg diff --git a/svgs/eye-slash.svg b/svgs/eye-slash-outlined.svg similarity index 100% rename from svgs/eye-slash.svg rename to svgs/eye-slash-outlined.svg diff --git a/svgs/fast-back.svg b/svgs/fast-back-filled.svg similarity index 100% rename from svgs/fast-back.svg rename to svgs/fast-back-filled.svg diff --git a/svgs/fast-forward.svg b/svgs/fast-forward-filled.svg similarity index 100% rename from svgs/fast-forward.svg rename to svgs/fast-forward-filled.svg diff --git a/svgs/filter.svg b/svgs/filter-outlined.svg similarity index 100% rename from svgs/filter.svg rename to svgs/filter-outlined.svg diff --git a/svgs/folder.svg b/svgs/folder-outlined.svg similarity index 100% rename from svgs/folder.svg rename to svgs/folder-outlined.svg diff --git a/svgs/funnel.svg b/svgs/funnel-outlined.svg similarity index 100% rename from svgs/funnel.svg rename to svgs/funnel-outlined.svg diff --git a/svgs/game.svg b/svgs/game-outlined.svg similarity index 100% rename from svgs/game.svg rename to svgs/game-outlined.svg diff --git a/svgs/gauge.svg b/svgs/gauge-outlined.svg similarity index 100% rename from svgs/gauge.svg rename to svgs/gauge-outlined.svg diff --git a/svgs/gear.svg b/svgs/gear-outlined.svg similarity index 100% rename from svgs/gear.svg rename to svgs/gear-outlined.svg diff --git a/svgs/gears.svg b/svgs/gears-outlined.svg similarity index 100% rename from svgs/gears.svg rename to svgs/gears-outlined.svg diff --git a/svgs/globe.svg b/svgs/globe-outlined.svg similarity index 100% rename from svgs/globe.svg rename to svgs/globe-outlined.svg diff --git a/svgs/home.svg b/svgs/home-outlined.svg similarity index 100% rename from svgs/home.svg rename to svgs/home-outlined.svg diff --git a/svgs/id.svg b/svgs/id-outlined.svg similarity index 100% rename from svgs/id.svg rename to svgs/id-outlined.svg diff --git a/svgs/info.svg b/svgs/info-outlined.svg similarity index 100% rename from svgs/info.svg rename to svgs/info-outlined.svg diff --git a/svgs/left.svg b/svgs/left-filled.svg similarity index 100% rename from svgs/left.svg rename to svgs/left-filled.svg diff --git a/svgs/line-chart.svg b/svgs/line-chart-outlined.svg similarity index 100% rename from svgs/line-chart.svg rename to svgs/line-chart-outlined.svg diff --git a/svgs/link.svg b/svgs/link-outlined.svg similarity index 100% rename from svgs/link.svg rename to svgs/link-outlined.svg diff --git a/svgs/list.svg b/svgs/list-outlined.svg similarity index 100% rename from svgs/list.svg rename to svgs/list-outlined.svg diff --git a/svgs/loading.svg b/svgs/loading-two-tone.svg similarity index 100% rename from svgs/loading.svg rename to svgs/loading-two-tone.svg diff --git a/svgs/lock.svg b/svgs/lock-outlined.svg similarity index 100% rename from svgs/lock.svg rename to svgs/lock-outlined.svg diff --git a/svgs/magic.svg b/svgs/magic-outlined.svg similarity index 100% rename from svgs/magic.svg rename to svgs/magic-outlined.svg diff --git a/svgs/menu.svg b/svgs/menu-outlined.svg similarity index 100% rename from svgs/menu.svg rename to svgs/menu-outlined.svg diff --git a/svgs/mini-program.svg b/svgs/mini-program-outlined.svg similarity index 100% rename from svgs/mini-program.svg rename to svgs/mini-program-outlined.svg diff --git a/svgs/minus-circle.svg b/svgs/minus-circle-outlined.svg similarity index 100% rename from svgs/minus-circle.svg rename to svgs/minus-circle-outlined.svg diff --git a/svgs/minus.svg b/svgs/minus-outlined.svg similarity index 100% rename from svgs/minus.svg rename to svgs/minus-outlined.svg diff --git a/svgs/mixed-column-chart.svg b/svgs/mixed-column-chart-outlined.svg similarity index 100% rename from svgs/mixed-column-chart.svg rename to svgs/mixed-column-chart-outlined.svg diff --git a/svgs/mixed-line-chart.svg b/svgs/mixed-line-chart-outlined.svg similarity index 100% rename from svgs/mixed-line-chart.svg rename to svgs/mixed-line-chart-outlined.svg diff --git a/svgs/mobile.svg b/svgs/mobile-outlined.svg similarity index 100% rename from svgs/mobile.svg rename to svgs/mobile-outlined.svg diff --git a/svgs/more.svg b/svgs/more-outlined.svg similarity index 100% rename from svgs/more.svg rename to svgs/more-outlined.svg diff --git a/svgs/more-vertical.svg b/svgs/more-vertical-outlined.svg similarity index 100% rename from svgs/more-vertical.svg rename to svgs/more-vertical-outlined.svg diff --git a/svgs/network.svg b/svgs/network-outlined.svg similarity index 100% rename from svgs/network.svg rename to svgs/network-outlined.svg diff --git a/svgs/number-chart.svg b/svgs/number-chart-outlined.svg similarity index 100% rename from svgs/number-chart.svg rename to svgs/number-chart-outlined.svg diff --git a/svgs/number.svg b/svgs/number-outlined.svg similarity index 100% rename from svgs/number.svg rename to svgs/number-outlined.svg diff --git a/svgs/open.svg b/svgs/open-outlined.svg similarity index 100% rename from svgs/open.svg rename to svgs/open-outlined.svg diff --git a/svgs/pie-chart.svg b/svgs/pie-chart-outlined.svg similarity index 100% rename from svgs/pie-chart.svg rename to svgs/pie-chart-outlined.svg diff --git a/svgs/pin.svg b/svgs/pin-outlined.svg similarity index 100% rename from svgs/pin.svg rename to svgs/pin-outlined.svg diff --git a/svgs/plus-circle.svg b/svgs/plus-circle-outlined.svg similarity index 100% rename from svgs/plus-circle.svg rename to svgs/plus-circle-outlined.svg diff --git a/svgs/plus.svg b/svgs/plus-outlined.svg similarity index 100% rename from svgs/plus.svg rename to svgs/plus-outlined.svg diff --git a/svgs/process.svg b/svgs/process-outlined.svg similarity index 100% rename from svgs/process.svg rename to svgs/process-outlined.svg diff --git a/svgs/qrcode.svg b/svgs/qrcode-outlined.svg similarity index 100% rename from svgs/qrcode.svg rename to svgs/qrcode-outlined.svg diff --git a/svgs/question.svg b/svgs/question-outlined.svg similarity index 100% rename from svgs/question.svg rename to svgs/question-outlined.svg diff --git a/svgs/quit.svg b/svgs/quit-outlined.svg similarity index 100% rename from svgs/quit.svg rename to svgs/quit-outlined.svg diff --git a/svgs/relation.svg b/svgs/relation-outlined.svg similarity index 100% rename from svgs/relation.svg rename to svgs/relation-outlined.svg diff --git a/svgs/reload.svg b/svgs/reload-outlined.svg similarity index 100% rename from svgs/reload.svg rename to svgs/reload-outlined.svg diff --git a/svgs/right.svg b/svgs/right-filled.svg similarity index 100% rename from svgs/right.svg rename to svgs/right-filled.svg diff --git a/svgs/route.svg b/svgs/route-outlined.svg similarity index 100% rename from svgs/route.svg rename to svgs/route-outlined.svg diff --git a/svgs/save.svg b/svgs/save-outlined.svg similarity index 100% rename from svgs/save.svg rename to svgs/save-outlined.svg diff --git a/svgs/search.svg b/svgs/search-outlined.svg similarity index 100% rename from svgs/search.svg rename to svgs/search-outlined.svg diff --git a/svgs/share.svg b/svgs/share-outlined.svg similarity index 100% rename from svgs/share.svg rename to svgs/share-outlined.svg diff --git a/svgs/sitemap.svg b/svgs/sitemap-outlined.svg similarity index 100% rename from svgs/sitemap.svg rename to svgs/sitemap-outlined.svg diff --git a/svgs/slash.svg b/svgs/slash-outlined.svg similarity index 100% rename from svgs/slash.svg rename to svgs/slash-outlined.svg diff --git a/svgs/sliders.svg b/svgs/sliders-outlined.svg similarity index 100% rename from svgs/sliders.svg rename to svgs/sliders-outlined.svg diff --git a/svgs/sort-down.svg b/svgs/sort-down-outlined.svg similarity index 100% rename from svgs/sort-down.svg rename to svgs/sort-down-outlined.svg diff --git a/svgs/sort.svg b/svgs/sort-filled.svg similarity index 100% rename from svgs/sort.svg rename to svgs/sort-filled.svg diff --git a/svgs/sort-up.svg b/svgs/sort-up-outlined.svg similarity index 100% rename from svgs/sort-up.svg rename to svgs/sort-up-outlined.svg diff --git a/svgs/split.svg b/svgs/split-outlined.svg similarity index 100% rename from svgs/split.svg rename to svgs/split-outlined.svg diff --git a/svgs/sql.svg b/svgs/sql-outlined.svg similarity index 100% rename from svgs/sql.svg rename to svgs/sql-outlined.svg diff --git a/svgs/star-outlined.svg b/svgs/star-outlined.svg new file mode 100644 index 0000000..02db2be --- /dev/null +++ b/svgs/star-outlined.svg @@ -0,0 +1,3 @@ + + + diff --git a/svgs/star.svg b/svgs/star.svg deleted file mode 100644 index 9eb8c4b..0000000 --- a/svgs/star.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/svgs/string.svg b/svgs/string-outlined.svg similarity index 100% rename from svgs/string.svg rename to svgs/string-outlined.svg diff --git a/svgs/success.svg b/svgs/success-outlined.svg similarity index 100% rename from svgs/success.svg rename to svgs/success-outlined.svg diff --git a/svgs/table.svg b/svgs/table-outlined.svg similarity index 100% rename from svgs/table.svg rename to svgs/table-outlined.svg diff --git a/svgs/tablet.svg b/svgs/tablet-outlined.svg similarity index 100% rename from svgs/tablet.svg rename to svgs/tablet-outlined.svg diff --git a/svgs/tag.svg b/svgs/tag-outlined.svg similarity index 100% rename from svgs/tag.svg rename to svgs/tag-outlined.svg diff --git a/svgs/target.svg b/svgs/target-outlined.svg similarity index 100% rename from svgs/target.svg rename to svgs/target-outlined.svg diff --git a/svgs/terminal.svg b/svgs/terminal-outlined.svg similarity index 100% rename from svgs/terminal.svg rename to svgs/terminal-outlined.svg diff --git a/svgs/time.svg b/svgs/time-outlined.svg similarity index 100% rename from svgs/time.svg rename to svgs/time-outlined.svg diff --git a/svgs/top.svg b/svgs/top-filled.svg similarity index 100% rename from svgs/top.svg rename to svgs/top-filled.svg diff --git a/svgs/transform.svg b/svgs/transform-outlined.svg similarity index 100% rename from svgs/transform.svg rename to svgs/transform-outlined.svg diff --git a/svgs/up.svg b/svgs/up-filled.svg similarity index 100% rename from svgs/up.svg rename to svgs/up-filled.svg diff --git a/svgs/user-bars.svg b/svgs/user-bars-outlined.svg similarity index 100% rename from svgs/user-bars.svg rename to svgs/user-bars-outlined.svg diff --git a/svgs/user-group.svg b/svgs/user-group-outlined.svg similarity index 100% rename from svgs/user-group.svg rename to svgs/user-group-outlined.svg diff --git a/svgs/user.svg b/svgs/user-outlined.svg similarity index 100% rename from svgs/user.svg rename to svgs/user-outlined.svg diff --git a/svgs/user-plus.svg b/svgs/user-plus-filled.svg similarity index 100% rename from svgs/user-plus.svg rename to svgs/user-plus-filled.svg diff --git a/svgs/user-screen.svg b/svgs/user-screen-outlined.svg similarity index 100% rename from svgs/user-screen.svg rename to svgs/user-screen-outlined.svg diff --git a/svgs/user-search.svg b/svgs/user-search-outlined.svg similarity index 100% rename from svgs/user-search.svg rename to svgs/user-search-outlined.svg diff --git a/svgs/user-service.svg b/svgs/user-service-filled.svg similarity index 100% rename from svgs/user-service.svg rename to svgs/user-service-filled.svg diff --git a/svgs/user-tgi.svg b/svgs/user-tgi-outlined.svg similarity index 100% rename from svgs/user-tgi.svg rename to svgs/user-tgi-outlined.svg diff --git a/svgs/user-tie.svg b/svgs/user-tie-outlined.svg similarity index 100% rename from svgs/user-tie.svg rename to svgs/user-tie-outlined.svg diff --git a/svgs/variable.svg b/svgs/variable-outlined.svg similarity index 100% rename from svgs/variable.svg rename to svgs/variable-outlined.svg diff --git a/svgs/warning.svg b/svgs/warning-outlined.svg similarity index 100% rename from svgs/warning.svg rename to svgs/warning-outlined.svg diff --git a/svgs/wechat.svg b/svgs/wechat-outlined.svg similarity index 100% rename from svgs/wechat.svg rename to svgs/wechat-outlined.svg diff --git a/svgs/windows.svg b/svgs/windows-filled.svg similarity index 100% rename from svgs/windows.svg rename to svgs/windows-filled.svg diff --git a/svgs/windows-outlined.svg b/svgs/windows-outlined.svg new file mode 100644 index 0000000..5733ea2 --- /dev/null +++ b/svgs/windows-outlined.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/svgs/write.svg b/svgs/write-outlined.svg similarity index 100% rename from svgs/write.svg rename to svgs/write-outlined.svg diff --git a/svgs/yuan.svg b/svgs/yuan-outlined.svg similarity index 100% rename from svgs/yuan.svg rename to svgs/yuan-outlined.svg diff --git a/svgs/zoom-minus.svg b/svgs/zoom-minus-outlined.svg similarity index 100% rename from svgs/zoom-minus.svg rename to svgs/zoom-minus-outlined.svg diff --git a/svgs/zoom-plus.svg b/svgs/zoom-plus-outlined.svg similarity index 100% rename from svgs/zoom-plus.svg rename to svgs/zoom-plus-outlined.svg diff --git a/templates/svgTemplate.ts b/templates/svgTemplate.ts index 3efc3fb..7b9c778 100644 --- a/templates/svgTemplate.ts +++ b/templates/svgTemplate.ts @@ -9,8 +9,8 @@ function ${componentName}(wrapperProps: IconProps) { style: { color }, - width: !size ? '16px' : size, - height: !size ? '16px' : size, + width: !size ? '1em' : size, + height: !size ? '1em' : size, }; const file = ( ${jsx} diff --git a/yarn.lock b/yarn.lock index 7da6adf..8666969 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7630,7 +7630,14 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -cross-spawn@7.0.3, cross-spawn@^7.0.3: +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + +cross-spawn@7.0.3, cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -9379,6 +9386,15 @@ fs-extra@^10.0.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" + integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^9.0.0, fs-extra@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"