barbican-reset 1.5.4 → 1.5.8

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.
@@ -1,5 +1,7 @@
1
1
  import RemoveTicket from './remove_ticket'
2
+ import DotTyping from './dot_typing'
2
3
 
3
4
  export {
4
- RemoveTicket
5
+ RemoveTicket,
6
+ DotTyping
5
7
  };
@@ -0,0 +1,43 @@
1
+ <template>
2
+
3
+ <!-- https://codepen.io/nzbin/pen/GGrXbp -->
4
+
5
+ <div>
6
+
7
+ <svg ref="a" version="1.1" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
8
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z"/>
9
+ </svg>
10
+
11
+ <svg ref="b" version="1.1" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
12
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z"/>
13
+ </svg>
14
+
15
+ <svg ref="c" version="1.1" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14">
16
+ <path d="M12,7c0,2.8-2.2,5-5,5S2,9.8,2,7s2.2-5,5-5S12,4.2,12,7z"/>
17
+ </svg>
18
+
19
+ </div>
20
+
21
+ </template>
22
+
23
+ <script>
24
+ import { gsap } from 'gsap'
25
+ export default {
26
+ name: 'DotTyping',
27
+ mounted() {
28
+ const tl = gsap.timeline({ repeat: 9 });
29
+ const a = this.$refs.a;
30
+ const b = this.$refs.b;
31
+ const c = this.$refs.c;
32
+ const dots = [a,b,c];
33
+ const speed = 0.3;
34
+
35
+ tl.to(dots,{
36
+ stagger: speed,
37
+ keyframes: [
38
+ { y: -8, duration: speed },
39
+ { y: 0, duration: speed }
40
+ ]});
41
+ }
42
+ }
43
+ </script>
@@ -33,7 +33,7 @@
33
33
  <slot name="error" />
34
34
  </template>
35
35
  <template v-else>
36
- {{ state }}
36
+ {{ state.toUpperCase() }}
37
37
  </template>
38
38
  </template>
39
39
 
@@ -17,7 +17,7 @@
17
17
  <slot name="default" />
18
18
  </template>
19
19
  <template v-else>
20
- {{ state }}
20
+ {{ titleCase(state) }}
21
21
  </template>
22
22
  </template>
23
23
 
@@ -25,9 +25,7 @@
25
25
  <template v-if="$slots.loading">
26
26
  <slot name="loading" />
27
27
  </template>
28
- <template v-else>
29
- {{ state }}
30
- </template>
28
+ <dot-typing v-else />
31
29
  </template>
32
30
 
33
31
  <template v-else-if="state === 'loaded'">
@@ -35,7 +33,7 @@
35
33
  <slot name="loaded" />
36
34
  </template>
37
35
  <template v-else>
38
- {{ state }}
36
+ {{ titleCase(state) }}
39
37
  </template>
40
38
  </template>
41
39
 
@@ -44,7 +42,7 @@
44
42
  <slot name="error" />
45
43
  </template>
46
44
  <template v-else>
47
- {{ state }}
45
+ {{ titleCase(state) }}
48
46
  </template>
49
47
  </template>
50
48
 
@@ -55,7 +53,7 @@
55
53
 
56
54
  <script>
57
55
  import { BButton } from 'bootstrap-vue'
58
- import { RemoveTicket } from './br_button/components'
56
+ import { RemoveTicket, DotTyping } from './br_button/components'
59
57
 
60
58
  export default {
61
59
  name: "BrButton",
@@ -72,6 +70,11 @@ export default {
72
70
  default: "button"
73
71
  }
74
72
  },
