@iamproperty/components 2.6.3 → 2.7.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/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/error.min.css +1 -0
- package/assets/css/error.min.css.map +1 -0
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/favicons/android-chrome-512x512-maskable.png +0 -0
- package/assets/js/modules/form.js +110 -0
- package/assets/js/modules/table.js +16 -8
- package/assets/js/scripts.bundle.js +85 -5
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +2 -2
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/_components.scss +14 -37
- package/assets/sass/_corefiles.scss +26 -43
- package/assets/sass/_forms.scss +10 -0
- package/assets/sass/_func.scss +6 -4
- package/assets/sass/_functions/functions.scss +54 -8
- package/assets/sass/_functions/mixins.scss +70 -18
- package/assets/sass/_functions/utilities.scss +13 -0
- package/assets/sass/_functions/variables.scss +82 -41
- package/assets/sass/_print.scss +2 -0
- package/assets/sass/components/accordion.scss +6 -4
- package/assets/sass/components/alert.scss +5 -3
- package/assets/sass/components/cardDeck.scss +1 -0
- package/assets/sass/components/carousel.scss +10 -40
- package/assets/sass/components/charts.scss +18 -11
- package/assets/sass/components/drawer.scss +5 -3
- package/assets/sass/components/header.scss +8 -1
- package/assets/sass/components/modal.scss +8 -5
- package/assets/sass/components/nav.scss +222 -26
- package/assets/sass/components/property-searchbar.scss +5 -0
- package/assets/sass/components/snapshot.scss +2 -0
- package/assets/sass/components/stepper.scss +5 -3
- package/assets/sass/components/tabs.scss +30 -2
- package/assets/sass/components/testimonial.scss +2 -0
- package/assets/sass/components/timeline.scss +5 -2
- package/assets/sass/core.scss +4 -4
- package/assets/sass/elements/buttons.scss +41 -88
- package/assets/sass/{components → elements}/card.scss +9 -0
- package/assets/sass/elements/container.scss +18 -15
- package/assets/sass/elements/forms.scss +66 -0
- package/assets/sass/elements/links.scss +2 -0
- package/assets/sass/elements/lists.scss +66 -2
- package/assets/sass/elements/panel.scss +162 -0
- package/assets/sass/elements/tables.scss +34 -0
- package/assets/sass/elements/tooltips.scss +33 -19
- package/assets/sass/elements/type.scss +44 -21
- package/assets/sass/email.scss +66 -0
- package/assets/sass/error.scss +5 -0
- package/assets/sass/foundations/brand.scss +6 -8
- package/assets/sass/foundations/circles.scss +2 -0
- package/assets/sass/foundations/icons.scss +3 -2
- package/assets/sass/foundations/media.scss +7 -3
- package/assets/sass/foundations/reboot.scss +12 -6
- package/assets/sass/foundations/root.scss +76 -18
- package/assets/sass/main.scss +5 -5
- package/dist/components.common.js +384 -131
- package/dist/components.common.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.css.map +1 -1
- package/dist/components.umd.js +384 -131
- package/dist/components.umd.js.map +1 -1
- package/dist/components.umd.min.js +1 -1
- package/dist/components.umd.min.js.map +1 -1
- package/package.json +6 -1
- package/src/components/Accordion/Accordion.vue +0 -2
- package/src/components/Alert/Alert.vue +1 -2
- package/src/components/CardDeck/CardDeck.vue +1 -2
- package/src/components/Carousel/Carousel.vue +1 -2
- package/src/components/Chart/Chart.vue +0 -1
- package/src/components/Drawer/Drawer.vue +0 -1
- package/src/components/Header/Header.vue +0 -1
- package/src/components/Modal/Modal.vue +0 -1
- package/src/components/Nav/Nav.vue +55 -7
- package/src/components/NoteFeed/NoteFeed.vue +79 -0
- package/src/components/NoteFeed/README.md +16 -0
- package/src/components/PropertySearchbar/PropertySearchbar.vue +0 -2
- package/src/components/Snapshot/Snapshot.vue +0 -1
- package/src/components/Stepper/Stepper.vue +0 -1
- package/src/components/Tabs/Tabs.vue +0 -1
- package/src/components/Testimonial/Testimonial.vue +0 -1
- package/src/components/Timeline/Timeline.vue +0 -1
- package/src/{components → elements}/Card/Card.vue +1 -3
- package/src/{components → elements}/Card/README.md +0 -0
- package/src/elements/FileUploads/FileUploads.vue +48 -0
- package/src/elements/FileUploads/README.md +24 -0
- package/src/elements/Input/Input.vue +33 -1
- package/src/elements/Input/README.md +1 -0
- package/src/index.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamproperty/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Component library for iamproperty",
|
|
6
6
|
"author": {
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
"build:docs": "vue-cli-service build docs/main.js",
|
|
15
15
|
"compile:js": "rollup --environment BUNDLE:true --config rollup.config.js --sourcemap && terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=assets/js/scripts.bundle.js.map,includeSources,url=scripts.bundle.min.js.map\" --output assets/js/scripts.bundle.min.js assets/js/scripts.bundle.js",
|
|
16
16
|
"compile:sass": "sass assets/sass/main.scss assets/css/style.min.css --style=compressed && sass assets/sass/core.scss assets/css/core.min.css --style=compressed",
|
|
17
|
+
"compile:email": "sass assets/sass/email.scss assets/css/email.min.css --style=compressed && node local_modules/email-css.js",
|
|
18
|
+
"compile:error": "sass assets/sass/error.scss assets/css/error.min.css --style=compressed && node local_modules/error-css.js",
|
|
17
19
|
"dev": "npm run serve",
|
|
18
20
|
"prepack": "npm run build",
|
|
19
21
|
"pull-request": "npm run test:unit && npm run test:scss && npm run test:approve && npm run compile:sass && npm run compile:js && npm run audit",
|
|
@@ -47,6 +49,7 @@
|
|
|
47
49
|
"@babel/core": "^7.16.5",
|
|
48
50
|
"@babel/eslint-parser": "^7.16.5",
|
|
49
51
|
"@babel/preset-env": "^7.16.5",
|
|
52
|
+
"@fullhuman/postcss-purgecss": "^4.1.3",
|
|
50
53
|
"@popperjs/core": "^2.11.0",
|
|
51
54
|
"@rollup/plugin-babel": "^5.3.0",
|
|
52
55
|
"@rollup/plugin-commonjs": "^19.0.0",
|
|
@@ -72,6 +75,8 @@
|
|
|
72
75
|
"jest-puppeteer": "^5.0.4",
|
|
73
76
|
"jest-puppeteer-preset": "^5.0.4",
|
|
74
77
|
"markdown-loader": "^6.0.0",
|
|
78
|
+
"postcss": "^8.4.7",
|
|
79
|
+
"postcss-css-variables": "^0.18.0",
|
|
75
80
|
"puppeteer": "^10.4.0",
|
|
76
81
|
"rollup": "^2.62.0",
|
|
77
82
|
"rollup-plugin-istanbul": "^3.0.0",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<style lang="scss">
|
|
11
|
-
@import "../../../assets/sass/_func.scss";
|
|
12
11
|
@import "../../../assets/sass/components/alert.scss";
|
|
13
12
|
</style>
|
|
14
13
|
|
|
@@ -19,7 +18,7 @@ export default {
|
|
|
19
18
|
name: 'Alert',
|
|
20
19
|
props: {
|
|
21
20
|
dismissible: {
|
|
22
|
-
type: String,
|
|
21
|
+
type: String|Boolean,
|
|
23
22
|
required: false,
|
|
24
23
|
default: false
|
|
25
24
|
},
|
|
@@ -11,12 +11,11 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<style lang="scss">
|
|
14
|
-
@import "../../../assets/sass/_func.scss";
|
|
15
14
|
@import "../../../assets/sass/components/cardDeck.scss";
|
|
16
15
|
</style>
|
|
17
16
|
|
|
18
17
|
<script>
|
|
19
|
-
import Card from '
|
|
18
|
+
import Card from '../../elements/Card/Card.vue'
|
|
20
19
|
|
|
21
20
|
export default {
|
|
22
21
|
components: {
|
|
@@ -26,13 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
<style lang="scss">
|
|
29
|
-
@import "../../../assets/sass/_func.scss";
|
|
30
29
|
@import "../../../assets/sass/components/carousel.scss";
|
|
31
30
|
</style>
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
<script>
|
|
35
|
-
import Card from '
|
|
34
|
+
import Card from '../../elements/Card/Card.vue'
|
|
36
35
|
import CardDeck from '../CardDeck/CardDeck.vue'
|
|
37
36
|
import carousel from '../../../assets/js/modules/carousel.js'
|
|
38
37
|
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
<input type="checkbox" name="showMenu" id="showMenu" class="d-none" />
|
|
5
5
|
<input type="checkbox" name="showSearch" id="showSearch" class="d-none" />
|
|
6
6
|
|
|
7
|
-
<div class="nav__inner">
|
|
7
|
+
<div class="nav__inner" v-if="isMarketplace === false">
|
|
8
8
|
<div class="container">
|
|
9
9
|
<div class="row">
|
|
10
|
-
<div class="col mw-md-fit-content nav__logo">
|
|
10
|
+
<div class="col mw-md-fit-content nav__logo" v-if="hasLogoSlot">
|
|
11
|
+
<slot name="logo"></slot>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="col mw-md-fit-content nav__logo" v-else>
|
|
11
14
|
<a href="/" class="text-decoration-none mb-0">
|
|
12
15
|
<Logo :id="logo" :path="logopath" :desc="logotext" class="pb-0"></Logo>
|
|
13
16
|
</a>
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
|
|
39
42
|
</div>
|
|
40
43
|
</div>
|
|
41
|
-
<div class="nav__menu--secondary
|
|
44
|
+
<div class="nav__menu--secondary" v-if="hasSecondarySlot">
|
|
42
45
|
<div class="container">
|
|
43
46
|
<slot name="secondary"></slot>
|
|
44
47
|
</div>
|
|
@@ -52,23 +55,62 @@
|
|
|
52
55
|
</div>
|
|
53
56
|
</div>
|
|
54
57
|
|
|
55
|
-
|
|
58
|
+
<div class="nav__inner" v-else>
|
|
59
|
+
<div class="container">
|
|
60
|
+
<div class="row">
|
|
61
|
+
<div class="col nav__logo">
|
|
62
|
+
<a href="/standalone/marketplace" :class="`text-decoration-none mb-0 ${logo=='property'?'current':''}`">
|
|
63
|
+
<Logo id="property" class="pb-0 pe-0"></Logo>
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
<a href="/standalone/movebutler" :class="`text-decoration-none mb-0 ${logo=='movebutler'?'current':''}`">
|
|
67
|
+
<Logo id="movebutler" class="pb-0 pe-0"></Logo>
|
|
68
|
+
</a>
|
|
69
|
+
|
|
70
|
+
<a href="/standalone/agent" :class="`text-decoration-none mb-0 ${logo=='sold'?'current':''}`">
|
|
71
|
+
<Logo id="sold" class="pb-0 pe-0"></Logo>
|
|
72
|
+
</a>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="col mw-fit-content flex-row align-items-center nav__menu-btn">
|
|
76
|
+
<label for="showMenu">Menu</label>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="nav__menu--secondary bg-primary" v-if="hasSecondarySlot">
|
|
81
|
+
<div class="container">
|
|
82
|
+
<slot name="secondary"></slot>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="nav__menu flex-row">
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<slot></slot>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
</div>
|
|
56
95
|
</nav>
|
|
57
96
|
</template>
|
|
58
97
|
|
|
59
98
|
<style lang="scss">
|
|
60
|
-
@import "../../../assets/sass/_func.scss";
|
|
61
|
-
//@import "../../../node_modules/bootstrap/scss/nav";
|
|
62
99
|
@import "../../../assets/sass/components/nav.scss";
|
|
63
100
|
</style>
|
|
64
101
|
|
|
65
102
|
<script>
|
|
66
103
|
import nav from '../../../assets/js/modules/nav.js'
|
|
67
104
|
import Logo from '../../foundations/Logo/Logo.vue'
|
|
105
|
+
import Input from '../../elements/Input/Input.vue'
|
|
106
|
+
import Icon from '../../foundations/Icon/Icon.vue'
|
|
107
|
+
|
|
68
108
|
|
|
69
109
|
export default {
|
|
70
110
|
components: {
|
|
71
|
-
|
|
111
|
+
Input,
|
|
112
|
+
Logo,
|
|
113
|
+
Icon
|
|
72
114
|
},
|
|
73
115
|
name: 'Nav',
|
|
74
116
|
props: {
|
|
@@ -111,11 +153,17 @@ export default {
|
|
|
111
153
|
}
|
|
112
154
|
},
|
|
113
155
|
computed: {
|
|
156
|
+
hasLogoSlot() {
|
|
157
|
+
return !!this.$slots.logo
|
|
158
|
+
},
|
|
114
159
|
hasSecondarySlot() {
|
|
115
160
|
return !!this.$slots.secondary
|
|
116
161
|
},
|
|
117
162
|
hasSearchSlot() {
|
|
118
163
|
return !!this.$slots.search
|
|
164
|
+
},
|
|
165
|
+
isMarketplace() {
|
|
166
|
+
return this.$vnode.data.staticClass && this.$vnode.data.staticClass.includes('nav--marketplace') ? true : false;
|
|
119
167
|
}
|
|
120
168
|
},
|
|
121
169
|
mounted(){
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container note-feed mb-2">
|
|
3
|
+
<span class="h3" v-html="title" v-if="title"></span>
|
|
4
|
+
|
|
5
|
+
<Table :fields="[{ key: 'date_added' },{ key: 'user' },{ key: 'note' }]" :items="itemsData" v-bind="$props" class="mb-0"></Table>
|
|
6
|
+
<form :action="action" :method="method" @submit.prevent="submitForm(...arguments)">
|
|
7
|
+
<input type="hidden" :value="user" name="user" />
|
|
8
|
+
<Input id="addNote" type="textarea" label="Add note" required class="mw-100"></Input>
|
|
9
|
+
<button class="btn btn-tertiary">Submit note</button>
|
|
10
|
+
</form>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import Input from '../../elements/Input/Input.vue'
|
|
16
|
+
import Table from '../../elements/Table/Table.vue'
|
|
17
|
+
let tableProps = Table.props;
|
|
18
|
+
tableProps.fields.required = false;
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
components: {
|
|
23
|
+
Table,
|
|
24
|
+
Input
|
|
25
|
+
},
|
|
26
|
+
data () {
|
|
27
|
+
return {
|
|
28
|
+
itemsData: [...this.items] // Redefine data to avoid bleeding of data to other components
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
submitForm: function(event){
|
|
33
|
+
|
|
34
|
+
console.log(this)
|
|
35
|
+
|
|
36
|
+
const data = new FormData(event.target);
|
|
37
|
+
|
|
38
|
+
let today = new Date();
|
|
39
|
+
const yyyy = today.getFullYear();
|
|
40
|
+
let mm = today.getMonth() + 1; // Months start at 0!
|
|
41
|
+
let dd = today.getDate();
|
|
42
|
+
|
|
43
|
+
if (dd < 10) dd = '0' + dd;
|
|
44
|
+
if (mm < 10) mm = '0' + mm;
|
|
45
|
+
|
|
46
|
+
today = dd + '/' + mm + '/' + yyyy;
|
|
47
|
+
|
|
48
|
+
this.itemsData.unshift({
|
|
49
|
+
date_added: today,
|
|
50
|
+
user: data.get('user'),
|
|
51
|
+
note: data.get('addNote')
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
this.$emit('formSubmitted',event);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
name: 'NoteFeed',
|
|
58
|
+
props: {
|
|
59
|
+
user: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: true
|
|
62
|
+
},
|
|
63
|
+
...tableProps,
|
|
64
|
+
title: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false
|
|
67
|
+
},
|
|
68
|
+
method: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: false,
|
|
71
|
+
default: 'post'
|
|
72
|
+
},
|
|
73
|
+
action: {
|
|
74
|
+
type: String,
|
|
75
|
+
required: false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
### Usage
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
<NoteFeed user="User name" :fields="fields" :items="items" :show="3" @formSubmitted="submitForm(...arguments)"></NoteFeed>
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
<p class="note"><strong>Note:</strong> See the tables documentation for the table props which are inherited here</p>
|
|
10
|
+
|
|
11
|
+
| Option | Type | Default Value | Description |
|
|
12
|
+
| ------ | ---- | ------------- | ----------- |
|
|
13
|
+
| user | String | - | Required |
|
|
14
|
+
| title | String | - | Optional as we may want to add the title outside of the note feed. |
|
|
15
|
+
| method | String | post | Form method of posting the data, post or get |
|
|
16
|
+
| action | String| | Optional URL to submit the form too, not really usefull for Vue JS. |
|
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<style lang="scss">
|
|
19
|
-
@import "../../../assets/sass/
|
|
20
|
-
@import "../../../node_modules/bootstrap/scss/_card";
|
|
21
|
-
@import "../../../assets/sass/components/card";
|
|
19
|
+
@import "../../../assets/sass/elements/card.scss";
|
|
22
20
|
</style>
|
|
23
21
|
|
|
24
22
|
<script>
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="multiple-file-uploads mb-4">
|
|
3
|
+
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div :class="`${inputcolclass ? inputcolclass : 'col-12 col-sm-4'}`">
|
|
6
|
+
<Input type="file" :id="id" :name="`${id}[]`" label="Add new file" labelclass="d-none" class="form-control-inline col" required :data-filesize="maxfilesize"></Input>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="col-12 col-md me-auto">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col mw-fit-content">
|
|
12
|
+
<button type="button" class="btn btn-tertiary me-0" data-delete>Delete</button>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<button type="button" class="btn btn-secondary me-0" data-add :data-maxfiles="maxfiles">+ Add file</button>
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import Input from '../../elements/Input/Input.vue'
|
|
23
|
+
|
|
24
|
+
export default {
|
|
25
|
+
components: {
|
|
26
|
+
Input
|
|
27
|
+
},
|
|
28
|
+
name: 'FileUploads',
|
|
29
|
+
props: {
|
|
30
|
+
id: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true
|
|
33
|
+
},
|
|
34
|
+
inputcolclass: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false
|
|
37
|
+
},
|
|
38
|
+
maxfilesize: {
|
|
39
|
+
type: Number,
|
|
40
|
+
required: false
|
|
41
|
+
},
|
|
42
|
+
maxfiles: {
|
|
43
|
+
type: Number,
|
|
44
|
+
required: false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
### Usage
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
<Card :title="value.title" :content="value.content" :link="value.link"></Card>
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
| Option | Type | Default Value | Description |
|
|
10
|
+
| ------ | ---- | ------------- | ----------- |
|
|
11
|
+
| title | String | - | Used for the card heading |
|
|
12
|
+
| titleclass | String | h2 | Update the class of the title from being a h2 |
|
|
13
|
+
| subtitle | String | - | Optional sub heading |
|
|
14
|
+
| content | HTML | - | Card content |
|
|
15
|
+
| link | String | - | Card link |
|
|
16
|
+
| type | String | - | Change the type of card (simple,quick)|
|
|
17
|
+
| btntype | String | secondary | Change the type of button at the bottom of the card (primary,secondary,tertairy, link) |
|
|
18
|
+
| ctatext | String | Find out more | Update the cta text within the button at the bottom of the card |
|
|
19
|
+
| details | Object | - | Build up the card content with pre-defined bits of data |
|
|
20
|
+
| - detail.tags | Array of strings | - | Add tags above the card header |
|
|
21
|
+
| - detail.guideprice | String | - | Property guide price |
|
|
22
|
+
| - detail.auctiontime | String | - | Auction time left |
|
|
23
|
+
| - detail.readtime | String | - | How long it will take to read |
|
|
24
|
+
| - detail.status | String | - | Display a status badge at the top of the card |
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="wrapperClass()" ref="wrapper">
|
|
3
|
-
<label v-if="needsLabel()" :class="`form-label${labelclass?` ${labelclass}`:''}`" :for="id" v-html="displayLabel()"></label>
|
|
3
|
+
<label v-if="needsLabel()" :class="`form-label${labelclass?` ${labelclass}`:''}`" :for="id" v-html="displayLabel()" :title="title"></label>
|
|
4
4
|
|
|
5
|
+
<!-- Prefix and Suffix -->
|
|
6
|
+
<span :class="`prefix ${this.prefixClass} ${size?`prefix-${size}`:''}`" v-html="prefix" v-if="prefix" role="presentation"></span>
|
|
7
|
+
<span :class="`suffix ${this.suffixClass} ${size?`suffix-${size}`:''}`" v-html="suffix" v-if="suffix" role="presentation"></span>
|
|
8
|
+
|
|
5
9
|
<!-- Standard input field -->
|
|
6
10
|
<input v-if="isInput()" v-model="inputVal" :class="`form-control${size?` form-control-${size}`:``}${inputclass?` ${inputclass}`:``}`" :type="type" :name="name?name:id" :id="id" :pattern="needPattern()" :list="hasOptions()" v-bind="$attrs" v-on:keyup="inputKeyup" />
|
|
7
11
|
|
|
@@ -92,6 +96,30 @@ export default {
|
|
|
92
96
|
options: {
|
|
93
97
|
type: Array,
|
|
94
98
|
required: false
|
|
99
|
+
},
|
|
100
|
+
prefix: {
|
|
101
|
+
type: String,
|
|
102
|
+
required: false
|
|
103
|
+
},
|
|
104
|
+
prefixClass: {
|
|
105
|
+
type: String,
|
|
106
|
+
required: false
|
|
107
|
+
},
|
|
108
|
+
suffix: {
|
|
109
|
+
type: String,
|
|
110
|
+
required: false
|
|
111
|
+
},
|
|
112
|
+
suffixClass: {
|
|
113
|
+
type: String,
|
|
114
|
+
required: false
|
|
115
|
+
},
|
|
116
|
+
title: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: false
|
|
119
|
+
},
|
|
120
|
+
hint: {
|
|
121
|
+
type: String,
|
|
122
|
+
required: false
|
|
95
123
|
}
|
|
96
124
|
},
|
|
97
125
|
computed: {
|
|
@@ -101,6 +129,10 @@ export default {
|
|
|
101
129
|
if(this.$attrs.multiple){
|
|
102
130
|
return this.label+`<span class="small d-block text-body font-body fw-normal">Hold down the Ctrl (windows) or Command (Mac) button to select multiple options.</span>`
|
|
103
131
|
}
|
|
132
|
+
|
|
133
|
+
if(this.hint){
|
|
134
|
+
return this.label+`<span class="small d-block text-body font-body fw-normal">${this.hint}</span>`
|
|
135
|
+
}
|
|
104
136
|
|
|
105
137
|
return this.label;
|
|
106
138
|
}
|
|
@@ -16,3 +16,4 @@
|
|
|
16
16
|
| size | String | - | Choose from either 'sm' and 'lg' |
|
|
17
17
|
| errormsg | String | - | Error message thats shown when the field fails form validation. |
|
|
18
18
|
| options | Array | - | Used for the select type input field to populate the dropdown. Can also be used to create a datalist when used in conjuction of any other input type than select. |
|
|
19
|
+
| prefix | String | - | Display a character or two in front of the input field |
|
package/src/index.js
CHANGED
|
@@ -4,11 +4,12 @@ export { default as Logo } from './foundations/Logo/Logo.vue'
|
|
|
4
4
|
// Elements
|
|
5
5
|
export { default as Table } from './elements/Table/Table.vue'
|
|
6
6
|
export { default as Input } from './elements/Input/Input.vue'
|
|
7
|
+
export { default as FileUploads } from './elements/FileUploads/FileUploads.vue'
|
|
7
8
|
// Components
|
|
8
9
|
export { default as Accordion } from './components/Accordion/Accordion.vue'
|
|
9
10
|
export { default as AccordionItem } from './components/Accordion/AccordionItem.vue'
|
|
10
11
|
export { default as Banner } from './components/Banner/Banner.vue'
|
|
11
|
-
export { default as Card } from './
|
|
12
|
+
export { default as Card } from './elements/Card/Card.vue'
|
|
12
13
|
export { default as CardDeck } from './components/CardDeck/CardDeck.vue'
|
|
13
14
|
export { default as Carousel } from './components/Carousel/Carousel.vue'
|
|
14
15
|
export { default as Header } from './components/Header/Header.vue'
|
|
@@ -23,3 +24,4 @@ export { default as Step } from './components/Stepper/Step.vue'
|
|
|
23
24
|
export { default as Tabs } from './components/Tabs/Tabs.vue'
|
|
24
25
|
export { default as Tab } from './components/Tabs/Tab.vue'
|
|
25
26
|
export { default as Alert } from './components/Alert/Alert.vue'
|
|
27
|
+
export { default as NoteFeed } from './components/NoteFeed/NoteFeed.vue'
|