@nutui/nutui 3.1.10-beta.3 → 3.1.12-beta.0

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 (96) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/nutui.d.ts +2 -1
  3. package/dist/nutui.es.js +1642 -926
  4. package/dist/nutui.umd.js +1648 -931
  5. package/dist/packages/_es/ActionSheet.js +1 -1
  6. package/dist/packages/_es/Address.js +1 -1
  7. package/dist/packages/_es/Avatar.js +1 -1
  8. package/dist/packages/_es/BackTop.js +1 -1
  9. package/dist/packages/_es/Badge.js +1 -1
  10. package/dist/packages/_es/Barrage.js +1 -1
  11. package/dist/packages/_es/Button.js +1 -1
  12. package/dist/packages/_es/Calendar.js +1 -1
  13. package/dist/packages/_es/Cell.js +1 -1
  14. package/dist/packages/_es/CellGroup.js +1 -1
  15. package/dist/packages/_es/Checkbox.js +1 -1
  16. package/dist/packages/_es/CheckboxGroup.js +2 -2
  17. package/dist/packages/_es/CircleProgress.js +1 -1
  18. package/dist/packages/_es/Col.js +1 -1
  19. package/dist/packages/_es/Collapse.js +1 -1
  20. package/dist/packages/_es/CollapseItem.js +1 -1
  21. package/dist/packages/_es/CountDown.js +1 -1
  22. package/dist/packages/_es/CountUp.js +1 -1
  23. package/dist/packages/_es/DatePicker.js +1 -1
  24. package/dist/packages/_es/Dialog.js +3 -12
  25. package/dist/packages/_es/Divider.js +1 -1
  26. package/dist/packages/_es/Drag.js +1 -1
  27. package/dist/packages/_es/Elevator.js +1 -1
  28. package/dist/packages/_es/FixedNav.js +1 -1
  29. package/dist/packages/_es/Icon.js +1 -1
  30. package/dist/packages/_es/ImagePreview.js +3 -2
  31. package/dist/packages/_es/InfiniteLoading.js +1 -1
  32. package/dist/packages/_es/Input.js +1 -1
  33. package/dist/packages/_es/InputNumber.js +1 -1
  34. package/dist/packages/_es/Layout.js +1 -1
  35. package/dist/packages/_es/Menu.js +83 -167
  36. package/dist/packages/_es/MenuItem.js +154 -15
  37. package/dist/packages/_es/Navbar.js +1 -1
  38. package/dist/packages/_es/NoticeBar.js +1 -1
  39. package/dist/packages/_es/Notify.js +1 -1
  40. package/dist/packages/_es/NumberKeyboard.js +1 -1
  41. package/dist/packages/_es/OverLay.js +1 -1
  42. package/dist/packages/_es/Pagination.js +1 -1
  43. package/dist/packages/_es/Picker.js +1 -1
  44. package/dist/packages/_es/Popover.js +1 -1
  45. package/dist/packages/_es/Popup.js +52 -13
  46. package/dist/packages/_es/Price.js +1 -1
  47. package/dist/packages/_es/Progress.js +1 -1
  48. package/dist/packages/_es/Radio.js +18 -5
  49. package/dist/packages/_es/RadioGroup.js +6 -2
  50. package/dist/packages/_es/Range.js +3 -31
  51. package/dist/packages/_es/Rate.js +1 -1
  52. package/dist/packages/_es/Row.js +1 -1
  53. package/dist/packages/_es/SearchBar.js +52 -49
  54. package/dist/packages/_es/ShortPassword.js +1 -1
  55. package/dist/packages/_es/Signature.js +1 -1
  56. package/dist/packages/_es/Sku.js +533 -0
  57. package/dist/packages/_es/Step.js +1 -1
  58. package/dist/packages/_es/Steps.js +1 -1
  59. package/dist/packages/_es/Swipe.js +1 -1
  60. package/dist/packages/_es/Swiper.js +2 -2
  61. package/dist/packages/_es/SwiperItem.js +1 -1
  62. package/dist/packages/_es/Switch.js +1 -1
  63. package/dist/packages/_es/TabPane.js +1 -1
  64. package/dist/packages/_es/Tabbar.js +1 -1
  65. package/dist/packages/_es/TabbarItem.js +1 -1
  66. package/dist/packages/_es/Tabs.js +2 -2
  67. package/dist/packages/_es/Tag.js +1 -1
  68. package/dist/packages/_es/TextArea.js +1 -1
  69. package/dist/packages/_es/TimeDetail.js +1 -1
  70. package/dist/packages/_es/TimePannel.js +1 -1
  71. package/dist/packages/_es/TimeSelect.js +1 -1
  72. package/dist/packages/_es/Toast.js +3 -3
  73. package/dist/packages/_es/Uploader.js +159 -73
  74. package/dist/packages/_es/Video.js +1 -1
  75. package/dist/packages/_es/component.js +1 -1
  76. package/dist/packages/_es/index.js +1 -1
  77. package/dist/packages/_es/index2.js +31 -8
  78. package/dist/packages/_es/index3.js +13 -0
  79. package/dist/packages/_es/plugin-vue_export-helper.js +4 -3
  80. package/dist/packages/_es/pxCheck.js +1 -1
  81. package/dist/packages/_es/raf.js +1 -1
  82. package/dist/packages/button/index.scss +3 -0
  83. package/dist/packages/menu/index.scss +32 -60
  84. package/dist/packages/menuitem/index.scss +36 -99
  85. package/dist/packages/progress/index.scss +2 -0
  86. package/dist/packages/radio/index.scss +32 -4
  87. package/dist/packages/radiogroup/index.scss +20 -0
  88. package/dist/packages/searchbar/index.scss +25 -29
  89. package/dist/packages/sku/index.scss +147 -0
  90. package/dist/packages/uploader/index.scss +95 -8
  91. package/dist/style.css +1 -1
  92. package/dist/styles/mixins/index.scss +0 -4
  93. package/dist/styles/themes/default.scss +31 -30
  94. package/dist/styles/variables.scss +40 -3
  95. package/package.json +2 -1
  96. package/dist/packages/_es/style.css +0 -160
