@douyinfe/semi-ui 2.9.1 → 2.10.0-beta.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.
Files changed (47) hide show
  1. package/banner/_story/banner.stories.js +62 -1
  2. package/banner/index.tsx +5 -5
  3. package/carousel/CarouselArrow.tsx +62 -0
  4. package/carousel/CarouselIndicator.tsx +84 -0
  5. package/carousel/__test__/carousel.test.js +159 -0
  6. package/carousel/_story/carousel.stories.js +486 -0
  7. package/carousel/index.tsx +294 -0
  8. package/carousel/interface.ts +64 -0
  9. package/cascader/index.tsx +1 -2
  10. package/dist/css/semi.css +342 -0
  11. package/dist/css/semi.min.css +1 -1
  12. package/dist/umd/semi-ui.js +884 -66
  13. package/dist/umd/semi-ui.js.map +1 -1
  14. package/dist/umd/semi-ui.min.js +1 -1
  15. package/dist/umd/semi-ui.min.js.map +1 -1
  16. package/index.ts +2 -0
  17. package/lib/cjs/banner/index.js +11 -5
  18. package/lib/cjs/carousel/CarouselArrow.d.ts +8 -0
  19. package/lib/cjs/carousel/CarouselArrow.js +91 -0
  20. package/lib/cjs/carousel/CarouselIndicator.d.ts +23 -0
  21. package/lib/cjs/carousel/CarouselIndicator.js +145 -0
  22. package/lib/cjs/carousel/index.d.ts +58 -0
  23. package/lib/cjs/carousel/index.js +345 -0
  24. package/lib/cjs/carousel/interface.d.ts +62 -0
  25. package/lib/cjs/carousel/interface.js +7 -0
  26. package/lib/cjs/cascader/index.js +1 -1
  27. package/lib/cjs/index.d.ts +1 -0
  28. package/lib/cjs/index.js +9 -0
  29. package/lib/cjs/switch/index.d.ts +3 -0
  30. package/lib/cjs/switch/index.js +26 -6
  31. package/lib/es/banner/index.js +11 -5
  32. package/lib/es/carousel/CarouselArrow.d.ts +8 -0
  33. package/lib/es/carousel/CarouselArrow.js +72 -0
  34. package/lib/es/carousel/CarouselIndicator.d.ts +23 -0
  35. package/lib/es/carousel/CarouselIndicator.js +125 -0
  36. package/lib/es/carousel/index.d.ts +58 -0
  37. package/lib/es/carousel/index.js +311 -0
  38. package/lib/es/carousel/interface.d.ts +62 -0
  39. package/lib/es/carousel/interface.js +1 -0
  40. package/lib/es/cascader/index.js +1 -1
  41. package/lib/es/index.d.ts +1 -0
  42. package/lib/es/index.js +1 -0
  43. package/lib/es/switch/index.d.ts +3 -0
  44. package/lib/es/switch/index.js +26 -6
  45. package/package.json +9 -9
  46. package/switch/index.tsx +20 -3
  47. package/tagInput/__test__/tagInput.test.js +11 -11
@@ -7400,6 +7400,13 @@ Stack.prototype.set = stackSet;
7400
7400
  module.exports = Stack;
7401
7401
 
7402
7402
 
7403
+ /***/ }),
7404
+
7405
+ /***/ "HzcD":
7406
+ /***/ (function(module, exports) {
7407
+
7408
+
7409
+
7403
7410
  /***/ }),
7404
7411
 
7405
7412
  /***/ "I1fX":
@@ -7434,29 +7441,29 @@ module.exports = baseTrim;
7434
7441
  "use strict";
7435
7442
 
7436
7443
 
7437
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
7444
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
7438
7445
 
7439
7446
  Object.defineProperty(exports, "__esModule", {
7440
7447
  value: true
7441
7448
  });
7442
- exports.matchesSelector = matchesSelector;
7443
- exports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
7449
+ exports.addClassName = addClassName;
7444
7450
  exports.addEvent = addEvent;
7445
- exports.removeEvent = removeEvent;
7446
- exports.outerHeight = outerHeight;
7447
- exports.outerWidth = outerWidth;
7448
- exports.innerHeight = innerHeight;
7449
- exports.innerWidth = innerWidth;
7450
- exports.offsetXYFromParent = offsetXYFromParent;
7451
+ exports.addUserSelectStyles = addUserSelectStyles;
7451
7452
  exports.createCSSTransform = createCSSTransform;
7452
7453
  exports.createSVGTransform = createSVGTransform;
7453
- exports.getTranslation = getTranslation;
7454
7454
  exports.getTouch = getTouch;
7455
7455
  exports.getTouchIdentifier = getTouchIdentifier;
7456
- exports.addUserSelectStyles = addUserSelectStyles;
7457
- exports.removeUserSelectStyles = removeUserSelectStyles;
7458
- exports.addClassName = addClassName;
7456
+ exports.getTranslation = getTranslation;
7457
+ exports.innerHeight = innerHeight;
7458
+ exports.innerWidth = innerWidth;
7459
+ exports.matchesSelector = matchesSelector;
7460
+ exports.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
7461
+ exports.offsetXYFromParent = offsetXYFromParent;
7462
+ exports.outerHeight = outerHeight;
7463
+ exports.outerWidth = outerWidth;
7459
7464
  exports.removeClassName = removeClassName;
7465
+ exports.removeEvent = removeEvent;
7466
+ exports.removeUserSelectStyles = removeUserSelectStyles;
7460
7467
 
7461
7468
  var _shims = __webpack_require__("cCoX");
7462
7469
 
@@ -7466,9 +7473,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
7466
7473
 
7467
7474
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
7468
7475
 
7469
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
7476
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7470
7477
 
7471
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7478
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
7472
7479
 
7473
7480
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7474
7481
 
