@douyinfe/semi-ui 2.51.0-beta.0 → 2.51.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.
@@ -715,7 +715,7 @@ class Cascader extends _baseComponent.default {
715
715
  const formatValuePath = [];
716
716
  normalizedValue.forEach(valueItem => {
717
717
  const formatItem = onChangeWithObject && (0, _isObject2.default)(valueItem[0]) ? valueItem.map(i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
718
- formatValuePath.push(formatItem);
718
+ formatItem.length > 0 && formatValuePath.push(formatItem);
719
719
  });
720
720
  // formatKeys is used to save key of value
721
721
  const formatKeys = formatValuePath.map(v => (0, _util.getKeyByValuePath)(v));
@@ -138,6 +138,7 @@ export interface FooterProps extends SliderProps {
138
138
  adaptiveTip?: string;
139
139
  originTip?: string;
140
140
  showTooltip?: boolean;
141
+ zIndex?: number;
141
142
  onZoomIn?: (zoom: number) => void;
142
143
  onZoomOut?: (zoom: number) => void;
143
144
  onPrev?: () => void;
@@ -92,11 +92,13 @@ class Footer extends _baseComponent.default {
92
92
  // 根据 props 中的 showTooltip 决定是否使用 Tooltip 包一层
93
93
  this.getFinalIconElement = (element, content, key) => {
94
94
  const {
95
- showTooltip
95
+ showTooltip,
96
+ zIndex
96
97
  } = this.props;
97
98
  return showTooltip ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
98
99
  content: content,
99
- key: `tooltip-${key}`
100
+ key: `tooltip-${key}`,
101
+ zIndex: zIndex + 1
100
102
  }, element) : element;
101
103
  };
102
104
  this.getLocalTextByKey = key => /*#__PURE__*/_react.default.createElement(_localeConsumer.default, {
@@ -375,6 +375,7 @@ class PreviewInner extends _baseComponent.default {
375
375
  ratio: ratio,
376
376
  prevTip: prevTip,
377
377
  nextTip: nextTip,
378
+ zIndex: zIndex,
378
379
  zoomInTip: zoomInTip,
379
380
  zoomOutTip: zoomOutTip,
380
381
  rotateTip: rotateTip,
@@ -446,7 +447,7 @@ PreviewInner.defaultProps = {
446
447
  lazyLoad: false,
447
448
  preLoad: true,
448
449
  preLoadGap: 2,
449
- zIndex: 1000,
450
+ zIndex: _constants.numbers.DEFAULT_Z_INDEX,
450
451
  maskClosable: true,
451
452
  viewerVisibleDelay: 10000,
452
453
  maxZoom: 5,
@@ -706,7 +706,7 @@ class Cascader extends BaseComponent {
706
706
  const formatValuePath = [];
707
707
  normalizedValue.forEach(valueItem => {
708
708
  const formatItem = onChangeWithObject && _isObject(valueItem[0]) ? valueItem.map(i => i === null || i === void 0 ? void 0 : i.value) : valueItem;
709
- formatValuePath.push(formatItem);
709
+ formatItem.length > 0 && formatValuePath.push(formatItem);
710
710
  });
711
711
  // formatKeys is used to save key of value
712
712
  const formatKeys = formatValuePath.map(v => getKeyByValuePath(v));
@@ -138,6 +138,7 @@ export interface FooterProps extends SliderProps {
138
138
  adaptiveTip?: string;
139
139
  originTip?: string;
140
140
  showTooltip?: boolean;
141
+ zIndex?: number;
141
142
  onZoomIn?: (zoom: number) => void;
142
143
  onZoomOut?: (zoom: number) => void;
143
144
  onPrev?: () => void;
@@ -85,11 +85,13 @@ export default class Footer extends BaseComponent {
85
85
  // 根据 props 中的 showTooltip 决定是否使用 Tooltip 包一层
86
86
  this.getFinalIconElement = (element, content, key) => {
87
87
  const {
88
- showTooltip
88
+ showTooltip,
89
+ zIndex
89
90
  } = this.props;
90
91
  return showTooltip ? /*#__PURE__*/React.createElement(Tooltip, {
91
92
  content: content,
92
- key: `tooltip-${key}`
93
+ key: `tooltip-${key}`,
94
+ zIndex: zIndex + 1
93
95
  }, element) : element;
94
96
  };
95
97
  this.getLocalTextByKey = key => /*#__PURE__*/React.createElement(LocaleConsumer, {
@@ -3,7 +3,7 @@ import _isEqual from "lodash/isEqual";
3
3
  import React from "react";
4
4
  import BaseComponent from "../_base/baseComponent";
5
5
  import PropTypes from "prop-types";
6
- import { cssClasses } from '@douyinfe/semi-foundation/lib/es/image/constants';
6
+ import { cssClasses, numbers } from '@douyinfe/semi-foundation/lib/es/image/constants';
7
7
  import cls from "classnames";
8
8
  import Portal from "../_portal";
9
9
  import { IconArrowLeft, IconArrowRight } from "@douyinfe/semi-icons";
@@ -368,6 +368,7 @@ export default class PreviewInner extends BaseComponent {
368
368
  ratio: ratio,
369
369
  prevTip: prevTip,
370
370
  nextTip: nextTip,
371
+ zIndex: zIndex,
371
372
  zoomInTip: zoomInTip,
372
373
  zoomOutTip: zoomOutTip,
373
374
  rotateTip: rotateTip,
@@ -438,7 +439,7 @@ PreviewInner.defaultProps = {
438
439
  lazyLoad: false,
439
440
  preLoad: true,
440
441
  preLoadGap: 2,
441
- zIndex: 1000,
442
+ zIndex: numbers.DEFAULT_Z_INDEX,
442
443
  maskClosable: true,
443
444
  viewerVisibleDelay: 10000,
444
445
  maxZoom: 5,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-ui",
3
- "version": "2.51.0-beta.0",
3
+ "version": "2.51.0",
4
4
  "description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es/index.js",
@@ -20,12 +20,12 @@
20
20
  "@dnd-kit/core": "^6.0.8",
21
21
  "@dnd-kit/sortable": "^7.0.2",
22
22
  "@dnd-kit/utilities": "^3.2.1",
23
- "@douyinfe/semi-animation": "2.51.0-beta.0",
24
- "@douyinfe/semi-animation-react": "2.51.0-beta.0",
25
- "@douyinfe/semi-foundation": "2.51.0-beta.0",
26
- "@douyinfe/semi-icons": "2.51.0-beta.0",
27
- "@douyinfe/semi-illustrations": "2.51.0-beta.0",
28
- "@douyinfe/semi-theme-default": "2.51.0-beta.0",
23
+ "@douyinfe/semi-animation": "2.51.0",
24
+ "@douyinfe/semi-animation-react": "2.51.0",
25
+ "@douyinfe/semi-foundation": "2.51.0",
26
+ "@douyinfe/semi-icons": "2.51.0",
27
+ "@douyinfe/semi-illustrations": "2.51.0",
28
+ "@douyinfe/semi-theme-default": "2.51.0",
29
29
  "async-validator": "^3.5.0",
30
30
  "classnames": "^2.2.6",
31
31
  "copy-text-to-clipboard": "^2.1.1",
@@ -75,7 +75,7 @@
75
75
  ],
76
76
  "author": "",
77
77
  "license": "MIT",
78
- "gitHead": "35dcd5c5793fbe9c564eeac62486a402b84f4075",
78
+ "gitHead": "5a554bf517411b933e891ad51b874bd9eb6c87c6",
79
79
  "devDependencies": {
80
80
  "@babel/plugin-proposal-decorators": "^7.15.8",
81
81
  "@babel/plugin-transform-runtime": "^7.15.8",