diginet-core-ui 1.3.81 → 1.3.82

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.
@@ -167,12 +167,12 @@ const CircularProgress = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
167
167
  const radius = Math.max(0, (containerW - circleStrokeW) / 2);
168
168
  const radiusX10 = radius * 10;
169
169
  const circumference = radius * 2 * Math.PI;
170
- const _ContainerCSS = ContainerCSS(containerW);
170
+ const _ContainerCSS = ContainerCSS(containerW, directionAngle);
171
171
  const _CircleBackgroundCSS = CircleBackgroundCSS(background, !determinate);
172
172
  const _CircleMainCSS = CircleMainCSS(color);
173
173
  const _CircleMainIndeterminateCSS = CircleMainIndeterminateCSS(radiusX10);
174
- const _CircleMainDeterminateCSS = CircleMainDeterminateCSS(circumference, percent, directionAngle, duration);
175
- const _TextCSS = TextCSS(percentColor, color, dimension);
174
+ const _CircleMainDeterminateCSS = CircleMainDeterminateCSS(circumference, percent, duration);
175
+ const _TextCSS = TextCSS(percentColor, color, dimension, directionAngle);
176
176
  useImperativeHandle(reference, () => {
177
177
  const currentRef = ref.current || {};
178
178
  currentRef.element = ref.current;
@@ -234,9 +234,11 @@ const keyframeDash = r => keyframes`
234
234
  stroke-dashoffset: -${r * 124 / 200};
235
235
  }
236
236
  `;
237
- const ContainerCSS = containerW => css`
237
+ const ContainerCSS = (containerW, directionAngle) => css`
238
238
  ${displayInlineBlock};
239
239
  ${parseWidthHeight(containerW)};
240
+ transform: rotate(${directionAngle}deg);
241
+ transform-origin: center;
240
242
  `;
241
243
  const AnimationRotateCSS = css`
242
244
  animation: ${keyframeRotate} 2s linear infinite;
@@ -251,11 +253,9 @@ const CircleMainCSS = color => css`
251
253
  stroke: ${color};
252
254
  stroke-linecap: round;
253
255
  `;
254
- const CircleMainDeterminateCSS = (circumference, percent, directionAngle, duration) => css`
256
+ const CircleMainDeterminateCSS = (circumference, percent, duration) => css`
255
257
  stroke-dasharray: ${`${circumference} ${circumference}`};
256
258
  stroke-dashoffset: ${circumference - validatePercent(percent) / 100 * circumference};
257
- // transform: rotate(${directionAngle}deg);
258
- transform-origin: center;
259
259
  transition: stroke-dashoffset ${duration}s cubic-bezier(0.77, 0, 0.175, 1); /* easeInOutQuart */
260
260
  `;
261
261
  const CircleMainIndeterminateCSS = radiusX10 => css`
@@ -263,11 +263,13 @@ const CircleMainIndeterminateCSS = radiusX10 => css`
263
263
  stroke-dashoffset: 0;
264
264
  animation: ${keyframeDash(radiusX10)} 2s ease-in-out infinite;
265
265
  `;
266
- const TextCSS = (percentColor, color, dimension) => css`
266
+ const TextCSS = (percentColor, color, dimension, directionAngle) => css`
267
267
  ${userSelectNone};
268
268
  fill: ${percentColor ? percentColor : color};
269
269
  ${dimension.labelStyle}
270
270
  text-anchor: middle;
271
+ transform: rotate(${-directionAngle}deg);
272
+ transform-origin: center;
271
273
  `;
272
274
  CircularProgress.defaultProps = {
273
275
  background: lineCategory,
@@ -278,7 +280,7 @@ CircularProgress.defaultProps = {
278
280
  duration: 1,
279
281
  percent: 25,
280
282
  percentColor: semanticInfo,
281
- showValue: false,
283
+ showValue: true,
282
284
  size: 'medium',
283
285
  style: {}
284
286
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.81",
3
+ "version": "1.3.82",
4
4
  "description": "The DigiNet core ui",
5
5
  "homepage": "https://diginet.com.vn",
6
6
  "main": "index.js",
package/readme.md CHANGED
@@ -38,6 +38,9 @@ npm test
38
38
  ```
39
39
 
40
40
  ## Changelog
41
+ ## 1.3.82
42
+ - \[Fixed\]: CircularProgress – Fix transform rotate wrong inside flex column
43
+
41
44
  ## 1.3.81
42
45
  - \[Added\]: Icon – Feedback, Newspaper
43
46
  - \[Changed\]: Button – Add prop href, urlParams