@rcarls/rc-theme-substrate 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 +417 -0
- package/README.md +23 -0
- package/bridge.css +47 -17
- package/components/accordion.css +10 -111
- package/components/adaptive-menu.css +98 -0
- package/components/app-bar.css +1 -5
- 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 +56 -72
- package/components/fab-menu.css +3 -3
- package/components/field.css +155 -0
- package/components/list-item.css +36 -33
- 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 +11 -0
- package/components/scroller.css +19 -0
- package/components/search-bar.css +3 -1
- package/components/segmented-button.css +2 -27
- package/components/select.css +21 -0
- package/components/splitter.css +27 -2
- package/components/textarea.css +3 -2
- package/components/toolbar.css +9 -4
- 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 +11 -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 +34 -5
- package/native.css +249 -0
- package/package.json +5 -1
package/native.css
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
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;
|
|
3
|
+
|
|
4
|
+
/* Import defaults.css and bridge.css first when theme tokens are desired. */
|
|
5
|
+
@layer rc-theme-substrate.native {
|
|
6
|
+
/*
|
|
7
|
+
* Native styles stop at native controls that are part of an RC-owned
|
|
8
|
+
* presentation, and at subtrees the consumer opts out with
|
|
9
|
+
* data-rc-native="off". These are element-level ownership contracts rather
|
|
10
|
+
* than host boundaries, so ordinary controls remain themed in layout
|
|
11
|
+
* components such as rc-toolbar, rc-card, rc-dialog, and rc-popover.
|
|
12
|
+
*/
|
|
13
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
14
|
+
:where(button, input, select, textarea, progress):not(
|
|
15
|
+
:where(
|
|
16
|
+
[data-rc-native='off'],
|
|
17
|
+
[data-rc-native='off'] *,
|
|
18
|
+
rc-button > :is(button, a[href]),
|
|
19
|
+
rc-chip > :is(button, a[href], label),
|
|
20
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
21
|
+
rc-combobox > select,
|
|
22
|
+
rc-fab > button,
|
|
23
|
+
rc-fab-menu > [slot='trigger'],
|
|
24
|
+
rc-field > :is(input, select, textarea),
|
|
25
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
26
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
27
|
+
rc-listbox > select,
|
|
28
|
+
rc-markdown-editor > textarea,
|
|
29
|
+
rc-navigation-rail > [slot='toggle'],
|
|
30
|
+
rc-menu-button > [slot='trigger'],
|
|
31
|
+
rc-progress > progress,
|
|
32
|
+
rc-range-slider > input[type='range'],
|
|
33
|
+
rc-search-bar > input[type='search'],
|
|
34
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
35
|
+
rc-select > select,
|
|
36
|
+
rc-slider > input[type='range'],
|
|
37
|
+
rc-switch > input[type='checkbox'],
|
|
38
|
+
rc-textarea > textarea,
|
|
39
|
+
rc-transfer-list > select
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
43
|
+
:where(button, input, select, textarea, progress):not(
|
|
44
|
+
:where(
|
|
45
|
+
[data-rc-native='off'],
|
|
46
|
+
[data-rc-native='off'] *,
|
|
47
|
+
rc-button > :is(button, a[href]),
|
|
48
|
+
rc-chip > :is(button, a[href], label),
|
|
49
|
+
rc-chip > label > input:is([type='checkbox'], [type='radio']),
|
|
50
|
+
rc-combobox > select,
|
|
51
|
+
rc-fab > button,
|
|
52
|
+
rc-fab-menu > [slot='trigger'],
|
|
53
|
+
rc-field > :is(input, select, textarea),
|
|
54
|
+
rc-field > [data-rc-field-control] > :is(input, select, textarea),
|
|
55
|
+
rc-field > fieldset > :is(input, select, textarea),
|
|
56
|
+
rc-listbox > select,
|
|
57
|
+
rc-markdown-editor > textarea,
|
|
58
|
+
rc-navigation-rail > [slot='toggle'],
|
|
59
|
+
rc-menu-button > [slot='trigger'],
|
|
60
|
+
rc-progress > progress,
|
|
61
|
+
rc-range-slider > input[type='range'],
|
|
62
|
+
rc-search-bar > input[type='search'],
|
|
63
|
+
rc-segmented-button > fieldset input[type='radio'],
|
|
64
|
+
rc-select > select,
|
|
65
|
+
rc-slider > input[type='range'],
|
|
66
|
+
rc-switch > input[type='checkbox'],
|
|
67
|
+
rc-textarea > textarea,
|
|
68
|
+
rc-transfer-list > select
|
|
69
|
+
)
|
|
70
|
+
) {
|
|
71
|
+
&:where(button):not(:where(.rc-button, .rc-chip)) {
|
|
72
|
+
box-sizing: border-box;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
gap: var(--rc-button-gap, var(--rc-control-gap, 0.5rem));
|
|
77
|
+
min-block-size: var(--rc-button-block-size, var(--rc-control-block-size, 2.5rem));
|
|
78
|
+
padding-block: var(--rc-button-padding-block, var(--rc-control-padding-block, 0.5rem));
|
|
79
|
+
padding-inline: var(--rc-button-padding-inline, var(--rc-control-padding-inline, 1rem));
|
|
80
|
+
border: var(--rc-button-border, var(--rc-border, 1px solid ButtonBorder));
|
|
81
|
+
border-radius: var(--rc-button-radius, var(--rc-control-radius, 999px));
|
|
82
|
+
background: var(--rc-button-bg, ButtonFace);
|
|
83
|
+
color: var(--rc-button-color, var(--rc-button-text, ButtonText));
|
|
84
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
85
|
+
font-size: var(--rc-font-size, 1rem);
|
|
86
|
+
font-weight: var(--rc-font-weight, 400);
|
|
87
|
+
line-height: var(--rc-line-height, normal);
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:where(
|
|
92
|
+
input:is(
|
|
93
|
+
[type='text'],
|
|
94
|
+
[type='search'],
|
|
95
|
+
[type='email'],
|
|
96
|
+
[type='url'],
|
|
97
|
+
[type='tel'],
|
|
98
|
+
[type='number'],
|
|
99
|
+
[type='password'],
|
|
100
|
+
:where(:not([type]))
|
|
101
|
+
),
|
|
102
|
+
select,
|
|
103
|
+
textarea
|
|
104
|
+
) {
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
min-block-size: var(--rc-control-block-size, 2.5rem);
|
|
107
|
+
padding-block: var(--rc-control-padding-block, 0.5rem);
|
|
108
|
+
padding-inline: var(--rc-control-padding-inline, 1rem);
|
|
109
|
+
border: var(--rc-border, 1px solid ButtonBorder);
|
|
110
|
+
border-radius: var(--rc-control-radius, 0.5rem);
|
|
111
|
+
background: var(--rc-field, Field);
|
|
112
|
+
color: var(--rc-field-text, FieldText);
|
|
113
|
+
font-family: var(--rc-font-family, sans-serif);
|
|
114
|
+
font-size: var(--rc-font-size, 1rem);
|
|
115
|
+
font-weight: var(--rc-font-weight, 400);
|
|
116
|
+
line-height: var(--rc-line-height, normal);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:where(select):not(:where(.rc-select)) {
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&:not(:where(.rc-button, .rc-chip, .rc-select, .rc-textarea)):focus-visible {
|
|
124
|
+
outline: var(--rc-focus-ring, 2px solid Highlight);
|
|
125
|
+
outline-offset: var(--rc-focus-ring-offset, 2px);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:where(input[type='checkbox'], input[type='radio'], input[type='range']) {
|
|
129
|
+
min-block-size: auto;
|
|
130
|
+
padding: 0;
|
|
131
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:where(input[type='range'], progress) {
|
|
135
|
+
inline-size: 100%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:where(progress) {
|
|
139
|
+
accent-color: var(--rc-accent, AccentColor);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&:not(:where(.rc-button, .rc-chip)):where(:disabled) {
|
|
143
|
+
color: var(--rc-text-disabled, GrayText);
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Reassert rc-base light-DOM row geometry after generic native presentation. */
|
|
150
|
+
@layer rc-theme-substrate.components {
|
|
151
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
152
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
153
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
154
|
+
),
|
|
155
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
156
|
+
:where(rc-menu :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])):not(
|
|
157
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
158
|
+
) {
|
|
159
|
+
display: flex;
|
|
160
|
+
gap: var(--rc-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
161
|
+
min-block-size: var(--rc-menu-item-min-block-size, 0px);
|
|
162
|
+
justify-content: normal;
|
|
163
|
+
padding: var(--rc-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
164
|
+
var(--rc-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
165
|
+
border: none;
|
|
166
|
+
border-radius: 0;
|
|
167
|
+
background: transparent;
|
|
168
|
+
color: inherit;
|
|
169
|
+
font: inherit;
|
|
170
|
+
cursor: default;
|
|
171
|
+
outline: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
175
|
+
rc-menu
|
|
176
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
177
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
178
|
+
),
|
|
179
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
180
|
+
rc-menu
|
|
181
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):hover:not(
|
|
182
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
183
|
+
) {
|
|
184
|
+
background: var(--rc-menu-hover-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
185
|
+
color: var(--rc-menu-hover-color, inherit);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
189
|
+
rc-menu
|
|
190
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
191
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
192
|
+
),
|
|
193
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
194
|
+
rc-menu
|
|
195
|
+
:is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-active]:not(
|
|
196
|
+
:where([data-rc-native='off'], [data-rc-native='off'] *)
|
|
197
|
+
) {
|
|
198
|
+
background: var(--rc-menu-active-bg, color-mix(in srgb, Highlight 8%, transparent));
|
|
199
|
+
color: var(--rc-menu-active-color, inherit);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
203
|
+
rc-menu
|
|
204
|
+
:is(
|
|
205
|
+
button:disabled,
|
|
206
|
+
[role='menuitem'][aria-disabled='true'],
|
|
207
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
208
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
209
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
210
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
211
|
+
rc-menu
|
|
212
|
+
:is(
|
|
213
|
+
button:disabled,
|
|
214
|
+
[role='menuitem'][aria-disabled='true'],
|
|
215
|
+
[role='menuitemcheckbox'][aria-disabled='true'],
|
|
216
|
+
[role='menuitemradio'][aria-disabled='true']
|
|
217
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
218
|
+
color: var(--rc-menu-disabled-color, var(--rc-text-disabled, GrayText));
|
|
219
|
+
opacity: var(--rc-menu-disabled-opacity, var(--rc-disabled-opacity, 0.55));
|
|
220
|
+
pointer-events: none;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@layer rc-theme-substrate.overrides {
|
|
225
|
+
:where(.rc-theme-substrate:not([data-rc-native='off']))
|
|
226
|
+
:where(
|
|
227
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
228
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
229
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)),
|
|
230
|
+
:host(:not([data-rc-native='off']).rc-theme-substrate)
|
|
231
|
+
:where(
|
|
232
|
+
rc-adaptive-menu > [data-rc-action-overflowed] > :is(button, a[href]),
|
|
233
|
+
rc-adaptive-menu > :is(button, a[href])[data-rc-action-overflowed]
|
|
234
|
+
):not(:where([data-rc-native='off'], [data-rc-native='off'] *)) {
|
|
235
|
+
display: flex;
|
|
236
|
+
gap: var(--rc-adaptive-menu-item-gap, var(--rc-item-gap, 0.5em));
|
|
237
|
+
min-block-size: var(--rc-adaptive-menu-item-min-block-size, 2.5em);
|
|
238
|
+
padding: var(--rc-adaptive-menu-item-padding-block, var(--rc-item-padding-block, 0.3em))
|
|
239
|
+
var(--rc-adaptive-menu-item-padding-inline, var(--rc-item-padding-inline, 0.75em));
|
|
240
|
+
border: none;
|
|
241
|
+
border-radius: 0;
|
|
242
|
+
background: transparent;
|
|
243
|
+
color: inherit;
|
|
244
|
+
font: inherit;
|
|
245
|
+
text-align: start;
|
|
246
|
+
justify-content: normal;
|
|
247
|
+
text-decoration: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.7.0",
|
|
7
7
|
"description": "Lightweight CSS reference theme for app-oriented rc-webcomponents layouts.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
"./defaults.css": "./defaults.css",
|
|
23
23
|
"./components.css": "./components.css",
|
|
24
24
|
"./components/*.css": "./components/*.css",
|
|
25
|
+
"./css-components.css": "./css-components.css",
|
|
26
|
+
"./css-components/*.css": "./css-components/*.css",
|
|
27
|
+
"./native.css": "./native.css",
|
|
25
28
|
"./theme.css": "./theme.css"
|
|
26
29
|
},
|
|
27
30
|
"files": [
|
|
28
31
|
"*.css",
|
|
29
32
|
"components",
|
|
33
|
+
"css-components",
|
|
30
34
|
"README.md"
|
|
31
35
|
],
|
|
32
36
|
"scripts": {
|