barbican-reset 3.21.0 → 3.23.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 (38) hide show
  1. package/components/BrButton copy.vue +112 -0
  2. package/components/BrButton.vue +103 -84
  3. package/components/BrCard.vue +39 -38
  4. package/components/BrCardTearoff.vue +11 -0
  5. package/components/BrDetails.vue +4 -20
  6. package/components/BrLink.vue +22 -0
  7. package/components/BrWrap.vue +14 -2
  8. package/icons/back_arrow.vue +9 -1
  9. package/index.js +2 -0
  10. package/package.json +1 -1
  11. package/scripts/helpers/formatKebabCase.js +1 -1
  12. package/scss/_atomic.scss +16 -1
  13. package/scss/_br-button.scss +26 -2
  14. package/scss/{card/index.scss → _br-card.scss} +13 -11
  15. package/scss/_br-wrap.scss +9 -0
  16. package/scss/_variables.scss +6 -6
  17. package/scss/atomic/_max-widths.scss +29 -0
  18. package/scss/index.scss +1 -2
  19. package/scss/mixins/_br-card.scss +26 -1
  20. package/scss/mixins/_br-form-row.scss +1 -1
  21. package/scss/mixins/_buttons.scss +1 -0
  22. package/scss/mixins/_core.scss +1 -1
  23. package/scss/mixins/buttons/_custom.scss +13 -16
  24. package/scss/mixins/buttons/_setup.scss +10 -48
  25. package/scss/mixins/buttons/_slim.scss +3 -0
  26. package/scss/mixins/buttons/custom/_add-to-wallet.scss +12 -0
  27. package/scss/mixins/buttons/custom/_invisible.scss +10 -0
  28. package/scss/mixins/buttons/custom/_manage-order.scss +11 -0
  29. package/scss/mixins/buttons/custom/_navcard.scss +32 -0
  30. package/scss/mixins/buttons/custom/_outline-alert-neutral.scss +10 -0
  31. package/scss/mixins/buttons/custom/_renew-membership.scss +4 -5
  32. package/scss/mixins/buttons/custom/_summary.scss +19 -0
  33. package/scss/mixins/card/_inline.scss +0 -1
  34. package/scss/{card → mixins/card}/_membership.scss +31 -21
  35. package/scss/mixins/card/_navitem.scss +10 -2
  36. package/scss/mixins/card/_qrcode.scss +21 -0
  37. package/scss/_card-deck.scss +0 -26
  38. package/scss/mixins/buttons/custom/_see-tickets-info.scss +0 -18
@@ -0,0 +1,112 @@
1
+ <template>
2
+ <component
3
+ :class="generateComponentClasses"
4
+ :aria-busy="defineAriaBusy"
5
+ :aria-live="defineAriaLive"
6
+ @click="emit('click')"
7
+ :is="defineComponent"
8
+ :type="type"
9
+ :href="href"
10
+ :to="to">
11
+ <template v-if="state == 'default'">
12
+ <slot name="default">default</slot>
13
+ </template>
14
+ <template v-else-if="state == 'loading'">
15
+ <template v-if="$slots.loading">
16
+ <slot name="loading">loading</slot>
17
+ </template>
18
+ <dot-typing v-else />
19
+ </template>
20
+ <template v-else-if="state == 'loaded'">
21
+ <slot name="loaded">loaded</slot>
22
+ </template>
23
+ <template v-else-if="state == 'error'">
24
+ <slot name="error">error</slot>
25
+ </template>
26
+ </component>
27
+ </template>
28
+
29
+ <script setup>
30
+ import { computed } from 'vue'
31
+ import DotTyping from '#components/BrButton/dot_typing.vue'
32
+
33
+ const emit = defineEmits(['click'])
34
+
35
+ const props = defineProps({
36
+ state: {
37
+ type: String,
38
+ default: 'default',
39
+ },
40
+ variant: {
41
+ type: String,
42
+ default: 'secondary',
43
+ },
44
+ type: {
45
+ type: [String, null],
46
+ },
47
+ to: {
48
+ type: [Object, null],
49
+ },
50
+ href: {
51
+ type: [String, null],
52
+ },
53
+ inline: {
54
+ type: Boolean,
55
+ default: false,
56
+ },
57
+ slim: {
58
+ type: Boolean,
59
+ default: false,
60
+ },
61
+ active: {
62
+ type: Boolean,
63
+ default: false,
64
+ },
65
+ })
66
+
67
+ const generateComponentClasses = computed(() => {
68
+ let classnames = ['btn', 'btn-' + props.variant]
69
+
70
+ if (props.inline) {
71
+ classnames.push('btn-inline')
72
+ }
73
+
74
+ if (props.slim) {
75
+ classnames.push('btn-slim')
76
+ }
77
+
78
+ if (props.active) {
79
+ classnames.push('btn-active')
80
+ }
81
+
82
+ return classnames
83
+ })
84
+
85
+ const defineComponent = computed(() => {
86
+ if (props.href) {
87
+ return 'a'
88
+ }
89
+
90
+ if (props.to) {
91
+ return 'router-link'
92
+ }
93
+
94
+ return 'button'
95
+ })
96
+
97
+ const defineAriaBusy = computed(() => {
98
+ if (props.to || props.href) {
99
+ return
100
+ }
101
+
102
+ return props.state == 'loading' ? 'true' : 'false'
103
+ })
104
+
105
+ const defineAriaLive = computed(() => {
106
+ if (props.to || props.href) {
107
+ return
108
+ }
109
+
110
+ return 'polite'
111
+ })
112
+ </script>
@@ -1,96 +1,115 @@
1
- <!-- https://dockyard.com/blog/2020/03/02/accessible-loading-indicatorswith-no-extra-elements -->
2
-
3
1
  <template>
