weui-rails 0.4.4 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -1
  3. data/app/views/weui/_message_box.html.erb +8 -8
  4. data/app/views/weui/message_box.html.erb +1 -1
  5. data/lib/weui-rails/helpers/weui_message_box.rb +1 -1
  6. data/lib/weui-rails/version.rb +1 -1
  7. data/vendor/assets/stylesheets/_weui.scss +43 -23
  8. data/vendor/assets/stylesheets/base/fn.scss +9 -6
  9. data/vendor/assets/stylesheets/base/mixin/_mobile.scss +1 -18
  10. data/vendor/assets/stylesheets/base/mixin/_setArrow.scss +11 -82
  11. data/vendor/assets/stylesheets/base/mixin/_setOnepx.scss +4 -4
  12. data/vendor/assets/stylesheets/base/mixin/_text.scss +5 -0
  13. data/vendor/assets/stylesheets/base/reset.scss +4 -3
  14. data/vendor/assets/stylesheets/base/variable/_color.scss +20 -0
  15. data/vendor/assets/stylesheets/base/variable/_global.scss +6 -32
  16. data/vendor/assets/stylesheets/base/variable/_weui-button.scss +37 -0
  17. data/vendor/assets/stylesheets/base/variable/{_weui_cell.scss → _weui-cell.scss} +11 -3
  18. data/vendor/assets/stylesheets/base/variable/_weui-dialog.scss +5 -0
  19. data/vendor/assets/stylesheets/base/variable/{_weui_grid.scss → _weui-grid.scss} +0 -0
  20. data/vendor/assets/stylesheets/base/variable/{_weui_msg.scss → _weui-msg.scss} +0 -0
  21. data/vendor/assets/stylesheets/base/variable/{_weui_progress.scss → _weui-progress.scss} +0 -0
  22. data/vendor/assets/stylesheets/icon/weui-font.scss +56 -0
  23. data/vendor/assets/stylesheets/icon/weui-icon_font.scss +94 -0
  24. data/vendor/assets/stylesheets/widget/weui-agree/weui-agree.scss +59 -0
  25. data/vendor/assets/stylesheets/widget/weui-animate/weui-animate.scss +54 -0
  26. data/vendor/assets/stylesheets/widget/{weui_button/weui_btn_default.scss → weui-button/weui-btn_default.scss} +1 -1
  27. data/vendor/assets/stylesheets/widget/weui-button/weui-btn_disabled.scss +15 -0
  28. data/vendor/assets/stylesheets/widget/{weui_button/weui_btn_global.scss → weui-button/weui-btn_global.scss} +4 -5
  29. data/vendor/assets/stylesheets/widget/weui-button/weui-btn_plain.scss +29 -0
  30. data/vendor/assets/stylesheets/widget/{weui_button/weui_btn_primary.scss → weui-button/weui-btn_primary.scss} +0 -0
  31. data/vendor/assets/stylesheets/widget/{weui_button/weui_btn_warn.scss → weui-button/weui-btn_warn.scss} +0 -0
  32. data/vendor/assets/stylesheets/widget/weui-button/weui-button.scss +60 -0
  33. data/vendor/assets/stylesheets/widget/weui-cell/weui-access.scss +32 -0
  34. data/vendor/assets/stylesheets/widget/{weui_cell/weui_cell_global.scss → weui-cell/weui-cell_global.scss} +25 -29
  35. data/vendor/assets/stylesheets/widget/weui-cell/weui-check.scss +4 -0
  36. data/vendor/assets/stylesheets/widget/{weui_cell/weui_check/weui_check_common.scss → weui-cell/weui-check/weui-check_common.scss} +0 -0
  37. data/vendor/assets/stylesheets/widget/{weui_cell/weui_check/weui_checkbox.scss → weui-cell/weui-check/weui-checkbox.scss} +3 -3
  38. data/vendor/assets/stylesheets/widget/{weui_cell/weui_check/weui_radio.scss → weui-cell/weui-check/weui-radio.scss} +2 -2
  39. data/vendor/assets/stylesheets/widget/weui-cell/weui-form.scss +5 -0
  40. data/vendor/assets/stylesheets/widget/weui-cell/weui-form/weui-form-preview.scss +89 -0
  41. data/vendor/assets/stylesheets/widget/{weui_cell/weui_form/weui_form_common.scss → weui-cell/weui-form/weui-form_common.scss} +26 -26
  42. data/vendor/assets/stylesheets/widget/weui-cell/weui-form/weui-select.scss +69 -0
  43. data/vendor/assets/stylesheets/widget/weui-cell/weui-form/weui-vcode.scss +27 -0
  44. data/vendor/assets/stylesheets/widget/weui-cell/weui-gallery.scss +35 -0
  45. data/vendor/assets/stylesheets/widget/weui-cell/weui-switch.scss +52 -0
  46. data/vendor/assets/stylesheets/widget/{weui_cell/weui_uploader.scss → weui-cell/weui-uploader.scss} +36 -36
  47. data/vendor/assets/stylesheets/widget/weui-flex/weui-flex.scss +8 -0
  48. data/vendor/assets/stylesheets/widget/weui-footer/weui-footer.scss +41 -0
  49. data/vendor/assets/stylesheets/widget/weui-grid/weui-grid.scss +55 -0
  50. data/vendor/assets/stylesheets/widget/weui-loading/weui-loading.scss +32 -0
  51. data/vendor/assets/stylesheets/widget/weui-media-box/weui-media-box.scss +87 -0
  52. data/vendor/assets/stylesheets/widget/{weui_page/weui_article.scss → weui-page/weui-article.scss} +5 -4
  53. data/vendor/assets/stylesheets/widget/weui-page/weui-msg.scss +45 -0
  54. data/vendor/assets/stylesheets/widget/weui-panel/weui-panel.scss +34 -0
  55. data/vendor/assets/stylesheets/widget/weui-picker/weui-picker.scss +98 -0
  56. data/vendor/assets/stylesheets/widget/weui-progress/weui-progress.scss +24 -0
  57. data/vendor/assets/stylesheets/widget/{weui_searchbar/weui_searchbar.scss → weui-searchbar/weui-searchbar.scss} +17 -17
  58. data/vendor/assets/stylesheets/widget/{weui_tab → weui-tab}/navbar.scss +7 -7
  59. data/vendor/assets/stylesheets/widget/weui-tab/tabbar.scss +57 -0
  60. data/vendor/assets/stylesheets/widget/{weui_tab/weui_tab.scss → weui-tab/weui-tab.scss} +2 -6
  61. data/vendor/assets/stylesheets/widget/weui-tips/weui-actionsheet.scss +84 -0
  62. data/vendor/assets/stylesheets/widget/weui-tips/weui-dialog.scss +133 -0
  63. data/vendor/assets/stylesheets/widget/weui-tips/weui-loadmore.scss +41 -0
  64. data/vendor/assets/stylesheets/widget/weui-tips/weui-mask.scss +20 -0
  65. data/vendor/assets/stylesheets/widget/weui-tips/weui-toast.scss +35 -0
  66. metadata +54 -47
  67. data/vendor/assets/stylesheets/base/mixin/_setChecked.scss +0 -21
  68. data/vendor/assets/stylesheets/base/variable/_monokai.scss +0 -11
  69. data/vendor/assets/stylesheets/base/variable/_weui_button.scss +0 -21
  70. data/vendor/assets/stylesheets/icon/weui_font.scss +0 -63
  71. data/vendor/assets/stylesheets/icon/weui_icon_font.scss +0 -83
  72. data/vendor/assets/stylesheets/widget/weui_button/weui_btn_disabled.scss +0 -9
  73. data/vendor/assets/stylesheets/widget/weui_button/weui_btn_plain.scss +0 -30
  74. data/vendor/assets/stylesheets/widget/weui_button/weui_button.scss +0 -58
  75. data/vendor/assets/stylesheets/widget/weui_cell/weui_access.scss +0 -23
  76. data/vendor/assets/stylesheets/widget/weui_cell/weui_check.scss +0 -4
  77. data/vendor/assets/stylesheets/widget/weui_cell/weui_form.scss +0 -6
  78. data/vendor/assets/stylesheets/widget/weui_cell/weui_form/weui_select.scss +0 -39
  79. data/vendor/assets/stylesheets/widget/weui_cell/weui_form/weui_select_after.scss +0 -9
  80. data/vendor/assets/stylesheets/widget/weui_cell/weui_form/weui_select_before.scss +0 -31
  81. data/vendor/assets/stylesheets/widget/weui_cell/weui_form/weui_vcode.scss +0 -14
  82. data/vendor/assets/stylesheets/widget/weui_cell/weui_switch.scss +0 -56
  83. data/vendor/assets/stylesheets/widget/weui_grid/weui_grid.scss +0 -73
  84. data/vendor/assets/stylesheets/widget/weui_media_box/weui_media_box.scss +0 -93
  85. data/vendor/assets/stylesheets/widget/weui_page/weui_msg.scss +0 -48
  86. data/vendor/assets/stylesheets/widget/weui_panel/weui_panel.scss +0 -64
  87. data/vendor/assets/stylesheets/widget/weui_progress/weui_progress.scss +0 -23
  88. data/vendor/assets/stylesheets/widget/weui_tab/tabbar.scss +0 -49
  89. data/vendor/assets/stylesheets/widget/weui_tips/weui_actionsheet.scss +0 -43
  90. data/vendor/assets/stylesheets/widget/weui_tips/weui_dialog.scss +0 -94
  91. data/vendor/assets/stylesheets/widget/weui_tips/weui_mask.scss +0 -35
  92. data/vendor/assets/stylesheets/widget/weui_tips/weui_toast.scss +0 -349
