Skip to content

Commit 6f33772

Browse files
authored
Initial commit
0 parents  commit 6f33772

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7549
-0
lines changed

.dumirc.ts

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineConfig } from 'dumi';
2+
import path from 'path';
3+
4+
export default defineConfig({
5+
alias: {
6+
'rc-trigger$': path.resolve('src'),
7+
'rc-trigger/es': path.resolve('src'),
8+
},
9+
mfsu: false,
10+
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
11+
themeConfig: {
12+
name: 'Trigger',
13+
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
14+
},
15+
styles: [
16+
`
17+
.dumi-default-previewer-demo {
18+
position: relative;
19+
min-height: 300px;
20+
}
21+
`,
22+
]
23+
});

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*.{js,css}]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2

.eslintrc.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
extends: [require.resolve('@umijs/fabric/dist/eslint')],
3+
rules: {
4+
'default-case': 0,
5+
'import/no-extraneous-dependencies': 0,
6+
'react-hooks/exhaustive-deps': 0,
7+
'react/no-find-dom-node': 0,
8+
'react/no-did-update-set-state': 0,
9+
'react/no-unused-state': 1,
10+
'react/sort-comp': 0,
11+
'jsx-a11y/label-has-for': 0,
12+
'jsx-a11y/label-has-associated-control': 0,
13+
},
14+
};

.fatherrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from 'father';
2+
3+
export default defineConfig({
4+
plugins: ['@rc-component/father-plugin'],
5+
});

.github/dependabot.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "21:00"
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: np
11+
versions:
12+
- 7.2.0
13+
- 7.3.0
14+
- 7.4.0
15+
- dependency-name: "@types/react-dom"
16+
versions:
17+
- 17.0.0
18+
- 17.0.1
19+
- 17.0.2
20+
- dependency-name: "@types/react"
21+
versions:
22+
- 17.0.0
23+
- 17.0.1
24+
- 17.0.2
25+
- 17.0.3
26+
- dependency-name: typescript
27+
versions:
28+
- 4.1.3
29+
- 4.1.4
30+
- 4.1.5

.github/workflows/codeql.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
- cron: "40 12 * * 0"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ javascript ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

.github/workflows/main.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
setup:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@master
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '16'
19+
20+
- name: cache package-lock.json
21+
uses: actions/cache@v2
22+
with:
23+
path: package-temp-dir
24+
key: lock-${{ github.sha }}
25+
26+
- name: create package-lock.json
27+
run: npm i --package-lock-only
28+
29+
- name: hack for singe file
30+
run: |
31+
if [ ! -d "package-temp-dir" ]; then
32+
mkdir package-temp-dir
33+
fi
34+
cp package-lock.json package-temp-dir
35+
36+
- name: cache node_modules
37+
id: node_modules_cache_id
38+
uses: actions/cache@v2
39+
with:
40+
path: node_modules
41+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
42+
43+
- name: install
44+
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
45+
run: npm i
46+
47+
lint:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: checkout
51+
uses: actions/checkout@master
52+
53+
- name: restore cache from package-lock.json
54+
uses: actions/cache@v2
55+
with:
56+
path: package-temp-dir
57+
key: lock-${{ github.sha }}
58+
59+
- name: restore cache from node_modules
60+
uses: actions/cache@v2
61+
with:
62+
path: node_modules
63+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
64+
65+
- name: lint
66+
run: npm run lint
67+
68+
needs: setup
69+
70+
compile:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: checkout
74+
uses: actions/checkout@master
75+
76+
- name: restore cache from package-lock.json
77+
uses: actions/cache@v2
78+
with:
79+
path: package-temp-dir
80+
key: lock-${{ github.sha }}
81+
82+
- name: restore cache from node_modules
83+
uses: actions/cache@v2
84+
with:
85+
path: node_modules
86+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
87+
88+
- name: compile
89+
run: npm run compile
90+
91+
needs: setup
92+
93+
coverage:
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: checkout
97+
uses: actions/checkout@master
98+
99+
- name: restore cache from package-lock.json
100+
uses: actions/cache@v2
101+
with:
102+
path: package-temp-dir
103+
key: lock-${{ github.sha }}
104+
105+
- name: restore cache from node_modules
106+
uses: actions/cache@v2
107+
with:
108+
path: node_modules
109+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
110+
111+
- name: coverage
112+
run: npm run coverage && bash <(curl -s https://codecov.io/bash)
113+
114+
needs: setup

.gitignore

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.storybook
2+
*.iml
3+
*.log
4+
.idea
5+
.ipr
6+
.iws
7+
*~
8+
~*
9+
*.diff
10+
*.patch
11+
*.bak
12+
.DS_Store
13+
Thumbs.db
14+
.project
15+
.*proj
16+
.svn
17+
*.swp
18+
*.swo
19+
*.pyc
20+
*.pyo
21+
node_modules
22+
.cache
23+
*.css
24+
build
25+
lib
26+
es
27+
coverage
28+
yarn.lock
29+
package-lock.json
30+
31+
# dumi
32+
.umi
33+
.umi-production
34+
.umi-test
35+
.docs
36+
37+
38+
# dumi
39+
.dumi/tmp
40+
.dumi/tmp-production

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"trailingComma": "all"
7+
}

HISTORY.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# History
2+
----
3+
4+
## 4.1.0 / 2020-05-08
5+
6+
- upgrade rc-animate to `3.x`
7+
8+
## 2.5.0 / 2018-06-05
9+
10+
- support `alignPoint`
11+
12+
## 2.1.0 / 2017-10-16
13+
14+
- add action `contextMenu`
15+
16+
## 2.0.0 / 2017-09-25
17+
18+
- support React 16
19+
20+
## 1.11.0 / 2017-06-07
21+
22+
- add es
23+
24+
## 1.9.0 / 2017-02-27
25+
26+
- add getDocument prop
27+
28+
## 1.8.2 / 2017-02-24
29+
30+
- change default container to absolute to fix scrollbar change problem
31+
32+
## 1.7.0 / 2016-07-18
33+
34+
- use getContainerRenderMixin from 'rc-util'
35+
36+
## 1.6.0 / 2016-05-26
37+
38+
- support popup as function
39+
40+
## 1.5.0 / 2016-05-26
41+
42+
- add forcePopupAlign method
43+
44+
## 1.4.0 / 2016-04-06
45+
46+
- support onPopupAlign
47+
48+
## 1.3.0 / 2016-03-25
49+
50+
- support mask/maskTransitionName/zIndex
51+
52+
## 1.2.0 / 2016-03-01
53+
54+
- add showAction/hideAction
55+
56+
## 1.1.0 / 2016-01-06
57+
58+
- add root trigger node as parameter of getPopupContainer

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in
12+
all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)