fis-component 0.1.11 → 0.1.13
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 +63 -32
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +7 -7
- package/dist/cjs/types/src/components/Text/index.d.ts +1 -0
- package/dist/esm/index.js +63 -32
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +7 -7
- package/dist/esm/types/src/components/Text/index.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -26,6 +26,9 @@ declare const meta: {
|
|
|
26
26
|
onChange?: ((value: number) => void) | undefined;
|
|
27
27
|
name?: string | undefined | undefined;
|
|
28
28
|
dir?: string | undefined | undefined;
|
|
29
|
+
form?: string | undefined | undefined;
|
|
30
|
+
slot?: string | undefined | undefined;
|
|
31
|
+
pattern?: string | undefined | undefined;
|
|
29
32
|
key?: import("react").Key | null | undefined;
|
|
30
33
|
defaultChecked?: boolean | undefined | undefined;
|
|
31
34
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -42,7 +45,6 @@ declare const meta: {
|
|
|
42
45
|
id?: string | undefined | undefined;
|
|
43
46
|
lang?: string | undefined | undefined;
|
|
44
47
|
nonce?: string | undefined | undefined;
|
|
45
|
-
slot?: string | undefined | undefined;
|
|
46
48
|
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
47
49
|
style?: import("react").CSSProperties | undefined;
|
|
48
50
|
tabIndex?: number | undefined | undefined;
|
|
@@ -296,7 +298,6 @@ declare const meta: {
|
|
|
296
298
|
width?: number | string | undefined | undefined;
|
|
297
299
|
size?: number | undefined | undefined;
|
|
298
300
|
multiple?: boolean | undefined | undefined;
|
|
299
|
-
form?: string | undefined | undefined;
|
|
300
301
|
formAction?: string | undefined;
|
|
301
302
|
formEncType?: string | undefined | undefined;
|
|
302
303
|
formMethod?: string | undefined | undefined;
|
|
@@ -304,16 +305,15 @@ declare const meta: {
|
|
|
304
305
|
formTarget?: string | undefined | undefined;
|
|
305
306
|
type?: import("react").HTMLInputTypeAttribute | undefined;
|
|
306
307
|
value?: string | number | readonly string[] | undefined;
|
|
307
|
-
pattern?: string | undefined | undefined;
|
|
308
308
|
autoComplete?: import("react").HTMLInputAutoCompleteAttribute | undefined;
|
|
309
|
-
maxLength?: number | undefined | undefined;
|
|
310
|
-
minLength?: number | undefined | undefined;
|
|
311
|
-
placeholder?: string | undefined | undefined;
|
|
312
|
-
required?: boolean | undefined | undefined;
|
|
313
309
|
accept?: string | undefined | undefined;
|
|
314
310
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
315
311
|
checked?: boolean | undefined | undefined;
|
|
316
312
|
list?: string | undefined | undefined;
|
|
313
|
+
maxLength?: number | undefined | undefined;
|
|
314
|
+
minLength?: number | undefined | undefined;
|
|
315
|
+
placeholder?: string | undefined | undefined;
|
|
316
|
+
required?: boolean | undefined | undefined;
|
|
317
317
|
textLabel?: string | undefined;
|
|
318
318
|
iconLabel?: import("react").ReactNode;
|
|
319
319
|
onClickIconLabel?: (() => void) | undefined;
|
|
@@ -4,6 +4,7 @@ export interface FISTextPropsI extends React.HTMLAttributes<HTMLElement> {
|
|
|
4
4
|
variant?: keyof ThemeType;
|
|
5
5
|
tag?: keyof JSX.IntrinsicElements;
|
|
6
6
|
color?: keyof ThemeType;
|
|
7
|
+
as?: keyof JSX.IntrinsicElements;
|
|
7
8
|
}
|
|
8
9
|
declare const FISText: React.ForwardRefExoticComponent<FISTextPropsI & React.RefAttributes<any>>;
|
|
9
10
|
export default FISText;
|
package/dist/esm/index.js
CHANGED
|
@@ -10035,7 +10035,7 @@ function genStyleUtils(config) {
|
|
|
10035
10035
|
|
|
10036
10036
|
const PresetColors = ['blue', 'purple', 'cyan', 'green', 'magenta', 'pink', 'red', 'orange', 'yellow', 'volcano', 'geekblue', 'lime', 'gold'];
|
|
10037
10037
|
|
|
10038
|
-
var version$1 = '5.29.
|
|
10038
|
+
var version$1 = '5.29.3';
|
|
10039
10039
|
|
|
10040
10040
|
function isStableColor(color) {
|
|
10041
10041
|
return color >= 0 && color <= 255;
|
|
@@ -17379,20 +17379,32 @@ const InternalCompoundedButton = /*#__PURE__*/React__default.forwardRef((props,
|
|
|
17379
17379
|
const fullStyle = Object.assign(Object.assign({}, contextStyle), customStyle);
|
|
17380
17380
|
const iconClasses = classNames(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, contextClassNames.icon);
|
|
17381
17381
|
const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), contextStyles.icon || {});
|
|
17382
|
-
|
|
17383
|
-
|
|
17384
|
-
|
|
17385
|
-
|
|
17386
|
-
|
|
17382
|
+
/**
|
|
17383
|
+
* Extract icon node
|
|
17384
|
+
* If there is a custom icon and not in loading state: show custom icon
|
|
17385
|
+
*/
|
|
17386
|
+
const iconWrapperElement = child => (/*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
17387
17387
|
prefixCls: prefixCls,
|
|
17388
17388
|
className: iconClasses,
|
|
17389
17389
|
style: iconStyle
|
|
17390
|
-
},
|
|
17390
|
+
}, child));
|
|
17391
|
+
const defaultLoadingIconElement = () => (/*#__PURE__*/React__default.createElement(DefaultLoadingIcon, {
|
|
17391
17392
|
existIcon: !!icon,
|
|
17392
17393
|
prefixCls: prefixCls,
|
|
17393
17394
|
loading: innerLoading,
|
|
17394
17395
|
mount: isMountRef.current
|
|
17395
17396
|
}));
|
|
17397
|
+
/**
|
|
17398
|
+
* Using if-else statements can improve code readability without affecting future expansion.
|
|
17399
|
+
*/
|
|
17400
|
+
let iconNode;
|
|
17401
|
+
if (icon && !innerLoading) {
|
|
17402
|
+
iconNode = iconWrapperElement(icon);
|
|
17403
|
+
} else if (loading && typeof loading === 'object' && loading.icon) {
|
|
17404
|
+
iconNode = iconWrapperElement(loading.icon);
|
|
17405
|
+
} else {
|
|
17406
|
+
iconNode = defaultLoadingIconElement();
|
|
17407
|
+
}
|
|
17396
17408
|
const kids = children || children === 0 ? spaceChildren(children, needInserted && mergedInsertSpace) : null;
|
|
17397
17409
|
if (linkButtonRestProps.href !== undefined) {
|
|
17398
17410
|
return wrapCSSVar(/*#__PURE__*/React__default.createElement("a", Object.assign({}, linkButtonRestProps, {
|
|
@@ -17835,6 +17847,7 @@ function newMessages() {
|
|
|
17835
17847
|
float: '%s is not a %s',
|
|
17836
17848
|
regexp: '%s is not a valid %s',
|
|
17837
17849
|
email: '%s is not a valid %s',
|
|
17850
|
+
tel: '%s is not a valid %s',
|
|
17838
17851
|
url: '%s is not a valid %s',
|
|
17839
17852
|
hex: '%s is not a valid %s'
|
|
17840
17853
|
},
|
|
@@ -17973,7 +17986,7 @@ function format(template) {
|
|
|
17973
17986
|
return template;
|
|
17974
17987
|
}
|
|
17975
17988
|
function isNativeStringType(type) {
|
|
17976
|
-
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
|
|
17989
|
+
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern' || type === 'tel';
|
|
17977
17990
|
}
|
|
17978
17991
|
function isEmptyValue(value, type) {
|
|
17979
17992
|
if (value === undefined || value === null) {
|
|
@@ -18277,6 +18290,13 @@ var pattern$1 = {
|
|
|
18277
18290
|
// '^(?!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]*)?$',
|
|
18278
18291
|
// 'i',
|
|
18279
18292
|
// ),
|
|
18293
|
+
/**
|
|
18294
|
+
* Phone number regex, support country code, brackets, spaces, and dashes (or non-breaking hyphen \u2011).
|
|
18295
|
+
* @see https://regexr.com/3c53v
|
|
18296
|
+
* @see https://ihateregex.io/expr/phone/
|
|
18297
|
+
* @see https://developers.google.com/style/phone-numbers using non-breaking hyphen \u2011
|
|
18298
|
+
*/
|
|
18299
|
+
tel: /^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,
|
|
18280
18300
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
18281
18301
|
};
|
|
18282
18302
|
var types = {
|
|
@@ -18317,6 +18337,9 @@ var types = {
|
|
|
18317
18337
|
email: function email(value) {
|
|
18318
18338
|
return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$1.email);
|
|
18319
18339
|
},
|
|
18340
|
+
tel: function tel(value) {
|
|
18341
|
+
return typeof value === 'string' && value.length <= 32 && !!value.match(pattern$1.tel);
|
|
18342
|
+
},
|
|
18320
18343
|
url: function url(value) {
|
|
18321
18344
|
return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex());
|
|
18322
18345
|
},
|
|
@@ -18329,7 +18352,7 @@ var type$1 = function type(rule, value, source, errors, options) {
|
|
|
18329
18352
|
required$1(rule, value, source, errors, options);
|
|
18330
18353
|
return;
|
|
18331
18354
|
}
|
|
18332
|
-
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
|
|
18355
|
+
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'tel', 'number', 'date', 'url', 'hex'];
|
|
18333
18356
|
var ruleType = rule.type;
|
|
18334
18357
|
if (custom.indexOf(ruleType) > -1) {
|
|
18335
18358
|
if (!types[ruleType](value)) {
|
|
@@ -18623,6 +18646,7 @@ var validators = {
|
|
|
18623
18646
|
url: type,
|
|
18624
18647
|
hex: type,
|
|
18625
18648
|
email: type,
|
|
18649
|
+
tel: type,
|
|
18626
18650
|
required: required,
|
|
18627
18651
|
any: any
|
|
18628
18652
|
};
|
|
@@ -18774,7 +18798,7 @@ var Schema = /*#__PURE__*/function () {
|
|
|
18774
18798
|
if (!options.suppressWarning && errorList.length) {
|
|
18775
18799
|
Schema.warning('async-validator:', errorList);
|
|
18776
18800
|
}
|
|
18777
|
-
if (errorList.length && rule.message !== undefined) {
|
|
18801
|
+
if (errorList.length && rule.message !== undefined && rule.message !== null) {
|
|
18778
18802
|
errorList = [].concat(rule.message);
|
|
18779
18803
|
}
|
|
18780
18804
|
|
|
@@ -21695,18 +21719,18 @@ const genNoticeStyle = token => {
|
|
|
21695
21719
|
borderRadius: borderRadiusLG,
|
|
21696
21720
|
overflow: 'hidden',
|
|
21697
21721
|
// Type-specific background colors
|
|
21698
|
-
'&-success': {
|
|
21722
|
+
'&-success': colorSuccessBg ? {
|
|
21699
21723
|
background: colorSuccessBg
|
|
21700
|
-
},
|
|
21701
|
-
'&-error': {
|
|
21724
|
+
} : {},
|
|
21725
|
+
'&-error': colorErrorBg ? {
|
|
21702
21726
|
background: colorErrorBg
|
|
21703
|
-
},
|
|
21704
|
-
'&-info': {
|
|
21727
|
+
} : {},
|
|
21728
|
+
'&-info': colorInfoBg ? {
|
|
21705
21729
|
background: colorInfoBg
|
|
21706
|
-
},
|
|
21707
|
-
'&-warning': {
|
|
21730
|
+
} : {},
|
|
21731
|
+
'&-warning': colorWarningBg ? {
|
|
21708
21732
|
background: colorWarningBg
|
|
21709
|
-
}
|
|
21733
|
+
} : {}
|
|
21710
21734
|
},
|
|
21711
21735
|
[`${noticeCls}-message`]: {
|
|
21712
21736
|
color: colorTextHeading,
|
|
@@ -21887,10 +21911,13 @@ const genNotificationStyle = token => {
|
|
|
21887
21911
|
const prepareComponentToken$b = token => ({
|
|
21888
21912
|
zIndexPopup: token.zIndexPopupBase + CONTAINER_MAX_OFFSET + 50,
|
|
21889
21913
|
width: 384,
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
21893
|
-
|
|
21914
|
+
// Fix notification background color issue
|
|
21915
|
+
// https://github.com/ant-design/ant-design/issues/55649
|
|
21916
|
+
// https://github.com/ant-design/ant-design/issues/56055
|
|
21917
|
+
colorSuccessBg: undefined,
|
|
21918
|
+
colorErrorBg: undefined,
|
|
21919
|
+
colorInfoBg: undefined,
|
|
21920
|
+
colorWarningBg: undefined
|
|
21894
21921
|
});
|
|
21895
21922
|
const prepareNotificationToken = token => {
|
|
21896
21923
|
const notificationPaddingVertical = token.paddingMD;
|
|
@@ -24500,12 +24527,12 @@ function useAlign(open, popupEle, target, placement, builtinPlacements, popupAli
|
|
|
24500
24527
|
var offsetX4Right = popupMirrorRect.right - popupRect.x - (nextOffsetX + popupRect.width);
|
|
24501
24528
|
var offsetY4Bottom = popupMirrorRect.bottom - popupRect.y - (nextOffsetY + popupRect.height);
|
|
24502
24529
|
if (_scaleX === 1) {
|
|
24503
|
-
nextOffsetX = Math.
|
|
24504
|
-
offsetX4Right = Math.
|
|
24530
|
+
nextOffsetX = Math.floor(nextOffsetX);
|
|
24531
|
+
offsetX4Right = Math.floor(offsetX4Right);
|
|
24505
24532
|
}
|
|
24506
24533
|
if (_scaleY === 1) {
|
|
24507
|
-
nextOffsetY = Math.
|
|
24508
|
-
offsetY4Bottom = Math.
|
|
24534
|
+
nextOffsetY = Math.floor(nextOffsetY);
|
|
24535
|
+
offsetY4Bottom = Math.floor(offsetY4Bottom);
|
|
24509
24536
|
}
|
|
24510
24537
|
var nextOffsetInfo = {
|
|
24511
24538
|
ready: true,
|
|
@@ -47257,16 +47284,20 @@ const Input = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
47257
47284
|
rootClassName,
|
|
47258
47285
|
onChange,
|
|
47259
47286
|
classNames: classNames$1,
|
|
47260
|
-
variant: customVariant
|
|
47287
|
+
variant: customVariant,
|
|
47288
|
+
_skipAddonWarning
|
|
47261
47289
|
} = props,
|
|
47262
|
-
rest = __rest$a(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant"]);
|
|
47290
|
+
rest = __rest$a(props, ["prefixCls", "bordered", "status", "size", "disabled", "onBlur", "onFocus", "suffix", "allowClear", "addonAfter", "addonBefore", "className", "style", "styles", "rootClassName", "onChange", "classNames", "variant", "_skipAddonWarning"]);
|
|
47263
47291
|
if (process.env.NODE_ENV !== 'production') {
|
|
47264
47292
|
const {
|
|
47265
47293
|
deprecated
|
|
47266
47294
|
} = devUseWarning('Input');
|
|
47267
|
-
|
|
47268
|
-
|
|
47269
|
-
|
|
47295
|
+
deprecated(!('bordered' in props), 'bordered', 'variant');
|
|
47296
|
+
if (!_skipAddonWarning) {
|
|
47297
|
+
[['addonAfter', 'Space.Compact'], ['addonBefore', 'Space.Compact']].forEach(([prop, newProp]) => {
|
|
47298
|
+
deprecated(!(prop in props), prop, newProp);
|
|
47299
|
+
});
|
|
47300
|
+
}
|
|
47270
47301
|
}
|
|
47271
47302
|
const {
|
|
47272
47303
|
getPrefixCls,
|
|
@@ -75159,7 +75190,7 @@ const TextSC = styled.p `
|
|
|
75159
75190
|
}}
|
|
75160
75191
|
`;
|
|
75161
75192
|
|
|
75162
|
-
const FISText = forwardRef(({ tag, variant, children, color, ...rest }, ref) => (jsx(TextSC, { as: tag, "$variant": variant, "$color": color ?
|
|
75193
|
+
const FISText = forwardRef(({ tag, variant, children, color, ...rest }, ref) => (jsx(TextSC, { as: tag, "$variant": variant, "$color": color ? getTheme(color) : "", ref: ref, ...rest, children: children })));
|
|
75163
75194
|
FISText.displayName = "FISText";
|
|
75164
75195
|
|
|
75165
75196
|
export { FISAlertBanner, FISAvatar, FISBadge, FISBreadcrumb, FISButton, FISButtonGroup, FISCheckbox, FISCheckboxGroup, FISChipButton, FISCollapse, FISCombobox, FISDateRange, FISDivider, FISIconButton, FISInputArea, FISInputDate, FISInputField, FISInputLabel, FISInputStepper, FISInputText, FISInputTime, FISLinkButton, FISMenuItem, FISMenuSection, FISMenuSelect, FISPagination, FISProgressCircular, FISProgressLinear, FISRadio, RadioGroup as FISRadioGroup, FISSegmented, FISSelect, FISSelectItem, FISSorter, FISSplitButton, FISSwitch, FISTab, FISTable, FISTableCell, FISTableHeaderCell, FISText, FISThemeProvider, FISToast, FISTooltip, SegmentedPanelItem, TabPanelItem, useNotification, useToast };
|