@robert-stackflow/oneui 0.6.21 → 0.6.23
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/CHANGELOG.md +30 -18
- package/README.md +270 -264
- package/components/AccountItem.module.css +103 -103
- package/components/AppShell.module.css +223 -223
- package/components/Badge.module.css +30 -30
- package/components/BarChart.module.css +35 -35
- package/components/Breadcrumb.module.css +97 -97
- package/components/Button.module.css +120 -120
- package/components/Checkbox.module.css +95 -95
- package/components/ContextMenu.d.ts +3 -1
- package/components/ContextMenu.js +24 -4
- package/components/ContributionCalendar.module.css +121 -121
- package/components/Control.module.css +86 -86
- package/components/DataTable.module.css +75 -75
- package/components/Dialog.module.css +139 -139
- package/components/EditableHeading.d.ts +12 -0
- package/components/EditableHeading.js +76 -0
- package/components/EditableHeading.module.css +16 -0
- package/components/HierarchyPicker.module.css +185 -185
- package/components/IconButton.d.ts +3 -1
- package/components/IconButton.js +13 -2
- package/components/IconButton.module.css +13 -0
- package/components/Indicator.module.css +83 -83
- package/components/Layout.d.ts +1 -0
- package/components/Layout.module.css +82 -82
- package/components/Markdown.module.css +227 -227
- package/components/MenuItem.module.css +172 -172
- package/components/NavBar.module.css +130 -130
- package/components/Popover.d.ts +5 -1
- package/components/Popover.js +59 -28
- package/components/Popover.module.css +52 -0
- package/components/Progress.module.css +33 -33
- package/components/RadioGroup.module.css +87 -87
- package/components/RangeSlider.module.css +141 -141
- package/components/ResizablePanel.module.css +101 -101
- package/components/ResourceCard.module.css +98 -98
- package/components/Segmented.module.css +85 -85
- package/components/SidebarNavigation.js +4 -2
- package/components/SidebarNavigation.module.css +7 -2
- package/components/Slider.module.css +19 -19
- package/components/Steps.module.css +176 -176
- package/components/Tab.module.css +148 -148
- package/components/Table.module.css +87 -87
- package/components/TableOfContents.module.css +252 -252
- package/components/ThemePicker.module.css +178 -178
- package/components/TimeColumns.module.css +47 -47
- package/components/Timeline.module.css +202 -202
- package/components/TreeTable.module.css +57 -57
- package/components/UptimeChart.module.css +15 -15
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/motion.d.ts +1 -0
- package/components/motion.js +16 -2
- package/package.json +1 -1
- package/styles/base.css +206 -206
- package/styles/blue.css +270 -270
- package/styles/minimal.css +319 -319
package/components/Popover.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { usePortalRoot } from "./usePortalRoot.js";
|
|
4
4
|
import { FieldContext } from "./field.js";
|
|
5
5
|
import {
|
|
@@ -8,7 +8,11 @@ import {
|
|
|
8
8
|
useEffect
|
|
9
9
|
} from "react";
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
menuSurfaceMotion,
|
|
13
|
+
popoverSurfaceMotion,
|
|
14
|
+
cancelMotion
|
|
15
|
+
} from "./motion.js";
|
|
12
16
|
import s from "./Popover.module.css";
|
|
13
17
|
import { useSurfacePortal } from "./surfacePortal.js";
|
|
14
18
|
function Popover({
|
|
@@ -29,7 +33,9 @@ function Popover({
|
|
|
29
33
|
autoFocus = true,
|
|
30
34
|
matchAnchorWidth = false,
|
|
31
35
|
className = "",
|
|
32
|
-
portalContainer
|
|
36
|
+
portalContainer,
|
|
37
|
+
arrow = false,
|
|
38
|
+
offset
|
|
33
39
|
}) {
|
|
34
40
|
const root = usePortalRoot();
|
|
35
41
|
const owner = useSurfacePortal(), portalHost = portalContainer || owner?.host || root, open = requestedOpen && owner?.active !== false;
|
|
@@ -37,6 +43,7 @@ function Popover({
|
|
|
37
43
|
close.current = onClose;
|
|
38
44
|
const opened = useRef(open);
|
|
39
45
|
opened.current = open;
|
|
46
|
+
const animate = arrow ? popoverSurfaceMotion : menuSurfaceMotion;
|
|
40
47
|
useEffect(() => {
|
|
41
48
|
if (requestedOpen && owner?.active === false) close.current();
|
|
42
49
|
}, [requestedOpen, owner?.active]);
|
|
@@ -52,14 +59,12 @@ function Popover({
|
|
|
52
59
|
if (!surface.matches(":popover-open")) return;
|
|
53
60
|
surface.inert = true;
|
|
54
61
|
surface.setAttribute("aria-hidden", "true");
|
|
55
|
-
void
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
surface.hidePopover();
|
|
62
|
-
});
|
|
62
|
+
void animate(surface, "exit", surface.dataset.side).then(
|
|
63
|
+
(done) => {
|
|
64
|
+
if (done && !opened.current && surface.matches(":popover-open"))
|
|
65
|
+
surface.hidePopover();
|
|
66
|
+
}
|
|
67
|
+
);
|
|
63
68
|
return;
|
|
64
69
|
}
|
|
65
70
|
if (!trigger) return;
|
|
@@ -80,40 +85,61 @@ function Popover({
|
|
|
80
85
|
Math.min(maxHeight, viewportBottom - viewportTop - 24)
|
|
81
86
|
);
|
|
82
87
|
surface.style.maxHeight = available + "px";
|
|
88
|
+
surface.style.setProperty(
|
|
89
|
+
"--popover-body-height",
|
|
90
|
+
Math.max(0, available - 12) + "px"
|
|
91
|
+
);
|
|
83
92
|
const actualWidth = Math.min(
|
|
84
93
|
matchAnchorWidth ? rect.width : width,
|
|
85
94
|
Math.max(0, viewportWidth - 24)
|
|
86
95
|
);
|
|
87
96
|
surface.style.width = actualWidth + "px";
|
|
88
|
-
const height = Math.min(surface.
|
|
89
|
-
const
|
|
90
|
-
|
|
97
|
+
const height = Math.min(surface.offsetHeight, available);
|
|
98
|
+
const gap = Math.max(0, Number.isFinite(offset) ? offset : 6);
|
|
99
|
+
const horizontalGap = Math.max(0, Number.isFinite(offset) ? offset : 8);
|
|
100
|
+
const below = viewportBottom - rect.bottom - gap - 12;
|
|
101
|
+
const above = rect.top - viewportTop - gap - 12;
|
|
102
|
+
let resolved = side === "auto" ? below >= height || below >= above ? "bottom" : "top" : side;
|
|
103
|
+
if (resolved === "top" && above < height && below > above)
|
|
104
|
+
resolved = "bottom";
|
|
105
|
+
else if (resolved === "bottom" && below < height && above > below)
|
|
106
|
+
resolved = "top";
|
|
91
107
|
if (resolved === "left" && rect.left - viewportLeft - 20 < actualWidth && viewportLeft + viewportWidth - rect.right - 20 >= actualWidth)
|
|
92
108
|
resolved = "right";
|
|
93
109
|
if (resolved === "right" && viewportLeft + viewportWidth - rect.right - 20 < actualWidth && rect.left - viewportLeft - 20 >= actualWidth)
|
|
94
110
|
resolved = "left";
|
|
95
111
|
const horizontal = resolved === "left" || resolved === "right";
|
|
96
|
-
const left = horizontal ? resolved === "left" ? rect.left - actualWidth -
|
|
97
|
-
const top = horizontal ? align === "end" ? rect.bottom - height : align === "center" ? rect.top + (rect.height - height) / 2 : rect.top : resolved === "bottom" ? rect.bottom +
|
|
112
|
+
const left = horizontal ? resolved === "left" ? rect.left - actualWidth - horizontalGap : rect.right + horizontalGap : align === "end" ? rect.right - actualWidth : align === "center" ? rect.left + (rect.width - actualWidth) / 2 : rect.left;
|
|
113
|
+
const top = horizontal ? align === "end" ? rect.bottom - height : align === "center" ? rect.top + (rect.height - height) / 2 : rect.top : resolved === "bottom" ? rect.bottom + gap : rect.top - height - gap;
|
|
98
114
|
surface.dataset.side = resolved;
|
|
99
|
-
|
|
115
|
+
const placedLeft = Math.max(
|
|
100
116
|
viewportLeft + 12,
|
|
101
117
|
Math.min(left, viewportLeft + viewportWidth - actualWidth - 12)
|
|
102
|
-
)
|
|
103
|
-
|
|
118
|
+
);
|
|
119
|
+
const placedTop = Math.max(
|
|
104
120
|
viewportTop + 12,
|
|
105
121
|
Math.min(top, viewportBottom - height - 12)
|
|
106
|
-
)
|
|
122
|
+
);
|
|
123
|
+
surface.style.left = placedLeft + "px";
|
|
124
|
+
surface.style.top = placedTop + "px";
|
|
125
|
+
const pointerX = Math.max(
|
|
126
|
+
16,
|
|
127
|
+
Math.min(actualWidth - 16, rect.left + rect.width / 2 - placedLeft)
|
|
128
|
+
);
|
|
129
|
+
const pointerY = Math.max(
|
|
130
|
+
16,
|
|
131
|
+
Math.min(height - 16, rect.top + rect.height / 2 - placedTop)
|
|
132
|
+
);
|
|
133
|
+
surface.style.setProperty("--popover-arrow-x", pointerX + "px");
|
|
134
|
+
surface.style.setProperty("--popover-arrow-y", pointerY + "px");
|
|
135
|
+
if (arrow)
|
|
136
|
+
surface.style.transformOrigin = horizontal ? `${resolved === "right" ? "0" : "100%"} ${pointerY}px` : `${pointerX}px ${resolved === "bottom" ? "0" : "100%"}`;
|
|
107
137
|
};
|
|
108
138
|
const entering = !surface.matches(":popover-open") || surface.dataset.motionPhase === "exit" || surface.dataset.motionPhase === "hidden";
|
|
109
139
|
if (!surface.matches(":popover-open")) surface.showPopover();
|
|
110
140
|
position();
|
|
111
141
|
if (entering)
|
|
112
|
-
void
|
|
113
|
-
surface,
|
|
114
|
-
"enter",
|
|
115
|
-
surface.dataset.side
|
|
116
|
-
);
|
|
142
|
+
void animate(surface, "enter", surface.dataset.side);
|
|
117
143
|
if (autoFocus && role !== "listbox")
|
|
118
144
|
(surface.querySelector("[data-autofocus]") || surface.querySelector(
|
|
119
145
|
'input:not([disabled]),button:not([disabled]),[tabindex="0"]'
|
|
@@ -164,7 +190,9 @@ function Popover({
|
|
|
164
190
|
autoFocus,
|
|
165
191
|
matchAnchorWidth,
|
|
166
192
|
side,
|
|
167
|
-
align
|
|
193
|
+
align,
|
|
194
|
+
arrow,
|
|
195
|
+
offset
|
|
168
196
|
]);
|
|
169
197
|
if (!portalHost) return null;
|
|
170
198
|
return createPortal(
|
|
@@ -178,8 +206,11 @@ function Popover({
|
|
|
178
206
|
"aria-label": label,
|
|
179
207
|
"aria-describedby": descriptionId,
|
|
180
208
|
onKeyDown,
|
|
181
|
-
className: `${s.popover} ${scrollable ? "" : s.contained} ${className}`,
|
|
182
|
-
children: /* @__PURE__ */ jsx(FieldContext, { value: null, children
|
|
209
|
+
className: `${s.popover} ${scrollable ? "" : s.contained} ${arrow ? s.withArrow : ""} ${className}`,
|
|
210
|
+
children: /* @__PURE__ */ jsx(FieldContext, { value: null, children: arrow ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
211
|
+
/* @__PURE__ */ jsx("span", { className: s.arrow, "data-popover-arrow": true, "aria-hidden": "true" }),
|
|
212
|
+
/* @__PURE__ */ jsx("div", { className: `${s.body} ${scrollable ? "" : s.bodyContained}`, children })
|
|
213
|
+
] }) : children })
|
|
183
214
|
}
|
|
184
215
|
),
|
|
185
216
|
portalHost
|
|
@@ -25,3 +25,55 @@
|
|
|
25
25
|
.popover:not(:popover-open) {
|
|
26
26
|
display: none;
|
|
27
27
|
}
|
|
28
|
+
.popover.withArrow {
|
|
29
|
+
overflow: visible;
|
|
30
|
+
}
|
|
31
|
+
.body {
|
|
32
|
+
min-height: 0;
|
|
33
|
+
flex-shrink: 1;
|
|
34
|
+
max-height: var(--popover-body-height);
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
overscroll-behavior: contain;
|
|
37
|
+
border-radius: max(0px, calc(var(--popup-radius) - 5px));
|
|
38
|
+
}
|
|
39
|
+
.bodyContained {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
}
|
|
44
|
+
.bodyContained > * {
|
|
45
|
+
flex-shrink: 0;
|
|
46
|
+
}
|
|
47
|
+
.arrow {
|
|
48
|
+
position: absolute;
|
|
49
|
+
width: 10px;
|
|
50
|
+
height: 10px;
|
|
51
|
+
background: var(--popup-background);
|
|
52
|
+
border: 0 solid var(--popup-border);
|
|
53
|
+
transform: rotate(45deg);
|
|
54
|
+
pointer-events: none;
|
|
55
|
+
}
|
|
56
|
+
.withArrow[data-side="bottom"] > .arrow {
|
|
57
|
+
top: -6px;
|
|
58
|
+
left: calc(var(--popover-arrow-x) - 5px);
|
|
59
|
+
border-top-width: 1px;
|
|
60
|
+
border-left-width: 1px;
|
|
61
|
+
}
|
|
62
|
+
.withArrow[data-side="top"] > .arrow {
|
|
63
|
+
bottom: -6px;
|
|
64
|
+
left: calc(var(--popover-arrow-x) - 5px);
|
|
65
|
+
border-bottom-width: 1px;
|
|
66
|
+
border-right-width: 1px;
|
|
67
|
+
}
|
|
68
|
+
.withArrow[data-side="right"] > .arrow {
|
|
69
|
+
left: -6px;
|
|
70
|
+
top: calc(var(--popover-arrow-y) - 5px);
|
|
71
|
+
border-bottom-width: 1px;
|
|
72
|
+
border-left-width: 1px;
|
|
73
|
+
}
|
|
74
|
+
.withArrow[data-side="left"] > .arrow {
|
|
75
|
+
right: -6px;
|
|
76
|
+
top: calc(var(--popover-arrow-y) - 5px);
|
|
77
|
+
border-top-width: 1px;
|
|
78
|
+
border-right-width: 1px;
|
|
79
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
.progress {
|
|
2
|
-
height: 5px;
|
|
3
|
-
width: 100%;
|
|
4
|
-
background: var(--line);
|
|
5
|
-
border-radius: 10px;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
}
|
|
8
|
-
.progress span {
|
|
9
|
-
display: block;
|
|
10
|
-
height: 100%;
|
|
11
|
-
background: var(--accent-ink, var(--accent));
|
|
12
|
-
border-radius: inherit;
|
|
13
|
-
transition: width var(--motion-panel) var(--ease);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.progress[data-indeterminate="true"] > span {
|
|
17
|
-
width: 35%;
|
|
18
|
-
animation: progress-travel 1.25s ease-in-out infinite;
|
|
19
|
-
}
|
|
20
|
-
.progress[data-tone="success"] > span {
|
|
21
|
-
background: var(--success);
|
|
22
|
-
}
|
|
23
|
-
.progress[data-tone="error"] > span {
|
|
24
|
-
background: var(--danger);
|
|
25
|
-
}
|
|
26
|
-
@keyframes progress-travel {
|
|
27
|
-
from {
|
|
28
|
-
transform: translateX(-100%);
|
|
29
|
-
}
|
|
30
|
-
to {
|
|
31
|
-
transform: translateX(290%);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
.progress {
|
|
2
|
+
height: 5px;
|
|
3
|
+
width: 100%;
|
|
4
|
+
background: var(--line);
|
|
5
|
+
border-radius: 10px;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}
|
|
8
|
+
.progress span {
|
|
9
|
+
display: block;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background: var(--accent-ink, var(--accent));
|
|
12
|
+
border-radius: inherit;
|
|
13
|
+
transition: width var(--motion-panel) var(--ease);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.progress[data-indeterminate="true"] > span {
|
|
17
|
+
width: 35%;
|
|
18
|
+
animation: progress-travel 1.25s ease-in-out infinite;
|
|
19
|
+
}
|
|
20
|
+
.progress[data-tone="success"] > span {
|
|
21
|
+
background: var(--success);
|
|
22
|
+
}
|
|
23
|
+
.progress[data-tone="error"] > span {
|
|
24
|
+
background: var(--danger);
|
|
25
|
+
}
|
|
26
|
+
@keyframes progress-travel {
|
|
27
|
+
from {
|
|
28
|
+
transform: translateX(-100%);
|
|
29
|
+
}
|
|
30
|
+
to {
|
|
31
|
+
transform: translateX(290%);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
.group {
|
|
2
|
-
border: 0;
|
|
3
|
-
margin: 0;
|
|
4
|
-
padding: 0;
|
|
5
|
-
display: flex;
|
|
6
|
-
gap: 20px;
|
|
7
|
-
}
|
|
8
|
-
.group legend {
|
|
9
|
-
padding: 0;
|
|
10
|
-
margin-bottom: 10px;
|
|
11
|
-
font-size: 12px;
|
|
12
|
-
}
|
|
13
|
-
.group label {
|
|
14
|
-
position: relative;
|
|
15
|
-
display: inline-flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
gap: 8px;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
user-select: none;
|
|
20
|
-
}
|
|
21
|
-
.group input[type="radio"] {
|
|
22
|
-
position: absolute;
|
|
23
|
-
left: 0;
|
|
24
|
-
margin: 0;
|
|
25
|
-
width: 18px;
|
|
26
|
-
height: 18px;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
}
|
|
29
|
-
.mark {
|
|
30
|
-
display: grid;
|
|
31
|
-
place-items: center;
|
|
32
|
-
flex-shrink: 0;
|
|
33
|
-
width: 18px;
|
|
34
|
-
height: 18px;
|
|
35
|
-
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
36
|
-
border-radius: 50%;
|
|
37
|
-
background: var(--field);
|
|
38
|
-
pointer-events: none;
|
|
39
|
-
transition:
|
|
40
|
-
border-color var(--motion-hover),
|
|
41
|
-
box-shadow var(--motion-hover),
|
|
42
|
-
transform var(--motion-press);
|
|
43
|
-
}
|
|
44
|
-
.mark::after {
|
|
45
|
-
content: "";
|
|
46
|
-
width: 8px;
|
|
47
|
-
height: 8px;
|
|
48
|
-
border-radius: 50%;
|
|
49
|
-
background: var(--accent-ink, var(--accent));
|
|
50
|
-
transform: scale(0.25);
|
|
51
|
-
opacity: 0;
|
|
52
|
-
transition:
|
|
53
|
-
transform var(--motion-panel) var(--ease),
|
|
54
|
-
opacity var(--motion-hover);
|
|
55
|
-
}
|
|
56
|
-
.group input:checked + .mark {
|
|
57
|
-
border-color: var(--accent-ink, var(--accent));
|
|
58
|
-
}
|
|
59
|
-
.group input:checked + .mark::after {
|
|
60
|
-
transform: scale(1);
|
|
61
|
-
opacity: 1;
|
|
62
|
-
}
|
|
63
|
-
.group label:hover input:not(:disabled) + .mark {
|
|
64
|
-
border-color: var(--muted);
|
|
65
|
-
}
|
|
66
|
-
.group label:active input:not(:disabled) + .mark {
|
|
67
|
-
transform: scale(0.92);
|
|
68
|
-
}
|
|
69
|
-
.group input:focus-visible + .mark {
|
|
70
|
-
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink, var(--accent)) 14%, transparent);
|
|
71
|
-
border-color: var(--accent-ink, var(--accent));
|
|
72
|
-
}
|
|
73
|
-
.group label[data-disabled="true"] {
|
|
74
|
-
cursor: not-allowed;
|
|
75
|
-
}
|
|
76
|
-
.group input:disabled ~ span {
|
|
77
|
-
opacity: 0.4;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.group[data-orientation="vertical"] {
|
|
81
|
-
flex-direction: column;
|
|
82
|
-
align-items: flex-start;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.group[aria-invalid="true"] .mark {
|
|
86
|
-
border-color: var(--danger);
|
|
87
|
-
}
|
|
1
|
+
.group {
|
|
2
|
+
border: 0;
|
|
3
|
+
margin: 0;
|
|
4
|
+
padding: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
gap: 20px;
|
|
7
|
+
}
|
|
8
|
+
.group legend {
|
|
9
|
+
padding: 0;
|
|
10
|
+
margin-bottom: 10px;
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
}
|
|
13
|
+
.group label {
|
|
14
|
+
position: relative;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
user-select: none;
|
|
20
|
+
}
|
|
21
|
+
.group input[type="radio"] {
|
|
22
|
+
position: absolute;
|
|
23
|
+
left: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
width: 18px;
|
|
26
|
+
height: 18px;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
.mark {
|
|
30
|
+
display: grid;
|
|
31
|
+
place-items: center;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
width: 18px;
|
|
34
|
+
height: 18px;
|
|
35
|
+
border: 1px solid color-mix(in srgb, var(--fg) 25%, var(--surface));
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
background: var(--field);
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
transition:
|
|
40
|
+
border-color var(--motion-hover),
|
|
41
|
+
box-shadow var(--motion-hover),
|
|
42
|
+
transform var(--motion-press);
|
|
43
|
+
}
|
|
44
|
+
.mark::after {
|
|
45
|
+
content: "";
|
|
46
|
+
width: 8px;
|
|
47
|
+
height: 8px;
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
background: var(--accent-ink, var(--accent));
|
|
50
|
+
transform: scale(0.25);
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transition:
|
|
53
|
+
transform var(--motion-panel) var(--ease),
|
|
54
|
+
opacity var(--motion-hover);
|
|
55
|
+
}
|
|
56
|
+
.group input:checked + .mark {
|
|
57
|
+
border-color: var(--accent-ink, var(--accent));
|
|
58
|
+
}
|
|
59
|
+
.group input:checked + .mark::after {
|
|
60
|
+
transform: scale(1);
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
.group label:hover input:not(:disabled) + .mark {
|
|
64
|
+
border-color: var(--muted);
|
|
65
|
+
}
|
|
66
|
+
.group label:active input:not(:disabled) + .mark {
|
|
67
|
+
transform: scale(0.92);
|
|
68
|
+
}
|
|
69
|
+
.group input:focus-visible + .mark {
|
|
70
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-ink, var(--accent)) 14%, transparent);
|
|
71
|
+
border-color: var(--accent-ink, var(--accent));
|
|
72
|
+
}
|
|
73
|
+
.group label[data-disabled="true"] {
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
}
|
|
76
|
+
.group input:disabled ~ span {
|
|
77
|
+
opacity: 0.4;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.group[data-orientation="vertical"] {
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
align-items: flex-start;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.group[aria-invalid="true"] .mark {
|
|
86
|
+
border-color: var(--danger);
|
|
87
|
+
}
|