@volverjs/style 0.1.29 → 0.1.30-beta.1
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 +49 -1
- package/src/_config.scss +23 -0
- package/src/_preflight.scss +14 -2
- 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 +9 -0
- 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 +17 -7
- package/src/settings/components/_vv-badge.scss +21 -13
- 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 +48 -5
- 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 +7 -2
- 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 +2 -1
- 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 +6 -6
- package/src/settings/components/_vv-input-otp.scss +55 -0
- package/src/settings/components/_vv-input-range.scss +2 -2
- package/src/settings/components/_vv-input-text.scss +6 -6
- 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 +6 -2
- package/src/settings/components/_vv-select.scss +5 -5
- 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 +2 -2
- package/src/settings/components/_vv-textarea.scss +6 -6
- 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/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 -8
- 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
|
@@ -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),
|
|
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),
|
|
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),
|
|
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
|
),
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Moving between the pages of a list or a table: a `<nav>` holding a list of
|
|
2
|
+
// page links or buttons, previous and next, an ellipsis where pages are
|
|
3
|
+
// skipped, and optionally a line that says where the reader is ("21-40 of
|
|
4
|
+
// 240"). The page being shown is read from `aria-current="page"`, the way a
|
|
5
|
+
// pagination marks it for assistive technology, so the markup states it once.
|
|
6
|
+
// A page that cannot be reached (previous on the first page) is a `disabled`
|
|
7
|
+
// button, or a link with `aria-disabled="true"` and no `href`: the
|
|
8
|
+
// `pointer-events: none` below stops the pointer only, the missing `href`
|
|
9
|
+
// takes the link out of the tab order.
|
|
10
|
+
$vv-pagination: (
|
|
11
|
+
display: flex,
|
|
12
|
+
flex-wrap: wrap,
|
|
13
|
+
align-items: center,
|
|
14
|
+
gap: var(--spacing-sm),
|
|
15
|
+
font-size: var(--text-14),
|
|
16
|
+
element: (
|
|
17
|
+
list: (
|
|
18
|
+
_alias: '> :is(ol, ul)',
|
|
19
|
+
display: flex,
|
|
20
|
+
flex-wrap: wrap,
|
|
21
|
+
align-items: center,
|
|
22
|
+
gap: var(--spacing-4),
|
|
23
|
+
margin: 0,
|
|
24
|
+
padding: 0,
|
|
25
|
+
list-style: none,
|
|
26
|
+
),
|
|
27
|
+
page: (
|
|
28
|
+
display: inline-flex,
|
|
29
|
+
align-items: center,
|
|
30
|
+
justify-content: center,
|
|
31
|
+
gap: 0.25em,
|
|
32
|
+
min-width: 2.25em,
|
|
33
|
+
height: 2.25em,
|
|
34
|
+
padding-inline: 0.5em,
|
|
35
|
+
border-radius: var(--rounded),
|
|
36
|
+
color: var(--color-word-2),
|
|
37
|
+
font-variant-numeric: tabular-nums,
|
|
38
|
+
text-decoration: none,
|
|
39
|
+
cursor: pointer,
|
|
40
|
+
transition: (
|
|
41
|
+
background-color var(--duration-150) var(--ease-out),
|
|
42
|
+
color var(--duration-150) var(--ease-out),
|
|
43
|
+
),
|
|
44
|
+
state: (
|
|
45
|
+
hover: (
|
|
46
|
+
background-color: var(--color-surface-2),
|
|
47
|
+
color: var(--color-word),
|
|
48
|
+
),
|
|
49
|
+
focus-visible: (
|
|
50
|
+
outline: var(--spacing-px) solid var(--color-brand),
|
|
51
|
+
outline-offset: var(--spacing-2),
|
|
52
|
+
),
|
|
53
|
+
current-page: (
|
|
54
|
+
background-color: var(--color-surface-2),
|
|
55
|
+
color: var(--color-word),
|
|
56
|
+
font-weight: var(--font-semibold),
|
|
57
|
+
),
|
|
58
|
+
disabled: (
|
|
59
|
+
opacity: var(--opacity-30),
|
|
60
|
+
cursor: not-allowed,
|
|
61
|
+
pointer-events: none,
|
|
62
|
+
),
|
|
63
|
+
),
|
|
64
|
+
),
|
|
65
|
+
ellipsis: (
|
|
66
|
+
display: inline-flex,
|
|
67
|
+
align-items: center,
|
|
68
|
+
justify-content: center,
|
|
69
|
+
min-width: 2.25em,
|
|
70
|
+
color: var(--color-word-4),
|
|
71
|
+
),
|
|
72
|
+
summary: (
|
|
73
|
+
color: var(--color-word-3),
|
|
74
|
+
font-size: var(--text-12),
|
|
75
|
+
font-variant-numeric: tabular-nums,
|
|
76
|
+
),
|
|
77
|
+
),
|
|
78
|
+
) !default;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// A floating panel for a short piece of content or a small form, on the
|
|
2
|
+
// Popover API: the element carries `popover`, the browser moves it to the top
|
|
3
|
+
// layer and shows it while it is open. The reset of the library unsets the
|
|
4
|
+
// fixed position the browser gives a popover, so the block puts it back, with
|
|
5
|
+
// the z-index of a popover for a panel shown without the top layer. Placing
|
|
6
|
+
// it next to its trigger is left to the script that opens it or to anchor
|
|
7
|
+
// positioning, which set its inset: without one the panel opens at the top
|
|
8
|
+
// left corner of the viewport, and `center` centres it instead.
|
|
9
|
+
// A panel opened on hover (a hover card) is the same block: the delay is
|
|
10
|
+
// behaviour and belongs to the script. `vv-dropdown` stays the menu and the
|
|
11
|
+
// list of options.
|
|
12
|
+
$vv-popover: (
|
|
13
|
+
position: fixed,
|
|
14
|
+
z-index: var(--z-popover),
|
|
15
|
+
inset: auto,
|
|
16
|
+
max-inline-size: min(20rem, calc(100vw - var(--spacing-32))),
|
|
17
|
+
max-block-size: calc(100dvh - var(--spacing-32)),
|
|
18
|
+
margin: 0,
|
|
19
|
+
padding: var(--spacing-sm),
|
|
20
|
+
overflow: auto,
|
|
21
|
+
border: var(--border) solid var(--color-surface-3),
|
|
22
|
+
border-radius: var(--rounded-lg),
|
|
23
|
+
background-color: var(--color-surface),
|
|
24
|
+
box-shadow: var(--shadow-lg),
|
|
25
|
+
color: var(--color-word-2),
|
|
26
|
+
font-size: var(--text-14),
|
|
27
|
+
line-height: var(--leading-normal),
|
|
28
|
+
element: (
|
|
29
|
+
title: (
|
|
30
|
+
margin: 0 0 var(--spacing-4),
|
|
31
|
+
color: var(--color-word-1),
|
|
32
|
+
font-size: var(--text-14),
|
|
33
|
+
font-weight: var(--font-semibold),
|
|
34
|
+
),
|
|
35
|
+
footer: (
|
|
36
|
+
display: flex,
|
|
37
|
+
flex-wrap: wrap,
|
|
38
|
+
justify-content: flex-end,
|
|
39
|
+
gap: var(--spacing-8),
|
|
40
|
+
margin-block-start: var(--spacing-sm),
|
|
41
|
+
),
|
|
42
|
+
),
|
|
43
|
+
modifier: (
|
|
44
|
+
// Centred in the viewport, as the browser shows a popover nobody
|
|
45
|
+
// places: for a panel opened by `popovertarget` alone
|
|
46
|
+
center: (
|
|
47
|
+
inset: 0,
|
|
48
|
+
inline-size: fit-content,
|
|
49
|
+
block-size: fit-content,
|
|
50
|
+
margin: auto,
|
|
51
|
+
),
|
|
52
|
+
),
|
|
53
|
+
) !default;
|
|
@@ -9,18 +9,18 @@ $vv-progress: (
|
|
|
9
9
|
border: var(--border-0),
|
|
10
10
|
border-radius: var(--rounded-full),
|
|
11
11
|
overflow: hidden,
|
|
12
|
-
color: var(--color-brand),
|
|
12
|
+
color: var(--color-brand-graphic),
|
|
13
13
|
background-color: var(--color-surface-2),
|
|
14
14
|
pseudo: (
|
|
15
15
|
-webkit-progress-bar: (
|
|
16
16
|
background-color: transparent,
|
|
17
17
|
),
|
|
18
18
|
-moz-progress-bar: (
|
|
19
|
-
background-color: var(--color-brand),
|
|
19
|
+
background-color: var(--color-brand-graphic),
|
|
20
20
|
transition: var(--transition-all),
|
|
21
21
|
),
|
|
22
22
|
-webkit-progress-value: (
|
|
23
|
-
background-color: var(--color-brand),
|
|
23
|
+
background-color: var(--color-brand-graphic),
|
|
24
24
|
transition: var(--transition-all),
|
|
25
25
|
),
|
|
26
26
|
),
|
|
@@ -29,7 +29,7 @@ $vv-progress: (
|
|
|
29
29
|
background: var(--color-surface-2)
|
|
30
30
|
linear-gradient(
|
|
31
31
|
to right,
|
|
32
|
-
var(--color-brand) 30%,
|
|
32
|
+
var(--color-brand-graphic) 30%,
|
|
33
33
|
var(--color-surface-2) 30%
|
|
34
34
|
)
|
|
35
35
|
top left/150% 150% no-repeat,
|