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(IconProvider): support global configuration classPrefix and csp #12

Merged
merged 13 commits into from
Oct 16, 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
6 changes: 6 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"publishDirectory": {
"@rsuite/icons": "lib"
},
"sandboxes": ["new"]
}
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/bin/**
/scripts/**
/build/**
/src/icons/legacy/**
webpack.config.js
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:prettier/recommended'
'plugin:prettier/recommended',
'plugin:storybook/recommended'
],
parserOptions: {},
plugins: ['@typescript-eslint', 'react'],
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/publish-docs.yml

This file was deleted.

23 changes: 13 additions & 10 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# see https://help.github.com/cn/actions/language-and-framework-guides/publishing-nodejs-packages
# It haven't release yet.
name: Publish Package
# see https://docs.github.com/zh/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry

name: Publish Package to npmjs

on:
push:
Expand All @@ -11,16 +11,19 @@ jobs:
name: 'Publish'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
always-auth: true
node-version: '12.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Publish package
run: npm publish --access public
run: npm install
- name: Build
run: npm run build
- name: Publish
working-directory: ./lib
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
38 changes: 20 additions & 18 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Run Test Cases

# Run on all branch
on:
push:
paths:
- '.github/workflows/run-test.yml'
- 'docs/**'
- 'src/**'
- 'test/**'
branches:
- master

pull_request:
paths:
- '.github/workflows/run-test.yml'
- 'docs/**'
- 'src/**'
- 'test/**'
branches:
- master

jobs:
test:
Expand All @@ -26,17 +18,27 @@ jobs:

strategy:
matrix:
browser: [chrome, firefox]
browser: [chrome, edge]

# See https://docs.cypress.io/guides/continuous-integration/github-actions
steps:
# Checkout latest code
- name: Checkout
uses: actions/checkout@v3

# Install NPM dependencies, cache them correctly
# and run all Cypress tests
# Install NPM dependencies
- name: Install dependencies
run: npm ci

# Cache Cypress files
- name: Cache Cypress
uses: actions/cache@v3
with:
path: ~/.cache/Cypress
key: cypress-${{ runner.os }}-${{ hashFiles('package-lock.json') }}-${{ github.run_id }}

# Run Cypress tests on multiple browsers
- name: Cypress run
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v5 # Ensure latest Cypress GitHub Action
with:
component: true
browser: ${{ matrix.browser }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ jspm_packages
.node_repl_history
.DS_Store

dist
lib
es
.vscode/
assets
yarn.lock
/meta.json

cypress/videos

*storybook.log
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ src/
postcss.config.js
gulpfile.js
.eslintrc.js
webpack.config.js
14 changes: 14 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ['../storybook/**/*.mdx', '../storybook/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: '@storybook/react-vite'
};
export default config;
18 changes: 18 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
},
brand : {
title: 'React Suite',
url: 'https://rsuitejs.com'
}
}
};

export default preview;
14 changes: 7 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
## RSUITE Icons Free License
## React Suite Icons Free License

RSUITE Icons is free, open source, and GPL friendly. You can use it for
React Suite Icons is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.

# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)

In the RSUITE Icon Free download, the CC BY 4.0 license applies to all icons
In the React Suite Icon Free download, the CC BY 4.0 license applies to all icons
packaged as SVG and JS file types.

# Code: MIT License (https://github.com/rsuite/rsuite/blob/master/LICENSE)

In the RSUITE Icon Font Free download, the MIT license applies to all non-font and
In the React Suite Icon Font Free download, the MIT license applies to all non-font and
non-icon files.

# Attribution

Attribution is required by MIT and CC BY licenses. Downloaded RSUITE
Attribution is required by MIT and CC BY licenses. Downloaded React Suite
Icon Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.

We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about RSUITE Icon Font.
learn about React Suite Icon Font.

# Brand Icons

All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by RSUITE
trademarks does not indicate endorsement of the trademark holder by React Suite
Icon, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
# RSUITE Icons
# React Suite Icons

## Develop
## Document

This library is developing now , if you want run it on you local,please run these command:
https://rsuitejs.com/components/icon/

## Project Development Guide

### Install

```bash
$ npm install
```
## Install dependencies
npm run ci
## Run dev site on your local
npm run dev
## TDD
npm run tdd

### Development

```bash
$ npm npm dev
```

### Build

```bash
$ npm run build
```

### Test

```bash
$ npm run test
```

31 changes: 0 additions & 31 deletions babel.config.js

This file was deleted.

Loading
Loading