@politicalwatch/tipi-uikit 1.3.0

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.
Files changed (178) hide show
  1. package/.browserslistrc +2 -0
  2. package/.editorconfig +7 -0
  3. package/.eslintrc.js +11 -0
  4. package/.postcssrc.json +5 -0
  5. package/.prettierrc.js +7 -0
  6. package/.stylelintrc +24 -0
  7. package/README.md +21 -0
  8. package/package.json +45 -0
  9. package/src/assets/.gitkeep +0 -0
  10. package/src/assets/birthday_bg.png +0 -0
  11. package/src/assets/party_logos/bildu.png +0 -0
  12. package/src/assets/party_logos/bng.png +0 -0
  13. package/src/assets/party_logos/ca.jpeg +0 -0
  14. package/src/assets/party_logos/ciudadanos.png +0 -0
  15. package/src/assets/party_logos/compromis.jpg +0 -0
  16. package/src/assets/party_logos/cup.png +0 -0
  17. package/src/assets/party_logos/eajpnv.png +0 -0
  18. package/src/assets/party_logos/encomupodem.jpg +0 -0
  19. package/src/assets/party_logos/erc.png +0 -0
  20. package/src/assets/party_logos/fac.png +0 -0
  21. package/src/assets/party_logos/icon/bng.svg +4 -0
  22. package/src/assets/party_logos/icon/coalicioncanaria.svg +7 -0
  23. package/src/assets/party_logos/icon/compromis.svg +3 -0
  24. package/src/assets/party_logos/icon/cs.svg +3 -0
  25. package/src/assets/party_logos/icon/cup.svg +4 -0
  26. package/src/assets/party_logos/icon/ehbildu.svg +4 -0
  27. package/src/assets/party_logos/icon/encomu.svg +3 -0
  28. package/src/assets/party_logos/icon/erc.svg +5 -0
  29. package/src/assets/party_logos/icon/foroasturias.svg +4 -0
  30. package/src/assets/party_logos/icon/iu.svg +3 -0
  31. package/src/assets/party_logos/icon/jxcat.svg +3 -0
  32. package/src/assets/party_logos/icon/maspais.svg +3 -0
  33. package/src/assets/party_logos/icon/nuevacanaria.svg +3 -0
  34. package/src/assets/party_logos/icon/pdecat.svg +3 -0
  35. package/src/assets/party_logos/icon/pnv.svg +4 -0
  36. package/src/assets/party_logos/icon/podemos.svg +3 -0
  37. package/src/assets/party_logos/icon/pp.svg +4 -0
  38. package/src/assets/party_logos/icon/prc.svg +5 -0
  39. package/src/assets/party_logos/icon/psoe.svg +3 -0
  40. package/src/assets/party_logos/icon/sumar.svg +73 -0
  41. package/src/assets/party_logos/icon/teruelexiste.svg +3 -0
  42. package/src/assets/party_logos/icon/unidaspodemos.svg +27 -0
  43. package/src/assets/party_logos/icon/upn.svg +5 -0
  44. package/src/assets/party_logos/icon/vox.svg +4 -0
  45. package/src/assets/party_logos/iu.png +0 -0
  46. package/src/assets/party_logos/jxcat.png +0 -0
  47. package/src/assets/party_logos/mas-pais.jpg +0 -0
  48. package/src/assets/party_logos/nueva_canarias.png +0 -0
  49. package/src/assets/party_logos/pdecat.png +0 -0
  50. package/src/assets/party_logos/podemos.jpg +0 -0
  51. package/src/assets/party_logos/pp.png +0 -0
  52. package/src/assets/party_logos/prc.png +0 -0
  53. package/src/assets/party_logos/psc.png +0 -0
  54. package/src/assets/party_logos/pse-ee.png +0 -0
  55. package/src/assets/party_logos/psoe.png +0 -0
  56. package/src/assets/party_logos/teruelexiste.svg +4 -0
  57. package/src/assets/party_logos/unidaspodemos.png +0 -0
  58. package/src/assets/party_logos/upn.jpg +0 -0
  59. package/src/assets/party_logos/vox.png +0 -0
  60. package/src/assets/svg/icon-advanced.svg +3 -0
  61. package/src/assets/svg/icon-bell.svg +3 -0
  62. package/src/assets/svg/icon-birthday.svg +18 -0
  63. package/src/assets/svg/icon-building.svg +3 -0
  64. package/src/assets/svg/icon-calendar.svg +4 -0
  65. package/src/assets/svg/icon-chevron-down.svg +3 -0
  66. package/src/assets/svg/icon-chevron-left.svg +3 -0
  67. package/src/assets/svg/icon-chevron-right.svg +3 -0
  68. package/src/assets/svg/icon-chevron-up.svg +3 -0
  69. package/src/assets/svg/icon-clock.svg +4 -0
  70. package/src/assets/svg/icon-close-menu.svg +3 -0
  71. package/src/assets/svg/icon-close.svg +3 -0
  72. package/src/assets/svg/icon-conversation.svg +3 -0
  73. package/src/assets/svg/icon-denied.svg +3 -0
  74. package/src/assets/svg/icon-document.svg +4 -0
  75. package/src/assets/svg/icon-download.svg +3 -0
  76. package/src/assets/svg/icon-error.svg +3 -0
  77. package/src/assets/svg/icon-github.svg +9 -0
  78. package/src/assets/svg/icon-hamburger.svg +1 -0
  79. package/src/assets/svg/icon-info.svg +3 -0
  80. package/src/assets/svg/icon-less.svg +3 -0
  81. package/src/assets/svg/icon-location.svg +3 -0
  82. package/src/assets/svg/icon-mail.svg +4 -0
  83. package/src/assets/svg/icon-more.svg +5 -0
  84. package/src/assets/svg/icon-open-blank.svg +3 -0
  85. package/src/assets/svg/icon-plus.svg +3 -0
  86. package/src/assets/svg/icon-search.svg +4 -0
  87. package/src/assets/svg/icon-success.svg +3 -0
  88. package/src/assets/svg/icon-twitter.svg +3 -0
  89. package/src/assets/svg/icon-upload.svg +3 -0
  90. package/src/components/CSVDownload/CSVDownload.vue +77 -0
  91. package/src/components/Charts/Barchart/d3.barchart.js +488 -0
  92. package/src/components/Charts/Barchart/d3.barchart.vue +16 -0
  93. package/src/components/Charts/Sliceschart/d3.sliceschart.js +272 -0
  94. package/src/components/Charts/Sliceschart/d3.sliceschart.vue +20 -0
  95. package/src/components/Charts/Sunburst/d3.sunburst.js +416 -0
  96. package/src/components/Charts/Sunburst/d3.sunburst.vue +23 -0
  97. package/src/components/Charts/WordsCloud/d3.wordscloud.js +336 -0
  98. package/src/components/Charts/WordsCloud/d3.wordscloud.vue +16 -0
  99. package/src/components/Charts/d3.chart.js +242 -0
  100. package/src/components/Charts/d3.chart.vue +80 -0
  101. package/src/components/Charts/styles.scss +92 -0
  102. package/src/components/CongressLink/CongressLink.vue +17 -0
  103. package/src/components/Deputy/Deputy.vue +119 -0
  104. package/src/components/Header/Header.vue +15 -0
  105. package/src/components/Icon/Icon.vue +33 -0
  106. package/src/components/InitiativeCard/InitiativeCard.vue +98 -0
  107. package/src/components/InitiativeMeta/InitiativeMeta.vue +85 -0
  108. package/src/components/Loader/Loader.vue +27 -0
  109. package/src/components/Message/Message.vue +29 -0
  110. package/src/components/Navbar/Navbar.vue +96 -0
  111. package/src/components/Neuron/Neuron.vue +209 -0
  112. package/src/components/PartyLogo/PartyLogo.vue +59 -0
  113. package/src/components/PartyLogo/PartyLogoIcon.vue +229 -0
  114. package/src/components/Results/Results.vue +109 -0
  115. package/src/components/Splash/Splash.vue +42 -0
  116. package/src/components/Text/Text.vue +59 -0
  117. package/src/components/TipiCharts/TipiBarchart.vue +204 -0
  118. package/src/components/TopicCard/TopicCard.vue +40 -0
  119. package/src/components/TopicLink/TopicLink.vue +33 -0
  120. package/src/components/TopicPill/TopicPill.vue +69 -0
  121. package/src/components/Topics/Topics.vue +84 -0
  122. package/src/components/TwoCircles/TwoCircles.vue +138 -0
  123. package/src/components/index.js +53 -0
  124. package/src/main.js +11 -0
  125. package/src/styles/01_settings/_settings__breakpoints.scss +28 -0
  126. package/src/styles/01_settings/_settings__colors.scss +30 -0
  127. package/src/styles/01_settings/_settings__fonts.scss +3 -0
  128. package/src/styles/01_settings/_settings__icons.scss +0 -0
  129. package/src/styles/01_settings/_settings__variables.scss +45 -0
  130. package/src/styles/02_tools/_tools__functions.scss +19 -0
  131. package/src/styles/02_tools/_tools__mixins.scss +321 -0
  132. package/src/styles/03_generic/_generic__box-sizing.scss +12 -0
  133. package/src/styles/03_generic/_generic__global.scss +20 -0
  134. package/src/styles/03_generic/_generic__normalize.scss +371 -0
  135. package/src/styles/04_base/_base__anchors.scss +8 -0
  136. package/src/styles/04_base/_base__blockquotes.scss +8 -0
  137. package/src/styles/04_base/_base__forms.scss +32 -0
  138. package/src/styles/04_base/_base__headings.scss +23 -0
  139. package/src/styles/04_base/_base__images.scss +4 -0
  140. package/src/styles/04_base/_base__lists.scss +66 -0
  141. package/src/styles/04_base/_base__paragraphs.scss +11 -0
  142. package/src/styles/04_base/_base__tables.scss +95 -0
  143. package/src/styles/05_objects/_objects__columns.scss +29 -0
  144. package/src/styles/05_objects/_objects__container.scss +19 -0
  145. package/src/styles/05_objects/_objects__grid.scss +57 -0
  146. package/src/styles/05_objects/_objects__masonry.scss +11 -0
  147. package/src/styles/05_objects/_objects__media.scss +24 -0
  148. package/src/styles/05_objects/_objects__section.scss +21 -0
  149. package/src/styles/06_components/_components__button.scss +178 -0
  150. package/src/styles/06_components/_components__congress-link.scss +12 -0
  151. package/src/styles/06_components/_components__decorator.scss +10 -0
  152. package/src/styles/06_components/_components__deputy.scss +167 -0
  153. package/src/styles/06_components/_components__disclaimer.scss +24 -0
  154. package/src/styles/06_components/_components__forms.scss +454 -0
  155. package/src/styles/06_components/_components__header.scss +36 -0
  156. package/src/styles/06_components/_components__icon.scss +17 -0
  157. package/src/styles/06_components/_components__initiative-card.scss +49 -0
  158. package/src/styles/06_components/_components__initiative-meta.scss +91 -0
  159. package/src/styles/06_components/_components__loader.scss +125 -0
  160. package/src/styles/06_components/_components__menu.scss +104 -0
  161. package/src/styles/06_components/_components__message.scss +66 -0
  162. package/src/styles/06_components/_components__navbar.scss +114 -0
  163. package/src/styles/06_components/_components__party-logo.scss +21 -0
  164. package/src/styles/06_components/_components__splash.scss +29 -0
  165. package/src/styles/06_components/_components__text.scss +69 -0
  166. package/src/styles/06_components/_components__topic-card.scss +36 -0
  167. package/src/styles/06_components/_components__topic-link.scss +37 -0
  168. package/src/styles/06_components/_components__topics.scss +107 -0
  169. package/src/styles/07_trumps/_trumps__borders.scss +1 -0
  170. package/src/styles/07_trumps/_trumps__colors.scss +3 -0
  171. package/src/styles/07_trumps/_trumps__grid.scss +1 -0
  172. package/src/styles/07_trumps/_trumps__helpers.scss +17 -0
  173. package/src/styles/07_trumps/_trumps__texts.scss +39 -0
  174. package/src/styles/07_trumps/_trumps__visibility.scss +56 -0
  175. package/src/styles/main.scss +54 -0
  176. package/src/utils/index.js +26 -0
  177. package/svgo.config.js +16 -0
  178. package/vite.config.js +57 -0
