@internetstiftelsen/styleguide 2.22.2 → 2.22.3

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/.DS_Store ADDED
Binary file
@@ -46,10 +46,6 @@ require('./molecules/glider/glider');
46
46
 
47
47
  require('./molecules/glider/glider-course');
48
48
 
49
- require('./atoms/timeline/anchorScroll');
50
-
51
- require('./molecules/timeline-navigation/timeline-navigation');
52
-
53
49
  require('./molecules/context-menu/context-menu');
54
50
 
55
51
  require('./molecules/alert/alert');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "2.22.2",
3
+ "version": "2.22.3",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
package/src/.DS_Store ADDED
Binary file
Binary file
Binary file
Binary file
package/src/components.js CHANGED
@@ -21,7 +21,5 @@ import './assets/js/responsivePosition';
21
21
  import './assets/js/youtube';
22
22
  import './molecules/glider/glider';
23
23
  import './molecules/glider/glider-course';
24
- import './atoms/timeline/anchorScroll';
25
- import './molecules/timeline-navigation/timeline-navigation';
26
24
  import './molecules/context-menu/context-menu';
27
25
  import './molecules/alert/alert';
Binary file
@@ -1,159 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- @include atom(timeline) {
4
- position: relative;
5
- align-items: center;
6
- display: flex;
7
- flex-direction: column;
8
- font-family: $font-family-headings;
9
- width: 50px;
10
- flex-grow: 0;
11
- flex-shrink: 0;
12
-
13
- @include bp-up(lg) {
14
- font-size: 170%;
15
- }
16
-
17
- &::after {
18
- content: '';
19
- display: flex;
20
- background-color: $color-cyberspace;
21
- height: 100%;
22
- width: 3px;
23
- order: 3;
24
- }
25
-
26
- @include m(first) {
27
- &::before {
28
- content: '';
29
- display: flex;
30
- border: 3px solid $color-cyberspace;
31
- width: 50px;
32
- height: 50px;
33
- border-radius: 50%;
34
- background-color: $color-snow;
35
- order: 2;
36
- flex-grow: 0;
37
- flex-shrink: 0;
38
- backface-visibility: visible !important;
39
- animation-duration: 0.5s;
40
- animation-fill-mode: both;
41
- animation-delay: 2s;
42
- transform-style: preserve-3d;
43
- transition: border 3s ease;
44
- }
45
-
46
- &:hover {
47
- &::before {
48
- animation-name: flipX;
49
- cursor: wait;
50
- }
51
- }
52
- }
53
- }
54
-
55
- @include atom(timeline-item) {
56
- overflow: visible !important;
57
- z-index: 2;
58
-
59
- @include card-shadow($color-cyberspace, 0.2);
60
-
61
- &::before {
62
- content: '';
63
- display: flex;
64
- height: 24px;
65
- width: 24px;
66
- border-radius: 50%;
67
- background-color: $color-snow;
68
- border: 3px solid $color-cyberspace;
69
- position: absolute;
70
- z-index: 1;
71
- left: -48px;
72
- top: 50%;
73
- transform: translateY(-50%);
74
- backface-visibility: visible !important;
75
- animation-duration: 0.5s;
76
- animation-fill-mode: both;
77
- animation-delay: 0.15s;
78
- transform-style: preserve-3d;
79
- }
80
-
81
- &::after {
82
- content: '';
83
- display: flex;
84
- position: absolute;
85
- z-index: -1;
86
- width: 0;
87
- height: 0;
88
- border-style: solid;
89
- left: -15px;
90
- top: 50%;
91
- transform: translateY(-50%);
92
- transition: left 0.25s ease-out;
93
- will-change: transform, left;
94
- border-width: 40px 20px 40px 0;
95
- border-color: transparent $color-snow transparent transparent;
96
- }
97
-
98
- &:hover,
99
- &:focus {
100
- &::before {
101
- animation-name: flipInX;
102
- }
103
-
104
- &::after {
105
- left: -20px;
106
- }
107
- }
108
-
109
- &:nth-child(even) {
110
- &::after {
111
- border-color: transparent $color-snow transparent transparent;
112
- }
113
- }
114
- }
115
-
116
- @keyframes flipInX {
117
- from {
118
- transform: perspective(400px) rotate3d(0, 1, 0, 0deg) translateY(-50%);
119
- animation-timing-function: ease-in;
120
- }
121
-
122
- 40% {
123
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg) translateY(-50%);
124
- animation-timing-function: ease-in;
125
- }
126
-
127
- 60% {
128
- transform: perspective(400px) rotate3d(0, 1, 0, 0deg) translateY(-50%);
129
- }
130
-
131
- 80% {
132
- transform: perspective(400px) rotate3d(0, 1, 0, -30deg) translateY(-50%);
133
- }
134
-
135
- to {
136
- transform: perspective(400px) translateY(-50%);
137
- }
138
- }
139
-
140
- @keyframes flipX {
141
- from {
142
- transform: perspective(400px) rotate3d(0, 1, 0, 0deg);
143
- animation-timing-function: ease-in;
144
- }
145
-
146
- 40% {
147
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
148
- animation-timing-function: ease-in;
149
- border: 0;
150
- }
151
-
152
- 100% {
153
- background-image: url("data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' x='0' y='0' viewBox='0 0 120 113.3' style='enable-background:new 0 0 120 113.3' xml:space='preserve'%3E%3Cstyle%3E.st2%7Bfill:%23858585%7D%3C/style%3E%3ClinearGradient id='SVGID_1_' gradientUnits='userSpaceOnUse' x1='59.99' y1='98.948' x2='59.99' y2='12.92' gradientTransform='matrix(1 0 0 -1 0 112.3)'%3E%3Cstop offset='.5' style='stop-color:%23fee133'/%3E%3Cstop offset='.612' style='stop-color:%23fede32'/%3E%3Cstop offset='.708' style='stop-color:%23fcd32f'/%3E%3Cstop offset='.797' style='stop-color:%23fac12b'/%3E%3Cstop offset='.883' style='stop-color:%23f7a924'/%3E%3Cstop offset='.9' style='stop-color:%23f6a323'/%3E%3C/linearGradient%3E%3Cpath d='M60 111.3c-27.3 0-56.7-17.1-56.7-54.7S32.7 2 60 2c15.1 0 29.1 5 39.5 14.1 11.3 10 17.2 24 17.2 40.5s-6 30.5-17.2 40.5c-10.4 9.2-24.4 14.2-39.5 14.2z' style='fill:url(%23SVGID_1_)'/%3E%3Cpath d='M60 4c14.6 0 28.2 4.8 38.1 13.6 10.8 9.6 16.6 23.1 16.6 39 0 15.9-5.7 29.4-16.6 39-10 8.8-23.5 13.7-38.1 13.7-14.7 0-28.2-4.8-38.2-13.5C11 86.3 5.3 72.7 5.3 56.7 5.3 40.5 11 27 21.9 17.5 31.7 8.8 45.3 4 60 4m0-4C29.5 0 1.3 19.6 1.3 56.7c0 36.9 28.2 56.7 58.7 56.7s58.7-20.3 58.7-56.7C118.7 20.1 90.5 0 60 0z' style='fill:%23eb8f00'/%3E%3Cpath d='M120 38.1s-4.3.1-4.3 3.5c0 8.4.1 26.5-22 26.5-17.7 0-26.1-9.1-27.5-19.2-.6-4.2-2-8.8-6.3-8.8s-5.7 4.6-6.3 8.8C52.2 59 43.8 68.1 26.1 68.1c-22 0-22-18.1-22-26.5 0-3.4-4.3-3.5-4.3-3.5v-8.3s8.2-1.3 20.7-1.3 17.5 0 27.4 1c5.9.6 12 .7 12 .7s6.1-.1 12-.7c9.9-1 14.9-1 27.4-1s20.7 1.3 20.7 1.3v8.3z'/%3E%3Cpath class='st2' d='M17.1 44.6c-.1 1.6-.7 3.1-2.3 3.4h-.5c-1.4 0-2.6-1-2.8-2.4-.6-3 .1-5.8 1.8-7.9 1.6-2 4-3.1 6.6-3.1 1.6 0 3 1 3 2.6 0 1.9-1.5 2.7-3 3.2-1.5.6-2.7 2.3-2.8 4.2zM80.7 44.6c-.1 1.6-.7 3.1-2.3 3.4h-.5c-1.4 0-2.6-1-2.8-2.4-.6-3 .1-5.8 1.8-7.9 1.6-2 4-3.1 6.6-3.1 1.6 0 3 1 3 2.6 0 1.9-1.5 2.7-3 3.2-1.5.6-2.7 2.3-2.8 4.2z'/%3E%3Cpath d='M60 86.5c-11.5 0-19.7-6-22.2-9.7-1-1.4-1.1-3-.5-4.2.5-.9 1.4-1.4 2.4-1.4.3 0 .7.1 1.1.2 5.8 1.8 12.5 2.8 19.2 2.8 6.7 0 13.4-1 19.2-2.8.4-.1.7-.2 1.1-.2 1.1 0 1.9.5 2.4 1.4.6 1.2.4 2.8-.5 4.2-2.5 3.7-10.7 9.7-22.2 9.7z' style='fill:%23242424'/%3E%3C/svg%3E");
154
- background-size: 50px 50px;
155
- background-repeat: no-repeat;
156
- cursor: default;
157
- border: 0;
158
- }
159
- }
@@ -1,7 +0,0 @@
1
- import SmoothScroll from 'smooth-scroll';
2
-
3
- const anchorScroll = new SmoothScroll('a[href*="#"]', {
4
- easing: 'easeOutCubic',
5
- });
6
-
7
- module.exports = anchorScroll;
@@ -1,15 +0,0 @@
1
- module.exports = {
2
- status: 'prototype',
3
-
4
- context: {
5
- text: 'Paging',
6
- modifiers: ['icon'],
7
- icon: 'richtext-bullet-list',
8
- additional_classes: 'm-timeline-navigation__button js-timeline-navigation',
9
- button_type: 'button',
10
- url: false,
11
- aria_controls: 'timeline-navigation',
12
- aria_expanded: false,
13
- text: 'Visa tidslinje'
14
- }
15
- }
@@ -1,32 +0,0 @@
1
- const timelineNavigation = document.querySelector('#timeline-navigation');
2
- const timeLineButton = document.querySelector('.js-timeline-navigation');
3
- const timeLineOverlay = document.querySelector('.js-timeline-overlay');
4
- const body = document.querySelector('body');
5
- const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
6
- let clicked = false;
7
-
8
- if (timeLineButton) {
9
- timeLineButton.addEventListener('click', () => {
10
- body.classList.toggle('html-no-overflow');
11
- if (clicked === false) {
12
- timeLineButton.style.transform = `translateX(-${scrollbarWidth}px)`;
13
- timeLineOverlay.style.transform = `translateX(-${scrollbarWidth}px)`;
14
- body.style.paddingRight = `${scrollbarWidth}px`;
15
- clicked = true;
16
- } else {
17
- timeLineButton.removeAttribute('style');
18
- timeLineOverlay.removeAttribute('style');
19
- body.removeAttribute('style');
20
- clicked = false;
21
- }
22
- });
23
- }
24
-
25
- if (timelineNavigation) {
26
- const timelineNavigationLinks = timelineNavigation.querySelectorAll('a');
27
- [].forEach.call(timelineNavigationLinks, (timelineNavigationLink) => {
28
- timelineNavigationLink.addEventListener('click', () => {
29
- timeLineButton.click();
30
- });
31
- });
32
- }
@@ -1,165 +0,0 @@
1
- @charset "UTF-8";
2
-
3
- .html-no-overflow {
4
- overflow: hidden;
5
- }
6
-
7
- @include molecule(timeline-navigation) {
8
- transition: opacity 2s ease-out;
9
- transform: translate3d(0,0,0);
10
- position: fixed;
11
- top:0;
12
- left: 0;
13
- z-index: z_index(foreground);
14
- display: flex;
15
- justify-content: flex-end;
16
- width: 100%;
17
- //height: calc(100vh -#{rhythm(4)});
18
- height: 100vh;
19
-
20
- &[aria-hidden='true'] {
21
- display: none;
22
- opacity: 0;
23
- }
24
-
25
- &[aria-hidden='false'] {
26
- animation: opacity;
27
- animation-duration: 1s;
28
- transform: translate3d(0,0,0);
29
- }
30
-
31
- @keyframes opacity {
32
- 0% {display: none; opacity: 0;}
33
- 1% {display: block; opacity: 0;}
34
- 100% {display: block; opacity: 1;}
35
- }
36
-
37
- @include e(button) {
38
- position: fixed;
39
- z-index: z_index(foreground);
40
- right: rhythm(2);
41
- bottom: rhythm(2);
42
-
43
- &[aria-expanded='true'] {
44
- + [class*='overlay'] {
45
- &::after {
46
- box-shadow: 0 0 0 120vw rgba($color-cyberspace,0.7);
47
-
48
- @media only screen and (orientation : portrait) {
49
- box-shadow: 0 0 0 120vh rgba($color-cyberspace,0.7);
50
- }
51
- }
52
- }
53
- }
54
-
55
- + [class*='overlay'] {
56
- position: fixed;
57
- z-index: z_index(foregroundMinus);
58
- right: rhythm(2);
59
- bottom: rhythm(2);
60
- width: rhythm(6);
61
- height: rhythm(6);
62
-
63
- &::after {
64
- content: '';
65
- position: absolute;
66
- z-index: -1;
67
- left: 0;
68
- top: 0;
69
- width: 100%;
70
- height: 100%;
71
- border-radius: 50%;
72
- transition: box-shadow 0.3s ease-out;
73
- transform: translate3d(0,0,0);
74
- }
75
- }
76
- }
77
-
78
- @include e(list) {
79
- width: 100%;
80
- max-width: 450px;
81
- list-style-type: none;
82
- margin: 0;
83
- padding: 0 rhythm(5) 0 0;
84
- position: relative;
85
- overflow: hidden;
86
- overflow-y: auto;
87
- height: calc(100vh -#{rhythm(4)});
88
-
89
-
90
- &::after {
91
- content: '';
92
- display: block;
93
- width: 100%;
94
- max-width: calc(450px -#{rhythm(7)});
95
- height: rhythm(4);
96
- position: fixed;
97
- z-index: 2;
98
- right: rhythm(7);
99
- bottom: 0;
100
- background-color: $color-cyberspace;
101
- }
102
-
103
- @include e(item) {
104
- position: relative;
105
- color: $color-snow;
106
- padding: rhythm(2) rhythm(3);
107
- background-color: $color-cyberspace;
108
- border-right: 4px solid $color-snow;
109
-
110
- &::after {
111
- content: '';
112
- display: flex;
113
- height: 24px;
114
- width: 24px;
115
- border-radius: 50%;
116
- background-color: $color-cyberspace;
117
- border: 3px solid $color-snow;
118
- position: absolute;
119
- z-index: 1;
120
- right: 0;
121
- top: 50%;
122
- transform: translateY(-50%) translateX(13.5px);
123
- backface-visibility: visible !important;
124
- animation-duration: 0.5s;
125
- animation-fill-mode: both;
126
- animation-delay: 0.15s;
127
- transform-style: preserve-3d;
128
- }
129
-
130
- & + & {
131
- border-top: 1px solid lighten($color-cyberspace, 7%);
132
- }
133
-
134
- &:hover {
135
- background-color: lighten($color-cyberspace, 5%);
136
- }
137
-
138
- @include e(link) {
139
- color: $color-snow;
140
- text-decoration: none !important;
141
- display: block;
142
-
143
- &::after {
144
- content: '';
145
- display: block;
146
- position: absolute;
147
- top: 0;
148
- right: 0;
149
- bottom: 0;
150
- left: 0;
151
- cursor: pointer;
152
- }
153
-
154
- &:hover,
155
- &:focus {
156
- text-decoration: underline;
157
-
158
- > h2 {
159
- text-decoration: underline;
160
- }
161
- }
162
- }
163
- }
164
- }
165
- }