diff --git a/components/calendar/__tests__/__snapshots__/index.test.js.snap b/components/calendar/__tests__/__snapshots__/index.test.js.snap index f44849344c..2f1bbdf3ae 100644 --- a/components/calendar/__tests__/__snapshots__/index.test.js.snap +++ b/components/calendar/__tests__/__snapshots__/index.test.js.snap @@ -207,23 +207,6 @@ exports[`Calendar Calendar should support locale 1`] = ` - -
-
- 30 -
-
-
-
- - + + - - + + - - + + - - + + - - + + + +
+
+ 11 +
+
+
+ diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index ffef332b46..4516550e00 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -6088,10 +6088,9 @@ exports[`ConfigProvider components DatePicker RangePicker configProvider 1`] = ` class="config-picker-range-separator" > - → - + />
- → - + />
- → - + />
- - Name - - + + Name + - - - - + + - - + + - +
- - Name - - + + Name + - - - - + + - - + + - +
- - Name - - + + Name + - - - - + + - - + + - +
- -
- 26 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 6 +
+ diff --git a/components/date-picker/__tests__/__snapshots__/demo.test.js.snap b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap index 22349812c8..e320db9368 100644 --- a/components/date-picker/__tests__/__snapshots__/demo.test.js.snap +++ b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap @@ -383,10 +383,9 @@ exports[`renders ./components/date-picker/demo/bordered.md correctly 1`] = ` class="ant-picker-range-separator" > - → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
- → - + />
1 + +
+ 26 +
+ + + + + 2 + - - - - 2 - + + + + 3 + - - - - 3 - + + + + 4 + - - - - 4 - + + + + 5 + - - - - 5 - + + + + 6 + - - - - 6 - - -
- 6 -
- diff --git a/components/date-picker/generatePicker.tsx b/components/date-picker/generatePicker.tsx deleted file mode 100644 index c97e57cc6a..0000000000 --- a/components/date-picker/generatePicker.tsx +++ /dev/null @@ -1,380 +0,0 @@ -import * as React from 'react'; -import classNames from 'classnames'; -import RCPicker, { RangePicker as RCRangePicker } from 'rc-picker'; -import { GenerateConfig } from 'rc-picker/lib/generate/index'; -import { - PickerBaseProps as RCPickerBaseProps, - PickerDateProps as RCPickerDateProps, - PickerTimeProps as RCPickerTimeProps, -} from 'rc-picker/lib/Picker'; -import { SharedTimeProps } from 'rc-picker/lib/panels/TimePanel'; -import { - RangePickerBaseProps as RCRangePickerBaseProps, - RangePickerDateProps as RCRangePickerDateProps, - RangePickerTimeProps as RCRangePickerTimeProps, -} from 'rc-picker/lib/RangePicker'; -import { PickerMode, Locale as RcPickerLocale } from 'rc-picker/lib/interface'; -import CalendarOutlined from '@ant-design/icons/CalendarOutlined'; -import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined'; -import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; -import { ConfigContext, ConfigConsumerProps } from '../config-provider'; -import LocaleReceiver from '../locale-provider/LocaleReceiver'; -import enUS from './locale/en_US'; -import { getPlaceholder, getRangePlaceholder } from './util'; -import PickerButton from './PickerButton'; -import PickerTag from './PickerTag'; -import SizeContext, { SizeType } from '../config-provider/SizeContext'; -import { TimePickerLocale } from '../time-picker'; - -const Components = { button: PickerButton, rangeItem: PickerTag }; - -function toArray(list: T | T[]): T[] { - if (!list) { - return []; - } - return Array.isArray(list) ? list : [list]; -} - -function getTimeProps( - props: { format?: string; picker?: PickerMode } & SharedTimeProps, -) { - const { format, picker, showHour, showMinute, showSecond, use12Hours } = props; - - const firstFormat = toArray(format)[0]; - const showTimeObj: SharedTimeProps = { ...props }; - - if (firstFormat) { - if (!firstFormat.includes('s') && showSecond === undefined) { - showTimeObj.showSecond = false; - } - if (!firstFormat.includes('m') && showMinute === undefined) { - showTimeObj.showMinute = false; - } - if (!firstFormat.includes('H') && !firstFormat.includes('h') && showHour === undefined) { - showTimeObj.showHour = false; - } - - if ((firstFormat.includes('a') || firstFormat.includes('A')) && use12Hours === undefined) { - showTimeObj.use12Hours = true; - } - } - - if (picker === 'time') { - return showTimeObj; - } - - return { - showTime: showTimeObj, - }; -} - -type InjectDefaultProps = Omit< - Props, - | 'locale' - | 'generateConfig' - | 'prevIcon' - | 'nextIcon' - | 'superPrevIcon' - | 'superNextIcon' - | 'hideHeader' - | 'components' -> & { - locale?: PickerLocale; - size?: SizeType; - bordered?: boolean; -}; - -export type PickerLocale = { - lang: RcPickerLocale & AdditionalPickerLocaleLangProps; - timePickerLocale: TimePickerLocale; -} & AdditionalPickerLocaleProps; - -export type AdditionalPickerLocaleProps = { - dateFormat?: string; - dateTimeFormat?: string; - weekFormat?: string; - monthFormat?: string; -}; - -export type AdditionalPickerLocaleLangProps = { - placeholder: string; - yearPlaceholder?: string; - quarterPlaceholder?: string; - monthPlaceholder?: string; - weekPlaceholder?: string; - rangeYearPlaceholder?: [string, string]; - rangeMonthPlaceholder?: [string, string]; - rangeWeekPlaceholder?: [string, string]; - rangePlaceholder?: [string, string]; -}; - -// Picker Props -export type PickerBaseProps = InjectDefaultProps>; -export type PickerDateProps = InjectDefaultProps>; -export type PickerTimeProps = InjectDefaultProps>; - -export type PickerProps = - | PickerBaseProps - | PickerDateProps - | PickerTimeProps; - -// Range Picker Props -export type RangePickerBaseProps = InjectDefaultProps>; -export type RangePickerDateProps = InjectDefaultProps>; -export type RangePickerTimeProps = InjectDefaultProps>; - -export type RangePickerProps = - | RangePickerBaseProps - | RangePickerDateProps - | RangePickerTimeProps; - -function generatePicker(generateConfig: GenerateConfig) { - // =========================== Picker =========================== - type DatePickerProps = PickerProps; - - function getPicker( - picker?: PickerMode, - displayName?: string, - ) { - class Picker extends React.Component { - static contextType = ConfigContext; - - static displayName: string; - - context: ConfigConsumerProps; - - pickerRef = React.createRef>(); - - focus = () => { - if (this.pickerRef.current) { - this.pickerRef.current.focus(); - } - }; - - blur = () => { - if (this.pickerRef.current) { - this.pickerRef.current.blur(); - } - }; - - getDefaultLocale = () => { - const { locale } = this.props; - const result = { - ...enUS, - ...locale, - }; - result.lang = { - ...result.lang, - ...((locale || {}) as PickerLocale).lang, - }; - return result; - }; - - renderPicker = (locale: PickerLocale) => { - const { getPrefixCls, direction } = this.context; - const { - prefixCls: customizePrefixCls, - className, - size: customizeSize, - bordered = true, - ...restProps - } = this.props; - const { format, showTime } = this.props as any; - const prefixCls = getPrefixCls('picker', customizePrefixCls); - - const additionalProps = { - showToday: true, - }; - - let additionalOverrideProps: any = {}; - if (picker) { - additionalOverrideProps.picker = picker; - } - const mergedPicker = picker || this.props.picker; - - additionalOverrideProps = { - ...additionalOverrideProps, - ...(showTime ? getTimeProps({ format, picker: mergedPicker, ...showTime }) : {}), - ...(mergedPicker === 'time' - ? getTimeProps({ format, ...this.props, picker: mergedPicker }) - : {}), - }; - - return ( - - {size => { - const mergedSize = customizeSize || size; - - return ( - - ref={this.pickerRef} - placeholder={getPlaceholder(mergedPicker, locale)} - suffixIcon={ - mergedPicker === 'time' ? : - } - clearIcon={} - allowClear - transitionName="slide-up" - {...additionalProps} - {...restProps} - {...additionalOverrideProps} - locale={locale!.lang} - className={classNames(className, { - [`${prefixCls}-${mergedSize}`]: mergedSize, - [`${prefixCls}-borderless`]: !bordered, - })} - prefixCls={prefixCls} - generateConfig={generateConfig} - prevIcon={} - nextIcon={} - superPrevIcon={} - superNextIcon={} - components={Components} - direction={direction} - /> - ); - }} - - ); - }; - - render() { - return ( - - {this.renderPicker} - - ); - } - } - - if (displayName) { - Picker.displayName = displayName; - } - - return Picker as React.ComponentClass; - } - - const DatePicker = getPicker(); - const WeekPicker = getPicker, 'picker'>>('week', 'WeekPicker'); - const MonthPicker = getPicker, 'picker'>>('month', 'MonthPicker'); - const YearPicker = getPicker, 'picker'>>('year', 'YearPicker'); - const TimePicker = getPicker, 'picker'>>('time', 'TimePicker'); - - // ======================== Range Picker ======================== - class RangePicker extends React.Component> { - static contextType = ConfigContext; - - context: ConfigConsumerProps; - - pickerRef = React.createRef>(); - - focus = () => { - if (this.pickerRef.current) { - this.pickerRef.current.focus(); - } - }; - - blur = () => { - if (this.pickerRef.current) { - this.pickerRef.current.blur(); - } - }; - - getDefaultLocale = () => { - const { locale } = this.props; - const result = { - ...enUS, - ...locale, - }; - result.lang = { - ...result.lang, - ...((locale || {}) as PickerLocale).lang, - }; - return result; - }; - - renderPicker = (locale: PickerLocale) => { - const { getPrefixCls, direction } = this.context; - const { - prefixCls: customizePrefixCls, - className, - size: customizeSize, - bordered = true, - ...restProps - } = this.props; - const { format, showTime, picker } = this.props as any; - const prefixCls = getPrefixCls('picker', customizePrefixCls); - - let additionalOverrideProps: any = {}; - - additionalOverrideProps = { - ...additionalOverrideProps, - ...(showTime ? getTimeProps({ format, picker, ...showTime }) : {}), - ...(picker === 'time' ? getTimeProps({ format, ...this.props, picker }) : {}), - }; - - return ( - - {size => { - const mergedSize = customizeSize || size; - - return ( - - separator={} - ref={this.pickerRef} - placeholder={getRangePlaceholder(picker, locale)} - suffixIcon={picker === 'time' ? : } - clearIcon={} - allowClear - transitionName="slide-up" - {...restProps} - className={classNames(className, { - [`${prefixCls}-${mergedSize}`]: mergedSize, - [`${prefixCls}-borderless`]: !bordered, - })} - {...additionalOverrideProps} - locale={locale!.lang} - prefixCls={prefixCls} - generateConfig={generateConfig} - prevIcon={} - nextIcon={} - superPrevIcon={} - superNextIcon={} - components={Components} - direction={direction} - /> - ); - }} - - ); - }; - - render() { - return ( - - {this.renderPicker} - - ); - } - } - - // =========================== Export =========================== - type MergedDatePicker = typeof DatePicker & { - WeekPicker: typeof WeekPicker; - MonthPicker: typeof MonthPicker; - YearPicker: typeof YearPicker; - RangePicker: React.ComponentClass>; - TimePicker: typeof TimePicker; - }; - - const MergedDatePicker = DatePicker as MergedDatePicker; - MergedDatePicker.WeekPicker = WeekPicker; - MergedDatePicker.MonthPicker = MonthPicker; - MergedDatePicker.YearPicker = YearPicker; - MergedDatePicker.RangePicker = RangePicker; - MergedDatePicker.TimePicker = TimePicker; - - return MergedDatePicker; -} - -export default generatePicker; diff --git a/components/date-picker/generatePicker/generateRangePicker.tsx b/components/date-picker/generatePicker/generateRangePicker.tsx new file mode 100644 index 0000000000..99ce021133 --- /dev/null +++ b/components/date-picker/generatePicker/generateRangePicker.tsx @@ -0,0 +1,116 @@ +import * as React from 'react'; +import classNames from 'classnames'; +import CalendarOutlined from '@ant-design/icons/CalendarOutlined'; +import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined'; +import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; +import { RangePicker as RCRangePicker } from 'rc-picker'; +import { GenerateConfig } from 'rc-picker/lib/generate/index'; +import enUS from '../locale/en_US'; +import { ConfigContext, ConfigConsumerProps } from '../../config-provider'; +import SizeContext from '../../config-provider/SizeContext'; +import LocaleReceiver from '../../locale-provider/LocaleReceiver'; +import { getRangePlaceholder } from '../util'; +import { RangePickerProps, PickerLocale, getTimeProps, Components } from '.'; + +export default function generateRangePicker( + generateConfig: GenerateConfig, +): React.ComponentClass> { + class RangePicker extends React.Component> { + static contextType = ConfigContext; + + context: ConfigConsumerProps; + + pickerRef = React.createRef>(); + + focus = () => { + if (this.pickerRef.current) { + this.pickerRef.current.focus(); + } + }; + + blur = () => { + if (this.pickerRef.current) { + this.pickerRef.current.blur(); + } + }; + + getDefaultLocale = () => { + const { locale } = this.props; + const result = { + ...enUS, + ...locale, + }; + result.lang = { + ...result.lang, + ...((locale || {}) as PickerLocale).lang, + }; + return result; + }; + + renderPicker = (locale: PickerLocale) => { + const { getPrefixCls, direction } = this.context; + const { + prefixCls: customizePrefixCls, + className, + size: customizeSize, + bordered = true, + ...restProps + } = this.props; + const { format, showTime, picker } = this.props as any; + const prefixCls = getPrefixCls('picker', customizePrefixCls); + + let additionalOverrideProps: any = {}; + + additionalOverrideProps = { + ...additionalOverrideProps, + ...(showTime ? getTimeProps({ format, picker, ...showTime }) : {}), + ...(picker === 'time' ? getTimeProps({ format, ...this.props, picker }) : {}), + }; + + return ( + + {size => { + const mergedSize = customizeSize || size; + + return ( + + separator={} + ref={this.pickerRef} + placeholder={getRangePlaceholder(picker, locale)} + suffixIcon={picker === 'time' ? : } + clearIcon={} + allowClear + transitionName="slide-up" + {...restProps} + className={classNames(className, { + [`${prefixCls}-${mergedSize}`]: mergedSize, + [`${prefixCls}-borderless`]: !bordered, + })} + {...additionalOverrideProps} + locale={locale!.lang} + prefixCls={prefixCls} + generateConfig={generateConfig} + prevIcon={} + nextIcon={} + superPrevIcon={} + superNextIcon={} + components={Components} + direction={direction} + /> + ); + }} + + ); + }; + + render() { + return ( + + {this.renderPicker} + + ); + } + } + + return RangePicker; +} diff --git a/components/date-picker/generatePicker/generateSinglePicker.tsx b/components/date-picker/generatePicker/generateSinglePicker.tsx new file mode 100644 index 0000000000..3c28fe4d23 --- /dev/null +++ b/components/date-picker/generatePicker/generateSinglePicker.tsx @@ -0,0 +1,155 @@ +import * as React from 'react'; +import classNames from 'classnames'; +import CalendarOutlined from '@ant-design/icons/CalendarOutlined'; +import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined'; +import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled'; +import RCPicker from 'rc-picker'; +import { PickerMode } from 'rc-picker/lib/interface'; +import { GenerateConfig } from 'rc-picker/lib/generate/index'; +import enUS from '../locale/en_US'; +import { getPlaceholder } from '../util'; +import { ConfigContext, ConfigConsumerProps } from '../../config-provider'; +import LocaleReceiver from '../../locale-provider/LocaleReceiver'; +import SizeContext from '../../config-provider/SizeContext'; +import { + PickerProps, + PickerLocale, + PickerDateProps, + PickerTimeProps, + getTimeProps, + Components, +} from '.'; + +export default function generatePicker(generateConfig: GenerateConfig) { + type DatePickerProps = PickerProps; + + function getPicker( + picker?: PickerMode, + displayName?: string, + ) { + class Picker extends React.Component { + static contextType = ConfigContext; + + static displayName: string; + + context: ConfigConsumerProps; + + pickerRef = React.createRef>(); + + focus = () => { + if (this.pickerRef.current) { + this.pickerRef.current.focus(); + } + }; + + blur = () => { + if (this.pickerRef.current) { + this.pickerRef.current.blur(); + } + }; + + getDefaultLocale = () => { + const { locale } = this.props; + const result = { + ...enUS, + ...locale, + }; + result.lang = { + ...result.lang, + ...((locale || {}) as PickerLocale).lang, + }; + return result; + }; + + renderPicker = (locale: PickerLocale) => { + const { getPrefixCls, direction } = this.context; + const { + prefixCls: customizePrefixCls, + className, + size: customizeSize, + bordered = true, + ...restProps + } = this.props; + const { format, showTime } = this.props as any; + const prefixCls = getPrefixCls('picker', customizePrefixCls); + + const additionalProps = { + showToday: true, + }; + + let additionalOverrideProps: any = {}; + if (picker) { + additionalOverrideProps.picker = picker; + } + const mergedPicker = picker || this.props.picker; + + additionalOverrideProps = { + ...additionalOverrideProps, + ...(showTime ? getTimeProps({ format, picker: mergedPicker, ...showTime }) : {}), + ...(mergedPicker === 'time' + ? getTimeProps({ format, ...this.props, picker: mergedPicker }) + : {}), + }; + + return ( + + {size => { + const mergedSize = customizeSize || size; + + return ( + + ref={this.pickerRef} + placeholder={getPlaceholder(mergedPicker, locale)} + suffixIcon={ + mergedPicker === 'time' ? : + } + clearIcon={} + allowClear + transitionName="slide-up" + {...additionalProps} + {...restProps} + {...additionalOverrideProps} + locale={locale!.lang} + className={classNames(className, { + [`${prefixCls}-${mergedSize}`]: mergedSize, + [`${prefixCls}-borderless`]: !bordered, + })} + prefixCls={prefixCls} + generateConfig={generateConfig} + prevIcon={} + nextIcon={} + superPrevIcon={} + superNextIcon={} + components={Components} + direction={direction} + /> + ); + }} + + ); + }; + + render() { + return ( + + {this.renderPicker} + + ); + } + } + + if (displayName) { + Picker.displayName = displayName; + } + + return Picker as React.ComponentClass; + } + + const DatePicker = getPicker(); + const WeekPicker = getPicker, 'picker'>>('week', 'WeekPicker'); + const MonthPicker = getPicker, 'picker'>>('month', 'MonthPicker'); + const YearPicker = getPicker, 'picker'>>('year', 'YearPicker'); + const TimePicker = getPicker, 'picker'>>('time', 'TimePicker'); + + return { DatePicker, WeekPicker, MonthPicker, YearPicker, TimePicker }; +} diff --git a/components/date-picker/generatePicker/index.tsx b/components/date-picker/generatePicker/index.tsx new file mode 100644 index 0000000000..3496b08c57 --- /dev/null +++ b/components/date-picker/generatePicker/index.tsx @@ -0,0 +1,152 @@ +import * as React from 'react'; +import { GenerateConfig } from 'rc-picker/lib/generate/index'; +import { + PickerBaseProps as RCPickerBaseProps, + PickerDateProps as RCPickerDateProps, + PickerTimeProps as RCPickerTimeProps, +} from 'rc-picker/lib/Picker'; +import { SharedTimeProps } from 'rc-picker/lib/panels/TimePanel'; +import { + RangePickerBaseProps as RCRangePickerBaseProps, + RangePickerDateProps as RCRangePickerDateProps, + RangePickerTimeProps as RCRangePickerTimeProps, +} from 'rc-picker/lib/RangePicker'; +import { PickerMode, Locale as RcPickerLocale } from 'rc-picker/lib/interface'; +import { SizeType } from '../../config-provider/SizeContext'; +import PickerButton from '../PickerButton'; +import PickerTag from '../PickerTag'; +import { TimePickerLocale } from '../../time-picker'; +import generateSinglePicker from './generateSinglePicker'; +import generateRangePicker from './generateRangePicker'; + +export const Components = { button: PickerButton, rangeItem: PickerTag }; + +function toArray(list: T | T[]): T[] { + if (!list) { + return []; + } + return Array.isArray(list) ? list : [list]; +} + +export function getTimeProps( + props: { format?: string; picker?: PickerMode } & SharedTimeProps, +) { + const { format, picker, showHour, showMinute, showSecond, use12Hours } = props; + + const firstFormat = toArray(format)[0]; + const showTimeObj: SharedTimeProps = { ...props }; + + if (firstFormat) { + if (!firstFormat.includes('s') && showSecond === undefined) { + showTimeObj.showSecond = false; + } + if (!firstFormat.includes('m') && showMinute === undefined) { + showTimeObj.showMinute = false; + } + if (!firstFormat.includes('H') && !firstFormat.includes('h') && showHour === undefined) { + showTimeObj.showHour = false; + } + + if ((firstFormat.includes('a') || firstFormat.includes('A')) && use12Hours === undefined) { + showTimeObj.use12Hours = true; + } + } + + if (picker === 'time') { + return showTimeObj; + } + + return { + showTime: showTimeObj, + }; +} + +type InjectDefaultProps = Omit< + Props, + | 'locale' + | 'generateConfig' + | 'prevIcon' + | 'nextIcon' + | 'superPrevIcon' + | 'superNextIcon' + | 'hideHeader' + | 'components' +> & { + locale?: PickerLocale; + size?: SizeType; + bordered?: boolean; +}; + +export type PickerLocale = { + lang: RcPickerLocale & AdditionalPickerLocaleLangProps; + timePickerLocale: TimePickerLocale; +} & AdditionalPickerLocaleProps; + +export type AdditionalPickerLocaleProps = { + dateFormat?: string; + dateTimeFormat?: string; + weekFormat?: string; + monthFormat?: string; +}; + +export type AdditionalPickerLocaleLangProps = { + placeholder: string; + yearPlaceholder?: string; + quarterPlaceholder?: string; + monthPlaceholder?: string; + weekPlaceholder?: string; + rangeYearPlaceholder?: [string, string]; + rangeMonthPlaceholder?: [string, string]; + rangeWeekPlaceholder?: [string, string]; + rangePlaceholder?: [string, string]; +}; + +// Picker Props +export type PickerBaseProps = InjectDefaultProps>; +export type PickerDateProps = InjectDefaultProps>; +export type PickerTimeProps = InjectDefaultProps>; + +export type PickerProps = + | PickerBaseProps + | PickerDateProps + | PickerTimeProps; + +// Range Picker Props +export type RangePickerBaseProps = InjectDefaultProps>; +export type RangePickerDateProps = InjectDefaultProps>; +export type RangePickerTimeProps = InjectDefaultProps>; + +export type RangePickerProps = + | RangePickerBaseProps + | RangePickerDateProps + | RangePickerTimeProps; + +function generatePicker(generateConfig: GenerateConfig) { + // =========================== Picker =========================== + const { DatePicker, WeekPicker, MonthPicker, YearPicker, TimePicker } = generateSinglePicker( + generateConfig, + ); + + // ======================== Range Picker ======================== + const RangePicker = generateRangePicker(generateConfig); + + // =========================== Export =========================== + type MergedDatePicker = typeof DatePicker & { + WeekPicker: typeof WeekPicker; + MonthPicker: typeof MonthPicker; + YearPicker: typeof YearPicker; + RangePicker: React.ComponentClass>; + TimePicker: typeof TimePicker; + }; + + const MergedDatePicker = DatePicker as MergedDatePicker; + MergedDatePicker.WeekPicker = WeekPicker; + MergedDatePicker.MonthPicker = MonthPicker; + MergedDatePicker.YearPicker = YearPicker; + MergedDatePicker.RangePicker = RangePicker; + MergedDatePicker.TimePicker = TimePicker; + + return MergedDatePicker; +} + +export default generatePicker; diff --git a/components/date-picker/style/index.less b/components/date-picker/style/index.less index 222e35013f..de72a43278 100644 --- a/components/date-picker/style/index.less +++ b/components/date-picker/style/index.less @@ -126,15 +126,35 @@ } &-separator { + position: relative; display: inline-block; - align-self: center; - width: 2em; + width: 1em; height: @font-size-lg; - color: @disabled-color; - font-size: @font-size-lg; - line-height: @font-size-lg; - text-align: center; + vertical-align: top; cursor: default; + + &::before, + &::after { + position: absolute; + border-top: 1px solid #979797; + content: ''; + } + + &::before { + top: 50%; + left: 0.1em; + width: 0.8em; + } + + &::after { + top: 50%; + right: 0.11em; + width: 0.8em; + width: 0.3em; + transform: rotate(45deg); + transform-origin: 100% 100%; + } + .@{picker-prefix-cls}-range-separator & { .@{picker-prefix-cls}-disabled & { cursor: not-allowed; @@ -174,6 +194,12 @@ opacity: 1; } } + + &-separator { + align-items: center; + padding: 0 @padding-xs; + line-height: 1; + } } // ======================= Dropdown ======================= diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap index f5ea9f8fd2..eba1c41ea2 100644 --- a/components/form/__tests__/__snapshots__/demo.test.js.snap +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -3552,10 +3552,9 @@ exports[`renders ./components/form/demo/time-related-controls.md correctly 1`] = class="ant-picker-range-separator" > - → - + />
- → - + />
any | - | | required | Whether provided or not, it will be generated by the validation rule | boolean | false | | rules | Rules for field validation. Click [here](#components-form-demo-basic) to see an example | [Rule](#Rule)[] | - | -| shouldUpdate | Custom field update logic. See [bellow](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | +| shouldUpdate | Custom field update logic. See [below](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | | trigger | When to collect the value of children node | string | onChange | | validateFirst | Whether stop validate on first rule of error for this field | boolean | false | | validateStatus | The validation status. If not provided, it will be generated by validation rule. options: 'success' 'warning' 'error' 'validating' | string | - | diff --git a/components/input/__tests__/__snapshots__/demo.test.js.snap b/components/input/__tests__/__snapshots__/demo.test.js.snap index c8fe97791a..d66d71c183 100644 --- a/components/input/__tests__/__snapshots__/demo.test.js.snap +++ b/components/input/__tests__/__snapshots__/demo.test.js.snap @@ -700,10 +700,9 @@ exports[`renders ./components/input/demo/align.md correctly 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -793,16 +793,6 @@ exports[`Locale Provider set moment locale when locale changes 2`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -2244,6 +2244,16 @@ exports[`Locale Provider should display the text as ar 1`] = ` + +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -4116,10 +4116,9 @@ exports[`Locale Provider should display the text as ar 1`] = ` class="ant-picker-range-separator" > - → - + />
+ +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -4816,6 +4815,16 @@ exports[`Locale Provider should display the text as ar 1`] = ` + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 11 -
- @@ -5848,6 +5847,23 @@ exports[`Locale Provider should display the text as ar 1`] = ` + +
+
+ 26 +
+
+
+
+ +
- - + + - - + + - - + + - - + + - - - -
-
- 07 -
-
-
- @@ -7205,16 +7204,6 @@ exports[`Locale Provider should display the text as az 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -9077,10 +9076,9 @@ exports[`Locale Provider should display the text as az 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -9777,6 +9775,66 @@ exports[`Locale Provider should display the text as az 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -10809,23 +10807,6 @@ exports[`Locale Provider should display the text as az 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -12166,16 +12164,6 @@ exports[`Locale Provider should display the text as bg 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -14038,10 +14036,9 @@ exports[`Locale Provider should display the text as bg 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -14738,6 +14735,66 @@ exports[`Locale Provider should display the text as bg 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -15770,23 +15767,6 @@ exports[`Locale Provider should display the text as bg 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -17127,16 +17124,6 @@ exports[`Locale Provider should display the text as ca 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -18999,10 +18996,9 @@ exports[`Locale Provider should display the text as ca 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -19699,6 +19695,66 @@ exports[`Locale Provider should display the text as ca 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -20731,23 +20727,6 @@ exports[`Locale Provider should display the text as ca 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -22088,16 +22084,6 @@ exports[`Locale Provider should display the text as cs 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -23960,10 +23956,9 @@ exports[`Locale Provider should display the text as cs 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -24660,6 +24655,66 @@ exports[`Locale Provider should display the text as cs 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -25692,23 +25687,6 @@ exports[`Locale Provider should display the text as cs 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -27049,16 +27044,6 @@ exports[`Locale Provider should display the text as da 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -28921,10 +28916,9 @@ exports[`Locale Provider should display the text as da 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -29621,6 +29615,66 @@ exports[`Locale Provider should display the text as da 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -30653,23 +30647,6 @@ exports[`Locale Provider should display the text as da 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -32010,16 +32004,6 @@ exports[`Locale Provider should display the text as de 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -33882,10 +33876,9 @@ exports[`Locale Provider should display the text as de 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -34582,6 +34575,66 @@ exports[`Locale Provider should display the text as de 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -35614,23 +35607,6 @@ exports[`Locale Provider should display the text as de 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -36971,16 +36964,6 @@ exports[`Locale Provider should display the text as el 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -38843,10 +38836,9 @@ exports[`Locale Provider should display the text as el 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -39543,6 +39535,66 @@ exports[`Locale Provider should display the text as el 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -40575,23 +40567,6 @@ exports[`Locale Provider should display the text as el 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -43804,10 +43796,9 @@ exports[`Locale Provider should display the text as en 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -48765,10 +48756,9 @@ exports[`Locale Provider should display the text as en-gb 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -49465,6 +49455,66 @@ exports[`Locale Provider should display the text as en-gb 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -50497,23 +50487,6 @@ exports[`Locale Provider should display the text as en-gb 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -51854,16 +51844,6 @@ exports[`Locale Provider should display the text as es 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -53726,10 +53716,9 @@ exports[`Locale Provider should display the text as es 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -54426,6 +54415,66 @@ exports[`Locale Provider should display the text as es 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -55458,23 +55447,6 @@ exports[`Locale Provider should display the text as es 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -56815,16 +56804,6 @@ exports[`Locale Provider should display the text as et 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -58687,10 +58676,9 @@ exports[`Locale Provider should display the text as et 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -59387,6 +59375,66 @@ exports[`Locale Provider should display the text as et 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -60419,23 +60407,6 @@ exports[`Locale Provider should display the text as et 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -61776,6 +61764,16 @@ exports[`Locale Provider should display the text as fa 1`] = ` + +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -63648,10 +63636,9 @@ exports[`Locale Provider should display the text as fa 1`] = ` class="ant-picker-range-separator" > - → - + />
+ +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -64348,6 +64335,16 @@ exports[`Locale Provider should display the text as fa 1`] = ` + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 11 -
- @@ -65380,6 +65367,23 @@ exports[`Locale Provider should display the text as fa 1`] = ` + +
+
+ 26 +
+
+
+
+ +
- - + + - - + + - - + + - - + + - - - -
-
- 07 -
-
-
- @@ -66737,16 +66724,6 @@ exports[`Locale Provider should display the text as fi 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -68609,10 +68596,9 @@ exports[`Locale Provider should display the text as fi 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -69309,6 +69295,66 @@ exports[`Locale Provider should display the text as fi 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -70341,23 +70327,6 @@ exports[`Locale Provider should display the text as fi 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -71698,16 +71684,6 @@ exports[`Locale Provider should display the text as fr 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -73570,10 +73556,9 @@ exports[`Locale Provider should display the text as fr 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -74270,6 +74255,66 @@ exports[`Locale Provider should display the text as fr 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -75302,23 +75287,6 @@ exports[`Locale Provider should display the text as fr 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -76659,16 +76644,6 @@ exports[`Locale Provider should display the text as fr 2`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -78531,10 +78516,9 @@ exports[`Locale Provider should display the text as fr 2`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -79231,6 +79215,66 @@ exports[`Locale Provider should display the text as fr 2`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -80263,23 +80247,6 @@ exports[`Locale Provider should display the text as fr 2`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -83492,10 +83476,9 @@ exports[`Locale Provider should display the text as he 1`] = ` class="ant-picker-range-separator" > - → - + />
- → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -93414,10 +93396,9 @@ exports[`Locale Provider should display the text as hr 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -94114,6 +94095,66 @@ exports[`Locale Provider should display the text as hr 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -95146,23 +95127,6 @@ exports[`Locale Provider should display the text as hr 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -96503,16 +96484,6 @@ exports[`Locale Provider should display the text as hu 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -98375,10 +98356,9 @@ exports[`Locale Provider should display the text as hu 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -99075,6 +99055,66 @@ exports[`Locale Provider should display the text as hu 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -100107,23 +100087,6 @@ exports[`Locale Provider should display the text as hu 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -101464,16 +101444,6 @@ exports[`Locale Provider should display the text as hy-am 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -103336,10 +103316,9 @@ exports[`Locale Provider should display the text as hy-am 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -104036,6 +104015,66 @@ exports[`Locale Provider should display the text as hy-am 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -105068,23 +105047,6 @@ exports[`Locale Provider should display the text as hy-am 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -106425,16 +106404,6 @@ exports[`Locale Provider should display the text as id 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -108297,10 +108276,9 @@ exports[`Locale Provider should display the text as id 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -108997,6 +108975,66 @@ exports[`Locale Provider should display the text as id 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -110029,23 +110007,6 @@ exports[`Locale Provider should display the text as id 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -111386,16 +111364,6 @@ exports[`Locale Provider should display the text as is 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -113258,10 +113236,9 @@ exports[`Locale Provider should display the text as is 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -113958,6 +113935,66 @@ exports[`Locale Provider should display the text as is 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -114990,23 +114967,6 @@ exports[`Locale Provider should display the text as is 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -116347,16 +116324,6 @@ exports[`Locale Provider should display the text as it 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -118219,10 +118196,9 @@ exports[`Locale Provider should display the text as it 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -118919,6 +118895,66 @@ exports[`Locale Provider should display the text as it 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -119951,23 +119927,6 @@ exports[`Locale Provider should display the text as it 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -123180,10 +123156,9 @@ exports[`Locale Provider should display the text as ja 1`] = ` class="ant-picker-range-separator" > - → - + />
- → - + />
- → - + />
+ +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -138063,10 +138036,9 @@ exports[`Locale Provider should display the text as ku-iq 1`] = ` class="ant-picker-range-separator" > - → - + />
+ +
+ 26 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 7 -
- @@ -138763,6 +138735,16 @@ exports[`Locale Provider should display the text as ku-iq 1`] = ` + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 11 -
- @@ -139795,6 +139767,23 @@ exports[`Locale Provider should display the text as ku-iq 1`] = ` + +
+
+ 26 +
+
+
+
+ +
- - + + - - + + - - + + - - + + - - - -
-
- 07 -
-
-
- @@ -141152,16 +141124,6 @@ exports[`Locale Provider should display the text as lv 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -143024,10 +142996,9 @@ exports[`Locale Provider should display the text as lv 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -143724,6 +143695,66 @@ exports[`Locale Provider should display the text as lv 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -144756,23 +144727,6 @@ exports[`Locale Provider should display the text as lv 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -146113,16 +146084,6 @@ exports[`Locale Provider should display the text as mk 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -147985,10 +147956,9 @@ exports[`Locale Provider should display the text as mk 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -148685,6 +148655,66 @@ exports[`Locale Provider should display the text as mk 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -149717,23 +149687,6 @@ exports[`Locale Provider should display the text as mk 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -152946,10 +152916,9 @@ exports[`Locale Provider should display the text as mn-mn 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -157907,10 +157876,9 @@ exports[`Locale Provider should display the text as ms-my 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -158607,6 +158575,66 @@ exports[`Locale Provider should display the text as ms-my 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -159639,23 +159607,6 @@ exports[`Locale Provider should display the text as ms-my 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -160996,16 +160964,6 @@ exports[`Locale Provider should display the text as nb 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -162868,10 +162836,9 @@ exports[`Locale Provider should display the text as nb 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -163568,6 +163535,66 @@ exports[`Locale Provider should display the text as nb 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -164600,23 +164567,6 @@ exports[`Locale Provider should display the text as nb 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -167829,10 +167796,9 @@ exports[`Locale Provider should display the text as ne-np 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -172790,10 +172756,9 @@ exports[`Locale Provider should display the text as nl 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -173490,6 +173455,66 @@ exports[`Locale Provider should display the text as nl 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -174522,23 +174487,6 @@ exports[`Locale Provider should display the text as nl 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -175879,16 +175844,6 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -177751,10 +177716,9 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -178451,6 +178415,66 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -179483,23 +179447,6 @@ exports[`Locale Provider should display the text as nl-be 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -180840,16 +180804,6 @@ exports[`Locale Provider should display the text as pl 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -182712,10 +182676,9 @@ exports[`Locale Provider should display the text as pl 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -183412,6 +183375,66 @@ exports[`Locale Provider should display the text as pl 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -184444,23 +184407,6 @@ exports[`Locale Provider should display the text as pl 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -185801,16 +185764,6 @@ exports[`Locale Provider should display the text as pt 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -187673,10 +187636,9 @@ exports[`Locale Provider should display the text as pt 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -188373,6 +188335,66 @@ exports[`Locale Provider should display the text as pt 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -189405,23 +189367,6 @@ exports[`Locale Provider should display the text as pt 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -192634,10 +192596,9 @@ exports[`Locale Provider should display the text as pt-br 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -197595,10 +197556,9 @@ exports[`Locale Provider should display the text as ro 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -198295,6 +198255,66 @@ exports[`Locale Provider should display the text as ro 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -199327,23 +199287,6 @@ exports[`Locale Provider should display the text as ro 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -200684,16 +200644,6 @@ exports[`Locale Provider should display the text as ru 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -202556,10 +202516,9 @@ exports[`Locale Provider should display the text as ru 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -203256,6 +203215,66 @@ exports[`Locale Provider should display the text as ru 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -204288,23 +204247,6 @@ exports[`Locale Provider should display the text as ru 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -205645,16 +205604,6 @@ exports[`Locale Provider should display the text as sk 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -207517,10 +207476,9 @@ exports[`Locale Provider should display the text as sk 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -208217,6 +208175,66 @@ exports[`Locale Provider should display the text as sk 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -209249,23 +209207,6 @@ exports[`Locale Provider should display the text as sk 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -210606,16 +210564,6 @@ exports[`Locale Provider should display the text as sl 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -212478,10 +212436,9 @@ exports[`Locale Provider should display the text as sl 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -213178,6 +213135,66 @@ exports[`Locale Provider should display the text as sl 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -214210,23 +214167,6 @@ exports[`Locale Provider should display the text as sl 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -215567,16 +215524,6 @@ exports[`Locale Provider should display the text as sr 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -217439,10 +217396,9 @@ exports[`Locale Provider should display the text as sr 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -218139,6 +218095,66 @@ exports[`Locale Provider should display the text as sr 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -219171,23 +219127,6 @@ exports[`Locale Provider should display the text as sr 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -220528,16 +220484,6 @@ exports[`Locale Provider should display the text as sv 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -222400,10 +222356,9 @@ exports[`Locale Provider should display the text as sv 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -223100,6 +223055,66 @@ exports[`Locale Provider should display the text as sv 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -224132,23 +224087,6 @@ exports[`Locale Provider should display the text as sv 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -227361,10 +227316,9 @@ exports[`Locale Provider should display the text as ta 1`] = ` class="ant-picker-range-separator" > - → - + />
- → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -237283,10 +237236,9 @@ exports[`Locale Provider should display the text as tr 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -237983,6 +237935,66 @@ exports[`Locale Provider should display the text as tr 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -239015,23 +238967,6 @@ exports[`Locale Provider should display the text as tr 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -240372,16 +240324,6 @@ exports[`Locale Provider should display the text as uk 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -242244,10 +242196,9 @@ exports[`Locale Provider should display the text as uk 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -242944,6 +242895,66 @@ exports[`Locale Provider should display the text as uk 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -243976,23 +243927,6 @@ exports[`Locale Provider should display the text as uk 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -245333,16 +245284,6 @@ exports[`Locale Provider should display the text as vi 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -247205,10 +247156,9 @@ exports[`Locale Provider should display the text as vi 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -247905,6 +247855,66 @@ exports[`Locale Provider should display the text as vi 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -248937,23 +248887,6 @@ exports[`Locale Provider should display the text as vi 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -250294,16 +250244,6 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` - -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -252166,10 +252116,9 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` class="ant-picker-range-separator" > - → - + />
- -
- 27 -
- - - + + - - + + - - + + - - + + - - + + + +
+ 8 +
+ @@ -252866,6 +252815,66 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` + +
+ 25 +
+ + +
+ 26 +
+ + +
+ 27 +
+ + +
+ 28 +
+ + +
+ 29 +
+ + +
+ 30 +
+ + + - - + + - - + + - - + + - - + + - - - -
- 6 -
- - -
- 7 -
- - -
- 8 -
- - -
- 9 -
- - -
- 10 -
- - -
- 11 -
- @@ -253898,23 +253847,6 @@ exports[`Locale Provider should display the text as zh-cn 1`] = ` - -
-
- 27 -
-
-
-
- -
+ + - - + + - - + + - - + + - - + + + +
+
+ 08 +
+
+
+ @@ -257127,10 +257076,9 @@ exports[`Locale Provider should display the text as zh-tw 1`] = ` class="ant-picker-range-separator" > - → - + />
{} } }; function getDropdownWrapper(wrapper) { - return mount( - wrapper - .find('Trigger') - .instance() - .getComponent(), - ); + return mount(wrapper.find('Trigger').instance().getComponent()); } describe('Table.filter', () => { @@ -62,6 +57,18 @@ describe('Table.filter', () => { return wrapper.find('BodyRow').map(row => row.props().record.name); } + it('not show filter icon when undefined', () => { + const noFilterColumn = { ...column, filters: undefined }; + delete noFilterColumn.onFilter; + const wrapper = mount( + createTable({ + columns: [noFilterColumn], + }), + ); + + expect(wrapper.find('.ant-table-filter-column')).toHaveLength(0); + }); + it('renders filter correctly', () => { const wrapper = mount(createTable()); @@ -213,7 +220,10 @@ describe('Table.filter', () => { expect(wrapper.find('FilterDropdown').props().filterState.filteredKeys).toBeFalsy(); wrapper.find('FilterDropdown').find('input[type="checkbox"]').first().simulate('click'); - wrapper.find('FilterDropdown').find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); + wrapper + .find('FilterDropdown') + .find('.ant-table-filter-dropdown-btns .ant-btn-primary') + .simulate('click'); expect(wrapper.find('FilterDropdown').props().filterState.filteredKeys).toEqual(['boy']); wrapper.setProps({ dataSource: [...data, { key: 999, name: 'Chris' }] }); expect(wrapper.find('FilterDropdown').props().filterState.filteredKeys).toEqual(['boy']); @@ -342,7 +352,10 @@ describe('Table.filter', () => { const wrapper = mount(createTable({ onChange: handleChange })); wrapper.find('.ant-dropdown-trigger').first().simulate('click'); wrapper.find('FilterDropdown').find('MenuItem').first().simulate('click'); - wrapper.find('FilterDropdown').find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); + wrapper + .find('FilterDropdown') + .find('.ant-table-filter-dropdown-btns .ant-btn-primary') + .simulate('click'); expect(handleChange).toHaveBeenCalledWith( {}, { name: ['boy'] }, @@ -358,12 +371,15 @@ describe('Table.filter', () => { const wrapper = mount(createTable({ pagination: { onChange: onPaginationChange } })); wrapper.find('.ant-dropdown-trigger').first().simulate('click'); wrapper.find('FilterDropdown').find('MenuItem').first().simulate('click'); - wrapper.find('FilterDropdown').find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); + wrapper + .find('FilterDropdown') + .find('.ant-table-filter-dropdown-btns .ant-btn-primary') + .simulate('click'); expect(onPaginationChange).toHaveBeenCalledWith(1, 10); }); - it('should not fire change event on close filterDropdown without changing anything', () => { + it('should not fire change event when close filterDropdown without changing anything', () => { const handleChange = jest.fn(); const wrapper = mount(createTable({ onChange: handleChange })); @@ -373,6 +389,26 @@ describe('Table.filter', () => { expect(handleChange).not.toHaveBeenCalled(); }); + it('should not fire change event when close a filtered filterDropdown without changing anything', () => { + const handleChange = jest.fn(); + const wrapper = mount( + createTable({ + onChange: handleChange, + columns: [ + { + ...column, + defaultFilteredValue: ['boy', 'designer'], + }, + ], + }), + ); + + wrapper.find('.ant-dropdown-trigger').first().simulate('click'); + wrapper.find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); + + expect(handleChange).not.toHaveBeenCalled(); + }); + it('three levels menu', () => { const filters = [ { text: 'Upper', value: 'Upper' }, @@ -410,29 +446,17 @@ describe('Table.filter', () => { let dropdownWrapper = getDropdownWrapper(wrapper); expect(renderedNames(wrapper)).toEqual(['Jack', 'Lucy', 'Tom', 'Jerry']); // select - dropdownWrapper - .find('.ant-dropdown-menu-submenu-title') - .at(0) - .simulate('mouseEnter'); + dropdownWrapper.find('.ant-dropdown-menu-submenu-title').at(0).simulate('mouseEnter'); jest.runAllTimers(); dropdownWrapper = getDropdownWrapper(wrapper); - dropdownWrapper - .find('.ant-dropdown-menu-submenu-title') - .at(1) - .simulate('mouseEnter'); + dropdownWrapper.find('.ant-dropdown-menu-submenu-title').at(1).simulate('mouseEnter'); jest.runAllTimers(); dropdownWrapper = getDropdownWrapper(wrapper); - dropdownWrapper - .find('MenuItem') - .last() - .simulate('click'); + dropdownWrapper.find('MenuItem').last().simulate('click'); dropdownWrapper.find('.ant-table-filter-dropdown-btns .ant-btn-primary').simulate('click'); wrapper.update(); expect(renderedNames(wrapper)).toEqual(['Jack']); - dropdownWrapper - .find('MenuItem') - .last() - .simulate('click'); + dropdownWrapper.find('MenuItem').last().simulate('click'); jest.useRealTimers(); }); @@ -1060,12 +1084,9 @@ describe('Table.filter', () => { expect(wrapper.find('.ant-table-filter-dropdown-btns .ant-btn-primary').text()).toEqual( 'Bamboo', ); - expect( - wrapper - .find('.ant-table-filter-dropdown-btns .ant-btn-link') - .last() - .text(), - ).toEqual('Reset'); + expect(wrapper.find('.ant-table-filter-dropdown-btns .ant-btn-link').last().text()).toEqual( + 'Reset', + ); }); it('filtered should work', () => { diff --git a/components/table/__tests__/Table.rowSelection.test.js b/components/table/__tests__/Table.rowSelection.test.js index d506fe55e0..2c70a211a5 100644 --- a/components/table/__tests__/Table.rowSelection.test.js +++ b/components/table/__tests__/Table.rowSelection.test.js @@ -429,6 +429,7 @@ describe('Table.rowSelection', () => { const wrapper = render( createTable({ rowSelection: { fixed: true }, + scroll: { x: 903 }, }), ); @@ -444,6 +445,7 @@ describe('Table.rowSelection', () => { }, }, rowSelection: { fixed: true }, + scroll: { x: 903 }, }), ); @@ -461,6 +463,7 @@ describe('Table.rowSelection', () => { fixed: 'left', }, ], + scroll: { x: 903 }, }), ); diff --git a/components/table/__tests__/Table.sorter.test.js b/components/table/__tests__/Table.sorter.test.js index d7e97b4950..0a38818f1c 100644 --- a/components/table/__tests__/Table.sorter.test.js +++ b/components/table/__tests__/Table.sorter.test.js @@ -155,38 +155,37 @@ describe('Table.sorter', () => { jest.useFakeTimers(); const wrapper = mount(createTable({})); // default show sorter tooltip - wrapper.find('.ant-table-column-sorters').simulate('mouseenter'); + wrapper.find('.ant-table-column-sorters-with-tooltip').simulate('mouseenter'); jest.runAllTimers(); wrapper.update(); expect(wrapper.find('.ant-tooltip-open').length).toBeTruthy(); - wrapper.find('.ant-table-column-sorters').simulate('mouseout'); + wrapper.find('.ant-table-column-sorters-with-tooltip').simulate('mouseout'); + // set table props showSorterTooltip is false wrapper.setProps({ showSorterTooltip: false }); - wrapper.find('.ant-table-column-sorters').simulate('mouseenter'); + expect(wrapper.find('.ant-table-column-sorters-with-tooltip')).toHaveLength(0); jest.runAllTimers(); wrapper.update(); - expect(wrapper.find('.ant-tooltip-open').length).toBeFalsy(); - wrapper.find('.ant-table-column-sorters').simulate('mouseout'); + expect(wrapper.find('.ant-tooltip-open')).toHaveLength(0); // set table props showSorterTooltip is false, column showSorterTooltip is true wrapper.setProps({ showSorterTooltip: false, columns: [{ ...column, showSorterTooltip: true }], }); - wrapper.find('.ant-table-column-sorters').simulate('mouseenter'); + wrapper.find('.ant-table-column-sorters-with-tooltip').simulate('mouseenter'); jest.runAllTimers(); wrapper.update(); expect(wrapper.find('.ant-tooltip-open').length).toBeTruthy(); - wrapper.find('.ant-table-column-sorters').simulate('mouseout'); + wrapper.find('.ant-table-column-sorters-with-tooltip').simulate('mouseout'); // set table props showSorterTooltip is true, column showSorterTooltip is false wrapper.setProps({ showSorterTooltip: true, columns: [{ ...column, showSorterTooltip: false }], }); - wrapper.find('.ant-table-column-sorters').simulate('mouseenter'); + expect(wrapper.find('.ant-table-column-sorters-with-tooltip')).toHaveLength(0); jest.runAllTimers(); wrapper.update(); - expect(wrapper.find('.ant-tooltip-open').length).toBeFalsy(); - wrapper.find('.ant-table-column-sorters').simulate('mouseout'); + expect(wrapper.find('.ant-tooltip-open')).toHaveLength(0); }); it('works with grouping columns in controlled mode', () => { diff --git a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap index fdaed4b68b..eacf3cffbf 100644 --- a/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap +++ b/components/table/__tests__/__snapshots__/Table.rowSelection.test.js.snap @@ -11,16 +11,17 @@ exports[`Table.rowSelection fix expand on th left when selection column fixed on class="ant-spin-container" >
+ +
+ +
+ +
- - Name - - + + Name + - - - - + + - - + + - +
@@ -99,59 +103,63 @@ exports[`Table.sorter should support defaultOrder in Column 1`] = ` class="ant-table-cell ant-table-column-sort ant-table-column-has-sorters" >
- - Age - - + + Age + - - - - + + - - + + - +
diff --git a/components/table/__tests__/__snapshots__/demo.test.js.snap b/components/table/__tests__/__snapshots__/demo.test.js.snap index 807828d002..9de2e34ed4 100644 --- a/components/table/__tests__/__snapshots__/demo.test.js.snap +++ b/components/table/__tests__/__snapshots__/demo.test.js.snap @@ -38,59 +38,63 @@ exports[`renders ./components/table/demo/ajax.md correctly 1`] = ` class="ant-table-cell ant-table-column-has-sorters" >
- - Name - - + + Name + - - - - + + - - + + - +
@@ -2361,9 +2557,7 @@ exports[`renders ./components/table/demo/dynamic-settings.md correctly 1`] = ` @@ -10580,59 +10784,63 @@ exports[`renders ./components/table/demo/reset-filter.md correctly 1`] = ` class="ant-table-filter-column-title" >
- - Name - - + + Name + - - - - + + - - + + - +
- - Age - - + + Age + - - - - + + - - + + - +
- Age +
+
+ + Age + + + + + + + + + + + +
+
- Address +
+ + Address + + + + + + + + +
- Action +
+ +
+
+ + Action + + + + + + + + + + + +
+
+
+ + + + + + + +
- - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown - - John Brown - + John Brown
- - Age - - + + Age + - - - - + + - - + + - +
- - Name - - + + Name + - + + - +
- - Age - - + + Age + - - - - + + - - + + - +
- - Address - - + + Address + - - - - + + - - + + - +
- - Chinese Score - - + + Chinese Score + - - - - + + - - + + - +
- - Math Score - - + + Math Score + - - - - + + - - + + - +
- - English Score - - + + English Score + - - - - + + - - + + - +
- - Address - - + + Address + - - - - + + - - + + - +
- - Amount - - + + Amount + - - - - + + - - + + - +
+ + @@ -345,50 +385,55 @@ exports[`Table renders empty table with fixed columns 1`] = ` colspan="11" >
- - - - - + + + + - - + +
+

+ No Data +

-

- No Data -

diff --git a/components/table/__tests__/empty.test.js b/components/table/__tests__/empty.test.js index 7ea6ccf2ad..1e584613a3 100644 --- a/components/table/__tests__/empty.test.js +++ b/components/table/__tests__/empty.test.js @@ -51,7 +51,9 @@ describe('Table', () => { }); it('renders empty table with fixed columns', () => { - const wrapper = render(
); + const wrapper = render( +
, + ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/table/demo/dynamic-settings.md b/components/table/demo/dynamic-settings.md index 4b77cd29d0..9bf8df28c3 100644 --- a/components/table/demo/dynamic-settings.md +++ b/components/table/demo/dynamic-settings.md @@ -21,22 +21,33 @@ const columns = [ { title: 'Name', dataIndex: 'name', - key: 'name', - render: text => {text}, }, { title: 'Age', dataIndex: 'age', - key: 'age', + sorter: (a, b) => a.age - b.age, }, { title: 'Address', dataIndex: 'address', - key: 'address', + filters: [ + { + text: 'London', + value: 'London', + }, + { + text: 'New York', + value: 'New York', + }, + ], + onFilter: (value, record) => record.address.indexOf(value) === 0, }, { title: 'Action', key: 'action', + sorter: true, + filters: [], + onFilter: () => {}, render: () => ( Delete diff --git a/components/table/hooks/useFilter/FilterDropdown.tsx b/components/table/hooks/useFilter/FilterDropdown.tsx index 0f45c33ff1..2140ac90f4 100644 --- a/components/table/hooks/useFilter/FilterDropdown.tsx +++ b/components/table/hooks/useFilter/FilterDropdown.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import classNames from 'classnames'; +import isEqual from 'lodash/isEqual'; import FilterFilled from '@ant-design/icons/FilterFilled'; import Button from '../../../button'; import Menu from '../../../menu'; @@ -131,6 +132,10 @@ function FilterDropdown(props: FilterDropdownProps) { return null; } + if (isEqual(mergedKeys, filterState?.filteredKeys)) { + return null; + } + triggerFilter({ column, key: columnKey, diff --git a/components/table/hooks/useFilter/index.tsx b/components/table/hooks/useFilter/index.tsx index 7ff606a3a4..f56cf42c8f 100644 --- a/components/table/hooks/useFilter/index.tsx +++ b/components/table/hooks/useFilter/index.tsx @@ -31,7 +31,7 @@ function collectFilterStates( if ('children' in column) { filterStates = [...filterStates, ...collectFilterStates(column.children, init, columnPos)]; - } else if ('filters' in column || 'filterDropdown' in column || 'onFilter' in column) { + } else if (column.filters || 'filterDropdown' in column || 'onFilter' in column) { if ('filteredValue' in column) { // Controlled filterStates.push({ @@ -70,7 +70,7 @@ function injectFilter( const columnPos = getColumnPos(index, pos); const { filterMultiple = true } = column as ColumnType; - if ('filters' in column || 'filterDropdown' in column) { + if (column.filters || 'filterDropdown' in column) { const columnKey = getColumnKey(column, columnPos); const filterState = filterStates.find(({ key }) => columnKey === key); diff --git a/components/table/hooks/useSorter.tsx b/components/table/hooks/useSorter.tsx index a535140e46..a5b415c812 100644 --- a/components/table/hooks/useSorter.tsx +++ b/components/table/hooks/useSorter.tsx @@ -167,7 +167,9 @@ function injectSorter( ); return showSorterTooltip ? ( - {renderSortTitle} + +
{renderSortTitle}
+
) : ( renderSortTitle ); diff --git a/components/table/index.en-US.md b/components/table/index.en-US.md index 5899f7c0b7..b89d7d4be6 100644 --- a/components/table/index.en-US.md +++ b/components/table/index.en-US.md @@ -92,14 +92,14 @@ Same as `onRow` `onHeaderRow` `onCell` `onHeaderCell`
{ return { - onClick: (event) => {}, // click row - onDoubleClick: (event) => {}, // double click row - onContextMenu: (event) => {}, // right button click row - onMouseEnter: (event) => {}, // mouse enter row - onMouseLeave: (event) => {}, // mouse leave row + onClick: event => {}, // click row + onDoubleClick: event => {}, // double click row + onContextMenu: event => {}, // right button click row + onMouseEnter: event => {}, // mouse enter row + onMouseLeave: event => {}, // mouse leave row }; }} - onHeaderRow={(column) => { + onHeaderRow={column => { return { onClick: () => {}, // click header row }; @@ -265,7 +265,7 @@ If `dataSource[i].key` is not provided, then you should specify the primary key // primary key is uid return
; // or -return
record.uid} />; +return
record.uid} />; ``` ## Migrate to v4 @@ -276,6 +276,12 @@ Besides, the breaking change is changing `dataIndex` from nest string path like ## FAQ -### How to hide pagination when single page or not data +### How to hide pagination when single page or not data? You can set `hideOnSinglePage` with `pagination` prop. + +### Table will return to first page when filter data. + +Table total page count usually reduce after filter data, we defaultly return to first page in case of current page is out of filtered results. + +You may need to keep current page after filtering when fetch data from remote service, please check [this demo](https://codesandbox.io/s/yuanchengjiazaishuju-ant-design-demo-7y2uf) as workaround. diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md index 98fe79085c..0caf237131 100644 --- a/components/table/index.zh-CN.md +++ b/components/table/index.zh-CN.md @@ -95,16 +95,16 @@ const columns = [ ```jsx
{ + onRow={record => { return { - onClick: (event) => {}, // 点击行 - onDoubleClick: (event) => {}, - onContextMenu: (event) => {}, - onMouseEnter: (event) => {}, // 鼠标移入行 - onMouseLeave: (event) => {}, + onClick: event => {}, // 点击行 + onDoubleClick: event => {}, + onContextMenu: event => {}, + onMouseEnter: event => {}, // 鼠标移入行 + onMouseLeave: event => {}, }; }} - onHeaderRow={(column) => { + onHeaderRow={column => { return { onClick: () => {}, // 点击表头行 }; @@ -269,7 +269,7 @@ class NameColumn extends Table.Column {} // 比如你的数据主键是 uid return
; // 或 -return
record.uid} />; +return
record.uid} />; ``` ## 从 v3 升级到 v4 @@ -283,3 +283,9 @@ Table 移除了在 v3 中废弃的 `onRowClick`、`onRowDoubleClick`、`onRowMou ### 如何在没有数据或只有一页数据时隐藏分页栏 你可以设置 `pagination` 的 `hideOnSinglePage` 属性为 `true`。 + +### 表格过滤时会回到第一页? + + 前端过滤时通常条目总数会减少,从而导致总页数小于筛选前的当前页数,为了防止当前页面没有数据,我们默认会返回第一页。 + +如果你在使用远程分页,很可能需要保持当前页面,你可以参照这个 [受控例子](https://codesandbox.io/s/yuanchengjiazaishuju-ant-design-demo-7y2uf) 控制当前页面不变。 diff --git a/components/table/style/bordered.less b/components/table/style/bordered.less index 27b04f5f4e..ace820eb2b 100644 --- a/components/table/style/bordered.less +++ b/components/table/style/bordered.less @@ -53,7 +53,7 @@ } } - &.@{table-prefix-cls}-fixed-column { + &.@{table-prefix-cls}-scroll-horizontal { tr.@{table-prefix-cls}-expanded-row, tr.@{table-prefix-cls}-placeholder { > td { diff --git a/components/table/style/index.less b/components/table/style/index.less index fe49a9f7b6..07d396ccab 100644 --- a/components/table/style/index.less +++ b/components/table/style/index.less @@ -124,20 +124,22 @@ } // ========================= Nest Table =========================== - .@{table-prefix-cls} { - margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal + - ceil(@font-size-sm * 1.4)); + .@{table-prefix-cls}-wrapper:only-child { + .@{table-prefix-cls} { + margin: -@table-padding-vertical -@table-padding-horizontal -@table-padding-vertical (@table-padding-horizontal + + ceil(@font-size-sm * 1.4)); - td { - background: transparent; - } + td { + background: transparent; + } - &-tbody > tr:last-child > td { - border-bottom: 0; + &-tbody > tr:last-child > td { + border-bottom: 0; - &:first-child, - &:last-child { - border-radius: 0; + &:first-child, + &:last-child { + border-radius: 0; + } } } } @@ -199,10 +201,14 @@ background: @table-body-sort-bg; } + &-column-sorters-with-tooltip { + display: inline-block; + width: 100%; + } + &-column-sorters { display: inline-flex; align-items: center; - width: 100%; padding: @table-padding-vertical @table-padding-horizontal; } @@ -249,6 +255,17 @@ padding: @table-padding-vertical 2.3em @table-padding-vertical @table-padding-horizontal; } + // Remove padding when sorter also provided + &-thead tr th.@{table-prefix-cls}-column-has-sorters { + .@{table-prefix-cls}-filter-column { + margin: 0; + } + + .@{table-prefix-cls}-filter-column-title { + padding: 0 2.3em 0 0; + } + } + &-filter-trigger-container { position: absolute; top: 0; @@ -361,7 +378,7 @@ top: 0; right: -10px; cursor: pointer; - transition: all .3s; + transition: all 0.3s; .@{iconfont-css-prefix} { .iconfont-size-under-12px(10px); diff --git a/components/table/style/size.less b/components/table/style/size.less index 1eb911a3a6..b32d24c0e3 100644 --- a/components/table/style/size.less +++ b/components/table/style/size.less @@ -1,7 +1,7 @@ @import './index'; .table-size(@size, @padding-vertical, @padding-horizontal) { - .@{table-prefix-cls}.@{table-prefix-cls}-@{size} { + .@{table-prefix-cls}-@{size} { .@{table-prefix-cls}-title, .@{table-prefix-cls}-footer, .@{table-prefix-cls}-thead > tr > th, @@ -9,8 +9,22 @@ padding: @padding-vertical @padding-horizontal; } - .@{table-prefix-cls}-filter-column { - margin: -@padding-vertical -@padding-horizontal; + .@{table-prefix-cls}-thead { + th.@{table-prefix-cls}-column-has-sorters { + padding: 0; + } + + .@{table-prefix-cls}-filter-column { + margin: -@padding-vertical -@padding-horizontal; + } + + .@{table-prefix-cls}-filter-column-title { + padding: @padding-vertical 2.3em @padding-vertical @padding-horizontal; + } + + .@{table-prefix-cls}-column-sorters { + padding: @padding-vertical @padding-horizontal; + } } .@{table-prefix-cls}-expanded-row-fixed { @@ -29,7 +43,7 @@ // ================================================================ .table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm); -.@{table-prefix-cls}.@{table-prefix-cls}-small { +.@{table-prefix-cls}-small { .@{table-prefix-cls}-thead > tr > th { background-color: @table-header-bg-sm; } diff --git a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap index 2b57a8884b..11060c47f9 100644 --- a/components/time-picker/__tests__/__snapshots__/demo.test.js.snap +++ b/components/time-picker/__tests__/__snapshots__/demo.test.js.snap @@ -401,10 +401,9 @@ exports[`renders ./components/time-picker/demo/range-picker.md correctly 1`] = ` class="ant-picker-range-separator" > - → - + />
case. Bnt Design, a design language for background applications, is refined by Ant UED Team. Cnt Design, a design language for background applications, is refined by Ant UED Team. Dnt Design, a design language for background applications, is refined by Ant UED Team. Ent Design, a design language for background applications, is refined by Ant UED Team.
+

+ 2333 + + 2333 + + 2333 +

`; diff --git a/components/typography/demo/ellipsis-debug.md b/components/typography/demo/ellipsis-debug.md index e44bd9370f..f1ddf9b7ed 100644 --- a/components/typography/demo/ellipsis-debug.md +++ b/components/typography/demo/ellipsis-debug.md @@ -63,6 +63,10 @@ class Demo extends React.Component { Hello World )} + +

+ 233323332333 +

); } diff --git a/components/typography/style/index.less b/components/typography/style/index.less index 14a65d82d4..4a1a1131ab 100644 --- a/components/typography/style/index.less +++ b/components/typography/style/index.less @@ -192,6 +192,11 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + + // https://blog.csdn.net/iefreer/article/details/50421025 + span& { + vertical-align: bottom; + } } &-ellipsis-multiple-line { diff --git a/docs/react/use-in-typescript.en-US.md b/docs/react/use-in-typescript.en-US.md index 0404efaad1..a06718502e 100644 --- a/docs/react/use-in-typescript.en-US.md +++ b/docs/react/use-in-typescript.en-US.md @@ -5,6 +5,8 @@ title: Use in TypeScript Let's create a TypeScript project by using `create-react-app`, then import `antd` step by step. +> We build `antd` based on latest stable version of TypeScript (`>=3.8.4`), please make sure your project dependency matches it. + --- ## Install and Initialization diff --git a/docs/react/use-in-typescript.zh-CN.md b/docs/react/use-in-typescript.zh-CN.md index b33705b4b9..2af25a4054 100644 --- a/docs/react/use-in-typescript.zh-CN.md +++ b/docs/react/use-in-typescript.zh-CN.md @@ -5,6 +5,8 @@ title: 在 TypeScript 中使用 使用 `create-react-app` 一步步地创建一个 TypeScript 项目,并引入 antd。 +> `antd` 基于最新稳定版本的 TypeScript(`>=3.8.4`),请确保项目中使用匹配的版本。 + --- ## 安装和初始化 diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index b15eeebd37..eabcbca669 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/docs/react/use-with-create-react-app.en-US.md @@ -203,6 +203,8 @@ We have built-in dark theme and compact theme in antd, you can reference to [Use > You could also try [craco](https://github.com/sharegate/craco) and [craco-antd](https://github.com/FormAPI/craco-antd) to customize create-react-app webpack config same as customize-cra does. +> Note: It is recommended to use the latest version of `less`, or a minimum version greater than `3.0.1`. + ## Replace momentjs to Day.js You can use [antd-dayjs-webpack-plugin](https://github.com/ant-design/antd-dayjs-webpack-plugin) plugin to replace momentjs to Day.js to reduce bundle size dramatically. diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index 46a10bee94..3b97bce8f5 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/docs/react/use-with-create-react-app.zh-CN.md @@ -201,6 +201,10 @@ module.exports = override( antd 内建了深色主题和紧凑主题,你可以参照 [使用暗色主题和紧凑主题](/docs/react/customize-theme#使用暗色主题和紧凑主题) 进行接入。 +> 同样,你可以使用 [craco](https://github.com/sharegate/craco) 和 [craco-antd](https://github.com/FormAPI/craco-antd) 来自定义 create-react-app 的 webpack 配置,类似于 customize-cra。 + +> 注意:建议使用最新版本的 `less`,或不低于 `3.0.1`。 + ## 使用 Day.js 替换 momentjs 优化打包大小 你可以使用 [antd-dayjs-webpack-plugin](https://github.com/ant-design/antd-dayjs-webpack-plugin) 插件用 Day.js 替换 momentjs 来大幅减小打包大小。 diff --git a/docs/spec/visual.zh-CN.md b/docs/spec/visual.zh-CN.md index f943cff1c7..4a7b4aa668 100644 --- a/docs/spec/visual.zh-CN.md +++ b/docs/spec/visual.zh-CN.md @@ -70,7 +70,7 @@ title: 可视化 ### 色板 - + AntV 提供了一套默认的图表颜色,包括颜色的用法, diff --git a/docs/spec/visualization-page.md b/docs/spec/visualization-page.md index aadbeb3da9..001f8d3d26 100644 --- a/docs/spec/visualization-page.md +++ b/docs/spec/visualization-page.md @@ -169,7 +169,7 @@ title: #### 选择正确的色板 - + ## 延伸阅读 diff --git a/package.json b/package.json index d76ada198a..4ea5832f2f 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "bundlesize": "bundlesize", "check-commit": "node ./scripts/check-commit.js", "compile": "antd-tools run compile", - "predeploy": "antd-tools run clean && npm run site && cp netlify.toml CNAME _site && cp -r .circleci/ _site && npm run site:test", - "deploy": "bisheng gh-pages --push-only", + "predeploy": "antd-tools run clean && npm run site && cp netlify.toml CNAME _site && cp -r .circleci/ .github/ _site && npm run site:test", + "deploy": "bisheng gh-pages --push-only --dotfiles", "deploy:china-mirror": "git checkout gh-pages && git pull origin gh-pages && git push git@gitee.com:ant-design/ant-design.git gh-pages", "dist": "antd-tools run dist", "lint": "npm run lint:tsc && npm run lint:script && npm run lint:demo && npm run lint:style && npm run lint:deps", @@ -127,7 +127,7 @@ "rc-slider": "~9.2.3", "rc-steps": "~3.5.0", "rc-switch": "~1.9.0", - "rc-table": "~7.3.0", + "rc-table": "~7.4.2", "rc-tabs": "~10.1.1", "rc-tooltip": "~4.0.2", "rc-tree": "~3.1.0", @@ -164,12 +164,12 @@ "antd-theme-generator": "^1.1.6", "babel-eslint": "^10.0.1", "babel-plugin-add-react-displayname": "^0.0.5", - "bisheng": "^1.4.6", + "bisheng": "^1.5.1", "bisheng-plugin-description": "^0.1.4", "bisheng-plugin-react": "^1.1.0", "bisheng-plugin-toc": "^0.4.4", "bundlesize": "^0.18.0", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "cheerio": "^1.0.0-rc.3", "concurrently": "^5.0.2", "cross-env": "^7.0.0",