@nutui/nutui-react 3.0.0-beta.1 → 3.0.0-beta.3

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 (101) hide show
  1. package/dist/cjs/packages/avatar/style/avatar.scss +7 -60
  2. package/dist/cjs/packages/avatar/style/style.css +5 -43
  3. package/dist/cjs/packages/badge/badge.js +5 -3
  4. package/dist/cjs/packages/badge/style/badge.scss +18 -24
  5. package/dist/cjs/packages/badge/style/style.css +17 -15
  6. package/dist/cjs/packages/calendarcard/calendarcard.js +8 -3
  7. package/dist/cjs/packages/calendarcard/style/calendarcard.scss +25 -4
  8. package/dist/cjs/packages/calendarcard/style/style.css +27 -2
  9. package/dist/cjs/packages/input/style/input.scss +4 -0
  10. package/dist/cjs/packages/input/style/style.css +4 -0
  11. package/dist/cjs/packages/navbar/navbar.js +10 -5
  12. package/dist/cjs/packages/navbar/style/navbar.scss +46 -101
  13. package/dist/cjs/packages/navbar/style/style.css +44 -89
  14. package/dist/cjs/packages/pagination/pagination.js +2 -0
  15. package/dist/cjs/packages/pagination/style/pagination.scss +6 -12
  16. package/dist/cjs/packages/pagination/style/style.css +8 -14
  17. package/dist/cjs/packages/radio/index.d.ts +8 -2
  18. package/dist/cjs/packages/radio/index.js +6 -1
  19. package/dist/cjs/packages/radio/radio.d.ts +1 -4
  20. package/dist/cjs/packages/radio/radio.js +0 -2
  21. package/dist/cjs/packages/radio/style/radio.scss +1 -0
  22. package/dist/cjs/packages/radiogroup/radiogroup.js +1 -1
  23. package/dist/cjs/packages/safearea/style/safearea.scss +1 -1
  24. package/dist/cjs/packages/safearea/style/style.css +1 -1
  25. package/dist/cjs/packages/searchbar/style/searchbar.scss +10 -7
  26. package/dist/cjs/packages/searchbar/style/style.css +11 -8
  27. package/dist/cjs/packages/skeleton/style/style.css +5 -43
  28. package/dist/cjs/packages/tabbar/style/style.css +17 -15
  29. package/dist/cjs/packages/tabbaritem/style/style.css +17 -15
  30. package/dist/cjs/packages/toast/Notification.js +13 -24
  31. package/dist/cjs/packages/toast/style/style.css +56 -30
  32. package/dist/cjs/packages/toast/style/toast.scss +65 -49
  33. package/dist/cjs/packages/toast/toast.js +2 -2
  34. package/dist/cjs/packages/trendarrow/style/style.css +2 -1
  35. package/dist/cjs/packages/trendarrow/style/trendarrow.scss +2 -1
  36. package/dist/es/packages/avatar/style/avatar.scss +7 -60
  37. package/dist/es/packages/avatar/style/style.css +5 -43
  38. package/dist/es/packages/badge/badge.d.ts +7 -35
  39. package/dist/es/packages/badge/badge.js +5 -3
  40. package/dist/es/packages/badge/style/badge.scss +18 -24
  41. package/dist/es/packages/badge/style/style.css +17 -15
  42. package/dist/es/packages/calendarcard/calendarcard.d.ts +13 -65
  43. package/dist/es/packages/calendarcard/calendarcard.js +9 -4
  44. package/dist/es/packages/calendarcard/style/calendarcard.scss +25 -4
  45. package/dist/es/packages/calendarcard/style/style.css +27 -2
  46. package/dist/es/packages/input/style/input.scss +4 -0
  47. package/dist/es/packages/input/style/style.css +4 -0
  48. package/dist/es/packages/loading/loading.d.ts +3 -15
  49. package/dist/es/packages/navbar/navbar.js +10 -5
  50. package/dist/es/packages/navbar/style/navbar.scss +46 -101
  51. package/dist/es/packages/navbar/style/style.css +44 -89
  52. package/dist/es/packages/pagination/pagination.js +2 -0
  53. package/dist/es/packages/pagination/style/pagination.scss +6 -12
  54. package/dist/es/packages/pagination/style/style.css +8 -14
  55. package/dist/es/packages/radio/index.d.ts +8 -2
  56. package/dist/es/packages/radio/index.js +5 -1
  57. package/dist/es/packages/radio/radio.d.ts +10 -49
  58. package/dist/es/packages/radio/radio.js +0 -2
  59. package/dist/es/packages/radio/style/radio.scss +1 -0
  60. package/dist/es/packages/radiogroup/radiogroup.d.ts +7 -35
  61. package/dist/es/packages/radiogroup/radiogroup.js +1 -1
  62. package/dist/es/packages/safearea/safearea.d.ts +1 -5
  63. package/dist/es/packages/safearea/style/safearea.scss +1 -1
  64. package/dist/es/packages/safearea/style/style.css +1 -1
  65. package/dist/es/packages/searchbar/searchbar.d.ts +19 -95
  66. package/dist/es/packages/searchbar/style/searchbar.scss +10 -7
  67. package/dist/es/packages/searchbar/style/style.css +11 -8
  68. package/dist/es/packages/skeleton/style/style.css +5 -43
  69. package/dist/es/packages/tabbar/style/style.css +17 -15
  70. package/dist/es/packages/tabbaritem/style/style.css +17 -15
  71. package/dist/es/packages/toast/Notification.js +14 -25
  72. package/dist/es/packages/toast/style/style.css +56 -30
  73. package/dist/es/packages/toast/style/toast.scss +65 -49
  74. package/dist/es/packages/toast/toast.d.ts +12 -60
  75. package/dist/es/packages/toast/toast.js +2 -2
  76. package/dist/es/packages/trendarrow/style/style.css +2 -1
  77. package/dist/es/packages/trendarrow/style/trendarrow.scss +2 -1
  78. package/dist/es/packages/trendarrow/trendarrow.d.ts +11 -55
  79. package/dist/es/packages/video/video.d.ts +5 -25
  80. package/dist/nutui.react.umd.js +150 -125
  81. package/dist/style.css +1 -1
  82. package/dist/styles/themes/default.scss +35 -35
  83. package/dist/styles/variables-jrkf.scss +21 -27
  84. package/dist/styles/variables.scss +7 -4
  85. package/package.json +1 -1
  86. package/dist/cjs/packages/nutui.react.build.rn.d.ts +0 -203
  87. package/dist/cjs/packages/nutui.react.build.rn.js +0 -418
  88. package/dist/cjs/packages/nutui.react.rn.d.ts +0 -304
  89. package/dist/cjs/packages/nutui.react.rn.js +0 -519
  90. package/dist/cjs/packages/popup/index.rn.d.ts +0 -3
  91. package/dist/cjs/packages/popup/index.rn.js +0 -12
  92. package/dist/cjs/packages/popup/popup.rn.d.ts +0 -26
  93. package/dist/cjs/packages/popup/popup.rn.js +0 -186
  94. package/dist/es/packages/nutui.react.build.rn.d.ts +0 -203
  95. package/dist/es/packages/nutui.react.build.rn.js +0 -203
  96. package/dist/es/packages/nutui.react.rn.d.ts +0 -304
  97. package/dist/es/packages/nutui.react.rn.js +0 -304
  98. package/dist/es/packages/popup/index.rn.d.ts +0 -3
  99. package/dist/es/packages/popup/index.rn.js +0 -2
  100. package/dist/es/packages/popup/popup.rn.d.ts +0 -26
  101. package/dist/es/packages/popup/popup.rn.js +0 -174
