@dxos/ui-theme 0.0.0 → 0.8.4-main.05e74ebcff

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 (260) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +1 -1
  3. package/dist/lib/browser/index.mjs +1370 -0
  4. package/dist/lib/browser/index.mjs.map +7 -0
  5. package/dist/lib/browser/meta.json +1 -0
  6. package/dist/lib/node-esm/index.mjs +1372 -0
  7. package/dist/lib/node-esm/index.mjs.map +7 -0
  8. package/dist/lib/node-esm/meta.json +1 -0
  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 -0
  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 -0
  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 +3 -0
  26. package/dist/types/src/fragments/disabled.d.ts.map +1 -0
  27. package/dist/types/src/fragments/hover.d.ts +9 -0
  28. package/dist/types/src/fragments/hover.d.ts.map +1 -0
  29. package/dist/types/src/fragments/index.d.ts +5 -0
  30. package/dist/types/src/fragments/index.d.ts.map +1 -0
  31. package/dist/types/src/fragments/text.d.ts +2 -0
  32. package/dist/types/src/fragments/text.d.ts.map +1 -0
  33. package/dist/types/src/index.d.ts +5 -0
  34. package/dist/types/src/index.d.ts.map +1 -0
  35. package/dist/types/src/plugins/ThemePlugin.d.ts +16 -0
  36. package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -0
  37. package/dist/types/src/plugins/dark-mode.d.ts +1 -0
  38. package/dist/types/src/plugins/dark-mode.d.ts.map +1 -0
  39. package/dist/types/src/theme/components/avatar.d.ts +21 -0
  40. package/dist/types/src/theme/components/avatar.d.ts.map +1 -0
  41. package/dist/types/src/theme/components/breadcrumb.d.ts +9 -0
  42. package/dist/types/src/theme/components/breadcrumb.d.ts.map +1 -0
  43. package/dist/types/src/theme/components/button.d.ts +15 -0
  44. package/dist/types/src/theme/components/button.d.ts.map +1 -0
  45. package/dist/types/src/theme/components/card.d.ts +12 -0
  46. package/dist/types/src/theme/components/card.d.ts.map +1 -0
  47. package/dist/types/src/theme/components/dialog.d.ts +17 -0
  48. package/dist/types/src/theme/components/dialog.d.ts.map +1 -0
  49. package/dist/types/src/theme/components/focus.d.ts +6 -0
  50. package/dist/types/src/theme/components/focus.d.ts.map +1 -0
  51. package/dist/types/src/theme/components/icon-button.d.ts +9 -0
  52. package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
  53. package/dist/types/src/theme/components/icon.d.ts +10 -0
  54. package/dist/types/src/theme/components/icon.d.ts.map +1 -0
  55. package/dist/types/src/theme/components/index.d.ts +27 -0
  56. package/dist/types/src/theme/components/index.d.ts.map +1 -0
  57. package/dist/types/src/theme/components/input.d.ts +115 -0
  58. package/dist/types/src/theme/components/input.d.ts.map +1 -0
  59. package/dist/types/src/theme/components/link.d.ts +7 -0
  60. package/dist/types/src/theme/components/link.d.ts.map +1 -0
  61. package/dist/types/src/theme/components/list.d.ts +14 -0
  62. package/dist/types/src/theme/components/list.d.ts.map +1 -0
  63. package/dist/types/src/theme/components/main.d.ts +28 -0
  64. package/dist/types/src/theme/components/main.d.ts.map +1 -0
  65. package/dist/types/src/theme/components/menu.d.ts +13 -0
  66. package/dist/types/src/theme/components/menu.d.ts.map +1 -0
  67. package/dist/types/src/theme/components/message.d.ts +12 -0
  68. package/dist/types/src/theme/components/message.d.ts.map +1 -0
  69. package/dist/types/src/theme/components/popover.d.ts +11 -0
  70. package/dist/types/src/theme/components/popover.d.ts.map +1 -0
  71. package/dist/types/src/theme/components/scroll-area.d.ts +32 -0
  72. package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
  73. package/dist/types/src/theme/components/select.d.ts +13 -0
  74. package/dist/types/src/theme/components/select.d.ts.map +1 -0
  75. package/dist/types/src/theme/components/separator.d.ts +8 -0
  76. package/dist/types/src/theme/components/separator.d.ts.map +1 -0
  77. package/dist/types/src/theme/components/skeleton.d.ts +7 -0
  78. package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
  79. package/dist/types/src/theme/components/splitter.d.ts +4 -0
  80. package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
  81. package/dist/types/src/theme/components/status.d.ts +9 -0
  82. package/dist/types/src/theme/components/status.d.ts.map +1 -0
  83. package/dist/types/src/theme/components/tag.d.ts +7 -0
  84. package/dist/types/src/theme/components/tag.d.ts.map +1 -0
  85. package/dist/types/src/theme/components/toast.d.ts +12 -0
  86. package/dist/types/src/theme/components/toast.d.ts.map +1 -0
  87. package/dist/types/src/theme/components/toolbar.d.ts +11 -0
  88. package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
  89. package/dist/types/src/theme/components/tooltip.d.ts +8 -0
  90. package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
  91. package/dist/types/src/theme/components/treegrid.d.ts +10 -0
  92. package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
  93. package/dist/types/src/theme/index.d.ts +4 -0
  94. package/dist/types/src/theme/index.d.ts.map +1 -0
  95. package/dist/types/src/theme/primitives/column.d.ts +29 -0
  96. package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
  97. package/dist/types/src/theme/primitives/index.d.ts +3 -0
  98. package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
  99. package/dist/types/src/theme/primitives/panel.d.ts +13 -0
  100. package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
  101. package/dist/types/src/theme/theme.d.ts +5 -0
  102. package/dist/types/src/theme/theme.d.ts.map +1 -0
  103. package/dist/types/src/util/elevation.d.ts +9 -0
  104. package/dist/types/src/util/elevation.d.ts.map +1 -0
  105. package/dist/types/src/util/hash-styles.d.ts +18 -0
  106. package/dist/types/src/util/hash-styles.d.ts.map +1 -0
  107. package/dist/types/src/util/index.d.ts +6 -0
  108. package/dist/types/src/util/index.d.ts.map +1 -0
  109. package/dist/types/src/util/mx.d.ts +58 -0
  110. package/dist/types/src/util/mx.d.ts.map +1 -0
  111. package/dist/types/src/util/size.d.ts +27 -0
  112. package/dist/types/src/util/size.d.ts.map +1 -0
  113. package/dist/types/src/util/valence.d.ts +4 -0
  114. package/dist/types/src/util/valence.d.ts.map +1 -0
  115. package/dist/types/tsconfig.tsbuildinfo +1 -0
  116. package/package.json +32 -39
  117. package/src/Theme.stories.tsx +224 -0
  118. package/src/css/DESIGN_SYSTEM.md +159 -0
  119. package/src/css/base/base.css +43 -0
  120. package/src/{styles/layers → css/base}/typography.css +21 -3
  121. package/src/{styles/layers → css/components}/button.css +23 -14
  122. package/src/{styles/layers → css/components}/checkbox.css +12 -8
  123. package/src/css/components/dialog.css +78 -0
  124. package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
  125. package/src/css/components/icon.css +9 -0
  126. package/src/css/components/link.css +12 -0
  127. package/src/css/components/panel.css +117 -0
  128. package/src/css/components/scrollbar.css +24 -0
  129. package/src/css/components/selected.css +76 -0
  130. package/src/css/components/selected.md +101 -0
  131. package/src/css/components/surface.css +34 -0
  132. package/src/css/components/tag.css +132 -0
  133. package/src/css/components/text.css +124 -0
  134. package/src/css/integrations/codemirror.css +34 -0
  135. package/src/css/integrations/tldraw.css +14 -0
  136. package/src/css/layout/main.css +205 -0
  137. package/src/{styles/layers → css/layout}/native.css +6 -4
  138. package/src/css/layout/positioning.css +19 -0
  139. package/src/{styles/layers → css/layout}/size.css +130 -102
  140. package/src/css/theme/animation.css +260 -0
  141. package/src/css/theme/border.css +23 -0
  142. package/src/css/theme/palette.css +36 -0
  143. package/src/css/theme/semantic.css +112 -0
  144. package/src/css/theme/spacing.css +147 -0
  145. package/src/css/theme/styles.css +145 -0
  146. package/src/css/theme/text.css +37 -0
  147. package/src/css/utilities.css +118 -0
  148. package/src/defs.ts +48 -0
  149. package/src/fragments/AUDIT.md +55 -0
  150. package/src/fragments/density.ts +16 -0
  151. package/src/fragments/hover.ts +16 -0
  152. package/src/fragments/index.ts +10 -0
  153. package/src/fragments/text.ts +6 -0
  154. package/src/index.ts +3 -14
  155. package/src/main.css +121 -0
  156. package/src/plugins/ThemePlugin.ts +125 -0
  157. package/src/plugins/dark-mode.ts +22 -0
  158. package/src/plugins/main.css +45 -0
  159. package/src/{styles → theme}/components/avatar.ts +12 -13
  160. package/src/theme/components/button.ts +48 -0
  161. package/src/theme/components/card.ts +102 -0
  162. package/src/theme/components/dialog.ts +61 -0
  163. package/src/theme/components/focus.ts +33 -0
  164. package/src/{styles → theme}/components/icon-button.ts +6 -5
  165. package/src/theme/components/icon.ts +28 -0
  166. package/src/{styles → theme}/components/index.ts +4 -1
  167. package/src/theme/components/input.ts +171 -0
  168. package/src/{styles → theme}/components/link.ts +3 -4
  169. package/src/{styles → theme}/components/list.ts +5 -5
  170. package/src/{styles → theme}/components/main.ts +9 -11
  171. package/src/{styles → theme}/components/menu.ts +11 -21
  172. package/src/{styles → theme}/components/message.ts +11 -7
  173. package/src/{styles → theme}/components/popover.ts +13 -12
  174. package/src/theme/components/scroll-area.ts +115 -0
  175. package/src/{styles → theme}/components/select.ts +8 -16
  176. package/src/{styles → theme}/components/separator.ts +3 -3
  177. package/src/theme/components/skeleton.ts +23 -0
  178. package/src/theme/components/splitter.ts +20 -0
  179. package/src/{styles → theme}/components/status.ts +7 -7
  180. package/src/{styles → theme}/components/tag.ts +1 -1
  181. package/src/{styles → theme}/components/toast.ts +6 -8
  182. package/src/theme/components/toolbar.ts +35 -0
  183. package/src/{styles → theme}/components/tooltip.ts +4 -6
  184. package/src/{styles → theme}/components/treegrid.ts +9 -9
  185. package/src/{styles → theme}/index.ts +2 -2
  186. package/src/theme/primitives/column.ts +71 -0
  187. package/src/theme/primitives/index.ts +6 -0
  188. package/src/theme/primitives/panel.ts +43 -0
  189. package/src/{styles → theme}/theme.ts +27 -9
  190. package/src/typings.d.ts +3 -1
  191. package/src/{styles/fragments → util}/elevation.ts +6 -8
  192. package/src/util/hash-styles.ts +118 -98
  193. package/src/util/index.ts +3 -0
  194. package/src/util/mx.ts +165 -43
  195. package/src/util/size.ts +103 -0
  196. package/src/util/valence.ts +33 -0
  197. package/src/Tokens.stories.tsx +0 -88
  198. package/src/config/index.ts +0 -6
  199. package/src/config/tailwind.ts +0 -250
  200. package/src/config/tokens/alias-colors.ts +0 -39
  201. package/src/config/tokens/index.ts +0 -92
  202. package/src/config/tokens/lengths.ts +0 -97
  203. package/src/config/tokens/physical-colors.ts +0 -125
  204. package/src/config/tokens/semantic-colors.ts +0 -27
  205. package/src/config/tokens/sememes-calls.ts +0 -17
  206. package/src/config/tokens/sememes-codemirror.ts +0 -50
  207. package/src/config/tokens/sememes-hue.ts +0 -54
  208. package/src/config/tokens/sememes-sheet.ts +0 -62
  209. package/src/config/tokens/sememes-system.ts +0 -302
  210. package/src/config/tokens/sizes.ts +0 -7
  211. package/src/config/tokens/types.ts +0 -9
  212. package/src/docs/theme.drawio.svg +0 -635
  213. package/src/plugins/esbuild-plugin.ts +0 -65
  214. package/src/plugins/plugin.ts +0 -130
  215. package/src/plugins/resolveContent.ts +0 -51
  216. package/src/styles/components/README.md +0 -6
  217. package/src/styles/components/anchored-overflow.ts +0 -20
  218. package/src/styles/components/button.ts +0 -48
  219. package/src/styles/components/dialog.ts +0 -36
  220. package/src/styles/components/icon.ts +0 -19
  221. package/src/styles/components/input.ts +0 -177
  222. package/src/styles/components/scroll-area.ts +0 -43
  223. package/src/styles/components/toolbar.ts +0 -29
  224. package/src/styles/fragments/density.ts +0 -17
  225. package/src/styles/fragments/dimension.ts +0 -8
  226. package/src/styles/fragments/focus.ts +0 -16
  227. package/src/styles/fragments/group.ts +0 -12
  228. package/src/styles/fragments/hover.ts +0 -25
  229. package/src/styles/fragments/index.ts +0 -20
  230. package/src/styles/fragments/layout.ts +0 -7
  231. package/src/styles/fragments/motion.ts +0 -6
  232. package/src/styles/fragments/ornament.ts +0 -10
  233. package/src/styles/fragments/selected.ts +0 -45
  234. package/src/styles/fragments/shimmer.ts +0 -9
  235. package/src/styles/fragments/size.ts +0 -117
  236. package/src/styles/fragments/surface.ts +0 -29
  237. package/src/styles/fragments/text.ts +0 -12
  238. package/src/styles/fragments/valence.ts +0 -46
  239. package/src/styles/layers/README.md +0 -15
  240. package/src/styles/layers/anchored-overflow.css +0 -9
  241. package/src/styles/layers/animation.css +0 -17
  242. package/src/styles/layers/attention.css +0 -8
  243. package/src/styles/layers/base.css +0 -25
  244. package/src/styles/layers/can-scroll.css +0 -26
  245. package/src/styles/layers/dialog.css +0 -42
  246. package/src/styles/layers/drag-preview.css +0 -18
  247. package/src/styles/layers/hues.css +0 -110
  248. package/src/styles/layers/index.css +0 -26
  249. package/src/styles/layers/main.css +0 -160
  250. package/src/styles/layers/positioning.css +0 -23
  251. package/src/styles/layers/surfaces.css +0 -31
  252. package/src/styles/layers/tag.css +0 -132
  253. package/src/styles/layers/tldraw.css +0 -91
  254. package/src/styles/layers/tokens.css +0 -45
  255. package/src/tailwind.ts +0 -5
  256. package/src/theme.css +0 -9
  257. package/src/types.ts +0 -7
  258. package/src/util/withLogical.ts +0 -114
  259. /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
  260. /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