@@ -9998,11 +10005,17 @@ $({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {
9998
10005
 
9999
10006
  var $ = __webpack_require__("n9AK");
10000
10007
  var $includes = __webpack_require__("A551").includes;
10008
+ var fails = __webpack_require__("XU0c");
10001
10009
  var addToUnscopables = __webpack_require__("Uh/D");
10002
10010
 
10011
+ // FF99+ bug
10012
+ var BROKEN_ON_SPARSE = fails(function () {
10013
+ return !Array(1).includes();
10014
+ });
10015
+
10003
10016
  // `Array.prototype.includes` method
10004
10017
  // https://tc39.es/ecma262/#sec-array.prototype.includes
10005
- $({ target: 'Array', proto: true }, {
10018
+ $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
10006
10019
  includes: function includes(el /* , fromIndex = 0 */) {
10007
10020
  return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
10008
10021
  }
@@ -10332,13 +10345,13 @@ module.exports = toPath;
10332
10345
  Object.defineProperty(exports, "__esModule", {
10333
10346
  value: true
10334
10347
  });
10335
- exports.getBoundPosition = getBoundPosition;
10336
- exports.snapToGrid = snapToGrid;
10337
10348
  exports.canDragX = canDragX;
10338
10349
  exports.canDragY = canDragY;
10339
- exports.getControlPosition = getControlPosition;
10340
10350
  exports.createCoreData = createCoreData;
10341
10351
  exports.createDraggableData = createDraggableData;
10352
+ exports.getBoundPosition = getBoundPosition;
10353
+ exports.getControlPosition = getControlPosition;
10354
+ exports.snapToGrid = snapToGrid;
10342
10355
 
10343
10356
  var _shims = __webpack_require__("cCoX");
10344
10357
 
@@ -11281,10 +11294,10 @@ var store = __webpack_require__("yULr");
11281
11294
  (module.exports = function (key, value) {
11282
11295
  return store[key] || (store[key] = value !== undefined ? value : {});
11283
11296
  })('versions', []).push({
11284
- version: '3.22.1',
11297
+ version: '3.22.3',
11285
11298
  mode: IS_PURE ? 'pure' : 'global',
11286
11299
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
11287
- license: 'https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE',
11300
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.3/LICENSE',
11288
11301
  source: 'https://github.com/zloirock/core-js'
11289
11302
  });
11290
11303
 
@@ -13367,7 +13380,7 @@ module.exports = overArg;
13367
13380
  "use strict";
13368
13381
 
13369
13382
 
13370
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
13383
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13371
13384
 
13372
13385
  Object.defineProperty(exports, "__esModule", {
13373
13386
  value: true
@@ -13410,9 +13423,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
13410
13423
 
13411
13424
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
13412
13425
 
13413
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
13426
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13414
13427
 
13415
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
13428
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
13416
13429
 
13417
13430
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
13418
13431
 
@@ -13640,7 +13653,21 @@ var DraggableCore = /*#__PURE__*/function (_React$Component) {
13640
13653
  var position = (0, _positionFns.getControlPosition)(e, _this.state.touchIdentifier, _assertThisInitialized(_this));
13641
13654
  if (position == null) return;
13642
13655
  var x = position.x,
13643
- y = position.y;
13656
+ y = position.y; // Snap to grid if prop has been provided
13657
+
13658
+ if (Array.isArray(_this.props.grid)) {
13659
+ var deltaX = x - _this.state.lastX || 0;
13660
+ var deltaY = y - _this.state.lastY || 0;
13661
+
13662
+ var _snapToGrid3 = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY);
13663
+
13664
+ var _snapToGrid4 = _slicedToArray(_snapToGrid3, 2);
13665
+
13666
+ deltaX = _snapToGrid4[0];
13667
+ deltaY = _snapToGrid4[1];
13668
+ x = _this.state.lastX + deltaX, y = _this.state.lastY + deltaY;
13669
+ }
13670
+
13644
13671
  var coreEvent = (0, _positionFns.createCoreData)(_assertThisInitialized(_this), x, y); // Call event handler
13645
13672
 
13646
13673
  var shouldContinue = _this.props.onStop(e, coreEvent);
@@ -13737,9 +13764,9 @@ var DraggableCore = /*#__PURE__*/function (_React$Component) {
13737
13764
  value: function findDOMNode()
13738
13765
  /*: ?HTMLElement*/
13739
13766
  {
13740
- var _this$props$nodeRef$c, _this$props, _this$props$nodeRef;
13767
+ var _this$props, _this$props2, _this$props2$nodeRef;
13741
13768
 
13742
- return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 ? void 0 : (_this$props$nodeRef = _this$props.nodeRef) === null || _this$props$nodeRef === void 0 ? void 0 : _this$props$nodeRef.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);
13769
+ return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 ? void 0 : (_this$props2$nodeRef = _this$props2.nodeRef) === null || _this$props2$nodeRef === void 0 ? void 0 : _this$props2$nodeRef.current : _reactDom.default.findDOMNode(this);
13743
13770
  }
13744
13771
  }, {
13745
13772
  key: "render",
@@ -18266,11 +18293,11 @@ exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDes
18266
18293
  Object.defineProperty(exports, "__esModule", {
18267
18294
  value: true
18268
18295
  });
18296
+ exports.dontSetMe = dontSetMe;
18269
18297
  exports.findInArray = findInArray;
18298
+ exports.int = int;
18270
18299
  exports.isFunction = isFunction;
18271
18300
  exports.isNum = isNum;
18272
- exports.int = int;
18273
- exports.dontSetMe = dontSetMe;
18274
18301
 
18275
18302
  // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
18276
18303
  function findInArray(array
@@ -18739,7 +18766,7 @@ module.exports = mapCacheDelete;
18739
18766
  "use strict";
18740
18767
 
18741
18768
 
18742
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
18769
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
18743
18770
 
18744
18771
  Object.defineProperty(exports, "__esModule", {
18745
18772
  value: true
@@ -18784,9 +18811,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
18784
18811
 
18785
18812
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
18786
18813
 
18787
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
18814
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
18788
18815
 
18789
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
18816
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
18790
18817
 
18791
18818
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18792
18819
 
@@ -18804,9 +18831,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
18804
18831
 
18805
18832
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
18806
18833
 
18807
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
18834
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
18808
18835
 
18809
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
18836
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
18810
18837
 
18811
18838
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18812
18839
 
@@ -24816,6 +24843,7 @@ __webpack_require__.d(__webpack_exports__, "ButtonGroup", function() { return /*
24816
24843
  __webpack_require__.d(__webpack_exports__, "Calendar", function() { return /* reexport */ calendar_0; });
24817
24844
  __webpack_require__.d(__webpack_exports__, "Card", function() { return /* reexport */ card_0; });
24818
24845
  __webpack_require__.d(__webpack_exports__, "CardGroup", function() { return /* reexport */ cardGroup; });
24846
+ __webpack_require__.d(__webpack_exports__, "Carousel", function() { return /* reexport */ carousel_0; });
24819
24847
  __webpack_require__.d(__webpack_exports__, "Cascader", function() { return /* reexport */ cascader_0; });
24820
24848
  __webpack_require__.d(__webpack_exports__, "Checkbox", function() { return /* reexport */ checkbox_0; });
24821
24849
  __webpack_require__.d(__webpack_exports__, "CheckboxGroup", function() { return /* reexport */ checkboxGroup; });
@@ -37943,7 +37971,9 @@ class banner_Banner extends baseComponent_BaseComponent {
37943
37971
  const closer = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
37944
37972
  className: "".concat(banner_prefixCls, "-close"),
37945
37973
  onClick: this.remove,
37946
- icon: closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
37974
+ icon: closeIcon || /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
37975
+ "aria-hidden": true
37976
+ }),
37947
37977
  theme: "borderless",
37948
37978
  size: "small",
37949
37979
  type: "tertiary",
@@ -37959,16 +37989,20 @@ class banner_Banner extends baseComponent_BaseComponent {
37959
37989
  } = this.props;
37960
37990
  const iconMap = {
37961
37991
  warning: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconAlertTriangle, {
37962
- size: "large"
37992
+ size: "large",
37993
+ "aria-label": 'warning'
37963
37994
  }),
37964
37995
  success: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconTickCircle, {
37965
- size: "large"
37996
+ size: "large",
37997
+ "aria-label": 'success'
37966
37998
  }),
37967
37999
  info: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconInfoCircle, {
37968
- size: "large"
38000
+ size: "large",
38001
+ "aria-label": 'info'
37969
38002
  }),
37970
38003
  danger: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconAlertCircle, {
37971
- size: "large"
38004
+ size: "large",
38005
+ "aria-label": 'danger'
37972
38006
  })
37973
38007
  };
37974
38008
  let iconType = iconMap[type];
@@ -45291,6 +45325,768 @@ cardGroup_CardGroup.defaultProps = {
45291
45325
  spacing: 16
45292
45326
  };
45293
45327
  /* harmony default export */ var cardGroup = (cardGroup_CardGroup);
45328
+ // CONCATENATED MODULE: ../semi-foundation/carousel/constants.ts
45329
+
45330
+ const carousel_constants_cssClasses = {
45331
+ CAROUSEL: "".concat(BASE_CLASS_PREFIX, "-carousel"),
45332
+ CAROUSEL_INDICATOR: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator"),
45333
+ CAROUSEL_INDICATOR_LINE: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator-line"),
45334
+ CAROUSEL_INDICATOR_DOT: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator-dot"),
45335
+ CAROUSEL_INDICATOR_COLUMNAR: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator-columnar"),
45336
+ CAROUSEL_INDICATOR_INACTIVE: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator-inactive"),
45337
+ CAROUSEL_INDICATOR_ACTIVE: "".concat(BASE_CLASS_PREFIX, "-carousel-indicator-active"),
45338
+ CAROUSEL_CONTENT: "".concat(BASE_CLASS_PREFIX, "-carousel-content"),
45339
+ CAROUSEL_ARROW: "".concat(BASE_CLASS_PREFIX, "-carousel-arrow")
45340
+ };
45341
+ const carousel_constants_numbers = {
45342
+ DEFAULT_ACTIVE_INDEX: 0,
45343
+ DEFAULT_INTERVAL: 2000,
45344
+ DEFAULT_SPEED: 300
45345
+ };
45346
+ const carousel_constants_strings = {
45347
+ ANIMATION_MAP: ['slide', 'fade'],
45348
+ DIRECTION: ['left', 'right'],
45349
+ TYPE_MAP: ['columnar', 'line', 'dot'],
45350
+ THEME_MAP: ['dark', 'primary', 'light'],
45351
+ POSITION_MAP: ['left', 'center', 'right'],
45352
+ ARROW_MAP: ['always', 'hover'],
45353
+ SIZE: ['small', 'medium'],
45354
+ TRIGGER: ['click', 'hover']
45355
+ };
45356
+
45357
+ // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/set-interval.js
45358
+ var set_interval = __webpack_require__("1l5A");
45359
+ var set_interval_default = /*#__PURE__*/__webpack_require__.n(set_interval);
45360
+
45361
+ // CONCATENATED MODULE: ../semi-foundation/carousel/foundation.ts
45362
+
45363
+
45364
+
45365
+
45366
+
45367
+
45368
+
45369
+
45370
+ class foundation_CarouselFoundation extends foundation {
45371
+ constructor(adapter) {
45372
+ super(assign_default()({}, adapter));
45373
+ this._interval = null;
45374
+ this.throttleChange = throttle_default()(this.onIndicatorChange, this.getSwitchingTime());
45375
+ }
45376
+
45377
+ play(interval) {
45378
+ if (this._interval) {
45379
+ clearInterval(this._interval);
45380
+ }
45381
+
45382
+ this._interval = set_interval_default()(() => {
45383
+ this.next();
45384
+ }, interval);
45385
+ }
45386
+
45387
+ stop() {
45388
+ if (this._interval) {
45389
+ clearInterval(this._interval);
45390
+ }
45391
+ }
45392
+
45393
+ goTo(activeIndex) {
45394
+ const {
45395
+ activeIndex: stateActiveIndex
45396
+ } = this.getStates();
45397
+ const targetIndex = this.getValidIndex(activeIndex);
45398
+
45399
+ this._adapter.setIsReverse(stateActiveIndex > targetIndex);
45400
+
45401
+ if (this.getIsControledComponent()) {
45402
+ this._notifyChange(targetIndex);
45403
+ } else {
45404
+ this._notifyChange(targetIndex);
45405
+
45406
+ this.handleNewActiveIndex(targetIndex);
45407
+ }
45408
+ }
45409
+
45410
+ next() {
45411
+ const {
45412
+ activeIndex: stateActiveIndex
45413
+ } = this.getStates();
45414
+ const targetIndex = this.getValidIndex(stateActiveIndex + 1);
45415
+
45416
+ this._adapter.setIsReverse(false);
45417
+
45418
+ if (this.getIsControledComponent()) {
45419
+ this._notifyChange(targetIndex);
45420
+ } else {
45421
+ this._notifyChange(targetIndex);
45422
+
45423
+ this.handleNewActiveIndex(targetIndex);
45424
+ }
45425
+ }
45426
+
45427
+ prev() {
45428
+ const {
45429
+ activeIndex: stateActiveIndex
45430
+ } = this.getStates();
45431
+ const targetIndex = this.getValidIndex(stateActiveIndex - 1);
45432
+
45433
+ this._adapter.setIsReverse(true);
45434
+
45435
+ if (this.getIsControledComponent()) {
45436
+ this._notifyChange(targetIndex);
45437
+ } else {
45438
+ this._notifyChange(targetIndex);
45439
+
45440
+ this.handleNewActiveIndex(targetIndex);
45441
+ }
45442
+ }
45443
+
45444
+ destroy() {
45445
+ this._unregisterInterval();
45446
+ }
45447
+
45448
+ _unregisterInterval() {
45449
+ if (this._interval) {
45450
+ clearInterval(this._interval);
45451
+ this._interval = null;
45452
+ }
45453
+ }
45454
+
45455
+ _notifyChange(activeIndex) {
45456
+ const {
45457
+ activeIndex: stateActiveIndex,
45458
+ isInit
45459
+ } = this.getStates();
45460
+
45461
+ if (isInit) {
45462
+ this._adapter.setIsInit(false);
45463
+ }
45464
+
45465
+ if (stateActiveIndex !== activeIndex) {
45466
+ this._adapter.setPreActiveIndex(stateActiveIndex);
45467
+
45468
+ this._adapter.notifyChange(activeIndex, stateActiveIndex);
45469
+ }
45470
+ }
45471
+
45472
+ getValidIndex(index) {
45473
+ const {
45474
+ children
45475
+ } = this.getStates();
45476
+ return (index + children.length) % children.length;
45477
+ }
45478
+
45479
+ getSwitchingTime() {
45480
+ const {
45481
+ autoPlay,
45482
+ speed
45483
+ } = this.getProps();
45484
+ const autoPlayType = typeof autoPlay;
45485
+
45486
+ if (autoPlayType === 'boolean' && autoPlay) {
45487
+ return carousel_constants_numbers.DEFAULT_INTERVAL + speed;
45488
+ }
45489
+
45490
+ if (isObject_default()(autoPlay)) {
45491
+ return get_default()(autoPlay, 'interval', carousel_constants_numbers.DEFAULT_INTERVAL) + speed;
45492
+ }
45493
+
45494
+ return speed;
45495
+ }
45496
+
45497
+ getIsControledComponent() {
45498
+ return this._isInProps('activeIndex');
45499
+ }
45500
+
45501
+ handleAutoPlay() {
45502
+ const {
45503
+ autoPlay
45504
+ } = this.getProps();
45505
+ const autoPlayType = typeof autoPlay;
45506
+
45507
+ if (autoPlayType === 'boolean' && autoPlay || isObject_default()(autoPlay)) {
45508
+ this.play(this.getSwitchingTime());
45509
+ }
45510
+ }
45511
+
45512
+ handleKeyDown(event) {
45513
+ if (event.key === 'ArrowLeft') {
45514
+ this.prev();
45515
+ }
45516
+
45517
+ if (event.key === 'ArrowRight') {
45518
+ this.next();
45519
+ }
45520
+ }
45521
+
45522
+ onIndicatorChange(activeIndex) {
45523
+ const {
45524
+ activeIndex: stateActiveIndex
45525
+ } = this.getStates();
45526
+
45527
+ this._adapter.setIsReverse(stateActiveIndex > activeIndex);
45528
+
45529
+ this._notifyChange(activeIndex);
45530
+
45531
+ if (!this.getIsControledComponent()) {
45532
+ this.handleNewActiveIndex(activeIndex);
45533
+ }
45534
+ }
45535
+
45536
+ handleNewActiveIndex(activeIndex) {
45537
+ const {
45538
+ activeIndex: stateActiveIndex
45539
+ } = this.getStates();
45540
+
45541
+ if (stateActiveIndex !== activeIndex) {
45542
+ this._adapter.setNewActiveIndex(activeIndex);
45543
+ }
45544
+ }
45545
+
45546
+ getDefaultActiveIndex() {
45547
+ let activeIndex;
45548
+ const props = this.getProps();
45549
+
45550
+ if ('activeIndex' in props) {
45551
+ activeIndex = props.activeIndex;
45552
+ } else if ('defaultActiveIndex' in props) {
45553
+ activeIndex = props.defaultActiveIndex;
45554
+ }
45555
+
45556
+ return activeIndex;
45557
+ }
45558
+
45559
+ }
45560
+
45561
+ /* harmony default export */ var carousel_foundation = (foundation_CarouselFoundation);
45562
+ // CONCATENATED MODULE: ../semi-foundation/utils/getDataAttr.ts
45563
+
45564
+
45565
+ function getDataAttr(props) {
45566
+ var _context;
45567
+
45568
+ return reduce_default()(_context = keys_default()(props)).call(_context, (prev, key) => {
45569
+ if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
45570
+ prev[key] = props[key];
45571
+ }
45572
+
45573
+ return prev;
45574
+ }, {});
45575
+ }
45576
+ // CONCATENATED MODULE: ./carousel/CarouselIndicator.tsx
45577
+
45578
+
45579
+
45580
+
45581
+
45582
+ var CarouselIndicator_rest = undefined && undefined.__rest || function (s, e) {
45583
+ var t = {};
45584
+
45585
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && index_of_default()(e).call(e, p) < 0) t[p] = s[p];
45586
+
45587
+ if (s != null && typeof get_own_property_symbols_default.a === "function") for (var i = 0, p = get_own_property_symbols_default()(s); i < p.length; i++) {
45588
+ if (index_of_default()(e).call(e, p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
45589
+ }
45590
+ return t;
45591
+ };
45592
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
45593
+
45594
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
45595
+
45596
+
45597
+
45598
+
45599
+
45600
+
45601
+
45602
+
45603
+ class CarouselIndicator_CarouselIndicator extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
45604
+ constructor() {
45605
+ super(...arguments);
45606
+
45607
+ this.onIndicatorChange = activeIndex => {
45608
+ this.props.onIndicatorChange(activeIndex);
45609
+ };
45610
+
45611
+ this.handleIndicatorClick = activeIndex => {
45612
+ const {
45613
+ trigger
45614
+ } = this.props;
45615
+
45616
+ if (trigger === 'click') {
45617
+ this.onIndicatorChange(activeIndex);
45618
+ }
45619
+ };
45620
+
45621
+ this.handleIndicatorHover = activeIndex => {
45622
+ const {
45623
+ trigger
45624
+ } = this.props;
45625
+
45626
+ if (trigger === 'hover') {
45627
+ this.onIndicatorChange(activeIndex);
45628
+ }
45629
+ };
45630
+ }
45631
+
45632
+ renderIndicatorContent() {
45633
+ const {
45634
+ total,
45635
+ theme,
45636
+ size,
45637
+ activeIndex
45638
+ } = this.props;
45639
+ const indicatorContent = [];
45640
+
45641
+ for (let i = 0; i < total; i++) {
45642
+ var _context, _context2;
45643
+
45644
+ indicatorContent.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
45645
+ // role='none'
45646
+ key: i,
45647
+ "data-index": i,
45648
+ className: classnames_default()(["".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-item")], {
45649
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-item-active")]: i === activeIndex,
45650
+ [concat_default()(_context = "".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-item-")).call(_context, theme)]: theme,
45651
+ [concat_default()(_context2 = "".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-item-")).call(_context2, size)]: size
45652
+ }),
45653
+ onClick: () => this.handleIndicatorClick(i),
45654
+ onMouseEnter: () => this.handleIndicatorHover(i)
45655
+ }));
45656
+ }
45657
+
45658
+ return indicatorContent;
45659
+ }
45660
+
45661
+ render() {
45662
+ var _context3, _context4;
45663
+
45664
+ const _a = this.props,
45665
+ {
45666
+ type,
45667
+ size,
45668
+ theme,
45669
+ style,
45670
+ className,
45671
+ position
45672
+ } = _a,
45673
+ restProps = CarouselIndicator_rest(_a, ["type", "size", "theme", "style", "className", "position"]);
45674
+
45675
+ const classNames = classnames_default()(className, {
45676
+ [carousel_constants_cssClasses.CAROUSEL_INDICATOR]: true,
45677
+ [concat_default()(_context3 = "".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-")).call(_context3, type)]: type,
45678
+ [concat_default()(_context4 = "".concat(carousel_constants_cssClasses.CAROUSEL_INDICATOR, "-")).call(_context4, position)]: position
45679
+ });
45680
+ const indicatorContent = this.renderIndicatorContent();
45681
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
45682
+ className: classNames,
45683
+ style: style
45684
+ }, getDataAttr(restProps)), indicatorContent);
45685
+ }
45686
+
45687
+ }
45688
+
45689
+ CarouselIndicator_CarouselIndicator.propTypes = {
45690
+ activeKey: prop_types_default.a.number,
45691
+ className: prop_types_default.a.string,
45692
+ position: prop_types_default.a.oneOf(carousel_constants_strings.POSITION_MAP),
45693
+ size: prop_types_default.a.oneOf(carousel_constants_strings.SIZE),
45694
+ style: prop_types_default.a.object,
45695
+ theme: prop_types_default.a.oneOf(carousel_constants_strings.THEME_MAP),
45696
+ total: prop_types_default.a.number,
45697
+ onIndicatorChange: prop_types_default.a.func,
45698
+ type: prop_types_default.a.oneOf(carousel_constants_strings.TYPE_MAP),
45699
+ trigger: prop_types_default.a.oneOf(carousel_constants_strings.TRIGGER)
45700
+ };
45701
+ /* harmony default export */ var carousel_CarouselIndicator = (CarouselIndicator_CarouselIndicator);
45702
+ // CONCATENATED MODULE: ./carousel/CarouselArrow.tsx
45703
+
45704
+
45705
+
45706
+
45707
+
45708
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
45709
+
45710
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
45711
+
45712
+
45713
+
45714
+
45715
+
45716
+ class CarouselArrow_CarouselArrow extends external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.PureComponent {
45717
+ constructor() {
45718
+ super(...arguments);
45719
+
45720
+ this.renderLeftIcon = () => {
45721
+ return get_default()(this.props, 'arrowProps.leftArrow.children', /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
45722
+ "aria-label": "Previous index",
45723
+ size: "inherit"
45724
+ }));
45725
+ };
45726
+
45727
+ this.renderRightIcon = () => {
45728
+ return get_default()(this.props, 'arrowProps.rightArrow.children', /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
45729
+ "aria-label": "Next index",
45730
+ size: "inherit"
45731
+ }));
45732
+ };
45733
+ }
45734
+
45735
+ render() {
45736
+ var _context, _context2, _context3;
45737
+
45738
+ const {
45739
+ type,
45740
+ theme,
45741
+ prev,
45742
+ next,
45743
+ timing
45744
+ } = this.props;
45745
+ const classNames = classnames_default()({
45746
+ [carousel_constants_cssClasses.CAROUSEL_ARROW]: true,
45747
+ [concat_default()(_context = "".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-")).call(_context, theme)]: theme,
45748
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-hover")]: type === 'hover'
45749
+ });
45750
+ const leftClassNames = classnames_default()({
45751
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-prev")]: true,
45752
+ [concat_default()(_context2 = "".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-")).call(_context2, theme)]: theme
45753
+ });
45754
+ const rightClassNames = classnames_default()({
45755
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-next")]: true,
45756
+ [concat_default()(_context3 = "".concat(carousel_constants_cssClasses.CAROUSEL_ARROW, "-")).call(_context3, theme)]: theme
45757
+ });
45758
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
45759
+ className: classNames
45760
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
45761
+ // role='button'
45762
+ className: leftClassNames,
45763
+ onClick: throttle_default()(prev, timing)
45764
+ }, get_default()(this.props, 'arrowProps.leftArrow.props')), this.renderLeftIcon()), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
45765
+ // role='button'
45766
+ // tabIndex={0}
45767
+ className: rightClassNames,
45768
+ onClick: throttle_default()(next, timing)
45769
+ }, get_default()(this.props, 'arrowProps.rightArrow.props')), this.renderRightIcon()));
45770
+ }
45771
+
45772
+ }
45773
+
45774
+ /* harmony default export */ var carousel_CarouselArrow = (CarouselArrow_CarouselArrow);
45775
+ // EXTERNAL MODULE: ../semi-foundation/carousel/carousel.scss
45776
+ var carousel = __webpack_require__("HzcD");
45777
+
45778
+ // CONCATENATED MODULE: ./carousel/index.tsx
45779
+
45780
+
45781
+
45782
+
45783
+
45784
+
45785
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
45786
+
45787
+
45788
+
45789
+
45790
+
45791
+
45792
+
45793
+
45794
+
45795
+
45796
+
45797
+ class carousel_Carousel extends baseComponent_BaseComponent {
45798
+ constructor(props) {
45799
+ super(props);
45800
+
45801
+ this.play = () => {
45802
+ return this.foundation.handleAutoPlay();
45803
+ };
45804
+
45805
+ this.stop = () => {
45806
+ return this.foundation.stop();
45807
+ };
45808
+
45809
+ this.goTo = targetIndex => {
45810
+ return this.foundation.goTo(targetIndex);
45811
+ };
45812
+
45813
+ this.prev = () => {
45814
+ return this.foundation.prev();
45815
+ };
45816
+
45817
+ this.next = () => {
45818
+ return this.foundation.next();
45819
+ };
45820
+
45821
+ this.handleAutoPlay = () => {
45822
+ if (!this.foundation.getIsControledComponent()) {
45823
+ this.foundation.handleAutoPlay();
45824
+ }
45825
+ };
45826
+
45827
+ this.handleMouseEnter = () => {
45828
+ const {
45829
+ autoPlay
45830
+ } = this.props;
45831
+
45832
+ if (typeof autoPlay !== 'object' || autoPlay.hoverToPause) {
45833
+ this.foundation.stop();
45834
+ }
45835
+ };
45836
+
45837
+ this.handleMouseLeave = () => {
45838
+ const {
45839
+ autoPlay
45840
+ } = this.props;
45841
+
45842
+ if ((typeof autoPlay !== 'object' || autoPlay.hoverToPause) && !this.foundation.getIsControledComponent()) {
45843
+ this.foundation.handleAutoPlay();
45844
+ }
45845
+ };
45846
+
45847
+ this.onIndicatorChange = activeIndex => {
45848
+ return this.foundation.throttleChange(activeIndex);
45849
+ };
45850
+
45851
+ this.getChildren = () => {
45852
+ var _context;
45853
+
45854
+ const {
45855
+ children: originChildren
45856
+ } = this.props;
45857
+ return filter_default()(_context = external_root_React_commonjs2_react_commonjs_react_amd_react_["Children"].toArray(originChildren)).call(_context, child => {
45858
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(child);
45859
+ });
45860
+ };
45861
+
45862
+ this.getValidIndex = activeIndex => {
45863
+ return this.foundation.getValidIndex(activeIndex);
45864
+ };
45865
+
45866
+ this.renderChildren = () => {
45867
+ const {
45868
+ speed,
45869
+ animation
45870
+ } = this.props;
45871
+ const {
45872
+ activeIndex,
45873
+ children,
45874
+ preIndex,
45875
+ isInit
45876
+ } = this.state;
45877
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, map_default()(children).call(children, (child, index) => {
45878
+ const isCurrent = index === activeIndex;
45879
+ const isPrev = index === this.getValidIndex(activeIndex - 1);
45880
+ const isNext = index === this.getValidIndex(activeIndex + 1);
45881
+ const animateStyle = {
45882
+ transitionTimingFunction: 'ease',
45883
+ transitionDuration: "".concat(speed, "ms"),
45884
+ animationTimingFunction: 'ease',
45885
+ animationDuration: "".concat(speed, "ms")
45886
+ };
45887
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(child, {
45888
+ style: assign_default()(assign_default()({}, child.props.style), animateStyle),
45889
+ className: classnames_default()(child.props.className, {
45890
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-prev")]: isPrev,
45891
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-next")]: isNext,
45892
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-current")]: isCurrent,
45893
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item")]: true,
45894
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-active")]: isCurrent,
45895
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-slide-in")]: animation === 'slide' && !isInit && isCurrent,
45896
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-item-slide-out")]: animation === 'slide' && !isInit && index === preIndex
45897
+ })
45898
+ });
45899
+ }));
45900
+ };
45901
+
45902
+ this.renderIndicator = () => {
45903
+ const {
45904
+ children,
45905
+ activeIndex
45906
+ } = this.state;
45907
+ const {
45908
+ showIndicator,
45909
+ indicatorType,
45910
+ theme,
45911
+ indicatorPosition,
45912
+ indicatorSize,
45913
+ trigger
45914
+ } = this.props;
45915
+ const carouselIndicatorCls = classnames_default()({
45916
+ [carousel_constants_cssClasses.CAROUSEL_INDICATOR]: true
45917
+ });
45918
+
45919
+ if (showIndicator && children.length > 1) {
45920
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
45921
+ className: carouselIndicatorCls
45922
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(carousel_CarouselIndicator, {
45923
+ type: indicatorType,
45924
+ total: children.length,
45925
+ activeIndex: activeIndex,
45926
+ position: indicatorPosition,
45927
+ trigger: trigger,
45928
+ size: indicatorSize,
45929
+ theme: theme,
45930
+ onIndicatorChange: this.onIndicatorChange
45931
+ }));
45932
+ }
45933
+
45934
+ return null;
45935
+ };
45936
+
45937
+ this.renderArrow = () => {
45938
+ const {
45939
+ children
45940
+ } = this.state;
45941
+ const {
45942
+ showArrow,
45943
+ arrowType,
45944
+ theme,
45945
+ arrowProps
45946
+ } = this.props;
45947
+ const timing = this.foundation.getSwitchingTime();
45948
+
45949
+ if (showArrow && children.length > 1) {
45950
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(carousel_CarouselArrow, {
45951
+ type: arrowType,
45952
+ theme: theme,
45953
+ prev: this.prev,
45954
+ next: this.next,
45955
+ timing: timing,
45956
+ arrowProps: arrowProps
45957
+ });
45958
+ }
45959
+
45960
+ return null;
45961
+ };
45962
+
45963
+ this.foundation = new carousel_foundation(this.adapter);
45964
+ const defaultActiveIndex = this.foundation.getDefaultActiveIndex();
45965
+ this.state = {
45966
+ activeIndex: defaultActiveIndex,
45967
+ children: this.getChildren(),
45968
+ preIndex: defaultActiveIndex,
45969
+ isReverse: false,
45970
+ isInit: true
45971
+ };
45972
+ }
45973
+
45974
+ get adapter() {
45975
+ return assign_default()(assign_default()({}, super.adapter), {
45976
+ notifyChange: (activeIndex, preIndex) => {
45977
+ this.props.onChange(activeIndex, preIndex);
45978
+ },
45979
+ setNewActiveIndex: activeIndex => {
45980
+ this.setState({
45981
+ activeIndex
45982
+ });
45983
+ },
45984
+ setPreActiveIndex: preIndex => {
45985
+ this.setState({
45986
+ preIndex
45987
+ });
45988
+ },
45989
+ setIsReverse: isReverse => {
45990
+ this.setState({
45991
+ isReverse
45992
+ });
45993
+ },
45994
+ setIsInit: isInit => {
45995
+ this.setState({
45996
+ isInit
45997
+ });
45998
+ }
45999
+ });
46000
+ }
46001
+
46002
+ static getDerivedStateFromProps(props, state) {
46003
+ const states = {};
46004
+
46005
+ if (!isNullOrUndefined(props.activeIndex) && props.activeIndex !== state.activeIndex) {
46006
+ states.activeIndex = props.activeIndex;
46007
+ }
46008
+
46009
+ return states;
46010
+ }
46011
+
46012
+ componentDidMount() {
46013
+ this.handleAutoPlay();
46014
+ }
46015
+
46016
+ componentWillUnmount() {
46017
+ this.foundation.destroy();
46018
+ }
46019
+
46020
+ render() {
46021
+ var _context2;
46022
+
46023
+ const {
46024
+ animation,
46025
+ className,
46026
+ style,
46027
+ slideDirection
46028
+ } = this.props;
46029
+ const {
46030
+ isReverse
46031
+ } = this.state;
46032
+ const carouselWrapperCls = classnames_default()(className, {
46033
+ [carousel_constants_cssClasses.CAROUSEL]: true
46034
+ });
46035
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
46036
+ // role='listbox'
46037
+ // tabIndex={0}
46038
+ className: carouselWrapperCls,
46039
+ style: style,
46040
+ onMouseEnter: debounce_default()(this.handleMouseEnter, 400),
46041
+ onMouseLeave: debounce_default()(this.handleMouseLeave, 400)
46042
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
46043
+ className: classnames_default()([concat_default()(_context2 = "".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-")).call(_context2, animation)], {
46044
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT)]: true,
46045
+ ["".concat(carousel_constants_cssClasses.CAROUSEL_CONTENT, "-reverse")]: slideDirection === 'left' ? isReverse : !isReverse
46046
+ })
46047
+ }, this.renderChildren()), this.renderIndicator(), this.renderArrow());
46048
+ }
46049
+
46050
+ }
46051
+
46052
+ carousel_Carousel.propTypes = {
46053
+ activeIndex: prop_types_default.a.number,
46054
+ animation: prop_types_default.a.oneOf(carousel_constants_strings.ANIMATION_MAP),
46055
+ arrowProps: prop_types_default.a.object,
46056
+ autoPlay: prop_types_default.a.oneOfType([prop_types_default.a.bool, prop_types_default.a.object]),
46057
+ className: prop_types_default.a.string,
46058
+ defaultActiveIndex: prop_types_default.a.number,
46059
+ indicatorPosition: prop_types_default.a.oneOf(carousel_constants_strings.POSITION_MAP),
46060
+ indicatorSize: prop_types_default.a.oneOf(carousel_constants_strings.SIZE),
46061
+ indicatorType: prop_types_default.a.oneOf(carousel_constants_strings.TYPE_MAP),
46062
+ theme: prop_types_default.a.oneOf(carousel_constants_strings.THEME_MAP),
46063
+ onChange: prop_types_default.a.func,
46064
+ arrowType: prop_types_default.a.oneOf(carousel_constants_strings.ARROW_MAP),
46065
+ showArrow: prop_types_default.a.bool,
46066
+ showIndicator: prop_types_default.a.bool,
46067
+ slideDirection: prop_types_default.a.oneOf(carousel_constants_strings.DIRECTION),
46068
+ speed: prop_types_default.a.number,
46069
+ style: prop_types_default.a.object,
46070
+ trigger: prop_types_default.a.oneOf(carousel_constants_strings.TRIGGER)
46071
+ };
46072
+ carousel_Carousel.defaultProps = {
46073
+ children: [],
46074
+ animation: 'slide',
46075
+ autoPlay: true,
46076
+ arrowType: 'always',
46077
+ defaultActiveIndex: carousel_constants_numbers.DEFAULT_ACTIVE_INDEX,
46078
+ indicatorPosition: 'center',
46079
+ indicatorSize: 'small',
46080
+ indicatorType: 'dot',
46081
+ theme: 'light',
46082
+ onChange: () => undefined,
46083
+ showArrow: true,
46084
+ showIndicator: true,
46085
+ slideDirection: 'left',
46086
+ speed: carousel_constants_numbers.DEFAULT_SPEED,
46087
+ trigger: 'click'
46088
+ };
46089
+ /* harmony default export */ var carousel_0 = (carousel_Carousel);
45294
46090
  // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/flatten.js