@@ -7,18 +7,19 @@
7
7
  margin-bottom: 1.5em;
8
8
  }
9
9
  h1 {
10
- font-size: 17px;
10
+ font-size: 18px;
11
11
  font-weight:400;
12
- margin-bottom: .75em;
12
+ margin-bottom: .9em;
13
13
  }
14
14
  h2 {
15
15
  font-size: 16px;
16
16
  font-weight:400;
17
- margin-bottom: .3em;
17
+ margin-bottom: .34em;
18
18
  }
19
19
  h3 {
20
20
  font-weight:400;
21
21
  font-size: 15px;
22
+ margin-bottom: .34em;
22
23
  }
23
24
  * {
24
25
  max-width: 100%;
@@ -27,6 +28,6 @@
27
28
  word-wrap: break-word;
28
29
  }
29
30
  p {
30
- margin: 10px 0;
31
+ margin: 0 0 .8em;
31
32
  }
32
33
  }
@@ -0,0 +1,45 @@
1
+ @import "../../base/fn";
2
+ @import "../weui-button/weui-button";
3
+
4
+ .#{$weui_ns}msg {
5
+ padding-top: $weuiMsgPaddingTop;
6
+ text-align: center;
7
+ }
8
+ .#{$weui_ns}msg__icon-area {
9
+ margin-bottom: $weuiMsgIconGap;
10
+ }
11
+ .#{$weui_ns}msg__text-area {
12
+ margin-bottom: $weuiMsgTextGap;
13
+ padding:0 20px;
14
+ }
15
+ .#{$weui_ns}msg__text-area a{
16
+ color:$weuiLinkColorDefault;
17
+ }
18
+ .#{$weui_ns}msg__title {
19
+ margin-bottom: $weuiMsgTitleGap;
20
+ font-weight: 400;
21
+ font-size: 20px;
22
+ }
23
+ .#{$weui_ns}msg__desc {
24
+ font-size: 14px;
25
+ color: $weuiTextColorGray;
26
+ }
27
+ .#{$weui_ns}msg__opr-area {
28
+ margin-bottom: $weuiMsgOprGap;
29
+ }
30
+ .#{$weui_ns}msg__extra-area {
31
+ margin-bottom: $weuiMsgExtraAreaGap;
32
+ font-size: 14px;
33
+ color: $weuiTextColorGray;
34
+ a{color: $weuiLinkColorDefault;}
35
+ }
36
+
37
+ @media screen and (min-height: $weuiMsgExtraAreaOfMinHeight) {
38
+ .#{$weui_ns}msg__extra-area {
39
+ position: fixed;
40
+ left: 0;
41
+ bottom: 0;
42
+ width: 100%;
43
+ text-align: center;
44
+ }
45
+ }
@@ -0,0 +1,34 @@
1
+ @import "../../base/fn";
2
+
3
+
4
+ .#{$weui_ns}panel {
5
+ background-color: #FFFFFF;
6
+ margin-top: 10px;
7
+ &:first-child {
8
+ margin-top: 0;
9
+ }
10
+
11
+ position: relative;
12
+ overflow: hidden;
13
+ &:before {
14
+ @include setTopLine($weuiLineColorLight);
15
+ }
16
+ &:after {
17
+ @include setBottomLine($weuiLineColorLight);
18
+ }
19
+ }
20
+
21
+ .#{$weui_ns}panel__hd {
22
+ padding: 14px 15px 10px;
23
+ color: $weuiTextColorGray;
24
+ font-size: 13px;
25
+ position: relative;
26
+ &:after {
27
+ @include setBottomLine($weuiLineColorLight);
28
+ left: 15px;
29
+ }
30
+ }
31
+
32
+
33
+
34
+
@@ -0,0 +1,98 @@
1
+ @import "../../base/fn";
2
+
3
+ .#{$weui_ns}picker {
4
+ position: fixed;
5
+ width: 100%;
6
+ left: 0;
7
+ bottom: 0;
8
+ z-index: 5000;
9
+ backface-visibility: hidden;
10
+ }
11
+
12
+ .#{$weui_ns}picker__hd {
13
+ display: flex;
14
+ padding: 10px 15px;
15
+ background-color: #fbf9fe;
16
+ position: relative;
17
+ text-align: center;
18
+ &:after {
19
+ @include setBottomLine($weuiLineColorLight);
20
+ }
21
+ }
22
+
23
+ .#{$weui_ns}picker__action {
24
+ display: block;
25
+ flex: 1;
26
+ color: $weuiLinkColorDefault;
27
+
28
+ &:first-child {
29
+ text-align: left;
30
+ }
31
+ &:last-child {
32
+ text-align: right;
33
+ }
34
+ }
35
+
36
+ .#{$weui_ns}picker__bd {
37
+ display: flex;
38
+ position: relative;
39
+ background-color: #fff;
40
+ height: 238px;
41
+ overflow: hidden;
42
+ }
43
+
44
+ .#{$weui_ns}picker__group {
45
+ flex: 1;
46
+ position: relative;
47
+ height: 100%;
48
+ //-webkit-mask-box-image: -webkit-linear-gradient(bottom,transparent,transparent 5%,#fff 50%,#fff 50%,transparent 95%,transparent);
49
+ }
50
+
51
+ .#{$weui_ns}picker__mask {
52
+ position: absolute;
53
+ top: 0;
54
+ left: 0;
55
+ width: 100%;
56
+ height: 100%;
57
+ margin: 0 auto;
58
+ z-index: 3;
59
+ background: linear-gradient(180deg, hsla(0, 0%, 100%, .95), hsla(0, 0%, 100%, .6)), linear-gradient(0deg, hsla(0, 0%, 100%, .95), hsla(0, 0%, 100%, .6));
60
+ background-position: top, bottom;
61
+ background-size: 100% 102px;
62
+ background-repeat: no-repeat;
63
+ }
64
+
65
+ .#{$weui_ns}picker__indicator {
66
+ width: 100%;
67
+ height: 34px;
68
+ position: absolute;
69
+ left: 0;
70
+ top: 102px;
71
+ z-index: 3;
72
+ &:before {
73
+ @include setTopLine($weuiLineColorLight);
74
+ }
75
+ &:after {
76
+ @include setBottomLine($weuiLineColorLight);
77
+ }
78
+ }
79
+
80
+ .#{$weui_ns}picker__content {
81
+ position: absolute;
82
+ top: 0;
83
+ left: 0;
84
+ width: 100%;
85
+ }
86
+
87
+ .#{$weui_ns}picker__item {
88
+ padding: 5px 0 4px;
89
+ text-align: center;
90
+ color: #000;
91
+ text-overflow: ellipsis;
92
+ white-space: nowrap;
93
+ overflow: hidden;
94
+ }
95
+
96
+ .#{$weui_ns}picker__item_disabled {
97
+ color: $weuiTextColorGray;
98
+ }
@@ -0,0 +1,24 @@
1
+ @import "../../base/fn";
2
+
3
+ .#{$weui_ns}progress {
4
+ display: flex;
5
+ align-items: center;
6
+ }
7
+
8
+ .#{$weui_ns}progress__bar {
9
+ background-color: $weuiProgressBg;
10
+ height: $weuiProgressHeight;
11
+ flex: 1;
12
+ }
13
+
14
+ .#{$weui_ns}progress__inner-bar {
15
+ width: 0;
16
+ height: 100%;
17
+ background-color: $weuiProgressColor;
18
+ }
19
+
20
+ .#{$weui_ns}progress__opr {
21
+ display: block;
22
+ margin-left: 15px;
23
+ font-size: 0;
24
+ }
@@ -1,30 +1,30 @@
1
1
  @import "../../base/fn";
