Skip to content

Commit

Permalink
feat(*): add followTrigger for component with overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed May 22, 2019
1 parent 8b78283 commit f98fb15
Show file tree
Hide file tree
Showing 30 changed files with 101 additions and 9 deletions.
1 change: 1 addition & 0 deletions docs/balloon/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
| popupStyle | custom style of popup | Object | {} |
| popupClassName | custom className of popup | String | '' |
| popupProps | props of popup | Object | {} |
| followTrigger | follow Trigger or not | Boolean | - |
| id | id of popup. only when you set value, balloon will support accessibility | String | - |

### Balloon.Tooltip
Expand Down
2 changes: 2 additions & 0 deletions docs/balloon/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
| popupStyle | 弹层组件style,透传给Popup | Object | {} |
| popupClassName | 弹层组件className,透传给Popup | String | '' |
| popupProps | 弹层组件属性,透传给Popup | Object | {} |
| followTrigger | 是否跟随滚动 | Boolean | - |
| id | 弹层id, 传入值才会支持无障碍 | String | - |

### Balloon.Tooltip
Expand All @@ -67,6 +68,7 @@
| popupProps | 弹层组件属性,透传给Popup | Object | - |
| pure | 是否pure render | Boolean | - |
| popupContainer | 指定浮层渲染的父节点, 可以为节点id的字符串,也可以返回节点的函数。 | String/Function | - |
| followTrigger | 是否跟随滚动 | Boolean | - |
| id | 弹层id, 传入值才会支持无障碍 | String | - |

## 已知问题
Expand Down
7 changes: 4 additions & 3 deletions docs/cascader-select/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CascaderSelect consists of Select and Cascader. Cascader are hidden in a pop up
| popupClassName | className of dropdown | String | - |
| popupContainer | container of dropdown | String/Function | - |
| popupProps | properties of Popup | Object | {} |
| followTrigger | follow Trigger or not | Boolean | - |

<!-- api-extra-start -->

Expand Down Expand Up @@ -87,7 +88,7 @@ const dataSource = [{
The custom attribute of item in the array is also transparently passed to the data parameter of the onChange function.

<!-- api-extra-end -->


## ARIA and KeyBoard

Expand All @@ -100,8 +101,8 @@ The custom attribute of item in the array is also transparently passed to the da
| Enter | Open the directory or select current item |
| Esc | Close the directory |
| SPACE | Select current item |





Expand Down
1 change: 1 addition & 0 deletions docs/cascader-select/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
| popupClassName | 下拉框样式自定义类名 | String | - |
| popupContainer | 下拉框挂载的容器节点 | String/Function | - |
| popupProps | 透传到 Popup 的属性对象 | Object | {} |
| followTrigger | 是否跟随滚动 | Boolean | - |

<!-- api-extra-start -->

Expand Down
6 changes: 3 additions & 3 deletions docs/cascader/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const dataSource = [{

| 按键 | 说明 |
| :---------- | :--------------------- |
| Left Arrow | 获取同级当前项前一项焦点 |
| Right Arrow | 获取同级当前项后一项焦点 |
| Tab | 进入当前项的子元素,并获取第一个子元素为焦点 |
| Left Arrow | 获取同级当前项前一项焦点 |
| Right Arrow | 获取同级当前项后一项焦点 |
| Tab | 进入当前项的子元素,并获取第一个子元素为焦点 |
| Esc | 返回当前项的父元素并获取焦点 |
| SPACE | 选择当前项 |
3 changes: 2 additions & 1 deletion docs/date-picker/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ DatePicker are used to select a single date for an input.
| popupStyle | Custom style of popup | Object | - |
| popupClassName | Custom className of popup | String | - |
| popupProps | Props of popup | Object | - |
| followTrigger | follow Trigger or not | Boolean | - |
| dateInputAriaLabel | Date input aria-label attr | String | - |

### DatePicker.RangePicker
Expand Down Expand Up @@ -82,7 +83,7 @@ DatePicker are used to select a single date for an input.
## ARIA and KeyBoard

When the `Date Picker` is focused, press `enter` will open popup to input date or time.

| 按键 | 说明 |
| :---------- | :------------------------------ |
| number key | Need to manual input the date, the specified date format |
Expand Down
4 changes: 4 additions & 0 deletions docs/date-picker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ DatePicker 默认情况下接收和返回的数据类型都是 Moment 对象。
| popupStyle | 弹层自定义样式 | Object | - |
| popupClassName | 弹层自定义样式类 | String | - |
| popupProps | 弹层其他属性 | Object | - |
| followTrigger | 是否跟随滚动 | Boolean | - |
| inputProps | 输入框其他属性 | Object | - |
| dateCellRender | 自定义日期渲染函数<br><br>**签名**:<br>Function(value: Object) => ReactNode<br>**参数**:<br>_value_: {Object} 日期值(moment对象)<br>**返回值**:<br>{ReactNode} null<br> | Function | - |
| monthCellRender | 自定义月份渲染函数<br><br>**签名**:<br>Function(calendarDate: Object) => ReactNode<br>**参数**:<br>_calendarDate_: {Object} 对应 Calendar 返回的自定义日期对象<br>**返回值**:<br>{ReactNode} null<br> | Function | - |
Expand Down Expand Up @@ -148,6 +149,7 @@ DatePicker 默认情况下接收和返回的数据类型都是 Moment 对象。
| popupStyle | 弹层自定义样式 | Object | - |
| popupClassName | 弹层自定义样式类 | String | - |
| popupProps | 弹层其他属性 | Object | - |
| followTrigger | 是否跟随滚动 | Boolean | - |
| inputProps | 输入框其他属性 | Object | - |
| monthCellRender | 自定义月份渲染函数<br><br>**签名**:<br>Function(calendarDate: Object) => ReactNode<br>**参数**:<br>_calendarDate_: {Object} 对应 Calendar 返回的自定义日期对象<br>**返回值**:<br>{ReactNode} null<br> | Function | - |
| dateInputAriaLabel | 日期输入框的 aria-label 属性 | String | - |
Expand Down Expand Up @@ -180,6 +182,7 @@ DatePicker 默认情况下接收和返回的数据类型都是 Moment 对象。
| popupStyle | 弹层自定义样式 | Object | - | | |
| popupClassName | 弹层自定义样式类 | String | - | | |
| popupProps | 弹层其他属性 | Object | - | | |
| followTrigger | 是否跟随滚动 | Boolean | - | | |
| inputProps | 输入框其他属性 | Object | - | | |
| dateCellRender | 自定义日期单元格渲染<br><br>**签名**:<br>Function() => void | Function | - | | |
| startDateInputAriaLabel | 开始日期输入框的 aria-label 属性 | String | - | | |
Expand Down Expand Up @@ -212,6 +215,7 @@ DatePicker 默认情况下接收和返回的数据类型都是 Moment 对象。
| popupStyle | 弹层自定义样式 | Object | - |
| popupClassName | 弹层自定义样式类 | String | - |
| popupProps | 弹层其他属性 | Object | - |
| followTrigger | 是否跟随滚动 | Boolean | - |
| inputProps | 输入框其他属性 | Object | - |
| dateInputAriaLabel | 日期输入框的 aria-label 属性 | String | - |

Expand Down
Loading

0 comments on commit f98fb15

Please sign in to comment.