@apolitical/component-library 1.18.8 → 2.0.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 (124) hide show
  1. package/communities/join-button/join-button.d.ts +1 -1
  2. package/context/user/index.d.ts +1 -1
  3. package/discussion/components/likes/likes.d.ts +1 -1
  4. package/discussion/feeds/activities-feed/activities-feed.d.ts +7 -0
  5. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +6 -0
  6. package/discussion/feeds/replies-feed/replies-feed.d.ts +8 -0
  7. package/form/components/email-helper-text-box/email-helper-text-box.d.ts +1 -1
  8. package/form/components/form/components/field-wrapper/field-wrapper.d.ts +3 -0
  9. package/form/components/form/components/field-wrapper/index.d.ts +1 -0
  10. package/form/components/form/components/fields/checkbox/checkbox.d.ts +31 -0
  11. package/form/components/form/components/fields/checkbox/index.d.ts +1 -0
  12. package/form/components/form/components/fields/dropdown-menu/components/index.d.ts +1 -0
  13. package/form/components/form/components/fields/dropdown-menu/components/rotating-chevron/index.d.ts +1 -0
  14. package/form/components/form/components/fields/dropdown-menu/components/rotating-chevron/rotating-chevron.d.ts +6 -0
  15. package/form/components/form/components/fields/dropdown-menu/dropdown-menu.d.ts +3 -0
  16. package/form/components/form/components/fields/dropdown-menu/index.d.ts +1 -0
  17. package/form/components/form/components/fields/index.d.ts +5 -0
  18. package/form/components/form/components/fields/input/index.d.ts +1 -0
  19. package/form/components/form/components/fields/input/input.d.ts +39 -0
  20. package/form/components/form/components/fields/multiple-options/index.d.ts +1 -0
  21. package/form/components/form/components/fields/multiple-options/multiple-options.d.ts +3 -0
  22. package/form/components/form/components/fields/password/index.d.ts +1 -0
  23. package/form/components/form/components/fields/password/password.d.ts +3 -0
  24. package/form/components/form/components/index.d.ts +2 -0
  25. package/form/components/form/form.d.ts +3 -0
  26. package/form/components/form/form.mocks.d.ts +18 -0
  27. package/form/components/form/form.reducer.d.ts +3 -0
  28. package/form/components/form/form.types.d.ts +189 -0
  29. package/form/components/form/index.d.ts +1 -0
  30. package/form/components/index.d.ts +1 -0
  31. package/form/components/password-rules/password-rules.d.ts +1 -1
  32. package/form/components/rating/rating.d.ts +1 -1
  33. package/form/types/contact-form/contact-form.d.ts +12 -0
  34. package/form/types/contact-form/index.d.ts +1 -0
  35. package/form/types/index.d.ts +3 -1
  36. package/form/types/signup-form/components/index.d.ts +1 -0
  37. package/form/types/signup-form/components/success-message.d.ts +4 -0
  38. package/form/types/signup-form/index.d.ts +1 -0
  39. package/form/types/signup-form/signup-form.d.ts +25 -0
  40. package/form/types/signup-form/signup-form.helpers.d.ts +41 -0
  41. package/form/types/signup-form/signup-form.helpers.get-fields.d.ts +56 -0
  42. package/general/buttons/button/button.d.ts +1 -1
  43. package/helpers/in-development.d.ts +1 -0
  44. package/helpers/index.d.ts +4 -3
  45. package/index.js +34 -15
  46. package/index.mjs +5422 -2940
  47. package/layout/content-layout/contact-footer/contact-footer.d.ts +5 -0
  48. package/layout/content-layout/contact-footer/index.d.ts +1 -0
  49. package/layout/content-layout/index.d.ts +1 -0
  50. package/mappers/index.d.ts +1 -1
  51. package/mappers/{mapGetSteamData.d.ts → map-get-steam-data.d.ts} +1 -1
  52. package/modals/index.d.ts +1 -1
  53. package/navigation/filters/filters.d.ts +1 -1
  54. package/navigation/more-menu/more-menu.d.ts +1 -1
  55. package/package.json +2 -1
  56. package/sections/full-width-section/full-width-section.d.ts +2 -0
  57. package/sections/logo-section/logo-section.d.ts +1 -1
  58. package/style.css +1 -1
  59. package/styles/README.md +28 -0
  60. package/styles/base/_accessibility.scss +21 -11
  61. package/styles/base/_blockquotes.scss +31 -20
  62. package/styles/base/_fonts.scss +10 -6
  63. package/styles/base/_hr.scss +9 -8
  64. package/styles/base/_index.scss +2 -13
  65. package/styles/base/_layout.scss +5 -4
  66. package/styles/base/_links.scss +11 -13
  67. package/styles/base/_lists.scss +26 -13
  68. package/styles/base/_overlays.scss +34 -32
  69. package/styles/base/_table.scss +40 -27
  70. package/styles/base/_text.scss +128 -63
  71. package/styles/base/_titles.scss +192 -114
  72. package/styles/base/buttons/_button-wrapper.scss +23 -18
  73. package/styles/base/buttons/_buttons.scss +246 -169
  74. package/styles/base/buttons/_icons.scss +26 -26
  75. package/styles/base/buttons/_index.scss +1 -2
  76. package/styles/base/buttons/_mixins.scss +9 -3
  77. package/styles/base/buttons/_sizes.scss +47 -8
  78. package/styles/base/form/_fields.scss +50 -41
  79. package/styles/base/form/_form.scss +26 -0
  80. package/styles/base/form/_index.scss +1 -2
  81. package/styles/base/form/_labels.scss +12 -0
  82. package/styles/base/form/_search-button.scss +17 -17
  83. package/styles/functions/_index.scss +1 -1
  84. package/styles/functions/_maps.scss +25 -0
  85. package/styles/functions/_size-conversions.scss +3 -3
  86. package/styles/index.scss +3 -5
  87. package/styles/mixins/_animations.scss +1 -1
  88. package/styles/mixins/_backgrounds.scss +8 -2
  89. package/styles/mixins/_breakpoints.scss +1 -1
  90. package/styles/mixins/_browsers.scss +4 -2
  91. package/styles/mixins/_containers.scss +0 -1
  92. package/styles/mixins/_index.scss +2 -8
  93. package/styles/mixins/_queries.scss +11 -0
  94. package/styles/mixins/_selectors.scss +1 -1
  95. package/styles/mixins/_styles.scss +23 -21
  96. package/styles/mixins/_transitions.scss +19 -15
  97. package/styles/reset/_index.scss +1 -1
  98. package/styles/reset/_reset.scss +104 -20
  99. package/styles/variables/_index.scss +1 -3
  100. package/styles/variables/assets/_assets.scss +0 -1
  101. package/styles/variables/assets/_index.scss +1 -1
  102. package/styles/variables/colors/_colors.scss +53 -53
  103. package/styles/variables/colors/_index.scss +1 -1
  104. package/styles/variables/colors/theme/_banners.scss +26 -0
  105. package/styles/variables/colors/theme/_base.scss +88 -0
  106. package/styles/variables/colors/theme/_cards.scss +24 -0
  107. package/styles/variables/colors/theme/_communities.scss +7 -0
  108. package/styles/variables/colors/theme/_discussion.scss +20 -0
  109. package/styles/variables/colors/theme/_form.scss +25 -0
  110. package/styles/variables/colors/theme/_general.scss +9 -0
  111. package/styles/variables/colors/theme/_index.scss +8 -0
  112. package/styles/variables/colors/theme/_layout.scss +50 -0
  113. package/styles/variables/colors/theme/_loaders.scss +20 -0
  114. package/styles/variables/colors/theme/_modals.scss +14 -0
  115. package/styles/variables/colors/theme/_navigation.scss +41 -0
  116. package/styles/variables/colors/theme/_pages.scss +9 -0
  117. package/styles/variables/colors/theme/_text.scss +47 -0
  118. package/styles/variables/colors/theme/_user.scss +16 -0
  119. package/styles/variables/sizes/_common.scss +1 -1
  120. package/styles/variables/sizes/_index.scss +1 -1
  121. package/text/helper-text-box/helper-text-box.d.ts +1 -1
  122. package/text/hide-show-text-box/hide-show-text-box.d.ts +1 -1
  123. package/types/index.d.ts +1 -0
  124. package/styles/variables/colors/_theme.scss +0 -312
