@rcarls/rc-theme-substrate 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 ADDED
@@ -0,0 +1,59 @@
1
+ # @rcarls/rc-theme-substrate
2
+
3
+ ## 0.4.1
4
+
5
+ ## 0.4.0
6
+
7
+ ### Minor Changes
8
+
9
+ - e57277f: Add Material 3 search-view, fixed-pane splitter, dialog scrim, and resize enhancements.
10
+
11
+ `rc-search-bar` now supports `variant="view"`, controlled/default open state, search-view methods, a rich `suggestions` slot, and datalist-derived text suggestions. `rc-splitter` adds `mode="fixed"` for clampable pixel primary panes. `rc-common` now honors CSS max-size constraints during resize gestures, and `rc-dialog` exposes a scrim token plus resize handle/origin hooks used by themed surfaces.
12
+
13
+ ### Patch Changes
14
+
15
+ - 9c7476d: Add theme-specific rc-button progress treatments, including compact Material spinners and
16
+ Substrate percentage indicators.
17
+ - ebec800: Dock bottom sheets without a theme to the viewport block-end by default and
18
+ support absolute positioning for non-modal sheets contained by a positioned ancestor.
19
+ Center authored drag handles with a splitter-aligned pill treatment. Align the
20
+ Material theme with its surface, elevation, scrim, drag-handle, and contextual
21
+ button treatment.
22
+ - e88eff8: Refine semantic card-title typography and icon-button alignment across both
23
+ themes. Simplify Substrate navigation selection, match its bottom-sheet handle
24
+ to the splitter grip, improve inverse notification action contrast, and theme the
25
+ Markdown editor's composed controls.
26
+ - 6f91e7a: Fix collapsed `rc-navigation-rail` items so the whole item's box wraps icon and
27
+ label, not just the icon. The shared component pulled the label out of flow
28
+ (`position: absolute`), so a theme's whole-item background or focus ring only
29
+ covered the icon; Material's detached-pill layout now lives in its own theme
30
+ stylesheet instead of the shared base. Substrate's collapsed rail also grows
31
+ from `5rem` to `6rem` so single-word labels like "Settings" stop wrapping.
32
+ - dce5749: Replace the navigation rail's shadow-DOM fallback toggle with a consumer-authored light-DOM
33
+ button, and align collapsed and expanded item layouts across the default and reference themes.
34
+ - 55e8ab5: Preserve UA-like control and surface styling until an optional theme supplies decorative tokens.
35
+ Restore themed button hover and pressed state layers, including a pointer-origin Material ripple.
36
+ - 4d118ff: Share icon-font size and line-height tokens across themed component icon markers.
37
+ - 3e89095: Replace rc-menu's generated submenu glyph with an author-supplied `indicator`
38
+ slot on rc-menu-button. Keep the decorative indicator inside the trigger bounds,
39
+ reserve label space for it, and expose theme-neutral size, color, and inset
40
+ tokens for Material, Substrate, and application themes.
41
+ - c96f40c: Use a native system font stack by default.
42
+ - 979b989: Use a zero default gap for tighter chip content layout and a smaller default
43
+ font size for slotted remove icons. Derive removable content padding from the
44
+ remove target width and chip gap so the label and trailing icon stay aligned.
45
+
46
+ ## 0.3.2
47
+
48
+ ## 0.3.1
49
+
50
+ ## 0.3.0
51
+
52
+ ### Added
53
+
54
+ - Add Substrate as a lightweight CSS reference theme for branded app foundations.
55
+ - Add scoped defaults, token bridges, component polish, and docs preview integration.
56
+
57
+ ### Changed
58
+
59
+ - Update package metadata, README intro, and docs links.
package/README.md CHANGED
@@ -58,6 +58,12 @@ reference layer:
58
58
  @import '@rcarls/rc-theme-substrate/components/dialog.css';
