barbican-reset 3.7.0 → 3.9.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/BrContainer/Component.vue +84 -0
- package/components/BrFormRow.vue +46 -11
- package/components/BrFormUpdate.vue +1 -1
- package/css/index.css +118 -145
- package/css/reset.css +1 -1
- package/css/typography.css +1 -21
- package/index.js +44 -79
- package/package.json +4 -11
- package/patterns/gulpfile.js +11 -15
- package/scripts/helpers/logObject.js +11 -0
- package/scripts/helpers.js +3 -0
- package/scss/_br-button.scss +4 -0
- package/scss/_br-container.scss +6 -1
- package/scss/_br-form-row.scss +3 -4
- package/scss/_footer.scss +0 -9
- package/scss/_header.scss +0 -13
- package/scss/helpers/mixins/_br-alert.scss +0 -4
- package/scss/helpers/mixins/_br-form-row.scss +4 -2
- package/scss/helpers/mixins/buttons/_custom.scss +7 -0
- package/scss/helpers/variables/_typography.scss +2 -0
- package/scss/helpers/variables/colors/_grey.scss +0 -2
- package/scss/helpers/variables/index.scss +5 -3
- package/scss/index.scss +5 -7
- package/scss/typography.scss +3 -14
- package/components/BrContainer.vue +0 -118
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="styleComponent">
|
|
3
|
+
<div :class="styleOuter">
|
|
4
|
+
<div :class="styleInner">
|
|
5
|
+
<slot />
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="br-container--image">
|
|
9
|
+
<slot name="image" />
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
props: {
|
|
17
|
+
splash: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
},
|
|
21
|
+
masthead: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
thin: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false,
|
|
28
|
+
},
|
|
29
|
+
header: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: false,
|
|
32
|
+
},
|
|
33
|
+
footer: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
styleComponent() {
|
|
40
|
+
let classNames = ['br-container']
|
|
41
|
+
|
|
42
|
+
if (this.masthead) {
|
|
43
|
+
classNames.push('masthead')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return classNames
|
|
47
|
+
},
|
|
48
|
+
styleOuter() {
|
|
49
|
+
let classNames = ['br-container--outer']
|
|
50
|
+
|
|
51
|
+
if (this.masthead) {
|
|
52
|
+
classNames.push('masthead')
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (this.splash) {
|
|
56
|
+
classNames.push('splash')
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return classNames
|
|
60
|
+
},
|
|
61
|
+
styleInner() {
|
|
62
|
+
let classNames = ['br-container--inner']
|
|
63
|
+
|
|
64
|
+
if (this.masthead) {
|
|
65
|
+
classNames.push('masthead')
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (this.thin) {
|
|
69
|
+
classNames.push('thin')
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (this.header) {
|
|
73
|
+
classNames.push('header')
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (this.footer) {
|
|
77
|
+
classNames.push('footer')
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return classNames
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
}
|
|
84
|
+
</script>
|
package/components/BrFormRow.vue
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div :class="styleRow">
|
|
3
|
+
<template v-if="label">
|
|
4
|
+
<label v-if="input_active" :for="generateInputID">
|
|
5
|
+
<strong>{{ label }}</strong>
|
|
6
|
+
<span v-if="required"> (required)</span>
|
|
7
|
+
<span v-if="optional"> (optional)</span>
|
|
8
|
+
</label>
|
|
9
|
+
<div class="fake-label" v-else>
|
|
10
|
+
<strong>
|
|
11
|
+
{{ label }}
|
|
12
|
+
</strong>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
8
15
|
<div :class="[`content`, { editable }, { label }, { submit }, { radios }]">
|
|
9
16
|
<br-button v-if="editable" variant="input-edit" @click="$emit('edit')">
|
|
10
17
|
<edit-icon />
|
|
@@ -15,8 +22,8 @@
|
|
|
15
22
|
</template>
|
|
16
23
|
|
|
17
24
|
<script>
|
|
18
|
-
import BrButton from
|
|
19
|
-
import EditIcon from
|
|
25
|
+
import BrButton from '#components/BrButton.vue'
|
|
26
|
+
import EditIcon from '#icons/account/edit.vue'
|
|
20
27
|
|
|
21
28
|
export default {
|
|
22
29
|
components: {
|
|
@@ -27,6 +34,13 @@ export default {
|
|
|
27
34
|
label: {
|
|
28
35
|
type: String,
|
|
29
36
|
},
|
|
37
|
+
input_id: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
input_active: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: true,
|
|
43
|
+
},
|
|
30
44
|
required: {
|
|
31
45
|
type: Boolean,
|
|
32
46
|
},
|
|
@@ -42,11 +56,32 @@ export default {
|
|
|
42
56
|
radios: {
|
|
43
57
|
type: Boolean,
|
|
44
58
|
},
|
|
59
|
+
class: {
|
|
60
|
+
type: String,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
createKebabCase(value = '') {
|
|
65
|
+
return value.toLowerCase().split(' ').join('-')
|
|
66
|
+
},
|
|
45
67
|
},
|
|
46
68
|
computed: {
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
generateInputID() {
|
|
70
|
+
if (!this.label) {
|
|
71
|
+
return 'undefined'
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return this.input_id ? this.input_id : this.createKebabCase(this.label)
|
|
75
|
+
},
|
|
76
|
+
styleRow() {
|
|
77
|
+
let styles = ['br-form-row']
|
|
78
|
+
|
|
79
|
+
if (this.class) {
|
|
80
|
+
styles.push(this.class)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return styles.join(' ')
|
|
49
84
|
},
|
|
50
85
|
},
|
|
51
|
-
}
|
|
86
|
+
}
|
|
52
87
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="br-form-update">
|
|
3
3
|
<div class="br-form-update--input" data-test="email"><slot /></div>
|
|
4
|
-
<br-button @click
|
|
4
|
+
<br-button @click="$emit('update')" data-test="update">
|
|
5
5
|
update
|
|
6
6
|
</br-button>
|
|
7
7
|
</div>
|