2
- .#{$weui_ns}search_bar {
2
+ .#{$weui_ns}search-bar {
3
3
  position: relative;
4
4
  padding: 8px 10px;
5
5
  display: flex;
6
6
  box-sizing: border-box;
7
7
  background-color: #EFEFF4;
8
8
  &:before {
9
- @include setTopLine();
9
+ @include setTopLine(#D7D6DC);
10
10
  }
11
11
  &:after {
12
- @include setBottomLine();
12
+ @include setBottomLine(#D7D6DC);
13
13
  }
14
- &.#{$weui_ns}search_focusing {
15
- .#{$weui_ns}search_cancel {
14
+ &.#{$weui_ns}search-bar_focusing{
15
+ .#{$weui_ns}search-bar__cancel-btn{
16
16
  display: block;
17
17
  }
18
- .#{$weui_ns}search_text {
18
+ .#{$weui_ns}search-bar__label{
19
19
  display: none;
20
20
  }
21
21
  }
22
22
  }
23
- .#{$weui_ns}search_outer {
23
+ .#{$weui_ns}search-bar__form {
24
24
  position: relative;
25
25
  flex: auto;
26
26
  background-color: #EFEFF4;
27
- &:after {
27
+ &:after{
28
28
  content: '';
29
29
  position: absolute;
30
30
  left: 0;
@@ -39,7 +39,7 @@
39
39
  background: #FFFFFF;
40
40
  }
41
41
  }
