barbican-reset 2.40.0 → 2.42.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 (51) hide show
  1. package/README.md +21 -21
  2. package/components/{account_title.vue → AccountTitle.vue} +6 -9
  3. package/components/{br_alert.vue → BrAlert.vue} +1 -2
  4. package/components/BrAnchor.vue +34 -0
  5. package/components/BrButton/dot_typing.vue +60 -0
  6. package/components/{br_button → BrButton}/remove_ticket.vue +8 -19
  7. package/components/{br_button.vue → BrButton.vue} +6 -2
  8. package/components/{br_confirm_done.vue → BrConfirmDone.vue} +3 -3
  9. package/components/{br_confirm_email.vue → BrConfirmEmail.vue} +3 -3
  10. package/components/{br_container.vue → BrContainer.vue} +30 -21
  11. package/components/{br_footer/lower.vue → BrFooterLower.vue} +0 -6
  12. package/components/{br_footer/upper.vue → BrFooterUpper.vue} +6 -7
  13. package/components/{br_form_block.vue → BrFormBlock.vue} +0 -8
  14. package/components/BrFormPassword.vue +67 -0
  15. package/components/{br_form_row.vue → BrFormRow.vue} +4 -4
  16. package/components/BrFormUpdate.vue +18 -0
  17. package/components/{br_loader.vue → BrLoader.vue} +1 -1
  18. package/components/{br_skiplink.vue → BrSkiplink.vue} +0 -1
  19. package/components/{br_wrap.vue → BrWrap.vue} +4 -4
  20. package/components/{event_summary.vue → EventSummary.vue} +34 -24
  21. package/components/{fluid_iframe.vue → FluidIframe.vue} +0 -1
  22. package/components/{see_inside.vue → SeeInside.vue} +48 -30
  23. package/components/{video_content.vue → VideoContent.vue} +18 -27
  24. package/icons/account/membership.vue +0 -6
  25. package/icons/account/orders.vue +0 -6
  26. package/icons/account/payment.vue +0 -6
  27. package/icons/account/personal.vue +0 -6
  28. package/icons/account/support.vue +0 -6
  29. package/icons/account/video.vue +0 -6
  30. package/icons/arrow_back.vue +9 -8
  31. package/icons/arrow_forward.vue +7 -8
  32. package/icons/back_arrow.vue +6 -7
  33. package/icons/city_of_london_lockup.vue +14 -9
  34. package/icons/information.vue +4 -8
  35. package/icons/password/hide.vue +0 -6
  36. package/icons/password/show.vue +0 -6
  37. package/icons/stream/live.vue +9 -8
  38. package/icons/wheelchair.vue +15 -9
  39. package/index.js +24 -38
  40. package/package.json +1 -1
  41. package/scss/_br-wrap.scss +3 -4
  42. package/scss/index.scss +0 -4
  43. package/components/br_anchor.vue +0 -35
  44. package/components/br_button/dot_typing.vue +0 -43
  45. package/components/br_form_password.vue +0 -69
  46. package/components/br_form_update.vue +0 -12
  47. /package/components/{br_button → BrButton}/components.js +0 -0
  48. /package/components/{br_card.vue → BrCard.vue} +0 -0
  49. /package/components/{br_card_sub_title.vue → BrCardSubTitle.vue} +0 -0
  50. /package/components/{br_card_text.vue → BrCardText.vue} +0 -0
  51. /package/components/{br_card_title.vue → BrCardTitle.vue} +0 -0
package/README.md CHANGED
@@ -47,32 +47,32 @@ The component library is currently **only available to Vue.js** apps.
47
47
 
48
48
  You can reference any of the following components:
49
49
 
