@douyinfe/semi-ui 2.0.8 → 2.0.9-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,6 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
5
5
  import { Position } from '../tooltip';
6
6
  import Option from '../select/option';
7
7
  import '@douyinfe/semi-foundation/lib/es/autoComplete/autoComplete.css';
8
- import '@douyinfe/semi-foundation/lib/es/select/option.css';
9
8
  import { Motion } from '../_base/base';
10
9
  /**
11
10
  * AutoComplete is an enhanced Input (candidates suggest that users can choose or not),
@@ -21,7 +21,6 @@ import Trigger from '../trigger';
21
21
  import Option from '../select/option';
22
22
  import warning from '@douyinfe/semi-foundation/lib/es/utils/warning';
23
23
  import '@douyinfe/semi-foundation/lib/es/autoComplete/autoComplete.css';
24
- import '@douyinfe/semi-foundation/lib/es/select/option.css';
25
24
  const prefixCls = cssClasses.PREFIX;
26
25
  const sizeSet = strings.SIZE;
27
26
  const positionSet = strings.POSITION;
@@ -8,4 +8,4 @@ export { QuickControlProps } from './quickControl';
8
8
  export { YearAndMonthProps } from './yearAndMonth';
9
9
  declare const _default: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<DatePicker>>;
10
10
  export default _default;
11
- export { BaseValueType, DayStatusType, DisabledDateOptions, DisabledDateType, DisabledTimeType, InputSize, Position, PresetType, PresetsType, TriggerRenderProps, ValidateStatus, ValueType, } from '@douyinfe/semi-foundation/datePicker/foundation';
11
+ export { BaseValueType, DayStatusType, DisabledDateOptions, DisabledDateType, DisabledTimeType, InputSize, Position, PresetType, PresetsType, TriggerRenderProps, ValidateStatus, ValueType, } from '@douyinfe/semi-foundation/lib/es/datePicker/foundation';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { withFieldOption } from '@douyinfe/semi-foundation/lib/es/form/interface';
2
+ import { WithFieldOption } from '@douyinfe/semi-foundation/lib/es/form/interface';
3
3
  import { CommonFieldProps, CommonexcludeType } from '../interface';
4
4
  import { Subtract } from 'utility-types';
5
5
  /**
@@ -8,5 +8,5 @@ import { Subtract } from 'utility-types';
8
8
  * 2. Insert <Label>
9
9
  * 3. Insert <ErrorMessage>
10
10
  */
11
- declare function withField<C extends React.ComponentType<React.ComponentProps<C>>, T extends React.ComponentType<Subtract<React.ComponentProps<C>, CommonexcludeType> & CommonFieldProps>>(Component: C, opts?: withFieldOption): T;
11
+ declare function withField<C extends React.ComponentType<React.ComponentProps<C>>, T extends React.ComponentType<Subtract<React.ComponentProps<C>, CommonexcludeType> & CommonFieldProps>>(Component: C, opts?: WithFieldOption): T;
12
12
  export default withField;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { Subtract } from 'utility-types';
3
3
  import type { RuleItem } from 'async-validator';
4
4
  import { Options as scrollIntoViewOptions } from 'scroll-into-view-if-needed';
5
- import { BaseFormApi as FormApi, FormState } from '@douyinfe/semi-foundation/lib/es/form/interface';
5
+ import { BaseFormApi as FormApi, FormState, WithFieldOption } from '@douyinfe/semi-foundation/lib/es/form/interface';
6
6
  import { SelectProps } from '../select/index';
7
7
  import Option from '../select/option';
8
8
  import OptGroup from '../select/optionGroup';
@@ -10,7 +10,7 @@ import { CheckboxProps } from '../checkbox/index';
10
10
  import { RadioProps } from '../radio/index';
11
11
  import { ReactFieldError as FieldError } from './errorMessage';
12
12
  import { LabelProps } from './label';