45295
46091
  var lodash_flatten = __webpack_require__("1xil");
45296
46092
  var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
@@ -49362,7 +50158,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
49362
50158
  e.preventDefault();
49363
50159
  this.handleTagRemove(e, keyEntities[nodeKey].valuePath);
49364
50160
  }
49365
- }, displayProp === 'label' && keyEntities[nodeKey].data.label, displayProp === 'value' && keyEntities[nodeKey].data.value);
50161
+ }, keyEntities[nodeKey].data[displayProp]);
49366
50162
  }
49367
50163
  }
49368
50164
 
@@ -51538,7 +52334,7 @@ var validIANATimezoneCache = {}
51538
52334
  function isValidTimezoneIANAString(timeZoneString) {
51539
52335
  if (validIANATimezoneCache[timeZoneString]) return true
51540
52336
  try {
51541
- Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
52337
+ new Intl.DateTimeFormat(undefined, { timeZone: timeZoneString })
51542
52338
  validIANATimezoneCache[timeZoneString] = true
51543
52339
  return true
51544
52340
  } catch (error) {
@@ -66051,20 +66847,6 @@ const LayoutContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_
66051
66847
  }
66052
66848
  });
66053
66849
  /* harmony default export */ var layout_context = (LayoutContext);
66054
- // CONCATENATED MODULE: ../semi-foundation/utils/getDataAttr.ts
66055
-
66056
-
66057
- function getDataAttr(props) {
66058
- var _context;
66059
-
66060
- return reduce_default()(_context = keys_default()(props)).call(_context, (prev, key) => {
66061
- if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
66062
- prev[key] = props[key];
66063
- }
66064
-
66065
- return prev;
66066
- }, {});
66067
- }
66068
66850
  // CONCATENATED MODULE: ./layout/Sider.tsx
