@dxos/ui-theme 0.8.4-main.c85a9c8dae → 0.8.4-main.cb12b3f963

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 (148) hide show
  1. package/dist/lib/browser/index.mjs +401 -475
  2. package/dist/lib/browser/index.mjs.map +4 -4
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +401 -475
  5. package/dist/lib/node-esm/index.mjs.map +4 -4
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/plugin/node-cjs/{theme.css → main.css} +126 -56
  8. package/dist/plugin/node-cjs/main.css.map +7 -0
  9. package/dist/plugin/node-cjs/meta.json +1 -1
  10. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +8 -15
  11. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +3 -3
  12. package/dist/plugin/node-esm/{theme.css → main.css} +126 -56
  13. package/dist/plugin/node-esm/main.css.map +7 -0
  14. package/dist/plugin/node-esm/meta.json +1 -1
  15. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +8 -15
  16. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +3 -3
  17. package/dist/types/src/Theme.stories.d.ts.map +1 -1
  18. package/dist/types/src/defs.d.ts +2 -2
  19. package/dist/types/src/defs.d.ts.map +1 -1
  20. package/dist/types/src/fragments/density.d.ts +1 -4
  21. package/dist/types/src/fragments/density.d.ts.map +1 -1
  22. package/dist/types/src/fragments/index.d.ts +0 -5
  23. package/dist/types/src/fragments/index.d.ts.map +1 -1
  24. package/dist/types/src/fragments/text.d.ts +0 -5
  25. package/dist/types/src/fragments/text.d.ts.map +1 -1
  26. package/dist/types/src/index.d.ts +1 -1
  27. package/dist/types/src/index.d.ts.map +1 -1
  28. package/dist/types/src/plugins/ThemePlugin.d.ts +1 -1
  29. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -1
  30. package/dist/types/src/theme/components/avatar.d.ts.map +1 -1
  31. package/dist/types/src/theme/components/card.d.ts +3 -2
  32. package/dist/types/src/theme/components/card.d.ts.map +1 -1
  33. package/dist/types/src/theme/components/dialog.d.ts.map +1 -1
  34. package/dist/types/src/theme/components/focus.d.ts +6 -0
  35. package/dist/types/src/theme/components/focus.d.ts.map +1 -0
  36. package/dist/types/src/theme/components/icon-button.d.ts +1 -0
  37. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -1
  38. package/dist/types/src/theme/components/icon.d.ts +3 -0
  39. package/dist/types/src/theme/components/icon.d.ts.map +1 -1
  40. package/dist/types/src/theme/components/index.d.ts +1 -0
  41. package/dist/types/src/theme/components/index.d.ts.map +1 -1
  42. package/dist/types/src/theme/components/input.d.ts +8 -8
  43. package/dist/types/src/theme/components/input.d.ts.map +1 -1
  44. package/dist/types/src/theme/components/link.d.ts.map +1 -1
  45. package/dist/types/src/theme/components/list.d.ts.map +1 -1
  46. package/dist/types/src/theme/components/main.d.ts.map +1 -1
  47. package/dist/types/src/theme/components/message.d.ts.map +1 -1
  48. package/dist/types/src/theme/components/popover.d.ts.map +1 -1
  49. package/dist/types/src/theme/components/scroll-area.d.ts +12 -2
  50. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -1
  51. package/dist/types/src/theme/components/select.d.ts.map +1 -1
  52. package/dist/types/src/theme/components/status.d.ts +1 -1
  53. package/dist/types/src/theme/components/status.d.ts.map +1 -1
  54. package/dist/types/src/theme/components/toast.d.ts.map +1 -1
  55. package/dist/types/src/theme/components/toolbar.d.ts +0 -1
  56. package/dist/types/src/theme/components/toolbar.d.ts.map +1 -1
  57. package/dist/types/src/theme/components/tooltip.d.ts.map +1 -1
  58. package/dist/types/src/theme/components/treegrid.d.ts.map +1 -1
  59. package/dist/types/src/theme/index.d.ts +1 -0
  60. package/dist/types/src/theme/index.d.ts.map +1 -1
  61. package/dist/types/src/theme/primitives/column.d.ts +25 -3
  62. package/dist/types/src/theme/primitives/column.d.ts.map +1 -1
  63. package/dist/types/src/theme/primitives/panel.d.ts +9 -5
  64. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -1
  65. package/dist/types/src/theme/theme.d.ts.map +1 -1
  66. package/dist/types/src/util/elevation.d.ts.map +1 -0
  67. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  68. package/dist/types/src/util/index.d.ts +3 -0
  69. package/dist/types/src/util/index.d.ts.map +1 -1
  70. package/dist/types/src/util/mx.d.ts +52 -4
  71. package/dist/types/src/util/mx.d.ts.map +1 -1
  72. package/dist/types/src/util/size.d.ts +27 -0
  73. package/dist/types/src/util/size.d.ts.map +1 -0
  74. package/dist/types/src/util/valence.d.ts +4 -0
  75. package/dist/types/src/util/valence.d.ts.map +1 -0
  76. package/dist/types/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +13 -16
  78. package/src/css/components/button.css +2 -1
  79. package/src/css/components/{focus-ring.css → focus.css} +15 -1
  80. package/src/css/components/icon.css +9 -0
  81. package/src/css/components/panel.css +22 -22
  82. package/src/css/components/selected.css +35 -0
  83. package/src/css/components/selected.md +101 -0
  84. package/src/css/components/tag.css +3 -1
  85. package/src/css/integrations/codemirror.css +5 -3
  86. package/src/css/integrations/tldraw.css +1 -0
  87. package/src/css/layout/main.css +0 -7
  88. package/src/css/layout/size.css +19 -27
  89. package/src/css/theme/animation.css +31 -0
  90. package/src/css/theme/palette.css +8 -0
  91. package/src/css/theme/semantic.css +25 -9
  92. package/src/css/theme/spacing.css +36 -19
  93. package/src/css/utilities.css +114 -3
  94. package/src/defs.ts +1 -1
  95. package/src/fragments/AUDIT.md +57 -0
  96. package/src/fragments/density.ts +8 -5
  97. package/src/fragments/index.ts +1 -6
  98. package/src/fragments/text.ts +1 -6
  99. package/src/index.ts +1 -1
  100. package/src/{theme.css → main.css} +46 -8
  101. package/src/plugins/ThemePlugin.ts +12 -24
  102. package/src/plugins/main.css +45 -0
  103. package/src/theme/components/avatar.ts +3 -4
  104. package/src/theme/components/button.ts +1 -1
  105. package/src/theme/components/card.ts +19 -11
  106. package/src/theme/components/dialog.ts +4 -3
  107. package/src/theme/components/focus.ts +33 -0
  108. package/src/theme/components/icon-button.ts +6 -5
  109. package/src/theme/components/icon.ts +13 -4
  110. package/src/theme/components/index.ts +1 -0
  111. package/src/theme/components/input.ts +15 -30
  112. package/src/theme/components/link.ts +1 -2
  113. package/src/theme/components/list.ts +4 -4
  114. package/src/theme/components/menu.ts +4 -4
  115. package/src/theme/components/message.ts +6 -7
  116. package/src/theme/components/popover.ts +4 -5
  117. package/src/theme/components/scroll-area.ts +58 -46
  118. package/src/theme/components/select.ts +2 -3
  119. package/src/theme/components/status.ts +5 -5
  120. package/src/theme/components/toast.ts +2 -3
  121. package/src/theme/components/toolbar.ts +1 -7
  122. package/src/theme/components/tooltip.ts +1 -2
  123. package/src/theme/components/treegrid.ts +1 -1
  124. package/src/theme/index.ts +1 -0
  125. package/src/theme/primitives/column.ts +49 -8
  126. package/src/theme/primitives/panel.ts +19 -23
  127. package/src/theme/theme.ts +2 -0
  128. package/src/typings.d.ts +3 -0
  129. package/src/util/index.ts +3 -0
  130. package/src/util/mx.ts +119 -8
  131. package/src/util/size.ts +103 -0
  132. package/dist/plugin/node-cjs/theme.css.map +0 -7
  133. package/dist/plugin/node-esm/theme.css.map +0 -7
  134. package/dist/types/src/fragments/elevation.d.ts.map +0 -1
  135. package/dist/types/src/fragments/focus.d.ts +0 -4
  136. package/dist/types/src/fragments/focus.d.ts.map +0 -1
  137. package/dist/types/src/fragments/selected.d.ts +0 -4
  138. package/dist/types/src/fragments/selected.d.ts.map +0 -1
  139. package/dist/types/src/fragments/size.d.ts +0 -7
  140. package/dist/types/src/fragments/size.d.ts.map +0 -1
  141. package/dist/types/src/fragments/valence.d.ts +0 -4
  142. package/dist/types/src/fragments/valence.d.ts.map +0 -1
  143. package/src/fragments/focus.ts +0 -11
  144. package/src/fragments/selected.ts +0 -12
  145. package/src/fragments/size.ts +0 -117
  146. /package/dist/types/src/{fragments → util}/elevation.d.ts +0 -0
  147. /package/src/{fragments → util}/elevation.ts +0 -0
  148. /package/src/{fragments → util}/valence.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/ui-theme",
