@apliteni/apliteni-ui 0.172.0 → 0.175.0

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.
@@ -563,8 +563,18 @@ must have a search field is a rule rather than a recommendation:
563
563
 
564
564
  A drawer is a panel against one edge of the screen. It appears over a scrim. It lets the reader
565
565
  look at or change one thing without leaving the list that opened it. **It groups by heading, never
566
- by card:** `drawerSection()` puts a heading above a `<dl>` of label and value pairs. A screen reader
567
- then hears each label with its value. The value stays beside its label instead of moving to the far
566
+ by card:** `DrawerSection` puts a heading over a `<dl>` of label and value pairs. A screen reader
567
+ then hears each label with its value. **Groups stand 32px apart, with no line between them.**
568
+ Each group heading stands on a 1px `--border` line, the same line as a table head. **A record can
569
+ lead with its key figure:** put a `<dl class="ui-drawer__figure">` in a group with no heading, as
570
+ the first group. Its `<dt>` is the label, and its `<dd>` holds a `.ui-drawer__figure-value`, set at
571
+ 22px (`--text-xl`), with a status badge beside it. The figure never breaks across lines.
572
+ **A table in a drawer group takes the drawer's 13px text.** Its head is semibold in strong ink, as
573
+ a group heading is. Its rows have no lines between them. A table that is not a hover table holds
574
+ its rows 8px apart. A hover table keeps its own row height, because its rows are targets. The
575
+ table stands on the drawer's ground, in light and in dark. Its first and last columns start and
576
+ end on the edges of the drawer's other text. A dense or zebra table keeps its own inset.
577
+ The value stays beside its label instead of moving to the far
568
578
  edge of the panel. A row whose value is a field or a dropdown lines its label up with the control's first line of text.
569
579
  This alignment happens by itself. There is no setting for it.
570
580
  Nothing inside a drawer draws a card, a row rule or an `<hr>`. Actions stay
@@ -1143,9 +1153,14 @@ a chosen or dropped file through `onFile` and renders the `file` you provide. **
1143
1153
  `status` is uploading**, so the kit never reports success unless you claim it. **A status the
1144
1154
  row draws includes a circled mark and a word**, because colour alone does not show status. When
1145
1155
  `progress` is provided, the track shows the status instead. `Remove` and `Retry` appear only
1146
- when you provide `onRemove` and `onRetry`. **No tier ever takes a second line:** the name
1147
- truncates its stem but keeps its extension. The full name is in a `title`. **One layout serves
1148
- every width.** **The drop target is painted only while a file is over the region. It covers
1156
+ when you provide `onRemove` and `onRetry`. **A file keeps the resting row's 32px height:** the
1157
+ name, the size, and the status or the track stand on one line, and `Remove` ends it. The track
1158
+ fills the free room on the line. The name gives way first: it truncates its stem but keeps its
1159
+ extension, and the full name is in a `title`. **One layout serves every width.** In a row of
1160
+ 352px or less, the size leaves the line, and a screen reader still reads it. A refused file
1161
+ shows its reason on the name's line. When the full name and the reason do not fit there, the
1162
+ reason moves under the name and the row grows by one line, to 61px. In a parent that sizes to its
1163
+ content, `FileDrop` is 420px wide, or narrower when the parent has less room. **The drop target is painted only while a file is over the region. It covers
1149
1164
  that region instead of joining it**, so the row stays in place while the reader aims. Children
1150
1165
  render above the row inside the same region. This lets one panel, or a whole page, become the
1151
1166
  target. A disabled drop never calls `preventDefault` on `dragover`, so it does not declare
@@ -8,10 +8,12 @@
8
8
 
9
9
  **Rule:** Put tables on a white surface in light mode and the base canvas in dark mode.
10
10
 
11
- **Do:** Mark a hovered row with an inset grey fill that leaves room at both ends of the row.
11
+ **Do:** Mark a hovered row with an inset grey fill, with room at both ends.
12
12
 
