@nutui/nutui-react 2.3.2 → 2.3.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 (67) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/esm/ActionSheet/style/style.css +1 -1
  3. package/dist/esm/Audio/style/style.css +1 -1
  4. package/dist/esm/Button/style/style.css +1 -1
  5. package/dist/esm/CalendarItem.js +9 -3
  6. package/dist/esm/Checkbox/style/style.css +1 -1
  7. package/dist/esm/CountDown.js +1 -8
  8. package/dist/esm/DatePicker.js +60 -81
  9. package/dist/esm/Dialog/style/style.css +1 -1
  10. package/dist/esm/InfiniteLoading.js +9 -6
  11. package/dist/esm/Menu/style/style.css +1 -1
  12. package/dist/esm/MenuItem/style/style.css +1 -1
  13. package/dist/esm/Picker.js +1 -1
  14. package/dist/esm/PullToRefresh.js +11 -33
  15. package/dist/esm/Radio/style/style.css +1 -1
  16. package/dist/esm/Tabbar.js +13 -12
  17. package/dist/esm/Table/style/style.css +1 -1
  18. package/dist/esm/Table.js +97 -12
  19. package/dist/esm/cascader2.js +19 -3
  20. package/dist/esm/formitem2.js +1 -0
  21. package/dist/esm/pad-zero.js +11 -0
  22. package/dist/esm/tabbaritem2.js +11 -9
  23. package/dist/esm/types/src/packages/cascader/cascader.d.ts +4 -0
  24. package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +4 -0
  25. package/dist/esm/types/src/packages/configprovider/types.d.ts +1 -1
  26. package/dist/esm/types/src/packages/pulltorefresh/pulltorefresh.d.ts +1 -0
  27. package/dist/esm/types/src/packages/pulltorefresh/pulltorefresh.taro.d.ts +1 -0
  28. package/dist/esm/types/src/packages/tabbar/context.d.ts +9 -0
  29. package/dist/esm/types/src/packages/tabbar/index.d.ts +1 -0
  30. package/dist/esm/types/src/packages/tabbar/index.taro.d.ts +1 -0
  31. package/dist/esm/types/src/packages/tabbaritem/tabbaritem.d.ts +0 -5
  32. package/dist/esm/types/src/packages/tabbaritem/tabbaritem.taro.d.ts +0 -5
  33. package/dist/esm/types/src/packages/table/types.d.ts +2 -0
  34. package/dist/esm/types/src/packages/table/useTableSticky.d.ts +8 -0
  35. package/dist/esm/types/src/utils/is-date.d.ts +1 -0
  36. package/dist/esm/types/src/utils/pad-zero.d.ts +1 -0
  37. package/dist/locales/base.js +1 -1
  38. package/dist/locales/en-US.js +1 -1
  39. package/dist/locales/id-ID.js +1 -1
  40. package/dist/locales/tr-TR.js +1 -1
  41. package/dist/locales/zh-CN.js +1 -1
  42. package/dist/locales/zh-TW.js +1 -1
  43. package/dist/locales/zh-UG.js +1 -1
  44. package/dist/nutui.react.es.js +582 -500
  45. package/dist/nutui.react.umd.js +581 -499
  46. package/dist/packages/checkbox/checkbox.scss +3 -0
  47. package/dist/packages/menuitem/menuitem.scss +1 -1
  48. package/dist/packages/table/table.scss +82 -9
  49. package/dist/style.css +1 -1
  50. package/dist/style.mjs +1 -1
  51. package/dist/styles/variables-jmapp.scss +9 -2
  52. package/dist/styles/variables.scss +10 -3
  53. package/dist/types/packages/cascader/cascader.d.ts +4 -0
  54. package/dist/types/packages/cascader/cascader.taro.d.ts +4 -0
  55. package/dist/types/packages/configprovider/types.d.ts +1 -1
  56. package/dist/types/packages/pulltorefresh/pulltorefresh.d.ts +7 -2
  57. package/dist/types/packages/pulltorefresh/pulltorefresh.taro.d.ts +1 -0
  58. package/dist/types/packages/tabbar/context.d.ts +9 -0
  59. package/dist/types/packages/tabbar/index.d.ts +1 -0
  60. package/dist/types/packages/tabbar/index.taro.d.ts +1 -0
  61. package/dist/types/packages/tabbaritem/tabbaritem.d.ts +0 -5
  62. package/dist/types/packages/tabbaritem/tabbaritem.taro.d.ts +0 -5
  63. package/dist/types/packages/table/types.d.ts +2 -0
  64. package/dist/types/packages/table/useTableSticky.d.ts +8 -0
  65. package/dist/types/utils/is-date.d.ts +1 -0
  66. package/dist/types/utils/pad-zero.d.ts +1 -0
  67. package/package.json +2 -2
