Skip to content

Commit

Permalink
Merge branch 'feat/1.17.0' into typescript-opt
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna authored Aug 5, 2019
2 parents e194520 + 39db197 commit 2829996
Show file tree
Hide file tree
Showing 78 changed files with 4,657 additions and 166 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Change Log

## [1.16.6](https://github.com/alibaba-fusion/next/compare/1.16.5...1.16.6) (2019-08-01)


### Bug Fixes

* **Typescript:** fix menu-button & split-button ([0cfe939](https://github.com/alibaba-fusion/next/commit/0cfe939))




## [1.16.5](https://github.com/alibaba-fusion/next/compare/1.16.4...1.16.5) (2019-08-01)


### Bug Fixes

* **CascaderSelect:** not exist value be removed ([2b1dee8](https://github.com/alibaba-fusion/next/commit/2b1dee8))
* **Dialog:** pass event to onClose of Dialog.show, close [#947](https://github.com/alibaba-fusion/next/issues/947) ([9921578](https://github.com/alibaba-fusion/next/commit/9921578))
* **Field:** use constructor not initValue fix [#924](https://github.com/alibaba-fusion/next/issues/924) ([3fe5cf7](https://github.com/alibaba-fusion/next/commit/3fe5cf7))
* **Pagination:** button style override pagination ([41e9399](https://github.com/alibaba-fusion/next/commit/41e9399))
* **Typescript:** add button props to menu-button split-button ([61a9c54](https://github.com/alibaba-fusion/next/commit/61a9c54))
* **Upload:** bug by Dragger value under controlled. Close [#923](https://github.com/alibaba-fusion/next/issues/923) ([c2ea8a7](https://github.com/alibaba-fusion/next/commit/c2ea8a7))




## [1.16.4](https://github.com/alibaba-fusion/next/compare/1.16.3...1.16.4) (2019-07-23)


Expand Down
4 changes: 2 additions & 2 deletions LATESTLOG.md
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))


83 changes: 83 additions & 0 deletions docs/adaptor.js
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,
};
50 changes: 50 additions & 0 deletions docs/badge/adaptor/index.jsx
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;
}
})
};
87 changes: 87 additions & 0 deletions docs/balloon/adaptor/index.jsx
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',
}
}
})
};
43 changes: 43 additions & 0 deletions docs/breadcrumb/adaptor/index.jsx
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'
};
}
})

};
Loading

0 comments on commit 2829996

Please sign in to comment.