wally-ui 1.2.1 → 1.3.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.
Files changed (41) hide show
  1. package/package.json +1 -1
  2. package/playground/showcase/package-lock.json +18 -0
  3. package/playground/showcase/package.json +2 -0
  4. package/playground/showcase/public/_headers +7 -0
  5. package/playground/showcase/public/robots.txt +14 -0
  6. package/playground/showcase/src/app/app.routes.server.ts +14 -2
  7. package/playground/showcase/src/app/app.routes.ts +5 -1
  8. package/playground/showcase/src/app/components/input/input.html +27 -0
  9. package/playground/showcase/src/app/{pages/components/button-docs/button-docs.spec.ts → components/input/input.spec.ts} +6 -6
  10. package/playground/showcase/src/app/components/input/input.ts +78 -0
  11. package/playground/showcase/src/app/core/services/ai-prompt.service.ts +2 -2
  12. package/playground/showcase/src/app/core/utils/prism.ts +14 -0
  13. package/playground/showcase/src/app/pages/documentation/components/breadcrumb-docs/breadcrumb-docs.examples.ts +71 -0
  14. package/playground/showcase/src/app/pages/{components → documentation/components}/breadcrumb-docs/breadcrumb-docs.html +13 -43
  15. package/playground/showcase/src/app/pages/documentation/components/breadcrumb-docs/breadcrumb-docs.ts +63 -0
  16. package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.examples.ts +55 -0
  17. package/playground/showcase/src/app/pages/{components → documentation/components}/button-docs/button-docs.html +26 -101
  18. package/playground/showcase/src/app/pages/documentation/components/button-docs/button-docs.ts +64 -0
  19. package/playground/showcase/src/app/pages/documentation/components/components.css +0 -0
  20. package/playground/showcase/src/app/pages/documentation/components/components.html +63 -0
  21. package/playground/showcase/src/app/pages/{components → documentation/components}/components.routes.ts +4 -0
  22. package/playground/showcase/src/app/pages/{components → documentation/components}/components.ts +3 -1
  23. package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.css +13 -0
  24. package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.examples.ts +78 -0
  25. package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.html +315 -0
  26. package/playground/showcase/src/app/pages/documentation/components/input-docs/input-docs.ts +95 -0
  27. package/playground/showcase/src/app/pages/documentation/documentation.css +0 -0
  28. package/playground/showcase/src/app/pages/{components/components.html → documentation/documentation.html} +70 -43
  29. package/playground/showcase/src/app/pages/documentation/documentation.routes.ts +12 -0
  30. package/playground/showcase/src/app/pages/documentation/documentation.ts +16 -0
  31. package/playground/showcase/src/app/pages/home/home.html +9 -4
  32. package/playground/showcase/src/app/pages/home/home.ts +1 -3
  33. package/playground/showcase/src/app/pages/mcp/mcp.html +1 -1
  34. package/playground/showcase/src/index.html +4 -1
  35. package/playground/showcase/src/styles.css +547 -1
  36. package/playground/showcase/src/app/pages/components/breadcrumb-docs/breadcrumb-docs.ts +0 -43
  37. package/playground/showcase/src/app/pages/components/button-docs/button-docs.ts +0 -41
  38. package/playground/showcase/src/app/pages/components/components.spec.ts +0 -23
  39. /package/playground/showcase/src/app/{pages/components/breadcrumb-docs/breadcrumb-docs.css → components/input/input.css} +0 -0
  40. /package/playground/showcase/src/app/pages/{components/button-docs/button-docs.css → documentation/components/breadcrumb-docs/breadcrumb-docs.css} +0 -0
  41. /package/playground/showcase/src/app/pages/{components/components.css → documentation/components/button-docs/button-docs.css} +0 -0
