@energysage/es-ds-components 3.0.0-alpha.6 → 3.0.0-alpha.7
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/components/es-accordion-list.vue +112 -0
- package/components/es-accordion.vue +7 -0
- package/components/es-badge.vue +20 -0
- package/components/es-breadcrumbs.vue +43 -32
- package/components/es-button.vue +112 -0
- package/components/es-card.vue +64 -0
- package/components/es-carousel.vue +160 -0
- package/components/{b-col.vue → es-col.vue} +11 -11
- package/components/es-collapse.vue +38 -36
- 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 +126 -0
- package/components/es-error-page.vue +120 -0
- package/components/es-file-input.vue +331 -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 +67 -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 +215 -0
- package/components/es-nav-bar-top-level-menu.vue +193 -0
- package/components/es-nav-bar-topic-menu.vue +194 -0
- package/components/es-nav-bar.vue +396 -0
- package/components/es-pagination.vue +66 -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 +50 -57
- package/components/es-rating.vue +120 -0
- package/components/es-reviews-io-card-carousel.vue +275 -0
- package/components/es-slider.vue +147 -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 +67 -0
- package/components/es-verification-code.vue +94 -0
- package/components/es-view-more.vue +63 -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 → icon/chevron-down.vue} +16 -16
- package/components/icon/chevron-horizontal.vue +39 -0
- package/components/icon/chevron-left.vue +39 -0
- package/components/{icon-chevron-right.vue → icon/chevron-right.vue} +16 -16
- 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/lib-utils/mime-type-finder.js +48 -0
- package/nuxt.config.ts +40 -9
- package/package.json +29 -5
- package/tsconfig.json +2 -2
- package/utils/get-es-footer-content.js +90 -0
- package/utils/get-es-nav-bar-account-content.js +55 -0
- package/utils/get-es-nav-bar-global-content.js +474 -0
- /package/components/{b-container.vue → es-container.vue} +0 -0
- /package/components/{b-row.vue → es-row.vue} +0 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
useHead({
|
|
3
|
+
link: [
|
|
4
|
+
{
|
|
5
|
+
// https://web.dev/defer-non-critical-css/
|
|
6
|
+
href: 'https://assets.reviews.io/css/widgets/carousel-widget.css?_t=2023040418',
|
|
7
|
+
rel: 'preload',
|
|
8
|
+
as: 'style',
|
|
9
|
+
onload: "this.onload=null;this.rel='stylesheet'",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
// https://web.dev/defer-non-critical-css/
|
|
13
|
+
href: 'https://assets.reviews.io/iconfont/reviewsio-icons/style.css?_t=2023040418',
|
|
14
|
+
rel: 'preload',
|
|
15
|
+
as: 'style',
|
|
16
|
+
onload: "this.onload=null;this.rel='stylesheet'",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
script: [
|
|
20
|
+
{
|
|
21
|
+
// https://developer.chrome.com/docs/lighthouse/performance/render-blocking-resources/#how-to-eliminate-render-blocking-scripts
|
|
22
|
+
src: 'https://widget.reviews.io/carousel-inline-iframeless/dist.js?_t=2023040418',
|
|
23
|
+
async: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
onBeforeUnmount(() => {
|
|
29
|
+
const widgetPrefixes = document.querySelectorAll('.CarouselWidget-prefix');
|
|
30
|
+
widgetPrefixes.forEach((prefix) => {
|
|
31
|
+
prefix.remove();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const initializeWidget = () => {
|
|
36
|
+
// if the Reviews.io script loaded before
|
|
37
|
+
if (typeof window !== 'undefined' && window.carouselInlineWidget) {
|
|
38
|
+
// eslint-disable-next-line no-new, new-cap
|
|
39
|
+
new window.carouselInlineWidget('reviewsio-carousel-widget', {
|
|
40
|
+
/* Your REVIEWS.io account ID: */
|
|
41
|
+
store: 'energy-sage',
|
|
42
|
+
sku: '',
|
|
43
|
+
lang: 'en',
|
|
44
|
+
carousel_type: 'topHeader',
|
|
45
|
+
styles_carousel: 'CarouselWidget--topHeader--withcards',
|
|
46
|
+
|
|
47
|
+
/* Widget settings: */
|
|
48
|
+
options: {
|
|
49
|
+
general: {
|
|
50
|
+
// UNDOCUMENTED??
|
|
51
|
+
// Disables rich snippet injection; ls+json data and what else who knows....
|
|
52
|
+
enable_richsnippets_company: false,
|
|
53
|
+
/* What reviews should the widget display? Available options: company, product,
|
|
54
|
+
third_party. You can choose one type or multiple separated by comma. */
|
|
55
|
+
review_type: 'company',
|
|
56
|
+
/* Minimum number of reviews required for widget to be displayed */
|
|
57
|
+
min_reviews: '1',
|
|
58
|
+
/* Maximum number of reviews to include in the carousel widget. */
|
|
59
|
+
max_reviews: '10',
|
|
60
|
+
address_format: 'CITY, COUNTRY',
|
|
61
|
+
/* Carousel auto-scrolling speed. 3000 = 3 seconds. If you want to disable auto-scroll,
|
|
62
|
+
set this value to false. */
|
|
63
|
+
enable_auto_scroll: false,
|
|
64
|
+
},
|
|
65
|
+
header: {
|
|
66
|
+
/* Show overall rating stars */
|
|
67
|
+
enable_overall_stars: true,
|
|
68
|
+
rating_decimal_places: 2,
|
|
69
|
+
},
|
|
70
|
+
reviews: {
|
|
71
|
+
/* Show customer name */
|
|
72
|
+
enable_customer_name: true,
|
|
73
|
+
/* Show customer location */
|
|
74
|
+
enable_customer_location: true,
|
|
75
|
+
/* Show "verified review" badge */
|
|
76
|
+
enable_verified_badge: true,
|
|
77
|
+
/* Show "verified subscriber" badge */
|
|
78
|
+
enable_subscriber_badge: true,
|
|
79
|
+
/* Show "I recommend this product" badge (Only for product reviews) */
|
|
80
|
+
enable_recommends_badge: true,
|
|
81
|
+
/* Show photos attached to reviews */
|
|
82
|
+
enable_photos: false,
|
|
83
|
+
/* Show videos attached to reviews */
|
|
84
|
+
enable_videos: false,
|
|
85
|
+
/* Show when review was written */
|
|
86
|
+
enable_review_date: true,
|
|
87
|
+
/* Hide reviews written by the same customer
|
|
88
|
+
(This may occur when customer reviews multiple products) */
|
|
89
|
+
disable_same_customer: true,
|
|
90
|
+
/* Minimum star rating */
|
|
91
|
+
min_review_percent: 4,
|
|
92
|
+
/* Show 3rd party review source */
|
|
93
|
+
third_party_source: true,
|
|
94
|
+
/* Hide reviews without comments (still shows if review has a photo) */
|
|
95
|
+
hide_empty_reviews: true,
|
|
96
|
+
/* Show product name */
|
|
97
|
+
enable_product_name: true,
|
|
98
|
+
/* Show only reviews which have specific tags (multiple semicolon
|
|
99
|
+
separated tags allowed i.e tag1;tag2) */
|
|
100
|
+
tags: 'es-featured',
|
|
101
|
+
/* Show branch, only one input */
|
|
102
|
+
branch: '',
|
|
103
|
+
enable_branch_name: false,
|
|
104
|
+
},
|
|
105
|
+
popups: {
|
|
106
|
+
/* Make review items clickable (When they are clicked, a popup appears
|
|
107
|
+
with more information about a customer and review) */
|
|
108
|
+
enable_review_popups: true,
|
|
109
|
+
/* Show "was this review helpful" buttons */
|
|
110
|
+
enable_helpful_buttons: false,
|
|
111
|
+
/* Show how many times review was upvoted as helpful */
|
|
112
|
+
enable_helpful_count: false,
|
|
113
|
+
/* Show share buttons */
|
|
114
|
+
enable_share_buttons: false,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
translations: {
|
|
118
|
+
verified_customer: 'Verified Customer',
|
|
119
|
+
},
|
|
120
|
+
/**
|
|
121
|
+
* The styles below, if uncommented, are inserted via JS, which violates our CSP.
|
|
122
|
+
* They are only used for customization, and we are only customizing one of these variables.
|
|
123
|
+
* See _reviews.scss for the place to safely include the necessary variables.
|
|
124
|
+
* This list is preserved here for reference, in case more customization is needed.
|
|
125
|
+
*/
|
|
126
|
+
/* styles: {
|
|
127
|
+
// Base font size is a reference size for all text elements. When base value gets changed,
|
|
128
|
+
all TextHeading and TexBody elements get proportionally adjusted.
|
|
129
|
+
'--base-font-size': '16px',
|
|
130
|
+
'--base-maxwidth': '100%',
|
|
131
|
+
|
|
132
|
+
// Logo styles:
|
|
133
|
+
'--reviewsio-logo-style': 'var(--logo-normal)',
|
|
134
|
+
|
|
135
|
+
// Star styles
|
|
136
|
+
'--common-star-color': ' #0E1311',
|
|
137
|
+
'--common-star-disabled-color': ' rgba(0,0,0,0.25)',
|
|
138
|
+
'--medium-star-size': ' 22px',
|
|
139
|
+
'--small-star-size': '19px', // Modal
|
|
140
|
+
'--x-small-star-size': '16px',
|
|
141
|
+
'--x-small-star-display': 'inline-flex',
|
|
142
|
+
|
|
143
|
+
// Header styles:
|
|
144
|
+
'--header-order': '1',
|
|
145
|
+
'--header-width': '160px',
|
|
146
|
+
'--header-bg-start-color': 'transparent',
|
|
147
|
+
'--header-bg-end-color': 'transparent',
|
|
148
|
+
'--header-gradient-direction': '135deg',
|
|
149
|
+
'--header-padding': '0.5em',
|
|
150
|
+
'--header-border-width': '0px',
|
|
151
|
+
'--header-border-color': 'rgba(0,0,0,0.1)',
|
|
152
|
+
'--header-border-radius': '0px',
|
|
153
|
+
'--header-shadow-size': '0px',
|
|
154
|
+
'--header-shadow-color': 'rgba(0, 0, 0, 0.1)',
|
|
155
|
+
|
|
156
|
+
// Header content styles:
|
|
157
|
+
'--header-star-color': 'inherit',
|
|
158
|
+
'--header-disabled-star-color': 'inherit',
|
|
159
|
+
'--header-heading-text-color': 'inherit',
|
|
160
|
+
'--header-heading-font-size': 'inherit',
|
|
161
|
+
'--header-heading-font-weight': 'inherit',
|
|
162
|
+
'--header-heading-line-height': 'inherit',
|
|
163
|
+
'--header-heading-text-transform': 'inherit',
|
|
164
|
+
'--header-subheading-text-color': 'inherit',
|
|
165
|
+
'--header-subheading-font-size': 'inherit',
|
|
166
|
+
'--header-subheading-font-weight': 'inherit',
|
|
167
|
+
'--header-subheading-line-height': 'inherit',
|
|
168
|
+
'--header-subheading-text-transform': 'inherit',
|
|
169
|
+
|
|
170
|
+
// Review item styles:
|
|
171
|
+
'--item-maximum-columns': '5', // Must be 3 or larger
|
|
172
|
+
'--item-background-start-color': '#ffffff',
|
|
173
|
+
'--item-background-end-color': '#ffffff',
|
|
174
|
+
'--item-gradient-direction': '135deg',
|
|
175
|
+
'--item-padding': '1.5em',
|
|
176
|
+
'--item-border-width': '0px',
|
|
177
|
+
'--item-border-color': 'rgba(0,0,0,0.1)',
|
|
178
|
+
'--item-border-radius': '12px',
|
|
179
|
+
'--item-shadow-size': '10px',
|
|
180
|
+
'--item-shadow-color': 'rgba(0,0,0,0.05)',
|
|
181
|
+
|
|
182
|
+
// Heading styles:
|
|
183
|
+
'--heading-text-color': ' #0E1311',
|
|
184
|
+
'--heading-text-font-weight': ' 600',
|
|
185
|
+
'--heading-text-font-family': ' inherit',
|
|
186
|
+
'--heading-text-line-height': ' 1.4',
|
|
187
|
+
'--heading-text-letter-spacing': '0',
|
|
188
|
+
'--heading-text-transform': 'none',
|
|
189
|
+
|
|
190
|
+
// Body text styles:
|
|
191
|
+
'--body-text-color': ' #0E1311',
|
|
192
|
+
'--body-text-font-weight': '400',
|
|
193
|
+
'--body-text-font-family': ' inherit',
|
|
194
|
+
'--body-text-line-height': ' 1.4',
|
|
195
|
+
'--body-text-letter-spacing': '0',
|
|
196
|
+
'--body-text-transform': 'none',
|
|
197
|
+
|
|
198
|
+
// Scroll button styles:
|
|
199
|
+
'--scroll-button-icon-color': '#0E1311',
|
|
200
|
+
'--scroll-button-icon-size': '24px',
|
|
201
|
+
'--scroll-button-bg-color': 'transparent',
|
|
202
|
+
|
|
203
|
+
'--scroll-button-border-width': '0px',
|
|
204
|
+
'--scroll-button-border-color': 'rgba(0,0,0,0.1)',
|
|
205
|
+
|
|
206
|
+
'--scroll-button-border-radius': '60px',
|
|
207
|
+
'--scroll-button-shadow-size': '0px',
|
|
208
|
+
'--scroll-button-shadow-color': 'rgba(0,0,0,0.1)',
|
|
209
|
+
'--scroll-button-horizontal-position': '0px',
|
|
210
|
+
'--scroll-button-vertical-position': '0px',
|
|
211
|
+
|
|
212
|
+
// Badge styles:
|
|
213
|
+
'--badge-icon-color': '#0E1311',
|
|
214
|
+
'--badge-icon-font-size': '15px',
|
|
215
|
+
'--badge-text-color': '#0E1311',
|
|
216
|
+
'--badge-text-font-size': 'inherit',
|
|
217
|
+
'--badge-text-letter-spacing': 'inherit',
|
|
218
|
+
'--badge-text-transform': 'inherit',
|
|
219
|
+
|
|
220
|
+
// Author styles:
|
|
221
|
+
'--author-font-size': 'inherit',
|
|
222
|
+
'--author-font-weight': 'inherit',
|
|
223
|
+
'--author-text-transform': 'inherit',
|
|
224
|
+
|
|
225
|
+
// Product photo or review photo styles:
|
|
226
|
+
'--photo-video-thumbnail-size': '60px',
|
|
227
|
+
'--photo-video-thumbnail-border-radius': '0px',
|
|
228
|
+
|
|
229
|
+
// Popup styles:
|
|
230
|
+
'--popup-backdrop-color': 'rgba(0,0,0,0.75)',
|
|
231
|
+
'--popup-color': '#ffffff',
|
|
232
|
+
'--popup-star-color': 'inherit',
|
|
233
|
+
'--popup-disabled-star-color': 'inherit',
|
|
234
|
+
'--popup-heading-text-color': 'inherit',
|
|
235
|
+
'--popup-body-text-color': 'inherit',
|
|
236
|
+
'--popup-badge-icon-color': 'inherit',
|
|
237
|
+
'--popup-badge-icon-font-size': '19px',
|
|
238
|
+
'--popup-badge-text-color': 'inherit',
|
|
239
|
+
'--popup-badge-text-font-size': '14px',
|
|
240
|
+
'--popup-border-width': '0px',
|
|
241
|
+
'--popup-border-color': 'rgba(0,0,0,0.1)',
|
|
242
|
+
'--popup-border-radius': '0px',
|
|
243
|
+
'--popup-shadow-size': '0px',
|
|
244
|
+
'--popup-shadow-color': 'rgba(0,0,0,0.1)',
|
|
245
|
+
'--popup-icon-color': '#0E1311',
|
|
246
|
+
|
|
247
|
+
// Tooltip styles:
|
|
248
|
+
'--tooltip-bg-color': '#0E1311',
|
|
249
|
+
'--tooltip-text-color': '#ffffff',
|
|
250
|
+
}, */
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
onMounted(async () => {
|
|
256
|
+
// if we're server-side, get out
|
|
257
|
+
if (typeof window === 'undefined') return;
|
|
258
|
+
|
|
259
|
+
if (window.carouselInlineWidget) {
|
|
260
|
+
// if the Reviews.io script has loaded, initialize the widget
|
|
261
|
+
initializeWidget();
|
|
262
|
+
} else {
|
|
263
|
+
// if the Reviews.io script has not loaded, set its callback function to trigger widget initialization
|
|
264
|
+
window.carouselInlineWidgetCallback = () => {
|
|
265
|
+
initializeWidget();
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
</script>
|
|
270
|
+
|
|
271
|
+
<template>
|
|
272
|
+
<div
|
|
273
|
+
id="reviewsio-carousel-widget"
|
|
274
|
+
class="EsReviewsIoCardCarousel" />
|
|
275
|
+
</template>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import Slider from 'primevue/slider';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
/**
|
|
6
|
+
* Starting value of slider thumb
|
|
7
|
+
*/
|
|
8
|
+
startingValue: {
|
|
9
|
+
type: Number,
|
|
10
|
+
required: true,
|
|
11
|
+
default: 1,
|
|
12
|
+
},
|
|
13
|
+
/**
|
|
14
|
+
* Minimum value of slider
|
|
15
|
+
*/
|
|
16
|
+
min: {
|
|
17
|
+
type: Number,
|
|
18
|
+
required: true,
|
|
19
|
+
default: 1,
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* Maximum value of slider
|
|
23
|
+
*/
|
|
24
|
+
max: {
|
|
25
|
+
type: Number,
|
|
26
|
+
required: true,
|
|
27
|
+
default: 100,
|
|
28
|
+
},
|
|
29
|
+
/**
|
|
30
|
+
* Step increment
|
|
31
|
+
*/
|
|
32
|
+
step: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 1,
|
|
35
|
+
},
|
|
36
|
+
/**
|
|
37
|
+
* Aria label for slider handle
|
|
38
|
+
*/
|
|
39
|
+
ariaLabel: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
default: 'Select a number',
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Function that modifies label value
|
|
46
|
+
*/
|
|
47
|
+
labelFormatter: {
|
|
48
|
+
type: Function,
|
|
49
|
+
required: false,
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
|
+
default: (val: any) => val,
|
|
52
|
+
},
|
|
53
|
+
/**
|
|
54
|
+
* Function that modifies tooltip value
|
|
55
|
+
*/
|
|
56
|
+
tooltipFormatter: {
|
|
57
|
+
type: Function,
|
|
58
|
+
required: false,
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
default: (val: any) => val,
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// allow use of v-model on this component
|
|
65
|
+
const model = defineModel<number | number[]>();
|
|
66
|
+
model.value = props.startingValue;
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<div>
|
|
71
|
+
<slider
|
|
72
|
+
v-model="model"
|
|
73
|
+
v-bind="$attrs"
|
|
74
|
+
:min="min"
|
|
75
|
+
:max="max"
|
|
76
|
+
:step="step"
|
|
77
|
+
:aria-label="ariaLabel"
|
|
78
|
+
:pt="{
|
|
79
|
+
root: {
|
|
80
|
+
class: 'slider-root',
|
|
81
|
+
},
|
|
82
|
+
range: {
|
|
83
|
+
class: 'slider-range',
|
|
84
|
+
},
|
|
85
|
+
handle: {
|
|
86
|
+
class: 'slider-handle',
|
|
87
|
+
},
|
|
88
|
+
}" />
|
|
89
|
+
|
|
90
|
+
<div class="d-flex flex-row justify-content-between">
|
|
91
|
+
<span>{{ labelFormatter(min) }}</span>
|
|
92
|
+
<span>{{ labelFormatter(max) }}</span>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<style lang="scss" scoped>
|
|
98
|
+
@use '@energysage/es-ds-styles/scss/variables' as variables;
|
|
99
|
+
:deep(.slider-root) {
|
|
100
|
+
background-color: variables.$gray-300;
|
|
101
|
+
border-radius: 15px;
|
|
102
|
+
height: 10px;
|
|
103
|
+
margin-bottom: 0.75rem;
|
|
104
|
+
position: relative;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
:deep(.slider-range) {
|
|
108
|
+
background: linear-gradient(90deg, #688aea, #162676);
|
|
109
|
+
border-radius: 15px;
|
|
110
|
+
height: 10px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:deep(.slider-handle) {
|
|
114
|
+
background-color: variables.$white;
|
|
115
|
+
border: 9px solid variables.$blue-600;
|
|
116
|
+
border-radius: 50%;
|
|
117
|
+
box-shadow: 0.5px 0.5px 2px 1px rgba(0, 0, 0, 0.32);
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
filter: drop-shadow(0 1px 6px rgba(34, 38, 51, 0.25));
|
|
120
|
+
height: 28px;
|
|
121
|
+
transform: translate(-54%, -32%);
|
|
122
|
+
width: 28px;
|
|
123
|
+
|
|
124
|
+
&:focus-visible {
|
|
125
|
+
outline: none;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// "tooltip"
|
|
130
|
+
:deep(.slider-handle::before) {
|
|
131
|
+
align-items: center;
|
|
132
|
+
background-color: variables.$blue-600;
|
|
133
|
+
border-radius: 50%;
|
|
134
|
+
bottom: 27px;
|
|
135
|
+
box-shadow: 0 1px 6px 0 rgba(34, 38, 51, 0.25);
|
|
136
|
+
color: variables.$white;
|
|
137
|
+
content: v-bind("`'${tooltipFormatter(model)}'`");
|
|
138
|
+
display: flex;
|
|
139
|
+
font-weight: variables.$font-weight-boldest;
|
|
140
|
+
height: 52px;
|
|
141
|
+
justify-content: center;
|
|
142
|
+
padding-bottom: 2px;
|
|
143
|
+
position: absolute;
|
|
144
|
+
right: -22px;
|
|
145
|
+
width: 52px;
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps({
|
|
3
|
+
label: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
role: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: 'status',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<span
|
|
16
|
+
:role="role"
|
|
17
|
+
class="spinner-border">
|
|
18
|
+
<span class="sr-only">
|
|
19
|
+
{{ label }}
|
|
20
|
+
</span>
|
|
21
|
+
</span>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
constrained: {
|
|
4
|
+
type: Boolean,
|
|
5
|
+
default: false,
|
|
6
|
+
},
|
|
7
|
+
imageAltText: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: '',
|
|
10
|
+
},
|
|
11
|
+
imageSrc: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: '',
|
|
14
|
+
},
|
|
15
|
+
primaryCtaTarget: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: '_blank',
|
|
18
|
+
},
|
|
19
|
+
primaryCtaText: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
primaryCtaUrl: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
secondaryCtaTarget: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: '_blank',
|
|
30
|
+
},
|
|
31
|
+
secondaryCtaText: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: '',
|
|
34
|
+
},
|
|
35
|
+
secondaryCtaUrl: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: '',
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const showSecondaryCta = computed(() => {
|
|
42
|
+
return !!props.secondaryCtaText && !!props.secondaryCtaUrl;
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<es-card
|
|
48
|
+
class="p-100 px-sm-200 text-center text-lg-left"
|
|
49
|
+
:class="{
|
|
50
|
+
'px-md-100 py-md-200': constrained,
|
|
51
|
+
'px-md-300': !constrained,
|
|
52
|
+
}">
|
|
53
|
+
<es-row class="align-items-lg-center justify-content-xl-between">
|
|
54
|
+
<es-col
|
|
55
|
+
class="EsSupportCard-contentColumn d-flex flex-column justify-content-lg-center position-relative"
|
|
56
|
+
:class="{ 'pr-lg-0': constrained }"
|
|
57
|
+
cols="12"
|
|
58
|
+
lg="8">
|
|
59
|
+
<!-- h2 is first in DOM order for semantics; using order utility classes to rearrange -->
|
|
60
|
+
<h2
|
|
61
|
+
class="align-items-center d-flex font-size-300 justify-content-center justify-content-lg-start mb-150 mb-lg-100 order-1"
|
|
62
|
+
:class="{
|
|
63
|
+
'pl-lg-100': constrained,
|
|
64
|
+
'pl-lg-200': !constrained,
|
|
65
|
+
}">
|
|
66
|
+
<slot name="headline" />
|
|
67
|
+
</h2>
|
|
68
|
+
<div class="EsSupportCard-imageContainer mb-150 mb-lg-0 order-0">
|
|
69
|
+
<slot name="image">
|
|
70
|
+
<nuxt-img
|
|
71
|
+
v-if="imageAltText && imageSrc"
|
|
72
|
+
:alt="imageAltText"
|
|
73
|
+
class="bg-teal-200 rounded-circle"
|
|
74
|
+
height="100px"
|
|
75
|
+
:src="imageSrc"
|
|
76
|
+
width="100px" />
|
|
77
|
+
</slot>
|
|
78
|
+
</div>
|
|
79
|
+
<!--
|
|
80
|
+
we are giving 'EsSupportCard-description' a unique class (that we don't use directly in this
|
|
81
|
+
component) for consuming applications to use in targeting ::v-deep styles on <p> tags to remove
|
|
82
|
+
the natural <p> bottom margin, for example.
|
|
83
|
+
|
|
84
|
+
e.g. a CMS rich text component may generate a <p> tag within this that automatically
|
|
85
|
+
gets a bottom margin, which throws off the vertical centering. we are intentionally leaving
|
|
86
|
+
the removal of that bottom margin up to consuming applications rather than removing it on all
|
|
87
|
+
<p> tags within this element, in case they may want two <p> tags or any other markup in here.
|
|
88
|
+
-->
|
|
89
|
+
<div
|
|
90
|
+
class="EsSupportCard-description font-size-75 font-size-lg-100 mb-150 mb-lg-0 order-2"
|
|
91
|
+
:class="{
|
|
92
|
+
'pl-lg-100': constrained,
|
|
93
|
+
'pl-lg-200': !constrained,
|
|
94
|
+
}">
|
|
95
|
+
<slot name="description" />
|
|
96
|
+
</div>
|
|
97
|
+
</es-col>
|
|
98
|
+
<es-col
|
|
99
|
+
cols="12"
|
|
100
|
+
lg="4"
|
|
101
|
+
xxl="3">
|
|
102
|
+
<es-button
|
|
103
|
+
class="w-100"
|
|
104
|
+
:class="{ 'mb-100': showSecondaryCta }"
|
|
105
|
+
:href="primaryCtaUrl"
|
|
106
|
+
:target="primaryCtaTarget"
|
|
107
|
+
variant="primary">
|
|
108
|
+
{{ primaryCtaText }}
|
|
109
|
+
</es-button>
|
|
110
|
+
<es-button
|
|
111
|
+
v-if="showSecondaryCta"
|
|
112
|
+
class="w-100"
|
|
113
|
+
:href="secondaryCtaUrl"
|
|
114
|
+
outline
|
|
115
|
+
:target="secondaryCtaTarget"
|
|
116
|
+
variant="primary">
|
|
117
|
+
{{ secondaryCtaText }}
|
|
118
|
+
</es-button>
|
|
119
|
+
</es-col>
|
|
120
|
+
</es-row>
|
|
121
|
+
</es-card>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<style lang="scss">
|
|
125
|
+
@use '@energysage/es-ds-styles/scss/mixins/breakpoints' as breakpoints;
|
|
126
|
+
|
|
127
|
+
@include breakpoints.media-breakpoint-up(lg) {
|
|
128
|
+
.EsSupportCard {
|
|
129
|
+
&-contentColumn {
|
|
130
|
+
/* account for the size of the image */
|
|
131
|
+
min-height: 100px;
|
|
132
|
+
/* 15px standard column padding + 100px image width */
|
|
133
|
+
padding-left: 115px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&-description {
|
|
137
|
+
/* limit line length on larger breakpoints */
|
|
138
|
+
max-width: 450px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&-imageContainer {
|
|
142
|
+
/* account for 15px standard column padding */
|
|
143
|
+
left: 15px;
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 50%;
|
|
146
|
+
transform: translateY(-50%);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps({
|
|
3
|
+
link: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
src: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
const hasTitle = computed(() => !!slots.title);
|
|
15
|
+
const hasLinkCopy = computed(() => !!slots.linkCopy);
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<div class="d-flex support-holder align-items-center">
|
|
20
|
+
<div class="mr-50">
|
|
21
|
+
<a
|
|
22
|
+
target="_blank"
|
|
23
|
+
aria-label="Support"
|
|
24
|
+
:href="link">
|
|
25
|
+
<img
|
|
26
|
+
class="image"
|
|
27
|
+
:src="src"
|
|
28
|
+
alt="EnergySage support" />
|
|
29
|
+
</a>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="d-flex flex-column">
|
|
32
|
+
<div>
|
|
33
|
+
<div class="h5 mb-25 font-size-base font-weight-bold">
|
|
34
|
+
<slot
|
|
35
|
+
v-if="hasTitle"
|
|
36
|
+
name="title" />
|
|
37
|
+
<template v-else> Need help signing up? </template>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div>
|
|
41
|
+
<a
|
|
42
|
+
target="_blank"
|
|
43
|
+
class="font-size-75"
|
|
44
|
+
:href="link">
|
|
45
|
+
<slot
|
|
46
|
+
v-if="hasLinkCopy"
|
|
47
|
+
name="linkCopy" />
|
|
48
|
+
<template v-else> Schedule a free call with your EnergySage Advisor. </template>
|
|
49
|
+
</a>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<style lang="scss" scoped>
|
|
56
|
+
.support-holder {
|
|
57
|
+
max-width: 325px;
|
|
58
|
+
|
|
59
|
+
.image {
|
|
60
|
+
height: 64px;
|
|
61
|
+
width: 64px;
|
|
62
|
+
border-radius: 2rem;
|
|
63
|
+
object-fit: contain;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|