@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
|
@@ -20,34 +20,88 @@ $color-success: #178230 !default;
|
|
|
20
20
|
$color-danger: #af2323 !default;
|
|
21
21
|
$color-info: #31ccec !default;
|
|
22
22
|
$color-warning: #e7b735 !default;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
$color-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
|
|
24
|
+
// The neutrals below take their hue from the tint, the light brand unless set.
|
|
25
|
+
// With $use-color-mix it is also emitted as --color-tint, and each neutral
|
|
26
|
+
// still at its default is written relative to it, so a runtime override of
|
|
27
|
+
// --color-tint moves them. The dark theme does not redeclare it.
|
|
28
|
+
$color-tint: $color-brand !default;
|
|
29
|
+
$color-gray: hsl(color-hue($color-tint) 15% 50%) !default;
|
|
30
|
+
$color-word: hsl(color-hue($color-tint) 15% 10%) !default;
|
|
31
|
+
$color-surface: hsl(color-hue($color-tint) 10% 100%) !default;
|
|
32
|
+
$color-shadow: hsl(color-hue($color-tint) 50% 20%) !default;
|
|
33
|
+
$color-backdrop: hsla(color-hue($color-tint) 50% 20% / 20%) !default;
|
|
28
34
|
$color-alpha: hsl(0deg 0% 0% / 0%) !default;
|
|
29
35
|
|
|
36
|
+
// Text written in a palette color keeps this contrast ratio with what it
|
|
37
|
+
// sits on. WCAG asks for 4.5; 4.6 leaves room for the rounding to 8-bit
|
|
38
|
+
// channels.
|
|
39
|
+
$color-readable-ratio: 4.6 !default;
|
|
40
|
+
|
|
41
|
+
// A palette color that has to be seen but not read, a bar, a focus ring or a
|
|
42
|
+
// state border, keeps this one. WCAG asks for 3 to graphics and to the parts
|
|
43
|
+
// of a control that show its state.
|
|
44
|
+
$color-graphic-ratio: 3.1 !default;
|
|
45
|
+
|
|
46
|
+
// Lightness of the tinted surfaces, --color-surface-brand and the others
|
|
47
|
+
$color-surface-tint-lightness: 90% !default;
|
|
48
|
+
|
|
49
|
+
// Lightness between two neutral surfaces, --color-surface to --color-surface-5
|
|
50
|
+
$color-surface-scale: 2% !default;
|
|
51
|
+
|
|
52
|
+
// The text roles of each palette color, readable-roles(): `readable`,
|
|
53
|
+
// --color-brand-readable, the text on the neutral surfaces (links, outlined
|
|
54
|
+
// badges, tabs, hints); `readable-strong`, a step further from them (a
|
|
55
|
+
// pressed link, the current crumb); and --color-surface-brand-readable, the text on the
|
|
56
|
+
// tinted surface of the color (alerts, ring avatars, dropdown options). Each
|
|
57
|
+
// one is the color itself while it reads, and the color moved just far
|
|
58
|
+
// enough otherwise, so a brand set at runtime keeps its hue and stays as
|
|
59
|
+
// vivid as it can.
|
|
60
|
+
// The roles read on the neutral surfaces down to this one: 2 is
|
|
61
|
+
// --color-surface-2, a hovered row or a pressed action.
|
|
62
|
+
$color-readable-depth: 2 !default;
|
|
63
|
+
|
|
64
|
+
// `readable-strong` is `readable` with its luminance scaled by this
|
|
65
|
+
$color-readable-strong-factor: 0.5 !default;
|
|
66
|
+
|
|
67
|
+
// The luminance the roles are moved to, on the neutral surfaces and on the
|
|
68
|
+
// tinted ones. Both are computed on the hardest hue (readable-surface() and
|
|
69
|
+
// readable-worst-tint()): the neutrals take theirs from --color-tint, the
|
|
70
|
+
// tinted surfaces from their color, and either can change at runtime.
|
|
71
|
+
$color-readable-luminance: readable-luminance(
|
|
72
|
+
readable-surface($color-surface, -$color-readable-depth * $color-surface-scale),
|
|
73
|
+
$color-readable-ratio
|
|
74
|
+
) !default;
|
|
75
|
+
$color-surface-readable-luminance: readable-luminance(
|
|
76
|
+
readable-worst-tint($color-surface-tint-lightness),
|
|
77
|
+
$color-readable-ratio
|
|
78
|
+
) !default;
|
|
79
|
+
$color-graphic-luminance: readable-luminance(
|
|
80
|
+
readable-surface($color-surface, -$color-readable-depth * $color-surface-scale),
|
|
81
|
+
$color-graphic-ratio
|
|
82
|
+
) !default;
|
|
83
|
+
|
|
30
84
|
// ============================================
|
|
31
85
|
// Surface Palette (semantic surface colors)
|
|
32
86
|
// ============================================
|
|
33
87
|
$color-surface-palette: if(
|
|
34
88
|
sass(config.$use-color-mix):
|
|
35
89
|
(
|
|
36
|
-
brand: string.unquote('hsl(from var(--color-brand) h s
|
|
37
|
-
accent: string.unquote('hsl(from var(--color-accent) h s
|
|
38
|
-
success: string.unquote('hsl(from var(--color-success) h s
|
|
39
|
-
danger: string.unquote('hsl(from var(--color-danger) h s
|
|
40
|
-
info: string.unquote('hsl(from var(--color-info) h s
|
|
41
|
-
warning: string.unquote('hsl(from var(--color-warning) h s
|
|
90
|
+
brand: string.unquote('hsl(from var(--color-brand) h s #{$color-surface-tint-lightness})'),
|
|
91
|
+
accent: string.unquote('hsl(from var(--color-accent) h s #{$color-surface-tint-lightness})'),
|
|
92
|
+
success: string.unquote('hsl(from var(--color-success) h s #{$color-surface-tint-lightness})'),
|
|
93
|
+
danger: string.unquote('hsl(from var(--color-danger) h s #{$color-surface-tint-lightness})'),
|
|
94
|
+
info: string.unquote('hsl(from var(--color-info) h s #{$color-surface-tint-lightness})'),
|
|
95
|
+
warning: string.unquote('hsl(from var(--color-warning) h s #{$color-surface-tint-lightness})'),
|
|
42
96
|
);
|
|
43
97
|
else:
|
|
44
98
|
(
|
|
45
|
-
brand: hsl(var(--color-brand-hue) var(--color-brand-saturation)
|
|
46
|
-
accent: hsl(var(--color-accent-hue) var(--color-accent-saturation)
|
|
47
|
-
success: hsl(var(--color-success-hue) var(--color-success-saturation)
|
|
48
|
-
danger: hsl(var(--color-danger-hue) var(--color-danger-saturation)
|
|
49
|
-
info: hsl(var(--color-info-hue) var(--color-info-saturation)
|
|
50
|
-
warning: hsl(var(--color-warning-hue) var(--color-warning-saturation)
|
|
99
|
+
brand: hsl(var(--color-brand-hue) var(--color-brand-saturation) $color-surface-tint-lightness),
|
|
100
|
+
accent: hsl(var(--color-accent-hue) var(--color-accent-saturation) $color-surface-tint-lightness),
|
|
101
|
+
success: hsl(var(--color-success-hue) var(--color-success-saturation) $color-surface-tint-lightness),
|
|
102
|
+
danger: hsl(var(--color-danger-hue) var(--color-danger-saturation) $color-surface-tint-lightness),
|
|
103
|
+
info: hsl(var(--color-info-hue) var(--color-info-saturation) $color-surface-tint-lightness),
|
|
104
|
+
warning: hsl(var(--color-warning-hue) var(--color-warning-saturation) $color-surface-tint-lightness),
|
|
51
105
|
)
|
|
52
106
|
) !default;
|
|
53
107
|
|
|
@@ -55,49 +109,95 @@ $color-surface-palette: if(
|
|
|
55
109
|
// Colors Map
|
|
56
110
|
// Override this map or use map.merge() to customize
|
|
57
111
|
// ============================================
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
112
|
+
|
|
113
|
+
// Each palette color gets the tokens for text on it ($text): `contrast`,
|
|
114
|
+
// --color-<name>-contrast, pure white or pure black, whichever gives the text
|
|
115
|
+
// on the fill the higher WCAG contrast ratio, and a `cover`, the fill under
|
|
116
|
+
// that text, which vv-button lays over its emboss, both for the base and every
|
|
117
|
+
// darker shade. The text roles of readable-roles() are merged in last.
|
|
118
|
+
// With $use-color-mix all of them are computed in CSS and follow a runtime
|
|
119
|
+
// override of the color; otherwise the contrast and the shade each role
|
|
120
|
+
// takes are chosen at compile time.
|
|
121
|
+
|
|
122
|
+
// The saturation and lightness passed to tinted-neutral-value() repeat the
|
|
123
|
+
// defaults above: a neutral that no longer matches its default was set
|
|
124
|
+
// explicitly, and keeps its literal value.
|
|
125
|
+
$colors: map.deep-merge(
|
|
126
|
+
if(
|
|
127
|
+
sass(config.$use-color-mix):
|
|
128
|
+
(
|
|
129
|
+
scheme: $color-scheme,
|
|
130
|
+
transparent: $color-transparent,
|
|
131
|
+
tint: $color-tint,
|
|
132
|
+
shadow: color-base-map(tinted-neutral-value($color-shadow, $color-tint, 50%, 20%), 'shadow'),
|
|
133
|
+
backdrop: color-base-map(tinted-neutral-value($color-backdrop, $color-tint, 50%, 20%, 20%), 'backdrop'),
|
|
134
|
+
black: color-base-map($color-black, 'black'),
|
|
135
|
+
white: color-base-map($color-white, 'white'),
|
|
136
|
+
word: color-mix-lighten-map(
|
|
137
|
+
tinted-neutral-value($color-word, $color-tint, 15%, 10%),
|
|
138
|
+
'word',
|
|
139
|
+
$steps: 5,
|
|
140
|
+
$scale: 12%
|
|
141
|
+
),
|
|
142
|
+
surface: map.merge(
|
|
143
|
+
color-mix-darken-map(
|
|
144
|
+
tinted-neutral-value($color-surface, $color-tint, 10%, 100%),
|
|
145
|
+
'surface',
|
|
146
|
+
$steps: 5,
|
|
147
|
+
$scale: $color-surface-scale
|
|
148
|
+
),
|
|
149
|
+
$color-surface-palette
|
|
150
|
+
),
|
|
151
|
+
alpha: color-mix-alpha-map($color-alpha, 'alpha', $steps: 5, $scale: 0.05),
|
|
152
|
+
brand: color-mix-shades-map($color-brand, 'brand', $text: true),
|
|
153
|
+
accent: color-mix-shades-map($color-accent, 'accent', $text: true),
|
|
154
|
+
success: color-mix-shades-map($color-success, 'success', $text: true),
|
|
155
|
+
danger: color-mix-shades-map($color-danger, 'danger', $text: true),
|
|
156
|
+
info: color-mix-shades-map($color-info, 'info', $text: true),
|
|
157
|
+
warning: color-mix-shades-map($color-warning, 'warning', $text: true),
|
|
158
|
+
gray: color-mix-shades-map(
|
|
159
|
+
tinted-neutral-value($color-gray, $color-tint, 15%, 50%),
|
|
160
|
+
'gray',
|
|
161
|
+
$scale: 15%
|
|
162
|
+
),
|
|
163
|
+
);
|
|
164
|
+
else:
|
|
165
|
+
(
|
|
166
|
+
scheme: $color-scheme,
|
|
167
|
+
transparent: $color-transparent,
|
|
168
|
+
shadow: hsla-map($color-shadow, 'shadow'),
|
|
169
|
+
backdrop: hsla-map($color-backdrop, 'backdrop'),
|
|
170
|
+
black: hsla-map($color-black, 'black'),
|
|
171
|
+
white: hsla-map($color-white, 'white'),
|
|
172
|
+
word: color-lighten-map($color-word, 'word', $scale: 12%, $fixed: true, $inverted: false),
|
|
173
|
+
surface: map.merge(
|
|
174
|
+
color-darken-map($color-surface, 'surface', $scale: $color-surface-scale, $fixed: true),
|
|
175
|
+
$color-surface-palette
|
|
176
|
+
),
|
|
177
|
+
alpha: color-alpha-map($color-alpha, 'alpha', $steps: 5, $scale: 0.05),
|
|
178
|
+
brand: color-shades-map($color-brand, 'brand', $text: true),
|
|
179
|
+
accent: color-shades-map($color-accent, 'accent', $text: true),
|
|
180
|
+
success: color-shades-map($color-success, 'success', $text: true),
|
|
181
|
+
danger: color-shades-map($color-danger, 'danger', $text: true),
|
|
182
|
+
info: color-shades-map($color-info, 'info', $text: true),
|
|
183
|
+
warning: color-shades-map($color-warning, 'warning', $text: true),
|
|
184
|
+
gray: color-shades-map($color-gray, 'gray', $scale: 15%),
|
|
185
|
+
)
|
|
186
|
+
),
|
|
187
|
+
readable-roles(
|
|
82
188
|
(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
success: color-shades-map($color-success, 'success'),
|
|
98
|
-
danger: color-shades-map($color-danger, 'danger'),
|
|
99
|
-
info: color-shades-map($color-info, 'info'),
|
|
100
|
-
warning: color-shades-map($color-warning, 'warning'),
|
|
101
|
-
gray: color-shades-map($color-gray, 'gray', $scale: 15%),
|
|
102
|
-
)
|
|
189
|
+
brand: $color-brand,
|
|
190
|
+
accent: $color-accent,
|
|
191
|
+
success: $color-success,
|
|
192
|
+
danger: $color-danger,
|
|
193
|
+
info: $color-info,
|
|
194
|
+
warning: $color-warning,
|
|
195
|
+
),
|
|
196
|
+
$color-readable-luminance,
|
|
197
|
+
$color-surface-readable-luminance,
|
|
198
|
+
$color-graphic-luminance,
|
|
199
|
+
$color-readable-strong-factor,
|
|
200
|
+
$lighten: color-luminance($color-surface) < contrast-threshold(),
|
|
201
|
+
$relative: config.$use-color-mix
|
|
202
|
+
)
|
|
103
203
|
) !default;
|
package/src/settings/_index.scss
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
@forward 'components/vv-dropdown-action';
|
|
33
33
|
@forward 'components/vv-dropdown-option';
|
|
34
34
|
@forward 'components/vv-dropdown-optgroup';
|
|
35
|
+
@forward 'components/vv-empty';
|
|
35
36
|
@forward 'components/vv-checkbox';
|
|
36
37
|
@forward 'components/vv-checkbox-group';
|
|
37
38
|
@forward 'components/vv-radio';
|
|
@@ -41,12 +42,37 @@
|
|
|
41
42
|
@forward 'components/vv-input-file';
|
|
42
43
|
@forward 'components/vv-input-range';
|
|
43
44
|
@forward 'components/vv-input-text';
|
|
45
|
+
|
|
46
|
+
// After vv-input-text, which it loads: forwarded first, it would load that
|
|
47
|
+
// map unconfigured and a `with` on it would fail
|
|
48
|
+
@forward 'components/vv-field';
|
|
49
|
+
@forward 'components/vv-item';
|
|
50
|
+
@forward 'components/vv-item-group';
|
|
44
51
|
@forward 'components/vv-nav';
|
|
52
|
+
@forward 'components/vv-pagination';
|
|
45
53
|
@forward 'components/vv-progress';
|
|
54
|
+
@forward 'components/vv-prose';
|
|
46
55
|
@forward 'components/vv-select';
|
|
56
|
+
@forward 'components/vv-separator';
|
|
47
57
|
@forward 'components/vv-skeleton';
|
|
58
|
+
@forward 'components/vv-spinner';
|
|
48
59
|
@forward 'components/vv-tab';
|
|
49
60
|
@forward 'components/vv-table';
|
|
50
61
|
@forward 'components/vv-text';
|
|
51
62
|
@forward 'components/vv-textarea';
|
|
52
63
|
@forward 'components/vv-tooltip';
|
|
64
|
+
@forward 'components/vv-attachment';
|
|
65
|
+
@forward 'components/vv-attachment-group';
|
|
66
|
+
@forward 'components/vv-bubble';
|
|
67
|
+
@forward 'components/vv-bubble-group';
|
|
68
|
+
@forward 'components/vv-marker';
|
|
69
|
+
@forward 'components/vv-message';
|
|
70
|
+
@forward 'components/vv-message-scroller';
|
|
71
|
+
@forward 'components/vv-questionnaire';
|
|
72
|
+
@forward 'components/vv-calendar';
|
|
73
|
+
@forward 'components/vv-command';
|
|
74
|
+
@forward 'components/vv-input-otp';
|
|
75
|
+
@forward 'components/vv-kbd';
|
|
76
|
+
@forward 'components/vv-kbd-group';
|
|
77
|
+
@forward 'components/vv-popover';
|
|
78
|
+
@forward 'components/vv-sidebar';
|
package/src/settings/_input.scss
CHANGED
|
@@ -38,6 +38,9 @@ $input: (
|
|
|
38
38
|
display: block,
|
|
39
39
|
font-size: var(--text-12),
|
|
40
40
|
gap: var(--spacing-8),
|
|
41
|
+
// Read by the hint of every field as `--input-hint-max-width`, which
|
|
42
|
+
// was never declared: the declaration was invalid and did nothing
|
|
43
|
+
max-width: 100%,
|
|
41
44
|
overflow: hidden,
|
|
42
45
|
text-overflow: ellipsis,
|
|
43
46
|
white-space: nowrap,
|
|
@@ -45,11 +48,17 @@ $input: (
|
|
|
45
48
|
placeholder: (
|
|
46
49
|
color: var(--color-word-4),
|
|
47
50
|
),
|
|
51
|
+
// The color of a valid or invalid field paints its bar and its border;
|
|
52
|
+
// its hint and its label take text-color, the readable role of the same
|
|
53
|
+
// palette color, which follows the theme. An override of the color needs
|
|
54
|
+
// one of the text as well.
|
|
48
55
|
valid: (
|
|
49
56
|
color: var(--color-success),
|
|
57
|
+
text-color: var(--color-success-readable),
|
|
50
58
|
),
|
|
51
59
|
invalid: (
|
|
52
60
|
color: var(--color-danger),
|
|
61
|
+
text-color: var(--color-danger-readable),
|
|
53
62
|
),
|
|
54
63
|
floating: (
|
|
55
64
|
padding-top: calc(var(--input-spacing-top) + 0.55em),
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// Modifiers shared by `vv-radio` and `vv-checkbox`, the two ways of drawing an
|
|
2
|
+
// option as something other than a control beside a label. Loaded by both
|
|
3
|
+
// component maps and not forwarded by `settings/_index.scss`: to change one,
|
|
4
|
+
// deep-merge `modifier.segment` or `modifier.card` of `$vv-radio` or
|
|
5
|
+
// `$vv-checkbox`, which hold their own copy.
|
|
6
|
+
|
|
7
|
+
// One option of a segmented control (`--segmented` on the group). The native
|
|
8
|
+
// input stays in the tree for the keyboard and assistive technology but is
|
|
9
|
+
// not painted: the tile is the control. Chosen, the tile is raised out of the
|
|
10
|
+
// recessed track; the keyboard focus draws the outline every control of the
|
|
11
|
+
// library draws, on the tile rather than on the hidden input. The label
|
|
12
|
+
// centres the icon and the text, because `@volverjs/ui-vue` wraps the slot in
|
|
13
|
+
// a `__label` span that the block stretches with `flex: 1`.
|
|
14
|
+
$choice-segment: (
|
|
15
|
+
position: relative,
|
|
16
|
+
display: flex,
|
|
17
|
+
flex: 1,
|
|
18
|
+
flex-wrap: nowrap,
|
|
19
|
+
align-items: center,
|
|
20
|
+
justify-content: center,
|
|
21
|
+
min-width: 0,
|
|
22
|
+
min-height: calc(var(--input-min-height) - var(--spacing-8)),
|
|
23
|
+
margin: 0,
|
|
24
|
+
padding: 0 var(--spacing-12),
|
|
25
|
+
border-radius: var(--rounded-md),
|
|
26
|
+
color: var(--color-word-2),
|
|
27
|
+
white-space: nowrap,
|
|
28
|
+
transition: (
|
|
29
|
+
background-color var(--duration-150) var(--ease-out),
|
|
30
|
+
color var(--duration-150) var(--ease-out),
|
|
31
|
+
box-shadow var(--duration-150) var(--ease-out),
|
|
32
|
+
),
|
|
33
|
+
element: (
|
|
34
|
+
label: (
|
|
35
|
+
display: flex,
|
|
36
|
+
align-items: center,
|
|
37
|
+
justify-content: center,
|
|
38
|
+
gap: var(--spacing-8),
|
|
39
|
+
),
|
|
40
|
+
input: (
|
|
41
|
+
position: absolute,
|
|
42
|
+
width: var(--spacing-px),
|
|
43
|
+
min-width: 0,
|
|
44
|
+
height: var(--spacing-px),
|
|
45
|
+
margin: 0,
|
|
46
|
+
border: 0,
|
|
47
|
+
opacity: 0,
|
|
48
|
+
pointer-events: none,
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
state: (
|
|
52
|
+
hover: (
|
|
53
|
+
color: var(--color-word),
|
|
54
|
+
),
|
|
55
|
+
checked-within: (
|
|
56
|
+
color: var(--color-word),
|
|
57
|
+
font-weight: var(--font-semibold),
|
|
58
|
+
background-color: var(--color-surface),
|
|
59
|
+
box-shadow: var(--shadow-sm),
|
|
60
|
+
),
|
|
61
|
+
focus-visible-within: (
|
|
62
|
+
outline: var(--spacing-px) solid var(--color-brand),
|
|
63
|
+
outline-offset: var(--spacing-2),
|
|
64
|
+
),
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
// An option drawn as a bordered tile, the control at the start and a title
|
|
69
|
+
// over a description beside it: a plan, a channel, a way of doing a thing
|
|
70
|
+
// that needs a line of explanation. The frame takes the hairline of the other
|
|
71
|
+
// frames of the library, and the chosen tile is marked by a step of surface
|
|
72
|
+
// and a border in the text colour, not by a colour of its own. The tiles of a
|
|
73
|
+
// row (`--cards` on the group) share the width and wrap under 8rem.
|
|
74
|
+
$choice-card: (
|
|
75
|
+
display: flex,
|
|
76
|
+
flex: 1,
|
|
77
|
+
flex-wrap: nowrap,
|
|
78
|
+
align-items: flex-start,
|
|
79
|
+
gap: var(--spacing-16),
|
|
80
|
+
min-width: var(--spacing-128),
|
|
81
|
+
margin: 0,
|
|
82
|
+
padding: var(--spacing-16),
|
|
83
|
+
border: var(--border) solid var(--color-surface-4),
|
|
84
|
+
border-radius: var(--rounded-lg),
|
|
85
|
+
transition: (
|
|
86
|
+
background-color var(--duration-150) var(--ease-out),
|
|
87
|
+
border-color var(--duration-150) var(--ease-out),
|
|
88
|
+
),
|
|
89
|
+
element: (
|
|
90
|
+
input: (
|
|
91
|
+
flex-shrink: 0,
|
|
92
|
+
margin: 0,
|
|
93
|
+
),
|
|
94
|
+
),
|
|
95
|
+
state: (
|
|
96
|
+
hover: (
|
|
97
|
+
border-color: var(--color-surface-5),
|
|
98
|
+
),
|
|
99
|
+
checked-within: (
|
|
100
|
+
border-color: var(--color-word),
|
|
101
|
+
background-color: var(--color-surface-1),
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
);
|
|
@@ -78,10 +78,10 @@ $vv-alert: (
|
|
|
78
78
|
background-color: var(--color-surface-success),
|
|
79
79
|
element: (
|
|
80
80
|
icon: (
|
|
81
|
-
color: var(--color-success-
|
|
81
|
+
color: var(--color-surface-success-readable),
|
|
82
82
|
),
|
|
83
83
|
header: (
|
|
84
|
-
color: var(--color-success-
|
|
84
|
+
color: var(--color-surface-success-readable),
|
|
85
85
|
),
|
|
86
86
|
),
|
|
87
87
|
),
|
|
@@ -90,10 +90,10 @@ $vv-alert: (
|
|
|
90
90
|
background-color: var(--color-surface-danger),
|
|
91
91
|
element: (
|
|
92
92
|
icon: (
|
|
93
|
-
color: var(--color-danger),
|
|
93
|
+
color: var(--color-surface-danger-readable),
|
|
94
94
|
),
|
|
95
95
|
header: (
|
|
96
|
-
color: var(--color-danger),
|
|
96
|
+
color: var(--color-surface-danger-readable),
|
|
97
97
|
),
|
|
98
98
|
),
|
|
99
99
|
),
|
|
@@ -102,10 +102,10 @@ $vv-alert: (
|
|
|
102
102
|
background-color: var(--color-surface-warning),
|
|
103
103
|
element: (
|
|
104
104
|
icon: (
|
|
105
|
-
color: var(--color-warning-
|
|
105
|
+
color: var(--color-surface-warning-readable),
|
|
106
106
|
),
|
|
107
107
|
header: (
|
|
108
|
-
color: var(--color-warning-
|
|
108
|
+
color: var(--color-surface-warning-readable),
|
|
109
109
|
),
|
|
110
110
|
),
|
|
111
111
|
),
|
|
@@ -114,10 +114,10 @@ $vv-alert: (
|
|
|
114
114
|
background-color: var(--color-surface-info),
|
|
115
115
|
element: (
|
|
116
116
|
icon: (
|
|
117
|
-
color: var(--color-info-
|
|
117
|
+
color: var(--color-surface-info-readable),
|
|
118
118
|
),
|
|
119
119
|
header: (
|
|
120
|
-
color: var(--color-info-
|
|
120
|
+
color: var(--color-surface-info-readable),
|
|
121
121
|
),
|
|
122
122
|
),
|
|
123
123
|
),
|
|
@@ -126,10 +126,10 @@ $vv-alert: (
|
|
|
126
126
|
background-color: var(--color-surface-accent),
|
|
127
127
|
element: (
|
|
128
128
|
icon: (
|
|
129
|
-
color: var(--color-accent),
|
|
129
|
+
color: var(--color-surface-accent-readable),
|
|
130
130
|
),
|
|
131
131
|
header: (
|
|
132
|
-
color: var(--color-accent),
|
|
132
|
+
color: var(--color-surface-accent-readable),
|
|
133
133
|
),
|
|
134
134
|
),
|
|
135
135
|
),
|
|
@@ -138,10 +138,10 @@ $vv-alert: (
|
|
|
138
138
|
background-color: var(--color-surface-brand),
|
|
139
139
|
element: (
|
|
140
140
|
icon: (
|
|
141
|
-
color: var(--color-brand-
|
|
141
|
+
color: var(--color-surface-brand-readable),
|
|
142
142
|
),
|
|
143
143
|
header: (
|
|
144
|
-
color: var(--color-brand-
|
|
144
|
+
color: var(--color-surface-brand-readable),
|
|
145
145
|
),
|
|
146
146
|
),
|
|
147
147
|
),
|
|
@@ -208,6 +208,10 @@ $vv-alert: (
|
|
|
208
208
|
element: (
|
|
209
209
|
header: (
|
|
210
210
|
background-color: var(--color-success),
|
|
211
|
+
color: var(--color-success-contrast),
|
|
212
|
+
),
|
|
213
|
+
icon: (
|
|
214
|
+
color: var(--color-success-contrast),
|
|
211
215
|
),
|
|
212
216
|
),
|
|
213
217
|
),
|
|
@@ -216,14 +220,23 @@ $vv-alert: (
|
|
|
216
220
|
element: (
|
|
217
221
|
header: (
|
|
218
222
|
background-color: var(--color-danger),
|
|
223
|
+
color: var(--color-danger-contrast),
|
|
224
|
+
),
|
|
225
|
+
icon: (
|
|
226
|
+
color: var(--color-danger-contrast),
|
|
219
227
|
),
|
|
220
228
|
),
|
|
221
229
|
),
|
|
230
|
+
// Warning and info fill with the darkest shade, and take its contrast
|
|
222
231
|
warning: (
|
|
223
232
|
border-color: var(--color-warning-darken-5),
|
|
224
233
|
element: (
|
|
225
234
|
header: (
|
|
226
235
|
background-color: var(--color-warning-darken-5),
|
|
236
|
+
color: var(--color-warning-darken-5-contrast),
|
|
237
|
+
),
|
|
238
|
+
icon: (
|
|
239
|
+
color: var(--color-warning-darken-5-contrast),
|
|
227
240
|
),
|
|
228
241
|
),
|
|
229
242
|
),
|
|
@@ -232,6 +245,10 @@ $vv-alert: (
|
|
|
232
245
|
element: (
|
|
233
246
|
header: (
|
|
234
247
|
background-color: var(--color-info-darken-5),
|
|
248
|
+
color: var(--color-info-darken-5-contrast),
|
|
249
|
+
),
|
|
250
|
+
icon: (
|
|
251
|
+
color: var(--color-info-darken-5-contrast),
|
|
235
252
|
),
|
|
236
253
|
),
|
|
237
254
|
),
|
|
@@ -240,6 +257,10 @@ $vv-alert: (
|
|
|
240
257
|
element: (
|
|
241
258
|
header: (
|
|
242
259
|
background-color: var(--color-accent),
|
|
260
|
+
color: var(--color-accent-contrast),
|
|
261
|
+
),
|
|
262
|
+
icon: (
|
|
263
|
+
color: var(--color-accent-contrast),
|
|
243
264
|
),
|
|
244
265
|
),
|
|
245
266
|
),
|
|
@@ -248,6 +269,10 @@ $vv-alert: (
|
|
|
248
269
|
element: (
|
|
249
270
|
header: (
|
|
250
271
|
background-color: var(--color-brand),
|
|
272
|
+
color: var(--color-brand-contrast),
|
|
273
|
+
),
|
|
274
|
+
icon: (
|
|
275
|
+
color: var(--color-brand-contrast),
|
|
251
276
|
),
|
|
252
277
|
),
|
|
253
278
|
),
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// A row of attachments that wraps, the tray above a composer or the files of
|
|
2
|
+
// a message. The top padding leaves room for the `remove` buttons, which hang
|
|
3
|
+
// over the top edge of each tile.
|
|
4
|
+
$vv-attachment-group: (
|
|
5
|
+
display: flex,
|
|
6
|
+
flex-wrap: wrap,
|
|
7
|
+
gap: var(--spacing-12),
|
|
8
|
+
padding-block-start: var(--spacing-12),
|
|
9
|
+
padding-inline-end: var(--spacing-12),
|
|
10
|
+
) !default;
|