@douyinfe/semi-ui 2.28.0-beta.1 → 2.28.1

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.
@@ -20,7 +20,7 @@ export declare type MonthsGridState = MonthsGridFoundationState;
20
20
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
21
21
  static propTypes: {
22
22
  type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
23
- defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
23
+ defaultValue: PropTypes.Requireable<any[]>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
26
26
  max: PropTypes.Requireable<number>;
@@ -652,7 +652,7 @@ class MonthsGrid extends _baseComponent.default {
652
652
  exports.default = MonthsGrid;
653
653
  MonthsGrid.propTypes = {
654
654
  type: _propTypes.default.oneOf(_constants.strings.TYPE_SET),
655
- defaultValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.object, _propTypes.default.array]),
655
+ defaultValue: _propTypes.default.array,
656
656
  defaultPickerValue: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.object, _propTypes.default.array]),
657
657
  multiple: _propTypes.default.bool,
658
658
  max: _propTypes.default.number,
@@ -137,7 +137,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
137
137
  preventScroll?: boolean;
138
138
  showRestTagsPopover?: boolean;
139
139
  restTagsPopoverProps?: import("../popover").PopoverProps;
140
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
140
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
141
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
142
142
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
143
143
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -85,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
85
85
  preventScroll?: boolean;
86
86
  showRestTagsPopover?: boolean;
87
87
  restTagsPopoverProps?: import("../popover").PopoverProps;
88
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
88
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
89
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
90
90
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
91
91
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -59,6 +59,7 @@ class ReactResizeObserver extends _baseComponent.default {
59
59
  if (this.observer) {
60
60
  this.observer.disconnect();
61
61
  this.observer = null;
62
+ this.element = null;
62
63
  }
63
64
  }
64
65
 
