@rcarls/rc-theme-material 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.
Files changed (52) hide show
  1. package/CHANGELOG.md +544 -0
  2. package/DESIGN.md +1399 -0
  3. package/README.md +88 -5
  4. package/bridge.css +132 -55
  5. package/components/accordion.css +43 -157
  6. package/components/adaptive-menu.css +47 -86
  7. package/components/app-bar.css +4 -2
  8. package/components/bottom-sheet.css +2 -2
  9. package/components/button.css +2 -1
  10. package/components/card.css +2 -0
  11. package/components/chip.css +12 -1
  12. package/components/combobox.css +61 -14
  13. package/components/dialog.css +27 -26
  14. package/components/disclosure.css +128 -84
  15. package/components/field.css +566 -0
  16. package/components/icons.css +9 -0
  17. package/components/list-item.css +65 -3
  18. package/components/listbox.css +5 -4
  19. package/components/markdown-editor.css +62 -35
  20. package/components/menu-button.css +4 -1
  21. package/components/menu.css +18 -31
  22. package/components/menubar.css +4 -1
  23. package/components/modes.css +22 -5
  24. package/components/navigation-bar.css +3 -5
  25. package/components/navigation-rail.css +5 -7
  26. package/components/popover.css +50 -0
  27. package/components/progress.css +5 -0
  28. package/components/range-slider.css +3 -2
  29. package/components/search-bar.css +12 -2
  30. package/components/segmented-button.css +2 -28
  31. package/components/select.css +99 -14
  32. package/components/splitter.css +4 -1
  33. package/components/switch.css +9 -1
  34. package/components/textarea.css +7 -3
  35. package/components/toolbar.css +2 -1
  36. package/components/tooltip.css +12 -0
  37. package/components/transfer-list.css +5 -1
  38. package/components/virtual-scroller.css +7 -0
  39. package/components.css +6 -1
  40. package/css-components/button.css +66 -0
  41. package/css-components/card.css +14 -0
  42. package/css-components/chip-group.css +9 -0
  43. package/css-components/chip.css +80 -0
  44. package/css-components/disclosure.css +25 -0
  45. package/css-components/list.css +34 -0
  46. package/css-components/select.css +20 -0
  47. package/css-components/textarea.css +22 -0
  48. package/css-components.css +31 -0
  49. package/defaults.css +189 -3
  50. package/native.css +258 -0
  51. package/package.json +20 -6
  52. package/state-layer.css +5 -1
@@ -8,15 +8,16 @@
8
8
  0 2px 6px 2px rgba(0, 0, 0, 0.15);
9
9
  padding-block: 0.5rem;
10
10
  overflow-y: auto;
11
+ overflow-block: auto;
11
12
  color: var(--md-sys-color-on-surface, CanvasText);
12
- font-family: var(--md-sys-typescale-body-large-font, inherit);
13
- font-size: var(--md-sys-typescale-body-large-size, 1rem);
14
- line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
15
13
  --rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
16
14
  --rc-listbox-option-min-block-size: 3rem;
17
15
  --rc-listbox-option-padding-block: 0;
18
16
  --rc-listbox-option-padding-inline: 0.75rem;
