@rcarls/rc-theme-substrate 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +394 -0
- package/README.md +23 -0
- package/bridge.css +38 -17
- package/components/accordion.css +10 -113
- package/components/adaptive-menu.css +98 -0
- package/components/app-bar.css +1 -1
- package/components/bottom-sheet.css +1 -1
- package/components/carousel.css +31 -0
- package/components/chip-group.css +21 -0
- package/components/dialog.css +15 -11
- package/components/disclosure.css +62 -68
- package/components/fab-menu.css +3 -3
- package/components/field.css +155 -0
- package/components/list-item.css +4 -6
- package/components/listbox.css +4 -2
- package/components/markdown-editor.css +45 -32
- package/components/menu.css +11 -6
- package/components/modes.css +36 -0
- package/components/popover.css +13 -0
- package/components/progress.css +5 -0
- package/components/scroller.css +19 -0
- package/components/segmented-button.css +2 -27
- package/components/select.css +21 -0
- package/components/splitter.css +35 -2
- package/components/textarea.css +3 -2
- package/components/toolbar.css +8 -1
- package/components/tooltip.css +15 -0
- package/components/transfer-list.css +3 -3
- package/components/virtual-canvas.css +10 -0
- package/components/virtual-scroller.css +7 -0
- package/components.css +10 -1
- package/css-components/button.css +66 -0
- package/css-components/card.css +14 -0
- package/css-components/chip-group.css +9 -0
- package/css-components/chip.css +80 -0
- package/css-components/disclosure.css +25 -0
- package/css-components/list.css +34 -0
- package/css-components/select.css +20 -0
- package/css-components/textarea.css +22 -0
- package/css-components.css +31 -0
- package/defaults.css +30 -1
- package/native.css +249 -0
- package/package.json +5 -1
|
@@ -1,37 +1,50 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-markdown-editor {
|
|
3
|
-
--
|
|
4
|
-
--
|
|
5
|
-
--
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
--
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
--
|
|
29
|
-
--
|
|
30
|
-
--
|
|
31
|
-
--
|
|
32
|
-
--
|
|
33
|
-
--
|
|
34
|
-
--
|
|
3
|
+
--rc-markdown-editor-padding: 0.75rem;
|
|
4
|
+
--rc-markdown-editor-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
+
--rc-markdown-editor-border-radius: 0 0 var(--substrate-radius-lg, 0.75rem)
|
|
6
|
+
var(--substrate-radius-lg, 0.75rem);
|
|
7
|
+
--rc-markdown-editor-background: var(--rc-field, Field);
|
|
8
|
+
--rc-markdown-editor-color: var(--rc-field-text, FieldText);
|
|
9
|
+
--rc-markdown-editor-toolbar-background: var(--substrate-surface-raised, Canvas);
|
|
10
|
+
--rc-markdown-editor-toolbar-color: var(--substrate-on-surface, CanvasText);
|
|
11
|
+
--rc-markdown-editor-toolbar-border: var(--rc-border, 1px solid ButtonBorder);
|
|
12
|
+
--rc-markdown-editor-toolbar-gap: 0.125rem;
|
|
13
|
+
--rc-markdown-editor-toolbar-padding: 0.25rem;
|
|
14
|
+
--rc-markdown-editor-toolbar-radius: var(--substrate-radius-lg, 0.75rem)
|
|
15
|
+
var(--substrate-radius-lg, 0.75rem) 0 0;
|
|
16
|
+
--rc-markdown-editor-toolbar-button-size: var(--rc-control-block-size, 2.5rem);
|
|
17
|
+
--rc-markdown-editor-toolbar-button-color: var(--substrate-on-surface, ButtonText);
|
|
18
|
+
--rc-markdown-editor-toolbar-button-border: 1px solid transparent;
|
|
19
|
+
--rc-markdown-editor-toolbar-button-radius: var(--substrate-radius-md, 0.5rem);
|
|
20
|
+
--rc-markdown-editor-toolbar-button-active-background: var(
|
|
21
|
+
--substrate-primary-container,
|
|
22
|
+
Highlight
|
|
23
|
+
);
|
|
24
|
+
--rc-markdown-editor-toolbar-button-active-color: var(
|
|
25
|
+
--substrate-on-primary-container,
|
|
26
|
+
HighlightText
|
|
27
|
+
);
|
|
28
|
+
--rc-markdown-editor-toolbar-button-active-border: 1px solid var(--substrate-primary, Highlight);
|
|
29
|
+
--rc-markdown-editor-toolbar-focus-outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
30
|
+
--rc-markdown-editor-toolbar-focus-outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
31
|
+
--rc-markdown-editor-toolbar-select-background: var(--substrate-field, Field);
|
|
32
|
+
--rc-markdown-editor-toolbar-select-color: var(--substrate-on-surface, FieldText);
|
|
33
|
+
--rc-markdown-editor-toolbar-select-border: var(--rc-border, 1px solid ButtonBorder);
|
|
34
|
+
--rc-markdown-editor-toolbar-select-radius: var(--substrate-radius-sm, 0.25rem);
|
|
35
|
+
--rc-markdown-editor-toolbar-select-active-background: var(
|
|
36
|
+
--substrate-primary-container,
|
|
37
|
+
Highlight
|
|
38
|
+
);
|
|
39
|
+
--rc-markdown-editor-toolbar-select-active-color: var(
|
|
40
|
+
--substrate-on-primary-container,
|
|
41
|
+
HighlightText
|
|
42
|
+
);
|
|
43
|
+
--rc-markdown-editor-toolbar-select-active-border-color: var(--substrate-primary, Highlight);
|
|
44
|
+
--rc-markdown-editor-toolbar-input-background: var(--substrate-field, Field);
|
|
45
|
+
--rc-markdown-editor-toolbar-input-color: var(--substrate-on-surface, FieldText);
|
|
46
|
+
--rc-markdown-editor-toolbar-input-border: var(--rc-border, 1px solid ButtonBorder);
|
|
47
|
+
--rc-markdown-editor-toolbar-input-radius: var(--substrate-radius-sm, 0.25rem);
|
|
35
48
|
}
|
|
36
49
|
|
|
37
50
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-markdown-editor::part(rich-view) {
|
package/components/menu.css
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
|
-
|
|
2
|
+
/*
|
|
3
|
+
* Declared on the theme root rather than on rc-menu so menus rendered
|
|
4
|
+
* inside other shadow roots inherit the same values.
|
|
5
|
+
*/
|
|
6
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
3
7
|
--rc-menu-item-gap: var(--substrate-item-gap, 0.5rem);
|
|
4
8
|
--rc-menu-item-min-block-size: 2.25rem;
|
|
5
9
|
--rc-menu-item-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
@@ -7,12 +11,13 @@
|
|
|
7
11
|
--rc-menu-hover-bg: color-mix(in srgb, var(--rc-accent, Highlight) 10%, transparent);
|
|
8
12
|
--rc-menu-active-bg: color-mix(in srgb, var(--rc-accent, Highlight) 16%, transparent);
|
|
9
13
|
--rc-menu-check-size: 1.25rem;
|
|
14
|
+
--rc-menu-background: var(--substrate-surface-raised, Canvas);
|
|
15
|
+
--rc-menu-shadow: var(--rc-shadow, none);
|
|
16
|
+
--rc-menu-padding-block: 0.25rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menu {
|
|
10
20
|
display: inline-block;
|
|
11
|
-
border: var(--rc-border, 1px solid ButtonBorder);
|
|
12
|
-
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
13
|
-
background: var(--substrate-surface-raised, Canvas);
|
|
14
|
-
box-shadow: var(--rc-shadow, none);
|
|
15
|
-
padding-block: 0.25rem;
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-menu [data-group-label] {
|
package/components/modes.css
CHANGED
|
@@ -21,4 +21,40 @@
|
|
|
21
21
|
view-transition-name: var(--rc-view-transition-name, none);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The vestibular harm reduced motion guards against is movement across the
|
|
27
|
+
* visual field, which a color or opacity change does not trigger; removing
|
|
28
|
+
* every transition over-corrected. Spatial motion still goes fully to
|
|
29
|
+
* zero. Effects motion is kept but shortened, scaled down from
|
|
30
|
+
* Substrate's own already-quick 100/160/240ms scale. The two legacy
|
|
31
|
+
* primitives (--substrate-motion-duration and its -slow companion,
|
|
32
|
+
* predating the effects/spatial split) and the cross-theme compatibility
|
|
33
|
+
* token stay at zero: dialog.css is their one remaining direct consumer,
|
|
34
|
+
* animating opacity, display, and transform together in one declaration
|
|
35
|
+
* that mixes spatial and effects properties and can't be cleanly
|
|
36
|
+
* classified into one bucket. (That file's own transform-based entrance
|
|
37
|
+
* is a separate, pre-existing conflict with rc-dialog's pointer-resize
|
|
38
|
+
* geometry reads and remains outside this theme-level override.)
|
|
39
|
+
*/
|
|
40
|
+
@media (prefers-reduced-motion: reduce) {
|
|
41
|
+
.rc-theme-substrate,
|
|
42
|
+
:host(.rc-theme-substrate) {
|
|
43
|
+
--substrate-motion-duration: 0ms;
|
|
44
|
+
--substrate-motion-duration-slow: 0ms;
|
|
45
|
+
--substrate-motion-effects-duration-fast: 40ms;
|
|
46
|
+
--substrate-motion-effects-duration-default: 55ms;
|
|
47
|
+
--substrate-motion-effects-duration-slow: 70ms;
|
|
48
|
+
--substrate-motion-spatial-duration-fast: 0ms;
|
|
49
|
+
--substrate-motion-spatial-duration-default: 0ms;
|
|
50
|
+
--substrate-motion-spatial-duration-slow: 0ms;
|
|
51
|
+
--rc-motion-duration: 0ms;
|
|
52
|
+
--rc-motion-effects-duration-fast: 40ms;
|
|
53
|
+
--rc-motion-effects-duration-default: 55ms;
|
|
54
|
+
--rc-motion-effects-duration-slow: 70ms;
|
|
55
|
+
--rc-motion-spatial-duration-fast: 0ms;
|
|
56
|
+
--rc-motion-spatial-duration-default: 0ms;
|
|
57
|
+
--rc-motion-spatial-duration-slow: 0ms;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
24
60
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* The border, corner, and elevation come from the bridge's --rc-popup-*
|
|
4
|
+
* tokens. A popover sits on the raised surface like a menu, with item-scale
|
|
5
|
+
* padding. Declared on the theme root so popovers rendered inside other
|
|
6
|
+
* shadow roots inherit the same values.
|
|
7
|
+
*/
|
|
8
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
9
|
+
--rc-popover-background: var(--substrate-surface-raised, Canvas);
|
|
10
|
+
--rc-popover-padding-block: var(--substrate-item-padding-block, 0.55rem);
|
|
11
|
+
--rc-popover-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
12
|
+
}
|
|
13
|
+
}
|
package/components/progress.css
CHANGED
|
@@ -3,4 +3,9 @@
|
|
|
3
3
|
color: var(--substrate-on-surface-muted, GrayText);
|
|
4
4
|
font-variant-numeric: tabular-nums;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-progress {
|
|
8
|
+
--rc-progress-fill-transition-duration: var(--rc-motion-effects-duration-fast, 100ms);
|
|
9
|
+
--rc-progress-fill-transition-easing: var(--rc-motion-effects-easing-fast, ease-out);
|
|
10
|
+
}
|
|
6
11
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-scroller {
|
|
3
|
+
/*
|
|
4
|
+
* Capped a little narrower than Material's 1200px: Substrate runs a smaller
|
|
5
|
+
* base font, so the same pixel width carries more characters per line.
|
|
6
|
+
*/
|
|
7
|
+
--rc-scroller-content-max-inline-size: 68rem;
|
|
8
|
+
--rc-scroller-content-padding-inline: var(--substrate-item-padding-inline, 0.75rem);
|
|
9
|
+
--rc-scroller-content-row-gap: var(--substrate-item-gap, 0.5rem);
|
|
10
|
+
|
|
11
|
+
--rc-scroller-scrollbar-width: thin;
|
|
12
|
+
--rc-scroller-scrollbar-color: color-mix(
|
|
13
|
+
in srgb,
|
|
14
|
+
var(--substrate-on-surface-muted, GrayText) 45%,
|
|
15
|
+
transparent
|
|
16
|
+
)
|
|
17
|
+
transparent;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -1,32 +1,7 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-segmented-button {
|
|
3
|
-
|
|
4
|
-
--
|
|
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);
|
|
3
|
+
/* One switch turns on the component-owned segmented recipe. */
|
|
4
|
+
--rc-segmented-button-appearance: segmented;
|
|
30
5
|
--rc-segmented-button-border: var(--rc-border);
|
|
31
6
|
--rc-segmented-button-radius: var(--rc-control-radius);
|
|
32
7
|
--rc-segmented-button-divider: 0;
|
package/components/select.css
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
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
|
+
|
|
2
23
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-select {
|
|
3
24
|
display: inline-block;
|
|
4
25
|
}
|
package/components/splitter.css
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
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
|
+
*/
|
|
2
7
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-splitter {
|
|
3
|
-
|
|
4
|
-
|
|
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);
|
|
5
38
|
}
|
|
6
39
|
}
|
package/components/textarea.css
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-textarea {
|
|
3
|
-
--rc-textarea-padding: 0.75rem;
|
|
3
|
+
--rc-textarea-padding-block: 0.75rem;
|
|
4
|
+
--rc-textarea-padding-inline: 0.75rem;
|
|
4
5
|
--rc-textarea-border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
|
-
--rc-textarea-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
|
+
--rc-textarea-border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
7
|
--rc-textarea-background: var(--rc-field, Field);
|
|
7
8
|
--rc-textarea-color: var(--rc-field-text, FieldText);
|
|
8
9
|
font-family: var(--rc-font-family, inherit);
|
package/components/toolbar.css
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar {
|
|
3
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;
|
|
4
11
|
}
|
|
5
12
|
|
|
6
13
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar::part(root) {
|
|
7
|
-
gap: 0.125rem;
|
|
14
|
+
gap: var(--rc-toolbar-gap-inline, 0.125rem);
|
|
8
15
|
}
|
|
9
16
|
|
|
10
17
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-toolbar > button {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer rc-theme-substrate.components {
|
|
2
|
+
/*
|
|
3
|
+
* Tooltips use the inverse surface, like snackbars. Declared on the theme
|
|
4
|
+
* root so tooltips inside other shadow roots inherit the same values.
|
|
5
|
+
*/
|
|
6
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) {
|
|
7
|
+
--rc-tooltip-padding-block: 0.375rem;
|
|
8
|
+
--rc-tooltip-padding-inline: 0.625rem;
|
|
9
|
+
--rc-tooltip-border: 0;
|
|
10
|
+
--rc-tooltip-radius: var(--substrate-radius-sm, 0.25rem);
|
|
11
|
+
--rc-tooltip-background: var(--substrate-inverse-surface, CanvasText);
|
|
12
|
+
--rc-tooltip-color: var(--substrate-inverse-on-surface, Canvas);
|
|
13
|
+
--rc-tooltip-shadow: var(--substrate-shadow-sm, none);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
@layer rc-theme-substrate.components {
|
|
2
2
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list {
|
|
3
3
|
--rc-transfer-list-gap: 1rem;
|
|
4
|
-
--rc-transfer-list-
|
|
5
|
-
--rc-transfer-list-
|
|
6
|
-
--rc-transfer-list-
|
|
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
7
|
}
|
|
8
8
|
|
|
9
9
|
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) rc-transfer-list::part(panel),
|
|
@@ -4,5 +4,15 @@
|
|
|
4
4
|
border: var(--rc-border, 1px solid ButtonBorder);
|
|
5
5
|
border-radius: var(--substrate-radius-lg, 0.75rem);
|
|
6
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);
|
|
7
17
|
}
|
|
8
18
|
}
|
package/components.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
@layer rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.components
|
|
1
|
+
@layer rc-base, rc-theme-substrate.defaults, rc-theme-substrate.bridge, rc-theme-substrate.native, rc-theme-substrate.components, rc-theme-substrate.css-components,
|
|
2
|
+
rc-theme-substrate.overrides;
|
|
2
3
|
|
|
3
4
|
@import './components/icons.css';
|
|
4
5
|
@import './components/listbox.css';
|
|
5
6
|
@import './components/select.css';
|
|
6
7
|
@import './components/combobox.css';
|
|
7
8
|
@import './components/search-bar.css';
|
|
9
|
+
@import './components/field.css';
|
|
8
10
|
@import './components/bottom-sheet.css';
|
|
9
11
|
@import './components/textarea.css';
|
|
10
12
|
@import './components/markdown-editor.css';
|
|
@@ -33,4 +35,11 @@
|
|
|
33
35
|
@import './components/disclosure.css';
|
|
34
36
|
@import './components/accordion.css';
|
|
35
37
|
@import './components/virtual-canvas.css';
|
|
38
|
+
@import './components/adaptive-menu.css';
|
|
39
|
+
@import './components/carousel.css';
|
|
40
|
+
@import './components/chip-group.css';
|
|
41
|
+
@import './components/scroller.css';
|
|
42
|
+
@import './components/virtual-scroller.css';
|
|
43
|
+
@import './components/tooltip.css';
|
|
44
|
+
@import './components/popover.css';
|
|
36
45
|
@import './components/modes.css';
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
4
|
+
:where(rc-button > a)
|
|
5
|
+
) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: var(--rc-button-gap, 0.5rem);
|
|
10
|
+
min-block-size: var(--rc-button-block-size, 2.5rem);
|
|
11
|
+
padding-block: var(--rc-button-padding-block, 0.5rem);
|
|
12
|
+
padding-inline: var(--rc-button-padding-inline, 1.5rem);
|
|
13
|
+
border: var(--rc-button-border, var(--rc-border, 1px solid ButtonBorder));
|
|
14
|
+
border-radius: var(--rc-button-radius, var(--rc-control-radius, 999px));
|
|
15
|
+
background: var(--rc-button-bg, ButtonFace);
|
|
16
|
+
color: var(--rc-button-color, var(--rc-button-text, ButtonText));
|
|
17
|
+
font: var(--rc-button-font, inherit);
|
|
18
|
+
text-decoration: var(--rc-button-text-decoration, none);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
user-select: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
24
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
25
|
+
:where(rc-button > a)
|
|
26
|
+
):hover:not(:where(:disabled)) {
|
|
27
|
+
background: color-mix(in srgb, currentColor 8%, var(--rc-button-bg, ButtonFace));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
31
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
32
|
+
:where(rc-button > a)
|
|
33
|
+
):active:not(:where(:disabled)),
|
|
34
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
35
|
+
:where(button.rc-button, a[href].rc-button)[aria-pressed='true']:not(
|
|
36
|
+
:where(rc-button > button)
|
|
37
|
+
):not(:where(rc-button > a)) {
|
|
38
|
+
background: var(--rc-highlight, Highlight);
|
|
39
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
43
|
+
:where(button.rc-button, a[href].rc-button):not(:where(rc-button > button)):not(
|
|
44
|
+
:where(rc-button > a)
|
|
45
|
+
):focus-visible {
|
|
46
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
47
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
51
|
+
:where(button.rc-button, a[href].rc-button):is(:disabled, [aria-disabled='true']) {
|
|
52
|
+
color: var(--rc-text-disabled, GrayText);
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (forced-colors: active) {
|
|
57
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
58
|
+
:where(button.rc-button, a[href].rc-button)[aria-pressed='true'] {
|
|
59
|
+
border-color: Highlight;
|
|
60
|
+
outline: 1px solid Highlight;
|
|
61
|
+
outline-offset: -1px;
|
|
62
|
+
background: Highlight;
|
|
63
|
+
color: HighlightText;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-card {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--rc-card-actions-gap, 0.5rem);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
padding-block: var(--rc-card-padding-block, 1rem);
|
|
7
|
+
padding-inline: var(--rc-card-padding-inline, 1rem);
|
|
8
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
9
|
+
border-radius: var(--rc-card-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-card-bg, var(--rc-surface, Canvas));
|
|
11
|
+
color: var(--rc-card-color, CanvasText);
|
|
12
|
+
box-shadow: var(--rc-shadow, none);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate)) .rc-chip-group {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: var(--rc-chip-group-row-gap, var(--rc-control-gap, 0.5rem))
|
|
7
|
+
var(--rc-chip-group-column-gap, var(--rc-control-gap, 0.5rem));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
4
|
+
:where(rc-chip > a)
|
|
5
|
+
):not(:where(rc-chip > label)) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
gap: var(--rc-chip-gap, 0.25rem);
|
|
10
|
+
min-block-size: var(--rc-chip-block-size, 2rem);
|
|
11
|
+
padding-block: var(--rc-chip-padding-block, 0.25rem);
|
|
12
|
+
padding-inline: var(--rc-chip-padding-inline, 1rem);
|
|
13
|
+
border: var(--rc-chip-border, var(--rc-border, 1px solid ButtonBorder));
|
|
14
|
+
border-radius: var(--rc-chip-radius, 0.5rem);
|
|
15
|
+
background: var(--rc-chip-bg, ButtonFace);
|
|
16
|
+
color: var(--rc-chip-color, ButtonText);
|
|
17
|
+
font: var(--rc-chip-font, inherit);
|
|
18
|
+
text-decoration: var(--rc-chip-text-decoration, none);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
23
|
+
label.rc-chip
|
|
24
|
+
> :where(input[type='checkbox'], input[type='radio']) {
|
|
25
|
+
position: absolute;
|
|
26
|
+
inline-size: 1px;
|
|
27
|
+
block-size: 1px;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
clip-path: inset(50%);
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
34
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
35
|
+
:where(rc-chip > a)
|
|
36
|
+
):not(:where(rc-chip > label)):hover:not(:where(:disabled)):not(:has(input:disabled)) {
|
|
37
|
+
background: color-mix(in srgb, currentColor 8%, var(--rc-chip-bg, ButtonFace));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
41
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
42
|
+
:where(rc-chip > a)
|
|
43
|
+
):not(:where(rc-chip > label)):has(input:checked) {
|
|
44
|
+
background: var(--rc-chip-selected-bg, Highlight);
|
|
45
|
+
color: var(--rc-highlight-text, HighlightText);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
49
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
50
|
+
:where(rc-chip > a)
|
|
51
|
+
):not(:where(rc-chip > label)):is(:focus-visible, :has(input:focus-visible)) {
|
|
52
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
53
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
57
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):not(:where(rc-chip > button)):not(
|
|
58
|
+
:where(rc-chip > a)
|
|
59
|
+
):not(:where(rc-chip > label)):has(input:disabled) {
|
|
60
|
+
color: var(--rc-text-disabled, GrayText);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
65
|
+
:where(button.rc-chip, a[href].rc-chip):is(:disabled, [aria-disabled='true']) {
|
|
66
|
+
color: var(--rc-text-disabled, GrayText);
|
|
67
|
+
cursor: not-allowed;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media (forced-colors: active) {
|
|
71
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
72
|
+
:where(button.rc-chip, a[href].rc-chip, label.rc-chip):has(input:checked) {
|
|
73
|
+
border-color: Highlight;
|
|
74
|
+
outline: 1px solid Highlight;
|
|
75
|
+
outline-offset: -1px;
|
|
76
|
+
background: Highlight;
|
|
77
|
+
color: HighlightText;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@layer rc-theme-substrate.css-components {
|
|
2
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
3
|
+
details.rc-disclosure:not(:where(rc-disclosure > details)) {
|
|
4
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
5
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
6
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
7
|
+
border-radius: var(--rc-card-radius, var(--rc-control-radius, 0.5rem));
|
|
8
|
+
background: var(--rc-surface, Canvas);
|
|
9
|
+
color: var(--rc-field-text, CanvasText);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
13
|
+
details.rc-disclosure:not(:where(rc-disclosure > details))
|
|
14
|
+
> summary {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-substrate, :host(.rc-theme-substrate))
|
|
20
|
+
details.rc-disclosure:not(:where(rc-disclosure > details))
|
|
21
|
+
> summary:focus-visible {
|
|
22
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
23
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
24
|
+
}
|
|
25
|
+
}
|