barbican-reset 3.20.0 → 3.22.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 (36) hide show
  1. package/components/BrButton.vue +7 -1
  2. package/components/BrCard.vue +89 -3
  3. package/components/BrCardSubTitle.vue +1 -1
  4. package/components/BrContainer.vue +41 -63
  5. package/components/BrWrap.vue +20 -18
  6. package/index.js +2 -17
  7. package/package.json +1 -1
  8. package/scss/_br-button.scss +4 -0
  9. package/scss/_br-container.scss +25 -36
  10. package/scss/_br-wrap.scss +11 -11
  11. package/scss/_variables.scss +3 -2
  12. package/scss/card/index.scss +0 -1
  13. package/scss/index.scss +0 -2
  14. package/scss/mixins/_br-card.scss +27 -17
  15. package/scss/mixins/buttons/_custom.scss +10 -31
  16. package/scss/mixins/buttons/custom/_outline-primary.scss +10 -0
  17. package/scss/mixins/buttons/custom/_outline-secondary.scss +5 -0
  18. package/scss/mixins/buttons/custom/_primary.scss +14 -0
  19. package/scss/mixins/buttons/custom/_secondary.scss +5 -0
  20. package/scss/mixins/buttons/custom/_see-tickets-info.scss +18 -0
  21. package/scss/mixins/card/_default.scss +13 -0
  22. package/scss/mixins/card/_inline.scss +4 -0
  23. package/scss/mixins/card/_navcard.scss +66 -0
  24. package/scss/mixins/card/_navitem.scss +51 -0
  25. package/scss/mixins/card/_navlink.scss +30 -0
  26. package/scss/mixins/card/_ticket.scss +11 -0
  27. package/components/BrNavCard.vue +0 -56
  28. package/components/BrNavCardWrap.vue +0 -5
  29. package/components/BrNavLink.vue +0 -21
  30. package/components/EventSummary.vue +0 -149
  31. package/components/FluidIframe.vue +0 -39
  32. package/components/SeeInside.vue +0 -134
  33. package/components/VideoContent.vue +0 -74
  34. package/scss/_br-nav-card-wrap.scss +0 -11
  35. package/scss/_br-navlink.scss +0 -51
  36. package/scss/card/_navcard.scss +0 -133
@@ -6,7 +6,9 @@
6
6
  @click="$emit('click')"
7
7
  :aria-busy="loading"
8
8
  aria-live="polite"
9
- :type="type">
9
+ :type="type"
10
+ ref="button"
11
+ >
10
12
  <remove-ticket v-if="variant === 'remove-ticket'" :state="state">
11
13
  <template v-for="(index, name) in $slots" v-slot:[name]>
12
14
  <slot :name="name" />
@@ -71,6 +73,7 @@ export default {
71
73
  default: 'button',
72
74
  },
73
75
  },
