barbican-reset 1.4.7 → 1.5.1
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.
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
remove
|
|
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
|
+
<template v-else>
|
|
18
|
+
removing ...
|
|
19
|
+
</template>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<template v-else-if="state === 'loaded'">
|
|
23
|
+
<template v-if="$slots.loaded">
|
|
24
|
+
<slot name="loaded" />
|
|
25
|
+
</template>
|
|
26
|
+
<template v-else>
|
|
27
|
+
removed!
|
|
28
|
+
</template>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<template v-else-if="state === 'error'">
|
|
32
|
+
<template v-if="$slots.error">
|
|
33
|
+
<slot name="error" />
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else>
|
|
36
|
+
{{ state }}
|
|
37
|
+
</template>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
export default {
|
|
45
|
+
name: 'RemoveTicket',
|
|
46
|
+
props: {
|
|
47
|
+
state: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "default"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
|
|
57
|
+
</style>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<!-- https://dockyard.com/blog/2020/03/02/accessible-loading-indicatorswith-no-extra-elements -->
|
|
4
|
+
|
|
5
|
+
<b-button @click="$emit('click')" :variant="variant" :type="type" aria-live="polite" :aria-busy="loading">
|
|
6
|
+
|
|
7
|
+
<remove-ticket v-if="variant === 'remove-ticket'" :state="state">
|
|
8
|
+
<template v-for="(index, name) in $slots" v-slot:[name]>
|
|
9
|
+
<slot :name="name" />
|
|
10
|
+
</template>
|
|
11
|
+
</remove-ticket>
|
|
12
|
+
|
|
13
|
+
<template v-else>
|
|
14
|
+
|
|
15
|
+
<template v-if="state === 'default'">
|
|
16
|
+
<template v-if="$slots.default">
|
|
17
|
+
<slot name="default" />
|
|
18
|
+
</template>
|
|
19
|
+
<template v-else>
|
|
20
|
+
{{ state }}
|
|
21
|
+
</template>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<template v-else-if="state === 'loading'">
|
|
25
|
+
<template v-if="$slots.loading">
|
|
26
|
+
<slot name="loading" />
|
|
27
|
+
</template>
|
|
28
|
+
<template v-else>
|
|
29
|
+
{{ state }}
|
|
30
|
+
</template>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<template v-else-if="state === 'loaded'">
|
|
34
|
+
<template v-if="$slots.loaded">
|
|
35
|
+
<slot name="loaded" />
|
|
36
|
+
</template>
|
|
37
|
+
<template v-else>
|
|
38
|
+
{{ state }}
|
|
39
|
+
</template>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<template v-else-if="state === 'error'">
|
|
43
|
+
<template v-if="$slots.error">
|
|
44
|
+
<slot name="error" />
|
|
45
|
+
</template>
|
|
46
|
+
<template v-else>
|
|
47
|
+
{{ state }}
|
|
48
|
+
</template>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
</b-button>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
import { BButton } from 'bootstrap-vue'
|
|
58
|
+
import { RemoveTicket } from './br_button/components'
|
|
59
|
+
|
|
60
|
+
export default {
|
|
61
|
+
name: "BrButton",
|
|
62
|
+
props: {
|
|
63
|
+
state: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "default"
|
|
66
|
+
},
|
|
67
|
+
variant: {
|
|
68
|
+
type: String
|
|
69
|
+
},
|
|
70
|
+
type: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: "button"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
loading() {
|
|
77
|
+
return this.state === "loading" ? "true" : "false";
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
components: {
|
|
81
|
+
BButton,
|
|
82
|
+
RemoveTicket
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import Container from './components/container'
|
|
3
2
|
import EventSummary from './components/event_summary'
|
|
4
3
|
import AccountTitle from './components/account_title'
|
|
@@ -23,6 +22,7 @@ import HelpRow from './components/help_row'
|
|
|
23
22
|
import VideoContent from './components/video_content'
|
|
24
23
|
import PaymentLogo from './components/payment_logo'
|
|
25
24
|
import SkipLink from './components/skip_link'
|
|
25
|
+
import BrButton from './components/br_button'
|
|
26
26
|
|
|
27
27
|
export {
|
|
28
28
|
Loader,
|
|
@@ -48,5 +48,6 @@ export {
|
|
|
48
48
|
CardDisplay,
|
|
49
49
|
VideoContent,
|
|
50
50
|
PaymentLogo,
|
|
51
|
-
SkipLink
|
|
51
|
+
SkipLink,
|
|
52
|
+
BrButton
|
|
52
53
|
};
|
package/package.json
CHANGED