fis-component 0.0.10 → 0.0.11
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 +76 -47
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +76 -47
- package/dist/esm/index.js.map +1 -1
- package/package.json +10 -2
package/dist/esm/index.js
CHANGED
|
@@ -3070,6 +3070,7 @@ function noSplit(list) {
|
|
|
3070
3070
|
});
|
|
3071
3071
|
|
|
3072
3072
|
var IconContext = /*#__PURE__*/createContext({});
|
|
3073
|
+
var Context$1 = IconContext;
|
|
3073
3074
|
|
|
3074
3075
|
function _toArray(r) {
|
|
3075
3076
|
return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest();
|
|
@@ -3282,6 +3283,7 @@ const locale$1 = {
|
|
|
3282
3283
|
placeholder: 'Select time',
|
|
3283
3284
|
rangePlaceholder: ['Start time', 'End time']
|
|
3284
3285
|
};
|
|
3286
|
+
var TimePicker = locale$1;
|
|
3285
3287
|
|
|
3286
3288
|
// Merge into a locale object
|
|
3287
3289
|
const locale = {
|
|
@@ -3297,17 +3299,20 @@ const locale = {
|
|
|
3297
3299
|
rangeMonthPlaceholder: ['Start month', 'End month'],
|
|
3298
3300
|
rangeWeekPlaceholder: ['Start week', 'End week']
|
|
3299
3301
|
}, locale$2),
|
|
3300
|
-
timePickerLocale: Object.assign({},
|
|
3302
|
+
timePickerLocale: Object.assign({}, TimePicker)
|
|
3301
3303
|
};
|
|
3304
|
+
// All settings at:
|
|
3305
|
+
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
3306
|
+
var enUS = locale;
|
|
3302
3307
|
|
|
3303
3308
|
/* eslint-disable no-template-curly-in-string */
|
|
3304
3309
|
const typeTemplate = '${label} is not a valid ${type}';
|
|
3305
3310
|
const localeValues = {
|
|
3306
3311
|
locale: 'en',
|
|
3307
3312
|
Pagination: locale$3,
|
|
3308
|
-
DatePicker:
|
|
3309
|
-
TimePicker
|
|
3310
|
-
Calendar:
|
|
3313
|
+
DatePicker: enUS,
|
|
3314
|
+
TimePicker,
|
|
3315
|
+
Calendar: enUS,
|
|
3311
3316
|
global: {
|
|
3312
3317
|
placeholder: 'Please select'
|
|
3313
3318
|
},
|
|
@@ -3442,10 +3447,11 @@ const localeValues = {
|
|
|
3442
3447
|
gradientColor: 'Gradient'
|
|
3443
3448
|
}
|
|
3444
3449
|
};
|
|
3450
|
+
var defaultLocale = localeValues;
|
|
3445
3451
|
|
|
3446
|
-
Object.assign({},
|
|
3452
|
+
Object.assign({}, defaultLocale.Modal);
|
|
3447
3453
|
let localeList = [];
|
|
3448
|
-
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale),
|
|
3454
|
+
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), defaultLocale.Modal);
|
|
3449
3455
|
function changeConfirmLocale(newLocale) {
|
|
3450
3456
|
if (newLocale) {
|
|
3451
3457
|
const cloneLocale = Object.assign({}, newLocale);
|
|
@@ -3456,10 +3462,11 @@ function changeConfirmLocale(newLocale) {
|
|
|
3456
3462
|
generateLocale();
|
|
3457
3463
|
};
|
|
3458
3464
|
}
|
|
3459
|
-
Object.assign({},
|
|
3465
|
+
Object.assign({}, defaultLocale.Modal);
|
|
3460
3466
|
}
|
|
3461
3467
|
|
|
3462
3468
|
const LocaleContext = /*#__PURE__*/createContext(undefined);
|
|
3469
|
+
var LocaleContext$1 = LocaleContext;
|
|
3463
3470
|
|
|
3464
3471
|
const ANT_MARK = 'internalMark';
|
|
3465
3472
|
const LocaleProvider = props => {
|
|
@@ -3479,13 +3486,14 @@ const LocaleProvider = props => {
|
|
|
3479
3486
|
const getMemoizedContextValue = React.useMemo(() => Object.assign(Object.assign({}, locale), {
|
|
3480
3487
|
exist: true
|
|
3481
3488
|
}), [locale]);
|
|
3482
|
-
return /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
3489
|
+
return /*#__PURE__*/React.createElement(LocaleContext$1.Provider, {
|
|
3483
3490
|
value: getMemoizedContextValue
|
|
3484
3491
|
}, children);
|
|
3485
3492
|
};
|
|
3486
3493
|
if (process.env.NODE_ENV !== 'production') {
|
|
3487
3494
|
LocaleProvider.displayName = 'LocaleProvider';
|
|
3488
3495
|
}
|
|
3496
|
+
var LocaleProvider$1 = LocaleProvider;
|
|
3489
3497
|
|
|
3490
3498
|
/**
|
|
3491
3499
|
* Take input from [0, n] and return it as [0, 1]
|
|
@@ -4910,6 +4918,7 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
4910
4918
|
// Motion
|
|
4911
4919
|
motion: true
|
|
4912
4920
|
});
|
|
4921
|
+
var seedToken$1 = seedToken;
|
|
4913
4922
|
|
|
4914
4923
|
function genColorMapToken(seed, _ref) {
|
|
4915
4924
|
let {
|
|
@@ -5039,6 +5048,7 @@ const genRadius = radiusBase => {
|
|
|
5039
5048
|
borderRadiusOuter: radiusOuter
|
|
5040
5049
|
};
|
|
5041
5050
|
};
|
|
5051
|
+
var genRadius$1 = genRadius;
|
|
5042
5052
|
|
|
5043
5053
|
function genCommonMapToken(token) {
|
|
5044
5054
|
const {
|
|
@@ -5054,7 +5064,7 @@ function genCommonMapToken(token) {
|
|
|
5054
5064
|
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
|
|
5055
5065
|
// line
|
|
5056
5066
|
lineWidthBold: lineWidth + 1
|
|
5057
|
-
}, genRadius(borderRadius));
|
|
5067
|
+
}, genRadius$1(borderRadius));
|
|
5058
5068
|
}
|
|
5059
5069
|
|
|
5060
5070
|
const genControlHeight = token => {
|
|
@@ -5067,6 +5077,7 @@ const genControlHeight = token => {
|
|
|
5067
5077
|
controlHeightLG: controlHeight * 1.25
|
|
5068
5078
|
};
|
|
5069
5079
|
};
|
|
5080
|
+
var genControlHeight$1 = genControlHeight;
|
|
5070
5081
|
|
|
5071
5082
|
function getLineHeight(fontSize) {
|
|
5072
5083
|
return (fontSize + 8) / fontSize;
|
|
@@ -5120,6 +5131,7 @@ const genFontMapToken = fontSize => {
|
|
|
5120
5131
|
lineHeightHeading5: lineHeights[2]
|
|
5121
5132
|
};
|
|
5122
5133
|
};
|
|
5134
|
+
var genFontMapToken$1 = genFontMapToken;
|
|
5123
5135
|
|
|
5124
5136
|
function genSizeMapToken(token) {
|
|
5125
5137
|
const {
|
|
@@ -5214,16 +5226,16 @@ function derivative(token) {
|
|
|
5214
5226
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), genColorMapToken(token, {
|
|
5215
5227
|
generateColorPalettes,
|
|
5216
5228
|
generateNeutralColorPalettes
|
|
5217
|
-
})), genFontMapToken(token.fontSize)), genSizeMapToken(token)), genControlHeight(token)), genCommonMapToken(token));
|
|
5229
|
+
})), genFontMapToken$1(token.fontSize)), genSizeMapToken(token)), genControlHeight$1(token)), genCommonMapToken(token));
|
|
5218
5230
|
}
|
|
5219
5231
|
|
|
5220
5232
|
const defaultTheme = createTheme(derivative);
|
|
5221
5233
|
// ================================ Context =================================
|
|
5222
5234
|
// To ensure snapshot stable. We disable hashed in test env.
|
|
5223
5235
|
const defaultConfig = {
|
|
5224
|
-
token: seedToken,
|
|
5236
|
+
token: seedToken$1,
|
|
5225
5237
|
override: {
|
|
5226
|
-
override: seedToken
|
|
5238
|
+
override: seedToken$1
|
|
5227
5239
|
},
|
|
5228
5240
|
hashed: true
|
|
5229
5241
|
};
|
|
@@ -5327,6 +5339,7 @@ const DisabledContextProvider = _ref => {
|
|
|
5327
5339
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
5328
5340
|
}, children);
|
|
5329
5341
|
};
|
|
5342
|
+
var DisabledContext$1 = DisabledContext;
|
|
5330
5343
|
|
|
5331
5344
|
const SizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
5332
5345
|
const SizeContextProvider = _ref => {
|
|
@@ -5339,10 +5352,11 @@ const SizeContextProvider = _ref => {
|
|
|
5339
5352
|
value: size || originSize
|
|
5340
5353
|
}, children);
|
|
5341
5354
|
};
|
|
5355
|
+
var SizeContext$1 = SizeContext;
|
|
5342
5356
|
|
|
5343
5357
|
function useConfig() {
|
|
5344
|
-
const componentDisabled = useContext(DisabledContext);
|
|
5345
|
-
const componentSize = useContext(SizeContext);
|
|
5358
|
+
const componentDisabled = useContext(DisabledContext$1);
|
|
5359
|
+
const componentSize = useContext(SizeContext$1);
|
|
5346
5360
|
return {
|
|
5347
5361
|
componentDisabled,
|
|
5348
5362
|
componentSize
|
|
@@ -6095,7 +6109,7 @@ function formatToken(derivativeToken) {
|
|
|
6095
6109
|
} = derivativeToken,
|
|
6096
6110
|
restToken = __rest$4(derivativeToken, ["override"]);
|
|
6097
6111
|
const overrideTokens = Object.assign({}, override);
|
|
6098
|
-
Object.keys(seedToken).forEach(token => {
|
|
6112
|
+
Object.keys(seedToken$1).forEach(token => {
|
|
6099
6113
|
delete overrideTokens[token];
|
|
6100
6114
|
});
|
|
6101
6115
|
const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
|
|
@@ -6348,7 +6362,7 @@ function useToken() {
|
|
|
6348
6362
|
} = React__default.useContext(DesignTokenContext);
|
|
6349
6363
|
const salt = `${version$1}-${hashed || ''}`;
|
|
6350
6364
|
const mergedTheme = theme || defaultTheme;
|
|
6351
|
-
const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken, rootDesignToken], {
|
|
6365
|
+
const [token, hashId, realToken] = useCacheToken(mergedTheme, [seedToken$1, rootDesignToken], {
|
|
6352
6366
|
salt,
|
|
6353
6367
|
override,
|
|
6354
6368
|
getComputedToken,
|
|
@@ -6469,6 +6483,7 @@ const useResetIconStyle = (iconPrefixCls, csp) => {
|
|
|
6469
6483
|
})
|
|
6470
6484
|
}]);
|
|
6471
6485
|
};
|
|
6486
|
+
var useStyle$2 = useResetIconStyle;
|
|
6472
6487
|
|
|
6473
6488
|
const {
|
|
6474
6489
|
genStyleHooks,
|
|
@@ -6502,7 +6517,7 @@ const {
|
|
|
6502
6517
|
iconPrefixCls
|
|
6503
6518
|
} = useContext(ConfigContext);
|
|
6504
6519
|
// Generate style for icons
|
|
6505
|
-
|
|
6520
|
+
useStyle$2(iconPrefixCls, csp);
|
|
6506
6521
|
return csp !== null && csp !== void 0 ? csp : {};
|
|
6507
6522
|
},
|
|
6508
6523
|
getResetStyles: token => [{
|
|
@@ -6518,6 +6533,7 @@ const {
|
|
|
6518
6533
|
} = fullClone$1;
|
|
6519
6534
|
const useEmptyId = () => '';
|
|
6520
6535
|
const useThemeKey = typeof useId === 'undefined' ? useEmptyId : useId;
|
|
6536
|
+
var useThemeKey$1 = useThemeKey;
|
|
6521
6537
|
|
|
6522
6538
|
function useTheme(theme, parentTheme, config) {
|
|
6523
6539
|
var _a, _b;
|
|
@@ -6527,7 +6543,7 @@ function useTheme(theme, parentTheme, config) {
|
|
|
6527
6543
|
hashed: (_a = parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.hashed) !== null && _a !== void 0 ? _a : defaultConfig.hashed,
|
|
6528
6544
|
cssVar: parentTheme === null || parentTheme === void 0 ? void 0 : parentTheme.cssVar
|
|
6529
6545
|
}) : parentTheme;
|
|
6530
|
-
const themeKey = useThemeKey();
|
|
6546
|
+
const themeKey = useThemeKey$1();
|
|
6531
6547
|
if (process.env.NODE_ENV !== 'production') {
|
|
6532
6548
|
const cssVarEnabled = themeConfig.cssVar || parentThemeConfig.cssVar;
|
|
6533
6549
|
const validKey = !!(typeof themeConfig.cssVar === 'object' && ((_b = themeConfig.cssVar) === null || _b === void 0 ? void 0 : _b.key) || themeKey);
|
|
@@ -7552,7 +7568,7 @@ const ProviderChildren = props => {
|
|
|
7552
7568
|
}, [parentContext.getPrefixCls, props.prefixCls]);
|
|
7553
7569
|
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || defaultIconPrefixCls;
|
|
7554
7570
|
const csp = customCsp || parentContext.csp;
|
|
7555
|
-
|
|
7571
|
+
useStyle$2(iconPrefixCls, csp);
|
|
7556
7572
|
const mergedTheme = useTheme(theme, parentContext.theme, {
|
|
7557
7573
|
prefixCls: getPrefixCls('')
|
|
7558
7574
|
});
|
|
@@ -7669,7 +7685,7 @@ const ProviderChildren = props => {
|
|
|
7669
7685
|
}), children);
|
|
7670
7686
|
const validateMessages = React.useMemo(() => {
|
|
7671
7687
|
var _a, _b, _c, _d;
|
|
7672
|
-
return merge$1(((_a =
|
|
7688
|
+
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) || {});
|
|
7673
7689
|
}, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
|
|
7674
7690
|
if (Object.keys(validateMessages).length > 0) {
|
|
7675
7691
|
childNode = /*#__PURE__*/React.createElement(ValidateMessagesContext.Provider, {
|
|
@@ -7677,13 +7693,13 @@ const ProviderChildren = props => {
|
|
|
7677
7693
|
}, childNode);
|
|
7678
7694
|
}
|
|
7679
7695
|
if (locale) {
|
|
7680
|
-
childNode = /*#__PURE__*/React.createElement(LocaleProvider, {
|
|
7696
|
+
childNode = /*#__PURE__*/React.createElement(LocaleProvider$1, {
|
|
7681
7697
|
locale: locale,
|
|
7682
7698
|
_ANT_MARK__: ANT_MARK
|
|
7683
7699
|
}, childNode);
|
|
7684
7700
|
}
|
|
7685
7701
|
if (iconPrefixCls || csp) {
|
|
7686
|
-
childNode = /*#__PURE__*/React.createElement(
|
|
7702
|
+
childNode = /*#__PURE__*/React.createElement(Context$1.Provider, {
|
|
7687
7703
|
value: memoIconContextValue
|
|
7688
7704
|
}, childNode);
|
|
7689
7705
|
}
|
|
@@ -7719,7 +7735,7 @@ const ProviderChildren = props => {
|
|
|
7719
7735
|
}
|
|
7720
7736
|
parsedComponents[componentName] = parsedToken;
|
|
7721
7737
|
});
|
|
7722
|
-
const mergedToken = Object.assign(Object.assign({}, seedToken), token);
|
|
7738
|
+
const mergedToken = Object.assign(Object.assign({}, seedToken$1), token);
|
|
7723
7739
|
return Object.assign(Object.assign({}, rest), {
|
|
7724
7740
|
theme: themeObj,
|
|
7725
7741
|
token: mergedToken,
|
|
@@ -7753,20 +7769,20 @@ const ProviderChildren = props => {
|
|
|
7753
7769
|
};
|
|
7754
7770
|
const ConfigProvider = props => {
|
|
7755
7771
|
const context = React.useContext(ConfigContext);
|
|
7756
|
-
const antLocale = React.useContext(LocaleContext);
|
|
7772
|
+
const antLocale = React.useContext(LocaleContext$1);
|
|
7757
7773
|
return /*#__PURE__*/React.createElement(ProviderChildren, Object.assign({
|
|
7758
7774
|
parentContext: context,
|
|
7759
7775
|
legacyLocale: antLocale
|
|
7760
7776
|
}, props));
|
|
7761
7777
|
};
|
|
7762
7778
|
ConfigProvider.ConfigContext = ConfigContext;
|
|
7763
|
-
ConfigProvider.SizeContext = SizeContext;
|
|
7779
|
+
ConfigProvider.SizeContext = SizeContext$1;
|
|
7764
7780
|
ConfigProvider.config = setGlobalConfig;
|
|
7765
7781
|
ConfigProvider.useConfig = useConfig;
|
|
7766
7782
|
Object.defineProperty(ConfigProvider, 'SizeContext', {
|
|
7767
7783
|
get: () => {
|
|
7768
7784
|
process.env.NODE_ENV !== "production" ? warning$2(false, 'ConfigProvider', 'ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead.') : void 0;
|
|
7769
|
-
return SizeContext;
|
|
7785
|
+
return SizeContext$1;
|
|
7770
7786
|
}
|
|
7771
7787
|
});
|
|
7772
7788
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7845,7 +7861,7 @@ function normalizeTwoToneColors(twoToneColor) {
|
|
|
7845
7861
|
}
|
|
7846
7862
|
var iconStyles = "\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
7847
7863
|
var useInsertStyles = function useInsertStyles(eleRef) {
|
|
7848
|
-
var _useContext = useContext(
|
|
7864
|
+
var _useContext = useContext(Context$1),
|
|
7849
7865
|
csp = _useContext.csp,
|
|
7850
7866
|
prefixCls = _useContext.prefixCls;
|
|
7851
7867
|
var mergedStyleStr = iconStyles;
|
|
@@ -7922,19 +7938,20 @@ var IconBase = function IconBase(props) {
|
|
|
7922
7938
|
IconBase.displayName = 'IconReact';
|
|
7923
7939
|
IconBase.getTwoToneColors = getTwoToneColors;
|
|
7924
7940
|
IconBase.setTwoToneColors = setTwoToneColors;
|
|
7941
|
+
var ReactIcon = IconBase;
|
|
7925
7942
|
|
|
7926
7943
|
function setTwoToneColor(twoToneColor) {
|
|
7927
7944
|
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor),
|
|
7928
7945
|
_normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2),
|
|
7929
7946
|
primaryColor = _normalizeTwoToneColo2[0],
|
|
7930
7947
|
secondaryColor = _normalizeTwoToneColo2[1];
|
|
7931
|
-
return
|
|
7948
|
+
return ReactIcon.setTwoToneColors({
|
|
7932
7949
|
primaryColor: primaryColor,
|
|
7933
7950
|
secondaryColor: secondaryColor
|
|
7934
7951
|
});
|
|
7935
7952
|
}
|
|
7936
7953
|
function getTwoToneColor() {
|
|
7937
|
-
var colors =
|
|
7954
|
+
var colors = ReactIcon.getTwoToneColors();
|
|
7938
7955
|
if (!colors.calculated) {
|
|
7939
7956
|
return colors.primaryColor;
|
|
7940
7957
|
}
|
|
@@ -7957,7 +7974,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7957
7974
|
onClick = props.onClick,
|
|
7958
7975
|
twoToneColor = props.twoToneColor,
|
|
7959
7976
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
7960
|
-
var _React$useContext = React.useContext(
|
|
7977
|
+
var _React$useContext = React.useContext(Context$1),
|
|
7961
7978
|
_React$useContext$pre = _React$useContext.prefixCls,
|
|
7962
7979
|
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
|
|
7963
7980
|
rootClassName = _React$useContext.rootClassName;
|
|
@@ -7982,7 +7999,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7982
7999
|
tabIndex: iconTabIndex,
|
|
7983
8000
|
onClick: onClick,
|
|
7984
8001
|
className: classString
|
|
7985
|
-
}), /*#__PURE__*/React.createElement(
|
|
8002
|
+
}), /*#__PURE__*/React.createElement(ReactIcon, {
|
|
7986
8003
|
icon: icon,
|
|
7987
8004
|
primaryColor: primaryColor,
|
|
7988
8005
|
secondaryColor: secondaryColor,
|
|
@@ -7992,6 +8009,7 @@ var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
7992
8009
|
Icon.displayName = 'AntdIcon';
|
|
7993
8010
|
Icon.getTwoToneColor = getTwoToneColor;
|
|
7994
8011
|
Icon.setTwoToneColor = setTwoToneColor;
|
|
8012
|
+
var AntdIcon = Icon;
|
|
7995
8013
|
|
|
7996
8014
|
function isFragment(child) {
|
|
7997
8015
|
return child && /*#__PURE__*/React__default.isValidElement(child) && child.type === React__default.Fragment;
|
|
@@ -8007,12 +8025,13 @@ function cloneElement(element, props) {
|
|
|
8007
8025
|
}
|
|
8008
8026
|
|
|
8009
8027
|
// This icon file is generated automatically.
|
|
8010
|
-
var LoadingOutlined$
|
|
8028
|
+
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" };
|
|
8029
|
+
var LoadingOutlinedSvg = LoadingOutlined$2;
|
|
8011
8030
|
|
|
8012
8031
|
var LoadingOutlined = function LoadingOutlined(props, ref) {
|
|
8013
|
-
return /*#__PURE__*/React.createElement(
|
|
8032
|
+
return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {
|
|
8014
8033
|
ref: ref,
|
|
8015
|
-
icon:
|
|
8034
|
+
icon: LoadingOutlinedSvg
|
|
8016
8035
|
}));
|
|
8017
8036
|
};
|
|
8018
8037
|
|
|
@@ -8021,6 +8040,7 @@ var RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);
|
|
|
8021
8040
|
if (process.env.NODE_ENV !== 'production') {
|
|
8022
8041
|
RefIcon.displayName = 'LoadingOutlined';
|
|
8023
8042
|
}
|
|
8043
|
+
var LoadingOutlined$1 = RefIcon;
|
|
8024
8044
|
|
|
8025
8045
|
function _regeneratorRuntime() {
|
|
8026
8046
|
_regeneratorRuntime = function _regeneratorRuntime() {
|
|
@@ -8654,6 +8674,7 @@ const showWaveEffect = (target, info) => {
|
|
|
8654
8674
|
target: target
|
|
8655
8675
|
})), holder);
|
|
8656
8676
|
};
|
|
8677
|
+
var showWaveEffect$1 = showWaveEffect;
|
|
8657
8678
|
|
|
8658
8679
|
const useWave = (nodeRef, className, component) => {
|
|
8659
8680
|
const {
|
|
@@ -8670,7 +8691,7 @@ const useWave = (nodeRef, className, component) => {
|
|
|
8670
8691
|
showEffect
|
|
8671
8692
|
} = wave || {};
|
|
8672
8693
|
// Customize wave effect
|
|
8673
|
-
(showEffect || showWaveEffect)(targetNode, {
|
|
8694
|
+
(showEffect || showWaveEffect$1)(targetNode, {
|
|
8674
8695
|
className,
|
|
8675
8696
|
token,
|
|
8676
8697
|
component,
|
|
@@ -8688,6 +8709,7 @@ const useWave = (nodeRef, className, component) => {
|
|
|
8688
8709
|
};
|
|
8689
8710
|
return showDebounceWave;
|
|
8690
8711
|
};
|
|
8712
|
+
var useWave$1 = useWave;
|
|
8691
8713
|
|
|
8692
8714
|
const Wave = props => {
|
|
8693
8715
|
const {
|
|
@@ -8703,7 +8725,7 @@ const Wave = props => {
|
|
|
8703
8725
|
const prefixCls = getPrefixCls('wave');
|
|
8704
8726
|
const [, hashId] = useStyle$1(prefixCls);
|
|
8705
8727
|
// =============================== Wave ===============================
|
|
8706
|
-
const showWave = useWave(containerRef, classNames(prefixCls, hashId), component);
|
|
8728
|
+
const showWave = useWave$1(containerRef, classNames(prefixCls, hashId), component);
|
|
8707
8729
|
// ============================== Effect ==============================
|
|
8708
8730
|
React__default.useEffect(() => {
|
|
8709
8731
|
const node = containerRef.current;
|
|
@@ -8738,9 +8760,10 @@ const Wave = props => {
|
|
|
8738
8760
|
if (process.env.NODE_ENV !== 'production') {
|
|
8739
8761
|
Wave.displayName = 'Wave';
|
|
8740
8762
|
}
|
|
8763
|
+
var Wave$1 = Wave;
|
|
8741
8764
|
|
|
8742
8765
|
const useSize = customSize => {
|
|
8743
|
-
const size = React__default.useContext(SizeContext);
|
|
8766
|
+
const size = React__default.useContext(SizeContext$1);
|
|
8744
8767
|
const mergedSize = React__default.useMemo(() => {
|
|
8745
8768
|
if (!customSize) {
|
|
8746
8769
|
return size;
|
|
@@ -8755,6 +8778,7 @@ const useSize = customSize => {
|
|
|
8755
8778
|
}, [customSize, size]);
|
|
8756
8779
|
return mergedSize;
|
|
8757
8780
|
};
|
|
8781
|
+
var useSize$1 = useSize;
|
|
8758
8782
|
|
|
8759
8783
|
undefined && undefined.__rest || function (s, e) {
|
|
8760
8784
|
var t = {};
|
|
@@ -8836,6 +8860,7 @@ const ButtonGroup = props => {
|
|
|
8836
8860
|
className: classes
|
|
8837
8861
|
})));
|
|
8838
8862
|
};
|
|
8863
|
+
var Group = ButtonGroup;
|
|
8839
8864
|
|
|
8840
8865
|
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
|
|
8841
8866
|
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
|
|
@@ -8895,6 +8920,7 @@ const IconWrapper = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8895
8920
|
style: style
|
|
8896
8921
|
}, children);
|
|
8897
8922
|
});
|
|
8923
|
+
var IconWrapper$1 = IconWrapper;
|
|
8898
8924
|
|
|
8899
8925
|
const InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
8900
8926
|
const {
|
|
@@ -8904,12 +8930,12 @@ const InnerLoadingIcon = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
8904
8930
|
iconClassName
|
|
8905
8931
|
} = props;
|
|
8906
8932
|
const mergedIconCls = classNames(`${prefixCls}-loading-icon`, className);
|
|
8907
|
-
return /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
8933
|
+
return /*#__PURE__*/React__default.createElement(IconWrapper$1, {
|
|
8908
8934
|
prefixCls: prefixCls,
|
|
8909
8935
|
className: mergedIconCls,
|
|
8910
8936
|
style: style,
|
|
8911
8937
|
ref: ref
|
|
8912
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
8938
|
+
}, /*#__PURE__*/React__default.createElement(LoadingOutlined$1, {
|
|
8913
8939
|
className: iconClassName
|
|
8914
8940
|
}));
|
|
8915
8941
|
});
|
|
@@ -8965,6 +8991,7 @@ const LoadingIcon = props => {
|
|
|
8965
8991
|
});
|
|
8966
8992
|
});
|
|
8967
8993
|
};
|
|
8994
|
+
var LoadingIcon$1 = LoadingIcon;
|
|
8968
8995
|
|
|
8969
8996
|
const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
|
|
8970
8997
|
// Border
|
|
@@ -9031,6 +9058,7 @@ const genGroupStyle = token => {
|
|
|
9031
9058
|
genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
|
|
9032
9059
|
};
|
|
9033
9060
|
};
|
|
9061
|
+
var genGroupStyle$1 = genGroupStyle;
|
|
9034
9062
|
|
|
9035
9063
|
const prepareToken = token => {
|
|
9036
9064
|
const {
|
|
@@ -9423,7 +9451,7 @@ var useStyle = genStyleHooks('Button', token => {
|
|
|
9423
9451
|
// Group (type, ghost, danger, loading)
|
|
9424
9452
|
genTypeButtonStyle(buttonToken),
|
|
9425
9453
|
// Button Group
|
|
9426
|
-
genGroupStyle(buttonToken)];
|
|
9454
|
+
genGroupStyle$1(buttonToken)];
|
|
9427
9455
|
}, prepareComponentToken, {
|
|
9428
9456
|
unitless: {
|
|
9429
9457
|
fontWeight: true,
|
|
@@ -9651,7 +9679,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9651
9679
|
const mergedInsertSpace = (_a = autoInsertSpace !== null && autoInsertSpace !== void 0 ? autoInsertSpace : button === null || button === void 0 ? void 0 : button.autoInsertSpace) !== null && _a !== void 0 ? _a : true;
|
|
9652
9680
|
const prefixCls = getPrefixCls('btn', customizePrefixCls);
|
|
9653
9681
|
const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);
|
|
9654
|
-
const disabled = useContext(DisabledContext);
|
|
9682
|
+
const disabled = useContext(DisabledContext$1);
|
|
9655
9683
|
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
|
|
9656
9684
|
const groupSize = useContext(GroupSizeContext);
|
|
9657
9685
|
const loadingOrDelay = useMemo$1(() => getLoadingConfig(loading), [loading]);
|
|
@@ -9717,7 +9745,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9717
9745
|
small: 'sm',
|
|
9718
9746
|
middle: undefined
|
|
9719
9747
|
};
|
|
9720
|
-
const sizeFullName = useSize(ctxSize => {
|
|
9748
|
+
const sizeFullName = useSize$1(ctxSize => {
|
|
9721
9749
|
var _a, _b;
|
|
9722
9750
|
return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
|
|
9723
9751
|
});
|
|
@@ -9740,11 +9768,11 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9740
9768
|
const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);
|
|
9741
9769
|
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);
|
|
9742
9770
|
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) || {});
|
|
9743
|
-
const iconNode = icon && !innerLoading ? (/*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
9771
|
+
const iconNode = icon && !innerLoading ? (/*#__PURE__*/React__default.createElement(IconWrapper$1, {
|
|
9744
9772
|
prefixCls: prefixCls,
|
|
9745
9773
|
className: iconClasses,
|
|
9746
9774
|
style: iconStyle
|
|
9747
|
-
}, icon)) : (/*#__PURE__*/React__default.createElement(LoadingIcon, {
|
|
9775
|
+
}, icon)) : (/*#__PURE__*/React__default.createElement(LoadingIcon$1, {
|
|
9748
9776
|
existIcon: !!icon,
|
|
9749
9777
|
prefixCls: prefixCls,
|
|
9750
9778
|
loading: innerLoading
|
|
@@ -9774,7 +9802,7 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9774
9802
|
prefixCls: prefixCls
|
|
9775
9803
|
}));
|
|
9776
9804
|
if (!isUnBorderedButtonType(mergedType)) {
|
|
9777
|
-
buttonNode = /*#__PURE__*/React__default.createElement(Wave, {
|
|
9805
|
+
buttonNode = /*#__PURE__*/React__default.createElement(Wave$1, {
|
|
9778
9806
|
component: "Button",
|
|
9779
9807
|
disabled: innerLoading
|
|
9780
9808
|
}, buttonNode);
|
|
@@ -9782,14 +9810,15 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
9782
9810
|
return wrapCSSVar(buttonNode);
|
|
9783
9811
|
});
|
|
9784
9812
|
const Button = InternalCompoundedButton;
|
|
9785
|
-
Button.Group =
|
|
9813
|
+
Button.Group = Group;
|
|
9786
9814
|
Button.__ANT_BUTTON = true;
|
|
9787
9815
|
if (process.env.NODE_ENV !== 'production') {
|
|
9788
9816
|
Button.displayName = 'Button';
|
|
9789
9817
|
}
|
|
9818
|
+
var Button$1 = Button;
|
|
9790
9819
|
|
|
9791
9820
|
const FisButton = () => {
|
|
9792
|
-
return jsx(Button, { children: "Hello from my React component!" });
|
|
9821
|
+
return jsx(Button$1, { children: "Hello from my React component!" });
|
|
9793
9822
|
};
|
|
9794
9823
|
|
|
9795
9824
|
export { FisButton, MyComponent };
|