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
@@ -0,0 +1,32 @@
1
+ @import "../../base/fn";
2
+
3
+ .#{$weui_ns}cell_access {
4
+ @include setTapColor();
5
+ color: inherit;
6
+ &:active {
7
+ background-color: #ECECEC;
8
+ }
9
+ .#{$weui_ns}cell__ft {
10
+ padding-right: 13px;
11
+ position: relative;
12
+ &:after {
13
+ content: " ";
14
+ @include setArrow(right, 6px, #C8C8CD, 2px);
15
+ position: absolute;
16
+ top: 50%;
17
+ margin-top: -4px;
18
+ right: 2px;
19
+ }
20
+ }
21
+ }
22
+ .#{$weui_ns}cell_link{
23
+ color: $weuiLinkColorDefault;
24
+ font-size: 14px;
25
+
26
+ // 由于weui-cell:first-child的:before为隐藏,所以这里要重新显示出来
27
+ &:first-child{
28
+ &:before{
29
+ display: block;
30
+ }
31
+ }
32
+ }
@@ -1,18 +1,5 @@
1
1
  @import "../../base/fn";
2
2
 
3
- .#{$weui_ns}cell {
4
- // onepx
5
- position: relative;
6
- &:before {
7
- @include setTopLine($weuiCellBorderColor);
8
- left: $weuiCellGapH;
9
- }
10
- &:first-child {
11
- &:before {
12
- display: none;
13
- }
14
- }
15
- }
16
3
  .#{$weui_ns}cells {
17
4
  margin-top: $weuiCellsMarginTop;
18
5
  background-color: $weuiCellBg;
@@ -21,7 +8,6 @@
21
8
 
22
9
  overflow: hidden; //因为每个cell的border使用before元素left搞的,ie下伪元素的containing block估计跟标准不同,在cell上用oh不生效
23
10
 
24
-
25
11
  // onepx
26
12
  position: relative;
27
13
  &:before {
@@ -32,24 +18,24 @@
32
18
  }
33
19
  }
34
20
 
35
- .#{$weui_ns}cells_title {
36
- margin-top: .77em;
37
- margin-bottom: .3em;
21
+ .#{$weui_ns}cells__title {
22
+ margin-top: .77em; // 15px - 行高
23
+ margin-bottom: .3em; // 8px - 行高
38
24
  padding-left: $weuiCellGapH;
39
25
  padding-right: $weuiCellGapH;
40
- color: $globalTextColor;
26
+ color: $weuiTextColorGray;
41
27
  font-size: $weuiCellTipsFontSize;
42
28
 
43
- & + .#{$weui_ns}cells{
29
+ & + .weui-cells {
44
30
  margin-top: 0;
45
31
  }
46
32
  }
47
33
 
48
- .#{$weui_ns}cells_tips{
34
+ .#{$weui_ns}cells__tips {
49
35
  margin-top: .3em; // 8px - 行高
50
- color: $globalTextColor;
51
- padding-left: 15px;
52
- padding-right: 15px;
36
+ color: $weuiTextColorGray;
37
+ padding-left: $weuiCellGapH;
38
+ padding-right: $weuiCellGapH;
53
39
  font-size: $weuiCellTipsFontSize;
54
40
  }
55
41
 
@@ -58,13 +44,23 @@
58
44
  position: relative; //这个是为了兼容cells容器onepx方案被before挡住而做的
59
45
  display: flex;
60
46
  align-items: center;
47
+ &:before {
48
+ @include setTopLine($weuiCellBorderColor);
49
+ left: $weuiCellGapH;
50
+ }
51
+ &:first-child {
52
+ &:before {
53
+ display: none;
54
+ }
55
+ }
61
56
  }
62
-
63
- .#{$weui_ns}cell_ft {
64
- text-align:right;
65
- color: $globalTextColor;
57
+ .#{$weui_ns}cell_primary{
58
+ align-items: flex-start;
66
59
  }
67
-
68
- .#{$weui_ns}cell_primary {
60
+ .#{$weui_ns}cell__bd{
69
61
  flex: 1;
70
62
  }
63
+ .#{$weui_ns}cell__ft {
64
+ text-align: right;
65
+ color: $weuiTextColorGray;
66
+ }
@@ -0,0 +1,4 @@
1
+ @import "../../base/fn";
2
+ @import "./weui-check/weui-check_common";
3
+ @import "./weui-check/weui-radio";
4
+ @import "./weui-check/weui-checkbox";
@@ -1,7 +1,7 @@
1
1
  @import "../../../base/fn";
2
2
 
3
3
  .#{$weui_ns}cells_checkbox {
4
- .#{$weui_ns}cell_hd {
4
+ .#{$weui_ns}cell__hd {
5
5
  padding-right: $weuiCellInnerGapH;
6
6
  }
7
7
  .#{$weui_ns}cell {
@@ -9,7 +9,7 @@
9
9
  background-color: #ECECEC;
10
10
  }
11
11
  }
