vanilla-framework 4.15.0 → 4.17.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.
Files changed (47) hide show
  1. package/package.json +17 -13
  2. package/scss/_base_button.scss +1 -1
  3. package/scss/_base_details.scss +1 -1
  4. package/scss/_base_forms.scss +8 -2
  5. package/scss/_base_hr.scss +2 -3
  6. package/scss/_base_icon-definitions.scss +629 -0
  7. package/scss/_base_links.scss +1 -1
  8. package/scss/_base_placeholders.scss +2 -0
  9. package/scss/_base_typography-definitions.scss +1 -1
  10. package/scss/_global_functions.scss +21 -8
  11. package/scss/_layouts_fluid-breakout.scss +2 -2
  12. package/scss/_patterns_accordion.scss +1 -1
  13. package/scss/_patterns_article-pagination.scss +2 -2
  14. package/scss/_patterns_buttons.scss +1 -1
  15. package/scss/_patterns_chip.scss +68 -68
  16. package/scss/_patterns_code-snippet.scss +1 -1
  17. package/scss/_patterns_contextual-menu.scss +1 -1
  18. package/scss/_patterns_cta.scss +7 -0
  19. package/scss/_patterns_equal-height-row.scss +87 -43
  20. package/scss/_patterns_icons.scss +340 -0
  21. package/scss/_patterns_image.scss +53 -16
  22. package/scss/_patterns_links.scss +6 -5
  23. package/scss/_patterns_list-tree.scss +49 -43
  24. package/scss/_patterns_lists.scss +58 -17
  25. package/scss/_patterns_matrix.scss +2 -2
  26. package/scss/_patterns_navigation.scss +4 -4
  27. package/scss/_patterns_pull-quotes.scss +1 -1
  28. package/scss/_patterns_rule.scss +6 -2
  29. package/scss/_patterns_search-and-filter.scss +11 -12
  30. package/scss/_patterns_separator.scss +1 -0
  31. package/scss/_patterns_side-navigation.scss +1 -1
  32. package/scss/_patterns_status-label.scss +5 -0
  33. package/scss/_patterns_strip.scss +3 -2
  34. package/scss/_patterns_switch.scss +2 -1
  35. package/scss/_patterns_table-mobile-card.scss +1 -1
  36. package/scss/_patterns_tooltips.scss +26 -8
  37. package/scss/_settings_breakpoints.scss +16 -0
  38. package/scss/_settings_colors.scss +20 -15
  39. package/scss/_settings_placeholders.scss +4 -3
  40. package/scss/_utilities_baseline-grid.scss +3 -2
  41. package/scss/_utilities_content-align.scss +9 -0
  42. package/scss/_utilities_floats.scss +6 -6
  43. package/scss/_utilities_font-metrics.scss +4 -3
  44. package/scss/_utilities_hide.scss +9 -9
  45. package/scss/_utilities_show.scss +3 -3
  46. package/templates/_macros/vf_hero.jinja +186 -0
  47. package/templates/_macros/vf_tiered-list.jinja +115 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-framework",