3
- "version": "0.8.4-main.c85a9c8dae",
3
+ "version": "0.8.4-main.cb12b3f963",
4
4
  "description": "A set of design system tokens to use with DXOS UI.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -27,13 +27,6 @@
27
27
  "require": "./dist/plugin/node-cjs/plugins/ThemePlugin.cjs"
28
28
  }
29
29
  },
30
- "typesVersions": {
31
- "*": {
32
- "plugin": [
33
- "dist/types/src/plugins/ThemePlugin.d.ts"
34
- ]
35
- }
36
- },
37
30
  "files": [
38
31
  "dist",
39
32
  "src"
@@ -42,29 +35,33 @@
42
35
  "@fontsource-variable/inter": "5.2.8",
43
36
  "@fontsource-variable/jetbrains-mono": "5.0.21",
44
37
  "@fontsource/poiret-one": "^5.0.20",
38
+ "@radix-ui/react-slot": "1.1.2",
45
39
  "@tailwindcss/forms": "^0.5.9",
46
40
  "@tailwindcss/postcss": "^4.2.0",
47
- "autoprefixer": "^10.4.12",
41
+ "autoprefixer": "^10.5.0",
48
42
  "esbuild-style-plugin": "^1.6.1",
49
- "glob": "^7.2.3",
50
43
  "globby": "14.1.0",
51
44
  "lodash.merge": "^4.6.2",
52
- "postcss": "^8.4.41",
45
+ "postcss": "^8.5.12",
53
46
  "postcss-import": "^16.1.0",
54
47
  "postcss-nesting": "^13.0.1",
55
48
  "tailwind-merge": "^3.5.0",
56
49
  "tailwind-scrollbar": "^4.0.0",
57
50
  "tailwindcss": "^4.2.0",
58
51
  "tailwindcss-radix": "^4.0.2",
59
- "@dxos/util": "0.8.4-main.c85a9c8dae",
60
- "@dxos/node-std": "0.8.4-main.c85a9c8dae"
52
+ "@dxos/log": "0.8.4-main.cb12b3f963",
53
+ "@dxos/node-std": "0.8.4-main.cb12b3f963",
54
+ "@dxos/util": "0.8.4-main.cb12b3f963"
61
55
  },
