barbican-reset 1.6.1 → 1.6.2
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/{alert.vue → br_alert.vue} +1 -1
- package/components/br_form_group.vue +47 -0
- package/components/video_content.vue +3 -3
- package/helpers/mixins/_buttons.scss +9 -0
- package/helpers/mixins/input/_text.scss +7 -1
- package/icons/account/edit.vue +5 -0
- package/icons/account/index.js +3 -1
- package/index.js +4 -4
- package/package.json +1 -1
- package/scss/_alert.scss +2 -2
- package/scss/_btn.scss +4 -0
- package/scss/_form-group.scss +59 -0
- package/scss/index.scss +1 -0
- package/components/form_group.vue +0 -92
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="br-form-group">
|
|
3
|
+
<label v-if="label" :for="id">
|
|
4
|
+
<strong>{{ label }}</strong> <span v-if="label && required">(required)</span><span v-if="label && optional">(optional)</span>
|
|
5
|
+
</label>
|
|
6
|
+
<div :class="[`content`,{ editable },{ label },{ submit }]">
|
|
7
|
+
<b-button v-if="editable" variant="input-edit" @click="$emit('edit')">
|
|
8
|
+
<edit-icon />
|
|
9
|
+
</b-button>
|
|
10
|
+
<slot />
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript">
|
|
16
|
+
import { BButton } from 'bootstrap-vue'
|
|
17
|
+
import { EditIcon } from '../icons/account'
|
|
18
|
+
export default {
|
|
19
|
+
name: 'BrFormGroup',
|
|
20
|
+
components: {
|
|
21
|
+
BButton,
|
|
22
|
+
EditIcon
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
label: {
|
|
26
|
+
type: String
|
|
27
|
+
},
|
|
28
|
+
required: {
|
|
29
|
+
type: Boolean
|
|
30
|
+
},
|
|
31
|
+
optional: {
|
|
32
|
+
type: Boolean
|
|
33
|
+
},
|
|
34
|
+
submit: {
|
|
35
|
+
type: Boolean
|
|
36
|
+
},
|
|
37
|
+
editable: {
|
|
38
|
+
type: Boolean
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
computed: {
|
|
42
|
+
id() {
|
|
43
|
+
return this.label.toLowerCase().split(" ").join("_");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<div v-html="data.markup" :class="$style.brightcove"></div>
|
|
10
10
|
|
|
11
|
-
<alert v-if="data.isExpired" error center inline>Event has passed.</alert>
|
|
11
|
+
<br-alert v-if="data.isExpired" error center inline>Event has passed.</br-alert>
|
|
12
12
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import { FluidIframe,
|
|
42
|
+
import { FluidIframe, BrAlert } from 'barbican-reset'
|
|
43
43
|
export default {
|
|
44
44
|
props: {
|
|
45
45
|
data: {
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
this.data.isExpired = this.data.brightcove.isExpired;
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
components: { FluidIframe,
|
|
61
|
+
components: { FluidIframe, BrAlert },
|
|
62
62
|
methods: {
|
|
63
63
|
formatDateTime(date) {
|
|
64
64
|
return this.$moment(date).format("LT ddd D MMM YYYY");
|
|
@@ -136,6 +136,15 @@
|
|
|
136
136
|
@include button-outline($c-grey-night);
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
+
@mixin btn-input-edit {
|
|
140
|
+
@include button-outline($c-grey-steel);
|
|
141
|
+
background-color: $c-grey-pearl;
|
|
142
|
+
border-color: $c-border-strong;
|
|
143
|
+
border-bottom-left-radius: 0;
|
|
144
|
+
border-top-left-radius: 0;
|
|
145
|
+
padding: 0.625rem 0.75rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
139
148
|
@mixin btn-cinema {
|
|
140
149
|
@include button-solid($c-brand-cinema);
|
|
141
150
|
}
|
|
@@ -3,5 +3,11 @@
|
|
|
3
3
|
border: solid $border-width $c-border-strong;
|
|
4
4
|
padding: 0.875rem 0.875rem 0.75rem;
|
|
5
5
|
background-color: $c-grey-alpine;
|
|
6
|
-
border-radius: $border-radius-lg;
|
|
6
|
+
border-radius: $border-radius-lg;
|
|
7
|
+
color: $c-grey-night;
|
|
8
|
+
|
|
9
|
+
&:disabled, &[readonly] {
|
|
10
|
+
background-color: $c-grey-alpine;
|
|
11
|
+
color: $c-grey-steel;
|
|
12
|
+
}
|
|
7
13
|
}
|
package/icons/account/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import VideoIcon from './video'
|
|
|
4
4
|
import PaymentIcon from './payment'
|
|
5
5
|
import OrdersIcon from './orders'
|
|
6
6
|
import SupportIcon from './support'
|
|
7
|
+
import EditIcon from './edit'
|
|
7
8
|
|
|
8
9
|
export {
|
|
9
10
|
PersonalIcon,
|
|
@@ -11,5 +12,6 @@ export {
|
|
|
11
12
|
VideoIcon,
|
|
12
13
|
PaymentIcon,
|
|
13
14
|
OrdersIcon,
|
|
14
|
-
SupportIcon
|
|
15
|
+
SupportIcon,
|
|
16
|
+
EditIcon
|
|
15
17
|
}
|
package/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import Container from './components/container'
|
|
|
2
2
|
import EventSummary from './components/event_summary'
|
|
3
3
|
import AccountTitle from './components/account_title'
|
|
4
4
|
import Wrap from './components/wrap'
|
|
5
|
-
import Alert from './components/alert'
|
|
6
5
|
import Loader from './components/loader'
|
|
7
6
|
import RelatedTitle from './components/related_title'
|
|
8
7
|
import RelatedCard from './components/related_card'
|
|
@@ -12,7 +11,6 @@ import Placeholder from './components/placeholder'
|
|
|
12
11
|
import CardDisplay from './components/card_display'
|
|
13
12
|
import FormSection from './components/form_section'
|
|
14
13
|
import FormUpdate from './components/form_update'
|
|
15
|
-
import FormGroup from './components/form_group'
|
|
16
14
|
import RadioGroup from './components/radio_group'
|
|
17
15
|
import FooterUpper from './components/footer_upper'
|
|
18
16
|
import FooterLogos from './components/footer_logos'
|
|
@@ -22,11 +20,13 @@ import HelpRow from './components/help_row'
|
|
|
22
20
|
import VideoContent from './components/video_content'
|
|
23
21
|
import PaymentLogo from './components/payment_logo'
|
|
24
22
|
import SkipLink from './components/skip_link'
|
|
23
|
+
import BrAlert from './components/br_alert'
|
|
25
24
|
import BrButton from './components/br_button'
|
|
25
|
+
import BrFormGroup from './components/br_form_group'
|
|
26
26
|
|
|
27
27
|
export {
|
|
28
28
|
Loader,
|
|
29
|
-
|
|
29
|
+
BrAlert,
|
|
30
30
|
RelatedTitle,
|
|
31
31
|
RelatedCard,
|
|
32
32
|
RelatedRow,
|
|
@@ -37,7 +37,7 @@ export {
|
|
|
37
37
|
Placeholder,
|
|
38
38
|
FormSection,
|
|
39
39
|
FormUpdate,
|
|
40
|
-
|
|
40
|
+
BrFormGroup,
|
|
41
41
|
RadioGroup,
|
|
42
42
|
EventSummary,
|
|
43
43
|
FooterUpper,
|
package/package.json
CHANGED
package/scss/_alert.scss
CHANGED
|
@@ -56,10 +56,10 @@ $error_focus: $c-status-error, $c-status-error-fade;
|
|
|
56
56
|
|
|
57
57
|
.wrap {
|
|
58
58
|
@include wrap($neutral_wrap...);
|
|
59
|
-
border-radius: $border-radius;
|
|
59
|
+
border-radius: $border-radius-lg;
|
|
60
60
|
border-width: $border-width;
|
|
61
|
+
padding: 0.75rem 0.875rem;
|
|
61
62
|
border-style: solid;
|
|
62
|
-
padding: $space;
|
|
63
63
|
|
|
64
64
|
.btn.btn-link, a {
|
|
65
65
|
@include status_focus($neutral_focus...);
|
package/scss/_btn.scss
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
|
|
2
|
+
.br-form-group {
|
|
3
|
+
|
|
4
|
+
&:not(:last-of-type) {
|
|
5
|
+
margin-bottom: 1rem;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@include media-breakpoint-up(sm) {
|
|
9
|
+
grid-template-columns: 33fr 67fr;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: $gap-account;
|
|
12
|
+
display: grid;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
label {
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
|
|
18
|
+
@include media-breakpoint-down(sm) {
|
|
19
|
+
margin-bottom: 0.5rem;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
input {
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.content {
|
|
29
|
+
|
|
30
|
+
&.editable {
|
|
31
|
+
flex-direction: row-reverse;
|
|
32
|
+
display: flex;
|
|
33
|
+
|
|
34
|
+
input[type=text], input[type=email] {
|
|
35
|
+
border-bottom-right-radius: 0;
|
|
36
|
+
border-top-right-radius: 0;
|
|
37
|
+
border-right: none;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:not(.label) {
|
|
42
|
+
@include media-breakpoint-up(sm) {
|
|
43
|
+
grid-column: 2 / 3;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.submit {
|
|
48
|
+
justify-content: flex-end;
|
|
49
|
+
display: flex;
|
|
50
|
+
gap: 1rem;
|
|
51
|
+
|
|
52
|
+
@include media-breakpoint-down(sm) {
|
|
53
|
+
> button {
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
package/scss/index.scss
CHANGED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.container">
|
|
3
|
-
<label v-if="label" :for="id">
|
|
4
|
-
<strong>{{ label }}</strong> <span v-if="label && required">(required)</span><span v-if="label && optional">(optional)</span>
|
|
5
|
-
</label>
|
|
6
|
-
<div :class="styleContent">
|
|
7
|
-
<slot />
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script type="text/javascript">
|
|
13
|
-
export default {
|
|
14
|
-
name: 'FormGroup',
|
|
15
|
-
props: {
|
|
16
|
-
label: {
|
|
17
|
-
type: String
|
|
18
|
-
},
|
|
19
|
-
required: {
|
|
20
|
-
type: Boolean
|
|
21
|
-
},
|
|
22
|
-
optional: {
|
|
23
|
-
type: Boolean
|
|
24
|
-
},
|
|
25
|
-
submit: {
|
|
26
|
-
type: Boolean
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
computed: {
|
|
30
|
-
styleContent() {
|
|
31
|
-
const style = this.$style;
|
|
32
|
-
let output = [style.content];
|
|
33
|
-
if (!this.label) { output.push(style.no_label); }
|
|
34
|
-
if (this.submit) { output.push(style.submit); }
|
|
35
|
-
return output;
|
|
36
|
-
},
|
|
37
|
-
id() {
|
|
38
|
-
return this.label.toLowerCase().split(" ").join("_");
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<style lang="scss" module>
|
|
45
|
-
|
|
46
|
-
.container {
|
|
47
|
-
|
|
48
|
-
&:not(:last-of-type) {
|
|
49
|
-
margin-bottom: 1rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@include media-breakpoint-up(sm) {
|
|
53
|
-
grid-template-columns: 33fr 67fr;
|
|
54
|
-
align-items: center;
|
|
55
|
-
gap: $gap-account;
|
|
56
|
-
display: grid;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
label {
|
|
60
|
-
font-weight: normal;
|
|
61
|
-
|
|
62
|
-
@include media-breakpoint-down(sm) {
|
|
63
|
-
margin-bottom: 0.5rem;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
input {
|
|
68
|
-
width: 100%;
|
|
69
|
-
margin: 0;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.content {
|
|
74
|
-
|
|
75
|
-
&.no_label {
|
|
76
|
-
@include media-breakpoint-up(sm) {
|
|
77
|
-
grid-column: 2 / 3;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&.submit {
|
|
82
|
-
text-align: right;
|
|
83
|
-
|
|
84
|
-
@include media-breakpoint-down(sm) {
|
|
85
|
-
> button {
|
|
86
|
-
width: 100%;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
</style>
|