@happyvertical/smrt-assets 0.60.16 → 0.60.18

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.
@@ -106,11 +106,11 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
106
106
  }
107
107
  </script>
108
108
 
109
- <div class="asset-list" class:asset-list--loading={loading} data-smrt-component="AssetList">
110
- <table class="list-table">
111
- <thead class="list-table__head">
109
+ <div class="smrt-asset-list__root" class:smrt-asset-list__loading={loading} data-smrt-component="AssetList">
110
+ <table class="smrt-asset-list__table" data-smrt-part="list">
111
+ <thead class="smrt-asset-list__head" data-smrt-part="header">
112
112
  <tr>
113
- <th class="col-checkbox">
113
+ <th class="smrt-asset-list__col-checkbox" data-smrt-part="cell">
114
114
  <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
115
115
  <input
116
116
  type="checkbox"
@@ -120,36 +120,36 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
120
120
  aria-label={t(M['assets.asset_list.select_all'])}
121
121
  />
122
122
  </th>
123
- <th class="col-thumb">Preview</th>
124
- <th class="col-name">
125
- <Button variant="ghost" size="sm" class="sort-btn" onclick={() => handleSort('name')}>
126
- Name <span class="sort-indicator">{getSortIndicator('name')}</span>
123
+ <th class="smrt-asset-list__col-thumb" data-smrt-part="cell">Preview</th>
124
+ <th class="smrt-asset-list__col-name" data-smrt-part="cell">
125
+ <Button variant="ghost" size="sm" onclick={() => handleSort('name')}>
126
+ Name <span class="smrt-asset-list__sort-indicator" data-smrt-part="icon">{getSortIndicator('name')}</span>
127
127
  </Button>
128
128
  </th>
129
- <th class="col-type">Type</th>
130
- <th class="col-date">
131
- <Button variant="ghost" size="sm" class="sort-btn" onclick={() => handleSort('createdAt')}>
132
- Created <span class="sort-indicator">{getSortIndicator('createdAt')}</span>
129
+ <th class="smrt-asset-list__col-type" data-smrt-part="cell">Type</th>
130
+ <th class="smrt-asset-list__col-date" data-smrt-part="cell">
131
+ <Button variant="ghost" size="sm" onclick={() => handleSort('createdAt')}>
132
+ Created <span class="smrt-asset-list__sort-indicator" data-smrt-part="icon">{getSortIndicator('createdAt')}</span>
133
133
  </Button>
134
134
  </th>
135
- <th class="col-status">Status</th>
135
+ <th class="smrt-asset-list__col-status" data-smrt-part="cell">Status</th>
136
136
  </tr>
137
137
  </thead>
