mod-build 3.6.71 → 4.0.0-alpha.1
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 +3 -0
- package/.eslintrc +18 -0
- package/CHANGELOG.md +2 -240
- package/README.md +16 -263
- package/gulp-tasks/build.js +1 -1
- package/package.json +21 -69
- package/siteconfig.js +38 -0
- package/src/accessible-components/button/_button.scss +195 -0
- package/src/accessible-components/button/back-button.html +4 -0
- package/src/accessible-components/button/button.html +17 -0
- package/src/accessible-components/carousel/_carousel.scss +112 -0
- package/src/accessible-components/carousel/carousel.html +25 -0
- package/src/accessible-components/checkbox/_checkbox.scss +96 -0
- package/src/accessible-components/checkbox/checkbox.html +8 -0
- package/src/accessible-components/expand-collapse/_expand-collapse.scss +122 -0
- package/src/accessible-components/expand-collapse/expand-collapse.html +8 -0
- package/src/accessible-components/expand-collapse/expand-collapse.js +52 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js +2 -0
- package/src/accessible-components/expand-collapse/expand-collapse.min.js.map +1 -0
- package/src/accessible-components/featured-block/_featured-block.scss +219 -0
- package/src/accessible-components/featured-block/featured-block.html +54 -0
- package/src/accessible-components/foot-assets/foot-assets.html +92 -0
- package/src/accessible-components/footer/footer.html +2 -0
- package/src/{templates/_partials/scripts/gtm-editorials/body/google-tag-manager-body.html → accessible-components/gtm-body/gtm-body.html} +1 -2
- package/src/accessible-components/head/head.html +188 -0
- package/src/accessible-components/header/_header.scss +289 -0
- package/src/accessible-components/header/header.html +66 -0
- package/src/accessible-components/hero/_hero.scss +371 -0
- package/src/accessible-components/hero/hero.html +53 -0
- package/src/accessible-components/how-it-works/_how-it-works.scss +217 -0
- package/src/accessible-components/how-it-works/how-it-works-carousel.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works-static.html +12 -0
- package/src/accessible-components/how-it-works/how-it-works.html +14 -0
- package/src/accessible-components/information/_information.scss +92 -0
- package/src/accessible-components/information/information.html +26 -0
- package/src/accessible-components/input/_input.scss +202 -0
- package/src/accessible-components/input/input.html +22 -0
- package/src/accessible-components/input/textarea.html +9 -0
- package/src/accessible-components/partners/_partners.scss +232 -0
- package/src/accessible-components/partners/partners.html +56 -0
- package/src/accessible-components/picture/picture.html +19 -0
- package/src/accessible-components/preloader/_preloader.scss +61 -0
- package/src/accessible-components/preloader/preloader.html +23 -0
- package/src/accessible-components/progress-bar/_progress-bar.scss +119 -0
- package/src/accessible-components/progress-bar/progress-bar.html +21 -0
- package/src/accessible-components/progress-bar/progress-bar.js +37 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js +2 -0
- package/src/accessible-components/progress-bar/progress-bar.min.js.map +1 -0
- package/src/accessible-components/radio-button/_radio-button.scss +537 -0
- package/src/accessible-components/radio-button/radio-button.html +34 -0
- package/src/accessible-components/reviews/_reviews.scss +175 -0
- package/src/accessible-components/reviews/reviews-carousel.html +12 -0
- package/src/accessible-components/reviews/reviews-static.html +12 -0
- package/src/accessible-components/reviews/reviews.html +37 -0
- package/src/accessible-components/select/_select.scss +69 -0
- package/src/accessible-components/select/select.html +10 -0
- package/src/accessible-components/steps/_steps.scss +524 -0
- package/src/accessible-components/steps/defaultFormFieldConfig.json +109 -0
- package/src/accessible-components/steps/step-fields.html +33 -0
- package/src/accessible-components/steps/steps.html +150 -0
- package/src/accessible-components/tcpa/_tcpa.scss +49 -0
- package/src/accessible-components/tcpa/tcpa.html +9 -0
- package/src/accessible-components/tile/_tile.scss +117 -0
- package/src/accessible-components/tile/tile.html +14 -0
- package/src/accessible-components/value-props/_value-props.scss +100 -0
- package/src/accessible-components/value-props/value-props.html +17 -0
- package/src/accessible-components/zip-control/_zip-control.scss +78 -0
- package/src/accessible-components/zip-control/zip-control.html +10 -0
- package/src/data/footer.js +117 -0
- package/src/data/seasons.js +5 -7
- package/src/data/theme.json +164 -0
- package/src/index.html +18 -0
- package/src/main.js +45 -0
- package/src/resources/scripts/abandonment/abandonment-1df90ee155f6c0893d90.min.js +2 -0
- package/src/resources/scripts/abandonment/abandonment.min.js +2 -0
- package/src/resources/scripts/footer/footer-component-7b5e263f64568573ecc0.min.js +2 -0
- package/src/resources/scripts/footer/footer-component.min.js +2 -0
- package/src/resources/scripts/helpers/initNumericOnlyFields.min.js +2 -0
- package/src/resources/scripts/helpers/initNumericOnlyFields.min.js.map +1 -0
- package/src/resources/scripts/helpers/isZipCodeValid.min.js +2 -0
- package/src/resources/scripts/helpers/isZipCodeValid.min.js.map +1 -0
- package/src/resources/scripts/mod-alytics/modalytics-0ac7d7a5a72ea67a0f47.min.js +2 -0
- package/src/resources/scripts/mod-alytics/modalytics.min.js +2 -0
- package/src/resources/scripts/mod-form/form/homeowner-77a4dd439b8db412678b.min.js +2 -0
- package/src/resources/scripts/mod-form/form/homeowner.min.js +2 -0
- package/src/resources/scripts/mod-utils/modutils-8ba40d21f559171ddd36.min.js +2 -0
- package/src/resources/scripts/mod-utils/modutils.min.js +2 -0
- package/src/resources/styles/components/abandonment/abandonment-ae63aca828944411eff7.min.css +1 -0
- package/src/resources/styles/components/abandonment/abandonment.min.css +1 -0
- package/src/resources/styles/components/footer/mod-footer-3717faf57147c62c1777.min.css +1 -0
- package/src/resources/styles/components/footer/mod-footer.min.css +1 -0
- package/src/resources/styles/components/footer/qs-footer-12bf078dc614ff221c3c.min.css +1 -0
- package/src/resources/styles/components/footer/qs-footer.min.css +1 -0
- package/src/resources/templates/modals/about/index.html +9 -0
- package/src/resources/templates/modals/contact-us/index.html +348 -0
- package/src/resources/templates/modals/faq/index.html +9 -0
- package/src/resources/templates/modals/privacy/index.html +236 -0
- package/src/resources/templates/modals/terms/index.html +166 -0
- package/src/scripts/has-qs-params.js +6 -5
- package/src/scripts/url-cleaner.js +3 -3
- package/src/scripts/utils.js +178 -0
- package/src/styles/home.scss +1 -0
- package/src/temp/scripts/maxmind-geoip2.js +104 -0
- package/src/templates/_partials/scripts/deferred-styles.html +16 -16
- package/src/templates/_partials/scripts/vwo-redirect-callback.html +43 -45
- package/src/templates/components/head.html +70 -0
- package/tasks/clean.js +13 -0
- package/tasks/grab-cdn.js +107 -0
- package/tasks/grab-form-helpers.js +94 -0
- package/tasks/grab-shared-components.js +81 -0
- package/tasks/grab-shared-scripts.js +267 -0
- package/tasks/serve.js +15 -0
- package/tasks/templates.js +168 -0
- package/template.js +801 -0
- package/vite.config.js +56 -0
- package/.eslintrc.yml +0 -59
- package/src/data/common.js +0 -704
- package/src/data/components/qs-footer.js +0 -55
- package/src/data/components/quote-footer.js +0 -73
- package/src/scripts/apt-block.js +0 -919
- package/src/scripts/components/custom-selects.js +0 -48
- package/src/scripts/components/radio-panels.js +0 -45
- package/src/scripts/es6-1.js +0 -6
- package/src/scripts/es6-2.js +0 -2
- package/src/scripts/qs-form.js +0 -839
- package/src/scripts/vendor/maxmind-geoip2.js +0 -2
- package/src/scripts/vendor/swiper.min.js +0 -13
- package/src/styles/apt-block.scss +0 -888
- package/src/templates/_partials/apt-block.html +0 -30
- package/src/templates/_partials/scripts/analytics.html +0 -4
- package/src/templates/_partials/scripts/go-page-hiding-snippet.html +0 -8
- package/src/templates/_partials/scripts/google-maps.html +0 -1
- package/src/templates/_partials/scripts/google-optimize.html +0 -12
- package/src/templates/_partials/scripts/gtm-editorials/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-hil/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-hil/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-pro/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-pro/head/google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-quote/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-quote/head/google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/gtm-whitelabel/body/mod-google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-whitelabel/body/non-mod-google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-whitelabel/head/mod-google-tag-manager-head.html +0 -10
- package/src/templates/_partials/scripts/gtm-whitelabel/head/non-mod-google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/gtm-wordpress/body/google-tag-manager-body.html +0 -5
- package/src/templates/_partials/scripts/gtm-wordpress/head/google-tag-manager-head.html +0 -9
- package/src/templates/_partials/scripts/visual-website-optimizer.html +0 -5
- package/src/templates/index.html +0 -46
- /package/{src → public}/favicon.ico +0 -0
package/siteconfig.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export let siteData = {
|
|
2
|
+
primary_trade: 'Medical Alerts',
|
|
3
|
+
service: 'alerts_medical', // required to fetch the correct tcpa blurb
|
|
4
|
+
gtm_container_ID: 'GTM-TBJV3H', // e.g. GTM-N23VMDW
|
|
5
|
+
qs_gtm_container_ID: 'GTM-TBJV3H',
|
|
6
|
+
email: 'support@emedicalalerts.com', // e.g. // e.g. support@homesolarsurvey.com
|
|
7
|
+
email_unsub: 'unsubscribe@emedicalalerts.com', // e.g. unsubscribe@homesolarsurvey.com
|
|
8
|
+
domain: 'emedicalalerts.com', // e.g. homesolarsurvey.com
|
|
9
|
+
company_name: 'eMedicalAlerts', // e.g. Home Solar Survey
|
|
10
|
+
website_name: 'eMedicalAlerts.com', // e.g. HomeSolarSurvey.com
|
|
11
|
+
useCDN: true,
|
|
12
|
+
isWhiteLabel: true,
|
|
13
|
+
isQSPage: true,
|
|
14
|
+
useAccessibleConfig: true
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export function setSiteData(newSiteData) {
|
|
18
|
+
siteData = newSiteData;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const defaultSettings = {
|
|
22
|
+
tmpFolder: '.tmp',
|
|
23
|
+
srcFolder: 'src',
|
|
24
|
+
browserSyncServeFolders: ['.tmp', 'src', 'node_modules/mod-style-bootstrap/src', 'node_modules/mod-base/src'],
|
|
25
|
+
distFolder: 'dist',
|
|
26
|
+
fontsSubfolder: 'fonts',
|
|
27
|
+
imagesSubfolder: 'images',
|
|
28
|
+
stylesSubfolder: 'styles',
|
|
29
|
+
scriptsSubfolder: 'scripts',
|
|
30
|
+
scriptsCompiledFolder: 'scripts/compiled',
|
|
31
|
+
templatesSubfolder: 'templates',
|
|
32
|
+
dataSubfolder: 'data',
|
|
33
|
+
modBuild: '',
|
|
34
|
+
resourceDomain: process.env.IS_LOCAL ? 'qa.modernize.com' : 'modernize.com',
|
|
35
|
+
nodeEnv: process.env.NODE_ENV,
|
|
36
|
+
isLocal: process.env.IS_LOCAL || import.meta?.env?.DEV,
|
|
37
|
+
buildPath: process.env.BUILD_PATH
|
|
38
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
$button-border-radius: 2px !default;
|
|
2
|
+
$button-cursor: pointer !default;
|
|
3
|
+
$button-display: inline-block !default;
|
|
4
|
+
$button-font-family: $base-font-family !default;
|
|
5
|
+
$button-font-size: 1.25rem !default;
|
|
6
|
+
$button-font-size-desktop: $button-font-size !default;
|
|
7
|
+
$button-font-style: normal !default;
|
|
8
|
+
$button-font-weight: 700 !default;
|
|
9
|
+
$button-height: 50px !default;
|
|
10
|
+
$button-height-desktop: $button-height !default;
|
|
11
|
+
$button-letter-spacing: 0 !default;
|
|
12
|
+
$button-line-height: 1.05 !default;
|
|
13
|
+
$button-margin: 10px 0 !default;
|
|
14
|
+
$button-padding: 15px 30px !default;
|
|
15
|
+
$button-position: relative !default;
|
|
16
|
+
$button-text-align: center !default;
|
|
17
|
+
$button-text-decoration: none !default;
|
|
18
|
+
$button-text-transform: uppercase !default;
|
|
19
|
+
$button-transition: $base-transition !default;
|
|
20
|
+
$button-width: 100% !default;
|
|
21
|
+
$button-z-index: 0 !default;
|
|
22
|
+
|
|
23
|
+
$back-button-align-items: center !default;
|
|
24
|
+
$back-button-background-color: transparent !default;
|
|
25
|
+
$back-button-border: 0 !default;
|
|
26
|
+
$back-button-color: $color-charcoal4 !default;
|
|
27
|
+
$back-button-display: flex !default;
|
|
28
|
+
$back-button-initial-display: none !default;
|
|
29
|
+
$back-button-font-size: .875rem !default;
|
|
30
|
+
$back-button-font-weight: 400 !default;
|
|
31
|
+
$back-button-line-height: $button-line-height !default;
|
|
32
|
+
$back-button-margin: 10px 0 0 !default;
|
|
33
|
+
$back-button-padding: 2px 5px !default;
|
|
34
|
+
$back-button-hover-background-color: transparent !default;
|
|
35
|
+
$back-button-hover-color: darken($back-button-color, 20%) !default;
|
|
36
|
+
$back-button-icon-font-size: 90% !default;
|
|
37
|
+
$back-button-icon-margin-right: 4px !default;
|
|
38
|
+
|
|
39
|
+
$back-button-focus-outline: 1px solid rgba($back-button-color, .5) !default;
|
|
40
|
+
$back-button-focus-outline-offset: 2px !default;
|
|
41
|
+
|
|
42
|
+
$button-primary-background-color: $color-a11y-default-button !default;
|
|
43
|
+
$button-primary-border: 0 !default;
|
|
44
|
+
$button-primary-color: $color-white !default;
|
|
45
|
+
$button-primary-max-width: 100% !default;
|
|
46
|
+
$button-primary-hover-background-color: $color-a11y-default-button-hover !default;
|
|
47
|
+
$button-primary-hover-border: $button-primary-border !default;
|
|
48
|
+
$button-primary-hover-color: $color-white !default;
|
|
49
|
+
|
|
50
|
+
$button-secondary-background-color: $button-primary-background-color !default;
|
|
51
|
+
$button-secondary-border: $button-primary-border !default;
|
|
52
|
+
$button-secondary-color: $button-primary-color !default;
|
|
53
|
+
$button-secondary-font-size: $button-font-size !default;
|
|
54
|
+
$button-secondary-font-size-desktop: $button-secondary-font-size !default;
|
|
55
|
+
$button-secondary-height: $button-height !default;
|
|
56
|
+
$button-secondary-height-desktop: $button-secondary-height !default;
|
|
57
|
+
$button-secondary-max-width: 100% !default;
|
|
58
|
+
$button-secondary-padding: $button-padding !default;
|
|
59
|
+
$button-secondary-text-transform: $button-text-transform !default;
|
|
60
|
+
$button-secondary-hover-background-color: $button-primary-hover-background-color !default;
|
|
61
|
+
$button-secondary-hover-border: $button-primary-hover-border !default;
|
|
62
|
+
$button-secondary-hover-color: $button-primary-hover-color !default;
|
|
63
|
+
|
|
64
|
+
$button-icon-position: absolute !default;
|
|
65
|
+
$button-icon-font-family: modicons-fill !default;
|
|
66
|
+
$button-icon-font-size: .875rem !default;
|
|
67
|
+
$button-icon-bottom: unset !default;
|
|
68
|
+
$button-icon-left: unset !default;
|
|
69
|
+
$button-icon-right: 15px !default;
|
|
70
|
+
$button-icon-top: 50% !default;
|
|
71
|
+
$button-icon-transform: translateY(-50%) !default;
|
|
72
|
+
|
|
73
|
+
.btn {
|
|
74
|
+
border-radius: $button-border-radius;
|
|
75
|
+
cursor: $button-cursor;
|
|
76
|
+
display: $button-display;
|
|
77
|
+
font-family: $button-font-family;
|
|
78
|
+
font-size: $button-font-size;
|
|
79
|
+
font-style: $button-font-style;
|
|
80
|
+
font-weight: $button-font-weight;
|
|
81
|
+
height: $button-height;
|
|
82
|
+
letter-spacing: $button-letter-spacing;
|
|
83
|
+
line-height: $button-line-height;
|
|
84
|
+
margin: $button-margin;
|
|
85
|
+
padding: $button-padding;
|
|
86
|
+
position: $button-position;
|
|
87
|
+
text-align: $button-text-align;
|
|
88
|
+
text-decoration: $button-text-decoration;
|
|
89
|
+
text-transform: $button-text-transform;
|
|
90
|
+
transition: $button-transition;
|
|
91
|
+
width: $button-width;
|
|
92
|
+
z-index: $button-z-index;
|
|
93
|
+
|
|
94
|
+
&__icon {
|
|
95
|
+
bottom: $button-icon-bottom;
|
|
96
|
+
font-family: $button-icon-font-family;
|
|
97
|
+
font-size: $button-icon-font-size;
|
|
98
|
+
left: $button-icon-left;
|
|
99
|
+
position: $button-icon-position;
|
|
100
|
+
right: $button-icon-right;
|
|
101
|
+
top: $button-icon-top;
|
|
102
|
+
transform: $button-icon-transform;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&--back {
|
|
106
|
+
align-items: $back-button-align-items;
|
|
107
|
+
background-color: $back-button-background-color;
|
|
108
|
+
border: $back-button-border;
|
|
109
|
+
color: $back-button-color;
|
|
110
|
+
cursor: $button-cursor;
|
|
111
|
+
display: $back-button-initial-display;
|
|
112
|
+
font-size: $back-button-font-size;
|
|
113
|
+
font-family: $button-font-family;
|
|
114
|
+
font-weight: $back-button-font-weight;
|
|
115
|
+
line-height: $back-button-line-height;
|
|
116
|
+
margin: $back-button-margin;
|
|
117
|
+
padding: $back-button-padding;
|
|
118
|
+
transition: $button-transition;
|
|
119
|
+
|
|
120
|
+
i {
|
|
121
|
+
font-size: $back-button-icon-font-size;
|
|
122
|
+
margin-right: $back-button-icon-margin-right;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&:focus {
|
|
126
|
+
outline: $back-button-focus-outline;
|
|
127
|
+
outline-offset: $back-button-focus-outline-offset;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&--primary {
|
|
132
|
+
background-color: $button-primary-background-color;
|
|
133
|
+
border: $button-primary-border;
|
|
134
|
+
color: $button-primary-color;
|
|
135
|
+
max-width: $button-primary-max-width;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&--secondary {
|
|
139
|
+
background-color: $button-secondary-background-color;
|
|
140
|
+
border: $button-secondary-border;
|
|
141
|
+
color: $button-secondary-color;
|
|
142
|
+
font-size: $button-secondary-font-size;
|
|
143
|
+
height: $button-secondary-height;
|
|
144
|
+
max-width: $button-secondary-max-width;
|
|
145
|
+
padding: $button-secondary-padding;
|
|
146
|
+
text-transform: $button-secondary-text-transform;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.form-in-progress {
|
|
151
|
+
.btn--back {
|
|
152
|
+
display: $back-button-display;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@include breakpoint-md {
|
|
157
|
+
.btn {
|
|
158
|
+
font-size: $button-font-size-desktop;
|
|
159
|
+
height: $button-height-desktop;
|
|
160
|
+
|
|
161
|
+
&--back {
|
|
162
|
+
&:hover,
|
|
163
|
+
&:active,
|
|
164
|
+
&:focus {
|
|
165
|
+
background-color: $back-button-hover-background-color;
|
|
166
|
+
color: $back-button-hover-color;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&--primary {
|
|
171
|
+
&:hover,
|
|
172
|
+
&:active,
|
|
173
|
+
&:focus {
|
|
174
|
+
background-color: $button-primary-hover-background-color;
|
|
175
|
+
border: $button-primary-hover-border;
|
|
176
|
+
color: $button-primary-hover-color;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&--secondary {
|
|
182
|
+
font-size: $button-secondary-font-size-desktop;
|
|
183
|
+
height: $button-secondary-height-desktop;
|
|
184
|
+
|
|
185
|
+
&:hover,
|
|
186
|
+
&:active,
|
|
187
|
+
&:focus {
|
|
188
|
+
background-color: $button-secondary-hover-background-color;
|
|
189
|
+
border: $button-secondary-hover-border;
|
|
190
|
+
color: $button-secondary-hover-color;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{#xif 'this.button.tag && this.button.tag === "a"'}}
|
|
2
|
+
<a class="btn{{#xif 'this.button.attributes && this.button.attributes.class || this.class'}}{{#if this.button.attributes.class}} {{this.button.attributes.class}}{{/if}}{{#if this.class}} {{this.class}}{{/if}}{{/xif}}" {{{addAttributes this.button 'class'}}}>
|
|
3
|
+
{{else}}
|
|
4
|
+
<button class="btn{{#xif 'this.button.attributes && this.button.attributes.class'}} {{this.button.attributes.class}}{{/xif}}" {{{addAttributes this.button 'class'}}}>
|
|
5
|
+
{{/xif}}
|
|
6
|
+
<span class="btn__text">{{{this.button.text}}}</span>
|
|
7
|
+
{{#if this.button.icon}}
|
|
8
|
+
<i class="btn__icon{{#xif 'this.button.icon.attributes && this.button.icon.attributes.class'}} {{this.button.icon.attributes.class}}{{/xif}}" {{{addAttributes this.button.icon 'class'}}}></i>
|
|
9
|
+
{{/if}}
|
|
10
|
+
{{#xif 'this.button.tag && this.button.tag === "a"'}}
|
|
11
|
+
</a>
|
|
12
|
+
{{else}}
|
|
13
|
+
{{#unless this.button.hideSpinner}}
|
|
14
|
+
<span class="btn__spinner"></span>
|
|
15
|
+
{{/unless}}
|
|
16
|
+
</button>
|
|
17
|
+
{{/xif}}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
$swiper-margin-top: 0 !default;
|
|
2
|
+
$swiper-padding-top: 0 !default;
|
|
3
|
+
|
|
4
|
+
$swiper-controls-padding: 30px 15px !default;
|
|
5
|
+
$swiper-controls-padding-desktop: 50px 15px !default;
|
|
6
|
+
$swiper-navigation-color: $color-charcoal4 !default;
|
|
7
|
+
$swiper-navigation-hover-color: darken($swiper-navigation-color, 20%) !default;
|
|
8
|
+
$swiper-pagination-margin: 0 10px !default;
|
|
9
|
+
$swiper-pagination-bottom-alignment: 0 !default;
|
|
10
|
+
$swiper-pagination-bullet-background-color: transparent !default;
|
|
11
|
+
$swiper-pagination-bullet-border: 1px solid $swiper-navigation-color !default;
|
|
12
|
+
$swiper-pagination-bullet-margin: 0 8px !default;
|
|
13
|
+
$swiper-pagination-bullet-height: 8px !default;
|
|
14
|
+
$swiper-pagination-bullet-width: 8px !default;
|
|
15
|
+
$swiper-pagination-bullet-hover-background-color: darken($swiper-navigation-color, 20%) !default;
|
|
16
|
+
$swiper-pagination-bullet-hover-border: 0 !default;
|
|
17
|
+
$swiper-pagination-bullet-active-background-color: $swiper-navigation-color !default;
|
|
18
|
+
$swiper-pagination-bullet-active-border: 0 !default;
|
|
19
|
+
|
|
20
|
+
$swiper-scrollbar-background-color: $color-charcoal1 !default;
|
|
21
|
+
$swiper-scrollbar-drag-color: $color-charcoal4 !default;
|
|
22
|
+
$swiper-scrollbar-height: 4px !default;
|
|
23
|
+
|
|
24
|
+
.swiper {
|
|
25
|
+
margin-top: $swiper-margin-top;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
padding-top: $swiper-padding-top;
|
|
28
|
+
|
|
29
|
+
.swiper-wrapper{
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.swiper-controls {
|
|
34
|
+
align-items: center;
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
padding: $swiper-controls-padding;
|
|
38
|
+
|
|
39
|
+
i.icon {
|
|
40
|
+
color: $swiper-navigation-color;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
transition: $base-transition;
|
|
43
|
+
|
|
44
|
+
&:not(.swiper-button-disabled) {
|
|
45
|
+
&:active,
|
|
46
|
+
&:focus,
|
|
47
|
+
&:hover {
|
|
48
|
+
color: $swiper-navigation-hover-color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.swiper-pagination {
|
|
54
|
+
margin: $swiper-pagination-margin;
|
|
55
|
+
position: relative;
|
|
56
|
+
|
|
57
|
+
.swiper-pagination-bullet {
|
|
58
|
+
background-color: $swiper-pagination-bullet-background-color;
|
|
59
|
+
border: $swiper-pagination-bullet-border;
|
|
60
|
+
height: $swiper-pagination-bullet-height;
|
|
61
|
+
opacity: 1;
|
|
62
|
+
transition: $base-transition;
|
|
63
|
+
width: $swiper-pagination-bullet-width;
|
|
64
|
+
|
|
65
|
+
&:active,
|
|
66
|
+
&:focus,
|
|
67
|
+
&:hover {
|
|
68
|
+
background-color: $swiper-pagination-bullet-hover-background-color;
|
|
69
|
+
border: $swiper-pagination-bullet-hover-border;
|
|
70
|
+
outline: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&-active {
|
|
74
|
+
background-color: $swiper-pagination-bullet-active-background-color;
|
|
75
|
+
border: $swiper-pagination-bullet-active-border;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.swiper-pagination-horizontal {
|
|
80
|
+
bottom: $swiper-pagination-bottom-alignment;
|
|
81
|
+
width: auto;
|
|
82
|
+
|
|
83
|
+
.swiper-pagination-bullet {
|
|
84
|
+
margin: $swiper-pagination-bullet-margin;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&-scrollbar {
|
|
91
|
+
background: $swiper-scrollbar-background-color;
|
|
92
|
+
height: $swiper-scrollbar-height;
|
|
93
|
+
|
|
94
|
+
&-drag {
|
|
95
|
+
background-color: $swiper-scrollbar-drag-color;
|
|
96
|
+
height: 100%;
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--reviews {
|
|
102
|
+
padding-top: 50px !important;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@include breakpoint-md {
|
|
107
|
+
.swiper {
|
|
108
|
+
.swiper-controls {
|
|
109
|
+
padding: $swiper-controls-padding-desktop;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<div class="swiper{{#xif 'this.carousel.carouselOptions.attributes && this.carousel.carouselOptions.attributes.class'}} {{this.carousel.carouselOptions.attributes.class}}{{/xif}}" {{{addAttributes this.carousel.carouselOptions 'class'}}}>
|
|
2
|
+
{{#if this.carousel.carouselOptions.attributes.aria.describedby}}
|
|
3
|
+
<p class="visually-hidden" id="{{this.carousel.carouselOptions.attributes.aria.describedby}}">{{{this.carousel.carouselOptions.description}}}</p>
|
|
4
|
+
{{/if}}
|
|
5
|
+
<ul class="swiper-wrapper"{{#if this.carousel.carouselOptions.wrapper}} {{{addAttributes this.carousel.carouselOptions.wrapper 'class'}}}{{/if}}>
|
|
6
|
+
{{#if this.carousel.template}}
|
|
7
|
+
{{fileInclude this.carousel.template
|
|
8
|
+
items = this.carousel.items
|
|
9
|
+
classModifier = this.carousel.classModifier
|
|
10
|
+
carouselOptions = this.carousel.carouselOptions
|
|
11
|
+
}}
|
|
12
|
+
{{/if}}
|
|
13
|
+
</ul>
|
|
14
|
+
|
|
15
|
+
{{#xif "this.carousel.carouselOptions.hasNavigation === true || this.carousel.carouselOptions.hasPagination === true" }}
|
|
16
|
+
<div class="swiper-controls">
|
|
17
|
+
{{#if this.carousel.carouselOptions.previousSlideIcon }}{{{ this.carousel.carouselOptions.previousSlideIcon }}}{{/if}}
|
|
18
|
+
{{#if this.carousel.carouselOptions.hasPagination }}<div class="swiper-pagination"></div>{{/if}}
|
|
19
|
+
{{#if this.carousel.carouselOptions.nextSlideIcon }}{{{ this.carousel.carouselOptions.nextSlideIcon }}}{{/if}}
|
|
20
|
+
</div>
|
|
21
|
+
{{/xif}}
|
|
22
|
+
{{#if this.carousel.carouselOptions.hasScrollbar }}
|
|
23
|
+
<div class="swiper-scrollbar"></div>
|
|
24
|
+
{{/if}}
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
$checkbox-background-color: transparent !default;
|
|
2
|
+
$checkbox-border: 0 !default;
|
|
3
|
+
$checkbox-border-radius: 4px !default;
|
|
4
|
+
$checkbox-font-size: 1rem !default;
|
|
5
|
+
$checkbox-font-weight: normal !default;
|
|
6
|
+
$checkbox-line-height: 1 !default;
|
|
7
|
+
$checkbox-color: $color-charcoal8 !default;
|
|
8
|
+
$checkbox-margin: 15px 0 !default;
|
|
9
|
+
$checkbox-padding: 0 !default;
|
|
10
|
+
$checkbox-text-align: left !default;
|
|
11
|
+
$checkbox-transition: color .15s ease-in-out !default;
|
|
12
|
+
|
|
13
|
+
$checkbox-label-padding-left: 30px !default;
|
|
14
|
+
$checkbox-label-width: auto !default;
|
|
15
|
+
|
|
16
|
+
$checkbox-input-background-color: $color-white !default;
|
|
17
|
+
$checkbox-input-border: 1px solid $color-charcoal4 !default;
|
|
18
|
+
$checkbox-input-border-radius: 2px !default;
|
|
19
|
+
$checkbox-input-box-shadow: 0 !default;
|
|
20
|
+
$checkbox-input-checked-background-color: $color-charcoal6 !default;
|
|
21
|
+
$checkbox-input-checked-border: 1px solid $checkbox-input-checked-background-color !default;
|
|
22
|
+
$checkbox-input-checked-color: $color-white !default;
|
|
23
|
+
$checkbox-input-cursor: pointer !default;
|
|
24
|
+
$checkbox-input-font-size: 1.125rem !default;
|
|
25
|
+
$checkbox-input-margin: 0 !default;
|
|
26
|
+
$checkbox-input-position-left: 0 !default;
|
|
27
|
+
$checkbox-input-position-top: -2px !default;
|
|
28
|
+
$checkbox-input-size: 1.25rem !default;
|
|
29
|
+
|
|
30
|
+
// Focus
|
|
31
|
+
$checkbox-focus-outline: 1px solid rgba($color-charcoal4, .5) !default;
|
|
32
|
+
$checkbox-focus-outline-offset: 5px !default;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.checkbox {
|
|
36
|
+
background-color: $checkbox-background-color;
|
|
37
|
+
border: $checkbox-border;
|
|
38
|
+
border-radius: $checkbox-border-radius;
|
|
39
|
+
color: $checkbox-color;
|
|
40
|
+
margin: $checkbox-margin;
|
|
41
|
+
padding: $checkbox-padding;
|
|
42
|
+
text-align: $checkbox-text-align;
|
|
43
|
+
|
|
44
|
+
+ .checkbox {
|
|
45
|
+
margin-top: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
label {
|
|
49
|
+
display: inline-block;
|
|
50
|
+
font-size: $checkbox-font-size;
|
|
51
|
+
font-weight: $checkbox-font-weight;
|
|
52
|
+
line-height: $checkbox-line-height;
|
|
53
|
+
padding-left: $checkbox-label-padding-left;
|
|
54
|
+
position: relative;
|
|
55
|
+
width: $checkbox-label-width;
|
|
56
|
+
|
|
57
|
+
&:focus-within {
|
|
58
|
+
outline: $checkbox-focus-outline;
|
|
59
|
+
outline-offset: $checkbox-focus-outline-offset;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
input[type=checkbox] {
|
|
63
|
+
background: transparent;
|
|
64
|
+
border-color: $color-white;
|
|
65
|
+
border-radius: 0;
|
|
66
|
+
cursor: $checkbox-input-cursor;
|
|
67
|
+
left: $checkbox-input-position-left;
|
|
68
|
+
margin: $checkbox-input-margin;
|
|
69
|
+
position: absolute;
|
|
70
|
+
top: $checkbox-input-position-top;
|
|
71
|
+
|
|
72
|
+
&::before {
|
|
73
|
+
@include icon-fill;
|
|
74
|
+
background: $checkbox-input-background-color;
|
|
75
|
+
border: $checkbox-input-border;
|
|
76
|
+
border-radius: $checkbox-input-border-radius;
|
|
77
|
+
box-shadow: $checkbox-input-box-shadow;
|
|
78
|
+
color: $checkbox-input-background-color;
|
|
79
|
+
content: '\e920';
|
|
80
|
+
display: block;
|
|
81
|
+
height: $checkbox-input-size;
|
|
82
|
+
text-align: center;
|
|
83
|
+
transition: $checkbox-transition;
|
|
84
|
+
width: $checkbox-input-size;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:checked::before { // sass-lint:disable-line
|
|
88
|
+
background-color: $checkbox-input-checked-background-color;
|
|
89
|
+
border: $checkbox-input-checked-border;
|
|
90
|
+
color: $checkbox-input-checked-color;
|
|
91
|
+
font-size: $checkbox-input-font-size;
|
|
92
|
+
line-height: $checkbox-line-height;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
$expand-collapse-transition: $base-transition !default;
|
|
2
|
+
|
|
3
|
+
$expand-collapse-toggle-background-color: transparent !default;
|
|
4
|
+
$expand-collapse-toggle-border: 0 !default;
|
|
5
|
+
$expand-collapse-toggle-border-radius: 0 !default;
|
|
6
|
+
$expand-collapse-toggle-color: $color-charcoal4 !default;
|
|
7
|
+
$expand-collapse-toggle-font-size: 1rem !default;
|
|
8
|
+
$expand-collapse-toggle-font-weight: 400 !default;
|
|
9
|
+
$expand-collapse-toggle-letter-spacing: 0 !default;
|
|
10
|
+
$expand-collapse-toggle-margin: 0 auto 45px !default;
|
|
11
|
+
$expand-collapse-toggle-padding: 0 !default;
|
|
12
|
+
$expand-collapse-toggle-text-transform: capitalize !default;
|
|
13
|
+
|
|
14
|
+
$expand-collapse-icon-background-color: $color-white !default;
|
|
15
|
+
$expand-collapse-icon-border: 1px solid $color-charcoal1 !default;
|
|
16
|
+
$expand-collapse-icon-border-top: 0 !default;
|
|
17
|
+
$expand-collapse-icon-border-radius: 100px !default;
|
|
18
|
+
$expand-collapse-icon-color: $color-charcoal4 !default;
|
|
19
|
+
$expand-collapse-icon-display: block !default;
|
|
20
|
+
$expand-collapse-icon-font-size: 1.125rem !default;
|
|
21
|
+
$expand-collapse-icon-line-height: 1 !default;
|
|
22
|
+
$expand-collapse-icon-margin: -1px auto 0 !default;
|
|
23
|
+
$expand-collapse-icon-padding: 5px 0 9px !default;
|
|
24
|
+
$expand-collapse-icon-position: relative !default;
|
|
25
|
+
$expand-collapse-icon-width: 60px !default;
|
|
26
|
+
$expand-collapse-icon-z-index: 2 !default;
|
|
27
|
+
|
|
28
|
+
$expand-collapse-label-display: inline-block !default;
|
|
29
|
+
$expand-collapse-label-margin: 20px auto 0 !default;
|
|
30
|
+
$expand-collapse-label-text-decoration: underline !default;
|
|
31
|
+
|
|
32
|
+
$expand-collapse-target-max-height: 2000px !default;
|
|
33
|
+
$expand-collapse-target-transition: .5s !default;
|
|
34
|
+
|
|
35
|
+
// Focus
|
|
36
|
+
$expand-collapse-toggle-focus-outline: 1px solid rgba($expand-collapse-toggle-color, .5) !default;
|
|
37
|
+
$expand-collapse-toggle-focus-outline-offset: 2px !default;
|
|
38
|
+
|
|
39
|
+
// Hover
|
|
40
|
+
$expand-collapse-label-hover-background-color: transparent !default;
|
|
41
|
+
$expand-collapse-toggle-hover-color: darken($expand-collapse-toggle-color, 20%) !default;
|
|
42
|
+
$expand-collapse-icon-hover-color: darken($expand-collapse-icon-color, 20%) !default;
|
|
43
|
+
|
|
44
|
+
.expand-collapse {
|
|
45
|
+
&__toggle {
|
|
46
|
+
background-color: $expand-collapse-toggle-background-color;
|
|
47
|
+
border: $expand-collapse-toggle-border;
|
|
48
|
+
border-radius: $expand-collapse-toggle-border-radius;
|
|
49
|
+
color: $expand-collapse-toggle-color;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
font-size: $expand-collapse-toggle-font-size;
|
|
52
|
+
font-weight: $expand-collapse-toggle-font-weight;
|
|
53
|
+
letter-spacing: $expand-collapse-toggle-letter-spacing;
|
|
54
|
+
margin: $expand-collapse-toggle-margin;
|
|
55
|
+
padding: $expand-collapse-toggle-padding;
|
|
56
|
+
text-transform: $expand-collapse-toggle-text-transform;
|
|
57
|
+
transition: $expand-collapse-transition;
|
|
58
|
+
|
|
59
|
+
&:focus {
|
|
60
|
+
outline: $expand-collapse-toggle-focus-outline;
|
|
61
|
+
outline-offset: $expand-collapse-toggle-focus-outline-offset;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__icon {
|
|
66
|
+
background-color: $expand-collapse-icon-background-color;
|
|
67
|
+
border: $expand-collapse-icon-border;
|
|
68
|
+
border-top: $expand-collapse-icon-border-top;
|
|
69
|
+
border-bottom-left-radius: $expand-collapse-icon-border-radius;
|
|
70
|
+
border-bottom-right-radius: $expand-collapse-icon-border-radius;
|
|
71
|
+
color: $expand-collapse-icon-color;
|
|
72
|
+
display: $expand-collapse-icon-display;
|
|
73
|
+
font-size: $expand-collapse-icon-font-size;
|
|
74
|
+
line-height: $expand-collapse-icon-line-height;
|
|
75
|
+
margin: $expand-collapse-icon-margin;
|
|
76
|
+
padding: $expand-collapse-icon-padding;
|
|
77
|
+
position: $expand-collapse-icon-position;
|
|
78
|
+
transition: $expand-collapse-transition;
|
|
79
|
+
width: $expand-collapse-icon-width;
|
|
80
|
+
z-index: $expand-collapse-icon-z-index;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&__label {
|
|
84
|
+
display: $expand-collapse-label-display;
|
|
85
|
+
margin: $expand-collapse-label-margin;
|
|
86
|
+
text-decoration: $expand-collapse-label-text-decoration;
|
|
87
|
+
transition: $expand-collapse-transition;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&__target {
|
|
91
|
+
max-height: $expand-collapse-target-max-height;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
transition: $expand-collapse-target-transition;
|
|
94
|
+
|
|
95
|
+
&.collapsed {
|
|
96
|
+
max-height: 0;
|
|
97
|
+
opacity: 0;
|
|
98
|
+
visibility: collapse;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include breakpoint-md {
|
|
104
|
+
.expand-collapse {
|
|
105
|
+
&__toggle {
|
|
106
|
+
&:focus,
|
|
107
|
+
&:hover {
|
|
108
|
+
color: $expand-collapse-toggle-hover-color;
|
|
109
|
+
|
|
110
|
+
.expand-collapse {
|
|
111
|
+
&__label {
|
|
112
|
+
background-color: $expand-collapse-label-hover-background-color;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__icon {
|
|
116
|
+
color: $expand-collapse-icon-hover-color;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<button class="expand-collapse__toggle{{#xif 'this.expandCollapse.attributes && this.expandCollapse.attributes.class'}} {{this.expandCollapse.attributes.class}}{{/xif}}{{#xif 'this.expandCollapse.scrollToTop === true'}} scroll-to-top{{/xif}}" {{{addAttributes this.expandCollapse 'class'}}}>
|
|
2
|
+
{{#if this.expandCollapse.icon}}
|
|
3
|
+
<span class="expand-collapse__icon">
|
|
4
|
+
<i class="{{#xif 'this.expandCollapse.collapsedByDefault === true'}}{{this.expandCollapse.icon.collapsed}}{{else}}{{this.expandCollapse.icon.expanded}}{{/xif}}" data-expanded-icon="{{this.expandCollapse.icon.expanded}}" data-collapsed-icon="{{this.expandCollapse.icon.collapsed}}"></i>
|
|
5
|
+
</span>
|
|
6
|
+
{{/if}}
|
|
7
|
+
<span class="expand-collapse__label" data-expanded-label="{{this.expandCollapse.label.expanded}}" data-collapsed-label="{{this.expandCollapse.label.collapsed}}">{{#xif 'this.expandCollapse.collapsedByDefault === true'}}{{this.expandCollapse.label.collapsed}}{{else}}{{this.expandCollapse.label.expanded}}{{/xif}}</span>
|
|
8
|
+
</button>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function scrollToElement(element, position, callback) {
|
|
4
|
+
element.scrollIntoView({
|
|
5
|
+
behavior: 'smooth',
|
|
6
|
+
block: position
|
|
7
|
+
});
|
|
8
|
+
if (callback && typeof callback === 'function') {
|
|
9
|
+
callback();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
var expandCollapseToggle = document.querySelectorAll('.expand-collapse__toggle');
|
|
13
|
+
expandCollapseToggle.forEach(function (toggle) {
|
|
14
|
+
var toggleId = toggle.id,
|
|
15
|
+
ariaExpanded = toggle.getAttribute('aria-expanded'),
|
|
16
|
+
ariaControls = toggle.getAttribute('aria-controls'),
|
|
17
|
+
expandCollapseTarget = document.getElementById(ariaControls),
|
|
18
|
+
scrollToTop = toggle.classList.contains('scroll-to-top');
|
|
19
|
+
expandCollapseTarget.classList.add('expand-collapse__target');
|
|
20
|
+
if (ariaExpanded === 'false' && !expandCollapseTarget.classList.contains('collapsed')) {
|
|
21
|
+
expandCollapseTarget.classList.add('collapsed');
|
|
22
|
+
}
|
|
23
|
+
document.getElementById(toggleId).addEventListener('click', function () {
|
|
24
|
+
var shouldExpand = this.getAttribute('aria-expanded') !== 'true',
|
|
25
|
+
expandCollapseLabel = this.querySelector('.expand-collapse__label'),
|
|
26
|
+
expandCollapseIcon = this.querySelector('.expand-collapse__icon i'),
|
|
27
|
+
focusOnElement = shouldExpand ? ariaControls : toggleId;
|
|
28
|
+
this.setAttribute('aria-expanded', shouldExpand);
|
|
29
|
+
if (expandCollapseLabel) {
|
|
30
|
+
expandCollapseLabel.innerHTML = expandCollapseLabel.dataset[shouldExpand ? 'expandedLabel' : 'collapsedLabel'];
|
|
31
|
+
}
|
|
32
|
+
if (expandCollapseIcon) {
|
|
33
|
+
expandCollapseIcon.className = expandCollapseIcon.dataset[shouldExpand ? 'expandedIcon' : 'collapsedIcon'];
|
|
34
|
+
}
|
|
35
|
+
if (ariaExpanded === 'false' || expandCollapseTarget.classList.contains('collapsed')) {
|
|
36
|
+
expandCollapseTarget.classList.toggle('collapsed');
|
|
37
|
+
} else {
|
|
38
|
+
expandCollapseTarget.classList.add('collapsed');
|
|
39
|
+
}
|
|
40
|
+
if (scrollToTop) {
|
|
41
|
+
var scrollPosition = shouldExpand ? 'start' : 'center',
|
|
42
|
+
element = document.getElementById(toggleId);
|
|
43
|
+
setTimeout(function () {
|
|
44
|
+
scrollToElement(element, scrollPosition, function () {
|
|
45
|
+
setTimeout(function () {
|
|
46
|
+
document.getElementById(focusOnElement).focus();
|
|
47
|
+
}, 400);
|
|
48
|
+
});
|
|
49
|
+
}, 200);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|