@dxos/ui-theme 0.8.4-main.9be5663bfe → 0.8.4-main.bc2380dfbc

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 (86) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +88 -84
  4. package/dist/lib/browser/index.mjs.map +4 -4
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/node-esm/index.mjs +88 -84
  7. package/dist/lib/node-esm/index.mjs.map +4 -4
  8. package/dist/lib/node-esm/meta.json +1 -1
  9. package/dist/plugin/node-cjs/main.css +147 -106
  10. package/dist/plugin/node-cjs/main.css.map +2 -2
  11. package/dist/plugin/node-cjs/meta.json +1 -1
  12. package/dist/plugin/node-esm/main.css +147 -106
  13. package/dist/plugin/node-esm/main.css.map +2 -2
  14. package/dist/plugin/node-esm/meta.json +1 -1
  15. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +2 -2
  16. package/dist/types/src/Theme.stories.d.ts.map +1 -1
  17. package/dist/types/src/defs.d.ts +1 -1
  18. package/dist/types/src/defs.d.ts.map +1 -1
  19. package/dist/types/src/fragments/density.d.ts +1 -4
  20. package/dist/types/src/fragments/density.d.ts.map +1 -1
  21. package/dist/types/src/fragments/hover.d.ts +0 -1
  22. package/dist/types/src/fragments/hover.d.ts.map +1 -1
  23. package/dist/types/src/fragments/text.d.ts +0 -1
  24. package/dist/types/src/fragments/text.d.ts.map +1 -1
  25. package/dist/types/src/plugins/ThemePlugin.d.ts +1 -1
  26. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -1
  27. package/dist/types/src/theme/components/button.d.ts +2 -2
  28. package/dist/types/src/theme/components/button.d.ts.map +1 -1
  29. package/dist/types/src/theme/components/card.d.ts.map +1 -1
  30. package/dist/types/src/theme/components/dialog.d.ts.map +1 -1
  31. package/dist/types/src/theme/components/icon-button.d.ts +1 -0
  32. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -1
  33. package/dist/types/src/theme/components/input.d.ts +8 -8
  34. package/dist/types/src/theme/components/input.d.ts.map +1 -1
  35. package/dist/types/src/theme/components/main.d.ts.map +1 -1
  36. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -1
  37. package/dist/types/src/theme/primitives/column.d.ts +22 -5
  38. package/dist/types/src/theme/primitives/column.d.ts.map +1 -1
  39. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -1
  40. package/dist/types/src/theme/theme.d.ts.map +1 -1
  41. package/dist/types/src/util/hash-styles.d.ts +1 -1
  42. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  43. package/dist/types/src/util/mx.d.ts +21 -1
  44. package/dist/types/src/util/mx.d.ts.map +1 -1
  45. package/dist/types/src/util/size.d.ts.map +1 -1
  46. package/dist/types/src/util/valence.d.ts +2 -2
  47. package/dist/types/src/util/valence.d.ts.map +1 -1
  48. package/dist/types/tsconfig.tsbuildinfo +1 -1
  49. package/package.json +11 -19
  50. package/src/Theme.stories.tsx +5 -5
  51. package/src/css/DESIGN_SYSTEM.md +159 -0
  52. package/src/css/base/base.css +2 -2
  53. package/src/css/components/button.css +3 -3
  54. package/src/css/components/checkbox.css +1 -1
  55. package/src/css/components/focus.css +12 -12
  56. package/src/css/components/panel.css +45 -45
  57. package/src/css/components/selected.css +61 -15
  58. package/src/css/components/selected.md +101 -0
  59. package/src/css/components/surface.css +4 -4
  60. package/src/css/components/tag.css +25 -23
  61. package/src/css/layout/size.css +16 -3
  62. package/src/css/theme/animation.css +31 -0
  63. package/src/css/theme/semantic.css +36 -40
  64. package/src/css/theme/spacing.css +7 -8
  65. package/src/css/theme/styles.css +22 -22
  66. package/src/css/utilities.css +48 -6
  67. package/src/defs.ts +1 -1
  68. package/src/fragments/AUDIT.md +0 -3
  69. package/src/fragments/density.ts +8 -5
  70. package/src/fragments/hover.ts +0 -2
  71. package/src/fragments/text.ts +1 -1
  72. package/src/main.css +38 -4
  73. package/src/theme/components/button.ts +2 -2
  74. package/src/theme/components/card.ts +4 -0
  75. package/src/theme/components/dialog.ts +5 -3
  76. package/src/theme/components/focus.ts +2 -2
  77. package/src/theme/components/icon-button.ts +6 -3
  78. package/src/theme/components/input.ts +9 -9
  79. package/src/theme/components/message.ts +5 -5
  80. package/src/theme/components/popover.ts +1 -1
  81. package/src/theme/components/scroll-area.ts +10 -5
  82. package/src/theme/components/select.ts +1 -1
  83. package/src/theme/components/tooltip.ts +1 -1
  84. package/src/theme/primitives/column.ts +44 -20
  85. package/src/util/hash-styles.ts +19 -19
  86. package/src/util/mx.ts +3 -3
