@internetstiftelsen/styleguide 4.0.17-beta.0.1 → 4.0.18
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 +1 -1
- package/src/app.scss +1 -0
- package/src/atoms/toggle-button/toggle-button.config.js +45 -0
- package/src/molecules/input-group/_input-group.scss +44 -0
- package/src/molecules/input-group/input-group.config.js +37 -0
- package/src/molecules/table/_table.scss +6 -0
- package/src/molecules/table/table.config.js +10 -1
package/package.json
CHANGED
package/src/app.scss
CHANGED
|
@@ -69,6 +69,7 @@ $namespace: '';
|
|
|
69
69
|
@import 'molecules/continue-video-guide/continue-video-guide';
|
|
70
70
|
@import 'molecules/overview-navigation/overview-navigation';
|
|
71
71
|
@import 'molecules/multi-select/multi-select';
|
|
72
|
+
@import 'molecules/input-group/input-group';
|
|
72
73
|
|
|
73
74
|
// Organisms
|
|
74
75
|
@import 'organisms/header/header';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
status: 'ready',
|
|
3
|
+
default: 'Toggle text',
|
|
4
|
+
|
|
5
|
+
context: {
|
|
6
|
+
target_id: 'boo',
|
|
7
|
+
external_target: false,
|
|
8
|
+
toggle_text: true,
|
|
9
|
+
toggle_text_primary_value: 'Toggle text',
|
|
10
|
+
toggle_icon: false,
|
|
11
|
+
},
|
|
12
|
+
variants: [
|
|
13
|
+
{
|
|
14
|
+
name: 'External target',
|
|
15
|
+
context: {
|
|
16
|
+
target_id: 'boo',
|
|
17
|
+
external_target: true,
|
|
18
|
+
toggle_text_primary_value: 'Toggle text',
|
|
19
|
+
toggle_text_secondary_value: 'I am an external target',
|
|
20
|
+
toggle_text: true,
|
|
21
|
+
toggle_icon: false,
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'Toggle icon',
|
|
26
|
+
context: {
|
|
27
|
+
target_id: 'boo',
|
|
28
|
+
external_target: false,
|
|
29
|
+
toggle_text_primary_value: 'Toggle icon',
|
|
30
|
+
toggle_text: false,
|
|
31
|
+
toggle_icon: true,
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Toggle text and icon',
|
|
36
|
+
context: {
|
|
37
|
+
target_id: 'boo',
|
|
38
|
+
external_target: false,
|
|
39
|
+
toggle_text_primary_value: 'Toggle text and icon ',
|
|
40
|
+
toggle_text: true,
|
|
41
|
+
toggle_icon: true,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@charset 'UTF-8';
|
|
2
|
+
|
|
3
|
+
@include molecule(input-group) {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: stretch;
|
|
6
|
+
|
|
7
|
+
@include e(label) {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 0 rhythm(1);
|
|
11
|
+
background: $color-concrete;
|
|
12
|
+
border: 1px solid $color-granit;
|
|
13
|
+
font-size: rem(16px);
|
|
14
|
+
|
|
15
|
+
&:first-child {
|
|
16
|
+
border-radius: $border-radius 0 0 $border-radius;
|
|
17
|
+
border-right: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:last-child {
|
|
21
|
+
border-radius: 0 $border-radius $border-radius 0;
|
|
22
|
+
border-left: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:not(:first-child):not(:last-child) {
|
|
26
|
+
border-left: none;
|
|
27
|
+
border-right: none;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include atom(input) {
|
|
32
|
+
&:first-child {
|
|
33
|
+
border-radius: $border-radius 0 0 $border-radius;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:last-child {
|
|
37
|
+
border-radius: 0 $border-radius $border-radius 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:not(:first-child):not(:last-child) {
|
|
41
|
+
border-radius: 0;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
status: 'wip',
|
|
3
|
+
|
|
4
|
+
context: {
|
|
5
|
+
type: 'url',
|
|
6
|
+
placeholder: 'Website',
|
|
7
|
+
before: 'https://',
|
|
8
|
+
after: null,
|
|
9
|
+
multipleInputs: false,
|
|
10
|
+
},
|
|
11
|
+
variants: [
|
|
12
|
+
{
|
|
13
|
+
name: 'With after',
|
|
14
|
+
context: {
|
|
15
|
+
type: 'email',
|
|
16
|
+
placeholder: 'firstname.lastname',
|
|
17
|
+
before: null,
|
|
18
|
+
after: '\\@internetstiftelsen.se',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'With before and after',
|
|
23
|
+
context: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
placeholder: 'Amount',
|
|
26
|
+
before: '$',
|
|
27
|
+
after: '.00',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Multiple inputs',
|
|
32
|
+
context: {
|
|
33
|
+
multipleInputs: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
}
|
|
@@ -13,7 +13,8 @@ module.exports = {
|
|
|
13
13
|
td_unit3: '.se',
|
|
14
14
|
td_num4: '99',
|
|
15
15
|
td_unit4: 'kr/mån',
|
|
16
|
-
modifier: false
|
|
16
|
+
modifier: false,
|
|
17
|
+
caption: false
|
|
17
18
|
},
|
|
18
19
|
variants: [
|
|
19
20
|
{
|
|
@@ -51,5 +52,13 @@ module.exports = {
|
|
|
51
52
|
scrollable: true
|
|
52
53
|
}
|
|
53
54
|
},
|
|
55
|
+
{
|
|
56
|
+
name: 'With caption',
|
|
57
|
+
context: {
|
|
58
|
+
modifier: 'm-table--columns',
|
|
59
|
+
scrollable: false,
|
|
60
|
+
caption: true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
54
63
|
]
|
|
55
64
|
}
|