shineout 3.9.7-beta.1 → 3.9.7-beta.2

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 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.9.7-beta.1'
525
+ version: '3.9.7-beta.2'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
12401
12401
  };
12402
12402
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12403
12403
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12404
- /* harmony default export */ var version = ('3.9.7-beta.1');
12404
+ /* harmony default export */ var version = ('3.9.7-beta.2');
12405
12405
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12406
12406
 
12407
12407
 
@@ -23406,6 +23406,9 @@ var progressStyle = {
23406
23406
  flex: 1,
23407
23407
  minWidth: 0,
23408
23408
  overflow: 'hidden',
23409
+ '&:has($lineSuccess)': {
23410
+ position: 'relative'
23411
+ },
23409
23412
  '$lineDefault &': {
23410
23413
  height: src.progressLineHeight,
23411
23414
  borderRadius: src.progressLineHeight
@@ -23416,6 +23419,20 @@ var progressStyle = {
23416
23419
  },
23417
23420
  background: src.progressBackground
23418
23421
  },
23422
+ lineSuccess: {
23423
+ position: 'absolute',
23424
+ transition: 'width 0.32s linear',
23425
+ left: 0,
23426
+ top: 0,
23427
+ height: '100%',
23428
+ boxSizing: 'border-box',
23429
+ borderRadius: 'inherit',
23430
+ zIndex: 2,
23431
+ backgroundColor: src.progressSuccessFrontBackgroundColor,
23432
+ '& + $lineFront': {
23433
+ zIndex: 1
23434
+ }
23435
+ },
23419
23436
  lineFront: {
23420
23437
  position: 'relative',
23421
23438
  transition: 'width 0.32s linear',
@@ -23564,6 +23581,12 @@ var progressStyle = {
23564
23581
  '$wrapperDanger &': {
23565
23582
  stroke: src.progressDangerFrontBackgroundColor
23566
23583
  }
23584
+ },
23585
+ circleSuccess: {
23586
+ transform: 'rotate(-90deg)',
23587
+ transformOrigin: '50% 50%',
23588
+ transition: 'stroke-dashoffset .32s ease 0s,stroke-dasharray .32s ease 0s,stroke .32s,stroke-width .06s ease .32s',
23589
+ stroke: src.progressSuccessFrontBackgroundColor
23567
23590
  }
23568
23591
  };
23569
23592
  /* harmony default export */ var progress_progress = (progressStyle);
@@ -61972,6 +61995,8 @@ var LinePopUp = function LinePopUp(props) {
61972
61995
 
61973
61996
 
61974
61997
 
61998
+
61999
+
61975
62000
  var Line = function Line(props) {
61976
62001
  var _props$jssStyle;
61977
62002
  var _props$shape = props.shape,
@@ -61981,7 +62006,8 @@ var Line = function Line(props) {
61981
62006
  _props$type = props.type,
61982
62007
  type = _props$type === void 0 ? 'info' : _props$type,
61983
62008
  iconSize = props.iconSize,
61984
- popup = props.popup;
62009
+ popup = props.popup,
62010
+ success = props.success;
61985
62011
  var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
61986
62012
  var isInner = shape === 'line-inner';
61987
62013
  var isInnerRight = isInner && value < 10;
@@ -62010,21 +62036,41 @@ var Line = function Line(props) {
62010
62036
  return p ? "".concat(p, ",").concat(col) : col;
62011
62037
  }, ''), ")");
62012
62038
  }
62039
+
62040
+ // Success progress bar style
62041
+ var successStyle = success ? {
62042
+ width: "".concat(success.value / 100 * 100, "%"),
62043
+ borderRadius: props.strokeWidth && props.strokeWidth / 2
62044
+ } : undefined;
62045
+ if (successStyle && success) {
62046
+ if (typeof success.color === 'string') {
62047
+ successStyle.background = success.color;
62048
+ successStyle.backgroundSize = '1em 1em';
62049
+ } else if (typeof_default()(success.color) === 'object') {
62050
+ successStyle.background = "linear-gradient(to right, ".concat(analyzeColor(success.color).reduce(function (p, v) {
62051
+ var col = "".concat(v.color, " ").concat(v.pos);
62052
+ return p ? "".concat(p, ",").concat(col) : col;
62053
+ }, ''), ")");
62054
+ }
62055
+ }
62013
62056
  var children = props.children ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62014
62057
  className: classnames_default()(progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content),
62015
62058
  children: props.children
62016
62059
  }) : null;
62017
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
62060
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
62018
62061
  className: mc,
62019
62062
  style: props.style,
62020
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62063
+ children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
62021
62064
  className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineBg,
62022
62065
  style: bgStyle,
62023
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62066
+ children: [success && successStyle && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62067
+ className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineSuccess,
62068
+ style: successStyle
62069
+ }), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62024
62070
  className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.lineFront,
62025
62071
  style: frontStyle,
62026
62072
  children: isInner && children
62027
- })
62073
+ })]
62028
62074
  }), isDefaultPop ? /*#__PURE__*/(0,jsx_runtime.jsx)(line_popup, {
62029
62075
  value: value,
62030
62076
  jssStyle: props.jssStyle,
@@ -62034,7 +62080,7 @@ var Line = function Line(props) {
62034
62080
  style: iconStyle,
62035
62081
  children: [type === 'info' && icons_config.progress.InfoLine, type === 'warning' && icons_config.progress.WarningLine, type === 'success' && icons_config.progress.SuccessLine, type === 'danger' && icons_config.progress.DangerLine]
62036
62082
  })]
