@nutui/nutui-react 2.7.8 → 2.7.10

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 (41) hide show
  1. package/CHANGELOG.md +22 -6
  2. package/dist/esm/Calendar/style/index.js +3 -1
  3. package/dist/esm/Calendar/style/style.css +1 -1
  4. package/dist/esm/Calendar.js +267 -10
  5. package/dist/esm/CalendarCard.js +1 -1
  6. package/dist/esm/CalendarItem.js +119 -42
  7. package/dist/esm/ImagePreview/style/style.css +1 -1
  8. package/dist/esm/Swiper/style/style.css +1 -1
  9. package/dist/esm/Swiper.js +5 -6
  10. package/dist/esm/configprovider2.js +4 -0
  11. package/dist/esm/date.js +7 -80
  12. package/dist/esm/utils.js +125 -0
  13. package/dist/locales/base.d.ts +4 -0
  14. package/dist/locales/base.js +1 -1
  15. package/dist/locales/en-US.js +5 -1
  16. package/dist/locales/id-ID.js +5 -1
  17. package/dist/locales/tr-TR.js +5 -1
  18. package/dist/locales/zh-CN.js +5 -1
  19. package/dist/locales/zh-TW.js +5 -1
  20. package/dist/locales/zh-UG.js +5 -1
  21. package/dist/nutui.react.es.js +562 -120
  22. package/dist/nutui.react.umd.js +562 -120
  23. package/dist/packages/calendar/calendar.scss +24 -0
  24. package/dist/packages/calendar/calendarviewmode.scss +181 -0
  25. package/dist/packages/swiper/swiper.scss +11 -0
  26. package/dist/style.css +1 -1
  27. package/dist/styles/variables.scss +4 -0
  28. package/dist/types/locales/base.d.ts +4 -0
  29. package/dist/types/packages/calendar/calendar.d.ts +4 -0
  30. package/dist/types/packages/calendar/calendar.taro.d.ts +4 -0
  31. package/dist/types/packages/calendar/calendarviewmodeitem.d.ts +20 -0
  32. package/dist/types/packages/calendar/calendarviewmodeitem.taro.d.ts +20 -0
  33. package/dist/types/packages/calendar/types.d.ts +27 -0
  34. package/dist/types/packages/calendar/utils.d.ts +40 -0
  35. package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -0
  36. package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -0
  37. package/dist/types/packages/calendaritem/utils.d.ts +17 -0
  38. package/dist/types/packages/configprovider/types.d.ts +1 -1
  39. package/dist/types/utils/date.d.ts +0 -17
  40. package/dist/types/utils/get-system-info.d.ts +19 -0
  41. package/package.json +1 -1
@@ -61,6 +61,10 @@
61
61
  height: 36px;
62
62
  border-radius: 0px 0px 12px 12px;
63
63
  box-shadow: 0px 4px 10px 0px rgba($color: #000000, $alpha: 0.06);
64
+
65
+ &-shrink {
66
+ padding-left: 17%;
67
+ }
64
68
  }
65
69
 
66
70
  &-week-item {
@@ -110,6 +114,22 @@
110
114
  margin: 8px 0;
111
115
  }
112
116
 
117
+ &-weeknumber {
118
+ width: 35%;
119
+ &-index {
120
+ display: flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ flex-direction: column;
124
+ position: relative;
125
+ height: $calendar-day-height;
126
+ font-weight: $font-weight;
127
+ font-size: $font-size-base;
128
+ margin-bottom: 4px;
129
+ color: $color-text-help;
130
+ }
131
+ }
132
+
113
133
  &-days {
114
134
  overflow: hidden;
115
135
  }
@@ -204,6 +224,10 @@
204
224
  }
205
225
  }
206
226
 
227
+ .shrink {
228
+ display: flex;
229
+ }
230
+
207
231
  // 底部导航
