barbican-reset 2.31.0 → 2.33.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.
- package/components/br_alert.vue +25 -15
- package/components/br_form_row.vue +4 -1
- package/helpers/mixins/_br-alert.scss +11 -0
- package/helpers/mixins/_br-form-row.scss +4 -0
- package/icons/index.js +7 -15
- package/icons/information.vue +16 -0
- package/package.json +1 -1
- package/scss/card/_confirm.scss +2 -4
package/components/br_alert.vue
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="[`br-alert`,{ center }]" :data-test="`alert-${this.getStatus}`">
|
|
3
|
-
<div :class="[`wrap`, getStatus,{ inline },{ toggle }]">
|
|
4
|
-
<span :class="{ flex }">
|
|
2
|
+
<div :class="[`br-alert`, { center }]" :data-test="`alert-${this.getStatus}`">
|
|
3
|
+
<div :class="[`wrap`, getStatus, { inline }, { toggle }]">
|
|
4
|
+
<span :class="[{ flex }, { icon }]">
|
|
5
5
|
<div class="title" v-if="title.length > 0 && !toggle">{{ title }}</div>
|
|
6
6
|
<slot />
|
|
7
7
|
</span>
|
|
8
|
-
<b-button
|
|
8
|
+
<b-button
|
|
9
|
+
v-if="toggle"
|
|
10
|
+
variant="exit"
|
|
11
|
+
:class="getStatus"
|
|
12
|
+
@click="$emit('close')">
|
|
9
13
|
<close-icon :status="getStatus" />
|
|
10
14
|
</b-button>
|
|
11
15
|
</div>
|
|
@@ -16,17 +20,21 @@
|
|
|
16
20
|
import { BButton } from 'bootstrap-vue'
|
|
17
21
|
import { CloseIcon } from 'barbican-reset/icons/stream'
|
|
18
22
|
export default {
|
|
19
|
-
name:
|
|
23
|
+
name: 'BrAlert',
|
|
20
24
|
components: {
|
|
21
25
|
BButton,
|
|
22
26
|
CloseIcon,
|
|
23
27
|
},
|
|
24
28
|
computed: {
|
|
25
29
|
getStatus() {
|
|
26
|
-
if (this.error) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
if (this.error) {
|
|
31
|
+
return 'error'
|
|
32
|
+
}
|
|
33
|
+
if (this.success) {
|
|
34
|
+
return 'success'
|
|
35
|
+
}
|
|
36
|
+
return 'neutral'
|
|
37
|
+
},
|
|
30
38
|
},
|
|
31
39
|
props: {
|
|
32
40
|
inline: {
|
|
@@ -51,14 +59,16 @@ export default {
|
|
|
51
59
|
},
|
|
52
60
|
title: {
|
|
53
61
|
type: String,
|
|
54
|
-
default: ''
|
|
62
|
+
default: '',
|
|
55
63
|
},
|
|
56
64
|
flex: {
|
|
57
65
|
type: Boolean,
|
|
58
66
|
default: false,
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
67
|
+
},
|
|
68
|
+
icon: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: false,
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
}
|
|
63
74
|
</script>
|
|
64
|
-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<label v-if="label" :for="id">
|
|
4
4
|
<strong>{{ label }}</strong> <span v-if="label && required">(required)</span><span v-if="label && optional">(optional)</span>
|
|
5
5
|
</label>
|
|
6
|
-
<div :class="[`content`,{ editable },{ label },{ submit }]">
|
|
6
|
+
<div :class="[`content`,{ editable },{ label },{ submit },{ radios }]">
|
|
7
7
|
<b-button v-if="editable" variant="input-edit" @click="$emit('edit')">
|
|
8
8
|
<edit-icon />
|
|
9
9
|
</b-button>
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
editable: {
|
|
38
38
|
type: Boolean
|
|
39
|
+
},
|
|
40
|
+
radios: {
|
|
41
|
+
type: Boolean
|
|
39
42
|
}
|
|
40
43
|
},
|
|
41
44
|
computed: {
|
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
display: flex;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
@mixin br-alert--icon {
|
|
78
|
+
grid-auto-flow: column;
|
|
79
|
+
display: inline-grid;
|
|
80
|
+
align-items: center;
|
|
81
|
+
gap: 0.75rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
@mixin br-alert--setup {
|
|
78
85
|
@include x-small-down {
|
|
79
86
|
font-size: $font-size-sm;
|
|
@@ -87,6 +94,10 @@
|
|
|
87
94
|
@include br-alert--flex;
|
|
88
95
|
}
|
|
89
96
|
|
|
97
|
+
.icon {
|
|
98
|
+
@include br-alert--icon;
|
|
99
|
+
}
|
|
100
|
+
|
|
90
101
|
.btn.btn-exit {
|
|
91
102
|
&.error {
|
|
92
103
|
@include br-alert-exit($error_focus...);
|
package/icons/index.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import CityOfLondonLogo from './city_of_london'
|
|
3
|
-
import CityOfLondonLockup from './city_of_london_lockup'
|
|
1
|
+
import ArrowBack from './arrow_back'
|
|
4
2
|
import ArrowIcon from './arrow'
|
|
3
|
+
import ArrowForward from './arrow_forward'
|
|
5
4
|
import BackArrow from './back_arrow'
|
|
5
|
+
import BarbicanLogo from './barbican'
|
|
6
6
|
import CartIcon from './cart'
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import CityOfLondonLogo from './city_of_london'
|
|
8
|
+
import CityOfLondonLockup from './city_of_london_lockup'
|
|
9
|
+
import InformationIcon from './information'
|
|
9
10
|
|
|
10
|
-
export {
|
|
11
|
-
BarbicanLogo,
|
|
12
|
-
CityOfLondonLogo,
|
|
13
|
-
CityOfLondonLockup,
|
|
14
|
-
ArrowIcon,
|
|
15
|
-
BackArrow,
|
|
16
|
-
CartIcon,
|
|
17
|
-
ArrowBack,
|
|
18
|
-
ArrowForward
|
|
19
|
-
};
|
|
11
|
+
export { ArrowBack, ArrowIcon, ArrowForward, BackArrow, BarbicanLogo, CartIcon, CityOfLondonLogo, CityOfLondonLockup, InformationIcon }
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg
|
|
3
|
+
width="16"
|
|
4
|
+
height="16"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
viewBox="0 0 20 20">
|
|
7
|
+
<path
|
|
8
|
+
d="M9,15h2V9H9V15z M10,7c0.3,0,0.5-0.1,0.7-0.3S11,6.3,11,6s-0.1-0.5-0.3-0.7C10.5,5.1,10.3,5,10,5S9.5,5.1,9.3,5.3 C9.1,5.5,9,5.7,9,6s0.1,0.5,0.3,0.7S9.7,7,10,7z M10,20c-1.4,0-2.7-0.3-3.9-0.8S3.8,18,2.9,17.1s-1.6-2-2.1-3.2S0,11.4,0,10 s0.3-2.7,0.8-3.9S2,3.8,2.9,2.9s2-1.6,3.2-2.1S8.6,0,10,0s2.7,0.3,3.9,0.8s2.3,1.2,3.2,2.1s1.6,2,2.1,3.2S20,8.6,20,10 s-0.3,2.7-0.8,3.9s-1.2,2.3-2.1,3.2s-2,1.6-3.2,2.1S11.4,20,10,20z M10,18c2.2,0,4.1-0.8,5.7-2.3S18,12.2,18,10s-0.8-4.1-2.3-5.7 S12.2,2,10,2S5.9,2.8,4.3,4.3S2,7.8,2,10s0.8,4.1,2.3,5.7S7.8,18,10,18z" />
|
|
9
|
+
</svg>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
name: 'Information',
|
|
15
|
+
}
|
|
16
|
+
</script>
|
package/package.json
CHANGED
package/scss/card/_confirm.scss
CHANGED
|
@@ -5,10 +5,8 @@
|
|
|
5
5
|
margin-left: auto;
|
|
6
6
|
max-width: 20rem;
|
|
7
7
|
|
|
8
|
-
$gap: 0.625rem;
|
|
9
|
-
|
|
10
8
|
svg {
|
|
11
|
-
margin-bottom:
|
|
9
|
+
margin-bottom: 0.125rem;
|
|
12
10
|
}
|
|
13
11
|
|
|
14
12
|
.card-title {
|
|
@@ -22,6 +20,6 @@
|
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
.card-text {
|
|
25
|
-
margin-top:
|
|
23
|
+
margin-top: 1rem;
|
|
26
24
|
}
|
|
27
25
|
}
|