62037
- });
62083
+ }));
62038
62084
  };
62039
62085
  /* harmony default export */ var line = (Line);
62040
62086
  ;// CONCATENATED MODULE: ../base/src/progress/circle.tsx
@@ -62045,6 +62091,8 @@ var Line = function Line(props) {
62045
62091
 
62046
62092
 
62047
62093
 
62094
+
62095
+
62048
62096
  var Circle = function Circle(props) {
62049
62097
  var _props$jssStyle;
62050
62098
  var _props$value = props.value,
@@ -62058,7 +62106,8 @@ var Circle = function Circle(props) {
62058
62106
  size = _props$size === void 0 ? 64 : _props$size,
62059
62107
  _props$strokeLinecap = props.strokeLinecap,
62060
62108
  strokeLinecap = _props$strokeLinecap === void 0 ? 'round' : _props$strokeLinecap,
62061
- iconSize = props.iconSize;
62109
+ iconSize = props.iconSize,
62110
+ success = props.success;
62062
62111
  var progressClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 ? void 0 : _props$jssStyle.progress();
62063
62112
  var iconStyle = {
62064
62113
  width: iconSize,
@@ -62076,8 +62125,13 @@ var Circle = function Circle(props) {
62076
62125
  }, props.style);
62077
62126
  var width = value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
62078
62127
  var objColor = color && typeof_default()(color) === 'object';
62128
+
62129
+ // Success circle calculation
62130
+ var successDasharray = success ? [p * (success.value / 100), p * (1 - success.value / 100)] : null;
62131
+ var successWidth = success && success.value === 0 && strokeLinecap === 'round' ? 0 : strokeWidth;
62132
+ var objSuccessColor = (success === null || success === void 0 ? void 0 : success.color) && typeof_default()(success.color) === 'object';
62079
62133
  var mc = classnames_default()(props.className, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.rootClass, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circle, progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapper, type === 'success' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperSuccess), type === 'info' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperInfo), type === 'warning' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperWarning), type === 'danger' && (progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.wrapperDanger));
62080
- return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
62134
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, extractProps(props, 'mouse')), {}, {
62081
62135
  className: mc,
62082
62136
  style: style,
62083
62137
  children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("svg", {
@@ -62096,6 +62150,20 @@ var Circle = function Circle(props) {
62096
62150
  }, c.pos);
62097
62151
  })
62098
62152
  })
62153
+ }) : null, objSuccessColor && success !== null && success !== void 0 && success.color && typeof_default()(success.color) === 'object' ? /*#__PURE__*/(0,jsx_runtime.jsx)("defs", {
62154
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("linearGradient", {
62155
+ id: "progress-success-linear",
62156
+ x1: "50%",
62157
+ x2: "50%",
62158
+ y1: "0%",
62159
+ y2: "100%",
62160
+ children: analyzeColor(success.color).map(function (c) {
62161
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("stop", {
62162
+ offset: c.pos,
62163
+ stopColor: c.color
62164
+ }, c.pos);
62165
+ })
62166
+ })
62099
62167
  }) : null, /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
62100
62168
  className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleBg,
62101
62169
  cx: cx,
@@ -62118,6 +62186,18 @@ var Circle = function Circle(props) {
62118
62186
  strokeDasharray: dasharray,
62119
62187
  strokeLinecap: strokeLinecap,
62120
62188
  strokeWidth: width
62189
+ }), success && successDasharray && /*#__PURE__*/(0,jsx_runtime.jsx)("circle", {
62190
+ className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.circleSuccess,
62191
+ cx: cx,
62192
+ cy: cy,
62193
+ r: r,
62194
+ fill: "transparent",
62195
+ style: {
62196
+ stroke: objSuccessColor ? "url('#progress-success-linear')" : typeof success.color === 'string' ? success.color : undefined
62197
+ },
62198
+ strokeDasharray: successDasharray,
62199
+ strokeLinecap: strokeLinecap,
62200
+ strokeWidth: successWidth
62121
62201
  })]
62122
62202
  }), !showIcon && props.children && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
62123
62203
  className: progressClasses === null || progressClasses === void 0 ? void 0 : progressClasses.content,
@@ -62127,7 +62207,7 @@ var Circle = function Circle(props) {
62127
62207
  style: iconStyle,
62128
62208
  children: [type === 'info' && icons_config.progress.InfoCircle, type === 'warning' && icons_config.progress.WarningCircle, type === 'success' && icons_config.progress.SuccessCircle, type === 'danger' && icons_config.progress.DangerCircle]
62129
62209
  })]
62130
- });
62210
+ }));
62131
62211
  };
62132
62212
  /* harmony default export */ var circle = (Circle);
62133
62213
  ;// CONCATENATED MODULE: ../base/src/progress/progress.tsx
@@ -74878,7 +74958,7 @@ var upload_interface = __webpack_require__(8821);
74878
74958
 
74879
74959
 
74880
74960
  /* harmony default export */ var src_0 = ({
74881
- version: '3.9.7-beta.1'
74961
+ version: '3.9.7-beta.2'
74882
74962
  });
74883
74963
  }();
74884
74964
  /******/ return __webpack_exports__;