barbican-reset 1.5.3 → 1.5.7

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,9 @@
1
1
  import RemoveTicket from './remove_ticket'
2
+ import DotTyping from './dot_typing'
3
+ import OutlinePrimary from './outline_primary'
2
4
 
3
5
  export {
4
- RemoveTicket
6
+ RemoveTicket,
7
+ DotTyping,
8
+ OutlinePrimary
5
9
  };
@@ -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>
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div>
3
+
4
+ <template v-if="state === 'default'">
5
+ <template v-if="$slots.default">
6
+ <slot name="default" />
7
+ </template>
8
+ <template v-else>
9
+ {{ state }}
10
+ </template>
11
+ </template>
12
+
13
+ <template v-else-if="state === 'loading'">
14
+ <template v-if="$slots.loading">
15
+ <slot name="loading" />
16
+ </template>
17
+ <dot-typing v-else />
18
+ </template>
19
+
20
+ <template v-else-if="state === 'loaded'">
21
+ <template v-if="$slots.loaded">
22
+ <slot name="loaded" />
23
+ </template>
24
+ <template v-else>
25
+ {{ state }}
26
+ </template>
27
+ </template>
28
+
29
+ <template v-else-if="state === 'error'">
30
+ <template v-if="$slots.error">
31
+ <slot name="error" />
32
+ </template>
33
+ <template v-else>
34
+ {{ state }}
35
+ </template>
36
+ </template>
37
+
38
+ </div>
39
+ </template>
40
+
41
+ <script>
42
+ import { DotTyping } from './components'
43
+
44
+ export default {
45
+ name: 'OutlinePrimary',
46
+ components: {
47
+ DotTyping
48
+ },
49
+ props: {
50
+ state: {
51
+ type: String,
52
+ default: "default"
53
+ }
54
+ },
55
+ }
56
+ </script>
57
+
58
+ <style>
59
+
60
+ </style>
@@ -10,6 +10,12 @@
10
10
  </template>
11
11
  </remove-ticket>
12
12
 
13
+ <outline-primary v-else-if="variant === 'outline-primary'" :state="state">
14
+ <template v-for="(index, name) in $slots" v-slot:[name]>
15
+ <slot :name="name" />
16
+ </template>
17
+ </outline-primary>
18
+
13
19
  <template v-else>
14
20
 
15
21
  <template v-if="state === 'default'">
@@ -55,7 +61,7 @@
55
61
 
56
62
  <script>
57
63
  import { BButton } from 'bootstrap-vue'
58
- import { RemoveTicket } from './br_button/components'
64
+ import { RemoveTicket, OutlinePrimary } from './br_button/components'
59
65
 
60
66
  export default {
61
67
  name: "BrButton",
@@ -79,7 +85,8 @@ export default {
79
85
  },
80
86
  components: {
81
87
  BButton,
82
- RemoveTicket
88
+ RemoveTicket,
89
+ OutlinePrimary
83
90
  }
84
91
  }
85
92
  </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
  }
@@ -70,13 +70,18 @@
70
70
  @if $display { @include button-display($display, $padding * 0.625); }
71
71
  @if $line { line-height: $line; }
72
72
 
73
+ path {
74
+ fill: $color;
75
+ }
76
+
73
77
  @include focus {
74
78
  border: $border solid $color;
75
79
  background-color: $color;
76
80
  color: $background;
81
+ box-shadow: none;
77
82
  outline: none;
78
83
 
79
- svg {
84
+ path {
80
85
  fill: $background;
81
86
  }
82
87
  }
@@ -95,10 +100,6 @@
95
100
  color: $color;
96
101
 
97
102
  @if $line { line-height: $line; }
98
-
99
- @include focus {
100
- @content;
101
- }
102
103
  }
103
104
 