13
13
  **Don't:** Add a grey zebra.
14
14
 
15
+ **Except:** A table in a card or drawer group stands on that surface.
16
+
15
17
  ## Choose density without shrinking type
16
18
 
17
19
  <!-- rule: density -->
@@ -36,21 +36,21 @@
36
36
 
37
37
  **Why:** The drawer already provides the edge and raised surface, so cards add unnecessary boxes.
38
38
 
39
- **Do:** Use three groups, with a heading over each group’s rows and one line between groups.
39
+ **Do:** Lead with the key figure, then put a heading over each group.
40
40
 
41
- **Don't:** Put each group in a card inside the drawer.
41
+ **Don't:** Put each group in a card.
42
42
 
43
43
  ## Header and group dividers
44
44
 
45
45
  <!-- rule: three-lines -->
46
46
 
47
- **Rule:** Add lines below the header and between groups. Leave the footer unfilled and without a rule.
47
+ **Rule:** Add lines under the header and each group heading. Leave the footer unfilled and without a rule.
48
48
 
49
- **Why:** The header line marks the scrolling body; group lines separate content, and actions share the panel surface.
49
+ **Why:** The header line marks the scrolling body, heading lines match table heads, and actions share the panel surface.
50
50
 
51
- **Do:** Separate the header and groups.
51
+ **Do:** Hold groups apart with space.
52
52
 
53
- **Don't:** Add dividers between every row.
53
+ **Don't:** Add dividers between groups or rows.
54
54
 
55
55
  ## Spaced label rows
56
56
 
@@ -10,9 +10,9 @@
10
10
 
11
11
  **Do:** Put an Upload button and “PDF or CSV, up to 10 MB” on one line above the list they feed.
12
12
 
13
- **Don't:** Draw a tall dashed box with a glyph, an invitation and a button stacked inside it.
13
+ **Don't:** Draw a tall dashed box that stacks a glyph, an invitation and a button.
14
14
 
15
- **Except:** A page that exists to receive one file may use the field-sized picker, which has its own label. An empty page may show a dashed drop area until the first file arrives.
15
+ **Except:** A page that only receives one file may use the labelled field-sized picker. An empty page may show a dashed drop area until the first file arrives.
16
16
 
17
17
  ## Paint the target only while a file is over it
18
18
 
@@ -22,7 +22,7 @@
22
22
 
23
23
  **Why:** A target drawn before there is a file to catch covers content the reader still needs.
24
24
 
25
- **Do:** Cover the panel that accepts the file the moment the file crosses it.
25
+ **Do:** Cover the accepting panel as the file crosses it.
26
26
 
27
27
  **Don't:** Cover the whole window when one panel accepts the file.
28
28
 
@@ -32,25 +32,29 @@
32
32
 
33
33
  <!-- rule: in-the-row -->
34
34
 
35
- **Rule:** After the drop, the file's name, size and progress take the place the button was in, with remove on the name's line.
35
+ **Rule:** After the drop, the file's name, size and progress stand on one line where the button was, and remove ends it.
36
36
 
37
- **Why:** A row that changes in place keeps the page still during the upload.
37
+ **Why:** A row that keeps its height keeps the page still during the upload.
38
38
 
39
- **Do:** Put remove at the end of the name's line, the size under it, and the progress track below both.
39
+ **Do:** Put the name, the size and a track filling the free room on one line, then remove.
40
40
 
41
- **Don't:** Push the list down with a progress card, or open a dialog over the page.
41
+ **Don't:** Put the size or track under the name, or push the list down with a progress card.
42
+
43
+ **Except:** A narrow row drops the size, and cuts the name first but keeps its extension.
42
44
 
43
45
  ## Fail in place
44
46
 
45
47
  <!-- rule: failure -->
46
48
 
47
- **Rule:** A refused file keeps its place, says what it did wrong under its name, and offers Retry beside Remove.
49
+ **Rule:** A refused file keeps its place, says what went wrong on its name's line, and offers Retry beside Remove.
48
50
 
