@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.
Files changed (158) hide show
  1. package/design-tokens.json +503 -7
  2. package/dist/base.css +1 -1
  3. package/dist/components/vv-alert.css +1 -1
  4. package/dist/components/vv-attachment-group.css +1 -0
  5. package/dist/components/vv-attachment.css +1 -0
  6. package/dist/components/vv-avatar.css +1 -1
  7. package/dist/components/vv-badge.css +1 -1
  8. package/dist/components/vv-breadcrumb.css +1 -1
  9. package/dist/components/vv-bubble-group.css +1 -0
  10. package/dist/components/vv-bubble.css +1 -0
  11. package/dist/components/vv-button.css +1 -1
  12. package/dist/components/vv-calendar.css +1 -0
  13. package/dist/components/vv-checkbox-group.css +1 -1
  14. package/dist/components/vv-checkbox.css +1 -1
  15. package/dist/components/vv-command.css +1 -0
  16. package/dist/components/vv-dialog.css +1 -1
  17. package/dist/components/vv-dropdown-action.css +1 -1
  18. package/dist/components/vv-dropdown-option.css +1 -1
  19. package/dist/components/vv-empty.css +1 -0
  20. package/dist/components/vv-field.css +1 -0
  21. package/dist/components/vv-input-file.css +1 -1
  22. package/dist/components/vv-input-otp.css +1 -0
  23. package/dist/components/vv-input-range.css +1 -1
  24. package/dist/components/vv-input-text.css +1 -1
  25. package/dist/components/vv-item-group.css +1 -0
  26. package/dist/components/vv-item.css +1 -0
  27. package/dist/components/vv-kbd-group.css +1 -0
  28. package/dist/components/vv-kbd.css +1 -0
  29. package/dist/components/vv-marker.css +1 -0
  30. package/dist/components/vv-message-scroller.css +1 -0
  31. package/dist/components/vv-message.css +1 -0
  32. package/dist/components/vv-nav.css +1 -1
  33. package/dist/components/vv-pagination.css +1 -0
  34. package/dist/components/vv-popover.css +1 -0
  35. package/dist/components/vv-progress.css +1 -1
  36. package/dist/components/vv-prose.css +1 -0
  37. package/dist/components/vv-questionnaire.css +1 -0
  38. package/dist/components/vv-radio-group.css +1 -1
  39. package/dist/components/vv-radio.css +1 -1
  40. package/dist/components/vv-select.css +1 -1
  41. package/dist/components/vv-separator.css +1 -0
  42. package/dist/components/vv-sidebar.css +1 -0
  43. package/dist/components/vv-spinner.css +1 -0
  44. package/dist/components/vv-table.css +1 -1
  45. package/dist/components/vv-text.css +1 -1
  46. package/dist/components/vv-textarea.css +1 -1
  47. package/dist/components.css +1 -1
  48. package/dist/export.css +1 -1
  49. package/dist/props/colors.css +1 -1
  50. package/dist/props/input.css +1 -1
  51. package/dist/props.css +1 -1
  52. package/dist/themes/dark/components.css +1 -1
  53. package/dist/themes/dark/props.css +1 -1
  54. package/dist/themes/dark/volver.css +1 -1
  55. package/dist/utilities/colors.css +1 -1
  56. package/dist/utilities/layout.css +1 -1
  57. package/dist/utilities.css +1 -1
  58. package/dist/volver.css +1 -1
  59. package/package.json +64 -16
  60. package/src/_config.scss +23 -0
  61. package/src/_preflight.scss +14 -2
  62. package/src/base.scss +1 -1
  63. package/src/components/index.scss +28 -0
  64. package/src/components/vv-attachment-group.scss +17 -0
  65. package/src/components/vv-attachment.scss +17 -0
  66. package/src/components/vv-bubble-group.scss +17 -0
  67. package/src/components/vv-bubble.scss +17 -0
  68. package/src/components/vv-calendar.scss +25 -0
  69. package/src/components/vv-command.scss +17 -0
  70. package/src/components/vv-empty.scss +17 -0
  71. package/src/components/vv-field.scss +25 -0
  72. package/src/components/vv-input-otp.scss +17 -0
  73. package/src/components/vv-item-group.scss +17 -0
  74. package/src/components/vv-item.scss +39 -0
  75. package/src/components/vv-kbd-group.scss +17 -0
  76. package/src/components/vv-kbd.scss +17 -0
  77. package/src/components/vv-marker.scss +17 -0
  78. package/src/components/vv-message-scroller.scss +24 -0
  79. package/src/components/vv-message.scss +25 -0
  80. package/src/components/vv-pagination.scss +17 -0
  81. package/src/components/vv-popover.scss +17 -0
  82. package/src/components/vv-prose.scss +17 -0
  83. package/src/components/vv-questionnaire.scss +28 -0
  84. package/src/components/vv-separator.scss +17 -0
  85. package/src/components/vv-sidebar.scss +17 -0
  86. package/src/components/vv-spinner.scss +27 -0
  87. package/src/presets/_outlined-fields.scss +346 -0
  88. package/src/props/colors.scss +6 -0
  89. package/src/settings/_colors.scss +161 -61
  90. package/src/settings/_index.scss +26 -0
  91. package/src/settings/_input.scss +11 -2
  92. package/src/settings/components/_choice.scss +104 -0
  93. package/src/settings/components/_vv-alert.scss +37 -12
  94. package/src/settings/components/_vv-attachment-group.scss +10 -0
  95. package/src/settings/components/_vv-attachment.scss +135 -0
  96. package/src/settings/components/_vv-avatar.scss +19 -9
  97. package/src/settings/components/_vv-badge.scss +47 -14
  98. package/src/settings/components/_vv-breadcrumb.scss +1 -1
  99. package/src/settings/components/_vv-bubble-group.scss +31 -0
  100. package/src/settings/components/_vv-bubble.scss +69 -0
  101. package/src/settings/components/_vv-button.scss +55 -13
  102. package/src/settings/components/_vv-calendar.scss +102 -0
  103. package/src/settings/components/_vv-checkbox-group.scss +33 -2
  104. package/src/settings/components/_vv-checkbox.scss +8 -3
  105. package/src/settings/components/_vv-command.scss +99 -0
  106. package/src/settings/components/_vv-dialog.scss +129 -26
  107. package/src/settings/components/_vv-dropdown-action.scss +3 -2
  108. package/src/settings/components/_vv-dropdown-option.scss +3 -3
  109. package/src/settings/components/_vv-empty.scss +71 -0
  110. package/src/settings/components/_vv-field.scss +111 -0
  111. package/src/settings/components/_vv-input-file.scss +8 -8
  112. package/src/settings/components/_vv-input-otp.scss +55 -0
  113. package/src/settings/components/_vv-input-range.scss +3 -3
  114. package/src/settings/components/_vv-input-text.scss +7 -7
  115. package/src/settings/components/_vv-item-group.scss +68 -0
  116. package/src/settings/components/_vv-item.scss +201 -0
  117. package/src/settings/components/_vv-kbd-group.scss +9 -0
  118. package/src/settings/components/_vv-kbd.scss +20 -0
  119. package/src/settings/components/_vv-marker.scss +32 -0
  120. package/src/settings/components/_vv-message-scroller.scss +65 -0
  121. package/src/settings/components/_vv-message.scss +95 -0
  122. package/src/settings/components/_vv-nav.scss +7 -3
  123. package/src/settings/components/_vv-pagination.scss +78 -0
  124. package/src/settings/components/_vv-popover.scss +53 -0
  125. package/src/settings/components/_vv-progress.scss +4 -4
  126. package/src/settings/components/_vv-prose.scss +274 -0
  127. package/src/settings/components/_vv-questionnaire.scss +77 -0
  128. package/src/settings/components/_vv-radio.scss +7 -3
  129. package/src/settings/components/_vv-select.scss +6 -6
  130. package/src/settings/components/_vv-separator.scss +79 -0
  131. package/src/settings/components/_vv-sidebar.scss +91 -0
  132. package/src/settings/components/_vv-spinner.scss +26 -0
  133. package/src/settings/components/_vv-table.scss +63 -0
  134. package/src/settings/components/_vv-text.scss +3 -3
  135. package/src/settings/components/_vv-textarea.scss +7 -7
  136. package/src/themes/dark/components/_vv-checkbox.scss +27 -0
  137. package/src/themes/dark/components/_vv-radio.scss +27 -0
  138. package/src/themes/dark/components/index.scss +2 -0
  139. package/src/themes/dark/props/_colors.scss +6 -0
  140. package/src/themes/dark/settings/_colors.scss +97 -32
  141. package/src/themes/dark/settings/_index.scss +2 -0
  142. package/src/themes/dark/settings/_input.scss +4 -8
  143. package/src/themes/dark/settings/components/_choice.scss +15 -0
  144. package/src/themes/dark/settings/components/_vv-alert.scss +6 -48
  145. package/src/themes/dark/settings/components/_vv-avatar.scss +1 -16
  146. package/src/themes/dark/settings/components/_vv-badge.scss +1 -32
  147. package/src/themes/dark/settings/components/_vv-button.scss +0 -15
  148. package/src/themes/dark/settings/components/_vv-checkbox.scss +7 -0
  149. package/src/themes/dark/settings/components/_vv-dropdown-action.scss +2 -3
  150. package/src/themes/dark/settings/components/_vv-dropdown-option.scss +2 -19
  151. package/src/themes/dark/settings/components/_vv-nav.scss +2 -15
  152. package/src/themes/dark/settings/components/_vv-radio.scss +7 -0
  153. package/src/tools/_functions.scss +430 -2
  154. package/src/tools/mixin-modules/_bem.scss +5 -39
  155. package/src/tools/mixin-modules/_states.scss +77 -0
  156. package/src/tools/mixin-modules/_theme.scss +135 -121
  157. package/src/utilities/colors.scss +49 -4
  158. package/src/utilities/layout.scss +25 -0
