shineout 3.8.0-beta.5 → 3.8.0-beta.6
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/cjs/index.js +1 -1
- package/dist/shineout.js +48 -67
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.6'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12234
12234
|
};
|
|
12235
12235
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12236
12236
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12237
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.8.0-beta.6');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -20660,54 +20660,10 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20660
20660
|
'&:hover svg': {
|
|
20661
20661
|
color: src.inputHoverToggleColor
|
|
20662
20662
|
}
|
|
20663
|
-
// marginRight: token.inputPaddingX,
|
|
20664
20663
|
},
|
|
20665
20664
|
info: {
|
|
20666
|
-
position: 'absolute',
|
|
20667
|
-
'&[dir=ltr]': {
|
|
20668
|
-
right: '0'
|
|
20669
|
-
},
|
|
20670
|
-
'&[dir=rtl]': {
|
|
20671
|
-
left: '0'
|
|
20672
|
-
},
|
|
20673
|
-
top: '100%',
|
|
20674
|
-
zIndex: 1000,
|
|
20675
|
-
transformOrigin: '100% 0',
|
|
20676
|
-
marginTop: '10px',
|
|
20677
|
-
animation: 'so-input-fade .16s ease-in',
|
|
20678
|
-
maxWidth: '400px',
|
|
20679
|
-
padding: '5px 8px',
|
|
20680
20665
|
background: src.inputInfoBackgroundColor,
|
|
20681
|
-
|
|
20682
|
-
boxShadow: "0 0 0 1px ".concat(src.inputBorderColor),
|
|
20683
|
-
fontSize: '12px',
|
|
20684
|
-
color: src.inputInfoFontColor,
|
|
20685
|
-
'&::before': {
|
|
20686
|
-
display: 'block',
|
|
20687
|
-
position: 'absolute',
|
|
20688
|
-
bottom: '100%',
|
|
20689
|
-
transform: 'rotate(45deg) translateY(3px)',
|
|
20690
|
-
width: '6px',
|
|
20691
|
-
height: '6px',
|
|
20692
|
-
borderTop: "1px solid ".concat(src.inputBorderColor),
|
|
20693
|
-
borderLeft: "1px solid ".concat(src.inputBorderColor),
|
|
20694
|
-
background: 'inherit',
|
|
20695
|
-
content: "' '"
|
|
20696
|
-
},
|
|
20697
|
-
'&[dir=ltr]::before': {
|
|
20698
|
-
right: '4px'
|
|
20699
|
-
},
|
|
20700
|
-
'&[dir=rtl]::before': {
|
|
20701
|
-
left: '8px'
|
|
20702
|
-
}
|
|
20703
|
-
},
|
|
20704
|
-
infoError: {
|
|
20705
|
-
boxShadow: "0 0 0 1px ".concat(src.inputInfoErrorBorderColor),
|
|
20706
|
-
color: src.inputInfoErrorFontColor,
|
|
20707
|
-
background: src.inputInfoErrorBackgroundColor,
|
|
20708
|
-
'&::before': {
|
|
20709
|
-
borderColor: src.inputInfoErrorBorderColor
|
|
20710
|
-
}
|
|
20666
|
+
color: src.inputInfoFontColor
|
|
20711
20667
|
}
|
|
20712
20668
|
});
|
|
20713
20669
|
/* harmony default export */ var src_input_input = (input_input);
|
|
@@ -36415,7 +36371,7 @@ var useTip = function useTip(props) {
|
|
|
36415
36371
|
if (tip && focused || popover && errorMessage) {
|
|
36416
36372
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, objectSpread2_default()(objectSpread2_default()({
|
|
36417
36373
|
jssStyle: jssStyle,
|
|
36418
|
-
getPopupContainer: function
|
|
36374
|
+
getPopupContainer: (popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.getPopupContainer) || function () {
|
|
36419
36375
|
return rootRef.current;
|
|
36420
36376
|
},
|
|
36421
36377
|
useTextStyle: true
|
|
@@ -36460,6 +36416,7 @@ var useWithFormConfig = function useWithFormConfig(props) {
|
|
|
36460
36416
|
|
|
36461
36417
|
|
|
36462
36418
|
|
|
36419
|
+
|
|
36463
36420
|
var use_input_common_excluded = ["forwardRef", "forwardedRef", "htmlName", "value", "onChange", "defaultValue", "beforeChange", "clearable", "clearToUndefined", "style", "suffix", "info", "innerTitle", "placeTitle", "width", "delay", "onBlur", "tip", "error", "popover", "popoverProps", "status", "disabled", "size"];
|
|
36464
36421
|
|
|
36465
36422
|
|
|
@@ -36478,7 +36435,7 @@ var defaultInfo = function defaultInfo(num, msg) {
|
|
|
36478
36435
|
return new Error(text);
|
|
36479
36436
|
};
|
|
36480
36437
|
var useInputCommon = function useInputCommon(props0) {
|
|
36481
|
-
var _ref, _props$jssStyle, _props$jssStyle$input;
|
|
36438
|
+
var _ref, _props$jssStyle, _props$jssStyle$input, _infoState$error;
|
|
36482
36439
|
var config = useConfig();
|
|
36483
36440
|
var props = use_with_form_config(props0);
|
|
36484
36441
|
var forwardRef = props.forwardRef,
|
|
@@ -36507,7 +36464,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36507
36464
|
size = props.size,
|
|
36508
36465
|
rest = objectWithoutProperties_default()(props, use_input_common_excluded);
|
|
36509
36466
|
var delay = (_ref = delayProps !== null && delayProps !== void 0 ? delayProps : config.delay) !== null && _ref !== void 0 ? _ref : 0;
|
|
36510
|
-
var
|
|
36467
|
+
var inputClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$input = _props$jssStyle.input) === null || _props$jssStyle$input === void 0 ? void 0 : _props$jssStyle$input.call(_props$jssStyle);
|
|
36511
36468
|
var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
36512
36469
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
|
|
36513
36470
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
@@ -36549,27 +36506,50 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36549
36506
|
value: inputAbleProps.value,
|
|
36550
36507
|
onChange: inputAbleProps.onChange
|
|
36551
36508
|
});
|
|
36552
|
-
var
|
|
36509
|
+
var getInfoState = function getInfoState() {
|
|
36553
36510
|
var notNumber = typeof info !== 'number';
|
|
36554
|
-
if (typeof info !== 'function' && notNumber) return null;
|
|
36555
|
-
var
|
|
36556
|
-
|
|
36557
|
-
|
|
36558
|
-
|
|
36559
|
-
|
|
36560
|
-
|
|
36511
|
+
if (typeof info !== 'function' && typeof_default()(info) !== 'object' && notNumber) return null;
|
|
36512
|
+
var infoContent;
|
|
36513
|
+
if (typeof_default()(info) === 'object') {
|
|
36514
|
+
infoContent = info.content;
|
|
36515
|
+
} else {
|
|
36516
|
+
infoContent = info;
|
|
36517
|
+
}
|
|
36518
|
+
var notContentNumber = typeof infoContent !== 'number';
|
|
36519
|
+
var textInfo = notContentNumber ? infoContent : defaultInfo.bind(null, infoContent);
|
|
36520
|
+
var error = textInfo(inputAbleProps.value);
|
|
36521
|
+
if (!error) return null;
|
|
36522
|
+
var isError = error instanceof Error;
|
|
36523
|
+
var text = isError ? error.message : error;
|
|
36561
36524
|
if (!isError && !focused) return null;
|
|
36562
|
-
return
|
|
36525
|
+
return {
|
|
36526
|
+
text: text,
|
|
36527
|
+
error: error
|
|
36528
|
+
};
|
|
36529
|
+
};
|
|
36530
|
+
var infoState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(getInfoState, [info, inputAbleProps.value, focused]);
|
|
36531
|
+
var infoPopoverProps = {
|
|
36532
|
+
popover: props.popover || (typeof_default()(info) === 'object' ? info.position : 'bottom-right'),
|
|
36533
|
+
popoverProps: Object.assign({
|
|
36563
36534
|
style: {
|
|
36564
|
-
|
|
36535
|
+
width: 'auto',
|
|
36536
|
+
fontSize: 12
|
|
36565
36537
|
},
|
|
36566
|
-
|
|
36567
|
-
|
|
36568
|
-
|
|
36569
|
-
|
|
36538
|
+
adjust: true
|
|
36539
|
+
}, props.popoverProps),
|
|
36540
|
+
error: infoState !== null && infoState !== void 0 && infoState.error && (infoState === null || infoState === void 0 ? void 0 : infoState.error) instanceof Error ? infoState === null || infoState === void 0 || (_infoState$error = infoState.error) === null || _infoState$error === void 0 ? void 0 : _infoState$error.message : undefined,
|
|
36541
|
+
tip: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
36542
|
+
className: inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.info,
|
|
36543
|
+
children: infoState === null || infoState === void 0 ? void 0 : infoState.text
|
|
36544
|
+
})
|
|
36570
36545
|
};
|
|
36546
|
+
var infoPopoverNode = use_tip(objectSpread2_default()(objectSpread2_default()({}, infoPopoverProps), {}, {
|
|
36547
|
+
focused: focused,
|
|
36548
|
+
rootRef: rootRef,
|
|
36549
|
+
jssStyle: props.jssStyle
|
|
36550
|
+
}));
|
|
36571
36551
|
var mergeSuffix = /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
36572
|
-
children: [suffix,
|
|
36552
|
+
children: [suffix, (infoState === null || infoState === void 0 ? void 0 : infoState.text) && infoPopoverNode, tipNode]
|
|
36573
36553
|
});
|
|
36574
36554
|
var onFocusedChange = usePersistFn(function (focused) {
|
|
36575
36555
|
setFocused(!!focused);
|
|
@@ -36585,7 +36565,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36585
36565
|
});
|
|
36586
36566
|
return objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
36587
36567
|
value: inputAbleProps.value,
|
|
36588
|
-
className: classnames_default()(props.className, innerTitle && (
|
|
36568
|
+
className: classnames_default()(props.className, innerTitle && (inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.wrapperInnerTitle)),
|
|
36589
36569
|
onChange: inputAbleProps.onChange,
|
|
36590
36570
|
onBlur: handleBlur
|
|
36591
36571
|
}, clearProps), {}, {
|
|
@@ -49683,7 +49663,8 @@ var textarea_Textarea = function Textarea(props0) {
|
|
|
49683
49663
|
style: {
|
|
49684
49664
|
width: 'auto',
|
|
49685
49665
|
fontSize: 12
|
|
49686
|
-
}
|
|
49666
|
+
},
|
|
49667
|
+
adjust: true
|
|
49687
49668
|
}, resetProps.popoverProps),
|
|
49688
49669
|
error: infoState !== null && infoState !== void 0 && infoState.error && (infoState === null || infoState === void 0 ? void 0 : infoState.error) instanceof Error ? infoState === null || infoState === void 0 || (_infoState$error = infoState.error) === null || _infoState$error === void 0 ? void 0 : _infoState$error.message : undefined,
|
|
49689
49670
|
tip: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -71625,7 +71606,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
71625
71606
|
|
|
71626
71607
|
|
|
71627
71608
|
/* harmony default export */ var src_0 = ({
|
|
71628
|
-
version: '3.8.0-beta.
|
|
71609
|
+
version: '3.8.0-beta.6'
|
|
71629
71610
|
});
|
|
71630
71611
|
}();
|
|
71631
71612
|
/******/ return __webpack_exports__;
|