@internetstiftelsen/styleguide 5.0.6-beta.0.9 → 5.0.8-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/package.json
CHANGED
package/src/app.scss
CHANGED
package/src/components.js
CHANGED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
@use '../../configurations/mixins' as mixin;
|
|
3
|
+
@use '../../configurations/bem' as bem;
|
|
4
|
+
@use '../../configurations/config' as config;
|
|
5
|
+
@use '../../configurations/variables' as var;
|
|
6
|
+
@use '../../configurations/functions' as func;
|
|
7
|
+
@use '../../configurations/colors/colors' as colors;
|
|
8
|
+
@use '../../configurations/colors/colors-functions' as colorFunc;
|
|
9
|
+
@use '../../vendor/grid/breakpoints' as breakpoint;
|
|
10
|
+
@use '../../vendor/grid/grid' as grid;
|
|
11
|
+
|
|
12
|
+
@include mixin.organism(haveibeenpwned) {
|
|
13
|
+
@include bem.e(result) {
|
|
14
|
+
padding: 0 func.rhythm(3) func.rhythm(3) func.rhythm(3);
|
|
15
|
+
|
|
16
|
+
table {
|
|
17
|
+
th:first-child {
|
|
18
|
+
padding-right: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include bem.e(item) {
|
|
23
|
+
background-color: colors.$color-ash;
|
|
24
|
+
|
|
25
|
+
> td {
|
|
26
|
+
border-color: colors.$color-concrete;
|
|
27
|
+
|
|
28
|
+
&:first-child {
|
|
29
|
+
font-family: "HK Grotesk Semibold", sans-serif;
|
|
30
|
+
padding-right: 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@include bem.m(severe) {
|
|
35
|
+
background-color: colors.$color-ruby-light;
|
|
36
|
+
|
|
37
|
+
> td {
|
|
38
|
+
border-color: colors.$color-ruby;
|
|
39
|
+
|
|
40
|
+
img {
|
|
41
|
+
border: 1px solid colors.$color-ruby;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include bem.m(medium) {
|
|
47
|
+
background-color: colors.$color-sandstone-light;
|
|
48
|
+
color: colors.$color-sandstone;
|
|
49
|
+
|
|
50
|
+
> td {
|
|
51
|
+
border-color: colors.$color-sandstone;
|
|
52
|
+
|
|
53
|
+
img {
|
|
54
|
+
border: 1px solid colors.$color-sandstone;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@include bem.m(low) {
|
|
60
|
+
background-color: colors.$color-lemon-light;
|
|
61
|
+
|
|
62
|
+
> td {
|
|
63
|
+
border-color: colors.$color-lemon;
|
|
64
|
+
|
|
65
|
+
img {
|
|
66
|
+
border: 1px solid colors.$color-lemon;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@include bem.e(link) {
|
|
72
|
+
margin: 0 auto;
|
|
73
|
+
|
|
74
|
+
padding: 0 !important;
|
|
75
|
+
border: 0 !important;
|
|
76
|
+
border-radius: 0 !important;
|
|
77
|
+
word-wrap: normal !important;
|
|
78
|
+
word-break: normal !important;
|
|
79
|
+
hyphens: none !important;
|
|
80
|
+
overflow-wrap: normal !important;
|
|
81
|
+
|
|
82
|
+
&:hover,
|
|
83
|
+
&:focus {
|
|
84
|
+
border: 0 !important;
|
|
85
|
+
background-color: transparent !important;
|
|
86
|
+
text-decoration: underline !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@include bem.e(logo) {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: func.rhythm(1);
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
|
|
96
|
+
@include breakpoint.bp-up(md) {
|
|
97
|
+
hyphens: none;
|
|
98
|
+
padding-right: func.rhythm(2);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
> img {
|
|
102
|
+
object-fit: cover;
|
|
103
|
+
object-position: center center;
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
width: 50px;
|
|
106
|
+
height: 50px;
|
|
107
|
+
border: 1px solid currentColor;
|
|
108
|
+
padding: func.rhythm(0.5);
|
|
109
|
+
|
|
110
|
+
@include breakpoint.bp-up(md) {
|
|
111
|
+
width: 75px;
|
|
112
|
+
height: 75px;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@include bem.e(info) {
|
|
121
|
+
&[aria-hidden="true"] {
|
|
122
|
+
display: none
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@include bem.e(actions) {
|
|
127
|
+
&[aria-hidden="true"] {
|
|
128
|
+
display: none;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
status: 'wip',
|
|
3
|
+
|
|
4
|
+
context: {
|
|
5
|
+
result: false
|
|
6
|
+
},
|
|
7
|
+
variants: [
|
|
8
|
+
{
|
|
9
|
+
name: 'With result',
|
|
10
|
+
context: {
|
|
11
|
+
result: true,
|
|
12
|
+
hits: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'No leaks',
|
|
17
|
+
context: {
|
|
18
|
+
result: true,
|
|
19
|
+
hits: false
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import track from '../../assets/js/track';
|
|
2
|
+
|
|
3
|
+
const haveIBeenPwnedSubmit = document.querySelector('#o-search-result-submit');
|
|
4
|
+
|
|
5
|
+
if(haveIBeenPwnedSubmit) {
|
|
6
|
+
haveIBeenPwnedSubmit.addEventListener('submit', function() {
|
|
7
|
+
track({
|
|
8
|
+
event: 'guided_tour',
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
}
|