Skip to content

Commit ac97da7

Browse files
authored
Merge branch 'master' into fix-disabled
2 parents 1e172c4 + 0e289d5 commit ac97da7

File tree

158 files changed

+2367
-2119
lines changed

Some content is hidden

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

158 files changed

+2367
-2119
lines changed

.fatherrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import { defineConfig } from 'father';
22

33
export default defineConfig({
44
plugins: ['@rc-component/father-plugin'],
5-
});
5+
});

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: ant-design # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: ant-design # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/main.yml

Lines changed: 5 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,6 @@
1-
name: CI
2-
3-
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
8-
1+
name: ✅ test
2+
on: [push, pull_request]
93
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-
- name: cache node_modules
36-
id: node_modules_cache_id
37-
uses: actions/cache@v2
38-
with:
39-
path: node_modules
40-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
41-
42-
- name: install
43-
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
44-
run: npm ci
45-
46-
lint:
47-
runs-on: ubuntu-latest
48-
steps:
49-
- name: checkout
50-
uses: actions/checkout@master
51-
52-
- name: restore cache from package-lock.json
53-
uses: actions/cache@v2
54-
with:
55-
path: package-temp-dir
56-
key: lock-${{ github.sha }}
57-
58-
- name: restore cache from node_modules
59-
uses: actions/cache@v2
60-
with:
61-
path: node_modules
62-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
63-
64-
- name: lint
65-
run: npm run lint
66-
67-
needs: setup
68-
69-
compile:
70-
runs-on: ubuntu-latest
71-
steps:
72-
- name: checkout
73-
uses: actions/checkout@master
74-
75-
- name: restore cache from package-lock.json
76-
uses: actions/cache@v2
77-
with:
78-
path: package-temp-dir
79-
key: lock-${{ github.sha }}
80-
81-
- name: restore cache from node_modules
82-
uses: actions/cache@v2
83-
with:
84-
path: node_modules
85-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
86-
87-
- name: compile
88-
run: npm run compile
89-
90-
needs: setup
91-
92-
coverage:
93-
runs-on: ubuntu-latest
94-
steps:
95-
- name: checkout
96-
uses: actions/checkout@master
97-
98-
- name: restore cache from package-lock.json
99-
uses: actions/cache@v2
100-
with:
101-
path: package-temp-dir
102-
key: lock-${{ github.sha }}
103-
104-
- name: restore cache from node_modules
105-
uses: actions/cache@v2
106-
with:
107-
path: node_modules
108-
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
109-
110-
- name: coverage
111-
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
112-
113-
needs: setup
4+
test:
5+
uses: react-component/rc-test/.github/workflows/test.yml@main
6+
secrets: inherit

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ coverage/
4040

4141
# dumi
4242
.dumi/tmp
43-
.dumi/tmp-production
43+
.dumi/tmp-production
44+
45+
bun.lockb

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*": ["prettier --ignore-unknown --write"]
3+
}

