@bigpixelrocket/uiok 0.1.3 → 0.2.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.
Files changed (146) hide show
  1. package/CHANGELOG.md +95 -1
  2. package/README.md +1 -1
  3. package/dist/activity/ActivityBar.d.ts +21 -8
  4. package/dist/activity/ActivityBar.js +15 -5
  5. package/dist/activity/activity.css +53 -6
  6. package/dist/button/Button.d.ts +10 -6
  7. package/dist/button/Button.js +6 -1
  8. package/dist/button/button.css +201 -33
  9. package/dist/charts/Line.logic.d.ts +6 -0
  10. package/dist/charts/Line.logic.js +9 -0
  11. package/dist/charts/LineChart.js +11 -4
  12. package/dist/charts/Pie.logic.d.ts +89 -1
  13. package/dist/charts/Pie.logic.js +272 -2
  14. package/dist/charts/PieChart.d.ts +2 -1
  15. package/dist/charts/PieChart.js +12 -5
  16. package/dist/charts/PieFill.d.ts +15 -0
  17. package/dist/charts/PieFill.js +33 -0
  18. package/dist/charts/ResultChart.d.ts +2 -2
  19. package/dist/charts/ResultChart.js +173 -47
  20. package/dist/charts/ResultChart.logic.d.ts +60 -4
  21. package/dist/charts/ResultChart.logic.js +105 -6
  22. package/dist/charts/Scatter.logic.d.ts +18 -4
  23. package/dist/charts/Scatter.logic.js +98 -22
  24. package/dist/charts/ScatterChart.js +19 -5
  25. package/dist/charts/charts.css +233 -116
  26. package/dist/charts/seriesColour.d.ts +2 -0
  27. package/dist/charts/seriesColour.js +1 -1
  28. package/dist/datetime/DateTimePicker.d.ts +12 -2
  29. package/dist/datetime/DateTimePicker.js +61 -16
  30. package/dist/datetime/DateTimePicker.logic.d.ts +29 -0
  31. package/dist/datetime/DateTimePicker.logic.js +25 -0
  32. package/dist/datetime/datetime.css +89 -49
  33. package/dist/dialog/ConfirmDialog.d.ts +69 -20
  34. package/dist/dialog/ConfirmDialog.js +39 -12
  35. package/dist/dialog/DialogLayer.d.ts +25 -0
  36. package/dist/dialog/DialogLayer.js +24 -0
  37. package/dist/dialog/DialogLegend.d.ts +2 -1
  38. package/dist/dialog/DialogLegend.js +10 -5
  39. package/dist/dialog/DialogLegend.logic.d.ts +15 -3
  40. package/dist/dialog/DialogLegend.logic.js +8 -4
  41. package/dist/dialog/DialogLists.d.ts +157 -0
  42. package/dist/dialog/DialogLists.js +137 -0
  43. package/dist/dialog/ModalDialog.d.ts +20 -15
  44. package/dist/dialog/ModalDialog.js +22 -7
  45. package/dist/dialog/dialog.css +570 -127
  46. package/dist/dialog/index.d.ts +7 -1
  47. package/dist/dialog/index.js +7 -1
  48. package/dist/field/Check.d.ts +15 -0
  49. package/dist/field/Check.js +23 -0
  50. package/dist/field/field.css +812 -0
  51. package/dist/field/index.d.ts +10 -0
  52. package/dist/field/index.js +10 -0
  53. package/dist/field/labelHelp.d.ts +33 -0
  54. package/dist/field/labelHelp.js +22 -0
  55. package/dist/filter/FilterIcon.js +2 -1
  56. package/dist/filter/filter.css +72 -20
  57. package/dist/grid/DataGrid.d.ts +8 -1
  58. package/dist/grid/DataGrid.js +115 -40
  59. package/dist/grid/DataGrid.logic.d.ts +15 -3
  60. package/dist/grid/DataGrid.logic.js +18 -5
  61. package/dist/grid/grid.css +481 -56
  62. package/dist/icon/Spinner.d.ts +16 -0
  63. package/dist/icon/Spinner.js +13 -0
  64. package/dist/icon/index.d.ts +5 -0
  65. package/dist/icon/index.js +5 -0
  66. package/dist/icon/sizes.d.ts +19 -0
  67. package/dist/icon/sizes.js +19 -0
  68. package/dist/index.d.ts +2 -0
  69. package/dist/index.js +2 -0
  70. package/dist/keychord/KeyChord.d.ts +12 -1
  71. package/dist/keychord/KeyChord.js +2 -2
  72. package/dist/keychord/index.d.ts +1 -1
  73. package/dist/keychord/keychord.css +87 -9
  74. package/dist/labels/dialog.d.ts +12 -1
  75. package/dist/labels/dialog.js +3 -1
  76. package/dist/labels/selectAll.d.ts +4 -4
  77. package/dist/labels/selectAll.js +1 -1
  78. package/dist/legend/KeyLegendStrip.js +1 -1
  79. package/dist/legend/legend.css +82 -57
  80. package/dist/listing/Listing.d.ts +17 -10
  81. package/dist/listing/Listing.js +33 -26
  82. package/dist/listing/listing.css +1665 -237
  83. package/dist/menu/menu.css +227 -67
  84. package/dist/menu/useBellBeat.js +2 -2
  85. package/dist/namecut/NameCut.d.ts +3 -1
  86. package/dist/namecut/NameCut.js +152 -5
  87. package/dist/namecut/NameCut.logic.d.ts +5 -3
  88. package/dist/namecut/NameCut.logic.js +20 -5
  89. package/dist/namecut/namecut.css +27 -7
  90. package/dist/pager/Pager.d.ts +12 -4
  91. package/dist/pager/Pager.js +21 -7
  92. package/dist/pager/pager.css +41 -30
  93. package/dist/palette/Palette.js +2 -1
  94. package/dist/palette/palette.css +121 -60
  95. package/dist/pane/PaneActions.d.ts +56 -14
  96. package/dist/pane/PaneActions.js +64 -16
  97. package/dist/pane/PaneFrame.d.ts +37 -5
  98. package/dist/pane/PaneFrame.js +246 -11
  99. package/dist/pane/index.d.ts +4 -2
  100. package/dist/pane/index.js +4 -2
  101. package/dist/pane/toolWords.d.ts +14 -0
  102. package/dist/pane/toolWords.js +26 -0
  103. package/dist/pane/useToolbarFit.d.ts +25 -0
  104. package/dist/pane/useToolbarFit.js +95 -0
  105. package/dist/run/RunHeader.d.ts +5 -3
  106. package/dist/run/RunHeader.js +11 -8
  107. package/dist/run/run.css +64 -79
  108. package/dist/segmented/SegmentedChoice.d.ts +18 -2
  109. package/dist/segmented/SegmentedChoice.js +18 -7
  110. package/dist/segmented/segmented.css +62 -22
  111. package/dist/selectall/SelectAllBar.d.ts +4 -3
  112. package/dist/selectall/SelectAllBar.js +4 -3
  113. package/dist/selectall/selectall.css +17 -12
  114. package/dist/shell/shell.css +1073 -0
  115. package/dist/styles.css +620 -22
  116. package/dist/surface/surface.css +154 -0
  117. package/dist/tabs/PageTabs.d.ts +10 -5
  118. package/dist/tabs/PageTabs.js +126 -37
  119. package/dist/tabs/tabs.css +131 -51
  120. package/dist/terminal/Terminal.js +3 -1
  121. package/dist/terminal/Terminal.logic.d.ts +5 -4
  122. package/dist/terminal/Terminal.logic.js +9 -4
  123. package/dist/terminal/TerminalMenu.d.ts +4 -1
  124. package/dist/terminal/TerminalMenu.js +12 -5
  125. package/dist/terminal/ghostty/contrast.logic.d.ts +45 -0
  126. package/dist/terminal/ghostty/contrast.logic.js +130 -0
  127. package/dist/terminal/ghostty/core.d.ts +6 -0
  128. package/dist/terminal/ghostty/renderer.d.ts +9 -2
  129. package/dist/terminal/ghostty/renderer.js +91 -14
  130. package/dist/terminal/ghostty/surface.d.ts +8 -0
  131. package/dist/terminal/ghostty/surface.js +27 -1
  132. package/dist/terminal/terminal.css +87 -61
  133. package/dist/text/text.css +16 -7
  134. package/dist/themes/catalog.js +4 -3
  135. package/dist/themes/themes.generated.css +1307 -264
  136. package/dist/themes/tokens.d.ts +69 -14
  137. package/dist/themes/tokens.js +920 -97
  138. package/dist/tokens.css +239 -0
  139. package/dist/tooltip/Tooltip.d.ts +6 -0
  140. package/dist/tooltip/Tooltip.js +48 -6
  141. package/dist/tooltip/Tooltip.logic.d.ts +89 -12
  142. package/dist/tooltip/Tooltip.logic.js +142 -20
  143. package/dist/tooltip/index.d.ts +1 -1
  144. package/dist/tooltip/index.js +1 -1
  145. package/dist/tooltip/tooltip.css +39 -9
  146. package/package.json +9 -3