@@ -0,0 +1,101 @@
1
+ # `dx-*` selection / navigation grammar
2
+
3
+ Companion to `selected.css`. The four selection-state utilities below are
4
+ each bound to a specific ARIA attribute (or `data-*`) selector. **The
5
+ class only fires when the matching ARIA attribute is set on the same
6
+ element.** Mismatches (e.g. `dx-current` paired with `aria-selected`)
7
+ silently render as a plain row.
8
+
9
+ | Class | Bound selector | Pair with | Use when |
10
+ | ---------------- | ---------------------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | `dx-hover` | `hover:` | (no ARIA — pure visual affordance) | Always, on any clickable row. Adds the cursor + hover bg/text. |
12
+ | `dx-selected` | `aria-selected:` | `aria-selected={boolean}` | A row is "the chosen one" driving a master/detail panel. Listbox / option pattern. Multi-select OK. |
13
+ | `dx-current` | `aria-[current=true]:` | `aria-current='true'` | A row is "where you are" in a navigation set (current page, current step). At most one current per group. The CSS variant fires only on `aria-current='true'`, so use that literal even on `<a>`/nav links. |
14
+ | `dx-highlighted` | `data-[highlighted]:` | Radix `data-highlighted` (managed) | A Radix-managed transient highlight (menu / combobox active option). Don't set the attribute manually. |
15
+
16
+ ## Rules
17
+
18
+ 1. **Never combine `dx-selected` and `dx-current` on the same element**
19
+ unless you also set both `aria-selected` and `aria-current`. They
20
+ express different things (chosen vs you-are-here) and the visual
21
+ weight is similar enough that combining them defeats both.
22
+ 2. **`aria-pressed`, `aria-checked`, `aria-expanded`, `aria-disabled`
23
+ are not selection-row attributes.** None of the `dx-*` selection
24
+ utilities pair with them. Toggle buttons (mute/unmute) want
25
+ `aria-pressed`; a selection row wants `aria-selected`.
26
+ 3. **`aria-selected` is only valid on roles that admit it** — `option`,
27
+ `tab`, `gridcell`, `row`, `treeitem`, `columnheader`, `rowheader`.
28
+ On a plain `<button>` inside a `<ul role='listbox'>`, give the button
29
+ `role='option'` so assistive tech sees the attribute.
30
+ 4. **`dx-active` does not exist.** If you see it in code it's a no-op
31
+ string. Use `dx-selected` (selection) or `dx-current` (navigation)
32
+ instead.
33
+ 5. **Set ARIA before adding the class.** The class is inert without
34
+ the attribute; it's not a fallback styler. Reviewers should reject
35
+ PRs that add `dx-selected` without `aria-selected`.
36
+
37
+ ## Canonical patterns
38
+
39
+ ### Selectable row in a list (master/detail)
40
+
41
+ ```tsx
42
+ <ul role='listbox' aria-label='…'>
43
+ {items.map((item) => (
44
+ <li key={item.id} role='presentation'>
45
+ <button
46
+ type='button'
47
+ role='option'
48
+ aria-selected={item.id === selectedId}
49
+ className='dx-hover dx-selected'
50
+ onClick={() => onSelect(item.id)}
51
+ >
52
+ {item.label}
53
+ </button>
54
+ </li>
55
+ ))}
56
+ </ul>
57
+ ```
58
+
59
+ ### "You are here" in a navigation list
60
+
61
+ ```tsx
62
+ <nav>
63
+ <ul>
64
+ {pages.map((page) => (
65
+ <li key={page.href}>
66
+ <a
67
+ href={page.href}
68
+ aria-current={page.href === currentHref ? 'true' : undefined}
69
+ className='dx-hover dx-current'
70
+ >
71
+ {page.label}
72
+ </a>
73
+ </li>
74
+ ))}
75
+ </ul>
76
+ </nav>
77
+ ```
78
+
79
+ ### Toggle button (NOT a row)
80
+
81
+ Don't reach for `dx-selected` here. Toggle buttons want their own
82
+ visual treatment via `aria-pressed:` variants — out of scope for this
83
+ file.
84
+
85
+ ```tsx
86
+ <button type='button' aria-pressed={muted} onClick={toggleMute}>
87
+ {muted ? 'Unmute' : 'Mute'}
88
+ </button>
89
+ ```
90
+
91
+ ## Enforcing the grammar
92
+
93
+ A future ESLint rule could flag:
94
+
95
+ - `dx-selected` without `aria-selected` on the same element.
96
+ - `dx-current` without `aria-current` on the same element.
97
+ - `dx-active` literal anywhere.
98
+
99
+ Until that exists, reviewers and the `react-ui-list` `RowList` /
100
+ `CardList` containers (which set both attribute and class together)
101
+ are the enforcement.
@@ -4,22 +4,22 @@
4
4
 
