@r2digisolutions/components 0.17.3 → 0.17.4

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.
@@ -28,6 +28,8 @@
28
28
  placeholder?: string;
29
29
  emptyHint?: string;
30
30
  suggestions?: string[];
31
+ /** Chips shown under the conversation (after the user has messages). */
32
+ followUpSuggestions?: string[];
31
33
  messages?: AssistantMessage[];
32
34
  draft?: string;
33
35
  loading?: boolean;
@@ -66,6 +68,7 @@
66
68
  placeholder = 'Escribe un mensaje…',
67
69
  emptyHint = '¿En qué puedo ayudarte?',
68
70
  suggestions = [],
71
+ followUpSuggestions = [],
69
72
  messages = [],
70
73
  draft = $bindable(''),
71
74
  loading = false,
@@ -309,6 +312,20 @@
309
312
  </div>
310
313
  </div>
311
314
  {/if}
315
+
316
+ {#if !loading && followUpSuggestions.length}
317
+ <div class="ml-8 gap-2 flex flex-wrap">
318
+ {#each followUpSuggestions as suggestion (suggestion)}
319
+ <button
320
+ type="button"
321
+ class="border-border bg-surface px-3 py-1.5 text-xs text-secondary hover:border-brand-400 hover:text-brand-600 dark:hover:text-brand-400 rounded-full border transition-colors"
322
+ onclick={() => handleSuggestion(suggestion)}
323
+ >
324
+ {suggestion}
325
+ </button>
326
+ {/each}
327
+ </div>
328
+ {/if}
312
329
  </div>
313
330
  {/if}
314
331
  </div>
@@ -11,6 +11,8 @@ interface AssistantChatProps {
11
11
  placeholder?: string;
12
12
  emptyHint?: string;
13
13
  suggestions?: string[];
14
+ /** Chips shown under the conversation (after the user has messages). */
15
+ followUpSuggestions?: string[];
14
16
  messages?: AssistantMessage[];
15
17
  draft?: string;
16
18
  loading?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.17.3",
3
+ "version": "0.17.4",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",