barbican-reset 1.0.2 → 1.0.3

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.
@@ -0,0 +1,104 @@
1
+
2
+ @mixin button_setup($gap: 1em) {
3
+ -webkit-font-smoothing: antialiased;
4
+ -moz-osx-font-smoothing: grayscale;
5
+ border-radius: $border-radius-lg;
6
+ text-decoration: none;
7
+ display: inline-flex;
8
+ place-items: center;
9
+ text-align: center;
10
+ gap: $gap * 0.75;
11
+ font-weight: 700;
12
+ transition: none;
13
+ cursor: pointer;
14
+ line-height: 1;
15
+ padding: $gap;
16
+ }
17
+
18
+ @mixin button_solid(
19
+ $background: $c-brand-orange,
20
+ $color: $white,
21
+ $gap: 1em,
22
+ $border: 1px) {
23
+ @include button_setup($gap);
24
+ border: $border solid $background;
25
+ background-color: $background;
26
+ color: $color;
27
+
28
+ @include focus {
29
+ @include double-box($color, $background);
30
+ border: $border solid $background;
31
+ background-color: $background;
32
+ color: $color;
33
+ }
34
+ }
35
+
36
+ @mixin button_outline(
37
+ $color: $c-brand-orange,
38
+ $background: $white,
39
+ $gap: 1em,
40
+ $border: 1px) {
41
+ @include button_setup($gap);
42
+ border: $border solid $color;
43
+ background-color: $background;
44
+ color: $color;
45
+
46
+ @include focus {
47
+ border: $border solid $color;
48
+ background-color: $color;
49
+ color: $background;
50
+ }
51
+ }
52
+
53
+ @mixin btn-primary {
54
+ @include button_solid;
55
+ }
56
+
57
+ @mixin btn-outline-primary {
58
+ @include button_outline;
59
+ }
60
+
61
+ @mixin btn-outline-header {
62
+ @include button_outline(
63
+ $color: $white,
64
+ $background: $c-brand-orange,
65
+ $border: 0.125rem);
66
+ }
67
+
68
+ @mixin btn-secondary {
69
+ @include button_solid($c-grey-night);
70
+ }
71
+
72
+ @mixin btn-outline-secondary {
73
+ @include button_outline($c-grey-night);
74
+ }
75
+
76
+ @mixin btn-cinema {
77
+ @include button_solid($c-brand-cinema);
78
+ }
79
+
80
+ @mixin btn-power {
81
+ @include button_solid($c-power-blue);
82
+ }
83
+
84
+ @mixin btn-info {
85
+ @include button_solid($c-status-neutral);
86
+ }
87
+
88
+ @mixin btn-outline-cinema {
89
+ @include button_outline($c-brand-cinema);
90
+ }
91
+
92
+ @mixin btn-remove {
93
+ @include button_solid(
94
+ $background: $c-grey-night,
95
+ $gap: 0.625rem);
96
+ }
97
+
98
+ @mixin btn-expand {
99
+ display: block;
100
+ }
101
+
102
+ @mixin btn-slim {
103
+ padding: 0.5rem 0.75rem;
104
+ }
@@ -42,4 +42,11 @@
42
42
  &:focus {
43
43
  background-color: $background;
44
44
  }
45
+ }
46
+
47
+ @mixin card-container {
48
+ border-radius: $border-radius-lg;
49
+ background-color: $white;
50
+ padding: $gap-power;
51
+ overflow: hidden;
45
52
  }
