@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
@@ -21,9 +21,11 @@
21
21
  }
22
22
 
23
23
  /* A read-only terminal takes focus for selection and copy; say so when the
24
- keyboard put it there. */
24
+ keyboard put it there, with the focus ring inside the edge the mount
25
+ clips at. */
25
26
  .terminal-mount[tabindex='0']:focus-visible {
26
- box-shadow: inset 0 0 0 2px var(--accent);
27
+ outline: var(--focus-ring-width) solid var(--accent);
28
+ outline-offset: var(--focus-offset-inset);
27
29
  }
28
30
 
29
31
  .terminal-canvas {
@@ -33,15 +35,19 @@
33
35
  cursor: text;
34
36
  }
35
37
 
36
- /* The scrollback rail: a thin thumb over the right edge, tinted from the
37
- terminal's own text color so it reads in both flavors. */
38
+ /* The scrollback rail: a thin thumb over the right edge in the theme's
39
+ scrollbar colours, which hold 3:1 on the ground. It behaves as the
40
+ platform's overlay scroll bar: hidden at rest, shown while the user moves
41
+ the scrollback and for a moment after (data-scrolling, set by the
42
+ surface), and while the pointer or the keyboard is on the rail, where it
43
+ also strengthens. It leaves at once when its moment ends. */
38
44
  .terminal-scrollbar {
39
45
  position: absolute;
40
- top: 4px;
46
+ top: var(--space-2);
41
47
  right: 1px;
42
- bottom: 4px;
43
- z-index: 1;
44
- width: 8px;
48
+ bottom: var(--space-2);
49
+ z-index: var(--z-raised);
50
+ width: var(--space-4);
45
51
  cursor: default;
46
52
  touch-action: none;
47
53
  outline: none;
@@ -52,14 +58,31 @@
52
58
  top: 0;
53
59
  right: 1px;
54
60
  left: 1px;
55
- border-radius: 3px;
56
- background: color-mix(in srgb, var(--terminal-fg) 28%, transparent);
57
- transition: background-color 120ms ease-out;
61
+ border-radius: var(--radius-pill);
62
+ background: var(--scrollbar-thumb);
63
+ opacity: 0;
64
+ }
65
+
66
+ .terminal-scrollbar:is([data-scrolling], :hover, :active, :focus-visible)
67
+ .terminal-scrollbar-thumb {
68
+ opacity: 1;
58
69
  }
59
70
 
60
71
  .terminal-scrollbar:hover .terminal-scrollbar-thumb,
72
+ .terminal-scrollbar:active .terminal-scrollbar-thumb {
73
+ background: var(--scrollbar-thumb-hover);
74
+ }
75
+
76
+ /* The rail takes the keys (Page Up, Page Down) when tabbed to: the thumb
77
+ shows and strengthens and the rail wears the focus ring inside the
78
+ mount's edge. */
79
+ .terminal-scrollbar:focus-visible {
80
+ outline: var(--focus-ring-width) solid var(--accent);
81
+ outline-offset: var(--focus-offset-inset);
82
+ }
83
+
61
84
  .terminal-scrollbar:focus-visible .terminal-scrollbar-thumb {
62
- background: color-mix(in srgb, var(--terminal-fg) 50%, transparent);
85
+ background: var(--scrollbar-thumb-hover);
63
86
  }
64
87
 
