@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.
- package/CHANGELOG.md +423 -0
- package/README.md +164 -0
- package/bridge.css +678 -0
- package/components/accordion.css +20 -0
- package/components/adaptive-menu.css +162 -0
- package/components/app-bar.css +100 -0
- package/components/bottom-sheet.css +135 -0
- package/components/button.css +270 -0
- package/components/card.css +61 -0
- package/components/carousel.css +23 -0
- package/components/chip-group.css +15 -0
- package/components/chip.css +39 -0
- package/components/combobox.css +155 -0
- package/components/dialog.css +86 -0
- package/components/disclosure.css +104 -0
- package/components/fab-menu.css +85 -0
- package/components/fab.css +51 -0
- package/components/field.css +378 -0
- package/components/icons.css +52 -0
- package/components/list-item.css +146 -0
- package/components/listbox.css +47 -0
- package/components/markdown-editor.css +72 -0
- package/components/menu-button.css +126 -0
- package/components/menu.css +147 -0
- package/components/menubar.css +27 -0
- package/components/modes.css +50 -0
- package/components/navigation-bar.css +76 -0
- package/components/navigation-rail.css +132 -0
- package/components/progress.css +15 -0
- package/components/range-slider.css +29 -0
- package/components/scroller.css +7 -0
- package/components/search-bar.css +58 -0
- package/components/segmented-button.css +19 -0
- package/components/select.css +197 -0
- package/components/slider.css +19 -0
- package/components/snackbar.css +23 -0
- package/components/splitter.css +35 -0
- package/components/switch.css +41 -0
- package/components/textarea.css +31 -0
- package/components/toolbar.css +32 -0
- package/components/transfer-list.css +70 -0
- package/components/virtual-canvas.css +16 -0
- package/components.css +42 -0
- package/constraints/material.json +99 -0
- package/defaults.css +1081 -0
- package/package.json +53 -0
- package/state-layer.css +35 -0
- package/theme.css +3 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(root) {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
transition:
|
|
5
|
+
box-shadow var(--rc-motion-effects-duration-default, 200ms)
|
|
6
|
+
var(--rc-motion-effects-easing-default, ease),
|
|
7
|
+
background-color var(--rc-motion-effects-duration-default, 200ms)
|
|
8
|
+
var(--rc-motion-effects-easing-default, ease);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar:hover::part(root) {
|
|
12
|
+
background: color-mix(
|
|
13
|
+
in srgb,
|
|
14
|
+
var(--md-sys-color-on-surface, CanvasText) 8%,
|
|
15
|
+
var(--md-sys-color-surface-container-high, Field)
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
20
|
+
rc-search-bar[data-interaction-mode='keyboard']::part(root):focus-within {
|
|
21
|
+
box-shadow: var(--rc-shadow-level2, none);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(clear) {
|
|
25
|
+
border-radius: var(--md-sys-shape-corner-full, 999px);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(clear):hover {
|
|
29
|
+
background: color-mix(
|
|
30
|
+
in srgb,
|
|
31
|
+
var(--md-sys-color-on-surface-variant, CanvasText) 8%,
|
|
32
|
+
transparent
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar[variant='view'] {
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
inline-size: min(100%, var(--md-search-view-container-width, 45rem));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar[variant='view']::part(root) {
|
|
42
|
+
position: relative;
|
|
43
|
+
z-index: 2;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(view) {
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(suggestion) {
|
|
51
|
+
gap: 1rem;
|
|
52
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(suggestion):hover {
|
|
56
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-segmented-button {
|
|
3
|
+
/* One switch turns on the component-owned segmented recipe. */
|
|
4
|
+
--rc-segmented-button-appearance: segmented;
|
|
5
|
+
--rc-segmented-button-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
6
|
+
--rc-segmented-button-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
7
|
+
--rc-segmented-button-divider: 0;
|
|
8
|
+
--rc-segmented-button-bg: var(--md-sys-color-surface, ButtonFace);
|
|
9
|
+
--rc-segmented-button-color: var(--md-sys-color-on-surface, ButtonText);
|
|
10
|
+
--rc-segmented-button-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
11
|
+
--rc-segmented-button-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
12
|
+
--rc-segmented-button-segment-min-block-size: 2.5rem;
|
|
13
|
+
--rc-segmented-button-segment-padding-inline: 1rem;
|
|
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
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
3
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog) {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: auto;
|
|
6
|
+
top: var(--rc-dialog-visual-viewport-top, 0);
|
|
7
|
+
left: var(--rc-dialog-visual-viewport-left, 0);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
inline-size: var(--rc-dialog-visual-viewport-width, 100dvw);
|
|
10
|
+
block-size: var(--rc-dialog-visual-viewport-height, 100dvh);
|
|
11
|
+
max-inline-size: none;
|
|
12
|
+
max-block-size: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding-block: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-bottom));
|
|
15
|
+
padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
|
|
16
|
+
resize: none;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border: 0;
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
background: var(--md-sys-color-surface-container-high, Canvas);
|
|
21
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
22
|
+
box-shadow: none;
|
|
23
|
+
transform: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(trigger) {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
transition:
|
|
29
|
+
border-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
30
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
31
|
+
box-shadow var(--rc-motion-effects-duration-fast, 150ms)
|
|
32
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
33
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
34
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(trigger):hover {
|
|
38
|
+
border-color: var(--md-sys-color-on-surface, CanvasText);
|
|
39
|
+
background: color-mix(
|
|
40
|
+
in srgb,
|
|
41
|
+
var(--md-sys-color-on-surface, CanvasText) 4%,
|
|
42
|
+
var(--md-sys-color-surface, Field)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(trigger):focus-visible,
|
|
47
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
48
|
+
rc-select::part(trigger)[aria-expanded='true'] {
|
|
49
|
+
border-color: var(--md-sys-color-primary, Highlight);
|
|
50
|
+
box-shadow: inset 0 0 0 1px var(--md-sys-color-primary, Highlight);
|
|
51
|
+
outline: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(chip) {
|
|
55
|
+
min-block-size: 2rem;
|
|
56
|
+
border-color: var(--md-sys-color-outline, ButtonBorder);
|
|
57
|
+
background: transparent;
|
|
58
|
+
color: var(--md-sys-color-on-surface-variant, ButtonText);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(chips) {
|
|
62
|
+
--rc-chip-block-size: 2rem;
|
|
63
|
+
--rc-chip-touch-target-block-size: 3rem;
|
|
64
|
+
--rc-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
65
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(chip):hover {
|
|
69
|
+
background: color-mix(
|
|
70
|
+
in srgb,
|
|
71
|
+
var(--md-sys-color-on-surface-variant, CanvasText) 8%,
|
|
72
|
+
transparent
|
|
73
|
+
);
|
|
74
|
+
color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
* Propagate Material styles to the embedded rc-listbox host. rc-listbox renders
|
|
79
|
+
* options into its own light DOM inside rc-select's shadow root, so inherited
|
|
80
|
+
* custom properties are the stable styling contract for option rows.
|
|
81
|
+
*/
|
|
82
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(listbox) {
|
|
83
|
+
background: var(--md-menu-container-color, var(--md-sys-color-surface-container, Canvas));
|
|
84
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
85
|
+
font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
86
|
+
font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
87
|
+
line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
88
|
+
padding-block: 0.5rem;
|
|
89
|
+
border-radius: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 0.25rem));
|
|
90
|
+
|
|
91
|
+
/* Option sizing — inherited by li[role='option'] via rc-listbox's rc-base layer */
|
|
92
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
|
|
93
|
+
--rc-listbox-option-min-block-size: 3rem;
|
|
94
|
+
--rc-listbox-option-padding-block: 0;
|
|
95
|
+
--rc-listbox-option-padding-inline: 0.75rem;
|
|
96
|
+
--rc-listbox-option-transition:
|
|
97
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
98
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
99
|
+
color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
|
|
100
|
+
|
|
101
|
+
/* M3 hover/focus state layers use on-surface, not the selected container role. */
|
|
102
|
+
--rc-highlight: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
103
|
+
--rc-highlight-text: var(--md-sys-color-on-surface, CanvasText);
|
|
104
|
+
--rc-listbox-hover-bg: color-mix(
|
|
105
|
+
in srgb,
|
|
106
|
+
var(--md-sys-color-on-surface, CanvasText) 8%,
|
|
107
|
+
transparent
|
|
108
|
+
);
|
|
109
|
+
--rc-listbox-hover-color: var(--md-sys-color-on-surface, CanvasText);
|
|
110
|
+
--rc-listbox-active-bg: color-mix(
|
|
111
|
+
in srgb,
|
|
112
|
+
var(--md-sys-color-on-surface, CanvasText) 12%,
|
|
113
|
+
transparent
|
|
114
|
+
);
|
|
115
|
+
--rc-listbox-active-color: var(--md-sys-color-on-surface, CanvasText);
|
|
116
|
+
|
|
117
|
+
--rc-listbox-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
118
|
+
--rc-listbox-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
119
|
+
--rc-listbox-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
120
|
+
|
|
121
|
+
/* M3 menus use background state layer for keyboard focus, not an outline ring */
|
|
122
|
+
--rc-focus-ring: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(toggle-indicator) {
|
|
126
|
+
color: var(
|
|
127
|
+
--md-outlined-select-text-field-trailing-icon-color,
|
|
128
|
+
var(--md-sys-color-on-surface-variant, CanvasText)
|
|
129
|
+
);
|
|
130
|
+
transition:
|
|
131
|
+
color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease),
|
|
132
|
+
transform var(--rc-motion-spatial-duration-fast, 300ms)
|
|
133
|
+
var(--rc-motion-spatial-easing-fast, ease);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select[open]::part(toggle-indicator) {
|
|
137
|
+
transform: rotate(180deg);
|
|
138
|
+
color: var(
|
|
139
|
+
--md-outlined-select-text-field-focus-trailing-icon-color,
|
|
140
|
+
var(--md-sys-color-primary, Highlight)
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-select[disabled]::part(trigger) {
|
|
145
|
+
opacity: var(--md-sys-state-disabled-container-opacity, 0.38);
|
|
146
|
+
pointer-events: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
150
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-header) {
|
|
151
|
+
min-block-size: 3.5rem;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
155
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-title) {
|
|
156
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
157
|
+
font-family: var(--md-sys-typescale-headline-small-font, inherit);
|
|
158
|
+
font-size: var(--md-sys-typescale-headline-small-size, 1.5rem);
|
|
159
|
+
font-style: normal;
|
|
160
|
+
font-weight: var(--md-sys-typescale-headline-small-weight, 400);
|
|
161
|
+
line-height: var(--md-sys-typescale-headline-small-line-height, 2rem);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
165
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel),
|
|
166
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
167
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm) {
|
|
168
|
+
border: 0;
|
|
169
|
+
border-radius: var(--md-sys-shape-corner-full, 999px);
|
|
170
|
+
background: transparent;
|
|
171
|
+
color: var(--md-sys-color-primary, Highlight);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
175
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel) {
|
|
176
|
+
color: var(--md-sys-color-on-surface, ButtonText);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
180
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm) {
|
|
181
|
+
padding-inline: 0.75rem;
|
|
182
|
+
font-family: var(--md-sys-typescale-label-large-font, inherit);
|
|
183
|
+
font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
|
184
|
+
font-weight: var(--md-sys-typescale-label-large-weight, 500);
|
|
185
|
+
line-height: var(--md-sys-typescale-label-large-line-height, 1.25rem);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
189
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel):hover {
|
|
190
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
194
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm):hover {
|
|
195
|
+
background: color-mix(in srgb, var(--md-sys-color-primary, Highlight) 8%, transparent);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-slider::part(value-display) {
|
|
3
|
+
min-inline-size: 2rem;
|
|
4
|
+
padding: 0.25rem 0.5rem;
|
|
5
|
+
border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
6
|
+
background: var(--md-sys-color-inverse-surface, var(--md-sys-color-on-surface, CanvasText));
|
|
7
|
+
color: var(--md-sys-color-inverse-on-surface, var(--md-sys-color-surface, Canvas));
|
|
8
|
+
font-size: var(--md-sys-typescale-label-small-size, 0.75rem);
|
|
9
|
+
text-align: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-slider input[type='range'] {
|
|
13
|
+
accent-color: var(--md-slider-handle-color, var(--md-sys-color-primary, Highlight));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-slider[disabled] {
|
|
17
|
+
opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-snackbar {
|
|
3
|
+
--rc-snackbar-inset-block-end: calc(1rem + var(--rc-navigation-bar-block-size, 0px));
|
|
4
|
+
--rc-snackbar-min-block-size: 3rem;
|
|
5
|
+
--rc-snackbar-max-inline-size: 30rem;
|
|
6
|
+
--rc-snackbar-padding-block: 0.875rem;
|
|
7
|
+
--rc-snackbar-padding-inline: 1rem;
|
|
8
|
+
--rc-snackbar-border: 0;
|
|
9
|
+
--rc-snackbar-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
10
|
+
--rc-snackbar-bg: var(--md-sys-color-inverse-surface, CanvasText);
|
|
11
|
+
--rc-snackbar-color: var(--md-sys-color-inverse-on-surface, Canvas);
|
|
12
|
+
--rc-snackbar-action-color: var(--md-sys-color-inverse-primary, LinkText);
|
|
13
|
+
--rc-snackbar-action-border: 0;
|
|
14
|
+
--rc-snackbar-action-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
15
|
+
--rc-snackbar-action-padding-block: 0.5rem;
|
|
16
|
+
--rc-snackbar-action-padding-inline: 0.75rem;
|
|
17
|
+
--rc-snackbar-action-bg: transparent;
|
|
18
|
+
--rc-snackbar-action-font: inherit;
|
|
19
|
+
--rc-snackbar-shadow: var(--rc-shadow-level3);
|
|
20
|
+
--rc-snackbar-focus-ring: 2px solid var(--md-sys-color-inverse-primary, Highlight);
|
|
21
|
+
--rc-snackbar-focus-ring-offset: 2px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-splitter {
|
|
3
|
+
/* 24px wide strip — meets WCAG 2.5.8 touch target in the cross axis */
|
|
4
|
+
--rc-splitter-separator-size: 1.5rem;
|
|
5
|
+
--rc-splitter-separator-color: var(--md-sys-color-surface-container, Canvas);
|
|
6
|
+
/* No keyline border; surface color provides enough contrast */
|
|
7
|
+
--rc-splitter-keyline: none;
|
|
8
|
+
--rc-splitter-separator-border-inline-start: none;
|
|
9
|
+
--rc-splitter-separator-border-inline-end: none;
|
|
10
|
+
--rc-splitter-separator-border-block-start: none;
|
|
11
|
+
--rc-splitter-separator-border-block-end: none;
|
|
12
|
+
|
|
13
|
+
/* M3 drag indicator: 32px × 4px rounded pill, like a bottom-sheet handle */
|
|
14
|
+
--rc-splitter-separator-handle-size: 2rem;
|
|
15
|
+
--rc-splitter-handle-thickness: 4px;
|
|
16
|
+
--rc-splitter-handle-border-radius: 999px;
|
|
17
|
+
/* Disable the default dot grip; use a solid pill fill instead */
|
|
18
|
+
--rc-splitter-handle-pattern: none;
|
|
19
|
+
--rc-splitter-handle-fill: color-mix(
|
|
20
|
+
in srgb,
|
|
21
|
+
var(--md-sys-color-on-surface-variant, ButtonBorder) 40%,
|
|
22
|
+
transparent
|
|
23
|
+
);
|
|
24
|
+
/* Hover state layer on the pill only, not the full strip */
|
|
25
|
+
--rc-splitter-handle-hover-fill: color-mix(
|
|
26
|
+
in srgb,
|
|
27
|
+
var(--md-sys-color-primary, Highlight) 8%,
|
|
28
|
+
transparent
|
|
29
|
+
);
|
|
30
|
+
--rc-splitter-handle-transition: var(--rc-motion-effects-duration-fast, 150ms)
|
|
31
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
32
|
+
/* The panel visibly resizes to the snap point, which is spatial motion. */
|
|
33
|
+
--rc-splitter-snap-duration: var(--rc-motion-spatial-duration-fast, 300ms);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-switch {
|
|
3
|
+
--rc-switch-native-appearance: none;
|
|
4
|
+
--rc-switch-native-inline-size: 100%;
|
|
5
|
+
--rc-switch-native-block-size: 100%;
|
|
6
|
+
--rc-switch-native-margin: 0;
|
|
7
|
+
--rc-switch-native-opacity: 0;
|
|
8
|
+
--rc-switch-decoration-display: block;
|
|
9
|
+
--rc-switch-icon-display: grid;
|
|
10
|
+
--rc-switch-track-inline-size: 3.25rem;
|
|
11
|
+
--rc-switch-track-block-size: 2rem;
|
|
12
|
+
--rc-switch-track-border: 2px solid var(--md-sys-color-outline, ButtonBorder);
|
|
13
|
+
--rc-switch-track-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
14
|
+
--rc-switch-track-bg: var(--md-sys-color-surface-container-highest, ButtonFace);
|
|
15
|
+
--rc-switch-thumb-size: 1rem;
|
|
16
|
+
--rc-switch-thumb-offset: 0.375rem;
|
|
17
|
+
--rc-switch-thumb-bg: var(--md-sys-color-outline, ButtonText);
|
|
18
|
+
--rc-switch-selected-track-border-color: var(--md-sys-color-primary, Highlight);
|
|
19
|
+
--rc-switch-selected-track-bg: var(--md-sys-color-primary, Highlight);
|
|
20
|
+
--rc-switch-selected-thumb-size: 1.5rem;
|
|
21
|
+
--rc-switch-selected-thumb-bg: var(--md-sys-color-on-primary, HighlightText);
|
|
22
|
+
--rc-switch-thumb-translate: 1.125rem;
|
|
23
|
+
--rc-switch-focus-ring: var(--rc-focus-ring);
|
|
24
|
+
--rc-switch-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
25
|
+
--rc-switch-disabled-opacity: var(--rc-disabled-opacity);
|
|
26
|
+
/*
|
|
27
|
+
* The switch's single duration/easing pair drives both its
|
|
28
|
+
* background-color/border-color fades and its thumb/track resize and
|
|
29
|
+
* slide; the dominant motion is spatial (the thumb visibly moves and
|
|
30
|
+
* grows), so it takes the spatial scale rather than the compatibility
|
|
31
|
+
* token.
|
|
32
|
+
*/
|
|
33
|
+
--rc-switch-duration: var(--rc-motion-spatial-duration-fast, 300ms);
|
|
34
|
+
--rc-switch-easing: var(--rc-motion-spatial-easing-fast, ease);
|
|
35
|
+
|
|
36
|
+
/* Keep long flex/grid siblings from shrinking the control below its track. */
|
|
37
|
+
min-inline-size: var(--rc-switch-track-inline-size) !important;
|
|
38
|
+
min-block-size: var(--rc-switch-track-block-size) !important;
|
|
39
|
+
flex-shrink: 0 !important;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-textarea {
|
|
3
|
+
--rc-textarea-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
4
|
+
--rc-textarea-border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
5
|
+
--rc-textarea-background: var(--md-sys-color-surface, Field);
|
|
6
|
+
--rc-textarea-color: var(--md-sys-color-on-surface, FieldText);
|
|
7
|
+
--rc-textarea-padding: 1rem;
|
|
8
|
+
--rc-textarea-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
|
|
9
|
+
--rc-textarea-caret-color: var(--md-sys-color-primary, FieldText);
|
|
10
|
+
--rc-textarea-active-line-bg: color-mix(
|
|
11
|
+
in srgb,
|
|
12
|
+
var(--md-sys-color-primary, Highlight) 8%,
|
|
13
|
+
transparent
|
|
14
|
+
);
|
|
15
|
+
--rc-textarea-gutter-bg: var(--md-sys-color-surface-container, Canvas);
|
|
16
|
+
--rc-textarea-gutter-color: var(--md-sys-color-on-surface-variant, GrayText);
|
|
17
|
+
--rc-textarea-gutter-border: 1px solid var(--md-sys-color-outline-variant, ButtonBorder);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-textarea::part(root) {
|
|
21
|
+
transition:
|
|
22
|
+
border-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
23
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
24
|
+
box-shadow var(--rc-motion-effects-duration-fast, 150ms)
|
|
25
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-textarea::part(root):hover {
|
|
29
|
+
border-color: var(--md-sys-color-on-surface, CanvasText);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar::part(root) {
|
|
3
|
+
background: var(--md-sys-color-surface-container, Canvas);
|
|
4
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar > button {
|
|
8
|
+
min-inline-size: 2.5rem;
|
|
9
|
+
min-block-size: 2.5rem;
|
|
10
|
+
padding: 0.5rem;
|
|
11
|
+
border: 0;
|
|
12
|
+
border-radius: var(--md-sys-shape-corner-full, 999px);
|
|
13
|
+
background: transparent;
|
|
14
|
+
color: inherit;
|
|
15
|
+
font: inherit;
|
|
16
|
+
transition: background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
17
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar > button:hover {
|
|
21
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar > button[aria-pressed='true'] {
|
|
25
|
+
background: var(--md-sys-color-secondary-container, Highlight);
|
|
26
|
+
color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar > button:disabled {
|
|
30
|
+
opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-transfer-list {
|
|
3
|
+
--rc-transfer-list-gap: 1rem;
|
|
4
|
+
--rc-transfer-list-panel-gap: 0.5rem;
|
|
5
|
+
--rc-transfer-list-listbox-border: 1px solid var(--md-sys-color-outline-variant, ButtonBorder);
|
|
6
|
+
--rc-transfer-list-listbox-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
7
|
+
--rc-transfer-list-listbox-bg: var(--md-sys-color-surface, Canvas);
|
|
8
|
+
--rc-transfer-list-option-gap: 0.75rem;
|
|
9
|
+
--rc-transfer-list-option-padding-block: 0;
|
|
10
|
+
--rc-transfer-list-option-padding-inline: 0.75rem;
|
|
11
|
+
--rc-transfer-list-option-hover-bg: color-mix(
|
|
12
|
+
in srgb,
|
|
13
|
+
var(--md-sys-color-on-surface, CanvasText) 8%,
|
|
14
|
+
transparent
|
|
15
|
+
);
|
|
16
|
+
--rc-transfer-list-option-hover-color: var(--md-sys-color-on-surface, CanvasText);
|
|
17
|
+
--rc-transfer-list-option-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
18
|
+
--rc-transfer-list-option-selected-color: var(
|
|
19
|
+
--md-sys-color-on-secondary-container,
|
|
20
|
+
HighlightText
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-transfer-list::part(panel) {
|
|
25
|
+
padding: 0.75rem;
|
|
26
|
+
border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
|
|
27
|
+
background: var(--md-sys-color-surface-container, Canvas);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-transfer-list::part(label) {
|
|
31
|
+
color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-transfer-list::part(listbox) {
|
|
36
|
+
border-radius: var(--md-sys-shape-corner-small, 0.25rem);
|
|
37
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
|
|
38
|
+
--rc-listbox-option-min-block-size: 3rem;
|
|
39
|
+
--rc-listbox-option-padding-block: 0;
|
|
40
|
+
--rc-listbox-option-padding-inline: 0.75rem;
|
|
41
|
+
--rc-listbox-option-transition:
|
|
42
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
43
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
44
|
+
color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
|
|
45
|
+
--rc-listbox-hover-bg: color-mix(
|
|
46
|
+
in srgb,
|
|
47
|
+
var(--md-sys-color-on-surface, CanvasText) 8%,
|
|
48
|
+
transparent
|
|
49
|
+
);
|
|
50
|
+
--rc-listbox-hover-color: var(--md-sys-color-on-surface, CanvasText);
|
|
51
|
+
--rc-listbox-active-bg: color-mix(
|
|
52
|
+
in srgb,
|
|
53
|
+
var(--md-sys-color-on-surface, CanvasText) 12%,
|
|
54
|
+
transparent
|
|
55
|
+
);
|
|
56
|
+
--rc-listbox-active-color: var(--md-sys-color-on-surface, CanvasText);
|
|
57
|
+
--rc-listbox-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
58
|
+
--rc-listbox-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
59
|
+
--rc-listbox-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-transfer-list::part(button) {
|
|
63
|
+
min-block-size: 2.5rem;
|
|
64
|
+
padding-inline: 1rem;
|
|
65
|
+
border: 0;
|
|
66
|
+
border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
|
|
67
|
+
background: var(--md-sys-color-secondary-container, ButtonFace);
|
|
68
|
+
color: var(--md-sys-color-on-secondary-container, ButtonText);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-virtual-canvas {
|
|
3
|
+
--rc-virtual-canvas-scrollbar-width: thin;
|
|
4
|
+
--rc-virtual-canvas-scrollbar-size: 0.75rem;
|
|
5
|
+
--rc-virtual-canvas-scrollbar-thumb-background: var(--md-sys-color-outline, ButtonFace);
|
|
6
|
+
--rc-virtual-canvas-scrollbar-track-background: var(--md-sys-color-surface-container, Canvas);
|
|
7
|
+
--rc-virtual-canvas-scrollbar-button-background: var(
|
|
8
|
+
--md-sys-color-surface-container-high,
|
|
9
|
+
ButtonFace
|
|
10
|
+
);
|
|
11
|
+
border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
|
|
12
|
+
background: var(--md-sys-color-surface-container-low, Canvas);
|
|
13
|
+
box-shadow: inset 0 0 0 1px var(--md-sys-color-outline-variant, ButtonBorder);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/components.css
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@layer rc-theme-material.defaults, rc-theme-material.bridge, rc-theme-material.components;
|
|
2
|
+
|
|
3
|
+
@import './components/icons.css';
|
|
4
|
+
@import './components/listbox.css';
|
|
5
|
+
@import './components/select.css';
|
|
6
|
+
@import './components/combobox.css';
|
|
7
|
+
@import './components/search-bar.css';
|
|
8
|
+
@import './components/field.css';
|
|
9
|
+
@import './components/bottom-sheet.css';
|
|
10
|
+
@import './components/textarea.css';
|
|
11
|
+
@import './components/markdown-editor.css';
|
|
12
|
+
@import './components/transfer-list.css';
|
|
13
|
+
@import './components/button.css';
|
|
14
|
+
@import './components/card.css';
|
|
15
|
+
@import './components/scroller.css';
|
|
16
|
+
@import './components/carousel.css';
|
|
17
|
+
@import './components/chip.css';
|
|
18
|
+
@import './components/chip-group.css';
|
|
19
|
+
@import './components/list-item.css';
|
|
20
|
+
@import './components/fab.css';
|
|
21
|
+
@import './components/fab-menu.css';
|
|
22
|
+
@import './components/app-bar.css';
|
|
23
|
+
@import './components/menu.css';
|
|
24
|
+
@import './components/menu-button.css';
|
|
25
|
+
@import './components/adaptive-menu.css';
|
|
26
|
+
@import './components/menubar.css';
|
|
27
|
+
@import './components/navigation-bar.css';
|
|
28
|
+
@import './components/navigation-rail.css';
|
|
29
|
+
@import './components/toolbar.css';
|
|
30
|
+
@import './components/segmented-button.css';
|
|
31
|
+
@import './components/slider.css';
|
|
32
|
+
@import './components/progress.css';
|
|
33
|
+
@import './components/snackbar.css';
|
|
34
|
+
@import './components/range-slider.css';
|
|
35
|
+
@import './components/splitter.css';
|
|
36
|
+
@import './components/switch.css';
|
|
37
|
+
@import './components/dialog.css';
|
|
38
|
+
@import './components/disclosure.css';
|
|
39
|
+
@import './components/accordion.css';
|
|
40
|
+
@import './components/virtual-canvas.css';
|
|
41
|
+
@import './components/modes.css';
|
|
42
|
+
@import './state-layer.css';
|