@@ -1,109 +1,46 @@
1
1
  .nut-menu-item {
2
- flex: 1;
3
- display: flex;
4
- align-items: center;
5
- justify-content: center;
6
- cursor: pointer;
7
- padding: 0 5px;
8
- &.disabled {
9
- color: #999;
10
- }
11
- &.nut-menu-item-active {
12
- .nut-menu-title {
13
- font-weight: bold;
14
- .icon {
15
- color: #1a1a1a;
16
- transition: all ease 0.3s;
17
- transform: rotate(-180deg);
18
- background: url('https://img14.360buyimg.com/imagetools/jfs/t1/144044/16/20214/521/5fe5bb14Ebf213fe3/40f271b982f31898.png')
19
- no-repeat;
20
- background-size: contain;
21
- }
22
- }
23
- .nut-menu-panel {
24
- display: block;
25
- }
2
+ .active {
3
+ font-weight: 500;
26
4
  }
27
5
  }
28
- .nut-menu-title {
29
- font-size: 14px;
6
+
7
+ .nut-menu-item__content {
8
+ padding: $nut-menu-item-content-padding;
9
+ max-height: $nut-menu-item-content-max-height;
10
+ overflow-y: auto;
30
11
  display: flex;
31
- align-items: center;
32
- .title-name {
33
- white-space: nowrap;
34
- max-width: 100px;
35
- overflow: hidden;
36
- text-overflow: ellipsis;
37
- }
38
- .icon {
39
- display: inline-block;
40
- width: 6px;
41
- height: 6px;
42
- background: url('https://img13.360buyimg.com/imagetools/jfs/t1/152898/12/10149/452/5fd990b5Ec7c12d70/3bf06076b758bed1.png')
43
- no-repeat;
44
- background-size: contain;
45
- color: #909ca4;
46
- transform: rotate(0deg);
47
- transition: all ease 0.3s;
48
- margin: 0 2px;
12
+ flex-wrap: wrap;
13
+
14
+ .nut-menu-item__option {
15
+ color: $title-color;
16
+ font-size: $font-size-2;
17
+ padding-top: $nut-menu-item-option-padding-top;
18
+ padding-bottom: $nut-menu-item-option-padding-bottom;
19
+ display: flex;
20
+ align-items: center;
21
+
22
+ i {
23
+ margin-right: $nut-menu-item-option-i-margin-right;
24
+ }
49
25
  }
50
26
  }
51
- .nut-menu-panel {
52
- display: none;
53
- width: 100%;
27
+
28
+ .nut-menu__overlay {
54
29
  position: absolute;
55
- left: 0;
56
- top: 46px;
57
- color: #2d2d2d;
58
- overflow: hidden;
59
- background-color: #fff;
60
- -webkit-box-sizing: border-box;
61
- box-sizing: border-box;
62
- -webkit-overflow-scrolling: touch;
63
- z-index: 9998;
64
- border-top: 1px solid #f7f8fa;
65
- border-radius: 0 0 15px 15px;
66
- box-shadow: 0 4px 5px 0px rgba(236, 236, 236, 0.25);
67
- overflow: auto;
68
- // &.active{
69
- // display: block;
70
- // }
30
+ top: auto !important;
71
31
  }
72
32
 
73
- .menu-list {
74
- display: flex;
75
- padding: 10px 15px;
76
- flex-direction: column;
77
- &.bubble-line {
78
- flex-flow: wrap;
79
- .menu-option {
80
- width: 50%;
81
- }
82
- }
83
- &.three-line {
84
- flex-flow: wrap;
85
- .menu-option {
86
- width: 33%;
87
- }
88
- }
89
- .menu-option {
90
- min-height: 24px;
91
- line-height: 42px;
92
- font-size: 14px;
93
- color: #1a1a1a;
94
- width: 100%;
95
- white-space: nowrap;
96
- overflow: hidden;
97
- text-overflow: ellipsis;
98
- padding: 0 5px;
99
- &.checked {
100
- font-weight: bold;
101
- }
102
- }
103
- .check-icon {
104
- width: 14px;
105
- height: 14px;
106
- margin-right: 5px;
107
- color: #fa2c19;
108
- }
33
+ .nut-menu__pop {
34
+ transition: all 0 ease 0;
35
+ transform: none;
36
+ top: auto !important;
37
+ }
38
+
39
+ .placeholder-element {
40
+ position: fixed;
41
+ top: -$nut-menu-bar-line-height;
42
+ left: 0;
43
+ right: 0;
44
+ z-index: $nut-menu-bar-opened-z-index;
45
+ background-color: transparent;
109
46
  }
@@ -85,6 +85,7 @@
85
85
  padding: 0 5px;
86
86
  font-size: 13px;
87
87
  line-height: 1;
88
+ min-width: 35px;
88
89
  }
89
90
  .nut-progress-insidetext {
90
91
  padding: 3px 5px 3px 6px;
@@ -93,6 +94,7 @@
93
94
  position: absolute;
94
95
  transition: all 0.4s;
95
96
  top: -42%;
97
+ min-width: 0px;
96
98
  }
97
99
  .nut-icon-success,
98
100
  .nut-icon-fail {
@@ -1,23 +1,51 @@
1
1
  .nut-radio {
2
2
  display: flex;
3
3
  align-items: center;
4
+ flex-shrink: 0;
5
+
6
+ &:last-child {
7
+ margin-bottom: 0 !important;
8
+ margin-right: 0 !important;
9
+ }
10
+
4
11
  &--reverse {
5
- flex-direction: row-reverse;
6
12
  .nut-radio__label {
7
13
  margin-right: 15px;
8
14
  margin-left: 0;
9
15
  }
10
16
  }
17
+
18
+ &__button {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ padding: 5px 18px;
22
+ font-size: 12px;
23
+ background: #f6f7f9;
24
+ border-radius: 15px;
25
+ color: $radio-label-font-color;
26
+ box-sizing: border-box;
27
+ &--active {
28
+ background: $radio-label-button-background;
29
+ color: $radio-label-font-active-color;
30
+ border: 1px solid $radio-label-button-border-color;
31
+ }
32
+ &--disabled {
33
+ color: $radio-label-disable-color;
34
+ border: none;
35
+ }
36
+ }
37
+
11
38
  &__label {
12
39
  margin-left: 15px;
13
- font-size: 16px;
14
- color: $radio-label-color;
40
+ font-size: 14px;
41
+ color: $radio-label-font-color;
15
42
  &--disabled {
16
43
  color: $radio-label-disable-color;
17
44
  }
18
45
  }
46
+
19
47
  &__icon {
20
- color: $primary-color;
48
+ color: $radio-label-font-active-color;
21
49
  transition-duration: 0.3s;
22
50
  transition-property: color, border-color, background-color;
23
51
  }
@@ -1,2 +1,22 @@
1
1
  .nut-radiogroup {
2
+ display: inline-block;
3
+ .nut-radio {
4
+ margin-bottom: 5px;
5
+ }
6
+ &--vertical {
7
+ }
8
+ &--horizontal {
9
+ .nut-radio {
10
+ display: inline-flex;
11
+ margin-right: 10px;
12
+ &--round {
13
+ .nut-radio__label {
14
+ margin: 0 6px;
15
+ }
16
+ }
17
+ &--button {
18
+ // ...
19
+ }
20
+ }
21
+ }
2
22
  }
@@ -1,27 +1,40 @@
1
1
  .nut-searchbar {
2
2
  display: flex;
3
3
  align-items: center;
4
- .search-input {
4
+ width: 100%;
5
+ padding: 9px 16px;
6
+ background: $searchbar-background;
7
+ box-sizing: border-box;
8
+ &__search-input {
5
9
  display: flex;
6
10
  align-items: center;
7
11
  width: 100%;
8
12
  height: 32px;
9
13
  flex: 1;
10
14
  padding: 0 0 0 13px;
11
- background-color: #fff;
12
15
  border-radius: 16px;
13
16
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.04);
17
+ background: $searchbar-input-background;
14
18
 
15
- .input-inner {
19
+ .nut-searchbar__input-inner {
16
20
  display: flex;
17
21
  position: relative;
18
22
  width: 100%;
23
+ > taro-form-core {
24
+ width: 100%;
25
+ }
19
26
  form {
20
27
  display: flex;
21
28
  align-items: center;
22
29
  width: 100%;
23
30
  }
24
- .input-clear {
31
+ input {
32
+ width: 100%;
33
+ height: 100%;
34
+ min-width: 214px;
35
+ padding-left: 4px;
36
+ }
37
+ .nut-searchbar__input-clear {
25
38
  display: flex;
26
39
  justify-content: center;
27
40
  align-items: center;
@@ -33,7 +46,7 @@
33
46
  height: 16px;
34
47
  margin-top: -8px;
35
48
  margin-right: 10px;
36
- & .nut-icon-mask-close {
49
+ & .nut-searchbar__nut-icon-mask-close {
37
50
  color: rgb(204, 204, 204);
38
51
  &:hover {
39
52
  cursor: pointer;
@@ -43,17 +56,17 @@
43
56
  }
44
57
  }
45
58
 
46
- .iptleft-search-icon {
59
+ .nut-searchbar__iptleft-search-icon {
47
60
  margin-right: 6px;
48
61
  width: 14px;
49
62
  height: 14px;
50
63
  }
51
64
 
52
- .iptright-sarch-icon {
65
+ .nut-searchbar__iptright-sarch-icon {
53
66
  margin-right: 12px;
54
67
  }
55
68
 
56
- .input-bar {
69
+ .nut-searchbar__input-bar {
57
70
  width: 100%;
58
71
  height: 36px;
59
72
  flex: 1;
@@ -67,36 +80,19 @@
67
80
  }
68
81
  }
69
82
 
70
- .left-search-icon {
83
+ &__left-search-icon {
71
84
  margin-right: 8px;
72
85
  }
73
86
 
74
- .search-icon {
87
+ &__search-icon {
75
88
  display: flex;
76
89
  justify-content: center;
77
90
  align-items: center;
78
91
  }
79
92
 
80
- .right-search-icon {
93
+ &__right-search-icon {
81
94
  margin-left: 16px;
82
95
  font-size: 14px;
83
- color: rgba(26, 26, 26, 1);
84
- }
85
-
86
- .btn-right {
87
- display: flex;
88
- align-items: center;
89
- justify-content: center;
90
- margin-left: 12px;
91
- font-size: 14px;
92
- color: #e1251b;
93
- }
94
-
95
- a {
96
- text-decoration: none;
97
- }
98
-
99
- .nut-icon {
100
- vertical-align: middle;
96
+ color: $searchbar-right-out-color;
101
97
  }
102
98
  }
@@ -0,0 +1,147 @@
1
+ .nut-sku {
2
+ height: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ padding: 0px;
6
+ background: $white;
7
+ &-header {
8
+ height: 100px;
9
+ display: flex;
10
+ flex-shrink: 0;
11
+ margin-top: 18px;
12
+ padding: 0 18px;
13
+ > img {
14
+ width: 100px;
15
+ height: 100px;
16
+ flex-shrink: 0;
17
+ margin-right: 12px;
18
+ }
19
+ &-right {
20
+ flex: 1;
21
+ display: flex;
22
+ flex-direction: column;
23
+ justify-content: flex-end;
24
+ &-extra {
25
+ font-size: 12px;
26
+ color: $text-color;
27
+ }
28
+ }
29
+ }
30
+ &-content {
31
+ flex: 1;
32
+ overflow-y: auto;
33
+ overflow-x: hidden;
34
+ &::-webkit-scrollbar {
35
+ display: none;
36
+ }
37
+ margin-top: 24px;
38
+ padding: 0 18px;
39
+ }
40
+ &-select {
41
+ &-item {
42
+ display: flex;
43
+ flex-direction: column;
44
+ &-title {
45
+ height: 13px;
46
+ font-weight: bold;
47
+ font-size: 13px;
48
+ color: $black;
49
+ margin-bottom: 18px;
50
+ }
51
+ &-skus {
52
+ display: flex;
53
+ flex-wrap: wrap;
54
+ &-sku {
55
+ margin-right: 12px;
56
+ height: 30px;
57
+ line-height: 30px;
58
+ padding: 0 18px;
59
+ border-radius: 15px;
60
+ font-size: 11px;
61
+ color: $black;
62
+ flex-shrink: 0;
63
+ margin-bottom: 12px;
64
+ background: rgba(242, 242, 242, 1);
65
+ border: 1px solid rgba(242, 242, 242, 1);
66
+
67
+ &.active {
68
+ background: rgba(252, 237, 235, 1);
69
+ border: $sku-item-border;
70
+ color: $primary-color;
71
+ }
72
+ &.disable {
73
+ color: $text-color;
74
+ text-decoration: $sku-item-disable-line;
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ &-stepper {
81
+ display: flex;
82
+ justify-content: space-between;
83
+ margin: 10px 0 30px;
84
+ &-title {
85
+ font-weight: bold;
86
+ font-size: 13px;
87
+ color: $black;
88
+ margin-right: 12px;
89
+ }
90
+ &-limit {
91
+ flex: 1;
92
+ display: flex;
93
+ align-items: center;
94
+
95
+ font-size: 12px;
96
+ color: $text-color;
97
+ }
98
+ &-count {
99
+ display: flex;
100
+ align-items: center;
101
+ &-lowestBuy {
102
+ font-size: 12px;
103
+ color: $primary-color;
104
+ }
105
+ }
106
+ }
107
+ &-operate {
108
+ width: 100%;
109
+ &-desc {
110
+ display: block;
111
+ width: 100%;
112
+ padding: 10px 0;
113
+ text-align: center;
114
+ background: #fbf9da;
115
+ color: #de6a1c;
116
+ font-size: 12px;
117
+ }
118
+ &-btn {
119
+ height: 54px;
120
+ width: 100%;
121
+ display: flex;
122
+ justify-content: space-between;
123
+ align-items: center;
124
+ background: $white;
125
+ text-align: center;
126
+ padding: 0 18px;
127
+ box-sizing: border-box;
128
+ &-item {
129
+ width: 100%;
130
+ height: 40px;
131
+ line-height: 40px;
132
+ margin-right: 18px;
133
+ background: $sku-opetate-bg-default;
134
+ border-radius: 21px;
135
+ font-size: 15px;
136
+ color: $white;
137
+ &:last-child {
138
+ margin-right: 0;
139
+ }
140
+ }
141
+
142
+ &-buy {
143
+ background: $sku-opetate-bg-buy;
144
+ }
145
+ }
146
+ }
147
+ }
@@ -10,11 +10,14 @@
10
10
  &__upload {
11
11
  position: relative;
12
12
  background: $uploader-background;
13
- width: $uploader-width;
14
- height: $uploader-height;
13
+ width: $uploader-picture-width;
14
+ height: $uploader-picture-height;
15
15
  display: flex;
16
16
  align-items: center;
17
17
  justify-content: center;
18
+
19
+ &.list {
20
+ }
18
21
  }
19
22
 
20
23
  &__input {
@@ -32,17 +35,68 @@
32
35
  }
33
36
 
34
37
  &__preview {
35
- width: $uploader-width;
36
- height: $uploader-height;
37
38
  display: flex;
38
39
  align-items: center;
39
40
  justify-content: center;
40
41
  margin-right: 10px;
41
42
  margin-bottom: 10px;
43
+ box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);
44
+
45
+ &__progress {
46
+ position: absolute;
47
+ left: 0;
48
+ top: 0;
49
+ bottom: 0;
50
+ right: 0;
51
+ background: rgba(0, 0, 0, 0.6);
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ justify-content: center;
56
+ &__msg {
57
+ color: $white;
58
+ font-size: 12px;
59
+ margin-top: 6px;
60
+ }
61
+ }
62
+ &.list {
63
+ width: 100%;
64
+ margin-right: 0px;
65
+ margin-bottom: 0px;
66
+ margin-top: 10px;
67
+ }
68
+ &-list {
69
+ width: 100%;
70
+ height: 32px;
71
+ display: flex;
72
+ flex-direction: column;
73
+ position: relative;
74
+ padding-right: 20px;
75
+ .nut-uploader__preview-img__file__name {
76
+ -webkit-line-clamp: 1;
77
+ padding: 2px;
78
+ height: 24px;
79
+ }
80
+
81
+ .nut-uploader__preview-img__file__del {
82
+ position: absolute;
83
+ right: 4px;
84
+ top: 6px;
85
+ }
86
+ .nut-progress {
87
+ position: absolute;
88
+ left: 0;
89
+ right: 0;
90
+ bottom: 0;
91
+ .nut-progress-outer {
92
+ height: 2px !important;
93
+ }
94
+ }
95
+ }
42
96
  &-img {
43
97
  position: relative;
44
- width: 100%;
45
- height: 100%;
98
+ width: $uploader-picture-width;
99
+ height: $uploader-picture-height;
46
100
  .close {
47
101
  position: absolute;
48
102
  right: 0;
@@ -55,16 +109,49 @@
55
109
  left: 0;
56
110
  right: 0;
57
111
  text-align: center;
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: center;
58
115
  font-size: 12px;
59
116
  color: $white;
60
- height: 30px;
61
- line-height: 30px;
117
+ height: 0px;
118
+ transition: height 0.3s;
62
119
  background: rgba(0, 0, 0, 0.54);
120
+ @include oneline-ellipsis();
63
121
  }
64
122
  &__c {
65
123
  height: 100%;
66
124
  width: 100%;
67
125
  }
126
+ &__file {
127
+ height: 100%;
128
+ width: 100%;
129
+ display: flex;
130
+ align-items: center;
131
+ justify-content: center;
132
+ transition: all 0.3s;
133
+
134
+ &__name {
135
+ display: flex;
136
+ width: 100%;
137
+ font-size: 12px;
138
+ color: $text-color;
139
+ &.error {
140
+ color: red !important;
141
+ }
142
+ &.success {
143
+ color: #1890ff !important;
144
+ }
145
+ .nut-icon-link {
146
+ &::before {
147
+ margin-left: -25%;
148
+ margin-top: -25%;
149
+ transform: none;
150
+ }
151
+ }
152
+ @include moreline-ellipsis();
153
+ }
154
+ }
68
155
  }
69
156
  }
70
157
  }