Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
fixed #74
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamed Fathi committed Oct 27, 2018
1 parent dccf709 commit 9bf9bf2
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 21 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -90,6 +90,7 @@
"devDependencies": {}
},
"dependencies": {
"aurelia-animator-css": "^1.0.4",
"aurelia-bootstrapper": "2.1.1",
"aurelia-dialog": "^2.0.0-rc.3",
"aurelia-event-aggregator": "1.0.1",
Expand Down
3 changes: 2 additions & 1 deletion sample/package.json
Expand Up @@ -34,6 +34,7 @@
"whatwg-fetch": "^2.0.3"
},
"dependencies": {
"aurelia-animator-css": "^1.0.4",
"aurelia-bootstrapper": "2.1.1",
"aurelia-dialog": "^2.0.0-rc.3",
"aurelia-event-aggregator": "1.0.1",
Expand Down Expand Up @@ -75,4 +76,4 @@
"written-number": "^0.8.1",
"zenscroll": "^4.0.0"
}
}
}
39 changes: 27 additions & 12 deletions sample/src/routes/jquery/float-label.html
Expand Up @@ -41,7 +41,9 @@ <h2>Float Labels
Sizing
</legend>
<input at-float-label type="text" class="form-control form-control-sm" placeholder="User Name">
<div style="margin-top: 7px"></div>
<input at-float-label type="text" class="form-control" placeholder="User Name">
<div style="margin-top: 7px"></div>
<input at-float-label type="text" class="form-control form-control-lg" placeholder="User Name">
<aut-mark-down src="./docs/components/jquery/float-label/sizing.md">
</aut-mark-down>
Expand All @@ -51,7 +53,9 @@ <h2>Float Labels
Color
</legend>
<input at-float-label="color.bind:'success'" type="text" class="form-control form-control-sm" placeholder="User Name">
<div style="margin-top: 7px"></div>
<input at-float-label="color.bind:'DeepPink'" type="text" class="form-control form-control-sm" placeholder="User Name">
<div style="margin-top: 7px"></div>
<input at-float-label="color.bind:'#3AE2CE'" type="text" class="form-control form-control-sm" placeholder="User Name">
<aut-mark-down src="./docs/components/jquery/float-label/color.md">
</aut-mark-down>
Expand Down Expand Up @@ -89,7 +93,9 @@ <h2>Float Labels
<li>You can choose your setting by <code>direction</code> property.</li>
</ul>
<input at-float-label style="text-align:right" type="text" class="form-control" placeholder="نام کاربری">
<div style="margin-top: 7px"></div>
<input at-float-label style="direction:rtl" type="text" class="form-control" placeholder="نام کاربری">
<div style="margin-top: 7px"></div>
<input at-float-label="direction.bind:'rtl';text.bind:'نام کاربری'" type="text" class="form-control" placeholder="User Name">
<aut-mark-down src="./docs/components/jquery/float-label/rtl.md">
</aut-mark-down>
Expand All @@ -108,7 +114,7 @@ <h2>Float Labels
</td>
<td class="text-nowrap" colspan="1">
<b>
containerless
custom attribute
</b>
</td>
</tr>
Expand All @@ -131,63 +137,72 @@ <h2>Float Labels
<tr>
<td class="text-nowrap" scope="row">class</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>Set custom classes to the <code>label</code> component</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">style</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>Set custom styles to the <code>label</code> component</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">padding-top</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>Set custom padding-top to the <code>label</code> component</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">right</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>The right property sets or returns the right position of a positioned element.</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">left</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>The left property sets or returns the left position of a positioned element.</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">color</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap">black</td>
<td>You can set any kind of colors to the <code>label</code> component</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">font-size</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap"></td>
<td>Set <code>font-size</code> to the <code>label</code> component</td>
</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">direction</td>
<td class="text-nowrap" scope="row">text</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneWay</td>
<td class="text-nowrap"></td>
<td>Set <code>text</code> to the <code>label</code> component. this is <code>primary</code> property.</td>
</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">direction</td>
<td class="text-nowrap">string</td>
<td class="text-nowrap">oneTime</td>
<td class="text-nowrap">auto</td>
<td>Set the <code>direction</code> to the <code>label</code> component. The default value is <code>auto</code>
and the component decides based on <code>text align</code> and <code>html direction</code>. You can set it
to <code>ltr</code> and <code>rtl</code> too.
and the component decides based on <code>text align</code> and <code>html direction</code>. You can set
it
to <code>ltr</code> and <code>rtl</code> too.
</td>
</tr>
</tr>
</tbody>
</table>
</fieldset>
Expand Down
9 changes: 9 additions & 0 deletions sample/yarn.lock
Expand Up @@ -273,6 +273,15 @@ atob@^2.1.1:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

aurelia-animator-css@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/aurelia-animator-css/-/aurelia-animator-css-1.0.4.tgz#8336ab84f9a8bf60a4536e99145e73a80c0f0dac"
integrity sha1-gzarhPmov2CkU26ZFF5zqAwPDaw=
dependencies:
aurelia-metadata "^1.0.0"
aurelia-pal "^1.0.0"
aurelia-templating "^1.0.0"

aurelia-binding@^2.0.0, aurelia-binding@^2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/aurelia-binding/-/aurelia-binding-2.1.5.tgz#69ac582be0d6835e69cdbc062a73eb72755d164b"
Expand Down
16 changes: 8 additions & 8 deletions src/custom-attributes/jquery/float-label/at-float-label.ts
Expand Up @@ -15,23 +15,23 @@ import 'aureliatoolbelt-thirdparty/jquery.float-label/jquery.float-label.css';
@customAttribute('at-float-label')
@inject(Element)
export class AureliaToolbeltFloatLabel {
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public class: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public style: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public direction: FloatInputDirection = 'auto';
@bindable({ defaultBindingMode: bindingMode.oneWay, primaryProperty: true })
public text: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public right: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public left: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public paddingTop: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public color: string = '';
@bindable({ defaultBindingMode: bindingMode.oneWay })
@bindable({ defaultBindingMode: bindingMode.oneTime })
public fontSize: string = '';

private label: HTMLLabelElement;
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Expand Up @@ -478,6 +478,15 @@ atob@^2.1.1:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

aurelia-animator-css@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/aurelia-animator-css/-/aurelia-animator-css-1.0.4.tgz#8336ab84f9a8bf60a4536e99145e73a80c0f0dac"
integrity sha1-gzarhPmov2CkU26ZFF5zqAwPDaw=
dependencies:
aurelia-metadata "^1.0.0"
aurelia-pal "^1.0.0"
aurelia-templating "^1.0.0"

aurelia-binding@^2.0.0, aurelia-binding@^2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/aurelia-binding/-/aurelia-binding-2.1.5.tgz#69ac582be0d6835e69cdbc062a73eb72755d164b"
Expand Down

0 comments on commit 9bf9bf2

Please sign in to comment.