@@ -0,0 +1,315 @@
1
+ <div class="font-mono">
2
+ <div class="max-w-4xl mx-auto p-6">
3
+ <div class="mb-4">
4
+ <wally-breadcrumb [items]="breadcrumbItems"></wally-breadcrumb>
5
+ </div>
6
+
7
+ <h1 class="text-2xl font-bold mb-4 text-[#0a0a0a] dark:text-white">
8
+ Input
9
+ </h1>
10
+ <p class="text-gray-700 dark:text-gray-400 mb-4">
11
+ A versatile input component with full FormGroup and ReactiveFormsModule support, perfect for forms and data entry.
12
+ </p>
13
+
14
+ <!-- Under Construction Badge -->
15
+ <div class="mb-6">
16
+ <span class="text-xs bg-yellow-500 text-black px-3 py-1 rounded-full font-medium">Under Construction</span>
17
+ <p class="text-sm text-gray-600 dark:text-gray-400 mt-2">
18
+ This component is actively being developed. More features and improvements coming soon!
19
+ </p>
20
+ </div>
21
+
22
+ <!-- AI Prompts -->
23
+ <div class="flex flex-wrap gap-2 mb-6">
24
+ <a [href]="claudeUrl" target="_blank"
25
+ class="inline-flex items-center gap-2 px-3 py-1.5 text-xs bg-gray-200 dark:bg-[#121212] text-gray-600 dark:text-gray-300 rounded-lg hover:bg-gray-300 dark:hover:bg-[#1a1a1a] hover:text-[#0a0a0a] dark:hover:text-white transition-colors">
26
+ <svg xmlns="http://www.w3.org/2000/svg" class="size-6" viewBox="0 0 24 24">
27
+ <path fill="currentColor"
28
+ d="m4.714 15.956l4.718-2.648l.079-.23l-.08-.128h-.23l-.79-.048l-2.695-.073l-2.337-.097l-2.265-.122l-.57-.121l-.535-.704l.055-.353l.48-.321l.685.06l1.518.104l2.277.157l1.651.098l2.447.255h.389l.054-.158l-.133-.097l-.103-.098l-2.356-1.596l-2.55-1.688l-1.336-.972l-.722-.491L2 6.223l-.158-1.008l.656-.722l.88.06l.224.061l.893.686l1.906 1.476l2.49 1.833l.364.304l.146-.104l.018-.072l-.164-.274l-1.354-2.446l-1.445-2.49l-.644-1.032l-.17-.619a3 3 0 0 1-.103-.729L6.287.133L6.7 0l.995.134l.42.364l.619 1.415L9.735 4.14l1.555 3.03l.455.898l.243.832l.09.255h.159V9.01l.127-1.706l.237-2.095l.23-2.695l.08-.76l.376-.91l.747-.492l.583.28l.48.685l-.067.444l-.286 1.851l-.558 2.903l-.365 1.942h.213l.243-.242l.983-1.306l1.652-2.064l.728-.82l.85-.904l.547-.431h1.032l.759 1.129l-.34 1.166l-1.063 1.347l-.88 1.142l-1.263 1.7l-.79 1.36l.074.11l.188-.02l2.853-.606l1.542-.28l1.84-.315l.832.388l.09.395l-.327.807l-1.967.486l-2.307.462l-3.436.813l-.043.03l.049.061l1.548.146l.662.036h1.62l3.018.225l.79.522l.473.638l-.08.485l-1.213.62l-1.64-.389l-3.825-.91l-1.31-.329h-.183v.11l1.093 1.068l2.003 1.81l2.508 2.33l.127.578l-.321.455l-.34-.049l-2.204-1.657l-.85-.747l-1.925-1.62h-.127v.17l.443.649l2.343 3.521l.122 1.08l-.17.353l-.607.213l-.668-.122l-1.372-1.924l-1.415-2.168l-1.141-1.943l-.14.08l-.674 7.254l-.316.37l-.728.28l-.607-.461l-.322-.747l.322-1.476l.388-1.924l.316-1.53l.285-1.9l.17-.632l-.012-.042l-.14.018l-1.432 1.967l-2.18 2.945l-1.724 1.845l-.413.164l-.716-.37l.066-.662l.401-.589l2.386-3.036l1.439-1.882l.929-1.086l-.006-.158h-.055L4.138 18.56l-1.13.146l-.485-.456l.06-.746l.231-.243l1.907-1.312Z" />
29
+ </svg>
30
+ Open in Claude
31
+ </a>
32
+
33
+ <a [href]="chatGptUrl" target="_blank"
34
+ class="inline-flex items-center gap-2 px-3 py-1.5 text-xs bg-gray-200 dark:bg-[#121212] text-gray-600 dark:text-gray-300 rounded-lg hover:bg-gray-300 dark:hover:bg-[#1a1a1a] hover:text-[#0a0a0a] dark:hover:text-white transition-colors">
35
+ <svg xmlns="http://www.w3.org/2000/svg" class="size-6" viewBox="0 0 48 48">
36
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
37
+ d="M18.38 27.94v-14.4l11.19-6.46c6.2-3.58 17.3 5.25 12.64 13.33" />
38
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
39
+ d="m18.38 20.94l12.47-7.2l11.19 6.46c6.2 3.58 4.1 17.61-5.23 17.61" />
40
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
41
+ d="m24.44 17.44l12.47 7.2v12.93c0 7.16-13.2 12.36-17.86 4.28" />
42
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
43
+ d="M30.5 21.2v14.14L19.31 41.8c-6.2 3.58-17.3-5.25-12.64-13.33" />
44
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
45
+ d="m30.5 27.94l-12.47 7.2l-11.19-6.46c-6.21-3.59-4.11-17.61 5.22-17.61" />
46
+ <path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
47
+ d="m24.44 31.44l-12.47-7.2V11.31c0-7.16 13.2-12.36 17.86-4.28" />
48
+ </svg>
49
+ Open in ChatGPT
50
+ </a>
51
+ </div>
52
+
53
+ <!-- Installation -->
54
+ <section class="mb-8">
55
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Installation</h2>
56
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
57
+ <pre><code [innerHTML]="installationCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
58
+ </div>
59
+ </section>
60
+
61
+ <!-- Preview -->
62
+ <section class="mb-8">
63
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Preview</h2>
64
+ <div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
65
+ <div class="flex flex-col gap-2 w-full">
66
+ <wally-input placeholder="Enter your name"></wally-input>
67
+ <wally-input type="email" placeholder="Enter your email"></wally-input>
68
+ </div>
69
+ </div>
70
+ </section>
71
+
72
+ <!-- Import -->
73
+ <section class="mb-8">
74
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Import</h2>
75
+ <div class="space-y-4">
76
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
77
+ <pre><code [innerHTML]="importCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
78
+ </div>
79
+
80
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
81
+ <pre><code [innerHTML]="componentImportCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
82
+ </div>
83
+ </div>
84
+ </section>
85
+
86
+ <!-- FormGroup Usage (HIGHLIGHTED SECTION) -->
87
+ <section class="mb-8">
88
+ <div class="bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-700 p-4 rounded-lg mb-4">
89
+ <h2 class="text-lg font-semibold mb-2 text-blue-800 dark:text-blue-200">
90
+ FormGroup & ReactiveFormsModule Support
91
+ </h2>
92
+ <p class="text-sm text-blue-700 dark:text-blue-300">
93
+ This input component is fully compatible with Angular's FormGroup and ReactiveFormsModule!
94
+ Use <span class="bg-blue-100 dark:bg-blue-800 px-1 py-0.5 rounded text-xs">formControlName</span> for seamless form integration.
95
+ </p>
96
+ </div>
97
+
98
+ <div class="space-y-8">
99
+ <div>
100
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Template Setup</h3>
101
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
102
+ <pre><code [innerHTML]="formGroupTemplateCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
103
+ </div>
104
+ </div>
105
+
106
+ <div>
107
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Component Setup</h3>
108
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
109
+ <pre><code [innerHTML]="formGroupSetupCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
110
+ </div>
111
+ </div>
112
+
113
+ <div>
114
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Live Example</h3>
115
+ <form [formGroup]="basicForm" (ngSubmit)="onBasicSubmit()" class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
116
+ <div class="flex flex-col gap-2 w-full">
117
+ <div>
118
+ <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Name</label>
119
+ <wally-input formControlName="name" placeholder="Enter your name"></wally-input>
120
+ </div>
121
+
122
+ <div>
123
+ <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Email</label>
124
+ <wally-input formControlName="email" type="email" placeholder="Enter your email"></wally-input>
125
+ </div>
126
+
127
+ <wally-button type="submit" class="w-full">
128
+ Submit (Check Console)
129
+ </wally-button>
130
+
131
+ <div class="text-sm text-gray-600 dark:text-gray-400 mt-4">
132
+ Form Value: {{ basicForm.value | json }}
133
+ </div>
134
+ </div>
135
+ </form>
136
+ </div>
137
+ </div>
138
+ </section>
139
+
140
+ <!-- Basic Usage -->
141
+ <section class="mb-8">
142
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Basic Usage</h2>
143
+
144
+ <div class="space-y-8">
145
+ <div>
146
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
147
+ <pre><code [innerHTML]="basicSetupCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
148
+ </div>
149
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
150
+ <pre><code [innerHTML]="basicUsageCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
151
+ </div>
152
+ <div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
153
+ <wally-input placeholder="Enter text"></wally-input>
154
+ </div>
155
+ </div>
156
+ </div>
157
+ </section>
158
+
159
+ <!-- Input Types -->
160
+ <section class="mb-8">
161
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Input Types</h2>
162
+
163
+ <div class="space-y-8">
164
+ <!-- Email -->
165
+ <div>
166
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Email Input</h3>
167
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
168
+ <pre><code [innerHTML]="emailTypeCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
169
+ </div>
170
+ <div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
171
+ <wally-input type="email" placeholder="Enter your email"></wally-input>
172
+ </div>
173
+ </div>
174
+
175
+ <!-- Password -->
176
+ <div>
177
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Password Input</h3>
178
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
179
+ <pre><code [innerHTML]="passwordTypeCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
180
+ </div>
181
+ <div class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
182
+ <wally-input type="password" placeholder="Enter password"></wally-input>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </section>
187
+
188
+
189
+ <!-- Form Validation -->
190
+ <section class="mb-8">
191
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Form Validation</h2>
192
+
193
+ <div class="space-y-8">
194
+ <div>
195
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Validation Setup</h3>
196
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
197
+ <pre><code [innerHTML]="validationSetupCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
198
+ </div>
199
+ </div>
200
+
201
+ <div>
202
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Template with Validation</h3>
203
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-4">
204
+ <pre><code [innerHTML]="validationTemplateCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
205
+ </div>
206
+ </div>
207
+
208
+ <div>
209
+ <h3 class="text-md font-medium mb-3 text-[#0a0a0a] dark:text-white">Live Validation Example</h3>
210
+ <form [formGroup]="validationForm" (ngSubmit)="onValidationSubmit()" class="p-6 border rounded-lg bg-white dark:bg-[#121212]">
211
+ <div class="flex flex-col gap-2 w-full">
212
+ <div>
213
+ <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Username (min 3 chars)</label>
214
+ <wally-input formControlName="username" placeholder="Enter username"></wally-input>
215
+
216
+ @if (validationForm.get('username')?.invalid && validationForm.get('username')?.touched) {
217
+ <div class="mt-2">
218
+ <span class="text-red-500 text-sm">
219
+ @if (validationForm.get('username')?.errors?.['required']) {
220
+ <span>Username is required</span>
221
+ }
222
+ @if (validationForm.get('username')?.errors?.['minlength']) {
223
+ <span>Username must be at least 3 characters</span>
224
+ }
225
+ </span>
226
+ </div>
227
+ }
228
+ </div>
229
+
230
+ <wally-button type="submit" [disabled]="validationForm.invalid" class="w-full">
231
+ Submit ({{ validationForm.valid ? 'Valid' : 'Invalid' }})
232
+ </wally-button>
233
+ </div>
234
+ </form>
235
+ </div>
236
+ </div>
237
+ </section>
238
+
239
+ <!-- Properties -->
240
+ <section class="mb-8">
241
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Properties</h2>
242
+
243
+ <div class="space-y-4">
244
+ <div class="space-y-2">
245
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
246
+ <pre><code [innerHTML]="propertyTypeCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
247
+ </div>
248
+ <p class="text-sm text-gray-700 dark:text-gray-400">HTML input type (text, email, password, etc.)</p>
249
+ </div>
250
+
251
+ <div class="space-y-2">
252
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
253
+ <pre><code [innerHTML]="propertyPlaceholderCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
254
+ </div>
255
+ <p class="text-sm text-gray-700 dark:text-gray-400">Placeholder text for the input</p>
256
+ </div>
257
+
258
+ <div class="space-y-2">
259
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
260
+ <pre><code [innerHTML]="propertyValueCode" class="text-sm text-[#0a0a0a] dark:text-white"></code></pre>
261
+ </div>
262
+ <p class="text-sm text-gray-700 dark:text-gray-400">Current value of the input</p>
263
+ </div>
264
+ </div>
265
+ </section>
266
+
267
+ <!-- Under Construction -->
268
+ <section class="mb-8">
269
+ <h2 class="text-lg font-semibold mb-4 text-[#0a0a0a] dark:text-white">Under Construction</h2>
270
+
271
+ <div class="space-y-4">
272
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
273
+ <div class="flex items-center gap-2 mb-2">
274
+ <h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Input Icons</h3>
275
+ <span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
276
+ </div>
277
+ <p class="text-sm text-gray-700 dark:text-gray-400">
278
+ Support for left and right icons within the input field.
279
+ </p>
280
+ </div>
281
+
282
+ <div class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg">
283
+ <div class="flex items-center gap-2 mb-2">
284
+ <h3 class="text-md font-medium text-[#0a0a0a] dark:text-white">Input Sizes</h3>
285
+ <span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
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>
306
+ </div>
307
+ <p class="text-sm text-gray-700 dark:text-gray-400">
308
+ Built-in error styling and validation message integration.
309
+ </p>
310
+ </div>
311
+ </div>
312
+ </section>
313
+
314
+ </div>
315
+ </div>
@@ -0,0 +1,95 @@
1
+ import { Component } from '@angular/core';
2
+ import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';
3
+
4
+ import { Breadcrumb, BreadcrumbItem } from '../../../../components/breadcrumb/breadcrumb';
5
+ import { Input } from '../../../../components/input/input';
6
+ import { Button } from '../../../../components/button/button';
7
+
8
+ import { AiPromptService } from '../../../../core/services/ai-prompt.service';
9
+ import { InputCodeExamples } from './input-docs.examples';
10
+ import { getFormattedCode } from '../../../../core/utils/prism';
11
+ import { JsonPipe } from '@angular/common';
12
+
13
+ @Component({
14
+ selector: 'app-input-docs',
15
+ imports: [
16
+ Input,
17
+ Breadcrumb,
18
+ Button,
19
+ ReactiveFormsModule,
20
+ JsonPipe
21
+ ],
22
+ templateUrl: './input-docs.html',
23
+ styleUrl: './input-docs.css'
24
+ })
25
+ export class InputDocs {
26
+ breadcrumbItems: BreadcrumbItem[] = [
27
+ { label: 'Home', url: '/' },
28
+ { label: 'Documentation', url: '/documentation' },
29
+ { label: 'Components', url: '/documentation/components' },
30
+ { label: 'Input' }
31
+ ];
32
+
33
+ // Form examples
34
+ basicForm: FormGroup;
35
+ validationForm: FormGroup;
36
+
37
+ // Code examples with highlighting
38
+ installationCode = getFormattedCode(InputCodeExamples.installation, 'bash');
39
+ importCode = getFormattedCode(InputCodeExamples.import, 'typescript');
40
+ componentImportCode = getFormattedCode(InputCodeExamples.componentImport, 'typescript');
41
+ basicUsageCode = getFormattedCode(InputCodeExamples.basicUsage, 'html');
42
+ basicSetupCode = getFormattedCode(InputCodeExamples.basicSetup, 'typescript');
43
+
44
+ // FormGroup examples (highlighted!)
45
+ formGroupTemplateCode = getFormattedCode(InputCodeExamples.formGroupTemplate, 'html');
46
+ formGroupSetupCode = getFormattedCode(InputCodeExamples.formGroupSetup, 'typescript');
47
+
48
+ // States
49
+ withValueCode = getFormattedCode(InputCodeExamples.withValue, 'html');
50
+
51
+ // Types
52
+ emailTypeCode = getFormattedCode(InputCodeExamples.emailType, 'html');
53
+ passwordTypeCode = getFormattedCode(InputCodeExamples.passwordType, 'html');
54
+
55
+ // Validation
56
+ validationTemplateCode = getFormattedCode(InputCodeExamples.validationTemplate, 'html');
57
+ validationSetupCode = getFormattedCode(InputCodeExamples.validationSetup, 'typescript');
58
+
59
+ // Properties
60
+ propertyTypeCode = getFormattedCode(InputCodeExamples.propertyType, 'typescript');
61
+ propertyPlaceholderCode = getFormattedCode(InputCodeExamples.propertyPlaceholder, 'typescript');
62
+ propertyValueCode = getFormattedCode(InputCodeExamples.propertyValue, 'typescript');
63
+
64
+ constructor(
65
+ private aiPromptService: AiPromptService,
66
+ private fb: FormBuilder
67
+ ) {
68
+ this.basicForm = this.fb.group({
69
+ name: [''],
70
+ email: ['']
71
+ });
72
+
73
+ this.validationForm = this.fb.group({
74
+ username: ['', [Validators.required, Validators.minLength(3)]]
75
+ });
76
+ }
77
+
78
+ get claudeUrl(): string {
79
+ return this.aiPromptService.generateClaudeUrl();
80
+ }
81
+
82
+ get chatGptUrl(): string {
83
+ return this.aiPromptService.generateChatGptUrl();
84
+ }
85
+
86
+ onBasicSubmit() {
87
+ console.log('Basic Form:', this.basicForm.value);
88
+ }
89
+
90
+ onValidationSubmit() {
91
+ if (this.validationForm.valid) {
92
+ console.log('Validation Form:', this.validationForm.value);
93
+ }
94
+ }
95
+ }
@@ -4,12 +4,73 @@
4
4
  </div>