@@ -1,19 +1,19 @@
1
1
  /**
2
- * Typography configuration.
2
+ * Typography
3
3
  */
4
4
 
5
5
  @import '@fontsource-variable/jetbrains-mono/wght-italic.css';
6
6
  @import '@fontsource-variable/jetbrains-mono/wght.css';
7
- @import '@fontsource-variable/inter/slnt.css';
8
7
  @import '@fontsource/poiret-one';
9
8
 
10
- @layer utilities {
9
+ @layer dx-components {
11
10
  /* Font weights & `italic` handling */
12
11
  .not-italic {
13
12
  font-variation-settings:
14
13
  'wght' 400,
15
14
  'slnt' 0;
16
15
  }
16
+
17
17
  .font-thin,
18
18
  .not-italic.font-thin,
19
19
  .not-italic .font-thin,
@@ -22,6 +22,7 @@
22
22
  'wght' 100,
23
23
  'slnt' 0;
24
24
  }
25
+
25
26
  .font-extralight,
26
27
  .not-italic.font-extralight,
27
28
  .not-italic .font-extralight,
@@ -30,6 +31,7 @@
30
31
  'wght' 200,
31
32
  'slnt' 0;
32
33
  }
34
+
33
35
  .font-light,
34
36
  .not-italic.font-light,
