@energysage/es-ds-components 0.0.1 → 3.0.0-alpha.10
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/.eslintignore +9 -0
- package/.eslintrc.json +3 -0
- package/.prettierrc.json +10 -0
- package/README.md +0 -3
- package/components/es-accordion-list.vue +117 -0
- package/components/es-accordion.vue +7 -0
- package/components/es-badge.vue +20 -0
- package/components/es-breadcrumbs.vue +73 -0
- package/components/es-button.vue +122 -0
- package/components/es-card.vue +64 -0
- package/components/es-carousel.vue +316 -0
- package/components/es-col.vue +27 -0
- package/components/es-collapse.vue +83 -0
- package/components/es-container.vue +14 -0
- package/components/es-cta-banner.vue +95 -0
- package/components/es-cta-card.vue +60 -0
- package/components/es-data-table-simple.vue +73 -0
- package/components/es-data-table.vue +128 -0
- package/components/es-error-page.vue +120 -0
- package/components/es-file-input.vue +334 -0
- package/components/es-file-preview-modal.vue +61 -0
- package/components/es-footer.vue +163 -0
- package/components/es-form-checkbox.vue +40 -0
- package/components/es-form-input.vue +130 -0
- package/components/es-form-msg.vue +81 -0
- package/components/es-form-radio-card.vue +57 -0
- package/components/es-form-radio-cards.vue +78 -0
- package/components/es-form-textarea.vue +124 -0
- package/components/es-form.vue +16 -0
- package/components/es-modal.vue +103 -0
- package/components/es-nav-bar-account-menu.vue +70 -0
- package/components/es-nav-bar-featured-article.vue +60 -0
- package/components/es-nav-bar-link.vue +27 -0
- package/components/es-nav-bar-product-menu.vue +219 -0
- package/components/es-nav-bar-top-level-menu.vue +194 -0
- package/components/es-nav-bar-topic-menu.vue +197 -0
- package/components/es-nav-bar.vue +411 -0
- package/components/es-pagination.vue +67 -0
- package/components/es-popover.vue +113 -0
- package/components/es-progress-circle.vue +81 -0
- package/components/es-progress.vue +36 -0
- package/components/es-radio-button-group.vue +53 -0
- package/components/es-radio-button.vue +57 -0
- package/components/es-rating.vue +120 -0
- package/components/es-reviews-io-card-carousel.vue +279 -0
- package/components/es-row.vue +5 -0
- package/components/es-skeleton-img.vue +38 -0
- package/components/es-skeleton-wrapper.vue +17 -0
- package/components/es-skeleton.vue +97 -0
- package/components/es-slider.vue +218 -0
- package/components/es-spinner.vue +22 -0
- package/components/es-support-card.vue +150 -0
- package/components/es-support.vue +66 -0
- package/components/es-tab.vue +7 -0
- package/components/es-tabs.vue +70 -0
- package/components/es-verification-code.vue +94 -0
- package/components/es-video.vue +60 -0
- package/components/es-view-more.vue +64 -0
- package/components/es-zip-code-form.vue +204 -0
- package/components/icon/arrow-clockwise.vue +51 -0
- package/components/icon/arrow-counter-clockwise.vue +37 -0
- package/components/icon/arrow-cycle.vue +43 -0
- package/components/icon/arrow-left.vue +39 -0
- package/components/icon/arrow-right.vue +39 -0
- package/components/icon/arrow-up.vue +39 -0
- package/components/icon/arrow.vue +68 -0
- package/components/icon/bank.vue +38 -0
- package/components/icon/battery.vue +40 -0
- package/components/icon/bell.vue +42 -0
- package/components/icon/block.vue +46 -0
- package/components/icon/bolt.vue +38 -0
- package/components/icon/business.vue +42 -0
- package/components/icon/calculator.vue +37 -0
- package/components/icon/calendar.vue +46 -0
- package/components/icon/cart.vue +46 -0
- package/components/icon/chat-add.vue +44 -0
- package/components/icon/chat-approve.vue +42 -0
- package/components/icon/chat-bubble.vue +40 -0
- package/components/icon/chat-dots.vue +42 -0
- package/components/icon/check.vue +39 -0
- package/components/icon/chevron-down.vue +39 -0
- package/components/icon/chevron-horizontal.vue +39 -0
- package/components/icon/chevron-left.vue +39 -0
- package/components/icon/chevron-right.vue +39 -0
- package/components/icon/chevron-up.vue +39 -0
- package/components/icon/circle-alert.vue +46 -0
- package/components/icon/circle-check.vue +46 -0
- package/components/icon/circle-chevron-down.vue +47 -0
- package/components/icon/circle-chevron-left.vue +46 -0
- package/components/icon/circle-chevron-right.vue +46 -0
- package/components/icon/circle-chevron-up.vue +46 -0
- package/components/icon/circle-minus.vue +46 -0
- package/components/icon/circle-plus.vue +46 -0
- package/components/icon/circle-x.vue +46 -0
- package/components/icon/circle.vue +42 -0
- package/components/icon/clock.vue +46 -0
- package/components/icon/community-solar.vue +37 -0
- package/components/icon/companies.vue +43 -0
- package/components/icon/contact-us.vue +37 -0
- package/components/icon/copy.vue +45 -0
- package/components/icon/credit-card.vue +37 -0
- package/components/icon/document.vue +45 -0
- package/components/icon/electric-vehicle.vue +37 -0
- package/components/icon/electricity-circle.vue +39 -0
- package/components/icon/envelope.vue +45 -0
- package/components/icon/es-leaf.vue +39 -0
- package/components/icon/eye.vue +41 -0
- package/components/icon/facebook.vue +41 -0
- package/components/icon/file-doc.vue +72 -0
- package/components/icon/file-docx.vue +72 -0
- package/components/icon/file-pdf.vue +72 -0
- package/components/icon/flag.vue +37 -0
- package/components/icon/folder.vue +41 -0
- package/components/icon/gear.vue +37 -0
- package/components/icon/gift.vue +37 -0
- package/components/icon/hamburger.vue +38 -0
- package/components/icon/heart.vue +39 -0
- package/components/icon/heat-pump.vue +41 -0
- package/components/icon/image.vue +45 -0
- package/components/icon/info-blog-post.vue +47 -0
- package/components/icon/info.vue +45 -0
- package/components/icon/instagram.vue +49 -0
- package/components/icon/light-bulb.vue +36 -0
- package/components/icon/link-out.vue +38 -0
- package/components/icon/linkedin.vue +41 -0
- package/components/icon/location.vue +45 -0
- package/components/icon/lock-off.vue +45 -0
- package/components/icon/lock-on.vue +48 -0
- package/components/icon/marketplace.vue +43 -0
- package/components/icon/minus.vue +38 -0
- package/components/icon/money-bag.vue +37 -0
- package/components/icon/money.vue +35 -0
- package/components/icon/open-envelope.vue +45 -0
- package/components/icon/paper.vue +45 -0
- package/components/icon/payback.vue +37 -0
- package/components/icon/pencil.vue +45 -0
- package/components/icon/person-add.vue +41 -0
- package/components/icon/person-check.vue +41 -0
- package/components/icon/person-cross.vue +41 -0
- package/components/icon/person.vue +41 -0
- package/components/icon/phone.vue +41 -0
- package/components/icon/play.vue +41 -0
- package/components/icon/plus.vue +38 -0
- package/components/icon/roof.vue +37 -0
- package/components/icon/rooftop-solar.vue +37 -0
- package/components/icon/saving.vue +37 -0
- package/components/icon/search.vue +43 -0
- package/components/icon/settings-horizontal.vue +57 -0
- package/components/icon/settings-vertical.vue +57 -0
- package/components/icon/shield-with-check.vue +38 -0
- package/components/icon/shield.vue +41 -0
- package/components/icon/shopping-bag.vue +39 -0
- package/components/icon/solar.vue +37 -0
- package/components/icon/sound-down.vue +45 -0
- package/components/icon/sound-off.vue +41 -0
- package/components/icon/sound-on.vue +41 -0
- package/components/icon/sound-up.vue +41 -0
- package/components/icon/star-empty.vue +38 -0
- package/components/icon/star-full.vue +36 -0
- package/components/icon/star-half.vue +55 -0
- package/components/icon/state-ak.vue +53 -0
- package/components/icon/state-al.vue +38 -0
- package/components/icon/state-ar.vue +38 -0
- package/components/icon/state-az.vue +38 -0
- package/components/icon/state-ca.vue +38 -0
- package/components/icon/state-co.vue +38 -0
- package/components/icon/state-ct.vue +38 -0
- package/components/icon/state-dc.vue +52 -0
- package/components/icon/state-de.vue +38 -0
- package/components/icon/state-fl.vue +38 -0
- package/components/icon/state-ga.vue +38 -0
- package/components/icon/state-hi.vue +59 -0
- package/components/icon/state-ia.vue +38 -0
- package/components/icon/state-id.vue +38 -0
- package/components/icon/state-il.vue +38 -0
- package/components/icon/state-in.vue +38 -0
- package/components/icon/state-ks.vue +38 -0
- package/components/icon/state-ky.vue +38 -0
- package/components/icon/state-la.vue +38 -0
- package/components/icon/state-ma.vue +38 -0
- package/components/icon/state-md.vue +39 -0
- package/components/icon/state-me.vue +38 -0
- package/components/icon/state-mi.vue +38 -0
- package/components/icon/state-mn.vue +38 -0
- package/components/icon/state-mo.vue +38 -0
- package/components/icon/state-ms.vue +38 -0
- package/components/icon/state-mt.vue +38 -0
- package/components/icon/state-nc.vue +38 -0
- package/components/icon/state-nd.vue +38 -0
- package/components/icon/state-ne.vue +38 -0
- package/components/icon/state-nh.vue +38 -0
- package/components/icon/state-nj.vue +37 -0
- package/components/icon/state-nm.vue +38 -0
- package/components/icon/state-nv.vue +38 -0
- package/components/icon/state-ny.vue +41 -0
- package/components/icon/state-oh.vue +38 -0
- package/components/icon/state-ok.vue +38 -0
- package/components/icon/state-or.vue +38 -0
- package/components/icon/state-pa.vue +38 -0
- package/components/icon/state-ri.vue +38 -0
- package/components/icon/state-sc.vue +38 -0
- package/components/icon/state-sd.vue +38 -0
- package/components/icon/state-tn.vue +38 -0
- package/components/icon/state-tx.vue +38 -0
- package/components/icon/state-ut.vue +38 -0
- package/components/icon/state-va.vue +38 -0
- package/components/icon/state-vt.vue +38 -0
- package/components/icon/state-wa.vue +38 -0
- package/components/icon/state-wi.vue +38 -0
- package/components/icon/state-wv.vue +38 -0
- package/components/icon/state-wy.vue +38 -0
- package/components/icon/thumbs-up.vue +39 -0
- package/components/icon/trash-can.vue +41 -0
- package/components/icon/tree.vue +37 -0
- package/components/icon/twitter.vue +43 -0
- package/components/icon/upload.vue +41 -0
- package/components/icon/verified.vue +40 -0
- package/components/icon/video-play.vue +41 -0
- package/components/icon/wifi.vue +38 -0
- package/components/icon/x.vue +38 -0
- package/components/icon/youtube.vue +45 -0
- package/composables/forms.ts +124 -0
- package/nuxt.config.ts +83 -1
- package/package.json +47 -13
- package/tsconfig.json +4 -0
- package/types/es-carousel.ts +12 -0
- package/types/index.ts +1 -0
- package/utils/forms.ts +120 -0
- package/utils/get-es-footer-content.ts +90 -0
- package/utils/get-es-nav-bar-account-content.ts +55 -0
- package/utils/get-es-nav-bar-global-content.ts +482 -0
- package/utils/mime-type-finder.ts +48 -0
- package/utils/vuelidate-keys.ts +39 -0
- package/components/TestComponent.vue +0 -5
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import PrimeDialog from 'primevue/dialog';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
id: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
hideFooter: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'md',
|
|
16
|
+
validator: (val: string) => ['sm', 'md', 'lg', 'xl'].includes(val),
|
|
17
|
+
},
|
|
18
|
+
bodyClass: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: false,
|
|
21
|
+
default: '',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const modalPt = {
|
|
26
|
+
root: {
|
|
27
|
+
class: 'modal-dialog modal-dialog-scrollable modal-content',
|
|
28
|
+
},
|
|
29
|
+
header: {
|
|
30
|
+
class: 'modal-header',
|
|
31
|
+
},
|
|
32
|
+
title: {
|
|
33
|
+
class: 'modal-title',
|
|
34
|
+
},
|
|
35
|
+
closeButton: {
|
|
36
|
+
class: 'close',
|
|
37
|
+
},
|
|
38
|
+
content: {
|
|
39
|
+
class: `modal-body ${props.bodyClass}`,
|
|
40
|
+
},
|
|
41
|
+
footer: {
|
|
42
|
+
class: 'modal-footer',
|
|
43
|
+
},
|
|
44
|
+
mask: {
|
|
45
|
+
class: 'es-modal-mask',
|
|
46
|
+
},
|
|
47
|
+
// https://vuejs.org/guide/built-ins/transition
|
|
48
|
+
transition: {
|
|
49
|
+
enterActiveClass: 'es-modal-enter-active',
|
|
50
|
+
enterFromClass: 'es-modal-enter-from',
|
|
51
|
+
enterToClass: 'es-modal-enter-to',
|
|
52
|
+
leaveActiveClass: 'es-modal-leave-active',
|
|
53
|
+
leaveFromClass: 'es-modal-leave-from',
|
|
54
|
+
leaveToClass: 'es-modal-leave-to',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const emit = defineEmits(['hidden']);
|
|
59
|
+
|
|
60
|
+
const onChange = (visible: boolean) => {
|
|
61
|
+
if (!visible) {
|
|
62
|
+
emit('hidden');
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const getSizeClass = computed(() => {
|
|
67
|
+
const modalSize = props.size === '' ? 'modal-md' : `modal-${props.size}`;
|
|
68
|
+
return modalSize;
|
|
69
|
+
});
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<prime-dialog
|
|
74
|
+
:id="id"
|
|
75
|
+
modal
|
|
76
|
+
:class="getSizeClass"
|
|
77
|
+
:pt="modalPt"
|
|
78
|
+
dismissable-mask
|
|
79
|
+
@update:visible="onChange">
|
|
80
|
+
<template #header>
|
|
81
|
+
<h5
|
|
82
|
+
:id="`${id}_header`"
|
|
83
|
+
class="modal-title h2">
|
|
84
|
+
<slot name="modal-title" />
|
|
85
|
+
</h5>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<template #closeicon>
|
|
89
|
+
<icon-x
|
|
90
|
+
class="text-gray-900"
|
|
91
|
+
height="2rem"
|
|
92
|
+
width="2rem" />
|
|
93
|
+
</template>
|
|
94
|
+
|
|
95
|
+
<slot />
|
|
96
|
+
|
|
97
|
+
<template
|
|
98
|
+
v-if="!hideFooter"
|
|
99
|
+
#footer>
|
|
100
|
+
<slot name="modal-footer" />
|
|
101
|
+
</template>
|
|
102
|
+
</prime-dialog>
|
|
103
|
+
</template>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'EsNavBarAccountMenu',
|
|
4
|
+
props: {
|
|
5
|
+
authItems: {
|
|
6
|
+
type: Array,
|
|
7
|
+
default: () => [],
|
|
8
|
+
},
|
|
9
|
+
loggedOut: {
|
|
10
|
+
type: Object,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<div class="icon-dropdown">
|
|
19
|
+
<div class="nav-item">
|
|
20
|
+
<div class="nav-link dropdown-toggle d-none d-lg-flex flex-nowrap py-100">
|
|
21
|
+
<icon-person
|
|
22
|
+
class="align-self-center account-icon"
|
|
23
|
+
width="20px"
|
|
24
|
+
height="20px" />
|
|
25
|
+
<span class="sr-only">
|
|
26
|
+
{{ loggedOut.menuButtonText }}
|
|
27
|
+
</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="menu">
|
|
30
|
+
<ul
|
|
31
|
+
class="loggedIn dropdown-menu account-menu rounded mt-0 py-100 list-unstyled"
|
|
32
|
+
style="display: none">
|
|
33
|
+
<!-- @vue-expect-error -->
|
|
34
|
+
<li
|
|
35
|
+
v-for="item in authItems"
|
|
36
|
+
:key="item.name">
|
|
37
|
+
<!-- @vue-expect-error -->
|
|
38
|
+
<es-nav-bar-link
|
|
39
|
+
class="dropdown-item nav-link"
|
|
40
|
+
:href="item.link">
|
|
41
|
+
<span class="mx-50">
|
|
42
|
+
<!-- @vue-expect-error -->
|
|
43
|
+
{{ item.name }}
|
|
44
|
+
</span>
|
|
45
|
+
</es-nav-bar-link>
|
|
46
|
+
</li>
|
|
47
|
+
</ul>
|
|
48
|
+
<ul
|
|
49
|
+
class="loggedOut dropdown-menu account-menu rounded mt-0"
|
|
50
|
+
style="display: none">
|
|
51
|
+
<li class="d-flex justify-content-center">
|
|
52
|
+
<es-button
|
|
53
|
+
:href="loggedOut.signIn.link"
|
|
54
|
+
class="m-100 w-100 text-white font-weight-bold">
|
|
55
|
+
{{ loggedOut.signIn.name }}
|
|
56
|
+
</es-button>
|
|
57
|
+
</li>
|
|
58
|
+
<li class="d-flex justify-content-center">
|
|
59
|
+
<es-button
|
|
60
|
+
:href="loggedOut.createAccount.link"
|
|
61
|
+
:outline="true"
|
|
62
|
+
class="mx-100 w-100 font-weight-bold">
|
|
63
|
+
{{ loggedOut.createAccount.name }}
|
|
64
|
+
</es-button>
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'EsNavBarFeaturedArticle',
|
|
4
|
+
props: {
|
|
5
|
+
eyebrow: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
link: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
newTab: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: false,
|
|
16
|
+
},
|
|
17
|
+
name: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
image500: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
imageAlt: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: '',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
computed: {
|
|
31
|
+
graphicId() {
|
|
32
|
+
return this.name.replace(/\s/g, '-').replace(/[^a-zA-Z]/g, '');
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<template>
|
|
39
|
+
<div class="dropdown-cta-right">
|
|
40
|
+
<es-nav-bar-link
|
|
41
|
+
class="d-block cta-link text-gray-900 text-decoration-none"
|
|
42
|
+
:href="link"
|
|
43
|
+
:target="newTab ? '_blank' : null"
|
|
44
|
+
:title="name">
|
|
45
|
+
<nuxt-img
|
|
46
|
+
:id="graphicId"
|
|
47
|
+
class="featured-article-image mb-100 w-100 rounded"
|
|
48
|
+
:alt="imageAlt"
|
|
49
|
+
loading="lazy"
|
|
50
|
+
:src="image500" />
|
|
51
|
+
<div class="eyebrow mb-50 link-name">
|
|
52
|
+
{{ eyebrow }}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<p class="font-weight-bold link-subheading">
|
|
56
|
+
{{ name }}
|
|
57
|
+
</p>
|
|
58
|
+
</es-nav-bar-link>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
// specific workaround for getting a reference to an auto-imported but not globally registered
|
|
3
|
+
// component like NuxtLink, so that it can be used in a <component :is=""> context.
|
|
4
|
+
// this resolves to an import statement, according to:
|
|
5
|
+
// https://github.com/nuxt/nuxt/issues/13659#issuecomment-1573568006
|
|
6
|
+
const NuxtLink = resolveComponent('NuxtLink');
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
href: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: '',
|
|
12
|
+
},
|
|
13
|
+
tag: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'nuxt-link',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<component
|
|
22
|
+
:is="props.tag === 'nuxt-link' ? NuxtLink : props.tag"
|
|
23
|
+
:href="props.href"
|
|
24
|
+
v-bind="$attrs">
|
|
25
|
+
<slot />
|
|
26
|
+
</component>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'EsNavBarProductMenu',
|
|
4
|
+
props: {
|
|
5
|
+
homeName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
homeLink: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
closeButtonText: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
featuredArticle: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({}),
|
|
20
|
+
},
|
|
21
|
+
items: {
|
|
22
|
+
type: Array,
|
|
23
|
+
default: () => [],
|
|
24
|
+
},
|
|
25
|
+
link: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: true,
|
|
28
|
+
},
|
|
29
|
+
mainMenuText: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
newTab: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
name: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true,
|
|
40
|
+
},
|
|
41
|
+
seeAllText: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
topics: {
|
|
46
|
+
type: Array,
|
|
47
|
+
default: () => [],
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
checkboxId() {
|
|
52
|
+
return `productMenu-${this.name}`;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<div class="dropdown nav-item nav-item-border-mobile">
|
|
60
|
+
<!-- desktop product link / hover menu trigger -->
|
|
61
|
+
<es-nav-bar-link
|
|
62
|
+
class="product-menu-header-link dropdown-toggle d-none d-lg-block px-lg-100 px-xl-200 py-lg-0 text-decoration-none"
|
|
63
|
+
:href="link"
|
|
64
|
+
:target="newTab ? '_blank' : null"
|
|
65
|
+
aria-haspopup="true"
|
|
66
|
+
aria-expanded="false">
|
|
67
|
+
<span class="product-menu-header-text d-block position-relative pb-lg-50">
|
|
68
|
+
{{ name }}
|
|
69
|
+
</span>
|
|
70
|
+
</es-nav-bar-link>
|
|
71
|
+
<!-- mobile flyout menu trigger -->
|
|
72
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
73
|
+
<label
|
|
74
|
+
:for="checkboxId"
|
|
75
|
+
class="dropdown-label nav-link d-flex d-lg-none align-items-center justify-content-between w-100 h-100 px-100 font-weight-bold">
|
|
76
|
+
{{ name }}
|
|
77
|
+
<icon-chevron-right
|
|
78
|
+
class="expand-icon"
|
|
79
|
+
style="height: 24px" />
|
|
80
|
+
</label>
|
|
81
|
+
<input
|
|
82
|
+
:id="checkboxId"
|
|
83
|
+
:name="checkboxId"
|
|
84
|
+
type="checkbox"
|
|
85
|
+
class="menu-checkbox" />
|
|
86
|
+
<div class="menu">
|
|
87
|
+
<div class="menu-header d-flex d-lg-none">
|
|
88
|
+
<div class="col-3" />
|
|
89
|
+
<div class="col-6 align-self-center text-center py-100">
|
|
90
|
+
<div class="nav-es-logo-mobile align-items-center d-flex">
|
|
91
|
+
<slot name="logo" />
|
|
92
|
+
</div>
|
|
93
|
+
<span class="sr-only">
|
|
94
|
+
{{ homeName }}
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
<!-- closes the entire mobile nav menu -->
|
|
98
|
+
<div class="d-flex col-3 justify-content-end">
|
|
99
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
100
|
+
<label
|
|
101
|
+
for="data--main-menu"
|
|
102
|
+
class="mb-0">
|
|
103
|
+
<icon-x class="menu-toggle align-self-center" />
|
|
104
|
+
<span class="sr-only">
|
|
105
|
+
{{ closeButtonText }}
|
|
106
|
+
</span>
|
|
107
|
+
</label>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<!-- mobile+desktop flyout menu -->
|
|
111
|
+
<!-- TODO: does anything match this aria-labelledby id? -->
|
|
112
|
+
<ul
|
|
113
|
+
v-if="items && items.length"
|
|
114
|
+
class="product-menu-flyout dropdown-menu row border-0 mt-0 py-lg-100">
|
|
115
|
+
<!-- mobile subnav header -->
|
|
116
|
+
<li class="nav-link col-lg-12 d-lg-none mb-50">
|
|
117
|
+
<div class="col-2">
|
|
118
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
119
|
+
<label
|
|
120
|
+
:for="checkboxId"
|
|
121
|
+
class="menu-toggle nav-link align-items-center d-flex font-size-sm h-100 mb-0 px-0 text-uppercase w-100">
|
|
122
|
+
<icon-arrow-left
|
|
123
|
+
class="expand-icon"
|
|
124
|
+
style="height: 24px" />
|
|
125
|
+
</label>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="col-8 align-self-center text-center py-100">
|
|
128
|
+
<!--
|
|
129
|
+
<es-nav-bar-link
|
|
130
|
+
class="font-weight-boldest text-gray-900"
|
|
131
|
+
:href="link">
|
|
132
|
+
{{ name }}
|
|
133
|
+
</es-nav-bar-link>
|
|
134
|
+
<span class="font-weight-boldest text-gray-900">{{ name }}</span>
|
|
135
|
+
-->
|
|
136
|
+
<span
|
|
137
|
+
class="nav-link justify-content-center align-items-center d-flex font-weight-boldest w-100 h-100"
|
|
138
|
+
>{{ name }}</span
|
|
139
|
+
>
|
|
140
|
+
</div>
|
|
141
|
+
<div class="col-2" />
|
|
142
|
+
</li>
|
|
143
|
+
<!-- subnav items -->
|
|
144
|
+
<!-- @vue-expect-error -->
|
|
145
|
+
<li
|
|
146
|
+
v-for="item in items"
|
|
147
|
+
:key="item.name">
|
|
148
|
+
<!-- @vue-expect-error -->
|
|
149
|
+
<es-nav-bar-link
|
|
150
|
+
class="dropdown-item nav-item nav-item-border-mobile nav-link align-items-center d-flex px-lg-100 py-lg-50 product-menu-link"
|
|
151
|
+
:class="{ 'font-weight-bold': item.emphasize }"
|
|
152
|
+
:href="item.link"
|
|
153
|
+
:target="item.newTab ? '_blank' : null">
|
|
154
|
+
<!-- @vue-expect-error -->
|
|
155
|
+
{{ item.name }}
|
|
156
|
+
</es-nav-bar-link>
|
|
157
|
+
</li>
|
|
158
|
+
</ul>
|
|
159
|
+
<div
|
|
160
|
+
v-if="topics && topics.length"
|
|
161
|
+
class="product-menu-flyout product-menu-flyout--large dropdown-menu border-0 flex-wrap mt-0 p-lg-150">
|
|
162
|
+
<div class="nav-item d-lg-none mb-50">
|
|
163
|
+
<!-- mobile subnav header -->
|
|
164
|
+
<div class="col-2">
|
|
165
|
+
<!-- closes this menu level -->
|
|
166
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
167
|
+
<label
|
|
168
|
+
:for="checkboxId"
|
|
169
|
+
class="menu-toggle nav-link align-items-center d-flex font-size-sm h-100 mb-0 px-0 text-uppercase w-100">
|
|
170
|
+
<icon-arrow-left
|
|
171
|
+
class="expand-icon"
|
|
172
|
+
style="height: 24px" />
|
|
173
|
+
</label>
|
|
174
|
+
</div>
|
|
175
|
+
<div class="col-8 align-self-center text-center py-100">
|
|
176
|
+
<p
|
|
177
|
+
class="align-items-center d-flex d-lg-none font-weight-bold justify-content-between mb-0 text-decoration-none w-100">
|
|
178
|
+
<span
|
|
179
|
+
class="nav-link justify-content-center align-items-center d-flex font-weight-boldest w-100 h-100"
|
|
180
|
+
>{{ name }}</span
|
|
181
|
+
>
|
|
182
|
+
</p>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="col-2" />
|
|
185
|
+
</div>
|
|
186
|
+
<es-row
|
|
187
|
+
tag="ul"
|
|
188
|
+
class="d-block d-lg-flex list-unstyled">
|
|
189
|
+
<!-- @vue-expect-error -->
|
|
190
|
+
<es-nav-bar-topic-menu
|
|
191
|
+
v-for="topic in topics"
|
|
192
|
+
:key="topic.name"
|
|
193
|
+
class="col-lg-4 d-block"
|
|
194
|
+
:home-name="homeName"
|
|
195
|
+
:home-link="homeLink"
|
|
196
|
+
:close-button-text="closeButtonText"
|
|
197
|
+
:items="topic.subtopics"
|
|
198
|
+
:link="topic.link"
|
|
199
|
+
:new-tab="topic.newTab"
|
|
200
|
+
:name="topic.name"
|
|
201
|
+
:show-items-on-mobile="topic.showItemsOnMobile"
|
|
202
|
+
:sub-heading="topic.subHeading">
|
|
203
|
+
<template #logo>
|
|
204
|
+
<slot name="logo" />
|
|
205
|
+
</template>
|
|
206
|
+
</es-nav-bar-topic-menu>
|
|
207
|
+
<li class="nav-item col-lg-4 d-block h-auto my-100 my-lg-0">
|
|
208
|
+
<es-nav-bar-featured-article
|
|
209
|
+
:eyebrow="featuredArticle.eyebrow"
|
|
210
|
+
:link="featuredArticle.link"
|
|
211
|
+
:name="featuredArticle.name"
|
|
212
|
+
:image500="featuredArticle.image500"
|
|
213
|
+
:image-alt="featuredArticle.imageAlt" />
|
|
214
|
+
</li>
|
|
215
|
+
</es-row>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</template>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'EsNavBarTopLevelMenu',
|
|
4
|
+
props: {
|
|
5
|
+
homeName: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
homeLink: {
|
|
10
|
+
type: String,
|
|
11
|
+
required: true,
|
|
12
|
+
},
|
|
13
|
+
closeButtonText: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
featuredArticle: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default: () => ({}),
|
|
20
|
+
},
|
|
21
|
+
icon: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: '',
|
|
24
|
+
},
|
|
25
|
+
topics: {
|
|
26
|
+
type: Array,
|
|
27
|
+
default: () => [],
|
|
28
|
+
},
|
|
29
|
+
link: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '',
|
|
32
|
+
},
|
|
33
|
+
mainMenuText: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
newTab: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false,
|
|
40
|
+
},
|
|
41
|
+
name: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
subHeading: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: '',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
computed: {
|
|
51
|
+
checkboxId() {
|
|
52
|
+
return `menu-${this.name}`;
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
<template>
|
|
59
|
+
<div
|
|
60
|
+
class="nav-item top-header mx-0"
|
|
61
|
+
:class="{ 'has-dropdown': !link }">
|
|
62
|
+
<div class="top-header-inner w-100">
|
|
63
|
+
<!-- desktop link and fly-out menu trigger -->
|
|
64
|
+
<es-nav-bar-link
|
|
65
|
+
class="nav-link d-none d-lg-block py-100 font-weight-bolder"
|
|
66
|
+
:class="{ 'dropdown-toggle': !link }"
|
|
67
|
+
:href="link || '#'"
|
|
68
|
+
:data-toggle="link ? undefined : 'dropdown'"
|
|
69
|
+
:aria-haspopup="link ? undefined : true"
|
|
70
|
+
:aria-expanded="link ? undefined : false"
|
|
71
|
+
:target="link && newTab ? '_blank' : undefined">
|
|
72
|
+
<div class="d-lg-flex align-items-center">
|
|
73
|
+
{{ name }}
|
|
74
|
+
</div>
|
|
75
|
+
</es-nav-bar-link>
|
|
76
|
+
<!-- mobile link and fly-out menu trigger -->
|
|
77
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
78
|
+
<component
|
|
79
|
+
:is="link ? 'es-nav-bar-link' : 'label'"
|
|
80
|
+
class="nav-link d-flex d-lg-none align-items-center w-100 h-100 px-0 py-lg-100 px-100 font-weight-bold justify-content-between"
|
|
81
|
+
:class="{ 'dropdown-label': !link }"
|
|
82
|
+
:for="link ? undefined : checkboxId"
|
|
83
|
+
:href="link || undefined"
|
|
84
|
+
:target="newTab ? '_blank' : undefined">
|
|
85
|
+
<div class="align-items-center d-flex">
|
|
86
|
+
{{ name }}
|
|
87
|
+
</div>
|
|
88
|
+
<icon-arrow-right
|
|
89
|
+
v-if="!link"
|
|
90
|
+
class="expand-icon"
|
|
91
|
+
style="height: 24px" />
|
|
92
|
+
</component>
|
|
93
|
+
<input
|
|
94
|
+
v-if="!link"
|
|
95
|
+
:id="checkboxId"
|
|
96
|
+
:name="checkboxId"
|
|
97
|
+
type="checkbox"
|
|
98
|
+
class="menu-checkbox" />
|
|
99
|
+
<!-- fly-out menu -->
|
|
100
|
+
<div
|
|
101
|
+
v-if="!link"
|
|
102
|
+
class="menu">
|
|
103
|
+
<!-- mobile menu header -->
|
|
104
|
+
<div class="menu-header">
|
|
105
|
+
<div class="col-3" />
|
|
106
|
+
<div class="col-6 align-self-center text-center py-100">
|
|
107
|
+
<div class="nav-es-logo-mobile align-items-center d-flex">
|
|
108
|
+
<slot name="logo" />
|
|
109
|
+
</div>
|
|
110
|
+
<span class="sr-only">
|
|
111
|
+
{{ homeName }}
|
|
112
|
+
</span>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="d-flex col-3 justify-content-end">
|
|
115
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
116
|
+
<label
|
|
117
|
+
for="data--main-menu"
|
|
118
|
+
class="mb-0">
|
|
119
|
+
<icon-x class="menu-toggle align-self-center" />
|
|
120
|
+
<span class="sr-only">
|
|
121
|
+
{{ closeButtonText }}
|
|
122
|
+
</span>
|
|
123
|
+
</label>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
<div class="dropdown-menu dropdown-menu-full-page">
|
|
127
|
+
<es-container class="dropdown-menu-primary justify-content-lg-center py-lg-100">
|
|
128
|
+
<es-row class="flex-grow-1 justify-content-lg-center">
|
|
129
|
+
<div
|
|
130
|
+
class="mb-3 mb-lg-0"
|
|
131
|
+
:class="{
|
|
132
|
+
'col-lg-9': topics.length >= 3,
|
|
133
|
+
'col-lg-9 col-xl-6 col-xxl-5': topics.length == 2,
|
|
134
|
+
'col-lg-4': topics.length == 1,
|
|
135
|
+
}">
|
|
136
|
+
<ul class="dropdown-list row w-auto">
|
|
137
|
+
<!-- name of top-level menu (won't ever be a link) -->
|
|
138
|
+
<li class="nav-item col-lg-12 d-lg-none mb-50 topic-menu-back">
|
|
139
|
+
<div class="col-2">
|
|
140
|
+
<!-- eslint-disable-next-line vuejs-accessibility/label-has-for -->
|
|
141
|
+
<label
|
|
142
|
+
:for="checkboxId"
|
|
143
|
+
class="menu-toggle nav-link align-items-center d-flex font-size-sm h-100 mb-0 px-0 text-uppercase w-100">
|
|
144
|
+
<icon-arrow-left
|
|
145
|
+
class="expand-icon"
|
|
146
|
+
style="height: 24px" />
|
|
147
|
+
</label>
|
|
148
|
+
</div>
|
|
149
|
+
<div class="col-8 align-self-center text-center py-100">
|
|
150
|
+
<span
|
|
151
|
+
class="nav-link justify-content-center align-items-center d-flex font-weight-boldest w-100 h-100"
|
|
152
|
+
>{{ name }}</span
|
|
153
|
+
>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="col-2" />
|
|
156
|
+
</li>
|
|
157
|
+
<!-- @vue-expect-error -->
|
|
158
|
+
<es-nav-bar-topic-menu
|
|
159
|
+
v-for="topic in topics"
|
|
160
|
+
:key="topic.name"
|
|
161
|
+
:class="{
|
|
162
|
+
'col-xl-4': topics.length >= 3,
|
|
163
|
+
'col-lg-6': topics.length >= 2,
|
|
164
|
+
'col-lg-12': topics.length == 1,
|
|
165
|
+
}"
|
|
166
|
+
:home-name="homeName"
|
|
167
|
+
:home-link="homeLink"
|
|
168
|
+
:close-button-text="closeButtonText"
|
|
169
|
+
:items="topic.subtopics"
|
|
170
|
+
:link="topic.link"
|
|
171
|
+
:new-tab="topic.newTab"
|
|
172
|
+
:name="topic.name">
|
|
173
|
+
<template #logo>
|
|
174
|
+
<slot name="logo" />
|
|
175
|
+
</template>
|
|
176
|
+
</es-nav-bar-topic-menu>
|
|
177
|
+
</ul>
|
|
178
|
+
</div>
|
|
179
|
+
<!-- article link with image within menu -->
|
|
180
|
+
<es-nav-bar-featured-article
|
|
181
|
+
class="col-lg-3"
|
|
182
|
+
:eyebrow="featuredArticle.linkName"
|
|
183
|
+
:link="featuredArticle.linkUrl"
|
|
184
|
+
:new-tab="featuredArticle.newTab"
|
|
185
|
+
:name="featuredArticle.lede"
|
|
186
|
+
:image500="featuredArticle.image500"
|
|
187
|
+
:image-alt="featuredArticle.imageAlt" />
|
|
188
|
+
</es-row>
|
|
189
|
+
</es-container>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
</template>
|