@semanticus/semanticus-css 1.0.0 → 1.2.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/README.md +10 -10
- package/dist/semanticus-no-utilities.css +1 -1
- package/dist/semanticus-semantics.css +1 -1
- package/dist/semanticus-utilities.css +1 -1
- package/dist/semanticus.css +2 -2
- package/package.json +2 -1
- package/src/components/_card-list.css +60 -0
- package/src/components/_card.css +8 -48
- package/src/components/_icons.css +59 -0
- package/src/components/modules.css +3 -0
- package/src/index.css +1 -1
- package/src/semantics/attributes/_aria-disabled.css +25 -0
- package/src/semantics/attributes/_role-group.css +125 -0
- package/src/semantics/attributes/_role-search.css +14 -0
- package/src/semantics/attributes/_role-status-alert.css +122 -0
- package/src/semantics/attributes/_role-tooltip.css +1 -1
- package/src/semantics/elements/_button.css +2 -5
- package/src/semantics/elements/_dialog.css +7 -27
- package/src/semantics/elements/_nav.css +5 -1
- package/src/semantics/modules.css +4 -1
- package/src/utilities/effects/_shadows.css +4 -0
- package/src/variables/_theme.css +6 -6
- package/src/variants/intent/_contrast.css +15 -19
- package/src/variants/intent/_danger.css +14 -18
- package/src/variants/intent/_info.css +14 -18
- package/src/variants/intent/_primary.css +14 -18
- package/src/variants/intent/_secondary.css +14 -18
- package/src/variants/intent/_success.css +14 -18
- package/src/variants/intent/_warning.css +14 -18
- package/src/variants/modifiers/_ghost.css +3 -3
- package/src/variants/modifiers/_striped.css +8 -8
- package/src/variants/modifiers/_subtle.css +2 -2
- package/src/variants/modules.css +0 -1
- package/src/semantics/attributes/_role-group-search.css +0 -137
- /package/src/{variants/modifiers → components}/_container.css +0 -0
package/src/variables/_theme.css
CHANGED
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
|
|
221
221
|
/* === Dialog / Alert tokens === */
|
|
222
222
|
--dialog-fill: light-dark(var(--color-background), var(--color-slate-900));
|
|
223
|
-
--dialog-border:
|
|
223
|
+
--dialog-border: var(--color-border);
|
|
224
224
|
--dialog-shadow: var(--shadow);
|
|
225
225
|
--dialog-section-fill: light-dark(
|
|
226
226
|
color-mix(in srgb, var(--color-slate-50) 25%, white),
|
|
@@ -266,15 +266,15 @@
|
|
|
266
266
|
/* === ICONS === */
|
|
267
267
|
body {
|
|
268
268
|
--icon-checkbox: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
269
|
-
--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
|
270
269
|
--icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
|
|
271
|
-
--icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
|
|
272
|
-
--icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
|
273
|
-
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
|
274
270
|
--icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
|
|
271
|
+
--icon-date: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
|
|
272
|
+
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(197, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
|
275
273
|
--icon-loading: url("data:image/svg+xml,%3Csvg fill='none' height='24' width='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3E%3Cstyle%3E g %7B animation: rotate 2s linear infinite; transform-origin: center center; %7D circle %7B stroke-dasharray: 75,100; stroke-dashoffset: -5; animation: dash 1.5s ease-in-out infinite; stroke-linecap: round; %7D @keyframes rotate %7B 0%25 %7B transform: rotate(0deg); %7D 100%25 %7B transform: rotate(360deg); %7D %7D @keyframes dash %7B 0%25 %7B stroke-dasharray: 1,100; stroke-dashoffset: 0; %7D 50%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -17.5; %7D 100%25 %7B stroke-dasharray: 44.5,100; stroke-dashoffset: -62; %7D %7D %3C/style%3E%3Cg%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='rgb(136, 145, 164)' stroke-width='4' /%3E%3C/g%3E%3C/svg%3E");
|
|
274
|
+
--icon-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(255, 255, 255)' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='5' y1='12' x2='19' y2='12'%3E%3C/line%3E%3C/svg%3E");
|
|
275
|
+
--icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
|
|
276
|
+
--icon-time: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(136, 145, 164)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
|
|
276
277
|
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(43, 122, 76)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
277
|
-
--icon-invalid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(197, 47, 33)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
|
|
278
278
|
|
|
279
279
|
@container style(--theme: dark) {
|
|
280
280
|
--icon-valid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgb(110, 213, 157)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.contrast {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-50), var(--color-slate-900)), transparent 90%);
|
|
11
|
+
--dialog-section-border: color-mix(in srgb, light-dark(var(--color-slate-50), black), transparent 95%);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
15
|
--color-text: oklch(from var(--color-contrast-text) l c h / var(--color-text-opacity));
|
|
5
16
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
17
|
|
|
@@ -8,14 +19,8 @@
|
|
|
8
19
|
--color-text: oklch(from var(--color-contrast-text-hover) l c h / var(--color-text-opacity));
|
|
9
20
|
}
|
|
10
21
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.contrast {
|
|
15
|
-
--color-background: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-contrast-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
|
|
18
22
|
|
|
23
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
24
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
25
|
--color-background: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-background-opacity));
|
|
21
26
|
--border-color: oklch(from var(--color-contrast-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -29,15 +34,6 @@
|
|
|
29
34
|
}
|
|
30
35
|
}
|
|
31
36
|
|
|
32
|
-
:is(.card, .pane, .panel).contrast {
|
|
33
|
-
--color-text: oklch(from var(--color-contrast-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-contrast-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-50), var(--color-slate-900)), transparent 90%);
|
|
38
|
-
--dialog-section-border: color-mix(in srgb, light-dark(var(--color-slate-50), black), transparent 95%);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
37
|
/* Accordion chevron override */
|
|
42
38
|
details summary[role="button"].contrast::after {
|
|
43
39
|
@container style(--theme: dark) {
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.danger {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-danger-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-danger-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.danger {
|
|
15
|
-
--color-background: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-danger-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-danger-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-danger-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).danger {
|
|
33
|
-
--color-text: oklch(from var(--color-danger-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-danger-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.info {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-info-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-info-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.info {
|
|
15
|
-
--color-background: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-info-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-info-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-info-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).info {
|
|
33
|
-
--color-text: oklch(from var(--color-info-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-info-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.primary {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-primary-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-primary-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.primary {
|
|
15
|
-
--color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-primary-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-primary-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).primary {
|
|
33
|
-
--color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.secondary {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-secondary-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-secondary-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.secondary {
|
|
15
|
-
--color-background: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-secondary-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-secondary-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).secondary {
|
|
33
|
-
--color-text: oklch(from var(--color-secondary-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-secondary-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.success {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-success-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-success-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-success-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.success {
|
|
15
|
-
--color-background: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-success-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-success-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-success-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).success {
|
|
33
|
-
--color-text: oklch(from var(--color-success-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-success-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
[role="link"] {
|
|
3
|
-
|
|
1
|
+
.warning {
|
|
2
|
+
&:not(a:not([role="button"]), [role="link"]) {
|
|
3
|
+
--color-background: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
4
|
+
--border-color: oklch(from var(--color-warning-fill) l c h / var(--color-border-opacity));
|
|
5
|
+
--color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
|
|
6
|
+
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
7
|
+
|
|
8
|
+
--dialog-fill: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
9
|
+
--dialog-border: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
10
|
+
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&:is(a:not([role="button"]), [role="link"]) {
|
|
4
14
|
--color-text: oklch(from var(--color-warning-text) l c h / var(--color-text-opacity));
|
|
5
15
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
6
16
|
|
|
@@ -8,14 +18,8 @@
|
|
|
8
18
|
--color-text: oklch(from var(--color-warning-text-hover) l c h / var(--color-text-opacity));
|
|
9
19
|
}
|
|
10
20
|
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
14
|
-
&.warning {
|
|
15
|
-
--color-background: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
16
|
-
--border-color: oklch(from var(--color-warning-fill) l c h / var(--color-border-opacity));
|
|
17
|
-
--color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
|
|
18
21
|
|
|
22
|
+
&:is(button, [type="submit"], [type="button"], [role="button"]):not([role="link"]) {
|
|
19
23
|
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
20
24
|
--color-background: oklch(from var(--color-warning-fill-hover) l c h / var(--color-background-opacity));
|
|
21
25
|
--border-color: oklch(from var(--color-warning-fill-hover) l c h / var(--color-border-opacity));
|
|
@@ -28,11 +32,3 @@
|
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
|
|
32
|
-
:is(.card, .pane, .panel).warning {
|
|
33
|
-
--color-text: oklch(from var(--color-warning-on-fill) l c h / var(--color-text-opacity));
|
|
34
|
-
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
35
|
-
--dialog-fill: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
36
|
-
--dialog-border: oklch(from var(--color-warning-fill) l c h / var(--color-background-opacity));
|
|
37
|
-
--dialog-section-fill: color-mix(in srgb, light-dark(var(--color-slate-900), var(--color-slate-50)), transparent 90%);
|
|
38
|
-
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.ghost {
|
|
2
2
|
--color-background: transparent;
|
|
3
3
|
|
|
4
|
-
background-color: var(--color-background)
|
|
4
|
+
background-color: var(--color-background);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
:
|
|
7
|
+
:not([role="link"], a:not([role="button"])) {
|
|
8
8
|
&.ghost {
|
|
9
9
|
&.primary {
|
|
10
10
|
--color-background: transparent;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
:is(.card, .pane,
|
|
134
|
+
:is(.card, .pane, [role="status"], [role="alert"]).ghost {
|
|
135
135
|
> header,
|
|
136
136
|
> footer {
|
|
137
137
|
--dialog-section-fill: light-dark(
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
:
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
.striped {
|
|
2
|
+
> :not(table):nth-child(odd) {
|
|
3
|
+
background-color: color-mix(in srgb, var(--color-background), var(--color-hover-effect) 15%);
|
|
4
|
+
}
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
> tbody > tr:nth-child(odd) {
|
|
7
|
+
&:is(th, td) {
|
|
8
|
+
background-color: color-mix(in srgb, var(--color-background), var(--color-hover-effect) 15%);
|
|
9
|
+
}
|
|
10
10
|
}
|
|
11
11
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
--subtle-opacity: 60%;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
:
|
|
5
|
+
:not([role="link"], a:not([role="button"])) {
|
|
6
6
|
&.subtle {
|
|
7
7
|
&.primary {
|
|
8
8
|
--color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
--border-color: oklch(from var(--color-primary-subtle-fill) l c h / var(--color-border-opacity));
|
|
63
63
|
--color-text-muted: color-mix(in srgb, var(--color-text), transparent 40%);
|
|
64
64
|
|
|
65
|
-
&:is(
|
|
65
|
+
&:is([aria-current]:not([aria-current="false"]), :hover, :active, :focus) {
|
|
66
66
|
--color-text: oklch(from var(--color-primary-on-fill) l c h / var(--color-text-opacity));
|
|
67
67
|
--color-background: oklch(from var(--color-primary-fill) l c h / var(--color-background-opacity));
|
|
68
68
|
--border-color: oklch(from var(--color-primary-fill) l c h / var(--color-border-opacity));
|
package/src/variants/modules.css
CHANGED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
[role="search"],
|
|
2
|
-
[role="group"] {
|
|
3
|
-
border-radius: var(--radius);
|
|
4
|
-
box-shadow: var(--group-shadow, 0 0 0 rgba(0, 0, 0, 0));
|
|
5
|
-
display: inline-flex;
|
|
6
|
-
gap: 0;
|
|
7
|
-
margin-bottom: var(--spacing);
|
|
8
|
-
position: relative;
|
|
9
|
-
transition: box-shadow var(--transition);
|
|
10
|
-
vertical-align: middle;
|
|
11
|
-
width: 100%;
|
|
12
|
-
|
|
13
|
-
& > *:not(details),
|
|
14
|
-
& input:not([type="checkbox"], [type="radio"]),
|
|
15
|
-
& select {
|
|
16
|
-
position: relative;
|
|
17
|
-
flex: 1 1 auto;
|
|
18
|
-
margin-bottom: 0;
|
|
19
|
-
|
|
20
|
-
&:not(:first-child) {
|
|
21
|
-
margin-left: calc(var(--border-size) * -1);
|
|
22
|
-
border-top-left-radius: 0;
|
|
23
|
-
border-bottom-left-radius: 0;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
&:not(:last-child) {
|
|
27
|
-
border-top-right-radius: 0;
|
|
28
|
-
border-bottom-right-radius: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&:focus {
|
|
32
|
-
z-index: 2;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
& button,
|
|
37
|
-
& [type="submit"],
|
|
38
|
-
& [type="reset"],
|
|
39
|
-
& [type="button"],
|
|
40
|
-
& [role="button"] {
|
|
41
|
-
width: auto;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Details dropdown inside group */
|
|
45
|
-
& > details {
|
|
46
|
-
position: relative;
|
|
47
|
-
margin-bottom: 0;
|
|
48
|
-
/* Constrain details height to just the button, not the dropdown menu */
|
|
49
|
-
height: calc(
|
|
50
|
-
1rem * var(--line-height) + var(--input-spacing-vertical) *
|
|
51
|
-
2 + var(--border-size) * 2
|
|
52
|
-
);
|
|
53
|
-
overflow: visible;
|
|
54
|
-
|
|
55
|
-
&:not(:first-child) {
|
|
56
|
-
margin-left: calc(var(--border-size) * -1);
|
|
57
|
-
|
|
58
|
-
& > summary {
|
|
59
|
-
border-top-left-radius: 0;
|
|
60
|
-
border-bottom-left-radius: 0;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:not(:last-child) > summary {
|
|
65
|
-
border-top-right-radius: 0;
|
|
66
|
-
border-bottom-right-radius: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
& > summary:focus {
|
|
70
|
-
z-index: 2;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Ensure consistent height with other form elements in the group */
|
|
74
|
-
& > summary[role="button"] {
|
|
75
|
-
display: flex;
|
|
76
|
-
align-items: center;
|
|
77
|
-
height: 100%;
|
|
78
|
-
|
|
79
|
-
&::after {
|
|
80
|
-
height: calc(1rem * var(--line-height, 1.5));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@supports selector(:has(*)) {
|
|
87
|
-
[role="search"],
|
|
88
|
-
[role="group"] {
|
|
89
|
-
&:has(
|
|
90
|
-
button:focus,
|
|
91
|
-
[type="submit"]:focus,
|
|
92
|
-
[type="button"]:focus,
|
|
93
|
-
[role="button"]:focus
|
|
94
|
-
) {
|
|
95
|
-
--group-shadow: var(--group-shadow-focus-button);
|
|
96
|
-
|
|
97
|
-
& input:not([type="checkbox"], [type="radio"]),
|
|
98
|
-
& select {
|
|
99
|
-
border-color: transparent;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
&:has(input:not([type="submit"], [type="button"]):focus, select:focus) {
|
|
104
|
-
--group-shadow: var(--group-shadow-focus-input);
|
|
105
|
-
|
|
106
|
-
& button,
|
|
107
|
-
& [type="submit"],
|
|
108
|
-
& [type="button"],
|
|
109
|
-
& [role="button"] {
|
|
110
|
-
--button-shadow: 0 0 0 var(--border-size)
|
|
111
|
-
var(--color-primary-fill);
|
|
112
|
-
--button-shadow-hover: 0 0 0 var(--border-size)
|
|
113
|
-
var(--color-primary-fill-hover);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
& button:focus,
|
|
118
|
-
& [type="submit"]:focus,
|
|
119
|
-
& [type="reset"]:focus,
|
|
120
|
-
& [type="button"]:focus,
|
|
121
|
-
& [role="button"]:focus {
|
|
122
|
-
box-shadow: none;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
[role="search"] {
|
|
128
|
-
& > :first-child {
|
|
129
|
-
border-top-left-radius: 5rem;
|
|
130
|
-
border-bottom-left-radius: 5rem;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
& > :last-child {
|
|
134
|
-
border-top-right-radius: 5rem;
|
|
135
|
-
border-bottom-right-radius: 5rem;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
File without changes
|