@@ -4,48 +4,148 @@
4
4
  page, so nothing outside the dialog can be reached until it closes, the
5
5
  way a native sheet blocks its window. It paints nothing: a dialog is part
6
6
  of the context it asks about (the file being renamed, the record being
7
- added), so the page stays readable behind it. Only the box itself lifts. */
7
+ added), so the page stays readable behind it. Only the box itself lifts.
8
+
9
+ The backdrop keeps a margin round the box, so a tall dialog never meets
10
+ the window's edge. Its top margin is the hook --dialog-inset-top: a host
11
+ whose window draws its own title bar sets it to that bar's height plus a
12
+ margin, so no dialog ever covers the bar (the brand, the window
13
+ buttons). */
8
14
  .dialog-backdrop {
9
15
  position: fixed;
10
16
  inset: 0;
11
17
  /* Above any docked panel (--z-panel) so the panel cannot steal clicks. */
12
18
  z-index: var(--z-dialog);
19
+ box-sizing: border-box;
13
20
  display: flex;
14
21
  align-items: center;
15
22
  justify-content: center;
23
+ padding: var(--space-8);
24
+ /* calc() only so the scale guard reads the fallback as a token. */
25
+ padding-top: calc(var(--dialog-inset-top, var(--space-8)));
26
+ }
27
+
28
+ /* A host's dialog layer (DialogLayer) only marks where dialogs mount; it
29
+ draws nothing and takes no room in its parent's layout. */
30
+ .dialog-layer {
31
+ display: contents;
16
32
  }