42
- .#{$weui_ns}search_inner {
42
+ .#{$weui_ns}search-bar__box {
43
43
  position: relative;
44
44
  padding-left: 30px;
45
45
  padding-right: 30px;
@@ -47,7 +47,7 @@
47
47
  width: 100%;
48
48
  box-sizing: border-box;
49
49
  z-index: 1;
50
- .#{$weui_ns}search_input {
50
+ .#{$weui_ns}search-bar__input {
51
51
  padding: 4px 0;
52
52
  width: 100%;
53
53
  height: 20/14*1em;
@@ -60,13 +60,13 @@
60
60
  outline: none;
61
61
  }
62
62
  }
63
- .#{$weui_ns}icon_search {
63
+ .weui-icon-search {
64
64
  position: absolute;
65
65
  left: 10px;
66
66
  top: -2px;
67
67
  line-height: 28px;
68
68
  }
69
- .#{$weui_ns}icon_clear {
69
+ .weui-icon-clear {
70
70
  position: absolute;
71
71
  top: -2px;
72
72
  right: 0;
@@ -74,7 +74,7 @@
74
74
  line-height: 28px;
75
75
  }
76
76
  }
77
- .#{$weui_ns}search_text {
77
+ .#{$weui_ns}search-bar__label {
78
78
  position: absolute;