59
59
  ```
60
60
 
61
+ Tag general icon-font markup with `data-rc-icon`; component-specific markers
62
+ such as `data-rc-button-icon` and `data-rc-navigation-icon` opt in
63
+ automatically. The shared `--rc-icon-font-size` and
64
+ `--rc-icon-font-line-height` tokens keep glyph geometry consistent and can be
65
+ overridden at the theme boundary or on one component.
66
+
61
67
  ## View transitions
62
68
 
63
69
  Substrate includes stable CSS hooks for apps that opt into View Transitions,
package/bridge.css CHANGED
@@ -26,13 +26,75 @@
26
26
  --rc-font-size: var(--substrate-font-size, 1em);
27
27
  --rc-font-weight: var(--substrate-font-weight, 400);
28
28
  --rc-line-height: var(--substrate-line-height, normal);
29
+ --rc-icon-font-size: 1.5rem;
30
+ --rc-icon-font-line-height: var(--rc-icon-font-size);
29
31
  --rc-control-block-size: var(--substrate-control-block-size, 2.5rem);
30
32
  --rc-control-padding-block: var(--substrate-control-padding-block, 0.5rem);
31
33
  --rc-control-padding-inline: var(--substrate-control-padding-inline, 0.75rem);
32
34
  --rc-control-gap: var(--substrate-control-gap, 0.5rem);
35
+ --rc-button-color: var(--rc-button-text, ButtonText);
36
+ --rc-button-block-size: var(--rc-control-block-size);
37
+ --rc-button-radius: var(--rc-control-radius);
38
+ --rc-button-border: var(--rc-border);
39
+ --rc-button-padding-block: var(--rc-control-padding-block);
40
+ --rc-button-padding-inline: var(--rc-control-padding-inline);
41
+ --rc-button-gap: var(--rc-control-gap);
42
+ --rc-button-font: var(--rc-font-weight) var(--rc-font-size) / var(--rc-line-height)
43
+ var(--rc-font-family);
44
+ --rc-button-hover-state-layer-opacity: 0.08;
45
+ --rc-button-focus-state-layer-opacity: 0.12;
46
+ --rc-button-pressed-state-layer-opacity: 0.12;
47
+ --rc-card-bg: var(--substrate-surface-raised, Canvas);
48
+ --rc-card-color: var(--substrate-on-surface, CanvasText);
49
+ --rc-card-radius: var(--substrate-radius-lg, 0.75rem);
50
+ --rc-card-padding-block: 0.75rem;
51
+ --rc-card-padding-inline: 0.75rem;
52
+ --rc-card-actions-gap: 0.5rem;
53
+ --rc-card-subtitle-color: color-mix(in srgb, currentColor 72%, transparent);
54
+ --rc-card-hover-state-layer-opacity: 0.08;
55
+ --rc-card-pressed-state-layer-opacity: 0.12;
56
+ --rc-chip-block-size: 2rem;
57
+ --rc-chip-gap: 0px;
58
+ --rc-chip-padding-inline: 0.75rem;
59
+ --rc-chip-border: var(--rc-border);
60
+ --rc-chip-radius: var(--substrate-radius-md, 0.5rem);
61
+ --rc-chip-bg: var(--substrate-surface-raised, ButtonFace);
62
+ --rc-chip-color: var(--substrate-on-surface, ButtonText);
63
+ --rc-chip-font: inherit;
64
+ --rc-chip-text-decoration: none;
65
+ --rc-chip-selected-bg: var(--rc-highlight, Highlight);
66
+ --rc-switch-native-appearance: none;
67
+ --rc-switch-native-inline-size: 100%;
68
+ --rc-switch-native-block-size: 100%;
69
+ --rc-switch-native-margin: 0;
70
+ --rc-switch-native-opacity: 0;
71
+ --rc-switch-decoration-display: block;
72
+ --rc-switch-icon-display: grid;
73
+ --rc-switch-track-inline-size: 3.25rem;
74
+ --rc-switch-track-block-size: 2rem;
75
+ --rc-switch-selected-track-bg: var(--rc-accent);
76
+ --rc-switch-thumb-translate: 1.125rem;
77
+ --rc-segmented-button-segment-min-block-size: var(--rc-control-block-size);
78
+ --rc-segmented-button-selected-bg: var(--rc-highlight, Highlight);
79
+ --rc-snackbar-bg: var(--substrate-inverse-surface, CanvasText);
80
+ --rc-snackbar-color: var(--substrate-inverse-on-surface, Canvas);
81
+ --rc-snackbar-border: 0;
82
+ --rc-snackbar-action-color: var(--substrate-inverse-on-surface, Canvas);
83
+ --rc-snackbar-action-border: 0;
84
+ --rc-snackbar-action-radius: 9999px;
85
+ --rc-snackbar-action-padding-block: 0.5rem;
86
+ --rc-snackbar-action-padding-inline: 0.75rem;
87
+ --rc-snackbar-action-bg: transparent;
88
+ --rc-snackbar-action-font: 650 0.875rem / 1.25 var(--rc-font-family, inherit);
33
89
  --rc-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
34
90
  --rc-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
35
91
  --rc-item-gap: var(--substrate-item-gap, 0.5rem);
92
+ --rc-list-item-gap: var(--rc-item-gap);
93
+ --rc-list-item-min-block-size: 2.25rem;
94
+ --rc-list-item-padding-block: var(--rc-item-padding-block);
95
+ --rc-list-item-padding-inline: var(--rc-item-padding-inline);
96
+ --rc-list-item-selected-bg: var(--rc-highlight, Highlight);
97
+ --rc-list-item-selected-color: var(--rc-highlight-text, HighlightText);
36
98
  --rc-radius-sm: var(--substrate-radius-sm, 0.25rem);
37
99
  --rc-radius-md: var(--substrate-radius-md, 0.5rem);
38
100
  --rc-control-radius: var(--substrate-radius-md, 0.5rem);
@@ -40,22 +102,23 @@
40
102
  --rc-focus-ring-offset: var(--substrate-focus-ring-offset, 2px);
41
103
  --rc-disabled-opacity: var(--substrate-disabled-opacity, 0.52);
42
104
  --rc-motion-duration: var(--substrate-motion-duration, 160ms);
105
+ --rc-dialog-scrim: color-mix(in srgb, CanvasText 32%, transparent);
43
106
  }
44
107
 
45
108
  .rc-theme-substrate rc-listbox,
46
109
  :host(.rc-theme-substrate) rc-listbox,
47
110
  .rc-theme-substrate rc-menu,
48
111
  :host(.rc-theme-substrate) rc-menu {
49
- --rc-listbox-option-gap: var(--substrate-item-gap, 0.5rem);
50
- --rc-listbox-option-min-block-size: 2.25rem;
51
- --rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
52
- --rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
112
+ --rc-listbox-option-gap: var(--rc-list-item-gap, 0.5rem);
113
+ --rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size, 2.25rem);
114
+ --rc-listbox-option-padding-block: var(--rc-list-item-padding-block, 0.55rem);
115
+ --rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline, 0.75rem);
53
116
  --rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
54
117
  --rc-listbox-hover-color: var(--rc-field-text, FieldText);
55
118
  --rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
56
119
  --rc-listbox-active-color: var(--rc-field-text, FieldText);
57
- --rc-listbox-selected-bg: var(--rc-highlight, Highlight);
58
- --rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
120
+ --rc-listbox-selected-bg: var(--rc-list-item-selected-bg, Highlight);
121
+ --rc-listbox-selected-color: var(--rc-list-item-selected-color, HighlightText);
59
122
  }
60
123
 
61
124
  .rc-theme-substrate rc-select,
@@ -85,16 +148,22 @@
85
148
  --rc-slider-progress-background: var(--rc-accent);
86
149
  --rc-slider-track-radius: 999px;
87
150
  --rc-range-slider-accent: var(--rc-accent);
88
- --rc-range-slider-track-background: color-mix(
89
- in srgb,
90
- var(--rc-border-color) 70%,
91
- transparent
92
- );
151
+ --rc-range-slider-track-background: color-mix(in srgb, var(--rc-border-color) 70%, transparent);
93
152
  --rc-range-slider-thumb-background: var(--substrate-surface, Canvas);
94
153
  --rc-range-slider-thumb-border: var(--rc-accent);
95
154
  --rc-thumb-radius: 0.5625rem;
96
155
  }
97
156
 
157
+ .rc-theme-substrate rc-bottom-sheet,
158
+ :host(.rc-theme-substrate) rc-bottom-sheet {
159
+ --rc-bottom-sheet-bg: var(--substrate-surface-raised, Canvas);
160
+ --rc-bottom-sheet-color: var(--rc-field-text, CanvasText);
161
+ --rc-bottom-sheet-radius: var(--substrate-radius-xl, 1rem) var(--substrate-radius-xl, 1rem) 0 0;
162
+ --rc-bottom-sheet-shadow: var(--substrate-shadow-lg, none);
163
+ --rc-bottom-sheet-scrim: var(--rc-dialog-scrim);
164
+ --rc-bottom-sheet-handle-color: var(--rc-border-color, GrayText);
165
+ --rc-bottom-sheet-handle-radius: var(--substrate-radius-pill, 999px);
166
+ }
98
167
  @media (prefers-reduced-motion: reduce) {
99
168
  .rc-theme-substrate,
100
169
  :host(.rc-theme-substrate) {
@@ -0,0 +1,90 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet {
3
+ --rc-bottom-sheet-bg: var(--substrate-surface-raised, Canvas);
4
+ --rc-bottom-sheet-handle-color: var(--rc-border-color, GrayText);
5
+ --rc-bottom-sheet-handle-radius: var(--substrate-radius-pill, 999px);
6
+ }
7
+
8
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet > dialog {
9
+ position: fixed;
10
+ inset: auto 0 0;
11
+ box-sizing: border-box;
12
+ inline-size: 100%;
13
+ max-inline-size: var(--rc-bottom-sheet-max-inline-size, 40rem);
14
+ max-block-size: var(--rc-bottom-sheet-max-block-size, 70dvh);
15
+ margin-block: 0;
16
+ margin-inline: auto;
17
+ padding: var(--rc-bottom-sheet-padding, 0 1rem calc(1rem + env(safe-area-inset-bottom, 0px)));
18
+ overflow: auto;
19
+ border: var(--rc-border, 1px solid ButtonBorder);
20
+ border-block-end: 0;
21
+ border-radius: var(--rc-bottom-sheet-radius, 1rem 1rem 0 0);
22
+ background: var(--rc-bottom-sheet-bg, var(--substrate-surface-raised, Canvas));
23
+ color: var(--rc-bottom-sheet-color, var(--rc-field-text, CanvasText));
24
+ box-shadow: var(--rc-bottom-sheet-shadow, var(--substrate-shadow-lg, none));
25
+ }
26
+
27
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-bottom-sheet > dialog::backdrop {
28
+ background: var(
29
+ --rc-bottom-sheet-scrim,
30
+ var(--rc-dialog-scrim, color-mix(in srgb, CanvasText 32%, transparent))
31
+ );
32
+ }
33
+
34
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
35
+ rc-bottom-sheet
36
+ > dialog
37
+ [data-rc-bottom-sheet-handle] {
38
+ position: relative;
39
+ display: block;
40
+ inline-size: var(--rc-bottom-sheet-handle-target-inline-size, 100%);
41
+ min-block-size: var(--rc-bottom-sheet-handle-target-block-size, 3rem);
42
+ margin: var(--rc-bottom-sheet-handle-target-margin, 0);
43
+ padding: 0;
44
+ border: 0;
45
+ border-radius: inherit;
46
+ background: transparent;
47
+ appearance: none;
48
+ cursor: ns-resize;
49
+ touch-action: none;
50
+ }
51
+
52
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
53
+ rc-bottom-sheet
54
+ > dialog
55
+ [data-rc-bottom-sheet-handle]::before {
56
+ content: '';
57
+ position: absolute;
58
+ inset-block-start: 50%;
59
+ inset-inline-start: 50%;
60
+ inline-size: var(--rc-bottom-sheet-handle-inline-size, 2rem);
61
+ block-size: var(--rc-bottom-sheet-handle-block-size, 0.25rem);
62
+ border-radius: 0;
63
+ background-color: transparent;
64
+ background-image:
65
+ radial-gradient(
66
+ circle 1px at calc(50% - 5px) 50%,
67
+ var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
68
+ transparent 100%
69
+ ),
70
+ radial-gradient(
71
+ circle 1px at 50% 50%,
72
+ var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
73
+ transparent 100%
74
+ ),
75
+ radial-gradient(
76
+ circle 1px at calc(50% + 5px) 50%,
77
+ var(--rc-bottom-sheet-handle-color, ButtonBorder) 100%,
78
+ transparent 100%
79
+ );
80
+ translate: -50% -50%;
81
+ }
82
+
83
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
84
+ rc-bottom-sheet
85
+ > dialog
86
+ [data-rc-bottom-sheet-handle]:focus-visible {
87
+ outline: 0.125rem solid var(--rc-accent, Highlight);
88
+ outline-offset: 0.25rem;
89
+ }
90
+ }
@@ -0,0 +1,44 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button {
3
+ --rc-button-bg: var(--substrate-surface-raised, ButtonFace);
4
+ --rc-button-color: var(--rc-button-text, ButtonText);
5
+ --rc-button-border: var(--rc-border, 1px solid ButtonBorder);
6
+ --rc-button-radius: var(--rc-control-radius, 0.5rem);
7
+ --rc-button-block-size: var(--rc-control-block-size, 2.5rem);
8
+ --rc-button-padding-block: var(--rc-control-padding-block, 0.5rem);
9
+ --rc-button-padding-inline: var(--rc-control-padding-inline, 0.75rem);
10
+ --rc-button-gap: var(--rc-control-gap, 0.5rem);
11
+ --rc-button-font: var(--rc-font-weight, 400) var(--rc-font-size, 1em) /
12
+ var(--rc-line-height, normal) var(--rc-font-family, inherit);
13
+ --rc-button-state-layer-bg: currentColor;
14
+ --rc-button-hover-state-layer-opacity: 0.08;
15
+ --rc-button-focus-state-layer-opacity: 0.12;
16
+ --rc-button-pressed-state-layer-opacity: 0.12;
17
+ --rc-button-state-layer-easing: var(--substrate-motion-easing, ease);
18
+ --rc-button-progress-color: var(--rc-button-text, ButtonText);
19
+ }
20
+
21
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button > button:focus-visible {
22
+ outline: var(--rc-focus-ring, 2px solid Highlight);
23
+ outline-offset: var(--rc-focus-ring-offset, 2px);
24
+ }
25
+
26
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button[disabled] > button:disabled {
27
+ opacity: var(--rc-disabled-opacity, 0.52);
28
+ }
29
+
30
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
31
+ rc-button[progress][progress-value]::part(progress) {
32
+ inset: 0.25rem;
33
+ border: var(--rc-border, 1px solid ButtonBorder);
34
+ border-radius: calc(var(--rc-control-radius, 0.5rem) - 0.125rem);
35
+ background: color-mix(in srgb, var(--substrate-surface-raised, Canvas) 88%, currentColor);
36
+ font: 600 0.75rem / 1 var(--rc-font-family, inherit);
37
+ letter-spacing: 0.025em;
38
+ }
39
+
40
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-button[icon-only] {
41
+ --rc-button-icon-size: var(--rc-control-block-size, 2.5rem);
42
+ --rc-icon-font-line-height: var(--rc-button-icon-size, 2.5rem);
43
+ }
44
+ }
@@ -0,0 +1,51 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card {
3
+ --rc-card-bg: var(--substrate-surface-raised, Canvas);
4
+ --rc-card-color: var(--substrate-on-surface, CanvasText);
5
+ --rc-card-radius: var(--substrate-radius-lg, 0.75rem);
6
+ --rc-card-border: var(--rc-border, 1px solid ButtonBorder);
7
+ --rc-card-shadow: var(--substrate-shadow-sm, none);
8
+ --rc-card-padding-block: 0.75rem;
9
+ --rc-card-padding-inline: 0.75rem;
10
+ --rc-card-actions-gap: 0.5rem;
11
+ --rc-card-title-font: 600 1rem / 1.4 var(--rc-font-family, inherit);
12
+ --rc-card-subtitle-color: color-mix(in srgb, currentColor 72%, transparent);
13
+ --rc-card-state-layer-bg: currentColor;
14
+ --rc-card-hover-state-layer-opacity: 0.08;
15
+ --rc-card-pressed-state-layer-opacity: 0.12;
16
+ }
17
+
18
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card[selected] {
19
+ box-shadow:
20
+ 0 0 0 2px var(--rc-accent, Highlight),
21
+ var(--rc-card-shadow);
22
+ }
23
+
24
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card[disabled] {
25
+ opacity: var(--rc-disabled-opacity, 0.52);
26
+ }
27
+
28
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > :is(h2, h3)[slot='title'] {
29
+ margin: 0;
30
+ color: var(--rc-card-title-color, inherit);
31
+ }
32
+
33
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > h2[slot='title'] {
34
+ font-family: var(--rc-font-family, inherit);
35
+ font-size: 1.25rem;
36
+ font-weight: 650;
37
+ line-height: 1.35;
38
+ }
39
+
40
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > h3[slot='title'] {
41
+ font-family: var(--rc-font-family, inherit);
42
+ font-size: 1rem;
43
+ font-weight: 600;
44
+ line-height: 1.4;
45
+ }
46
+
47
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-card > :is(h2, h3)[slot='title'] > a {
48
+ color: inherit;
49
+ text-decoration: none;
50
+ }
51
+ }
@@ -0,0 +1,20 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-chip {
3
+ --rc-chip-block-size: 2rem;
4
+ --rc-chip-gap: 0px;
5
+ --rc-chip-padding-inline: 0.75rem;
6
+ --rc-chip-border: var(--rc-border);
7
+ --rc-chip-radius: var(--substrate-radius-md, 0.5rem);
8
+ --rc-chip-bg: var(--substrate-surface-raised, ButtonFace);
9
+ --rc-chip-color: var(--substrate-on-surface, ButtonText);
10
+ --rc-chip-font: inherit;
11
+ --rc-chip-text-decoration: none;
12
+ --rc-chip-selected-border-color: var(--rc-accent);
13
+ --rc-chip-selected-bg: var(--rc-highlight, Highlight);
14
+ --rc-chip-selected-color: var(--rc-highlight-text, HighlightText);
15
+ --rc-chip-focus-ring: var(--rc-focus-ring);
16
+ --rc-chip-focus-ring-offset: var(--rc-focus-ring-offset);
17
+ --rc-chip-disabled-opacity: var(--rc-disabled-opacity);
18
+ --rc-chip-remove-target-size: 1.5rem;
19
+ }
20
+ }
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(listbox) {
28
- --rc-listbox-option-gap: var(--substrate-item-gap, 0.5rem);
28
+ --rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
29
29
  --rc-listbox-option-min-block-size: 2.25rem;
30
30
  --rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
31
31
  --rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
@@ -44,7 +44,8 @@
44
44
 
45
45
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(toggle) {
46
46
  border-radius: var(--substrate-radius-sm, 0.25rem);
47
- transition: background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
47
+ transition: background-color var(--rc-motion-duration, 160ms)
48
+ var(--substrate-motion-easing, ease);
48
49
  }
49
50
 
50
51
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-combobox::part(toggle):hover,
@@ -16,7 +16,7 @@
16
16
  }
17
17
 
18
18
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-dialog > dialog::backdrop {
19
- background: color-mix(in srgb, CanvasText 32%, transparent);
19
+ background: var(--rc-dialog-scrim, color-mix(in srgb, CanvasText 32%, transparent));
20
20
  transition: opacity var(--substrate-motion-duration-slow, 240ms)
21
21
  var(--substrate-motion-easing, ease);
22
22
  }
@@ -0,0 +1,36 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab-menu {
3
+ --rc-fab-menu-size: 3.5rem;
4
+ --rc-fab-menu-trigger-gap: 0.5rem;
5
+ --rc-fab-menu-padding-block: 0;
6
+ --rc-fab-menu-padding-inline: 1rem;
7
+ --rc-fab-menu-appearance: none;
8
+ --rc-fab-menu-border: 0;
9
+ --rc-fab-menu-bg: var(--rc-accent, Highlight);
10
+ --rc-fab-menu-bg-hover: var(--rc-fab-menu-bg);
11
+ --rc-fab-menu-bg-open: var(--rc-fab-menu-bg-hover);
12
+ --rc-fab-menu-color: var(--rc-on-accent, HighlightText);
13
+ --rc-fab-menu-shadow: var(--substrate-shadow-raised, var(--rc-shadow-level2, none));
14
+ --rc-fab-menu-shadow-hover: var(--substrate-shadow-overlay, var(--rc-shadow-level3, none));
15
+ --rc-fab-menu-shadow-open: var(--rc-fab-menu-shadow-hover);
16
+ --rc-fab-menu-shadow-active: var(--substrate-shadow-raised, var(--rc-shadow-level2, none));
17
+ --rc-fab-menu-radius: var(--substrate-radius-lg, 1rem);
18
+ --rc-fab-menu-font: inherit;
19
+ --rc-fab-menu-font-family: inherit;
20
+ --rc-fab-menu-font-size: 0.875rem;
21
+ --rc-fab-menu-font-weight: 500;
22
+ --rc-fab-menu-letter-spacing: 0.00625em;
23
+ --rc-fab-menu-text-decoration: none;
24
+ --rc-fab-menu-user-select: none;
25
+ --rc-fab-menu-transition:
26
+ background var(--rc-motion-duration, 200ms) ease,
27
+ box-shadow var(--rc-motion-duration, 200ms) ease,
28
+ transform var(--rc-motion-duration, 200ms) ease;
29
+ --rc-fab-menu-active-transform: scale(0.96);
30
+ --rc-fab-menu-disabled-opacity: var(--rc-disabled-opacity, 0.38);
31
+ --rc-fab-menu-disabled-shadow: none;
32
+ --rc-fab-menu-focus-ring: var(--rc-focus-ring);
33
+ --rc-fab-menu-focus-ring-offset: var(--rc-focus-ring-offset);
34
+ --rc-fab-menu-popup-duration: var(--rc-motion-duration, 160ms);
35
+ }
36
+ }
@@ -1,9 +1,30 @@
1
1
  @layer rc-theme-substrate.components {
2
2
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab {
3
+ --rc-fab-size: 3.5rem;
4
+ --rc-fab-gap: 0.5rem;
5
+ --rc-fab-padding-block: 0;
6
+ --rc-fab-padding-inline: 1rem;
7
+ --rc-fab-border: 0;
3
8
  --rc-fab-bg: var(--rc-accent, Highlight);
9
+ --rc-fab-bg-hover: var(--rc-fab-bg);
4
10
  --rc-fab-color: var(--substrate-on-primary, HighlightText);
5
11
  --rc-fab-radius: var(--substrate-radius-lg, 0.75rem);
6
12
  --rc-fab-shadow: var(--substrate-shadow-md, none);
13
+ --rc-fab-shadow-hover: var(--substrate-shadow-lg, none);
14
+ --rc-fab-shadow-active: var(--rc-fab-shadow);
15
+ --rc-fab-font-family: var(--rc-font-family, inherit);
16
+ --rc-fab-font-size: var(--rc-font-size, 0.875rem);
17
+ --rc-fab-font-weight: 500;
18
+ --rc-fab-letter-spacing: 0.00625em;
19
+ --rc-fab-active-transform: scale(0.96);
20
+ --rc-fab-focus-ring: var(--rc-focus-ring);
21
+ --rc-fab-focus-ring-offset: var(--rc-focus-ring-offset);
22
+ --rc-fab-disabled-opacity: var(--rc-disabled-opacity, 0.38);
23
+ --rc-fab-disabled-shadow: none;
24
+ --rc-fab-transition:
25
+ background var(--rc-motion-duration, 200ms) ease,
26
+ box-shadow var(--rc-motion-duration, 200ms) ease,
27
+ transform var(--rc-motion-duration, 200ms) ease;
7
28
  }
8
29
 
9
30
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-fab > button {
@@ -0,0 +1,19 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
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,67 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
3
+ --rc-list-item-gap: var(--substrate-item-gap, 0.5rem);
4
+ --rc-list-item-min-block-size: 2.25rem;
5
+ --rc-list-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
6
+ --rc-list-item-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
7
+ --rc-list-item-divider: 0;
8
+ --rc-list-item-bg: transparent;
9
+ --rc-list-item-color: var(--rc-field-text, FieldText);
10
+ --rc-list-item-supporting-color: var(--substrate-on-surface-muted, GrayText);
11
+ --rc-list-item-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
12
+ --rc-list-item-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
13
+ --rc-list-item-selected-bg: var(--rc-highlight, Highlight);
14
+ --rc-list-item-selected-color: var(--rc-highlight-text, HighlightText);
15
+ --rc-list-item-disabled-opacity: var(--rc-disabled-opacity, 0.52);
16
+ }
17
+
18
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list {
19
+ list-style: none;
20
+ margin: 0;
21
+ padding: 0;
22
+ }
23
+
24
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item {
25
+ display: flex;
26
+ align-items: center;
27
+ gap: var(--rc-list-item-gap);
28
+ min-block-size: var(--rc-list-item-min-block-size);
29
+ padding: var(--rc-list-item-padding-block) var(--rc-list-item-padding-inline);
30
+ border-block-end: var(--rc-list-item-divider);
31
+ background: var(--rc-list-item-bg);
32
+ color: var(--rc-list-item-color);
33
+ box-sizing: border-box;
34
+ }
35
+
36
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item__start,
37
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item__trailing,
38
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item__end {
39
+ display: inline-flex;
40
+ align-items: center;
41
+ flex-shrink: 0;
42
+ }
43
+
44
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item__body {
45
+ display: flex;
46
+ flex: 1 1 auto;
47
+ flex-direction: column;
48
+ min-inline-size: 0;
49
+ }
50
+
51
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-list-item__supporting {
52
+ color: var(--rc-list-item-supporting-color);
53
+ }
54
+
55
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-listbox,
56
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) [part~='listbox'] {
57
+ --rc-listbox-option-gap: var(--rc-list-item-gap);
58
+ --rc-listbox-option-min-block-size: var(--rc-list-item-min-block-size);
59
+ --rc-listbox-option-padding-block: var(--rc-list-item-padding-block);
60
+ --rc-listbox-option-padding-inline: var(--rc-list-item-padding-inline);
61
+ --rc-listbox-hover-bg: var(--rc-list-item-hover-bg);
62
+ --rc-listbox-active-bg: var(--rc-list-item-active-bg);
63
+ --rc-listbox-selected-bg: var(--rc-list-item-selected-bg);
64
+ --rc-listbox-selected-color: var(--rc-list-item-selected-color);
65
+ --rc-listbox-disabled-opacity: var(--rc-list-item-disabled-opacity);
66
+ }
67
+ }
@@ -1,12 +1,11 @@
1
1
  @layer rc-theme-substrate.components {
2
2
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-listbox {
3
- --rc-listbox-option-gap: var(--substrate-item-gap, 0.5rem);
3
+ --rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
4
4
  --rc-listbox-option-min-block-size: 2.25rem;
5
5
  --rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
6
6
  --rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
7
7
  --rc-listbox-option-transition:
8
- background-color var(--substrate-motion-duration, 160ms)
9
- var(--substrate-motion-easing, ease),
8
+ background-color var(--substrate-motion-duration, 160ms) var(--substrate-motion-easing, ease),
10
9
  color var(--substrate-motion-duration, 160ms) var(--substrate-motion-easing, ease);
11
10
  --rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
12
11
  --rc-listbox-hover-color: var(--rc-field-text, FieldText);
@@ -20,7 +19,8 @@
20
19
  var(--rc-font-family, inherit);
21
20
  }
22
21
 
23
- :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-listbox[checkmark]
22
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
23
+ rc-listbox[checkmark]
24
24
  [part~='option-checkmark'] {
25
25
  color: var(--rc-accent, Highlight);
26
26
  }
@@ -6,7 +6,32 @@
6
6
  --rme-background: var(--rc-field, Field);
7
7
  --rme-color: var(--rc-field-text, FieldText);
8
8
  --rme-toolbar-background: var(--substrate-surface-raised, Canvas);
9
+ --rme-toolbar-color: var(--substrate-on-surface, CanvasText);
9
10
  --rme-toolbar-border: var(--rc-border, 1px solid ButtonBorder);
11
+ --rme-toolbar-gap: 0.125rem;
12
+ --rme-toolbar-padding: 0.25rem;
13
+ --rme-toolbar-radius: var(--substrate-radius-lg, 0.75rem) var(--substrate-radius-lg, 0.75rem) 0
14
+ 0;
15
+ --rme-toolbar-button-size: var(--rc-control-block-size, 2.5rem);
16
+ --rme-toolbar-button-color: var(--substrate-on-surface, ButtonText);
17
+ --rme-toolbar-button-border: 1px solid transparent;
18
+ --rme-toolbar-button-radius: var(--substrate-radius-md, 0.5rem);
19
+ --rme-toolbar-button-active-background: var(--substrate-primary-container, Highlight);
20
+ --rme-toolbar-button-active-color: var(--substrate-on-primary-container, HighlightText);
21
+ --rme-toolbar-button-active-border: 1px solid var(--substrate-primary, Highlight);
22
+ --rme-toolbar-focus-outline: var(--rc-focus-ring, 2px solid Highlight);
23
+ --rme-toolbar-focus-outline-offset: var(--rc-focus-ring-offset, 2px);
24
+ --rme-toolbar-select-background: var(--substrate-field, Field);
25
+ --rme-toolbar-select-color: var(--substrate-on-surface, FieldText);
26
+ --rme-toolbar-select-border: var(--rc-border, 1px solid ButtonBorder);
27
+ --rme-toolbar-select-radius: var(--substrate-radius-sm, 0.25rem);
28
+ --rme-toolbar-select-active-background: var(--substrate-primary-container, Highlight);
29
+ --rme-toolbar-select-active-color: var(--substrate-on-primary-container, HighlightText);
30
+ --rme-toolbar-select-active-border-color: var(--substrate-primary, Highlight);
31
+ --rme-toolbar-input-background: var(--substrate-field, Field);
32
+ --rme-toolbar-input-color: var(--substrate-on-surface, FieldText);
33
+ --rme-toolbar-input-border: var(--rc-border, 1px solid ButtonBorder);
34
+ --rme-toolbar-input-radius: var(--substrate-radius-sm, 0.25rem);
10
35
  }
11
36
 
12
37
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-markdown-editor::part(rich-view) {
@@ -12,6 +12,7 @@
12
12
  var(--rc-accent, Highlight) 16%,
13
13
  var(--rc-button-bg, ButtonFace)
14
14
  );
15
+ --rc-menu-button-indicator-color: var(--rc-accent, Highlight);
15
16
  display: inline-block;
16
17
  }
17
18
  }
@@ -7,7 +7,6 @@
7
7
  --rc-menu-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
8
8
  --rc-menu-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
9
9
  --rc-menu-check-size: 1.25rem;
10
- --rc-menu-submenu-indicator-color: var(--rc-accent, Highlight);
11
10
  display: inline-block;
12
11
  border: var(--rc-border, 1px solid ButtonBorder);
13
12
  border-radius: var(--substrate-radius-lg, 0.75rem);
@@ -0,0 +1,43 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-bar {
3
+ --rc-navigation-bar-bg: var(--rc-surface, Canvas);
4
+ --rc-navigation-bar-color: var(--rc-color, CanvasText);
5
+ --rc-navigation-bar-block-size: 4rem;
6
+ --rc-navigation-bar-padding-block: 0;
7
+ --rc-navigation-bar-padding-inline: 0;
8
+ --rc-navigation-bar-gap: 0;
9
+ --rc-navigation-bar-item-gap: 0.25rem;
10
+ --rc-navigation-bar-item-min-block-size: 3rem;
11
+ --rc-navigation-bar-item-padding-block: 0.5rem;
12
+ --rc-navigation-bar-item-padding-inline: var(--rc-item-padding-inline, 0.75rem);
13
+ --rc-navigation-bar-item-color: var(--rc-muted-color, CanvasText);
14
+ --rc-navigation-bar-item-text-decoration: none;
15
+ --rc-navigation-bar-active-color: var(--rc-accent, Highlight);
16
+ --rc-navigation-bar-indicator-bg: transparent;
17
+ --rc-navigation-bar-indicator-border: 0;
18
+ --rc-navigation-bar-indicator-radius: 0;
19
+ --rc-navigation-bar-indicator-duration: 0ms;
20
+ --rc-navigation-bar-indicator-easing: ease;
21
+ --rc-icon-font-line-height: 2.5rem;
22
+ --rc-navigation-bar-focus-ring: var(--rc-focus-ring, 2px solid Highlight);
23
+ --rc-navigation-bar-focus-ring-offset: var(--rc-focus-ring-offset, 2px);
24
+ }
25
+
26
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
27
+ rc-navigation-bar
28
+ > a
29
+ :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
30
+ display: inline-grid;
31
+ place-items: center;
32
+ inline-size: 2.5rem;
33
+ block-size: 2.5rem;
34
+ border-radius: var(--rc-radius-pill, 9999px);
35
+ }
36
+
37
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
38
+ rc-navigation-bar
39
+ > a[aria-current]:not([aria-current='false']) {
40
+ border-radius: var(--rc-radius-md, 0.5rem);
41
+ background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
42
+ }
43
+ }
@@ -0,0 +1,72 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-rail {
3
+ --rc-navigation-rail-bg: var(--rc-surface, Canvas);
4
+ --rc-navigation-rail-color: var(--rc-color, CanvasText);
5
+ --rc-navigation-rail-inline-size: 6rem;
6
+ --rc-navigation-rail-expanded-inline-size: 15rem;
7
+ --rc-navigation-rail-padding-block: 0.75rem;
8
+ --rc-navigation-rail-padding-inline: 0.5rem;
9
+ --rc-navigation-rail-gap: var(--rc-item-gap, 0.75rem);
10
+ --rc-navigation-rail-item-gap: var(--rc-item-gap, 0.75rem);
11
+ --rc-navigation-rail-link-gap: 0.25rem;
12
+ --rc-navigation-rail-item-min-block-size: 3.5rem;
13
+ --rc-navigation-rail-expanded-item-min-block-size: 3.5rem;
14
+ --rc-navigation-rail-item-padding-block: 0.25rem;
15
+ --rc-navigation-rail-item-padding-inline: 0.5rem;
16
+ --rc-navigation-rail-expanded-item-padding-inline: var(--rc-item-padding-inline, 1rem);
17
+ --rc-navigation-rail-item-color: var(--rc-muted-color, CanvasText);
18
+ --rc-navigation-rail-item-text-decoration: none;
19
+ --rc-navigation-rail-active-color: var(--rc-accent, Highlight);
20
+ --rc-navigation-rail-indicator-bg: transparent;
21
+ --rc-navigation-rail-indicator-border: 0;
22
+ --rc-navigation-rail-indicator-radius: 0;
23
+ --rc-navigation-rail-indicator-duration: 0ms;
24
+ --rc-navigation-rail-indicator-easing: ease;
25
+ --rc-icon-font-line-height: 2.5rem;
26
+ --rc-navigation-rail-toggle-size: 3rem;
27
+ --rc-navigation-rail-toggle-inline-offset: 0.5rem;
28
+ --rc-navigation-rail-duration: var(--rc-motion-duration, 200ms);
29
+ --rc-navigation-rail-easing: ease;
30
+ --rc-navigation-rail-focus-ring: var(--rc-focus-ring, 2px solid Highlight);
31
+ --rc-navigation-rail-focus-ring-offset: var(--rc-focus-ring-offset, 2px);
32
+ }
33
+
34
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-navigation-rail > a {
35
+ inline-size: 100%;
36
+ }
37
+
38
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
39
+ rc-navigation-rail
40
+ > a[aria-current]:not([aria-current='false']) {
41
+ border-radius: var(--rc-radius-md, 0.5rem);
42
+ background: color-mix(in srgb, var(--rc-accent, Highlight) 12%, transparent);
43
+ }
44
+
45
+ /*
46
+ * Size the icon itself (whether a direct `<a>` child or nested in
47
+ * [data-rc-navigation-indicator]) rather than the indicator wrapper, so the
48
+ * wrapper stays sized to its normal-flow content (icon + label) and the
49
+ * active-state background above wraps the whole item, not just the icon.
50
+ */
51
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
52
+ rc-navigation-rail:not([expanded])
53
+ > a
54
+ [data-rc-navigation-icon] {
55
+ inline-size: 2.5rem;
56
+ block-size: 2.5rem;
57
+ border-radius: var(--rc-radius-pill, 9999px);
58
+ }
59
+
60
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate))
61
+ rc-navigation-rail[expanded]
62
+ > a
63
+ > :where([data-rc-navigation-icon], [data-rc-navigation-indicator]) {
64
+ justify-content: flex-start;
65
+ gap: var(--rc-item-gap, 0.75rem);
66
+ inline-size: 100%;
67
+ block-size: 3.5rem;
68
+ padding-inline: var(--rc-item-padding-inline, 1rem);
69
+ box-sizing: border-box;
70
+ text-align: start;
71
+ }
72
+ }
@@ -0,0 +1,43 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-segmented-button {
3
+ --_rc-segmented-button-fieldset-display: inline-flex;
4
+ --_rc-segmented-button-fieldset-margin: 0;
5
+ --_rc-segmented-button-fieldset-padding: 0;
6
+ --_rc-segmented-button-fieldset-border: 0;
7
+ --_rc-segmented-button-fieldset-radius: 0;
8
+ --_rc-segmented-button-fieldset-overflow: visible;
9
+ --_rc-segmented-button-legend-position: absolute;
10
+ --_rc-segmented-button-legend-inline-size: 1px;
11
+ --_rc-segmented-button-legend-block-size: 1px;
12
+ --_rc-segmented-button-legend-margin: -1px;
13
+ --_rc-segmented-button-legend-padding: 0;
14
+ --_rc-segmented-button-legend-border: 0;
15
+ --_rc-segmented-button-legend-overflow: hidden;
16
+ --_rc-segmented-button-legend-clip: rect(0 0 0 0);
17
+ --_rc-segmented-button-legend-white-space: nowrap;
18
+ --_rc-segmented-button-segment-display: inline-flex;
19
+ --_rc-segmented-button-segment-cursor: pointer;
20
+ --_rc-segmented-button-segment-user-select: none;
21
+ --_rc-segmented-button-disabled-cursor: not-allowed;
22
+ --_rc-segmented-button-radio-position: absolute;
23
+ --_rc-segmented-button-radio-inline-size: 1px;
24
+ --_rc-segmented-button-radio-block-size: 1px;
25
+ --_rc-segmented-button-radio-margin: 0;
26
+ --_rc-segmented-button-radio-opacity: 0;
27
+ --_rc-segmented-button-radio-pointer-events: none;
28
+ --_rc-segmented-button-selected-icon-display: inline-grid;
29
+ --_rc-segmented-button-vertical-border-inline-start: var(--rc-border);
30
+ --rc-segmented-button-border: var(--rc-border);
31
+ --rc-segmented-button-radius: var(--rc-control-radius);
32
+ --rc-segmented-button-divider: 0;
33
+ --rc-segmented-button-bg: var(--substrate-surface-raised, ButtonFace);
34
+ --rc-segmented-button-color: var(--substrate-on-surface, ButtonText);
35
+ --rc-segmented-button-selected-bg: var(--rc-highlight, Highlight);
36
+ --rc-segmented-button-selected-color: var(--rc-highlight-text, HighlightText);
37
+ --rc-segmented-button-segment-min-block-size: var(--rc-control-block-size, 2.5rem);
38
+ --rc-segmented-button-segment-padding-inline: var(--rc-control-padding-inline, 0.75rem);
39
+ --rc-segmented-button-focus-ring: var(--rc-focus-ring);
40
+ --rc-segmented-button-focus-ring-offset: -2px;
41
+ --rc-segmented-button-disabled-opacity: var(--rc-disabled-opacity);
42
+ }
43
+ }
@@ -28,7 +28,7 @@
28
28
  }
29
29
 
30
30
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(listbox) {
31
- --rc-listbox-option-gap: var(--substrate-item-gap, 0.5rem);
31
+ --rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
32
32
  --rc-listbox-option-min-block-size: 2.25rem;
33
33
  --rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
34
34
  --rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
@@ -0,0 +1,23 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-snackbar {
3
+ --rc-snackbar-inset-block-end: 1rem;
4
+ --rc-snackbar-min-block-size: 3rem;
5
+ --rc-snackbar-max-inline-size: 30rem;
6
+ --rc-snackbar-padding-block: 0.75rem;
7
+ --rc-snackbar-padding-inline: 1rem;
8
+ --rc-snackbar-border: 0;
9
+ --rc-snackbar-radius: var(--substrate-radius-md, 0.5rem);
10
+ --rc-snackbar-bg: var(--substrate-inverse-surface, CanvasText);
11
+ --rc-snackbar-color: var(--substrate-inverse-on-surface, Canvas);
12
+ --rc-snackbar-action-color: var(--substrate-inverse-on-surface, Canvas);
13
+ --rc-snackbar-action-border: 0;
14
+ --rc-snackbar-action-radius: 9999px;
15
+ --rc-snackbar-action-padding-block: 0.5rem;
16
+ --rc-snackbar-action-padding-inline: 0.75rem;
17
+ --rc-snackbar-action-bg: transparent;
18
+ --rc-snackbar-action-font: 650 0.875rem / 1.25 var(--rc-font-family, inherit);
19
+ --rc-snackbar-shadow: var(--substrate-shadow-lg, var(--rc-shadow));
20
+ --rc-snackbar-focus-ring: var(--rc-focus-ring);
21
+ --rc-snackbar-focus-ring-offset: var(--rc-focus-ring-offset);
22
+ }
23
+ }
@@ -0,0 +1,28 @@
1
+ @layer rc-theme-substrate.components {
2
+ :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-switch {
3
+ --rc-switch-native-appearance: none;
4
+ --rc-switch-native-inline-size: 100%;
5
+ --rc-switch-native-block-size: 100%;
6
+ --rc-switch-native-margin: 0;
7
+ --rc-switch-native-opacity: 0;
8
+ --rc-switch-decoration-display: block;
9
+ --rc-switch-icon-display: grid;
10
+ --rc-switch-track-inline-size: 3.25rem;
11
+ --rc-switch-track-block-size: 2rem;
12
+ --rc-switch-track-border: var(--rc-border);
13
+ --rc-switch-track-radius: 9999px;
14
+ --rc-switch-track-bg: var(--substrate-surface-raised, ButtonFace);
15
+ --rc-switch-thumb-size: 1rem;
16
+ --rc-switch-thumb-offset: 0.375rem;
17
+ --rc-switch-thumb-bg: var(--substrate-on-surface-muted, ButtonText);
18
+ --rc-switch-selected-track-border-color: var(--rc-accent);
19
+ --rc-switch-selected-track-bg: var(--rc-accent);
20
+ --rc-switch-selected-thumb-size: 1.5rem;
21
+ --rc-switch-selected-thumb-bg: var(--substrate-on-primary, HighlightText);
22
+ --rc-switch-thumb-translate: 1.125rem;
23
+ --rc-switch-focus-ring: var(--rc-focus-ring);
24
+ --rc-switch-focus-ring-offset: var(--rc-focus-ring-offset);
25
+ --rc-switch-disabled-opacity: var(--rc-disabled-opacity);
26
+ --rc-switch-duration: var(--rc-motion-duration);
27
+ }
28
+ }
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  :where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(listbox) {
15
- --rc-listbox-option-gap: var(--substrate-item-gap, 0.5rem);
15
+ --rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
16
16
  --rc-listbox-option-min-block-size: 2.25rem;
17
17
  --rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
18
18
  --rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
package/components.css CHANGED
@@ -1,21 +1,33 @@
1
1
  @layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components;
2
2
 
3
+ @import './components/icons.css';
3
4
  @import './components/listbox.css';
4
5
  @import './components/select.css';
5
6
  @import './components/combobox.css';
6
7
  @import './components/search-bar.css';
8
+ @import './components/bottom-sheet.css';
7
9
  @import './components/textarea.css';
8
10
  @import './components/markdown-editor.css';
9
11
  @import './components/transfer-list.css';
12
+ @import './components/button.css';
13
+ @import './components/card.css';
14
+ @import './components/chip.css';
15
+ @import './components/list-item.css';
10
16
  @import './components/fab.css';
17
+ @import './components/fab-menu.css';
11
18
  @import './components/app-bar.css';
12
19
  @import './components/menu.css';
13
20
  @import './components/menu-button.css';
14
21
  @import './components/menubar.css';
22
+ @import './components/navigation-bar.css';
23
+ @import './components/navigation-rail.css';
15
24
  @import './components/toolbar.css';
25
+ @import './components/segmented-button.css';
16
26
  @import './components/slider.css';
27
+ @import './components/snackbar.css';
17
28
  @import './components/range-slider.css';
18
29
  @import './components/splitter.css';
30
+ @import './components/switch.css';
19
31
  @import './components/dialog.css';
20
32
  @import './components/disclosure.css';
21
33
  @import './components/accordion.css';
package/defaults.css CHANGED
@@ -25,7 +25,8 @@
25
25
  --substrate-shadow-color: light-dark(oklch(16% 0.03 60 / 18%), oklch(0% 0 0 / 42%));
26
26
 
27
27
  --substrate-font-family:
28
- Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
28
+ system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell,
29
+ 'Noto Sans', sans-serif;
29
30
  --substrate-font-size: 0.95rem;
30
31
  --substrate-line-height: 1.45;
31
32
  --substrate-font-weight: 450;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.2",
6
+ "version": "0.4.1",
7
7
  "description": "Lightweight CSS reference theme for app-oriented rc-webcomponents layouts.",
8
8
  "repository": {
9
9
  "type": "git",
@@ -41,4 +41,4 @@
41
41
  "vite": "^7.1.7",
42
42
  "vitest": "^4.0.6"
43
43
  }
44
- }
44
+ }