@volverjs/style 0.1.29 → 0.1.30
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/design-tokens.json +503 -7
- package/dist/base.css +1 -1
- package/dist/components/vv-alert.css +1 -1
- package/dist/components/vv-attachment-group.css +1 -0
- package/dist/components/vv-attachment.css +1 -0
- package/dist/components/vv-avatar.css +1 -1
- package/dist/components/vv-badge.css +1 -1
- package/dist/components/vv-breadcrumb.css +1 -1
- package/dist/components/vv-bubble-group.css +1 -0
- package/dist/components/vv-bubble.css +1 -0
- package/dist/components/vv-button.css +1 -1
- package/dist/components/vv-calendar.css +1 -0
- package/dist/components/vv-checkbox-group.css +1 -1
- package/dist/components/vv-checkbox.css +1 -1
- package/dist/components/vv-command.css +1 -0
- package/dist/components/vv-dialog.css +1 -1
- package/dist/components/vv-dropdown-action.css +1 -1
- package/dist/components/vv-dropdown-option.css +1 -1
- package/dist/components/vv-empty.css +1 -0
- package/dist/components/vv-field.css +1 -0
- package/dist/components/vv-input-file.css +1 -1
- package/dist/components/vv-input-otp.css +1 -0
- package/dist/components/vv-input-range.css +1 -1
- package/dist/components/vv-input-text.css +1 -1
- package/dist/components/vv-item-group.css +1 -0
- package/dist/components/vv-item.css +1 -0
- package/dist/components/vv-kbd-group.css +1 -0
- package/dist/components/vv-kbd.css +1 -0
- package/dist/components/vv-marker.css +1 -0
- package/dist/components/vv-message-scroller.css +1 -0
- package/dist/components/vv-message.css +1 -0
- package/dist/components/vv-nav.css +1 -1
- package/dist/components/vv-pagination.css +1 -0
- package/dist/components/vv-popover.css +1 -0
- package/dist/components/vv-progress.css +1 -1
- package/dist/components/vv-prose.css +1 -0
- package/dist/components/vv-questionnaire.css +1 -0
- package/dist/components/vv-radio-group.css +1 -1
- package/dist/components/vv-radio.css +1 -1
- package/dist/components/vv-select.css +1 -1
- package/dist/components/vv-separator.css +1 -0
- package/dist/components/vv-sidebar.css +1 -0
- package/dist/components/vv-spinner.css +1 -0
- package/dist/components/vv-table.css +1 -1
- package/dist/components/vv-text.css +1 -1
- package/dist/components/vv-textarea.css +1 -1
- package/dist/components.css +1 -1
- package/dist/export.css +1 -1
- package/dist/props/colors.css +1 -1
- package/dist/props/input.css +1 -1
- package/dist/props.css +1 -1
- package/dist/themes/dark/components.css +1 -1
- package/dist/themes/dark/props.css +1 -1
- package/dist/themes/dark/volver.css +1 -1
- package/dist/utilities/colors.css +1 -1
- package/dist/utilities/layout.css +1 -1
- package/dist/utilities.css +1 -1
- package/dist/volver.css +1 -1
- package/package.json +64 -16
- package/src/_config.scss +23 -0
- package/src/_preflight.scss +14 -2
- package/src/base.scss +1 -1
- package/src/components/index.scss +28 -0
- package/src/components/vv-attachment-group.scss +17 -0
- package/src/components/vv-attachment.scss +17 -0
- package/src/components/vv-bubble-group.scss +17 -0
- package/src/components/vv-bubble.scss +17 -0
- package/src/components/vv-calendar.scss +25 -0
- package/src/components/vv-command.scss +17 -0
- package/src/components/vv-empty.scss +17 -0
- package/src/components/vv-field.scss +25 -0
- package/src/components/vv-input-otp.scss +17 -0
- package/src/components/vv-item-group.scss +17 -0
- package/src/components/vv-item.scss +39 -0
- package/src/components/vv-kbd-group.scss +17 -0
- package/src/components/vv-kbd.scss +17 -0
- package/src/components/vv-marker.scss +17 -0
- package/src/components/vv-message-scroller.scss +24 -0
- package/src/components/vv-message.scss +25 -0
- package/src/components/vv-pagination.scss +17 -0
- package/src/components/vv-popover.scss +17 -0
- package/src/components/vv-prose.scss +17 -0
- package/src/components/vv-questionnaire.scss +28 -0
- package/src/components/vv-separator.scss +17 -0
- package/src/components/vv-sidebar.scss +17 -0
- package/src/components/vv-spinner.scss +27 -0
- package/src/presets/_outlined-fields.scss +346 -0
- package/src/props/colors.scss +6 -0
- package/src/settings/_colors.scss +161 -61
- package/src/settings/_index.scss +26 -0
- package/src/settings/_input.scss +11 -2
- package/src/settings/components/_choice.scss +104 -0
- package/src/settings/components/_vv-alert.scss +37 -12
- package/src/settings/components/_vv-attachment-group.scss +10 -0
- package/src/settings/components/_vv-attachment.scss +135 -0
- package/src/settings/components/_vv-avatar.scss +19 -9
- package/src/settings/components/_vv-badge.scss +47 -14
- package/src/settings/components/_vv-breadcrumb.scss +1 -1
- package/src/settings/components/_vv-bubble-group.scss +31 -0
- package/src/settings/components/_vv-bubble.scss +69 -0
- package/src/settings/components/_vv-button.scss +55 -13
- package/src/settings/components/_vv-calendar.scss +102 -0
- package/src/settings/components/_vv-checkbox-group.scss +33 -2
- package/src/settings/components/_vv-checkbox.scss +8 -3
- package/src/settings/components/_vv-command.scss +99 -0
- package/src/settings/components/_vv-dialog.scss +129 -26
- package/src/settings/components/_vv-dropdown-action.scss +3 -2
- package/src/settings/components/_vv-dropdown-option.scss +3 -3
- package/src/settings/components/_vv-empty.scss +71 -0
- package/src/settings/components/_vv-field.scss +111 -0
- package/src/settings/components/_vv-input-file.scss +8 -8
- package/src/settings/components/_vv-input-otp.scss +55 -0
- package/src/settings/components/_vv-input-range.scss +3 -3
- package/src/settings/components/_vv-input-text.scss +7 -7
- package/src/settings/components/_vv-item-group.scss +68 -0
- package/src/settings/components/_vv-item.scss +201 -0
- package/src/settings/components/_vv-kbd-group.scss +9 -0
- package/src/settings/components/_vv-kbd.scss +20 -0
- package/src/settings/components/_vv-marker.scss +32 -0
- package/src/settings/components/_vv-message-scroller.scss +65 -0
- package/src/settings/components/_vv-message.scss +95 -0
- package/src/settings/components/_vv-nav.scss +7 -3
- package/src/settings/components/_vv-pagination.scss +78 -0
- package/src/settings/components/_vv-popover.scss +53 -0
- package/src/settings/components/_vv-progress.scss +4 -4
- package/src/settings/components/_vv-prose.scss +274 -0
- package/src/settings/components/_vv-questionnaire.scss +77 -0
- package/src/settings/components/_vv-radio.scss +7 -3
- package/src/settings/components/_vv-select.scss +6 -6
- package/src/settings/components/_vv-separator.scss +79 -0
- package/src/settings/components/_vv-sidebar.scss +91 -0
- package/src/settings/components/_vv-spinner.scss +26 -0
- package/src/settings/components/_vv-table.scss +63 -0
- package/src/settings/components/_vv-text.scss +3 -3
- package/src/settings/components/_vv-textarea.scss +7 -7
- package/src/themes/dark/components/_vv-checkbox.scss +27 -0
- package/src/themes/dark/components/_vv-radio.scss +27 -0
- package/src/themes/dark/components/index.scss +2 -0
- package/src/themes/dark/props/_colors.scss +6 -0
- package/src/themes/dark/settings/_colors.scss +97 -32
- package/src/themes/dark/settings/_index.scss +2 -0
- package/src/themes/dark/settings/_input.scss +4 -8
- package/src/themes/dark/settings/components/_choice.scss +15 -0
- package/src/themes/dark/settings/components/_vv-alert.scss +6 -48
- package/src/themes/dark/settings/components/_vv-avatar.scss +1 -16
- package/src/themes/dark/settings/components/_vv-badge.scss +1 -32
- package/src/themes/dark/settings/components/_vv-button.scss +0 -15
- package/src/themes/dark/settings/components/_vv-checkbox.scss +7 -0
- package/src/themes/dark/settings/components/_vv-dropdown-action.scss +2 -3
- package/src/themes/dark/settings/components/_vv-dropdown-option.scss +2 -19
- package/src/themes/dark/settings/components/_vv-nav.scss +2 -15
- package/src/themes/dark/settings/components/_vv-radio.scss +7 -0
- package/src/tools/_functions.scss +430 -2
- package/src/tools/mixin-modules/_bem.scss +5 -39
- package/src/tools/mixin-modules/_states.scss +77 -0
- package/src/tools/mixin-modules/_theme.scss +135 -121
- package/src/utilities/colors.scss +49 -4
- package/src/utilities/layout.scss +25 -0
|
@@ -40,7 +40,7 @@ $vv-input-file: (
|
|
|
40
40
|
position: absolute,
|
|
41
41
|
height: var(--spacing-2),
|
|
42
42
|
inset: auto 0 0 0,
|
|
43
|
-
background: var(--color-brand),
|
|
43
|
+
background: var(--color-brand-graphic),
|
|
44
44
|
scale: 0 1,
|
|
45
45
|
transform-origin: left,
|
|
46
46
|
will-change: transform,
|
|
@@ -287,7 +287,7 @@ $vv-input-file: (
|
|
|
287
287
|
background-color: var(--color-surface-5),
|
|
288
288
|
),
|
|
289
289
|
focus-visible: (
|
|
290
|
-
outline: var(--spacing-px) solid var(--color-gray
|
|
290
|
+
outline: var(--spacing-px) solid var(--color-gray),
|
|
291
291
|
),
|
|
292
292
|
disabled: (
|
|
293
293
|
cursor: not-allowed,
|
|
@@ -336,13 +336,13 @@ $vv-input-file: (
|
|
|
336
336
|
),
|
|
337
337
|
),
|
|
338
338
|
hint: (
|
|
339
|
-
color: var(--input-valid-color),
|
|
339
|
+
color: var(--input-valid-text-color),
|
|
340
340
|
),
|
|
341
341
|
limit: (
|
|
342
|
-
color: var(--input-valid-color),
|
|
342
|
+
color: var(--input-valid-text-color),
|
|
343
343
|
),
|
|
344
344
|
icon-after: (
|
|
345
|
-
color: var(--input-valid-color),
|
|
345
|
+
color: var(--input-valid-text-color),
|
|
346
346
|
),
|
|
347
347
|
drop-area: (
|
|
348
348
|
pseudo: (
|
|
@@ -364,13 +364,13 @@ $vv-input-file: (
|
|
|
364
364
|
),
|
|
365
365
|
),
|
|
366
366
|
hint: (
|
|
367
|
-
color: var(--input-invalid-color),
|
|
367
|
+
color: var(--input-invalid-text-color),
|
|
368
368
|
),
|
|
369
369
|
limit: (
|
|
370
|
-
color: var(--input-invalid-color),
|
|
370
|
+
color: var(--input-invalid-text-color),
|
|
371
371
|
),
|
|
372
372
|
icon-after: (
|
|
373
|
-
color: var(--input-invalid-color),
|
|
373
|
+
color: var(--input-invalid-text-color),
|
|
374
374
|
),
|
|
375
375
|
drop-area: (
|
|
376
376
|
pseudo: (
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// A one-time code typed one character per slot: `slot` inputs side by side,
|
|
2
|
+
// optionally split into groups by a `separator`. Each slot is a text input of
|
|
3
|
+
// one character; moving the focus between them is behaviour and belongs to
|
|
4
|
+
// the script. The slots take the surface and the text of the fields of the
|
|
5
|
+
// library, a border so each reads as a box, and the focus of the library.
|
|
6
|
+
$vv-input-otp: (
|
|
7
|
+
display: inline-flex,
|
|
8
|
+
align-items: center,
|
|
9
|
+
gap: var(--spacing-8),
|
|
10
|
+
element: (
|
|
11
|
+
group: (
|
|
12
|
+
display: inline-flex,
|
|
13
|
+
gap: var(--spacing-6),
|
|
14
|
+
),
|
|
15
|
+
slot: (
|
|
16
|
+
inline-size: 2.5em,
|
|
17
|
+
block-size: 3em,
|
|
18
|
+
border: var(--border) solid var(--color-surface-4),
|
|
19
|
+
border-radius: var(--rounded-md),
|
|
20
|
+
background-color: var(--input-background-color),
|
|
21
|
+
color: var(--input-color),
|
|
22
|
+
font-size: var(--text-20),
|
|
23
|
+
font-variant-numeric: tabular-nums,
|
|
24
|
+
text-align: center,
|
|
25
|
+
caret-color: var(--color-brand-graphic),
|
|
26
|
+
transition: border-color var(--duration-150) var(--ease-out),
|
|
27
|
+
state: (
|
|
28
|
+
hover: (
|
|
29
|
+
border-color: var(--color-surface-5),
|
|
30
|
+
),
|
|
31
|
+
focus-visible: (
|
|
32
|
+
border-color: var(--color-brand-graphic),
|
|
33
|
+
outline: var(--spacing-px) solid var(--color-brand-graphic),
|
|
34
|
+
outline-offset: 0,
|
|
35
|
+
),
|
|
36
|
+
disabled: (
|
|
37
|
+
opacity: var(--opacity-50),
|
|
38
|
+
cursor: not-allowed,
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
),
|
|
42
|
+
separator: (
|
|
43
|
+
color: var(--color-word-4),
|
|
44
|
+
),
|
|
45
|
+
),
|
|
46
|
+
modifier: (
|
|
47
|
+
invalid: (
|
|
48
|
+
element: (
|
|
49
|
+
slot: (
|
|
50
|
+
border-color: var(--input-invalid-color),
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
),
|
|
54
|
+
),
|
|
55
|
+
) !default;
|
|
@@ -109,7 +109,7 @@ $vv-input-range: (
|
|
|
109
109
|
var(--input-range-thumb-shadow-hover),
|
|
110
110
|
),
|
|
111
111
|
focus-visible: (
|
|
112
|
-
outline: var(--border-2) solid var(--color-brand),
|
|
112
|
+
outline: var(--border-2) solid var(--color-brand-graphic),
|
|
113
113
|
outline-offset: var(--spacing-2),
|
|
114
114
|
),
|
|
115
115
|
disabled: (
|
|
@@ -155,7 +155,7 @@ $vv-input-range: (
|
|
|
155
155
|
--input-range-accent-color: var(--input-valid-color),
|
|
156
156
|
element: (
|
|
157
157
|
hint: (
|
|
158
|
-
color: var(--input-valid-color),
|
|
158
|
+
color: var(--input-valid-text-color),
|
|
159
159
|
),
|
|
160
160
|
value: (
|
|
161
161
|
border-color: var(--input-valid-color),
|
|
@@ -166,7 +166,7 @@ $vv-input-range: (
|
|
|
166
166
|
--input-range-accent-color: var(--input-invalid-color),
|
|
167
167
|
element: (
|
|
168
168
|
hint: (
|
|
169
|
-
color: var(--input-invalid-color),
|
|
169
|
+
color: var(--input-invalid-text-color),
|
|
170
170
|
),
|
|
171
171
|
value: (
|
|
172
172
|
border-color: var(--input-invalid-color),
|
|
@@ -43,7 +43,7 @@ $vv-input-text: (
|
|
|
43
43
|
position: absolute,
|
|
44
44
|
height: var(--spacing-2),
|
|
45
45
|
inset: auto 0 0 0,
|
|
46
|
-
background: var(--color-brand),
|
|
46
|
+
background: var(--color-brand-graphic),
|
|
47
47
|
scale: 0 1,
|
|
48
48
|
transform-origin: left,
|
|
49
49
|
will-change: transform,
|
|
@@ -252,13 +252,13 @@ $vv-input-text: (
|
|
|
252
252
|
),
|
|
253
253
|
),
|
|
254
254
|
hint: (
|
|
255
|
-
color: var(--input-valid-color),
|
|
255
|
+
color: var(--input-valid-text-color),
|
|
256
256
|
),
|
|
257
257
|
limit: (
|
|
258
|
-
color: var(--input-valid-color),
|
|
258
|
+
color: var(--input-valid-text-color),
|
|
259
259
|
),
|
|
260
260
|
icon-after: (
|
|
261
|
-
color: var(--input-valid-color),
|
|
261
|
+
color: var(--input-valid-text-color),
|
|
262
262
|
),
|
|
263
263
|
),
|
|
264
264
|
),
|
|
@@ -273,13 +273,13 @@ $vv-input-text: (
|
|
|
273
273
|
),
|
|
274
274
|
),
|
|
275
275
|
hint: (
|
|
276
|
-
color: var(--input-invalid-color),
|
|
276
|
+
color: var(--input-invalid-text-color),
|
|
277
277
|
),
|
|
278
278
|
limit: (
|
|
279
|
-
color: var(--input-invalid-color),
|
|
279
|
+
color: var(--input-invalid-text-color),
|
|
280
280
|
),
|
|
281
281
|
icon-after: (
|
|
282
|
-
color: var(--input-invalid-color),
|
|
282
|
+
color: var(--input-invalid-text-color),
|
|
283
283
|
),
|
|
284
284
|
),
|
|
285
285
|
),
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// A list of `vv-item` rows, with an optional header on top (the trail of a
|
|
2
|
+
// picker that walks a tree: a breadcrumb, or one button per level). It sets
|
|
3
|
+
// the four surfaces its rows read, so a modifier of the group restyles every
|
|
4
|
+
// row without touching them: the hairline between two rows, the hover, the
|
|
5
|
+
// chosen row and the current one.
|
|
6
|
+
$vv-item-group: (
|
|
7
|
+
--item-divider: var(--color-surface-2),
|
|
8
|
+
--item-hover: var(--color-surface-1),
|
|
9
|
+
--item-chosen: var(--color-surface-1),
|
|
10
|
+
--item-current: var(--color-surface-2),
|
|
11
|
+
display: flex,
|
|
12
|
+
flex-direction: column,
|
|
13
|
+
min-height: 0,
|
|
14
|
+
font-size: var(--text-14),
|
|
15
|
+
element: (
|
|
16
|
+
header: (
|
|
17
|
+
display: flex,
|
|
18
|
+
align-items: center,
|
|
19
|
+
gap: var(--spacing-4),
|
|
20
|
+
min-width: 0,
|
|
21
|
+
padding: var(--spacing-8) var(--spacing-12),
|
|
22
|
+
border-bottom: var(--border) solid var(--color-surface-4),
|
|
23
|
+
),
|
|
24
|
+
// Bounded, so the footer of a dialog stays in view: the rows scroll
|
|
25
|
+
// inside
|
|
26
|
+
list: (
|
|
27
|
+
display: flex,
|
|
28
|
+
flex-direction: column,
|
|
29
|
+
max-height: 20rem,
|
|
30
|
+
margin: 0,
|
|
31
|
+
padding: 0,
|
|
32
|
+
overflow-y: auto,
|
|
33
|
+
list-style: none,
|
|
34
|
+
),
|
|
35
|
+
),
|
|
36
|
+
modifier: (
|
|
37
|
+
// The hairline and the radius of the other frames of the library.
|
|
38
|
+
// Leave it off when the list already sits in a frame: a card, a panel.
|
|
39
|
+
framed: (
|
|
40
|
+
overflow: hidden,
|
|
41
|
+
border: var(--border) solid var(--color-surface-4),
|
|
42
|
+
border-radius: var(--rounded-lg),
|
|
43
|
+
),
|
|
44
|
+
// The list is the whole panel: it takes the height it is given and
|
|
45
|
+
// scrolls there. Rows the width of a page need a hairline one step
|
|
46
|
+
// deeper, or the line between two of them disappears into the ground.
|
|
47
|
+
fill: (
|
|
48
|
+
--item-divider: var(--color-surface-3),
|
|
49
|
+
flex: 1,
|
|
50
|
+
element: (
|
|
51
|
+
list: (
|
|
52
|
+
flex: 1,
|
|
53
|
+
min-height: 0,
|
|
54
|
+
max-height: none,
|
|
55
|
+
),
|
|
56
|
+
),
|
|
57
|
+
),
|
|
58
|
+
// Drawn on a ground that is already `surface-1`: hover and chosen step
|
|
59
|
+
// up, and the current row goes the other way, to the plain surface,
|
|
60
|
+
// so it is the one light row on a grey panel
|
|
61
|
+
raised: (
|
|
62
|
+
--item-divider: var(--color-surface-3),
|
|
63
|
+
--item-hover: var(--color-surface-2),
|
|
64
|
+
--item-chosen: var(--color-surface-2),
|
|
65
|
+
--item-current: var(--color-surface),
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
) !default;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// A row of a list: something to choose, to open, or to act on. The row holds
|
|
2
|
+
// an `entry`, the clickable part (a `<button>` or an `<a>`), and whatever sits
|
|
3
|
+
// beside it with a hit area of its own: `actions` for controls that act on the
|
|
4
|
+
// row, `open` for a divided area that opens a level while the entry chooses.
|
|
5
|
+
// A button cannot contain buttons, which is why the row is not the button.
|
|
6
|
+
|
|
7
|
+
// Selection is a step of surface, a step of weight on the title and a check,
|
|
8
|
+
// never a colour: the brand is left to the primary action around the list.
|
|
9
|
+
// Two different things are marked two different ways. `pressed-within` is the
|
|
10
|
+
// row being chosen in a picker (the entry carries `aria-pressed`); `current`
|
|
11
|
+
// is the row being looked at in a master list, marked by a bar along the
|
|
12
|
+
// inline start instead of a check, which there would read as a verdict.
|
|
13
|
+
|
|
14
|
+
// The four surfaces come from custom properties a `vv-item-group` sets, with a
|
|
15
|
+
// fallback at the point of use, so a row works outside a group too and a group
|
|
16
|
+
// drawn on a ground that is already `surface-1` only reassigns them (`raised`).
|
|
17
|
+
// Every declaration that reads one is plain, in brackets: a `var()` inside a
|
|
18
|
+
// generated custom property is substituted at the root, where the group's
|
|
19
|
+
// values do not reach. `inherit` is plain for a related reason: written into a
|
|
20
|
+
// custom property, a CSS-wide keyword applies to the property itself.
|
|
21
|
+
$vv-item: (
|
|
22
|
+
display: flex,
|
|
23
|
+
align-items: stretch,
|
|
24
|
+
// A floor, so a row holding a short name and one holding a wrapped title
|
|
25
|
+
// read as the same kind of thing. `flex-shrink: 0` keeps a list that is a
|
|
26
|
+
// bounded flex column from squeezing its rows under their content.
|
|
27
|
+
min-height: var(--spacing-40),
|
|
28
|
+
flex-shrink: 0,
|
|
29
|
+
color: var(--color-word-2),
|
|
30
|
+
[border-bottom]: var(--border) solid var(--item-divider, var(--color-surface-2)),
|
|
31
|
+
transition: background-color var(--duration-150) var(--ease-out),
|
|
32
|
+
element: (
|
|
33
|
+
entry: (
|
|
34
|
+
display: flex,
|
|
35
|
+
flex: 1,
|
|
36
|
+
align-items: center,
|
|
37
|
+
gap: var(--spacing-sm),
|
|
38
|
+
min-width: 0,
|
|
39
|
+
margin: 0,
|
|
40
|
+
padding: var(--spacing-8) var(--spacing-12),
|
|
41
|
+
border: 0,
|
|
42
|
+
background: none,
|
|
43
|
+
[color]: inherit,
|
|
44
|
+
[font]: inherit,
|
|
45
|
+
text-align: start,
|
|
46
|
+
text-decoration: none,
|
|
47
|
+
cursor: pointer,
|
|
48
|
+
state: (
|
|
49
|
+
// Inset, so the scrolling list around the row does not clip it
|
|
50
|
+
focus-visible: (
|
|
51
|
+
outline: var(--spacing-2) solid var(--color-brand-graphic),
|
|
52
|
+
outline-offset: calc(var(--spacing-2) * -1),
|
|
53
|
+
),
|
|
54
|
+
disabled: (
|
|
55
|
+
opacity: var(--opacity-30),
|
|
56
|
+
cursor: not-allowed,
|
|
57
|
+
),
|
|
58
|
+
),
|
|
59
|
+
),
|
|
60
|
+
media: (
|
|
61
|
+
display: flex,
|
|
62
|
+
flex-shrink: 0,
|
|
63
|
+
align-items: center,
|
|
64
|
+
justify-content: center,
|
|
65
|
+
color: var(--color-word-3),
|
|
66
|
+
),
|
|
67
|
+
content: (
|
|
68
|
+
display: flex,
|
|
69
|
+
flex: 1,
|
|
70
|
+
flex-direction: column,
|
|
71
|
+
min-width: 0,
|
|
72
|
+
),
|
|
73
|
+
title: (
|
|
74
|
+
flex: 1,
|
|
75
|
+
min-width: 0,
|
|
76
|
+
overflow: hidden,
|
|
77
|
+
color: var(--color-word-1),
|
|
78
|
+
text-overflow: ellipsis,
|
|
79
|
+
white-space: nowrap,
|
|
80
|
+
),
|
|
81
|
+
description: (
|
|
82
|
+
display: -webkit-box,
|
|
83
|
+
overflow: hidden,
|
|
84
|
+
color: var(--color-word-3),
|
|
85
|
+
font-size: var(--text-12),
|
|
86
|
+
line-height: var(--leading-normal),
|
|
87
|
+
-webkit-box-orient: vertical,
|
|
88
|
+
-webkit-line-clamp: 2,
|
|
89
|
+
),
|
|
90
|
+
// A quiet note at the end of the row: a status, "current"
|
|
91
|
+
note: (
|
|
92
|
+
flex-shrink: 0,
|
|
93
|
+
color: var(--color-word-3),
|
|
94
|
+
font-size: var(--text-12),
|
|
95
|
+
),
|
|
96
|
+
// The mark of the chosen row, in the row's own colour
|
|
97
|
+
check: (
|
|
98
|
+
flex-shrink: 0,
|
|
99
|
+
),
|
|
100
|
+
// The row opens a level
|
|
101
|
+
chevron: (
|
|
102
|
+
flex-shrink: 0,
|
|
103
|
+
color: var(--color-word-4),
|
|
104
|
+
),
|
|
105
|
+
// Controls that act on the row, inline with it and without a divider:
|
|
106
|
+
// a divided column is for opening a level (`open`), not for acting
|
|
107
|
+
actions: (
|
|
108
|
+
display: flex,
|
|
109
|
+
flex-shrink: 0,
|
|
110
|
+
align-items: center,
|
|
111
|
+
gap: var(--spacing-2),
|
|
112
|
+
padding-inline-end: var(--spacing-8),
|
|
113
|
+
),
|
|
114
|
+
open: (
|
|
115
|
+
display: flex,
|
|
116
|
+
align-items: center,
|
|
117
|
+
margin: 0,
|
|
118
|
+
padding: 0 var(--spacing-12),
|
|
119
|
+
border: 0,
|
|
120
|
+
[border-inline-start]: var(--border) solid var(--item-divider, var(--color-surface-2)),
|
|
121
|
+
background: none,
|
|
122
|
+
color: var(--color-word-3),
|
|
123
|
+
[font]: inherit,
|
|
124
|
+
cursor: pointer,
|
|
125
|
+
transition: color var(--duration-150) var(--ease-out),
|
|
126
|
+
state: (
|
|
127
|
+
hover: (
|
|
128
|
+
color: var(--color-word-1),
|
|
129
|
+
),
|
|
130
|
+
focus-visible: (
|
|
131
|
+
outline: var(--spacing-2) solid var(--color-brand-graphic),
|
|
132
|
+
outline-offset: calc(var(--spacing-2) * -1),
|
|
133
|
+
),
|
|
134
|
+
),
|
|
135
|
+
),
|
|
136
|
+
),
|
|
137
|
+
state: (
|
|
138
|
+
last-child: (
|
|
139
|
+
border-bottom-width: 0,
|
|
140
|
+
),
|
|
141
|
+
hover: (
|
|
142
|
+
[background-color]: var(--item-hover, var(--color-surface-1)),
|
|
143
|
+
),
|
|
144
|
+
// Declared after `hover`, so the chosen and the current row keep their
|
|
145
|
+
// surface under the pointer
|
|
146
|
+
pressed-within: (
|
|
147
|
+
[background-color]: var(--item-chosen, var(--color-surface-1)),
|
|
148
|
+
element: (
|
|
149
|
+
title: (
|
|
150
|
+
font-weight: var(--font-medium),
|
|
151
|
+
),
|
|
152
|
+
),
|
|
153
|
+
),
|
|
154
|
+
current: (
|
|
155
|
+
[background-color]: var(--item-current, var(--color-surface-2)),
|
|
156
|
+
// On the inline start: `--direction` is -1 in a right to left page
|
|
157
|
+
[box-shadow]: inset calc(var(--spacing-3) * var(--direction, 1)) 0 0 var(--color-word-2),
|
|
158
|
+
element: (
|
|
159
|
+
title: (
|
|
160
|
+
font-weight: var(--font-medium),
|
|
161
|
+
),
|
|
162
|
+
),
|
|
163
|
+
),
|
|
164
|
+
),
|
|
165
|
+
modifier: (
|
|
166
|
+
// More inside than an icon and a line of text: an avatar, a title
|
|
167
|
+
// over a description, a row of badges. The floor goes on the entry,
|
|
168
|
+
// which holds the content, and the row stretches to it.
|
|
169
|
+
roomy: (
|
|
170
|
+
element: (
|
|
171
|
+
entry: (
|
|
172
|
+
min-height: var(--spacing-56),
|
|
173
|
+
padding: var(--spacing-12) var(--spacing-md),
|
|
174
|
+
),
|
|
175
|
+
),
|
|
176
|
+
),
|
|
177
|
+
// Content several lines tall: the media and the control belong next
|
|
178
|
+
// to the first line, not halfway down the row
|
|
179
|
+
top: (
|
|
180
|
+
element: (
|
|
181
|
+
entry: (
|
|
182
|
+
align-items: flex-start,
|
|
183
|
+
),
|
|
184
|
+
),
|
|
185
|
+
),
|
|
186
|
+
// Nothing to click and nothing to choose: the row holds its own
|
|
187
|
+
// controls, or it is a skeleton standing in for a row still loading
|
|
188
|
+
plain: (
|
|
189
|
+
state: (
|
|
190
|
+
hover: (
|
|
191
|
+
[background-color]: transparent,
|
|
192
|
+
),
|
|
193
|
+
),
|
|
194
|
+
element: (
|
|
195
|
+
entry: (
|
|
196
|
+
cursor: default,
|
|
197
|
+
),
|
|
198
|
+
),
|
|
199
|
+
),
|
|
200
|
+
),
|
|
201
|
+
) !default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// The keys of a combination side by side, with what joins them (a `+`, a
|
|
2
|
+
// `then`) written in the markup between them
|
|
3
|
+
$vv-kbd-group: (
|
|
4
|
+
display: inline-flex,
|
|
5
|
+
align-items: center,
|
|
6
|
+
gap: 0.25em,
|
|
7
|
+
color: var(--color-word-4),
|
|
8
|
+
white-space: nowrap,
|
|
9
|
+
) !default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// A key of the keyboard, to name a shortcut: a cap drawn in the mono face,
|
|
2
|
+
// sized in `em` so it follows the text around it. A combination of keys is a
|
|
3
|
+
// `vv-kbd-group`, with whatever joins them written in the markup.
|
|
4
|
+
$vv-kbd: (
|
|
5
|
+
display: inline-flex,
|
|
6
|
+
align-items: center,
|
|
7
|
+
justify-content: center,
|
|
8
|
+
min-inline-size: 1.5em,
|
|
9
|
+
padding: 0.1em 0.4em,
|
|
10
|
+
border: var(--border) solid var(--color-surface-4),
|
|
11
|
+
border-bottom-width: var(--spacing-2),
|
|
12
|
+
border-radius: var(--rounded),
|
|
13
|
+
background-color: var(--color-surface-1),
|
|
14
|
+
color: var(--color-word-2),
|
|
15
|
+
font-family: var(--font-mono),
|
|
16
|
+
font-size: 0.8125em,
|
|
17
|
+
font-weight: var(--font-medium),
|
|
18
|
+
line-height: var(--leading-snug),
|
|
19
|
+
white-space: nowrap,
|
|
20
|
+
) !default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// A note inside a conversation that nobody says: an operator joined, the
|
|
2
|
+
// conversation was handed over, a tool ran. Quiet and centred, an optional
|
|
3
|
+
// `icon` beside the `content`. `bordered` frames it in a pill; a date between
|
|
4
|
+
// two days of messages is a `vv-separator` with a label.
|
|
5
|
+
$vv-marker: (
|
|
6
|
+
display: flex,
|
|
7
|
+
align-items: center,
|
|
8
|
+
justify-content: center,
|
|
9
|
+
gap: var(--spacing-6),
|
|
10
|
+
color: var(--color-word-3),
|
|
11
|
+
font-size: var(--text-12),
|
|
12
|
+
line-height: var(--leading-snug),
|
|
13
|
+
text-align: center,
|
|
14
|
+
element: (
|
|
15
|
+
icon: (
|
|
16
|
+
flex-shrink: 0,
|
|
17
|
+
),
|
|
18
|
+
content: (
|
|
19
|
+
min-width: 0,
|
|
20
|
+
),
|
|
21
|
+
),
|
|
22
|
+
modifier: (
|
|
23
|
+
bordered: (
|
|
24
|
+
width: fit-content,
|
|
25
|
+
margin-inline: auto,
|
|
26
|
+
padding: var(--spacing-2) var(--spacing-10),
|
|
27
|
+
border: var(--border) solid var(--color-surface-3),
|
|
28
|
+
border-radius: var(--rounded-full),
|
|
29
|
+
background-color: var(--color-surface),
|
|
30
|
+
),
|
|
31
|
+
),
|
|
32
|
+
) !default;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// The scrolling column of a conversation. It lays the messages out with the
|
|
2
|
+
// gap of a conversation and keeps the scroll inside itself; sticking to the
|
|
3
|
+
// latest message while a reply streams in is behaviour and belongs to the
|
|
4
|
+
// script that owns the list. `jump` is the button that goes back to the
|
|
5
|
+
// latest message, pinned to the bottom edge of the column without taking room
|
|
6
|
+
// in it; the script hides it with `hidden` when the reader is at the bottom,
|
|
7
|
+
// which a rule on the entry honours over the block's own `display`.
|
|
8
|
+
// `fade` dissolves the top and bottom edges into the surface.
|
|
9
|
+
$vv-message-scroller: (
|
|
10
|
+
display: flex,
|
|
11
|
+
flex-direction: column,
|
|
12
|
+
gap: var(--spacing-md),
|
|
13
|
+
min-height: 0,
|
|
14
|
+
overflow-y: auto,
|
|
15
|
+
overscroll-behavior: contain,
|
|
16
|
+
scrollbar-width: thin,
|
|
17
|
+
scrollbar-color: var(--color-word-5) transparent,
|
|
18
|
+
element: (
|
|
19
|
+
jump: (
|
|
20
|
+
position: sticky,
|
|
21
|
+
inset-block-end: var(--spacing-8),
|
|
22
|
+
align-self: center,
|
|
23
|
+
display: inline-grid,
|
|
24
|
+
flex-shrink: 0,
|
|
25
|
+
place-items: center,
|
|
26
|
+
inline-size: var(--spacing-36),
|
|
27
|
+
block-size: var(--spacing-36),
|
|
28
|
+
// Its own height and the gap before it, so it takes no room
|
|
29
|
+
margin-block-start: calc((var(--spacing-36) + var(--spacing-md)) * -1),
|
|
30
|
+
border: var(--border) solid var(--color-surface-3),
|
|
31
|
+
border-radius: var(--rounded-full),
|
|
32
|
+
background-color: var(--color-surface-1),
|
|
33
|
+
box-shadow: var(--shadow-md),
|
|
34
|
+
color: var(--color-word-2),
|
|
35
|
+
cursor: pointer,
|
|
36
|
+
transition: background-color var(--duration-150) var(--ease-out),
|
|
37
|
+
state: (
|
|
38
|
+
hover: (
|
|
39
|
+
background-color: var(--color-surface-2),
|
|
40
|
+
),
|
|
41
|
+
focus-visible: (
|
|
42
|
+
outline: var(--spacing-px) solid var(--color-brand-graphic),
|
|
43
|
+
outline-offset: var(--spacing-2),
|
|
44
|
+
),
|
|
45
|
+
),
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
modifier: (
|
|
49
|
+
// The button rises above the faded strip, or the mask would fade it too
|
|
50
|
+
fade: (
|
|
51
|
+
element: (
|
|
52
|
+
jump: (
|
|
53
|
+
inset-block-end: var(--spacing-48),
|
|
54
|
+
),
|
|
55
|
+
),
|
|
56
|
+
mask-image: linear-gradient(
|
|
57
|
+
to bottom,
|
|
58
|
+
transparent 0,
|
|
59
|
+
black var(--spacing-40),
|
|
60
|
+
black calc(100% - var(--spacing-40)),
|
|
61
|
+
transparent 100%
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
),
|
|
65
|
+
) !default;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// A row of a conversation: who says it, what is said, and what can be done
|
|
2
|
+
// with it. The row lays out an optional `avatar`, anchored to the last line,
|
|
3
|
+
// beside a `content` column that holds a `header` (the sender, a time), one or
|
|
4
|
+
// more `vv-bubble`, attachments or cards, and a `footer` (status, actions).
|
|
5
|
+
// The rows of the one reading are `end`: mirrored to the inline end.
|
|
6
|
+
// `meta` is metadata that shows on hover or focus only, and always on a
|
|
7
|
+
// device that cannot hover (see `src/components/vv-message.scss`).
|
|
8
|
+
$vv-message: (
|
|
9
|
+
display: flex,
|
|
10
|
+
align-items: flex-end,
|
|
11
|
+
gap: var(--spacing-sm),
|
|
12
|
+
max-width: 100%,
|
|
13
|
+
element: (
|
|
14
|
+
avatar: (
|
|
15
|
+
flex-shrink: 0,
|
|
16
|
+
),
|
|
17
|
+
content: (
|
|
18
|
+
display: flex,
|
|
19
|
+
flex-direction: column,
|
|
20
|
+
align-items: flex-start,
|
|
21
|
+
gap: var(--spacing-4),
|
|
22
|
+
min-width: 0,
|
|
23
|
+
max-width: min(100%, 48rem),
|
|
24
|
+
),
|
|
25
|
+
header: (
|
|
26
|
+
display: flex,
|
|
27
|
+
flex-wrap: wrap,
|
|
28
|
+
align-items: baseline,
|
|
29
|
+
gap: var(--spacing-8),
|
|
30
|
+
padding-inline: var(--spacing-4),
|
|
31
|
+
color: var(--color-word-3),
|
|
32
|
+
font-size: var(--text-12),
|
|
33
|
+
),
|
|
34
|
+
footer: (
|
|
35
|
+
display: flex,
|
|
36
|
+
flex-wrap: wrap,
|
|
37
|
+
align-items: center,
|
|
38
|
+
gap: var(--spacing-8),
|
|
39
|
+
color: var(--color-word-3),
|
|
40
|
+
font-size: var(--text-12),
|
|
41
|
+
),
|
|
42
|
+
meta: (
|
|
43
|
+
display: inline-flex,
|
|
44
|
+
align-items: center,
|
|
45
|
+
gap: var(--spacing-4),
|
|
46
|
+
font-variant-numeric: tabular-nums,
|
|
47
|
+
opacity: var(--opacity-0),
|
|
48
|
+
transition: opacity var(--duration-150) var(--ease-out),
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
state: (
|
|
52
|
+
hover: (
|
|
53
|
+
element: (
|
|
54
|
+
meta: (
|
|
55
|
+
opacity: var(--opacity-100),
|
|
56
|
+
),
|
|
57
|
+
),
|
|
58
|
+
),
|
|
59
|
+
focus-within: (
|
|
60
|
+
element: (
|
|
61
|
+
meta: (
|
|
62
|
+
opacity: var(--opacity-100),
|
|
63
|
+
),
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
),
|
|
67
|
+
modifier: (
|
|
68
|
+
end: (
|
|
69
|
+
flex-direction: row-reverse,
|
|
70
|
+
element: (
|
|
71
|
+
content: (
|
|
72
|
+
align-items: flex-end,
|
|
73
|
+
),
|
|
74
|
+
// Aligned to the end, not reversed: a reversed row would run the
|
|
75
|
+
// keyboard through its buttons against the order they are seen in
|
|
76
|
+
header: (
|
|
77
|
+
justify-content: flex-end,
|
|
78
|
+
),
|
|
79
|
+
footer: (
|
|
80
|
+
justify-content: flex-end,
|
|
81
|
+
),
|
|
82
|
+
),
|
|
83
|
+
),
|
|
84
|
+
// The content takes the whole row: an answer rendered as rich text,
|
|
85
|
+
// a card, a table
|
|
86
|
+
wide: (
|
|
87
|
+
element: (
|
|
88
|
+
content: (
|
|
89
|
+
flex: 1,
|
|
90
|
+
max-width: 100%,
|
|
91
|
+
),
|
|
92
|
+
),
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
) !default;
|
|
@@ -79,8 +79,12 @@ $vv-nav: (
|
|
|
79
79
|
hover: (
|
|
80
80
|
background-color: var(--color-surface-2),
|
|
81
81
|
),
|
|
82
|
+
// Inverted, so it reads on any surface a sidebar sits
|
|
83
|
+
// on and stays apart from a hovered voice; it comes
|
|
84
|
+
// after hover and active, which it wins over
|
|
82
85
|
current: (
|
|
83
|
-
|
|
86
|
+
color: var(--color-surface),
|
|
87
|
+
background-color: var(--color-word-1),
|
|
84
88
|
),
|
|
85
89
|
),
|
|
86
90
|
),
|
|
@@ -135,10 +139,10 @@ $vv-nav: (
|
|
|
135
139
|
white-space: nowrap,
|
|
136
140
|
state: (
|
|
137
141
|
hover: (
|
|
138
|
-
color: var(--color-brand),
|
|
142
|
+
color: var(--color-brand-readable),
|
|
139
143
|
),
|
|
140
144
|
current: (
|
|
141
|
-
color: var(--color-brand),
|
|
145
|
+
color: var(--color-brand-readable),
|
|
142
146
|
border-color: currentcolor,
|
|
143
147
|
background-color: color-mix(in srgb, var(--color-brand), transparent 95%),
|
|
144
148
|
),
|