12
- .#{$weui_ns}icon_checked {
12
+ .weui-icon-checked {
13
13
  &:before {
14
14
  content: '\EA01';
15
15
  color: #C9C9C9;
@@ -24,7 +24,7 @@
24
24
  // checkbox
25
25
  .#{$weui_ns}cells_checkbox & {
26
26
  &:checked {
27
- & + .#{$weui_ns}icon_checked {
27
+ & + .weui-icon-checked {
28
28
  &:before {
29
29
  content: '\EA06';
30
30
  color: #09BB07;
@@ -2,7 +2,7 @@
2
2
 
3
3
  // method2 accessbility
4
4
  .#{$weui_ns}cells_radio{
5
- .#{$weui_ns}cell_ft {
5
+ .#{$weui_ns}cell__ft {
6
6
  padding-left: $weuiCellInnerGapH;
7
7
  }
8
8
  .#{$weui_ns}cell {
@@ -15,7 +15,7 @@
15
15
  // radio
16
16
  .#{$weui_ns}cells_radio & {
17
17
  &:checked {
18
- & + .#{$weui_ns}icon_checked {
18
+ & + .weui-icon-checked {
19
19
  &:before {
20
20
  display: block;
21
21
  content: '\EA08';
@@ -0,0 +1,5 @@
1
+ @import "../../base/fn";
2
+ @import "./weui-form/weui-form_common";
3
+ @import "./weui-form/weui-form-preview";
4
+ @import "./weui-form/weui-select";
5
+ @import "./weui-form/weui-vcode";
@@ -0,0 +1,89 @@
1
+ @import "../../../base/fn";
2
+
3
+ .#{$weui_ns}form-preview{
4
+ position: relative;
5
+ background-color: #FFFFFF;
6
+ &:before{
7
+ @include setTopLine($weuiCellBorderColor);
8
+ }
9
+ &:after{
10
+ @include setBottomLine($weuiCellBorderColor);
11
+ }
12
+ }
13
+ .#{$weui_ns}form-preview__hd{
14
+ position: relative;
15
+ padding: $weuiCellGapV $weuiCellGapH;
16
+ text-align: right;
17
+ line-height: 2.5em;
18
+ &:after{
19
+ @include setBottomLine($weuiCellBorderColor);
20
+ left: $weuiCellGapH;
21
+ }
22
+ .weui-form-preview__value{
23
+ font-style: normal;
24
+ font-size: 1.6em;
25
+ }
26
+ }
27
+ .#{$weui_ns}form-preview__bd{
28
+ padding: $weuiCellGapV $weuiCellGapH;
29
+ font-size: .9em;
30
+ text-align: right;
31
+ color: $weuiTextColorGray;
32
+ line-height: 2;
33
+ }
34
+ .#{$weui_ns}form-preview__ft{
35
+ position: relative;
36
+ line-height: 50px;
37
+ display: flex;
38
+ &:after {
39
+ @include setTopLine($weuiDialogLineColor);
40
+ }
41
+ }
42
+ .#{$weui_ns}form-preview__item{
43
+ overflow: hidden;
44
+ }
45
+ .#{$weui_ns}form-preview__label{
46
+ float: left;
47
+ margin-right: 1em;
48
+ min-width: 4em;
49
+ color: $weuiTextColorGray;
50
+ text-align: justify;
51
+ text-align-last: justify;
52
+ }
53
+ .#{$weui_ns}form-preview__value{
54
+ display: block;
55
+ overflow: hidden;
56
+ word-break:normal;
57
+ word-wrap: break-word;
58
+ }
59
+ .#{$weui_ns}form-preview__btn {
60
+ position: relative;
61
+ display: block;
62
+ flex: 1;
63
+ color: $weuiDialogLinkColor;
64
+ text-align: center;
65
+ @include setTapColor();
66
+ button & {
67
+ background-color: transparent;
68
+ border: 0;
69
+ outline: 0;
70
+ font-size: inherit;
71
+ }
72
+ &:active {
73
+ background-color: $weuiDialogLinkActiveBc;
74
+ }
75
+ &:after {
76
+ @include setLeftLine($weuiDialogLineColor);
77
+ }
78
+ &:first-child {
79
+ &:after {
80
+ display: none;
81
+ }
82
+ }
83
+ }
84
+ .#{$weui_ns}form-preview__btn_default {
85
+ color: $weuiTextColorGray;
86
+ }
87
+ .#{$weui_ns}form-preview__btn_primary {
88
+ color: #0BB20C;
89
+ }
@@ -1,9 +1,9 @@
1
1
  @import "../../../base/fn";
2
2
 
3
- .#{$weui_ns}label {
4
- display:block;
5
- width:$weuiCellLabelWidth;
6
- @include text_wrap();
3
+ .#{$weui_ns}label{
4
+ display:block;
5
+ width:$weuiCellLabelWidth;
6
+ @include text_wrap();
7
7
  }
8
8
  .#{$weui_ns}input {
9
9
  width: 100%;
@@ -33,43 +33,43 @@
33
33
  outline: 0;
34
34
  }
35
35
 
36
- .#{$weui_ns}textarea_counter {
37
- color: $globalDescColor;
36
+ .#{$weui_ns}textarea-counter{
37
+ color: $weuiTextColorTips;
38
38
  text-align: right;
