feat(messaging-ui): Inbox domain — unified work items + mail (contract + UI + mock)
Second domain in the SDK, mirroring messaging's adapter/provider/hooks/components: - InboxAdapter (listInbox unified feed + transition + mailHistory/mailReply + optional directory/composeInternal/composeExternal), InboxProvider/useInboxAdapter - hooks: useInbox (filter + transition), useMailThread (history + reply), useCompose - <Inbox> (filter tabs, unified list, detail pane), <MailReader> (HTML in a sandboxed iframe + reply), compose modal (in-app / email); themeable styles - MockInboxAdapter (seeded mentions/needs-reply/alert + folded mail threads + directory) shipped from ./adapters/mock-inbox - 6 inbox tests (mock unify/transition/reply + render open/reply/compose); 64 green Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -556,6 +556,296 @@
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
}
|
||||
|
||||
/* ── Inbox ── */
|
||||
.miu-inbox {
|
||||
--miu-bg: #0e0e13;
|
||||
--miu-panel: #16161d;
|
||||
--miu-panel-2: #1d1d26;
|
||||
--miu-border: #262631;
|
||||
--miu-text: #e9e9ef;
|
||||
--miu-muted: #9a9aa7;
|
||||
--miu-accent: #fda913;
|
||||
--miu-accent-text: #1a1206;
|
||||
--miu-radius: 12px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
color: var(--miu-text);
|
||||
background: var(--miu-bg);
|
||||
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||||
font-size: 14px;
|
||||
}
|
||||
.miu-inbox-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
}
|
||||
.miu-inbox-filters {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
}
|
||||
.miu-tab {
|
||||
padding: 6px 12px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--miu-border);
|
||||
background: var(--miu-panel);
|
||||
color: var(--miu-text);
|
||||
font: inherit;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.miu-tab.is-active {
|
||||
background: var(--miu-accent);
|
||||
color: var(--miu-accent-text);
|
||||
border-color: var(--miu-accent);
|
||||
font-weight: 700;
|
||||
}
|
||||
.miu-inbox-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
}
|
||||
.miu-inbox-list {
|
||||
width: 340px;
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid var(--miu-border);
|
||||
background: var(--miu-panel);
|
||||
}
|
||||
.miu-inbox-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
padding: 12px 14px;
|
||||
border: none;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
}
|
||||
.miu-inbox-row:hover,
|
||||
.miu-inbox-row.is-active {
|
||||
background: var(--miu-panel-2);
|
||||
}
|
||||
.miu-inbox-glyph {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 7px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--miu-muted);
|
||||
background: var(--miu-panel-2);
|
||||
font-weight: 700;
|
||||
}
|
||||
.miu-inbox-main {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
.miu-inbox-row-top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
.miu-pill {
|
||||
flex-shrink: 0;
|
||||
font-size: 10.5px;
|
||||
font-weight: 700;
|
||||
padding: 1px 7px;
|
||||
border-radius: 999px;
|
||||
color: var(--miu-muted);
|
||||
background: var(--miu-panel-2);
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.miu-inbox-title {
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.miu-inbox-summary {
|
||||
color: var(--miu-muted);
|
||||
font-size: 12.5px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.miu-inbox-detail {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--miu-bg);
|
||||
}
|
||||
.miu-detail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
.miu-detail-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 6px;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
}
|
||||
.miu-detail-body {
|
||||
padding: 22px;
|
||||
}
|
||||
.miu-detail-title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.miu-detail-summary {
|
||||
color: var(--miu-muted);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
/* mail reader */
|
||||
.miu-mail {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
}
|
||||
.miu-mail-head {
|
||||
padding: 12px 18px;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
font-weight: 700;
|
||||
font-size: 15px;
|
||||
}
|
||||
.miu-mail-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.miu-mail-msg {
|
||||
border: 1px solid var(--miu-border);
|
||||
border-radius: var(--miu-radius);
|
||||
background: var(--miu-panel);
|
||||
overflow: hidden;
|
||||
}
|
||||
.miu-mail-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 7px 12px;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
font-size: 12px;
|
||||
color: var(--miu-muted);
|
||||
}
|
||||
.miu-mail-frame {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
border: none;
|
||||
background: #fff;
|
||||
}
|
||||
.miu-mail-text {
|
||||
padding: 12px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* compose modal */
|
||||
.miu-modal-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 100;
|
||||
background: rgba(2, 2, 6, 0.6);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
.miu-modal {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
max-height: 88vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--miu-border);
|
||||
border-radius: 16px;
|
||||
background: var(--miu-panel);
|
||||
color: var(--miu-text);
|
||||
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
||||
}
|
||||
.miu-modal-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 18px;
|
||||
border-bottom: 1px solid var(--miu-border);
|
||||
font-weight: 700;
|
||||
}
|
||||
.miu-modal-body {
|
||||
padding: 16px 18px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
.miu-modal-foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
padding: 14px 18px;
|
||||
border-top: 1px solid var(--miu-border);
|
||||
}
|
||||
.miu-compose-modes {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
.miu-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
.miu-field-lbl {
|
||||
font-size: 12.5px;
|
||||
font-weight: 600;
|
||||
color: var(--miu-muted);
|
||||
}
|
||||
.miu-textarea {
|
||||
resize: vertical;
|
||||
min-height: 90px;
|
||||
}
|
||||
.miu-people {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
max-height: 180px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.miu-person {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 7px 10px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.miu-person.is-active {
|
||||
background: var(--miu-panel-2);
|
||||
}
|
||||
.miu-person span:nth-of-type(1) {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* misc */
|
||||
.miu-empty {
|
||||
padding: 24px;
|
||||
|
||||
Reference in New Issue
Block a user