17
33
 
18
34
  /* The frosted wash, for overlays that replace the page rather than ask
19
- about it (a shortcuts list, settings): the window ground at half strength
20
- over a heavy blur, so each theme keeps its own tone and the page ghosts
21
- through. */
35
+ about it (a shortcuts list, settings): the modal scrim over the shared
36
+ frost, so each theme keeps its own tone and the page ghosts through. */
22
37
  .dialog-backdrop.frosted {
23
- background: color-mix(in srgb, var(--bg) 50%, transparent);
24
- -webkit-backdrop-filter: blur(36px) saturate(180%);
25
- backdrop-filter: blur(36px) saturate(180%);
26
- animation: dialog-wash-in 160ms ease-out;
38
+ background: var(--scrim);
39
+ -webkit-backdrop-filter: var(--frost);
40
+ backdrop-filter: var(--frost);
27
41
  }
28
42
 
43
+ /* The box owns its type, whatever page root it is drawn under (a caller
44
+ may portal it to the body): sentences and labels in the interface font,
45
+ and what the user could type or copy (the title, the context, names,
46
+ paths, values) in monospace, through the rules and hooks below. It also
47
+ resets box sizing and the margins of its own text elements. */
29
48
  .dialog {
30
- /* The tone (ModalDialog's `tone`): the title strip's rule, and in a
31
- destructive dialog the lit primary; the icon wears the same colour, with
32
- the primary colour for the accent. */
49
+ /* The tone (ModalDialog's `tone`): the title strip's rule, the icon, and
50
+ in a destructive dialog the lit primary, one hue for all three. */
33
51
  --dialog-tone: var(--accent);
34
- --dialog-icon: var(--primary);
52
+ --dialog-icon: var(--accent);
35
53
  box-sizing: border-box;
36
54
  width: 360px;
55
+ /* Never taller or wider than the backdrop's inset area: past that the
56
+ body scrolls between the title strip and the legend, which stay put. */
57
+ max-width: 100%;
58
+ max-height: 100%;
37
59
  background: var(--surface);
38
- border: 1px solid var(--border-strong);
39
- border-radius: 8px;
40
- overflow: hidden;
60
+ border: var(--line) solid var(--border-strong);
61
+ border-radius: var(--radius-lg);
62
+ overflow: hidden auto;
63
+ overscroll-behavior: contain;
41
64
  /* Children are inset 12px; the title strip and the legend reach across
42
65
  the box and the legend closes it at the bottom. */
43
- padding: 0 12px 12px;
66
+ padding: 0 var(--space-6) var(--space-6);
44
67
  display: flex;
45
68
  flex-direction: column;
46
- gap: 12px;
47
- box-shadow: var(--shadow-dialog);
48
- animation: dialog-settle 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
69
+ gap: var(--space-6);
70
+ color: var(--text);
71
+ font-family: var(--font-ui);
72
+ font-size: var(--font-size-body);
73
+ line-height: var(--line-height-body);
74
+ /* The lit top edge every floating surface wears, then the modal layer's
75
+ lift, which is stronger in dark themes, where a shadow alone barely
76
+ shows. */
77
+ box-shadow:
78
+ inset 0 1px 0 var(--glass-edge),
79
+ var(--shadow-modal);
80
+ }
81
+
82
+ /* The width steps a caller picks from by what the body holds (the 360px
83
+ default above for a question or a name field). The box still never
84
+ passes the backdrop's inset area, so a narrow window shrinks any step. */
85
+ .dialog.dialog-size-md {
86
+ width: 480px;
87
+ }
88
+
89
+ .dialog.dialog-size-lg {
90
+ width: 640px;
91
+ }
92
+
93
+ .dialog.dialog-size-xl {
94
+ width: 880px;
95
+ }
96
+
97
+ .dialog,
98
+ .dialog * {
99
+ box-sizing: border-box;
100
+ }
101
+
102
+ /* The resets weigh one class, so a body's own class (a note's margin, a
103
+ value's face) still wins over them. */
104
+ .dialog :where(h2, p, ul, ol, dl, dd, figure) {
105
+ margin: 0;
106
+ }
107
+
108
+ /* Hooks a dialog body uses so its type follows the rule above. Help, notes,
109
+ and descriptions under a field are sentences: the interface font, small,
110
+ dim. A label that heads a field or a value is the interface font too. A
111
+ value the user could copy (a name, a path, a command, a host) is
112
+ monospace. Paragraphs in the body are sentences unless marked as values. */
113
+ .dialog :where(p, .dialog-help, .dialog-label) {
114
+ font-family: var(--font-ui);
115
+ }
116
+
117
+ .dialog-help {
118
+ color: var(--text-dim);
119
+ font-size: var(--font-size-small);
120
+ line-height: var(--line-height-prose);
121
+ }
122
+
123
+ .dialog-label {
124
+ color: var(--text);
125
+ font-size: var(--font-size-small);
126
+ font-weight: var(--font-weight-medium);
127
+ }
128
+
129
+ .dialog :where(code, samp, pre),
130
+ .dialog .dialog-value {
131
+ font-family: var(--font-mono);
132
+ }
133
+
134
+ /* What a dialog says and names is content a user may copy (a message, a
135
+ name, a path, a count, a value); the title, labels, and the legend stay
136
+ chrome and cannot be selected. */
137
+ .dialog .dialog-value {
138
+ -webkit-user-select: text;
139
+ user-select: text;
140
+ }
141
+
142
+ /* A body that scrolls on its own: the dialog's height limit shrinks it
143
+ first, and its contents scroll between the strip and the legend. Pair it
144
+ with the shared .scroll-fade so a cut edge shows there is more. */
145
+ .dialog-body {
146
+ flex: 0 1 auto;
147
+ min-height: 0;
148
+ overflow-y: auto;
49
149
  }
