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

fix(Collapse): reorganize collapse panel scss code #4977

Open
wants to merge 34 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d609eac
refactor(Form): convert to TypeScript, improve docs and tests, close#…
FairyYang Sep 19, 2024
fa20c5d
refactor(Tab): rename to ts
xiaoshuaiShania Sep 5, 2024
d8fa7e9
refactor(Tab): ts & docs & test tools
xiaoshuaiShania Sep 5, 2024
d477e2c
refactor(Tab): fix comment issues
xiaoshuaiShania Sep 6, 2024
4a9f576
refactor(DatePicker): rename to ts
eternalsky Sep 4, 2024
4a1ec1d
refactor(DatePicker): improve ts
eternalsky Sep 9, 2024
b87f784
refactor(DatePicker): improve types and docs
eternalsky Sep 11, 2024
25cdeac
refactor(DatePicker): improve tc
eternalsky Sep 13, 2024
44b64b6
refactor(DatePicker): fix comment issues
eternalsky Sep 19, 2024
796b5d8
refactor(Form): update form field options and dependencies
eternalsky Sep 23, 2024
b78641b
fix(Timeline): left content of timeline item cannot be styled correctly
eternalsky Sep 23, 2024
539e1d1
fix(Grid): The style prop of Col in the Grid does not take effect
Sep 20, 2024
82a302f
fix(DatePicker2): after entering a customized date format and pressin…
GCHHCG Sep 6, 2024
2c3be74
refactor(Shell): rename to ts
luolin-ck Sep 3, 2024
a512263
refactor(Shell): Upgrade tests and docs, convert to TypeScript
luolin-ck Sep 5, 2024
8a5b18f
refactor(Shell): fix comment issue
luolin-ck Sep 27, 2024
877eecd
refactor(Range): rename to ts
wangw11056 Sep 9, 2024
d93eda1
refactor(Range): convert to TypeScript, improve docs and tests
wangw11056 Oct 11, 2024
a2d3a59
chore(*): fix test:js ci failure
eternalsky Oct 15, 2024
00456e2
refactor(TimePicker2): convert to TypeScript, impove docs and tests, …
FairyYang Oct 21, 2024
1849be8
test(TreeSelect): make test more robust by using cy.spy()
eternalsky Oct 21, 2024
a742bc7
fix(*): change esbuild target to es2018
eternalsky Sep 14, 2024
78eb73a
chore(*): Release-1.27.24
eternalsky Sep 14, 2024
6c8ec67
fix(Balloon): export balloon props types
eternalsky Sep 14, 2024
90dc93e
fix(Slider): export SliderProps types
eternalsky Sep 14, 2024
883275a
chore(*): Release-1.27.25
eternalsky Sep 14, 2024
40a9532
fix(VirtualList): stabilize children keys in virtual list
eternalsky Sep 20, 2024
2384829
chore(*): Release-1.27.26
eternalsky Sep 20, 2024
4c1675b
fix(Switch): style prop
eternalsky Oct 18, 2024
db50ffa
chore(*): Release-1.27.27
eternalsky Oct 21, 2024
4613fcd
chore(*): Release-1.27.28
eternalsky Oct 22, 2024
7135c5b
fix(Slider): correct typo and improve types definition
eternalsky Nov 12, 2024
09bf93a
chore(*): Release-1.27.29
Nov 12, 2024
e7965bf
fix(Collapse): reorganize collapse panel scss code
Liqihan Nov 19, 2024
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
62 changes: 62 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
# Change Log

## [1.27.29](https://github.com/alibaba-fusion/next/compare/1.27.28...1.27.29) (2024-11-12)


### Bug Fixes