19
- --rc-listbox-option-transition: background-color 150ms ease, color 150ms ease;
17
+ --rc-listbox-option-transition:
18
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
19
+ var(--rc-motion-effects-easing-fast, ease),
20
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
20
21
  --rc-listbox-hover-bg: color-mix(
21
22
  in srgb,
22
23
  var(--md-sys-color-on-surface, CanvasText) 8%,
@@ -1,42 +1,69 @@
1
1
  @layer rc-theme-material.components {
2
2
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-markdown-editor {
3
- --rme-background: var(--md-sys-color-surface, Canvas);
4
- --rme-color: var(--md-sys-color-on-surface, CanvasText);
5
- --rme-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
6
- --rme-border-radius: 0 0 var(--md-sys-shape-corner-small, 0.5rem)
3
+ --rc-markdown-editor-background: var(--md-sys-color-surface, Canvas);
4
+ --rc-markdown-editor-color: var(--md-sys-color-on-surface, CanvasText);
5
+ --rc-markdown-editor-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
6
+ --rc-markdown-editor-border-radius: 0 0 var(--md-sys-shape-corner-small, 0.5rem)
7
7
  var(--md-sys-shape-corner-small, 0.5rem);
8
- --rme-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
9
- --rme-padding: 1rem;
10
- --rme-toolbar-gap: 0.25rem;
11
- --rme-toolbar-button-size: 2.5rem;
12
- --rme-toolbar-padding: 0.25rem;
13
- --rme-toolbar-radius: var(--md-sys-shape-corner-small, 0.5rem)
8
+ --rc-markdown-editor-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
9
+ --rc-markdown-editor-padding: 1rem;
10
+ --rc-markdown-editor-toolbar-gap: 0.25rem;
11
+ --rc-markdown-editor-toolbar-button-size: 2.5rem;
12
+ --rc-markdown-editor-toolbar-padding: 0.25rem;
13
+ --rc-markdown-editor-toolbar-radius: var(--md-sys-shape-corner-small, 0.5rem)
14
14
  var(--md-sys-shape-corner-small, 0.5rem) 0 0;
15
- --rme-toolbar-background: var(--md-sys-color-surface-container, Canvas);
16
- --rme-toolbar-color: var(--md-sys-color-on-surface, CanvasText);
17
- --rme-toolbar-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
18
- --rme-toolbar-button-color: var(--md-sys-color-on-surface-variant, ButtonText);
19
- --rme-toolbar-button-border: 0;
20
- --rme-toolbar-button-radius: var(--md-sys-shape-corner-full, 999px);
21
- --rme-toolbar-button-active-background: var(--md-sys-color-secondary-container, Highlight);
22
- --rme-toolbar-button-active-color: var(--md-sys-color-on-secondary-container, HighlightText);
23
- --rme-toolbar-button-active-border: 0;
24
- --rme-toolbar-button-hover-opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
25
- --rme-toolbar-button-focus-opacity: var(--md-sys-state-focus-state-layer-opacity, 0.12);
26
- --rme-toolbar-button-pressed-opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.12);
27
- --rme-toolbar-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
28
- --rme-toolbar-focus-outline-offset: 1px;
29
- --rme-toolbar-select-background: var(--md-sys-color-surface-container-highest, Field);
30
- --rme-toolbar-select-color: var(--md-sys-color-on-surface, FieldText);
31
- --rme-toolbar-select-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
32
- --rme-toolbar-select-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
33
- --rme-toolbar-select-active-background: var(--md-sys-color-secondary-container, Highlight);
34
- --rme-toolbar-select-active-color: var(--md-sys-color-on-secondary-container, HighlightText);
35
- --rme-toolbar-select-active-border-color: var(--md-sys-color-primary, Highlight);
36
- --rme-toolbar-input-background: var(--md-sys-color-surface-container-highest, Field);
37
- --rme-toolbar-input-color: var(--md-sys-color-on-surface, FieldText);
38
- --rme-toolbar-input-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
39
- --rme-toolbar-input-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
15
+ --rc-markdown-editor-toolbar-background: var(--md-sys-color-surface-container, Canvas);
16
+ --rc-markdown-editor-toolbar-color: var(--md-sys-color-on-surface, CanvasText);
17
+ --rc-markdown-editor-toolbar-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
18
+ --rc-markdown-editor-toolbar-button-color: var(--md-sys-color-on-surface-variant, ButtonText);
19
+ --rc-markdown-editor-toolbar-button-border: 0;
20
+ --rc-markdown-editor-toolbar-button-radius: var(--md-sys-shape-corner-full, 999px);
21
+ --rc-markdown-editor-toolbar-button-active-background: var(
22
+ --md-sys-color-secondary-container,
23
+ Highlight
24
+ );
25
+ --rc-markdown-editor-toolbar-button-active-color: var(
26
+ --md-sys-color-on-secondary-container,
27
+ HighlightText
28
+ );
29
+ --rc-markdown-editor-toolbar-button-active-border: 0;
30
+ --rc-markdown-editor-toolbar-button-hover-opacity: var(
31
+ --md-sys-state-hover-state-layer-opacity,
32
+ 0.08
33
+ );
34
+ --rc-markdown-editor-toolbar-button-focus-opacity: var(
35
+ --md-sys-state-focus-state-layer-opacity,
36
+ 0.12
37
+ );
38
+ --rc-markdown-editor-toolbar-button-pressed-opacity: var(
39
+ --md-sys-state-pressed-state-layer-opacity,
40
+ 0.12
41
+ );
42
+ --rc-markdown-editor-toolbar-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
43
+ --rc-markdown-editor-toolbar-focus-outline-offset: 1px;
44
+ --rc-markdown-editor-toolbar-select-background: var(
45
+ --md-sys-color-surface-container-highest,
46
+ Field
47
+ );
48
+ --rc-markdown-editor-toolbar-select-color: var(--md-sys-color-on-surface, FieldText);
49
+ --rc-markdown-editor-toolbar-select-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
50
+ --rc-markdown-editor-toolbar-select-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
51
+ --rc-markdown-editor-toolbar-select-active-background: var(
52
+ --md-sys-color-secondary-container,
53
+ Highlight
54
+ );
55
+ --rc-markdown-editor-toolbar-select-active-color: var(
56
+ --md-sys-color-on-secondary-container,
57
+ HighlightText
58
+ );
59
+ --rc-markdown-editor-toolbar-select-active-border-color: var(--md-sys-color-primary, Highlight);
60
+ --rc-markdown-editor-toolbar-input-background: var(
61
+ --md-sys-color-surface-container-highest,
62
+ Field
63
+ );
64
+ --rc-markdown-editor-toolbar-input-color: var(--md-sys-color-on-surface, FieldText);
65
+ --rc-markdown-editor-toolbar-input-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
66
+ --rc-markdown-editor-toolbar-input-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
40
67
  }
41
68
 
42
69
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-markdown-editor::part(rich-view) {
@@ -7,7 +7,10 @@
7
7
  --rc-menu-button-trigger-border: 0;
8
8
  --rc-menu-button-trigger-background: transparent;
9
9
  --rc-menu-button-trigger-color: var(--md-sys-color-primary, ButtonText);
10
- --rc-menu-button-trigger-transition: background-color 150ms ease, color 150ms ease;
10
+ --rc-menu-button-trigger-transition:
11
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
12
+ var(--rc-motion-effects-easing-fast, ease),
13
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
11
14
  --rc-menu-button-trigger-hover-background: color-mix(
12
15
  in srgb,
13
16
  var(--md-sys-color-primary, Highlight) 8%,
@@ -1,24 +1,19 @@
1
1
  @layer rc-theme-material.components {
2
- /* Container + token overrides ------------------------------------------- */
3
- :where(.rc-theme-material, :host(.rc-theme-material)) rc-menu {
4
- background: var(--md-menu-container-color, var(--md-sys-color-surface-container, Canvas));
5
- border: none;
6
- border-radius: var(--md-menu-container-shape, 4px);
7
- box-shadow:
8
- 0 1px 2px rgba(0, 0, 0, 0.3),
9
- 0 2px 6px 2px rgba(0, 0, 0, 0.15);
10
- padding-block: 0.5rem;
11
- color: var(--md-sys-color-on-surface, CanvasText);
12
- font-family: var(--md-sys-typescale-body-large-font, inherit);
13
- font-size: var(--md-sys-typescale-body-large-size, 1rem);
14
- line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
15
-
2
+ /*
3
+ * Token overrides. The container comes from the bridge's --rc-popup-* and
4
+ * --rc-item-* tokens. Declared on the theme root rather than on rc-menu so
5
+ * menus rendered inside other shadow roots inherit the same values.
6
+ */
7
+ :where(.rc-theme-material, :host(.rc-theme-material)) {
16
8
  /* Item geometry — M3 menu item: 48dp height, 12dp h-padding, 12dp gap */
17
9
  --rc-menu-item-min-block-size: 3rem;
18
10
  --rc-menu-item-padding-block: 0;
19
11
  --rc-menu-item-padding-inline: 0.75rem;
20
12
  --rc-menu-item-gap: 0.75rem;
21
- --rc-menu-item-transition: background-color 150ms ease, color 150ms ease;
13
+ --rc-menu-item-transition:
14
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
15
+ var(--rc-motion-effects-easing-fast, ease),
16
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
22
17
 
23
18
  /* State layers derived from on-surface (M3: 8% hover, 12% keyboard cursor) */
24
19
  --rc-menu-hover-bg: color-mix(
@@ -71,28 +66,20 @@
71
66
  border-radius: 0;
72
67
  }
73
68
 
74
- /*
75
- * Sizes an item's own leading icon to the M3 menu leading-icon size.
76
- * Unlike an icon-only rc-button, a menu item routinely combines an icon
77
- * *and* a label (they aren't mutually exclusive), so "first child" isn't
78
- * a safe stand-in for "the icon" here the way it is there — this only
79
- * sizes content the consumer has actually marked as an icon.
80
- */
81
- :where(.rc-theme-material, :host(.rc-theme-material))
82
- rc-menu
83
- :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])
84
- :is([data-rc-icon], [data-rc-menu-leading], [data-rc-menu-icon]) {
85
- flex: none;
86
- font-size: 1.5rem;
87
- line-height: 1.5rem;
88
- }
89
-
90
69
  /* Current item (navigation active / selected radio row) gets secondary-container */
91
70
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-menu [aria-current='true'] {
92
71
  background: var(--md-sys-color-secondary-container, Highlight);
93
72
  color: var(--md-sys-color-on-secondary-container, HighlightText);
94
73
  }
95
74
 
75
+ /* M3 single-choice menus use the same trailing check affordance as other
76
+ * selected menu rows; role=menuitemradio continues to carry semantics. */
77
+ :where(.rc-theme-material, :host(.rc-theme-material))
78
+ rc-menu
79
+ [role='menuitemradio'][aria-checked='true']::after {
80
+ content: '✓';
81
+ }
82
+
96
83
  /* Section / group labels (optional, for menu segmentation) -------------- */
97
84
  /* Add [data-group-label] as first child of role="group" for a visible heading. */
98
85
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-menu [data-group-label] {
@@ -11,7 +11,10 @@
11
11
  --rc-menubar-item-radius: var(--md-sys-shape-corner-full, 999px);
12
12
  --rc-menubar-item-background: transparent;
13
13
  --rc-menubar-item-color: var(--md-sys-color-primary, CanvasText);
14
- --rc-menubar-item-transition: background-color 150ms ease, color 150ms ease;
14
+ --rc-menubar-item-transition:
15
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
16
+ var(--rc-motion-effects-easing-fast, ease),
17
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
15
18
  --rc-menubar-item-hover-background: color-mix(
16
19
  in srgb,
17
20
  var(--md-sys-color-primary, Highlight) 8%,
@@ -1,10 +1,27 @@
1
1
  @layer rc-theme-material.components {
2
+ /*
3
+ * The vestibular harm reduced motion guards against is movement across the
4
+ * visual field: a cross-fade or a color change doesn't trigger it, so
5
+ * removing every transition (the previous *, !important sweep) over-
6
+ * corrected, and it also silently removed the ones that aid comprehension.
7
+ * Spatial motion still goes to zero; effects motion is kept but shortened,
8
+ * which the spatial/effects split makes expressible for the first time.
9
+ * Values are read as custom properties rather than reasserted with
10
+ * !important, so this only reaches whatever already consumes the shared
11
+ * motion tokens or the Material duration primitives. Components that
12
+ * still handle prefers-reduced-motion with their own blunt sweep are
13
+ * refined in their own component styles; this file no longer
14
+ * compensates for that with a second, theme-wide !important override.
15
+ */
2
16
  @media (prefers-reduced-motion: reduce) {
3
- :where(.rc-theme-material, :host(.rc-theme-material)) *,
4
- :where(.rc-theme-material, :host(.rc-theme-material)) *::before,
5
- :where(.rc-theme-material, :host(.rc-theme-material)) *::after {
6
- transition-duration: 0s !important;
7
- animation-duration: 0s !important;
17
+ :where(.rc-theme-material, :host(.rc-theme-material)) {
18
+ --rc-motion-spatial-duration-fast: 0ms;
19
+ --rc-motion-spatial-duration-default: 0ms;
20
+ --rc-motion-spatial-duration-slow: 0ms;
21
+ --rc-motion-effects-duration-fast: 50ms;
22
+ --rc-motion-effects-duration-default: 70ms;
23
+ --rc-motion-effects-duration-slow: 100ms;
24
+ --rc-motion-duration: var(--rc-motion-effects-duration-default);
8
25
  }
9
26
  }
10
27
 
@@ -15,11 +15,9 @@
15
15
  --rc-navigation-bar-indicator-bg: var(--md-sys-color-secondary-container, Highlight);
16
16
  --rc-navigation-bar-indicator-border: 0;
17
17
  --rc-navigation-bar-indicator-radius: var(--md-sys-shape-corner-full, 9999px);
18
- --rc-navigation-bar-indicator-duration: var(--md-sys-motion-duration-short3, 150ms);
19
- --rc-navigation-bar-indicator-easing: var(
20
- --md-sys-motion-easing-standard,
21
- cubic-bezier(0.2, 0, 0, 1)
22
- );
18
+ /* The indicator resizes to the selected item's box, which is spatial motion. */
19
+ --rc-navigation-bar-indicator-duration: var(--rc-motion-spatial-duration-fast, 300ms);
20
+ --rc-navigation-bar-indicator-easing: var(--rc-motion-spatial-easing-fast, ease);
23
21
  --rc-icon-font-line-height: 2rem;
24
22
  --rc-navigation-bar-focus-ring: 2px solid var(--md-sys-color-primary, Highlight);
25
23
  --rc-navigation-bar-focus-ring-offset: 2px;
@@ -22,13 +22,11 @@
22
22
  --rc-navigation-rail-indicator-radius: var(--md-sys-shape-corner-full, 9999px);
23
23
  --rc-navigation-rail-toggle-size: 3rem;
24
24
  --rc-navigation-rail-toggle-inline-offset: 1rem;
25
- --rc-navigation-rail-duration: var(--md-sys-motion-duration-medium2, 300ms);
26
- --rc-navigation-rail-easing: var(--md-sys-motion-easing-emphasized, cubic-bezier(0.2, 0, 0, 1));
27
- --rc-navigation-rail-indicator-duration: var(--md-sys-motion-duration-short3, 150ms);
28
- --rc-navigation-rail-indicator-easing: var(
29
- --md-sys-motion-easing-standard,
30
- cubic-bezier(0.2, 0, 0, 1)
31
- );
25
+ --rc-navigation-rail-duration: var(--rc-motion-spatial-duration-fast, 300ms);
26
+ --rc-navigation-rail-easing: var(--rc-motion-spatial-easing-fast, ease);
27
+ /* The indicator resizes to the selected item's box, which is spatial motion. */
28
+ --rc-navigation-rail-indicator-duration: var(--rc-motion-spatial-duration-fast, 300ms);
29
+ --rc-navigation-rail-indicator-easing: var(--rc-motion-spatial-easing-fast, ease);
32
30
  --rc-icon-font-line-height: 2rem;
33
31
  --rc-navigation-rail-focus-ring: 2px solid var(--md-sys-color-primary, Highlight);
34
32
  --rc-navigation-rail-focus-ring-offset: 2px;
@@ -0,0 +1,50 @@
1
+ @layer rc-theme-material.components {
2
+ /*
3
+ * The surface color, text color, and border come from the bridge's
4
+ * --rc-popup-* tokens. Only the popover's own corner and elevation differ
5
+ * from a menu container. Declared on the theme root so popovers rendered
6
+ * inside other shadow roots inherit the same values.
7
+ */
8
+ :where(.rc-theme-material, :host(.rc-theme-material)) {
9
+ --rc-popover-radius: var(--md-sys-shape-corner-medium, 0.75rem);
10
+ --rc-popover-shadow: var(--rc-shadow-level2, none);
11
+ }
12
+
13
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-popover[data-rc-material-rich-tooltip] {
14
+ --rc-popover-max-inline-size: min(20rem, 100dvi - 1rem);
15
+ --rc-popover-padding-block: 0.75rem;
16
+ --rc-popover-padding-inline: 1rem;
17
+ --rc-popover-color: var(--md-sys-color-on-surface-variant, CanvasText);
18
+ }
19
+
20
+ :where(.rc-theme-material, :host(.rc-theme-material))
21
+ rc-popover[data-rc-material-rich-tooltip]
22
+ > [slot='content']
23
+ > h2 {
24
+ margin: 0 0 0.25rem;
25
+ color: var(--md-sys-color-on-surface, CanvasText);
26
+ font-family: var(--md-sys-typescale-title-small-font, inherit);
27
+ font-size: var(--md-sys-typescale-title-small-size, 0.875rem);
28
+ font-weight: var(--md-sys-typescale-title-small-weight, 500);
29
+ line-height: var(--md-sys-typescale-title-small-line-height, 1.25rem);
30
+ }
31
+
32
+ :where(.rc-theme-material, :host(.rc-theme-material))
33
+ rc-popover[data-rc-material-rich-tooltip]
34
+ > [slot='content']
35
+ > p {
36
+ margin: 0;
37
+ font-family: var(--md-sys-typescale-body-medium-font, inherit);
38
+ font-size: var(--md-sys-typescale-body-medium-size, 0.875rem);
39
+ line-height: var(--md-sys-typescale-body-medium-line-height, 1.25rem);
40
+ }
41
+
42
+ :where(.rc-theme-material, :host(.rc-theme-material))
43
+ rc-popover[data-rc-material-rich-tooltip]
44
+ > [slot='content']
45
+ > footer {
46
+ display: flex;
47
+ justify-content: flex-end;
48
+ margin-block-start: 0.75rem;
49
+ }
50
+ }
@@ -7,4 +7,9 @@
7
7
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-progress[disabled] {
8
8
  opacity: var(--md-sys-state-disabled-state-layer-opacity, 0.38);
9
9
  }
10
+
11
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-progress {
12
+ --rc-progress-fill-transition-duration: var(--rc-motion-effects-duration-fast, 150ms);
13
+ --rc-progress-fill-transition-easing: var(--rc-motion-effects-easing-fast, ease-out);
14
+ }
10
15
  }
@@ -4,8 +4,9 @@
4
4
  border-radius: var(--md-sys-shape-corner-full, 999px);
5
5
  box-shadow: 0 0 0 0 transparent;
6
6
  transition:
7
- box-shadow 150ms ease,
8
- scale 150ms ease;
7
+ box-shadow var(--rc-motion-effects-duration-fast, 150ms)
8
+ var(--rc-motion-effects-easing-fast, ease),
9
+ scale var(--rc-motion-spatial-duration-fast, 300ms) var(--rc-motion-spatial-easing-fast, ease);
9
10
  }
10
11
 
11
12
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-range-slider::part(thumb):hover {
@@ -1,9 +1,19 @@
1
1
  @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar {
3
+ /*
4
+ * The bar is already the full-height field, so the shared outset ring
5
+ * floats off its edge and crowds the app bar. Draw it on the edge instead.
6
+ */
7
+ --rc-focus-ring-offset: -2px;
8
+ }
9
+
2
10
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar::part(root) {
3
11
  box-sizing: border-box;
4
12
  transition:
5
- box-shadow 200ms ease,
6
- background-color 200ms ease;
13
+ box-shadow var(--rc-motion-effects-duration-default, 200ms)
14
+ var(--rc-motion-effects-easing-default, ease),
15
+ background-color var(--rc-motion-effects-duration-default, 200ms)
16
+ var(--rc-motion-effects-easing-default, ease);
7
17
  }
8
18
 
9
19
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-search-bar:hover::part(root) {
@@ -1,33 +1,7 @@
1
1
  @layer rc-theme-material.components {
2
2
  :where(.rc-theme-material, :host(.rc-theme-material)) 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: 1px solid
30
- var(--md-sys-color-outline, ButtonBorder);
3
+ /* One switch turns on the component-owned segmented recipe. */
4
+ --rc-segmented-button-appearance: segmented;
31
5
  --rc-segmented-button-border: 1px solid var(--md-sys-color-outline, ButtonBorder);
32
6
  --rc-segmented-button-radius: var(--md-sys-shape-corner-full, 9999px);
33
7
  --rc-segmented-button-divider: 0;
@@ -1,10 +1,37 @@
1
1
  @layer rc-theme-material.components {
2
+ :where(.rc-theme-material, :host(.rc-theme-material))
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: 0;
19
+ border-radius: 0;
20
+ background: var(--md-sys-color-surface-container-high, Canvas);
21
+ color: var(--md-sys-color-on-surface, CanvasText);
22
+ box-shadow: none;
23
+ transform: none;
24
+ }
25
+
2
26
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(trigger) {
3
27
  box-sizing: border-box;
4
28
  transition:
5
- border-color 150ms ease,
6
- box-shadow 150ms ease,
7
- background-color 150ms ease;
29
+ border-color var(--rc-motion-effects-duration-fast, 150ms)
30
+ var(--rc-motion-effects-easing-fast, ease),
31
+ box-shadow var(--rc-motion-effects-duration-fast, 150ms)
32
+ var(--rc-motion-effects-easing-fast, ease),
33
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
34
+ var(--rc-motion-effects-easing-fast, ease);
8
35
  }
9
36
 
10
37
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(trigger):hover {
@@ -38,6 +65,19 @@
38
65
  --rc-chip-remove-target-size: 1.5rem;
39
66
  }
40
67
 
68
+ /*
69
+ * Dense chips fit one chip row on the field's single input line, so a
70
+ * populated field keeps the unified 56px height. The touch target is
71
+ * unchanged.
72
+ */
73
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-select.rc-select--dense::part(chips) {
74
+ --rc-chip-block-size: 1.5rem;
75
+ }
76
+
77
+ :where(.rc-theme-material, :host(.rc-theme-material)) rc-select.rc-select--dense::part(chip) {
78
+ min-block-size: 1.5rem;
79
+ }
80
+
41
81
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(chip):hover {
42
82
  background: color-mix(
43
83
  in srgb,
@@ -53,20 +93,15 @@
53
93
  * custom properties are the stable styling contract for option rows.
54
94
  */
55
95
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-select::part(listbox) {
56
- background: var(--md-menu-container-color, var(--md-sys-color-surface-container, Canvas));
57
- color: var(--md-sys-color-on-surface, CanvasText);
58
- font-family: var(--md-sys-typescale-body-large-font, inherit);
59
- font-size: var(--md-sys-typescale-body-large-size, 1rem);
60
- line-height: var(--md-sys-typescale-body-large-line-height, 1.5rem);
61
- padding-block: 0.5rem;
62
- border-radius: var(--md-menu-container-shape, var(--md-sys-shape-corner-extra-small, 0.25rem));
63
-
64
96
  /* Option sizing — inherited by li[role='option'] via rc-listbox's rc-base layer */
65
97
  --rc-listbox-option-gap: var(--rc-list-item-gap, 0.75rem);
66
98
  --rc-listbox-option-min-block-size: 3rem;
67
99
  --rc-listbox-option-padding-block: 0;
68
100
  --rc-listbox-option-padding-inline: 0.75rem;
69
- --rc-listbox-option-transition: background-color 150ms ease, color 150ms ease;
101
+ --rc-listbox-option-transition:
102
+ background-color var(--rc-motion-effects-duration-fast, 150ms)
103
+ var(--rc-motion-effects-easing-fast, ease),
104
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease);
70
105
 
71
106
  /* M3 hover/focus state layers use on-surface, not the selected container role. */
72
107
  --rc-highlight: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
@@ -98,8 +133,9 @@
98
133
  var(--md-sys-color-on-surface-variant, CanvasText)
99
134
  );
100
135
  transition:
101
- color 150ms ease,
102
- transform 150ms ease;
136
+ color var(--rc-motion-effects-duration-fast, 150ms) var(--rc-motion-effects-easing-fast, ease),
137
+ transform var(--rc-motion-spatial-duration-fast, 300ms)
138
+ var(--rc-motion-spatial-easing-fast, ease);
103
139
  }
104
140
 
105
141
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-select[open]::part(toggle-indicator) {
@@ -114,4 +150,53 @@
114
150
  opacity: var(--md-sys-state-disabled-container-opacity, 0.38);
115
151
  pointer-events: none;
116
152
  }
153
+
154
+ :where(.rc-theme-material, :host(.rc-theme-material))
155
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-header) {
156
+ min-block-size: 3.5rem;
157
+ }
158
+
159
+ :where(.rc-theme-material, :host(.rc-theme-material))
160
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-title) {
161
+ color: var(--md-sys-color-on-surface, CanvasText);
162
+ font-family: var(--md-sys-typescale-headline-small-font, inherit);
163
+ font-size: var(--md-sys-typescale-headline-small-size, 1.5rem);
164
+ font-style: normal;
165
+ font-weight: var(--md-sys-typescale-headline-small-weight, 400);
166
+ line-height: var(--md-sys-typescale-headline-small-line-height, 2rem);
167
+ }
168
+
169
+ :where(.rc-theme-material, :host(.rc-theme-material))
170
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel),
171
+ :where(.rc-theme-material, :host(.rc-theme-material))
172
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm) {
173
+ border: 0;
174
+ border-radius: var(--md-sys-shape-corner-full, 999px);
175
+ background: transparent;
176
+ color: var(--md-sys-color-primary, Highlight);
177
+ }
178
+
179
+ :where(.rc-theme-material, :host(.rc-theme-material))
180
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel) {
181
+ color: var(--md-sys-color-on-surface, ButtonText);
182
+ }
183
+
184
+ :where(.rc-theme-material, :host(.rc-theme-material))
185
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm) {
186
+ padding-inline: 0.75rem;
187
+ font-family: var(--md-sys-typescale-label-large-font, inherit);
188
+ font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
189
+ font-weight: var(--md-sys-typescale-label-large-weight, 500);
190
+ line-height: var(--md-sys-typescale-label-large-line-height, 1.25rem);
191
+ }
192
+
193
+ :where(.rc-theme-material, :host(.rc-theme-material))
194
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-cancel):hover {
195
+ background: color-mix(in srgb, var(--md-sys-color-on-surface, CanvasText) 8%, transparent);
196
+ }
197
+
198
+ :where(.rc-theme-material, :host(.rc-theme-material))
199
+ :is(rc-select, rc-combobox)[popup-mode='dialog']::part(dialog-confirm):hover {
200
+ background: color-mix(in srgb, var(--md-sys-color-primary, Highlight) 8%, transparent);
201
+ }
117
202
  }
@@ -27,6 +27,9 @@
27
27
  var(--md-sys-color-primary, Highlight) 8%,
28
28
  transparent
29
29
  );