104
105
  @mixin btn-outline-header {
@@ -112,6 +113,11 @@
112
113
  @mixin btn-primary {
113
114
  @include button-solid;
114
115
  min-width: 8rem;
116
+
117
+ &[disabled=disabled] {
118
+ @include button-solid($c-grey-night);
119
+ cursor: not-allowed;
120
+ }
115
121
  }
116
122
 
117
123
  @mixin btn-outline-primary {
@@ -157,7 +163,8 @@
157
163
  }
158
164
 
159
165
  @mixin btn-link {
160
- @include button-link {
166
+ @include button-link;
167
+ @include focus {
161
168
  @include single-box($c-grey-night);
162
169
  background-color: $c-grey-night;
163
170
  color: $white;
@@ -167,17 +174,20 @@
167
174
  @mixin btn-video-help {
168
175
  @include button-link(
169
176
  $padding: 1.25rem,
170
- $background: $c-grey-alpine) {
171
- background-color: $c-grey-steel;
172
- color: $white;
173
- }
177
+ $background: $c-grey-alpine);
174
178
  font-weight: 700;
175
179
  text-align: left;
176
180
  width: 100%;
181
+
182
+ @include focus {
183
+ background-color: $c-grey-steel;
184
+ color: $white;
185
+ }
177
186
  }
178
187
 
179
188
  @mixin btn-exit {
180
- @include button-link {
189
+ @include button-link;
190
+ @include focus {
181
191
  @include single-box($c-grey-night);
182
192
  background-color: $white;
183
193
  border-radius: 50%;
@@ -264,20 +274,6 @@
264
274
  }
265
275
  }
266
276
 
267
- @mixin btn-invisible {
268
- &, &:focus {
269
- background: transparent;
270
- line-height: 1;
271
- padding: 0;
272
-
273
- @include focus {
274
- background: transparent;
275
- line-height: 1;
276
- padding: 0;
277
- }
278
- }
279
- }
280
-
281
277
  @mixin btn-expand {
282
278
  display: block;
283
279
  }
@@ -1,11 +1,12 @@
1
1
  @mixin focus {
2
- // &:focus { <-- better remove this, but could cause bugs
3
- // box-shadow: none;
4
- // outline: none;
5
- // }
6
- &:hover, &:focus-visible, &[data-focus-visible-added] {
7
- @content;
8
- }
2
+ &:not([disabled=disabled]) {
3
+ &[data-focus-visible-added],
4
+ &:focus-visible,
5
+ &:focus,
6
+ &:hover {
7
+ @content;
8
+ }
9
+ }
9
10
  }
10
11
 
11
12
  @mixin box-setup {
@@ -1,19 +1,7 @@
1
1
 
2
+ @import "input/generic";
3
+ @import "input/status";
2
4
  @import "input/checkbox";
5
+ @import "input/dropdown";
3
6
  @import "input/radio";
4
-
5
- @mixin all-text-inputs {
6
- border: solid $border-width $c-border-strong;
7
- padding: 0.875rem 0.875rem 0.75rem;
8
- background-color: $c-grey-alpine;
9
- border-radius: $border-radius-lg;
10
- }
11
-
12
- @mixin input-dropdown {
13
- background-color: $c-grey-alpine;
14
- border-radius: $border-radius-lg;
15
- border-color: $c-grey-concrete;
16
- padding: 0.875rem 0.5rem;
17
- color: $c-grey-night;
18
- width: 100%;
19
- }
7
+ @import "input/text";
@@ -1,46 +1,6 @@
1
- @mixin checkbox-input {
2
- position: relative;
3
- display: grid;
4
-
5
- input[type=checkbox] {
6
- $size: 0.875rem;
7
- position: absolute;
8
- cursor: pointer;
9
- height: $size;
10
- margin: auto;
11
- width: $size;
12
- right: auto;
13
- z-index: 3;
14
- left: 1rem;
15
- bottom: 0;
16
- top: 0;
17
-
18
- @include focus {
19
- outline: none;
20
-
21
- ~ label {
22
- @include single-box($c-grey-steel, 0.0625rem);
23
- border: 1px solid $c-grey-steel;
24
- background-color: $c-grey-alpine;
25
- }
26
- &:checked ~ label {
27
- @include focus_colors;
28
- @include single-box($c-status-neutral, 0.0625rem);
29
- }
30
- }
31
-
32
- &:checked ~ label {
33
- @include focus_colors;
34
- }
35
- }
36
-
37
- label {
38
- padding: 0.875rem 0.75rem 0.625rem 2.5rem;
39
- border: 1px solid $c-grey-concrete;
40
- border-radius: $border-radius-lg;
41
- background-color: $white;
42
- color: $c-grey-night;
43
- font-weight: normal;
44
- cursor: pointer;
45
- }
1
+ @mixin checkbox-input(
2
+ $state: neutral,
3
+ $type: checkbox) {
4
+ @include generic-input($state,$type);
5
+ display: block;
46
6
  }
@@ -0,0 +1,9 @@
1
+
2
+ @mixin input-dropdown {
3
+ background-color: $c-grey-alpine;
4
+ border-radius: $border-radius-lg;
5
+ border-color: $c-grey-concrete;
6
+ padding: 0.875rem 0.5rem;
7
+ color: $c-grey-night;
8
+ width: 100%;
9
+ }
@@ -0,0 +1,62 @@
1
+ @mixin generic-input($state,$type) {
2
+ position: relative;
3
+ padding: 0;
4
+
5
+ input[type=#{$type}] {
6
+ $size: 0.875rem;
7
+ position: absolute;
8
+ height: $size;
9
+ margin: auto;
10
+ width: $size;
11
+ right: auto;
12
+ z-index: 3;
13
+ left: 1rem;
14
+ bottom: 0;
15
+ top: 0;
16
+
17
+ @if $state != disabled {
18
+ cursor: pointer;
19
+
20
+ @include focus {
21
+ outline: none;
22
+
23
+ ~ label {
24
+ @include single-box($c-grey-steel, 0.0625rem);
25
+ border: 1px solid $c-grey-steel;
26
+ background-color: $c-grey-alpine;
27
+ }
28
+
29
+ &:checked ~ label {
30
+ @include focus_colors;
31
+ @include single-box($c-status-neutral, 0.0625rem);
32
+ }
33
+ }
34
+
35
+ &:checked ~ label {
36
+ @include focus_colors;
37
+ }
38
+ }
39
+ }
40
+
41
+ label {
42
+ padding: 0.75rem 0.75rem 0.625rem 2.75rem;
43
+ border: 1px solid $c-grey-concrete;
44
+ border-radius: $border-radius-lg;
45
+ background-color: $white;
46
+ font-weight: 400;
47
+
48
+ @if $state != disabled {
49
+ color: $c-grey-night;
50
+ cursor: pointer;
51
+ }
52
+
53
+ @if $state == disabled {
54
+ color: $c-grey-steel;
55
+ cursor: not-allowed;
56
+
57
+ &.spx-label-field__checkout, .spx-data-delivery-type {
58
+ text-decoration: line-through;
59
+ }
60
+ }
61
+ }
62
+ }
@@ -3,77 +3,17 @@
3
3
  margin: -0.25rem;
4
4
  }
5
5
 
6
- @mixin radio-input($state:neutral,$display:inline-block) {
7
- position: relative;
8
- display: $display;
9
- padding: 0;
10
-
11
- @if $display != flex {
12
- margin: 0.25rem;
13
- } @else {
14
- margin: 0;
15
- gap: 1rem;
16
-
17
- &:not(:first-of-type) {
18
- margin-top: 1rem;
19
- }
20
- }
21
-
22
- input[type=radio] {
23
- $size: 0.875rem;
24
- position: absolute;
25
- height: $size;
26
- margin: auto;
27
- width: $size;
28
- right: auto;
29
- z-index: 3;
30
- left: 1rem;
31
- bottom: 0;
32
- top: 0;
33
-
34
- @if $state != disabled {
35
- cursor: pointer;
36
-
37
- @include focus {
38
- outline: none;
39
-
40
- ~ label {
41
- @include single-box($c-grey-steel, 0.0625rem);
42
- border: 1px solid $c-grey-steel;
43
- background-color: $c-grey-alpine;
44
- }
45
-
46
- &:checked ~ label {
47
- @include focus_colors;
48
- @include single-box($c-status-neutral, 0.0625rem);
49
- }
50
- }
51
-
52
- &:checked ~ label {
53
- @include focus_colors;
54
- }
55
- }
56
- }
57
-
58
- label {
59
- padding: 0.75rem 0.75rem 0.625rem 2.75rem;
60
- border: 1px solid $c-grey-concrete;
61
- border-radius: $border-radius-lg;
62
- background-color: $white;
63
- font-weight: 400;
64
-
65
- @if $state != disabled {
66
- color: $c-grey-night;
67
- cursor: pointer;
68
- }
6
+ @mixin radio-input(
7
+ $state: neutral,
8
+ $type: radio) {
9
+ @include generic-input($state,$type);
10
+ display: inline-block;
11
+ margin: 0.25rem;
12
+ }
69
13
 
70
- @if $state == disabled {
71
- color: $c-grey-steel;
72
- cursor: not-allowed;
14
+ // margin: 0;
15
+ // gap: 1rem;
73
16
 
74
- .spx-data-delivery-type {
75
- text-decoration: line-through;
76
- }
77
- }
78
- }
79
- }
17
+ // &:not(:first-of-type) {
18
+ // margin-top: 1rem;
19
+ // }
@@ -0,0 +1,16 @@
1
+ @mixin status-input($color) {
2
+ @include focus {
3
+ &:checked ~ label {
4
+ @include single-box(map-get($color, base), 0.0625rem);
5
+ border: 1px solid map-get($color, base);
6
+ background-color: map-get($color, fade);
7
+ color: map-get($color, base);
8
+ }
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
+ }
16
+ }
@@ -0,0 +1,7 @@
1
+
2
+ @mixin all-text-inputs {
3
+ border: solid $border-width $c-border-strong;
4
+ padding: 0.875rem 0.875rem 0.75rem;
5
+ background-color: $c-grey-alpine;
6
+ border-radius: $border-radius-lg;
7
+ }
@@ -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.3",
3
+ "version": "1.5.7",
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;
File without changes
@@ -1,85 +1,17 @@
1
1
 
2
- .checkbox-group {
3
-
4
- .custom-control {
5
- position: relative;
2
+ .custom-checkbox {
3
+ @include checkbox-input;
6
4
 
7
- &:not(:last-of-type) {
8
- margin-bottom: 0.5rem;
9
- }
10
-
11
- input[type=checkbox] {
12
- $size: 0.875rem;
13
- position: absolute;
14
- cursor: pointer;
15
- height: $size;
16
- margin: auto;
17
- width: $size;
18
- right: auto;
19
- z-index: 3;
20
- left: 1rem;
21
- bottom: 0;
22
- top: 0;
23
-
24
- @mixin focus_colors {
25
- background-color: $c-status-neutral-fade;
26
- border: 1px solid $c-status-neutral;
27
- color: $c-status-neutral;
28
- }
29
-
30
- &:hover, &[data-focus-visible-added] {
31
- &:focus {
32
- box-shadow: none;
33
- outline: none;
34
- }
35
-
36
- ~ label {
37
- @include single-box($c-grey-steel, 0.0625rem);
38
- border: 1px solid $c-grey-steel;
39
- background-color: $c-grey-alpine;
40
- }
41
-
42
- &:checked ~ label {
43
- @include focus_colors;
44
- @include single-box($c-status-neutral, 0.0625rem);
45
- }
46
- }
47
-
48
- &:checked ~ label {
49
- @include focus_colors;
50
- }
51
- }
52
-
53
- label {
54
- padding: 0.875rem 0.75rem 0.625rem 2.5rem;
55
- border: 1px solid $c-grey-concrete;
56
- border-radius: $border-radius-lg;
57
- background-color: $white;
58
- color: $c-grey-night;
59
- cursor: pointer;
60
- }
61
- }
5
+ &:not(:last-of-type) {
6
+ margin-bottom: 0.5rem;
7
+ }
62
8
  }
63
9
 
64
10
  @each $status, $color in $statees {
65
11
  @if $status != 'neutral' {
66
- .checkbox-group.#{$status} {
67
- input[type=checkbox] {
68
- &:hover, &[data-focus-visible-added] {
69
- &:checked ~ label {
70
- @include single-box(map-get($color, base), 0.0625rem);
71
- border: 1px solid map-get($color, base);
72
- background-color: map-get($color, fade);
73
- color: map-get($color, base);
74
- }
75
- }
76
-
77
- &:checked ~ label {
78
- border: 1px solid map-get($color, base);
79
- background-color: map-get($color, fade);
80
- color: map-get($color, base);
81
- }
82
- }
83
- }
12
+ [#{$status}] input[type=radio],
13
+ input[type=radio][#{$status}] {
14
+ @include status-input($color);
15
+ }
84
16
  }
85
- }
17
+ }
package/scss/_input.scss CHANGED
@@ -1,6 +1,4 @@
1
1
 
2
- @import "input/radio";
3
-
4
2
  .form-control {
5
3
  @include focus {
6
4
  @include input-focus;
@@ -11,12 +9,6 @@ input::placeholder {
11
9
  color: $c-grey-concrete;
12
10
  }
13
11
 
14
- input[type=number], input[type=text] {
15
- @include focus {
16
- @include input-focus;
17
- }
18
- }
19
-
20
12
  input[type=checkbox],
21
13
  input[type=radio] {
22
14
  margin-bottom: 0.5rem;
@@ -29,6 +21,15 @@ input[type=submit] {
29
21
  appearance: none;
30
22
  }
31
23
 
24
+ input[type=number] {
25
+ @include focus {
26
+ @include input-focus;
27
+ }
28
+ }
29
+
32
30
  #{$all-text-inputs} {
33
31
  @include all-text-inputs;
32
+ @include focus {
33
+ @include input-focus;
34
+ }
34
35
  }
@@ -0,0 +1,17 @@
1
+
2
+ [role=radiogroup] {
3
+ @include radio-group;
4
+ }
5
+
6
+ .custom-radio {
7
+ @include radio-input;
8
+ }
9
+
10
+ @each $status, $color in $statees {
11
+ @if $status != 'neutral' {
12
+ [#{$status}] input[type=radio],
13
+ input[type=radio][#{$status}] {
14
+ @include status-input($color);
15
+ }
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;
package/scss/index.scss CHANGED
@@ -18,7 +18,7 @@
18
18
  // bootstrap component styles
19
19
  @import "btn";
20
20
  @import "card/index";
21
- @import "card-group";
21
+ @import "card-deck";
22
22
  @import "checkbox";
23
23
  @import "checkbox-group";
24
24
  @import "custom-select";
@@ -1,31 +0,0 @@
1
-
2
- .radio-group {
3
- @include radio-group;
4
- }
5
-
6
- .custom-radio {
7
- @include radio-input;
8
- }
9
-
10
- @each $status, $color in $statees {
11
- @if $status != 'neutral' {
12
- .radio-group.#{$status} {
13
- input[type=radio] {
14
- @include focus {
15
- &:checked ~ label {
16
- @include single-box(map-get($color, base), 0.0625rem);
17
- border: 1px solid map-get($color, base);
18
- background-color: map-get($color, fade);
19
- color: map-get($color, base);
20
- }
21
- }
22
-
23
- &:checked ~ label {
24
- border: 1px solid map-get($color, base);
25
- background-color: map-get($color, fade);
26
- color: map-get($color, base);
27
- }
28
- }
29
- }
30
- }
31
- }