barbican-reset 1.5.6 → 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>
@@ -70,6 +70,10 @@
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;
@@ -77,7 +81,7 @@
77
81
  box-shadow: none;
78
82
  outline: none;
79
83
 
80
- svg {
84
+ path {
81
85
  fill: $background;
82
86
  }
83
87
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barbican-reset",
3
- "version": "1.5.6",
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": {