@plexui/styles 0.0.0-stage → 0.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 -0
- package/README.md +28 -2
- package/dist/es/components/Accordion/Accordion.module.css +89 -0
- package/dist/es/components/Alert/Alert.module.css +210 -0
- package/dist/es/components/Avatar/Avatar.module.css +168 -0
- package/dist/es/components/Avatar/AvatarGroup.module.css +26 -0
- package/dist/es/components/Badge/Badge.module.css +196 -0
- package/dist/es/components/Breadcrumb/Breadcrumb.module.css +59 -0
- package/dist/es/components/Button/Button.module.css +863 -0
- package/dist/es/components/ButtonGroup/ButtonGroup.module.css +158 -0
- package/dist/es/components/Card/Card.module.css +125 -0
- package/dist/es/components/Checkbox/Checkbox.module.css +225 -0
- package/dist/es/components/CodeBlock/CodeBlock.module.css +139 -0
- package/dist/es/components/DataTable/DataTable.module.css +117 -0
- package/dist/es/components/DatePicker/Calendar.module.css +271 -0
- package/dist/es/components/DateRangePicker/Calendar.module.css +295 -0
- package/dist/es/components/DateRangePicker/Trigger.module.css +25 -0
- package/dist/es/components/Dialog/Dialog.module.css +240 -0
- package/dist/es/components/EmptyMessage/EmptyMessage.module.css +116 -0
- package/dist/es/components/Field/Field.module.css +152 -0
- package/dist/es/components/FieldError/FieldError.module.css +28 -0
- package/dist/es/components/FileUpload/FileUpload.module.css +133 -0
- package/dist/es/components/FloatingLabelInput/FloatingLabelInput.module.css +220 -0
- package/dist/es/components/FloatingLabelSelect/FloatingLabelSelect.module.css +152 -0
- package/dist/es/components/Image/Image.module.css +9 -0
- package/dist/es/components/Indicator/CircularProgress.module.css +28 -0
- package/dist/es/components/Indicator/LoadingDots.module.css +35 -0
- package/dist/es/components/Indicator/LoadingIndicator.module.css +41 -0
- package/dist/es/components/Input/Input.module.css +519 -0
- package/dist/es/components/InputGroup/InputGroup.module.css +309 -0
- package/dist/es/components/Kbd/Kbd.module.css +47 -0
- package/dist/es/components/Label/Label.module.css +16 -0
- package/dist/es/components/Markdown/Markdown.module.css +233 -0
- package/dist/es/components/MarkdownEditor/MarkdownEditor.module.css +297 -0
- package/dist/es/components/Menu/Menu.module.css +386 -0
- package/dist/es/components/OTPInput/OTPInput.module.css +70 -0
- package/dist/es/components/Popover/Popover.module.css +82 -0
- package/dist/es/components/Progress/Progress.module.css +34 -0
- package/dist/es/components/ProgressSteps/ProgressSteps.module.css +246 -0
- package/dist/es/components/RadioGroup/RadioGroup.module.css +159 -0
- package/dist/es/components/Select/Select.module.css +338 -0
- package/dist/es/components/SelectControl/SelectControl.module.css +558 -0
- package/dist/es/components/Separator/Separator.module.css +16 -0
- package/dist/es/components/ShimmerText/ShimmerText.module.css +43 -0
- package/dist/es/components/Sidebar/Sidebar.module.css +913 -0
- package/dist/es/components/Skeleton/Skeleton.module.css +17 -0
- package/dist/es/components/Slider/Slider.module.css +199 -0
- package/dist/es/components/StatCard/StatCard.module.css +234 -0
- package/dist/es/components/Switch/Switch.module.css +121 -0
- package/dist/es/components/Table/Table.module.css +56 -0
- package/dist/es/components/Tabs/Tabs.module.css +688 -0
- package/dist/es/components/TagInput/TagInput.module.css +320 -0
- package/dist/es/components/TextLink/TextLink.module.css +50 -0
- package/dist/es/components/Textarea/Textarea.module.css +272 -0
- package/dist/es/components/Toast/Toast.module.css +99 -0
- package/dist/es/components/Tooltip/Tooltip.module.css +91 -0
- package/dist/es/components/Transition/Animate.module.css +54 -0
- package/dist/es/components/Transition/AnimateLayout.module.css +101 -0
- package/dist/es/components/Transition/AnimateLayoutGroup.module.css +88 -0
- package/dist/es/components/Transition/TransitionGroup.module.css +4 -0
- package/dist/es/styles/base.css +102 -0
- package/dist/es/styles/globals.css +50 -0
- package/dist/es/styles/index.css +22 -0
- package/dist/es/styles/katex.min.css +1296 -0
- package/dist/es/styles/tailwind-utilities.css +1316 -0
- package/dist/es/styles/variables-components.css +626 -0
- package/dist/es/styles/variables-primitive.css +327 -0
- package/dist/es/styles/variables-semantic.css +629 -0
- package/dist/es/styles/variables-tailwind-theme.css +34 -0
- package/dist/es/styles/variables-tokens-root.css +40 -0
- package/dist/es/types.js +4 -0
- package/dist/es/types.js.map +1 -0
- package/dist/es/vite/index.js +54 -0
- package/dist/es/vite/index.js.map +1 -0
- package/dist/types/types.d.ts +15 -0
- package/dist/types/vite/index.d.ts +55 -0
- package/package.json +109 -4
- package/postcss/functions.mjs +23 -0
- package/postcss/injectBreakpoints.mjs +47 -0
- package/postcss/mixins.mjs +100 -0
- package/postcss/parseLightDark.mjs +174 -0
- package/postcss/wrapModulesInLayer.mjs +21 -0
- package/postcss.config.mjs +52 -0
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
@layer components {.Container {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
width: 100%;
|
|
6
|
+
border-radius: var(--control-radius-md);
|
|
7
|
+
color: var(--color-text);
|
|
8
|
+
cursor: text;
|
|
9
|
+
font-size: var(--control-font-size-md);
|
|
10
|
+
font-weight: var(--font-weight-normal);
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
transition-duration: var(--transition-duration-basic);
|
|
13
|
+
transition-property: color, box-shadow, background-color;
|
|
14
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Container:where([data-variant="outline"]) {
|
|
18
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color) inset;
|
|
19
|
+
}
|
|
20
|
+
@media (hover: hover) and (pointer: fine) {.Container:where([data-variant="outline"]):not([data-disabled]):hover {
|
|
21
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-hover) inset;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.Container:where([data-variant="outline"]):not([data-disabled])[data-focused="true"] {
|
|
26
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-focus) inset;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Container:where([data-variant="outline"]):not([data-disabled])[data-invalid] {
|
|
30
|
+
box-shadow: 0 0 0 1px var(--input-border-color-invalid) inset;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.Container:where([data-variant="soft"]) {
|
|
34
|
+
background-color: var(--input-soft-background-color);
|
|
35
|
+
}
|
|
36
|
+
.Container:where([data-variant="soft"]):not([data-disabled])[data-focused="true"] {
|
|
37
|
+
box-shadow: 0 0 0 1px var(--input-soft-border-color-focus) inset;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.Container:where([data-variant="soft"]):not([data-disabled])[data-invalid] {
|
|
41
|
+
box-shadow: 0 0 0 1px var(--input-border-color-invalid) inset;
|
|
42
|
+
}
|
|
43
|
+
.Container[data-invalid] ::-moz-selection {
|
|
44
|
+
background-color: var(--red-a50);
|
|
45
|
+
}
|
|
46
|
+
.Container[data-invalid] ::selection {
|
|
47
|
+
background-color: var(--red-a50);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.Container[data-disabled] {
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
opacity: 0.5;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
}.Toolbar, :where([data-theme="light"]) .Toolbar {
|
|
55
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
56
|
+
}:where([data-theme="dark"]) .Toolbar {
|
|
57
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.07);
|
|
58
|
+
}.ToolbarGroup {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 2px;
|
|
62
|
+
padding: 6px;
|
|
63
|
+
}.ToolbarSeparator {
|
|
64
|
+
width: 1px;
|
|
65
|
+
height: 16px;
|
|
66
|
+
margin: 0 2px;
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}.ToolbarSeparator, :where([data-theme="light"]) .ToolbarSeparator {
|
|
69
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
70
|
+
}:where([data-theme="dark"]) .ToolbarSeparator {
|
|
71
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
72
|
+
}.ToolbarButton {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
width: 24px;
|
|
78
|
+
height: 24px;
|
|
79
|
+
padding: 0;
|
|
80
|
+
border: 0;
|
|
81
|
+
border-radius: var(--control-radius-sm);
|
|
82
|
+
background: none;
|
|
83
|
+
color: var(--color-text-secondary);
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
font-size: 16px;
|
|
86
|
+
transition-duration: var(--transition-duration-basic);
|
|
87
|
+
transition-property: color, background-color;
|
|
88
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (hover: hover) and (pointer: fine) {.ToolbarButton:hover {
|
|
92
|
+
background-color: var(--color-background-primary-ghost-hover);
|
|
93
|
+
color: var(--color-text);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.ToolbarButton:where([data-active="true"]) {
|
|
98
|
+
background-color: var(--color-background-primary-ghost-active);
|
|
99
|
+
color: var(--color-text);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ToolbarButton:disabled {
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
opacity: 0.5;
|
|
105
|
+
}.ToolbarEnd {
|
|
106
|
+
margin-left: auto;
|
|
107
|
+
}.Editor {
|
|
108
|
+
padding: 8px 12px;
|
|
109
|
+
line-height: 20px;
|
|
110
|
+
}.EditorContent {
|
|
111
|
+
outline: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.EditorContent > * + * {
|
|
115
|
+
margin-top: 8px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.EditorContent :global(p.is-editor-empty):first-child::before {
|
|
119
|
+
content: attr(data-placeholder);
|
|
120
|
+
float: left;
|
|
121
|
+
height: 0;
|
|
122
|
+
pointer-events: none;
|
|
123
|
+
color: var(--input-placeholder-text-color);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.EditorContent strong {
|
|
127
|
+
font-weight: var(--font-weight-semibold);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.EditorContent em {
|
|
131
|
+
font-style: italic;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.EditorContent a {
|
|
135
|
+
color: var(--link-primary-text-color);
|
|
136
|
+
text-decoration: underline;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.EditorContent ul,
|
|
140
|
+
.EditorContent ol {
|
|
141
|
+
padding-left: 20px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.EditorContent ul {
|
|
145
|
+
list-style-type: disc;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.EditorContent ol {
|
|
149
|
+
list-style-type: decimal;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.EditorContent li + li {
|
|
153
|
+
margin-top: 2px;
|
|
154
|
+
}.LinkDialogOverlay {
|
|
155
|
+
position: fixed;
|
|
156
|
+
inset: 0;
|
|
157
|
+
z-index: 9999;
|
|
158
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
159
|
+
}.LinkDialogContent {
|
|
160
|
+
position: fixed;
|
|
161
|
+
top: 50%;
|
|
162
|
+
left: 50%;
|
|
163
|
+
z-index: 10000;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
width: 450px;
|
|
167
|
+
max-width: calc(100vw - 32px);
|
|
168
|
+
transform: translate(-50%, -50%);
|
|
169
|
+
border-radius: 12px;
|
|
170
|
+
background-color: var(--color-surface, #fff);
|
|
171
|
+
box-shadow:
|
|
172
|
+
0 0 0 0.5px rgba(0, 0, 0, 0.08),
|
|
173
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
|
174
|
+
0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
|
175
|
+
}.LinkDialogContent, :where([data-theme="light"]) .LinkDialogContent {
|
|
176
|
+
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
177
|
+
}:where([data-theme="dark"]) .LinkDialogContent {
|
|
178
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
179
|
+
}.LinkDialogBody {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
gap: 20px;
|
|
183
|
+
padding: 20px;
|
|
184
|
+
}.LinkDialogTitle {
|
|
185
|
+
margin: 0;
|
|
186
|
+
font-size: 18px;
|
|
187
|
+
font-weight: var(--font-weight-semibold);
|
|
188
|
+
line-height: 1.6;
|
|
189
|
+
color: var(--color-text);
|
|
190
|
+
}.LinkDialogFields {
|
|
191
|
+
display: flex;
|
|
192
|
+
flex-direction: column;
|
|
193
|
+
gap: 16px;
|
|
194
|
+
}.LinkDialogField {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: column;
|
|
197
|
+
gap: 6px;
|
|
198
|
+
}.LinkDialogLabel {
|
|
199
|
+
font-size: 14px;
|
|
200
|
+
font-weight: var(--font-weight-semibold);
|
|
201
|
+
line-height: 20px;
|
|
202
|
+
color: var(--color-text);
|
|
203
|
+
}.LinkDialogInput {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
height: 32px;
|
|
207
|
+
padding: 0 12px;
|
|
208
|
+
border: 0;
|
|
209
|
+
border-radius: var(--control-radius-md);
|
|
210
|
+
background: none;
|
|
211
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color) inset;
|
|
212
|
+
color: var(--color-text);
|
|
213
|
+
font-size: 14px;
|
|
214
|
+
font-weight: var(--font-weight-normal);
|
|
215
|
+
line-height: 20px;
|
|
216
|
+
transition-duration: var(--transition-duration-basic);
|
|
217
|
+
transition-property: box-shadow;
|
|
218
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.LinkDialogInput:focus {
|
|
222
|
+
outline: 0;
|
|
223
|
+
box-shadow: 0 0 0 1px var(--input-outline-border-color-focus) inset;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.LinkDialogInput::-moz-placeholder {
|
|
227
|
+
color: var(--input-placeholder-text-color);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.LinkDialogInput::placeholder {
|
|
231
|
+
color: var(--input-placeholder-text-color);
|
|
232
|
+
}.LinkDialogFooter {
|
|
233
|
+
display: flex;
|
|
234
|
+
justify-content: space-between;
|
|
235
|
+
align-items: center;
|
|
236
|
+
padding: 16px 20px;
|
|
237
|
+
}.LinkDialogFooterTrailing {
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
gap: 8px;
|
|
241
|
+
margin-left: auto;
|
|
242
|
+
}.LinkDialogButtonRemove {
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
height: 32px;
|
|
247
|
+
padding: 0 12px;
|
|
248
|
+
border: 0;
|
|
249
|
+
border-radius: var(--control-radius-md);
|
|
250
|
+
background-color: var(--color-background-danger-solid, #dc2626);
|
|
251
|
+
color: #fff;
|
|
252
|
+
cursor: pointer;
|
|
253
|
+
font-size: 14px;
|
|
254
|
+
font-weight: var(--font-weight-medium);
|
|
255
|
+
line-height: 20px;
|
|
256
|
+
transition-duration: var(--transition-duration-basic);
|
|
257
|
+
transition-property: background-color;
|
|
258
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
@media (hover: hover) and (pointer: fine) {.LinkDialogButtonRemove:hover {
|
|
262
|
+
background-color: var(--color-background-danger-solid-hover, #b91c1c);
|
|
263
|
+
}
|
|
264
|
+
}.LinkDialogButtonCancel,
|
|
265
|
+
.LinkDialogButtonSave {
|
|
266
|
+
display: flex;
|
|
267
|
+
align-items: center;
|
|
268
|
+
justify-content: center;
|
|
269
|
+
height: 32px;
|
|
270
|
+
padding: 0 12px;
|
|
271
|
+
border: 0;
|
|
272
|
+
border-radius: var(--control-radius-md);
|
|
273
|
+
cursor: pointer;
|
|
274
|
+
font-size: 14px;
|
|
275
|
+
font-weight: var(--font-weight-medium);
|
|
276
|
+
line-height: 20px;
|
|
277
|
+
transition-duration: var(--transition-duration-basic);
|
|
278
|
+
transition-property: background-color;
|
|
279
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
280
|
+
}.LinkDialogButtonCancel {
|
|
281
|
+
background-color: var(--color-background-primary-soft-alpha, rgba(0, 0, 0, 0.08));
|
|
282
|
+
color: var(--color-text);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (hover: hover) and (pointer: fine) {.LinkDialogButtonCancel:hover {
|
|
286
|
+
background-color: var(--color-background-primary-soft-alpha-hover, rgba(0, 0, 0, 0.12));
|
|
287
|
+
}
|
|
288
|
+
}.LinkDialogButtonSave {
|
|
289
|
+
background-color: var(--color-background-primary-solid, #181818);
|
|
290
|
+
color: var(--color-text-on-primary, #fff);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@media (hover: hover) and (pointer: fine) {.LinkDialogButtonSave:hover {
|
|
294
|
+
background-color: var(--color-background-primary-solid-hover, #333);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
@layer components {.Menu {
|
|
2
|
+
/* Top-level selector needs to exist */
|
|
3
|
+
}.MenuList {
|
|
4
|
+
z-index: 50;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
width: var(--menu-width, auto);
|
|
7
|
+
min-width: var(--menu-min-width, 300px);
|
|
8
|
+
max-width: var(--radix-dropdown-menu-content-available-width);
|
|
9
|
+
max-height: min(
|
|
10
|
+
var(--radix-dropdown-menu-content-available-height),
|
|
11
|
+
var(--menu-max-height, 1200px)
|
|
12
|
+
);
|
|
13
|
+
padding: var(--menu-gutter);
|
|
14
|
+
border-radius: var(--menu-radius);
|
|
15
|
+
background: var(--color-surface-elevated);
|
|
16
|
+
box-shadow: var(--shadow), var(--shadow-hairline);
|
|
17
|
+
color: var(--color-text);
|
|
18
|
+
font-size: var(--menu-font-size);
|
|
19
|
+
line-height: var(--menu-line-height);
|
|
20
|
+
-webkit-overflow-scrolling: touch;
|
|
21
|
+
pointer-events: auto;
|
|
22
|
+
/* The transform-origin computed from the content and arrow positions/offsets */
|
|
23
|
+
transform-origin: var(--radix-dropdown-menu-content-transform-origin);
|
|
24
|
+
will-change: transform;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Animation states applied to a wrapping parent */
|
|
28
|
+
.Menu[data-entering] .MenuList {
|
|
29
|
+
opacity: 0;
|
|
30
|
+
transform: scale(0.95);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.Menu[data-entering-active] .MenuList,
|
|
34
|
+
.Menu[data-entering][data-interrupted] .MenuList {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
transform: scale(1);
|
|
37
|
+
transition-duration: 0.35s;
|
|
38
|
+
transition-property: opacity, transform;
|
|
39
|
+
transition-timing-function: var(--cubic-enter);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.Menu[data-exiting] .MenuList {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transform: scale(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.Menu[data-exiting-active] .MenuList,
|
|
48
|
+
.Menu[data-exiting][data-interrupted] .MenuList {
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transform: scale(0.95);
|
|
51
|
+
transition-duration: 0.2s;
|
|
52
|
+
transition-property: opacity, transform;
|
|
53
|
+
transition-timing-function: var(--cubic-exit);
|
|
54
|
+
}.MenuItemContent {
|
|
55
|
+
padding: var(--menu-item-padding);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Same "item + subtitle" pattern as the pressable item below. */
|
|
59
|
+
.MenuItemContent:has(.ItemDescription) {
|
|
60
|
+
font-weight: var(--font-weight-semibold);
|
|
61
|
+
}.MenuItem {
|
|
62
|
+
position: relative;
|
|
63
|
+
display: block;
|
|
64
|
+
/* Defaults to inherit from pressable wrapper, this container is not flex */
|
|
65
|
+
align-items: center;
|
|
66
|
+
gap: var(--menu-item-gap);
|
|
67
|
+
padding: var(--menu-item-padding);
|
|
68
|
+
color: var(--color-text);
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
-webkit-user-select: none;
|
|
71
|
+
-moz-user-select: none;
|
|
72
|
+
user-select: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* An item with a description keeps its label semibold in every state, so
|
|
76
|
+
consumers never have to remember a className for the "item + subtitle"
|
|
77
|
+
pattern. The description's own rule keeps the second line normal. */
|
|
78
|
+
.MenuItem:has(.ItemDescription) {
|
|
79
|
+
font-weight: var(--font-weight-semibold);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.MenuItem:focus {
|
|
83
|
+
outline: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (hover: hover) and (pointer: fine) {.MenuItem:hover {
|
|
87
|
+
/* Prevent links from changing colors */
|
|
88
|
+
color: var(--color-text);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.MenuItem::before {
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset: 0;
|
|
95
|
+
display: block;
|
|
96
|
+
border-radius: calc(var(--menu-radius) - var(--menu-gutter));
|
|
97
|
+
background: var(--menu-item-background-color);
|
|
98
|
+
content: "";
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: scale(var(--scale, 0.98));
|
|
101
|
+
transition-duration: var(--transition-duration-basic);
|
|
102
|
+
transition-property: opacity, background-color, transform;
|
|
103
|
+
transition-timing-function: var(--cubic-enter);
|
|
104
|
+
will-change: opacity, transform;
|
|
105
|
+
}
|
|
106
|
+
.MenuItem[data-state="open"]::before, .MenuItem[data-highlighted]::before {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
transform: scale(1);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.MenuItem[data-state="open"]:has(.ItemActions:hover)::before, .MenuItem[data-highlighted]:has(.ItemActions:hover)::before {
|
|
112
|
+
opacity: 0.4;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.MenuItem[data-state="open"]:not(:has(.ItemActions:hover)):active::before, .MenuItem[data-highlighted]:not(:has(.ItemActions:hover)):active::before {
|
|
116
|
+
transform: scale(var(--scale, 0.98));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.MenuItem[data-state="open"] .ItemActions, .MenuItem[data-highlighted] .ItemActions {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.MenuItem[data-disabled] {
|
|
124
|
+
cursor: not-allowed;
|
|
125
|
+
opacity: 0.5;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.MenuItem[data-disabled]::before {
|
|
129
|
+
display: none;
|
|
130
|
+
}/* Destructive item (delete, remove, leave): the danger color for the label
|
|
131
|
+
and the highlight; a description keeps its secondary color */.MenuItem[data-danger] {
|
|
132
|
+
--menu-item-background-color: var(--color-background-danger-ghost-hover);
|
|
133
|
+
color: var(--color-text-danger-ghost);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (hover: hover) and (pointer: fine) {.MenuItem[data-danger]:hover {
|
|
137
|
+
color: var(--color-text-danger-ghost-hover);
|
|
138
|
+
}
|
|
139
|
+
}/* Two-line item: label over description, the same anatomy a Select option
|
|
140
|
+
with a description uses (OptionLeading / OptionDescription there). */.ItemLeading {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex: 1;
|
|
143
|
+
min-width: 0;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
}.ItemDescription {
|
|
146
|
+
font-weight: var(--font-weight-normal);
|
|
147
|
+
color: var(--color-text-secondary);
|
|
148
|
+
}.PressableInner {
|
|
149
|
+
position: relative;
|
|
150
|
+
display: flex;
|
|
151
|
+
/* Allow flex settings to be applied to the container, for className ergonomics */
|
|
152
|
+
align-items: inherit;
|
|
153
|
+
justify-content: inherit;
|
|
154
|
+
gap: inherit;
|
|
155
|
+
}.ItemActions {
|
|
156
|
+
/* Prevent adding height to the MenuItem, and horizontally center */
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
height: 0;
|
|
160
|
+
/* Magic number that pulls back the icon an equal gutter from the top/bottom */
|
|
161
|
+
margin-right: -5px;
|
|
162
|
+
opacity: 0;
|
|
163
|
+
transition-duration: var(--transition-duration-basic);
|
|
164
|
+
transition-property: opacity;
|
|
165
|
+
transition-timing-function: var(--cubic-enter);
|
|
166
|
+
}.Separator {
|
|
167
|
+
height: 1px;
|
|
168
|
+
margin: var(--menu-separator-gutter);
|
|
169
|
+
background: var(--menu-separator-background-color);
|
|
170
|
+
}.MenuLabel {
|
|
171
|
+
padding: var(--menu-item-padding);
|
|
172
|
+
padding-bottom: calc(var(--spacing) * 0.5);
|
|
173
|
+
color: var(--color-text-tertiary);
|
|
174
|
+
font-size: var(--font-text-xs-size);
|
|
175
|
+
font-weight: var(--font-weight-semibold);
|
|
176
|
+
line-height: var(--font-text-xs-line-height);
|
|
177
|
+
-webkit-user-select: none;
|
|
178
|
+
-moz-user-select: none;
|
|
179
|
+
user-select: none;
|
|
180
|
+
}.SubMenuItem {
|
|
181
|
+
justify-content: space-between;
|
|
182
|
+
}.SubTriggerIcon {
|
|
183
|
+
/* slight visual offset of svg canvas */
|
|
184
|
+
margin-right: -2px;
|
|
185
|
+
opacity: 0.75;
|
|
186
|
+
transition: opacity var(--transition-duration-basic) var(--transition-ease-basic);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.SubMenuItem[data-state="open"] .SubTriggerIcon,
|
|
190
|
+
.SubMenuItem[data-highlighted] .SubTriggerIcon {
|
|
191
|
+
opacity: 1;
|
|
192
|
+
}.RadioItem {
|
|
193
|
+
gap: calc(var(--spacing) * 2);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
:where([data-indicator-position="end"]) .RadioItem {
|
|
197
|
+
justify-content: space-between;
|
|
198
|
+
gap: calc(var(--spacing) * 3);
|
|
199
|
+
}.RadioIndicatorActive {
|
|
200
|
+
position: relative;
|
|
201
|
+
display: inline-grid;
|
|
202
|
+
align-items: center;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
width: 100%;
|
|
205
|
+
height: 100%;
|
|
206
|
+
|
|
207
|
+
/* Don't play the animation when entering */
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.RadioIndicatorActive::before,
|
|
211
|
+
.RadioIndicatorActive::after {
|
|
212
|
+
display: block;
|
|
213
|
+
content: "";
|
|
214
|
+
grid-column-start: 1;
|
|
215
|
+
grid-row-start: 1;
|
|
216
|
+
place-self: center center;
|
|
217
|
+
will-change: transform;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* Filled circle */
|
|
221
|
+
.RadioIndicatorActive::before {
|
|
222
|
+
width: var(--menu-radio-indicator-size);
|
|
223
|
+
height: var(--menu-radio-indicator-size);
|
|
224
|
+
border-radius: var(--radius-full);
|
|
225
|
+
animation: fade-in 0.4s var(--cubic-enter);
|
|
226
|
+
background-color: var(--radio-group-indicator-background-color);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Empty middle circle */
|
|
230
|
+
.RadioIndicatorActive::after {
|
|
231
|
+
width: var(--menu-radio-indicator-hole-size);
|
|
232
|
+
height: var(--menu-radio-indicator-hole-size);
|
|
233
|
+
border-radius: var(--radius-full);
|
|
234
|
+
animation: scale-in 0.4s var(--cubic-enter);
|
|
235
|
+
background-color: var(--radio-group-indicator-hole-background-color);
|
|
236
|
+
}
|
|
237
|
+
[data-entering] .RadioIndicatorActive::before,
|
|
238
|
+
[data-entering] .RadioIndicatorActive::after {
|
|
239
|
+
animation-duration: 0s;
|
|
240
|
+
}.RadioIndicator {
|
|
241
|
+
position: relative;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: center;
|
|
245
|
+
flex-shrink: 0;
|
|
246
|
+
width: var(--menu-radio-indicator-size);
|
|
247
|
+
height: var(--menu-radio-indicator-size);
|
|
248
|
+
padding: 0;
|
|
249
|
+
border: none;
|
|
250
|
+
border-radius: var(--radius-full);
|
|
251
|
+
background-color: transparent;
|
|
252
|
+
box-shadow: 0 0 0 1px var(--radio-group-indicator-border-color) inset;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
transition-duration: var(--transition-duration-basic);
|
|
255
|
+
transition-property: box-shadow;
|
|
256
|
+
transition-timing-function: var(--transition-ease-basic);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-indicator-position="end"] .RadioIndicator {
|
|
260
|
+
order: 1;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
[data-highlighted] .RadioIndicator {
|
|
264
|
+
box-shadow: 0 0 0 1px var(--radio-group-indicator-border-color-hover) inset;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
[data-disabled] .RadioIndicator {
|
|
268
|
+
cursor: not-allowed;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* Can't be focused here anyway */
|
|
272
|
+
.RadioIndicator:focus {
|
|
273
|
+
outline: none;
|
|
274
|
+
}@keyframes scale-in {
|
|
275
|
+
0% {
|
|
276
|
+
transform: scale(0);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
100% {
|
|
280
|
+
transform: scale(1);
|
|
281
|
+
}
|
|
282
|
+
}@keyframes fade-in {
|
|
283
|
+
0% {
|
|
284
|
+
opacity: 0;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
100% {
|
|
288
|
+
opacity: 1;
|
|
289
|
+
}
|
|
290
|
+
}.CheckboxItem {
|
|
291
|
+
gap: calc(var(--spacing) * 2);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.CheckboxItem:where([data-indicator-position="end"]) {
|
|
295
|
+
justify-content: space-between;
|
|
296
|
+
gap: calc(var(--spacing) * 3);
|
|
297
|
+
}.CheckboxIndicator {
|
|
298
|
+
flex-shrink: 0;
|
|
299
|
+
width: var(--menu-checkbox-indicator-size);
|
|
300
|
+
height: var(--menu-checkbox-indicator-size);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[data-indicator-position="end"] .CheckboxIndicator {
|
|
304
|
+
order: 1;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[data-indicator-variant="solid"] .CheckboxIndicator {
|
|
308
|
+
border-radius: var(--radius-full);
|
|
309
|
+
box-shadow: 0 0 0 1px var(--radio-group-indicator-border-color) inset;
|
|
310
|
+
}.CheckboxCircle {
|
|
311
|
+
position: relative;
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
justify-content: center;
|
|
315
|
+
flex-shrink: 0;
|
|
316
|
+
width: var(--menu-checkbox-indicator-size);
|
|
317
|
+
height: var(--menu-checkbox-indicator-size);
|
|
318
|
+
border-radius: var(--radius-full);
|
|
319
|
+
animation: fade-in 0.5s var(--cubic-enter);
|
|
320
|
+
background-color: var(--radio-group-indicator-background-color);
|
|
321
|
+
color: var(--radio-group-indicator-hole-background-color);
|
|
322
|
+
|
|
323
|
+
/* Don't play the animation when entering */
|
|
324
|
+
}
|
|
325
|
+
[data-entering] .CheckboxCircle::before,
|
|
326
|
+
[data-entering] .CheckboxCircle::after {
|
|
327
|
+
animation-duration: 0s;
|
|
328
|
+
}.MenuList[data-layout="horizontal"] {
|
|
329
|
+
--h-icon-size: 20px;
|
|
330
|
+
--h-padding: calc(var(--spacing) * 2);
|
|
331
|
+
--h-gap: calc(var(--spacing) * 1);
|
|
332
|
+
|
|
333
|
+
display: flex;
|
|
334
|
+
flex-direction: row;
|
|
335
|
+
min-width: auto;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.MenuList[data-layout="horizontal"][data-size="sm"] {
|
|
339
|
+
--h-icon-size: 16px;
|
|
340
|
+
--h-padding: calc(var(--spacing) * 1.5);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.MenuList[data-layout="horizontal"][data-size="lg"] {
|
|
344
|
+
--h-icon-size: 24px;
|
|
345
|
+
--h-padding: calc(var(--spacing) * 2.5);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.MenuList[data-layout="horizontal"] .MenuItem {
|
|
349
|
+
flex: 1 0 auto;
|
|
350
|
+
flex-direction: column;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
gap: var(--h-gap);
|
|
354
|
+
padding: var(--h-padding);
|
|
355
|
+
text-align: center;
|
|
356
|
+
font-size: var(--h-icon-size);
|
|
357
|
+
line-height: 1;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.MenuList[data-layout="horizontal"] .PressableInner {
|
|
361
|
+
flex-direction: column;
|
|
362
|
+
align-items: center;
|
|
363
|
+
gap: var(--h-gap);
|
|
364
|
+
font-size: var(--font-text-2xs-size);
|
|
365
|
+
line-height: var(--font-text-2xs-line-height);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.MenuList[data-layout="horizontal"] .PressableInner > svg {
|
|
369
|
+
font-size: var(--h-icon-size);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.MenuList[data-layout="horizontal"] .MenuItemContent {
|
|
373
|
+
flex-direction: column;
|
|
374
|
+
align-items: center;
|
|
375
|
+
gap: var(--h-gap);
|
|
376
|
+
padding: var(--h-padding);
|
|
377
|
+
text-align: center;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.MenuList[data-layout="horizontal"] .Separator {
|
|
381
|
+
width: 1px;
|
|
382
|
+
height: auto;
|
|
383
|
+
align-self: stretch;
|
|
384
|
+
margin: calc(var(--spacing) * 1) 0;
|
|
385
|
+
}
|
|
386
|
+
}
|