@douyinfe/semi-ui 2.27.0 → 2.27.1-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.
@@ -14,7 +14,7 @@ export interface CarouselState {
14
14
  declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
15
15
  static propTypes: {
16
16
  activeIndex: PropTypes.Requireable<number>;
17
- animation: PropTypes.Requireable<"slide" | "fade">;
17
+ animation: PropTypes.Requireable<"fade" | "slide">;
18
18
  arrowProps: PropTypes.Requireable<object>;
19
19
  autoPlay: PropTypes.Requireable<NonNullable<boolean | object>>;
20
20
  className: PropTypes.Requireable<string>;
@@ -16,6 +16,9 @@ export interface DropdownItemProps extends BaseProps {
16
16
  active?: boolean;
17
17
  icon?: React.ReactNode;
18
18
  onKeyDown?: (e: React.KeyboardEvent) => void;
19
+ showTick?: boolean;
20
+ /** 内部属性不建议使用 */
21
+ hover?: boolean;
19
22
  }
20
23
  declare class DropdownItem extends BaseComponent<DropdownItemProps> {
21
24
  static propTypes: {
@@ -35,6 +38,7 @@ declare class DropdownItem extends BaseComponent<DropdownItemProps> {
35
38
  icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
36
39
  };
37
40
  static contextType: React.Context<DropdownContextType>;
41
+ static elementType: string;
38
42
  context: DropdownContextType;
39
43
  static defaultProps: {
40
44
  disabled: boolean;
@@ -36,15 +36,18 @@ class DropdownItem extends _baseComponent.default {
36
36
  type,
37
37
  active,
38
38
  icon,
39
- onKeyDown
39
+ onKeyDown,
40
+ showTick,
41
+ hover
40
42
  } = this.props;
41
43
  const {
42
- showTick
44
+ showTick: contextShowTick
43
45
  } = this.context;
44
46
  const itemclass = (0, _classnames.default)(className, {
45
47
  ["".concat(prefixCls, "-item")]: true,
46
48
  ["".concat(prefixCls, "-item-disabled")]: disabled,
47
- ["".concat(prefixCls, "-item-withTick")]: showTick,
49
+ ["".concat(prefixCls, "-item-hover")]: hover,
50
+ ["".concat(prefixCls, "-item-withTick")]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
48
51
  ["".concat(prefixCls, "-item-").concat(type)]: type,
49
52
  ["".concat(prefixCls, "-item-active")]: active
50
53
  });
@@ -123,5 +126,6 @@ DropdownItem.defaultProps = {
123
126
  onMouseLeave: _noop2.default,
124
127
  forwardRef: _noop2.default
125
128
  };
129
+ DropdownItem.elementType = 'Dropdown.Item';
126
130
  var _default = DropdownItem;
127
131
  exports.default = _default;
@@ -14,7 +14,7 @@ export interface CarouselState {
14
14
  declare class Carousel extends BaseComponent<CarouselProps, CarouselState> {
15
15
  static propTypes: {
16
16
  activeIndex: PropTypes.Requireable<number>;
17
- animation: PropTypes.Requireable<"slide" | "fade">;
17
+ animation: PropTypes.Requireable<"fade" | "slide">;
18
18
  arrowProps: PropTypes.Requireable<object>;
19
19
  autoPlay: PropTypes.Requireable<NonNullable<boolean | object>>;
20
20
  className: PropTypes.Requireable<string>;
@@ -16,6 +16,9 @@ export interface DropdownItemProps extends BaseProps {
16
16
  active?: boolean;
17
17
  icon?: React.ReactNode;
18
18
  onKeyDown?: (e: React.KeyboardEvent) => void;
19
+ showTick?: boolean;
20
+ /** 内部属性不建议使用 */
21
+ hover?: boolean;
19
22
  }
20
23
  declare class DropdownItem extends BaseComponent<DropdownItemProps> {
21
24
  static propTypes: {
@@ -35,6 +38,7 @@ declare class DropdownItem extends BaseComponent<DropdownItemProps> {
35
38
  icon: PropTypes.Requireable<PropTypes.ReactNodeLike>;
36
39
  };
37
40
  static contextType: React.Context<DropdownContextType>;
41
+ static elementType: string;
38
42
  context: DropdownContextType;
39
43
  static defaultProps: {
40
44
  disabled: boolean;
@@ -19,15 +19,18 @@ class DropdownItem extends BaseComponent {
19
19
  type,
20
20
  active,
21
21
  icon,
22
- onKeyDown
22
+ onKeyDown,
23
+ showTick,
24
+ hover
23
25
  } = this.props;
24
26
  const {
25
- showTick
27
+ showTick: contextShowTick
26
28
  } = this.context;
27
29
  const itemclass = cls(className, {
28
30
  ["".concat(prefixCls, "-item")]: true,
29
31
  ["".concat(prefixCls, "-item-disabled")]: disabled,
30
- ["".concat(prefixCls, "-item-withTick")]: showTick,
32
+ ["".concat(prefixCls, "-item-hover")]: hover,
33
+ ["".concat(prefixCls, "-item-withTick")]: contextShowTick !== null && contextShowTick !== void 0 ? contextShowTick : showTick,
31
34
  ["".concat(prefixCls, "-item-").concat(type)]: type,
32
35
  ["".concat(prefixCls, "-item-active")]: active
33
36
  });
@@ -106,4 +109,5 @@ DropdownItem.defaultProps = {
106
109
  onMouseLeave: _noop,
107
110
  forwardRef: _noop
108
111
  };
112
+ DropdownItem.elementType = 'Dropdown.Item';
109
113
  export default DropdownItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.27.0",
3
+ "version": "2.27.1-alpha.0",
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.27.0",
21
- "@douyinfe/semi-animation-react": "2.27.0",
22
- "@douyinfe/semi-foundation": "2.27.0",
23
- "@douyinfe/semi-icons": "2.27.0",
24
- "@douyinfe/semi-illustrations": "2.27.0",
25
- "@douyinfe/semi-theme-default": "2.27.0",
20
+ "@douyinfe/semi-animation": "2.27.1-alpha.0",
21
+ "@douyinfe/semi-animation-react": "2.27.1-alpha.0",
22
+ "@douyinfe/semi-foundation": "2.27.1-alpha.0",
23
+ "@douyinfe/semi-icons": "2.27.1-alpha.0",
24
+ "@douyinfe/semi-illustrations": "2.27.1-alpha.0",
25
+ "@douyinfe/semi-theme-default": "2.27.1-alpha.0",
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": "a7a3f537ef48f75e3824c156e9b25a084e562dd6",
72
+ "gitHead": "1e58386172b9a4a374ffb6b5b82232461d00eea5",
73
73
  "devDependencies": {
74
74
  "@babel/plugin-proposal-decorators": "^7.15.8",
75
75
  "@babel/plugin-transform-runtime": "^7.15.8",