beyond-rails 1.0.15 → 1.0.18
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/TagInput.js +6 -2
- data/src/sass/abstracts/_variables.scss +2 -0
- data/src/sass/components/_tag-input.scss +2 -2
- data/src/sass/themes/_dark.scss +2 -0
- metadata +18 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68cbdf86bc3230159a37bb603f05f390c48948d9dc48d7f3fe2afc1311e67795
|
4
|
+
data.tar.gz: 66ba5909b7934aafa6e99f2f788ed992e79e8cb03842c385f920c5195c878fdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6a3c1ca959336543c0b85abdbdd602cd8b25615fc040640a857617eebcb7446f5dc9de8cfe70399b6538a7bf93201192fb07dc7b2ca017d5b2f1367104c7c2e
|
7
|
+
data.tar.gz: fd23c971dce0898e78e9323a2144e5f0343672482f64232fbcc6fadb88bf0c5a1ba13bde7a1e0d30bded0c46093af7d71d81545fd091c957877fa4cc08a5b581
|
@@ -171,9 +171,9 @@ export default class TagInput {
|
|
171
171
|
})
|
172
172
|
}
|
173
173
|
|
174
|
-
async addTagIfNeeded() {
|
174
|
+
async addTagIfNeeded(options = {}) {
|
175
175
|
const { input, suggestInput } = this
|
176
|
-
const inputValue = suggestInput.value || input.value
|
176
|
+
const inputValue = options.skipSuggest ? input.value : (suggestInput.value || input.value)
|
177
177
|
const res = await this.validate(inputValue)
|
178
178
|
if (res.clear) {
|
179
179
|
input.value = ''
|
@@ -241,6 +241,10 @@ export default class TagInput {
|
|
241
241
|
lastValue = input.value
|
242
242
|
})
|
243
243
|
|
244
|
+
this.addEvent(input, 'blur', () => {
|
245
|
+
this.addTagIfNeeded({ skipSuggest: true })
|
246
|
+
})
|
247
|
+
|
244
248
|
this.addEvent(input, 'input', event => {
|
245
249
|
this.suggestInputIfNeeded(input.value)
|
246
250
|
this.raf(() => {
|
@@ -4,7 +4,8 @@
|
|
4
4
|
padding: .4em .4em 0 .4em;
|
5
5
|
min-height: 40px;
|
6
6
|
.tag-suggest-input {
|
7
|
-
|
7
|
+
background: $control-bg;
|
8
|
+
color: $control-hint-color;
|
8
9
|
}
|
9
10
|
.tag-main-input {
|
10
11
|
position: absolute;
|
@@ -14,7 +15,6 @@
|
|
14
15
|
display: inline-block;
|
15
16
|
position: relative;
|
16
17
|
> input {
|
17
|
-
background: $control-bg;
|
18
18
|
border: 0;
|
19
19
|
&:focus {
|
20
20
|
outline: none;
|
data/src/sass/themes/_dark.scss
CHANGED
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: 1.0.
|
4
|
+
version: 1.0.18
|
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: 2022-
|
12
|
+
date: 2022-06-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|
@@ -55,30 +55,42 @@ dependencies:
|
|
55
55
|
name: actionpack
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '5.0'
|
61
|
+
- - "<"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '7.0'
|
61
64
|
type: :runtime
|
62
65
|
prerelease: false
|
63
66
|
version_requirements: !ruby/object:Gem::Requirement
|
64
67
|
requirements:
|
65
|
-
- - "
|
68
|
+
- - ">="
|
66
69
|
- !ruby/object:Gem::Version
|
67
70
|
version: '5.0'
|
71
|
+
- - "<"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '7.0'
|
68
74
|
- !ruby/object:Gem::Dependency
|
69
75
|
name: activemodel
|
70
76
|
requirement: !ruby/object:Gem::Requirement
|
71
77
|
requirements:
|
72
|
-
- - "
|
78
|
+
- - ">="
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '5.0'
|
81
|
+
- - "<"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '7.0'
|
75
84
|
type: :runtime
|
76
85
|
prerelease: false
|
77
86
|
version_requirements: !ruby/object:Gem::Requirement
|
78
87
|
requirements:
|
79
|
-
- - "
|
88
|
+
- - ">="
|
80
89
|
- !ruby/object:Gem::Version
|
81
90
|
version: '5.0'
|
91
|
+
- - "<"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '7.0'
|
82
94
|
- !ruby/object:Gem::Dependency
|
83
95
|
name: will_paginate
|
84
96
|
requirement: !ruby/object:Gem::Requirement
|