@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.
- package/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/browser/index.mjs +1370 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +1372 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/plugin/node-cjs/main.css +1573 -0
- package/dist/plugin/node-cjs/main.css.map +7 -0
- package/dist/plugin/node-cjs/meta.json +1 -0
- package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs +137 -0
- package/dist/plugin/node-cjs/plugins/ThemePlugin.cjs.map +7 -0
- package/dist/plugin/node-esm/main.css +1573 -0
- package/dist/plugin/node-esm/main.css.map +7 -0
- package/dist/plugin/node-esm/meta.json +1 -0
- package/dist/plugin/node-esm/plugins/ThemePlugin.mjs +105 -0
- package/dist/plugin/node-esm/plugins/ThemePlugin.mjs.map +7 -0
- package/dist/types/src/Theme.stories.d.ts +27 -0
- package/dist/types/src/Theme.stories.d.ts.map +1 -0
- package/dist/types/src/defs.d.ts +21 -0
- package/dist/types/src/defs.d.ts.map +1 -0
- package/dist/types/src/fragments/density.d.ts +4 -0
- package/dist/types/src/fragments/density.d.ts.map +1 -0
- package/dist/types/src/fragments/disabled.d.ts +3 -0
- package/dist/types/src/fragments/disabled.d.ts.map +1 -0
- package/dist/types/src/fragments/hover.d.ts +9 -0
- package/dist/types/src/fragments/hover.d.ts.map +1 -0
- package/dist/types/src/fragments/index.d.ts +5 -0
- package/dist/types/src/fragments/index.d.ts.map +1 -0
- package/dist/types/src/fragments/text.d.ts +2 -0
- package/dist/types/src/fragments/text.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/plugins/ThemePlugin.d.ts +16 -0
- package/dist/types/src/plugins/ThemePlugin.d.ts.map +1 -0
- package/dist/types/src/plugins/dark-mode.d.ts +1 -0
- package/dist/types/src/plugins/dark-mode.d.ts.map +1 -0
- package/dist/types/src/theme/components/avatar.d.ts +21 -0
- package/dist/types/src/theme/components/avatar.d.ts.map +1 -0
- package/dist/types/src/theme/components/breadcrumb.d.ts +9 -0
- package/dist/types/src/theme/components/breadcrumb.d.ts.map +1 -0
- package/dist/types/src/theme/components/button.d.ts +15 -0
- package/dist/types/src/theme/components/button.d.ts.map +1 -0
- package/dist/types/src/theme/components/card.d.ts +12 -0
- package/dist/types/src/theme/components/card.d.ts.map +1 -0
- package/dist/types/src/theme/components/dialog.d.ts +17 -0
- package/dist/types/src/theme/components/dialog.d.ts.map +1 -0
- package/dist/types/src/theme/components/focus.d.ts +6 -0
- package/dist/types/src/theme/components/focus.d.ts.map +1 -0
- package/dist/types/src/theme/components/icon-button.d.ts +9 -0
- package/dist/types/src/theme/components/icon-button.d.ts.map +1 -0
- package/dist/types/src/theme/components/icon.d.ts +10 -0
- package/dist/types/src/theme/components/icon.d.ts.map +1 -0
- package/dist/types/src/theme/components/index.d.ts +27 -0
- package/dist/types/src/theme/components/index.d.ts.map +1 -0
- package/dist/types/src/theme/components/input.d.ts +115 -0
- package/dist/types/src/theme/components/input.d.ts.map +1 -0
- package/dist/types/src/theme/components/link.d.ts +7 -0
- package/dist/types/src/theme/components/link.d.ts.map +1 -0
- package/dist/types/src/theme/components/list.d.ts +14 -0
- package/dist/types/src/theme/components/list.d.ts.map +1 -0
- package/dist/types/src/theme/components/main.d.ts +28 -0
- package/dist/types/src/theme/components/main.d.ts.map +1 -0
- package/dist/types/src/theme/components/menu.d.ts +13 -0
- package/dist/types/src/theme/components/menu.d.ts.map +1 -0
- package/dist/types/src/theme/components/message.d.ts +12 -0
- package/dist/types/src/theme/components/message.d.ts.map +1 -0
- package/dist/types/src/theme/components/popover.d.ts +11 -0
- package/dist/types/src/theme/components/popover.d.ts.map +1 -0
- package/dist/types/src/theme/components/scroll-area.d.ts +32 -0
- package/dist/types/src/theme/components/scroll-area.d.ts.map +1 -0
- package/dist/types/src/theme/components/select.d.ts +13 -0
- package/dist/types/src/theme/components/select.d.ts.map +1 -0
- package/dist/types/src/theme/components/separator.d.ts +8 -0
- package/dist/types/src/theme/components/separator.d.ts.map +1 -0
- package/dist/types/src/theme/components/skeleton.d.ts +7 -0
- package/dist/types/src/theme/components/skeleton.d.ts.map +1 -0
- package/dist/types/src/theme/components/splitter.d.ts +4 -0
- package/dist/types/src/theme/components/splitter.d.ts.map +1 -0
- package/dist/types/src/theme/components/status.d.ts +9 -0
- package/dist/types/src/theme/components/status.d.ts.map +1 -0
- package/dist/types/src/theme/components/tag.d.ts +7 -0
- package/dist/types/src/theme/components/tag.d.ts.map +1 -0
- package/dist/types/src/theme/components/toast.d.ts +12 -0
- package/dist/types/src/theme/components/toast.d.ts.map +1 -0
- package/dist/types/src/theme/components/toolbar.d.ts +11 -0
- package/dist/types/src/theme/components/toolbar.d.ts.map +1 -0
- package/dist/types/src/theme/components/tooltip.d.ts +8 -0
- package/dist/types/src/theme/components/tooltip.d.ts.map +1 -0
- package/dist/types/src/theme/components/treegrid.d.ts +10 -0
- package/dist/types/src/theme/components/treegrid.d.ts.map +1 -0
- package/dist/types/src/theme/index.d.ts +4 -0
- package/dist/types/src/theme/index.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/column.d.ts +29 -0
- package/dist/types/src/theme/primitives/column.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/index.d.ts +3 -0
- package/dist/types/src/theme/primitives/index.d.ts.map +1 -0
- package/dist/types/src/theme/primitives/panel.d.ts +13 -0
- package/dist/types/src/theme/primitives/panel.d.ts.map +1 -0
- package/dist/types/src/theme/theme.d.ts +5 -0
- package/dist/types/src/theme/theme.d.ts.map +1 -0
- package/dist/types/src/util/elevation.d.ts +9 -0
- package/dist/types/src/util/elevation.d.ts.map +1 -0
- package/dist/types/src/util/hash-styles.d.ts +18 -0
- package/dist/types/src/util/hash-styles.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +6 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/src/util/mx.d.ts +58 -0
- package/dist/types/src/util/mx.d.ts.map +1 -0
- package/dist/types/src/util/size.d.ts +27 -0
- package/dist/types/src/util/size.d.ts.map +1 -0
- package/dist/types/src/util/valence.d.ts +4 -0
- package/dist/types/src/util/valence.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +32 -39
- package/src/Theme.stories.tsx +224 -0
- package/src/css/DESIGN_SYSTEM.md +159 -0
- package/src/css/base/base.css +43 -0
- package/src/{styles/layers → css/base}/typography.css +21 -3
- package/src/{styles/layers → css/components}/button.css +23 -14
- package/src/{styles/layers → css/components}/checkbox.css +12 -8
- package/src/css/components/dialog.css +78 -0
- package/src/{styles/layers/focus-ring.css → css/components/focus.css} +60 -41
- package/src/css/components/icon.css +9 -0
- package/src/css/components/link.css +12 -0
- package/src/css/components/panel.css +117 -0
- package/src/css/components/scrollbar.css +24 -0
- package/src/css/components/selected.css +76 -0
- package/src/css/components/selected.md +101 -0
- package/src/css/components/surface.css +34 -0
- package/src/css/components/tag.css +132 -0
- package/src/css/components/text.css +124 -0
- package/src/css/integrations/codemirror.css +34 -0
- package/src/css/integrations/tldraw.css +14 -0
- package/src/css/layout/main.css +205 -0
- package/src/{styles/layers → css/layout}/native.css +6 -4
- package/src/css/layout/positioning.css +19 -0
- package/src/{styles/layers → css/layout}/size.css +130 -102
- package/src/css/theme/animation.css +260 -0
- package/src/css/theme/border.css +23 -0
- package/src/css/theme/palette.css +36 -0
- package/src/css/theme/semantic.css +112 -0
- package/src/css/theme/spacing.css +147 -0
- package/src/css/theme/styles.css +145 -0
- package/src/css/theme/text.css +37 -0
- package/src/css/utilities.css +118 -0
- package/src/defs.ts +48 -0
- package/src/fragments/AUDIT.md +55 -0
- package/src/fragments/density.ts +16 -0
- package/src/fragments/hover.ts +16 -0
- package/src/fragments/index.ts +10 -0
- package/src/fragments/text.ts +6 -0
- package/src/index.ts +3 -14
- package/src/main.css +121 -0
- package/src/plugins/ThemePlugin.ts +125 -0
- package/src/plugins/dark-mode.ts +22 -0
- package/src/plugins/main.css +45 -0
- package/src/{styles → theme}/components/avatar.ts +12 -13
- package/src/theme/components/button.ts +48 -0
- package/src/theme/components/card.ts +102 -0
- package/src/theme/components/dialog.ts +61 -0
- package/src/theme/components/focus.ts +33 -0
- package/src/{styles → theme}/components/icon-button.ts +6 -5
- package/src/theme/components/icon.ts +28 -0
- package/src/{styles → theme}/components/index.ts +4 -1
- package/src/theme/components/input.ts +171 -0
- package/src/{styles → theme}/components/link.ts +3 -4
- package/src/{styles → theme}/components/list.ts +5 -5
- package/src/{styles → theme}/components/main.ts +9 -11
- package/src/{styles → theme}/components/menu.ts +11 -21
- package/src/{styles → theme}/components/message.ts +11 -7
- package/src/{styles → theme}/components/popover.ts +13 -12
- package/src/theme/components/scroll-area.ts +115 -0
- package/src/{styles → theme}/components/select.ts +8 -16
- package/src/{styles → theme}/components/separator.ts +3 -3
- package/src/theme/components/skeleton.ts +23 -0
- package/src/theme/components/splitter.ts +20 -0
- package/src/{styles → theme}/components/status.ts +7 -7
- package/src/{styles → theme}/components/tag.ts +1 -1
- package/src/{styles → theme}/components/toast.ts +6 -8
- package/src/theme/components/toolbar.ts +35 -0
- package/src/{styles → theme}/components/tooltip.ts +4 -6
- package/src/{styles → theme}/components/treegrid.ts +9 -9
- package/src/{styles → theme}/index.ts +2 -2
- package/src/theme/primitives/column.ts +71 -0
- package/src/theme/primitives/index.ts +6 -0
- package/src/theme/primitives/panel.ts +43 -0
- package/src/{styles → theme}/theme.ts +27 -9
- package/src/typings.d.ts +3 -1
- package/src/{styles/fragments → util}/elevation.ts +6 -8
- package/src/util/hash-styles.ts +118 -98
- package/src/util/index.ts +3 -0
- package/src/util/mx.ts +165 -43
- package/src/util/size.ts +103 -0
- package/src/util/valence.ts +33 -0
- package/src/Tokens.stories.tsx +0 -88
- package/src/config/index.ts +0 -6
- package/src/config/tailwind.ts +0 -250
- package/src/config/tokens/alias-colors.ts +0 -39
- package/src/config/tokens/index.ts +0 -92
- package/src/config/tokens/lengths.ts +0 -97
- package/src/config/tokens/physical-colors.ts +0 -125
- package/src/config/tokens/semantic-colors.ts +0 -27
- package/src/config/tokens/sememes-calls.ts +0 -17
- package/src/config/tokens/sememes-codemirror.ts +0 -50
- package/src/config/tokens/sememes-hue.ts +0 -54
- package/src/config/tokens/sememes-sheet.ts +0 -62
- package/src/config/tokens/sememes-system.ts +0 -302
- package/src/config/tokens/sizes.ts +0 -7
- package/src/config/tokens/types.ts +0 -9
- package/src/docs/theme.drawio.svg +0 -635
- package/src/plugins/esbuild-plugin.ts +0 -65
- package/src/plugins/plugin.ts +0 -130
- package/src/plugins/resolveContent.ts +0 -51
- package/src/styles/components/README.md +0 -6
- package/src/styles/components/anchored-overflow.ts +0 -20
- package/src/styles/components/button.ts +0 -48
- package/src/styles/components/dialog.ts +0 -36
- package/src/styles/components/icon.ts +0 -19
- package/src/styles/components/input.ts +0 -177
- package/src/styles/components/scroll-area.ts +0 -43
- package/src/styles/components/toolbar.ts +0 -29
- package/src/styles/fragments/density.ts +0 -17
- package/src/styles/fragments/dimension.ts +0 -8
- package/src/styles/fragments/focus.ts +0 -16
- package/src/styles/fragments/group.ts +0 -12
- package/src/styles/fragments/hover.ts +0 -25
- package/src/styles/fragments/index.ts +0 -20
- package/src/styles/fragments/layout.ts +0 -7
- package/src/styles/fragments/motion.ts +0 -6
- package/src/styles/fragments/ornament.ts +0 -10
- package/src/styles/fragments/selected.ts +0 -45
- package/src/styles/fragments/shimmer.ts +0 -9
- package/src/styles/fragments/size.ts +0 -117
- package/src/styles/fragments/surface.ts +0 -29
- package/src/styles/fragments/text.ts +0 -12
- package/src/styles/fragments/valence.ts +0 -46
- package/src/styles/layers/README.md +0 -15
- package/src/styles/layers/anchored-overflow.css +0 -9
- package/src/styles/layers/animation.css +0 -17
- package/src/styles/layers/attention.css +0 -8
- package/src/styles/layers/base.css +0 -25
- package/src/styles/layers/can-scroll.css +0 -26
- package/src/styles/layers/dialog.css +0 -42
- package/src/styles/layers/drag-preview.css +0 -18
- package/src/styles/layers/hues.css +0 -110
- package/src/styles/layers/index.css +0 -26
- package/src/styles/layers/main.css +0 -160
- package/src/styles/layers/positioning.css +0 -23
- package/src/styles/layers/surfaces.css +0 -31
- package/src/styles/layers/tag.css +0 -132
- package/src/styles/layers/tldraw.css +0 -91
- package/src/styles/layers/tokens.css +0 -45
- package/src/tailwind.ts +0 -5
- package/src/theme.css +0 -9
- package/src/types.ts +0 -7
- package/src/util/withLogical.ts +0 -114
- /package/src/{styles/fragments → fragments}/disabled.ts +0 -0
- /package/src/{styles → theme}/components/breadcrumb.ts +0 -0
|
@@ -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
|
+
}
|
|
@@ -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.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Surfaces
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer dx-components {
|
|
6
|
+
.dx-base-surface {
|
|
7
|
+
@apply bg-base-surface text-base-foreground;
|
|
8
|
+
--surface-bg: var(--color-base-surface);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.dx-sidebar-surface {
|
|
12
|
+
@apply bg-sidebar-surface text-base-foreground;
|
|
13
|
+
--surface-bg: var(--color-sidebar-surface);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dx-modal-surface {
|
|
17
|
+
@apply bg-modal-surface text-base-foreground backdrop-blur-md;
|
|
18
|
+
--surface-bg: var(--color-modal-surface);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dx-attention-surface {
|
|
22
|
+
@apply bg-attention-surface text-base-foreground;
|
|
23
|
+
--surface-bg: var(--color-attention-surface);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* TODO(burdon): Resolve. */
|
|
28
|
+
/* @layer dx-tokens {
|
|
29
|
+
.dx-sidebar-surface, .dx-modal-surface {
|
|
30
|
+
--color-hover-surface: light-dark(var(--color-neutral-300), var(--color-neutral-700));
|
|
31
|
+
--color-input-surface: light-dark(var(--color-neutral-200), var(--color-neutral-800));
|
|
32
|
+
--color-separator: light-dark(var(--color-neutral-300), var(--color-neutral-700));
|
|
33
|
+
}
|
|
34
|
+
} */
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer dx-components {
|
|
6
|
+
.dx-tag {
|
|
7
|
+
@apply inline-block text-xs font-semibold m-0.5 px-1 rounded-sm cursor-default truncate;
|
|
8
|
+
padding-block: var(--spacing-tag-padding-block);
|
|
9
|
+
user-select: none;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.dx-tag--anchor {
|
|
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-[3px] px-[2px] py-0.5 border rounded-xs transition-colors;
|
|
15
|
+
/** TODO(burdon): Configure secondary color. */
|
|
16
|
+
@apply bg-group-surface text-sky-foreground border-sky-border;
|
|
17
|
+
|
|
18
|
+
&:hover {
|
|
19
|
+
@apply bg-hover-surface;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dx-tag[data-hue='neutral'],
|
|
24
|
+
.dx-tag--neutral {
|
|
25
|
+
@apply bg-neutral-surface text-neutral-foreground;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dx-tag[data-hue='red'],
|
|
29
|
+
.dx-tag--red {
|
|
30
|
+
@apply bg-red-surface text-red-foreground;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dx-tag[data-hue='orange'],
|
|
34
|
+
.dx-tag--orange {
|
|
35
|
+
@apply bg-orange-surface text-orange-foreground;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dx-tag[data-hue='amber'],
|
|
39
|
+
.dx-tag--amber {
|
|
40
|
+
@apply bg-amber-surface text-amber-foreground;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.dx-tag[data-hue='yellow'],
|
|
44
|
+
.dx-tag--yellow {
|
|
45
|
+
@apply bg-yellow-surface text-yellow-foreground;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.dx-tag[data-hue='lime'],
|
|
49
|
+
.dx-tag--lime {
|
|
50
|
+
@apply bg-lime-surface text-lime-foreground;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dx-tag[data-hue='green'],
|
|
54
|
+
.dx-tag--green {
|
|
55
|
+
@apply bg-green-surface text-green-foreground;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dx-tag[data-hue='emerald'],
|
|
59
|
+
.dx-tag--emerald {
|
|
60
|
+
@apply bg-emerald-surface text-emerald-foreground;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.dx-tag[data-hue='teal'],
|
|
64
|
+
.dx-tag--teal {
|
|
65
|
+
@apply bg-teal-surface text-teal-foreground;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dx-tag[data-hue='cyan'],
|
|
69
|
+
.dx-tag--cyan {
|
|
70
|
+
@apply bg-cyan-surface text-cyan-foreground;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.dx-tag[data-hue='sky'],
|
|
74
|
+
.dx-tag--sky {
|
|
75
|
+
@apply bg-sky-surface text-sky-foreground;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dx-tag[data-hue='blue'],
|
|
79
|
+
.dx-tag--blue {
|
|
80
|
+
@apply bg-blue-surface text-blue-foreground;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dx-tag[data-hue='indigo'],
|
|
84
|
+
.dx-tag--indigo {
|
|
85
|
+
@apply bg-indigo-surface text-indigo-foreground;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.dx-tag[data-hue='violet'],
|
|
89
|
+
.dx-tag--violet {
|
|
90
|
+
@apply bg-violet-surface text-violet-foreground;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.dx-tag[data-hue='purple'],
|
|
94
|
+
.dx-tag--purple {
|
|
95
|
+
@apply bg-purple-surface text-purple-foreground;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.dx-tag[data-hue='fuchsia'],
|
|
99
|
+
.dx-tag--fuchsia {
|
|
100
|
+
@apply bg-fuchsia-surface text-fuchsia-foreground;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.dx-tag[data-hue='pink'],
|
|
104
|
+
.dx-tag--pink {
|
|
105
|
+
@apply bg-pink-surface text-pink-foreground;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.dx-tag[data-hue='rose'],
|
|
109
|
+
.dx-tag--rose {
|
|
110
|
+
@apply bg-rose-surface text-rose-foreground;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.dx-tag[data-hue='info'],
|
|
114
|
+
.dx-tag--info {
|
|
115
|
+
@apply bg-cyan-surface text-cyan-foreground;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.dx-tag[data-hue='success'],
|
|
119
|
+
.dx-tag--success {
|
|
120
|
+
@apply bg-emerald-surface text-emerald-foreground;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.dx-tag[data-hue='warning'],
|
|
124
|
+
.dx-tag--warning {
|
|
125
|
+
@apply bg-amber-surface text-amber-foreground;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.dx-tag[data-hue='error'],
|
|
129
|
+
.dx-tag--error {
|
|
130
|
+
@apply bg-rose-surface text-rose-foreground;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text
|
|
3
|
+
* Example: <span className='dx-text' data-hue={getHashHue(object.id)}>
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@layer dx-components {
|
|
7
|
+
/*
|
|
8
|
+
* System
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.dx-text[data-hue='info'],
|
|
12
|
+
.dx-text--info {
|
|
13
|
+
@apply text-cyan-text;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.dx-text[data-hue='success'],
|
|
17
|
+
.dx-text--success {
|
|
18
|
+
@apply text-emerald-text;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.dx-text[data-hue='warning'],
|
|
22
|
+
.dx-text--warning {
|
|
23
|
+
@apply text-amber-text;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.dx-text[data-hue='error'],
|
|
27
|
+
.dx-text--error {
|
|
28
|
+
@apply text-rose-text;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Colors
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
.dx-text[data-hue='neutral'],
|
|
36
|
+
.dx-text--neutral {
|
|
37
|
+
@apply text-neutral-text;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dx-text[data-hue='red'],
|
|
41
|
+
.dx-text--red {
|
|
42
|
+
@apply text-red-text;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dx-text[data-hue='orange'],
|
|
46
|
+
.dx-text--orange {
|
|
47
|
+
@apply text-orange-text;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.dx-text[data-hue='amber'],
|
|
51
|
+
.dx-text--amber {
|
|
52
|
+
@apply text-amber-text;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.dx-text[data-hue='yellow'],
|
|
56
|
+
.dx-text--yellow {
|
|
57
|
+
@apply text-yellow-text;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.dx-text[data-hue='lime'],
|
|
61
|
+
.dx-text--lime {
|
|
62
|
+
@apply text-lime-text;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.dx-text[data-hue='green'],
|
|
66
|
+
.dx-text--green {
|
|
67
|
+
@apply text-green-text;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.dx-text[data-hue='emerald'],
|
|
71
|
+
.dx-text--emerald {
|
|
72
|
+
@apply text-emerald-text;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dx-text[data-hue='teal'],
|
|
76
|
+
.dx-text--teal {
|
|
77
|
+
@apply text-teal-text;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.dx-text[data-hue='cyan'],
|
|
81
|
+
.dx-text--cyan {
|
|
82
|
+
@apply text-cyan-text;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.dx-text[data-hue='sky'],
|
|
86
|
+
.dx-text--sky {
|
|
87
|
+
@apply text-sky-text;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.dx-text[data-hue='blue'],
|
|
91
|
+
.dx-text--blue {
|
|
92
|
+
@apply text-blue-text;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dx-text[data-hue='indigo'],
|
|
96
|
+
.dx-text--indigo {
|
|
97
|
+
@apply text-indigo-text;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.dx-text[data-hue='violet'],
|
|
101
|
+
.dx-text--violet {
|
|
102
|
+
@apply text-violet-text;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.dx-text[data-hue='purple'],
|
|
106
|
+
.dx-text--purple {
|
|
107
|
+
@apply text-purple-text;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.dx-text[data-hue='fuchsia'],
|
|
111
|
+
.dx-text--fuchsia {
|
|
112
|
+
@apply text-fuchsia-text;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dx-text[data-hue='pink'],
|
|
116
|
+
.dx-text--pink {
|
|
117
|
+
@apply text-pink-text;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.dx-text[data-hue='rose'],
|
|
121
|
+
.dx-text--rose {
|
|
122
|
+
@apply text-rose-text;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CodeMirror
|
|
3
|
+
* Uses @theme (not @layer) so Tailwind generates text-cm-* / bg-cm-* utility classes
|
|
4
|
+
* consumed by ui-editor. Compare: tldraw.css uses @layer to map tokens onto tldraw's
|
|
5
|
+
* own variables without generating utilities.
|
|
6
|
+
* TODO(burdon): This could move into the ui-editor package (similar to graph.css).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/** TODO(burdon): Move to ui-editor */
|
|
10
|
+
@theme {
|
|
11
|
+
--color-cm-codeblock: oklch(from var(--color-neutral-500) l c h / 0.1);
|
|
12
|
+
--color-cm-active-line: light-dark(
|
|
13
|
+
oklch(from var(--color-neutral-200) l c h / 0.5),
|
|
14
|
+
oklch(from var(--color-neutral-800) l c h / 0.5)
|
|
15
|
+
);
|
|
16
|
+
--color-cm-separator: var(--color-blue-500);
|
|
17
|
+
--color-cm-cursor: light-dark(var(--color-neutral-900), var(--color-neutral-100));
|
|
18
|
+
--color-cm-selection: light-dark(
|
|
19
|
+
oklch(from var(--color-blue-400) l c h / 0.5),
|
|
20
|
+
oklch(from var(--color-blue-600) l c h / 0.5)
|
|
21
|
+
);
|
|
22
|
+
--color-cm-focused-selection: light-dark(var(--color-blue-400), var(--color-blue-600));
|
|
23
|
+
--color-cm-highlight: light-dark(var(--color-neutral-950), var(--color-neutral-50));
|
|
24
|
+
--color-cm-highlight-surface: light-dark(var(--color-sky-200), var(--color-cyan-800));
|
|
25
|
+
--color-cm-comment-text: light-dark(var(--color-neutral-50), var(--color-neutral-950));
|
|
26
|
+
--color-cm-comment-surface: light-dark(var(--color-amber-800), var(--color-amber-200));
|
|
27
|
+
|
|
28
|
+
/* Markdown syntax highlighting */
|
|
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));
|
|
31
|
+
--color-cm-code-mark: var(--color-blue-500);
|
|
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));
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tldraw
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** TODO(burdon): Move to tldraw */
|
|
6
|
+
.tl-background {
|
|
7
|
+
--color-background: var(--color-base-surface);
|
|
8
|
+
}
|
|
9
|
+
.tl-container.tl-theme__light,
|
|
10
|
+
.tl-container.tl-theme__dark {
|
|
11
|
+
--color-selected: var(--color-accent-surface);
|
|
12
|
+
--color-panel: var(--color-modal-surface);
|
|
13
|
+
--color-panel-contrast: var(--color-separator);
|
|
14
|
+
}
|