opui-css 2.4.0 → 3.1.0
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 +21 -21
- package/README.md +20 -7
- package/dist/op.css +1 -14
- package/dist/{op+ui.css → theme-one.css} +4370 -4155
- package/dist/{ui.css → theme-two.css} +4089 -4100
- package/package.json +6 -4
- package/src/core/normalize.css +196 -196
- package/src/core/utils.css +60 -60
- package/src/open-props.css +1 -1
- package/src/{components → themes/theme-one/components}/accordion.css +172 -172
- package/src/{components → themes/theme-one/components}/alert.css +85 -85
- package/src/{components → themes/theme-one/components}/avatar.css +68 -68
- package/src/{components → themes/theme-one/components}/badge.css +101 -101
- package/src/{components → themes/theme-one/components}/button-group.css +69 -69
- package/src/{components → themes/theme-one/components}/button.css +267 -267
- package/src/{components → themes/theme-one/components}/card.css +82 -82
- package/src/{components → themes/theme-one/components}/checkbox-radio.css +123 -123
- package/src/{components → themes/theme-one/components}/chip.css +135 -135
- package/src/{components → themes/theme-one/components}/definition-list.css +65 -65
- package/src/{components → themes/theme-one/components}/dialog.css +59 -59
- package/src/{components → themes/theme-one/components}/divider.css +7 -7
- package/src/{components → themes/theme-one/components}/field-group.css +83 -83
- package/src/{components → themes/theme-one/components}/field.css +494 -494
- package/src/{components → themes/theme-one/components}/icon-button.css +40 -40
- package/src/{components → themes/theme-one/components}/link.css +21 -21
- package/src/{components → themes/theme-one/components}/list.css +317 -317
- package/src/{components → themes/theme-one/components}/progress.css +83 -83
- package/src/{components → themes/theme-one/components}/range.css +121 -121
- package/src/{components → themes/theme-one/components}/rich-text.css +210 -210
- package/src/{components → themes/theme-one/components}/select.css +163 -163
- package/src/{components → themes/theme-one/components}/snackbar.css +148 -148
- package/src/{components → themes/theme-one/components}/spinner.css +38 -38
- package/src/{components → themes/theme-one/components}/switch.css +189 -189
- package/src/{components → themes/theme-one/components}/tab-buttons.css +120 -120
- package/src/themes/theme-one/components/table.css +92 -0
- package/src/{components → themes/theme-one/components}/text-field.css +57 -57
- package/src/{components → themes/theme-one/components}/textarea.css +25 -25
- package/src/{components → themes/theme-one/components}/toggle-button-group.css +135 -139
- package/src/{components → themes/theme-one/components}/tooltip.css +94 -94
- package/src/{components → themes/theme-one/components}/typography.css +209 -209
- package/src/themes/theme-one/components.css +37 -0
- package/src/themes/theme-one/imports.css +16 -0
- package/src/{theme.css → themes/theme-one/theme.css} +163 -163
- package/src/themes/theme-two/components/accordion.css +172 -0
- package/src/themes/theme-two/components/alert.css +85 -0
- package/src/themes/theme-two/components/avatar.css +68 -0
- package/src/themes/theme-two/components/badge.css +101 -0
- package/src/themes/theme-two/components/button-group.css +50 -0
- package/src/themes/theme-two/components/button.css +217 -0
- package/src/themes/theme-two/components/card.css +82 -0
- package/src/themes/theme-two/components/checkbox-radio.css +123 -0
- package/src/themes/theme-two/components/chip.css +135 -0
- package/src/themes/theme-two/components/definition-list.css +65 -0
- package/src/themes/theme-two/components/dialog.css +59 -0
- package/src/themes/theme-two/components/divider.css +7 -0
- package/src/themes/theme-two/components/field-group.css +83 -0
- package/src/themes/theme-two/components/field.css +281 -0
- package/src/themes/theme-two/components/icon-button.css +40 -0
- package/src/themes/theme-two/components/link.css +21 -0
- package/src/themes/theme-two/components/list.css +317 -0
- package/src/themes/theme-two/components/progress.css +83 -0
- package/src/themes/theme-two/components/range.css +121 -0
- package/src/themes/theme-two/components/rich-text.css +210 -0
- package/src/themes/theme-two/components/select.css +162 -0
- package/src/themes/theme-two/components/snackbar.css +148 -0
- package/src/themes/theme-two/components/spinner.css +38 -0
- package/src/themes/theme-two/components/switch.css +189 -0
- package/src/themes/theme-two/components/tab-buttons.css +120 -0
- package/src/{components → themes/theme-two/components}/table.css +99 -107
- package/src/themes/theme-two/components/text-field.css +57 -0
- package/src/themes/theme-two/components/textarea.css +25 -0
- package/src/themes/theme-two/components/toggle-button-group.css +135 -0
- package/src/themes/theme-two/components/tooltip.css +94 -0
- package/src/themes/theme-two/components/typography.css +209 -0
- package/src/themes/theme-two/components.css +37 -0
- package/src/themes/theme-two/imports.css +16 -0
- package/src/themes/theme-two/theme.css +158 -0
- package/src/core/components.css +0 -37
- package/src/main.css +0 -13
- package/src/opui.css +0 -10
|
@@ -1,267 +1,267 @@
|
|
|
1
|
-
@layer components.root {
|
|
2
|
-
:where(.button) {
|
|
3
|
-
--_bg-color: transparent;
|
|
4
|
-
--_border-color: transparent;
|
|
5
|
-
--_border-radius: var(--button-border-radius);
|
|
6
|
-
--_font-size: initial;
|
|
7
|
-
--_min-height: 2.375rem;
|
|
8
|
-
--_text-color: var(--primary);
|
|
9
|
-
|
|
10
|
-
-webkit-tap-highlight-color: transparent;
|
|
11
|
-
-webkit-touch-callout: none;
|
|
12
|
-
align-items: center;
|
|
13
|
-
background: var(--_bg-color) var(--ripple, none);
|
|
14
|
-
border-radius: var(--_border-radius);
|
|
15
|
-
border: var(--border-size-1) solid var(--_border-color);
|
|
16
|
-
color: var(--_text-color);
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
font-size: var(--_font-size);
|
|
19
|
-
font-weight: 700;
|
|
20
|
-
gap: var(--size-2);
|
|
21
|
-
justify-content: center;
|
|
22
|
-
min-block-size: var(--_min-height);
|
|
23
|
-
padding-block: 0.5ex;
|
|
24
|
-
padding-inline: 1.5ex;
|
|
25
|
-
text-align: center;
|
|
26
|
-
text-decoration: none;
|
|
27
|
-
|
|
28
|
-
user-select: none;
|
|
29
|
-
|
|
30
|
-
&:where([disabled]) {
|
|
31
|
-
cursor: not-allowed;
|
|
32
|
-
opacity: 0.64;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
-
transition: background-color 0.2s var(--ease-out-3),
|
|
37
|
-
box-shadow 0.2s var(--ease-out-3), border-color 0.2s var(--ease-out-3),
|
|
38
|
-
color 0.2s var(--ease-out-3), outline-offset 0.05s var(--ease-1);
|
|
39
|
-
|
|
40
|
-
/* Ripple effect */
|
|
41
|
-
background-position: center;
|
|
42
|
-
|
|
43
|
-
&:where(:not([disabled])) {
|
|
44
|
-
&:where(:not(:active):hover) {
|
|
45
|
-
--ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
|
|
46
|
-
center/15000%;
|
|
47
|
-
|
|
48
|
-
transition: background var(--button-ripple-duration);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:where(:hover:active) {
|
|
52
|
-
background-size: var(--button-ripple-size);
|
|
53
|
-
transition: background 0s;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Element states */
|
|
59
|
-
&:where(:not([disabled])) {
|
|
60
|
-
&:where(:not(:active):hover) {
|
|
61
|
-
--_bg-color: light-dark(
|
|
62
|
-
oklch(from var(--primary) l 0.01 h / 20%),
|
|
63
|
-
oklch(from var(--primary) l 0.01 h / 40%)
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:where(:hover:active) {
|
|
68
|
-
--_bg-color: light-dark(
|
|
69
|
-
oklch(from var(--primary) l 0.06 h / 30%),
|
|
70
|
-
oklch(from var(--primary) l 0.06 h / 40%)
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/* Disabled */
|
|
76
|
-
&:where([disabled]) {
|
|
77
|
-
--_text-color: color-mix(
|
|
78
|
-
in oklch,
|
|
79
|
-
var(--text-color-2) 50%,
|
|
80
|
-
var(--surface-default)
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/* Icon */
|
|
85
|
-
&:where(:has(svg), &.icon-only) {
|
|
86
|
-
gap: 1ex;
|
|
87
|
-
|
|
88
|
-
svg {
|
|
89
|
-
max-block-size: 0.7lh;
|
|
90
|
-
color: currentColor;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
/* Sizes */
|
|
95
|
-
&.small {
|
|
96
|
-
--_min-height: 1.875rem;
|
|
97
|
-
padding-block: 0;
|
|
98
|
-
padding-inline: 1ex;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&.large {
|
|
102
|
-
--_min-height: 2.875rem;
|
|
103
|
-
padding-inline: 4ex;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* Variants */
|
|
107
|
-
&.outlined {
|
|
108
|
-
--_bg-color: var(--surface-default);
|
|
109
|
-
--_border-color: var(--color-8);
|
|
110
|
-
--_text-color: var(--color-8);
|
|
111
|
-
|
|
112
|
-
&:where(:not([disabled])) {
|
|
113
|
-
&:where(:not(:active):hover) {
|
|
114
|
-
--_bg-color: var(--color-10);
|
|
115
|
-
--_border-color: var(--color-10);
|
|
116
|
-
--_text-color: var(--color-1);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&:where(:active) {
|
|
120
|
-
--_bg-color: var(--color-9);
|
|
121
|
-
--_border-color: var(--color-9);
|
|
122
|
-
--_text-color: var(--color-1);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
&:where([disabled]) {
|
|
127
|
-
--_bg-color: var(--surface-default);
|
|
128
|
-
--_border-color: color-mix(
|
|
129
|
-
in oklch,
|
|
130
|
-
var(--text-color-2) 20%,
|
|
131
|
-
var(--surface-default)
|
|
132
|
-
);
|
|
133
|
-
--_text-color: color-mix(
|
|
134
|
-
in oklch,
|
|
135
|
-
var(--text-color-2) 40%,
|
|
136
|
-
var(--surface-default)
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
&.tonal {
|
|
141
|
-
--_bg-color: var(--color-6);
|
|
142
|
-
--_text-color: var(--color-16);
|
|
143
|
-
|
|
144
|
-
&:where(:not([disabled])) {
|
|
145
|
-
&:where(:not(:active):hover) {
|
|
146
|
-
--_bg-color: var(--color-9);
|
|
147
|
-
--_border-color: var(--color-9);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
&:where(:active) {
|
|
151
|
-
--_bg-color: var(--color-7);
|
|
152
|
-
--_border-color: var(--color-7);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
&:where([disabled]) {
|
|
157
|
-
--_bg-color: color-mix(
|
|
158
|
-
in oklch,
|
|
159
|
-
var(--text-color-2) 8%,
|
|
160
|
-
var(--surface-default)
|
|
161
|
-
);
|
|
162
|
-
--_text-color: color-mix(
|
|
163
|
-
in oklch,
|
|
164
|
-
var(--text-color-2) 70%,
|
|
165
|
-
var(--surface-default)
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
&.filled {
|
|
170
|
-
--_bg-color: var(--color-8);
|
|
171
|
-
--_text-color: var(--color-1);
|
|
172
|
-
|
|
173
|
-
&:where(:not([disabled])) {
|
|
174
|
-
&:where(:not(:active):hover) {
|
|
175
|
-
--_bg-color: var(--color-10);
|
|
176
|
-
--_border-color: var(--color-10);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&:where(:active) {
|
|
180
|
-
--_bg-color: var(--color-9);
|
|
181
|
-
--_border-color: var(--color-9);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&:where([disabled]) {
|
|
186
|
-
--_bg-color: color-mix(
|
|
187
|
-
in oklch,
|
|
188
|
-
var(--text-color-2) 20%,
|
|
189
|
-
var(--surface-default)
|
|
190
|
-
);
|
|
191
|
-
--_text-color: color-mix(
|
|
192
|
-
in oklch,
|
|
193
|
-
var(--text-color-2) 70%,
|
|
194
|
-
var(--surface-default)
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
&.elevated {
|
|
199
|
-
--_bg-color: light-dark(
|
|
200
|
-
color-mix(in oklch, var(--gray-2) 97%, var(--color-16)),
|
|
201
|
-
color-mix(in oklch, var(--gray-13) 97%, var(--color-1))
|
|
202
|
-
);
|
|
203
|
-
--_ripple-color: light-dark(
|
|
204
|
-
color-mix(in oklch, var(--gray-2) 80%, var(--color-8)),
|
|
205
|
-
color-mix(in oklch, var(--gray-13) 80%, var(--color-8))
|
|
206
|
-
);
|
|
207
|
-
--_text-color: var(--color-8);
|
|
208
|
-
|
|
209
|
-
box-shadow: 0px 3px 1px -2px oklch(0 0 0 / 20%),
|
|
210
|
-
0px 2px 2px 0px oklch(0 0 0 / 14%), 0px 1px 5px 0px oklch(0 0 0 / 12%);
|
|
211
|
-
|
|
212
|
-
&:where(:not([disabled])) {
|
|
213
|
-
&:where(:not(:active):hover) {
|
|
214
|
-
--ripple: radial-gradient(
|
|
215
|
-
circle,
|
|
216
|
-
transparent 1%,
|
|
217
|
-
var(--_ripple-color) 1%
|
|
218
|
-
)
|
|
219
|
-
center/15000%;
|
|
220
|
-
|
|
221
|
-
--_bg-color: light-dark(
|
|
222
|
-
color-mix(in oklch, var(--gray-2) 93%, var(--color-8)),
|
|
223
|
-
color-mix(in oklch, var(--gray-13) 93%, var(--color-8))
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&:where(:hover:active) {
|
|
228
|
-
--_bg-color: light-dark(
|
|
229
|
-
color-mix(in oklch, var(--gray-2) 91%, var(--color-8)),
|
|
230
|
-
color-mix(in oklch, var(--gray-13) 91%, var(--color-8))
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&:where([disabled]) {
|
|
236
|
-
--_bg-color: color-mix(
|
|
237
|
-
in oklch,
|
|
238
|
-
var(--text-color-2) 8%,
|
|
239
|
-
var(--surface-elevated)
|
|
240
|
-
);
|
|
241
|
-
--_text-color: color-mix(
|
|
242
|
-
in oklch,
|
|
243
|
-
var(--text-color-2) 70%,
|
|
244
|
-
var(--surface-elevated)
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/* file input */
|
|
251
|
-
:where(input[type="file"]) {
|
|
252
|
-
align-self: flex-start;
|
|
253
|
-
border-radius: var(--radius-2);
|
|
254
|
-
border: var(--border-size-1) solid var(--surface-filled);
|
|
255
|
-
box-shadow: var(--inner-shadow-4);
|
|
256
|
-
color: var(--text-color-2-contrast);
|
|
257
|
-
cursor: initial;
|
|
258
|
-
max-inline-size: 100%;
|
|
259
|
-
padding: 0;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
:where(input[type="file"])::-webkit-file-upload-button,
|
|
263
|
-
:where(input[type="file"])::file-selector-button {
|
|
264
|
-
cursor: pointer;
|
|
265
|
-
margin-inline-end: var(--size-relative-6);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
1
|
+
@layer components.root {
|
|
2
|
+
:where(.button) {
|
|
3
|
+
--_bg-color: transparent;
|
|
4
|
+
--_border-color: transparent;
|
|
5
|
+
--_border-radius: var(--button-border-radius);
|
|
6
|
+
--_font-size: initial;
|
|
7
|
+
--_min-height: 2.375rem;
|
|
8
|
+
--_text-color: var(--primary);
|
|
9
|
+
|
|
10
|
+
-webkit-tap-highlight-color: transparent;
|
|
11
|
+
-webkit-touch-callout: none;
|
|
12
|
+
align-items: center;
|
|
13
|
+
background: var(--_bg-color) var(--ripple, none);
|
|
14
|
+
border-radius: var(--_border-radius);
|
|
15
|
+
border: var(--border-size-1) solid var(--_border-color);
|
|
16
|
+
color: var(--_text-color);
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
font-size: var(--_font-size);
|
|
19
|
+
font-weight: 700;
|
|
20
|
+
gap: var(--size-2);
|
|
21
|
+
justify-content: center;
|
|
22
|
+
min-block-size: var(--_min-height);
|
|
23
|
+
padding-block: 0.5ex;
|
|
24
|
+
padding-inline: 1.5ex;
|
|
25
|
+
text-align: center;
|
|
26
|
+
text-decoration: none;
|
|
27
|
+
|
|
28
|
+
user-select: none;
|
|
29
|
+
|
|
30
|
+
&:where([disabled]) {
|
|
31
|
+
cursor: not-allowed;
|
|
32
|
+
opacity: 0.64;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
36
|
+
transition: background-color 0.2s var(--ease-out-3),
|
|
37
|
+
box-shadow 0.2s var(--ease-out-3), border-color 0.2s var(--ease-out-3),
|
|
38
|
+
color 0.2s var(--ease-out-3), outline-offset 0.05s var(--ease-1);
|
|
39
|
+
|
|
40
|
+
/* Ripple effect */
|
|
41
|
+
background-position: center;
|
|
42
|
+
|
|
43
|
+
&:where(:not([disabled])) {
|
|
44
|
+
&:where(:not(:active):hover) {
|
|
45
|
+
--ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
|
|
46
|
+
center/15000%;
|
|
47
|
+
|
|
48
|
+
transition: background var(--button-ripple-duration);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:where(:hover:active) {
|
|
52
|
+
background-size: var(--button-ripple-size);
|
|
53
|
+
transition: background 0s;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Element states */
|
|
59
|
+
&:where(:not([disabled])) {
|
|
60
|
+
&:where(:not(:active):hover) {
|
|
61
|
+
--_bg-color: light-dark(
|
|
62
|
+
oklch(from var(--primary) l 0.01 h / 20%),
|
|
63
|
+
oklch(from var(--primary) l 0.01 h / 40%)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:where(:hover:active) {
|
|
68
|
+
--_bg-color: light-dark(
|
|
69
|
+
oklch(from var(--primary) l 0.06 h / 30%),
|
|
70
|
+
oklch(from var(--primary) l 0.06 h / 40%)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Disabled */
|
|
76
|
+
&:where([disabled]) {
|
|
77
|
+
--_text-color: color-mix(
|
|
78
|
+
in oklch,
|
|
79
|
+
var(--text-color-2) 50%,
|
|
80
|
+
var(--surface-default)
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Icon */
|
|
85
|
+
&:where(:has(svg), &.icon-only) {
|
|
86
|
+
gap: 1ex;
|
|
87
|
+
|
|
88
|
+
svg {
|
|
89
|
+
max-block-size: 0.7lh;
|
|
90
|
+
color: currentColor;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Sizes */
|
|
95
|
+
&.small {
|
|
96
|
+
--_min-height: 1.875rem;
|
|
97
|
+
padding-block: 0;
|
|
98
|
+
padding-inline: 1ex;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&.large {
|
|
102
|
+
--_min-height: 2.875rem;
|
|
103
|
+
padding-inline: 4ex;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Variants */
|
|
107
|
+
&.outlined {
|
|
108
|
+
--_bg-color: var(--surface-default);
|
|
109
|
+
--_border-color: var(--color-8);
|
|
110
|
+
--_text-color: var(--color-8);
|
|
111
|
+
|
|
112
|
+
&:where(:not([disabled])) {
|
|
113
|
+
&:where(:not(:active):hover) {
|
|
114
|
+
--_bg-color: var(--color-10);
|
|
115
|
+
--_border-color: var(--color-10);
|
|
116
|
+
--_text-color: var(--color-1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:where(:active) {
|
|
120
|
+
--_bg-color: var(--color-9);
|
|
121
|
+
--_border-color: var(--color-9);
|
|
122
|
+
--_text-color: var(--color-1);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&:where([disabled]) {
|
|
127
|
+
--_bg-color: var(--surface-default);
|
|
128
|
+
--_border-color: color-mix(
|
|
129
|
+
in oklch,
|
|
130
|
+
var(--text-color-2) 20%,
|
|
131
|
+
var(--surface-default)
|
|
132
|
+
);
|
|
133
|
+
--_text-color: color-mix(
|
|
134
|
+
in oklch,
|
|
135
|
+
var(--text-color-2) 40%,
|
|
136
|
+
var(--surface-default)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
&.tonal {
|
|
141
|
+
--_bg-color: var(--color-6);
|
|
142
|
+
--_text-color: var(--color-16);
|
|
143
|
+
|
|
144
|
+
&:where(:not([disabled])) {
|
|
145
|
+
&:where(:not(:active):hover) {
|
|
146
|
+
--_bg-color: var(--color-9);
|
|
147
|
+
--_border-color: var(--color-9);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:where(:active) {
|
|
151
|
+
--_bg-color: var(--color-7);
|
|
152
|
+
--_border-color: var(--color-7);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:where([disabled]) {
|
|
157
|
+
--_bg-color: color-mix(
|
|
158
|
+
in oklch,
|
|
159
|
+
var(--text-color-2) 8%,
|
|
160
|
+
var(--surface-default)
|
|
161
|
+
);
|
|
162
|
+
--_text-color: color-mix(
|
|
163
|
+
in oklch,
|
|
164
|
+
var(--text-color-2) 70%,
|
|
165
|
+
var(--surface-default)
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
&.filled {
|
|
170
|
+
--_bg-color: var(--color-8);
|
|
171
|
+
--_text-color: var(--color-1);
|
|
172
|
+
|
|
173
|
+
&:where(:not([disabled])) {
|
|
174
|
+
&:where(:not(:active):hover) {
|
|
175
|
+
--_bg-color: var(--color-10);
|
|
176
|
+
--_border-color: var(--color-10);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:where(:active) {
|
|
180
|
+
--_bg-color: var(--color-9);
|
|
181
|
+
--_border-color: var(--color-9);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:where([disabled]) {
|
|
186
|
+
--_bg-color: color-mix(
|
|
187
|
+
in oklch,
|
|
188
|
+
var(--text-color-2) 20%,
|
|
189
|
+
var(--surface-default)
|
|
190
|
+
);
|
|
191
|
+
--_text-color: color-mix(
|
|
192
|
+
in oklch,
|
|
193
|
+
var(--text-color-2) 70%,
|
|
194
|
+
var(--surface-default)
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
&.elevated {
|
|
199
|
+
--_bg-color: light-dark(
|
|
200
|
+
color-mix(in oklch, var(--gray-2) 97%, var(--color-16)),
|
|
201
|
+
color-mix(in oklch, var(--gray-13) 97%, var(--color-1))
|
|
202
|
+
);
|
|
203
|
+
--_ripple-color: light-dark(
|
|
204
|
+
color-mix(in oklch, var(--gray-2) 80%, var(--color-8)),
|
|
205
|
+
color-mix(in oklch, var(--gray-13) 80%, var(--color-8))
|
|
206
|
+
);
|
|
207
|
+
--_text-color: var(--color-8);
|
|
208
|
+
|
|
209
|
+
box-shadow: 0px 3px 1px -2px oklch(0 0 0 / 20%),
|
|
210
|
+
0px 2px 2px 0px oklch(0 0 0 / 14%), 0px 1px 5px 0px oklch(0 0 0 / 12%);
|
|
211
|
+
|
|
212
|
+
&:where(:not([disabled])) {
|
|
213
|
+
&:where(:not(:active):hover) {
|
|
214
|
+
--ripple: radial-gradient(
|
|
215
|
+
circle,
|
|
216
|
+
transparent 1%,
|
|
217
|
+
var(--_ripple-color) 1%
|
|
218
|
+
)
|
|
219
|
+
center/15000%;
|
|
220
|
+
|
|
221
|
+
--_bg-color: light-dark(
|
|
222
|
+
color-mix(in oklch, var(--gray-2) 93%, var(--color-8)),
|
|
223
|
+
color-mix(in oklch, var(--gray-13) 93%, var(--color-8))
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&:where(:hover:active) {
|
|
228
|
+
--_bg-color: light-dark(
|
|
229
|
+
color-mix(in oklch, var(--gray-2) 91%, var(--color-8)),
|
|
230
|
+
color-mix(in oklch, var(--gray-13) 91%, var(--color-8))
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:where([disabled]) {
|
|
236
|
+
--_bg-color: color-mix(
|
|
237
|
+
in oklch,
|
|
238
|
+
var(--text-color-2) 8%,
|
|
239
|
+
var(--surface-elevated)
|
|
240
|
+
);
|
|
241
|
+
--_text-color: color-mix(
|
|
242
|
+
in oklch,
|
|
243
|
+
var(--text-color-2) 70%,
|
|
244
|
+
var(--surface-elevated)
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* file input */
|
|
251
|
+
:where(input[type="file"]) {
|
|
252
|
+
align-self: flex-start;
|
|
253
|
+
border-radius: var(--radius-2);
|
|
254
|
+
border: var(--border-size-1) solid var(--surface-filled);
|
|
255
|
+
box-shadow: var(--inner-shadow-4);
|
|
256
|
+
color: var(--text-color-2-contrast);
|
|
257
|
+
cursor: initial;
|
|
258
|
+
max-inline-size: 100%;
|
|
259
|
+
padding: 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
:where(input[type="file"])::-webkit-file-upload-button,
|
|
263
|
+
:where(input[type="file"])::file-selector-button {
|
|
264
|
+
cursor: pointer;
|
|
265
|
+
margin-inline-end: var(--size-relative-6);
|
|
266
|
+
}
|
|
267
|
+
}
|