Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(icons): new version #3194

Merged
merged 3 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"lint:tsc": "tsc -p ./tsconfig.dev.json ",
"generate:usage": "node script/generate-usage/index.js",
"generate:coverage-badge": "npm run test:coverage && node script/generate-coverage.js",
"generate:jsx-demo":"npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx",
"generate:jsx-demo": "npx babel src/**/_example --extensions '.tsx' --config-file ./babel.config.demo.js --relative --out-dir ../_example-js --out-file-extension=.jsx",
"format:jsx-demo": "npx eslint src/**/_example-js/*.jsx --fix && npx prettier --write src/**/_example-js/*.jsx",
"test": "vitest run && npm run test:snap",
"test:ui": "vitest --ui",
Expand All @@ -61,7 +61,7 @@
"build:tsc-esm": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir esm/",
"build:tsc-cjs": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir cjs/",
"build:tsc-lib": "tsc --emitDeclarationOnly -d -p ./tsconfig.build.json --outDir lib/",
"build:jsx-demo":"npm run generate:jsx-demo && npm run format:jsx-demo",
"build:jsx-demo": "npm run generate:jsx-demo && npm run format:jsx-demo",
"changelog": "node script/generate-changelog.js",
"init:component": "node script/init-component",
"robot": "publish-cli robot-msg",
Expand Down Expand Up @@ -133,8 +133,8 @@
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/coverage-istanbul": "^2.1.1",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/ui": "^2.1.1",
"autoprefixer": "^10.4.0",
"babel-polyfill": "^6.26.0",
Expand Down Expand Up @@ -185,7 +185,7 @@
"rollup-plugin-typescript2": "^0.31.2",
"standard-changelog": "^2.0.27",
"start-server-and-test": "^1.14.0",
"tdesign-icons-view": "^0.2.0",
"tdesign-icons-view": "^0.3.0",
"tdesign-publish-cli": "^0.0.12",
"tdesign-site-components": "^0.15.3",
"tdesign-theme-generator": "^1.0.0",
Expand Down
12 changes: 6 additions & 6 deletions site/pwaConfig.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default {
strategies: 'injectManifest',
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'],
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon.png'],
injectManifest: {
maximumFileSizeToCacheInBytes: 5000000
},
maximumFileSizeToCacheInBytes: 7000000,
},
manifest: {
name: 'TDesign for React',
short_name: 'TDesign',
Expand All @@ -19,7 +19,7 @@ export default {
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
}
]
}
},
],
},
};
6 changes: 4 additions & 2 deletions src/icon/icon.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ if your project is in a no-network scenario, please use on-demand loading of ico
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style={{ marginRight: '5px'}}>
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
</svg>
<p>Most icons were added to the icon library after version 0.3.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-react you have installed</p>
</div>
<p style={{
flex:'1'}}>Most icons were added to the icon library after version 0.4.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-react you have installed. Supports Chinese and English search. If you think other keyword prompts can be added, feel free to submit a Pull Request to <a href="https://github.com/Tencent/tdesign-icons/blob/develop/packages/view/src/manifest.js"> the Icon Repository</a> to help us complete it together.
</p>
</div>


<td-icons-view />
Expand Down
6 changes: 4 additions & 2 deletions src/icon/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### 安装独立 Icon 包

图标相对其他基础组件较为独立,所以作为一个独立的 `npm` 包做发布管理。如果项目中直接使用,请安装 `tdesign-icons-react`。
图标库中共包含超过 **25** 类,**1200+** 个图标,推荐您按需引用图标,减少产物的体积。
图标库中共包含超过 **25** 类,**2100+** 个图标,推荐您按需引用图标,减少产物的体积。

### 按需引入图标

Expand Down Expand Up @@ -83,7 +83,9 @@
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style={{ marginRight: '5px'}}>
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
</svg>
<p>大部分图标在 0.3.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-react`的版本。</p>
<p style={{
flex: '1'}}>大部分图标在 0.4.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-react`的版本。支持中文英文搜索,如果觉得可以再增加其他关键词提示,欢迎到 <a href="https://github.com/Tencent/tdesign-icons/blob/develop/packages/view/src/manifest.js"> 图标仓库</a> 提交PR,帮我们一起补充。
</p>
</div>

<td-icons-view />
Expand Down
Loading