@@ -66,6 +67,10 @@ class ReactResizeObserver extends _baseComponent.default {
66
67
  let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
67
68
  const element = this.getElement();
68
69
 
70
+ if (!this.observer) {
71
+ this.observer = new _resizeObserverPolyfill.default(this.props.onResize);
72
+ }
73
+
69
74
  if (!(element && element instanceof Element)) {
70
75
  // stop everything if not defined
71
76
  this.observer.disconnect();
@@ -6,6 +6,7 @@ import TagInputFoundation, { TagInputAdapter, OnSortEndProps } from '@douyinfe/s
6
6
  import { ArrayElement } from '../_base/base';
7
7
  import BaseComponent from '../_base/baseComponent';
8
8
  import { PopoverProps } from '../popover';
9
+ import { ShowTooltip } from '../typography';
9
10
  export declare type Size = ArrayElement<typeof strings.SIZE_SET>;
10
11
  export declare type RestTagsPopoverProps = PopoverProps;
11
12
  declare type ValidateStatus = "default" | "error" | "warning";
@@ -20,7 +21,7 @@ export interface TagInputProps {
20
21
  maxTagCount?: number;
21
22
  showRestTagsPopover?: boolean;
22
23
  restTagsPopoverProps?: RestTagsPopoverProps;
23
- showContentTooltip?: boolean;
24
+ showContentTooltip?: boolean | ShowTooltip;
24
25
  allowDuplicates?: boolean;
25
26
  addOnBlur?: boolean;
26
27
  draggable?: boolean;
@@ -71,7 +72,10 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
71
72
  maxLength: PropTypes.Requireable<number>;
72
73
  showRestTagsPopover: PropTypes.Requireable<boolean>;
73
74
  restTagsPopoverProps: PropTypes.Requireable<object>;
74
- showContentTooltip: PropTypes.Requireable<boolean>;
75
+ showContentTooltip: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
76
+ type: PropTypes.Requireable<string>;
77
+ opts: PropTypes.Requireable<object>;
78
+ }>>>;
75
79
  defaultValue: PropTypes.Requireable<any[]>;
76
80
  value: PropTypes.Requireable<any[]>;
77
81
  inputValue: PropTypes.Requireable<string>;
@@ -593,7 +593,10 @@ TagInput.propTypes = {
593
593
  maxLength: _propTypes.default.number,
594
594
  showRestTagsPopover: _propTypes.default.bool,
595
595
  restTagsPopoverProps: _propTypes.default.object,
596
- showContentTooltip: _propTypes.default.bool,
596
+ showContentTooltip: _propTypes.default.oneOfType([_propTypes.default.shape({
597
+ type: _propTypes.default.string,
598
+ opts: _propTypes.default.object
599
+ }), _propTypes.default.bool]),
597
600
  defaultValue: _propTypes.default.array,
598
601
  value: _propTypes.default.array,
599
602
  inputValue: _propTypes.default.string,
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
37
37
  underline: PropTypes.Requireable<boolean>;
38
38
  strong: PropTypes.Requireable<boolean>;
39
39
  type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
40
- heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 6 | 5>;
40
+ heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
41
41
  style: PropTypes.Requireable<object>;
42
42
  className: PropTypes.Requireable<string>;
43
43
  component: PropTypes.Requireable<string>;
@@ -20,7 +20,7 @@ export declare type MonthsGridState = MonthsGridFoundationState;
20
20
  export default class MonthsGrid extends BaseComponent<MonthsGridProps, MonthsGridState> {
21
21
  static propTypes: {
22
22
  type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "dateTimeRange">;
23
- defaultValue: PropTypes.Requireable<NonNullable<string | number | object>>;
23
+ defaultValue: PropTypes.Requireable<any[]>;
24
24
  defaultPickerValue: PropTypes.Requireable<NonNullable<string | number | object>>;
25
25
  multiple: PropTypes.Requireable<boolean>;
26
26
  max: PropTypes.Requireable<number>;
@@ -624,7 +624,7 @@ export default class MonthsGrid extends BaseComponent {
624
624
  }
625
625
  MonthsGrid.propTypes = {
626
626
  type: PropTypes.oneOf(strings.TYPE_SET),
627
- defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object, PropTypes.array]),
627
+ defaultValue: PropTypes.array,
628
628
  defaultPickerValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object, PropTypes.array]),
629
629
  multiple: PropTypes.bool,
630
630
  max: PropTypes.number,
@@ -137,7 +137,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
137
137
  preventScroll?: boolean;
138
138
  showRestTagsPopover?: boolean;
139
139
  restTagsPopoverProps?: import("../popover").PopoverProps;
140
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
140
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
141
141
  static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
142
142
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
143
143
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
@@ -85,7 +85,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
85
85
  preventScroll?: boolean;
86
86
  showRestTagsPopover?: boolean;
87
87
  restTagsPopoverProps?: import("../popover").PopoverProps;
88
- } & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "motion" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
88
+ } & Pick<import("../tooltip").TooltipProps, "stopPropagation" | "motion" | "getPopupContainer" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
89
89
  declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
90
90
  declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
91
91
  declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
@@ -45,6 +45,7 @@ export default class ReactResizeObserver extends BaseComponent {
45
45
  if (this.observer) {
46
46
  this.observer.disconnect();
47
47
  this.observer = null;
48
+ this.element = null;
48
49
  }
49
50
  }
50
51
 
