@iamproperty/components 1.0.13 → 2.2.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/README.md +120 -12
- package/assets/.DS_Store +0 -0
- package/assets/favicons/android-chrome-192x192.png +0 -0
- package/assets/favicons/android-chrome-512x512.png +0 -0
- package/assets/favicons/apple-touch-icon.png +0 -0
- package/assets/favicons/favicon-16x16.png +0 -0
- package/assets/favicons/favicon-32x32.png +0 -0
- package/assets/favicons/favicon.ico +0 -0
- package/assets/fonts/qanelas-medium-webfont.woff +0 -0
- package/assets/fonts/qanelas-medium-webfont.woff2 +0 -0
- package/assets/fonts/qanelassoft-extrabold-webfont.woff +0 -0
- package/assets/fonts/qanelassoft-extrabold-webfont.woff2 +0 -0
- package/assets/img/.DS_Store +0 -0
- package/{src/assets → assets}/img/logo.png +0 -0
- package/assets/js/main.js +62 -0
- package/assets/js/modules/accordion.js +36 -0
- package/assets/js/modules/carousel.js +102 -0
- package/assets/js/modules/drawer.js +16 -0
- package/assets/js/modules/form.js +49 -0
- package/assets/js/modules/helpers.js +93 -0
- package/assets/js/modules/modal.js +72 -0
- package/assets/js/modules/nav.js +27 -0
- package/assets/js/modules/table.js +573 -0
- package/assets/js/modules/testimonial.js +83 -0
- package/assets/sass/.DS_Store +0 -0
- package/assets/sass/_components.scss +35 -0
- package/assets/sass/_corefiles.scss +58 -0
- package/assets/sass/_func.scss +9 -0
- package/assets/sass/_functions/functions.scss +95 -0
- package/assets/sass/_functions/mixins.scss +109 -0
- package/assets/sass/_functions/utilities.scss +238 -0
- package/assets/sass/_functions/variables.scss +411 -0
- package/assets/sass/components/accordion.scss +195 -0
- package/assets/sass/components/card.scss +168 -0
- package/assets/sass/components/cardDeck.scss +107 -0
- package/assets/sass/components/carousel.scss +265 -0
- package/assets/sass/components/charts.scss +562 -0
- package/assets/sass/components/drawer.scss +45 -0
- package/assets/sass/components/header.scss +57 -0
- package/assets/sass/components/modal.scss +133 -0
- package/assets/sass/components/nav.scss +619 -0
- package/assets/sass/components/property-searchbar.scss +138 -0
- package/assets/sass/components/snapshot.scss +69 -0
- package/assets/sass/components/tabs.scss +46 -0
- package/assets/sass/components/testimonial.scss +131 -0
- package/assets/sass/components/timeline.scss +93 -0
- package/assets/sass/core.scss +4 -0
- package/assets/sass/elements/buttons.scss +263 -0
- package/assets/sass/elements/container.scss +222 -0
- package/assets/sass/elements/forms.scss +128 -0
- package/assets/sass/elements/links.scss +95 -0
- package/assets/sass/elements/lists.scss +26 -0
- package/assets/sass/elements/media.scss +3 -0
- package/assets/sass/elements/tables.scss +247 -0
- package/assets/sass/elements/tooltips.scss +71 -0
- package/assets/sass/elements/type.scss +114 -0
- package/assets/sass/foundations/brand.scss +74 -0
- package/assets/sass/foundations/circles.scss +63 -0
- package/assets/sass/foundations/fonts.scss +17 -0
- package/assets/sass/foundations/icons.scss +46 -0
- package/assets/sass/foundations/reboot.scss +120 -0
- package/assets/sass/foundations/root.scss +45 -0
- package/assets/sass/main.scss +5 -0
- package/assets/svg/.DS_Store +0 -0
- package/assets/svg/flat/.DS_Store +0 -0
- package/assets/svg/flat/agreed.svg +1 -0
- package/assets/svg/flat/alert.svg +1 -0
- package/assets/svg/flat/asset-37.svg +1 -0
- package/assets/svg/flat/asset-73.svg +1 -0
- package/assets/svg/flat/asset-82.svg +1 -0
- package/assets/svg/flat/award.svg +1 -0
- package/assets/svg/flat/bath.svg +1 -0
- package/assets/svg/flat/bed.svg +1 -0
- package/assets/svg/flat/calculate.svg +1 -0
- package/assets/svg/flat/calendar.svg +1 -0
- package/assets/svg/flat/celebrate.svg +1 -0
- package/assets/svg/flat/chat-house.svg +1 -0
- package/assets/svg/flat/chat.svg +1 -0
- package/assets/svg/flat/circle.svg +1 -0
- package/assets/svg/flat/clean.svg +1 -0
- package/assets/svg/flat/clock.svg +1 -0
- package/assets/svg/flat/computer.svg +1 -0
- package/assets/svg/flat/down.svg +1 -0
- package/assets/svg/flat/edit.svg +1 -0
- package/assets/svg/flat/email.svg +1 -0
- package/assets/svg/flat/event.svg +1 -0
- package/assets/svg/flat/family.svg +1 -0
- package/assets/svg/flat/file.svg +1 -0
- package/assets/svg/flat/find.svg +1 -0
- package/assets/svg/flat/fireworks.svg +1 -0
- package/assets/svg/flat/fist-left.svg +1 -0
- package/assets/svg/flat/fist.svg +1 -0
- package/assets/svg/flat/folder.svg +1 -0
- package/assets/svg/flat/footprints.svg +1 -0
- package/assets/svg/flat/hand.svg +1 -0
- package/assets/svg/flat/hands.svg +1 -0
- package/assets/svg/flat/house-2.svg +1 -0
- package/assets/svg/flat/house.svg +1 -0
- package/assets/svg/flat/idea.svg +1 -0
- package/assets/svg/flat/judge-house.svg +1 -0
- package/assets/svg/flat/judge.svg +1 -0
- package/assets/svg/flat/keys-house.svg +1 -0
- package/assets/svg/flat/lock.svg +1 -0
- package/assets/svg/flat/mobile.svg +1 -0
- package/assets/svg/flat/money.svg +1 -0
- package/assets/svg/flat/monument.svg +1 -0
- package/assets/svg/flat/online-judgement.svg +1 -0
- package/assets/svg/flat/paint.svg +1 -0
- package/assets/svg/flat/person-2.svg +1 -0
- package/assets/svg/flat/person.svg +1 -0
- package/assets/svg/flat/phone.svg +1 -0
- package/assets/svg/flat/pin.svg +1 -0
- package/assets/svg/flat/pound.svg +1 -0
- package/assets/svg/flat/present.svg +1 -0
- package/assets/svg/flat/qualification.svg +1 -0
- package/assets/svg/flat/rocket.svg +1 -0
- package/assets/svg/flat/sale.svg +1 -0
- package/assets/svg/flat/save.svg +1 -0
- package/assets/svg/flat/scale.svg +1 -0
- package/assets/svg/flat/send.svg +1 -0
- package/assets/svg/flat/share.svg +1 -0
- package/assets/svg/flat/sofa.svg +1 -0
- package/assets/svg/flat/sold.svg +1 -0
- package/assets/svg/flat/star.svg +1 -0
- package/assets/svg/flat/stopwatch.svg +1 -0
- package/assets/svg/flat/task.svg +1 -0
- package/assets/svg/flat/telescope.svg +1 -0
- package/assets/svg/flat/thumb.svg +1 -0
- package/assets/svg/flat/time.svg +1 -0
- package/assets/svg/flat/up.svg +1 -0
- package/assets/svg/flat/valuation.svg +1 -0
- package/assets/svg/flat/value-house.svg +1 -0
- package/assets/svg/flat/warning.svg +1 -0
- package/assets/svg/flat/water.svg +1 -0
- package/assets/svg/icons.svg +51 -0
- package/assets/svg/illustrations/commuter1.svg +1 -0
- package/assets/svg/illustrations/commuter2.svg +1 -0
- package/assets/svg/illustrations/commuter3.svg +1 -0
- package/assets/svg/logo.svg +43 -0
- package/dist/components.common.js +8218 -390
- package/dist/components.common.js.map +1 -1
- package/dist/components.css +2 -1
- package/dist/components.css.map +1 -0
- package/dist/components.umd.js +8218 -390
- 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 +88 -57
- package/src/.DS_Store +0 -0
- package/src/components/Accordion/Accordion.vue +24 -0
- package/src/components/Accordion/AccordionItem.vue +43 -0
- package/src/components/Accordion/README.md +34 -0
- package/src/components/Banner/Banner.vue +38 -0
- package/src/components/Banner/README.md +24 -0
- package/src/components/Card/Card.vue +115 -0
- package/src/components/Card/README.md +24 -0
- package/src/components/CardDeck/CardDeck.vue +78 -0
- package/src/components/CardDeck/README.md +25 -0
- package/src/components/Carousel/Carousel.vue +86 -0
- package/src/components/Carousel/README.md +20 -0
- package/src/components/Chart/Chart.vue +246 -0
- package/src/components/Chart/README.md +18 -0
- package/src/components/Drawer/Drawer.vue +54 -0
- package/src/components/Drawer/README.md +23 -0
- package/src/components/Header/Header.vue +39 -0
- package/src/components/Header/README.md +28 -0
- package/src/components/Modal/Modal.vue +44 -0
- package/src/components/Modal/README.md +20 -0
- package/src/components/Nav/Nav.vue +129 -0
- package/src/components/Nav/README.md +23 -0
- package/src/components/PropertySearchbar/PropertySearchbar.vue +206 -0
- package/src/components/PropertySearchbar/README.md +26 -0
- package/src/components/Snapshot/README.md +21 -0
- package/src/components/Snapshot/Snapshot.vue +33 -0
- package/src/components/Tabs/README.md +27 -0
- package/src/components/Tabs/Tab.vue +17 -0
- package/src/components/Tabs/Tabs.vue +55 -0
- package/src/components/Testimonial/README.md +26 -0
- package/src/components/Testimonial/Testimonial.vue +61 -0
- package/src/components/Timeline/README.md +18 -0
- package/src/components/Timeline/Timeline.vue +25 -0
- package/src/elements/Input/Input.vue +236 -0
- package/src/elements/Input/README.md +18 -0
- package/src/elements/Table/README.md +55 -0
- package/src/elements/Table/Table.vue +112 -0
- package/src/foundations/Icon/Icon.vue +21 -0
- package/src/foundations/Icon/README.md +11 -0
- package/src/foundations/Logo/Logo.vue +39 -0
- package/src/foundations/Logo/README.md +20 -0
- package/src/helpers/strings.js +12 -0
- package/src/index.js +21 -6
- package/src/assets/css/default.css +0 -99
- package/src/assets/logo.png +0 -0
- package/src/assets/scss/_variables.scss +0 -13
- package/src/components/KeyFacts/KeyFact.vue +0 -45
- package/src/components/KeyFacts/KeyFactGroup.vue +0 -44
- package/src/components/KeyFacts/README.md +0 -23
- package/src/components/KeyInformation/KeyInformation.vue +0 -23
- package/src/components/KeyInformation/README.md +0 -32
- package/src/components/PropertyTaskIntro/PropertyTaskIntro.vue +0 -74
- package/src/components/PropertyTaskIntro/README.md +0 -27
- package/src/components/TaskTitle/README.md +0 -24
- package/src/components/TaskTitle/TaskTitle.vue +0 -68
- package/src/components/VendorTable/README.md +0 -63
- package/src/components/VendorTable/VendorTable.vue +0 -49
package/package.json
CHANGED
|
@@ -1,57 +1,88 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@iamproperty/components",
|
|
3
|
-
"version": "
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "Component library for iamproperty",
|
|
6
|
-
"author": {
|
|
7
|
-
"name": "
|
|
8
|
-
},
|
|
9
|
-
"license": "UNLICENSED",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"build
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"eslint-
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@iamproperty/components",
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Component library for iamproperty",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "iamproperty"
|
|
8
|
+
},
|
|
9
|
+
"license": "UNLICENSED",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "npm run serve",
|
|
12
|
+
"serve": "vue-cli-service serve docs/main.js",
|
|
13
|
+
"build": "vue-cli-service build --target lib src/index.js",
|
|
14
|
+
"build:docs": "vue-cli-service build docs/main.js",
|
|
15
|
+
"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
|
+
"lint": "vue-cli-service lint",
|
|
20
|
+
"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",
|
|
21
|
+
"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",
|
|
22
|
+
"prepack": "npm run build",
|
|
23
|
+
"audit": "node local_modules/audit.js",
|
|
24
|
+
"pull-request": "npm run test:unit && npm run test:approve && npm run compile:sass && npm run compile:js && npm run audit"
|
|
25
|
+
},
|
|
26
|
+
"main": "dist/components.umd.js",
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@vue/eslint-config-standard": "^6.1.0",
|
|
29
|
+
"bootstrap": "^5.1.3",
|
|
30
|
+
"glob": "^7.2.0",
|
|
31
|
+
"sass": "^1.45.1",
|
|
32
|
+
"sass-loader": "^10.2.0",
|
|
33
|
+
"vue": "^2.6.14",
|
|
34
|
+
"vue-markdown-loader": "^2.5.0",
|
|
35
|
+
"vue-router": "^3.5.3"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/cli": "^7.16.0",
|
|
39
|
+
"@babel/core": "^7.16.5",
|
|
40
|
+
"@babel/eslint-parser": "^7.16.5",
|
|
41
|
+
"@babel/preset-env": "^7.16.5",
|
|
42
|
+
"@popperjs/core": "^2.11.0",
|
|
43
|
+
"@rollup/plugin-babel": "^5.3.0",
|
|
44
|
+
"@rollup/plugin-commonjs": "^19.0.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^13.1.1",
|
|
46
|
+
"@rollup/plugin-replace": "^2.4.2",
|
|
47
|
+
"@vue/cli-plugin-babel": "^4.5.15",
|
|
48
|
+
"@vue/cli-plugin-eslint": "^4.5.15",
|
|
49
|
+
"@vue/cli-plugin-router": "^4.5.15",
|
|
50
|
+
"@vue/cli-plugin-unit-jest": "^4.5.15",
|
|
51
|
+
"@vue/cli-service": "^4.5.15",
|
|
52
|
+
"@vue/test-utils": "^1.3.0",
|
|
53
|
+
"babel-jest": "^27.4.5",
|
|
54
|
+
"cross-env": "^7.0.3",
|
|
55
|
+
"eslint": "^7.32.0",
|
|
56
|
+
"eslint-plugin-import": "^2.25.3",
|
|
57
|
+
"eslint-plugin-node": "^11.1.0",
|
|
58
|
+
"eslint-plugin-promise": "^5.2.0",
|
|
59
|
+
"eslint-plugin-standard": "^4.1.0",
|
|
60
|
+
"eslint-plugin-vue": "^7.20.0",
|
|
61
|
+
"html-loader": "^2.1.2",
|
|
62
|
+
"jest-environment-puppeteer": "^5.0.4",
|
|
63
|
+
"jest-image-snapshot": "^4.5.1",
|
|
64
|
+
"jest-puppeteer": "^5.0.4",
|
|
65
|
+
"jest-puppeteer-preset": "^5.0.4",
|
|
66
|
+
"markdown-loader": "^6.0.0",
|
|
67
|
+
"puppeteer": "^10.4.0",
|
|
68
|
+
"rollup": "^2.62.0",
|
|
69
|
+
"rollup-plugin-istanbul": "^3.0.0",
|
|
70
|
+
"sass-true": "^6.0.1",
|
|
71
|
+
"serve": "^12.0.1",
|
|
72
|
+
"terser": "5.1.0",
|
|
73
|
+
"vue-loader": "^15.9.8",
|
|
74
|
+
"vue-svg-loader": "^0.16.0",
|
|
75
|
+
"vue-template-compiler": "^2.6.14"
|
|
76
|
+
},
|
|
77
|
+
"registry-url": "https://registry.npmjs.com",
|
|
78
|
+
"repository": {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "git://github.com/iamproperty/iamproperty-vue-component-library.git"
|
|
81
|
+
},
|
|
82
|
+
"files": [
|
|
83
|
+
"assets/*",
|
|
84
|
+
"dist/*",
|
|
85
|
+
"src/*"
|
|
86
|
+
],
|
|
87
|
+
"localURL": "http://localhost:8080"
|
|
88
|
+
}
|
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container accordion" ref="wrapper">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<style lang="scss">
|
|
8
|
+
@import "../../../assets/sass/_func.scss";
|
|
9
|
+
@import "../../../assets/sass/components/accordion.scss";
|
|
10
|
+
|
|
11
|
+
</style>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import accordion from '../../../assets/js/modules/accordion.js'
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'Accordion',
|
|
18
|
+
props: {
|
|
19
|
+
},
|
|
20
|
+
mounted(){
|
|
21
|
+
accordion(this.$refs.wrapper);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
@@ -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: 'Accordion',
|
|
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>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
### Usage
|
|
2
|
+
|
|
3
|
+
```
|
|
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>
|
|
12
|
+
```
|
|
13
|
+
|
|
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
|
|
21
|
+
|
|
22
|
+
| Option | Type | Default Value | Description |
|
|
23
|
+
| ------ | ---- | ------------- | ----------- |
|
|
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 |
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Accordion item Slots
|
|
31
|
+
|
|
32
|
+
| Option | Default Value | Description |
|
|
33
|
+
| ------ | ------------- | ----------- |
|
|
34
|
+
| default | - | This is the content of the accordion item |
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<div :class="'bg-'+background+' mb-4'">
|
|
4
|
+
<div class="row">
|
|
5
|
+
<div class="col-sm-6">
|
|
6
|
+
<div class="pt-5 pb-3 px-4">
|
|
7
|
+
<h2>{{title}}</h2>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="col-sm-6 col-md-5 ms-auto">
|
|
12
|
+
<img v-if="image" :src="image" alt="" class="h-100 w-100 object-cover" />
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'Header',
|
|
22
|
+
props: {
|
|
23
|
+
title: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
image: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
background: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'light',
|
|
34
|
+
required: false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
### Usage
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
<Banner title="The benefits of buying through auction" :image="require('../../assets/shutterstock_1229155495.webp')">
|
|
5
|
+
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,</p>
|
|
6
|
+
<a href="/buyers-guide" class="btn">Download our buyers guide</a>
|
|
7
|
+
</Banner>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
### Properties
|
|
11
|
+
|
|
12
|
+
| Option | Type | Default Value | Description |
|
|
13
|
+
| ------ | ---- | ------------- | ----------- |
|
|
14
|
+
| title | String | - | Required |
|
|
15
|
+
| image | String | - | Optional image url to display in the background |
|
|
16
|
+
| background | String | light | The background colour can be overwritten if need be |
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Slots
|
|
21
|
+
|
|
22
|
+
| Option | Default Value | Description |
|
|
23
|
+
| ------ | ------------- | ----------- |
|
|
24
|
+
| default | - | Will display underneath the heading |
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a :href="link" :class="'card'+(type?' card--'+type:'')" :title="'Find out more: '+title+(subtitle ? ' - '+subtitle:'')">
|
|
3
|
+
<div class="card-header__wrapper" v-if="image">
|
|
4
|
+
<img :src="image" alt="" loading="lazy" class="card-image" />
|
|
5
|
+
<div class="card-header">
|
|
6
|
+
<span class="badge bg-primary p-2 me-2" v-if="this.details && this.details.status" v-html="cardStatus()"></span>
|
|
7
|
+
<span class="badge bg-black bg-opacity-50 p-2 align-self-end" v-if="this.details && (this.details.images || this.details.videos)" v-html="cardMedia()"></span>
|
|
8
|
+
</div>
|
|
9
|
+
<img v-if="details && details.logo" :src="details.logo" alt="" loading="lazy" class="card-logo" />
|
|
10
|
+
</div>
|
|
11
|
+
<div class="card-body" v-html="cardContent()"></div>
|
|
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
|
+
</div>
|
|
15
|
+
</a>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<style lang="scss">
|
|
19
|
+
@import "../../../assets/sass/_func.scss";
|
|
20
|
+
@import "../../../node_modules/bootstrap/scss/_card";
|
|
21
|
+
@import "../../../assets/sass/components/card";
|
|
22
|
+
</style>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
name: 'Card',
|
|
27
|
+
props: {
|
|
28
|
+
link: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
titleclass: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false,
|
|
35
|
+
default: 'h4'
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: false
|
|
40
|
+
},
|
|
41
|
+
subtitle: {
|
|
42
|
+
type: String,
|
|
43
|
+
required: false
|
|
44
|
+
},
|
|
45
|
+
content: {
|
|
46
|
+
type: String,
|
|
47
|
+
required: false
|
|
48
|
+
},
|
|
49
|
+
type: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: false
|
|
52
|
+
},
|
|
53
|
+
btntype: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
default: 'secondary'
|
|
57
|
+
},
|
|
58
|
+
ctatext: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: false,
|
|
61
|
+
default: 'Find out more'
|
|
62
|
+
},
|
|
63
|
+
hidectatext: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
required: false,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
image: {
|
|
69
|
+
type: String,
|
|
70
|
+
required: false
|
|
71
|
+
},
|
|
72
|
+
details: {
|
|
73
|
+
type: Object,
|
|
74
|
+
required: false
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
computed: {
|
|
78
|
+
cardStatus (){
|
|
79
|
+
return () => {
|
|
80
|
+
return this.details && this.details.status ? `${this.details.status == 'Live now' ? '<span class="text-danger lh-0 fs-1 align-middle">•</span> ': ''}${this.details.status}`: '';
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
cardMedia (){
|
|
84
|
+
return () => {
|
|
85
|
+
return `<svg xmlns='http://www.w3.org/2000/svg' width='30' height='28' viewBox='0 0 30 28' class="icon text-white"><title>Images </title><path d='M15 10.5c2.484 0 4.5 2.016 4.5 4.5s-2.016 4.5-4.5 4.5-4.5-2.016-4.5-4.5 2.016-4.5 4.5-4.5zM26 4c2.203 0 4 1.797 4 4v14c0 2.203-1.797 4-4 4h-22c-2.203 0-4-1.797-4-4v-14c0-2.203 1.797-4 4-4h3.5l0.797-2.125c0.391-1.031 1.609-1.875 2.703-1.875h8c1.094 0 2.312 0.844 2.703 1.875l0.797 2.125h3.5zM15 22c3.859 0 7-3.141 7-7s-3.141-7-7-7-7 3.141-7 7 3.141 7 7 7z'></path></svg> ${this.details && this.details.images ? `${this.details.images}`: `0`} | <svg xmlns='http://www.w3.org/2000/svg' width='30' height='28' viewBox='0 0 28 28' class="icon text-white ms-0"><title>Videos </title><path d="M11.109 17.625l7.562-3.906-7.562-3.953v7.859zM14 4.156c5.891 0 9.797 0.281 9.797 0.281 0.547 0.063 1.75 0.063 2.812 1.188 0 0 0.859 0.844 1.109 2.781 0.297 2.266 0.281 4.531 0.281 4.531v2.125s0.016 2.266-0.281 4.531c-0.25 1.922-1.109 2.781-1.109 2.781-1.062 1.109-2.266 1.109-2.812 1.172 0 0-3.906 0.297-9.797 0.297v0c-7.281-0.063-9.516-0.281-9.516-0.281-0.625-0.109-2.031-0.078-3.094-1.188 0 0-0.859-0.859-1.109-2.781-0.297-2.266-0.281-4.531-0.281-4.531v-2.125s-0.016-2.266 0.281-4.531c0.25-1.937 1.109-2.781 1.109-2.781 1.062-1.125 2.266-1.125 2.812-1.188 0 0 3.906-0.281 9.797-0.281v0z"></path></svg> ${this.details && this.details.videos ? `${this.details.videos}`: `0`}`;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
cardContent () {
|
|
89
|
+
return () => {
|
|
90
|
+
const tagClass = function(tag){
|
|
91
|
+
switch(tag) {
|
|
92
|
+
case 'Modern method':
|
|
93
|
+
return 'bg-secondary text-primary'
|
|
94
|
+
case 'Freehold':
|
|
95
|
+
return 'bg-light text-dark'
|
|
96
|
+
default:
|
|
97
|
+
return 'bg-body text-white'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
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.titleclass}">${this.title}${this.subtitle ? ` <span class="d-block fw-normal font-body text-body small">${this.subtitle}</span>` : ''}</span>` : ``;
|
|
103
|
+
|
|
104
|
+
const 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
|
+
`;
|
|
109
|
+
|
|
110
|
+
return `${tags}${title}${details}${this.content}`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</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 |
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container card-deck prevent-invert" :data-card-type="cardtype">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
<div :class="`row row-cols-${cols} row-cols-sm-${smcols} row-cols-md-${mdcols} ${gap ? `g-${gap}`: ``}`">
|
|
5
|
+
<div class="col" v-for="(value,index) in items" :key="index">
|
|
6
|
+
<Card v-bind="value" :class="cardclass" :type="cardtype" :btntype="btntype" :titleclass="titleclass" :ctatext="ctatext" :hidectatext="hidectatext"></Card>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
<slot name="after"></slot>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<style lang="scss">
|
|
14
|
+
@import "../../../assets/sass/_func.scss";
|
|
15
|
+
@import "../../../assets/sass/components/cardDeck.scss";
|
|
16
|
+
</style>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import Card from '../Card/Card.vue'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
components: {
|
|
23
|
+
Card
|
|
24
|
+
},
|
|
25
|
+
name: 'CardDeck',
|
|
26
|
+
props: {
|
|
27
|
+
items: {
|
|
28
|
+
type: Array,
|
|
29
|
+
required: false
|
|
30
|
+
},
|
|
31
|
+
cols: {
|
|
32
|
+
type: Number,
|
|
33
|
+
required: false,
|
|
34
|
+
default: 1
|
|
35
|
+
},
|
|
36
|
+
smcols: {
|
|
37
|
+
type: Number,
|
|
38
|
+
required: false,
|
|
39
|
+
default: 1
|
|
40
|
+
},
|
|
41
|
+
mdcols: {
|
|
42
|
+
type: Number,
|
|
43
|
+
required: false,
|
|
44
|
+
default: 3
|
|
45
|
+
},
|
|
46
|
+
gap: {
|
|
47
|
+
type: Number,
|
|
48
|
+
required: false,
|
|
49
|
+
default: 4
|
|
50
|
+
},
|
|
51
|
+
cardtype: {
|
|
52
|
+
type: String,
|
|
53
|
+
required: false
|
|
54
|
+
},
|
|
55
|
+
cardclass: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: false
|
|
58
|
+
},
|
|
59
|
+
btntype: {
|
|
60
|
+
type: String,
|
|
61
|
+
required: false
|
|
62
|
+
},
|
|
63
|
+
titleclass: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: false
|
|
66
|
+
},
|
|
67
|
+
ctatext: {
|
|
68
|
+
type: String,
|
|
69
|
+
required: false
|
|
70
|
+
},
|
|
71
|
+
hidectatext: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
required: false,
|
|
74
|
+
default: false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
### Usage
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
<CardDeck :items="items"></CardDeck>
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Properties
|
|
8
|
+
|
|
9
|
+
| Option | Type | Default Value | Description |
|
|
10
|
+
| ------ | ---- | ------------- | ----------- |
|
|
11
|
+
| cols | Number | 1 | Number of columns on mobile |
|
|
12
|
+
| smcols | Number | 1 | Number of columns on tablet |
|
|
13
|
+
| mdcols | Number | 3 | Number of columns on desktop |
|
|
14
|
+
| items | Array | - | Card data passed (See card component) |
|
|
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
|
+
|
|
20
|
+
### Slots
|
|
21
|
+
|
|
22
|
+
| Option | Default Value | Description |
|
|
23
|
+
| ------ | ------------- | ----------- |
|
|
24
|
+
| default | - | Will display before the cards |
|
|
25
|
+
| after | - | Will display underneath the cards |
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container carousel" :id="'carousel'+id" ref="wrapper" :data-cols="cols" :data-sm-cols="smcols" :data-md-cols="mdcols">
|
|
3
|
+
<slot><!-- Use for titles etc --></slot>
|
|
4
|
+
<div class="carousel__wrapper">
|
|
5
|
+
<div class="carousel__inner">
|
|
6
|
+
|
|
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
|
+
</div>
|
|
11
|
+
</div>
|
|
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
|
+
</div>
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div :class="`carousel__controls cols-${cols} cols-sm-${smcols} cols-md-${mdcols}`">
|
|
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
|
+
</div>
|
|
21
|
+
<button class="btn btn-prev" data-go="0" disabled>Prev</button>
|
|
22
|
+
<button class="btn btn-next" data-go="2">Next</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<style lang="scss">
|
|
29
|
+
@import "../../../assets/sass/_func.scss";
|
|
30
|
+
@import "../../../assets/sass/components/carousel.scss";
|
|
31
|
+
</style>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
import Card from '../Card/Card.vue'
|
|
36
|
+
import CardDeck from '../CardDeck/CardDeck.vue'
|
|
37
|
+
import carousel from '../../../assets/js/modules/carousel.js'
|
|
38
|
+
|
|
39
|
+
// Inherit the card deck props
|
|
40
|
+
let cardDeckProps = CardDeck.props;
|
|
41
|
+
// Update the default values
|
|
42
|
+
cardDeckProps.gap.default = 0
|
|
43
|
+
cardDeckProps.cols.default = 1
|
|
44
|
+
cardDeckProps.smcols.default = 2
|
|
45
|
+
cardDeckProps.mdcols.default = 4
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
components: {
|
|
50
|
+
Card
|
|
51
|
+
},
|
|
52
|
+
name: 'Carousel',
|
|
53
|
+
data () {
|
|
54
|
+
return {
|
|
55
|
+
id: null
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
props: {
|
|
59
|
+
...cardDeckProps,
|
|
60
|
+
colclass: {
|
|
61
|
+
type: String,
|
|
62
|
+
required: false
|
|
63
|
+
},
|
|
64
|
+
type: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
computed: {
|
|
70
|
+
content (){
|
|
71
|
+
return (value) => {
|
|
72
|
+
return `${value.image ? `<img src="${value.image}" alt="" />` : ''}${value.content?value.content:''}`;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
mounted(){
|
|
77
|
+
|
|
78
|
+
this.id = this._uid
|
|
79
|
+
|
|
80
|
+
this.$nextTick(function () {
|
|
81
|
+
|
|
82
|
+
carousel(this.$refs.wrapper);
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|