Skip to content

Commit

Permalink
parent 142d089
Browse files Browse the repository at this point in the history
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710930339 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710930294 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710930251 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710930016 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710929391 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710929075 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710929054 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710929008 +0800

parent 142d089
author 骆林 <[email protected]> 1710322602 +0800
committer 骆林 <[email protected]> 1710928916 +0800

fix(Drawer): 优化ts,新增tsdoc

chore(Notification): adjust ts types

chore(Notification): doc & test

chore(Notification): adjust ts types

chore(Notification): lint eg

docs(Search): remove unnecessary symbol ","

fix(Drawer): 异步执行cy.get 与 hide执行顺序修正

fix(Drawer): package-lock.json no change

fix(Overlay): solve problems caused by numerical floating, close alibaba-fusion#4740

fix(*): rollback alibaba-fusion#4746 and fix textarea clear spec

Update stale.yml

chore(BuildTool): 支持指定主题包调试`run start --theme xxx`

chore(DatePicker): fix theme demo margin, close alibaba-fusion#3627

chore(Shell): fix spell error "palceholder -> placeholder", close alibaba-fusion#3564

docs(Field): improve document description of parseName, close alibaba-fusion#3453

chore(Pagination): improve document of pageSizeSelector, fix pageJump runtime error, close alibaba-fusion#3306

docs(Calendar2): remove legacy api, close alibaba-fusion#3100

fix(Table): fix merging cell width in locked columns, close alibaba-fusion#4716 (alibaba-fusion#4752)

* fix(Table): 修复合并单元格的锁列滑动问题

* fix(Table): should support for merging cells in locked columns, close alibaba-fusion#4716

* fix(Table): 修复测试用例

fix(Shell): phone shell should hidden when collapsed, close alibaba-fusion#3886 (alibaba-fusion#4766)

Co-authored-by: lancely <[email protected]>

refactor(Timeline): fix cr comments

fix(Upload): should hide trigger when limit is reached for Upload.Dragger, close alibaba-fusion#3951 (alibaba-fusion#4761)

Co-authored-by: lancely <[email protected]>

feat(DatePicker): improve focus logic, close alibaba-fusion#3998 (alibaba-fusion#4769)

* feat(DatePicker): interactive optimization of date selection box close alibaba-fusion#3998

* feat(DatePicker): improve focus logic

---------

Co-authored-by: WB01081293 <[email protected]>
Co-authored-by: 珵之 <[email protected]>

refactor(Field): convert to TypeScript, impove docs and tests

refactor(Field): convert to TypeScript, impove docs and tests

chore(Field): improve for codereview

chore(Field): fix dependency version

feat(TreeSelect): support useDetailValue, close alibaba-fusion#3531 (alibaba-fusion#4771)

* feat(TreeSelect): support useDetailValue, close alibaba-fusion#3531

* chore(TreeSelect): improve useDetailValue tc and demos by codereview

* test(TreeSelect): add control mode spec for useDetailValue

refactor(Collapse): convert to TypeScript, impove docs and tests

refactor(Collapse): imporve docs and types

chore(Collapse): improve by codereview

chore(Collapse): remove useless propTypes comments

fix(Collapse): hotfix panel className missing

chore(*): Release-1.27.7

chore(Divider): adjust ts & docs & test

chore(Notification): doc & test

chore(Notification): adjust ts types

chore(Notification): lint eg

docs(Search): remove unnecessary symbol ","

chore(Step): rename to ts

refactor(Step): convert to TypeScript, impove docs and tests

chore(Step): improve for codereview

feat(Checkbox): upgrade checkbox ts

refactor(Checkbox): improve ts & tc

refactor(Checkbox): improve doc

refactor(Checkbox): fix comment issues

fix(Drawer): 添加v2 tsdoc & fix onToggleHighlightItem & fix ariaProps

fix(Drawer): docs basic type from drawer/index
  • Loading branch information
骆林 committed Mar 20, 2024
1 parent 142d089 commit 3fdc17d
Show file tree
Hide file tree
Showing 76 changed files with 3,145 additions and 2,628 deletions.
5 changes: 3 additions & 2 deletions components/checkbox/__docs__/demo/all-check/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox, Divider } from '@alifd/next';
import type { CheckboxProps, GroupProps } from '@alifd/next/lib/checkbox';

const CheckboxGroup = Checkbox.Group;