@@ -22,63 +22,4 @@
22
22
  @mixin set-appearance($value: none) {
23
23
  -webkit-appearance: $value;
24
24
  -moz-appearance: $value;
25
- }
26
-
27
- @mixin button(
28
- $background: $c-brand-orange,
29
- $focus: $c-brand-orange-dark,
30
- $gap: 1em) {
31
-
32
- $color: $white;
33
- -webkit-font-smoothing: antialiased;
34
- -moz-osx-font-smoothing: grayscale;
35
- border-radius: $border-radius-lg;
36
- background-color: $background;
37
- padding: $gap ($gap * 1.5);
38
- text-decoration: none;
39
- place-items: center;
40
- text-align: center;
41
- font-weight: 700;
42
- transition: none;
43
- gap: $gap * 0.75;
44
- cursor: pointer;
45
- line-height: 1;
46
- display: flex;
47
- color: $color;
48
-
49
- @include focus {
50
- @include double-box($color, $focus);
51
- background-color: $focus;
52
- color: $color;
53
- }
54
- }
55
-
56
- @mixin button_outline(
57
- $background: $c-brand-orange,
58
- $focus: $c-brand-orange-dark,
59
- $gap: 1em) {
60
-
61
- $color: $white;
62
- -webkit-font-smoothing: antialiased;
63
- -moz-osx-font-smoothing: grayscale;
64
- border-radius: $border-radius-lg;
65
- border: 1px solid $background;
66
- padding: $gap ($gap * 1.5);
67
- background-color: $color;
68
- text-decoration: none;
69
- place-items: center;
70
- text-align: center;
71
- color: $background;
72
- font-weight: 700;
73
- transition: none;
74
- gap: $gap * 0.75;
75
- cursor: pointer;
76
- line-height: 1;
77
- display: flex;
78
-
79
- @include focus {
80
- border: 1px solid $focus;
81
- background-color: $focus;
82
- color: $color;
83
- }
84
25
  }
@@ -1,5 +1,6 @@
1
1
  // paths more explicit for gulp-sass
2
2
  @import "~bourbon/core/bourbon.scss";
3
+ @import "buttons.scss";
3
4
  @import "content.scss";
4
5
  @import "core.scss";
5
6
  @import "focus.scss";
@@ -4,12 +4,12 @@ $c-list-btn-default: $white, $c-grey-night, $white;
4
4
  $c-list-btn-primary: $white, $c-brand-orange, null, null, $c-brand-orange-dark;
5
5
  $c-list-btn-primary-alt: $white, $c-status-neutral;
6
6
  $c-list-btn-secondary: $c-brand-orange, $white, $c-brand-orange, $c-brand-orange-dark, $c-brand-orange-light, $c-brand-orange-dark;
7
- $c-list-btn-secondary-alt: $c-brand-orange, $white, $c-brand-orange, $white, $c-brand-orange;
7
+ $c-list-secondary_outline: $c-brand-orange, $white, $c-brand-orange, $white, $c-brand-orange;
8
8
  $c-list-btn-outline: $c-grey-night, $c-grey-alpine, $c-grey-night, $c-grey-alpine, $c-grey-night;
9
9
  $c-list-btn-light: $c-grey-night, $white;
10
10
 
11
- $c-list-btn-primary-cinema: $white, $c-brand-cinema, null, null, $c-brand-cinema-dark;
12
- $c-list-btn-secondary-cinema: $c-brand-cinema, $white, $c-brand-cinema, $c-brand-cinema-dark, $c-status-success-fade, $c-brand-cinema-dark;
11
+ $c-list-btn-cinema: $white, $c-brand-cinema, null, null, $c-brand-cinema-dark;
12
+ $c-list-btn-outline-cinema: $c-brand-cinema, $white, $c-brand-cinema, $c-brand-cinema-dark, $c-status-success-fade, $c-brand-cinema-dark;
13
13
 
14
14
  $c-list-btn-primary-power: $white, $c-power-blue, null, null, $c-power-blue-dark;
15
15
 
@@ -6,11 +6,14 @@ $constrained_content_width--wide: 1200px;
6
6
  $space: 0.625rem;
7
7
  // Default large amount of space.
8
8
  $space--large: $space * 3;
9
- // Default gap value for use in CSS grid.
10
- $grid-gap: $space;
11
-
12
9
  $border-radius-lg: 0.375rem;
13
10
 
11
+ // Basket layout
12
+ $gap-basket: 0.625rem;
13
+
14
+ // Seat Selection
15
+ $gap-instance: 1.5rem;
16
+
14
17
  // Account Area
15
18
  $gap-account: 2rem;