35
37
  .not-italic .font-light,
@@ -38,6 +40,7 @@
38
40
  'wght' 300,
39
41
  'slnt' 0;
40
42
  }
43
+
41
44
  .font-normal,
42
45
  .not-italic.font-normal,
43
46
  .not-italic .font-normal,
@@ -46,6 +49,7 @@
46
49
  'wght' 400,
47
50
  'slnt' 0;
48
51
  }
52
+
49
53
  .font-medium,
50
54
  .not-italic.font-medium,
51
55
  .not-italic .font-medium,
@@ -54,6 +58,7 @@
54
58
  'wght' 500,
55
59
  'slnt' 0;
56
60
  }
61
+
57
62
  .font-semibold,
58
63
  .not-italic.font-semibold,
59
64
  .not-italic .font-semibold,
@@ -62,6 +67,7 @@
62
67
  'wght' 600,
63
68
  'slnt' 0;
64
69
  }
70
+
65
71
  .font-bold,
66
72
  .not-italic.font-bold,
67
73
  .not-italic .font-bold,
@@ -70,6 +76,7 @@
70
76
  'wght' 700,
71
77
  'slnt' 0;
72
78
  }
79
+
73
80
  .font-extrabold,
74
81
  .not-italic.font-extrabold,
75
82
  .not-italic .font-extrabold,
