@rcarls/rc-theme-material 0.5.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 +600 -0
- package/DESIGN.md +1399 -0
- package/README.md +138 -5
- package/bridge.css +150 -55
- package/components/accordion.css +43 -157
- package/components/adaptive-menu.css +123 -0
- package/components/app-bar.css +49 -7
- package/components/bottom-sheet.css +10 -7
- package/components/button.css +215 -2
- package/components/card.css +2 -0
- package/components/carousel.css +23 -0
- package/components/chip-group.css +15 -0
- package/components/chip.css +12 -1
- package/components/combobox.css +68 -14
- package/components/dialog.css +77 -15
- package/components/disclosure.css +128 -84
- package/components/field.css +566 -0
- package/components/icons.css +48 -6
- package/components/list-item.css +142 -32
- package/components/listbox.css +5 -4
- package/components/markdown-editor.css +62 -35
- package/components/menu-button.css +105 -1
- package/components/menu.css +32 -16
- package/components/menubar.css +4 -1
- package/components/modes.css +36 -17
- package/components/navigation-bar.css +3 -5
- package/components/navigation-rail.css +5 -7
- package/components/popover.css +50 -0
- package/components/progress.css +15 -0
- package/components/range-slider.css +8 -3
- package/components/scroller.css +7 -0
- package/components/search-bar.css +12 -2
- package/components/segmented-button.css +2 -28
- package/components/select.css +106 -14
- package/components/splitter.css +4 -1
- package/components/switch.css +9 -1
- package/components/textarea.css +13 -3
- package/components/toolbar.css +2 -1
- package/components/tooltip.css +12 -0
- package/components/transfer-list.css +5 -1
- package/components/virtual-canvas.css +4 -1
- package/components/virtual-scroller.css +7 -0
- package/components.css +11 -1
- package/constraints/material.json +99 -0
- 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 +329 -14
- package/native.css +258 -0
- package/package.json +21 -2
- package/state-layer.css +5 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@layer rc-theme-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .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-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .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-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
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-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
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-material, :host(.rc-theme-material))
|
|
13
|
+
details.rc-disclosure:not(:where(rc-disclosure > details))
|
|
14
|
+
> summary {
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@layer rc-theme-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list {
|
|
3
|
+
display: grid;
|
|
4
|
+
gap: var(--rc-list-item-gap, 0.5rem);
|
|
5
|
+
margin-block: 0;
|
|
6
|
+
padding-inline-start: 0;
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list > li {
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
min-block-size: var(--rc-list-item-min-block-size, 3rem);
|
|
14
|
+
padding-block: var(--rc-list-item-padding-block, 0.5rem);
|
|
15
|
+
padding-inline: var(--rc-list-item-padding-inline, 1rem);
|
|
16
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list > li[aria-selected='true'],
|
|
20
|
+
:where(.rc-theme-material, :host(.rc-theme-material)) .rc-list > li:has(input:checked) {
|
|
21
|
+
background: var(--rc-list-item-selected-bg, Highlight);
|
|
22
|
+
color: var(--rc-list-item-selected-color, HighlightText);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (forced-colors: active) {
|
|
26
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
27
|
+
.rc-list
|
|
28
|
+
> li:is([aria-selected='true'], :has(input:checked)) {
|
|
29
|
+
border-color: Highlight;
|
|
30
|
+
outline: 1px solid Highlight;
|
|
31
|
+
outline-offset: -1px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer rc-theme-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
3
|
+
select.rc-select:not(:where(rc-select > select)) {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
min-block-size: var(--rc-select-control-block-size, var(--rc-control-block-size, 2.5rem));
|
|
6
|
+
padding-block: var(--rc-select-padding-block, var(--rc-control-padding-block, 0.5rem));
|
|
7
|
+
padding-inline: var(--rc-select-padding-inline, var(--rc-control-padding-inline, 1rem));
|
|
8
|
+
border: var(--rc-select-border, var(--rc-border, 1px solid ButtonBorder));
|
|
9
|
+
border-radius: var(--rc-select-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-field, Field);
|
|
11
|
+
color: var(--rc-field-text, FieldText);
|
|
12
|
+
font: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
16
|
+
select.rc-select:not(:where(rc-select > select)):focus-visible {
|
|
17
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
18
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@layer rc-theme-material.css-components {
|
|
2
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
3
|
+
textarea.rc-textarea:not(:where(rc-textarea > textarea)) {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
6
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
7
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
8
|
+
border: var(--rc-textarea-border, var(--rc-border, 1px solid ButtonBorder));
|
|
9
|
+
border-radius: var(--rc-textarea-border-radius, var(--rc-control-radius, 0.5rem));
|
|
10
|
+
background: var(--rc-textarea-background, var(--rc-field, Field));
|
|
11
|
+
color: var(--rc-textarea-color, var(--rc-field-text, FieldText));
|
|
12
|
+
caret-color: var(--rc-textarea-caret-color, var(--rc-accent, AccentColor));
|
|
13
|
+
font: inherit;
|
|
14
|
+
resize: block;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
18
|
+
textarea.rc-textarea:not(:where(rc-textarea > textarea)):focus-visible {
|
|
19
|
+
outline: var(--rc-textarea-focus-outline, var(--rc-focus-ring, 2px solid Highlight));
|
|
20
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@layer rc-base, rc-theme-material.defaults, rc-theme-material.bridge, rc-theme-material.native, rc-theme-material.components, rc-theme-material.css-components,
|
|
2
|
+
rc-theme-material.overrides;
|
|
3
|
+
|
|
4
|
+
@import './css-components/button.css';
|
|
5
|
+
@import './css-components/chip.css';
|
|
6
|
+
@import './css-components/chip-group.css';
|
|
7
|
+
@import './css-components/select.css';
|
|
8
|
+
@import './css-components/textarea.css';
|
|
9
|
+
@import './css-components/card.css';
|
|
10
|
+
@import './css-components/list.css';
|
|
11
|
+
@import './css-components/disclosure.css';
|
|
12
|
+
|
|
13
|
+
@layer rc-theme-material.css-components {
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
:where(.rc-theme-material, :host(.rc-theme-material))
|
|
16
|
+
:where(
|
|
17
|
+
button.rc-button,
|
|
18
|
+
a.rc-button,
|
|
19
|
+
button.rc-chip,
|
|
20
|
+
a.rc-chip,
|
|
21
|
+
label.rc-chip,
|
|
22
|
+
select.rc-select,
|
|
23
|
+
textarea.rc-textarea,
|
|
24
|
+
.rc-card,
|
|
25
|
+
.rc-list,
|
|
26
|
+
details.rc-disclosure
|
|
27
|
+
) {
|
|
28
|
+
forced-color-adjust: auto;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|