vanilla-framework 2.34.0 → 2.37.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/package.json +9 -11
- package/scss/_base_forms-tick-elements.scss +3 -1
- package/scss/_base_forms.scss +8 -3
- package/scss/_base_placeholders.scss +10 -2
- package/scss/_patterns_accordion.scss +8 -0
- package/scss/_patterns_card.scss +5 -1
- package/scss/_patterns_form-help-text.scss +4 -0
- package/scss/_patterns_form-tick-elements.scss +28 -0
- package/scss/_patterns_form-validation.scss +15 -65
- package/scss/_patterns_modal.scss +7 -2
- package/scss/_patterns_notifications.scss +2 -0
- package/scss/standalone/patterns_accordion.scss +2 -0
- package/scss/standalone/patterns_card.scss +1 -0
- package/scss/standalone/patterns_form-tick-elements.scss +1 -0
- package/scss/standalone/patterns_forms.scss +1 -0
package/package.json
CHANGED
|
@@ -43,31 +43,29 @@
|
|
|
43
43
|
"percy": "percy exec -- node snapshots.js",
|
|
44
44
|
"icon-svgs-to-mixins": "node scripts/convert-svgs-to-icon-mixins.js icons"
|
|
45
45
|
},
|
|
46
|
-
"version": "2.
|
|
46
|
+
"version": "2.37.1",
|
|
47
47
|
"files": [
|
|
48
48
|
"/scss",
|
|
49
49
|
"!/scss/docs"
|
|
50
50
|
],
|
|
51
|
-
"
|
|
51
|
+
"devDependencies": {
|
|
52
52
|
"@canonical/cookie-policy": "3.3.0",
|
|
53
53
|
"@canonical/latest-news": "1.2.0",
|
|
54
|
-
"autoprefixer": "10.3.1",
|
|
55
|
-
"node-sass": "6.0.1",
|
|
56
|
-
"postcss": "8.3.6",
|
|
57
|
-
"postcss-cli": "8.3.1"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
54
|
"@percy/script": "1.1.0",
|
|
55
|
+
"autoprefixer": "10.4.0",
|
|
61
56
|
"get-site-urls": "1.1.7",
|
|
62
57
|
"markdown-spellcheck": "1.3.1",
|
|
58
|
+
"node-sass": "6.0.1",
|
|
63
59
|
"parker": "0.0.10",
|
|
64
|
-
"
|
|
60
|
+
"postcss": "8.3.11",
|
|
61
|
+
"postcss-cli": "8.3.1",
|
|
62
|
+
"prettier": "2.4.1",
|
|
65
63
|
"stylelint": "13.13.1",
|
|
66
64
|
"stylelint-config-prettier": "8.0.2",
|
|
67
65
|
"stylelint-config-standard": "22.0.0",
|
|
68
66
|
"stylelint-order": "4.1.0",
|
|
69
67
|
"stylelint-prettier": "1.2.0",
|
|
70
|
-
"stylelint-scss": "3.
|
|
71
|
-
"svgo": "2.
|
|
68
|
+
"stylelint-scss": "3.21.0",
|
|
69
|
+
"svgo": "2.7.0"
|
|
72
70
|
}
|
|
73
71
|
}
|
|
@@ -141,7 +141,9 @@ $box-offsets-top: (
|
|
|
141
141
|
@extend %vf-tick-in-label;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
& + label
|
|
144
|
+
& + label,
|
|
145
|
+
//Ensuring the required labels don't break on base checkbox
|
|
146
|
+
& + label.is-required {
|
|
145
147
|
@extend %vf-pseudo-tick-box;
|
|
146
148
|
|
|
147
149
|
// Align with different text styles
|
package/scss/_base_forms.scss
CHANGED
|
@@ -100,9 +100,8 @@
|
|
|
100
100
|
padding-top: map-get($nudges, nudge--p);
|
|
101
101
|
width: fit-content;
|
|
102
102
|
|
|
103
|
-
&.is-required::
|
|
104
|
-
|
|
105
|
-
content: ' *';
|
|
103
|
+
&.is-required::before {
|
|
104
|
+
content: '* ';
|
|
106
105
|
position: relative;
|
|
107
106
|
}
|
|
108
107
|
|
|
@@ -163,6 +162,12 @@
|
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
|
|
165
|
+
input[list] {
|
|
166
|
+
&::-webkit-calendar-picker-indicator {
|
|
167
|
+
opacity: 0;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
166
171
|
// Select styles
|
|
167
172
|
select {
|
|
168
173
|
@include vf-icon-chevron;
|
|
@@ -33,12 +33,20 @@
|
|
|
33
33
|
color: $color-dark;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
%vf-card-padding {
|
|
37
|
+
overflow: auto;
|
|
38
|
+
padding: $spv-inner--large;
|
|
39
|
+
}
|
|
40
|
+
|
|
36
41
|
%vf-card {
|
|
37
42
|
@extend %vf-bg--x-light;
|
|
43
|
+
@extend %vf-card-padding;
|
|
38
44
|
|
|
39
45
|
margin-bottom: $spv-outer--scaleable;
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
%vf-card-inner {
|
|
49
|
+
@extend %vf-card-padding;
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
//accordion, table
|
|
@@ -51,6 +51,10 @@
|
|
|
51
51
|
|
|
52
52
|
// override base expanded button styles
|
|
53
53
|
background-color: inherit;
|
|
54
|
+
&:hover {
|
|
55
|
+
background-color: $colors--light-theme--background-hover;
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
background-size: $icon-size;
|
|
55
59
|
}
|
|
56
60
|
|
|
@@ -156,5 +160,9 @@
|
|
|
156
160
|
&[aria-hidden='true'] {
|
|
157
161
|
display: none;
|
|
158
162
|
}
|
|
163
|
+
|
|
164
|
+
&.has-tick-elements {
|
|
165
|
+
padding-left: 1em;
|
|
166
|
+
}
|
|
159
167
|
}
|
|
160
168
|
}
|
package/scss/_patterns_card.scss
CHANGED
|
@@ -57,8 +57,8 @@
|
|
|
57
57
|
// If possible, please consider adding a modifier to a base pattern, so it can be used elsewhere too.
|
|
58
58
|
|
|
59
59
|
.p-card__image {
|
|
60
|
+
display: block;
|
|
60
61
|
margin-bottom: $spv-inner--small;
|
|
61
|
-
vertical-align: top;
|
|
62
62
|
width: 100%;
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
.p-card__inner {
|
|
76
|
+
@extend %vf-card-inner;
|
|
77
|
+
}
|
|
78
|
+
|
|
75
79
|
.p-card__content {
|
|
76
80
|
@extend %u-no-margin--bottom--default-text;
|
|
77
81
|
}
|
|
@@ -6,5 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
color: $color-mid-dark;
|
|
8
8
|
margin-top: $sp-unit * 2 - $spv-outer--scaleable; // negate the effect of scaling, as we don't want helper text position to change when the density multiplier changes
|
|
9
|
+
|
|
10
|
+
&.is-tick-element {
|
|
11
|
+
margin-left: $sph-inner + $form-tick-box-size;
|
|
12
|
+
}
|
|
9
13
|
}
|
|
10
14
|
}
|
|
@@ -8,7 +8,35 @@
|
|
|
8
8
|
.p-radio,
|
|
9
9
|
.p-radio--heading,
|
|
10
10
|
.p-radio--inline {
|
|
11
|
+
$asterisk-width: 1ch;
|
|
12
|
+
|
|
11
13
|
position: relative;
|
|
14
|
+
// repositioning asterisk in front of the label
|
|
15
|
+
&.is-required {
|
|
16
|
+
&::before {
|
|
17
|
+
display: block;
|
|
18
|
+
left: $sph-inner + $form-tick-box-size;
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: $asterisk-width;
|
|
21
|
+
}
|
|
22
|
+
.p-radio__label,
|
|
23
|
+
.p-checkbox__label {
|
|
24
|
+
padding-left: calc(#{$sph-inner + $form-tick-box-size} + #{$asterisk-width});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Fix label alignment when text drops to new line
|
|
30
|
+
.p-checkbox,
|
|
31
|
+
.p-radio {
|
|
32
|
+
padding-left: $sph-inner + $form-tick-box-size;
|
|
33
|
+
text-indent: -1 * ($sph-inner + $form-tick-box-size);
|
|
34
|
+
|
|
35
|
+
&.is-required {
|
|
36
|
+
&::before {
|
|
37
|
+
left: $sph-inner + $form-tick-box-size + $sph-inner + $form-tick-box-size;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
12
40
|
}
|
|
13
41
|
|
|
14
42
|
// specify both [type] and class to fight specificity of base `label [type]` styles
|
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
@import 'settings';
|
|
2
2
|
|
|
3
|
-
@mixin vf-validation-wrapper {
|
|
4
|
-
color: $color-dark;
|
|
5
|
-
position: relative;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
3
|
// form validation styling for form inputs
|
|
9
4
|
@mixin vf-p-form-validation {
|
|
10
5
|
$icon-size: map-get($icon-sizes, default);
|
|
11
6
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
// Not using parent selector here as two classes are required to override atribute selectors in reset
|
|
18
|
-
background-position: calc(100% - #{$sph-inner--small}) 50%;
|
|
19
|
-
background-repeat: no-repeat;
|
|
20
|
-
}
|
|
7
|
+
%vf-validation-wrapper {
|
|
8
|
+
background-position: left, center;
|
|
9
|
+
background-repeat: no-repeat;
|
|
10
|
+
padding-left: calc(#{$icon-size} + #{$sph-inner--small});
|
|
11
|
+
padding-top: 0;
|
|
21
12
|
}
|
|
22
13
|
|
|
23
14
|
.p-form-validation__message {
|
|
@@ -26,57 +17,16 @@
|
|
|
26
17
|
margin-top: $sp-unit * 2 - $spv-outer--scaleable; // negate the effect of scaling, as we don't want helper text position to change when the density multiplier changes
|
|
27
18
|
}
|
|
28
19
|
|
|
29
|
-
.p-form-validation__icon {
|
|
30
|
-
position: relative;
|
|
31
|
-
|
|
32
|
-
&::after {
|
|
33
|
-
position: absolute;
|
|
34
|
-
right: $sp-small;
|
|
35
|
-
top: calc(50% - #{$sp-x-small});
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.is-success,
|
|
40
|
-
.is-error,
|
|
41
|
-
.is-caution {
|
|
42
|
-
.p-form-validation__input {
|
|
43
|
-
padding-right: $sph-inner--small * 2 + $icon-size;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.is-error .p-form-validation__select-wrapper,
|
|
48
|
-
.is-caution .p-form-validation__select-wrapper,
|
|
49
|
-
.is-success .p-form-validation__select-wrapper {
|
|
50
|
-
min-width: 10em;
|
|
51
|
-
position: relative;
|
|
52
|
-
|
|
53
|
-
&::after {
|
|
54
|
-
background-repeat: no-repeat;
|
|
55
|
-
background-size: contain;
|
|
56
|
-
content: ' ';
|
|
57
|
-
display: block;
|
|
58
|
-
height: $icon-size;
|
|
59
|
-
pointer-events: none;
|
|
60
|
-
position: absolute;
|
|
61
|
-
right: $sp-x-large;
|
|
62
|
-
top: calc(50% - (#{$icon-size} / 2) - (#{$input-margin-bottom} / 2));
|
|
63
|
-
width: $icon-size;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.p-form-validation__input {
|
|
67
|
-
padding-right: $sph-inner--small * 2 + $icon-size * 2;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
20
|
.is-success {
|
|
72
21
|
.p-form-validation__input {
|
|
73
22
|
border-color: $color-positive;
|
|
74
23
|
}
|
|
75
24
|
|
|
76
|
-
|
|
77
|
-
:not(select).p-form-validation__input,
|
|
78
|
-
.p-form-validation__select-wrapper::after {
|
|
25
|
+
.p-form-validation__message {
|
|
79
26
|
@include vf-icon-success($color-positive);
|
|
27
|
+
@extend %vf-validation-wrapper;
|
|
28
|
+
|
|
29
|
+
color: $color-positive;
|
|
80
30
|
}
|
|
81
31
|
}
|
|
82
32
|
|
|
@@ -85,10 +35,9 @@
|
|
|
85
35
|
border-color: $color-caution;
|
|
86
36
|
}
|
|
87
37
|
|
|
88
|
-
|
|
89
|
-
:not(select).p-form-validation__input,
|
|
90
|
-
.p-form-validation__select-wrapper::after {
|
|
38
|
+
.p-form-validation__message {
|
|
91
39
|
@include vf-icon-warning($color-caution);
|
|
40
|
+
@extend %vf-validation-wrapper;
|
|
92
41
|
}
|
|
93
42
|
}
|
|
94
43
|
|
|
@@ -97,10 +46,11 @@
|
|
|
97
46
|
border-color: $color-negative;
|
|
98
47
|
}
|
|
99
48
|
|
|
100
|
-
|
|
101
|
-
:not(select).p-form-validation__input,
|
|
102
|
-
.p-form-validation__select-wrapper::after {
|
|
49
|
+
.p-form-validation__message {
|
|
103
50
|
@include vf-icon-error($color-negative);
|
|
51
|
+
@extend %vf-validation-wrapper;
|
|
52
|
+
|
|
53
|
+
color: $color-negative;
|
|
104
54
|
}
|
|
105
55
|
}
|
|
106
56
|
}
|
|
@@ -25,15 +25,14 @@
|
|
|
25
25
|
@extend %vf-has-box-shadow;
|
|
26
26
|
@extend %vf-has-round-corners;
|
|
27
27
|
|
|
28
|
-
bottom: $spv-inner--large;
|
|
29
28
|
left: $sph-inner--large;
|
|
30
29
|
margin-bottom: 0;
|
|
31
30
|
max-height: calc(100% - #{2 * $spv-inner--large});
|
|
32
31
|
max-width: $grid-max-width;
|
|
33
32
|
overflow: auto;
|
|
33
|
+
padding-top: 0;
|
|
34
34
|
position: absolute;
|
|
35
35
|
right: $sph-inner--large;
|
|
36
|
-
top: $spv-inner--large;
|
|
37
36
|
width: auto;
|
|
38
37
|
|
|
39
38
|
@media (min-width: $breakpoint-medium) {
|
|
@@ -48,11 +47,16 @@
|
|
|
48
47
|
.p-modal__header {
|
|
49
48
|
@extend %vf-pseudo-border--bottom;
|
|
50
49
|
|
|
50
|
+
background: $color-x-light;
|
|
51
51
|
display: flex;
|
|
52
52
|
justify-content: space-between;
|
|
53
53
|
margin-bottom: $spv-inner--small;
|
|
54
54
|
// add padding to accommodate the width of p-modal__close
|
|
55
55
|
padding-right: $icon-size + $sph-inner--small * 2;
|
|
56
|
+
padding-top: $spv-inner--large;
|
|
57
|
+
position: sticky;
|
|
58
|
+
top: 0;
|
|
59
|
+
z-index: 10;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
.p-modal__title {
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
box-sizing: content-box;
|
|
74
78
|
height: $icon-size;
|
|
75
79
|
margin: 0;
|
|
80
|
+
margin-top: $spv-inner--large;
|
|
76
81
|
padding: $sp-unit;
|
|
77
82
|
position: absolute;
|
|
78
83
|
right: 0;
|
|
@@ -74,6 +74,7 @@ $notification-text-margin-bottom: $spv-outer--medium - $spv-nudge;
|
|
|
74
74
|
@extend %common-default-text-properties;
|
|
75
75
|
|
|
76
76
|
margin-bottom: $notification-text-margin-bottom;
|
|
77
|
+
max-width: unset;
|
|
77
78
|
padding-right: 2 * $sph-inner;
|
|
78
79
|
}
|
|
79
80
|
|
|
@@ -87,6 +88,7 @@ $notification-text-margin-bottom: $spv-outer--medium - $spv-nudge;
|
|
|
87
88
|
|
|
88
89
|
.p-notification__message {
|
|
89
90
|
margin: 0;
|
|
91
|
+
max-width: unset;
|
|
90
92
|
padding: 0;
|
|
91
93
|
}
|
|
92
94
|
|