feat(media): add reusable MediaPickerComponent
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

Standalone dialog (app-dialog, size lg) reusing MediaLibraryFacade so it
shares the exact same asset list/search/pagination/upload state as the
Media Manager page. Emits (selected) with the chosen MediaAsset and
(closed) to dismiss - selecting a tile emits both.

Completes Sprint 4 (Media Manager): ADR-0002 contract, MediaRepository +
mock IndexedDB adapter, Media Manager UI, reusable Media Picker.

Not yet wired into Product Editor or Static Pages editor - that's the
next natural step when those features gain image fields, not part of
this sprint's scope.
This commit is contained in:
sdarbinyan
2026-07-15 07:20:42 +04:00
parent 5ffb353011
commit 9ab807342e
3 changed files with 172 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
.media-picker {
display: grid;
gap: 14px;
}
.media-picker__toolbar {
display: flex;
align-items: center;
gap: 8px;
}
.media-picker__grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 10px;
}
.media-picker__preview {
width: 100%;
height: 90px;
object-fit: cover;
border-radius: var(--radius-md, 6px);
background: var(--bg-secondary, #f4f4f5);
margin-bottom: 6px;
}
.media-picker__preview--file {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.6875rem;
color: var(--text-secondary, #6b7280);
text-align: center;
padding: 6px;
}
.media-picker__filename {
display: block;
font-size: 0.75rem;
color: var(--text-primary, #1f322d);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}