5
5
  @layer dx-components {
6
6
  .dx-base-surface {
7
- @apply bg-base-surface text-base-surface-text;
7
+ @apply bg-base-surface text-base-foreground;
8
8
  --surface-bg: var(--color-base-surface);
9
9
  }
10
10
 
11
11
  .dx-sidebar-surface {
12
- @apply bg-sidebar-surface text-base-surface-text;
12
+ @apply bg-sidebar-surface text-base-foreground;
13
13
  --surface-bg: var(--color-sidebar-surface);
14
14
  }
15
15
 
16
16
  .dx-modal-surface {
17
- @apply bg-modal-surface text-base-surface-text backdrop-blur-md;
17
+ @apply bg-modal-surface text-base-foreground backdrop-blur-md;
18
18
  --surface-bg: var(--color-modal-surface);
19
19
  }
20
20
 
21
21
  .dx-attention-surface {
22
- @apply bg-attention-surface text-base-surface-text;
22
+ @apply bg-attention-surface text-base-foreground;
23
23
  --surface-bg: var(--color-attention-surface);
24
24
  }
25
25
  }
@@ -11,7 +11,9 @@
11
11
 
12
12
  .dx-tag--anchor {
13
13
  /* NOTE: Margin offsets padding so that border is flush with text. This should only apply to anchor tags inside of Codemirror. */
14
- @apply inline cursor-pointer -mx-[4px] px-[3px] py-0.5 border border-separator rounded-xs bg-group-surface transition-colors;
14
+ @apply inline cursor-pointer -mx-[3px] px-[2px] py-0.5 border rounded-xs transition-colors;
15
+ /** TODO(burdon): Configure secondary color. */
16
+ @apply bg-group-surface text-sky-foreground border-sky-border;
15
17
 
16
18
  &:hover {
17
19
  @apply bg-hover-surface;
@@ -20,111 +22,111 @@
20
22
 
21
23
  .dx-tag[data-hue='neutral'],
22
24
  .dx-tag--neutral {
23
- @apply bg-neutral-surface text-neutral-surface-text;
25
+ @apply bg-neutral-surface text-neutral-foreground;
24
26
  }
25
27
 
26
28
  .dx-tag[data-hue='red'],
27
29
  .dx-tag--red {
28
- @apply bg-red-surface text-red-surface-text;
30
+ @apply bg-red-surface text-red-foreground;
29
31
  }
30
32
 
31
33
  .dx-tag[data-hue='orange'],
32
34
  .dx-tag--orange {
33
- @apply bg-orange-surface text-orange-surface-text;
35
+ @apply bg-orange-surface text-orange-foreground;
34
36
  }
35
37
 
36
38
  .dx-tag[data-hue='amber'],
37
39
  .dx-tag--amber {
38
- @apply bg-amber-surface text-amber-surface-text;
40
+ @apply bg-amber-surface text-amber-foreground;
39
41
  }
40
42
 
41
43
  .dx-tag[data-hue='yellow'],
42
44
  .dx-tag--yellow {
43
- @apply bg-yellow-surface text-yellow-surface-text;
45
+ @apply bg-yellow-surface text-yellow-foreground;
44
46
  }
45
47
 
46
48
  .dx-tag[data-hue='lime'],
47
49
  .dx-tag--lime {
48
- @apply bg-lime-surface text-lime-surface-text;
50
+ @apply bg-lime-surface text-lime-foreground;
49
51
  }
50
52
 
51
53
  .dx-tag[data-hue='green'],
52
54
  .dx-tag--green {
53
- @apply bg-green-surface text-green-surface-text;
55
+ @apply bg-green-surface text-green-foreground;
54
56
  }
55
57
 
56
58
  .dx-tag[data-hue='emerald'],
57
59
  .dx-tag--emerald {
58
- @apply bg-emerald-surface text-emerald-surface-text;
60
+ @apply bg-emerald-surface text-emerald-foreground;
59
61
  }
60
62
 
61
63
  .dx-tag[data-hue='teal'],
62
64
  .dx-tag--teal {
63
- @apply bg-teal-surface text-teal-surface-text;
65
+ @apply bg-teal-surface text-teal-foreground;
64
66
  }
65
67
 
66
68
  .dx-tag[data-hue='cyan'],
67
69
  .dx-tag--cyan {
68
- @apply bg-cyan-surface text-cyan-surface-text;
70
+ @apply bg-cyan-surface text-cyan-foreground;
69
71
  }
70
72
 
71
73
  .dx-tag[data-hue='sky'],
72
74
  .dx-tag--sky {
73
- @apply bg-sky-surface text-sky-surface-text;
75
+ @apply bg-sky-surface text-sky-foreground;
74
76
  }
75
77
 
76
78
  .dx-tag[data-hue='blue'],
77
79
  .dx-tag--blue {
78
- @apply bg-blue-surface text-blue-surface-text;
80
+ @apply bg-blue-surface text-blue-foreground;
79
81
  }
80
82
 
81
83
  .dx-tag[data-hue='indigo'],
82
84
  .dx-tag--indigo {
83
- @apply bg-indigo-surface text-indigo-surface-text;
85
+ @apply bg-indigo-surface text-indigo-foreground;
84
86
  }
85
87
 
86
88
  .dx-tag[data-hue='violet'],
87
89
  .dx-tag--violet {
88
- @apply bg-violet-surface text-violet-surface-text;
90
+ @apply bg-violet-surface text-violet-foreground;
89
91
  }
90
92
 
91
93
  .dx-tag[data-hue='purple'],
92
94
  .dx-tag--purple {
93
- @apply bg-purple-surface text-purple-surface-text;
95
+ @apply bg-purple-surface text-purple-foreground;
94
96
  }
95
97
 
96
98
  .dx-tag[data-hue='fuchsia'],
97
99
  .dx-tag--fuchsia {
98
- @apply bg-fuchsia-surface text-fuchsia-surface-text;
100
+ @apply bg-fuchsia-surface text-fuchsia-foreground;
99
101
  }
100
102
 
101
103
  .dx-tag[data-hue='pink'],
102
104
  .dx-tag--pink {
103
- @apply bg-pink-surface text-pink-surface-text;
105
+ @apply bg-pink-surface text-pink-foreground;
104
106
  }
105
107
 
106
108
  .dx-tag[data-hue='rose'],
107
109
  .dx-tag--rose {
108
- @apply bg-rose-surface text-rose-surface-text;
110
+ @apply bg-rose-surface text-rose-foreground;
109
111
  }
110
112
 
111
113
  .dx-tag[data-hue='info'],
112
114
  .dx-tag--info {
113
- @apply bg-cyan-surface text-cyan-surface-text;
115
+ @apply bg-cyan-surface text-cyan-foreground;
114
116
  }
115
117
 
116
118
  .dx-tag[data-hue='success'],
117
119
  .dx-tag--success {
118
- @apply bg-emerald-surface text-emerald-surface-text;
120
+ @apply bg-emerald-surface text-emerald-foreground;
119
121
  }
120
122
 
121
123
  .dx-tag[data-hue='warning'],
122
124
  .dx-tag--warning {
123
- @apply bg-amber-surface text-amber-surface-text;
125
+ @apply bg-amber-surface text-amber-foreground;
124
126
  }
125
127
 
126
128
  .dx-tag[data-hue='error'],
127
129
  .dx-tag--error {
128
- @apply bg-rose-surface text-rose-surface-text;
130
+ @apply bg-rose-surface text-rose-foreground;
129
131
  }
130
132
  }
@@ -3,15 +3,28 @@
3
3
  */
4
4
 
5
5
  @layer dx-components {
6
- /**
7
- * Registers the element as a size query container.
6
+ /**
7
+ * Registers the element as a size query container.
8
8
  * Children can use @container queries to apply styles based on the container's dimensions (both width and height).
9
- * Also enables children to use cqi units (e.g., max-w-[100cqi])
9
+ * Also enables children to use cqi/cqb units (e.g., max-w-[100cqi]).
10
+ * NOTE: `container-type: size` implies layout/size containment, which breaks CodeMirror's
11
+ * coordinate measurement (causes blank viewport sections during scroll until a click forces
12
+ * a re-measure). For editor content where only inline (width-based) queries are needed,
13
+ * use `.dx-inline-size-container` instead.
10
14
  */
11
15
  .dx-size-container {
12
16
  container-type: size;
13
17
  }
14
18
 
19
+ /**
20
+ * Inline-only size query container. Provides cqi units for children without the layout
21
+ * containment side-effects of `container-type: size`. Use this in CodeMirror content
22
+ * wrappers where size containment would break viewport measurement.
23
+ */
24
+ .dx-inline-size-container {
25
+ container-type: inline-size;
26
+ }
27
+
15
28
  /**
16
29
  * Document width.
17
30
  */
@@ -227,3 +227,34 @@
227
227
  }
228
228
  --animate-blink: blink 1s step-start infinite;
229
229
  }
