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 +121 -155
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +3 -0
- package/dist/cjs/types/components/Button/index.d.ts +1 -1
- package/dist/cjs/types/components/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +1 -2
- package/dist/esm/index.js +144 -177
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +3 -0
- package/dist/esm/types/components/Button/index.d.ts +1 -1
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +1 -2
- package/dist/index.d.ts +3 -5
- package/package.json +5 -11
package/dist/esm/index.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import React__default, { version as version$2, isValidElement, useContext, createContext, useRef, useLayoutEffect as useLayoutEffect$1, useEffect, forwardRef, useMemo as useMemo$1, useState, Children, createRef } from 'react';
|
|
3
3
|
import * as ReactDOM from 'react-dom';
|
|
4
4
|
import ReactDOM__default from 'react-dom';
|
|
5
5
|
|
|
6
|
-
const MyComponent = () => {
|
|
7
|
-
return React.createElement("div", null, "Hello from my React component!");
|
|
8
|
-
};
|
|
9
|
-
|
|
10
6
|
function getDefaultExportFromCjs (x) {
|
|
11
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12
8
|
}
|
|
@@ -525,7 +521,7 @@ function findDOMNode(node) {
|
|
|
525
521
|
}
|
|
526
522
|
|
|
527
523
|
function useMemo(getValue, condition, shouldUpdate) {
|
|
528
|
-
var cacheRef = React
|
|
524
|
+
var cacheRef = React.useRef({});
|
|
529
525
|
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
530
526
|
cacheRef.current.value = getValue();
|
|
531
527
|
cacheRef.current.condition = condition;
|
|
@@ -1187,7 +1183,7 @@ function createCache() {
|
|
|
1187
1183
|
}
|
|
1188
1184
|
return new Entity(cssinjsInstanceId);
|
|
1189
1185
|
}
|
|
1190
|
-
var StyleContext = /*#__PURE__*/React
|
|
1186
|
+
var StyleContext = /*#__PURE__*/React.createContext({
|
|
1191
1187
|
hashPriority: 'low',
|
|
1192
1188
|
cache: createCache(),
|
|
1193
1189
|
defaultCache: true
|
|
@@ -1500,9 +1496,9 @@ var transformToken = function transformToken(token, themeKey, config) {
|
|
|
1500
1496
|
/**
|
|
1501
1497
|
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
|
|
1502
1498
|
*/
|
|
1503
|
-
var useInternalLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React
|
|
1499
|
+
var useInternalLayoutEffect = process.env.NODE_ENV !== 'test' && canUseDom() ? React.useLayoutEffect : React.useEffect;
|
|
1504
1500
|
var useLayoutEffect = function useLayoutEffect(callback, deps) {
|
|
1505
|
-
var firstMountRef = React
|
|
1501
|
+
var firstMountRef = React.useRef(true);
|
|
1506
1502
|
useInternalLayoutEffect(function () {
|
|
1507
1503
|
return callback(firstMountRef.current);
|
|
1508
1504
|
}, deps);
|
|
@@ -1518,7 +1514,7 @@ var useLayoutEffect = function useLayoutEffect(callback, deps) {
|
|
|
1518
1514
|
|
|
1519
1515
|
// We need fully clone React function here
|
|
1520
1516
|
// to avoid webpack warning React 17 do not export `useId`
|
|
1521
|
-
var fullClone$3 = _objectSpread2({}, React
|
|
1517
|
+
var fullClone$3 = _objectSpread2({}, React);
|
|
1522
1518
|
var useInsertionEffect$1 = fullClone$3.useInsertionEffect;
|
|
1523
1519
|
/**
|
|
1524
1520
|
* Polyfill `useInsertionEffect` for React < 18
|
|
@@ -1527,7 +1523,7 @@ var useInsertionEffect$1 = fullClone$3.useInsertionEffect;
|
|
|
1527
1523
|
* @param deps
|
|
1528
1524
|
*/
|
|
1529
1525
|
var useInsertionEffectPolyfill = function useInsertionEffectPolyfill(renderEffect, effect, deps) {
|
|
1530
|
-
React
|
|
1526
|
+
React.useMemo(renderEffect, deps);
|
|
1531
1527
|
useLayoutEffect(function () {
|
|
1532
1528
|
return effect(true);
|
|
1533
1529
|
}, deps);
|
|
@@ -1546,7 +1542,7 @@ var useCompatibleInsertionEffect = useInsertionEffect$1 ? function (renderEffect
|
|
|
1546
1542
|
} : useInsertionEffectPolyfill;
|
|
1547
1543
|
var useCompatibleInsertionEffect$1 = useCompatibleInsertionEffect;
|
|
1548
1544
|
|
|
1549
|
-
var fullClone$2 = _objectSpread2({}, React
|
|
1545
|
+
var fullClone$2 = _objectSpread2({}, React);
|
|
1550
1546
|
var useInsertionEffect = fullClone$2.useInsertionEffect;
|
|
1551
1547
|
|
|
1552
1548
|
// DO NOT register functions in useEffect cleanup function, or functions that registered will never be called.
|
|
@@ -1562,7 +1558,7 @@ var useCleanupRegister = function useCleanupRegister(deps) {
|
|
|
1562
1558
|
}
|
|
1563
1559
|
effectCleanups.push(fn);
|
|
1564
1560
|
}
|
|
1565
|
-
React
|
|
1561
|
+
React.useEffect(function () {
|
|
1566
1562
|
// Compatible with strict mode
|
|
1567
1563
|
cleanupFlag = false;
|
|
1568
1564
|
return function () {
|
|
@@ -1614,7 +1610,7 @@ if (process.env.NODE_ENV !== 'production' && typeof module !== 'undefined' && mo
|
|
|
1614
1610
|
function useGlobalCache(prefix, keyPath, cacheFn, onCacheRemove,
|
|
1615
1611
|
// Add additional effect trigger by `useInsertionEffect`
|
|
1616
1612
|
onCacheEffect) {
|
|
1617
|
-
var _React$useContext = React
|
|
1613
|
+
var _React$useContext = React.useContext(StyleContext$1),
|
|
1618
1614
|
globalCache = _React$useContext.cache;
|
|
1619
1615
|
var fullPath = [prefix].concat(_toConsumableArray(keyPath));
|
|
1620
1616
|
var fullPathStr = pathKey(fullPath);
|
|
@@ -1643,7 +1639,7 @@ onCacheEffect) {
|
|
|
1643
1639
|
};
|
|
1644
1640
|
|
|
1645
1641
|
// Create cache
|
|
1646
|
-
React
|
|
1642
|
+
React.useMemo(function () {
|
|
1647
1643
|
buildCache();
|
|
1648
1644
|
}, /* eslint-disable react-hooks/exhaustive-deps */
|
|
1649
1645
|
[fullPathStr]
|
|
@@ -2736,7 +2732,7 @@ function useStyleRegister(info, styleFn) {
|
|
|
2736
2732
|
clientOnly = info.clientOnly,
|
|
2737
2733
|
_info$order = info.order,
|
|
2738
2734
|
order = _info$order === void 0 ? 0 : _info$order;
|
|
2739
|
-
var _React$useContext = React
|
|
2735
|
+
var _React$useContext = React.useContext(StyleContext$1),
|
|
2740
2736
|
autoClear = _React$useContext.autoClear,
|
|
2741
2737
|
mock = _React$useContext.mock,
|
|
2742
2738
|
defaultCache = _React$useContext.defaultCache,
|
|
@@ -2870,15 +2866,15 @@ function useStyleRegister(info, styleFn) {
|
|
|
2870
2866
|
return function (node) {
|
|
2871
2867
|
var styleNode;
|
|
2872
2868
|
if (!ssrInline || isMergedClientSide || !defaultCache) {
|
|
2873
|
-
styleNode = /*#__PURE__*/React
|
|
2869
|
+
styleNode = /*#__PURE__*/React.createElement(Empty, null);
|
|
2874
2870
|
} else {
|
|
2875
|
-
styleNode = /*#__PURE__*/React
|
|
2871
|
+
styleNode = /*#__PURE__*/React.createElement("style", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {
|
|
2876
2872
|
dangerouslySetInnerHTML: {
|
|
2877
2873
|
__html: cachedStyleStr
|
|
2878
2874
|
}
|
|
2879
2875
|
}));
|
|
2880
2876
|
}
|
|
2881
|
-
return /*#__PURE__*/React
|
|
2877
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);
|
|
2882
2878
|
};
|
|
2883
2879
|
}
|
|
2884
2880
|
var extract$1 = function extract(cache, effectStyles, options) {
|
|
@@ -3069,7 +3065,6 @@ function noSplit(list) {
|
|
|
3069
3065
|
});
|
|
3070
3066
|
|
|
3071
3067
|
var IconContext = /*#__PURE__*/createContext({});
|
|
3072
|
-
var Context$1 = IconContext;
|
|
3073
3068
|
|
|
3074
3069
|
function _toArray(r) {
|
|
3075
3070
|
return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
|
|
@@ -3181,7 +3176,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
3181
3176
|
}
|
|
3182
3177
|
};
|
|
3183
3178
|
}
|
|
3184
|
-
const WarningContext = /*#__PURE__*/React
|
|
3179
|
+
const WarningContext = /*#__PURE__*/React.createContext({});
|
|
3185
3180
|
/**
|
|
3186
3181
|
* This is a hook but we not named as `useWarning`
|
|
3187
3182
|
* since this is only used in development.
|
|
@@ -3190,7 +3185,7 @@ const WarningContext = /*#__PURE__*/React$1.createContext({});
|
|
|
3190
3185
|
const devUseWarning = process.env.NODE_ENV !== 'production' ? component => {
|
|
3191
3186
|
const {
|
|
3192
3187
|
strict
|
|
3193
|
-
} = React
|
|
3188
|
+
} = React.useContext(WarningContext);
|
|
3194
3189
|
const typeWarning = (valid, type, message) => {
|
|
3195
3190
|
if (!valid) {
|
|
3196
3191
|
if (strict === false && type === 'deprecated') {
|
|
@@ -3282,7 +3277,6 @@ const locale$1 = {
|
|
|
3282
3277
|
placeholder: 'Select time',
|
|
3283
3278
|
rangePlaceholder: ['Start time', 'End time']
|
|
3284
3279
|
};
|
|
3285
|
-
var TimePicker = locale$1;
|
|
3286
3280
|
|
|
3287
3281
|
// Merge into a locale object
|
|
3288
3282
|
const locale = {
|
|
@@ -3298,20 +3292,17 @@ const locale = {
|
|
|
3298
3292
|
rangeMonthPlaceholder: ['Start month', 'End month'],
|
|
3299
3293
|
rangeWeekPlaceholder: ['Start week', 'End week']
|
|
3300
3294
|
}, locale$2),
|
|
3301
|
-
timePickerLocale: Object.assign({},
|
|
3295
|
+
timePickerLocale: Object.assign({}, locale$1)
|
|
3302
3296
|
};
|
|
3303
|
-
// All settings at:
|
|
3304
|
-
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
3305
|
-
var enUS = locale;
|
|
3306
3297
|
|
|
3307
3298
|
/* eslint-disable no-template-curly-in-string */
|
|
3308
3299
|
const typeTemplate = '${label} is not a valid ${type}';
|
|
3309
3300
|
const localeValues = {
|
|
3310
3301
|
locale: 'en',
|
|
3311
3302
|
Pagination: locale$3,
|
|
3312
|
-
DatePicker:
|
|
3313
|
-
TimePicker,
|
|
3314
|
-
Calendar:
|
|
3303
|
+
DatePicker: locale,
|
|
3304
|
+
TimePicker: locale$1,
|
|
3305
|
+
Calendar: locale,
|
|
3315
3306
|
global: {
|
|
3316
3307
|
placeholder: 'Please select'
|
|
3317
3308
|
},
|
|
@@ -3446,11 +3437,10 @@ const localeValues = {
|
|
|
3446
3437
|
gradientColor: 'Gradient'
|
|
3447
3438
|
}
|
|
3448
3439
|
};
|
|
3449
|
-
var defaultLocale = localeValues;
|
|
3450
3440
|
|
|
3451
|
-
Object.assign({},
|
|
3441
|
+
Object.assign({}, localeValues.Modal);
|
|
3452
3442
|
let localeList = [];
|
|
3453
|
-
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale),
|
|
3443
|
+
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), localeValues.Modal);
|
|
3454
3444
|
function changeConfirmLocale(newLocale) {
|
|
3455
3445
|
if (newLocale) {
|
|
3456
3446
|
const cloneLocale = Object.assign({}, newLocale);
|
|
@@ -3461,11 +3451,10 @@ function changeConfirmLocale(newLocale) {
|
|
|
3461
3451
|
generateLocale();
|
|
3462
3452
|
};
|
|
3463
3453
|
}
|
|
3464
|
-
Object.assign({},
|
|
3454
|
+
Object.assign({}, localeValues.Modal);
|
|
3465
3455
|
}
|
|
3466
3456
|
|
|
3467
3457
|
const LocaleContext = /*#__PURE__*/createContext(undefined);
|
|
3468
|
-
var LocaleContext$1 = LocaleContext;
|
|
3469
3458
|
|
|
3470
3459
|
const ANT_MARK = 'internalMark';
|
|
3471
3460
|
const LocaleProvider = props => {
|
|
@@ -3478,21 +3467,20 @@ const LocaleProvider = props => {
|
|
|
3478
3467
|
const warning = devUseWarning('LocaleProvider');
|
|
3479
3468
|
process.env.NODE_ENV !== "production" ? warning(_ANT_MARK__ === ANT_MARK, 'deprecated', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale') : void 0;
|
|
3480
3469
|
}
|
|
3481
|
-
React
|
|
3470
|
+
React.useEffect(() => {
|
|
3482
3471
|
const clearLocale = changeConfirmLocale(locale === null || locale === void 0 ? void 0 : locale.Modal);
|
|
3483
3472
|
return clearLocale;
|
|
3484
3473
|
}, [locale]);
|
|
3485
|
-
const getMemoizedContextValue = React
|
|
3474
|
+
const getMemoizedContextValue = React.useMemo(() => Object.assign(Object.assign({}, locale), {
|
|
3486
3475
|
exist: true
|
|
3487
3476
|
}), [locale]);
|
|
3488
|
-
return /*#__PURE__*/React
|
|
3477
|
+
return /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
3489
3478
|
value: getMemoizedContextValue
|
|
3490
3479
|
}, children);
|
|
3491
3480
|
};
|
|
3492
3481
|
if (process.env.NODE_ENV !== 'production') {
|
|
3493
3482
|
LocaleProvider.displayName = 'LocaleProvider';
|
|
3494
3483
|
}
|
|
3495
|
-
var LocaleProvider$1 = LocaleProvider;
|
|
3496
3484
|
|
|
3497
3485
|
/**
|
|
3498
3486
|
* Take input from [0, n] and return it as [0, 1]
|
|
@@ -4917,7 +4905,6 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
4917
4905
|
// Motion
|
|
4918
4906
|
motion: true
|
|
4919
4907
|
});
|
|
4920
|
-
var seedToken$1 = seedToken;
|
|
4921
4908
|
|
|
4922
4909
|
function genColorMapToken(seed, _ref) {
|
|
4923
4910
|
let {
|
|
@@ -5047,7 +5034,6 @@ const genRadius = radiusBase => {
|
|
|
5047
5034
|
borderRadiusOuter: radiusOuter
|
|
5048
5035
|
};
|
|
5049
5036
|
};
|
|
5050
|
-
var genRadius$1 = genRadius;
|
|
5051
5037
|
|
|
5052
5038
|
function genCommonMapToken(token) {
|
|
5053
5039
|
const {
|
|
@@ -5063,7 +5049,7 @@ function genCommonMapToken(token) {
|
|
|
5063
5049
|
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
|
|
5064
5050
|
// line
|
|
5065
5051
|
lineWidthBold: lineWidth + 1
|
|
5066
|
-
}, genRadius
|
|
5052
|
+
}, genRadius(borderRadius));
|
|
5067
5053
|
}
|
|
5068
5054
|
|
|
5069
5055
|
const genControlHeight = token => {
|
|
@@ -5076,7 +5062,6 @@ const genControlHeight = token => {
|
|
|
5076
5062
|
controlHeightLG: controlHeight * 1.25
|
|
5077
5063
|
};
|
|
5078
5064
|
};
|
|
5079
|
-
var genControlHeight$1 = genControlHeight;
|
|
5080
5065
|
|
|
5081
5066
|
function getLineHeight(fontSize) {
|
|
5082
5067
|
return (fontSize + 8) / fontSize;
|
|
@@ -5130,7 +5115,6 @@ const genFontMapToken = fontSize => {
|
|
|
5130
5115
|
lineHeightHeading5: lineHeights[2]
|
|
5131
5116
|
};
|
|
5132
5117
|
};
|
|
5133
|
-
var genFontMapToken$1 = genFontMapToken;
|
|
5134
5118
|
|
|
5135
5119
|
function genSizeMapToken(token) {
|
|
5136
5120
|
const {
|
|
@@ -5225,16 +5209,16 @@ function derivative(token) {
|
|
|
5225
5209
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), genColorMapToken(token, {
|
|
5226
5210
|
generateColorPalettes,
|
|
5227
5211
|
generateNeutralColorPalettes
|
|
5228
|
-
})), genFontMapToken
|
|
5212
|
+
})), genFontMapToken(token.fontSize)), genSizeMapToken(token)), genControlHeight(token)), genCommonMapToken(token));
|
|
5229
5213
|
}
|
|
5230
5214
|
|
|
5231
5215
|
const defaultTheme = createTheme(derivative);
|
|
5232
5216
|
// ================================ Context =================================
|
|
5233
5217
|
// To ensure snapshot stable. We disable hashed in test env.
|
|
5234
5218
|
const defaultConfig = {
|
|
5235
|
-
token: seedToken
|
|
5219
|
+
token: seedToken,
|
|
5236
5220
|
override: {
|
|
5237
|
-
override: seedToken
|
|
5221
|
+
override: seedToken
|
|
5238
5222
|
},
|
|
5239
5223
|
hashed: true
|
|
5240
5224
|
};
|
|
@@ -5249,7 +5233,7 @@ const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
|
|
|
5249
5233
|
return suffixCls ? `${defaultPrefixCls}-${suffixCls}` : defaultPrefixCls;
|
|
5250
5234
|
};
|
|
5251
5235
|
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.
|
|
5252
|
-
const ConfigContext = /*#__PURE__*/React
|
|
5236
|
+
const ConfigContext = /*#__PURE__*/React.createContext({
|
|
5253
5237
|
// We provide a default function for Context without provider
|
|
5254
5238
|
getPrefixCls: defaultGetPrefixCls,
|
|
5255
5239
|
iconPrefixCls: defaultIconPrefixCls
|
|
@@ -5327,35 +5311,33 @@ function registerTheme(globalPrefixCls, theme) {
|
|
|
5327
5311
|
}
|
|
5328
5312
|
}
|
|
5329
5313
|
|
|
5330
|
-
const DisabledContext = /*#__PURE__*/React
|
|
5314
|
+
const DisabledContext = /*#__PURE__*/React.createContext(false);
|
|
5331
5315
|
const DisabledContextProvider = _ref => {
|
|
5332
5316
|
let {
|
|
5333
5317
|
children,
|
|
5334
5318
|
disabled
|
|
5335
5319
|
} = _ref;
|
|
5336
|
-
const originDisabled = React
|
|
5337
|
-
return /*#__PURE__*/React
|
|
5320
|
+
const originDisabled = React.useContext(DisabledContext);
|
|
5321
|
+
return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
|
|
5338
5322
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
5339
5323
|
}, children);
|
|
5340
5324
|
};
|
|
5341
|
-
var DisabledContext$1 = DisabledContext;
|
|
5342
5325
|
|
|
5343
|
-
const SizeContext = /*#__PURE__*/React
|
|
5326
|
+
const SizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
5344
5327
|
const SizeContextProvider = _ref => {
|
|
5345
5328
|
let {
|
|
5346
5329
|
children,
|
|
5347
5330
|
size
|
|
5348
5331
|
} = _ref;
|
|
5349
|
-
const originSize = React
|
|
5350
|
-
return /*#__PURE__*/React
|
|
5332
|
+
const originSize = React.useContext(SizeContext);
|
|
5333
|
+
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
|
|
5351
5334
|
value: size || originSize
|
|
5352
5335
|
}, children);
|
|
5353
5336
|
};
|
|
5354
|
-
var SizeContext$1 = SizeContext;
|
|
5355
5337
|
|
|
5356
5338
|
function useConfig() {
|
|
5357
|
-
const componentDisabled = useContext(DisabledContext
|
|
5358
|
-
const componentSize = useContext(SizeContext
|
|
5339
|
+
const componentDisabled = useContext(DisabledContext);
|
|
5340
|
+
const componentSize = useContext(SizeContext);
|
|
5359
5341
|
return {
|
|
5360
5342
|
componentDisabled,
|
|
5361
5343
|
componentSize
|
|
@@ -5550,9 +5532,9 @@ var getCompVarPrefix = function getCompVarPrefix(component, prefix) {
|
|
|
5550
5532
|
};
|
|
5551
5533
|
|
|
5552
5534
|
function useEvent(callback) {
|
|
5553
|
-
var fnRef = React
|
|
5535
|
+
var fnRef = React.useRef();
|
|
5554
5536
|
fnRef.current = callback;
|
|
5555
|
-
var memoFn = React
|
|
5537
|
+
var memoFn = React.useCallback(function () {
|
|
5556
5538
|
var _fnRef$current;
|
|
5557
5539
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5558
5540
|
args[_key] = arguments[_key];
|
|
@@ -5568,12 +5550,12 @@ function useEvent(callback) {
|
|
|
5568
5550
|
* Developer should confirm it's safe to ignore themselves.
|
|
5569
5551
|
*/
|
|
5570
5552
|
function useSafeState(defaultValue) {
|
|
5571
|
-
var destroyRef = React
|
|
5572
|
-
var _React$useState = React
|
|
5553
|
+
var destroyRef = React.useRef(false);
|
|
5554
|
+
var _React$useState = React.useState(defaultValue),
|
|
5573
5555
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
5574
5556
|
value = _React$useState2[0],
|
|
5575
5557
|
setValue = _React$useState2[1];
|
|
5576
|
-
React
|
|
5558
|
+
React.useEffect(function () {
|
|
5577
5559
|
destroyRef.current = false;
|
|
5578
5560
|
return function () {
|
|
5579
5561
|
destroyRef.current = true;
|
|
@@ -6108,7 +6090,7 @@ function formatToken(derivativeToken) {
|
|
|
6108
6090
|
} = derivativeToken,
|
|
6109
6091
|
restToken = __rest$4(derivativeToken, ["override"]);
|
|
6110
6092
|
const overrideTokens = Object.assign({}, override);
|
|
6111
|
-
Object.keys(seedToken
|
|
6093
|
+
Object.keys(seedToken).forEach(token => {
|
|
6112
6094
|
delete overrideTokens[token];
|
|
6113
6095
|
});
|
|
6114
6096
|
const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
|
|
@@ -6361,7 +6343,7 @@ function useToken() {
|
|
|
6361
6343
|
} = React__default.useContext(DesignTokenContext);
|
|
6362
6344
|
const salt = `${version$1}-${hashed || ''}`;
|
|
6363
6345
|
const mergedTheme = theme || defaultTheme;
|
|
6364
|
-
const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken
|
|
6346
|
+
const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken, rootDesignToken], {
|
|
6365
6347
|
salt,
|
|
6366
6348
|
override,
|
|
6367
6349
|
getComputedToken,
|
|
@@ -6482,7 +6464,6 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
|
|
|
6482
6464
|
})
|
|
6483
6465
|
}]);
|
|
6484
6466
|
};
|
|
6485
|
-
var useStyle$2 = useResetIconStyle;
|
|
6486
6467
|
|
|
6487
6468
|
const {
|
|
6488
6469
|
genStyleHooks,
|
|
@@ -6516,7 +6497,7 @@ const {
|
|
|
6516
6497
|
iconPrefixCls
|
|
6517
6498
|
} = useContext(ConfigContext);
|
|
6518
6499
|
// Generate style for icons
|
|
6519
|
-
|
|
6500
|
+
useResetIconStyle(iconPrefixCls, csp);
|
|
6520
6501
|
return csp !== null && csp !== void 0 ? csp : {};
|
|
6521
6502
|
},
|
|
6522
6503
|
getResetStyles: token => [{
|
|
@@ -6526,13 +6507,12 @@ const {
|
|
|
6526
6507
|
getCompUnitless: () => unitless
|
|
6527
6508
|
});
|
|
6528
6509
|
|
|
6529
|
-
const fullClone$1 = Object.assign({}, React
|
|
6510
|
+
const fullClone$1 = Object.assign({}, React);
|
|
6530
6511
|
const {
|
|
6531
6512
|
useId
|
|
6532
6513
|
} = fullClone$1;
|
|
6533
6514
|
const useEmptyId = () => '';
|
|
6534
6515
|
const useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;
|
|
6535
|
-
var useThemeKey$1 = useThemeKey;
|
|
6536
6516
|
|
|
6537
6517
|
function useTheme(theme, parentTheme, config) {
|
|
6538
6518
|
var _a, _b;
|
|
@@ -6542,7 +6522,7 @@ function useTheme(theme, parentTheme, config) {
|
|
|
6542
6522
|
hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : defaultConfig.hashed,
|
|
6543
6523
|
cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
|
|
6544
6524
|
}) : parentTheme;
|
|
6545
|
-
const themeKey = useThemeKey
|
|
6525
|
+
const themeKey = useThemeKey();
|
|
6546
6526
|
if (process.env.NODE_ENV !== 'production') {
|
|
6547
6527
|
const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;
|
|
6548
6528
|
const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);
|
|
@@ -6577,11 +6557,11 @@ function useTheme(theme, parentTheme, config) {
|
|
|
6577
6557
|
}
|
|
6578
6558
|
|
|
6579
6559
|
var _excluded$3 = ["children"];
|
|
6580
|
-
var Context = /*#__PURE__*/React
|
|
6560
|
+
var Context = /*#__PURE__*/React.createContext({});
|
|
6581
6561
|
function MotionProvider(_ref) {
|
|
6582
6562
|
var children = _ref.children,
|
|
6583
6563
|
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
6584
|
-
return /*#__PURE__*/React
|
|
6564
|
+
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
6585
6565
|
value: props
|
|
6586
6566
|
}, children);
|
|
6587
6567
|
}
|
|
@@ -6600,7 +6580,7 @@ var DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
6600
6580
|
}
|
|
6601
6581
|
}]);
|
|
6602
6582
|
return DomWrapper;
|
|
6603
|
-
}(React
|
|
6583
|
+
}(React.Component);
|
|
6604
6584
|
|
|
6605
6585
|
/**
|
|
6606
6586
|
* Same as React.useState but will always get latest state.
|
|
@@ -6608,12 +6588,12 @@ var DomWrapper = /*#__PURE__*/function (_React$Component) {
|
|
|
6608
6588
|
* e.g. onTransitionEnd trigger multiple event at once will be merged state update in React.
|
|
6609
6589
|
*/
|
|
6610
6590
|
function useSyncState(defaultValue) {
|
|
6611
|
-
var _React$useReducer = React
|
|
6591
|
+
var _React$useReducer = React.useReducer(function (x) {
|
|
6612
6592
|
return x + 1;
|
|
6613
6593
|
}, 0),
|
|
6614
6594
|
_React$useReducer2 = _slicedToArray(_React$useReducer, 2),
|
|
6615
6595
|
forceUpdate = _React$useReducer2[1];
|
|
6616
|
-
var currentValueRef = React
|
|
6596
|
+
var currentValueRef = React.useRef(defaultValue);
|
|
6617
6597
|
var getValue = useEvent(function () {
|
|
6618
6598
|
return currentValueRef.current;
|
|
6619
6599
|
});
|
|
@@ -6732,7 +6712,7 @@ var useDomMotionEvents = (function (onInternalMotionEnd) {
|
|
|
6732
6712
|
}
|
|
6733
6713
|
|
|
6734
6714
|
// Clean up when removed
|
|
6735
|
-
React
|
|
6715
|
+
React.useEffect(function () {
|
|
6736
6716
|
return function () {
|
|
6737
6717
|
removeMotionEvents(cacheElementRef.current);
|
|
6738
6718
|
};
|
|
@@ -6744,7 +6724,7 @@ var useDomMotionEvents = (function (onInternalMotionEnd) {
|
|
|
6744
6724
|
var useIsomorphicLayoutEffect = canUseDom() ? useLayoutEffect$1 : useEffect;
|
|
6745
6725
|
|
|
6746
6726
|
var useNextFrame = (function () {
|
|
6747
|
-
var nextFrameRef = React
|
|
6727
|
+
var nextFrameRef = React.useRef(null);
|
|
6748
6728
|
function cancelNextFrame() {
|
|
6749
6729
|
wrapperRaf.cancel(nextFrameRef.current);
|
|
6750
6730
|
}
|
|
@@ -6764,7 +6744,7 @@ var useNextFrame = (function () {
|
|
|
6764
6744
|
});
|
|
6765
6745
|
nextFrameRef.current = nextFrameId;
|
|
6766
6746
|
}
|
|
6767
|
-
React
|
|
6747
|
+
React.useEffect(function () {
|
|
6768
6748
|
return function () {
|
|
6769
6749
|
cancelNextFrame();
|
|
6770
6750
|
};
|
|
@@ -6821,7 +6801,7 @@ var useStepQueue = (function (status, prepareOnly, callback) {
|
|
|
6821
6801
|
}
|
|
6822
6802
|
}
|
|
6823
6803
|
}, [status, step]);
|
|
6824
|
-
React
|
|
6804
|
+
React.useEffect(function () {
|
|
6825
6805
|
return function () {
|
|
6826
6806
|
cancelNextFrame();
|
|
6827
6807
|
};
|
|
@@ -6929,7 +6909,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
6929
6909
|
return {};
|
|
6930
6910
|
}
|
|
6931
6911
|
};
|
|
6932
|
-
var eventHandlers = React
|
|
6912
|
+
var eventHandlers = React.useMemo(function () {
|
|
6933
6913
|
return getEventHandlers(currentStatus);
|
|
6934
6914
|
}, [currentStatus]);
|
|
6935
6915
|
var _useStepQueue = useStepQueue(currentStatus, !supportMotion, function (newStep) {
|
|
@@ -7030,7 +7010,7 @@ function useStatus(supportMotion, visible, getElement, _ref) {
|
|
|
7030
7010
|
}, []);
|
|
7031
7011
|
|
|
7032
7012
|
// Trigger `onVisibleChanged`
|
|
7033
|
-
var firstMountChangeRef = React
|
|
7013
|
+
var firstMountChangeRef = React.useRef(false);
|
|
7034
7014
|
useEffect(function () {
|
|
7035
7015
|
// [visible & motion not end] => [!visible & motion end] still need trigger onVisibleChanged
|
|
7036
7016
|
if (asyncVisible) {
|
|
@@ -7067,7 +7047,7 @@ function genCSSMotion(config) {
|
|
|
7067
7047
|
function isSupportTransition(props, contextMotion) {
|
|
7068
7048
|
return !!(props.motionName && transitionSupport && contextMotion !== false);
|
|
7069
7049
|
}
|
|
7070
|
-
var CSSMotion = /*#__PURE__*/React
|
|
7050
|
+
var CSSMotion = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7071
7051
|
var _props$visible = props.visible,
|
|
7072
7052
|
visible = _props$visible === void 0 ? true : _props$visible,
|
|
7073
7053
|
_props$removeOnLeave = props.removeOnLeave,
|
|
@@ -7077,7 +7057,7 @@ function genCSSMotion(config) {
|
|
|
7077
7057
|
motionName = props.motionName,
|
|
7078
7058
|
leavedClassName = props.leavedClassName,
|
|
7079
7059
|
eventProps = props.eventProps;
|
|
7080
|
-
var _React$useContext = React
|
|
7060
|
+
var _React$useContext = React.useContext(Context),
|
|
7081
7061
|
contextMotion = _React$useContext.motion;
|
|
7082
7062
|
var supportMotion = isSupportTransition(props, contextMotion);
|
|
7083
7063
|
|
|
@@ -7106,13 +7086,13 @@ function genCSSMotion(config) {
|
|
|
7106
7086
|
|
|
7107
7087
|
// Record whether content has rendered
|
|
7108
7088
|
// Will return null for un-rendered even when `removeOnLeave={false}`
|
|
7109
|
-
var renderedRef = React
|
|
7089
|
+
var renderedRef = React.useRef(mergedVisible);
|
|
7110
7090
|
if (mergedVisible) {
|
|
7111
7091
|
renderedRef.current = true;
|
|
7112
7092
|
}
|
|
7113
7093
|
|
|
7114
7094
|
// ====================== Refs ======================
|
|
7115
|
-
var setNodeRef = React
|
|
7095
|
+
var setNodeRef = React.useCallback(function (node) {
|
|
7116
7096
|
nodeRef.current = node;
|
|
7117
7097
|
fillRef(ref, node);
|
|
7118
7098
|
}, [ref]);
|
|
@@ -7160,16 +7140,16 @@ function genCSSMotion(config) {
|
|
|
7160
7140
|
}
|
|
7161
7141
|
|
|
7162
7142
|
// Auto inject ref if child node not have `ref` props
|
|
7163
|
-
if ( /*#__PURE__*/React
|
|
7143
|
+
if ( /*#__PURE__*/React.isValidElement(motionChildren) && supportRef(motionChildren)) {
|
|
7164
7144
|
var _ref = motionChildren,
|
|
7165
7145
|
originNodeRef = _ref.ref;
|
|
7166
7146
|
if (!originNodeRef) {
|
|
7167
|
-
motionChildren = /*#__PURE__*/React
|
|
7147
|
+
motionChildren = /*#__PURE__*/React.cloneElement(motionChildren, {
|
|
7168
7148
|
ref: setNodeRef
|
|
7169
7149
|
});
|
|
7170
7150
|
}
|
|
7171
7151
|
}
|
|
7172
|
-
return /*#__PURE__*/React
|
|
7152
|
+
return /*#__PURE__*/React.createElement(DomWrapper, {
|
|
7173
7153
|
ref: wrapperNodeRef
|
|
7174
7154
|
}, motionChildren);
|
|
7175
7155
|
});
|
|
@@ -7333,18 +7313,18 @@ function genCSSMotionList(transitionSupport) {
|
|
|
7333
7313
|
_onVisibleChanged = _this$props.onVisibleChanged,
|
|
7334
7314
|
onAllRemoved = _this$props.onAllRemoved,
|
|
7335
7315
|
restProps = _objectWithoutProperties(_this$props, _excluded$2);
|
|
7336
|
-
var Component = component || React
|
|
7316
|
+
var Component = component || React.Fragment;
|
|
7337
7317
|
var motionProps = {};
|
|
7338
7318
|
MOTION_PROP_NAMES.forEach(function (prop) {
|
|
7339
7319
|
motionProps[prop] = restProps[prop];
|
|
7340
7320
|
delete restProps[prop];
|
|
7341
7321
|
});
|
|
7342
7322
|
delete restProps.keys;
|
|
7343
|
-
return /*#__PURE__*/React
|
|
7323
|
+
return /*#__PURE__*/React.createElement(Component, restProps, keyEntities.map(function (_ref2, index) {
|
|
7344
7324
|
var status = _ref2.status,
|
|
7345
7325
|
eventProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
7346
7326
|
var visible = status === STATUS_ADD || status === STATUS_KEEP;
|
|
7347
|
-
return /*#__PURE__*/React
|
|
7327
|
+
return /*#__PURE__*/React.createElement(CSSMotion$1, _extends({}, motionProps, {
|
|
7348
7328
|
key: eventProps.key,
|
|
7349
7329
|
visible: visible,
|
|
7350
7330
|
eventProps: eventProps,
|
|
@@ -7390,7 +7370,7 @@ function genCSSMotionList(transitionSupport) {
|
|
|
7390
7370
|
}
|
|
7391
7371
|
}]);
|
|
7392
7372
|
return CSSMotionList;
|
|
7393
|
-
}(React
|
|
7373
|
+
}(React.Component);
|
|
7394
7374
|
_defineProperty(CSSMotionList, "defaultProps", {
|
|
7395
7375
|
component: 'div'
|
|
7396
7376
|
});
|
|
@@ -7406,10 +7386,10 @@ function MotionWrapper(props) {
|
|
|
7406
7386
|
const {
|
|
7407
7387
|
motion
|
|
7408
7388
|
} = token;
|
|
7409
|
-
const needWrapMotionProviderRef = React
|
|
7389
|
+
const needWrapMotionProviderRef = React.useRef(false);
|
|
7410
7390
|
needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;
|
|
7411
7391
|
if (needWrapMotionProviderRef.current) {
|
|
7412
|
-
return /*#__PURE__*/React
|
|
7392
|
+
return /*#__PURE__*/React.createElement(MotionProvider, {
|
|
7413
7393
|
motion: motion
|
|
7414
7394
|
}, children);
|
|
7415
7395
|
}
|
|
@@ -7420,7 +7400,7 @@ function MotionWrapper(props) {
|
|
|
7420
7400
|
* Warning for ConfigProviderProps.
|
|
7421
7401
|
* This will be empty function in production.
|
|
7422
7402
|
*/
|
|
7423
|
-
const PropWarning = /*#__PURE__*/React
|
|
7403
|
+
const PropWarning = /*#__PURE__*/React.memo(_ref => {
|
|
7424
7404
|
let {
|
|
7425
7405
|
dropdownMatchSelectWidth
|
|
7426
7406
|
} = _ref;
|
|
@@ -7555,7 +7535,7 @@ const ProviderChildren = props => {
|
|
|
7555
7535
|
treeSelect
|
|
7556
7536
|
} = props;
|
|
7557
7537
|
// =================================== Context ===================================
|
|
7558
|
-
const getPrefixCls = React
|
|
7538
|
+
const getPrefixCls = React.useCallback((suffixCls, customizePrefixCls) => {
|
|
7559
7539
|
const {
|
|
7560
7540
|
prefixCls
|
|
7561
7541
|
} = props;
|
|
@@ -7567,7 +7547,7 @@ const ProviderChildren = props => {
|
|
|
7567
7547
|
}, [parentContext.getPrefixCls, props.prefixCls]);
|
|
7568
7548
|
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;
|
|
7569
7549
|
const csp = customCsp || parentContext.csp;
|
|
7570
|
-
|
|
7550
|
+
useResetIconStyle(iconPrefixCls, csp);
|
|
7571
7551
|
const mergedTheme = useTheme(theme, parentContext.theme, {
|
|
7572
7552
|
prefixCls: getPrefixCls('')
|
|
7573
7553
|
});
|
|
@@ -7675,42 +7655,42 @@ const ProviderChildren = props => {
|
|
|
7675
7655
|
const currentKeys = Object.keys(currentConfig);
|
|
7676
7656
|
return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);
|
|
7677
7657
|
});
|
|
7678
|
-
const memoIconContextValue = React
|
|
7658
|
+
const memoIconContextValue = React.useMemo(() => ({
|
|
7679
7659
|
prefixCls: iconPrefixCls,
|
|
7680
7660
|
csp
|
|
7681
7661
|
}), [iconPrefixCls, csp]);
|
|
7682
|
-
let childNode = /*#__PURE__*/React
|
|
7662
|
+
let childNode = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PropWarning$1, {
|
|
7683
7663
|
dropdownMatchSelectWidth: dropdownMatchSelectWidth
|
|
7684
7664
|
}), children);
|
|
7685
|
-
const validateMessages = React
|
|
7665
|
+
const validateMessages = React.useMemo(() => {
|
|
7686
7666
|
var _a, _b, _c, _d;
|
|
7687
|
-
return merge$1(((_a =
|
|
7667
|
+
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) || {});
|
|
7688
7668
|
}, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
|
|
7689
7669
|
if (Object.keys(validateMessages).length > 0) {
|
|
7690
|
-
childNode = /*#__PURE__*/React
|
|
7670
|
+
childNode = /*#__PURE__*/React.createElement(ValidateMessagesContext.Provider, {
|
|
7691
7671
|
value: validateMessages
|
|
7692
7672
|
}, childNode);
|
|
7693
7673
|
}
|
|
7694
7674
|
if (locale) {
|
|
7695
|
-
childNode = /*#__PURE__*/React
|
|
7675
|
+
childNode = /*#__PURE__*/React.createElement(LocaleProvider, {
|
|
7696
7676
|
locale: locale,
|
|
7697
7677
|
_ANT_MARK__: ANT_MARK
|
|
7698
7678
|
}, childNode);
|
|
7699
7679
|
}
|
|
7700
7680
|
if (iconPrefixCls || csp) {
|
|
7701
|
-
childNode = /*#__PURE__*/React
|
|
7681
|
+
childNode = /*#__PURE__*/React.createElement(IconContext.Provider, {
|
|
7702
7682
|
value: memoIconContextValue
|
|
7703
7683
|
}, childNode);
|
|
7704
7684
|
}
|
|
7705
7685
|
if (componentSize) {
|
|
7706
|
-
childNode = /*#__PURE__*/React
|
|
7686
|
+
childNode = /*#__PURE__*/React.createElement(SizeContextProvider, {
|
|
7707
7687
|
size: componentSize
|
|
7708
7688
|
}, childNode);
|
|
7709
7689
|
}
|
|
7710
7690
|
// =================================== Motion ===================================
|
|
7711
|
-
childNode = /*#__PURE__*/React
|
|
7691
|
+
childNode = /*#__PURE__*/React.createElement(MotionWrapper, null, childNode);
|
|
7712
7692
|
// ================================ Dynamic theme ================================
|
|
7713
|
-
const memoTheme = React
|
|
7693
|
+
const memoTheme = React.useMemo(() => {
|
|
7714
7694
|
const _a = mergedTheme || {},
|
|
7715
7695
|
{
|
|
7716
7696
|
algorithm,
|
|
@@ -7734,7 +7714,7 @@ const ProviderChildren = props => {
|
|
|
7734
7714
|
}
|
|
7735
7715
|
parsedComponents[componentName] = parsedToken;
|
|
7736
7716
|
});
|
|
7737
|
-
const mergedToken = Object.assign(Object.assign({}, seedToken
|
|
7717
|
+
const mergedToken = Object.assign(Object.assign({}, seedToken), token);
|
|
7738
7718
|
return Object.assign(Object.assign({}, rest), {
|
|
7739
7719
|
theme: themeObj,
|
|
7740
7720
|
token: mergedToken,
|
|
@@ -7746,42 +7726,42 @@ const ProviderChildren = props => {
|
|
|
7746
7726
|
});
|
|
7747
7727
|
}, [mergedTheme]);
|
|
7748
7728
|
if (theme) {
|
|
7749
|
-
childNode = /*#__PURE__*/React
|
|
7729
|
+
childNode = /*#__PURE__*/React.createElement(DesignTokenContext.Provider, {
|
|
7750
7730
|
value: memoTheme
|
|
7751
7731
|
}, childNode);
|
|
7752
7732
|
}
|
|
7753
7733
|
// ================================== Warning ===================================
|
|
7754
7734
|
if (memoedConfig.warning) {
|
|
7755
|
-
childNode = /*#__PURE__*/React
|
|
7735
|
+
childNode = /*#__PURE__*/React.createElement(WarningContext.Provider, {
|
|
7756
7736
|
value: memoedConfig.warning
|
|
7757
7737
|
}, childNode);
|
|
7758
7738
|
}
|
|
7759
7739
|
// =================================== Render ===================================
|
|
7760
7740
|
if (componentDisabled !== undefined) {
|
|
7761
|
-
childNode = /*#__PURE__*/React
|
|
7741
|
+
childNode = /*#__PURE__*/React.createElement(DisabledContextProvider, {
|
|
7762
7742
|
disabled: componentDisabled
|
|
7763
7743
|
}, childNode);
|
|
7764
7744
|
}
|
|
7765
|
-
return /*#__PURE__*/React
|
|
7745
|
+
return /*#__PURE__*/React.createElement(ConfigContext.Provider, {
|
|
7766
7746
|
value: memoedConfig
|
|
7767
7747
|
}, childNode);
|
|
7768
7748
|
};
|
|
7769
7749
|
const ConfigProvider = props => {
|
|
7770
|
-
const context = React
|
|
7771
|
-
const antLocale = React
|
|
7772
|
-
return /*#__PURE__*/React
|
|
7750
|
+
const context = React.useContext(ConfigContext);
|
|
7751
|
+
const antLocale = React.useContext(LocaleContext);
|
|
7752
|
+
return /*#__PURE__*/React.createElement(ProviderChildren, Object.assign({
|
|
7773
7753
|
parentContext: context,
|
|
7774
7754
|
legacyLocale: antLocale
|
|
7775
7755
|
}, props));
|
|
7776
7756
|
};
|
|
7777
7757
|
ConfigProvider.ConfigContext = ConfigContext;
|
|
7778
|
-
ConfigProvider.SizeContext = SizeContext
|
|
7758
|
+
ConfigProvider.SizeContext = SizeContext;
|
|
7779
7759
|
ConfigProvider.config = setGlobalConfig;
|
|
7780
7760
|
ConfigProvider.useConfig = useConfig;
|
|
7781
7761
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
|
7782
7762
|
get: () => {
|
|
7783
7763
|
process.env.NODE_ENV !== "production" ? warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
|
|
7784
|
-
return SizeContext
|
|
7764
|
+
return SizeContext;
|
|
7785
7765
|
}
|
|
7786
7766
|
});
|
|
7787
7767
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7860,7 +7840,7 @@ function normalizeTwoToneColors(twoToneColor) {
|
|
|
7860
7840
|
}
|
|
7861
7841
|
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";
|
|
7862
7842
|
var useInsertStyles = function useInsertStyles(eleRef) {
|
|
7863
|
-
var _useContext = useContext(
|
|
7843
|
+
var _useContext = useContext(IconContext),
|
|
7864
7844
|
csp = _useContext.csp,
|
|
7865
7845
|
prefixCls = _useContext.prefixCls;
|
|
7866
7846
|
var mergedStyleStr = iconStyles;
|
|
@@ -7902,7 +7882,7 @@ var IconBase = function IconBase(props) {
|
|
|
7902
7882
|
primaryColor = props.primaryColor,
|
|
7903
7883
|
secondaryColor = props.secondaryColor,
|
|
7904
7884
|
restProps = _objectWithoutProperties(props, _excluded$1);
|
|
7905
|
-
var svgRef = React
|
|
7885
|
+
var svgRef = React.useRef();
|
|
7906
7886
|
var colors = twoToneColorPalette;
|
|
7907
7887
|
if (primaryColor) {
|
|
7908
7888
|
colors = {
|
|
@@ -7937,20 +7917,19 @@ var IconBase = function IconBase(props) {
|
|
|
7937
7917
|
IconBase.displayName = 'IconReact';
|
|
7938
7918
|
IconBase.getTwoToneColors = getTwoToneColors;
|
|
7939
7919
|
IconBase.setTwoToneColors = setTwoToneColors;
|
|
7940
|
-
var ReactIcon = IconBase;
|
|
7941
7920
|
|
|
7942
7921
|
function setTwoToneColor(twoToneColor) {
|
|
7943
7922
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
7944
7923
|
_normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
|
|
7945
7924
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
7946
7925
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
7947
|
-
return
|
|
7926
|
+
return IconBase.setTwoToneColors({
|
|
7948
7927
|
primaryColor: primaryColor,
|
|
7949
7928
|
secondaryColor: secondaryColor
|
|
7950
7929
|
});
|
|
7951
7930
|
}
|
|
7952
7931
|
function getTwoToneColor() {
|
|
7953
|
-
var colors =
|
|
7932
|
+
var colors = IconBase.getTwoToneColors();
|
|
7954
7933
|
if (!colors.calculated) {
|
|
7955
7934
|
return colors.primaryColor;
|
|
7956
7935
|
}
|
|
@@ -7964,7 +7943,7 @@ setTwoToneColor(blue.primary);
|
|
|
7964
7943
|
|
|
7965
7944
|
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757#issuecomment-488848720
|
|
7966
7945
|
|
|
7967
|
-
var Icon = /*#__PURE__*/React
|
|
7946
|
+
var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
7968
7947
|
var className = props.className,
|
|
7969
7948
|
icon = props.icon,
|
|
7970
7949
|
spin = props.spin,
|
|
@@ -7973,7 +7952,7 @@ var Icon = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
7973
7952
|
onClick = props.onClick,
|
|
7974
7953
|
twoToneColor = props.twoToneColor,
|
|
7975
7954
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
7976
|
-
var _React$useContext = React
|
|
7955
|
+
var _React$useContext = React.useContext(IconContext),
|
|
7977
7956
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
7978
7957
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
|
|
7979
7958
|
rootClassName = _React$useContext.rootClassName;
|
|
@@ -7990,7 +7969,7 @@ var Icon = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
7990
7969
|
_normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
|
|
7991
7970
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
7992
7971
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
7993
|
-
return /*#__PURE__*/React
|
|
7972
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
7994
7973
|
role: "img",
|
|
7995
7974
|
"aria-label": icon.name
|
|
7996
7975
|
}, restProps, {
|
|
@@ -7998,7 +7977,7 @@ var Icon = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
7998
7977
|
tabIndex: iconTabIndex,
|
|
7999
7978
|
onClick: onClick,
|
|
8000
7979
|
className: classString
|
|
8001
|
-
}), /*#__PURE__*/React
|
|
7980
|
+
}), /*#__PURE__*/React.createElement(IconBase, {
|
|
8002
7981
|
icon: icon,
|
|
8003
7982
|
primaryColor: primaryColor,
|
|
8004
7983
|
secondaryColor: secondaryColor,
|
|
@@ -8008,7 +7987,6 @@ var Icon = /*#__PURE__*/React$1.forwardRef(function (props, ref) {
|
|
|
8008
7987
|
Icon.displayName = 'AntdIcon';
|
|
8009
7988
|
Icon.getTwoToneColor = getTwoToneColor;
|
|
8010
7989
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
8011
|
-
var AntdIcon = Icon;
|
|
8012
7990
|
|
|
8013
7991
|
function isFragment(child) {
|
|
8014
7992
|
return child && /*#__PURE__*/React__default.isValidElement(child) && child.type === React__default.Fragment;
|
|
@@ -8024,22 +8002,20 @@ function cloneElement(element, props) {
|
|
|
8024
8002
|
}
|
|
8025
8003
|
|
|
8026
8004
|
// This icon file is generated automatically.
|
|
8027
|
-
var LoadingOutlined$
|
|
8028
|
-
var LoadingOutlinedSvg = LoadingOutlined$2;
|
|
8005
|
+
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" };
|
|
8029
8006
|
|
|
8030
8007
|
var LoadingOutlined = function LoadingOutlined(props, ref) {
|
|
8031
|
-
return /*#__PURE__*/React
|
|
8008
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
8032
8009
|
ref: ref,
|
|
8033
|
-
icon:
|
|
8010
|
+
icon: LoadingOutlined$1
|
|
8034
8011
|
}));
|
|
8035
8012
|
};
|
|
8036
8013
|
|
|
8037
8014
|
/** */
|
|
8038
|
-
var RefIcon = /*#__PURE__*/React
|
|
8015
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);
|
|
8039
8016
|
if (process.env.NODE_ENV !== 'production') {
|
|
8040
8017
|
RefIcon.displayName = 'LoadingOutlined';
|
|
8041
8018
|
}
|
|
8042
|
-
var LoadingOutlined$1 = RefIcon;
|
|
8043
8019
|
|
|
8044
8020
|
function _regeneratorRuntime() {
|
|
8045
8021
|
_regeneratorRuntime = function _regeneratorRuntime() {
|
|
@@ -8561,14 +8537,14 @@ const WaveEffect = props => {
|
|
|
8561
8537
|
target,
|
|
8562
8538
|
component
|
|
8563
8539
|
} = props;
|
|
8564
|
-
const divRef = React
|
|
8565
|
-
const [color, setWaveColor] = React
|
|
8566
|
-
const [borderRadius, setBorderRadius] = React
|
|
8567
|
-
const [left, setLeft] = React
|
|
8568
|
-
const [top, setTop] = React
|
|
8569
|
-
const [width, setWidth] = React
|
|
8570
|
-
const [height, setHeight] = React
|
|
8571
|
-
const [enabled, setEnabled] = React
|
|
8540
|
+
const divRef = React.useRef(null);
|
|
8541
|
+
const [color, setWaveColor] = React.useState(null);
|
|
8542
|
+
const [borderRadius, setBorderRadius] = React.useState([]);
|
|
8543
|
+
const [left, setLeft] = React.useState(0);
|
|
8544
|
+
const [top, setTop] = React.useState(0);
|
|
8545
|
+
const [width, setWidth] = React.useState(0);
|
|
8546
|
+
const [height, setHeight] = React.useState(0);
|
|
8547
|
+
const [enabled, setEnabled] = React.useState(false);
|
|
8572
8548
|
const waveStyle = {
|
|
8573
8549
|
left,
|
|
8574
8550
|
top,
|
|
@@ -8602,7 +8578,7 @@ const WaveEffect = props => {
|
|
|
8602
8578
|
} = nodeStyle;
|
|
8603
8579
|
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
|
|
8604
8580
|
}
|
|
8605
|
-
React
|
|
8581
|
+
React.useEffect(() => {
|
|
8606
8582
|
if (target) {
|
|
8607
8583
|
// We need delay to check position here
|
|
8608
8584
|
// since UI may change after click
|
|
@@ -8626,7 +8602,7 @@ const WaveEffect = props => {
|
|
|
8626
8602
|
return null;
|
|
8627
8603
|
}
|
|
8628
8604
|
const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(TARGET_CLS));
|
|
8629
|
-
return /*#__PURE__*/React
|
|
8605
|
+
return /*#__PURE__*/React.createElement(CSSMotion, {
|
|
8630
8606
|
visible: true,
|
|
8631
8607
|
motionAppear: true,
|
|
8632
8608
|
motionName: "wave-motion",
|
|
@@ -8645,7 +8621,7 @@ const WaveEffect = props => {
|
|
|
8645
8621
|
let {
|
|
8646
8622
|
className: motionClassName
|
|
8647
8623
|
} = _ref;
|
|
8648
|
-
return /*#__PURE__*/React
|
|
8624
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
8649
8625
|
ref: composeRef(divRef, ref),
|
|
8650
8626
|
className: classNames(className, motionClassName, {
|
|
8651
8627
|
'wave-quick': isSmallComponent
|
|
@@ -8669,16 +8645,15 @@ const showWaveEffect = (target, info) => {
|
|
|
8669
8645
|
holder.style.left = '0px';
|
|
8670
8646
|
holder.style.top = '0px';
|
|
8671
8647
|
target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
|
|
8672
|
-
render(/*#__PURE__*/React
|
|
8648
|
+
render(/*#__PURE__*/React.createElement(WaveEffect, Object.assign({}, info, {
|
|
8673
8649
|
target: target
|
|
8674
8650
|
})), holder);
|
|
8675
8651
|
};
|
|
8676
|
-
var showWaveEffect$1 = showWaveEffect;
|
|
8677
8652
|
|
|
8678
8653
|
const useWave = (nodeRef, className, component) => {
|
|
8679
8654
|
const {
|
|
8680
8655
|
wave
|
|
8681
|
-
} = React
|
|
8656
|
+
} = React.useContext(ConfigContext);
|
|
8682
8657
|
const [, token, hashId] = useToken();
|
|
8683
8658
|
const showWave = useEvent(event => {
|
|
8684
8659
|
const node = nodeRef.current;
|
|
@@ -8690,7 +8665,7 @@ const useWave = (nodeRef, className, component) => {
|
|
|
8690
8665
|
showEffect
|
|
8691
8666
|
} = wave || {};
|
|
8692
8667
|
// Customize wave effect
|
|
8693
|
-
(showEffect || showWaveEffect
|
|
8668
|
+
(showEffect || showWaveEffect)(targetNode, {
|
|
8694
8669
|
className,
|
|
8695
8670
|
token,
|
|
8696
8671
|
component,
|
|
@@ -8698,7 +8673,7 @@ const useWave = (nodeRef, className, component) => {
|
|
|
8698
8673
|
hashId
|
|
8699
8674
|
});
|
|
8700
8675
|
});
|
|
8701
|
-
const rafId = React
|
|
8676
|
+
const rafId = React.useRef();
|
|
8702
8677
|
// Merge trigger event into one for each frame
|
|
8703
8678
|
const showDebounceWave = event => {
|
|
8704
8679
|
wrapperRaf.cancel(rafId.current);
|
|
@@ -8708,7 +8683,6 @@ const useWave = (nodeRef, className, component) => {
|
|
|
8708
8683
|
};
|
|
8709
8684
|
return showDebounceWave;
|
|
8710
8685
|
};
|
|
8711
|
-
var useWave$1 = useWave;
|
|
8712
8686
|
|
|
8713
8687
|
const Wave = props => {
|
|
8714
8688
|
const {
|
|
@@ -8724,7 +8698,7 @@ const Wave = props => {
|
|
|
8724
8698
|
const prefixCls = getPrefixCls('wave');
|
|
8725
8699
|
const [, hashId] = useStyle$1(prefixCls);
|
|
8726
8700
|
// =============================== Wave ===============================
|
|
8727
|
-
const showWave = useWave
|
|
8701
|
+
const showWave = useWave(containerRef, classNames(prefixCls, hashId), component);
|
|
8728
8702
|
// ============================== Effect ==============================
|
|
8729
8703
|
React__default.useEffect(() => {
|
|
8730
8704
|
const node = containerRef.current;
|
|
@@ -8759,10 +8733,9 @@ const Wave = props => {
|
|
|
8759
8733
|
if (process.env.NODE_ENV !== 'production') {
|
|
8760
8734
|
Wave.displayName = 'Wave';
|
|
8761
8735
|
}
|
|
8762
|
-
var Wave$1 = Wave;
|
|
8763
8736
|
|
|
8764
8737
|
const useSize = customSize => {
|
|
8765
|
-
const size = React__default.useContext(SizeContext
|
|
8738
|
+
const size = React__default.useContext(SizeContext);
|
|
8766
8739
|
const mergedSize = React__default.useMemo(() => {
|
|
8767
8740
|
if (!customSize) {
|
|
8768
8741
|
return size;
|
|
@@ -8777,7 +8750,6 @@ const useSize = customSize => {
|
|
|
8777
8750
|
}, [customSize, size]);
|
|
8778
8751
|
return mergedSize;
|
|
8779
8752
|
};
|
|
8780
|
-
var useSize$1 = useSize;
|
|
8781
8753
|
|
|
8782
8754
|
undefined && undefined.__rest || function (s, e) {
|
|
8783
8755
|
var t = {};
|
|
@@ -8787,10 +8759,10 @@ undefined && undefined.__rest || function (s, e) {
|
|
|
8787
8759
|
}
|
|
8788
8760
|
return t;
|
|
8789
8761
|
};
|
|
8790
|
-
const SpaceCompactItemContext = /*#__PURE__*/React
|
|
8762
|
+
const SpaceCompactItemContext = /*#__PURE__*/React.createContext(null);
|
|
8791
8763
|
const useCompactItemContext = (prefixCls, direction) => {
|
|
8792
|
-
const compactItemContext = React
|
|
8793
|
-
const compactItemClassnames = React
|
|
8764
|
+
const compactItemContext = React.useContext(SpaceCompactItemContext);
|
|
8765
|
+
const compactItemClassnames = React.useMemo(() => {
|
|
8794
8766
|
if (!compactItemContext) {
|
|
8795
8767
|
return '';
|
|
8796
8768
|
}
|
|
@@ -8821,12 +8793,12 @@ var __rest$1 = undefined && undefined.__rest || function (s, e) {
|
|
|
8821
8793
|
}
|
|
8822
8794
|
return t;
|
|
8823
8795
|
};
|
|
8824
|
-
const GroupSizeContext = /*#__PURE__*/React
|
|
8796
|
+
const GroupSizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
8825
8797
|
const ButtonGroup = props => {
|
|
8826
8798
|
const {
|
|
8827
8799
|
getPrefixCls,
|
|
8828
8800
|
direction
|
|
8829
|
-
} = React
|
|
8801
|
+
} = React.useContext(ConfigContext);
|
|
8830
8802
|
const {
|
|
8831
8803
|
prefixCls: customizePrefixCls,
|
|
8832
8804
|
size,
|
|
@@ -8853,13 +8825,12 @@ const ButtonGroup = props => {
|
|
|
8853
8825
|
[`${prefixCls}-${sizeCls}`]: sizeCls,
|
|
8854
8826
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
8855
8827
|
}, className, hashId);
|
|
8856
|
-
return /*#__PURE__*/React
|
|
8828
|
+
return /*#__PURE__*/React.createElement(GroupSizeContext.Provider, {
|
|
8857
8829
|
value: size
|
|
8858
|
-
}, /*#__PURE__*/React
|
|
8830
|
+
}, /*#__PURE__*/React.createElement("div", Object.assign({}, others, {
|
|
8859
8831
|
className: classes
|
|
8860
8832
|
})));
|
|
8861
8833
|
};
|
|
8862
|
-
var Group = ButtonGroup;
|
|
8863
8834
|
|
|
8864
8835
|
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
|
8865
8836
|
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
|
@@ -8919,7 +8890,6 @@ const IconWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8919
8890
|
style: style
|
|
8920
8891
|
}, children);
|
|
8921
8892
|
});
|
|
8922
|
-
var IconWrapper$1 = IconWrapper;
|
|
8923
8893
|
|
|
8924
8894
|
const InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8925
8895
|
const {
|
|
@@ -8929,12 +8899,12 @@ const InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8929
8899
|
iconClassName
|
|
8930
8900
|
} = props;
|
|
8931
8901
|
const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);
|
|
8932
|
-
return /*#__PURE__*/React__default.createElement(IconWrapper
|
|
8902
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
8933
8903
|
prefixCls: prefixCls,
|
|
8934
8904
|
className: mergedIconCls,
|
|
8935
8905
|
style: style,
|
|
8936
8906
|
ref: ref
|
|
8937
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
8907
|
+
}, /*#__PURE__*/React__default.createElement(RefIcon, {
|
|
8938
8908
|
className: iconClassName
|
|
8939
8909
|
}));
|
|
8940
8910
|
});
|
|
@@ -8990,7 +8960,6 @@ const LoadingIcon = props => {
|
|
|
8990
8960
|
});
|
|
8991
8961
|
});
|
|
8992
8962
|
};
|
|
8993
|
-
var LoadingIcon$1 = LoadingIcon;
|
|
8994
8963
|
|
|
8995
8964
|
const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
|
|
8996
8965
|
// Border
|
|
@@ -9057,7 +9026,6 @@ const genGroupStyle = token => {
|
|
|
9057
9026
|
genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
|
|
9058
9027
|
};
|
|
9059
9028
|
};
|
|
9060
|
-
var genGroupStyle$1 = genGroupStyle;
|
|
9061
9029
|
|
|
9062
9030
|
const prepareToken = token => {
|
|
9063
9031
|
const {
|
|
@@ -9450,7 +9418,7 @@ var useStyle = genStyleHooks('Button', token => {
|
|
|
9450
9418
|
// Group (type, ghost, danger, loading)
|
|
9451
9419
|
genTypeButtonStyle(buttonToken),
|
|
9452
9420
|
// Button Group
|
|
9453
|
-
genGroupStyle
|
|
9421
|
+
genGroupStyle(buttonToken)];
|
|
9454
9422
|
}, prepareComponentToken, {
|
|
9455
9423
|
unitless: {
|
|
9456
9424
|
fontWeight: true,
|
|
@@ -9678,7 +9646,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9678
9646
|
const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : button === null || button === void 0 ? void 0 : button.autoInsertSpace) !== null && _a !== void 0 ? _a : true;
|
|
9679
9647
|
const prefixCls = getPrefixCls('btn', customizePrefixCls);
|
|
9680
9648
|
const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);
|
|
9681
|
-
const disabled = useContext(DisabledContext
|
|
9649
|
+
const disabled = useContext(DisabledContext);
|
|
9682
9650
|
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
9683
9651
|
const groupSize = useContext(GroupSizeContext);
|
|
9684
9652
|
const loadingOrDelay = useMemo$1(() => getLoadingConfig(loading), [loading]);
|
|
@@ -9744,7 +9712,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9744
9712
|
small: 'sm',
|
|
9745
9713
|
middle: undefined
|
|
9746
9714
|
};
|
|
9747
|
-
const sizeFullName = useSize
|
|
9715
|
+
const sizeFullName = useSize(ctxSize => {
|
|
9748
9716
|
var _a, _b;
|
|
9749
9717
|
return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
|
|
9750
9718
|
});
|
|
@@ -9767,11 +9735,11 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9767
9735
|
const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);
|
|
9768
9736
|
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);
|
|
9769
9737
|
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) || {});
|
|
9770
|
-
const iconNode = icon && !innerLoading ? (/*#__PURE__*/React__default.createElement(IconWrapper
|
|
9738
|
+
const iconNode = icon && !innerLoading ? (/*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
9771
9739
|
prefixCls: prefixCls,
|
|
9772
9740
|
className: iconClasses,
|
|
9773
9741
|
style: iconStyle
|
|
9774
|
-
}, icon)) : (/*#__PURE__*/React__default.createElement(LoadingIcon
|
|
9742
|
+
}, icon)) : (/*#__PURE__*/React__default.createElement(LoadingIcon, {
|
|
9775
9743
|
existIcon: !!icon,
|
|
9776
9744
|
prefixCls: prefixCls,
|
|
9777
9745
|
loading: innerLoading
|
|
@@ -9801,7 +9769,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9801
9769
|
prefixCls: prefixCls
|
|
9802
9770
|
}));
|
|
9803
9771
|
if (!isUnBorderedButtonType(mergedType)) {
|
|
9804
|
-
buttonNode = /*#__PURE__*/React__default.createElement(Wave
|
|
9772
|
+
buttonNode = /*#__PURE__*/React__default.createElement(Wave, {
|
|
9805
9773
|
component: "Button",
|
|
9806
9774
|
disabled: innerLoading
|
|
9807
9775
|
}, buttonNode);
|
|
@@ -9809,16 +9777,15 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9809
9777
|
return wrapCSSVar(buttonNode);
|
|
9810
9778
|
});
|
|
9811
9779
|
const Button = InternalCompoundedButton;
|
|
9812
|
-
Button.Group =
|
|
9780
|
+
Button.Group = ButtonGroup;
|
|
9813
9781
|
Button.__ANT_BUTTON = true;
|
|
9814
9782
|
if (process.env.NODE_ENV !== 'production') {
|
|
9815
9783
|
Button.displayName = 'Button';
|
|
9816
9784
|
}
|
|
9817
|
-
var Button$1 = Button;
|
|
9818
9785
|
|
|
9819
9786
|
const FisButton = () => {
|
|
9820
|
-
return
|
|
9787
|
+
return React__default.createElement(Button, null, "Hello from my React component!");
|
|
9821
9788
|
};
|
|
9822
9789
|
|
|
9823
|
-
export { FisButton
|
|
9790
|
+
export { FisButton };
|
|
9824
9791
|
//# sourceMappingURL=index.js.map
|