@bigpixelrocket/uiok 0.1.4 → 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 +88 -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 +3 -3
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { LoaderCircle } from 'lucide-react';
3
+ import { ICON_SM } from './sizes.js';
4
+ /**
5
+ * The library's one spinner: a turning ring for work under way, drawn in the
6
+ * current text colour. It turns once per `--duration-spin` and stands still
7
+ * under reduced motion, where the words beside it say the work is running.
8
+ * Decorative: it is hidden from assistive technology, so the host says what
9
+ * is busy in words.
10
+ */
11
+ export function Spinner({ size = ICON_SM, className }) {
12
+ return (_jsx(LoaderCircle, { "aria-hidden": true, className: className === undefined ? 'spinner' : `spinner ${className}`, size: size }));
13
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Icons: the four sizes for lucide's `size` prop, and the one spinner.
3
+ */
4
+ export * from './sizes.js';
5
+ export * from './Spinner.js';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Icons: the four sizes for lucide's `size` prop, and the one spinner.
3
+ */
4
+ export * from './sizes.js';
5
+ export * from './Spinner.js';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Icon sizes for lucide's `size` prop, mirroring the `--icon-sm`, `--icon-md`,
3
+ * `--icon-lg`, and `--icon-xl` tokens of `tokens.css`, which size icons drawn from CSS. An
4
+ * icon takes its size from the text or control it sits beside, never a number
5
+ * of its own.
6
+ */
7
+ /** Beside 11 and 12 px text, and inside 20px inline controls. */
8
+ export declare const ICON_SM = 12;
9
+ /** Beside 13px text in rows, tabs, and buttons. */
10
+ export declare const ICON_MD = 14;
11
+ /** A dialog's title icon, an empty state's action, and a row's product mark. */
12
+ export declare const ICON_LG = 16;
13
+ /**
14
+ * A picture-sized glyph: an app's mark in an About window or a splash. Never
15
+ * a glyph over an empty state or a failure, which say so in a line with an
16
+ * icon of their text's size. Drawn larger than `ICON_LG`, so the icon passes
17
+ * `absoluteStrokeWidth` to keep the 2px stroke.
18
+ */
19
+ export declare const ICON_XL = 28;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Icon sizes for lucide's `size` prop, mirroring the `--icon-sm`, `--icon-md`,
3
+ * `--icon-lg`, and `--icon-xl` tokens of `tokens.css`, which size icons drawn from CSS. An
4
+ * icon takes its size from the text or control it sits beside, never a number
5
+ * of its own.
6
+ */
7
+ /** Beside 11 and 12 px text, and inside 20px inline controls. */
8
+ export const ICON_SM = 12;
9
+ /** Beside 13px text in rows, tabs, and buttons. */
10
+ export const ICON_MD = 14;
11
+ /** A dialog's title icon, an empty state's action, and a row's product mark. */
12
+ export const ICON_LG = 16;
13
+ /**
14
+ * A picture-sized glyph: an app's mark in an About window or a splash. Never
15
+ * a glyph over an empty state or a failure, which say so in a line with an
16
+ * icon of their text's size. Drawn larger than `ICON_LG`, so the icon passes
17
+ * `absoluteStrokeWidth` to keep the 2px stroke.
18
+ */
19
+ export const ICON_XL = 28;
package/dist/index.d.ts CHANGED
@@ -10,8 +10,10 @@ export * from './charts/index.js';
10
10
  export * from './clock/index.js';
11
11
  export * from './datetime/index.js';
12
12
  export * from './dialog/index.js';
13
+ export * from './field/index.js';
13
14
  export * from './filter/index.js';
14
15
  export * from './grid/index.js';
16
+ export * from './icon/index.js';
15
17
  export * from './keyboard/index.js';
16
18
  export * from './keychord/index.js';
17
19
  export * from './labels/index.js';
package/dist/index.js CHANGED
@@ -10,8 +10,10 @@ export * from './charts/index.js';
10
10
  export * from './clock/index.js';
11
11
  export * from './datetime/index.js';
12
12
  export * from './dialog/index.js';
13
+ export * from './field/index.js';
13
14
  export * from './filter/index.js';
14
15
  export * from './grid/index.js';
16
+ export * from './icon/index.js';
15
17
  export * from './keyboard/index.js';
16
18
  export * from './keychord/index.js';
17
19
  export * from './labels/index.js';
@@ -1,11 +1,22 @@
1
1
  import type { ReactElement } from 'react';
2
2
  import type { Chord } from '../keyboard/Keyboard.logic.js';
3
3
  import { type LayerModifier } from '../keyboard/KeyChord.logic.js';
4
+ /**
5
+ * A key cap's tone: `accent` for a chord changed from its default (an accent
6
+ * frame on an accent wash), `lit` for the chord Return runs (the solid accent
7
+ * face a dialog legend's primary cap wears), `quiet` for a chord that cannot
8
+ * change (its glyphs a tone down).
9
+ */
10
+ export type KeyChordTone = 'accent' | 'lit' | 'quiet';
4
11
  /** Props for {@link KeyChord}: the chord, and what of it is already shown elsewhere. */
5
12
  export interface KeyChordProps {
6
13
  readonly chord: Chord;
7
14
  /** Modifiers already shown elsewhere (a legend's anchor), left out of this drawing. */
8
15
  readonly omit?: ReadonlyArray<LayerModifier>;
16
+ /** How the key cap reads (`data-tone`); a plain cap without it. Only a cap shows it. */
17
+ readonly tone?: KeyChordTone;
18
+ /** True while the chord is being recorded (`data-state="recording"`): the cap wears an accent outline. */
19
+ readonly recording?: boolean;
9
20
  }
10
21
  /**
11
22
  * A chord as a row of key caps in a `<kbd>`. The accessible name is always
@@ -13,4 +24,4 @@ export interface KeyChordProps {
13
24
  * when the drawing omits a modifier a strip shows once. A chord with an
14
25
  * empty key draws its modifiers alone.
15
26
  */
16
- export declare function KeyChord({ chord, omit }: KeyChordProps): ReactElement;
27
+ export declare function KeyChord({ chord, omit, tone, recording }: KeyChordProps): ReactElement;
@@ -48,8 +48,8 @@ function Key({ part, labels }) {
48
48
  * when the drawing omits a modifier a strip shows once. A chord with an
49
49
  * empty key draws its modifiers alone.
50
50
  */
51
- export function KeyChord({ chord, omit = [] }) {
51
+ export function KeyChord({ chord, omit = [], tone, recording = false }) {
52
52
  const { keys } = useLabels();
53
53
  const parts = chordParts(chord).filter((part) => typeof part === 'object' ? part.key !== '' : !omit.includes(part));
54
- return (_jsx("kbd", { "aria-label": chordSpoken(chord, keys), className: "keychord", children: parts.map((part, index) => (_jsx(Key, { labels: keys, part: part }, index))) }));
54
+ return (_jsx("kbd", { "aria-label": chordSpoken(chord, keys), className: "keychord", "data-state": recording ? 'recording' : undefined, "data-tone": tone, children: parts.map((part, index) => (_jsx(Key, { labels: keys, part: part }, index))) }));
55
55
  }
@@ -1,2 +1,2 @@
1
1
  /** `KeyChord`: a chord drawn as key caps, named in words for assistive technology. */
2
- export { KeyChord, type KeyChordProps } from './KeyChord.js';
2
+ export { KeyChord, type KeyChordProps, type KeyChordTone } from './KeyChord.js';
@@ -1,14 +1,14 @@
1
1
  /* ---- Key chord (KeyChord) ----
2
2
 
3
3
  A chord as a row of keys, drawn in key legends, menus, settings, and a
4
- dialog's legend. One grid for every key: an 11px icon or a 10px letter in
4
+ dialog's legend. One grid for every key: a 12px icon or a 10px letter in
5
5
  the same 12px box, so a modifier sits at the cap height of the mono text
6
- beside it. The chord itself has no frame; a surface that draws it as a key
7
- cap adds the border and ground around .keychord. */
6
+ beside it. The chord itself has no frame; where it is drawn as a key cap,
7
+ the one cap below frames it. */
8
8
  .keychord {
9
9
  display: inline-flex;
10
10
  align-items: center;
11
- gap: 2px;
11
+ gap: var(--space-1);
12
12
  font: inherit;
13
13
  }
14
14
 
@@ -21,21 +21,99 @@
21
21
  }
22
22
 
23
23
  .key-icon {
24
- width: 11px;
25
- height: 11px;
24
+ width: var(--icon-sm);
25
+ height: var(--icon-sm);
26
26
  display: block;
27
27
  }
28
28
 
29
+ /* Key caps are glyph-sized, never a pointer target by themselves: their 12px
30
+ box and line are the key's own geometry, not a type scale step. */
31
+
29
32
  /* Mono capitals sit above the optical centre of their em box; nudge them onto the icon centre. */
30
33
  .key-letter {
31
- font: 600 10px/12px var(--font-mono);
34
+ font: var(--font-weight-strong) var(--font-size-key)/12px var(--font-mono);
32
35
  padding-top: 1px;
33
36
  box-sizing: border-box;
34
37
  }
35
38
 
39
+ /* Key words (esc, space) take the letters' size, so no key is printed
40
+ smaller than the others. */
36
41
  .key-word {
37
42
  width: auto;
38
43
  padding: 0 1px;
39
- font: 600 9px/12px var(--font-mono);
40
- letter-spacing: 0.02em;
44
+ font: var(--font-weight-strong) var(--font-size-key)/12px var(--font-mono);
45
+ letter-spacing: 0;
46
+ }
47
+
48
+ /* ---- The key cap ----
49
+
50
+ The one picture of a key, for every surface that draws a chord as a key:
51
+ 18px tall, at least 20px wide, a --border-strong frame with a 2px foot (the
52
+ retro key's thicker bottom edge), on the panel ground. A 1px pad above the
53
+ foot leaves an even 14px face, so the 12px glyph box sits on whole pixels
54
+ 1px under the top edge at every display scale, not across two pixel rows
55
+ at 1x. A host puts .keycap on any element around its chords (a row, a
56
+ settings list); the library's own legends, menu and palette rows, the
57
+ terminal's menu, and the filter's escape key are listed here. Key caps
58
+ are identified by their glyph, not their outline, so they keep
59
+ --border-strong rather than the control outline. Written at the weight of
60
+ one class, so a host's state rule (a held layer's accent, a danger slot)
61
+ changes a colour without restating the cap. */
62
+ :where(.keycap, .keylegend, .legend-slot, .filter-escape, .folder-menu-option, .terminal-menu-item)
63
+ .keychord {
64
+ box-sizing: border-box;
65
+ height: 18px;
66
+ min-width: 20px;
67
+ justify-content: center;
68
+ padding: 0 var(--space-2) var(--line);
69
+ border: var(--line) solid var(--border-strong);
70
+ border-bottom-width: var(--line-strong);
71
+ border-radius: var(--radius-sm);
72
+ background: var(--surface);
73
+ color: var(--text);
74
+ }
75
+
76
+ /* A cap's tones (KeyChord's `tone` and `recording`), so a host sets an
77
+ attribute instead of restating the cap. Each weighs two classes, over the
78
+ plain cap and under a legend's hover and press. A chord changed from its
79
+ default: the opaque accent ring (3:1, as it is the cap's only edge) on an
80
+ accent wash, its foot kept. The chord Return runs: the solid accent face
81
+ of a dialog legend's lit cap, its foot in the shade every lit cap uses. A
82
+ chord that cannot change: glyphs a tone down. A chord being recorded: a
83
+ 1px accent outline 1px outside the frame, thinner than the focus ring so
84
+ the two never read as one, and the foot keeps its shape. Without a cap
85
+ around it a tone changes only the glyph colour. */
86
+ :where(.keycap, .keylegend, .legend-slot, .filter-escape, .folder-menu-option, .terminal-menu-item)
87
+ .keychord[data-tone='accent'] {
88
+ border-color: var(--current-ring);
89
+ background: linear-gradient(var(--accent-wash), var(--accent-wash)) var(--surface);
90
+ }
91
+
92
+ :where(.keycap, .keylegend, .legend-slot, .filter-escape, .folder-menu-option, .terminal-menu-item)
93
+ .keychord[data-tone='lit'] {
94
+ border-color: var(--accent);
95
+ border-bottom-color: var(--key-foot-shade);
96
+ background: var(--accent);
97
+ color: var(--on-accent);
98
+ }
99
+
100
+ /* A chord that cannot change, on a cap, is also a key with no travel: the
101
+ divider-grade frame and no 2px foot (its height kept by the padding),
102
+ so the tone shows by shape where a theme leaves the dim glyphs a shade
103
+ from the plain ones. */
104
+ .keychord[data-tone='quiet'] {
105
+ color: var(--text-dim);
106
+ }
107
+
108
+ :where(.keycap, .keylegend, .legend-slot, .filter-escape, .folder-menu-option, .terminal-menu-item)
109
+ .keychord[data-tone='quiet'] {
110
+ border-color: var(--border);
111
+ border-bottom-width: var(--line);
112
+ padding-bottom: calc(2 * var(--line));
113
+ }
114
+
115
+ :where(.keycap, .keylegend, .legend-slot, .filter-escape, .folder-menu-option, .terminal-menu-item)
116
+ .keychord[data-state='recording'] {
117
+ outline: var(--line) solid var(--accent);
118
+ outline-offset: var(--line);
41
119
  }
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * The words every dialog repeats whatever it asks: the leave verb's
3
- * defaults and the name of a confirmation's list of affected items. A
3
+ * defaults, the name of a confirmation's list of affected items, its count,
4
+ * and the line that counts the items such a list leaves out. A
4
5
  * dialog's title, message, and verbs are its own props.
5
6
  */
6
7
  export interface DialogLabels {
@@ -13,6 +14,16 @@ export interface DialogLabels {
13
14
  * given how many it lists: "Affected items".
14
15
  */
15
16
  readonly affectedItems: (count: number) => string;
17
+ /**
18
+ * The last line of a dialog's item list (`DialogItems`) that stops short
19
+ * of its items, given how many it leaves out: "+3 more".
20
+ */
21
+ readonly moreItems: (count: number) => string;
22
+ /**
23
+ * How many things a confirmation's item list holds, read by assistive
24
+ * technology after the dialog's lead and before the names: "3 items".
25
+ */
26
+ readonly itemCount: (count: number) => string;
16
27
  }
17
28
  /** English dialog words: the `dialog` group `UiokProvider` starts from. */
18
29
  export declare const DEFAULT_DIALOG_LABELS: DialogLabels;
@@ -2,5 +2,7 @@
2
2
  export const DEFAULT_DIALOG_LABELS = {
3
3
  cancel: 'Cancel',
4
4
  clear: 'Clear',
5
- affectedItems: () => 'Affected items'
5
+ affectedItems: () => 'Affected items',
6
+ moreItems: (count) => `+${count.toLocaleString('en-US')} more`,
7
+ itemCount: (count) => (count === 1 ? '1 item' : `${count.toLocaleString('en-US')} items`)
6
8
  };
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * The words a select-all bar repeats under every list whose rows have
3
- * checkboxes: its checkbox, the lead-in to the bulk actions, and the bar's
4
- * accessible name when the caller gives none.
3
+ * checkboxes: its checkbox, the count of checked rows before the bulk
4
+ * actions, and the bar's accessible name when the caller gives none.
5
5
  */
6
6
  export interface SelectAllLabels {
7
7
  /** The checkbox that checks or clears every row: "Check all". */
8
8
  readonly checkAll: string;
9
- /** The words before the bulk actions: "With selected:". */
10
- readonly withSelected: string;
9
+ /** How many rows are checked, said before the bulk actions as a status line says it: "3 of 8 selected". */
10
+ readonly selected: (checked: number, total: number) => string;
11
11
  /** The bar's accessible name when the caller gives none: "With selected". */
12
12
  readonly label: string;
13
13
  }
@@ -1,6 +1,6 @@
1
1
  /** English select-all words: the `selectAll` group `UiokProvider` starts from. */
2
2
  export const DEFAULT_SELECT_ALL_LABELS = {
3
3
  checkAll: 'Check all',
4
- withSelected: 'With selected:',
4
+ selected: (checked, total) => `${checked} of ${total} selected`,
5
5
  label: 'With selected'
6
6
  };
@@ -76,7 +76,7 @@ export function KeyLegendStrip({ verbs, pairLabel }) {
76
76
  if (second === undefined) {
77
77
  return (_jsxs("button", { onClick: first.run, onMouseDown: keepFocus, tabIndex: -1, type: "button", children: [_jsx(KeyChord, { chord: first.chord }), " ", first.label] }, first.label + chordGlyphs(first.chord, keys)));
78
78
  }
79
- return (_jsxs("span", { className: "keylegend-pair", children: [unit.entries.map((entry) => (_jsx("button", { "aria-label": legend.capName(chordSpoken(entry.chord, keys), entry.label), className: "keylegend-cap", onClick: entry.run, onMouseDown: keepFocus, tabIndex: -1, type: "button", ...tooltip(entry.label, chordGlyphs(entry.chord, keys)), children: _jsx(KeyChord, { chord: entry.chord }) }, entry.chord.key))), _jsx("span", { "aria-hidden": true, className: "keylegend-pair-label", children: unit.label })] }, unit.label + chordGlyphs(first.chord, keys)));
79
+ return (_jsxs("span", { className: "keylegend-pair", children: [unit.entries.map((entry) => (_jsx("button", { "aria-label": legend.capName(chordSpoken(entry.chord, keys), entry.label), className: "keylegend-cap", onClick: entry.run, onMouseDown: keepFocus, tabIndex: -1, type: "button", ...tooltip(entry.label, entry.chord), children: _jsx(KeyChord, { chord: entry.chord }) }, entry.chord.key))), _jsx("span", { "aria-hidden": true, className: "keylegend-pair-label", children: unit.label })] }, unit.label + chordGlyphs(first.chord, keys)));
80
80
  };
81
81
  return (_jsxs("footer", { "aria-label": legend.label, className: "keylegend", "data-fn": "false", "data-layer": "none", children: [_jsxs("span", { "aria-hidden": true, className: "keylegend-dock", children: [_jsx("span", { className: "keylegend-key keylegend-dock-fn", children: "fn" }), DOCK.map(({ mod, Icon }) => (_jsx("span", { className: held.has(mod) ? 'keylegend-key held' : 'keylegend-key', children: _jsx(Icon, { className: "key-icon" }) }, mod)))] }), _jsx("span", { className: "keylegend-row", children: _jsx("span", { "aria-label": legend.verbs, className: "keylegend-verbs", role: "group", children: units.map(place) }) })] }));
82
82
  }
@@ -12,10 +12,10 @@
12
12
  position: relative;
13
13
  display: flex;
14
14
  align-items: center;
15
- height: 34px;
16
- flex: 0 0 34px;
17
- padding: 0 8px 0 10px;
18
- border-top: 1px solid var(--border);
15
+ height: var(--bar-height-lg);
16
+ flex: 0 0 var(--bar-height-lg);
17
+ padding: 0 var(--space-4);
18
+ border-top: var(--line) solid var(--border);
19
19
  background: var(--surface-header);
20
20
  }
21
21
 
@@ -29,120 +29,145 @@
29
29
 
30
30
  .keylegend-dock {
31
31
  display: inline-flex;
32
- gap: 3px;
33
- margin-right: 12px;
34
- padding-right: 12px;
35
- border-right: 1px solid var(--border-strong);
32
+ gap: var(--space-1);
33
+ margin-right: var(--space-6);
34
+ padding-right: var(--space-6);
35
+ border-right: var(--line) solid var(--border-strong);
36
36
  }
37
37
 
38
38
  /* The dock only shows what is held, so its keys are drawn as keys, not
39
- buttons: no pointer, and a fixed box whatever the glyph. */
39
+ buttons: no pointer, and a fixed box whatever the glyph. They are the
40
+ shared key cap (keychord.css) in a fixed width: 18px tall with the 2px
41
+ foot and the 1px pad above it, so the dock and the verbs' caps are one
42
+ key and the glyph lands on whole pixels. */
40
43
  .keylegend-dock .keylegend-key {
41
44
  display: inline-flex;
42
45
  align-items: center;
43
46
  justify-content: center;
44
47
  box-sizing: border-box;
45
48
  width: 24px;
46
- height: 20px;
47
- padding: 0;
48
- border: 1px solid var(--border-strong);
49
- border-bottom-width: 2px;
50
- border-radius: 4px;
51
- background: var(--bg-panel);
49
+ height: 18px;
50
+ padding: 0 0 var(--line);
51
+ border: var(--line) solid var(--border-strong);
52
+ border-bottom-width: var(--line-strong);
53
+ border-radius: var(--radius-sm);
54
+ background: var(--surface);
52
55
  color: var(--text-dim);
53
56
  cursor: default;
54
57
  }
55
58
 
56
59
  .keylegend-dock .keylegend-key .key-icon {
57
- width: 12px;
58
- height: 12px;
60
+ width: var(--icon-sm);
61
+ height: var(--icon-sm);
59
62
  }
60
63
 
64
+ /* A held key fills with the accent and keeps its foot, a shade darker than
65
+ its face in every theme, the same shape as a dialog's lit key. */
61
66
  .keylegend-dock .keylegend-key.held {
62
67
  background: var(--accent);
63
68
  border-color: var(--accent);
69
+ border-bottom-color: var(--key-foot-shade);
64
70
  color: var(--on-accent);
65
71
  }
66
72
 
67
73
  /* The fn key sits first in the dock, where a laptop keyboard prints it; it
68
- is wider than the modifier glyphs because it is a word. */
74
+ is wider than the modifier glyphs because it is a word, set as every key
75
+ word is (esc, space). */
69
76
  .keylegend-dock .keylegend-dock-fn {
70
77
  width: 28px;
71
- font: 11px var(--font-mono);
72
- }
73
-
74
- .keylegend-verbs button:focus-visible {
75
- outline: 2px solid var(--accent);
76
- outline-offset: 1px;
78
+ font: var(--font-weight-strong) var(--font-size-key) var(--font-mono);
77
79
  }
78
80
 
81
+ /* The verbs as one line of whole places. A place that does not fit wraps
82
+ to a second line the strip never shows, so the row always ends on a
83
+ complete key and verb, never on a cut cap or a key that names nothing. */
79
84
  .keylegend-verbs {
80
85
  display: flex;
86
+ flex-wrap: wrap;
81
87
  align-items: center;
88
+ align-content: flex-start;
82
89
  flex: 1;
83
90
  min-width: 0;
91
+ height: var(--control-height-sm);
84
92
  overflow: hidden;
85
93
  }
86
94
 
87
95
  .keylegend-verbs button {
88
96
  display: inline-flex;
89
97
  align-items: center;
90
- gap: 6px;
91
- height: 24px;
92
- padding: 0 7px 0 4px;
98
+ gap: var(--space-3);
99
+ height: var(--control-height-sm);
100
+ padding: 0 var(--space-3) 0 var(--space-2);
93
101
  background: none;
94
102
  border: none;
95
- border-radius: 5px;
103
+ border-radius: var(--radius-sm);
96
104
  color: var(--text);
97
105
  font: inherit;
98
- font-size: 12px;
106
+ font-size: var(--font-size-small);
99
107
  white-space: nowrap;
100
- cursor: pointer;
108
+ cursor: default;
101
109
  }
102
110
 
103
- .keylegend-verbs button:hover:enabled:not([aria-disabled='true']) {
104
- background: var(--hover-wash);
105
- box-shadow: var(--hover-frost);
106
- }
111
+ /* Hover (wash and frosted ring) and press come from the base sheet's quiet
112
+ control recipe, with the Button's transition. */
107
113
 
108
114
  /* Two directions of one action in one slot: each key cap is its own button,
109
115
  lit alone under the pointer, and the shared label is not a target. The
110
- caps keep a plain slot's spacing: 4px in, 6px apart, 6px to the label. */
116
+ caps keep a plain slot's spacing: 4px in, 6px apart, 6px to the label,
117
+ each cap padded by half the 6px icon-to-label step. */
111
118
  .keylegend-pair {
112
119
  display: inline-flex;
113
120
  align-items: center;
114
- height: 24px;
115
- padding: 0 7px 0 1px;
121
+ height: var(--control-height-sm);
122
+ padding: 0 var(--space-3) 0 calc(var(--space-2) - var(--space-3) / 2);
116
123
  color: var(--text);
117
- font-size: 12px;
124
+ font-size: var(--font-size-small);
118
125
  white-space: nowrap;
119
126
  }
120
127
 
121
128
  .keylegend-verbs .keylegend-cap {
122
129
  gap: 0;
123
- padding: 0 3px;
130
+ padding: 0 calc(var(--space-3) / 2);
124
131
  }
125
132
 
126
- .keylegend-pair-label {
127
- margin-left: 3px;
133
+ /* A cap that is its own button is opaque and covers the button whole, so
134
+ a wash on the button would never show: hover and press answer on the cap
135
+ itself, as the filter's escape key does, over the cap's own ground. A
136
+ press keeps the inner hairline its hover drew under the pressed shadow,
137
+ as the shared press recipe does, so it never reads as hover. */
138
+ .keylegend-verbs .keylegend-cap:is(:hover, :active) {
139
+ background: none;
140
+ box-shadow: none;
128
141
  }
129
142
 
130
- .keylegend .keychord {
131
- height: 18px;
132
- min-width: 20px;
133
- justify-content: center;
134
- padding: 0 4px;
135
- border-radius: 4px;
136
- color: var(--accent);
137
- background: color-mix(in srgb, var(--accent) 14%, transparent);
143
+ .keylegend-verbs .keylegend-cap .keychord {
144
+ transition: var(--transition-control);
138
145
  }
139
146
 
140
- /* At rest the caps are drawn as plain keys. A legend that shows one layer
141
- at a time sets data-layer to the held modifier, and data-fn while fn is
142
- held, so its caps take the accent with the layer. */
143
- .keylegend[data-layer='none']:not([data-fn='true']) .keychord {
144
- box-sizing: border-box;
145
- color: var(--text);
146
- background: var(--bg-panel);
147
- border: 1px solid var(--border-strong);
147
+ .keylegend-verbs .keylegend-cap:hover:enabled .keychord {
148
+ background: linear-gradient(var(--hover-wash), var(--hover-wash)) var(--surface);
149
+ box-shadow: var(--hover-frost);
150
+ }
151
+
152
+ .keylegend-verbs .keylegend-cap:active:enabled .keychord {
153
+ background: linear-gradient(var(--pressed-wash), var(--pressed-wash)) var(--surface);
154
+ box-shadow:
155
+ var(--shadow-pressed),
156
+ inset 0 0 0 var(--line) var(--border-strong);
157
+ }
158
+
159
+ .keylegend-pair-label {
160
+ margin-left: calc(var(--space-3) / 2);
161
+ }
162
+
163
+ /* The caps are the shared key cap (keychord.css). A legend that shows one
164
+ layer at a time sets data-layer to the held modifier, and data-fn while fn
165
+ is held, so its caps take the accent with the layer: accent words on the
166
+ accent wash, framed in the opaque accent ring (3:1, as the frame is the
167
+ cap's only edge). KeyLegendStrip lists every layer at once and leaves both
168
+ at rest. */
169
+ .keylegend:is(:not([data-layer='none']), [data-fn='true']) .keychord {
170
+ border-color: var(--current-ring);
171
+ background: var(--accent-wash);
172
+ color: var(--accent-text);
148
173
  }
@@ -67,8 +67,8 @@ export interface StripProps {
67
67
  * its listing (`sort`, and `titleSort` for the name's column), whose label is
68
68
  * the control that sorts it, named by `listing.sortBy` from the labels. In a
69
69
  * table (`table`) it is the header row; `heading` makes the name the
70
- * section's heading. Every visible label carries its whole text as its
71
- * tooltip, since a narrow column cuts it with an ellipsis.
70
+ * section's heading. A visible label that a narrow column cuts with an
71
+ * ellipsis carries its whole text as its tooltip.
72
72
  */
73
73
  export declare function Strip({ title, columns, table, heading, className, titleSort, titleLabel }: StripProps): ReactElement;
74
74
  /** Props for {@link Listing}. */
@@ -102,9 +102,10 @@ export interface ListingProps {
102
102
  * `--pane-grid`, shared by the strip and every row, so each label sits over
103
103
  * its column; a listing whose row links take words gives it as the grid for
104
104
  * a look (`linksColumn`), and its rows take the richest look that keeps it
105
- * inside its pane. A listing with no rows says so in `empty`: a plain line
106
- * under the strip instead of a table, so no column headers stand over a row
107
- * that is not one.
105
+ * inside its pane. A listing with no rows says so in `empty`: a quiet row
106
+ * under the strip instead of a table (`.pane-message.empty`, starting where
107
+ * a row's icon starts, in the rows' type, dim), its column labels left out, so no
108
+ * header stands over a row that is not one.
108
109
  */
109
110
  export declare function Listing({ title, label, grid, columns, className, empty, titleSort, titleLabel, children }: ListingProps): ReactElement;
110
111
  /**
@@ -187,9 +188,13 @@ export interface StateMarkProps {
187
188
  readonly busy?: boolean;
188
189
  }
189
190
  /**
190
- * A state as a State column says it: a dot in the state's tone and its word
191
- * ("running", "error"), or a spinner for a transition. Inside a row the word
192
- * takes the tone too, so a failure reads red and a stopped line dim.
191
+ * A state as a State column says it: a mark in the state's tone and its word
192
+ * ("running", "error"), or a spinner for a transition (the shared
193
+ * `Spinner`, as `RunHeader` turns). Each tone's mark has its own shape too, so it reads
194
+ * without its hue. Inside a row the word takes the tone too, so a failure
195
+ * reads red and a stopped line dim. A word wider than its column ends in an
196
+ * ellipsis and carries itself whole as its tooltip, which a word shown
197
+ * whole does not open.
193
198
  */
194
199
  export declare function StateMark({ tone, word, busy }: StateMarkProps): ReactElement;
195
200
  /** Props for {@link PathCell}. */
@@ -197,8 +202,10 @@ export interface PathCellProps {
197
202
  /** The whole path, slash-separated ("/opt/homebrew/var/mysql"). */
198
203
  readonly path: string;
199
204
  /**
200
- * The name's own class, which colours it by its kind (a folder as a
201
- * folder); the text tone without one. `pathParts(path).base` is the name.
205
+ * The name's own class, which marks it by its kind (a folder as a
206
+ * folder); the text tone without one. A kind's colour is never the
207
+ * accent, which in a row reads as a link. `pathParts(path).base` is the
208
+ * name.
202
209
  */
203
210
  readonly nameClassName?: string;
204
211
  }