@@ -0,0 +1,57 @@
1
+ .o-grid {
2
+ display: flex;
3
+ flex: 0 1 auto;
4
+ flex-flow: row wrap;
5
+ margin-left: -$grid-gap-single;
6
+ margin-right: -$grid-gap-single;
7
+
8
+ &__col {
9
+ flex: 0 0 auto;
10
+ max-width: 100%;
11
+ padding-left: rem($grid-gap-single);
12
+ padding-right: rem($grid-gap-single);
13
+
14
+ &--fill {
15
+ flex: 1 1 0;
16
+ }
17
+
18
+ &--right {
19
+ margin-left: auto;
20
+ }
21
+ }
22
+
23
+ &--nowrap {
24
+ flex-wrap: nowrap;
25
+ }
26
+
27
+ &--reverse {
28
+ flex-direction: row-reverse;
29
+ }
30
+
31
+ &--between {
32
+ justify-content: space-between;
33
+ }
34
+
35
+ &--center {
36
+ justify-content: center;
37
+ }
38
+
39
+ &--align-center {
40
+ align-items: center;
41
+ }
42
+
43
+ &--wide {
44
+ margin-left: 0;
45
+ margin-right: 0;
46
+ }
47
+
48
+ &--no-gutters {
49
+ margin-left: 0;
50
+ margin-right: 0;
51
+
52
+ > .o-grid__col {
53
+ padding-left: 0 !important;
54
+ padding-right: 0 !important;
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,11 @@
1
+ .o-masonry {
2
+
3
+ &__item {
4
+ padding-bottom: rem($grid-gap);
5
+ width: 100%;
6
+
7
+ @media (min-width: $sm) {
8
+ width: 33%;
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,24 @@
1
+ .o-media {
2
+ position: relative;
3
+ width: 100%;
4
+
5
+ &::before {
6
+ content: '';
7
+ display: block;
8
+ }
9
+
10
+ &--16x9 {
11
+
12
+ &::before {
13
+ padding-top: 56.25%;
14
+ }
15
+ }
16
+
17
+ &__embed {
18
+ position: absolute;
19
+ width: 100%;
20
+ height: 100%;
21
+ top: 0;
22
+ left: 0;
23
+ }
24
+ }
@@ -0,0 +1,21 @@
1
+ .o-section {
2
+ padding-bottom: rem($o-section-gap);
3
+ padding-top: rem($o-section-gap);
4
+ flex-grow: 1;
5
+
6
+ @media (min-width: $md) {
7
+ padding-bottom: rem($o-section-gap-lg);
8
+ padding-top: rem($o-section-gap-lg);
9
+ }
10
+
11
+ &--double {
12
+ padding-bottom: rem($o-section-gap * 2);
13
+ padding-top: rem($o-section-gap * 2);
14
+ flex-grow: 1;
15
+
16
+ @media (min-width: $md) {
17
+ padding-bottom: rem($o-section-gap-lg * 2);
18
+ padding-top: rem($o-section-gap-lg * 2);
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,178 @@
1
+ .c-button {
2
+ appearance: none;
3
+ background-color: transparent;
4
+ padding: rem($spacer-unit * 2) rem($spacer-unit * 4);
5
+ border: 0;
6
+ color: $secondary-dark;
7
+ font-weight: 500;
8
+ text-decoration: none;
9
+ display: inline-block;
10
+ cursor: pointer;
11
+
12
+ .c-icon {
13
+ position: relative;
14
+ top: 2px;
15
+
16
+ path {
17
+ fill: $secondary-dark;
18
+ }
19
+ }
20
+
21
+ &:hover {
22
+ color: $primary;
23
+ text-decoration: none;
24
+
25
+ .c-icon {
26
+
27
+ path {
28
+ fill: $primary;
29
+ }
30
+ }
31
+ }
32
+
33
+ &.disabled,
34
+ &[disabled] {
35
+ color: $secondary;
36
+ pointer-events: none;
37
+
38
+ .c-icon {
39
+
40
+ path {
41
+ fill: $secondary;
42
+ }
43
+ }
44
+ }
45
+
46
+ &--primary {
47
+ background-color: $primary;
48
+ color: $white;
49
+ border-radius: 10px;
50
+
51
+ &:hover {
52
+ color: $white;
53
+ background-color: $primary-dark;
54
+ text-decoration: none;
55
+
56
+ .c-icon {
57
+
58
+ path {
59
+ fill: $white;
60
+ }
61
+ }
62
+ }
63
+
64
+ &.disabled,
65
+ &[disabled] {
66
+ color: $secondary;
67
+ background-color: $secondary-light;
68
+
69
+ .c-icon {
70
+
71
+ path {
72
+ fill: $secondary;
73
+ }
74
+ }
75
+ }
76
+
77
+ .c-icon {
78
+
79
+ path {
80
+ fill: $white;
81
+ }
82
+ }
83
+ }
84
+
85
+ &--secondary {
86
+ background-color: $secondary;
87
+ color: $white;
88
+
89
+ &:hover {
90
+ color: $white;
91
+ background-color: $secondary-dark;
92
+ text-decoration: none;
93
+
94
+ .c-icon {
95
+
96
+ path {
97
+ fill: $secondary;
98
+ }
99
+ }
100
+ }
101
+
102
+ &.disabled,
103
+ &[disabled] {
104
+ color: $secondary;
105
+ background-color: $secondary-light;
106
+
107
+ .c-icon {
108
+
109
+ path {
110
+ fill: $secondary;
111
+ }
112
+ }
113
+ }
114
+ }
115
+
116
+ &--compact {
117
+ @include tbody2;
118
+
119
+ border-radius: 5px;
120
+ padding: rem($spacer-unit) rem($spacer-unit * 2);
121
+ }
122
+
123
+ &--outline {
124
+ background-color: transparent;
125
+ border: 2px solid $white;
126
+ color: $white;
127
+
128
+ .c-icon {
129
+
130
+ path {
131
+ fill: $white;
132
+ }
133
+ }
134
+
135
+ &:hover {
136
+ color: $secondary-dark;
137
+ background-color: $white;
138
+ text-decoration: none;
139
+
140
+ .c-icon {
141
+
142
+ path {
143
+ fill: $secondary-dark;
144
+ }
145
+ }
146
+ }
147
+
148
+ &.disabled,
149
+ &[disabled] {
150
+ color: $secondary;
151
+ border-color: $secondary;
152
+
153
+ .c-icon {
154
+
155
+ path {
156
+ fill: $secondary;
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ &--icon {
163
+
164
+ &-left {
165
+
166
+ .c-icon {
167
+ margin-right: rem($spacer-unit);
168
+ }
169
+ }
170
+
171
+ &-right {
172
+
173
+ .c-icon {
174
+ margin-left: rem($spacer-unit);
175
+ }
176
+ }
177
+ }
178
+ }
@@ -0,0 +1,12 @@
1
+ .c-congress-link {
2
+ font-weight: bold;
3
+ text-decoration: none;
4
+
5
+ &:hover {
6
+ text-decoration: underline;
7
+ }
8
+
9
+ .c-icon {
10
+ margin-right: 8px;
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ .c-decorator {
2
+ width: 100%;
3
+ height: rem($decorator-mobile-height);
4
+ background-size: cover;
5
+ display: block;
6
+
7
+ @media (min-width: $md) {
8
+ height: rem($decorator-desktop-height);
9
+ }
10
+ }
@@ -0,0 +1,167 @@
1
+ .c-deputy {
2
+ padding: rem($spacer-unit * 8) rem($spacer-unit * 4) rem($spacer-unit * 4);
3
+ background-color: $secondary-light;
4
+ color: $secondary-dark;
5
+
6
+ @media (min-width: $md) {
7
+ margin-bottom: rem($spacer-unit * 4);
8
+ }
9
+
10
+ &__image_container {
11
+ position: relative;
12
+ width: rem($spacer-unit * 20);
13
+ height: rem($spacer-unit * 20);
14
+ margin: 0 auto 30px;
15
+
16
+ @media (min-width: $md) {
17
+ width: rem($spacer-unit * 20);
18
+ height: rem($spacer-unit * 20);
19
+ }
20
+ }
21
+
22
+ &__image {
23
+ width: rem($spacer-unit * 20);
24
+ height: rem($spacer-unit * 20);
25
+ border-radius: 50%;
26
+ object-fit: cover;
27
+ border: 2px solid $secondary;
28
+ margin: 0 auto rem($spacer-unit) auto;
29
+ display: block;
30
+ position: absolute;
31
+ z-index: 0;
32
+
33
+ @media (min-width: $md) {
34
+ margin: 0 0 0 auto;
35
+ }
36
+ }
37
+
38
+ &__name {
39
+ @include th2;
40
+
41
+ text-align: center;
42
+ margin: 0 0 rem($spacer-unit) 0;
43
+
44
+ @media (min-width: $sm) {
45
+ text-align: left;
46
+ }
47
+ }
48
+
49
+ &__group {
50
+ @include subtitle;
51
+
52
+ text-transform: uppercase;
53
+ margin: 0 0 rem($spacer-unit) 0;
54
+ text-align: center;
55
+
56
+ @media (min-width: $sm) {
57
+ text-align: left;
58
+ }
59
+
60
+ a {
61
+ text-decoration: none;
62
+ color: $secondary-dark;
63
+ }
64
+ }
65
+
66
+ &__description {
67
+ @include subtitle;
68
+
69
+ text-align: center;
70
+
71
+ @media (min-width: $sm) {
72
+ text-align: left;
73
+ }
74
+ }
75
+
76
+ &__links {
77
+ @include th6;
78
+
79
+ color: $secondary-dark;
80
+ text-align: center;
81
+
82
+ @media (min-width: $sm) {
83
+ text-align: left;
84
+ }
85
+
86
+ a {
87
+ color: $secondary-dark;
88
+ text-decoration: none;
89
+ display: block;
90
+
91
+ @media (min-width: $md) {
92
+ display: inline-block;
93
+ margin-right: rem($spacer-unit * 2);
94
+ }
95
+ }
96
+ }
97
+
98
+ &__extra {
99
+ margin-top: 8px;
100
+ margin-bottom: 8px;
101
+ text-align: center;
102
+
103
+ @media (min-width: $md) {
104
+ text-align: left;
105
+ }
106
+ }
107
+
108
+ &__personal {
109
+ margin-right: 16px;
110
+
111
+ span {
112
+ margin-right: 4px;
113
+ }
114
+ }
115
+
116
+ &__more {
117
+ text-align: center;
118
+
119
+ @media (min-width: $md) {
120
+ text-align: left;
121
+ }
122
+
123
+ a, a:hover {
124
+ color: $secondary-dark;
125
+ font-weight: 500;
126
+ text-decoration: none;
127
+
128
+ .c-icon {
129
+ margin-left: 8px;
130
+ }
131
+ }
132
+ }
133
+
134
+ &__info {
135
+ display: inline-block;
136
+ vertical-align: top;
137
+ font-size: 14px;
138
+ margin-top: rem($spacer-unit * 8);
139
+
140
+ h3 {
141
+ color: $secondary;
142
+ font-size: 12px;
143
+ }
144
+
145
+ p, a {
146
+ margin-top: 8px;
147
+ margin-bottom: 8px;
148
+ }
149
+
150
+ a {
151
+ font-weight: 500;
152
+ color: $secondary-dark;
153
+ }
154
+
155
+ span {
156
+ margin-right: 8px;
157
+ }
158
+ }
159
+
160
+ &__hidden {
161
+ display: none;
162
+ }
163
+
164
+ &__birthday {
165
+ background: url('../assets/birthday_bg.png');
166
+ }
167
+ }
@@ -0,0 +1,24 @@
1
+ .c-disclaimer {
2
+ @include overline;
3
+
4
+ text-transform: none;
5
+ color: $white;
6
+ background-color: $secondary-dark;
7
+ padding: rem($spacer-unit) rem($spacer-unit * 2);
8
+ display: flex;
9
+ align-items: center;
10
+
11
+ a {
12
+ color: $white;
13
+ text-decoration: none;
14
+ margin-left: auto;
15
+
16
+ img {
17
+ height: 25px;
18
+ width: auto;
19
+ padding-right: 5px;
20
+ vertical-align: middle;
21
+ }
22
+
23
+ }
24
+ }