ustyle 1.16.2 → 1.19.2

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/.drone.yml +17 -0
  3. data/Gruntfile.js +14 -8
  4. data/README.md +19 -1
  5. data/config/autoprefixer.yml +3 -3
  6. data/config/scss-lint.yml +1 -0
  7. data/dist/icons.svg +1 -1
  8. data/dist/ustyle-content.css +1 -1
  9. data/dist/ustyle-latest.css +1 -1
  10. data/dist/ustyle.js +1 -7
  11. data/dist/ustyle.json +1 -1
  12. data/dist/ustyle.min.js +1 -1
  13. data/index.js +7 -1
  14. data/lib/ustyle/version.rb +1 -1
  15. data/package-lock.json +56 -14
  16. data/package.json +14 -1
  17. data/styleguide/assets/images/icons.svg +1 -1
  18. data/styleguide/assets/sass/main.scss +1 -1
  19. data/styleguide/content/pattern-library/index.tpl +2 -6
  20. data/tasks/publish.rake +6 -4
  21. data/vendor/assets/images/icons.svg +1 -1
  22. data/vendor/assets/images/icons/alarm.svg +1 -1
  23. data/vendor/assets/images/icons/clock.svg +1 -1
  24. data/vendor/assets/images/icons/cog.svg +1 -1
  25. data/vendor/assets/images/icons/dual-fuel.svg +1 -1
  26. data/vendor/assets/images/icons/envelope.svg +1 -1
  27. data/vendor/assets/images/icons/facebook-brand.svg +1 -1
  28. data/vendor/assets/images/icons/fixed-variable.svg +1 -1
  29. data/vendor/assets/images/icons/gas.svg +1 -1
  30. data/vendor/assets/images/icons/google-brand.svg +1 -1
  31. data/vendor/assets/images/icons/pdf.svg +1 -1
  32. data/vendor/assets/images/icons/piggy-bank.svg +1 -1
  33. data/vendor/assets/images/icons/pound-note.svg +1 -1
  34. data/vendor/assets/images/icons/present.svg +1 -1
  35. data/vendor/assets/images/icons/renewable.svg +1 -1
  36. data/vendor/assets/images/icons/shield.svg +1 -0
  37. data/vendor/assets/images/icons/smiley.svg +1 -1
  38. data/vendor/assets/images/icons/sort.svg +1 -1
  39. data/vendor/assets/images/icons/twitter-brand.svg +1 -1
  40. data/vendor/assets/images/icons/twitter.svg +1 -1
  41. data/vendor/assets/images/icons/uswitch.svg +1 -1
  42. data/vendor/assets/images/icons/wiki.svg +1 -1
  43. data/vendor/assets/javascripts/ustyle/tabs.js +1 -1
  44. data/vendor/assets/stylesheets/ustyle/_all.scss +7 -0
  45. data/vendor/assets/stylesheets/ustyle/articles/_related.scss +5 -3
  46. data/vendor/assets/stylesheets/ustyle/components/_button.scss +0 -1
  47. data/vendor/assets/stylesheets/ustyle/components/_calculator.scss +36 -0
  48. data/vendor/assets/stylesheets/ustyle/components/_comp-table-row.scss +325 -0
  49. data/vendor/assets/stylesheets/ustyle/components/_compliance-banner.scss +33 -0
  50. data/vendor/assets/stylesheets/ustyle/components/_content-group.scss +1 -1
  51. data/vendor/assets/stylesheets/ustyle/components/_grid-classes.scss +1 -1
  52. data/vendor/assets/stylesheets/ustyle/components/_hero.scss +78 -5
  53. data/vendor/assets/stylesheets/ustyle/components/_lists.scss +5 -1
  54. data/vendor/assets/stylesheets/ustyle/components/_promo-banner.scss +127 -0
  55. data/vendor/assets/stylesheets/ustyle/components/_reminder.scss +49 -0
  56. data/vendor/assets/stylesheets/ustyle/components/_tab-navigation.scss +112 -0
  57. data/vendor/assets/stylesheets/ustyle/components/_table-toolbar.scss +91 -0
  58. data/vendor/assets/stylesheets/ustyle/icons/_base.scss +1 -0
  59. data/vendor/assets/stylesheets/ustyle/mixins/_media-query.scss +3 -13
  60. data/vendor/assets/stylesheets/ustyle/tables/_tables-sortable.scss +1 -1
  61. data/vendor/assets/stylesheets/ustyle/tables/_tables-with-key-cells.scss +1 -1
  62. data/vendor/assets/stylesheets/ustyle/utilities/_grid.scss +1 -1
  63. metadata +11 -3
  64. data/vendor/assets/javascripts/ustyle/radioToggle.js +0 -5
