Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .dumirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export default defineConfig({
min-height: 300px;
}
`,
]
],
});
2 changes: 1 addition & 1 deletion .fatherrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
});
56 changes: 28 additions & 28 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: np
versions:
- 7.2.0
- 7.3.0
- 7.4.0
- dependency-name: "@types/react-dom"
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- dependency-name: "@types/react"
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- 17.0.3
- dependency-name: typescript
versions:
- 4.1.3
- 4.1.4
- 4.1.5
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
time: '21:00'
open-pull-requests-limit: 10
ignore:
- dependency-name: np
versions:
- 7.2.0
- 7.3.0
- 7.4.0
- dependency-name: '@types/react-dom'
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- dependency-name: '@types/react'
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- 17.0.3
- dependency-name: typescript
versions:
- 4.1.3
- 4.1.4
- 4.1.5
12 changes: 6 additions & 6 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "master" ]
branches: ['master']
pull_request:
branches: [ "master" ]
branches: ['master']
schedule:
- cron: "40 12 * * 0"
- cron: '40 12 * * 0'

jobs:
analyze:
Expand All @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ javascript ]
language: [javascript]

steps:
- name: Checkout
Expand All @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
category: '/language:${{ matrix.language }}'
118 changes: 5 additions & 113 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,6 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

name: ✅ test
on: [push, pull_request]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: '16'

- name: cache package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only

- name: hack for singe file
run: |
if [ ! -d "package-temp-dir" ]; then
mkdir package-temp-dir
fi
cp package-lock.json package-temp-dir

- name: cache node_modules
id: node_modules_cache_id
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm i

lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: lint
run: npm run lint

needs: setup

compile:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: compile
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master

- name: restore cache from package-lock.json
uses: actions/cache@v2
with:
path: package-temp-dir
key: lock-${{ github.sha }}

- name: restore cache from node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

- name: coverage
run: npm run coverage && bash <(curl -s https://codecov.io/bash)

needs: setup
test:
uses: react-component/rc-test/.github/workflows/test.yml@main
secrets: inherit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ es
coverage
yarn.lock
package-lock.json
bun.lockb

# dumi
.umi
Expand Down
3 changes: 2 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# History
----

---

## 4.1.0 / 2020-05-08

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,26 @@ import React from 'react';
import ReactDOM from 'react-dom';
import Trigger from '@rc-component/trigger';

ReactDOM.render((
ReactDOM.render(
<Trigger
action={['click']}
popup={<span>popup</span>}
popupAlign={{
points: ['tl', 'bl'],
offset: [0, 3]
offset: [0, 3],
}}
>
<a href='#'>hover</a>
</Trigger>
), container);
<a href="#">hover</a>
</Trigger>,
container,
);
```

## Compatibility

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)<br>Electron |
| --- | --- | --- | --- | --- |
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IE11, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

## Example

Expand Down Expand Up @@ -243,7 +244,6 @@ npm start
</tbody>
</table>


## Test Case

```
Expand Down
6 changes: 4 additions & 2 deletions assets/index/Mask.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
animation-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
}

&-fade-enter,&-fade-appear {
&-fade-enter,
&-fade-appear {
opacity: 0;
.fade-effect();
animation-play-state: paused;
Expand All @@ -33,7 +34,8 @@
animation-play-state: paused;
}

&-fade-enter&-fade-enter-active,&-fade-appear&-fade-appear-active {
&-fade-enter&-fade-enter-active,
&-fade-appear&-fade-appear-active {
animation-name: rcTriggerMaskFadeIn;
animation-play-state: running;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/demos/body-overflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/body-overflow.tsx"></code>
<code src="../examples/body-overflow.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/case.tsx"></code>
<code src="../examples/case.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/click-nested.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/click-nested.tsx"></code>
<code src="../examples/click-nested.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/clip.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/clip.tsx"></code>
<code src="../examples/clip.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/container.tsx"></code>
<code src="../examples/container.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/inside.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/inside.tsx"></code>
<code src="../examples/inside.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/large-popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/large-popup.tsx"></code>
<code src="../examples/large-popup.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/nested.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/nested.tsx"></code>
<code src="../examples/nested.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/point.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/point.tsx"></code>
<code src="../examples/point.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/shadow.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/shadow.tsx"></code>
<code src="../examples/shadow.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/simple.tsx"></code>
<code src="../examples/simple.tsx"></code>
2 changes: 1 addition & 1 deletion docs/demos/visible-fallback.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ nav:
path: /demo
---

<code src="../examples/visible-fallback.tsx"></code>
<code src="../examples/visible-fallback.tsx"></code>
Loading
Loading