@rcarls/rc-theme-substrate 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +417 -0
- package/README.md +23 -0
- package/bridge.css +47 -17
- package/components/accordion.css +10 -111
- package/components/adaptive-menu.css +98 -0
- package/components/app-bar.css +1 -5
- package/components/bottom-sheet.css +1 -1
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/dialog.css +15 -11
- package/components/disclosure.css +56 -72
- package/components/fab-menu.css +3 -3
- package/components/field.css +155 -0
- package/components/list-item.css +36 -33
- package/components/listbox.css +4 -2
- package/components/markdown-editor.css +45 -32
- package/components/menu.css +11 -6
- package/components/modes.css +36 -0
- package/components/popover.css +13 -0
- package/components/progress.css +11 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +3 -1
- package/components/segmented-button.css +2 -27
- package/components/select.css +21 -0
- package/components/splitter.css +27 -2
- package/components/textarea.css +3 -2
- package/components/toolbar.css +9 -4
- package/components/tooltip.css +15 -0
- package/components/transfer-list.css +3 -3
- package/components/virtual-canvas.css +10 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +11 -1
- package/css-components/button.css +66 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +80 -0
- package/css-components/disclosure.css +25 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +20 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +34 -5
- package/native.css +249 -0
- package/package.json +5 -1
package/components/accordion.css
CHANGED
|
@@ -1,119 +1,18 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Only the group box. Panels inside an accordion take the same
|
|
4
|
+
* `--rc-disclosure-*` mapping as a standalone disclosure, which disclosure.css
|
|
5
|
+
* sets for `rc-accordion` as well, so the panel recipe is not repeated here.
|
|
6
|
+
*/
|
|
2
7
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion {
|
|
3
|
-
|
|
4
|
-
gap: 0.5rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion > details,
|
|
8
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion > rc-disclosure > details {
|
|
9
|
-
border: var(--rc-border, 1px solid ButtonBorder);
|
|
10
|
-
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
11
|
-
background: var(--substrate-surface-raised, Canvas);
|
|
12
|
-
overflow: clip;
|
|
13
|
-
transition:
|
|
14
|
-
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
15
|
-
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion > details[open],
|
|
19
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
20
|
-
rc-accordion
|
|
21
|
-
> rc-disclosure
|
|
22
|
-
> details[open] {
|
|
23
|
-
box-shadow: var(--substrate-shadow-sm, none);
|
|
24
|
-
}
|
|
8
|
+
--rc-accordion-gap: 0.5rem;
|
|
25
9
|
|
|
26
|
-
|
|
27
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion > rc-disclosure summary {
|
|
10
|
+
/* Laid out before the element upgrades; see disclosure.css. */
|
|
28
11
|
display: grid;
|
|
29
|
-
|
|
30
|
-
gap: 0.75rem;
|
|
31
|
-
align-items: center;
|
|
32
|
-
min-block-size: 2.75rem;
|
|
33
|
-
padding-block: 0.75rem;
|
|
34
|
-
padding-inline: 0.875rem;
|
|
35
|
-
cursor: pointer;
|
|
36
|
-
font-weight: 650;
|
|
37
|
-
transition:
|
|
38
|
-
background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
39
|
-
color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion summary:hover {
|
|
43
|
-
background: color-mix(in srgb, var(--rc-accent, Highlight) 8%, transparent);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion summary::marker {
|
|
47
|
-
content: '';
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
51
|
-
rc-accordion
|
|
52
|
-
summary::-webkit-details-marker {
|
|
53
|
-
display: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion summary::after {
|
|
57
|
-
content: '';
|
|
58
|
-
inline-size: 0.5rem;
|
|
59
|
-
block-size: 0.5rem;
|
|
60
|
-
border-block-start: 2px solid currentColor;
|
|
61
|
-
border-inline-end: 2px solid currentColor;
|
|
62
|
-
rotate: 45deg;
|
|
63
|
-
transition:
|
|
64
|
-
rotate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
65
|
-
translate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion details[open] > summary::after {
|
|
69
|
-
rotate: 135deg;
|
|
70
|
-
translate: 0 -0.125rem;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion details > :not(summary) {
|
|
74
|
-
display: flow-root;
|
|
75
|
-
padding-inline: 0.875rem;
|
|
76
|
-
opacity: 1;
|
|
77
|
-
transition:
|
|
78
|
-
opacity var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
79
|
-
translate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@supports selector(::details-content) {
|
|
83
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion details {
|
|
84
|
-
interpolate-size: allow-keywords;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion details::details-content {
|
|
88
|
-
block-size: 0;
|
|
89
|
-
content-visibility: hidden;
|
|
90
|
-
opacity: 0;
|
|
91
|
-
overflow: clip;
|
|
92
|
-
transition:
|
|
93
|
-
block-size var(--substrate-motion-duration-slow, 240ms)
|
|
94
|
-
var(--substrate-motion-easing, ease),
|
|
95
|
-
content-visibility var(--substrate-motion-duration-slow, 240ms)
|
|
96
|
-
var(--substrate-motion-easing, ease) allow-discrete,
|
|
97
|
-
opacity var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
98
|
-
transition-behavior: allow-discrete;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
102
|
-
rc-accordion
|
|
103
|
-
details[open]::details-content {
|
|
104
|
-
block-size: auto;
|
|
105
|
-
content-visibility: visible;
|
|
106
|
-
opacity: 1;
|
|
107
|
-
}
|
|
12
|
+
gap: var(--rc-accordion-gap, 0.5rem);
|
|
108
13
|
}
|
|
109
14
|
|
|
110
|
-
|
|
111
|
-
:
|
|
112
|
-
rc-accordion
|
|
113
|
-
details[open]
|
|
114
|
-
> :not(summary) {
|
|
115
|
-
opacity: 0;
|
|
116
|
-
translate: 0 -0.25rem;
|
|
117
|
-
}
|
|
15
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-accordion > rc-disclosure {
|
|
16
|
+
display: block;
|
|
118
17
|
}
|
|
119
18
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Declared on the theme root rather than on rc-adaptive-menu so menus
|
|
4
|
+
* rendered inside other shadow roots inherit the same values.
|
|
5
|
+
*/
|
|
6
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
7
|
+
--rc-adaptive-menu-gap: var(--substrate-control-gap, 0.5rem);
|
|
8
|
+
--rc-adaptive-menu-icon-size: 1.25rem;
|
|
9
|
+
|
|
10
|
+
--rc-adaptive-menu-trigger-background: transparent;
|
|
11
|
+
--rc-adaptive-menu-trigger-border: 0;
|
|
12
|
+
--rc-adaptive-menu-trigger-color: var(--substrate-on-surface-muted, ButtonText);
|
|
13
|
+
--rc-adaptive-menu-trigger-block-size: 2.25rem;
|
|
14
|
+
--rc-adaptive-menu-trigger-inline-size: 2.25rem;
|
|
15
|
+
--rc-adaptive-menu-trigger-padding: 0.375rem;
|
|
16
|
+
--rc-adaptive-menu-trigger-radius: var(--substrate-radius-md, 0.5rem);
|
|
17
|
+
--rc-adaptive-menu-trigger-hover-background: color-mix(
|
|
18
|
+
in srgb,
|
|
19
|
+
var(--rc-accent, Highlight) 10%,
|
|
20
|
+
var(--substrate-surface, Canvas)
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* The trigger is drawn at 2.25rem for density, so the hit area is inflated
|
|
25
|
+
* separately to clear the 3rem touch minimum without widening the row.
|
|
26
|
+
*/
|
|
27
|
+
--rc-adaptive-menu-touch-target-block-size: 3rem;
|
|
28
|
+
--rc-adaptive-menu-touch-target-inline-size: 3rem;
|
|
29
|
+
--rc-adaptive-menu-touch-target-overlap-inline-end: 0.375rem;
|
|
30
|
+
|
|
31
|
+
--rc-adaptive-menu-popup-min-inline-size: 12rem;
|
|
32
|
+
|
|
33
|
+
/*
|
|
34
|
+
* The sheet presentation exists because a finger is doing the pointing, so
|
|
35
|
+
* its rows take the larger list item height rather than the menu row height.
|
|
36
|
+
*/
|
|
37
|
+
--rc-adaptive-menu-item-min-block-size: 3rem;
|
|
38
|
+
--rc-adaptive-menu-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
39
|
+
--rc-adaptive-menu-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
40
|
+
--rc-adaptive-menu-item-gap: var(--substrate-item-gap, 0.5rem);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/*
|
|
45
|
+
* An action rc-adaptive-menu moves into its overflow renders as a menu row.
|
|
46
|
+
* rc-adaptive-menu maps the action's own tokens onto its item tokens in rc-base,
|
|
47
|
+
* which sits below every theme layer, so this layer repeats the mapping above the
|
|
48
|
+
* theme's button and menu-button variants (filled, tonal, icon-only sizes, and so
|
|
49
|
+
* on) that would otherwise restyle the row as a standalone control.
|
|
50
|
+
*/
|
|
51
|
+
@layer rc-theme-substrate.overrides {
|
|
52
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
53
|
+
rc-adaptive-menu
|
|
54
|
+
> rc-button[data-rc-action-overflowed] {
|
|
55
|
+
--rc-button-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
56
|
+
--rc-button-icon-size: 100%;
|
|
57
|
+
--rc-button-touch-target-inline-size: 100%;
|
|
58
|
+
--rc-button-touch-target-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
59
|
+
--rc-button-padding-inline: var(
|
|
60
|
+
--rc-adaptive-menu-item-padding-inline,
|
|
61
|
+
var(--rc-item-padding-inline, 0.75em)
|
|
62
|
+
);
|
|
63
|
+
--rc-button-padding-block: var(
|
|
64
|
+
--rc-adaptive-menu-item-padding-block,
|
|
65
|
+
var(--rc-item-padding-block, 0.3em)
|
|
66
|
+
);
|
|
67
|
+
--rc-button-radius: 0;
|
|
68
|
+
--rc-button-bg: transparent;
|
|
69
|
+
--rc-button-color: currentColor;
|
|
70
|
+
--rc-button-border: 0;
|
|
71
|
+
--rc-button-state-layer-bg: currentColor;
|
|
72
|
+
--rc-button-progress-color: currentColor;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
76
|
+
rc-adaptive-menu
|
|
77
|
+
> rc-menu-button[data-rc-action-overflowed] {
|
|
78
|
+
--rc-menu-button-trigger-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
79
|
+
--rc-menu-button-icon-size: 100%;
|
|
80
|
+
--rc-menu-button-touch-target-inline-size: 100%;
|
|
81
|
+
--rc-menu-button-touch-target-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
82
|
+
--rc-menu-button-trigger-padding-block: var(
|
|
83
|
+
--rc-adaptive-menu-item-padding-block,
|
|
84
|
+
var(--rc-item-padding-block, 0.3em)
|
|
85
|
+
);
|
|
86
|
+
--rc-menu-button-trigger-padding-inline: var(
|
|
87
|
+
--rc-adaptive-menu-item-padding-inline,
|
|
88
|
+
var(--rc-item-padding-inline, 0.75em)
|
|
89
|
+
);
|
|
90
|
+
--rc-menu-button-trigger-gap: var(--rc-adaptive-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
91
|
+
--rc-menu-button-trigger-radius: 0;
|
|
92
|
+
--rc-menu-button-trigger-border: 0;
|
|
93
|
+
--rc-menu-button-trigger-background: transparent;
|
|
94
|
+
--rc-menu-button-trigger-color: currentColor;
|
|
95
|
+
--rc-menu-button-trigger-hover-color: currentColor;
|
|
96
|
+
--rc-menu-button-trigger-open-color: currentColor;
|
|
97
|
+
}
|
|
98
|
+
}
|
package/components/app-bar.css
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-app-bar {
|
|
3
|
-
--rc-app-bar-
|
|
4
|
-
in srgb,
|
|
5
|
-
var(--substrate-surface, Canvas) 88%,
|
|
6
|
-
transparent
|
|
7
|
-
);
|
|
3
|
+
--rc-app-bar-bg: color-mix(in srgb, var(--substrate-surface, Canvas) 88%, transparent);
|
|
8
4
|
--rc-app-bar-color: var(--rc-field-text, CanvasText);
|
|
9
5
|
--rc-app-bar-scroll-divider: var(--rc-border, 1px solid ButtonBorder);
|
|
10
6
|
--rc-app-bar-shadow: none;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
[data-rc-bottom-sheet-handle]::before {
|
|
56
56
|
content: '';
|
|
57
57
|
position: absolute;
|
|
58
|
-
inset-block-start: 50
|
|
58
|
+
inset-block-start: var(--rc-bottom-sheet-handle-offset, 50%);
|
|
59
59
|
inset-inline-start: 50%;
|
|
60
60
|
inline-size: var(--rc-bottom-sheet-handle-inline-size, 2rem);
|
|
61
61
|
block-size: var(--rc-bottom-sheet-handle-block-size, 0.25rem);
|
|
@@ -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
|
+
}
|
package/components/dialog.css
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
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
|
+
|
|
2
16
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog {
|
|
3
|
-
border: var(--rc-border, 1px solid ButtonBorder);
|
|
4
|
-
border-radius: var(--substrate-radius-xl, 1rem);
|
|
5
|
-
background: var(--substrate-surface-raised, Canvas);
|
|
6
|
-
color: var(--rc-field-text, CanvasText);
|
|
7
|
-
box-shadow: var(--substrate-shadow-lg, none);
|
|
8
17
|
opacity: 1;
|
|
9
|
-
transform: translateY(0) scale(1);
|
|
10
18
|
transition:
|
|
11
19
|
display var(--substrate-motion-duration-slow, 240ms) allow-discrete,
|
|
12
20
|
overlay var(--substrate-motion-duration-slow, 240ms) allow-discrete,
|
|
13
|
-
opacity var(--substrate-motion-duration-slow, 240ms) var(--substrate-motion-easing, ease)
|
|
14
|
-
transform var(--substrate-motion-duration-slow, 240ms) var(--substrate-motion-easing, ease);
|
|
21
|
+
opacity var(--substrate-motion-duration-slow, 240ms) var(--substrate-motion-easing, ease);
|
|
15
22
|
transition-behavior: allow-discrete;
|
|
16
23
|
}
|
|
17
24
|
|
|
18
25
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog::backdrop {
|
|
19
|
-
background: var(--rc-dialog-scrim, color-mix(in srgb, CanvasText 32%, transparent));
|
|
20
26
|
transition: opacity var(--substrate-motion-duration-slow, 240ms)
|
|
21
27
|
var(--substrate-motion-easing, ease);
|
|
22
28
|
}
|
|
@@ -24,12 +30,10 @@
|
|
|
24
30
|
@starting-style {
|
|
25
31
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog[open] {
|
|
26
32
|
opacity: 0;
|
|
27
|
-
transform: translateY(0.5rem) scale(0.98);
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
|
|
31
36
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog:not([open]) {
|
|
32
37
|
opacity: 0;
|
|
33
|
-
transform: translateY(0.5rem) scale(0.98);
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -1,53 +1,89 @@
|
|
|
1
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
|
+
*/
|
|
2
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
|
+
*/
|
|
3
14
|
display: block;
|
|
4
15
|
}
|
|
5
16
|
|
|
6
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-disclosure
|
|
7
|
-
border: var(--rc-border, 1px solid ButtonBorder);
|
|
8
|
-
|
|
9
|
-
background: var(--substrate-surface-raised, Canvas);
|
|
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 {
|
|
10
47
|
overflow: clip;
|
|
11
48
|
transition:
|
|
12
49
|
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
13
50
|
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
14
51
|
}
|
|
15
52
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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 {
|
|
21
63
|
display: grid;
|
|
22
64
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
23
|
-
gap: 0.75rem;
|
|
24
65
|
align-items: center;
|
|
25
|
-
min-block-size: 2.75rem;
|
|
26
|
-
padding-block: 0.75rem;
|
|
27
|
-
padding-inline: 0.875rem;
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
font-weight: 650;
|
|
30
66
|
transition:
|
|
31
67
|
background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
32
68
|
color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
33
69
|
}
|
|
34
70
|
|
|
35
71
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
36
|
-
rc-disclosure
|
|
72
|
+
:is(rc-disclosure, rc-accordion)
|
|
37
73
|
> details
|
|
38
74
|
> summary::marker {
|
|
39
75
|
content: '';
|
|
40
76
|
}
|
|
41
77
|
|
|
42
78
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
43
|
-
rc-disclosure
|
|
79
|
+
:is(rc-disclosure, rc-accordion)
|
|
44
80
|
> details
|
|
45
81
|
> summary::-webkit-details-marker {
|
|
46
82
|
display: none;
|
|
47
83
|
}
|
|
48
84
|
|
|
49
85
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
50
|
-
rc-disclosure
|
|
86
|
+
:is(rc-disclosure, rc-accordion)
|
|
51
87
|
> details
|
|
52
88
|
> summary::after {
|
|
53
89
|
content: '';
|
|
@@ -62,7 +98,7 @@
|
|
|
62
98
|
}
|
|
63
99
|
|
|
64
100
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
65
|
-
rc-disclosure
|
|
101
|
+
:is(rc-disclosure, rc-accordion)
|
|
66
102
|
> details[open]
|
|
67
103
|
> summary::after {
|
|
68
104
|
rotate: 135deg;
|
|
@@ -70,61 +106,9 @@
|
|
|
70
106
|
}
|
|
71
107
|
|
|
72
108
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
73
|
-
rc-disclosure
|
|
74
|
-
> details
|
|
75
|
-
> summary:hover {
|
|
76
|
-
background: color-mix(in srgb, var(--rc-accent, Highlight) 8%, transparent);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
80
|
-
rc-disclosure
|
|
109
|
+
:is(rc-disclosure, rc-accordion)
|
|
81
110
|
> details
|
|
82
111
|
> :not(summary) {
|
|
83
112
|
display: flow-root;
|
|
84
|
-
padding-inline: 0.875rem;
|
|
85
|
-
opacity: 1;
|
|
86
|
-
transition:
|
|
87
|
-
opacity var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
88
|
-
translate var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@supports selector(::details-content) {
|
|
92
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-disclosure > details {
|
|
93
|
-
interpolate-size: allow-keywords;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
97
|
-
rc-disclosure
|
|
98
|
-
> details::details-content {
|
|
99
|
-
block-size: 0;
|
|
100
|
-
content-visibility: hidden;
|
|
101
|
-
opacity: 0;
|
|
102
|
-
overflow: clip;
|
|
103
|
-
transition:
|
|
104
|
-
block-size var(--substrate-motion-duration-slow, 240ms)
|
|
105
|
-
var(--substrate-motion-easing, ease),
|
|
106
|
-
content-visibility var(--substrate-motion-duration-slow, 240ms)
|
|
107
|
-
var(--substrate-motion-easing, ease) allow-discrete,
|
|
108
|
-
opacity var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
109
|
-
transition-behavior: allow-discrete;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
113
|
-
rc-disclosure
|
|
114
|
-
> details[open]::details-content {
|
|
115
|
-
block-size: auto;
|
|
116
|
-
content-visibility: visible;
|
|
117
|
-
opacity: 1;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
@starting-style {
|
|
122
|
-
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
123
|
-
rc-disclosure
|
|
124
|
-
> details[open]
|
|
125
|
-
> :not(summary) {
|
|
126
|
-
opacity: 0;
|
|
127
|
-
translate: 0 -0.25rem;
|
|
128
|
-
}
|
|
129
113
|
}
|
|
130
114
|
}
|
package/components/fab-menu.css
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
--rc-fab-menu-bg-hover: var(--rc-fab-menu-bg);
|
|
11
11
|
--rc-fab-menu-bg-open: var(--rc-fab-menu-bg-hover);
|
|
12
12
|
--rc-fab-menu-color: var(--rc-on-accent, HighlightText);
|
|
13
|
-
--rc-fab-menu-shadow: var(--substrate-shadow-
|
|
14
|
-
--rc-fab-menu-shadow-hover: var(--substrate-shadow-
|
|
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
15
|
--rc-fab-menu-shadow-open: var(--rc-fab-menu-shadow-hover);
|
|
16
|
-
--rc-fab-menu-shadow-active: var(--substrate-shadow-
|
|
16
|
+
--rc-fab-menu-shadow-active: var(--substrate-shadow-md, var(--rc-shadow-level2, none));
|
|
17
17
|
--rc-fab-menu-radius: var(--substrate-radius-lg, 1rem);
|
|
18
18
|
--rc-fab-menu-font: inherit;
|
|
19
19
|
--rc-fab-menu-font-family: inherit;
|