65
88
  /* Holds a read-only terminal's selection as DOM text, selected, so the Edit
@@ -71,56 +94,57 @@
71
94
  overflow: hidden;
72
95
  clip-path: inset(50%);
73
96
  white-space: pre;
97
+ -webkit-user-select: text;
74
98
  user-select: text;
75
99
  }
76
100
 
77
- /* Set where the terminal's first line would be: the engine's 4px in, at its
78
- size and pitch. */
101
+ /* A terminal that could not start says so as a state, set as terminal
102
+ text where the first line would be: the terminal's monospace at 13px on
103
+ 19px lines (the engine's TERMINAL_FONT_SIZE and TERMINAL_LINE_HEIGHT), at
104
+ the engine's 4px inset, on the terminal's own ground. The danger glyph
105
+ carries the tone and the words keep the terminal's text colour, as a
106
+ status line does; no notice frame, bar, or interface font. */
79
107
  .terminal-failure {
108
+ display: flex;
80
109
  flex: 1;
110
+ align-items: flex-start;
111
+ gap: 1ch;
81
112
  margin: 0;
82
- padding: 4px;
113
+ padding: var(--space-2);
83
114
  background: var(--terminal-bg);
84
115
  color: var(--terminal-fg);
85
- font: 13px/19px var(--font-mono);
116
+ font: var(--font-size-body)/19px var(--font-mono);
117
+ }
118
+
119
+ .terminal-failure-glyph {
120
+ flex: none;
121
+ /* One line tall, so the glyph centres on the first line's 19px. */
122
+ height: 1lh;
123
+ color: var(--danger);
124
+ }
125
+
126
+ .terminal-failure-text {
127
+ min-width: 0;
128
+ margin: 0;
129
+ overflow-wrap: anywhere;
130
+ -webkit-user-select: text;
131
+ user-select: text;
86
132
  }
87
133
 
