@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,61 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card {
|
|
3
|
+
--rc-card-bg: var(--md-sys-color-surface-container-low, Canvas);
|
|
4
|
+
--rc-card-color: var(--md-sys-color-on-surface, CanvasText);
|
|
5
|
+
--rc-card-radius: var(--md-sys-shape-corner-medium, 0.75rem);
|
|
6
|
+
--rc-card-shadow:
|
|
7
|
+
0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow, #000) 30%, transparent),
|
|
8
|
+
0 1px 3px 1px color-mix(in srgb, var(--md-sys-color-shadow, #000) 15%, transparent);
|
|
9
|
+
--rc-card-padding-block: 1rem;
|
|
10
|
+
--rc-card-padding-inline: 1rem;
|
|
11
|
+
--rc-card-actions-gap: 0.5rem;
|
|
12
|
+
--rc-card-title-font: var(--md-sys-typescale-title-medium-weight, 500)
|
|
13
|
+
var(--md-sys-typescale-title-medium-size, 1rem) /
|
|
14
|
+
var(--md-sys-typescale-title-medium-line-height, 1.5rem)
|
|
15
|
+
var(--md-sys-typescale-title-medium-font, inherit);
|
|
16
|
+
--rc-card-subtitle-font: var(--md-sys-typescale-body-medium-weight, 400)
|
|
17
|
+
var(--md-sys-typescale-body-medium-size, 0.875rem) /
|
|
18
|
+
var(--md-sys-typescale-body-medium-line-height, 1.25rem)
|
|
19
|
+
var(--md-sys-typescale-body-medium-font, inherit);
|
|
20
|
+
--rc-card-subtitle-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
21
|
+
--rc-card-state-layer-bg: var(--md-sys-color-on-surface, currentColor);
|
|
22
|
+
--rc-card-hover-state-layer-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
|
|
23
|
+
--rc-card-pressed-state-layer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
|
|
24
|
+
--rc-card-state-layer-duration: var(--rc-motion-effects-duration-fast, 150ms);
|
|
25
|
+
--rc-card-state-layer-easing: var(--md-sys-motion-easing-standard, ease);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card[selected] {
|
|
29
|
+
box-shadow:
|
|
30
|
+
0 0 0 2px var(--md-sys-color-primary, Highlight),
|
|
31
|
+
var(--rc-card-shadow);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card[disabled] {
|
|
35
|
+
opacity: var(--rc-disabled-opacity, 0.38);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card > :is(h2, h3)[slot='title'] {
|
|
39
|
+
margin: 0;
|
|
40
|
+
color: var(--rc-card-title-color, inherit);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card > h2[slot='title'] {
|
|
44
|
+
font-family: var(--md-sys-typescale-title-large-font, inherit);
|
|
45
|
+
font-size: var(--md-sys-typescale-title-large-size, 1.375rem);
|
|
46
|
+
font-weight: var(--md-sys-typescale-title-large-weight, 500);
|
|
47
|
+
line-height: var(--md-sys-typescale-title-large-line-height, 1.75rem);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card > h3[slot='title'] {
|
|
51
|
+
font-family: var(--md-sys-typescale-title-medium-font, inherit);
|
|
52
|
+
font-size: var(--md-sys-typescale-title-medium-size, 1rem);
|
|
53
|
+
font-weight: var(--md-sys-typescale-title-medium-weight, 500);
|
|
54
|
+
line-height: var(--md-sys-typescale-title-medium-line-height, 1.5rem);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-card > :is(h2, h3)[slot='title'] > a {
|
|
58
|
+
color: inherit;
|
|
59
|
+
text-decoration: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-carousel {
|
|
3
|
+
--rc-carousel-color: var(--md-sys-color-on-surface, CanvasText);
|
|
4
|
+
--rc-carousel-navigation-button-background: color-mix(
|
|
5
|
+
in srgb,
|
|
6
|
+
var(--md-sys-color-surface, Canvas) 75%,
|
|
7
|
+
transparent
|
|
8
|
+
);
|
|
9
|
+
--rc-carousel-navigation-button-color: var(--md-sys-color-on-surface, CanvasText);
|
|
10
|
+
--rc-carousel-pagination-item-color: color-mix(
|
|
11
|
+
in srgb,
|
|
12
|
+
var(--md-sys-color-on-surface, CanvasText) 40%,
|
|
13
|
+
transparent
|
|
14
|
+
);
|
|
15
|
+
--rc-carousel-pagination-item-active-color: var(--md-sys-color-primary, Highlight);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-carousel-item {
|
|
19
|
+
--rc-carousel-item-color: var(--md-sys-color-on-surface, CanvasText);
|
|
20
|
+
--rc-carousel-item-background: var(--md-sys-color-surface-container, Canvas);
|
|
21
|
+
--rc-carousel-item-border-radius: var(--md-sys-shape-corner-extra-large, 28px);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-chip-group {
|
|
3
|
+
--rc-chip-group-column-gap: 0.5rem;
|
|
4
|
+
--rc-chip-group-row-gap: 0;
|
|
5
|
+
--rc-chip-group-padding-block: 0;
|
|
6
|
+
--rc-chip-group-scroll-padding-inline: 0;
|
|
7
|
+
--rc-chip-group-scrollbar-width: none;
|
|
8
|
+
--rc-chip-group-toggle-gap: 0.5rem;
|
|
9
|
+
--rc-chip-group-toggle-separator-gap: 0.5rem;
|
|
10
|
+
--rc-chip-group-toggle-icon-size: 1.125rem;
|
|
11
|
+
--rc-chip-group-toggle-separator-block-size: 1.5rem;
|
|
12
|
+
--rc-chip-group-toggle-separator-inline-size: 1px;
|
|
13
|
+
--rc-chip-group-toggle-separator-color: var(--md-sys-color-outline-variant, currentColor);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-chip {
|
|
3
|
+
--rc-chip-block-size: 2rem;
|
|
4
|
+
--rc-chip-gap: 0px;
|
|
5
|
+
--rc-chip-padding-inline: 1rem;
|
|
6
|
+
--rc-chip-padding-inline-start: var(--rc-chip-padding-inline);
|
|
7
|
+
--rc-chip-padding-inline-end: var(--rc-chip-padding-inline);
|
|
8
|
+
--rc-chip-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
9
|
+
--rc-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
10
|
+
--rc-chip-bg: var(--md-sys-color-surface-container-low, ButtonFace);
|
|
11
|
+
--rc-chip-color: var(--md-sys-color-on-surface-variant, ButtonText);
|
|
12
|
+
--rc-chip-font: var(--md-sys-typescale-label-large-weight, 500)
|
|
13
|
+
var(--md-sys-typescale-label-large-size, 0.875rem) /
|
|
14
|
+
var(--md-sys-typescale-label-large-line-height, 1.25rem)
|
|
15
|
+
var(--md-sys-typescale-label-large-font, inherit);
|
|
16
|
+
--rc-chip-padding-block: 0;
|
|
17
|
+
--rc-chip-text-decoration: none;
|
|
18
|
+
--rc-chip-selected-border-color: transparent;
|
|
19
|
+
--rc-chip-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
20
|
+
--rc-chip-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
21
|
+
--rc-chip-state-layer-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
22
|
+
--rc-chip-selected-state-layer-color: var(--md-sys-color-on-secondary-container, CanvasText);
|
|
23
|
+
--rc-chip-hover-state-layer-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
|
|
24
|
+
--rc-chip-focus-state-layer-opacity: var(--md-sys-state-focus-state-layer-opacity, 0.12);
|
|
25
|
+
--rc-chip-pressed-state-layer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
|
|
26
|
+
--rc-chip-state-layer-transition-duration: var(--rc-motion-effects-duration-fast, 150ms);
|
|
27
|
+
--rc-chip-state-layer-transition-easing: var(--rc-motion-effects-easing-fast, ease-out);
|
|
28
|
+
--rc-chip-focus-ring: var(--rc-focus-ring);
|
|
29
|
+
--rc-chip-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
30
|
+
--rc-chip-disabled-opacity: var(--rc-disabled-opacity);
|
|
31
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
32
|
+
--rc-chip-remove-offset-inline: 0.25rem;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-chip:has([data-rc-chip-icon]) {
|
|
36
|
+
--rc-chip-gap: 0.5rem;
|
|
37
|
+
--rc-chip-padding-inline-start: 0.5rem;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor) {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
transition:
|
|
5
|
+
border-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
6
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
7
|
+
box-shadow var(--rc-motion-effects-duration-fast, 150ms)
|
|
8
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
9
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
10
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor):hover {
|
|
14
|
+
border-color: var(--md-sys-color-on-surface, CanvasText);
|
|
15
|
+
background: color-mix(
|
|
16
|
+
in srgb,
|
|
17
|
+
var(--md-sys-color-on-surface, CanvasText) 4%,
|
|
18
|
+
var(--md-sys-color-surface, Field)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor):focus-within {
|
|
23
|
+
border-color: var(--md-sys-color-primary, Highlight);
|
|
24
|
+
box-shadow: inset 0 0 0 1px var(--md-sys-color-primary, Highlight);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(chip) {
|
|
28
|
+
min-block-size: 2rem;
|
|
29
|
+
border-color: var(--md-sys-color-outline, ButtonBorder);
|
|
30
|
+
background: transparent;
|
|
31
|
+
color: var(--md-sys-color-on-surface-variant, ButtonText);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(chips) {
|
|
35
|
+
--rc-chip-block-size: 2rem;
|
|
36
|
+
--rc-chip-touch-target-block-size: 3rem;
|
|
37
|
+
--rc-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
38
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(toggle) {
|
|
42
|
+
border-radius: var(--md-sys-shape-corner-full, 999px);
|
|
43
|
+
color: var(
|
|
44
|
+
--md-outlined-text-field-trailing-icon-color,
|
|
45
|
+
var(--md-sys-color-on-surface-variant, CanvasText)
|
|
46
|
+
);
|
|
47
|
+
transition:
|
|
48
|
+
color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease),
|
|
49
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
50
|
+
var(--rc-motion-effects-easing-fast, ease);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(toggle):hover {
|
|
54
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox[open]::part(toggle) {
|
|
58
|
+
color: var(
|
|
59
|
+
--md-outlined-text-field-focus-trailing-icon-color,
|
|
60
|
+
var(--md-sys-color-primary, Highlight)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(chip):hover {
|
|
65
|
+
background: color-mix(
|
|
66
|
+
in srgb,
|
|
67
|
+
var(--md-sys-color-on-surface-variant, CanvasText) 8%,
|
|
68
|
+
transparent
|
|
69
|
+
);
|
|
70
|
+
color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
74
|
+
rc-combobox[popup-mode='dialog']::part(dialog-search) {
|
|
75
|
+
color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
76
|
+
font-family: var(--md-sys-typescale-label-medium-font, inherit);
|
|
77
|
+
font-size: var(--md-sys-typescale-label-medium-size, 0.75rem);
|
|
78
|
+
line-height: var(--md-sys-typescale-label-medium-line-height, 1rem);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
82
|
+
rc-combobox[popup-mode='dialog']::part(dialog-input) {
|
|
83
|
+
min-block-size: 3.5rem;
|
|
84
|
+
padding-inline: 1rem;
|
|
85
|
+
border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
86
|
+
border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
87
|
+
background: transparent;
|
|
88
|
+
color: var(--md-sys-color-on-surface, FieldText);
|
|
89
|
+
font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
90
|
+
font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
91
|
+
line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
92
|
+
|
|
93
|
+
&:focus-visible {
|
|
94
|
+
border-color: var(--md-sys-color-primary, Highlight);
|
|
95
|
+
box-shadow: inset 0 0 0 1px var(--md-sys-color-primary, Highlight);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
100
|
+
rc-combobox[popup-mode='dialog']::part(dialog-listbox) {
|
|
101
|
+
min-block-size: 0;
|
|
102
|
+
padding-block: 0;
|
|
103
|
+
border-radius: 0;
|
|
104
|
+
background: transparent;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/*
|
|
108
|
+
* Propagate Material styles to the embedded rc-listbox host. rc-listbox renders
|
|
109
|
+
* options into its own light DOM inside rc-combobox's shadow root, so inherited
|
|
110
|
+
* custom properties are the stable styling contract for option rows.
|
|
111
|
+
*/
|
|
112
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(listbox) {
|
|
113
|
+
background: var(--md-menu-container-color, var(--md-sys-color-surface-container, Canvas));
|
|
114
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
115
|
+
font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
116
|
+
font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
117
|
+
line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
118
|
+
padding-block: 0.5rem;
|
|
119
|
+
border-radius: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 0.25rem));
|
|
120
|
+
|
|
121
|
+
/* Option sizing */
|
|
122
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
|
|
123
|
+
--rc-listbox-option-min-block-size: 3rem;
|
|
124
|
+
--rc-listbox-option-padding-block: 0;
|
|
125
|
+
--rc-listbox-option-padding-inline: 0.75rem;
|
|
126
|
+
--rc-listbox-option-transition:
|
|
127
|
+
background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
128
|
+
var(--rc-motion-effects-easing-fast, ease),
|
|
129
|
+
color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
|
|
130
|
+
|
|
131
|
+
/* M3 hover state layer (8% on-surface) instead of secondary-container */
|
|
132
|
+
--rc-highlight: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
133
|
+
--rc-highlight-text: var(--md-sys-color-on-surface, CanvasText);
|
|
134
|
+
--rc-listbox-hover-bg: color-mix(
|
|
135
|
+
in srgb,
|
|
136
|
+
var(--md-sys-color-on-surface, CanvasText) 8%,
|
|
137
|
+
transparent
|
|
138
|
+
);
|
|
139
|
+
--rc-listbox-hover-color: var(--md-sys-color-on-surface, CanvasText);
|
|
140
|
+
--rc-listbox-active-bg: color-mix(
|
|
141
|
+
in srgb,
|
|
142
|
+
var(--md-sys-color-on-surface, CanvasText) 12%,
|
|
143
|
+
transparent
|
|
144
|
+
);
|
|
145
|
+
--rc-listbox-active-color: var(--md-sys-color-on-surface, CanvasText);
|
|
146
|
+
|
|
147
|
+
/* Selected state */
|
|
148
|
+
--rc-listbox-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
149
|
+
--rc-listbox-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
150
|
+
--rc-listbox-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
151
|
+
|
|
152
|
+
/* M3 menus use background state layer for keyboard focus, not an outline ring */
|
|
153
|
+
--rc-focus-ring: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Material 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, including the explicit block bound and overflow that keep a tall
|
|
6
|
+
* dialog's corners clipping correctly in Chromium.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-dialog {
|
|
9
|
+
--rc-dialog-min-inline-size: min(17.5rem, calc(100vw - 3rem));
|
|
10
|
+
--rc-dialog-max-inline-size: min(35rem, calc(100vw - 3rem));
|
|
11
|
+
--rc-dialog-max-block-size: calc(100dvh - 3rem);
|
|
12
|
+
--rc-dialog-padding: 1.5rem;
|
|
13
|
+
--rc-dialog-border: 0;
|
|
14
|
+
--rc-dialog-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
|
|
15
|
+
--rc-dialog-background: var(--md-sys-color-surface-container-high, Canvas);
|
|
16
|
+
--rc-dialog-color: var(--md-sys-color-on-surface, CanvasText);
|
|
17
|
+
--rc-dialog-shadow: var(--rc-shadow-level3, var(--rc-shadow, none));
|
|
18
|
+
--rc-dialog-scrim: color-mix(in srgb, var(--md-sys-color-scrim, #000) 32%, transparent);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-dialog > dialog {
|
|
22
|
+
font-family: var(--md-sys-typescale-body-medium-font, inherit);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* Fallback styling for plain, unwrapped buttons in dialog content or
|
|
27
|
+
* actions. Descendants of a defined custom element are excluded because
|
|
28
|
+
* that wrapper owns its native control's presentation. The :where() list
|
|
29
|
+
* identifies native grouping elements that commonly organize dialog
|
|
30
|
+
* content; unlike autonomous custom elements, they should not suppress
|
|
31
|
+
* the fallback treatment.
|
|
32
|
+
*/
|
|
33
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
34
|
+
rc-dialog
|
|
35
|
+
> dialog
|
|
36
|
+
:is(button, [role='button']):not(
|
|
37
|
+
rc-dialog
|
|
38
|
+
> dialog
|
|
39
|
+
:defined:not(
|
|
40
|
+
:where(
|
|
41
|
+
address,
|
|
42
|
+
article,
|
|
43
|
+
aside,
|
|
44
|
+
blockquote,
|
|
45
|
+
dd,
|
|
46
|
+
details,
|
|
47
|
+
div,
|
|
48
|
+
dl,
|
|
49
|
+
dt,
|
|
50
|
+
fieldset,
|
|
51
|
+
figcaption,
|
|
52
|
+
figure,
|
|
53
|
+
footer,
|
|
54
|
+
form,
|
|
55
|
+
header,
|
|
56
|
+
hgroup,
|
|
57
|
+
li,
|
|
58
|
+
main,
|
|
59
|
+
menu,
|
|
60
|
+
nav,
|
|
61
|
+
ol,
|
|
62
|
+
p,
|
|
63
|
+
search,
|
|
64
|
+
section,
|
|
65
|
+
span,
|
|
66
|
+
table,
|
|
67
|
+
tbody,
|
|
68
|
+
td,
|
|
69
|
+
tfoot,
|
|
70
|
+
th,
|
|
71
|
+
thead,
|
|
72
|
+
tr,
|
|
73
|
+
ul
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
*
|
|
77
|
+
) {
|
|
78
|
+
min-block-size: 2.5rem;
|
|
79
|
+
padding-inline: 1.5rem;
|
|
80
|
+
border: 0;
|
|
81
|
+
border-radius: var(--md-sys-shape-corner-full, 999px);
|
|
82
|
+
background: transparent;
|
|
83
|
+
color: var(--md-sys-color-primary, ButtonText);
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
/*
|
|
3
|
+
* Maps Material tokens onto the public rc-disclosure properties. The panel,
|
|
4
|
+
* summary, and content boxes are drawn by the component's own light-DOM base
|
|
5
|
+
* layer; what is left here is the token mapping plus decoration that genuinely
|
|
6
|
+
* depends on a selector.
|
|
7
|
+
*
|
|
8
|
+
* One mapping covers both `rc-disclosure` and `rc-accordion`, since a panel
|
|
9
|
+
* reads the same properties either way.
|
|
10
|
+
*/
|
|
11
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-disclosure {
|
|
12
|
+
/*
|
|
13
|
+
* Layout stays in theme CSS so a disclosure is laid out before the element
|
|
14
|
+
* upgrades; only the property-driven drawing lives in the component's base
|
|
15
|
+
* layer, which needs JS to install.
|
|
16
|
+
*/
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) :is(rc-disclosure, rc-accordion) {
|
|
21
|
+
--rc-theme-material-disclosure-easing: cubic-bezier(
|
|
22
|
+
var(--md-sys-motion-easing-standard-x0, 0.2),
|
|
23
|
+
var(--md-sys-motion-easing-standard-y0, 0),
|
|
24
|
+
var(--md-sys-motion-easing-standard-x1, 0),
|
|
25
|
+
var(--md-sys-motion-easing-standard-y1, 1)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
--rc-disclosure-border: 1px solid var(--md-sys-color-outline-variant, ButtonBorder);
|
|
29
|
+
--rc-disclosure-radius: var(--md-sys-shape-corner-large, 1rem);
|
|
30
|
+
--rc-disclosure-background: var(--md-sys-color-surface-container-low, Canvas);
|
|
31
|
+
--rc-disclosure-color: var(--md-sys-color-on-surface, CanvasText);
|
|
32
|
+
--rc-disclosure-open-background: var(--md-sys-color-surface-container, Canvas);
|
|
33
|
+
--rc-disclosure-open-shadow: var(
|
|
34
|
+
--rc-shadow-level1,
|
|
35
|
+
0 1px 2px 0 rgb(0 0 0 / 0.3),
|
|
36
|
+
0 1px 3px 1px rgb(0 0 0 / 0.15)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
--rc-disclosure-summary-min-block-size: 3.5rem;
|
|
40
|
+
--rc-disclosure-summary-padding-block: 0.75rem;
|
|
41
|
+
--rc-disclosure-summary-padding-inline: 1rem;
|
|
42
|
+
--rc-disclosure-summary-color: var(--md-sys-color-on-surface, CanvasText);
|
|
43
|
+
--rc-disclosure-summary-font: var(--md-sys-typescale-title-small-weight, 500)
|
|
44
|
+
var(--md-sys-typescale-title-small-size, 0.875rem) /
|
|
45
|
+
var(--md-sys-typescale-title-small-line-height, 1.25rem)
|
|
46
|
+
var(--md-sys-typescale-title-small-font, sans-serif);
|
|
47
|
+
--rc-disclosure-summary-marker-color: var(--md-sys-color-on-surface-variant, GrayText);
|
|
48
|
+
--rc-disclosure-summary-hover-background: color-mix(
|
|
49
|
+
in srgb,
|
|
50
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
51
|
+
calc(var(--md-sys-state-hover-state-layer-opacity, 0.08) * 100%),
|
|
52
|
+
transparent
|
|
53
|
+
);
|
|
54
|
+
--rc-disclosure-focus-ring-offset: -2px;
|
|
55
|
+
|
|
56
|
+
--rc-disclosure-content-padding-block: 0 1rem;
|
|
57
|
+
--rc-disclosure-content-padding-inline: 1rem;
|
|
58
|
+
--rc-disclosure-content-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
59
|
+
--rc-disclosure-content-font: var(--md-sys-typescale-body-medium-size, 0.875rem) /
|
|
60
|
+
var(--md-sys-typescale-body-medium-line-height, 1.25rem)
|
|
61
|
+
var(--md-sys-typescale-body-medium-font, sans-serif);
|
|
62
|
+
|
|
63
|
+
--rc-disclosure-duration: var(--rc-motion-effects-duration-slow, 300ms);
|
|
64
|
+
--rc-disclosure-easing: var(--rc-theme-material-disclosure-easing);
|
|
65
|
+
--rc-accordion-gap: 0.125rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* Clipping keeps the summary's hover layer and the animating content inside
|
|
70
|
+
* the corner radius, and the panel cross-fades its own surface as it opens.
|
|
71
|
+
*/
|
|
72
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) :is(rc-disclosure, rc-accordion) > details {
|
|
73
|
+
overflow: clip;
|
|
74
|
+
transition:
|
|
75
|
+
background-color var(--rc-motion-effects-duration-default, 200ms)
|
|
76
|
+
var(--rc-theme-material-disclosure-easing),
|
|
77
|
+
border-color var(--rc-motion-effects-duration-default, 200ms)
|
|
78
|
+
var(--rc-theme-material-disclosure-easing),
|
|
79
|
+
box-shadow var(--rc-motion-effects-duration-default, 200ms)
|
|
80
|
+
var(--rc-theme-material-disclosure-easing);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
84
|
+
:is(rc-disclosure, rc-accordion)
|
|
85
|
+
> details
|
|
86
|
+
> summary {
|
|
87
|
+
-webkit-tap-highlight-color: transparent;
|
|
88
|
+
border-radius: calc(var(--md-sys-shape-corner-large, 1rem) - 1px);
|
|
89
|
+
transition: background-color var(--rc-motion-effects-duration-fast, 150ms)
|
|
90
|
+
var(--rc-theme-material-disclosure-easing);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
94
|
+
:is(rc-disclosure, rc-accordion)
|
|
95
|
+
> details
|
|
96
|
+
> summary:active {
|
|
97
|
+
background: color-mix(
|
|
98
|
+
in srgb,
|
|
99
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
100
|
+
calc(var(--md-sys-state-pressed-state-layer-opacity, 0.12) * 100%),
|
|
101
|
+
transparent
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) 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(
|
|
10
|
+
--md-fab-container-color,
|
|
11
|
+
var(--md-sys-color-primary-container, ButtonFace)
|
|
12
|
+
);
|
|
13
|
+
--rc-fab-menu-color: var(
|
|
14
|
+
--md-fab-icon-color,
|
|
15
|
+
var(--md-sys-color-on-primary-container, ButtonText)
|
|
16
|
+
);
|
|
17
|
+
--rc-fab-menu-shadow: var(--rc-shadow-level3);
|
|
18
|
+
--rc-fab-menu-bg-hover: var(--rc-fab-menu-bg);
|
|
19
|
+
--rc-fab-menu-bg-open: var(--rc-fab-menu-bg-hover);
|
|
20
|
+
--rc-fab-menu-shadow-hover: var(--rc-shadow-level4);
|
|
21
|
+
--rc-fab-menu-shadow-open: var(--rc-fab-menu-shadow-hover);
|
|
22
|
+
--rc-fab-menu-shadow-active: var(--rc-shadow-level3);
|
|
23
|
+
--rc-fab-menu-radius: var(--md-fab-container-shape, var(--md-sys-shape-corner-large, 1rem));
|
|
24
|
+
--rc-fab-menu-font-family: var(
|
|
25
|
+
--md-fab-label-text-font,
|
|
26
|
+
var(--md-sys-typescale-label-large-font, inherit)
|
|
27
|
+
);
|
|
28
|
+
--rc-fab-menu-font-size: var(
|
|
29
|
+
--md-fab-label-text-size,
|
|
30
|
+
var(--md-sys-typescale-label-large-size, 0.875rem)
|
|
31
|
+
);
|
|
32
|
+
--rc-fab-menu-font-weight: var(
|
|
33
|
+
--md-fab-label-text-weight,
|
|
34
|
+
var(--md-sys-typescale-label-large-weight, 500)
|
|
35
|
+
);
|
|
36
|
+
--rc-fab-menu-letter-spacing: var(
|
|
37
|
+
--md-fab-label-text-tracking,
|
|
38
|
+
var(--md-sys-typescale-label-large-tracking, 0.00625em)
|
|
39
|
+
);
|
|
40
|
+
--rc-fab-menu-text-decoration: none;
|
|
41
|
+
--rc-fab-menu-user-select: none;
|
|
42
|
+
--rc-fab-menu-transition:
|
|
43
|
+
background var(--md-sys-motion-duration-short4, 200ms) ease,
|
|
44
|
+
box-shadow var(--md-sys-motion-duration-short4, 200ms) ease,
|
|
45
|
+
transform var(--md-sys-motion-duration-short4, 200ms) ease;
|
|
46
|
+
--rc-fab-menu-active-transform: scale(0.96);
|
|
47
|
+
--rc-fab-menu-disabled-opacity: 0.38;
|
|
48
|
+
--rc-fab-menu-disabled-shadow: none;
|
|
49
|
+
--rc-fab-menu-focus-ring: var(--rc-focus-ring);
|
|
50
|
+
--rc-fab-menu-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
51
|
+
--rc-fab-menu-popup-duration: var(--md-sys-motion-duration-short3, 150ms);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab-menu > button:hover {
|
|
55
|
+
--rc-fab-menu-bg-hover: color-mix(
|
|
56
|
+
in srgb,
|
|
57
|
+
var(--md-fab-hover-icon-color, var(--md-sys-color-on-primary-container, ButtonText)) 8%,
|
|
58
|
+
var(--rc-fab-menu-bg, var(--md-sys-color-primary-container, ButtonFace))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab-menu > button:active {
|
|
63
|
+
--rc-fab-menu-bg-open: color-mix(
|
|
64
|
+
in srgb,
|
|
65
|
+
var(--md-fab-pressed-icon-color, var(--md-sys-color-on-primary-container, ButtonText)) 12%,
|
|
66
|
+
var(--rc-fab-menu-bg, var(--md-sys-color-primary-container, ButtonFace))
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab-menu.rc-fab--small {
|
|
71
|
+
--rc-fab-menu-size: 2.5rem;
|
|
72
|
+
--rc-fab-menu-radius: var(
|
|
73
|
+
--md-fab-small-container-shape,
|
|
74
|
+
var(--md-sys-shape-corner-medium, 0.75rem)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab-menu.rc-fab--large {
|
|
79
|
+
--rc-fab-menu-size: 6rem;
|
|
80
|
+
--rc-fab-menu-radius: var(
|
|
81
|
+
--md-fab-large-container-shape,
|
|
82
|
+
var(--md-sys-shape-corner-extra-large, 1.75rem)
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) 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-hover: var(--rc-fab-bg);
|
|
9
|
+
--rc-fab-active-transform: scale(0.96);
|
|
10
|
+
--rc-fab-focus-ring: var(--rc-focus-ring);
|
|
11
|
+
--rc-fab-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
12
|
+
--rc-fab-disabled-opacity: var(--rc-disabled-opacity, 0.38);
|
|
13
|
+
--rc-fab-disabled-shadow: none;
|
|
14
|
+
--rc-fab-transition:
|
|
15
|
+
background var(--rc-motion-duration, 200ms) ease,
|
|
16
|
+
box-shadow var(--rc-motion-duration, 200ms) ease,
|
|
17
|
+
transform var(--rc-motion-duration, 200ms) ease;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab > button:hover {
|
|
21
|
+
background: color-mix(
|
|
22
|
+
in srgb,
|
|
23
|
+
var(--md-fab-hover-icon-color, var(--md-sys-color-on-primary-container, ButtonText)) 8%,
|
|
24
|
+
var(--rc-fab-bg, var(--md-sys-color-primary-container, ButtonFace))
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab > button:active {
|
|
29
|
+
background: color-mix(
|
|
30
|
+
in srgb,
|
|
31
|
+
var(--md-fab-pressed-icon-color, var(--md-sys-color-on-primary-container, ButtonText)) 12%,
|
|
32
|
+
var(--rc-fab-bg, var(--md-sys-color-primary-container, ButtonFace))
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab.rc-fab--small {
|
|
37
|
+
--rc-fab-size: 2.5rem;
|
|
38
|
+
--rc-fab-radius: var(
|
|
39
|
+
--md-fab-small-container-shape,
|
|
40
|
+
var(--md-sys-shape-corner-medium, 0.75rem)
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab.rc-fab--large {
|
|
45
|
+
--rc-fab-size: 6rem;
|
|
46
|
+
--rc-fab-radius: var(
|
|
47
|
+
--md-fab-large-container-shape,
|
|
48
|
+
var(--md-sys-shape-corner-extra-large, 1.75rem)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|