vanilla-framework 4.24.0 → 4.25.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/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/vanilla-framework.svg)](http://badge.fury.io/js/vanilla-framework)
4
4
  [![Downloads](http://img.shields.io/npm/dm/vanilla-framework.svg)](https://www.npmjs.com/package/vanilla-framework)
5
+ [![Chat in #vanilla:ubuntu.com on Matrix](https://img.shields.io/badge/chat-%23vanilla:ubuntu.com-blue.svg)](https://matrix.to/#/#vanilla:ubuntu.com)
5
6
  [![This project is using Percy.io for visual regression testing.](https://percy.io/static/images/percy-badge.svg)](https://percy.io)
6
7
 
7
8
  Vanilla Framework is an extensible CSS framework, built using [Sass](http://sass-lang.com/) and is designed to be used either directly or by using themes to extend or supplement its patterns.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vanilla-framework",
3
- "version": "4.24.0",
3
+ "version": "4.25.0",
4
4
  "author": {
5
5
  "email": "webteam@canonical.com",
6
6
  "name": "Canonical Webteam"
@@ -63,7 +63,7 @@
63
63
  "@testing-library/cypress": "10.0.3",
64
64
  "autoprefixer": "10.4.20",
65
65
  "cypress": "14.0.2",
66
- "jest": "29.7.0",
66
+ "jest": "30.0.3",
67
67
  "js-beautify": "1.15.1",
68
68
  "markdown-spellcheck": "1.3.1",
69
69
  "mime": "3.0.0",
@@ -78,7 +78,7 @@
78
78
  "stylelint-config-recommended-scss": "14.1.0",
79
79
  "stylelint-order": "6.0.4",
80
80
  "stylelint-prettier": "5.0.3",
81
- "svgo": "3.3.2",
81
+ "svgo": "4.0.0",
82
82
  "yaml": "2.7.0"
83
83
  },
84
84
  "peerDependencies": {
@@ -33,8 +33,8 @@
33
33
  line-height: map-get($line-heights, default-text);
34
34
  margin-bottom: $input-margin-bottom;
35
35
  min-width: 8em;
36
- padding-left: $sph--small;
37
- padding-right: $sph--small;
36
+ padding-left: $sph--large;
37
+ padding-right: $sph--large;
38
38
  vertical-align: baseline;
39
39
  width: 100%;
40
40
 
@@ -2,6 +2,18 @@
2
2
  @import 'settings';
3
3
 
4
4
  @mixin vf-p-chip {
5
+ %vf-chip-icon {
6
+ @extend %icon;
7
+ align-self: center;
8
+ background-size: map-get($icon-sizes, small);
9
+ flex: 0 0 auto;
10
+ // Space chip away from the content preceding it in the chip body
11
+ margin-left: $sph--x-small;
12
+ @media (min-width: $breakpoint-x-large) {
13
+ background-size: math.div(map-get($icon-sizes, small), $font-size-ratio--largescreen); //ensure no rounding happens as it positions the icon off center
14
+ }
15
+ }
16
+
5
17
  %vf-chip {
6
18
  @extend %small-text;
7
19
  @include vf-transition(#{background-color, border-color}, snap, out);
@@ -18,6 +30,7 @@
18
30
  vertical-align: calc($input-border-thickness - map-get($nudges, p));
19
31
  white-space: nowrap;
20
32
 
33
+ [class*='p-icon--'],
21
34
  .p-chip__lead,
22
35
  .p-chip__value {
23
36
  color: $colors--theme--text-default;
@@ -41,17 +54,17 @@
41
54
  }
42
55
 
43
56
  .p-chip__dismiss {
44
- @extend %icon;
57
+ @extend %vf-chip-icon;
45
58
  @include vf-icon-close-themed;
46
59
 
47
- align-self: center;
48
- background-size: map-get($icon-sizes, small);
49
60
  border-radius: 50%;
50
- flex: 0 0 auto;
51
- margin-left: $sph--x-small;
52
- @media (min-width: $breakpoint-x-large) {
53
- background-size: math.div(map-get($icon-sizes, small), $font-size-ratio--largescreen); //ensure no rounding happens as it positions the icon off center
54
- }
61
+ }
62
+
63
+ & > [class*='p-icon--'] {
64
+ @extend %vf-chip-icon;
65
+
66
+ // Space the chip away from the content following it in the chip body
67
+ margin-right: $sph--x-small;
55
68
  }
56
69
 
57
70
  &.is-dense {
@@ -62,8 +75,11 @@
62
75
  margin: 0;
63
76
  vertical-align: baseline;
64
77
  }
65
- }
66
78
 
79
+ &.is-readonly {
80
+ border-color: transparent;
81
+ }
82
+ }
67
83
  @include vf-chips-default;
68
84
  @include vf-chips-positive;
69
85
  @include vf-chips-caution;
@@ -5,7 +5,9 @@
5
5
  .p-cta-block:
6
6
  Main element of the CTA block.
7
7
  "&.is-borderless":
8
- Borderless variant, to be used to hide top border and padding.
8
+ Deprecated modifier class that removed top border and padding before v4.25.0. This is now the default behavior, so this class is no longer needed.
9
+ "&.has-border":
10
+ Deprecated modifier class that adds a top border and padding.
9
11
  */
10
12
 
11
13
  @import 'settings';
@@ -13,15 +15,20 @@
13
15
  @mixin vf-p-cta-block {
14
16
  .p-cta-block {
15
17
  align-items: baseline;
16
- border-top: 1px solid $colors--theme--border-low-contrast;
17
18
  display: flex;
18
19
  flex-wrap: wrap;
19
20
  padding-bottom: $spv--x-large;
20
- padding-top: $spv--small;
21
21
 
22
+ &,
23
+ /** deprecated, borderless is now default behavior */
22
24
  &.is-borderless {
23
25
  border: none;
24
26
  padding-top: 0;
25
27
  }
28
+
29
+ &.has-border {
30
+ border-top: 1px solid $colors--theme--border-low-contrast;
31
+ padding-top: $spv--small;
32
+ }
26
33
  }
27
34
  }
@@ -1,5 +1,11 @@
1
1
  @import 'settings';
2
2
 
3
+ /**
4
+ TODO this component has been deprecated. It will be removed in the next major version / not supported in Pragma.
5
+ The status label has been merged into the Chip component.
6
+ See https://github.com/canonical/vanilla-framework/issues/5535
7
+ */
8
+
3
9
  /**
4
10
  TODO this component uses hard-coded colors that don't respond to theming, which is not ideal.
5
11
  However, it looks fine on all themes, and re-working it to support theming is a larger undertaking.