@rcarls/rc-theme-substrate 0.0.0-next-20260921045401
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +358 -0
- package/README.md +79 -0
- package/bridge.css +204 -0
- package/components/accordion.css +18 -0
- package/components/adaptive-menu.css +43 -0
- package/components/app-bar.css +21 -0
- package/components/bottom-sheet.css +90 -0
- package/components/button.css +44 -0
- package/components/card.css +51 -0
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/chip.css +20 -0
- package/components/combobox.css +55 -0
- package/components/dialog.css +43 -0
- package/components/disclosure.css +114 -0
- package/components/fab-menu.css +36 -0
- package/components/fab.css +44 -0
- package/components/field.css +136 -0
- package/components/icons.css +19 -0
- package/components/list-item.css +70 -0
- package/components/listbox.css +28 -0
- package/components/markdown-editor.css +53 -0
- package/components/menu-button.css +18 -0
- package/components/menu.css +23 -0
- package/components/menubar.css +17 -0
- package/components/modes.css +60 -0
- package/components/navigation-bar.css +43 -0
- package/components/navigation-rail.css +72 -0
- package/components/progress.css +11 -0
- package/components/range-slider.css +18 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +30 -0
- package/components/segmented-button.css +19 -0
- package/components/select.css +74 -0
- package/components/slider.css +10 -0
- package/components/snackbar.css +23 -0
- package/components/splitter.css +39 -0
- package/components/switch.css +28 -0
- package/components/textarea.css +20 -0
- package/components/toolbar.css +36 -0
- package/components/transfer-list.css +30 -0
- package/components/virtual-canvas.css +18 -0
- package/components.css +41 -0
- package/defaults.css +108 -0
- package/package.json +44 -0
- package/theme.css +3 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog) {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: auto;
|
|
6
|
+
top: var(--rc-dialog-visual-viewport-top, 0);
|
|
7
|
+
left: var(--rc-dialog-visual-viewport-left, 0);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
inline-size: var(--rc-dialog-visual-viewport-width, 100dvw);
|
|
10
|
+
block-size: var(--rc-dialog-visual-viewport-height, 100dvh);
|
|
11
|
+
max-inline-size: none;
|
|
12
|
+
max-block-size: none;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding-block: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-bottom));
|
|
15
|
+
padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
|
|
16
|
+
resize: none;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
border-radius: 0;
|
|
19
|
+
box-shadow: none;
|
|
20
|
+
transform: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(trigger) {
|
|
28
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
29
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
30
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
31
|
+
background: var(--rc-field, Field);
|
|
32
|
+
color: var(--rc-field-text, FieldText);
|
|
33
|
+
transition:
|
|
34
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
35
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
36
|
+
background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(trigger):hover {
|
|
40
|
+
border-color: color-mix(in srgb, var(--rc-accent, Highlight) 55%, var(--rc-border-color));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(trigger):focus-visible,
|
|
44
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
45
|
+
rc-select::part(trigger)[aria-expanded='true'] {
|
|
46
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
47
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
48
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(listbox) {
|
|
52
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
|
|
53
|
+
--rc-listbox-option-min-block-size: 2.25rem;
|
|
54
|
+
--rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
55
|
+
--rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
56
|
+
--rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
57
|
+
--rc-listbox-hover-color: var(--rc-field-text, FieldText);
|
|
58
|
+
--rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
59
|
+
--rc-listbox-active-color: var(--rc-field-text, FieldText);
|
|
60
|
+
--rc-listbox-selected-bg: var(--rc-highlight, Highlight);
|
|
61
|
+
--rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
|
|
62
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
63
|
+
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
64
|
+
background: var(--substrate-surface-raised, Canvas);
|
|
65
|
+
box-shadow: var(--rc-shadow, none);
|
|
66
|
+
padding-block: 0.25rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select::part(chip) {
|
|
70
|
+
border-radius: var(--substrate-radius-sm, 0.25rem);
|
|
71
|
+
background: var(--rc-highlight, Highlight);
|
|
72
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-slider::part(value-display) {
|
|
3
|
+
color: var(--substrate-on-surface-muted, GrayText);
|
|
4
|
+
font-variant-numeric: tabular-nums;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-slider input[type='range'] {
|
|
8
|
+
accent-color: var(--rc-accent, Highlight);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -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,39 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Geometry is deliberately left to the component's own defaults here; this
|
|
4
|
+
* theme only paints the splitter. See the matching assertion in
|
|
5
|
+
* components.test.ts.
|
|
6
|
+
*/
|
|
7
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-splitter {
|
|
8
|
+
/*
|
|
9
|
+
* Both of these used to mix against the bare `Canvas` and `ButtonBorder`
|
|
10
|
+
* system colors, which have no value outside a browser and so could not
|
|
11
|
+
* reach the token export at all. Mixing against the theme's own surface and
|
|
12
|
+
* border keeps the intent and makes the result a real color.
|
|
13
|
+
*/
|
|
14
|
+
--rc-splitter-separator-color: color-mix(
|
|
15
|
+
in srgb,
|
|
16
|
+
var(--rc-accent, Highlight) 8%,
|
|
17
|
+
var(--substrate-surface, Canvas)
|
|
18
|
+
);
|
|
19
|
+
--rc-splitter-handle-color: color-mix(
|
|
20
|
+
in srgb,
|
|
21
|
+
var(--rc-accent, Highlight) 45%,
|
|
22
|
+
var(--substrate-border-color, ButtonBorder)
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
--rc-splitter-handle-fill: var(--substrate-border-color, ButtonBorder);
|
|
26
|
+
--rc-splitter-handle-hover-fill: var(--rc-accent, Highlight);
|
|
27
|
+
--rc-splitter-handle-transition: var(--substrate-motion-effects-duration-default, 160ms);
|
|
28
|
+
--rc-splitter-keyline: var(--rc-border, 1px solid ButtonBorder);
|
|
29
|
+
|
|
30
|
+
--rc-splitter-collapse-button-bg: var(--substrate-surface-raised, ButtonFace);
|
|
31
|
+
--rc-splitter-collapse-button-hover-bg: color-mix(
|
|
32
|
+
in srgb,
|
|
33
|
+
var(--rc-accent, Highlight) 10%,
|
|
34
|
+
var(--substrate-surface-raised, ButtonFace)
|
|
35
|
+
);
|
|
36
|
+
--rc-splitter-collapse-button-border: var(--rc-border, 1px solid ButtonBorder);
|
|
37
|
+
--rc-splitter-collapse-button-color: var(--substrate-on-surface, ButtonText);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-textarea {
|
|
3
|
+
--rc-textarea-padding: 0.75rem;
|
|
4
|
+
--rc-textarea-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
--rc-textarea-border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
--rc-textarea-background: var(--rc-field, Field);
|
|
7
|
+
--rc-textarea-color: var(--rc-field-text, FieldText);
|
|
8
|
+
font-family: var(--rc-font-family, inherit);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-textarea::part(root) {
|
|
12
|
+
transition:
|
|
13
|
+
border-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
14
|
+
box-shadow var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-textarea::part(root):focus-within {
|
|
18
|
+
box-shadow: 0 0 0 4px color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
|
|
5
|
+
--rc-toolbar-gap-inline: 0.125rem;
|
|
6
|
+
--rc-toolbar-padding-block: 0.25rem;
|
|
7
|
+
--rc-toolbar-padding-inline: 0.25rem;
|
|
8
|
+
--rc-toolbar-radius: var(--substrate-radius-md, 0.5rem);
|
|
9
|
+
--rc-toolbar-vertical-radius: var(--substrate-radius-md, 0.5rem);
|
|
10
|
+
--rc-toolbar-flex-wrap: nowrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar::part(root) {
|
|
14
|
+
gap: var(--rc-toolbar-gap-inline, 0.125rem);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar > button {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
border-radius: var(--substrate-radius-md, 0.5rem);
|
|
22
|
+
line-height: 1;
|
|
23
|
+
transition:
|
|
24
|
+
background-color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease),
|
|
25
|
+
color var(--rc-motion-duration, 160ms) var(--substrate-motion-easing, ease);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar > button:hover {
|
|
29
|
+
background: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar > button[aria-pressed='true'] {
|
|
33
|
+
background: var(--rc-highlight, Highlight);
|
|
34
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list {
|
|
3
|
+
--rc-transfer-list-gap: 1rem;
|
|
4
|
+
--rc-transfer-list-listbox-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
--rc-transfer-list-listbox-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
--rc-transfer-list-listbox-bg: var(--substrate-surface-raised, Canvas);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(panel),
|
|
10
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(listbox) {
|
|
11
|
+
box-shadow: var(--substrate-shadow-sm, none);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(listbox) {
|
|
15
|
+
--rc-listbox-option-gap: var(--rc-list-item-gap, var(--substrate-item-gap, 0.5rem));
|
|
16
|
+
--rc-listbox-option-min-block-size: 2.25rem;
|
|
17
|
+
--rc-listbox-option-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
18
|
+
--rc-listbox-option-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
19
|
+
--rc-listbox-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
20
|
+
--rc-listbox-hover-color: var(--rc-field-text, FieldText);
|
|
21
|
+
--rc-listbox-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
22
|
+
--rc-listbox-active-color: var(--rc-field-text, FieldText);
|
|
23
|
+
--rc-listbox-selected-bg: var(--rc-highlight, Highlight);
|
|
24
|
+
--rc-listbox-selected-color: var(--rc-highlight-text, HighlightText);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(button) {
|
|
28
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-virtual-canvas {
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
background: var(--substrate-surface, Canvas);
|
|
7
|
+
|
|
8
|
+
--rc-virtual-canvas-scrollbar-size: 0.75rem;
|
|
9
|
+
--rc-virtual-canvas-scrollbar-width: thin;
|
|
10
|
+
--rc-virtual-canvas-scrollbar-track-background: transparent;
|
|
11
|
+
--rc-virtual-canvas-scrollbar-thumb-background: color-mix(
|
|
12
|
+
in srgb,
|
|
13
|
+
var(--substrate-on-surface-muted, GrayText) 45%,
|
|
14
|
+
transparent
|
|
15
|
+
);
|
|
16
|
+
--rc-virtual-canvas-scrollbar-button-background: var(--substrate-surface-raised, ButtonFace);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/components.css
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
@layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components;
|
|
2
|
+
|
|
3
|
+
@import './components/icons.css';
|
|
4
|
+
@import './components/listbox.css';
|
|
5
|
+
@import './components/select.css';
|
|
6
|
+
@import './components/combobox.css';
|
|
7
|
+
@import './components/search-bar.css';
|
|
8
|
+
@import './components/field.css';
|
|
9
|
+
@import './components/bottom-sheet.css';
|
|
10
|
+
@import './components/textarea.css';
|
|
11
|
+
@import './components/markdown-editor.css';
|
|
12
|
+
@import './components/transfer-list.css';
|
|
13
|
+
@import './components/button.css';
|
|
14
|
+
@import './components/card.css';
|
|
15
|
+
@import './components/chip.css';
|
|
16
|
+
@import './components/list-item.css';
|
|
17
|
+
@import './components/fab.css';
|
|
18
|
+
@import './components/fab-menu.css';
|
|
19
|
+
@import './components/app-bar.css';
|
|
20
|
+
@import './components/menu.css';
|
|
21
|
+
@import './components/menu-button.css';
|
|
22
|
+
@import './components/menubar.css';
|
|
23
|
+
@import './components/navigation-bar.css';
|
|
24
|
+
@import './components/navigation-rail.css';
|
|
25
|
+
@import './components/toolbar.css';
|
|
26
|
+
@import './components/segmented-button.css';
|
|
27
|
+
@import './components/slider.css';
|
|
28
|
+
@import './components/progress.css';
|
|
29
|
+
@import './components/snackbar.css';
|
|
30
|
+
@import './components/range-slider.css';
|
|
31
|
+
@import './components/splitter.css';
|
|
32
|
+
@import './components/switch.css';
|
|
33
|
+
@import './components/dialog.css';
|
|
34
|
+
@import './components/disclosure.css';
|
|
35
|
+
@import './components/accordion.css';
|
|
36
|
+
@import './components/virtual-canvas.css';
|
|
37
|
+
@import './components/adaptive-menu.css';
|
|
38
|
+
@import './components/carousel.css';
|
|
39
|
+
@import './components/chip-group.css';
|
|
40
|
+
@import './components/scroller.css';
|
|
41
|
+
@import './components/modes.css';
|
package/defaults.css
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
@layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components;
|
|
2
|
+
|
|
3
|
+
@layer rc-theme-substrate.defaults {
|
|
4
|
+
/*
|
|
5
|
+
* Substrate reference tokens.
|
|
6
|
+
*
|
|
7
|
+
* These defaults are scoped so applications can place the theme at any app
|
|
8
|
+
* boundary. Import bridge.css alone when providing your own --substrate-* tokens.
|
|
9
|
+
*/
|
|
10
|
+
.rc-theme-substrate,
|
|
11
|
+
:host(.rc-theme-substrate) {
|
|
12
|
+
color-scheme: light dark;
|
|
13
|
+
|
|
14
|
+
--substrate-primary: light-dark(oklch(57% 0.19 48), oklch(76% 0.15 58));
|
|
15
|
+
--substrate-on-primary: light-dark(oklch(99% 0.01 80), oklch(19% 0.04 45));
|
|
16
|
+
--substrate-primary-container: light-dark(oklch(94% 0.06 62), oklch(31% 0.08 48));
|
|
17
|
+
--substrate-on-primary-container: light-dark(oklch(27% 0.08 45), oklch(95% 0.05 66));
|
|
18
|
+
|
|
19
|
+
--substrate-surface: light-dark(oklch(99% 0.006 80), oklch(18% 0.012 72));
|
|
20
|
+
--substrate-surface-raised: light-dark(oklch(97% 0.012 78), oklch(23% 0.016 72));
|
|
21
|
+
--substrate-field: light-dark(oklch(100% 0 0), oklch(20% 0.014 72));
|
|
22
|
+
--substrate-on-surface: light-dark(oklch(19% 0.018 72), oklch(94% 0.01 80));
|
|
23
|
+
--substrate-on-surface-muted: light-dark(oklch(46% 0.018 72), oklch(73% 0.014 80));
|
|
24
|
+
--substrate-border-color: light-dark(oklch(83% 0.018 75), oklch(39% 0.018 72));
|
|
25
|
+
--substrate-shadow-color: light-dark(oklch(16% 0.03 60 / 18%), oklch(0% 0 0 / 42%));
|
|
26
|
+
|
|
27
|
+
/* Flipped against the surface pair, for the snackbar and anything else
|
|
28
|
+
* that has to read as a layer above the page rather than part of it. */
|
|
29
|
+
--substrate-inverse-surface: light-dark(oklch(27% 0.018 72), oklch(93% 0.01 80));
|
|
30
|
+
--substrate-inverse-on-surface: light-dark(oklch(96% 0.01 80), oklch(21% 0.018 72));
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Held at hue 25 so it reads as red rather than as a darker shade of the
|
|
34
|
+
* primary, which sits at hue 48. Clears 7:1 against the field in both modes.
|
|
35
|
+
*/
|
|
36
|
+
--substrate-error: light-dark(oklch(47% 0.19 25), oklch(74% 0.15 25));
|
|
37
|
+
|
|
38
|
+
--substrate-font-family:
|
|
39
|
+
system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell,
|
|
40
|
+
'Noto Sans', sans-serif;
|
|
41
|
+
--substrate-font-size: 0.95rem;
|
|
42
|
+
--substrate-line-height: 1.45;
|
|
43
|
+
--substrate-font-weight: 450;
|
|
44
|
+
|
|
45
|
+
--substrate-radius-sm: 0.25rem;
|
|
46
|
+
--substrate-radius-md: 0.5rem;
|
|
47
|
+
--substrate-radius-lg: 0.75rem;
|
|
48
|
+
--substrate-radius-xl: 1rem;
|
|
49
|
+
--substrate-radius-pill: 999px;
|
|
50
|
+
|
|
51
|
+
--substrate-control-block-size: 2.5rem;
|
|
52
|
+
--substrate-control-padding-block: 0.5rem;
|
|
53
|
+
--substrate-control-padding-inline: 0.75rem;
|
|
54
|
+
--substrate-control-gap: 0.5rem;
|
|
55
|
+
--substrate-item-padding-block: 0.55rem;
|
|
56
|
+
--substrate-item-padding-inline: 0.75rem;
|
|
57
|
+
--substrate-item-gap: 0.5rem;
|
|
58
|
+
|
|
59
|
+
--substrate-shadow-sm: 0 1px 2px var(--substrate-shadow-color);
|
|
60
|
+
--substrate-shadow-md:
|
|
61
|
+
0 1px 2px var(--substrate-shadow-color),
|
|
62
|
+
0 10px 30px color-mix(in oklch, var(--substrate-shadow-color) 65%, transparent);
|
|
63
|
+
--substrate-shadow-lg:
|
|
64
|
+
0 1px 2px var(--substrate-shadow-color),
|
|
65
|
+
0 18px 48px color-mix(in oklch, var(--substrate-shadow-color) 80%, transparent);
|
|
66
|
+
|
|
67
|
+
--substrate-focus-ring: 2px solid var(--substrate-primary);
|
|
68
|
+
--substrate-focus-ring-offset: 2px;
|
|
69
|
+
--substrate-motion-duration: 160ms;
|
|
70
|
+
--substrate-motion-duration-slow: 240ms;
|
|
71
|
+
--substrate-motion-easing: cubic-bezier(0.2, 0, 0, 1);
|
|
72
|
+
/*
|
|
73
|
+
* The shared spatial/effects scale (see the styling guide), kept as its
|
|
74
|
+
* own small set of primitives rather than derived from the two above:
|
|
75
|
+
* Substrate favors few named tokens over a layered primitive/semantic
|
|
76
|
+
* split, and the values only partly overlap (160/240ms already meant
|
|
77
|
+
* something as the flat scale; here they mean the spatial tier).
|
|
78
|
+
*/
|
|
79
|
+
--substrate-motion-effects-duration-fast: 100ms;
|
|
80
|
+
--substrate-motion-effects-duration-default: 160ms;
|
|
81
|
+
--substrate-motion-effects-duration-slow: 240ms;
|
|
82
|
+
--substrate-motion-spatial-duration-fast: 160ms;
|
|
83
|
+
--substrate-motion-spatial-duration-default: 240ms;
|
|
84
|
+
--substrate-motion-spatial-duration-slow: 320ms;
|
|
85
|
+
--substrate-disabled-opacity: 0.52;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (forced-colors: active) {
|
|
89
|
+
.rc-theme-substrate,
|
|
90
|
+
:host(.rc-theme-substrate) {
|
|
91
|
+
--substrate-primary: Highlight;
|
|
92
|
+
--substrate-on-primary: HighlightText;
|
|
93
|
+
--substrate-primary-container: Highlight;
|
|
94
|
+
--substrate-on-primary-container: HighlightText;
|
|
95
|
+
--substrate-surface: Canvas;
|
|
96
|
+
--substrate-surface-raised: Canvas;
|
|
97
|
+
--substrate-field: Field;
|
|
98
|
+
--substrate-on-surface: CanvasText;
|
|
99
|
+
--substrate-on-surface-muted: GrayText;
|
|
100
|
+
--substrate-inverse-surface: CanvasText;
|
|
101
|
+
--substrate-inverse-on-surface: Canvas;
|
|
102
|
+
--substrate-error: Mark;
|
|
103
|
+
--substrate-border-color: ButtonBorder;
|
|
104
|
+
--substrate-shadow-color: transparent;
|
|
105
|
+
--substrate-focus-ring: 2px solid Highlight;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rcarls/rc-theme-substrate",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.0.0-next-20260921045401",
|
|
7
|
+
"description": "Lightweight CSS reference theme for app-oriented rc-webcomponents layouts.",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/richardcarls/rc-webcomponents.git",
|
|
11
|
+
"directory": "packages/rc-theme-substrate"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://richardcarls.github.io/rc-webcomponents/guide/theme-previews",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./bridge.css",
|
|
21
|
+
"./bridge.css": "./bridge.css",
|
|
22
|
+
"./defaults.css": "./defaults.css",
|
|
23
|
+
"./components.css": "./components.css",
|
|
24
|
+
"./components/*.css": "./components/*.css",
|
|
25
|
+
"./theme.css": "./theme.css"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"*.css",
|
|
29
|
+
"components",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "echo 'CSS-only package, no build step'",
|
|
34
|
+
"test:browser": "vitest --run",
|
|
35
|
+
"test:browser:chrome": "vitest --run --project=chromium",
|
|
36
|
+
"test:browser:firefox": "vitest --run --project=firefox"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@vitest/browser-playwright": "4.1.5",
|
|
40
|
+
"playwright": "^1.56.0",
|
|
41
|
+
"vite": "^7.1.7",
|
|
42
|
+
"vitest": "^4.0.6"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/theme.css
ADDED