wally-ui 1.3.0 → 1.4.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.
- package/package.json +1 -1
- package/playground/showcase/src/app/components/breadcrumb/breadcrumb.ts +1 -0
- package/playground/showcase/src/app/components/input/input.html +64 -21
- package/playground/showcase/src/app/components/input/input.ts +43 -23
- package/playground/showcase/src/app/pages/documentation/components/components.html +10 -0
- package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.examples.ts +11 -1
- package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.html +85 -43
- package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.ts +11 -1
- package/playground/showcase/src/index.html +4 -1
- package/playground/showcase/src/app/components/input/input.css +0 -0
package/package.json
CHANGED
|
@@ -1,27 +1,70 @@
|
|
|
1
|
+
@if (label()) {
|
|
2
|
+
<div class="py-1">
|
|
3
|
+
<label [for]="inputId" class="block text-sm font-medium text-[#0a0a0a] dark:text-white">
|
|
4
|
+
{{ label() }}
|
|
5
|
+
</label>
|
|
6
|
+
</div>
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
<div class="relative">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-->
|
|
5
|
-
<input [type]="type()" [value]="value()" [disabled]="disabled" [placeholder]="placeholder()" class="
|
|
10
|
+
<input [id]="inputId" [type]="currentInputType()" [value]="value()" [disabled]="disabled || loading()"
|
|
11
|
+
[placeholder]="placeholder()" [autocomplete]="autocomplete() || (type() === 'password' ? 'new-password' : '')" class="
|
|
6
12
|
font-semibold
|
|
7
|
-
block
|
|
13
|
+
block
|
|
8
14
|
w-full
|
|
9
|
-
bg-gray-100
|
|
10
15
|
rounded-lg
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
border-2 border-transparent
|
|
17
|
+
text-[#0a0a0a] text-base md:text-sm placeholder:text-neutral-400
|
|
18
|
+
focus:outline-none focus:ring-2 focus:ring-neutral-300
|
|
19
|
+
bg-gray-100
|
|
20
|
+
dark:bg-[#1b1b1b] dark:text-white dark:placeholder:text-neutral-500 dark:focus:ring-neutral-700
|
|
21
|
+
disabled:opacity-80 disabled:pointer-events-none
|
|
22
|
+
transition duration-200 ease-in-out
|
|
23
|
+
py-4 px-4" [ngClass]="{
|
|
24
|
+
'pe-12': type() === 'password',
|
|
25
|
+
'ps-12': loading(),
|
|
26
|
+
'!bg-green-100 focus:!ring-green-500/50 placeholder:!text-green-600/70 !text-green-600 focus:!border-green-500 dark:!bg-[#1b1b1b] dark:!border-green-600 dark:!text-green-500 dark:placeholder:!text-green-400/40 dark:focus:!ring-green-500/50': valid() && !errorMessage(),
|
|
27
|
+
'!border-red-300 bg-red-100 !text-red-500 placeholder:text-red-300 focus:ring-red-300 dark:!text-red-500 dark:placeholder:!text-red-500 dark:!border-red-500 dark:focus:!ring-red-500': errorMessage() && !valid()
|
|
28
|
+
}">
|
|
17
29
|
|
|
18
|
-
<!--
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
<!-- Loading spinner -->
|
|
31
|
+
@if (loading()) {
|
|
32
|
+
<div class="absolute inset-y-0 start-0 flex items-center ps-4">
|
|
33
|
+
<svg class="size-4 animate-spin text-neutral-500 dark:text-neutral-400" xmlns="http://www.w3.org/2000/svg"
|
|
34
|
+
fill="none" viewBox="0 0 24 24">
|
|
35
|
+
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
36
|
+
<path class="opacity-75" fill="currentColor"
|
|
37
|
+
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
|
|
38
|
+
</path>
|
|
25
39
|
</svg>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
40
|
+
</div>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@if (type() === 'password' && !loading()) {
|
|
44
|
+
<button type="button" (click)="togglePasswordVisibility()"
|
|
45
|
+
class="absolute inset-y-0 end-0 flex items-center pe-4 cursor-pointer focus:outline-none transition duration-200 ease-in-out">
|
|
46
|
+
@if (showPassword()) {
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
|
|
48
|
+
class="size-5 text-neutral-500 hover:text-neutral-700 dark:text-neutral-500 dark:hover:text-neutral-200">
|
|
49
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
50
|
+
d="M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" />
|
|
51
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
52
|
+
</svg>
|
|
53
|
+
} @else {
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
|
|
55
|
+
class="size-5 text-neutral-500 hover:text-neutral-700 dark:text-neutral-500 dark:hover:text-neutral-200">
|
|
56
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
57
|
+
d="M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88" />
|
|
58
|
+
</svg>
|
|
59
|
+
}
|
|
60
|
+
</button>
|
|
61
|
+
}
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
@if (errorMessage()) {
|
|
65
|
+
<div class="py-1">
|
|
66
|
+
<span class="text-sm text-red-500 font-medium">
|
|
67
|
+
{{ errorMessage() }}
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
Component, computed, HostListener, input, InputSignal, signal, untracked, WritableSignal
|
|
4
|
+
} from '@angular/core';
|
|
2
5
|
|
|
3
6
|
import {
|
|
4
7
|
ControlValueAccessor,
|
|
@@ -7,9 +10,11 @@ import {
|
|
|
7
10
|
|
|
8
11
|
@Component({
|
|
9
12
|
selector: 'wally-input',
|
|
10
|
-
imports: [
|
|
13
|
+
imports: [
|
|
14
|
+
CommonModule
|
|
15
|
+
],
|
|
16
|
+
// standalone: true, (If your application is lower than Angular 19, uncomment this line)
|
|
11
17
|
templateUrl: './input.html',
|
|
12
|
-
styleUrl: './input.css',
|
|
13
18
|
providers: [
|
|
14
19
|
{
|
|
15
20
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -19,31 +24,44 @@ import {
|
|
|
19
24
|
]
|
|
20
25
|
})
|
|
21
26
|
export class Input implements ControlValueAccessor {
|
|
22
|
-
type: WritableSignal<string> = signal<string>('text');
|
|
23
|
-
// disabled: WritableSignal<boolean> = signal<boolean>(false);
|
|
24
|
-
disabled = false;
|
|
25
|
-
loading: WritableSignal<boolean> = signal<boolean>(false);
|
|
26
|
-
|
|
27
27
|
placeholder: InputSignal<string> = input<string>('');
|
|
28
|
+
type: InputSignal<string> = input<string>('text');
|
|
29
|
+
label: InputSignal<string> = input<string>('');
|
|
30
|
+
autocomplete: InputSignal<string> = input<string>('');
|
|
31
|
+
|
|
32
|
+
valid: InputSignal<boolean> = input<boolean>(false);
|
|
33
|
+
errorMessage: InputSignal<string> = input<string>('');
|
|
34
|
+
loading: InputSignal<boolean> = input<boolean>(false);
|
|
35
|
+
|
|
36
|
+
protected readonly showPassword = signal<boolean>(false);
|
|
37
|
+
protected readonly inputId = `wally-input-${Math.random().toString(36).substring(2, 11)}`;
|
|
38
|
+
|
|
39
|
+
private touched: WritableSignal<boolean> = signal<boolean>(false);
|
|
40
|
+
value: WritableSignal<string> = signal<string>('');
|
|
41
|
+
|
|
42
|
+
protected readonly currentInputType = computed(() => {
|
|
43
|
+
const currentType = this.type();
|
|
44
|
+
|
|
45
|
+
if (currentType !== 'password') {
|
|
46
|
+
return currentType;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (this.showPassword()) {
|
|
50
|
+
return 'text';
|
|
51
|
+
}
|
|
28
52
|
|
|
29
|
-
|
|
53
|
+
return 'password';
|
|
54
|
+
});
|
|
30
55
|
|
|
31
|
-
|
|
56
|
+
disabled: boolean = false;
|
|
32
57
|
|
|
33
58
|
private onChange = (value: any) => { };
|
|
34
59
|
private onTouched = () => { };
|
|
35
60
|
|
|
36
|
-
constructor() {
|
|
37
|
-
effect(() => {
|
|
38
|
-
const currentValue = this.value();
|
|
39
|
-
this.onChange(currentValue)
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
61
|
writeValue(obj: any): void {
|
|
44
62
|
untracked(() => {
|
|
45
63
|
this.value.set(obj || '');
|
|
46
|
-
})
|
|
64
|
+
});
|
|
47
65
|
}
|
|
48
66
|
|
|
49
67
|
registerOnChange(fn: any): void {
|
|
@@ -58,10 +76,16 @@ export class Input implements ControlValueAccessor {
|
|
|
58
76
|
this.disabled = isDisabled;
|
|
59
77
|
}
|
|
60
78
|
|
|
79
|
+
togglePasswordVisibility(): void {
|
|
80
|
+
this.showPassword.set(!this.showPassword());
|
|
81
|
+
}
|
|
82
|
+
|
|
61
83
|
@HostListener('input', ['$event'])
|
|
62
84
|
onInputChange(event: Event): void {
|
|
63
85
|
const target = event.target as HTMLInputElement;
|
|
64
|
-
|
|
86
|
+
const newValue = target.value;
|
|
87
|
+
this.value.set(newValue);
|
|
88
|
+
this.onChange(newValue);
|
|
65
89
|
}
|
|
66
90
|
|
|
67
91
|
@HostListener('blur')
|
|
@@ -71,8 +95,4 @@ export class Input implements ControlValueAccessor {
|
|
|
71
95
|
this.onTouched();
|
|
72
96
|
}
|
|
73
97
|
}
|
|
74
|
-
|
|
75
|
-
onInputFocus(): void {
|
|
76
|
-
|
|
77
|
-
}
|
|
78
98
|
}
|
|
@@ -59,5 +59,15 @@
|
|
|
59
59
|
View Documentation
|
|
60
60
|
</a>
|
|
61
61
|
</div>
|
|
62
|
+
|
|
63
|
+
<div class="w-auto h-auto">
|
|
64
|
+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4944285767597175"
|
|
65
|
+
crossorigin="anonymous"></script>
|
|
66
|
+
<ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-gw-3+1f-3d+2z"
|
|
67
|
+
data-ad-client="ca-pub-4944285767597175" data-ad-slot="4427496130"></ins>
|
|
68
|
+
<script>
|
|
69
|
+
(adsbygoogle = window.adsbygoogle || []).push({});
|
|
70
|
+
</script>
|
|
71
|
+
</div>
|
|
62
72
|
</div>
|
|
63
73
|
</div>
|
package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.examples.ts
CHANGED
|
@@ -71,8 +71,18 @@ onSubmit() {
|
|
|
71
71
|
username: ['', [Validators.required, Validators.minLength(3)]]
|
|
72
72
|
});`,
|
|
73
73
|
|
|
74
|
+
// New Features Examples
|
|
75
|
+
withLabel: `<wally-input label="Full Name" placeholder="Enter your name"></wally-input>`,
|
|
76
|
+
loadingState: `<wally-input [loading]="true" placeholder="Loading..."></wally-input>`,
|
|
77
|
+
validState: `<wally-input [valid]="true" placeholder="Valid input"></wally-input>`,
|
|
78
|
+
errorState: `<wally-input errorMessage="This field is required" placeholder="Enter value"></wally-input>`,
|
|
79
|
+
passwordWithToggle: `<wally-input type="password" label="Password" placeholder="Enter secure password"></wally-input>`,
|
|
80
|
+
|
|
74
81
|
// Properties
|
|
82
|
+
propertyLabel: `label: string = '';`,
|
|
75
83
|
propertyType: `type: string = 'text';`,
|
|
76
84
|
propertyPlaceholder: `placeholder: string = '';`,
|
|
77
|
-
|
|
85
|
+
propertyLoading: `loading: boolean = false;`,
|
|
86
|
+
propertyValid: `valid: boolean = false;`,
|
|
87
|
+
propertyError: `errorMessage: string = '';`
|
|
78
88
|
};
|
package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
Input
|
|
9
9
|
</h1>
|
|
10
10
|
<p class="text-gray-700 dark:text-gray-400 mb-4">
|
|
11
|
-
A
|
|
11
|
+
A fully-featured input component with label support, loading states, validation styling, and complete FormGroup integration.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<!-- Under Construction Badge -->
|
|
@@ -62,10 +62,13 @@
|
|
|
62
62
|
<section class="mb-8">
|
|
63
63
|
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Preview</h2>
|
|
64
64
|
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
65
|
-
<
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
<form>
|
|
66
|
+
<div class="flex flex-col gap-4 w-full">
|
|
67
|
+
<wally-input label="Full Name" placeholder="Enter your name"></wally-input>
|
|
68
|
+
<wally-input label="Email Address" type="email" placeholder="Enter your email"></wally-input>
|
|
69
|
+
<wally-input label="Password" type="password" placeholder="Enter password"></wally-input>
|
|
70
|
+
</div>
|
|
71
|
+
</form>
|
|
69
72
|
</div>
|
|
70
73
|
</section>
|
|
71
74
|
|
|
@@ -156,30 +159,68 @@
|
|
|
156
159
|
</div>
|
|
157
160
|
</section>
|
|
158
161
|
|
|
159
|
-
<!-- Input
|
|
162
|
+
<!-- Input Features -->
|
|
160
163
|
<section class="mb-8">
|
|
161
|
-
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Input
|
|
164
|
+
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Input Features</h2>
|
|
162
165
|
|
|
163
166
|
<div class="space-y-8">
|
|
164
|
-
<!--
|
|
167
|
+
<!-- Labels -->
|
|
168
|
+
<div>
|
|
169
|
+
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">With Labels</h3>
|
|
170
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
|
|
171
|
+
<pre><code [innerHTML]="labelCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
174
|
+
<div class="flex flex-col gap-4">
|
|
175
|
+
<wally-input label="Full Name" placeholder="Enter your name"></wally-input>
|
|
176
|
+
<wally-input label="Email Address" type="email" placeholder="Enter your email"></wally-input>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<!-- Loading State -->
|
|
165
182
|
<div>
|
|
166
|
-
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">
|
|
183
|
+
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Loading State</h3>
|
|
167
184
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
|
|
168
|
-
<pre><code [innerHTML]="
|
|
185
|
+
<pre><code [innerHTML]="loadingCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
169
186
|
</div>
|
|
170
187
|
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
171
|
-
<wally-input
|
|
188
|
+
<wally-input label="Processing..." [loading]="true" placeholder="Loading example"></wally-input>
|
|
172
189
|
</div>
|
|
173
190
|
</div>
|
|
174
191
|
|
|
175
|
-
<!--
|
|
192
|
+
<!-- Valid State -->
|
|
176
193
|
<div>
|
|
177
|
-
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">
|
|
194
|
+
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Valid State</h3>
|
|
178
195
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
|
|
179
|
-
<pre><code [innerHTML]="
|
|
196
|
+
<pre><code [innerHTML]="validCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
180
197
|
</div>
|
|
181
198
|
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
182
|
-
<wally-input
|
|
199
|
+
<wally-input label="Username" [valid]="true" placeholder="Valid input example"></wally-input>
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<!-- Error State -->
|
|
204
|
+
<div>
|
|
205
|
+
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Error State</h3>
|
|
206
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
|
|
207
|
+
<pre><code [innerHTML]="errorCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
210
|
+
<wally-input label="Email" errorMessage="Please enter a valid email address" placeholder="Enter email"></wally-input>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<!-- Password with Toggle -->
|
|
215
|
+
<div>
|
|
216
|
+
<h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Password with Toggle</h3>
|
|
217
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
|
|
218
|
+
<pre><code [innerHTML]="passwordCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
219
|
+
</div>
|
|
220
|
+
<div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
|
|
221
|
+
<form>
|
|
222
|
+
<wally-input label="Password" type="password" placeholder="Enter secure password"></wally-input>
|
|
223
|
+
</form>
|
|
183
224
|
</div>
|
|
184
225
|
</div>
|
|
185
226
|
</div>
|
|
@@ -241,6 +282,13 @@
|
|
|
241
282
|
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Properties</h2>
|
|
242
283
|
|
|
243
284
|
<div class="space-y-4">
|
|
285
|
+
<div class="space-y-2">
|
|
286
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
287
|
+
<pre><code [innerHTML]="propertyLabelCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
288
|
+
</div>
|
|
289
|
+
<p class="text-sm text-gray-700 dark:text-gray-400">Optional label text displayed above the input</p>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
244
292
|
<div class="space-y-2">
|
|
245
293
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
246
294
|
<pre><code [innerHTML]="propertyTypeCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
@@ -257,55 +305,49 @@
|
|
|
257
305
|
|
|
258
306
|
<div class="space-y-2">
|
|
259
307
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
260
|
-
<pre><code [innerHTML]="
|
|
308
|
+
<pre><code [innerHTML]="propertyLoadingCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
309
|
+
</div>
|
|
310
|
+
<p class="text-sm text-gray-700 dark:text-gray-400">Shows loading spinner and disables input when true</p>
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<div class="space-y-2">
|
|
314
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
315
|
+
<pre><code [innerHTML]="propertyValidCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
261
316
|
</div>
|
|
262
|
-
<p class="text-sm text-gray-700 dark:text-gray-400">
|
|
317
|
+
<p class="text-sm text-gray-700 dark:text-gray-400">Shows green styling when input is valid</p>
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
<div class="space-y-2">
|
|
321
|
+
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
322
|
+
<pre><code [innerHTML]="propertyErrorCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
323
|
+
</div>
|
|
324
|
+
<p class="text-sm text-gray-700 dark:text-gray-400">Error message text - shows red styling and displays error below input</p>
|
|
263
325
|
</div>
|
|
264
326
|
</div>
|
|
265
327
|
</section>
|
|
266
328
|
|
|
267
|
-
<!--
|
|
329
|
+
<!-- Future Features -->
|
|
268
330
|
<section class="mb-8">
|
|
269
|
-
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">
|
|
331
|
+
<h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Future Features</h2>
|
|
270
332
|
|
|
271
333
|
<div class="space-y-4">
|
|
272
334
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
273
335
|
<div class="flex items-center gap-2 mb-2">
|
|
274
336
|
<h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Input Icons</h3>
|
|
275
|
-
<span class="text-xs bg-
|
|
337
|
+
<span class="text-xs bg-blue-500 text-white px-2 py-1 rounded">Coming Soon</span>
|
|
276
338
|
</div>
|
|
277
339
|
<p class="text-sm text-gray-700 dark:text-gray-400">
|
|
278
|
-
Support for left and right
|
|
340
|
+
Support for custom icons on the left and right sides of the input.
|
|
279
341
|
</p>
|
|
280
342
|
</div>
|
|
281
343
|
|
|
282
344
|
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
283
345
|
<div class="flex items-center gap-2 mb-2">
|
|
284
346
|
<h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Input Sizes</h3>
|
|
285
|
-
<span class="text-xs bg-
|
|
286
|
-
</div>
|
|
287
|
-
<p class="text-sm text-gray-700 dark:text-gray-400">
|
|
288
|
-
Different input sizes: small, medium, large for various use cases.
|
|
289
|
-
</p>
|
|
290
|
-
</div>
|
|
291
|
-
|
|
292
|
-
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
293
|
-
<div class="flex items-center gap-2 mb-2">
|
|
294
|
-
<h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Loading States</h3>
|
|
295
|
-
<span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
|
|
296
|
-
</div>
|
|
297
|
-
<p class="text-sm text-gray-700 dark:text-gray-400">
|
|
298
|
-
Loading spinner integration for async operations.
|
|
299
|
-
</p>
|
|
300
|
-
</div>
|
|
301
|
-
|
|
302
|
-
<div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
|
|
303
|
-
<div class="flex items-center gap-2 mb-2">
|
|
304
|
-
<h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Error States</h3>
|
|
305
|
-
<span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
|
|
347
|
+
<span class="text-xs bg-blue-500 text-white px-2 py-1 rounded">Coming Soon</span>
|
|
306
348
|
</div>
|
|
307
349
|
<p class="text-sm text-gray-700 dark:text-gray-400">
|
|
308
|
-
|
|
350
|
+
Different input sizes: small, medium, large for various layouts.
|
|
309
351
|
</p>
|
|
310
352
|
</div>
|
|
311
353
|
</div>
|
|
@@ -56,10 +56,20 @@ export class InputDocs {
|
|
|
56
56
|
validationTemplateCode = getFormattedCode(InputCodeExamples.validationTemplate, 'html');
|
|
57
57
|
validationSetupCode = getFormattedCode(InputCodeExamples.validationSetup, 'typescript');
|
|
58
58
|
|
|
59
|
+
// New Features
|
|
60
|
+
labelCode = getFormattedCode(InputCodeExamples.withLabel, 'html');
|
|
61
|
+
loadingCode = getFormattedCode(InputCodeExamples.loadingState, 'html');
|
|
62
|
+
validCode = getFormattedCode(InputCodeExamples.validState, 'html');
|
|
63
|
+
errorCode = getFormattedCode(InputCodeExamples.errorState, 'html');
|
|
64
|
+
passwordCode = getFormattedCode(InputCodeExamples.passwordWithToggle, 'html');
|
|
65
|
+
|
|
59
66
|
// Properties
|
|
67
|
+
propertyLabelCode = getFormattedCode(InputCodeExamples.propertyLabel, 'typescript');
|
|
60
68
|
propertyTypeCode = getFormattedCode(InputCodeExamples.propertyType, 'typescript');
|
|
61
69
|
propertyPlaceholderCode = getFormattedCode(InputCodeExamples.propertyPlaceholder, 'typescript');
|
|
62
|
-
|
|
70
|
+
propertyLoadingCode = getFormattedCode(InputCodeExamples.propertyLoading, 'typescript');
|
|
71
|
+
propertyValidCode = getFormattedCode(InputCodeExamples.propertyValid, 'typescript');
|
|
72
|
+
propertyErrorCode = getFormattedCode(InputCodeExamples.propertyError, 'typescript');
|
|
63
73
|
|
|
64
74
|
constructor(
|
|
65
75
|
private aiPromptService: AiPromptService,
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
);
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
+
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4944285767597175"
|
|
20
|
+
crossorigin="anonymous"></script>
|
|
21
|
+
|
|
19
22
|
<meta name="robots" content="index, follow">
|
|
20
23
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
21
24
|
<meta name="description" content="Wally UI - Angular component library">
|
|
22
|
-
|
|
25
|
+
|
|
23
26
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
24
27
|
</head>
|
|
25
28
|
|
|
File without changes
|