@nutui/nutui-react 3.0.5 → 3.0.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/dist/cjs/packages/badge/badge.js +4 -3
  3. package/dist/cjs/packages/badge/style/badge.scss +4 -0
  4. package/dist/cjs/packages/badge/style/style.css +9 -6
  5. package/dist/cjs/packages/configprovider/types.d.ts +1 -1
  6. package/dist/cjs/packages/datepicker/style/style.css +3 -0
  7. package/dist/cjs/packages/datepickerview/style/style.css +3 -0
  8. package/dist/cjs/packages/fixednav/style/style.css +9 -6
  9. package/dist/cjs/packages/indicator/indicator.js +1 -1
  10. package/dist/cjs/packages/lottie/index.d.ts +1 -1
  11. package/dist/cjs/packages/lottie/index.js +2 -2
  12. package/dist/cjs/packages/notify/Notification.d.ts +3 -9
  13. package/dist/cjs/packages/notify/Notification.js +27 -7
  14. package/dist/cjs/packages/notify/notify.d.ts +0 -4
  15. package/dist/cjs/packages/notify/notify.js +6 -34
  16. package/dist/cjs/packages/notify/style/notify.scss +39 -36
  17. package/dist/cjs/packages/notify/style/style.css +36 -31
  18. package/dist/cjs/packages/picker/style/style.css +3 -0
  19. package/dist/cjs/packages/pickerview/style/pickerview.scss +3 -0
  20. package/dist/cjs/packages/pickerview/style/style.css +3 -0
  21. package/dist/cjs/packages/skeleton/skeleton.js +64 -49
  22. package/dist/cjs/packages/skeleton/style/index.js +0 -1
  23. package/dist/cjs/packages/skeleton/style/skeleton.scss +40 -46
  24. package/dist/cjs/packages/skeleton/style/style.css +32 -175
  25. package/dist/cjs/packages/switch/style/style.css +5 -0
  26. package/dist/cjs/packages/switch/style/switch.scss +5 -0
  27. package/dist/cjs/packages/switch/switch.js +22 -11
  28. package/dist/cjs/packages/tabbar/style/style.css +54 -45
  29. package/dist/cjs/packages/tabbar/style/tabbar.scss +28 -19
  30. package/dist/cjs/packages/tabbar/tabbar.js +28 -10
  31. package/dist/cjs/packages/tabbaritem/style/style.css +30 -27
  32. package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +32 -29
  33. package/dist/cjs/packages/tabbaritem/tabbaritem.js +34 -13
  34. package/dist/cjs/types/spec/badge/base.d.ts +1 -0
  35. package/dist/cjs/types/spec/indicator/base.d.ts +1 -1
  36. package/dist/cjs/types/spec/notify/base.d.ts +7 -2
  37. package/dist/cjs/types/spec/searchbar/taro.d.ts +10 -7
  38. package/dist/cjs/types/spec/skeleton/base.d.ts +7 -5
  39. package/dist/cjs/types/spec/switch/base.d.ts +3 -2
  40. package/dist/cjs/types/spec/switch/h5.d.ts +1 -1
  41. package/dist/cjs/types/spec/switch/taro.d.ts +1 -4
  42. package/dist/cjs/types/spec/tabbar/base.d.ts +7 -4
  43. package/dist/es/packages/badge/badge.js +4 -3
  44. package/dist/es/packages/badge/style/badge.scss +4 -0
  45. package/dist/es/packages/badge/style/style.css +9 -6
  46. package/dist/es/packages/configprovider/types.d.ts +1 -1
  47. package/dist/es/packages/datepicker/style/style.css +3 -0
  48. package/dist/es/packages/datepickerview/style/style.css +3 -0
  49. package/dist/es/packages/fixednav/style/style.css +9 -6
  50. package/dist/es/packages/indicator/indicator.js +1 -1
  51. package/dist/es/packages/lottie/index.d.ts +1 -1
  52. package/dist/es/packages/lottie/index.js +1 -1
  53. package/dist/es/packages/notify/Notification.d.ts +3 -9
  54. package/dist/es/packages/notify/Notification.js +27 -7
  55. package/dist/es/packages/notify/notify.d.ts +0 -4
  56. package/dist/es/packages/notify/notify.js +6 -34
  57. package/dist/es/packages/notify/style/notify.scss +39 -36
  58. package/dist/es/packages/notify/style/style.css +36 -31
  59. package/dist/es/packages/picker/style/style.css +3 -0
  60. package/dist/es/packages/pickerview/style/pickerview.scss +3 -0
  61. package/dist/es/packages/pickerview/style/style.css +3 -0
  62. package/dist/es/packages/skeleton/skeleton.js +63 -49
  63. package/dist/es/packages/skeleton/style/index.js +0 -1
  64. package/dist/es/packages/skeleton/style/skeleton.scss +40 -46
  65. package/dist/es/packages/skeleton/style/style.css +32 -175
  66. package/dist/es/packages/switch/style/style.css +5 -0
  67. package/dist/es/packages/switch/style/switch.scss +5 -0
  68. package/dist/es/packages/switch/switch.js +21 -11
  69. package/dist/es/packages/tabbar/style/style.css +54 -45
  70. package/dist/es/packages/tabbar/style/tabbar.scss +28 -19
  71. package/dist/es/packages/tabbar/tabbar.js +27 -10
  72. package/dist/es/packages/tabbaritem/style/style.css +30 -27
  73. package/dist/es/packages/tabbaritem/style/tabbaritem.scss +32 -29
  74. package/dist/es/packages/tabbaritem/tabbaritem.js +34 -13
  75. package/dist/es/types/spec/badge/base.d.ts +4 -0
  76. package/dist/es/types/spec/indicator/base.d.ts +1 -1
  77. package/dist/es/types/spec/notify/base.d.ts +22 -5
  78. package/dist/es/types/spec/searchbar/taro.d.ts +10 -7
  79. package/dist/es/types/spec/skeleton/base.d.ts +19 -14
  80. package/dist/es/types/spec/switch/base.d.ts +6 -2
  81. package/dist/es/types/spec/switch/h5.d.ts +1 -1
  82. package/dist/es/types/spec/switch/taro.d.ts +1 -4
  83. package/dist/es/types/spec/tabbar/base.d.ts +7 -4
  84. package/dist/nutui.react.umd.js +334 -284
  85. package/dist/style.css +1 -1
  86. package/dist/style.scss +45 -45
  87. package/dist/styles/variables-jmapp.scss +23 -1
  88. package/dist/styles/variables-jrkf.scss +23 -1
  89. package/dist/styles/variables.scss +35 -37
  90. package/package.json +1 -1
  91. /package/dist/cjs/packages/lottie/{web.d.ts → lottie.d.ts} +0 -0
  92. /package/dist/cjs/packages/lottie/{web.js → lottie.js} +0 -0
  93. /package/dist/es/packages/lottie/{web.d.ts → lottie.d.ts} +0 -0
  94. /package/dist/es/packages/lottie/{web.js → lottie.js} +0 -0