4
- <button
5
- :class="printClassNames"
6
- @click="$emit('click')"
7
- :aria-busy="loading"
8
- aria-live="polite"
9
- :type="type">
10
- <remove-ticket v-if="variant === 'remove-ticket'" :state="state">
11
- <template v-for="(index, name) in $slots" v-slot:[name]>
12
- <slot :name="name" />
2
+ <component
3
+ :class="generateClassnames"
4
+ :aria-busy="defineAriaBusy"
5
+ :aria-live="defineAriaLive"
6
+ @click="emit('click')"
7
+ :is="defineComponent"
8
+ :type="type"
9
+ :to="to"
10
+ ref="button"
11
+ >
12
+ <template v-if="state == 'default'">
13
+ <slot name="default">default</slot>
14
+ </template>
15
+ <template v-else-if="state == 'loading'">
16
+ <template v-if="$slots.loading">
17
+ <slot name="loading">loading</slot>
13
18
  </template>
14
- </remove-ticket>
19
+ <dot-typing v-else />
20
+ </template>
21
+ <template v-else-if="state == 'loaded'">
22
+ <slot name="loaded">loaded</slot>
23
+ </template>
24
+ <template v-else-if="state == 'error'">
25
+ <slot name="error">error</slot>
26
+ </template>
27
+ </component>
28
+ </template>
15
29
 
16
- <template v-else>
17
- <template v-if="state === 'default'">
18
- <template v-if="$slots.default">
19
- <slot name="default" />
20
- </template>
21
- <template v-else>
22
- {{ titleCase(state) }}
23
- </template>
24
- </template>
30
+ <script setup>
31
+ import { computed, useTemplateRef } from 'vue'
32
+ import DotTyping from '#components/BrButton/dot_typing.vue'
33
+ import BrLink from '#components/BrLink.vue'
25
34
 
26
- <template v-else-if="state === 'loading'">
27
- <template v-if="$slots.loading">
28
- <slot name="loading" />
29
- </template>
30
- <dot-typing v-else />
31
- </template>
35
+ const emit = defineEmits(['click'])
32
36
 
33
- <template v-else-if="state === 'loaded'">
34
- <template v-if="$slots.loaded">
35
- <slot name="loaded" />
36
- </template>
37
- <template v-else>
38
- {{ titleCase(state) }}
39
- </template>
40
- </template>
37
+ const button = useTemplateRef('button')
41
38
 
42
- <template v-else-if="state === 'error'">
43
- <template v-if="$slots.error">
44
- <slot name="error" />
45
- </template>
46
- <template v-else>
47
- {{ titleCase(state) }}
48
- </template>
49
- </template>
50
- </template>
51
- </button>
52
- </template>
39
+ const defineComponent = computed(() => {
40
+ if (props.to && !props.disabled) return BrLink
41
+ return 'button'
42
+ })
53
43
 
