forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/1.17.0' into typescript-opt
- Loading branch information
Showing
78 changed files
with
4,657 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Latest Log | ||
|
||
## [1.16.4](https://github.com/alibaba-fusion/next/compare/1.16.3...1.16.4) (2019-07-23) | ||
## [1.16.6](https://github.com/alibaba-fusion/next/compare/1.16.5...1.16.6) (2019-08-01) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **Field:** validate no names fix [#913](https://github.com/alibaba-fusion/next/issues/913) ([d131416](https://github.com/alibaba-fusion/next/commit/d131416)) | ||
* **Typescript:** fix menu-button & split-button ([0cfe939](https://github.com/alibaba-fusion/next/commit/0cfe939)) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import Badge from './badge/adaptor'; | ||
import Balloon from './balloon/adaptor'; | ||
import Breadcrumb from './breadcrumb/adaptor'; | ||
import Button from './button/adaptor'; | ||
import Calendar from './calendar/adaptor'; | ||
import Card from './card/adaptor'; | ||
import Cascader from './cascader/adaptor'; | ||
import CascaderSelect from './cascader-select/adaptor'; | ||
import Checkbox from './checkbox/adaptor'; | ||
import Collapse from './collapse/adaptor'; | ||
import DatePicker from './date-picker/adaptor'; | ||
import Dialog from './dialog/adaptor'; | ||
import Input from './input/adaptor'; | ||
import Loading from './loading/adaptor'; | ||
import Menu from './menu/adaptor'; | ||
import MenuButton from './menu-button/adaptor'; | ||
import Message from './message/adaptor'; | ||
import Nav from './nav/adaptor'; | ||
import NumberPicker from './number-picker/adaptor'; | ||
import Pagination from './pagination/adaptor'; | ||
import Paragraph from './paragraph/adaptor'; | ||
import Progress from './progress/adaptor'; | ||
import Radio from './radio/adaptor'; | ||
import Range from './range/adaptor'; | ||
import Rating from './rating/adaptor'; | ||
import Search from './search/adaptor'; | ||
import Select from './select/adaptor'; | ||
import Slider from './slider/adaptor'; | ||
import SplitButton from './split-button/adaptor'; | ||
import Step from './step/adaptor'; | ||
import Switch from './switch/adaptor'; | ||
import Tab from './tab/adaptor'; | ||
import Table from './table/adaptor'; | ||
import Tag from './tag/adaptor'; | ||
import TimePicker from './time-picker/adaptor'; | ||
import Timeline from './timeline/adaptor'; | ||
import Transfer from './transfer/adaptor'; | ||
import Tree from './tree/adaptor'; | ||
import TreeSelect from './tree-select/adaptor'; | ||
import Upload from './upload/adaptor'; | ||
|
||
module.exports = { | ||
Badge, | ||
Balloon, | ||
Breadcrumb, | ||
Button, | ||
Calendar, | ||
Card, | ||
Cascader, | ||
CascaderSelect, | ||
Checkbox, | ||
Collapse, | ||
DatePicker, | ||
Dialog, | ||
Input, | ||
Loading, | ||
Menu, | ||
MenuButton, | ||
Message, | ||
Nav, | ||
NumberPicker, | ||
Pagination, | ||
Paragraph, | ||
Progress, | ||
Radio, | ||
Range, | ||
Rating, | ||
Search, | ||
Select, | ||
Slider, | ||
SplitButton, | ||
Step, | ||
Switch, | ||
Tab, | ||
Table, | ||
Tag, | ||
TimePicker, | ||
Timeline, | ||
Transfer, | ||
Tree, | ||
TreeSelect, | ||
Upload, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from 'react'; | ||
import { Badge } from '@alifd/next'; | ||
import { Types } from '@alifd/adaptor-helper'; | ||
|
||
export default { | ||
name: 'Badge', | ||
editor: () => ({ | ||
props: [{ | ||
name: 'level', | ||
label: 'Type', | ||
type: Types.enum, | ||
options: ['dot', 'number'], | ||
default: 'dot' | ||
}, { | ||
name: 'count', | ||
type: Types.number, | ||
default: 12, | ||
}] | ||
}), | ||
adaptor: ({ level, count, ...others }) => { | ||
return <Badge {...others} dot={level=== 'dot'} count={level === 'number' ? count : 0} />; | ||
}, | ||
content: () => ({ | ||
options: [{ | ||
name: 'use', | ||
options: ['independent', 'withOthers'], | ||
default: 'withOthers' | ||
}], | ||
transform: (props, { use }) => { | ||
if (use === 'withOthers') { | ||
return { | ||
...props, | ||
children: { | ||
adaptor: 'div', | ||
props: { | ||
style: { | ||
width: '42px', | ||
height: '42px', | ||
borderRadius: '50%', | ||
background: '#eee', | ||
display: 'inline-block' | ||
} | ||
} | ||
} | ||
}; | ||
} | ||
return props; | ||
} | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import React from 'react'; | ||
import { Balloon } from '@alifd/next'; | ||
import { Types } from '@alifd/adaptor-helper'; | ||
|
||
const ALIGN_LIST = [ | ||
{ label: 'Top', value: 'b' }, // (上) | ||
{ label: 'Right', value: 'l' }, // (右) | ||
{ label: 'Bottom', value: 't' }, // (下) | ||
{ label: 'Left', value: 'r' }, // (左) | ||
{ label: 'Top Left', value: 'br' }, // (上左) | ||
{ label: 'Top Right', value: 'bl' }, // (上右) | ||
{ label: 'Bottom Left', value: 'tr' }, // (下左) | ||
{ label: 'Bottom Right', value: 'tl' }, // (下右) | ||
{ label: 'Left Top', value: 'rt' }, // (左上) | ||
{ label: 'Left Bottom', value: 'rb' }, // (左下) | ||
{ label: 'Right Top', value: 'lt' }, // (右上) | ||
{ label: 'Right Bottom', value: 'lb' }, // (右下 及其 两两组合) | ||
]; | ||
|
||
|
||
export default { | ||
name: 'Balloon', | ||
shape: [{ | ||
label: 'Balloon', | ||
value: 'balloon' | ||
}, { | ||
label: 'Tooltip', | ||
value: 'tooltip' | ||
}], | ||
editor: (shape) => { | ||
return { | ||
props: [ | ||
shape === 'balloon' && { | ||
name: 'level', | ||
type: Types.enum, | ||
options: ['normal', 'primary'], | ||
default: 'normal', | ||
}, | ||
{ | ||
name: 'direction', | ||
label: 'Align', | ||
type: Types.enum, | ||
options: ALIGN_LIST, | ||
default: 'b', | ||
}, | ||
shape === 'balloon' ? | ||
{ | ||
name: 'closable', | ||
type: Types.bool, | ||
default: true | ||
} : | ||
null | ||
].filter(v => !!v), | ||
data: { | ||
default: `${shape.substring(0, 1).toUpperCase() + shape.substring(1)} content replace holder.` | ||
} | ||
}; | ||
}, | ||
adaptor: ({ shape, level, direction, closable, data, style, ...others }) => { | ||
return ( | ||
<Balloon.Inner {...others} type={level} style={{position: 'relative', ...style }} isTooltip={shape === 'tooltip'} align={direction} closable={shape === 'balloon' && closable}> | ||
{data} | ||
</Balloon.Inner> | ||
); | ||
}, | ||
content: (shape) => ({ | ||
options: [ | ||
{ | ||
name: 'direction', | ||
options: ALIGN_LIST, | ||
default: 'b' | ||
}, | ||
shape === 'balloon' && { | ||
name: 'closable', | ||
options: ['yes', 'no'], | ||
default: 'yes' | ||
} | ||
].filter(v => !!v), | ||
transform: (props, { direction, closable }) => { | ||
return { | ||
...props, | ||
direction, | ||
closable: closable === 'yes', | ||
} | ||
} | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
import { Breadcrumb } from '@alifd/next'; | ||
import { Types, parseData } from '@alifd/adaptor-helper'; | ||
|
||
export default { | ||
name: 'Breadcrumb', | ||
editor: () => ({ | ||
props: [{ | ||
name: 'ellipsis', | ||
type: Types.bool, | ||
default: false | ||
}], | ||
data: { | ||
icon: true, | ||
default: 'Home\nAll Categories\nWomen\'s Clothing\nBlouses & Shirts 78,999 T-shirts' | ||
} | ||
}), | ||
adaptor: ({ ellipsis, data, ...others }) => { | ||
const props = ellipsis ? { maxNode: 3 } : {}; | ||
const list = parseData(data).filter((it) => it.type === 'node'); | ||
return ( | ||
<Breadcrumb {...others} {...props}> | ||
{ | ||
list.map((item, index) => <Breadcrumb.Item key={`item_${index}`}>{item.value}</Breadcrumb.Item>) | ||
} | ||
</Breadcrumb> | ||
); | ||
}, | ||
content: () => ({ | ||
options: [{ | ||
name: 'ellipsis', | ||
options: ['yes', 'no'], | ||
default: 'no' | ||
}], | ||
transform: (props, { ellipsis }) => { | ||
return { | ||
...props, | ||
ellipsis: ellipsis === 'yes' | ||
}; | ||
} | ||
}) | ||
|
||
}; |
Oops, something went wrong.