beyond-rails 1.0.12 → 1.0.15

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: 26aae44ec06ec8216eebe16e794065aa23c7e510d6253a0de48f6deff3294731
4
- data.tar.gz: e13f0bb6afb3827f57c07e2fdadc9d5e6f3381266c36142f44750c500a132b02
3
+ metadata.gz: 5f4828fd3221f4e4d2bb2ccc09fcdaaf57a849123bd963c0cb83ae386bdb1b5c
4
+ data.tar.gz: 66c59442f6440c8a3b266169fb8380fbfa6fe6a45091a11c9a9d270cbdd1863e
5
5
  SHA512:
6
- metadata.gz: 6a6f7d37b7378f86d6043be868c80e8ade984fbfd9dc27866ef461976927338c34d3a351e34171773ad6535fe8253395eec72f558d6b5b69075020f88c5931aa
7
- data.tar.gz: 99342b5ea812513262e4e5e15ddbabddbbda9a359490ca6d09c96acdeb4186847b53daa4c29b348303a9b57684da28294db3a8476c6eb477047796739047e92b
6
+ metadata.gz: 765c43a69e7ebd7ec7c907238b59a6001a54af2d360fe5ef41db8f6079ca714f8aa82f2399dbe49880ffe022e06cbe10397cb889c62f8aba52f7e04e422becc2
7
+ data.tar.gz: f197ec3643d6bf1f96c619e85e59ba2782787ce9c601ece34748b56531c32071aefd96fcd0d6a91dc7fa915b14faca13673969e6fa610cb54c5c00e787cc8207
@@ -1,6 +1,7 @@
1
1
  import getKey from '../utils/getKey'
2
2
  import noop from '../utils/noop'
3
3
  import raf from '../utils/raf'
4
+ import isDef from '../utils/isDef'
4
5
  import supportDom from '../decorators/supportDom'
5
6
 
6
7
  @supportDom
@@ -12,6 +13,7 @@ export default class TagInput {
12
13
  this.validate = options.validate || (() => ({ isTag: true }))
13
14
  this.suggest = options.suggest || noop
14
15
  this.change = options.change || noop
16
+ this.inputId = options.inputId
15
17
  this.isComposing = false
16
18
  this.raf = raf
17
19
  this.id = 0
@@ -25,7 +27,7 @@ export default class TagInput {
25
27
  }
26
28
 
27
29
  setup() {
28
- const { defaultInputWidth } = this
30
+ const { defaultInputWidth, inputId } = this
29
31
  const inputDiv = document.createElement('div')
30
32
  inputDiv.className = 'tag-input-box'
31
33
 
@@ -35,6 +37,9 @@ export default class TagInput {
35
37
  suggestInput.className = 'tag-suggest-input'
36
38
 
37
39
  const input = document.createElement('input')
40
+ if (inputId) {
41
+ input.id = inputId
42
+ }
38
43
  input.type = 'text'
39
44
  input.style.width = defaultInputWidth + 'px'
40
45
  input.className = 'tag-main-input'
@@ -181,6 +186,10 @@ export default class TagInput {
181
186
  input.value = ''
182
187
  suggestInput.value = ''
183
188
 
189
+ if (isDef(res.text)) {
190
+ this.addTag(res, 'input')
191
+ return
192
+ }
184
193
  const row = Object.assign({}, res, { text: inputValue })
185
194
  this.addTag(row, 'input')
186
195
  }
@@ -270,7 +270,9 @@ $table-td-disabled-shadow: inset 0 -1px #c7c7c7;
270
270
 
271
271
  // form
272
272
  $control-bg: #fff;
273
+ $control-active-bg: #5469d4;
273
274
  $control-color: #495057;
275
+ $control-active-color: #fff;
274
276
  $control-disabled-bg: #e9ecef;
275
277
  $control-disabled-color: #111;
276
278
 
@@ -12,8 +12,8 @@
12
12
  color: hsla(0, 0%, 100%, .6);
13
13
  }
14
14
  &.active {
15
- background-color: #5469d4;
16
- color: #fff
15
+ background-color: $control-active-bg;
16
+ color: $control-active-color;
17
17
  }
18
18
  &.input.active {
19
19
  color: #fff
@@ -3,6 +3,10 @@
3
3
  .date-input,
4
4
  .time-input {
5
5
  background: $control-bg;
6
+ &.active {
7
+ background: $control-active-bg;
8
+ color: $control-active-color;
9
+ }
6
10
  }
7
11
  box-shadow: 0 0 0 1px rgba(42, 47, 69, .1),
8
12
  0 2px 5px 0 rgba(42, 47, 69, .1),
@@ -12,8 +12,8 @@
12
12
  color: hsla(0, 0%, 100%, .6);
13
13
  }
14
14
  &.active {
15
- background-color: #5469d4;
16
- color: #fff
15
+ background-color: $control-active-bg;
16
+ color: $control-active-color;
17
17
  }
18
18
  &.input.active {
19
19
  color: #fff
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng
8
8
  - Eddie Li
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-04 00:00:00.000000000 Z
12
+ date: 2022-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc
@@ -93,7 +93,7 @@ dependencies:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: 3.3.0
96
- description:
96
+ description:
97
97
  email: kmsh3ng@gmail.com
98
98
  executables: []
99
99
  extensions: []
@@ -278,7 +278,7 @@ homepage: https://superlanding.github.io/beyond/
278
278
  licenses:
279
279
  - MIT
280
280
  metadata: {}
281
- post_install_message:
281
+ post_install_message:
282
282
  rdoc_options: []
283
283
  require_paths:
284
284
  - lib
@@ -293,9 +293,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  - !ruby/object:Gem::Version
294
294
  version: '0'
295
295
  requirements: []
296
- rubyforge_project:
296
+ rubyforge_project:
297
297
  rubygems_version: 2.7.6.2
298
- signing_key:
298
+ signing_key:
299
299
  specification_version: 4
300
300
  summary: beyond is a collection of frontend components which aims for admin website.
301
301
  test_files: []