vanilla-framework 4.21.2 → 4.23.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 +1 -1
- package/scss/_base_grid-definitions.scss +13 -0
- package/scss/_base_icon-definitions.scss +27 -0
- package/scss/_patterns_icons.scss +17 -1
- package/scss/_patterns_pricing-block.scss +47 -0
- package/scss/_vanilla.scss +2 -0
- package/templates/_macros/vf_linked-logo-section.jinja +75 -0
- package/templates/_macros/vf_pricing-block.jinja +88 -0
package/package.json
CHANGED
|
@@ -112,6 +112,19 @@
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
%vf-grid-row-subgrid {
|
|
116
|
+
@extend %vf-grid-row;
|
|
117
|
+
|
|
118
|
+
@supports (display: grid) {
|
|
119
|
+
& > * {
|
|
120
|
+
display: grid;
|
|
121
|
+
grid-column: span calc($grid-8-columns / 4);
|
|
122
|
+
grid-row: span 100;
|
|
123
|
+
grid-template-rows: subgrid;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
115
128
|
%vf-grid-container-padding {
|
|
116
129
|
// set static outside padding per breakpoint
|
|
117
130
|
padding-left: map-get($grid-margin-widths, small);
|
|
@@ -1486,3 +1486,30 @@
|
|
|
1486
1486
|
@mixin vf-icon-credit-card-themed {
|
|
1487
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
1488
|
}
|
|
1489
|
+
|
|
1490
|
+
// ICONS ADDED IN MARCH 2025 v4.22.0
|
|
1491
|
+
// heading
|
|
1492
|
+
@function vf-icon-heading-url($color) {
|
|
1493
|
+
@return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill='#{vf-url-friendly-color($color)}' d='M3.704 13.544V2.456h1.648v4.592h5.296V2.456h1.648v11.088h-1.648V8.456H5.352v5.088z'/%3E%3C/svg%3E");
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
@mixin vf-icon-heading($color: $colors--light-theme--icon) {
|
|
1497
|
+
background-image: vf-icon-heading-url($color);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
@mixin vf-icon-heading-themed {
|
|
1501
|
+
@include vf-themed-icon($light-value: vf-icon-heading-url($colors--light-theme--icon), $dark-value: vf-icon-heading-url($colors--dark-theme--icon));
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
// quote
|
|
1505
|
+
@function vf-icon-quote-url($color) {
|
|
1506
|
+
@return url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none'%3E%3Cpath fill='#{vf-url-friendly-color($color)}' d='m3.623 12.782-2.026-.856q1.17-2.206 1.576-4.008.45-1.846.45-3.378v-.766q0-.36-.045-.765h3.018v.495q0 2.522-.72 4.82-.721 2.25-2.253 4.458m7.477 0-2.027-.856q1.125-2.206 1.531-4.008.45-1.846.45-3.378v-.766q0-.36-.045-.765h3.018q.045.135.045.27v.225q0 2.522-.766 4.82-.72 2.25-2.206 4.458'/%3E%3C/svg%3E");
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
@mixin vf-icon-quote($color: $colors--light-theme--icon) {
|
|
1510
|
+
background-image: vf-icon-quote-url($color);
|
|
1511
|
+
}
|
|
1512
|
+
|
|
1513
|
+
@mixin vf-icon-quote-themed {
|
|
1514
|
+
@include vf-themed-icon($light-value: vf-icon-quote-url($colors--light-theme--icon), $dark-value: vf-icon-quote-url($colors--dark-theme--icon));
|
|
1515
|
+
}
|
|
@@ -2051,4 +2051,20 @@
|
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
|
|
2054
|
-
//
|
|
2054
|
+
// ICONS ADDED IN MARCH 2025
|
|
2055
|
+
|
|
2056
|
+
@mixin vf-p-icon-heading {
|
|
2057
|
+
.p-icon--heading {
|
|
2058
|
+
@extend %icon;
|
|
2059
|
+
@include vf-icon-heading-themed;
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
@mixin vf-p-icon-quote {
|
|
2064
|
+
.p-icon--quote {
|
|
2065
|
+
@extend %icon;
|
|
2066
|
+
@include vf-icon-quote-themed;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
// **Base and Pattern mixins accurate as of March 2025**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
@classreference
|
|
3
|
+
pricing-block:
|
|
4
|
+
Pricing block:
|
|
5
|
+
.p-pricing-block:
|
|
6
|
+
Main element of the pricing block component, to represent 4 cards.
|
|
7
|
+
.p-pricing-block--25-75:
|
|
8
|
+
Modifier class for 3 cards with a 25-75 split. The first 25% row is empty.
|
|
9
|
+
.p-pricing-block--50-50:
|
|
10
|
+
Modifier class for 2 cards, where each card takes up 50% of the row.
|
|
11
|
+
Column:
|
|
12
|
+
.p-pricing-block__tier:
|
|
13
|
+
Column element within a pricing block. Each column represents a card.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@import 'settings';
|
|
17
|
+
|
|
18
|
+
@mixin vf-p-pricing-block {
|
|
19
|
+
.p-pricing-block,
|
|
20
|
+
.p-pricing-block--25-75,
|
|
21
|
+
.p-pricing-block--50-50 {
|
|
22
|
+
@extend %vf-grid-row-subgrid;
|
|
23
|
+
|
|
24
|
+
.p-pricing-block__tier {
|
|
25
|
+
grid-column: span $grid-8-columns-small;
|
|
26
|
+
padding-bottom: $spv--x-large;
|
|
27
|
+
|
|
28
|
+
@media (min-width: $threshold-4-6-col) {
|
|
29
|
+
grid-column: span calc($grid-8-columns-medium / 2);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.p-pricing-block--25-75 .p-pricing-block__tier {
|
|
35
|
+
@media (min-width: $threshold-6-12-col) {
|
|
36
|
+
&:first-child {
|
|
37
|
+
grid-column: calc($grid-8-columns / 4 + 1) / span calc($grid-8-columns / 4); // Shift the first card to the right
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.p-pricing-block--50-50 .p-pricing-block__tier {
|
|
43
|
+
@media (min-width: $threshold-6-12-col) {
|
|
44
|
+
grid-column: span $grid-8-columns-small;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/scss/_vanilla.scss
CHANGED
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
@import 'patterns_navigation-reduced';
|
|
39
39
|
@import 'patterns_notifications';
|
|
40
40
|
@import 'patterns_pagination';
|
|
41
|
+
@import 'patterns_pricing-block';
|
|
41
42
|
@import 'patterns_pull-quotes';
|
|
42
43
|
@import 'patterns_rule';
|
|
43
44
|
@import 'patterns_search-and-filter';
|
|
@@ -134,6 +135,7 @@
|
|
|
134
135
|
@include vf-p-navigation-reduced;
|
|
135
136
|
@include vf-p-notification;
|
|
136
137
|
@include vf-p-pagination;
|
|
138
|
+
@include vf-p-pricing-block;
|
|
137
139
|
@include vf-p-pull-quotes;
|
|
138
140
|
@include vf-p-rule;
|
|
139
141
|
@include vf-p-search-and-filter;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{#
|
|
2
|
+
Params
|
|
3
|
+
- title_text (string) (required): The text to be displayed as the heading
|
|
4
|
+
- layout: layout of linked logo section. Options are '50/50', '25/75', 'full-width'
|
|
5
|
+
- links (array) (required) : Array of links, each including 'href', 'label', 'text', and 'image_html'
|
|
6
|
+
#}
|
|
7
|
+
|
|
8
|
+
{% macro vf_linked_logo_section(title_text, links, layout="full-width") -%}
|
|
9
|
+
{% set layout = layout | trim | replace('/', '-') %}
|
|
10
|
+
|
|
11
|
+
{% if layout not in ['50-50', '25-75', 'full-width'] %}
|
|
12
|
+
{% set layout = 'full-width' %}
|
|
13
|
+
{% endif %}
|
|
14
|
+
|
|
15
|
+
{% set max_logos_map = {
|
|
16
|
+
"full-width": 8,
|
|
17
|
+
"50-50": 6,
|
|
18
|
+
"25-75": 9
|
|
19
|
+
} %}
|
|
20
|
+
|
|
21
|
+
{% set max_logos = max_logos_map[layout] or 8 %}
|
|
22
|
+
{% set links = links[:max_logos] %}
|
|
23
|
+
|
|
24
|
+
{% macro _list(links, cols_per_item=2) %}
|
|
25
|
+
{%- if links|length > 1 -%}
|
|
26
|
+
<div class="grid-row">
|
|
27
|
+
{%- for link in links -%}
|
|
28
|
+
<div class="grid-col-{{ cols_per_item }} grid-col-medium-{{ cols_per_item }}">
|
|
29
|
+
<a href="{{ link.href }}" aria-label="{{ link.label }}">
|
|
30
|
+
<div class="p-image-container--16-9 is-highlighted">
|
|
31
|
+
{{ link.image_html | safe }}
|
|
32
|
+
</div>
|
|
33
|
+
<hr class="p-rule--muted">
|
|
34
|
+
<p>{{ link.text }}</p>
|
|
35
|
+
</a>
|
|
36
|
+
</div>
|
|
37
|
+
{%- endfor -%}
|
|
38
|
+
</div>
|
|
39
|
+
{%- endif -%}
|
|
40
|
+
{% endmacro %}
|
|
41
|
+
|
|
42
|
+
<section class="p-section">
|
|
43
|
+
<hr class="p-rule is-fixed-width"/>
|
|
44
|
+
{%- if layout == "50-50" -%}
|
|
45
|
+
<div class="p-section--shallow">
|
|
46
|
+
<div class="grid-row">
|
|
47
|
+
<div class="grid-col-4">
|
|
48
|
+
<h2>{{ title_text }}</h2>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="grid-col-4 grid-col-medium-4">
|
|
51
|
+
{{ _list(links) }}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
{%- elif layout == "25-75" -%}
|
|
56
|
+
<div class="p-section--shallow">
|
|
57
|
+
<div class="grid-row">
|
|
58
|
+
<div class="grid-col-2">
|
|
59
|
+
<h2>{{ title_text }}</h2>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="grid-col-6">
|
|
62
|
+
{{ _list(links) }}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
{%- else -%}
|
|
67
|
+
<div class="p-section--shallow">
|
|
68
|
+
<div class="grid-row">
|
|
69
|
+
<h2>{{- title_text -}}</h2>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
{{ _list(links) }}
|
|
73
|
+
{%- endif -%}
|
|
74
|
+
</section>
|
|
75
|
+
{%- endmacro %}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{#
|
|
2
|
+
Params
|
|
3
|
+
- title_text (string) (required): The text to be displayed as the heading
|
|
4
|
+
- tiers (Array<{
|
|
5
|
+
tier_name_text: String,
|
|
6
|
+
tier_price_text: String,
|
|
7
|
+
tier_price_explanation: String,
|
|
8
|
+
tier_description_html?: String,
|
|
9
|
+
tier_label_text: String,
|
|
10
|
+
tier_offerings: Array<{
|
|
11
|
+
list_item_style?: ‘ticked’ | ‘crossed’,
|
|
12
|
+
list_item_content_html: string
|
|
13
|
+
}>‘,
|
|
14
|
+
cta_html?: String
|
|
15
|
+
}>) (required)
|
|
16
|
+
Slots
|
|
17
|
+
- description (optional): paragraph-style content below the title
|
|
18
|
+
#}
|
|
19
|
+
{%- macro vf_pricing_block(
|
|
20
|
+
title_text="",
|
|
21
|
+
tiers=[]
|
|
22
|
+
) -%}
|
|
23
|
+
{% set section_description = caller('section_description') %}
|
|
24
|
+
{% set has_tier_descriptions = (tiers | selectattr("tier_description_html") | list | length) > 0 %}
|
|
25
|
+
{% if tiers|length == 2 %}
|
|
26
|
+
{% set base_class_name = "p-pricing-block--50-50" %}
|
|
27
|
+
{% elif tiers|length == 3 %}
|
|
28
|
+
{% set base_class_name = "p-pricing-block--25-75" %}
|
|
29
|
+
{% else %}
|
|
30
|
+
{% set base_class_name = "p-pricing-block" %}
|
|
31
|
+
{% endif %}
|
|
32
|
+
|
|
33
|
+
{%- macro _tier_offerings_list(tier) %}
|
|
34
|
+
<p class="u-text--muted">What's included</p>
|
|
35
|
+
<hr class="p-rule--muted u-no-margin--bottom" />
|
|
36
|
+
<ul class="p-list--divided">
|
|
37
|
+
{%- for offering in tier.get("tier_offerings") %}
|
|
38
|
+
{%- set item_style = offering.get('list_item_style', 'undefined') -%}
|
|
39
|
+
{% if item_style == 'ticked' -%}
|
|
40
|
+
{% set item_class = "is-ticked" -%}
|
|
41
|
+
{% elif item_style == 'crossed' -%}
|
|
42
|
+
{% set item_class = "is-crossed u-text--muted" -%}
|
|
43
|
+
{% else -%}
|
|
44
|
+
{% set item_class = "has-bullet" -%}
|
|
45
|
+
{%- endif -%}
|
|
46
|
+
<li class="p-list__item {{ item_class }}">{{ offering.list_item_content_html }}</li>
|
|
47
|
+
{% endfor -%}
|
|
48
|
+
</ul>
|
|
49
|
+
{%- endmacro -%}
|
|
50
|
+
|
|
51
|
+
<div class="p-section">
|
|
52
|
+
<div class="p-section--shallow">
|
|
53
|
+
<hr class="p-rule--highlight is-fixed-width" />
|
|
54
|
+
<div class="grid-row">
|
|
55
|
+
<div class="grid-col-4 grid-col-medium-4 grid-col-small-4">
|
|
56
|
+
<h2>{{ title_text }}</h2>
|
|
57
|
+
</div>
|
|
58
|
+
{%- if section_description -%}
|
|
59
|
+
<div class="grid-col-4 grid-col-medium-4 grid-col-small-4">{{ section_description }}</div>
|
|
60
|
+
{%- endif -%}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="{{ base_class_name }}">
|
|
65
|
+
{%- for tier in tiers %}
|
|
66
|
+
<div class="p-pricing-block__tier">
|
|
67
|
+
<div class="p-pricing-block__section">
|
|
68
|
+
<div class="p-section--shallow">
|
|
69
|
+
<h3 class="p-heading--4">
|
|
70
|
+
{{ tier.get("tier_name_text") }}
|
|
71
|
+
<br />
|
|
72
|
+
<strong>{{ tier.get("tier_price_text") }}</strong>
|
|
73
|
+
<span class="u-text--muted">{{ tier.get("tier_price_explanation") }}</span>
|
|
74
|
+
</h3>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
{%- if has_tier_descriptions -%}
|
|
78
|
+
{% set description = tier.get("tier_description_html") if tier.get("tier_description_html") else '' %}
|
|
79
|
+
<div class="p-pricing-block__section"
|
|
80
|
+
{% if not description %}role="presentation"{% endif %}>{{ description }}</div>
|
|
81
|
+
{%- endif %}
|
|
82
|
+
<div class="p-pricing-block__section">{{ _tier_offerings_list(tier) }}</div>
|
|
83
|
+
{% if tier.cta_html %}<div class="p-pricing-block__section">{{ tier.cta_html }}</div>{% endif -%}
|
|
84
|
+
</div>
|
|
85
|
+
{%- endfor -%}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
{% endmacro -%}
|