79
79
  top: 1px;
80
80
  right: 1px;
@@ -90,18 +90,18 @@
90
90
  font-size: 14px;
91
91
  vertical-align: middle;
92
92
  }
93
- .#{$weui_ns}icon_search {
93
+ .weui-icon-search {
94
94
  margin-right: 5px;
95
95
  }
96
96
  }
97
- .#{$weui_ns}search_cancel {
97
+ .#{$weui_ns}search-bar__cancel-btn {
98
98
  display: none;
99
99
  margin-left: 10px;
100
100
  line-height: 28px;
101
- white-space: nowrap;
102
101
  color: #09BB07;
102
+ white-space: nowrap;
103
103
  }
104
- .#{$weui_ns}search_input:not(:valid) ~ .#{$weui_ns}icon_clear {
104
+ .#{$weui_ns}search-bar__input:not(:valid) ~ .weui-icon-clear {
105
105
  display: none;
106
106
  }
107
107
 
@@ -9,34 +9,34 @@
9
9
  background-color: #fafafa;
10
10
 
11
11
  &:after {
12
- @include setBottomLine($globalBorderColor);
12
+ @include setBottomLine(#CCCCCC);
13
13
  }
14
14
 
15
- & + .#{$weui_ns}tab_bd {
15
+ & + .#{$weui_ns}tab__panel {
16
16
  padding-top: 50px;
17
17
  padding-bottom: 0;
18
18
  }