73
+ methods: {
74
+ titleCase(str) {
75
+ return str.toLowerCase().split(' ').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
76
+ }
77
+ },
75
78
  computed: {
76
79
  loading() {
77
80
  return this.state === "loading" ? "true" : "false";
@@ -79,7 +82,8 @@ export default {
79
82
  },
80
83
  components: {
81
84
  BButton,
82
- RemoveTicket
85
+ RemoveTicket,
86
+ DotTyping
83
87
  }
84
88
  }
85
89
  </script>
@@ -2,11 +2,12 @@
2
2
  <b-card related no-body>
3
3
  <b-img v-if="content.image" :src="content.image" />
4
4
  <b-card-body>
5
- <b-link :href="content.link" target="_blank">
6
- <b-card-title v-html="content.title" />
7
- <b-card-sub-title v-if="content.start_date" v-html="handleDate(content.start_date)" />
8
- <b-card-text v-html="limitLength(content.description)" />
9
- </b-link>
5
+ <b-card-title>
6
+ <b-link v-if="content.title" v-html="content.title" :href="content.link" target="_blank" />
7
+ <b-link v-else :href="content.link" target="_blank">More Info</b-link>
8
+ </b-card-title>
9
+ <b-card-sub-title v-if="content.start_date" v-html="handleDate(content.start_date)" />
10
+ <b-card-text v-html="limitLength(content.description)" />
10
11
  </b-card-body>
11
12
  </b-card>
12
13
  </template>
@@ -29,6 +29,7 @@ export default {
29
29
  opacity: 0;
30
30
 
31
31
  @include focus {
32
+ outline: none;
32
33
  opacity: 1;
33
34
  z-index: 2;
34
35
  }
@@ -43,6 +43,10 @@
43
43
  @if $display { @include button-display($display, $padding * 0.625); }
44
44
  @if $line { line-height: $line; }
45
45
 
46
+ path {
47
+ fill: $color;
48
+ }
49
+
46
50
  @include focus {
47
51
  @include double-box($color, $background);
48
52
  border: $border solid $background;
@@ -70,13 +74,18 @@
70
74
  @if $display { @include button-display($display, $padding * 0.625); }
71
75
  @if $line { line-height: $line; }
72
76
 
77
+ path {
78
+ fill: $color;
79
+ }
80
+
73
81
  @include focus {
74
82
  border: $border solid $color;
75
83
  background-color: $color;
76
84
  color: $background;
85
+ box-shadow: none;
77
86
  outline: none;
78
87
 
79
- svg {
88
+ path {
80
89
  fill: $background;
81
90
  }
82
91
  }
@@ -95,10 +104,6 @@
95
104
  color: $color;
96
105
 
97
106
  @if $line { line-height: $line; }
98
-
99
- @include focus {
100
- @content;
101
- }
102
107
  }
103
108
 
104
109
  @mixin btn-outline-header {
@@ -162,7 +167,8 @@
162
167
  }
163
168
 
164
169
  @mixin btn-link {
165
- @include button-link {
170
+ @include button-link;
171
+ @include focus {
166
172
  @include single-box($c-grey-night);
167
173
  background-color: $c-grey-night;
168
174
  color: $white;
@@ -172,17 +178,20 @@
172
178
  @mixin btn-video-help {
173
179
  @include button-link(
174
180
  $padding: 1.25rem,
175
- $background: $c-grey-alpine) {
176
- background-color: $c-grey-steel;
177
- color: $white;
178
- }
181
+ $background: $c-grey-alpine);
179
182
  font-weight: 700;
180
183
  text-align: left;
181
184
  width: 100%;
185
+
186
+ @include focus {
187
+ background-color: $c-grey-steel;
188
+ color: $white;
189
+ }
182
190
  }
183
191
 
184
192
  @mixin btn-exit {
185
- @include button-link {
193
+ @include button-link;
194
+ @include focus {
186
195
  @include single-box($c-grey-night);
187
196
  background-color: $white;
188
197
  border-radius: 50%;
@@ -269,20 +278,6 @@
269
278
  }
270
279
  }
271
280
 
272
- @mixin btn-invisible {
273
- &, &:focus {
274
- background: transparent;
275
- line-height: 1;
276
- padding: 0;
277
-
278
- @include focus {
279
- background: transparent;
280
- line-height: 1;
281
- padding: 0;
282
- }
283
- }
284
- }
285
-
286
281
  @mixin btn-expand {
287
282
  display: block;
288
283
  }
@@ -1,7 +1,8 @@
1
1
  @mixin focus {
2
2
  &:not([disabled=disabled]) {
3
- &[data-focus-visible-added],
3
+ &[data-focus-visible-added],
4
4
  &:focus-visible,
5
+ &:focus,
5
6
  &:hover {
6
7
  @content;
7
8
  }
@@ -1,18 +1,16 @@
1
- @mixin status-input($type,$color) {
2
- input[type=#{$type}] {
3
- @include focus {
4
- &:checked ~ label {
5
- @include single-box(map-get($color, base), 0.0625rem);
6
- border: 1px solid map-get($color, base);
7
- background-color: map-get($color, fade);
8
- color: map-get($color, base);
9
- }
10
- }
11
-
1
+ @mixin status-input($color) {
2
+ @include focus {
12
3
  &:checked ~ label {
4
+ @include single-box(map-get($color, base), 0.0625rem);
13
5
  border: 1px solid map-get($color, base);
14
6
  background-color: map-get($color, fade);
15
7
  color: map-get($color, base);
16
8
  }
17
9
  }
10
+
11
+ &:checked ~ label {
12
+ border: 1px solid map-get($color, base);
13
+ background-color: map-get($color, fade);
14
+ color: map-get($color, base);
15
+ }
18
16
  }
@@ -29,6 +29,7 @@ export default {
29
29
 
30
30
  @include focus {
31
31
  text-decoration: underline;
32
+ outline: none;
32
33
  }
33
34
  }
34
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.5.4",
3
+ "version": "1.5.8",
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
@@ -64,4 +64,8 @@ $aligns: "left", "center", "right";
64
64
 
65
65
  .width-100 {
66
66
  width: 100%;
67
+ }
68
+
69
+ .background-color-alt {
70
+ background-color: $c-page-global-content-bg-alt;
67
71
  }
package/scss/_btn.scss CHANGED
@@ -76,10 +76,6 @@
76
76
  @include btn-carousel;
77
77
  }
78
78
 
79
- &.btn-invisible {
80
- @include btn-invisible;
81
- }
82
-
83
79
  // modifyers
84
80
  &.expand {
85
81
  @include btn-expand;
@@ -1,19 +1,17 @@
1
1
 
2
- .checkbox-group {
3
-
4
- .custom-control {
5
- @include checkbox-input;
2
+ .custom-checkbox {
3
+ @include checkbox-input;
6
4
 
7
- &:not(:last-of-type) {
8
- margin-bottom: 0.5rem;
9
- }
10
- }
5
+ &:not(:last-of-type) {
6
+ margin-bottom: 0.5rem;
7
+ }
11
8
  }
12
9
 
13
10
  @each $status, $color in $statees {
14
11
  @if $status != 'neutral' {
15
- .checkbox-group.#{$status} {
16
- @include status-input(checkbox,$color);
17
- }
12
+ [#{$status}] input[type=radio],
13
+ input[type=radio][#{$status}] {
14
+ @include status-input($color);
15
+ }
18
16
  }
19
- }
17
+ }
package/scss/_input.scss CHANGED
@@ -9,12 +9,6 @@ input::placeholder {
9
9
  color: $c-grey-concrete;
10
10
  }
11
11
 
12
- input[type=number], input[type=text] {
13
- @include focus {
14
- @include input-focus;
15
- }
16
- }
17
-
18
12
  input[type=checkbox],
19
13
  input[type=radio] {
20
14
  margin-bottom: 0.5rem;
@@ -27,6 +21,15 @@ input[type=submit] {
27
21
  appearance: none;
28
22
  }
29
23
 
24
+ input[type=number] {
25
+ @include focus {
26
+ @include input-focus;
27
+ }
28
+ }
29
+
30
30
  #{$all-text-inputs} {
31
31
  @include all-text-inputs;
32
+ @include focus {
33
+ @include input-focus;
34
+ }
32
35
  }
@@ -1,5 +1,5 @@
1
1
 
2
- .radio-group {
2
+ [role=radiogroup] {
3
3
  @include radio-group;
4
4
  }
5
5
 
@@ -9,8 +9,9 @@
9
9
 
10
10
  @each $status, $color in $statees {
11
11
  @if $status != 'neutral' {
12
- .radio-group.#{$status} {
13
- @include status-input(radio,$color);
12
+ [#{$status}] input[type=radio],
13
+ input[type=radio][#{$status}] {
14
+ @include status-input($color);
14
15
  }
15
16
  }
16
17
  }
@@ -13,11 +13,21 @@
13
13
 
14
14
  .card-title {
15
15
  font-size: $font-size-lg;
16
+ margin-bottom: 0.75rem;
17
+
18
+ a {
19
+ @include btn-link;
20
+ }
16
21
  }
17
22
 
23
+ .card-subtitle[date],
18
24
  .card-text:not(:last-child) {
19
25
  margin-bottom: 0.5rem;
20
26
  }
27
+
28
+ * + .card-text[date] {
29
+ margin-top: 0.75rem;
30
+ }
21
31
  }
22
32
 
23
33
  .card[related][hero=true] {
@@ -0,0 +1,11 @@
1
+
2
+ .card[slim] {
3
+
4
+ .card-header {
5
+ padding: 1.5rem 1.25rem 1rem;
6
+ }
7
+
8
+ .card-body {
9
+ padding: 1.5rem 1.25rem;
10
+ }
11
+ }
@@ -7,6 +7,7 @@
7
7
  @import "related";
8
8
  @import "block";
9
9
  @import "membership";
10
+ @import "slim";
10
11
 
11
12
  .card {
12
13
  border: 1px solid $c-grey-pearl;