@coolms/ui-react 0.1.0-alpha.24 → 0.1.0-alpha.25

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to `@coolms/ui-react` are listed here. Versions follow [semantic versioning](https://semver.org/).
4
4
 
5
+ ## 0.1.0-alpha.25 (2026-11-22)
6
+
7
+ Mail rows at the list density tokens: two lines from tablet width up, three on a phone.
8
+
9
+ - `MailRow` by the list density rule: from tablet width up two lines (the sender and the time; the subject, then the muted preview on one cut line) at `--cms-list-row-height-two-line`; on a phone three lines from `--cms-list-row-height-phone-two-line`. The row's height is the token's, its padding only centres it.
10
+
5
11
  ## 0.1.0-alpha.24 (2026-11-22)
6
12
 
7
13
  Design tokens v0.13.0: the list density tokens, the list's density and columns parts, and the served icon list 0.7.0, every Workspace name in it drawn by the kit.
@@ -140,7 +140,11 @@ export interface MailRowLabels {
140
140
  readonly unread: string;
141
141
  }
142
142
  export declare const MAIL_ROW_LABELS: MailRowLabels;
143
- /** One message in a mailbox's list: who, what, the start of it, when; unread in bold with its dot. */
143
+ /**
144
+ * One message in a mailbox's list: who, what, the start of it, when; unread in bold with its dot. From tablet width up
145
+ * two lines (contract list, part density): the sender and the time, then the subject and the muted preview on one cut
146
+ * line, at the two-line row height; on a phone three lines, the preview on its own.
147
+ */
144
148
  export declare function MailRow({ from, subject, preview, time, unread, hasAttachment, selected, onOpen, labels }: MailRowProps): ReactNode;
145
149
  export interface ChatBubbleProps {
146
150
  /** Received from someone else, or sent by this account. */
package/dist/index.js CHANGED
@@ -1199,9 +1199,10 @@ function Jn({ from: n, subject: l, preview: t, time: o, unread: i, hasAttachment
1199
1199
  ] }),
1200
1200
  /* @__PURE__ */ u("span", { className: "cms-mail-row__line", children: [
1201
1201
  /* @__PURE__ */ e("span", { className: "cms-mail-row__subject", children: l }),
1202
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview cms-mail-row__preview--after", children: t }),
1202
1203
  i ? /* @__PURE__ */ e("span", { className: "cms-mail-row__dot", role: "img", "aria-label": _.unread }) : null
1203
1204
  ] }),
1204
- /* @__PURE__ */ e("span", { className: "cms-mail-row__preview", children: t })
1205
+ /* @__PURE__ */ e("span", { className: "cms-mail-row__preview cms-mail-row__preview--below", children: t })
1205
1206
  ] })
1206
1207
  ]
1207
1208
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolms/ui-react",
3
- "version": "0.1.0-alpha.24",
3
+ "version": "0.1.0-alpha.25",
4
4
  "description": "The CoolMS UI kit for React: the components of the CoolMS UI contract, styled by the CoolMS design tokens",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/kit.css CHANGED
@@ -459,9 +459,13 @@
459
459
  /* Mail row */
460
460
  .cms-mail-row {
461
461
  display: flex;
462
+ align-items: center;
462
463
  gap: var(--cms-space-3);
464
+ box-sizing: border-box;
463
465
  width: 100%;
464
- padding: var(--cms-space-4) var(--cms-space-5);
466
+ /* The row's height is the density token's; the padding only centres its two lines and its avatar in it. */
467
+ min-height: var(--cms-list-row-height-two-line);
468
+ padding: calc((var(--cms-list-row-height-two-line) - 40px) / 2) var(--cms-space-4);
465
469
  border: 0;
466
470
  border-bottom: 1px solid var(--cms-border-light);
467
471
  background: var(--cms-surface);
@@ -472,12 +476,14 @@
472
476
  }
473
477
  .cms-mail-row:hover { background: var(--cms-surface-muted); }
474
478
  .cms-mail-row.is-selected { background: var(--cms-row-selected); }
475
- .cms-mail-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
479
+ .cms-mail-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; line-height: 1.3; }
476
480
  .cms-mail-row__line { display: flex; align-items: center; gap: var(--cms-space-2); min-width: 0; }
477
481
  .cms-mail-row__from { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cms-text); font-size: var(--cms-font-size-body-lg); }
478
482
  .cms-mail-row__time { color: var(--cms-text-muted); font-size: var(--cms-font-size-meta); white-space: nowrap; }
479
- .cms-mail-row__subject { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cms-text); }
483
+ .cms-mail-row__subject { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cms-text); }
480
484
  .cms-mail-row__preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cms-text-muted); }
485
+ .cms-mail-row__preview--after { flex: 1 1 0; min-width: 0; }
486
+ .cms-mail-row__preview--below { display: none; }
481
487
  .cms-mail-row__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cms-accent); }
482
488
  .cms-mail-row.is-unread .cms-mail-row__from, .cms-mail-row.is-unread .cms-mail-row__subject { font-weight: var(--cms-font-weight-semibold); }
483
489
  .cms-mail-row .cms-icon { color: var(--cms-text-muted); }
@@ -607,6 +613,17 @@
607
613
  @media (max-width: 1199.98px) {
608
614
  .cms-viewer__icon, .cms-viewer__button { min-height: var(--cms-touch-target-min); min-width: var(--cms-touch-target-min); }
609
615
  }
616
+ /* A mail row on a phone: three lines (the sender and the time; the subject; the preview) in three sizes, 72px at the
617
+ default sizes, never shorter than the phone's two-line row and taller as the text grows. */
618
+ @media (max-width: 599.98px) {
619
+ .cms-mail-row { align-items: flex-start; min-height: var(--cms-list-row-height-phone-two-line); padding: 6px var(--cms-space-4); }
620
+ .cms-mail-row__body { line-height: 1.4; }
621
+ .cms-mail-row__from { font-size: var(--cms-font-size-body); }
622
+ .cms-mail-row__subject { flex: 1 1 auto; font-size: var(--cms-font-size-meta); }
623
+ .cms-mail-row__preview { font-size: var(--cms-font-size-label); }
624
+ .cms-mail-row__preview--after { display: none; }
625
+ .cms-mail-row__preview--below { display: block; }
626
+ }
610
627
  @media (max-width: 599.98px) {
611
628
  .cms-viewer__top { padding: 0 var(--cms-space-1); gap: var(--cms-space-1); }
612
629
  .cms-viewer__icon { width: var(--cms-touch-target-min); height: var(--cms-touch-target-min); }