@iamproperty/components 2.0.1 → 2.3.1
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/README.md +12 -2
- package/assets/.DS_Store +0 -0
- 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/main.js +9 -0
- package/assets/js/modules/accordion.js +13 -10
- package/assets/js/modules/modal.js +90 -0
- package/assets/js/modules/youtubevideo.js +145 -0
- package/assets/js/scripts.bundle.js +195 -604
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +3 -3
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/sass/_components.scss +4 -0
- package/assets/sass/_corefiles.scss +3 -2
- package/assets/sass/_functions/utilities.scss +41 -1
- package/assets/sass/_functions/variables.scss +74 -21
- package/assets/sass/components/accordion.scss +80 -3
- package/assets/sass/components/charts.scss +562 -0
- package/assets/sass/components/header.scss +1 -1
- package/assets/sass/components/modal.scss +78 -3
- package/assets/sass/components/snapshot.scss +69 -0
- package/assets/sass/components/timeline.scss +93 -0
- package/assets/sass/elements/buttons.scss +1 -1
- package/assets/sass/elements/container.scss +104 -16
- package/assets/sass/elements/lists.scss +5 -0
- package/assets/sass/elements/tooltips.scss +71 -0
- package/assets/sass/elements/type.scss +22 -7
- package/assets/sass/foundations/brand.scss +10 -0
- package/assets/sass/foundations/circles.scss +18 -11
- package/assets/sass/foundations/media.scss +47 -0
- package/assets/sass/foundations/reboot.scss +24 -2
- package/assets/sass/foundations/root.scss +4 -1
- package/dist/components.common.js +651 -5130
- 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 +651 -5130
- 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 +48 -46
- package/src/.DS_Store +0 -0
- package/src/components/Accordion/Accordion.vue +0 -18
- package/src/components/Accordion/AccordionItem.vue +43 -0
- package/src/components/Accordion/README.md +21 -8
- package/src/components/Card/Card.vue +13 -13
- package/src/components/Card/README.md +7 -7
- package/src/components/CardDeck/CardDeck.vue +11 -11
- package/src/components/CardDeck/README.md +6 -6
- package/src/components/Carousel/Carousel.vue +10 -10
- package/src/components/Carousel/README.md +1 -1
- package/src/components/Chart/Chart.vue +246 -0
- package/src/components/Chart/README.md +18 -0
- package/src/components/Header/Header.vue +2 -2
- package/src/components/Modal/Modal.vue +15 -4
- package/src/components/Modal/README.md +1 -0
- package/src/components/Nav/Nav.vue +1 -1
- package/src/components/Nav/README.md +3 -3
- package/src/components/PropertySearchbar/PropertySearchbar.vue +13 -13
- package/src/components/Snapshot/README.md +21 -0
- package/src/components/Snapshot/Snapshot.vue +33 -0
- package/src/components/Tabs/Tabs.vue +12 -8
- package/src/components/Timeline/README.md +18 -0
- package/src/components/Timeline/Timeline.vue +25 -0
- package/src/elements/Input/Input.vue +15 -15
- package/src/elements/Input/README.md +4 -4
- package/src/elements/Table/Table.vue +17 -3
- package/src/foundations/YoutubeVideo/README.md +11 -0
- package/src/foundations/YoutubeVideo/YoutubeVideo.vue +24 -0
- package/src/index.js +1 -0
- package/assets/sass/elements/media.scss +0 -3
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="wrapperClass()" ref="wrapper">
|
|
3
|
-
<label v-if="needsLabel()" :class="`form-label${
|
|
3
|
+
<label v-if="needsLabel()" :class="`form-label${labelclass?` ${labelclass}`:''}`" :for="id" v-html="displayLabel()"></label>
|
|
4
4
|
|
|
5
5
|
<!-- Standard input field -->
|
|
6
|
-
<input v-if="isInput()" v-model="inputVal" :class="`form-control${size?` form-control-${size}`:``}${
|
|
6
|
+
<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
7
|
|
|
8
8
|
<!-- Textarea -->
|
|
9
|
-
<textarea v-if="type=='textarea'" v-model="inputVal" :class="`form-control${size?` form-control-${size}`:``}${
|
|
9
|
+
<textarea v-if="type=='textarea'" v-model="inputVal" :class="`form-control${size?` form-control-${size}`:``}${inputclass?` ${inputclass}`:``}`" :type="type" :name="name?name:id" :id="id" :pattern="needPattern()" v-bind="$attrs"></textarea>
|
|
10
10
|
|
|
11
11
|
<!-- Range -->
|
|
12
12
|
<div class="input-group" v-if="type=='range'">
|
|
13
|
-
<input v-model="inputVal" :class="`form-range${
|
|
13
|
+
<input v-model="inputVal" :class="`form-range${inputclass?` ${inputclass}`:``}`" :type="type" :name="name?name:id" :id="id" :pattern="needPattern()" :list="hasOptions()" v-bind="$attrs" oninput="this.nextElementSibling.value=this.value;" />
|
|
14
14
|
<output class="input-group-text border-0 col-2 col-sm-1 px-0">{{value}}</output>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
17
|
<!-- Color picker -->
|
|
18
18
|
<div class="input-group" v-if="type=='color'">
|
|
19
|
-
<input v-model="inputVal" :class="`form-control form-control-color${
|
|
19
|
+
<input v-model="inputVal" :class="`form-control form-control-color${inputclass?` ${inputclass}`:``}`" :type="type" :name="name?name:id" :id="id" :pattern="needPattern()" :list="hasOptions()" v-bind="$attrs" oninput="this.nextElementSibling.value=this.value;" />
|
|
20
20
|
<output class="input-group-text flex-fill">{{value?vale:'#000000'}}</output>
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<!-- Select/dropdown -->
|
|
24
|
-
<select v-if="type=='select'" v-model="inputVal" :class="`form-select${size?` form-select-${size}`:``}${
|
|
24
|
+
<select v-if="type=='select'" v-model="inputVal" :class="`form-select${size?` form-select-${size}`:``}${inputclass?` ${inputclass}`:``}`" :type="type" :name="id" :id="id" :pattern="needPattern()" v-bind="$attrs">
|
|
25
25
|
<option v-for="(value,index) in options" :key="index" :value="value.value">{{value.display ? value.display : value.value}}</option>
|
|
26
26
|
</select>
|
|
27
27
|
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
|
|
32
32
|
<!-- Checkbox -->
|
|
33
33
|
<input v-if="type=='checkbox'||type=='radio'" class="form-check-input" :type="type" :name="name?name:id" :id="id" v-bind="$attrs" />
|
|
34
|
-
<label v-if="type=='checkbox'||type=='radio'" :class="`form-label form-check-label${
|
|
34
|
+
<label v-if="type=='checkbox'||type=='radio'" :class="`form-label form-check-label${labelclass?` ${labelclass}`:''}`" :for="id" v-html="label"></label>
|
|
35
35
|
|
|
36
36
|
<!-- Checkbox Button -->
|
|
37
|
-
<input v-if="type=='checkbox-btn'||type=='radio-btn'" :class="`btn-check${
|
|
38
|
-
<label v-if="type=='checkbox-btn'||type=='radio-btn'" :class="`btn${
|
|
37
|
+
<input v-if="type=='checkbox-btn'||type=='radio-btn'" :class="`btn-check${inputclass?` ${inputclass}`:``}`" :type="type.replace('-btn','')" autocomplete="off" :name="name?name:id" :id="id" v-bind="$attrs" />
|
|
38
|
+
<label v-if="type=='checkbox-btn'||type=='radio-btn'" :class="`btn${labelclass?` ${labelclass}`:''}`" :for="id" v-html="label" @click="clickEvent"></label>
|
|
39
39
|
|
|
40
40
|
<!-- Error message -->
|
|
41
|
-
<p v-if="
|
|
41
|
+
<p v-if="errormsg" class="invalid-feedback mb-0" v-html="errormsg"></p>
|
|
42
42
|
<slot></slot>
|
|
43
43
|
</div>
|
|
44
44
|
</template>
|
|
@@ -66,13 +66,13 @@ export default {
|
|
|
66
66
|
},
|
|
67
67
|
label: {
|
|
68
68
|
type: String,
|
|
69
|
-
required:
|
|
69
|
+
required: false
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
labelclass: {
|
|
72
72
|
type: String,
|
|
73
73
|
required: false
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
inputclass: {
|
|
76
76
|
type: String,
|
|
77
77
|
required: false
|
|
78
78
|
},
|
|
@@ -85,7 +85,7 @@ export default {
|
|
|
85
85
|
type: String,
|
|
86
86
|
required: false
|
|
87
87
|
},
|
|
88
|
-
|
|
88
|
+
errormsg: {
|
|
89
89
|
type: String,
|
|
90
90
|
required: false
|
|
91
91
|
},
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
215
215
|
|
|
216
216
|
let element = this.$refs.wrapper;
|
|
217
217
|
// Remove unnecessary divs that may get in the way of our CSS sibling selectors working
|
|
218
|
-
if(element.parentNode.classList.contains('form-check') || element.classList.length == 0){
|
|
218
|
+
if(element.parentNode && element.parentNode.classList.contains('form-check') || element.classList.length == 0){
|
|
219
219
|
|
|
220
220
|
const fragment = document.createDocumentFragment();
|
|
221
221
|
Array.from(element.childNodes).forEach(child => fragment.appendChild(child));
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
| Option | Type | Default Value | Description |
|
|
10
10
|
| ------ | ---- | ------------- | ----------- |
|
|
11
11
|
| id | String | - | Required |
|
|
12
|
-
| label | String | - |
|
|
13
|
-
|
|
|
14
|
-
|
|
|
12
|
+
| label | String | - | Not required but recommended |
|
|
13
|
+
| labelclass | String | - | Optional way of adding classes to the label, useful for assigning column class to label when usiong inline input fields. |
|
|
14
|
+
| inputclass | String | - | Optional way of adding classes to the input field, useful for assigning column class to label when usiong inline input fields. |
|
|
15
15
|
| type | String | text | Assign different types to the input fields like number, email and date. |
|
|
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. |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="table__wrapper" ref="wrapper" :data-
|
|
2
|
+
<div class="table__wrapper" ref="wrapper" :data-sortby="sortby" :data-sort="sort" :data-show="show" :data-page="page" :data-reorder="reorder">
|
|
3
3
|
<table>
|
|
4
4
|
<thead v-if="fields">
|
|
5
5
|
<tr>
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
</thead>
|
|
9
9
|
<tbody v-if="items">
|
|
10
10
|
<tr v-for="(value,index) in items" :key="index">
|
|
11
|
-
<td :key="cellIndex" v-for="(cellValue,cellIndex) in value" v-html="cellValue" :data-label="cellHeading(cellIndex)"></td>
|
|
11
|
+
<td :key="cellIndex" v-for="(cellValue,cellIndex) in value" v-html="cellValue" :data-label="cellHeading(cellIndex)" :data-numeric="numericValue(cellValue)"></td>
|
|
12
12
|
</tr>
|
|
13
13
|
</tbody>
|
|
14
14
|
</table>
|
|
15
|
+
<slot></slot>
|
|
15
16
|
</div>
|
|
16
17
|
</template>
|
|
17
18
|
|
|
@@ -34,7 +35,7 @@ export default {
|
|
|
34
35
|
type: Number,
|
|
35
36
|
required: false
|
|
36
37
|
},
|
|
37
|
-
|
|
38
|
+
sortby: {
|
|
38
39
|
type: String,
|
|
39
40
|
required: false
|
|
40
41
|
},
|
|
@@ -56,6 +57,19 @@ export default {
|
|
|
56
57
|
return (heading) => {
|
|
57
58
|
return `${ucfirst(unsnake(heading))}`
|
|
58
59
|
}
|
|
60
|
+
},
|
|
61
|
+
numericValue () {
|
|
62
|
+
return (value) => {
|
|
63
|
+
|
|
64
|
+
value = value.replace('£','')
|
|
65
|
+
value = value.replace('%','')
|
|
66
|
+
|
|
67
|
+
if (Number.isNaN(Number.parseFloat(value))) {
|
|
68
|
+
return 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return Number.parseFloat(value)
|
|
72
|
+
}
|
|
59
73
|
}
|
|
60
74
|
},
|
|
61
75
|
mounted(){
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="youtube-embed ratio ratio-16x9" ref="wrapper">
|
|
3
|
+
<a :href="`https://www.youtube.com/watch?v=${video}`" target="_blank" title="Investments Video" :data-id="video">
|
|
4
|
+
<img :src="`https://img.youtube.com/vi/${video}/maxresdefault.jpg`" alt="">
|
|
5
|
+
<span class="btn btn-secondary">Play Video</span>
|
|
6
|
+
</a>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
<script>
|
|
10
|
+
import youtubeVideo from '../../../assets/js/modules/youtubevideo.js'
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
name: 'YoutuveVideo',
|
|
14
|
+
props: {
|
|
15
|
+
video: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
mounted(){
|
|
21
|
+
new youtubeVideo(this.$refs.wrapper);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
package/src/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export { default as Table } from './elements/Table/Table.vue'
|
|
|
6
6
|
export { default as Input } from './elements/Input/Input.vue'
|
|
7
7
|
// Components
|
|
8
8
|
export { default as Accordion } from './components/Accordion/Accordion.vue'
|
|
9
|
+
export { default as AccordionItem } from './components/Accordion/AccordionItem.vue'
|
|
9
10
|
export { default as Banner } from './components/Banner/Banner.vue'
|
|
10
11
|
export { default as Card } from './components/Card/Card.vue'
|
|
11
12
|
export { default as CardDeck } from './components/CardDeck/CardDeck.vue'
|