@internetstiftelsen/styleguide 5.0.0 → 5.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/assets/js/iconToggle.js +1 -2
- package/dist/assets/js/parallax.js +0 -2
- package/dist/assets/js/textToggle.js +0 -1
- package/dist/assets/js/track.js +2 -2
- package/dist/assets/js/youtube.js +2 -1
- package/dist/components.js +0 -4
- package/dist/molecules/glider/glider-hero.js +1 -2
- package/dist/molecules/modal/modal.js +2 -2
- package/dist/molecules/overview-navigation/overview-navigation.js +1 -2
- package/dist/organisms/mailchimp/mailchimp.js +2 -1
- package/dist/organisms/tabs/tabs.js +3 -2
- package/dist/organisms/timeline/timeline.js +2 -4
- package/package.json +8 -3
- package/src/app.js +1 -15
- package/src/assets/js/iconToggle.js +2 -2
- package/src/assets/js/parallax.js +0 -2
- package/src/assets/js/textToggle.js +1 -1
- package/src/assets/js/track.js +2 -2
- package/src/assets/js/youtube.js +2 -1
- package/src/atoms/archive-link/archive-link.config.js +1 -1
- package/src/atoms/button/_button.scss +6 -6
- package/src/atoms/checkbox/checkbox.config.js +1 -1
- package/src/atoms/file/file.config.js +1 -1
- package/src/atoms/grid-toggle/grid-toggle.config.js +1 -1
- package/src/atoms/height-limiter/height-limiter.config.js +1 -1
- package/src/atoms/hr/hr.config.js +1 -1
- package/src/atoms/icon/icon.config.js +2 -2
- package/src/atoms/input/input.config.js +1 -1
- package/src/atoms/label/label.config.js +1 -1
- package/src/atoms/logotype/logotype.config.js +3 -3
- package/src/atoms/main-menu/_main-menu.scss +1 -1
- package/src/atoms/main-menu/main-menu.config.js +1 -1
- package/src/atoms/meta/meta.config.js +1 -1
- package/src/atoms/paging/paging.config.js +1 -1
- package/src/atoms/password-toggle/password-toggle.config.js +1 -1
- package/src/atoms/progress/progress.config.js +1 -1
- package/src/atoms/quote/quote.config.js +1 -1
- package/src/atoms/radiobutton/radiobutton.config.js +1 -1
- package/src/atoms/range/range.config.js +1 -1
- package/src/atoms/rating/rating.config.js +1 -1
- package/src/atoms/ribbon/_ribbon.scss +1 -1
- package/src/atoms/ribbon/ribbon.config.js +1 -1
- package/src/atoms/select/select.config.js +1 -1
- package/src/atoms/skip/skip.config.js +1 -1
- package/src/atoms/spinner/spinner.config.js +1 -1
- package/src/atoms/tag/tag.config.js +1 -1
- package/src/atoms/textarea/textarea.config.js +1 -1
- package/src/atoms/toggle-button/toggle-button.config.js +1 -1
- package/src/atoms/tooltip/tooltip.config.js +1 -1
- package/src/base/_normalize.scss +93 -93
- package/src/brandbook/goto10/goto10.config.js +1 -1
- package/src/brandbook/internetstiftelsen/bildman/303/251r/bildman/303/251r.config.js +1 -1
- package/src/brandbook/internetstiftelsen/identitet/identitet.config.js +1 -1
- package/src/brandbook/internetstiftelsen/tonalitet och spr/303/245kbruk/tonalitet och spr/303/245kbruk.config.js" +1 -1
- package/src/configurations/_bem.scss +22 -22
- package/src/configurations/_config.scss +13 -13
- package/src/configurations/_functions.scss +6 -6
- package/src/configurations/_variables.scss +20 -20
- package/src/configurations/_wordpress.scss +6 -6
- package/src/configurations/colors/_colors.scss +3 -3
- package/src/configurations/colors/colors.config.js +1 -1
- package/src/configurations/favicon/favicon.config.js +1 -1
- package/src/configurations/grid/grid.config.js +1 -1
- package/src/configurations/icons.json +1 -1
- package/src/configurations/typography/typography.config.js +1 -1
- package/src/molecules/alert/alert.config.js +1 -1
- package/src/molecules/breadcrumb/breadcrumb.config.js +1 -1
- package/src/molecules/byline/byline.config.js +1 -1
- package/src/molecules/context-menu/context-menu.config.js +11 -11
- package/src/molecules/continue-video-guide/continue-video-guide.config.js +1 -1
- package/src/molecules/cookie-disclaimer/cookie-disclaimer.config.js +1 -1
- package/src/molecules/download/download.config.js +1 -1
- package/src/molecules/form/form.config.js +1 -1
- package/src/molecules/form-control/form-control.config.js +1 -1
- package/src/molecules/glider/glider-hero.js +1 -3
- package/src/molecules/glider/glider.config.js +1 -1
- package/src/molecules/icon-overlay/icon-overlay.config.js +1 -1
- package/src/molecules/info-box/info-box.config.js +1 -1
- package/src/molecules/input-group/input-group.config.js +1 -1
- package/src/molecules/modal/modal.js +2 -2
- package/src/molecules/multi-select/multi-select.js +3 -3
- package/src/molecules/natural-language-form/natural-language-form.config.js +4 -4
- package/src/molecules/overview-navigation/overview-navigation.js +2 -2
- package/src/molecules/share/share.config.js +1 -1
- package/src/molecules/submenu/submenu.config.js +1 -1
- package/src/molecules/system-error/system-error.config.js +1 -1
- package/src/molecules/table/table.config.js +1 -1
- package/src/molecules/teaser-news-list/teaser-news-list.config.js +1 -1
- package/src/organisms/accordion/_accordion.scss +4 -4
- package/src/organisms/accordion/accordion.config.js +1 -1
- package/src/organisms/domain-search/domain-search.config.js +1 -1
- package/src/organisms/filter/filter.config.js +1 -1
- package/src/organisms/footer/_footer.scss +1 -1
- package/src/organisms/footer/footer.config.js +1 -1
- package/src/organisms/header/header.config.js +1 -1
- package/src/organisms/hero/hero.config.js +35 -36
- package/src/organisms/mailchimp/_mailchimp.scss +1 -1
- package/src/organisms/mailchimp/mailchimp.config.js +1 -1
- package/src/organisms/mailchimp/mailchimp.js +2 -1
- package/src/organisms/mega-menu/mega-menu.config.js +1 -1
- package/src/organisms/members-service-product/members-service-product.config.js +1 -3
- package/src/organisms/podcast/_podcast-player.scss +1 -1
- package/src/organisms/podcast/podcast.config.js +1 -1
- package/src/organisms/search-result/search-result.config.js +1 -1
- package/src/organisms/sections/sections.config.js +1 -1
- package/src/organisms/tabs/tabs.config.js +1 -1
- package/src/organisms/tabs/tabs.js +3 -2
- package/src/organisms/timeline/timeline.config.js +1 -1
- package/src/organisms/timeline/timeline.js +3 -2
- package/src/organisms/video-guide/VideoGuidePlayback.js +1 -1
- package/src/organisms/video-guide/video-guide.config.js +1 -1
- package/src/organisms/video-guide/video-guide.js +2 -2
- package/src/pages/animate-footer/animate-footer.config.js +1 -1
- package/src/pages/bredbandskollen/bredbandskollen.config.js +1 -1
- package/src/pages/conditional/conditional.config.js +1 -1
- package/src/pages/dark-mode/dark-mode.config.js +1 -1
- package/src/pages/internetguider/internetguider.config.js +1 -1
- package/src/pages/magazine/magazine.config.js +1 -1
- package/src/pages/mailchimp-newsletter/mailchimp-newsletter.config.js +1 -1
- package/src/pages/responsive-position/responsive-position.config.js +1 -1
- package/src/pages/search/search.config.js +1 -1
- package/src/pages/wordpress-blocks/wordpress-blocks.config.js +1 -1
- package/src/theme/_theme.scss +1 -1
- package/src/utilities/_icons.scss +4 -4
- package/src/utilities/_margin.scss +8 -8
- package/src/utilities/_padding.scss +8 -8
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@use '../../vendor/grid/grid' as grid;
|
|
13
13
|
@use '../../vendor/baseline/plumber' as plumber;
|
|
14
14
|
|
|
15
|
-
$footer-font-size: 18px;
|
|
15
|
+
$footer-font-size: 18px; /* To ensure all footers on all sites have the same font size this component used pixel based values */
|
|
16
16
|
|
|
17
17
|
* { /* Because not all of the old sites have this */
|
|
18
18
|
box-sizing: border-box;
|
|
@@ -20,7 +20,6 @@ module.exports = {
|
|
|
20
20
|
no_image_class: false,
|
|
21
21
|
has_radius: true,
|
|
22
22
|
limited_width: true,
|
|
23
|
-
has_radius: true,
|
|
24
23
|
has_buttons: false,
|
|
25
24
|
text: 'Nästan alla i Sverige använder internet – men hur meningsfull är tiden vi spenderar där? I rapporten Svenskarna och internet 2019 frågar vi för första gången om meningsfullhet, och det syns stora skillnader mellan olika aktiviteter.',
|
|
26
25
|
}
|
|
@@ -74,44 +73,44 @@ module.exports = {
|
|
|
74
73
|
},
|
|
75
74
|
{
|
|
76
75
|
name: 'Event hero',
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
context: {
|
|
77
|
+
event_title: 'Creator Circle Meetup',
|
|
78
|
+
organizer: 'Creator Circle',
|
|
79
|
+
city: 'Stockholm',
|
|
80
|
+
time: '24 januari 2020 18:20-21:30',
|
|
81
|
+
event_text: 'Event på Goto 10 i',
|
|
82
|
+
no_image_class: 'o-hero--no-image',
|
|
83
|
+
icon_share: 'share',
|
|
84
|
+
icon_export: 'external-link',
|
|
85
|
+
limited_width: false,
|
|
86
|
+
has_image: false,
|
|
87
|
+
has_video: false,
|
|
88
|
+
is_event: true,
|
|
89
|
+
has_buttons: false,
|
|
90
|
+
background_color: 'background-peacock-light'
|
|
91
|
+
}
|
|
93
92
|
},
|
|
94
93
|
{
|
|
95
94
|
name: 'Event hero with button',
|
|
96
95
|
status: 'ready',
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
96
|
+
context: {
|
|
97
|
+
event_title: 'Framtidsoptimism och problemlösning i en uppkopplad värld',
|
|
98
|
+
organizer: 'Heja framtiden',
|
|
99
|
+
city: false,
|
|
100
|
+
time: '22 november 09:00-17:00',
|
|
101
|
+
event_text: 'Digitalt spår på Internetdagarna',
|
|
102
|
+
no_image_class: 'o-hero--no-image',
|
|
103
|
+
geometric_figures: false,
|
|
104
|
+
icon_share: 'share',
|
|
105
|
+
icon_export: 'external-link',
|
|
106
|
+
limited_width: false,
|
|
107
|
+
has_image: false,
|
|
108
|
+
has_video: false,
|
|
109
|
+
is_event: true,
|
|
110
|
+
has_button: true,
|
|
111
|
+
text: 'Köp biljett',
|
|
112
|
+
background_color: 'background-jade-light'
|
|
113
|
+
}
|
|
115
114
|
},
|
|
116
115
|
{
|
|
117
116
|
name: 'Clean',
|
|
@@ -151,4 +150,4 @@ module.exports = {
|
|
|
151
150
|
}
|
|
152
151
|
},
|
|
153
152
|
]
|
|
154
|
-
}
|
|
153
|
+
};
|
|
@@ -49,7 +49,8 @@ function isInViewport(element) {
|
|
|
49
49
|
const height = element.offsetHeight;
|
|
50
50
|
|
|
51
51
|
while (element.offsetParent) {
|
|
52
|
-
|
|
52
|
+
// eslint-disable-next-line no-param-reassign
|
|
53
|
+
element = element.offsetParent;
|
|
53
54
|
top += element.offsetTop;
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -9,4 +9,4 @@ module.exports = {
|
|
|
9
9
|
url: 'http://www.google.se',
|
|
10
10
|
exerpt: 'Praesent tempus metus in arcu mollis, non convallis odio faucibus. Nullam lectus nulla, rutrum nec odio ut, mollis interdum enim. Proin tincidunt odio at quam eleifend imperdiet. Mauris sagittis nulla ipsum, consectetur efficitur libero dignissim in.'
|
|
11
11
|
}
|
|
12
|
-
}
|
|
12
|
+
};
|
|
@@ -73,7 +73,7 @@ window.a11yTabs = (function tabsComponentIIFE(global, document) {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
this.eventCallback = handleEvents.bind(this);
|
|
76
|
+
this.eventCallback = handleEvents.bind(this);
|
|
77
77
|
this.tabList.addEventListener('click', this.eventCallback, false);
|
|
78
78
|
this.tabList.addEventListener('keydown', this.eventCallback, false);
|
|
79
79
|
|
|
@@ -257,4 +257,5 @@ window.a11yTabs = (function tabsComponentIIFE(global, document) {
|
|
|
257
257
|
};
|
|
258
258
|
}(window, document));
|
|
259
259
|
|
|
260
|
-
|
|
260
|
+
// eslint-disable-next-line no-unused-vars,no-undef
|
|
261
|
+
const tabComponent = a11yTabs.create('[data-tab-component]');
|
|
@@ -2,7 +2,7 @@ import '../../assets/js/parallax';
|
|
|
2
2
|
|
|
3
3
|
const { offsetTop, offsetBottom, offsetLeft } = require('../../assets/js/offset');
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
const dataLayer = window._mtm || [];
|
|
7
7
|
const progressBar = document.querySelector('.js-progress-bar');
|
|
8
8
|
const decadeContainer = document.querySelector('.js-decade-container');
|
|
@@ -85,7 +85,8 @@ function isInViewport(element) {
|
|
|
85
85
|
const height = element.offsetHeight;
|
|
86
86
|
|
|
87
87
|
while (element.offsetParent) {
|
|
88
|
-
|
|
88
|
+
// eslint-disable-next-line no-param-reassign
|
|
89
|
+
element = element.offsetParent;
|
|
89
90
|
top += element.offsetTop;
|
|
90
91
|
}
|
|
91
92
|
|
|
@@ -39,7 +39,7 @@ class VideoGuide {
|
|
|
39
39
|
this.timeline = new VideoGuideTimeline(this.element, this.video);
|
|
40
40
|
|
|
41
41
|
this.video.classList.remove('is-loading');
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
|
|
44
44
|
dispatchEvent = (eventName) => {
|
|
45
45
|
[this.playback, this.subtitles, this.timeline].forEach((instance) => {
|
|
@@ -47,7 +47,7 @@ class VideoGuide {
|
|
|
47
47
|
instance[eventName]();
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
|
|
52
52
|
onPlay = () => this.dispatchEvent('onPlay');
|
|
53
53
|
|
package/src/theme/_theme.scss
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@use '../configurations/bem' as bem;
|
|
5
5
|
@use '../vendor/grid/breakpoints' as breakpoint;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/* Default */
|
|
8
8
|
$fill-color: colors.$color-black;
|
|
9
9
|
|
|
10
10
|
@include bem.b(u-icon) {
|
|
@@ -14,7 +14,7 @@ $fill-color: colors.$color-black;
|
|
|
14
14
|
background-repeat: no-repeat !important;
|
|
15
15
|
background-position: center center !important;
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
/* Sizes */
|
|
18
18
|
@include bem.m(smallest) {
|
|
19
19
|
width: var.$icon-size-smallest !important;
|
|
20
20
|
height: var.$icon-size-smallest !important;
|
|
@@ -50,10 +50,10 @@ $fill-color: colors.$color-black;
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
/* Specific icons */
|
|
54
54
|
@include bem.m(check) {
|
|
55
55
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 24.42' fill='" + $fill-color + "'%3E%3Cpolygon points='12.04 24.42 0 13.26 2.87 10.16 11.81 18.44 28.9 0 32 2.87 12.04 24.42' data-name='Layer 3'/%3E%3C/svg%3E") !important;
|
|
56
|
-
|
|
56
|
+
/* Colors */
|
|
57
57
|
@include bem.m(jade) {
|
|
58
58
|
$fill-color: colors.$color-jade !important;
|
|
59
59
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '../configurations/variables' as var;
|
|
4
4
|
@use '../configurations/functions' as func;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* @group Utilities */
|
|
7
7
|
$class-m: u-m !default;
|
|
8
8
|
$class-m-t: u-m-t !default;
|
|
9
9
|
$class-m-r: u-m-r !default;
|
|
@@ -13,38 +13,38 @@ $class-m-x: u-m-x !default;
|
|
|
13
13
|
$class-m-y: u-m-y !default;
|
|
14
14
|
|
|
15
15
|
@for $i from 0 through 8 {
|
|
16
|
-
|
|
16
|
+
/* Margin all */
|
|
17
17
|
.#{$class-m}-#{$i} {
|
|
18
18
|
margin: func.rhythm($i) !important;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
/* Margin top */
|
|
22
22
|
.#{$class-m-t}-#{$i} {
|
|
23
23
|
margin-top: func.rhythm($i) !important;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/* Margin right */
|
|
27
27
|
.#{$class-m-r}-#{$i} {
|
|
28
28
|
margin-right: func.rhythm($i) !important;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
/* Margin bottom */
|
|
32
32
|
.#{$class-m-b}-#{$i} {
|
|
33
33
|
margin-bottom: func.rhythm($i) !important;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
/* Margin left */
|
|
37
37
|
.#{$class-m-l}-#{$i} {
|
|
38
38
|
margin-left: func.rhythm($i) !important;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
/* Margin x (left and right) */
|
|
42
42
|
.#{$class-m-x}-#{$i} {
|
|
43
43
|
margin-right: func.rhythm($i) !important;
|
|
44
44
|
margin-left: func.rhythm($i) !important;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/* Margin y (top and bottom) */
|
|
48
48
|
.#{$class-m-y}-#{$i} {
|
|
49
49
|
margin-top: func.rhythm($i) !important;
|
|
50
50
|
margin-bottom: func.rhythm($i) !important;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use '../configurations/variables' as var;
|
|
4
4
|
@use '../configurations/functions' as func;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* @group Utilities */
|
|
7
7
|
$class-p: u-p !default;
|
|
8
8
|
$class-p-t: u-p-t !default;
|
|
9
9
|
$class-p-r: u-p-r !default;
|
|
@@ -14,38 +14,38 @@ $class-p-y: u-p-y !default;
|
|
|
14
14
|
|
|
15
15
|
/* stylelint-disable */
|
|
16
16
|
@for $i from 0 through 8 {
|
|
17
|
-
|
|
17
|
+
/* Padding all */
|
|
18
18
|
.#{$class-p}-#{$i} {
|
|
19
19
|
padding: func.rhythm($i) !important;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/* Padding top */
|
|
23
23
|
.#{$class-p-t}-#{$i} {
|
|
24
24
|
padding-top: func.rhythm($i) !important;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/* Padding right */
|
|
28
28
|
.#{$class-p-r}-#{$i} {
|
|
29
29
|
padding-right: func.rhythm($i) !important;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
/* Padding bottom */
|
|
33
33
|
.#{$class-p-b}-#{$i} {
|
|
34
34
|
padding-bottom: func.rhythm($i) !important;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
/* Padding left */
|
|
38
38
|
.#{$class-p-l}-#{$i} {
|
|
39
39
|
padding-left: func.rhythm($i) !important;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
/* Padding x (left and right) */
|
|
43
43
|
.#{$class-p-x}-#{$i} {
|
|
44
44
|
padding-right: func.rhythm($i) !important;
|
|
45
45
|
padding-left: func.rhythm($i) !important;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
/* Padding x (left and right) */
|
|
49
49
|
.#{$class-p-y}-#{$i} {
|
|
50
50
|
padding-top: func.rhythm($i) !important;
|
|
51
51
|
padding-bottom: func.rhythm($i) !important;
|