@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
package/package.json
CHANGED
|
@@ -1,88 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamproperty/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Component library for iamproperty",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "iamproperty"
|
|
8
8
|
},
|
|
9
|
-
"license": "UNLICENSED",
|
|
10
9
|
"scripts": {
|
|
11
|
-
"dev": "npm run serve",
|
|
12
10
|
"serve": "vue-cli-service serve docs/main.js",
|
|
13
11
|
"build": "vue-cli-service build --target lib src/index.js",
|
|
14
|
-
"build:docs": "vue-cli-service build docs/main.js",
|
|
15
12
|
"test:unit": "vue-cli-service test:unit",
|
|
16
|
-
"test:visual": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles",
|
|
17
|
-
"test:approve": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles --updateSnapshot",
|
|
18
|
-
"test": "npm run test:unit && npm run test:visual",
|
|
19
13
|
"lint": "vue-cli-service lint",
|
|
20
|
-
"
|
|
14
|
+
"audit": "node local_modules/audit.js",
|
|
15
|
+
"build:docs": "vue-cli-service build docs/main.js",
|
|
21
16
|
"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",
|
|
17
|
+
"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",
|
|
18
|
+
"dev": "npm run serve",
|
|
22
19
|
"prepack": "npm run build",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
20
|
+
"pull-request": "npm run test:unit && npm run test:approve && npm run compile:sass && npm run compile:js && npm run audit",
|
|
21
|
+
"test": "npm run test:unit && npm run test:visual",
|
|
22
|
+
"test:approve": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles --updateSnapshot",
|
|
23
|
+
"test:visual": "cross-env TEST_MODE=visual vue-cli-service test:unit --forceExit --detectOpenHandles"
|
|
25
24
|
},
|
|
26
25
|
"main": "dist/components.umd.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"assets/*",
|
|
28
|
+
"dist/*",
|
|
29
|
+
"src/*"
|
|
30
|
+
],
|
|
27
31
|
"dependencies": {
|
|
32
|
+
"@babel/plugin-transform-runtime": "^7.16.7",
|
|
28
33
|
"@vue/eslint-config-standard": "^6.1.0",
|
|
29
|
-
"bootstrap": "^5.1.
|
|
30
|
-
"glob": "^7.
|
|
31
|
-
"sass": "^1.
|
|
34
|
+
"bootstrap": "^5.1.3",
|
|
35
|
+
"glob": "^7.2.0",
|
|
36
|
+
"sass": "^1.45.1",
|
|
32
37
|
"sass-loader": "^10.2.0",
|
|
33
38
|
"vue": "^2.6.14",
|
|
34
|
-
"vue-
|
|
35
|
-
"vue-
|
|
39
|
+
"vue-loader": "^15.9.8",
|
|
40
|
+
"vue-markdown-loader": "^2.5.0",
|
|
41
|
+
"vue-router": "^3.5.3"
|
|
36
42
|
},
|
|
37
43
|
"devDependencies": {
|
|
38
|
-
"@babel/cli": "^7.
|
|
39
|
-
"@babel/core": "^7.
|
|
40
|
-
"@babel/eslint-parser": "^7.
|
|
41
|
-
"@babel/preset-env": "^7.
|
|
42
|
-
"@popperjs/core": "^2.
|
|
44
|
+
"@babel/cli": "^7.16.0",
|
|
45
|
+
"@babel/core": "^7.16.5",
|
|
46
|
+
"@babel/eslint-parser": "^7.16.5",
|
|
47
|
+
"@babel/preset-env": "^7.16.5",
|
|
48
|
+
"@popperjs/core": "^2.11.0",
|
|
43
49
|
"@rollup/plugin-babel": "^5.3.0",
|
|
44
50
|
"@rollup/plugin-commonjs": "^19.0.0",
|
|
45
|
-
"@rollup/plugin-node-resolve": "^13.
|
|
51
|
+
"@rollup/plugin-node-resolve": "^13.1.1",
|
|
46
52
|
"@rollup/plugin-replace": "^2.4.2",
|
|
47
|
-
"@vue/cli-plugin-babel": "^
|
|
48
|
-
"@vue/cli-plugin-eslint": "^
|
|
49
|
-
"@vue/cli-plugin-router": "^4.5.
|
|
50
|
-
"@vue/cli-plugin-unit-jest": "^4.5.
|
|
51
|
-
"@vue/cli-service": "^4.5.
|
|
52
|
-
"@vue/test-utils": "^1.
|
|
53
|
-
"
|
|
53
|
+
"@vue/cli-plugin-babel": "^3.12.1",
|
|
54
|
+
"@vue/cli-plugin-eslint": "^3.1.1",
|
|
55
|
+
"@vue/cli-plugin-router": "^4.5.15",
|
|
56
|
+
"@vue/cli-plugin-unit-jest": "^4.5.15",
|
|
57
|
+
"@vue/cli-service": "^4.5.15",
|
|
58
|
+
"@vue/test-utils": "^1.3.0",
|
|
59
|
+
"cache-loader": "^4.1.0",
|
|
54
60
|
"cross-env": "^7.0.3",
|
|
55
61
|
"eslint": "^7.32.0",
|
|
56
|
-
"eslint-plugin-import": "^2.
|
|
62
|
+
"eslint-plugin-import": "^2.25.3",
|
|
57
63
|
"eslint-plugin-node": "^11.1.0",
|
|
58
|
-
"eslint-plugin-promise": "^5.
|
|
64
|
+
"eslint-plugin-promise": "^5.2.0",
|
|
59
65
|
"eslint-plugin-standard": "^4.1.0",
|
|
60
|
-
"eslint-plugin-vue": "^7.
|
|
66
|
+
"eslint-plugin-vue": "^7.20.0",
|
|
61
67
|
"html-loader": "^2.1.2",
|
|
62
68
|
"jest-environment-puppeteer": "^5.0.4",
|
|
63
69
|
"jest-image-snapshot": "^4.5.1",
|
|
64
70
|
"jest-puppeteer": "^5.0.4",
|
|
65
71
|
"jest-puppeteer-preset": "^5.0.4",
|
|
66
72
|
"markdown-loader": "^6.0.0",
|
|
67
|
-
"puppeteer": "^10.
|
|
68
|
-
"rollup": "^2.
|
|
73
|
+
"puppeteer": "^10.4.0",
|
|
74
|
+
"rollup": "^2.62.0",
|
|
69
75
|
"rollup-plugin-istanbul": "^3.0.0",
|
|
70
76
|
"sass-true": "^6.0.1",
|
|
71
|
-
"serve": "^
|
|
77
|
+
"serve": "^13.0.2",
|
|
72
78
|
"terser": "5.1.0",
|
|
73
|
-
"vue-loader": "^
|
|
74
|
-
"vue-
|
|
75
|
-
"
|
|
79
|
+
"vue-svg-loader": "^0.10.0",
|
|
80
|
+
"vue-template-compiler": "^2.6.14",
|
|
81
|
+
"webpack": "^4.46.0"
|
|
76
82
|
},
|
|
77
|
-
"
|
|
83
|
+
"license": "UNLICENSED",
|
|
84
|
+
"localURL": "http://localhost:8080",
|
|
85
|
+
"registry-url": "https://registry.npmjs.com",
|
|
78
86
|
"repository": {
|
|
79
87
|
"type": "git",
|
|
80
|
-
"url": "git
|
|
81
|
-
}
|
|
82
|
-
"files": [
|
|
83
|
-
"assets/*",
|
|
84
|
-
"dist/*",
|
|
85
|
-
"src/*"
|
|
86
|
-
],
|
|
87
|
-
"localURL": "http://localhost:8080"
|
|
88
|
+
"url": "git://github.com/iamproperty/iamproperty-vue-component-library.git"
|
|
89
|
+
}
|
|
88
90
|
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container accordion" ref="wrapper">
|
|
3
3
|
<slot></slot>
|
|
4
|
-
<details class="accordion-item" v-for="(value,index) in items" :key="index" :open="value.open" :id="createID(value.summary)">
|
|
5
|
-
<summary><span class="accordion-header accordion-button h4">{{value.summary}}</span></summary>
|
|
6
|
-
<div class="accordion-body" v-html="value.detail"></div>
|
|
7
|
-
</details>
|
|
8
|
-
<slot name="after"></slot>
|
|
9
4
|
</div>
|
|
10
5
|
</template>
|
|
11
6
|
|
|
@@ -16,26 +11,13 @@
|
|
|
16
11
|
</style>
|
|
17
12
|
|
|
18
13
|
<script>
|
|
19
|
-
import { safeID } from '../../helpers/strings'
|
|
20
14
|
import accordion from '../../../assets/js/modules/accordion.js'
|
|
21
15
|
|
|
22
16
|
export default {
|
|
23
17
|
name: 'Accordion',
|
|
24
18
|
props: {
|
|
25
|
-
items: {
|
|
26
|
-
type: Array,
|
|
27
|
-
required: true
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
computed: {
|
|
31
|
-
createID () {
|
|
32
|
-
return (summary) => {
|
|
33
|
-
return `${safeID(summary)}`
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
19
|
},
|
|
37
20
|
mounted(){
|
|
38
|
-
|
|
39
21
|
accordion(this.$refs.wrapper);
|
|
40
22
|
}
|
|
41
23
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
|
|
3
|
+
<details class="accordion-item" :id="createID(title)">
|
|
4
|
+
<summary :class="`${titlecolour?`bg-${titlecolour}`:''}`"><span class="accordion-header accordion-button h4">{{title}}<span v-if="badge" :class="`badge bg-${badgecolour}`">{{badge}}</span></span></summary>
|
|
5
|
+
<div class="accordion-body">
|
|
6
|
+
<slot></slot>
|
|
7
|
+
</div>
|
|
8
|
+
</details>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import { safeID } from '../../helpers/strings'
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: 'AccordionItem',
|
|
16
|
+
props: {
|
|
17
|
+
title: {
|
|
18
|
+
type: String,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
21
|
+
titlecolour: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
badge: {
|
|
26
|
+
type: String,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
badgecolour: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false,
|
|
32
|
+
default: 'light'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
computed: {
|
|
36
|
+
createID () {
|
|
37
|
+
return (summary) => {
|
|
38
|
+
return `${safeID(summary)}`
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</script>
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
### Usage
|
|
2
2
|
|
|
3
3
|
```
|
|
4
|
-
<Accordion
|
|
4
|
+
<Accordion>
|
|
5
|
+
<AccordionItem title="Question 1">
|
|
6
|
+
<p>Accordion item content</p>
|
|
7
|
+
</AccordionItem>
|
|
8
|
+
<AccordionItem title="Question 2">
|
|
9
|
+
<p>Accordion item content</p>
|
|
10
|
+
</AccordionItem>
|
|
11
|
+
</Accordion>
|
|
5
12
|
```
|
|
6
13
|
|
|
7
|
-
###
|
|
14
|
+
### Class modifiers
|
|
15
|
+
|
|
16
|
+
- Adding a class of **.accordion--keep-open** to the accordion will stop the items from closing when another one is opened.
|
|
17
|
+
- Adding a class of **.accordion--straight** to the accordion will remove the slight indentation of the accordion.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Accordion item Properties
|
|
8
21
|
|
|
9
22
|
| Option | Type | Default Value | Description |
|
|
10
23
|
| ------ | ---- | ------------- | ----------- |
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
24
|
+
| title | String | - | A question or statement |
|
|
25
|
+
| titlecolour | String | - | Apply a colour the the accordion item title |
|
|
26
|
+
| badge | String | - | Add a highlighted badge/tag to the accordion item title |
|
|
27
|
+
| badgecolour | String | light | Apply a colour the badge |
|
|
14
28
|
|
|
15
29
|
|
|
16
|
-
### Slots
|
|
30
|
+
### Accordion item Slots
|
|
17
31
|
|
|
18
32
|
| Option | Default Value | Description |
|
|
19
33
|
| ------ | ------------- | ----------- |
|
|
20
|
-
| default | - |
|
|
21
|
-
| after | - | Will display after the accordion items |
|
|
34
|
+
| default | - | This is the content of the accordion item |
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a :href="link" :class="'card'+(type?' card--'+type:'')" :title="'Find out more: '+title+(
|
|
2
|
+
<a :href="link" :class="'card'+(type?' card--'+type:'')" :title="'Find out more: '+title+(subtitle ? ' - '+subtitle:'')">
|
|
3
3
|
<div class="card-header__wrapper" v-if="image">
|
|
4
4
|
<img :src="image" alt="" loading="lazy" class="card-image" />
|
|
5
5
|
<div class="card-header">
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
<img v-if="details && details.logo" :src="details.logo" alt="" loading="lazy" class="card-logo" />
|
|
10
10
|
</div>
|
|
11
11
|
<div class="card-body" v-html="cardContent()"></div>
|
|
12
|
-
<div class="card-footer" v-if="
|
|
13
|
-
<span :class="`${
|
|
12
|
+
<div class="card-footer" v-if="hidectatext == false">
|
|
13
|
+
<span :class="`${btntype == 'link' ? `link` : `btn btn-${btntype}`} mb-0`">{{ctatext}}<span class="visually-hidden"> about {{title}}</span></span>
|
|
14
14
|
</div>
|
|
15
15
|
</a>
|
|
16
16
|
</template>
|
|
@@ -29,16 +29,16 @@ export default {
|
|
|
29
29
|
type: String,
|
|
30
30
|
required: false
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
titleclass: {
|
|
33
33
|
type: String,
|
|
34
34
|
required: false,
|
|
35
|
-
default: '
|
|
35
|
+
default: 'h4'
|
|
36
36
|
},
|
|
37
37
|
title: {
|
|
38
38
|
type: String,
|
|
39
39
|
required: false
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
subtitle: {
|
|
42
42
|
type: String,
|
|
43
43
|
required: false
|
|
44
44
|
},
|
|
@@ -50,17 +50,17 @@ export default {
|
|
|
50
50
|
type: String,
|
|
51
51
|
required: false
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
btntype: {
|
|
54
54
|
type: String,
|
|
55
55
|
required: false,
|
|
56
56
|
default: 'secondary'
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
ctatext: {
|
|
59
59
|
type: String,
|
|
60
60
|
required: false,
|
|
61
61
|
default: 'Find out more'
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
hidectatext: {
|
|
64
64
|
type: Boolean,
|
|
65
65
|
required: false,
|
|
66
66
|
default: false
|
|
@@ -99,12 +99,12 @@ export default {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
const tags = this.details && this.details.tags ? this.details.tags.map(tag => `<span class="badge rounded-pill py-2 px-3 mb-3 me-2 ${tagClass(tag)}">${tag}</span>` ).join(""): '';
|
|
102
|
-
const title = this.title ? `<span class="card-title d-block ${this.
|
|
102
|
+
const title = this.title ? `<span class="card-title d-block ${this.titleclass}">${this.title}${this.subtitle ? ` <span class="d-block fw-normal font-body text-body small">${this.subtitle}</span>` : ''}</span>` : ``;
|
|
103
103
|
|
|
104
104
|
const details = `
|
|
105
|
-
${this.details && this.details.
|
|
106
|
-
${this.details && this.details.
|
|
107
|
-
${this.details && this.details.
|
|
105
|
+
${this.details && this.details.guideprice ? `<span class="d-block h6 text-dark mb-1">Price guide: ${this.details.guideprice}</span>` : ``}
|
|
106
|
+
${this.details && this.details.auctiontime ? `<span class="d-block h6 text-primary mb-4">Auction time left: ${this.details.auctiontime}</span>` : ``}
|
|
107
|
+
${this.details && this.details.readtime ? `<span class="d-block h6 text-primary mb-4"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22" height="23" viewBox="0 0 22 23" class="icon ms-0 me-2"><path d="M11 1.63c-5.176 0-9.37 4.194-9.37 9.37 0 5.176 4.194 9.37 9.37 9.37 5.176 0 9.37-4.194 9.37-9.37 0-5.176-4.194-9.37-9.37-9.37M11 0c6.075 0 11 4.925 11 11s-4.925 11-11 11S0 17.075 0 11 4.925 0 11 0" fill="var(--colour-secondary)" /><path d="M9.62 5.39c0-.473.368-.856.82-.856.454 0 .822.383.822.855v6.27l3.25 1.898c.395.23.536.75.314 1.16-.22.412-.72.558-1.115.328l-4.09-2.39V5.39z" fill="var(--colour-primary)"/></svg>${this.details.readtime}</span>` : ``}
|
|
108
108
|
`;
|
|
109
109
|
|
|
110
110
|
return `${tags}${title}${details}${this.content}`;
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
| Option | Type | Default Value | Description |
|
|
10
10
|
| ------ | ---- | ------------- | ----------- |
|
|
11
11
|
| title | String | - | Used for the card heading |
|
|
12
|
-
|
|
|
13
|
-
|
|
|
12
|
+
| titleclass | String | h2 | Update the class of the title from being a h2 |
|
|
13
|
+
| subtitle | String | - | Optional sub heading |
|
|
14
14
|
| content | HTML | - | Card content |
|
|
15
15
|
| link | String | - | Card link |
|
|
16
16
|
| type | String | - | Change the type of card (simple,quick)|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
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
19
|
| details | Object | - | Build up the card content with pre-defined bits of data |
|
|
20
20
|
| - detail.tags | Array of strings | - | Add tags above the card header |
|
|
21
|
-
| - detail.
|
|
22
|
-
| - detail.
|
|
23
|
-
| - detail.
|
|
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
24
|
| - detail.status | String | - | Display a status badge at the top of the card |
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="container card-deck prevent-invert" :data-card-type="
|
|
2
|
+
<div class="container card-deck prevent-invert" :data-card-type="cardtype">
|
|
3
3
|
<slot></slot>
|
|
4
|
-
<div :class="`row row-cols-${cols} row-cols-sm-${
|
|
4
|
+
<div :class="`row row-cols-${cols} row-cols-sm-${smcols} row-cols-md-${mdcols} ${gap ? `g-${gap}`: ``}`">
|
|
5
5
|
<div class="col" v-for="(value,index) in items" :key="index">
|
|
6
|
-
<Card v-bind="value" :class="
|
|
6
|
+
<Card v-bind="value" :class="cardclass" :type="cardtype" :btntype="btntype" :titleclass="titleclass" :ctatext="ctatext" :hidectatext="hidectatext"></Card>
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
9
9
|
<slot name="after"></slot>
|
|
@@ -33,12 +33,12 @@ export default {
|
|
|
33
33
|
required: false,
|
|
34
34
|
default: 1
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
smcols: {
|
|
37
37
|
type: Number,
|
|
38
38
|
required: false,
|
|
39
39
|
default: 1
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
mdcols: {
|
|
42
42
|
type: Number,
|
|
43
43
|
required: false,
|
|
44
44
|
default: 3
|
|
@@ -48,27 +48,27 @@ export default {
|
|
|
48
48
|
required: false,
|
|
49
49
|
default: 4
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
cardtype: {
|
|
52
52
|
type: String,
|
|
53
53
|
required: false
|
|
54
54
|
},
|
|
55
|
-
|
|
55
|
+
cardclass: {
|
|
56
56
|
type: String,
|
|
57
57
|
required: false
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
btntype: {
|
|
60
60
|
type: String,
|
|
61
61
|
required: false
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
titleclass: {
|
|
64
64
|
type: String,
|
|
65
65
|
required: false
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
ctatext: {
|
|
68
68
|
type: String,
|
|
69
69
|
required: false
|
|
70
70
|
},
|
|
71
|
-
|
|
71
|
+
hidectatext: {
|
|
72
72
|
type: Boolean,
|
|
73
73
|
required: false,
|
|
74
74
|
default: false
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
| Option | Type | Default Value | Description |
|
|
10
10
|
| ------ | ---- | ------------- | ----------- |
|
|
11
11
|
| cols | Number | 1 | Number of columns on mobile |
|
|
12
|
-
|
|
|
13
|
-
|
|
|
12
|
+
| smcols | Number | 1 | Number of columns on tablet |
|
|
13
|
+
| mdcols | Number | 3 | Number of columns on desktop |
|
|
14
14
|
| items | Array | - | Card data passed (See card component) |
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
15
|
+
| cardtype | String | - | Change the type of card (simple,quick) |
|
|
16
|
+
| btntype | String | (See card) | Change the type of button at the bottom of the card (primary,secondary,tertairy, link) |
|
|
17
|
+
| ctatext | String | (See card) | Update the cta text within the button at the bottom of the card |
|
|
18
|
+
| titleclass | String | (See card) | Update the class of the title from being a h2 |
|
|
19
19
|
|
|
20
20
|
### Slots
|
|
21
21
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="container carousel" :id="'carousel'+id" ref="wrapper" :data-cols="cols" :data-sm-cols="
|
|
2
|
+
<div class="container carousel" :id="'carousel'+id" ref="wrapper" :data-cols="cols" :data-sm-cols="smcols" :data-md-cols="mdcols">
|
|
3
3
|
<slot><!-- Use for titles etc --></slot>
|
|
4
4
|
<div class="carousel__wrapper">
|
|
5
5
|
<div class="carousel__inner">
|
|
6
6
|
|
|
7
|
-
<div v-if="type == 'card'" :class="`row row-cols-${cols} row-cols-sm-${
|
|
8
|
-
<div :class="`col carousel__item${
|
|
9
|
-
<Card v-bind="value" :class="
|
|
7
|
+
<div v-if="type == 'card'" :class="`row row-cols-${cols} row-cols-sm-${smcols} row-cols-md-${mdcols} ${gap ? `g-${gap}`: ``}`">
|
|
8
|
+
<div :class="`col carousel__item${colclass?` ${colclass}`:''}`" v-for="(value,index) in items" :key="index" :id="'carousel'+id+'slide'+(index+1)">
|
|
9
|
+
<Card v-bind="value" :class="cardclass" :type="cardtype" :btnyype="btntype" :titleclass="titleclass" :ctatext="ctatext" :hidectatext="hidectatext"></Card>
|
|
10
10
|
</div>
|
|
11
11
|
</div>
|
|
12
|
-
<div v-if="type != 'card'" :class="`row row-cols-${cols} row-cols-sm-${
|
|
13
|
-
<div :class="`col carousel__item${
|
|
12
|
+
<div v-if="type != 'card'" :class="`row row-cols-${cols} row-cols-sm-${smcols} row-cols-md-${mdcols} ${gap ? `g-${gap}`: ``}`">
|
|
13
|
+
<div :class="`col carousel__item${colclass?` ${colclass}`:''}`" v-for="(value,index) in items" :key="index" v-html="content(value)" :id="'carousel'+id+'slide'+(index+1)"></div>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
|
-
<div :class="`carousel__controls cols-${cols} cols-sm-${
|
|
18
|
+
<div :class="`carousel__controls cols-${cols} cols-sm-${smcols} cols-md-${mdcols}`">
|
|
19
19
|
<a v-for="(value,index) in items" :key="index" :href="'\#carousel'+id+'slide'+(index+1)" :class="`control-${index+1}`">Slide {{index+1}}</a>
|
|
20
20
|
</div>
|
|
21
21
|
<button class="btn btn-prev" data-go="0" disabled>Prev</button>
|
|
@@ -41,8 +41,8 @@ let cardDeckProps = CardDeck.props;
|
|
|
41
41
|
// Update the default values
|
|
42
42
|
cardDeckProps.gap.default = 0
|
|
43
43
|
cardDeckProps.cols.default = 1
|
|
44
|
-
cardDeckProps.
|
|
45
|
-
cardDeckProps.
|
|
44
|
+
cardDeckProps.smcols.default = 2
|
|
45
|
+
cardDeckProps.mdcols.default = 4
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
export default {
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
57
57
|
},
|
|
58
58
|
props: {
|
|
59
59
|
...cardDeckProps,
|
|
60
|
-
|
|
60
|
+
colclass: {
|
|
61
61
|
type: String,
|
|
62
62
|
required: false
|
|
63
63
|
},
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| Option | Type | Default Value | Description |
|
|
12
12
|
| ------ | ---- | ------------- | ----------- |
|
|
13
13
|
| type | String | - | Can be used to indicate that cards should be displayed in the carousel by giving the value 'card' |
|
|
14
|
-
|
|
|
14
|
+
| colclass | String | - | Pass utility classes to the columns in the carousel. For example 'd-flex align-items-center' will align the items n the middle. |
|
|
15
15
|
|
|
16
16
|
### Slots
|
|
17
17
|
|