@adecore/ui 0.35.4 → 0.36.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 (66) hide show
  1. package/dist/Button.d.ts +2 -3
  2. package/dist/Button.js +21 -46
  3. package/dist/Checkbox.js +1 -1
  4. package/dist/ChoiceCards.js +2 -2
  5. package/dist/IconPicker.d.ts +2 -1
  6. package/dist/IconPicker.js +504 -217
  7. package/dist/Input.d.ts +5 -3
  8. package/dist/Input.js +127 -112
  9. package/dist/Segmented.js +1 -1
  10. package/dist/SplitButton.d.ts +17 -0
  11. package/dist/SplitButton.js +237 -0
  12. package/dist/Stepper.js +1 -1
  13. package/dist/Switch.js +1 -1
  14. package/dist/Tile.js +2 -2
  15. package/dist/button-class.d.ts +6 -0
  16. package/dist/button-class.js +92 -0
  17. package/dist/command-palette/parts.d.ts +2 -2
  18. package/dist/command-palette/parts.js +125 -164
  19. package/dist/file-tree/empty-lines.d.ts +11 -0
  20. package/dist/file-tree/empty-lines.js +89 -0
  21. package/dist/file-tree/highlight.d.ts +4 -0
  22. package/dist/file-tree/highlight.js +75 -0
  23. package/dist/file-tree/parts.d.ts +9 -1
  24. package/dist/file-tree/parts.js +297 -205
  25. package/dist/file-tree/style.js +13 -0
  26. package/dist/file-tree/use-empty-lines.d.ts +3 -0
  27. package/dist/file-tree/use-empty-lines.js +176 -0
  28. package/dist/file-tree/use-file-tree.js +5 -1
  29. package/dist/file-tree/use-slots.d.ts +16 -2
  30. package/dist/file-tree/use-slots.js +186 -43
  31. package/dist/index.d.ts +1 -0
  32. package/dist/index.js +1 -0
  33. package/dist/locales/en.d.ts +1 -0
  34. package/dist/locales/en.js +1 -0
  35. package/dist/locales/nl.d.ts +1 -0
  36. package/dist/locales/nl.js +1 -0
  37. package/dist/select-shared.d.ts +1 -1
  38. package/dist/select-shared.js +1 -1
  39. package/dist/settings/SettingsDialog.js +1 -1
  40. package/dist/theme.css +33 -3
  41. package/package.json +1 -1
  42. package/src/Button.tsx +3 -36
  43. package/src/Checkbox.tsx +1 -1
  44. package/src/ChoiceCards.tsx +2 -2
  45. package/src/IconPicker.tsx +220 -136
  46. package/src/Input.tsx +19 -10
  47. package/src/Segmented.tsx +1 -1
  48. package/src/SplitButton.tsx +72 -0
  49. package/src/Stepper.tsx +6 -1
  50. package/src/Switch.tsx +1 -1
  51. package/src/Tile.tsx +2 -2
  52. package/src/button-class.ts +111 -0
  53. package/src/command-palette/parts.tsx +34 -2
  54. package/src/file-tree/empty-lines.ts +105 -0
  55. package/src/file-tree/highlight.ts +80 -0
  56. package/src/file-tree/parts.tsx +42 -11
  57. package/src/file-tree/style.ts +13 -0
  58. package/src/file-tree/use-empty-lines.ts +115 -0
  59. package/src/file-tree/use-file-tree.ts +2 -1
  60. package/src/file-tree/use-slots.ts +176 -17
  61. package/src/index.ts +1 -0
  62. package/src/locales/en.ts +1 -0
  63. package/src/locales/nl.ts +1 -0
  64. package/src/select-shared.ts +2 -1
  65. package/src/settings/SettingsDialog.tsx +1 -1
  66. package/src/theme.css +33 -3
package/src/theme.css CHANGED
@@ -17,9 +17,16 @@
17
17
  than the pressed step, so hover reads as a lift and pressed as the heavier state. A white
18
18
  popup cannot go lighter, so in this theme the step is the softest gray there is. */
19
19
  --surface-hover: #f3f3f5;
20
+ /* The hover of something that draws its own border: a smaller step, so the ground never passes
21
+ its edge and the outline stays visible under the pointer. */
22
+ --surface-hover-edged: color-mix(in srgb, var(--surface-raised) 60%, var(--surface-hover));
20
23
  /* The pressed step of a toggle. It cannot be `--surface-raised`, which equals `--surface` in the
21
24
  light theme, and it has to sit a shade past `--surface-hover` so pressed outranks hover. */
22
25
  --surface-active: #dcdce2;
