@botiverse/raft-ui 0.19.0 → 0.21.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 +191 -3
- package/codemods/button-sizes.mjs +340 -0
- package/codemods/token-names.mjs +16 -0
- package/dist/cn.mjs +23 -2
- package/dist/components/combobox-select/combobox-select.css +58 -40
- package/dist/components/float-button/float-button.css +21 -12
- package/dist/foundation.css +66 -39
- package/dist/{index-DsVVBZ5T.d.mts → index-CP05_pvu.d.mts} +44 -2
- package/dist/index.d.mts +16 -25
- package/dist/index.mjs +213 -166
- package/dist/style.css +73 -58
- package/dist/styles.css +119 -24
- package/dist/tokens.json +90 -55
- package/dist/{touch-drag-CbWqiMlZ.mjs → touch-drag-B7uLTWXe.mjs} +265 -62
- package/dist/wip.d.mts +100 -3
- package/dist/wip.mjs +349 -5
- package/package.json +8 -1
package/dist/style.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--r-float-button-border-color: var(--line-strong);
|
|
9
9
|
--r-float-button-bg: var(--layer-card);
|
|
10
10
|
--r-float-button-bg-hover: var(--layer-card);
|
|
11
|
-
--r-float-button-press: var(--fill-
|
|
11
|
+
--r-float-button-press: var(--fill-medium);
|
|
12
12
|
--r-float-button-text-color: var(--foreground);
|
|
13
13
|
--r-float-button-text-hover-color: var(--foreground);
|
|
14
14
|
--r-float-button-text-disabled-color: var(--foreground-disabled);
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
--r-float-button-border-color: var(--sticker-ink);
|
|
72
72
|
--r-float-button-bg: var(--attention-400);
|
|
73
73
|
--r-float-button-bg-hover: var(--attention-400);
|
|
74
|
-
--r-float-button-press: var(--sticker-
|
|
74
|
+
--r-float-button-press: var(--sticker-medium);
|
|
75
75
|
--r-float-button-text-color: var(--sticker-ink);
|
|
76
76
|
--r-float-button-text-hover-color: var(--sticker-ink);
|
|
77
77
|
}
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
--r-float-button-border-color: var(--sticker-ink);
|
|
81
81
|
--r-float-button-bg: var(--warning);
|
|
82
82
|
--r-float-button-bg-hover: var(--warning);
|
|
83
|
-
--r-float-button-press: var(--sticker-
|
|
83
|
+
--r-float-button-press: var(--sticker-medium);
|
|
84
84
|
--r-float-button-text-color: var(--sticker-ink);
|
|
85
85
|
--r-float-button-text-hover-color: var(--sticker-ink);
|
|
86
86
|
}
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
--r-float-button-border-color: var(--sticker-ink);
|
|
90
90
|
--r-float-button-bg: var(--danger);
|
|
91
91
|
--r-float-button-bg-hover: var(--danger);
|
|
92
|
-
--r-float-button-press: var(--sticker-
|
|
92
|
+
--r-float-button-press: var(--sticker-medium);
|
|
93
93
|
--r-float-button-text-color: var(--sticker-ink);
|
|
94
94
|
--r-float-button-text-hover-color: var(--sticker-ink);
|
|
95
95
|
}
|
|
@@ -97,8 +97,8 @@
|
|
|
97
97
|
&.r-float-button--ghost {
|
|
98
98
|
--r-float-button-border-color: transparent;
|
|
99
99
|
--r-float-button-bg: transparent;
|
|
100
|
-
--r-float-button-bg-hover:
|
|
101
|
-
--r-float-button-press:
|
|
100
|
+
--r-float-button-bg-hover: transparent;
|
|
101
|
+
--r-float-button-press: var(--fill-medium);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
@@ -136,11 +136,13 @@
|
|
|
136
136
|
padding-right: var(--r-float-button-padding-x);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
@media (hover: hover) {
|
|
140
|
+
&:hover:not(:disabled) {
|
|
141
|
+
background-color: var(--r-float-button-bg-hover);
|
|
142
|
+
color: var(--r-float-button-text-hover-color);
|
|
143
|
+
box-shadow: var(--r-float-button-shadow-hover);
|
|
144
|
+
transform: var(--r-float-button-transform-hover);
|
|
145
|
+
}
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
&:active:not(:disabled) {
|
|
@@ -153,7 +155,13 @@
|
|
|
153
155
|
outline-offset: var(--r-float-button-outline-offset);
|
|
154
156
|
}
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
@media (hover: hover) {
|
|
159
|
+
&:hover:not(:disabled) {
|
|
160
|
+
background-image: linear-gradient(var(--r-float-button-press), var(--r-float-button-press));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&:active:not(:disabled) {
|
|
157
165
|
background-image: linear-gradient(var(--r-float-button-press), var(--r-float-button-press));
|
|
158
166
|
}
|
|
159
167
|
|
|
@@ -1062,16 +1070,16 @@
|
|
|
1062
1070
|
box-sizing: border-box;
|
|
1063
1071
|
min-width: 0;
|
|
1064
1072
|
min-height: var(--control-height);
|
|
1073
|
+
align-items: center;
|
|
1074
|
+
gap: var(--control-embedded-inset);
|
|
1075
|
+
padding: 0 calc(var(--control-embedded-inset) - 1px) 0 12px;
|
|
1065
1076
|
border: 1.5px solid var(--line-field);
|
|
1077
|
+
border-radius: var(--radius-control);
|
|
1066
1078
|
background: var(--layer-card);
|
|
1067
1079
|
color: var(--foreground);
|
|
1068
1080
|
font-size: var(--field-font-size);
|
|
1069
1081
|
line-height: var(--field-line-height);
|
|
1070
|
-
border-radius: 8px;
|
|
1071
1082
|
outline: 0;
|
|
1072
|
-
align-items: center;
|
|
1073
|
-
gap: .5rem;
|
|
1074
|
-
padding: 0 6px 0 12px;
|
|
1075
1083
|
transition: box-shadow 90ms ease-out;
|
|
1076
1084
|
display: flex;
|
|
1077
1085
|
}
|
|
@@ -1094,31 +1102,31 @@
|
|
|
1094
1102
|
}
|
|
1095
1103
|
|
|
1096
1104
|
.r-combobox-select__chips {
|
|
1105
|
+
min-height: var(--control-embedded-size);
|
|
1106
|
+
min-width: 0;
|
|
1107
|
+
padding: calc(var(--control-embedded-inset) - 1.5px) 0;
|
|
1108
|
+
align-items: center;
|
|
1109
|
+
gap: var(--control-embedded-inset);
|
|
1097
1110
|
border: 0;
|
|
1098
1111
|
flex-wrap: wrap;
|
|
1099
1112
|
flex: 1;
|
|
1100
|
-
|
|
1101
|
-
gap: 6px;
|
|
1102
|
-
min-width: 0;
|
|
1103
|
-
min-height: 28px;
|
|
1104
|
-
margin-inline-start: -6px;
|
|
1105
|
-
padding: 6px 0;
|
|
1113
|
+
margin-inline-start: calc(var(--control-embedded-inset) - 13px);
|
|
1106
1114
|
display: flex;
|
|
1107
1115
|
}
|
|
1108
1116
|
|
|
1109
1117
|
.r-combobox-select__chips .r-combobox-select__input {
|
|
1110
|
-
|
|
1118
|
+
height: var(--control-embedded-size);
|
|
1111
1119
|
padding: 0 4px;
|
|
1112
1120
|
}
|
|
1113
1121
|
|
|
1114
1122
|
.r-combobox-select__chip {
|
|
1115
|
-
background: var(--fill-muted);
|
|
1116
1123
|
max-width: 100%;
|
|
1117
|
-
|
|
1124
|
+
height: var(--control-embedded-size);
|
|
1125
|
+
border-radius: var(--radius-chip);
|
|
1126
|
+
background: var(--fill-muted);
|
|
1118
1127
|
color: var(--foreground);
|
|
1119
1128
|
font-size: var(--text-footnote);
|
|
1120
1129
|
line-height: var(--text-footnote--line-height);
|
|
1121
|
-
border-radius: 6px;
|
|
1122
1130
|
align-items: center;
|
|
1123
1131
|
gap: 6px;
|
|
1124
1132
|
padding: 0 2px 0 8px;
|
|
@@ -1147,9 +1155,9 @@
|
|
|
1147
1155
|
}
|
|
1148
1156
|
|
|
1149
1157
|
.r-combobox-select__actions {
|
|
1150
|
-
flex: none;
|
|
1151
1158
|
align-items: center;
|
|
1152
|
-
gap:
|
|
1159
|
+
gap: var(--control-embedded-inset);
|
|
1160
|
+
flex: none;
|
|
1153
1161
|
display: inline-flex;
|
|
1154
1162
|
}
|
|
1155
1163
|
|
|
@@ -1166,17 +1174,17 @@
|
|
|
1166
1174
|
}
|
|
1167
1175
|
|
|
1168
1176
|
.r-combobox-select__remove {
|
|
1169
|
-
width:
|
|
1170
|
-
height:
|
|
1177
|
+
width: calc(var(--control-embedded-size) - 4px);
|
|
1178
|
+
height: calc(var(--control-embedded-size) - 4px);
|
|
1179
|
+
border-radius: var(--radius-sticker);
|
|
1171
1180
|
color: var(--foreground-hint);
|
|
1172
|
-
border-radius: 4px;
|
|
1173
1181
|
}
|
|
1174
1182
|
|
|
1175
1183
|
.r-combobox-select__action {
|
|
1176
|
-
width:
|
|
1177
|
-
height:
|
|
1184
|
+
width: var(--control-embedded-size);
|
|
1185
|
+
height: var(--control-embedded-size);
|
|
1186
|
+
border-radius: var(--radius-chip);
|
|
1178
1187
|
color: var(--foreground-hint);
|
|
1179
|
-
border-radius: 8px;
|
|
1180
1188
|
}
|
|
1181
1189
|
|
|
1182
1190
|
.r-combobox-select__action > svg, .r-combobox-select__remove > svg {
|
|
@@ -1193,15 +1201,26 @@
|
|
|
1193
1201
|
height: .875rem;
|
|
1194
1202
|
}
|
|
1195
1203
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1204
|
+
@media (hover: hover) {
|
|
1205
|
+
.r-combobox-select__action:hover, .r-combobox-select__remove:hover {
|
|
1206
|
+
background: var(--fill-medium);
|
|
1207
|
+
color: var(--foreground);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.r-combobox-select__action:active, .r-combobox-select__remove:active {
|
|
1212
|
+
background: var(--fill-medium);
|
|
1198
1213
|
color: var(--foreground);
|
|
1199
1214
|
}
|
|
1200
1215
|
|
|
1201
|
-
.r-combobox-select__action:focus-visible
|
|
1216
|
+
.r-combobox-select__action:focus-visible {
|
|
1202
1217
|
box-shadow: var(--focus-ring);
|
|
1203
1218
|
}
|
|
1204
1219
|
|
|
1220
|
+
.r-combobox-select__remove:focus-visible:not(:where(:root[data-input-modality="pointer"] *)) {
|
|
1221
|
+
box-shadow: inset 0 0 0 2px var(--foreground);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1205
1224
|
.r-combobox-select__positioner {
|
|
1206
1225
|
z-index: 50;
|
|
1207
1226
|
isolation: isolate;
|
|
@@ -1214,12 +1233,12 @@
|
|
|
1214
1233
|
min-width: 13.75rem;
|
|
1215
1234
|
max-width: var(--available-width);
|
|
1216
1235
|
max-height: min(var(--available-height), max(24rem, var(--combobox-select-list-max-height, 0px)));
|
|
1236
|
+
border-radius: var(--radius-container);
|
|
1217
1237
|
background: var(--layer-popover);
|
|
1218
1238
|
color: var(--foreground);
|
|
1219
1239
|
box-shadow: 0 0 0 1px var(--line-seam),
|
|
1220
1240
|
var(--elevation-float);
|
|
1221
1241
|
border: 0;
|
|
1222
|
-
border-radius: 10px;
|
|
1223
1242
|
outline: 0;
|
|
1224
1243
|
overflow: hidden;
|
|
1225
1244
|
}
|
|
@@ -1228,13 +1247,14 @@
|
|
|
1228
1247
|
box-sizing: border-box;
|
|
1229
1248
|
max-height: var(--combobox-select-list-max-height, 16rem);
|
|
1230
1249
|
overscroll-behavior: contain;
|
|
1231
|
-
padding:
|
|
1232
|
-
scroll-padding-block:
|
|
1250
|
+
padding: 4px;
|
|
1251
|
+
scroll-padding-block: 4px;
|
|
1233
1252
|
overflow-y: auto;
|
|
1234
1253
|
}
|
|
1235
1254
|
|
|
1236
1255
|
.r-combobox-select__option {
|
|
1237
1256
|
box-sizing: border-box;
|
|
1257
|
+
border-radius: var(--radius-chip);
|
|
1238
1258
|
cursor: default;
|
|
1239
1259
|
user-select: none;
|
|
1240
1260
|
width: 100%;
|
|
@@ -1242,7 +1262,6 @@
|
|
|
1242
1262
|
color: var(--foreground);
|
|
1243
1263
|
font-size: var(--text-callout);
|
|
1244
1264
|
line-height: var(--text-callout--line-height);
|
|
1245
|
-
border-radius: 8px;
|
|
1246
1265
|
outline: 0;
|
|
1247
1266
|
justify-content: space-between;
|
|
1248
1267
|
align-items: center;
|
|
@@ -1254,7 +1273,14 @@
|
|
|
1254
1273
|
overflow: hidden;
|
|
1255
1274
|
}
|
|
1256
1275
|
|
|
1257
|
-
|
|
1276
|
+
@media (hover: hover) {
|
|
1277
|
+
.r-combobox-select__option:hover {
|
|
1278
|
+
background: var(--brand-soft);
|
|
1279
|
+
color: var(--foreground);
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.r-combobox-select__option[data-highlighted] {
|
|
1258
1284
|
background: var(--brand-soft);
|
|
1259
1285
|
color: var(--foreground);
|
|
1260
1286
|
}
|
|
@@ -1321,27 +1347,16 @@
|
|
|
1321
1347
|
}
|
|
1322
1348
|
|
|
1323
1349
|
.r-combobox-select--sm.r-combobox-select__control {
|
|
1324
|
-
|
|
1350
|
+
--control-height: 1.75rem;
|
|
1351
|
+
--control-embedded-inset: 3px;
|
|
1352
|
+
--control-embedded-size: 22px;
|
|
1325
1353
|
font-size: var(--text-control);
|
|
1326
1354
|
line-height: var(--text-control--line-height);
|
|
1327
1355
|
}
|
|
1328
1356
|
|
|
1329
|
-
.r-combobox-select--sm .r-combobox-select__chips {
|
|
1330
|
-
min-height: 1.5rem;
|
|
1331
|
-
padding: 1px 0;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
.r-combobox-select--sm .r-combobox-select__chip {
|
|
1335
|
-
min-height: 1.375rem;
|
|
1336
|
-
}
|
|
1337
|
-
|
|
1338
|
-
.r-combobox-select--sm .r-combobox-select__action {
|
|
1339
|
-
width: 1.5rem;
|
|
1340
|
-
height: 1.5rem;
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
1357
|
.r-combobox-select--lg.r-combobox-select__control {
|
|
1344
|
-
|
|
1358
|
+
--control-height: 52px;
|
|
1359
|
+
--control-embedded-size: 40px;
|
|
1345
1360
|
}
|
|
1346
1361
|
|
|
1347
1362
|
.r-combobox-select__control[data-status="error"], .r-combobox-select__control[data-invalid] {
|
package/dist/styles.css
CHANGED
|
@@ -65,9 +65,14 @@
|
|
|
65
65
|
|
|
66
66
|
/* Raft Design System shape scale: pixels are hard, containers are soft.
|
|
67
67
|
sticker = avatars, channel tiles, checkboxes, counts, inline marks;
|
|
68
|
-
chip =
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
chip = chips, a popup's highlighted item, and every control embedded in
|
|
69
|
+
another component's frame (a field's buttons, the composer's, a floating
|
|
70
|
+
toolbar's, a card's corner action); control = buttons, fields and rows
|
|
71
|
+
that stand on their own; container = cards, menus, composer, banners;
|
|
72
|
+
dialog = dialogs and sheet tops. Round (rounded-full) is only for
|
|
73
|
+
switches and radios. A frame keeps its radius whatever it holds: the
|
|
74
|
+
element keeps its own, and the space around it adapts
|
|
75
|
+
(design/foundations/shape.md#inside-a-frame). */
|
|
71
76
|
--radius-sticker: 4px;
|
|
72
77
|
--radius-chip: 6px;
|
|
73
78
|
--radius-control: 8px;
|
|
@@ -281,17 +286,15 @@
|
|
|
281
286
|
--color-foreground-on-frame: var(--foreground-on-frame);
|
|
282
287
|
--color-foreground-on-frame-muted: var(--foreground-on-frame-muted);
|
|
283
288
|
--color-foreground-on-frame-active: var(--foreground-on-frame-active);
|
|
284
|
-
--color-fill-
|
|
285
|
-
--color-fill-
|
|
286
|
-
--color-fill-
|
|
287
|
-
--color-fill-message-hover: var(--fill-message-hover);
|
|
288
|
-
--color-fill-row-open: var(--fill-row-open);
|
|
289
|
+
--color-fill-subtle: var(--fill-subtle);
|
|
290
|
+
--color-fill-medium: var(--fill-medium);
|
|
291
|
+
--color-fill-frame-medium: var(--fill-frame-medium);
|
|
289
292
|
--color-layer-code: var(--layer-code);
|
|
290
293
|
--color-foreground-link: var(--foreground-link);
|
|
291
294
|
--color-sticker-ink: var(--sticker-ink);
|
|
292
295
|
--color-sticker-paper: var(--sticker-paper);
|
|
293
296
|
--color-sticker-edge: var(--sticker-edge);
|
|
294
|
-
--color-sticker-
|
|
297
|
+
--color-sticker-medium: var(--sticker-medium);
|
|
295
298
|
--color-presence-online: var(--presence-online);
|
|
296
299
|
--color-presence-busy: var(--presence-busy);
|
|
297
300
|
--color-presence-error: var(--presence-error);
|
|
@@ -370,6 +373,41 @@
|
|
|
370
373
|
--spacing-control-cta: var(--control-height-cta);
|
|
371
374
|
--spacing-control-icon: var(--control-icon-size);
|
|
372
375
|
--spacing-control-hit: var(--control-hit-inset);
|
|
376
|
+
/* A chip or a button embedded in a frame sits `embedded-inset` (6px) inside
|
|
377
|
+
the frame's outer edge on every side and from its sibling; in a field it
|
|
378
|
+
is `control-embedded` tall, 20px on a desktop and 32px on a phone, so the
|
|
379
|
+
field keeps the control height (design/foundations/shape.md#inside-a-frame).
|
|
380
|
+
Consumers: `ComboboxChips`, `ComboboxControl`, `ComboboxSelect`,
|
|
381
|
+
InputGroup's end addon, the composer, CodeBlock and the corner actions of
|
|
382
|
+
MessageAttachment. */
|
|
383
|
+
--spacing-control-embedded: var(--control-embedded-size);
|
|
384
|
+
--spacing-embedded-inset: var(--control-embedded-inset);
|
|
385
|
+
/* ─── Timeline rhythm ───────────────────────────────────────────────────────
|
|
386
|
+
Two steps between the lines of a conversation, measured from text to text
|
|
387
|
+
(design/foundations/spacing.md#timeline-rhythm): `timeline-message` (16px)
|
|
388
|
+
between turns, `timeline-section` (24px) at a boundary. Every row carries
|
|
389
|
+
`timeline-row` (4px) above and below its text, the reach of its highlight;
|
|
390
|
+
a turn's first row adds `timeline-turn` (8px, a transparent border the
|
|
391
|
+
highlight doesn't paint) above that, so it starts `timeline-lead` (12px)
|
|
392
|
+
above its text. A date line takes those insets back out of its own
|
|
393
|
+
padding, so it sits a section from the text on both sides.
|
|
394
|
+
A product uses only two of them, around its list: `timeline-start`
|
|
395
|
+
over the first row (a section less the lead every row brings, the
|
|
396
|
+
notice included) and `timeline-end` under the last row (a section less
|
|
397
|
+
its row inset); `turn` and `lead` stay inside the components.
|
|
398
|
+
|
|
399
|
+
Consumers: MessageItem, SystemMessage, MessageListDateDivider,
|
|
400
|
+
MessageListNotice, ThreadPanelReplySummary, and the product's list top
|
|
401
|
+
and end. */
|
|
402
|
+
--spacing-timeline-message: var(--timeline-gap-message);
|
|
403
|
+
--spacing-timeline-section: var(--timeline-gap-section);
|
|
404
|
+
--spacing-timeline-row: var(--timeline-row-inset);
|
|
405
|
+
--spacing-timeline-turn: calc(var(--timeline-gap-message) - 2 * var(--timeline-row-inset));
|
|
406
|
+
--spacing-timeline-lead: calc(var(--timeline-gap-message) - var(--timeline-row-inset));
|
|
407
|
+
--spacing-timeline-end: calc(var(--timeline-gap-section) - var(--timeline-row-inset));
|
|
408
|
+
--spacing-timeline-start: calc(
|
|
409
|
+
var(--timeline-gap-section) - var(--timeline-gap-message) + var(--timeline-row-inset)
|
|
410
|
+
);
|
|
373
411
|
/* ─── Option metric axis ────────────────────────────────────────────────────
|
|
374
412
|
An option in a popup list (a Select, Combobox or ComboboxSelect option, a
|
|
375
413
|
menu item) is as tall as its content, with the same space above and below
|
|
@@ -397,6 +435,12 @@
|
|
|
397
435
|
--spacing-icon-inset: var(--icon-inset);
|
|
398
436
|
|
|
399
437
|
/* Deprecated utility names, kept until raft-ui 1.0 (see codemods/token-names.mjs). */
|
|
438
|
+
--color-fill-pressed: var(--fill-medium);
|
|
439
|
+
--color-fill-frame-pressed: var(--fill-frame-medium);
|
|
440
|
+
--color-fill-row-hover: var(--fill-subtle);
|
|
441
|
+
--color-fill-row-open: var(--fill-subtle);
|
|
442
|
+
--color-fill-message-hover: var(--fill-subtle);
|
|
443
|
+
--color-sticker-pressed: var(--sticker-medium);
|
|
400
444
|
--color-foreground-strong: var(--foreground);
|
|
401
445
|
--color-foreground-icon: var(--foreground-muted);
|
|
402
446
|
--color-foreground-placeholder: var(--foreground-hint);
|
|
@@ -542,28 +586,79 @@ textarea:-webkit-autofill:disabled {
|
|
|
542
586
|
background-size: 16px 16px;
|
|
543
587
|
}
|
|
544
588
|
|
|
545
|
-
/* Raft Design System
|
|
546
|
-
resting colour instead of
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
589
|
+
/* Raft Design System hover and press: two tiers, each a translucent ink
|
|
590
|
+
layer over the resting colour instead of a swap, so a control keeps its
|
|
591
|
+
identity and the step looks the same on white, the yellowish sidebar and a
|
|
592
|
+
card (design/foundations/states.md#hover-and-press).
|
|
593
|
+
overlay-subtle: hover on large things people read (rows, messages, readable
|
|
594
|
+
cards) and a row whose menu is open.
|
|
595
|
+
overlay-medium: hover on small controls and press on everything; on a colour
|
|
596
|
+
sticker overlay-sticker-medium, on the frame overlay-frame-medium.
|
|
597
|
+
Use the bg-fill-* colours instead on a transparent control whose fill fades
|
|
598
|
+
in with transition-colors. */
|
|
599
|
+
@utility overlay-subtle {
|
|
600
|
+
background-image: linear-gradient(var(--fill-subtle), var(--fill-subtle));
|
|
551
601
|
}
|
|
552
602
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
replaces it instead of stacking on it. */
|
|
556
|
-
@utility row-hover-overlay {
|
|
557
|
-
background-image: linear-gradient(var(--fill-row-hover), var(--fill-row-hover));
|
|
603
|
+
@utility overlay-medium {
|
|
604
|
+
background-image: linear-gradient(var(--fill-medium), var(--fill-medium));
|
|
558
605
|
}
|
|
559
606
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
607
|
+
@utility overlay-sticker-medium {
|
|
608
|
+
background-image: linear-gradient(var(--sticker-medium), var(--sticker-medium));
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@utility overlay-frame-medium {
|
|
612
|
+
background-image: linear-gradient(var(--fill-frame-medium), var(--fill-frame-medium));
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/* Deprecated overlay names, kept until raft-ui 1.0 (see codemods/token-names.mjs). */
|
|
616
|
+
@utility press-overlay {
|
|
617
|
+
background-image: linear-gradient(var(--fill-medium), var(--fill-medium));
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/* A mark that leads a line of text: the icon or status light at the start of
|
|
621
|
+
a banner, a toast, a panel notice or a chip sits on the first line of its
|
|
622
|
+
text, centred on it, and stays there when the text wraps
|
|
623
|
+
(design/foundations/alignment.md#a-mark-that-leads-text). In Space
|
|
624
|
+
Grotesk the centre of the line box is the centre of the cap height (to
|
|
625
|
+
0.006em), so this is optical centring and needs no per-size nudge. Only
|
|
626
|
+
the place is shared: each component keeps its own icon size and gap.
|
|
627
|
+
|
|
628
|
+
`lead-icon` centres an icon of any size on the line its parent sets, by
|
|
629
|
+
moving it half a line down and back up by half its own height. Set the
|
|
630
|
+
type on the row that holds the mark and the text, as PanelNotice does:
|
|
631
|
+
the mark reads `1lh` from it.
|
|
632
|
+
|
|
633
|
+
`lead-dot` places a status light the same way, in a box one line tall,
|
|
634
|
+
and keeps it at its one size beside text, 9px with a 1.5px ink edge
|
|
635
|
+
(status.md#sizes). It is kept at 9px inside components (Banner,
|
|
636
|
+
PanelNotice, ToastIcon, Badge, PanelActivity); when placing Status
|
|
637
|
+
yourself, don't pass a size. */
|
|
638
|
+
@utility lead-icon {
|
|
639
|
+
flex-shrink: 0;
|
|
640
|
+
align-self: start;
|
|
641
|
+
translate: 0 calc(0.5lh - 50%);
|
|
642
|
+
}
|
|
643
|
+
@utility lead-dot {
|
|
644
|
+
--lead-dot: 9px;
|
|
645
|
+
flex-shrink: 0;
|
|
646
|
+
width: var(--lead-dot);
|
|
647
|
+
height: var(--lead-dot);
|
|
648
|
+
border-width: 1.5px;
|
|
649
|
+
margin-block: calc((1lh - var(--lead-dot)) / 2);
|
|
563
650
|
}
|
|
564
651
|
|
|
565
652
|
@utility press-overlay-sticker {
|
|
566
|
-
background-image: linear-gradient(var(--sticker-
|
|
653
|
+
background-image: linear-gradient(var(--sticker-medium), var(--sticker-medium));
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
@utility row-hover-overlay {
|
|
657
|
+
background-image: linear-gradient(var(--fill-subtle), var(--fill-subtle));
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
@utility row-open-overlay {
|
|
661
|
+
background-image: linear-gradient(var(--fill-subtle), var(--fill-subtle));
|
|
567
662
|
}
|
|
568
663
|
|
|
569
664
|
/* Space and rules between siblings: stack-y-* / stack-x-* and rule-y / rule-x
|