@happyvertical/smrt-messages 0.60.15 → 0.60.17

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 (40) hide show
  1. package/AGENTS.md +4 -0
  2. package/dist/chunks/{AccountCollection-DBEG6nR7.js → AccountCollection-Jn3jKg1h.js} +2 -2
  3. package/dist/chunks/{AccountCollection-DBEG6nR7.js.map → AccountCollection-Jn3jKg1h.js.map} +1 -1
  4. package/dist/chunks/{Email-p5qIyMC5.js → Email-Ddhzl5pT.js} +3 -3
  5. package/dist/chunks/{Email-p5qIyMC5.js.map → Email-Ddhzl5pT.js.map} +1 -1
  6. package/dist/chunks/{EmailFolder-Dk4hxikK.js → EmailFolder-DFj8EDOE.js} +2 -2
  7. package/dist/chunks/{EmailFolder-Dk4hxikK.js.map → EmailFolder-DFj8EDOE.js.map} +1 -1
  8. package/dist/chunks/{Message-hIwx07Kt.js → Message-C92Sna6i.js} +4 -4
  9. package/dist/chunks/{Message-hIwx07Kt.js.map → Message-C92Sna6i.js.map} +1 -1
  10. package/dist/chunks/{MessageCollection-BwnE4a_L.js → MessageCollection-DTcvlo_u.js} +2 -2
  11. package/dist/chunks/{MessageCollection-BwnE4a_L.js.map → MessageCollection-DTcvlo_u.js.map} +1 -1
  12. package/dist/chunks/{__smrt-register__-D3kBjvML.js → __smrt-register__-C4I1owMm.js} +2 -2
  13. package/dist/chunks/{__smrt-register__-D3kBjvML.js.map → __smrt-register__-C4I1owMm.js.map} +1 -1
  14. package/dist/index.js +9 -9
  15. package/dist/manifest.json +1 -1
  16. package/dist/smrt-knowledge.json +5 -5
  17. package/dist/smrt-knowledge.okf.md +2 -2
  18. package/dist/svelte/components/AccountAvatar.svelte +34 -30
  19. package/dist/svelte/components/AccountCard.svelte +72 -63
  20. package/dist/svelte/components/AccountList.svelte +15 -9
  21. package/dist/svelte/components/AttachmentChip.svelte +54 -39
  22. package/dist/svelte/components/AttachmentUpload.svelte +55 -48
  23. package/dist/svelte/components/ComposeForm.svelte +105 -83
  24. package/dist/svelte/components/EmailAccountManager.svelte +245 -230
  25. package/dist/svelte/components/EmailFilterManager.svelte +250 -228
  26. package/dist/svelte/components/FolderNav.svelte +60 -50
  27. package/dist/svelte/components/ForwardForm.svelte +40 -34
  28. package/dist/svelte/components/MessageCard.svelte +116 -110
  29. package/dist/svelte/components/MessageDetail.svelte +107 -92
  30. package/dist/svelte/components/MessageFilters.svelte +73 -48
  31. package/dist/svelte/components/MessageList.svelte +20 -13
  32. package/dist/svelte/components/MessageStatusIndicator.svelte +24 -22
  33. package/dist/svelte/components/MessageToolbar.svelte +48 -36
  34. package/dist/svelte/components/MessageTypeBadge.svelte +8 -5
  35. package/dist/svelte/components/MessagingSettingsPanel.svelte +97 -32
  36. package/dist/svelte/components/RecipientInput.svelte +63 -43
  37. package/dist/svelte/components/ReplyForm.svelte +40 -34
  38. package/dist/svelte/components/SendStatusBadge.svelte +21 -14
  39. package/dist/svelte/components/ThreadView.svelte +68 -55
  40. package/package.json +16 -16
@@ -35,17 +35,17 @@ const {
35
35
  }: Props = $props();
36
36
  </script>
37
37
 