@@ -1,18 +1,18 @@
1
- @use 'sass:map';
2
1
  @use 'sass:meta';
3
- @import './../../functions',
4
- './../../mixins',
5
- './../../variables';
2
+ @import './../../functions', './../../mixins', './../../variables';
6
3
  @import './icons', './mixins', './sizes';
7
4
 
8
5
  @layer base {
9
- button, .button {
10
- background: map.get($theme, 'button_primary_bg');
11
- padding: px-to-rem(map.get($medium, 'padding-top')) px-to-rem(map.get($medium, 'padding-horizontal'))
12
- px-to-rem(map.get($medium, 'padding-bottom')) px-to-rem(map.get($medium, 'padding-horizontal'));
6
+ button,
7
+ .button {
8
+ background: get-map($theme, 'button_primary_bg');
9
+ padding: px-to-rem(get-map($medium, 'padding-top'))
10
+ px-to-rem(get-map($medium, 'padding-horizontal'))
11
+ px-to-rem(get-map($medium, 'padding-bottom'))
12
+ px-to-rem(get-map($medium, 'padding-horizontal'));
13
13
  position: relative;
14
14
  text-align: center;
15
- font-size: px-to-rem(map.get($medium, 'font-size'));
15
+ font-size: px-to-rem(get-map($medium, 'font-size'));
16
16
  font-weight: 700;
17
17
  text-decoration: none;
18
18
  border-radius: 360rem; // Completely round corners. This could be any large number but 360 evokes a circle well!
@@ -21,32 +21,47 @@
21
21
  box-sizing: border-box;
22
22
  display: inline-block;
23
23
 
24
- &, &:hover, &:active, &:focus, &:focus-visible { color: map.get($theme, 'button_primary'); }
24
+ &,
25
+ &:hover,
26
+ &:active,
27
+ &:focus,
28
+ &:focus-visible {
29
+ color: get-map($theme, 'button_primary');
30
+ }
25
31
 
26
32
  &:hover {
27
- background: map.get($theme, 'button_primary_bg_hover');
33
+ background: get-map($theme, 'button_primary_bg_hover');
28
34
  }
29
35
 
30
- &:active, &.active {
31
- background: map.get($theme, 'button_primary_bg_active');
36
+ &:active,
37
+ &.active {
38
+ background: get-map($theme, 'button_primary_bg_active');
32
39
  }
33
40
 
34
- &:focus, &:focus-visible {
35
- background: map.get($theme, 'button_primary_bg_focus');
41
+ &:focus,
42
+ &:focus-visible {
43
+ background: get-map($theme, 'button_primary_bg_focus');
36
44
  }
37
45
 
38
46
  @each $size, $styles in $sizes {
39
47
  &.#{$size} {
40
- padding: px-to-rem(map.get($styles, 'padding-top')) px-to-rem(map.get($styles, 'padding-horizontal'))
41
- px-to-rem(map.get($styles, 'padding-bottom')) px-to-rem(map.get($styles, 'padding-horizontal'));
42
- font-size: px-to-rem(map.get($styles, 'font-size'));
48
+ padding: px-to-rem(get-map($styles, 'padding-top'))
49
+ px-to-rem(get-map($styles, 'padding-horizontal'))
50
+ px-to-rem(get-map($styles, 'padding-bottom'))
51
+ px-to-rem(get-map($styles, 'padding-horizontal'));
52
+ font-size: px-to-rem(get-map($styles, 'font-size'));
53
+
54
+ &.icon {
55
+ margin-top: px-to-rem(get-map($styles, 'icon-offset'));
43
56
 
44
- &.icon {
45
- margin-top: px-to-rem(map.get($styles, 'icon-offset'));
57
+ &.left::before {
58
+ margin-right: px-to-rem(get-map($styles, 'icon-gutter'));
59
+ }
46
60
 
47
- &.left::before { margin-right: px-to-rem(map.get($styles, 'icon-gutter')); }
48
- &.right::before { margin-left: px-to-rem(map.get($styles, 'icon-gutter')); }
61
+ &.right::before {
62
+ margin-left: px-to-rem(get-map($styles, 'icon-gutter'));
49
63
  }
64
+ }
50
65
  }
51
66
  }
52
67
 
@@ -55,122 +70,162 @@
55
70
  }
56
71
 
57
72
  &.destructive {
58
- &, &:hover, &:active, &:focus, &:focus-visible {
59
- background: map.get($theme, 'button_primary_destructive_bg');
60
- color: map.get($theme, 'button_primary_destructive');
61
- }
62
-
63
- &:hover, &:active {
64
- background: map.get($theme, 'button_primary_destructive_bg_hover');
65
- }
73
+ &,
74
+ &:hover,
75
+ &:active,
76
+ &:focus,
77
+ &:focus-visible {
78
+ background: get-map($theme, 'button_primary_destructive_bg');
79
+ color: get-map($theme, 'button_primary_destructive');
80
+ }
66
81
 
67
- &:focus, &:focus-visible {
68
- box-shadow: $outline map.get($theme, 'button_primary_destructive_box-shadow');
69
- }
82
+ &:hover,
83
+ &:active {
84
+ background: get-map($theme, 'button_primary_destructive_bg_hover');
85
+ }
70
86
 
87
+ &:focus,
88
+ &:focus-visible {
89
+ box-shadow: $outline get-map($theme, 'button_primary_destructive_box-shadow');
90
+ }
71
91
  }
72
92
 
73
93
  &.secondary {
74
94
  @include transition(background color border-color);
75
95
 
76
- background: map.get($theme, 'button_secondary_bg');
77
- border: px-to-rem(map.get($secondary, 'border')) solid map.get($theme, 'button_secondary_border');
96
+ background: get-map($theme, 'button_secondary_bg');
97
+ border: px-to-rem(get-map($secondary, 'border')) solid
98
+ get-map($theme, 'button_secondary_border');
78
99
 
79
- &, &:hover { color: map.get($theme, 'button_secondary'); }
100
+ &,
101
+ &:hover {
102
+ color: get-map($theme, 'button_secondary');
103
+ }
80
104
 
81
- &:hover {
82
- background: map.get($theme, 'button_secondary_bg_hover');
83
- }
105
+ &:hover {
106
+ background: get-map($theme, 'button_secondary_bg_hover');
107
+ }
84
108
 
85
- &:active, &:focus, &:focus-visible {
86
- color: map.get($theme, 'button_secondary_focus');
87
- border-color: map.get($theme, 'button_secondary_border_focus');
88
- }
109
+ &:active,
110
+ &:focus,
111
+ &:focus-visible {
112
+ color: get-map($theme, 'button_secondary_focus');
113
+ border-color: get-map($theme, 'button_secondary_border_focus');
114
+ }
89
115
 
90
- &:active {
91
- background: map.get($theme, 'button_secondary_bg_active');
92
- }
116
+ &:active {
117
+ background: get-map($theme, 'button_secondary_bg_active');
118
+ }
93
119
 
94
- &:focus, &:focus-visible {
95
- background: map.get($theme, 'button_secondary_bg_focus');
96
- }
120
+ &:focus,
121
+ &:focus-visible {
122
+ background: get-map($theme, 'button_secondary_bg_focus');
123
+ }
97
124
 
98
- &.muted {
99
- border-color: map.get($theme, 'button_secondary_border_muted');
125
+ &.muted {
126
+ border-color: get-map($theme, 'button_secondary_border_muted');
100
127
 
101
- &, &:active {
102
- background: map.get($theme, 'button_secondary_bg_muted');
103
- color: map.get($theme, 'button_secondary_muted');
104
- }
128
+ &,
129
+ &:active {
130
+ background: get-map($theme, 'button_secondary_bg_muted');
131
+ color: get-map($theme, 'button_secondary_muted');
132
+ }
105
133
 
106
- &:hover, &:focus, &:focus-visible {
107
- background: map.get($theme, 'button_secondary_bg_muted_hover');
108
- color: map.get($theme, 'button_secondary_muted_hover');
109
- border-color: map.get($theme, 'button_secondary_border_muted_hover');
110
- }
134
+ &:hover,
135
+ &:focus,
136
+ &:focus-visible {
137
+ background: get-map($theme, 'button_secondary_bg_muted_hover');
138
+ color: get-map($theme, 'button_secondary_muted_hover');
139
+ border-color: get-map($theme, 'button_secondary_border_muted_hover');
111
140
  }
141
+ }
112
142
 
113
- &.destructive {
114
- &, &:hover, &:active, &:focus, &:focus-visible {
115
- background: map.get($theme, 'button_secondary_bg_destructive');
116
- color: map.get($theme, 'button_secondary_destructive');
117
- border-color: map.get($theme, 'button_secondary_border_destructive');
118
- }
143
+ &.destructive {
144
+ &,
145
+ &:hover,
146
+ &:active,
147
+ &:focus,
148
+ &:focus-visible {
149
+ background: get-map($theme, 'button_secondary_bg_destructive');
150
+ color: get-map($theme, 'button_secondary_destructive');
151
+ border-color: get-map($theme, 'button_secondary_border_destructive');
119
152
  }
153
+ }
120
154
 
121
- &.disabled {
122
- &, &:hover, &:active, &:focus, &:focus-visible {
123
- background: map.get($theme, 'button_secondary_bg_disabled');
124
- color: map.get($theme, 'button_secondary_disabled');
125
- border-color: map.get($theme, 'button_secondary_border_disabled');
126
- }
155
+ &.disabled {
156
+ &,
157
+ &:hover,
158
+ &:active,
159
+ &:focus,
160
+ &:focus-visible {
161
+ background: get-map($theme, 'button_secondary_bg_disabled');
162
+ color: get-map($theme, 'button_secondary_disabled');
163
+ border-color: get-map($theme, 'button_secondary_border_disabled');
127
164
  }
165
+ }
128
166
  }
129
167
 
130
168
  &.tertiary {
131
169
  @include transition(color text-decoration-color);
132
170
 
133
- padding: px-to-rem(map.get($tertiary, 'padding-top')) px-to-rem(map.get($tertiary, 'padding-horizontal'))
134
- px-to-rem(map.get($tertiary, 'padding-bottom')) px-to-rem(map.get($tertiary, 'padding-horizontal'));
135
- bottom: px-to-rem(map.get($tertiary, 'padding-top'));
136
- right: px-to-rem(map.get($tertiary, 'padding-horizontal'));
171
+ padding: px-to-rem(get-map($tertiary, 'padding-top'))
172
+ px-to-rem(get-map($tertiary, 'padding-horizontal'))
173
+ px-to-rem(get-map($tertiary, 'padding-bottom'))
174
+ px-to-rem(get-map($tertiary, 'padding-horizontal'));
175
+ bottom: px-to-rem(get-map($tertiary, 'padding-top'));
176
+ right: px-to-rem(get-map($tertiary, 'padding-horizontal'));
137
177
  text-decoration: underline;
138
178
  text-decoration-color: transparent;
139
179
 
140
- &, &:focus, &:focus-visible {
141
- background: map.get($theme, 'button_tertiary_bg');
142
- color: map.get($theme, 'button_tertiary');
143
- text-decoration-color: map.get($theme, 'button_tertiary_text-decoration');
180
+ &,
181
+ &:focus,
182
+ &:focus-visible {
183
+ background: get-map($theme, 'button_tertiary_bg');
184
+ color: get-map($theme, 'button_tertiary');
185
+ text-decoration-color: get-map($theme, 'button_tertiary_text-decoration');
144
186
  }
145
187
 
146
- &:hover, &:active {
188
+ &:hover,
189
+ &:active {
147
190
  text-decoration-color: currentcolor;
148
191
  }
149
192
 
150
193
  &:hover {
151
- color: map.get($theme, 'button_tertiary_hover');
194
+ color: get-map($theme, 'button_tertiary_hover');
152
195
  }
153
196
 
154
197
  &:active {
155
- color: map.get($theme, 'button_tertiary_active');
198
+ color: get-map($theme, 'button_tertiary_active');
156
199
  }
157
200
 
158
201
  &.muted {
159
- color: map.get($theme, 'button_tertiary_muted');
202
+ color: get-map($theme, 'button_tertiary_muted');
160
203
 
161
- &:hover, &:focus, &:focus-visible {
162
- color: map.get($theme, 'button_tertiary_muted_hover');
163
- }
204
+ &:hover,
205
+ &:focus,
206
+ &:focus-visible {
207
+ color: get-map($theme, 'button_tertiary_muted_hover');
208
+ }
164
209
  }
165
210
 
166
211
  &.disabled {
167
- &, &:hover, &:active, &:focus, &:focus-visible {
168
- background: map.get($theme, 'button_tertiary_disabled_bg');
169
- color: map.get($theme, 'button_tertiary_disabled');
170
- text-decoration-color: map.get($theme, 'button_tertiary_disabled_text-decoration');
212
+ &,
213
+ &:hover,
214
+ &:active,
215
+ &:focus,
216
+ &:focus-visible {
217
+ background: get-map($theme, 'button_tertiary_disabled_bg');
218
+ color: get-map($theme, 'button_tertiary_disabled');
219
+ text-decoration-color: get-map(
220
+ $theme,
221
+ 'button_tertiary_disabled_text-decoration'
222
+ );
171
223
  }
172
224
  }
173
225
 
226
+ &.full-width {
227
+ right: 0;
228
+ }
174
229
  }
175
230
 
176
231
  &.icon {
@@ -178,77 +233,95 @@
178
233
  flex-flow: row;
179
234
  place-content: center;
180
235
 
236
+ &::before {
237
+ content: '';
238
+ background: currentcolor;
239
+ width: px-to-rem(get-map($medium, 'icon-width'));
240
+ height: px-to-rem(get-map($medium, 'icon-width'));
241
+ display: block;
242
+ }
243
+
244
+ &.left {
181
245
  &::before {
182
- content: '';
183
- background: currentcolor;
184
- width: px-to-rem(map.get($medium, 'icon-width'));
185
- height: px-to-rem(map.get($medium, 'icon-width'));
186
- display: block;
246
+ margin-right: px-to-rem(get-map($medium, 'icon-gutter'));
187
247
  }
188
248
 
189
- &.left {
190
- &::before { margin-right: px-to-rem(map.get($medium, 'icon-gutter')); }
191
-
192
- &.no-text::before { margin-right: 0; }
249
+ &.no-text::before {
250
+ margin-right: 0;
193
251
  }
252
+ }
194
253
 
195
- &.right {
196
- &::before {
197
- margin-left: px-to-rem(map.get($medium, 'icon-gutter'));
198
- order: 2;
199
- }
254
+ &.right {
255
+ &::before {
256
+ margin-left: px-to-rem(get-map($medium, 'icon-gutter'));
257
+ order: 2;
258
+ }
200
259
 
201
- &.no-text::before { margin-left: 0; }
260
+ &.no-text::before {
261
+ margin-left: 0;
202
262
  }
263
+ }
203
264
 
204
- @each $icon, $large-icon, $medium-icon, $small-icon in $icons {
205
- $icon-sizes: ('large', $large-icon), ('medium', $medium-icon), ('small', $small-icon);
265
+ @each $icon, $large-icon, $medium-icon, $small-icon in $icons {
266
+ $icon-sizes: ('large', $large-icon), ('medium', $medium-icon),
267
+ ('small', $small-icon);
206
268
 
207
- @at-root {
208
- %icon-#{$icon} { @include icon-styling($icon, $icon-sizes); }
269
+ @at-root {
270
+ %icon-#{$icon} {
271
+ @include icon-styling($icon, $icon-sizes);
209
272
  }
273
+ }
210
274
 
211
- &.#{$icon} {
212
- @extend %icon-#{$icon};
213
- }
275
+ &.#{$icon} {
276
+ @extend %icon-#{$icon};
277
+ }
214
278
 
215
- &.hover_#{$icon} {
216
- &:hover, &:focus, &:focus-visible {
217
- @extend %icon-#{$icon};
218
- }
279
+ &.hover_#{$icon} {
280
+ &:hover,
281
+ &:focus,
282
+ &:focus-visible {
283
+ @extend %icon-#{$icon};
219
284
  }
220
-
221
285
  }
286
+ }
222
287
 
223
- &.animate {
224
- &::before {
225
- @include transition(transform, #{map.get($animation, 'duration')}s, ease);
226
-
227
- transform: none;
228
- }
288
+ &.animate {
289
+ &::before {
290
+ @include transition(transform, #{get-map($animation, 'duration')}s, ease);
229
291
 
230
- &.bounce {
231
- @include animate {
232
- @keyframes bounce {
233
- 0%, 100% { transform: scale(1); }
292
+ transform: none;
293
+ }
234
294
 
235
- 70% {
236
- transform: scale(#{map.get($animation-bounce, 'scale')});
237
- }
295
+ &.bounce {
296
+ @include animate {
297
+ @keyframes bounce {
298
+ 0%,
299
+ 100% {
300
+ transform: scale(1);
238
301
  }
239
302
 
240
- &:focus, &:active, &.do-animation {
241
- &::before { animation: bounce #{map.get($animation-bounce, 'duration')}s #{map.get($animation-bounce, 'iteration')}; }
303
+ 70% {
304
+ transform: scale(#{get-map($animation-bounce, 'scale')});
242
305
  }
243
-
244
306
  }
245
- }
246
307
 
247
- &.rotate-180::before {
248
- transform: rotate(180deg);
308
+ &:focus,
309
+ &:active,
310
+ &.do-animation {
311
+ &::before {
312
+ animation: bounce #{get-map($animation-bounce, 'duration')}s #{get-map(
313
+ $animation-bounce,
314
+ 'iteration'
315
+ )};
316
+ }
317
+ }
249
318
  }
319
+ }
250
320
 
321
+ &.rotate-180::before {
322
+ transform: rotate(180deg);
251
323
  }
324
+ }
252
325
  }
253
326
 
254
327
  &.disabled {
@@ -259,44 +332,48 @@
259
332
  &[data-hover-text] {
260
333
  position: relative;
261
334
 
262
- &::before, .text {
263
- @include transition(opacity);
335
+ &::before,
336
+ .text {
337
+ @include transition(opacity);
264
338
 
265
- opacity: 1;
266
- }
339
+ opacity: 1;
340
+ }
267
341
 
268
- &::after {
269
- @include transition(width height opacity right, 0s 0s 0.2s 0.2s, ease-in-out, 0s 0s 0.1s 0.1s);
270
-
271
- content: '';
272
- width: 0;
273
- height: 0;
274
- position: absolute;
275
- top: px-to-rem(map.get($secondary-destruction, 'offset'));
276
- right: map.get($secondary-destruction, 'right');
277
- display: flex;
278
- align-items: center;
279
- justify-content: center;
342
+ &::after {
343
+ @include transition(
344
+ width height opacity right,
345
+ 0s 0s 0.2s 0.2s,
346
+ ease-in-out,
347
+ 0s 0s 0.1s 0.1s
348
+ );
349
+
350
+ content: '';
351
+ width: 0;
352
+ height: 0;
353
+ position: absolute;
354
+ top: px-to-rem(get-map($secondary-destruction, 'offset'));
355
+ right: get-map($secondary-destruction, 'right');
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ opacity: 0;
360
+ }
361
+
362
+ &:hover,
363
+ &:focus {
364
+ &::before,
365
+ .text {
280
366
  opacity: 0;
281
367
  }
282
368
 
283
- &:hover, &:focus {
284
- &::before, .text {
285
- opacity: 0;
286
- }
287
-
288
- &::after {
289
- content: attr(data-hover-text);
290
- width: 100%;
291
- height: 100%;
292
- right: 0;
293
- opacity: 1;
294
- }
295
-
369
+ &::after {
370
+ content: attr(data-hover-text);
371
+ width: 100%;
372
+ height: 100%;
373
+ right: 0;
374
+ opacity: 1;
296
375
  }
297
-
376
+ }
298
377
  }
299
-
300
378
  }
301
379
  }
302
-
@@ -8,29 +8,29 @@
8
8
  // Otherwise, put the value in pixels.
9
9
 
10
10
  $icons: ('arrow_left', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
11
- ('arrow_right', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
12
- ('arrow_corner-down_right', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
13
- ('arrow_corner-down_left', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
14
- ('arrow-down', (d, d, 4, 10), (d, d, 3, 8), (d, d, 4, d)),
15
- ('chevron_left', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
16
- ('chevron_right', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
17
- ('close', (48, 48, 0, 0), (32, 32, 0, 0), (24, 24, 0, 0)),
18
- ('ellipsis', (48, 48, 0, 0), (32, 32, 0, 0), (16, 16, 0, 0)),
19
- ('flag', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
20
- ('heart', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
21
- ('heart_empty', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
22
- ('navigation_arrow', (d, d, 4, 10), (d, d, d, d), (14, 14, d, 10)),
23
- ('pencil', (d, d, d, d), (d, d, d, 11), (d, d, 3, 9)),
24
- ('pencil-paper', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
25
- ('plus', (d, d, 4, d), (d, d, 2, d), (11, 11, 3, d)),
26
- ('share', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
27
- ('share_copy-link', (30, 29, d, d), (22, 21, d, d), (d, d, d, d)),
28
- ('share_email', (30, 21, d, d), (24, 17, d, d), (d, d, d, d)),
29
- ('social_facebook', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
30
- ('social_linkedin', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
31
- ('social_twitter', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
32
- ('speech-bubble_square_thick', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
33
- ('star', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
34
- ('star_empty', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
35
- ('tick', (14, 11, 8, 10), (14, 11, 5, 8), (9, 7, 6, 6)),
36
- ('trash', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10));
11
+ ('arrow_right', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
12
+ ('arrow_corner-down_right', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
13
+ ('arrow_corner-down_left', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
14
+ ('arrow-down', (d, d, 4, 10), (d, d, 3, 8), (d, d, 4, d)),
15
+ ('chevron_left', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
16
+ ('chevron_right', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
17
+ ('close', (48, 48, 0, 0), (32, 32, 0, 0), (24, 24, 0, 0)),
18
+ ('ellipsis', (48, 48, 0, 0), (32, 32, 0, 0), (16, 16, 0, 0)),
19
+ ('flag', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
20
+ ('heart', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
21
+ ('heart_empty', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
22
+ ('navigation_arrow', (d, d, 4, 10), (d, d, d, d), (14, 14, d, 10)),
23
+ ('pencil', (d, d, d, d), (d, d, d, 11), (d, d, 3, 9)),
24
+ ('pencil-paper', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
25
+ ('plus', (d, d, 4, d), (d, d, 2, d), (11, 11, 3, d)),
26
+ ('share', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
27
+ ('share_copy-link', (30, 29, d, d), (22, 21, d, d), (d, d, d, d)),
28
+ ('share_email', (30, 21, d, d), (24, 17, d, d), (d, d, d, d)),
29
+ ('social_facebook', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
30
+ ('social_linkedin', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
31
+ ('social_twitter', (40, 40, d, d), (32, 32, d, d), (d, d, d, d)),
32
+ ('speech-bubble_square_thick', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10)),
33
+ ('star', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
34
+ ('star_empty', (16, 16, 0, 0), (d, d, 0, 0), (16, 16, 0, 0)),
35
+ ('tick', (14, 11, 8, 10), (14, 11, 5, 8), (9, 7, 6, 6)),
36
+ ('trash', (22, 22, 0, 10), (18, 18, 1, d), (d, d, 3, 10));
@@ -1,2 +1 @@
1
- @import 'buttons',
2
- 'button-wrapper';
1
+ @import 'buttons', 'button-wrapper';
@@ -2,7 +2,9 @@
2
2
  @import './../../functions';
3
3
 
4
4
  @mixin icon-styling($icon, $icon-sizes) {
5
- &::before { @include image('icons/#{$icon}.svg', true); }
5
+ &::before {
6
+ @include image('icons/#{$icon}.svg', true);
7
+ }
6
8
 
7
9
  @each $size, $styles in $icon-sizes {
8
10
  @include icon-classes(width, list.nth($styles, 1), $size);
@@ -19,9 +21,13 @@
19
21
  @if $value != 'd' {
20
22
  $classname: '';
21
23
 
22
- @if $class { $classname: '.#{$class}' }
24
+ @if $class {
25
+ $classname: '.#{$class}';
26
+ }
23
27
 
24
- @if $size != 'medium' { $classname: $classname + '.#{$size}'; }
28
+ @if $size != 'medium' {
29
+ $classname: $classname + '.#{$size}';
30
+ }
25
31
 
26
32
  &#{$classname}:before {
27
33
  #{$property}: px-to-rem($value);