16
19
 
package/icons/index.js CHANGED
@@ -2,10 +2,12 @@ import BarbicanLogo from '../vue/Icons/Barbican'
2
2
  import CityOfLondonLogo from '../vue/Icons/CityOfLondon'
3
3
  import ArrowIcon from '../vue/Icons/ArrowIcon'
4
4
  import BackArrow from '../vue/Icons/back_arrow.vue'
5
+ import CartIcon from '../vue/Icons/cart.vue'
5
6
 
6
7
  export {
7
8
  BarbicanLogo,
8
9
  CityOfLondonLogo,
9
10
  ArrowIcon,
10
- BackArrow
11
+ BackArrow,
12
+ CartIcon
11
13
  };
package/index.js CHANGED
@@ -2,16 +2,17 @@ import LoadingAnimation from './vue/LoadingAnimation'
2
2
  import Notification from './vue/Notification'
3
3
  import RelatedTitle from './vue/RelatedTitle'
4
4
  import TypeText from './vue/TypeText'
5
- import Container from './vue/Container'
6
5
  import Wrap from './vue/Wrap'
7
- import Card from './vue/Card'
8
6
  import Carousel from './vue/Carousel'
9
- import Banner from './vue/Banner'
10
7
  import AccountCard from './vue/Account/Card'
11
8
  import AccountTitle from './vue/Account/Title'
12
9
  import Placeholder from './vue/Placeholder'
13
10
  import LoginForm from './vue/Login/Form'
14
11
  import FormRow from './vue/form_row'
12
+ import Container from './vue/container'
13
+ import EventSummary from './vue/event_summary'
14
+ import Card from './vue/card'
15
+ import Block from './vue/block'
15
16
 
16
17
  export {
17
18
  LoadingAnimation,
@@ -22,10 +23,11 @@ export {
22
23
  Wrap,
23
24
  Card,
24
25
  Carousel,
25
- Banner,
26
26
  AccountCard,
27
27
  AccountTitle,
28
28
  Placeholder,
29
29
  LoginForm,
30
- FormRow
30
+ FormRow,
31
+ EventSummary,
32
+ Block
31
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "A collection of useful scss imports and js scripts, that provide consistent styling and functionality across barbican projects.",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/scss/_atomic.scss CHANGED
@@ -5,4 +5,8 @@
5
5
 
6
6
  .margin-top-2 {
7
7
  margin-top: 2rem;
8
+ }
9
+
10
+ .margin-bottom-1 {
11
+ margin-bottom: 1rem;
8
12
  }
package/scss/_btn.scss CHANGED
@@ -0,0 +1,52 @@
1
+ .btn {
2
+ @include button_setup;
3
+
4
+ &.btn-primary {
5
+ // solid orange
6
+ @include btn-primary;
7
+ }
8
+
9
+ &.btn-outline-primary {
10
+ // orange outline, fill on focus
11
+ @include btn-outline-primary;
12
+ }
13
+
14
+ &.btn-outline-header {
15
+ // orange outline, fill on focus
16
+ @include btn-outline-header;
17
+ }
18
+
19
+ &.btn-info {
20
+ // solid blue
21
+ @include btn-info;
22
+ }
23
+
24
+ &.btn-secondary {
25
+ // solid grey
26
+ @include btn-secondary;
27
+ }
28
+
29
+ &.btn-outline-secondary {
30
+ // grey outline, fill on focus
31
+ @include btn-outline-secondary;
32
+ }
33
+
34
+ &.btn-remove {
35
+ // solid grey, slim
36
+ @include btn-remove;
37
+ }
38
+
39
+ // button modifyers
40
+ &.expand {
41
+ @include btn-expand;
42
+ }
43
+ &.slim {
44
+ @include btn-slim;
45
+ }
46
+ }
47
+
48
+ input[type="number"] {
49
+ @include focus {
50
+ @include double-box($white, $c-grey-steel);
51
+ }
52
+ }
package/scss/index.scss CHANGED
@@ -11,6 +11,7 @@
11
11
  @import "close-icon.scss";
12
12
 
13
13
  // bootstrap component styles
14
+ @import "btn.scss";
14
15
  @import "checkbox.scss";
15
16
  @import "checkbox-group.scss";
16
17
 
package/vue/.DS_Store CHANGED
Binary file
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="-89 91 20 19">
3
+ <path d="M-69 91.7c-.1-.3-.3-.5-.5-.6s-.5-.2-.8-.1l-3 1c-.4.1-.7.4-.7.9l-.2 1.7-13.8 1.5c-.3.1-.6.2-.7.4-.2.2-.2.5-.2.8l.9 4.7c.1.6.4.9 1 .9h12.1l.2 1.4h-11.6c-.3 0-.5.1-.7.3s-.3.4-.3.7c0 .3.1.5.3.7s.4.3.7.3h12.9c.3 0 .6-.2.8-.4.2-.2.3-.5.2-.8l-.6-3 .8-8.3 2.5-.8c.6-.2.8-.7.7-1.3zm-4.4 16.7c0-.4-.2-.8-.5-1.1-.3-.3-.7-.5-1.1-.5-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1 0 .4.2.8.5 1.1.3.3.7.5 1.1.5.4 0 .8-.2 1.1-.5.3-.3.5-.7.5-1.1zm-9.5 0c0-.4-.2-.8-.5-1.1-.3-.3-.7-.5-1.1-.5-.4 0-.8.2-1.1.5-.3.3-.5.7-.5 1.1 0 .4.2.8.5 1.1.3.3.7.5 1.1.5.4 0 .8-.2 1.1-.5.4-.3.5-.7.5-1.1z"></path>
4
+ </svg>
5
+ </template>
@@ -10,18 +10,14 @@
10
10
  }
11
11
  }