30
- --rc-splitter-handle-transition: 150ms var(--md-sys-motion-easing-standard, ease);
30
+ --rc-splitter-handle-transition: var(--rc-motion-effects-duration-fast, 150ms)
31
+ var(--rc-motion-effects-easing-fast, ease);
32
+ /* The panel visibly resizes to the snap point, which is spatial motion. */
33
+ --rc-splitter-snap-duration: var(--rc-motion-spatial-duration-fast, 300ms);
31
34
  }
32
35
  }
@@ -23,7 +23,15 @@
23
23
  --rc-switch-focus-ring: var(--rc-focus-ring);
24
24
  --rc-switch-focus-ring-offset: var(--rc-focus-ring-offset);
25
25
  --rc-switch-disabled-opacity: var(--rc-disabled-opacity);
26
- --rc-switch-duration: var(--rc-motion-duration);
26
+ /*
27
+ * The switch's single duration/easing pair drives both its
28
+ * background-color/border-color fades and its thumb/track resize and
29
+ * slide; the dominant motion is spatial (the thumb visibly moves and
30
+ * grows), so it takes the spatial scale rather than the compatibility
31
+ * token.
32
+ */
33
+ --rc-switch-duration: var(--rc-motion-spatial-duration-fast, 300ms);
34
+ --rc-switch-easing: var(--rc-motion-spatial-easing-fast, ease);
27
35
 