@@ -78,6 +85,7 @@
78
85
  'wght' 800,
79
86
  'slnt' 0;
80
87
  }
88
+
81
89
  .font-black,
82
90
  .not-italic.font-black,
83
91
  .not-italic .font-black,
@@ -86,11 +94,13 @@
86
94
  'wght' 900,
87
95
  'slnt' 0;
88
96
  }
97
+
89
98
  .italic {
90
99
  font-variation-settings:
91
100
  'wght' 400,
92
101
  'slnt' -10;
93
102
  }
103
+
94
104
  .italic.font-thin,
95
105
  .italic .font-thin,
96
106
  .font-thin .italic {
@@ -98,6 +108,7 @@
98
108
  'wght' 100,
99
109
  'slnt' -10;
100
110
  }
111
+
101
112
  .italic.font-extralight,
102
113
  .italic .font-extralight,
103
114
  .font-extralight .italic {
@@ -105,6 +116,7 @@
105
116
  'wght' 200,
106
117
  'slnt' -10;
107
118
  }
119
+
108
120
  .italic.font-light,
109
121
  .italic .font-light,
110
122
  .font-light .italic {
@@ -112,6 +124,7 @@
112
124
  'wght' 300,
113
125
  'slnt' -10;
114
126
  }
127
+
115
128
  .italic.font-normal,