13
- export { FormState, FormApi };
13
+ export { FormState, FormApi, WithFieldOption };
14
14
  export declare type CommonFieldProps = {
15
15
  /** Field is required (except Form. Checkbox within the Group, Form. Radio) */
16
16
  field: string;
@@ -9,7 +9,7 @@ export { NoticeTransitionProps } from './NoticeTransition';
9
9
  export interface NoticeReactProps extends NoticeProps {
10
10
  style?: CSSProperties;
11
11
  }
12
- export { NoticeState, NotificationListProps, NotificationListState };
12
+ export { NoticeState, NotificationListProps, NotificationListState, ConfigProps };
13
13
  export declare type NoticesInPosition = {
14
14
  top: NoticeInstance[];
15
15
  topLeft: NoticeInstance[];
@@ -5,7 +5,6 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
5
5
  import Option, { OptionProps } from './option';
6
6
  import OptionGroup from './optionGroup';
7
7
  import '@douyinfe/semi-foundation/lib/es/select/select.css';
8
- import '@douyinfe/semi-foundation/lib/es/select/option.css';
9
8
  import { Position, TooltipProps } from '../tooltip';
10
9
  export { OptionProps } from './option';
11
10
  export { OptionGroupProps } from './optionGroup';
@@ -40,7 +40,6 @@ import { IconChevronDown, IconClear } from '@douyinfe/semi-icons';
40
40
  import { isSemiIcon } from '../_utils';
41
41
  import warning from '@douyinfe/semi-foundation/lib/es/utils/warning';
42
42
  import '@douyinfe/semi-foundation/lib/es/select/select.css';
43
- import '@douyinfe/semi-foundation/lib/es/select/option.css';
44
43
  const prefixcls = cssClasses.PREFIX;
45
44
  const key = 0; // Notes: Use the label of the option as the identifier, that is, the option in Select, the value is allowed to be the same, but the label must be unique
46
45
 
@@ -399,6 +399,7 @@ export default class Slider extends BaseComponent {
399
399
  },
400
400
  onHandleMove: function (mousePos, isMin) {
401
401
  let stateChangeCallback = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
402
+ let clickTrack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
402
403
 
403
404
  const sliderDOMIsInRenderTree = _this.foundation.checkAndUpdateIsInRenderTreeState();
404
405
 
@@ -426,7 +427,8 @@ export default class Slider extends BaseComponent {
426
427
  if (!isEqual(_this.foundation.outPutValue(currentValue), outPutValue)) {
427
428
  onChange(outPutValue);
428
429
 
429
- if (_this.foundation.valueFormatIsCorrect(value)) {
430
+ if (!clickTrack && _this.foundation.valueFormatIsCorrect(value)) {
431
+ // still require afterChangeCallback when click on the track directly, need skip here
430
432
  return false;
431
433
  }
432
434
 
@@ -8,7 +8,7 @@ export interface SpinProps {
8
8
  spinning?: boolean;
9
9
  indicator?: React.ReactNode;
10
10
  delay?: number;
11
- tip?: string;
11
+ tip?: React.ReactNode;
12
12
  wrapperClassName?: string;
13
13
  style?: React.CSSProperties;
14
14
  childStyle?: React.CSSProperties;
@@ -25,7 +25,7 @@ declare class Spin extends BaseComponent<SpinProps, SpinState> {
25
25
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
26
26
  indicator: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
27
  delay: PropTypes.Requireable<number>;
28
- tip: PropTypes.Requireable<string>;
28
+ tip: PropTypes.Requireable<PropTypes.ReactNodeLike>;
29
29
  wrapperClassName: PropTypes.Requireable<string>;
30
30
  childStyle: PropTypes.Requireable<object>;
31
31
  style: PropTypes.Requireable<object>;
@@ -107,7 +107,7 @@ Spin.propTypes = {
107
107
  children: PropTypes.node,
108
108
  indicator: PropTypes.node,
109
109
  delay: PropTypes.number,
110
- tip: PropTypes.string,
110
+ tip: PropTypes.node,
111
111
  wrapperClassName: PropTypes.string,
112
112
  childStyle: PropTypes.object,
113
113
  style: PropTypes.object
@@ -35,7 +35,7 @@ export interface TableProps<RecordType extends Record<string, any> = any> extend
35
35
  id?: string;
36
36
  indentSize?: number;
37
37
  loading?: boolean;
38
- pagination?: Pagination;
38
+ pagination?: TablePagination;
39
39
  prefixCls?: string;
40
40
  renderGroupSection?: RenderGroupSection;
41
41
  renderPagination?: RenderPagination;
@@ -225,6 +225,7 @@ export declare type Size = ArrayElement<typeof strings.SIZES>;
225
225
  export declare type Title<RecordType> = React.ReactNode | ((pageData?: RecordType[]) => React.ReactNode);
226
226
  export declare type PaginationPosition = ArrayElement<typeof strings.PAGINATION_POSITIONS>;
227
227
  export declare type Pagination = TablePaginationProps | boolean;
228
+ export declare type TablePagination = Pagination;
228
229
  export interface ChangeInfoFilter<RecordType> extends BaseChangeInfoFilter<RecordType> {
229
230
  filters?: Filter[];
230
231
  onFilter?: OnFilter<RecordType>;
@@ -11,7 +11,7 @@ export interface ToastReactProps extends ToastProps {
11
11
  icon?: React.ReactNode;
12
12
  content: React.ReactNode;
13
13
  }
14
- export { ToastListProps, ToastListState, ToastState };
14
+ export { ConfigProps, ToastListProps, ToastListState, ToastState };
15
15
  declare const createBaseToast: () => {
16
16
  new (props: ToastListProps): {
17
17
  readonly adapter: ToastListAdapter;
@@ -7,6 +7,7 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
7
7
  import { ArrayElement } from '../_base/base';
8
8
  import { Locale } from '../locale/interface';
9
9
  import '@douyinfe/semi-foundation/lib/es/upload/upload.css';
10
+ export { BeforeUploadObjectResult, AfterUploadResult };
10
11
  export interface FileItem extends BaseFileItem {
11
12
  validateMessage?: ReactNode;
12
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.0.8",
3
+ "version": "2.0.9-alpha.0",
4
4
  "description": "",
5
5
  "main": "lib/es/index.js",
6
6
  "module": "lib/es/index.js",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@babel/runtime-corejs3": "^7.15.4",
22
22
  "@douyinfe/semi-animation-react": "2.0.8",
23
- "@douyinfe/semi-foundation": "2.0.8",
24
- "@douyinfe/semi-icons": "2.0.8",
25
- "@douyinfe/semi-illustrations": "2.0.8",
23
+ "@douyinfe/semi-foundation": "2.0.9-alpha.0",
24
+ "@douyinfe/semi-icons": "2.0.9-alpha.0",
25
+ "@douyinfe/semi-illustrations": "2.0.9-alpha.0",
26
26
  "@douyinfe/semi-theme-default": "2.0.8",
27
27
  "async-validator": "^3.5.0",
28
28
  "classnames": "^2.2.6",
@@ -64,7 +64,7 @@
64
64
  ],
65
65
  "author": "",
66
66
  "license": "MIT",
67
- "gitHead": "0a2a5df053d415ee634ae3c5b8aa24915aa2cf9b",
67
+ "gitHead": "cfbebccbd9c618b43a0eeca339980cea3723453d",
68
68
  "devDependencies": {
69
69
  "@babel/plugin-proposal-decorators": "^7.15.8",
70
70
  "@babel/plugin-transform-runtime": "^7.15.8",