vanilla-framework 4.37.1 → 4.38.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 +5 -1
- package/scss/_base_icon-definitions.scss +48 -16
- package/scss/_patterns_badge.scss +1 -0
- package/scss/_patterns_icons.scss +4 -32
- package/templates/_macros/vf_basic-section.jinja +10 -2
- package/templates/_macros/vf_equal-heights.jinja +9 -1
- package/templates/_macros/vf_pricing-block.jinja +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vanilla-framework",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.38.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "webteam@canonical.com",
|
|
6
6
|
"name": "Canonical Webteam"
|
|
@@ -95,5 +95,9 @@
|
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"sass": "^1.79.0"
|
|
98
|
+
},
|
|
99
|
+
"publishConfig": {
|
|
100
|
+
"access": "public",
|
|
101
|
+
"provenance": true
|
|
98
102
|
}
|
|
99
103
|
}
|
|
@@ -711,10 +711,6 @@
|
|
|
711
711
|
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.95 12.95l-.18.173-.074.068a6.926 6.926 0 01-.318.271l-.271.207-.209.146-.254.163-.225.132-.243.13-.21.103-.276.121-.133.054-.385.139-.271.082-.264.068-.298.065-.272.047-.337.043-.304.025L8.12 15 8 15l-.214-.003-.285-.015-.381-.037-.339-.05-.184-.036-.324-.074-.258-.07-.249-.079-.323-.118-.195-.08-.214-.095-.276-.137-.213-.116a7.006 7.006 0 01-.551-.35l-.197-.142-.175-.136-.176-.146-.297-.27-.16-.158-.213-.229-.07-.08a7 7 0 1110.772-.221l-.194.234a7.043 7.043 0 01-.334.358zM8.5 10.502h-1a3.498 3.498 0 00-3.017 1.726A5.473 5.473 0 008 13.5a5.478 5.478 0 003.518-1.272 3.499 3.499 0 00-2.826-1.72l-.192-.006zM8 2.5a5.5 5.5 0 00-4.557 8.581 5.004 5.004 0 012.203-1.724A2.978 2.978 0 015 7.5V7a3 3 0 116 0v.5c0 .701-.24 1.347-.644 1.858.888.355 1.65.957 2.202 1.722A5.5 5.5 0 008 2.5zm0 3a1.5 1.5 0 00-1.493 1.356L6.5 7v.5a1.5 1.5 0 002.993.144L9.5 7.5V7A1.5 1.5 0 008 5.5z' fill='#{vf-url-friendly-color($color)}' fill-rule='nonzero'/%3E%3C/svg%3E");
|
|
712
712
|
}
|
|
713
713
|
|
|
714
|
-
@mixin vf-icon-restart($color) {
|
|
715
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.197 1.15v4.931h-1.5l-.001-2.478a5.5 5.5 0 106.302-.215l.75-1.3a7 7 0 11-8.263.562H1.268v-1.5h4.93z' fill='#{vf-url-friendly-color($color)}' fill-rule='evenodd'/%3E%3C/svg%3E");
|
|
716
|
-
}
|
|
717
|
-
|
|
718
714
|
@mixin vf-icon-revisions($color) {
|
|
719
715
|
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.583 3.566l1.019 1.131a5.5 5.5 0 109.847 4.056h1.51A7.001 7.001 0 112.584 3.567zM5.748 4.74l2.221 2.51L12 7.25v1.5H7.294l-2.67-3.018 1.124-.993zm8.014-.714c.493.712.856 1.52 1.058 2.39h-1.552a5.47 5.47 0 00-.56-1.26l1.054-1.13zM9.504 1.162a6.967 6.967 0 012.626 1.186l-1.033 1.106a5.475 5.475 0 00-1.594-.746V1.162zm-2.34-.113l.001 1.514a5.462 5.462 0 00-1.795.605L4.344 2.03a6.956 6.956 0 012.82-.98z' fill='#{vf-url-friendly-color($color)}' fill-rule='nonzero'/%3E%3C/svg%3E");
|
|
720
716
|
}
|
|
@@ -831,18 +827,6 @@
|
|
|
831
827
|
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='desktop-2'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Union' fill-rule='evenodd' clip-rule='evenodd' d='M2.5 3.5H13.5V10.5H2.5L2.5 3.5ZM1 3.5C1 2.67157 1.67157 2 2.5 2H13.5C14.3284 2 15 2.67157 15 3.5V10.5C15 11.3284 14.3284 12 13.5 12H8.75V13.25H11V14.75H5V13.25H7.25V12H2.5C1.67157 12 1 11.3284 1 10.5V3.5Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E");
|
|
832
828
|
}
|
|
833
829
|
|
|
834
|
-
@mixin vf-icon-play($color) {
|
|
835
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='play'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Triangle (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M11.3844 7.98987L5.50005 3.87809L5.50005 12.1161L11.3844 7.98987ZM12.538 9.01296C13.2485 8.51475 13.2476 7.46192 12.5363 6.96488L5.96604 2.37377C5.13747 1.7948 4.00005 2.3876 4.00005 3.3984L4.00005 12.5968C4.00005 13.6085 5.13935 14.2011 5.96773 13.6202L12.538 9.01296Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E");
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
@mixin vf-icon-pause($color) {
|
|
839
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='pause'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Union' fill-rule='evenodd' clip-rule='evenodd' d='M5.5 3.02393H4V12.9917H5.5V3.02393ZM11.5 3.02393H10V12.9917H11.5V3.02393Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
@mixin vf-icon-stop($color) {
|
|
843
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='stop'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Rectangle 13 (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M12 3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V12C3.5 12.2761 3.72386 12.5 4 12.5H12C12.2761 12.5 12.5 12.2761 12.5 12V4C12.5 3.72386 12.2761 3.5 12 3.5ZM4 2C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4C14 2.89543 13.1046 2 12 2H4Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
844
|
-
}
|
|
845
|
-
|
|
846
830
|
// ICONS ADDED IN OCTOBER 2024
|
|
847
831
|
|
|
848
832
|
// Base definition mixins:
|
|
@@ -1568,3 +1552,51 @@
|
|
|
1568
1552
|
$dark-value: vf-icon-vulnerable-url($color: map-get($colors-dark-theme--tinted-borders, negative), $color-symbol: $colors--dark-theme--background-default)
|
|
1569
1553
|
);
|
|
1570
1554
|
}
|
|
1555
|
+
|
|
1556
|
+
@function vf-icon-restart-url($color) {
|
|
1557
|
+
@return url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.197 1.15v4.931h-1.5l-.001-2.478a5.5 5.5 0 106.302-.215l.75-1.3a7 7 0 11-8.263.562H1.268v-1.5h4.93z' fill='#{vf-url-friendly-color($color)}' fill-rule='evenodd'/%3E%3C/svg%3E");
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
@mixin vf-icon-restart($color: $colors--light-theme--icon) {
|
|
1561
|
+
background-image: vf-icon-restart-url($color);
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
@mixin vf-icon-restart-themed {
|
|
1565
|
+
@include vf-themed-icon($light-value: vf-icon-restart-url($colors--light-theme--icon), $dark-value: vf-icon-restart-url($colors--dark-theme--icon));
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
@function vf-icon-play-url($color) {
|
|
1569
|
+
@return url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='play'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Triangle (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M11.3844 7.98987L5.50005 3.87809L5.50005 12.1161L11.3844 7.98987ZM12.538 9.01296C13.2485 8.51475 13.2476 7.46192 12.5363 6.96488L5.96604 2.37377C5.13747 1.7948 4.00005 2.3876 4.00005 3.3984L4.00005 12.5968C4.00005 13.6085 5.13935 14.2011 5.96773 13.6202L12.538 9.01296Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E");
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
@mixin vf-icon-play($color: $colors--light-theme--icon) {
|
|
1573
|
+
background-image: vf-icon-play-url($color);
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
@mixin vf-icon-play-themed {
|
|
1577
|
+
@include vf-themed-icon($light-value: vf-icon-play-url($colors--light-theme--icon), $dark-value: vf-icon-play-url($colors--dark-theme--icon));
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
@function vf-icon-pause-url($color) {
|
|
1581
|
+
@return url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='pause'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Union' fill-rule='evenodd' clip-rule='evenodd' d='M5.5 3.02393H4V12.9917H5.5V3.02393ZM11.5 3.02393H10V12.9917H11.5V3.02393Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
@mixin vf-icon-pause($color: $colors--light-theme--icon) {
|
|
1585
|
+
background-image: vf-icon-pause-url($color);
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
@mixin vf-icon-pause-themed {
|
|
1589
|
+
@include vf-themed-icon($light-value: vf-icon-pause-url($colors--light-theme--icon), $dark-value: vf-icon-pause-url($colors--dark-theme--icon));
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
@function vf-icon-stop-url($color) {
|
|
1593
|
+
@return url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg id='stop'%3E%3Crect width='16' height='16' /%3E%3Cpath id='Rectangle 13 (Stroke)' fill-rule='evenodd' clip-rule='evenodd' d='M12 3.5H4C3.72386 3.5 3.5 3.72386 3.5 4V12C3.5 12.2761 3.72386 12.5 4 12.5H12C12.2761 12.5 12.5 12.2761 12.5 12V4C12.5 3.72386 12.2761 3.5 12 3.5ZM4 2C2.89543 2 2 2.89543 2 4V12C2 13.1046 2.89543 14 4 14H12C13.1046 14 14 13.1046 14 12V4C14 2.89543 13.1046 2 12 2H4Z' fill='#{vf-url-friendly-color($color)}'/%3E%3C/g%3E%3C/svg%3E%0A");
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
@mixin vf-icon-stop($color: $colors--light-theme--icon) {
|
|
1597
|
+
background-image: vf-icon-stop-url($color);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
@mixin vf-icon-stop-themed {
|
|
1601
|
+
@include vf-themed-icon($light-value: vf-icon-stop-url($colors--light-theme--icon), $dark-value: vf-icon-stop-url($colors--dark-theme--icon));
|
|
1602
|
+
}
|
|
@@ -1187,14 +1187,7 @@
|
|
|
1187
1187
|
@mixin vf-p-icon-restart {
|
|
1188
1188
|
.p-icon--restart {
|
|
1189
1189
|
@extend %icon;
|
|
1190
|
-
@include vf-icon-restart
|
|
1191
|
-
|
|
1192
|
-
[class*='--dark'] &,
|
|
1193
|
-
body.is-dark &,
|
|
1194
|
-
&.is-light, // DEPRECATED: use is-dark instead
|
|
1195
|
-
&.is-dark {
|
|
1196
|
-
@include vf-icon-restart($colors--dark-theme--icon);
|
|
1197
|
-
}
|
|
1190
|
+
@include vf-icon-restart-themed;
|
|
1198
1191
|
}
|
|
1199
1192
|
}
|
|
1200
1193
|
|
|
@@ -1663,42 +1656,21 @@
|
|
|
1663
1656
|
@mixin vf-p-icon-play {
|
|
1664
1657
|
.p-icon--play {
|
|
1665
1658
|
@extend %icon;
|
|
1666
|
-
@include vf-icon-play
|
|
1667
|
-
|
|
1668
|
-
[class*='--dark'] &,
|
|
1669
|
-
body.is-dark &,
|
|
1670
|
-
&.is-light, // DEPRECATED: use is-dark instead
|
|
1671
|
-
&.is-dark {
|
|
1672
|
-
@include vf-icon-play($color-mid-x-light);
|
|
1673
|
-
}
|
|
1659
|
+
@include vf-icon-play-themed;
|
|
1674
1660
|
}
|
|
1675
1661
|
}
|
|
1676
1662
|
|
|
1677
1663
|
@mixin vf-p-icon-pause {
|
|
1678
1664
|
.p-icon--pause {
|
|
1679
1665
|
@extend %icon;
|
|
1680
|
-
@include vf-icon-pause
|
|
1681
|
-
|
|
1682
|
-
[class*='--dark'] &,
|
|
1683
|
-
body.is-dark &,
|
|
1684
|
-
&.is-light, // DEPRECATED: use is-dark instead
|
|
1685
|
-
&.is-dark {
|
|
1686
|
-
@include vf-icon-pause($color-mid-x-light);
|
|
1687
|
-
}
|
|
1666
|
+
@include vf-icon-pause-themed;
|
|
1688
1667
|
}
|
|
1689
1668
|
}
|
|
1690
1669
|
|
|
1691
1670
|
@mixin vf-p-icon-stop {
|
|
1692
1671
|
.p-icon--stop {
|
|
1693
1672
|
@extend %icon;
|
|
1694
|
-
@include vf-icon-stop
|
|
1695
|
-
|
|
1696
|
-
[class*='--dark'] &,
|
|
1697
|
-
body.is-dark &,
|
|
1698
|
-
&.is-light, // DEPRECATED: use is-dark instead
|
|
1699
|
-
&.is-dark {
|
|
1700
|
-
@include vf-icon-stop($color-mid-x-light);
|
|
1701
|
-
}
|
|
1673
|
+
@include vf-icon-stop-themed;
|
|
1702
1674
|
}
|
|
1703
1675
|
}
|
|
1704
1676
|
|
|
@@ -300,6 +300,7 @@
|
|
|
300
300
|
# padding: Type of padding to apply to the pattern - "deep", "shallow", "default" (default is "default").
|
|
301
301
|
# is_split_on_medium: Boolean to indicate if the section should be split on medium screens (default is false).
|
|
302
302
|
# top_rule_variant: Type of HR to render at the top of the pattern. "default" | "muted" (default is "default").
|
|
303
|
+
# attrs: A dictionary of attributes to apply to the section element.
|
|
303
304
|
{% macro vf_basic_section(
|
|
304
305
|
title={},
|
|
305
306
|
label_text="",
|
|
@@ -307,7 +308,8 @@
|
|
|
307
308
|
items=[],
|
|
308
309
|
padding="default",
|
|
309
310
|
is_split_on_medium=false,
|
|
310
|
-
top_rule_variant="default"
|
|
311
|
+
top_rule_variant="default",
|
|
312
|
+
attrs={}
|
|
311
313
|
) -%}
|
|
312
314
|
|
|
313
315
|
{%- set padding = padding | trim -%}
|
|
@@ -330,7 +332,13 @@
|
|
|
330
332
|
{%- set has_label = label_text|length > 0 -%}
|
|
331
333
|
{%- set has_subtitle = subtitle_text|length > 0 -%}
|
|
332
334
|
|
|
333
|
-
<section class="{{ padding_classes }}"
|
|
335
|
+
<section class="{{ padding_classes }} {{ attrs.get("class", "") -}}"
|
|
336
|
+
{%- for attr, value in attrs.items() -%}
|
|
337
|
+
{% if attr != "class" %}
|
|
338
|
+
{{ attr }}="{{ value }}"
|
|
339
|
+
{%- endif -%}
|
|
340
|
+
{%- endfor -%}
|
|
341
|
+
>
|
|
334
342
|
<div class="grid-row--50-50{%- if not is_split_on_medium -%}-on-large{%- endif -%}">
|
|
335
343
|
{{ vf_section_top_rule(top_rule_variant) }}
|
|
336
344
|
<div class="grid-col">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{#-
|
|
2
2
|
Params
|
|
3
3
|
- title_text (string) (required): The text to be displayed as the heading
|
|
4
|
+
- attrs (dictionary) (optional): A dictionary of attributes to apply to the equal heights pattern.
|
|
4
5
|
- subtitle_text (string) (optional): The text to be displayed as the subtitle
|
|
5
6
|
- subtitle_heading_level (int) (optional): The heading level for the subtitle. Can be 4 or 5. Defaults to 5.
|
|
6
7
|
- highlight_images (boolean) (optional): If the images need to be highlighted, which means adding a subtle grey background. Not added by default.
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
-#}
|
|
12
13
|
{%- macro vf_equal_heights(
|
|
13
14
|
title_text,
|
|
15
|
+
attrs={},
|
|
14
16
|
subtitle_text="",
|
|
15
17
|
subtitle_heading_level=5,
|
|
16
18
|
highlight_images=false,
|
|
@@ -31,7 +33,13 @@
|
|
|
31
33
|
{% set subtitle_heading_level=5 %}
|
|
32
34
|
{%- endif -%}
|
|
33
35
|
|
|
34
|
-
<div class="p-section"
|
|
36
|
+
<div class="p-section {{ attrs.get("class", "") -}}"
|
|
37
|
+
{%- for attr, value in attrs.items() -%}
|
|
38
|
+
{% if attr != "class" %}
|
|
39
|
+
{{ attr }}="{{ value }}"
|
|
40
|
+
{%- endif -%}
|
|
41
|
+
{%- endfor -%}
|
|
42
|
+
>
|
|
35
43
|
<hr class="p-rule is-fixed-width"/>
|
|
36
44
|
<div class="p-section--shallow">
|
|
37
45
|
{%- if has_two_top_cols -%}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Params
|
|
3
3
|
- title_text (string) (required): The text to be displayed as the heading
|
|
4
4
|
- top_rule_variant (string) (optional): Variant of the top rule, default is "default". Options are "muted", "highlighted", "default", "none".
|
|
5
|
+
- attrs (dictionary) (optional): A dictionary of attributes to apply to the Pricing block section.
|
|
5
6
|
- tiers (Array<{
|
|
6
7
|
tier_name_text: String (optional),
|
|
7
8
|
tier_price_text: String,
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
{%- macro vf_pricing_block(
|
|
21
22
|
top_rule_variant="default",
|
|
22
23
|
title_text="",
|
|
24
|
+
attrs={},
|
|
23
25
|
tiers=[]
|
|
24
26
|
) -%}
|
|
25
27
|
{% set top_rule_variant = top_rule_variant | trim %}
|
|
@@ -86,7 +88,13 @@
|
|
|
86
88
|
<hr class="p-rule{% if top_rule_variant != 'default' %}--{{ rule_class }}{% endif %} is-fixed-width" />
|
|
87
89
|
{% endif %}
|
|
88
90
|
{%- endmacro -%}
|
|
89
|
-
<div class="p-section"
|
|
91
|
+
<div class="p-section {{ attrs.get("class", "") -}}"
|
|
92
|
+
{%- for attr, value in attrs.items() -%}
|
|
93
|
+
{% if attr != "class" %}
|
|
94
|
+
{{ attr }}="{{ value }}"
|
|
95
|
+
{%- endif -%}
|
|
96
|
+
{%- endfor -%}
|
|
97
|
+
>
|
|
90
98
|
{{ _top_rule() }}
|
|
91
99
|
<div class="grid-row">
|
|
92
100
|
<div class="grid-col-4 grid-col-medium-4 grid-col-small-4">
|