@rcarls/rc-theme-material 0.0.0-next-20260921045401

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +423 -0
  2. package/README.md +164 -0
  3. package/bridge.css +678 -0
  4. package/components/accordion.css +20 -0
  5. package/components/adaptive-menu.css +162 -0
  6. package/components/app-bar.css +100 -0
  7. package/components/bottom-sheet.css +135 -0
  8. package/components/button.css +270 -0
  9. package/components/card.css +61 -0
  10. package/components/carousel.css +23 -0
  11. package/components/chip-group.css +15 -0
  12. package/components/chip.css +39 -0
  13. package/components/combobox.css +155 -0
  14. package/components/dialog.css +86 -0
  15. package/components/disclosure.css +104 -0
  16. package/components/fab-menu.css +85 -0
  17. package/components/fab.css +51 -0
  18. package/components/field.css +378 -0
  19. package/components/icons.css +52 -0
  20. package/components/list-item.css +146 -0
  21. package/components/listbox.css +47 -0
  22. package/components/markdown-editor.css +72 -0
  23. package/components/menu-button.css +126 -0
  24. package/components/menu.css +147 -0
  25. package/components/menubar.css +27 -0
  26. package/components/modes.css +50 -0
  27. package/components/navigation-bar.css +76 -0
  28. package/components/navigation-rail.css +132 -0
  29. package/components/progress.css +15 -0
  30. package/components/range-slider.css +29 -0
  31. package/components/scroller.css +7 -0
  32. package/components/search-bar.css +58 -0
  33. package/components/segmented-button.css +19 -0
  34. package/components/select.css +197 -0
  35. package/components/slider.css +19 -0
  36. package/components/snackbar.css +23 -0
  37. package/components/splitter.css +35 -0
  38. package/components/switch.css +41 -0
  39. package/components/textarea.css +31 -0
  40. package/components/toolbar.css +32 -0
  41. package/components/transfer-list.css +70 -0
  42. package/components/virtual-canvas.css +16 -0
  43. package/components.css +42 -0
  44. package/constraints/material.json +99 -0
  45. package/defaults.css +1081 -0
  46. package/package.json +53 -0
  47. package/state-layer.css +35 -0
  48. package/theme.css +3 -0