116
129
  .italic .font-normal,
117
130
  .font-normal .italic {
@@ -119,6 +132,7 @@
119
132
  'wght' 400,
120
133
  'slnt' -10;
121
134
  }
135
+
122
136
  .italic.font-medium,
123
137
  .italic .font-medium,
124
138
  .font-medium .italic {
@@ -126,6 +140,7 @@
126
140
  'wght' 500,
127
141
  'slnt' -10;
128
142
  }
143
+
129
144
  .italic.font-semibold,
130
145
  .italic .font-semibold,
131
146
  .font-semibold .italic {
@@ -133,6 +148,7 @@
133
148
  'wght' 600,
134
149
  'slnt' -10;
135
150
  }
151
+
136
152
  .italic.font-bold,
137
153
  .italic .font-bold,
138
154
  .font-bold .italic {
@@ -140,6 +156,7 @@
140
156
  'wght' 700,
141
157
  'slnt' -10;
142
158
  }
159
+
143
160
  .italic.font-extrabold,
144
161
  .italic .font-extrabold,
145
162
  .font-extrabold .italic {
@@ -147,6 +164,7 @@
147
164
  'wght' 800,
148
165
  'slnt' -10;
149
166
  }
167
+
150
168
  .italic.font-black,
151
169
  .italic .font-black,
