@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
|
@@ -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-graphic),
|
|
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,
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// A container for rich text that arrives as plain tags: rendered markdown,
|
|
2
|
+
// the output of an editor or a CMS. Every element is an alias on a bare tag
|
|
3
|
+
// inside the block, and a group of tags is one selector through `:is()`,
|
|
4
|
+
// since an `_alias` has to be a single selector. The BEM classes the
|
|
5
|
+
// generator emits next to the aliases are there if a tag needs one.
|
|
6
|
+
|
|
7
|
+
// The reset of the library unsets every property of every tag but its
|
|
8
|
+
// `display`, so the meaning of the inline tags (italic, struck, underlined,
|
|
9
|
+
// raised) is given back here, not only their look.
|
|
10
|
+
|
|
11
|
+
// Sizes are in `em`, not in the static steps of `vv-text`: rich text is set
|
|
12
|
+
// at 14px in a chat bubble and at 16px on a page, and the headings follow the
|
|
13
|
+
// text around them. The rhythm is a margin on every child after the first,
|
|
14
|
+
// so the block has no margin of its own at either end.
|
|
15
|
+
$vv-prose: (
|
|
16
|
+
line-height: var(--leading-normal),
|
|
17
|
+
overflow-wrap: break-word,
|
|
18
|
+
element: (
|
|
19
|
+
// Declared first: the rules below add space back where it belongs
|
|
20
|
+
child: (
|
|
21
|
+
_alias: '> *',
|
|
22
|
+
margin-block: 0,
|
|
23
|
+
),
|
|
24
|
+
flow: (
|
|
25
|
+
_alias: '> * + *',
|
|
26
|
+
margin-block-start: 0.75em,
|
|
27
|
+
),
|
|
28
|
+
// Markdown wraps content in these too: two paragraphs in a quote, a
|
|
29
|
+
// loose list item, a disclosure
|
|
30
|
+
nested-flow: (
|
|
31
|
+
_alias: ':is(blockquote, details, td, th) > * + *',
|
|
32
|
+
margin-block-start: 0.75em,
|
|
33
|
+
),
|
|
34
|
+
item-nested-flow: (
|
|
35
|
+
_alias: 'li > * + *',
|
|
36
|
+
margin-block-start: 0.25em,
|
|
37
|
+
),
|
|
38
|
+
heading: (
|
|
39
|
+
_alias: ':is(h1, h2, h3, h4, h5, h6)',
|
|
40
|
+
color: var(--color-word),
|
|
41
|
+
font-weight: var(--font-semibold),
|
|
42
|
+
line-height: var(--leading-tight),
|
|
43
|
+
text-wrap: balance,
|
|
44
|
+
),
|
|
45
|
+
// A heading opens a section: more room above it than between two
|
|
46
|
+
// paragraphs
|
|
47
|
+
heading-flow: (
|
|
48
|
+
_alias: '> * + :is(h1, h2, h3, h4, h5, h6)',
|
|
49
|
+
margin-block-start: 1.5em,
|
|
50
|
+
),
|
|
51
|
+
h1: (
|
|
52
|
+
_alias: 'h1',
|
|
53
|
+
font-size: 1.5em,
|
|
54
|
+
),
|
|
55
|
+
h2: (
|
|
56
|
+
_alias: 'h2',
|
|
57
|
+
font-size: 1.25em,
|
|
58
|
+
),
|
|
59
|
+
h3: (
|
|
60
|
+
_alias: 'h3',
|
|
61
|
+
font-size: 1.125em,
|
|
62
|
+
),
|
|
63
|
+
h4: (
|
|
64
|
+
_alias: ':is(h4, h5, h6)',
|
|
65
|
+
font-size: 1em,
|
|
66
|
+
),
|
|
67
|
+
link: (
|
|
68
|
+
_alias: 'a',
|
|
69
|
+
color: var(--color-brand-readable),
|
|
70
|
+
text-decoration: underline,
|
|
71
|
+
text-underline-offset: 0.2em,
|
|
72
|
+
state: (
|
|
73
|
+
hover: (
|
|
74
|
+
text-decoration-thickness: 2px,
|
|
75
|
+
),
|
|
76
|
+
focus-visible: (
|
|
77
|
+
outline: var(--spacing-px) solid var(--color-brand-graphic),
|
|
78
|
+
outline-offset: var(--spacing-2),
|
|
79
|
+
),
|
|
80
|
+
),
|
|
81
|
+
),
|
|
82
|
+
strong: (
|
|
83
|
+
_alias: ':is(b, strong)',
|
|
84
|
+
font-weight: var(--font-semibold),
|
|
85
|
+
),
|
|
86
|
+
emphasis: (
|
|
87
|
+
_alias: ':is(em, i, cite, dfn, var)',
|
|
88
|
+
font-style: italic,
|
|
89
|
+
),
|
|
90
|
+
strike: (
|
|
91
|
+
_alias: ':is(del, s)',
|
|
92
|
+
text-decoration: line-through,
|
|
93
|
+
),
|
|
94
|
+
underline: (
|
|
95
|
+
_alias: ':is(ins, u)',
|
|
96
|
+
text-decoration: underline,
|
|
97
|
+
),
|
|
98
|
+
abbr: (
|
|
99
|
+
_alias: 'abbr[title]',
|
|
100
|
+
text-decoration: underline dotted,
|
|
101
|
+
cursor: help,
|
|
102
|
+
),
|
|
103
|
+
small: (
|
|
104
|
+
_alias: 'small',
|
|
105
|
+
font-size: 0.875em,
|
|
106
|
+
),
|
|
107
|
+
mark: (
|
|
108
|
+
_alias: 'mark',
|
|
109
|
+
padding-inline: 0.1em,
|
|
110
|
+
background-color: var(--color-surface-warning),
|
|
111
|
+
),
|
|
112
|
+
script: (
|
|
113
|
+
_alias: ':is(sub, sup)',
|
|
114
|
+
position: relative,
|
|
115
|
+
font-size: 0.75em,
|
|
116
|
+
line-height: 0,
|
|
117
|
+
),
|
|
118
|
+
sub: (
|
|
119
|
+
_alias: 'sub',
|
|
120
|
+
bottom: -0.25em,
|
|
121
|
+
),
|
|
122
|
+
sup: (
|
|
123
|
+
_alias: 'sup',
|
|
124
|
+
top: -0.5em,
|
|
125
|
+
),
|
|
126
|
+
kbd: (
|
|
127
|
+
_alias: 'kbd',
|
|
128
|
+
padding: 0.1em 0.35em,
|
|
129
|
+
border: var(--border) solid var(--color-surface-4),
|
|
130
|
+
border-bottom-width: var(--spacing-2),
|
|
131
|
+
border-radius: var(--rounded),
|
|
132
|
+
font-family: var(--font-mono),
|
|
133
|
+
font-size: 0.875em,
|
|
134
|
+
),
|
|
135
|
+
list: (
|
|
136
|
+
_alias: ':is(ul, ol)',
|
|
137
|
+
padding-inline-start: 1.5em,
|
|
138
|
+
),
|
|
139
|
+
ul: (
|
|
140
|
+
_alias: 'ul',
|
|
141
|
+
list-style-type: disc,
|
|
142
|
+
),
|
|
143
|
+
ol: (
|
|
144
|
+
_alias: 'ol',
|
|
145
|
+
list-style-type: decimal,
|
|
146
|
+
),
|
|
147
|
+
item-flow: (
|
|
148
|
+
_alias: 'li + li',
|
|
149
|
+
margin-block-start: 0.25em,
|
|
150
|
+
),
|
|
151
|
+
nested-list: (
|
|
152
|
+
_alias: 'li > :is(ul, ol)',
|
|
153
|
+
margin-block-start: 0.25em,
|
|
154
|
+
),
|
|
155
|
+
// The checkbox of a task list item, which the reset leaves with no
|
|
156
|
+
// appearance and no size
|
|
157
|
+
task: (
|
|
158
|
+
_alias: "li > input[type='checkbox']",
|
|
159
|
+
appearance: auto,
|
|
160
|
+
margin-inline-end: 0.5em,
|
|
161
|
+
vertical-align: middle,
|
|
162
|
+
),
|
|
163
|
+
dt: (
|
|
164
|
+
_alias: 'dt',
|
|
165
|
+
font-weight: var(--font-semibold),
|
|
166
|
+
),
|
|
167
|
+
dd: (
|
|
168
|
+
_alias: 'dd',
|
|
169
|
+
margin-inline-start: 1.5em,
|
|
170
|
+
),
|
|
171
|
+
blockquote: (
|
|
172
|
+
_alias: 'blockquote',
|
|
173
|
+
margin-inline: 0,
|
|
174
|
+
padding-inline-start: 1em,
|
|
175
|
+
border-inline-start: var(--spacing-4) solid var(--color-surface-3),
|
|
176
|
+
color: var(--color-word-3),
|
|
177
|
+
),
|
|
178
|
+
code: (
|
|
179
|
+
_alias: ':not(pre) > code',
|
|
180
|
+
padding: 0.1em 0.3em,
|
|
181
|
+
border-radius: var(--rounded),
|
|
182
|
+
background-color: var(--color-surface-1),
|
|
183
|
+
font-family: var(--font-mono),
|
|
184
|
+
font-size: 0.875em,
|
|
185
|
+
),
|
|
186
|
+
pre: (
|
|
187
|
+
_alias: 'pre',
|
|
188
|
+
overflow: auto,
|
|
189
|
+
padding: 0.75em 1em,
|
|
190
|
+
border: var(--border) solid var(--color-surface-3),
|
|
191
|
+
border-radius: var(--rounded-md),
|
|
192
|
+
background-color: var(--color-surface-1),
|
|
193
|
+
font-family: var(--font-mono),
|
|
194
|
+
font-size: 0.875em,
|
|
195
|
+
line-height: var(--leading-snug),
|
|
196
|
+
white-space: pre,
|
|
197
|
+
),
|
|
198
|
+
table: (
|
|
199
|
+
_alias: 'table',
|
|
200
|
+
width: 100%,
|
|
201
|
+
border-collapse: collapse,
|
|
202
|
+
font-size: 0.875em,
|
|
203
|
+
),
|
|
204
|
+
cell: (
|
|
205
|
+
_alias: ':is(th, td)',
|
|
206
|
+
padding: 0.375em 0.625em,
|
|
207
|
+
border: var(--border) solid var(--color-surface-3),
|
|
208
|
+
text-align: start,
|
|
209
|
+
vertical-align: top,
|
|
210
|
+
),
|
|
211
|
+
th: (
|
|
212
|
+
_alias: 'th',
|
|
213
|
+
background-color: var(--color-surface-1),
|
|
214
|
+
font-weight: var(--font-semibold),
|
|
215
|
+
),
|
|
216
|
+
hr: (
|
|
217
|
+
_alias: 'hr',
|
|
218
|
+
margin-block: 1.5em,
|
|
219
|
+
border: 0,
|
|
220
|
+
border-block-start: var(--border) solid var(--color-surface-3),
|
|
221
|
+
),
|
|
222
|
+
img: (
|
|
223
|
+
_alias: 'img',
|
|
224
|
+
max-width: 100%,
|
|
225
|
+
height: auto,
|
|
226
|
+
border-radius: var(--rounded-md),
|
|
227
|
+
),
|
|
228
|
+
details: (
|
|
229
|
+
_alias: 'details',
|
|
230
|
+
padding: 0.5em 0.75em,
|
|
231
|
+
border: var(--border) solid var(--color-surface-3),
|
|
232
|
+
border-radius: var(--rounded-md),
|
|
233
|
+
background-color: var(--color-surface-1),
|
|
234
|
+
),
|
|
235
|
+
summary: (
|
|
236
|
+
_alias: 'summary',
|
|
237
|
+
font-weight: var(--font-semibold),
|
|
238
|
+
cursor: pointer,
|
|
239
|
+
),
|
|
240
|
+
summary-open: (
|
|
241
|
+
_alias: 'details[open] > summary',
|
|
242
|
+
margin-block-end: 0.5em,
|
|
243
|
+
),
|
|
244
|
+
),
|
|
245
|
+
modifier: (
|
|
246
|
+
// Rich text at the density of a field or a list: headings at the size
|
|
247
|
+
// of the text, the gaps halved
|
|
248
|
+
compact: (
|
|
249
|
+
element: (
|
|
250
|
+
flow: (
|
|
251
|
+
margin-block-start: 0.375em,
|
|
252
|
+
),
|
|
253
|
+
heading-flow: (
|
|
254
|
+
margin-block-start: 0.75em,
|
|
255
|
+
),
|
|
256
|
+
h1: (
|
|
257
|
+
font-size: 1em,
|
|
258
|
+
),
|
|
259
|
+
h2: (
|
|
260
|
+
font-size: 1em,
|
|
261
|
+
),
|
|
262
|
+
h3: (
|
|
263
|
+
font-size: 1em,
|
|
264
|
+
),
|
|
265
|
+
item-flow: (
|
|
266
|
+
margin-block-start: 0,
|
|
267
|
+
),
|
|
268
|
+
hr: (
|
|
269
|
+
margin-block: 0.75em,
|
|
270
|
+
),
|
|
271
|
+
),
|
|
272
|
+
),
|
|
273
|
+
),
|
|
274
|
+
) !default;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Questions asked one step at a time, in a conversation or a panel: a
|
|
2
|
+
// `header` with the title of the set, a `progress` bar, the `item` being
|
|
3
|
+
// asked (a `title`, a `description`, the choices, an `error`) and the
|
|
4
|
+
// `actions` that move between steps. The choices are fields of the library:
|
|
5
|
+
// `vv-radio--card` or `vv-checkbox--card` for a single or a multiple choice,
|
|
6
|
+
// a text field for a free answer.
|
|
7
|
+
// The share of the steps done is `--questionnaire-progress`, set on the block
|
|
8
|
+
// (`style="--questionnaire-progress: 40%"`) and read by a plain declaration.
|
|
9
|
+
// The title and the description space themselves with a margin, not the item
|
|
10
|
+
// with a gap: a choice keeps them inside its fieldset, as the `legend` and a
|
|
11
|
+
// paragraph, where a gap of the item would not reach. The description sits
|
|
12
|
+
// close under the title (see `src/components/vv-questionnaire.scss`).
|
|
13
|
+
$vv-questionnaire: (
|
|
14
|
+
display: flex,
|
|
15
|
+
flex-direction: column,
|
|
16
|
+
overflow: hidden,
|
|
17
|
+
border: var(--border) solid var(--color-surface-3),
|
|
18
|
+
border-radius: var(--rounded-xl),
|
|
19
|
+
background-color: var(--color-surface),
|
|
20
|
+
element: (
|
|
21
|
+
// A heading, in the markup
|
|
22
|
+
header: (
|
|
23
|
+
display: flex,
|
|
24
|
+
align-items: center,
|
|
25
|
+
gap: var(--spacing-8),
|
|
26
|
+
margin: 0,
|
|
27
|
+
padding: var(--spacing-10) var(--spacing-sm),
|
|
28
|
+
font-size: var(--text-16),
|
|
29
|
+
color: var(--color-word-1),
|
|
30
|
+
font-weight: var(--font-semibold),
|
|
31
|
+
),
|
|
32
|
+
progress: (
|
|
33
|
+
position: relative,
|
|
34
|
+
block-size: var(--spacing-4),
|
|
35
|
+
overflow: hidden,
|
|
36
|
+
background-color: var(--color-surface-3),
|
|
37
|
+
pseudo: (
|
|
38
|
+
after: (
|
|
39
|
+
position: absolute,
|
|
40
|
+
inset-block: 0,
|
|
41
|
+
inset-inline-start: 0,
|
|
42
|
+
background-color: var(--color-word-4),
|
|
43
|
+
transition: inline-size var(--duration-300) var(--ease-out),
|
|
44
|
+
[inline-size]: var(--questionnaire-progress, 0%),
|
|
45
|
+
),
|
|
46
|
+
),
|
|
47
|
+
),
|
|
48
|
+
item: (
|
|
49
|
+
display: flex,
|
|
50
|
+
flex-direction: column,
|
|
51
|
+
padding: var(--spacing-16) var(--spacing-sm),
|
|
52
|
+
),
|
|
53
|
+
title: (
|
|
54
|
+
margin: 0 0 var(--spacing-12),
|
|
55
|
+
color: var(--color-word-1),
|
|
56
|
+
font-weight: var(--font-semibold),
|
|
57
|
+
),
|
|
58
|
+
description: (
|
|
59
|
+
margin: 0 0 var(--spacing-12),
|
|
60
|
+
color: var(--color-word-3),
|
|
61
|
+
font-size: var(--text-14),
|
|
62
|
+
),
|
|
63
|
+
error: (
|
|
64
|
+
color: var(--color-danger-readable),
|
|
65
|
+
font-size: var(--text-12),
|
|
66
|
+
),
|
|
67
|
+
actions: (
|
|
68
|
+
display: flex,
|
|
69
|
+
flex-wrap: wrap,
|
|
70
|
+
align-items: center,
|
|
71
|
+
justify-content: flex-end,
|
|
72
|
+
gap: var(--spacing-8),
|
|
73
|
+
padding: var(--spacing-10) var(--spacing-sm),
|
|
74
|
+
border-top: var(--border) solid var(--color-surface-3),
|
|
75
|
+
),
|
|
76
|
+
),
|
|
77
|
+
) !default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'choice' as *;
|
|
2
|
+
|
|
1
3
|
$vv-radio: (
|
|
2
4
|
display: inline-flex,
|
|
3
5
|
flex-wrap: wrap,
|
|
@@ -21,6 +23,8 @@ $vv-radio: (
|
|
|
21
23
|
),
|
|
22
24
|
),
|
|
23
25
|
modifier: (
|
|
26
|
+
segment: $choice-segment,
|
|
27
|
+
card: $choice-card,
|
|
24
28
|
readonly: (
|
|
25
29
|
opacity: var(--opacity-100),
|
|
26
30
|
cursor: default,
|
|
@@ -29,14 +33,14 @@ $vv-radio: (
|
|
|
29
33
|
valid: (
|
|
30
34
|
element: (
|
|
31
35
|
hint: (
|
|
32
|
-
color: var(--input-valid-color),
|
|
36
|
+
color: var(--input-valid-text-color),
|
|
33
37
|
),
|
|
34
38
|
),
|
|
35
39
|
),
|
|
36
40
|
invalid: (
|
|
37
41
|
element: (
|
|
38
42
|
hint: (
|
|
39
|
-
color: var(--input-invalid-color),
|
|
43
|
+
color: var(--input-invalid-text-color),
|
|
40
44
|
),
|
|
41
45
|
),
|
|
42
46
|
),
|
|
@@ -92,7 +96,7 @@ $vv-radio: (
|
|
|
92
96
|
),
|
|
93
97
|
),
|
|
94
98
|
focus-visible: (
|
|
95
|
-
outline: var(--spacing-px) solid var(--color-brand),
|
|
99
|
+
outline: var(--spacing-px) solid var(--color-brand-graphic),
|
|
96
100
|
outline-offset: var(--spacing-2),
|
|
97
101
|
),
|
|
98
102
|
),
|
|
@@ -45,7 +45,7 @@ $vv-select: (
|
|
|
45
45
|
position: absolute,
|
|
46
46
|
height: var(--spacing-2),
|
|
47
47
|
inset: auto 0 0 0,
|
|
48
|
-
background: var(--color-brand),
|
|
48
|
+
background: var(--color-brand-graphic),
|
|
49
49
|
scale: 0 1,
|
|
50
50
|
transform-origin: left,
|
|
51
51
|
will-change: transform,
|
|
@@ -243,7 +243,7 @@ $vv-select: (
|
|
|
243
243
|
color: var(--input-color),
|
|
244
244
|
state: (
|
|
245
245
|
checked: (
|
|
246
|
-
color: var(--color-brand),
|
|
246
|
+
color: var(--color-surface-brand-readable),
|
|
247
247
|
background-color: var(--color-surface-brand),
|
|
248
248
|
),
|
|
249
249
|
disabled: (
|
|
@@ -270,10 +270,10 @@ $vv-select: (
|
|
|
270
270
|
),
|
|
271
271
|
),
|
|
272
272
|
hint: (
|
|
273
|
-
color: var(--input-valid-color),
|
|
273
|
+
color: var(--input-valid-text-color),
|
|
274
274
|
),
|
|
275
275
|
icon-after: (
|
|
276
|
-
color: var(--input-valid-color),
|
|
276
|
+
color: var(--input-valid-text-color),
|
|
277
277
|
),
|
|
278
278
|
),
|
|
279
279
|
),
|
|
@@ -288,10 +288,10 @@ $vv-select: (
|
|
|
288
288
|
),
|
|
289
289
|
),
|
|
290
290
|
hint: (
|
|
291
|
-
color: var(--input-invalid-color),
|
|
291
|
+
color: var(--input-invalid-text-color),
|
|
292
292
|
),
|
|
293
293
|
icon-after: (
|
|
294
|
-
color: var(--input-invalid-color),
|
|
294
|
+
color: var(--input-invalid-text-color),
|
|
295
295
|
),
|
|
296
296
|
),
|
|
297
297
|
),
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// A hairline between two groups of content, with an optional label on it
|
|
2
|
+
// ("or", a date). The two halves of the line are the `::before` and `::after`
|
|
3
|
+
// of the block, either side of the label, so a long label wraps and the
|
|
4
|
+
// separator takes its own height instead of overlapping what is around it.
|
|
5
|
+
// The generator gives both pseudo elements their empty `content`.
|
|
6
|
+
|
|
7
|
+
// Each half keeps at least 16px and never shrinks, so a label too long for
|
|
8
|
+
// the row wraps instead of squeezing the line out of sight.
|
|
9
|
+
|
|
10
|
+
// The space around the label is its own padding, not a `gap` on the block:
|
|
11
|
+
// without a label the halves have to meet, and `:empty` cannot tell, since
|
|
12
|
+
// a single space or line break inside the block is enough to defeat it.
|
|
13
|
+
|
|
14
|
+
// The line takes the colour of the block's `border-color`, which the block
|
|
15
|
+
// never draws itself (it has no border of its own): override that one colour
|
|
16
|
+
// and both halves follow. `inherit` goes through a plain declaration, in
|
|
17
|
+
// brackets: written into a custom property, a CSS-wide keyword applies to the
|
|
18
|
+
// custom property itself, at the root, and the halves would fall back to
|
|
19
|
+
// `currentcolor`.
|
|
20
|
+
$vv-separator: (
|
|
21
|
+
display: flex,
|
|
22
|
+
align-items: center,
|
|
23
|
+
margin: var(--spacing-0),
|
|
24
|
+
border: var(--border-0),
|
|
25
|
+
border-color: var(--color-surface-3),
|
|
26
|
+
color: var(--color-word-3),
|
|
27
|
+
font-size: var(--text-12),
|
|
28
|
+
line-height: var(--leading-snug),
|
|
29
|
+
text-transform: uppercase,
|
|
30
|
+
pseudo: (
|
|
31
|
+
before: (
|
|
32
|
+
flex: 1 0 var(--spacing-16),
|
|
33
|
+
border-block-start: var(--border) solid,
|
|
34
|
+
[border-color]: inherit,
|
|
35
|
+
),
|
|
36
|
+
after: (
|
|
37
|
+
flex: 1 0 var(--spacing-16),
|
|
38
|
+
border-block-start: var(--border) solid,
|
|
39
|
+
[border-color]: inherit,
|
|
40
|
+
),
|
|
41
|
+
),
|
|
42
|
+
element: (
|
|
43
|
+
label: (
|
|
44
|
+
_alias: '> span',
|
|
45
|
+
min-width: 0,
|
|
46
|
+
padding-inline: var(--spacing-8),
|
|
47
|
+
text-align: center,
|
|
48
|
+
),
|
|
49
|
+
),
|
|
50
|
+
modifier: (
|
|
51
|
+
// Between two items of a row: the halves stand up and the block
|
|
52
|
+
// stretches to the height of the row. They drop the 16px floor, which
|
|
53
|
+
// would make a row of text taller than its text.
|
|
54
|
+
vertical: (
|
|
55
|
+
flex-direction: column,
|
|
56
|
+
align-self: stretch,
|
|
57
|
+
pseudo: (
|
|
58
|
+
before: (
|
|
59
|
+
flex: 1,
|
|
60
|
+
border-block-start: var(--border-0),
|
|
61
|
+
border-inline-start: var(--border) solid,
|
|
62
|
+
[border-color]: inherit,
|
|
63
|
+
),
|
|
64
|
+
after: (
|
|
65
|
+
flex: 1,
|
|
66
|
+
border-block-start: var(--border-0),
|
|
67
|
+
border-inline-start: var(--border) solid,
|
|
68
|
+
[border-color]: inherit,
|
|
69
|
+
),
|
|
70
|
+
),
|
|
71
|
+
element: (
|
|
72
|
+
label: (
|
|
73
|
+
padding-block: var(--spacing-8),
|
|
74
|
+
padding-inline: var(--spacing-0),
|
|
75
|
+
),
|
|
76
|
+
),
|
|
77
|
+
),
|
|
78
|
+
),
|
|
79
|
+
) !default;
|