@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,43 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-adaptive-menu {
|
|
3
|
+
--rc-adaptive-menu-gap: var(--substrate-control-gap, 0.5rem);
|
|
4
|
+
--rc-adaptive-menu-icon-size: 1.25rem;
|
|
5
|
+
|
|
6
|
+
--rc-adaptive-menu-trigger-background: transparent;
|
|
7
|
+
--rc-adaptive-menu-trigger-border: 0;
|
|
8
|
+
--rc-adaptive-menu-trigger-color: var(--substrate-on-surface-muted, ButtonText);
|
|
9
|
+
--rc-adaptive-menu-trigger-block-size: 2.25rem;
|
|
10
|
+
--rc-adaptive-menu-trigger-inline-size: 2.25rem;
|
|
11
|
+
--rc-adaptive-menu-trigger-padding: 0.375rem;
|
|
12
|
+
--rc-adaptive-menu-trigger-radius: var(--substrate-radius-md, 0.5rem);
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* The trigger is drawn at 2.25rem for density, so the hit area is inflated
|
|
16
|
+
* separately to clear the 3rem touch minimum without widening the row.
|
|
17
|
+
*/
|
|
18
|
+
--rc-adaptive-menu-touch-target-block-size: 3rem;
|
|
19
|
+
--rc-adaptive-menu-touch-target-inline-size: 3rem;
|
|
20
|
+
--rc-adaptive-menu-touch-target-overlap-inline-end: 0.375rem;
|
|
21
|
+
|
|
22
|
+
--rc-adaptive-menu-popup-background: var(--substrate-surface, Canvas);
|
|
23
|
+
--rc-adaptive-menu-popup-color: var(--rc-field-text, CanvasText);
|
|
24
|
+
--rc-adaptive-menu-popup-border: var(--rc-border, 1px solid ButtonBorder);
|
|
25
|
+
--rc-adaptive-menu-popup-radius: var(--substrate-radius-lg, 0.75rem);
|
|
26
|
+
--rc-adaptive-menu-popup-shadow: var(--substrate-shadow-lg, none);
|
|
27
|
+
--rc-adaptive-menu-popup-min-inline-size: 12rem;
|
|
28
|
+
--rc-adaptive-menu-popup-padding-block: 0.375rem;
|
|
29
|
+
|
|
30
|
+
/*
|
|
31
|
+
* The sheet presentation exists because a finger is doing the pointing, so
|
|
32
|
+
* its rows take the larger list item height rather than the menu row height.
|
|
33
|
+
*/
|
|
34
|
+
--rc-adaptive-menu-item-min-block-size: 3rem;
|
|
35
|
+
--rc-adaptive-menu-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
36
|
+
--rc-adaptive-menu-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
37
|
+
--rc-adaptive-menu-item-gap: var(--substrate-item-gap, 0.5rem);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-adaptive-menu::part(trigger):hover {
|
|
41
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 10%, var(--substrate-surface, Canvas));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-app-bar {
|
|
3
|
+
--rc-app-bar-bg: color-mix(in srgb, var(--substrate-surface, Canvas) 88%, transparent);
|
|
4
|
+
--rc-app-bar-color: var(--rc-field-text, CanvasText);
|
|
5
|
+
--rc-app-bar-scroll-divider: var(--rc-border, 1px solid ButtonBorder);
|
|
6
|
+
--rc-app-bar-shadow: none;
|
|
7
|
+
-webkit-backdrop-filter: blur(16px);
|
|
8
|
+
backdrop-filter: blur(16px);
|
|
9
|
+
font-family: var(--rc-font-family, inherit);
|
|
10
|
+
position: relative;
|
|
11
|
+
z-index: var(--rc-app-bar-z-index, 1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-app-bar[data-scrolled] {
|
|
15
|
+
--rc-app-bar-shadow: var(--substrate-shadow-sm, none);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-app-bar :is(button, [role='button']) {
|
|
19
|
+
border-radius: var(--substrate-radius-md, 0.5rem);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet {
|
|
3
|
+
--rc-bottom-sheet-bg: var(--substrate-surface-raised, Canvas);
|
|
4
|
+
--rc-bottom-sheet-handle-color: var(--rc-border-color, GrayText);
|
|
5
|
+
--rc-bottom-sheet-handle-radius: var(--substrate-radius-pill, 999px);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet > dialog {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: auto 0 0;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
max-inline-size: var(--rc-bottom-sheet-max-inline-size, 40rem);
|
|
14
|
+
max-block-size: var(--rc-bottom-sheet-max-block-size, 70dvh);
|
|
15
|
+
margin-block: 0;
|
|
16
|
+
margin-inline: auto;
|
|
17
|
+
padding: var(--rc-bottom-sheet-padding, 0 1rem calc(1rem + env(safe-area-inset-bottom, 0px)));
|
|
18
|
+
overflow: auto;
|
|
19
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
20
|
+
border-block-end: 0;
|
|
21
|
+
border-radius: var(--rc-bottom-sheet-radius, 1rem 1rem 0 0);
|
|
22
|
+
background: var(--rc-bottom-sheet-bg, var(--substrate-surface-raised, Canvas));
|
|
23
|
+
color: var(--rc-bottom-sheet-color, var(--rc-field-text, CanvasText));
|
|
24
|
+
box-shadow: var(--rc-bottom-sheet-shadow, var(--substrate-shadow-lg, none));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet > dialog::backdrop {
|
|
28
|
+
background: var(
|
|
29
|
+
--rc-bottom-sheet-scrim,
|
|
30
|
+
var(--rc-dialog-scrim, color-mix(in srgb, CanvasText 32%, transparent))
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
35
|
+
rc-bottom-sheet
|
|
36
|
+
> dialog
|
|
37
|
+
[data-rc-bottom-sheet-handle] {
|
|
38
|
+
position: relative;
|
|
39
|
+
display: block;
|
|
40
|
+
inline-size: var(--rc-bottom-sheet-handle-target-inline-size, 100%);
|
|
41
|
+
min-block-size: var(--rc-bottom-sheet-handle-target-block-size, 3rem);
|
|
42
|
+
margin: var(--rc-bottom-sheet-handle-target-margin, 0);
|
|
43
|
+
padding: 0;
|
|
44
|
+
border: 0;
|
|
45
|
+
border-radius: inherit;
|
|
46
|
+
background: transparent;
|
|
47
|
+
appearance: none;
|
|
48
|
+
cursor: ns-resize;
|
|
49
|
+
touch-action: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
53
|
+
rc-bottom-sheet
|
|
54
|
+
> dialog
|
|
55
|
+
[data-rc-bottom-sheet-handle]::before {
|
|
56
|
+
content: '';
|
|
57
|
+
position: absolute;
|
|
58
|
+
inset-block-start: 50%;
|
|
59
|
+
inset-inline-start: 50%;
|
|
60
|
+
inline-size: var(--rc-bottom-sheet-handle-inline-size, 2rem);
|
|
61
|
+
block-size: var(--rc-bottom-sheet-handle-block-size, 0.25rem);
|
|
62
|
+
border-radius: 0;
|
|
63
|
+
background-color: transparent;
|
|
64
|
+
background-image:
|
|
65
|
+
radial-gradient(
|
|
66
|
+
circle 1px at calc(50% - 5px) 50%,
|
|
67
|
+
var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
|
|
68
|
+
transparent 100%
|
|
69
|
+
),
|
|
70
|
+
radial-gradient(
|
|
71
|
+
circle 1px at 50% 50%,
|
|
72
|
+
var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
|
|
73
|
+
transparent 100%
|
|
74
|
+
),
|
|
75
|
+
radial-gradient(
|
|
76
|
+
circle 1px at calc(50% + 5px) 50%,
|
|
77
|
+
var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
|
|
78
|
+
transparent 100%
|
|
79
|
+
);
|
|
80
|
+
translate: -50% -50%;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
84
|
+
rc-bottom-sheet
|
|
85
|
+
> dialog
|
|
86
|
+
[data-rc-bottom-sheet-handle]:focus-visible {
|
|
87
|
+
outline: 0.125rem solid var(--rc-accent, Highlight);
|
|
88
|
+
outline-offset: 0.25rem;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button {
|
|
3
|
+
--rc-button-bg: var(--substrate-surface-raised, ButtonFace);
|
|
4
|
+
--rc-button-color: var(--rc-button-text, ButtonText);
|
|
5
|
+
--rc-button-border: var(--rc-border, 1px solid ButtonBorder);
|
|
6
|
+
--rc-button-radius: var(--rc-control-radius, 0.5rem);
|
|
7
|
+
--rc-button-block-size: var(--rc-control-block-size, 2.5rem);
|
|
8
|
+
--rc-button-padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
9
|
+
--rc-button-padding-inline: var(--rc-control-padding-inline, 0.75rem);
|
|
10
|
+
--rc-button-gap: var(--rc-control-gap, 0.5rem);
|
|
11
|
+
--rc-button-font: var(--rc-font-weight, 400) var(--rc-font-size, 1em) /
|
|
12
|
+
var(--rc-line-height, normal) var(--rc-font-family, inherit);
|
|
13
|
+
--rc-button-state-layer-bg: currentColor;
|
|
14
|
+
--rc-button-hover-state-layer-opacity: 0.08;
|
|
15
|
+
--rc-button-focus-state-layer-opacity: 0.12;
|
|
16
|
+
--rc-button-pressed-state-layer-opacity: 0.12;
|
|
17
|
+
--rc-button-state-layer-easing: var(--substrate-motion-easing, ease);
|
|
18
|
+
--rc-button-progress-color: var(--rc-button-text, ButtonText);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button > button:focus-visible {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button[disabled] > button:disabled {
|
|
27
|
+
opacity: var(--rc-disabled-opacity, 0.52);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
31
|
+
rc-button[progress][progress-value]::part(progress) {
|
|
32
|
+
inset: 0.25rem;
|
|
33
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
34
|
+
border-radius: calc(var(--rc-control-radius, 0.5rem) - 0.125rem);
|
|
35
|
+
background: color-mix(in srgb, var(--substrate-surface-raised, Canvas) 88%, currentColor);
|
|
36
|
+
font: 600 0.75rem / 1 var(--rc-font-family, inherit);
|
|
37
|
+
letter-spacing: 0.025em;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button[icon-only] {
|
|
41
|
+
--rc-button-icon-size: var(--rc-control-block-size, 2.5rem);
|
|
42
|
+
--rc-icon-font-line-height: var(--rc-button-icon-size, 2.5rem);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card {
|
|
3
|
+
--rc-card-bg: var(--substrate-surface-raised, Canvas);
|
|
4
|
+
--rc-card-color: var(--substrate-on-surface, CanvasText);
|
|
5
|
+
--rc-card-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
--rc-card-border: var(--rc-border, 1px solid ButtonBorder);
|
|
7
|
+
--rc-card-shadow: var(--substrate-shadow-sm, none);
|
|
8
|
+
--rc-card-padding-block: 0.75rem;
|
|
9
|
+
--rc-card-padding-inline: 0.75rem;
|
|
10
|
+
--rc-card-actions-gap: 0.5rem;
|
|
11
|
+
--rc-card-title-font: 600 1rem / 1.4 var(--rc-font-family, inherit);
|
|
12
|
+
--rc-card-subtitle-color: color-mix(in srgb, currentColor 72%, transparent);
|
|
13
|
+
--rc-card-state-layer-bg: currentColor;
|
|
14
|
+
--rc-card-hover-state-layer-opacity: 0.08;
|
|
15
|
+
--rc-card-pressed-state-layer-opacity: 0.12;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card[selected] {
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 0 0 2px var(--rc-accent, Highlight),
|
|
21
|
+
var(--rc-card-shadow);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card[disabled] {
|
|
25
|
+
opacity: var(--rc-disabled-opacity, 0.52);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > :is(h2, h3)[slot='title'] {
|
|
29
|
+
margin: 0;
|
|
30
|
+
color: var(--rc-card-title-color, inherit);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > h2[slot='title'] {
|
|
34
|
+
font-family: var(--rc-font-family, inherit);
|
|
35
|
+
font-size: 1.25rem;
|
|
36
|
+
font-weight: 650;
|
|
37
|
+
line-height: 1.35;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > h3[slot='title'] {
|
|
41
|
+
font-family: var(--rc-font-family, inherit);
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
font-weight: 600;
|
|
44
|
+
line-height: 1.4;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > :is(h2, h3)[slot='title'] > a {
|
|
48
|
+
color: inherit;
|
|
49
|
+
text-decoration: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-carousel {
|
|
3
|
+
--rc-carousel-color: var(--substrate-on-surface, CanvasText);
|
|
4
|
+
--rc-carousel-gap: var(--substrate-control-gap, 0.5rem);
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* A slide is a raised card on the page surface, which is what separates it
|
|
8
|
+
* from the track behind it without needing a border.
|
|
9
|
+
*/
|
|
10
|
+
--rc-carousel-item-background: var(--substrate-surface-raised, Canvas);
|
|
11
|
+
--rc-carousel-item-color: var(--substrate-on-surface, CanvasText);
|
|
12
|
+
--rc-carousel-item-border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
13
|
+
|
|
14
|
+
--rc-carousel-navigation-button-background: color-mix(
|
|
15
|
+
in srgb,
|
|
16
|
+
var(--substrate-surface, Canvas) 88%,
|
|
17
|
+
transparent
|
|
18
|
+
);
|
|
19
|
+
--rc-carousel-navigation-button-color: var(--substrate-on-surface, CanvasText);
|
|
20
|
+
--rc-carousel-navigation-button-size: 2.25rem;
|
|
21
|
+
--rc-carousel-navigation-inset: 0.5rem;
|
|
22
|
+
|
|
23
|
+
--rc-carousel-pagination-item-active-color: var(--rc-accent, Highlight);
|
|
24
|
+
--rc-carousel-pagination-item-color: color-mix(
|
|
25
|
+
in srgb,
|
|
26
|
+
var(--substrate-on-surface-muted, GrayText) 40%,
|
|
27
|
+
transparent
|
|
28
|
+
);
|
|
29
|
+
--rc-carousel-pagination-item-size: 0.5rem;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-chip-group {
|
|
3
|
+
--rc-chip-group-column-gap: var(--substrate-control-gap, 0.5rem);
|
|
4
|
+
--rc-chip-group-row-gap: var(--substrate-control-gap, 0.5rem);
|
|
5
|
+
--rc-chip-group-padding-block: 0.25rem;
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* A scrolling group is padded on the inline axis so a chip snapped to the
|
|
9
|
+
* start does not sit flush against the edge it scrolled from.
|
|
10
|
+
*/
|
|
11
|
+
--rc-chip-group-scroll-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
12
|
+
--rc-chip-group-scrollbar-width: none;
|
|
13
|
+
|
|
14
|
+
--rc-chip-group-toggle-gap: var(--substrate-control-gap, 0.5rem);
|
|
15
|
+
--rc-chip-group-toggle-icon-size: 1.125rem;
|
|
16
|
+
--rc-chip-group-toggle-separator-color: var(--substrate-border-color, ButtonBorder);
|
|
17
|
+
--rc-chip-group-toggle-separator-block-size: 1.5rem;
|
|
18
|
+
--rc-chip-group-toggle-separator-inline-size: 1px;
|
|
19
|
+
--rc-chip-group-toggle-separator-gap: var(--substrate-control-gap, 0.5rem);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-chip {
|
|
3
|
+
--rc-chip-block-size: 2rem;
|
|
4
|
+
--rc-chip-gap: 0px;
|
|
5
|
+
--rc-chip-padding-inline: 0.75rem;
|
|
6
|
+
--rc-chip-border: var(--rc-border);
|
|
7
|
+
--rc-chip-radius: var(--substrate-radius-md, 0.5rem);
|
|
8
|
+
--rc-chip-bg: var(--substrate-surface-raised, ButtonFace);
|
|
9
|
+
--rc-chip-color: var(--substrate-on-surface, ButtonText);
|
|
10
|
+
--rc-chip-font: inherit;
|
|
11
|
+
--rc-chip-text-decoration: none;
|
|
12
|
+
--rc-chip-selected-border-color: var(--rc-accent);
|
|
13
|
+
--rc-chip-selected-bg: var(--rc-highlight, Highlight);
|
|
14
|
+
--rc-chip-selected-color: var(--rc-highlight-text, HighlightText);
|
|
15
|
+
--rc-chip-focus-ring: var(--rc-focus-ring);
|
|
16
|
+
--rc-chip-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
17
|
+
--rc-chip-disabled-opacity: var(--rc-disabled-opacity);
|
|
18
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(anchor) {
|
|
7
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
8
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
9
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
10
|
+
background: var(--rc-field, Field);
|
|
11
|
+
color: var(--rc-field-text, FieldText);
|
|
12
|
+
transition:
|
|
13
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
14
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(anchor):hover {
|
|
18
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(anchor):focus-within {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(listbox) {
|
|
28
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
|
|
29
|
+
--rc-listbox-option-min-block-size: 2.25rem;
|
|
30
|
+
--rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
31
|
+
--rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
32
|
+
--rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
33
|
+
--rc-listbox-hover-color: var(--rc-field-text, FieldText);
|
|
34
|
+
--rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
35
|
+
--rc-listbox-active-color: var(--rc-field-text, FieldText);
|
|
36
|
+
--rc-listbox-selected-bg: var(--rc-highlight, Highlight);
|
|
37
|
+
--rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
|
|
38
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
39
|
+
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
40
|
+
background: var(--substrate-surface-raised, Canvas);
|
|
41
|
+
box-shadow: var(--rc-shadow, none);
|
|
42
|
+
padding-block: 0.25rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(toggle) {
|
|
46
|
+
border-radius: var(--substrate-radius-sm, 0.25rem);
|
|
47
|
+
transition: background-color var(--rc-motion-duration, 160ms)
|
|
48
|
+
var(--substrate-motion-easing, ease);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(toggle):hover,
|
|
52
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox[open]::part(toggle) {
|
|
53
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Substrate tokens onto the public rc-dialog properties. The surface and
|
|
4
|
+
* the fullscreen geometry are drawn by the component's own light-DOM base
|
|
5
|
+
* layer; what is left here is the mapping plus the open and close motion,
|
|
6
|
+
* which depends on state selectors a bounded property cannot express.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog {
|
|
9
|
+
--rc-dialog-border: var(--rc-border, 1px solid ButtonBorder);
|
|
10
|
+
--rc-dialog-radius: var(--substrate-radius-xl, 1rem);
|
|
11
|
+
--rc-dialog-background: var(--substrate-surface-raised, Canvas);
|
|
12
|
+
--rc-dialog-color: var(--rc-field-text, CanvasText);
|
|
13
|
+
--rc-dialog-shadow: var(--substrate-shadow-lg, none);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
transform: translateY(0) scale(1);
|
|
19
|
+
transition:
|
|
20
|
+
display var(--substrate-motion-duration-slow, 240ms) allow-discrete,
|
|
21
|
+
overlay var(--substrate-motion-duration-slow, 240ms) allow-discrete,
|
|
22
|
+
opacity var(--substrate-motion-duration-slow, 240ms) var(--substrate-motion-easing, ease),
|
|
23
|
+
transform var(--substrate-motion-duration-slow, 240ms) var(--substrate-motion-easing, ease);
|
|
24
|
+
transition-behavior: allow-discrete;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog::backdrop {
|
|
28
|
+
transition: opacity var(--substrate-motion-duration-slow, 240ms)
|
|
29
|
+
var(--substrate-motion-easing, ease);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@starting-style {
|
|
33
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog[open] {
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transform: translateY(0.5rem) scale(0.98);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog:not([open]) {
|
|
40
|
+
opacity: 0;
|
|
41
|
+
transform: translateY(0.5rem) scale(0.98);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Substrate tokens onto the public rc-disclosure properties, for both
|
|
4
|
+
* `rc-disclosure` and `rc-accordion`, since a panel reads the same properties
|
|
5
|
+
* either way. The boxes themselves are drawn by the component's own light-DOM
|
|
6
|
+
* base layer.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-disclosure {
|
|
9
|
+
/*
|
|
10
|
+
* Layout stays in theme CSS so a disclosure is laid out before the element
|
|
11
|
+
* upgrades; only the property-driven drawing lives in the component's base
|
|
12
|
+
* layer, which needs JS to install.
|
|
13
|
+
*/
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) :is(rc-disclosure, rc-accordion) {
|
|
18
|
+
--rc-disclosure-border: var(--rc-border, 1px solid ButtonBorder);
|
|
19
|
+
--rc-disclosure-radius: var(--substrate-radius-lg, 0.75rem);
|
|
20
|
+
--rc-disclosure-background: var(--substrate-surface-raised, Canvas);
|
|
21
|
+
--rc-disclosure-color: var(--substrate-on-surface, CanvasText);
|
|
22
|
+
--rc-disclosure-open-shadow: var(--substrate-shadow-sm, none);
|
|
23
|
+
|
|
24
|
+
--rc-disclosure-summary-min-block-size: 2.75rem;
|
|
25
|
+
--rc-disclosure-summary-padding-block: 0.75rem;
|
|
26
|
+
--rc-disclosure-summary-padding-inline: 0.875rem;
|
|
27
|
+
--rc-disclosure-summary-gap: 0.75rem;
|
|
28
|
+
--rc-disclosure-summary-font: 650 var(--substrate-font-size, 0.95rem) /
|
|
29
|
+
var(--substrate-line-height, 1.45) var(--substrate-font-family, sans-serif);
|
|
30
|
+
--rc-disclosure-summary-hover-background: color-mix(
|
|
31
|
+
in srgb,
|
|
32
|
+
var(--rc-accent, Highlight) 8%,
|
|
33
|
+
transparent
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
--rc-disclosure-content-padding-block: 0 0.875rem;
|
|
37
|
+
--rc-disclosure-content-padding-inline: 0.875rem;
|
|
38
|
+
--rc-disclosure-content-color: var(--substrate-on-surface-muted, CanvasText);
|
|
39
|
+
|
|
40
|
+
--rc-disclosure-duration: var(--substrate-motion-spatial-duration-default, 240ms);
|
|
41
|
+
--rc-disclosure-easing: var(--substrate-motion-easing, ease);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
45
|
+
:is(rc-disclosure, rc-accordion)
|
|
46
|
+
> details {
|
|
47
|
+
overflow: clip;
|
|
48
|
+
transition:
|
|
49
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
50
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Substrate replaces the native marker with its own chevron, so it owns both
|
|
55
|
+
* halves of that swap: hiding `::marker` and drawing the affordance. Changing
|
|
56
|
+
* `display` here is safe precisely because this rule also supplies the
|
|
57
|
+
* replacement the lost `list-item` box would have drawn.
|
|
58
|
+
*/
|
|
59
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
60
|
+
:is(rc-disclosure, rc-accordion)
|
|
61
|
+
> details
|
|
62
|
+
> summary {
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
65
|
+
align-items: center;
|
|
66
|
+
transition:
|
|
67
|
+
background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
68
|
+
color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
72
|
+
:is(rc-disclosure, rc-accordion)
|
|
73
|
+
> details
|
|
74
|
+
> summary::marker {
|
|
75
|
+
content: '';
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
79
|
+
:is(rc-disclosure, rc-accordion)
|
|
80
|
+
> details
|
|
81
|
+
> summary::-webkit-details-marker {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
86
|
+
:is(rc-disclosure, rc-accordion)
|
|
87
|
+
> details
|
|
88
|
+
> summary::after {
|
|
89
|
+
content: '';
|
|
90
|
+
inline-size: 0.5rem;
|
|
91
|
+
block-size: 0.5rem;
|
|
92
|
+
border-block-start: 2px solid currentColor;
|
|
93
|
+
border-inline-end: 2px solid currentColor;
|
|
94
|
+
rotate: 45deg;
|
|
95
|
+
transition:
|
|
96
|
+
rotate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
97
|
+
translate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
101
|
+
:is(rc-disclosure, rc-accordion)
|
|
102
|
+
> details[open]
|
|
103
|
+
> summary::after {
|
|
104
|
+
rotate: 135deg;
|
|
105
|
+
translate: 0 -0.125rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
109
|
+
:is(rc-disclosure, rc-accordion)
|
|
110
|
+
> details
|
|
111
|
+
> :not(summary) {
|
|
112
|
+
display: flow-root;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab-menu {
|
|
3
|
+
--rc-fab-menu-size: 3.5rem;
|
|
4
|
+
--rc-fab-menu-trigger-gap: 0.5rem;
|
|
5
|
+
--rc-fab-menu-padding-block: 0;
|
|
6
|
+
--rc-fab-menu-padding-inline: 1rem;
|
|
7
|
+
--rc-fab-menu-appearance: none;
|
|
8
|
+
--rc-fab-menu-border: 0;
|
|
9
|
+
--rc-fab-menu-bg: var(--rc-accent, Highlight);
|
|
10
|
+
--rc-fab-menu-bg-hover: var(--rc-fab-menu-bg);
|
|
11
|
+
--rc-fab-menu-bg-open: var(--rc-fab-menu-bg-hover);
|
|
12
|
+
--rc-fab-menu-color: var(--rc-on-accent, HighlightText);
|
|
13
|
+
--rc-fab-menu-shadow: var(--substrate-shadow-md, var(--rc-shadow-level2, none));
|
|
14
|
+
--rc-fab-menu-shadow-hover: var(--substrate-shadow-lg, var(--rc-shadow-level3, none));
|
|
15
|
+
--rc-fab-menu-shadow-open: var(--rc-fab-menu-shadow-hover);
|
|
16
|
+
--rc-fab-menu-shadow-active: var(--substrate-shadow-md, var(--rc-shadow-level2, none));
|
|
17
|
+
--rc-fab-menu-radius: var(--substrate-radius-lg, 1rem);
|
|
18
|
+
--rc-fab-menu-font: inherit;
|
|
19
|
+
--rc-fab-menu-font-family: inherit;
|
|
20
|
+
--rc-fab-menu-font-size: 0.875rem;
|
|
21
|
+
--rc-fab-menu-font-weight: 500;
|
|
22
|
+
--rc-fab-menu-letter-spacing: 0.00625em;
|
|
23
|
+
--rc-fab-menu-text-decoration: none;
|
|
24
|
+
--rc-fab-menu-user-select: none;
|
|
25
|
+
--rc-fab-menu-transition:
|
|
26
|
+
background var(--rc-motion-duration, 200ms) ease,
|
|
27
|
+
box-shadow var(--rc-motion-duration, 200ms) ease,
|
|
28
|
+
transform var(--rc-motion-duration, 200ms) ease;
|
|
29
|
+
--rc-fab-menu-active-transform: scale(0.96);
|
|
30
|
+
--rc-fab-menu-disabled-opacity: var(--rc-disabled-opacity, 0.38);
|
|
31
|
+
--rc-fab-menu-disabled-shadow: none;
|
|
32
|
+
--rc-fab-menu-focus-ring: var(--rc-focus-ring);
|
|
33
|
+
--rc-fab-menu-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
34
|
+
--rc-fab-menu-popup-duration: var(--rc-motion-duration, 160ms);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab {
|
|
3
|
+
--rc-fab-size: 3.5rem;
|
|
4
|
+
--rc-fab-gap: 0.5rem;
|
|
5
|
+
--rc-fab-padding-block: 0;
|
|
6
|
+
--rc-fab-padding-inline: 1rem;
|
|
7
|
+
--rc-fab-border: 0;
|
|
8
|
+
--rc-fab-bg: var(--rc-accent, Highlight);
|
|
9
|
+
--rc-fab-bg-hover: var(--rc-fab-bg);
|
|
10
|
+
--rc-fab-color: var(--substrate-on-primary, HighlightText);
|
|
11
|
+
--rc-fab-radius: var(--substrate-radius-lg, 0.75rem);
|
|
12
|
+
--rc-fab-shadow: var(--substrate-shadow-md, none);
|
|
13
|
+
--rc-fab-shadow-hover: var(--substrate-shadow-lg, none);
|
|
14
|
+
--rc-fab-shadow-active: var(--rc-fab-shadow);
|
|
15
|
+
--rc-fab-font-family: var(--rc-font-family, inherit);
|
|
16
|
+
--rc-fab-font-size: var(--rc-font-size, 0.875rem);
|
|
17
|
+
--rc-fab-font-weight: 500;
|
|
18
|
+
--rc-fab-letter-spacing: 0.00625em;
|
|
19
|
+
--rc-fab-active-transform: scale(0.96);
|
|
20
|
+
--rc-fab-focus-ring: var(--rc-focus-ring);
|
|
21
|
+
--rc-fab-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
22
|
+
--rc-fab-disabled-opacity: var(--rc-disabled-opacity, 0.38);
|
|
23
|
+
--rc-fab-disabled-shadow: none;
|
|
24
|
+
--rc-fab-transition:
|
|
25
|
+
background var(--rc-motion-duration, 200ms) ease,
|
|
26
|
+
box-shadow var(--rc-motion-duration, 200ms) ease,
|
|
27
|
+
transform var(--rc-motion-duration, 200ms) ease;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab > button {
|
|
31
|
+
transition:
|
|
32
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
33
|
+
transform var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab > button:hover {
|
|
37
|
+
box-shadow: var(--substrate-shadow-lg, none);
|
|
38
|
+
transform: translateY(-1px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab > button:active {
|
|
42
|
+
transform: translateY(0);
|
|
43
|
+
}
|
|
44
|
+
}
|