208
232
  &-footer {
209
233
  display: flex;
@@ -0,0 +1,181 @@
1
+ .nut-calendar-viewmode {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ flex: 1;
6
+ font-size: $calendar-base-font-size;
7
+ background-color: $color-background-overlay;
8
+ color: $color-title;
9
+ overflow: hidden;
10
+ height: 100%;
11
+
12
+ &.nut-calendar-title {
13
+ .nut-calendar-header {
14
+ .calendar-title {
15
+ font-size: $calendar-base-font-size;
16
+ }
17
+ }
18
+ }
19
+
20
+ .nut-calendar-taro {
21
+ height: 60vh;
22
+ }
23
+
24
+ .popup-box {
25
+ height: 100%;
26
+ }
27
+
28
+ ::-webkit-scrollbar {
29
+ display: none;
30
+ }
31
+
32
+ // 头部导航
33
+ &-header {
34
+ display: flex;
35
+ flex-direction: column;
36
+ text-align: center;
37
+ }
38
+
39
+ &-title {
40
+ color: $color-title;
41
+ font-size: $calendar-title-font-size;
42
+ font-weight: $calendar-title-font-weight;
43
+ line-height: 50px;
44
+ }
45
+
46
+ &-sub-title {
47
+ padding: 7px 0;
48
+ line-height: 22px;
49
+ font-size: $calendar-sub-title-font-size;
50
+ }
51
+
52
+ // 内容区域
53
+ &-content {
54
+ flex: 1;
55
+ width: 100%;
56
+ display: block;
57
+ overflow-y: auto;
58
+ }
59
+
60
+ &-pannel {
61
+ position: relative;
62
+ width: 100%;
63
+ height: auto;
64
+ display: block;
65
+ box-sizing: border-box;
66
+
67
+ .calendar-loading-tip {
68
+ height: 50px;
69
+ line-height: 50px;
70
+ text-align: center;
71
+ position: absolute;
72
+ top: -50px;
73
+ left: 0;
74
+ right: 0;
75
+ font-size: $font-size-small;
76
+ color: $color-text;
77
+ }
78
+ }
79
+
80
+ &-panel {
81
+ display: flex;
82
+ flex-direction: column;
83
+ text-align: center;
84
+ &-title {
85
+ height: 23px;
86
+ line-height: 23px;
87
+ margin: 8px 0;
88
+ }
89
+ }
90
+
91
+ &-item {
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ flex-direction: column;
96
+ position: relative;
97
+ float: left;
98
+ width: $calendar-panel-item-width;
99
+ height: $calendar-day-height;
100
+ font-weight: $calendar-day-font-weight;
101
+ margin-bottom: 4px;
102
+
103
+ &-info-curr {
104
+ position: absolute;
105
+ bottom: 5px;
106
+ width: 100%;
107
+ font-size: $font-size-small;
108
+ line-height: 14px;
109
+ }
110
+
111
+ &-info {
112
+ position: absolute;
113
+ bottom: 5px;
114
+ width: 100%;
115
+ font-size: $font-size-small;
116
+ line-height: 14px;
117
+ }
118
+
119
+ &.active {
120
+ background-color: $calendar-active-background-color;
121
+ color: $color-primary-text !important;
122
+ border-radius: $calendar-day-active-border-radius;
123
+ .nut-calendar-day-info {
124
+ color: $color-primary-text;
125
+ }
126
+ }
127
+
128
+ &-prev,
129
+ &-next {
130
+ color: $calendar-disable-color !important;
131
+ .nut-calendar-day-info-curr {
132
+ display: none;
133
+ }
134
+ }
135
+ }
136
+
137
+ // 底部导航
138
+ &-footer {
139
+ display: flex;
140
+ width: 100%;
141
+ flex-direction: column;
142
+ background-color: $white;
143
+
144
+ .calendar-confirm-btn {
145
+ height: 44px;
146
+ margin: 10px 18px;
147
+ border-radius: 22px;
148
+ background: $button-primary-background-color;
149
+ color: $color-primary-text;
150
+ text-align: center;
151
+ line-height: 44px;
152
+ }
153
+ }
154
+ }
155
+
156
+ .nut-calendar-popup .nut-popup-title-right {
157
+ top: 7px !important;
158
+ }
159
+
160
+ [dir='rtl'] .nut-calendar,
161
+ .nut-rtl .nut-calendar {
162
+ &-day {
163
+ float: right;
164
+
165
+ &-active {
166
+ &.active-start {
167
+ border-top-left-radius: 0;
168
+ border-top-right-radius: $calendar-day-active-border-radius;
169
+ border-bottom-left-radius: 0;
170
+ border-bottom-right-radius: $calendar-day-active-border-radius;
171
+ }
172
+
173
+ &.active-end {
174
+ border-top-right-radius: 0;
175
+ border-top-left-radius: $calendar-day-active-border-radius;
176
+ border-bottom-right-radius: 0;
177
+ border-bottom-left-radius: $calendar-day-active-border-radius;
178
+ }
179
+ }
180
+ }
181
+ }
@@ -6,6 +6,14 @@
6
6
  touch-action: none;
7
7
  position: relative;
8
8
 
9
+ &-canmove-horizontal {
10
+ touch-action: pan-y;
11
+ }
12
+
13
+ &-canmove-vertical {
14
+ touch-action: pan-x;
15
+ }
16
+
9
17
  &-indicator {
10
18
  display: flex;
11
19
  position: absolute;
@@ -26,11 +34,13 @@
26
34
  z-index: 1;
27
35
  }
28
36
  }
37
+
29
38
  .nut-swiper-inner {
30
39
  width: 100%;
31
40
  height: 100%;
32
41
  display: flex;
33
42
  position: relative;
43
+
34
44
  &-horizontal {
35
45
  transform: translateX(var(--swiper-offset));
36
46
  }
@@ -60,6 +70,7 @@
60
70
  right: 50%;
61
71
  transform: translateX(50%);
62
72
  }
73
+
63
74
  &-indicator-vertical {
64
75
  left: auto;
65
76
  right: 12px;