@@ -99,7 +99,10 @@
99
99
 
100
100
  // background-color: $color-primary;
101
101
  .nut-icon {
102
+ position: absolute;
102
103
  font-size: 12px;
104
+ width: 12px;
105
+ height: 12px;
103
106
  &:before {
104
107
  top: auto;
105
108
  bottom: -22px;
@@ -26,7 +26,7 @@
26
26
  color: $menu-item-active-color;
27
27
  }
28
28
 
29
- i {
29
+ .nut-icon {
30
30
  display: inline-flex;
31
31
  align-items: center;
32
32
  margin-right: $menu-item-icon-margin;
@@ -1,17 +1,29 @@
1
1
  .nut-table {
2
- display: flex;
3
- width: 100%;
4
- flex-direction: column;
5
- font-size: $font-size-base;
6
- color: $color-title;
2
+ overflow: hidden;
3
+ position: relative;
4
+
5
+ &-wrapper {
6
+ display: flex;
7
+ width: 100%;
8
+ flex-direction: column;
9
+ font-size: $font-size-base;
10
+ color: $color-title;
11
+ overflow: auto;
12
+ position: relative;
13
+ border: 1px solid $table-border-color;
14
+ }
7
15
 
8
16
  &-main {
9
17
  display: table;
10
- width: 100%;
11
- border-collapse: collapse;
12
- overflow-x: hidden;
18
+ // width: 100%;
19
+ // border-collapse: collapse;
20
+ overflow-x: auto;
13
21
  color: $color-title;
14
22
  background-color: $color-background-overlay;
23
+ table-layout: fixed;
24
+ width: max-content;
25
+ min-width: 100%;
26
+ position: relative;
15
27
 
16
28
  &-striped {
17
29
  .nut-table-main-head {
@@ -35,17 +47,41 @@
35
47
 
36
48
  &-head,
37
49
  &-body {
50
+ background: inherit;
38
51
  &-tr {
39
52
  display: table-row;
53
+ background: inherit;
54
+
55
+ &:last-child {
56
+ .nut-table-main-body-tr-td {
57
+ border-bottom: none;
58
+ }
59
+ }
40
60
 
41
61
  &-th {
42
62
  display: table-cell;
43
63
  padding: $table-cols-padding;
64
+ background: inherit;
65
+ position: sticky;
66
+ top: 0;
67
+ &.nut-table-fixed-left,
68
+ &.nut-table-fixed-right {
69
+ z-index: 4;
70
+ }
71
+
72
+ &:last-child {
73
+ border-right: none;
74
+ }
44
75
  }
45
76
 
46
77
  &-td {
47
78
  display: table-cell;
48
79
  padding: $table-cols-padding;
80
+ background: inherit;
81
+
82
+ &:last-child {
83
+ border-right: none;
84
+ }
49
85
 
50
86
  &-nodata {
51
87
  display: flex;
@@ -56,7 +92,8 @@
56
92
  }
57
93
 
58
94
  &-border {
59
- border: 1px solid $table-border-color;
95
+ border-right: 1px solid $table-border-color;
96
+ border-bottom: 1px solid $table-border-color;
60
97
  }
61
98
 
62
99
  &-alignleft,
@@ -83,6 +120,40 @@
83
120
  }
84
121
  }
85
122
 
123
+ &-sticky-left,
124
+ &-sticky-right {
125
+ position: absolute;
126
+ top: 0px;
127
+ width: 8px;
128
+ bottom: -1px;
129
+ overflow-x: hidden;
130
+ overflow-y: hidden;
131
+ box-shadow: none;
132
+ touch-action: none;
133
+ pointer-events: none;
134
+ z-index: 3;
135
+ background: transparent;
136
+ }
137
+
138
+ &-sticky-left {
139
+ left: 1px;
140
+ box-shadow: $table-sticky-left-shadow;
141
+ }
142
+
143
+ &-sticky-right {
144
+ right: 1px;
145
+ box-shadow: $table-sticky-right-shadow;
146
+ }
147
+
148
+ &-fixed-left,
149
+ &-fixed-right {
150
+ position: sticky;
151
+ z-index: 2;
152
+ }
153
+ &-fixed-left-last {
154
+ border-right: none;
155
+ }
156
+
86
157
  &-summary {
87
158
  color: $color-title;
88
159
  background-color: $color-background-overlay;
@@ -91,5 +162,7 @@
91
162
  justify-content: center;
92
163
  height: 30px;
93
164
  padding: $table-cols-padding;
165
+ position: relative;
166
+ z-index: 5;
94
167
  }
95
168
  }