62
56
  "devDependencies": {
63
57
  "@types/lodash.merge": "^4.6.6",
64
58
  "@types/postcss-import": "^14.0.3",
65
- "esbuild": "0.25.11",
66
- "vite": "^7.1.11",
67
- "@dxos/ui-types": "0.8.4-main.c85a9c8dae"
59
+ "esbuild": "0.28.0",
60
+ "vite": "^8.0.10",
61
+ "@dxos/ui-types": "0.8.4-main.cb12b3f963"
62
+ },
63
+ "peerDependencies": {
64
+ "react": "~19.2.3"
68
65
  },
69
66
  "publishConfig": {
70
67
  "access": "public"
@@ -10,7 +10,8 @@
10
10
 
11
11
  /* Base styles */
12
12
  .dx-button {
13
- @apply font-medium shrink-0 inline-flex select-none items-center justify-center overflow-hidden transition-colors duration-100 ease-linear bg-input-surface min-h-[2.5rem] px-3;
13
+ @apply shrink-0 inline-flex select-none items-center justify-center overflow-hidden min-h-[2.5rem] px-3;
14
+ @apply font-medium transition-colors duration-100 ease-linear bg-input-surface;
14
15
  &[aria-pressed='true'],
15
16
  &[aria-checked='true'] {
16
17
  @apply text-accent-text bg-attention-surface;
@@ -29,6 +29,13 @@
29
29
  }
30
30
  }
31
31
 
32
+ .dx-focus-ring-none {
33
+ &:focus,
34
+ &:focus-visible {
35
+ @apply outline-hidden! ring-0!;
36
+ }
37
+ }
38
+
32
39
  .dx-focus-ring-always,
33
40
  .dx-focus-ring-inset-always {
34
41
  &:not([disabled]),
@@ -180,7 +187,6 @@
180
187
 
181
188
  &:hover {
182
189
  @apply outline-hidden;
183
-
184
190
  .dark & {
185
191
  @apply outline-hidden;
186
192
  }
@@ -226,4 +232,12 @@
226
232
  }
227
233
  }
228
234
  }