5
5
 
6
6
  <h1 class="text-2xl font-bold text-[#0a0a0a] dark:text-white mb-4">
7
- Components
7
+ Documentation
8
8
  </h1>
9
9
  <p class="text-gray-700 dark:text-gray-400 mb-6">
10
- Explore our collection of reusable Angular components.
10
+ Welcome to Wally UI documentation. Learn how to get started and explore our component library.
11
11
  </p>
12
12
 
13
+ <!-- Philosophy & Approach -->
14
+ <div id="philosophy" class="mb-8">
15
+ <h2 class="text-lg font-semibold text-[#0a0a0a] dark:text-white mb-4">
16
+ A Modern Approach to Angular UI Components
17
+ </h2>
18
+ <p class="text-gray-700 dark:text-gray-400 mb-4">
19
+ Wally UI is a modern approach to building Angular interfaces, inspired by the success of shadcn/ui in React.
20
+ Unlike traditional libraries, it doesn't add heavy dependencies to your project: each component is generated
21
+ via npx and becomes your code, ready to edit, customize, and evolve as needed.
22
+ </p>
23
+
24
+ <div class="grid gap-3 md:grid-cols-2 mb-6">
25
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
26
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">No External Dependencies</h3>
27
+ <p class="text-sm text-gray-700 dark:text-gray-400">
28
+ You control the code, without being tied to third-party updates.
29
+ </p>
30
+ </div>
31
+
32
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
33
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">Total Customization</h3>
34
+ <p class="text-sm text-gray-700 dark:text-gray-400">
35
+ Since the component is yours, it can be adapted to any design system or business rules.
36
+ </p>
37
+ </div>
38
+
39
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
40
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">Lightweight</h3>
41
+ <p class="text-sm text-gray-700 dark:text-gray-400">
42
+ Only what you actually add goes into the bundle, without loading dozens of unused components.
43
+ </p>
44
+ </div>
45
+
46
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
47
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">Tailwind Integrated</h3>
48
+ <p class="text-sm text-gray-700 dark:text-gray-400">
49
+ Modern, responsive, and consistent styles with the power of Tailwind CSS.
50
+ </p>
51
+ </div>
52
+
53
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
54
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">Learning & Clarity</h3>
55
+ <p class="text-sm text-gray-700 dark:text-gray-400">
56
+ Each component serves as a practical example of Angular best practices.
57
+ </p>
58
+ </div>
59
+
60
+ <div class="bg-gray-200 dark:bg-[#121212] p-3 rounded-lg">
61
+ <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-2">Standalone Components</h3>
62
+ <p class="text-sm text-gray-700 dark:text-gray-400">
63
+ Leverages Angular's latest features, reducing complexity and improving modularity.
64
+ </p>
65
+ </div>
66
+ </div>
67
+
68
+ <p class="text-gray-700 dark:text-gray-400">
69
+ With Wally UI, you gain agility to start projects, flexibility to shape your UI without limitations,
70
+ and simplicity to maintain code long-term. It's the most practical and modern way to build Angular interfaces.
71
+ </p>
72
+ </div>
73
+
13
74
  <!-- Requirements -->
