beyond-rails 0.0.139

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. checksums.yaml +7 -0
  2. data/src/font/icomoon.eot +0 -0
  3. data/src/font/icomoon.svg +125 -0
  4. data/src/font/icomoon.ttf +0 -0
  5. data/src/font/icomoon.woff +0 -0
  6. data/src/img/black-cat.svg +15 -0
  7. data/src/img/cart.svg +16 -0
  8. data/src/img/china-flag.svg +16 -0
  9. data/src/img/ecpay.svg +12 -0
  10. data/src/img/family-mart.svg +13 -0
  11. data/src/img/fb-messenger.svg +12 -0
  12. data/src/img/fb.svg +10 -0
  13. data/src/img/hct.svg +16 -0
  14. data/src/img/hi-life.svg +23 -0
  15. data/src/img/line.svg +14 -0
  16. data/src/img/ok-mart.svg +9 -0
  17. data/src/img/pelican.svg +33 -0
  18. data/src/img/seven-eleven.svg +13 -0
  19. data/src/img/smilepay.svg +13 -0
  20. data/src/img/taiwan-flag.svg +17 -0
  21. data/src/js/components/Alert.js +23 -0
  22. data/src/js/components/Autocomplete.js +110 -0
  23. data/src/js/components/AutocompleteMenu.js +88 -0
  24. data/src/js/components/Btn.js +41 -0
  25. data/src/js/components/Checkbox.js +24 -0
  26. data/src/js/components/DateInput.js +74 -0
  27. data/src/js/components/DateMenu.js +370 -0
  28. data/src/js/components/DateTimeRanger.js +436 -0
  29. data/src/js/components/Datepicker.js +250 -0
  30. data/src/js/components/DatepickerBtnArrow.js +18 -0
  31. data/src/js/components/Dropdown.js +137 -0
  32. data/src/js/components/Menu.js +43 -0
  33. data/src/js/components/Modal.js +76 -0
  34. data/src/js/components/Navbar.js +47 -0
  35. data/src/js/components/Radio.js +24 -0
  36. data/src/js/components/SearchDropdown.js +339 -0
  37. data/src/js/components/Sidebar.js +56 -0
  38. data/src/js/components/Tabbox.js +229 -0
  39. data/src/js/components/TimeInput.js +71 -0
  40. data/src/js/components/TimeMenu.js +117 -0
  41. data/src/js/components/Toast.js +47 -0
  42. data/src/js/components/ToastItem.js +62 -0
  43. data/src/js/components/Tooltip.js +94 -0
  44. data/src/js/consts/createdComponents.js +1 -0
  45. data/src/js/consts/index.js +5 -0
  46. data/src/js/helpers/bind.js +53 -0
  47. data/src/js/helpers/dateEq.js +5 -0
  48. data/src/js/helpers/dateGt.js +5 -0
  49. data/src/js/helpers/dateLt.js +5 -0
  50. data/src/js/helpers/docReady.js +10 -0
  51. data/src/js/helpers/getFloatedTargetPos.js +250 -0
  52. data/src/js/helpers/getKey.js +14 -0
  53. data/src/js/helpers/isTouchDevice.js +3 -0
  54. data/src/js/helpers/msToS.js +3 -0
  55. data/src/js/helpers/promisify.js +9 -0
  56. data/src/js/helpers/range.js +7 -0
  57. data/src/js/helpers/supportDom.js +46 -0
  58. data/src/js/helpers/toPixel.js +3 -0
  59. data/src/js/helpers/unbindAll.js +6 -0
  60. data/src/js/index.js +47 -0
  61. data/src/js/jquery/bindAlertFn.js +13 -0
  62. data/src/js/jquery/bindAutocompleteFn.js +13 -0
  63. data/src/js/jquery/bindBtnFn.js +17 -0
  64. data/src/js/jquery/bindCheckboxFn.js +13 -0
  65. data/src/js/jquery/bindDateTimeRangerFn.js +14 -0
  66. data/src/js/jquery/bindDatepickerFn.js +14 -0
  67. data/src/js/jquery/bindDropdownFn.js +14 -0
  68. data/src/js/jquery/bindMenuFn.js +13 -0
  69. data/src/js/jquery/bindModalFn.js +14 -0
  70. data/src/js/jquery/bindNavbarFn.js +13 -0
  71. data/src/js/jquery/bindRadioFn.js +13 -0
  72. data/src/js/jquery/bindSearchDropdownFn.js +14 -0
  73. data/src/js/jquery/bindSidebarFn.js +13 -0
  74. data/src/js/jquery/bindTabboxFn.js +13 -0
  75. data/src/js/jquery/bindToastFn.js +6 -0
  76. data/src/js/jquery/bindTooltipFn.js +13 -0
  77. data/src/js/jquery/index.js +52 -0
  78. data/src/js/polyfills/classList.js +263 -0
  79. data/src/js/polyfills/elementDataset.js +3 -0
  80. data/src/js/polyfills/nodeContains.js +17 -0
  81. data/src/js/polyfills/nodeHasAttribute.js +5 -0
  82. data/src/js/polyfills/nodeRemove.js +19 -0
  83. data/src/sass/_beyond-sprockets.scss +1 -0
  84. data/src/sass/_beyond.scss +50 -0
  85. data/src/sass/_main.scss +141 -0
  86. data/src/sass/abstracts/_mixins.scss +129 -0
  87. data/src/sass/abstracts/_placeholders.scss +43 -0
  88. data/src/sass/abstracts/_variables.scss +355 -0
  89. data/src/sass/base/_background.scss +10 -0
  90. data/src/sass/base/_typography.scss +183 -0
  91. data/src/sass/components/_alert.scss +50 -0
  92. data/src/sass/components/_autocomplete.scss +29 -0
  93. data/src/sass/components/_avatar.scss +28 -0
  94. data/src/sass/components/_badge.scss +29 -0
  95. data/src/sass/components/_breadcrumb.scss +17 -0
  96. data/src/sass/components/_btn-group.scss +19 -0
  97. data/src/sass/components/_btn.scss +172 -0
  98. data/src/sass/components/_card.scss +183 -0
  99. data/src/sass/components/_checkbox.scss +99 -0
  100. data/src/sass/components/_date-input.scss +28 -0
  101. data/src/sass/components/_date-menu.scss +85 -0
  102. data/src/sass/components/_date-time-ranger.scss +21 -0
  103. data/src/sass/components/_datepicker.scss +3 -0
  104. data/src/sass/components/_dropdown.scss +144 -0
  105. data/src/sass/components/_form.scss +383 -0
  106. data/src/sass/components/_icon.scss +371 -0
  107. data/src/sass/components/_input.scss +48 -0
  108. data/src/sass/components/_list.scss +23 -0
  109. data/src/sass/components/_modal.scss +72 -0
  110. data/src/sass/components/_nav.scss +75 -0
  111. data/src/sass/components/_navbar.scss +211 -0
  112. data/src/sass/components/_pagination.scss +64 -0
  113. data/src/sass/components/_radio.scss +71 -0
  114. data/src/sass/components/_search-dropdown.scss +28 -0
  115. data/src/sass/components/_select.scss +54 -0
  116. data/src/sass/components/_sidebar.scss +35 -0
  117. data/src/sass/components/_spinner.scss +79 -0
  118. data/src/sass/components/_tabbox.scss +83 -0
  119. data/src/sass/components/_table.scss +65 -0
  120. data/src/sass/components/_tag.scss +43 -0
  121. data/src/sass/components/_time-input.scss +28 -0
  122. data/src/sass/components/_time-menu.scss +24 -0
  123. data/src/sass/components/_toast.scss +51 -0
  124. data/src/sass/components/_tooltip.scss +10 -0
  125. data/src/sass/img/arrow-dropdown.svg +4 -0
  126. data/src/sass/img/arrow-select-ex.svg +18 -0
  127. data/src/sass/img/arrow-select.svg +18 -0
  128. data/src/sass/layout/_border-util.scss +36 -0
  129. data/src/sass/layout/_col.scss +90 -0
  130. data/src/sass/layout/_container.scss +44 -0
  131. data/src/sass/layout/_flex-util.scss +18 -0
  132. data/src/sass/layout/_offset-util.scss +20 -0
  133. data/src/sass/layout/_sizing-util.scss +14 -0
  134. data/src/sass/layout/_spacing-util.scss +9 -0
  135. data/src/sass/layout/_visibility-util.scss +25 -0
  136. data/src/sass/vendor/_normalize.scss +578 -0
  137. data/src/sass/vendor/_turbolink.scss +5 -0
  138. metadata +235 -0
