@nutui/nutui 3.1.16 → 3.1.18-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 (137) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +1 -1
  3. package/dist/nutui.d.ts +3 -1
  4. package/dist/nutui.es.js +1860 -773
  5. package/dist/nutui.umd.js +1871 -778
  6. package/dist/packages/_es/ActionSheet.js +8 -3
  7. package/dist/packages/_es/Address.js +60 -7
  8. package/dist/packages/_es/Audio.js +289 -0
  9. package/dist/packages/_es/Avatar.js +1 -1
  10. package/dist/packages/_es/BackTop.js +3 -3
  11. package/dist/packages/_es/Badge.js +1 -1
  12. package/dist/packages/_es/Barrage.js +1 -1
  13. package/dist/packages/_es/Button.js +13 -4
  14. package/dist/packages/_es/Calendar.js +428 -209
  15. package/dist/packages/_es/Card.js +1 -2
  16. package/dist/packages/_es/Cascader.js +2 -2
  17. package/dist/packages/_es/Cell.js +2 -2
  18. package/dist/packages/_es/CellGroup.js +1 -1
  19. package/dist/packages/_es/Checkbox.js +2 -2
  20. package/dist/packages/_es/CheckboxGroup.js +2 -2
  21. package/dist/packages/_es/CircleProgress.js +1 -1
  22. package/dist/packages/_es/Col.js +1 -1
  23. package/dist/packages/_es/Collapse.js +1 -1
  24. package/dist/packages/_es/CollapseItem.js +4 -2
  25. package/dist/packages/_es/CountDown.js +1 -1
  26. package/dist/packages/_es/CountUp.js +1 -1
  27. package/dist/packages/_es/DatePicker.js +1 -2
  28. package/dist/packages/_es/Dialog.js +1 -1
  29. package/dist/packages/_es/Divider.js +1 -1
  30. package/dist/packages/_es/Drag.js +1 -1
  31. package/dist/packages/_es/Elevator.js +10 -5
  32. package/dist/packages/_es/Empty.js +1 -1
  33. package/dist/packages/_es/FixedNav.js +1 -1
  34. package/dist/packages/_es/Form.js +1 -1
  35. package/dist/packages/_es/FormItem.js +1 -1
  36. package/dist/packages/_es/Grid.js +1 -1
  37. package/dist/packages/_es/GridItem.js +2 -2
  38. package/dist/packages/_es/Icon.js +1 -1
  39. package/dist/packages/_es/ImagePreview.js +8 -5
  40. package/dist/packages/_es/Indicator.js +1 -1
  41. package/dist/packages/_es/InfiniteLoading.js +1 -1
  42. package/dist/packages/_es/Input.js +7 -2
  43. package/dist/packages/_es/InputNumber.js +1 -1
  44. package/dist/packages/_es/Layout.js +1 -1
  45. package/dist/packages/_es/Menu.js +1 -1
  46. package/dist/packages/_es/MenuItem.js +1 -1
  47. package/dist/packages/_es/Navbar.js +18 -59
  48. package/dist/packages/_es/NoticeBar.js +38 -23
  49. package/dist/packages/_es/Notify.js +2 -2
  50. package/dist/packages/_es/NumberKeyboard.js +1 -2
  51. package/dist/packages/_es/OverLay.js +1 -1
  52. package/dist/packages/_es/Pagination.js +1 -1
  53. package/dist/packages/_es/Picker.js +2 -1
  54. package/dist/packages/_es/Popover.js +4 -1
  55. package/dist/packages/_es/Popup.js +1 -1
  56. package/dist/packages/_es/Price.js +1 -1
  57. package/dist/packages/_es/Progress.js +24 -11
  58. package/dist/packages/_es/Radio.js +2 -2
  59. package/dist/packages/_es/RadioGroup.js +1 -1
  60. package/dist/packages/_es/Range.js +2 -2
  61. package/dist/packages/_es/Rate.js +1 -1
  62. package/dist/packages/_es/Row.js +1 -1
  63. package/dist/packages/_es/SearchBar.js +1 -1
  64. package/dist/packages/_es/ShortPassword.js +12 -4
  65. package/dist/packages/_es/SideNavBar.js +1 -1
  66. package/dist/packages/_es/SideNavBarItem.js +1 -1
  67. package/dist/packages/_es/Signature.js +1 -1
  68. package/dist/packages/_es/Skeleton.js +8 -6
  69. package/dist/packages/_es/Sku.js +1 -1
  70. package/dist/packages/_es/Step.js +1 -1
  71. package/dist/packages/_es/Steps.js +1 -1
  72. package/dist/packages/_es/Sticky.js +143 -0
  73. package/dist/packages/_es/SubSideNavBar.js +1 -1
  74. package/dist/packages/_es/Swipe.js +2 -2
  75. package/dist/packages/_es/Swiper.js +2 -2
  76. package/dist/packages/_es/SwiperItem.js +3 -8
  77. package/dist/packages/_es/Switch.js +2 -2
  78. package/dist/packages/_es/TabPane.js +1 -1
  79. package/dist/packages/_es/Tabbar.js +1 -1
  80. package/dist/packages/_es/TabbarItem.js +7 -3
  81. package/dist/packages/_es/Table.js +2 -2
  82. package/dist/packages/_es/Tabs.js +1 -1
  83. package/dist/packages/_es/Tag.js +1 -1
  84. package/dist/packages/_es/TextArea.js +1 -1
  85. package/dist/packages/_es/TimeDetail.js +1 -1
  86. package/dist/packages/_es/TimePannel.js +1 -1
  87. package/dist/packages/_es/TimeSelect.js +7 -2
  88. package/dist/packages/_es/Toast.js +15 -8
  89. package/dist/packages/_es/Uploader.js +1 -1
  90. package/dist/packages/_es/Video.js +1 -55
  91. package/dist/packages/_es/common.js +1 -1
  92. package/dist/packages/_es/component.js +1 -1
  93. package/dist/packages/_es/index.js +5 -7
  94. package/dist/packages/_es/index2.js +7 -58
  95. package/dist/packages/_es/index3.js +1 -1
  96. package/dist/packages/_es/index4.js +64 -0
  97. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  98. package/dist/packages/_es/pxCheck.js +1 -1
  99. package/dist/packages/_es/raf.js +1 -1
  100. package/dist/packages/_es/util.js +1 -1
  101. package/dist/packages/actionsheet/index.scss +7 -6
  102. package/dist/packages/address/index.scss +8 -0
  103. package/dist/packages/audio/index.scss +66 -0
  104. package/dist/packages/audiooperate/index.scss +13 -0
  105. package/dist/packages/button/index.scss +5 -5
  106. package/dist/packages/calendar/index.scss +47 -41
  107. package/dist/packages/calendaritem/index.scss +57 -42
  108. package/dist/packages/cell/index.scss +3 -3
  109. package/dist/packages/cellgroup/index.scss +1 -1
  110. package/dist/packages/elevator/index.scss +3 -0
  111. package/dist/packages/infiniteloading/index.scss +1 -1
  112. package/dist/packages/input/index.scss +4 -2
  113. package/dist/packages/navbar/index.scss +2 -0
  114. package/dist/packages/noticebar/index.scss +11 -5
  115. package/dist/packages/notify/index.scss +1 -0
  116. package/dist/packages/progress/index.scss +21 -17
  117. package/dist/packages/range/index.scss +8 -8
  118. package/dist/packages/row/index.scss +3 -0
  119. package/dist/packages/sticky/index.scss +5 -0
  120. package/dist/packages/swiper/index.scss +4 -4
  121. package/dist/packages/switch/index.scss +8 -8
  122. package/dist/packages/tabbar/index.scss +7 -4
  123. package/dist/packages/tabbaritem/index.scss +4 -3
  124. package/dist/packages/tabs/index.scss +1 -0
  125. package/dist/packages/toast/index.scss +8 -7
  126. package/dist/style.css +1 -1
  127. package/dist/styles/font/config.json +6 -1
  128. package/dist/styles/font/demo_index.html +118 -3
  129. package/dist/styles/font/iconfont.css +23 -3
  130. package/dist/styles/font/iconfont.js +25 -24
  131. package/dist/styles/font/iconfont.json +35 -0
  132. package/dist/styles/font/iconfont.ttf +0 -0
  133. package/dist/styles/font/iconfont.woff +0 -0
  134. package/dist/styles/font/iconfont.woff2 +0 -0
  135. package/dist/styles/themes/default.scss +46 -43
  136. package/dist/styles/variables.scss +123 -42
  137. package/package.json +12 -13