50
150
 
51
151
  .dialog[data-tone='danger'] {
@@ -59,10 +159,13 @@
59
159
  }
60
160
 
61
161
  /* A dialog that grows while it is open (ModalDialog's `pinTop`) keeps the
62
- top edge it opened at, centred, and grows downward. */
162
+ top edge it opened at, centred, and grows downward. --dialog-top is
163
+ measured from the backdrop's edge, its top inset included, and the box
164
+ still stops at the backdrop's bottom inset. */
63
165
  .dialog[data-pinned] {
64
166
  align-self: flex-start;
65
- margin-top: var(--dialog-top);
167
+ margin-top: calc(var(--dialog-top) - var(--dialog-inset-top, var(--space-8)));
168
+ max-height: calc(100% - var(--dialog-top) + var(--dialog-inset-top, var(--space-8)));
66
169
  }
67
170
 
68
171
  /* The dialog holds the focus only so its keys work; it is not a control. */
@@ -70,73 +173,51 @@
70
173
  outline: none;
71
174
  }
72
175
 
73
- /* The wash fades in and the dialog settles from a few pixels above; a cut to
74
- a blurred window reads as a glitch. */
75
- @keyframes dialog-wash-in {
76
- from {
77
- opacity: 0;
78
- }
79
- }
176
+ /* Nothing animates in: the wash and the box are there on the next frame,
177
+ as a desktop sheet or panel appears, so neither carries an entrance. */
80
178
 
81
- @keyframes dialog-settle {
82
- from {
83
- opacity: 0;
84
- transform: translateY(-6px) scale(0.985);
85
- }
86
- }
87
-
88
- @media (prefers-reduced-motion: reduce) {
89
- .dialog-backdrop.frosted,
90
- .dialog {
91
- animation: none;
92
- }
93
- }
94
-
95
- /* The title strip: crust, ruled in the tone, with the verb's icon, the
96
- title, and where the dialog acts pushed to the right edge. */
179
+ /* The title strip: crust, ruled in the tone, with the verb's icon and the
180
+ one-line title. It wears the
181
+ lit top edge, and stays at the top while a tall body scrolls under it. */
97
182
  .dialog > .dialog-heading {
183
+ position: sticky;
184
+ top: 0;
185
+ z-index: var(--z-raised);
98
186
  box-sizing: border-box;
99
187
  display: flex;
100
188
  flex: none;
101
189
  align-items: center;
102
- gap: 8px;
103
- height: 34px;
104
- margin: 0 -12px;
105
- padding: 0 12px 0 10px;
106
- border-bottom: 1px solid var(--dialog-tone);
107
- /* The box's own corner inside its border, so the crust keeps the curve
108
- in a dialog that lets a popup hang past its edge. */
109
- border-radius: 7px 7px 0 0;
190
+ gap: var(--space-4);
191
+ min-height: var(--bar-height-lg);
192
+ margin: 0 calc(-1 * var(--space-6));
193
+ padding: 0 var(--space-6) 0 var(--space-5);
194
+ border-bottom: var(--line) solid var(--dialog-tone);
195
+ /* The box's own corner inside its 1px border, so the crust keeps the
196
+ curve in a dialog that lets a popup hang past its edge. */
197
+ border-radius: calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px) 0 0;
110
198
  background: var(--surface-header);
199
+ box-shadow: inset 0 1px 0 var(--glass-edge);
111
200
  }
112
201
 
113
202
  .dialog-icon {
114
203
  flex: none;
115
- width: 15px;
116
- height: 15px;
117
- stroke-width: 2;
204
+ width: var(--icon-lg);
205
+ height: var(--icon-lg);
118
206
  color: var(--dialog-icon);
119
207
  }
120
208
 
209
+ /* The title is always one line: it takes the strip and is cut with an
210
+ ellipsis at the strip's end, its full text in a tooltip while cut. Nothing
211
+ stands beside it; context goes in the body's first line. */
121
212
  .dialog h2 {
122
- flex: 0 1 auto;
213
+ flex: 1 1 auto;
123
214
  min-width: 0;
124
215
  margin: 0;
125
216
  overflow: hidden;
126
- font-size: 12px;
127
- font-weight: 600;
128
- text-overflow: ellipsis;
129
- white-space: nowrap;
130
- }
131
-
132
- .dialog-context {
133
- flex: 1 1 0;
134
- min-width: 0;
135
- overflow: hidden;
136
- color: var(--row-meta-text);
137
- font-size: 12px;
138
- font-weight: normal;
139
- text-align: right;
217
+ font-family: var(--font-mono);
218
+ font-size: var(--font-size-small);
219
+ font-weight: var(--font-weight-strong);
220
+ line-height: var(--line-height-compact);
140
221
  text-overflow: ellipsis;
141
222
  white-space: nowrap;
142
223
  }