54
- <script>
55
- import RemoveTicket from '#components/BrButton/remove_ticket.vue'
56
- import DotTyping from '#components/BrButton/dot_typing.vue'
44
+ const generateClassnames = computed(() => {
45
+ let classnames = ['btn', 'btn-' + props.variant]
46
+
47
+ if (props.inline) {
48
+ classnames.push('btn-inline')
49
+ }
57
50
 
58
- export default {
59
- emits: ['click'],
60
- props: {
61
- state: {
62
- type: String,
63
- default: 'default',
64
- },
65
- variant: {
66
- type: String,
67
- default: 'secondary',
68
- },
69
- type: {
70
- type: String,
71
- default: 'button',
72
- },
51
+ if (props.slim) {
52
+ classnames.push('btn-slim')
53
+ }
54
+
55
+ if (props.active) {
56
+ classnames.push('btn-active')
57
+ }
58
+
59
+ return classnames
60
+ })
61
+
62
+ const defineAriaBusy = computed(() => {
63
+ if (props.to) return
64
+ return props.state == 'loading' ? 'true' : 'false'
65
+ })
66
+
67
+ const defineAriaLive = computed(() => {
68
+ if (props.to) return
69
+ return 'polite'
70
+ })
71
+
72
+ const focusButton = () => {
73
+ if (defineComponent.value == 'button' && button) {
74
+ button.value.focus();
75
+ }
76
+ }
77
+
78
+ const props = defineProps({
79
+ state: {
80
+ type: String,
81
+ default: 'default',
73
82
  },
74
- methods: {
75
- titleCase(str) {
76
- return str
77
- .toLowerCase()
78
- .split(' ')
79
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
80
- .join(' ')
81
- },
83
+ variant: {
84
+ type: String,
85
+ default: 'secondary',
82
86
  },
83
- computed: {
84
- loading() {
85
- return this.state === 'loading' ? 'true' : 'false'
86
- },
87
- printClassNames() {
88
- return 'btn btn-' + this.variant
89
- },
87
+ type: {
88
+ type: String,
90
89
  },
91
- components: {
92
- RemoveTicket,
93
- DotTyping,
90
+ to: {
91
+ type: [Object, String],
94
92
  },
95
- }
96
- </script>
93
+ disabled: {
94
+ type: Boolean,
95
+ default: false,
96
+ },
97
+ inline: {
98
+ type: Boolean,
99
+ default: false,
100
+ },
101
+ slim: {
102
+ type: Boolean,
103
+ default: false,
104
+ },
105
+ active: {
106
+ type: Boolean,
107
+ default: false,
108
+ },
109
+ })
110
+
111
+ defineExpose({
112
+ focusButton
113
+ })
114
+
115
+ </script>
@@ -1,9 +1,5 @@
1
1
  <template>
2
- <component
3
- :class="generateClassnames"
4
- :is="defineComponent"
5
- :to="defineTo"
6
- :href="defineHref">
2
+ <component :class="generateClassnames" :is="defineComponent" :to="defineTo">
7
3
  <div v-if="$slots.header" class="br-card-header">
8
4
  <slot name="header" />
9
5
  </div>
@@ -19,24 +15,46 @@
19
15
  </template>
20
16
 
21
17
  <script setup>
22
- import BrCardBody from '#components/BrCardBody.vue'
23
18
  import { computed } from 'vue'
19
+ import BrCardBody from '#components/BrCardBody.vue'
20
+ import BrLink from '#components/BrLink.vue'
21
+
22
+ const defineComponent = computed(() => {
23
+ if (props.to && !props.disabled) return BrLink
24
+ return 'div'
25
+ })
26
+
27
+ const defineTo = computed(() => {
28
+ if (props.disabled) return
29
+ return props.to
30
+ })
24
31
 
25
32
  const generateClassnames = computed(() => {
26
33
  let classnames = ['br-card']
27
34
 
28
35
  if (props.inline) classnames.push('inline')
29
36
  if (props.navcard) classnames.push('navcard')
30
- if (props.navitem) classnames.push('navitem')
31
37
  if (props.navlink) classnames.push('navlink')
32
38
  if (props.ticket) classnames.push('ticket')
39
+ if (props.membership) classnames.push('membership')
40
+ if (props.qrcode) classnames.push('qrcode')
41
+
42
+ if (props.navitem) {
43
+ classnames.push('navitem')
44
+
45
+ if (props.disabled) {
46
+ classnames.push('disabled')
47
+ }
48
+ }
33
49
 
34
50
  if (
35
51
  !props.inline &&
36
52
  !props.navcard &&
37
53
  !props.navitem &&
38
54
  !props.navlink &&
39
- !props.ticket
55
+ !props.ticket &&
56
+ !props.membership &&
57
+ !props.qrcode
40
58
  ) {
41
59
  classnames.push('default')
42
60
  }
@@ -44,34 +62,6 @@ const generateClassnames = computed(() => {
44
62
  return classnames
45
63
  })
46
64
 
47
- const defineComponent = computed(() => {
48
- if (props.navcard || props.navitem || props.navlink) {
49
- return props.to.startsWith('http') ? 'a' : 'router-link'
50
- }
51
-
52
- return 'div'
53
- })
54
-
55
- const defineTo = computed(() => {
56
- if (props.navcard || props.navitem || props.navlink) {
57
- if (!props.to.startsWith('http')) {
58
- return { name: props.to }
59
- }
60
- }
61
-
62
- return null
63
- })
64
-
65
- const defineHref = computed(() => {
66
- if (props.navcard || props.navitem || props.navlink) {
67
- if (props.to.startsWith('http')) {
68
- return props.to
69
- }
70
- }
71
-
72
- return null
73
- })
74
-
75
65
  const props = defineProps({
76
66
  inline: {
77
67
  type: Boolean,
@@ -93,6 +83,14 @@ const props = defineProps({
93
83
  type: Boolean,
94
84
  default: false,
95
85
  },
86
+ membership: {
87
+ type: Boolean,
88
+ default: false,
89
+ },
90
+ qrcode: {
91
+ type: Boolean,
92
+ default: false,
93
+ },
96
94
  center: {
97
95
  type: Boolean,
98
96
  default: false,
@@ -102,8 +100,11 @@ const props = defineProps({
102
100
  default: false,
103
101
  },
104
102
  to: {
105
- type: String,
106
- default: '',
103
+ type: [Object, String],
104
+ },
105
+ disabled: {
106
+ type: Boolean,
107
+ default: false,
107
108
  },
108
109
  })
109
110
  </script>
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div class="br-card-tearoff">
3
+ <br-card-body>
4
+ <slot>Card tearoff</slot>
5
+ </br-card-body>
6
+ </div>
7
+ </template>
8
+
9
+ <script setup>
10
+ import BrCardBody from '#components/BrCardBody.vue'
11
+ </script>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="br-details">
3
- <br-button variant="br-summary" @click="update">
3
+ <br-button variant="summary" @click="update">
4
4
  <div class="br-summary-content">
5
5
  <slot name="title">
6
6
  <br-card-title>Title goes here</br-card-title>
@@ -26,30 +26,14 @@ const props = defineProps({
26
26
  },
27
27
  })
28
28
 
29
- const update = () => emit('update', !props.open)
29
+ const update = () => emit('update', { open: !props.open })
30
30
  </script>
31
31
 
32
32
  <style lang="scss" scoped>
33
33
  @use '#styles/helpers' as *;
34
34
 
35
- .btn-br-summary {
36
- @include btn-invisible;
37
-
38
- & {
39
- justify-content: space-between;
40
- align-items: center;
41
- color: inherit;
42
- width: 100%;
43
- }
44
- }
45
-
46
- .btn-br-summary {
47
- &:focus,
48
- &:hover {
49
- .br-summary-icon {
50
- outline-style: dashed;
51
- }
52
- }
35
+ .br-summary-content {
36
+ text-align: left;
53
37
  }
54
38
 
55
39
  .br-summary-icon {
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <a v-if="isExternal" :href="to">
3
+ <slot />
4
+ </a>
5
+ <router-link v-else :to="to">
6
+ <slot />
7
+ </router-link>
8
+ </template>
9
+
10
+ <script setup>
11
+ // https://vueschool.io/lessons/extending-router-link-for-external-urls
12
+
13
+ import { computed } from 'vue'
14
+
15
+ const isExternal = computed(() => typeof props.to == 'string')
16
+
17
+ const props = defineProps({
18
+ to: {
19
+ type: Object || String,
20
+ },
21
+ })
22
+ </script>
@@ -10,9 +10,17 @@ import { computed } from 'vue'
10
10
  const generateComponentClasses = computed(() => {
11
11
  let classnames = ['br-wrap']
12
12
 
13
- if (props.navcard) classnames.push('navcard')
13
+ if (props.navcard) {
14
+ classnames.push('navcard')
15
+ }
14
16
 
15
- if (!props.navcard) classnames.push('default')
17
+ if (props.cluster) {
18
+ classnames.push('cluster')
19
+ }
20
+
21
+ if (!props.navcard && !props.cluster) {
22
+ classnames.push('default')
23
+ }
16
24
 
17
25
  return classnames
18
26
  })
@@ -22,5 +30,9 @@ const props = defineProps({
22
30
  type: Boolean,
23
31
  default: false,
24
32
  },
33
+ cluster: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
25
37
  })
26
38
  </script>
@@ -1,3 +1,11 @@
1
1
  <template>
2
- <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16 16"><path d="M16,7H3.83L9.42,1.41l-1.42-1.41L0,8l8,8,1.41-1.41-5.58-5.59h12.17v-2Z" fill="currentColor" /></svg>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="16"
5
+ height="16"
6
+ viewBox="0 0 16 16">
7
+ <path
8
+ d="M16,7H3.83L9.42,1.41l-1.42-1.41L0,8l8,8,1.41-1.41-5.58-5.59h12.17v-2Z"
9
+ fill="currentColor" />
10
+ </svg>
3
11
  </template>
package/index.js CHANGED
@@ -7,6 +7,7 @@ import BrCardBody from '#components/BrCardBody.vue'
7
7
  import BrCardText from '#components/BrCardText.vue'
8
8
  import BrCardTitle from '#components/BrCardTitle.vue'
9
9
  import BrCardSubtitle from '#components/BrCardSubtitle.vue'
10
+ import BrCardTearoff from '#components/BrCardTearoff.vue'
10
11
 
11
12
  import BrCollapseButton from '#components/BrCollapse/Button.vue'
12
13
  import BrCollapseContent from '#components/BrCollapse/Content.vue'
@@ -54,6 +55,7 @@ export {
54
55
  BrCardSubtitle,
55
56
  BrCardText,
56
57
  BrCardTitle,
58
+ BrCardTearoff,
57
59
  BrCollapseButton,
58
60
  BrCollapseContent,
59
61
  BrConfirmDone,
package/package.json CHANGED
@@ -137,5 +137,5 @@
137
137
  "style:patterns": "cd patterns && gulp build:css",
138
138
  "build:patterns": "cd patterns && rm -rf html && pug views --out html"
139
139
  },
140
- "version": "3.21.0"
140
+ "version": "3.23.0"
141
141
  }
@@ -7,5 +7,5 @@
7
7
 
8
8
  export default function (value = '') {
9
9
  value = String(value)
10
- return value.toLowerCase().split(' ').join('-')
10
+ return value.replace("'", '').toLowerCase().split(' ').join('-')
11
11
  }
package/scss/_atomic.scss CHANGED
@@ -1,8 +1,10 @@
1
+ @use "mixins/breakpoints" as *;
1
2
  @use "mixins/core" as *;
2
3
  @use "atomic/colors";
3
4
  @use "atomic/font-sizes";
4
5
  @use "atomic/font-weights";
5
6
  @use "atomic/margins";
7
+ @use "atomic/max-widths";
6
8
  @use "atomic/min-heights";
7
9
  @use "atomic/min-widths";
8
10
  @use "atomic/paddings";
@@ -26,7 +28,20 @@
26
28
  width: 100%;
27
29
  }
28
30
 
29
- /// Class for visually hiding markup, while still allowing screen readers to parse the content
30
31
  .sr-only {
31
32
  @include sr-only;
33
+ }
34
+
35
+ .white-space-nowrap {
36
+ white-space: nowrap;
37
+ }
38
+
39
+ .vertical-align-middle {
40
+ vertical-align: middle;
41
+ }
42
+
43
+ .medium-down {
44
+ @include large-up {
45
+ display: none;
46
+ }
32
47
  }
@@ -1,6 +1,10 @@
1
1
  @use "mixins/focus" as *;
2
2
  @use "mixins/buttons" as *;
3
3
 
4
+ button.btn:active {
5
+ transform: var(--scale-click);
6
+ }
7
+
4
8
  /// Button component setup class.
5
9
  /// Used in combination with a button style class
6
10
  /// @group Buttons
@@ -213,8 +217,28 @@
213
217
  @include btn-toggle-password;
214
218
  }
215
219
 
216
- &.btn-see-tickets-info {
217
- @include btn-see-tickets-info;
220
+ &.btn-manage-order {
221
+ @include btn-manage-order;
222
+ }
223
+
224
+ &.btn-add-to-wallet {
225
+ @include btn-add-to-wallet;
226
+ }
227
+
228
+ &.btn-outline-alert-neutral {
229
+ @include btn-outline-alert-neutral;
230
+ }
231
+
232
+ &.btn-navcard {
233
+ @include btn-navcard;
234
+ }
235
+
236
+ &.btn-summary {
237
+ @include btn-summary;
238
+ }
239
+
240
+ &.btn-slim {
241
+ @include btn-slim;
218
242
  }
219
243
 
220
244
  // modifyers
@@ -1,14 +1,4 @@
1
- @use "../mixins/br-card" as *;
2
-
3
- @use "block";
4
- @use "confirm";
5
- @use "login";
6
- @use "membership";
7
- @use "membership-new";
8
- @use "password";
9
- @use "related";
10
- @use "slim";
11
- @use "video-help";
1
+ @use "mixins/br-card" as *;
12
2
 
13
3
  .br-card {
14
4
  @include br-card;
@@ -26,6 +16,10 @@
26
16
  @include br-card-subtitle;
27
17
  }
28
18
 
19
+ .br-card-subtitle+.br-card-subtitle {
20
+ margin-top: var(--margin-xs);
21
+ }
22
+
29
23
  .br-card-body {
30
24
  @include br-card-body;
31
25
  }
@@ -36,4 +30,12 @@
36
30
 
37
31
  .br-card-footer {
38
32
  @include br-card-footer;
33
+ }
34
+
35
+ .br-card-tearoff {
36
+ @include br-card-tearoff;
37
+ }
38
+
39
+ .br-card-text {
40
+ @include br-card-text;
39
41
  }
@@ -14,4 +14,13 @@
14
14
  grid-template-columns: repeat(2, 1fr);
15
15
  gap: var(--gap-lg);
16
16
  }
17
+ }
18
+
19
+ .br-wrap.cluster {
20
+ margin: var(--margin-wrap-xs);
21
+ }
22
+
23
+ .br-wrap.cluster>* {
24
+ margin: var(--margin-xs);
25
+ vertical-align: middle;
17
26
  }
@@ -140,7 +140,7 @@
140
140
  --font-size-h1: 2.25rem;
141
141
  --font-size-h2: 2rem;
142
142
  --font-size-h3: 1.75rem;
143
- --font-size-h4: 1.5rem;
143
+ --font-size-h4: 1.375rem;
144
144
  --font-size-h5: 1.25rem;
145
145
  --font-size-h6: 1rem;
146
146
  --font-size-sm: 0.875rem;
@@ -153,16 +153,16 @@
153
153
  --line-height-sm: 1.15;
154
154
  --line-height-md: 1.35;
155
155
  --line-height-button-menu: 2.375rem;
156
- --margin-xs: 0.25rem;
156
+ --margin-xs: 0.3125rem;
157
157
  --margin-sm: 0.5rem;
158
158
  --margin-md: 0.75rem;
159
159
  --margin-lg: 1rem;
160
160
  --margin-xl: 1.5rem;
161
161
  --margin-xxl: 2rem;
162
162
  --margin-xxxl: 2.5rem;
163
- --margin-wrap-sm: calc(var(--margin-xs) * -1);
164
- --margin-wrap-md: calc(var(--margin-sm) * -1);
165
- --margin-wrap-lg: calc(var(--margin-md) * -1);
163
+ --margin-wrap-xs: calc(var(--margin-xs) * -1);
164
+ --margin-wrap-sm: calc(var(--margin-sm) * -1);
165
+ --margin-wrap-md: calc(var(--margin-md) * -1);
166
166
  --min-height-button: 2.5rem;
167
167
  --min-height-iframe-sm: 27.5rem;
168
168
  --min-height-iframe-lg: 36.875rem;
@@ -189,7 +189,7 @@
189
189
  --width-layout-sm: 50rem;
190
190
  --width-layout-md: 60rem;
191
191
  --width-layout-lg: 75rem;
192
- --width-qr: 6.25rem;
192
+ --width-qrcode: 9.5rem;
193
193
  }
194
194
 
195
195
  /// @deprecated $br-input-border-color => var(--color-black-25-lighten);
@@ -0,0 +1,29 @@
1
+ $iterations: (
2
+ "0": 0,
3
+ "0-5": 0.5,
4
+ "1": 1,
5
+ "1-5": 1.5,
6
+ "2": 2,
7
+ "2-5": 2.5,
8
+ "3": 3,
9
+ "3-5": 3.5,
10
+ "4": 4,
11
+ "4-5": 4.5,
12
+ "5": 5,
13
+ "5-5": 5.5,
14
+ "6": 6,
15
+ "6-5": 6.5,
16
+ "7": 7,
17
+ "7-5": 7.5,
18
+ "8": 8,
19
+ "8-5": 8.5,
20
+ "9": 9,
21
+ "9-5": 9.5,
22
+ "10": 10,
23
+ );
24
+
25
+ @each $name, $value in $iterations {
26
+ .max-width-#{$name} {
27
+ max-width: #{$value}rem;
28
+ }
29
+ }
package/scss/index.scss CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  @use "br-alert";
5
5
  @use "br-button";
6
+ @use "br-card";
6
7
  @use "br-container";
7
8
  @use "br-footer";
8
9
  @use "br-form-checkbox";
@@ -22,8 +23,6 @@
22
23
  @use "br-table-header";
23
24
  @use "br-wrap";
24
25
 
25
- @use "card";
26
- @use "card-deck";
27
26
  @use "city-of-london";
28
27
  @use "close-icon";
29
28
  @use "form";
@@ -5,6 +5,8 @@
5
5
  @use "card/navlink" as *;
6
6
  @use "card/navitem" as *;
7
7
  @use "card/ticket" as *;
8
+ @use "card/membership" as *;
9
+ @use "card/qrcode" as *;
8
10
 
9
11
  @mixin br-card {
10
12
  border-color: var(--color-black-25-lighten);
@@ -38,6 +40,14 @@
38
40
  @include br-card--ticket;
39
41
  }
40
42
 
43
+ &.membership {
44
+ @include br-card--membership;
45
+ }
46
+
47
+ &.qrcode {
48
+ @include br-card--qrcode;
49
+ }
50
+
41
51
  iframe {
42
52
  min-height: var(--min-height-iframe-lg);
43
53
 
@@ -72,7 +82,11 @@
72
82
  }
73
83
 
74
84
  @mixin br-card-subtitle {
75
- font-size: var(--font-size-h6);
85
+ font-size: var(--font-size-h5);
86
+
87
+ @include medium-up {
88
+ font-size: var(--font-size-h4);
89
+ }
76
90
  }
77
91
 
78
92
  @mixin br-card-body {
@@ -110,4 +124,15 @@
110
124
  .br-card-body {
111
125
  @include br-card-body;
112
126
  }
127
+ }
128
+
129
+ @mixin br-card-tearoff {
130
+ border-top-color: var(--color-black-25-lighten);
131
+ border-top-width: var(--border-width-sm);
132
+ border-top-style: dashed;
133
+ }
134
+
135
+ @mixin br-card-text {
136
+ text-overflow: ellipsis;
137
+ overflow: hidden;
113
138
  }
@@ -35,7 +35,7 @@
35
35
  }
36
36
 
37
37
  .content.radios {
38
- margin: var(--margin-wrap-sm);
38
+ margin: var(--margin-wrap-xs);
39
39
  }
40
40
 
41
41
  .content>fieldset {
@@ -1,5 +1,6 @@
1
1
  @forward "buttons/setup";
2
2
  @forward "buttons/outline";
3
3
  @forward "buttons/solid";
4
+ @forward "buttons/slim";
4
5
  @forward "buttons/custom";
5
6
  @forward "buttons/spektrix";
@@ -8,7 +8,7 @@
8
8
  @include inline-block;
9
9
 
10
10
  & {
11
- margin-right: var(--margin-wrap-sm);
11
+ margin-right: var(--margin-wrap-xs);
12
12
  height: 100%;
13
13
  content: "";
14
14
  }
@@ -1,22 +1,30 @@
1
1
  @use "../../mixins/focus" as *;
2
2
  @use "../../mixins/core" as *;
3
3
  @use "../../mixins/breakpoints" as *;
4
- @use "../../mixins/buttons/solid" as *;
5
- @use "../../mixins/buttons/outline" as *;
6
- @use "../../mixins/buttons/setup" as *;
7
4
  @use "../../functions" as *;
5
+
6
+ @use "outline" as *;
7
+ @use "setup" as *;
8
+ @use "slim" as *;
9
+ @use "solid" as *;
10
+
8
11
  @use "custom/outline-primary" as *;
9
12
  @use "custom/outline-secondary" as *;
10
13
  @use "custom/primary" as *;
11
14
  @use "custom/secondary" as *;
12
15
 
16
+ @forward "custom/add-to-wallet";
13
17
  @forward "custom/exit-overlay";
18
+ @forward "custom/invisible";
19
+ @forward "custom/manage-order";
20
+ @forward "custom/navcard";
21
+ @forward "custom/outline-alert-neutral";
14
22
  @forward "custom/outline-primary";
15
23
  @forward "custom/outline-secondary";
16
24
  @forward "custom/primary";
17
25
  @forward "custom/renew-membership";
18
26
  @forward "custom/secondary";
19
- @forward "custom/see-tickets-info";
27
+ @forward "custom/summary";
20
28
 
21
29
  @mixin link-button($color: inherit,
22
30
  $background: transparent,
@@ -41,7 +49,7 @@
41
49
  @include solid-button($padding: 0.75em);
42
50
  white-space: nowrap;
43
51
 
44
- @include disabled {
52
+ &:disabled {
45
53
  @include btn-outline-secondary;
46
54
  }
47
55
  }
@@ -239,17 +247,6 @@
239
247
  }
240
248
  }
241
249
 
242
- @mixin btn-invisible {
243
- background-color: transparent;
244
- color: inherit;
245
- border: none;
246
- padding: 0;
247
-
248
- @include focus {
249
- box-shadow: none;
250
- }
251
- }
252
-
253
250
  @mixin btn-membership-pill {
254
251
  @include outline-button(var(--color-black-80-lighten), white);
255
252
 
@@ -1,63 +1,25 @@
1
- @mixin disabled {
2
-
3
- &:disabled,
4
- &.disabled {
5
- @content;
6
- }
7
- }
8
-
9
- @mixin small-button {
10
- padding: var(--padding-sm);
11
- font-size: var(--font-size-sm);
12
- }
13
-
14
- @mixin setup-slim-button {
15
- padding: var(--padding-md);
16
- }
17
-
18
- @mixin setup-large-button {
19
- padding-bottom: var(--padding-lg);
20
- padding-top: var(--padding-lg);
21
- font-size: 1.125rem;
22
- }
23
-
24
1
  @mixin setup-button {
25
2
  border-radius: var(--border-radius-lg);
26
3
  line-height: var(--line-height-xs);
27
- padding: var(--padding-lg);
28
4
  font-size: var(--font-size-body);
5
+ border-color: currentColor;
6
+ padding: var(--padding-lg);
7
+ justify-content: center;
8
+ vertical-align: middle;
29
9
  text-decoration: none;
30
10
  font-family: inherit;
11
+ display: inline-flex;
12
+ border-style: solid;
13
+ align-items: center;
31
14
  text-align: center;
15
+ gap: var(--gap-sm);
32
16
  font-weight: bold;
33
17
  transition: none;
34
18
  cursor: pointer;
35
-
36
- justify-content: center;
37
- display: inline-flex;
38
- align-items: center;
39
- gap: var(--gap-sm);
19
+ color: inherit;
40
20
 
41
21
  &:focus {
42
22
  box-shadow: none;
43
23
  outline: none;
44
24
  }
45
-
46
- &[slim] {
47
- @include setup-slim-button;
48
- }
49
-
50
- &[large] {
51
- @include setup-large-button;
52
- }
53
-
54
- @include disabled {
55
- opacity: 1; // override bootstrap
56
- }
57
- }
58
-
59
- // @mixin flex-button($gap: var(--gap-sm)) {
60
- // display: inline-flex;
61
- // align-items: center;
62
- // gap: $gap;
63
- // }
25
+ }
@@ -0,0 +1,3 @@
1
+ @mixin btn-slim {
2
+ padding: var(--padding-md);
3
+ }
@@ -0,0 +1,12 @@
1
+ @mixin btn-add-to-wallet {
2
+ border-width: var(--border-width-sm);
3
+ color: var(--color-black-80-lighten);
4
+ background-color: transparent;
5
+
6
+ &:hover,
7
+ &:focus {
8
+ background-color: var(--color-black-80-lighten);
9
+ border-color: var(--color-black-80-lighten);
10
+ color: white;
11
+ }
12
+ }
@@ -0,0 +1,10 @@
1
+ @mixin btn-invisible {
2
+ background-color: transparent;
3
+ border: none;
4
+ padding: 0;
5
+
6
+ &:focus,
7
+ &:hover {
8
+ box-shadow: none;
9
+ }
10
+ }
@@ -0,0 +1,11 @@
1
+ @mixin btn-manage-order {
2
+ border-width: var(--border-width-sm);
3
+ background-color: transparent;
4
+
5
+ &:hover,
6
+ &:focus {
7
+ background-color: var(--color-brand-generic-15-lighten);
8
+ border-color: var(--color-brand-generic-90-darken);
9
+ color: var(--color-brand-generic-90-darken);
10
+ }
11
+ }
@@ -0,0 +1,32 @@
1
+ @use "../slim" as *;
2
+
3
+ @mixin btn-tint {
4
+ background-color: var(--color-brand-generic-15-lighten);
5
+ color: var(--color-brand-generic-90-darken);
6
+ border-color: currentColor;
7
+ }
8
+
9
+ @mixin btn-navcard {
10
+ @include btn-slim;
11
+
12
+ & {
13
+ border-width: var(--border-width-sm);
14
+ background-color: white;
15
+ }
16
+
17
+ &.btn-active {
18
+ @include btn-tint;
19
+ }
20
+
21
+ &.btn-active:hover,
22
+ &.btn-active:focus {
23
+ background-color: var(--color-brand-generic);
24
+ border-color: var(--color-brand-generic);
25
+ color: white;
26
+ }
27
+
28
+ &:not(.btn-active):hover,
29
+ &:not(.btn-active):focus {
30
+ @include btn-tint;
31
+ }
32
+ }
@@ -0,0 +1,10 @@
1
+ @mixin btn-outline-alert-neutral {
2
+ border-width: var(--border-width-sm);
3
+ color: var(--color-status-neutral);
4
+ background-color: transparent;
5
+
6
+ &:hover,
7
+ &:focus {
8
+ background-color: var(--color-status-neutral-10-lighten);
9
+ }
10
+ }
@@ -13,15 +13,14 @@ $iterations: (
13
13
  @mixin btn-renew-membership {
14
14
  @include outline-button($color: white, $background: transparent);
15
15
 
16
- &:focus, &:hover {
16
+ &:focus,
17
+ &:hover {
18
+ color: var(--color-black-60-lighten);
19
+
17
20
  @each $name, $value in $iterations {
18
21
  &.#{$name} {
19
22
  color: #{$value};
20
23
  }
21
24
  }
22
25
  }
23
-
24
- &:active {
25
- transform: scale(0.98);
26
- }
27
26
  }
@@ -0,0 +1,19 @@
1
+ @use "invisible" as *;
2
+
3
+ @mixin btn-summary {
4
+ @include btn-invisible;
5
+
6
+ & {
7
+ justify-content: space-between;
8
+ font-weight: inherit;
9
+ align-items: center;
10
+ width: 100%;
11
+ }
12
+
13
+ &:hover,
14
+ &:focus {
15
+ .br-summary-icon {
16
+ outline-style: dashed;
17
+ }
18
+ }
19
+ }
@@ -1,4 +1,3 @@
1
1
  @mixin br-card--inline {
2
- margin: var(--margin-sm);
3
2
  display: inline-block;
4
3
  }
@@ -1,4 +1,5 @@
1
- @use "../mixins/breakpoints" as *;
1
+ @use "../../mixins/breakpoints" as *;
2
+ @use "inline" as *;
2
3
 
3
4
  $colors: (
4
5
  "member": var(--color-brand-membership),
@@ -19,34 +20,43 @@ $gradients: (
19
20
  "young-barbican": linear-gradient(120deg, var(--color-youngbarbican-1) 0%, var(--color-youngbarbican-2) 50%, var(--color-youngbarbican-3) 95%),
20
21
  );
21
22
 
22
- .br-card.membership {
23
- background-color: var(--color-black-60-lighten);
24
- min-height: 12.75rem;
25
- border-width: 0;
26
- color: white;
27
-
28
- @include small-up {
23
+ @mixin br-card--membership {
24
+ & {
25
+ background-color: var(--color-black-60-lighten);
29
26
  max-width: var(--width-layout-xs);
30
- margin: var(--margin-xs);
31
- display: inline-block;
27
+ min-height: 12.75rem;
28
+ border-width: 0;
29
+ color: white;
32
30
  width: 100%;
33
31
  }
34
- }
35
32
 
36
- .br-card.membership+.br-card.membership {
37
33
  @include small-up {
38
- margin-top: 0;
34
+ @include br-card--inline;
35
+ }
36
+
37
+ @include small-down {
38
+ +.br-card.membership {
39
+ margin-top: var(--margin-md);
40
+ }
41
+ }
42
+
43
+ @each $name, $value in $colors {
44
+ &.#{$name} {
45
+ background-color: #{$value};
46
+ }
39
47
  }
40
- }
41
48
 
42
- @each $name, $value in $colors {
43
- .br-card.membership.#{$name} {
44
- background-color: #{$value};
49
+ @each $name, $value in $gradients {
50
+ &.#{$name} {
51
+ background-image: #{$value};
52
+ }
45
53
  }
46
- }
47
54
 
48
- @each $name, $value in $gradients {
49
- .br-card.membership.#{$name} {
50
- background-image: #{$value};
55
+ .br-card-title {
56
+ font-size: var(--font-size-h4);
57
+ text-overflow: ellipsis;
58
+ white-space: nowrap;
59
+ font-weight: bold;
60
+ overflow: hidden;
51
61
  }
52
62
  }
@@ -13,7 +13,7 @@
13
13
  transform: scale(1);
14
14
  }
15
15
 
16
- &.router-link-exact-active {
16
+ &.disabled {
17
17
  outline-offset: calc(var(--border-width-sm) * -1);
18
18
  background-color: var(--color-brand-generic);
19
19
  outline-color: var(--color-brand-generic);
@@ -24,7 +24,15 @@
24
24
  color: white;
25
25
  }
26
26
 
27
- &:not(.router-link-active):hover {
27
+ &.router-link-active:not(.router-link-exact-active) {
28
+ background-color: var(--color-brand-generic-15-lighten);
29
+ color: var(--color-brand-generic-90-darken);
30
+ outline-color: var(--color-brand-generic);
31
+ text-decoration: underline;
32
+ border-color: currentColor;
33
+ }
34
+
35
+ &:not(.disabled):hover {
28
36
  color: var(--color-brand-generic-90-darken);
29
37
  outline-color: var(--color-brand-generic);
30
38
  text-decoration: underline;
@@ -0,0 +1,21 @@
1
+ @use "../../mixins/breakpoints" as *;
2
+ @use "inline" as *;
3
+
4
+ @mixin br-card--qrcode {
5
+ @include br-card--inline;
6
+
7
+ & {
8
+ border-color: currentColor;
9
+ }
10
+
11
+ .br-card-text {
12
+ margin-top: var(--margin-md);
13
+ width: var(--width-qrcode);
14
+ word-wrap: break-word;
15
+ text-align: center;
16
+ }
17
+
18
+ p+p {
19
+ margin-top: var(--margin-xs);
20
+ }
21
+ }
@@ -1,26 +0,0 @@
1
- @use "mixins/breakpoints";
2
-
3
- .card-deck {
4
- justify-content: center;
5
- display: grid;
6
- gap: var(--gap-xl);
7
-
8
- @include breakpoints.medium-up {
9
- align-items: flex-start;
10
- grid-auto-flow: column;
11
- }
12
-
13
- .br-card {
14
- max-width: var(--width-title);
15
- margin-top: 0;
16
- }
17
-
18
- .br-card-title {
19
- font-size: var(--font-size-h3);
20
- }
21
-
22
- .br-card-img {
23
- border-radius: var(--border-radius-lg);
24
- margin-top: var(--margin-lg);
25
- }
26
- }
@@ -1,18 +0,0 @@
1
- @use "outline-secondary" as *;
2
-
3
- @mixin btn-see-tickets-info {
4
- @include btn-outline-secondary;
5
-
6
- & {
7
- margin-top: var(--margin-lg);
8
- padding: var(--padding-md);
9
- text-align: left;
10
-
11
- &:hover,
12
- &:focus {
13
- background-color: var(--color-brand-generic-15-lighten);
14
- border-color: var(--color-brand-generic-90-darken);
15
- color: var(--color-brand-generic-90-darken);
16
- }
17
- }
18
- }