fis-component 0.0.13 → 0.0.14

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/dist/cjs/index.js CHANGED
@@ -1,32 +1,29 @@
1
1
  'use strict';
2
2
 
3
- var React$1 = require('react');
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var React = require('react');
4
5
  var ReactDOM = require('react-dom');
5
6
 
6
7
  function _interopNamespaceDefault(e) {
7
- var n = Object.create(null);
8
- if (e) {
9
- Object.keys(e).forEach(function (k) {
10
- if (k !== 'default') {
11
- var d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: function () { return e[k]; }
15
- });
16
- }
17
- });
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
21
22
  }
22
23
 
23
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React$1);
24
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
24
25
  var ReactDOM__namespace = /*#__PURE__*/_interopNamespaceDefault(ReactDOM);
25
26
 
26
- const MyComponent = () => {
27
- return React.createElement("div", null, "Hello from my React component!");
28
- };
29
-
30
27
  function getDefaultExportFromCjs (x) {
31
28
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
32
29
  }
@@ -537,7 +534,7 @@ function findDOMNode(node) {
537
534
  if (domNode) {
538
535
  return domNode;
539
536
  }
540
- if (node instanceof React$1.Component) {
537
+ if (node instanceof React.Component) {
541
538
  var _ReactDOM$findDOMNode;
542
539
  return (_ReactDOM$findDOMNode = ReactDOM.findDOMNode) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call(ReactDOM, node);
543
540
  }
@@ -594,7 +591,7 @@ var supportRef = function supportRef(nodeOrComponent) {
594
591
  return true;
595
592
  };
596
593
  function isReactElement(node) {
597
- return /*#__PURE__*/React$1.isValidElement(node) && !reactIsExports.isFragment(node);
594
+ return /*#__PURE__*/React.isValidElement(node) && !reactIsExports.isFragment(node);
598
595
  }
599
596
 
600
597
  /**
@@ -602,7 +599,7 @@ function isReactElement(node) {
602
599
  * But a property from `props.ref`.
603
600
  * To check if `props.ref` exist or fallback to `ref`.
604
601
  */
605
- Number(React$1.version.split('.')[0]) >= 19 ?
602
+ Number(React.version.split('.')[0]) >= 19 ?
606
603
  // >= React 19
607
604
  function (node) {
608
605
  if (isReactElement(node)) {
@@ -1783,7 +1780,7 @@ var TOKEN_PREFIX = 'token';
1783
1780
  */
1784
1781
  function useCacheToken(theme, tokens) {
1785
1782
  var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
1786
- var _useContext = React$1.useContext(StyleContext$1),
1783
+ var _useContext = React.useContext(StyleContext$1),
1787
1784
  instanceId = _useContext.cache.instanceId,
1788
1785
  container = _useContext.container;
1789
1786
  var _option$salt = option.salt,
@@ -2956,7 +2953,7 @@ var useCSSVarRegister = function useCSSVarRegister(config, fn) {
2956
2953
  token = config.token,
2957
2954
  _config$scope = config.scope,
2958
2955
  scope = _config$scope === void 0 ? '' : _config$scope;
2959
- var _useContext = React$1.useContext(StyleContext$1),
2956
+ var _useContext = React.useContext(StyleContext$1),
2960
2957
  instanceId = _useContext.cache.instanceId,
2961
2958
  container = _useContext.container;
2962
2959
  var tokenKey = token._tokenKey;
@@ -3088,8 +3085,7 @@ function noSplit(list) {
3088
3085
  borderEndEndRadius: ['borderBottomRightRadius']
3089
3086
  });
3090
3087
 
3091
- var IconContext = /*#__PURE__*/React$1.createContext({});
3092
- var Context$1 = IconContext;
3088
+ var IconContext = /*#__PURE__*/React.createContext({});
3093
3089
 
3094
3090
  function _toArray(r) {
3095
3091
  return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
@@ -3246,7 +3242,7 @@ var warning$2 = warning$1;
3246
3242
  // ZombieJ: We export single file here since
3247
3243
  // ConfigProvider use this which will make loop deps
3248
3244
  // to import whole `rc-field-form`
3249
- var ValidateMessagesContext = /*#__PURE__*/React$1.createContext(undefined);
3245
+ var ValidateMessagesContext = /*#__PURE__*/React.createContext(undefined);
3250
3246
 
3251
3247
  var locale$3 = {
3252
3248
  // Options
@@ -3302,7 +3298,6 @@ const locale$1 = {
3302
3298
  placeholder: 'Select time',
3303
3299
  rangePlaceholder: ['Start time', 'End time']
3304
3300
  };
3305
- var TimePicker = locale$1;
3306
3301
 
3307
3302
  // Merge into a locale object
3308
3303
  const locale = {
@@ -3318,20 +3313,17 @@ const locale = {
3318
3313
  rangeMonthPlaceholder: ['Start month', 'End month'],
3319
3314
  rangeWeekPlaceholder: ['Start week', 'End week']
3320
3315
  }, locale$2),
3321
- timePickerLocale: Object.assign({}, TimePicker)
3316
+ timePickerLocale: Object.assign({}, locale$1)
3322
3317
  };
3323
- // All settings at:
3324
- // https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
3325
- var enUS = locale;
3326
3318
 
3327
3319
  /* eslint-disable no-template-curly-in-string */
3328
3320
  const typeTemplate = '${label} is not a valid ${type}';
3329
3321
  const localeValues = {
3330
3322
  locale: 'en',
3331
3323
  Pagination: locale$3,
3332
- DatePicker: enUS,
3333
- TimePicker,
3334
- Calendar: enUS,
3324
+ DatePicker: locale,
3325
+ TimePicker: locale$1,
3326
+ Calendar: locale,
3335
3327
  global: {
3336
3328
  placeholder: 'Please select'
3337
3329
  },
@@ -3466,11 +3458,10 @@ const localeValues = {
3466
3458
  gradientColor: 'Gradient'
3467
3459
  }
3468
3460
  };
3469
- var defaultLocale = localeValues;
3470
3461
 
3471
- Object.assign({}, defaultLocale.Modal);
3462
+ Object.assign({}, localeValues.Modal);
3472
3463
  let localeList = [];
3473
- const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), defaultLocale.Modal);
3464
+ const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), localeValues.Modal);
3474
3465
  function changeConfirmLocale(newLocale) {
3475
3466
  if (newLocale) {
3476
3467
  const cloneLocale = Object.assign({}, newLocale);
@@ -3481,11 +3472,10 @@ function changeConfirmLocale(newLocale) {
3481
3472
  generateLocale();
3482
3473
  };
3483
3474
  }
3484
- Object.assign({}, defaultLocale.Modal);
3475
+ Object.assign({}, localeValues.Modal);
3485
3476
  }
3486
3477
 
3487
- const LocaleContext = /*#__PURE__*/React$1.createContext(undefined);
3488
- var LocaleContext$1 = LocaleContext;
3478
+ const LocaleContext = /*#__PURE__*/React.createContext(undefined);
3489
3479
 
3490
3480
  const ANT_MARK = 'internalMark';
3491
3481
  const LocaleProvider = props => {
@@ -3505,14 +3495,13 @@ const LocaleProvider = props => {
3505
3495
  const getMemoizedContextValue = React__namespace.useMemo(() => Object.assign(Object.assign({}, locale), {
3506
3496
  exist: true
3507
3497
  }), [locale]);
3508
- return /*#__PURE__*/React__namespace.createElement(LocaleContext$1.Provider, {
3498
+ return /*#__PURE__*/React__namespace.createElement(LocaleContext.Provider, {
3509
3499
  value: getMemoizedContextValue
3510
3500
  }, children);
3511
3501
  };
3512
3502
  if (process.env.NODE_ENV !== 'production') {
3513
3503
  LocaleProvider.displayName = 'LocaleProvider';
3514
3504
  }
3515
- var LocaleProvider$1 = LocaleProvider;
3516
3505
 
3517
3506
  /**
3518
3507
  * Take input from [0, n] and return it as [0, 1]
@@ -4937,7 +4926,6 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
4937
4926
  // Motion
4938
4927
  motion: true
4939
4928
  });
4940
- var seedToken$1 = seedToken;
4941
4929
 
4942
4930
  function genColorMapToken(seed, _ref) {
4943
4931
  let {
@@ -5067,7 +5055,6 @@ const genRadius = radiusBase => {
5067
5055
  borderRadiusOuter: radiusOuter
5068
5056
  };
5069
5057
  };
5070
- var genRadius$1 = genRadius;
5071
5058
 
5072
5059
  function genCommonMapToken(token) {
5073
5060
  const {
@@ -5083,7 +5070,7 @@ function genCommonMapToken(token) {
5083
5070
  motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
5084
5071
  // line
5085
5072
  lineWidthBold: lineWidth + 1
5086
- }, genRadius$1(borderRadius));
5073
+ }, genRadius(borderRadius));
5087
5074
  }
5088
5075
 
5089
5076
  const genControlHeight = token => {
@@ -5096,7 +5083,6 @@ const genControlHeight = token => {
5096
5083
  controlHeightLG: controlHeight * 1.25
5097
5084
  };
5098
5085
  };
5099
- var genControlHeight$1 = genControlHeight;
5100
5086
 
5101
5087
  function getLineHeight(fontSize) {
5102
5088
  return (fontSize + 8) / fontSize;
@@ -5150,7 +5136,6 @@ const genFontMapToken = fontSize => {
5150
5136
  lineHeightHeading5: lineHeights[2]
5151
5137
  };
5152
5138
  };
5153
- var genFontMapToken$1 = genFontMapToken;
5154
5139
 
5155
5140
  function genSizeMapToken(token) {
5156
5141
  const {
@@ -5245,20 +5230,20 @@ function derivative(token) {
5245
5230
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), genColorMapToken(token, {
5246
5231
  generateColorPalettes,
5247
5232
  generateNeutralColorPalettes
5248
- })), genFontMapToken$1(token.fontSize)), genSizeMapToken(token)), genControlHeight$1(token)), genCommonMapToken(token));
5233
+ })), genFontMapToken(token.fontSize)), genSizeMapToken(token)), genControlHeight(token)), genCommonMapToken(token));
5249
5234
  }
5250
5235
 
5251
5236
  const defaultTheme = createTheme(derivative);
5252
5237
  // ================================ Context =================================
5253
5238
  // To ensure snapshot stable. We disable hashed in test env.
5254
5239
  const defaultConfig = {
5255
- token: seedToken$1,
5240
+ token: seedToken,
5256
5241
  override: {
5257
- override: seedToken$1
5242
+ override: seedToken
5258
5243
  },
5259
5244
  hashed: true
5260
5245
  };
5261
- const DesignTokenContext = /*#__PURE__*/React$1.createContext(defaultConfig);
5246
+ const DesignTokenContext = /*#__PURE__*/React.createContext(defaultConfig);
5262
5247
 
5263
5248
  const defaultPrefixCls = 'ant';
5264
5249
  const defaultIconPrefixCls = 'anticon';
@@ -5358,7 +5343,6 @@ const DisabledContextProvider = _ref => {
5358
5343
  value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
5359
5344
  }, children);
5360
5345
  };
5361
- var DisabledContext$1 = DisabledContext;
5362
5346
 
5363
5347
  const SizeContext = /*#__PURE__*/React__namespace.createContext(undefined);
5364
5348
  const SizeContextProvider = _ref => {
@@ -5371,11 +5355,10 @@ const SizeContextProvider = _ref => {
5371
5355
  value: size || originSize
5372
5356
  }, children);
5373
5357
  };
5374
- var SizeContext$1 = SizeContext;
5375
5358
 
5376
5359
  function useConfig() {
5377
- const componentDisabled = React$1.useContext(DisabledContext$1);
5378
- const componentSize = React$1.useContext(SizeContext$1);
5360
+ const componentDisabled = React.useContext(DisabledContext);
5361
+ const componentSize = React.useContext(SizeContext);
5379
5362
  return {
5380
5363
  componentDisabled,
5381
5364
  componentSize
@@ -5827,7 +5810,7 @@ var uniqueMap = new ArrayKeyMap();
5827
5810
  * Like `useMemo`, but this hook result will be shared across all instances.
5828
5811
  */
5829
5812
  function useUniqueMemo(memoFn, deps) {
5830
- return React$1.useMemo(function () {
5813
+ return React.useMemo(function () {
5831
5814
  var cachedValue = uniqueMap.get(deps);
5832
5815
  if (cachedValue) {
5833
5816
  return cachedValue;
@@ -5926,7 +5909,7 @@ function genStyleUtils(config) {
5926
5909
  var _useToken2 = useToken(),
5927
5910
  cssVar = _useToken2.cssVar;
5928
5911
  return [function (node) {
5929
- return injectStyle && cssVar ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(CSSVarRegister, {
5912
+ return injectStyle && cssVar ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CSSVarRegister, {
5930
5913
  rootCls: rootCls,
5931
5914
  cssVar: cssVar,
5932
5915
  component: component
@@ -6128,7 +6111,7 @@ function formatToken(derivativeToken) {
6128
6111
  } = derivativeToken,
6129
6112
  restToken = __rest$4(derivativeToken, ["override"]);
6130
6113
  const overrideTokens = Object.assign({}, override);
6131
- Object.keys(seedToken$1).forEach(token => {
6114
+ Object.keys(seedToken).forEach(token => {
6132
6115
  delete overrideTokens[token];
6133
6116
  });
6134
6117
  const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
@@ -6378,10 +6361,10 @@ function useToken() {
6378
6361
  theme,
6379
6362
  override,
6380
6363
  cssVar
6381
- } = React$1.useContext(DesignTokenContext);
6364
+ } = React.useContext(DesignTokenContext);
6382
6365
  const salt = `${version$1}-${hashed || ''}`;
6383
6366
  const mergedTheme = theme || defaultTheme;
6384
- const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken$1, rootDesignToken], {
6367
+ const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken, rootDesignToken], {
6385
6368
  salt,
6386
6369
  override,
6387
6370
  getComputedToken,
@@ -6502,7 +6485,6 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
6502
6485
  })
6503
6486
  }]);
6504
6487
  };
6505
- var useStyle$2 = useResetIconStyle;
6506
6488
 
6507
6489
  const {
6508
6490
  genStyleHooks,
@@ -6513,7 +6495,7 @@ const {
6513
6495
  const {
6514
6496
  getPrefixCls,
6515
6497
  iconPrefixCls
6516
- } = React$1.useContext(ConfigContext);
6498
+ } = React.useContext(ConfigContext);
6517
6499
  const rootPrefixCls = getPrefixCls();
6518
6500
  return {
6519
6501
  rootPrefixCls,
@@ -6534,9 +6516,9 @@ const {
6534
6516
  const {
6535
6517
  csp,
6536
6518
  iconPrefixCls
6537
- } = React$1.useContext(ConfigContext);
6519
+ } = React.useContext(ConfigContext);
6538
6520
  // Generate style for icons
6539
- useStyle$2(iconPrefixCls, csp);
6521
+ useResetIconStyle(iconPrefixCls, csp);
6540
6522
  return csp !== null && csp !== void 0 ? csp : {};
6541
6523
  },
6542
6524
  getResetStyles: token => [{
@@ -6552,7 +6534,6 @@ const {
6552
6534
  } = fullClone$1;
6553
6535
  const useEmptyId = () => '';
6554
6536
  const useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;
6555
- var useThemeKey$1 = useThemeKey;
6556
6537
 
6557
6538
  function useTheme(theme, parentTheme, config) {
6558
6539
  var _a, _b;
@@ -6562,7 +6543,7 @@ function useTheme(theme, parentTheme, config) {
6562
6543
  hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : defaultConfig.hashed,
6563
6544
  cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
6564
6545
  }) : parentTheme;
6565
- const themeKey = useThemeKey$1();
6546
+ const themeKey = useThemeKey();
6566
6547
  if (process.env.NODE_ENV !== 'production') {
6567
6548
  const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;
6568
6549
  const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);
@@ -6727,7 +6708,7 @@ function getTransitionName(transitionName, transitionType) {
6727
6708
  }
6728
6709
 
6729
6710
  var useDomMotionEvents = (function (onInternalMotionEnd) {
6730
- var cacheElementRef = React$1.useRef();
6711
+ var cacheElementRef = React.useRef();
6731
6712
 
6732
6713
  // Remove events
6733
6714
  function removeMotionEvents(element) {
@@ -6761,7 +6742,7 @@ var useDomMotionEvents = (function (onInternalMotionEnd) {
6761
6742
  });
6762
6743
 
6763
6744
  // It's safe to use `useLayoutEffect` but the warning is annoying
6764
- var useIsomorphicLayoutEffect = canUseDom() ? React$1.useLayoutEffect : React$1.useEffect;
6745
+ var useIsomorphicLayoutEffect = canUseDom() ? React.useLayoutEffect : React.useEffect;
6765
6746
 
6766
6747
  var useNextFrame = (function () {
6767
6748
  var nextFrameRef = React__namespace.useRef(null);
@@ -6885,8 +6866,8 @@ function useStatus(supportMotion, visible, getElement, _ref) {
6885
6866
  style = _useState4[0],
6886
6867
  setStyle = _useState4[1];
6887
6868
  var currentStatus = getStatus();
6888
- var mountedRef = React$1.useRef(false);
6889
- var deadlineRef = React$1.useRef(null);
6869
+ var mountedRef = React.useRef(false);
6870
+ var deadlineRef = React.useRef(null);
6890
6871
 
6891
6872
  // =========================== Dom Node ===========================
6892
6873
  function getDomElement() {
@@ -6894,7 +6875,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
6894
6875
  }
6895
6876
 
6896
6877
  // ========================== Motion End ==========================
6897
- var activeRef = React$1.useRef(false);
6878
+ var activeRef = React.useRef(false);
6898
6879
 
6899
6880
  /**
6900
6881
  * Clean up status & style
@@ -7031,7 +7012,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
7031
7012
 
7032
7013
  // ============================ Effect ============================
7033
7014
  // Reset when motion changed
7034
- React$1.useEffect(function () {
7015
+ React.useEffect(function () {
7035
7016
  if (
7036
7017
  // Cancel appear
7037
7018
  currentStatus === STATUS_APPEAR && !motionAppear ||
@@ -7042,7 +7023,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
7042
7023
  setStatus(STATUS_NONE);
7043
7024
  }
7044
7025
  }, [motionAppear, motionEnter, motionLeave]);
7045
- React$1.useEffect(function () {
7026
+ React.useEffect(function () {
7046
7027
  return function () {
7047
7028
  mountedRef.current = false;
7048
7029
  clearTimeout(deadlineRef.current);
@@ -7051,7 +7032,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
7051
7032
 
7052
7033
  // Trigger `onVisibleChanged`
7053
7034
  var firstMountChangeRef = React__namespace.useRef(false);
7054
- React$1.useEffect(function () {
7035
+ React.useEffect(function () {
7055
7036
  // [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged
7056
7037
  if (asyncVisible) {
7057
7038
  firstMountChangeRef.current = true;
@@ -7102,9 +7083,9 @@ function genCSSMotion(config) {
7102
7083
  var supportMotion = isSupportTransition(props, contextMotion);
7103
7084
 
7104
7085
  // Ref to the react node, it may be a HTMLElement
7105
- var nodeRef = React$1.useRef();
7086
+ var nodeRef = React.useRef();
7106
7087
  // Ref to the dom wrapper in case ref can not pass to HTMLElement
7107
- var wrapperNodeRef = React$1.useRef();
7088
+ var wrapperNodeRef = React.useRef();
7108
7089
  function getDomElement() {
7109
7090
  try {
7110
7091
  // Here we're avoiding call for findDOMNode since it's deprecated
@@ -7587,7 +7568,7 @@ const ProviderChildren = props => {
7587
7568
  }, [parentContext.getPrefixCls, props.prefixCls]);
7588
7569
  const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;
7589
7570
  const csp = customCsp || parentContext.csp;
7590
- useStyle$2(iconPrefixCls, csp);
7571
+ useResetIconStyle(iconPrefixCls, csp);
7591
7572
  const mergedTheme = useTheme(theme, parentContext.theme, {
7592
7573
  prefixCls: getPrefixCls('')
7593
7574
  });
@@ -7704,7 +7685,7 @@ const ProviderChildren = props => {
7704
7685
  }), children);
7705
7686
  const validateMessages = React__namespace.useMemo(() => {
7706
7687
  var _a, _b, _c, _d;
7707
- return merge$1(((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});
7688
+ return merge$1(((_a = localeValues.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});
7708
7689
  }, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
7709
7690
  if (Object.keys(validateMessages).length > 0) {
7710
7691
  childNode = /*#__PURE__*/React__namespace.createElement(ValidateMessagesContext.Provider, {
@@ -7712,13 +7693,13 @@ const ProviderChildren = props => {
7712
7693
  }, childNode);
7713
7694
  }
7714
7695
  if (locale) {
7715
- childNode = /*#__PURE__*/React__namespace.createElement(LocaleProvider$1, {
7696
+ childNode = /*#__PURE__*/React__namespace.createElement(LocaleProvider, {
7716
7697
  locale: locale,
7717
7698
  _ANT_MARK__: ANT_MARK
7718
7699
  }, childNode);
7719
7700
  }
7720
7701
  if (iconPrefixCls || csp) {
7721
- childNode = /*#__PURE__*/React__namespace.createElement(Context$1.Provider, {
7702
+ childNode = /*#__PURE__*/React__namespace.createElement(IconContext.Provider, {
7722
7703
  value: memoIconContextValue
7723
7704
  }, childNode);
7724
7705
  }
@@ -7754,7 +7735,7 @@ const ProviderChildren = props => {
7754
7735
  }
7755
7736
  parsedComponents[componentName] = parsedToken;
7756
7737
  });
7757
- const mergedToken = Object.assign(Object.assign({}, seedToken$1), token);
7738
+ const mergedToken = Object.assign(Object.assign({}, seedToken), token);
7758
7739
  return Object.assign(Object.assign({}, rest), {
7759
7740
  theme: themeObj,
7760
7741
  token: mergedToken,
@@ -7788,20 +7769,20 @@ const ProviderChildren = props => {
7788
7769
  };
7789
7770
  const ConfigProvider = props => {
7790
7771
  const context = React__namespace.useContext(ConfigContext);
7791
- const antLocale = React__namespace.useContext(LocaleContext$1);
7772
+ const antLocale = React__namespace.useContext(LocaleContext);
7792
7773
  return /*#__PURE__*/React__namespace.createElement(ProviderChildren, Object.assign({
7793
7774
  parentContext: context,
7794
7775
  legacyLocale: antLocale
7795
7776
  }, props));
7796
7777
  };
7797
7778
  ConfigProvider.ConfigContext = ConfigContext;
7798
- ConfigProvider.SizeContext = SizeContext$1;
7779
+ ConfigProvider.SizeContext = SizeContext;
7799
7780
  ConfigProvider.config = setGlobalConfig;
7800
7781
  ConfigProvider.useConfig = useConfig;
7801
7782
  Object.defineProperty(ConfigProvider, 'SizeContext', {
7802
7783
  get: () => {
7803
7784
  process.env.NODE_ENV !== "production" ? warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
7804
- return SizeContext$1;
7785
+ return SizeContext;
7805
7786
  }
7806
7787
  });
7807
7788
  if (process.env.NODE_ENV !== 'production') {
@@ -7856,13 +7837,13 @@ function normalizeAttrs() {
7856
7837
  }
7857
7838
  function generate(node, key, rootProps) {
7858
7839
  if (!rootProps) {
7859
- return /*#__PURE__*/React$1.createElement(node.tag, _objectSpread2({
7840
+ return /*#__PURE__*/React.createElement(node.tag, _objectSpread2({
7860
7841
  key: key
7861
7842
  }, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
7862
7843
  return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
7863
7844
  }));
7864
7845
  }
7865
- return /*#__PURE__*/React$1.createElement(node.tag, _objectSpread2(_objectSpread2({
7846
+ return /*#__PURE__*/React.createElement(node.tag, _objectSpread2(_objectSpread2({
7866
7847
  key: key
7867
7848
  }, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
7868
7849
  return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
@@ -7880,14 +7861,14 @@ function normalizeTwoToneColors(twoToneColor) {
7880
7861
  }
7881
7862
  var iconStyles = "\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
7882
7863
  var useInsertStyles = function useInsertStyles(eleRef) {
7883
- var _useContext = React$1.useContext(Context$1),
7864
+ var _useContext = React.useContext(IconContext),
7884
7865
  csp = _useContext.csp,
7885
7866
  prefixCls = _useContext.prefixCls;
7886
7867
  var mergedStyleStr = iconStyles;
7887
7868
  if (prefixCls) {
7888
7869
  mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
7889
7870
  }
7890
- React$1.useEffect(function () {
7871
+ React.useEffect(function () {
7891
7872
  var ele = eleRef.current;
7892
7873
  var shadowRoot = getShadowRoot(ele);
7893
7874
  updateCSS(mergedStyleStr, '@ant-design-icons', {
@@ -7957,20 +7938,19 @@ var IconBase = function IconBase(props) {
7957
7938
  IconBase.displayName = 'IconReact';
7958
7939
  IconBase.getTwoToneColors = getTwoToneColors;
7959
7940
  IconBase.setTwoToneColors = setTwoToneColors;
7960
- var ReactIcon = IconBase;
7961
7941
 
7962
7942
  function setTwoToneColor(twoToneColor) {
7963
7943
  var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
7964
7944
  _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
7965
7945
  primaryColor = _normalizeTwoToneColo2[0],
7966
7946
  secondaryColor = _normalizeTwoToneColo2[1];
7967
- return ReactIcon.setTwoToneColors({
7947
+ return IconBase.setTwoToneColors({
7968
7948
  primaryColor: primaryColor,
7969
7949
  secondaryColor: secondaryColor
7970
7950
  });
7971
7951
  }
7972
7952
  function getTwoToneColor() {
7973
- var colors = ReactIcon.getTwoToneColors();
7953
+ var colors = IconBase.getTwoToneColors();
7974
7954
  if (!colors.calculated) {
7975
7955
  return colors.primaryColor;
7976
7956
  }
@@ -7993,7 +7973,7 @@ var Icon = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
7993
7973
  onClick = props.onClick,
7994
7974
  twoToneColor = props.twoToneColor,
7995
7975
  restProps = _objectWithoutProperties(props, _excluded);
7996
- var _React$useContext = React__namespace.useContext(Context$1),
7976
+ var _React$useContext = React__namespace.useContext(IconContext),
7997
7977
  _React$useContext$pre = _React$useContext.prefixCls,
7998
7978
  prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
7999
7979
  rootClassName = _React$useContext.rootClassName;
@@ -8018,7 +7998,7 @@ var Icon = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
8018
7998
  tabIndex: iconTabIndex,
8019
7999
  onClick: onClick,
8020
8000
  className: classString
8021
- }), /*#__PURE__*/React__namespace.createElement(ReactIcon, {
8001
+ }), /*#__PURE__*/React__namespace.createElement(IconBase, {
8022
8002
  icon: icon,
8023
8003
  primaryColor: primaryColor,
8024
8004
  secondaryColor: secondaryColor,
@@ -8028,29 +8008,27 @@ var Icon = /*#__PURE__*/React__namespace.forwardRef(function (props, ref) {
8028
8008
  Icon.displayName = 'AntdIcon';
8029
8009
  Icon.getTwoToneColor = getTwoToneColor;
8030
8010
  Icon.setTwoToneColor = setTwoToneColor;
8031
- var AntdIcon = Icon;
8032
8011
 
8033
8012
  function isFragment(child) {
8034
- return child && /*#__PURE__*/React$1.isValidElement(child) && child.type === React$1.Fragment;
8013
+ return child && /*#__PURE__*/React.isValidElement(child) && child.type === React.Fragment;
8035
8014
  }
8036
8015
  const replaceElement = (element, replacement, props) => {
8037
- if (! /*#__PURE__*/React$1.isValidElement(element)) {
8016
+ if (! /*#__PURE__*/React.isValidElement(element)) {
8038
8017
  return replacement;
8039
8018
  }
8040
- return /*#__PURE__*/React$1.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
8019
+ return /*#__PURE__*/React.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
8041
8020
  };
8042
8021
  function cloneElement(element, props) {
8043
8022
  return replaceElement(element, element, props);
8044
8023
  }
8045
8024
 
8046
8025
  // This icon file is generated automatically.
8047
- var LoadingOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
8048
- var LoadingOutlinedSvg = LoadingOutlined$2;
8026
+ var LoadingOutlined$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
8049
8027
 
8050
8028
  var LoadingOutlined = function LoadingOutlined(props, ref) {
8051
- return /*#__PURE__*/React__namespace.createElement(AntdIcon, _extends({}, props, {
8029
+ return /*#__PURE__*/React__namespace.createElement(Icon, _extends({}, props, {
8052
8030
  ref: ref,
8053
- icon: LoadingOutlinedSvg
8031
+ icon: LoadingOutlined$1
8054
8032
  }));
8055
8033
  };
8056
8034
 
@@ -8059,7 +8037,6 @@ var RefIcon = /*#__PURE__*/React__namespace.forwardRef(LoadingOutlined);
8059
8037
  if (process.env.NODE_ENV !== 'production') {
8060
8038
  RefIcon.displayName = 'LoadingOutlined';
8061
8039
  }
8062
- var LoadingOutlined$1 = RefIcon;
8063
8040
 
8064
8041
  function _regeneratorRuntime() {
8065
8042
  _regeneratorRuntime = function _regeneratorRuntime() {
@@ -8693,7 +8670,6 @@ const showWaveEffect = (target, info) => {
8693
8670
  target: target
8694
8671
  })), holder);
8695
8672
  };
8696
- var showWaveEffect$1 = showWaveEffect;
8697
8673
 
8698
8674
  const useWave = (nodeRef, className, component) => {
8699
8675
  const {
@@ -8710,7 +8686,7 @@ const useWave = (nodeRef, className, component) => {
8710
8686
  showEffect
8711
8687
  } = wave || {};
8712
8688
  // Customize wave effect
8713
- (showEffect || showWaveEffect$1)(targetNode, {
8689
+ (showEffect || showWaveEffect)(targetNode, {
8714
8690
  className,
8715
8691
  token,
8716
8692
  component,
@@ -8728,7 +8704,6 @@ const useWave = (nodeRef, className, component) => {
8728
8704
  };
8729
8705
  return showDebounceWave;
8730
8706
  };
8731
- var useWave$1 = useWave;
8732
8707
 
8733
8708
  const Wave = props => {
8734
8709
  const {
@@ -8738,15 +8713,15 @@ const Wave = props => {
8738
8713
  } = props;
8739
8714
  const {
8740
8715
  getPrefixCls
8741
- } = React$1.useContext(ConfigContext);
8742
- const containerRef = React$1.useRef(null);
8716
+ } = React.useContext(ConfigContext);
8717
+ const containerRef = React.useRef(null);
8743
8718
  // ============================== Style ===============================
8744
8719
  const prefixCls = getPrefixCls('wave');
8745
8720
  const [, hashId] = useStyle$1(prefixCls);
8746
8721
  // =============================== Wave ===============================
8747
- const showWave = useWave$1(containerRef, classNames(prefixCls, hashId), component);
8722
+ const showWave = useWave(containerRef, classNames(prefixCls, hashId), component);
8748
8723
  // ============================== Effect ==============================
8749
- React$1.useEffect(() => {
8724
+ React.useEffect(() => {
8750
8725
  const node = containerRef.current;
8751
8726
  if (!node || node.nodeType !== 1 || disabled) {
8752
8727
  return;
@@ -8768,7 +8743,7 @@ const Wave = props => {
8768
8743
  };
8769
8744
  }, [disabled]);
8770
8745
  // ============================== Render ==============================
8771
- if (! /*#__PURE__*/React$1.isValidElement(children)) {
8746
+ if (! /*#__PURE__*/React.isValidElement(children)) {
8772
8747
  return children !== null && children !== void 0 ? children : null;
8773
8748
  }
8774
8749
  const ref = supportRef(children) ? composeRef(children.ref, containerRef) : containerRef;
@@ -8779,11 +8754,10 @@ const Wave = props => {
8779
8754
  if (process.env.NODE_ENV !== 'production') {
8780
8755
  Wave.displayName = 'Wave';
8781
8756
  }
8782
- var Wave$1 = Wave;
8783
8757
 
8784
8758
  const useSize = customSize => {
8785
- const size = React$1.useContext(SizeContext$1);
8786
- const mergedSize = React$1.useMemo(() => {
8759
+ const size = React.useContext(SizeContext);
8760
+ const mergedSize = React.useMemo(() => {
8787
8761
  if (!customSize) {
8788
8762
  return size;
8789
8763
  }
@@ -8797,7 +8771,6 @@ const useSize = customSize => {
8797
8771
  }, [customSize, size]);
8798
8772
  return mergedSize;
8799
8773
  };
8800
- var useSize$1 = useSize;
8801
8774
 
8802
8775
  undefined && undefined.__rest || function (s, e) {
8803
8776
  var t = {};
@@ -8879,7 +8852,6 @@ const ButtonGroup = props => {
8879
8852
  className: classes
8880
8853
  })));
8881
8854
  };
8882
- var Group = ButtonGroup;
8883
8855
 
8884
8856
  const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
8885
8857
  const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
@@ -8900,17 +8872,17 @@ function splitCNCharsBySpace(child, needInserted) {
8900
8872
  });
8901
8873
  }
8902
8874
  if (isString(child)) {
8903
- return isTwoCNChar(child) ? /*#__PURE__*/React$1.createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/React$1.createElement("span", null, child);
8875
+ return isTwoCNChar(child) ? /*#__PURE__*/React.createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/React.createElement("span", null, child);
8904
8876
  }
8905
8877
  if (isFragment(child)) {
8906
- return /*#__PURE__*/React$1.createElement("span", null, child);
8878
+ return /*#__PURE__*/React.createElement("span", null, child);
8907
8879
  }
8908
8880
  return child;
8909
8881
  }
8910
8882
  function spaceChildren(children, needInserted) {
8911
8883
  let isPrevChildPure = false;
8912
8884
  const childList = [];
8913
- React$1.Children.forEach(children, child => {
8885
+ React.Children.forEach(children, child => {
8914
8886
  const type = typeof child;
8915
8887
  const isCurrentChildPure = type === 'string' || type === 'number';
8916
8888
  if (isPrevChildPure && isCurrentChildPure) {
@@ -8922,10 +8894,10 @@ function spaceChildren(children, needInserted) {
8922
8894
  }
8923
8895
  isPrevChildPure = isCurrentChildPure;
8924
8896
  });
8925
- return React$1.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
8897
+ return React.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
8926
8898
  }
8927
8899
 
8928
- const IconWrapper = /*#__PURE__*/React$1.forwardRef((props, ref) => {
8900
+ const IconWrapper = /*#__PURE__*/React.forwardRef((props, ref) => {
8929
8901
  const {
8930
8902
  className,
8931
8903
  style,
@@ -8933,15 +8905,14 @@ const IconWrapper = /*#__PURE__*/React$1.forwardRef((props, ref) => {
8933
8905
  prefixCls
8934
8906
  } = props;
8935
8907
  const iconWrapperCls = classNames(`${prefixCls}-icon`, className);
8936
- return /*#__PURE__*/React$1.createElement("span", {
8908
+ return /*#__PURE__*/React.createElement("span", {
8937
8909
  ref: ref,
8938
8910
  className: iconWrapperCls,
8939
8911
  style: style
8940
8912
  }, children);
8941
8913
  });
8942
- var IconWrapper$1 = IconWrapper;
8943
8914
 
8944
- const InnerLoadingIcon = /*#__PURE__*/React$1.forwardRef((props, ref) => {
8915
+ const InnerLoadingIcon = /*#__PURE__*/React.forwardRef((props, ref) => {
8945
8916
  const {
8946
8917
  prefixCls,
8947
8918
  className,
@@ -8949,12 +8920,12 @@ const InnerLoadingIcon = /*#__PURE__*/React$1.forwardRef((props, ref) => {
8949
8920
  iconClassName
8950
8921
  } = props;
8951
8922
  const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);
8952
- return /*#__PURE__*/React$1.createElement(IconWrapper$1, {
8923
+ return /*#__PURE__*/React.createElement(IconWrapper, {
8953
8924
  prefixCls: prefixCls,
8954
8925
  className: mergedIconCls,
8955
8926
  style: style,
8956
8927
  ref: ref
8957
- }, /*#__PURE__*/React$1.createElement(LoadingOutlined$1, {
8928
+ }, /*#__PURE__*/React.createElement(RefIcon, {
8958
8929
  className: iconClassName
8959
8930
  }));
8960
8931
  });
@@ -8978,13 +8949,13 @@ const LoadingIcon = props => {
8978
8949
  } = props;
8979
8950
  const visible = !!loading;
8980
8951
  if (existIcon) {
8981
- return /*#__PURE__*/React$1.createElement(InnerLoadingIcon, {
8952
+ return /*#__PURE__*/React.createElement(InnerLoadingIcon, {
8982
8953
  prefixCls: prefixCls,
8983
8954
  className: className,
8984
8955
  style: style
8985
8956
  });
8986
8957
  }
8987
- return /*#__PURE__*/React$1.createElement(CSSMotion, {
8958
+ return /*#__PURE__*/React.createElement(CSSMotion, {
8988
8959
  visible: visible,
8989
8960
  // We do not really use this motionName
8990
8961
  motionName: `${prefixCls}-loading-icon-motion`,
@@ -9001,7 +8972,7 @@ const LoadingIcon = props => {
9001
8972
  className: motionCls,
9002
8973
  style: motionStyle
9003
8974
  } = _ref;
9004
- return /*#__PURE__*/React$1.createElement(InnerLoadingIcon, {
8975
+ return /*#__PURE__*/React.createElement(InnerLoadingIcon, {
9005
8976
  prefixCls: prefixCls,
9006
8977
  className: className,
9007
8978
  style: Object.assign(Object.assign({}, style), motionStyle),
@@ -9010,7 +8981,6 @@ const LoadingIcon = props => {
9010
8981
  });
9011
8982
  });
9012
8983
  };
9013
- var LoadingIcon$1 = LoadingIcon;
9014
8984
 
9015
8985
  const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
9016
8986
  // Border
@@ -9077,7 +9047,6 @@ const genGroupStyle = token => {
9077
9047
  genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
9078
9048
  };
9079
9049
  };
9080
- var genGroupStyle$1 = genGroupStyle;
9081
9050
 
9082
9051
  const prepareToken = token => {
9083
9052
  const {
@@ -9470,7 +9439,7 @@ var useStyle = genStyleHooks('Button', token => {
9470
9439
  // Group (type, ghost, danger, loading)
9471
9440
  genTypeButtonStyle(buttonToken),
9472
9441
  // Button Group
9473
- genGroupStyle$1(buttonToken)];
9442
+ genGroupStyle(buttonToken)];
9474
9443
  }, prepareComponentToken, {
9475
9444
  unitless: {
9476
9445
  fontWeight: true,
@@ -9662,7 +9631,7 @@ function getLoadingConfig(loading) {
9662
9631
  delay: 0
9663
9632
  };
9664
9633
  }
9665
- const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) => {
9634
+ const InternalCompoundedButton = /*#__PURE__*/React.forwardRef((props, ref) => {
9666
9635
  var _a, _b, _c;
9667
9636
  const {
9668
9637
  loading = false,
@@ -9694,20 +9663,20 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9694
9663
  getPrefixCls,
9695
9664
  direction,
9696
9665
  button
9697
- } = React$1.useContext(ConfigContext);
9666
+ } = React.useContext(ConfigContext);
9698
9667
  const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : button === null || button === void 0 ? void 0 : button.autoInsertSpace) !== null && _a !== void 0 ? _a : true;
9699
9668
  const prefixCls = getPrefixCls('btn', customizePrefixCls);
9700
9669
  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);
9701
- const disabled = React$1.useContext(DisabledContext$1);
9670
+ const disabled = React.useContext(DisabledContext);
9702
9671
  const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
9703
- const groupSize = React$1.useContext(GroupSizeContext);
9704
- const loadingOrDelay = React$1.useMemo(() => getLoadingConfig(loading), [loading]);
9705
- const [innerLoading, setLoading] = React$1.useState(loadingOrDelay.loading);
9706
- const [hasTwoCNChar, setHasTwoCNChar] = React$1.useState(false);
9707
- const internalRef = /*#__PURE__*/React$1.createRef();
9672
+ const groupSize = React.useContext(GroupSizeContext);
9673
+ const loadingOrDelay = React.useMemo(() => getLoadingConfig(loading), [loading]);
9674
+ const [innerLoading, setLoading] = React.useState(loadingOrDelay.loading);
9675
+ const [hasTwoCNChar, setHasTwoCNChar] = React.useState(false);
9676
+ const internalRef = /*#__PURE__*/React.createRef();
9708
9677
  const buttonRef = composeRef(ref, internalRef);
9709
- const needInserted = React$1.Children.count(children) === 1 && !icon && !isUnBorderedButtonType(mergedType);
9710
- React$1.useEffect(() => {
9678
+ const needInserted = React.Children.count(children) === 1 && !icon && !isUnBorderedButtonType(mergedType);
9679
+ React.useEffect(() => {
9711
9680
  let delayTimer = null;
9712
9681
  if (loadingOrDelay.delay > 0) {
9713
9682
  delayTimer = setTimeout(() => {
@@ -9725,7 +9694,7 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9725
9694
  }
9726
9695
  return cleanupTimer;
9727
9696
  }, [loadingOrDelay]);
9728
- React$1.useEffect(() => {
9697
+ React.useEffect(() => {
9729
9698
  // FIXME: for HOC usage like <FormatMessage />
9730
9699
  if (!buttonRef || !buttonRef.current || !mergedInsertSpace) {
9731
9700
  return;
@@ -9764,7 +9733,7 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9764
9733
  small: 'sm',
9765
9734
  middle: undefined
9766
9735
  };
9767
- const sizeFullName = useSize$1(ctxSize => {
9736
+ const sizeFullName = useSize(ctxSize => {
9768
9737
  var _a, _b;
9769
9738
  return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
9770
9739
  });
@@ -9787,18 +9756,18 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9787
9756
  const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);
9788
9757
  const iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, (_b = button === null || button === void 0 ? void 0 : button.classNames) === null || _b === void 0 ? void 0 : _b.icon);
9789
9758
  const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), ((_c = button === null || button === void 0 ? void 0 : button.styles) === null || _c === void 0 ? void 0 : _c.icon) || {});
9790
- const iconNode = icon && !innerLoading ? (/*#__PURE__*/React$1.createElement(IconWrapper$1, {
9759
+ const iconNode = icon && !innerLoading ? (/*#__PURE__*/React.createElement(IconWrapper, {
9791
9760
  prefixCls: prefixCls,
9792
9761
  className: iconClasses,
9793
9762
  style: iconStyle
9794
- }, icon)) : (/*#__PURE__*/React$1.createElement(LoadingIcon$1, {
9763
+ }, icon)) : (/*#__PURE__*/React.createElement(LoadingIcon, {
9795
9764
  existIcon: !!icon,
9796
9765
  prefixCls: prefixCls,
9797
9766
  loading: innerLoading
9798
9767
  }));
9799
9768
  const kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
9800
9769
  if (linkButtonRestProps.href !== undefined) {
9801
- return wrapCSSVar(/*#__PURE__*/React$1.createElement("a", Object.assign({}, linkButtonRestProps, {
9770
+ return wrapCSSVar(/*#__PURE__*/React.createElement("a", Object.assign({}, linkButtonRestProps, {
9802
9771
  className: classNames(classes, {
9803
9772
  [`${prefixCls}-disabled`]: mergedDisabled
9804
9773
  }),
@@ -9809,19 +9778,19 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9809
9778
  tabIndex: mergedDisabled ? -1 : 0
9810
9779
  }), iconNode, kids));
9811
9780
  }
9812
- let buttonNode = /*#__PURE__*/React$1.createElement("button", Object.assign({}, rest, {
9781
+ let buttonNode = /*#__PURE__*/React.createElement("button", Object.assign({}, rest, {
9813
9782
  type: htmlType,
9814
9783
  className: classes,
9815
9784
  style: fullStyle,
9816
9785
  onClick: handleClick,
9817
9786
  disabled: mergedDisabled,
9818
9787
  ref: buttonRef
9819
- }), iconNode, kids, !!compactItemClassnames && /*#__PURE__*/React$1.createElement(CompactCmp, {
9788
+ }), iconNode, kids, !!compactItemClassnames && /*#__PURE__*/React.createElement(CompactCmp, {
9820
9789
  key: "compact",
9821
9790
  prefixCls: prefixCls
9822
9791
  }));
9823
9792
  if (!isUnBorderedButtonType(mergedType)) {
9824
- buttonNode = /*#__PURE__*/React$1.createElement(Wave$1, {
9793
+ buttonNode = /*#__PURE__*/React.createElement(Wave, {
9825
9794
  component: "Button",
9826
9795
  disabled: innerLoading
9827
9796
  }, buttonNode);
@@ -9829,17 +9798,15 @@ const InternalCompoundedButton = /*#__PURE__*/React$1.forwardRef((props, ref) =>
9829
9798
  return wrapCSSVar(buttonNode);
9830
9799
  });
9831
9800
  const Button = InternalCompoundedButton;
9832
- Button.Group = Group;
9801
+ Button.Group = ButtonGroup;
9833
9802
  Button.__ANT_BUTTON = true;
9834
9803
  if (process.env.NODE_ENV !== 'production') {
9835
9804
  Button.displayName = 'Button';
9836
9805
  }
9837
- var Button$1 = Button;
9838
9806
 
9839
9807
  const FisButton = () => {
9840
- return React.createElement(Button$1, null, "Hello from my React component!");
9808
+ return jsxRuntime.jsx(Button, { children: "Hello from my React component!" });
9841
9809
  };
9842
9810
 
9843
9811
  exports.FisButton = FisButton;
9844
- exports.MyComponent = MyComponent;
9845
9812
  //# sourceMappingURL=index.js.map