@@ -0,0 +1,33 @@
1
+ // @page Pattern Library/Components
2
+ // @name Compliance banner
3
+ //
4
+ // @description
5
+ // Compliance banner and disclaimer below the comparison table
6
+ //
7
+ // @markup
8
+ // <div class="us-comp-banner">
9
+ // <div class="us-comp-banner__inner">
10
+ // <p class="us-comp-banner__text">uSwitch Limited is a credit broker, not a lender, for consumer credit products.</p>
11
+ // <p class="us-comp-banner__text">uSwitch services are provided at no cost to you, but we may receive a commission from the companies we refer you to.</p>
12
+ // </div>
13
+ // </div>
14
+
15
+ .us-comp-banner {
16
+ width: 100%;
17
+ background-color: $c-cyan;
18
+ padding: 15px;
19
+ text-align: center;
20
+ font-size: 14px;
21
+ line-height: 20px;
22
+
23
+ &__inner {
24
+ width: 100%;
25
+ max-width: 1200px;
26
+ margin: 0 auto;
27
+ }
28
+
29
+ &__text:last-child {
30
+ padding: 0;
31
+ margin: 0;
32
+ }
33
+ }
@@ -1,6 +1,6 @@
1
1
  // @page Pattern Library/Components
2
2
  // @name Content group
3
- //
3
+ //
4
4
  // @description
5
5
  // The `.us-content-group` is a separator element for content groupings. Ideal to split up landing pages with reasonable padding.
6
6
  //
@@ -10,7 +10,7 @@
10
10
  .us-grid-row {
11
11
  @include us-row;
12
12
  }