14
75
  <div id="requirements" class="bg-gray-200 dark:bg-[#121212] p-4 rounded-lg mb-6">
15
76
  <h3 class="text-sm font-semibold text-[#0a0a0a] dark:text-white mb-3">Requirements</h3>
@@ -82,52 +143,18 @@
82
143
  </div>
83
144
  </div>
84
145
 
85
- <!-- Available Components -->
86
- <div id="available-components" class="space-y-4">
87
- <h3 class="text-lg font-semibold text-[#0a0a0a] dark:text-white mb-4">Available Components</h3>
88
-
89
- <div class="bg-gray-200 dark:bg-[#121212] rounded-lg p-4 mb-4">
90
- <p class="text-sm text-gray-700 dark:text-gray-400">
91
- More components are being built and will be added soon. Stay tuned for updates!
92
- </p>
93
- </div>
94
-
95
- <div class="bg-gray-200 dark:bg-[#121212] rounded-lg p-4">
96
- <div class="flex items-center gap-2 mb-2">
97
- <h4 class="text-md font-semibold text-[#0a0a0a] dark:text-white">Button</h4>
98
- <span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
99
- </div>
100
- <p class="text-sm text-gray-700 dark:text-gray-400 mb-3">
101
- A versatile button component with loading states, notifications, and customizable text. Currently being refined
102
- and improved.
103
- </p>
104
- <a href="/components/button" class="text-blue-500 underline hover:text-blue-700 text-sm">
105
- View Documentation
106
- </a>
107
- </div>
146
+ <!-- Navigation to Components -->
147
+ <div class="space-y-4">
148
+ <h3 class="text-lg font-semibold text-[#0a0a0a] dark:text-white mb-4">Explore</h3>
108
149
 
