@iamproperty/components 2.7.0 → 2.7.3
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/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- 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/_corefiles.scss +1 -0
- package/assets/sass/_functions/mixins.scss +1 -1
- package/assets/sass/_functions/utilities.scss +9 -0
- package/assets/sass/_functions/variables.scss +35 -2
- package/assets/sass/components/accordion.scss +2 -2
- package/assets/sass/components/alert.scss +3 -3
- package/assets/sass/components/charts.scss +5 -9
- package/assets/sass/components/drawer.scss +3 -3
- package/assets/sass/components/header.scss +2 -1
- package/assets/sass/components/modal.scss +3 -3
- package/assets/sass/components/nav.scss +217 -20
- package/assets/sass/components/stepper.scss +1 -1
- package/assets/sass/components/tabs.scss +28 -2
- package/assets/sass/elements/container.scss +1 -1
- package/assets/sass/elements/forms.scss +66 -0
- package/assets/sass/elements/lists.scss +63 -0
- package/assets/sass/elements/panel.scss +162 -0
- package/assets/sass/elements/tables.scss +31 -0
- package/assets/sass/elements/tooltips.scss +29 -18
- package/assets/sass/foundations/media.scss +3 -3
- package/assets/sass/foundations/root.scss +11 -2
- package/dist/components.common.js +306 -36
- 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 +306 -36
- 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 +1 -1
- package/src/components/Nav/Nav.vue +55 -5
- package/src/components/NoteFeed/NoteFeed.vue +79 -0
- package/src/components/NoteFeed/README.md +16 -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 +2 -0
package/package.json
CHANGED
|
@@ -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,7 +55,43 @@
|
|
|
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" :path="logopath" 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" :path="logopath" 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" :path="logopath" 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
|
|
|
@@ -63,10 +102,15 @@
|
|
|
63
102
|
<script>
|
|
64
103
|
import nav from '../../../assets/js/modules/nav.js'
|
|
65
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
|
+
|
|
66
108
|
|
|
67
109
|
export default {
|
|
68
110
|
components: {
|
|
69
|
-
|
|
111
|
+
Input,
|
|
112
|
+
Logo,
|
|
113
|
+
Icon
|
|
70
114
|
},
|
|
71
115
|
name: 'Nav',
|
|
72
116
|
props: {
|
|
@@ -109,11 +153,17 @@ export default {
|
|
|
109
153
|
}
|
|
110
154
|
},
|
|
111
155
|
computed: {
|
|
156
|
+
hasLogoSlot() {
|
|
157
|
+
return !!this.$slots.logo
|
|
158
|
+
},
|
|
112
159
|
hasSecondarySlot() {
|
|
113
160
|
return !!this.$slots.secondary
|
|
114
161
|
},
|
|
115
162
|
hasSearchSlot() {
|
|
116
163
|
return !!this.$slots.search
|
|
164
|
+
},
|
|
165
|
+
isMarketplace() {
|
|
166
|
+
return this.$vnode.data.staticClass && this.$vnode.data.staticClass.includes('nav--marketplace') ? true : false;
|
|
117
167
|
}
|
|
118
168
|
},
|
|
119
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. |
|
|
@@ -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,6 +4,7 @@ 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'
|
|
@@ -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'
|