@iamproperty/components 2.9.0 → 3.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 (89) hide show
  1. package/README.md +9 -130
  2. package/assets/css/core.min.css +1 -1
  3. package/assets/css/core.min.css.map +1 -1
  4. package/assets/css/style.min.css +1 -1
  5. package/assets/css/style.min.css.map +1 -1
  6. package/assets/favicons/manifest.json +32 -0
  7. package/assets/js/main.js +57 -0
  8. package/assets/js/modules/chart.js +18 -17
  9. package/assets/js/modules/file-upload.js +48 -0
  10. package/assets/js/modules/form.js +27 -18
  11. package/assets/js/modules/nav.js +9 -8
  12. package/assets/js/modules/orderablelist.js +122 -0
  13. package/assets/js/modules/table.js +24 -24
  14. package/assets/js/scripts.bundle.js +63 -52
  15. package/assets/js/scripts.bundle.js.map +1 -1
  16. package/assets/js/scripts.bundle.min.js +2 -2
  17. package/assets/js/scripts.bundle.min.js.map +1 -1
  18. package/assets/sass/_functions/utilities.scss +3 -110
  19. package/assets/sass/_functions/variables.scss +3 -2
  20. package/assets/sass/_tests/colours.spec.scss +45 -0
  21. package/assets/sass/_tests/func.spec.scss +233 -0
  22. package/assets/sass/_tests/mixins.spec.scss +194 -0
  23. package/assets/sass/_tests/sass.spec.js +9 -0
  24. package/assets/sass/_tests/typography.spec.scss +36 -0
  25. package/assets/sass/components/alert.scss +1 -1
  26. package/assets/sass/components/cardDeck.scss +1 -1
  27. package/assets/sass/components/carousel.scss +5 -5
  28. package/assets/sass/components/charts.scss +1 -1
  29. package/assets/sass/components/nav.scss +47 -2
  30. package/assets/sass/components/stepper.scss +3 -3
  31. package/assets/sass/elements/buttons.scss +46 -4
  32. package/assets/sass/elements/card.scss +112 -0
  33. package/assets/sass/elements/container.scss +13 -2
  34. package/assets/sass/elements/forms.scss +68 -0
  35. package/assets/sass/elements/links.scss +2 -1
  36. package/assets/sass/elements/lists.scss +48 -1
  37. package/assets/sass/elements/panel.scss +3 -3
  38. package/assets/sass/elements/tables.scss +1 -1
  39. package/assets/sass/elements/tooltips.scss +1 -1
  40. package/assets/sass/foundations/icons.scss +8 -0
  41. package/assets/sass/foundations/root.scss +23 -4
  42. package/assets/ts/main.js +57 -0
  43. package/assets/ts/main.js.map +1 -0
  44. package/assets/ts/main.ts +10 -10
  45. package/assets/ts/modules/accordion.js +33 -0
  46. package/assets/ts/modules/accordion.js.map +1 -0
  47. package/dist/components.es.js +2518 -0
  48. package/dist/components.umd.js +56 -3784
  49. package/dist/style.css +1 -0
  50. package/package.json +87 -87
  51. package/src/components/Accordion/Accordion.screenshot.vue +57 -0
  52. package/src/components/Accordion/Accordion.spec.js +63 -0
  53. package/src/components/Accordion/Accordion.vue +1 -1
  54. package/src/components/Accordion/AccordionItem.vue +1 -1
  55. package/src/components/Accordion/__screenshots__/win32/laptop/Accordion.png +0 -0
  56. package/src/components/Accordion/__screenshots__/win32/mobile/Accordion.png +0 -0
  57. package/src/components/Accordion/__screenshots__/win32/tablet/Accordion.png +0 -0
  58. package/src/components/Alert/Alert.spec.js +49 -0
  59. package/src/components/Alert/Alert.vue +3 -3
  60. package/src/components/Banner/Banner.spec.js +28 -0
  61. package/src/components/CardDeck/CardDeck.spec.js +99 -0
  62. package/src/components/CardDeck/CardDeck.vue +1 -1
  63. package/src/components/Carousel/Carousel.spec.js +45 -0
  64. package/src/components/Chart/Chart.spec.js +201 -0
  65. package/src/components/Chart/Chart.vue +3 -3
  66. package/src/components/Header/Header.spec.js +33 -0
  67. package/src/components/Modal/Modal.spec.js +22 -0
  68. package/src/components/Nav/Nav.spec.js +35 -0
  69. package/src/components/Nav/Nav.vue +5 -2
  70. package/src/components/Stepper/Stepper.spec.js +99 -0
  71. package/src/components/Tabs/Tab.vue +6 -0
  72. package/src/components/Tabs/Tabs.vue +15 -13
  73. package/src/components/Testimonial/Testimonial.spec.js +57 -0
  74. package/src/components/Timeline/Timeline.spec.js +17 -0
  75. package/src/elements/Card/Card.vue +11 -2
  76. package/src/elements/Input/Input.vue +14 -10
  77. package/src/elements/Table/Table.spec.js +90 -0
  78. package/src/elements/Table/Table.vue +8 -5
  79. package/src/foundations/Icon/Icon.spec.js +24 -0
  80. package/src/foundations/Logo/Logo.spec.js +56 -0
  81. package/src/vue-shim.d.ts +6 -0
  82. package/dist/components.common.js +0 -3773
  83. package/dist/components.common.js.map +0 -1
  84. package/dist/components.css +0 -2
  85. package/dist/components.css.map +0 -1
  86. package/dist/components.umd.js.map +0 -1
  87. package/dist/components.umd.min.js +0 -2
  88. package/dist/components.umd.min.js.map +0 -1
  89. package/dist/demo.html +0 -1
@@ -0,0 +1,2518 @@
1
+ import { openBlock as o, createElementBlock as l, createElementVNode as s, toDisplayString as w, normalizeClass as v, createCommentVNode as h, Fragment as A, renderList as x, renderSlot as b, withDirectives as N, mergeProps as T, vModelDynamic as V, vModelText as Y, vModelSelect as X, resolveComponent as M, createVNode as $, createTextVNode as P, normalizeStyle as ee, withModifiers as te } from "vue";
2
+ const g = (e, n) => {
3
+ const t = e.__vccOpts || e;
4
+ for (const [c, m] of n)
5
+ t[c] = m;
6
+ return t;
7
+ }, se = {
8
+ name: "Icon",
9
+ props: {
10
+ id: {
11
+ type: String,
12
+ required: !1,
13
+ default: "email"
14
+ },
15
+ path: {
16
+ type: String,
17
+ required: !1,
18
+ default: "/svg/icons.svg"
19
+ }
20
+ }
21
+ }, ae = { class: "icon" }, ie = ["xlink:href"];
22
+ function ne(e, n, t, c, m, a) {
23
+ return o(), l("svg", ae, [
24
+ s("title", null, w(t.id), 1),
25
+ s("use", {
26
+ "xlink:href": t.path + "#icon-" + t.id
27
+ }, null, 8, ie)
28
+ ]);
29
+ }
30
+ const re = /* @__PURE__ */ g(se, [["render", ne], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/foundations/Icon/Icon.vue"]]), oe = {
31
+ name: "Logo",
32
+ props: {
33
+ id: {
34
+ type: String,
35
+ required: !1,
36
+ default: "property"
37
+ },
38
+ path: {
39
+ type: String,
40
+ required: !1,
41
+ default: "/svg/logo.svg"
42
+ },
43
+ desc: {
44
+ type: String
45
+ }
46
+ },
47
+ computed: {
48
+ src: function() {
49
+ return "#logo-" + this.id;
50
+ },
51
+ className: function() {
52
+ return "brand brand--" + this.id;
53
+ }
54
+ }
55
+ }, le = ["xlink:href"], ce = ["innerHTML"];
56
+ function de(e, n, t, c, m, a) {
57
+ return o(), l("div", {
58
+ class: v(a.className)
59
+ }, [
60
+ (o(), l("svg", null, [
61
+ s("title", null, "iam " + w(t.id), 1),
62
+ s("use", {
63
+ "xlink:href": t.path + a.src
64
+ }, null, 8, le)
65
+ ])),
66
+ t.desc ? (o(), l("span", {
67
+ key: 0,
68
+ innerHTML: t.desc
69
+ }, null, 8, ce)) : h("v-if", !0)
70
+ ], 2);
71
+ }
72
+ const ue = /* @__PURE__ */ g(oe, [["render", de], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/foundations/Logo/Logo.vue"]]), O = (e) => e.charAt(0).toUpperCase() + e.slice(1), j = (e) => e.replace(/_/g, " "), fe = (e) => e.replace(/ /g, "_"), me = function(e) {
73
+ return e = e.toLowerCase(), e = fe(e), e = e.replace(/\W/g, ""), e;
74
+ }, he = function(e) {
75
+ return typeof e != "string" ? !1 : !isNaN(e) && !isNaN(parseFloat(e));
76
+ }, _e = (e, n) => String(e).padStart(n, "0");
77
+ function K(e) {
78
+ if (typeof e != "object")
79
+ return !1;
80
+ const n = e.querySelector("thead"), t = e.querySelector("tbody"), c = t.cloneNode(!0), m = new Event("sorted"), a = new Event("filtered"), r = new Event("reordered"), i = "table_" + Math.random().toString(36).substr(2, 9);
81
+ let f;
82
+ e.setAttribute("id", i);
83
+ const S = function(_, u) {
84
+ let d = [];
85
+ Array.from(t.querySelectorAll("tr")).forEach((y, q) => {
86
+ let k = y.querySelector('td[data-label="' + _ + '"], th[data-label="' + _ + '"]').textContent;
87
+ he(k) && (k = _e(k, 10));
88
+ const z = {
89
+ index: k,
90
+ row: y
91
+ };
92
+ d.push(z);
93
+ }), d.sort((y, q) => y.index > q.index ? 1 : -1), u == "descending" && (d = d.reverse());
94
+ let p = "";
95
+ d.forEach((y, q) => {
96
+ p += y.row.outerHTML;
97
+ }), t.innerHTML = p, e.dispatchEvent(m);
98
+ };
99
+ if (e.addEventListener("click", function(_) {
100
+ for (var u = _.target; u && u != this; u = u.parentNode)
101
+ if (u.matches("[data-sortable]")) {
102
+ let d = u.getAttribute("aria-sort") == "ascending" ? "descending" : "ascending";
103
+ Array.from(e.querySelectorAll("[data-sortable]")).forEach((p, y) => {
104
+ p.setAttribute("aria-sort", "none");
105
+ }), u.setAttribute("aria-sort", d), e.setAttribute("data-sort", d), e.setAttribute("data-sortBy", u.textContent), S(u.textContent, d), Array.from(e.querySelectorAll("tr[draggable]")).forEach((p, y) => {
106
+ p.removeAttribute("draggable");
107
+ });
108
+ break;
109
+ }
110
+ }, !1), e.getAttribute("data-sortBy")) {
111
+ let _ = e.getAttribute("data-sort") == "ascending" ? "descending" : "ascending";
112
+ Array.from(e.querySelectorAll("[data-sortable]")).forEach((u, d) => {
113
+ u.textContent == e.getAttribute("data-sortBy") && (u.setAttribute("aria-sort", _), u.click());
114
+ });
115
+ }
116
+ const L = function(_) {
117
+ const u = document.createElement("div");
118
+ u.classList.add("table__filters"), u.classList.add("row"), u.classList.add("pt-1"), u.classList.add("pb-3");
119
+ const d = Array.from(e.querySelectorAll("th[data-filterable]"));
120
+ let p = {};
121
+ d.forEach((k, z) => {
122
+ Array.from(e.querySelectorAll('td[data-label="' + k.textContent + '"]')).forEach((G, ki) => {
123
+ p[G.textContent] = G.textContent;
124
+ });
125
+ });
126
+ const y = d.length == 1 ? "Filter by " + d[0].textContent : "Filter", q = d.length == 1 ? "d-none" : "d-sm-flex";
127
+ u.innerHTML = `<div class="col-sm-6 col-md-4 pb-3">
128
+ <div class="form-control__wrapper form-control-inline mb-0">
129
+ <label for="${i}_filter" class="form-label">${y}:</label>
130
+ <input type="search" name="${i}_filter" id="${i}_filter" class="form-control form-control-sm" placeholder="" list="${i}_list" />
131
+ </div>
132
+ <datalist id="${i}_list">
133
+ ${Object.keys(p).map((k) => `<option value="${k}"></option>`).join("")}
134
+ </datalist>
135
+ </div>
136
+ <div class="col-md-8 align-items-center pb-3 ${q}">
137
+ ${'<span class="pe-3 text-nowrap h5 mb-0">Filter by: </span>' + d.map((k) => `<div class="form-check pe-3 mt-0 mb-0"><input class="form-check-input" type="checkbox" id="${i}_${k.textContent.replace(" ", "_").toLowerCase()}" checked="checked" /><label class="form-check-label text-nowrap" for="${i}_${k.textContent.replace(" ", "_").toLowerCase()}">${k.textContent}</label></div>`).join("")}
138
+ </div>`, e.prepend(u);
139
+ }, C = function(_) {
140
+ let u = [];
141
+ Array.from(c.querySelectorAll("tr")).forEach((p, y) => {
142
+ let q = "";
143
+ if (Array.from(e.querySelectorAll('[type="checkbox"]:checked + label')).forEach((k, z) => {
144
+ q += p.querySelector('td[data-label="' + k.textContent + '"]').textContent + " | ";
145
+ }), q.indexOf(_) >= 0) {
146
+ const k = { row: p };
147
+ u.push(k);
148
+ }
149
+ });
150
+ let d = "";
151
+ u.forEach((p, y) => {
152
+ d += p.row.outerHTML;
153
+ }), t.innerHTML = d, e.dispatchEvent(a);
154
+ }, U = function() {
155
+ let _ = [];
156
+ Array.from(e.querySelectorAll('[type="checkbox"]:checked + label')).forEach((p, y) => {
157
+ _.push(p.textContent);
158
+ });
159
+ let u = [];
160
+ _.forEach((p, y) => {
161
+ Array.from(e.querySelectorAll('td[data-label="' + p + '"]')).forEach((q, k) => {
162
+ u[q.textContent] = q.textContent;
163
+ });
164
+ });
165
+ let d = e.querySelector("datalist");
166
+ d.innerHTML = Object.keys(u).map((p) => `<option value="${p}"></option>`).join("");
167
+ };
168
+ Array.from(e.querySelectorAll("[data-filterable]")).length && (L(e, Array.from(e.querySelectorAll("[data-filterable]")).length), e.addEventListener("keyup", function(_) {
169
+ for (var u = _.target; u && u != this; u = u.parentNode)
170
+ if (u.matches('input[type="search"]')) {
171
+ const d = u.value;
172
+ C(d);
173
+ }
174
+ }), e.addEventListener("change", function(_) {
175
+ for (var u = _.target; u && u != this; u = u.parentNode)
176
+ if (u.matches('input[type="search"]')) {
177
+ const d = u.value;
178
+ C(d);
179
+ }
180
+ }), e.addEventListener("change", function(_) {
181
+ for (var u = _.target; u && u != this; u = u.parentNode)
182
+ if (u.matches('input[type="checkbox"]')) {
183
+ const d = e.querySelector('input[type="search"]').value;
184
+ C(d), U();
185
+ }
186
+ }));
187
+ const H = function(_, u) {
188
+ let d = document.getElementById(i + "_style");
189
+ d == null && (d = document.createElement("style"), d.setAttribute("id", i + "_style"));
190
+ const p = _ * (u - 1) + 1, y = _ * u;
191
+ d.innerHTML = `
192
+ #${i} tbody tr {
193
+ display: none;
194
+ }
195
+ #${i} tbody tr:nth-child(${p}),
196
+ #${i} tbody tr:nth-child(${p}) ~ tr{
197
+ display: block;
198
+ }
199
+ @media screen and (min-width: 36em) {
200
+ #${i} tbody tr:nth-child(${p}),
201
+ #${i} tbody tr:nth-child(${p}) ~ tr{
202
+ display: table-row;
203
+ }
204
+ }
205
+ #${i} tbody tr:nth-child(${y}) ~ tr{
206
+ display: none;
207
+ }
208
+ `, e.append(d);
209
+ };
210
+ if (e.getAttribute("data-show")) {
211
+ const _ = parseInt(e.getAttribute("data-show")), u = parseInt(e.getAttribute("data-page")) ? parseInt(e.getAttribute("data-page")) : 1, d = e.querySelectorAll("tbody tr").length;
212
+ _ < d && (H(_, u), J(i, e, _, u, d), D(i, e, _, u, d), e.addEventListener("change", function(p) {
213
+ for (var y = p.target; y && y != this; y = y.parentNode)
214
+ y.matches('.table__pagination input[type="number"]') && (H(y.value, u), D(i, e, y.value, u, d), e.setAttribute("data-show", y.value));
215
+ }), e.addEventListener("click", function(p) {
216
+ for (var y = p.target; y && y != this; y = y.parentNode)
217
+ y.matches(".page-item:not(.active):not(.disabled) .page-link") && (H(e.getAttribute("data-show"), y.getAttribute("data-page")), D(i, e, e.getAttribute("data-show"), y.getAttribute("data-page"), d));
218
+ }, !1), e.addEventListener("change", function(p) {
219
+ for (var y = p.target; y && y != this; y = y.parentNode)
220
+ y.matches(".table__pagination select") && (H(e.getAttribute("data-show"), y.value), D(i, e, e.getAttribute("data-show"), y.value, d));
221
+ }));
222
+ }
223
+ function Q(_) {
224
+ _.dataTransfer.setData("text/plain", _.target.id), f = _.target, _.target.classList.add("tr--dragging");
225
+ }
226
+ const F = function() {
227
+ Array.from(t.querySelectorAll("tr")).forEach((_, u) => {
228
+ if (_.querySelector('[data-label="Order"]') == null) {
229
+ const d = document.createElement("th");
230
+ d.innerHTML = u + 1, d.setAttribute("data-label", "Order"), _.prepend(d);
231
+ }
232
+ _.setAttribute("id", i + "_row_" + (u + 1)), _.setAttribute("data-order", u + 1), _.setAttribute("draggable", "true"), _.addEventListener("dragstart", Q);
233
+ });
234
+ };
235
+ if (e.getAttribute("data-reorder") && e.getAttribute("data-reorder") != "false") {
236
+ const _ = document.createElement("th");
237
+ _.innerHTML = "Order", _.title = "Click here to enable re-ordering via drag and drop", _.classList.add("table-order-reset"), n.querySelector("tr").prepend(_), F(), e.addEventListener("click", function(u) {
238
+ for (var d = u.target; d && d != this; d = d.parentNode)
239
+ if (d.matches(".table-order-reset")) {
240
+ Array.from(e.querySelectorAll("[data-sortable]")).forEach((p, y) => {
241
+ p.setAttribute("aria-sort", "none");
242
+ }), e.removeAttribute("data-sort"), e.removeAttribute("data-sortBy"), S("Order", "ascending"), Array.from(e.querySelectorAll("tbody tr")).forEach((p, y) => {
243
+ p.setAttribute("draggable", "true");
244
+ });
245
+ break;
246
+ }
247
+ }, !1), document.addEventListener("dragover", function(u) {
248
+ u.preventDefault();
249
+ }, !1), document.addEventListener("dragenter", function(u) {
250
+ u.preventDefault(), u.dataTransfer.dropEffect = "move";
251
+ for (var d = u.target; d && d != this; d = d.parentNode)
252
+ d.matches("[data-reorder] tbody tr") && d.classList.add("tr--dropable");
253
+ }, !1), document.addEventListener("dragleave", function(u) {
254
+ u.preventDefault();
255
+ for (var d = u.target; d && d != this; d = d.parentNode)
256
+ d.matches("[data-reorder] tbody tr") && d.classList.remove("tr--dropable");
257
+ }, !1), document.addEventListener("drop", function(u) {
258
+ u.preventDefault();
259
+ for (var d = u.target; d && d != this; d = d.parentNode)
260
+ if (d.matches("[data-reorder] tbody tr")) {
261
+ d.parentNode != null && f.parentNode != null && d != f && (f.parentNode.removeChild(f), f.getAttribute("data-order") > d.getAttribute("data-order") ? d.parentNode.insertBefore(f, d) : d.parentNode.insertBefore(f, d.nextElementSibling), Array.from(t.querySelectorAll("tr")).forEach((p, y) => {
262
+ p.classList.remove("tr--dragging"), p.classList.remove("tr--dropable"), p.querySelector("th").innerHTML = y + 1, p.setAttribute("data-order", y + 1);
263
+ }), e.dispatchEvent(r));
264
+ break;
265
+ }
266
+ }, !1);
267
+ }
268
+ e.addEventListener("filtered", function(_) {
269
+ if (e.getAttribute("data-sortBy") && e.getAttribute("data-sort") && S(e.getAttribute("data-sortBy"), e.getAttribute("data-sort")), e.getAttribute("data-show")) {
270
+ const u = parseInt(e.getAttribute("data-show")), d = e.querySelectorAll("tbody tr").length, p = e.querySelector(".table__pagination");
271
+ p != null && p.remove(), u < d && (H(u, 1), J(i, e, u, 1, d), D(i, e, u, 1, d));
272
+ }
273
+ e.getAttribute("data-reorder") && F();
274
+ }, !1), e.addEventListener("sorted", function(_) {
275
+ e.getAttribute("data-reorder") && F();
276
+ }, !1), e.addEventListener("populated", function(_) {
277
+ var u = e.querySelector(".table__filters");
278
+ u.remove();
279
+ var d = e.querySelector(".table__pagination");
280
+ d.remove();
281
+ var p = e.cloneNode(!0);
282
+ e.parentNode.replaceChild(p, e), K(p);
283
+ }, !1);
284
+ }
285
+ const J = function(e, n, t, c, m) {
286
+ const a = document.createElement("div");
287
+ a.classList.add("table__pagination"), a.classList.add("row"), a.classList.add("pt-3"), a.classList.add("pb-3"), a.innerHTML = `<div class="col mw-fit-content mb-3">
288
+ <div class="form-control__wrapper form-control-inline mb-0">
289
+ <label for="${e}_showing" class="form-label">Showing:</label>
290
+ <input type="number" name="${e}_showing" id="${e}_showing" class="form-control form-control-sm showing-input-field" placeholder="" list="${e}_pagination" value="${t}" min="1" max="${m}" />
291
+ </div>
292
+ <datalist id="${e}_pagination">
293
+ <option value="5">5</option>
294
+ ${m > 10 ? '<option value="10">10</option>' : ""}
295
+ ${m > 20 ? '<option value="20">20</option>' : ""}
296
+ <option value="${m}">${m}</option>
297
+ </datalist>
298
+ </div>
299
+ <div class="col mw-fit-content me-auto d-flex align-items-center mb-3"><span class="label">per page</span></div>
300
+ <div class="col mw-fit-content d-sm-flex justify-content-end align-items-center" id="${e}_paginationBtns"></div>`, n.append(a);
301
+ }, D = function(e, n, t, c, m) {
302
+ const a = document.getElementById(e + "_paginationBtns");
303
+ if (a == null)
304
+ return !1;
305
+ const r = Math.ceil(m / t);
306
+ if (r == 1)
307
+ a.innerHTML = "";
308
+ else if (r < 5) {
309
+ let i = "";
310
+ for (let f = 1; f <= r; f++)
311
+ f == c ? i += `<li class="page-item active" aria-current="page"><span class="page-link">${f}</span></li>` : i += `<li class="page-item"><button class="page-link" data-page="${f}">${f}</button></li>`;
312
+ a.innerHTML = `<span class="pe-2 mb-3">Page: </span><ul class="pagination mb-3">
313
+ ${c == 1 ? '<li class="page-item disabled"><span class="page-link">Previous</span></li>' : `<li class="page-item"><button class="page-link" data-page="${parseInt(c) - 1}">Previous</button></li>`}
314
+ ${i}
315
+ ${c == r ? '<li class="page-item disabled"><span class="page-link">Next</span></li>' : `<li class="page-item"><button class="page-link" data-page="${parseInt(c) + 1}">Next</button></li>`}
316
+ </ul>`;
317
+ } else {
318
+ let i = "";
319
+ for (let f = 1; f <= r; f++)
320
+ f == c ? i += `<option value="${f}" selected>Page ${f}</option>` : i += `<option value="${f}">Page ${f}</option>`;
321
+ a.innerHTML = `
322
+ <div class="form-control__wrapper page-number mb-2">
323
+ <select class="form-select">
324
+ ${i}
325
+ </select>
326
+ </div>
327
+ `;
328
+ }
329
+ };
330
+ let W = function(e) {
331
+ return typeof e != "string" ? e : (e = e.replace("\xA3", ""), e = e.replace("%", ""), Number.isNaN(Number.parseFloat(e)) ? 0 : Number.parseFloat(e));
332
+ };
333
+ const pe = {
334
+ name: "Table",
335
+ props: {
336
+ reorder: {
337
+ type: Boolean,
338
+ required: !1
339
+ },
340
+ page: {
341
+ type: Number,
342
+ required: !1
343
+ },
344
+ show: {
345
+ type: Number,
346
+ required: !1
347
+ },
348
+ sortby: {
349
+ type: String,
350
+ required: !1
351
+ },
352
+ sort: {
353
+ type: String,
354
+ required: !1
355
+ },
356
+ headingclass: {
357
+ type: String,
358
+ required: !1
359
+ },
360
+ items: {
361
+ type: Array,
362
+ required: !0
363
+ },
364
+ fields: {
365
+ type: Array,
366
+ required: !0
367
+ }
368
+ },
369
+ computed: {
370
+ cellHeading() {
371
+ return (e) => `${O(j(e))}`;
372
+ },
373
+ numericValue() {
374
+ return (e) => (e = W(e), e);
375
+ }
376
+ },
377
+ mounted() {
378
+ this.$nextTick(function() {
379
+ K(this.$refs.wrapper), this.$el.addEventListener("sorted", function(e) {
380
+ console.log("Table sorted");
381
+ }, !1), this.$el.addEventListener("filtered", function(e) {
382
+ console.log("Table filtered");
383
+ }, !1);
384
+ });
385
+ },
386
+ updated() {
387
+ this.$nextTick(function() {
388
+ let e = this.$refs.wrapper.querySelector("tbody"), n = "";
389
+ this.items.forEach((c, m) => {
390
+ let a = c.rowid ? c.rowid : "";
391
+ c = Object.fromEntries(Object.entries(c).filter(([r]) => r !== "rowid")), n += `<tr data-row-id="${a}">${Object.keys(c).map((r) => `<td data-label="${O(j(r))}" data-numeric="${W(c[r])}">${c[r]}</td>`).join("")}</tr>`;
392
+ }), e.innerHTML = n;
393
+ const t = new Event("filtered");
394
+ this.$refs.wrapper.dispatchEvent(t);
395
+ });
396
+ }
397
+ }, ye = ["data-sortby", "data-sort", "data-show", "data-page", "data-reorder"], be = { key: 0 }, ve = ["data-sortable", "data-filterable"], ge = { key: 1 }, we = ["data-row-id"], ke = ["innerHTML", "data-label", "data-numeric"];
398
+ function Se(e, n, t, c, m, a) {
399
+ return o(), l("div", {
400
+ class: "table__wrapper",
401
+ ref: "wrapper",
402
+ "data-sortby": t.sortby,
403
+ "data-sort": t.sort,
404
+ "data-show": t.show,
405
+ "data-page": t.page,
406
+ "data-reorder": t.reorder
407
+ }, [
408
+ s("table", null, [
409
+ t.fields ? (o(), l("thead", be, [
410
+ s("tr", {
411
+ class: v(t.headingclass)
412
+ }, [
413
+ (o(!0), l(A, null, x(t.fields, (r) => (o(), l("th", {
414
+ key: r.key,
415
+ "data-sortable": r.sortable,
416
+ "data-filterable": r.filterable
417
+ }, w(a.cellHeading(r.key)), 9, ve))), 128))
418
+ ], 2)
419
+ ])) : h("v-if", !0),
420
+ t.items ? (o(), l("tbody", ge, [
421
+ (o(!0), l(A, null, x(t.items, (r, i) => (o(), l("tr", {
422
+ key: i,
423
+ "data-row-id": r.rowid
424
+ }, [
425
+ (o(!0), l(A, null, x(Object.fromEntries(Object.entries(r).filter(([f]) => f !== "rowid")), (f, S) => (o(), l("td", {
426
+ key: S,
427
+ innerHTML: f,
428
+ "data-label": a.cellHeading(S),
429
+ "data-numeric": a.numericValue(f)
430
+ }, null, 8, ke))), 128))
431
+ ], 8, we))), 128))
432
+ ])) : h("v-if", !0)
433
+ ]),
434
+ b(e.$slots, "default")
435
+ ], 8, ye);
436
+ }
437
+ const E = /* @__PURE__ */ g(pe, [["render", Se], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/elements/Table/Table.vue"]]), $e = {
438
+ name: "Input",
439
+ props: {
440
+ value: {
441
+ type: String,
442
+ required: !1
443
+ },
444
+ id: {
445
+ type: String,
446
+ required: !0
447
+ },
448
+ name: {
449
+ type: String,
450
+ required: !1
451
+ },
452
+ list: {
453
+ type: String,
454
+ required: !1
455
+ },
456
+ label: {
457
+ type: String,
458
+ required: !1
459
+ },
460
+ labelclass: {
461
+ type: String,
462
+ required: !1
463
+ },
464
+ inputclass: {
465
+ type: String,
466
+ required: !1
467
+ },
468
+ type: {
469
+ type: String,
470
+ required: !1,
471
+ default: "text"
472
+ },
473
+ size: {
474
+ type: String,
475
+ required: !1
476
+ },
477
+ errormsg: {
478
+ type: String,
479
+ required: !1
480
+ },
481
+ options: {
482
+ type: Array,
483
+ required: !1
484
+ },
485
+ prefix: {
486
+ type: String,
487
+ required: !1
488
+ },
489
+ prefixClass: {
490
+ type: String,
491
+ required: !1
492
+ },
493
+ suffix: {
494
+ type: String,
495
+ required: !1
496
+ },
497
+ suffixClass: {
498
+ type: String,
499
+ required: !1
500
+ },
501
+ title: {
502
+ type: String,
503
+ required: !1
504
+ },
505
+ hint: {
506
+ type: String,
507
+ required: !1
508
+ },
509
+ multiple: {
510
+ type: String,
511
+ required: !1
512
+ }
513
+ },
514
+ computed: {
515
+ displayLabel() {
516
+ return () => this.$attrs.multiple ? this.label + '<span class="small d-block text-body font-body fw-normal">Hold down the Ctrl (windows) or Command (Mac) button to select multiple options.</span>' : this.hint ? this.label + `<span class="small d-block text-body font-body fw-normal">${this.hint}</span>` : this.label;
517
+ },
518
+ wrapperClass() {
519
+ return () => {
520
+ switch (this.type) {
521
+ case "radio":
522
+ case "checkbox":
523
+ return "form-check";
524
+ case "radio-btn":
525
+ case "checkbox-btn":
526
+ return !1;
527
+ default:
528
+ return "form-control__wrapper";
529
+ }
530
+ };
531
+ },
532
+ needPattern() {
533
+ return () => {
534
+ if (this.pattern)
535
+ return this.pattern;
536
+ switch (this.type) {
537
+ case "datetime-local":
538
+ return "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}";
539
+ }
540
+ return !1;
541
+ };
542
+ },
543
+ needsLabel() {
544
+ return () => {
545
+ switch (this.type) {
546
+ case "radio":
547
+ case "radio-btn":
548
+ case "checkbox":
549
+ case "checkbox-btn":
550
+ return !1;
551
+ default:
552
+ return !0;
553
+ }
554
+ };
555
+ },
556
+ isInput() {
557
+ return () => {
558
+ switch (this.type) {
559
+ case "textarea":
560
+ case "select":
561
+ case "radio":
562
+ case "radio-btn":
563
+ case "checkbox":
564
+ case "checkbox-btn":
565
+ case "range":
566
+ case "color":
567
+ return !1;
568
+ default:
569
+ return !0;
570
+ }
571
+ };
572
+ },
573
+ allowDatalist() {
574
+ return () => {
575
+ switch (this.type) {
576
+ case "select":
577
+ case "radio":
578
+ case "radio-btn":
579
+ case "checkbox":
580
+ case "checkbox-btn":
581
+ return !1;
582
+ default:
583
+ return !0;
584
+ }
585
+ };
586
+ },
587
+ hasOptions() {
588
+ return () => {
589
+ if (this.list)
590
+ return this.list;
591
+ if (this.options)
592
+ return this.id + "-list";
593
+ };
594
+ },
595
+ inputVal: {
596
+ get() {
597
+ return this.value == null && this.options != null && this.type == "select" ? this.$attrs.multiple ? [] : this.options[0].value : this.value;
598
+ },
599
+ set(e) {
600
+ this.$emit("input", e);
601
+ }
602
+ }
603
+ },
604
+ mounted() {
605
+ this.$nextTick(function() {
606
+ let e = this.$refs.wrapper;
607
+ if (e.parentNode && e.parentNode.classList.contains("form-check") || e.classList.length == 0) {
608
+ const n = document.createDocumentFragment();
609
+ Array.from(e.childNodes).forEach((t) => n.appendChild(t)), e.parentNode.insertBefore(n, e), e.parentNode.removeChild(e);
610
+ }
611
+ });
612
+ },
613
+ methods: {
614
+ inputKeyup(e) {
615
+ this.$emit("keyupEvent", e);
616
+ },
617
+ clickEvent() {
618
+ this.$emit("bus");
619
+ }
620
+ }
621
+ }, Ae = ["for", "innerHTML", "title"], xe = ["innerHTML"], Le = ["innerHTML"], qe = ["type", "name", "id", "pattern", "list"], Te = ["type", "name", "id", "pattern"], Ce = {
622
+ key: 5,
623
+ class: "input-group"
624
+ }, Me = ["type", "name", "id", "pattern", "list"], He = { class: "input-group-text border-0 col-2 col-sm-1 px-0" }, Ne = {
625
+ key: 6,
626
+ class: "input-group"
627
+ }, De = ["type", "name", "id", "pattern", "list"], Be = { class: "input-group-text flex-fill" }, Pe = ["type", "name", "id", "pattern"], Ie = ["value"], Ue = ["id"], Fe = ["value"], ze = ["type", "name", "id"], Ve = ["for", "innerHTML"], Ge = ["type", "name", "id"], Oe = ["for", "innerHTML"], je = ["innerHTML"];
628
+ function Je(e, n, t, c, m, a) {
629
+ return o(), l("div", {
630
+ class: v(a.wrapperClass()),
631
+ ref: "wrapper"
632
+ }, [
633
+ a.needsLabel() ? (o(), l("label", {
634
+ key: 0,
635
+ class: v(`form-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
636
+ for: t.id,
637
+ innerHTML: a.displayLabel(),
638
+ title: t.title
639
+ }, null, 10, Ae)) : h("v-if", !0),
640
+ h(" Prefix and Suffix "),
641
+ t.prefix ? (o(), l("span", {
642
+ key: 1,
643
+ class: v(`prefix ${this.prefixClass} ${t.size ? `prefix-${t.size}` : ""}`),
644
+ innerHTML: t.prefix,
645
+ role: "presentation"
646
+ }, null, 10, xe)) : h("v-if", !0),
647
+ t.suffix ? (o(), l("span", {
648
+ key: 2,
649
+ class: v(`suffix ${this.suffixClass} ${t.size ? `suffix-${t.size}` : ""}`),
650
+ innerHTML: t.suffix,
651
+ role: "presentation"
652
+ }, null, 10, Le)) : h("v-if", !0),
653
+ h(" Standard input field "),
654
+ a.isInput() ? N((o(), l("input", T({
655
+ key: 3,
656
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => a.inputVal = r),
657
+ class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
658
+ type: t.type,
659
+ name: t.name ? t.name : t.id,
660
+ id: t.id,
661
+ pattern: a.needPattern(),
662
+ list: a.hasOptions()
663
+ }, e.$attrs, {
664
+ onKeyup: n[1] || (n[1] = (...r) => a.inputKeyup && a.inputKeyup(...r))
665
+ }), null, 16, qe)), [
666
+ [V, a.inputVal]
667
+ ]) : h("v-if", !0),
668
+ h(" Textarea "),
669
+ t.type == "textarea" ? N((o(), l("textarea", T({
670
+ key: 4,
671
+ "onUpdate:modelValue": n[2] || (n[2] = (r) => a.inputVal = r),
672
+ class: `form-control${t.size ? ` form-control-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
673
+ type: t.type,
674
+ name: t.name ? t.name : t.id,
675
+ id: t.id,
676
+ pattern: a.needPattern()
677
+ }, e.$attrs), null, 16, Te)), [
678
+ [Y, a.inputVal]
679
+ ]) : h("v-if", !0),
680
+ h(" Range "),
681
+ t.type == "range" ? (o(), l("div", Ce, [
682
+ N(s("input", T({
683
+ "onUpdate:modelValue": n[3] || (n[3] = (r) => a.inputVal = r),
684
+ class: `form-range${t.inputclass ? ` ${t.inputclass}` : ""}`,
685
+ type: t.type,
686
+ name: t.name ? t.name : t.id,
687
+ id: t.id,
688
+ pattern: a.needPattern(),
689
+ list: a.hasOptions()
690
+ }, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, Me), [
691
+ [V, a.inputVal]
692
+ ]),
693
+ s("output", He, w(t.value), 1)
694
+ ])) : h("v-if", !0),
695
+ h(" Color picker "),
696
+ t.type == "color" ? (o(), l("div", Ne, [
697
+ N(s("input", T({
698
+ "onUpdate:modelValue": n[4] || (n[4] = (r) => a.inputVal = r),
699
+ class: `form-control form-control-color${t.inputclass ? ` ${t.inputclass}` : ""}`,
700
+ type: t.type,
701
+ name: t.name ? t.name : t.id,
702
+ id: t.id,
703
+ pattern: a.needPattern(),
704
+ list: a.hasOptions()
705
+ }, e.$attrs, { oninput: "this.nextElementSibling.value=this.value;" }), null, 16, De), [
706
+ [V, a.inputVal]
707
+ ]),
708
+ s("output", Be, w(t.value ? e.vale : "#000000"), 1)
709
+ ])) : h("v-if", !0),
710
+ h(" Select/dropdown "),
711
+ t.type == "select" ? N((o(), l("select", T({
712
+ key: 7,
713
+ "onUpdate:modelValue": n[5] || (n[5] = (r) => a.inputVal = r),
714
+ class: `form-select${t.size ? ` form-select-${t.size}` : ""}${t.inputclass ? ` ${t.inputclass}` : ""}`,
715
+ type: t.type,
716
+ name: t.id,
717
+ id: t.id,
718
+ pattern: a.needPattern()
719
+ }, e.$attrs), [
720
+ (o(!0), l(A, null, x(t.options, (r, i) => (o(), l("option", {
721
+ key: i,
722
+ value: r.value
723
+ }, w(r.display ? r.display : r.value), 9, Ie))), 128))
724
+ ], 16, Pe)), [
725
+ [X, a.inputVal]
726
+ ]) : h("v-if", !0),
727
+ a.allowDatalist() ? (o(), l("datalist", {
728
+ key: 8,
729
+ id: t.id + "-list"
730
+ }, [
731
+ (o(!0), l(A, null, x(t.options, (r, i) => (o(), l("option", {
732
+ key: i,
733
+ value: r.value
734
+ }, w(r.value), 9, Fe))), 128))
735
+ ], 8, Ue)) : h("v-if", !0),
736
+ h(" Checkbox "),
737
+ t.type == "checkbox" || t.type == "radio" ? (o(), l("input", T({
738
+ key: 9,
739
+ class: "form-check-input",
740
+ type: t.type,
741
+ name: t.name ? t.name : t.id,
742
+ id: t.id
743
+ }, e.$attrs), null, 16, ze)) : h("v-if", !0),
744
+ t.type == "checkbox" || t.type == "radio" ? (o(), l("label", {
745
+ key: 10,
746
+ class: v(`form-label form-check-label${t.labelclass ? ` ${t.labelclass}` : ""}`),
747
+ for: t.id,
748
+ innerHTML: t.label
749
+ }, null, 10, Ve)) : h("v-if", !0),
750
+ h(" Checkbox Button "),
751
+ t.type == "checkbox-btn" || t.type == "radio-btn" ? (o(), l("input", T({
752
+ key: 11,
753
+ class: `btn-check${t.inputclass ? ` ${t.inputclass}` : ""}`,
754
+ type: t.type.replace("-btn", ""),
755
+ autocomplete: "off",
756
+ name: t.name ? t.name : t.id,
757
+ id: t.id
758
+ }, e.$attrs), null, 16, Ge)) : h("v-if", !0),
759
+ t.type == "checkbox-btn" || t.type == "radio-btn" ? (o(), l("label", {
760
+ key: 12,
761
+ class: v(`btn${t.labelclass ? ` ${t.labelclass}` : ""}`),
762
+ for: t.id,
763
+ innerHTML: t.label,
764
+ onClick: n[6] || (n[6] = (...r) => a.clickEvent && a.clickEvent(...r))
765
+ }, null, 10, Oe)) : h("v-if", !0),
766
+ h(" Error message "),
767
+ t.errormsg ? (o(), l("p", {
768
+ key: 13,
769
+ class: "invalid-feedback mb-0",
770
+ innerHTML: t.errormsg
771
+ }, null, 8, je)) : h("v-if", !0),
772
+ b(e.$slots, "default")
773
+ ], 2);
774
+ }
775
+ const I = /* @__PURE__ */ g($e, [["render", Je], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/elements/Input/Input.vue"]]), We = {
776
+ components: {
777
+ Input: I
778
+ },
779
+ name: "FileUploads",
780
+ props: {
781
+ id: {
782
+ type: String,
783
+ required: !0
784
+ },
785
+ inputcolclass: {
786
+ type: String,
787
+ required: !1
788
+ },
789
+ maxfilesize: {
790
+ type: Number,
791
+ required: !1
792
+ },
793
+ maxfiles: {
794
+ type: Number,
795
+ required: !1
796
+ }
797
+ }
798
+ }, Ke = { class: "multiple-file-uploads mb-4" }, Ee = { class: "row" }, Re = { class: "col-12 col-md me-auto" }, Ze = /* @__PURE__ */ s("div", { class: "col mw-fit-content" }, [
799
+ /* @__PURE__ */ s("button", {
800
+ type: "button",
801
+ class: "btn btn-tertiary me-0",
802
+ "data-delete": ""
803
+ }, "Delete")
804
+ ], -1), Qe = ["data-maxfiles"];
805
+ function Ye(e, n, t, c, m, a) {
806
+ const r = M("Input");
807
+ return o(), l("div", Ke, [
808
+ s("div", Ee, [
809
+ s("div", {
810
+ class: v(`${t.inputcolclass ? t.inputcolclass : "col-12 col-sm-4"}`)
811
+ }, [
812
+ $(r, {
813
+ type: "file",
814
+ id: t.id,
815
+ name: `${t.id}[]`,
816
+ label: "Add new file",
817
+ labelclass: "d-none",
818
+ class: "form-control-inline col",
819
+ required: "",
820
+ "data-filesize": t.maxfilesize
821
+ }, null, 8, ["id", "name", "data-filesize"])
822
+ ], 2),
823
+ s("div", Re, [
824
+ b(e.$slots, "default")
825
+ ]),
826
+ Ze
827
+ ]),
828
+ s("button", {
829
+ type: "button",
830
+ class: "btn btn-secondary me-0",
831
+ "data-add": "",
832
+ "data-maxfiles": t.maxfiles
833
+ }, "+ Add file", 8, Qe)
834
+ ]);
835
+ }
836
+ const $i = /* @__PURE__ */ g(We, [["render", Ye], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/elements/FileUploads/FileUploads.vue"]]);
837
+ function Xe(e) {
838
+ if (!e.classList.contains("accordion--keep-open")) {
839
+ const n = e.querySelectorAll(":scope > details");
840
+ n.forEach((t) => {
841
+ t.addEventListener("click", () => {
842
+ n.forEach((c) => {
843
+ c !== t && c.removeAttribute("open");
844
+ });
845
+ });
846
+ });
847
+ }
848
+ if (window.location.hash && document.querySelector(window.location.hash + ":not([open]) summary")) {
849
+ const n = document.querySelector(window.location.hash + " summary");
850
+ n instanceof HTMLElement && n.click();
851
+ }
852
+ window.addEventListener("hashchange", function() {
853
+ if (window.location.hash && document.querySelector(window.location.hash + " summary")) {
854
+ const n = document.querySelector(window.location.hash + " summary");
855
+ n instanceof HTMLElement && n.click();
856
+ }
857
+ });
858
+ }
859
+ const et = {
860
+ name: "Accordion",
861
+ props: {},
862
+ mounted() {
863
+ Xe(this.$refs.wrapper);
864
+ }
865
+ }, tt = {
866
+ class: "container accordion",
867
+ ref: "wrapper"
868
+ };
869
+ function st(e, n, t, c, m, a) {
870
+ return o(), l("div", tt, [
871
+ b(e.$slots, "default")
872
+ ], 512);
873
+ }
874
+ const Ai = /* @__PURE__ */ g(et, [["render", st], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Accordion/Accordion.vue"]]), at = {
875
+ name: "AccordionItem",
876
+ props: {
877
+ title: {
878
+ type: String,
879
+ required: !0
880
+ },
881
+ titlecolour: {
882
+ type: String,
883
+ required: !1
884
+ },
885
+ badge: {
886
+ type: [Number, String],
887
+ required: !1
888
+ },
889
+ badgecolour: {
890
+ type: String,
891
+ required: !1,
892
+ default: "light"
893
+ },
894
+ lazy: {
895
+ type: Boolean,
896
+ required: !1
897
+ }
898
+ },
899
+ computed: {
900
+ createID() {
901
+ return (e) => `${me(e)}`;
902
+ }
903
+ },
904
+ data() {
905
+ return {
906
+ show: !this.lazy
907
+ };
908
+ }
909
+ }, it = ["id"], nt = { class: "accordion-header accordion-button h4" }, rt = {
910
+ key: 0,
911
+ class: "accordion-body"
912
+ };
913
+ function ot(e, n, t, c, m, a) {
914
+ return o(), l("details", {
915
+ class: "accordion-item",
916
+ id: a.createID(t.title)
917
+ }, [
918
+ s("summary", {
919
+ class: v(`${t.titlecolour ? `bg-${t.titlecolour}` : ""}`),
920
+ onClick: n[0] || (n[0] = (r) => m.show = !0)
921
+ }, [
922
+ s("span", nt, [
923
+ P(w(t.title), 1),
924
+ t.badge ? (o(), l("span", {
925
+ key: 0,
926
+ class: v(`badge bg-${t.badgecolour}`)
927
+ }, w(t.badge), 3)) : h("v-if", !0)
928
+ ])
929
+ ], 2),
930
+ m.show ? (o(), l("div", rt, [
931
+ b(e.$slots, "default")
932
+ ])) : h("v-if", !0)
933
+ ], 8, it);
934
+ }
935
+ const xi = /* @__PURE__ */ g(at, [["render", ot], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Accordion/AccordionItem.vue"]]), lt = {
936
+ name: "Header",
937
+ props: {
938
+ title: {
939
+ type: String,
940
+ required: !0
941
+ },
942
+ image: {
943
+ type: String,
944
+ required: !1
945
+ },
946
+ background: {
947
+ type: String,
948
+ default: "light",
949
+ required: !1
950
+ }
951
+ }
952
+ }, ct = { class: "container" }, dt = { class: "row" }, ut = { class: "col-sm-6" }, ft = { class: "pt-5 pb-3 px-4" }, mt = { class: "col-sm-6 col-md-5 ms-auto" }, ht = ["src"];
953
+ function _t(e, n, t, c, m, a) {
954
+ return o(), l("div", ct, [
955
+ s("div", {
956
+ class: v("bg-" + t.background + " mb-4")
957
+ }, [
958
+ s("div", dt, [
959
+ s("div", ut, [
960
+ s("div", ft, [
961
+ s("h2", null, w(t.title), 1),
962
+ b(e.$slots, "default")
963
+ ])
964
+ ]),
965
+ s("div", mt, [
966
+ t.image ? (o(), l("img", {
967
+ key: 0,
968
+ src: t.image,
969
+ alt: "",
970
+ class: "h-100 w-100 object-cover"
971
+ }, null, 8, ht)) : h("v-if", !0)
972
+ ])
973
+ ])
974
+ ], 2)
975
+ ]);
976
+ }
977
+ const Li = /* @__PURE__ */ g(lt, [["render", _t], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Banner/Banner.vue"]]);
978
+ const pt = {
979
+ name: "Card",
980
+ props: {
981
+ link: {
982
+ type: String,
983
+ required: !1
984
+ },
985
+ cardClass: {
986
+ type: String,
987
+ required: !1,
988
+ default: ""
989
+ },
990
+ titleclass: {
991
+ type: String,
992
+ required: !1,
993
+ default: "h4"
994
+ },
995
+ title: {
996
+ type: String,
997
+ required: !1
998
+ },
999
+ subtitle: {
1000
+ type: String,
1001
+ required: !1
1002
+ },
1003
+ content: {
1004
+ type: String,
1005
+ required: !1
1006
+ },
1007
+ type: {
1008
+ type: String,
1009
+ required: !1
1010
+ },
1011
+ btntype: {
1012
+ type: String,
1013
+ required: !1,
1014
+ default: "secondary"
1015
+ },
1016
+ ctatext: {
1017
+ type: String,
1018
+ required: !1,
1019
+ default: "Find out more"
1020
+ },
1021
+ hidectatext: {
1022
+ type: Boolean,
1023
+ required: !1,
1024
+ default: !1
1025
+ },
1026
+ image: {
1027
+ type: String,
1028
+ required: !1
1029
+ },
1030
+ target: {
1031
+ type: String,
1032
+ required: !1
1033
+ },
1034
+ details: {
1035
+ type: Object,
1036
+ required: !1
1037
+ }
1038
+ },
1039
+ computed: {
1040
+ cardStatus() {
1041
+ return () => this.details && this.details.status ? `${this.details.status == "Live now" ? '<span class="text-danger lh-0 fs-1 align-middle">&#8226;</span>&nbsp;&nbsp;' : ""}${this.details.status}` : "";
1042
+ },
1043
+ cardMedia() {
1044
+ 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"}&nbsp;&nbsp;|&nbsp;&nbsp;<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"}`;
1045
+ },
1046
+ cardContent() {
1047
+ return () => {
1048
+ const e = function(m) {
1049
+ switch (m) {
1050
+ case "Modern method":
1051
+ return "bg-secondary text-primary";
1052
+ case "Freehold":
1053
+ return "bg-light text-dark";
1054
+ default:
1055
+ return "bg-body text-white";
1056
+ }
1057
+ }, n = this.details && this.details.tags ? this.details.tags.map((m) => `<span class="badge rounded-pill py-2 px-3 mb-3 me-2 ${e(m)}">${m}</span>`).join("") : "", t = 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>` : "", c = `
1058
+ ${this.details && this.details.guideprice ? `<span class="d-block h6 text-dark mb-1">Price guide: ${this.details.guideprice}</span>` : ""}
1059
+ ${this.details && this.details.auctiontime ? `<span class="d-block h6 text-primary mb-4">Auction time left: ${this.details.auctiontime}</span>` : ""}
1060
+ ${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>` : ""}
1061
+ `;
1062
+ return `${n}${t}${c}${this.content}`;
1063
+ };
1064
+ }
1065
+ }
1066
+ }, yt = ["href", "title", "target"], bt = {
1067
+ key: 0,
1068
+ class: "card-header__wrapper"
1069
+ }, vt = ["src"], gt = { class: "card-header" }, wt = ["innerHTML"], kt = ["innerHTML"], St = ["src"], $t = ["innerHTML"], At = {
1070
+ key: 1,
1071
+ class: "card-footer"
1072
+ }, xt = { class: "visually-hidden" };
1073
+ function Lt(e, n, t, c, m, a) {
1074
+ return o(), l("a", {
1075
+ href: t.link,
1076
+ class: v("card" + (t.type ? " card--" + t.type : "") + " " + t.cardClass),
1077
+ title: t.ctatext + ": " + t.title + (t.subtitle ? " - " + t.subtitle : ""),
1078
+ target: t.target
1079
+ }, [
1080
+ t.image ? (o(), l("div", bt, [
1081
+ s("img", {
1082
+ src: t.image,
1083
+ alt: "",
1084
+ loading: "lazy",
1085
+ class: "card-image"
1086
+ }, null, 8, vt),
1087
+ s("div", gt, [
1088
+ this.details && this.details.status ? (o(), l("span", {
1089
+ key: 0,
1090
+ class: "badge bg-primary p-2 me-2",
1091
+ innerHTML: a.cardStatus()
1092
+ }, null, 8, wt)) : h("v-if", !0),
1093
+ this.details && (this.details.images || this.details.videos) ? (o(), l("span", {
1094
+ key: 1,
1095
+ class: "badge bg-black bg-opacity-50 p-2 align-self-end",
1096
+ innerHTML: a.cardMedia()
1097
+ }, null, 8, kt)) : h("v-if", !0)
1098
+ ]),
1099
+ t.details && t.details.logo ? (o(), l("img", {
1100
+ key: 0,
1101
+ src: t.details.logo,
1102
+ alt: "",
1103
+ loading: "lazy",
1104
+ class: "card-logo"
1105
+ }, null, 8, St)) : h("v-if", !0)
1106
+ ])) : h("v-if", !0),
1107
+ s("div", {
1108
+ class: "card-body",
1109
+ innerHTML: a.cardContent()
1110
+ }, null, 8, $t),
1111
+ t.hidectatext == !1 ? (o(), l("div", At, [
1112
+ s("span", {
1113
+ class: v(`${t.btntype == "link" ? "link" : `btn btn-${t.btntype}`} mb-0`)
1114
+ }, [
1115
+ P(w(t.ctatext), 1),
1116
+ s("span", xt, ": " + w(t.title), 1)
1117
+ ], 2)
1118
+ ])) : h("v-if", !0)
1119
+ ], 10, yt);
1120
+ }
1121
+ const R = /* @__PURE__ */ g(pt, [["render", Lt], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/elements/Card/Card.vue"]]);
1122
+ const qt = {
1123
+ components: {
1124
+ Card: R
1125
+ },
1126
+ name: "CardDeck",
1127
+ props: {
1128
+ items: {
1129
+ type: Array,
1130
+ required: !1
1131
+ },
1132
+ cols: {
1133
+ type: Number,
1134
+ required: !1,
1135
+ default: 1
1136
+ },
1137
+ smcols: {
1138
+ type: Number,
1139
+ required: !1,
1140
+ default: 1
1141
+ },
1142
+ mdcols: {
1143
+ type: Number,
1144
+ required: !1,
1145
+ default: 3
1146
+ },
1147
+ gap: {
1148
+ type: Number,
1149
+ required: !1,
1150
+ default: 4
1151
+ },
1152
+ cardtype: {
1153
+ type: String,
1154
+ required: !1
1155
+ },
1156
+ cardclass: {
1157
+ type: String,
1158
+ required: !1
1159
+ },
1160
+ btntype: {
1161
+ type: String,
1162
+ required: !1
1163
+ },
1164
+ titleclass: {
1165
+ type: String,
1166
+ required: !1
1167
+ },
1168
+ ctatext: {
1169
+ type: String,
1170
+ required: !1
1171
+ },
1172
+ hidectatext: {
1173
+ type: Boolean,
1174
+ required: !1,
1175
+ default: !1
1176
+ }
1177
+ }
1178
+ }, Tt = ["data-card-type"];
1179
+ function Ct(e, n, t, c, m, a) {
1180
+ const r = M("Card");
1181
+ return o(), l("div", {
1182
+ class: "container card-deck prevent-invert",
1183
+ "data-card-type": t.cardtype
1184
+ }, [
1185
+ b(e.$slots, "default"),
1186
+ s("div", {
1187
+ class: v(`row row-cols-${t.cols} row-cols-sm-${t.smcols} row-cols-md-${t.mdcols} ${t.gap ? `g-${t.gap}` : ""}`)
1188
+ }, [
1189
+ (o(!0), l(A, null, x(t.items, (i, f) => (o(), l("div", {
1190
+ class: "col",
1191
+ key: f
1192
+ }, [
1193
+ $(r, T(i, {
1194
+ class: t.cardclass,
1195
+ type: t.cardtype,
1196
+ btntype: i.btntype ? i.btntype : t.btntype,
1197
+ titleclass: i.titleclass ? i.titleclass : t.titleclass,
1198
+ ctatext: i.ctatext,
1199
+ hidectatext: t.hidectatext
1200
+ }), null, 16, ["class", "type", "btntype", "titleclass", "ctatext", "hidectatext"])
1201
+ ]))), 128))
1202
+ ], 2),
1203
+ b(e.$slots, "after")
1204
+ ], 8, Tt);
1205
+ }
1206
+ const Mt = /* @__PURE__ */ g(qt, [["render", Ct], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/CardDeck/CardDeck.vue"]]);
1207
+ function Ht(e) {
1208
+ var n;
1209
+ let t = e.querySelector(".carousel__inner"), c = e.querySelectorAll(".carousel__item").length;
1210
+ e.getAttribute("data-cols");
1211
+ let m = e.getAttribute("data-sm-cols"), a = e.getAttribute("data-md-cols");
1212
+ e.querySelector(".carousel__controls a").classList.add("active"), t.addEventListener("scroll", function(r) {
1213
+ clearTimeout(n), n = setTimeout(function() {
1214
+ let i = t.clientWidth, f = t.scrollWidth, S = t.scrollLeft, L = Math.round(S / f * c) + 1, C = e.querySelector(".carousel__item:last-child").offsetLeft;
1215
+ Array.from(e.querySelectorAll(".carousel__controls a")).forEach((U, H) => {
1216
+ U.classList.remove("active");
1217
+ }), e.querySelector(".control-" + L).classList.add("active"), L == 1 ? e.querySelector(".btn-prev").setAttribute("disabled", "disabled") : e.querySelector(".btn-prev").removeAttribute("disabled"), t.scrollLeft + i > C ? e.querySelector(".btn-next").setAttribute("disabled", "disabled") : e.querySelector(".btn-next").removeAttribute("disabled");
1218
+ }, 100);
1219
+ }, !1), e.addEventListener("click", function(r) {
1220
+ for (var i = r.target; i && i != this; i = i.parentNode)
1221
+ if (i.matches(".carousel__controls a")) {
1222
+ r.preventDefault(), Array.from(e.querySelectorAll(".carousel__controls a")).forEach((S, L) => {
1223
+ S.classList.remove("active");
1224
+ }), i.classList.add("active");
1225
+ const f = document.querySelector(i.getAttribute("href"));
1226
+ t.scroll({
1227
+ top: 0,
1228
+ left: f.offsetLeft,
1229
+ behavior: "smooth"
1230
+ });
1231
+ break;
1232
+ }
1233
+ }, !1), e.addEventListener("click", function(r) {
1234
+ for (var i = r.target; i && i != this; i = i.parentNode)
1235
+ if (i.matches(".btn-next, .btn-prev")) {
1236
+ r.preventDefault();
1237
+ let f = i.classList.contains("btn-prev") ? t.scrollLeft - t.clientWidth : t.scrollLeft + t.clientWidth;
1238
+ t.scroll({
1239
+ top: 0,
1240
+ left: f,
1241
+ behavior: "smooth"
1242
+ });
1243
+ break;
1244
+ }
1245
+ }, !1), c == 1 && e.classList.add("hide-btns"), m >= c && e.classList.add("hide-sm-btns"), a >= c && e.classList.add("hide-md-btns");
1246
+ }
1247
+ let B = Mt.props;
1248
+ B.gap.default = 0;
1249
+ B.cols.default = 1;
1250
+ B.smcols.default = 2;
1251
+ B.mdcols.default = 4;
1252
+ const Nt = {
1253
+ components: {
1254
+ Card: R
1255
+ },
1256
+ name: "Carousel",
1257
+ data() {
1258
+ return {
1259
+ id: null
1260
+ };
1261
+ },
1262
+ props: {
1263
+ ...B,
1264
+ colclass: {
1265
+ type: String,
1266
+ required: !1
1267
+ },
1268
+ type: {
1269
+ type: String,
1270
+ required: !1
1271
+ }
1272
+ },
1273
+ computed: {
1274
+ content() {
1275
+ return (e) => `${e.image ? `<img src="${e.image}" alt="" />` : ""}${e.content ? e.content : ""}`;
1276
+ }
1277
+ },
1278
+ mounted() {
1279
+ this.id = this._uid, this.$nextTick(function() {
1280
+ Ht(this.$refs.wrapper);
1281
+ });
1282
+ }
1283
+ }, Dt = ["id", "data-cols", "data-sm-cols", "data-md-cols"], Bt = { class: "carousel__wrapper" }, Pt = { class: "carousel__inner" }, It = ["id"], Ut = ["innerHTML", "id"], Ft = ["href"], zt = /* @__PURE__ */ s("button", {
1284
+ class: "btn btn-prev",
1285
+ "data-go": "0",
1286
+ disabled: ""
1287
+ }, "Prev", -1), Vt = /* @__PURE__ */ s("button", {
1288
+ class: "btn btn-next",
1289
+ "data-go": "2"
1290
+ }, "Next", -1);
1291
+ function Gt(e, n, t, c, m, a) {
1292
+ const r = M("Card");
1293
+ return o(), l("div", {
1294
+ class: "container carousel",
1295
+ id: "carousel" + m.id,
1296
+ ref: "wrapper",
1297
+ "data-cols": e.cols,
1298
+ "data-sm-cols": e.smcols,
1299
+ "data-md-cols": e.mdcols
1300
+ }, [
1301
+ b(e.$slots, "default", {}, () => [
1302
+ h(" Use for titles etc ")
1303
+ ]),
1304
+ s("div", Bt, [
1305
+ s("div", Pt, [
1306
+ t.type == "card" ? (o(), l("div", {
1307
+ key: 0,
1308
+ class: v(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
1309
+ }, [
1310
+ (o(!0), l(A, null, x(e.items, (i, f) => (o(), l("div", {
1311
+ class: v(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
1312
+ key: f,
1313
+ id: "carousel" + m.id + "slide" + (f + 1)
1314
+ }, [
1315
+ $(r, T(i, {
1316
+ class: e.cardclass,
1317
+ type: e.cardtype,
1318
+ btnyype: e.btntype,
1319
+ titleclass: e.titleclass,
1320
+ ctatext: e.ctatext,
1321
+ hidectatext: e.hidectatext
1322
+ }), null, 16, ["class", "type", "btnyype", "titleclass", "ctatext", "hidectatext"])
1323
+ ], 10, It))), 128))
1324
+ ], 2)) : h("v-if", !0),
1325
+ t.type != "card" ? (o(), l("div", {
1326
+ key: 1,
1327
+ class: v(`row row-cols-${e.cols} row-cols-sm-${e.smcols} row-cols-md-${e.mdcols} ${e.gap ? `g-${e.gap}` : ""}`)
1328
+ }, [
1329
+ (o(!0), l(A, null, x(e.items, (i, f) => (o(), l("div", {
1330
+ class: v(`col carousel__item${t.colclass ? ` ${t.colclass}` : ""}`),
1331
+ key: f,
1332
+ innerHTML: a.content(i),
1333
+ id: "carousel" + m.id + "slide" + (f + 1)
1334
+ }, null, 10, Ut))), 128))
1335
+ ], 2)) : h("v-if", !0)
1336
+ ]),
1337
+ s("div", {
1338
+ class: v(`carousel__controls cols-${e.cols} cols-sm-${e.smcols} cols-md-${e.mdcols}`)
1339
+ }, [
1340
+ (o(!0), l(A, null, x(e.items, (i, f) => (o(), l("a", {
1341
+ key: f,
1342
+ href: "#carousel" + m.id + "slide" + (f + 1),
1343
+ class: v(`control-${f + 1}`)
1344
+ }, "Slide " + w(f + 1), 11, Ft))), 128))
1345
+ ], 2),
1346
+ zt,
1347
+ Vt
1348
+ ])
1349
+ ], 8, Dt);
1350
+ }
1351
+ const qi = /* @__PURE__ */ g(Nt, [["render", Gt], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Carousel/Carousel.vue"]]);
1352
+ const Ot = {
1353
+ name: "Header",
1354
+ props: {
1355
+ title: {
1356
+ type: String,
1357
+ required: !0
1358
+ },
1359
+ image: {
1360
+ type: String,
1361
+ required: !1
1362
+ }
1363
+ }
1364
+ }, jt = { class: "header-banner" }, Jt = { class: "container" }, Wt = { class: "header-banner__inner" }, Kt = ["innerHTML"], Et = { key: 0 }, Rt = ["srcset"], Zt = /* @__PURE__ */ s("img", {
1365
+ src: "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
1366
+ alt: ""
1367
+ }, null, -1);
1368
+ function Qt(e, n, t, c, m, a) {
1369
+ return o(), l("header", jt, [
1370
+ s("div", Jt, [
1371
+ h(" Space for a breadcrumb trail "),
1372
+ b(e.$slots, "breadcrumb"),
1373
+ s("div", Wt, [
1374
+ s("h1", { innerHTML: t.title }, null, 8, Kt),
1375
+ b(e.$slots, "default")
1376
+ ])
1377
+ ]),
1378
+ t.image ? (o(), l("picture", Et, [
1379
+ h(" Actual image only loaded on desktops "),
1380
+ s("source", {
1381
+ srcset: t.image,
1382
+ media: "(min-width: 62em)"
1383
+ }, null, 8, Rt),
1384
+ h(" Placeholder image "),
1385
+ Zt
1386
+ ])) : h("v-if", !0)
1387
+ ]);
1388
+ }
1389
+ const Ti = /* @__PURE__ */ g(Ot, [["render", Qt], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Header/Header.vue"]]);
1390
+ function Yt(e) {
1391
+ var n;
1392
+ const t = e.querySelector(".testimonial__images"), c = t.querySelectorAll("img").length;
1393
+ if (c == 1)
1394
+ return !1;
1395
+ e.classList.add("testimonial--multi");
1396
+ const m = function(a) {
1397
+ const r = e.querySelector(".btn-next"), i = e.querySelector(".btn-prev");
1398
+ r.setAttribute("data-go", a + 1), i.setAttribute("data-go", a - 1), r.removeAttribute("disabled"), i.removeAttribute("disabled"), a == 1 ? i.setAttribute("disabled", !0) : a == c && r.setAttribute("disabled", !0);
1399
+ };
1400
+ t.addEventListener("scroll", function(a) {
1401
+ clearTimeout(n), n = setTimeout(function() {
1402
+ let r = t.scrollWidth, i = t.scrollHeight, f = t.scrollLeft, S = t.scrollTop, L = Math.round(f / r * c) + 1;
1403
+ f == 0 && S != 0 && (L = Math.round(S / i * c) + 1), e.setAttribute("data-show", L), m(L);
1404
+ }, 300);
1405
+ }, !1), e.addEventListener("click", function(a) {
1406
+ for (var r = a.target; r && r != this; r = r.parentNode)
1407
+ if (r.matches("[data-go]")) {
1408
+ let i = parseInt(r.getAttribute("data-go")), f = 0, S = 0, L = t.scrollWidth, C = t.scrollHeight;
1409
+ L > C ? S = Math.floor(L * ((i - 1) / c)) : f = Math.floor(C * ((i - 1) / c)), t.scroll({
1410
+ top: f,
1411
+ left: S,
1412
+ behavior: "smooth"
1413
+ });
1414
+ break;
1415
+ }
1416
+ }, !1);
1417
+ }
1418
+ const Xt = {
1419
+ name: "Testimonial",
1420
+ props: {
1421
+ items: {
1422
+ type: Array,
1423
+ required: !0
1424
+ },
1425
+ background: {
1426
+ type: String,
1427
+ default: "light",
1428
+ required: !1
1429
+ }
1430
+ },
1431
+ mounted() {
1432
+ Yt(this.$refs.wrapper);
1433
+ }
1434
+ }, es = {
1435
+ class: "container testimonial mb-5",
1436
+ "data-show": "1",
1437
+ ref: "wrapper"
1438
+ }, ts = { class: "row" }, ss = { class: "col-md-5 position-relative" }, as = { class: "testimonial__images" }, is = ["src"], ns = /* @__PURE__ */ s("div", { class: "testimonial__controls" }, [
1439
+ /* @__PURE__ */ s("button", {
1440
+ "data-go": "0",
1441
+ disabled: "",
1442
+ class: "btn-prev"
1443
+ }, "Previous"),
1444
+ /* @__PURE__ */ s("button", {
1445
+ "data-go": "2",
1446
+ class: "btn-next"
1447
+ }, "Next")
1448
+ ], -1), rs = { class: "col-md-7" }, os = /* @__PURE__ */ s("h2", null, "What our customers think\u2026", -1), ls = { class: "testimonial__content" }, cs = ["innerHTML"], ds = ["innerHTML"], us = { class: "testimonial__after" }, fs = /* @__PURE__ */ s("span", { class: "circle circle--dots d-none d-md-block" }, null, -1);
1449
+ function ms(e, n, t, c, m, a) {
1450
+ return o(), l("div", es, [
1451
+ s("div", {
1452
+ class: v("bg-" + t.background)
1453
+ }, [
1454
+ s("div", ts, [
1455
+ s("div", ss, [
1456
+ s("div", as, [
1457
+ (o(!0), l(A, null, x(t.items, (r, i) => (o(), l("img", {
1458
+ key: i,
1459
+ src: r.image ? r.image : "data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",
1460
+ alt: "",
1461
+ class: v("h-100 w-100 object-cover" + (r.image ? "" : " opacity-0"))
1462
+ }, null, 10, is))), 128))
1463
+ ]),
1464
+ ns
1465
+ ]),
1466
+ s("div", rs, [
1467
+ os,
1468
+ s("div", ls, [
1469
+ (o(!0), l(A, null, x(t.items, (r, i) => (o(), l("blockquote", {
1470
+ key: i,
1471
+ class: v(r.class)
1472
+ }, [
1473
+ s("div", {
1474
+ innerHTML: r.quote
1475
+ }, null, 8, cs),
1476
+ s("cite", {
1477
+ innerHTML: r.cite
1478
+ }, null, 8, ds)
1479
+ ], 2))), 128))
1480
+ ]),
1481
+ s("div", us, [
1482
+ b(e.$slots, "default")
1483
+ ])
1484
+ ])
1485
+ ]),
1486
+ fs
1487
+ ], 2)
1488
+ ], 512);
1489
+ }
1490
+ const Ci = /* @__PURE__ */ g(Xt, [["render", ms], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Testimonial/Testimonial.vue"]]);
1491
+ const hs = {
1492
+ components: {
1493
+ Input: I
1494
+ },
1495
+ name: "PropertySearchbar",
1496
+ props: {
1497
+ formaction: {
1498
+ type: String,
1499
+ required: !1
1500
+ },
1501
+ formmethod: {
1502
+ type: String,
1503
+ required: !1
1504
+ },
1505
+ location: {
1506
+ type: String,
1507
+ required: !1
1508
+ },
1509
+ locations: {
1510
+ type: Array,
1511
+ required: !1
1512
+ },
1513
+ distances: {
1514
+ type: Array,
1515
+ required: !1,
1516
+ default() {
1517
+ return [
1518
+ { value: "0.25", display: "+\xBC mi" },
1519
+ { value: "0.5", display: "+\xBD mi" },
1520
+ { value: "1", display: "+1 mi" },
1521
+ { value: "2", display: "+2 mi" },
1522
+ { value: "3", display: "+3 mi" },
1523
+ { value: "4", display: "+4 mi" },
1524
+ { value: "5", display: "+5 mi" }
1525
+ ];
1526
+ }
1527
+ },
1528
+ pricemin: {
1529
+ type: Array,
1530
+ required: !1,
1531
+ default() {
1532
+ return [
1533
+ { value: "0", display: "No min" },
1534
+ { value: "50000", display: "\xA350k min" },
1535
+ { value: "75000", display: "\xA375k min" },
1536
+ { value: "100000", display: "\xA3100k min" },
1537
+ { value: "150000", display: "\xA3150k min" },
1538
+ { value: "200000", display: "\xA3200k min" },
1539
+ { value: "250000", display: "\xA3250k min" }
1540
+ ];
1541
+ }
1542
+ },
1543
+ pricemax: {
1544
+ type: Array,
1545
+ required: !1,
1546
+ default() {
1547
+ return [
1548
+ { value: "any", display: "No max" },
1549
+ { value: "50000", display: "\xA350k max" },
1550
+ { value: "75000", display: "\xA375k max" },
1551
+ { value: "100000", display: "\xA3100k max" },
1552
+ { value: "150000", display: "\xA3150k max" },
1553
+ { value: "200000", display: "\xA3200k max" },
1554
+ { value: "250000", display: "\xA3250k max" }
1555
+ ];
1556
+ }
1557
+ },
1558
+ bedsmin: {
1559
+ type: Array,
1560
+ required: !1,
1561
+ default() {
1562
+ return [
1563
+ { value: "any", display: "No min" },
1564
+ { value: "0", display: "Studio min" },
1565
+ { value: "1", display: "1 bed min" },
1566
+ { value: "2", display: "2 beds min" },
1567
+ { value: "3", display: "3 beds min" },
1568
+ { value: "4", display: "4 beds min" },
1569
+ { value: "5", display: "5 beds min" },
1570
+ { value: "6", display: "6 beds min" }
1571
+ ];
1572
+ }
1573
+ },
1574
+ bedsmax: {
1575
+ type: Array,
1576
+ required: !1,
1577
+ default() {
1578
+ return [
1579
+ { value: "any", display: "No max" },
1580
+ { value: "0", display: "Studio max" },
1581
+ { value: "1", display: "1 bed max" },
1582
+ { value: "2", display: "2 beds max" },
1583
+ { value: "3", display: "3 beds max" },
1584
+ { value: "4", display: "4 beds max" },
1585
+ { value: "5", display: "5 beds max" },
1586
+ { value: "6", display: "6 beds max" }
1587
+ ];
1588
+ }
1589
+ },
1590
+ propertytypes: {
1591
+ type: Array,
1592
+ required: !1,
1593
+ default() {
1594
+ return [
1595
+ { value: "all", display: "Show all" },
1596
+ { value: "Bungalow", display: "Bungalow" },
1597
+ { value: "Character Property", display: "Character Property" },
1598
+ { value: "Commercial Property", display: "Commercial Property" },
1599
+ { value: "Flat / Apartment", display: "Flat / Apartment" },
1600
+ { value: "Garage / Parking", display: "Garage / Parking" },
1601
+ { value: "Guest House / Hotel", display: "Guest House / Hotel" },
1602
+ { value: "House", display: "House" },
1603
+ { value: "House / Flat Share", display: "House / Flat Share" },
1604
+ { value: "Land", display: "Land" },
1605
+ { value: "Mobile / Park Home", display: "Mobile / Park Home" },
1606
+ { value: "Private Halls", display: "Private Halls" },
1607
+ { value: "Retirement Property", display: "Retirement Property" }
1608
+ ];
1609
+ }
1610
+ }
1611
+ },
1612
+ data() {
1613
+ return {
1614
+ locationSave: ""
1615
+ };
1616
+ },
1617
+ methods: {
1618
+ locationKeyup: function(e) {
1619
+ this.$emit("locationKeyup", e);
1620
+ }
1621
+ },
1622
+ computed: {
1623
+ locationSet: {
1624
+ get() {
1625
+ return this.locationSave ? this.locationSave : this.location;
1626
+ },
1627
+ set(e) {
1628
+ this.locationSave = e, this.$emit("input", e);
1629
+ }
1630
+ },
1631
+ locationsList() {
1632
+ return () => this.locations ? this.locations : [
1633
+ { value: "Newcastle" }
1634
+ ];
1635
+ }
1636
+ }
1637
+ }, _s = {
1638
+ class: "container",
1639
+ ref: "wrapper"
1640
+ }, ps = { class: "property-searchbar" }, ys = ["action", "method"], bs = { class: "col-12 col-md-3" }, vs = { class: "col-12 col-md" }, gs = /* @__PURE__ */ s("span", { class: "form-label d-none d-md-block" }, "Price range", -1), ws = {
1641
+ class: "row",
1642
+ "data-input-range": ""
1643
+ }, ks = { class: "col-12 col-md" }, Ss = /* @__PURE__ */ s("span", { class: "form-label d-none d-md-block" }, "Number of beds", -1), $s = {
1644
+ class: "row",
1645
+ "data-input-range": ""
1646
+ }, As = { class: "col-12 col-md-2" }, xs = /* @__PURE__ */ s("div", { class: "col-12 col-md mw-md-fit-content d-flex property-searchbar__btn" }, [
1647
+ /* @__PURE__ */ s("button", {
1648
+ class: "btn w-100 me-0",
1649
+ type: "submit",
1650
+ value: "submit"
1651
+ }, "Search")
1652
+ ], -1);
1653
+ function Ls(e, n, t, c, m, a) {
1654
+ const r = M("Input");
1655
+ return o(), l("div", _s, [
1656
+ b(e.$slots, "default"),
1657
+ s("div", ps, [
1658
+ s("form", {
1659
+ class: "row",
1660
+ action: t.formaction,
1661
+ method: t.formmethod
1662
+ }, [
1663
+ s("fieldset", bs, [
1664
+ $(r, {
1665
+ inputClass: "input--locations",
1666
+ modelValue: a.locationSet,
1667
+ "onUpdate:modelValue": n[0] || (n[0] = (i) => a.locationSet = i),
1668
+ label: "Location",
1669
+ id: "location",
1670
+ options: a.locationsList(),
1671
+ required: "",
1672
+ placeholder: "i.e. Newcastle or NE1",
1673
+ onKeyupEvent: n[1] || (n[1] = (i) => a.locationKeyup(...arguments)),
1674
+ ref: "search"
1675
+ }, null, 8, ["modelValue", "options"]),
1676
+ $(r, {
1677
+ class: "select--miles",
1678
+ label: "Miles",
1679
+ id: "miles",
1680
+ type: "select",
1681
+ options: t.distances
1682
+ }, null, 8, ["options"])
1683
+ ]),
1684
+ s("fieldset", vs, [
1685
+ gs,
1686
+ s("div", ws, [
1687
+ $(r, {
1688
+ class: "col-6",
1689
+ label: "Minimum price",
1690
+ id: "price-min",
1691
+ "data-min": "true",
1692
+ type: "select",
1693
+ options: t.pricemin
1694
+ }, null, 8, ["options"]),
1695
+ $(r, {
1696
+ class: "col-6",
1697
+ label: "Maximum price",
1698
+ id: "price-max",
1699
+ "data-max": "true",
1700
+ type: "select",
1701
+ options: t.pricemax
1702
+ }, null, 8, ["options"])
1703
+ ])
1704
+ ]),
1705
+ s("fieldset", ks, [
1706
+ Ss,
1707
+ s("div", $s, [
1708
+ $(r, {
1709
+ class: "col-6",
1710
+ label: "Minimum beds",
1711
+ id: "beds-min",
1712
+ "data-min": "true",
1713
+ type: "select",
1714
+ options: t.bedsmin
1715
+ }, null, 8, ["options"]),
1716
+ $(r, {
1717
+ class: "col-6",
1718
+ label: "Maximum beds",
1719
+ id: "beds-max",
1720
+ "data-max": "true",
1721
+ type: "select",
1722
+ options: t.bedsmax
1723
+ }, null, 8, ["options"])
1724
+ ])
1725
+ ]),
1726
+ s("fieldset", As, [
1727
+ $(r, {
1728
+ label: "Property type",
1729
+ id: "property-type",
1730
+ type: "select",
1731
+ options: t.propertytypes
1732
+ }, null, 8, ["options"])
1733
+ ]),
1734
+ xs
1735
+ ], 8, ys)
1736
+ ]),
1737
+ b(e.$slots, "after")
1738
+ ], 512);
1739
+ }
1740
+ const Mi = /* @__PURE__ */ g(hs, [["render", Ls], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/PropertySearchbar/PropertySearchbar.vue"]]), qs = (e) => {
1741
+ Array.from(e.querySelectorAll("details")).forEach((n, t) => {
1742
+ n.addEventListener("mouseenter", function(c) {
1743
+ window.matchMedia("(min-width: 62em)").matches && n.setAttribute("open", "true");
1744
+ }, !1), n.addEventListener("mouseleave", function(c) {
1745
+ window.matchMedia("(min-width: 62em)").matches && n.removeAttribute("open");
1746
+ }, !1);
1747
+ }), "IntersectionObserver" in window && new IntersectionObserver(
1748
+ ([t]) => t.target.classList.toggle("is-stuck", t.intersectionRatio < 1),
1749
+ { threshold: [1] }
1750
+ ).observe(e);
1751
+ };
1752
+ const Ts = {
1753
+ components: {
1754
+ Input: I,
1755
+ Logo: ue,
1756
+ Icon: re
1757
+ },
1758
+ name: "Nav",
1759
+ props: {
1760
+ logo: {
1761
+ type: String,
1762
+ required: !1
1763
+ },
1764
+ logotext: {
1765
+ type: String,
1766
+ required: !1
1767
+ },
1768
+ logopath: {
1769
+ type: String,
1770
+ required: !1
1771
+ },
1772
+ search: {
1773
+ type: String,
1774
+ required: !1
1775
+ },
1776
+ btnlink: {
1777
+ type: String,
1778
+ required: !1
1779
+ },
1780
+ btntext: {
1781
+ type: String,
1782
+ required: !1
1783
+ },
1784
+ propertylink: {
1785
+ type: String,
1786
+ required: !1
1787
+ },
1788
+ movebutlerlink: {
1789
+ type: String,
1790
+ required: !1
1791
+ },
1792
+ iamsoldlink: {
1793
+ type: String,
1794
+ required: !1
1795
+ }
1796
+ },
1797
+ data() {
1798
+ return {
1799
+ locationSave: ""
1800
+ };
1801
+ },
1802
+ methods: {
1803
+ subIsActive(e) {
1804
+ return (Array.isArray(e) ? e : [e]).some((t) => this.$route.path.indexOf(t) === 0);
1805
+ }
1806
+ },
1807
+ computed: {
1808
+ hasLogoSlot() {
1809
+ return !!this.$slots.logo;
1810
+ },
1811
+ hasSecondarySlot() {
1812
+ return !!this.$slots.secondary;
1813
+ },
1814
+ hasSearchSlot() {
1815
+ return !!this.$slots.search;
1816
+ },
1817
+ hasAccountSlot() {
1818
+ return !!this.$slots.account;
1819
+ },
1820
+ isMarketplace() {
1821
+ return !1;
1822
+ }
1823
+ },
1824
+ mounted() {
1825
+ this.$nextTick(function() {
1826
+ qs(this.$refs.wrapper);
1827
+ });
1828
+ }
1829
+ }, Cs = /* @__PURE__ */ s("input", {
1830
+ type: "checkbox",
1831
+ name: "showMenu",
1832
+ id: "showMenu",
1833
+ class: "d-none"
1834
+ }, null, -1), Ms = /* @__PURE__ */ s("input", {
1835
+ type: "checkbox",
1836
+ name: "showSearch",
1837
+ id: "showSearch",
1838
+ class: "d-none"
1839
+ }, null, -1), Hs = /* @__PURE__ */ s("input", {
1840
+ type: "checkbox",
1841
+ name: "showAccount",
1842
+ id: "showAccount",
1843
+ class: "d-none"
1844
+ }, null, -1), Ns = { class: "nav__mobile-bar" }, Ds = { class: "container" }, Bs = { class: "row" }, Ps = {
1845
+ key: 0,
1846
+ class: "col mw-md-fit-content nav__logo"
1847
+ }, Is = {
1848
+ key: 1,
1849
+ class: "col mw-md-fit-content nav__logo"
1850
+ }, Us = {
1851
+ href: "/",
1852
+ class: "text-decoration-none mb-0"
1853
+ }, Fs = /* @__PURE__ */ s("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1854
+ /* @__PURE__ */ s("label", { for: "showMenu" }, "Menu")
1855
+ ], -1), zs = { class: "nav__inner" }, Vs = { class: "container" }, Gs = { class: "row" }, Os = {
1856
+ key: 0,
1857
+ class: "col mw-md-fit-content nav__logo"
1858
+ }, js = {
1859
+ key: 1,
1860
+ class: "col mw-md-fit-content nav__logo"
1861
+ }, Js = {
1862
+ href: "/",
1863
+ class: "text-decoration-none mb-0"
1864
+ }, Ws = {
1865
+ key: 2,
1866
+ class: "col mw-fit-content nav__search-btn flex-row align-items-center"
1867
+ }, Ks = /* @__PURE__ */ s("label", { for: "showSearch" }, [
1868
+ /* @__PURE__ */ s("svg", {
1869
+ class: "icon",
1870
+ viewBox: "0 0 32 32"
1871
+ }, [
1872
+ /* @__PURE__ */ s("title", null, "Search"),
1873
+ /* @__PURE__ */ s("ellipse", {
1874
+ cx: "14.92",
1875
+ cy: "13.81",
1876
+ rx: "11.92",
1877
+ ry: "11.81",
1878
+ class: "icon__outline"
1879
+ }),
1880
+ /* @__PURE__ */ s("line", {
1881
+ x1: "22.68",
1882
+ y1: "22.75",
1883
+ x2: "30",
1884
+ y2: "30",
1885
+ class: "icon__outline"
1886
+ })
1887
+ ])
1888
+ ], -1), Es = [
1889
+ Ks
1890
+ ], Rs = /* @__PURE__ */ s("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1891
+ /* @__PURE__ */ s("label", { for: "showMenu" }, "Menu")
1892
+ ], -1), Zs = { class: "col-12 col-md nav__menu ms-auto flex-row align-items-center" }, Qs = {
1893
+ key: 3,
1894
+ class: "col nav__account-btn flex-row align-items-center"
1895
+ }, Ys = /* @__PURE__ */ s("label", { for: "showAccount" }, [
1896
+ /* @__PURE__ */ s("svg", {
1897
+ class: "icon",
1898
+ viewBox: "0 0 28 28"
1899
+ }, [
1900
+ /* @__PURE__ */ s("path", {
1901
+ d: "M14,28a13.861,13.861,0,0,1-9.268-3.533l-.023.047-.721-.738L3.62,23.4l.012-.023a14,14,0,1,1,20.735,0l.012.023-.367.377-.722.738-.024-.045A13.855,13.855,0,0,1,14,28Zm0-9.58a10.5,10.5,0,0,0-1.368.092c-.085.012-.17.03-.252.047-.061.013-.124.026-.187.037l-.077.013c-.266.047-.54.095-.8.165-.108.029-.215.065-.318.1-.063.022-.125.043-.188.063l-.08.026c-.223.071-.454.144-.671.234-.125.05-.245.11-.362.168l-.146.072-.045.021c-.208.1-.423.2-.623.312-.131.074-.257.158-.379.239l-.106.07-.068.044c-.176.114-.359.232-.528.359-.137.1-.267.218-.393.327l-.054.047c-.174.15-.355.306-.519.47-.132.134-.258.277-.38.416l-.018.021c-.16.184-.3.35-.437.527-.12.161-.23.33-.337.494-.076.117-.146.238-.214.356a12.495,12.495,0,0,0,17.109,0l-.022-.037c-.061-.1-.125-.212-.192-.315-.1-.156-.214-.333-.338-.5-.141-.188-.293-.363-.436-.526-.113-.13-.253-.292-.4-.438-.161-.162-.337-.314-.517-.468l-.08-.069c-.118-.1-.24-.209-.368-.307-.183-.137-.379-.264-.568-.387l-.026-.017-.106-.07c-.125-.083-.251-.166-.381-.24-.207-.118-.429-.222-.643-.322l-.024-.011-.152-.074c-.116-.057-.235-.116-.356-.165-.214-.087-.438-.159-.656-.229l-.1-.031c-.066-.021-.132-.043-.2-.066-.1-.035-.2-.07-.309-.1-.264-.07-.538-.118-.8-.165l-.078-.014c-.063-.011-.126-.024-.187-.037-.082-.017-.167-.035-.252-.047A10.483,10.483,0,0,0,14,18.421Zm0-1.473a11.871,11.871,0,0,1,1.54.1c.1.013.192.033.284.052.069.014.139.028.209.04.34.058.672.118,1,.2.14.036.278.082.412.127l.151.05c.309.1.587.188.859.3.148.059.293.127.433.194l.13.061c.306.142.553.266.775.389.188.107.368.22.535.328.26.166.489.322.7.478.156.117.316.244.49.389.209.176.412.361.622.567.156.154.3.293.43.443.209.23.4.472.542.657l.051.066c.1.134.21.272.308.416.021.031.045.061.068.09a1.267,1.267,0,0,1,.085.117,12.525,12.525,0,1,0-19.24,0c.026-.04.056-.078.084-.114s.05-.064.073-.1c.1-.141.2-.278.3-.409l.046-.059c.2-.264.378-.478.555-.672.137-.152.281-.3.417-.43.215-.21.422-.4.635-.578.18-.15.332-.271.479-.381.208-.155.433-.31.709-.486.174-.111.346-.219.526-.319.274-.153.55-.285.783-.393l.112-.053c.144-.069.293-.14.445-.2.282-.113.578-.208.864-.3l.159-.052c.132-.044.265-.088.4-.124.331-.087.675-.148,1-.2.068-.012.137-.026.2-.039.094-.019.191-.039.288-.052A11.827,11.827,0,0,1,14,16.948Z",
1902
+ transform: "translate(0 -0.001)"
1903
+ }),
1904
+ /* @__PURE__ */ s("path", {
1905
+ d: "M5.2,10.4a5.2,5.2,0,1,1,5.2-5.2A5.206,5.206,0,0,1,5.2,10.4Zm0-8.915A3.714,3.714,0,1,0,8.915,5.2,3.719,3.719,0,0,0,5.2,1.486Z",
1906
+ transform: "translate(8.8 4.8)"
1907
+ })
1908
+ ]),
1909
+ /* @__PURE__ */ s("span", null, "My account")
1910
+ ], -1), Xs = [
1911
+ Ys
1912
+ ], ea = {
1913
+ key: 4,
1914
+ class: "col-12 col-md nav__btn mw-md-fit-content flex-row align-items-center"
1915
+ }, ta = ["href", "innerHTML"], sa = {
1916
+ key: 0,
1917
+ class: "nav__menu--secondary"
1918
+ }, aa = { class: "container" }, ia = {
1919
+ key: 1,
1920
+ class: "nav__menu--search"
1921
+ }, na = { class: "bg-gradient pt-4" }, ra = { class: "container" }, oa = {
1922
+ key: 0,
1923
+ class: "nav__menu--account"
1924
+ }, la = { class: "container" }, ca = { class: "row mb-4" }, da = {
1925
+ key: 0,
1926
+ class: "col mw-md-fit-content nav__logo"
1927
+ }, ua = {
1928
+ key: 1,
1929
+ class: "col mw-md-fit-content nav__logo"
1930
+ }, fa = {
1931
+ href: "/",
1932
+ class: "text-decoration-none mb-0"
1933
+ }, ma = /* @__PURE__ */ s("div", { class: "col mw-fit-content d-md-none flex-row align-items-center nav__menu-btn" }, [
1934
+ /* @__PURE__ */ s("label", { for: "showAccount" }, "Account")
1935
+ ], -1), ha = { class: "container" }, _a = /* @__PURE__ */ s("span", { class: "nav__bg" }, null, -1);
1936
+ function pa(e, n, t, c, m, a) {
1937
+ const r = M("Logo");
1938
+ return o(), l("nav", {
1939
+ class: v(`nav${a.hasSecondarySlot ? " has-secondary" : ""}`),
1940
+ ref: "wrapper"
1941
+ }, [
1942
+ Cs,
1943
+ Ms,
1944
+ Hs,
1945
+ h(" Mobile bar "),
1946
+ s("div", Ns, [
1947
+ s("div", Ds, [
1948
+ s("div", Bs, [
1949
+ a.hasLogoSlot ? (o(), l("div", Ps, [
1950
+ b(e.$slots, "logo")
1951
+ ])) : (o(), l("div", Is, [
1952
+ s("a", Us, [
1953
+ $(r, {
1954
+ id: t.logo,
1955
+ path: t.logopath,
1956
+ desc: t.logotext,
1957
+ class: "pb-0"
1958
+ }, null, 8, ["id", "path", "desc"])
1959
+ ])
1960
+ ])),
1961
+ Fs
1962
+ ])
1963
+ ])
1964
+ ]),
1965
+ s("div", zs, [
1966
+ s("div", Vs, [
1967
+ s("div", Gs, [
1968
+ a.hasLogoSlot ? (o(), l("div", Os, [
1969
+ b(e.$slots, "logo")
1970
+ ])) : (o(), l("div", js, [
1971
+ s("a", Js, [
1972
+ $(r, {
1973
+ id: t.logo,
1974
+ path: t.logopath,
1975
+ desc: t.logotext,
1976
+ class: "pb-0"
1977
+ }, null, 8, ["id", "path", "desc"])
1978
+ ])
1979
+ ])),
1980
+ a.hasSearchSlot ? (o(), l("div", Ws, Es)) : h("v-if", !0),
1981
+ Rs,
1982
+ h(" Main menu "),
1983
+ s("div", Zs, [
1984
+ b(e.$slots, "default")
1985
+ ]),
1986
+ a.hasAccountSlot ? (o(), l("div", Qs, Xs)) : h("v-if", !0),
1987
+ t.btnlink ? (o(), l("div", ea, [
1988
+ s("a", {
1989
+ href: t.btnlink,
1990
+ class: "btn me-0",
1991
+ innerHTML: t.btntext
1992
+ }, null, 8, ta)
1993
+ ])) : h("v-if", !0)
1994
+ ])
1995
+ ]),
1996
+ a.hasSecondarySlot ? (o(), l("div", sa, [
1997
+ s("div", aa, [
1998
+ b(e.$slots, "secondary")
1999
+ ])
2000
+ ])) : h("v-if", !0),
2001
+ a.hasSearchSlot ? (o(), l("div", ia, [
2002
+ s("div", na, [
2003
+ s("div", ra, [
2004
+ b(e.$slots, "search")
2005
+ ])
2006
+ ])
2007
+ ])) : h("v-if", !0)
2008
+ ]),
2009
+ a.hasAccountSlot ? (o(), l("div", oa, [
2010
+ s("div", la, [
2011
+ s("div", ca, [
2012
+ a.hasLogoSlot ? (o(), l("div", da, [
2013
+ b(e.$slots, "logo")
2014
+ ])) : (o(), l("div", ua, [
2015
+ s("a", fa, [
2016
+ $(r, {
2017
+ id: t.logo,
2018
+ path: t.logopath,
2019
+ desc: t.logotext,
2020
+ class: "pb-0"
2021
+ }, null, 8, ["id", "path", "desc"])
2022
+ ])
2023
+ ])),
2024
+ ma
2025
+ ])
2026
+ ]),
2027
+ s("div", ha, [
2028
+ b(e.$slots, "account")
2029
+ ])
2030
+ ])) : h("v-if", !0),
2031
+ _a
2032
+ ], 2);
2033
+ }
2034
+ const Hi = /* @__PURE__ */ g(Ts, [["render", pa], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Nav/Nav.vue"]]), ya = (e) => {
2035
+ const n = new IntersectionObserver(
2036
+ function([c]) {
2037
+ c.target.classList.toggle("in-view", c.intersectionRatio > 0), document.getElementById("showDrawer").checked = !1;
2038
+ },
2039
+ { threshold: [1] }
2040
+ ), t = document.getElementById("drawer-end");
2041
+ n.observe(t);
2042
+ };
2043
+ const ba = {
2044
+ name: "Header",
2045
+ props: {
2046
+ label: {
2047
+ type: String,
2048
+ required: !0
2049
+ }
2050
+ },
2051
+ mounted() {
2052
+ this.$nextTick(function() {
2053
+ let e = this.$refs.wrapper;
2054
+ const n = document.createDocumentFragment();
2055
+ Array.from(e.childNodes).forEach((t) => n.appendChild(t)), e.parentNode.insertBefore(n, e), e.parentNode.removeChild(e), this.$nextTick(function() {
2056
+ ya(this.$refs.drawer);
2057
+ });
2058
+ });
2059
+ }
2060
+ }, va = { ref: "wrapper" }, ga = /* @__PURE__ */ s("input", {
2061
+ type: "checkbox",
2062
+ name: "showDrawer",
2063
+ id: "showDrawer",
2064
+ class: "d-none"
2065
+ }, null, -1), wa = { class: "drawer__btn pb-0" }, ka = { class: "container text-end pb-0" }, Sa = {
2066
+ for: "showDrawer",
2067
+ class: "btn btn-secondary me-0"
2068
+ }, $a = {
2069
+ class: "drawer",
2070
+ id: "drawer",
2071
+ ref: "drawer"
2072
+ }, Aa = /* @__PURE__ */ s("div", { class: "container text-end pb-0" }, [
2073
+ /* @__PURE__ */ s("label", {
2074
+ for: "showDrawer",
2075
+ class: "btn btn-tertiary mb-0 me-0 py-1 px-2"
2076
+ }, [
2077
+ /* @__PURE__ */ s("span", { class: "visually-hidden" }, "Close"),
2078
+ /* @__PURE__ */ P("\u2715")
2079
+ ])
2080
+ ], -1), xa = /* @__PURE__ */ s("hr", { id: "drawer-end" }, null, -1);
2081
+ function La(e, n, t, c, m, a) {
2082
+ return o(), l("div", va, [
2083
+ ga,
2084
+ s("div", wa, [
2085
+ s("div", ka, [
2086
+ s("label", Sa, w(t.label), 1)
2087
+ ])
2088
+ ]),
2089
+ s("div", $a, [
2090
+ Aa,
2091
+ b(e.$slots, "default")
2092
+ ], 512),
2093
+ xa
2094
+ ], 512);
2095
+ }
2096
+ const Ni = /* @__PURE__ */ g(ba, [["render", La], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Drawer/Drawer.vue"]]), qa = (e) => {
2097
+ const n = e.querySelectorAll(".modal__outer a, .modal__outer button"), t = n[0], c = n[n.length - 1], m = e.getAttribute("id"), a = function() {
2098
+ document.querySelector('[href="' + window.location.hash + '"]').focus(), window.location.hash = "close", history.replaceState("", document.title, window.location.pathname + window.location.search), typeof window.player < "u" && typeof window.player.pauseVideo == "function" && window.player.pauseVideo();
2099
+ };
2100
+ e.addEventListener("keydown", function(i) {
2101
+ i.key === "Tab" && i.shiftKey && document.activeElement == t ? (i.preventDefault(), c.focus()) : i.key === "Tab" && !i.shiftKey && document.activeElement == c && (i.preventDefault(), t.focus());
2102
+ }), document.addEventListener("keydown", function(i) {
2103
+ i.key === "Escape" && document.querySelector(".modal:target") && a();
2104
+ }), e.addEventListener("click", function(i) {
2105
+ for (var f = i.target; f && f != this; f = f.parentNode)
2106
+ if (f.matches('[href="#close"]')) {
2107
+ i.preventDefault(), a();
2108
+ break;
2109
+ } else if (f.matches(".modal__dock--right")) {
2110
+ i.preventDefault(), e.classList.contains("modal--left") || e.classList.add("modal--right"), e.classList.remove("modal--left");
2111
+ break;
2112
+ } else if (f.matches(".modal__dock--left")) {
2113
+ i.preventDefault(), e.classList.contains("modal--right") || e.classList.add("modal--left"), e.classList.remove("modal--right");
2114
+ break;
2115
+ }
2116
+ });
2117
+ function r() {
2118
+ if (location.hash === "#" + m) {
2119
+ console.log("Modal is now open");
2120
+ const i = document.querySelector(".modal:target .modal__inner > .youtube-embed:first-child:last-child a");
2121
+ console.log(i), i && i.click();
2122
+ }
2123
+ }
2124
+ window.onhashchange = r;
2125
+ };
2126
+ const Ta = {
2127
+ name: "Modal",
2128
+ props: {
2129
+ id: {
2130
+ type: String,
2131
+ required: !0
2132
+ },
2133
+ returnid: {
2134
+ type: String,
2135
+ default: "close",
2136
+ required: !1
2137
+ }
2138
+ },
2139
+ mounted() {
2140
+ this.$nextTick(function() {
2141
+ qa(this.$refs.modal);
2142
+ });
2143
+ }
2144
+ }, Ca = ["id"], Ma = ["href"], Ha = /* @__PURE__ */ s("span", { class: "visually-hidden" }, "Close", -1), Na = [
2145
+ Ha
2146
+ ], Da = { class: "modal__outer" }, Ba = ["href"], Pa = /* @__PURE__ */ s("span", { class: "visually-hidden" }, "Close", -1), Ia = /* @__PURE__ */ P("\u2715"), Ua = [
2147
+ Pa,
2148
+ Ia
2149
+ ], Fa = { class: "modal__inner" }, za = /* @__PURE__ */ s("button", {
2150
+ class: "modal__dock--left btn btn-prev",
2151
+ tabindex: "-1"
2152
+ }, "Left", -1), Va = /* @__PURE__ */ s("button", {
2153
+ class: "modal__dock--right btn btn-next",
2154
+ tabindex: "-1"
2155
+ }, "Right", -1);
2156
+ function Ga(e, n, t, c, m, a) {
2157
+ return o(), l("div", {
2158
+ class: "modal",
2159
+ id: t.id,
2160
+ role: "dialog",
2161
+ modal: "true",
2162
+ ref: "modal"
2163
+ }, [
2164
+ s("a", {
2165
+ href: `#${t.returnid ? t.returnid : ""}`,
2166
+ tabindex: "-1"
2167
+ }, Na, 8, Ma),
2168
+ s("div", Da, [
2169
+ s("a", {
2170
+ href: `#${t.returnid ? t.returnid : ""}`,
2171
+ class: "btn btn-tertiary py-1 px-2"
2172
+ }, Ua, 8, Ba),
2173
+ s("div", Fa, [
2174
+ b(e.$slots, "default")
2175
+ ])
2176
+ ]),
2177
+ za,
2178
+ Va
2179
+ ], 8, Ca);
2180
+ }
2181
+ const Di = /* @__PURE__ */ g(Ta, [["render", Ga], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Modal/Modal.vue"]]);
2182
+ const Oa = {
2183
+ name: "Stepper",
2184
+ props: {
2185
+ label: {
2186
+ type: String,
2187
+ required: !1
2188
+ },
2189
+ endlabel: {
2190
+ type: String,
2191
+ required: !1,
2192
+ default: "Complete"
2193
+ }
2194
+ }
2195
+ }, ja = { class: "container" }, Ja = ["aria-label"], Wa = {
2196
+ key: 0,
2197
+ class: "h6 stepper__start"
2198
+ }, Ka = { class: "list-unstyled" }, Ea = { class: "h6 stepper__end" };
2199
+ function Ra(e, n, t, c, m, a) {
2200
+ return o(), l("div", ja, [
2201
+ s("nav", {
2202
+ class: "stepper",
2203
+ "aria-label": t.label ? t.label : "Progress"
2204
+ }, [
2205
+ t.label ? (o(), l("span", Wa, w(t.label), 1)) : h("v-if", !0),
2206
+ s("ol", Ka, [
2207
+ b(e.$slots, "default", {}, () => [
2208
+ h(" Use for titles etc ")
2209
+ ])
2210
+ ]),
2211
+ s("span", Ea, w(t.endlabel), 1)
2212
+ ], 8, Ja)
2213
+ ]);
2214
+ }
2215
+ const Bi = /* @__PURE__ */ g(Oa, [["render", Ra], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Stepper/Stepper.vue"]]), Za = {
2216
+ name: "Stepper",
2217
+ props: {
2218
+ url: {
2219
+ type: String,
2220
+ required: !1
2221
+ },
2222
+ status: {
2223
+ type: String,
2224
+ required: !1
2225
+ },
2226
+ current: {
2227
+ type: String,
2228
+ required: !1
2229
+ }
2230
+ }
2231
+ }, Qa = ["href", "aria-current"], Ya = {
2232
+ key: 0,
2233
+ class: "visually-hidden"
2234
+ };
2235
+ function Xa(e, n, t, c, m, a) {
2236
+ return o(), l("li", null, [
2237
+ s("a", {
2238
+ href: t.url,
2239
+ class: v(`${t.status ? "bg-" + t.status : ""}${typeof t.current < "u" ? "current" : ""}`),
2240
+ "aria-current": typeof t.current < "u"
2241
+ }, [
2242
+ s("span", null, [
2243
+ b(e.$slots, "default")
2244
+ ]),
2245
+ t.status ? (o(), l("em", Ya, " - status: " + w(t.status), 1)) : h("v-if", !0)
2246
+ ], 10, Qa)
2247
+ ]);
2248
+ }
2249
+ const Pi = /* @__PURE__ */ g(Za, [["render", Xa], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Stepper/Step.vue"]]);
2250
+ const ei = {
2251
+ name: "Tabs",
2252
+ data() {
2253
+ return {
2254
+ tabsID: "tabs_" + Math.random().toString(36).substr(2, 9)
2255
+ };
2256
+ },
2257
+ computed: {
2258
+ tabLinks() {
2259
+ return () => {
2260
+ const e = [];
2261
+ let n = 1;
2262
+ for (const [t, c] of Object.entries(this.$slots.default()))
2263
+ if (c.props && c.props.title) {
2264
+ let m = c.props.title, a = {
2265
+ name: this.tabsID,
2266
+ id: this.tabsID + "_tab" + n++,
2267
+ tabTitle: m
2268
+ };
2269
+ e.push(a);
2270
+ }
2271
+ return e;
2272
+ };
2273
+ }
2274
+ },
2275
+ methods: {
2276
+ openTab: function(e) {
2277
+ let n = 0;
2278
+ for (const [t, c] of Object.entries(this.$slots.default()))
2279
+ c.props && c.props.title && (n == e && (console.log(c), c.type.data().show = !0), n++);
2280
+ }
2281
+ }
2282
+ }, ti = {
2283
+ class: "container tabs__container",
2284
+ ref: "wrapper"
2285
+ }, si = ["data-key", "name", "id", "checked"], ai = { class: "tabs__links" }, ii = ["for", "onClick"], ni = { class: "tabs" };
2286
+ function ri(e, n, t, c, m, a) {
2287
+ return o(), l("div", ti, [
2288
+ (o(!0), l(A, null, x(a.tabLinks(), (r, i) => (o(), l("input", {
2289
+ type: "radio",
2290
+ class: "tab__input",
2291
+ key: i,
2292
+ "data-key": i,
2293
+ name: r.name,
2294
+ id: r.id,
2295
+ checked: i == 0
2296
+ }, null, 8, si))), 128)),
2297
+ s("div", ai, [
2298
+ (o(!0), l(A, null, x(a.tabLinks(), (r, i) => (o(), l("label", {
2299
+ key: i,
2300
+ for: r.id,
2301
+ class: "link",
2302
+ onClick: (f) => a.openTab(i)
2303
+ }, w(r.tabTitle), 9, ii))), 128))
2304
+ ]),
2305
+ s("div", ni, [
2306
+ b(e.$slots, "default")
2307
+ ])
2308
+ ], 512);
2309
+ }
2310
+ const Ii = /* @__PURE__ */ g(ei, [["render", ri], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Tabs/Tabs.vue"]]), oi = {
2311
+ name: "Tab",
2312
+ props: {
2313
+ title: {
2314
+ type: String,
2315
+ required: !0
2316
+ },
2317
+ lazy: {
2318
+ type: Boolean,
2319
+ required: !1
2320
+ }
2321
+ },
2322
+ data() {
2323
+ return {
2324
+ show: !this.lazy
2325
+ };
2326
+ },
2327
+ watch: {
2328
+ show(e, n) {
2329
+ console.log(e);
2330
+ }
2331
+ }
2332
+ }, li = {
2333
+ key: 0,
2334
+ class: "tab"
2335
+ };
2336
+ function ci(e, n, t, c, m, a) {
2337
+ return m.show ? (o(), l("div", li, [
2338
+ b(e.$slots, "default")
2339
+ ])) : h("v-if", !0);
2340
+ }
2341
+ const Ui = /* @__PURE__ */ g(oi, [["render", ci], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Tabs/Tab.vue"]]);
2342
+ function di(e) {
2343
+ if (e.addEventListener("click", function(t) {
2344
+ for (var c = t.target; c && c != this; c = c.parentNode)
2345
+ if (c.matches(".btn-close")) {
2346
+ t.preventDefault(), e.classList.remove("show"), setTimeout(function() {
2347
+ e.remove();
2348
+ }, 300);
2349
+ break;
2350
+ }
2351
+ }, !1), e.hasAttribute("data-timeout")) {
2352
+ let t = e.getAttribute("data-timeout");
2353
+ setTimeout(function() {
2354
+ e.classList.remove("show"), setTimeout(function() {
2355
+ e.remove();
2356
+ }, 300);
2357
+ }, t);
2358
+ }
2359
+ if (!document.querySelector(".alert__holder")) {
2360
+ document.getElementsByTagName("BODY")[0];
2361
+ let t = document.createElement("div");
2362
+ t.classList.add("alert__holder"), document.querySelector("main") ? document.querySelector("main").appendChild(t) : document.body.appendChild(t);
2363
+ }
2364
+ let n = document.querySelector(".alert__holder");
2365
+ e.classList.contains("alert--fixed") && !e.parentNode.classList.contains("alert__wrapper") && n.appendChild(e);
2366
+ }
2367
+ const ui = {
2368
+ name: "Alert",
2369
+ props: {
2370
+ dismissible: {
2371
+ type: [String, Boolean],
2372
+ required: !1,
2373
+ default: !1
2374
+ },
2375
+ colour: {
2376
+ type: String,
2377
+ required: !1,
2378
+ default: "primary"
2379
+ },
2380
+ timeout: {
2381
+ type: [String, Number],
2382
+ required: !1
2383
+ }
2384
+ },
2385
+ mounted() {
2386
+ di(this.$refs.wrapper);
2387
+ }
2388
+ }, fi = ["data-timeout"], mi = {
2389
+ key: 0,
2390
+ type: "button",
2391
+ class: "btn-close",
2392
+ "data-bs-dismiss": "alert",
2393
+ "aria-label": "Close"
2394
+ };
2395
+ function hi(e, n, t, c, m, a) {
2396
+ return o(), l("div", {
2397
+ class: v(`container alert pb-0 ${t.dismissible ? "alert--dismissible fade show" : ""}`),
2398
+ ref: "wrapper",
2399
+ "data-timeout": t.timeout,
2400
+ style: ee(t.timeout ? `--animation-length: ${t.timeout}ms` : "")
2401
+ }, [
2402
+ s("div", {
2403
+ class: v(`alert__inner bg-${t.colour}`),
2404
+ role: "alert"
2405
+ }, [
2406
+ t.dismissible ? (o(), l("button", mi)) : h("v-if", !0),
2407
+ b(e.$slots, "default")
2408
+ ], 2)
2409
+ ], 14, fi);
2410
+ }
2411
+ const Fi = /* @__PURE__ */ g(ui, [["render", hi], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/Alert/Alert.vue"]]);
2412
+ let Z = E.props;
2413
+ Z.fields.required = !1;
2414
+ const _i = {
2415
+ components: {
2416
+ Table: E,
2417
+ Input: I
2418
+ },
2419
+ data() {
2420
+ return {
2421
+ itemsData: [...this.items]
2422
+ };
2423
+ },
2424
+ methods: {
2425
+ submitForm: function(e) {
2426
+ console.log(this);
2427
+ const n = new FormData(e.target);
2428
+ let t = new Date();
2429
+ const c = t.getFullYear();
2430
+ let m = t.getMonth() + 1, a = t.getDate();
2431
+ a < 10 && (a = "0" + a), m < 10 && (m = "0" + m), t = a + "/" + m + "/" + c, this.itemsData.unshift({
2432
+ date_added: t,
2433
+ user: n.get("user"),
2434
+ note: n.get("addNote")
2435
+ }), this.$emit("formSubmitted", e);
2436
+ }
2437
+ },
2438
+ name: "NoteFeed",
2439
+ props: {
2440
+ user: {
2441
+ type: String,
2442
+ required: !0
2443
+ },
2444
+ ...Z,
2445
+ title: {
2446
+ type: String,
2447
+ required: !1
2448
+ },
2449
+ method: {
2450
+ type: String,
2451
+ required: !1,
2452
+ default: "post"
2453
+ },
2454
+ action: {
2455
+ type: String,
2456
+ required: !1
2457
+ }
2458
+ }
2459
+ }, pi = { class: "container note-feed mb-2" }, yi = ["innerHTML"], bi = ["action", "method"], vi = ["value"], gi = /* @__PURE__ */ s("button", { class: "btn btn-tertiary" }, "Submit note", -1);
2460
+ function wi(e, n, t, c, m, a) {
2461
+ const r = M("Table"), i = M("Input");
2462
+ return o(), l("div", pi, [
2463
+ t.title ? (o(), l("span", {
2464
+ key: 0,
2465
+ class: "h3",
2466
+ innerHTML: t.title
2467
+ }, null, 8, yi)) : h("v-if", !0),
2468
+ $(r, T({
2469
+ fields: [{ key: "date_added" }, { key: "user" }, { key: "note" }],
2470
+ items: m.itemsData
2471
+ }, e.$props, { class: "mb-0" }), null, 16, ["items"]),
2472
+ s("form", {
2473
+ action: t.action,
2474
+ method: t.method,
2475
+ onSubmit: n[0] || (n[0] = te((f) => a.submitForm(...arguments), ["prevent"]))
2476
+ }, [
2477
+ s("input", {
2478
+ type: "hidden",
2479
+ value: t.user,
2480
+ name: "user"
2481
+ }, null, 8, vi),
2482
+ $(i, {
2483
+ id: "addNote",
2484
+ type: "textarea",
2485
+ label: "Add note",
2486
+ required: "",
2487
+ class: "mw-100"
2488
+ }),
2489
+ gi
2490
+ ], 40, bi)
2491
+ ]);
2492
+ }
2493
+ const zi = /* @__PURE__ */ g(_i, [["render", wi], ["__file", "C:/Users/James.Lambert/Documents/Github/iamproperty-vue-component-library/src/components/NoteFeed/NoteFeed.vue"]]);
2494
+ export {
2495
+ Ai as Accordion,
2496
+ xi as AccordionItem,
2497
+ Fi as Alert,
2498
+ Li as Banner,
2499
+ R as Card,
2500
+ Mt as CardDeck,
2501
+ qi as Carousel,
2502
+ Ni as Drawer,
2503
+ $i as FileUploads,
2504
+ Ti as Header,
2505
+ re as Icon,
2506
+ I as Input,
2507
+ ue as Logo,
2508
+ Di as Modal,
2509
+ Hi as Nav,
2510
+ zi as NoteFeed,
2511
+ Mi as PropertySearchbar,
2512
+ Pi as Step,
2513
+ Bi as Stepper,
2514
+ Ui as Tab,
2515
+ E as Table,
2516
+ Ii as Tabs,
2517
+ Ci as Testimonial
2518
+ };