@@ -154,40 +235,118 @@
154
235
  flex-wrap: wrap;
155
236
  flex: none;
156
237
  align-items: center;
157
- gap: 2px;
158
- min-height: 34px;
159
- padding: 0 6px;
160
- border-top: 1px solid var(--border);
238
+ gap: var(--space-1);
239
+ /* One row centres in the bar's height; a legend whose verbs wrap pads
240
+ its rows off the hairline and the box's edge, and parts them. */
241
+ row-gap: var(--space-1);
242
+ min-height: var(--bar-height-lg);
243
+ padding: var(--space-2) var(--space-3);
244
+ border-top: var(--line) solid var(--border);
161
245
  }
162
246
 
247
+ /* In the frame the legend closes the box and stays at its bottom while a
248
+ tall body scrolls under it, so it needs the box's own fill. */
163
249
  .dialog > .dialog-legend {
164
- margin: 0 -12px -12px;
250
+ position: sticky;
251
+ /* A sticky box stops at the scroll box's padding; the legend sits in the
252
+ bottom padding, so it sticks that far past it. */
253
+ bottom: calc(-1 * var(--space-6));
254
+ z-index: var(--z-raised);
255
+ margin: 0 calc(-1 * var(--space-6)) calc(-1 * var(--space-6));
256
+ background: var(--surface);
257
+ }
258
+
259
+ /* A box taller than the window scrolls between its pinned strip and legend,
260
+ and these fades say there is more: one hangs above the legend while the
261
+ body continues below, one under the title strip once the body has
262
+ scrolled past its start. They follow the box's own scroll position, so a
263
+ box that does not scroll shows neither. The strip and the legend are
264
+ sticky, which already makes them the fades' containing blocks. */
265
+ .dialog > :is(.dialog-heading, .dialog-legend)::after {
266
+ content: '';
267
+ position: absolute;
268
+ left: 0;
269
+ right: 0;
270
+ height: var(--space-8);
271
+ pointer-events: none;
272
+ opacity: 0;
273
+ }
274
+
275
+ .dialog > .dialog-legend::after {
276
+ bottom: 100%;
277
+ /* Above the legend's hairline, which is its border. */
278
+ margin-bottom: var(--line);
279
+ background: linear-gradient(transparent, var(--surface));
280
+ }
281
+
282
+ .dialog > .dialog-heading::after {
283
+ top: 100%;
284
+ /* Below the strip's rule, which is its border. */
285
+ margin-top: var(--line);
286
+ background: linear-gradient(var(--surface), transparent);
287
+ }
288
+
289
+ @supports (animation-timeline: scroll()) {
290
+ .dialog {
291
+ scroll-timeline: --dialog-scroll block;
292
+ }
293
+
294
+ .dialog > .dialog-legend::after {
295
+ animation: dialog-more-below linear both;
296
+ animation-timeline: --dialog-scroll;
297
+ }
298
+
299
+ .dialog > .dialog-heading::after {
300
+ animation: dialog-more-above linear both;
301
+ animation-timeline: --dialog-scroll;
302
+ }
303
+ }
304
+
305
+ /* The fade eases out over the last stretch of the scroll, so the end reads
306
+ as the end. */
307
+ @keyframes dialog-more-below {
308
+ 0%,
309
+ 92% {
310
+ opacity: 1;
311
+ }
312
+
313
+ 100% {
314
+ opacity: 0;
315
+ }
316
+ }
317
+
318
+ @keyframes dialog-more-above {
319
+ 0% {
320
+ opacity: 0;
321
+ }
322
+
323
+ 8%,
324
+ 100% {
325
+ opacity: 1;
326
+ }
165
327
  }
166
328
 
167
329
  .legend-slot {
168
330
  display: inline-flex;
169
331
  flex: none;
170
332
  align-items: center;
171
- gap: 6px;
333
+ gap: var(--space-3);
172
334
  box-sizing: border-box;
173
- min-height: 24px;
335
+ min-height: var(--control-height-sm);
174
336
  max-width: 100%;
175
337
  margin: 0;
176
- padding: 0 7px 0 4px;
338
+ padding: 0 var(--space-3) 0 var(--space-2);
177
339
  border: none;
178
- border-radius: 5px;
340
+ border-radius: var(--radius-sm);
179
341
  background: transparent;
180
342
  color: var(--text);
181
- cursor: pointer;
182
343
  font: inherit;
183
- font-size: 12px;
344
+ font-size: var(--font-size-small);
184
345
  white-space: normal;
185
346
  }
186
347
 
187
- .legend-slot:hover:enabled {
188
- background: var(--hover-wash);
189
- box-shadow: var(--hover-frost);
190
- }
348
+ /* Hover and pressed come from the base sheet's shared quiet-control
349
+ recipes (src/styles.css), which list .legend-slot. */
191
350
 
192
351
  .dialog-legend .legend-slot:focus-visible {
193
352
  outline: none;
@@ -197,87 +356,371 @@
197
356
  display: inline-flex;
198
357
  }
