@dxos/ui-theme 0.8.4-main.ef1bc66f44 → 0.8.4-main.f466a3d56e

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 (394) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +765 -2903
  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 +765 -2903
  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 +1573 -0
  10. package/dist/plugin/node-cjs/main.css.map +7 -0
  11. package/dist/plugin/node-cjs/meta.json +1 -1
  12. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +137 -0
  13. package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +7 -0
  14. package/dist/plugin/node-esm/main.css +1573 -0
  15. package/dist/plugin/node-esm/main.css.map +7 -0
  16. package/dist/plugin/node-esm/meta.json +1 -1
  17. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +105 -0
  18. package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +7 -0
  19. package/dist/types/src/Theme.stories.d.ts +27 -0
  20. package/dist/types/src/Theme.stories.d.ts.map +1 -0
  21. package/dist/types/src/defs.d.ts +21 -0
  22. package/dist/types/src/defs.d.ts.map +1 -0
  23. package/dist/types/src/fragments/density.d.ts +4 -0
  24. package/dist/types/src/fragments/density.d.ts.map +1 -0
  25. package/dist/types/src/fragments/disabled.d.ts.map +1 -0
  26. package/dist/types/src/fragments/hover.d.ts +9 -0
  27. package/dist/types/src/fragments/hover.d.ts.map +1 -0
  28. package/dist/types/src/fragments/index.d.ts +5 -0
  29. package/dist/types/src/fragments/index.d.ts.map +1 -0
  30. package/dist/types/src/fragments/text.d.ts +2 -0
  31. package/dist/types/src/fragments/text.d.ts.map +1 -0
  32. package/dist/types/src/index.d.ts +3 -11
  33. package/dist/types/src/index.d.ts.map +1 -1
  34. package/dist/types/src/plugins/ThemePlugin.d.ts +16 -0
  35. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -0
  36. package/dist/types/src/plugins/dark-mode.d.ts +1 -0
  37. package/dist/types/src/plugins/dark-mode.d.ts.map +1 -0
  38. package/dist/types/src/theme/components/avatar.d.ts.map +1 -0
  39. package/dist/types/src/theme/components/breadcrumb.d.ts.map +1 -0
  40. package/dist/types/src/theme/components/button.d.ts +15 -0
  41. package/dist/types/src/theme/components/button.d.ts.map +1 -0
  42. package/dist/types/src/theme/components/card.d.ts +12 -0
  43. package/dist/types/src/theme/components/card.d.ts.map +1 -0
  44. package/dist/types/src/theme/components/dialog.d.ts.map +1 -0
  45. package/dist/types/src/theme/components/focus.d.ts +6 -0
  46. package/dist/types/src/theme/components/focus.d.ts.map +1 -0
  47. package/dist/types/src/{styles → theme}/components/icon-button.d.ts +1 -0
  48. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
  49. package/dist/types/src/{styles → theme}/components/icon.d.ts +3 -0
  50. package/dist/types/src/theme/components/icon.d.ts.map +1 -0
  51. package/dist/types/src/{styles → theme}/components/index.d.ts +3 -1
  52. package/dist/types/src/theme/components/index.d.ts.map +1 -0
  53. package/dist/types/src/{styles → theme}/components/input.d.ts +31 -27
  54. package/dist/types/src/theme/components/input.d.ts.map +1 -0
  55. package/dist/types/src/theme/components/link.d.ts.map +1 -0
  56. package/dist/types/src/theme/components/list.d.ts.map +1 -0
  57. package/dist/types/src/{styles → theme}/components/main.d.ts +2 -2
  58. package/dist/types/src/theme/components/main.d.ts.map +1 -0
  59. package/dist/types/src/{styles → theme}/components/menu.d.ts +1 -1
  60. package/dist/types/src/theme/components/menu.d.ts.map +1 -0
  61. package/dist/types/src/{styles → theme}/components/message.d.ts +1 -0
  62. package/dist/types/src/theme/components/message.d.ts.map +1 -0
  63. package/dist/types/src/{styles → theme}/components/popover.d.ts +1 -1
  64. package/dist/types/src/theme/components/popover.d.ts.map +1 -0
  65. package/dist/types/src/{styles → theme}/components/scroll-area.d.ts +17 -1
  66. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
  67. package/dist/types/src/theme/components/select.d.ts.map +1 -0
  68. package/dist/types/src/theme/components/separator.d.ts.map +1 -0
  69. package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
  70. package/dist/types/src/theme/components/splitter.d.ts +4 -0
  71. package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
  72. package/dist/types/src/{styles → theme}/components/status.d.ts +1 -1
  73. package/dist/types/src/theme/components/status.d.ts.map +1 -0
  74. package/dist/types/src/theme/components/tag.d.ts.map +1 -0
  75. package/dist/types/src/theme/components/toast.d.ts.map +1 -0
  76. package/dist/types/src/{styles → theme}/components/toolbar.d.ts +2 -2
  77. package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
  78. package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
  79. package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
  80. package/dist/types/src/{styles → theme}/index.d.ts +0 -1
  81. package/dist/types/src/theme/index.d.ts.map +1 -0
  82. package/dist/types/src/theme/primitives/column.d.ts +29 -0
  83. package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
  84. package/dist/types/src/theme/primitives/index.d.ts +3 -0
  85. package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
  86. package/dist/types/src/theme/primitives/panel.d.ts +13 -0
  87. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
  88. package/dist/types/src/theme/theme.d.ts.map +1 -0
  89. package/dist/types/src/{styles/fragments → util}/elevation.d.ts +0 -6
  90. package/dist/types/src/util/elevation.d.ts.map +1 -0
  91. package/dist/types/src/util/hash-styles.d.ts +8 -5
  92. package/dist/types/src/util/hash-styles.d.ts.map +1 -1
  93. package/dist/types/src/util/index.d.ts +3 -0
  94. package/dist/types/src/util/index.d.ts.map +1 -1
  95. package/dist/types/src/util/mx.d.ts +56 -0
  96. package/dist/types/src/util/mx.d.ts.map +1 -1
  97. package/dist/types/src/util/size.d.ts +27 -0
  98. package/dist/types/src/util/size.d.ts.map +1 -0
  99. package/dist/types/src/util/valence.d.ts +4 -0
  100. package/dist/types/src/util/valence.d.ts.map +1 -0
  101. package/dist/types/tsconfig.tsbuildinfo +1 -1
  102. package/package.json +27 -38
  103. package/src/Theme.stories.tsx +224 -0
  104. package/src/css/DESIGN_SYSTEM.md +159 -0
  105. package/src/css/base/base.css +43 -0
  106. package/src/{styles/layers → css/base}/typography.css +3 -5
  107. package/src/{styles/layers → css/components}/button.css +23 -14
  108. package/src/{styles/layers → css/components}/checkbox.css +12 -8
  109. package/src/{styles/layers → css/components}/dialog.css +16 -11
  110. package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
  111. package/src/css/components/icon.css +9 -0
  112. package/src/css/components/link.css +12 -0
  113. package/src/css/components/panel.css +117 -0
  114. package/src/css/components/scrollbar.css +24 -0
  115. package/src/css/components/selected.css +76 -0
  116. package/src/css/components/selected.md +101 -0
  117. package/src/css/components/surface.css +34 -0
  118. package/src/css/components/tag.css +132 -0
  119. package/src/css/components/text.css +124 -0
  120. package/src/css/integrations/codemirror.css +34 -0
  121. package/src/css/integrations/tldraw.css +14 -0
  122. package/src/css/layout/main.css +205 -0
  123. package/src/{styles/layers → css/layout}/native.css +6 -4
  124. package/src/css/layout/positioning.css +19 -0
  125. package/src/{styles/layers → css/layout}/size.css +129 -106
  126. package/src/css/theme/animation.css +260 -0
  127. package/src/css/theme/border.css +23 -0
  128. package/src/css/theme/palette.css +36 -0
  129. package/src/css/theme/semantic.css +112 -0
  130. package/src/css/theme/spacing.css +147 -0
  131. package/src/css/theme/styles.css +145 -0
  132. package/src/css/theme/text.css +37 -0
  133. package/src/css/utilities.css +118 -0
  134. package/src/defs.ts +48 -0
  135. package/src/fragments/AUDIT.md +55 -0
  136. package/src/fragments/density.ts +16 -0
  137. package/src/fragments/hover.ts +16 -0
  138. package/src/fragments/index.ts +10 -0
  139. package/src/fragments/text.ts +6 -0
  140. package/src/index.ts +3 -15
  141. package/src/main.css +121 -0
  142. package/src/plugins/ThemePlugin.ts +125 -0
  143. package/src/plugins/dark-mode.ts +22 -0
  144. package/src/plugins/main.css +45 -0
  145. package/src/{styles → theme}/components/avatar.ts +12 -13
  146. package/src/theme/components/button.ts +48 -0
  147. package/src/theme/components/card.ts +102 -0
  148. package/src/{styles → theme}/components/dialog.ts +13 -12
  149. package/src/theme/components/focus.ts +33 -0
  150. package/src/{styles → theme}/components/icon-button.ts +6 -5
  151. package/src/theme/components/icon.ts +28 -0
  152. package/src/{styles → theme}/components/index.ts +3 -1
  153. package/src/theme/components/input.ts +171 -0
  154. package/src/{styles → theme}/components/link.ts +3 -4
  155. package/src/{styles → theme}/components/list.ts +5 -5
  156. package/src/{styles → theme}/components/main.ts +2 -2
  157. package/src/{styles → theme}/components/menu.ts +11 -13
  158. package/src/{styles → theme}/components/message.ts +11 -7
  159. package/src/{styles → theme}/components/popover.ts +13 -12
  160. package/src/theme/components/scroll-area.ts +115 -0
  161. package/src/{styles → theme}/components/select.ts +8 -16
  162. package/src/{styles → theme}/components/separator.ts +3 -3
  163. package/src/{styles → theme}/components/skeleton.ts +2 -2
  164. package/src/theme/components/splitter.ts +20 -0
  165. package/src/{styles → theme}/components/status.ts +7 -7
  166. package/src/{styles → theme}/components/tag.ts +1 -1
  167. package/src/{styles → theme}/components/toast.ts +6 -8
  168. package/src/{styles → theme}/components/toolbar.ts +6 -7
  169. package/src/{styles → theme}/components/tooltip.ts +4 -6
  170. package/src/{styles → theme}/components/treegrid.ts +9 -9
  171. package/src/{styles → theme}/index.ts +1 -2
  172. package/src/theme/primitives/column.ts +71 -0
  173. package/src/theme/primitives/index.ts +6 -0
  174. package/src/theme/primitives/panel.ts +43 -0
  175. package/src/{styles → theme}/theme.ts +13 -19
  176. package/src/typings.d.ts +3 -1
  177. package/src/{styles/fragments → util}/elevation.ts +6 -8
  178. package/src/util/hash-styles.ts +118 -98
  179. package/src/util/index.ts +3 -0
  180. package/src/util/mx.ts +165 -43
  181. package/src/util/size.ts +103 -0
  182. package/src/util/valence.ts +33 -0
  183. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs +0 -79
  184. package/dist/plugin/node-cjs/chunk-UUMDOU7E.cjs.map +0 -7
  185. package/dist/plugin/node-cjs/chunk-YBWOZKXY.cjs +0 -1634
  186. package/dist/plugin/node-cjs/chunk-YBWOZKXY.cjs.map +0 -7
  187. package/dist/plugin/node-cjs/config/tailwind.cjs +0 -29
  188. package/dist/plugin/node-cjs/config/tailwind.cjs.map +0 -7
  189. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs +0 -90
  190. package/dist/plugin/node-cjs/plugins/esbuild-plugin.cjs.map +0 -7
  191. package/dist/plugin/node-cjs/plugins/plugin.cjs +0 -124
  192. package/dist/plugin/node-cjs/plugins/plugin.cjs.map +0 -7
  193. package/dist/plugin/node-cjs/theme.css +0 -1378
  194. package/dist/plugin/node-cjs/theme.css.map +0 -7
  195. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs +0 -49
  196. package/dist/plugin/node-esm/chunk-AFRHJHP4.mjs.map +0 -7
  197. package/dist/plugin/node-esm/chunk-LTGUAP22.mjs +0 -1629
  198. package/dist/plugin/node-esm/chunk-LTGUAP22.mjs.map +0 -7
  199. package/dist/plugin/node-esm/config/tailwind.mjs +0 -8
  200. package/dist/plugin/node-esm/config/tailwind.mjs.map +0 -7
  201. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs +0 -63
  202. package/dist/plugin/node-esm/plugins/esbuild-plugin.mjs.map +0 -7
  203. package/dist/plugin/node-esm/plugins/plugin.mjs +0 -98
  204. package/dist/plugin/node-esm/plugins/plugin.mjs.map +0 -7
  205. package/dist/plugin/node-esm/theme.css +0 -1378
  206. package/dist/plugin/node-esm/theme.css.map +0 -7
  207. package/dist/types/src/Tokens.stories.d.ts +0 -10
  208. package/dist/types/src/Tokens.stories.d.ts.map +0 -1
  209. package/dist/types/src/config/index.d.ts +0 -3
  210. package/dist/types/src/config/index.d.ts.map +0 -1
  211. package/dist/types/src/config/tailwind.d.ts +0 -9
  212. package/dist/types/src/config/tailwind.d.ts.map +0 -1
  213. package/dist/types/src/config/tokens/alias-colors.d.ts +0 -21
  214. package/dist/types/src/config/tokens/alias-colors.d.ts.map +0 -1
  215. package/dist/types/src/config/tokens/index.d.ts +0 -3
  216. package/dist/types/src/config/tokens/index.d.ts.map +0 -1
  217. package/dist/types/src/config/tokens/lengths.d.ts +0 -142
  218. package/dist/types/src/config/tokens/lengths.d.ts.map +0 -1
  219. package/dist/types/src/config/tokens/physical-colors.d.ts +0 -23
  220. package/dist/types/src/config/tokens/physical-colors.d.ts.map +0 -1
  221. package/dist/types/src/config/tokens/semantic-colors.d.ts +0 -192
  222. package/dist/types/src/config/tokens/semantic-colors.d.ts.map +0 -1
  223. package/dist/types/src/config/tokens/sememes-calls.d.ts +0 -3
  224. package/dist/types/src/config/tokens/sememes-calls.d.ts.map +0 -1
  225. package/dist/types/src/config/tokens/sememes-codemirror.d.ts +0 -43
  226. package/dist/types/src/config/tokens/sememes-codemirror.d.ts.map +0 -1
  227. package/dist/types/src/config/tokens/sememes-hue.d.ts +0 -4
  228. package/dist/types/src/config/tokens/sememes-hue.d.ts.map +0 -1
  229. package/dist/types/src/config/tokens/sememes-sheet.d.ts +0 -58
  230. package/dist/types/src/config/tokens/sememes-sheet.d.ts.map +0 -1
  231. package/dist/types/src/config/tokens/sememes-system.d.ts +0 -104
  232. package/dist/types/src/config/tokens/sememes-system.d.ts.map +0 -1
  233. package/dist/types/src/config/tokens/sizes.d.ts +0 -9
  234. package/dist/types/src/config/tokens/sizes.d.ts.map +0 -1
  235. package/dist/types/src/config/tokens/tokens.d.ts +0 -498
  236. package/dist/types/src/config/tokens/tokens.d.ts.map +0 -1
  237. package/dist/types/src/config/tokens/types.d.ts +0 -5
  238. package/dist/types/src/config/tokens/types.d.ts.map +0 -1
  239. package/dist/types/src/plugins/esbuild-plugin.d.ts +0 -9
  240. package/dist/types/src/plugins/esbuild-plugin.d.ts.map +0 -1
  241. package/dist/types/src/plugins/plugin.d.ts +0 -20
  242. package/dist/types/src/plugins/plugin.d.ts.map +0 -1
  243. package/dist/types/src/plugins/resolveContent.d.ts +0 -2
  244. package/dist/types/src/plugins/resolveContent.d.ts.map +0 -1
  245. package/dist/types/src/styles/components/anchored-overflow.d.ts +0 -6
  246. package/dist/types/src/styles/components/anchored-overflow.d.ts.map +0 -1
  247. package/dist/types/src/styles/components/avatar.d.ts.map +0 -1
  248. package/dist/types/src/styles/components/breadcrumb.d.ts.map +0 -1
  249. package/dist/types/src/styles/components/button.d.ts +0 -19
  250. package/dist/types/src/styles/components/button.d.ts.map +0 -1
  251. package/dist/types/src/styles/components/dialog.d.ts.map +0 -1
  252. package/dist/types/src/styles/components/icon-button.d.ts.map +0 -1
  253. package/dist/types/src/styles/components/icon.d.ts.map +0 -1
  254. package/dist/types/src/styles/components/index.d.ts.map +0 -1
  255. package/dist/types/src/styles/components/input.d.ts.map +0 -1
  256. package/dist/types/src/styles/components/link.d.ts.map +0 -1
  257. package/dist/types/src/styles/components/list.d.ts.map +0 -1
  258. package/dist/types/src/styles/components/main.d.ts.map +0 -1
  259. package/dist/types/src/styles/components/menu.d.ts.map +0 -1
  260. package/dist/types/src/styles/components/message.d.ts.map +0 -1
  261. package/dist/types/src/styles/components/popover.d.ts.map +0 -1
  262. package/dist/types/src/styles/components/scroll-area.d.ts.map +0 -1
  263. package/dist/types/src/styles/components/select.d.ts.map +0 -1
  264. package/dist/types/src/styles/components/separator.d.ts.map +0 -1
  265. package/dist/types/src/styles/components/skeleton.d.ts.map +0 -1
  266. package/dist/types/src/styles/components/status.d.ts.map +0 -1
  267. package/dist/types/src/styles/components/tag.d.ts.map +0 -1
  268. package/dist/types/src/styles/components/toast.d.ts.map +0 -1
  269. package/dist/types/src/styles/components/toolbar.d.ts.map +0 -1
  270. package/dist/types/src/styles/components/tooltip.d.ts.map +0 -1
  271. package/dist/types/src/styles/components/treegrid.d.ts.map +0 -1
  272. package/dist/types/src/styles/fragments/density.d.ts +0 -13
  273. package/dist/types/src/styles/fragments/density.d.ts.map +0 -1
  274. package/dist/types/src/styles/fragments/dimension.d.ts +0 -5
  275. package/dist/types/src/styles/fragments/dimension.d.ts.map +0 -1
  276. package/dist/types/src/styles/fragments/disabled.d.ts.map +0 -1
  277. package/dist/types/src/styles/fragments/elevation.d.ts.map +0 -1
  278. package/dist/types/src/styles/fragments/focus.d.ts +0 -6
  279. package/dist/types/src/styles/fragments/focus.d.ts.map +0 -1
  280. package/dist/types/src/styles/fragments/group.d.ts +0 -5
  281. package/dist/types/src/styles/fragments/group.d.ts.map +0 -1
  282. package/dist/types/src/styles/fragments/hover.d.ts +0 -17
  283. package/dist/types/src/styles/fragments/hover.d.ts.map +0 -1
  284. package/dist/types/src/styles/fragments/index.d.ts +0 -17
  285. package/dist/types/src/styles/fragments/index.d.ts.map +0 -1
  286. package/dist/types/src/styles/fragments/layout.d.ts +0 -3
  287. package/dist/types/src/styles/fragments/layout.d.ts.map +0 -1
  288. package/dist/types/src/styles/fragments/motion.d.ts +0 -2
  289. package/dist/types/src/styles/fragments/motion.d.ts.map +0 -1
  290. package/dist/types/src/styles/fragments/ornament.d.ts +0 -5
  291. package/dist/types/src/styles/fragments/ornament.d.ts.map +0 -1
  292. package/dist/types/src/styles/fragments/selected.d.ts +0 -13
  293. package/dist/types/src/styles/fragments/selected.d.ts.map +0 -1
  294. package/dist/types/src/styles/fragments/shimmer.d.ts +0 -3
  295. package/dist/types/src/styles/fragments/shimmer.d.ts.map +0 -1
  296. package/dist/types/src/styles/fragments/size.d.ts +0 -9
  297. package/dist/types/src/styles/fragments/size.d.ts.map +0 -1
  298. package/dist/types/src/styles/fragments/surface.d.ts +0 -9
  299. package/dist/types/src/styles/fragments/surface.d.ts.map +0 -1
  300. package/dist/types/src/styles/fragments/text.d.ts +0 -7
  301. package/dist/types/src/styles/fragments/text.d.ts.map +0 -1
  302. package/dist/types/src/styles/fragments/valence.d.ts +0 -13
  303. package/dist/types/src/styles/fragments/valence.d.ts.map +0 -1
  304. package/dist/types/src/styles/index.d.ts.map +0 -1
  305. package/dist/types/src/styles/primitives/container.d.ts +0 -15
  306. package/dist/types/src/styles/primitives/container.d.ts.map +0 -1
  307. package/dist/types/src/styles/primitives/index.d.ts +0 -2
  308. package/dist/types/src/styles/primitives/index.d.ts.map +0 -1
  309. package/dist/types/src/styles/theme.d.ts.map +0 -1
  310. package/dist/types/src/tailwind.d.ts +0 -3
  311. package/dist/types/src/tailwind.d.ts.map +0 -1
  312. package/dist/types/src/types.d.ts +0 -3
  313. package/dist/types/src/types.d.ts.map +0 -1
  314. package/dist/types/src/util/withLogical.d.ts +0 -164
  315. package/dist/types/src/util/withLogical.d.ts.map +0 -1
  316. package/src/Tokens.stories.tsx +0 -88
  317. package/src/config/index.ts +0 -6
  318. package/src/config/tailwind.ts +0 -265
  319. package/src/config/tokens/alias-colors.ts +0 -39
  320. package/src/config/tokens/index.ts +0 -6
  321. package/src/config/tokens/lengths.ts +0 -106
  322. package/src/config/tokens/physical-colors.ts +0 -125
  323. package/src/config/tokens/semantic-colors.ts +0 -27
  324. package/src/config/tokens/sememes-calls.ts +0 -17
  325. package/src/config/tokens/sememes-codemirror.ts +0 -50
  326. package/src/config/tokens/sememes-hue.ts +0 -54
  327. package/src/config/tokens/sememes-sheet.ts +0 -62
  328. package/src/config/tokens/sememes-system.ts +0 -307
  329. package/src/config/tokens/sizes.ts +0 -12
  330. package/src/config/tokens/tokens.ts +0 -90
  331. package/src/config/tokens/types.ts +0 -9
  332. package/src/docs/theme.drawio.svg +0 -635
  333. package/src/plugins/esbuild-plugin.ts +0 -65
  334. package/src/plugins/plugin.ts +0 -130
  335. package/src/plugins/resolveContent.ts +0 -51
  336. package/src/styles/components/README.md +0 -6
  337. package/src/styles/components/anchored-overflow.ts +0 -20
  338. package/src/styles/components/button.ts +0 -48
  339. package/src/styles/components/icon.ts +0 -19
  340. package/src/styles/components/input.ts +0 -177
  341. package/src/styles/components/scroll-area.ts +0 -90
  342. package/src/styles/fragments/density.ts +0 -17
  343. package/src/styles/fragments/dimension.ts +0 -8
  344. package/src/styles/fragments/focus.ts +0 -16
  345. package/src/styles/fragments/group.ts +0 -12
  346. package/src/styles/fragments/hover.ts +0 -25
  347. package/src/styles/fragments/index.ts +0 -20
  348. package/src/styles/fragments/layout.ts +0 -7
  349. package/src/styles/fragments/motion.ts +0 -6
  350. package/src/styles/fragments/ornament.ts +0 -10
  351. package/src/styles/fragments/selected.ts +0 -45
  352. package/src/styles/fragments/shimmer.ts +0 -9
  353. package/src/styles/fragments/size.ts +0 -117
  354. package/src/styles/fragments/surface.ts +0 -29
  355. package/src/styles/fragments/text.ts +0 -12
  356. package/src/styles/fragments/valence.ts +0 -46
  357. package/src/styles/layers/README.md +0 -15
  358. package/src/styles/layers/anchored-overflow.css +0 -9
  359. package/src/styles/layers/animation.css +0 -17
  360. package/src/styles/layers/attention.css +0 -8
  361. package/src/styles/layers/base.css +0 -25
  362. package/src/styles/layers/can-scroll.css +0 -26
  363. package/src/styles/layers/drag-preview.css +0 -18
  364. package/src/styles/layers/hues.css +0 -110
  365. package/src/styles/layers/index.css +0 -27
  366. package/src/styles/layers/main.css +0 -183
  367. package/src/styles/layers/positioning.css +0 -23
  368. package/src/styles/layers/scrollbar.css +0 -10
  369. package/src/styles/layers/surfaces.css +0 -31
  370. package/src/styles/layers/tag.css +0 -132
  371. package/src/styles/layers/tldraw.css +0 -91
  372. package/src/styles/layers/tokens.css +0 -47
  373. package/src/styles/primitives/container.ts +0 -33
  374. package/src/styles/primitives/index.ts +0 -5
  375. package/src/tailwind.ts +0 -7
  376. package/src/theme.css +0 -9
  377. package/src/types.ts +0 -7
  378. package/src/util/withLogical.ts +0 -114
  379. /package/dist/types/src/{styles/fragments → fragments}/disabled.d.ts +0 -0
  380. /package/dist/types/src/{styles → theme}/components/avatar.d.ts +0 -0
  381. /package/dist/types/src/{styles → theme}/components/breadcrumb.d.ts +0 -0
  382. /package/dist/types/src/{styles → theme}/components/dialog.d.ts +0 -0
  383. /package/dist/types/src/{styles → theme}/components/link.d.ts +0 -0
  384. /package/dist/types/src/{styles → theme}/components/list.d.ts +0 -0
  385. /package/dist/types/src/{styles → theme}/components/select.d.ts +0 -0
  386. /package/dist/types/src/{styles → theme}/components/separator.d.ts +0 -0
  387. /package/dist/types/src/{styles → theme}/components/skeleton.d.ts +0 -0
  388. /package/dist/types/src/{styles → theme}/components/tag.d.ts +0 -0
  389. /package/dist/types/src/{styles → theme}/components/toast.d.ts +0 -0
  390. /package/dist/types/src/{styles → theme}/components/tooltip.d.ts +0 -0
  391. /package/dist/types/src/{styles → theme}/components/treegrid.d.ts +0 -0
  392. /package/dist/types/src/{styles → theme}/theme.d.ts +0 -0
  393. /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
  394. /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
