@penskemediacorp/larva-patterns 1.72.0 → 1.73.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.
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const navigation_item = clonedeep(
|
|
4
|
+
require( '../navigation-item/navigation-item.prototype' )
|
|
5
|
+
);
|
|
6
|
+
const c_heading = clonedeep(
|
|
7
|
+
require( '@penskemediacorp/larva-patterns/components/c-heading/c-heading.prototype' )
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
navigation_item.toggle_button_classes = 'lrv-u-display-none';
|
|
11
|
+
navigation_item.navigation_parent_list_classes =
|
|
12
|
+
'lrv-u-flex lrv-u-justify-content-center lrv-u-width-100p@mobile-max lrv-u-margin-lr-050 lrv-a-glue-parent lrv-u-margin-tb-025';
|
|
13
|
+
navigation_item.parent_list_item_heading_classes =
|
|
14
|
+
'lrv-u-flex lrv-u-justify-content-center lrv-u-padding-tb-050';
|
|
15
|
+
navigation_item.parent_list_item_classes =
|
|
16
|
+
'lrv-u-width-100p@mobile-max lrv-u-justify-content-center';
|
|
17
|
+
c_heading.c_heading_classes =
|
|
18
|
+
'lrv-a-glue-parent has-text-color lrv-u-width-100p lrv-u-border-a-1 lrv-js-MobileHeightToggle-trigger lrv-u-padding-tb-050 lrv-u-justify-content-center lrv-u-text-transform-uppercase lrv-a-icon-after a-icon-after-caret-down a-icon-height-8 a-icon-width-13';
|
|
19
|
+
c_heading.c_heading_text = 'All';
|
|
20
|
+
|
|
21
|
+
module.exports = {
|
|
22
|
+
c_heading,
|
|
23
|
+
navigation_classes: '',
|
|
24
|
+
navigation_items: [
|
|
25
|
+
navigation_item,
|
|
26
|
+
navigation_item,
|
|
27
|
+
navigation_item,
|
|
28
|
+
navigation_item,
|
|
29
|
+
],
|
|
30
|
+
main_toggle_button_classes: 'lrv-a-hidden@tablet',
|
|
31
|
+
nav_content_classes:
|
|
32
|
+
'lrv-js-MobileHeightToggle-target a-children-border-color-current lrv-a-space-children-horizontal@tablet a-space-children--350 lrv-u-border-b-1@mobile-max lrv-a-children-border-vertical@mobile-max lrv-u-flex-direction-column@mobile-max lrv-u-align-items-center lrv-a-unstyle-list lrv-u-flex lrv-u-justify-content-center lrv-u-flex-wrap-wrap',
|
|
33
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="navigation-menu // lrv-js-MobileHeightToggle {{ navigation_classes }}">
|
|
2
|
+
|
|
3
|
+
{% if c_heading %}
|
|
4
|
+
{% include "@larva/components/c-heading/c-heading.twig" with c_heading %}
|
|
5
|
+
{% endif %}
|
|
6
|
+
|
|
7
|
+
<ul class="navigation-content // {{ nav_content_classes }}">
|
|
8
|
+
|
|
9
|
+
{% for item in navigation_items %}
|
|
10
|
+
{% include "@project/modules//navigation-item/navigation-item.twig" with item %}
|
|
11
|
+
{% endfor %}
|
|
12
|
+
|
|
13
|
+
</ul>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const clonedeep = require( 'lodash.clonedeep' );
|
|
2
|
+
|
|
3
|
+
const c_link = clonedeep(
|
|
4
|
+
require( '@penskemediacorp/larva-patterns/components/c-link/c-link.prototype' )
|
|
5
|
+
);
|
|
6
|
+
const c_link__parent = clonedeep( c_link );
|
|
7
|
+
const c_link__child = clonedeep( c_link );
|
|
8
|
+
|
|
9
|
+
c_link__parent.c_link_text = 'Parent item';
|
|
10
|
+
c_link__parent.c_link_classes =
|
|
11
|
+
'lrv-u-color-brand-primary:hover lrv-u-color-currentColor lrv-u-text-transform-uppercase lrv-a-hover-effect lrv-a-unstyle-link lrv-u-whitespace-nowrap lrv-u-display-inline-block';
|
|
12
|
+
|
|
13
|
+
c_link__child.c_link_text = 'Child item';
|
|
14
|
+
c_link__child.c_link_classes =
|
|
15
|
+
'lrv-u-color-brand-primary:hover lrv-a-hover-effect lrv-a-unstyle-link lrv-u-whitespace-nowrap lrv-u-display-inline-block lrv-u-color-currentColor';
|
|
16
|
+
|
|
17
|
+
module.exports = {
|
|
18
|
+
c_link: c_link__parent,
|
|
19
|
+
navigation_item_heading_id_attr: '',
|
|
20
|
+
navigation_aria_labelledby_attr: '',
|
|
21
|
+
navigation_item_toggle_screen_reader_text: 'Expand the sub menu',
|
|
22
|
+
toggle_button_classes:
|
|
23
|
+
'lrv-a-unstyle-button lrv-u-margin-l-auto lrv-u-padding-a-025 lrv-u-display-none',
|
|
24
|
+
navigation_item_children: [
|
|
25
|
+
c_link__child,
|
|
26
|
+
c_link__child,
|
|
27
|
+
c_link__child,
|
|
28
|
+
c_link__child,
|
|
29
|
+
],
|
|
30
|
+
navigation_child_list_classes:
|
|
31
|
+
'lrv-u-display-none lrv-a-unstyle-list lrv-a-glue lrv-a-glue--l-0 lrv-u-width-200 lrv-u-background-color-white lrv-u-overflow-auto lrv-u-border-a-1 lrv-u-padding-lr-050 lrv-u-padding-tb-025 lrv-u-border-color-brand-accent',
|
|
32
|
+
navigation_parent_list_classes:
|
|
33
|
+
'lrv-u-flex lrv-u-margin-lr-050 lrv-a-glue-parent lrv-u-margin-tb-025',
|
|
34
|
+
parent_list_item_classes: '',
|
|
35
|
+
parent_list_item_heading_classes:
|
|
36
|
+
'lrv-u-flex lrv-u-align-items-center lrv-u-color-currentColor',
|
|
37
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<li class="navigaiton-item // navigaiton__parent-list-item {{ parent_list_item_classes }}">
|
|
2
|
+
<h3 id="{{ navigation_item_heading_id_attr }}" class="navigaiton-item-heading {{ parent_list_item_heading_classes }}">
|
|
3
|
+
{% include "@larva/components/c-link/c-link.twig" with c_link %}
|
|
4
|
+
|
|
5
|
+
<button class="{{ toggle_button_classes }}">
|
|
6
|
+
<span class="lrv-a-icon-after lrv-a-icon-arrow-down a-icon-down-arrow-color-wild-strawberry">
|
|
7
|
+
<span class="lrv-a-screen-reader-only">
|
|
8
|
+
{{navigation_item_toggle_screen_reader_text}}
|
|
9
|
+
</span>
|
|
10
|
+
</span>
|
|
11
|
+
</button>
|
|
12
|
+
</h3>
|
|
13
|
+
|
|
14
|
+
<ul class="navigaiton__child-list // {{ navigation_child_list_classes }}"
|
|
15
|
+
{% if navigation_aria_labelledby_attr %}
|
|
16
|
+
aria-labelledby="{{ navigation_aria_labelledby_attr }}"
|
|
17
|
+
{% endif %}
|
|
18
|
+
>
|
|
19
|
+
{% for item in navigation_item_children %}
|
|
20
|
+
<li class="navigaiton__child-list-item // lrv-u-margin-tb-025">
|
|
21
|
+
{% include "@larva/components/c-link/c-link.twig" with item %}
|
|
22
|
+
</li>
|
|
23
|
+
{% endfor %}
|
|
24
|
+
</ul>
|
|
25
|
+
</li>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.73.0",
|
|
4
4
|
"description": "Larva markup patterns.",
|
|
5
5
|
"author": "laras126 <laras126@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Penske-Media-Corp/pmc-larva/tree/master/packages/patterns#readme",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"url": "https://github.com/Penske-Media-Corp/pmc-larva/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@penskemediacorp/larva-css": "^1.
|
|
24
|
-
"@penskemediacorp/larva-js": "^1.
|
|
23
|
+
"@penskemediacorp/larva-css": "^1.73.0",
|
|
24
|
+
"@penskemediacorp/larva-js": "^1.73.0",
|
|
25
25
|
"@penskemediacorp/larva-svg": "^1.66.4",
|
|
26
26
|
"lodash.clonedeep": "^4"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "725a97fa8e3b54d47897ddbda7913b5cbf8c9e78"
|
|
29
29
|
}
|