@rypen-dev/shared-components 5.1.2 → 5.2.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rypen-dev/shared-components",
3
3
  "description": "Shared styles and Vuejs ui components for Rypen projects.",
4
- "version": "5.1.2",
4
+ "version": "5.2.0",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
7
7
  "build": "webpack --config ./webpack.config.js",
@@ -61,10 +61,13 @@ $headline-accent-color-reversed: $white !default;
61
61
 
62
62
  $headline-divider-border-color: $medium-gray !default;
63
63
  $headline-divider-bg-color: transparent !default;
64
- $headline-divider-color: $text-gray !default;
65
64
  $headline-divider-reversed-color: $white !default;
65
+ $headline-divider-color: $text-gray !default;
66
66
  $headline-divider-padding: 0 !default;
67
67
 
68
+ $headline-divider-lite-color: $text-gray !default;
69
+ $headline-divider-lite-border-color: $text-gray !default;
70
+
68
71
  $headline-small-color: $text-gray !default;
69
72
 
70
73
  $navigation-link-color: $primary !default;
@@ -169,9 +172,17 @@ $headline-weight-bold: 500 !default;
169
172
 
170
173
  $button-font-family: $body-font-family !default;
171
174
  $button-large-font-family: $headline-font-family !default;
175
+
172
176
  $button-font-weight: 600 !default;
173
177
  $button-large-font-weight: $body-weight-normal !default;
174
178
 
179
+ $button-font-size: 0.75rem !default;
180
+ $button-font-size-medium: 1.0625rem !default;
181
+ $button-small-font-size: 0.8125rem !default;
182
+
183
+ $button-letter-spacing: 1px !default;
184
+ $button-letter-spacing-medium: 2px !default;
185
+
175
186
  // Measurements
176
187
  $form-field-padding: 0.625rem 1rem !default;
177
188
 
@@ -190,17 +201,19 @@ $global-base-radius: 5px !default;
190
201
  // Buttons
191
202
  $global-button-radius: $global-base-radius !default;
192
203
 
193
- $button-height: 3.5rem !default;
194
- $button-height-medium: 5rem !default;
204
+ $button-height: 56px !default; //3.5rem !default;
205
+ $button-height-medium: 80px !default; //5rem !default;
206
+
207
+ $button-tiny-height: 44px !default; //2.75rem !default;
195
208
 
196
- $button-tiny-height: 2.75rem !default;
197
- $button-tiny-height-medium: 2.75re !default;
209
+ $button-small-height: 56px !default; //3.5rem !default;
210
+ $button-small-height-medium: 64px !default; //4rem !default;
198
211
 
199
- $button-small-height: 3.5rem !default;
200
- $button-small-height-medium: 4rem !default;
212
+ $button-large-height: 72px !default; //4.5rem !default;
213
+ $button-large-height-medium: 110px !default; //6.875rem !default;
201
214
 
202
- $button-large-height: 4.5rem !default;
203
- $button-large-height-medium: 4rem !default;
215
+ $button-multi-line-line-height: 1.8 !default;
216
+ $button-multi-line-side-padding: 30px !default;
204
217
 
205
218
  // Labels/Badges
206
219
  $global-badge-radius: $global-base-radius !default;
@@ -2,10 +2,7 @@
2
2
  /// <reference path="../mixins" />
3
3
  /// <reference path="../vendor/foundation-settings" />
4
4
 
5
- $short-arrow-width: 30px;
6
- $arrow-width: 40px;
7
- $arrow-width-medium: 50px;
8
- $button-transition-time: 200ms;
5
+ @use "sass:math";
9
6
 
10
7
  .cta-link {
11
8
  display: inline-block;
@@ -249,6 +246,11 @@ a.info {
249
246
  }
250
247
  }
251
248
 
249
+ $short-arrow-width: 30px;
250
+ $arrow-width: 40px;
251
+ $arrow-width-medium: 50px;
252
+ $button-transition-time: 200ms;
253
+
252
254
  .arrow-link {
253
255
  display: inline-block;
254
256
  text-transform: uppercase;
@@ -610,6 +612,20 @@ a.info {
610
612
  }
611
613
  }
612
614
 
615
+ $button-multi-line-height: $button-multi-line-line-height * math.div($button-font-size, 1rem) * 16;
616
+ $button-multi-line-height-medium: $button-multi-line-line-height * math.div($button-font-size-medium, 1rem) * 16;
617
+
618
+ $button-multi-line-vertical-padding: #{($button-height - $button-multi-line-height) * 0.5}; // 17.2px, used to be 14px
619
+ $button-multi-line-vertical-padding-medium: #{($button-height-medium - $button-multi-line-height-medium) * 0.5};
620
+
621
+ $button-tiny-multi-line-vertical-padding: #{($button-tiny-height - ($button-multi-line-line-height * math.div($button-small-font-size, 1rem) * 16)) * 0.5};
622
+
623
+ $button-small-multi-line-vertical-padding: #{($button-small-height - $button-multi-line-height) * 0.5};
624
+ $button-small-multi-line-vertical-padding-medium: #{($button-small-height-medium - ($button-multi-line-line-height * math.div($button-small-font-size, 1rem) * 16)) * 0.5};
625
+
626
+ $button-large-multi-line-vertical-padding: #{($button-large-height - $button-multi-line-height) * 0.5};
627
+ $button-large-multi-line-vertical-padding-medium: #{($button-large-height - $button-multi-line-height-medium) * 0.5};
628
+
613
629
  button,