Expand All @@ -12,13 +13,13 @@ const App = () => {
const [indeterminate, setIndeterminate] = React.useState(true);
const [checkAll, setCheckAll] = React.useState(false);

const onChange = list => {
const onChange: GroupProps['onChange'] = (list: string[]) => {
setCheckedList(list);
setIndeterminate(!!list.length && list.length < plainOptions.length);
setCheckAll(list.length === plainOptions.length);
};

const onCheckAllChange = (checked, e) => {
const onCheckAllChange: CheckboxProps['onChange'] = (checked, e) => {
setCheckedList(e.target.checked ? plainOptions : []);
setIndeterminate(false);
setCheckAll(e.target.checked);
Expand Down
21 changes: 6 additions & 15 deletions components/checkbox/__docs__/demo/control/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox } from '@alifd/next';
import { type GroupProps } from '@alifd/next/lib/checkbox';

const list = [
{
Expand All @@ -18,26 +19,16 @@ const list = [
];

class ControlApp extends React.Component {
constructor(props) {
super(props);

this.state = {
value: 'orange',
};

this.onChange = this.onChange.bind(this);
}
state = {
value: 'orange',
};

onChange(value) {
onChange: GroupProps['onChange'] = value => {
this.setState({
value: value,
});
console.log('onChange', value);
}

onClick(e) {
console.log('onClick', e);
}
};

render() {
return (
Expand Down
20 changes: 6 additions & 14 deletions components/checkbox/__docs__/demo/dataSource/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox } from '@alifd/next';
import { type GroupProps } from '@alifd/next/lib/checkbox';

const list = [
{
Expand All @@ -20,28 +21,19 @@ const list = [
];

class App extends React.Component {
constructor(props) {
super(props);

this.state = {
value: 'apple',
};
}
state = {
value: 'apple',
};

onChange = value => {
onChange: GroupProps['onChange'] = value => {
this.setState({
value: value,
});
};

render() {
return (
<Checkbox.Group
dataSource={list}
size="small"
value={this.state.value}
onChange={this.onChange}
/>
<Checkbox.Group dataSource={list} value={this.state.value} onChange={this.onChange} />
);
}
}
Expand Down
17 changes: 6 additions & 11 deletions components/checkbox/__docs__/demo/group/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox } from '@alifd/next';
import { type GroupProps } from '@alifd/next/lib/checkbox';

class App extends React.Component {
constructor(props) {
super(props);
state = {
value: 'orange',
};

this.state = {
value: 'orange',
};

this.onChange = this.onChange.bind(this);
}

onChange(value) {
onChange: GroupProps['onChange'] = value => {
this.setState({
value: value,
});
}
};

render() {
return (
Expand Down
14 changes: 5 additions & 9 deletions components/checkbox/__docs__/demo/indeterminate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ import ReactDOM from 'react-dom';
import { Checkbox, Button } from '@alifd/next';

class IndeterminateApp extends React.Component {
constructor(props) {
super(props);

this.state = {
checked: false,
indeterminate: true,
disabled: false,
};
}
state = {
checked: false,
indeterminate: true,
disabled: false,
};

toggle = () => {
if (this.state.indeterminate) {
Expand Down
5 changes: 3 additions & 2 deletions components/checkbox/__docs__/demo/isPreview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox, Switch } from '@alifd/next';
import { type CheckboxProps, type GroupProps } from '@alifd/next/lib/checkbox';

class App extends React.Component {
state = {
Expand All @@ -20,10 +21,10 @@ class App extends React.Component {
});
};

renderChecked = (checked, props) =>
renderChecked: CheckboxProps['renderPreview'] = (checked, props) =>
checked ? <span>{props.children}</span> : <span>null</span>;

renderPreview = (previewed, props) =>
renderPreview: GroupProps['renderPreview'] = previewed =>
previewed.length
? previewed.map((Item, index) => (
<span key={`${index}-checkbox`} style={{ marginRight: 10 }}>
Expand Down
11 changes: 3 additions & 8 deletions components/checkbox/__docs__/demo/uncontrol/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { Checkbox } from '@alifd/next';
import { type GroupProps } from '@alifd/next/lib/checkbox';

const { Group: CheckboxGroup } = Checkbox;
const list = [
Expand All @@ -21,15 +22,9 @@ const list = [
];

class UnControlApp extends React.Component {
constructor(props) {
super(props);

this.onChange = this.onChange.bind(this);
}

onChange(selectedItems) {
onChange: GroupProps['onChange'] = selectedItems => {
console.log('onChange callback', selectedItems);
}
};

render() {
return (
Expand Down
Loading

0 comments on commit 3fdc17d

Please sign in to comment.