@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
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Typography
|
|
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
|
|
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
|
|
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-
|
|
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-
|
|
29
|
+
@apply bg-hover-surface text-inherit;
|
|
23
30
|
}
|
|
24
31
|
&[data-state='open'] {
|
|
25
|
-
@apply bg-
|
|
32
|
+
@apply bg-input-surface;
|
|
26
33
|
}
|
|
27
34
|
&[aria-pressed='true'],
|
|
28
35
|
&[aria-checked='true'] {
|
|
29
|
-
@apply bg-
|
|
36
|
+
@apply bg-base-surface text-accent-text;
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
39
|
&[data-variant='outline'] {
|
|
33
|
-
@apply border border-
|
|
40
|
+
@apply border border-base-surface bg-transparent;
|
|
34
41
|
&:hover {
|
|
35
|
-
@apply bg-
|
|
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-
|
|
51
|
+
@apply bg-hover-surface;
|
|
44
52
|
}
|
|
53
|
+
|
|
45
54
|
/* Variants */
|
|
46
55
|
&[data-variant='primary'] {
|
|
47
|
-
@apply text-
|
|
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-
|
|
60
|
+
@apply bg-accent-surface-hover;
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
&[data-variant='destructive'] {
|
|
55
|
-
@apply text-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
9
|
+
@apply border border-un-accent;
|
|
6
10
|
&[aria-checked='true'],
|
|
7
11
|
&[aria-checked='mixed'],
|
|
8
12
|
&:checked {
|
|
9
|
-
@apply bg-
|
|
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-
|
|
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-
|
|
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
|
|
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
|
|
33
|
-
@apply shadow-inner transition-colors bg-
|
|
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
|
|
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
|
-
|
|
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-
|
|
11
|
+
@apply outline-hidden;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
&:focus-visible {
|
|
11
|
-
@apply ring-
|
|
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-
|
|
18
|
+
@apply ring-[var(--color-focus-ring)];
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
&:hover {
|
|
18
|
-
@apply outline-
|
|
22
|
+
@apply outline-hidden;
|
|
19
23
|
|
|
20
24
|
.dark & {
|
|
21
|
-
@apply outline-
|
|
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-
|
|
44
|
+
@apply outline-hidden;
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
&:focus {
|
|
37
|
-
@apply ring-
|
|
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-
|
|
51
|
+
@apply ring-[var(--color-focus-ring)];
|
|
41
52
|
}
|
|
42
53
|
|
|
43
54
|
&:hover {
|
|
44
|
-
@apply outline-
|
|
55
|
+
@apply outline-hidden;
|
|
45
56
|
|
|
46
57
|
.dark & {
|
|
47
|
-
@apply outline-
|
|
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-
|
|
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-
|
|
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-
|
|
85
|
+
@apply ring-[var(--color-focus-ring)];
|
|
75
86
|
}
|
|
76
87
|
|
|
77
88
|
&:hover {
|
|
78
|
-
@apply outline-
|
|
89
|
+
@apply outline-hidden;
|
|
79
90
|
|
|
80
91
|
.dark & {
|
|
81
|
-
@apply outline-
|
|
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-
|
|
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-
|
|
103
|
+
@apply ring-[var(--color-focus-ring)];
|
|
93
104
|
}
|
|
94
105
|
|
|
95
106
|
&:hover {
|
|
96
|
-
@apply outline-
|
|
107
|
+
@apply outline-hidden;
|
|
97
108
|
|
|
98
109
|
.dark & {
|
|
99
|
-
@apply outline-
|
|
110
|
+
@apply outline-hidden;
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
113
|
}
|
|
@@ -129,23 +140,23 @@
|
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
&:focus {
|
|
132
|
-
@apply outline-
|
|
143
|
+
@apply outline-hidden;
|
|
133
144
|
}
|
|
134
145
|
|
|
135
146
|
&:focus-visible {
|
|
136
147
|
&::after {
|
|
137
|
-
@apply ring-
|
|
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-
|
|
152
|
+
@apply ring-[var(--color-focus-ring)];
|
|
142
153
|
}
|
|
143
154
|
|
|
144
155
|
&:hover {
|
|
145
|
-
@apply outline-
|
|
156
|
+
@apply outline-hidden;
|
|
146
157
|
|
|
147
158
|
.dark & {
|
|
148
|
-
@apply outline-
|
|
159
|
+
@apply outline-hidden;
|
|
149
160
|
}
|
|
150
161
|
}
|
|
151
162
|
}
|
|
@@ -162,30 +173,30 @@
|
|
|
162
173
|
}
|
|
163
174
|
|
|
164
175
|
&:focus {
|
|
165
|
-
@apply outline-
|
|
176
|
+
@apply outline-hidden;
|
|
166
177
|
}
|
|
167
178
|
|
|
168
179
|
&:focus {
|
|
169
180
|
&::after {
|
|
170
|
-
@apply ring-
|
|
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-
|
|
185
|
+
@apply ring-[var(--color-focus-ring)];
|
|
175
186
|
}
|
|
176
187
|
|
|
177
188
|
&:hover {
|
|
178
|
-
@apply outline-
|
|
179
|
-
|
|
189
|
+
@apply outline-hidden;
|
|
180
190
|
.dark & {
|
|
181
|
-
@apply outline-
|
|
191
|
+
@apply outline-hidden;
|
|
182
192
|
}
|
|
183
193
|
}
|
|
184
194
|
}
|
|
185
195
|
}
|
|
186
196
|
}
|
|
187
197
|
|
|
188
|
-
.dx-focus-ring-inset-over-all,
|
|
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
|
|
206
|
-
&[data-sidebar-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
}
|