CHANGELOG.md

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1 @@
1-
# Changelog
2-
3-
## 2.4.3
4-
5-
`2020-11-26`
6-
7-
- fix: Calendar should not trigger `onChange` when date is `disabled`. [#183](https://github.com/react-component/picker/pull/183)
8-
9-
## 2.4.2
10-
11-
`2020-11-24`
12-
13-
- fix: week range disabled rule. [#177](https://github.com/react-component/picker/pull/177)
14-
15-
## 2.4.1
16-
17-
`2020-11-20`
18-
19-
- feat: add year start & end. [#176](https://github.com/react-component/picker/pull/176)
20-
21-
## 2.4.0
22-
23-
`2020-11-19`
24-
25-
- feat: add start end. [#175](https://github.com/react-component/picker/pull/175)
26-
27-
> It has not been updated for a long time and will be maintained from now on. More in [releases](https://github.com/react-component/picker/releases).
28-
29-
---
30-
## 0.6.0
31-
32-
- support `maxColumnsPerRow`.
33-
34-
## 0.5.0
35-
36-
- support `theme="dark|light"`.
37-
38-
## 0.4.0
39-
40-
- support `columnLayout`.
41-
- support `backgroundColor`.
42-
43-
## 0.3.0
44-
45-
- support `style` and `className` for footer column and footer item.
46-
- support `LinkComponent` for footer item.
47-
48-
## 0.2.0
49-
50-
- Fix `lib` and `es` folders missing.
51-
52-
## 0.1.0
53-
54-
- First release.
1+
See https://github.com/react-component/picker/releases

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# rc-picker
22

3-
[![NPM version][npm-image]][npm-url]
4-
[![build status][github-actions-image]][github-actions-url]
5-
[![Codecov][codecov-image]][codecov-url]
6-
[![npm download][download-image]][download-url]
7-
[![bundle size][bundlephobia-image]][bundlephobia-url]
3+
[![NPM version][npm-image]][npm-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![npm download][download-image]][download-url] [![bundle size][bundlephobia-image]][bundlephobia-url]
84

95
[npm-image]: http://img.shields.io/npm/v/rc-picker.svg?style=flat-square
106
[npm-url]: http://npmjs.org/package/rc-picker
@@ -49,7 +45,7 @@ render(<Picker />, mountNode);
4945
| className | String | '' | additional css class of root dom node |
5046
| style | React.CSSProperties | | additional style of root dom node |
5147
| dropdownClassName | String | '' | additional className applied to dropdown |
52-
| dropdownAlign | Object:alignConfig of [dom-align](https://github.com/yiminghe/dom-align) | | value will be merged into placement's dropdownAlign config |
48+
| popupAlign | Object:alignConfig of [dom-align](https://github.com/yiminghe/dom-align) | | value will be merged into placement's popupAlign config |
5349
| popupStyle | React.CSSProperties | | customize popup style |
5450
| transitionName | String | '' | css class for animation |
5551
| locale | Object | import from 'rc-picker/lib/locale/en_US' | rc-picker locale |

assets/index.less

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
&-invalid {
3838
box-shadow: 0 0 2px red;
3939
}
40+
41+
&-panels {
42+
display: flex;
43+
flex-wrap: nowrap;
44+
}
45+
4046
&-panel {
4147
display: inline-block;
4248
vertical-align: top;
@@ -109,7 +115,9 @@
109115
border: none;
110116
outline: none;
111117
cursor: pointer;
112-
transition: background 0.3s, border 0.3s;
118+
transition:
119+
background 0.3s,
120+
border 0.3s;
113121

114122
&:hover {
115123
background: fade(blue, 30%);
@@ -265,6 +273,7 @@
265273
position: relative;
266274
display: flex;
267275
max-height: 200px;
276+
direction: ltr;
268277

269278
// &::after {
270279
// position: absolute;
@@ -402,14 +411,9 @@
402411
&-clear {
403412
position: absolute;
404413
top: 0;
405-
right: 4px;
414+
inset-inline-end: 4px;
406415
cursor: pointer;
407416

408-
.@{prefix-cls}-rtl & {
409-
right: auto;
410-
left: 4px;
411-
}
412-
413417
&-btn::after {
414418
content: '×';
415419
}
@@ -429,18 +433,22 @@
429433
display: none;
430434
}
431435

436+
&-rtl {
437+
direction: rtl;
438+
}
439+
432440
// Panel
433441
@arrow-size: 10px;
434442

435443
&-placement-topLeft,
436444
&-placement-topRight {
437445
.@{prefix-cls}-range-arrow {
438-
bottom: @arrow-size / 2 + 1px;
446+
bottom: (@arrow-size / 2 + 1px);
439447
transform: rotate(135deg);
440448
}
441449
}
442450
&-placement-bottomLeft,
443-
&-placement-bottomright {
451+
&-placement-bottomRight {
444452
.@{prefix-cls}-range-arrow {
445453
top: (@arrow-size / 2 + 1px);
446454
transform: rotate(-45deg);
@@ -449,32 +457,21 @@
449457

450458
.@{prefix-cls}-range-arrow {
451459
position: absolute;
452-
left: @arrow-size;
453460
z-index: 1;
454461
width: @arrow-size;
455462
height: @arrow-size;
456-
margin-left: 10px;
457463
transition: all 0.3s;
458464

459-
.@{prefix-cls}-dropdown-rtl& {
460-
right: @arrow-size;
461-
left: auto;
462-
margin-right: 10px;
463-
margin-left: 0;
464-
}
465-
466465
&::before,
467466
&::after {
468467
position: absolute;
469468
top: 50%;
470-
left: 50%;
469+
inset-inline-start: 50%;
471470
box-sizing: border-box;
472471
transform: translate(-50%, -50%);
473472
content: '';
474473

475474
.@{prefix-cls}-dropdown-rtl& {
476-
right: 50%;
477-
left: auto;
478475
transform: translate(50%, -50%);
479476
}
480477
}
@@ -488,7 +485,7 @@
488485
&::after {
489486
width: @arrow-size - 2px;
490487
height: @arrow-size - 2px;
491-
border: (@arrow-size - 2px) / 2 solid blue;
488+
border: ((@arrow-size - 2px) / 2) solid blue;
492489
border-color: @background-color @background-color transparent transparent;
493490
}
494491
}
@@ -547,6 +544,7 @@
547544
box-sizing: border-box;
548545
width: 100%;
549546
border: 1px solid green;
547+
min-height: 1em;
550548

551549
&-item {
552550
flex: none;
@@ -558,6 +556,13 @@
558556
border: 1px solid blue;
559557
}
560558

559+
&-selection-placeholder {
560+
pointer-events: none;
561+
position: absolute;
562+
left: 0;
563+
top: 0;
564+
}
565+
561566
&-multiple-input {
562567
width: 10px;
563568
opacity: 0.1;

bunfig.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[install]
2+
peer = false

0 commit comments

Comments
 (0)