@rcarls/rc-theme-material 0.3.2 → 0.4.1
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 +83 -0
- package/README.md +18 -3
- package/bridge.css +185 -14
- package/components/app-bar.css +28 -0
- package/components/bottom-sheet.css +132 -0
- package/components/button.css +57 -0
- package/components/card.css +59 -0
- package/components/chip.css +28 -0
- package/components/combobox.css +18 -5
- package/components/dialog.css +4 -1
- package/components/fab-menu.css +85 -0
- package/components/fab.css +34 -0
- package/components/icons.css +19 -0
- package/components/list-item.css +87 -0
- package/components/listbox.css +4 -2
- package/components/markdown-editor.css +30 -1
- package/components/menu-button.css +2 -0
- package/components/menu.css +5 -6
- package/components/navigation-bar.css +78 -0
- package/components/navigation-rail.css +134 -0
- package/components/search-bar.css +23 -0
- package/components/segmented-button.css +44 -0
- package/components/select.css +20 -6
- package/components/snackbar.css +23 -0
- package/components/switch.css +33 -0
- package/components/transfer-list.css +1 -1
- package/components.css +13 -0
- package/package.json +3 -2
- package/state-layer.css +33 -0
|
@@ -0,0 +1,28 @@
|
|
|
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-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
7
|
+
--rc-chip-radius: var(--md-sys-shape-corner-small, 0.5rem);
|
|
8
|
+
--rc-chip-bg: var(--md-sys-color-surface-container-low, ButtonFace);
|
|
9
|
+
--rc-chip-color: var(--md-sys-color-on-surface-variant, ButtonText);
|
|
10
|
+
--rc-chip-font: inherit;
|
|
11
|
+
--rc-chip-text-decoration: none;
|
|
12
|
+
--rc-chip-selected-border-color: transparent;
|
|
13
|
+
--rc-chip-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
14
|
+
--rc-chip-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
15
|
+
--rc-chip-state-layer-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
16
|
+
--rc-chip-selected-state-layer-color: var(--md-sys-color-on-secondary-container, CanvasText);
|
|
17
|
+
--rc-chip-hover-state-layer-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
|
|
18
|
+
--rc-chip-focus-state-layer-opacity: var(--md-sys-state-focus-state-layer-opacity, 0.12);
|
|
19
|
+
--rc-chip-pressed-state-layer-opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
|
|
20
|
+
--rc-chip-state-layer-transition-duration: var(--rc-motion-effects-duration-fast, 150ms);
|
|
21
|
+
--rc-chip-state-layer-transition-easing: var(--rc-motion-effects-easing-fast, ease-out);
|
|
22
|
+
--rc-chip-focus-ring: var(--rc-focus-ring);
|
|
23
|
+
--rc-chip-focus-ring-offset: var(--rc-focus-ring-offset);
|
|
24
|
+
--rc-chip-disabled-opacity: var(--rc-disabled-opacity);
|
|
25
|
+
--rc-chip-remove-target-size: 1.5rem;
|
|
26
|
+
--rc-chip-remove-offset-inline: 0.25rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
package/components/combobox.css
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
@layer rc-theme-material.components {
|
|
2
2
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor) {
|
|
3
3
|
box-sizing: border-box;
|
|
4
|
-
transition:
|
|
4
|
+
transition:
|
|
5
|
+
border-color 150ms ease,
|
|
6
|
+
box-shadow 150ms ease,
|
|
7
|
+
background-color 150ms ease;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor):hover {
|
|
8
11
|
border-color: var(--md-sys-color-on-surface, CanvasText);
|
|
9
|
-
background: color-mix(
|
|
12
|
+
background: color-mix(
|
|
13
|
+
in srgb,
|
|
14
|
+
var(--md-sys-color-on-surface, CanvasText) 4%,
|
|
15
|
+
var(--md-sys-color-surface, Field)
|
|
16
|
+
);
|
|
10
17
|
}
|
|
11
18
|
|
|
12
19
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(anchor):focus-within {
|
|
@@ -27,7 +34,9 @@
|
|
|
27
34
|
--md-outlined-text-field-trailing-icon-color,
|
|
28
35
|
var(--md-sys-color-on-surface-variant, CanvasText)
|
|
29
36
|
);
|
|
30
|
-
transition:
|
|
37
|
+
transition:
|
|
38
|
+
color 150ms ease,
|
|
39
|
+
background-color 150ms ease;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
42
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(toggle):hover {
|
|
@@ -42,7 +51,11 @@
|
|
|
42
51
|
}
|
|
43
52
|
|
|
44
53
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-combobox::part(chip):hover {
|
|
45
|
-
background: color-mix(
|
|
54
|
+
background: color-mix(
|
|
55
|
+
in srgb,
|
|
56
|
+
var(--md-sys-color-on-surface-variant, CanvasText) 8%,
|
|
57
|
+
transparent
|
|
58
|
+
);
|
|
46
59
|
color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
47
60
|
}
|
|
48
61
|
|
|
@@ -61,7 +74,7 @@
|
|
|
61
74
|
border-radius: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 0.25rem));
|
|
62
75
|
|
|
63
76
|
/* Option sizing */
|
|
64
|
-
--rc-listbox-option-gap: 0.75rem;
|
|
77
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
|
|
65
78
|
--rc-listbox-option-min-block-size: 3rem;
|
|
66
79
|
--rc-listbox-option-padding-block: 0;
|
|
67
80
|
--rc-listbox-option-padding-inline: 0.75rem;
|
package/components/dialog.css
CHANGED
|
@@ -11,7 +11,10 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-dialog > dialog::backdrop {
|
|
14
|
-
background:
|
|
14
|
+
background: var(
|
|
15
|
+
--rc-dialog-scrim,
|
|
16
|
+
color-mix(in srgb, var(--md-sys-color-scrim, #000) 32%, transparent)
|
|
17
|
+
);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
@@ -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
|
+
}
|
package/components/fab.css
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
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
|
+
|
|
2
20
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-fab > button:hover {
|
|
3
21
|
background: color-mix(
|
|
4
22
|
in srgb,
|
|
@@ -14,4 +32,20 @@
|
|
|
14
32
|
var(--rc-fab-bg, var(--md-sys-color-primary-container, ButtonFace))
|
|
15
33
|
);
|
|
16
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
|
+
}
|
|
17
51
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
3
|
+
:where(
|
|
4
|
+
[data-rc-icon],
|
|
5
|
+
[data-rc-button-icon],
|
|
6
|
+
[data-rc-button-selected-icon],
|
|
7
|
+
[data-rc-navigation-icon]
|
|
8
|
+
) {
|
|
9
|
+
display: inline-grid;
|
|
10
|
+
place-items: center;
|
|
11
|
+
font-size: var(--rc-icon-font-size, 1.5rem);
|
|
12
|
+
/*
|
|
13
|
+
* Unlayered icon-font boilerplate otherwise beats this layered theme rule.
|
|
14
|
+
* Keep the geometry invariant important, but let consumers opt out by
|
|
15
|
+
* overriding the normally-cascaded custom property.
|
|
16
|
+
*/
|
|
17
|
+
line-height: var(--rc-icon-font-line-height, var(--rc-icon-font-size, 1.5rem)) !important;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) {
|
|
3
|
+
--rc-list-item-gap: 1rem;
|
|
4
|
+
--rc-list-item-min-block-size: 3rem;
|
|
5
|
+
--rc-list-item-padding-block: 0;
|
|
6
|
+
--rc-list-item-padding-inline: 1rem;
|
|
7
|
+
--rc-list-item-divider: 0;
|
|
8
|
+
--rc-list-item-bg: transparent;
|
|
9
|
+
--rc-list-item-color: var(--md-sys-color-on-surface, CanvasText);
|
|
10
|
+
--rc-list-item-supporting-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
11
|
+
--rc-list-item-hover-bg: color-mix(
|
|
12
|
+
in srgb,
|
|
13
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
14
|
+
calc(var(--md-sys-state-hover-state-layer-opacity, 0.08) * 100%),
|
|
15
|
+
transparent
|
|
16
|
+
);
|
|
17
|
+
--rc-list-item-active-bg: color-mix(
|
|
18
|
+
in srgb,
|
|
19
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
20
|
+
calc(var(--md-sys-state-pressed-state-layer-opacity, 0.12) * 100%),
|
|
21
|
+
transparent
|
|
22
|
+
);
|
|
23
|
+
--rc-list-item-selected-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
24
|
+
--rc-list-item-selected-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
25
|
+
--rc-list-item-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list {
|
|
29
|
+
list-style: none;
|
|
30
|
+
margin: 0;
|
|
31
|
+
padding: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--rc-list-item-gap);
|
|
38
|
+
min-block-size: var(--rc-list-item-min-block-size);
|
|
39
|
+
padding: var(--rc-list-item-padding-block) var(--rc-list-item-padding-inline);
|
|
40
|
+
border-block-end: var(--rc-list-item-divider);
|
|
41
|
+
background: var(--rc-list-item-bg);
|
|
42
|
+
color: var(--rc-list-item-color);
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__start,
|
|
47
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__trailing,
|
|
48
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__end {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__body {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex: 1 1 auto;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
min-inline-size: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__headline {
|
|
62
|
+
color: var(--rc-list-item-color);
|
|
63
|
+
font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
64
|
+
font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
65
|
+
line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list-item__supporting {
|
|
69
|
+
color: var(--rc-list-item-supporting-color);
|
|
70
|
+
font-family: var(--md-sys-typescale-body-medium-font, inherit);
|
|
71
|
+
font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
|
|
72
|
+
line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-listbox,
|
|
76
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) [part~='listbox'] {
|
|
77
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap);
|
|
78
|
+
--rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size);
|
|
79
|
+
--rc-listbox-option-padding-block: var(--rc-list-item-padding-block);
|
|
80
|
+
--rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline);
|
|
81
|
+
--rc-listbox-hover-bg: var(--rc-list-item-hover-bg);
|
|
82
|
+
--rc-listbox-active-bg: var(--rc-list-item-active-bg);
|
|
83
|
+
--rc-listbox-selected-bg: var(--rc-list-item-selected-bg);
|
|
84
|
+
--rc-listbox-selected-color: var(--rc-list-item-selected-color);
|
|
85
|
+
--rc-listbox-disabled-opacity: var(--rc-list-item-disabled-opacity);
|
|
86
|
+
}
|
|
87
|
+
}
|
package/components/listbox.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
font-family: var(--md-sys-typescale-body-large-font, inherit);
|
|
13
13
|
font-size: var(--md-sys-typescale-body-large-size, 1rem);
|
|
14
14
|
line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
|
|
15
|
-
--rc-listbox-option-gap: 0.75rem;
|
|
15
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
|
|
16
16
|
--rc-listbox-option-min-block-size: 3rem;
|
|
17
17
|
--rc-listbox-option-padding-block: 0;
|
|
18
18
|
--rc-listbox-option-padding-inline: 0.75rem;
|
|
@@ -34,7 +34,9 @@
|
|
|
34
34
|
--rc-listbox-disabled-opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
37
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
38
|
+
rc-listbox[checkmark]
|
|
39
|
+
[part~='option-checkmark'] {
|
|
38
40
|
inline-size: 1.5rem;
|
|
39
41
|
flex-shrink: 0;
|
|
40
42
|
text-align: center;
|
|
@@ -3,11 +3,40 @@
|
|
|
3
3
|
--rme-background: var(--md-sys-color-surface, Canvas);
|
|
4
4
|
--rme-color: var(--md-sys-color-on-surface, CanvasText);
|
|
5
5
|
--rme-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
6
|
-
--rme-border-radius: 0 0 var(--md-sys-shape-corner-small, 0.5rem)
|
|
6
|
+
--rme-border-radius: 0 0 var(--md-sys-shape-corner-small, 0.5rem)
|
|
7
|
+
var(--md-sys-shape-corner-small, 0.5rem);
|
|
7
8
|
--rme-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
|
|
8
9
|
--rme-padding: 1rem;
|
|
9
10
|
--rme-toolbar-gap: 0.25rem;
|
|
10
11
|
--rme-toolbar-button-size: 2.5rem;
|
|
12
|
+
--rme-toolbar-padding: 0.25rem;
|
|
13
|
+
--rme-toolbar-radius: var(--md-sys-shape-corner-small, 0.5rem)
|
|
14
|
+
var(--md-sys-shape-corner-small, 0.5rem) 0 0;
|
|
15
|
+
--rme-toolbar-background: var(--md-sys-color-surface-container, Canvas);
|
|
16
|
+
--rme-toolbar-color: var(--md-sys-color-on-surface, CanvasText);
|
|
17
|
+
--rme-toolbar-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
18
|
+
--rme-toolbar-button-color: var(--md-sys-color-on-surface-variant, ButtonText);
|
|
19
|
+
--rme-toolbar-button-border: 0;
|
|
20
|
+
--rme-toolbar-button-radius: var(--md-sys-shape-corner-full, 999px);
|
|
21
|
+
--rme-toolbar-button-active-background: var(--md-sys-color-secondary-container, Highlight);
|
|
22
|
+
--rme-toolbar-button-active-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
23
|
+
--rme-toolbar-button-active-border: 0;
|
|
24
|
+
--rme-toolbar-button-hover-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
|
|
25
|
+
--rme-toolbar-button-focus-opacity: var(--md-sys-state-focus-state-layer-opacity, 0.12);
|
|
26
|
+
--rme-toolbar-button-pressed-opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
|
|
27
|
+
--rme-toolbar-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
|
|
28
|
+
--rme-toolbar-focus-outline-offset: 1px;
|
|
29
|
+
--rme-toolbar-select-background: var(--md-sys-color-surface-container-highest, Field);
|
|
30
|
+
--rme-toolbar-select-color: var(--md-sys-color-on-surface, FieldText);
|
|
31
|
+
--rme-toolbar-select-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
32
|
+
--rme-toolbar-select-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
33
|
+
--rme-toolbar-select-active-background: var(--md-sys-color-secondary-container, Highlight);
|
|
34
|
+
--rme-toolbar-select-active-color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
35
|
+
--rme-toolbar-select-active-border-color: var(--md-sys-color-primary, Highlight);
|
|
36
|
+
--rme-toolbar-input-background: var(--md-sys-color-surface-container-highest, Field);
|
|
37
|
+
--rme-toolbar-input-color: var(--md-sys-color-on-surface, FieldText);
|
|
38
|
+
--rme-toolbar-input-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
|
|
39
|
+
--rme-toolbar-input-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
|
|
11
40
|
}
|
|
12
41
|
|
|
13
42
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-markdown-editor::part(rich-view) {
|
|
@@ -16,5 +16,7 @@
|
|
|
16
16
|
--rc-menu-button-trigger-hover-color: var(--md-sys-color-primary, ButtonText);
|
|
17
17
|
--rc-menu-button-trigger-open-background: var(--md-sys-color-secondary-container, ButtonFace);
|
|
18
18
|
--rc-menu-button-trigger-open-color: var(--md-sys-color-on-secondary-container, ButtonText);
|
|
19
|
+
--rc-menu-button-indicator-size: 1.5rem;
|
|
20
|
+
--rc-menu-button-indicator-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
19
21
|
}
|
|
20
22
|
}
|
package/components/menu.css
CHANGED
|
@@ -41,9 +41,6 @@
|
|
|
41
41
|
/* Trailing shortcut labels (label-large) */
|
|
42
42
|
--rc-menu-shortcut-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
|
43
43
|
--rc-menu-shortcut-color: var(--md-sys-color-on-surface-variant, GrayText);
|
|
44
|
-
--rc-menu-submenu-indicator-size: 1.25rem;
|
|
45
|
-
--rc-menu-submenu-indicator-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
46
|
-
|
|
47
44
|
/* Dividers: outline-variant, full-width by default */
|
|
48
45
|
--rc-menu-separator-border: 1px solid var(--md-sys-color-outline-variant, ButtonBorder);
|
|
49
46
|
--rc-menu-separator-margin-block: 0.5rem;
|
|
@@ -62,8 +59,7 @@
|
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
/* Current item (navigation active / selected radio row) gets secondary-container */
|
|
65
|
-
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
66
|
-
rc-menu [aria-current='true'] {
|
|
62
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-menu [aria-current='true'] {
|
|
67
63
|
background: var(--md-sys-color-secondary-container, Highlight);
|
|
68
64
|
color: var(--md-sys-color-on-secondary-container, HighlightText);
|
|
69
65
|
}
|
|
@@ -84,7 +80,10 @@
|
|
|
84
80
|
/* Separators inside role="group" are inset by the item padding on both sides.
|
|
85
81
|
This matches the M3 spec for grouped menus (e.g. radio group segments). */
|
|
86
82
|
:where(.rc-theme-material, :host(.rc-theme-material)) rc-menu [role='group'] > hr,
|
|
87
|
-
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
83
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
84
|
+
rc-menu
|
|
85
|
+
[role='group']
|
|
86
|
+
> [role='separator'] {
|
|
88
87
|
--rc-menu-separator-margin-inline: var(--rc-menu-item-padding-inline, 0.75rem);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-bar {
|
|
3
|
+
--rc-navigation-bar-bg: var(--md-sys-color-surface-container, Canvas);
|
|
4
|
+
--rc-navigation-bar-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
5
|
+
--rc-navigation-bar-block-size: calc(5rem + env(safe-area-inset-bottom, 0px));
|
|
6
|
+
--rc-navigation-bar-padding-block: 0 0;
|
|
7
|
+
--rc-navigation-bar-padding-inline: 0;
|
|
8
|
+
--rc-navigation-bar-item-min-block-size: 5rem;
|
|
9
|
+
--rc-navigation-bar-item-padding-block: 0.75rem 1rem;
|
|
10
|
+
--rc-navigation-bar-item-padding-inline: 0.75rem;
|
|
11
|
+
--rc-navigation-bar-item-gap: 0.25rem;
|
|
12
|
+
--rc-navigation-bar-item-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
13
|
+
--rc-navigation-bar-item-text-decoration: none;
|
|
14
|
+
--rc-navigation-bar-active-color: var(--md-sys-color-on-surface, CanvasText);
|
|
15
|
+
--rc-navigation-bar-indicator-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
16
|
+
--rc-navigation-bar-indicator-border: 0;
|
|
17
|
+
--rc-navigation-bar-indicator-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
18
|
+
--rc-navigation-bar-indicator-duration: var(--md-sys-motion-duration-short3, 150ms);
|
|
19
|
+
--rc-navigation-bar-indicator-easing: var(
|
|
20
|
+
--md-sys-motion-easing-standard,
|
|
21
|
+
cubic-bezier(0.2, 0, 0, 1)
|
|
22
|
+
);
|
|
23
|
+
--rc-icon-font-line-height: 2rem;
|
|
24
|
+
--rc-navigation-bar-focus-ring: 2px solid var(--md-sys-color-primary, Highlight);
|
|
25
|
+
--rc-navigation-bar-focus-ring-offset: 2px;
|
|
26
|
+
padding-block-end: env(safe-area-inset-bottom, 0px);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-bar > a {
|
|
30
|
+
font-family: var(--md-sys-typescale-label-medium-font, inherit);
|
|
31
|
+
font-size: var(--md-sys-typescale-label-medium-size, 0.75rem);
|
|
32
|
+
font-weight: var(--md-sys-typescale-label-medium-weight, 500);
|
|
33
|
+
line-height: var(--md-sys-typescale-label-medium-line-height, 1rem);
|
|
34
|
+
letter-spacing: var(--md-sys-typescale-label-medium-tracking, 0.03125rem);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
38
|
+
rc-navigation-bar
|
|
39
|
+
> a
|
|
40
|
+
:where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
41
|
+
display: inline-grid;
|
|
42
|
+
place-items: center;
|
|
43
|
+
inline-size: 4rem;
|
|
44
|
+
block-size: 2rem;
|
|
45
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
49
|
+
rc-navigation-bar
|
|
50
|
+
> a:hover
|
|
51
|
+
:where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
52
|
+
background: color-mix(
|
|
53
|
+
in srgb,
|
|
54
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
55
|
+
calc(var(--md-sys-state-hover-state-layer-opacity, 0.08) * 100%),
|
|
56
|
+
transparent
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
61
|
+
rc-navigation-bar
|
|
62
|
+
> a:active
|
|
63
|
+
:where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
64
|
+
background: color-mix(
|
|
65
|
+
in srgb,
|
|
66
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
67
|
+
calc(var(--md-sys-state-pressed-state-layer-opacity, 0.12) * 100%),
|
|
68
|
+
transparent
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
73
|
+
rc-navigation-bar
|
|
74
|
+
> a[aria-current]:not([aria-current='false'])
|
|
75
|
+
:where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
76
|
+
color: var(--md-sys-color-on-secondary-container, CanvasText);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
@layer rc-theme-material.components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-rail {
|
|
3
|
+
--rc-navigation-rail-bg: var(--md-sys-color-surface, Canvas);
|
|
4
|
+
--rc-navigation-rail-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
5
|
+
--rc-navigation-rail-inline-size: 5rem;
|
|
6
|
+
--rc-navigation-rail-expanded-inline-size: 16rem;
|
|
7
|
+
--rc-navigation-rail-padding-block: 0.75rem;
|
|
8
|
+
--rc-navigation-rail-padding-inline: 0.5rem;
|
|
9
|
+
--rc-navigation-rail-gap: 1rem;
|
|
10
|
+
--rc-navigation-rail-item-gap: 0.75rem;
|
|
11
|
+
--rc-navigation-rail-item-min-block-size: 3.5rem;
|
|
12
|
+
--rc-navigation-rail-expanded-item-min-block-size: 3.5rem;
|
|
13
|
+
--rc-navigation-rail-item-padding-inline: 0.5rem;
|
|
14
|
+
--rc-navigation-rail-expanded-item-padding-inline: var(
|
|
15
|
+
--rc-navigation-rail-item-padding-inline
|
|
16
|
+
);
|
|
17
|
+
--rc-navigation-rail-item-color: var(--md-sys-color-on-surface-variant, CanvasText);
|
|
18
|
+
--rc-navigation-rail-item-text-decoration: none;
|
|
19
|
+
--rc-navigation-rail-active-color: var(--md-sys-color-on-surface, CanvasText);
|
|
20
|
+
--rc-navigation-rail-indicator-bg: var(--md-sys-color-secondary-container, Highlight);
|
|
21
|
+
--rc-navigation-rail-indicator-border: 0;
|
|
22
|
+
--rc-navigation-rail-indicator-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
23
|
+
--rc-navigation-rail-toggle-size: 3rem;
|
|
24
|
+
--rc-navigation-rail-toggle-inline-offset: 1rem;
|
|
25
|
+
--rc-navigation-rail-duration: var(--md-sys-motion-duration-medium2, 300ms);
|
|
26
|
+
--rc-navigation-rail-easing: var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
|
|
27
|
+
--rc-navigation-rail-indicator-duration: var(--md-sys-motion-duration-short3, 150ms);
|
|
28
|
+
--rc-navigation-rail-indicator-easing: var(
|
|
29
|
+
--md-sys-motion-easing-standard,
|
|
30
|
+
cubic-bezier(0.2, 0, 0, 1)
|
|
31
|
+
);
|
|
32
|
+
--rc-icon-font-line-height: 2rem;
|
|
33
|
+
--rc-navigation-rail-focus-ring: 2px solid var(--md-sys-color-primary, Highlight);
|
|
34
|
+
--rc-navigation-rail-focus-ring-offset: 2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-rail > rc-fab[slot='header'] {
|
|
38
|
+
--rc-fab-shadow: none;
|
|
39
|
+
--rc-fab-shadow-hover: none;
|
|
40
|
+
--rc-fab-shadow-active: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-rail > a {
|
|
44
|
+
align-items: flex-start;
|
|
45
|
+
inline-size: 100%;
|
|
46
|
+
font-family: var(--md-sys-typescale-label-medium-font, inherit);
|
|
47
|
+
font-size: var(--md-sys-typescale-label-medium-size, 0.75rem);
|
|
48
|
+
font-weight: var(--md-sys-typescale-label-medium-weight, 500);
|
|
49
|
+
line-height: var(--md-sys-typescale-label-medium-line-height, 1rem);
|
|
50
|
+
letter-spacing: var(--md-sys-typescale-label-medium-tracking, 0.03125rem);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-navigation-rail[expanded] > a {
|
|
54
|
+
font-family: var(--md-sys-typescale-label-large-font, inherit);
|
|
55
|
+
font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
|
56
|
+
font-weight: var(--md-sys-typescale-label-large-weight, 500);
|
|
57
|
+
line-height: var(--md-sys-typescale-label-large-line-height, 1.25rem);
|
|
58
|
+
letter-spacing: var(--md-sys-typescale-label-large-tracking, 0.00625rem);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
62
|
+
rc-navigation-rail
|
|
63
|
+
> a
|
|
64
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
65
|
+
display: inline-grid;
|
|
66
|
+
place-items: center;
|
|
67
|
+
inline-size: 3.5rem;
|
|
68
|
+
block-size: 2rem;
|
|
69
|
+
border-radius: var(--md-sys-shape-corner-full, 9999px);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
73
|
+
rc-navigation-rail[expanded]
|
|
74
|
+
> a
|
|
75
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
justify-content: flex-start;
|
|
78
|
+
gap: 0.75rem;
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
block-size: 3.5rem;
|
|
81
|
+
padding-inline: 1rem;
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
text-align: start;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/*
|
|
87
|
+
* MD3 collapsed items keep a fixed-size pill behind the icon only; the
|
|
88
|
+
* caption label renders below it, detached from the pill's own box.
|
|
89
|
+
*/
|
|
90
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
91
|
+
rc-navigation-rail:not([expanded])
|
|
92
|
+
> a
|
|
93
|
+
> [data-rc-navigation-indicator]
|
|
94
|
+
> :not([data-rc-navigation-icon]) {
|
|
95
|
+
position: absolute;
|
|
96
|
+
inset-block-start: calc(100% + var(--rc-navigation-rail-link-gap, 0.25rem));
|
|
97
|
+
inset-inline-start: 50%;
|
|
98
|
+
inline-size: max-content;
|
|
99
|
+
font-size: var(--md-sys-typescale-label-medium-size, 0.75rem);
|
|
100
|
+
line-height: var(--md-sys-typescale-label-medium-line-height, 1rem);
|
|
101
|
+
translate: -50% 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
105
|
+
rc-navigation-rail
|
|
106
|
+
> a:hover
|
|
107
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
108
|
+
background: color-mix(
|
|
109
|
+
in srgb,
|
|
110
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
111
|
+
calc(var(--md-sys-state-hover-state-layer-opacity, 0.08) * 100%),
|
|
112
|
+
transparent
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
117
|
+
rc-navigation-rail
|
|
118
|
+
> a:active
|
|
119
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
120
|
+
background: color-mix(
|
|
121
|
+
in srgb,
|
|
122
|
+
var(--md-sys-color-on-surface, CanvasText)
|
|
123
|
+
calc(var(--md-sys-state-pressed-state-layer-opacity, 0.12) * 100%),
|
|
124
|
+
transparent
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
129
|
+
rc-navigation-rail
|
|
130
|
+
> a[aria-current]:not([aria-current='false'])
|
|
131
|
+
> :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
|
|
132
|
+
color: var(--md-sys-color-on-secondary-container, CanvasText);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -30,4 +30,27 @@
|
|
|
30
30
|
transparent
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar[variant='view'] {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
inline-size: min(100%, var(--md-search-view-container-width, 45rem));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar[variant='view']::part(root) {
|
|
40
|
+
position: relative;
|
|
41
|
+
z-index: 2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(view) {
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(suggestion) {
|
|
49
|
+
gap: 1rem;
|
|
50
|
+
color: var(--md-sys-color-on-surface, CanvasText);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(suggestion):hover {
|
|
54
|
+
background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
|
|
55
|
+
}
|
|
33
56
|
}
|