26
+ /* What a person types or picks in: a step lighter than the ground it stands on in the dark theme, the raised white here. */
27
+ --field: var(--surface-raised);
28
+ /* An edge of its own, since an app may set `--border` to a solid separator that vanishes against a field. */
29
+ --field-border: rgb(0 0 0 / 0.11);
23
30
  /* Borders carry an alpha rather than a gray of their own, so a line takes the color of whatever
24
31
  it is drawn over instead of fighting it. A gray hairline over a tinted surface reads as a
25
32
  smudge; the same line in black at a low alpha stays a line. Everything with a surface of its
@@ -41,6 +48,9 @@
41
48
  --accent-soft: color-mix(in srgb, var(--accent) 16%, var(--surface));
42
49
  --accent-text: #ffffff;
43
50
  --selection: rgb(var(--accent-rgb) / 0.55);
51
+ /* The part of a name that answers a filter or a search. A tint of its own rather than the
52
+ selection's, so a selected row that matches still shows both. */
53
+ --match: color-mix(in srgb, var(--status-needs-you) 30%, transparent);
44
54
  --float-shadow:
45
55
  0 1px 2px -1px rgb(0 0 0 / 0.08),
46
56
  0 3px 6px -2px rgb(0 0 0 / 0.07),
@@ -106,9 +116,12 @@
106
116
  --bg: #0d0d10;
107
117
  --surface: #131316;
108
118
  --surface-raised: #18181c;
109
- --surface-sunken: #08080a;
119
+ --surface-sunken: #0b0b0e;
110
120
  --surface-hover: #202024;
111
121
  --surface-active: #28282e;
122
+ /* Derived, so an app that tints its surfaces tints its fields along. */
123
+ --field: color-mix(in srgb, var(--surface) 40%, var(--surface-hover));
124
+ --field-border: rgb(255 255 255 / 0.1);
112
125
  /* White at a low alpha, which is what gives a dark surface its lifted edge. */
113
126
  --border: rgb(255 255 255 / 0.07);
114
127
  --separator: oklch(0.236 0.006 285.956);
@@ -118,6 +131,7 @@
118
131
  --text-muted: #9a9aa6;
119
132
  --text-faint: #5f5f6b;
120
133
  --selection: rgb(var(--accent-rgb) / 0.6);
134
+ --match: color-mix(in srgb, var(--status-needs-you) 28%, transparent);
121
135
  --float-shadow:
122
136
  0 1px 2px -1px rgb(0 0 0 / 0.3),
123
137
  0 2px 4px rgb(0 0 0 / 0.24),
@@ -233,7 +247,10 @@
233
247
  --color-surface-sunken: var(--surface-sunken);
234
248
  --color-surface-idle: var(--surface-idle);
235
249
  --color-surface-hover: var(--surface-hover);
250
+ --color-surface-hover-edged: var(--surface-hover-edged);
236
251
  --color-surface-active: var(--surface-active);
252
+ --color-field: var(--field);
253
+ --color-field-border: var(--field-border);
237
254
  --color-border: var(--border);
238
255
  --color-separator: var(--separator);
239
256
  --color-border-strong: var(--border-strong);
@@ -261,6 +278,10 @@
261
278
  }
262
279
 
263
280
  @layer base {
281
+ /* Whatever a click acts on shows the hand; a disabled one shows that nothing will. Menu rows keep the arrow (`.menu-item`). */
282
+ :where(button, a[href], summary, label[for], [role="button"], [role="checkbox"], [role="switch"], [role="radio"], [role="tab"], [role="option"]):not(:disabled, [aria-disabled="true"], [data-disabled]) {
283
+ cursor: pointer;
284
+ }
264
285
  /*
265
286
  * A border with an alpha has to mix with what is behind the element, not with the element's own
266
287
  * background: by default a background runs on under the border and a node's white surface would
@@ -326,8 +347,8 @@
326
347
  width: 100%;
327
348
  padding: 0 10px;
328
349
  border-radius: 8px;
329
- border: 1px solid var(--border);
330
- background: var(--surface);
350
+ border: 1px solid var(--field-border);
351
+ background-color: var(--field);
331
352
  color: var(--text);
332
353
  font-size: var(--text-sm);
333
354
  outline: none;
@@ -345,6 +366,10 @@
345
366
  border-radius: 6px;
346
367
  font-size: var(--text-xs);
347
368
  }
369
+ /* A field inside a card that draws the edge and the focus for it. The border stays as a transparent
370
+ line, so the text sits where it would in a field of its own. */
371
+ .field-bare { border-color: transparent; background: transparent; }
372
+ .field-bare:focus-visible { outline: none; }
348
373
  /* Keyboard focus is visible on every control; pointer focus stays quiet. `.focus-ring` is the
349
374
  same outline for something that takes focus without being a button, such as a row in a list. */
350
375
  .icon-btn:focus-visible, .menu-item:focus-visible, button:focus-visible, .focus-ring:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@@ -683,6 +708,11 @@
683
708
  .adecore-tree-decoration {
684
709
  font-variant-numeric: tabular-nums;
685
710
  }
711
+ /* A row's own icon in place of the tree's glyph, in the glyph's color. */
712
+ .adecore-tree-icon {
713
+ display: inline-flex;
714
+ color: var(--text-muted);
715
+ }
686
716
  /* A tree whose rows slide sideways: every part of a row keeps its width and moves with the shift. */
687
717
  .adecore-tree[data-overflow="scroll"] .adecore-tree-row {
688
718
  overflow: clip;