66069
66851
 
66070
66852
 
@@ -67667,10 +68449,6 @@ var toString_default = /*#__PURE__*/__webpack_require__.n(lodash_toString);
67667
68449
  var toNumber = __webpack_require__("nvU9");
67668
68450
  var toNumber_default = /*#__PURE__*/__webpack_require__.n(toNumber);
67669
68451
 
67670
- // EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/set-interval.js
67671
- var set_interval = __webpack_require__("1l5A");
67672
- var set_interval_default = /*#__PURE__*/__webpack_require__.n(set_interval);
67673
-
67674
68452
  // CONCATENATED MODULE: ../semi-foundation/inputNumber/constants.ts
67675
68453
 
67676
68454
 
@@ -83007,6 +83785,24 @@ steps_Steps.defaultProps = {
83007
83785
  class foundation_SwitchFoundation extends foundation {
83008
83786
  constructor(adapter) {
83009
83787
  super(assign_default()({}, adapter));
83788
+
83789
+ this.handleFocusVisible = event => {
83790
+ const {
83791
+ target
83792
+ } = event;
83793
+
83794
+ try {
83795
+ if (target.matches(':focus-visible')) {
83796
+ this._adapter.setFocusVisible(true);
83797
+ }
83798
+ } catch (error) {
83799
+ console.warn('The current browser does not support the focus-visible');
83800
+ }
83801
+ };
83802
+
83803
+ this.handleBlur = () => {
83804
+ this._adapter.setFocusVisible(false);
83805
+ };
83010
83806
  }
83011
83807
 
83012
83808
  init() {
@@ -83048,6 +83844,7 @@ class foundation_SwitchFoundation extends foundation {
83048
83844
 
83049
83845
  const switch_constants_cssClasses = {
83050
83846
  PREFIX: "".concat(BASE_CLASS_PREFIX, "-switch"),
83847
+ FOCUS: "".concat(BASE_CLASS_PREFIX, "-switch-focus"),
83051
83848
  LARGE: "".concat(BASE_CLASS_PREFIX, "-switch-large"),
83052
83849
  SMALL: "".concat(BASE_CLASS_PREFIX, "-switch-small"),
83053
83850
  CHECKED: "".concat(BASE_CLASS_PREFIX, "-switch-checked"),
@@ -83071,7 +83868,7 @@ var switch_switch = __webpack_require__("DE4K");
83071
83868
 
83072
83869
 
83073
83870
 
83074
- /* eslint-disable max-len, jsx-a11y/role-supports-aria-props */
83871
+ /* eslint-disable max-len */
83075
83872
 
83076
83873
 
83077
83874
 
@@ -83084,9 +83881,19 @@ var switch_switch = __webpack_require__("DE4K");
83084
83881
  class switch_Switch extends baseComponent_BaseComponent {
83085
83882
  constructor(props) {
83086
83883
  super(props);
83884
+
83885
+ this.handleFocusVisible = event => {
83886
+ this.foundation.handleFocusVisible(event);
83887
+ };
83888
+
83889
+ this.handleBlur = event => {
83890
+ this.foundation.handleBlur();
83891
+ };
83892
+
83087
83893
  this.state = {
83088
83894
  nativeControlChecked: false,
83089
- nativeControlDisabled: false
83895
+ nativeControlDisabled: false,
83896
+ focusVisible: false
83090
83897
  };
83091
83898
  this.switchRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
83092
83899
  this.foundation = new foundation_SwitchFoundation(this.adapter);
@@ -83122,6 +83929,11 @@ class switch_Switch extends baseComponent_BaseComponent {
83122
83929
  nativeControlDisabled
83123
83930
  });
83124
83931
  },
83932
+ setFocusVisible: focusVisible => {
83933
+ this.setState({
83934
+ focusVisible
83935
+ });
83936
+ },
83125
83937
  notifyChange: (checked, e) => {
83126
83938
  this.props.onChange(checked, e);
83127
83939
  }
@@ -83131,7 +83943,8 @@ class switch_Switch extends baseComponent_BaseComponent {
83131
83943
  render() {
83132
83944
  const {
83133
83945
  nativeControlChecked,
83134
- nativeControlDisabled
83946
+ nativeControlDisabled,
83947
+ focusVisible
83135
83948
  } = this.state;
83136
83949
  const {
83137
83950
  className,
@@ -83150,11 +83963,11 @@ class switch_Switch extends baseComponent_BaseComponent {
83150
83963
  [switch_constants_cssClasses.DISABLED]: nativeControlDisabled,
83151
83964
  [switch_constants_cssClasses.LARGE]: size === 'large',
83152
83965
  [switch_constants_cssClasses.SMALL]: size === 'small',
83153
- [switch_constants_cssClasses.LOADING]: loading
83966
+ [switch_constants_cssClasses.LOADING]: loading,
83967
+ [switch_constants_cssClasses.FOCUS]: focusVisible
83154
83968
  });
83155
83969
  const switchProps = {
83156
83970
  type: 'checkbox',
83157
- role: 'switch',
83158
83971
  className: switch_constants_cssClasses.NATIVE_CONTROL,
83159
83972
  disabled: nativeControlDisabled || loading,
83160
83973
  checked: nativeControlChecked || false
@@ -83179,13 +83992,17 @@ class switch_Switch extends baseComponent_BaseComponent {
83179
83992
  }, uncheckedText) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("input", assign_default()({}, switchProps, {
83180
83993
  ref: this.switchRef,
83181
83994
  id: id,
83995
+ role: 'switch',
83182
83996
  "aria-checked": nativeControlChecked,
83183
83997
  "aria-invalid": this.props['aria-invalid'],
83184
83998
  "aria-errormessage": this.props['aria-errormessage'],
83185
83999
  "aria-label": this.props['aria-label'],
83186
84000
  "aria-labelledby": this.props['aria-labelledby'],
83187
84001
  "aria-describedby": this.props["aria-describedby"],
83188
- onChange: e => this.foundation.handleChange(e.target.checked, e)
84002
+ "aria-disabled": this.props['disabled'],
84003
+ onChange: e => this.foundation.handleChange(e.target.checked, e),
84004
+ onFocus: e => this.handleFocusVisible(e),
84005
+ onBlur: e => this.handleBlur(e)
83189
84006
  })));
83190
84007
  }
83191
84008
 
@@ -106932,6 +107749,7 @@ arrayField_ArrayFieldComponent.contextType = FormUpdaterContext;
106932
107749
 
106933
107750
 
106934
107751
 
107752
+
106935
107753
 
106936
107754
 
106937
107755
  /** Form */
@@ -111414,10 +112232,10 @@ module.exports = baseForOwn;
111414
112232
  Object.defineProperty(exports, "__esModule", {
111415
112233
  value: true
111416
112234
  });
111417
- exports.getPrefix = getPrefix;
111418
112235
  exports.browserPrefixToKey = browserPrefixToKey;
111419
112236
  exports.browserPrefixToStyle = browserPrefixToStyle;
111420
112237
  exports.default = void 0;
112238
+ exports.getPrefix = getPrefix;
111421
112239
  var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
111422
112240
 
111423
112241
  function getPrefix()