beyond-rails 0.0.183 → 0.0.184
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/js/components/Tabbox.js +10 -2
- data/src/js/components/Tooltip.js +5 -1
- data/src/sass/_main.scss +0 -1
- data/src/sass/abstracts/_variables.scss +13 -13
- data/src/sass/components/_badge.scss +3 -9
- data/src/sass/components/_btn.scss +27 -11
- data/src/sass/components/_dropdown.scss +13 -0
- data/src/sass/components/_nav.scss +8 -3
- data/src/sass/components/_tabbox.scss +11 -1
- data/src/sass/components/_tooltip.scss +46 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e904c58d6c85c184e16b6aef492edefec12c7acbe2a52f6e9a6fae13578fce
|
4
|
+
data.tar.gz: 214741bf3e554a8eb8fd6006c73cfe82b691a5872318424aa0dd71363ed9aa17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5190c2df04411758149200d4087ddf37fcba9c737605a856e5ad4137c31013bb212377e34f505edda830485576f194ee152add6694baee9b82371ec6db04df46
|
7
|
+
data.tar.gz: 43975df7af1266b11e8e462ee3068f6aee83e2ede74a501f5314702850355ef2aa04f7dd13eea5c03ffdd32100eb822533462a47b91e3c33f22d106bd8cb7136
|
data/src/js/components/Tabbox.js
CHANGED
@@ -82,6 +82,9 @@ export default class Tabbox {
|
|
82
82
|
this.slider = document.createElement('div')
|
83
83
|
this.slider.classList.add('js-slider')
|
84
84
|
this.dom.appendChild(this.slider)
|
85
|
+
|
86
|
+
this.defaultSliderColor = getComputedStyle(this.slider).getPropertyValue('background-color')
|
87
|
+
|
85
88
|
const defaultBtn = this.btns.find(btn => 'default' in btn.dataset)
|
86
89
|
|
87
90
|
this.adjustSlider()
|
@@ -129,10 +132,12 @@ export default class Tabbox {
|
|
129
132
|
})
|
130
133
|
}
|
131
134
|
|
132
|
-
moveSlider({ top, left, width, color
|
135
|
+
moveSlider({ top, left, width, color }) {
|
133
136
|
this.slider.style.transform = `translate(${left}px, ${top}px)`
|
134
137
|
this.slider.style.width = width + 'px'
|
135
|
-
|
138
|
+
|
139
|
+
const defaultSliderColor = this.defaultSliderColor || '#858585'
|
140
|
+
this.slider.style.backgroundColor = color || defaultSliderColor
|
136
141
|
}
|
137
142
|
|
138
143
|
removeCurrentClass() {
|
@@ -159,6 +164,7 @@ export default class Tabbox {
|
|
159
164
|
}
|
160
165
|
|
161
166
|
let dropdownMatched = false
|
167
|
+
|
162
168
|
this.eachDropdownOption(({ dropdownBtn, dropdownInstance, optionEl }) => {
|
163
169
|
if (status === optionEl.dataset.tabboxItem) {
|
164
170
|
this.setDropdown({ dropdownBtn, dropdownInstance, optionEl })
|
@@ -174,9 +180,11 @@ export default class Tabbox {
|
|
174
180
|
}
|
175
181
|
|
176
182
|
setDropdown({ dropdownBtn, dropdownInstance, optionEl }) {
|
183
|
+
this.removeCurrentClass()
|
177
184
|
this.currentNode = dropdownBtn
|
178
185
|
this.optionEl = optionEl
|
179
186
|
this.moveToCurrentNode()
|
187
|
+
this.addCurrentClass()
|
180
188
|
|
181
189
|
this.dropdownInstances.filter(d => d !== dropdownInstance)
|
182
190
|
.forEach(d => d.restoreText())
|
@@ -67,6 +67,7 @@ export default class Tooltip {
|
|
67
67
|
this.addEvent(dom, 'mouseover', () => {
|
68
68
|
|
69
69
|
const msg = this.dom.dataset.msg || ''
|
70
|
+
const style = this.dom.dataset.style || 'default'
|
70
71
|
|
71
72
|
if (msg.length === 0) {
|
72
73
|
return
|
@@ -77,12 +78,15 @@ export default class Tooltip {
|
|
77
78
|
tooltip.style.opacity = 0
|
78
79
|
tooltip.style.display = 'block'
|
79
80
|
|
80
|
-
const { pos } = getFloatedTargetPos({
|
81
|
+
const { pos, place } = getFloatedTargetPos({
|
81
82
|
src: dom,
|
82
83
|
target: tooltip,
|
83
84
|
place: this.getPlace(),
|
84
85
|
offset: this.getOffset()
|
85
86
|
})
|
87
|
+
|
88
|
+
tooltip.className = (style === 'default') ? 'tooltip' : `tooltip tooltip-popover ${place}`
|
89
|
+
|
86
90
|
tooltip.style.left = toPixel(pos.left)
|
87
91
|
tooltip.style.top = toPixel(pos.top)
|
88
92
|
tooltip.style.opacity = 1
|
data/src/sass/_main.scss
CHANGED
@@ -311,7 +311,7 @@ $badges:
|
|
311
311
|
('badge-danger', #cd3d64, #fff),
|
312
312
|
('badge-warn', #f1946a, #fff),
|
313
313
|
('badge-info', #5ecdf1, #fff),
|
314
|
-
('badge-light', #f8f9fa, #
|
314
|
+
('badge-light', #f8f9fa, #666),
|
315
315
|
('badge-dark', #000, #fff),
|
316
316
|
('badge-type1', #d681d8, #fff),
|
317
317
|
('badge-type2', #fdd85f, #516487);
|
@@ -320,18 +320,18 @@ $badges:
|
|
320
320
|
$border-color: #dee2e6;
|
321
321
|
|
322
322
|
// buttons
|
323
|
-
// classname, bg, color, bg-ex, bg-disabled
|
324
|
-
$btn-primary: 'btn-primary', #6772e5, #fff, #7795f8, #b2b7df;
|
325
|
-
$btn-secondary: 'btn-secondary', #fff, #6772e5, #fff, #ebebeb;
|
326
|
-
$btn-success: 'btn-success', #25b47e, #fff, #7de1bb, #98b6ab;
|
327
|
-
$btn-danger: 'btn-danger', #cd3d64, #fff, #ef6a8e, #b59ba7;
|
328
|
-
$btn-warn: 'btn-warn', #f1946a, #fff, #ffaf8c, #e5cec3;
|
329
|
-
$btn-warning: 'btn-warning', #f1946a, #fff, #ffaf8c, #e5cec3;
|
330
|
-
$btn-info: 'btn-info', #5ecdf1, #fff, #7bdfff, #a4c5d0;
|
331
|
-
$btn-light: 'btn-light', #f8f9fa, #697386, #f8f9fa, #ebebeb;
|
332
|
-
$btn-dark: 'btn-dark', #000, #fff, #4c4c4c, #b7b7b7;
|
333
|
-
$btn-type1: 'btn-type1', #d681d8, #fff, #eda3ef, #d1bdd1;
|
334
|
-
$btn-type2: 'btn-type2', #fdd85f, #516487, #ffe89e, #dcd7c9;
|
323
|
+
// classname, bg, color, bg-ex, bg-disabled, outlined-color, badge-bg, badge-color
|
324
|
+
$btn-primary: 'btn-primary', #6772e5, #fff, #7795f8, #b2b7df, darken(#6772e5, 10%), #6c8eef, #fff;
|
325
|
+
$btn-secondary: 'btn-secondary', #fff, #6772e5, #fff, #ebebeb, lighten(#6772e5, 18%), lighten(#ccc, 12%), #6772e5;
|
326
|
+
$btn-success: 'btn-success', #25b47e, #fff, #7de1bb, #98b6ab, darken(#25b47e, 10%), lighten(#25b47e, 5%), #fff;
|
327
|
+
$btn-danger: 'btn-danger', #cd3d64, #fff, #ef6a8e, #b59ba7, darken(#cd3d64, 10%), lighten(#cd3d64, 10%), #fff;
|
328
|
+
$btn-warn: 'btn-warn', #f1946a, #fff, #ffaf8c, #e5cec3, darken(#f1946a, 10%), lighten(#f1946a, 7%), #fff;
|
329
|
+
$btn-warning: 'btn-warning', #f1946a, #fff, #ffaf8c, #e5cec3, darken(#f1946a, 10%), lighten(#f1946a, 7%), #fff;
|
330
|
+
$btn-info: 'btn-info', #5ecdf1, #fff, #7bdfff, #a4c5d0, darken(#5ecdf1, 10%), lighten(#5ecdf1, 7%), #fff;
|
331
|
+
$btn-light: 'btn-light', #f8f9fa, #697386, #f8f9fa, #ebebeb, #ccc, lighten(#ccc, 13%), #697386;
|
332
|
+
$btn-dark: 'btn-dark', #000, #fff, #4c4c4c, #b7b7b7, #000, lighten(#000, 30%), #fff;
|
333
|
+
$btn-type1: 'btn-type1', #d681d8, #fff, #eda3ef, #d1bdd1, darken(#d681d8, 10%), lighten(#d681d8, 7%), #fff;
|
334
|
+
$btn-type2: 'btn-type2', #fdd85f, #516487, #ffe89e, #dcd7c9, darken(#fdd85f, 10%), lighten(#fdd85f, 7%), #516487;
|
335
335
|
|
336
336
|
$btns:
|
337
337
|
$btn-primary,
|
@@ -1,16 +1,10 @@
|
|
1
1
|
.badge {
|
2
|
-
position: relative;
|
3
|
-
top: -1px;
|
4
2
|
font-family: 'Roboto', sans-serif;
|
5
3
|
font-weight: 900;
|
6
|
-
font-size:
|
7
|
-
|
8
|
-
border-radius: .25em;
|
9
|
-
line-height: 1;
|
10
|
-
vertical-align: baseline;
|
4
|
+
font-size: 12px;
|
5
|
+
border-radius: 2px;
|
11
6
|
background-color: #eaeaea;
|
12
|
-
padding:
|
13
|
-
text-align: center;
|
7
|
+
padding: 1px 4px;
|
14
8
|
white-space: nowrap;
|
15
9
|
transform: translateY(-8%);
|
16
10
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
.btn {
|
2
2
|
outline: 0;
|
3
3
|
background-color: #fff;
|
4
|
-
display: inline-
|
4
|
+
display: inline-flex;
|
5
|
+
align-items: center;
|
5
6
|
border: 0;
|
6
7
|
padding: 6px 12px 7px;
|
7
8
|
border-radius: 3px;
|
@@ -65,11 +66,7 @@
|
|
65
66
|
cursor: not-allowed;
|
66
67
|
}
|
67
68
|
.icon {
|
68
|
-
|
69
|
-
margin-right: 2px;
|
70
|
-
vertical-align: sub;
|
71
|
-
transform: translateY(-2px);
|
72
|
-
font-size: 1rem;
|
69
|
+
margin-right: .7em;
|
73
70
|
}
|
74
71
|
}
|
75
72
|
.btn-loader {
|
@@ -117,7 +114,12 @@
|
|
117
114
|
}
|
118
115
|
}
|
119
116
|
|
120
|
-
|
117
|
+
.btn .badge {
|
118
|
+
margin-left: .5rem;
|
119
|
+
font-weight: 400;
|
120
|
+
}
|
121
|
+
|
122
|
+
@each $classname, $bg, $color, $bg-ex, $bg-disabled, $outlined-color, $badge-bg, $badge-color in $btns {
|
121
123
|
.btn.#{$classname} {
|
122
124
|
background-color: $bg;
|
123
125
|
color: $color;
|
@@ -131,14 +133,21 @@
|
|
131
133
|
&:disabled {
|
132
134
|
background-color: $bg-disabled;
|
133
135
|
}
|
136
|
+
&.outlined {
|
137
|
+
border: 1px solid $outlined-color;
|
138
|
+
}
|
139
|
+
.badge {
|
140
|
+
background-color: $badge-bg;
|
141
|
+
color: $badge-color;
|
142
|
+
}
|
134
143
|
}
|
135
144
|
}
|
136
145
|
|
137
146
|
.btn.btn-link {
|
138
|
-
background-color:
|
147
|
+
background-color: transparent;
|
139
148
|
color: nth($btn-link, 3);
|
140
149
|
cursor: pointer;
|
141
|
-
box-shadow:
|
150
|
+
box-shadow: none;
|
142
151
|
&.hover,
|
143
152
|
&:hover,
|
144
153
|
&.active,
|
@@ -149,6 +158,9 @@
|
|
149
158
|
&:disabled {
|
150
159
|
color: nth($btn-link, 5);
|
151
160
|
}
|
161
|
+
&.outlined {
|
162
|
+
border: 1px solid #ccc;
|
163
|
+
}
|
152
164
|
}
|
153
165
|
|
154
166
|
button.close {
|
@@ -159,10 +171,14 @@ button.close {
|
|
159
171
|
|
160
172
|
.btn-line {
|
161
173
|
background-color: #7ec163;
|
162
|
-
|
174
|
+
&, &:hover {
|
175
|
+
color: #fff;
|
176
|
+
}
|
163
177
|
}
|
164
178
|
|
165
179
|
.btn-fb {
|
166
180
|
background-color: #4a9cff;
|
167
|
-
|
181
|
+
&, &:hover {
|
182
|
+
color: #fff;
|
183
|
+
}
|
168
184
|
}
|
@@ -36,6 +36,9 @@
|
|
36
36
|
|
37
37
|
z-index: 1;
|
38
38
|
padding: 8px 0;
|
39
|
+
&.no-padding {
|
40
|
+
padding: 0;
|
41
|
+
}
|
39
42
|
position: absolute;
|
40
43
|
background-color: #fff;
|
41
44
|
box-shadow: 0 0 0 1px rgba(136, 152, 170, .1),
|
@@ -142,3 +145,13 @@
|
|
142
145
|
bottom: 14px;
|
143
146
|
}
|
144
147
|
}
|
148
|
+
|
149
|
+
.dropdown-menu-title {
|
150
|
+
padding: 7px 14px;
|
151
|
+
font-weight: 500;
|
152
|
+
background-color: #f7fafc;
|
153
|
+
}
|
154
|
+
.dropdown-menu-content {
|
155
|
+
padding: 14px;
|
156
|
+
font-size: .9rem;
|
157
|
+
}
|
@@ -23,23 +23,28 @@
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
.nav-folder + ul {
|
26
|
+
margin-bottom: .5rem;
|
26
27
|
.nav-item {
|
27
|
-
|
28
|
+
padding-left: 1rem;
|
28
29
|
}
|
29
30
|
}
|
30
31
|
.nav-menu {
|
31
32
|
display: none;
|
32
33
|
}
|
33
34
|
.nav-item {
|
35
|
+
font-weight: 400;
|
34
36
|
color: #1a1f36;
|
35
37
|
text-decoration: none;
|
36
|
-
display:
|
38
|
+
display: flex;
|
39
|
+
align-items: center;
|
37
40
|
padding: 7px;
|
38
41
|
font-size: .875rem;
|
42
|
+
> i {
|
43
|
+
margin-right: .8rem;
|
44
|
+
}
|
39
45
|
}
|
40
46
|
.nav-item.active {
|
41
47
|
color: $color-primary;
|
42
|
-
font-weight: 700;
|
43
48
|
}
|
44
49
|
}
|
45
50
|
.nav-tabs .nav-item.show .nav-link,
|
@@ -60,7 +60,7 @@
|
|
60
60
|
border-left: 0;
|
61
61
|
border-bottom-width: 2px;
|
62
62
|
border-bottom-style: solid;
|
63
|
-
border-bottom-color: #
|
63
|
+
border-bottom-color: #e3e8ee;
|
64
64
|
outline: 0;
|
65
65
|
transition: all .3s;
|
66
66
|
&:hover {
|
@@ -84,3 +84,13 @@
|
|
84
84
|
}
|
85
85
|
}
|
86
86
|
}
|
87
|
+
.tabbox.tabbox-uno {
|
88
|
+
$tab-active-color: #6772e5;
|
89
|
+
.js-slider {
|
90
|
+
background-color: $tab-active-color;
|
91
|
+
}
|
92
|
+
.tab-btn.js-current {
|
93
|
+
color: $tab-active-color;
|
94
|
+
font-weight: 700;
|
95
|
+
}
|
96
|
+
}
|
@@ -8,3 +8,49 @@
|
|
8
8
|
color: #fff;
|
9
9
|
background-color: #555;
|
10
10
|
}
|
11
|
+
|
12
|
+
.tooltip.tooltip-popover {
|
13
|
+
background-color: #fff;
|
14
|
+
color: #3c4257;
|
15
|
+
padding: 10px 13px;
|
16
|
+
box-shadow: 4px 4px 15px 1px rgba(68, 68, 72, .12);
|
17
|
+
|
18
|
+
&:after {
|
19
|
+
content: ' ';
|
20
|
+
display: block;
|
21
|
+
border: 0;
|
22
|
+
border-top-left-radius: 4px;
|
23
|
+
@include size(12px);
|
24
|
+
background-color: #fff;
|
25
|
+
position: absolute;
|
26
|
+
transform: rotate(45deg);
|
27
|
+
}
|
28
|
+
&.top:after {
|
29
|
+
bottom: -6px;
|
30
|
+
left: 0;
|
31
|
+
right: 0;
|
32
|
+
margin-left: auto;
|
33
|
+
margin-right: auto;
|
34
|
+
}
|
35
|
+
&.bottom:after {
|
36
|
+
top: -6px;
|
37
|
+
left: 0;
|
38
|
+
right: 0;
|
39
|
+
margin-left: auto;
|
40
|
+
margin-right: auto;
|
41
|
+
}
|
42
|
+
&.left:after {
|
43
|
+
right: -6px;
|
44
|
+
top: 0;
|
45
|
+
bottom: 0;
|
46
|
+
margin-top: auto;
|
47
|
+
margin-bottom: auto;
|
48
|
+
}
|
49
|
+
&.right:after {
|
50
|
+
left: -6px;
|
51
|
+
top: 0;
|
52
|
+
bottom: 0;
|
53
|
+
margin-top: auto;
|
54
|
+
margin-bottom: auto;
|
55
|
+
}
|
56
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beyond-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.184
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kmsheng
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-08-
|
12
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|