138
- <tbody class="list-table__body">
138
+ <tbody class="smrt-asset-list__body" data-smrt-part="body">
139
139
  {#if loading}
140
140
  <tr>
141
- <td colspan="6" class="cell-empty">
142
- <div class="asset-list__loading">
143
- <span class="spinner"></span>
141
+ <td colspan="6" class="smrt-asset-list__empty-cell" data-smrt-part="empty">
142
+ <div class="smrt-asset-list__loading-panel" data-smrt-part="status">
143
+ <span class="smrt-asset-list__spinner" data-smrt-part="spinner"></span>
144
144
  <span>{t(M['assets.asset_list.loading'])}</span>
145
145
  </div>
146
146
  </td>
147
147
  </tr>
148
148
  {:else if assets.length === 0}
149
149
  <tr>
150
- <td colspan="6" class="cell-empty">
151
- <div class="empty-state">
152
- <div class="empty-state__icon">
150
+ <td colspan="6" class="smrt-asset-list__empty-cell" data-smrt-part="empty">
151
+ <div class="smrt-asset-list__empty" data-smrt-part="empty">
152
+ <div class="smrt-asset-list__empty-icon" data-smrt-part="icon">
153
153
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
154
154
  <line x1="8" y1="6" x2="21" y2="6"></line>
155
155
  <line x1="8" y1="12" x2="21" y2="12"></line>
@@ -159,8 +159,8 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
159
159
  <line x1="3" y1="18" x2="3.01" y2="18"></line>
160
160
  </svg>
161
161
  </div>
162
- <p class="empty-state__title">{t(M['assets.asset_list.no_assets_found'])}</p>
163
- <p class="empty-state__desc">{t(M['assets.asset_list.empty_hint'])}</p>
162
+ <p class="smrt-asset-list__empty-title" data-smrt-part="title">{t(M['assets.asset_list.no_assets_found'])}</p>
163
+ <p class="smrt-asset-list__empty-desc" data-smrt-part="description">{t(M['assets.asset_list.empty_hint'])}</p>
164
164
  </div>
165
165
  </td>
166
166
  </tr>
@@ -168,10 +168,11 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
168
168
  {#each assets as asset (asset.id)}
169
169
  {@const selected = selectedIds.has(asset.id)}
170
170
  <tr
171
- class="list-table__row"
172
- class:list-table__row--selected={selected}
171
+ class="smrt-asset-list__row"
172
+ class:smrt-asset-list__row-selected={selected}
173
+ data-smrt-part="row"
173
174
  >
174
- <td class="col-checkbox">
175
+ <td class="smrt-asset-list__col-checkbox" data-smrt-part="cell">
175
176
  <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
176
177
  <input
177
178
  type="checkbox"
@@ -181,36 +182,36 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
181
182
  aria-label={t(M['assets.asset_list.select_named'], { name: asset.name })}
182
183
  />
183
184
  </td>
184
- <td class="col-thumb">
185
+ <td class="smrt-asset-list__col-thumb" data-smrt-part="cell">
185
186
  {#if isImage(asset) && asset.sourceUri}
186
- <img src={asset.sourceUri} alt={(asset as any).alt || asset.name} class="row-thumb" loading="lazy" />
187
+ <img src={asset.sourceUri} alt={(asset as any).alt || asset.name} class="smrt-asset-list__row-thumb" data-smrt-part="media" loading="lazy" />
187
188
  {:else}
188
- <span class="row-thumb-placeholder">{getTypeBadge(asset)}</span>
189
+ <span class="smrt-asset-list__row-thumb-placeholder" data-smrt-part="media">{getTypeBadge(asset)}</span>
189
190
  {/if}
190
191
  </td>
191
- <td class="col-name">
192
+ <td class="smrt-asset-list__col-name" data-smrt-part="cell">
192
193
  <!-- The name is the row's open action (a button, not a
193
194
  role="button" on the row nesting the checkbox, which avoids axe
194
195
  nested-interactive). -->
195
196
  <Button
196
197
  variant="ghost"
197
- class="row-name"
198
+ class="smrt-asset-list__row-name"
198
199
  onclick={() => onAssetClick(asset)}
199
200
  >
200
201
  {asset.name || 'Untitled'}
201
202
  </Button>
202
203
  {#if asset.description}
203
- <span class="row-desc">{asset.description}</span>
204
+ <span class="smrt-asset-list__row-desc" data-smrt-part="body">{asset.description}</span>
204
205
  {/if}
205
206
  </td>
206
- <td class="col-type">
207
- <span class="type-badge">{getTypeBadge(asset)}</span>
207
+ <td class="smrt-asset-list__col-type" data-smrt-part="cell">
208
+ <span class="smrt-asset-list__type-badge" data-smrt-part="badge">{getTypeBadge(asset)}</span>
208
209
  </td>
209
- <td class="col-date">
210
+ <td class="smrt-asset-list__col-date" data-smrt-part="cell">
210
211
  {formatDate(asset.createdAt)}
211
212
  </td>
212
- <td class="col-status">
213
- <span class="status-dot" class:status-dot--active={asset.statusSlug === 'active' || asset.statusSlug === 'published'}></span>
213
+ <td class="smrt-asset-list__col-status" data-smrt-part="cell">
214
+ <span class="smrt-asset-list__status-dot" class:smrt-asset-list__status-dot-active={asset.statusSlug === 'active' || asset.statusSlug === 'published'} data-smrt-part="status"></span>
214
215
  {asset.statusSlug || 'draft'}
215
216
  </td>
216
217
  </tr>
@@ -222,137 +223,177 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
222
223
 
223
224
  <style>
224
225
  @layer smrt.reset, smrt.structure, smrt.theme;
225
- @layer smrt.theme {
226
- .asset-list {
226
+ @layer smrt.structure {
227
+ .smrt-asset-list__root {
227
228
  overflow-x: auto;
228
229
  }
229
-
230
- .asset-list--loading {
231
- opacity: 0.6;
230
+ /* Loading state blocks interaction while a fetch is in flight. */
231
+ .smrt-asset-list__loading {
232
232
  pointer-events: none;
233
233
  }
234
-
235
- .list-table {
234
+ .smrt-asset-list__table {
236
235
  width: 100%;
236
+ }
237
+ .smrt-asset-list__head th {
238
+ padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
239
+ white-space: nowrap;
240
+ }
241
+ .smrt-asset-list__row td {
242
+ padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
243
+ }
244
+ .smrt-asset-list__col-checkbox {
245
+ width: 40px;
246
+ }
247
+ .smrt-asset-list__col-checkbox input {
248
+ width: 16px;
249
+ height: 16px;
250
+ cursor: pointer;
251
+ }
252
+ .smrt-asset-list__col-thumb {
253
+ width: 48px;
254
+ }
255
+ .smrt-asset-list__row-thumb {
256
+ width: 40px;
257
+ height: 40px;
258
+ object-fit: cover;
259
+ }
260
+ .smrt-asset-list__row-thumb-placeholder {
261
+ display: flex;
262
+ align-items: center;
263
+ justify-content: center;
264
+ width: 40px;
265
+ height: 40px;
266
+ }
267
+ .smrt-asset-list__col-name {
268
+ min-width: 150px;
269
+ }
270
+ /* The row name renders via <Button> (issue #1589). The overrides reset it to
271
+ inline name text and must reach the child-rendered <button> through :global()
272
+ scoping. */
273
+ .smrt-asset-list__col-name :global(.smrt-asset-list__row-name) {
274
+ display: block;
275
+ white-space: nowrap;
276
+ overflow: hidden;
277
+ text-overflow: ellipsis;
278
+ max-width: 250px;
279
+ /* Reset the open-action button so it renders as the row's name text. */
280
+ margin: 0;
281
+ padding: 0;
282
+ cursor: pointer;
283
+ }
284
+ .smrt-asset-list__row-desc {
285
+ display: block;
286
+ white-space: nowrap;
287
+ overflow: hidden;
288
+ text-overflow: ellipsis;
289
+ max-width: 250px;
290
+ }
291
+ .smrt-asset-list__type-badge {
292
+ display: inline-block;
293
+ padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
294
+ }
295
+ .smrt-asset-list__col-date {
296
+ white-space: nowrap;
297
+ }
298
+ .smrt-asset-list__col-status {
299
+ white-space: nowrap;
300
+ }
301
+ .smrt-asset-list__status-dot {
302
+ display: inline-block;
303
+ width: 8px;
304
+ height: 8px;
305
+ margin-right: var(--smrt-spacing-1);
306
+ }
307
+ /* Sort — renders via <Button> (issue #1589). Overrides reset it to an inline
308
+ header-text button and reach the child <button> via :global(). */
309
+ .smrt-asset-list__head :global([data-smrt-component="Button"]) {
310
+ gap: var(--smrt-spacing-1);
311
+ padding: 0;
312
+ }
313
+ /* Loading / Empty */
314
+ .smrt-asset-list__loading-panel {
315
+ display: flex;
316
+ align-items: center;
317
+ justify-content: center;
318
+ gap: var(--smrt-spacing-2, 0.5rem);
319
+ padding: var(--smrt-spacing-8, 2rem);
320
+ }
321
+ .smrt-asset-list__spinner {
322
+ width: 20px;
323
+ height: 20px;
324
+ }
325
+ }
326
+
327
+ @layer smrt.theme {
328
+ .smrt-asset-list__loading {
329
+ opacity: 0.6;
330
+ }
331
+ .smrt-asset-list__table {
237
332
  border-collapse: collapse;
238
333
  font-size: var(--smrt-typography-body-medium-size, 0.875rem);
239
334
  color: var(--smrt-color-on-surface);
240
335
  }
241
-
242
- .list-table__head {
336
+ .smrt-asset-list__head {
243
337
  background: var(--smrt-color-surface-container);
244
338
  }
245
-
246
- .list-table__head tr {
339
+ .smrt-asset-list__head tr {
247
340
  border-bottom: var(--smrt-hairline);
248
341
  }
249
-
250
- .list-table__head th {
251
- padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
342
+ .smrt-asset-list__head th {
252
343
  text-align: left;
253
344
  font-weight: var(--smrt-typography-weight-semibold, 600);
254
- white-space: nowrap;
255
345
  color: var(--smrt-color-on-surface);
256
346
  }
257
-
258
- .list-table__row {
347
+ .smrt-asset-list__row {
259
348
  border-bottom: var(--smrt-hairline);
260
349
  transition: background 150ms ease;
261
350
  }
262
-
263
- .list-table__row:hover {
351
+ .smrt-asset-list__row:hover {
264
352
  background: var(--smrt-color-surface-container-low);
265
353
  }
266
-
267
354
  /* Doubled class: ties :hover above on specificity and wins by source order. */
268
- .list-table__row.list-table__row--selected {
355
+ .smrt-asset-list__row.smrt-asset-list__row-selected {
269
356
  background: var(--smrt-color-primary-container);
270
357
  }
271
-
272
- .list-table__row td {
273
- padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
358
+ .smrt-asset-list__row td {
274
359
  vertical-align: middle;
275
360
  }
276
-
277
- .col-checkbox {
278
- width: 40px;
361
+ .smrt-asset-list__col-checkbox {
279
362
  text-align: center;
280
363
  }
281
-
282
- .col-checkbox input {
283
- width: 16px;
284
- height: 16px;
285
- cursor: pointer;
364
+ .smrt-asset-list__col-checkbox input {
286
365
  accent-color: var(--smrt-color-primary);
287
366
  }
288
-
289
- .col-thumb {
290
- width: 48px;
291
- }
292
-
293
- .row-thumb {
294
- width: 40px;
295
- height: 40px;
296
- object-fit: cover;
367
+ .smrt-asset-list__row-thumb {
297
368
  border-radius: var(--smrt-radius-small, 0.25rem);
298
369
  }
299
-
300
- .row-thumb-placeholder {
301
- display: flex;
302
- align-items: center;
303
- justify-content: center;
304
- width: 40px;
305
- height: 40px;
370
+ .smrt-asset-list__row-thumb-placeholder {
306
371
  background: var(--smrt-color-surface-container);
307
372
  border-radius: var(--smrt-radius-small, 0.25rem);
308
373
  font-size: var(--smrt-typography-label-small-size, 0.6rem);
309
374
  font-weight: var(--smrt-typography-weight-bold, 700);
310
375
  color: var(--smrt-color-on-surface-variant);
311
376
  }
312
-
313
- .col-name {
314
- min-width: 150px;
315
- }
316
-
317
- /* The row name renders via <Button class="row-name"> (issue #1589). The
318
- overrides reset it to inline name text and must reach the child-rendered
319
- <button> through :global() scoping. */
320
- .col-name :global(.row-name) {
321
- display: block;
377
+ /* The row name renders via <Button> (issue #1589). The overrides reset it to
378
+ inline name text and must reach the child-rendered <button> through :global()
379
+ scoping. */
380
+ .smrt-asset-list__col-name :global(.smrt-asset-list__row-name) {
322
381
  font-weight: var(--smrt-typography-weight-medium, 500);
323
- white-space: nowrap;
324
- overflow: hidden;
325
- text-overflow: ellipsis;
326
- max-width: 250px;
327
- /* Reset the open-action button so it renders as the row's name text. */
328
- margin: 0;
329
- padding: 0;
330
382
  border: none;
331
383
  background: none;
332
384
  font-family: inherit;
333
385
  font-size: inherit;
334
386
  color: inherit;
335
387
  text-align: left;
336
- cursor: pointer;
337
388
  }
338
-
339
- .col-name :global(.row-name:hover) {
389
+ .smrt-asset-list__col-name :global(.smrt-asset-list__row-name:hover) {
340
390
  text-decoration: underline;
341
391
  }
342
-
343
- .row-desc {
344
- display: block;
392
+ .smrt-asset-list__row-desc {
345
393
  font-size: var(--smrt-typography-body-small-size, 0.75rem);
346
394
  color: var(--smrt-color-on-surface-variant);
347
- white-space: nowrap;
348
- overflow: hidden;
349
- text-overflow: ellipsis;
350
- max-width: 250px;
351
395
  }
352
-
353
- .type-badge {
354
- display: inline-block;
355
- padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
396
+ .smrt-asset-list__type-badge {
356
397
  font-size: var(--smrt-typography-label-small-size, 0.65rem);
357
398
  font-weight: var(--smrt-typography-weight-bold, 700);
358
399
  text-transform: uppercase;
@@ -361,79 +402,56 @@ function setIndeterminate(node: HTMLInputElement, value: boolean) {
361
402
  border-radius: var(--smrt-radius-small, 0.25rem);
362
403
  letter-spacing: var(--smrt-typography-label-small-tracking, 0.05em);
363
404
  }
364
-
365
- .col-date {
366
- white-space: nowrap;
405
+ .smrt-asset-list__col-date {
367
406
  color: var(--smrt-color-on-surface-variant);
368
407
  }
369
-
370
- .col-status {
371
- white-space: nowrap;
408
+ .smrt-asset-list__col-status {
372
409
  text-transform: capitalize;
373
410
  }
374
-
375
- .status-dot {
376
- display: inline-block;
377
- width: 8px;
378
- height: 8px;
411
+ .smrt-asset-list__status-dot {
379
412
  border-radius: var(--smrt-radius-full);
380
413
  background: var(--smrt-color-outline);
381
- margin-right: var(--smrt-spacing-1);
382
414
  vertical-align: middle;
383
415
  }
384
-
385
- .status-dot--active {
416
+ .smrt-asset-list__status-dot-active {
386
417
  background: var(--smrt-color-success);
387
418
  }
388
-
389
- /* Sort — renders via <Button class="sort-btn"> (issue #1589). Overrides reset
390
- it to an inline header-text button and reach the child <button> via :global(). */
391
- .list-table__head :global(.sort-btn) {
392
- gap: var(--smrt-spacing-1);
393
- padding: 0;
419
+ /* Sort — renders via <Button> (issue #1589). Overrides reset it to an inline
420
+ header-text button and reach the child <button> via :global(). */
421
+ .smrt-asset-list__head :global([data-smrt-component="Button"]) {
394
422
  border: none;
395
423
  background: transparent;
396
424
  font: inherit;
397
425
  font-weight: var(--smrt-typography-weight-semibold, 600);
398
426
  color: inherit;
399
427
  }
400
-
401
- .list-table__head :global(.sort-btn:hover) {
428
+ .smrt-asset-list__head :global([data-smrt-component="Button"]:hover) {
402
429
  color: var(--smrt-color-primary);
403
430
  }
404
-
405
- .sort-indicator {
431
+ .smrt-asset-list__sort-indicator {
406
432
  font-size: var(--smrt-typography-label-medium-size, 0.75rem);
407
433
  opacity: 0.5;
408
434
  }
409
-
410
435
  /* Loading / Empty */
411
- .asset-list__loading {
412
- display: flex;
413
- align-items: center;
414
- justify-content: center;
415
- gap: var(--smrt-spacing-2, 0.5rem);
416
- padding: var(--smrt-spacing-8, 2rem);
436
+ .smrt-asset-list__loading-panel {
417
437
  color: var(--smrt-color-on-surface-variant);
418
438
  }
419
-
420
- .spinner {
421
- width: 20px;
422
- height: 20px;
439
+ .smrt-asset-list__spinner {
423
440
  border: 2px solid var(--smrt-color-outline-variant);
424
441
  border-top-color: var(--smrt-color-primary);
425
442
  border-radius: var(--smrt-radius-full);
426
443
  animation: spin 0.8s linear infinite;
427
444
  }
428
-
429
445
  @keyframes spin {
430
- to { transform: rotate(360deg); }
446
+ to {
447
+ transform: rotate(360deg);
448
+ }
431
449
  }
432
-
433
450
  @media (prefers-reduced-motion: reduce) {
434
- .spinner {
451
+ .smrt-asset-list__spinner {
435
452
  animation: none;
436
453
  }
437
454
  }
438
455
  }
456
+
439
457
  </style>
@@ -246,15 +246,15 @@ function handleManagerDrop(event: DragEvent) {
246
246
 
247
247
  <!-- svelte-ignore a11y_no_static_element_interactions -->
248
248
  <div
249
- class="asset-manager"
250
- class:asset-manager--drag-over={managerDragOver}
249
+ class="smrt-asset-manager__root"
250
+ class:smrt-asset-manager__drag-over={managerDragOver}
251
251
  onpaste={handlePaste}
252
252
  ondragover={handleManagerDragOver}
253
253
  ondragleave={handleManagerDragLeave}
254
254
  ondrop={handleManagerDrop} data-smrt-component="AssetManager"
255
255
  >
256
256
  {#if actionError}
257
- <p class="asset-manager__error" role="alert" aria-live="assertive">
257
+ <p class="smrt-asset-manager__error" data-smrt-part="error" role="alert" aria-live="assertive">
258
258
  {actionError}
259
259
  </p>
260
260
  {/if}
@@ -278,7 +278,7 @@ function handleManagerDrop(event: DragEvent) {
278
278
  />
279
279
 
280
280
  <!-- Main content area -->
281
- <div class="asset-manager__content">
281
+ <div class="smrt-asset-manager__content" data-smrt-part="body">
282
282
  {#if view === 'grid'}
283
283
  <AssetGrid
284
284
  {assets}
@@ -316,8 +316,8 @@ function handleManagerDrop(event: DragEvent) {
316
316
 
317
317
  <!-- Drag overlay indicator -->
318
318
  {#if managerDragOver}
319
- <div class="drag-overlay">
320
- <div class="drag-overlay__content">
319
+ <div class="smrt-asset-manager__drag-overlay" data-smrt-part="backdrop">
320
+ <div class="smrt-asset-manager__drag-overlay-content" data-smrt-part="body">
321
321
  <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
322
322
  <path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"></path>
323
323
  <polyline points="17 8 12 3 7 8"></polyline>
@@ -350,64 +350,75 @@ function handleManagerDrop(event: DragEvent) {
350
350
 
351
351
  <style>
352
352
  @layer smrt.reset, smrt.structure, smrt.theme;
353
- @layer smrt.theme {
354
- .asset-manager__error {
353
+ @layer smrt.structure {
354
+ .smrt-asset-manager__error {
355
355
  margin: 0 0 var(--smrt-spacing-2, 0.5rem);
356
356
  padding: var(--smrt-spacing-2, 0.5rem) var(--smrt-spacing-3, 0.75rem);
357
- border-radius: var(--smrt-radius-medium, 0.5rem);
358
- background: var(--smrt-color-error-container);
359
- color: var(--smrt-color-on-error-container);
360
- font-size: var(--smrt-typography-body-small-size, 0.8rem);
361
357
  }
362
-
363
- .asset-manager {
358
+ .smrt-asset-manager__root {
364
359
  position: relative;
365
360
  display: flex;
366
361
  flex-direction: column;
367
362
  height: 100%;
368
363
  min-height: 400px;
369
- background: var(--smrt-color-surface);
370
- border: var(--smrt-hairline);
371
- border-radius: var(--smrt-radius-large, 0.75rem);
372
364
  overflow: hidden;
373
- font-family: var(--smrt-font-family, inherit);
374
365
  }
375
-
376
- .asset-manager--drag-over {
377
- border-color: var(--smrt-color-primary);
378
- }
379
-
380
- .asset-manager__content {
366
+ .smrt-asset-manager__content {
381
367
  flex: 1;
382
368
  overflow-y: auto;
383
369
  }
384
-
385
370
  /* Drag overlay */
386
- .drag-overlay {
371
+ .smrt-asset-manager__drag-overlay {
387
372
  position: absolute;
388
373
  inset: 0;
389
374
  display: flex;
390
375
  align-items: center;
391
376
  justify-content: center;
392
- background: color-mix(in srgb, var(--smrt-color-primary) 8%, transparent);
393
- border: 2px dashed var(--smrt-color-primary);
394
- border-radius: var(--smrt-radius-large, 0.75rem);
395
377
  z-index: 10;
378
+ /* The overlay is a drop indicator only; keep pointer events on the manager
379
+ so dragover/drop stay attached to the root. */
396
380
  pointer-events: none;
397
381
  }
398
-
399
- .drag-overlay__content {
382
+ .smrt-asset-manager__drag-overlay-content {
400
383
  display: flex;
401
384
  flex-direction: column;
402
385
  align-items: center;
403
386
  gap: var(--smrt-spacing-2, 0.5rem);
387
+ }
388
+ .smrt-asset-manager__drag-overlay-content p {
389
+ margin: 0;
390
+ }
391
+ }
392
+
393
+ @layer smrt.theme {
394
+ .smrt-asset-manager__error {
395
+ border-radius: var(--smrt-radius-medium, 0.5rem);
396
+ background: var(--smrt-color-error-container);
397
+ color: var(--smrt-color-on-error-container);
398
+ font-size: var(--smrt-typography-body-small-size, 0.8rem);
399
+ }
400
+ .smrt-asset-manager__root {
401
+ background: var(--smrt-color-surface);
402
+ border: var(--smrt-hairline);
403
+ border-radius: var(--smrt-radius-large, 0.75rem);
404
+ font-family: var(--smrt-font-family, inherit);
405
+ }
406
+ .smrt-asset-manager__drag-over {
407
+ border-color: var(--smrt-color-primary);
408
+ }
409
+ /* Drag overlay */
410
+ .smrt-asset-manager__drag-overlay {
411
+ background: color-mix(in srgb, var(--smrt-color-primary) 8%, transparent);
412
+ border: 2px dashed var(--smrt-color-primary);
413
+ border-radius: var(--smrt-radius-large, 0.75rem);
414
+ }
415
+ .smrt-asset-manager__drag-overlay-content {
404
416
  color: var(--smrt-color-primary);
405
417
  font-weight: var(--smrt-typography-weight-medium, 500);
406
418
  }
407
-
408
- .drag-overlay__content p {
409
- margin: 0;
419
+ .smrt-asset-manager__drag-overlay-content p {
410
420
  font-size: var(--smrt-typography-body-large-size, 1.1rem);
411
421
  }
412
422
  }
423
+
413
424
  </style>