barbican-reset 2.53.0 → 2.55.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/BrCard.vue +48 -4
- package/components/BrCardBody.vue +20 -0
- package/components/BrCardTitle.vue +1 -1
- package/components/BrFormBlock.vue +1 -1
- package/components/BrFormCheckbox/Component.vue +22 -5
- package/components/BrFormCheckboxGroup/Component.vue +13 -9
- package/components/BrFormInput/Component.vue +7 -4
- package/components/BrFormPassword.vue +8 -12
- package/components/BrFormRadio/Component.vue +30 -11
- package/components/BrFormRadioGroup/Component.vue +25 -8
- package/components/BrFormTextarea/Component.vue +5 -5
- package/components/EventSummary.vue +7 -4
- package/css/index.css +333 -175
- package/index.js +16 -7
- package/package.json +1 -1
- package/patterns/scss/styles.scss +1 -2
- package/scss/_atomic.scss +9 -83
- package/scss/_br-button.scss +1 -1
- package/scss/_br-form-row.scss +1 -1
- package/scss/_btn.scss +1 -1
- package/scss/_font.scss +51 -0
- package/scss/_form.scss +3 -3
- package/scss/_klaro.scss +6 -6
- package/scss/_list.scss +0 -1
- package/scss/_table.scss +42 -13
- package/scss/atomic/font-weights.scss +11 -0
- package/scss/atomic/margins.scss +17 -0
- package/scss/atomic/min-heights.scss +9 -0
- package/scss/atomic/paddings.scss +16 -0
- package/scss/atomic/text-aligns.scss +11 -0
- package/scss/card/_account.scss +1 -0
- package/scss/card/_login.scss +1 -2
- package/scss/card/index.scss +5 -95
- package/scss/helpers/mixins/_br-alert.scss +1 -1
- package/scss/helpers/mixins/_br-card.scss +14 -7
- package/scss/helpers/mixins/_buttons.scss +3 -2
- package/scss/helpers/mixins/_headings.scss +1 -1
- package/scss/helpers/mixins/buttons/_setup.scss +3 -14
- package/scss/helpers/mixins/index.scss +0 -1
- package/scss/helpers/mixins/input/_generic.scss +1 -1
- package/scss/helpers/mixins/input/_radio.scss +1 -1
- package/scss/helpers/mixins/input/_select.scss +1 -1
- package/scss/helpers/mixins/table/_basket.scss +8 -9
- package/scss/helpers/mixins/table/_details.scss +1 -1
- package/scss/helpers/mixins/table/_etickets.scss +1 -1
- package/scss/helpers/mixins/table/_gifts.scss +1 -1
- package/scss/helpers/mixins/table/_orders.scss +1 -1
- package/scss/helpers/mixins/table/_preferences.scss +1 -1
- package/scss/helpers/mixins/table/_tickets.scss +1 -1
- package/scss/helpers/variables/_typography.scss +0 -10
- package/scss/index.scss +2 -9
- package/components/BrFormCheckbox/Demo.vue +0 -27
- package/components/BrFormCheckboxGroup/Demo.vue +0 -42
- package/components/BrFormInput/Demo.vue +0 -64
- package/components/BrFormRadio/Demo.vue +0 -33
- package/components/BrFormRadioGroup/Demo.vue +0 -22
- package/components/BrFormTextarea/Demo.vue +0 -22
- package/scss/helpers/mixins/_font.scss +0 -49
package/components/BrCard.vue
CHANGED
|
@@ -1,8 +1,52 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
3
|
-
<div v-if="$slots.header" class="
|
|
4
|
-
<slot name="header"
|
|
2
|
+
<div :class="containerClasses">
|
|
3
|
+
<div v-if="$slots.header" :class="headerClasses">
|
|
4
|
+
<slot name="header" />
|
|
5
5
|
</div>
|
|
6
|
-
<
|
|
6
|
+
<template v-if="bodyRequired">
|
|
7
|
+
<br-card-body :styles="body">
|
|
8
|
+
<slot />
|
|
9
|
+
</br-card-body>
|
|
10
|
+
</template>
|
|
11
|
+
<template v-else>
|
|
12
|
+
<slot />
|
|
13
|
+
</template>
|
|
7
14
|
</div>
|
|
8
15
|
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import BrCardBody from "./BrCardBody";
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
components: { BrCardBody },
|
|
22
|
+
props: ["container", "header", "body"],
|
|
23
|
+
computed: {
|
|
24
|
+
bodyRequired() {
|
|
25
|
+
if (this.body == "none") return false;
|
|
26
|
+
if (!this.$slots.default) return false;
|
|
27
|
+
return true;
|
|
28
|
+
},
|
|
29
|
+
containerClasses() {
|
|
30
|
+
let classNames = ["card"];
|
|
31
|
+
|
|
32
|
+
if (this.container) classNames.push(this.container);
|
|
33
|
+
|
|
34
|
+
return classNames.join(" ");
|
|
35
|
+
},
|
|
36
|
+
headerClasses() {
|
|
37
|
+
let classNames = ["card-header"];
|
|
38
|
+
|
|
39
|
+
if (this.header) classNames.push(this.header);
|
|
40
|
+
|
|
41
|
+
return classNames.join(" ");
|
|
42
|
+
},
|
|
43
|
+
bodyClasses() {
|
|
44
|
+
let classNames = ["card-body"];
|
|
45
|
+
|
|
46
|
+
if (this.body) classNames.push(this.body);
|
|
47
|
+
|
|
48
|
+
return classNames.join(" ");
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="classNames">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
props: ["styles"],
|
|
10
|
+
computed: {
|
|
11
|
+
classNames() {
|
|
12
|
+
let classNames = ["card-body"];
|
|
13
|
+
|
|
14
|
+
if (this.styles) classNames.push(this.styles);
|
|
15
|
+
|
|
16
|
+
return classNames.join(" ");
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
<div class="br-checkbox">
|
|
3
3
|
<!-- @TODO: remove success prop and style scss from br-checkbox inheritence? -->
|
|
4
4
|
<input
|
|
5
|
-
|
|
6
|
-
:data-test="dataTest"
|
|
5
|
+
v-bind="$attrs"
|
|
7
6
|
:disabled="disabled"
|
|
8
7
|
:success="success"
|
|
9
8
|
:checked="checked"
|
|
10
9
|
:id="generateID"
|
|
11
10
|
type="checkbox"
|
|
12
11
|
:table="table"
|
|
13
|
-
:value="value"
|
|
14
12
|
:name="name"
|
|
13
|
+
v-model="model"
|
|
14
|
+
:value="value"
|
|
15
15
|
/>
|
|
16
16
|
<label v-if="$slots.default" :for="generateID" ref="label"><slot /></label>
|
|
17
17
|
</div>
|
|
@@ -21,17 +21,34 @@
|
|
|
21
21
|
import mixins from "../../mixins/inputs";
|
|
22
22
|
|
|
23
23
|
export default {
|
|
24
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
25
|
+
inheritAttrs: false, // Allow us to put attributes on the input.
|
|
24
26
|
mixins: [mixins],
|
|
27
|
+
emits: ["update:modelValue", "change"],
|
|
25
28
|
props: [
|
|
26
|
-
"
|
|
29
|
+
"modelValue",
|
|
27
30
|
"disabled",
|
|
28
31
|
"success",
|
|
29
32
|
"checked",
|
|
30
33
|
"toggle",
|
|
31
34
|
"table",
|
|
32
|
-
"value",
|
|
33
35
|
"name",
|
|
34
36
|
"id",
|
|
37
|
+
"value",
|
|
35
38
|
],
|
|
39
|
+
computed: {
|
|
40
|
+
// You cannot use a prop with v-model, it results in the below error. The suggested option is to have a local
|
|
41
|
+
// property that wraps around the modelValue prop.
|
|
42
|
+
// Error: VueCompilerError: v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
43
|
+
model: {
|
|
44
|
+
get() {
|
|
45
|
+
return this.modelValue;
|
|
46
|
+
},
|
|
47
|
+
set(value) {
|
|
48
|
+
this.$emit("update:modelValue", value);
|
|
49
|
+
this.$emit("change", { value }); // Support @change.
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
36
53
|
};
|
|
37
54
|
</script>
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
<template v-if="options">
|
|
4
4
|
<br-form-checkbox
|
|
5
5
|
v-for="({ value, checked, text, dataTest }, index) in options"
|
|
6
|
-
|
|
6
|
+
v-model="model"
|
|
7
|
+
:value="value"
|
|
7
8
|
:dataTest="dataTest"
|
|
8
9
|
:checked="checked"
|
|
9
|
-
:value="value"
|
|
10
10
|
:name="name"
|
|
11
11
|
:key="index"
|
|
12
12
|
>
|
|
@@ -18,19 +18,23 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
-
import mixins from "../../mixins/inputs";
|
|
22
21
|
import BrFormCheckbox from "../BrFormCheckbox/Component";
|
|
23
22
|
|
|
24
23
|
export default {
|
|
25
|
-
|
|
26
|
-
props: ["
|
|
24
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
25
|
+
props: ["modelValue", "options", "name", "id"],
|
|
27
26
|
components: {
|
|
28
27
|
BrFormCheckbox,
|
|
29
28
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
computed: {
|
|
30
|
+
model: {
|
|
31
|
+
get() {
|
|
32
|
+
return this.modelValue;
|
|
33
|
+
},
|
|
34
|
+
set(value) {
|
|
35
|
+
this.$emit("update:modelValue", value);
|
|
36
|
+
},
|
|
37
|
+
},
|
|
34
38
|
},
|
|
35
39
|
};
|
|
36
40
|
</script>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<input
|
|
3
|
-
@input="(
|
|
3
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:autocomplete="autocomplete"
|
|
5
|
-
:data-test="dataTest"
|
|
6
6
|
:required="required"
|
|
7
7
|
:disabled="disabled"
|
|
8
8
|
:id="generateID"
|
|
9
|
-
:value="
|
|
9
|
+
:value="modelValue"
|
|
10
10
|
:type="type"
|
|
11
11
|
:name="name"
|
|
12
12
|
:min="min"
|
|
@@ -19,10 +19,13 @@
|
|
|
19
19
|
import mixins from "../../mixins/inputs";
|
|
20
20
|
|
|
21
21
|
export default {
|
|
22
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
23
|
+
inheritAttrs: false, // Allow us to put attributes on the input.
|
|
22
24
|
mixins: [mixins],
|
|
25
|
+
emits: ["update:modelValue"],
|
|
23
26
|
props: [
|
|
27
|
+
"modelValue",
|
|
24
28
|
"autocomplete",
|
|
25
|
-
"dataTest",
|
|
26
29
|
"required",
|
|
27
30
|
"disabled",
|
|
28
31
|
"value",
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="br-form-password">
|
|
3
3
|
<input
|
|
4
|
+
v-bind="$attrs"
|
|
4
5
|
:autocomplete="autocomplete"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:value="password"
|
|
6
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
7
|
+
:value="modelValue"
|
|
8
8
|
name="password"
|
|
9
9
|
:type="type"
|
|
10
10
|
required
|
|
11
11
|
:id="id"
|
|
12
|
+
:data-test="dataTest"
|
|
12
13
|
/>
|
|
13
14
|
<br-button
|
|
14
15
|
@click="showPassword = !showPassword"
|
|
@@ -30,6 +31,9 @@ import HidePasswordIcon from "../icons/password/hide";
|
|
|
30
31
|
import ShowPasswordIcon from "../icons/password/show";
|
|
31
32
|
|
|
32
33
|
export default {
|
|
34
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
35
|
+
inheritAttrs: false, // Allow us to put attributes on the input.
|
|
36
|
+
emits: ["update:modelValue"],
|
|
33
37
|
data() {
|
|
34
38
|
return {
|
|
35
39
|
password: "",
|
|
@@ -42,6 +46,7 @@ export default {
|
|
|
42
46
|
BrButton,
|
|
43
47
|
},
|
|
44
48
|
props: {
|
|
49
|
+
modelValue: {},
|
|
45
50
|
id: {
|
|
46
51
|
type: String,
|
|
47
52
|
default: "password",
|
|
@@ -49,15 +54,6 @@ export default {
|
|
|
49
54
|
dataTest: {
|
|
50
55
|
type: String,
|
|
51
56
|
default: "password-field",
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
methods: {
|
|
55
|
-
inputChange({ target }) {
|
|
56
|
-
let { value } = target;
|
|
57
|
-
|
|
58
|
-
this.password = value;
|
|
59
|
-
|
|
60
|
-
this.$emit("change", value);
|
|
61
57
|
},
|
|
62
58
|
},
|
|
63
59
|
computed: {
|
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="custom-radio">
|
|
3
3
|
<input
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
v-model="model"
|
|
6
6
|
:disabled="disabled"
|
|
7
|
-
:
|
|
8
|
-
:id="generateID"
|
|
7
|
+
:id="randomId"
|
|
9
8
|
:value="value"
|
|
10
9
|
type="radio"
|
|
11
|
-
:name="name"
|
|
12
|
-
|
|
10
|
+
:name="name"
|
|
11
|
+
/>
|
|
12
|
+
<label v-if="$slots.default" :for="randomId" ref="label"><slot /></label>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script>
|
|
17
|
-
import mixins from '../../mixins/inputs'
|
|
18
|
-
|
|
19
17
|
export default {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
19
|
+
inheritAttrs: false, // Allow us to put attributes on the input.
|
|
20
|
+
// @TODO:
|
|
21
|
+
// We may be able to get rid of name, value & disabled if we are using v-bind="$attrs"
|
|
22
|
+
props: ["id", "name", "value", "disabled", "modelValue"],
|
|
23
|
+
emits: ["update:modelValue", "change"],
|
|
24
|
+
computed: {
|
|
25
|
+
// You cannot use a prop with v-model, it results in the below error. The suggested option is to have a local
|
|
26
|
+
// property that wraps around the modelValue prop.
|
|
27
|
+
// Error: VueCompilerError: v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
28
|
+
model: {
|
|
29
|
+
get() {
|
|
30
|
+
return this.modelValue;
|
|
31
|
+
},
|
|
32
|
+
set(value) {
|
|
33
|
+
this.$emit("update:modelValue", value);
|
|
34
|
+
this.$emit("change", { value }); // Support @change.
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
randomId() {
|
|
38
|
+
return (Math.random() + 1).toString(36).substring(7);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
23
42
|
</script>
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
<div role="radiogroup" :id="id">
|
|
3
3
|
<template v-if="options">
|
|
4
4
|
<br-form-radio
|
|
5
|
-
v-for="(
|
|
6
|
-
|
|
7
|
-
:
|
|
8
|
-
:value="value"
|
|
5
|
+
v-for="(option, index) in options"
|
|
6
|
+
v-model="model"
|
|
7
|
+
:value="option.value"
|
|
9
8
|
:key="index"
|
|
10
|
-
:name="name"
|
|
11
|
-
|
|
9
|
+
:name="name"
|
|
10
|
+
>
|
|
11
|
+
{{ option.text }}
|
|
12
12
|
</br-form-radio>
|
|
13
13
|
</template>
|
|
14
14
|
<slot v-else></slot>
|
|
@@ -17,6 +17,23 @@
|
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
19
|
export default {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
21
|
+
props: {
|
|
22
|
+
modelValue: { type: [Array, Boolean] },
|
|
23
|
+
options: { type: Object },
|
|
24
|
+
name: { type: String },
|
|
25
|
+
id: { type: String },
|
|
26
|
+
},
|
|
27
|
+
computed: {
|
|
28
|
+
model: {
|
|
29
|
+
get() {
|
|
30
|
+
return this.modelValue;
|
|
31
|
+
},
|
|
32
|
+
set(value) {
|
|
33
|
+
this.$emit("update:modelValue", value);
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
};
|
|
22
39
|
</script>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<textarea
|
|
3
|
-
@input="(
|
|
3
|
+
@input="$emit('update:modelValue', $event.target.value)"
|
|
4
4
|
class="br-textarea form-control"
|
|
5
5
|
:placeholder="placeholder"
|
|
6
6
|
wrap="soft"
|
|
7
7
|
:id="id"
|
|
8
|
+
:value="modelValue"
|
|
8
9
|
></textarea>
|
|
9
10
|
</template>
|
|
10
11
|
|
|
11
12
|
<script>
|
|
12
|
-
import mixins from "../../mixins/inputs";
|
|
13
|
-
|
|
14
13
|
export default {
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
compatConfig: { COMPONENT_V_MODEL: false }, // THIS LINE IS IMPORTANT, WILL NOT WORK WITHOUT.
|
|
15
|
+
emits: ["update:modelValue"],
|
|
16
|
+
props: ["modelValue", "id", "value", "disabled", "placeholder"],
|
|
17
17
|
};
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -62,16 +62,19 @@ export default {
|
|
|
62
62
|
|
|
63
63
|
<style lang="scss" module>
|
|
64
64
|
@mixin title {
|
|
65
|
-
@include fontfamily-black;
|
|
66
65
|
letter-spacing: $headings-letter-spacing;
|
|
67
66
|
line-height: $line-height-sm;
|
|
67
|
+
font-weight: bold;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
@mixin subtitle {
|
|
71
71
|
@include title;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
|
|
73
|
+
& {
|
|
74
|
+
font-size: $h5-font-size;
|
|
75
|
+
color: $c-grey-l44;
|
|
76
|
+
font-weight: 400;
|
|
77
|
+
}
|
|
75
78
|
|
|
76
79
|
@include medium-up {
|
|
77
80
|
font-size: $h4-font-size;
|