@rcarls/rc-theme-substrate 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.
- package/CHANGELOG.md +358 -0
- package/README.md +79 -0
- package/bridge.css +204 -0
- package/components/accordion.css +18 -0
- package/components/adaptive-menu.css +43 -0
- package/components/app-bar.css +21 -0
- package/components/bottom-sheet.css +90 -0
- package/components/button.css +44 -0
- package/components/card.css +51 -0
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/chip.css +20 -0
- package/components/combobox.css +55 -0
- package/components/dialog.css +43 -0
- package/components/disclosure.css +114 -0
- package/components/fab-menu.css +36 -0
- package/components/fab.css +44 -0
- package/components/field.css +136 -0
- package/components/icons.css +19 -0
- package/components/list-item.css +70 -0
- package/components/listbox.css +28 -0
- package/components/markdown-editor.css +53 -0
- package/components/menu-button.css +18 -0
- package/components/menu.css +23 -0
- package/components/menubar.css +17 -0
- package/components/modes.css +60 -0
- package/components/navigation-bar.css +43 -0
- package/components/navigation-rail.css +72 -0
- package/components/progress.css +11 -0
- package/components/range-slider.css +18 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +30 -0
- package/components/segmented-button.css +19 -0
- package/components/select.css +74 -0
- package/components/slider.css +10 -0
- package/components/snackbar.css +23 -0
- package/components/splitter.css +39 -0
- package/components/switch.css +28 -0
- package/components/textarea.css +20 -0
- package/components/toolbar.css +36 -0
- package/components/transfer-list.css +30 -0
- package/components/virtual-canvas.css +18 -0
- package/components.css +41 -0
- package/defaults.css +108 -0
- package/package.json +44 -0
- package/theme.css +3 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* rc-field already owns its own layout, invalid border, disabled opacity,
|
|
4
|
+
* focus outline, and forced-colors fallbacks, and it resets the slotted
|
|
5
|
+
* native control's chrome itself. Substrate only supplies its palette and
|
|
6
|
+
* the hover/focus polish its other form controls share, so the field reads
|
|
7
|
+
* as one of them rather than as a separate idiom.
|
|
8
|
+
*/
|
|
9
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field {
|
|
10
|
+
/*
|
|
11
|
+
* The component is inline-block, so an unsized field shrink-wraps to its
|
|
12
|
+
* content: a provider-backed field with no value collapses to its chevron.
|
|
13
|
+
* Fill the container instead, capped so a field in a wide layout stays a
|
|
14
|
+
* readable measure.
|
|
15
|
+
*/
|
|
16
|
+
display: inline-block;
|
|
17
|
+
inline-size: min(100%, 28rem);
|
|
18
|
+
--rc-field-background: var(--substrate-field, Field);
|
|
19
|
+
--rc-field-color: var(--rc-field-text, FieldText);
|
|
20
|
+
--rc-field-border: var(--rc-border, 1px solid ButtonBorder);
|
|
21
|
+
--rc-field-radius: var(--rc-control-radius, 0.5rem);
|
|
22
|
+
--rc-field-min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
23
|
+
--rc-field-padding: var(--rc-control-padding-block, 0.5rem)
|
|
24
|
+
var(--rc-control-padding-inline, 0.75rem);
|
|
25
|
+
--rc-field-control-gap: var(--substrate-control-gap, 0.5rem);
|
|
26
|
+
--rc-field-label-color: var(--substrate-on-surface-muted, GrayText);
|
|
27
|
+
--rc-field-error-color: var(--substrate-error, red);
|
|
28
|
+
--rc-field-supporting-color: var(--substrate-on-surface-muted, GrayText);
|
|
29
|
+
--rc-field-supporting-font-size: 0.8125rem;
|
|
30
|
+
--rc-field-supporting-padding-block-start: 0.25rem;
|
|
31
|
+
--rc-field-focus-outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
32
|
+
--rc-field-focus-outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
33
|
+
--rc-field-disabled-opacity: var(--rc-disabled-opacity, 0.52);
|
|
34
|
+
font-family: var(--rc-font-family, inherit);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field::part(field) {
|
|
38
|
+
transition:
|
|
39
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
40
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Same hover and focus treatment rc-select, rc-combobox, and rc-textarea use. */
|
|
44
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field:hover::part(field) {
|
|
45
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field[data-focused]::part(field) {
|
|
49
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field[data-invalid]::part(label) {
|
|
53
|
+
color: var(--rc-field-error-color, red);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
57
|
+
rc-field[data-invalid]:hover::part(field) {
|
|
58
|
+
border-color: var(--rc-field-error-color, red);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* A textarea grows downward, so its label and control belong at the top. */
|
|
62
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field[data-multiline]::part(field) {
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field[data-multiline]::part(control) {
|
|
67
|
+
align-items: flex-start;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field > input,
|
|
71
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-field > textarea {
|
|
72
|
+
caret-color: var(--rc-accent, Highlight);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* Control providers: rc-field's own surface draws the border, background,
|
|
77
|
+
* and focus ring, so the enhancing child has to stop drawing its own or the
|
|
78
|
+
* two sets of chrome nest visibly.
|
|
79
|
+
*/
|
|
80
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
81
|
+
rc-field
|
|
82
|
+
> rc-textarea[data-rc-field-control] {
|
|
83
|
+
--rc-textarea-border: 0;
|
|
84
|
+
--rc-textarea-border-radius: 0;
|
|
85
|
+
--rc-textarea-background: transparent;
|
|
86
|
+
--rc-textarea-padding: 0;
|
|
87
|
+
inline-size: 100%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
91
|
+
rc-field
|
|
92
|
+
> rc-textarea[data-rc-field-control]::part(root):focus-within {
|
|
93
|
+
box-shadow: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
97
|
+
rc-field
|
|
98
|
+
> :is(rc-select, rc-combobox)[data-rc-field-control] {
|
|
99
|
+
--rc-field: transparent;
|
|
100
|
+
inline-size: 100%;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
104
|
+
rc-field
|
|
105
|
+
> rc-select[data-rc-field-control]::part(trigger),
|
|
106
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
107
|
+
rc-field
|
|
108
|
+
> rc-combobox[data-rc-field-control]::part(anchor) {
|
|
109
|
+
min-block-size: 0;
|
|
110
|
+
padding-inline: 0;
|
|
111
|
+
border: 0;
|
|
112
|
+
border-radius: 0;
|
|
113
|
+
background: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/*
|
|
117
|
+
* Substrate sets the hover and focus chrome on the part directly rather than
|
|
118
|
+
* through a resettable property, so suppressing it needs the same
|
|
119
|
+
* specificity back.
|
|
120
|
+
*/
|
|
121
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
122
|
+
rc-field
|
|
123
|
+
> rc-select[data-rc-field-control]::part(trigger):is(
|
|
124
|
+
:hover,
|
|
125
|
+
:focus-visible,
|
|
126
|
+
[aria-expanded='true']
|
|
127
|
+
),
|
|
128
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
129
|
+
rc-field
|
|
130
|
+
> rc-combobox[data-rc-field-control]::part(anchor):is(:hover, :focus-within) {
|
|
131
|
+
border-color: transparent;
|
|
132
|
+
background: transparent;
|
|
133
|
+
outline: none;
|
|
134
|
+
box-shadow: none;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:where(
|
|
4
|
+
[data-rc-icon],
|
|
5
|
+
[data-rc-button-icon],
|
|
6
|
+
[data-rc-button-selected-icon],
|
|
7
|
+
[data-rc-navigation-icon]
|
|
8
|
+
) {
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
place-items: center;
|
|
11
|
+
font-size: var(--rc-icon-font-size, 1.5rem);
|
|
12
|
+
/*
|
|
13
|
+
* Unlayered icon-font boilerplate otherwise beats this layered theme rule.
|
|
14
|
+
* Keep the geometry invariant important, but let consumers opt out by
|
|
15
|
+
* overriding the normally-cascaded custom property.
|
|
16
|
+
*/
|
|
17
|
+
line-height: var(--rc-icon-font-line-height, var(--rc-icon-font-size, 1.5rem)) !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
3
|
+
/* Compatibility tokens retained for rc-listbox and embedded selectors. */
|
|
4
|
+
--rc-list-item-gap: var(--substrate-item-gap, 0.5rem);
|
|
5
|
+
--rc-list-item-min-block-size: 2.25rem;
|
|
6
|
+
--rc-list-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
7
|
+
--rc-list-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
8
|
+
--rc-list-item-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
9
|
+
--rc-list-item-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
10
|
+
--rc-list-item-selected-bg: var(--rc-highlight, Highlight);
|
|
11
|
+
--rc-list-item-selected-color: var(--rc-highlight-text, HighlightText);
|
|
12
|
+
--rc-list-item-disabled-opacity: var(--rc-disabled-opacity, 0.52);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-list {
|
|
16
|
+
--rc-list-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
17
|
+
--rc-list-leading-gap: var(--substrate-item-gap, 0.5rem);
|
|
18
|
+
--rc-list-trailing-gap: var(--substrate-item-gap, 0.5rem);
|
|
19
|
+
--rc-list-row-gap: 0;
|
|
20
|
+
--rc-list-item-min-block-size: 2.25rem;
|
|
21
|
+
--rc-list-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
22
|
+
--rc-list-item-color: var(--rc-field-text, FieldText);
|
|
23
|
+
--rc-list-item-background: transparent;
|
|
24
|
+
--rc-list-item-selected-color: var(--rc-highlight-text, HighlightText);
|
|
25
|
+
--rc-list-item-selected-background: var(--rc-highlight, Highlight);
|
|
26
|
+
--rc-list-item-divider: 1px solid var(--substrate-border-color, GrayText);
|
|
27
|
+
--rc-list-item-state-layer-color: var(--rc-accent, Highlight);
|
|
28
|
+
--rc-list-item-hover-state-layer-opacity: 0.1;
|
|
29
|
+
--rc-list-item-focus-state-layer-opacity: 0.12;
|
|
30
|
+
--rc-list-item-pressed-state-layer-opacity: 0.16;
|
|
31
|
+
--rc-list-item-disabled-opacity: var(--rc-disabled-opacity, 0.52);
|
|
32
|
+
--rc-list-item-transition-duration: var(--rc-motion-effects-duration-fast, 100ms);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-list[variant='segmented'] {
|
|
36
|
+
--rc-list-padding-inline: 0;
|
|
37
|
+
--rc-list-row-gap: 0.25rem;
|
|
38
|
+
--rc-list-item-background: var(--substrate-surface-raised, Field);
|
|
39
|
+
--rc-list-item-divider: 0;
|
|
40
|
+
--rc-list-item-border: 1px solid var(--substrate-border-color, GrayText);
|
|
41
|
+
--rc-list-item-border-radius: var(--substrate-radius-md, 0.375rem);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
45
|
+
rc-list-item
|
|
46
|
+
> :where([data-rc-list-supporting], small) {
|
|
47
|
+
display: block;
|
|
48
|
+
color: var(--substrate-on-surface-muted, GrayText);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
52
|
+
rc-list-item
|
|
53
|
+
> :is(input[type='checkbox'], input[type='radio'])[slot='leading'] {
|
|
54
|
+
margin: 0;
|
|
55
|
+
accent-color: var(--rc-accent, Highlight);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-listbox,
|
|
59
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) [part~='listbox'] {
|
|
60
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap);
|
|
61
|
+
--rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size);
|
|
62
|
+
--rc-listbox-option-padding-block: var(--rc-list-item-padding-block);
|
|
63
|
+
--rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline);
|
|
64
|
+
--rc-listbox-hover-bg: var(--rc-list-item-hover-bg);
|
|
65
|
+
--rc-listbox-active-bg: var(--rc-list-item-active-bg);
|
|
66
|
+
--rc-listbox-selected-bg: var(--rc-list-item-selected-bg);
|
|
67
|
+
--rc-listbox-selected-color: var(--rc-list-item-selected-color);
|
|
68
|
+
--rc-listbox-disabled-opacity: var(--rc-list-item-disabled-opacity);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-listbox {
|
|
3
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
|
|
4
|
+
--rc-listbox-option-min-block-size: 2.25rem;
|
|
5
|
+
--rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
6
|
+
--rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
7
|
+
--rc-listbox-option-transition:
|
|
8
|
+
background-color var(--substrate-motion-effects-duration-default, 160ms)
|
|
9
|
+
var(--substrate-motion-easing, ease),
|
|
10
|
+
color var(--substrate-motion-effects-duration-default, 160ms) var(--substrate-motion-easing, ease);
|
|
11
|
+
--rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
12
|
+
--rc-listbox-hover-color: var(--rc-field-text, FieldText);
|
|
13
|
+
--rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
14
|
+
--rc-listbox-active-color: var(--rc-field-text, FieldText);
|
|
15
|
+
--rc-listbox-selected-bg: var(--rc-highlight, Highlight);
|
|
16
|
+
--rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
|
|
17
|
+
display: block;
|
|
18
|
+
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
19
|
+
font: var(--rc-font-weight, 400) var(--rc-font-size, 1em) / var(--rc-line-height, normal)
|
|
20
|
+
var(--rc-font-family, inherit);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
24
|
+
rc-listbox[checkmark]
|
|
25
|
+
[part~='option-checkmark'] {
|
|
26
|
+
color: var(--rc-accent, Highlight);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-markdown-editor {
|
|
3
|
+
--rc-markdown-editor-padding: 0.75rem;
|
|
4
|
+
--rc-markdown-editor-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
--rc-markdown-editor-border-radius: 0 0 var(--substrate-radius-lg, 0.75rem)
|
|
6
|
+
var(--substrate-radius-lg, 0.75rem);
|
|
7
|
+
--rc-markdown-editor-background: var(--rc-field, Field);
|
|
8
|
+
--rc-markdown-editor-color: var(--rc-field-text, FieldText);
|
|
9
|
+
--rc-markdown-editor-toolbar-background: var(--substrate-surface-raised, Canvas);
|
|
10
|
+
--rc-markdown-editor-toolbar-color: var(--substrate-on-surface, CanvasText);
|
|
11
|
+
--rc-markdown-editor-toolbar-border: var(--rc-border, 1px solid ButtonBorder);
|
|
12
|
+
--rc-markdown-editor-toolbar-gap: 0.125rem;
|
|
13
|
+
--rc-markdown-editor-toolbar-padding: 0.25rem;
|
|
14
|
+
--rc-markdown-editor-toolbar-radius: var(--substrate-radius-lg, 0.75rem)
|
|
15
|
+
var(--substrate-radius-lg, 0.75rem) 0 0;
|
|
16
|
+
--rc-markdown-editor-toolbar-button-size: var(--rc-control-block-size, 2.5rem);
|
|
17
|
+
--rc-markdown-editor-toolbar-button-color: var(--substrate-on-surface, ButtonText);
|
|
18
|
+
--rc-markdown-editor-toolbar-button-border: 1px solid transparent;
|
|
19
|
+
--rc-markdown-editor-toolbar-button-radius: var(--substrate-radius-md, 0.5rem);
|
|
20
|
+
--rc-markdown-editor-toolbar-button-active-background: var(
|
|
21
|
+
--substrate-primary-container,
|
|
22
|
+
Highlight
|
|
23
|
+
);
|
|
24
|
+
--rc-markdown-editor-toolbar-button-active-color: var(
|
|
25
|
+
--substrate-on-primary-container,
|
|
26
|
+
HighlightText
|
|
27
|
+
);
|
|
28
|
+
--rc-markdown-editor-toolbar-button-active-border: 1px solid var(--substrate-primary, Highlight);
|
|
29
|
+
--rc-markdown-editor-toolbar-focus-outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
30
|
+
--rc-markdown-editor-toolbar-focus-outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
31
|
+
--rc-markdown-editor-toolbar-select-background: var(--substrate-field, Field);
|
|
32
|
+
--rc-markdown-editor-toolbar-select-color: var(--substrate-on-surface, FieldText);
|
|
33
|
+
--rc-markdown-editor-toolbar-select-border: var(--rc-border, 1px solid ButtonBorder);
|
|
34
|
+
--rc-markdown-editor-toolbar-select-radius: var(--substrate-radius-sm, 0.25rem);
|
|
35
|
+
--rc-markdown-editor-toolbar-select-active-background: var(
|
|
36
|
+
--substrate-primary-container,
|
|
37
|
+
Highlight
|
|
38
|
+
);
|
|
39
|
+
--rc-markdown-editor-toolbar-select-active-color: var(
|
|
40
|
+
--substrate-on-primary-container,
|
|
41
|
+
HighlightText
|
|
42
|
+
);
|
|
43
|
+
--rc-markdown-editor-toolbar-select-active-border-color: var(--substrate-primary, Highlight);
|
|
44
|
+
--rc-markdown-editor-toolbar-input-background: var(--substrate-field, Field);
|
|
45
|
+
--rc-markdown-editor-toolbar-input-color: var(--substrate-on-surface, FieldText);
|
|
46
|
+
--rc-markdown-editor-toolbar-input-border: var(--rc-border, 1px solid ButtonBorder);
|
|
47
|
+
--rc-markdown-editor-toolbar-input-radius: var(--substrate-radius-sm, 0.25rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-markdown-editor::part(rich-view) {
|
|
51
|
+
line-height: var(--rc-line-height, normal);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menu-button {
|
|
3
|
+
--rc-menu-button-trigger-background: var(--rc-button-bg, ButtonFace);
|
|
4
|
+
--rc-menu-button-trigger-color: var(--rc-button-text, ButtonText);
|
|
5
|
+
--rc-menu-button-trigger-hover-background: color-mix(
|
|
6
|
+
in srgb,
|
|
7
|
+
var(--rc-accent, Highlight) 10%,
|
|
8
|
+
var(--rc-button-bg, ButtonFace)
|
|
9
|
+
);
|
|
10
|
+
--rc-menu-button-trigger-open-background: color-mix(
|
|
11
|
+
in srgb,
|
|
12
|
+
var(--rc-accent, Highlight) 16%,
|
|
13
|
+
var(--rc-button-bg, ButtonFace)
|
|
14
|
+
);
|
|
15
|
+
--rc-menu-button-indicator-color: var(--rc-accent, Highlight);
|
|
16
|
+
display: inline-block;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menu {
|
|
3
|
+
--rc-menu-item-gap: var(--substrate-item-gap, 0.5rem);
|
|
4
|
+
--rc-menu-item-min-block-size: 2.25rem;
|
|
5
|
+
--rc-menu-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
6
|
+
--rc-menu-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
7
|
+
--rc-menu-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
8
|
+
--rc-menu-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
9
|
+
--rc-menu-check-size: 1.25rem;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
12
|
+
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
13
|
+
background: var(--substrate-surface-raised, Canvas);
|
|
14
|
+
box-shadow: var(--rc-shadow, none);
|
|
15
|
+
padding-block: 0.25rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menu [data-group-label] {
|
|
19
|
+
color: var(--substrate-on-surface-muted, GrayText);
|
|
20
|
+
font-size: 0.8em;
|
|
21
|
+
font-weight: 650;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menubar {
|
|
3
|
+
--rc-menubar-item-block-size: 2.25rem;
|
|
4
|
+
--rc-menubar-item-padding-inline: 0.75rem;
|
|
5
|
+
--rc-menubar-item-background: transparent;
|
|
6
|
+
--rc-menubar-item-open-background: color-mix(
|
|
7
|
+
in srgb,
|
|
8
|
+
var(--rc-accent, Highlight) 14%,
|
|
9
|
+
transparent
|
|
10
|
+
);
|
|
11
|
+
display: inline-block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menubar::part(root) {
|
|
15
|
+
gap: 0.125rem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
3
|
+
background: var(--substrate-surface, Canvas);
|
|
4
|
+
color: var(--substrate-on-surface, CanvasText);
|
|
5
|
+
font-family: var(--rc-font-family, inherit);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) *,
|
|
9
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) *::before,
|
|
10
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) *::after {
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) :focus-visible {
|
|
15
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
16
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@supports (view-transition-name: none) {
|
|
20
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) [data-rc-view-transition] {
|
|
21
|
+
view-transition-name: var(--rc-view-transition-name, none);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The vestibular harm reduced motion guards against is movement across the
|
|
27
|
+
* visual field, which a color or opacity change does not trigger; removing
|
|
28
|
+
* every transition over-corrected. Spatial motion still goes fully to
|
|
29
|
+
* zero. Effects motion is kept but shortened, scaled down from
|
|
30
|
+
* Substrate's own already-quick 100/160/240ms scale. The two legacy
|
|
31
|
+
* primitives (--substrate-motion-duration and its -slow companion,
|
|
32
|
+
* predating the effects/spatial split) and the cross-theme compatibility
|
|
33
|
+
* token stay at zero: dialog.css is their one remaining direct consumer,
|
|
34
|
+
* animating opacity, display, and transform together in one declaration
|
|
35
|
+
* that mixes spatial and effects properties and can't be cleanly
|
|
36
|
+
* classified into one bucket. (That file's own transform-based entrance
|
|
37
|
+
* is a separate, pre-existing conflict with rc-dialog's pointer-resize
|
|
38
|
+
* geometry reads and remains outside this theme-level override.)
|
|
39
|
+
*/
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
.rc-theme-substrate,
|
|
42
|
+
:host(.rc-theme-substrate) {
|
|
43
|
+
--substrate-motion-duration: 0ms;
|
|
44
|
+
--substrate-motion-duration-slow: 0ms;
|
|
45
|
+
--substrate-motion-effects-duration-fast: 40ms;
|
|
46
|
+
--substrate-motion-effects-duration-default: 55ms;
|
|
47
|
+
--substrate-motion-effects-duration-slow: 70ms;
|
|
48
|
+
--substrate-motion-spatial-duration-fast: 0ms;
|
|
49
|
+
--substrate-motion-spatial-duration-default: 0ms;
|
|
50
|
+
--substrate-motion-spatial-duration-slow: 0ms;
|
|
51
|
+
--rc-motion-duration: 0ms;
|
|
52
|
+
--rc-motion-effects-duration-fast: 40ms;
|
|
53
|
+
--rc-motion-effects-duration-default: 55ms;
|
|
54
|
+
--rc-motion-effects-duration-slow: 70ms;
|
|
55
|
+
--rc-motion-spatial-duration-fast: 0ms;
|
|
56
|
+
--rc-motion-spatial-duration-default: 0ms;
|
|
57
|
+
--rc-motion-spatial-duration-slow: 0ms;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-bar {
|
|
3
|
+
--rc-navigation-bar-bg: var(--rc-surface, Canvas);
|
|
4
|
+
--rc-navigation-bar-color: var(--rc-color, CanvasText);
|
|
5
|
+
--rc-navigation-bar-block-size: 4rem;
|
|
6
|
+
--rc-navigation-bar-padding-block: 0;
|
|
7
|
+
--rc-navigation-bar-padding-inline: 0;
|
|
8
|
+
--rc-navigation-bar-gap: 0;
|
|
9
|
+
--rc-navigation-bar-item-gap: 0.25rem;
|
|
10
|
+
--rc-navigation-bar-item-min-block-size: 3rem;
|
|
11
|
+
--rc-navigation-bar-item-padding-block: 0.5rem;
|
|
12
|
+
--rc-navigation-bar-item-padding-inline: var(--rc-item-padding-inline, 0.75rem);
|
|
13
|
+
--rc-navigation-bar-item-color: var(--rc-muted-color, CanvasText);
|
|
14
|
+
--rc-navigation-bar-item-text-decoration: none;
|
|
15
|
+
--rc-navigation-bar-active-color: var(--rc-accent, Highlight);
|
|
16
|
+
--rc-navigation-bar-indicator-bg: transparent;
|
|
17
|
+
--rc-navigation-bar-indicator-border: 0;
|
|
18
|
+
--rc-navigation-bar-indicator-radius: 0;
|
|
19
|
+
--rc-navigation-bar-indicator-duration: 0ms;
|
|
20
|
+
--rc-navigation-bar-indicator-easing: ease;
|
|
21
|
+
--rc-icon-font-line-height: 2.5rem;
|
|
22
|
+
--rc-navigation-bar-focus-ring: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
--rc-navigation-bar-focus-ring-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
27
|
+
rc-navigation-bar
|
|
28
|
+
> a
|
|
29
|
+
:where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
30
|
+
display: inline-grid;
|
|
31
|
+
place-items: center;
|
|
32
|
+
inline-size: 2.5rem;
|
|
33
|
+
block-size: 2.5rem;
|
|
34
|
+
border-radius: var(--rc-radius-pill, 9999px);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
38
|
+
rc-navigation-bar
|
|
39
|
+
> a[aria-current]:not([aria-current='false']) {
|
|
40
|
+
border-radius: var(--rc-radius-md, 0.5rem);
|
|
41
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-rail {
|
|
3
|
+
--rc-navigation-rail-bg: var(--rc-surface, Canvas);
|
|
4
|
+
--rc-navigation-rail-color: var(--rc-color, CanvasText);
|
|
5
|
+
--rc-navigation-rail-inline-size: 6rem;
|
|
6
|
+
--rc-navigation-rail-expanded-inline-size: 15rem;
|
|
7
|
+
--rc-navigation-rail-padding-block: 0.75rem;
|
|
8
|
+
--rc-navigation-rail-padding-inline: 0.5rem;
|
|
9
|
+
--rc-navigation-rail-gap: var(--rc-item-gap, 0.75rem);
|
|
10
|
+
--rc-navigation-rail-item-gap: var(--rc-item-gap, 0.75rem);
|
|
11
|
+
--rc-navigation-rail-link-gap: 0.25rem;
|
|
12
|
+
--rc-navigation-rail-item-min-block-size: 3.5rem;
|
|
13
|
+
--rc-navigation-rail-expanded-item-min-block-size: 3.5rem;
|
|
14
|
+
--rc-navigation-rail-item-padding-block: 0.25rem;
|
|
15
|
+
--rc-navigation-rail-item-padding-inline: 0.5rem;
|
|
16
|
+
--rc-navigation-rail-expanded-item-padding-inline: var(--rc-item-padding-inline, 1rem);
|
|
17
|
+
--rc-navigation-rail-item-color: var(--rc-muted-color, CanvasText);
|
|
18
|
+
--rc-navigation-rail-item-text-decoration: none;
|
|
19
|
+
--rc-navigation-rail-active-color: var(--rc-accent, Highlight);
|
|
20
|
+
--rc-navigation-rail-indicator-bg: transparent;
|
|
21
|
+
--rc-navigation-rail-indicator-border: 0;
|
|
22
|
+
--rc-navigation-rail-indicator-radius: 0;
|
|
23
|
+
--rc-navigation-rail-indicator-duration: 0ms;
|
|
24
|
+
--rc-navigation-rail-indicator-easing: ease;
|
|
25
|
+
--rc-icon-font-line-height: 2.5rem;
|
|
26
|
+
--rc-navigation-rail-toggle-size: 3rem;
|
|
27
|
+
--rc-navigation-rail-toggle-inline-offset: 0.5rem;
|
|
28
|
+
--rc-navigation-rail-duration: var(--rc-motion-duration, 200ms);
|
|
29
|
+
--rc-navigation-rail-easing: ease;
|
|
30
|
+
--rc-navigation-rail-focus-ring: var(--rc-focus-ring, 2px solid Highlight);
|
|
31
|
+
--rc-navigation-rail-focus-ring-offset: var(--rc-focus-ring-offset, 2px);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-rail > a {
|
|
35
|
+
inline-size: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
39
|
+
rc-navigation-rail
|
|
40
|
+
> a[aria-current]:not([aria-current='false']) {
|
|
41
|
+
border-radius: var(--rc-radius-md, 0.5rem);
|
|
42
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/*
|
|
46
|
+
* Size the icon itself (whether a direct `<a>` child or nested in
|
|
47
|
+
* [data-rc-navigation-indicator]) rather than the indicator wrapper, so the
|
|
48
|
+
* wrapper stays sized to its normal-flow content (icon + label) and the
|
|
49
|
+
* active-state background above wraps the whole item, not just the icon.
|
|
50
|
+
*/
|
|
51
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
52
|
+
rc-navigation-rail:not([expanded])
|
|
53
|
+
> a
|
|
54
|
+
[data-rc-navigation-icon] {
|
|
55
|
+
inline-size: 2.5rem;
|
|
56
|
+
block-size: 2.5rem;
|
|
57
|
+
border-radius: var(--rc-radius-pill, 9999px);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
61
|
+
rc-navigation-rail[expanded]
|
|
62
|
+
> a
|
|
63
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
64
|
+
justify-content: flex-start;
|
|
65
|
+
gap: var(--rc-item-gap, 0.75rem);
|
|
66
|
+
inline-size: 100%;
|
|
67
|
+
block-size: 3.5rem;
|
|
68
|
+
padding-inline: var(--rc-item-padding-inline, 1rem);
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
text-align: start;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-progress::part(value-display) {
|
|
3
|
+
color: var(--substrate-on-surface-muted, GrayText);
|
|
4
|
+
font-variant-numeric: tabular-nums;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-progress {
|
|
8
|
+
--rc-progress-fill-transition-duration: var(--rc-motion-effects-duration-fast, 100ms);
|
|
9
|
+
--rc-progress-fill-transition-easing: var(--rc-motion-effects-easing-fast, ease-out);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-range-slider::part(thumb) {
|
|
3
|
+
box-shadow: var(--substrate-shadow-sm, none);
|
|
4
|
+
transition:
|
|
5
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
6
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
7
|
+
scale var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-range-slider::part(thumb):hover {
|
|
11
|
+
scale: 1.04;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-range-slider::part(value-display) {
|
|
15
|
+
color: var(--substrate-on-surface-muted, GrayText);
|
|
16
|
+
font-variant-numeric: tabular-nums;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-scroller {
|
|
3
|
+
/*
|
|
4
|
+
* Capped a little narrower than Material's 1200px: Substrate runs a smaller
|
|
5
|
+
* base font, so the same pixel width carries more characters per line.
|
|
6
|
+
*/
|
|
7
|
+
--rc-scroller-content-max-inline-size: 68rem;
|
|
8
|
+
--rc-scroller-content-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
9
|
+
--rc-scroller-content-row-gap: var(--substrate-item-gap, 0.5rem);
|
|
10
|
+
|
|
11
|
+
--rc-scroller-scrollbar-width: thin;
|
|
12
|
+
--rc-scroller-scrollbar-color: color-mix(
|
|
13
|
+
in srgb,
|
|
14
|
+
var(--substrate-on-surface-muted, GrayText) 45%,
|
|
15
|
+
transparent
|
|
16
|
+
)
|
|
17
|
+
transparent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-search-bar {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
--rc-search-bar-radius: var(--substrate-radius-lg, 0.75rem);
|
|
5
|
+
--rc-search-bar-border: var(--rc-border, 1px solid ButtonBorder);
|
|
6
|
+
--rc-search-bar-shadow: var(--substrate-shadow-sm, none);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-search-bar::part(root) {
|
|
10
|
+
background: var(--rc-field, Field);
|
|
11
|
+
transition:
|
|
12
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
13
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-search-bar:hover::part(root) {
|
|
17
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-search-bar:focus-within::part(root) {
|
|
21
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
22
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
26
|
+
rc-search-bar
|
|
27
|
+
> input[type='search']:focus-visible {
|
|
28
|
+
outline: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-segmented-button {
|
|
3
|
+
/* One switch turns on the component-owned segmented recipe. */
|
|
4
|
+
--rc-segmented-button-appearance: segmented;
|
|
5
|
+
--rc-segmented-button-border: var(--rc-border);
|
|
6
|
+
--rc-segmented-button-radius: var(--rc-control-radius);
|
|
7
|
+
--rc-segmented-button-divider: 0;
|
|
8
|
+
--rc-segmented-button-bg: var(--substrate-surface-raised, ButtonFace);
|
|
9
|
+
--rc-segmented-button-color: var(--substrate-on-surface, ButtonText);
|
|
10
|
+
--rc-segmented-button-selected-bg: var(--rc-highlight, Highlight);
|
|
11
|
+
--rc-segmented-button-selected-color: var(--rc-highlight-text, HighlightText);
|
|
12
|
+
--rc-segmented-button-segment-min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
13
|
+
--rc-segmented-button-segment-padding-inline: var(--rc-control-padding-inline, 0.75rem);
|
|
14
|
+
--rc-segmented-button-segment-gap: 0.5em;
|
|
15
|
+
--rc-segmented-button-focus-ring: var(--rc-focus-ring);
|
|
16
|
+
--rc-segmented-button-focus-ring-offset: -2px;
|
|
17
|
+
--rc-segmented-button-disabled-opacity: var(--rc-disabled-opacity);
|
|
18
|
+
}
|
|
19
|
+
}
|