13
-
13
+
14
14
  @include respond-to($default-grid-breakpoint, false, true) {
15
15
  @for $column from 1 through $grid-columns {
16
16
  .us-col-#{$column} {
@@ -1,6 +1,6 @@
1
1
  // @page Pattern Library/Components
2
2
  // @name Hero
3
- //
3
+ //
4
4
  // @description
5
5
  // The `.us-hero` is used for the upper part of most pages, where the calls to action are usually kept.
6
6
  // It is intended to draw attention with `$c-cyan` as it's background color, and should be used across all landing pages.
@@ -9,7 +9,16 @@
9
9
  // <div class='us-hero'>
10
10
  // <div class='us-hero-container'>
11
11
  // <h1 class='us-hero-title'>Hero title</h1>
12
- // <p class='us-hero-description us-standfirst'>Swat at dog intrigued by the shower missing until dinner time.</p>
12
+ // <p class='us-hero-description us-standfirst us-mobile--hidden'>Swat at dog intrigued by the shower missing until dinner time.</p>
13
+ // </div>
14
+ // </div>
15
+ // <div class='us-hero us-hero--double'>
16
+ // <div class='us-hero-container'>
17
+ // <div class="us-hero__block">
18
+ // <h1 class='us-hero-title'>Hero title</h1>
19
+ // <p class='us-hero-description us-standfirst us-mobile--hidden'>Swat at dog intrigued by the shower missing until dinner time.</p>
20
+ // </div>
21
+ // <div class="us-hero__block"></div>
13
22
  // </div>
14
23
  // </div>
15
24
 
@@ -24,12 +33,22 @@ $hero-padding-bottom: $hero-padding-top !default;
24
33
 
25
34
  .us-hero-container {
26
35
  @extend %container;
27
- padding-top: $hero-padding-top;
28
- padding-bottom: $hero-padding-bottom;
36
+ padding-top: $hero-padding-top / 2;
37
+ padding-bottom: $hero-padding-bottom / 2;
38
+
39
+ @include respond-to(tablet) {
40
+ padding-top: $hero-padding-top;
41
+ padding-bottom: $hero-padding-bottom;
42
+ }
29
43
  }
30
44
 
31
45
  .us-hero-title {
32
- margin-top: 0;
46
+ margin-bottom: 0;
47
+ font-size: 1.25em;
48
+
49
+ @include respond-to(tablet) {
50
+ font-size: 2.25em;
51
+ }
33
52
  }
34
53
 
35
54
  .us-hero-title,
@@ -39,4 +58,58 @@ $hero-padding-bottom: $hero-padding-top !default;
39
58
 
40
59
  .us-hero-description {
41
60
  @extend %reset-box-model;
61
+ margin-bottom: 0;
62
+ padding-top: 5px;
63
+ }
64
+
65
+ .us-hero--double .us-hero-container {
66
+ display: flex;
67
+ flex-direction: column;
68
+ justify-content: flex-start;
69
+
70
+ @include respond-to(tablet) {
71
+ flex-direction: row;
72
+ align-items: center;
73
+ }
74
+
75
+ @include respond-to(desktop) {
76
+ align-items: flex-start;
77
+ }
78
+ }
79
+
80
+ .us-hero__block {
81
+ @include respond-to(mobile) {
82
+ &:nth-child(2) {
83
+ display: none;
84
+ }
85
+ }
86
+
87
+ @include respond-to(tablet) {
88
+ &:nth-child(1) {
89
+ width: 60%;
90
+ max-width: 60%;
91
+ flex-grow: 1;
92
+ margin: 0 100px 0 0;
93
+ }
94
+
95
+ &:nth-child(2) {
96
+ width: 40%;
97
+ margin: 0 100px 0 0;
98
+ display: block;
99
+ }
100
+ }
101
+
102
+ @include respond-to(desktop) {
103
+ &:nth-child(1) {
104
+ width: auto;
105
+ max-width: 100%;
106
+ flex-grow: 1;
107
+ margin: 0 100px 0 0;
108
+ }
109
+
110
+ &:nth-child(2) {
111
+ width: 50%;
112
+ max-width: 50%;
113
+ }
114
+ }
42
115
  }
@@ -17,6 +17,11 @@
17
17
  @extend %reset-box-model;
18
18
  list-style: none;
19
19
 
20
+ li {
21
+ font-size: 16px;
22
+ margin: 0;
23
+ }
24
+
20
25
  a {
21
26
  @extend %anchor-link;
22
27
  display: block;
@@ -39,7 +44,6 @@
39
44
  margin-top: 1em;
40
45
 
41
46
  a {
42
- font-size: em(18px);
43
47
  color: $c-navy;
44
48
  }
45
49
  }
@@ -0,0 +1,127 @@
1
+ // @page Pattern Library/Components
2
+ // @name Promo banner
3
+ //
4
+ // @description
5
+ // Promotional banner
6
+ //
7
+ // @markup
8
+ // <div class="us-promo-banner">
9
+ // <div class="us-promo-banner__inner">
10
+ // <h3 class="us-promo-banner__title">Title block here</h3>
11
+ // <ul class="us-promo-banner__list">
12
+ // <li class="us-promo-banner__list-item">
13
+ // <span class="us-promo-banner__circle">1</span>
14
+ // <span class="us-promo-banner__text">Text here</span>
15
+ // </li>
16
+ // <li class="us-promo-banner__list-item">
17
+ // <span class="us-promo-banner__circle">2</span>
18
+ // <span class="us-promo-banner__text">Text here</span>
19
+ // </li>
20
+ // <li class="us-promo-banner__list-item">
21
+ // <span class="us-promo-banner__circle">3</span>
22
+ // <span class="us-promo-banner__text">Text here</span>
23
+ // </li>
24
+ // </ul>
25
+ // <div class="us-promo-banner__button"><a class="us-btn us-btn--action us-btn--large" href="#">Promo CTA text</a></div>
26
+ // </div>
27
+ // </div>
28
+
29
+ .us-promo-banner {
30
+ width: 100%;
31
+ padding: 1.7em;
32
+ background-color: $c-navy;
33
+
34
+ &__inner {
35
+ display: flex;
36
+ width: 100%;
37
+ max-width: 800px;
38
+ margin: 0 auto;
39
+ align-items: flex-start;
40
+ flex-direction: column;
41
+ justify-content: center;
42
+
43
+ @include respond-to(desktop) {
44
+ max-width: 1200px;
45
+ flex-direction: row;
46
+ flex-wrap: wrap;
47
+ }
48
+ }
49
+
50
+ &__list {
51
+ display: flex;
52
+ width: 100%;
53
+ padding: 0;
54
+ margin: 1em 0 1.2em 0;
55
+ align-items: flex-start;
56
+ flex-direction: column;
57
+ justify-content: center;
58
+
59
+ @include respond-to(desktop) {
60
+ width: 70%;
61
+ flex-direction: row;
62
+ flex-grow: 1;
63
+ }
64
+ }
65
+
66
+ &__list-item {
67
+ display: flex;
68
+ width: 100%;
69
+ margin: 15px 0 0 0;
70
+ align-items: center;
71
+ flex-direction: row;
72
+ justify-content: flex-start;
73
+
74
+ @include respond-to(desktop) {
75
+ margin: 0;
76
+ }
77
+
78
+ &:first-child {
79
+ margin: 0;
80
+ }
81
+ }
82
+
83
+ &__title {
84
+ font-size: 1.2em;
85
+ font-weight: 700;
86
+ color: #fff;
87
+
88
+ @include respond-to(desktop) {
89
+ width: 100%;
90
+ font-size: 1.5em;
91
+ }
92
+ }
93
+
94
+ &__circle {
95
+ display: inline-block;
96
+ width: 36px;
97
+ height: 36px;
98
+ min-width: 36px;
99
+ min-height: 36px;
100
+ margin-right: 10px;
101
+ line-height: 30px;
102
+ color: #fff;
103
+ text-align: center;
104
+ background: #2aaa5b;
105
+ border: solid 3px #fff;
106
+ border-radius: 50%;
107
+ align-self: flex-start;
108
+ }
109
+
110
+ &__text {
111
+ padding: 5px 10px 0 10px;
112
+ color: #fff;
113
+ flex-grow: 1;
114
+ align-self: flex-start;
115
+ }
116
+
117
+ &__button {
118
+ margin: 0 auto;
119
+
120
+ @include respond-to(desktop) {
121
+ width: auto;
122
+ flex-grow: 1;
123
+ }
124
+
125
+ a { width: 100%; }
126
+ }
127
+ }
@@ -0,0 +1,49 @@
1
+ // @page Pattern Library/Components
2
+ // @name Reminder
3
+ //
4
+ // @description
5
+ // Placed underneath some tables to enable reminders
6
+ //
7
+ // @markup
8
+ // <div class="us-container us-reminder">
9
+ // <div class="us-grid-row us-reminder-title">Got a balance transfer card?</div>
10
+ // <div class="us-grid-row us-reminder-content">
11
+ // <div class="us-col-xsm-9">
12
+ // <p>Create a reminder and we'll let you know when you're nearing the end of your 0% period</p>
13
+ // <a class="us-btn us-btn--action" data-widget-creative="banner" data-widget-name="reminder-credit-cards" data-widget-position="table" data-event="" data-event-category="reminders" data-event-action="banner-click" data-event-label="credit-cards" href="/account/signin?origin=https://www.uswitch.com/account/reminders#credit-cards&amp;source=credit-cards.reminders" data-overlay-title="Sign up to create a reminder" data-source="credit-cards.reminders" data-origin="https://www.uswitch.com/account/reminders#credit-cards" onclick="uSwitch.openSignin(event)">
14
+ // Create a reminder
15
+ // </a>
16
+ // </div>
17
+ // <div class="us-col-xsm-3">
18
+ // <svg class="us-icon--large us-icon--notext us-icon--inputgrey us-float--right" role="presentation">
19
+ // <use xlink:href="/images/icons.svg#icon-calendar"></use>
20
+ // </svg>
21
+ // </div>
22
+ // </div>
23
+ // </div>
24
+
25
+ .us-reminder {
26
+ background-color: $c-cyan-light;
27
+ border: 1px solid $c-typecyan;
28
+ max-width: 950px;
29
+
30
+ &.us-container {
31
+ @include respond-to(to-small-tablet) {
32
+ padding: 0;
33
+ }
34
+ }
35
+
36
+ &-title {
37
+ background-color: #fff;
38
+ padding: $gutter-width / 2;
39
+ font-weight: bold;
40
+ }
41
+
42
+ &-content {
43
+ padding: $gutter-width / 2 0;
44
+
45
+ p {
46
+ margin-bottom: $gutter-width / 2;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,112 @@
1
+ // @page Pattern Library/Components
2
+ // @name Tab navigation
3
+ //
4
+ // @description
5
+ // Above table, tab-style navigation
6
+ //
7
+ // @markup
8
+ // <div class="us-tabs us-tabs--page-nav">
9
+ // <div class="us-tabs__inner">
10
+ // <ul class="us-tabs__links">
11
+ // <li class="us-tabs__links-item us-tabs__links-item--active"><a href="#">Link here</a></li>
12
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
13
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
14
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
15
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
16
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
17
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
18
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
19
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
20
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
21
+ // <li class="us-tabs__links-item"><a>Link here</a></li>
22
+ // </ul>
23
+ // </div>
24
+ // </div>
25
+
26
+ .us-tabs {
27
+ &--page-nav {
28
+ display: none;
29
+ background-color: $c-bggrey;
30
+
31
+ @include respond-to(tablet) {
32
+ display: block;
33
+ }
34
+ }
35
+
36
+ &__inner {
37
+ width: 100%;
38
+ max-width: 1200px;
39
+ margin: 0 auto;
40
+ }
41
+
42
+ &__links {
43
+ display: flex;
44
+ padding: 0;
45
+ margin: 0;
46
+ list-style: none;
47
+ align-items: center;
48
+ flex-direction: row;
49
+ justify-content: center;
50
+ flex-wrap: nowrap;
51
+ align-items: stretch;
52
+ }
53
+
54
+ &__links-item {
55
+ position: relative;
56
+ display: flex;
57
+ max-width: 180px;
58
+ margin: 0;
59
+ text-align: center;
60
+ cursor: pointer;
61
+ border-right: 1px solid #fff;
62
+ transition: background-color .2s;
63
+ flex-grow: 1;
64
+ align-items: center;
65
+ justify-content: center;
66
+ font-size: .875em;
67
+ line-height: 1.25em;
68
+
69
+ @include respond-to(desktop) {
70
+ font-size: 1em;
71
+ line-height: 1.25em;
72
+ }
73
+
74
+ a {
75
+ display: block;
76
+ color: $c-inputgrey;
77
+ transition: color .2s;
78
+ padding: 14px 1em 12px;
79
+ }
80
+
81
+ &:last-child {
82
+ border: 0;
83
+ }
84
+
85
+ &::before {
86
+ position: absolute;
87
+ top: 0;
88
+ left: 0;
89
+ width: 100%;
90
+ border-top: 5px solid $c-typecyan;
91
+ content: "";
92
+ opacity: 0;
93
+ transition: opacity .2s;
94
+ }
95
+ }
96
+
97
+ &__links-item:hover {
98
+ background-color: #f8f9f9;
99
+
100
+ a { color: $c-typecyan; }
101
+
102
+ &::before { opacity: 1; }
103
+ }
104
+
105
+ &__links-item--active {
106
+ background-color: #fff;
107
+
108
+ a { color: $c-typecyan; }
109
+
110
+ &::before { opacity: 1; }
111
+ }
112
+ }