38
- <div class="toolbar" role="toolbar" aria-label={t(M['messages.message_toolbar.actions_label'])} data-smrt-component="MessageToolbar">
39
- <div class="selection-info">
38
+ <div class="smrt-message-toolbar__root" role="toolbar" aria-label={t(M['messages.message_toolbar.actions_label'])} data-smrt-component="MessageToolbar">
39
+ <div class="smrt-message-toolbar__selection" data-smrt-part="control">
40
40
  {#if selectedCount > 0}
41
- <span class="count">{t(M['messages.message_toolbar.count_selected'], { selectedCount, totalCount })}</span>
41
+ <span class="smrt-message-toolbar__count" data-smrt-part="count">{t(M['messages.message_toolbar.count_selected'], { selectedCount, totalCount })}</span>
42
42
  {#if onclearselection}
43
43
  <Button variant="ghost" size="sm" class="link-btn" onclick={onclearselection}>
44
44
  Clear
45
45
  </Button>
46
46
  {/if}
47
47
  {:else}
48
- <span class="count">{totalCount} messages</span>
48
+ <span class="smrt-message-toolbar__count" data-smrt-part="count">{totalCount} messages</span>
49
49
  {/if}
50
50
  {#if onselectall && selectedCount < totalCount}
51
51
  <Button variant="ghost" size="sm" class="link-btn" onclick={onselectall}>
@@ -55,7 +55,7 @@ const {
55
55
  </div>
56
56
 
57
57
  {#if selectedCount > 0 && onaction}
58
- <div class="actions">
58
+ <div class="smrt-message-toolbar__actions" data-smrt-part="actions">
59
59
  <Button variant="ghost" size="sm" class="action-btn" onclick={() => onaction?.('markRead')}>
60
60
  {t(M['messages.message_toolbar.mark_read'])}
61
61
  </Button>
@@ -80,69 +80,81 @@ const {
80
80
 
81
81
  <style>
82
82
  @layer smrt.reset, smrt.structure, smrt.theme;
83
- @layer smrt.theme {
84
- .toolbar {
83
+ @layer smrt.structure {
84
+ .smrt-message-toolbar__root {
85
85
  display: flex;
86
86
  align-items: center;
87
87
  justify-content: space-between;
88
88
  padding: 0.5rem 0.75rem;
89
- background: var(--smrt-color-surface-variant);
90
- border-radius: var(--smrt-radius-small, 0.25rem);
91
89
  gap: 1rem;
92
90
  flex-wrap: wrap;
93
91
  }
94
-
95
- .selection-info {
92
+ .smrt-message-toolbar__selection {
96
93
  display: flex;
97
94
  align-items: center;
98
95
  gap: 0.5rem;
99
96
  }
97
+ /*
98
+ * The link and action buttons now render through smrt-ui's <Button
99
+ * variant="ghost">. The <button> is emitted inside the Button child, so a
100
+ * plain scoped rule would not match — anchoring on the real `.smrt-message-toolbar__selection`
101
+ * / `.smrt-message-toolbar__actions` elements and piercing with `:global(...)` keeps the original
102
+ * text-link / outlined-surface styling (issue #1589). The destructive button's
103
+ * modifier is `action-btn--danger`, NOT `danger`, so it never collides with
104
+ * Button's own `.danger` variant class.
105
+ */
106
+ .smrt-message-toolbar__selection :global(.link-btn) {
107
+ padding: 0;
108
+ }
109
+ .smrt-message-toolbar__actions {
110
+ display: flex;
111
+ gap: 0.375rem;
112
+ flex-wrap: wrap;
113
+ }
114
+ .smrt-message-toolbar__actions :global(.action-btn) {
115
+ padding: 0.25rem 0.625rem;
116
+ }
117
+ }
100
118
 
101
- .count {
119
+ @layer smrt.theme {
120
+ .smrt-message-toolbar__root {
121
+ background: var(--smrt-color-surface-variant);
122
+ border-radius: var(--smrt-radius-small, 0.25rem);
123
+ }
124
+ .smrt-message-toolbar__count {
102
125
  font: var(--smrt-typography-body-small-font, 0.75rem / 1.33 sans-serif);
103
126
  color: var(--smrt-color-on-surface-variant);
104
127
  }
105
-
106
128
  /*
107
- * The link and action buttons now render through smrt-ui's <Button
108
- * variant="ghost">. The <button> is emitted inside the Button child, so a
109
- * plain scoped rule would not match — anchoring on the real `.selection-info`
110
- * / `.actions` elements and piercing with `:global(...)` keeps the original
111
- * text-link / outlined-surface styling (issue #1589). The destructive button's
112
- * modifier is `action-btn--danger`, NOT `danger`, so it never collides with
113
- * Button's own `.danger` variant class.
114
- */
115
- .selection-info :global(.link-btn) {
129
+ * The link and action buttons now render through smrt-ui's <Button
130
+ * variant="ghost">. The <button> is emitted inside the Button child, so a
131
+ * plain scoped rule would not match — anchoring on the real `.smrt-message-toolbar__selection`
132
+ * / `.smrt-message-toolbar__actions` elements and piercing with `:global(...)` keeps the original
133
+ * text-link / outlined-surface styling (issue #1589). The destructive button's
134
+ * modifier is `action-btn--danger`, NOT `danger`, so it never collides with
135
+ * Button's own `.danger` variant class.
136
+ */
137
+ .smrt-message-toolbar__selection :global(.link-btn) {
116
138
  border: none;
117
139
  background: none;
118
140
  font: var(--smrt-typography-label-medium-font, 500 0.75rem / 1.33 sans-serif);
119
141
  color: var(--smrt-color-primary);
120
142
  text-decoration: underline;
121
- padding: 0;
122
143
  }
123
-
124
- .actions {
125
- display: flex;
126
- gap: 0.375rem;
127
- flex-wrap: wrap;
128
- }
129
-
130
- .actions :global(.action-btn) {
131
- padding: 0.25rem 0.625rem;
144
+ .smrt-message-toolbar__actions :global(.action-btn) {
132
145
  border: var(--smrt-hairline-strong);
133
146
  border-radius: var(--smrt-radius-small, 0.25rem);
134
147
  background: var(--smrt-color-surface);
135
148
  color: var(--smrt-color-on-surface);
136
149
  font: var(--smrt-typography-label-small-font, 500 0.6875rem / 1 sans-serif);
137
150
  }
138
-
139
- .actions :global(.action-btn):hover {
151
+ .smrt-message-toolbar__actions :global(.action-btn):hover {
140
152
  background: var(--smrt-color-surface-variant);
141
153
  }
142
-
143
- .actions :global(.action-btn--danger) {
154
+ .smrt-message-toolbar__actions :global(.action-btn--danger) {
144
155
  color: var(--smrt-color-error);
145
156
  border-color: var(--smrt-color-error);
146
157
  }
147
158
  }
159
+
148
160
  </style>
@@ -42,23 +42,26 @@ const _variant = $derived.by(() => {
42
42
  </script>
43
43
 
44
44
  <Badge variant={_variant} {size}>
45
- <span class="type-badge">
46
- <span class="type-icon">{type === 'email' ? '✉' : type === 'tweet' ? '𝕏' : type === 'slack' ? '#' : '✉'}</span>
45
+ <span class="smrt-message-type-badge__label" data-smrt-part="label">
46
+ <span class="smrt-message-type-badge__icon" data-smrt-part="icon">{type === 'email' ? '✉' : type === 'tweet' ? '𝕏' : type === 'slack' ? '#' : '✉'}</span>
47
47
  {_label}
48
48
  </span>
49
49
  </Badge>
50
50
 
51
51
  <style>
52
52
  @layer smrt.reset, smrt.structure, smrt.theme;
53
- @layer smrt.theme {
54
- .type-badge {
53
+ @layer smrt.structure {
54
+ .smrt-message-type-badge__label {
55
55
  display: inline-flex;
56
56
  align-items: center;
57
57
  gap: 0.25rem;
58
58
  }
59
+ }
59
60
 
60
- .type-icon {
61
+ @layer smrt.theme {
62
+ .smrt-message-type-badge__icon {
61
63
  font-size: 0.85em;
62
64
  }
63
65
  }
66
+
64
67
  </style>
@@ -239,19 +239,19 @@ async function saveRoute() {
239
239
  }
240
240
  </script>
241
241
 
242
- <div class="messaging-settings" data-smrt-component="MessagingSettingsPanel">
242
+ <div class="smrt-messaging-settings-panel__root" data-smrt-component="MessagingSettingsPanel">
243
243
  <section>
244
244
  <header>
245
245
  <div><h3>{t(M['messages.messaging_settings.accounts_title'])}</h3><p>{t(M['messages.messaging_settings.accounts_description'])}</p></div>
246
246
  {#if !readonly && onSaveAccount}<Button size="sm" onclick={() => { reset(); openForm = 'account'; }}>{t(M['messages.messaging_settings.add_account'])}</Button>{/if}
247
247
  </header>
248
- <div class="items">
248
+ <div class="smrt-messaging-settings-panel__list" data-smrt-part="list">
249
249
  {#each accounts as account (account.id)}
250
250
  <Button class="item" type="button" onclick={() => editAccount(account)} disabled={readonly}>
251
251
  <span><strong>{account.name}</strong><small>{account.providerId} · {account.channel}</small></span>
252
- <span class:ok={account.hasCredentials}>{account.hasCredentials ? t(M['messages.messaging_settings.credentials_stored']) : t(M['messages.messaging_settings.credentials_missing'])}</span>
252
+ <span class:smrt-messaging-settings-panel__ok={account.hasCredentials} data-smrt-part="status">{account.hasCredentials ? t(M['messages.messaging_settings.credentials_stored']) : t(M['messages.messaging_settings.credentials_missing'])}</span>
253
253
  </Button>
254
- {:else}<p class="empty">{t(M['messages.messaging_settings.no_accounts'])}</p>{/each}
254
+ {:else}<p class="smrt-messaging-settings-panel__empty" data-smrt-part="empty">{t(M['messages.messaging_settings.no_accounts'])}</p>{/each}
255
255
  </div>
256
256
  </section>
257
257
 
@@ -260,13 +260,13 @@ async function saveRoute() {
260
260
  <div><h3>{t(M['messages.messaging_settings.destinations_title'])}</h3><p>{t(M['messages.messaging_settings.destinations_description'])}</p></div>
261
261
  {#if !readonly && onSaveEndpoint}<Button size="sm" onclick={() => { reset(); openForm = 'endpoint'; }}>{t(M['messages.messaging_settings.add_destination'])}</Button>{/if}
262
262
  </header>
263
- <div class="items">
263
+ <div class="smrt-messaging-settings-panel__list" data-smrt-part="list">
264
264
  {#each endpoints as endpoint (endpoint.id)}
265
265
  <Button class="item" type="button" onclick={() => replaceEndpoint(endpoint)} disabled={readonly}>
266
266
  <span><strong>{endpoint.label}</strong><small>{endpoint.channel}</small></span>
267
267
  <span>{endpoint.maskedAddress}</span>
268
268
  </Button>
269
- {:else}<p class="empty">{t(M['messages.messaging_settings.no_destinations'])}</p>{/each}
269
+ {:else}<p class="smrt-messaging-settings-panel__empty" data-smrt-part="empty">{t(M['messages.messaging_settings.no_destinations'])}</p>{/each}
270
270
  </div>
271
271
  </section>
272
272
 
@@ -275,13 +275,13 @@ async function saveRoute() {
275
275
  <div><h3>{t(M['messages.messaging_settings.routes_title'])}</h3><p>{t(M['messages.messaging_settings.routes_description'])}</p></div>
276
276
  {#if !readonly && onSaveRoute}<Button size="sm" onclick={() => { reset(); openForm = 'route'; }}>{t(M['messages.messaging_settings.add_route'])}</Button>{/if}
277
277
  </header>
278
- <div class="items">
278
+ <div class="smrt-messaging-settings-panel__list" data-smrt-part="list">
279
279
  {#each routes as route (route.id)}
280
280
  <Button class="item" type="button" onclick={() => editRoute(route)} disabled={readonly}>
281
281
  <span><strong>{route.purpose}</strong><small>{t(M['messages.messaging_settings.priority_value'], { priority: route.priority })}</small></span>
282
282
  <span>{accounts.find((account) => account.id === route.accountId)?.name ?? t(M['messages.messaging_settings.missing_account'])} → {endpoints.find((endpoint) => endpoint.id === route.endpointId)?.label ?? t(M['messages.messaging_settings.missing_destination'])}</span>
283
283
  </Button>
284
- {:else}<p class="empty">{t(M['messages.messaging_settings.no_routes'])}</p>{/each}
284
+ {:else}<p class="smrt-messaging-settings-panel__empty" data-smrt-part="empty">{t(M['messages.messaging_settings.no_routes'])}</p>{/each}
285
285
  </div>
286
286
  </section>
287
287
 
@@ -308,7 +308,7 @@ async function saveRoute() {
308
308
  {/if}
309
309
  {/each}
310
310
  <h4>{t(M['messages.messaging_settings.credentials'])}</h4>
311
- {#if accountId}<p class="secret-note">{t(M['messages.messaging_settings.credentials_note'])}</p>{/if}
311
+ {#if accountId}<p class="smrt-messaging-settings-panel__note" data-smrt-part="description">{t(M['messages.messaging_settings.credentials_note'])}</p>{/if}
312
312
  {#each activeAccountProvider.credentialFields as field (field.id)}
313
313
  <label for={`account-secret-${field.id}`}>{field.label}</label>
314
314
  {#if field.type === 'select'}
@@ -321,17 +321,17 @@ async function saveRoute() {
321
321
  {/if}
322
322
  {/each}
323
323
  {/if}
324
- <label class="checkbox">
324
+ <label class="smrt-messaging-settings-panel__field" data-smrt-part="field">
325
325
  <!-- raw-primitive-allow: native checkbox preserves checkbox semantics without requiring a Provider -->
326
326
  <input type="checkbox" bind:checked={accountActive} disabled={saving} />
327
327
  {t(M['messages.messaging_settings.account_active'])}
328
328
  </label>
329
- <div class="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving || !activeAccountProvider}>{t(M['messages.messaging_settings.save_account'])}</Button></div>
329
+ <div class="smrt-messaging-settings-panel__actions" data-smrt-part="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving || !activeAccountProvider}>{t(M['messages.messaging_settings.save_account'])}</Button></div>
330
330
  </Form>
331
331
  {:else if openForm === 'endpoint'}
332
332
  <Form class="editor" onsubmit={saveEndpoint}>
333
333
  <h3>{t(M[endpointId ? 'messages.messaging_settings.replace_destination_title' : 'messages.messaging_settings.add_destination_title'])}</h3>
334
- {#if endpointId}<p class="secret-note">{t(M['messages.messaging_settings.destination_note'])}</p>{/if}
334
+ {#if endpointId}<p class="smrt-messaging-settings-panel__note" data-smrt-part="description">{t(M['messages.messaging_settings.destination_note'])}</p>{/if}
335
335
  <label for="messaging-endpoint-label">{t(M['messages.messaging_settings.label'])}</label>
336
336
  <Input id="messaging-endpoint-label" bind:value={endpointLabel} required disabled={saving} />
337
337
  <label for="messaging-endpoint-provider">{t(M['messages.messaging_settings.provider'])}</label>
@@ -352,12 +352,12 @@ async function saveRoute() {
352
352
  {/if}
353
353
  {/each}
354
354
  {/if}
355
- <label class="checkbox">
355
+ <label class="smrt-messaging-settings-panel__field" data-smrt-part="field">
356
356
  <!-- raw-primitive-allow: native checkbox preserves checkbox semantics without requiring a Provider -->
357
357
  <input type="checkbox" bind:checked={endpointActive} disabled={saving} />
358
358
  {t(M['messages.messaging_settings.destination_active'])}
359
359
  </label>
360
- <div class="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving || !activeEndpointProvider}>{t(M['messages.messaging_settings.save_destination'])}</Button></div>
360
+ <div class="smrt-messaging-settings-panel__actions" data-smrt-part="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving || !activeEndpointProvider}>{t(M['messages.messaging_settings.save_destination'])}</Button></div>
361
361
  </Form>
362
362
  {:else if openForm === 'route'}
363
363
  <Form class="editor" onsubmit={saveRoute}>
@@ -376,35 +376,100 @@ async function saveRoute() {
376
376
  <Input id="messaging-route-purpose" bind:value={routePurpose} required disabled={saving} />
377
377
  <label for="messaging-route-priority">{t(M['messages.messaging_settings.priority'])}</label>
378
378
  <Input id="messaging-route-priority" type="number" bind:value={routePriority} disabled={saving} />
379
- <label class="checkbox">
379
+ <label class="smrt-messaging-settings-panel__field" data-smrt-part="field">
380
380
  <!-- raw-primitive-allow: native checkbox preserves checkbox semantics without requiring a Provider -->
381
381
  <input type="checkbox" bind:checked={routeEnabled} disabled={saving} />
382
382
  {t(M['messages.messaging_settings.route_enabled'])}
383
383
  </label>
384
- <div class="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving}>{t(M['messages.messaging_settings.save_route'])}</Button></div>
384
+ <div class="smrt-messaging-settings-panel__actions" data-smrt-part="actions"><Button variant="secondary" onclick={reset} disabled={saving}>{t(M['messages.messaging_settings.cancel'])}</Button><Button type="submit" disabled={saving}>{t(M['messages.messaging_settings.save_route'])}</Button></div>
385
385
  </Form>
386
386
  {/if}
387
387
 
388
- {#if error}<p class="error" role="alert">{error}</p>{/if}
388
+ {#if error}<p class="smrt-messaging-settings-panel__error" data-smrt-part="message" role="alert">{error}</p>{/if}
389
389
  </div>
390
390
 
391
391
  <style>
392
392
  @layer smrt.reset, smrt.structure, smrt.theme;
393
+ @layer smrt.structure {
394
+ .smrt-messaging-settings-panel__root {
395
+ display: grid;
396
+ gap: 1.5rem;
397
+ }
398
+ section {
399
+ display: grid;
400
+ gap: 0.75rem;
401
+ }
402
+ header {
403
+ display: flex;
404
+ align-items: start;
405
+ justify-content: space-between;
406
+ gap: 1rem;
407
+ }
408
+ h3, h4, p {
409
+ margin: 0;
410
+ }
411
+ .smrt-messaging-settings-panel__list {
412
+ display: grid;
413
+ gap: 0.5rem;
414
+ }
415
+ :global(.item) {
416
+ width: 100%;
417
+ display: flex;
418
+ justify-content: space-between;
419
+ align-items: center;
420
+ gap: 1rem;
421
+ padding: 0.875rem;
422
+ }
423
+ :global(.item:not(:disabled)) {
424
+ cursor: pointer;
425
+ }
426
+ :global(.item span:first-child) {
427
+ display: grid;
428
+ gap: 0.2rem;
429
+ }
430
+ :global(.editor) {
431
+ display: grid;
432
+ gap: 0.65rem;
433
+ padding: 1rem;
434
+ }
435
+ .smrt-messaging-settings-panel__field {
436
+ display: flex;
437
+ align-items: center;
438
+ gap: 0.5rem;
439
+ }
440
+ .smrt-messaging-settings-panel__actions {
441
+ display: flex;
442
+ justify-content: flex-end;
443
+ gap: 0.5rem;
444
+ margin-top: 0.5rem;
445
+ }
446
+ }
447
+
393
448
  @layer smrt.theme {
394
- .messaging-settings { display: grid; gap: 1.5rem; }
395
- section { display: grid; gap: 0.75rem; }
396
- header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
397
- h3, h4, p { margin: 0; }
398
- header p, small, .secret-note, .empty { color: var(--smrt-color-on-surface-variant); }
399
- .items { display: grid; gap: 0.5rem; }
400
- :global(.item) { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.875rem; text-align: left; background: var(--smrt-color-surface); color: inherit; border: var(--smrt-hairline); border-radius: 0.5rem; }
401
- :global(.item:not(:disabled)) { cursor: pointer; }
402
- :global(.item span:first-child) { display: grid; gap: 0.2rem; }
403
- .ok { color: var(--smrt-color-success); }
404
- :global(.editor) { display: grid; gap: 0.65rem; padding: 1rem; border: var(--smrt-hairline); border-radius: 0.5rem; background: var(--smrt-color-surface-container-low); }
405
- label { font-weight: var(--smrt-typography-weight-semibold, 600); }
406
- .checkbox { display: flex; align-items: center; gap: 0.5rem; }
407
- .actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
408
- .error { color: var(--smrt-color-error); }
449
+ header p, small, .smrt-messaging-settings-panel__note, .smrt-messaging-settings-panel__empty {
450
+ color: var(--smrt-color-on-surface-variant);
451
+ }
452
+ :global(.item) {
453
+ text-align: left;
454
+ background: var(--smrt-color-surface);
455
+ color: inherit;
456
+ border: var(--smrt-hairline);
457
+ border-radius: 0.5rem;
458
+ }
459
+ .smrt-messaging-settings-panel__ok {
460
+ color: var(--smrt-color-success);
461
+ }
462
+ :global(.editor) {
463
+ border: var(--smrt-hairline);
464
+ border-radius: 0.5rem;
465
+ background: var(--smrt-color-surface-container-low);
466
+ }
467
+ label {
468
+ font-weight: var(--smrt-typography-weight-semibold, 600);
469
+ }
470
+ .smrt-messaging-settings-panel__error {
471
+ color: var(--smrt-color-error);
472
+ }
409
473
  }
474
+
410
475
  </style>
@@ -62,12 +62,12 @@ export interface Props {
62
62
  }
63
63
  </script>
64
64
 
65
- <div class="recipient-input" data-smrt-component="RecipientInput">
66
- <label class="label" for={inputId}>{label}</label>
67
- <div class="chips-container">
65
+ <div class="smrt-recipient-input__root" data-smrt-component="RecipientInput">
66
+ <label class="smrt-recipient-input__label" data-smrt-part="label" for={inputId}>{label}</label>
67
+ <div class="smrt-recipient-input__body" data-smrt-part="body">
68
68
  {#each recipients as recipient, i}
69
- <span class="chip" class:invalid={!recipient.isValid}>
70
- <span class="chip-text">{recipient.name || recipient.address}</span>
69
+ <span class="smrt-recipient-input__chip" class:smrt-recipient-input__invalid={!recipient.isValid} data-smrt-part="badge">
70
+ <span class="smrt-recipient-input__chip-title" data-smrt-part="label">{recipient.name || recipient.address}</span>
71
71
  <Button
72
72
  variant="ghost"
73
73
  size="sm"
@@ -90,91 +90,111 @@ export interface Props {
90
90
 
91
91
  <style>
92
92
  @layer smrt.reset, smrt.structure, smrt.theme;
93
- @layer smrt.theme {
94
- .recipient-input {
93
+ @layer smrt.structure {
94
+ .smrt-recipient-input__root {
95
95
  display: flex;
96
96
  align-items: flex-start;
97
97
  gap: var(--smrt-spacing-2);
98
98
  padding: var(--smrt-spacing-1) 0;
99
- border-bottom: var(--smrt-hairline);
100
99
  }
101
-
102
- .label {
103
- font-family: var(--smrt-font-family, system-ui);
104
- font-size: var(--smrt-typography-label-large-size);
105
- color: var(--smrt-color-on-surface-variant);
100
+ .smrt-recipient-input__label {
106
101
  padding-top: var(--smrt-spacing-2);
107
102
  min-width: 32px;
108
103
  }
109
-
110
- .chips-container {
104
+ .smrt-recipient-input__body {
111
105
  display: flex;
112
106
  flex-wrap: wrap;
113
107
  gap: var(--smrt-spacing-1);
114
108
  flex: 1;
115
109
  align-items: center;
116
110
  }
117
-
118
- .chip {
111
+ .smrt-recipient-input__chip {
119
112
  display: inline-flex;
120
113
  align-items: center;
121
114
  gap: var(--smrt-spacing-1);
122
115
  padding: var(--smrt-spacing-1) var(--smrt-spacing-1) var(--smrt-spacing-1) var(--smrt-spacing-2);
116
+ }
117
+ /*
118
+ * The chip remove button now renders through smrt-ui's <Button variant="ghost">.
119
+ * `.smrt-recipient-input__body :global(.chip-remove)` anchors on the real `.smrt-recipient-input__body`
120
+ * element and pierces the Button child scope to keep the compact icon styling.
121
+ * `color: inherit` keeps it matching the chip text color (including the invalid
122
+ * chip's error color) — issue #1589.
123
+ */
124
+ .smrt-recipient-input__body :global(.chip-remove) {
125
+ padding: 0 var(--smrt-spacing-1);
126
+ }
127
+ /*
128
+ * The chip-bar field now renders through smrt-ui's <Input>. This is a naked,
129
+ * borderless inline field that sits among the recipient chips, so
130
+ * `.smrt-recipient-input__body :global(.recipient-field)` pierces the Input child scope to
131
+ * strip the primitive's border / background / block padding / focus box-shadow
132
+ * and restore the flush inline look (issue #1589).
133
+ */
134
+ .smrt-recipient-input__body :global(.recipient-field) {
135
+ flex: 1;
136
+ min-width: 120px;
137
+ padding: var(--smrt-spacing-1) 0;
138
+ }
139
+ }
140
+
141
+ @layer smrt.theme {
142
+ .smrt-recipient-input__root {
143
+ border-bottom: var(--smrt-hairline);
144
+ }
145
+ .smrt-recipient-input__label {
146
+ font-family: var(--smrt-font-family, system-ui);
147
+ font-size: var(--smrt-typography-label-large-size);
148
+ color: var(--smrt-color-on-surface-variant);
149
+ }
150
+ .smrt-recipient-input__chip {
123
151
  border-radius: var(--smrt-radius-sm);
124
152
  background: var(--smrt-color-secondary-container);
125
153
  color: var(--smrt-color-on-secondary-container);
126
154
  font-size: var(--smrt-typography-label-large-size);
127
155
  font-family: var(--smrt-font-family, system-ui);
128
156
  }
129
-
130
- .chip.invalid {
157
+ .smrt-recipient-input__chip.smrt-recipient-input__invalid {
131
158
  background: var(--smrt-color-error-container);
132
159
  color: var(--smrt-color-on-error-container);
133
160
  }
134
-
135
161
  /*
136
- * The chip remove button now renders through smrt-ui's <Button variant="ghost">.
137
- * `.chips-container :global(.chip-remove)` anchors on the real `.chips-container`
138
- * element and pierces the Button child scope to keep the compact icon styling.
139
- * `color: inherit` keeps it matching the chip text color (including the invalid
140
- * chip's error color) — issue #1589.
141
- */
142
- .chips-container :global(.chip-remove) {
162
+ * The chip remove button now renders through smrt-ui's <Button variant="ghost">.
163
+ * `.smrt-recipient-input__body :global(.chip-remove)` anchors on the real `.smrt-recipient-input__body`
164
+ * element and pierces the Button child scope to keep the compact icon styling.
165
+ * `color: inherit` keeps it matching the chip text color (including the invalid
166
+ * chip's error color) — issue #1589.
167
+ */
168
+ .smrt-recipient-input__body :global(.chip-remove) {
143
169
  background: none;
144
170
  border: none;
145
- padding: 0 var(--smrt-spacing-1);
146
171
  font-size: var(--smrt-typography-label-large-size);
147
172
  color: inherit;
148
173
  opacity: 0.7;
149
174
  }
150
-
151
- .chips-container :global(.chip-remove):hover {
175
+ .smrt-recipient-input__body :global(.chip-remove):hover {
152
176
  opacity: 1;
153
177
  }
154
-
155
178
  /*
156
- * The chip-bar field now renders through smrt-ui's <Input>. This is a naked,
157
- * borderless inline field that sits among the recipient chips, so
158
- * `.chips-container :global(.recipient-field)` pierces the Input child scope to
159
- * strip the primitive's border / background / block padding / focus box-shadow
160
- * and restore the flush inline look (issue #1589).
161
- */
162
- .chips-container :global(.recipient-field) {
163
- flex: 1;
164
- min-width: 120px;
179
+ * The chip-bar field now renders through smrt-ui's <Input>. This is a naked,
180
+ * borderless inline field that sits among the recipient chips, so
181
+ * `.smrt-recipient-input__body :global(.recipient-field)` pierces the Input child scope to
182
+ * strip the primitive's border / background / block padding / focus box-shadow
183
+ * and restore the flush inline look (issue #1589).
184
+ */
185
+ .smrt-recipient-input__body :global(.recipient-field) {
165
186
  border: none;
166
187
  outline: none;
167
188
  box-shadow: none;
168
189
  font-family: var(--smrt-font-family, system-ui);
169
190
  font-size: var(--smrt-typography-body-medium-size);
170
- padding: var(--smrt-spacing-1) 0;
171
191
  background: transparent;
172
192
  color: var(--smrt-color-on-surface);
173
193
  }
174
-
175
- .chips-container :global(.recipient-field):focus {
194
+ .smrt-recipient-input__body :global(.recipient-field):focus {
176
195
  border: none;
177
196
  box-shadow: none;
178
197
  }
179
198
  }
199
+
180
200
  </style>