* **Slider:** correct typo and improve types definition ([9d4f0f7](https://github.com/alibaba-fusion/next/commit/9d4f0f79efb48e0ab657862bef17d0b3040e6709))


## [1.27.28](https://github.com/alibaba-fusion/next/compare/1.27.26...1.27.28) (2024-10-21)


### Bug Fixes

* **DatePicker2:** after entering a customized date format and pressing Enter, the value should not change,closed [#4896](https://github.com/alibaba-fusion/next/issues/4896) ([e74ab40](https://github.com/alibaba-fusion/next/commit/e74ab40bf206ab0ad748d2c6b519972df1116810))
* **Grid:** The style prop of Col in the Grid does not take effect ([836eeb6](https://github.com/alibaba-fusion/next/commit/836eeb65d355ff03b9d98d9819db95b82b7e8aac))
* **Timeline:** left content of timeline item cannot be styled correctly ([f27e646](https://github.com/alibaba-fusion/next/commit/f27e646f8c3e3a72bf91992a870701226cfc9834))


### Code Refactoring

* **DatePicker:** convert to TypeScript, improve docs and tests ([4c37bf5](https://github.com/alibaba-fusion/next/commit/4c37bf5085176e2e34327e2def2e7b892dac6a2b))
* **Form:** convert to TypeScript, improve docs and tests, close[#4585](https://github.com/alibaba-fusion/next/issues/4585) ([adbb6c9](https://github.com/alibaba-fusion/next/commit/adbb6c9f63170f4a4adc8395f3a33421c446dbcc))
* **Form:** update form field options and dependencies ([f1c17a1](https://github.com/alibaba-fusion/next/commit/f1c17a1e5bbd68cd0e56e2334ed1a7690973899f))
* **Range:** convert to TypeScript, improve docs and tests ([d4b99e9](https://github.com/alibaba-fusion/next/commit/d4b99e964a7d0bbd6e04b60d065ce884db0e6366))
* **Shell:** convert to TypeScript, improve docs and tests ([202f538](https://github.com/alibaba-fusion/next/commit/202f5380026e75252d9a8267489ac1a5ff6b82f5))
* **Tab:** convert to TypeScript, improve docs and tests ([4632a46](https://github.com/alibaba-fusion/next/commit/4632a467a77a4387c5ec8dec55a97353fa40ca33))
* **TimePicker2:** convert to TypeScript, improve docs and tests, close [#4616](https://github.com/alibaba-fusion/next/issues/4616) ([e082513](https://github.com/alibaba-fusion/next/commit/e082513e781738fdbc27cd418cb6fa13aa06faa1))


## [1.27.27](https://github.com/alibaba-fusion/next/compare/1.27.26...1.27.27) (2024-10-18)


### Bug Fixes

* **Switch:** style prop ([6c5b266](https://github.com/alibaba-fusion/next/commit/6c5b2661d029d9d80a6196f1a16412dcd180cac8))


## [1.27.26](https://github.com/alibaba-fusion/next/compare/1.27.25...1.27.26) (2024-09-20)


### Bug Fixes

* **VirtualList:** stabilize children keys in virtual list ([f3d1d81](https://github.com/alibaba-fusion/next/commit/f3d1d81af3bf7b491919797bef3aec22984e5f0d))


## [1.27.25](https://github.com/alibaba-fusion/next/compare/1.27.24...1.27.25) (2024-09-14)


### Bug Fixes

* **Balloon:** export balloon props types ([eecc4dd](https://github.com/alibaba-fusion/next/commit/eecc4dda8acc5ddef9b08e26127613f83dca9d9a))
* **Slider:** export SliderProps types ([813448d](https://github.com/alibaba-fusion/next/commit/813448de7a049679283e4d0f4f9e4a8ccbfad4d8))


## [1.27.24](https://github.com/alibaba-fusion/next/compare/1.27.23...1.27.24) (2024-09-14)


### Bug Fixes

* change esbuild target to es2018 ([0fe351f](https://github.com/alibaba-fusion/next/commit/0fe351feca93e678a5c9fb94fb43ea603d629fe7))


## [1.27.23](https://github.com/alibaba-fusion/next/compare/1.27.22...1.27.23) (2024-09-10)


Expand Down
17 changes: 2 additions & 15 deletions LATESTLOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,9 @@
# Latest Log

## [1.27.23](https://github.com/alibaba-fusion/next/compare/1.27.22...1.27.23) (2024-09-10)
## [1.27.29](https://github.com/alibaba-fusion/next/compare/1.27.28...1.27.29) (2024-11-12)


### Bug Fixes

* **Form:** enabled responsive form should maintain alignment between label and input ([db30f4f](https://github.com/alibaba-fusion/next/commit/db30f4fcd94b8a583dc3b435c5a1f9a8113fe76c))
* **Overlay:** overlay support SSR, close [#4205](https://github.com/alibaba-fusion/next/issues/4205) ([69241bc](https://github.com/alibaba-fusion/next/commit/69241bc660137e6028840b5727bba8e9f9d51989))
* **Select:** adjust auto-complete menu length issue, close [#4873](https://github.com/alibaba-fusion/next/issues/4873) ([bf08e19](https://github.com/alibaba-fusion/next/commit/bf08e19411d7a0fe434902573279b973fa8a6382))
* **Upload:** theme page fail to render ([a200df1](https://github.com/alibaba-fusion/next/commit/a200df1a8dfed99ada60b0bbd0b801d891a811b8))
* **VirtualList:** resolve bugs in jumpIndex functionality, close [#4883](https://github.com/alibaba-fusion/next/issues/4883) ([324b0d3](https://github.com/alibaba-fusion/next/commit/324b0d30f49918e215142edf3a294343e182674d))


### Code Refactoring

* **Balloon:** convert to TypeScript, improve docs and tests, close[#4565](https://github.com/alibaba-fusion/next/issues/4565) ([cf6a80d](https://github.com/alibaba-fusion/next/commit/cf6a80dfd390907c07cd6e35feb18429ea350d94))
* **Card:** convert to TypeScript, improve docs and tests, close[#4571](https://github.com/alibaba-fusion/next/issues/4571) ([15ff8b6](https://github.com/alibaba-fusion/next/commit/15ff8b6fefc2db00816dec7e28ea6a702a5007d6))
* **Pagination:** convert to TypeScript, improve docs and tests ([442240d](https://github.com/alibaba-fusion/next/commit/442240d4aa3766bbadf9a3ef1c2c74798ce961b1))
* **Slider:** convert to TypeScript, improve docs and tests ([0ddbb65](https://github.com/alibaba-fusion/next/commit/0ddbb65c50bea5c1029ab9534bd5d3bdb70774a4))
* **VirtualList:** convert to TypeScript, improve docs and tests ([21518d4](https://github.com/alibaba-fusion/next/commit/21518d4a489759607fd5398053cfea5c9dfce01b))
* **Slider:** correct typo and improve types definition ([9d4f0f7](https://github.com/alibaba-fusion/next/commit/9d4f0f79efb48e0ab657862bef17d0b3040e6709))

10 changes: 10 additions & 0 deletions components/balloon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ import Tooltip from './tooltip';
import Inner from './inner';
import { assignSubComponent } from '../util/component';

export type {
BalloonProps,
BalloonV1Props,
BalloonV2Props,
TooltipProps,
TooltipV1Props,
TooltipV2Props,
AlignType,
} from './types';

const BalloonWithSub = assignSubComponent(Balloon, {
Tooltip: ConfigProvider.config(Tooltip, {
transform: (props, deprecated) => {
Expand Down
18 changes: 11 additions & 7 deletions components/collapse/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@
border-top: $collapse-title-border-width solid $collapse-panel-border-color;
}
}
& &-panel {

#{$collapse-prefix}-panel-icon {
position: absolute;
color: $collapse-icon-color;
transition: transform $motion-duration-immediately $motion-linear;
left: $collapse-icon-margin-l;
margin-top: -2px;
#{$collapse-prefix}-panel-icon {
position: absolute;
color: $collapse-icon-color;
transition: transform $motion-duration-immediately $motion-linear;
left: $collapse-icon-margin-l;
margin-top: -2px;

@include icon-size($collapse-icon-size, 0px, 0px);
}

@include icon-size($collapse-icon-size, 0px, 0px);
}


&-panel-title {
position: relative;
line-height: $font-lineheight-2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,77 @@ import React from 'react';
import { DatePicker } from '@alifd/next';
import { Types } from '@alifd/adaptor-helper';
import moment from 'moment';
import type { DatePickerProps } from '../../types';

export default {
name: 'DatePicker',
shape: ['normal', {
value: 'range',
label: 'Range Picker'
}],
editor: (shape) => {
shape: [
'normal',
{
value: 'range',
label: 'Range Picker',
},
],
editor: (shape: 'normal' | 'range') => {
return {
props: [{
name: 'state',
label: 'Status',
type: Types.enum,
options: ['normal', 'expanded', 'selected', 'disabled'],
default: 'normal'
}, {
name: 'size',
type: Types.enum,
options: ['large', 'medium', 'small'],
default: 'medium'
}, {
name: 'type',
type: Types.enum,
options: shape === 'range' ? ['dateRange', 'dateTimeRange'] : ['date', 'dateTime'],
default: shape === 'range' ? 'dateRange' : 'date'
}, {
name: 'width',
type: Types.number,
default: 288
}, {
name: 'label',
type: Types.string,
default: ''
}, {
name: 'placeholder',
type: Types.string,
default: shape === 'range' ? 'Start Date - End Date' : 'Please Select Date'
}]
props: [
{
name: 'state',
label: 'Status',
type: Types.enum,
options: ['normal', 'expanded', 'selected', 'disabled'],
default: 'normal',
},
{
name: 'size',
type: Types.enum,
options: ['large', 'medium', 'small'],
default: 'medium',
},
{
name: 'type',
type: Types.enum,
options:
shape === 'range' ? ['dateRange', 'dateTimeRange'] : ['date', 'dateTime'],
default: shape === 'range' ? 'dateRange' : 'date',
},
{
name: 'width',
type: Types.number,
default: 288,
},
{
name: 'label',
type: Types.string,
default: '',
},
{
name: 'placeholder',
type: Types.string,
default: shape === 'range' ? 'Start Date - End Date' : 'Please Select Date',
},
],
};
},
adaptor: ({ shape, state, size, type, width, label, placeholder = '', style = {}, ...others }) => {
adaptor: ({
shape,
state,
size,
type,
width,
label,
placeholder = '',
style = {},
...others
}: any) => {
const now = moment();
style = {
width,
...style,
};

if (shape === 'range') {
return (
return (
<DatePicker.RangePicker
{...others}
visible={state === 'expanded'}
Expand All @@ -65,7 +87,7 @@ export default {
showTime={'dateTimeRange' === type}
locale={{
startPlaceholder: placeholder.split('-')[0],
endPlaceholder: placeholder.split('-')[1]
endPlaceholder: placeholder.split('-')[1],
}}
label={label}
value={state !== 'normal' ? [now.clone(), now.clone().add(1, 'month')] : null}
Expand All @@ -92,31 +114,34 @@ export default {
/>
);
},
content: (shape) => ({
options: [{
name: 'type',
options: shape === 'range' ? ['dateRange', 'dateTimeRange'] : ['date', 'dateTime'],
default: shape === 'range' ? 'dateRange' : 'date'
}, {
name: 'label',
options: ['show', 'hide'],
default: 'hide'
}],
transform: (props, { type , label }) => {
content: (shape: 'normal' | 'range') => ({
options: [
{
name: 'type',
options: shape === 'range' ? ['dateRange', 'dateTimeRange'] : ['date', 'dateTime'],
default: shape === 'range' ? 'dateRange' : 'date',
},
{
name: 'label',
options: ['show', 'hide'],
default: 'hide',
},
],
transform: (props: DatePickerProps, { type, label }: { type: string; label: string }) => {
return {
...props,
type,
label: label === 'show' ? 'Label' : ''
label: label === 'show' ? 'Label' : '',
};
}
},
}),
demoOptions: (demo) => {
demoOptions: (demo: any) => {
const { node } = demo;
const { props = {} } = node;
if (props.state === 'expanded') {
return { ...demo, height: 300 };
}

return demo;
}
},
};
4 changes: 2 additions & 2 deletions components/date-picker/__docs__/demo/accessibility/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import { DatePicker } from '@alifd/next';

const { RangePicker, MonthPicker, YearPicker } = DatePicker;
const onChange = val => console.log(val);
const { RangePicker } = DatePicker;
const onChange = (val: unknown) => console.log(val);

ReactDOM.render(
<div>
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import { DatePicker } from '@alifd/next';

const { RangePicker, MonthPicker, YearPicker, WeekPicker } = DatePicker;
const onChange = val => console.log(val);
const onChange = (val: unknown) => console.log(val);

ReactDOM.render(
<div>
Expand Down
Loading
Loading