109
150
  <div class="bg-gray-200 dark:bg-[#121212] rounded-lg p-4">
110
- <div class="flex items-center gap-2 mb-2">
111
- <h4 class="text-md font-semibold text-[#0a0a0a] dark:text-white">Breadcrumb</h4>
112
- <span class="text-xs bg-yellow-500 text-black px-2 py-1 rounded">Under Construction</span>
113
- </div>
151
+ <h4 class="text-md font-semibold text-[#0a0a0a] dark:text-white mb-2">Components</h4>
114
152
  <p class="text-sm text-gray-700 dark:text-gray-400 mb-3">
115
- A navigation component that shows the current page location within a hierarchy.
153
+ Browse our collection of reusable Angular components with examples and documentation.
116
154
  </p>
117
- <a href="/components/breadcrumb" class="text-blue-500 underline hover:text-blue-700 text-sm">
118
- View Documentation
155
+ <a href="/documentation/components" class="text-blue-500 underline hover:text-blue-700 text-sm">
156
+ View Components →
119
157
  </a>
120
158
  </div>
121
-
122
- <div class="bg-gray-200 dark:bg-[#121212] rounded-lg p-4 opacity-60">
123
- <div class="flex items-center gap-2 mb-2">
124
- <h4 class="text-md font-semibold text-[#0a0a0a] dark:text-white">Input Text</h4>
125
- <span class="text-xs bg-blue-500 text-white px-2 py-1 rounded">Coming Soon</span>
126
- </div>
127
- <p class="text-sm text-gray-700 dark:text-gray-400">
128
- A flexible input component with validation, placeholder support, and various styling options. Next in
129
- development.
130
- </p>
131
- </div>
132
159
  </div>