3
- "version": "4.15.0",
3
+ "version": "4.17.0",
4
4
  "author": {
5
5
  "email": "webteam@canonical.com",
6
6
  "name": "Canonical Webteam"
@@ -29,8 +29,9 @@
29
29
  "scripts": {
30
30
  "start": "yarn build && yarn serve",
31
31
  "build": "yarn build-scss && yarn build-js && yarn build-class-references",
32
- "build-scss": "sass --load-path=node_modules --embed-sources --style=compressed scss:build/css && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
33
- "build:essential": "yarn run build-js && sass --load-path=node_modules --embed-sources --style=compressed scss/build.scss:build/css/build.css scss/docs:build/css/docs && postcss --use autoprefixer --replace 'build/css/**/*.css' --map",
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",
34
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",
35
36
  "build-class-references": "node scripts/create-class-references.js",
36
37
  "cypress:open": "cypress open",
@@ -41,8 +42,8 @@
41
42
  "test": "yarn lint-scss && yarn lint-prettier && yarn test-spelling && yarn test-scss && yarn jest",
42
43
  "lint-prettier": "prettier -c .",
43
44
  "lint-scss": "stylelint 'scss/**/*.scss'",
44
- "watch:scss": "sass --load-path=node_modules --embed-sources --style=compressed scss:build/css --watch",
45
- "watch:essential": "sass --load-path=node_modules --embed-sources --style=compressed scss/build.scss:build/css/build.css --watch",
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",
46
47
  "watch": "yarn build && yarn watch:scss",
47
48
  "clean": "rm -rf build docs/static/css node_modules/ yarn-error.log",
48
49
  "percy": "percy snapshot snapshots.js",
@@ -52,29 +53,32 @@
52
53
  "_index.scss",
53
54
  "/scss",
54
55
  "!/scss/docs",
55
- "!/scss/standalone"
56
+ "!/scss/standalone",
57
+ "/templates/_macros"
56
58
  ],
57
59
  "devDependencies": {
58
60
  "@canonical/cookie-policy": "3.6.4",
59
61
  "@canonical/latest-news": "1.5.0",
60
- "@percy/cli": "1.29.0",
62
+ "@percy/cli": "1.29.4",
61
63
  "@testing-library/cypress": "10.0.2",
62
- "autoprefixer": "10.4.19",
63
- "cypress": "13.13.2",
64
+ "autoprefixer": "10.4.20",
65
+ "cypress": "13.15.0",
64
66
  "jest": "29.7.0",
65
67
  "js-beautify": "1.15.1",
66
68
  "markdown-spellcheck": "1.3.1",
69
+ "mime": "3.0.0",
67
70
  "parker": "0.0.10",
68
- "postcss": "8.4.40",
71
+ "postcss": "8.4.47",
69
72
  "postcss-cli": "11.0.0",
70
73
  "postcss-scss": "4.0.9",
71
74
  "prettier": "3.3.3",
72
- "sass": "1.77.8",
73
- "stylelint": "16.8.1",
75
+ "sass": "1.79.4",
76
+ "style-dictionary": "4.1.2",
77
+ "stylelint": "16.9.0",
74
78
  "stylelint-config-recommended-scss": "14.1.0",
75
79
  "stylelint-order": "6.0.4",
76
80
  "stylelint-prettier": "5.0.2",
77
81
  "svgo": "3.3.2",
78
- "yaml": "2.5.0"
82
+ "yaml": "2.5.1"
79
83
  }
80
84
  }
@@ -15,7 +15,7 @@
15
15
 
16
16
  %vf-button-base {
17
17
  @include vf-transition(#{background-color, border-color}, snap, in);
18
- @include vf-focus;
18
+ @include vf-focus-themed;
19
19
 
20
20
  border-style: solid;
21
21
  border-width: $input-border-thickness;
@@ -7,7 +7,7 @@
7
7
 
8
8
  summary {
9
9
  @extend %common-default-text-properties;
10
- @include vf-focus;
10
+ @include vf-focus-themed;
11
11
 
12
12
  margin-bottom: $spv-nudge; //push subsequent text onto baseline
13
13
  max-width: $text-max-width;
@@ -13,7 +13,7 @@
13
13
  // Default form input element styles
14
14
  %vf-input-elements {
15
15
  @extend %bordered-text-vertical-padding;
16
- @include vf-focus($has-validation: true);
16
+ @include vf-focus-themed($has-validation: true);
17
17
  @include vf-animation(#{background-color}, fast);
18
18
 
19
19
  // stylelint-disable property-no-vendor-prefix
@@ -145,7 +145,7 @@
145
145
 
146
146
  [type='file'] {
147
147
  @extend %bordered-text-vertical-padding;
148
- @include vf-focus;
148
+ @include vf-focus-themed;
149
149
 
150
150
  margin-bottom: $input-margin-bottom;
151
151
  width: 100%;
@@ -225,5 +225,11 @@
225
225
  margin-right: 0;
226
226
  padding: calc($spv--large - $input-border-thickness);
227
227
  }
228
+
229
+ legend {
230
+ &.is-required::before {
231
+ content: '* ';
232
+ }
233
+ }
228
234
  // stylelint-enable selector-max-type
229
235
  }
@@ -27,10 +27,8 @@
27
27
  // stylelint-disable selector-max-type -- base styles can use type selectors
28
28
  hr {
29
29
  @extend %hr;
30
- background: $colors--theme--border-default;
31
-
32
- margin-bottom: calc($spv--small - 1px);
33
30
 
31
+ // DEPRECATED: use `.p-rule--muted` instead
34
32
  &.is-muted {
35
33
  background-color: $colors--theme--border-low-contrast;
36
34
  }
@@ -40,6 +38,7 @@
40
38
  @extend %u-no-margin--bottom--hr;
41
39
  }
42
40
 
41
+ // DEPRECATED: use rule component inside of the grid instead
43
42
  &.is-fixed-width {
44
43
  @extend %fixed-width-hr;
45
44
  }