152
170
  .font-black .italic {
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Button
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
  /**
@@ -6,71 +10,76 @@
6
10
 
7
11
  /* Base styles */
8
12
  .dx-button {
9
- @apply font-medium shrink-0 inline-flex select-none items-center justify-center overflow-hidden transition-colors duration-100 ease-linear bg-inputSurface min-bs-[2.5rem] pli-3;
13
+ @apply shrink-0 inline-flex select-none items-center justify-center overflow-hidden min-h-[2rem] px-3;
14
+ @apply font-medium transition-colors duration-100 ease-linear bg-input-surface;
10
15
  &[aria-pressed='true'],
11
16
  &[aria-checked='true'] {
12
- @apply text-accentText bg-attention;
17
+ @apply text-accent-text bg-attention-surface;
13
18
  }
19
+
14
20
  /* Disabled styles */
15
21
  &[disabled]:not([disabled='false']) {
16
22
  @apply opacity-40 cursor-not-allowed shadow-none;
17
23
  }
24
+
18
25
  /* Variants consistent between enabled & disabled */
19
26
  &[data-variant='ghost'] {
20
27
  @apply bg-transparent;
21
28
  &:hover {
22
- @apply bg-hoverSurface text-inherit;
29
+ @apply bg-hover-surface text-inherit;
23
30
  }
24
31
  &[data-state='open'] {
25
- @apply bg-inputSurface;
32
+ @apply bg-input-surface;
26
33
  }
27
34
  &[aria-pressed='true'],
28
35
  &[aria-checked='true'] {
29
- @apply bg-baseSurface text-accentText;
36
+ @apply bg-base-surface text-accent-text;
30
37
  }
31
38
  }
32
39
  &[data-variant='outline'] {
33
- @apply border border-baseSurface bg-transparent;
40
+ @apply border border-base-surface bg-transparent;
34
41
  &:hover {
35
- @apply bg-hoverSurface;
42
+ @apply bg-hover-surface;
36
43
  }
37
44
  }
45
+
38
46
  /* Enabled styles */
39
47
  &:not([disabled]),
40
48
  &[disabled='false'] {
41
49
  /* Hover */
42
50
  &:hover {
43
- @apply bg-hoverSurface;
51
+ @apply bg-hover-surface;
44
52
  }
53
+
45
54
  /* Variants */
46
55
  &[data-variant='primary'] {
47
- @apply text-accentSurfaceText bg-accentSurface;
56
+ @apply text-accent-foreground bg-accent-surface;
48
57
  &:hover,
49
58
  &[aria-pressed='true'],
50
59
  &[aria-checked='true'] &[data-state='open'] {
51
- @apply bg-accentSurfaceHover;
60
+ @apply bg-accent-surface-hover;
52
61
  }
53
62
  }
54
63
  &[data-variant='destructive'] {
55
- @apply text-accentSurfaceText bg-roseFill;
64
+ @apply text-accent-foreground bg-rose-fill;
56
65
  &:hover,
57
66
  &[aria-pressed='true'],
58
67
  &[aria-checked='true'] &[data-state='open'] {
59
- @apply bg-roseFill;
68
+ @apply bg-rose-fill;
60
69
  }
61
70
  }
62
71
  }
63
72
  }
64
73
  /* Props */
65
74
  .dx-button:not([data-props~='grouped']) {
66
- @apply rounded-sm;
75
+ @apply rounded-xs;
67
76
  }
68
77
  .dx-button:not([data-props~='wrap']) {
69
78
  @apply truncate;
70
79
  }
71
80
  @media (pointer: fine) {
72
81
  .dx-button[data-density='fine'] {
73
- @apply min-bs-[2rem] pli-2.5;
82
+ @apply min-h-[2rem] px-2.5;
74
83
  }
75
84
  }
76
85
  }
@@ -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
 
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Dialog
3
+ */
4
+
5
+ @layer dx-components {
6
+ .dx-dialog__overlay {
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
+
10
+ &[data-state='open'] {
11
+ @apply animate-fade-in;
12
+ }
13
+
14
+ &[data-state='closed'] {
15
+ @apply animate-fade-out;
16
+ }
17
+
18
+ &[data-block-align='start'] {
19
+ align-items: start;
20
+ justify-items: center;
21
+ }
22
+
23
+ &[data-block-align='center'] {
24
+ place-items: center;
25
+ }
26
+
27
+ &[data-block-align='end'] {
28
+ align-items: end;
29
+ justify-items: center;
30
+ }
31
+ }
32
+
33
+ @media (width >= theme(--breakpoint-sm)) {
34
+ .dx-dialog__overlay {
35
+ @apply p-[calc(env(safe-area-inset-top)+.6rem)];
36
+ }
37
+ }
38
+
39
+ @media (width >= theme(--breakpoint-md)) {
40
+ .dx-dialog__overlay {
41
+ @apply p-[calc(env(safe-area-inset-top)+1.2rem)];
42
+ }
43
+ }
44
+
45
+ @media (width >= theme(--breakpoint-lg)) {
46
+ .dx-dialog__overlay {
47
+ @apply p-[calc(env(safe-area-inset-top)+2.4rem)];
48
+ }
49
+ }
50
+
51
+ .dx-dialog__content {
52
+ @apply flex flex-col w-dvw max-w-full max-h-full overflow-hidden shadow-md;
53
+
54
+ &[data-state='open'] {
55
+ @apply animate-slide-up-and-fade;
56
+ }
57
+
58
+ &[data-state='closed'] {
59
+ @apply animate-slide-down-and-fade;
60
+ }
61
+ }
62
+
63
+ @media (width >= theme(--breakpoint-sm)) {
64
+ .dx-dialog__content {
65
+ @apply w-[95vw] border rounded-md border-separator;
66
+ }
67
+ }
68
+
69
+ @media (width >= theme(--breakpoint-md)) {
70
+ .dx-dialog__content {
71
+ @apply max-w-[24rem];
72
+ }
73
+ }
74
+
75
+ .dx-dialog__title {
76
+ @apply shrink-0 text-xl font-medium;
77
+ }
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
+ }