235
+
236
+ .dx-focus-subdued {
237
+ @apply focus:outline-hidden focus-visible:outline-hidden focus:ring-0 ring-0 focus:border-0 border-0;
238
+ }
239
+
240
+ .dx-focus-static {
241
+ @apply ring-2 ring-offset-0 ring-primary-300 ring-offset-white dark:ring-primary-400 dark:ring-offset-black;
242
+ }
229
243
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Icons
3
+ */
4
+
5
+ @layer dx-components {
6
+ .dx-icon-inline {
7
+ @apply inline-block align-[-0.125em];
8
+ }
9
+ }
@@ -5,112 +5,112 @@
5
5
  */
6
6
 
7
7
  @layer dx-components {
8
- .dx-panel[data-hue='neutral'],
8
+ [data-hue='neutral'] .dx-panel,
9
9
  .dx-panel--neutral {
10
10
  @apply bg-neutral-surface text-neutral-surface-text border-neutral-border;
11
11
  }
12
12
 
13
- .dx-panel[data-hue='red'],
13
+ [data-hue='red'] .dx-panel,
14
14
  .dx-panel--red {
15
15
  @apply bg-red-surface text-red-surface-text border-red-border;
16
16
  }
17
17
 
18
- .dx-panel[data-hue='orange'],
18
+ [data-hue='orange'] .dx-panel,
19
19
  .dx-panel--orange {
20
20
  @apply bg-orange-surface text-orange-surface-text border-orange-border;
21
21
  }
22
22
 
23
- .dx-panel[data-hue='amber'],
23
+ [data-hue='amber'] .dx-panel,
24
24
  .dx-panel--amber {
25
25
  @apply bg-amber-surface text-amber-surface-text border-amber-border;
26
26
  }
27
27
 
28
- .dx-panel[data-hue='yellow'],
28
+ [data-hue='yellow'] .dx-panel,
29
29
  .dx-panel--yellow {
30
30
  @apply bg-yellow-surface text-yellow-surface-text border-yellow-border;
31
31
  }
32
32
 
33
- .dx-panel[data-hue='lime'],
33
+ [data-hue='lime'] .dx-panel,
34
34
  .dx-panel--lime {
35
35
  @apply bg-lime-surface text-lime-surface-text border-lime-border;
36
36
  }
37
37
 
38
- .dx-panel[data-hue='green'],
38
+ [data-hue='green'] .dx-panel,
39
39
  .dx-panel--green {
40
40
  @apply bg-green-surface text-green-surface-text border-green-border;
41
41
  }
42
42
 
43
- .dx-panel[data-hue='emerald'],
43
+ [data-hue='emerald'] .dx-panel,
44
44
  .dx-panel--emerald {
45
45
  @apply bg-emerald-surface text-emerald-surface-text border-emerald-border;
46
46
  }
47
47
 
48
- .dx-panel[data-hue='teal'],
48
+ [data-hue='teal'] .dx-panel,
49
49
  .dx-panel--teal {
50
50
  @apply bg-teal-surface text-teal-surface-text border-teal-border;
51
51
  }
52
52
 
53
- .dx-panel[data-hue='cyan'],
53
+ [data-hue='cyan'] .dx-panel,
54
54
  .dx-panel--cyan {
55
55
  @apply bg-cyan-surface text-cyan-surface-text border-cyan-border;
56
56
  }
57
57
 
58
- .dx-panel[data-hue='sky'],
58
+ [data-hue='sky'] .dx-panel,
59
59
  .dx-panel--sky {
60
60
  @apply bg-sky-surface text-sky-surface-text border-sky-border;
61
61
  }
62
62
 
63
- .dx-panel[data-hue='blue'],
63
+ [data-hue='blue'] .dx-panel,
64
64
  .dx-panel--blue {
65
65
  @apply bg-blue-surface text-blue-surface-text border-blue-border;
66
66
  }
67
67
 
68
- .dx-panel[data-hue='indigo'],
68
+ [data-hue='indigo'] .dx-panel,
69
69
  .dx-panel--indigo {
70
70
  @apply bg-indigo-surface text-indigo-surface-text border-indigo-border;
71
71
  }
72
72
 
73
- .dx-panel[data-hue='violet'],
73
+ [data-hue='violet'] .dx-panel,
74
74
  .dx-panel--violet {
75
75
  @apply bg-violet-surface text-violet-surface-text border-violet-border;
76
76
  }
77
77
 
78
- .dx-panel[data-hue='purple'],
78
+ [data-hue='purple'] .dx-panel,
79
79
  .dx-panel--purple {
80
80
  @apply bg-purple-surface text-purple-surface-text border-purple-border;
81
81
  }
82
82
 
83
- .dx-panel[data-hue='fuchsia'],
83
+ [data-hue='fuchsia'] .dx-panel,
84
84
  .dx-panel--fuchsia {
85
85
  @apply bg-fuchsia-surface text-fuchsia-surface-text border-fuchsia-border;
86
86
  }
87
87
 
88
- .dx-panel[data-hue='pink'],
88
+ [data-hue='pink'] .dx-panel,
89
89
  .dx-panel--pink {
90
90
  @apply bg-pink-surface text-pink-surface-text border-pink-border;
91
91
  }
92
92
 
93
- .dx-panel[data-hue='rose'],
93
+ [data-hue='rose'] .dx-panel,
94
94
  .dx-panel--rose {
95
95
  @apply bg-rose-surface text-rose-surface-text border-rose-border;
96
96
  }
97
97
 
98
- .dx-panel[data-hue='info'],
98
+ [data-hue='info'] .dx-panel,
99
99
  .dx-panel--info {
100
100
  @apply bg-info-surface text-info-surface-text border-info-border;
101
101
  }
102
102
 
103
- .dx-panel[data-hue='success'],
103
+ [data-hue='success'] .dx-panel,
104
104
  .dx-panel--success {
105
105
  @apply bg-success-surface text-success-surface-text border-success-border;
106
106
  }
107
107
 
108
- .dx-panel[data-hue='warning'],
108
+ [data-hue='warning'] .dx-panel,
109
109
  .dx-panel--warning {
110
110
  @apply bg-warning-surface text-warning-surface-text border-warning-border;
111
111
  }
112
112
 
113
- .dx-panel[data-hue='error'],
113
+ [data-hue='error'] .dx-panel,
114
114
  .dx-panel--error {
115
115
  @apply bg-error-surface text-error-surface-text border-error-border;
116
116
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Selected / Highlighted state utilities.
3
+ *
4
+ * See `./selected.md` for the ARIA pairing grammar — every class below
5
+ * fires off a specific attribute and silently does nothing without it.
6
+ */
7
+
8
+ @layer dx-components {
9
+ /* Pure visual affordance, no ARIA pair. Combine with dx-selected or dx-current. */
10
+ .dx-hover {
11
+ @apply cursor-pointer hover:bg-highlight-surface! hover:text-highlight-surface-text!;
12
+ }
13
+
14
+ /* Pairs with Radix-managed `data-highlighted`. Don't set the attribute manually. */
15
+ .dx-highlighted {
16
+ @apply data-[highlighted]:bg-highlight-surface
17
+ data-[highlighted]:text-highlight-surface-text
18
+ hover:data-[highlighted]:bg-highlight-surface-hover;
19
+ }
20
+
21
+ /* Pairs with `aria-current="true|page|…"`. Use for "you are here" navigation. */
22
+ .dx-current {
23
+ @apply dx-ring-pseudo
24
+ aria-[current=true]:bg-highlight-surface aria-[current=true]:text-highlight-surface-text
25
+ aria-[current=true]:after:ring-active-separator!;
26
+ }
27
+
28
+ /* Pairs with `aria-selected`. Use for listbox/option selection (master/detail). */
29
+ .dx-selected {
30
+ @apply aria-selected:bg-selected-surface
31
+ aria-selected:text-selected-surface-text hover:aria-selected:text-selected-surface-text
32
+ aria-selected:font-semibold aria-selected:tracking-normal
33
+ transition-[color,font-variation-settings,letter-spacing];
34
+ }
35
+ }
@@ -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.
@@ -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-surface-text border-sky-border;
15
17
 
16
18
  &:hover {
17
19
  @apply bg-hover-surface;
@@ -6,6 +6,7 @@
6
6
  * TODO(burdon): This could move into the ui-editor package (similar to graph.css).
7
7
  */
8
8
 
9
+ /** TODO(burdon): Move to ui-editor */
9
10
  @theme {
10
11
  --color-cm-codeblock: oklch(from var(--color-neutral-500) l c h / 0.1);
11
12
  --color-cm-active-line: light-dark(
@@ -25,8 +26,9 @@
25
26
  --color-cm-comment-surface: light-dark(var(--color-amber-800), var(--color-amber-200));
26
27
 
27
28
  /* Markdown syntax highlighting */
28
- --color-cm-code: light-dark(var(--color-neutral-700), var(--color-neutral-300));
29
+ --color-cm-code: light-dark(var(--color-stone-600), var(--color-stone-400));
30
+ --color-cm-code-inline: light-dark(var(--color-green-500), var(--color-green-500));
29
31
  --color-cm-code-mark: var(--color-blue-500);
30
- --color-cm-mark-opacity: 0.5;
31
- --color-cm-heading: light-dark(var(--color-neutral-900), var(--color-neutral-400));
32
+ --color-cm-heading: light-dark(var(--color-blue-700), var(--color-blue-300));
33
+ --color-cm-heading-number: light-dark(var(--color-blue-600), var(--color-blue-400));
32
34
  }
@@ -2,6 +2,7 @@
2
2
  * Tldraw
3
3
  */
4
4
 
5
+ /** TODO(burdon): Move to tldraw */
5
6
  .tl-background {
6
7
  --color-background: var(--color-base-surface);
7
8
  }
@@ -18,13 +18,6 @@
18
18
  z-index: 0;
19
19
  }
20
20
 
21
- /**
22
- * Main Mobile app.
23
- */
24
- .dx-main-mobile-layout {
25
- @apply absolute inset-0 overflow-hidden flex flex-col;
26
- }
27
-
28
21
  /** TODO(burdon): Reconcile with dx-main-bounce-layout */
29
22
  .dx-main-content-padding-transitions {
30
23
  transition-duration: 200ms;
@@ -3,51 +3,43 @@
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/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.
9
14
  */
10
15
  .dx-size-container {
11
16
  container-type: size;
12
17
  }
13
18
 
14
19
  /**
15
- * Layout rules for flex-based scroll containment:
16
- * `flex flex-col`
17
- * On a container: makes it a flex column so children stack and can use `flex-1`.
18
- * `flex-1`
19
- * On a child: grows to fill the flex parent. Requires the parent to be `flex`.
20
- * `min-h-0` (alongside `flex-1`):
21
- * Overrides default flex children: `min-height:auto` (sized to content), which prevents shrinking.
22
- * Allows element to shrink and trigger overflow/scrolling.
23
- * Always pair with `flex-1` when scroll is needed.
24
- * `h-full`:
25
- * Fills 100% of the parent's *computed* height.
26
- * Use when the parent has a definite height but is not a flex container (e.g. `overflow:hidden` wrapper).
27
- * Unlike `flex-1`, does not require the parent to be flex.
28
- *
29
- * Pattern for a scrollable region inside a flex ancestor:
30
- * ancestor → `flex flex-col` (or `flex flex-row`)
31
- * scroll root → `flex-1 min-h-0` (fills ancestor, can shrink)
32
- * scroll viewport → `h-full overflow-y-scroll` (fills root, scrolls)
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.
33
23
  */
34
-
35
- .dx-container {
36
- @apply flex-1 min-h-0 min-w-0 h-full w-full;
24
+ .dx-inline-size-container {
25
+ container-type: inline-size;
37
26
  }
38
27
 
39
28
  /**
40
- * Article
29
+ * Document width.
41
30
  */
42
-
43
- .dx-article {
44
- @apply w-full max-w-article-max-width mx-auto;
31
+ .dx-document {
32
+ @apply mx-auto w-full max-w-document-max-width;
45
33
  }
46
34
 
47
35
  /**
48
36
  * Card
49
37
  */
50
38
 
39
+ .dx-card {
40
+ @apply flex flex-col w-full;
41
+ }
42
+
51
43
  .dx-card-square {
52
44
  inline-size: min(
53
45
  min(var(--radix-popper-available-width), var(--spacing-card-max-width)),
@@ -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
+ }
@@ -10,8 +10,10 @@
10
10
 
11
11
  @theme {
12
12
  --color-neutral-75: color-mix(in oklch, var(--color-neutral-50) 50%, var(--color-neutral-100) 50%);
13
+ --color-neutral-150: color-mix(in oklch, var(--color-neutral-100) 50%, var(--color-neutral-200) 50%);
13
14
  --color-neutral-250: color-mix(in oklch, var(--color-neutral-200) 50%, var(--color-neutral-300) 50%);
14
15
  --color-neutral-750: color-mix(in oklch, var(--color-neutral-700) 50%, var(--color-neutral-800) 50%);
16
+ --color-neutral-850: color-mix(in oklch, var(--color-neutral-800) 50%, var(--color-neutral-900) 50%);
15
17
  --color-neutral-925: color-mix(in oklch, var(--color-neutral-900) 50%, var(--color-neutral-950) 50%);
16
18
 
17
19
  --color-primary-50: var(--color-blue-50);
@@ -25,4 +27,10 @@
25
27
  --color-primary-800: var(--color-blue-800);
26
28
  --color-primary-900: var(--color-blue-900);
27
29
  --color-primary-950: var(--color-blue-950);
30
+
31
+ /* Composer logo colors */
32
+ --color-composer-100: rgb(5 40 61);
33
+ --color-composer-200: rgb(10 75 105);
34
+ --color-composer-300: rgb(1 122 183);
35
+ --color-composer-400: rgb(6 197 253);
28
36
  }
@@ -17,25 +17,28 @@
17
17
  --color-inverse-surface: light-dark(var(--color-neutral-800), var(--color-neutral-200));
18
18
  --color-inverse-surface-text: light-dark(var(--color-neutral-50), var(--color-neutral-950));
19
19
 
20
- --color-input-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
21
- --color-input-surface-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
22
-
23
20
  --color-deck-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
24
21
  --color-scrim-surface: light-dark(
25
22
  oklch(from var(--color-neutral-50) l c h / 0.5),
26
23
  oklch(from var(--color-neutral-950) l c h / 0.25)
27
24
  );
25
+
28
26
  --color-toolbar-surface: light-dark(var(--color-neutral-75), var(--color-neutral-925));
27
+ --color-card-surface: light-dark(var(--color-neutral-75), var(--color-neutral-925));
28
+
29
29
  --color-group-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
30
30
  --color-modal-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
31
- --color-card-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
32
31
  --color-sidebar-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
33
32
  --color-header-surface: light-dark(var(--color-neutral-100), var(--color-neutral-900));
34
33
 
34
+ --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));
36
+
35
37
  /** TODO(burdon): current vs active vs selected */
36
38
  --color-current-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
37
39
  --color-active-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
38
40
  --color-active-text: light-dark(var(--color-neutral-950), var(--color-neutral-50));
41
+
39
42
  /** TODO(burdon): Merge overlay/surface? */
40
43
  --color-hover-overlay: light-dark(var(--color-neutral-250), var(--color-neutral-750));
41
44
  --color-hover-surface: light-dark(var(--color-neutral-250), var(--color-neutral-750));
@@ -43,15 +46,27 @@
43
46
 
44
47
  /* Map attention to focus-surface logic so that elements acting as active attention zones highlight correctly on focus. */
45
48
  --color-attention-surface: var(--color-focus-surface);
49
+ --color-attention-contains: oklch(from var(--color-accent-surface) l c h / 0.3);
46
50
  --color-focus-surface: light-dark(var(--color-neutral-50), var(--color-neutral-950));
47
51
  --color-neutral-focus-indicator: light-dark(var(--color-neutral-400), var(--color-neutral-600));
48
52
 
49
- /* Accent */
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
+
63
+ /* Accent (primary) */
64
+ /* TODO(burdon): Rename primary */
50
65
 
51
- --color-accent-surface: light-dark(var(--color-blue-600), var(--color-blue-600));
66
+ --color-accent-surface: light-dark(var(--color-blue-500), var(--color-blue-700));
52
67
  --color-accent-surface-hover: light-dark(var(--color-blue-800), var(--color-blue-800));
53
68
  --color-accent-surface-text: var(--color-blue-100);
54
- --color-accent-text: light-dark(var(--color-blue-600), var(--color-blue-600));
69
+ --color-accent-text: light-dark(var(--color-blue-600), var(--color-blue-400));
55
70
  --color-accent-text-hover: light-dark(var(--color-blue-500), var(--color-blue-500));
56
71
  --color-accent-focus-indicator: light-dark(var(--color-blue-600), var(--color-blue-600));
57
72
 
@@ -61,8 +76,9 @@
61
76
  /* Separator */
62
77
 
63
78
  --color-separator: light-dark(var(--color-neutral-200), var(--color-neutral-800));
64
- --color-primary-separator: light-dark(var(--color-neutral-400), var(--color-neutral-800));
65
- --color-subdued-separator: light-dark(var(--color-neutral-300), var(--color-neutral-900));
79
+ --color-subdued-separator: light-dark(var(--color-neutral-150), var(--color-neutral-850));
80
+ --color-primary-separator: light-dark(var(--color-neutral-500), var(--color-neutral-700));
81
+ --color-active-separator: light-dark(var(--color-blue-500), var(--color-blue-500));
66
82
 
67
83
  /* Scrollbar */
68
84