@@ -6,7 +6,7 @@
6
6
  /*入场动画过程*/
7
7
  .fade-enter-active {
8
8
  opacity: 1;
9
- transition: opacity 1s;
9
+ transition: opacity 300ms ease-in;
10
10
  }
11
11
 
12
12
  /*入场动画结束*/
@@ -22,7 +22,7 @@
22
22
  /*离场动画过程*/
23
23
  .fade-exit-active {
24
24
  opacity: 0;
25
- transition: opacity 1s;
25
+ transition: opacity 300ms ease-out;
26
26
  }
27
27
 
28
28
  /*离场动画结束*/
@@ -38,56 +38,59 @@
38
38
  /*页面第一次加载时的动画过程*/
39
39
  .fade-appear-active {
40
40
  opacity: 1;
41
- transition: opacity 1s;
41
+ transition: opacity 300ms;
42
42
  }
43
43
 
44
44
  .nut-notify {
45
+ position: fixed;
46
+ left: 8px;
47
+ right: 8px;
48
+ z-index: $notify-z-index;
45
49
  display: flex;
46
- justify-content: center;
47
50
  align-items: center;
48
51
  box-sizing: border-box;
49
- padding: $notify-padding;
50
- color: $notify-text-color;
51
- font-size: $notify-font-size;
52
- white-space: pre-wrap;
53
- word-wrap: break-word;
54
52
  height: $notify-height;
55
-
56
- &-popup-top,
57
- &-popup-bottom {
58
- position: fixed;
59
- left: 0;
60
- right: 0;
61
- overflow-y: auto;
62
- transition: transform 0.3s;
63
- z-index: 9999;
64
- }
65
-
66
- &-popup-top {
67
- top: 0;
68
- }
69
-
70
- &-popup-bottom {
71
- bottom: 0;
53
+ padding: $notify-padding;
54
+ border-radius: $notify-border-radius;
55
+ box-shadow: $notify-box-shadow;
56
+ background-color: $notify-background-color;
57
+
58
+ &-content {
59
+ flex: 1;
60
+ text-align: center;
61
+ min-width: 0;
62
+ font-size: $notify-font-size;
63
+ color: $notify-text-color;
64
+ white-space: nowrap;
65
+ overflow: hidden;
72
66
  }
73
67
 
74
- &-base {
75
- background: $notify-base-background-color;
68
+ &-ellipsis {
69
+ text-overflow: ellipsis;
76
70
  }
77
71
 
78
- &-primary {
79
- background: $notify-primary-background-color;
72
+ &-layout-left {
73
+ text-align: left;
80
74
  }
81
75
 
82
- &-success {
83
- background: $notify-success-background-color;
76
+ &-left-icon,
77
+ &-right-icon {
78
+ display: inline-flex;
84
79
  }
85
80
 
86
- &-danger {
87
- background: $notify-danger-background-color;
81
+ &-left-icon {
82
+ margin-right: 6px;
83
+ .nut-icon {
84
+ height: 16px;
85
+ width: 16px;
86
+ }
88
87
  }
89
88
 
90
- &-warning {
91
- background: $notify-warning-background-color;
89
+ &-right-icon {
90
+ margin-left: 6px;
91
+ .nut-icon {
92
+ height: 12px;
93
+ width: 12px;
94
+ }
92
95
  }
93
96
  }
@@ -11,7 +11,7 @@
11
11
  /*入场动画过程*/
12
12
  .fade-enter-active {
13
13
  opacity: 1;
14
- transition: opacity 1s;
14
+ transition: opacity 300ms ease-in;
15
15
  }
16
16
 
17
17
  /*入场动画结束*/
@@ -27,7 +27,7 @@
27
27
  /*离场动画过程*/
28
28
  .fade-exit-active {
29
29
  opacity: 0;
30
- transition: opacity 1s;
30
+ transition: opacity 300ms ease-out;
31
31
  }
32
32
 
33
33
  /*离场动画结束*/
@@ -43,47 +43,52 @@
43
43
  /*页面第一次加载时的动画过程*/
44
44
  .fade-appear-active {
45
45
  opacity: 1;
46
- transition: opacity 1s;
46
+ transition: opacity 300ms;
47
47
  }
48
48
 
49
49
  .nut-notify {
50
+ position: fixed;
51
+ left: 8px;
52
+ right: 8px;
53
+ z-index: var(--nutui-notify-z-index, 1000);
50
54
  display: flex;
51
- justify-content: center;
52
55
  align-items: center;
53
56
  box-sizing: border-box;
54
- padding: var(--nutui-notify-padding, 0px 10px);
55
- color: var(--nutui-notify-text-color, #ffffff);
56
- font-size: var(--nutui-notify-font-size, var(--nutui-font-size-base, 14px));
57
- white-space: pre-wrap;
58
- word-wrap: break-word;
59
57
  height: var(--nutui-notify-height, 40px);
58
+ padding: var(--nutui-notify-padding, 0px 12px);
59
+ border-radius: var(--nutui-notify-border-radius, 8px);
60
+ box-shadow: var(--nutui-notify-box-shadow, 0px 4px 12px 0px rgba(0, 0, 0, 0.06));
61
+ background-color: var(--nutui-notify-background-color, #ffffff);
62
+ }
63
+ .nut-notify-content {
64
+ flex: 1;
65
+ text-align: center;
66
+ min-width: 0;
67
+ font-size: var(--nutui-notify-font-size, var(--nutui-font-size-base, 14px));
68
+ color: var(--nutui-notify-text-color, var(--nutui-color-title, #1a1a1a));
69
+ white-space: nowrap;
70
+ overflow: hidden;
60
71
  }
61
- .nut-notify-popup-top, .nut-notify-popup-bottom {
62
- position: fixed;
63
- left: 0;
64
- right: 0;
65
- overflow-y: auto;
66
- transition: transform 0.3s;
67
- z-index: 9999;
68
- }
69
- .nut-notify-popup-top {
70
- top: 0;
72
+ .nut-notify-ellipsis {
73
+ text-overflow: ellipsis;
71
74
  }
72
- .nut-notify-popup-bottom {
73
- bottom: 0;
75
+ .nut-notify-layout-left {
76
+ text-align: left;
74
77
  }
75
- .nut-notify-base {
76
- background: var(--nutui-notify-base-background-color, var(--nutui-color-primary, #ff0f23));
78
+ .nut-notify-left-icon, .nut-notify-right-icon {
79
+ display: inline-flex;
77
80
  }
78
- .nut-notify-primary {
79
- background: var(--nutui-notify-primary-background-color, var(--nutui-color-info, #0073ff));
81
+ .nut-notify-left-icon {
82
+ margin-right: 6px;
80
83
  }
81
- .nut-notify-success {
82
- background: var(--nutui-notify-success-background-color, var(--nutui-color-success, #00d900));
84
+ .nut-notify-left-icon .nut-icon {
85
+ height: 16px;
86
+ width: 16px;
83
87
  }
84
- .nut-notify-danger {
85
- background: var(--nutui-notify-danger-background-color, var(--nutui-color-primary, #ff0f23));
88
+ .nut-notify-right-icon {
89
+ margin-left: 6px;
86
90
  }
87
- .nut-notify-warning {
88
- background: var(--nutui-notify-warning-background-color, var(--nutui-color-warning, #ffbf00));
91
+ .nut-notify-right-icon .nut-icon {
92
+ height: 12px;
93
+ width: 12px;
89
94
  }
@@ -429,6 +429,9 @@
429
429
  z-index: 1;
430
430
  transform-style: preserve-3d;
431
431
  }
432
+ .nut-pickerview-roller-placeholder {
433
+ height: var(--nutui-picker-item-height, 36px);
434
+ }
432
435
  .nut-pickerview-roller-item {
433
436
  position: absolute;
434
437
  top: 0;
@@ -49,6 +49,9 @@
49
49
  height: $picker-item-height;
50
50
  z-index: 1;
51
51
  transform-style: preserve-3d;
52
+ &-placeholder {
53
+ height: $picker-item-height;
54
+ }
52
55
  }
53
56
 
54
57
  &-roller-item {
@@ -48,6 +48,9 @@
48
48
  z-index: 1;
49
49
  transform-style: preserve-3d;
50
50
  }
51
+ .nut-pickerview-roller-placeholder {
52
+ height: var(--nutui-picker-item-height, 36px);
53
+ }
51
54
  .nut-pickerview-roller-item {
52
55
  position: absolute;
53
56
  top: 0;
@@ -1,77 +1,91 @@
1
- import { _ as _define_property } from "@swc/helpers/_/_define_property";
2
1
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
3
2
  import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
4
3
  import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
5
- import React from "react";
4
+ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
+ import React, { useEffect, useState } from "react";
6
6
  import classNames from "classnames";
7
- import Avatar from "../avatar";
8
7
  import { ComponentDefaults } from "../../utils/typings";
9
8
  var defaultProps = _object_spread_props(_object_spread({}, ComponentDefaults), {
10
9
  rows: 1,
11
- animated: false,
12
- title: false,
13
- avatar: false,
14
- avatarSize: '50px',
10
+ animated: true,
15
11
  visible: false,
16
- avatarShape: 'round'
12
+ size: 'normal',
13
+ shape: 'round',
14
+ duration: 0.6,
15
+ inline: false
17
16
  });
18
17
  export var Skeleton = function(props) {
19
- var _ref = _object_spread({}, defaultProps, props), className = _ref.className, animated = _ref.animated, rows = _ref.rows, title = _ref.title, avatar = _ref.avatar, avatarSize = _ref.avatarSize, visible = _ref.visible, children = _ref.children, avatarShape = _ref.avatarShape, rest = _object_without_properties(_ref, [
18
+ var shapeStyle = function shapeStyle() {
19
+ if (shape === 'circle') return {
20
+ borderRadius: '50%'
21
+ };
22
+ if (shape === 'square') return {
23
+ borderRadius: '0'
24
+ };
25
+ return {};
26
+ };
27
+ var durationStyle = function durationStyle() {
28
+ if (typeof duration !== 'undefined') return {
29
+ animationDuration: "".concat(duration, "s")
30
+ };
31
+ return {};
32
+ };
33
+ var _ref = _object_spread({}, defaultProps, props), className = _ref.className, width = _ref.width, height = _ref.height, shape = _ref.shape, animated = _ref.animated, rows = _ref.rows, visible = _ref.visible, size = _ref.size, duration = _ref.duration, children = _ref.children, rest = _object_without_properties(_ref, [
20
34
  "className",
35
+ "width",
36
+ "height",
37
+ "shape",
21
38
  "animated",
22
39
  "rows",
23
- "title",
24
- "avatar",
25
- "avatarSize",
26
40
  "visible",
27
- "children",
28
- "avatarShape"
41
+ "size",
42
+ "duration",
43
+ "children"
29
44
  ]);
30
45
  var classPrefix = 'nut-skeleton';
31
46
  var classes = classNames(classPrefix, className);
32
- var _obj;
33
- var avatarClass = classNames((_obj = {}, _define_property(_obj, "nut-avatar", true), _define_property(_obj, "nut-skeleton-content-avatar", true), _define_property(_obj, "avatar-".concat(avatarShape), avatarShape), _obj));
34
- var repeatLines = function(num) {
47
+ var repeatCount = function(num) {
35
48
  return Array.from({
36
49
  length: num
37
50
  }, function(v, i) {
38
51
  return i;
39
52
  });
40
53
  };
41
- var getStyle = function() {
42
- if (avatarSize) {
43
- return {
44
- width: avatarSize,
45
- height: avatarSize
46
- };
47
- }
48
- return {
49
- width: '50px',
50
- height: '50px'
51
- };
54
+ var _useState = _sliced_to_array(useState(false), 2), animate = _useState[0], setAnimate = _useState[1];
55
+ var playAnimation = function() {
56
+ setAnimate(false) // 首先将 animate 设置为 false
57
+ ;
58
+ setTimeout(function() {
59
+ setAnimate(true) // 1 毫秒后再设置为 true,触发动画
60
+ ;
61
+ }, 10);
52
62
  };
53
- return /*#__PURE__*/ React.createElement(React.Fragment, null, visible ? /*#__PURE__*/ React.createElement(React.Fragment, null, children) : /*#__PURE__*/ React.createElement("div", _object_spread({
63
+ useEffect(function() {
64
+ if (!animated) return;
65
+ playAnimation();
66
+ // 每隔 3 秒播放一次动画
67
+ var intervalId = setInterval(playAnimation, 1000 + duration * 1000) // xs 动画 + 1s 间隔
68
+ ;
69
+ // 清理定时器
70
+ return function() {
71
+ return clearInterval(intervalId);
72
+ };
73
+ }, []);
74
+ return /*#__PURE__*/ React.createElement(React.Fragment, null, visible ? children : /*#__PURE__*/ React.createElement("div", _object_spread({
54
75
  className: classes
55
- }, rest), animated && /*#__PURE__*/ React.createElement("div", {
56
- className: "".concat(classPrefix, "-animation")
57
- }), /*#__PURE__*/ React.createElement("div", {
58
- className: "".concat(classPrefix, "-content")
59
- }, avatar && /*#__PURE__*/ React.createElement(Avatar, {
60
- className: avatarClass,
61
- shape: avatarShape,
62
- style: getStyle(),
63
- icon: "null"
64
- }), rows === 1 ? /*#__PURE__*/ React.createElement("div", {
65
- className: "".concat(classPrefix, "-content-block")
66
- }) : /*#__PURE__*/ React.createElement("div", {
67
- className: "".concat(classPrefix, "-content-line")
68
- }, title && /*#__PURE__*/ React.createElement("div", {
69
- className: "".concat(classPrefix, "-content-title")
70
- }), repeatLines(rows).map(function(item, index) {
76
+ }, rest), repeatCount(rows).map(function(item, index) {
77
+ var contentClass = "".concat(classPrefix, "-content ").concat(classPrefix, "-content-").concat(size, " ").concat(classPrefix, "-content-").concat(size, "-").concat(index);
71
78
  return /*#__PURE__*/ React.createElement("div", {
72
- className: "".concat(classPrefix, "-content-block"),
73
- key: index
74
- });
75
- })))));
79
+ className: "".concat(contentClass),
80
+ key: index,
81
+ style: _object_spread({
82
+ width: width,
83
+ height: height
84
+ }, shapeStyle())
85
+ }, animated && /*#__PURE__*/ React.createElement("div", {
86
+ className: "".concat(classPrefix, "-animated ").concat(animate ? "".concat(classPrefix, "-animation") : ''),
87
+ style: durationStyle()
88
+ }));
89
+ })));
76
90
  };
77
91
  Skeleton.displayName = 'NutSkeleton';
@@ -1,2 +1 @@
1
- import '../../avatar/style';
2
1
  import './skeleton.scss';
@@ -1,44 +1,29 @@
1
1
  .nut-skeleton {
2
- display: inline-block;
3
- position: relative;
4
- overflow: hidden;
5
- vertical-align: middle;
6
- width: 100%;
2
+ line-height: 0px;
3
+ font-size: 0px;
7
4
 
8
5
  &-content {
9
- display: flex;
10
- flex-direction: row;
6
+ position: relative;
7
+ display: inline-flex;
8
+ width: $skeleton-line-width;
9
+ background: $skeleton-background;
10
+ border-radius: $skeleton-line-border-radius;
11
+ overflow: hidden;
11
12
 
12
- &-avatar {
13
- margin-right: 20px;
14
- background: $skeleton-background !important;
13
+ &-normal {
14
+ height: $skeleton-line-normal-height;
15
15
  }
16
16
 
17
- &-block {
18
- width: $skeleton-line-width;
19
- height: $skeleton-line-height;
20
- background: $skeleton-background;
21
- margin-top: 10px;
22
- border-radius: $skeleton-line-border-radius;
17
+ &-large {
18
+ height: $skeleton-line-large-height;
23
19
  }
24
20
 
25
- &-line {
26
- width: 100%;
27
- display: flex;
28
- flex-direction: column;
29
- .nut-skeleton-content-block:last-child {
30
- width: 70%;
31
- }
21
+ &-small {
22
+ height: $skeleton-line-small-height;
23
+ margin-top: 8px;
32
24
  }
33
-
34
- &-title {
35
- width: 30%;
36
- height: $skeleton-line-height;
37
- background: $skeleton-background;
38
- }
39
-
40
- &-block-last-child {
41
- width: 55%;
25
+ &-small-0 {
26
+ margin-top: 0;
42
27
  }
43
28
  }
44
29
 
@@ -49,41 +34,50 @@
49
34
  width: 100%;
50
35
  height: 100%;
51
36
  z-index: 1;
52
- animation: nut-skeleton 2s ease-in-out 0s infinite;
37
+ background: linear-gradient(
38
+ 90deg,
39
+ rgba(0, 0, 0, 0) 0%,
40
+ rgba(0, 0, 0, 0.02) 50%,
41
+ rgba(0, 0, 0, 0) 100%
42
+ );
43
+ animation-name: nut-skeleton;
44
+ animation-delay: 0s;
45
+ animation-duration: 0.6s;
46
+ animation-direction: normal;
47
+ animation-fill-mode: both;
48
+ animation-play-state: running;
49
+ animation-iteration-count: 1;
50
+ animation-timing-function: linear;
53
51
  }
54
52
 
55
53
  @keyframes nut-skeleton {
56
- 0% {
57
- background-position-x: -500px;
54
+ from {
55
+ transform: translateX(-100%);
58
56
  }
59
57
 
60
58
  to {
61
- background-position-x: calc(500px + 100%);
59
+ transform: translateX(100%);
62
60
  }
63
61
  }
64
62
  }
65
63
 
66
64
  [dir='rtl'] .nut-skeleton,
67
65
  .nut-rtl .nut-skeleton {
68
- &-content {
69
- .nut-avatar {
70
- margin-right: 0;
71
- margin-left: 20px;
72
- }
73
- }
74
66
  &-animation {
75
67
  left: auto;
76
68
  right: 0;
77
- animation: nut-skeleton-rtl 2s ease-in-out 0s infinite;
69
+ animation: nut-skeleton-rtl 2s linear 0s infinite;
78
70
  }
79
71
 
80
72
  @keyframes nut-skeleton-rtl {
81
- 0% {
82
- background-position-x: calc(500px + 100%);
73
+ from {
74
+ //background-position: -200% 0;
75
+ transform: translateX(100%);
83
76
  }
84
77
 
85
78
  to {
86
- background-position-x: -500px;
79
+ //background-position: 200% 0;
80
+ transform: translateX(-100%);
87
81
  }
88
82
  }
89
83
  }