133
160
  </div>
@@ -0,0 +1,12 @@
1
+ import { Routes } from '@angular/router';
2
+
3
+ export const documentationRoutes: Routes = [
4
+ {
5
+ path: '',
6
+ loadComponent: () => import('./documentation').then(m => m.Documentation)
7
+ },
8
+ {
9
+ path: 'components',
10
+ loadChildren: () => import('./components/components.routes').then(m => m.componentsRoutes)
11
+ }
12
+ ];
@@ -0,0 +1,16 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ import { Breadcrumb, BreadcrumbItem } from '../../components/breadcrumb/breadcrumb';
4
+
5
+ @Component({
6
+ selector: 'wally-documentation',
7
+ imports: [Breadcrumb],
8
+ templateUrl: './documentation.html',
9
+ styleUrl: './documentation.css'
10
+ })
11
+ export class Documentation {
12
+ breadcrumbItems: BreadcrumbItem[] = [
13
+ { label: 'Home', url: '/' },
14
+ { label: 'Documentation' }
15
+ ];
16
+ }
@@ -13,7 +13,7 @@
13
13
  standalone architecture and Tailwind CSS that integrate seamlessly with your projects.
14
14
  </p>
15
15
  </div>
16
-
16
+
17
17
  <div class="w-full max-w-md">