@@ -1,6 +1,13 @@
1
1
  .nut-avatar {
2
2
  position: relative;
3
3
  flex: 0 0 auto; // 防止被压缩
4
+
5
+ display: flex;
6
+ justify-content: center;
7
+ align-items: center;
8
+ width: $avatar-normal-width;
9
+ height: $avatar-normal-height;
10
+
4
11
  &-round {
5
12
  border-radius: 999px;
6
13
  overflow: hidden;
@@ -28,45 +35,23 @@
28
35
  background-size: 100% 100%;
29
36
  }
30
37
 
31
- .nut-icon-img {
32
- width: 100%;
33
- height: 100%;
34
- }
35
-
36
38
  &-text {
37
39
  display: flex;
38
40
  justify-content: center;
39
41
  align-items: center;
40
- width: 100%;
41
- height: 100%;
42
42
  }
43
43
 
44
44
  &-large {
45
- display: flex;
46
- justify-content: center;
47
- align-items: center;
48
45
  width: $avatar-large-width;
49
46
  height: $avatar-large-height;
50
-
51
47
  &-img {
52
48
  width: $avatar-large-width;
53
49
  height: $avatar-large-height;
54
- &-image {
55
- width: $avatar-large-width;
56
- height: $avatar-large-height;
57
- }
58
50
  }
59
-
60
51
  &-icon {
61
52
  width: $avatar-large-width;
62
53
  height: $avatar-large-height;
63
54
  }
64
-
65
- .nut-icon-img {
66
- width: 100%;
67
- height: 100%;
68
- }
69
-
70
55
  &-text {
71
56
  width: $avatar-large-width;
72
57
  height: $avatar-large-height;
@@ -74,51 +59,13 @@
74
59
  }
75
60
 
76
61
  &-small {
77
- display: flex;
78
- justify-content: center;
79
- align-items: center;
80
62
  width: $avatar-small-width;
81
63
  height: $avatar-small-height;
82
-
83
- &-img-image {
84
- width: $avatar-small-width;
85
- height: $avatar-small-height;
86
- }
87
- &-icon {
88
- // width: $avatar-small-width;
89
- // height: $avatar-small-height;
90
- }
91
64
  &-text {
92
65
  width: $avatar-small-width;
93
66
  height: $avatar-small-height;
94
67
  }
95
68
  }
96
-
97
- &-normal {
98
- display: flex;
99
- justify-content: center;
100
- align-items: center;
101
- width: $avatar-normal-width;
102
- height: $avatar-normal-height;
103
-
104
- &-img-image {
105
- width: $avatar-normal-width;
106
- height: $avatar-normal-height;
107
- }
108
-
109
- &-icon {
110
- }
111
-
112
- .nut-icon-img {
113
- width: 100%;
114
- height: 100%;
115
- }
116
-
117
- &-text {
118
- width: $avatar-normal-width;
119
- height: $avatar-normal-height;
120
- }
121
- }
122
69
  }
123
70
 
124
71
  // [dir='rtl'] .nut-avatar,
@@ -73,6 +73,11 @@
73
73
  .nut-avatar {
74
74
  position: relative;
75
75
  flex: 0 0 auto;
76
+ display: flex;
77
+ justify-content: center;
78
+ align-items: center;
79
+ width: var(--nutui-avatar-normal-width, 40px);
80
+ height: var(--nutui-avatar-normal-height, 40px);
76
81
  }
77
82
  .nut-avatar-round {
78
83
  border-radius: 999px;
@@ -96,21 +101,12 @@
96
101
  .nut-avatar-icon {
97
102
  background-size: 100% 100%;
98
103
  }
99
- .nut-avatar .nut-icon-img {
100
- width: 100%;
101
- height: 100%;
102
- }
103
104
  .nut-avatar-text {
104
105
  display: flex;
105
106
  justify-content: center;
106
107
  align-items: center;
107
- width: 100%;
108
- height: 100%;
109
108
  }
110
109
  .nut-avatar-large {
111
- display: flex;
112
- justify-content: center;
113
- align-items: center;
114
110
  width: var(--nutui-avatar-large-width, 60px);
115
111
  height: var(--nutui-avatar-large-height, 60px);
116
112
  }
@@ -118,53 +114,19 @@
118
114
  width: var(--nutui-avatar-large-width, 60px);
119
115
  height: var(--nutui-avatar-large-height, 60px);
120
116
  }
121
- .nut-avatar-large-img-image {
122
- width: var(--nutui-avatar-large-width, 60px);
123
- height: var(--nutui-avatar-large-height, 60px);
124
- }
125
117
  .nut-avatar-large-icon {
126
118
  width: var(--nutui-avatar-large-width, 60px);
127
119
  height: var(--nutui-avatar-large-height, 60px);
128
120
  }
129
- .nut-avatar-large .nut-icon-img {
130
- width: 100%;
131
- height: 100%;
132
- }
133
121
  .nut-avatar-large-text {
134
122
  width: var(--nutui-avatar-large-width, 60px);
135
123
  height: var(--nutui-avatar-large-height, 60px);
136
124
  }
137
125
  .nut-avatar-small {
138
- display: flex;
139
- justify-content: center;
140
- align-items: center;
141
- width: var(--nutui-avatar-small-width, 32px);
142
- height: var(--nutui-avatar-small-height, 32px);
143
- }
144
- .nut-avatar-small-img-image {
145
126
  width: var(--nutui-avatar-small-width, 32px);
146
127
  height: var(--nutui-avatar-small-height, 32px);
147
128
  }
148
129
  .nut-avatar-small-text {
149
130
  width: var(--nutui-avatar-small-width, 32px);
150
131
  height: var(--nutui-avatar-small-height, 32px);
151
- }
152
- .nut-avatar-normal {
153
- display: flex;
154
- justify-content: center;
155
- align-items: center;
156
- width: var(--nutui-avatar-normal-width, 40px);
157
- height: var(--nutui-avatar-normal-height, 40px);
158
- }
159
- .nut-avatar-normal-img-image {
160
- width: var(--nutui-avatar-normal-width, 40px);
161
- height: var(--nutui-avatar-normal-height, 40px);
162
- }
163
- .nut-avatar-normal .nut-icon-img {
164
- width: 100%;
165
- height: 100%;
166
- }
167
- .nut-avatar-normal-text {
168
- width: var(--nutui-avatar-normal-width, 40px);
169
- height: var(--nutui-avatar-normal-height, 40px);
170
132
  }
@@ -48,10 +48,11 @@ var Badge = function Badge(props) {
48
48
  var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), className = _$_object_spread.className, style = _$_object_spread.style, value = _$_object_spread.value, max = _$_object_spread.max, children = _$_object_spread.children, dot = _$_object_spread.dot, top = _$_object_spread.top, right = _$_object_spread.right, color = _$_object_spread.color, fill = _$_object_spread.fill;
49
49
  var classPrefix = 'nut-badge';
50
50
  var classes = (0, _classnames.default)(classPrefix, className, (0, _define_property._)({}, "".concat(classPrefix, "-").concat(fill), fill === 'outline'));
51
- var contentClasses = (0, _classnames.default)((0, _define_property._)({}, "".concat(classPrefix, "-dot"), dot), "".concat(classPrefix, "-content"), (0, _define_property._)({}, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), (0, _define_property._)({}, "".concat(classPrefix, "-one"), typeof content() === 'string' && ((_this = "".concat(content())) === null || _this === void 0 ? void 0 : _this.length) === 1));
51
+ var _obj;
52
+ var contentClasses = (0, _classnames.default)("".concat(classPrefix, "-content"), (_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-sup"), isNumber() || isString() || dot), (0, _define_property._)(_obj, "".concat(classPrefix, "-one"), typeof content() === 'string' && ((_this = "".concat(content())) === null || _this === void 0 ? void 0 : _this.length) === 1), (0, _define_property._)(_obj, "".concat(classPrefix, "-dot"), dot), (0, _define_property._)(_obj, "".concat(classPrefix, "-").concat(fill), fill === 'outline'), _obj));
52
53
  var getStyle = function getStyle() {
53
54
  var style = {};
54
- style.top = "".concat(Number(top) || parseFloat(String(top)) || 0, "px");
55
+ style.top = "".concat(Number(-top) || parseFloat(String(-top)) || 0, "px");
55
56
  var dir = rtl ? 'left' : 'right';
56
57
  style[dir] = "".concat(Number(right) || parseFloat(String(right)) || 0, "px");
57
58
  if (color) {
@@ -68,11 +69,12 @@ var Badge = function Badge(props) {
68
69
  }
69
70
  return style;
70
71
  };
72
+ var _obj1;
71
73
  return /*#__PURE__*/ _react.default.createElement("div", {
72
74
  className: classes,
73
75
  style: style
74
76
  }, isIcon() && /*#__PURE__*/ _react.default.createElement("div", {
75
- className: "".concat(classPrefix, "-icon")
77
+ className: (0, _classnames.default)("".concat(classPrefix, "-content"), (_obj1 = {}, (0, _define_property._)(_obj1, "".concat(classPrefix, "-icon"), true), (0, _define_property._)(_obj1, "".concat(classPrefix, "-icon-rtl"), rtl), _obj1))
76
78
  }, value), children, !isIcon() && /*#__PURE__*/ _react.default.createElement("div", {
77
79
  className: contentClasses,
78
80
  style: getStyle()
@@ -1,15 +1,19 @@
1
1
  .nut-badge {
2
2
  position: relative;
3
- display: inline-block;
4
-
3
+ display: inline-flex;
4
+ width: auto;
5
+ /* #ifdef harmony */
6
+ min-width: 1px;
7
+ /* #endif */
8
+ /* #ifndef harmony */
9
+ min-width: auto;
10
+ /* #endif */
5
11
  &-icon {
6
12
  position: absolute;
7
13
  display: flex;
8
14
  justify-content: center;
9
15
  align-items: center;
10
16
  background: $badge-background-color;
11
- top: -10%;
12
- right: -15%;
13
17
  padding: $badge-icon-padding;
14
18
  text-align: center;
15
19
  border: $badge-border;
@@ -29,7 +33,12 @@
29
33
  display: flex;
30
34
  justify-content: center;
31
35
  align-items: center;
36
+ /* #ifdef harmony */
37
+ background: $color-primary;
38
+ /* #endif */
39
+ /* #ifndef harmony */
32
40
  background: $badge-background-color;
41
+ /* #endif */
33
42
  color: $badge-color;
34
43
  padding: $badge-padding;
35
44
  font-size: $badge-font-size;
@@ -49,7 +58,9 @@
49
58
  }
50
59
 
51
60
  &-content {
61
+ /* #ifndef rn */
52
62
  transform: $badge-content-transform;
63
+ /* #endif */
53
64
  }
54
65
 
55
66
  &-dot {
@@ -61,25 +72,8 @@
61
72
  }
62
73
 
63
74
  &-outline {
64
- .nut-badge-content {
65
- background: $color-primary-text;
66
- border: 1px solid $color-primary;
67
- color: $color-primary;
68
- }
69
- }
70
- }
71
-
72
- [dir='rtl'] .nut-badge,
73
- .nut-rtl .nut-badge {
74
- &-icon {
75
- right: auto;
76
- left: -15%;
77
- }
78
-
79
- &-content {
80
- transform: var(
81
- --nutui-badge-content-transform,
82
- translateY(-50%) translateX(-100%)
83
- );
75
+ background: $color-primary-text;
76
+ border: 1px solid $color-primary;
77
+ color: $color-primary;
84
78
  }
85
79
  }
@@ -1,6 +1,13 @@
1
1
  .nut-badge {
2
2
  position: relative;
3
- display: inline-block;
3
+ display: inline-flex;
4
+ width: auto;
5
+ /* #ifdef harmony */
6
+ min-width: 1px;
7
+ /* #endif */
8
+ /* #ifndef harmony */
9
+ min-width: auto;
10
+ /* #endif */
4
11
  }
5
12
  .nut-badge-icon {
6
13
  position: absolute;
@@ -8,8 +15,6 @@
8
15
  justify-content: center;
9
16
  align-items: center;
10
17
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
11
- top: -10%;
12
- right: -15%;
13
18
  padding: var(--nutui-badge-icon-padding, 3px);
14
19
  text-align: center;
15
20
  border: var(--nutui-badge-border, 0px solid var(--nutui-color-primary-text, #ffffff));
@@ -27,7 +32,12 @@
27
32
  display: flex;
28
33
  justify-content: center;
29
34
  align-items: center;
35
+ /* #ifdef harmony */
36
+ background: var(--nutui-color-primary, #ff0f23);
37
+ /* #endif */
38
+ /* #ifndef harmony */
30
39
  background: var(--nutui-badge-background-color, linear-gradient(135deg, var(--nutui-color-primary-stop-1, #ff475d) 0%, var(--nutui-color-primary-stop-2, #ff0f23) 100%));
40
+ /* #endif */
31
41
  color: var(--nutui-badge-color, #fff);
32
42
  padding: var(--nutui-badge-padding, 0 4px);
33
43
  font-size: var(--nutui-badge-font-size, var(--nutui-font-size-xxs, 10px));
@@ -45,7 +55,9 @@
45
55
  padding: 0;
46
56
  }
47
57
  .nut-badge-content {
48
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(100%));
58
+ /* #ifndef rn */
59
+ transform: var(--nutui-badge-content-transform, translateX(100%));
60
+ /* #endif */
49
61
  }
50
62
  .nut-badge-dot {
51
63
  width: var(--nutui-badge-dot-width, 7px);
@@ -54,18 +66,8 @@
54
66
  border-radius: var(--nutui-badge-dot-width, 7px);
55
67
  padding: 0;
56
68
  }
57
- .nut-badge-outline .nut-badge-content {
69
+ .nut-badge-outline {
58
70
  background: var(--nutui-color-primary-text, #ffffff);
59
71
  border: 1px solid var(--nutui-color-primary, #ff0f23);
60
72
  color: var(--nutui-color-primary, #ff0f23);
61
- }
62
-
63
- [dir=rtl] .nut-badge-icon,
64
- .nut-rtl .nut-badge-icon {
65
- right: auto;
66
- left: -15%;
67
- }
68
- [dir=rtl] .nut-badge-content,
69
- .nut-rtl .nut-badge-content {
70
- transform: var(--nutui-badge-content-transform, translateY(-50%) translateX(-100%));
71
73
  }
@@ -82,7 +82,7 @@ var CalendarCard = /*#__PURE__*/ _react.default.forwardRef(function(props, ref)
82
82
  onChange === null || onChange === void 0 ? void 0 : onChange(val);
83
83
  }
84
84
  };
85
- var getDays = function getDays(month) {
85
+ var getDays = (0, _react.useCallback)(function(month) {
86
86
  var y = month.year;
87
87
  var m = month.month;
88
88
  var days = (0, _to_consumable_array._)((0, _utils.getPrevMonthDays)(y, m, firstDayOfWeek)).concat((0, _to_consumable_array._)((0, _utils.getCurrentMonthDays)(y, m)));
@@ -99,13 +99,18 @@ var CalendarCard = /*#__PURE__*/ _react.default.forwardRef(function(props, ref)
99
99
  });
100
100
  }
101
101
  return days;
102
- };
102
+ }, [
103
+ firstDayOfWeek
104
+ ]);
103
105
  (0, _react.useEffect)(function() {
104
106
  var newDays = getDays(month);
105
107
  setDays(newDays);
106
108
  onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(month);
107
109
  }, [
108
- month
110
+ month,
111
+ getDays,
112
+ onPageChange,
113
+ firstDayOfWeek
109
114
  ]);
110
115
  var isSameDay = function isSameDay(day1, day2) {
111
116
  return (day1 === null || day1 === void 0 ? void 0 : day1.year) === (day2 === null || day2 === void 0 ? void 0 : day2.year) && (day1 === null || day1 === void 0 ? void 0 : day1.month) === (day2 === null || day2 === void 0 ? void 0 : day2.month) && (day1 === null || day1 === void 0 ? void 0 : day1.date) === (day2 === null || day2 === void 0 ? void 0 : day2.date);
@@ -55,6 +55,9 @@
55
55
 
56
56
  &-top,
57
57
  &-bottom {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
58
61
  width: 100%;
59
62
  height: 12px;
60
63
  font-size: 12px;
@@ -67,14 +70,22 @@
67
70
 
68
71
  &.active {
69
72
  background-color: $calendar-active-background-color;
70
- color: $color-primary-text;
71
73
  border-radius: $calendar-day-active-border-radius;
74
+ .nut-calendarcard-day-top,
75
+ .nut-calendarcard-day-inner,
76
+ .nut-calendarcard-day-bottom {
77
+ color: $color-primary-text;
78
+ }
72
79
  }
73
80
 
74
81
  &.start,
75
82
  &.end {
76
83
  background-color: $calendar-active-background-color;
77
- color: $color-primary-text;
84
+ .nut-calendarcard-day-top,
85
+ .nut-calendarcard-day-inner,
86
+ .nut-calendarcard-day-bottom {
87
+ color: $color-primary-text;
88
+ }
78
89
  }
79
90
 
80
91
  &.start {
@@ -89,7 +100,11 @@
89
100
 
90
101
  &.mid {
91
102
  background-color: $calendar-choose-background-color;
92
- color: $calendar-choose-color;
103
+ .nut-calendarcard-day-top,
104
+ .nut-calendarcard-day-inner,
105
+ .nut-calendarcard-day-bottom {
106
+ color: $calendar-choose-color;
107
+ }
93
108
  }
94
109
 
95
110
  .nut-calendar-day-info {
@@ -100,7 +115,11 @@
100
115
  &.prev,
101
116
  &.next,
102
117
  &.disabled {
103
- color: $calendar-disable-color;
118
+ .nut-calendarcard-day-top,
119
+ .nut-calendarcard-day-inner,
120
+ .nut-calendarcard-day-bottom {
121
+ color: $calendar-disable-color;
122
+ }
104
123
  cursor: not-allowed;
105
124
  }
106
125
  }
@@ -128,11 +147,13 @@
128
147
  }
129
148
  }
130
149
  }
150
+
131
151
  &-day {
132
152
  &.start,
133
153
  &.end {
134
154
  border-radius: 0;
135
155
  }
156
+
136
157
  &.start {
137
158
  border-top-right-radius: $calendar-day-active-border-radius;
138
159
  border-bottom-right-radius: $calendar-day-active-border-radius;
@@ -47,6 +47,9 @@
47
47
  cursor: auto;
48
48
  }
49
49
  .nut-calendarcard-day-top, .nut-calendarcard-day-bottom {
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
50
53
  width: 100%;
51
54
  height: 12px;
52
55
  font-size: 12px;
@@ -57,11 +60,21 @@
57
60
  }
58
61
  .nut-calendarcard-day.active {
59
62
  background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
60
- color: var(--nutui-color-primary-text, #ffffff);
61
63
  border-radius: var(--nutui-calendar-day-active-border-radius, 4px);
62
64
  }
65
+ .nut-calendarcard-day.active .nut-calendarcard-day-top,
66
+ .nut-calendarcard-day.active .nut-calendarcard-day-inner,
67
+ .nut-calendarcard-day.active .nut-calendarcard-day-bottom {
68
+ color: var(--nutui-color-primary-text, #ffffff);
69
+ }
63
70
  .nut-calendarcard-day.start, .nut-calendarcard-day.end {
64
71
  background-color: var(--nutui-calendar-active-background-color, var(--nutui-color-primary, #ff0f23));
72
+ }
73
+ .nut-calendarcard-day.start .nut-calendarcard-day-top,
74
+ .nut-calendarcard-day.start .nut-calendarcard-day-inner,
75
+ .nut-calendarcard-day.start .nut-calendarcard-day-bottom, .nut-calendarcard-day.end .nut-calendarcard-day-top,
76
+ .nut-calendarcard-day.end .nut-calendarcard-day-inner,
77
+ .nut-calendarcard-day.end .nut-calendarcard-day-bottom {
65
78
  color: var(--nutui-color-primary-text, #ffffff);
66
79
  }
67
80
  .nut-calendarcard-day.start {
@@ -74,15 +87,27 @@
74
87
  }
75
88
  .nut-calendarcard-day.mid {
76
89
  background-color: var(--nutui-calendar-choose-background-color, var(--nutui-color-primary-light-pressed, #ffebf1));
90
+ }
91
+ .nut-calendarcard-day.mid .nut-calendarcard-day-top,
92
+ .nut-calendarcard-day.mid .nut-calendarcard-day-inner,
93
+ .nut-calendarcard-day.mid .nut-calendarcard-day-bottom {
77
94
  color: var(--nutui-calendar-choose-color, var(--nutui-color-primary, #ff0f23));
78
95
  }
79
96
  .nut-calendarcard-day .nut-calendar-day-info {
80
97
  color: var(--nutui-color-primary-text, #ffffff);
81
98
  }
82
99
  .nut-calendarcard-day.prev, .nut-calendarcard-day.next, .nut-calendarcard-day.disabled {
83
- color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
84
100
  cursor: not-allowed;
85
101
  }
102
+ .nut-calendarcard-day.prev .nut-calendarcard-day-top,
103
+ .nut-calendarcard-day.prev .nut-calendarcard-day-inner,
104
+ .nut-calendarcard-day.prev .nut-calendarcard-day-bottom, .nut-calendarcard-day.next .nut-calendarcard-day-top,
105
+ .nut-calendarcard-day.next .nut-calendarcard-day-inner,
106
+ .nut-calendarcard-day.next .nut-calendarcard-day-bottom, .nut-calendarcard-day.disabled .nut-calendarcard-day-top,
107
+ .nut-calendarcard-day.disabled .nut-calendarcard-day-inner,
108
+ .nut-calendarcard-day.disabled .nut-calendarcard-day-bottom {
109
+ color: var(--nutui-calendar-disable-color, var(--nutui-color-text-disabled, #c2c4cc));
110
+ }
86
111
 
87
112
  [dir=rtl] .nut-calendarcard-header-left .left, [dir=rtl] .nut-calendarcard-header-right .left,
88
113
  .nut-rtl .nut-calendarcard-header-left .left,
@@ -47,3 +47,7 @@
47
47
  -webkit-text-fill-color: $input-disabled-color;
48
48
  }
49
49
  }
50
+
51
+ .nut-input-clear {
52
+ flex: 0;
53
+ }
@@ -43,4 +43,8 @@
43
43
  background: none;
44
44
  opacity: 1;
45
45
  -webkit-text-fill-color: var(--nutui-input-disabled-color, var(--nutui-color-text-disabled, #c2c4cc));
46
+ }
47
+
48
+ .nut-input-clear {
49
+ flex: 0;
46
50
  }
@@ -16,6 +16,7 @@ var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
16
16
  var _sliced_to_array = require("@swc/helpers/_/_sliced_to_array");
17
17
  var _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
18
18
  var _classnames = /*#__PURE__*/ _interop_require_default._(require("classnames"));
19
+ var _index = require("../configprovider/index");
19
20
  var _typings = require("../../utils/typings");
20
21
  var _useclientrect = require("../../utils/use-client-rect");
21
22
  var _safearea = require("../safearea/safearea");
@@ -32,6 +33,7 @@ var defaultProps = (0, _object_spread_props._)((0, _object_spread._)({}, _typing
32
33
  var NavBar = function NavBar(props) {
33
34
  var _$_object_spread = (0, _object_spread._)({}, defaultProps, props), right = _$_object_spread.right, left = _$_object_spread.left, titleAlign = _$_object_spread.titleAlign, className = _$_object_spread.className, style = _$_object_spread.style, back = _$_object_spread.back, fixed = _$_object_spread.fixed, safeAreaInsetTop = _$_object_spread.safeAreaInsetTop, placeholder = _$_object_spread.placeholder, zIndex = _$_object_spread.zIndex, onBackClick = _$_object_spread.onBackClick;
34
35
  var classPrefix = 'nut-navbar';
36
+ var rtl = (0, _index.useRtl)();
35
37
  var children = Array.isArray(props.children) ? props.children : [
36
38
  props.children
37
39
  ];
@@ -75,11 +77,12 @@ var NavBar = function NavBar(props) {
75
77
  back
76
78
  ]);
77
79
  var renderLeft = function renderLeft() {
80
+ var _obj, _obj1;
78
81
  return back || left ? /*#__PURE__*/ _react.default.createElement("div", {
79
- className: "".concat(classPrefix, "-left"),
82
+ className: (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-left"), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-left-align-").concat(titleAlign), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-left-rtl"), rtl), _obj)),
80
83
  ref: leftRef
81
84
  }, back && /*#__PURE__*/ _react.default.createElement("div", {
82
- className: "".concat(classPrefix, "-left-back"),
85
+ className: (0, _classnames.default)((_obj1 = {}, (0, _define_property._)(_obj1, "".concat(classPrefix, "-left-back"), true), (0, _define_property._)(_obj1, "".concat(classPrefix, "-left-back-align-").concat(titleAlign), true), (0, _define_property._)(_obj1, "".concat(classPrefix, "-left-back-children"), left), (0, _define_property._)(_obj1, "".concat(classPrefix, "-left-back-children-rtl"), left && rtl), _obj1)),
83
86
  onClick: function onClick(e) {
84
87
  return onBackClick(e);
85
88
  }
@@ -94,14 +97,16 @@ var NavBar = function NavBar(props) {
94
97
  width: contentRealWidth
95
98
  };
96
99
  }
100
+ var _obj;
97
101
  return /*#__PURE__*/ _react.default.createElement("div", {
98
- className: "".concat(classPrefix, "-title"),
102
+ className: (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-title"), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-title-align-").concat(titleAlign), true), _obj)),
99
103
  style: titleStyle
100
104
  }, children);
101
105
  };
102
106
  var renderRight = function renderRight() {
107
+ var _obj;
103
108
  return /*#__PURE__*/ _react.default.createElement("div", {
104
- className: "".concat(classPrefix, "-right"),
109
+ className: (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-right"), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-right-align-").concat(titleAlign), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-right-rtl"), rtl), _obj)),
105
110
  ref: rightRef
106
111
  }, right);
107
112
  };
@@ -113,7 +118,7 @@ var NavBar = function NavBar(props) {
113
118
  }, renderLeft(), renderContent(), renderRight());
114
119
  };
115
120
  var _obj;
116
- var classes = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-fixed"), fixed), (0, _define_property._)(_obj, "".concat(classPrefix, "-title-align-").concat(titleAlign), true), _obj));
121
+ var classes = (0, _classnames.default)((_obj = {}, (0, _define_property._)(_obj, "".concat(classPrefix, "-fixed"), fixed), (0, _define_property._)(_obj, "".concat(classPrefix, "-safe-area-inset-top"), safeAreaInsetTop), (0, _define_property._)(_obj, "".concat(classPrefix, "-align-").concat(titleAlign), true), (0, _define_property._)(_obj, "".concat(classPrefix, "-rtl"), rtl), _obj));
117
122
  var cls = (0, _classnames.default)(classPrefix, classes, className);
118
123
  return /*#__PURE__*/ _react.default.createElement(_react.default.Fragment, null, safeAreaInsetTop && /*#__PURE__*/ _react.default.createElement(_safearea.SafeArea, {
119
124
  position: "top"