12
12
 
13
- .btn-link, a {
13
+ .btn-link {
14
14
  @include status_focus;
15
15
  }
16
16
 
17
- .error {
18
- .btn-link, a {
19
- @include status_focus($c-status-error, $c-status-error-fade);
20
- }
17
+ .error .btn-link {
18
+ @include status_focus($c-status-error, $c-status-error-fade);
21
19
  }
22
20
 
23
- .success {
24
- .btn-link, a {
25
- @include status_focus($c-status-success, $c-status-success-fade);
26
- }
21
+ .success .btn-link {
22
+ @include status_focus($c-status-success, $c-status-success-fade);
27
23
  }
@@ -50,7 +50,7 @@ $error-colors: $c-status-error, $c-status-error-fade;
50
50
  .wrap {
51
51
  background-color: $c-status-neutral-fade;
52
52
  border-color: $c-status-neutral-light;
53
- border-radius: $border-radius;
53
+ border-radius: $border-radius-lg;
54
54
  border-width: $border-width;
55
55
  color: $c-status-neutral;
56
56
  border-style: solid;
package/vue/block.vue ADDED
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <div :class="styleContainer">
3
+ <slot />
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ computed: {
10
+ styleContainer() {
11
+ return this.$style.container;
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+
17
+ <style lang="scss" module>
18
+
19
+ @import "../helpers/mixins";
20
+
21
+ .container {
22
+ @include card-container;
23
+ box-shadow: 0 0 0.625rem rgba($black, 0.1);
24
+
25
+ &:not(:last-of-type) {
26
+ margin-bottom: $gap-basket;
27
+ }
28
+ }
29
+
30
+ </style>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div :class="styleContainer">
3
- <slot></slot>
3
+ <slot />
4
4
  </div>
5
5
  </template>
6
6
 
@@ -31,4 +31,29 @@ export default {
31
31
  }
32
32
  </script>
33
33
 
34
- <style src="./card.scss" lang="scss" module></style>
34
+ <style lang="scss" module>
35
+
36
+ @import "../helpers/mixins";
37
+
38
+ .container {
39
+ @include card-container;
40
+ border: 1px solid $c-grey-pearl;
41
+ align-content: start;
42
+ display: grid;
43
+ gap: 1.25rem;
44
+ }
45
+
46
+ .container.wrap {
47
+ background-color: $gray-100;
48
+ }
49
+
50
+ .container.account {
51
+ padding: $gap-account;
52
+ display: block;
53
+
54
+ &:not(:last-of-type) {
55
+ margin-bottom: $gap-account;
56
+ }
57
+ }
58
+
59
+ </style>
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div :class="styleOuter">
3
+ <div :class="styleInner">
4
+ <slot />
5
+ </div>
6
+ </div>
7
+ </template>
8
+
9
+ <script>
10
+ export default {
11
+ props: {
12
+ splash: {
13
+ type: Boolean,
14
+ default: false
15
+ },
16
+ masthead: {
17
+ type: Boolean,
18
+ default: false
19
+ }
20
+ },
21
+ computed: {
22
+ styleOuter() {
23
+ if (this.splash) {
24
+ return this.$style.outer_splash;
25
+ }
26
+ if (this.masthead) {
27
+ return this.$style.outer_masthead;
28
+ }
29
+ return this.$style.outer;
30
+ },
31
+ styleInner() {
32
+ if (this.masthead) {
33
+ return this.$style.inner_masthead;
34
+ }
35
+ return this.$style.inner;
36
+ }
37
+ }
38
+ }
39
+ </script>
40
+
41
+ <style lang="scss" module>
42
+
43
+ .outer {
44
+ padding-right: 5%;
45
+ padding-left: 5%;
46
+ }
47
+
48
+ .outer_splash {
49
+ padding-right: 10%;
50
+ padding-left: 10%;
51
+ }
52
+
53
+ .outer_masthead {
54
+ composes: outer;
55
+ box-shadow: 0 0.375rem 0.375rem rgba($black, 0.1);
56
+ background-color: $white;
57
+ }
58
+
59
+ .inner {
60
+ max-width: $constrained_content_width--wide;
61
+ padding-bottom: 1.5rem;
62
+ padding-top: 1.5rem;
63
+ margin: 0 auto;
64
+
65
+ @include media-breakpoint-up(sm) {
66
+ padding-bottom: 2.5rem;
67
+ padding-top: 2.5rem;
68
+ }
69
+ }
70
+
71
+ .inner_masthead {
72
+ composes: inner;
73
+
74
+ @include media-breakpoint-up(sm) {
75
+ padding-bottom: 3rem;
76
+ padding-top: 3rem;
77
+ }
78
+
79
+ h1 {
80
+ margin: 0;
81
+ }
82
+ }
83
+
84
+ </style>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <div :class="$style.container">
3
+ <img :class="styleImage" v-bind:src="data.image" alt="" />
4
+ <div>
5
+ <div :class="$style.title">{{ data.title }}</div>
6
+ <div :class="$style.date_time">{{ data.date_formatted }}</div>
7
+ <div :class="$style.venue">{{ data.venue }}</div>
8
+ <router-link v-if="data.socially_distanced" :to="{ name: 'chooseSeats', params: { instanceIdShort: data.id_short } }" class="btn btn-outline-primary margin-top-1">
9
+ Update seat selection
10
+ </router-link>
11
+ </div>
12
+ </div>
13
+ </template>
14
+
15
+ <script type="text/javascript">
16
+ export default {
17
+ name: "EventSummary",
18
+ props: {
19
+ data: {
20
+ type: Object,
21
+ required: true
22
+ },
23
+ basket: {
24
+ type: Boolean,
25
+ default: false
26
+ }
27
+ },
28
+ computed: {
29
+ styleImage() {
30
+ return this.basket ? this.$style.basket_image : this.$style.seats_image;
31
+ }
32
+ }
33
+ };
34
+ </script>
35
+
36
+ <style lang="scss" module>
37
+
38
+ @mixin title {
39
+ letter-spacing: $headings-letter-spacing;
40
+ line-height: $line-height-sm;
41
+ }
42
+
43
+ @mixin subtitle {
44
+ @include title;
45
+ font-size: $h5-font-size;
46
+ color: $c-text-secondary;
47
+ font-weight: normal;
48
+
49
+ @include media-breakpoint-up(md) {
50
+ font-size: $h4-font-size;
51
+ }
52
+ }
53
+
54
+ .container {
55
+ @include media-breakpoint-up(md) {
56
+ align-items: flex-start;
57
+ display: flex;
58
+ }
59
+ }
60
+
61
+ .image {
62
+ border: 1px solid $c-border-faint;
63
+ border-radius: $border-radius-lg;
64
+ max-width: 24rem;
65
+ width: 100%;
66
+
67
+ @include media-breakpoint-down(md) {
68
+ margin-bottom: $gap-instance;
69
+ }
70
+
71
+ @include media-breakpoint-up(md) {
72
+ margin-right: $gap-instance;
73
+ width: 50%;
74
+ }
75
+ }
76
+
77
+ .seats_image {
78
+ composes: image;
79
+
80
+ @include media-breakpoint-up(md) {
81
+ max-width: 20rem;
82
+ }
83
+ }
84
+
85
+ .basket_image {
86
+ composes: image;
87
+
88
+ @include media-breakpoint-up(md) {
89
+ max-width: 16rem;
90
+ }
91
+ }
92
+
93
+ .title {
94
+ @include title;
95
+ font-weight: $headings-font-weight;
96
+ font-size: $h2-font-size;
97
+ margin-bottom: 0.75rem;
98
+ }
99
+
100
+ .date_time {
101
+ @include subtitle;
102
+ margin-bottom: 0.25rem;
103
+ }
104
+
105
+ .venue {
106
+ @include subtitle;
107
+ }
108
+
109
+ </style>
package/vue/form_row.vue CHANGED
@@ -64,4 +64,4 @@
64
64
  }
65
65
  }
66
66
 
67
- </style>
67
+ </style>
@@ -1,8 +0,0 @@
1
-
2
- .outer {
3
- @include content_masthead;
4
- }
5
-
6
- .inner {
7
- @include content_masthead__inner;
8
- }
@@ -1,9 +0,0 @@
1
- <template>
2
- <div :class="$style.outer">
3
- <div :class="$style.inner">
4
- <slot />
5
- </div>
6
- </div>
7
- </template>
8
-
9
- <style src="./banner.scss" lang="scss" module></style>
@@ -1,24 +0,0 @@
1
-
2
- .container {
3
- border-radius: $border-radius-lg;
4
- border: 1px solid $c-grey-pearl;
5
- background-color: $white;
6
- align-content: start;
7
- overflow: hidden;
8
- padding: 1.25rem;
9
- display: grid;
10
- gap: 1.25rem;
11
- }
12
-
13
- .container.wrap {
14
- background-color: $gray-100;
15
- }
16
-
17
- .container.account {
18
- padding: $gap-account;
19
- display: block;
20
-
21
- &:not(:last-of-type) {
22
- margin-bottom: $gap-account;
23
- }
24
- }
@@ -1,20 +0,0 @@
1
-
2
- .outer {
3
- padding-right: 5%;
4
- padding-left: 5%;
5
- }
6
-
7
- .outer_splash {
8
- padding-right: 10%;
9
- padding-left: 10%;
10
- }
11
-
12
- .inner {
13
- max-width: $constrained_content_width--wide;
14
- padding: 1.5rem 0;
15
- margin: 0 auto;
16
-
17
- @include media-breakpoint-up(sm) {
18
- padding: 2.5rem 0;
19
- }
20
- }
@@ -1,25 +0,0 @@
1
- <template>
2
- <div :class="styleOuter">
3
- <div :class="$style.inner">
4
- <slot />
5
- </div>
6
- </div>
7
- </template>
8
-
9
- <script>
10
- export default {
11
- props: {
12
- splash : {
13
- type: Boolean,
14
- default: false
15
- }
16
- },
17
- computed: {
18
- styleOuter() {
19
- return this.splash ? this.$style.outer_splash : this.$style.outer;
20
- }
21
- }
22
- }
23
- </script>
24
-
25
- <style src="./container.scss" lang="scss" module></style>