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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f4828fd3221f4e4d2bb2ccc09fcdaaf57a849123bd963c0cb83ae386bdb1b5c
4
- data.tar.gz: 66c59442f6440c8a3b266169fb8380fbfa6fe6a45091a11c9a9d270cbdd1863e
3
+ metadata.gz: 68cbdf86bc3230159a37bb603f05f390c48948d9dc48d7f3fe2afc1311e67795
4
+ data.tar.gz: 66ba5909b7934aafa6e99f2f788ed992e79e8cb03842c385f920c5195c878fdb
5
5
  SHA512:
6
- metadata.gz: 765c43a69e7ebd7ec7c907238b59a6001a54af2d360fe5ef41db8f6079ca714f8aa82f2399dbe49880ffe022e06cbe10397cb889c62f8aba52f7e04e422becc2
7
- data.tar.gz: f197ec3643d6bf1f96c619e85e59ba2782787ce9c601ece34748b56531c32071aefd96fcd0d6a91dc7fa915b14faca13673969e6fa610cb54c5c00e787cc8207
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(() => {
@@ -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.15
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-05-04 00:00:00.000000000 Z
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