beyond-rails 0.0.198 → 0.0.203

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: d81d5fde8a2f2cc5d3f71a0421fe362d0b1e1b637487fad895d8dd7eaae101ef
4
- data.tar.gz: 33db70f6b7e9f6bcc4ef755a55dc4c2bd18d1bd2fe8ced3575ffdf0cd63cca1b
3
+ metadata.gz: 1557e4122feedf316b6b9d3963f9467f834283229005e62f955cd4bb2b12d339
4
+ data.tar.gz: c67ea2ae6c26b37bbb97f5acf4286241c3267d7e03331edee4459f23684a8531
5
5
  SHA512:
6
- metadata.gz: fc37bcf05ef5472fb2fdaf49fd098d8dcfb101d310abe16f891252457325ade7eb1a86b467d2a627068742a918296bdd0dd784be21c8d99fe07ab5e223ffe530
7
- data.tar.gz: 0beca937c9dff930a4da40be3ef91c298f15152a94ca0fa52a195d66c5f2c100c6f56a33987d1d4b6311abfecfdf6ded1e44bbb07b14677870009870ce889fe4
6
+ metadata.gz: da39afee87b75d9a43d8c1ad4c52ea7a16310354a93f7e90f02faad92fce0665cc8777d8f98da3d9166bb5e763cb21a3b4e70626acde486c4645cdfa1fd8b252
7
+ data.tar.gz: 73fc6222597d8ea5e21b5932199a28695c6c387bfd06ee629ee59caee39ec2e768d057154bbb35084cdbf62fd6009d105222d9d288929f2815ba70b2b65c9f36
@@ -34,8 +34,17 @@ export default class Dropdown {
34
34
  }
35
35
 
36
36
  init() {
37
+
38
+ if (! this.dom) {
39
+ throw new Error('dom is missing in Dropdown class')
40
+ }
41
+
37
42
  this.id = this.dom.dataset.target
38
43
  this.menu = document.querySelector(`[data-dropdown-menu="${this.id}"]`)
44
+
45
+ if (! this.menu) {
46
+ throw new Error(`menu ${this.id} is missing in Dropdown class`)
47
+ }
39
48
  this.place = this.menu.dataset.place || 'bottom'
40
49
  this.align = this.menu.dataset.align
41
50
  this.menu.remove()
@@ -6,6 +6,10 @@ export default function supportDom(target) {
6
6
  return class extends target {
7
7
 
8
8
  init() {
9
+ if (this.beyondBound) {
10
+ return
11
+ }
12
+ this.markBound()
9
13
  this._listeners = []
10
14
  this._externalListeners = []
11
15
  if (isFunction(super.init)) {
@@ -14,6 +18,25 @@ export default function supportDom(target) {
14
18
  createdComponents.push(this)
15
19
  }
16
20
 
21
+ get beyondBound() {
22
+ const { dom } = this
23
+ return dom && (dom.dataset.beyondBound === 'true')
24
+ }
25
+
26
+ markBound() {
27
+ const { dom } = this
28
+ if (dom) {
29
+ dom.dataset.beyondBound = true
30
+ }
31
+ }
32
+
33
+ markUnbind() {
34
+ const { dom } = this
35
+ if (dom) {
36
+ delete dom.dataset.beyondBound
37
+ }
38
+ }
39
+
17
40
  on(name, func) {
18
41
  this._externalListeners.push({ name, func })
19
42
  }
@@ -38,6 +61,7 @@ export default function supportDom(target) {
38
61
  destroy() {
39
62
  this._externalListeners.length = 0
40
63
  this.removeEvents()
64
+ this.markUnbind()
41
65
  if (isFunction(super.destroy)) {
42
66
  super.destroy()
43
67
  }
@@ -122,13 +122,13 @@ $color-active: #5469d4;
122
122
  }
123
123
 
124
124
  .align-left {
125
- text-align: left;
125
+ text-align: left !important;
126
126
  }
127
127
  .align-right {
128
- text-align: right;
128
+ text-align: right !important;
129
129
  }
130
130
  .align-center {
131
- text-align: center;
131
+ text-align: center !important;
132
132
  }
133
133
 
134
134
  .sr-only {
@@ -67,7 +67,7 @@
67
67
  cursor: not-allowed;
68
68
  }
69
69
  .icon {
70
- margin-right: .7em;
70
+ margin-right: .4em;
71
71
  }
72
72
  }
73
73
  .btn-loader {
@@ -113,6 +113,9 @@
113
113
  &:focus {
114
114
  @include focus-outline;
115
115
  }
116
+ &.active {
117
+ background-color: #f3f3f7;
118
+ }
116
119
  }
117
120
 
118
121
  .btn .badge {
@@ -220,7 +220,7 @@ label {
220
220
  font-size: 80%;
221
221
  margin-top: .35rem;
222
222
  &:before {
223
- font-family: 'icomoon';
223
+ font-family: $beyond-icon-font-name;
224
224
  display: inline-block;
225
225
  }
226
226
  }
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.198
4
+ version: 0.0.203
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-09-18 00:00:00.000000000 Z
12
+ date: 2020-09-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc