@iamproperty/components 2.0.1 → 2.1.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.
Files changed (59) hide show
  1. package/README.md +12 -2
  2. package/assets/.DS_Store +0 -0
  3. package/assets/css/core.min.css +1 -1
  4. package/assets/css/core.min.css.map +1 -1
  5. package/assets/css/style.min.css +1 -1
  6. package/assets/css/style.min.css.map +1 -1
  7. package/assets/img/.DS_Store +0 -0
  8. package/assets/js/main.js +4 -0
  9. package/assets/js/modules/accordion.js +13 -10
  10. package/assets/js/modules/modal.js +72 -0
  11. package/assets/js/scripts.bundle.js +98 -65
  12. package/assets/js/scripts.bundle.js.map +1 -1
  13. package/assets/js/scripts.bundle.min.js +2 -2
  14. package/assets/js/scripts.bundle.min.js.map +1 -1
  15. package/assets/sass/.DS_Store +0 -0
  16. package/assets/sass/_components.scss +4 -0
  17. package/assets/sass/_corefiles.scss +1 -0
  18. package/assets/sass/components/accordion.scss +79 -3
  19. package/assets/sass/components/charts.scss +562 -0
  20. package/assets/sass/components/modal.scss +78 -3
  21. package/assets/sass/components/snapshot.scss +69 -0
  22. package/assets/sass/components/timeline.scss +93 -0
  23. package/assets/sass/elements/buttons.scss +1 -1
  24. package/assets/sass/elements/tooltips.scss +71 -0
  25. package/assets/sass/foundations/reboot.scss +12 -0
  26. package/assets/svg/.DS_Store +0 -0
  27. package/assets/svg/flat/.DS_Store +0 -0
  28. package/dist/components.common.js +1318 -630
  29. package/dist/components.common.js.map +1 -1
  30. package/dist/components.css +1 -1
  31. package/dist/components.css.map +1 -1
  32. package/dist/components.umd.js +1318 -630
  33. package/dist/components.umd.js.map +1 -1
  34. package/dist/components.umd.min.js +1 -1
  35. package/dist/components.umd.min.js.map +1 -1
  36. package/package.json +34 -31
  37. package/src/.DS_Store +0 -0
  38. package/src/components/Accordion/Accordion.vue +0 -18
  39. package/src/components/Accordion/AccordionItem.vue +43 -0
  40. package/src/components/Accordion/README.md +21 -8
  41. package/src/components/Card/Card.vue +12 -12
  42. package/src/components/Card/README.md +7 -7
  43. package/src/components/CardDeck/CardDeck.vue +11 -11
  44. package/src/components/CardDeck/README.md +6 -6
  45. package/src/components/Carousel/Carousel.vue +10 -10
  46. package/src/components/Carousel/README.md +1 -1
  47. package/src/components/Chart/Chart.vue +246 -0
  48. package/src/components/Chart/README.md +18 -0
  49. package/src/components/Modal/Modal.vue +15 -4
  50. package/src/components/Modal/README.md +1 -0
  51. package/src/components/Nav/README.md +3 -3
  52. package/src/components/PropertySearchbar/PropertySearchbar.vue +13 -13
  53. package/src/components/Snapshot/README.md +21 -0
  54. package/src/components/Snapshot/Snapshot.vue +33 -0
  55. package/src/components/Timeline/README.md +18 -0
  56. package/src/components/Timeline/Timeline.vue +25 -0
  57. package/src/elements/Input/Input.vue +15 -15
  58. package/src/elements/Input/README.md +4 -4
  59. package/src/elements/Table/Table.vue +17 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamproperty/components",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "description": "Component library for iamproperty",
6
6
  "author": {
@@ -26,58 +26,61 @@
26
26
  "main": "dist/components.umd.js",
27
27
  "dependencies": {
28
28
  "@vue/eslint-config-standard": "^6.1.0",
29
- "bootstrap": "^5.1.0",
30
- "glob": "^7.1.7",
31
- "sass": "^1.37.5",
29
+ "bootstrap": "^5.1.3",
30
+ "glob": "^7.2.0",
31
+ "glob-parent": "^6.0.2",
32
+ "puppeteer-core": "^11.0.0",
33
+ "sass": "^1.43.4",
32
34
  "sass-loader": "^10.2.0",
33
35
  "vue": "^2.6.14",
34
- "vue-markdown-loader": "^2.4.1",
35
- "vue-router": "^3.5.2"
36
+ "vue-markdown-loader": "^2.5.0",
37
+ "vue-router": "^3.5.3"
36
38
  },
37
39
  "devDependencies": {
38
- "@babel/cli": "^7.14.5",
39
- "@babel/core": "^7.14.8",
40
- "@babel/eslint-parser": "^7.14.9",
41
- "@babel/preset-env": "^7.14.7",
42
- "@popperjs/core": "^2.9.2",
40
+ "@babel/cli": "^7.16.0",
41
+ "@babel/core": "^7.16.0",
42
+ "@babel/eslint-parser": "^7.16.3",
43
+ "@babel/preset-env": "^7.16.4",
44
+ "@popperjs/core": "^2.10.2",
43
45
  "@rollup/plugin-babel": "^5.3.0",
44
46
  "@rollup/plugin-commonjs": "^19.0.0",
45
- "@rollup/plugin-node-resolve": "^13.0.0",
47
+ "@rollup/plugin-node-resolve": "^13.0.6",
46
48
  "@rollup/plugin-replace": "^2.4.2",
47
- "@vue/cli-plugin-babel": "^4.5.13",
48
- "@vue/cli-plugin-eslint": "^4.5.13",
49
- "@vue/cli-plugin-router": "^4.5.13",
50
- "@vue/cli-plugin-unit-jest": "^4.5.13",
51
- "@vue/cli-service": "^4.5.13",
52
- "@vue/test-utils": "^1.2.2",
53
- "babel-jest": "^27.0.6",
49
+ "@vue/cli-plugin-babel": "^4.5.15",
50
+ "@vue/cli-plugin-eslint": "^4.5.15",
51
+ "@vue/cli-plugin-router": "^4.5.15",
52
+ "@vue/cli-plugin-unit-jest": "^4.5.15",
53
+ "@vue/cli-service": "^4.5.15",
54
+ "@vue/test-utils": "^1.3.0",
55
+ "babel-jest": "^27.3.1",
54
56
  "cross-env": "^7.0.3",
55
- "eslint": "^7.32.0",
56
- "eslint-plugin-import": "^2.23.4",
57
+ "eslint": "^8.2.0",
58
+ "eslint-plugin-import": "^2.25.3",
57
59
  "eslint-plugin-node": "^11.1.0",
58
- "eslint-plugin-promise": "^5.1.0",
60
+ "eslint-plugin-promise": "^5.1.1",
59
61
  "eslint-plugin-standard": "^4.1.0",
60
- "eslint-plugin-vue": "^7.15.1",
61
- "html-loader": "^2.1.2",
62
+ "eslint-plugin-vue": "^7.20.0",
63
+ "html-loader": "^3.0.1",
62
64
  "jest-environment-puppeteer": "^5.0.4",
63
65
  "jest-image-snapshot": "^4.5.1",
64
- "jest-puppeteer": "^5.0.4",
65
- "jest-puppeteer-preset": "^5.0.4",
66
+ "jest-puppeteer": "^6.0.0",
67
+ "jest-puppeteer-preset": "^6.0.0",
66
68
  "markdown-loader": "^6.0.0",
67
69
  "puppeteer": "^10.2.0",
68
- "rollup": "^2.52.2",
70
+ "rollup": "^2.60.0",
69
71
  "rollup-plugin-istanbul": "^3.0.0",
70
72
  "sass-true": "^6.0.1",
71
- "serve": "^12.0.0",
73
+ "serve": "^13.0.2",
72
74
  "terser": "5.1.0",
73
75
  "vue-loader": "^15.9.8",
74
76
  "vue-svg-loader": "^0.16.0",
75
- "vue-template-compiler": "^2.6.14"
77
+ "vue-template-compiler": "^2.6.14",
78
+ "webpack": "^4.46.0"
76
79
  },
77
- "_id": "iamp-component-library@2.0.0",
80
+ "registry-url": "https://registry.npmjs.com",
78
81
  "repository": {
79
82
  "type": "git",
80
- "url": "git@codebasehq.com:isg/isg-marketplace-intelligent-compliance/iamp-component-library.git"
83
+ "url": "git://github.com/iamproperty/iamproperty-vue-component-library.git"
81
84
  },
82
85
  "files": [
83
86
  "assets/*",
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: '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>
@@ -1,21 +1,34 @@
1
1
  ### Usage
2
2
 
3
3
  ```
4
- <Accordion :items="items"></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
- ### Properties
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
- | items | Array | - | Table row data passed |
12
- | - item.summary | String | - | A question or statement |
13
- | - item.detail | HTML | - | An answer to a question or a detailed explanation of a statement.
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 | - | Will display before the accordion items |
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+(subTitle ? ' - '+subTitle:'')">
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="hideCtaText == false">
13
- <span :class="`${btnType == 'link' ? `link` : `btn btn-${btnType}`} mb-0`">{{ctaText}}<span class="visually-hidden"> about {{title}}</span></span>
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,7 +29,7 @@ export default {
29
29
  type: String,
30
30
  required: false
31
31
  },
32
- titleClass: {
32
+ titleclass: {
33
33
  type: String,
34
34
  required: false,
35
35
  default: 'h2'
@@ -38,7 +38,7 @@ export default {
38
38
  type: String,
39
39
  required: false
40
40
  },
41
- subTitle: {
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
- btnType: {
53
+ btntype: {
54
54
  type: String,
55
55
  required: false,
56
56
  default: 'secondary'
57
57
  },
58
- ctaText: {
58
+ ctatext: {
59
59
  type: String,
60
60
  required: false,
61
61
  default: 'Find out more'
62
62
  },
63
- hideCtaText: {
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.titleClass}">${this.title}${this.subTitle ? ` <span class="d-block fw-normal font-body text-body small">${this.subTitle}</span>` : ''}</span>` : ``;
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.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>` : ``}
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
- | titleClass | String | h2 | Update the class of the title from being a h2 |
13
- | subTitle | String | - | Optional sub heading |
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
- | 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 |
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.guidePrice | String | - | Property guide price |
22
- | - detail.auctionTime | String | - | Auction time left |
23
- | - detail.readTime | String | - | How long it will take to read |
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="cardType">
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-${smCols} row-cols-md-${mdCols} ${gap ? `g-${gap}`: ``}`">
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="cardClass" :type="cardType" :btnType="btnType" :titleClass="titleClass" :ctaText="ctaText" :hideCtaText="hideCtaText"></Card>
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
- smCols: {
36
+ smcols: {
37
37
  type: Number,
38
38
  required: false,
39
39
  default: 1
40
40
  },
41
- mdCols: {
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
- cardType: {
51
+ cardtype: {
52
52
  type: String,
53
53
  required: false
54
54
  },
55
- cardClass: {
55
+ cardclass: {
56
56
  type: String,
57
57
  required: false
58
58
  },
59
- btnType: {
59
+ btntype: {
60
60
  type: String,
61
61
  required: false
62
62
  },
63
- titleClass: {
63
+ titleclass: {
64
64
  type: String,
65
65
  required: false
66
66
  },
67
- ctaText: {
67
+ ctatext: {
68
68
  type: String,
69
69
  required: false
70
70
  },
71
- hideCtaText: {
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
- | smCols | Number | 1 | Number of columns on tablet |
13
- | mdCols | Number | 3 | Number of columns on desktop |
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
- | 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 |
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="smCols" :data-md-cols="mdCols">
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-${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" :btnType="btnType" :titleClass="titleClass" :ctaText="ctaText" :hideCtaText="hideCtaText"></Card>
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-${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>
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-${smCols} cols-md-${mdCols}`">
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.smCols.default = 2
45
- cardDeckProps.mdCols.default = 4
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
- colClass: {
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
- | 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. |
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