50
- | Component | Filename | SCSS Class | SCSS Mixin | Previously |
51
- | -------------------- | -------------------- | -------------------- | ---------------- | ------------- |
52
- | `<br-alert>` | br_alert.vue | .br-alert | br-alert--setup | - |
53
- | `<br-anchor>` | br_anchor.vue | .btn | setup-button | - |
54
- | `<br-button>` | br_button.vue | .br-checkbox | br-checkbox | - |
55
- | `<br-confirm-done>` | br_confirm_done.vue | - | - | - |
56
- | `<br-confirm-email>` | br_confirm_email.vue | - | - | - |
57
- | `<br-container>` | br_container.vue | .br-container--outer | - | - |
58
- | `<br-footer-lower>` | br_footer_lower.vue | .br-footer-lower | br-footer-lower | - |
59
- | `<br-footer-upper>` | br_footer_upper.vue | .br-footer-upper | br-footer-upper | - |
60
- | `<br-form-block>` | br_form_block.vue | - | - | - |
61
- | `<br-form-password>` | br_form_password.vue | .br-form-password | br-form-password | - |
62
- | `<br-form-row>` | br_form_row.vue | .br-form-row | br-form-row | - |
63
- | `<br-form-update>` | br_form_update.vue | .br-form-update | br-form-update | - |
64
- | `<br-loader>` | br_loader.vue | .br-loader | - | - |
65
- | `<br-skiplink>` | br_skiplink.vue | - | - | `<skip-link>` |
66
- | `<br-wrap>` | br_wrap.vue | .br-wrap | - | - |
50
+ | Component | Filename | SCSS Class | SCSS Mixin | Previously |
51
+ | -------------------- | ------------------- | -------------------- | ---------------- | ------------- |
52
+ | `<br-alert>` | BrAlert.vue | .br-alert | br-alert--setup | - |
53
+ | `<br-anchor>` | BrAnchor.vue | .btn | setup-button | - |
54
+ | `<br-button>` | BrButton.vue | .br-checkbox | br-checkbox | - |
55
+ | `<br-confirm-done>` | BrConfirmDone.vue | - | - | - |
56
+ | `<br-confirm-email>` | BrConfirmEmail.vue | - | - | - |
57
+ | `<br-container>` | BrContainer.vue | .br-container--outer | - | - |
58
+ | `<br-footer-lower>` | br_footer_lower.vue | .br-footer-lower | br-footer-lower | - |
59
+ | `<br-footer-upper>` | br_footer_upper.vue | .br-footer-upper | br-footer-upper | - |
60
+ | `<br-form-block>` | BrFormBlock.vue | - | - | - |
61
+ | `<br-form-password>` | BrFormPassword.vue | .br-form-password | br-form-password | - |
62
+ | `<br-form-row>` | BrFormRow.vue | .br-form-row | br-form-row | - |
63
+ | `<br-form-update>` | BrFormUpdate.vue | .br-form-update | br-form-update | - |
64
+ | `<br-loader>` | BrLoader.vue | .br-loader | - | - |
65
+ | `<br-skiplink>` | BrSkiplink.vue | - | - | `<skip-link>` |
66
+ | `<br-wrap>` | BrWrap.vue | .br-wrap | - | - |
67
67
 
68
68
  The following component titles are deprecated. You can still use them, but they will migrate to the BR naming convention in future.
69
69
 
70
70
  | Component | Filename | SCSS Class | SCSS Mixin |
71
71
  | ----------------- | ----------------- | ---------- | ---------- |
72
- | `<account-title>` | account_title.vue | - | - |
72
+ | `<account-title>` | AccountTitle.vue | - | - |
73
73
  | `<card-display>` | card_display.vue | - | - |
74
- | `<event-summary>` | event_summary.vue | - | - |
75
- | `<fluid-iframe>` | fluid_iframe.vue | - | - |
74
+ | `<event-summary>` | EventSummary.vue | - | - |
75
+ | `<fluid-iframe>` | FluidIframe.vue | - | - |
76
76
  | `<help-row>` | help_row.vue | - | - |
77
77
  | `<placeholder>` | placeholder.vue | - | - |
78
78
  | `<payment-logo>` | payment_logo.vue | - | - |
@@ -80,7 +80,7 @@ The following component titles are deprecated. You can still use them, but they
80
80
  | `<related-title>` | related_title.vue | - | - |