@@ -52,6 +53,10 @@ export default class ReactResizeObserver extends BaseComponent {
52
53
  let force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
53
54
  const element = this.getElement();
54
55
 
56
+ if (!this.observer) {
57
+ this.observer = new ResizeObserver(this.props.onResize);
58
+ }
59
+
55
60
  if (!(element && element instanceof Element)) {
56
61
  // stop everything if not defined
57
62
  this.observer.disconnect();
@@ -6,6 +6,7 @@ import TagInputFoundation, { TagInputAdapter, OnSortEndProps } from '@douyinfe/s
6
6
  import { ArrayElement } from '../_base/base';
7
7
  import BaseComponent from '../_base/baseComponent';
8
8
  import { PopoverProps } from '../popover';
9
+ import { ShowTooltip } from '../typography';
9
10
  export declare type Size = ArrayElement<typeof strings.SIZE_SET>;
10
11
  export declare type RestTagsPopoverProps = PopoverProps;
11
12
  declare type ValidateStatus = "default" | "error" | "warning";
@@ -20,7 +21,7 @@ export interface TagInputProps {
20
21
  maxTagCount?: number;
21
22
  showRestTagsPopover?: boolean;
22
23
  restTagsPopoverProps?: RestTagsPopoverProps;
23
- showContentTooltip?: boolean;
24
+ showContentTooltip?: boolean | ShowTooltip;
24
25
  allowDuplicates?: boolean;
25
26
  addOnBlur?: boolean;
26
27
  draggable?: boolean;
@@ -71,7 +72,10 @@ declare class TagInput extends BaseComponent<TagInputProps, TagInputState> {
71
72
  maxLength: PropTypes.Requireable<number>;
72
73
  showRestTagsPopover: PropTypes.Requireable<boolean>;
73
74
  restTagsPopoverProps: PropTypes.Requireable<object>;
74
- showContentTooltip: PropTypes.Requireable<boolean>;
75
+ showContentTooltip: PropTypes.Requireable<NonNullable<boolean | PropTypes.InferProps<{
76
+ type: PropTypes.Requireable<string>;
77
+ opts: PropTypes.Requireable<object>;
78
+ }>>>;
75
79
  defaultValue: PropTypes.Requireable<any[]>;
76
80
  value: PropTypes.Requireable<any[]>;
77
81
  inputValue: PropTypes.Requireable<string>;
@@ -563,7 +563,10 @@ TagInput.propTypes = {
563
563
  maxLength: PropTypes.number,
564
564
  showRestTagsPopover: PropTypes.bool,
565
565
  restTagsPopoverProps: PropTypes.object,
566
- showContentTooltip: PropTypes.bool,
566
+ showContentTooltip: PropTypes.oneOfType([PropTypes.shape({
567
+ type: PropTypes.string,
568
+ opts: PropTypes.object
569
+ }), PropTypes.bool]),
567
570
  defaultValue: PropTypes.array,
568
571
  value: PropTypes.array,
569
572
  inputValue: PropTypes.string,
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
37
37
  underline: PropTypes.Requireable<boolean>;
38
38
  strong: PropTypes.Requireable<boolean>;
39
39
  type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
40
- heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 6 | 5>;
40
+ heading: PropTypes.Requireable<1 | 2 | 3 | 4 | 6 | 5>;
41
41
  style: PropTypes.Requireable<object>;
42
42
  className: PropTypes.Requireable<string>;
43
43
  component: PropTypes.Requireable<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.28.0-beta.1",
3
+ "version": "2.28.1",
4
4
  "description": "",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -17,12 +17,12 @@
17
17
  "lib/*"
18
18
  ],
19
19
  "dependencies": {
20
- "@douyinfe/semi-animation": "2.28.0-beta.1",
21
- "@douyinfe/semi-animation-react": "2.28.0-beta.1",
22
- "@douyinfe/semi-foundation": "2.28.0-beta.1",
23
- "@douyinfe/semi-icons": "2.28.0-beta.1",
24
- "@douyinfe/semi-illustrations": "2.28.0-beta.1",
25
- "@douyinfe/semi-theme-default": "2.28.0-beta.1",
20
+ "@douyinfe/semi-animation": "2.28.1",
21
+ "@douyinfe/semi-animation-react": "2.28.1",
22
+ "@douyinfe/semi-foundation": "2.28.1",
23
+ "@douyinfe/semi-icons": "2.28.1",
24
+ "@douyinfe/semi-illustrations": "2.28.1",
25
+ "@douyinfe/semi-theme-default": "2.28.1",
26
26
  "async-validator": "^3.5.0",
27
27
  "classnames": "^2.2.6",
28
28
  "copy-text-to-clipboard": "^2.1.1",
@@ -69,7 +69,7 @@
69
69
  ],
70
70
  "author": "",
71
71
  "license": "MIT",
72
- "gitHead": "3fbd4eb3d650d52c79fc7caedc226e116c88d61c",
72
+ "gitHead": "24cfaffcba9337a3f4a3f8530e6e069d8d7b6bf0",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",