1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* Checkbox component — shadcn/ui-grade styling */
.mui-checkbox {
display: flex;
align-items: flex-start;
gap: 0.5rem;
cursor: pointer;
user-select: none;
}
/* Visually-hidden native input — fully accessible, invisible */
.mui-checkbox__input {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* Indicator — 16px square, rounded-sm, border */
.mui-checkbox__indicator {
width: 1rem;
height: 1rem;
flex-shrink: 0;
border: 1px solid var(--mui-border);
border-radius: var(--mui-radius-sm);
background: transparent;
display: flex;
align-items: center;
justify-content: center;
transition: var(--mui-transition);
margin-top: 0.125rem; /* align with first line of text */
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
/* Checked state — filled accent with white checkmark */
.mui-checkbox__input:checked + .mui-checkbox__indicator {
background: var(--mui-accent);
border-color: var(--mui-accent);
}
/* Checkmark — clean CSS check aligned precisely */
.mui-checkbox__input:checked + .mui-checkbox__indicator::after {
content: "";
display: block;
width: 0.25rem;
height: 0.5rem;
border: solid var(--mui-accent-fg);
border-width: 0 2px 2px 0;
transform: rotate(45deg) translateY(-0.5px);
}
/* Indeterminate — accent bg with horizontal dash */
.mui-checkbox__indicator--indeterminate {
background: var(--mui-accent);
border-color: var(--mui-accent);
}
.mui-checkbox__indicator--indeterminate::after {
content: "";
display: block;
width: 0.5rem;
height: 2px;
background: var(--mui-accent-fg);
border-radius: 1px;
}
/* Focus-visible ring */
.mui-checkbox__input:focus-visible + .mui-checkbox__indicator {
outline: 2px solid var(--mui-border-focus);
outline-offset: 2px;
}
/* Disabled — reduced opacity, not-allowed cursor */
.mui-checkbox--disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}
.mui-checkbox--disabled .mui-checkbox__indicator {
cursor: not-allowed;
}
/* Label — 0.875rem, medium weight, leading-none */
.mui-checkbox__label {
color: var(--mui-text);
font-size: 0.875rem;
font-weight: 500;
line-height: 1.25;
}
/* Description text below label — smaller, muted */
.mui-checkbox__description {
color: var(--mui-text-muted);
font-size: 0.8125rem;
line-height: 1.4;
margin-top: 0.125rem;
}
/* Label+description wrapper for vertical text stacking */
.mui-checkbox__text {
display: flex;
flex-direction: column;
gap: 0;
}