@@ -20,11 +20,13 @@
20
20
  }
21
21
  }
22
22
 
23
- .input-text {
24
- width: 230px;
23
+ .input-text,
24
+ &__text--readonly {
25
+ width: 90%;
25
26
  flex: 1;
26
27
  padding: 0 10px;
27
28
  padding-right: 35px;
29
+ text-align: left;
28
30
  outline: 0 none;
29
31
  border: 0;
30
32
  text-decoration: none;
@@ -41,6 +41,8 @@
41
41
  min-width: 53%;
42
42
  margin: 0 auto;
43
43
  text-align: center;
44
+ display: flex;
45
+ justify-content: center;
44
46
  &.icon {
45
47
  .icon {
46
48
  margin-left: 13px;
@@ -1,13 +1,15 @@
1
1
  .nut-noticebar-page {
2
- width: 100%;
2
+ // width: 100%;
3
3
  display: flex;
4
+ padding: 0px $noticebar-box-padding-right 0 $noticebar-box-padding-left;
4
5
  height: $noticebar-height;
5
6
  font-size: $noticebar-font-size;
6
7
  position: relative;
7
8
  align-items: center;
8
9
  &.wrapable {
9
10
  height: auto;
10
- padding: 8px 16px;
11
+ padding: $noticebar-wrapable-padding-bottom $noticebar-wrapable-padding-right $noticebar-wrapable-padding-bottom
12
+ $noticebar-wrapable-padding-left;
11
13
  .wrap {
12
14
  height: auto;
13
15
  .content {
@@ -25,7 +27,8 @@
25
27
  .left-icon {
26
28
  height: $noticebar-left-icon-width;
27
29
  min-width: $noticebar-left-icon-width;
28
- margin: 0 5px 0 10px;
30
+ margin: $noticebar-lefticon-padding-top $noticebar-lefticon-padding-right $noticebar-lefticon-padding-bottom
31
+ $noticebar-lefticon-padding-left;
29
32
  background-size: 100% 100%;
30
33
  }
31
34
  .right-icon {
@@ -33,9 +36,11 @@
33
36
  align-items: center;
34
37
  justify-content: center;
35
38
  width: $noticebar-right-icon-width;
36
- margin: 0 10px 0 5px;
39
+ margin: $noticebar-righticon-padding-top $noticebar-righticon-padding-right $noticebar-righticon-padding-bottom
40
+ $noticebar-righticon-padding-left;
37
41
  }
38
42
  .wrap {
43
+ display: flex;
39
44
  flex: 1;
40
45
  height: $noticebar-line-height;
41
46
  line-height: $noticebar-line-height;
@@ -72,7 +77,7 @@
72
77
 
73
78
  @keyframes nut-notice-bar-play-infinite {
74
79
  to {
75
- transform: translate3d(-100%, 0, 0);
80
+ transform: translateX(-100%);
76
81
  }
77
82
  }
78
83
  // 垂直方向的滚动
@@ -90,6 +95,7 @@
90
95
  height: $noticebar-height;
91
96
  font-size: $noticebar-font-size;
92
97
  overflow: hidden;
98
+ padding: 0px $noticebar-box-padding-right 0 $noticebar-box-padding-left;
93
99
 
94
100
  .horseLamp_list {
95
101
  margin: 0;
@@ -29,6 +29,7 @@
29
29
  text-align: center;
30
30
  word-wrap: break-word;
31
31
  height: $notify-height;
32
+ line-height: $notify-line-height;
32
33
  &--base {
33
34
  background: $notify-base-background-color;
34
35
  }
@@ -4,13 +4,13 @@
4
4
  display: flex;
5
5
  .nut-progress-outer {
6
6
  flex: 1;
7
- background-color: #f3f3f3;
8
- border-radius: 12px;
7
+ background-color: $progress-outer-background-color;
8
+ border-radius: $progress-outer-border-radius;
9
9
  height: 10px;
10
10
  .nut-progress-inner {
11
11
  width: 30%;
12
12
  height: 100%;
13
- border-radius: 12px;
13
+ border-radius: $progress-outer-border-radius;
14
14
  background: $progress-inner-background-color;
15
15
  -webkit-transition: all 0.4s;
16
16
  transition: all 0.4s;
@@ -30,7 +30,7 @@
30
30
  left: 0;
31
31
  right: 0;
32
32
  bottom: 0;
33
- border-radius: 10px;
33
+ border-radius: $progress-outer-border-radius;
34
34
  animation: progressActive 2s ease-in-out infinite;
35
35
  }
36
36
  }
@@ -49,26 +49,30 @@
49
49
  }
50
50
  }
51
51
  &.nut-progress-small {
52
- height: 5px;
52
+ height: $progress-small-height;
53
53
  .nut-progress-text {
54
- font-size: 7px;
55
- line-height: 10px;
56
- padding: 2px 4px;
57
- top: -100%;
54
+ font-size: $progress-small-text-font-size;
55
+ line-height: $progress-small-text-line-height;
56
+ padding: $progress-small-text-padding;
57
+ top: $progress-small-text-top;
58
58
  }
59
59
  }
60
60
  &.nut-progress-base {
61
- height: 10px;
61
+ height: $progress-base-height;
62
62
  .nut-progress-text {
63
- font-size: 9px;
64
- line-height: 13px;
63
+ font-size: $progress-base-text-font-size;
64
+ line-height: $progress-base-text-line-height;
65
+ padding: $progress-base-text-padding;
66
+ top: $progress-base-text-top;
65
67
  }
66
68
  }
67
69
  &.nut-progress-large {
68
- height: 15px;
70
+ height: $progress-large-height;
69
71
  .nut-progress-text {
70
- font-size: 13px;
71
- line-height: 18px;
72
+ font-size: $progress-large-text-font-size;
73
+ line-height: $progress-large-text-line-height;
74
+ padding: $progress-large-text-padding;
75
+ top: $progress-large-text-top;
72
76
  }
73
77
  }
74
78
  }
@@ -82,9 +86,9 @@
82
86
  min-width: 35px;
83
87
  }
84
88
  .nut-progress-insidetext {
85
- padding: 3px 5px 3px 6px;
89
+ padding: $progress-insidetext-padding;
86
90
  background: $progress-insidetext-background;
87
- border-radius: 5px;
91
+ border-radius: $progress-insidetext-border-radius;
88
92
  position: absolute;
89
93
  transition: all 0.4s;
90
94
  top: -42%;
@@ -7,7 +7,7 @@
7
7
  .min,
8
8
  .max {
9
9
  font-size: $font-size-1;
10
- color: $range-max;
10
+ color: $range-tip-font-color;
11
11
  user-select: none;
12
12
  }
13
13
  }
@@ -16,7 +16,7 @@
16
16
  position: relative;
17
17
  width: 100%;
18
18
  height: 3px;
19
- background-color: $rang-bg-color;
19
+ background-color: $range-bg-color;
20
20
  border-radius: 2px;
21
21
  cursor: pointer;
22
22
  &::before {
@@ -33,19 +33,19 @@
33
33
  position: relative;
34
34
  width: 100%;
35
35
  height: 100%;
36
- background: $rang-bar-bg-color;
36
+ background: $range-bar-bg-color;
37
37
  border-radius: inherit;
38
38
  transition: all 0.2s;
39
39
  }
40
40
 
41
41
  &-button {
42
42
  display: block;
43
- width: 24px;
44
- height: 24px;
45
- background-color: $white;
43
+ width: $range-bar-btn-width;
44
+ height: $range-bar-btn-height;
45
+ background-color: $range-bar-btn-bg-color;
46
46
  border-radius: 50%;
47
47
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15);
48
- border: 1px solid $primary-color;
48
+ border: $range-bar-btn-border;
49
49
  outline: none;
50
50
 
51
51
  &-wrapper,
@@ -75,7 +75,7 @@
75
75
  justify-content: center;
76
76
  user-select: none;
77
77
  font-size: $font-size-1;
78
- color: $range-max;
78
+ color: $range-tip-font-color;
79
79
  transform: translate3d(0, -100%, 0);
80
80
  }
81
81
  }
@@ -30,6 +30,9 @@
30
30
  &-justify-space-around {
31
31
  justify-content: space-around;
32
32
  }
33
+ &-justify-space-evenly {
34
+ justify-content: space-evenly;
35
+ }
33
36
  &-align-flex-start {
34
37
  align-items: flex-start;
35
38
  }
@@ -0,0 +1,5 @@
1
+ .nut-sticky {
2
+ &--fixed {
3
+ position: fixed;
4
+ }
5
+ }
@@ -21,10 +21,10 @@
21
21
  bottom: 12px;
22
22
  transform: translateX(-50%);
23
23
  i {
24
- width: 8px;
25
- height: 3px;
26
- margin-right: 7px;
27
- border-radius: 2px;
24
+ width: $swiper-pagination-item-width;
25
+ height: $swiper-pagination-item-height;
26
+ margin-right: $swiper-pagination-item-margin-right;
27
+ border-radius: $swiper-pagination-item-border-radius;
28
28
  &:last-child {
29
29
  margin-right: 0;
30
30
  }
@@ -3,7 +3,7 @@
3
3
  display: inline-flex;
4
4
  align-items: center;
5
5
  background-color: $primary-color;
6
- border-radius: 21px;
6
+ border-radius: $switch-border-radius;
7
7
  background-size: 100% 100%;
8
8
  background-repeat: no-repeat;
9
9
  background-position: center center;
@@ -37,17 +37,17 @@
37
37
  opacity: 0.6;
38
38
  }
39
39
  &.nut-switch-base {
40
- width: 36px;
41
- height: 21px;
42
- line-height: 21px;
40
+ width: $switch-width;
41
+ height: $switch-height;
42
+ line-height: $switch-line-height;
43
43
  .switch-button {
44
- height: 13px;
45
- width: 13px;
46
- transform: translateX(30%);
44
+ height: $switch-inside-width;
45
+ width: $switch-inside-height;
46
+ transform: $switch-inside-close-transform;
47
47
  }
48
48
  &.switch-open {
49
49
  .switch-button {
50
- transform: translateX(146%);
50
+ transform: $switch-inside-open-transform;
51
51
  }
52
52
  }
53
53
  &.switch-close {
@@ -1,7 +1,8 @@
1
1
  .nut-tabbar {
2
2
  border: 0px;
3
- border-bottom: 1px solid $tabbar-border-color;
4
- border-top: 1px solid $tabbar-border-color;
3
+ box-shadow: $tabbar-box-shadow;
4
+ border-bottom: $tabbar-border-bottom;
5
+ border-top: $tabbar-border-top;
5
6
  width: 100%;
6
7
  display: flex;
7
8
  padding: 7px 0;
@@ -11,14 +12,16 @@
11
12
  &:last-child {
12
13
  border-right: 0;
13
14
  }
15
+
14
16
  &-bottom {
15
17
  position: fixed;
16
18
  bottom: 0px;
17
19
  left: 0px;
18
20
  z-index: 888;
19
21
  }
22
+
20
23
  &-safebottom {
21
- padding-bottom: constant(safe-area-inset-bottom);
22
- padding-bottom: env(safe-area-inset-bottom);
24
+ margin-bottom: constant(safe-area-inset-bottom);
25
+ margin-bottom: env(safe-area-inset-bottom);
23
26
  }
24
27
  }
@@ -35,14 +35,14 @@
35
35
 
36
36
  &_num {
37
37
  line-height: 1;
38
- font-size: $font-size-0;
38
+ font-size: $tabbar-item-text-font-size;
39
39
  color: $white;
40
40
  padding: 1px 2px 2px 3px;
41
41
  }
42
42
 
43
43
  &_nums {
44
44
  line-height: 1;
45
- font-size: $font-size-0;
45
+ font-size: $tabbar-item-text-font-size;
46
46
  color: $white;
47
47
  padding: 2px 1px 2px 2px;
48
48
  }
@@ -52,7 +52,8 @@
52
52
  background-position: center center;
53
53
  }
54
54
  &_nav-word {
55
- font-size: $font-size-0;
55
+ font-size: $tabbar-item-text-font-size;
56
+ line-height: $tabbar-item-text-line-height;
56
57
  display: block;
57
58
  }
58
59
  &_big-word {
@@ -149,6 +149,7 @@
149
149
  }
150
150
  &.active {
151
151
  font-weight: 600;
152
+ color: $tabs-titles-item-active-color;
152
153
  .nut-tabs__titles-item__line {
153
154
  content: ' ';
154
155
  width: $tabs-horizontal-titles-item-active-line-width;
@@ -32,27 +32,28 @@
32
32
  justify-content: center;
33
33
  pointer-events: auto;
34
34
  height: 100%;
35
+ background: $toast-cover-bg-color;
35
36
  }
36
37
  &-inner {
37
38
  display: inline-block;
38
- font-size: $font-size-base;
39
+ font-size: $toast-text-font-size;
39
40
  min-width: 40%;
40
41
  max-width: 65%;
41
42
  text-align: center;
42
- padding: 24px 30px;
43
+ padding: $toast-inner-padding;
43
44
  word-break: break-all;
44
- background: rgba(0, 0, 0, 0);
45
- border-radius: 12px;
46
- color: $white;
45
+ background: $toast-inner-bg-color;
46
+ border-radius: $toast-inner-border-radius;
47
+ color: $toast-font-color;
47
48
  }
48
49
  &-text {
49
- font-size: 14px;
50
+ font-size: $toast-text-font-size;
50
51
  &:empty {
51
52
  margin-bottom: -8px;
52
53
  }
53
54
  }
54
55
  &-title {
55
- font-size: 16px;
56
+ font-size: $toast-title-font-size;
56
57
  &:empty {
57
58
  margin-bottom: -8px;
58
59
  }