@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@internetstiftelsen/styleguide",
3
- "version": "4.0.17-beta.0.1",
3
+ "version": "4.0.18",
4
4
  "main": "dist/components.js",
5
5
  "ports": {
6
6
  "fractal": "3000"
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
+ }
@@ -6,6 +6,12 @@
6
6
  border: 0;
7
7
  counter-reset: table-counter;
8
8
 
9
+ caption {
10
+ font-family: $font-family-headings;
11
+ padding-top: rhythm(1);
12
+ padding-bottom: rhythm(1);
13
+ }
14
+
9
15
  thead,
10
16
  tfoot {
11
17
  font-family: $font-family-mono;
@@ -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
  }