18
18
  <code
19
19
  class="w-full mt-6 block bg-gray-200 dark:bg-[#121212] dark:text-white text-[#0a0a0a] p-4 rounded-md text-sm cursor-pointer hover:opacity-85 transition-colorsselect-all"
@@ -23,18 +23,23 @@
23
23
  </div>
24
24
 
25
25
  <div class="mt-4 w-full max-w-md flex flex-col gap-2">
26
- <a href="/components" class="text-blue-500 underline">
26
+ <a href="/documentation" class="text-blue-500 underline">
27
27
  Documentation
28
28
  </a>
29
+ <a href="/documentation/components" class="text-blue-500 underline">
30
+ Components
31
+ </a>
29
32
  <a href="/mcp" class="text-blue-500 underline">
30
33
  MCP Server
31
34
  </a>
32
35
 
33
36
  <div class="flex gap-4 mt-2">
34
- <a href="https://github.com/WalissonCF/wally-ui" target="_blank" class="text-blue-500 underline text-sm">
37
+ <a href="https://github.com/WalissonCF/wally-ui" target="_blank"
38
+ class="text-blue-500 underline text-sm">
35
39
  GitHub
36
40
  </a>
37
- <a href="https://www.npmjs.com/package/wally-ui" target="_blank" class="text-blue-500 underline text-sm">
41
+ <a href="https://www.npmjs.com/package/wally-ui" target="_blank"
42
+ class="text-blue-500 underline text-sm">
38
43
  NPM