@@ -0,0 +1,378 @@
1
+ @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field {
3
+ display: inline-block;
4
+ inline-size: min(100%, 28rem);
5
+ --_rc-field-input-line-height: max(var(--md-sys-typescale-body-large-line-height, 1.5rem), 1em);
6
+ --_rc-field-label-line-height: max(var(--md-sys-typescale-body-small-line-height, 1rem), 1em);
7
+ --rc-field-min-block-size: max(
8
+ 3.5em,
9
+ calc(var(--_rc-field-label-line-height) + var(--_rc-field-input-line-height))
10
+ );
11
+ --rc-field-gap: 0.75rem;
12
+ --rc-field-padding: 0 1rem;
13
+ --rc-field-border: 0;
14
+ --rc-field-radius: var(--md-filled-text-field-container-shape, 0.25rem 0.25rem 0 0);
15
+ --rc-field-background: var(
16
+ --md-filled-text-field-container-color,
17
+ var(--md-sys-color-surface-container-highest, Field)
18
+ );
19
+ --rc-field-color: var(
20
+ --md-filled-text-field-input-text-color,
21
+ var(--md-sys-color-on-surface, FieldText)
22
+ );
23
+ --rc-field-label-color: var(
24
+ --md-filled-text-field-label-text-color,
25
+ var(--md-sys-color-on-surface-variant, GrayText)
26
+ );
27
+ --rc-field-error-color: var(
28
+ --md-filled-text-field-error-focus-label-text-color,
29
+ var(--md-sys-color-error, red)
30
+ );
31
+ --rc-field-disabled-opacity: 1;
32
+ --rc-field-focus-outline: 0;
33
+ --rc-field-supporting-color: var(--md-sys-color-on-surface-variant, GrayText);
34
+ --rc-field-supporting-font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
35
+ }
36
+
37
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(field) {
38
+ position: relative;
39
+ border-block-end: 1px solid
40
+ var(
41
+ --md-filled-text-field-active-indicator-color,
42
+ var(--md-sys-color-on-surface-variant, GrayText)
43
+ );
44
+ font-family: var(--md-sys-typescale-body-large-font, inherit);
45
+ font-size: var(--md-sys-typescale-body-large-size, 1rem);
46
+ line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
47
+ }
48
+
49
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(field)::after {
50
+ position: absolute;
51
+ inset-inline: 0;
52
+ inset-block-end: -1px;
53
+ block-size: 2px;
54
+ background: var(--md-sys-color-primary, Highlight);
55
+ content: '';
56
+ transform: scaleX(0);
57
+ transform-origin: center;
58
+ }
59
+
60
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(content) {
61
+ position: relative;
62
+ justify-content: center;
63
+ }
64
+
65
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(label) {
66
+ position: absolute;
67
+ z-index: 1;
68
+ inset-inline-start: 0;
69
+ inset-block-start: 50%;
70
+ max-inline-size: 100%;
71
+ overflow: hidden;
72
+ font-family: var(--md-sys-typescale-body-large-font, inherit);
73
+ font-size: var(--md-sys-typescale-body-large-size, 1rem);
74
+ line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
75
+ text-overflow: ellipsis;
76
+ white-space: nowrap;
77
+ pointer-events: none;
78
+ transform: translateY(-50%);
79
+ transform-origin: left top;
80
+ }
81
+
82
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-focused]::part(label),
83
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-populated]::part(label),
84
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-multiline]::part(label) {
85
+ inset-block-start: 0;
86
+ font-family: var(--md-sys-typescale-body-small-font, inherit);
87
+ font-size: var(--md-sys-typescale-body-small-size, 0.75rem);
88
+ line-height: var(--md-sys-typescale-body-small-line-height, 1rem);
89
+ transform: translateY(0);
90
+ }
91
+
92
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-has-label]::part(control) {
93
+ min-block-size: var(--_rc-field-input-line-height);
94
+ padding-block-start: var(--_rc-field-label-line-height);
95
+ }
96
+
97
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(control) {
98
+ min-block-size: var(--_rc-field-input-line-height);
99
+ }
100
+
101
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-multiline]::part(content) {
102
+ padding-block: 0.5rem;
103
+ }
104
+
105
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-multiline]::part(label) {
106
+ inset-block-start: 0.5rem;
107
+ }
108
+
109
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-multiline]::part(control) {
110
+ align-items: flex-start;
111
+ }
112
+
113
+ :where(.rc-theme-material, :host(.rc-theme-material))
114
+ rc-field[data-multiline][data-has-label]::part(control) {
115
+ padding-block-start: var(--_rc-field-label-line-height);
116
+ }
117
+
118
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field > input,
119
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field > textarea {
120
+ caret-color: var(--md-sys-color-primary, Highlight);
121
+ }
122
+
123
+ :where(.rc-theme-material, :host(.rc-theme-material))
124
+ rc-field
125
+ > rc-textarea[data-rc-field-control] {
126
+ --rc-textarea-border: 0;
127
+ --rc-textarea-border-radius: 0;
128
+ --rc-textarea-background: transparent;
129
+ --rc-textarea-gutter-bg: transparent;
130
+ --rc-textarea-focus-outline: 0;
131
+ inline-size: 100%;
132
+ }
133
+
134
+ :where(.rc-theme-material, :host(.rc-theme-material))
135
+ rc-field
136
+ > rc-select[data-rc-field-control] {
137
+ --rc-select-control-block-size: var(--md-sys-typescale-body-large-line-height, 1.5rem);
138
+ --rc-select-border: 0;
139
+ --rc-select-radius: 0;
140
+ --rc-field: transparent;
141
+ inline-size: 100%;
142
+ }
143
+
144
+ /*
145
+ * rc-select's own hover/focus-visible/open chrome is hardcoded border-color and
146
+ * box-shadow, not resettable custom properties like the resting border above, so a
147
+ * more specific selector is the only way to suppress it once rc-field's own #field
148
+ * surface owns that visual instead.
149
+ */
150
+ :where(.rc-theme-material, :host(.rc-theme-material))
151
+ rc-field
152
+ > rc-select[data-rc-field-control]::part(trigger):hover,
153
+ :where(.rc-theme-material, :host(.rc-theme-material))
154
+ rc-field
155
+ > rc-select[data-rc-field-control]::part(trigger):focus-visible,
156
+ :where(.rc-theme-material, :host(.rc-theme-material))
157
+ rc-field
158
+ > rc-select[data-rc-field-control]::part(trigger)[aria-expanded='true'] {
159
+ border-color: transparent;
160
+ background: transparent;
161
+ box-shadow: none;
162
+ }
163
+
164
+ :where(.rc-theme-material, :host(.rc-theme-material))
165
+ rc-field
166
+ > rc-combobox[data-rc-field-control] {
167
+ --rc-combobox-control-block-size: var(--md-sys-typescale-body-large-line-height, 1.5rem);
168
+ --rc-combobox-border: 0;
169
+ --rc-combobox-radius: 0;
170
+ --rc-chip-touch-target-overlap-block-start: 0.5rem;
171
+ --rc-chip-touch-target-overlap-block-end: 0.5rem;
172
+ --rc-field: transparent;
173
+ inline-size: 100%;
174
+ }
175
+
176
+ :where(.rc-theme-material, :host(.rc-theme-material))
177
+ rc-field
178
+ > rc-combobox[data-rc-field-control]::part(anchor):hover,
179
+ :where(.rc-theme-material, :host(.rc-theme-material))
180
+ rc-field
181
+ > rc-combobox[data-rc-field-control]::part(anchor):focus-within {
182
+ border-color: transparent;
183
+ background: transparent;
184
+ box-shadow: none;
185
+ }
186
+
187
+ :where(.rc-theme-material, :host(.rc-theme-material))
188
+ rc-field
189
+ rc-combobox[data-rc-field-control]::part(input) {
190
+ caret-color: var(--md-sys-color-primary, Highlight);
191
+ }
192
+
193
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-control-provider] {
194
+ --rc-field-padding: 0;
195
+ }
196
+
197
+ :where(.rc-theme-material, :host(.rc-theme-material))
198
+ rc-field[data-control-provider]::part(label) {
199
+ inset-inline-start: 1rem;
200
+ }
201
+
202
+ :where(.rc-theme-material, :host(.rc-theme-material))
203
+ rc-field[data-control-provider]::part(trailing) {
204
+ margin-inline-end: 1rem;
205
+ }
206
+
207
+ :where(.rc-theme-material, :host(.rc-theme-material))
208
+ rc-field[data-control-provider][data-multiline]::part(content) {
209
+ /*
210
+ * A single-line field's label gets its resting space above the field's
211
+ * top edge for free: #field centers content within its own taller
212
+ * min-block-size. A multiline control-provider's content fills #field's
213
+ * whole height instead, so there's no leftover space to center into.
214
+ * Padding here wouldn't reach the label: an absolutely positioned
215
+ * child's containing block is the padding EDGE (the border/padding
216
+ * boundary), not the content edge, so an ancestor's own padding only
217
+ * moves its in-flow children (the control), never an abspos one. Margin
218
+ * moves the ancestor's own box instead, carrying both children down
219
+ * together and reproducing the single-line field's free top space.
220
+ * padding-block is reset to 0 here too: the general [data-multiline]
221
+ * rule above would otherwise still apply its own 0.5rem, additionally
222
+ * shifting only the in-flow control and pulling it out of alignment
223
+ * with the label again.
224
+ */
225
+ padding-block: 0;
226
+ margin-block-start: 0.5rem;
227
+ }
228
+
229
+ :where(.rc-theme-material, :host(.rc-theme-material))
230
+ rc-field[data-has-label]:not([data-focused]):not([data-populated])
231
+ > input::placeholder,
232
+ :where(.rc-theme-material, :host(.rc-theme-material))
233
+ rc-field[data-has-label]:not([data-focused]):not([data-populated])
234
+ > textarea::placeholder {
235
+ color: transparent;
236
+ }
237
+
238
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field:hover::part(field) {
239
+ border-block-end-color: var(--md-sys-color-on-surface, CanvasText);
240
+ background: color-mix(
241
+ in srgb,
242
+ var(--md-sys-color-on-surface, CanvasText) 4%,
243
+ var(--md-filled-text-field-container-color, var(--md-sys-color-surface-container-highest))
244
+ );
245
+ }
246
+
247
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-focused]::part(field)::after {
248
+ transform: scaleX(1);
249
+ }
250
+
251
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-focused]::part(label) {
252
+ color: var(--md-sys-color-primary, Highlight);
253
+ }
254
+
255
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-invalid]::part(field) {
256
+ border-block-end-color: var(--md-sys-color-error, red);
257
+ }
258
+
259
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-invalid]::part(field)::after {
260
+ background: var(--md-sys-color-error, red);
261
+ }
262
+
263
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-invalid]::part(label) {
264
+ color: var(--md-sys-color-error, red);
265
+ }
266
+
267
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-disabled]::part(field) {
268
+ border-block-end-color: color-mix(
269
+ in srgb,
270
+ var(--md-sys-color-on-surface, CanvasText) 38%,
271
+ transparent
272
+ );
273
+ background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 4%, transparent);
274
+ color: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 38%, transparent);
275
+ }
276
+
277
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field[data-disabled]::part(label),
278
+ :where(.rc-theme-material, :host(.rc-theme-material))
279
+ rc-field[data-disabled]::part(supporting-text) {
280
+ color: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 38%, transparent);
281
+ }
282
+
283
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field.rc-field--outlined {
284
+ --rc-field-min-block-size: max(3.5em, calc(var(--_rc-field-input-line-height) + 2em));
285
+ --rc-field-background: transparent;
286
+ --rc-field-radius: var(
287
+ --md-outlined-text-field-container-shape,
288
+ var(--md-sys-shape-corner-extra-small, 0.25rem)
289
+ );
290
+ }
291
+
292
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field.rc-field--outlined::part(field) {
293
+ border: 1px solid
294
+ var(--md-outlined-text-field-outline-color, var(--md-sys-color-outline, ButtonBorder));
295
+ }
296
+
297
+ :where(.rc-theme-material, :host(.rc-theme-material))
298
+ rc-field.rc-field--outlined::part(field)::after {
299
+ inset: -1px;
300
+ block-size: auto;
301
+ border: 2px solid var(--md-sys-color-primary, Highlight);
302
+ border-radius: inherit;
303
+ background: transparent;
304
+ transform: none;
305
+ opacity: 0;
306
+ pointer-events: none;
307
+ }
308
+
309
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field.rc-field--outlined::part(label) {
310
+ inset-block-start: 50%;
311
+ padding-inline: 0.25rem;
312
+ background: var(--md-sys-color-surface, Canvas);
313
+ transform: translate(-0.25rem, -50%);
314
+ }
315
+
316
+ :where(.rc-theme-material, :host(.rc-theme-material))
317
+ rc-field.rc-field--outlined[data-focused]::part(label),
318
+ :where(.rc-theme-material, :host(.rc-theme-material))
319
+ rc-field.rc-field--outlined[data-populated]::part(label),
320
+ :where(.rc-theme-material, :host(.rc-theme-material))
321
+ rc-field.rc-field--outlined[data-multiline]::part(label) {
322
+ inset-block-start: 0;
323
+ transform: translate(-0.25rem, -50%);
324
+ }
325
+
326
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field.rc-field--outlined::part(control) {
327
+ padding-block-start: 0;
328
+ }
329
+
330
+ :where(.rc-theme-material, :host(.rc-theme-material))
331
+ rc-field.rc-field--outlined[data-focused]::part(field)::after {
332
+ opacity: 1;
333
+ }
334
+
335
+ :where(.rc-theme-material, :host(.rc-theme-material))
336
+ rc-field.rc-field--outlined[data-invalid]::part(field),
337
+ :where(.rc-theme-material, :host(.rc-theme-material))
338
+ rc-field.rc-field--outlined[data-invalid]::part(field)::after {
339
+ border-color: var(--md-sys-color-error, red);
340
+ }
341
+
342
+ @media (prefers-reduced-motion: no-preference) {
343
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(field),
344
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(label),
345
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(field)::after {
346
+ /*
347
+ * inset-block-start and font-size move the label's box (the floating
348
+ * label crossing from placeholder position to the shrunk caption
349
+ * position), which is spatial motion, not effects, even though it was
350
+ * previously grouped with the color/opacity properties around it. The
351
+ * full transform-based label rewrite is tracked separately.
352
+ */
353
+ transition:
354
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
355
+ var(--rc-motion-effects-easing-default, ease),
356
+ border-color var(--rc-motion-effects-duration-fast, 150ms)
357
+ var(--rc-motion-effects-easing-default, ease),
358
+ color var(--rc-motion-effects-duration-fast, 150ms)
359
+ var(--rc-motion-effects-easing-default, ease),
360
+ inset-block-start var(--rc-motion-spatial-duration-fast, 300ms)
361
+ var(--rc-motion-spatial-easing-fast, ease),
362
+ font-size var(--rc-motion-spatial-duration-fast, 300ms)
363
+ var(--rc-motion-spatial-easing-fast, ease),
364
+ line-height var(--rc-motion-effects-duration-fast, 150ms)
365
+ var(--rc-motion-effects-easing-default, ease),
366
+ opacity var(--rc-motion-effects-duration-fast, 150ms)
367
+ var(--rc-motion-effects-easing-default, ease),
368
+ transform var(--rc-motion-spatial-duration-fast, 300ms)
369
+ var(--rc-motion-spatial-easing-fast, ease);
370
+ }
371
+ }
372
+
373
+ @media (forced-colors: active) {
374
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-field::part(field) {
375
+ forced-color-adjust: auto;
376
+ }
377
+ }
378
+ }
@@ -0,0 +1,52 @@
1
+ @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material))
3
+ :where([data-rc-icon], [data-rc-navigation-icon]) {
4
+ display: inline-grid;
5
+ place-items: center;
6
+ font-size: var(--rc-icon-font-size, 1.5rem);
7
+ /*
8
+ * Unlayered icon-font boilerplate otherwise beats this layered theme rule.
9
+ * Keep the geometry invariant important, but let consumers opt out by
10
+ * overriding the normally-cascaded custom property.
11
+ */
12
+ line-height: var(--rc-icon-font-line-height, var(--rc-icon-font-size, 1.5rem)) !important;
13
+ }
14
+
15
+ :where(.rc-theme-material, :host(.rc-theme-material))
16
+ :where([data-rc-button-icon], [data-rc-button-selected-icon], [data-rc-chip-icon]) {
17
+ display: inline-grid;
18
+ place-items: center;
19
+ font-size: var(--rc-compact-icon-font-size, 1.125rem);
20
+ line-height: var(
21
+ --rc-compact-icon-font-line-height,
22
+ var(--rc-compact-icon-font-size, 1.125rem)
23
+ ) !important;
24
+ }
25
+
26
+ :where(.rc-theme-material, :host(.rc-theme-material))
27
+ rc-button[icon-only]
28
+ :where([data-rc-button-icon], [data-rc-button-selected-icon]) {
29
+ font-size: var(--rc-icon-button-icon-font-size, 1.5rem);
30
+ line-height: var(--rc-icon-button-icon-font-size, 1.5rem) !important;
31
+ }
32
+
33
+ /*
34
+ * An icon-only button's marker attributes (above) are an opt-in contract:
35
+ * a consumer's icon element has to know to carry `data-rc-button-icon`.
36
+ * When it doesn't (an <svg>, an <iconify-icon>, and similar),
37
+ * that icon would otherwise silently inherit the button's label font-size
38
+ * instead of the icon-button icon size. rc-button only sets `icon-only`
39
+ * once it classifies the native button as icon-having and label-less, so
40
+ * its direct children are icon content unless a responsive composition
41
+ * exposes an authored `[data-rc-menu-label]`; size every other direct
42
+ * child as an icon. The explicit marker rule above still matters for an
43
+ * icon nested one level deeper than a direct child.
44
+ */
45
+ :where(.rc-theme-material, :host(.rc-theme-material))
46
+ rc-button[icon-only]
47
+ > button
48
+ > :not([data-rc-menu-label]) {
49
+ font-size: var(--rc-icon-button-icon-font-size, 1.5rem);
50
+ line-height: var(--rc-icon-button-icon-font-size, 1.5rem) !important;
51
+ }
52
+ }
@@ -0,0 +1,146 @@
1
+ @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material)) {
3
+ /* Compatibility tokens retained for rc-listbox and embedded selectors. */
4
+ --rc-list-item-gap: 1rem;
5
+ --rc-list-item-min-block-size: 3rem;
6
+ --rc-list-item-padding-block: 0;
7
+ --rc-list-item-padding-inline: 1rem;
8
+ --rc-list-item-hover-bg: color-mix(
9
+ in srgb,
10
+ var(--md-sys-color-on-surface, CanvasText)
11
+ calc(var(--md-sys-state-hover-state-layer-opacity, 0.08) * 100%),
12
+ transparent
13
+ );
14
+ --rc-list-item-active-bg: color-mix(
15
+ in srgb,
16
+ var(--md-sys-color-on-surface, CanvasText)
17
+ calc(var(--md-sys-state-pressed-state-layer-opacity, 0.12) * 100%),
18
+ transparent
19
+ );
20
+ --rc-list-item-selected-bg: var(--md-sys-color-secondary-container, Highlight);
21
+ --rc-list-item-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
22
+ --rc-list-item-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
23
+ }
24
+
25
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-list {
26
+ --rc-list-padding-inline: 1rem;
27
+ --rc-list-leading-gap: 1rem;
28
+ --rc-list-trailing-gap: 1rem;
29
+ --rc-list-row-gap: 0;
30
+ --rc-list-item-min-block-size: 3.5rem;
31
+ --rc-list-item-padding-block: 0.5rem;
32
+ --rc-list-item-color: var(--md-sys-color-on-surface, CanvasText);
33
+ --rc-list-item-background: transparent;
34
+ --rc-list-item-border-radius: 0;
35
+ --rc-list-item-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
36
+ --rc-list-item-selected-background: var(--md-sys-color-secondary-container, Highlight);
37
+ --rc-list-item-divider: 1px solid var(--md-sys-color-outline-variant, GrayText);
38
+ --rc-list-item-state-layer-color: var(--md-sys-color-on-surface, CanvasText);
39
+ --rc-list-item-hover-state-layer-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
40
+ --rc-list-item-focus-state-layer-opacity: var(--md-sys-state-focus-state-layer-opacity, 0.1);
41
+ --rc-list-item-pressed-state-layer-opacity: var(
42
+ --md-sys-state-pressed-state-layer-opacity,
43
+ 0.12
44
+ );
45
+ --rc-list-item-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
46
+ --rc-list-item-transition-duration: var(--rc-motion-effects-duration-fast, 150ms);
47
+ --rc-list-item-transition-easing: var(--md-sys-motion-easing-standard, ease);
48
+ }
49
+
50
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-list[variant='segmented'] {
51
+ --rc-list-row-gap: 0.125rem;
52
+ }
53
+
54
+ /* Dividers separate visible rows; they do not trail the final row. */
55
+ :where(.rc-theme-material, :host(.rc-theme-material))
56
+ rc-list
57
+ > rc-list-item:is([data-rc-list-position='last'], [data-rc-list-position='only']) {
58
+ --rc-list-item-divider: 0;
59
+ }
60
+
61
+ :where(.rc-theme-material, :host(.rc-theme-material))
62
+ rc-list[variant='segmented']
63
+ > rc-list-item {
64
+ --rc-list-item-min-block-size: 3.5rem;
65
+ --rc-list-item-padding-block: 0.625rem;
66
+ --rc-list-item-background: var(--md-sys-color-surface-container-low, Canvas);
67
+ --rc-list-item-divider: 0;
68
+ --rc-list-item-border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
69
+ }
70
+
71
+ :where(.rc-theme-material, :host(.rc-theme-material))
72
+ rc-list[variant='segmented']
73
+ > rc-list-item[data-rc-list-position='only'] {
74
+ --rc-list-item-border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
75
+ }
76
+
77
+ :where(.rc-theme-material, :host(.rc-theme-material))
78
+ rc-list[variant='segmented']
79
+ > rc-list-item[data-rc-list-position='first'] {
80
+ --rc-list-item-border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem)
81
+ var(--md-sys-shape-corner-extra-large, 1.75rem)
82
+ var(--md-sys-shape-corner-extra-small, 0.25rem)
83
+ var(--md-sys-shape-corner-extra-small, 0.25rem);
84
+ }
85
+
86
+ :where(.rc-theme-material, :host(.rc-theme-material))
87
+ rc-list[variant='segmented']
88
+ > rc-list-item[data-rc-list-position='last'] {
89
+ --rc-list-item-border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem)
90
+ var(--md-sys-shape-corner-extra-small, 0.25rem)
91
+ var(--md-sys-shape-corner-extra-large, 1.75rem)
92
+ var(--md-sys-shape-corner-extra-large, 1.75rem);
93
+ }
94
+
95
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-list-item::part(content) {
96
+ font-family: var(--md-sys-typescale-body-large-font, inherit);
97
+ font-size: var(--md-sys-typescale-body-large-size, 1rem);
98
+ font-weight: var(--md-sys-typescale-body-large-weight, 400);
99
+ line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
100
+ }
101
+
102
+ :where(.rc-theme-material, :host(.rc-theme-material))
103
+ rc-list-item
104
+ > :where([data-rc-list-supporting], small) {
105
+ display: block;
106
+ color: var(--md-sys-color-on-surface-variant, CanvasText);
107
+ font-family: var(--md-sys-typescale-body-medium-font, inherit);
108
+ font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
109
+ font-weight: var(--md-sys-typescale-body-medium-weight, 400);
110
+ line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem);
111
+ }
112
+
113
+ :where(.rc-theme-material, :host(.rc-theme-material))
114
+ rc-list-item
115
+ > [slot='leading'][data-rc-list-leading] {
116
+ display: inline-flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ inline-size: 1.5rem;
120
+ block-size: 1.5rem;
121
+ font-size: 1.5rem;
122
+ line-height: 1.5rem;
123
+ }
124
+
125
+ :where(.rc-theme-material, :host(.rc-theme-material))
126
+ rc-list-item
127
+ > :is(input[type='checkbox'], input[type='radio'])[slot='leading'] {
128
+ inline-size: 1.125rem;
129
+ block-size: 1.125rem;
130
+ margin: 0;
131
+ accent-color: var(--md-sys-color-primary, Highlight);
132
+ }
133
+
134
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-listbox,
135
+ :where(.rc-theme-material, :host(.rc-theme-material)) [part~='listbox'] {
136
+ --rc-listbox-option-gap: var(--rc-list-item-gap);
137
+ --rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size);
138
+ --rc-listbox-option-padding-block: var(--rc-list-item-padding-block);
139
+ --rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline);
140
+ --rc-listbox-hover-bg: var(--rc-list-item-hover-bg);
141
+ --rc-listbox-active-bg: var(--rc-list-item-active-bg);
142
+ --rc-listbox-selected-bg: var(--rc-list-item-selected-bg);
143
+ --rc-listbox-selected-color: var(--rc-list-item-selected-color);
144
+ --rc-listbox-disabled-opacity: var(--rc-list-item-disabled-opacity);
145
+ }
146
+ }
@@ -0,0 +1,47 @@
1
+ @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-listbox {
3
+ display: block;
4
+ background: var(--md-sys-color-surface-container, Canvas);
5
+ border-radius: 4px;
6
+ box-shadow:
7
+ 0 1px 2px rgba(0, 0, 0, 0.3),
8
+ 0 2px 6px 2px rgba(0, 0, 0, 0.15);
9
+ padding-block: 0.5rem;
10
+ overflow-y: auto;
11
+ color: var(--md-sys-color-on-surface, CanvasText);
12
+ font-family: var(--md-sys-typescale-body-large-font, inherit);
13
+ font-size: var(--md-sys-typescale-body-large-size, 1rem);
14
+ line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
15
+ --rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
16
+ --rc-listbox-option-min-block-size: 3rem;
17
+ --rc-listbox-option-padding-block: 0;
18
+ --rc-listbox-option-padding-inline: 0.75rem;
19
+ --rc-listbox-option-transition:
20
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
21
+ var(--rc-motion-effects-easing-fast, ease),
22
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
23
+ --rc-listbox-hover-bg: color-mix(
24
+ in srgb,
25
+ var(--md-sys-color-on-surface, CanvasText) 8%,
26
+ transparent
27
+ );
28
+ --rc-listbox-hover-color: var(--md-sys-color-on-surface, CanvasText);
29
+ --rc-listbox-active-bg: color-mix(
30
+ in srgb,
31
+ var(--md-sys-color-on-surface, CanvasText) 12%,
32
+ transparent
33
+ );
34
+ --rc-listbox-active-color: var(--md-sys-color-on-surface, CanvasText);
35
+ --rc-listbox-selected-bg: var(--md-sys-color-secondary-container, Highlight);
36
+ --rc-listbox-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
37
+ --rc-listbox-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
38
+ }
39
+
40
+ :where(.rc-theme-material, :host(.rc-theme-material))
41
+ rc-listbox[checkmark]
42
+ [part~='option-checkmark'] {
43
+ inline-size: 1.5rem;
44
+ flex-shrink: 0;
45
+ text-align: center;
46
+ }
47
+ }