shineout 3.9.0-beta.10 → 3.9.0-beta.12

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/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.9.0-beta.10'
525
+ version: '3.9.0-beta.12'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
12386
12386
  };
12387
12387
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12388
12388
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12389
- /* harmony default export */ var version = ('3.9.0-beta.10');
12389
+ /* harmony default export */ var version = ('3.9.0-beta.12');
12390
12390
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12391
12391
 
12392
12392
 
@@ -14966,12 +14966,20 @@ var tagTokens = {
14966
14966
  tagInfoOutlineDisabledFontColor: 'Brand-3',
14967
14967
  tagInfoOutlineDisabledBackgroundColor: 'Neutral-fill-1',
14968
14968
  tagInfoOutlineDisabledBorderColor: 'Brand-3',
14969
+ tagInfoOutlineIconDisabledFontColor: 'Brand-3',
14970
+ tagInfoOutlineIconHoverBackgroundColor: 'Brand-1',
14971
+ tagInfoOutlineIconHoverFontColor: 'Brand-6',
14969
14972
  tagInfoFillFontColor: 'Neutral-text-1',
14970
14973
  tagInfoFillBackgroundColor: 'Brand-6',
14971
14974
  tagInfoFillBorderColor: 'Brand-6',
14972
14975
  tagInfoFillDisabledFontColor: 'Neutral-text-1',
14973
14976
  tagInfoFillDisabledBackgroundColor: 'Brand-3',
14974
14977
  tagInfoFillDisabledBorderColor: 'Brand-3',
14978
+ tagInfoFillIconHoverBackgroundColor: 'Brand-5',
14979
+ tagInfoIconFontColor: 'Brand-6',
14980
+ tagInfoIconDisabledFontColor: 'Brand-3',
14981
+ tagInfoIconHoverBackgroundColor: 'Brand-2',
14982
+ tagDefaultLineHeight: 'Line-height-dynamic',
14975
14983
  tagDefaultFontColor: 'Neutral-text-5',
14976
14984
  tagDefaultBackgroundColor: 'Neutral-fill-2',
14977
14985
  tagDefaultBorderColor: 'Neutral-fill-2',
@@ -14990,6 +14998,11 @@ var tagTokens = {
14990
14998
  tagDefaultFillDisabledFontColor: 'Neutral-text-2',
14991
14999
  tagDefaultFillDisabledBackgroundColor: 'Neutral-fill-3',
14992
15000
  tagDefaultFillDisabledBorderColor: 'Neutral-fill-3',
15001
+ tagDefaultFillIconHoverBackgroundColor: 'Neutral-fill-4',
15002
+ tagDefaultIconFontColor: 'Neutral-text-4',
15003
+ tagDefaultIconDisabledFontColor: 'Neutral-text-2',
15004
+ tagDefaultIconHoverBackgroundColor: 'Neutral-fill-3',
15005
+ tagDefaultIconHoverFontColor: 'Neutral-text-5',
14993
15006
  tagSuccessFontColor: 'Success-6',
14994
15007
  tagSuccessBackgroundColor: 'Success-1',
14995
15008
  tagSuccessBorderColor: 'Success-1',
@@ -15002,12 +15015,18 @@ var tagTokens = {
15002
15015
  tagSuccessOutlineDisabledFontColor: 'Success-3',
15003
15016
  tagSuccessOutlineDisabledBackgroundColor: 'Neutral-fill-1',
15004
15017
  tagSuccessOutlineDisabledBorderColor: 'Success-3',
15018
+ tagSuccessOutlineIconDisabledFontColor: 'Success-3',
15019
+ tagSuccessOutlineIconHoverBackgroundColor: 'Success-2',
15005
15020
  tagSuccessFillFontColor: 'Neutral-text-1',
15006
15021
  tagSuccessFillBackgroundColor: 'Success-6',
15007
15022
  tagSuccessFillBorderColor: 'Success-6',
15008
15023
  tagSuccessFillDisabledFontColor: 'Neutral-text-1',
15009
15024
  tagSuccessFillDisabledBackgroundColor: 'Success-3',
15010
15025
  tagSuccessFillDisabledBorderColor: 'Success-3',
15026
+ tagSuccessFillIconHoverBackgroundColor: 'Success-5',
15027
+ tagSuccessIconFontColor: 'Success-6',
15028
+ tagSuccessIconDisabledFontColor: 'Success-3',
15029
+ tagSuccessIconHoverBackgroundColor: 'Success-2',
15011
15030
  tagWarningFontColor: 'Warning-6',
15012
15031
  tagWarningBackgroundColor: 'Warning-1',
15013
15032
  tagWarningBorderColor: 'Warning-1',
@@ -15026,6 +15045,10 @@ var tagTokens = {
15026
15045
  tagWarningFillDisabledFontColor: 'Neutral-text-1',
15027
15046
  tagWarningFillDisabledBackgroundColor: 'Warning-3',
15028
15047
  tagWarningFillDisabledBorderColor: 'Warning-3',
15048
+ tagWarningFillIconFontColor: 'Warning-6',
15049
+ tagWarningFillIconHoverBackgroundColor: 'Warning-5',
15050
+ tagWarningIconDisabledFontColor: 'Warning-3',
15051
+ tagWarningIconHoverBackgroundColor: 'Warning-2',
15029
15052
  tagDangerFontColor: 'Danger-6',
15030
15053
  tagDangerBackgroundColor: 'Danger-1',
15031
15054
  tagDangerBorderColor: 'Danger-1',
@@ -15044,6 +15067,10 @@ var tagTokens = {
15044
15067
  tagDangerFillDisabledFontColor: 'Neutral-text-1',
15045
15068
  tagDangerFillDisabledBackgroundColor: 'Danger-3',
15046
15069
  tagDangerFillDisabledBorderColor: 'Danger-3',
15070
+ tagDangerFillIconHoverBackgroundColor: 'Danger-5',
15071
+ tagDangerIconFontColor: 'Danger-6',
15072
+ tagDangerIconDisabledFontColor: 'Danger-3',
15073
+ tagDangerIconHoverBackgroundColor: 'Danger-2',
15047
15074
  tagMagentaFontColor: 'Magenta-6',
15048
15075
  tagMagentaBackgroundColor: 'Magenta-1',
15049
15076
  tagMagentaBorderColor: 'Magenta-1',
@@ -15062,6 +15089,10 @@ var tagTokens = {
15062
15089
  tagMagentaFillDisabledFontColor: 'Neutral-text-1',
15063
15090
  tagMagentaFillDisabledBackgroundColor: 'Magenta-3',
15064
15091
  tagMagentaFillDisabledBorderColor: 'Magenta-3',
15092
+ tagMagentaFillIconHoverBackgroundColor: 'Magenta-5',
15093
+ tagMagentaIconFontColor: 'Magenta-6',
15094
+ tagMagentaIconDisabledFontColor: 'Magenta-3',
15095
+ tagMagentaIconHoverBackgroundColor: 'Magenta-2',
15065
15096
  tagBrownFontColor: 'Brown-6',
15066
15097
  tagBrownBackgroundColor: 'Brown-1',
15067
15098
  tagBrownBorderColor: 'Brown-1',
@@ -15080,6 +15111,10 @@ var tagTokens = {
15080
15111
  tagBrownFillDisabledFontColor: 'Neutral-text-1',
15081
15112
  tagBrownFillDisabledBackgroundColor: 'Brown-3',
15082
15113
  tagBrownFillDisabledBorderColor: 'Brown-3',
15114
+ tagBrownFillIconHoverBackgroundColor: 'Brown-5',
15115
+ tagBrownIconFontColor: 'Brown-6',
15116
+ tagBrownIconDisabledFontColor: 'Brown-3',
15117
+ tagBrownIconHoverBackgroundColor: 'Brown-2',
15083
15118
  tagPurpleFontColor: 'Purple-6',
15084
15119
  tagPurpleBackgroundColor: 'Purple-1',
15085
15120
  tagPurpleBorderColor: 'Purple-1',
@@ -15098,6 +15133,10 @@ var tagTokens = {
15098
15133
  tagPurpleFillDisabledFontColor: 'Neutral-text-1',
15099
15134
  tagPurpleFillDisabledBackgroundColor: 'Purple-3',
15100
15135
  tagPurpleFillDisabledBorderColor: 'Purple-3',
15136
+ tagPurpleFillIconHoverBackgroundColor: 'Purple-5',
15137
+ tagPurpleIconFontColor: 'Purple-6',
15138
+ tagPurpleIconDisabledFontColor: 'Purple-3',
15139
+ tagPurpleIconHoverBackgroundColor: 'Purple-2',
15101
15140
  tagIndigoFontColor: 'Indigo-6',
15102
15141
  tagIndigoBackgroundColor: 'Indigo-1',
15103
15142
  tagIndigoBorderColor: 'Indigo-1',
@@ -15116,6 +15155,10 @@ var tagTokens = {
15116
15155
  tagIndigoFillDisabledFontColor: 'Neutral-text-1',
15117
15156
  tagIndigoFillDisabledBackgroundColor: 'Indigo-3',
15118
15157
  tagIndigoFillDisabledBorderColor: 'Indigo-3',
15158
+ tagIndigoFillIconHoverBackgroundColor: 'Indigo-5',
15159
+ tagIndigoIconFontColor: 'Indigo-6',
15160
+ tagIndigoIconDisabledFontColor: 'Indigo-3',
15161
+ tagIndigoIconHoverBackgroundColor: 'Indigo-2',
15119
15162
  tagCyanFontColor: 'Cyan-6',
15120
15163
  tagCyanBackgroundColor: 'Cyan-1',
15121
15164
  tagCyanBorderColor: 'Cyan-1',
@@ -15134,6 +15177,10 @@ var tagTokens = {
15134
15177
  tagCyanFillDisabledFontColor: 'Neutral-text-1',
15135
15178
  tagCyanFillDisabledBackgroundColor: 'Cyan-3',
15136
15179
  tagCyanFillDisabledBorderColor: 'Cyan-3',
15180
+ tagCyanFillIconHoverBackgroundColor: 'Cyan-5',
15181
+ tagCyanIconFontColor: 'Cyan-6',
15182
+ tagCyanIconDisabledFontColor: 'Cyan-3',
15183
+ tagCyanIconHoverBackgroundColor: 'Cyan-2',
15137
15184
  tagNeonFontColor: 'Neon-6',
15138
15185
  tagNeonBackgroundColor: 'Neon-1',
15139
15186
  tagNeonBorderColor: 'Neon-1',
@@ -15152,6 +15199,10 @@ var tagTokens = {
15152
15199
  tagNeonFillDisabledFontColor: 'Neutral-text-1',
15153
15200
  tagNeonFillDisabledBackgroundColor: 'Neon-3',
15154
15201
  tagNeonFillDisabledBorderColor: 'Neon-3',
15202
+ tagNeonFillIconHoverBackgroundColor: 'Neon-5',
15203
+ tagNeonIconFontColor: 'Neon-6',
15204
+ tagNeonIconDisabledFontColor: 'Neon-3',
15205
+ tagNeonIconHoverBackgroundColor: 'Neon-2',
15155
15206
  tagLemonFontColor: 'Lemon-6',
15156
15207
  tagLemonBackgroundColor: 'Lemon-1',
15157
15208
  tagLemonBorderColor: 'Lemon-1',
@@ -15170,6 +15221,10 @@ var tagTokens = {
15170
15221
  tagLemonFillDisabledFontColor: 'Neutral-text-1',
15171
15222
  tagLemonFillDisabledBackgroundColor: 'Lemon-3',
15172
15223
  tagLemonFillDisabledBorderColor: 'Lemon-3',
15224
+ tagLemonFillIconHoverBackgroundColor: 'Lemon-5',
15225
+ tagLemonIconFontColor: 'Lemon-6',
15226
+ tagLemonIconDisabledFontColor: 'Lemon-3',
15227
+ tagLemonIconHoverBackgroundColor: 'Lemon-2',
15173
15228
  tagTangerineFontColor: 'Tangerine-6',
15174
15229
  tagTangerineBackgroundColor: 'Tangerine-1',
15175
15230
  tagTangerineBorderColor: 'Tangerine-1',
@@ -15188,87 +15243,35 @@ var tagTokens = {
15188
15243
  tagTangerineFillDisabledFontColor: 'Neutral-text-1',
15189
15244
  tagTangerineFillDisabledBackgroundColor: 'Tangerine-3',
15190
15245
  tagTangerineFillDisabledBorderColor: 'Tangerine-3',
15246
+ tagTangerineFillIconHoverBackgroundColor: 'Tangerine-5',
15247
+ tagTangerineIconFontColor: 'Tangerine-6',
15248
+ tagTangerineIconDisabledFontColor: 'Tangerine-3',
15249
+ tagTangerineIconHoverBackgroundColor: 'Tangerine-2',
15191
15250
  tagFontSize: 'Font-12',
15251
+ tagFontWeight: 'Weight-regular',
15192
15252
  tagBorderRadius: 'Radius-small',
15193
15253
  tagPaddingX: 'Spacing-6',
15194
15254
  tagPaddingY: 'Spacing-0',
15195
15255
  tagHeight: 'Size-11',
15196
- tagFontWeight: 'Weight-regular',
15197
15256
  tagSmallFontSize: 'Font-12',
15257
+ tagSmallFontWeight: 'Weight-regular',
15198
15258
  tagSmallBorderRadius: 'Radius-small',
15199
15259
  tagSmallPaddingX: 'Spacing-4',
15200
15260
  tagSmallHeight: 'Size-10',
15201
- tagSmallFontWeight: 'Weight-regular',
15261
+ tagSmallInputPaddingX: 'Spacing-4',
15262
+ tagSmallInputFontSize: 'Font-12',
15263
+ tagSmallLineHeight: 'Line-height-dynamic',
15202
15264
  tagLargeFontSize: 'Font-14',
15265
+ tagLargeFontWeight: 'Weight-regular',
15203
15266
  tagLargeBorderRadius: 'Radius-default',
15204
15267
  tagLargePaddingX: 'Spacing-12',
15205
15268
  tagLargePaddingY: 'Spacing-2',
15206
15269
  tagLargeHeight: 'Size-14',
15207
- tagLargeFontWeight: 'Weight-regular',
15208
- tagInputPaddingX: 'Spacing-4',
15209
- tagInputFontSize: 'Font-12',
15210
- tagSmallInputPaddingX: 'Spacing-4',
15211
- tagSmallInputFontSize: 'Font-12',
15212
15270
  tagLargeInputPaddingX: 'Spacing-4',
15213
15271
  tagLargeInputFontSize: 'Font-14',
15214
- tagInfoIconFontColor: 'Brand-6',
15215
- tagInfoIconDisabledFontColor: 'Brand-3',
15216
- tagInfoIconHoverBackgroundColor: 'Brand-2',
15217
- tagInfoOutlineIconDisabledFontColor: 'Brand-3',
15218
- tagInfoOutlineIconHoverBackgroundColor: 'Brand-1',
15219
- tagInfoOutlineIconHoverFontColor: 'Brand-6',
15220
- tagInfoFillIconHoverBackgroundColor: 'Brand-5',
15221
- tagDefaultIconFontColor: 'Neutral-text-4',
15222
- tagDefaultIconDisabledFontColor: 'Neutral-text-2',
15223
- tagDefaultIconHoverBackgroundColor: 'Neutral-fill-3',
15224
- tagDefaultIconHoverFontColor: 'Neutral-text-5',
15225
- tagDefaultFillIconHoverBackgroundColor: 'Neutral-fill-4',
15226
- tagSuccessIconFontColor: 'Success-6',
15227
- tagSuccessIconDisabledFontColor: 'Success-3',
15228
- tagSuccessIconHoverBackgroundColor: 'Success-2',
15229
- tagSuccessOutlineIconDisabledFontColor: 'Success-3',
15230
- tagSuccessOutlineIconHoverBackgroundColor: 'Success-2',
15231
- tagSuccessFillIconHoverBackgroundColor: 'Success-5',
15232
- tagWarningIconDisabledFontColor: 'Warning-3',
15233
- tagWarningIconHoverBackgroundColor: 'Warning-2',
15234
- tagWarningFillIconFontColor: 'Warning-6',
15235
- tagWarningFillIconHoverBackgroundColor: 'Warning-5',
15236
- tagDangerIconFontColor: 'Danger-6',
15237
- tagDangerIconDisabledFontColor: 'Danger-3',
15238
- tagDangerIconHoverBackgroundColor: 'Danger-2',
15239
- tagDangerFillIconHoverBackgroundColor: 'Danger-5',
15240
- tagMagentaIconFontColor: 'Magenta-6',
15241
- tagMagentaIconDisabledFontColor: 'Magenta-3',
15242
- tagMagentaIconHoverBackgroundColor: 'Magenta-2',
15243
- tagMagentaFillIconHoverBackgroundColor: 'Magenta-5',
15244
- tagBrownIconFontColor: 'Brown-6',
15245
- tagBrownIconDisabledFontColor: 'Brown-3',
15246
- tagBrownIconHoverBackgroundColor: 'Brown-2',
15247
- tagBrownFillIconHoverBackgroundColor: 'Brown-5',
15248
- tagPurpleIconFontColor: 'Purple-6',
15249
- tagPurpleIconDisabledFontColor: 'Purple-3',
15250
- tagPurpleIconHoverBackgroundColor: 'Purple-2',
15251
- tagPurpleFillIconHoverBackgroundColor: 'Purple-5',
15252
- tagIndigoIconFontColor: 'Indigo-6',
15253
- tagIndigoIconDisabledFontColor: 'Indigo-3',
15254
- tagIndigoIconHoverBackgroundColor: 'Indigo-2',
15255
- tagIndigoFillIconHoverBackgroundColor: 'Indigo-5',
15256
- tagCyanIconFontColor: 'Cyan-6',
15257
- tagCyanIconDisabledFontColor: 'Cyan-3',
15258
- tagCyanIconHoverBackgroundColor: 'Cyan-2',
15259
- tagCyanFillIconHoverBackgroundColor: 'Cyan-5',
15260
- tagNeonIconFontColor: 'Neon-6',
15261
- tagNeonIconDisabledFontColor: 'Neon-3',
15262
- tagNeonIconHoverBackgroundColor: 'Neon-2',
15263
- tagNeonFillIconHoverBackgroundColor: 'Neon-5',
15264
- tagLemonIconFontColor: 'Lemon-6',
15265
- tagLemonIconDisabledFontColor: 'Lemon-3',
15266
- tagLemonIconHoverBackgroundColor: 'Lemon-2',
15267
- tagLemonFillIconHoverBackgroundColor: 'Lemon-5',
15268
- tagTangerineIconFontColor: 'Tangerine-6',
15269
- tagTangerineIconDisabledFontColor: 'Tangerine-3',
15270
- tagTangerineIconHoverBackgroundColor: 'Tangerine-2',
15271
- tagTangerineFillIconHoverBackgroundColor: 'Tangerine-5'
15272
+ tagLargeLineHeight: 'Line-height-dynamic',
15273
+ tagInputPaddingX: 'Spacing-4',
15274
+ tagInputFontSize: 'Font-12'
15272
15275
  };
15273
15276
  /* harmony default export */ var tag = (tagTokens);
15274
15277
  ;// CONCATENATED MODULE: ../theme/src/tag/index.ts
@@ -28125,7 +28128,7 @@ var TagStyle = {
28125
28128
  wrapper: {
28126
28129
  flex: 1,
28127
28130
  minWidth: 0,
28128
- lineHeight: src.lineHeightDynamic
28131
+ lineHeight: src.tagDefaultLineHeight
28129
28132
  },
28130
28133
  inline: {
28131
28134
  display: 'inline-block',
@@ -28145,6 +28148,12 @@ var TagStyle = {
28145
28148
  width: 14,
28146
28149
  height: 14
28147
28150
  }
28151
+ },
28152
+ '& $wrapper': {
28153
+ lineHeight: src.tagLargeLineHeight
28154
+ },
28155
+ '& $closeIcon': {
28156
+ height: src.tagLargeLineHeight
28148
28157
  }
28149
28158
  },
28150
28159
  small: {
@@ -28154,10 +28163,10 @@ var TagStyle = {
28154
28163
  fontWeight: src.tagSmallFontWeight,
28155
28164
  borderRadius: src.tagSmallBorderRadius,
28156
28165
  '& $wrapper': {
28157
- lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
28166
+ lineHeight: "var(".concat(src.tagSmallLineHeight, ", calc(").concat(src.tagSmallFontSize, " + 6px))")
28158
28167
  },
28159
28168
  '& $closeIcon': {
28160
- height: "calc(".concat(src.tagSmallFontSize, " + 6px)")
28169
+ height: "var(".concat(src.tagSmallLineHeight, ", calc(").concat(src.tagSmallFontSize, " + 6px))")
28161
28170
  },
28162
28171
  '& $closeIconWrapper': {
28163
28172
  width: "calc(".concat(src.tagSmallFontSize, " + 6px)"),
@@ -28180,7 +28189,7 @@ var TagStyle = {
28180
28189
  alignItems: 'center',
28181
28190
  display: 'inline-flex',
28182
28191
  cursor: 'pointer',
28183
- height: src.lineHeightDynamic,
28192
+ height: src.tagDefaultLineHeight,
28184
28193
  maxHeight: '100%'
28185
28194
  },
28186
28195
  closeIconWrapper: {
@@ -33711,7 +33720,15 @@ var BreadcrumbItem = function BreadcrumbItem(_ref) {
33711
33720
  }
33712
33721
  }
33713
33722
  if (renderItem) {
33714
- return renderItem(dataItem);
33723
+ if (max !== undefined) {
33724
+ item = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
33725
+ className: contentClass,
33726
+ ref: contentRef,
33727
+ children: renderItem(dataItem)
33728
+ });
33729
+ } else {
33730
+ return renderItem(dataItem);
33731
+ }
33715
33732
  }
33716
33733
  if (isOverflow && d.title && max !== undefined) {
33717
33734
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tooltip_tooltip, {
@@ -33789,17 +33806,18 @@ var Breadcrumb = function Breadcrumb(props) {
33789
33806
  };
33790
33807
  return [first, more].concat(toConsumableArray_default()(reset));
33791
33808
  };
33809
+ var lastIndex = Math.min(data.length - 1, maxCount !== undefined ? maxCount : data.length - 1);
33792
33810
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
33793
33811
  className: className,
33794
33812
  style: props.style,
33795
33813
  children: data && getRenderData().map(function (d, index) {
33796
33814
  var itemFirst = Array.isArray(d) ? d[0] : d;
33797
- var isLastItem = index === (maxCount !== undefined ? maxCount : data.length - 1);
33815
+ var isLastItem = index === lastIndex;
33798
33816
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
33799
33817
  className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.item,
33800
33818
  children: [Array.isArray(d) ? renderArray(d) : /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_item, {
33801
33819
  dataItem: d,
33802
- renderItem: renderItem,
33820
+ renderItem: props.renderItem,
33803
33821
  jssStyle: props.jssStyle,
33804
33822
  max: maxCount
33805
33823
  }), !isLastItem && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -37748,9 +37766,21 @@ CardGroupComp.Item = card_group_Item;
37748
37766
  var useCarousel = function useCarousel(props) {
37749
37767
  var total = props.total,
37750
37768
  _props$interval = props.interval,
37751
- interval = _props$interval === void 0 ? 0 : _props$interval;
37769
+ interval = _props$interval === void 0 ? 0 : _props$interval,
37770
+ _props$defaultValue = props.defaultValue,
37771
+ defaultValue = _props$defaultValue === void 0 ? 0 : _props$defaultValue,
37772
+ valueProp = props.value,
37773
+ onChange = props.onChange;
37774
+
37775
+ // 规范化初始值,确保在有效范围内
37776
+ var normalizeIndex = function normalizeIndex(index) {
37777
+ if (index < 0) return 0;
37778
+ if (index >= total) return Math.max(0, total - 1);
37779
+ return index;
37780
+ };
37781
+ var initialValue = normalizeIndex(valueProp !== undefined ? valueProp : defaultValue);
37752
37782
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
37753
- current: 0,
37783
+ current: initialValue,
37754
37784
  pre: -1,
37755
37785
  direction: 'stop'
37756
37786
  }),
@@ -37763,14 +37793,32 @@ var useCarousel = function useCarousel(props) {
37763
37793
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
37764
37794
  timer: null,
37765
37795
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
37766
- setNext: function setNext(next) {}
37796
+ setNext: function setNext(next) {},
37797
+ prevValue: initialValue // 用于追踪上一次的值
37767
37798
  }),
37768
37799
  context = _useRef.current;
37800
+
37801
+ // 判断是否为受控模式
37802
+ var isControlled = valueProp !== undefined;
37803
+ // 获取实际使用的 current 值
37804
+ var actualCurrent = isControlled ? normalizeIndex(valueProp) : current;
37805
+
37806
+ // 在受控模式下,计算 direction 和 pre
37807
+ var actualPre = pre;
37808
+ var actualDirection = direction;
37809
+ if (isControlled) {
37810
+ if (actualCurrent !== context.prevValue) {
37811
+ actualPre = context.prevValue;
37812
+ actualDirection = actualCurrent > context.prevValue ? 'forward' : 'backward';
37813
+ context.prevValue = actualCurrent;
37814
+ }
37815
+ }
37769
37816
  var autoPlay = interval > 0 && total > 1;
37770
37817
  var moveTo = usePersistFn(function (i) {
37771
37818
  var next = i;
37772
- if (next === current) return;
37773
- var dir = next > current ? 'forward' : 'backward';
37819
+ var prevCurrent = actualCurrent;
37820
+ if (next === prevCurrent) return;
37821
+ var dir = next > prevCurrent ? 'forward' : 'backward';
37774
37822
  if (next >= total) {
37775
37823
  dir = 'forward';
37776
37824
  next = 0;
@@ -37778,14 +37826,26 @@ var useCarousel = function useCarousel(props) {
37778
37826
  dir = 'backward';
37779
37827
  next = total - 1;
37780
37828
  }
37781
- setState({
37782
- current: next,
37783
- pre: current,
37784
- direction: dir
37785
- });
37829
+
37830
+ // 非受控模式下更新内部状态
37831
+ if (!isControlled) {
37832
+ setState({
37833
+ current: next,
37834
+ pre: prevCurrent,
37835
+ direction: dir
37836
+ });
37837
+ }
37838
+ // 受控模式下不更新内部状态,由外部 value 控制
37839
+
37840
+ // 触发 onChange 回调
37841
+ if (onChange) {
37842
+ onChange(next);
37843
+ }
37844
+
37845
+ // 触发 onMove 回调(向后兼容)
37786
37846
  if (props.onMove) {
37787
37847
  props.onMove(next, {
37788
- prev: current,
37848
+ prev: prevCurrent,
37789
37849
  direction: dir,
37790
37850
  moveTo: moveTo
37791
37851
  });
@@ -37807,13 +37867,13 @@ var useCarousel = function useCarousel(props) {
37807
37867
  });
37808
37868
  context.setNext = setNext;
37809
37869
  var start = usePersistFn(function () {
37810
- setNext(current + 1);
37870
+ setNext(actualCurrent + 1);
37811
37871
  });
37812
37872
  var forward = usePersistFn(function () {
37813
- moveTo(current + 1);
37873
+ moveTo(actualCurrent + 1);
37814
37874
  });
37815
37875
  var backward = usePersistFn(function () {
37816
- moveTo(current - 1);
37876
+ moveTo(actualCurrent - 1);
37817
37877
  });
37818
37878
  var func = use_latest_obj({
37819
37879
  start: start,
@@ -37827,10 +37887,18 @@ var useCarousel = function useCarousel(props) {
37827
37887
  start();
37828
37888
  }
37829
37889
  }, []);
37890
+
37891
+ // 受控模式下,当外部 value 变化时,重置自动轮播定时器
37892
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
37893
+ if (isControlled && autoPlay && valueProp !== undefined) {
37894
+ stop();
37895
+ context.setNext(actualCurrent + 1);
37896
+ }
37897
+ }, [valueProp]);
37830
37898
  return {
37831
- current: current,
37832
- pre: pre,
37833
- direction: direction,
37899
+ current: actualCurrent,
37900
+ pre: actualPre,
37901
+ direction: actualDirection,
37834
37902
  func: func
37835
37903
  };
37836
37904
  };
@@ -37862,6 +37930,9 @@ var Carousel = function Carousel(props) {
37862
37930
  var _useCarousel = use_carousel({
37863
37931
  total: total,
37864
37932
  interval: props.interval,
37933
+ defaultValue: props.defaultValue,
37934
+ value: props.value,
37935
+ onChange: props.onChange,
37865
37936
  onMove: props.onMove
37866
37937
  }),
37867
37938
  current = _useCarousel.current,
@@ -43599,7 +43670,7 @@ function getRule(rule, props) {
43599
43670
  return;
43600
43671
  }
43601
43672
  if (reg.global) reg.lastIndex = 0;
43602
- if (typeof value === 'string' && reg.test(value)) {
43673
+ if (reg.test(value)) {
43603
43674
  callback(true);
43604
43675
  } else {
43605
43676
  callback(new FormError(po.message, po));
@@ -66586,7 +66657,7 @@ var emptyRef = {
66586
66657
  columns: columns,
66587
66658
  colgroup: colgroup,
66588
66659
  rowsInView: props.rowsInView || 20,
66589
- rowHeight: props.rowHeight || 100,
66660
+ rowHeight: props.rowHeight || 40,
66590
66661
  strictRowHeight: props.strictRowHeight,
66591
66662
  scrollRef: scrollRef,
66592
66663
  innerRef: tbodyRef,
@@ -73540,7 +73611,7 @@ var upload_interface = __webpack_require__(8821);
73540
73611
 
73541
73612
 
73542
73613
  /* harmony default export */ var src_0 = ({
73543
- version: '3.9.0-beta.10'
73614
+ version: '3.9.0-beta.12'
73544
73615
  });
73545
73616
  }();
73546
73617
  /******/ return __webpack_exports__;