fis-component 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +62 -31
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +7 -7
- package/dist/esm/index.js +62 -31
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +7 -7
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -10055,7 +10055,7 @@ function genStyleUtils(config) {
|
|
|
10055
10055
|
|
|
10056
10056
|
const PresetColors = ['blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'];
|
|
10057
10057
|
|
|
10058
|
-
var version$1 = '5.29.
|
|
10058
|
+
var version$1 = '5.29.3';
|
|
10059
10059
|
|
|
10060
10060
|
function isStableColor(color) {
|
|
10061
10061
|
return color >= 0 && color <= 255;
|
|
@@ -17399,20 +17399,32 @@ const InternalCompoundedButton = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
17399
17399
|
const fullStyle = Object.assign(Object.assign({}, contextStyle), customStyle);
|
|
17400
17400
|
const iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, contextClassNames.icon);
|
|
17401
17401
|
const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), contextStyles.icon || {});
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17402
|
+
/**
|
|
17403
|
+
* Extract icon node
|
|
17404
|
+
* If there is a custom icon and not in loading state: show custom icon
|
|
17405
|
+
*/
|
|
17406
|
+
const iconWrapperElement = child => (/*#__PURE__*/React.createElement(IconWrapper, {
|
|
17407
17407
|
prefixCls: prefixCls,
|
|
17408
17408
|
className: iconClasses,
|
|
17409
17409
|
style: iconStyle
|
|
17410
|
-
},
|
|
17410
|
+
}, child));
|
|
17411
|
+
const defaultLoadingIconElement = () => (/*#__PURE__*/React.createElement(DefaultLoadingIcon, {
|
|
17411
17412
|
existIcon: !!icon,
|
|
17412
17413
|
prefixCls: prefixCls,
|
|
17413
17414
|
loading: innerLoading,
|
|
17414
17415
|
mount: isMountRef.current
|
|
17415
17416
|
}));
|
|
17417
|
+
/**
|
|
17418
|
+
* Using if-else statements can improve code readability without affecting future expansion.
|
|
17419
|
+
*/
|
|
17420
|
+
let iconNode;
|
|
17421
|
+
if (icon && !innerLoading) {
|
|
17422
|
+
iconNode = iconWrapperElement(icon);
|
|
17423
|
+
} else if (loading && typeof loading === 'object' && loading.icon) {
|
|
17424
|
+
iconNode = iconWrapperElement(loading.icon);
|
|
17425
|
+
} else {
|
|
17426
|
+
iconNode = defaultLoadingIconElement();
|
|
17427
|
+
}
|
|
17416
17428
|
const kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
|
|
17417
17429
|
if (linkButtonRestProps.href !== undefined) {
|
|
17418
17430
|
return wrapCSSVar(/*#__PURE__*/React.createElement("a", Object.assign({}, linkButtonRestProps, {
|
|
@@ -17855,6 +17867,7 @@ function newMessages() {
|
|
|
17855
17867
|
float: '%s is not a %s',
|
|
17856
17868
|
regexp: '%s is not a valid %s',
|
|
17857
17869
|
email: '%s is not a valid %s',
|
|
17870
|
+
tel: '%s is not a valid %s',
|
|
17858
17871
|
url: '%s is not a valid %s',
|
|
17859
17872
|
hex: '%s is not a valid %s'
|
|
17860
17873
|
},
|
|
@@ -17993,7 +18006,7 @@ function format(template) {
|
|
|
17993
18006
|
return template;
|
|
17994
18007
|
}
|
|
17995
18008
|
function isNativeStringType(type) {
|
|
17996
|
-
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
|
|
18009
|
+
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern' || type === 'tel';
|
|
17997
18010
|
}
|
|
17998
18011
|
function isEmptyValue(value, type) {
|
|
17999
18012
|
if (value === undefined || value === null) {
|
|
@@ -18297,6 +18310,13 @@ var pattern$1 = {
|
|
|
18297
18310
|
// '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$',
|
|
18298
18311
|
// 'i',
|
|
18299
18312
|
// ),
|
|
18313
|
+
/**
|
|
18314
|
+
* Phone number regex, support country code, brackets, spaces, and dashes (or non-breaking hyphen \u2011).
|
|
18315
|
+
* @see https://regexr.com/3c53v
|
|
18316
|
+
* @see https://ihateregex.io/expr/phone/
|
|
18317
|
+
* @see https://developers.google.com/style/phone-numbers using non-breaking hyphen \u2011
|
|
18318
|
+
*/
|
|
18319
|
+
tel: /^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,
|
|
18300
18320
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
18301
18321
|
};
|
|
18302
18322
|
var types = {
|
|
@@ -18337,6 +18357,9 @@ var types = {
|
|
|
18337
18357
|
email: function email(value) {
|
|
18338
18358
|
return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$1.email);
|
|
18339
18359
|
},
|
|
18360
|
+
tel: function tel(value) {
|
|
18361
|
+
return typeof value === 'string' && value.length <= 32 && !!value.match(pattern$1.tel);
|
|
18362
|
+
},
|
|
18340
18363
|
url: function url(value) {
|
|
18341
18364
|
return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
18342
18365
|
},
|
|
@@ -18349,7 +18372,7 @@ var type$1 = function type(rule, value, source, errors, options) {
|
|
|
18349
18372
|
required$1(rule, value, source, errors, options);
|
|
18350
18373
|
return;
|
|
18351
18374
|
}
|
|
18352
|
-
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
|
|
18375
|
+
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'tel', 'number', 'date', 'url', 'hex'];
|
|
18353
18376
|
var ruleType = rule.type;
|
|
18354
18377
|
if (custom.indexOf(ruleType) > -1) {
|
|
18355
18378
|
if (!types[ruleType](value)) {
|
|
@@ -18643,6 +18666,7 @@ var validators = {
|
|
|
18643
18666
|
url: type,
|
|
18644
18667
|
hex: type,
|
|
18645
18668
|
email: type,
|
|
18669
|
+
tel: type,
|
|
18646
18670
|
required: required,
|
|
18647
18671
|
any: any
|
|
18648
18672
|
};
|
|
@@ -18794,7 +18818,7 @@ var Schema = /*#__PURE__*/function () {
|
|
|
18794
18818
|
if (!options.suppressWarning && errorList.length) {
|
|
18795
18819
|
Schema.warning('async-validator:', errorList);
|
|
18796
18820
|
}
|
|
18797
|
-
if (errorList.length && rule.message !== undefined) {
|
|
18821
|
+
if (errorList.length && rule.message !== undefined && rule.message !== null) {
|
|
18798
18822
|
errorList = [].concat(rule.message);
|
|
18799
18823
|
}
|
|
18800
18824
|
|
|
@@ -21715,18 +21739,18 @@ const genNoticeStyle = token => {
|
|
|
21715
21739
|
borderRadius: borderRadiusLG,
|
|
21716
21740
|
overflow: 'hidden',
|
|
21717
21741
|
// Type-specific background colors
|
|
21718
|
-
'&-success': {
|
|
21742
|
+
'&-success': colorSuccessBg ? {
|
|
21719
21743
|
background: colorSuccessBg
|
|
21720
|
-
},
|
|
21721
|
-
'&-error': {
|
|
21744
|
+
} : {},
|
|
21745
|
+
'&-error': colorErrorBg ? {
|
|
21722
21746
|
background: colorErrorBg
|
|
21723
|
-
},
|
|
21724
|
-
'&-info': {
|
|
21747
|
+
} : {},
|
|
21748
|
+
'&-info': colorInfoBg ? {
|
|
21725
21749
|
background: colorInfoBg
|
|
21726
|
-
},
|
|
21727
|
-
'&-warning': {
|
|
21750
|
+
} : {},
|
|
21751
|
+
'&-warning': colorWarningBg ? {
|
|
21728
21752
|
background: colorWarningBg
|
|
21729
|
-
}
|
|
21753
|
+
} : {}
|
|
21730
21754
|
},
|
|
21731
21755
|
[`${noticeCls}-message`]: {
|
|
21732
21756
|
color: colorTextHeading,
|
|
@@ -21907,10 +21931,13 @@ const genNotificationStyle = token => {
|
|
|
21907
21931
|
const prepareComponentToken$b = token => ({
|
|
21908
21932
|
zIndexPopup: token.zIndexPopupBase + CONTAINER_MAX_OFFSET + 50,
|
|
21909
21933
|
width: 384,
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21934
|
+
// Fix notification background color issue
|
|
21935
|
+
// https://github.com/ant-design/ant-design/issues/55649
|
|
21936
|
+
// https://github.com/ant-design/ant-design/issues/56055
|
|
21937
|
+
colorSuccessBg: undefined,
|
|
21938
|
+
colorErrorBg: undefined,
|
|
21939
|
+
colorInfoBg: undefined,
|
|
21940
|
+
colorWarningBg: undefined
|
|
21914
21941
|
});
|
|
21915
21942
|
const prepareNotificationToken = token => {
|
|
21916
21943
|
const notificationPaddingVertical = token.paddingMD;
|
|
@@ -24520,12 +24547,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
24520
24547
|
var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
24521
24548
|
var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
24522
24549
|
if (_scaleX === 1) {
|
|
24523
|
-
nextOffsetX = Math.
|
|
24524
|
-
offsetX4Right = Math.
|
|
24550
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
24551
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
24525
24552
|
}
|
|
24526
24553
|
if (_scaleY === 1) {
|
|
24527
|
-
nextOffsetY = Math.
|
|
24528
|
-
offsetY4Bottom = Math.
|
|
24554
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
24555
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
24529
24556
|
}
|
|
24530
24557
|
var nextOffsetInfo = {
|
|
24531
24558
|
ready: true,
|
|
@@ -47277,16 +47304,20 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
47277
47304
|
rootClassName,
|
|
47278
47305
|
onChange,
|
|
47279
47306
|
classNames: classNames$1,
|
|
47280
|
-
variant: customVariant
|
|
47307
|
+
variant: customVariant,
|
|
47308
|
+
_skipAddonWarning
|
|
47281
47309
|
} = props,
|
|
47282
|
-
rest = __rest$a(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant"]);
|
|
47310
|
+
rest = __rest$a(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant", "_skipAddonWarning"]);
|
|
47283
47311
|
if (process.env.NODE_ENV !== 'production') {
|
|
47284
47312
|
const {
|
|
47285
47313
|
deprecated
|
|
47286
47314
|
} = devUseWarning('Input');
|
|
47287
|
-
|
|
47288
|
-
|
|
47289
|
-
|
|
47315
|
+
deprecated(!('bordered' in props), 'bordered', 'variant');
|
|
47316
|
+
if (!_skipAddonWarning) {
|
|
47317
|
+
[['addonAfter', 'Space.Compact'], ['addonBefore', 'Space.Compact']].forEach(([prop, newProp]) => {
|
|
47318
|
+
deprecated(!(prop in props), prop, newProp);
|
|
47319
|
+
});
|
|
47320
|
+
}
|
|
47290
47321
|
}
|
|
47291
47322
|
const {
|
|
47292
47323
|
getPrefixCls,
|