fis-component 0.0.13 → 0.0.15

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