vanilla-framework 4.14.0 → 4.16.0
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/package.json +19 -16
- package/scss/_base_button.scss +1 -1
- package/scss/_base_details.scss +1 -1
- package/scss/_base_forms.scss +8 -7
- package/scss/_base_hr.scss +2 -3
- package/scss/_base_icon-definitions.scss +29 -0
- package/scss/_base_links.scss +1 -1
- package/scss/_base_placeholders.scss +3 -3
- package/scss/_base_typography-definitions.scss +1 -1
- package/scss/_global_functions.scss +17 -5
- package/scss/_layouts_application-panels.scss +3 -12
- package/scss/_layouts_application.scss +2 -2
- package/scss/_layouts_fluid-breakout.scss +2 -2
- package/scss/_patterns_accordion.scss +1 -1
- package/scss/_patterns_article-pagination.scss +4 -5
- package/scss/_patterns_buttons.scss +1 -1
- package/scss/_patterns_chip.scss +8 -9
- package/scss/_patterns_code-snippet.scss +1 -1
- package/scss/_patterns_contextual-menu.scss +1 -1
- package/scss/_patterns_cta.scss +27 -0
- package/scss/_patterns_equal-height-row.scss +87 -43
- package/scss/_patterns_grid.scss +74 -2
- package/scss/_patterns_icons.scss +10 -8
- package/scss/_patterns_image.scss +53 -15
- package/scss/_patterns_links.scss +1 -1
- package/scss/_patterns_list-tree.scss +49 -43
- package/scss/_patterns_lists.scss +58 -17
- package/scss/_patterns_logo-section.scss +4 -42
- package/scss/_patterns_matrix.scss +2 -2
- package/scss/_patterns_navigation-reduced.scss +50 -14
- package/scss/_patterns_navigation.scss +119 -36
- package/scss/_patterns_pull-quotes.scss +1 -1
- package/scss/_patterns_rule.scss +6 -2
- package/scss/_patterns_search-and-filter.scss +11 -12
- package/scss/_patterns_separator.scss +1 -0
- package/scss/_patterns_side-navigation.scss +1 -1
- package/scss/_patterns_status-label.scss +5 -0
- package/scss/_patterns_table-mobile-card.scss +1 -1
- package/scss/_patterns_tooltips.scss +26 -8
- package/scss/_settings_breakpoints.scss +16 -0
- package/scss/_settings_colors.scss +17 -8
- package/scss/_utilities_floats.scss +6 -6
- package/scss/_utilities_hide.scss +9 -9
- package/scss/_utilities_show.scss +3 -3
- package/scss/_vanilla.scss +2 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
TODO this component uses hard-coded colors that don't respond to theming, which is not ideal.
|
|
5
|
+
However, it looks fine on all themes, and re-working it to support theming is a larger undertaking.
|
|
6
|
+
So, it is being left as-is until it can be revisited as part of the tokens effort in the future.
|
|
7
|
+
*/
|
|
3
8
|
// Default status label styling
|
|
4
9
|
@mixin vf-p-status-label {
|
|
5
10
|
%vf-status-label {
|
|
@@ -34,9 +34,9 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
34
34
|
.p-tooltip__message {
|
|
35
35
|
@extend %small-text;
|
|
36
36
|
|
|
37
|
-
background-color: $
|
|
37
|
+
background-color: $colors--theme--background-alt;
|
|
38
38
|
border: 0;
|
|
39
|
-
color: $
|
|
39
|
+
color: $colors--theme--text-default;
|
|
40
40
|
display: none;
|
|
41
41
|
left: -2 * $triangle-height;
|
|
42
42
|
margin-bottom: 0;
|
|
@@ -50,6 +50,24 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
50
50
|
white-space: pre;
|
|
51
51
|
z-index: 11; // one step above p-navigation's z-index
|
|
52
52
|
|
|
53
|
+
@include vf-theme-dark; // Default to dark theme
|
|
54
|
+
|
|
55
|
+
// stylelint-disable selector-max-type -- Tooltip theming is based on theming of the document body.
|
|
56
|
+
// Apply light theme if the page or the tooltip component is dark
|
|
57
|
+
body.is-dark &,
|
|
58
|
+
.p-tooltip.is-dark & {
|
|
59
|
+
@include vf-theme-light;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Override to dark theme if the page or the tooltip component is light or paper
|
|
63
|
+
body.is-light &,
|
|
64
|
+
body.is-paper &,
|
|
65
|
+
.p-tooltip.is-light &,
|
|
66
|
+
.p-tooltip.is-paper & {
|
|
67
|
+
@include vf-theme-dark;
|
|
68
|
+
}
|
|
69
|
+
// stylelint-enable selector-max-type
|
|
70
|
+
|
|
53
71
|
.is-detached & {
|
|
54
72
|
display: block;
|
|
55
73
|
}
|
|
@@ -57,7 +75,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
57
75
|
// tooltip
|
|
58
76
|
&::before {
|
|
59
77
|
border: {
|
|
60
|
-
bottom: $triangle-height solid $
|
|
78
|
+
bottom: $triangle-height solid $colors--theme--background-alt;
|
|
61
79
|
left: $triangle-height solid transparent;
|
|
62
80
|
right: $triangle-height solid transparent;
|
|
63
81
|
}
|
|
@@ -152,7 +170,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
152
170
|
bottom: $triangle-height solid transparent;
|
|
153
171
|
left: $triangle-height solid transparent;
|
|
154
172
|
right: $triangle-height solid transparent;
|
|
155
|
-
top: $triangle-height solid $
|
|
173
|
+
top: $triangle-height solid $colors--theme--background-alt;
|
|
156
174
|
}
|
|
157
175
|
|
|
158
176
|
bottom: -2 * $triangle-height;
|
|
@@ -186,7 +204,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
186
204
|
bottom: $triangle-height solid transparent;
|
|
187
205
|
left: $triangle-height solid transparent;
|
|
188
206
|
right: $triangle-height solid transparent;
|
|
189
|
-
top: $triangle-height solid $
|
|
207
|
+
top: $triangle-height solid $colors--theme--background-alt;
|
|
190
208
|
}
|
|
191
209
|
|
|
192
210
|
bottom: -2 * $triangle-height;
|
|
@@ -223,7 +241,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
223
241
|
bottom: $triangle-height solid transparent;
|
|
224
242
|
left: $triangle-height solid transparent;
|
|
225
243
|
right: $triangle-height solid transparent;
|
|
226
|
-
top: $triangle-height solid $
|
|
244
|
+
top: $triangle-height solid $colors--theme--background-alt;
|
|
227
245
|
}
|
|
228
246
|
|
|
229
247
|
bottom: -2 * $triangle-height;
|
|
@@ -257,7 +275,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
257
275
|
border: {
|
|
258
276
|
bottom: $triangle-height solid transparent;
|
|
259
277
|
left: $triangle-height solid transparent;
|
|
260
|
-
right: $triangle-height solid $
|
|
278
|
+
right: $triangle-height solid $colors--theme--background-alt;
|
|
261
279
|
top: $triangle-height solid transparent;
|
|
262
280
|
}
|
|
263
281
|
|
|
@@ -296,7 +314,7 @@ $tooltip-overlay-top-border-radius: 0% 0% 100% 100%;
|
|
|
296
314
|
&::before {
|
|
297
315
|
border: {
|
|
298
316
|
bottom: $triangle-height solid transparent;
|
|
299
|
-
left: $triangle-height solid $
|
|
317
|
+
left: $triangle-height solid $colors--theme--background-alt;
|
|
300
318
|
right: $triangle-height solid transparent;
|
|
301
319
|
top: $triangle-height solid transparent;
|
|
302
320
|
}
|
|
@@ -5,3 +5,19 @@ $breakpoint-large: 1036px !default;
|
|
|
5
5
|
$breakpoint-navigation-threshold: $breakpoint-large !default;
|
|
6
6
|
$breakpoint-heading-threshold: $breakpoint-large !default;
|
|
7
7
|
$breakpoint-x-large: 1681px !default; // exclude most laptops
|
|
8
|
+
|
|
9
|
+
// Mapping of breakpoint names to the min and max widths at which they apply.
|
|
10
|
+
$breakpoint-bounds: (
|
|
11
|
+
small: (
|
|
12
|
+
min: null,
|
|
13
|
+
max: $breakpoint-small,
|
|
14
|
+
),
|
|
15
|
+
medium: (
|
|
16
|
+
min: $breakpoint-small,
|
|
17
|
+
max: $breakpoint-large,
|
|
18
|
+
),
|
|
19
|
+
large: (
|
|
20
|
+
min: $breakpoint-large,
|
|
21
|
+
max: null,
|
|
22
|
+
),
|
|
23
|
+
);
|
|
@@ -39,9 +39,8 @@ $color-link-visited-dark: #a679d2 !default;
|
|
|
39
39
|
$color-focus-dark: #9cf !default;
|
|
40
40
|
|
|
41
41
|
// Focus modifications to meet AA 3:1 contrast ratio against
|
|
42
|
-
// button background for positive
|
|
42
|
+
// button background for positive buttons
|
|
43
43
|
$color-focus-positive: #003008 !default;
|
|
44
|
-
$color-focus-negative: #3b0006 !default;
|
|
45
44
|
|
|
46
45
|
// Button background color changes
|
|
47
46
|
$input-background-opacity-amount: 0.04;
|
|
@@ -105,6 +104,9 @@ $states: (
|
|
|
105
104
|
// --border-default - default border color
|
|
106
105
|
// --border-high-contrast - high contrast version of border color, to be used when border needs more visibility (form inputs, etc)
|
|
107
106
|
// --border-low-contrast - low contrast version of border color, to be used when border needs more visibility (separators)
|
|
107
|
+
//
|
|
108
|
+
// Highlight colors:
|
|
109
|
+
// --accent - default accent color
|
|
108
110
|
|
|
109
111
|
// Light theme
|
|
110
112
|
$colors--light-theme--text-default: #000 !default;
|
|
@@ -178,9 +180,9 @@ $colors--dark-theme--focus: $color-focus-dark !default;
|
|
|
178
180
|
$colors--dark-theme--background-default: #262626 !default;
|
|
179
181
|
$colors--dark-theme--background-alt: #202020 !default;
|
|
180
182
|
$colors--dark-theme--background-code: $color-code-background-dark !default;
|
|
181
|
-
$colors--dark-theme--background-inputs:
|
|
182
|
-
$colors--dark-theme--background-active:
|
|
183
|
-
$colors--dark-theme--background-hover:
|
|
183
|
+
$colors--dark-theme--background-inputs: #2f2f2f !default;
|
|
184
|
+
$colors--dark-theme--background-active: #373737 !default;
|
|
185
|
+
$colors--dark-theme--background-hover: #313131 !default;
|
|
184
186
|
$colors--dark-theme--background-overlay: transparentize($color-dark, 0.15) !default;
|
|
185
187
|
|
|
186
188
|
$colors--dark-theme--border-default: rgba($colors--dark-theme--text-default, 0.2) !default;
|
|
@@ -226,9 +228,9 @@ $colors-dark-theme--tinted-borders: (
|
|
|
226
228
|
);
|
|
227
229
|
|
|
228
230
|
// Paper theme (work in progress)
|
|
229
|
-
$colors--paper-theme--background-inputs:
|
|
230
|
-
$colors--paper-theme--background-active:
|
|
231
|
-
$colors--paper-theme--background-hover:
|
|
231
|
+
$colors--paper-theme--background-inputs: #eaeaea !default;
|
|
232
|
+
$colors--paper-theme--background-active: #e0e0e0 !default;
|
|
233
|
+
$colors--paper-theme--background-hover: #e7e7e7 !default;
|
|
232
234
|
|
|
233
235
|
// Current theme (based on CSS variables)
|
|
234
236
|
// This is a mapping between SCSS variable and it's CSS property equivalent.
|
|
@@ -286,6 +288,8 @@ $colors--theme--button-negative-hover: var(--vf-color-button-negative-hover);
|
|
|
286
288
|
$colors--theme--button-negative-active: var(--vf-color-button-negative-active);
|
|
287
289
|
$colors--theme--button-negative-text: var(--vf-color-button-negative-text);
|
|
288
290
|
|
|
291
|
+
$colors--theme--accent: var(--vf-color-accent);
|
|
292
|
+
|
|
289
293
|
// Theme colors exposed as CSS custom properties
|
|
290
294
|
@mixin vf-theme-light--colors {
|
|
291
295
|
// SCSS variables need to be interpolated to work in CSS custom properties
|
|
@@ -340,6 +344,8 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
|
|
|
340
344
|
--vf-color-button-negative-hover: #{adjust-color($color-negative, $lightness: -$hover-background-opacity-percentage)};
|
|
341
345
|
--vf-color-button-negative-active: #{adjust-color($color-negative, $lightness: -$active-background-opacity-percentage)};
|
|
342
346
|
--vf-color-button-negative-text: #{vf-contrast-text-color($color-negative)};
|
|
347
|
+
|
|
348
|
+
--vf-color-accent: #{$color-accent};
|
|
343
349
|
}
|
|
344
350
|
|
|
345
351
|
@mixin vf-theme-dark--colors {
|
|
@@ -395,6 +401,8 @@ $colors--theme--button-negative-text: var(--vf-color-button-negative-text);
|
|
|
395
401
|
--vf-color-button-negative-hover: #{adjust-color($color-negative-dark, $lightness: -$hover-background-opacity-percentage)};
|
|
396
402
|
--vf-color-button-negative-active: #{adjust-color($color-negative-dark, $lightness: -$active-background-opacity-percentage)};
|
|
397
403
|
--vf-color-button-negative-text: #{vf-contrast-text-color($color-negative-dark)};
|
|
404
|
+
|
|
405
|
+
--vf-color-accent: #{$color-accent-dark};
|
|
398
406
|
}
|
|
399
407
|
|
|
400
408
|
@mixin vf-theme-paper--colors {
|
|
@@ -415,4 +423,5 @@ $color-ubuntu: #e95420; // Ubuntu orange, should not be overridden
|
|
|
415
423
|
$color-brand: $color-ubuntu !default;
|
|
416
424
|
$color-brand-dark: $color-brand !default;
|
|
417
425
|
$color-accent: #0f95a1 !default;
|
|
426
|
+
$color-accent-dark: #70bbc2 !default;
|
|
418
427
|
$color-accent-background: $colors--dark-theme--background-default !default; // changed from "brand" colour to dark theme background
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
float: right !important;
|
|
7
7
|
|
|
8
8
|
&--small {
|
|
9
|
-
@media (
|
|
9
|
+
@media (width < $breakpoint-small) {
|
|
10
10
|
float: right !important;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&--medium {
|
|
15
|
-
@media (
|
|
15
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
16
16
|
float: right !important;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&--large {
|
|
21
|
-
@media (
|
|
21
|
+
@media ($breakpoint-large <= width) {
|
|
22
22
|
float: right !important;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
float: left !important;
|
|
29
29
|
|
|
30
30
|
&--small {
|
|
31
|
-
@media (
|
|
31
|
+
@media (width < $breakpoint-small) {
|
|
32
32
|
float: left !important;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&--medium {
|
|
37
|
-
@media (
|
|
37
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
38
38
|
float: left !important;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&--large {
|
|
43
|
-
@media (
|
|
43
|
+
@media ($breakpoint-large <= width) {
|
|
44
44
|
float: left !important;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
display: none !important;
|
|
22
22
|
|
|
23
23
|
&--small {
|
|
24
|
-
@media (
|
|
24
|
+
@media (width < $breakpoint-small) {
|
|
25
25
|
display: none !important;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
&--medium {
|
|
30
|
-
@media (
|
|
30
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
31
31
|
display: none !important;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
&--large {
|
|
36
|
-
@media (
|
|
36
|
+
@media ($breakpoint-large <= width) {
|
|
37
37
|
display: none !important;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
@include vf-hide-table-column;
|
|
46
46
|
|
|
47
47
|
&--small {
|
|
48
|
-
@media (
|
|
48
|
+
@media (width < $breakpoint-small) {
|
|
49
49
|
@include vf-hide-table-column;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
&--medium {
|
|
54
|
-
@media (
|
|
54
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
55
55
|
@include vf-hide-table-column;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&--large {
|
|
60
|
-
@media (
|
|
60
|
+
@media ($breakpoint-large <= width) {
|
|
61
61
|
@include vf-hide-table-column;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
display: none !important;
|
|
70
70
|
|
|
71
71
|
&--small {
|
|
72
|
-
@media (
|
|
72
|
+
@media (width < $breakpoint-small) {
|
|
73
73
|
display: none !important;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
&--medium {
|
|
78
|
-
@media (
|
|
78
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
79
79
|
display: none !important;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&--large {
|
|
84
|
-
@media (
|
|
84
|
+
@media ($breakpoint-large <= width) {
|
|
85
85
|
display: none !important;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
display: initial !important;
|
|
7
7
|
|
|
8
8
|
&--small {
|
|
9
|
-
@media (
|
|
9
|
+
@media (width < $breakpoint-small) {
|
|
10
10
|
display: inherit !important;
|
|
11
11
|
display: initial !important;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&--medium {
|
|
16
|
-
@media (
|
|
16
|
+
@media ($breakpoint-small <= width < $breakpoint-large) {
|
|
17
17
|
display: inherit !important;
|
|
18
18
|
display: initial !important;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&--large {
|
|
23
|
-
@media (
|
|
23
|
+
@media ($breakpoint-large <= width) {
|
|
24
24
|
display: inherit !important;
|
|
25
25
|
display: initial !important;
|
|
26
26
|
}
|
package/scss/_vanilla.scss
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@import 'patterns_chip';
|
|
12
12
|
@import 'patterns_code-snippet';
|
|
13
13
|
@import 'patterns_contextual-menu';
|
|
14
|
+
@import 'patterns_cta';
|
|
14
15
|
@import 'patterns_divider';
|
|
15
16
|
@import 'patterns_equal-height-row';
|
|
16
17
|
@import 'patterns_form-help-text';
|
|
@@ -104,6 +105,7 @@
|
|
|
104
105
|
@include vf-p-chip;
|
|
105
106
|
@include vf-p-code-snippet;
|
|
106
107
|
@include vf-p-contextual-menu;
|
|
108
|
+
@include vf-p-cta-block;
|
|
107
109
|
@include vf-p-divider;
|
|
108
110
|
@include vf-p-equal-height-row;
|
|
109
111
|
@include vf-p-form-help-text;
|