199
358
 
200
- /* A slot's chord drawn as one plain key cap. */
201
- .legend-slot .keychord {
202
- box-sizing: border-box;
203
- height: 18px;
204
- min-width: 20px;
205
- justify-content: center;
206
- padding: 0 4px;
207
- border: 1px solid var(--border-strong);
208
- border-radius: 4px;
209
- color: var(--text);
210
- background: var(--bg-panel);
211
- }
359
+ /* A slot's chord is the shared key cap (src/keychord/keychord.css lists
360
+ .legend-slot); the rules below only colour it. */
212
361
 
213
362
  .legend-primary {
214
363
  margin-left: auto;
215
- font-weight: 600;
364
+ font-weight: var(--font-weight-strong);
216
365
  }
217
366
 
218
367
  /* The verb Return runs is lit like a held key; a destructive one in the
219
- danger colour, verb and all. */
368
+ danger colour, verb and all. A lit cap's foot is its own fill under a
369
+ fixed shade, darker than the face in every theme, so it keeps the key's
370
+ shape. */
220
371
  .legend-primary .keychord {
221
372
  border-color: var(--accent);
373
+ border-bottom-color: var(--key-foot-shade);
222
374
  background: var(--accent);
223
375
  color: var(--on-accent);
224
376
  }
225
377
 
378
+ /* A secondary or leave verb that destroys (a Delete… beside the primary)
379
+ reads in the danger text colour, with the danger wash under the pointer;
380
+ its cap stays a plain key, since only the primary's cap is lit. */
381
+ .legend-slot.legend-danger {
382
+ color: var(--danger-text);
383
+ }
384
+
385
+ .legend-slot.legend-danger:hover:not(:disabled) {
386
+ background: var(--danger-wash);
387
+ }
388
+
389
+ .legend-slot.legend-danger:active:not(:disabled) {
390
+ background: var(--danger-wash-strong);
391
+ }
392
+
226
393
  .dialog[data-tone='danger'] .legend-primary {
227
- color: var(--danger);
394
+ color: var(--danger-text);
228
395
  }
229
396
 
230
397
  .dialog[data-tone='danger'] .legend-primary .keychord {
231
398
  border-color: var(--danger);
399
+ border-bottom-color: var(--key-foot-shade);
232
400
  background: var(--danger);
401
+ color: var(--on-danger);
233
402
  }
234
403
 
