bootstrap-bookingsync-sass 1.0.5 → 2.0.0
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 +5 -5
- data/.editorconfig +0 -14
- data/.eslintignore +20 -0
- data/.eslintrc.js +105 -0
- data/.gitignore +15 -7
- data/.npmignore +30 -15
- data/.template-lintrc.js +5 -0
- data/.travis.yml +84 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +26 -0
- data/LICENSE.md +9 -0
- data/README.md +5 -6
- data/addon/components/bsy-alert.js +6 -8
- data/addon/components/bsy-annotated-section.js +4 -4
- data/addon/components/bsy-annotated-section/annotation.js +4 -4
- data/addon/components/bsy-annotated-section/content.js +4 -4
- data/addon/components/bsy-button.js +16 -21
- data/addon/components/bsy-button/close.js +7 -6
- data/addon/components/bsy-checkbox.js +12 -4
- data/addon/components/bsy-icon.js +33 -0
- data/addon/components/bsy-input-addon.js +10 -2
- data/addon/components/bsy-input-addon/addon.js +4 -4
- data/addon/components/bsy-input-addon/input.js +7 -4
- data/addon/components/bsy-input.js +25 -17
- data/addon/components/bsy-modal.js +5 -5
- data/addon/components/bsy-modal/body.js +4 -4
- data/addon/components/bsy-modal/close.js +3 -3
- data/addon/components/bsy-modal/footer.js +4 -4
- data/addon/components/bsy-modal/header.js +4 -4
- data/addon/components/bsy-nav.js +2 -2
- data/addon/components/bsy-nav/item.js +4 -13
- data/addon/components/bsy-nav/link.js +4 -13
- data/addon/components/bsy-popover.js +5 -0
- data/addon/components/bsy-radio-buttons.js +2 -2
- data/addon/components/bsy-radio-buttons/button.js +8 -10
- data/addon/components/bsy-radio.js +5 -5
- data/addon/components/bsy-select-multiple.js +4 -4
- data/addon/components/bsy-select.js +4 -4
- data/addon/components/bsy-sheet.js +2 -2
- data/addon/components/bsy-sheet/header.js +2 -2
- data/addon/components/bsy-switch.js +15 -0
- data/addon/components/bsy-textarea.js +7 -5
- data/addon/templates/components/bsy-alert.hbs +1 -1
- data/addon/templates/components/bsy-button.hbs +9 -1
- data/addon/templates/components/bsy-checkbox.hbs +4 -3
- data/addon/templates/components/bsy-input-addon/input.hbs +3 -3
- data/addon/templates/components/bsy-input.hbs +3 -3
- data/addon/templates/components/bsy-modal.hbs +2 -2
- data/addon/templates/components/bsy-modal/close.hbs +1 -1
- data/addon/templates/components/bsy-modal/header.hbs +1 -1
- data/addon/templates/components/bsy-nav/item.hbs +1 -1
- data/addon/templates/components/bsy-radio-buttons/button.hbs +5 -4
- data/addon/templates/components/bsy-radio.hbs +5 -4
- data/addon/templates/components/bsy-select-multiple.hbs +1 -1
- data/addon/templates/components/bsy-select.hbs +1 -1
- data/addon/templates/components/bsy-switch.hbs +9 -0
- data/addon/templates/components/bsy-textarea.hbs +2 -2
- data/app/components/bsy-alert.js +1 -1
- data/app/components/bsy-icon.js +1 -0
- data/app/components/bsy-popover.js +1 -0
- data/app/components/bsy-sheet.js +1 -1
- data/app/components/bsy-sheet/header.js +1 -1
- data/app/components/bsy-switch.js +1 -0
- data/assets/javascripts/bookingsync/form.js +15 -15
- data/assets/stylesheets/_bootstrap-bookingsync.scss +2 -0
- data/assets/stylesheets/bookingsync/_buttons.scss +6 -0
- data/assets/stylesheets/bookingsync/_ember-toggle.scss +13 -0
- data/assets/stylesheets/bookingsync/_ember-tooltips.scss +15 -0
- data/assets/stylesheets/bookingsync/_form.scss +20 -1
- data/assets/stylesheets/bookingsync/_icons.scss +521 -98
- data/assets/stylesheets/bookingsync/_menu.scss +25 -4
- data/assets/stylesheets/bookingsync/_variables.scss +100 -36
- data/blueprints/ember-cli-bootstrap-bookingsync-sass/index.js +5 -4
- data/config/ember-try.js +82 -35
- data/config/environment.js +13 -3
- data/docs/content/brand/iconography.md +30 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.svg +24 -1
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.ttf +0 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.woff +0 -0
- data/docs/public/ember/fonts/bookingsync/bookingsync-icons.woff2 +0 -0
- data/ember-cli-build.js +4 -5
- data/index.js +13 -39
- data/lib/bootstrap/bookingsync/engine.rb +4 -2
- data/lib/bootstrap/bookingsync/version.rb +1 -1
- data/package-lock.json +20985 -0
- data/package.json +64 -44
- data/testem.js +25 -0
- data/tests/dummy/app/app.js +2 -6
- data/tests/dummy/app/components/navbar/component.js +5 -0
- data/tests/dummy/app/{templates/navbar.hbs → components/navbar/template.hbs} +0 -0
- data/tests/dummy/app/components/sidebar/component.js +5 -0
- data/tests/dummy/app/{templates/sidebar.hbs → components/sidebar/template.hbs} +0 -0
- data/tests/dummy/app/controllers/index.js +24 -12
- data/tests/dummy/app/index.html +4 -4
- data/tests/dummy/app/router.js +4 -3
- data/tests/dummy/app/templates/application.hbs +3 -2
- data/tests/dummy/app/templates/index.hbs +106 -70
- data/tests/dummy/config/environment.js +12 -7
- data/tests/dummy/config/optional-features.json +3 -0
- data/tests/dummy/config/targets.js +18 -0
- data/tests/{unit → helpers}/.gitkeep +0 -0
- data/tests/index.html +8 -9
- data/tests/integration/components/bsy-alert-test.js +18 -16
- data/tests/integration/components/bsy-button-test.js +18 -16
- data/tests/integration/components/bsy-checkbox-test.js +77 -0
- data/tests/integration/components/bsy-input-test.js +120 -0
- data/tests/integration/components/bsy-nav-test.js +18 -16
- data/tests/integration/components/bsy-nav/item-test.js +18 -16
- data/tests/integration/components/bsy-nav/link-test.js +18 -16
- data/tests/integration/components/bsy-popover-test.js +28 -0
- data/tests/integration/components/bsy-sheet-test.js +18 -16
- data/tests/integration/components/bsy-sheet/header-test.js +18 -16
- data/tests/integration/components/bsy-switch-test.js +21 -0
- data/tests/integration/components/bsy-textarea-test.js +13 -0
- data/tests/test-helper.js +7 -5
- metadata +32 -19
- data/.bowerrc +0 -4
- data/.travis.yaml +0 -34
- data/bower.json +0 -14
- data/testem.json +0 -12
- data/tests/.jshintrc +0 -52
- data/tests/dummy/public/crossdomain.xml +0 -15
- data/tests/helpers/destroy-app.js +0 -5
- data/tests/helpers/module-for-acceptance.js +0 -23
- data/tests/helpers/start-app.js +0 -18
- data/tests/integration/components/bsy-sheet.header-test.js +0 -24
- data/yarn.lock +0 -5356
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../templates/components/bsy-annotated-section';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'section',
|
|
7
|
+
classNames: 'annotated-section'
|
|
8
8
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-annotated-section/annotation';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'header',
|
|
7
|
+
classNames: 'annotated-section-annotation'
|
|
8
8
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-annotated-section/content';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'annotated-section-content'
|
|
8
8
|
});
|
|
@@ -1,34 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import Component from '@ember/component';
|
|
2
|
+
import { computed } from '@ember/object';
|
|
3
|
+
import { bool } from '@ember/object/computed';
|
|
3
4
|
import layout from '../templates/components/bsy-button';
|
|
4
5
|
|
|
5
|
-
export default
|
|
6
|
+
export default Component.extend({
|
|
6
7
|
layout,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
tagName: 'button',
|
|
10
|
+
classNames: 'btn',
|
|
11
|
+
classNameBindings: ['typeClassName', 'loadingClassName'],
|
|
12
|
+
attributeBindings: ['disabled'],
|
|
10
13
|
isLoading: false,
|
|
11
|
-
loadingLabel:
|
|
14
|
+
loadingLabel: 'Loading...',
|
|
15
|
+
|
|
16
|
+
disabled: bool('isLoading'),
|
|
12
17
|
|
|
13
18
|
typeClassName: computed('type', function() {
|
|
14
|
-
|
|
15
|
-
return "btn-primary";
|
|
16
|
-
} else {
|
|
17
|
-
return "btn-" + this.get('type');
|
|
18
|
-
}
|
|
19
|
+
return this.type === 'submit' ? 'btn-primary' : `btn-${this.type}`;
|
|
19
20
|
}),
|
|
20
21
|
|
|
21
22
|
loadingClassName: computed('isLoading', function() {
|
|
22
|
-
|
|
23
|
-
return "btn-loading";
|
|
24
|
-
} else {
|
|
25
|
-
return "";
|
|
26
|
-
}
|
|
23
|
+
return this.isLoading ? 'btn-loading' : '';
|
|
27
24
|
}),
|
|
28
25
|
|
|
29
|
-
click
|
|
30
|
-
this.set(
|
|
31
|
-
this.$().prop('disabled', 'disabled');
|
|
32
|
-
this.$().text(this.get("loadingLabel"));
|
|
26
|
+
click() {
|
|
27
|
+
this.set('isLoading', true);
|
|
33
28
|
}
|
|
34
29
|
});
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-button/close';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName: "button",
|
|
7
|
-
classNames: "btn btn-secondary-inverse btn-round",
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
tagName: 'button',
|
|
8
|
+
classNames: 'btn btn-secondary-inverse btn-round',
|
|
9
|
+
|
|
10
|
+
click() {
|
|
11
|
+
this.element.disabled = true;
|
|
11
12
|
}
|
|
12
13
|
});
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../templates/components/bsy-checkbox';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const BsyCheckboxComponent = Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'checkbox',
|
|
8
|
+
|
|
9
|
+
update() {}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
BsyCheckboxComponent.reopenClass({
|
|
13
|
+
positionalParams: ['checked']
|
|
8
14
|
});
|
|
15
|
+
|
|
16
|
+
export default BsyCheckboxComponent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import Component from '@ember/component';
|
|
2
|
+
import { computed } from '@ember/object';
|
|
3
|
+
|
|
4
|
+
const BsyIconComponent = Component.extend({
|
|
5
|
+
tagName: 'i',
|
|
6
|
+
classNameBindings: ['iconClass', 'iconSize', 'iconType', 'fixedWidth:icon-fw'],
|
|
7
|
+
|
|
8
|
+
name: '',
|
|
9
|
+
size: '',
|
|
10
|
+
type: '',
|
|
11
|
+
fixedWidth: false,
|
|
12
|
+
|
|
13
|
+
iconClass: computed('name', function() {
|
|
14
|
+
let name = this.get('name');
|
|
15
|
+
return name ? `icon-${name}` : '';
|
|
16
|
+
}),
|
|
17
|
+
|
|
18
|
+
iconSize: computed('size', function() {
|
|
19
|
+
let size = this.get('size');
|
|
20
|
+
return size ? `icon-${size}` : '';
|
|
21
|
+
}),
|
|
22
|
+
|
|
23
|
+
iconType: computed('type', function() {
|
|
24
|
+
let type = this.get('type');
|
|
25
|
+
return type ? `icon-${type}` : '';
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
BsyIconComponent.reopenClass({
|
|
30
|
+
positionalParams: ['name']
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default BsyIconComponent;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import Ember from 'ember';
|
|
2
|
+
import Component from '@ember/component';
|
|
3
|
+
import { computed } from '@ember/object';
|
|
2
4
|
import layout from '../templates/components/bsy-input-addon';
|
|
3
5
|
|
|
4
|
-
|
|
6
|
+
const { generateGuid } = Ember;
|
|
7
|
+
|
|
8
|
+
export default Component.extend({
|
|
5
9
|
layout,
|
|
6
10
|
tagName: 'div',
|
|
7
|
-
classNames: 'form-group'
|
|
11
|
+
classNames: 'form-group',
|
|
12
|
+
|
|
13
|
+
inputId: computed(function() {
|
|
14
|
+
return generateGuid();
|
|
15
|
+
})
|
|
8
16
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-input-addon/addon';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'input-group-addon'
|
|
8
8
|
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-input-addon/input';
|
|
3
3
|
|
|
4
|
-
const BsyInputAddonInputComponent =
|
|
4
|
+
const BsyInputAddonInputComponent = Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNameBindings: ['value:filled'],
|
|
8
|
+
type: 'text',
|
|
9
|
+
|
|
10
|
+
update() {}
|
|
8
11
|
});
|
|
9
12
|
|
|
10
13
|
BsyInputAddonInputComponent.reopenClass({
|
|
@@ -1,30 +1,38 @@
|
|
|
1
1
|
import Ember from 'ember';
|
|
2
|
+
import Component from '@ember/component';
|
|
3
|
+
import { computed } from '@ember/object';
|
|
2
4
|
import layout from '../templates/components/bsy-input';
|
|
3
5
|
|
|
4
|
-
const {
|
|
6
|
+
const { generateGuid } = Ember;
|
|
5
7
|
|
|
6
8
|
const BsyInputComponent = Component.extend({
|
|
7
9
|
layout,
|
|
8
|
-
tagName:
|
|
9
|
-
classNames:
|
|
10
|
-
type:
|
|
11
|
-
|
|
10
|
+
tagName: 'div',
|
|
11
|
+
classNames: 'form-group',
|
|
12
|
+
type: 'text',
|
|
13
|
+
readonly: false,
|
|
14
|
+
placeholder: '',
|
|
15
|
+
disabled: false,
|
|
16
|
+
classNameBindings: ['value:filled', 'icon:has-icon', 'formGroupSize'],
|
|
12
17
|
size: null, // sm, lg
|
|
13
18
|
|
|
14
|
-
inputClassNames: computed('size', function
|
|
15
|
-
|
|
16
|
-
if (size) {
|
|
17
|
-
return `form-control input-${size}`;
|
|
18
|
-
}
|
|
19
|
-
return "form-control";
|
|
19
|
+
inputClassNames: computed('size', function() {
|
|
20
|
+
return this.size ? `form-control input-${this.size}` : 'form-control';
|
|
20
21
|
}),
|
|
21
22
|
|
|
22
|
-
iconSize: computed('size', function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
iconSize: computed('size', function() {
|
|
24
|
+
return this.size ? `icon--${this.size}` : '';
|
|
25
|
+
}),
|
|
26
|
+
|
|
27
|
+
formGroupSize: computed('size', function() {
|
|
28
|
+
return this.size ? `form-group--${this.size}` : '';
|
|
29
|
+
}),
|
|
30
|
+
|
|
31
|
+
inputId: computed(function() {
|
|
32
|
+
return generateGuid();
|
|
33
|
+
}),
|
|
34
|
+
|
|
35
|
+
update() {}
|
|
28
36
|
});
|
|
29
37
|
|
|
30
38
|
BsyInputComponent.reopenClass({
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../templates/components/bsy-modal';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
6
|
+
tagName: 'div',
|
|
7
7
|
|
|
8
8
|
didRender() {
|
|
9
9
|
this._super(...arguments);
|
|
10
|
-
|
|
10
|
+
document.body.classList.add('modal-open');
|
|
11
11
|
},
|
|
12
12
|
|
|
13
13
|
willDestroyElement() {
|
|
14
14
|
this._super(...arguments);
|
|
15
|
-
|
|
15
|
+
document.body.classList.remove('modal-open');
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-modal/body';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'modal-body'
|
|
8
8
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-modal/close';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
6
|
+
tagName: 'div'
|
|
7
7
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-modal/footer';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'modal-footer'
|
|
8
8
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../../templates/components/bsy-modal/header';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
|
-
tagName:
|
|
7
|
-
classNames:
|
|
6
|
+
tagName: 'div',
|
|
7
|
+
classNames: 'modal-header'
|
|
8
8
|
});
|
data/addon/components/bsy-nav.js
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
const { computed } = Ember;
|
|
1
|
+
import Component from '@ember/component';
|
|
3
2
|
import layout from '../../templates/components/bsy-nav/item';
|
|
4
3
|
|
|
5
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
6
5
|
layout,
|
|
7
6
|
tagName: 'li',
|
|
8
7
|
classNames: 'nav-item',
|
|
9
|
-
classNameBindings: [
|
|
10
|
-
active: false
|
|
11
|
-
|
|
12
|
-
activeClassName: computed('active', function() {
|
|
13
|
-
if (this.get('active') === true) {
|
|
14
|
-
return "active";
|
|
15
|
-
} else {
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
})
|
|
8
|
+
classNameBindings: ['active'],
|
|
9
|
+
active: false
|
|
19
10
|
});
|
|
@@ -1,19 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
const { computed } = Ember;
|
|
1
|
+
import Component from '@ember/component';
|
|
3
2
|
import layout from '../../templates/components/bsy-nav/link';
|
|
4
3
|
|
|
5
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
6
5
|
layout,
|
|
7
6
|
tagName: 'a',
|
|
8
7
|
classNames: 'nav-link',
|
|
9
|
-
classNameBindings: [
|
|
10
|
-
active: false
|
|
11
|
-
|
|
12
|
-
activeClassName: computed('active', function() {
|
|
13
|
-
if (this.get('active') === true) {
|
|
14
|
-
return "active";
|
|
15
|
-
} else {
|
|
16
|
-
return "";
|
|
17
|
-
}
|
|
18
|
-
})
|
|
8
|
+
classNameBindings: ['active'],
|
|
9
|
+
active: false
|
|
19
10
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Component from '@ember/component';
|
|
2
2
|
import layout from '../templates/components/bsy-radio-buttons';
|
|
3
3
|
|
|
4
|
-
export default
|
|
4
|
+
export default Component.extend({
|
|
5
5
|
layout,
|
|
6
6
|
tagName: 'div',
|
|
7
7
|
classNames: 'btn-group',
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import Component from '@ember/component';
|
|
2
|
+
import { computed } from '@ember/object';
|
|
3
3
|
import layout from '../../templates/components/bsy-radio-buttons/button';
|
|
4
4
|
|
|
5
|
-
const BsyRadioButtonsButtonComponent =
|
|
5
|
+
const BsyRadioButtonsButtonComponent = Component.extend({
|
|
6
6
|
layout,
|
|
7
7
|
tagName: 'label',
|
|
8
8
|
classNames: 'btn btn-secondary',
|
|
9
|
-
classNameBindings: ['
|
|
9
|
+
classNameBindings: ['active'],
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
})
|
|
11
|
+
active: computed('value', 'option', function() {
|
|
12
|
+
return this.value === this.option;
|
|
13
|
+
}).readOnly()
|
|
16
14
|
});
|
|
17
15
|
|
|
18
16
|
BsyRadioButtonsButtonComponent.reopenClass({
|
|
19
|
-
positionalParams: ['
|
|
17
|
+
positionalParams: ['value']
|
|
20
18
|
});
|
|
21
19
|
|
|
22
20
|
export default BsyRadioButtonsButtonComponent;
|