This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
/
float-label.html
209 lines (207 loc) · 8.31 KB
/
float-label.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<template>
<fieldset class="mb-5">
<legend>
<h2>Float Labels
<a href="https://github.com/shahabganji/aurelia-toolbelt/tree/master/src/components/jquery/float-label">
<i class="fa fa-link"></i>
</a>
</h2>
</p>
</legend>
<fieldset class="mt-5">
<legend>
Usage
</legend>
<aut-mark-down src="./docs/components/jquery/float-label/usage.md">
</aut-mark-down>
</fieldset>
<fieldset class="mt-5">
<legend>
Basic example
</legend>
<p>This <code>custom attribute</code> just works on <code>input</code> controls.</p>
<p>First, it checks and uses value of <code>place holder</code></p>
<input at-float-label type="text" class="form-control" placeholder="User Name">
<aut-mark-down src="./docs/components/jquery/float-label/basic-example.md">
</aut-mark-down>
</fieldset>
<fieldset class="mt-5">
<legend>
Without placeholder
</legend>
<p>If the value of <code>place holder</code> is not found, It checks value of itself.</p>
<input at-float-label="User Name" type="text" class="form-control">
<aut-mark-down src="./docs/components/jquery/float-label/placeholder.md">
</aut-mark-down>
</fieldset>
<fieldset class="mt-5">
<legend>
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>
</fieldset>
<fieldset class="mt-5">
<legend>
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>
</fieldset>
<fieldset class="mt-5">
<legend>
Styling
</legend>
<input at-float-label="left.bind:'10px';padding-top.bind:'30px';font-size.bind:'16px'" type="text" class="form-control form-control-sm"
placeholder="User Name">
<aut-mark-down src="./docs/components/jquery/float-label/styling.md">
</aut-mark-down>
</fieldset>
<fieldset class="mt-5">
<legend>
Input Group
</legend>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">@</span>
</div>
<input at-float-label type="text" class="form-control" placeholder="User Name">
</div>
<aut-mark-down src="./docs/components/jquery/float-label/input-group.md">
</aut-mark-down>
</fieldset>
<fieldset class="mt-5">
<legend>
RTL
</legend>
<p>It supports <code>RTL</code> in three ways.</p>
<ul>
<li>It checks <code>text-align</code> and decides based on it.</li>
<li>It checks <code>direction</code> and decides based on it.</li>
<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>
</fieldset>
<fieldset class="mt-5">
<legend>
API Reference
</legend>
<table class="table table-striped table-bordered">
<thead class="thead-dark">
<tr>
<td class="text-nowrap" colspan="4">
<b>
at-float-label
</b>
</td>
<td class="text-nowrap" colspan="1">
<b>
custom attribute
</b>
</td>
</tr>
<tr>
<th class="text-nowrap" scope="col">Name</th>
<th class="text-nowrap" scope="col">Type</th>
<th class="text-nowrap" scope="col">Binding type</th>
<th class="text-nowrap" scope="col">Default value</th>
<th class="text-nowrap" scope="col">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-nowrap" colspan="5">
<b>
Properties
</b>
</td>
</tr>
<tr>
<td class="text-nowrap" scope="row">class</td>
<td class="text-nowrap">string</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">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">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">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">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">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">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">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.
</td>
</tr>
</tbody>
</table>
</fieldset>
</template>