81
81
  | `<related-row>` | related_row.vue | - | - |
82
82
  | `<type-text>` | type_text.vue | - | - |
83
- | `<video-content>` | video_content.vue | - | - |
83
+ | `<video-content>` | VideoContent.vue | - | - |
84
84
 
85
85
  ```
86
86
  The BR naming convention imitates the Bootstrap example. This format is useful for two reasons:
@@ -5,24 +5,22 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
- export default {
9
- name: 'AccountTitle',
8
+ export default {
10
9
  props: {
11
10
  placeholder: {
12
11
  type: Boolean,
13
12
  default: false,
14
- }
13
+ },
15
14
  },
16
15
  computed: {
17
16
  styleTitle() {
18
17
  return this.placeholder ? this.$style.placeholder : this.$style.title;
19
- }
20
- }
21
- }
18
+ },
19
+ },
20
+ };
22
21
  </script>
23
22
 
24
23
  <style lang="scss" module>
25
-
26
24
  @mixin title {
27
25
  margin-bottom: 1.25rem;
28
26
 
@@ -40,5 +38,4 @@ export default {
40
38
  @include placeholder;
41
39
  width: 30%;
42
40
  }
43
-
44
- </style>
41
+ </style>
@@ -19,10 +19,9 @@
19
19
 
20
20
  <script>
21
21
  import { CloseIcon } from "barbican-reset/icons/stream";
22
- import BrButton from "./br_button";
22
+ import BrButton from "./BrButton";
23
23
 
24
24
  export default {
25
- name: "BrAlert",
26
25
  components: {
27
26
  BrButton,
28
27
  CloseIcon,
@@ -0,0 +1,34 @@
1
+ <template>
2
+ <a
3
+ v-on:click="loading = true"
4
+ :href="href"
5
+ :class="variant ? `btn btn-${variant}` : ``"
6
+ >
7
+ <slot v-if="!loading" />
8
+
9
+ <dot-typing v-else />
10
+ </a>
11
+ </template>
12
+
13
+ <script>
14
+ import { DotTyping } from "./BrButton/components";
15
+
16
+ export default {
17
+ data() {
18
+ return {
19
+ loading: false,
20
+ };
21
+ },
22
+ props: {
23
+ variant: {
24
+ type: String,
25
+ },
26
+ href: {
27
+ type: String,
28
+ },
29
+ },
30
+ components: {
31
+ DotTyping,
32
+ },
33
+ };
34
+ </script>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <!-- https://codepen.io/nzbin/pen/GGrXbp -->
3
+
4
+ <div>
5
+ <svg
6
+ ref="a"
7
+ version="1.1"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ width="14"
10
+ height="14"
11
+ viewBox="0 0 14 14"
12
+ >
13
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z" />
14
+ </svg>
15
+
16
+ <svg
17
+ ref="b"
18
+ version="1.1"
19
+ xmlns="http://www.w3.org/2000/svg"
20
+ width="14"
21
+ height="14"
22
+ viewBox="0 0 14 14"
23
+ >
24
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z" />
25
+ </svg>
26
+
27
+ <svg
28
+ ref="c"
29
+ version="1.1"
30
+ xmlns="http://www.w3.org/2000/svg"
31
+ width="14"
32
+ height="14"
33
+ viewBox="0 0 14 14"
34
+ >
35
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z" />
36
+ </svg>
37
+ </div>
38
+ </template>
39
+
40
+ <script>
41
+ import { gsap } from "gsap";
42
+ export default {
43
+ mounted() {
44
+ const tl = gsap.timeline({ repeat: 9 });
45
+ const a = this.$refs.a;
46
+ const b = this.$refs.b;
47
+ const c = this.$refs.c;
48
+ const dots = [a, b, c];
49
+ const speed = 0.3;
50
+
51
+ tl.to(dots, {
52
+ stagger: speed,
53
+ keyframes: [
54
+ { y: -8, duration: speed },
55
+ { y: 0, duration: speed },
56
+ ],
57
+ });
58
+ },
59
+ };
60
+ </script>
@@ -1,31 +1,24 @@
1
1
  <template>
2
2
  <div>
3
-
4
3
  <template v-if="state === 'default'">
5
4
  <template v-if="$slots.default">
6
5
  <slot name="default" />
7
6
  </template>
8
- <template v-else>
9
- remove
10
- </template>
7
+ <template v-else> remove </template>
11
8
  </template>
12
9
 
13
10
  <template v-else-if="state === 'loading'">
14
11
  <template v-if="$slots.loading">
15
12
  <slot name="loading" />
16
13
  </template>
17
- <template v-else>
18
- removing&nbsp;...
19
- </template>
14
+ <template v-else> removing&nbsp;... </template>
20
15
  </template>
21
16
 
22
17
  <template v-else-if="state === 'loaded'">
23
18
  <template v-if="$slots.loaded">
24
19
  <slot name="loaded" />
25
20
  </template>
26
- <template v-else>
27
- removed!
28
- </template>
21
+ <template v-else> removed! </template>
29
22
  </template>
30
23
 
31
24
  <template v-else-if="state === 'error'">
@@ -36,22 +29,18 @@
36
29
  {{ state.toUpperCase() }}
37
30
  </template>
38
31
  </template>
39
-
40
- </div>
32
+ </div>
41
33
  </template>
42
34
 
43
35
  <script>
44
36
  export default {
45
- name: 'RemoveTicket',
46
37
  props: {
47
38
  state: {
48
39
  type: String,
49
- default: "default"
50
- }
40
+ default: "default",
41
+ },
51
42
  },
52
- }
43
+ };
53
44
  </script>
54
45
 
55
- <style>
56
-
57
- </style>
46
+ <style></style>
@@ -2,10 +2,10 @@
2
2
  <!-- https://dockyard.com/blog/2020/03/02/accessible-loading-indicatorswith-no-extra-elements -->
3
3
 
4
4
  <button
5
+ :class="printClassNames"
5
6
  @click="$emit('click')"
6
7
  :aria-busy="loading"
7
8
  aria-live="polite"
8
- :variant="variant"
9
9
  :type="type"
10
10
  >
11
11
  <remove-ticket v-if="variant === 'remove-ticket'" :state="state">
@@ -53,7 +53,7 @@
53
53
  </template>
54
54
 
55
55
  <script>
56
- import { RemoveTicket, DotTyping } from "./br_button/components";
56
+ import { RemoveTicket, DotTyping } from "./BrButton/components";
57
57
 
58
58
  export default {
59
59
  props: {
@@ -63,6 +63,7 @@ export default {
63
63
  },
64
64
  variant: {
65
65
  type: String,
66
+ default: "secondary",
66
67
  },
67
68
  type: {
68
69
  type: String,
@@ -82,6 +83,9 @@ export default {
82
83
  loading() {
83
84
  return this.state === "loading" ? "true" : "false";
84
85
  },
86
+ printClassNames() {
87
+ return "btn btn-" + this.variant;
88
+ },
85
89
  },
86
90
  components: {
87
91
  RemoveTicket,
@@ -9,9 +9,9 @@
9
9
  </template>
10
10
 
11
11
  <script>
12
- import BrCard from "./br_card";
13
- import BrCardTitle from "./br_card_title";
14
- import BrCardText from "./br_card_text";
12
+ import BrCard from "./BrCard";
13
+ import BrCardTitle from "./BrCardTitle";
14
+ import BrCardText from "./BrCardText";
15
15
 
16
16
  import Animations from "barbican-reset/animations";
17
17
  import { DoneIcon } from "barbican-reset/icons/confirm";
@@ -11,9 +11,9 @@
11
11
  </template>
12
12
 
13
13
  <script>
14
- import BrCard from "./br_card";
15
- import BrCardTitle from "./br_card_title";
16
- import BrCardText from "./br_card_text";
14
+ import BrCard from "./BrCard";
15
+ import BrCardTitle from "./BrCardTitle";
16
+ import BrCardText from "./BrCardText";
17
17
 
18
18
  import Animations from "barbican-reset/animations";
19
19
  import { EmailIcon } from "barbican-reset/icons/confirm";
@@ -8,52 +8,62 @@
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'BrContainer',
12
11
  props: {
13
12
  splash: {
14
13
  type: Boolean,
15
- default: false
14
+ default: false,
16
15
  },
17
16
  masthead: {
18
17
  type: Boolean,
19
- default: false
18
+ default: false,
20
19
  },
21
20
  thin: {
22
21
  type: Boolean,
23
- default: false
22
+ default: false,
24
23
  },
25
24
  header: {
26
25
  type: Boolean,
27
- default: false
26
+ default: false,
28
27
  },
29
28
  footer: {
30
29
  type: Boolean,
31
- default: false
32
- }
30
+ default: false,
31
+ },
33
32
  },
34
33
  computed: {
35
34
  styleOuter() {
36
35
  const style = this.$style;
37
36
  let output = [style.outer];
38
- if (this.masthead) { output.push(style.masthead); }
39
- if (this.splash) { output.push(style.splash); }
37
+ if (this.masthead) {
38
+ output.push(style.masthead);
39
+ }
40
+ if (this.splash) {
41
+ output.push(style.splash);
42
+ }
40
43
  return output;
41
44
  },
42
45
  styleInner() {
43
46
  const style = this.$style;
44
47
  let output = [style.inner];
45
- if (this.masthead) { output.push(style.masthead); }
46
- if (this.thin) { output.push(style.thin); }
47
- if (this.header) { output.push(style.header); }
48
- if (this.footer) { output.push(style.footer); }
48
+ if (this.masthead) {
49
+ output.push(style.masthead);
50
+ }
51
+ if (this.thin) {
52
+ output.push(style.thin);
53
+ }
54
+ if (this.header) {
55
+ output.push(style.header);
56
+ }
57
+ if (this.footer) {
58
+ output.push(style.footer);
59
+ }
49
60
  return output;
50
- }
51
- }
52
- }
61
+ },
62
+ },
63
+ };
53
64
  </script>
54
65
 
55
66
  <style lang="scss" module>
56
-
57
67
  .outer {
58
68
  padding-right: 5%;
59
69
  padding-left: 5%;
@@ -87,9 +97,9 @@ export default {
87
97
  padding-bottom: 1.875rem;
88
98
  padding-top: 1.875rem;
89
99
  }
90
-
100
+
91
101
  &.thin {
92
- max-width: $layout-width-sm;
102
+ max-width: $layout-width-sm;
93
103
  }
94
104
 
95
105
  &.masthead {
@@ -103,5 +113,4 @@ export default {
103
113
  }
104
114
  }
105
115
  }
106
-
107
- </style>
116
+ </style>
@@ -3,9 +3,3 @@
3
3
  <slot />
4
4
  </div>
5
5
  </template>
6
-
7
- <script>
8
- export default {
9
- name: 'BrFooterLower'
10
- }
11
- </script>
@@ -5,13 +5,12 @@
5
5
  </template>
6
6
 
7
7
  <script>
8
- export default {
9
- name: 'BrFooterUpper',
8
+ export default {
10
9
  props: {
11
10
  splash: {
12
11
  type: Boolean,
13
- default: false
14
- }
15
- }
16
- }
17
- </script>
12
+ default: false,
13
+ },
14
+ },
15
+ };
16
+ </script>
@@ -4,14 +4,7 @@
4
4
  </div>
5
5
  </template>
6
6
 
7
- <script type="text/javascript">
8
- export default {
9
- name: 'BrFormBlock',
10
- }
11
- </script>
12
-
13
7
  <style lang="scss" module>
14
-
15
8
  .container {
16
9
  @include fontfamily-black;
17
10
  padding: 0.875rem 0.75rem 0.625rem 0.75rem;
@@ -19,5 +12,4 @@
19
12
  background: $c-grey-l96;
20
13
  margin-bottom: 1rem;
21
14
  }
22
-
23
15
  </style>
@@ -0,0 +1,67 @@
1
+ <template>
2
+ <div class="br-form-password">
3
+ <input
4
+ :autocomplete="autocomplete"
5
+ @input="inputChange"
6
+ :value="password"
7
+ name="password"
8
+ :type="type"
9
+ required
10
+ :id="id"
11
+ />
12
+ <br-button
13
+ @click="showPassword = !showPassword"
14
+ data-test="show-password"
15
+ class="padding-0"
16
+ >
17
+ <span class="sr-only">
18
+ {{ showPassword ? "Hide" : "Show" }} password
19
+ </span>
20
+ <show-password-icon v-if="showPassword" />
21
+ <hide-password-icon v-else />
22
+ </br-button>
23
+ </div>
24
+ </template>
25
+
26
+ <script>
27
+ import BrButton from "./BrButton";
28
+ import HidePasswordIcon from "../icons/password/hide";
29
+ import ShowPasswordIcon from "../icons/password/show";
30
+
31
+ export default {
32
+ data() {
33
+ return {
34
+ password: "",
35
+ showPassword: false,
36
+ };
37
+ },
38
+ components: {
39
+ HidePasswordIcon,
40
+ ShowPasswordIcon,
41
+ BrButton,
42
+ },
43
+ props: {
44
+ id: {
45
+ type: String,
46
+ default: "password",
47
+ },
48
+ },
49
+ methods: {
50
+ inputChange({ target }) {
51
+ let { value } = target;
52
+
53
+ this.password = value;
54
+
55
+ this.$emit("change", value);
56
+ },
57
+ },
58
+ computed: {
59
+ type() {
60
+ return this.showPassword ? "text" : "password";
61
+ },
62
+ autocomplete() {
63
+ return this.showPassword ? "off" : "current-password";
64
+ },
65
+ },
66
+ };
67
+ </script>
@@ -6,16 +6,16 @@
6
6
  ><span v-if="label && optional">(optional)</span>
7
7
  </label>
8
8
  <div :class="[`content`, { editable }, { label }, { submit }, { radios }]">
9
- <b-button v-if="editable" variant="input-edit" @click="$emit('edit')">
9
+ <br-button v-if="editable" variant="input-edit" @click="$emit('edit')">
10
10
  <edit-icon />
11
- </b-button>
11
+ </br-button>
12
12
  <slot />
13
13
  </div>
14
14
  </div>
15
15
  </template>
16
16
 
17
- <script type="text/javascript">
18
- import BrButton from "./br_button";
17
+ <script>
18
+ import BrButton from "./BrButton";
19
19
  import { EditIcon } from "../icons/account";
20
20
 
21
21
  export default {
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <div class="br-form-update">
3
+ <div class="br-form-update--input" data-test="email"><slot /></div>
4
+ <br-button @click.prevent="$emit('update')" data-test="update">
5
+ update
6
+ </br-button>
7
+ </div>
8
+ </template>
9
+
10
+ <script>
11
+ import BrButton from "./BrButton";
12
+
13
+ export default {
14
+ components: {
15
+ BrButton,
16
+ },
17
+ };
18
+ </script>
@@ -12,7 +12,7 @@
12
12
  </template>
13
13
 
14
14
  <script>
15
- import BrCard from "./br_card";
15
+ import BrCard from "./BrCard";
16
16
 
17
17
  export default {
18
18
  components: {
@@ -6,7 +6,6 @@
6
6
 
7
7
  <script>
8
8
  export default {
9
- name: "BrSkiplink",
10
9
  props: {
11
10
  href: {
12
11
  type: String,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="['br_wrap',{ title },{ videos },{ thin }]">
2
+ <div :class="['br-wrap', { title }, { videos }, { thin }]">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
@@ -18,7 +18,7 @@ export default {
18
18
  videos: {
19
19
  type: Boolean,
20
20
  default: false,
21
- }
21
+ },
22
22
  },
23
- }
24
- </script>
23
+ };
24
+ </script>