235
404
  /* ---- Confirmation dialog (ConfirmDialog) ----
236
405
 
237
- The dialog carries its own type, reset margins, and border-box sizing,
238
- because a caller may portal it to the body, outside every page root; it
239
- must render identically wherever it is drawn. */
240
- .confirm-dialog {
406
+ Read at a glance and the same for one item or a thousand: the one-line
407
+ title names the action, the lead says what happens and to how many, the
408
+ items sit in one framed list, and facts about the action follow. The frame carries the type, margins, and
409
+ box sizing (above). */
410
+ .dialog-message {
411
+ color: var(--text-dim);
412
+ line-height: var(--line-height-prose);
413
+ overflow-wrap: break-word;
414
+ -webkit-user-select: text;
415
+ user-select: text;
416
+ }
417
+
418
+ /* A name the message sets apart (the item a delete asks about) reads in the
419
+ text colour and in monospace, as a name the user could copy. */
420
+ .dialog-message strong {
241
421
  color: var(--text);
242
422
  font-family: var(--font-mono);
243
- font-size: 13px;
423
+ font-weight: var(--font-weight-strong);
244
424
  }
245
425
 
246
- .confirm-dialog,
247
- .confirm-dialog * {
248
- box-sizing: border-box;
426
+ /* ---- Fact list (DialogFacts) ----
427
+
428
+ A desktop property list: one line per row, the labels in a leading
429
+ column, the counts in a column of their own (end-aligned, tabular, so
430
+ they line up), then the values. The rows share the list's columns
431
+ (subgrid). A label column never takes more than two fifths of the body
432
+ and keeps to one line; a value wraps before it is cut. A row without a
433
+ count leaves its column empty, and a list without counts has no column
434
+ at all, since the gap after a count is the count's own padding. */
435
+ .dialog-facts {
436
+ display: grid;
437
+ grid-template-columns: fit-content(40%) auto minmax(0, 1fr);
438
+ margin: 0;
439
+ font-size: var(--font-size-small);
440
+ line-height: var(--line-height-compact);
249
441
  }
250
442
 
251
- .confirm-dialog h2,
252
- .confirm-dialog p,
253
- .confirm-dialog ul {
443
+ .dialog-fact,
444
+ .dialog-facts dd {
445
+ display: grid;
446
+ grid-template-columns: subgrid;
447
+ align-items: baseline;
448
+ min-width: 0;
449
+ }
450
+
451
+ .dialog-fact {
452
+ grid-column: 1 / -1;
453
+ }
454
+
455
+ .dialog-facts dd {
456
+ grid-column: 2 / -1;
254
457
  margin: 0;
255
458
  }
256
459
 
257
- .dialog-message {
258
- color: var(--text-dim);
259
- overflow-wrap: break-word;
460
+ .dialog-facts dt {
461
+ min-width: 0;
462
+ padding-inline-end: var(--space-6);
463
+ overflow: hidden;
464
+ text-overflow: ellipsis;
465
+ white-space: nowrap;
260
466
  }
261
467
 
262
- /* A name the message sets apart (the item a delete asks about) reads in the text colour. */
263
- .dialog-message strong {
468
+ .dialog-fact-count {
469
+ grid-column: 1;
470
+ padding-inline-end: var(--space-3);
264
471
  color: var(--text);
265
- font-weight: 600;
472
+ font-family: var(--font-mono);
473
+ font-variant-numeric: tabular-nums;
474
+ font-weight: var(--font-weight-strong);
475
+ text-align: end;
476
+ white-space: nowrap;
477
+ -webkit-user-select: text;
478
+ user-select: text;
266
479
  }
267
480
 
268
- /* A batch lists every affected path; long selections scroll. */
269
- .dialog-paths {
270
- margin: 8px 0 0;
271
- padding: 6px 8px;
272
- max-height: 160px;
273
- overflow: auto;
481
+ .dialog-fact-value {
482
+ grid-column: 2;
483
+ min-width: 0;
484
+ color: var(--text-dim);
485
+ -webkit-user-select: text;
486
+ user-select: text;
487
+ }
488
+
489
+ /* A value may identify what the action touches (a path, a statement), so it
490
+ wraps, after a separator where it can, up to three lines before it is
491
+ cut; one still cut shows its whole text in a tooltip. */
492
+ .dialog-fact-value,
493
+ .dialog-fact-names {
494
+ display: -webkit-box;
495
+ overflow: hidden;
496
+ overflow-wrap: anywhere;
497
+ -webkit-box-orient: vertical;
498
+ -webkit-line-clamp: 3;
499
+ line-clamp: 3;
500
+ }
501
+
502
+ /* A value that leaves names out ends in "+N more": the names wrap and give
503
+ way first and the count stays whole after them, so the row always says
504
+ how many it omits. The names carry the tooltip, being the box that cuts. */
505
+ .dialog-fact-value.dialog-fact-value-more {
506
+ display: flex;
507
+ align-items: baseline;
508
+ gap: var(--space-2);
509
+ }
510
+
511
+ .dialog-fact-names {
512
+ min-width: 0;
513
+ }
514
+
515
+ .dialog-fact-more {
516
+ flex: none;
517
+ font-family: var(--font-ui);
518
+ }
519
+
520
+ /* ---- Item list (DialogItems) ----
521
+
522
+ The things a confirmation acts on, as one framed list (a well): one row
523
+ per item, its kind's glyph, its name in monospace in the text colour, and
524
+ one dim detail at the row's end. The rows share the list's three columns
525
+ (subgrid), so names and details line up. The name and detail columns
526
+ share the row by content: each grows from its narrowest toward its
527
+ one-line width at the same pace, and one that reaches its one-line width
528
+ stops and leaves the rest to the other, so a short host never wraps
529
+ beside a long name while the row has room for it on one line. A name or
530
+ detail wraps, up to three lines, after a separator where it can and
531
+ anywhere where it cannot. A name still too long is cut at its end, a
532
+ detail at its start (the folders nearest the item identify it; the
533
+ first shown line begins with an ellipsis). The list draws at most
534
+ six rows (five items and "+N more"), so it never needs to scroll. */
535
+ .dialog-items-block {
536
+ display: flex;
537
+ flex-direction: column;
538
+ gap: var(--space-2);
539
+ min-width: 0;
540
+ }
541
+
542
+ .dialog-items-head {
543
+ display: flex;
544
+ align-items: baseline;
545
+ gap: var(--space-3);
546
+ }
547
+
548
+ .dialog-items-count {
549
+ color: var(--text-dim);
550
+ font-family: var(--font-mono);
551
+ font-size: var(--font-size-small);
552
+ font-variant-numeric: tabular-nums;
553
+ }
554
+
555
+ .dialog-items {
556
+ display: grid;
557
+ /* No fixed share: both text columns are auto (min-content to max-content),
558
+ so the grid splits the room between them by what they hold, and the
559
+ glyph column is exactly the glyph, so it takes none of the rest. */
560
+ grid-template-columns: var(--icon-md) auto auto;
561
+ gap: var(--space-2) var(--space-4);
562
+ margin: 0;
563
+ /* Text starts 12px in, level with the body's edge inside the frame. */
564
+ padding: var(--space-3) var(--space-6);
274
565
  list-style: none;
275
- border: 1px solid var(--border);
276
- border-radius: 4px;
277
- font-size: 12px;
566
+ border: var(--line) solid var(--border-strong);
567
+ border-radius: var(--radius-md);
278
568
  color: var(--text-dim);
569
+ font-family: var(--font-mono);
570
+ font-size: var(--font-size-small);
571
+ line-height: var(--line-height-compact);
572
+ }
573
+
574
+ .dialog-item {
575
+ display: grid;
576
+ grid-column: 1 / -1;
577
+ grid-template-columns: subgrid;
578
+ align-items: start;
579
+ min-width: 0;
580
+ }
581
+
582
+ /* The glyph sits on the name's first line; an item without one keeps the
583
+ column, so every name starts on one edge. */
584
+ .dialog-item-glyph {
585
+ grid-column: 1;
586
+ width: var(--icon-md);
587
+ height: var(--icon-md);
588
+ margin-block-start: calc((var(--line-height-compact) - var(--icon-md)) / 2);
589
+ color: var(--text-faint);
279
590
  }
280
591
 
281
- .dialog-paths li {
592
+ .dialog-item-name,
593
+ .dialog-item-detail {
594
+ min-width: 0;
595
+ overflow: hidden;
596
+ overflow-wrap: anywhere;
597
+ }
598
+
599
+ .dialog-item-name {
600
+ display: -webkit-box;
601
+ grid-column: 2;
602
+ -webkit-box-orient: vertical;
603
+ -webkit-line-clamp: 3;
604
+ line-clamp: 3;
605
+ color: var(--text);
606
+ }
607
+
608
+ /* The detail's text sits at the bottom of a box at most three lines tall,
609
+ so text that runs longer overflows, and is clipped, at the top: the
610
+ start of a path goes and its nearest folders stay. */
611
+ .dialog-item-detail {
612
+ display: flex;
613
+ flex-direction: column;
614
+ justify-content: flex-end;
615
+ grid-column: 3;
616
+ max-block-size: 3lh;
617
+ text-align: end;
618
+ }
619
+
620
+ .dialog-item-detail-text {
621
+ flex: none;
622
+ }
623
+
624
+ /* A detail cut at its start (DialogItems marks it) begins its first shown
625
+ line with an ellipsis, drawn over that line's first characters (already
626
+ a cut part of the path) on the well's ground, so it reads as more before
627
+ it, not as the start. A cut detail fills its three lines, so it sets
628
+ its lines from its start edge, where the ellipsis stands. The ellipsis
629
+ follows the detail's own direction. */
630
+ .dialog-item-detail[data-cut='start'] {
631
+ position: relative;
632
+ /* Its lines start at the column's edge, so the ellipsis meets the first. */
633
+ text-align: start;
634
+ }
635
+
636
+ .dialog-item-detail[data-cut='start']::before {
637
+ position: absolute;
638
+ inset-block-start: 0;
639
+ inset-inline-start: 0;
640
+ padding-inline-end: var(--space-1);
641
+ background: var(--surface);
642
+ content: '…';
643
+ }
644
+
645
+ /* The last row counts the rest in words, under the names. */
646
+ .dialog-items-more {
647
+ display: block;
648
+ grid-column: 2 / -1;
649
+ font-family: var(--font-ui);
650
+ }
651
+
652
+ /* A confirmation that lists items takes the medium width, the same for one
653
+ item and a thousand. A host's width step still wins (two classes). A
654
+ statement block a host passes as children counts as a list too, so a
655
+ confirmation keeps one width however its statements reach it. */
656
+ .dialog:where(.confirm-items, .confirm-dialog:has(.dialog-statements-block)) {
657
+ width: 480px;
658
+ }
659
+
660
+ /* Several groups (a quit's processes and terminals) stack apart. */
661
+ .confirm-items-lists {
662
+ display: flex;
663
+ flex-direction: column;
664
+ gap: var(--space-6);
665
+ min-width: 0;
666
+ }
667
+
668
+ /* ---- Statements (DialogStatements) ----
669
+
670
+ The statements a confirmation runs, every one: the item list's frame and
671
+ code face, one statement per line wrapping whole under a two-character
672
+ hanging indent. Capped at eight lines, then it scrolls on its own with
673
+ the block-edge fade; it is a focus stop, so the keys scroll it too. */
674
+ .dialog-statements-block {
675
+ display: flex;
676
+ flex-direction: column;
677
+ gap: var(--space-2);
678
+ min-width: 0;
679
+ }
680
+
681
+ /* The frame holds the border and, while the scroller inside has keyboard
682
+ focus, the focus ring (the scroller's fade would clip a ring of its own). */
683
+ .dialog-statements-frame {
684
+ border: var(--line) solid var(--border-strong);
685
+ border-radius: var(--radius-md);
686
+ }
687
+
688
+ .dialog-statements-frame:has(> .dialog-statements:focus-visible) {
689
+ outline: var(--focus-ring-width) solid var(--accent);
690
+ outline-offset: var(--focus-offset-inset);
691
+ }
692
+
693
+ .dialog-statements {
694
+ max-block-size: calc(8lh + 2 * var(--space-3));
695
+ overflow-y: auto;
696
+ padding: var(--space-3) var(--space-6);
697
+ border-radius: inherit;
698
+ color: var(--text);
699
+ font-family: var(--font-mono);
700
+ font-size: var(--font-size-small);
701
+ line-height: var(--line-height-compact);
702
+ }
703
+
704
+ .dialog-statements:focus-visible {
705
+ outline: none;
706
+ }
707
+
708
+ .dialog-statements ol {
709
+ display: flex;
710
+ flex-direction: column;
711
+ gap: var(--space-1);
712
+ margin: 0;
713
+ padding: 0;
714
+ list-style: none;
715
+ }
716
+
717
+ .dialog-statement code {
718
+ display: block;
719
+ padding-inline-start: 2ch;
720
+ font: inherit;
721
+ text-indent: -2ch;
722
+ white-space: pre-wrap;
282
723
  overflow-wrap: anywhere;
724
+ -webkit-user-select: text;
725
+ user-select: text;
283
726
  }