28
36
  /* Keep long flex/grid siblings from shrinking the control below its track. */
29
37
  min-inline-size: var(--rc-switch-track-inline-size) !important;
@@ -4,7 +4,9 @@
4
4
  --rc-textarea-border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
5
5
  --rc-textarea-background: var(--md-sys-color-surface, Field);
6
6
  --rc-textarea-color: var(--md-sys-color-on-surface, FieldText);
7
- --rc-textarea-padding: 1rem;
7
+ --rc-textarea-padding-block: 1rem;
8
+ --rc-textarea-padding-inline: 1rem;
9
+ --rc-textarea-gutter-min-inline-size: 48px;
8
10
  --rc-textarea-focus-outline: 2px solid var(--md-sys-color-primary, Highlight);
9
11
  --rc-textarea-caret-color: var(--md-sys-color-primary, FieldText);
10
12
  --rc-textarea-active-line-bg: color-mix(
@@ -19,8 +21,10 @@
19
21
 
20
22
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-textarea::part(root) {
21
23
  transition:
22
- border-color 150ms ease,
23
- box-shadow 150ms ease;
24
+ border-color var(--rc-motion-effects-duration-fast, 150ms)
25
+ var(--rc-motion-effects-easing-fast, ease),
26
+ box-shadow var(--rc-motion-effects-duration-fast, 150ms)
27
+ var(--rc-motion-effects-easing-fast, ease);
24
28
  }
25
29
 
26
30
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-textarea::part(root):hover {
@@ -13,7 +13,8 @@
13
13
  background: transparent;
14
14
  color: inherit;
15
15
  font: inherit;
16
- transition: background-color 150ms ease;
16
+ transition: background-color var(--rc-motion-effects-duration-fast, 150ms)
17
+ var(--rc-motion-effects-easing-fast, ease);
17
18
  }
18
19
 
19
20
  :where(.rc-theme-material, :host(.rc-theme-material)) rc-toolbar > button:hover {