19
19
  }
20
20
 
21
- .#{$weui_ns}navbar_item {
21
+ .#{$weui_ns}navbar__item {
22
22
  position: relative;
23
23
  display: block;
24
24
  flex: 1;
25
25
  padding: 13px 0;
26
26
  text-align: center;
27
27
  font-size: 15px;
28
- -webkit-tap-highlight-color: transparent;
28
+ @include setTapColor();
29
29
 
30
30
  &:active {
31
31
  background-color: #ededed;
32
32
  }
33
33
 
34
- &.#{$weui_ns}bar_item_on {
34
+ &.#{$weui_ns}bar__item_on {
35
35
  background-color: #eaeaea;
36
36
  }
37
37
 
38
38
  &:after {
39
- @include setRightLine(#cccccc);
39
+ @include setRightLine(#CCCCCC);
40
40
  }
41
41
 
42
42
  &:last-child {
@@ -44,4 +44,4 @@
44
44
  display: none;
45
45
  }
46
46
  }
47
- }
47
+ }
@@ -0,0 +1,57 @@
1
+ @import "../../base/fn";
2
+
3
+ .#{$weui_ns}tabbar {
4
+ display: flex;
5
+ position: absolute;
6
+ z-index: 500;
7
+ bottom: 0;
8
+ width: 100%;
9
+ background-color: #f7f7fa;
10
+
11
+ &:before {
12
+ @include setTopLine(#C0BFC4);
13
+ }
14
+ }
15
+
16
+ .#{$weui_ns}tabbar__item {
17
+ display: block;
18
+ flex: 1;
19
+ padding: 7px 0 0;
20
+ font-size: 0;
21
+ color: $weuiTextColorGray;
22
+ text-align: center;
23
+ @include setTapColor();
24
+
25
+ &.#{$weui_ns}bar__item_on {
26
+ .#{$weui_ns}tabbar__icon, .#{$weui_ns}tabbar__icon > i, .#{$weui_ns}tabbar__label {
27
+ color: #09BB07;
28
+ }
29
+ }
30
+ }
31
+
32
+ .#{$weui_ns}tabbar__icon {
33
+ display: inline-block;
34
+ width: 24px;
35
+ height: 24px;
36
+
37
+ i &, > i {
38
+ font-size: 24px;
39
+ color: $weuiTextColorGray;
40
+ }
41
+
42
+ img {
43
+ width: 100%;
44
+ height: 100%;
45
+ }
46
+
47
+ & + .#{$weui_ns}tabbar__label {
48
+ margin-top: 5px;
49
+ margin-bottom: 3px;
50
+ }
51
+ }
52
+
53
+ .#{$weui_ns}tabbar__label {
54
+ text-align: center;
55
+ color: $weuiTextColorGray;
56
+ font-size: 12px;
57
+ }
@@ -7,7 +7,7 @@
7
7
  height: 100%;
8
8
  }
9
9
 
10
- .#{$weui_ns}tab_bd {
10
+ .#{$weui_ns}tab__panel, .#{$weui_ns}tab__bd {
11
11
  box-sizing: border-box;
12
12
  height: 100%;
13
13
  padding-bottom: 55px;
@@ -15,10 +15,6 @@
15
15
  -webkit-overflow-scrolling: touch;
16
16
  }
17
17
 
18
- .#{$weui_ns}tab_bd_item {
18
+ .#{$weui_ns}tab__bd-item {
19
19
  display: none;
20
20
  }
21
-
22
- .#{$weui_ns}tab_bd_item_active {
23
- display: block;
24
- }