49
51
  **Why:** A row that drops the file sends the reader back to choosing one.
50
52
 
51
- **Do:** Keep the name on its line and say “Larger than 10 MB” under it, with Retry.
53
+ **Do:** Say “Larger than 10 MB” beside the name, with Retry.
54
+
55
+ **Except:** A reason that does not fit beside the name moves under it.
52
56
 
53
- **Don't:** Replace the row with “Upload failed”, losing both the file and the retry.
57
+ **Don't:** Replace the row with “Upload failed”, losing the file and the retry.
54
58
 
55
59
  ## Offer a button, not only a drag
56
60
 
@@ -60,7 +64,7 @@
60
64
 
61
65
  **Why:** A keyboard cannot drag a file.
62
66
 
63
- **Do:** Make the Upload button the control, reachable by keyboard and showing the focus ring.
67
+ **Do:** Make Upload the control, reachable by keyboard, with the focus ring.
64
68
 
65
69
  **Don't:** Write “Drag a file here” with nothing to press.
66
70
 
@@ -72,7 +76,7 @@
72
76
 
73
77
  **Why:** Repeated limits teach the reader to skip them.
74
78
 
75
- **Do:** Write “PDF or CSV, up to 10 MB” beside the button, and let a failure say what this file did wrong.
79
+ **Do:** Write “PDF or CSV, up to 10 MB” beside the button, and let a failure name this file's fault.
76
80
 
77
81
  **Don't:** Repeat the limits under the button, in a tooltip and again in the error.
78
82
 
@@ -86,4 +90,4 @@
86
90
 
87
91
  **Do:** Take a statement into the row under the statements it joins.
88
92
 
89
- **Don't:** Open a dialog for one file that the row behind it could have taken.
93
+ **Don't:** Open a dialog for one file the row could take.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.172.0",
3
+ "version": "0.175.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
package/react/README.md CHANGED
@@ -414,8 +414,10 @@ Set `redacted` on a row to display “Hidden” with an eye-off icon without ren
414
414
  the value. Below 560px, each label appears above its value, and the layout
415
415
  changes to one column.
416
416
 
417
- DrawerSection groups content under a heading and adds a hairline between adjacent
418
- sections. Its `headingLevel` defaults to 3. Import both the kit CSS and the React
417
+ DrawerSection groups content under a heading that stands on a thin line. Groups
418
+ stand apart by space. A section without a title has no heading and no line. Use it
419
+ for a lead figure (`ui-drawer__figure`) or for a table that names its own columns.
420
+ Its `headingLevel` defaults to 3. Import both the kit CSS and the React
419
421
  CSS. Use a table for figures that readers need to compare down a column.
420
422
 