76
+ expose: ['focusButton'],
74
77
  methods: {
75
78
  titleCase(str) {
76
79
  return str
@@ -79,6 +82,9 @@ export default {
79
82
  .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
80
83
  .join(' ')
81
84
  },
85
+ focusButton() {
86
+ this.$refs.button.focus();
87
+ }
82
88
  },
83
89
  computed: {
84
90
  loading() {
@@ -1,23 +1,109 @@
1
1
  <template>
2
- <div :class="['br-card', { inline }]">
2
+ <component
3
+ :class="generateClassnames"
4
+ :is="defineComponent"
5
+ :to="defineTo"
6
+ :href="defineHref">
3
7
  <div v-if="$slots.header" class="br-card-header">
4
8
  <slot name="header" />
5
9
  </div>
6
10
  <template v-if="$slots.default">
7
- <br-card-body>
11
+ <template v-if="noBody">
12
+ <slot />
13
+ </template>
14
+ <br-card-body v-else :class="{ center }">
8
15
  <slot />
9
16
  </br-card-body>
10
17
  </template>
11
- </div>
18
+ </component>
12
19
  </template>
13
20
 
14
21
  <script setup>
15
22
  import BrCardBody from '#components/BrCardBody.vue'
23
+ import { computed } from 'vue'
24
+
25
+ const generateClassnames = computed(() => {
26
+ let classnames = ['br-card']
27
+
28
+ if (props.inline) classnames.push('inline')
29
+ if (props.navcard) classnames.push('navcard')
30
+ if (props.navitem) classnames.push('navitem')
31
+ if (props.navlink) classnames.push('navlink')
32
+ if (props.ticket) classnames.push('ticket')
33
+
34
+ if (
35
+ !props.inline &&
36
+ !props.navcard &&
37
+ !props.navitem &&
38
+ !props.navlink &&
39
+ !props.ticket
40
+ ) {
41
+ classnames.push('default')
42
+ }
43
+
44
+ return classnames
45
+ })
46
+
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
+ })
16
74
 
17
75
  const props = defineProps({
18
76
  inline: {
19
77
  type: Boolean,
20
78
  default: false,
21
79
  },
80
+ navcard: {
81
+ type: Boolean,
82
+ default: false,
83
+ },
84
+ navitem: {
85
+ type: Boolean,
86
+ default: false,
87
+ },
88
+ navlink: {
89
+ type: Boolean,
90
+ default: false,
91
+ },
92
+ ticket: {
93
+ type: Boolean,
94
+ default: false,
95
+ },
96
+ center: {
97
+ type: Boolean,
98
+ default: false,
99
+ },
100
+ noBody: {
101
+ type: Boolean,
102
+ default: false,
103
+ },
104
+ to: {
105
+ type: String,
106
+ default: '',
107
+ },
22
108
  })
23
109
  </script>
@@ -1,3 +1,3 @@
1
1
  <template>
2
- <h6 class="br-card-subtitle"><slot>Card subtitle</slot></h6>
2
+ <div class="br-card-subtitle"><slot>Card subtitle</slot></div>
3
3
  </template>
@@ -1,84 +1,62 @@
1
1
  <template>
2
- <div :class="styleComponent">
3
- <div :class="styleOuter">
4
- <div :class="styleInner">
2
+ <div :class="generateComponentClasses">
3
+ <div :class="generateOuterClasses">
4
+ <div :class="generateInnerClasses">
5
5
  <slot />
6
6
  </div>
7
7
  </div>
8
- <div class="br-container--image">
8
+ <div v-if="$slots.image" class="br-container--image">
9
9
  <slot name="image" />
10
10
  </div>
11
11
  </div>
12
12
  </template>
13
13
 
14
- <script>
15
- export default {
16
- props: {
17
- splash: {
18
- type: Boolean,
19
- default: false,
20
- },
21
- masthead: {
22
- type: Boolean,
23
- default: false,
24
- },
25
- thin: {
26
- type: Boolean,
27
- default: false,
28
- },
29
- header: {
30
- type: Boolean,
31
- default: false,
32
- },
33
- footer: {
34
- type: Boolean,
35
- default: false,
36
- },
37
- },
38
- computed: {
39
- styleComponent() {
40
- let classNames = ['br-container']
14
+ <script setup>
15
+ import { computed } from 'vue'
41
16
 
42
- if (this.masthead) {
43
- classNames.push('masthead')
44
- }
17
+ const generateComponentClasses = computed(() => {
18
+ let classnames = ['br-container']
45
19
 
46
- return classNames
47
- },
48
- styleOuter() {
49
- let classNames = ['br-container--outer']
20
+ if (props.masthead) classnames.push('masthead')
50
21
 
51
- if (this.masthead) {
52
- classNames.push('masthead')
53
- }
22
+ return classnames
23
+ })
54
24
 
55
- if (this.splash) {
56
- classNames.push('splash')
57
- }
25
+ const generateOuterClasses = computed(() => {
26
+ let classnames = ['br-container--outer']
58
27
 
59
- return classNames
60
- },
61
- styleInner() {
62
- let classNames = ['br-container--inner']
28
+ if (props.masthead) classnames.push('masthead')
63
29
 
64
- if (this.masthead) {
65
- classNames.push('masthead')
66
- }
30
+ return classnames
31
+ })
67
32
 
68
- if (this.thin) {
69
- classNames.push('thin')
70
- }
33
+ const generateInnerClasses = computed(() => {
34
+ let classnames = ['br-container--inner']
71
35
 
72
- if (this.header) {
73
- classNames.push('header')
74
- }
36
+ if (props.masthead) classnames.push('masthead')
37
+ if (props.thin) classnames.push('thin')
38
+ if (props.header) classnames.push('header')
39
+ if (props.footer) classnames.push('footer')
75
40
 
76
- if (this.footer) {
77
- classNames.push('footer')
78
- }
41
+ return classnames
42
+ })
79
43
 
80
- return classNames
81
- },
44
+ const props = defineProps({
45
+ masthead: {
46
+ type: Boolean,
47
+ default: false,
48
+ },
49
+ thin: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+ header: {
54
+ type: Boolean,
55
+ default: false,
56
+ },
57
+ footer: {
58
+ type: Boolean,
59
+ default: false,
82
60
  },
83
- }
61
+ })
84
62
  </script>
@@ -1,24 +1,26 @@
1
1
  <template>
2
- <div :class="['br-wrap', { title }, { videos }, { thin }]">
3
- <slot></slot>
2
+ <div :class="generateComponentClasses">
3
+ <slot />
4
4
  </div>
5
5
  </template>
6
6
 
7
- <script>
8
- export default {
9
- props: {
10
- title: {
11
- type: Boolean,
12
- default: false,
13
- },
14
- thin: {
15
- type: Boolean,
16
- default: false,
17
- },
18
- videos: {
19
- type: Boolean,
20
- default: false,
21
- },
7
+ <script setup>
8
+ import { computed } from 'vue'
9
+
10
+ const generateComponentClasses = computed(() => {
11
+ let classnames = ['br-wrap']
12
+
13
+ if (props.navcard) classnames.push('navcard')
14
+
15
+ if (!props.navcard) classnames.push('default')
16
+
17
+ return classnames
18
+ })
19
+
20
+ const props = defineProps({
21
+ navcard: {
22
+ type: Boolean,
23
+ default: false,
22
24
  },
23
- };
25
+ })
24
26
  </script>
package/index.js CHANGED
@@ -6,7 +6,7 @@ import BrCard from '#components/BrCard.vue'
6
6
  import BrCardBody from '#components/BrCardBody.vue'
7
7
  import BrCardText from '#components/BrCardText.vue'
8
8
  import BrCardTitle from '#components/BrCardTitle.vue'
9
- import BrCardSubTitle from '#components/BrCardSubTitle.vue'
9
+ import BrCardSubtitle from '#components/BrCardSubtitle.vue'
10
10
 
11
11
  import BrCollapseButton from '#components/BrCollapse/Button.vue'
12
12
  import BrCollapseContent from '#components/BrCollapse/Content.vue'
@@ -37,9 +37,6 @@ import BrFormToggle from '#components/BrFormToggle.vue'
37
37
  import BrFormUpdate from '#components/BrFormUpdate.vue'
38
38
  import BrFormVisible from '#components/BrFormVisible.vue'
39
39
 
40
- import BrNavCard from '#components/BrNavCard.vue'
41
- import BrNavCardWrap from '#components/BrNavCardWrap.vue'
42
- import BrNavLink from '#components/BrNavLink.vue'
43
40
  import BrOverlay from '#components/BrOverlay.vue'
44
41
 
45
42
  import BrLoader from '#components/BrLoader.vue'
@@ -48,18 +45,13 @@ import BrStatusBars from '#components/BrStatusBars.vue'
48
45
  import BrTableHeader from '#components/BrTableHeader.vue'
49
46
  import BrWrap from '#components/BrWrap.vue'
50
47
 
51
- import EventSummary from '#components/EventSummary.vue'
52
- import FluidIframe from '#components/FluidIframe.vue'
53
- import SeeInside from '#components/SeeInside.vue'
54
- import VideoContent from '#components/VideoContent.vue'
55
-
56
48
  export {
57
49
  BrAlert,
58
50
  BrAnchor,
59
51
  BrButton,
60
52
  BrCard,
61
53
  BrCardBody,
62
- BrCardSubTitle,
54
+ BrCardSubtitle,
63
55
  BrCardText,
64
56
  BrCardTitle,
65
57
  BrCollapseButton,
@@ -88,16 +80,9 @@ export {
88
80
  BrFormUpdate,
89
81
  BrFormVisible,
90
82
  BrLoader,
91
- BrNavCard,
92
- BrNavCardWrap,
93
- BrNavLink,
94
83
  BrOverlay,
95
84
  BrSkiplink,
96
85
  BrStatusBars,
97
86
  BrTableHeader,
98
87
  BrWrap,
99
- EventSummary,
100
- FluidIframe,
101
- SeeInside,
102
- VideoContent,
103
88
  }
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.20.0"
140
+ "version": "3.22.0"
141
141
  }
@@ -213,6 +213,10 @@
213
213
  @include btn-toggle-password;
214
214
  }
215
215
 
216
+ &.btn-see-tickets-info {
217
+ @include btn-see-tickets-info;
218
+ }
219
+
216
220
  // modifyers
217
221
 
218
222
  &.expand {
@@ -1,56 +1,45 @@
1
- @use "mixins/breakpoints";
1
+ @use "mixins/breakpoints" as *;
2
2
 
3
- .br-container {
4
- &.masthead {
5
- box-shadow: 0 0.375rem 0.375rem rgba(black, 0.1);
6
- }
3
+ .br-container.masthead {
4
+ box-shadow: 0 0.375rem 0.375rem rgba(black, 0.1);
7
5
  }
8
6
 
9
7
  .br-container--outer {
10
8
  padding-right: var(--padding-layout-sm);
11
9
  padding-left: var(--padding-layout-sm);
10
+ }
12
11
 
13
- &.splash {
14
- padding-right: var(--padding-layout-lg);
15
- padding-left: var(--padding-layout-lg);
16
- }
17
-
18
- &.masthead {
19
- background-color: white;
20
- }
12
+ .br-container--outer.masthead {
13
+ background-color: white;
21
14
  }
22
15
 
23
16
  .br-container--inner {
24
17
  max-width: var(--width-layout-lg);
25
18
  margin: 0 auto;
19
+ }
26
20
 
27
- &:not(.footer) {
28
- padding-bottom: var(--padding-xl);
29
- padding-top: var(--padding-xl);
30
-
31
- @include breakpoints.small-up {
32
- padding-bottom: var(--padding-xxxl);
33
- padding-top: var(--padding-xxxl);
34
- }
35
- }
21
+ .br-container--inner:not(.footer) {
22
+ padding-bottom: var(--padding-xl);
23
+ padding-top: var(--padding-xl);
36
24
 
37
- &.header {
38
- padding-bottom: var(--padding-xl);
39
- padding-top: var(--padding-xl);
25
+ @include small-up {
26
+ padding-bottom: var(--padding-xxxl);
27
+ padding-top: var(--padding-xxxl);
40
28
  }
29
+ }
41
30
 
42
- &.thin {
43
- max-width: var(--width-layout-sm);
44
- }
31
+ .br-container--inner.header {
32
+ padding-bottom: var(--padding-xl);
33
+ padding-top: var(--padding-xl);
34
+ }
45
35
 
46
- &.masthead {
47
- @include breakpoints.small-up {
48
- padding-bottom: var(--padding-xxxl);
49
- padding-top: var(--padding-xxxl);
50
- }
36
+ .br-container--inner.thin {
37
+ max-width: var(--width-layout-sm);
38
+ }
51
39
 
52
- h1 {
53
- margin: 0;
54
- }
40
+ .br-container--inner.masthead {
41
+ @include small-up {
42
+ padding-bottom: var(--padding-xxxl);
43
+ padding-top: var(--padding-xxxl);
55
44
  }
56
45
  }
@@ -1,17 +1,17 @@
1
- .br-wrap {
2
- max-width: var(--width-layout-lg);
1
+ @use "mixins/breakpoints" as *;
2
+
3
+ .br-wrap.default {
4
+ max-width: var(--width-layout-sm);
3
5
  margin-right: auto;
4
6
  margin-left: auto;
5
7
  }
6
8
 
7
- .br-wrap.title {
8
- max-width: var(--width-title);
9
- }
10
-
11
- .br-wrap.videos {
12
- max-width: var(--width-layout-md);
13
- }
9
+ .br-wrap.navcard {
10
+ gap: var(--gap-md);
11
+ display: grid;
14
12
 
15
- .br-wrap.thin {
16
- max-width: var(--width-layout-sm);
13
+ @include medium-up {
14
+ grid-template-columns: repeat(2, 1fr);
15
+ gap: var(--gap-lg);
16
+ }
17
17
  }
@@ -176,12 +176,13 @@
176
176
  --padding-xl: 1.5rem;
177
177
  --padding-xxl: 2rem;
178
178
  --padding-xxxl: 2.5rem;
179
- --padding-card-sm: 1.25rem;
180
- --padding-card-md: var(--padding-xl);
179
+ --padding-card-sm: 1rem;
180
+ --padding-card-md: 1.5rem;
181
181
  --padding-card-lg: 1.75rem;
182
182
  --padding-content: 3.75rem;
183
183
  --padding-layout-sm: 5%;
184
184
  --padding-layout-lg: 10%;
185
+ --scale-click: scale(0.98);
185
186
  --width-icon: 10rem;
186
187
  --width-title: 20rem;
187
188
  --width-layout-xs: 24rem;
@@ -5,7 +5,6 @@
5
5
  @use "login";
6
6
  @use "membership";
7
7
  @use "membership-new";
8
- @use "navcard";
9
8
  @use "password";
10
9
  @use "related";
11
10
  @use "slim";
package/scss/index.scss CHANGED
@@ -15,8 +15,6 @@
15
15
  @use "br-form-update";
16
16
  @use "br-form-visible";
17
17
  @use "br-loader";
18
- @use "br-nav-card-wrap";
19
- @use "br-navlink";
20
18
  @use "br-overlay";
21
19
  @use "br-promo";
22
20
  @use "br-select";
@@ -1,4 +1,10 @@
1
1
  @use "../mixins/breakpoints" as *;
2
+ @use "card/default" as *;
3
+ @use "card/inline" as *;
4
+ @use "card/navcard" as *;
5
+ @use "card/navlink" as *;
6
+ @use "card/navitem" as *;
7
+ @use "card/ticket" as *;
2
8
 
3
9
  @mixin br-card {
4
10
  border-color: var(--color-black-25-lighten);
@@ -8,21 +14,28 @@
8
14
  border-style: solid;
9
15
  overflow: hidden;
10
16
 
11
- &:not(.inline) {
12
- width: 100%;
17
+ &.default {
18
+ @include br-card--default;
13
19
  }
14
20
 
15
- &:not(.inline)+.br-card:not(.inline) {
16
- margin-top: var(--margin-lg);
21
+ &.inline {
22
+ @include br-card--inline;
23
+ }
17
24
 
18
- @include large-up {
19
- margin-top: var(--margin-xl);
20
- }
25
+ &.navcard {
26
+ @include br-card--navcard;
21
27
  }
22
28
 
23
- &.inline {
24
- margin: var(--margin-sm);
25
- display: inline-block;
29
+ &.navlink {
30
+ @include br-card--navlink;
31
+ }
32
+
33
+ &.navitem {
34
+ @include br-card--navitem;
35
+ }
36
+
37
+ &.ticket {
38
+ @include br-card--ticket;
26
39
  }
27
40
 
28
41
  iframe {
@@ -45,24 +58,21 @@
45
58
 
46
59
  @mixin br-card-title {
47
60
  line-height: var(--line-height-sm);
48
- font-size: var(--font-size-h3);
61
+ font-size: var(--font-size-h4);
49
62
  font-weight: bold;
50
63
  text-align: left;
51
64
 
52
65
  @include small-up {
53
- font-size: var(--font-size-h2);
66
+ font-size: var(--font-size-h3);
54
67
  }
55
68
 
56
69
  @include medium-up {
57
- font-size: var(--font-size-h1);
70
+ font-size: var(--font-size-h2);
58
71
  }
59
72
  }
60
73
 
61
74
  @mixin br-card-subtitle {
62
- color: var(--color-black-50-lighten);
63
- font-size: var(--font-size-sm);
64
- font-weight: normal;
65
- margin: 0;
75
+ font-size: var(--font-size-h6);
66
76
  }
67
77
 
68
78
  @mixin br-card-body {
@@ -5,9 +5,18 @@
5
5
  @use "../../mixins/buttons/outline" as *;
6
6
  @use "../../mixins/buttons/setup" as *;
7
7
  @use "../../functions" as *;
8
+ @use "custom/outline-primary" as *;
9
+ @use "custom/outline-secondary" as *;
10
+ @use "custom/primary" as *;
11
+ @use "custom/secondary" as *;
8
12
 
9
- @forward "custom/renew-membership";
10
13
  @forward "custom/exit-overlay";
14
+ @forward "custom/outline-primary";
15
+ @forward "custom/outline-secondary";
16
+ @forward "custom/primary";
17
+ @forward "custom/renew-membership";
18
+ @forward "custom/secondary";
19
+ @forward "custom/see-tickets-info";
11
20
 
12
21
  @mixin link-button($color: inherit,
13
22
  $background: transparent,
@@ -28,19 +37,6 @@
28
37
  }
29
38
  }
30
39
 
31
- @mixin btn-primary($min-width: true) {
32
- @include solid-button;
33
-
34
- @if $min-width {
35
- min-width: var(--width-icon);
36
- }
37
-
38
- &[disabled="disabled"] {
39
- @include solid-button(var(--color-black-60-lighten));
40
- cursor: not-allowed;
41
- }
42
- }
43
-
44
40
  @mixin btn-returns {
45
41
  @include solid-button($padding: 0.75em);
46
42
  white-space: nowrap;
@@ -54,29 +50,12 @@
54
50
  @include solid-button($background: var(--color-black-60-lighten), $padding: 0.75em);
55
51
  }
56
52
 
57
- @mixin btn-outline-primary($border-width: var(--border-width-sm)) {
58
- @include outline-button($border-width: $border-width);
59
-
60
- @include focus {
61
- @include outline-button-focus($border-width: $border-width);
62
- }
63
- }
64
-
65
53
  @mixin btn-resale {
66
54
  @include outline-button($padding: 0.625em, $font-size: var(--font-size-sm));
67
55
  }
68
56
 
69
- @mixin btn-secondary {
70
- @include solid-button(var(--color-black-60-lighten));
71
- }
72
-
73
- @mixin btn-outline-secondary {
74
- @include outline-button(var(--color-black-60-lighten));
75
- }
76
-
77
57
  @mixin btn-outline-header {
78
58
  @include outline-button($color: white, $background: var(--color-brand-generic), $border-width: var(--border-width-lg));
79
- // @include flex-button;
80
59
  }
81
60
 
82
61
  @mixin btn-edit-input {