230
+
231
+ /**
232
+ * Shimmer (text)
233
+ * Sweeps a brighter band across text via mask alpha — preserves the consumer's color.
234
+ * Translates exactly one tile period (2× element width) per cycle so the loop seam is invisible.
235
+ */
236
+ @keyframes shimmer-text {
237
+ from {
238
+ mask-position-x: 100%;
239
+ -webkit-mask-position-x: 100%;
240
+ }
241
+ to {
242
+ mask-position-x: -100%;
243
+ -webkit-mask-position-x: -100%;
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Honor user reduced-motion preference for decorative animations.
249
+ * Functional transitions (fade/slide/toast/blink) are intentionally excluded —
250
+ * suppressing them would hide UI state changes.
251
+ */
252
+ @media (prefers-reduced-motion: reduce) {
253
+ .animate-halo-pulse,
254
+ .animate-spin-slow,
255
+ .animate-trail,
256
+ .animate-trail-offset,
257
+ .animate-shimmer {
258
+ animation: none;
259
+ }
260
+ }
@@ -1,21 +1,25 @@
1
1
  /**
2
2
  * Tokens
3
+ *
4
+ * Naming convention: --color-{name}-{part}[-{state}]
5
+ * part : surface | foreground | border | fill | text
6
+ * state : hover | active (optional)
7
+ *
8
+ * See DESIGN_SYSTEM.md.
3
9
  */
4
10
 
5
11
  @theme {
6
12
  /**
7
- * Surfaces
8
- *
9
- * TODO(burdon): Align suffix with styles.css?
10
- * -xxx-surface
11
- * -xxx-surface-text
13
+ * Surfaces
12
14
  */
13
15
 
14
16
  --color-base-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
15
- --color-base-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
17
+ --color-base-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
16
18
 
17
19
  --color-inverse-surface: light-dark(var(--color-neutral-800), var(--color-neutral-200));
18
- --color-inverse-surface-text: light-dark(var(--color-neutral-50), var(--color-neutral-950));
20
+ --color-inverse-foreground: light-dark(var(--color-neutral-50), var(--color-neutral-950));
21
+
22
+ --color-focus-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
19
23
 
20
24
  --color-deck-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
21
25
  --color-scrim-surface: light-dark(
@@ -31,85 +35,77 @@
31
35
  --color-sidebar-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
32
36
  --color-header-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
33
37
 
38
+ /* input */
34
39
  --color-input-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
35
- --color-input-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
40
+ --color-input-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
36
41
 
37
- /** TODO(burdon): current vs active vs selected */
42
+ /* current (aria-current) */
38
43
  --color-current-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
39
- --color-active-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
40
- --color-active-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
44
+ --color-current-surface-hover: light-dark(var(--color-neutral-300), var(--color-neutral-700));
45
+ --color-current-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
46
+
47
+ /* selected (aria-selected) */
48
+ --color-selected-surface: light-dark(var(--color-neutral-150), var(--color-neutral-850));
49
+ --color-selected-surface-hover: light-dark(var(--color-neutral-250), var(--color-neutral-750));
50
+ --color-selected-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
41
51
 
42
- /** TODO(burdon): Merge overlay/surface? */
43
- --color-hover-overlay: light-dark(var(--color-neutral-250), var(--color-neutral-750));
52
+ /* hover (:hover, data-highlighted) */
44
53
  --color-hover-surface: light-dark(var(--color-neutral-250), var(--color-neutral-750));
45
- --color-hover-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
54
+ --color-hover-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
46
55
 
47
56
  /* Map attention to focus-surface logic so that elements acting as active attention zones highlight correctly on focus. */
48
57
  --color-attention-surface: var(--color-focus-surface);
49
58
  --color-attention-contains: oklch(from var(--color-accent-surface) l c h / 0.3);
50
- --color-focus-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
51
- --color-neutral-focus-indicator: light-dark(var(--color-neutral-400), var(--color-neutral-600));
52
-
53
- /* Highlight and Selected */
54
-
55
- --color-highlight-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
56
- --color-highlight-surface-hover: light-dark(var(--color-neutral-250), var(--color-neutral-750));
57
- --color-highlight-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
58
-
59
- --color-selected-surface: light-dark(var(--color-neutral-150), var(--color-neutral-850));
60
- --color-selected-surface-hover: light-dark(var(--color-neutral-250), var(--color-neutral-750));
61
- --color-selected-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
62
59
 
63
60
  /* Accent (primary) */
64
- /* TODO(burdon): Rename primary */
65
-
66
61
  --color-accent-surface: light-dark(var(--color-blue-500), var(--color-blue-700));
67
62
  --color-accent-surface-hover: light-dark(var(--color-blue-800), var(--color-blue-800));
68
- --color-accent-surface-text: var(--color-blue-100);
63
+ --color-accent-foreground: var(--color-blue-100);
69
64
  --color-accent-text: light-dark(var(--color-blue-600), var(--color-blue-400));
70
65
  --color-accent-text-hover: light-dark(var(--color-blue-500), var(--color-blue-500));
71
- --color-accent-focus-indicator: light-dark(var(--color-blue-600), var(--color-blue-600));
72
66
 
73
67
  --color-un-accent: var(--color-neutral-400);
74
68
  --color-un-accent-hover: var(--color-neutral-500);
75
69
 
76
- /* Separator */
70
+ /* Focus rings (global) */
71
+ --color-focus-ring: light-dark(var(--color-blue-600), var(--color-blue-600));
72
+ --color-focus-ring-subtle: light-dark(var(--color-neutral-400), var(--color-neutral-600));
77
73
 
74
+ /* Separator */
78
75
  --color-separator: light-dark(var(--color-neutral-200), var(--color-neutral-800));
79
76
  --color-subdued-separator: light-dark(var(--color-neutral-150), var(--color-neutral-850));
80
77
  --color-primary-separator: light-dark(var(--color-neutral-500), var(--color-neutral-700));
81
78
  --color-active-separator: light-dark(var(--color-blue-500), var(--color-blue-500));
82
79
 
83
80
  /* Scrollbar */
84
-
85
81
  --color-scrollbar-track: light-dark(var(--color-neutral-50), var(--color-neutral-950));
86
82
  --color-scrollbar-thumb: light-dark(var(--color-neutral-200), var(--color-neutral-700));
87
83
  --color-scrollbar-thumb-active: light-dark(var(--color-neutral-200), var(--color-neutral-600));
88
84
  --color-scrollbar-thumb-hover: light-dark(var(--color-neutral-200), var(--color-neutral-600));
89
85
 
90
86
  /* Sheet */
91
-
92
87
  --color-axis-selected-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
93
88
  --color-axis-selected-text: light-dark(var(--color-neutral-100), var(--color-neutral-900));
94
89
  --color-axis-surface: light-dark(var(--color-neutral-50), var(--color-neutral-800));
95
90
  --color-axis-text: light-dark(var(--color-neutral-800), var(--color-neutral-200));
96
91
 
97
- /* Grid */
98
-
92
+ /*
93
+ * Grid
94
+ * NOTE: Update main.css when changing grid tokens (and restart dev server).
95
+ */
99
96
  --color-grid-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
97
+ --color-grid-foreground: light-dark(var(--color-neutral-950), var(--color-neutral-50));
98
+ --color-grid-line: light-dark(var(--color-neutral-200), var(--color-neutral-800));
100
99
  --color-grid-highlight: oklch(from var(--color-emerald-500) l c h / 0.5);
100
+ --color-grid-selection-surface: light-dark(var(--color-blue-500), var(--color-blue-400));
101
+ --color-grid-selection-foreground: light-dark(var(--color-neutral-50), var(--color-neutral-950));
101
102
  --color-grid-comment: light-dark(var(--color-green-400), var(--color-green-600));
102
103
  --color-grid-comment-active: light-dark(
103
104
  oklch(from var(--color-green-400) l c h / 0.5),
104
105
  oklch(from var(--color-green-600) l c h / 0.5)
105
106
  );
106
- --color-grid-hover-overlay: oklch(from var(--color-neutral-500) l c h / 0.1);
107
- --color-grid-selection-overlay: var(--color-blue-500);
108
- --color-grid-line: light-dark(var(--color-neutral-200), var(--color-neutral-800));
109
- --color-grid-focus-indicator: light-dark(var(--color-primary-600), var(--color-primary-600));
110
107
 
111
108
  /* Text */
112
-
113
109
  --color-placeholder: light-dark(var(--color-neutral-400), var(--color-neutral-600));
114
110
  --color-subdued: light-dark(var(--color-neutral-500), var(--color-neutral-500));
115
111
  --color-description: light-dark(var(--color-neutral-600), var(--color-neutral-400));
@@ -9,13 +9,12 @@
9
9
  /** Minimum inset from the viewport edge for floating surfaces. */
10
10
  --spacing-screen-border: 2rem;
11
11
 
12
- --spacing-popover-min-width: 12rem;
12
+ --spacing-popover-default-width: 20rem;
13
+ --spacing-popover-min-width: 16rem;
13
14
 
14
15
  --spacing-document-max-width: 50rem;
15
16
  --spacing-document-width: calc(50rem - env(safe-area-inset-left) - env(safe-area-inset-right));
16
17
 
17
- --spacing-popover-min-width: 16rem;
18
-
19
18
  --spacing-card-default-width: 20rem;
20
19
  --spacing-card-min-width: 18rem;
21
20
  --spacing-card-max-width: 22rem;
@@ -95,7 +94,7 @@
95
94
  --dx-input-fine: var(--dx-lacuna-3);
96
95
  --dx-input-coarse: var(--dx-lacuna-4);
97
96
 
98
- --dx-default-icons-size: 1.25rem; /* size=5 */
97
+ --dx-default-icons-size: 1rem; /* size=4 */
99
98
  }
100
99
 
101
100
  [data-grid-focus-indicator-variant='stack'] {
@@ -116,16 +115,16 @@
116
115
  --dx-toolbar-size: var(--dx-rail-action); /* 40px */
117
116
  --dx-statusbar-size: var(--dx-rail-item); /* 32px */
118
117
 
119
- /** NOTE: On MBP, should have nav sidebare open with 4 column mosaic board. */
120
- --dx-nav-sidebar-size: 21.5rem;
118
+ /** NOTE: Sidebar optimized to show plank + companion with sidebar open on 16" MBP. */
119
+ --dx-nav-sidebar-size: 350px;
121
120
  --dx-complementary-sidebar-size: 25rem;
122
121
  --dx-drawer-size: 50dvh;
123
122
 
124
- --dx-l0-size: 74px; /* MacOS windowing controls. */
123
+ --dx-l0-size: 72px;
125
124
  --dx-l0-avatar-size: 3rem;
126
125
  --dx-l1-size: calc(var(--dx-nav-sidebar-size) - var(--dx-l0-size));
127
126
  --dx-r0-size: var(--dx-rail-size);
128
- --dx-r1-size: calc(var(--dx-complementary-sidebar-size) - var(--dx-r0-size));
127
+ --dx-r1-size: calc(var(--dx-complementary-sidebar-size) - var(--dx-r0-size) - 1px);
129
128
  }
130
129
 
131
130
  :root {