614
630
  .button {
615
631
  background-color: $default-button-bg-color;
@@ -623,10 +639,10 @@ button,
623
639
  cursor: pointer;
624
640
  color: $primary;
625
641
  text-transform: uppercase;
626
- letter-spacing: 1px;
642
+ letter-spacing: $button-letter-spacing;
627
643
  transition: box-shadow $button-transition-time ease-out, background-color $button-transition-time ease-out, color $button-transition-time ease-out;
628
644
  box-shadow: 0 4px 13px 1px $button-shadow-color;
629
- font-size: 0.75rem;
645
+ font-size: $button-font-size;
630
646
  font-family: $button-large-font-family;
631
647
  font-weight: $button-large-font-weight;
632
648
  width: 200px;
@@ -648,8 +664,8 @@ button,
648
664
  line-height: $button-large-height;
649
665
 
650
666
  &.multi-line {
651
- padding-top: 20px;
652
- padding-bottom: 20px;
667
+ padding-top: $button-large-multi-line-vertical-padding;
668
+ padding-bottom: $button-large-multi-line-vertical-padding;
653
669
  }
654
670
  }
655
671
 
@@ -820,9 +836,9 @@ button,
820
836
  line-height: $button-tiny-height !important;
821
837
 
822
838
  &.multi-line {
823
- line-height: 1.8 !important;
824
- padding-top: 9px;
825
- padding-bottom: 10px;
839
+ line-height: $button-multi-line-line-height !important;
840
+ padding-top: $button-tiny-multi-line-vertical-padding;
841
+ padding-bottom: $button-tiny-multi-line-vertical-padding;
826
842
  }
827
843
  }
828
844
 
@@ -833,12 +849,12 @@ button,
833
849
  }
834
850
 
835
851
  &.multi-line {
836
- line-height: 1.8 !important;
837
- padding: 14px 30px;
852
+ line-height: $button-multi-line-line-height !important;
853
+ padding: $button-multi-line-vertical-padding $button-multi-line-side-padding;
838
854
 
839
855
  &.narrow {
840
- padding-left: 14px;
841
- padding-right: 14px;
856
+ padding-left: $button-multi-line-side-padding * 0.5;
857
+ padding-right: $button-multi-line-side-padding * 0.5;
842
858
  }
843
859
  }
844
860
 
@@ -938,15 +954,20 @@ button,
938
954
  @media print, screen and (min-width: map-get($breakpoints, medium)) {
939
955
  line-height: $button-height-medium;
940
956
  margin-bottom: 1rem;
941
- letter-spacing: 2px;
942
- font-size: 1.0625rem;
957
+ letter-spacing: $button-letter-spacing-medium;
958
+ font-size: $button-font-size-medium;
943
959
  width: 388px;
944
960
  box-shadow: 0 12px 22px 0 $button-shadow-color;
945
961
 
962
+ &.multi-line {
963
+ padding-top: $button-multi-line-vertical-padding-medium;
964
+ padding-bottom: $button-multi-line-vertical-padding-medium;
965
+ }
966
+
946
967
  &.small,
947
968
  &.tiny {
948
969
  width: 220px;
949
- font-size: 0.8125rem;
970
+ font-size: $button-small-font-size;
950
971
  line-height: $button-small-height-medium;
951
972
  box-shadow: $button-shadow-color 0 7px 12px;
952
973
 
@@ -957,8 +978,8 @@ button,
957
978
 
958
979
  &.small {
959
980
  &.multi-line {
960
- padding-top: 18px;
961
- padding-bottom: 18px;
981
+ padding-top: $button-small-multi-line-vertical-padding-medium;
982
+ padding-bottom: $button-small-multi-line-vertical-padding-medium;
962
983
  }
963
984
  }
964
985
 
@@ -975,8 +996,8 @@ button,
975
996
  }
976
997
 
977
998
  &.multi-line {
978
- padding-top: 32px;
979
- padding-bottom: 32px;
999
+ padding-top: $button-large-multi-line-vertical-padding-medium;
1000
+ padding-bottom: $button-large-multi-line-vertical-padding-medium;
980
1001
  }
981
1002
 
982
1003
  &:hover,
@@ -242,8 +242,10 @@ h5 {
242
242
 
243
243
  &.lite {
244
244
  font-size: 0.875rem;
245
- padding-bottom: 0.25rem;
246
- border-bottom: solid 2px $headline-divider-color;
245
+ padding: 0 0 0.25rem;
246
+ border-bottom: solid 2px $headline-divider-lite-border-color;
247
+ color: $headline-divider-lite-color;
248
+ background-color: transparent;
247
249
  margin-bottom: 0.25rem;
248
250
  }
249
251