@@ -0,0 +1,135 @@
1
+ // A file or an image attached to a message or waiting in a composer: a tile
2
+ // with its `media` (the icon of the kind of file, a thumbnail), a `content`
3
+ // column with a `title` and a `description` (the kind, the size), `actions`
4
+ // such as open or download, and an optional `remove` button pinned to the
5
+ // top corner on the inline end, over the edge of the tile.
6
+ // `image` shows a picture whole, with the caption under it; `invalid` is an
7
+ // upload that failed; `loading` dims the media while a `vv-spinner` inside it
8
+ // turns. A row of them is a `vv-attachment-group`.
9
+ $vv-attachment: (
10
+ position: relative,
11
+ display: flex,
12
+ align-items: center,
13
+ gap: var(--spacing-8),
14
+ max-width: 17.5rem,
15
+ padding: var(--spacing-8),
16
+ border: var(--border) solid var(--color-surface-3),
17
+ border-radius: var(--rounded-lg),
18
+ background-color: var(--color-surface-1),
19
+ color: var(--color-word-2),
20
+ font-size: var(--text-12),
21
+ line-height: var(--leading-snug),
22
+ element: (
23
+ media: (
24
+ display: grid,
25
+ flex-shrink: 0,
26
+ place-items: center,
27
+ inline-size: var(--spacing-36),
28
+ block-size: var(--spacing-36),
29
+ overflow: hidden,
30
+ border-radius: var(--rounded-md),
31
+ background-color: var(--color-surface-2),
32
+ color: var(--color-word-3),
33
+ font-size: var(--text-16),
34
+ ),
35
+ // A thumbnail fills the media
36
+ picture: (
37
+ _alias: 'img',
38
+ inline-size: 100%,
39
+ block-size: 100%,
40
+ object-fit: cover,
41
+ ),
42
+ content: (
43
+ display: flex,
44
+ flex: 1,
45
+ flex-direction: column,
46
+ min-width: 0,
47
+ ),
48
+ title: (
49
+ overflow: hidden,
50
+ color: var(--color-word-1),
51
+ font-weight: var(--font-medium),
52
+ text-overflow: ellipsis,
53
+ white-space: nowrap,
54
+ ),
55
+ description: (
56
+ overflow: hidden,
57
+ color: var(--color-word-4),
58
+ font-variant-numeric: tabular-nums,
59
+ text-overflow: ellipsis,
60
+ white-space: nowrap,
61
+ ),
62
+ actions: (
63
+ display: flex,
64
+ flex-shrink: 0,
65
+ align-items: center,
66
+ gap: var(--spacing-2),
67
+ ),
68
+ // Half outside the tile on both axes, mirrored in a right to left
69
+ // page through `--direction`, read by a plain declaration
70
+ remove: (
71
+ position: absolute,
72
+ inset-block-start: 0,
73
+ inset-inline-end: 0,
74
+ display: grid,
75
+ place-items: center,
76
+ inline-size: var(--spacing-24),
77
+ block-size: var(--spacing-24),
78
+ border: var(--border) solid var(--color-surface-4),
79
+ border-radius: var(--rounded-full),
80
+ background-color: var(--color-surface),
81
+ box-shadow: var(--shadow-sm),
82
+ color: var(--color-word-2),
83
+ font-size: var(--text-12),
84
+ cursor: pointer,
85
+ [translate]: calc(50% * var(--direction, 1)) -50%,
86
+ state: (
87
+ hover: (
88
+ background-color: var(--color-surface-2),
89
+ ),
90
+ focus-visible: (
91
+ outline: var(--spacing-px) solid var(--color-brand-graphic),
92
+ outline-offset: var(--spacing-2),
93
+ ),
94
+ ),
95
+ ),
96
+ ),
97
+ modifier: (
98
+ image: (
99
+ flex-direction: column,
100
+ align-items: stretch,
101
+ gap: 0,
102
+ padding: 0,
103
+ element: (
104
+ media: (
105
+ inline-size: 100%,
106
+ block-size: auto,
107
+ // A number, not `7 / 5`, which Sass would read as a division
108
+ aspect-ratio: calc(7 / 5),
109
+ border-radius: var(--rounded-lg) var(--rounded-lg) 0 0,
110
+ ),
111
+ content: (
112
+ padding: var(--spacing-8),
113
+ ),
114
+ ),
115
+ ),
116
+ invalid: (
117
+ border-color: var(--color-danger),
118
+ element: (
119
+ description: (
120
+ color: var(--color-danger-readable),
121
+ ),
122
+ ),
123
+ ),
124
+ loading: (
125
+ element: (
126
+ media: (
127
+ color: var(--color-word-2),
128
+ ),
129
+ picture: (
130
+ opacity: var(--opacity-50),
131
+ ),
132
+ ),
133
+ ),
134
+ ),
135
+ ) !default;
@@ -1,7 +1,7 @@
1
1
  $vv-avatar: (
2
2
  background-color: var(--color-brand),
3
3
  border-radius: var(--rounded),
4
- color: var(--color-white),
4
+ color: var(--color-brand-contrast),
5
5
  display: inline-flex,
6
6
  position: relative,
7
7
  justify-content: center,
@@ -17,8 +17,8 @@ $vv-avatar: (
17
17
  flex-shrink: 0,
18
18
  state: (
19
19
  focus-visible: (
20
- outline: var(--spacing-px) solid var(--color-brand),
21
- outline-offset: var(--spacing-0),
20
+ outline: var(--spacing-px) solid var(--color-brand-graphic),
21
+ outline-offset: var(--spacing-2),
22
22
  ),
23
23
  ),
24
24
  element: (
@@ -82,8 +82,10 @@ $vv-avatar: (
82
82
  width: var(--spacing-40),
83
83
  height: var(--spacing-40),
84
84
  ),
85
+ // Keeps the white it had before the block followed the brand
85
86
  transparent: (
86
87
  background-color: var(--color-transparent),
88
+ color: var(--color-white),
87
89
  ),
88
90
  surface: (
89
91
  background-color: var(--color-surface-2),
@@ -93,29 +95,37 @@ $vv-avatar: (
93
95
  danger: (
94
96
  background-color: var(--color-danger),
95
97
  border-color: var(--color-danger-lighten-3),
98
+ color: var(--color-danger-contrast),
96
99
  ),
97
100
  success: (
98
101
  background-color: var(--color-success),
99
102
  border-color: var(--color-success-lighten-3),
103
+ color: var(--color-success-contrast),
100
104
  ),
105
+ // Filled with the darkest shade, so the text is the contrast of that
106
+ // shade and not of the base color
101
107
  warning: (
102
108
  background-color: var(--color-warning-darken-5),
103
109
  border-color: var(--color-warning-darken-2),
110
+ color: var(--color-warning-darken-5-contrast),
104
111
  ),
105
112
  info: (
106
113
  background-color: var(--color-info-darken-5),
107
114
  border-color: var(--color-info-darken-2),
115
+ color: var(--color-info-darken-5-contrast),
108
116
  ),
109
117
  accent: (
110
118
  background-color: var(--color-accent),
111
119
  border-color: var(--color-accent-darken-3),
120
+ color: var(--color-accent-contrast),
112
121
  ),
113
122
  gray: (
114
123
  background-color: var(--color-gray-darken-1),
115
124
  border-color: var(--color-gray-lighten-2),
125
+ color: var(--color-white),
116
126
  ),
117
127
  ring: (
118
- color: var(--color-brand-darken-3),
128
+ color: var(--color-surface-brand-readable),
119
129
  background-color: var(--color-surface-brand),
120
130
  border-color: currentcolor,
121
131
  border-width: var(--border),
@@ -127,23 +137,23 @@ $vv-avatar: (
127
137
  ),
128
138
  danger: (
129
139
  background-color: var(--color-surface-danger),
130
- color: var(--color-danger),
140
+ color: var(--color-surface-danger-readable),
131
141
  ),
132
142
  success: (
133
143
  background-color: var(--color-surface-success),
134
- color: var(--color-success-darken-3),
144
+ color: var(--color-surface-success-readable),
135
145
  ),
136
146
  warning: (
137
147
  background-color: var(--color-surface-warning),
138
- color: var(--color-warning-darken-5),
148
+ color: var(--color-surface-warning-readable),
139
149
  ),
140
150
  info: (
141
151
  background-color: var(--color-surface-info),
142
- color: var(--color-info-darken-5),
152
+ color: var(--color-surface-info-readable),
143
153
  ),
144
154
  accent: (
145
155
  background-color: var(--color-surface-accent),
146
- color: var(--color-accent),
156
+ color: var(--color-surface-accent-readable),
147
157
  ),
148
158
  gray: (
149
159
  background-color: var(--color-surface-4),
@@ -4,7 +4,7 @@ $vv-badge: (
4
4
  border-width: 0,
5
5
  background-color: var(--color-brand),
6
6
  border-color: var(--color-brand),
7
- color: var(--color-white),
7
+ color: var(--color-brand-contrast),
8
8
  border-style: solid,
9
9
  border-radius: 0.5em,
10
10
  min-height: 2em,
@@ -34,7 +34,7 @@ $vv-badge: (
34
34
  ),
35
35
  focus-within: (
36
36
  outline-offset: var(--spacing-4),
37
- outline: var(--spacing-px) solid currentcolor,
37
+ outline: var(--spacing-px) solid var(--color-brand-graphic),
38
38
  ),
39
39
  ),
40
40
  element: (
@@ -96,42 +96,75 @@ $vv-badge: (
96
96
  ),
97
97
  danger: (
98
98
  background-color: var(--color-danger),
99
+ color: var(--color-danger-contrast),
100
+ state: (
101
+ focus-within: (
102
+ outline-color: var(--color-danger-graphic),
103
+ ),
104
+ ),
99
105
  ),
100
106
  success: (
101
107
  background-color: var(--color-success),
108
+ color: var(--color-success-contrast),
109
+ state: (
110
+ focus-within: (
111
+ outline-color: var(--color-success-graphic),
112
+ ),
113
+ ),
102
114
  ),
115
+ // Filled with the darkest shade, so the text is the contrast of that
116
+ // shade and not of the base color
103
117
  warning: (
104
118
  background-color: var(--color-warning-darken-5),
119
+ color: var(--color-warning-darken-5-contrast),
120
+ state: (
121
+ focus-within: (
122
+ outline-color: var(--color-warning-graphic),
123
+ ),
124
+ ),
105
125
  ),
106
126
  info: (
107
127
  background-color: var(--color-info-darken-5),
128
+ color: var(--color-info-darken-5-contrast),
129
+ state: (
130
+ focus-within: (
131
+ outline-color: var(--color-info-graphic),
132
+ ),
133
+ ),
108
134
  ),
109
135
  accent: (
110
136
  background-color: var(--color-accent),
137
+ color: var(--color-accent-contrast),
138
+ state: (
139
+ focus-within: (
140
+ outline-color: var(--color-accent-graphic),
141
+ ),
142
+ ),
111
143
  ),
112
144
  gray: (
113
145
  background-color: var(--color-gray-darken-1),
146
+ color: var(--color-white),
114
147
  ),
115
148
  outline: (
116
149
  border-width: var(--border),
117
- color: var(--color-brand),
150
+ color: var(--color-brand-readable),
118
151
  border-color: currentcolor,
119
152
  background-color: transparent,
120
153
  modifier: (
121
154
  danger: (
122
- color: var(--color-danger),
155
+ color: var(--color-danger-readable),
123
156
  ),
124
157
  success: (
125
- color: var(--color-success),
158
+ color: var(--color-success-readable),
126
159
  ),
127
160
  warning: (
128
- color: var(--color-warning-darken-5),
161
+ color: var(--color-warning-readable),
129
162
  ),
130
163
  info: (
131
- color: var(--color-info-darken-5),
164
+ color: var(--color-info-readable),
132
165
  ),
133
166
  accent: (
134
- color: var(--color-accent),
167
+ color: var(--color-accent-readable),
135
168
  ),
136
169
  gray: (
137
170
  color: var(--color-gray-darken-1),
@@ -140,22 +173,22 @@ $vv-badge: (
140
173
  ),
141
174
  ghost: (
142
175
  background-color: transparent,
143
- color: var(--color-brand),
176
+ color: var(--color-brand-readable),
144
177
  modifier: (
145
178
  danger: (
146
- color: var(--color-danger),
179
+ color: var(--color-danger-readable),
147
180
  ),
148
181
  success: (
149
- color: var(--color-success),
182
+ color: var(--color-success-readable),
150
183
  ),
151
184
  warning: (
152
- color: var(--color-warning-darken-5),
185
+ color: var(--color-warning-readable),
153
186
  ),
154
187
  info: (
155
- color: var(--color-info-darken-5),
188
+ color: var(--color-info-readable),
156
189
  ),
157
190
  accent: (
158
- color: var(--color-accent),
191
+ color: var(--color-accent-readable),
159
192
  ),
160
193
  gray: (
161
194
  color: var(--color-gray-darken-1),
@@ -72,7 +72,7 @@ $vv-breadcrumb: (
72
72
  text-decoration: underline,
73
73
  ),
74
74
  active: (
75
- color: var(--color-brand-darken-2),
75
+ color: var(--color-brand-readable-strong),
76
76
  ),
77
77
  ),
78
78
  ),
@@ -0,0 +1,31 @@
1
+ // Consecutive bubbles of one speaker, stacked close and joined on the side of
2
+ // the speaker: every bubble after the first tightens its top corner there, so
3
+ // the first keeps a round top and the side of the speaker runs as one
4
+ // straight edge down to the tail of the last. `end` groups the bubbles of the
5
+ // one reading, whose bubbles take `vv-bubble--end` too. Load `vv-bubble`
6
+ // before this block when importing the two on their own: the joined corners
7
+ // have to come after the bubble's own radius.
8
+ $vv-bubble-group: (
9
+ display: flex,
10
+ flex-direction: column,
11
+ align-items: flex-start,
12
+ gap: var(--spacing-2),
13
+ max-width: 100%,
14
+ element: (
15
+ joined: (
16
+ _alias: '> :not(:first-child)',
17
+ border-start-start-radius: var(--rounded-sm),
18
+ ),
19
+ ),
20
+ modifier: (
21
+ end: (
22
+ align-items: flex-end,
23
+ element: (
24
+ joined: (
25
+ border-start-start-radius: var(--rounded-xl),
26
+ border-start-end-radius: var(--rounded-sm),
27
+ ),
28
+ ),
29
+ ),
30
+ ),
31
+ ) !default;
@@ -0,0 +1,69 @@
1
+ // The surface of a message. Its colours are tokens read with a fallback and
2
+ // never declared on the block, so a value set on the conversation reaches
3
+ // every bubble under it: `--bubble-background`, `--bubble-color` and
4
+ // `--bubble-border-color` for the other side, `--bubble-end-background`,
5
+ // `--bubble-end-color` and `--bubble-end-border-color` for the one reading.
6
+ // A product paints the bubbles of one side in its own colour with one
7
+ // declaration on the conversation. They are read by plain declarations, in
8
+ // brackets: a `var()` inside a generated custom property is resolved at the
9
+ // root, where a value set on a bubble or on its conversation does not reach.
10
+ // The corner on the side of the speaker is tighter, a tail at the last line.
11
+ // `reactions` hang over the bottom edge: `reacted` leaves room under the
12
+ // bubble for them.
13
+ $vv-bubble: (
14
+ position: relative,
15
+ max-width: 100%,
16
+ padding: var(--spacing-8) var(--spacing-12),
17
+ border-radius: var(--rounded-xl),
18
+ border-end-start-radius: var(--rounded-sm),
19
+ line-height: var(--leading-normal),
20
+ overflow-wrap: anywhere,
21
+ [border]: var(--border) solid var(--bubble-border-color, var(--color-surface-3)),
22
+ [background-color]: var(--bubble-background, var(--color-surface)),
23
+ [color]: var(--bubble-color, var(--color-word-2)),
24
+ element: (
25
+ reactions: (
26
+ position: absolute,
27
+ inset-block-end: 0,
28
+ inset-inline-end: var(--spacing-8),
29
+ translate: 0 50%,
30
+ display: inline-flex,
31
+ align-items: center,
32
+ gap: var(--spacing-2),
33
+ padding: var(--spacing-2) var(--spacing-6),
34
+ border: var(--border) solid var(--color-surface-3),
35
+ border-radius: var(--rounded-full),
36
+ background-color: var(--color-surface),
37
+ box-shadow: var(--shadow-sm),
38
+ color: var(--color-word-2),
39
+ font-size: var(--text-12),
40
+ line-height: var(--leading-none),
41
+ ),
42
+ ),
43
+ modifier: (
44
+ // The bubbles of the one reading: a filled surface, the tail on the
45
+ // inline end
46
+ end: (
47
+ [border-color]: var(--bubble-end-border-color, var(--color-surface-2)),
48
+ [background-color]: var(--bubble-end-background, var(--color-surface-2)),
49
+ [color]: var(--bubble-end-color, var(--color-word-1)),
50
+ border-end-start-radius: var(--rounded-xl),
51
+ border-end-end-radius: var(--rounded-sm),
52
+ element: (
53
+ reactions: (
54
+ inset-inline-end: auto,
55
+ inset-inline-start: var(--spacing-8),
56
+ ),
57
+ ),
58
+ ),
59
+ // No surface: an answer set as rich text across the row
60
+ plain: (
61
+ [border-color]: transparent,
62
+ [background-color]: transparent,
63
+ padding: 0,
64
+ ),
65
+ reacted: (
66
+ margin-block-end: var(--spacing-12),
67
+ ),
68
+ ),
69
+ ) !default;
@@ -8,13 +8,21 @@ $vv-button: (
8
8
  border-radius: var(--rounded),
9
9
  border-style: solid,
10
10
  border-color: var(--color-brand),
11
- color: var(--color-white),
11
+ color: var(--color-brand-contrast),
12
12
  font-family: var(--font-sans),
13
13
  font-weight: var(--font-semibold),
14
14
  gap: 1ch,
15
15
  padding-block: var(--spacing-7),
16
16
  padding-inline: var(--spacing-16),
17
- text-shadow: 0 1px 0 var(--color-gray-darken-5),
17
+ // The dark emboss suits light text only. The shadow above it is the cover
18
+ // of the fill, the fill itself where --color-brand-contrast turns dark and
19
+ // transparent otherwise, so it hides the emboss beneath dark text. Each
20
+ // state takes the contrast text and the cover of the shade it paints, so a
21
+ // color near the threshold turns its text white on the darker shades.
22
+ text-shadow: (
23
+ 0 1px 0 var(--color-brand-cover),
24
+ 0 1px 0 var(--color-gray-darken-5),
25
+ ),
18
26
  transition: var(--transition-all),
19
27
  will-change: all,
20
28
  min-width: 0,
@@ -22,20 +30,35 @@ $vv-button: (
22
30
  state: (
23
31
  focus-visible: (
24
32
  outline-offset: var(--spacing-4),
25
- outline: var(--spacing-px) solid var(--color-brand),
33
+ outline: var(--spacing-px) solid var(--color-brand-graphic),
26
34
  ),
27
35
  hover: (
28
36
  background: var(--color-brand-darken-1),
29
37
  border-color: var(--color-brand-darken-1),
38
+ color: var(--color-brand-darken-1-contrast),
30
39
  text-decoration: none,
40
+ text-shadow: (
41
+ 0 1px 0 var(--color-brand-darken-1-cover),
42
+ 0 1px 0 var(--color-gray-darken-5),
43
+ ),
31
44
  ),
32
45
  active: (
33
46
  background: var(--color-brand-darken-2),
34
47
  border-color: var(--color-brand-darken-2),
48
+ color: var(--color-brand-darken-2-contrast),
49
+ text-shadow: (
50
+ 0 1px 0 var(--color-brand-darken-2-cover),
51
+ 0 1px 0 var(--color-gray-darken-5),
52
+ ),
35
53
  ),
36
54
  pressed: (
37
55
  background: var(--color-brand-darken-2),
38
56
  border-color: var(--color-brand-darken-2),
57
+ color: var(--color-brand-darken-2-contrast),
58
+ text-shadow: (
59
+ 0 1px 0 var(--color-brand-darken-2-cover),
60
+ 0 1px 0 var(--color-gray-darken-5),
61
+ ),
39
62
  ),
40
63
  disabled: (
41
64
  opacity: var(--opacity-50),
@@ -77,6 +100,7 @@ $vv-button: (
77
100
  background: var(--color-gray-darken-3),
78
101
  border-color: var(--color-gray-darken-3),
79
102
  color: var(--color-white),
103
+ text-shadow: 0 1px 0 var(--color-gray-darken-5),
80
104
  state: (
81
105
  focus-visible: (
82
106
  outline: var(--spacing-px) solid var(--color-gray-darken-3),
@@ -103,7 +127,7 @@ $vv-button: (
103
127
  text-shadow: 0 1px 0 var(--color-gray-lighten-5),
104
128
  state: (
105
129
  focus-visible: (
106
- outline: var(--spacing-px) solid var(--color-gray-lighten-4),
130
+ outline: var(--spacing-px) solid var(--color-gray),
107
131
  ),
108
132
  hover: (
109
133
  background: var(--color-gray-lighten-4),
@@ -119,22 +143,41 @@ $vv-button: (
119
143
  danger: (
120
144
  background: var(--color-danger),
121
145
  border-color: var(--color-danger),
122
- color: var(--color-white),
146
+ color: var(--color-danger-contrast),
147
+ text-shadow: (
148
+ 0 1px 0 var(--color-danger-cover),
149
+ 0 1px 0 var(--color-gray-darken-5),
150
+ ),
123
151
  state: (
124
152
  focus-visible: (
125
- outline: var(--spacing-px) solid var(--color-danger),
153
+ outline: var(--spacing-px) solid var(--color-danger-graphic),
126
154
  ),
127
155
  hover: (
128
156
  background: var(--color-danger-darken-1),
129
157
  border-color: var(--color-danger-darken-1),
158
+ color: var(--color-danger-darken-1-contrast),
159
+ text-shadow: (
160
+ 0 1px 0 var(--color-danger-darken-1-cover),
161
+ 0 1px 0 var(--color-gray-darken-5),
162
+ ),
130
163
  ),
131
164
  active: (
132
165
  background: var(--color-danger-darken-2),
133
166
  border-color: var(--color-danger-darken-2),
167
+ color: var(--color-danger-darken-2-contrast),
168
+ text-shadow: (
169
+ 0 1px 0 var(--color-danger-darken-2-cover),
170
+ 0 1px 0 var(--color-gray-darken-5),
171
+ ),
134
172
  ),
135
173
  pressed: (
136
174
  background: var(--color-danger-darken-2),
137
175
  border-color: var(--color-danger-darken-2),
176
+ color: var(--color-danger-darken-2-contrast),
177
+ text-shadow: (
178
+ 0 1px 0 var(--color-danger-darken-2-cover),
179
+ 0 1px 0 var(--color-gray-darken-5),
180
+ ),
138
181
  ),
139
182
  ),
140
183
  ),
@@ -145,7 +188,7 @@ $vv-button: (
145
188
  text-shadow: 0 1px 0 var(--color-gray-lighten-5),
146
189
  state: (
147
190
  focus-visible: (
148
- outline: var(--spacing-px) solid var(--color-gray-lighten-4),
191
+ outline: var(--spacing-px) solid var(--color-gray),
149
192
  outline-offset: var(--spacing-0),
150
193
  ),
151
194
  hover: (
@@ -166,13 +209,12 @@ $vv-button: (
166
209
  background: transparent,
167
210
  border-width: var(--border-0),
168
211
  padding: 0,
169
- color: var(--color-brand-darken-1),
212
+ color: var(--color-brand-readable),
170
213
  font-weight: inherit,
171
214
  text-shadow: none,
172
215
  state: (
173
216
  focus-visible: (
174
- outline: var(--spacing-px) solid
175
- var(--color-brand-lighten-4),
217
+ outline: var(--spacing-px) solid var(--color-brand-graphic),
176
218
  outline-offset: var(--spacing-4),
177
219
  ),
178
220
  hover: (
@@ -180,7 +222,7 @@ $vv-button: (
180
222
  text-underline-offset: var(--spacing-4),
181
223
  ),
182
224
  active: (
183
- color: var(--color-brand-darken-3),
225
+ color: var(--color-brand-readable-strong),
184
226
  ),
185
227
  ),
186
228
  element: (
@@ -248,7 +290,7 @@ $vv-button: (
248
290
  text-shadow: none,
249
291
  state: (
250
292
  focus-visible: (
251
- outline: var(--spacing-px) solid var(--color-gray-lighten-4),
293
+ outline: var(--spacing-px) solid var(--color-gray),
252
294
  ),
253
295
  hover: (
254
296
  background: var(--color-surface-2),
@@ -284,7 +326,7 @@ $vv-button: (
284
326
  text-shadow: none,
285
327
  state: (
286
328
  focus-visible: (
287
- outline: var(--spacing-px) solid var(--color-gray-lighten-4),
329
+ outline: var(--spacing-px) solid var(--color-gray),
288
330
  outline-offset: var(--spacing-0),
289
331
  ),
290
332
  hover: (