88
134
  /* The terminal's menu (TerminalMenu), which a secondary click opens at the
89
- point it landed: the menu look (menu.css) in surface, row metrics, and
90
- chords, drawn here because a terminal sits anywhere, outside any
91
- .listing-root and in dialogs. Fixed, since it is placed in window
92
- coordinates over the screen it acts on. */
93
- .terminal-menu {
135
+ point it landed: the menu look (.folder-menu and .folder-menu-option in
136
+ menu.css) placed in window coordinates over the screen it acts on. It is
137
+ drawn through a portal on the document's body, so neither a scrolling
138
+ pane nor a dialog's clipping cuts it, at the layer of a popover opened
139
+ from inside a dialog: above a dialog the terminal may sit in, below the
140
+ tooltip that names its items. */
141
+ .folder-menu.terminal-menu {
94
142
  position: fixed;
95
143
  top: 0;
96
144
  left: 0;
97
- z-index: var(--z-panel);
98
- display: flex;
99
- flex-direction: column;
145
+ z-index: var(--z-dialog-popover);
146
+ width: auto;
100
147
  min-width: 180px;
101
- padding: 4px;
102
- background: var(--surface);
103
- border: 1px solid var(--border-strong);
104
- border-radius: 8px;
105
- box-shadow: var(--shadow-menu);
106
- color: var(--text);
107
- font: 12px var(--font-mono);
108
- outline: none;
109
- }
110
-
111
- /* A row: its icon, its name, and its chord at the right edge. */
112
- .terminal-menu-item {
113
- display: grid;
114
- grid-template-columns: 20px minmax(0, 1fr) auto;
115
- align-items: center;
116
- height: 24px;
117
- padding: 0 6px;
118
- border-radius: 4px;
119
- cursor: default;
120
- }
121
-
122
- .terminal-menu-item.cursor {
123
- background: var(--cursor-row-bg);
124
148
  }
125
149
 
126
150
  .terminal-menu-icon {
@@ -129,24 +153,30 @@
129
153
  color: var(--text-dim);
130
154
  }
131
155
 
132
- .terminal-menu-item .keychord {
133
- padding-left: 10px;
134
- color: var(--text-dim);
156
+ .folder-menu-option.cursor:not([aria-disabled='true']) .terminal-menu-icon {
157
+ color: var(--text-on-surface);
135
158
  }
136
159
 
137
160
  /* The visual bell: a veil of the terminal's own text color over the screen
138
- that fades out over BELL_FLASH_MS (Terminal.logic.ts), so it reads in both
139
- flavors. Under reduced motion it is a still tint at the edges instead, on
140
- for the same time and off again with no fade. */
161
+ that fades out over --duration-slow, which BELL_FLASH_MS
162
+ (Terminal.logic.ts) matches, so it reads in both flavors. Under reduced
163
+ motion it is a still tint at the edges instead, on
164
+ for the same time and off again with no fade. Both mixes are named on the
165
+ mount, so the veil and the edge read one definition each. */
166
+ .terminal-mount {
167
+ --terminal-bell-wash: color-mix(in srgb, var(--terminal-fg) 12%, transparent);
168
+ --terminal-bell-line: color-mix(in srgb, var(--terminal-fg) 40%, transparent);
169
+ }
170
+
141
171
  .terminal-mount[data-bell]::after {
142
172
  content: '';
143
173
  position: absolute;
144
174
  inset: 0;
145
- z-index: 2;
146
- background: color-mix(in srgb, var(--terminal-fg) 12%, transparent);
175
+ z-index: var(--z-local-overlay);
176
+ background: var(--terminal-bell-wash);
147
177
  pointer-events: none;
148
178
  opacity: 0;
149
- animation: terminal-bell 250ms ease-out;
179
+ animation: terminal-bell var(--duration-slow) var(--ease-out);
150
180
  }
151
181
 
152
182
  @keyframes terminal-bell {
@@ -156,13 +186,9 @@
156
186
  }
157
187
 
158
188
  @media (prefers-reduced-motion: reduce) {
159
- .terminal-scrollbar-thumb {
160
- transition: none;
161
- }
162
-
163
189
  .terminal-mount[data-bell]::after {
164
190
  background: none;
165
- box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--terminal-fg) 40%, transparent);
191
+ box-shadow: inset 0 0 0 var(--line-strong) var(--terminal-bell-line);
166
192
  opacity: 1;
167
193
  animation: none;
168
194
  }
@@ -1,11 +1,20 @@
1
1
  /* ---- Marked text (MarkedText) ----
2
2
 
3
- Matched characters are tinted, never recoloured: a row name may already
3
+ Matched characters are marked, never recoloured: a row name may already
4
4
  carry a colour of its own (a file's kind), and repainting it would trade
5
- that colour for the match. The tint sits behind whatever colour the name
6
- has, so it composes with names that draw their own background too. Drawn
7
- inside the listing scope (.listing-root). */
8
- :where(.listing-root) .name-hit {
9
- border-radius: 2px;
10
- background: color-mix(in srgb, var(--accent) 22%, transparent);
5
+ that colour for the match. The mark is a light wash behind the text that
6
+ keeps the text at 4.5:1 on a listing, a panel, and the cursor row, and an
7
+ underline that carries the mark on any row colour. It draws wherever
8
+ MarkedText is used, inside a listing scope or not.
9
+
10
+ Where a name is cut with an ellipsis, an inline mark that runs under the
11
+ cut paints its wash behind the ellipsis and past it, so the cut reads as
12
+ a match. A mark is an atomic box (inline-block) instead: a cut that falls
13
+ inside it replaces it whole with the ellipsis, which never takes its
14
+ wash. */
15
+ .name-hit {
16
+ display: inline-block;
17
+ border-radius: var(--radius-xs);
18
+ background: var(--match-bg);
19
+ box-shadow: inset 0 calc(-1 * var(--line-strong)) 0 var(--match-mark);
11
20
  }
@@ -55,9 +55,10 @@ const CATPPUCCIN_LATTE = {
55
55
  // Lavender a step stronger than the primary hue itself, so the fill
56
56
  // carries white text at 4.7:1 where the hue stops at 3.2:1.
57
57
  '--primary': '#5468e4',
58
- // Indigo holds 5.1:1 on the tonal tint, where the primary itself holds
59
- // only 3.6:1 and lavender 2.5:1.
60
- '--on-tonal': '#3f51c7',
58
+ // Indigo holds 4.5:1 on the tonal tint and on its hover and pressed
59
+ // fills, where the primary itself holds only 3.6:1 on the tint and
60
+ // lavender 2.5:1.
61
+ '--on-tonal': '#3746ad',
61
62
  // A blue hairline a step deeper than the tint, so the tonal button reads
62
63
  // as a button rather than as a highlighted row inside tables.
63
64
  '--tonal-border': '#b9c8ee'