vanilla-framework 4.18.4 → 4.19.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"start": "yarn build && yarn serve",
|
|
31
31
|
"build": "yarn build-scss && yarn build-js && yarn build-class-references",
|
|
32
32
|
"build-tokens": "((style-dictionary build --verbose --config ./sd.config.json) || true)",
|
|
33
|
-
"build-scss": "yarn build-tokens && sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls scss:build/css && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
|
|
34
|
-
"build:essential": "yarn run build-js && sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls scss/build.scss:build/css/build.css scss/docs:build/css/docs && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
|
|
33
|
+
"build-scss": "yarn build-tokens && sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls,import,global-builtin scss:build/css && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
|
|
34
|
+
"build:essential": "yarn run build-js && sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls,import,global-builtin scss/build.scss:build/css/build.css scss/docs:build/css/docs && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
|
|
35
35
|
"build-js": "mkdir -p build/js/modules && cp node_modules/@canonical/cookie-policy/build/js/cookie-policy.js build/js/modules && cp node_modules/@canonical/latest-news/dist/latest-news.js build/js/modules && cp node_modules/js-beautify/js/lib/beautify.js node_modules/js-beautify/js/lib/beautify-html.js node_modules/js-beautify/js/lib/beautify-css.js build/js/modules",
|
|
36
36
|
"build-class-references": "node scripts/create-class-references.js",
|
|
37
37
|
"cypress:open": "cypress open",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"test": "yarn lint-scss && yarn lint-prettier && yarn test-spelling && yarn test-scss && yarn jest",
|
|
43
43
|
"lint-prettier": "prettier -c .",
|
|
44
44
|
"lint-scss": "stylelint 'scss/**/*.scss'",
|
|
45
|
-
"watch:scss": "sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls scss:build/css --watch",
|
|
46
|
-
"watch:essential": "sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls scss/build.scss:build/css/build.css --watch",
|
|
45
|
+
"watch:scss": "sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls,import,global-builtin scss:build/css --watch",
|
|
46
|
+
"watch:essential": "sass --load-path=node_modules --embed-sources --style=compressed --silence-deprecation=mixed-decls,import,global-builtin scss/build.scss:build/css/build.css --watch",
|
|
47
47
|
"watch": "yarn build && yarn watch:scss",
|
|
48
48
|
"clean": "rm -rf build docs/static/css node_modules/ yarn-error.log",
|
|
49
49
|
"percy": "percy snapshot snapshots.js",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"/templates/_macros"
|
|
58
58
|
],
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@canonical/cookie-policy": "3.6.
|
|
60
|
+
"@canonical/cookie-policy": "3.6.5",
|
|
61
61
|
"@canonical/latest-news": "1.5.0",
|
|
62
|
-
"@percy/cli": "1.30.
|
|
62
|
+
"@percy/cli": "1.30.6",
|
|
63
63
|
"@testing-library/cypress": "10.0.2",
|
|
64
64
|
"autoprefixer": "10.4.20",
|
|
65
|
-
"cypress": "13.
|
|
65
|
+
"cypress": "13.17.0",
|
|
66
66
|
"jest": "29.7.0",
|
|
67
67
|
"js-beautify": "1.15.1",
|
|
68
68
|
"markdown-spellcheck": "1.3.1",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"postcss": "8.4.49",
|
|
72
72
|
"postcss-cli": "11.0.0",
|
|
73
73
|
"postcss-scss": "4.0.9",
|
|
74
|
-
"prettier": "3.4.
|
|
75
|
-
"sass": "1.
|
|
76
|
-
"style-dictionary": "4.
|
|
77
|
-
"stylelint": "16.
|
|
74
|
+
"prettier": "3.4.2",
|
|
75
|
+
"sass": "1.83.1",
|
|
76
|
+
"style-dictionary": "4.3.0",
|
|
77
|
+
"stylelint": "16.12.0",
|
|
78
78
|
"stylelint-config-recommended-scss": "14.1.0",
|
|
79
79
|
"stylelint-order": "6.0.4",
|
|
80
80
|
"stylelint-prettier": "5.0.2",
|
|
81
81
|
"svgo": "3.3.2",
|
|
82
|
-
"yaml": "2.
|
|
82
|
+
"yaml": "2.7.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"sass": "^1.79.0"
|
|
@@ -1471,3 +1471,18 @@
|
|
|
1471
1471
|
@mixin vf-icon-website-themed {
|
|
1472
1472
|
@include vf-themed-icon($light-value: vf-icon-website-url($colors--light-theme--icon), $dark-value: vf-icon-website-url($colors--dark-theme--icon));
|
|
1473
1473
|
}
|
|
1474
|
+
|
|
1475
|
+
// ICONS ADDED IN JANUARY 2025 v4.19.0
|
|
1476
|
+
|
|
1477
|
+
// credit card
|
|
1478
|
+
@function vf-icon-credit-card-url($color) {
|
|
1479
|
+
@return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16px' height='16px' viewBox='0 0 16 16' fill='none'%3E%3Cpath fill='#{vf-url-friendly-color($color)}' fill-rule='evenodd' d='M13 4.5H3c-.27614 0-.5.22386-.5.5v.75h11V5c0-.27614-.2239-.5-.5-.5ZM2.5 11V7.25h11V11c0 .2761-.2239.5-.5.5H3c-.27614 0-.5-.2239-.5-.5ZM3 3c-1.10457 0-2 .89543-2 2v6c0 1.1046.89543 2 2 2h10c1.1046 0 2-.8954 2-2V5c0-1.10457-.8954-2-2-2H3Zm7.75 5.5c-.4142 0-.75.33579-.75.75v.5c0 .4142.3358.75.75.75h.5c.4142 0 .75-.3358.75-.75v-.5c0-.41421-.3358-.75-.75-.75h-.5Z' clip-rule='evenodd'/%3E%3C/svg%3E");
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
@mixin vf-icon-credit-card($color) {
|
|
1483
|
+
background-image: vf-icon-credit-card-url($color);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
@mixin vf-icon-credit-card-themed {
|
|
1487
|
+
@include vf-themed-icon($light-value: vf-icon-credit-card-url($colors--light-theme--icon), $dark-value: vf-icon-credit-card-url($colors--dark-theme--icon));
|
|
1488
|
+
}
|
|
@@ -2042,4 +2042,13 @@
|
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
2044
|
|
|
2045
|
+
// ICONS ADDED IN JANUARY 2025
|
|
2046
|
+
|
|
2047
|
+
@mixin vf-p-icon-credit-card {
|
|
2048
|
+
.p-icon--credit-card {
|
|
2049
|
+
@extend %icon;
|
|
2050
|
+
@include vf-icon-credit-card-themed;
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2045
2054
|
// **Base and Pattern mixins accurate as of October 2024**
|
|
@@ -73,8 +73,10 @@
|
|
|
73
73
|
|
|
74
74
|
{%- macro _hero_title_block() -%}
|
|
75
75
|
{%- if has_full_width_image -%}
|
|
76
|
+
{%- if has_subtitle -%}
|
|
76
77
|
{#- On full-width-image, the h1 and h2 are in separate columns, so there must be no margin-bottom to keep h1 close to h2 on smaller screens -#}
|
|
77
|
-
|
|
78
|
+
{% set title_class = "u-no-margin--bottom" %}
|
|
79
|
+
{%- endif -%}
|
|
78
80
|
{%- endif -%}
|
|
79
81
|
|
|
80
82
|
{#- Only add a class attribute if needed -#}
|
|
@@ -142,9 +144,11 @@
|
|
|
142
144
|
{{ _hero_title_block() }}
|
|
143
145
|
</div>
|
|
144
146
|
<div class="{{ col_classes[1] }}">
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
{% if has_subtitle %}
|
|
148
|
+
<div class="p-section--shallow">
|
|
149
|
+
{{- _hero_subtitle_block() -}}
|
|
150
|
+
</div>
|
|
151
|
+
{% endif %}
|
|
148
152
|
{{- _hero_description_block() -}}
|
|
149
153
|
{{- _hero_cta_block() -}}
|
|
150
154
|
</div>
|