39
44
  </a>
40
45
  </div>
@@ -6,6 +6,4 @@ import { Component } from '@angular/core';
6
6
  templateUrl: './home.html',
7
7
  styleUrl: './home.css'
8
8
  })
9
- export class Home {
10
-
11
- }
9
+ export class Home {}
@@ -188,7 +188,7 @@
188
188
  <a href="https://modelcontextprotocol.io/" target="_blank" class="text-blue-500 underline hover:text-blue-700">
189
189
  Model Context Protocol
190
190
  </a>
191
- <a href="/components" class="text-blue-500 underline hover:text-blue-700">
191
+ <a href="/documentation/components" class="text-blue-500 underline hover:text-blue-700">
192
192
  Browse Components
193
193
  </a>
194
194
  </div>
@@ -3,7 +3,7 @@
3
3
 
4
4
  <head>
5
5
  <meta charset="utf-8">
6
- <title>Showcase</title>
6
+ <title>Wally UI</title>
7
7
  <base href="/">
8
8
 
9
9
  <script>
@@ -16,7 +16,10 @@
16
16
  );
17
17
  </script>
18
18
 
19
+ <meta name="robots" content="index, follow">
19
20
  <meta name="viewport" content="width=device-width, initial-scale=1">
21
+ <meta name="description" content="Wally UI - Angular component library">
22
+
20
23
  <link rel="icon" type="image/x-icon" href="favicon.ico">
21
24
  </head>
22
25