beyond-rails 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d1ea517fd11dce944ae933af7257e63e291a56256ad28d1898f2770fbd732100
4
- data.tar.gz: 7deac82d55fd819796d53ac8ec5ec606422fb03b3cf7762171e36ca33b2d2eb7
3
+ metadata.gz: 68cbdf86bc3230159a37bb603f05f390c48948d9dc48d7f3fe2afc1311e67795
4
+ data.tar.gz: 66ba5909b7934aafa6e99f2f788ed992e79e8cb03842c385f920c5195c878fdb
5
5
  SHA512:
6
- metadata.gz: 35212d3fd88417e4acef4849aae288b45674718be562feecc311b3a7f3f47cec5b7179cf4c544c2f37db12825bd05afcc1ab814aef45623746990669fee743c8
7
- data.tar.gz: 551d171f523c3831df45d5dbf9bdec4d869d6af1fac692c509ba5bfc6624643f0fd2a8167273ca5bfc2b7cdbf28ebafacf07854691394b33bdd7034eb7c64aa3
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 = ''
@@ -242,7 +242,7 @@ export default class TagInput {
242
242
  })
243
243
 
244
244
  this.addEvent(input, 'blur', () => {
245
- this.addTagIfNeeded()
245
+ this.addTagIfNeeded({ skipSuggest: true })
246
246
  })
247
247
 
248
248
  this.addEvent(input, 'input', event => {
@@ -276,6 +276,8 @@ $control-active-color: #fff;
276
276
  $control-disabled-bg: #e9ecef;
277
277
  $control-disabled-color: #111;
278
278
 
279
+ $control-hint-color: rgba(60, 66, 87, .41);
280
+
279
281
  $form-check-disabled-color: #6c757d;
280
282
 
281
283
  // tags
@@ -4,7 +4,8 @@
4
4
  padding: .4em .4em 0 .4em;
5
5
  min-height: 40px;
6
6
  .tag-suggest-input {
7
- color: rgba(60, 66, 87, .41);
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;
@@ -63,6 +63,8 @@ $control-color: #fff;
63
63
  $control-disabled-bg: #2b2f40;
64
64
  $control-disabled-color: #888;
65
65
 
66
+ $control-hint-color: #767676;
67
+
66
68
  $form-check-disabled-color: #888;
67
69
 
68
70
  // tag
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.17
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng