@internetstiftelsen/styleguide 5.0.16 → 5.0.18-beta.0.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/dist/app.js +71 -0
- package/dist/assets/js/Events.js +43 -77
- package/dist/assets/js/RequestError.js +16 -31
- package/dist/assets/js/anchorScroll.js +22 -15
- package/dist/assets/js/charCounter.js +100 -142
- package/dist/assets/js/className.js +19 -20
- package/dist/assets/js/conditional.js +96 -152
- package/dist/assets/js/debounce.js +15 -22
- package/dist/assets/js/el.js +108 -159
- package/dist/assets/js/getCookieByName.js +13 -11
- package/dist/assets/js/hasCookieConsent.js +30 -40
- package/dist/assets/js/htmlTextLength.js +12 -10
- package/dist/assets/js/iconToggle.js +16 -20
- package/dist/assets/js/nodeAdded.js +40 -53
- package/dist/assets/js/objToQuery.js +25 -41
- package/dist/assets/js/offset.js +29 -25
- package/dist/assets/js/ot.js +10 -13
- package/dist/assets/js/parallax.js +23 -23
- package/dist/assets/js/queryToObj.js +16 -22
- package/dist/assets/js/readSpeakerHandling.js +26 -28
- package/dist/assets/js/request.js +43 -52
- package/dist/assets/js/responsivePosition.js +46 -74
- package/dist/assets/js/stringToNode.js +11 -10
- package/dist/assets/js/template.js +15 -21
- package/dist/assets/js/textToggle.js +19 -24
- package/dist/assets/js/track.js +14 -12
- package/dist/assets/js/uid.js +10 -6
- package/dist/assets/js/utmGenerator.js +27 -33
- package/dist/assets/js/validationMessage.js +18 -25
- package/dist/assets/js/youtube.js +134 -170
- package/dist/atoms/button/Button.js +42 -55
- package/dist/atoms/file/file.js +25 -29
- package/dist/atoms/file/filePreview.js +27 -31
- package/dist/atoms/grid-toggle/grid-toggle.js +6 -9
- package/dist/atoms/height-limiter/height-limiter.js +37 -50
- package/dist/atoms/password-toggle/password-toggle.js +9 -11
- package/dist/atoms/range/range.js +32 -39
- package/dist/atoms/textarea/rich-text.js +223 -205
- package/dist/atoms/tooltip/tooltip.js +13 -17
- package/dist/components.js +42 -77
- package/dist/focusTrap.js +66 -77
- package/dist/molecules/alert/alert.js +15 -20
- package/dist/molecules/context-menu/context-menu.js +11 -16
- package/dist/molecules/continue-video-guide/continue-video-guide.js +90 -101
- package/dist/molecules/cookie-disclaimer/cookie-disclaimer.js +24 -33
- package/dist/molecules/form/Form.js +242 -352
- package/dist/molecules/form/index.js +15 -14
- package/dist/molecules/glider/glider-course.js +62 -75
- package/dist/molecules/glider/glider-hero.js +88 -101
- package/dist/molecules/glider/glider.js +49 -45
- package/dist/molecules/modal/modal.js +256 -325
- package/dist/molecules/multi-select/multi-select.js +198 -304
- package/dist/molecules/natural-language-form/natural-language-form.js +32 -46
- package/dist/molecules/overview-navigation/overview-navigation.js +90 -141
- package/dist/molecules/share/share.js +15 -20
- package/dist/molecules/system-error/system-error.js +6 -9
- package/dist/organisms/accordion/accordion.js +44 -50
- package/dist/organisms/footer/footer.js +1 -1
- package/dist/organisms/haveibeenpwned/haveibeenpwned.js +17 -16
- package/dist/organisms/mailchimp/mailchimp.js +72 -89
- package/dist/organisms/map-box/map-box.js +3 -4
- package/dist/organisms/mega-menu/mega-menu.js +177 -212
- package/dist/organisms/podcast/podcast.js +192 -215
- package/dist/organisms/schedule/schedule-filter.js +9 -15
- package/dist/organisms/tabs/tabs.js +194 -253
- package/dist/organisms/timeline/openTimelineItem.js +38 -51
- package/dist/organisms/timeline/timeline.js +111 -128
- package/dist/organisms/video-guide/VideoGuidePlayback.js +210 -286
- package/dist/organisms/video-guide/VideoGuideSubtitles.js +57 -80
- package/dist/organisms/video-guide/VideoGuideTimeline.js +74 -108
- package/dist/organisms/video-guide/getCurrentCueIndex.js +11 -9
- package/dist/organisms/video-guide/video-guide.js +66 -103
- package/dist/utilities/tab-highlighting/tab-highlighting.js +14 -22
- package/dist/vendor/toggle/a11y.toggle-switcher.js +10 -16
- package/package.json +78 -97
- package/src/app.js +5 -5
- package/src/assets/js/anchorScroll.js +1 -1
- package/src/assets/js/offset.js +1 -1
- package/src/atoms/button/Button.js +1 -1
- package/src/atoms/icon/_all-icons.zip +0 -0
- package/src/atoms/icon/heading-3.svg +8 -0
- package/src/atoms/icon/richtext-heading-2.svg +8 -0
- package/src/atoms/icon/richtext-ordered-list.svg +8 -0
- package/src/atoms/icon/sprite.svg +25 -2
- package/src/atoms/textarea/rich-text.js +53 -9
- package/src/configurations/icons.json +1 -1
- package/src/configurations/typography/_typography.scss +0 -9
- package/src/molecules/glider/glider-course.js +0 -2
- package/src/molecules/glider/glider.js +2 -2
- package/src/organisms/accordion/accordion.js +1 -2
- package/src/organisms/timeline/timeline.js +2 -3
- package/dist/atoms/timeline/anchorScroll.js +0 -13
- package/dist/atoms/toggle-high-contrast/toggle-high-contrast.js +0 -12
- package/dist/molecules/glider/glider-single.js +0 -68
- package/dist/molecules/modal/modal-graph.js +0 -40
- package/dist/molecules/timeline-navigation/timeline-navigation.js +0 -34
- /package/src/molecules/alert/{_alert.scss → alert.scss} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Close overlay on graph modal
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
var graphModals = document.querySelectorAll('.js-modal-graph');
|
|
8
|
-
var graphModalButtons = document.querySelectorAll('.js-modal-graph-button');
|
|
9
|
-
|
|
10
|
-
var addMultipleListeners = function addMultipleListeners(el, types, listener, options, useCapture) {
|
|
11
|
-
types.forEach(function (type) {
|
|
12
|
-
return el.addEventListener(type, listener, options, useCapture);
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
function closeOverlay(graphModalButton) {
|
|
17
|
-
// Close overlay button on 'click' on itself
|
|
18
|
-
graphModalButton.addEventListener('click', function () {
|
|
19
|
-
graphModalButton.classList.add('is-hidden');
|
|
20
|
-
graphModalButton.blur();
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
[].forEach.call(graphModals, function (graphModal) {
|
|
24
|
-
var closeButton = graphModal.querySelector('.js-toggle-modal');
|
|
25
|
-
|
|
26
|
-
closeButton.addEventListener('click', function () {
|
|
27
|
-
graphModalButton.classList.remove('is-hidden');
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// Close overlay button on 'wheel', 'scroll', 'touchstart' on modal container
|
|
31
|
-
addMultipleListeners(graphModal, ['wheel', 'scroll', 'touchstart'], function () {
|
|
32
|
-
graphModalButton.classList.add('is-hidden');
|
|
33
|
-
console.log('fire!');
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (graphModalButtons && graphModals) {
|
|
39
|
-
[].forEach.call(graphModalButtons, closeOverlay);
|
|
40
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var timelineNavigation = document.querySelector('#timeline-navigation');
|
|
4
|
-
var timeLineButton = document.querySelector('.js-timeline-navigation');
|
|
5
|
-
var timeLineOverlay = document.querySelector('.js-timeline-overlay');
|
|
6
|
-
var body = document.querySelector('body');
|
|
7
|
-
var scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
|
|
8
|
-
var clicked = false;
|
|
9
|
-
|
|
10
|
-
if (timeLineButton) {
|
|
11
|
-
timeLineButton.addEventListener('click', function () {
|
|
12
|
-
body.classList.toggle('html-no-overflow');
|
|
13
|
-
if (clicked === false) {
|
|
14
|
-
timeLineButton.style.transform = 'translateX(-' + scrollbarWidth + 'px)';
|
|
15
|
-
timeLineOverlay.style.transform = 'translateX(-' + scrollbarWidth + 'px)';
|
|
16
|
-
body.style.paddingRight = scrollbarWidth + 'px';
|
|
17
|
-
clicked = true;
|
|
18
|
-
} else {
|
|
19
|
-
timeLineButton.removeAttribute('style');
|
|
20
|
-
timeLineOverlay.removeAttribute('style');
|
|
21
|
-
body.removeAttribute('style');
|
|
22
|
-
clicked = false;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (timelineNavigation) {
|
|
28
|
-
var timelineNavigationLinks = timelineNavigation.querySelectorAll('a');
|
|
29
|
-
[].forEach.call(timelineNavigationLinks, function (timelineNavigationLink) {
|
|
30
|
-
timelineNavigationLink.addEventListener('click', function () {
|
|
31
|
-
timeLineButton.click();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
}
|
|
File without changes
|