Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
pointhalo committed Jul 22, 2024
2 parents 818a1c8 + 9cceb2b commit 0af52d1
Show file tree
Hide file tree
Showing 42 changed files with 572 additions and 614 deletions.
2 changes: 1 addition & 1 deletion content/basic/typography/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function Demo() {
return (
<div>
<Title style={{ margin: '8px 0' }} >h1. Semi Design</Title>
<Title with={2} style={{ margin: '8px 0' }} >h2. Semi Design</Title>
<Title heading={2} style={{ margin: '8px 0' }} >h2. Semi Design</Title>
<Title heading={3} style={{ margin: '8px 0' }} >h3. Semi Design</Title>
<Title heading={4} style={{ margin: '8px 0' }} >h4. Semi Design</Title>
<Title heading={5} style={{ margin: '8px 0' }} >h5. Semi Design</Title>
Expand Down
60 changes: 30 additions & 30 deletions content/input/datepicker/index.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content/input/form/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ render(WithFieldDemo2);
| className | form 标签的 classname | string |
| component | 用于声明表单控件,不可与 render、props.children 同时使用 | ReactNode | |
| disabled | 统一应用在每个 Field 的 disabled 属性 | boolean | false |
| extraTextPosition | 统一应用在每个 Field 上的extraTextPosition属性,控制extraText的显示位置,可选`middle`(垂直方向以Label、extraText、Field主体的顺序显示)、`bottom` (垂直方向以Label、Field主体、extraText的顺序显示) <br/>**在 v1.9.0 开始提供** | string | 'bottom' |
| extraTextPosition | 统一应用在每个 Field 上的extraTextPosition属性,控制extraText的显示位置,可选`middle`(垂直方向以Label、extraText、Field主体的顺序显示)、`bottom` (垂直方向以Label、Field主体、extraText的顺序显示) | string | 'bottom' |
| getFormApi | form mounted 时会回调该函数,将 formAPI 作为参数传入。formApi 可用于修改 form 内部状态(值、校验状态、错误信息) | function(formApi:object) | |
| initValues | 用于统一设置表单初始值(仅会在组件挂载时消费一次),例如{fieldA:'hello', fieldB:['arr1', 'arr2']} | object | |
| layout | Form 表单控件间的布局,目前支持水平(horizontal)、垂直(vertical)两种 | string | 'vertical' |
Expand Down
2 changes: 1 addition & 1 deletion content/input/pincode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ localeCode: zh-CN
order: 31
category: 输入类
title: PinCode 验证码输入
icon: doc-input
icon: doc-pincode
width: 60%
brief: 用于便捷直观地输入验证码
---
Expand Down
2 changes: 1 addition & 1 deletion content/input/select/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,7 @@ import { Select, Checkbox, Highlight } from '@douyinfe/semi-ui';
| 属性 | 说明 | 类型 | 默认值 | 版本 |
| --- |---------------------------------------------------------------------------------------------------------------------------------------| --- | --- | --- |
| allowCreate | 是否允许用户创建新条目,需配合 filter 使用。该项为true时不再响应 optionList的变更 | boolean | false |
| arrowIcon | 自定义右侧下拉箭头 Icon,当 showClear 开关打开且当前有选中值时,hover 会优先显示 clear icon | ReactNode | | 1.15.0 |
| arrowIcon | 自定义右侧下拉箭头 Icon,当 showClear 开关打开且当前有选中值时,hover 会优先显示 clear icon | ReactNode | | |
| autoAdjustOverflow | 浮层被遮挡时是否自动调整方向(暂时仅支持竖直方向,且插入的父级为 body) | boolean | true |
| autoClearSearchValue | 选中选项后,是否自动清空搜索关键字,当 mutilple、filter 都开启时生效 | boolean | true | 2.3.0 |
| autoFocus | 初始渲染时是否自动 focus | boolean | false |
Expand Down
39 changes: 16 additions & 23 deletions content/input/timepicker/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,6 @@ function Demo() {

### Custom Trigger

**Version:** >=0.34.0

By default we use the `Input` component as the trigger for the `DatePicker` component. You can customize this trigger by passing the `triggerRender` method.

```jsx live=true hideInDSM
Expand All @@ -216,28 +214,23 @@ import { IconChevronDown, IconClose } from '@douyinfe/semi-icons';
function Demo() {
const formatToken = 'HH:mm:ss';
const [time, setTime] = useState(new Date());
const triggerIcon = useMemo(() => {
return time ? (
<IconClose
onClick={e => {
e && e.stopPropagation();
setTime();
}}
/>
) : (
<IconChevronDown />
);
}, [time]);

return (
<TimePicker
value={time}
format={formatToken}
onChange={time => setTime(time)}
triggerRender={({ placeholder }) => (
<Button theme={'light'} icon={triggerIcon} iconPosition={'right'}>
<Tag
color='cyan'
size='large'
shape='circle'
style={{ padding: 12, paddingRight: 16, fontSize: 14 }}
theme={'light'}
prefixIcon={<IconTimePicker />}
>
{time ? dateFns.format(time, formatToken) : placeholder}
</Button>
</Tag>
)}
/>
);
Expand Down Expand Up @@ -299,13 +292,13 @@ function Demo(props = {}) {

| Parameters | Instructions | Type | Default | Version |
| --- |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| --- | --- | --- |
| autoAdjustOverflow | Whether the floating layer automatically adjusts its direction when it is blocked | boolean | true | **0.34.0** |
| autoAdjustOverflow | Whether the floating layer automatically adjusts its direction when it is blocked | boolean | true | |
| autoFocus | Automatic access to focus | boolean | false |
| borderless | borderless mode >=2.33.0 | boolean | |
| className | Outer style name | string | |
| clearIcon | Can be used to customize the clear button, valid when showClear is true | ReactNode | | **2.25.0**|
| clearText | Clear button prompt copy | string | Clear |
| defaultOpen | Whether the panel is open by default | boolean | | **0.19.0** |
| defaultOpen | Whether the panel is open by default | boolean | | |
| defaultValue | Default time | Date\|timeStamp\|string (array when type = "timeRange") | |
| disabled | Disable all operations | boolean | false |
| disabledHours | Prohibited selection of partial hour options | () => number [] | |
Expand All @@ -331,19 +324,19 @@ function Demo(props = {}) {
| prefix | Prefix content | string\|ReactNode | | |
| preventScroll | Indicates whether the browser should scroll the document to display the newly focused element, acting on the focus method inside the component, excluding the component passed in by the user | boolean | | |
| rangeSeparator | time range delimiter | string | "~" |
| scrollItemProps | The props passed through to ScrollItem. The optional values are the same as [ScrollList#API](/zh-CN/show/scrolllist#ScrollItem) | object | | **0.31.0** |
| scrollItemProps | The props passed through to ScrollItem. The optional values are the same as [ScrollList#API](/zh-CN/show/scrolllist#ScrollItem) | object | | |
| secondStep | Second option interval | number | 1 |
| showClear | Whether to show the clear button | boolean | true | **0.35.0**|
| showClear | Whether to show the clear button | boolean | true | |
| stopPropagation | Whether to prevent click events on the popup layer from bubbling | boolean | true | **2.49.0** |
| size | Size of input box, one of 'default', 'small' and 'large' | string | 'default' | |
| triggerRender | Custom trigger rendering method | ({ placeholder: string }) => ReactNode | | **0.34.0** |
| triggerRender | Custom trigger rendering method | ({ placeholder: string }) => ReactNode | | |
| type | type | "time"\|"timeRange" | "time" |
| use12Hours | Using a 12-hour system, `format` default to `h: mm: ssa` when true | boolean | false |
| value | Current time | Date\|timeStamp\|string (array when type = "timeRange") | |
| onBlur | Callback when focus is lost | (e: domEvent) => void | () => {} | **1.0.0** |
| onBlur | Callback when focus is lost | (e: domEvent) => void | () => {} | |
| onChange | A callback in time. | (time: Date\|Date[], timeString: string\|string[]) => void | |
| onChangeWithDateFirst | Set the order of parameter in `onChange`, `true`: (Date, string); `false`: (string, Date) | boolean | true | **2.4.0** |
| onFocus | Callback when focus is obtained | (e: domEvent) => void | () => {} | **1.0.0** |
| onFocus | Callback when focus is obtained | (e: domEvent) => void | () => {} | |
| onOpenChange | A callback when the panel is on / off | (isOpen: boolean) => void | |

## Methods
Expand Down
Loading

0 comments on commit 0af52d1

Please sign in to comment.