@@ -1,40 +1,44 @@
1
+ /**
2
+ * Checkbox
3
+ */
4
+
1
5
  /* TODO(thure): Focus is handled by .dx-focus-ring, but should ideally be applied as part of this component.*/
2
6
  @layer dx-components {
3
7
  .dx-checkbox--switch,
4
8
  .dx-checkbox {
5
- @apply border border-unAccent;
9
+ @apply border border-un-accent;
6
10
  &[aria-checked='true'],
7
11
  &[aria-checked='mixed'],
8
12
  &:checked {
9
- @apply bg-accentSurface accent-accentSurface border-accentSurface;
13
+ @apply bg-accent-surface accent-accent-surface border-accent-surface;
10
14
  }
11
15
 
12
16
  &:not([disabled]),
13
17
  &[disabled='false'] {
14
18
  &:hover {
15
- @apply bg-unAccentHover accent-unAccentHover;
19
+ @apply bg-un-accent-hover accent-un-accent-hover;
16
20
  &[aria-checked='true'],
17
21
  &[aria-checked='mixed'],
18
22
  &:checked {
19
- @apply bg-accentSurfaceHover accent-accentSurfaceHover border-accentSurfaceHover;
23
+ @apply bg-accent-surface-hover accent-accent-surface-hover border-accent-surface-hover;
20
24
  }
21
25
  }
22
26
  }
23
27
  }
24
28
 
25
29
  .dx-checkbox {
26
- @apply is-4 bs-4 overflow-hidden shadow-inner transition-colors bg-unAccent accent-unAccent text-accentSurfaceText shrink-0 inline-grid place-items-center rounded-sm;
30
+ @apply w-4 h-4 overflow-hidden shadow-inner transition-colors bg-un-accent accent-un-accent text-accent-foreground shrink-0 inline-grid place-items-center rounded-xs;
27
31
  }
28
32
 
29
33
  /* TODO(ZaymonFC): Focus is handled by .dx-focus-ring, but should ideally be applied as part of this component.*/
30
34
  /* NOTE: This isn't compatible with the Radix switch. */
31
35
  .dx-checkbox--switch {
32
- @apply inline-block appearance-none relative shrink-0 bs-5 is-8;
33
- @apply shadow-inner transition-colors bg-unAccent;
36
+ @apply inline-block appearance-none relative shrink-0 h-5 w-8;
37
+ @apply shadow-inner transition-colors bg-un-accent;
34
38
  @apply cursor-pointer rounded-full;
35
39
 
36
40
  &::before {
37
- @apply is-3 bs-3 mli-[0.1875rem] mlb-[0.1875rem] absolute block bg-white rounded-full border-separator transition-transform duration-100 will-change-transform;
41
+ @apply w-3 h-3 mx-[0.1875rem] my-[0.1875rem] absolute block bg-white rounded-full border-separator transition-transform duration-100 will-change-transform;
38
42
  content: '';
39
43
  }
40
44
 
@@ -1,7 +1,12 @@
1
+ /**
2
+ * Dialog
3
+ */
4
+
1
5
  @layer dx-components {
2
6
  .dx-dialog__overlay {
3
- @apply z-50 fixed grid inset-inline-0 block-start-0 bs-dvh pbs-[env(safe-area-inset-top)] place-items-center overflow-auto bg-scrimSurface;
4
-
7
+ @apply z-40 fixed grid inset-x-0 top-0 h-dvh py-[env(safe-area-inset-top)] place-items-center;
8
+ @apply bg-scrim-surface backdrop-blur-xs;
9
+
5
10
  &[data-state='open'] {
6
11
  @apply animate-fade-in;
7
12
  }
@@ -25,26 +30,26 @@
25
30
  }
26
31
  }
27
32
 
28
- @media (min-width: theme('screens.sm')) {
33
+ @media (width >= theme(--breakpoint-sm)) {
29
34
  .dx-dialog__overlay {
30
35
  @apply p-[calc(env(safe-area-inset-top)+.6rem)];
31
36
  }
32
37
  }
33
38
 
34
- @media (min-width: theme('screens.md')) {
39
+ @media (width >= theme(--breakpoint-md)) {
35
40
  .dx-dialog__overlay {
36
41
  @apply p-[calc(env(safe-area-inset-top)+1.2rem)];
37
42
  }
38
43
  }
39
44
 
40
- @media (min-width: theme('screens.lg')) {
45
+ @media (width >= theme(--breakpoint-lg)) {
41
46
  .dx-dialog__overlay {
42
47
  @apply p-[calc(env(safe-area-inset-top)+2.4rem)];
43
48
  }
44
49
  }
45
50
 
46
51
  .dx-dialog__content {
47
- @apply flex flex-col is-dvw max-bs-full max-is-full p-4 overflow-hidden shadow-md backdrop-blur;
52
+ @apply flex flex-col w-dvw max-w-full max-h-full overflow-hidden shadow-md;
48
53
 
49
54
  &[data-state='open'] {
50
55
  @apply animate-slide-up-and-fade;
@@ -55,19 +60,19 @@
55
60
  }
56
61
  }
57
62
 
58
- @media (min-width: theme('screens.sm')) {
63
+ @media (width >= theme(--breakpoint-sm)) {
59
64
  .dx-dialog__content {
60
- @apply is-[95vw] border rounded-md border-separator;
65
+ @apply w-[95vw] border rounded-md border-separator;
61
66
  }
62
67
  }
63
68
 
64
- @media (min-width: theme('screens.md')) {
69
+ @media (width >= theme(--breakpoint-md)) {
65
70
  .dx-dialog__content {
66
- @apply max-is-[24rem];
71
+ @apply max-w-[24rem];
67
72
  }
68
73
  }
69
74
 
70
75
  .dx-dialog__title {
71
76
  @apply shrink-0 text-xl font-medium;
72
77
  }
73
- }
78
+ }
@@ -1,50 +1,61 @@
1
- @layer utilities {
1
+ /**
2
+ * Focus ring
3
+ */
4
+
5
+ @layer dx-components {
2
6
  .dx-focus-ring,
3
7
  .dx-focus-ring-inset {
4
8
  &:not([disabled]),
5
9
  &[disabled='false'] {
6
10
  &:focus {
7
- @apply outline-none;
11
+ @apply outline-hidden;
8
12
  }
9
13
 
10
14
  &:focus-visible {
11
- @apply ring-focusLine ring-offset-focusOffset z-[1] ring-neutralFocusIndicator;
15
+ @apply ring-focus-line ring-offset-focus-offset z-[1] ring-[var(--color-focus-ring-subtle)];
12
16
 
13
17
  &[data-variant='primary'] {
14
- @apply ring-accentFocusIndicator;
18
+ @apply ring-[var(--color-focus-ring)];
15
19
  }
16
20
 
17
21
  &:hover {
18
- @apply outline-none;
22
+ @apply outline-hidden;
19
23
 
20
24
  .dark & {
21
- @apply outline-none;
25
+ @apply outline-hidden;
22
26
  }
23
27
  }
24
28
  }
25
29
  }
26
30
  }
27
31
 
32
+ .dx-focus-ring-none {
33
+ &:focus,
34
+ &:focus-visible {
35
+ @apply outline-hidden! ring-0!;
36
+ }
37
+ }
38
+
28
39
  .dx-focus-ring-always,
29
40
  .dx-focus-ring-inset-always {
30
41
  &:not([disabled]),
31
42
  &[disabled='false'] {
32
43
  &:focus {
33
- @apply outline-none;
44
+ @apply outline-hidden;
34
45
  }
35
46
 
36
47
  &:focus {
37
- @apply ring-focusLine ring-offset-focusOffset z-[1] ring-neutralFocusIndicator;
48
+ @apply ring-focus-line ring-offset-focus-offset z-[1] ring-[var(--color-focus-ring-subtle)];
38
49
 
39
50
  &[data-variant='primary'] {
40
- @apply ring-accentFocusIndicator;
51
+ @apply ring-[var(--color-focus-ring)];
41
52
  }
42
53
 
43
54
  &:hover {
44
- @apply outline-none;
55
+ @apply outline-hidden;
45
56
 
46
57
  .dark & {
47
- @apply outline-none;
58
+ @apply outline-hidden;
48
59
  }
49
60
  }
50
61
  }
@@ -60,7 +71,7 @@
60
71
  &:not([disabled]),
61
72
  &[disabled='false'] {
62
73
  &:focus {
63
- @apply outline-none;
74
+ @apply outline-hidden;
64
75
  }
65
76
  }
66
77
  }
@@ -68,17 +79,17 @@
68
79
  .dx-focus-ring-group:focus-visible .dx-focus-ring-group-indicator,
69
80
  .dx-focus-ring-group-x:focus-visible .dx-focus-ring-group-x-indicator,
70
81
  .dx-focus-ring-group-y:focus-visible .dx-focus-ring-group-y-indicator {
71
- @apply ring-focusLine ring-offset-focusOffset ring-neutralFocusIndicator;
82
+ @apply ring-focus-line ring-offset-focus-offset ring-[var(--color-focus-ring-subtle)];
72
83
 
73
84
  &[data-variant='primary'] {
74
- @apply ring-accentFocusIndicator;
85
+ @apply ring-[var(--color-focus-ring)];
75
86
  }
76
87
 
77
88
  &:hover {
78
- @apply outline-none;
89
+ @apply outline-hidden;
79
90
 
80
91
  .dark & {
81
- @apply outline-none;
92
+ @apply outline-hidden;
82
93
  }
83
94
  }
84
95
  }
@@ -86,17 +97,17 @@
86
97
  .dx-focus-ring-group-always:focus .dx-focus-ring-group-indicator,
87
98
  .dx-focus-ring-group-x-always:focus .dx-focus-ring-group-x-indicator,
88
99
  .dx-focus-ring-group-y-always:focus .dx-focus-ring-group-y-indicator {
89
- @apply ring-focusLine ring-offset-focusOffset ring-neutralFocusIndicator;
100
+ @apply ring-focus-line ring-offset-focus-offset ring-[var(--color-focus-ring-subtle)];
90
101
 
91
102
  &[data-variant='primary'] {
92
- @apply ring-accentFocusIndicator;
103
+ @apply ring-[var(--color-focus-ring)];
93
104
  }
94
105
 
95
106
  &:hover {
96
- @apply outline-none;
107
+ @apply outline-hidden;
97
108
 
98
109
  .dark & {
99
- @apply outline-none;
110
+ @apply outline-hidden;
100
111
  }
101
112
  }
102
113
  }
@@ -129,23 +140,23 @@
129
140
  }
130
141
 
131
142
  &:focus {
132
- @apply outline-none;
143
+ @apply outline-hidden;
133
144
  }
134
145
 
135
146
  &:focus-visible {
136
147
  &::after {
137
- @apply ring-focusLine ring-offset-focusOffset ring-inset z-[1] ring-neutralFocusIndicator;
148
+ @apply ring-focus-line ring-offset-focus-offset ring-inset z-[1] ring-[var(--color-focus-ring-subtle)];
138
149
  }
139
150
 
140
151
  &[data-variant='primary']::after {
141
- @apply ring-accentFocusIndicator;
152
+ @apply ring-[var(--color-focus-ring)];
142
153
  }
143
154
 
144
155
  &:hover {
145
- @apply outline-none;
156
+ @apply outline-hidden;
146
157
 
147
158
  .dark & {
148
- @apply outline-none;
159
+ @apply outline-hidden;
149
160
  }
150
161
  }
151
162
  }
@@ -162,30 +173,30 @@
162
173
  }
163
174
 
164
175
  &:focus {
165
- @apply outline-none;
176
+ @apply outline-hidden;
166
177
  }
167
178
 
168
179
  &:focus {
169
180
  &::after {
170
- @apply ring-focusLine ring-offset-focusOffset ring-inset z-[1] ring-neutralFocusIndicator;
181
+ @apply ring-focus-line ring-offset-focus-offset ring-inset z-[1] ring-[var(--color-focus-ring-subtle)];
171
182
  }
172
183
 
173
184
  &[data-variant='primary']::after {
174
- @apply ring-accentFocusIndicator;
185
+ @apply ring-[var(--color-focus-ring)];
175
186
  }
176
187
 
177
188
  &:hover {
178
- @apply outline-none;
179
-
189
+ @apply outline-hidden;
180
190
  .dark & {
181
- @apply outline-none;
191
+ @apply outline-hidden;
182
192
  }
183
193
  }
184
194
  }
185
195
  }
186
196
  }
187
197
 
188
- .dx-focus-ring-inset-over-all, .dx-focus-ring-inset-over-all-always {
198
+ .dx-focus-ring-inset-over-all,
199
+ .dx-focus-ring-inset-over-all-always {
189
200
  &:not([disabled]),
190
201
  &[disabled='false'] {
191
202
  &::after {
@@ -202,23 +213,31 @@
202
213
  inset: 0;
203
214
  }
204
215
 
205
- @media screen(lg) {
206
- &[data-sidebar-inline-start-state='expanded']::after {
207
- inset-inline-start: var(--nav-sidebar-size);
216
+ @media (width >= theme(--breakpoint-lg)) {
217
+ &[data-sidebar-left-state='expanded']::after {
218
+ inset-inline-start: var(--dx-nav-sidebar-size);
208
219
  }
209
220
 
210
- &[data-sidebar-inline-start-state='collapsed']::after {
211
- inset-inline-start: var(--l0-size);
221
+ &[data-sidebar-left-state='collapsed']::after {
222
+ inset-inline-start: var(--dx-l0-size);
212
223
  }
213
224
 
214
- &[data-sidebar-inline-end-state='expanded']::after {
215
- inset-inline-end: var(--complementary-sidebar-size);
225
+ &[data-sidebar-right-state='expanded']::after {
226
+ inset-inline-end: var(--dx-complementary-sidebar-size);
216
227
  }
217
228
 
218
- &[data-sidebar-inline-end-state='collapsed']::after {
219
- inset-inline-end: var(--r0-size);
229
+ &[data-sidebar-right-state='collapsed']::after {
230
+ inset-inline-end: var(--dx-r0-size);
220
231
  }
221
232
  }
222
233
  }
223
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
+ }
224
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
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Link component styles.
3
+ */
4
+
5
+ @layer dx-components {
6
+ .dx-link {
7
+ @apply text-accent-text hover:text-accent-text-hover;
8
+ }
9
+ .dx-link-hover {
10
+ @apply hover:text-accent-text-hover;
11
+ }
12
+ }
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Panel — applies bg-{hue}-surface / text-{hue}-foreground / border-{hue}-border tokens via data-hue attribute or BEM modifier.
3
+ * Example: <div className='dx-panel' data-hue='blue'>...</div>
4
+ * Example: <div className='dx-panel dx-panel--blue'>...</div>
5
+ */
6
+
7
+ @layer dx-components {
8
+ [data-hue='neutral'] .dx-panel,
9
+ .dx-panel--neutral {
10
+ @apply bg-neutral-surface text-neutral-foreground border-neutral-border;
11
+ }
12
+
13
+ [data-hue='red'] .dx-panel,
14
+ .dx-panel--red {
15
+ @apply bg-red-surface text-red-foreground border-red-border;
16
+ }
17
+
18
+ [data-hue='orange'] .dx-panel,
19
+ .dx-panel--orange {
20
+ @apply bg-orange-surface text-orange-foreground border-orange-border;
21
+ }
22
+
23
+ [data-hue='amber'] .dx-panel,
24
+ .dx-panel--amber {
25
+ @apply bg-amber-surface text-amber-foreground border-amber-border;
26
+ }
27
+
28
+ [data-hue='yellow'] .dx-panel,
29
+ .dx-panel--yellow {
30
+ @apply bg-yellow-surface text-yellow-foreground border-yellow-border;
31
+ }
32
+
33
+ [data-hue='lime'] .dx-panel,
34
+ .dx-panel--lime {
35
+ @apply bg-lime-surface text-lime-foreground border-lime-border;
36
+ }
37
+
38
+ [data-hue='green'] .dx-panel,
39
+ .dx-panel--green {
40
+ @apply bg-green-surface text-green-foreground border-green-border;
41
+ }
42
+
43
+ [data-hue='emerald'] .dx-panel,
44
+ .dx-panel--emerald {
45
+ @apply bg-emerald-surface text-emerald-foreground border-emerald-border;
46
+ }
47
+
48
+ [data-hue='teal'] .dx-panel,
49
+ .dx-panel--teal {
50
+ @apply bg-teal-surface text-teal-foreground border-teal-border;
51
+ }
52
+
53
+ [data-hue='cyan'] .dx-panel,
54
+ .dx-panel--cyan {
55
+ @apply bg-cyan-surface text-cyan-foreground border-cyan-border;
56
+ }
57
+
58
+ [data-hue='sky'] .dx-panel,
59
+ .dx-panel--sky {
60
+ @apply bg-sky-surface text-sky-foreground border-sky-border;
61
+ }
62
+
63
+ [data-hue='blue'] .dx-panel,
64
+ .dx-panel--blue {
65
+ @apply bg-blue-surface text-blue-foreground border-blue-border;
66
+ }
67
+
68
+ [data-hue='indigo'] .dx-panel,
69
+ .dx-panel--indigo {
70
+ @apply bg-indigo-surface text-indigo-foreground border-indigo-border;
71
+ }
72
+
73
+ [data-hue='violet'] .dx-panel,
74
+ .dx-panel--violet {
75
+ @apply bg-violet-surface text-violet-foreground border-violet-border;
76
+ }
77
+
78
+ [data-hue='purple'] .dx-panel,
79
+ .dx-panel--purple {
80
+ @apply bg-purple-surface text-purple-foreground border-purple-border;
81
+ }
82
+
83
+ [data-hue='fuchsia'] .dx-panel,
84
+ .dx-panel--fuchsia {
85
+ @apply bg-fuchsia-surface text-fuchsia-foreground border-fuchsia-border;
86
+ }
87
+
88
+ [data-hue='pink'] .dx-panel,
89
+ .dx-panel--pink {
90
+ @apply bg-pink-surface text-pink-foreground border-pink-border;
91
+ }
92
+
93
+ [data-hue='rose'] .dx-panel,
94
+ .dx-panel--rose {
95
+ @apply bg-rose-surface text-rose-foreground border-rose-border;
96
+ }
97
+
98
+ [data-hue='info'] .dx-panel,
99
+ .dx-panel--info {
100
+ @apply bg-info-surface text-info-foreground border-info-border;
101
+ }
102
+
103
+ [data-hue='success'] .dx-panel,
104
+ .dx-panel--success {
105
+ @apply bg-success-surface text-success-foreground border-success-border;
106
+ }
107
+
108
+ [data-hue='warning'] .dx-panel,
109
+ .dx-panel--warning {
110
+ @apply bg-warning-surface text-warning-foreground border-warning-border;
111
+ }
112
+
113
+ [data-hue='error'] .dx-panel,
114
+ .dx-panel--error {
115
+ @apply bg-error-surface text-error-foreground border-error-border;
116
+ }
117
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Scrolling
3
+ * Pseudo-classes are not supported by Tailwind.
4
+ */
5
+
6
+ @layer dx-components {
7
+ ::-webkit-scrollbar-thumb:hover {
8
+ @apply bg-scrollbar-thumb-hover!;
9
+ }
10
+ ::-webkit-scrollbar-thumb:active {
11
+ @apply bg-scrollbar-thumb-active!;
12
+ }
13
+
14
+ .dx-scrollbar-thin::-webkit-scrollbar {
15
+ @apply w-[4px];
16
+ }
17
+ .dx-scrollbar-thin::-webkit-scrollbar-thumb {
18
+ @apply bg-transparent;
19
+ transition: background 0.15s;
20
+ }
21
+ .dx-scrollbar-thin:hover::-webkit-scrollbar-thumb {
22
+ @apply bg-scrollbar-thumb;
23
+ }
24
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Selected / Current / 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
+ /*
10
+ * Pure visual affordance, no ARIA pair. Combine with dx-selected or dx-current.
11
+ *
12
+ * Picks the hover variant matching the element's underlying state:
13
+ * - neither aria-selected nor aria-current → hover-surface
14
+ * - aria-selected="true" → selected-surface-hover
15
+ * - aria-current="true" → current-surface-hover (wins if both)
16
+ *
17
+ * Higher-specificity rules (attribute selectors) override the plain :hover rule,
18
+ * and `aria-current` is listed last so it beats `aria-selected` at equal specificity.
19
+ */
20
+ .dx-hover {
21
+ @apply cursor-pointer
22
+ hover:bg-hover-surface! hover:text-hover-foreground!
23
+ hover:aria-selected:bg-selected-surface-hover! hover:aria-selected:text-selected-foreground!
24
+ hover:aria-[current=true]:bg-current-surface-hover! hover:aria-[current=true]:text-current-foreground!;
25
+ }
26
+ .dx-hover-row {
27
+ @apply group-hover/row:bg-hover-surface! group-hover/row:text-hover-foreground!
28
+ group-hover/row:group-aria-selected/row:bg-selected-surface-hover!
29
+ group-hover/row:group-aria-selected/row:text-selected-foreground!
30
+ group-hover/row:group-aria-[current=true]/row:bg-current-surface-hover!
31
+ group-hover/row:group-aria-[current=true]/row:text-current-foreground!;
32
+ }
33
+
34
+ /*
35
+ * Pairs with `aria-selected`. Use for listbox/option selection (master/detail).
36
+ * `!` is required: these utilities live in the `dx-components` layer, but
37
+ * background utilities like `bg-card-surface` live in Tailwind's
38
+ * `utilities` layer (declared later in the cascade), so without
39
+ * `!important` the card background would override the state colour.
40
+ *
41
+ * NOTE: Declared before `.dx-current` so that when an element has both
42
+ * `aria-selected="true"` and `aria-current="true"`, `dx-current` wins at
43
+ * equal specificity (consistent with how `dx-hover` resolves the same
44
+ * conflict).
45
+ */
46
+ .dx-selected {
47
+ @apply aria-selected:bg-selected-surface! aria-selected:text-selected-foreground!
48
+ aria-selected:font-semibold aria-selected:tracking-normal
49
+ transition-[color,font-variation-settings,letter-spacing];
50
+ }
51
+
52
+ /*
53
+ * Pairs with `aria-current="true|page|…"`. Use for "you are here" navigation.
54
+ *
55
+ * The ring uses the subdued focus indicator (neutral) rather than the
56
+ * accent blue — `dx-current` marks position, not focus, so a saturated
57
+ * ring would compete with the actual keyboard focus ring.
58
+ */
59
+ .dx-current {
60
+ @apply dx-ring-pseudo
61
+ aria-[current=true]:bg-current-surface! aria-[current=true]:text-current-foreground!
62
+ aria-[current=true]:after:ring-focus-ring-subtle!;
63
+ }
64
+ .dx-current-row {
65
+ @apply group-aria-[current=true]/row:bg-current-surface! group-aria-[current=true]/row:text-current-foreground!;
66
+ }
67
+
68
+ /*
69
+ * Pairs with Radix-managed `data-highlighted`. Don't set the attribute manually.
70
+ */
71
+ .dx-highlighted {
72
+ @apply data-[highlighted]:bg-current-surface
73
+ data-[highlighted]:text-current-foreground
74
+ hover:data-[highlighted]:bg-current-surface-hover;
75
+ }
76
+ }