@kdcloudjs/kdesign 1.8.38 → 1.8.39-stable.2
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.
- package/CHANGELOG.md +2491 -0
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +523 -313
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +9 -9
- package/dist/kdesign.min.js.map +1 -1
- package/es/carousel/carousel.js +11 -4
- package/es/modal/modal.js +1 -1
- package/es/tabs/tabs.js +1 -1
- package/lib/carousel/carousel.js +10 -3
- package/lib/modal/modal.js +1 -1
- package/lib/tabs/tabs.js +1 -1
- package/package.json +3 -3
package/es/carousel/carousel.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
5
|
-
import React, { isValidElement, useContext, useImperativeHandle } from 'react';
|
|
5
|
+
import React, { isValidElement, useContext, useEffect, useImperativeHandle } from 'react';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
8
8
|
import { getCompProps } from '../_utils';
|
|
@@ -83,11 +83,18 @@ var InternalCarousel = function InternalCarousel(props, ref) {
|
|
|
83
83
|
}
|
|
84
84
|
}, [itemWidth]);
|
|
85
85
|
var setScrollXEffectStyle = React.useCallback(function () {
|
|
86
|
-
var _context;
|
|
87
86
|
var tempChild = processChildren(children);
|
|
88
|
-
if (!listRef.current
|
|
89
|
-
|
|
87
|
+
if (!listRef.current) return;
|
|
88
|
+
if (tempChild.length <= 1) {
|
|
89
|
+
listRef.current.style.cssText = '';
|
|
90
|
+
} else {
|
|
91
|
+
var _context;
|
|
92
|
+
listRef.current.style.cssText = needAnimation ? _concatInstanceProperty(_context = "transform: translateX(".concat(posX, "px); transition:all 0.3s ")).call(_context, easing) : "transform: translateX(".concat(posX, "px); transition:none");
|
|
93
|
+
}
|
|
90
94
|
}, [children === null || children === void 0 ? void 0 : children.length, needAnimation, easing, posX]);
|
|
95
|
+
useEffect(function () {
|
|
96
|
+
setCurrentIndex(0);
|
|
97
|
+
}, [children === null || children === void 0 ? void 0 : children.length]);
|
|
91
98
|
var jumpTo = React.useCallback(function (index, needAnimation) {
|
|
92
99
|
var tempChild = processChildren(children);
|
|
93
100
|
if (isFadeEffect) {
|
package/es/modal/modal.js
CHANGED
|
@@ -466,7 +466,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
466
466
|
onStop: onDragStop,
|
|
467
467
|
bounds: bounds,
|
|
468
468
|
cancel: _concatInstanceProperty(_context11 = ".".concat(modalPrefixCls, "-title-container, .")).call(_context11, modalPrefixCls, "-close-icon"),
|
|
469
|
-
"data-ignore-auto-rtl":
|
|
469
|
+
"data-ignore-auto-rtl": direction === 'rtl'
|
|
470
470
|
}, container))) : React.createElement(Draggable, {
|
|
471
471
|
handle: ".".concat(headerClass),
|
|
472
472
|
disabled: !draggable,
|
package/es/tabs/tabs.js
CHANGED
|
@@ -386,7 +386,7 @@ var Tabs = function Tabs(props) {
|
|
|
386
386
|
}
|
|
387
387
|
}, React.createElement("div", {
|
|
388
388
|
className: tabsClasses,
|
|
389
|
-
"data-ignore-auto-rtl":
|
|
389
|
+
"data-ignore-auto-rtl": direction === 'rtl'
|
|
390
390
|
}, renderTabPane(), renderContainer()));
|
|
391
391
|
};
|
|
392
392
|
Tabs.displayName = 'Tabs';
|
package/lib/carousel/carousel.js
CHANGED
|
@@ -97,11 +97,18 @@ var InternalCarousel = function InternalCarousel(props, ref) {
|
|
|
97
97
|
}
|
|
98
98
|
}, [itemWidth]);
|
|
99
99
|
var setScrollXEffectStyle = _react.default.useCallback(function () {
|
|
100
|
-
var _context;
|
|
101
100
|
var tempChild = processChildren(children);
|
|
102
|
-
if (!listRef.current
|
|
103
|
-
|
|
101
|
+
if (!listRef.current) return;
|
|
102
|
+
if (tempChild.length <= 1) {
|
|
103
|
+
listRef.current.style.cssText = '';
|
|
104
|
+
} else {
|
|
105
|
+
var _context;
|
|
106
|
+
listRef.current.style.cssText = needAnimation ? (0, _concat.default)(_context = "transform: translateX(".concat(posX, "px); transition:all 0.3s ")).call(_context, easing) : "transform: translateX(".concat(posX, "px); transition:none");
|
|
107
|
+
}
|
|
104
108
|
}, [children === null || children === void 0 ? void 0 : children.length, needAnimation, easing, posX]);
|
|
109
|
+
(0, _react.useEffect)(function () {
|
|
110
|
+
setCurrentIndex(0);
|
|
111
|
+
}, [children === null || children === void 0 ? void 0 : children.length]);
|
|
105
112
|
var jumpTo = _react.default.useCallback(function (index, needAnimation) {
|
|
106
113
|
var tempChild = processChildren(children);
|
|
107
114
|
if (isFadeEffect) {
|
package/lib/modal/modal.js
CHANGED
|
@@ -480,7 +480,7 @@ var InternalModal = function InternalModal(props, ref) {
|
|
|
480
480
|
onStop: onDragStop,
|
|
481
481
|
bounds: bounds,
|
|
482
482
|
cancel: (0, _concat.default)(_context11 = ".".concat(modalPrefixCls, "-title-container, .")).call(_context11, modalPrefixCls, "-close-icon"),
|
|
483
|
-
"data-ignore-auto-rtl":
|
|
483
|
+
"data-ignore-auto-rtl": direction === 'rtl'
|
|
484
484
|
}, container))) : _react.default.createElement(_reactDraggable.default, {
|
|
485
485
|
handle: ".".concat(headerClass),
|
|
486
486
|
disabled: !draggable,
|
package/lib/tabs/tabs.js
CHANGED
|
@@ -402,7 +402,7 @@ var Tabs = function Tabs(props) {
|
|
|
402
402
|
}
|
|
403
403
|
}, _react.default.createElement("div", {
|
|
404
404
|
className: tabsClasses,
|
|
405
|
-
"data-ignore-auto-rtl":
|
|
405
|
+
"data-ignore-auto-rtl": direction === 'rtl'
|
|
406
406
|
}, renderTabPane(), renderContainer()));
|
|
407
407
|
};
|
|
408
408
|
Tabs.displayName = 'Tabs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kdcloudjs/kdesign",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.39-stable.2",
|
|
4
4
|
"description": "KDesign 金蝶前端react 组件库",
|
|
5
5
|
"title": "kdesign",
|
|
6
6
|
"keywords": [
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && node scripts/filter-changelog.js",
|
|
62
62
|
"pub": "npm run test:all && cross-env PUB_ENV=pub np --no-publish --no-tests --no-cleanup && npm run build && npm publish",
|
|
63
63
|
"pub:beta": "npm run test:all && npm run build && cross-env PUB_ENV=pub np --no-cleanup --anyBranch --no-tests --tag=beta",
|
|
64
|
-
"pub:
|
|
64
|
+
"pub:stable": "npm run test:all && npm run build && cross-env PUB_ENV=pub np --no-cleanup --anyBranch --no-tests --tag=1.8.39-stable",
|
|
65
65
|
"new": "node scripts/create-component.js",
|
|
66
66
|
"token": "node scripts/generate-token.js",
|
|
67
67
|
"preinstall": "npx force-resolutions"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@babel/runtime-corejs3": "^7.11.2",
|
|
79
79
|
"@babel/standalone": "^7.14.3",
|
|
80
80
|
"@kdcloudjs/kdesign-icons": "^1.0.5",
|
|
81
|
-
"@kdcloudjs/table": "1.2.2-canary.
|
|
81
|
+
"@kdcloudjs/table": "1.2.2-canary.12",
|
|
82
82
|
"@popperjs/core": "^2.11.8",
|
|
83
83
|
"@types/js-cookie": "^3.0.3",
|
|
84
84
|
"async-validator": "^3.5.1",
|