421
423
  ```tsx
@@ -915,6 +915,10 @@
915
915
  .ui-drop {
916
916
  position: relative;
917
917
  }
918
+ .ui-drop:not(.ui-drop--area) {
919
+ display: grid;
920
+ grid-template-columns: minmax(0, 1fr);
921
+ }
918
922
  .ui-drop > * + .ui-drop__row {
919
923
  margin-top: var(--space-3);
920
924
  }
@@ -927,27 +931,36 @@
927
931
  font-size: var(--text-sm);
928
932
  color: var(--text);
929
933
  overflow-wrap: anywhere;
934
+ container-type: inline-size;
935
+ contain-intrinsic-inline-size: var(--panel-md);
930
936
  }
931
937
  .ui-drop__note {
932
938
  margin: 0;
933
939
  }
934
940
  .ui-drop__file {
935
- display: grid;
941
+ display: flex;
936
942
  flex: 1 1 auto;
937
- gap: var(--space-2);
943
+ align-items: flex-start;
944
+ gap: var(--space-3);
938
945
  min-width: 0;
939
946
  }
940
947
  .ui-drop__line {
941
948
  display: flex;
949
+ flex: 1 1 0;
942
950
  flex-wrap: nowrap;
943
951
  align-items: center;
944
- gap: var(--space-3);
952
+ gap: var(--space-2) var(--space-3);
945
953
  min-width: 0;
946
954
  }
955
+ .ui-drop__file--failed .ui-drop__line {
956
+ flex-wrap: wrap;
957
+ }
947
958
  .ui-drop__name {
948
959
  display: flex;
949
- flex: 1 1 auto;
960
+ flex: 0 999 auto;
961
+ align-items: center;
950
962
  min-width: var(--space-10);
963
+ min-height: var(--space-8);
951
964
  color: var(--strong);
952
965
  font-weight: var(--weight-medium);
953
966
  }
@@ -958,13 +971,7 @@
958
971
  }
959
972
  .ui-drop__ext {
960
973
  flex: none;
961
- }
962
- .ui-drop__facts {
963
- display: flex;
964
- flex-wrap: nowrap;
965
- align-items: center;
966
- gap: var(--space-3);
967
- min-width: 0;
974
+ white-space: nowrap;
968
975
  }
969
976
  .ui-drop__size {
970
977
  flex: none;
@@ -977,12 +984,27 @@
977
984
  flex: 0 1 auto;
978
985
  min-width: 0;
979
986
  }
987
+ @container (width <= 352px) {
988
+ .ui-drop__size {
989
+ position: absolute;
990
+ width: 1px;
991
+ height: 1px;
992
+ padding: 0;
993
+ overflow: hidden;
994
+ clip-path: inset(50%);
995
+ white-space: nowrap;
996
+ }
997
+ }
980
998
  .ui-drop__state {
981
999
  display: inline-flex;
982
- flex: 0 1 auto;
1000
+ flex: none;
983
1001
  align-items: center;
984
1002
  gap: var(--space-2);
985
1003
  min-width: 0;
1004
+ max-width: calc(100% - var(--space-10) - var(--space-3));
1005
+ }
1006
+ .ui-drop__file--failed .ui-drop__state {
1007
+ max-width: 100cqw;
986
1008
  }
987
1009
  .ui-drop__state svg {
988
1010
  width: 16px;
@@ -1002,7 +1024,8 @@
1002
1024
  }
1003
1025
  .ui-drop__bar {
1004
1026
  display: block;
1005
- width: 100%;
1027
+ flex: 1 1 0;
1028
+ min-width: var(--space-12);
1006
1029
  height: 6px;
1007
1030
  border-radius: var(--radius-pill);
1008
1031
  background: var(--surface-2);
@@ -4291,46 +4291,44 @@ function FileDrop({
4291
4291
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__stem", children: stem }),
4292
4292
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__ext", children: ext })
4293
4293
  ] }),
4294
- (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4295
- status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4296
- onRemove && /* @__PURE__ */ jsx36(
4297
- Button,
4298
- {
4299
- variant: "ghost",
4300
- size: "sm",
4301
- onClick: onRemove,
4302
- disabled,
4303
- children: removeLabel
4304
- }
4305
- )
4306
- ] })
4307
- ] }),
4308
- (showSize || showWord) && /* @__PURE__ */ jsxs32(
4309
- "div",
4310
- {
4311
- className: cx7("ui-drop__facts", status === "error" && "ui-drop__error"),
4312
- role: status === "error" ? "alert" : void 0,
4313
- children: [
4314
- showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4315
- showWord && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__state", children: [
4294
+ showSize && /* @__PURE__ */ jsx36("span", { className: "ui-drop__size", children: file.size }),
4295
+ showWord && /* @__PURE__ */ jsxs32(
4296
+ "span",
4297
+ {
4298
+ className: cx7("ui-drop__state", status === "error" && "ui-drop__error"),
4299
+ role: status === "error" ? "alert" : void 0,
4300
+ children: [
4316
4301
  /* @__PURE__ */ jsx36(Icon, { name: MARKS[status] }),
4317
4302
  /* @__PURE__ */ jsx36("span", { className: "ui-drop__word", title: word, children: word })
4318
- ] })
4319
- ]
4320
- }
4321
- ),
4322
- hasBar && /* @__PURE__ */ jsx36(
4323
- "span",
4324
- {
4325
- className: "ui-drop__bar",
4326
- role: "progressbar",
4327
- "aria-label": `${word} ${file.name}`,
4328
- "aria-valuenow": file.progress,
4329
- "aria-valuemin": 0,
4330
- "aria-valuemax": 100,
4331
- children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4332
- }
4333
- )
4303
+ ]
4304
+ }
4305
+ ),
4306
+ hasBar && /* @__PURE__ */ jsx36(
4307
+ "span",
4308
+ {
4309
+ className: "ui-drop__bar",
4310
+ role: "progressbar",
4311
+ "aria-label": `${word} ${file.name}`,
4312
+ "aria-valuenow": file.progress,
4313
+ "aria-valuemin": 0,
4314
+ "aria-valuemax": 100,
4315
+ children: /* @__PURE__ */ jsx36("span", { style: { width: `${file.progress}%` } })
4316
+ }
4317
+ )
4318
+ ] }),
4319
+ (onRemove || status === "error" && onRetry) && /* @__PURE__ */ jsxs32("span", { className: "ui-drop__actions", children: [
4320
+ status === "error" && onRetry && /* @__PURE__ */ jsx36(Button, { size: "sm", icon: "refresh", onClick: onRetry, disabled, children: retryLabel }),
4321
+ onRemove && /* @__PURE__ */ jsx36(
4322
+ Button,
4323
+ {
4324
+ variant: "ghost",
4325
+ size: "sm",
4326
+ onClick: onRemove,
4327
+ disabled,
4328
+ children: removeLabel
4329
+ }
4330
+ )
4331
+ ] })
4334
4332
  ] }) : /* @__PURE__ */ jsxs32(Fragment17, { children: [
4335
4333
  /* @__PURE__ */ jsx36(
4336
4334
  Button,
@@ -198,21 +198,19 @@
198
198
  }
199
199
 
200
200
  /* -- Groups and rows ------------------------------------------------------- */
201
- /* drawerSection(): a heading over label/value rows. The value sits beside its
201
+ /* DrawerSection: a heading over label/value rows. The value sits beside its
202
202
  label rather than at the far edge, so nothing has to lead the eye across the
203
- panel, and rows are held apart by space alone. Group from group is the one
204
- division inside the body worth a line; the body's padding insets it, so it
205
- parts the groups without cutting the panel in two.
203
+ panel, and rows are held apart by space alone. Groups stand apart by space too.
204
+ The one line inside the body stands under each group heading, the same hairline
205
+ as a table head, so a heading and a table head read as one kind of line.
206
206
  why: docs/components.md#the-drawer */
207
- .ui-drawer__section + .ui-drawer__section {
208
- margin-top: var(--space-6);
209
- padding-top: var(--space-6);
210
- border-top: 1px solid var(--border);
211
- }
207
+ .ui-drawer__section + .ui-drawer__section { margin-top: var(--space-8); }
212
208
  /* An h3, and it opts out of the display face for the reason .ui-drawer__title does.
213
209
  why: docs/foundations.md#typefaces */
214
210
  .ui-drawer__section-title {
215
211
  margin: 0 0 var(--space-2);
212
+ padding-bottom: var(--space-2);
213
+ border-bottom: 1px solid var(--border);
216
214
  font-family: var(--font-sans);
217
215
  font-size: var(--text-sm);
218
216
  /* Semibold, and so outside the rank table, which has nothing at this size and
@@ -221,6 +219,30 @@
221
219
  font-weight: var(--weight-semibold);
222
220
  color: var(--strong);
223
221
  }
222
+ /* The record's lead figure: a <dl> of one label over its value, with a status badge
223
+ beside the value. It stands in a group with no heading, before the other groups.
224
+ why: docs/components.md#the-drawer */
225
+ .ui-drawer__figure { margin: 0; }
226
+ .ui-drawer__figure > dt { color: var(--text); }
227
+ .ui-drawer__figure > dd {
228
+ display: flex;
229
+ flex-wrap: wrap;
230
+ align-items: center;
231
+ gap: var(--space-1) var(--space-3);
232
+ margin: var(--space-1) 0 0;
233
+ }
234
+ /* A figure is never broken across lines: `€` stays with its digits. */
235
+ .ui-drawer__figure-value {
236
+ color: var(--strong);
237
+ /* display: readout — a key figure is read as a number at a glance, not as a line of prose */
238
+ font-family: var(--font-display);
239
+ font-size: var(--text-xl);
240
+ font-weight: var(--weight-semibold);
241
+ line-height: var(--leading-tight);
242
+ letter-spacing: var(--tracking-tight);
243
+ font-variant-numeric: tabular-nums;
244
+ white-space: nowrap;
245
+ }
224
246
  .ui-drawer__rows {
225
247
  display: grid;
226
248
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
@@ -2,6 +2,11 @@
2
2
  * why: docs/components.md#react-file-drop */
3
3
  .ui-drop { position: relative; }
4
4
 
5
+ /* The row is a size container, so its content gives it no width. In a parent
6
+ that sizes to its content, the drop takes the row's stated width at most,
7
+ and less when the parent has less room. */
8
+ .ui-drop:not(.ui-drop--area) { display: grid; grid-template-columns: minmax(0, 1fr); }
9
+
5
10
  /* What the region accepts the file for, above the control. */
6
11
  .ui-drop > * + .ui-drop__row { margin-top: var(--space-3); }
7
12
 
@@ -16,46 +21,69 @@
16
21
  font-size: var(--text-sm);
17
22
  color: var(--text);
18
23
  overflow-wrap: anywhere;
24
+ /* The size query below reads the row's own width, not the window's. */
25
+ container-type: inline-size;
26
+ /* The width the row asks of a parent that sizes to its content: wider than
27
+ the size's 352px step, so a lone row still shows the size. */
28
+ contain-intrinsic-inline-size: var(--panel-md);
19
29
  }
20
30
 
21
31
  .ui-drop__note { margin: 0; }
22
32
 
23
- /* The file in hand is a stack, not a line: the name owns the top tier, what the
24
- page has a rule about sits under it, and the track runs the width below both.
25
- One line asked to carry all three truncates the name to nothing at 320. */
26
- .ui-drop__file { display: grid; flex: 1 1 auto; gap: var(--space-2); min-width: 0; }
33
+ /* The file in hand is one line at the resting row's height: the name, then what
34
+ the page has a rule about, then the actions. A file arriving moves nothing
35
+ under the row. */
36
+ .ui-drop__file { display: flex; flex: 1 1 auto; align-items: flex-start; gap: var(--space-3); min-width: 0; }
37
+
38
+ /* The name's line: the name, the size, and the status or the track. It never
39
+ wraps while the file uploads, so the name gives way by truncating. */
40
+ .ui-drop__line { display: flex; flex: 1 1 0; flex-wrap: nowrap; align-items: center; gap: var(--space-2) var(--space-3); min-width: 0; }
27
41
 
28
- /* The name tier. Never wraps: the actions stay on the name's line at every
29
- width, and the name gives way to them by truncating. */
30
- .ui-drop__line { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3); min-width: 0; }
42
+ /* A refused file's reason stands on the name's line while the full name and the
43
+ reason fit beside each other. When they do not, the reason takes a line of its
44
+ own under the name, and only then does the row grow. */
45
+ .ui-drop__file--failed .ui-drop__line { flex-wrap: wrap; }
31
46
 
32
47
  /* The extension is the half that says what kind of file this is, so the stem
33
- gives way and the tail never does — `frankfurt-settlement-state….pdf`, the
34
- way Finder, Drive and Dropbox cut a name. */
35
- .ui-drop__name { display: flex; flex: 1 1 auto; min-width: var(--space-10); color: var(--strong); font-weight: var(--weight-medium); }
48
+ gives way and the tail never does: `frankfurt-settlement-state….pdf`, the
49
+ way Finder, Drive and Dropbox cut a name. The name gives way before anything
50
+ else on its line, and it is as tall as the actions, so the actions close the
51
+ name's line when the reason sits under it. */
52
+ .ui-drop__name { display: flex; flex: 0 999 auto; align-items: center; min-width: var(--space-10); min-height: var(--space-8); color: var(--strong); font-weight: var(--weight-medium); }
36
53
  .ui-drop__stem { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
37
- .ui-drop__ext { flex: none; }
54
+ .ui-drop__ext { flex: none; white-space: nowrap; }
38
55
 
39
- /* The facts tier: the size while it uploads, the message when it fails. Never
40
- wraps either — a second tier of text here would be a third tier on the row. */
41
- .ui-drop__facts { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-3); min-width: 0; }
42
56
  .ui-drop__size { flex: none; white-space: nowrap; }
43
57
  .ui-drop__word { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
44
58
 
59
+ /* At a row of 352px or less, the size would cut the name to a few letters, so
60
+ it leaves the line. A screen reader still reads it, in the row's order. */
61
+ @container (width <= 352px) {
62
+ .ui-drop__size { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
63
+ }
64
+
45
65
  /* A status the track does not already draw is a circled mark and a word,
46
- because colour alone is not a status. */
47
- .ui-drop__state { display: inline-flex; flex: 0 1 auto; align-items: center; gap: var(--space-2); min-width: 0; }
66
+ because colour alone is not a status. It keeps its width while the name can
67
+ still give way, so it never shrinks first: it is cut only past the name's
68
+ own floor and the gap beside it. */
69
+ .ui-drop__state { display: inline-flex; flex: none; align-items: center; gap: var(--space-2); min-width: 0; max-width: calc(100% - var(--space-10) - var(--space-3)); }
70
+
71
+ /* A reason under the name has the row to itself, so it runs under the actions
72
+ too, as wide as the row. */
73
+ .ui-drop__file--failed .ui-drop__state { max-width: 100cqw; }
48
74
  .ui-drop__state svg { width: 16px; height: 16px; flex: none; stroke-width: 2.4; }
49
75
  .ui-drop__error { color: var(--pink); }
50
76
 
51
77
  /* Closes the name's line on the edge the content ends on, in every state. */
52
78
  .ui-drop__actions { display: flex; flex: none; align-items: stretch; gap: var(--space-2); margin-left: auto; } /* stretch: a small button sizes to its content, so a glyph and a bare label differ by 1px. #768 */
53
79
 
54
- /* The width of the row it reports on, so 40% reads as 40% rather than as a dash.
80
+ /* The track fills the room the name and the size leave on the line, and keeps
81
+ a length that still reads as a share of a whole when the name is cut.
55
82
  The ground is the kit's token for sunken tracks; --surface-3 was invisible. */
56
83
  .ui-drop__bar {
57
84
  display: block;
58
- width: 100%;
85
+ flex: 1 1 0;
86
+ min-width: var(--space-12);
59
87
  height: 6px;
60
88
  border-radius: var(--radius-pill);
61
89
  background: var(--surface-2); /* code-bg: inherit — a progress track holds no focus target. */
@@ -252,6 +252,8 @@
252
252
  chip's hand-off travels with it, so an identifier in a cell keeps the page rather than
253
253
  the card the cell is now painted with. why: src/tokens/tokens.css */
254
254
  .ui-card { --table-bg: var(--surface); --table-code-bg: var(--bg); }
255
+ /* A drawer group is a reading surface in the same way, so its table takes the drawer's ground. */
256
+ .ui-drawer .ui-drawer__section { --table-bg: var(--drawer-surface); --table-code-bg: var(--bg); }
255
257
 
256
258
  /* White in light, base canvas in dark; never a grey or tinted data surface. */
257
259
  .ui-table { background: var(--table-bg); }
@@ -606,6 +608,34 @@ a.ui-identity:hover { text-decoration: underline; }
606
608
  .ui-card > .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) { --cell-edge: var(--space-6); }
607
609
  /* In a frame, the side band holds space-1 of the card's text edge. */
608
610
  .ui-card > .ui-table-scroll > .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) { --cell-edge: calc(var(--space-6) - var(--space-1)); }
611
+ /* In a drawer group the table hangs out by its end-cell inset, into the body's padding, so
612
+ the first column starts on the edge of the group heading and the drawer title. */
613
+ .ui-drawer .ui-drawer__section > .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) {
614
+ width: calc(100% + 2 * var(--cell-edge));
615
+ max-width: none;
616
+ margin-inline: calc(-1 * var(--cell-edge));
617
+ }
618
+ /* A table in a drawer group takes the drawer body's 13px text. Its head is set as a group
619
+ heading is, semibold in strong ink on the same hairline, so the two read as one kind of
620
+ line. Its rows are held apart by space, as the drawer's pairs are, with no line between.
621
+ A hover table keeps its own row floor, because its rows are targets.
622
+ why: docs/components.md#the-drawer */
623
+ .ui-drawer .ui-drawer__section .ui-table thead th {
624
+ padding-bottom: var(--space-2);
625
+ font-weight: var(--weight-semibold);
626
+ color: var(--strong);
627
+ }
628
+ .ui-drawer .ui-drawer__section .ui-table :is(tbody, tfoot) :is(td, th) {
629
+ font-size: var(--text-sm);
630
+ border-bottom: 0;
631
+ }
632
+ .ui-drawer .ui-drawer__section .ui-table:not(.ui-table--hover) :is(tbody, tfoot) :is(td, th) { padding-block: var(--space-2); }
633
+ .ui-drawer .ui-drawer__section .ui-table:not(.ui-table--hover) tbody tr:first-child > :is(td, th) { padding-top: var(--space-3); }
634
+ /* --surface-3 barely steps off the raised drawer ground in dark, so a hovered row there takes
635
+ --surface, as a menu item does. Light keeps the grey. The drawer adds no weight, so a
636
+ checked row keeps its own stronger wash under the pointer. */
637
+ :where(.ui-drawer .ui-drawer__section) .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { background: var(--surface); }
638
+ :where(:root[data-theme="light"] .ui-drawer .ui-drawer__section) .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { background: var(--surface-3); }
609
639
 
610
640
  /* On a phone the cells pad by space-3 across and a card's end cells by space-4. A wide
611
641
  table scrolls under a finger, so the frame shows no scrollbar. 560px is the kit's phone
@@ -667,6 +667,10 @@
667
667
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { --code-bg: var(--surface); }
668
668
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:not(.is-target):has(> .ui-table__selection :checked) > :is(td, th),
669
669
  .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:not(.is-target):has(> .ui-table__selection :checked):hover > :is(td, th) { --code-bg: var(--table-bg); }
670
+ /* A hovered row in a drawer group takes --surface in dark, so a chip there keeps the page.
671
+ The drawer adds no weight, so a checked row keeps the hand-off above. */
672
+ :where(.ui-drawer .ui-drawer__section) .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { --code-bg: var(--bg); }
673
+ :where(:root[data-theme="light"] .ui-drawer .ui-drawer__section) .ui-table.ui-table--hover:not(.ui-table--zebra):not(.ui-table--dense) tbody tr:hover:not(.is-target) > :is(td, th) { --code-bg: var(--surface); }
670
674
  .ui-card--accent,
671
675
  .ui-card--live,
672
676
  .ui-snippet--reveal { --code-bg: var(--surface); }