39
- .#{$weui_ns}cell_warn & {
40
- color: $globalWarnColor;
39
+ .#{$weui_ns}cell_warn &{
40
+ color: $weuiTextColorWarn;
41
41
  }
42
42
  }
43
43
 
44
44
  .#{$weui_ns}toptips {
45
45
  display:none;
46
46
  position: fixed;
47
- transform: translateZ(0);
48
- width: 100%;
47
+ -webkit-transform: translateZ(0);
49
48
  top: 0;
50
- line-height: 2.3;
49
+ left: 0;
50
+ right: 0;
51
+ padding:5px;
51
52
  font-size:14px;
52
53
  text-align: center;
53
54
  color: #FFF;
54
- z-index: 50000;
55
- &.#{$weui_ns}warn {
56
- background-color: $globalWarnColor;
57
- }
55
+ z-index: 5000;
56
+ @include text_wrap();
57
+ }
58
+ .#{$weui_ns}toptips_warn {
59
+ background-color: $weuiTextColorWarn;
58
60
  }
59
61
  .#{$weui_ns}cells_form {
60
- .#{$weui_ns}cell_warn {
61
- color: $globalWarnColor;
62
- .#{$weui_ns}icon_warn {
63
- display:inline-block;
64
- }
65
- }
66
- .#{$weui_ns}cell_ft {
62
+ .#{$weui_ns}cell__ft{
67
63
  font-size:0;
68
64
  }
69
- .#{$weui_ns}icon_warn {
70
- display:none;
65
+ .weui-icon-warn{
66
+ display:none;
71
67
  }
72
- input, textarea, label[for] {
73
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
68
+ input, textarea, label[for]{
69
+ @include setTapColor();
74
70
  }
75
71
  }
72
+ .#{$weui_ns}cell_warn{
73
+ color:$weuiTextColorWarn;
74
+ .weui-icon-warn{display:inline-block;}
75
+ }
@@ -0,0 +1,69 @@
1
+ @import "../../../base/fn";
2
+
3
+ .#{$weui_ns}cell_select {
4
+ padding: 0;
5
+ .#{$weui_ns}select {
6
+ padding-right: 30px;
7
+ }
8
+ .#{$weui_ns}cell__bd{
9
+ &:after{
10
+ content: " ";
11
+ @include setArrow(right, 6px, #C8C8CD, 2px);
12
+
13
+ position: absolute;
14
+ top: 50%;
15
+ right: $weuiCellGapH;
16
+ margin-top: -3px;
17
+ }
18
+ }
19
+ }
20
+
21
+ .#{$weui_ns}select {
22
+ -webkit-appearance: none;
23
+ border: 0;
24
+ outline: 0;
25
+ background-color: transparent;
26
+ width: 100%;
27
+ font-size: inherit;
28
+ height: $weuiCellHeight;
29
+ line-height: $weuiCellHeight;
30
+ position: relative;
31
+ z-index: 1;
32
+ padding-left: $weuiCellGapH;
33
+ }
34
+
35
+ .#{$weui_ns}cell_select-before {
36
+ padding-right:$weuiCellGapH;
37
+ .#{$weui_ns}select{
38
+ width:$weuiCellLabelWidth;
39
+ box-sizing: border-box;
40
+ }
41
+ .#{$weui_ns}cell__hd {
42
+ position:relative;
43
+ &:after {
44
+ @include setRightLine($weuiCellBorderColor);
45
+ }
46
+ &:before{
47
+ content: " ";
48
+ @include setArrow(right, 6px, #C8C8CD, 2px);
49
+
50
+ position: absolute;
51
+ top: 50%;
52
+ right: $weuiCellGapH;
53
+ margin-top: -3px;
54
+ }
55
+ }
56
+ .#{$weui_ns}cell__bd {
57
+ padding-left:$weuiCellGapH;
58
+ &:after{
59
+ display:none;
60
+ }
61
+ }
62
+ }
63
+
64
+ .#{$weui_ns}cell_select-after {
65
+ padding-left:$weuiCellGapH;
66
+ .#{$weui_ns}select {
67
+ padding-left:0;
68
+ }
69
+ }
@@ -0,0 +1,27 @@
1
+ @import "../../../base/fn";
2
+
3
+ .#{$weui_ns}cell_vcode {
4
+ padding-top: 0;
5
+ padding-right: 0;
6
+ padding-bottom: 0;
7
+ }
8
+ .#{$weui_ns}vcode-img{
9
+ margin-left: 5px;
10
+ height: $weuiCellHeight;
11
+ vertical-align: middle;
12
+ }
13
+
14
+ .#{$weui_ns}vcode-btn {
15
+ display: inline-block;
16
+ height: $weuiCellHeight;
17
+ margin-left: 5px;
18
+ padding: 0 0.6em 0 0.7em;
19
+ border-left: 1px solid $weuiLineColorLight;
20
+ line-height: $weuiCellHeight;
21
+ vertical-align: middle;
22
+ font-size: $weuiCellFontSize;
23
+ color: $weuiDialogLinkColor;
24
+ &:active {
25
+ color: desaturate($weuiDialogLinkColor, 30%);
26
+ }
27
+ }