Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/types/react-dom-17…
Browse files Browse the repository at this point in the history
….0.9
  • Loading branch information
li-jia-nan authored Nov 26, 2023
2 parents 5eafb16 + d690f01 commit e2b5866
Show file tree
Hide file tree
Showing 34 changed files with 841 additions and 558 deletions.
10 changes: 10 additions & 0 deletions .dumi/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Navigate } from 'dumi';
import * as React from 'react';

export function patchClientRoutes({ routes }) {
routes[0].children.unshift({
id: 'demo-redirect',
path: '/demo',
element: <Navigate to="arrow-content" />,
});
}
6 changes: 6 additions & 0 deletions .dumi/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tsconfig.json",
"include": [
"**/*"
]
}
23 changes: 23 additions & 0 deletions .dumirc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { defineConfig } from 'dumi';
import path from 'path';

const isProdSite =
// 不是预览模式 同时是生产环境
process.env.PREVIEW !== 'true' && process.env.NODE_ENV === 'production';

const name = 'tooltip';

export default defineConfig({
alias: {
'rc-tooltip$': path.resolve('src'),
'rc-tooltip/es': path.resolve('src'),
},
mfsu: false,
favicons: ['https://avatars0.githubusercontent.com/u/9441414?s=200&v=4'],
themeConfig: {
name: 'Tooltip',
logo: 'https://avatars0.githubusercontent.com/u/9441414?s=200&v=4',
},
base: isProdSite ? `/${name}/` : '/',
publicPath: isProdSite ? `/${name}/` : '/',
});
14 changes: 5 additions & 9 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
export default {
cjs: 'babel',
esm: { type: 'babel', importLibToEs: true },
preCommit: {
eslint: true,
prettier: true,
},
runtimeHelpers: true,
};
import { defineConfig } from 'father';

export default defineConfig({
plugins: ['@rc-component/father-plugin'],
});
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: "@types/react"
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- 17.0.3
- dependency-name: "@types/react-dom"
versions:
- 17.0.0
- 17.0.1
- 17.0.2
- dependency-name: less
versions:
- 4.1.0
8 changes: 4 additions & 4 deletions .github/workflows/react-component-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

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

- name: cache package-lock.json
uses: actions/cache@v2
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: install
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
run: npm ci

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -66,7 +66,7 @@ jobs:
run: npm run lint

needs: setup

compile:
runs-on: ubuntu-latest
steps:
Expand All @@ -89,7 +89,7 @@ jobs:
run: npm run compile

needs: setup

coverage:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ package-lock.json
.umi
.umi-production
.umi-test
.env.local
.env.local

# dumi
.dumi/tmp
.dumi/tmp-production
19 changes: 0 additions & 19 deletions .umirc.ts

This file was deleted.

196 changes: 48 additions & 148 deletions README.md

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions assets/bootstrap_white.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
&-placement-top &-arrow,
&-placement-topLeft &-arrow,
&-placement-topRight &-arrow{
bottom: -@tooltip-arrow-width + @tooltip-shadow-width;
// bottom: -@tooltip-arrow-width + @tooltip-shadow-width;
transform: translate(-50%, @tooltip-arrow-width - @tooltip-shadow-width);
margin-left: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
border-top-color: @tooltip-arrow-color;
Expand Down Expand Up @@ -103,6 +104,7 @@
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
border-right-color: @tooltip-arrow-color;
transform: translateX(calc(-100% + @tooltip-shadow-width));
}

&-placement-right &-arrow-inner,
Expand Down Expand Up @@ -134,6 +136,7 @@
margin-top: -@tooltip-arrow-width;
border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
border-left-color: @tooltip-arrow-color;
transform: translateX(calc(100% - @tooltip-shadow-width));
}

&-placement-left &-arrow-inner,
Expand Down Expand Up @@ -161,7 +164,8 @@
&-placement-bottom &-arrow,
&-placement-bottomLeft &-arrow,
&-placement-bottomRight &-arrow {
top: -@tooltip-arrow-width + @tooltip-shadow-width;;
// top: -@tooltip-arrow-width + @tooltip-shadow-width;;
transform: translate(-50%, -@tooltip-arrow-width + @tooltip-shadow-width);
margin-left: -@tooltip-arrow-width;
border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
border-bottom-color: @tooltip-arrow-color;
Expand Down
9 changes: 7 additions & 2 deletions docs/demo/arrowContent.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## arrowContent
---
title: arrowContent
nav:
title: Demo
path: /demo
---

<code src="../examples/arrowContent.tsx">
<code src="../examples/arrowContent.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/formError.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## formError
---
title: formError
nav:
title: Demo
path: /demo
---

<code src="../examples/formError.tsx">
<code src="../examples/formError.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/onVisibleChange.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## onVisibleChange
---
title: onVisibleChange
nav:
title: Demo
path: /demo
---

<code src="../examples/onVisibleChange.tsx">
<code src="../examples/onVisibleChange.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/placement.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## placement
---
title: placement
nav:
title: Demo
path: /demo
---

<code src="../examples/placement.tsx">
<code src="../examples/placement.tsx"></code>
8 changes: 8 additions & 0 deletions docs/demo/point.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Point
nav:
title: Demo
path: /demo
---

<code src="../examples/point.tsx"></code>
8 changes: 8 additions & 0 deletions docs/demo/showArrow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: showArrow
nav:
title: Demo
path: /demo
---

<code src="../examples/showArrow.tsx"></code>
9 changes: 7 additions & 2 deletions docs/demo/simple.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## simple
---
title: simple
nav:
title: Demo
path: /demo
---

<code src="../examples/simple.tsx">
<code src="../examples/simple.tsx"></code>
Loading

0 comments on commit e2b5866

Please sign in to comment.