Skip to content

Commit

Permalink
2.0 - remove autocomplete. add @bindable small to text-widget, curren…
Browse files Browse the repository at this point in the history
…cy, checkbox.
  • Loading branch information
simonfox committed Apr 12, 2017
1 parent 056ddcd commit 9026de1
Show file tree
Hide file tree
Showing 56 changed files with 565 additions and 1,693 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A widget library for the Aurelia Javascript Framework. It is bootstrap-oriented

Widgets Available:

- Autocomplete
- Autocomplete [*NOTE* Removed in v2.0.0 now available at github.com/drivesoftware/aurelia-autocomplte]
- Checkbox
- Combo Box
- Currency Input
Expand All @@ -16,6 +16,9 @@ Widgets Available:
All the input widgets (except the Toggle Button) have a grab-focus attribute which, when set to true, will focus the main input of the widget.

### Autocomplete

*NOTE* Removed in v2.0.0 now available at github.com/drivesoftware/aurelia-autocomplte

Should have a `lookup` bound to an object that has a `search(inputText)` function. This will return a Promise that resolves to an object of the form:
```
{
Expand Down
5 changes: 0 additions & 5 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ System.config({
"bootstrap": "github:twbs/bootstrap@3.3.7",
"bootstrap-toggle": "npm:bootstrap-toggle@2.2.2",
"css": "github:systemjs/plugin-css@0.1.26",
"devbridge-autocomplete": "npm:devbridge-autocomplete@1.2.26",
"jquery": "npm:jquery@2.2.4",
"numeral": "npm:numeral@1.5.3",
"github:jspm/nodelibs-assert@0.1.0": {
Expand Down Expand Up @@ -101,10 +100,6 @@ System.config({
"isarray": "npm:isarray@1.0.0",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:devbridge-autocomplete@1.2.26": {
"jquery": "npm:jquery@2.2.4",
"process": "github:jspm/nodelibs-process@0.1.2"
},
"npm:inherits@2.0.1": {
"util": "github:jspm/nodelibs-util@0.1.0"
},
Expand Down
7 changes: 0 additions & 7 deletions dist/amd/autocomplete-widget.html

This file was deleted.

241 changes: 0 additions & 241 deletions dist/amd/autocomplete-widget.js

This file was deleted.

18 changes: 10 additions & 8 deletions dist/amd/checkbox.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<template>
<button class="btn btn-link checkbox noselect" click.delegate="checkboxSelected()" focus.bind="grabFocus" disabled.bind="!enabled">
<div class="checkbox-selector pull-left ${enabled ? 'checkbox-selector-enabled' : 'checkbox-disabled'}">
<i class="${iconFamilyClass} ${ checked ? checkedIconClass : '' }"></i>
</div>
<div class="checkbox-label ${enabled ? '' : 'text-muted'}">
<slot><span>${labelText}</span></slot>
</div>
</button>
<div class-name.bind="'form-group ' + (small ? 'form-group-sm' : '')">
<button click.delegate="checkboxSelected()" focus.bind="grabFocus" disabled.bind="!enabled" class="btn btn-link form-control checkbox noselect">
<div class="checkbox-selector ${enabled ? 'checkbox-selector-enabled' : 'checkbox-disabled'}">
<i class="${iconFamilyClass} ${ checked ? checkedIconClass : '' }"></i>
</div>
<div class-name.bind="'checkbox-label ' + (enabled ? '' : 'text-muted')">
<slot><span>${label}</span></slot>
</div>
</button>
</div>
</template>
32 changes: 21 additions & 11 deletions dist/amd/checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,38 @@ define(['exports', 'aurelia-templating', 'aurelia-binding'], function (exports,
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _class, _desc, _value, _class2, _descriptor;
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3;

var Checkbox = exports.Checkbox = (_dec = (0, _aureliaTemplating.bindable)({
name: 'labelText',
attribute: 'label-text',
defaultBindingMode: _aureliaBinding.bindingMode.oneTime
}), _dec2 = (0, _aureliaTemplating.bindable)({
name: 'enabled',
attribute: 'enabled',
defaultBindingMode: _aureliaBinding.bindingMode.oneWay
}), _dec3 = (0, _aureliaTemplating.bindable)({
}), _dec2 = (0, _aureliaTemplating.bindable)({
name: 'checked',
attribute: 'checked',
defaultBindingMode: _aureliaBinding.bindingMode.twoWay
}), _dec4 = (0, _aureliaTemplating.bindable)({
}), _dec3 = (0, _aureliaTemplating.bindable)({
name: 'grabFocus',
attribute: 'grab-focus',
defaultValue: false
}), _dec5 = (0, _aureliaTemplating.bindable)({
}), _dec4 = (0, _aureliaTemplating.bindable)({
name: 'iconFamilyClass',
attribute: 'icon-family-class',
defaultValue: 'fa'
}), _dec6 = (0, _aureliaTemplating.bindable)({
}), _dec5 = (0, _aureliaTemplating.bindable)({
name: 'checkedIconClass',
attribute: 'checked-icon-class',
defaultValue: 'fa-check'
}), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = _dec5(_class = _dec6(_class = (_class2 = function () {
}), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = _dec5(_class = (_class2 = function () {
function Checkbox() {
_classCallCheck(this, Checkbox);

_initDefineProp(this, 'ontoggle', _descriptor, this);

_initDefineProp(this, 'small', _descriptor2, this);

_initDefineProp(this, 'label', _descriptor3, this);

this.checked = false;
this.enabled = true;
}
Expand All @@ -104,5 +104,15 @@ define(['exports', 'aurelia-templating', 'aurelia-binding'], function (exports,
}(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'ontoggle', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: null
})), _class2)) || _class) || _class) || _class) || _class) || _class) || _class);
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'small', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return false;
}
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'label', [_aureliaTemplating.bindable], {
enumerable: true,
initializer: function initializer() {
return '';
}
})), _class2)) || _class) || _class) || _class) || _class) || _class);
});
Loading

0 comments on commit 9026de1

Please sign in to comment.