@@ -0,0 +1,10 @@
1
+ @each $classname, $bg in $backgrounds {
2
+ .#{$classname} {
3
+ background-color: $bg !important;
4
+ }
5
+ }
6
+
7
+ .bg-content {
8
+ box-shadow: 0 -1px 3px 0 rgba(227, 232, 238, 1),
9
+ 0 1px 3px 0 rgba(227, 232, 238, 1);
10
+ }
@@ -0,0 +1,183 @@
1
+ h1, h2, h3, h4, h5, h6 {
2
+ font-weight: 400;
3
+ }
4
+ h1 {
5
+ font-size: 42px;
6
+ }
7
+ h2 {
8
+ font-size: 32px;
9
+ }
10
+ h3 {
11
+ font-size: 26px;
12
+ }
13
+ h4 {
14
+ font-size: 20px;
15
+ }
16
+ h5 {
17
+ font-size: 18px;
18
+ }
19
+ h6 {
20
+ font-size: 16px;
21
+ }
22
+
23
+ @media (max-width: $screen-sm) {
24
+ h1 {
25
+ font-size: 26px;
26
+ }
27
+ h2 {
28
+ font-size: 24px;
29
+ }
30
+ h3 {
31
+ font-size: 22px;
32
+ }
33
+ }
34
+
35
+ .txt-primary {
36
+ color: $txt-color-primary;
37
+ }
38
+ .txt-secondary {
39
+ color: $txt-color-secondary;
40
+ }
41
+ .txt-success {
42
+ color: $txt-color-success;
43
+ }
44
+ .txt-warn {
45
+ color: $txt-color-warn;
46
+ }
47
+ .txt-danger {
48
+ color: $txt-color-danger;
49
+ }
50
+
51
+ .txt-white {
52
+ color: #fff !important;
53
+ }
54
+
55
+ code {
56
+ color: $txt-color-primary;
57
+ }
58
+
59
+ .txt-lg {
60
+ font-size: 16px;
61
+ }
62
+ .txt-md {
63
+ font-size: 14px;
64
+ }
65
+ .txt-sm {
66
+ font-size: 12px;
67
+ }
68
+ .txt-ex-sm {
69
+ font-size: 10px;
70
+ }
71
+ .txt-bold {
72
+ font-weight: 900 !important;
73
+ }
74
+ .txt-strikethrough {
75
+ display: inline-block;
76
+ position: relative;
77
+ &:after {
78
+ content: '';
79
+ background-color: #f35b5b;
80
+ height: 2px;
81
+ width: 110%;
82
+ position: absolute;
83
+ top: 45%;
84
+ left: -5%;
85
+ transform: scaleY(.8);
86
+ }
87
+ }
88
+ .txt-positive {
89
+ font-family: 'Roboto', sans-serif;
90
+ color: #25b47e;
91
+ }
92
+ .txt-negative {
93
+ font-family: 'Roboto', sans-serif;
94
+ color: #cd3d64
95
+ }
96
+ .txt-num {
97
+ font-family: 'Roboto', sans-serif;
98
+ }
99
+ .txt-avatar,
100
+ a.txt-avatar,
101
+ a.txt-avatar:hover {
102
+ font-family: 'Helvetica Neue';
103
+ color: $color-avatar;
104
+ font-weight: 900;
105
+ }
106
+ body a.txt-avatar:hover {
107
+ border-bottom: 1px solid $color-avatar;
108
+ }
109
+
110
+ .txt-type0,
111
+ a.txt-type0,
112
+ a.txt-type0:hover {
113
+ font-family: 'Roboto', sans-serif;
114
+ font-weight: 900;
115
+ color: $color-txt-type0;
116
+ }
117
+ body a.txt-type0:hover {
118
+ border-bottom: 1px solid $color-txt-type0;
119
+ }
120
+
121
+ .txt-type1,
122
+ a.txt-type1,
123
+ a.txt-type1:hover {
124
+ font-family: 'Roboto', sans-serif;
125
+ font-weight: 900;
126
+ color: $color-txt-type1;
127
+ }
128
+ body a.txt-type1:hover {
129
+ border-bottom: 1px solid $color-txt-type1;
130
+ }
131
+
132
+ .txt-type2,
133
+ a.txt-type2,
134
+ a.txt-type2:hover {
135
+ font-family: 'Roboto', sans-serif;
136
+ font-weight: 900;
137
+ color: $color-txt-type2;
138
+ }
139
+ body a.txt-type2:hover {
140
+ border-bottom: 1px solid $color-txt-type2;
141
+ }
142
+
143
+ .txt-type3,
144
+ a.txt-type3,
145
+ a.txt-type3:hover {
146
+ font-family: 'Roboto', sans-serif;
147
+ color: $color-txt-type3;
148
+ }
149
+ body a.txt-type3:hover {
150
+ border-bottom: 1px solid $color-txt-type3;
151
+ }
152
+
153
+ .txt-type4,
154
+ a.txt-type4,
155
+ a.txt-type4:hover {
156
+ font-family: 'PingFang TC';
157
+ color: $color-txt-type4;
158
+ }
159
+ body a.txt-type4:hover {
160
+ border-bottom: 1px solid $color-txt-type4;
161
+ }
162
+
163
+ .txt-muted {
164
+ color: #6c757d;
165
+ }
166
+
167
+ .txt-center {
168
+ text-align: center !important;
169
+ }
170
+ .txt-right {
171
+ text-align: right !important;
172
+ }
173
+ .txt-left {
174
+ text-align: left !important;
175
+ }
176
+
177
+ .content-disabled {
178
+ &,
179
+ *,
180
+ *:before {
181
+ filter: grayscale(10%);
182
+ }
183
+ }
@@ -0,0 +1,50 @@
1
+ .alert {
2
+ position: relative;
3
+ padding: .75rem 1.25rem;
4
+ margin-bottom: 1rem;
5
+ border: 1px solid transparent;
6
+ border-radius: 4px;
7
+
8
+ a.alert-link {
9
+ font-weight: 900;
10
+ border-bottom: 1px solid transparent;
11
+ }
12
+ .alert-heading {
13
+ color: inherit;
14
+ font-weight: 900;
15
+ margin-bottom: 0.5rem;
16
+ }
17
+
18
+ p {
19
+ line-height: 1.5em;
20
+ }
21
+
22
+ @for $i from 1 through length($alert-states) {
23
+ $state: nth($alert-states, $i);
24
+ $bg: nth($alert-bgs, $i);
25
+ $color: nth($alert-colors, $i);
26
+ $color-link: nth($alert-color-links, $i);
27
+ $color-hr: nth($alert-color-hrs, $i);
28
+ &.alert-#{$state} {
29
+ background-color: $bg;
30
+ color: $color;
31
+ .alert-link {
32
+ color: $color-link;
33
+ &:hover {
34
+ border-bottom: 1px solid $color-link;
35
+ }
36
+ }
37
+ hr {
38
+ border-top-color: $color-hr;
39
+ }
40
+ }
41
+ }
42
+ }
43
+ .alert-dismissible .close {
44
+ position: absolute;
45
+ top: 0;
46
+ right: 0;
47
+ padding: .45rem 1.25rem;
48
+ color: inherit;
49
+ font-size: 1.4rem;
50
+ }
@@ -0,0 +1,29 @@
1
+ .autocomplete-menu {
2
+ background-color: #fff;
3
+ position: absolute;
4
+ box-shadow: 0 0 0 1px rgba(136, 152, 170, .1),
5
+ 0 15px 35px 0 rgba(49, 49, 93, .1),
6
+ 0 5px 15px 0 rgba(0, 0, 0, .08);
7
+ overflow-y: auto;
8
+ -webkit-overflow-scrolling: touch;
9
+ .item {
10
+ background-color: #fff;
11
+ cursor: default;
12
+ padding: 12px 15px;
13
+ font-size: 12px;
14
+ &:hover {
15
+ background-color: #f7fafc;
16
+ }
17
+ .page-prefix {
18
+ display: inline-block;
19
+ color: #6772e5;
20
+ margin-right: 7px;
21
+ vertical-align: top;
22
+ }
23
+ .page-title {
24
+ max-width: 300px;
25
+ display: inline-block;
26
+ color: #697396;
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,28 @@
1
+ .avatar {
2
+ overflow: hidden;
3
+ display: inline-block;
4
+ border-radius: 50%;
5
+ border: 1px solid #eaeaea;
6
+ vertical-align: middle;
7
+ text-align: center;
8
+ line-height: 30px;
9
+ font-size: 14px;
10
+ @include size(32px);
11
+ }
12
+ .avatar.avatar-sm {
13
+ @include size(24px);
14
+ line-height: 22px;
15
+ font-size: 12px;
16
+ }
17
+ .avatar.avatar-lg {
18
+ @include size(40px);
19
+ line-height: 38px;
20
+ font-size: 16px;
21
+ }
22
+ @each $classname, $bg in $bg-avatars {
23
+ .avatar.#{$classname} {
24
+ background-color: $bg;
25
+ border: 1px solid $bg;
26
+ color: #fff;
27
+ }
28
+ }
@@ -0,0 +1,29 @@
1
+ .badge {
2
+ position: relative;
3
+ top: -1px;
4
+ font-family: 'Roboto', sans-serif;
5
+ font-weight: 900;
6
+ font-size: 75%;
7
+ display: inline-block;
8
+ border-radius: .25em;
9
+ line-height: 1;
10
+ vertical-align: baseline;
11
+ background-color: #eaeaea;
12
+ padding: .25em .4em;
13
+ text-align: center;
14
+ white-space: nowrap;
15
+ transform: translateY(-8%);
16
+ }
17
+
18
+ .badge.badge-pill {
19
+ padding-right: .6em;
20
+ padding-left: .6em;
21
+ border-radius: 10em;
22
+ }
23
+
24
+ @each $classname, $bg, $color in $badges {
25
+ .badge.#{$classname} {
26
+ background-color: $bg;
27
+ color: $color;
28
+ }
29
+ }
@@ -0,0 +1,17 @@
1
+ .breadcrumb {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ padding: .75rem 1rem;
5
+ margin-bottom: 1rem;
6
+ list-style: none;
7
+ .breadcrumb-item + .breadcrumb-item::before {
8
+ display: inline-block;
9
+ padding-right: .7rem;
10
+ padding-left: .7rem;
11
+ color: #6c757d;
12
+ content: '/';
13
+ }
14
+ .breadcrumb-item.active {
15
+ color: #6c757d;
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ .btn-group {
2
+
3
+ display: inline-block;
4
+
5
+ > .btn:not(:first-child):not(:last-child) {
6
+ border-radius: 0;
7
+ }
8
+ > .btn.btn-first {
9
+ border-top-right-radius: 0;
10
+ border-bottom-right-radius: 0;
11
+ }
12
+ > .btn.btn-last {
13
+ border-top-left-radius: 0;
14
+ border-bottom-left-radius: 0;
15
+ }
16
+ .btn .badge {
17
+ margin-left: 10px;
18
+ }
19
+ }
@@ -0,0 +1,172 @@
1
+ .btn {
2
+ outline: 0;
3
+ background-color: #fff;
4
+ display: inline-block;
5
+ border: 0;
6
+ padding: 6px 12px 7px;
7
+ border-radius: 3px;
8
+ font-size: 14px;
9
+ font-weight: 700;
10
+ transition: all .3s;
11
+ box-shadow: 0 4px 6px 0 rgba(50, 50, 93, .11),
12
+ 0 1px 3px 0 rgba(0, 0, 0, .08);
13
+ &:focus,
14
+ &:hover:focus {
15
+ @include focus-outline;
16
+ }
17
+ &.btn-sm {
18
+ &, .icon:before {
19
+ font-size: 12px;
20
+ }
21
+ padding: 2px 6px;
22
+ .btn-loader {
23
+ padding: 8px 8px 9px;
24
+ .ring-loader {
25
+ @include size($ring-loader-size-sm);
26
+ div {
27
+ @include size($ring-loader-size-sm);
28
+ }
29
+ }
30
+ }
31
+ }
32
+ .btn-loader {
33
+ padding: 10px;
34
+ }
35
+ &.btn-lg {
36
+ font-size: 16px;
37
+ .icon:before {
38
+ font-size: 20px;
39
+ }
40
+ padding: 8px 20px;
41
+ .btn-loader {
42
+ padding: 11px;
43
+ .ring-loader {
44
+ @include size($ring-loader-size-lg);
45
+ div {
46
+ @include size($ring-loader-size-lg);
47
+ }
48
+ }
49
+ }
50
+ }
51
+ &.hover,
52
+ &:hover {
53
+ transform: translateY(-1px);
54
+ box-shadow: 0 7px 12px 0 rgba(50, 50, 93, .11),
55
+ 0 3px 6px 0 rgba(0, 0, 0, .08);
56
+ }
57
+ &.active,
58
+ &:active {
59
+ transform: translateY(0);
60
+ box-shadow: none;
61
+ }
62
+ &.disabled,
63
+ &:disabled {
64
+ transform: translateY(0);
65
+ cursor: not-allowed;
66
+ }
67
+ .icon {
68
+ display: inline-block;
69
+ margin-right: 2px;
70
+ vertical-align: sub;
71
+ transform: translateY(-2px);
72
+ font-size: 1rem;
73
+ }
74
+ }
75
+ .btn-loader {
76
+ position: relative;
77
+ }
78
+ .btn-block {
79
+ display: block;
80
+ width: 100%;
81
+ }
82
+ .btn.btn-icon {
83
+ outline: 0;
84
+ border-radius: 100%;
85
+ @include size(48px);
86
+ background-color: transparent;
87
+ border: 0;
88
+ position: relative;
89
+ padding: 0;
90
+ box-shadow: none;
91
+ &:focus {
92
+ @include focus-outline;
93
+ }
94
+ .icon {
95
+ margin: 0;
96
+ vertical-align: middle;
97
+ transform: translateY(0);
98
+ }
99
+ @include ripple(48px, 0, 0);
100
+ }
101
+
102
+ .btn.btn-outline {
103
+ background-color: #fff;
104
+ font-size: 13px;
105
+ font-weight: 400;
106
+ padding: 4px 7px;
107
+ border: 1px solid #ccc;
108
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
109
+ &.hover,
110
+ &:hover {
111
+ transform: translateY(-1px);
112
+ box-shadow: 0 1px 2px 0 rgba(50, 50, 93, .11),
113
+ 0 3px 6px 0 rgba(0, 0, 0, .08);
114
+ }
115
+ &:focus {
116
+ @include focus-outline;
117
+ }
118
+ }
119
+
120
+ @each $classname, $bg, $color, $bg-ex, $bg-disabled in $btns {
121
+ .btn.#{$classname} {
122
+ background-color: $bg;
123
+ color: $color;
124
+ &.hover,
125
+ &:hover,
126
+ &.active,
127
+ &:active {
128
+ background-color: $bg-ex;
129
+ }
130
+ &.disabled,
131
+ &:disabled {
132
+ background-color: $bg-disabled;
133
+ }
134
+ }
135
+ }
136
+
137
+ .btn.btn-link {
138
+ background-color: nth($btn-link, 2);
139
+ color: nth($btn-link, 3);
140
+ cursor: pointer;
141
+ box-shadow: 'none';
142
+ &.hover,
143
+ &:hover,
144
+ &.active,
145
+ &:active {
146
+ color: nth($btn-link, 4);
147
+ }
148
+ &.disabled,
149
+ &:disabled {
150
+ color: nth($btn-link, 5);
151
+ }
152
+ }
153
+
154
+ button.close {
155
+ padding: 0;
156
+ background-color: transparent;
157
+ border: 0;
158
+ }
159
+
160
+ .btn-line {
161
+ background-color: #7ec163;
162
+ &, &:hover {
163
+ color: #fff;
164
+ }
165
+ }
166
+
167
+ .btn-fb {
168
+ background-color: #4a9cff;
169
+ &, &:hover {
170
+ color: #fff;
171
+ }
172
+ }